summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--canvas/source/cairo/cairo_canvasfont.cxx4
-rw-r--r--canvas/source/cairo/cairo_canvashelper_text.cxx2
-rw-r--r--canvas/source/cairo/cairo_canvashelper_texturefill.cxx2
-rw-r--r--canvas/source/cairo/cairo_devicehelper.cxx2
-rw-r--r--canvas/source/cairo/cairo_textlayout.cxx313
-rwxr-xr-xcanvas/source/directx/dx_5rm.cxx6
-rwxr-xr-xcanvas/source/directx/dx_9rm.cxx4
-rwxr-xr-xcanvas/source/directx/dx_canvashelper_texturefill.cxx2
-rwxr-xr-xcanvas/source/directx/dx_textlayout_drawhelper.cxx8
-rwxr-xr-xcanvas/source/directx/dx_winstuff.hxx6
-rw-r--r--canvas/source/tools/image.cxx44
-rw-r--r--canvas/source/vcl/bitmapbackbuffer.cxx6
-rw-r--r--canvas/source/vcl/canvasbitmap.cxx2
-rw-r--r--canvas/source/vcl/canvasbitmaphelper.cxx12
-rw-r--r--canvas/source/vcl/canvasfont.cxx4
-rw-r--r--canvas/source/vcl/canvashelper.cxx54
-rw-r--r--canvas/source/vcl/canvashelper_texturefill.cxx48
-rw-r--r--canvas/source/vcl/devicehelper.cxx2
-rw-r--r--canvas/source/vcl/impltools.cxx18
-rw-r--r--canvas/source/vcl/impltools.hxx2
-rw-r--r--canvas/source/vcl/spritecanvashelper.cxx10
-rw-r--r--canvas/source/vcl/spritedevicehelper.cxx2
-rwxr-xr-x[-rw-r--r--]canvas/source/vcl/spritehelper.cxx21
-rw-r--r--canvas/source/vcl/textlayout.cxx28
-rw-r--r--comphelper/JunitTest_comphelper_complex.mk (renamed from comphelper/inc/makefile.mk)36
-rw-r--r--comphelper/Library_comphelp.mk158
-rw-r--r--comphelper/Makefile (renamed from comphelper/version.mk)24
-rw-r--r--comphelper/Module_comphelper.mk39
-rw-r--r--comphelper/Package_inc.mk137
-rw-r--r--comphelper/inc/comphelper/TypeGeneration.hxx1
-rwxr-xr-xcomphelper/inc/comphelper/anycompare.hxx226
-rw-r--r--comphelper/inc/comphelper/asyncnotification.hxx3
-rwxr-xr-xcomphelper/inc/comphelper/componentguard.hxx70
-rw-r--r--comphelper/inc/comphelper/documentconstants.hxx1
-rwxr-xr-xcomphelper/inc/comphelper/flagguard.hxx83
-rw-r--r--comphelper/inc/comphelper/scopeguard.hxx15
-rw-r--r--comphelper/prj/build.lst17
-rw-r--r--comphelper/prj/d.lst15
-rw-r--r--comphelper/prj/makefile.mk (renamed from toolkit/util/makefile.pmk)18
-rw-r--r--comphelper/source/container/enumerablemap.cxx205
-rwxr-xr-xcomphelper/source/misc/anycompare.cxx131
-rw-r--r--comphelper/source/misc/makefile.mk100
-rw-r--r--comphelper/source/misc/scopeguard.cxx10
-rw-r--r--comphelper/source/processfactory/makefile.mk52
-rw-r--r--comphelper/source/property/TypeGeneration.cxx4
-rw-r--r--comphelper/source/property/makefile.mk65
-rw-r--r--comphelper/source/streaming/makefile.mk54
-rw-r--r--comphelper/test/uno_iterators/makefile.mk48
-rw-r--r--comphelper/test/uno_iterators/uno_iterators.cxx218
-rw-r--r--comphelper/util/comphelp.component (renamed from comphelper/util/comphelp4.component)0
-rw-r--r--comphelper/util/exports.dxp2
-rw-r--r--comphelper/util/makefile.mk78
-rw-r--r--cppcanvas/source/inc/implrenderer.hxx2
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx63
-rw-r--r--cppcanvas/source/mtfrenderer/mtftools.cxx4
-rw-r--r--cppcanvas/source/mtfrenderer/textaction.cxx16
-rw-r--r--cppcanvas/source/wrapper/vclfactory.cxx4
-rw-r--r--i18npool/inc/i18npool/lang.h5
-rw-r--r--i18npool/inc/i18npool/paper.hxx7
-rw-r--r--i18npool/source/breakiterator/breakiteratorImpl.cxx4
-rw-r--r--i18npool/source/breakiterator/makefile.mk12
-rw-r--r--i18npool/source/calendar/calendar_gregorian.cxx6
-rw-r--r--i18npool/source/isolang/isolang.cxx9
-rw-r--r--i18npool/source/isolang/mslangid.cxx2
-rw-r--r--i18npool/source/localedata/LocaleNode.cxx77
-rw-r--r--i18npool/source/localedata/data/dsb_DE.xml350
-rw-r--r--i18npool/source/localedata/data/fi_FI.xml2
-rw-r--r--i18npool/source/localedata/data/haw_US.xml358
-rw-r--r--i18npool/source/localedata/data/hsb_DE.xml2
-rw-r--r--i18npool/source/localedata/data/ht_HT.xml358
-rw-r--r--i18npool/source/localedata/data/jbo.xml358
-rw-r--r--i18npool/source/localedata/data/lif_NP.xml357
-rw-r--r--i18npool/source/localedata/data/localedata_euro.map17
-rw-r--r--i18npool/source/localedata/data/localedata_others.map104
-rw-r--r--i18npool/source/localedata/data/makefile.mk7
-rw-r--r--i18npool/source/localedata/data/no_NO.xml2
-rw-r--r--i18npool/source/localedata/data/sv_SE.xml2
-rw-r--r--i18npool/source/localedata/data/ur_PK.xml358
-rw-r--r--i18npool/source/localedata/data/yi_US.xml163
-rw-r--r--i18npool/source/localedata/localedata.cxx7
-rw-r--r--i18npool/source/paper/paper.cxx6
-rw-r--r--l10ntools/inc/cfgmerge.hxx14
-rw-r--r--l10ntools/inc/export.hxx126
-rw-r--r--l10ntools/inc/gsicheck.hxx52
-rw-r--r--l10ntools/inc/l10ntools/vosapp.hxx10
-rw-r--r--l10ntools/inc/lngmerge.hxx12
-rw-r--r--l10ntools/inc/srciter.hxx2
-rw-r--r--l10ntools/inc/tagtest.hxx110
-rw-r--r--l10ntools/inc/wtranode.hxx4
-rw-r--r--l10ntools/inc/wtratree.hxx4
-rw-r--r--l10ntools/inc/xmlparse.hxx34
-rw-r--r--l10ntools/inc/xrmmerge.hxx8
-rw-r--r--l10ntools/layout/layoutparse.cxx6
-rw-r--r--l10ntools/layout/layoutparse.hxx2
-rw-r--r--l10ntools/layout/tralay.cxx8
-rwxr-xr-xl10ntools/scripts/localize.pl2
-rw-r--r--l10ntools/scripts/tool/l10ntool.py5
-rw-r--r--l10ntools/source/cfgmerge.cxx80
-rw-r--r--l10ntools/source/directory.cxx6
-rw-r--r--l10ntools/source/export.cxx386
-rw-r--r--l10ntools/source/export2.cxx30
-rw-r--r--l10ntools/source/filter/utils/Cache.java8
-rw-r--r--l10ntools/source/gsicheck.cxx252
-rw-r--r--l10ntools/source/gsiconv.cxx26
-rw-r--r--l10ntools/source/helpex.cxx48
-rw-r--r--l10ntools/source/helpmerge.cxx6
-rw-r--r--l10ntools/source/lngex.cxx48
-rw-r--r--l10ntools/source/lngmerge.cxx38
-rw-r--r--l10ntools/source/localize.cxx96
-rw-r--r--l10ntools/source/merge.cxx27
-rw-r--r--l10ntools/source/srciter.cxx16
-rw-r--r--l10ntools/source/tagtest.cxx242
-rw-r--r--l10ntools/source/wtranode.cxx4
-rw-r--r--l10ntools/source/wtratree.cxx12
-rw-r--r--l10ntools/source/xgfconv.cxx6
-rw-r--r--l10ntools/source/xmlparse.cxx106
-rw-r--r--l10ntools/source/xrmmerge.cxx48
-rw-r--r--padmin/AllLangResTarget_spa.mk (renamed from comphelper/source/xml/makefile.mk)34
-rw-r--r--padmin/Executable_spadmin.bin.mk (renamed from comphelper/source/eventattachermgr/makefile.mk)56
-rw-r--r--padmin/Library_spa.mk (renamed from comphelper/source/officeinstdir/makefile.mk)62
-rw-r--r--padmin/Makefile38
-rw-r--r--padmin/Module_padmin.mk (renamed from sot/util/makefile.pmk)16
-rw-r--r--padmin/Package_inc.mk (renamed from svtools/util/svt.pmk)9
-rw-r--r--padmin/prj/build.lst2
-rw-r--r--padmin/prj/d.lst7
-rw-r--r--padmin/prj/makefile.mk (renamed from comphelper/util/makefile.pmk)17
-rw-r--r--padmin/source/adddlg.cxx104
-rw-r--r--padmin/source/cmddlg.cxx24
-rw-r--r--padmin/source/cmddlg.hxx6
-rw-r--r--padmin/source/fontentry.cxx28
-rw-r--r--padmin/source/helper.cxx8
-rw-r--r--padmin/source/helper.hxx9
-rw-r--r--padmin/source/makefile.mk115
-rw-r--r--padmin/source/newppdlg.cxx2
-rw-r--r--padmin/source/padialog.cxx38
-rw-r--r--padmin/source/padialog.hxx6
-rw-r--r--padmin/source/padialog.src18
-rw-r--r--padmin/source/pamain.cxx8
-rw-r--r--padmin/source/progress.cxx10
-rw-r--r--padmin/source/progress.hxx6
-rw-r--r--padmin/source/prtsetup.cxx70
-rw-r--r--padmin/source/prtsetup.hxx8
-rw-r--r--rsc/inc/rscall.h2
-rw-r--r--rsc/inc/rscarray.hxx14
-rw-r--r--rsc/inc/rscclass.hxx34
-rw-r--r--rsc/inc/rscclobj.hxx16
-rw-r--r--rsc/inc/rscconst.hxx26
-rw-r--r--rsc/inc/rsccont.hxx36
-rw-r--r--rsc/inc/rscdb.hxx44
-rw-r--r--rsc/inc/rscdef.hxx140
-rw-r--r--rsc/inc/rscerror.h6
-rw-r--r--rsc/inc/rscflag.hxx28
-rw-r--r--rsc/inc/rscinst.hxx60
-rw-r--r--rsc/inc/rsckey.hxx8
-rw-r--r--rsc/inc/rsclst.hxx8
-rw-r--r--rsc/inc/rscmgr.hxx16
-rw-r--r--rsc/inc/rscpar.hxx24
-rw-r--r--rsc/inc/rscrange.hxx90
-rw-r--r--rsc/inc/rscrsc.hxx4
-rw-r--r--rsc/inc/rscstr.hxx12
-rw-r--r--rsc/inc/rsctools.hxx12
-rw-r--r--rsc/inc/rsctop.hxx30
-rw-r--r--rsc/inc/rsctree.hxx6
-rw-r--r--rsc/source/misc/rscdbl.cxx6
-rw-r--r--rsc/source/misc/rsclst.cxx4
-rw-r--r--rsc/source/parser/rscdb.cxx76
-rw-r--r--rsc/source/parser/rscibas.cxx28
-rw-r--r--rsc/source/parser/rscicpx.cxx48
-rw-r--r--rsc/source/parser/rscinit.cxx102
-rw-r--r--rsc/source/parser/rsckey.cxx10
-rwxr-xr-xrsc/source/parser/rsclex.cxx32
-rw-r--r--rsc/source/parser/rsclex.hxx2
-rw-r--r--rsc/source/parser/rscpar.cxx12
-rw-r--r--rsc/source/parser/rscyacc.cxx18
-rw-r--r--rsc/source/parser/rscyacc.y42
-rw-r--r--rsc/source/prj/start.cxx44
-rw-r--r--rsc/source/res/rscall.cxx4
-rw-r--r--rsc/source/res/rscarray.cxx40
-rw-r--r--rsc/source/res/rscclass.cxx146
-rw-r--r--rsc/source/res/rscclobj.cxx24
-rw-r--r--rsc/source/res/rscconst.cxx38
-rw-r--r--rsc/source/res/rsccont.cxx66
-rw-r--r--rsc/source/res/rscflag.cxx54
-rw-r--r--rsc/source/res/rscmgr.cxx30
-rw-r--r--rsc/source/res/rscrange.cxx102
-rw-r--r--rsc/source/res/rscstr.cxx28
-rw-r--r--rsc/source/res/rsctop.cxx38
-rw-r--r--rsc/source/rsc/rsc.cxx24
-rw-r--r--rsc/source/tools/rscchar.cxx10
-rw-r--r--rsc/source/tools/rscdef.cxx184
-rw-r--r--rsc/source/tools/rsctools.cxx14
-rw-r--r--rsc/source/tools/rsctree.cxx28
-rw-r--r--sot/JunitTest_sot_complex.mk (renamed from comphelper/qa/complex/comphelper/makefile.mk)43
-rw-r--r--sot/Library_sot.mk81
-rw-r--r--sot/Makefile38
-rw-r--r--sot/Module_sot.mk38
-rw-r--r--sot/Package_inc.mk42
-rw-r--r--sot/inc/makefile.mk48
-rw-r--r--sot/inc/sot/absdev.hxx2
-rw-r--r--sot/inc/sot/agg.hxx16
-rw-r--r--sot/inc/sot/exchange.hxx184
-rw-r--r--sot/inc/sot/factory.hxx10
-rw-r--r--sot/inc/sot/filelist.hxx6
-rw-r--r--sot/inc/sot/formats.hxx276
-rw-r--r--sot/inc/sot/object.hxx52
-rw-r--r--sot/inc/sot/sotdata.hxx2
-rw-r--r--sot/inc/sot/stg.hxx280
-rw-r--r--sot/inc/sot/storage.hxx90
-rw-r--r--sot/inc/sot/storinfo.hxx16
-rwxr-xr-x[-rw-r--r--]sot/prj/build.lst12
-rw-r--r--sot/prj/d.lst15
-rw-r--r--sot/prj/makefile.mk (renamed from svl/util/svl.pmk)15
-rw-r--r--sot/qa/complex/olesimplestorage/makefile.mk62
-rw-r--r--sot/source/base/exchange.cxx34
-rw-r--r--sot/source/base/factory.cxx24
-rw-r--r--sot/source/base/filelist.cxx14
-rw-r--r--sot/source/base/formats.cxx56
-rw-r--r--sot/source/base/makefile.mk58
-rw-r--r--sot/source/base/object.cxx28
-rw-r--r--sot/source/sdstor/makefile.mk64
-rw-r--r--sot/source/sdstor/stg.cxx296
-rw-r--r--sot/source/sdstor/stgavl.cxx36
-rw-r--r--sot/source/sdstor/stgavl.hxx8
-rw-r--r--sot/source/sdstor/stgcache.cxx108
-rw-r--r--sot/source/sdstor/stgcache.hxx66
-rw-r--r--sot/source/sdstor/stgdir.cxx272
-rw-r--r--sot/source/sdstor/stgdir.hxx78
-rw-r--r--sot/source/sdstor/stgelem.cxx106
-rw-r--r--sot/source/sdstor/stgelem.hxx122
-rw-r--r--sot/source/sdstor/stgio.cxx110
-rw-r--r--sot/source/sdstor/stgio.hxx12
-rw-r--r--sot/source/sdstor/stgole.cxx88
-rw-r--r--sot/source/sdstor/stgole.hxx24
-rw-r--r--sot/source/sdstor/stgstrms.cxx334
-rw-r--r--sot/source/sdstor/stgstrms.hxx106
-rw-r--r--sot/source/sdstor/storage.cxx214
-rw-r--r--sot/source/sdstor/storinfo.cxx20
-rw-r--r--sot/source/sdstor/ucbstorage.cxx598
-rw-r--r--sot/source/sdstor/unostorageholder.cxx2
-rw-r--r--sot/source/unoolestorage/makefile.mk51
-rw-r--r--sot/util/makefile.mk89
-rw-r--r--svl/AllLangResTarget_svl.mk6
-rwxr-xr-xsvl/JunitTest_svl_complex.mk59
-rw-r--r--svl/Library_fsstorage.mk38
-rw-r--r--svl/Library_passwordcontainer.mk38
-rw-r--r--svl/Library_svl.mk43
-rw-r--r--svl/Module_svl.mk10
-rw-r--r--svl/Package_inc.mk6
-rw-r--r--svl/inc/svl/aeitem.hxx30
-rw-r--r--svl/inc/svl/brdcst.hxx8
-rw-r--r--svl/inc/svl/broadcast.hxx2
-rw-r--r--svl/inc/svl/cenumitm.hxx64
-rw-r--r--svl/inc/svl/cintitem.hxx112
-rw-r--r--svl/inc/svl/cntnrsrt.hxx38
-rw-r--r--svl/inc/svl/cntwall.hxx24
-rw-r--r--svl/inc/svl/converter.hxx4
-rw-r--r--svl/inc/svl/ctypeitm.hxx18
-rw-r--r--svl/inc/svl/custritm.hxx12
-rw-r--r--svl/inc/svl/dateitem.hxx20
-rw-r--r--svl/inc/svl/eitem.hxx10
-rw-r--r--svl/inc/svl/filerec.hxx304
-rw-r--r--svl/inc/svl/flagitem.hxx24
-rw-r--r--svl/inc/svl/globalnameitem.hxx10
-rw-r--r--svl/inc/svl/hint.hxx10
-rw-r--r--svl/inc/svl/httpcook.hxx10
-rw-r--r--svl/inc/svl/ilstitem.hxx6
-rw-r--r--svl/inc/svl/imageitm.hxx12
-rw-r--r--svl/inc/svl/inethist.hxx12
-rw-r--r--svl/inc/svl/instrm.hxx16
-rw-r--r--svl/inc/svl/intitem.hxx52
-rw-r--r--svl/inc/svl/itemiter.hxx12
-rw-r--r--svl/inc/svl/itempool.hxx116
-rw-r--r--svl/inc/svl/itemprop.hxx16
-rw-r--r--svl/inc/svl/itemset.hxx72
-rw-r--r--svl/inc/svl/lckbitem.hxx16
-rw-r--r--svl/inc/svl/listener.hxx8
-rw-r--r--svl/inc/svl/lngmisc.hxx14
-rw-r--r--svl/inc/svl/lstner.hxx12
-rw-r--r--svl/inc/svl/macitem.hxx36
-rw-r--r--svl/inc/svl/mailenum.hxx8
-rw-r--r--svl/inc/svl/metitem.hxx4
-rw-r--r--svl/inc/svl/nranges.hxx14
-rw-r--r--svl/inc/svl/outstrm.hxx10
-rw-r--r--svl/inc/svl/ownlist.hxx4
-rw-r--r--svl/inc/svl/poolcach.hxx2
-rw-r--r--svl/inc/svl/poolitem.hxx66
-rw-r--r--svl/inc/svl/ptitem.hxx16
-rw-r--r--svl/inc/svl/rectitem.hxx16
-rw-r--r--svl/inc/svl/rngitem.hxx22
-rw-r--r--svl/inc/svl/sfontitm.hxx8
-rw-r--r--svl/inc/svl/slstitm.hxx18
-rw-r--r--svl/inc/svl/smplhint.hxx10
-rw-r--r--svl/inc/svl/srchitem.hxx10
-rw-r--r--svl/inc/svl/stritem.hxx8
-rw-r--r--svl/inc/svl/strmadpt.hxx16
-rw-r--r--svl/inc/svl/style.hxx120
-rw-r--r--svl/inc/svl/svarray.hxx234
-rw-r--r--svl/inc/svl/svdde.hxx64
-rw-r--r--svl/inc/svl/svldata.hxx2
-rw-r--r--svl/inc/svl/svstdarr.hxx38
-rw-r--r--svl/inc/svl/szitem.hxx16
-rw-r--r--svl/inc/svl/undo.hxx377
-rw-r--r--svl/inc/svl/visitem.hxx24
-rw-r--r--svl/inc/svl/whiter.hxx16
-rw-r--r--svl/inc/svl/zforlist.hxx176
-rw-r--r--svl/inc/svl/zformat.hxx220
-rw-r--r--svl/prj/build.lst4
-rw-r--r--svl/prj/makefile.mk2
-rw-r--r--svl/qa/complex/passwordcontainer/makefile.mk134
-rw-r--r--svl/source/config/languageoptions.cxx2
-rw-r--r--svl/source/filerec/filerec.cxx204
-rw-r--r--svl/source/inc/passwordcontainer.hxx6
-rw-r--r--svl/source/inc/poolio.hxx92
-rw-r--r--svl/source/items/aeitem.cxx50
-rw-r--r--svl/source/items/cenumitm.cxx54
-rw-r--r--svl/source/items/cintitem.cxx88
-rw-r--r--svl/source/items/cntwall.cxx32
-rw-r--r--svl/source/items/ctypeitm.cxx24
-rw-r--r--svl/source/items/custritm.cxx6
-rw-r--r--svl/source/items/dateitem.cxx26
-rw-r--r--svl/source/items/flagitem.cxx22
-rw-r--r--svl/source/items/globalnameitem.cxx12
-rw-r--r--svl/source/items/ilstitem.cxx16
-rw-r--r--svl/source/items/imageitm.cxx24
-rw-r--r--svl/source/items/intitem.cxx28
-rw-r--r--svl/source/items/itempool.cxx134
-rw-r--r--svl/source/items/itemprop.cxx22
-rw-r--r--svl/source/items/itemset.cxx542
-rw-r--r--svl/source/items/lckbitem.cxx30
-rw-r--r--svl/source/items/macitem.cxx26
-rw-r--r--svl/source/items/nranges.cxx32
-rw-r--r--svl/source/items/poolcach.cxx2
-rw-r--r--svl/source/items/poolio.cxx316
-rw-r--r--svl/source/items/poolitem.cxx40
-rw-r--r--svl/source/items/ptitem.cxx24
-rw-r--r--svl/source/items/rectitem.cxx24
-rw-r--r--svl/source/items/rngitem.cxx2
-rwxr-xr-x[-rw-r--r--]svl/source/items/rngitem_inc.cxx20
-rw-r--r--svl/source/items/sfontitm.cxx12
-rw-r--r--svl/source/items/sitem.cxx10
-rw-r--r--svl/source/items/slstitm.cxx48
-rw-r--r--svl/source/items/srchitem.cxx12
-rw-r--r--svl/source/items/stritem.cxx6
-rw-r--r--svl/source/items/style.cxx238
-rw-r--r--svl/source/items/stylepool.cxx4
-rw-r--r--svl/source/items/szitem.cxx22
-rw-r--r--svl/source/items/visitem.cxx24
-rw-r--r--svl/source/items/whiter.cxx18
-rw-r--r--svl/source/memtools/svarray.cxx104
-rw-r--r--svl/source/misc/adrparse.cxx2
-rw-r--r--svl/source/misc/fstathelper.cxx6
-rw-r--r--svl/source/misc/inethist.cxx98
-rw-r--r--svl/source/misc/inettype.cxx22
-rw-r--r--svl/source/misc/lngmisc.cxx44
-rw-r--r--svl/source/misc/ownlist.cxx40
-rw-r--r--svl/source/misc/strmadpt.cxx60
-rw-r--r--svl/source/notify/brdcst.cxx28
-rw-r--r--svl/source/notify/broadcast.cxx8
-rw-r--r--svl/source/notify/listener.cxx14
-rw-r--r--svl/source/notify/lstner.cxx20
-rw-r--r--svl/source/notify/smplhint.cxx2
-rw-r--r--svl/source/numbers/numfmuno.cxx56
-rw-r--r--svl/source/numbers/numfmuno.hxx4
-rw-r--r--svl/source/numbers/numhead.cxx38
-rw-r--r--svl/source/numbers/numhead.hxx22
-rw-r--r--svl/source/numbers/zforfind.cxx448
-rw-r--r--svl/source/numbers/zforfind.hxx132
-rw-r--r--svl/source/numbers/zforlist.cxx504
-rw-r--r--svl/source/numbers/zformat.cxx632
-rw-r--r--svl/source/numbers/zforscan.cxx164
-rw-r--r--svl/source/numbers/zforscan.hxx84
-rw-r--r--svl/source/svdde/ddecli.cxx28
-rw-r--r--svl/source/svdde/ddedata.cxx12
-rw-r--r--svl/source/svdde/ddeimp.hxx26
-rw-r--r--svl/source/svdde/ddesvr.cxx102
-rw-r--r--svl/source/svsql/converter.cxx4
-rw-r--r--svl/source/undo/undo.cxx1243
-rw-r--r--svl/unx/source/svdde/ddedummy.cxx52
-rw-r--r--svtools/AllLangResTarget_productregistration.mk6
-rw-r--r--svtools/AllLangResTarget_svt.mk6
-rw-r--r--svtools/Executable_bmp.mk38
-rw-r--r--svtools/Executable_bmpsum.mk38
-rw-r--r--svtools/Executable_g2g.mk39
-rwxr-xr-x[-rw-r--r--]svtools/JunitTest_svtools_unoapi.mk (renamed from comphelper/source/compare/makefile.mk)38
-rw-r--r--svtools/Library_hatchwindowfactory.mk39
-rw-r--r--svtools/Library_productregistration.mk39
-rw-r--r--svtools/Library_svt.mk42
-rw-r--r--svtools/Module_svtools.mk10
-rw-r--r--svtools/Package_inc.mk10
-rw-r--r--svtools/bmpmaker/bmp.cxx24
-rw-r--r--svtools/bmpmaker/bmpcore.cxx12
-rw-r--r--svtools/bmpmaker/bmpcore.hxx8
-rw-r--r--svtools/bmpmaker/bmpsum.cxx20
-rw-r--r--svtools/bmpmaker/g2g.cxx26
-rw-r--r--svtools/inc/svtools/DocumentInfoPreview.hxx2
-rw-r--r--svtools/inc/svtools/acceleratorexecute.hxx2
-rwxr-xr-xsvtools/inc/svtools/accessiblefactory.hxx15
-rw-r--r--svtools/inc/svtools/accessibletable.hxx16
-rw-r--r--svtools/inc/svtools/accessibletableprovider.hxx14
-rw-r--r--svtools/inc/svtools/apearcfg.hxx32
-rw-r--r--svtools/inc/svtools/asynclink.hxx16
-rw-r--r--svtools/inc/svtools/brwbox.hxx256
-rw-r--r--svtools/inc/svtools/calendar.hxx96
-rw-r--r--svtools/inc/svtools/cliplistener.hxx2
-rw-r--r--svtools/inc/svtools/colctrl.hxx70
-rw-r--r--svtools/inc/svtools/ctrlbox.hxx140
-rw-r--r--svtools/inc/svtools/ctrltool.hxx44
-rw-r--r--svtools/inc/svtools/editbrowsebox.hxx20
-rw-r--r--svtools/inc/svtools/editimplementation.hxx4
-rw-r--r--svtools/inc/svtools/editsyntaxhighlighter.hxx2
-rw-r--r--svtools/inc/svtools/ehdl.hxx32
-rw-r--r--svtools/inc/svtools/embedhlp.hxx18
-rw-r--r--svtools/inc/svtools/expander.hxx10
-rw-r--r--svtools/inc/svtools/filectrl.hxx22
-rw-r--r--svtools/inc/svtools/filedlg.hxx8
-rw-r--r--svtools/inc/svtools/fileview.hxx4
-rw-r--r--svtools/inc/svtools/filter.hxx246
-rw-r--r--svtools/inc/svtools/fltcall.hxx8
-rw-r--r--svtools/inc/svtools/fltdefs.hxx62
-rw-r--r--svtools/inc/svtools/fmtfield.hxx100
-rw-r--r--svtools/inc/svtools/generictoolboxcontroller.hxx2
-rw-r--r--svtools/inc/svtools/grfmgr.hxx192
-rw-r--r--svtools/inc/svtools/headbar.hxx136
-rw-r--r--svtools/inc/svtools/htmlcfg.hxx36
-rw-r--r--svtools/inc/svtools/htmlout.hxx14
-rw-r--r--svtools/inc/svtools/htmltokn.h2
-rw-r--r--svtools/inc/svtools/imap.hxx34
-rw-r--r--svtools/inc/svtools/imapcirc.hxx20
-rw-r--r--svtools/inc/svtools/imapobj.hxx44
-rw-r--r--svtools/inc/svtools/imappoly.hxx20
-rw-r--r--svtools/inc/svtools/imaprect.hxx14
-rw-r--r--svtools/inc/svtools/inetimg.hxx4
-rw-r--r--svtools/inc/svtools/inettbc.hxx28
-rw-r--r--svtools/inc/svtools/ivctrl.hxx114
-rw-r--r--svtools/inc/svtools/javainteractionhandler.hxx2
-rw-r--r--svtools/inc/svtools/localresaccess.hxx2
-rw-r--r--svtools/inc/svtools/parhtml.hxx96
-rw-r--r--svtools/inc/svtools/parrtf.hxx8
-rw-r--r--svtools/inc/svtools/prgsbar.hxx14
-rw-r--r--svtools/inc/svtools/prnsetup.hxx2
-rw-r--r--svtools/inc/svtools/rtfout.hxx8
-rw-r--r--svtools/inc/svtools/ruler.hxx202
-rw-r--r--svtools/inc/svtools/scrwin.hxx14
-rw-r--r--svtools/inc/svtools/stdmenu.hxx2
-rw-r--r--svtools/inc/svtools/svicnvw.hxx76
-rw-r--r--svtools/inc/svtools/svlbitm.hxx70
-rw-r--r--svtools/inc/svtools/svlbox.hxx160
-rw-r--r--svtools/inc/svtools/svmedit.hxx34
-rw-r--r--svtools/inc/svtools/svmedit2.hxx12
-rw-r--r--svtools/inc/svtools/svparser.hxx72
-rw-r--r--svtools/inc/svtools/svtabbx.hxx92
-rw-r--r--svtools/inc/svtools/svtdata.hxx4
-rw-r--r--svtools/inc/svtools/svtools.hrc12
-rw-r--r--svtools/inc/svtools/svtreebx.hxx130
-rw-r--r--svtools/inc/svtools/svxbox.hxx70
-rw-r--r--svtools/inc/svtools/sychconv.hxx2
-rw-r--r--svtools/inc/svtools/syntaxhighlight.hxx28
-rw-r--r--svtools/inc/svtools/tabbar.hxx186
-rw-r--r--svtools/inc/svtools/table/abstracttablecontrol.hxx134
-rw-r--r--svtools/inc/svtools/table/defaultinputhandler.hxx41
-rw-r--r--svtools/inc/svtools/table/gridtablerenderer.hxx50
-rw-r--r--svtools/inc/svtools/table/tablecontrol.hxx165
-rw-r--r--svtools/inc/svtools/table/tablecontrolinterface.hxx254
-rw-r--r--svtools/inc/svtools/table/tableinputhandler.hxx22
-rwxr-xr-x[-rw-r--r--]svtools/inc/svtools/table/tablemodel.hxx331
-rw-r--r--svtools/inc/svtools/table/tablerenderer.hxx79
-rwxr-xr-xsvtools/inc/svtools/table/tablesort.hxx91
-rw-r--r--svtools/inc/svtools/table/tabletypes.hxx7
-rw-r--r--svtools/inc/svtools/taskbar.hxx142
-rw-r--r--svtools/inc/svtools/testtool.hxx6
-rw-r--r--svtools/inc/svtools/textdata.hxx96
-rw-r--r--svtools/inc/svtools/texteng.hxx223
-rw-r--r--svtools/inc/svtools/textview.hxx70
-rw-r--r--svtools/inc/svtools/toolpanel/paneltabbar.hxx2
-rwxr-xr-xsvtools/inc/svtools/toolpanel/toolpaneldeck.hxx2
-rw-r--r--svtools/inc/svtools/transfer.hxx8
-rw-r--r--svtools/inc/svtools/treelist.hxx236
-rw-r--r--svtools/inc/svtools/ttprops.hxx40
-rw-r--r--svtools/inc/svtools/txtattr.hxx54
-rw-r--r--svtools/inc/svtools/unitconv.hxx6
-rw-r--r--svtools/inc/svtools/valueset.hxx180
-rw-r--r--svtools/inc/svtools/wallitem.hxx2
-rw-r--r--svtools/inc/svtools/wizardmachine.hxx4
-rw-r--r--svtools/inc/svtools/wizdlg.hxx30
-rw-r--r--svtools/inc/svtools/wmf.hxx12
-rw-r--r--svtools/inc/svtools/xtextedt.hxx18
-rw-r--r--svtools/inc/svtools/xwindowitem.hxx4
-rw-r--r--svtools/prj/build.lst3
-rw-r--r--svtools/prj/makefile.mk2
-rw-r--r--svtools/qa/unoapi/Test.java5
-rw-r--r--svtools/qa/unoapi/makefile.mk48
-rw-r--r--svtools/source/brwbox/brwbox1.cxx376
-rw-r--r--svtools/source/brwbox/brwbox2.cxx350
-rw-r--r--svtools/source/brwbox/brwbox3.cxx12
-rw-r--r--svtools/source/brwbox/brwhead.cxx4
-rw-r--r--svtools/source/brwbox/datwin.cxx107
-rw-r--r--svtools/source/brwbox/datwin.hxx64
-rw-r--r--svtools/source/brwbox/ebbcontrols.cxx28
-rw-r--r--svtools/source/brwbox/editbrowsebox.cxx2
-rw-r--r--svtools/source/brwbox/editbrowsebox2.cxx8
-rw-r--r--svtools/source/config/accessibilityoptions.cxx4
-rw-r--r--svtools/source/config/apearcfg.cxx18
-rw-r--r--svtools/source/config/colorcfg.cxx10
-rw-r--r--svtools/source/config/htmlcfg.cxx48
-rw-r--r--svtools/source/config/menuoptions.cxx12
-rw-r--r--svtools/source/config/miscopt.cxx10
-rw-r--r--svtools/source/config/printoptions.cxx6
-rw-r--r--svtools/source/contnr/fileview.cxx88
-rw-r--r--svtools/source/contnr/imivctl.hxx276
-rw-r--r--svtools/source/contnr/imivctl1.cxx862
-rw-r--r--svtools/source/contnr/imivctl2.cxx182
-rw-r--r--svtools/source/contnr/ivctrl.cxx92
-rw-r--r--svtools/source/contnr/svcontnr.src27
-rw-r--r--svtools/source/contnr/svicnvw.cxx88
-rw-r--r--svtools/source/contnr/svimpbox.cxx626
-rw-r--r--svtools/source/contnr/svimpicn.cxx632
-rw-r--r--svtools/source/contnr/svlbitm.cxx78
-rw-r--r--svtools/source/contnr/svlbox.cxx278
-rw-r--r--svtools/source/contnr/svtabbx.cxx164
-rw-r--r--svtools/source/contnr/svtreebx.cxx284
-rw-r--r--svtools/source/contnr/templwin.cxx72
-rw-r--r--svtools/source/contnr/templwin.hxx12
-rw-r--r--svtools/source/contnr/treelist.cxx304
-rwxr-xr-xsvtools/source/control/asynclink.cxx12
-rwxr-xr-xsvtools/source/control/calendar.cxx494
-rwxr-xr-xsvtools/source/control/ctrlbox.cxx218
-rwxr-xr-xsvtools/source/control/ctrltool.cxx60
-rwxr-xr-xsvtools/source/control/filectrl.cxx12
-rwxr-xr-x[-rw-r--r--]svtools/source/control/filectrl.src40
-rwxr-xr-x[-rw-r--r--]svtools/source/control/fmtfield.cxx170
-rwxr-xr-xsvtools/source/control/headbar.cxx296
-rwxr-xr-xsvtools/source/control/inettbc.cxx133
-rwxr-xr-xsvtools/source/control/prgsbar.cxx32
-rwxr-xr-xsvtools/source/control/roadmap.cxx12
-rwxr-xr-xsvtools/source/control/ruler.cxx359
-rwxr-xr-xsvtools/source/control/scriptedtext.cxx2
-rwxr-xr-xsvtools/source/control/scrwin.cxx42
-rwxr-xr-x[-rw-r--r--]svtools/source/control/stdctrl.cxx2
-rwxr-xr-xsvtools/source/control/stdmenu.cxx100
-rwxr-xr-x[-rw-r--r--]svtools/source/control/svxbox.cxx132
-rwxr-xr-xsvtools/source/control/tabbar.cxx453
-rwxr-xr-xsvtools/source/control/taskbar.cxx24
-rwxr-xr-xsvtools/source/control/taskbox.cxx36
-rwxr-xr-xsvtools/source/control/taskmisc.cxx20
-rwxr-xr-xsvtools/source/control/taskstat.cxx134
-rw-r--r--svtools/source/control/toolbarmenu.cxx42
-rw-r--r--svtools/source/control/toolbarmenuacc.cxx8
-rw-r--r--svtools/source/control/toolbarmenuimp.hxx2
-rw-r--r--svtools/source/control/valueacc.cxx38
-rwxr-xr-xsvtools/source/control/valueimp.hxx12
-rw-r--r--svtools/source/control/valueset.cxx450
-rw-r--r--svtools/source/dialogs/addresstemplate.cxx6
-rw-r--r--svtools/source/dialogs/colctrl.cxx100
-rw-r--r--svtools/source/dialogs/colrdlg.cxx30
-rw-r--r--svtools/source/dialogs/colrdlg.hrc2
-rw-r--r--svtools/source/dialogs/colrdlg.src38
-rw-r--r--svtools/source/dialogs/filedlg.cxx12
-rw-r--r--svtools/source/dialogs/filedlg2.cxx140
-rw-r--r--svtools/source/dialogs/filedlg2.hxx30
-rw-r--r--svtools/source/dialogs/insdlg.cxx8
-rw-r--r--svtools/source/dialogs/mcvmath.cxx32
-rw-r--r--svtools/source/dialogs/mcvmath.hxx16
-rw-r--r--svtools/source/dialogs/prnsetup.cxx14
-rw-r--r--svtools/source/dialogs/property.cxx206
-rw-r--r--svtools/source/dialogs/wizdlg.cxx52
-rw-r--r--svtools/source/edit/editsyntaxhighlighter.cxx22
-rw-r--r--svtools/source/edit/svmedit.cxx278
-rw-r--r--svtools/source/edit/svmedit2.cxx14
-rw-r--r--svtools/source/edit/sychconv.cxx18
-rw-r--r--svtools/source/edit/syntaxhighlight.cxx208
-rw-r--r--svtools/source/edit/textdat2.hxx138
-rw-r--r--svtools/source/edit/textdata.cxx66
-rw-r--r--svtools/source/edit/textdoc.cxx206
-rw-r--r--svtools/source/edit/textdoc.hxx60
-rw-r--r--svtools/source/edit/texteng.cxx686
-rw-r--r--svtools/source/edit/textund2.hxx32
-rw-r--r--svtools/source/edit/textundo.cxx75
-rw-r--r--svtools/source/edit/textundo.hxx8
-rw-r--r--svtools/source/edit/textview.cxx442
-rw-r--r--svtools/source/edit/xtextedt.cxx86
-rw-r--r--svtools/source/filter.vcl/filter/FilterConfigItem.cxx4
-rw-r--r--svtools/source/filter.vcl/filter/exportdialog.cxx4
-rw-r--r--svtools/source/filter.vcl/filter/filter.cxx334
-rw-r--r--svtools/source/filter.vcl/filter/filter2.cxx316
-rw-r--r--svtools/source/filter.vcl/filter/sgfbram.cxx132
-rw-r--r--svtools/source/filter.vcl/filter/sgvmain.cxx202
-rw-r--r--svtools/source/filter.vcl/filter/sgvspln.cxx82
-rw-r--r--svtools/source/filter.vcl/filter/sgvtext.cxx364
-rw-r--r--svtools/source/filter.vcl/igif/decode.cxx50
-rw-r--r--svtools/source/filter.vcl/igif/decode.hxx32
-rw-r--r--svtools/source/filter.vcl/igif/gifread.cxx170
-rw-r--r--svtools/source/filter.vcl/ixbm/xbmread.cxx52
-rw-r--r--svtools/source/filter.vcl/ixpm/rgbtable.hxx6
-rw-r--r--svtools/source/filter.vcl/ixpm/xpmread.cxx164
-rw-r--r--svtools/source/filter.vcl/jpeg/jpeg.cxx58
-rw-r--r--svtools/source/filter.vcl/jpeg/jpeg.h1
-rw-r--r--svtools/source/filter.vcl/jpeg/jpegc.c14
-rw-r--r--svtools/source/filter.vcl/wmf/emfwr.cxx168
-rw-r--r--svtools/source/filter.vcl/wmf/emfwr.hxx30
-rw-r--r--svtools/source/filter.vcl/wmf/enhwmf.cxx184
-rw-r--r--svtools/source/filter.vcl/wmf/winmtf.cxx84
-rw-r--r--svtools/source/filter.vcl/wmf/winmtf.hxx94
-rw-r--r--svtools/source/filter.vcl/wmf/winwmf.cxx100
-rw-r--r--svtools/source/filter.vcl/wmf/wmf.cxx32
-rw-r--r--svtools/source/filter.vcl/wmf/wmfwr.cxx134
-rw-r--r--svtools/source/filter.vcl/wmf/wmfwr.hxx56
-rw-r--r--svtools/source/graphic/descriptor.cxx2
-rw-r--r--svtools/source/graphic/descriptor.hxx2
-rw-r--r--svtools/source/graphic/grfattr.cxx8
-rw-r--r--svtools/source/graphic/grfcache.cxx138
-rw-r--r--svtools/source/graphic/grfcache.hxx42
-rw-r--r--svtools/source/graphic/grfmgr.cxx136
-rw-r--r--svtools/source/graphic/grfmgr2.cxx142
-rw-r--r--svtools/source/graphic/provider.cxx2
-rw-r--r--svtools/source/hatchwindow/ipwin.cxx24
-rw-r--r--svtools/source/hatchwindow/ipwin.hxx8
-rw-r--r--svtools/source/inc/filectrl.hrc7
-rw-r--r--svtools/source/inc/gifread.hxx66
-rw-r--r--svtools/source/inc/jpeg.hxx10
-rw-r--r--svtools/source/inc/msgrd.hxx6
-rw-r--r--svtools/source/inc/msgwr.hxx6
-rw-r--r--svtools/source/inc/property.hxx108
-rw-r--r--svtools/source/inc/sgfbram.hxx100
-rw-r--r--svtools/source/inc/sgffilt.hxx8
-rw-r--r--svtools/source/inc/sgvmain.hxx226
-rw-r--r--svtools/source/inc/sgvspln.hxx10
-rw-r--r--svtools/source/inc/svimpbox.hxx122
-rw-r--r--svtools/source/inc/svimpicn.hxx64
-rw-r--r--svtools/source/inc/xbmread.hxx6
-rw-r--r--svtools/source/inc/xpmread.hxx60
-rw-r--r--svtools/source/java/javainteractionhandler.cxx2
-rw-r--r--svtools/source/misc/acceleratorexecute.cxx2
-rw-r--r--svtools/source/misc/cliplistener.cxx2
-rw-r--r--svtools/source/misc/ehdl.cxx86
-rw-r--r--svtools/source/misc/embedhlp.cxx42
-rw-r--r--svtools/source/misc/embedtransfer.cxx8
-rw-r--r--svtools/source/misc/helpagentwindow.cxx2
-rw-r--r--svtools/source/misc/imagemgr.cxx353
-rw-r--r--svtools/source/misc/imagemgr.src23
-rw-r--r--svtools/source/misc/imap.cxx152
-rw-r--r--svtools/source/misc/imap2.cxx40
-rw-r--r--svtools/source/misc/imap3.cxx10
-rw-r--r--svtools/source/misc/itemdel.cxx2
-rwxr-xr-x[-rw-r--r--]svtools/source/misc/langtab.cxx4
-rw-r--r--svtools/source/misc/langtab.src8
-rw-r--r--svtools/source/misc/svtdata.cxx4
-rw-r--r--svtools/source/misc/templatefoldercache.cxx11
-rw-r--r--svtools/source/misc/transfer.cxx8
-rw-r--r--svtools/source/misc/transfer2.cxx12
-rw-r--r--svtools/source/misc/unitconv.cxx10
-rw-r--r--svtools/source/misc/xwindowitem.cxx4
-rw-r--r--svtools/source/plugapp/ttprops.cxx14
-rw-r--r--svtools/source/productregistration/registrationdlg.cxx2
-rw-r--r--svtools/source/svhtml/htmlkywd.cxx22
-rw-r--r--svtools/source/svhtml/htmlout.cxx32
-rw-r--r--svtools/source/svhtml/htmlsupp.cxx10
-rw-r--r--svtools/source/svhtml/parhtml.cxx304
-rw-r--r--svtools/source/svrtf/parrtf.cxx8
-rw-r--r--svtools/source/svrtf/rtfkeywd.cxx4
-rw-r--r--svtools/source/svrtf/rtfout.cxx10
-rw-r--r--svtools/source/svrtf/svparser.cxx66
-rwxr-xr-xsvtools/source/table/cellvalueconversion.cxx77
-rwxr-xr-x[-rw-r--r--]svtools/source/table/cellvalueconversion.hxx (renamed from svtools/source/inc/accessibletableimp.hxx)48
-rw-r--r--svtools/source/table/defaultinputhandler.cxx203
-rw-r--r--svtools/source/table/gridtablerenderer.cxx663
-rwxr-xr-xsvtools/source/table/mousefunction.cxx320
-rwxr-xr-xsvtools/source/table/mousefunction.hxx161
-rw-r--r--svtools/source/table/tablecontrol.cxx790
-rwxr-xr-x[-rw-r--r--]svtools/source/table/tablecontrol_impl.cxx2623
-rwxr-xr-x[-rw-r--r--]svtools/source/table/tablecontrol_impl.hxx319
-rw-r--r--svtools/source/table/tabledatawindow.cxx199
-rw-r--r--svtools/source/table/tabledatawindow.hxx (renamed from svtools/inc/svtools/table/tabledatawindow.hxx)11
-rw-r--r--svtools/source/table/tablegeometry.cxx132
-rw-r--r--svtools/source/table/tablegeometry.hxx44
-rw-r--r--svtools/source/toolpanel/drawerlayouter.cxx4
-rwxr-xr-xsvtools/source/toolpanel/paneltabbar.cxx14
-rwxr-xr-xsvtools/source/toolpanel/tablayouter.cxx2
-rwxr-xr-xsvtools/source/toolpanel/toolpaneldeck.cxx4
-rw-r--r--svtools/source/toolpanel/toolpaneldrawer.cxx18
-rw-r--r--svtools/source/toolpanel/toolpaneldrawer.hxx4
-rw-r--r--svtools/source/uno/addrtempuno.cxx2
-rw-r--r--svtools/source/uno/generictoolboxcontroller.cxx4
-rw-r--r--svtools/source/uno/genericunodialog.cxx2
-rw-r--r--svtools/source/uno/svtxgridcontrol.cxx1045
-rwxr-xr-xsvtools/source/uno/svtxgridcontrol.hxx88
-rw-r--r--svtools/source/uno/toolboxcontroller.cxx2
-rw-r--r--svtools/source/uno/treecontrolpeer.cxx54
-rw-r--r--svtools/source/uno/treecontrolpeer.hxx2
-rw-r--r--svtools/source/uno/unocontroltablemodel.cxx980
-rw-r--r--svtools/source/uno/unocontroltablemodel.hxx240
-rwxr-xr-xsvtools/source/uno/unogridcolumnfacade.cxx427
-rwxr-xr-xsvtools/source/uno/unogridcolumnfacade.hxx114
-rw-r--r--svtools/source/uno/unoiface.cxx8
-rw-r--r--svtools/source/uno/unoimap.cxx18
-rw-r--r--svtools/source/uno/wizard/wizardpagecontroller.cxx2
-rw-r--r--svtools/source/urlobj/inetimg.cxx20
-rw-r--r--svtools/workben/browser.cxx40
-rw-r--r--svtools/workben/stest.cxx6
-rw-r--r--svtools/workben/svdem.cxx52
-rwxr-xr-xsvtools/workben/toolpanel/toolpaneltest.cxx6
-rw-r--r--svtools/workben/urange.cxx8
-rw-r--r--toolkit/AllLangResTarget_tk.mk6
-rwxr-xr-x[-rw-r--r--]toolkit/JunitTest_toolkit_unoapi.mk (renamed from comphelper/source/container/makefile.mk)46
-rw-r--r--toolkit/Library_tk.mk43
-rw-r--r--toolkit/Module_toolkit.mk10
-rw-r--r--toolkit/Package_inc.mk7
-rw-r--r--toolkit/Package_source.mk6
-rw-r--r--toolkit/Package_util.mk6
-rw-r--r--toolkit/inc/layout/layout.hxx2
-rwxr-xr-xtoolkit/inc/toolkit/awt/animatedimagespeer.hxx106
-rw-r--r--toolkit/inc/toolkit/awt/vclxaccessiblecomponent.hxx4
-rw-r--r--toolkit/inc/toolkit/awt/vclxcontainer.hxx2
-rw-r--r--toolkit/inc/toolkit/awt/vclxdevice.hxx2
-rw-r--r--toolkit/inc/toolkit/awt/vclxfont.hxx2
-rw-r--r--toolkit/inc/toolkit/awt/vclxmenu.hxx4
-rw-r--r--toolkit/inc/toolkit/awt/vclxtabpagecontainer.hxx90
-rw-r--r--toolkit/inc/toolkit/awt/vclxtabpagemodel.hxx82
-rw-r--r--toolkit/inc/toolkit/awt/vclxtopwindow.hxx2
-rw-r--r--toolkit/inc/toolkit/awt/vclxwindow.hxx2
-rw-r--r--toolkit/inc/toolkit/awt/vclxwindows.hxx6
-rw-r--r--toolkit/inc/toolkit/awt/xsimpleanimation.hxx27
-rw-r--r--toolkit/inc/toolkit/awt/xthrobber.hxx26
-rwxr-xr-xtoolkit/inc/toolkit/controls/animatedimages.hxx144
-rw-r--r--toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx265
-rw-r--r--toolkit/inc/toolkit/controls/dialogcontrol.hxx207
-rw-r--r--toolkit/inc/toolkit/controls/formattedcontrol.hxx9
-rw-r--r--toolkit/inc/toolkit/controls/geometrycontrolmodel.hxx2
-rw-r--r--toolkit/inc/toolkit/controls/geometrycontrolmodel_impl.hxx10
-rw-r--r--toolkit/inc/toolkit/controls/roadmapcontrol.hxx38
-rwxr-xr-xtoolkit/inc/toolkit/controls/spinningprogress.hxx70
-rw-r--r--toolkit/inc/toolkit/controls/tabpagecontainer.hxx147
-rw-r--r--toolkit/inc/toolkit/controls/tabpagemodel.hxx146
-rw-r--r--toolkit/inc/toolkit/controls/tkscrollbar.hxx4
-rw-r--r--toolkit/inc/toolkit/controls/tksimpleanimation.hxx22
-rw-r--r--toolkit/inc/toolkit/controls/tkspinbutton.hxx4
-rw-r--r--toolkit/inc/toolkit/controls/tkthrobber.hxx4
-rw-r--r--toolkit/inc/toolkit/controls/unocontrol.hxx7
-rw-r--r--toolkit/inc/toolkit/controls/unocontrolbase.hxx8
-rw-r--r--toolkit/inc/toolkit/controls/unocontrolcontainer.hxx5
-rw-r--r--toolkit/inc/toolkit/controls/unocontrolcontainermodel.hxx2
-rw-r--r--toolkit/inc/toolkit/controls/unocontrolmodel.hxx49
-rw-r--r--toolkit/inc/toolkit/controls/unocontrols.hxx100
-rw-r--r--toolkit/inc/toolkit/helper/listenermultiplexer.hxx8
-rw-r--r--toolkit/inc/toolkit/helper/mutexandbroadcasthelper.hxx8
-rw-r--r--toolkit/inc/toolkit/helper/property.hxx14
-rw-r--r--toolkit/inc/toolkit/helper/servicenames.hxx11
-rw-r--r--toolkit/inc/toolkit/helper/throbberimpl.hxx84
-rw-r--r--toolkit/inc/toolkit/helper/tkresmgr.hxx1
-rw-r--r--toolkit/inc/toolkit/helper/unowrapper.hxx6
-rw-r--r--toolkit/prj/build.lst6
-rw-r--r--toolkit/prj/makefile.mk2
-rwxr-xr-xtoolkit/qa/complex/toolkit/AccessibleStatusBar.java (renamed from toolkit/qa/complex/toolkit/CheckAccessibleStatusBar.java)107
-rwxr-xr-xtoolkit/qa/complex/toolkit/AccessibleStatusBarItem.java (renamed from toolkit/qa/complex/toolkit/CheckAccessibleStatusBarItem.java)122
-rwxr-xr-xtoolkit/qa/complex/toolkit/Assert.java234
-rw-r--r--toolkit/qa/complex/toolkit/CallbackClass.java67
-rw-r--r--toolkit/qa/complex/toolkit/CheckAsyncCallback.java156
-rwxr-xr-xtoolkit/qa/complex/toolkit/GridControl.java687
-rw-r--r--toolkit/qa/complex/toolkit/UnitConversion.java247
-rw-r--r--toolkit/qa/complex/toolkit/_XRequestCallback.java88
-rwxr-xr-x[-rw-r--r--]toolkit/qa/complex/toolkit/accessibility/_XAccessibleComponent.java (renamed from toolkit/qa/complex/toolkit/_XAccessibleComponent.java)3
-rwxr-xr-x[-rw-r--r--]toolkit/qa/complex/toolkit/accessibility/_XAccessibleContext.java (renamed from toolkit/qa/complex/toolkit/_XAccessibleContext.java)2
-rwxr-xr-x[-rw-r--r--]toolkit/qa/complex/toolkit/accessibility/_XAccessibleEventBroadcaster.java (renamed from toolkit/qa/complex/toolkit/_XAccessibleEventBroadcaster.java)14
-rwxr-xr-x[-rw-r--r--]toolkit/qa/complex/toolkit/accessibility/_XAccessibleExtendedComponent.java (renamed from toolkit/qa/complex/toolkit/_XAccessibleExtendedComponent.java)2
-rwxr-xr-x[-rw-r--r--]toolkit/qa/complex/toolkit/accessibility/_XAccessibleText.java (renamed from toolkit/qa/complex/toolkit/_XAccessibleText.java)2
-rwxr-xr-xtoolkit/qa/complex/toolkit/awtgrid/DummyColumn.java180
-rwxr-xr-xtoolkit/qa/complex/toolkit/awtgrid/GridDataListener.java98
-rwxr-xr-xtoolkit/qa/complex/toolkit/awtgrid/TMutableGridDataModel.java314
-rwxr-xr-xtoolkit/qa/complex/toolkit/makefile.mk97
-rw-r--r--toolkit/qa/complex/xunitconversion/XUnitConversionTest.java250
-rw-r--r--toolkit/qa/unoapi/Test.java5
-rw-r--r--toolkit/qa/unoapi/makefile.mk48
-rwxr-xr-xtoolkit/source/awt/animatedimagespeer.cxx538
-rw-r--r--toolkit/source/awt/vclxaccessiblecomponent.cxx12
-rw-r--r--toolkit/source/awt/vclxfont.cxx10
-rw-r--r--toolkit/source/awt/vclxmenu.cxx8
-rw-r--r--toolkit/source/awt/vclxregion.cxx2
-rw-r--r--toolkit/source/awt/vclxtabcontrol.cxx32
-rw-r--r--toolkit/source/awt/vclxtabpagecontainer.cxx233
-rw-r--r--toolkit/source/awt/vclxtabpagemodel.cxx150
-rw-r--r--toolkit/source/awt/vclxtoolkit.cxx77
-rw-r--r--toolkit/source/awt/vclxwindow.cxx91
-rw-r--r--toolkit/source/awt/vclxwindows.cxx87
-rw-r--r--toolkit/source/awt/xsimpleanimation.cxx116
-rw-r--r--toolkit/source/awt/xthrobber.cxx76
-rwxr-xr-xtoolkit/source/controls/animatedimages.cxx493
-rw-r--r--toolkit/source/controls/controlmodelcontainerbase.cxx1860
-rw-r--r--toolkit/source/controls/dialogcontrol.cxx1748
-rw-r--r--toolkit/source/controls/formattedcontrol.cxx10
-rw-r--r--toolkit/source/controls/grid/defaultgridcolumnmodel.cxx460
-rw-r--r--toolkit/source/controls/grid/defaultgridcolumnmodel.hxx81
-rw-r--r--toolkit/source/controls/grid/defaultgriddatamodel.cxx567
-rw-r--r--toolkit/source/controls/grid/defaultgriddatamodel.hxx99
-rw-r--r--toolkit/source/controls/grid/gridcolumn.cxx480
-rw-r--r--toolkit/source/controls/grid/gridcolumn.hxx114
-rw-r--r--toolkit/source/controls/grid/gridcontrol.cxx313
-rw-r--r--toolkit/source/controls/grid/gridcontrol.hxx55
-rwxr-xr-xtoolkit/source/controls/grid/grideventforwarder.cxx149
-rwxr-xr-xtoolkit/source/controls/grid/grideventforwarder.hxx85
-rwxr-xr-xtoolkit/source/controls/grid/initguard.hxx64
-rwxr-xr-xtoolkit/source/controls/grid/sortablegriddatamodel.cxx877
-rwxr-xr-xtoolkit/source/controls/grid/sortablegriddatamodel.hxx198
-rw-r--r--toolkit/source/controls/roadmapcontrol.cxx8
-rwxr-xr-xtoolkit/source/controls/spinningprogress.cxx140
-rw-r--r--toolkit/source/controls/tabpagecontainer.cxx295
-rw-r--r--toolkit/source/controls/tabpagemodel.cxx396
-rw-r--r--toolkit/source/controls/tkscrollbar.cxx8
-rw-r--r--toolkit/source/controls/tksimpleanimation.cxx61
-rw-r--r--toolkit/source/controls/tkspinbutton.cxx8
-rw-r--r--toolkit/source/controls/tkthrobber.cxx6
-rw-r--r--toolkit/source/controls/tree/treecontrol.cxx20
-rw-r--r--toolkit/source/controls/tree/treecontrol.hxx7
-rw-r--r--toolkit/source/controls/unocontrol.cxx22
-rw-r--r--toolkit/source/controls/unocontrolbase.cxx9
-rw-r--r--toolkit/source/controls/unocontrolcontainer.cxx10
-rw-r--r--toolkit/source/controls/unocontrolcontainermodel.cxx3
-rw-r--r--toolkit/source/controls/unocontrolmodel.cxx70
-rw-r--r--toolkit/source/controls/unocontrols.cxx166
-rw-r--r--toolkit/source/helper/listenermultiplexer.cxx6
-rw-r--r--toolkit/source/helper/property.cxx26
-rw-r--r--toolkit/source/helper/registerservices.cxx282
-rw-r--r--toolkit/source/helper/servicenames.cxx9
-rw-r--r--toolkit/source/helper/throbberimpl.cxx138
-rw-r--r--toolkit/source/helper/tkresmgr.cxx35
-rw-r--r--toolkit/source/helper/unopropertyarrayhelper.cxx2
-rw-r--r--toolkit/source/helper/unowrapper.cxx9
-rw-r--r--toolkit/source/helper/vclunohelper.cxx5
-rw-r--r--toolkit/source/layout/core/helper.cxx2
-rw-r--r--toolkit/source/layout/core/vcl.cxx2
-rw-r--r--toolkit/source/layout/core/vcl.hxx2
-rw-r--r--toolkit/source/layout/vcl/wrapper.cxx2
-rw-r--r--toolkit/util/tk.component26
-rw-r--r--tools/Executable_mkunroll.mk33
-rw-r--r--tools/Executable_rscdep.mk28
-rw-r--r--tools/Executable_so_checksum.mk32
-rw-r--r--tools/Executable_sspretty.mk32
-rw-r--r--tools/Library_tl.mk40
-rw-r--r--tools/bootstrp/addexes/replace.cxx2
-rw-r--r--tools/bootstrp/addexes2/mkfilt.cxx32
-rw-r--r--tools/bootstrp/cppdep.cxx32
-rw-r--r--tools/bootstrp/cppdep.hxx6
-rw-r--r--tools/bootstrp/inimgr.cxx10
-rw-r--r--tools/bootstrp/iserver.cxx24
-rw-r--r--tools/bootstrp/mkcreate.cxx148
-rw-r--r--tools/bootstrp/prj.cxx17
-rw-r--r--tools/bootstrp/rscdep.cxx12
-rw-r--r--tools/inc/bootstrp/inimgr.hxx2
-rw-r--r--tools/inc/bootstrp/mkcreate.hxx54
-rw-r--r--tools/inc/bootstrp/prj.hxx2
-rw-r--r--tools/inc/impcont.hxx32
-rw-r--r--tools/inc/poly.h32
-rw-r--r--tools/inc/tools/StringListResource.hxx2
-rw-r--r--tools/inc/tools/bigint.hxx8
-rw-r--r--tools/inc/tools/cachestr.hxx22
-rw-r--r--tools/inc/tools/color.hxx108
-rw-r--r--tools/inc/tools/config.hxx30
-rw-r--r--tools/inc/tools/contnr.hxx56
-rw-r--r--tools/inc/tools/date.hxx42
-rw-r--r--tools/inc/tools/datetime.hxx20
-rw-r--r--tools/inc/tools/debug.hxx80
-rw-r--r--tools/inc/tools/dynary.hxx32
-rw-r--r--tools/inc/tools/errcode.hxx6
-rw-r--r--tools/inc/tools/errinf.hxx64
-rw-r--r--tools/inc/tools/fontenum.hxx2
-rw-r--r--tools/inc/tools/fract.hxx34
-rw-r--r--tools/inc/tools/fsys.hxx124
-rw-r--r--tools/inc/tools/gen.hxx52
-rw-r--r--tools/inc/tools/geninfo.hxx80
-rwxr-xr-x[-rw-r--r--]tools/inc/tools/globname.hxx30
-rwxr-xr-x[-rw-r--r--]tools/inc/tools/inetmime.hxx6
-rw-r--r--tools/inc/tools/inetmsg.hxx82
-rw-r--r--tools/inc/tools/inetstrm.hxx44
-rw-r--r--tools/inc/tools/iparser.hxx30
-rw-r--r--tools/inc/tools/line.hxx6
-rw-r--r--tools/inc/tools/link.hxx24
-rw-r--r--tools/inc/tools/list.hxx36
-rw-r--r--tools/inc/tools/mempool.hxx6
-rw-r--r--tools/inc/tools/multisel.hxx40
-rw-r--r--tools/inc/tools/ownlist.hxx18
-rw-r--r--tools/inc/tools/poly.hxx102
-rw-r--r--tools/inc/tools/postsys.h10
-rw-r--r--tools/inc/tools/postwin.h6
-rw-r--r--tools/inc/tools/presys.h3
-rw-r--r--tools/inc/tools/prewin.h9
-rw-r--r--tools/inc/tools/prex.h4
-rw-r--r--tools/inc/tools/pstm.hxx68
-rw-r--r--tools/inc/tools/queue.hxx24
-rw-r--r--tools/inc/tools/rc.hxx4
-rw-r--r--tools/inc/tools/ref.hxx78
-rw-r--r--tools/inc/tools/resid.hxx6
-rw-r--r--tools/inc/tools/resmgr.hxx22
-rw-r--r--tools/inc/tools/rtti.hxx26
-rw-r--r--tools/inc/tools/shl.hxx2
-rw-r--r--tools/inc/tools/solar.h145
-rw-r--r--tools/inc/tools/stack.hxx22
-rw-r--r--tools/inc/tools/stream.hxx41
-rwxr-xr-x[-rw-r--r--]tools/inc/tools/string.hxx108
-rw-r--r--tools/inc/tools/svborder.hxx6
-rw-r--r--tools/inc/tools/table.hxx60
-rw-r--r--tools/inc/tools/tenccvt.hxx4
-rw-r--r--tools/inc/tools/time.hxx56
-rw-r--r--tools/inc/tools/unqid.hxx24
-rw-r--r--tools/inc/tools/unqidx.hxx64
-rw-r--r--tools/inc/tools/vcompat.hxx22
-rw-r--r--tools/inc/tools/vector2d.hxx12
-rw-r--r--tools/inc/tools/wintypes.hxx7
-rw-r--r--tools/inc/tools/wldcrd.hxx8
-rw-r--r--tools/inc/tools/zcodec.hxx50
-rw-r--r--tools/prj/build.lst1
-rw-r--r--tools/prj/makefile.mk2
-rw-r--r--tools/source/communi/geninfo.cxx70
-rw-r--r--tools/source/communi/parser.cxx56
-rw-r--r--tools/source/datetime/datetime.cxx54
-rw-r--r--tools/source/datetime/tdate.cxx158
-rw-r--r--tools/source/datetime/ttime.cxx48
-rw-r--r--tools/source/debug/debug.cxx238
-rw-r--r--tools/source/debug/stcktree.cxx62
-rwxr-xr-x[-rw-r--r--]tools/source/fsys/comdep.hxx16
-rwxr-xr-x[-rw-r--r--]tools/source/fsys/dirent.cxx204
-rwxr-xr-x[-rw-r--r--]tools/source/fsys/filecopy.cxx10
-rwxr-xr-x[-rw-r--r--]tools/source/fsys/fstat.cxx60
-rwxr-xr-x[-rw-r--r--]tools/source/fsys/tdir.cxx94
-rw-r--r--tools/source/fsys/unx.cxx82
-rwxr-xr-x[-rw-r--r--]tools/source/fsys/wldcrd.cxx12
-rwxr-xr-x[-rw-r--r--]tools/source/fsys/wntmsc.cxx98
-rwxr-xr-x[-rw-r--r--]tools/source/fsys/wntmsc.hxx4
-rw-r--r--tools/source/generic/bigint.cxx4
-rw-r--r--tools/source/generic/color.cxx112
-rw-r--r--tools/source/generic/config.cxx156
-rw-r--r--tools/source/generic/fract.cxx12
-rw-r--r--tools/source/generic/gen.cxx54
-rw-r--r--tools/source/generic/line.cxx34
-rw-r--r--tools/source/generic/link.cxx10
-rw-r--r--tools/source/generic/poly.cxx304
-rw-r--r--tools/source/generic/poly2.cxx102
-rw-r--r--tools/source/generic/svborder.cxx2
-rw-r--r--tools/source/inet/inetmime.cxx2
-rw-r--r--tools/source/inet/inetmsg.cxx134
-rw-r--r--tools/source/inet/inetstrm.cxx124
-rwxr-xr-x[-rw-r--r--]tools/source/memtools/contnr.cxx116
-rwxr-xr-x[-rw-r--r--]tools/source/memtools/mempool.cxx2
-rwxr-xr-x[-rw-r--r--]tools/source/memtools/multisel.cxx130
-rwxr-xr-x[-rw-r--r--]tools/source/memtools/table.cxx82
-rwxr-xr-x[-rw-r--r--]tools/source/memtools/unqidx.cxx60
-rw-r--r--tools/source/rc/rc.cxx18
-rw-r--r--tools/source/rc/resmgr.cxx116
-rw-r--r--tools/source/ref/errinf.cxx84
-rwxr-xr-x[-rw-r--r--]tools/source/ref/globname.cxx136
-rw-r--r--tools/source/ref/pstm.cxx218
-rw-r--r--tools/source/stream/cachestr.cxx32
-rwxr-xr-x[-rw-r--r--]tools/source/stream/stream.cxx170
-rw-r--r--tools/source/stream/strmos2.cxx100
-rw-r--r--tools/source/stream/strmunx.cxx6
-rw-r--r--tools/source/stream/strmwnt.cxx78
-rw-r--r--tools/source/stream/vcompat.cxx6
-rw-r--r--tools/source/string/strascii.cxx14
-rw-r--r--tools/source/string/strcvt.cxx12
-rw-r--r--tools/source/string/strimp.cxx32
-rw-r--r--tools/source/string/tenccvt.cxx4
-rw-r--r--tools/source/string/tstring.cxx30
-rw-r--r--tools/source/testtoolloader/testtoolloader.cxx4
-rw-r--r--tools/source/zcodec/zcodec.cxx82
-rw-r--r--tools/unx/source/dll/toolsdll.cxx2
-rw-r--r--tools/util/makefile.pmk31
-rw-r--r--tools/util/tools.r17
-rw-r--r--ucbhelper/workben/ucbexplorer/ucbexplorer.hrc9
-rw-r--r--unotools/inc/unotools/accelcfg.hxx2
-rw-r--r--unotools/inc/unotools/componentresmodule.hxx4
-rw-r--r--unotools/inc/unotools/configvaluecontainer.hxx4
-rw-r--r--unotools/inc/unotools/defaultoptions.hxx2
-rw-r--r--unotools/inc/unotools/fontcfg.hxx66
-rw-r--r--unotools/inc/unotools/fontcvt.hxx8
-rw-r--r--unotools/inc/unotools/fontdefs.hxx56
-rw-r--r--unotools/inc/unotools/intlwrapper.hxx6
-rwxr-xr-xunotools/inc/unotools/lingucfg.hxx118
-rw-r--r--unotools/inc/unotools/localedatawrapper.hxx56
-rw-r--r--unotools/inc/unotools/misccfg.hxx12
-rw-r--r--unotools/inc/unotools/pathoptions.hxx7
-rw-r--r--unotools/inc/unotools/searchopt.hxx110
-rwxr-xr-x[-rw-r--r--]unotools/inc/unotools/syslocaleoptions.hxx12
-rw-r--r--unotools/inc/unotools/textsearch.hxx19
-rw-r--r--unotools/inc/unotools/ucbhelper.hxx6
-rw-r--r--unotools/inc/unotools/ucblockbytes.hxx10
-rw-r--r--unotools/inc/unotools/unotunnelhelper.hxx5
-rw-r--r--unotools/inc/unotools/useroptions.hxx38
-rw-r--r--unotools/source/config/accelcfg.cxx2
-rw-r--r--unotools/source/config/defaultoptions.cxx8
-rw-r--r--unotools/source/config/fltrcfg.cxx90
-rw-r--r--unotools/source/config/fontcfg.cxx10
-rwxr-xr-xunotools/source/config/lingucfg.cxx180
-rw-r--r--unotools/source/config/misccfg.cxx42
-rw-r--r--unotools/source/config/moduleoptions.cxx2
-rw-r--r--unotools/source/config/pathoptions.cxx117
-rw-r--r--unotools/source/config/regoptions.cxx6
-rw-r--r--unotools/source/config/saveopt.cxx60
-rw-r--r--unotools/source/config/searchopt.cxx170
-rwxr-xr-x[-rw-r--r--]unotools/source/config/syslocaleoptions.cxx6
-rw-r--r--unotools/source/config/useroptions.cxx12
-rw-r--r--unotools/source/i18n/intlwrapper.cxx2
-rw-r--r--unotools/source/i18n/localedatawrapper.cxx144
-rw-r--r--unotools/source/i18n/textsearch.cxx57
-rw-r--r--unotools/source/misc/fontcvt.cxx4
-rw-r--r--unotools/source/misc/fontdefs.cxx2
-rw-r--r--unotools/source/streaming/streamwrap.cxx4
-rw-r--r--unotools/source/ucbhelper/localfilehelper.cxx4
-rw-r--r--unotools/source/ucbhelper/ucbhelper.cxx32
-rw-r--r--unotools/source/ucbhelper/ucblockbytes.cxx20
-rw-r--r--vcl/aqua/inc/aqua11yfactory.h4
-rw-r--r--vcl/aqua/inc/aqua11ywrapper.h16
-rwxr-xr-xvcl/aqua/inc/aquaprintview.h2
-rw-r--r--vcl/aqua/inc/salbmp.h6
-rw-r--r--vcl/aqua/inc/saldata.hxx2
-rw-r--r--vcl/aqua/inc/salframe.h40
-rwxr-xr-xvcl/aqua/inc/salframeview.h32
-rw-r--r--vcl/aqua/inc/salgdi.h56
-rw-r--r--vcl/aqua/inc/salinst.h28
-rw-r--r--vcl/aqua/inc/salmenu.h18
-rw-r--r--vcl/aqua/inc/salobj.h8
-rw-r--r--vcl/aqua/inc/salprn.h40
-rw-r--r--vcl/aqua/inc/saltimer.h2
-rw-r--r--vcl/aqua/inc/salvd.h4
-rwxr-xr-xvcl/aqua/inc/vclnsapp.h8
-rw-r--r--vcl/aqua/source/a11y/aqua11ycomponentwrapper.h2
-rw-r--r--vcl/aqua/source/a11y/aqua11ycomponentwrapper.mm4
-rw-r--r--vcl/aqua/source/a11y/aqua11yfactory.mm4
-rw-r--r--vcl/aqua/source/a11y/aqua11yselectionwrapper.h2
-rw-r--r--vcl/aqua/source/a11y/aqua11yselectionwrapper.mm2
-rw-r--r--vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm10
-rw-r--r--vcl/aqua/source/a11y/aqua11ytextwrapper.h2
-rw-r--r--vcl/aqua/source/a11y/aqua11ytextwrapper.mm4
-rw-r--r--vcl/aqua/source/a11y/aqua11yvaluewrapper.h2
-rw-r--r--vcl/aqua/source/a11y/aqua11yvaluewrapper.mm4
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrapper.mm28
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrappercheckbox.h2
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrappercheckbox.mm2
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrappercombobox.h2
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrappercombobox.mm2
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrapperradiobutton.h2
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrapperradiobutton.mm2
-rw-r--r--vcl/aqua/source/app/salinst.cxx36
-rw-r--r--vcl/aqua/source/app/saltimer.cxx6
-rwxr-xr-xvcl/aqua/source/app/vclnsapp.mm8
-rw-r--r--vcl/aqua/source/dtrans/DragSource.cxx15
-rw-r--r--vcl/aqua/source/dtrans/DragSource.hxx2
-rw-r--r--vcl/aqua/source/dtrans/DropTarget.cxx8
-rw-r--r--vcl/aqua/source/dtrans/DropTarget.hxx8
-rw-r--r--vcl/aqua/source/dtrans/service_entry.cxx14
-rw-r--r--vcl/aqua/source/gdi/aquaprintaccessoryview.mm10
-rwxr-xr-xvcl/aqua/source/gdi/aquaprintview.mm2
-rwxr-xr-xvcl/aqua/source/gdi/salatslayout.cxx2
-rw-r--r--vcl/aqua/source/gdi/salbmp.cxx16
-rw-r--r--vcl/aqua/source/gdi/salgdi.cxx147
-rwxr-xr-xvcl/aqua/source/gdi/salgdiutils.cxx4
-rw-r--r--vcl/aqua/source/gdi/salnativewidgets.cxx64
-rw-r--r--vcl/aqua/source/gdi/salprn.cxx76
-rw-r--r--vcl/aqua/source/gdi/salvd.cxx6
-rw-r--r--vcl/aqua/source/window/salframe.cxx48
-rwxr-xr-xvcl/aqua/source/window/salframeview.mm82
-rw-r--r--vcl/aqua/source/window/salmenu.cxx30
-rw-r--r--vcl/aqua/source/window/salobj.cxx8
-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.hxx100
-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.hxx8
-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/displayconnectiondispatch.hxx52
-rw-r--r--vcl/inc/vcl/dllapi.h6
-rw-r--r--vcl/inc/vcl/dockingarea.hxx2
-rw-r--r--vcl/inc/vcl/dockwin.hxx132
-rwxr-xr-xvcl/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.hxx198
-rw-r--r--vcl/inc/vcl/fixbrd.hxx16
-rw-r--r--vcl/inc/vcl/fixed.hxx28
-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/fontcache.hxx2
-rw-r--r--vcl/inc/vcl/fontmanager.hxx2
-rw-r--r--vcl/inc/vcl/gdimtf.hxx64
-rw-r--r--vcl/inc/vcl/gfxlink.hxx38
-rw-r--r--vcl/inc/vcl/glyphcache.hxx34
-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/graphite_adaptors.hxx2
-rw-r--r--vcl/inc/vcl/graphite_layout.hxx6
-rw-r--r--vcl/inc/vcl/graphite_serverfont.hxx8
-rw-r--r--vcl/inc/vcl/group.hxx6
-rw-r--r--vcl/inc/vcl/hatch.hxx16
-rw-r--r--vcl/inc/vcl/help.hxx68
-rw-r--r--vcl/inc/vcl/helpwin.hxx17
-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/imgctrl.hxx14
-rw-r--r--vcl/inc/vcl/impbmp.hxx24
-rw-r--r--vcl/inc/vcl/impfont.hxx20
-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.hxx24
-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.hxx54
-rw-r--r--vcl/inc/vcl/outdev.h30
-rwxr-xr-x[-rw-r--r--]vcl/inc/vcl/outdev.hxx396
-rw-r--r--vcl/inc/vcl/outfont.hxx18
-rw-r--r--vcl/inc/vcl/pdfextoutdevdata.hxx2
-rw-r--r--vcl/inc/vcl/pdfwriter.hxx29
-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.h2
-rw-r--r--vcl/inc/vcl/print.hxx157
-rw-r--r--vcl/inc/vcl/printergfx.hxx6
-rw-r--r--vcl/inc/vcl/prndlg.hxx6
-rw-r--r--vcl/inc/vcl/prntypes.hxx76
-rw-r--r--vcl/inc/vcl/ptrstyle.hxx2
-rw-r--r--vcl/inc/vcl/regband.hxx22
-rw-r--r--vcl/inc/vcl/region.h16
-rwxr-xr-x[-rw-r--r--]vcl/inc/vcl/region.hxx55
-rw-r--r--vcl/inc/vcl/salbmp.hxx8
-rw-r--r--vcl/inc/vcl/salbtype.hxx324
-rw-r--r--vcl/inc/vcl/salctype.hxx10
-rw-r--r--vcl/inc/vcl/saldatabasic.hxx2
-rw-r--r--vcl/inc/vcl/salframe.hxx104
-rwxr-xr-x[-rw-r--r--]vcl/inc/vcl/salgdi.hxx103
-rw-r--r--vcl/inc/vcl/salgtype.hxx14
-rw-r--r--vcl/inc/vcl/salimestatus.hxx2
-rw-r--r--vcl/inc/vcl/salinst.hxx56
-rwxr-xr-xvcl/inc/vcl/sallayout.hxx12
-rw-r--r--vcl/inc/vcl/salmenu.hxx22
-rwxr-xr-xvcl/inc/vcl/salnativewidgets.hxx18
-rw-r--r--vcl/inc/vcl/salobj.hxx30
-rw-r--r--vcl/inc/vcl/salprn.hxx40
-rw-r--r--vcl/inc/vcl/salptype.hxx8
-rw-r--r--vcl/inc/vcl/salsession.hxx2
-rw-r--r--vcl/inc/vcl/salsys.hxx2
-rw-r--r--vcl/inc/vcl/saltimer.hxx4
-rw-r--r--vcl/inc/vcl/salvd.hxx4
-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.hxx542
-rw-r--r--vcl/inc/vcl/slider.hxx28
-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.hxx148
-rw-r--r--vcl/inc/vcl/status.hxx114
-rw-r--r--vcl/inc/vcl/stdtext.hxx6
-rw-r--r--vcl/inc/vcl/strhelper.hxx6
-rw-r--r--vcl/inc/vcl/svapp.hxx142
-rw-r--r--vcl/inc/vcl/svcompat.hxx22
-rw-r--r--vcl/inc/vcl/svdata.hxx128
-rw-r--r--vcl/inc/vcl/svids.hrc4
-rw-r--r--vcl/inc/vcl/symbol.hxx2
-rw-r--r--vcl/inc/vcl/syschild.hxx8
-rw-r--r--vcl/inc/vcl/sysdata.hxx5
-rw-r--r--vcl/inc/vcl/syswin.hxx96
-rw-r--r--vcl/inc/vcl/tabctrl.hxx86
-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/throbber.hxx103
-rw-r--r--vcl/inc/vcl/timer.hxx12
-rw-r--r--vcl/inc/vcl/toolbox.h30
-rw-r--r--vcl/inc/vcl/toolbox.hxx386
-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/window.h102
-rwxr-xr-xvcl/inc/vcl/window.hxx615
-rw-r--r--vcl/inc/vcl/wrkwin.hxx34
-rw-r--r--vcl/inc/vcl/xconnection.hxx15
-rw-r--r--vcl/os2/inc/salgdi.h8
-rw-r--r--vcl/os2/source/gdi/salgdi.cxx50
-rw-r--r--vcl/prj/build.lst2
-rw-r--r--vcl/prj/d.lst3
-rw-r--r--vcl/source/app/dbggui.cxx172
-rw-r--r--vcl/source/app/help.cxx161
-rw-r--r--vcl/source/app/i18nhelp.cxx10
-rw-r--r--vcl/source/app/idlemgr.cxx20
-rw-r--r--vcl/source/app/salvtables.cxx12
-rw-r--r--vcl/source/app/session.cxx44
-rw-r--r--vcl/source/app/settings.cxx198
-rw-r--r--vcl/source/app/stdtext.cxx4
-rw-r--r--vcl/source/app/svapp.cxx221
-rw-r--r--vcl/source/app/svdata.cxx33
-rw-r--r--vcl/source/app/svmain.cxx54
-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.cxx308
-rw-r--r--vcl/source/control/combobox.cxx254
-rw-r--r--vcl/source/control/ctrl.cxx24
-rwxr-xr-xvcl/source/control/edit.cxx270
-rw-r--r--vcl/source/control/field.cxx250
-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.cxx682
-rw-r--r--vcl/source/control/imgctrl.cxx198
-rw-r--r--vcl/source/control/longcurr.cxx128
-rw-r--r--vcl/source/control/lstbox.cxx214
-rw-r--r--vcl/source/control/makefile.mk22
-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.cxx289
-rw-r--r--vcl/source/control/throbber.cxx325
-rw-r--r--vcl/source/fontsubset/gsub.cxx132
-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.cxx244
-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.cxx290
-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/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/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.cxx34
-rw-r--r--vcl/source/gdi/mapmod.cxx26
-rw-r--r--vcl/source/gdi/metaact.cxx108
-rw-r--r--vcl/source/gdi/metric.cxx36
-rw-r--r--vcl/source/gdi/octree.cxx84
-rwxr-xr-x[-rw-r--r--]vcl/source/gdi/outdev.cxx1071
-rwxr-xr-x[-rw-r--r--]vcl/source/gdi/outdev2.cxx134
-rw-r--r--vcl/source/gdi/outdev3.cxx394
-rw-r--r--vcl/source/gdi/outdev4.cxx126
-rw-r--r--vcl/source/gdi/outdev5.cxx2
-rw-r--r--vcl/source/gdi/outdev6.cxx102
-rwxr-xr-xvcl/source/gdi/outdevnative.cxx38
-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.cxx371
-rw-r--r--vcl/source/gdi/pdfwriter_impl.hxx23
-rw-r--r--vcl/source/gdi/pdfwriter_impl2.cxx529
-rw-r--r--vcl/source/gdi/pngread.cxx236
-rw-r--r--vcl/source/gdi/pngwrite.cxx140
-rw-r--r--vcl/source/gdi/polyscan.cxx32
-rw-r--r--vcl/source/gdi/print.cxx288
-rw-r--r--vcl/source/gdi/print2.cxx73
-rwxr-xr-xvcl/source/gdi/print3.cxx54
-rw-r--r--vcl/source/gdi/regband.cxx86
-rwxr-xr-x[-rw-r--r--]vcl/source/gdi/region.cxx435
-rwxr-xr-xvcl/source/gdi/salgdilayout.cxx120
-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
-rw-r--r--vcl/source/helper/strhelper.cxx16
-rw-r--r--vcl/source/helper/threadex.cxx4
-rw-r--r--vcl/source/helper/xconnection.cxx79
-rw-r--r--vcl/source/salmain/makefile.mk5
-rw-r--r--vcl/source/src/makefile.mk3
-rw-r--r--vcl/source/src/print.src60
-rwxr-xr-xvcl/source/src/throbber.src114
-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.cxx54
-rw-r--r--vcl/source/window/dialog.cxx118
-rw-r--r--vcl/source/window/dlgctrl.cxx319
-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
-rwxr-xr-xvcl/source/window/menu.cxx1270
-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.cxx62
-rw-r--r--vcl/source/window/printdlg.cxx88
-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.cxx586
-rw-r--r--vcl/source/window/status.cxx266
-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.cxx946
-rw-r--r--vcl/source/window/toolbox2.cxx552
-rw-r--r--vcl/source/window/window.cxx1287
-rw-r--r--vcl/source/window/window2.cxx252
-rw-r--r--vcl/source/window/winproc.cxx302
-rw-r--r--vcl/source/window/wpropset.cxx2
-rw-r--r--vcl/source/window/wrkwin.cxx66
-rw-r--r--vcl/unx/gtk/a11y/atkutil.cxx2
-rw-r--r--vcl/unx/gtk/a11y/atkwindow.cxx2
-rw-r--r--vcl/unx/gtk/app/gtkdata.cxx10
-rw-r--r--vcl/unx/gtk/app/gtkinst.cxx8
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx233
-rw-r--r--vcl/unx/gtk/window/gtkframe.cxx194
-rw-r--r--vcl/unx/gtk/window/gtkobject.cxx10
-rw-r--r--vcl/unx/headless/svpbmp.cxx14
-rw-r--r--vcl/unx/headless/svpbmp.hxx6
-rw-r--r--vcl/unx/headless/svpdummies.cxx8
-rw-r--r--vcl/unx/headless/svpdummies.hxx8
-rw-r--r--vcl/unx/headless/svpframe.cxx40
-rw-r--r--vcl/unx/headless/svpframe.hxx38
-rw-r--r--vcl/unx/headless/svpgdi.cxx82
-rw-r--r--vcl/unx/headless/svpgdi.hxx39
-rw-r--r--vcl/unx/headless/svpinst.cxx30
-rw-r--r--vcl/unx/headless/svpinst.hxx32
-rw-r--r--vcl/unx/headless/svpprn.cxx48
-rw-r--r--vcl/unx/headless/svpprn.hxx28
-rw-r--r--vcl/unx/headless/svppspgraphics.cxx88
-rw-r--r--vcl/unx/headless/svppspgraphics.hxx37
-rw-r--r--vcl/unx/headless/svptext.cxx30
-rw-r--r--vcl/unx/headless/svpvd.cxx2
-rw-r--r--vcl/unx/headless/svpvd.hxx6
-rw-r--r--vcl/unx/inc/dtint.hxx9
-rw-r--r--vcl/unx/inc/i18n_cb.hxx2
-rw-r--r--vcl/unx/inc/i18n_ic.hxx2
-rw-r--r--vcl/unx/inc/plugins/gtk/gtkframe.hxx48
-rw-r--r--vcl/unx/inc/plugins/gtk/gtkgdi.hxx61
-rw-r--r--vcl/unx/inc/plugins/gtk/gtkinst.hxx8
-rw-r--r--vcl/unx/inc/plugins/gtk/gtkobject.hxx10
-rw-r--r--vcl/unx/inc/plugins/kde/kdedata.hxx6
-rw-r--r--vcl/unx/inc/pspgraphics.h37
-rw-r--r--vcl/unx/inc/salbmp.h16
-rw-r--r--vcl/unx/inc/saldata.hxx6
-rw-r--r--vcl/unx/inc/saldisp.hxx60
-rw-r--r--vcl/unx/inc/salframe.h58
-rw-r--r--vcl/unx/inc/salgdi.h76
-rw-r--r--vcl/unx/inc/salinst.h18
-rw-r--r--vcl/unx/inc/salobj.h20
-rw-r--r--vcl/unx/inc/salprn.h30
-rw-r--r--vcl/unx/inc/saltimer.h2
-rw-r--r--vcl/unx/inc/salunx.h6
-rw-r--r--vcl/unx/inc/salvd.h18
-rw-r--r--vcl/unx/inc/soicon.hxx4
-rw-r--r--vcl/unx/kde/kdedata.cxx2
-rw-r--r--vcl/unx/kde/salnativewidgets-kde.cxx128
-rw-r--r--vcl/unx/source/app/i18n_cb.cxx12
-rw-r--r--vcl/unx/source/app/i18n_ic.cxx4
-rw-r--r--vcl/unx/source/app/i18n_status.cxx10
-rw-r--r--vcl/unx/source/app/keysymnames.cxx2
-rw-r--r--vcl/unx/source/app/saldata.cxx2
-rw-r--r--vcl/unx/source/app/saldisp.cxx136
-rw-r--r--vcl/unx/source/app/salinst.cxx28
-rw-r--r--vcl/unx/source/app/salsys.cxx6
-rw-r--r--vcl/unx/source/app/saltimer.cxx4
-rw-r--r--vcl/unx/source/app/sm.cxx8
-rw-r--r--vcl/unx/source/app/soicon.cxx14
-rw-r--r--vcl/unx/source/dtrans/X11_clipboard.hxx26
-rw-r--r--vcl/unx/source/dtrans/X11_dndcontext.hxx6
-rw-r--r--vcl/unx/source/dtrans/X11_selection.cxx68
-rw-r--r--vcl/unx/source/dtrans/X11_selection.hxx39
-rw-r--r--vcl/unx/source/dtrans/X11_service.cxx24
-rw-r--r--vcl/unx/source/dtrans/X11_transferable.hxx4
-rw-r--r--vcl/unx/source/fontmanager/fontmanager.cxx10
-rw-r--r--vcl/unx/source/gdi/cdeint.cxx6
-rw-r--r--vcl/unx/source/gdi/gcach_xpeer.cxx6
-rw-r--r--vcl/unx/source/gdi/pspgraphics.cxx88
-rw-r--r--vcl/unx/source/gdi/salbmp.cxx54
-rw-r--r--vcl/unx/source/gdi/salgdi.cxx264
-rw-r--r--vcl/unx/source/gdi/salgdi2.cxx40
-rw-r--r--vcl/unx/source/gdi/salgdi3.cxx58
-rw-r--r--vcl/unx/source/gdi/salprnpsp.cxx70
-rw-r--r--vcl/unx/source/gdi/salvd.cxx30
-rw-r--r--vcl/unx/source/printer/jobdata.cxx2
-rw-r--r--vcl/unx/source/printer/ppdparser.cxx22
-rw-r--r--vcl/unx/source/printer/printerinfomanager.cxx4
-rw-r--r--vcl/unx/source/printergfx/common_gfx.cxx8
-rw-r--r--vcl/unx/source/printergfx/printerjob.cxx6
-rw-r--r--vcl/unx/source/window/salframe.cxx168
-rw-r--r--vcl/unx/source/window/salobj.cxx28
-rw-r--r--vcl/win/inc/salbmp.h12
-rwxr-xr-xvcl/win/inc/saldata.hxx58
-rw-r--r--vcl/win/inc/salframe.h80
-rwxr-xr-xvcl/win/inc/salgdi.h82
-rwxr-xr-x[-rw-r--r--]vcl/win/inc/salinst.h26
-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
-rwxr-xr-xvcl/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.cxx44
-rwxr-xr-x[-rw-r--r--]vcl/win/source/gdi/salgdi.cxx305
-rwxr-xr-x[-rw-r--r--]vcl/win/source/gdi/salgdi2.cxx15
-rwxr-xr-xvcl/win/source/gdi/salgdi3.cxx38
-rwxr-xr-xvcl/win/source/gdi/salnativewidgets-luna.cxx30
-rwxr-xr-x[-rw-r--r--]vcl/win/source/gdi/salprn.cxx113
-rw-r--r--vcl/win/source/gdi/salvd.cxx8
-rwxr-xr-xvcl/win/source/gdi/winlayout.cxx2
-rwxr-xr-x[-rw-r--r--]vcl/win/source/gdi/wntgdi.cxx0
-rwxr-xr-xvcl/win/source/window/salframe.cxx275
-rwxr-xr-x[-rw-r--r--]vcl/win/source/window/salmenu.cxx10
-rw-r--r--vcl/win/source/window/salobj.cxx28
-rwxr-xr-xvcl/workben/outdevgrind.cxx44
-rw-r--r--vcl/workben/svpclient.cxx10
-rw-r--r--vcl/workben/svptest.cxx2
1493 files changed, 63188 insertions, 51003 deletions
diff --git a/canvas/source/cairo/cairo_canvasfont.cxx b/canvas/source/cairo/cairo_canvasfont.cxx
index 452280728151..e90276f2ba33 100644
--- a/canvas/source/cairo/cairo_canvasfont.cxx
+++ b/canvas/source/cairo/cairo_canvasfont.cxx
@@ -78,7 +78,7 @@ namespace cairocanvas
{
maFont->SetAlign( ALIGN_BASELINE );
maFont->SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==com::sun::star::util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
- maFont->SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? TRUE : FALSE );
+ maFont->SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? sal_True : sal_False );
// TODO(F2): improve panose->vclenum conversion
maFont->SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) );
@@ -94,7 +94,7 @@ namespace cairocanvas
if( pOutDev )
{
const bool bOldMapState( pOutDev->IsMapModeEnabled() );
- pOutDev->EnableMapMode(FALSE);
+ pOutDev->EnableMapMode(sal_False);
const Size aSize = pOutDev->GetFontMetric( *maFont ).GetSize();
diff --git a/canvas/source/cairo/cairo_canvashelper_text.cxx b/canvas/source/cairo/cairo_canvashelper_text.cxx
index 35310e1c078d..7e60d912e1ca 100644
--- a/canvas/source/cairo/cairo_canvashelper_text.cxx
+++ b/canvas/source/cairo/cairo_canvashelper_text.cxx
@@ -318,7 +318,7 @@ namespace cairocanvas
return uno::Reference< rendering::XCachedPrimitive >(NULL); // no output necessary
// change text direction and layout mode
- ULONG nLayoutMode(0);
+ sal_uLong nLayoutMode(0);
switch( textDirection )
{
case rendering::TextDirection::WEAK_LEFT_TO_RIGHT:
diff --git a/canvas/source/cairo/cairo_canvashelper_texturefill.cxx b/canvas/source/cairo/cairo_canvashelper_texturefill.cxx
index ee8aff6980cf..43447645daf9 100644
--- a/canvas/source/cairo/cairo_canvashelper_texturefill.cxx
+++ b/canvas/source/cairo/cairo_canvashelper_texturefill.cxx
@@ -82,7 +82,7 @@ namespace cairocanvas
const ::Size& rTileSize,
const GraphicAttr& rAttr)
{
- BOOL bRet( false );
+ bool bRet( false );
Point aCurrPos;
int nX, nY;
diff --git a/canvas/source/cairo/cairo_devicehelper.cxx b/canvas/source/cairo/cairo_devicehelper.cxx
index 70a5ea51c0ea..36f7a2452aa5 100644
--- a/canvas/source/cairo/cairo_devicehelper.cxx
+++ b/canvas/source/cairo/cairo_devicehelper.cxx
@@ -270,7 +270,7 @@ namespace cairocanvas
const ::Point aEmptyPoint;
bool bOldMap( mpRefDevice->IsMapModeEnabled() );
- mpRefDevice->EnableMapMode( FALSE );
+ mpRefDevice->EnableMapMode( sal_False );
aStream << mpRefDevice->GetBitmap(aEmptyPoint,
mpRefDevice->GetOutputSizePixel());
mpRefDevice->EnableMapMode( bOldMap );
diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx
index d0873b63f5f0..725a6ae0f2a6 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -81,7 +81,7 @@ namespace cairocanvas
sal_Int8 nTextDirection )
{
// TODO(P3): avoid if already correctly set
- ULONG nLayoutMode;
+ sal_uLong nLayoutMode;
switch( nTextDirection )
{
default:
@@ -105,6 +105,11 @@ namespace cairocanvas
// as required at the API spec
rOutDev.SetLayoutMode( nLayoutMode | TEXT_LAYOUT_TEXTORIGIN_LEFT );
}
+
+ bool compareFallbacks(const SystemGlyphData&rA, const SystemGlyphData &rB)
+ {
+ return rA.fallbacklevel < rB.fallbacklevel;
+ }
}
TextLayout::TextLayout( const rendering::StringContext& aText,
@@ -363,7 +368,6 @@ namespace cairocanvas
return true;
}
-
/**
* TextLayout::draw
*
@@ -404,18 +408,41 @@ namespace cairocanvas
::canvas::tools::numeric_cast<USHORT>(maText.Length),
maLogicalAdvancements.getLength() ? aOffsets.get() : NULL);
+ // Sort them so that all glyphs on the same glyph fallback level are consecutive
+ std::sort(aSysLayoutData.rGlyphData.begin(), aSysLayoutData.rGlyphData.end(), compareFallbacks);
+ bool bCairoRenderable = true;
+
+ //Pull all the fonts we need to render the text
+ typedef std::pair<SystemFontData,int> FontLevel;
+ typedef std::vector<FontLevel> FontLevelVector;
+ FontLevelVector aFontData;
+ SystemGlyphDataVector::const_iterator aIter=aSysLayoutData.rGlyphData.begin();
+ const SystemGlyphDataVector::const_iterator aEnd=aSysLayoutData.rGlyphData.end();
+ for( ; aIter != aEnd; ++aIter )
+ {
+ if( aFontData.empty() || aIter->fallbacklevel != aFontData.back().second )
+ {
+ aFontData.push_back(FontLevel(rOutDev.GetSysFontData(aIter->fallbacklevel),
+ aIter->fallbacklevel));
+ if( !isCairoRenderable(aFontData.back().first) )
+ {
+ bCairoRenderable = false;
+ OSL_TRACE(":cairocanvas::TextLayout::draw(S,O,p,v,r): VCL FALLBACK %s%s%s%s - %s",
+ maLogicalAdvancements.getLength() ? "ADV " : "",
+ aFontData.back().first.bAntialias ? "AA " : "",
+ aFontData.back().first.bFakeBold ? "FB " : "",
+ aFontData.back().first.bFakeItalic ? "FI " : "",
+ ::rtl::OUStringToOString( maText.Text.copy( maText.StartPosition, maText.Length ),
+ RTL_TEXTENCODING_UTF8 ).getStr());
+ break;
+ }
+ }
+ }
+
// The ::GetSysTextLayoutData(), i.e. layouting of text to glyphs can change the font being used.
// The fallback checks need to be done after final font is known.
- if (!isCairoRenderable(aSysLayoutData.aSysFontData)) // VCL FALLBACKS
+ if (!bCairoRenderable) // VCL FALLBACKS
{
- OSL_TRACE(":cairocanvas::TextLayout::draw(S,O,p,v,r): VCL FALLBACK %s%s%s%s - %s",
- maLogicalAdvancements.getLength() ? "ADV " : "",
- aSysLayoutData.aSysFontData.bAntialias ? "AA " : "",
- aSysLayoutData.aSysFontData.bFakeBold ? "FB " : "",
- aSysLayoutData.aSysFontData.bFakeItalic ? "FI " : "",
- ::rtl::OUStringToOString( maText.Text.copy( maText.StartPosition, maText.Length ),
- RTL_TEXTENCODING_UTF8 ).getStr());
-
if (maLogicalAdvancements.getLength()) // VCL FALLBACK - with glyph advances
{
rOutDev.DrawTextArray( rOutpos, maText.Text, aOffsets.get(),
@@ -438,144 +465,158 @@ namespace cairocanvas
* Setup platform independent glyph vector into cairo-based glyphs vector.
**/
- // setup glyphs
- std::vector<cairo_glyph_t> cairo_glyphs;
- cairo_glyphs.reserve( 256 );
-
- for( int nStart = 0; nStart < (int) aSysLayoutData.rGlyphData.size(); nStart++ )
+ // Loop through the fonts used and render the matching glyphs for each
+ FontLevelVector::const_iterator aFontDataIter = aFontData.begin();
+ const FontLevelVector::const_iterator aFontDataEnd = aFontData.end();
+ for( ; aFontDataIter != aFontDataEnd; ++aFontDataIter )
{
- cairo_glyph_t aGlyph;
- SystemGlyphData systemGlyph = aSysLayoutData.rGlyphData.at(nStart);
- aGlyph.index = systemGlyph.index;
-#ifdef CAIRO_HAS_WIN32_SURFACE
- // Cairo requires standard glyph indexes (ETO_GLYPH_INDEX), while vcl/win/* uses ucs4 chars.
- // Convert to standard indexes
- aGlyph.index = cairo::ucs4toindex((unsigned int) aGlyph.index, aSysLayoutData.aSysFontData.hFont);
-#endif
- aGlyph.x = systemGlyph.x;
- aGlyph.y = systemGlyph.y;
- cairo_glyphs.push_back(aGlyph);
- }
-
- if (cairo_glyphs.empty()) return true; //true or false??
-
- /**
- * Setup font
- **/
- cairo_font_face_t* font_face = NULL;
-
-#ifdef CAIRO_HAS_QUARTZ_SURFACE
- // TODO: use cairo_quartz_font_face_create_for_cgfont(cgFont)
- // when CGFont (Mac OS X 10.5 API) is provided by the AQUA VCL backend.
- font_face = cairo_quartz_font_face_create_for_atsu_font_id((ATSUFontID) aSysLayoutData.aSysFontData.aATSUFontID);
+ const SystemFontData &rSysFontData = aFontDataIter->first;
-#elif defined CAIRO_HAS_WIN32_SURFACE
- #if (OSL_DEBUG_LEVEL > 1)
- GetObjectW( aSysLayoutData.aSysFontData.hFont, sizeof(logfont), &logfont );
- #endif
- // Note: cairo library uses logfont fallbacks when lfEscapement, lfOrientation and lfWidth are not zero.
- // VCL always has non-zero value for lfWidth
- font_face = cairo_win32_font_face_create_for_hfont(aSysLayoutData.aSysFontData.hFont);
-
-#elif defined CAIRO_HAS_XLIB_SURFACE
- font_face = cairo_ft_font_face_create_for_ft_face((FT_Face)aSysLayoutData.aSysFontData.nFontId,
- aSysLayoutData.aSysFontData.nFontFlags);
-#else
-# error Native API needed.
-#endif
-
- CairoSharedPtr pSCairo = pSurface->getCairo();
-
- cairo_set_font_face( pSCairo.get(), font_face);
-
- // create default font options. cairo_get_font_options() does not retrieve the surface defaults,
- // only what has been set before with cairo_set_font_options()
- cairo_font_options_t* options = cairo_font_options_create();
- if (aSysLayoutData.aSysFontData.bAntialias) {
- // CAIRO_ANTIALIAS_GRAY provides more similar result to VCL Canvas,
- // so we're not using CAIRO_ANTIALIAS_SUBPIXEL
- cairo_font_options_set_antialias(options, CAIRO_ANTIALIAS_GRAY);
- }
- cairo_set_font_options( pSCairo.get(), options);
-
- // Font color
- Color mTextColor = rOutDev.GetTextColor();
- cairo_set_source_rgb(pSCairo.get(),
- mTextColor.GetRed()/255.0,
- mTextColor.GetGreen()/255.0,
- mTextColor.GetBlue()/255.0);
-
- // Font rotation and scaling
- cairo_matrix_t m;
- Font aFont = rOutDev.GetFont();
- FontMetric aMetric( rOutDev.GetFontMetric(aFont) );
- long nWidth = 0;
-
- // width calculation is deep magic and platform/font dependant.
- // width == 0 means no scaling, and usually width == height means the same.
- // Other values mean horizontal scaling (narrow or stretching)
- // see issue #101566
-
- //proper scale calculation across platforms
- if (aFont.GetWidth() == 0) {
- nWidth = aFont.GetHeight();
- } else {
- // any scaling needs to be relative to the platform-dependent definition
- // of height of the font
- nWidth = aFont.GetWidth() * aFont.GetHeight() / aMetric.GetHeight();
- }
-
- cairo_matrix_init_identity(&m);
+ // setup glyphs
+ std::vector<cairo_glyph_t> cairo_glyphs;
+ cairo_glyphs.reserve( 256 );
- if (aSysLayoutData.orientation) cairo_matrix_rotate(&m, (3600 - aSysLayoutData.orientation) * M_PI / 1800.0);
+ SystemGlyphDataVector::const_iterator aIter=aSysLayoutData.rGlyphData.begin();
+ const SystemGlyphDataVector::const_iterator aEnd=aSysLayoutData.rGlyphData.end();
+ for( ; aIter != aEnd; ++aIter )
+ {
+ SystemGlyphData systemGlyph = *aIter;
+ if( systemGlyph.fallbacklevel != aFontDataIter->second )
+ continue;
+
+ cairo_glyph_t aGlyph;
+ aGlyph.index = systemGlyph.index;
+ #ifdef CAIRO_HAS_WIN32_SURFACE
+ // Cairo requires standard glyph indexes (ETO_GLYPH_INDEX), while vcl/win/* uses ucs4 chars.
+ // Convert to standard indexes
+ aGlyph.index = cairo::ucs4toindex((unsigned int) aGlyph.index, rSysFontData.hFont);
+ #endif
+ aGlyph.x = systemGlyph.x;
+ aGlyph.y = systemGlyph.y;
+ cairo_glyphs.push_back(aGlyph);
+ }
- cairo_matrix_scale(&m, nWidth, aFont.GetHeight());
+ if (cairo_glyphs.empty())
+ continue;
+
+ /**
+ * Setup font
+ **/
+ cairo_font_face_t* font_face = NULL;
+
+ #ifdef CAIRO_HAS_QUARTZ_SURFACE
+ // TODO: use cairo_quartz_font_face_create_for_cgfont(cgFont)
+ // when CGFont (Mac OS X 10.5 API) is provided by the AQUA VCL backend.
+ font_face = cairo_quartz_font_face_create_for_atsu_font_id((ATSUFontID) rSysFontData.aATSUFontID);
+
+ #elif defined CAIRO_HAS_WIN32_SURFACE
+ #if (OSL_DEBUG_LEVEL > 1)
+ GetObjectW( rSysFontData.hFont, sizeof(logfont), &logfont );
+ #endif
+ // Note: cairo library uses logfont fallbacks when lfEscapement, lfOrientation and lfWidth are not zero.
+ // VCL always has non-zero value for lfWidth
+ font_face = cairo_win32_font_face_create_for_hfont(rSysFontData.hFont);
+
+ #elif defined CAIRO_HAS_XLIB_SURFACE
+ font_face = cairo_ft_font_face_create_for_ft_face((FT_Face)rSysFontData.nFontId,
+ rSysFontData.nFontFlags);
+ #else
+ # error Native API needed.
+ #endif
+
+ CairoSharedPtr pSCairo = pSurface->getCairo();
+
+ cairo_set_font_face( pSCairo.get(), font_face);
+
+ // create default font options. cairo_get_font_options() does not retrieve the surface defaults,
+ // only what has been set before with cairo_set_font_options()
+ cairo_font_options_t* options = cairo_font_options_create();
+ if (rSysFontData.bAntialias) {
+ // CAIRO_ANTIALIAS_GRAY provides more similar result to VCL Canvas,
+ // so we're not using CAIRO_ANTIALIAS_SUBPIXEL
+ cairo_font_options_set_antialias(options, CAIRO_ANTIALIAS_GRAY);
+ }
+ cairo_set_font_options( pSCairo.get(), options);
+
+ // Font color
+ Color mTextColor = rOutDev.GetTextColor();
+ cairo_set_source_rgb(pSCairo.get(),
+ mTextColor.GetRed()/255.0,
+ mTextColor.GetGreen()/255.0,
+ mTextColor.GetBlue()/255.0);
+
+ // Font rotation and scaling
+ cairo_matrix_t m;
+ Font aFont = rOutDev.GetFont();
+ FontMetric aMetric( rOutDev.GetFontMetric(aFont) );
+ long nWidth = 0;
+
+ // width calculation is deep magic and platform/font dependant.
+ // width == 0 means no scaling, and usually width == height means the same.
+ // Other values mean horizontal scaling (narrow or stretching)
+ // see issue #101566
+
+ //proper scale calculation across platforms
+ if (aFont.GetWidth() == 0) {
+ nWidth = aFont.GetHeight();
+ } else {
+ // any scaling needs to be relative to the platform-dependent definition
+ // of height of the font
+ nWidth = aFont.GetWidth() * aFont.GetHeight() / aMetric.GetHeight();
+ }
- //faux italics
- if (aSysLayoutData.aSysFontData.bFakeItalic) m.xy = -m.xx * 0x6000L / 0x10000L;
+ cairo_matrix_init_identity(&m);
- cairo_set_font_matrix(pSCairo.get(), &m);
+ if (aSysLayoutData.orientation) cairo_matrix_rotate(&m, (3600 - aSysLayoutData.orientation) * M_PI / 1800.0);
- OSL_TRACE("\r\n:cairocanvas::TextLayout::draw(S,O,p,v,r): Size:(%d,%d), W:%d->%d, Pos (%d,%d), G(%d,%d,%d) %s%s%s%s || Name:%s - %s",
- aFont.GetWidth(),
- aFont.GetHeight(),
- aMetric.GetWidth(),
- nWidth,
- (int) rOutpos.X(),
- (int) rOutpos.Y(),
- cairo_glyphs[0].index, cairo_glyphs[1].index, cairo_glyphs[2].index,
- maLogicalAdvancements.getLength() ? "ADV " : "",
- aSysLayoutData.aSysFontData.bAntialias ? "AA " : "",
- aSysLayoutData.aSysFontData.bFakeBold ? "FB " : "",
- aSysLayoutData.aSysFontData.bFakeItalic ? "FI " : "",
-#if (defined CAIRO_HAS_WIN32_SURFACE) && (OSL_DEBUG_LEVEL > 1)
- ::rtl::OUStringToOString( reinterpret_cast<const sal_Unicode*> (logfont.lfFaceName), RTL_TEXTENCODING_UTF8 ).getStr(),
-#else
- ::rtl::OUStringToOString( aFont.GetName(), RTL_TEXTENCODING_UTF8 ).getStr(),
-#endif
- ::rtl::OUStringToOString( maText.Text.copy( maText.StartPosition, maText.Length ),
- RTL_TEXTENCODING_UTF8 ).getStr()
- );
+ cairo_matrix_scale(&m, nWidth, aFont.GetHeight());
- cairo_show_glyphs(pSCairo.get(), &cairo_glyphs[0], cairo_glyphs.size());
+ //faux italics
+ if (rSysFontData.bFakeItalic) m.xy = -m.xx * 0x6000L / 0x10000L;
- //faux bold
- if (aSysLayoutData.aSysFontData.bFakeBold) {
- double bold_dx = 0.5 * sqrt( 0.7 * aFont.GetHeight() );
- int total_steps = 2 * ((int) (bold_dx + 0.5));
+ cairo_set_font_matrix(pSCairo.get(), &m);
- // loop to draw the text for every half pixel of displacement
- for (int nSteps = 0; nSteps < total_steps; nSteps++) {
- for(int nGlyphIdx = 0; nGlyphIdx < (int) cairo_glyphs.size(); nGlyphIdx++) {
- cairo_glyphs[nGlyphIdx].x += bold_dx * nSteps / total_steps;
+ OSL_TRACE("\r\n:cairocanvas::TextLayout::draw(S,O,p,v,r): Size:(%d,%d), W:%d->%d, Pos (%d,%d), G(%d,%d,%d) %s%s%s%s || Name:%s - %s",
+ aFont.GetWidth(),
+ aFont.GetHeight(),
+ aMetric.GetWidth(),
+ nWidth,
+ (int) rOutpos.X(),
+ (int) rOutpos.Y(),
+ cairo_glyphs[0].index, cairo_glyphs[1].index, cairo_glyphs[2].index,
+ maLogicalAdvancements.getLength() ? "ADV " : "",
+ rSysFontData.bAntialias ? "AA " : "",
+ rSysFontData.bFakeBold ? "FB " : "",
+ rSysFontData.bFakeItalic ? "FI " : "",
+ #if (defined CAIRO_HAS_WIN32_SURFACE) && (OSL_DEBUG_LEVEL > 1)
+ ::rtl::OUStringToOString( reinterpret_cast<const sal_Unicode*> (logfont.lfFaceName), RTL_TEXTENCODING_UTF8 ).getStr(),
+ #else
+ ::rtl::OUStringToOString( aFont.GetName(), RTL_TEXTENCODING_UTF8 ).getStr(),
+ #endif
+ ::rtl::OUStringToOString( maText.Text.copy( maText.StartPosition, maText.Length ),
+ RTL_TEXTENCODING_UTF8 ).getStr()
+ );
+
+ cairo_show_glyphs(pSCairo.get(), &cairo_glyphs[0], cairo_glyphs.size());
+
+ //faux bold
+ if (rSysFontData.bFakeBold) {
+ double bold_dx = 0.5 * sqrt( 0.7 * aFont.GetHeight() );
+ int total_steps = 2 * ((int) (bold_dx + 0.5));
+
+ // loop to draw the text for every half pixel of displacement
+ for (int nSteps = 0; nSteps < total_steps; nSteps++) {
+ for(int nGlyphIdx = 0; nGlyphIdx < (int) cairo_glyphs.size(); nGlyphIdx++) {
+ cairo_glyphs[nGlyphIdx].x += bold_dx * nSteps / total_steps;
+ }
+ cairo_show_glyphs(pSCairo.get(), &cairo_glyphs[0], cairo_glyphs.size());
}
- cairo_show_glyphs(pSCairo.get(), &cairo_glyphs[0], cairo_glyphs.size());
+ OSL_TRACE(":cairocanvas::TextLayout::draw(S,O,p,v,r): FAKEBOLD - dx:%d", (int) bold_dx);
}
- OSL_TRACE(":cairocanvas::TextLayout::draw(S,O,p,v,r): FAKEBOLD - dx:%d", (int) bold_dx);
- }
- cairo_restore( pSCairo.get() );
- cairo_font_face_destroy(font_face);
+ cairo_restore( pSCairo.get() );
+ cairo_font_face_destroy(font_face);
+ }
return true;
}
diff --git a/canvas/source/directx/dx_5rm.cxx b/canvas/source/directx/dx_5rm.cxx
index 642ef7bd7db6..ecc8e6af2a9b 100755
--- a/canvas/source/directx/dx_5rm.cxx
+++ b/canvas/source/directx/dx_5rm.cxx
@@ -1108,7 +1108,7 @@ namespace dxcanvas
const_cast<Window *>(&rWindow), 0) );
// system child window must not receive mouse events
- mpWindow->SetMouseTransparent( TRUE );
+ mpWindow->SetMouseTransparent( sal_True );
// parent should receive paint messages as well
// [PARENTCLIPMODE_NOCLIP], the argument is here
@@ -1117,11 +1117,11 @@ namespace dxcanvas
mpWindow->SetParentClipMode(0x0002);
// the system child window must not clear its background
- mpWindow->EnableEraseBackground( FALSE );
+ mpWindow->EnableEraseBackground( sal_False );
mpWindow->SetControlForeground();
mpWindow->SetControlBackground();
- mpWindow->EnablePaint(FALSE);
+ mpWindow->EnablePaint(sal_False);
const SystemEnvData *pData = mpWindow->GetSystemData();
const HWND hwnd(reinterpret_cast<HWND>(pData->hWnd));
diff --git a/canvas/source/directx/dx_9rm.cxx b/canvas/source/directx/dx_9rm.cxx
index a0f485befa12..6a2d218e936c 100755
--- a/canvas/source/directx/dx_9rm.cxx
+++ b/canvas/source/directx/dx_9rm.cxx
@@ -696,11 +696,11 @@ namespace dxcanvas
mpWindow->SetParentClipMode(0x0002);
// the system child window must not clear its background
- mpWindow->EnableEraseBackground( FALSE );
+ mpWindow->EnableEraseBackground( sal_False );
mpWindow->SetControlForeground();
mpWindow->SetControlBackground();
- mpWindow->EnablePaint(FALSE);
+ mpWindow->EnablePaint(sal_False);
const SystemEnvData *pData = mpWindow->GetSystemData();
const HWND hwnd(reinterpret_cast<HWND>(pData->hWnd));
diff --git a/canvas/source/directx/dx_canvashelper_texturefill.cxx b/canvas/source/directx/dx_canvashelper_texturefill.cxx
index 80224aa3d53c..17d5a2983f7c 100755
--- a/canvas/source/directx/dx_canvashelper_texturefill.cxx
+++ b/canvas/source/directx/dx_canvashelper_texturefill.cxx
@@ -227,6 +227,7 @@ namespace dxcanvas
Gdiplus::SolidBrush aBackgroundBrush( rColors[0] );
rGraphics->FillPath( &aBackgroundBrush, pFillPath.get() );
+ Gdiplus::Matrix aMatrix;
// scale focus according to aspect ratio: for wider-than-tall
// bounds (nAspectRatio > 1.0), the focus must have non-zero
// width. Specifically, a bound rect twice as wide as tall has
@@ -383,7 +384,6 @@ namespace dxcanvas
// one sets both, only the translational components of the
// texture is respected.
- Gdiplus::Matrix aMatrix;
tools::gdiPlusMatrixFromAffineMatrix2D( aMatrix,
texture.AffineTransform );
GraphicsPathSharedPtr pGradientPath(
diff --git a/canvas/source/directx/dx_textlayout_drawhelper.cxx b/canvas/source/directx/dx_textlayout_drawhelper.cxx
index 56ec00e9a648..b246cf5bedeb 100755
--- a/canvas/source/directx/dx_textlayout_drawhelper.cxx
+++ b/canvas/source/directx/dx_textlayout_drawhelper.cxx
@@ -129,7 +129,7 @@ namespace dxcanvas
aFont.SetAlign( ALIGN_BASELINE );
aFont.SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==com::sun::star::util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
- aFont.SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? TRUE : FALSE );
+ aFont.SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? sal_True : sal_False );
aFont.SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) );
aFont.SetItalic( (rFontRequest.FontDescription.FontDescription.Letterform<=8) ? ITALIC_NONE : ITALIC_NORMAL );
@@ -261,7 +261,7 @@ namespace dxcanvas
aFont.SetAlign( ALIGN_BASELINE );
aFont.SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==com::sun::star::util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
- aFont.SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? TRUE : FALSE );
+ aFont.SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? sal_True : sal_False );
aFont.SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) );
aFont.SetItalic( (rFontRequest.FontDescription.FontDescription.Letterform<=8) ? ITALIC_NONE : ITALIC_NORMAL );
@@ -301,8 +301,8 @@ namespace dxcanvas
return geometry::RealRectangle2D( 0, nAboveBaseline,
aVirtualDevice.GetTextWidth(
rText.Text,
- ::canvas::tools::numeric_cast<USHORT>(rText.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(rText.Length) ),
+ ::canvas::tools::numeric_cast<sal_uInt16>(rText.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(rText.Length) ),
nBelowBaseline );
}
}
diff --git a/canvas/source/directx/dx_winstuff.hxx b/canvas/source/directx/dx_winstuff.hxx
index d1718b07f3d1..f4dc1fcd0496 100755
--- a/canvas/source/directx/dx_winstuff.hxx
+++ b/canvas/source/directx/dx_winstuff.hxx
@@ -55,9 +55,6 @@
#endif
-#define BOOL win32BOOL
-#define INT32 win32INT32
-#define UINT32 win32UINT32
#define GradientStyle_RECT win32GradientStyle_RECT
#define Polygon win32Polygon
#define PolyPolygon win32PolyPolygon
@@ -211,9 +208,6 @@ namespace dxcanvas
#endif
#undef DELETE
-#undef BOOL
-#undef INT32
-#undef UINT32
#undef PolyPolygon
#endif /* _DXCANVAS_WINSTUFF_HXX */
diff --git a/canvas/source/tools/image.cxx b/canvas/source/tools/image.cxx
index b6183e463e99..4b8a2a334873 100644
--- a/canvas/source/tools/image.cxx
+++ b/canvas/source/tools/image.cxx
@@ -417,7 +417,7 @@ namespace canvas { namespace
// out notion of alpha is
// different from the rest
// of the world's
- *pCurrOutput++ = 255 - (BYTE)*pAScan++;
+ *pCurrOutput++ = 255 - (sal_uInt8)*pAScan++;
}
}
break;
@@ -437,7 +437,7 @@ namespace canvas { namespace
// out notion of alpha is
// different from the rest
// of the world's
- *pCurrOutput++ = 255 - (BYTE)*pAScan++;
+ *pCurrOutput++ = 255 - (sal_uInt8)*pAScan++;
}
}
break;
@@ -469,7 +469,7 @@ namespace canvas { namespace
// out notion of alpha is
// different from the rest
// of the world's
- *pCurrOutput++ = 255 - (BYTE)*pAScan++;
+ *pCurrOutput++ = 255 - (sal_uInt8)*pAScan++;
}
}
break;
@@ -661,8 +661,8 @@ namespace canvas { namespace
else
{
// *no* alpha mask
- ULONG nFormat = pReadAccess->GetScanlineFormat();
- BYTE *pBuffer = reinterpret_cast<BYTE *>(rBmpData.mpBitmapData);
+ sal_uIntPtr nFormat = pReadAccess->GetScanlineFormat();
+ sal_uInt8 *pBuffer = reinterpret_cast<sal_uInt8 *>(rBmpData.mpBitmapData);
switch(nFormat)
{
@@ -672,14 +672,14 @@ namespace canvas { namespace
sal_Int32 height = pReadAccess->Height();
for(sal_Int32 y=0; y<height; ++y)
{
- BYTE *pScanline=pReadAccess->GetScanline(y);
+ sal_uInt8 *pScanline=pReadAccess->GetScanline(y);
sal_Int32 width = pReadAccess->Width();
for(sal_Int32 x=0; x<width; ++x)
{
// BGR -> RGB
- BYTE b(*pScanline++);
- BYTE g(*pScanline++);
- BYTE r(*pScanline++);
+ sal_uInt8 b(*pScanline++);
+ sal_uInt8 g(*pScanline++);
+ sal_uInt8 r(*pScanline++);
*pBuffer++ = r;
*pBuffer++ = g;
*pBuffer++ = b;
@@ -694,14 +694,14 @@ namespace canvas { namespace
sal_Int32 height = pReadAccess->Height();
for(sal_Int32 y=0; y<height; ++y)
{
- BYTE *pScanline=pReadAccess->GetScanline(y);
+ sal_uInt8 *pScanline=pReadAccess->GetScanline(y);
sal_Int32 width = pReadAccess->Width();
for(sal_Int32 x=0; x<width; ++x)
{
// RGB -> RGB
- BYTE r(*pScanline++);
- BYTE g(*pScanline++);
- BYTE b(*pScanline++);
+ sal_uInt8 r(*pScanline++);
+ sal_uInt8 g(*pScanline++);
+ sal_uInt8 b(*pScanline++);
*pBuffer++ = r;
*pBuffer++ = g;
*pBuffer++ = b;
@@ -720,7 +720,7 @@ namespace canvas { namespace
sal_Int32 height = pReadAccess->Height();
for(sal_Int32 y=0; y<height; ++y)
{
- BYTE *pScanline=pReadAccess->GetScanline(y);
+ sal_uInt8 *pScanline=pReadAccess->GetScanline(y);
sal_Int32 width = pReadAccess->Width();
for(sal_Int32 x=0; x<width; ++x)
{
@@ -1263,11 +1263,11 @@ ImageCachedPrimitiveSharedPtr Image::fillTexturedPolyPolygonImpl(
sal_uInt8 *pDst=pDstBuffer;
for(sal_Int32 x=0; x<dwWidth; ++x)
{
- BYTE r(*pSrc++);
- BYTE g(*pSrc++);
- BYTE b(*pSrc++);
- BYTE Alpha(*pSrc++);
- BYTE OneMinusAlpha(0xFF-Alpha);
+ sal_uInt8 r(*pSrc++);
+ sal_uInt8 g(*pSrc++);
+ sal_uInt8 b(*pSrc++);
+ sal_uInt8 Alpha(*pSrc++);
+ sal_uInt8 OneMinusAlpha(0xFF-Alpha);
*pDst=(((r*Alpha)+((*pDst)*OneMinusAlpha))/0xFF);
++pDst;
*pDst=(((g*Alpha)+((*pDst)*OneMinusAlpha))/0xFF);
@@ -1287,9 +1287,9 @@ ImageCachedPrimitiveSharedPtr Image::fillTexturedPolyPolygonImpl(
sal_uInt8 *pDst=pDstBuffer;
for(sal_Int32 x=0; x<dwWidth; ++x)
{
- BYTE r(*pSrc++);
- BYTE g(*pSrc++);
- BYTE b(*pSrc++);
+ sal_uInt8 r(*pSrc++);
+ sal_uInt8 g(*pSrc++);
+ sal_uInt8 b(*pSrc++);
*pDst++=r;
*pDst++=g;
*pDst++=b;
diff --git a/canvas/source/vcl/bitmapbackbuffer.cxx b/canvas/source/vcl/bitmapbackbuffer.cxx
index c09721a5cfaf..53bb67dc32c2 100644
--- a/canvas/source/vcl/bitmapbackbuffer.cxx
+++ b/canvas/source/vcl/bitmapbackbuffer.cxx
@@ -88,7 +88,7 @@ namespace vclcanvas
if( mbVDevContentIsCurrent && mpVDev )
{
// VDev content is more current than bitmap - copy contents before!
- mpVDev->EnableMapMode( FALSE );
+ mpVDev->EnableMapMode( sal_False );
const Point aEmptyPoint;
*maBitmap = mpVDev->GetBitmapEx( aEmptyPoint,
mpVDev->GetOutputSizePixel() );
@@ -108,7 +108,7 @@ namespace vclcanvas
if( mbVDevContentIsCurrent && mpVDev )
{
- mpVDev->EnableMapMode( FALSE );
+ mpVDev->EnableMapMode( sal_False );
aSize = mpVDev->GetOutputSizePixel();
}
@@ -151,7 +151,7 @@ namespace vclcanvas
if( mpVDev && mbBitmapContentIsCurrent )
{
// fill with bitmap content
- mpVDev->EnableMapMode( FALSE );
+ mpVDev->EnableMapMode( sal_False );
const Point aEmptyPoint;
mpVDev->DrawBitmapEx( aEmptyPoint, *maBitmap );
}
diff --git a/canvas/source/vcl/canvasbitmap.cxx b/canvas/source/vcl/canvasbitmap.cxx
index 38008e86ba87..2b244602e3fd 100644
--- a/canvas/source/vcl/canvasbitmap.cxx
+++ b/canvas/source/vcl/canvasbitmap.cxx
@@ -49,7 +49,7 @@ namespace vclcanvas
{
// create bitmap for given reference device
// ========================================
- const USHORT nBitCount( (USHORT)24U );
+ const sal_uInt16 nBitCount( (sal_uInt16)24U );
const BitmapPalette* pPalette = NULL;
Bitmap aBitmap( rSize, nBitCount, pPalette );
diff --git a/canvas/source/vcl/canvasbitmaphelper.cxx b/canvas/source/vcl/canvasbitmaphelper.cxx
index 8fb5a872589d..5b8f9fd84d94 100644
--- a/canvas/source/vcl/canvasbitmaphelper.cxx
+++ b/canvas/source/vcl/canvasbitmaphelper.cxx
@@ -266,7 +266,7 @@ namespace vclcanvas
x<aBmpSize.Width() && x<rect.X2;
++x )
{
- *pScan++ = (BYTE)pWriteAccess->GetBestPaletteIndex(
+ *pScan++ = (sal_uInt8)pWriteAccess->GetBestPaletteIndex(
BitmapColor( data[ nCurrPos ],
data[ nCurrPos+1 ],
data[ nCurrPos+2 ] ) );
@@ -274,7 +274,7 @@ namespace vclcanvas
nCurrPos += 3;
// cast to unsigned byte, for correct subtraction result
- *pAScan++ = static_cast<BYTE>(255 -
+ *pAScan++ = static_cast<sal_uInt8>(255 -
static_cast<sal_uInt8>(data[ nCurrPos++ ]));
}
}
@@ -296,7 +296,7 @@ namespace vclcanvas
nCurrPos += 3;
// cast to unsigned byte, for correct subtraction result
- *pAScan++ = static_cast<BYTE>(255 -
+ *pAScan++ = static_cast<sal_uInt8>(255 -
static_cast<sal_uInt8>(data[ nCurrPos++ ]));
}
}
@@ -318,7 +318,7 @@ namespace vclcanvas
nCurrPos += 3;
// cast to unsigned byte, for correct subtraction result
- *pAScan++ = static_cast<BYTE>(255 -
+ *pAScan++ = static_cast<sal_uInt8>(255 -
static_cast<sal_uInt8>(data[ nCurrPos++ ]));
}
}
@@ -338,7 +338,7 @@ namespace vclcanvas
// cast to unsigned byte, for correct subtraction result
pAlphaWriteAccess->SetPixel( y, x,
BitmapColor(
- static_cast<BYTE>(255 -
+ static_cast<sal_uInt8>(255 -
static_cast<sal_uInt8>(data[ nCurrPos++ ])) ) );
}
}
@@ -359,7 +359,7 @@ namespace vclcanvas
x<aBmpSize.Width() && x<rect.X2;
++x )
{
- *pScan++ = (BYTE)pWriteAccess->GetBestPaletteIndex(
+ *pScan++ = (sal_uInt8)pWriteAccess->GetBestPaletteIndex(
BitmapColor( data[ nCurrPos ],
data[ nCurrPos+1 ],
data[ nCurrPos+2 ] ) );
diff --git a/canvas/source/vcl/canvasfont.cxx b/canvas/source/vcl/canvasfont.cxx
index e95a3f79f2b5..4ca0084983db 100644
--- a/canvas/source/vcl/canvasfont.cxx
+++ b/canvas/source/vcl/canvasfont.cxx
@@ -58,7 +58,7 @@ namespace vclcanvas
{
maFont->SetAlign( ALIGN_BASELINE );
maFont->SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==com::sun::star::util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
- maFont->SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? TRUE : FALSE );
+ maFont->SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? sal_True : sal_False );
// TODO(F2): improve panose->vclenum conversion
maFont->SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) );
@@ -72,7 +72,7 @@ namespace vclcanvas
OutputDevice& rOutDev( rOutDevProvider->getOutDev() );
const bool bOldMapState( rOutDev.IsMapModeEnabled() );
- rOutDev.EnableMapMode(FALSE);
+ rOutDev.EnableMapMode(sal_False);
const Size aSize = rOutDev.GetFontMetric( *maFont ).GetSize();
diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx
index a83b260d52d5..e135ec494fdf 100644
--- a/canvas/source/vcl/canvashelper.cxx
+++ b/canvas/source/vcl/canvashelper.cxx
@@ -144,7 +144,7 @@ namespace vclcanvas
void CanvasHelper::setBackgroundOutDev( const OutDevProviderSharedPtr& rOutDev )
{
mp2ndOutDev = rOutDev;
- mp2ndOutDev->getOutDev().EnableMapMode( FALSE );
+ mp2ndOutDev->getOutDev().EnableMapMode( sal_False );
}
void CanvasHelper::clear()
@@ -155,7 +155,7 @@ namespace vclcanvas
OutputDevice& rOutDev( mpOutDev->getOutDev() );
tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
rOutDev.SetLineColor( COL_WHITE );
rOutDev.SetFillColor( COL_WHITE );
rOutDev.DrawRect( Rectangle( Point(),
@@ -166,7 +166,7 @@ namespace vclcanvas
OutputDevice& rOutDev2( mp2ndOutDev->getOutDev() );
rOutDev2.SetDrawMode( DRAWMODE_DEFAULT );
- rOutDev2.EnableMapMode( FALSE );
+ rOutDev2.EnableMapMode( sal_False );
rOutDev2.SetLineColor( COL_WHITE );
rOutDev2.SetFillColor( COL_WHITE );
rOutDev2.DrawRect( Rectangle( Point(),
@@ -297,9 +297,9 @@ namespace vclcanvas
// DrawPolygon(), and open ones via DrawPolyLine():
// closed polygons will simply already contain the
// closing segment.
- USHORT nSize( aPolyPoly.Count() );
+ sal_uInt16 nSize( aPolyPoly.Count() );
- for( USHORT i=0; i<nSize; ++i )
+ for( sal_uInt16 i=0; i<nSize; ++i )
{
mpOutDev->getOutDev().DrawPolyLine( aPolyPoly[i] );
@@ -409,21 +409,21 @@ namespace vclcanvas
// self-intersections. Therefore, if we would render it
// via OutDev::DrawPolyPolygon(), on/off fill would
// generate off areas on those self-intersections.
- USHORT nSize( aVCLPolyPoly.Count() );
+ sal_uInt16 nSize( aVCLPolyPoly.Count() );
- for( USHORT i=0; i<nSize; ++i )
+ for( sal_uInt16 i=0; i<nSize; ++i )
{
if( aStrokedPolyPoly.getB2DPolygon( i ).isClosed() ) {
mpOutDev->getOutDev().DrawPolygon( aVCLPolyPoly[i] );
if( mp2ndOutDev )
mp2ndOutDev->getOutDev().DrawPolygon( aVCLPolyPoly[i] );
} else {
- const USHORT nPolySize = aVCLPolyPoly[i].GetSize();
+ const sal_uInt16 nPolySize = aVCLPolyPoly[i].GetSize();
if( nPolySize ) {
Point rPrevPoint = aVCLPolyPoly[i].GetPoint( 0 );
Point rPoint;
- for( USHORT j=1; j<nPolySize; j++ ) {
+ for( sal_uInt16 j=1; j<nPolySize; j++ ) {
rPoint = aVCLPolyPoly[i].GetPoint( j );
mpOutDev->getOutDev().DrawLine( rPrevPoint, rPoint );
if( mp2ndOutDev )
@@ -496,7 +496,7 @@ namespace vclcanvas
}
else
{
- mpOutDev->getOutDev().DrawTransparent( aPolyPoly, (USHORT)nTransPercent );
+ mpOutDev->getOutDev().DrawTransparent( aPolyPoly, (sal_uInt16)nTransPercent );
}
if( mp2ndOutDev )
@@ -521,7 +521,7 @@ namespace vclcanvas
}
else
{
- mp2ndOutDev->getOutDev().DrawTransparent( aPolyPoly, (USHORT)nTransPercent );
+ mp2ndOutDev->getOutDev().DrawTransparent( aPolyPoly, (sal_uInt16)nTransPercent );
}
}
}
@@ -583,7 +583,7 @@ namespace vclcanvas
return uno::Reference< rendering::XCachedPrimitive >(NULL); // no output necessary
// change text direction and layout mode
- ULONG nLayoutMode(0);
+ sal_uIntPtr nLayoutMode(0);
switch( textDirection )
{
case rendering::TextDirection::WEAK_LEFT_TO_RIGHT:
@@ -607,16 +607,16 @@ namespace vclcanvas
mpOutDev->getOutDev().SetLayoutMode( nLayoutMode );
mpOutDev->getOutDev().DrawText( aOutpos,
text.Text,
- ::canvas::tools::numeric_cast<USHORT>(text.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(text.Length) );
+ ::canvas::tools::numeric_cast<sal_uInt16>(text.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(text.Length) );
if( mp2ndOutDev )
{
mp2ndOutDev->getOutDev().SetLayoutMode( nLayoutMode );
mp2ndOutDev->getOutDev().DrawText( aOutpos,
text.Text,
- ::canvas::tools::numeric_cast<USHORT>(text.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(text.Length) );
+ ::canvas::tools::numeric_cast<sal_uInt16>(text.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(text.Length) );
}
}
@@ -759,7 +759,7 @@ namespace vclcanvas
// equivalent to the origAlpha*modulateAlpha the
// DX canvas performs)
aGrfAttr.SetTransparency(
- static_cast< BYTE >(
+ static_cast< sal_uInt8 >(
::basegfx::fround( 255.0*( 1.0 - nAlphaModulation ) ) ) );
}
@@ -778,7 +778,7 @@ namespace vclcanvas
// (3600,0]. Note that the original angle may have
// values outside the [0,2Pi) interval.
const double nAngleInTenthOfDegrees (3600.0 - nRotate * 3600.0 / (2*M_PI));
- aGrfAttr.SetRotation( static_cast< USHORT >(::basegfx::fround(nAngleInTenthOfDegrees)) );
+ aGrfAttr.SetRotation( static_cast< sal_uInt16 >(::basegfx::fround(nAngleInTenthOfDegrees)) );
pGrfObj.reset( new GraphicObject( aBmpEx ) );
}
@@ -913,7 +913,7 @@ namespace vclcanvas
OutputDevice& rOutDev( mpOutDev->getOutDev() );
tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
// TODO(F2): Support alpha vdev canvas here
const Point aEmptyPoint(0,0);
@@ -942,7 +942,7 @@ namespace vclcanvas
OutputDevice& rOutDev( mpOutDev->getOutDev() );
tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
Bitmap aBitmap( rOutDev.GetBitmap(aRect.TopLeft(),
aRect.GetSize()) );
@@ -995,11 +995,11 @@ namespace vclcanvas
OutputDevice& rOutDev( mpOutDev->getOutDev() );
tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
const Rectangle aRect( ::vcl::unotools::rectangleFromIntegerRectangle2D(rect) );
- const USHORT nBitCount( ::std::min( (USHORT)24U,
- (USHORT)rOutDev.GetBitCount() ) );
+ const sal_uInt16 nBitCount( ::std::min( (sal_uInt16)24U,
+ (sal_uInt16)rOutDev.GetBitCount() ) );
const BitmapPalette* pPalette = NULL;
if( nBitCount <= 8 )
@@ -1045,7 +1045,7 @@ namespace vclcanvas
for( x=0; x<nWidth; ++x )
{
- *pScan++ = (BYTE)pWriteAccess->GetBestPaletteIndex(
+ *pScan++ = (sal_uInt8)pWriteAccess->GetBestPaletteIndex(
BitmapColor( data[ nCurrPos ],
data[ nCurrPos+1 ],
data[ nCurrPos+2 ] ) );
@@ -1121,7 +1121,7 @@ namespace vclcanvas
OutputDevice& rOutDev( mpOutDev->getOutDev() );
tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
const Size aBmpSize( rOutDev.GetOutputSizePixel() );
@@ -1158,7 +1158,7 @@ namespace vclcanvas
OutputDevice& rOutDev( mpOutDev->getOutDev() );
tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
const Size aBmpSize( rOutDev.GetOutputSizePixel() );
@@ -1197,7 +1197,7 @@ namespace vclcanvas
OutputDevice& rOutDev( mpOutDev->getOutDev() );
OutputDevice* p2ndOutDev = NULL;
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
if( mp2ndOutDev )
p2ndOutDev = &mp2ndOutDev->getOutDev();
diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx
index c1e71ceb943f..00eb7c1ba071 100644
--- a/canvas/source/vcl/canvashelper_texturefill.cxx
+++ b/canvas/source/vcl/canvashelper_texturefill.cxx
@@ -88,7 +88,7 @@ namespace vclcanvas
const ::Size& rTileSize,
const GraphicAttr& rAttr)
{
- BOOL bRet( false );
+ bool bRet( false );
Point aCurrPos;
int nX, nY;
@@ -101,10 +101,10 @@ namespace vclcanvas
{
// update return value. This method should return true, if
// at least one of the looped Draws succeeded.
- bRet |= rGraphic.Draw( &rOutDev,
+ bRet |= ( sal_True == rGraphic.Draw( &rOutDev,
aCurrPos,
rTileSize,
- &rAttr );
+ &rAttr ) );
aCurrPos.X() += rNextTileX.Width();
aCurrPos.Y() += rNextTileX.Height();
@@ -178,7 +178,7 @@ namespace vclcanvas
// vertex values in the loop below (as ::Polygon is a
// pimpl class, creating one every loop turn would really
// stress the mem allocator)
- ::Polygon aTempPoly( static_cast<USHORT>(5) );
+ ::Polygon aTempPoly( static_cast<sal_uInt16>(5) );
OSL_ENSURE( nStepCount >= 3,
"fillLinearGradient(): stepcount smaller than 3" );
@@ -211,6 +211,8 @@ namespace vclcanvas
if( (rColors.size() % 2) != (nStepCount % 2) )
++nStepCount;
+ rOutDev.SetLineColor();
+
basegfx::tools::KeyStopLerp aLerper(rValues.maStops);
// only iterate nStepCount-1 steps, as the last strip is
@@ -222,9 +224,9 @@ namespace vclcanvas
boost::tuples::tie(nIndex,fAlpha)=aLerper.lerp(double(i)/nStepCount);
rOutDev.SetFillColor(
- Color( (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)),
- (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)),
- (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) ));
+ Color( (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)),
+ (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)),
+ (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) ));
// copy right egde of polygon to left edge (and also
// copy the closing point)
@@ -348,7 +350,7 @@ namespace vclcanvas
const sal_uInt32 nNumPoints( aOuterPoly.count() );
- ::Polygon aTempPoly( static_cast<USHORT>(nNumPoints+1) );
+ ::Polygon aTempPoly( static_cast<sal_uInt16>(nNumPoints+1) );
// increase number of steps by one: polygonal gradients have
// the outermost polygon rendered in rColor2, and the
@@ -366,6 +368,8 @@ namespace vclcanvas
// color).
++nStepCount;
+ rOutDev.SetLineColor();
+
basegfx::tools::KeyStopLerp aLerper(rValues.maStops);
if( !bFillNonOverlapping )
@@ -387,9 +391,9 @@ namespace vclcanvas
// lerp color
rOutDev.SetFillColor(
- Color( (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)),
- (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)),
- (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) ));
+ Color( (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)),
+ (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)),
+ (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) ));
// scale and render polygon, by interpolating between
// outer and inner polygon.
@@ -399,13 +403,13 @@ namespace vclcanvas
const ::basegfx::B2DPoint& rOuterPoint( aOuterPoly.getB2DPoint(p) );
const ::basegfx::B2DPoint& rInnerPoint( aInnerPoly.getB2DPoint(p) );
- aTempPoly[(USHORT)p] = ::Point(
+ aTempPoly[(sal_uInt16)p] = ::Point(
basegfx::fround( fT*rInnerPoint.getX() + (1-fT)*rOuterPoint.getX() ),
basegfx::fround( fT*rInnerPoint.getY() + (1-fT)*rOuterPoint.getY() ) );
}
// close polygon explicitely
- aTempPoly[(USHORT)p] = aTempPoly[0];
+ aTempPoly[(sal_uInt16)p] = aTempPoly[0];
// TODO(P1): compare with vcl/source/gdi/outdev4.cxx,
// OutputDevice::ImplDrawComplexGradient(), there's a note
@@ -424,7 +428,7 @@ namespace vclcanvas
// in the loop below (as ::Polygon is a pimpl class, creating
// one every loop turn would really stress the mem allocator)
::PolyPolygon aTempPolyPoly;
- ::Polygon aTempPoly2( static_cast<USHORT>(nNumPoints+1) );
+ ::Polygon aTempPoly2( static_cast<sal_uInt16>(nNumPoints+1) );
aTempPoly2[0] = rBounds.TopLeft();
aTempPoly2[1] = rBounds.TopRight();
@@ -445,9 +449,9 @@ namespace vclcanvas
// lerp color
rOutDev.SetFillColor(
- Color( (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)),
- (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)),
- (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) ));
+ Color( (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)),
+ (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)),
+ (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) ));
#if defined(VERBOSE) && OSL_DEBUG_LEVEL > 0
if( i && !(i % 10) )
@@ -463,13 +467,13 @@ namespace vclcanvas
const ::basegfx::B2DPoint& rOuterPoint( aOuterPoly.getB2DPoint(p) );
const ::basegfx::B2DPoint& rInnerPoint( aInnerPoly.getB2DPoint(p) );
- aTempPoly[(USHORT)p] = ::Point(
+ aTempPoly[(sal_uInt16)p] = ::Point(
basegfx::fround( fT*rInnerPoint.getX() + (1-fT)*rOuterPoint.getX() ),
basegfx::fround( fT*rInnerPoint.getY() + (1-fT)*rOuterPoint.getY() ) );
}
// close polygon explicitely
- aTempPoly[(USHORT)p] = aTempPoly[0];
+ aTempPoly[(sal_uInt16)p] = aTempPoly[0];
// swap inner and outer polygon
aTempPolyPoly.Replace( aTempPolyPoly.GetObject( 1 ), 0 );
@@ -921,7 +925,7 @@ namespace vclcanvas
aGrfAttr.SetMirrorFlags(
( aScale.getX() < 0.0 ? BMP_MIRROR_HORZ : 0 ) |
( aScale.getY() < 0.0 ? BMP_MIRROR_VERT : 0 ) );
- aGrfAttr.SetRotation( static_cast< USHORT >(::basegfx::fround( nRotate*10.0 )) );
+ aGrfAttr.SetRotation( static_cast< sal_uInt16 >(::basegfx::fround( nRotate*10.0 )) );
pGrfObj.reset( new GraphicObject( aBmpEx ) );
}
@@ -1050,7 +1054,7 @@ namespace vclcanvas
// equivalent to the origAlpha*modulateAlpha
// the DX canvas performs)
aGrfAttr.SetTransparency(
- static_cast< BYTE >(
+ static_cast< sal_uInt8 >(
::basegfx::fround( 255.0*( 1.0 - textures[0].Alpha ) ) ) );
}
@@ -1121,7 +1125,7 @@ namespace vclcanvas
aVDev.GetBitmap( aEmptyPoint,
aVDev.GetOutputSizePixel() ) );
- BYTE nCol( static_cast< BYTE >(
+ sal_uInt8 nCol( static_cast< sal_uInt8 >(
::basegfx::fround( 255.0*( 1.0 - textures[0].Alpha ) ) ) );
AlphaMask aAlpha( aVDev.GetOutputSizePixel(),
&nCol );
diff --git a/canvas/source/vcl/devicehelper.cxx b/canvas/source/vcl/devicehelper.cxx
index 9b7b9fac2857..699a2ebfe9b8 100644
--- a/canvas/source/vcl/devicehelper.cxx
+++ b/canvas/source/vcl/devicehelper.cxx
@@ -230,7 +230,7 @@ namespace vclcanvas
const ::Point aEmptyPoint;
OutputDevice& rOutDev = mpOutDev->getOutDev();
bool bOldMap( rOutDev.IsMapModeEnabled() );
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
aStream << rOutDev.GetBitmap(aEmptyPoint,
rOutDev.GetOutputSizePixel());
rOutDev.EnableMapMode( bOldMap );
diff --git a/canvas/source/vcl/impltools.cxx b/canvas/source/vcl/impltools.cxx
index b4c19aa5a028..97a825f48f01 100644
--- a/canvas/source/vcl/impltools.cxx
+++ b/canvas/source/vcl/impltools.cxx
@@ -178,7 +178,7 @@ namespace vclcanvas
const ::Polygon& rPoly( rPolyPoly[0] );
- USHORT nCount( rPoly.GetSize() );
+ sal_uInt16 nCount( rPoly.GetSize() );
if( nCount < 4 )
return false;
@@ -389,7 +389,7 @@ namespace vclcanvas
pAlphaWriteAccess->SetPixel( y, x,
BitmapColor(
255U -
- static_cast<BYTE>(
+ static_cast<sal_uInt8>(
nAlphaModulation*
(255U
- aAlphaMap[ pAlphaReadAccess->GetPixel(
@@ -400,15 +400,15 @@ namespace vclcanvas
nSrcX ) );
aColor.SetRed(
- static_cast<BYTE>(
+ static_cast<sal_uInt8>(
nRedModulation *
aColor.GetRed() + .5 ));
aColor.SetGreen(
- static_cast<BYTE>(
+ static_cast<sal_uInt8>(
nGreenModulation *
aColor.GetGreen() + .5 ));
aColor.SetBlue(
- static_cast<BYTE>(
+ static_cast<sal_uInt8>(
nBlueModulation *
aColor.GetBlue() + .5 ));
@@ -443,7 +443,7 @@ namespace vclcanvas
pAlphaWriteAccess->SetPixel( y, x,
BitmapColor(
255U -
- static_cast<BYTE>(
+ static_cast<sal_uInt8>(
nAlphaModulation*255.0
+ .5 ) ) );
@@ -451,15 +451,15 @@ namespace vclcanvas
nSrcX ) );
aColor.SetRed(
- static_cast<BYTE>(
+ static_cast<sal_uInt8>(
nRedModulation *
aColor.GetRed() + .5 ));
aColor.SetGreen(
- static_cast<BYTE>(
+ static_cast<sal_uInt8>(
nGreenModulation *
aColor.GetGreen() + .5 ));
aColor.SetBlue(
- static_cast<BYTE>(
+ static_cast<sal_uInt8>(
nBlueModulation *
aColor.GetBlue() + .5 ));
diff --git a/canvas/source/vcl/impltools.hxx b/canvas/source/vcl/impltools.hxx
index 8bedfc6de340..e79ddb8496df 100644
--- a/canvas/source/vcl/impltools.hxx
+++ b/canvas/source/vcl/impltools.hxx
@@ -168,7 +168,7 @@ namespace vclcanvas
if( mpOutDev )
{
mpOutDev->Push();
- mpOutDev->EnableMapMode(FALSE);
+ mpOutDev->EnableMapMode(sal_False);
}
}
diff --git a/canvas/source/vcl/spritecanvashelper.cxx b/canvas/source/vcl/spritecanvashelper.cxx
index f2327a29c480..50f02e6b5888 100644
--- a/canvas/source/vcl/spritecanvashelper.cxx
+++ b/canvas/source/vcl/spritecanvashelper.cxx
@@ -98,7 +98,7 @@ namespace vclcanvas
// clip output to actual update region (otherwise a)
// wouldn't save much render time, and b) will clutter
// scrolled sprite content outside this area)
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
rOutDev.SetClipRegion( rRequestedArea );
// repaint affected sprite directly to output device (at
@@ -318,7 +318,7 @@ namespace vclcanvas
// but repaint everything (or caller requested that)
maVDev->SetOutputSizePixel( aOutDevSize );
- maVDev->EnableMapMode( FALSE );
+ maVDev->EnableMapMode( sal_False );
maVDev->DrawOutDev( aEmptyPoint, aOutDevSize,
aEmptyPoint, aOutDevSize,
rBackOutDev );
@@ -332,7 +332,7 @@ namespace vclcanvas
_1 ) );
// flush to screen
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
rOutDev.SetClipRegion();
rOutDev.DrawOutDev( aEmptyPoint, aOutDevSize,
aEmptyPoint, aOutDevSize,
@@ -577,7 +577,7 @@ namespace vclcanvas
}
// paint background
- maVDev->EnableMapMode( FALSE );
+ maVDev->EnableMapMode( sal_False );
maVDev->SetClipRegion();
maVDev->DrawOutDev( aEmptyPoint, aOutputSize,
aOutputPosition, aOutputSize,
@@ -594,7 +594,7 @@ namespace vclcanvas
_1 ) );
// flush to screen
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
rOutDev.DrawOutDev( aOutputPosition, aOutputSize,
aEmptyPoint, aOutputSize,
*maVDev );
diff --git a/canvas/source/vcl/spritedevicehelper.cxx b/canvas/source/vcl/spritedevicehelper.cxx
index 46561bc3f835..6aa6de0bac97 100644
--- a/canvas/source/vcl/spritedevicehelper.cxx
+++ b/canvas/source/vcl/spritedevicehelper.cxx
@@ -147,7 +147,7 @@ namespace vclcanvas
SvFileStream aStream( aFilename, STREAM_STD_READWRITE );
const ::Point aEmptyPoint;
- mpBackBuffer->getOutDev().EnableMapMode( FALSE );
+ mpBackBuffer->getOutDev().EnableMapMode( sal_False );
aStream << mpBackBuffer->getOutDev().GetBitmap(aEmptyPoint,
mpBackBuffer->getOutDev().GetOutputSizePixel());
}
diff --git a/canvas/source/vcl/spritehelper.cxx b/canvas/source/vcl/spritehelper.cxx
index a09905e006a8..af1a2f9ccd4d 100644..100755
--- a/canvas/source/vcl/spritehelper.cxx
+++ b/canvas/source/vcl/spritehelper.cxx
@@ -341,21 +341,8 @@ namespace vclcanvas
else
#endif
{
- // redraw is direcly on the front buffer,
- // or using alpha blending - cannot use
- // XOR, thus, employing the still somewhat
- // speedier triangle clip method
- ::basegfx::B2DPolygon aTriangulatedClip(::basegfx::triangulator::triangulate(aClipPoly));
-
- // restrict the clipping area to the visible portion of the output device.
- Size aSize(rTargetSurface.GetOutputSizePixel());
- ::basegfx::B2DRange aOutputRect(::basegfx::B2DPoint(0,0),::basegfx::B2DPoint(aSize.Width(),aSize.Height()));
- ::basegfx::B2DPolygon aClippedClip(::basegfx::tools::clipTriangleListOnRange(aTriangulatedClip,aOutputRect));
-
- // #i76339#
- const Polygon aPoly(aClippedClip);
- const PolyPolygon aPolyPoly(aPoly);
- rTargetSurface.SetTriangleClipRegion(aPolyPoly);
+ Region aClipRegion( aClipPoly );
+ rTargetSurface.SetClipRegion( aClipRegion );
}
}
}
@@ -376,7 +363,7 @@ namespace vclcanvas
// here
// draw semi-transparent
- BYTE nColor( static_cast<UINT8>( ::basegfx::fround( 255.0*(1.0 - fAlpha) + .5) ) );
+ sal_uInt8 nColor( static_cast<sal_uInt8>( ::basegfx::fround( 255.0*(1.0 - fAlpha) + .5) ) );
AlphaMask aAlpha( maContent->GetSizePixel(),
&nColor );
@@ -408,7 +395,7 @@ namespace vclcanvas
for( int i=0; i<aMarkerPoly.Count(); ++i )
{
- rTargetSurface.DrawPolyLine( aMarkerPoly.GetObject((USHORT)i) );
+ rTargetSurface.DrawPolyLine( aMarkerPoly.GetObject((sal_uInt16)i) );
}
// paint sprite prio
diff --git a/canvas/source/vcl/textlayout.cxx b/canvas/source/vcl/textlayout.cxx
index a2fd331fa66f..19b0f7cea4ce 100644
--- a/canvas/source/vcl/textlayout.cxx
+++ b/canvas/source/vcl/textlayout.cxx
@@ -58,7 +58,7 @@ namespace vclcanvas
sal_Int8 nTextDirection )
{
// TODO(P3): avoid if already correctly set
- ULONG nLayoutMode;
+ sal_uIntPtr nLayoutMode;
switch( nTextDirection )
{
default:
@@ -139,10 +139,10 @@ namespace vclcanvas
if (aVDev.GetTextOutlines(
aOutlines,
maText.Text,
- ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(maText.Length),
- FALSE,
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.Length),
+ sal_False,
0,
aOffsets.get()))
{
@@ -192,9 +192,9 @@ namespace vclcanvas
if (aVDev.GetGlyphBoundRects(
Point(0,0),
maText.Text,
- ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(maText.Length),
- ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.Length),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
aMetricVector))
{
aBoundingBoxes.realloc(aMetricVector.size());
@@ -272,8 +272,8 @@ namespace vclcanvas
return geometry::RealRectangle2D( 0, nAboveBaseline,
aVDev.GetTextWidth(
maText.Text,
- ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(maText.Length) ),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.Length) ),
nBelowBaseline );
}
}
@@ -405,15 +405,15 @@ namespace vclcanvas
rOutDev.DrawTextArray( rOutpos,
maText.Text,
aOffsets.get(),
- ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(maText.Length) );
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.Length) );
}
else
{
rOutDev.DrawText( rOutpos,
maText.Text,
- ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(maText.Length) );
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.Length) );
}
return true;
diff --git a/comphelper/inc/makefile.mk b/comphelper/JunitTest_comphelper_complex.mk
index 5c466f93be42..5da6f2cd2061 100644
--- a/comphelper/inc/makefile.mk
+++ b/comphelper/JunitTest_comphelper_complex.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -24,25 +24,25 @@
# for a copy of the LGPLv3 License.
#
#*************************************************************************
-PRJ=..
-PRJNAME=comphelper
-TARGET=inc
+$(eval $(call gb_JunitTest_JunitTest,comphelper_complex))
-# --- Settings -----------------------------------------------------
+$(eval $(call gb_JunitTest_add_sourcefiles,comphelper_complex,\
+ comphelper/qa/complex/comphelper/Map \
+ comphelper/qa/complex/comphelper/SequenceOutputStreamUnitTest \
+))
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
+$(eval $(call gb_JunitTest_add_jars,comphelper_complex,\
+ $(OUTDIR)/bin/OOoRunner.jar \
+ $(OUTDIR)/bin/ridl.jar \
+ $(OUTDIR)/bin/test.jar \
+ $(OUTDIR)/bin/unoil.jar \
+ $(OUTDIR)/bin/jurt.jar \
+))
-# --- Files --------------------------------------------------------
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
-.IF "$(ENABLE_PCH)"!=""
-ALLTAR : \
- $(SLO)$/precompiled.pch \
- $(SLO)$/precompiled_ex.pch
-
-.ENDIF # "$(ENABLE_PCH)"!=""
+$(eval $(call gb_JunitTest_add_classes,comphelper_complex,\
+ complex.comphelper.SequenceOutputStreamUnitTest \
+ complex.comphelper.Map \
+))
+# vim: set noet sw=4 ts=4:
diff --git a/comphelper/Library_comphelp.mk b/comphelper/Library_comphelp.mk
new file mode 100644
index 000000000000..0228d80b2f89
--- /dev/null
+++ b/comphelper/Library_comphelp.mk
@@ -0,0 +1,158 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2009 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_Library_Library,comphelper))
+
+$(eval $(call gb_Library_add_package_headers,comphelper,comphelper_inc))
+
+$(eval $(call gb_Library_add_precompiled_header,comphelper,$(SRCDIR)/comphelper/inc/pch/precompiled_comphelper))
+
+$(eval $(call gb_Library_set_componentfile,comphelper,comphelper/util/comphelp))
+
+$(eval $(call gb_Library_set_include,comphelper,\
+ -I$(SRCDIR)/comphelper/inc/pch \
+ -I$(SRCDIR)/comphelper/source/inc \
+ $$(INCLUDE) \
+ -I$(OUTDIR)/inc/offuh \
+))
+
+$(eval $(call gb_Library_set_defs,comphelper,\
+ $$(DEFS) \
+ -DCOMPHELPER_DLLIMPLEMENTATION \
+))
+
+$(eval $(call gb_Library_add_linked_libs,comphelper,\
+ sal \
+ cppuhelper \
+ cppu \
+ ucbhelper \
+ vos3 \
+ stl \
+ $(gb_STDLIBS) \
+))
+
+$(eval $(call gb_Library_add_exception_objects,comphelper,\
+ comphelper/source/compare/AnyCompareFactory \
+ comphelper/source/container/IndexedPropertyValuesContainer \
+ comphelper/source/container/NamedPropertyValuesContainer \
+ comphelper/source/container/container \
+ comphelper/source/container/containermultiplexer \
+ comphelper/source/container/embeddedobjectcontainer \
+ comphelper/source/container/enumerablemap \
+ comphelper/source/container/enumhelper \
+ comphelper/source/container/namecontainer \
+ comphelper/source/eventattachermgr/eventattachermgr \
+ comphelper/source/misc/accessiblecomponenthelper \
+ comphelper/source/misc/accessiblecontexthelper \
+ comphelper/source/misc/accessibleeventbuffer \
+ comphelper/source/misc/accessibleeventnotifier \
+ comphelper/source/misc/accessiblekeybindinghelper \
+ comphelper/source/misc/accessibleselectionhelper \
+ comphelper/source/misc/accessibletexthelper \
+ comphelper/source/misc/accessiblewrapper \
+ comphelper/source/misc/accimplaccess \
+ comphelper/source/misc/anytostring \
+ comphelper/source/misc/asyncnotification \
+ comphelper/source/misc/comphelper_module \
+ comphelper/source/misc/comphelper_services \
+ comphelper/source/misc/componentbase \
+ comphelper/source/misc/componentcontext \
+ comphelper/source/misc/componentmodule \
+ comphelper/source/misc/configurationhelper \
+ comphelper/source/misc/docpasswordhelper \
+ comphelper/source/misc/docpasswordrequest \
+ comphelper/source/misc/documentinfo \
+ comphelper/source/misc/documentiologring \
+ comphelper/source/misc/evtlistenerhlp \
+ comphelper/source/misc/evtmethodhelper \
+ comphelper/source/misc/ihwrapnofilter \
+ comphelper/source/misc/instancelocker \
+ comphelper/source/misc/interaction \
+ comphelper/source/misc/legacysingletonfactory \
+ comphelper/source/misc/listenernotification \
+ comphelper/source/misc/locale \
+ comphelper/source/misc/logging \
+ comphelper/source/misc/mediadescriptor \
+ comphelper/source/misc/mimeconfighelper \
+ comphelper/source/misc/namedvaluecollection \
+ comphelper/source/misc/numberedcollection \
+ comphelper/source/misc/numbers \
+ comphelper/source/misc/officeresourcebundle \
+ comphelper/source/misc/officerestartmanager \
+ comphelper/source/misc/proxyaggregation \
+ comphelper/source/misc/regpathhelper \
+ comphelper/source/misc/scopeguard \
+ comphelper/source/misc/SelectionMultiplex \
+ comphelper/source/misc/sequenceashashmap \
+ comphelper/source/misc/sequence \
+ comphelper/source/misc/servicedecl \
+ comphelper/source/misc/serviceinfohelper \
+ comphelper/source/misc/sharedmutex \
+ comphelper/source/misc/stillreadwriteinteraction \
+ comphelper/source/misc/anycompare \
+ comphelper/source/misc/storagehelper \
+ comphelper/source/misc/string \
+ comphelper/source/misc/synchronousdispatch \
+ comphelper/source/misc/types \
+ comphelper/source/misc/uieventslogger \
+ comphelper/source/misc/weak \
+ comphelper/source/misc/weakeventlistener \
+ comphelper/source/officeinstdir/officeinstallationdirectories \
+ comphelper/source/processfactory/componentfactory \
+ comphelper/source/processfactory/processfactory \
+ comphelper/source/property/ChainablePropertySet \
+ comphelper/source/property/ChainablePropertySetInfo \
+ comphelper/source/property/composedprops \
+ comphelper/source/property/genericpropertyset \
+ comphelper/source/property/MasterPropertySet \
+ comphelper/source/property/MasterPropertySetInfo \
+ comphelper/source/property/opropertybag \
+ comphelper/source/property/propagg \
+ comphelper/source/property/propertybag \
+ comphelper/source/property/propertycontainer \
+ comphelper/source/property/propertycontainerhelper \
+ comphelper/source/property/property \
+ comphelper/source/property/propertysethelper \
+ comphelper/source/property/propertysetinfo \
+ comphelper/source/property/propertystatecontainer \
+ comphelper/source/property/propmultiplex \
+ comphelper/source/property/propstate \
+ comphelper/source/property/TypeGeneration \
+ comphelper/source/streaming/basicio \
+ comphelper/source/streaming/memorystream \
+ comphelper/source/streaming/oslfile2streamwrap \
+ comphelper/source/streaming/otransactedfilestream \
+ comphelper/source/streaming/seekableinput \
+ comphelper/source/streaming/seqinputstreamserv \
+ comphelper/source/streaming/seqoutputstreamserv \
+ comphelper/source/streaming/seqstream \
+ comphelper/source/streaming/streamsection \
+ comphelper/source/xml/attributelist \
+ comphelper/source/xml/ofopxmlhelper \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/comphelper/version.mk b/comphelper/Makefile
index f8d798a404b7..a79aff831024 100644
--- a/comphelper/version.mk
+++ b/comphelper/Makefile
@@ -25,22 +25,14 @@
#
#*************************************************************************
-# ----------------------------COMPHLP settings------------------------------------#
-# target
-COMPHLP_TARGET=comphelp
-
-# the major
-COMPHLP_MAJOR=4
-# the minor
-COMPHLP_MINOR=0
-# the micro
-COMPHLP_MICRO=0
-
-# this is a c++ compatible library
-COMPHLP_CPP=1
-
-COMPHLP=$(COMPHLP_TARGET_TARGET)_$(CMPEXT)
-
+ifeq ($(strip $(SOLARENV)),)
+$(error No environment set!)
+endif
+gb_PARTIALBUILD := T
+GBUILDDIR := $(SOLARENV)/gbuild
+include $(GBUILDDIR)/gbuild.mk
+$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
+# vim: set noet sw=4 ts=4:
diff --git a/comphelper/Module_comphelper.mk b/comphelper/Module_comphelper.mk
new file mode 100644
index 000000000000..e39d973fe23e
--- /dev/null
+++ b/comphelper/Module_comphelper.mk
@@ -0,0 +1,39 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2009 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_Module_Module,comphelper))
+
+$(eval $(call gb_Module_add_targets,comphelper,\
+ Package_inc \
+ Library_comphelp \
+))
+
+$(eval $(call gb_Module_add_subsequentcheck_targets,comphelper,\
+ JunitTest_comphelper_complex \
+))
+
+# vim: set noet ts=4 sw=4:
diff --git a/comphelper/Package_inc.mk b/comphelper/Package_inc.mk
new file mode 100644
index 000000000000..5794c56ab74d
--- /dev/null
+++ b/comphelper/Package_inc.mk
@@ -0,0 +1,137 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2009 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_Package_Package,comphelper_inc,$(SRCDIR)/comphelper/inc))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/flagguard.hxx,comphelper/flagguard.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/stlunosequence.hxx,comphelper/stlunosequence.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/documentconstants.hxx,comphelper/documentconstants.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/evtmethodhelper.hxx,comphelper/evtmethodhelper.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/weakbag.hxx,comphelper/weakbag.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/basicio.hxx,comphelper/basicio.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/classids.hxx,comphelper/classids.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/MasterPropertySet.hxx,comphelper/MasterPropertySet.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/stillreadwriteinteraction.hxx,comphelper/stillreadwriteinteraction.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/anycompare.hxx,comphelper/anycompare.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propagg.hxx,comphelper/propagg.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/scopeguard.hxx,comphelper/scopeguard.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/asyncnotification.hxx,comphelper/asyncnotification.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/namedvaluecollection.hxx,comphelper/namedvaluecollection.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/composedprops.hxx,comphelper/composedprops.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/mediadescriptor.hxx,comphelper/mediadescriptor.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/synchronousdispatch.hxx,comphelper/synchronousdispatch.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/accessiblecomponenthelper.hxx,comphelper/accessiblecomponenthelper.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/otransactedfilestream.hxx,comphelper/otransactedfilestream.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propmultiplex.hxx,comphelper/propmultiplex.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/servicehelper.hxx,comphelper/servicehelper.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/servicedecl.hxx,comphelper/servicedecl.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/mimeconfighelper.hxx,comphelper/mimeconfighelper.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/implbase_var.hxx,comphelper/implbase_var.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/TypeGeneration.hxx,comphelper/TypeGeneration.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/MasterPropertySetInfo.hxx,comphelper/MasterPropertySetInfo.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/accessiblewrapper.hxx,comphelper/accessiblewrapper.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/sequence.hxx,comphelper/sequence.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/uieventslogger.hxx,comphelper/uieventslogger.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/docpasswordhelper.hxx,comphelper/docpasswordhelper.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propertystatecontainer.hxx,comphelper/propertystatecontainer.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propertysetinfo.hxx,comphelper/propertysetinfo.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/accimplaccess.hxx,comphelper/accimplaccess.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/docpasswordrequest.hxx,comphelper/docpasswordrequest.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/accessibleeventbuffer.hxx,comphelper/accessibleeventbuffer.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/regpathhelper.hxx,comphelper/regpathhelper.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/extract.hxx,comphelper/extract.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/interaction.hxx,comphelper/interaction.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/uno3.hxx,comphelper/uno3.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/unwrapargs.hxx,comphelper/unwrapargs.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propertycontainer.hxx,comphelper/propertycontainer.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/guarding.hxx,comphelper/guarding.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/fileformat.h,comphelper/fileformat.h))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/ChainablePropertySetInfo.hxx,comphelper/ChainablePropertySetInfo.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/enumhelper.hxx,comphelper/enumhelper.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/property.hxx,comphelper/property.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propertysethelper.hxx,comphelper/propertysethelper.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/accessiblekeybindinghelper.hxx,comphelper/accessiblekeybindinghelper.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propertycontainerhelper.hxx,comphelper/propertycontainerhelper.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/make_shared_from_uno.hxx,comphelper/make_shared_from_uno.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/comphelperdllapi.h,comphelper/comphelperdllapi.h))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/listenernotification.hxx,comphelper/listenernotification.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/attributelist.hxx,comphelper/attributelist.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/streamsection.hxx,comphelper/streamsection.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/accessibletexthelper.hxx,comphelper/accessibletexthelper.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/accessibleselectionhelper.hxx,comphelper/accessibleselectionhelper.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/serviceinfohelper.hxx,comphelper/serviceinfohelper.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/locale.hxx,comphelper/locale.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/numberedcollection.hxx,comphelper/numberedcollection.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/ChainablePropertySet.hxx,comphelper/ChainablePropertySet.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/stl_types.hxx,comphelper/stl_types.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/eventattachermgr.hxx,comphelper/eventattachermgr.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/componentcontext.hxx,comphelper/componentcontext.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/legacysingletonfactory.hxx,comphelper/legacysingletonfactory.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/accessibleeventnotifier.hxx,comphelper/accessibleeventnotifier.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/ihwrapnofilter.hxx,comphelper/ihwrapnofilter.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/sequenceasvector.hxx,comphelper/sequenceasvector.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/officeresourcebundle.hxx,comphelper/officeresourcebundle.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/types.hxx,comphelper/types.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/seekableinput.hxx,comphelper/seekableinput.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/IdPropArrayHelper.hxx,comphelper/IdPropArrayHelper.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/accessiblecontexthelper.hxx,comphelper/accessiblecontexthelper.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/SelectionMultiplex.hxx,comphelper/SelectionMultiplex.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/storagehelper.hxx,comphelper/storagehelper.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/logging.hxx,comphelper/logging.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/sharedmutex.hxx,comphelper/sharedmutex.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/documentinfo.hxx,comphelper/documentinfo.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/weakeventlistener.hxx,comphelper/weakeventlistener.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/componentfactory.hxx,comphelper/componentfactory.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/containermultiplexer.hxx,comphelper/containermultiplexer.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/broadcasthelper.hxx,comphelper/broadcasthelper.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/numbers.hxx,comphelper/numbers.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/evtlistenerhlp.hxx,comphelper/evtlistenerhlp.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/optional.hxx,comphelper/optional.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/componentbase.hxx,comphelper/componentbase.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/componentguard.hxx,comphelper/componentguard.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/InlineContainer.hxx,comphelper/InlineContainer.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propertybag.hxx,comphelper/propertybag.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/embeddedobjectcontainer.hxx,comphelper/embeddedobjectcontainer.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/anytostring.hxx,comphelper/anytostring.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/implementationreference.hxx,comphelper/implementationreference.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/proparrhlp.hxx,comphelper/proparrhlp.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/PropertyInfoHash.hxx,comphelper/PropertyInfoHash.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propstate.hxx,comphelper/propstate.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/proxyaggregation.hxx,comphelper/proxyaggregation.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/oslfile2streamwrap.hxx,comphelper/oslfile2streamwrap.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/genericpropertyset.hxx,comphelper/genericpropertyset.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/makesequence.hxx,comphelper/makesequence.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/ofopxmlhelper.hxx,comphelper/ofopxmlhelper.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/SettingsHelper.hxx,comphelper/SettingsHelper.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/string.hxx,comphelper/string.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/weak.hxx,comphelper/weak.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/componentmodule.hxx,comphelper/componentmodule.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/container.hxx,comphelper/container.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/seqstream.hxx,comphelper/seqstream.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/namecontainer.hxx,comphelper/namecontainer.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/processfactory.hxx,comphelper/processfactory.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/sequenceashashmap.hxx,comphelper/sequenceashashmap.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/configurationhelper.hxx,comphelper/configurationhelper.hxx))
diff --git a/comphelper/inc/comphelper/TypeGeneration.hxx b/comphelper/inc/comphelper/TypeGeneration.hxx
index 6660e560f4af..08401cb39944 100644
--- a/comphelper/inc/comphelper/TypeGeneration.hxx
+++ b/comphelper/inc/comphelper/TypeGeneration.hxx
@@ -115,6 +115,7 @@ namespace comphelper
CPPUTYPE_SEQNAMEDVALUE, //getCppuType( (Sequence<beans::NamedValue>*)0 )
CPPUTYPE_REFXGRAPHIC, //getCppuType( Reference< graphic::XGraphic >*)0)
CPPUTYPE_TABLEBORDERDISTANCES, //getCppuType( (table::TableBorderDistances*)0 )
+ CPPUTPYE_REFEMBEDDEDOBJECT, // XEmbeddedObject::static_type
CPPUTYPE_END
};
diff --git a/comphelper/inc/comphelper/anycompare.hxx b/comphelper/inc/comphelper/anycompare.hxx
new file mode 100755
index 000000000000..03f41e108ba9
--- /dev/null
+++ b/comphelper/inc/comphelper/anycompare.hxx
@@ -0,0 +1,226 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef COMPHELPER_ANYCOMPARE_HXX
+#define COMPHELPER_ANYCOMPARE_HXX
+
+#include "comphelper/comphelperdllapi.h"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <com/sun/star/i18n/XCollator.hpp>
+/** === end UNO includes === **/
+
+#include <comphelper/extract.hxx>
+
+#include <functional>
+#include <memory>
+
+//......................................................................................................................
+namespace comphelper
+{
+//......................................................................................................................
+
+ //==================================================================================================================
+ //= IKeyPredicateLess
+ //==================================================================================================================
+ class SAL_NO_VTABLE IKeyPredicateLess
+ {
+ public:
+ virtual bool isLess( ::com::sun::star::uno::Any const & _lhs, ::com::sun::star::uno::Any const & _rhs ) const = 0;
+ virtual ~IKeyPredicateLess() {}
+ };
+
+ //==================================================================================================================
+ //= LessPredicateAdapter
+ //==================================================================================================================
+ struct LessPredicateAdapter : public ::std::binary_function< ::com::sun::star::uno::Any, ::com::sun::star::uno::Any, bool >
+ {
+ LessPredicateAdapter( const IKeyPredicateLess& _predicate )
+ :m_predicate( _predicate )
+ {
+ }
+
+ bool operator()( ::com::sun::star::uno::Any const & _lhs, ::com::sun::star::uno::Any const & _rhs ) const
+ {
+ return m_predicate.isLess( _lhs, _rhs );
+ }
+
+ private:
+ IKeyPredicateLess const & m_predicate;
+
+ private:
+ LessPredicateAdapter(); // never implemented
+ };
+
+ //==================================================================================================================
+ //= ScalarPredicateLess
+ //==================================================================================================================
+ template< typename SCALAR >
+ class ScalarPredicateLess : public IKeyPredicateLess
+ {
+ public:
+ virtual bool isLess( ::com::sun::star::uno::Any const & _lhs, ::com::sun::star::uno::Any const & _rhs ) const
+ {
+ SCALAR lhs(0), rhs(0);
+ if ( !( _lhs >>= lhs )
+ || !( _rhs >>= rhs )
+ )
+ throw ::com::sun::star::lang::IllegalArgumentException();
+ return lhs < rhs;
+ }
+ };
+
+ //==================================================================================================================
+ //= StringPredicateLess
+ //==================================================================================================================
+ class StringPredicateLess : public IKeyPredicateLess
+ {
+ public:
+ virtual bool isLess( ::com::sun::star::uno::Any const & _lhs, ::com::sun::star::uno::Any const & _rhs ) const
+ {
+ ::rtl::OUString lhs, rhs;
+ if ( !( _lhs >>= lhs )
+ || !( _rhs >>= rhs )
+ )
+ throw ::com::sun::star::lang::IllegalArgumentException();
+ return lhs < rhs;
+ }
+ };
+
+ //==================================================================================================================
+ //= StringCollationPredicateLess
+ //==================================================================================================================
+ class StringCollationPredicateLess : public IKeyPredicateLess
+ {
+ public:
+ StringCollationPredicateLess( ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCollator > const & i_collator )
+ :m_collator( i_collator )
+ {
+ }
+
+ virtual bool isLess( ::com::sun::star::uno::Any const & _lhs, ::com::sun::star::uno::Any const & _rhs ) const
+ {
+ ::rtl::OUString lhs, rhs;
+ if ( !( _lhs >>= lhs )
+ || !( _rhs >>= rhs )
+ )
+ throw ::com::sun::star::lang::IllegalArgumentException();
+ return m_collator->compareString( lhs, rhs ) < 0;
+ }
+
+ private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCollator > const m_collator;
+ };
+
+ //==================================================================================================================
+ //= TypePredicateLess
+ //==================================================================================================================
+ class TypePredicateLess : public IKeyPredicateLess
+ {
+ public:
+ virtual bool isLess( ::com::sun::star::uno::Any const & _lhs, ::com::sun::star::uno::Any const & _rhs ) const
+ {
+ ::com::sun::star::uno::Type lhs, rhs;
+ if ( !( _lhs >>= lhs )
+ || !( _rhs >>= rhs )
+ )
+ throw ::com::sun::star::lang::IllegalArgumentException();
+ return lhs.getTypeName() < rhs.getTypeName();
+ }
+ };
+
+ //==================================================================================================================
+ //= EnumPredicateLess
+ //==================================================================================================================
+ class EnumPredicateLess : public IKeyPredicateLess
+ {
+ public:
+ EnumPredicateLess( ::com::sun::star::uno::Type const & _enumType )
+ :m_enumType( _enumType )
+ {
+ }
+
+ virtual bool isLess( ::com::sun::star::uno::Any const & _lhs, ::com::sun::star::uno::Any const & _rhs ) const
+ {
+ sal_Int32 lhs(0), rhs(0);
+ if ( !::cppu::enum2int( lhs, _lhs )
+ || !::cppu::enum2int( rhs, _rhs )
+ || !_lhs.getValueType().equals( m_enumType )
+ || !_rhs.getValueType().equals( m_enumType )
+ )
+ throw ::com::sun::star::lang::IllegalArgumentException();
+ return lhs < rhs;
+ }
+
+ private:
+ ::com::sun::star::uno::Type const m_enumType;
+ };
+
+ //==================================================================================================================
+ //= InterfacePredicateLess
+ //==================================================================================================================
+ class InterfacePredicateLess : public IKeyPredicateLess
+ {
+ public:
+ virtual bool isLess( ::com::sun::star::uno::Any const & _lhs, ::com::sun::star::uno::Any const & _rhs ) const
+ {
+ if ( ( _lhs.getValueTypeClass() != ::com::sun::star::uno::TypeClass_INTERFACE )
+ || ( _rhs.getValueTypeClass() != ::com::sun::star::uno::TypeClass_INTERFACE )
+ )
+ throw ::com::sun::star::lang::IllegalArgumentException();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > lhs( _lhs, ::com::sun::star::uno::UNO_QUERY );
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > rhs( _rhs, ::com::sun::star::uno::UNO_QUERY );
+ return lhs.get() < rhs.get();
+ }
+ };
+
+ //==================================================================================================================
+ //= getStandardLessPredicate
+ //==================================================================================================================
+ /** creates a default IKeyPredicateLess instance for the given UNO type
+ @param i_type
+ the type for which a predicate instance should be created
+ @param i_collator
+ specifies a collator instance to use, or <NULL/>. If <NULL/>, strings will be compared using the <code>&lt</code>
+ operator, otherwise the collator will be used. The parameter is ignored if <arg>i_type</arg> does not specify
+ the string type.
+ @return
+ a default implementation of IKeyPredicateLess, which is able to compare values of the given type. If no
+ such default implementation is known for the given type, then <NULL/> is returned.
+ */
+ ::std::auto_ptr< IKeyPredicateLess > COMPHELPER_DLLPUBLIC
+ getStandardLessPredicate(
+ ::com::sun::star::uno::Type const & i_type,
+ ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCollator > const & i_collator
+ );
+
+//......................................................................................................................
+} // namespace comphelper
+//......................................................................................................................
+
+#endif // COMPHELPER_ANYCOMPARE_HXX
diff --git a/comphelper/inc/comphelper/asyncnotification.hxx b/comphelper/inc/comphelper/asyncnotification.hxx
index fc4dfcd48dd9..22d901728ef7 100644
--- a/comphelper/inc/comphelper/asyncnotification.hxx
+++ b/comphelper/inc/comphelper/asyncnotification.hxx
@@ -131,8 +131,9 @@ namespace comphelper
virtual oslInterlockedCount SAL_CALL acquire();
virtual oslInterlockedCount SAL_CALL release();
- /// creates (starts) the thread
using AsyncEventNotifier_TBASE::create;
+ using AsyncEventNotifier_TBASE::join;
+ using AsyncEventNotifier_TBASE::getIdentifier;
using AsyncEventNotifier_TBASE::operator new;
using AsyncEventNotifier_TBASE::operator delete;
diff --git a/comphelper/inc/comphelper/componentguard.hxx b/comphelper/inc/comphelper/componentguard.hxx
new file mode 100755
index 000000000000..820b901a5c55
--- /dev/null
+++ b/comphelper/inc/comphelper/componentguard.hxx
@@ -0,0 +1,70 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef COMPHELPER_COMPONENTGUARD_HXX
+#define COMPHELPER_COMPONENTGUARD_HXX
+
+/** === begin UNO includes === **/
+#include <com/sun/star/lang/DisposedException.hpp>
+/** === end UNO includes === **/
+
+#include <cppuhelper/weak.hxx>
+#include <cppuhelper/interfacecontainer.hxx>
+
+//......................................................................................................................
+namespace comphelper
+{
+//......................................................................................................................
+
+ //==================================================================================================================
+ //= ComponentGuard
+ //==================================================================================================================
+ class ComponentGuard
+ {
+ public:
+ ComponentGuard( ::cppu::OWeakObject& i_component, ::cppu::OBroadcastHelper & i_broadcastHelper )
+ :m_aGuard( i_broadcastHelper.rMutex )
+ {
+ if ( i_broadcastHelper.bDisposed )
+ throw ::com::sun::star::lang::DisposedException( ::rtl::OUString(), &i_component );
+ }
+
+ ~ComponentGuard()
+ {
+ }
+
+ void clear() { m_aGuard.clear(); }
+ void reset() { m_aGuard.reset(); }
+
+ private:
+ ::osl::ResettableMutexGuard m_aGuard;
+ };
+
+//......................................................................................................................
+} // namespace comphelper
+//......................................................................................................................
+
+#endif // COMPHELPER_COMPONENTGUARD_HXX
diff --git a/comphelper/inc/comphelper/documentconstants.hxx b/comphelper/inc/comphelper/documentconstants.hxx
index 73b90d72cc8a..e53bb03ce773 100644
--- a/comphelper/inc/comphelper/documentconstants.hxx
+++ b/comphelper/inc/comphelper/documentconstants.hxx
@@ -136,7 +136,6 @@
#define SFX_FILTER_STARONEFILTER 0x00080000L
#define SFX_FILTER_PACKED 0x00100000L
-#define SFX_FILTER_SILENTEXPORT 0x00200000L
#define SFX_FILTER_BROWSERPREFERED 0x00400000L
diff --git a/comphelper/inc/comphelper/flagguard.hxx b/comphelper/inc/comphelper/flagguard.hxx
new file mode 100755
index 000000000000..4fc1f4e97833
--- /dev/null
+++ b/comphelper/inc/comphelper/flagguard.hxx
@@ -0,0 +1,83 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef COMPHELPER_FLAGGUARD_HXX
+#define COMPHELPER_FLAGGUARD_HXX
+
+#include "comphelper/scopeguard.hxx"
+
+//......................................................................................................................
+namespace comphelper
+{
+//......................................................................................................................
+
+ //==================================================================================================================
+ //= FlagRestorationGuard
+ //==================================================================================================================
+ class COMPHELPER_DLLPUBLIC FlagRestorationGuard : public ScopeGuard
+ {
+ public:
+ FlagRestorationGuard( bool& i_flagRef, bool i_temporaryValue, exc_handling i_excHandling = IGNORE_EXCEPTIONS )
+ :ScopeGuard( ::boost::bind( RestoreFlag, ::boost::ref( i_flagRef ), !!i_flagRef ), i_excHandling )
+ {
+ i_flagRef = i_temporaryValue;
+ }
+
+ ~FlagRestorationGuard();
+
+ private:
+ static void RestoreFlag( bool& i_flagRef, bool i_originalValue )
+ {
+ i_flagRef = i_originalValue;
+ }
+ };
+
+ //==================================================================================================================
+ //= FlagGuard
+ //==================================================================================================================
+ class COMPHELPER_DLLPUBLIC FlagGuard : public ScopeGuard
+ {
+ public:
+ explicit FlagGuard( bool& i_flagRef, exc_handling i_excHandling = IGNORE_EXCEPTIONS )
+ :ScopeGuard( ::boost::bind( ResetFlag, ::boost::ref( i_flagRef ) ), i_excHandling )
+ {
+ i_flagRef = true;
+ }
+
+ ~FlagGuard();
+
+ private:
+ static void ResetFlag( bool& i_flagRef )
+ {
+ i_flagRef = false;
+ }
+ };
+
+//......................................................................................................................
+} // namespace comphelper
+//......................................................................................................................
+
+#endif // COMPHELPER_FLAGGUARD_HXX
diff --git a/comphelper/inc/comphelper/scopeguard.hxx b/comphelper/inc/comphelper/scopeguard.hxx
index 1fdd179404a2..e9c8f7ecc625 100644
--- a/comphelper/inc/comphelper/scopeguard.hxx
+++ b/comphelper/inc/comphelper/scopeguard.hxx
@@ -67,21 +67,6 @@ private:
exc_handling const m_excHandling;
};
-class COMPHELPER_DLLPUBLIC FlagGuard : ScopeGuard
-{
-public:
- explicit FlagGuard( bool& i_flagRef, exc_handling i_excHandling = IGNORE_EXCEPTIONS )
- :ScopeGuard( ::boost::bind( ResetFlag, ::boost::ref( i_flagRef ) ), i_excHandling )
- {
- }
-
-private:
- static void ResetFlag( bool& i_flagRef )
- {
- i_flagRef = false;
- }
-};
-
} // namespace comphelper
#endif // ! defined(INCLUDED_COMPHELPER_SCOPEGUARD_HXX)
diff --git a/comphelper/prj/build.lst b/comphelper/prj/build.lst
index 91e836cabd68..01a022a0e0bc 100644
--- a/comphelper/prj/build.lst
+++ b/comphelper/prj/build.lst
@@ -1,15 +1,2 @@
-ph comphelper : cppuhelper ucbhelper offuh vos salhelper LIBXSLT:libxslt NULL
-ph comphelper usr1 - all ph_mkout NULL
-ph comphelper\inc nmake - all ph_inc NULL
-ph comphelper\source\container nmake - all ph_container ph_inc NULL
-ph comphelper\source\eventattachermgr nmake - all ph_evtatmgr ph_inc NULL
-ph comphelper\source\misc nmake - all ph_misc ph_inc NULL
-ph comphelper\source\processfactory nmake - all ph_procfact ph_inc NULL
-ph comphelper\source\property nmake - all ph_property ph_inc NULL
-ph comphelper\source\streaming nmake - all ph_streaming ph_inc NULL
-ph comphelper\source\compare nmake - all ph_compare ph_inc NULL
-ph comphelper\source\officeinstdir nmake - all ph_officeinstdir ph_inc NULL
-ph comphelper\source\xml nmake - all ph_xml NULL
-ph comphelper\util nmake - all ph_util ph_container ph_evtatmgr ph_misc ph_procfact ph_property ph_streaming ph_compare ph_officeinstdir ph_xml NULL
-
-ph comphelper\qa\complex\comphelper nmake - all ph_complex ph_util NULL
+ch comphelper : cppuhelper ucbhelper offuh vos salhelper LIBXSLT:libxslt NULL
+ch comphelper\prj nmake - all ch_all NULL
diff --git a/comphelper/prj/d.lst b/comphelper/prj/d.lst
index f05fcf0926dd..e69de29bb2d1 100644
--- a/comphelper/prj/d.lst
+++ b/comphelper/prj/d.lst
@@ -1,15 +0,0 @@
-..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\*.dll
-..\%__SRC%\lib\*.lib %_DEST%\lib%_EXT%\*.lib
-..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT%
-..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib
-..\%__SRC%\lib\*.sl %_DEST%\lib%_EXT%\*.sl
-..\%__SRC%\bin\*.bin %_DEST%\bin%_EXT%\*.bin
-..\%__SRC%\inc\*.bin %_DEST%\bin%_EXT%\*.bin
-
-mkdir: %_DEST%\inc%_EXT%\comphelper
-..\inc\comphelper\*.hxx %_DEST%\inc%_EXT%\comphelper\*.hxx
-..\inc\comphelper\*.h %_DEST%\inc%_EXT%\comphelper\*.h
-mkdir: %_DEST%\inc%_EXT%\cppuhelper
-..\inc\comphelper\extract.hxx %_DEST%\inc%_EXT%\cppuhelper\extract.hxx
-..\version.mk %_DEST%\inc%_EXT%\comphelper\version.mk
-..\%__SRC%\misc\comphelp4.component %_DEST%\xml%_EXT%\comphelp4.component
diff --git a/toolkit/util/makefile.pmk b/comphelper/prj/makefile.mk
index f04a39bac91b..e312a7ccab65 100644
--- a/toolkit/util/makefile.pmk
+++ b/comphelper/prj/makefile.mk
@@ -25,12 +25,16 @@
#
#*************************************************************************
-# Reduction of exported symbols:
-CDEFS += -DTOOLKIT_DLLIMPLEMENTATION
-VISIBILITY_HIDDEN=TRUE
+PRJ=..
+TARGET=prj
-CFLAGS+=-I$(PRJ)/source
+.INCLUDE : settings.mk
-.IF "$(ENABLE_LAYOUT)" == "TRUE"
-CFLAGS+=-DTEST_LAYOUT=1
-.ENDIF # ENABLE_LAYOUT == TRUE
+.IF "$(VERBOSE)"!=""
+VERBOSEFLAG :=
+.ELSE
+VERBOSEFLAG := -s
+.ENDIF
+
+all:
+ cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog
diff --git a/comphelper/source/container/enumerablemap.cxx b/comphelper/source/container/enumerablemap.cxx
index 15241cd72dd6..a73983517751 100644
--- a/comphelper/source/container/enumerablemap.cxx
+++ b/comphelper/source/container/enumerablemap.cxx
@@ -24,11 +24,11 @@
*
************************************************************************/
-// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_comphelper.hxx"
#include "comphelper_module.hxx"
#include "comphelper/anytostring.hxx"
+#include "comphelper/anycompare.hxx"
#include "comphelper/componentbase.hxx"
#include "comphelper/componentcontext.hxx"
#include "comphelper/extract.hxx"
@@ -47,9 +47,7 @@
#include <rtl/ustrbuf.hxx>
#include <typelib/typedescription.hxx>
-#include <functional>
#include <map>
-#include <memory>
#include <boost/shared_ptr.hpp>
//........................................................................
@@ -79,26 +77,14 @@ namespace comphelper
using ::com::sun::star::beans::Pair;
using ::com::sun::star::uno::TypeClass;
using ::com::sun::star::uno::TypeClass_VOID;
- using ::com::sun::star::uno::TypeClass_CHAR;
- using ::com::sun::star::uno::TypeClass_BOOLEAN;
- using ::com::sun::star::uno::TypeClass_BYTE;
- using ::com::sun::star::uno::TypeClass_SHORT;
- using ::com::sun::star::uno::TypeClass_UNSIGNED_SHORT;
- using ::com::sun::star::uno::TypeClass_LONG;
- using ::com::sun::star::uno::TypeClass_UNSIGNED_LONG;
- using ::com::sun::star::uno::TypeClass_HYPER;
- using ::com::sun::star::uno::TypeClass_UNSIGNED_HYPER;
- using ::com::sun::star::uno::TypeClass_FLOAT;
- using ::com::sun::star::uno::TypeClass_DOUBLE;
- using ::com::sun::star::uno::TypeClass_STRING;
- using ::com::sun::star::uno::TypeClass_TYPE;
- using ::com::sun::star::uno::TypeClass_ENUM;
- using ::com::sun::star::uno::TypeClass_INTERFACE;
using ::com::sun::star::uno::TypeClass_UNKNOWN;
using ::com::sun::star::uno::TypeClass_ANY;
using ::com::sun::star::uno::TypeClass_EXCEPTION;
using ::com::sun::star::uno::TypeClass_STRUCT;
using ::com::sun::star::uno::TypeClass_UNION;
+ using ::com::sun::star::uno::TypeClass_FLOAT;
+ using ::com::sun::star::uno::TypeClass_DOUBLE;
+ using ::com::sun::star::uno::TypeClass_INTERFACE;
using ::com::sun::star::lang::XServiceInfo;
using ::com::sun::star::uno::XComponentContext;
using ::com::sun::star::container::XEnumeration;
@@ -108,136 +94,6 @@ namespace comphelper
/** === end UNO using === **/
//====================================================================
- //= IKeyPredicateLess
- //====================================================================
- class SAL_NO_VTABLE IKeyPredicateLess
- {
- public:
- virtual bool isLess( const Any& _lhs, const Any& _rhs ) const = 0;
- virtual ~IKeyPredicateLess() {}
- };
-
- //====================================================================
- //= LessPredicateAdapter
- //====================================================================
- struct LessPredicateAdapter : public ::std::binary_function< Any, Any, bool >
- {
- LessPredicateAdapter( const IKeyPredicateLess& _predicate )
- :m_predicate( _predicate )
- {
- }
-
- bool operator()( const Any& _lhs, const Any& _rhs ) const
- {
- return m_predicate.isLess( _lhs, _rhs );
- }
-
- private:
- const IKeyPredicateLess& m_predicate;
-
- private:
- LessPredicateAdapter(); // never implemented
- };
-
- //====================================================================
- //= ScalarPredicateLess
- //====================================================================
- template< typename SCALAR >
- class ScalarPredicateLess : public IKeyPredicateLess
- {
- public:
- virtual bool isLess( const Any& _lhs, const Any& _rhs ) const
- {
- SCALAR lhs(0), rhs(0);
- if ( !( _lhs >>= lhs )
- || !( _rhs >>= rhs )
- )
- throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported key type." ) ), NULL, 1 );
- return lhs < rhs;
- }
- };
-
- //====================================================================
- //= StringPredicateLess
- //====================================================================
- class StringPredicateLess : public IKeyPredicateLess
- {
- public:
- virtual bool isLess( const Any& _lhs, const Any& _rhs ) const
- {
- ::rtl::OUString lhs, rhs;
- if ( !( _lhs >>= lhs )
- || !( _rhs >>= rhs )
- )
- throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported key type." ) ), NULL, 1 );
- return lhs < rhs;
- }
- };
-
- //====================================================================
- //= TypePredicateLess
- //====================================================================
- class TypePredicateLess : public IKeyPredicateLess
- {
- public:
- virtual bool isLess( const Any& _lhs, const Any& _rhs ) const
- {
- Type lhs, rhs;
- if ( !( _lhs >>= lhs )
- || !( _rhs >>= rhs )
- )
- throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported key type." ) ), NULL, 1 );
- return lhs.getTypeName() < rhs.getTypeName();
- }
- };
-
- //====================================================================
- //= EnumPredicateLess
- //====================================================================
- class EnumPredicateLess : public IKeyPredicateLess
- {
- public:
- EnumPredicateLess( const Type& _enumType )
- :m_enumType( _enumType )
- {
- }
-
- virtual bool isLess( const Any& _lhs, const Any& _rhs ) const
- {
- sal_Int32 lhs(0), rhs(0);
- if ( !::cppu::enum2int( lhs, _lhs )
- || !::cppu::enum2int( rhs, _rhs )
- || !_lhs.getValueType().equals( m_enumType )
- || !_rhs.getValueType().equals( m_enumType )
- )
- throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported key type." ) ), NULL, 1 );
- return lhs < rhs;
- }
-
- private:
- const Type m_enumType;
- };
-
- //====================================================================
- //= InterfacePredicateLess
- //====================================================================
- class InterfacePredicateLess : public IKeyPredicateLess
- {
- public:
- virtual bool isLess( const Any& _lhs, const Any& _rhs ) const
- {
- if ( ( _lhs.getValueTypeClass() != TypeClass_INTERFACE )
- || ( _rhs.getValueTypeClass() != TypeClass_INTERFACE )
- )
- throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported key type." ) ), NULL, 1 );
-
- Reference< XInterface > lhs( _lhs, UNO_QUERY );
- Reference< XInterface > rhs( _rhs, UNO_QUERY );
- return lhs.get() < rhs.get();
- }
- };
-
- //====================================================================
//= MapData
//====================================================================
class IMapModificationListener;
@@ -549,58 +405,9 @@ namespace comphelper
throw IllegalTypeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported value type." ) ), *this );
// create the comparator for the KeyType, and throw if the type is not supported
- TypeClass eKeyTypeClass = aKeyType.getTypeClass();
- ::std::auto_ptr< IKeyPredicateLess > pComparator;
- switch ( eKeyTypeClass )
- {
- case TypeClass_CHAR:
- pComparator.reset( new ScalarPredicateLess< sal_Unicode >() );
- break;
- case TypeClass_BOOLEAN:
- pComparator.reset( new ScalarPredicateLess< sal_Bool >() );
- break;
- case TypeClass_BYTE:
- pComparator.reset( new ScalarPredicateLess< sal_Int8 >() );
- break;
- case TypeClass_SHORT:
- pComparator.reset( new ScalarPredicateLess< sal_Int16 >() );
- break;
- case TypeClass_UNSIGNED_SHORT:
- pComparator.reset( new ScalarPredicateLess< sal_uInt16 >() );
- break;
- case TypeClass_LONG:
- pComparator.reset( new ScalarPredicateLess< sal_Int32 >() );
- break;
- case TypeClass_UNSIGNED_LONG:
- pComparator.reset( new ScalarPredicateLess< sal_uInt32 >() );
- break;
- case TypeClass_HYPER:
- pComparator.reset( new ScalarPredicateLess< sal_Int64 >() );
- break;
- case TypeClass_UNSIGNED_HYPER:
- pComparator.reset( new ScalarPredicateLess< sal_uInt64 >() );
- break;
- case TypeClass_FLOAT:
- pComparator.reset( new ScalarPredicateLess< float >() );
- break;
- case TypeClass_DOUBLE:
- pComparator.reset( new ScalarPredicateLess< double >() );
- break;
- case TypeClass_STRING:
- pComparator.reset( new StringPredicateLess() );
- break;
- case TypeClass_TYPE:
- pComparator.reset( new TypePredicateLess() );
- break;
- case TypeClass_ENUM:
- pComparator.reset( new EnumPredicateLess( aKeyType ) );
- break;
- case TypeClass_INTERFACE:
- pComparator.reset( new InterfacePredicateLess() );
- break;
- default:
+ ::std::auto_ptr< IKeyPredicateLess > pComparator( getStandardLessPredicate( aKeyType, NULL ) );
+ if ( !pComparator.get() )
throw IllegalTypeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported key type." ) ), *this );
- }
// init members
m_aData.m_aKeyType = aKeyType;
diff --git a/comphelper/source/misc/anycompare.cxx b/comphelper/source/misc/anycompare.cxx
new file mode 100755
index 000000000000..a86174daf08e
--- /dev/null
+++ b/comphelper/source/misc/anycompare.cxx
@@ -0,0 +1,131 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_comphelper.hxx"
+
+#include "comphelper/anycompare.hxx"
+
+/** === begin UNO includes === **/
+/** === end UNO includes === **/
+
+//......................................................................................................................
+namespace comphelper
+{
+//......................................................................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::uno::TypeClass_CHAR;
+ using ::com::sun::star::uno::TypeClass_BOOLEAN;
+ using ::com::sun::star::uno::TypeClass_BYTE;
+ using ::com::sun::star::uno::TypeClass_SHORT;
+ using ::com::sun::star::uno::TypeClass_UNSIGNED_SHORT;
+ using ::com::sun::star::uno::TypeClass_LONG;
+ using ::com::sun::star::uno::TypeClass_UNSIGNED_LONG;
+ using ::com::sun::star::uno::TypeClass_HYPER;
+ using ::com::sun::star::uno::TypeClass_UNSIGNED_HYPER;
+ using ::com::sun::star::uno::TypeClass_FLOAT;
+ using ::com::sun::star::uno::TypeClass_DOUBLE;
+ using ::com::sun::star::uno::TypeClass_STRING;
+ using ::com::sun::star::uno::TypeClass_TYPE;
+ using ::com::sun::star::uno::TypeClass_ENUM;
+ using ::com::sun::star::uno::TypeClass_INTERFACE;
+ using ::com::sun::star::i18n::XCollator;
+ /** === end UNO using === **/
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::std::auto_ptr< IKeyPredicateLess > getStandardLessPredicate( Type const & i_type, Reference< XCollator > const & i_collator )
+ {
+ ::std::auto_ptr< IKeyPredicateLess > pComparator;
+ switch ( i_type.getTypeClass() )
+ {
+ case TypeClass_CHAR:
+ pComparator.reset( new ScalarPredicateLess< sal_Unicode >() );
+ break;
+ case TypeClass_BOOLEAN:
+ pComparator.reset( new ScalarPredicateLess< sal_Bool >() );
+ break;
+ case TypeClass_BYTE:
+ pComparator.reset( new ScalarPredicateLess< sal_Int8 >() );
+ break;
+ case TypeClass_SHORT:
+ pComparator.reset( new ScalarPredicateLess< sal_Int16 >() );
+ break;
+ case TypeClass_UNSIGNED_SHORT:
+ pComparator.reset( new ScalarPredicateLess< sal_uInt16 >() );
+ break;
+ case TypeClass_LONG:
+ pComparator.reset( new ScalarPredicateLess< sal_Int32 >() );
+ break;
+ case TypeClass_UNSIGNED_LONG:
+ pComparator.reset( new ScalarPredicateLess< sal_uInt32 >() );
+ break;
+ case TypeClass_HYPER:
+ pComparator.reset( new ScalarPredicateLess< sal_Int64 >() );
+ break;
+ case TypeClass_UNSIGNED_HYPER:
+ pComparator.reset( new ScalarPredicateLess< sal_uInt64 >() );
+ break;
+ case TypeClass_FLOAT:
+ pComparator.reset( new ScalarPredicateLess< float >() );
+ break;
+ case TypeClass_DOUBLE:
+ pComparator.reset( new ScalarPredicateLess< double >() );
+ break;
+ case TypeClass_STRING:
+ if ( i_collator.is() )
+ pComparator.reset( new StringCollationPredicateLess( i_collator ) );
+ else
+ pComparator.reset( new StringPredicateLess() );
+ break;
+ case TypeClass_TYPE:
+ pComparator.reset( new TypePredicateLess() );
+ break;
+ case TypeClass_ENUM:
+ pComparator.reset( new EnumPredicateLess( i_type ) );
+ break;
+ case TypeClass_INTERFACE:
+ pComparator.reset( new InterfacePredicateLess() );
+ break;
+ default:
+ break;
+ }
+ return pComparator;
+ }
+
+//......................................................................................................................
+} // namespace comphelper
+//......................................................................................................................
diff --git a/comphelper/source/misc/makefile.mk b/comphelper/source/misc/makefile.mk
deleted file mode 100644
index 0bb4defb4165..000000000000
--- a/comphelper/source/misc/makefile.mk
+++ /dev/null
@@ -1,100 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-PRJNAME=comphelper
-TARGET=misc
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings ----------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files -------------------------------------
-
-SLOFILES= \
- $(SLO)$/accessiblecomponenthelper.obj \
- $(SLO)$/accessiblecontexthelper.obj \
- $(SLO)$/accessibleeventbuffer.obj \
- $(SLO)$/accessibleeventnotifier.obj \
- $(SLO)$/accessiblekeybindinghelper.obj \
- $(SLO)$/accessibleselectionhelper.obj \
- $(SLO)$/accessibletexthelper.obj \
- $(SLO)$/accessiblewrapper.obj \
- $(SLO)$/accimplaccess.obj \
- $(SLO)$/anytostring.obj \
- $(SLO)$/asyncnotification.obj \
- $(SLO)$/componentcontext.obj \
- $(SLO)$/componentmodule.obj \
- $(SLO)$/configurationhelper.obj \
- $(SLO)$/docpasswordhelper.obj \
- $(SLO)$/docpasswordrequest.obj \
- $(SLO)$/documentinfo.obj \
- $(SLO)$/evtmethodhelper.obj \
- $(SLO)$/documentiologring.obj \
- $(SLO)$/evtlistenerhlp.obj \
- $(SLO)$/ihwrapnofilter.obj \
- $(SLO)$/instancelocker.obj \
- $(SLO)$/interaction.obj \
- $(SLO)$/legacysingletonfactory.obj \
- $(SLO)$/listenernotification.obj \
- $(SLO)$/locale.obj \
- $(SLO)$/logging.obj \
- $(SLO)$/mediadescriptor.obj \
- $(SLO)$/mimeconfighelper.obj \
- $(SLO)$/namedvaluecollection.obj \
- $(SLO)$/numberedcollection.obj \
- $(SLO)$/numbers.obj \
- $(SLO)$/officeresourcebundle.obj \
- $(SLO)$/officerestartmanager.obj \
- $(SLO)$/proxyaggregation.obj \
- $(SLO)$/regpathhelper.obj \
- $(SLO)$/scopeguard.obj \
- $(SLO)$/SelectionMultiplex.obj \
- $(SLO)$/sequenceashashmap.obj \
- $(SLO)$/sequence.obj \
- $(SLO)$/servicedecl.obj \
- $(SLO)$/serviceinfohelper.obj \
- $(SLO)$/sharedmutex.obj \
- $(SLO)$/synchronousdispatch.obj \
- $(SLO)$/storagehelper.obj \
- $(SLO)$/string.obj \
- $(SLO)$/types.obj \
- $(SLO)$/uieventslogger.obj \
- $(SLO)$/weakeventlistener.obj \
- $(SLO)$/weak.obj \
- $(SLO)$/comphelper_module.obj \
- $(SLO)$/comphelper_services.obj \
- $(SLO)$/componentbase.obj \
- $(SLO)$/stillreadwriteinteraction.obj \
-
-# --- Targets ----------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/comphelper/source/misc/scopeguard.cxx b/comphelper/source/misc/scopeguard.cxx
index 7ce478d8bea0..ccd5b618605b 100644
--- a/comphelper/source/misc/scopeguard.cxx
+++ b/comphelper/source/misc/scopeguard.cxx
@@ -28,7 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_comphelper.hxx"
-#include "comphelper/scopeguard.hxx"
+#include "comphelper/flagguard.hxx"
#include "osl/diagnose.h"
#include "com/sun/star/uno/Exception.hpp"
@@ -67,5 +67,13 @@ void ScopeGuard::dismiss()
m_func.clear();
}
+FlagGuard::~FlagGuard()
+{
+}
+
+FlagRestorationGuard::~FlagRestorationGuard()
+{
+}
+
} // namespace comphelper
diff --git a/comphelper/source/processfactory/makefile.mk b/comphelper/source/processfactory/makefile.mk
deleted file mode 100644
index 531291bb3a15..000000000000
--- a/comphelper/source/processfactory/makefile.mk
+++ /dev/null
@@ -1,52 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-PRJNAME=comphelper
-TARGET=processfactory
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings common for the whole project -----
-
-
-# --- Settings ----------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Types -------------------------------------
-
-# --- Files -------------------------------------
-
-SLOFILES= $(SLO)$/processfactory.obj \
- $(SLO)$/componentfactory.obj
-
-# --- Targets ----------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/comphelper/source/property/TypeGeneration.cxx b/comphelper/source/property/TypeGeneration.cxx
index bf880330ce75..649e50711d28 100644
--- a/comphelper/source/property/TypeGeneration.cxx
+++ b/comphelper/source/property/TypeGeneration.cxx
@@ -132,7 +132,8 @@
// --> OD 2004-08-09 #i28749#
#include <com/sun/star/drawing/HomogenMatrix3.hpp>
// <--
-#include <com/sun/star/graphic/XGraphicProvider.hpp>
+#include <com/sun/star/graphic/XGraphic.hpp>
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
using ::rtl::OUString;
using namespace ::com::sun::star;
@@ -230,6 +231,7 @@ namespace comphelper
case CPPUTYPE_SEQNAMEDVALUE: pType = &::getCppuType( (Sequence<beans::NamedValue>*)0 ); break;
case CPPUTYPE_REFXGRAPHIC: pType = &::getCppuType( (Reference< graphic::XGraphic >*)0); break;
case CPPUTYPE_TABLEBORDERDISTANCES: pType = &::getCppuType( (table::TableBorderDistances*)0 ); break;
+ case CPPUTPYE_REFEMBEDDEDOBJECT: pType = &embed::XEmbeddedObject::static_type(); break;
default:
OSL_ASSERT( "Unknown CPPU type" );
}
diff --git a/comphelper/source/property/makefile.mk b/comphelper/source/property/makefile.mk
deleted file mode 100644
index 1bcdb4c8dd63..000000000000
--- a/comphelper/source/property/makefile.mk
+++ /dev/null
@@ -1,65 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-PRJINC=..$/..$/inc
-PRJNAME=comphelper
-TARGET=property
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings ----------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files -------------------------------------
-
-SLOFILES= \
- $(SLO)$/MasterPropertySetInfo.obj \
- $(SLO)$/MasterPropertySet.obj \
- $(SLO)$/ChainablePropertySetInfo.obj \
- $(SLO)$/ChainablePropertySet.obj \
- $(SLO)$/TypeGeneration.obj \
- $(SLO)$/genericpropertyset.obj\
- $(SLO)$/propertysethelper.obj \
- $(SLO)$/propertysetinfo.obj \
- $(SLO)$/composedprops.obj \
- $(SLO)$/propagg.obj \
- $(SLO)$/property.obj \
- $(SLO)$/propmultiplex.obj \
- $(SLO)$/propstate.obj \
- $(SLO)$/propertystatecontainer.obj \
- $(SLO)$/propertycontainer.obj \
- $(SLO)$/propertycontainerhelper.obj \
- $(SLO)$/propertybag.obj \
- $(SLO)$/opropertybag.obj
-
-# --- Targets ----------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/comphelper/source/streaming/makefile.mk b/comphelper/source/streaming/makefile.mk
deleted file mode 100644
index 2a6ea38ca65e..000000000000
--- a/comphelper/source/streaming/makefile.mk
+++ /dev/null
@@ -1,54 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-PRJNAME=comphelper
-TARGET=streaming
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings ----------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files -------------------------------------
-
-SLOFILES= $(SLO)$/basicio.obj \
- $(SLO)$/oslfile2streamwrap.obj \
- $(SLO)$/seqstream.obj \
- $(SLO)$/seqinputstreamserv.obj \
- $(SLO)$/seqoutputstreamserv.obj \
- $(SLO)$/streamsection.obj \
- $(SLO)$/seekableinput.obj \
- $(SLO)$/otransactedfilestream.obj \
- $(SLO)$/memorystream.obj
-
-# --- Targets ----------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/comphelper/test/uno_iterators/makefile.mk b/comphelper/test/uno_iterators/makefile.mk
deleted file mode 100644
index 2346a0d24742..000000000000
--- a/comphelper/test/uno_iterators/makefile.mk
+++ /dev/null
@@ -1,48 +0,0 @@
-#*************************************************************************
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#***********************************************************************/
-
-PRJNAME=extensions
-PRJ=..$/..
-
-TARGET=uno_iterators
-
-ENABLE_EXCEPTIONS=TRUE
-
-.INCLUDE : settings.mk
-
-OBJFILES= \
- $(OBJ)$/uno_iterators.obj
-
-APP1TARGET=uno_iterators
-APP1OBJS= \
- $(OBJ)$/uno_iterators.obj
-APP1STDLIBS= \
- $(SALLIB) \
- $(CPPULIB) \
- $(SALHELPERLIB) \
- $(CPPUHELPERLIB)
-
-.INCLUDE : target.mk
diff --git a/comphelper/test/uno_iterators/uno_iterators.cxx b/comphelper/test/uno_iterators/uno_iterators.cxx
deleted file mode 100644
index 6f45b16cf6da..000000000000
--- a/comphelper/test/uno_iterators/uno_iterators.cxx
+++ /dev/null
@@ -1,218 +0,0 @@
-/*************************************************************************
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
-************************************************************************/
-
-#include <algorithm>
-#include <comphelper/stlunosequence.hxx>
-#include <com/sun/star/uno/Sequence.hxx>
-#include <iostream>
-#include <list>
-#include <rtl/textenc.h>
-#include <rtl/ustrbuf.hxx>
-#include <rtl/ustring.hxx>
-#include <vector>
-
-using namespace ::comphelper;
-using namespace ::com::sun::star::uno;
-using namespace ::rtl;
-using namespace ::std;
-
-// some helpers for testing (imperative)
-void fill_testdata(Sequence<OUString>& seq)
-{
- OUStringBuffer buf;
- for(sal_Int32 i=0; i<seq.getLength(); i++)
- {
- buf.appendAscii("Sampletext ");
- buf.append(i);
- seq[i] = buf.makeStringAndClear();
- }
-}
-
-void print_oustring(const OUString& ustr)
-{ cout << OUStringToOString(ustr, RTL_TEXTENCODING_ASCII_US).getStr() << endl; }
-
-void print_sequence(const Sequence<OUString>& seq)
-{
- cout << "Sequence of " << seq.getLength() << " OUStrings: " << endl;
- for(sal_Int32 i=0; i<seq.getLength(); i++)
- print_oustring(seq[i]);
- cout << endl;
-}
-
-// some helpers for testing (functional)
-class TestdataGenerator
-{
- public:
- TestdataGenerator() : m_Index(0) {};
- OUString operator()() { return m_Buf.appendAscii("Sampletext ").append(m_Index++).makeStringAndClear(); };
- OUStringBuffer m_Buf;
- sal_Int32 m_Index;
-};
-
-void fill_testdata_stl(StlUnoSequence<OUString>& stl_seq)
-{
- generate(stl_seq.begin(), stl_seq.end(), TestdataGenerator());
-}
-
-void print_sequence_stl(const StlUnoSequence<OUString>& stl_seq)
-{
- cout << "Sequence of " << stl_seq.size() << " OUStrings: " << endl;
- for_each(stl_seq.begin(), stl_seq.end(), &print_oustring);
- cout << endl;
-}
-
-
-// code samples
-
-// imperative loops (just to show they work, using for_each would be better most of the time
-void classic_loops()
-{
- Sequence<OUString> s(10);
- fill_testdata(s);
- StlUnoSequence<OUString>::iterator stl_s_it;
-
- cout << "for iteration" << endl;
- for(stl_s_it = stl_begin(s); stl_s_it != stl_end(s); stl_s_it++)
- cout << OUStringToOString(*stl_s_it, RTL_TEXTENCODING_ASCII_US).getStr() << endl;
-
- cout << "reverse for iteration" << endl;
- for(stl_s_it = stl_end(s); stl_s_it != stl_begin(s); stl_s_it--)
- cout << OUStringToOString(*(stl_s_it-1), RTL_TEXTENCODING_ASCII_US).getStr() << endl;
-
- cout << "skipping for iteration" << endl;
- for(stl_s_it = stl_begin(s); stl_s_it != stl_end(s); stl_s_it+=2)
- cout << OUStringToOString(*stl_s_it, RTL_TEXTENCODING_ASCII_US).getStr() << endl;
-
- cout << "skipping reverse for iteration" << endl;
- for(stl_s_it = stl_end(s); stl_s_it != stl_begin(s); stl_s_it-=2)
- std::cout << OUStringToOString(*(stl_s_it-1), RTL_TEXTENCODING_ASCII_US).getStr() << endl;
-}
-
-void stl_algos()
-{
- Sequence<OUString> s(10);
- fill_testdata(s);
-
- random_shuffle(stl_begin(s), stl_end(s));
- cout << "shuffed" << std::endl;
- print_sequence(s);
-
- sort(stl_begin(s), stl_end(s));
- cout << "sorted" << std::endl;
- print_sequence(s);
-}
-
-void stl_conversions()
-{
- Sequence<OUString> s(10);
- fill_testdata(s);
- StlUnoSequence<OUString> stl_s = StlUnoSequence<OUString>::createInstance(s);
-
- // convert to stl::vector, modify in vector, copy back, print
- cout << "vector conversion" << endl;
- vector<OUString> vec(stl_s.begin(), stl_s.end());
- vec[2] = OUString::createFromAscii("changed in vector");
- copy(vec.begin(), vec.end(), stl_s.begin());
- print_sequence(s);
-
- // convert to stl::list, modify in list, copy back, print
- cout << "list conversion" << endl;
- list<OUString> l(stl_s.begin(), stl_s.end());
- l.pop_back();
- l.push_back(OUString::createFromAscii("changed in list"));
- copy(l.begin(), l.end(), stl_s.begin());
- print_sequence(s);
-}
-
-// inserts the second half of the second sequence after the first element of the first sequence
-void stl_inserting()
-{
- Sequence<OUString> s1(10);
- Sequence<OUString> s2(10);
- Sequence<OUString> result(15);
- StlUnoSequence<OUString> stl_s1 = StlUnoSequence<OUString>::createInstance(s1);
- StlUnoSequence<OUString> stl_s2 = StlUnoSequence<OUString>::createInstance(s2);
- StlUnoSequence<OUString> stl_result = StlUnoSequence<OUString>::createInstance(result);
- fill_testdata(s1);
- fill_testdata(s2);
-
- list<OUString> temp(stl_s1.begin(), stl_s1.end());
- copy(stl_s2.begin()+5, stl_s2.end(), insert_iterator<list<OUString> >(temp, ++temp.begin()));
- copy(temp.begin(), temp.end(), stl_result.begin());
- print_sequence(result);
-}
-
-void stl_compare()
-{
- Sequence<OUString> s1(10);
- Sequence<OUString> s2(10);
- StlUnoSequence<OUString> stl_s1 = StlUnoSequence<OUString>::createInstance(s1);
- StlUnoSequence<OUString> stl_s2 = StlUnoSequence<OUString>::createInstance(s2);
- if (stl_s1 == stl_s2)
- cout << "sequences are equal." << endl;
- s2[9] = OUString::createFromAscii("ZZZZZ");
- if(stl_s1 < stl_s2)
- cout << "first sequence is smaller." << endl;
-}
-
-void stl_const_sequence()
-{
- const Sequence<OUString> s(10);
- for(StlUnoSequence<OUString>::const_iterator stl_s_it = stl_begin(s); stl_s_it != stl_end(s); stl_s_it++)
- cout << OUStringToOString(*stl_s_it, RTL_TEXTENCODING_ASCII_US).getStr() << endl;
-}
-
-void stl_helpers()
-{
- Sequence<OUString> s(10);
- StlUnoSequence<OUString> stl_s = StlUnoSequence<OUString>::createInstance(s);
- fill_testdata_stl(stl_s);
- print_sequence_stl(stl_s);
-}
-
-int main()
-{
- cout << "--- CLASSIC LOOPS" << endl;
- classic_loops();
-
- cout << "--- SOME STL ALGORITHMS" << endl;
- stl_algos();
-
- cout << "--- SOME STL CONVERSIONS" << endl;
- stl_conversions();
-
- cout << "--- INSERTING IN SEQUENCE" << endl;
- stl_inserting();
-
- cout << "--- COMPARING" << endl;
- stl_compare();
-
- cout << "--- CONST SEQUENCE" << endl;
- stl_const_sequence();
-
- cout << "--- HELPERS IN STL-STYLE" << endl;
- stl_helpers();
-}
diff --git a/comphelper/util/comphelp4.component b/comphelper/util/comphelp.component
index 10d23d48bcea..10d23d48bcea 100644
--- a/comphelper/util/comphelp4.component
+++ b/comphelper/util/comphelp.component
diff --git a/comphelper/util/exports.dxp b/comphelper/util/exports.dxp
deleted file mode 100644
index 0cb5620a1603..000000000000
--- a/comphelper/util/exports.dxp
+++ /dev/null
@@ -1,2 +0,0 @@
-component_getImplementationEnvironment
-component_getFactory \ No newline at end of file
diff --git a/comphelper/util/makefile.mk b/comphelper/util/makefile.mk
deleted file mode 100644
index 62e66672a1cb..000000000000
--- a/comphelper/util/makefile.mk
+++ /dev/null
@@ -1,78 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..
-PRJNAME=comphelper
-TARGET=comphelper
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/version.mk
-
-# --- Library -----------------------------------
-
-LIB1TARGET= $(SLB)$/$(TARGET).lib
-LIB1FILES= $(SLB)$/container.lib \
- $(SLB)$/evtattmgr.lib \
- $(SLB)$/misc.lib \
- $(SLB)$/processfactory.lib \
- $(SLB)$/property.lib \
- $(SLB)$/streaming.lib \
- $(SLB)$/compare.lib \
- $(SLB)$/officeinstdir.lib \
- $(SLB)$/xml.lib
-
-SHL1TARGET=$(COMPHLP_TARGET)$(COMPHLP_MAJOR)$(COMID)
-.IF "$(GUI)" == "OS2"
-SHL1TARGET=comph$(COMPHLP_MAJOR)
-.ENDIF
-SHL1STDLIBS= \
- $(SALLIB) \
- $(CPPUHELPERLIB) \
- $(CPPULIB) \
- $(UCBHELPERLIB) \
- $(VOSLIB)
-
-SHL1DEPN=
-SHL1IMPLIB= i$(COMPHLP_TARGET)
-SHL1USE_EXPORTS=name
-SHL1LIBS= $(LIB1TARGET)
-SHL1DEF= $(MISC)$/$(SHL1TARGET).def
-
-DEF1NAME= $(SHL1TARGET)
-DEFLIB1NAME=$(TARGET)
-
-# --- Targets ----------------------------------
-
-.INCLUDE : target.mk
-
-ALLTAR : $(MISC)/comphelp4.component
-
-$(MISC)/comphelp4.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
- comphelp4.component
- $(XSLTPROC) --nonet --stringparam uri \
- '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
- $(SOLARENV)/bin/createcomponent.xslt comphelp4.component
diff --git a/cppcanvas/source/inc/implrenderer.hxx b/cppcanvas/source/inc/implrenderer.hxx
index 8c1f7941abc4..c3613af135a9 100644
--- a/cppcanvas/source/inc/implrenderer.hxx
+++ b/cppcanvas/source/inc/implrenderer.hxx
@@ -134,7 +134,7 @@ namespace cppcanvas
bool isActionContained( GDIMetaFile& rMtf,
const char* pCommentString,
- USHORT nType ) const;
+ sal_uInt16 nType ) const;
void createGradientAction( const ::PolyPolygon& rPoly,
const ::Gradient& rGradient,
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 006d55a01de6..e8a6468611f7 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -143,7 +143,7 @@ namespace
}
void pushState( ::cppcanvas::internal::VectorOfOutDevStates& rStates,
- USHORT nFlags )
+ sal_uInt16 nFlags )
{
rStates.push_back( getState( rStates ) );
getState( rStates ).pushFlags = nFlags;
@@ -447,7 +447,7 @@ namespace
// translate characters to local preference
sal_Unicode cChar = getLocalizedChar( *pBegin, eTextLanguage );
if( cChar != *pBegin )
- rStr.SetChar( sal::static_int_cast<USHORT>(pBegin - pBase), cChar );
+ rStr.SetChar( sal::static_int_cast<sal_uInt16>(pBegin - pBase), cChar );
}
}
}
@@ -522,7 +522,7 @@ namespace cppcanvas
bool ImplRenderer::isActionContained( GDIMetaFile& rMtf,
const char* pCommentString,
- USHORT nType ) const
+ sal_uInt16 nType ) const
{
ENSURE_OR_THROW( pCommentString,
"ImplRenderer::isActionContained(): NULL string given" );
@@ -531,7 +531,7 @@ namespace cppcanvas
// at least _one_ call to GDIMetaFile::NextAction() is
// executed
- ULONG nPos( 1 );
+ sal_uIntPtr nPos( 1 );
MetaAction* pCurrAct;
while( (pCurrAct=rMtf.NextAction()) != NULL )
@@ -582,7 +582,7 @@ namespace cppcanvas
// decide, whether this gradient can be rendered natively
// by the canvas, or must be emulated via VCL gradient
// action extraction.
- const USHORT nSteps( rGradient.GetSteps() );
+ const sal_uInt16 nSteps( rGradient.GetSteps() );
if( // step count is infinite, can use native canvas
// gradients here
@@ -607,17 +607,17 @@ namespace cppcanvas
// ----------------------------
// scale color coefficients with gradient intensities
- const USHORT nStartIntensity( rGradient.GetStartIntensity() );
+ const sal_uInt16 nStartIntensity( rGradient.GetStartIntensity() );
::Color aVCLStartColor( rGradient.GetStartColor() );
- aVCLStartColor.SetRed( (UINT8)(aVCLStartColor.GetRed() * nStartIntensity / 100) );
- aVCLStartColor.SetGreen( (UINT8)(aVCLStartColor.GetGreen() * nStartIntensity / 100) );
- aVCLStartColor.SetBlue( (UINT8)(aVCLStartColor.GetBlue() * nStartIntensity / 100) );
+ aVCLStartColor.SetRed( (sal_uInt8)(aVCLStartColor.GetRed() * nStartIntensity / 100) );
+ aVCLStartColor.SetGreen( (sal_uInt8)(aVCLStartColor.GetGreen() * nStartIntensity / 100) );
+ aVCLStartColor.SetBlue( (sal_uInt8)(aVCLStartColor.GetBlue() * nStartIntensity / 100) );
- const USHORT nEndIntensity( rGradient.GetEndIntensity() );
+ const sal_uInt16 nEndIntensity( rGradient.GetEndIntensity() );
::Color aVCLEndColor( rGradient.GetEndColor() );
- aVCLEndColor.SetRed( (UINT8)(aVCLEndColor.GetRed() * nEndIntensity / 100) );
- aVCLEndColor.SetGreen( (UINT8)(aVCLEndColor.GetGreen() * nEndIntensity / 100) );
- aVCLEndColor.SetBlue( (UINT8)(aVCLEndColor.GetBlue() * nEndIntensity / 100) );
+ aVCLEndColor.SetRed( (sal_uInt8)(aVCLEndColor.GetRed() * nEndIntensity / 100) );
+ aVCLEndColor.SetGreen( (sal_uInt8)(aVCLEndColor.GetGreen() * nEndIntensity / 100) );
+ aVCLEndColor.SetBlue( (sal_uInt8)(aVCLEndColor.GetBlue() * nEndIntensity / 100) );
uno::Reference<rendering::XColorSpace> xColorSpace(
rParms.mrCanvas->getUNOCanvas()->getDevice()->getDeviceColorSpace());
@@ -682,10 +682,23 @@ namespace cppcanvas
case GRADIENT_AXIAL:
{
- basegfx::tools::createLinearODFGradientInfo(aGradInfo,
+ // Adapt the border so that it is suitable
+ // for the axial gradient. An axial
+ // gradient consists of two linear
+ // gradients. Each of those covers half
+ // of the total size. In order to
+ // compensate for the condensed display of
+ // the linear gradients, we have to
+ // enlarge the area taken up by the actual
+ // gradient (1-fBorder). After that we
+ // have to turn the result back into a
+ // border value, hence the second (left
+ // most 1-...
+ const double fAxialBorder (1-2*(1-fBorder));
+ basegfx::tools::createAxialODFGradientInfo(aGradInfo,
aBounds,
nSteps,
- fBorder,
+ fAxialBorder,
fRotation);
// map odf to svg gradient orientation - x
// instead of y direction
@@ -1531,9 +1544,9 @@ namespace cppcanvas
(sal_Int8)rFont.GetUnderline();
rState.textStrikeoutStyle = (sal_Int8)rFont.GetStrikeout();
rState.textEmphasisMarkStyle = (sal_Int8)rFont.GetEmphasisMark();
- rState.isTextEffectShadowSet = (rFont.IsShadow() != FALSE);
- rState.isTextWordUnderlineSet = (rFont.IsWordLineMode() != FALSE);
- rState.isTextOutlineModeSet = (rFont.IsOutline() != FALSE);
+ rState.isTextEffectShadowSet = (rFont.IsShadow() != sal_False);
+ rState.isTextWordUnderlineSet = (rFont.IsWordLineMode() != sal_False);
+ rState.isTextOutlineModeSet = (rFont.IsOutline() != sal_False);
}
break;
@@ -1695,7 +1708,7 @@ namespace cppcanvas
// Handle drawing layer fills
else if( pAct->GetComment().Equals( "XPATHFILL_SEQ_BEGIN" ) )
{
- const BYTE* pData = pAct->GetData();
+ const sal_uInt8* pData = pAct->GetData();
if ( pData )
{
SvMemoryStream aMemStm( (void*)pData, pAct->GetDataSize(), STREAM_READ );
@@ -2496,7 +2509,7 @@ namespace cppcanvas
pAct->GetPoint(),
sText,
pAct->GetIndex(),
- pAct->GetLen() == (USHORT)STRING_LEN ? pAct->GetText().Len() - pAct->GetIndex() : pAct->GetLen(),
+ pAct->GetLen() == (sal_uInt16)STRING_LEN ? pAct->GetText().Len() - pAct->GetIndex() : pAct->GetLen(),
NULL,
rFactoryParms,
bSubsettableActions );
@@ -2515,7 +2528,7 @@ namespace cppcanvas
pAct->GetPoint(),
sText,
pAct->GetIndex(),
- pAct->GetLen() == (USHORT)STRING_LEN ? pAct->GetText().Len() - pAct->GetIndex() : pAct->GetLen(),
+ pAct->GetLen() == (sal_uInt16)STRING_LEN ? pAct->GetText().Len() - pAct->GetIndex() : pAct->GetLen(),
pAct->GetDXArray(),
rFactoryParms,
bSubsettableActions );
@@ -2590,7 +2603,7 @@ namespace cppcanvas
if( rVDev.GetDigitLanguage())
convertToLocalizedNumerals ( sText,rVDev.GetDigitLanguage() );
- const USHORT nLen( pAct->GetLen() == (USHORT)STRING_LEN ?
+ const sal_uInt16 nLen( pAct->GetLen() == (sal_uInt16)STRING_LEN ?
pAct->GetText().Len() - pAct->GetIndex() : pAct->GetLen() );
// #i70897# Nothing to do, actually...
@@ -2611,7 +2624,7 @@ namespace cppcanvas
// Last entry of pDXArray contains total width of the text
sal_Int32* p=pDXArray.get();
- for( USHORT i=1; i<=nLen; ++i )
+ for( sal_uInt16 i=1; i<=nLen; ++i )
{
// calc ratio for every array entry, to
// distribute rounding errors 'evenly'
@@ -2626,7 +2639,7 @@ namespace cppcanvas
pAct->GetPoint(),
sText,
pAct->GetIndex(),
- pAct->GetLen() == (USHORT)STRING_LEN ? pAct->GetText().Len() - pAct->GetIndex() : pAct->GetLen(),
+ pAct->GetLen() == (sal_uInt16)STRING_LEN ? pAct->GetText().Len() - pAct->GetIndex() : pAct->GetLen(),
pDXArray.get(),
rFactoryParms,
bSubsettableActions );
@@ -2901,7 +2914,7 @@ namespace cppcanvas
VectorOfOutDevStates aStateStack;
VirtualDevice aVDev;
- aVDev.EnableOutput( FALSE );
+ aVDev.EnableOutput( sal_False );
// Setup VDev for state tracking and mapping
// =========================================
diff --git a/cppcanvas/source/mtfrenderer/mtftools.cxx b/cppcanvas/source/mtfrenderer/mtftools.cxx
index 2d165eca4d38..9860f1d1cd7d 100644
--- a/cppcanvas/source/mtfrenderer/mtftools.cxx
+++ b/cppcanvas/source/mtfrenderer/mtftools.cxx
@@ -306,14 +306,14 @@ namespace cppcanvas
TextLineInfo createTextLineInfo( const ::VirtualDevice& rVDev,
const ::cppcanvas::internal::OutDevState& rState )
{
- const BOOL bOldMode( rVDev.IsMapModeEnabled() );
+ const sal_Bool bOldMode( rVDev.IsMapModeEnabled() );
// #i68512# Force metric regeneration with mapmode enabled
// (prolly OutDev bug)
rVDev.GetFontMetric();
// will restore map mode below
- const_cast< ::VirtualDevice& >(rVDev).EnableMapMode( FALSE );
+ const_cast< ::VirtualDevice& >(rVDev).EnableMapMode( sal_False );
const ::FontMetric aMetric = rVDev.GetFontMetric();
diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx b/cppcanvas/source/mtfrenderer/textaction.cxx
index 56ce197b7e8e..30aecef24206 100644
--- a/cppcanvas/source/mtfrenderer/textaction.cxx
+++ b/cppcanvas/source/mtfrenderer/textaction.cxx
@@ -212,8 +212,8 @@ namespace cppcanvas
::boost::scoped_array< sal_Int32 > pCharWidths( new sal_Int32[nLen] );
rVDev.GetTextArray( rText, pCharWidths.get(),
- static_cast<USHORT>(nStartPos),
- static_cast<USHORT>(nLen) );
+ static_cast<sal_uInt16>(nStartPos),
+ static_cast<sal_uInt16>(nLen) );
return setupDXArray( pCharWidths.get(), nLen, rState );
}
@@ -287,8 +287,8 @@ namespace cppcanvas
{
// TODO(F2): use correct scale direction
const ::basegfx::B2DSize aSize( rVDev.GetTextWidth( rStringContext.Text,
- static_cast<USHORT>(rStringContext.StartPosition),
- static_cast<USHORT>(rStringContext.Length) ),
+ static_cast<sal_uInt16>(rStringContext.StartPosition),
+ static_cast<sal_uInt16>(rStringContext.Length) ),
0 );
return (rState.mapModeTransform * aSize).getX();
@@ -1994,10 +1994,10 @@ namespace cppcanvas
::basegfx::B2DPolyPolygon aResultingPolyPolygon;
PolyPolyVector aVCLPolyPolyVector;
const bool bHaveOutlines( rVDev.GetTextOutlines( aVCLPolyPolyVector, rText,
- static_cast<USHORT>(nStartPos),
- static_cast<USHORT>(nStartPos),
- static_cast<USHORT>(nLen),
- TRUE, 0, pDXArray ) );
+ static_cast<sal_uInt16>(nStartPos),
+ static_cast<sal_uInt16>(nStartPos),
+ static_cast<sal_uInt16>(nLen),
+ sal_True, 0, pDXArray ) );
rVDev.SetFont(aOrigFont);
if( !bHaveOutlines )
diff --git a/cppcanvas/source/wrapper/vclfactory.cxx b/cppcanvas/source/wrapper/vclfactory.cxx
index 7983f081b2a9..bc80afaa92cd 100644
--- a/cppcanvas/source/wrapper/vclfactory.cxx
+++ b/cppcanvas/source/wrapper/vclfactory.cxx
@@ -295,7 +295,7 @@ namespace cppcanvas
if( !pSpriteCanvas )
return SpriteSharedPtr();
- const USHORT nBitmaps( rAnim.Count() );
+ const sal_uInt16 nBitmaps( rAnim.Count() );
uno::Sequence< uno::Reference< rendering::XBitmap > > aBitmapSequence( nBitmaps );
uno::Reference< rendering::XBitmap >* pBitmaps = aBitmapSequence.getArray();
@@ -310,7 +310,7 @@ namespace cppcanvas
for( i=0; i<nBitmaps; ++i )
{
- const AnimationBitmap& rAnimBmp( rAnim.Get((USHORT)i) );
+ const AnimationBitmap& rAnimBmp( rAnim.Get((sal_uInt16)i) );
// Handle dispose according to GIF spec: a
// DISPOSE_PREVIOUS does _not_ mean to revert to the
diff --git a/i18npool/inc/i18npool/lang.h b/i18npool/inc/i18npool/lang.h
index 52e4e51d7a41..5d9c3cee878c 100644
--- a/i18npool/inc/i18npool/lang.h
+++ b/i18npool/inc/i18npool/lang.h
@@ -515,6 +515,11 @@ typedef unsigned short LanguageType;
#define LANGUAGE_USER_GIKUYU 0x0655
#define LANGUAGE_USER_RUSYN_UKRAINE 0x0656
#define LANGUAGE_USER_RUSYN_SLOVAKIA 0x8256 /* makeLangID( 0x20, getPrimaryLanguage( LANGUAGE_USER_RUSYN_UKRAINE)) */
+#define LANGUAGE_USER_YIDDISH_US 0x083D /* makeLangID( 0x20, getPrimaryLanguage( LANGUAGE_YIDDISH)) */
+#define LANGUAGE_USER_LIMBU 0x0657
+#define LANGUAGE_USER_LOJBAN 0x0658 /* no locale */
+#define LANGUAGE_USER_KABYLE 0x0659
+#define LANGUAGE_USER_HAITIAN 0x065A
#endif /* INCLUDED_I18NPOOL_LANG_H */
diff --git a/i18npool/inc/i18npool/paper.hxx b/i18npool/inc/i18npool/paper.hxx
index 76aebbe473d5..f0a7d76931b7 100644
--- a/i18npool/inc/i18npool/paper.hxx
+++ b/i18npool/inc/i18npool/paper.hxx
@@ -34,6 +34,10 @@
#include <rtl/string.hxx>
#include <com/sun/star/lang/Locale.hpp>
+//!! WARNING: be aware of cui/source/tabpages/page.h where someone had the broken idea
+//!! of duplicating the values of this enum in order to use those defines within
+//!! src files.
+//!! Thus don't reorder the enum values here without changing the code there as well.
enum Paper
{
PAPER_A0,
@@ -116,6 +120,9 @@ enum Paper
PAPER_ARCHE
};
+// defined for 'equal size' test with the implementation array
+#define NUM_PAPER_ENTRIES (PAPER_ARCHE - PAPER_A0 + 1)
+
// ---------
// - Paper -
// ---------
diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx
index d22203d100c7..19b175d4bd83 100644
--- a/i18npool/source/breakiterator/breakiteratorImpl.cxx
+++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx
@@ -448,6 +448,10 @@ typedef struct {
sal_Int16 script;
} UBlock2Script;
+// for a list of the UBLOCK_... values see:
+// http://icu-project.org/apiref/icu4c/uchar_8h.html
+// where enum UBlockCode is defined.
+// See also http://www.unicode.org/charts/ for general reference
static UBlock2Script scriptList[] = {
{UBLOCK_NO_BLOCK, UBLOCK_NO_BLOCK, ScriptType::WEAK},
{UBLOCK_BASIC_LATIN, UBLOCK_ARMENIAN, ScriptType::LATIN},
diff --git a/i18npool/source/breakiterator/makefile.mk b/i18npool/source/breakiterator/makefile.mk
index f3088125ecf1..fc6561c3e0aa 100644
--- a/i18npool/source/breakiterator/makefile.mk
+++ b/i18npool/source/breakiterator/makefile.mk
@@ -79,7 +79,17 @@ GENBRK:=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)$/genbrk
GENCCODE:=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)$/genccode
.ENDIF
-$(MISC)$/%.brk : data/%.txt
+.INCLUDE .IGNORE : icuversion.mk
+
+$(MISC)$/%.txt : data/%.txt
+# fdo#31271 ")" reclassified in more recent ICU/Unicode Standards
+.IF "$(ICU_MAJOR)" >= "5" || ("$(ICU_MAJOR)" == "4" && "$(ICU_MINOR)" >= "4")
+ $(SED) "s#\[:LineBreak = Close_Punctuation:\]#\[\[:LineBreak = Close_Punctuation:\] \[:LineBreak = Close_Parenthesis:\]\]#" $< > $@
+.ELSE
+ $(COPY) $< $@
+.ENDIF
+
+$(MISC)$/%.brk : $(MISC)/%.txt
$(WRAPCMD) $(GENBRK) -r $< -o $(MISC)$/$*.brk
$(MISC)$/%_brk.c : $(MISC)$/%.brk
diff --git a/i18npool/source/calendar/calendar_gregorian.cxx b/i18npool/source/calendar/calendar_gregorian.cxx
index 727a6f601ba3..0ba91c0587d8 100644
--- a/i18npool/source/calendar/calendar_gregorian.cxx
+++ b/i18npool/source/calendar/calendar_gregorian.cxx
@@ -1003,9 +1003,11 @@ Calendar_gregorian::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16
sprintf(aStr, "%02d", value); // #100211# - checked
break;
case CalendarDisplayCode::SHORT_YEAR:
- // Take last 2 digits, or only one if vallue<10, for example,
+ // Take last 2 digits, or only one if value<10, for example,
// in case of the Gengou calendar.
- if (value < 100)
+ // #i116701# For values in non-Gregorian era years use all
+ // digits.
+ if (value < 100 || eraArray)
sprintf(aStr, "%d", value); // #100211# - checked
else
sprintf(aStr, "%02d", value % 100); // #100211# - checked
diff --git a/i18npool/source/isolang/isolang.cxx b/i18npool/source/isolang/isolang.cxx
index 357be80a69ea..78a66c1cc79e 100644
--- a/i18npool/source/isolang/isolang.cxx
+++ b/i18npool/source/isolang/isolang.cxx
@@ -292,7 +292,6 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] =
// { LANGUAGE_USER_CATALAN_VALENCIAN, "ca", "ES" }, // In case MS format files escaped into the wild, map them back.
{ LANGUAGE_FRENCH_CAMEROON, "fr", "CM" },
{ LANGUAGE_FRENCH_COTE_D_IVOIRE, "fr", "CI" },
- { LANGUAGE_FRENCH_HAITI, "fr", "HT" },
{ LANGUAGE_FRENCH_MALI, "fr", "ML" },
{ LANGUAGE_FRENCH_SENEGAL, "fr", "SN" },
{ LANGUAGE_FRENCH_ZAIRE, "fr", "CD" }, // Democratic Republic Of Congo
@@ -353,6 +352,7 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] =
{ LANGUAGE_PAPIAMENTU, "pap", "AN" },
{ LANGUAGE_USER_PAPIAMENTU_ARUBA, "pap", "AW" },
{ LANGUAGE_ENGLISH_SINGAPORE, "en", "SG" },
+ { LANGUAGE_USER_YIDDISH_US, "yi", "US" },
{ LANGUAGE_YIDDISH, "yi", "IL" }, // new: old was "ji"
{ LANGUAGE_YIDDISH, "ji", "IL" }, // old: new is "yi"
{ LANGUAGE_SYRIAC, "syr", "TR" }, // "TR" according to http://www.ethnologue.com/show_language.asp?code=SYC
@@ -461,6 +461,11 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] =
{ LANGUAGE_USER_GIKUYU, "ki", "KE" },
{ LANGUAGE_USER_RUSYN_UKRAINE, "rue", "UA" },
{ LANGUAGE_USER_RUSYN_SLOVAKIA, "rue", "SK" },
+ { LANGUAGE_USER_LIMBU, "lif", "NP" },
+ { LANGUAGE_USER_LOJBAN, "jbo", "" },
+ { LANGUAGE_USER_KABYLE, "kab", "DZ" },
+ { LANGUAGE_USER_HAITIAN, "ht", "HT" },
+ { LANGUAGE_FRENCH_HAITI, "fr", "HT" },
{ LANGUAGE_NONE, "zxx", "" }, // added to ISO 639-2 on 2006-01-11: Used to declare the absence of linguistic information
{ LANGUAGE_DONTKNOW, "", "" } // marks end of table
};
@@ -685,6 +690,7 @@ static const MsLangId::IsoLangEntry & lcl_lookupFallbackEntry( LanguageType nLan
case LANGUAGE_BASQUE:
case LANGUAGE_USER_ESPERANTO:
case LANGUAGE_USER_INTERLINGUA:
+ case LANGUAGE_USER_LOJBAN:
return *pEntry;
default:
; // nothing
@@ -765,6 +771,7 @@ static const MsLangId::IsoLangEntry & lcl_lookupFallbackEntry(
case LANGUAGE_BASQUE:
case LANGUAGE_USER_ESPERANTO:
case LANGUAGE_USER_INTERLINGUA:
+ case LANGUAGE_USER_LOJBAN:
return *pEntry;
default:
; // nothing
diff --git a/i18npool/source/isolang/mslangid.cxx b/i18npool/source/isolang/mslangid.cxx
index a03d24e6fcdb..599299951164 100644
--- a/i18npool/source/isolang/mslangid.cxx
+++ b/i18npool/source/isolang/mslangid.cxx
@@ -339,6 +339,7 @@ sal_Int16 MsLangId::getScriptType( LanguageType nLang )
case LANGUAGE_FARSI:
case LANGUAGE_HEBREW:
case LANGUAGE_YIDDISH:
+ case LANGUAGE_USER_YIDDISH_US:
case LANGUAGE_MARATHI:
case LANGUAGE_PUNJABI:
case LANGUAGE_GUJARATI:
@@ -374,6 +375,7 @@ sal_Int16 MsLangId::getScriptType( LanguageType nLang )
case LANGUAGE_USER_DOGRI_INDIA:
case LANGUAGE_USER_MAITHILI_INDIA:
case LANGUAGE_UIGHUR_CHINA:
+ case LANGUAGE_USER_LIMBU:
nScript = ::com::sun::star::i18n::ScriptType::COMPLEX;
break;
diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx
index 7a520047637d..275fdf006d9f 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -160,9 +160,11 @@ LocaleNode* LocaleNode::createNode (const OUString& name, const Reference< XAttr
// printf(" name: '%s'\n", p->getName().pData->buffer );
// printf("value: '%s'\n", p->getValue().pData->buffer );
+#define OSTR(s) (OUStringToOString( (s), RTL_TEXTENCODING_UTF8).getStr())
+
void print_OUString( const OUString& s )
{
- printf( "%s", OUStringToOString( s, RTL_TEXTENCODING_UTF8).getStr());
+ printf( "%s", OSTR(s));
}
bool is_empty( const OUString& s )
@@ -266,16 +268,16 @@ void LocaleNode :: generateCode (const OFileWriter &of) const
fprintf( stderr, "Error: less than %ld character%s (%ld) in %s '%s'.\n",
sal::static_int_cast< long >(nMinLen), (nMinLen > 1 ? "s" : ""),
sal::static_int_cast< long >(nLen),
- (pNode ? OUStringToOString( pNode->getName(), RTL_TEXTENCODING_UTF8).getStr() : ""),
- OUStringToOString( aVal, RTL_TEXTENCODING_UTF8).getStr());
+ (pNode ? OSTR( pNode->getName()) : ""),
+ OSTR( aVal));
}
else if (nLen > nMaxLen && nMaxLen >= 0)
fprintf( stderr,
"Warning: more than %ld character%s (%ld) in %s %s not supported by application.\n",
sal::static_int_cast< long >(nMaxLen), (nMaxLen > 1 ? "s" : ""),
sal::static_int_cast< long >(nLen),
- (pNode ? OUStringToOString( pNode->getName(), RTL_TEXTENCODING_UTF8).getStr() : ""),
- OUStringToOString( aVal, RTL_TEXTENCODING_UTF8).getStr());
+ (pNode ? OSTR( pNode->getName()) : ""),
+ OSTR( aVal));
return aVal;
}
@@ -306,7 +308,7 @@ void LocaleNode::incError( const char* pStr ) const
void LocaleNode::incError( const ::rtl::OUString& rStr ) const
{
- incError( OUStringToOString( rStr, RTL_TEXTENCODING_UTF8).getStr());
+ incError( OSTR( rStr));
}
char* LocaleNode::prepareErrorFormat( const char* pFormat, const char* pDefaultConversion ) const
@@ -332,8 +334,7 @@ void LocaleNode::incErrorInt( const char* pStr, int nVal ) const
void LocaleNode::incErrorStr( const char* pStr, const ::rtl::OUString& rVal ) const
{
++nError;
- fprintf( stderr, prepareErrorFormat( pStr, ": %s"), OUStringToOString(
- rVal, RTL_TEXTENCODING_UTF8).getStr());
+ fprintf( stderr, prepareErrorFormat( pStr, ": %s"), OSTR( rVal));
}
void LCInfoNode::generateCode (const OFileWriter &of) const
@@ -501,6 +502,64 @@ void LCCTYPENode::generateCode (const OFileWriter &of) const
if (aQuoteEnd == aDoubleQuoteEnd)
fprintf( stderr, "Warning: %s\n",
"QuotationEnd equals DoubleQuotationEnd. Not necessarily an error, but unusual.");
+ // Known good values, exclude ASCII single (U+0027, ') and double (U+0022, ") quotes.
+ int ic;
+ switch (ic = aQuoteStart.toChar())
+ {
+ case 0x2018: // LEFT SINGLE QUOTATION MARK
+ case 0x201a: // SINGLE LOW-9 QUOTATION MARK
+ case 0x201b: // SINGLE HIGH-REVERSED-9 QUOTATION MARK
+ case 0x2039: // SINGLE LEFT-POINTING ANGLE QUOTATION MARK
+ case 0x203a: // SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
+ case 0x300c: // LEFT CORNER BRACKET (Chinese)
+ ;
+ break;
+ default:
+ fprintf( stderr, "Warning: %s U+%04X %s\n",
+ "QuotationStart may be wrong:", ic, OSTR( aQuoteStart));
+ }
+ switch (ic = aQuoteEnd.toChar())
+ {
+ case 0x2019: // RIGHT SINGLE QUOTATION MARK
+ case 0x201a: // SINGLE LOW-9 QUOTATION MARK
+ case 0x201b: // SINGLE HIGH-REVERSED-9 QUOTATION MARK
+ case 0x2039: // SINGLE LEFT-POINTING ANGLE QUOTATION MARK
+ case 0x203a: // SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
+ case 0x300d: // RIGHT CORNER BRACKET (Chinese)
+ ;
+ break;
+ default:
+ fprintf( stderr, "Warning: %s U+%04X %s\n",
+ "QuotationEnd may be wrong:", ic, OSTR( aQuoteEnd));
+ }
+ switch (ic = aDoubleQuoteStart.toChar())
+ {
+ case 0x00ab: // LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+ case 0x00bb: // RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+ case 0x201c: // LEFT DOUBLE QUOTATION MARK
+ case 0x201e: // DOUBLE LOW-9 QUOTATION MARK
+ case 0x201f: // DOUBLE HIGH-REVERSED-9 QUOTATION MARK
+ case 0x300e: // LEFT WHITE CORNER BRACKET (Chinese)
+ ;
+ break;
+ default:
+ fprintf( stderr, "Warning: %s U+%04X %s\n",
+ "DoubleQuotationStart may be wrong:", ic, OSTR( aDoubleQuoteStart));
+ }
+ switch (ic = aDoubleQuoteEnd.toChar())
+ {
+ case 0x00ab: // LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+ case 0x00bb: // RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+ case 0x201d: // RIGHT DOUBLE QUOTATION MARK
+ case 0x201e: // DOUBLE LOW-9 QUOTATION MARK
+ case 0x201f: // DOUBLE HIGH-REVERSED-9 QUOTATION MARK
+ case 0x300f: // RIGHT WHITE CORNER BRACKET (Chinese)
+ ;
+ break;
+ default:
+ fprintf( stderr, "Warning: %s U+%04X %s\n",
+ "DoubleQuotationEnd may be wrong:", ic, OSTR( aDoubleQuoteEnd));
+ }
writeParameterCheckLen( of, "TimeAM", "timeAM", 1, -1);
writeParameterCheckLen( of, "TimePM", "timePM", 1, -1);
@@ -640,7 +699,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
fprintf( stderr,
"Warning: Can't check separators used in FormatCode due to LC_CTYPE ref=\"%s\".\n"
"If these two locales use identical format codes, you should consider to use the ref= mechanism also for the LC_FORMAT element, together with replaceFrom= and replaceTo= for the currency.\n",
- OUStringToOString( aRef, RTL_TEXTENCODING_UTF8).getStr());
+ OSTR( aRef));
bCtypeIsRef = true;
pCtype = 0;
}
diff --git a/i18npool/source/localedata/data/dsb_DE.xml b/i18npool/source/localedata/data/dsb_DE.xml
new file mode 100644
index 000000000000..fe953ec807c1
--- /dev/null
+++ b/i18npool/source/localedata/data/dsb_DE.xml
@@ -0,0 +1,350 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE Locale SYSTEM 'locale.dtd'>
+<Locale versionDTD="2.0.3" allowUpdateFromCLDR="no" version="1.0">
+ <LC_INFO>
+ <Language>
+ <LangID>dsb</LangID>
+ <DefaultName>Sorbian, Lower</DefaultName>
+ </Language>
+ <Country>
+ <CountryID>DE</CountryID>
+ <DefaultName>Germany</DefaultName>
+ </Country>
+ </LC_INFO>
+ <LC_CTYPE unoid="generic">
+ <Separators>
+ <DateSeparator>.</DateSeparator>
+ <ThousandSeparator>&#160;</ThousandSeparator><!-- a non-breaking space (U+00A0) as a thousand separator; alternatively, there could be no separator at all -->
+ <DecimalSeparator>,</DecimalSeparator>
+ <TimeSeparator>:</TimeSeparator>
+ <Time100SecSeparator>,</Time100SecSeparator>
+ <ListSeparator>;</ListSeparator>
+ <LongDateDayOfWeekSeparator>, </LongDateDayOfWeekSeparator>
+ <LongDateDaySeparator>. </LongDateDaySeparator>
+ <LongDateMonthSeparator> </LongDateMonthSeparator>
+ <LongDateYearSeparator> </LongDateYearSeparator>
+ </Separators>
+ <Markers>
+ <QuotationStart>‚</QuotationStart>
+ <QuotationEnd>‘</QuotationEnd>
+ <DoubleQuotationStart>„</DoubleQuotationStart>
+ <DoubleQuotationEnd>“</DoubleQuotationEnd>
+ </Markers>
+ <TimeAM>dopołdnja</TimeAM>
+ <TimePM>wótpołdnja</TimePM>
+ <MeasurementSystem>metric</MeasurementSystem>
+ </LC_CTYPE>
+ <LC_FORMAT replaceFrom="[CURRENCY]" replaceTo="[$€-82E]">
+ <FormatElement msgid="FixedFormatskey1" default="true" type="medium" usage="FIXED_NUMBER" formatindex="0">
+ <FormatCode>Standard</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey2" default="true" type="short" usage="FIXED_NUMBER" formatindex="1">
+ <FormatCode>0</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey3" default="false" type="medium" usage="FIXED_NUMBER" formatindex="2">
+ <FormatCode>0,00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey4" default="false" type="short" usage="FIXED_NUMBER" formatindex="3">
+ <FormatCode># ##0</FormatCode><!-- a non-breaking space (U+00A0) as a thousand separator -->
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey5" default="false" type="medium" usage="FIXED_NUMBER" formatindex="4">
+ <FormatCode># ##0,00</FormatCode><!-- a non-breaking space (U+00A0) as a thousand separator -->
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5">
+ <FormatCode># ###,00</FormatCode><!-- a non-breaking space (U+00A0) as a thousand separator -->
+ </FormatElement>
+ <FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6">
+ <FormatCode>0,00E+000</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="ScientificFormatskey2" default="false" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="7">
+ <FormatCode>0,00E+00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="PercentFormatskey1" default="true" type="short" usage="PERCENT_NUMBER" formatindex="8">
+ <FormatCode>0%</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="PercentFormatskey2" default="true" type="long" usage="PERCENT_NUMBER" formatindex="9">
+ <FormatCode>0,00%</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey1" default="true" type="short" usage="CURRENCY" formatindex="12">
+ <FormatCode># ##0 [CURRENCY];-# ##0 [CURRENCY]</FormatCode><!-- a non-breaking space (U+00A0) as a thousand separator -->
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey2" default="false" type="medium" usage="CURRENCY" formatindex="13">
+ <FormatCode># ##0,00 [CURRENCY];-# ##0,00 [CURRENCY]</FormatCode><!-- a non-breaking space (U+00A0) as a thousand separator -->
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey3" default="false" type="medium" usage="CURRENCY" formatindex="14">
+ <FormatCode># ##0 [CURRENCY];[RED]-# ##0 [CURRENCY]</FormatCode><!-- a non-breaking space (U+00A0) as a thousand separator -->
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey4" default="true" type="medium" usage="CURRENCY" formatindex="15">
+ <FormatCode># ##0,00 [CURRENCY];[RED]-# ##0,00 [CURRENCY]</FormatCode><!-- a non-breaking space (U+00A0) as a thousand separator -->
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey5" default="false" type="medium" usage="CURRENCY" formatindex="16">
+ <FormatCode>CCC# ##0,00</FormatCode><!-- a non-breaking space (U+00A0) as a thousand separator -->
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey6" default="false" type="medium" usage="CURRENCY" formatindex="17">
+ <FormatCode># ##0,-- [CURRENCY];[RED]-# ##0,-- [CURRENCY]</FormatCode><!-- a non-breaking space (U+00A0) as a thousand separator -->
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey11" default="true" type="short" usage="DATE" formatindex="18">
+ <FormatCode>D.MM.YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey14" default="true" type="long" usage="DATE" formatindex="19">
+ <FormatCode>NNNND. MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey6" default="true" type="medium" usage="DATE" formatindex="20">
+ <FormatCode>DD.MM.YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey5" default="false" type="medium" usage="DATE" formatindex="21">
+ <FormatCode>DD.MM.YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey15" default="false" type="long" usage="DATE" formatindex="22">
+ <FormatCode>D. MMM YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey16" default="false" type="long" usage="DATE" formatindex="23">
+ <FormatCode>D. MMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey21" default="false" type="long" usage="DATE" formatindex="24">
+ <FormatCode>D. MMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey17" default="false" type="long" usage="DATE" formatindex="25">
+ <FormatCode>D. MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey22" default="false" type="long" usage="DATE" formatindex="26">
+ <FormatCode>D. MMMM YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey10" default="false" type="medium" usage="DATE" formatindex="27">
+ <FormatCode>NN, DD. MMM YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey18" default="false" type="long" usage="DATE" formatindex="28">
+ <FormatCode>NN, D. MMM YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey19" default="false" type="long" usage="DATE" formatindex="29">
+ <FormatCode>NN, D. MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey20" default="false" type="long" usage="DATE" formatindex="30">
+ <FormatCode>NNNND. MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey12" default="false" type="short" usage="DATE" formatindex="31">
+ <FormatCode>MM.DD</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey7" default="false" type="medium" usage="DATE" formatindex="32">
+ <FormatCode>YY-MM-DD</FormatCode>
+ <DefaultName>ISO 8601</DefaultName>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey8" default="false" type="medium" usage="DATE" formatindex="33">
+ <FormatCode>YYYY-MM-DD</FormatCode>
+ <DefaultName>ISO 8601</DefaultName>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey1" default="false" type="medium" usage="DATE" formatindex="34">
+ <FormatCode>MM.YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey2" default="false" type="medium" usage="DATE" formatindex="35">
+ <FormatCode>D. MMM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey3" default="false" type="medium" usage="DATE" formatindex="36">
+ <FormatCode>MMMM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey4" default="false" type="medium" usage="DATE" formatindex="37">
+ <FormatCode>QQ YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey9" default="false" type="medium" usage="DATE" formatindex="38">
+ <FormatCode>WW</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey1" default="false" type="short" usage="TIME" formatindex="39">
+ <FormatCode>H:MM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey2" default="false" type="medium" usage="TIME" formatindex="40">
+ <FormatCode>H:MM:SS</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey3" default="true" type="short" usage="TIME" formatindex="41">
+ <FormatCode>H:MM AM/PM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey4" default="true" type="medium" usage="TIME" formatindex="42">
+ <FormatCode>H:MM:SS AM/PM</FormatCode><!-- with commonly used 24-hour time, the AM/PM indicator is not needed -->
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey5" default="false" type="medium" usage="TIME" formatindex="43">
+ <FormatCode>[H]:MM:SS</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey6" default="false" type="short" usage="TIME" formatindex="44">
+ <FormatCode>MM:SS,00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey7" default="false" type="medium" usage="TIME" formatindex="45">
+ <FormatCode>[H]:MM:SS,00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateTimeFormatskey1" default="true" type="medium" usage="DATE_TIME" formatindex="46">
+ <FormatCode>DD.MM.YY H:MM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateTimeFormatskey2" default="false" type="medium" usage="DATE_TIME" formatindex="47">
+ <FormatCode>DD.MM.YYYY H:MM:SS AM/PM</FormatCode><!-- with commonly used 24-hour time, the AM/PM indicator is useless (and also never used) -->
+ </FormatElement>
+ </LC_FORMAT>
+ <LC_COLLATION>
+ <Collator default="true" unoid="alphanumeric"/>
+ <CollationOptions>
+ <TransliterationModules>IGNORE_CASE</TransliterationModules>
+ </CollationOptions>
+ </LC_COLLATION>
+ <LC_SEARCH>
+ <SearchOptions>
+ <TransliterationModules>IGNORE_CASE</TransliterationModules>
+ </SearchOptions>
+ </LC_SEARCH>
+ <LC_INDEX>
+ <IndexKey unoid="alphanumeric" default="true" phonetic="false">A-C Č Ć D E Ě F-H {Ch} I-K ŠL-N Ń O Ó P-R Ŕ S Š Ś T-Z Ž Ź</IndexKey>
+ <UnicodeScript>0</UnicodeScript>
+ <UnicodeScript>1</UnicodeScript>
+ <UnicodeScript>2</UnicodeScript>
+ <FollowPageWord>bok</FollowPageWord><!-- there's no conventional abbreviation -->
+ <FollowPageWord>boki</FollowPageWord><!-- there's no conventional abbreviation -->
+ </LC_INDEX>
+ <LC_CALENDAR>
+ <Calendar unoid="gregorian" default="true">
+ <DaysOfWeek>
+ <Day>
+ <DayID>sun</DayID>
+ <DefaultAbbrvName>nje.</DefaultAbbrvName>
+ <DefaultFullName>njeźela</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>mon</DayID>
+ <DefaultAbbrvName>pón.</DefaultAbbrvName>
+ <DefaultFullName>pónjeźela</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>tue</DayID>
+ <DefaultAbbrvName>wał.</DefaultAbbrvName>
+ <DefaultFullName>wałtora</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>wed</DayID>
+ <DefaultAbbrvName>srj.</DefaultAbbrvName>
+ <DefaultFullName>srjoda</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>thu</DayID>
+ <DefaultAbbrvName>stw.</DefaultAbbrvName>
+ <DefaultFullName>stwórtk</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>fri</DayID>
+ <DefaultAbbrvName>pět.</DefaultAbbrvName>
+ <DefaultFullName>pětk</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>sat</DayID>
+ <DefaultAbbrvName>sob.</DefaultAbbrvName>
+ <DefaultFullName>sobota</DefaultFullName>
+ </Day>
+ </DaysOfWeek>
+ <MonthsOfYear>
+ <Month>
+ <MonthID>jan</MonthID>
+ <DefaultAbbrvName>jan.</DefaultAbbrvName>
+ <DefaultFullName>januar</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>feb</MonthID>
+ <DefaultAbbrvName>feb.</DefaultAbbrvName>
+ <DefaultFullName>februar</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>mar</MonthID>
+ <DefaultAbbrvName>měr.</DefaultAbbrvName>
+ <DefaultFullName>měrc</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>apr</MonthID>
+ <DefaultAbbrvName>apr.</DefaultAbbrvName>
+ <DefaultFullName>apryl</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>may</MonthID>
+ <DefaultAbbrvName>maj</DefaultAbbrvName>
+ <DefaultFullName>maj</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>jun</MonthID>
+ <DefaultAbbrvName>jun.</DefaultAbbrvName>
+ <DefaultFullName>junij</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>jul</MonthID>
+ <DefaultAbbrvName>jul.</DefaultAbbrvName>
+ <DefaultFullName>julij</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>aug</MonthID>
+ <DefaultAbbrvName>awg.</DefaultAbbrvName>
+ <DefaultFullName>awgust</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>sep</MonthID>
+ <DefaultAbbrvName>sep.</DefaultAbbrvName>
+ <DefaultFullName>september</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>oct</MonthID>
+ <DefaultAbbrvName>okt.</DefaultAbbrvName>
+ <DefaultFullName>oktober</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>nov</MonthID>
+ <DefaultAbbrvName>now.</DefaultAbbrvName>
+ <DefaultFullName>nowember</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>dec</MonthID>
+ <DefaultAbbrvName>dec.</DefaultAbbrvName>
+ <DefaultFullName>december</DefaultFullName>
+ </Month>
+ </MonthsOfYear>
+ <Eras>
+ <Era>
+ <EraID>bc</EraID>
+ <DefaultAbbrvName>pÅ›. Kr.</DefaultAbbrvName>
+ <DefaultFullName>pśed Kristusom</DefaultFullName>
+ </Era>
+ <Era>
+ <EraID>ad</EraID>
+ <DefaultAbbrvName>pó Kr.</DefaultAbbrvName>
+ <DefaultFullName>pó Kristusu</DefaultFullName>
+ </Era>
+ </Eras>
+ <StartDayOfWeek>
+ <DayID>mon</DayID>
+ </StartDayOfWeek>
+ <MinimalDaysInFirstWeek>4</MinimalDaysInFirstWeek>
+ </Calendar>
+ </LC_CALENDAR>
+ <LC_CURRENCY>
+ <Currency default="true" usedInCompatibleFormatCodes="true">
+ <CurrencyID>EUR</CurrencyID>
+ <CurrencySymbol>€</CurrencySymbol>
+ <BankSymbol>EUR</BankSymbol>
+ <CurrencyName>euro</CurrencyName>
+ <DecimalPlaces>2</DecimalPlaces>
+ </Currency>
+ </LC_CURRENCY>
+ <LC_TRANSLITERATION>
+ <Transliteration unoid="LOWERCASE_UPPERCASE"/>
+ <Transliteration unoid="UPPERCASE_LOWERCASE"/>
+ <Transliteration unoid="IGNORE_CASE"/>
+ </LC_TRANSLITERATION>
+ <LC_MISC>
+ <ReservedWords>
+ <trueWord>wěrno</trueWord>
+ <falseWord>njewěrno</falseWord>
+ <quarter1Word>prědny kwartal</quarter1Word>
+ <quarter2Word>drugi kwartal</quarter2Word>
+ <quarter3Word>tśeśi kwartal</quarter3Word>
+ <quarter4Word>stwórty kwartal</quarter4Word>
+ <aboveWord>nad</aboveWord>
+ <belowWord>pód</belowWord>
+ <quarter1Abbreviation>K1</quarter1Abbreviation>
+ <quarter2Abbreviation>K2</quarter2Abbreviation>
+ <quarter3Abbreviation>K3</quarter3Abbreviation>
+ <quarter4Abbreviation>K4</quarter4Abbreviation>
+ </ReservedWords>
+ </LC_MISC>
+ <LC_NumberingLevel ref="en_US"/>
+ <LC_OutLineNumberingLevel ref="en_US"/>
+</Locale>
+<!--Version 1.0 -->
diff --git a/i18npool/source/localedata/data/fi_FI.xml b/i18npool/source/localedata/data/fi_FI.xml
index 432d5f155423..1f7747d8b97a 100644
--- a/i18npool/source/localedata/data/fi_FI.xml
+++ b/i18npool/source/localedata/data/fi_FI.xml
@@ -179,7 +179,7 @@
<LC_COLLATION ref="en_US" />
<LC_SEARCH ref="en_US"/>
<LC_INDEX>
- <IndexKey phonetic="false" default="true" unoid="alphanumeric">A-V X-Z Ä Ö</IndexKey>
+ <IndexKey phonetic="false" default="true" unoid="alphanumeric">A-Z Ä Ö</IndexKey>
<UnicodeScript>0</UnicodeScript>
<UnicodeScript>1</UnicodeScript>
<FollowPageWord>p.</FollowPageWord>
diff --git a/i18npool/source/localedata/data/haw_US.xml b/i18npool/source/localedata/data/haw_US.xml
new file mode 100644
index 000000000000..b9fd553e24ef
--- /dev/null
+++ b/i18npool/source/localedata/data/haw_US.xml
@@ -0,0 +1,358 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE Locale SYSTEM 'locale.dtd'>
+<Locale versionDTD="2.0.3" allowUpdateFromCLDR="no" version="1.0">
+ <LC_INFO>
+ <Language>
+ <LangID>haw</LangID>
+ <DefaultName>Hawaiian</DefaultName>
+ </Language>
+ <Country>
+ <CountryID>US</CountryID>
+ <DefaultName>United States</DefaultName>
+ </Country>
+ </LC_INFO>
+ <LC_CTYPE unoid="generic">
+ <Separators>
+ <DateSeparator>/</DateSeparator>
+ <ThousandSeparator>,</ThousandSeparator>
+ <DecimalSeparator>.</DecimalSeparator>
+ <TimeSeparator>:</TimeSeparator>
+ <Time100SecSeparator>.</Time100SecSeparator>
+ <ListSeparator>;</ListSeparator>
+ <LongDateDayOfWeekSeparator>, </LongDateDayOfWeekSeparator>
+ <LongDateDaySeparator> </LongDateDaySeparator>
+ <LongDateMonthSeparator> </LongDateMonthSeparator>
+ <LongDateYearSeparator> </LongDateYearSeparator>
+ </Separators>
+ <Markers>
+ <QuotationStart>‘</QuotationStart>
+ <QuotationEnd>’</QuotationEnd>
+ <DoubleQuotationStart>“</DoubleQuotationStart>
+ <DoubleQuotationEnd>â€</DoubleQuotationEnd>
+ </Markers>
+ <TimeAM>AM</TimeAM>
+ <TimePM>PM</TimePM>
+ <MeasurementSystem>metric</MeasurementSystem>
+ </LC_CTYPE>
+ <LC_FORMAT replaceFrom="[CURRENCY]" replaceTo="[$$-475]">
+ <FormatElement msgid="FixedFormatskey1" default="true" type="medium" usage="FIXED_NUMBER" formatindex="0">
+ <FormatCode>General</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey2" default="true" type="short" usage="FIXED_NUMBER" formatindex="1">
+ <FormatCode>0</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey3" default="false" type="medium" usage="FIXED_NUMBER" formatindex="2">
+ <FormatCode>0.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey4" default="false" type="short" usage="FIXED_NUMBER" formatindex="3">
+ <FormatCode>#,##0</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey5" default="false" type="medium" usage="FIXED_NUMBER" formatindex="4">
+ <FormatCode>#,##0.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5">
+ <FormatCode>#,###.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6">
+ <FormatCode>0.00E+00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="ScientificFormatskey2" default="false" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="7">
+ <FormatCode>0.00E+000</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="PercentFormatskey1" default="true" type="short" usage="PERCENT_NUMBER" formatindex="8">
+ <FormatCode>0%</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="PercentFormatskey2" default="true" type="long" usage="PERCENT_NUMBER" formatindex="9">
+ <FormatCode>0.00%</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey1" default="true" type="short" usage="CURRENCY" formatindex="12">
+ <FormatCode>[CURRENCY]#,##0;([CURRENCY]#,##0)</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey2" default="false" type="medium" usage="CURRENCY" formatindex="13">
+ <FormatCode>[CURRENCY]#,##0.00;([CURRENCY]#,##0.00)</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey3" default="false" type="medium" usage="CURRENCY" formatindex="14">
+ <FormatCode>[CURRENCY]#,##0;[RED]([CURRENCY]#,##0)</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey4" default="true" type="medium" usage="CURRENCY" formatindex="15">
+ <FormatCode>[CURRENCY]#,##0.00;[RED]([CURRENCY]#,##0.00)</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey5" default="false" type="medium" usage="CURRENCY" formatindex="16">
+ <FormatCode>CCC#,##0.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey6" default="false" type="medium" usage="CURRENCY" formatindex="17">
+ <FormatCode>[CURRENCY]#,##0.--;[RED]([CURRENCY]#,##0.--)</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey11" default="true" type="short" usage="DATE" formatindex="18">
+ <FormatCode>YY/MM/DD</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey14" default="true" type="long" usage="DATE" formatindex="19">
+ <FormatCode>NNNNDD MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey6" default="true" type="medium" usage="DATE" formatindex="20">
+ <FormatCode>YY/MM/DD</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey5" default="false" type="medium" usage="DATE" formatindex="21">
+ <FormatCode>YYYY/MM/DD</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey15" default="false" type="long" usage="DATE" formatindex="22">
+ <FormatCode>D MMM YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey16" default="false" type="long" usage="DATE" formatindex="23">
+ <FormatCode>D MMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey21" default="false" type="long" usage="DATE" formatindex="24">
+ <FormatCode>D MMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey17" default="false" type="long" usage="DATE" formatindex="25">
+ <FormatCode>D MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey22" default="false" type="long" usage="DATE" formatindex="26">
+ <FormatCode>D MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey10" default="false" type="medium" usage="DATE" formatindex="27">
+ <FormatCode>NN, DD/MMM/YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey18" default="false" type="long" usage="DATE" formatindex="28">
+ <FormatCode>NN, D MMM YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey19" default="false" type="long" usage="DATE" formatindex="29">
+ <FormatCode>NN, D MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey20" default="false" type="long" usage="DATE" formatindex="30">
+ <FormatCode>NNNND MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey12" default="false" type="short" usage="DATE" formatindex="31">
+ <FormatCode>MM/DD</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey7" default="false" type="medium" usage="DATE" formatindex="32">
+ <FormatCode>YY-MM-DD</FormatCode>
+ <DefaultName>ISO 8601</DefaultName>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey8" default="false" type="medium" usage="DATE" formatindex="33">
+ <FormatCode>YYYY-MM-DD</FormatCode>
+ <DefaultName>ISO 8601</DefaultName>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey1" default="false" type="medium" usage="DATE" formatindex="34">
+ <FormatCode>YY/MM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey2" default="false" type="medium" usage="DATE" formatindex="35">
+ <FormatCode>MMM/DD</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey3" default="false" type="medium" usage="DATE" formatindex="36">
+ <FormatCode>MMMM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey4" default="false" type="medium" usage="DATE" formatindex="37">
+ <FormatCode>QQ YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey9" default="false" type="medium" usage="DATE" formatindex="38">
+ <FormatCode>WW</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey1" default="false" type="short" usage="TIME" formatindex="39">
+ <FormatCode>HH:MM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey2" default="false" type="medium" usage="TIME" formatindex="40">
+ <FormatCode>HH:MM:SS</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey3" default="true" type="short" usage="TIME" formatindex="41">
+ <FormatCode>HH:MM AM/PM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey4" default="true" type="medium" usage="TIME" formatindex="42">
+ <FormatCode>HH:MM:SS AM/PM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey5" default="false" type="medium" usage="TIME" formatindex="43">
+ <FormatCode>[HH]:MM:SS</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey6" default="false" type="short" usage="TIME" formatindex="44">
+ <FormatCode>MM:SS.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey7" default="false" type="medium" usage="TIME" formatindex="45">
+ <FormatCode>[HH]:MM:SS.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateTimeFormatskey1" default="true" type="medium" usage="DATE_TIME" formatindex="46">
+ <FormatCode>YY/MM/DD HH:MM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateTimeFormatskey2" default="false" type="medium" usage="DATE_TIME" formatindex="47">
+ <FormatCode>YYYY/MM/DD HH:MM:SS AM/PM</FormatCode>
+ </FormatElement>
+ </LC_FORMAT>
+ <LC_COLLATION>
+ <Collator default="true" unoid="alphanumeric"/>
+ <CollationOptions>
+ <TransliterationModules>IGNORE_CASE</TransliterationModules>
+ </CollationOptions>
+ </LC_COLLATION>
+ <LC_SEARCH>
+ <SearchOptions>
+ <TransliterationModules>IGNORE_CASE</TransliterationModules>
+ </SearchOptions>
+ </LC_SEARCH>
+ <LC_INDEX>
+ <IndexKey phonetic="false" default="true" unoid="alphanumeric">A E I O U H K L M N P W</IndexKey>
+ <UnicodeScript>0</UnicodeScript>
+ <UnicodeScript>1</UnicodeScript>
+ <FollowPageWord>p.</FollowPageWord>
+ <FollowPageWord>pp.</FollowPageWord>
+ </LC_INDEX>
+ <LC_CALENDAR>
+ <Calendar unoid="gregorian" default="true">
+ <DaysOfWeek>
+ <Day>
+ <DayID>sun</DayID>
+ <DefaultAbbrvName>LP</DefaultAbbrvName>
+ <DefaultFullName>LÄpule</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>mon</DayID>
+ <DefaultAbbrvName>P1</DefaultAbbrvName>
+ <DefaultFullName>Poʻakahi</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>tue</DayID>
+ <DefaultAbbrvName>P2</DefaultAbbrvName>
+ <DefaultFullName>Poʻalua</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>wed</DayID>
+ <DefaultAbbrvName>P3</DefaultAbbrvName>
+ <DefaultFullName>Poʻakolu</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>thu</DayID>
+ <DefaultAbbrvName>P4</DefaultAbbrvName>
+ <DefaultFullName>PoÊ»ahÄ</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>fri</DayID>
+ <DefaultAbbrvName>P5</DefaultAbbrvName>
+ <DefaultFullName>Poʻalima</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>sat</DayID>
+ <DefaultAbbrvName>P6</DefaultAbbrvName>
+ <DefaultFullName>Poʻaono</DefaultFullName>
+ </Day>
+ </DaysOfWeek>
+ <MonthsOfYear>
+ <Month>
+ <MonthID>jan</MonthID>
+ <DefaultAbbrvName>Ian.</DefaultAbbrvName>
+ <DefaultFullName>Ianuali</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>feb</MonthID>
+ <DefaultAbbrvName>Pep.</DefaultAbbrvName>
+ <DefaultFullName>Pepeluali</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>mar</MonthID>
+ <DefaultAbbrvName>Mal.</DefaultAbbrvName>
+ <DefaultFullName>Malaki</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>apr</MonthID>
+ <DefaultAbbrvName>ʻAp.</DefaultAbbrvName>
+ <DefaultFullName>ʻApelila</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>may</MonthID>
+ <DefaultAbbrvName>Mei</DefaultAbbrvName>
+ <DefaultFullName>Mei</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>jun</MonthID>
+ <DefaultAbbrvName>Iun.</DefaultAbbrvName>
+ <DefaultFullName>Iune</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>jul</MonthID>
+ <DefaultAbbrvName>Iul.</DefaultAbbrvName>
+ <DefaultFullName>Iulai</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>aug</MonthID>
+ <DefaultAbbrvName>ʻAuk.</DefaultAbbrvName>
+ <DefaultFullName>ʻAukake</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>sep</MonthID>
+ <DefaultAbbrvName>Kep.</DefaultAbbrvName>
+ <DefaultFullName>Kepakemapa</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>oct</MonthID>
+ <DefaultAbbrvName>ʻOk.</DefaultAbbrvName>
+ <DefaultFullName>ʻOkakopa</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>nov</MonthID>
+ <DefaultAbbrvName>Now.</DefaultAbbrvName>
+ <DefaultFullName>Nowemapa</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>dec</MonthID>
+ <DefaultAbbrvName>Kek.</DefaultAbbrvName>
+ <DefaultFullName>Kekemapa</DefaultFullName>
+ </Month>
+ </MonthsOfYear>
+ <Eras>
+ <Era>
+ <EraID>bc</EraID>
+ <DefaultAbbrvName>BC</DefaultAbbrvName>
+ <DefaultFullName>BC</DefaultFullName>
+ </Era>
+ <Era>
+ <EraID>ad</EraID>
+ <DefaultAbbrvName>CE</DefaultAbbrvName>
+ <DefaultFullName>CE</DefaultFullName>
+ </Era>
+ </Eras>
+ <StartDayOfWeek>
+ <DayID>mon</DayID>
+ </StartDayOfWeek>
+ <MinimalDaysInFirstWeek>1</MinimalDaysInFirstWeek>
+ </Calendar>
+ </LC_CALENDAR>
+ <LC_CURRENCY>
+ <Currency default="true" usedInCompatibleFormatCodes="true">
+ <CurrencyID>USD</CurrencyID>
+ <CurrencySymbol>$</CurrencySymbol>
+ <BankSymbol>USD</BankSymbol>
+ <CurrencyName>KÄlÄ Ê»Amelika</CurrencyName>
+ <DecimalPlaces>2</DecimalPlaces>
+ </Currency>
+ </LC_CURRENCY>
+ <LC_TRANSLITERATION>
+ <Transliteration unoid="LOWERCASE_UPPERCASE"/>
+ <Transliteration unoid="UPPERCASE_LOWERCASE"/>
+ <Transliteration unoid="IGNORE_CASE"/>
+ </LC_TRANSLITERATION>
+ <LC_MISC>
+ <ReservedWords>
+ <trueWord>ʻOiaʻiʻo</trueWord>
+ <falseWord>Hewa</falseWord>
+ <quarter1Word>Kau HapahÄ 1</quarter1Word>
+ <quarter2Word>Kau Hapaha 2</quarter2Word>
+ <quarter3Word>Kau HapahÄ 3</quarter3Word>
+ <quarter4Word>Kau HapahÄ 4</quarter4Word>
+ <aboveWord>Luna</aboveWord>
+ <belowWord>Lalo</belowWord>
+ <quarter1Abbreviation>KH1</quarter1Abbreviation>
+ <quarter2Abbreviation>KH2</quarter2Abbreviation>
+ <quarter3Abbreviation>KH3</quarter3Abbreviation>
+ <quarter4Abbreviation>KH4</quarter4Abbreviation>
+ </ReservedWords>
+ </LC_MISC>
+ <LC_NumberingLevel>
+ <NumberingLevel NumType="4" Prefix=" " Suffix=")"/>
+ <NumberingLevel NumType="4" Prefix=" " Suffix="."/>
+ <NumberingLevel NumType="4" Prefix="(" Suffix=")"/>
+ <NumberingLevel NumType="2" Prefix=" " Suffix="."/>
+ <NumberingLevel NumType="0" Prefix=" " Suffix=")"/>
+ <NumberingLevel NumType="1" Prefix=" " Suffix=")"/>
+ <NumberingLevel NumType="1" Prefix="(" Suffix=")"/>
+ <NumberingLevel NumType="3" Prefix=" " Suffix="."/>
+ </LC_NumberingLevel>
+ <LC_OutLineNumberingLevel ref="en_US"/>
+</Locale>
+<!--Version 1.0 -->
diff --git a/i18npool/source/localedata/data/hsb_DE.xml b/i18npool/source/localedata/data/hsb_DE.xml
index 6513dad5f57e..1e4c70a26fd3 100644
--- a/i18npool/source/localedata/data/hsb_DE.xml
+++ b/i18npool/source/localedata/data/hsb_DE.xml
@@ -34,7 +34,7 @@
<TimePM>popołdnju</TimePM>
<MeasurementSystem>metric</MeasurementSystem>
</LC_CTYPE>
- <LC_FORMAT replaceFrom="[CURRENCY]" replaceTo="[$€-042E]">
+ <LC_FORMAT replaceFrom="[CURRENCY]" replaceTo="[$€-42E]">
<FormatElement msgid="FixedFormatskey1" default="true" type="medium" usage="FIXED_NUMBER" formatindex="0">
<FormatCode>Standard</FormatCode>
</FormatElement>
diff --git a/i18npool/source/localedata/data/ht_HT.xml b/i18npool/source/localedata/data/ht_HT.xml
new file mode 100644
index 000000000000..99109c72a909
--- /dev/null
+++ b/i18npool/source/localedata/data/ht_HT.xml
@@ -0,0 +1,358 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE Locale SYSTEM 'locale.dtd'>
+<Locale versionDTD="2.0.3" allowUpdateFromCLDR="no" version="1.0">
+ <LC_INFO>
+ <Language>
+ <LangID>ht</LangID>
+ <DefaultName>Haitian Creole</DefaultName>
+ </Language>
+ <Country>
+ <CountryID>HT</CountryID>
+ <DefaultName>Haiti</DefaultName>
+ </Country>
+ </LC_INFO>
+ <LC_CTYPE unoid="generic">
+ <Separators>
+ <DateSeparator>/</DateSeparator>
+ <ThousandSeparator>,</ThousandSeparator>
+ <DecimalSeparator>.</DecimalSeparator>
+ <TimeSeparator>:</TimeSeparator>
+ <Time100SecSeparator>.</Time100SecSeparator>
+ <ListSeparator>;</ListSeparator>
+ <LongDateDayOfWeekSeparator>, </LongDateDayOfWeekSeparator>
+ <LongDateDaySeparator>, </LongDateDaySeparator>
+ <LongDateMonthSeparator> </LongDateMonthSeparator>
+ <LongDateYearSeparator> </LongDateYearSeparator>
+ </Separators>
+ <Markers>
+ <QuotationStart>‘</QuotationStart>
+ <QuotationEnd>’</QuotationEnd>
+ <DoubleQuotationStart>“</DoubleQuotationStart>
+ <DoubleQuotationEnd>â€</DoubleQuotationEnd>
+ </Markers>
+ <TimeAM>AM</TimeAM>
+ <TimePM>PM</TimePM>
+ <MeasurementSystem>metric</MeasurementSystem>
+ </LC_CTYPE>
+ <LC_FORMAT replaceFrom="[CURRENCY]" replaceTo="[$G-65A]">
+ <FormatElement msgid="FixedFormatskey1" default="true" type="medium" usage="FIXED_NUMBER" formatindex="0">
+ <FormatCode>General</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey2" default="true" type="short" usage="FIXED_NUMBER" formatindex="1">
+ <FormatCode>0</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey3" default="false" type="medium" usage="FIXED_NUMBER" formatindex="2">
+ <FormatCode>0.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey4" default="false" type="short" usage="FIXED_NUMBER" formatindex="3">
+ <FormatCode>#,##0</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey5" default="false" type="medium" usage="FIXED_NUMBER" formatindex="4">
+ <FormatCode>#,##0.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5">
+ <FormatCode>#,###.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6">
+ <FormatCode>0.00E+00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="ScientificFormatskey2" default="false" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="7">
+ <FormatCode>0.00E+000</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="PercentFormatskey1" default="true" type="short" usage="PERCENT_NUMBER" formatindex="8">
+ <FormatCode>0%</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="PercentFormatskey2" default="true" type="long" usage="PERCENT_NUMBER" formatindex="9">
+ <FormatCode>0.00%</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey1" default="true" type="short" usage="CURRENCY" formatindex="12">
+ <FormatCode>[CURRENCY]#,##0;-[CURRENCY]#,##0</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey2" default="false" type="medium" usage="CURRENCY" formatindex="13">
+ <FormatCode>[CURRENCY]#,##0.00;-[CURRENCY]#,##0.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey3" default="false" type="medium" usage="CURRENCY" formatindex="14">
+ <FormatCode>[CURRENCY]#,##0;[RED]-[CURRENCY]#,##0</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey4" default="true" type="medium" usage="CURRENCY" formatindex="15">
+ <FormatCode>[CURRENCY]#,##0.00;[RED]-[CURRENCY]#,##0.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey5" default="false" type="medium" usage="CURRENCY" formatindex="16">
+ <FormatCode>CCC#,##0.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey6" default="false" type="medium" usage="CURRENCY" formatindex="17">
+ <FormatCode>[CURRENCY]#,##0.--;[RED]-[CURRENCY]#,##0.--</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey11" default="true" type="short" usage="DATE" formatindex="18">
+ <FormatCode>D/MM/YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey14" default="true" type="long" usage="DATE" formatindex="19">
+ <FormatCode>NNNNDD, MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey6" default="true" type="medium" usage="DATE" formatindex="20">
+ <FormatCode>DD/MM/YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey5" default="false" type="medium" usage="DATE" formatindex="21">
+ <FormatCode>DD/MM/YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey15" default="false" type="long" usage="DATE" formatindex="22">
+ <FormatCode>D, MMM YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey16" default="false" type="long" usage="DATE" formatindex="23">
+ <FormatCode>D, MMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey21" default="false" type="long" usage="DATE" formatindex="24">
+ <FormatCode>D, MMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey17" default="false" type="long" usage="DATE" formatindex="25">
+ <FormatCode>D, MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey22" default="false" type="long" usage="DATE" formatindex="26">
+ <FormatCode>D, MMMM YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey10" default="false" type="medium" usage="DATE" formatindex="27">
+ <FormatCode>NN, DD/MMM/YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey18" default="false" type="long" usage="DATE" formatindex="28">
+ <FormatCode>NN, D, MMM YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey19" default="false" type="long" usage="DATE" formatindex="29">
+ <FormatCode>NN, D, MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey20" default="false" type="long" usage="DATE" formatindex="30">
+ <FormatCode>NNNND, MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey12" default="false" type="short" usage="DATE" formatindex="31">
+ <FormatCode>MM/DD</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey7" default="false" type="medium" usage="DATE" formatindex="32">
+ <FormatCode>YY-MM-DD</FormatCode>
+ <DefaultName>ISO 8601</DefaultName>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey8" default="false" type="medium" usage="DATE" formatindex="33">
+ <FormatCode>YYYY-MM-DD</FormatCode>
+ <DefaultName>ISO 8601</DefaultName>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey1" default="false" type="medium" usage="DATE" formatindex="34">
+ <FormatCode>MM/YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey2" default="false" type="medium" usage="DATE" formatindex="35">
+ <FormatCode>MMM/DD</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey3" default="false" type="medium" usage="DATE" formatindex="36">
+ <FormatCode>MMMM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey4" default="false" type="medium" usage="DATE" formatindex="37">
+ <FormatCode>QQ YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey9" default="false" type="medium" usage="DATE" formatindex="38">
+ <FormatCode>WW</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey1" default="false" type="short" usage="TIME" formatindex="39">
+ <FormatCode>HH:MM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey2" default="false" type="medium" usage="TIME" formatindex="40">
+ <FormatCode>HH:MM:SS</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey3" default="true" type="short" usage="TIME" formatindex="41">
+ <FormatCode>HH:MM AM/PM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey4" default="true" type="medium" usage="TIME" formatindex="42">
+ <FormatCode>HH:MM:SS AM/PM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey5" default="false" type="medium" usage="TIME" formatindex="43">
+ <FormatCode>[HH]:MM:SS</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey6" default="false" type="short" usage="TIME" formatindex="44">
+ <FormatCode>MM:SS.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey7" default="false" type="medium" usage="TIME" formatindex="45">
+ <FormatCode>[HH]:MM:SS.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateTimeFormatskey1" default="true" type="medium" usage="DATE_TIME" formatindex="46">
+ <FormatCode>DD/MM/YY HH:MM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateTimeFormatskey2" default="false" type="medium" usage="DATE_TIME" formatindex="47">
+ <FormatCode>DD/MM/YYYY HH:MM:SS AM/PM</FormatCode>
+ </FormatElement>
+ </LC_FORMAT>
+ <LC_COLLATION>
+ <Collator default="true" unoid="alphanumeric"/>
+ <CollationOptions>
+ <TransliterationModules>IGNORE_CASE</TransliterationModules>
+ </CollationOptions>
+ </LC_COLLATION>
+ <LC_SEARCH>
+ <SearchOptions>
+ <TransliterationModules>IGNORE_CASE</TransliterationModules>
+ </SearchOptions>
+ </LC_SEARCH>
+ <LC_INDEX>
+ <IndexKey phonetic="false" default="true" unoid="alphanumeric">A-Z</IndexKey>
+ <UnicodeScript>0</UnicodeScript>
+ <UnicodeScript>1</UnicodeScript>
+ <FollowPageWord>s</FollowPageWord>
+ <FollowPageWord>pl</FollowPageWord>
+ </LC_INDEX>
+ <LC_CALENDAR>
+ <Calendar unoid="gregorian" default="true">
+ <DaysOfWeek>
+ <Day>
+ <DayID>sun</DayID>
+ <DefaultAbbrvName>Dim</DefaultAbbrvName>
+ <DefaultFullName>Dimanch</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>mon</DayID>
+ <DefaultAbbrvName>Len</DefaultAbbrvName>
+ <DefaultFullName>Lendi</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>tue</DayID>
+ <DefaultAbbrvName>Mad</DefaultAbbrvName>
+ <DefaultFullName>Madi</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>wed</DayID>
+ <DefaultAbbrvName>Mèk</DefaultAbbrvName>
+ <DefaultFullName>Mèkredi</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>thu</DayID>
+ <DefaultAbbrvName>Jed</DefaultAbbrvName>
+ <DefaultFullName>Jedi</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>fri</DayID>
+ <DefaultAbbrvName>Van</DefaultAbbrvName>
+ <DefaultFullName>Vandredi</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>sat</DayID>
+ <DefaultAbbrvName>Sam</DefaultAbbrvName>
+ <DefaultFullName>Samdi</DefaultFullName>
+ </Day>
+ </DaysOfWeek>
+ <MonthsOfYear>
+ <Month>
+ <MonthID>jan</MonthID>
+ <DefaultAbbrvName>Jan</DefaultAbbrvName>
+ <DefaultFullName>Janvye</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>feb</MonthID>
+ <DefaultAbbrvName>Fev</DefaultAbbrvName>
+ <DefaultFullName>Fevriye</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>mar</MonthID>
+ <DefaultAbbrvName>Mas</DefaultAbbrvName>
+ <DefaultFullName>Mas</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>apr</MonthID>
+ <DefaultAbbrvName>Avr</DefaultAbbrvName>
+ <DefaultFullName>Avril</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>may</MonthID>
+ <DefaultAbbrvName>Me</DefaultAbbrvName>
+ <DefaultFullName>Me</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>jun</MonthID>
+ <DefaultAbbrvName>Jen</DefaultAbbrvName>
+ <DefaultFullName>Jen</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>jul</MonthID>
+ <DefaultAbbrvName>Jiy</DefaultAbbrvName>
+ <DefaultFullName>Jiyè</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>aug</MonthID>
+ <DefaultAbbrvName>Dao</DefaultAbbrvName>
+ <DefaultFullName>Daout</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>sep</MonthID>
+ <DefaultAbbrvName>Sep</DefaultAbbrvName>
+ <DefaultFullName>Septanm</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>oct</MonthID>
+ <DefaultAbbrvName>Okt</DefaultAbbrvName>
+ <DefaultFullName>Oktòb</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>nov</MonthID>
+ <DefaultAbbrvName>Nov</DefaultAbbrvName>
+ <DefaultFullName>Novanm</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>dec</MonthID>
+ <DefaultAbbrvName>Des</DefaultAbbrvName>
+ <DefaultFullName>Desanm</DefaultFullName>
+ </Month>
+ </MonthsOfYear>
+ <Eras>
+ <Era>
+ <EraID>bc</EraID>
+ <DefaultAbbrvName>AJ</DefaultAbbrvName>
+ <DefaultFullName>Avan Jezikri</DefaultFullName>
+ </Era>
+ <Era>
+ <EraID>ad</EraID>
+ <DefaultAbbrvName>AP</DefaultAbbrvName>
+ <DefaultFullName>Apre Jezikri</DefaultFullName>
+ </Era>
+ </Eras>
+ <StartDayOfWeek>
+ <DayID>sun</DayID>
+ </StartDayOfWeek>
+ <MinimalDaysInFirstWeek>1</MinimalDaysInFirstWeek>
+ </Calendar>
+ </LC_CALENDAR>
+ <LC_CURRENCY>
+ <Currency default="true" usedInCompatibleFormatCodes="true">
+ <CurrencyID>HTG</CurrencyID>
+ <CurrencySymbol>G</CurrencySymbol>
+ <BankSymbol>HTG</BankSymbol>
+ <CurrencyName>Goud</CurrencyName>
+ <DecimalPlaces>2</DecimalPlaces>
+ </Currency>
+ </LC_CURRENCY>
+ <LC_TRANSLITERATION>
+ <Transliteration unoid="LOWERCASE_UPPERCASE"/>
+ <Transliteration unoid="UPPERCASE_LOWERCASE"/>
+ <Transliteration unoid="IGNORE_CASE"/>
+ </LC_TRANSLITERATION>
+ <LC_MISC>
+ <ReservedWords>
+ <trueWord>Vre</trueWord>
+ <falseWord>Fo</falseWord>
+ <quarter1Word>Trimès 1</quarter1Word>
+ <quarter2Word>Trimès 2</quarter2Word>
+ <quarter3Word>Trimès 3</quarter3Word>
+ <quarter4Word>Trimès 4</quarter4Word>
+ <aboveWord>Anwo</aboveWord>
+ <belowWord>Anba</belowWord>
+ <quarter1Abbreviation>Trimès 1</quarter1Abbreviation>
+ <quarter2Abbreviation>Trimès 2</quarter2Abbreviation>
+ <quarter3Abbreviation>Trimès 3</quarter3Abbreviation>
+ <quarter4Abbreviation>Trimès 4</quarter4Abbreviation>
+ </ReservedWords>
+ </LC_MISC>
+ <LC_NumberingLevel>
+ <NumberingLevel NumType="4" Prefix=" " Suffix=")"/>
+ <NumberingLevel NumType="4" Prefix=" " Suffix="."/>
+ <NumberingLevel NumType="4" Prefix="(" Suffix=")"/>
+ <NumberingLevel NumType="2" Prefix=" " Suffix="."/>
+ <NumberingLevel NumType="0" Prefix=" " Suffix=")"/>
+ <NumberingLevel NumType="1" Prefix=" " Suffix=")"/>
+ <NumberingLevel NumType="1" Prefix="(" Suffix=")"/>
+ <NumberingLevel NumType="3" Prefix=" " Suffix="."/>
+ </LC_NumberingLevel>
+ <LC_OutLineNumberingLevel ref="en_US"/>
+</Locale>
+<!--Version 1.0 -->
diff --git a/i18npool/source/localedata/data/jbo.xml b/i18npool/source/localedata/data/jbo.xml
new file mode 100644
index 000000000000..403442638bd0
--- /dev/null
+++ b/i18npool/source/localedata/data/jbo.xml
@@ -0,0 +1,358 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE Locale SYSTEM 'locale.dtd'>
+<Locale versionDTD="2.0.3" allowUpdateFromCLDR="no" version="1.0">
+ <LC_INFO>
+ <Language>
+ <LangID>jbo</LangID>
+ <DefaultName>Lojban</DefaultName>
+ </Language>
+ <Country>
+ <CountryID></CountryID>
+ <DefaultName></DefaultName>
+ </Country>
+ </LC_INFO>
+ <LC_CTYPE unoid="generic">
+ <Separators>
+ <DateSeparator>/</DateSeparator>
+ <ThousandSeparator>,</ThousandSeparator>
+ <DecimalSeparator>.</DecimalSeparator>
+ <TimeSeparator>:</TimeSeparator>
+ <Time100SecSeparator>.</Time100SecSeparator>
+ <ListSeparator>;</ListSeparator>
+ <LongDateDayOfWeekSeparator>, </LongDateDayOfWeekSeparator>
+ <LongDateDaySeparator>, </LongDateDaySeparator>
+ <LongDateMonthSeparator> </LongDateMonthSeparator>
+ <LongDateYearSeparator> </LongDateYearSeparator>
+ </Separators>
+ <Markers>
+ <QuotationStart>‘</QuotationStart>
+ <QuotationEnd>’</QuotationEnd>
+ <DoubleQuotationStart>“</DoubleQuotationStart>
+ <DoubleQuotationEnd>â€</DoubleQuotationEnd>
+ </Markers>
+ <TimeAM>PDM</TimeAM>
+ <TimePM>BDM</TimePM>
+ <MeasurementSystem>metric</MeasurementSystem>
+ </LC_CTYPE>
+ <LC_FORMAT replaceFrom="[CURRENCY]" replaceTo="[$€-658]">
+ <FormatElement msgid="FixedFormatskey1" default="true" type="medium" usage="FIXED_NUMBER" formatindex="0">
+ <FormatCode>General</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey2" default="true" type="short" usage="FIXED_NUMBER" formatindex="1">
+ <FormatCode>0</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey3" default="false" type="medium" usage="FIXED_NUMBER" formatindex="2">
+ <FormatCode>0.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey4" default="false" type="short" usage="FIXED_NUMBER" formatindex="3">
+ <FormatCode>#,##0</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey5" default="false" type="medium" usage="FIXED_NUMBER" formatindex="4">
+ <FormatCode>#,##0.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5">
+ <FormatCode>#,###.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6">
+ <FormatCode>0.00E+00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="ScientificFormatskey2" default="false" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="7">
+ <FormatCode>0.00E+000</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="PercentFormatskey1" default="true" type="short" usage="PERCENT_NUMBER" formatindex="8">
+ <FormatCode>0%</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="PercentFormatskey2" default="true" type="long" usage="PERCENT_NUMBER" formatindex="9">
+ <FormatCode>0.00%</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey1" default="true" type="short" usage="CURRENCY" formatindex="12">
+ <FormatCode>[CURRENCY]#,##0;-[CURRENCY]#,##0</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey2" default="false" type="medium" usage="CURRENCY" formatindex="13">
+ <FormatCode>[CURRENCY]#,##0.00;-[CURRENCY]#,##0.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey3" default="false" type="medium" usage="CURRENCY" formatindex="14">
+ <FormatCode>[CURRENCY]#,##0;[RED]-[CURRENCY]#,##0</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey4" default="true" type="medium" usage="CURRENCY" formatindex="15">
+ <FormatCode>[CURRENCY]#,##0.00;[RED]-[CURRENCY]#,##0.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey5" default="false" type="medium" usage="CURRENCY" formatindex="16">
+ <FormatCode>CCC#,##0.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey6" default="false" type="medium" usage="CURRENCY" formatindex="17">
+ <FormatCode>[CURRENCY]#,##0.--;[RED]-[CURRENCY]#,##0.--</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey11" default="true" type="short" usage="DATE" formatindex="18">
+ <FormatCode>D/MM/YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey14" default="true" type="long" usage="DATE" formatindex="19">
+ <FormatCode>NNNNDD, MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey6" default="true" type="medium" usage="DATE" formatindex="20">
+ <FormatCode>DD/MM/YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey5" default="false" type="medium" usage="DATE" formatindex="21">
+ <FormatCode>DD/MM/YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey15" default="false" type="long" usage="DATE" formatindex="22">
+ <FormatCode>D, MMM YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey16" default="false" type="long" usage="DATE" formatindex="23">
+ <FormatCode>D, MMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey21" default="false" type="long" usage="DATE" formatindex="24">
+ <FormatCode>D, MMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey17" default="false" type="long" usage="DATE" formatindex="25">
+ <FormatCode>D, MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey22" default="false" type="long" usage="DATE" formatindex="26">
+ <FormatCode>D, MMMM YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey10" default="false" type="medium" usage="DATE" formatindex="27">
+ <FormatCode>NN, DD/MMM/YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey18" default="false" type="long" usage="DATE" formatindex="28">
+ <FormatCode>NN, D, MMM YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey19" default="false" type="long" usage="DATE" formatindex="29">
+ <FormatCode>NN, D, MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey20" default="false" type="long" usage="DATE" formatindex="30">
+ <FormatCode>NNNND, MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey12" default="false" type="short" usage="DATE" formatindex="31">
+ <FormatCode>DD/MM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey7" default="false" type="medium" usage="DATE" formatindex="32">
+ <FormatCode>YY-MM-DD</FormatCode>
+ <DefaultName>ISO 8601</DefaultName>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey8" default="false" type="medium" usage="DATE" formatindex="33">
+ <FormatCode>YYYY-MM-DD</FormatCode>
+ <DefaultName>ISO 8601</DefaultName>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey1" default="false" type="medium" usage="DATE" formatindex="34">
+ <FormatCode>MM/YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey2" default="false" type="medium" usage="DATE" formatindex="35">
+ <FormatCode>MMM/DD</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey3" default="false" type="medium" usage="DATE" formatindex="36">
+ <FormatCode>MMMM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey4" default="false" type="medium" usage="DATE" formatindex="37">
+ <FormatCode>QQ YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey9" default="false" type="medium" usage="DATE" formatindex="38">
+ <FormatCode>WW</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey1" default="false" type="short" usage="TIME" formatindex="39">
+ <FormatCode>HH:MM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey2" default="false" type="medium" usage="TIME" formatindex="40">
+ <FormatCode>HH:MM:SS</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey3" default="true" type="short" usage="TIME" formatindex="41">
+ <FormatCode>HH:MM AM/PM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey4" default="true" type="medium" usage="TIME" formatindex="42">
+ <FormatCode>HH:MM:SS AM/PM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey5" default="false" type="medium" usage="TIME" formatindex="43">
+ <FormatCode>[HH]:MM:SS</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey6" default="false" type="short" usage="TIME" formatindex="44">
+ <FormatCode>MM:SS.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey7" default="false" type="medium" usage="TIME" formatindex="45">
+ <FormatCode>[HH]:MM:SS.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateTimeFormatskey1" default="true" type="medium" usage="DATE_TIME" formatindex="46">
+ <FormatCode>DD/MM/YY HH:MM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateTimeFormatskey2" default="false" type="medium" usage="DATE_TIME" formatindex="47">
+ <FormatCode>DD/MM/YYYY HH:MM:SS AM/PM</FormatCode>
+ </FormatElement>
+ </LC_FORMAT>
+ <LC_COLLATION>
+ <Collator default="true" unoid="alphanumeric"/>
+ <CollationOptions>
+ <TransliterationModules>IGNORE_CASE</TransliterationModules>
+ </CollationOptions>
+ </LC_COLLATION>
+ <LC_SEARCH>
+ <SearchOptions>
+ <TransliterationModules>IGNORE_CASE</TransliterationModules>
+ </SearchOptions>
+ </LC_SEARCH>
+ <LC_INDEX>
+ <IndexKey phonetic="false" default="true" unoid="alphanumeric">A-Z</IndexKey>
+ <UnicodeScript>0</UnicodeScript>
+ <UnicodeScript>1</UnicodeScript>
+ <FollowPageWord>BP</FollowPageWord>
+ <FollowPageWord>BP</FollowPageWord>
+ </LC_INDEX>
+ <LC_CALENDAR>
+ <Calendar unoid="gregorian" default="true">
+ <DaysOfWeek>
+ <Day>
+ <DayID>sun</DayID>
+ <DefaultAbbrvName>nondei</DefaultAbbrvName>
+ <DefaultFullName>nondei</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>mon</DayID>
+ <DefaultAbbrvName>pavdei</DefaultAbbrvName>
+ <DefaultFullName>pavdei</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>tue</DayID>
+ <DefaultAbbrvName>reldei</DefaultAbbrvName>
+ <DefaultFullName>reldei</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>wed</DayID>
+ <DefaultAbbrvName>cibdei</DefaultAbbrvName>
+ <DefaultFullName>cibdei</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>thu</DayID>
+ <DefaultAbbrvName>vondei</DefaultAbbrvName>
+ <DefaultFullName>vondei</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>fri</DayID>
+ <DefaultAbbrvName>mumdei</DefaultAbbrvName>
+ <DefaultFullName>mumdei</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>sat</DayID>
+ <DefaultAbbrvName>xavdei</DefaultAbbrvName>
+ <DefaultFullName>xavdei</DefaultFullName>
+ </Day>
+ </DaysOfWeek>
+ <MonthsOfYear>
+ <Month>
+ <MonthID>jan</MonthID>
+ <DefaultAbbrvName>pavma'i</DefaultAbbrvName>
+ <DefaultFullName>pavmasti</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>feb</MonthID>
+ <DefaultAbbrvName>relma'i</DefaultAbbrvName>
+ <DefaultFullName>relmasti</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>mar</MonthID>
+ <DefaultAbbrvName>cibma'i</DefaultAbbrvName>
+ <DefaultFullName>cibmasti</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>apr</MonthID>
+ <DefaultAbbrvName>vonma'i</DefaultAbbrvName>
+ <DefaultFullName>vonmasti</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>may</MonthID>
+ <DefaultAbbrvName>mumyma'i</DefaultAbbrvName>
+ <DefaultFullName>mumymasti</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>jun</MonthID>
+ <DefaultAbbrvName>xavma'i</DefaultAbbrvName>
+ <DefaultFullName>xavmasti</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>jul</MonthID>
+ <DefaultAbbrvName>zelma'i</DefaultAbbrvName>
+ <DefaultFullName>zelmasti</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>aug</MonthID>
+ <DefaultAbbrvName>bivma'i</DefaultAbbrvName>
+ <DefaultFullName>bivmasti</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>sep</MonthID>
+ <DefaultAbbrvName>sozma'i</DefaultAbbrvName>
+ <DefaultFullName>sozmasti</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>oct</MonthID>
+ <DefaultAbbrvName>daurma'i</DefaultAbbrvName>
+ <DefaultFullName>daurmasti</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>nov</MonthID>
+ <DefaultAbbrvName>feirma'i</DefaultAbbrvName>
+ <DefaultFullName>feirmasti</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>dec</MonthID>
+ <DefaultAbbrvName>gairma'i</DefaultAbbrvName>
+ <DefaultFullName>gairmasti</DefaultFullName>
+ </Month>
+ </MonthsOfYear>
+ <Eras>
+ <Era>
+ <EraID>bc</EraID>
+ <DefaultAbbrvName>PLK</DefaultAbbrvName>
+ <DefaultFullName>purci la .kraist.</DefaultFullName>
+ </Era>
+ <Era>
+ <EraID>ad</EraID>
+ <DefaultAbbrvName>NLK</DefaultAbbrvName>
+ <DefaultFullName>nanca la .kraist.</DefaultFullName>
+ </Era>
+ </Eras>
+ <StartDayOfWeek>
+ <DayID>mon</DayID>
+ </StartDayOfWeek>
+ <MinimalDaysInFirstWeek>1</MinimalDaysInFirstWeek>
+ </Calendar>
+ </LC_CALENDAR>
+ <LC_CURRENCY>
+ <Currency default="true" usedInCompatibleFormatCodes="true">
+ <CurrencyID>EUR</CurrencyID>
+ <CurrencySymbol>€</CurrencySymbol>
+ <BankSymbol>EUR</BankSymbol>
+ <CurrencyName>jdini</CurrencyName>
+ <DecimalPlaces>2</DecimalPlaces>
+ </Currency>
+ </LC_CURRENCY>
+ <LC_TRANSLITERATION>
+ <Transliteration unoid="LOWERCASE_UPPERCASE"/>
+ <Transliteration unoid="UPPERCASE_LOWERCASE"/>
+ <Transliteration unoid="IGNORE_CASE"/>
+ </LC_TRANSLITERATION>
+ <LC_MISC>
+ <ReservedWords>
+ <trueWord>jetnu</trueWord>
+ <falseWord>jitfa</falseWord>
+ <quarter1Word>pa moi vo si'e</quarter1Word>
+ <quarter2Word>re moi vo si'e</quarter2Word>
+ <quarter3Word>ci moi vo si'e</quarter3Word>
+ <quarter4Word>vo moi vo si'e</quarter4Word>
+ <aboveWord>gapru</aboveWord>
+ <belowWord>cnita</belowWord>
+ <quarter1Abbreviation>1MVS</quarter1Abbreviation>
+ <quarter2Abbreviation>2MVS</quarter2Abbreviation>
+ <quarter3Abbreviation>3MVS</quarter3Abbreviation>
+ <quarter4Abbreviation>4MVS</quarter4Abbreviation>
+ </ReservedWords>
+ </LC_MISC>
+ <LC_NumberingLevel>
+ <NumberingLevel NumType="4" Prefix=" " Suffix=")"/>
+ <NumberingLevel NumType="4" Prefix=" " Suffix="."/>
+ <NumberingLevel NumType="4" Prefix="(" Suffix=")"/>
+ <NumberingLevel NumType="2" Prefix=" " Suffix="."/>
+ <NumberingLevel NumType="0" Prefix=" " Suffix=")"/>
+ <NumberingLevel NumType="1" Prefix=" " Suffix=")"/>
+ <NumberingLevel NumType="1" Prefix="(" Suffix=")"/>
+ <NumberingLevel NumType="3" Prefix=" " Suffix="."/>
+ </LC_NumberingLevel>
+ <LC_OutLineNumberingLevel ref="en_US"/>
+</Locale>
+<!--Version 1.0 -->
diff --git a/i18npool/source/localedata/data/lif_NP.xml b/i18npool/source/localedata/data/lif_NP.xml
new file mode 100644
index 000000000000..fadbfad11ff3
--- /dev/null
+++ b/i18npool/source/localedata/data/lif_NP.xml
@@ -0,0 +1,357 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE Locale SYSTEM 'locale.dtd'>
+<Locale versionDTD="2.0.3" allowUpdateFromCLDR="no" version="1.0">
+ <LC_INFO>
+ <Language>
+ <LangID>lif</LangID>
+ <DefaultName>Limbu</DefaultName>
+ </Language>
+ <Country>
+ <CountryID>NP</CountryID>
+ <DefaultName>Nepal</DefaultName>
+ </Country>
+ </LC_INFO>
+ <LC_CTYPE unoid="generic">
+ <Separators>
+ <DateSeparator>/</DateSeparator>
+ <ThousandSeparator>,</ThousandSeparator>
+ <DecimalSeparator>.</DecimalSeparator>
+ <TimeSeparator>:</TimeSeparator>
+ <Time100SecSeparator>.</Time100SecSeparator>
+ <ListSeparator>;</ListSeparator>
+ <LongDateDayOfWeekSeparator>, </LongDateDayOfWeekSeparator>
+ <LongDateDaySeparator>, </LongDateDaySeparator>
+ <LongDateMonthSeparator> </LongDateMonthSeparator>
+ <LongDateYearSeparator> </LongDateYearSeparator>
+ </Separators>
+ <Markers>
+ <QuotationStart>‘</QuotationStart>
+ <QuotationEnd>’</QuotationEnd>
+ <DoubleQuotationStart>“</DoubleQuotationStart>
+ <DoubleQuotationEnd>â€</DoubleQuotationEnd>
+ </Markers>
+ <TimeAM>पूरà¥à¤µà¤¾à¤¨à¥à¤¹</TimeAM>
+ <TimePM>अपरानà¥à¤¹</TimePM>
+ <MeasurementSystem>metric</MeasurementSystem>
+ </LC_CTYPE>
+ <LC_FORMAT replaceFrom="[CURRENCY]" replaceTo="[$रू-657]">
+ <FormatElement msgid="FixedFormatskey1" default="true" type="medium" usage="FIXED_NUMBER" formatindex="0">
+ <FormatCode>General</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey2" default="true" type="short" usage="FIXED_NUMBER" formatindex="1">
+ <FormatCode>0</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey3" default="false" type="medium" usage="FIXED_NUMBER" formatindex="2">
+ <FormatCode>0.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey4" default="false" type="short" usage="FIXED_NUMBER" formatindex="3">
+ <FormatCode>#,##0</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey5" default="false" type="medium" usage="FIXED_NUMBER" formatindex="4">
+ <FormatCode>#,##0.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5">
+ <FormatCode>#,###.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6">
+ <FormatCode>0.00E+00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="ScientificFormatskey2" default="false" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="7">
+ <FormatCode>0.00E+000</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="PercentFormatskey1" default="true" type="short" usage="PERCENT_NUMBER" formatindex="8">
+ <FormatCode>0%</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="PercentFormatskey2" default="true" type="long" usage="PERCENT_NUMBER" formatindex="9">
+ <FormatCode>0.00%</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey1" default="true" type="short" usage="CURRENCY" formatindex="12">
+ <FormatCode>[CURRENCY] #,##0;-[CURRENCY] #,##0</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey2" default="false" type="medium" usage="CURRENCY" formatindex="13">
+ <FormatCode>[CURRENCY] #,##0.00;-[CURRENCY] #,##0.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey3" default="false" type="medium" usage="CURRENCY" formatindex="14">
+ <FormatCode>[CURRENCY] #,##0;[RED]-[CURRENCY] #,##0</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey4" default="true" type="medium" usage="CURRENCY" formatindex="15">
+ <FormatCode>[CURRENCY] #,##0.00;[RED]-[CURRENCY] #,##0.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey5" default="false" type="medium" usage="CURRENCY" formatindex="16">
+ <FormatCode>CCC#,##0.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey6" default="false" type="medium" usage="CURRENCY" formatindex="17">
+ <FormatCode>[CURRENCY] #,##0.--;[RED]-[CURRENCY] #,##0.--</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey11" default="true" type="short" usage="DATE" formatindex="18">
+ <FormatCode>YY/MM/DD</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey14" default="true" type="long" usage="DATE" formatindex="19">
+ <FormatCode>NNNNDD, MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey6" default="true" type="medium" usage="DATE" formatindex="20">
+ <FormatCode>YY/MM/DD</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey5" default="false" type="medium" usage="DATE" formatindex="21">
+ <FormatCode>YYYY/MM/DD</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey15" default="false" type="long" usage="DATE" formatindex="22">
+ <FormatCode>D, MMM YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey16" default="false" type="long" usage="DATE" formatindex="23">
+ <FormatCode>D, MMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey21" default="false" type="long" usage="DATE" formatindex="24">
+ <FormatCode>D, MMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey17" default="false" type="long" usage="DATE" formatindex="25">
+ <FormatCode>D, MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey22" default="false" type="long" usage="DATE" formatindex="26">
+ <FormatCode>D, MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey10" default="false" type="medium" usage="DATE" formatindex="27">
+ <FormatCode>NN, DD/MMM/YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey18" default="false" type="long" usage="DATE" formatindex="28">
+ <FormatCode>NN, D, MMM YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey19" default="false" type="long" usage="DATE" formatindex="29">
+ <FormatCode>NN, D, MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey20" default="false" type="long" usage="DATE" formatindex="30">
+ <FormatCode>NNNND, MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey12" default="false" type="short" usage="DATE" formatindex="31">
+ <FormatCode>MM/DD</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey7" default="false" type="medium" usage="DATE" formatindex="32">
+ <FormatCode>YY-MM-DD</FormatCode>
+ <DefaultName>ISO 8601</DefaultName>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey8" default="false" type="medium" usage="DATE" formatindex="33">
+ <FormatCode>YYYY-MM-DD</FormatCode>
+ <DefaultName>ISO 8601</DefaultName>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey1" default="false" type="medium" usage="DATE" formatindex="34">
+ <FormatCode>YY/MM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey2" default="false" type="medium" usage="DATE" formatindex="35">
+ <FormatCode>MMM/DD</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey3" default="false" type="medium" usage="DATE" formatindex="36">
+ <FormatCode>MMMM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey4" default="false" type="medium" usage="DATE" formatindex="37">
+ <FormatCode>QQ YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey9" default="false" type="medium" usage="DATE" formatindex="38">
+ <FormatCode>WW</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey1" default="false" type="short" usage="TIME" formatindex="39">
+ <FormatCode>HH:MM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey2" default="false" type="medium" usage="TIME" formatindex="40">
+ <FormatCode>HH:MM:SS</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey3" default="true" type="short" usage="TIME" formatindex="41">
+ <FormatCode>HH:MM AM/PM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey4" default="true" type="medium" usage="TIME" formatindex="42">
+ <FormatCode>HH:MM:SS AM/PM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey5" default="false" type="medium" usage="TIME" formatindex="43">
+ <FormatCode>[HH]:MM:SS</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey6" default="false" type="short" usage="TIME" formatindex="44">
+ <FormatCode>MM:SS.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey7" default="false" type="medium" usage="TIME" formatindex="45">
+ <FormatCode>[HH]:MM:SS.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateTimeFormatskey1" default="true" type="medium" usage="DATE_TIME" formatindex="46">
+ <FormatCode>YY/MM/DD HH:MM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateTimeFormatskey2" default="false" type="medium" usage="DATE_TIME" formatindex="47">
+ <FormatCode>YYYY/MM/DD HH:MM:SS AM/PM</FormatCode>
+ </FormatElement>
+ </LC_FORMAT>
+ <LC_COLLATION>
+ <Collator default="true" unoid="alphanumeric"/>
+ <CollationOptions>
+ <TransliterationModules>IGNORE_CASE</TransliterationModules>
+ </CollationOptions>
+ </LC_COLLATION>
+ <LC_SEARCH>
+ <SearchOptions>
+ <TransliterationModules>IGNORE_CASE</TransliterationModules>
+ </SearchOptions>
+ </LC_SEARCH>
+ <LC_INDEX>
+ <IndexKey phonetic="false" default="true" unoid="alphanumeric">á¤-ᤜ</IndexKey>
+ <UnicodeScript>85</UnicodeScript>
+ <FollowPageWord>p.</FollowPageWord>
+ <FollowPageWord>pp.</FollowPageWord>
+ </LC_INDEX>
+ <LC_CALENDAR>
+ <Calendar unoid="gregorian" default="true">
+ <DaysOfWeek>
+ <Day>
+ <DayID>sun</DayID>
+ <DefaultAbbrvName>ᤋᤧá¤á¤§á¤’ᤠ</DefaultAbbrvName>
+ <DefaultFullName>ᤋᤧá¤á¤§á¤’ᤠ</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>mon</DayID>
+ <DefaultAbbrvName>ᤑᤥᤖᤠᤒᤠ</DefaultAbbrvName>
+ <DefaultFullName>ᤑᤥᤖᤠᤒᤠ</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>tue</DayID>
+ <DefaultAbbrvName>ᤔᤡᤰᤜᤠᤱᤒᤠ</DefaultAbbrvName>
+ <DefaultFullName>ᤔᤡᤰᤜᤠᤱᤒᤠ</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>wed</DayID>
+ <DefaultAbbrvName>ᤂᤧᤰᤛᤢᤒᤠ</DefaultAbbrvName>
+ <DefaultFullName>ᤂᤧᤰᤛᤢᤒᤠ</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>thu</DayID>
+ <DefaultAbbrvName>á¤á¤¢á¤–ᤢ᤺ᤵá¤á¤ </DefaultAbbrvName>
+ <DefaultFullName>á¤á¤¢á¤–ᤢ᤺ᤵá¤á¤ </DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>fri</DayID>
+ <DefaultAbbrvName>ᤑᤛᤢ᤺ᤵá¤á¤ </DefaultAbbrvName>
+ <DefaultFullName>ᤑᤛᤢ᤺ᤵá¤á¤ </DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>sat</DayID>
+ <DefaultAbbrvName>ᤛᤧᤴᤇᤪᤧᤱᤒᤠ</DefaultAbbrvName>
+ <DefaultFullName>ᤛᤧᤴᤇᤪᤧᤱᤒᤠ</DefaultFullName>
+ </Day>
+ </DaysOfWeek>
+ <MonthsOfYear>
+ <Month>
+ <MonthID>jan</MonthID>
+ <DefaultAbbrvName>जन</DefaultAbbrvName>
+ <DefaultFullName>जनवरी</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>feb</MonthID>
+ <DefaultAbbrvName>फेब</DefaultAbbrvName>
+ <DefaultFullName>फेबà¥à¤°à¥à¤…री</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>mar</MonthID>
+ <DefaultAbbrvName>मारà¥à¤š</DefaultAbbrvName>
+ <DefaultFullName>मारà¥à¤š</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>apr</MonthID>
+ <DefaultAbbrvName>अपà¥à¤°à¤¿</DefaultAbbrvName>
+ <DefaultFullName>अपà¥à¤°à¤¿à¤²</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>may</MonthID>
+ <DefaultAbbrvName>मे</DefaultAbbrvName>
+ <DefaultFullName>मे</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>jun</MonthID>
+ <DefaultAbbrvName>जà¥à¤¨</DefaultAbbrvName>
+ <DefaultFullName>जà¥à¤¨</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>jul</MonthID>
+ <DefaultAbbrvName>जà¥à¤²à¤¾</DefaultAbbrvName>
+ <DefaultFullName>जà¥à¤²à¤¾à¤ˆ</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>aug</MonthID>
+ <DefaultAbbrvName>अग</DefaultAbbrvName>
+ <DefaultFullName>अगसà¥à¤¤</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>sep</MonthID>
+ <DefaultAbbrvName>सेपà¥à¤Ÿ</DefaultAbbrvName>
+ <DefaultFullName>सेपà¥à¤Ÿà¥‡à¤®à¥à¤¬à¤°</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>oct</MonthID>
+ <DefaultAbbrvName>अकà¥à¤Ÿà¥‹</DefaultAbbrvName>
+ <DefaultFullName>अकà¥à¤Ÿà¥‹à¤¬à¤°</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>nov</MonthID>
+ <DefaultAbbrvName>नोभे</DefaultAbbrvName>
+ <DefaultFullName>नोभेमà¥à¤¬à¤°</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>dec</MonthID>
+ <DefaultAbbrvName>डिसे</DefaultAbbrvName>
+ <DefaultFullName>डिसेमà¥à¤¬à¤°</DefaultFullName>
+ </Month>
+ </MonthsOfYear>
+ <Eras>
+ <Era>
+ <EraID>bc</EraID>
+ <DefaultAbbrvName>ईसापूरà¥à¤µ</DefaultAbbrvName>
+ <DefaultFullName>ईसापूरà¥à¤µ</DefaultFullName>
+ </Era>
+ <Era>
+ <EraID>ad</EraID>
+ <DefaultAbbrvName>सनà¥</DefaultAbbrvName>
+ <DefaultFullName>सनà¥</DefaultFullName>
+ </Era>
+ </Eras>
+ <StartDayOfWeek>
+ <DayID>sun</DayID>
+ </StartDayOfWeek>
+ <MinimalDaysInFirstWeek>1</MinimalDaysInFirstWeek>
+ </Calendar>
+ </LC_CALENDAR>
+ <LC_CURRENCY>
+ <Currency default="true" usedInCompatibleFormatCodes="true">
+ <CurrencyID>NPR</CurrencyID>
+ <CurrencySymbol>रू</CurrencySymbol>
+ <BankSymbol>NPR</BankSymbol>
+ <CurrencyName>Nepalese Rupee</CurrencyName>
+ <DecimalPlaces>2</DecimalPlaces>
+ </Currency>
+ </LC_CURRENCY>
+ <LC_TRANSLITERATION>
+ <Transliteration unoid="LOWERCASE_UPPERCASE"/>
+ <Transliteration unoid="UPPERCASE_LOWERCASE"/>
+ <Transliteration unoid="IGNORE_CASE"/>
+ </LC_TRANSLITERATION>
+ <LC_MISC>
+ <ReservedWords>
+ <trueWord>ठीक</trueWord>
+ <falseWord>बेठीक</falseWord>
+ <quarter1Word>पहिलो सतà¥à¤°</quarter1Word>
+ <quarter2Word>दोसà¥à¤°à¥‹ सतà¥à¤°</quarter2Word>
+ <quarter3Word>तेसà¥à¤°à¥‹ सतà¥à¤°</quarter3Word>
+ <quarter4Word>चौथो सतà¥à¤°</quarter4Word>
+ <aboveWord>माथि</aboveWord>
+ <belowWord>तल</belowWord>
+ <quarter1Abbreviation>Q1</quarter1Abbreviation>
+ <quarter2Abbreviation>Q2</quarter2Abbreviation>
+ <quarter3Abbreviation>Q3</quarter3Abbreviation>
+ <quarter4Abbreviation>Q4</quarter4Abbreviation>
+ </ReservedWords>
+ </LC_MISC>
+ <LC_NumberingLevel>
+ <NumberingLevel NumType="12" Prefix=" " Suffix=")"/>
+ <NumberingLevel NumType="12" Prefix=" " Suffix="."/>
+ <NumberingLevel NumType="12" Prefix="(" Suffix=")"/>
+ <NumberingLevel NumType="2" Prefix=" " Suffix="."/>
+ <NumberingLevel NumType="2" Prefix=" " Suffix=")"/>
+ <NumberingLevel NumType="3" Prefix=" " Suffix=")"/>
+ <NumberingLevel NumType="3" Prefix="(" Suffix=")"/>
+ <NumberingLevel NumType="12" Prefix=" " Suffix="."/>
+ </LC_NumberingLevel>
+ <LC_OutLineNumberingLevel ref="en_US"/>
+</Locale>
+<!--Version 1.0 -->
diff --git a/i18npool/source/localedata/data/localedata_euro.map b/i18npool/source/localedata/data/localedata_euro.map
index e0564b85ea25..b9dd20c724d7 100644
--- a/i18npool/source/localedata/data/localedata_euro.map
+++ b/i18npool/source/localedata/data/localedata_euro.map
@@ -16,6 +16,7 @@ getAllCalendars_de_CH;
getAllCalendars_de_DE;
getAllCalendars_de_LI;
getAllCalendars_de_LU;
+getAllCalendars_dsb_DE;
getAllCalendars_el_GR;
getAllCalendars_et_EE;
getAllCalendars_eu;
@@ -86,6 +87,7 @@ getAllCurrencies_de_CH;
getAllCurrencies_de_DE;
getAllCurrencies_de_LI;
getAllCurrencies_de_LU;
+getAllCurrencies_dsb_DE;
getAllCurrencies_el_GR;
getAllCurrencies_et_EE;
getAllCurrencies_eu;
@@ -156,6 +158,7 @@ getAllFormats0_de_CH;
getAllFormats0_de_DE;
getAllFormats0_de_LI;
getAllFormats0_de_LU;
+getAllFormats0_dsb_DE;
getAllFormats0_el_GR;
getAllFormats0_et_EE;
getAllFormats0_eu;
@@ -226,6 +229,7 @@ getBreakIteratorRules_de_CH;
getBreakIteratorRules_de_DE;
getBreakIteratorRules_de_LI;
getBreakIteratorRules_de_LU;
+getBreakIteratorRules_dsb_DE;
getBreakIteratorRules_el_GR;
getBreakIteratorRules_et_EE;
getBreakIteratorRules_eu;
@@ -296,6 +300,7 @@ getCollationOptions_de_CH;
getCollationOptions_de_DE;
getCollationOptions_de_LI;
getCollationOptions_de_LU;
+getCollationOptions_dsb_DE;
getCollationOptions_el_GR;
getCollationOptions_et_EE;
getCollationOptions_eu;
@@ -366,6 +371,7 @@ getCollatorImplementation_de_CH;
getCollatorImplementation_de_DE;
getCollatorImplementation_de_LI;
getCollatorImplementation_de_LU;
+getCollatorImplementation_dsb_DE;
getCollatorImplementation_el_GR;
getCollatorImplementation_et_EE;
getCollatorImplementation_eu;
@@ -436,6 +442,7 @@ getContinuousNumberingLevels_de_CH;
getContinuousNumberingLevels_de_DE;
getContinuousNumberingLevels_de_LI;
getContinuousNumberingLevels_de_LU;
+getContinuousNumberingLevels_dsb_DE;
getContinuousNumberingLevels_el_GR;
getContinuousNumberingLevels_et_EE;
getContinuousNumberingLevels_eu;
@@ -506,6 +513,7 @@ getFollowPageWords_de_CH;
getFollowPageWords_de_DE;
getFollowPageWords_de_LI;
getFollowPageWords_de_LU;
+getFollowPageWords_dsb_DE;
getFollowPageWords_el_GR;
getFollowPageWords_et_EE;
getFollowPageWords_eu;
@@ -576,6 +584,7 @@ getForbiddenCharacters_de_CH;
getForbiddenCharacters_de_DE;
getForbiddenCharacters_de_LI;
getForbiddenCharacters_de_LU;
+getForbiddenCharacters_dsb_DE;
getForbiddenCharacters_el_GR;
getForbiddenCharacters_et_EE;
getForbiddenCharacters_eu;
@@ -646,6 +655,7 @@ getIndexAlgorithm_de_CH;
getIndexAlgorithm_de_DE;
getIndexAlgorithm_de_LI;
getIndexAlgorithm_de_LU;
+getIndexAlgorithm_dsb_DE;
getIndexAlgorithm_el_GR;
getIndexAlgorithm_et_EE;
getIndexAlgorithm_eu;
@@ -716,6 +726,7 @@ getLCInfo_de_CH;
getLCInfo_de_DE;
getLCInfo_de_LI;
getLCInfo_de_LU;
+getLCInfo_dsb_DE;
getLCInfo_el_GR;
getLCInfo_et_EE;
getLCInfo_eu;
@@ -786,6 +797,7 @@ getLocaleItem_de_CH;
getLocaleItem_de_DE;
getLocaleItem_de_LI;
getLocaleItem_de_LU;
+getLocaleItem_dsb_DE;
getLocaleItem_el_GR;
getLocaleItem_et_EE;
getLocaleItem_eu;
@@ -856,6 +868,7 @@ getOutlineNumberingLevels_de_CH;
getOutlineNumberingLevels_de_DE;
getOutlineNumberingLevels_de_LI;
getOutlineNumberingLevels_de_LU;
+getOutlineNumberingLevels_dsb_DE;
getOutlineNumberingLevels_el_GR;
getOutlineNumberingLevels_et_EE;
getOutlineNumberingLevels_eu;
@@ -926,6 +939,7 @@ getReservedWords_de_CH;
getReservedWords_de_DE;
getReservedWords_de_LI;
getReservedWords_de_LU;
+getReservedWords_dsb_DE;
getReservedWords_el_GR;
getReservedWords_et_EE;
getReservedWords_eu;
@@ -996,6 +1010,7 @@ getSearchOptions_de_CH;
getSearchOptions_de_DE;
getSearchOptions_de_LI;
getSearchOptions_de_LU;
+getSearchOptions_dsb_DE;
getSearchOptions_el_GR;
getSearchOptions_et_EE;
getSearchOptions_eu;
@@ -1066,6 +1081,7 @@ getTransliterations_de_CH;
getTransliterations_de_DE;
getTransliterations_de_LI;
getTransliterations_de_LU;
+getTransliterations_dsb_DE;
getTransliterations_el_GR;
getTransliterations_et_EE;
getTransliterations_eu;
@@ -1136,6 +1152,7 @@ getUnicodeScripts_de_CH;
getUnicodeScripts_de_DE;
getUnicodeScripts_de_LI;
getUnicodeScripts_de_LU;
+getUnicodeScripts_dsb_DE;
getUnicodeScripts_el_GR;
getUnicodeScripts_et_EE;
getUnicodeScripts_eu;
diff --git a/i18npool/source/localedata/data/localedata_others.map b/i18npool/source/localedata/data/localedata_others.map
index e5de10cb68e5..46f4c4f74aea 100644
--- a/i18npool/source/localedata/data/localedata_others.map
+++ b/i18npool/source/localedata/data/localedata_others.map
@@ -1,5 +1,6 @@
UDK_3_0_0 {
global:
+GetVersionInfo;
getAllCalendars_af_NA;
getAllCalendars_af_ZA;
getAllCalendars_ak_GH;
@@ -21,14 +22,17 @@ getAllCalendars_fa_IR;
getAllCalendars_gug_PY;
getAllCalendars_gu_IN;
getAllCalendars_ha_GH;
+getAllCalendars_haw_US;
getAllCalendars_he_IL;
getAllCalendars_hi_IN;
getAllCalendars_hil_PH;
+getAllCalendars_ht_HT;
getAllCalendars_hu_HU;
getAllCalendars_hy_AM;
getAllCalendars_ia;
getAllCalendars_id_ID;
getAllCalendars_ja_JP;
+getAllCalendars_jbo;
getAllCalendars_kk_KZ;
getAllCalendars_km_KH;
getAllCalendars_kn_IN;
@@ -36,6 +40,7 @@ getAllCalendars_ko_KR;
getAllCalendars_ku_TR;
getAllCalendars_ky_KG;
getAllCalendars_lg_UG;
+getAllCalendars_lif_NP;
getAllCalendars_ln_CD;
getAllCalendars_lo_LA;
getAllCalendars_mai_IN;
@@ -68,10 +73,12 @@ getAllCalendars_tn_ZA;
getAllCalendars_tpi_PG;
getAllCalendars_ts_ZA;
getAllCalendars_ug_CN;
+getAllCalendars_ur_PK;
getAllCalendars_uz_UZ;
getAllCalendars_ve_ZA;
getAllCalendars_vi_VN;
getAllCalendars_xh_ZA;
+getAllCalendars_yi_US;
getAllCalendars_zh_CN;
getAllCalendars_zh_HK;
getAllCalendars_zh_MO;
@@ -99,14 +106,17 @@ getAllCurrencies_fa_IR;
getAllCurrencies_gug_PY;
getAllCurrencies_gu_IN;
getAllCurrencies_ha_GH;
+getAllCurrencies_haw_US;
getAllCurrencies_he_IL;
getAllCurrencies_hi_IN;
getAllCurrencies_hil_PH;
+getAllCurrencies_ht_HT;
getAllCurrencies_hu_HU;
getAllCurrencies_hy_AM;
getAllCurrencies_ia;
getAllCurrencies_id_ID;
getAllCurrencies_ja_JP;
+getAllCurrencies_jbo;
getAllCurrencies_kk_KZ;
getAllCurrencies_km_KH;
getAllCurrencies_kn_IN;
@@ -114,6 +124,7 @@ getAllCurrencies_ko_KR;
getAllCurrencies_ku_TR;
getAllCurrencies_ky_KG;
getAllCurrencies_lg_UG;
+getAllCurrencies_lif_NP;
getAllCurrencies_ln_CD;
getAllCurrencies_lo_LA;
getAllCurrencies_mai_IN;
@@ -146,10 +157,12 @@ getAllCurrencies_tn_ZA;
getAllCurrencies_tpi_PG;
getAllCurrencies_ts_ZA;
getAllCurrencies_ug_CN;
+getAllCurrencies_ur_PK;
getAllCurrencies_uz_UZ;
getAllCurrencies_ve_ZA;
getAllCurrencies_vi_VN;
getAllCurrencies_xh_ZA;
+getAllCurrencies_yi_US;
getAllCurrencies_zh_CN;
getAllCurrencies_zh_HK;
getAllCurrencies_zh_MO;
@@ -177,14 +190,17 @@ getAllFormats0_fa_IR;
getAllFormats0_gug_PY;
getAllFormats0_gu_IN;
getAllFormats0_ha_GH;
+getAllFormats0_haw_US;
getAllFormats0_he_IL;
getAllFormats0_hi_IN;
getAllFormats0_hil_PH;
+getAllFormats0_ht_HT;
getAllFormats0_hu_HU;
getAllFormats0_hy_AM;
getAllFormats0_ia;
getAllFormats0_id_ID;
getAllFormats0_ja_JP;
+getAllFormats0_jbo;
getAllFormats0_kk_KZ;
getAllFormats0_km_KH;
getAllFormats0_kn_IN;
@@ -192,6 +208,7 @@ getAllFormats0_ko_KR;
getAllFormats0_ku_TR;
getAllFormats0_ky_KG;
getAllFormats0_lg_UG;
+getAllFormats0_lif_NP;
getAllFormats0_ln_CD;
getAllFormats0_lo_LA;
getAllFormats0_mai_IN;
@@ -224,10 +241,12 @@ getAllFormats0_tn_ZA;
getAllFormats0_tpi_PG;
getAllFormats0_ts_ZA;
getAllFormats0_ug_CN;
+getAllFormats0_ur_PK;
getAllFormats0_uz_UZ;
getAllFormats0_ve_ZA;
getAllFormats0_vi_VN;
getAllFormats0_xh_ZA;
+getAllFormats0_yi_US;
getAllFormats0_zh_CN;
getAllFormats0_zh_HK;
getAllFormats0_zh_MO;
@@ -255,14 +274,17 @@ getBreakIteratorRules_fa_IR;
getBreakIteratorRules_gug_PY;
getBreakIteratorRules_gu_IN;
getBreakIteratorRules_ha_GH;
+getBreakIteratorRules_haw_US;
getBreakIteratorRules_he_IL;
getBreakIteratorRules_hi_IN;
getBreakIteratorRules_hil_PH;
+getBreakIteratorRules_ht_HT;
getBreakIteratorRules_hu_HU;
getBreakIteratorRules_hy_AM;
getBreakIteratorRules_ia;
getBreakIteratorRules_id_ID;
getBreakIteratorRules_ja_JP;
+getBreakIteratorRules_jbo;
getBreakIteratorRules_kk_KZ;
getBreakIteratorRules_km_KH;
getBreakIteratorRules_kn_IN;
@@ -270,6 +292,7 @@ getBreakIteratorRules_ko_KR;
getBreakIteratorRules_ku_TR;
getBreakIteratorRules_ky_KG;
getBreakIteratorRules_lg_UG;
+getBreakIteratorRules_lif_NP;
getBreakIteratorRules_ln_CD;
getBreakIteratorRules_lo_LA;
getBreakIteratorRules_mai_IN;
@@ -302,10 +325,12 @@ getBreakIteratorRules_tn_ZA;
getBreakIteratorRules_tpi_PG;
getBreakIteratorRules_ts_ZA;
getBreakIteratorRules_ug_CN;
+getBreakIteratorRules_ur_PK;
getBreakIteratorRules_uz_UZ;
getBreakIteratorRules_ve_ZA;
getBreakIteratorRules_vi_VN;
getBreakIteratorRules_xh_ZA;
+getBreakIteratorRules_yi_US;
getBreakIteratorRules_zh_CN;
getBreakIteratorRules_zh_HK;
getBreakIteratorRules_zh_MO;
@@ -333,14 +358,17 @@ getCollationOptions_fa_IR;
getCollationOptions_gug_PY;
getCollationOptions_gu_IN;
getCollationOptions_ha_GH;
+getCollationOptions_haw_US;
getCollationOptions_he_IL;
getCollationOptions_hi_IN;
getCollationOptions_hil_PH;
+getCollationOptions_ht_HT;
getCollationOptions_hu_HU;
getCollationOptions_hy_AM;
getCollationOptions_ia;
getCollationOptions_id_ID;
getCollationOptions_ja_JP;
+getCollationOptions_jbo;
getCollationOptions_kk_KZ;
getCollationOptions_km_KH;
getCollationOptions_kn_IN;
@@ -348,6 +376,7 @@ getCollationOptions_ko_KR;
getCollationOptions_ku_TR;
getCollationOptions_ky_KG;
getCollationOptions_lg_UG;
+getCollationOptions_lif_NP;
getCollationOptions_ln_CD;
getCollationOptions_lo_LA;
getCollationOptions_mai_IN;
@@ -380,10 +409,12 @@ getCollationOptions_tn_ZA;
getCollationOptions_tpi_PG;
getCollationOptions_ts_ZA;
getCollationOptions_ug_CN;
+getCollationOptions_ur_PK;
getCollationOptions_uz_UZ;
getCollationOptions_ve_ZA;
getCollationOptions_vi_VN;
getCollationOptions_xh_ZA;
+getCollationOptions_yi_US;
getCollationOptions_zh_CN;
getCollationOptions_zh_HK;
getCollationOptions_zh_MO;
@@ -411,14 +442,17 @@ getCollatorImplementation_fa_IR;
getCollatorImplementation_gug_PY;
getCollatorImplementation_gu_IN;
getCollatorImplementation_ha_GH;
+getCollatorImplementation_haw_US;
getCollatorImplementation_he_IL;
getCollatorImplementation_hi_IN;
getCollatorImplementation_hil_PH;
+getCollatorImplementation_ht_HT;
getCollatorImplementation_hu_HU;
getCollatorImplementation_hy_AM;
getCollatorImplementation_ia;
getCollatorImplementation_id_ID;
getCollatorImplementation_ja_JP;
+getCollatorImplementation_jbo;
getCollatorImplementation_kk_KZ;
getCollatorImplementation_km_KH;
getCollatorImplementation_kn_IN;
@@ -426,6 +460,7 @@ getCollatorImplementation_ko_KR;
getCollatorImplementation_ku_TR;
getCollatorImplementation_ky_KG;
getCollatorImplementation_lg_UG;
+getCollatorImplementation_lif_NP;
getCollatorImplementation_ln_CD;
getCollatorImplementation_lo_LA;
getCollatorImplementation_mai_IN;
@@ -458,10 +493,12 @@ getCollatorImplementation_tn_ZA;
getCollatorImplementation_tpi_PG;
getCollatorImplementation_ts_ZA;
getCollatorImplementation_ug_CN;
+getCollatorImplementation_ur_PK;
getCollatorImplementation_uz_UZ;
getCollatorImplementation_ve_ZA;
getCollatorImplementation_vi_VN;
getCollatorImplementation_xh_ZA;
+getCollatorImplementation_yi_US;
getCollatorImplementation_zh_CN;
getCollatorImplementation_zh_HK;
getCollatorImplementation_zh_MO;
@@ -489,14 +526,17 @@ getContinuousNumberingLevels_fa_IR;
getContinuousNumberingLevels_gug_PY;
getContinuousNumberingLevels_gu_IN;
getContinuousNumberingLevels_ha_GH;
+getContinuousNumberingLevels_haw_US;
getContinuousNumberingLevels_he_IL;
getContinuousNumberingLevels_hi_IN;
getContinuousNumberingLevels_hil_PH;
+getContinuousNumberingLevels_ht_HT;
getContinuousNumberingLevels_hu_HU;
getContinuousNumberingLevels_hy_AM;
getContinuousNumberingLevels_ia;
getContinuousNumberingLevels_id_ID;
getContinuousNumberingLevels_ja_JP;
+getContinuousNumberingLevels_jbo;
getContinuousNumberingLevels_kk_KZ;
getContinuousNumberingLevels_km_KH;
getContinuousNumberingLevels_kn_IN;
@@ -504,6 +544,7 @@ getContinuousNumberingLevels_ko_KR;
getContinuousNumberingLevels_ku_TR;
getContinuousNumberingLevels_ky_KG;
getContinuousNumberingLevels_lg_UG;
+getContinuousNumberingLevels_lif_NP;
getContinuousNumberingLevels_ln_CD;
getContinuousNumberingLevels_lo_LA;
getContinuousNumberingLevels_mai_IN;
@@ -536,10 +577,12 @@ getContinuousNumberingLevels_tn_ZA;
getContinuousNumberingLevels_tpi_PG;
getContinuousNumberingLevels_ts_ZA;
getContinuousNumberingLevels_ug_CN;
+getContinuousNumberingLevels_ur_PK;
getContinuousNumberingLevels_uz_UZ;
getContinuousNumberingLevels_ve_ZA;
getContinuousNumberingLevels_vi_VN;
getContinuousNumberingLevels_xh_ZA;
+getContinuousNumberingLevels_yi_US;
getContinuousNumberingLevels_zh_CN;
getContinuousNumberingLevels_zh_HK;
getContinuousNumberingLevels_zh_MO;
@@ -567,14 +610,17 @@ getFollowPageWords_fa_IR;
getFollowPageWords_gug_PY;
getFollowPageWords_gu_IN;
getFollowPageWords_ha_GH;
+getFollowPageWords_haw_US;
getFollowPageWords_he_IL;
getFollowPageWords_hi_IN;
getFollowPageWords_hil_PH;
+getFollowPageWords_ht_HT;
getFollowPageWords_hu_HU;
getFollowPageWords_hy_AM;
getFollowPageWords_ia;
getFollowPageWords_id_ID;
getFollowPageWords_ja_JP;
+getFollowPageWords_jbo;
getFollowPageWords_kk_KZ;
getFollowPageWords_km_KH;
getFollowPageWords_kn_IN;
@@ -582,6 +628,7 @@ getFollowPageWords_ko_KR;
getFollowPageWords_ku_TR;
getFollowPageWords_ky_KG;
getFollowPageWords_lg_UG;
+getFollowPageWords_lif_NP;
getFollowPageWords_ln_CD;
getFollowPageWords_lo_LA;
getFollowPageWords_mai_IN;
@@ -614,10 +661,12 @@ getFollowPageWords_tn_ZA;
getFollowPageWords_tpi_PG;
getFollowPageWords_ts_ZA;
getFollowPageWords_ug_CN;
+getFollowPageWords_ur_PK;
getFollowPageWords_uz_UZ;
getFollowPageWords_ve_ZA;
getFollowPageWords_vi_VN;
getFollowPageWords_xh_ZA;
+getFollowPageWords_yi_US;
getFollowPageWords_zh_CN;
getFollowPageWords_zh_HK;
getFollowPageWords_zh_MO;
@@ -645,14 +694,17 @@ getForbiddenCharacters_fa_IR;
getForbiddenCharacters_gug_PY;
getForbiddenCharacters_gu_IN;
getForbiddenCharacters_ha_GH;
+getForbiddenCharacters_haw_US;
getForbiddenCharacters_he_IL;
getForbiddenCharacters_hi_IN;
getForbiddenCharacters_hil_PH;
+getForbiddenCharacters_ht_HT;
getForbiddenCharacters_hu_HU;
getForbiddenCharacters_hy_AM;
getForbiddenCharacters_ia;
getForbiddenCharacters_id_ID;
getForbiddenCharacters_ja_JP;
+getForbiddenCharacters_jbo;
getForbiddenCharacters_kk_KZ;
getForbiddenCharacters_km_KH;
getForbiddenCharacters_kn_IN;
@@ -660,6 +712,7 @@ getForbiddenCharacters_ko_KR;
getForbiddenCharacters_ku_TR;
getForbiddenCharacters_ky_KG;
getForbiddenCharacters_lg_UG;
+getForbiddenCharacters_lif_NP;
getForbiddenCharacters_ln_CD;
getForbiddenCharacters_lo_LA;
getForbiddenCharacters_mai_IN;
@@ -692,10 +745,12 @@ getForbiddenCharacters_tn_ZA;
getForbiddenCharacters_tpi_PG;
getForbiddenCharacters_ts_ZA;
getForbiddenCharacters_ug_CN;
+getForbiddenCharacters_ur_PK;
getForbiddenCharacters_uz_UZ;
getForbiddenCharacters_ve_ZA;
getForbiddenCharacters_vi_VN;
getForbiddenCharacters_xh_ZA;
+getForbiddenCharacters_yi_US;
getForbiddenCharacters_zh_CN;
getForbiddenCharacters_zh_HK;
getForbiddenCharacters_zh_MO;
@@ -723,14 +778,17 @@ getIndexAlgorithm_fa_IR;
getIndexAlgorithm_gug_PY;
getIndexAlgorithm_gu_IN;
getIndexAlgorithm_ha_GH;
+getIndexAlgorithm_haw_US;
getIndexAlgorithm_he_IL;
getIndexAlgorithm_hi_IN;
getIndexAlgorithm_hil_PH;
+getIndexAlgorithm_ht_HT;
getIndexAlgorithm_hu_HU;
getIndexAlgorithm_hy_AM;
getIndexAlgorithm_ia;
getIndexAlgorithm_id_ID;
getIndexAlgorithm_ja_JP;
+getIndexAlgorithm_jbo;
getIndexAlgorithm_kk_KZ;
getIndexAlgorithm_km_KH;
getIndexAlgorithm_kn_IN;
@@ -738,6 +796,7 @@ getIndexAlgorithm_ko_KR;
getIndexAlgorithm_ku_TR;
getIndexAlgorithm_ky_KG;
getIndexAlgorithm_lg_UG;
+getIndexAlgorithm_lif_NP;
getIndexAlgorithm_ln_CD;
getIndexAlgorithm_lo_LA;
getIndexAlgorithm_mai_IN;
@@ -770,10 +829,12 @@ getIndexAlgorithm_tn_ZA;
getIndexAlgorithm_tpi_PG;
getIndexAlgorithm_ts_ZA;
getIndexAlgorithm_ug_CN;
+getIndexAlgorithm_ur_PK;
getIndexAlgorithm_uz_UZ;
getIndexAlgorithm_ve_ZA;
getIndexAlgorithm_vi_VN;
getIndexAlgorithm_xh_ZA;
+getIndexAlgorithm_yi_US;
getIndexAlgorithm_zh_CN;
getIndexAlgorithm_zh_HK;
getIndexAlgorithm_zh_MO;
@@ -801,14 +862,17 @@ getLCInfo_fa_IR;
getLCInfo_gug_PY;
getLCInfo_gu_IN;
getLCInfo_ha_GH;
+getLCInfo_haw_US;
getLCInfo_he_IL;
getLCInfo_hi_IN;
getLCInfo_hil_PH;
+getLCInfo_ht_HT;
getLCInfo_hu_HU;
getLCInfo_hy_AM;
getLCInfo_ia;
getLCInfo_id_ID;
getLCInfo_ja_JP;
+getLCInfo_jbo;
getLCInfo_kk_KZ;
getLCInfo_km_KH;
getLCInfo_kn_IN;
@@ -816,6 +880,7 @@ getLCInfo_ko_KR;
getLCInfo_ku_TR;
getLCInfo_ky_KG;
getLCInfo_lg_UG;
+getLCInfo_lif_NP;
getLCInfo_ln_CD;
getLCInfo_lo_LA;
getLCInfo_mai_IN;
@@ -848,10 +913,12 @@ getLCInfo_tn_ZA;
getLCInfo_tpi_PG;
getLCInfo_ts_ZA;
getLCInfo_ug_CN;
+getLCInfo_ur_PK;
getLCInfo_uz_UZ;
getLCInfo_ve_ZA;
getLCInfo_vi_VN;
getLCInfo_xh_ZA;
+getLCInfo_yi_US;
getLCInfo_zh_CN;
getLCInfo_zh_HK;
getLCInfo_zh_MO;
@@ -879,14 +946,17 @@ getLocaleItem_fa_IR;
getLocaleItem_gug_PY;
getLocaleItem_gu_IN;
getLocaleItem_ha_GH;
+getLocaleItem_haw_US;
getLocaleItem_he_IL;
getLocaleItem_hi_IN;
getLocaleItem_hil_PH;
+getLocaleItem_ht_HT;
getLocaleItem_hu_HU;
getLocaleItem_hy_AM;
getLocaleItem_ia;
getLocaleItem_id_ID;
getLocaleItem_ja_JP;
+getLocaleItem_jbo;
getLocaleItem_kk_KZ;
getLocaleItem_km_KH;
getLocaleItem_kn_IN;
@@ -894,6 +964,7 @@ getLocaleItem_ko_KR;
getLocaleItem_ku_TR;
getLocaleItem_ky_KG;
getLocaleItem_lg_UG;
+getLocaleItem_lif_NP;
getLocaleItem_ln_CD;
getLocaleItem_lo_LA;
getLocaleItem_mai_IN;
@@ -926,10 +997,12 @@ getLocaleItem_tn_ZA;
getLocaleItem_tpi_PG;
getLocaleItem_ts_ZA;
getLocaleItem_ug_CN;
+getLocaleItem_ur_PK;
getLocaleItem_uz_UZ;
getLocaleItem_ve_ZA;
getLocaleItem_vi_VN;
getLocaleItem_xh_ZA;
+getLocaleItem_yi_US;
getLocaleItem_zh_CN;
getLocaleItem_zh_HK;
getLocaleItem_zh_MO;
@@ -957,14 +1030,17 @@ getOutlineNumberingLevels_fa_IR;
getOutlineNumberingLevels_gug_PY;
getOutlineNumberingLevels_gu_IN;
getOutlineNumberingLevels_ha_GH;
+getOutlineNumberingLevels_haw_US;
getOutlineNumberingLevels_he_IL;
getOutlineNumberingLevels_hi_IN;
getOutlineNumberingLevels_hil_PH;
+getOutlineNumberingLevels_ht_HT;
getOutlineNumberingLevels_hu_HU;
getOutlineNumberingLevels_hy_AM;
getOutlineNumberingLevels_ia;
getOutlineNumberingLevels_id_ID;
getOutlineNumberingLevels_ja_JP;
+getOutlineNumberingLevels_jbo;
getOutlineNumberingLevels_kk_KZ;
getOutlineNumberingLevels_km_KH;
getOutlineNumberingLevels_kn_IN;
@@ -972,6 +1048,7 @@ getOutlineNumberingLevels_ko_KR;
getOutlineNumberingLevels_ku_TR;
getOutlineNumberingLevels_ky_KG;
getOutlineNumberingLevels_lg_UG;
+getOutlineNumberingLevels_lif_NP;
getOutlineNumberingLevels_ln_CD;
getOutlineNumberingLevels_lo_LA;
getOutlineNumberingLevels_mai_IN;
@@ -1004,10 +1081,12 @@ getOutlineNumberingLevels_tn_ZA;
getOutlineNumberingLevels_tpi_PG;
getOutlineNumberingLevels_ts_ZA;
getOutlineNumberingLevels_ug_CN;
+getOutlineNumberingLevels_ur_PK;
getOutlineNumberingLevels_uz_UZ;
getOutlineNumberingLevels_ve_ZA;
getOutlineNumberingLevels_vi_VN;
getOutlineNumberingLevels_xh_ZA;
+getOutlineNumberingLevels_yi_US;
getOutlineNumberingLevels_zh_CN;
getOutlineNumberingLevels_zh_HK;
getOutlineNumberingLevels_zh_MO;
@@ -1035,14 +1114,17 @@ getReservedWords_fa_IR;
getReservedWords_gug_PY;
getReservedWords_gu_IN;
getReservedWords_ha_GH;
+getReservedWords_haw_US;
getReservedWords_he_IL;
getReservedWords_hi_IN;
getReservedWords_hil_PH;
+getReservedWords_ht_HT;
getReservedWords_hu_HU;
getReservedWords_hy_AM;
getReservedWords_ia;
getReservedWords_id_ID;
getReservedWords_ja_JP;
+getReservedWords_jbo;
getReservedWords_kk_KZ;
getReservedWords_km_KH;
getReservedWords_kn_IN;
@@ -1050,6 +1132,7 @@ getReservedWords_ko_KR;
getReservedWords_ku_TR;
getReservedWords_ky_KG;
getReservedWords_lg_UG;
+getReservedWords_lif_NP;
getReservedWords_ln_CD;
getReservedWords_lo_LA;
getReservedWords_mai_IN;
@@ -1082,10 +1165,12 @@ getReservedWords_tn_ZA;
getReservedWords_tpi_PG;
getReservedWords_ts_ZA;
getReservedWords_ug_CN;
+getReservedWords_ur_PK;
getReservedWords_uz_UZ;
getReservedWords_ve_ZA;
getReservedWords_vi_VN;
getReservedWords_xh_ZA;
+getReservedWords_yi_US;
getReservedWords_zh_CN;
getReservedWords_zh_HK;
getReservedWords_zh_MO;
@@ -1113,14 +1198,17 @@ getSearchOptions_fa_IR;
getSearchOptions_gug_PY;
getSearchOptions_gu_IN;
getSearchOptions_ha_GH;
+getSearchOptions_haw_US;
getSearchOptions_he_IL;
getSearchOptions_hi_IN;
getSearchOptions_hil_PH;
+getSearchOptions_ht_HT;
getSearchOptions_hu_HU;
getSearchOptions_hy_AM;
getSearchOptions_ia;
getSearchOptions_id_ID;
getSearchOptions_ja_JP;
+getSearchOptions_jbo;
getSearchOptions_kk_KZ;
getSearchOptions_km_KH;
getSearchOptions_kn_IN;
@@ -1128,6 +1216,7 @@ getSearchOptions_ko_KR;
getSearchOptions_ku_TR;
getSearchOptions_ky_KG;
getSearchOptions_lg_UG;
+getSearchOptions_lif_NP;
getSearchOptions_ln_CD;
getSearchOptions_lo_LA;
getSearchOptions_mai_IN;
@@ -1160,10 +1249,12 @@ getSearchOptions_tn_ZA;
getSearchOptions_tpi_PG;
getSearchOptions_ts_ZA;
getSearchOptions_ug_CN;
+getSearchOptions_ur_PK;
getSearchOptions_uz_UZ;
getSearchOptions_ve_ZA;
getSearchOptions_vi_VN;
getSearchOptions_xh_ZA;
+getSearchOptions_yi_US;
getSearchOptions_zh_CN;
getSearchOptions_zh_HK;
getSearchOptions_zh_MO;
@@ -1191,14 +1282,17 @@ getTransliterations_fa_IR;
getTransliterations_gug_PY;
getTransliterations_gu_IN;
getTransliterations_ha_GH;
+getTransliterations_haw_US;
getTransliterations_he_IL;
getTransliterations_hi_IN;
getTransliterations_hil_PH;
+getTransliterations_ht_HT;
getTransliterations_hu_HU;
getTransliterations_hy_AM;
getTransliterations_ia;
getTransliterations_id_ID;
getTransliterations_ja_JP;
+getTransliterations_jbo;
getTransliterations_kk_KZ;
getTransliterations_km_KH;
getTransliterations_kn_IN;
@@ -1206,6 +1300,7 @@ getTransliterations_ko_KR;
getTransliterations_ku_TR;
getTransliterations_ky_KG;
getTransliterations_lg_UG;
+getTransliterations_lif_NP;
getTransliterations_ln_CD;
getTransliterations_lo_LA;
getTransliterations_mai_IN;
@@ -1238,10 +1333,12 @@ getTransliterations_tn_ZA;
getTransliterations_tpi_PG;
getTransliterations_ts_ZA;
getTransliterations_ug_CN;
+getTransliterations_ur_PK;
getTransliterations_uz_UZ;
getTransliterations_ve_ZA;
getTransliterations_vi_VN;
getTransliterations_xh_ZA;
+getTransliterations_yi_US;
getTransliterations_zh_CN;
getTransliterations_zh_HK;
getTransliterations_zh_MO;
@@ -1269,14 +1366,17 @@ getUnicodeScripts_fa_IR;
getUnicodeScripts_gug_PY;
getUnicodeScripts_gu_IN;
getUnicodeScripts_ha_GH;
+getUnicodeScripts_haw_US;
getUnicodeScripts_he_IL;
getUnicodeScripts_hi_IN;
getUnicodeScripts_hil_PH;
+getUnicodeScripts_ht_HT;
getUnicodeScripts_hu_HU;
getUnicodeScripts_hy_AM;
getUnicodeScripts_ia;
getUnicodeScripts_id_ID;
getUnicodeScripts_ja_JP;
+getUnicodeScripts_jbo;
getUnicodeScripts_kk_KZ;
getUnicodeScripts_km_KH;
getUnicodeScripts_kn_IN;
@@ -1284,6 +1384,7 @@ getUnicodeScripts_ko_KR;
getUnicodeScripts_ku_TR;
getUnicodeScripts_ky_KG;
getUnicodeScripts_lg_UG;
+getUnicodeScripts_lif_NP;
getUnicodeScripts_ln_CD;
getUnicodeScripts_lo_LA;
getUnicodeScripts_mai_IN;
@@ -1316,17 +1417,18 @@ getUnicodeScripts_tn_ZA;
getUnicodeScripts_tpi_PG;
getUnicodeScripts_ts_ZA;
getUnicodeScripts_ug_CN;
+getUnicodeScripts_ur_PK;
getUnicodeScripts_uz_UZ;
getUnicodeScripts_ve_ZA;
getUnicodeScripts_vi_VN;
getUnicodeScripts_xh_ZA;
+getUnicodeScripts_yi_US;
getUnicodeScripts_zh_CN;
getUnicodeScripts_zh_HK;
getUnicodeScripts_zh_MO;
getUnicodeScripts_zh_SG;
getUnicodeScripts_zh_TW;
getUnicodeScripts_zu_ZA;
-GetVersionInfo;
local:
*;
diff --git a/i18npool/source/localedata/data/makefile.mk b/i18npool/source/localedata/data/makefile.mk
index 1034de7f11bf..54b412d75205 100644
--- a/i18npool/source/localedata/data/makefile.mk
+++ b/i18npool/source/localedata/data/makefile.mk
@@ -167,6 +167,7 @@ SHL3OBJS= \
$(SLO)$/localedata_de_DE.obj \
$(SLO)$/localedata_de_LI.obj \
$(SLO)$/localedata_de_LU.obj \
+ $(SLO)$/localedata_dsb_DE.obj \
$(SLO)$/localedata_el_GR.obj \
$(SLO)$/localedata_et_EE.obj \
$(SLO)$/localedata_eu.obj \
@@ -260,15 +261,18 @@ SHL4OBJS= \
$(SLO)$/localedata_fa_IR.obj \
$(SLO)$/localedata_gu_IN.obj \
$(SLO)$/localedata_gug_PY.obj \
+ $(SLO)$/localedata_haw_US.obj \
$(SLO)$/localedata_ha_GH.obj \
$(SLO)$/localedata_he_IL.obj \
$(SLO)$/localedata_hi_IN.obj \
$(SLO)$/localedata_hil_PH.obj \
+ $(SLO)$/localedata_ht_HT.obj \
$(SLO)$/localedata_hu_HU.obj \
$(SLO)$/localedata_hy_AM.obj \
$(SLO)$/localedata_ia.obj \
$(SLO)$/localedata_id_ID.obj \
$(SLO)$/localedata_ja_JP.obj \
+ $(SLO)$/localedata_jbo.obj \
$(SLO)$/localedata_kk_KZ.obj \
$(SLO)$/localedata_km_KH.obj \
$(SLO)$/localedata_kn_IN.obj \
@@ -276,6 +280,7 @@ SHL4OBJS= \
$(SLO)$/localedata_ku_TR.obj \
$(SLO)$/localedata_ky_KG.obj \
$(SLO)$/localedata_lg_UG.obj \
+ $(SLO)$/localedata_lif_NP.obj \
$(SLO)$/localedata_ln_CD.obj \
$(SLO)$/localedata_lo_LA.obj \
$(SLO)$/localedata_mai_IN.obj \
@@ -308,10 +313,12 @@ SHL4OBJS= \
$(SLO)$/localedata_tpi_PG.obj \
$(SLO)$/localedata_ts_ZA.obj \
$(SLO)$/localedata_ug_CN.obj \
+ $(SLO)$/localedata_ur_PK.obj \
$(SLO)$/localedata_uz_UZ.obj \
$(SLO)$/localedata_ve_ZA.obj \
$(SLO)$/localedata_vi_VN.obj \
$(SLO)$/localedata_xh_ZA.obj \
+ $(SLO)$/localedata_yi_US.obj \
$(SLO)$/localedata_zh_CN.obj \
$(SLO)$/localedata_zh_HK.obj \
$(SLO)$/localedata_zh_MO.obj \
diff --git a/i18npool/source/localedata/data/no_NO.xml b/i18npool/source/localedata/data/no_NO.xml
index 21ac49181020..6df7b5e2d018 100644
--- a/i18npool/source/localedata/data/no_NO.xml
+++ b/i18npool/source/localedata/data/no_NO.xml
@@ -232,7 +232,7 @@
</SearchOptions>
</LC_SEARCH>
<LC_INDEX>
-<IndexKey unoid="alphanumeric" default="true" phonetic="false">A-V X-Z Æ Ø Å</IndexKey>
+<IndexKey unoid="alphanumeric" default="true" phonetic="false">A-Z Æ Ø Å</IndexKey>
<UnicodeScript>0</UnicodeScript>
<UnicodeScript>1</UnicodeScript>
<FollowPageWord>p.</FollowPageWord>
diff --git a/i18npool/source/localedata/data/sv_SE.xml b/i18npool/source/localedata/data/sv_SE.xml
index 211f95c3e894..4afefebfa661 100644
--- a/i18npool/source/localedata/data/sv_SE.xml
+++ b/i18npool/source/localedata/data/sv_SE.xml
@@ -179,7 +179,7 @@
<LC_COLLATION ref="en_US" />
<LC_SEARCH ref="en_US"/>
<LC_INDEX>
- <IndexKey phonetic="false" default="true" unoid="alphanumeric">A-V X-Z Å Ä Ö</IndexKey>
+ <IndexKey phonetic="false" default="true" unoid="alphanumeric">A-Z Å Ä Ö</IndexKey>
<UnicodeScript>0</UnicodeScript>
<UnicodeScript>1</UnicodeScript>
<FollowPageWord>f.</FollowPageWord>
diff --git a/i18npool/source/localedata/data/ur_PK.xml b/i18npool/source/localedata/data/ur_PK.xml
new file mode 100644
index 000000000000..53002e931068
--- /dev/null
+++ b/i18npool/source/localedata/data/ur_PK.xml
@@ -0,0 +1,358 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE Locale SYSTEM 'locale.dtd'>
+<Locale versionDTD="2.0.3" allowUpdateFromCLDR="no" version="1.0">
+ <LC_INFO>
+ <Language>
+ <LangID>ur</LangID>
+ <DefaultName>Urdu</DefaultName>
+ </Language>
+ <Country>
+ <CountryID>PK</CountryID>
+ <DefaultName>Pakistan</DefaultName>
+ </Country>
+ </LC_INFO>
+ <LC_CTYPE unoid="generic">
+ <Separators>
+ <DateSeparator>/</DateSeparator>
+ <ThousandSeparator>,</ThousandSeparator>
+ <DecimalSeparator>.</DecimalSeparator>
+ <TimeSeparator>:</TimeSeparator>
+ <Time100SecSeparator>.</Time100SecSeparator>
+ <ListSeparator>;</ListSeparator>
+ <LongDateDayOfWeekSeparator>, </LongDateDayOfWeekSeparator>
+ <LongDateDaySeparator>, </LongDateDaySeparator>
+ <LongDateMonthSeparator> </LongDateMonthSeparator>
+ <LongDateYearSeparator> </LongDateYearSeparator>
+ </Separators>
+ <Markers>
+ <QuotationStart>‘</QuotationStart>
+ <QuotationEnd>’</QuotationEnd>
+ <DoubleQuotationStart>“</DoubleQuotationStart>
+ <DoubleQuotationEnd>â€</DoubleQuotationEnd>
+ </Markers>
+ <TimeAM>قبل دوپÛر</TimeAM>
+ <TimePM>بعد دوپÛر</TimePM>
+ <MeasurementSystem>metric</MeasurementSystem>
+ </LC_CTYPE>
+ <LC_FORMAT replaceFrom="[CURRENCY]" replaceTo="[$₨-420]">
+ <FormatElement msgid="FixedFormatskey1" default="true" type="medium" usage="FIXED_NUMBER" formatindex="0">
+ <FormatCode>General</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey2" default="true" type="short" usage="FIXED_NUMBER" formatindex="1">
+ <FormatCode>0</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey3" default="false" type="medium" usage="FIXED_NUMBER" formatindex="2">
+ <FormatCode>0.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey4" default="false" type="short" usage="FIXED_NUMBER" formatindex="3">
+ <FormatCode>#,##0</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey5" default="false" type="medium" usage="FIXED_NUMBER" formatindex="4">
+ <FormatCode>#,##0.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5">
+ <FormatCode>#,###.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6">
+ <FormatCode>0.00E+00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="ScientificFormatskey2" default="false" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="7">
+ <FormatCode>0.00E+000</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="PercentFormatskey1" default="true" type="short" usage="PERCENT_NUMBER" formatindex="8">
+ <FormatCode>0%</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="PercentFormatskey2" default="true" type="long" usage="PERCENT_NUMBER" formatindex="9">
+ <FormatCode>0.00%</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey1" default="true" type="short" usage="CURRENCY" formatindex="12">
+ <FormatCode>[CURRENCY]#,##0;-[CURRENCY]#,##0</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey2" default="false" type="medium" usage="CURRENCY" formatindex="13">
+ <FormatCode>[CURRENCY]#,##0.00;-[CURRENCY]#,##0.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey3" default="false" type="medium" usage="CURRENCY" formatindex="14">
+ <FormatCode>[CURRENCY]#,##0;[RED]-[CURRENCY]#,##0</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey4" default="true" type="medium" usage="CURRENCY" formatindex="15">
+ <FormatCode>[CURRENCY]#,##0.00;[RED]-[CURRENCY]#,##0.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey5" default="false" type="medium" usage="CURRENCY" formatindex="16">
+ <FormatCode>CCC#,##0.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey6" default="false" type="medium" usage="CURRENCY" formatindex="17">
+ <FormatCode>[CURRENCY]#,##0.--;[RED]-[CURRENCY]#,##0.--</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey11" default="true" type="short" usage="DATE" formatindex="18">
+ <FormatCode>D/MM/YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey14" default="true" type="long" usage="DATE" formatindex="19">
+ <FormatCode>NNNNDD, MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey6" default="true" type="medium" usage="DATE" formatindex="20">
+ <FormatCode>DD/MM/YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey5" default="false" type="medium" usage="DATE" formatindex="21">
+ <FormatCode>DD/MM/YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey15" default="false" type="long" usage="DATE" formatindex="22">
+ <FormatCode>D, MMM YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey16" default="false" type="long" usage="DATE" formatindex="23">
+ <FormatCode>D, MMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey21" default="false" type="long" usage="DATE" formatindex="24">
+ <FormatCode>D, MMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey17" default="false" type="long" usage="DATE" formatindex="25">
+ <FormatCode>D, MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey22" default="false" type="long" usage="DATE" formatindex="26">
+ <FormatCode>D, MMMM YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey10" default="false" type="medium" usage="DATE" formatindex="27">
+ <FormatCode>NN, DD/MMM/YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey18" default="false" type="long" usage="DATE" formatindex="28">
+ <FormatCode>NN, D, MMM YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey19" default="false" type="long" usage="DATE" formatindex="29">
+ <FormatCode>NN, D, MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey20" default="false" type="long" usage="DATE" formatindex="30">
+ <FormatCode>NNNND, MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey12" default="false" type="short" usage="DATE" formatindex="31">
+ <FormatCode>MM/DD</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey7" default="false" type="medium" usage="DATE" formatindex="32">
+ <FormatCode>YY-MM-DD</FormatCode>
+ <DefaultName>ISO 8601</DefaultName>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey8" default="false" type="medium" usage="DATE" formatindex="33">
+ <FormatCode>YYYY-MM-DD</FormatCode>
+ <DefaultName>ISO 8601</DefaultName>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey1" default="false" type="medium" usage="DATE" formatindex="34">
+ <FormatCode>MM/YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey2" default="false" type="medium" usage="DATE" formatindex="35">
+ <FormatCode>MMM/DD</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey3" default="false" type="medium" usage="DATE" formatindex="36">
+ <FormatCode>MMMM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey4" default="false" type="medium" usage="DATE" formatindex="37">
+ <FormatCode>QQ YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey9" default="false" type="medium" usage="DATE" formatindex="38">
+ <FormatCode>WW</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey1" default="false" type="short" usage="TIME" formatindex="39">
+ <FormatCode>HH:MM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey2" default="false" type="medium" usage="TIME" formatindex="40">
+ <FormatCode>HH:MM:SS</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey3" default="true" type="short" usage="TIME" formatindex="41">
+ <FormatCode>HH:MM AM/PM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey4" default="true" type="medium" usage="TIME" formatindex="42">
+ <FormatCode>HH:MM:SS AM/PM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey5" default="false" type="medium" usage="TIME" formatindex="43">
+ <FormatCode>[HH]:MM:SS</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey6" default="false" type="short" usage="TIME" formatindex="44">
+ <FormatCode>MM:SS.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey7" default="false" type="medium" usage="TIME" formatindex="45">
+ <FormatCode>[HH]:MM:SS.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateTimeFormatskey1" default="true" type="medium" usage="DATE_TIME" formatindex="46">
+ <FormatCode>DD/MM/YY HH:MM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateTimeFormatskey2" default="false" type="medium" usage="DATE_TIME" formatindex="47">
+ <FormatCode>DD/MM/YYYY HH:MM:SS AM/PM</FormatCode>
+ </FormatElement>
+ </LC_FORMAT>
+ <LC_COLLATION>
+ <Collator default="true" unoid="alphanumeric"/>
+ <CollationOptions>
+ <TransliterationModules>IGNORE_CASE</TransliterationModules>
+ </CollationOptions>
+ </LC_COLLATION>
+ <LC_SEARCH>
+ <SearchOptions>
+ <TransliterationModules>IGNORE_CASE</TransliterationModules>
+ </SearchOptions>
+ </LC_SEARCH>
+ <LC_INDEX>
+ <IndexKey phonetic="false" default="true" unoid="alphanumeric">Ø£ ؤ ا Ø¢ ب Ù¾ ت Ù¹ Ø« ج Ú† Ø­ Ø® د Úˆ Ø° ر Ú‘ ز Ú˜ س Ø´ ص ض Ø· ظ ع غ Ù Ù‚ Ú© Ú¯ Ù„ Ù… Ù† Úº Ùˆ Û ÛŒ Ø¡ ئ Û’ Ù» Ø© Ùº Ù¼ Ù½ Ù‡ Ú¾ ÙŠ</IndexKey>
+ <UnicodeScript>0</UnicodeScript>
+ <UnicodeScript>1</UnicodeScript>
+ <FollowPageWord>صÙØ­Û</FollowPageWord>
+ <FollowPageWord>صÙØ­Û’</FollowPageWord>
+ </LC_INDEX>
+ <LC_CALENDAR>
+ <Calendar unoid="gregorian" default="true">
+ <DaysOfWeek>
+ <Day>
+ <DayID>sun</DayID>
+ <DefaultAbbrvName>ا</DefaultAbbrvName>
+ <DefaultFullName>اتوار</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>mon</DayID>
+ <DefaultAbbrvName>Ù¾</DefaultAbbrvName>
+ <DefaultFullName>پير</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>tue</DayID>
+ <DefaultAbbrvName>Ù…</DefaultAbbrvName>
+ <DefaultFullName>منگل</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>wed</DayID>
+ <DefaultAbbrvName>ب</DefaultAbbrvName>
+ <DefaultFullName>بده</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>thu</DayID>
+ <DefaultAbbrvName>ج</DefaultAbbrvName>
+ <DefaultFullName>جمعرات</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>fri</DayID>
+ <DefaultAbbrvName>ج</DefaultAbbrvName>
+ <DefaultFullName>جمعÛ</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>sat</DayID>
+ <DefaultAbbrvName>Û</DefaultAbbrvName>
+ <DefaultFullName>ÛÙتÛ</DefaultFullName>
+ </Day>
+ </DaysOfWeek>
+ <MonthsOfYear>
+ <Month>
+ <MonthID>jan</MonthID>
+ <DefaultAbbrvName>ج</DefaultAbbrvName>
+ <DefaultFullName>جنوری</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>feb</MonthID>
+ <DefaultAbbrvName>Ù</DefaultAbbrvName>
+ <DefaultFullName>Ùروری</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>mar</MonthID>
+ <DefaultAbbrvName>Ù…</DefaultAbbrvName>
+ <DefaultFullName>مار چ</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>apr</MonthID>
+ <DefaultAbbrvName>ا</DefaultAbbrvName>
+ <DefaultFullName>اپريل</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>may</MonthID>
+ <DefaultAbbrvName>Ù…</DefaultAbbrvName>
+ <DefaultFullName>مئ</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>jun</MonthID>
+ <DefaultAbbrvName>ج</DefaultAbbrvName>
+ <DefaultFullName>جون</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>jul</MonthID>
+ <DefaultAbbrvName>ج</DefaultAbbrvName>
+ <DefaultFullName>جولائ</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>aug</MonthID>
+ <DefaultAbbrvName>ا</DefaultAbbrvName>
+ <DefaultFullName>اگست</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>sep</MonthID>
+ <DefaultAbbrvName>س</DefaultAbbrvName>
+ <DefaultFullName>ستمبر</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>oct</MonthID>
+ <DefaultAbbrvName>ا</DefaultAbbrvName>
+ <DefaultFullName>اکتوبر</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>nov</MonthID>
+ <DefaultAbbrvName>Ù†</DefaultAbbrvName>
+ <DefaultFullName>نومبر</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>dec</MonthID>
+ <DefaultAbbrvName>د</DefaultAbbrvName>
+ <DefaultFullName>دسمبر</DefaultFullName>
+ </Month>
+ </MonthsOfYear>
+ <Eras>
+ <Era>
+ <EraID>bc</EraID>
+ <DefaultAbbrvName>Ù‚ Ù…</DefaultAbbrvName>
+ <DefaultFullName>قبل مسيح</DefaultFullName>
+ </Era>
+ <Era>
+ <EraID>ad</EraID>
+ <DefaultAbbrvName>Ø¡</DefaultAbbrvName>
+ <DefaultFullName>عيسوی سن</DefaultFullName>
+ </Era>
+ </Eras>
+ <StartDayOfWeek>
+ <DayID>sun</DayID>
+ </StartDayOfWeek>
+ <MinimalDaysInFirstWeek>1</MinimalDaysInFirstWeek>
+ </Calendar>
+ </LC_CALENDAR>
+ <LC_CURRENCY>
+ <Currency default="true" usedInCompatibleFormatCodes="true">
+ <CurrencyID>PKR</CurrencyID>
+ <CurrencySymbol>₨</CurrencySymbol>
+ <BankSymbol>PKR</BankSymbol>
+ <CurrencyName>پاکستانی روپیÛ</CurrencyName>
+ <DecimalPlaces>2</DecimalPlaces>
+ </Currency>
+ </LC_CURRENCY>
+ <LC_TRANSLITERATION>
+ <Transliteration unoid="LOWERCASE_UPPERCASE"/>
+ <Transliteration unoid="UPPERCASE_LOWERCASE"/>
+ <Transliteration unoid="IGNORE_CASE"/>
+ </LC_TRANSLITERATION>
+ <LC_MISC>
+ <ReservedWords>
+ <trueWord>راست</trueWord>
+ <falseWord>غلط</falseWord>
+ <quarter1Word>ایک چوتھائی</quarter1Word>
+ <quarter2Word>دو چوتھائی</quarter2Word>
+ <quarter3Word>تین چوتھائی</quarter3Word>
+ <quarter4Word>چار چوتھائی</quarter4Word>
+ <aboveWord>اوپر</aboveWord>
+ <belowWord>نیچے</belowWord>
+ <quarter1Abbreviation>چوتھائی 1</quarter1Abbreviation>
+ <quarter2Abbreviation>چوتھائی 2 </quarter2Abbreviation>
+ <quarter3Abbreviation>چوتھائی 3</quarter3Abbreviation>
+ <quarter4Abbreviation>چوتھائی 4</quarter4Abbreviation>
+ </ReservedWords>
+ </LC_MISC>
+ <LC_NumberingLevel>
+ <NumberingLevel NumType="4" Prefix=" " Suffix=")"/>
+ <NumberingLevel NumType="4" Prefix=" " Suffix="."/>
+ <NumberingLevel NumType="4" Prefix="(" Suffix=")"/>
+ <NumberingLevel NumType="2" Prefix=" " Suffix="."/>
+ <NumberingLevel NumType="0" Prefix=" " Suffix=")"/>
+ <NumberingLevel NumType="1" Prefix=" " Suffix=")"/>
+ <NumberingLevel NumType="1" Prefix="(" Suffix=")"/>
+ <NumberingLevel NumType="3" Prefix=" " Suffix="."/>
+ </LC_NumberingLevel>
+ <LC_OutLineNumberingLevel ref="en_US"/>
+</Locale>
+<!--Version 1.0 -->
diff --git a/i18npool/source/localedata/data/yi_US.xml b/i18npool/source/localedata/data/yi_US.xml
new file mode 100644
index 000000000000..cf52c1ae1fdf
--- /dev/null
+++ b/i18npool/source/localedata/data/yi_US.xml
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE Locale SYSTEM 'locale.dtd'>
+<Locale versionDTD="2.0.3" allowUpdateFromCLDR="no" version="1.0">
+ <LC_INFO>
+ <Language>
+ <LangID>yi</LangID>
+ <DefaultName>Yiddish</DefaultName>
+ </Language>
+ <Country>
+ <CountryID>US</CountryID>
+ <DefaultName>United States</DefaultName>
+ </Country>
+ </LC_INFO>
+ <LC_CTYPE ref="en_US"/>
+ <LC_FORMAT ref="en_US" replaceTo="[$$-83D]"/>
+ <LC_COLLATION ref="en_US"/>
+ <LC_SEARCH ref="en_US"/>
+ <LC_INDEX>
+ <IndexKey phonetic="false" default="true" unoid="alphanumeric">×-×™ ×› ל מ ×  ס ×¢ פ צ-ת</IndexKey>
+ <UnicodeScript>10</UnicodeScript>
+ <FollowPageWord>ז“</FollowPageWord>
+ <FollowPageWord>ז“</FollowPageWord>
+ </LC_INDEX>
+ <LC_CALENDAR>
+ <Calendar unoid="gregorian" default="true">
+ <DaysOfWeek>
+ <Day>
+ <DayID>sun</DayID>
+ <DefaultAbbrvName>זונ'</DefaultAbbrvName>
+ <DefaultFullName>זונטיק</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>mon</DayID>
+ <DefaultAbbrvName>מ×ָנ'</DefaultAbbrvName>
+ <DefaultFullName>מ×ָנטיק</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>tue</DayID>
+ <DefaultAbbrvName>דינ'</DefaultAbbrvName>
+ <DefaultFullName>דינסטיק</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>wed</DayID>
+ <DefaultAbbrvName>מיט'</DefaultAbbrvName>
+ <DefaultFullName>מיטװ×ָך</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>thu</DayID>
+ <DefaultAbbrvName>ד×ָנ'</DefaultAbbrvName>
+ <DefaultFullName>ד×ָנערשטיק</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>fri</DayID>
+ <DefaultAbbrvName>פֿרײַ'</DefaultAbbrvName>
+ <DefaultFullName>פֿרײַטיק</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>sat</DayID>
+ <DefaultAbbrvName>שבת</DefaultAbbrvName>
+ <DefaultFullName>שבת</DefaultFullName>
+ </Day>
+ </DaysOfWeek>
+ <MonthsOfYear>
+ <Month>
+ <MonthID>jan</MonthID>
+ <DefaultAbbrvName>×™×Ö·× </DefaultAbbrvName>
+ <DefaultFullName>×™×ַנו×ַר</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>feb</MonthID>
+ <DefaultAbbrvName>פֿעב</DefaultAbbrvName>
+ <DefaultFullName>פֿעברו×ַר</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>mar</MonthID>
+ <DefaultAbbrvName>מ×ַר</DefaultAbbrvName>
+ <DefaultFullName>מ×ַרץ</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>apr</MonthID>
+ <DefaultAbbrvName>×ַפּר</DefaultAbbrvName>
+ <DefaultFullName>×ַפּריל</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>may</MonthID>
+ <DefaultAbbrvName>מײַ</DefaultAbbrvName>
+ <DefaultFullName>מײַ</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>jun</MonthID>
+ <DefaultAbbrvName>יונ</DefaultAbbrvName>
+ <DefaultFullName>יוני</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>jul</MonthID>
+ <DefaultAbbrvName>יול</DefaultAbbrvName>
+ <DefaultFullName>יולי</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>aug</MonthID>
+ <DefaultAbbrvName>××±×’</DefaultAbbrvName>
+ <DefaultFullName>×ױגוסט</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>sep</MonthID>
+ <DefaultAbbrvName>סעפּ</DefaultAbbrvName>
+ <DefaultFullName>סעפּטעמבער</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>oct</MonthID>
+ <DefaultAbbrvName>×ָקט</DefaultAbbrvName>
+ <DefaultFullName>×ָקט×ָבער</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>nov</MonthID>
+ <DefaultAbbrvName>× ×ָװ</DefaultAbbrvName>
+ <DefaultFullName>× ×ָװעמבער</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>dec</MonthID>
+ <DefaultAbbrvName>דעצ</DefaultAbbrvName>
+ <DefaultFullName>דעצעמבער</DefaultFullName>
+ </Month>
+ </MonthsOfYear>
+ <Eras>
+ <Era>
+ <EraID>bc</EraID>
+ <DefaultAbbrvName>פֿ"ק</DefaultAbbrvName>
+ <DefaultFullName>פֿ"ק</DefaultFullName>
+ </Era>
+ <Era>
+ <EraID>ad</EraID>
+ <DefaultAbbrvName>×צ“ר</DefaultAbbrvName>
+ <DefaultFullName>×צ“ר</DefaultFullName>
+ </Era>
+ </Eras>
+ <StartDayOfWeek>
+ <DayID>sun</DayID>
+ </StartDayOfWeek>
+ <MinimalDaysInFirstWeek>1</MinimalDaysInFirstWeek>
+ </Calendar>
+ </LC_CALENDAR>
+ <LC_CURRENCY ref="en_US"/>
+ <LC_TRANSLITERATION ref="en_US"/>
+ <LC_MISC>
+ <ReservedWords>
+ <trueWord>×מת</trueWord>
+ <falseWord>פֿ×ַלש</falseWord>
+ <quarter1Word>ערשט ×™×ָרפֿערטל</quarter1Word>
+ <quarter2Word>צװײט ×™×ָרפֿערטל</quarter2Word>
+ <quarter3Word>דריט ×™×ָרפֿערטל</quarter3Word>
+ <quarter4Word>פֿערט ×™×ָרפֿערטל</quarter4Word>
+ <aboveWord>×ױבן</aboveWord>
+ <belowWord>×ונטן</belowWord>
+ <quarter1Abbreviation>י“פֿ1</quarter1Abbreviation>
+ <quarter2Abbreviation>י“פֿ2</quarter2Abbreviation>
+ <quarter3Abbreviation>י“פֿ3</quarter3Abbreviation>
+ <quarter4Abbreviation>י“פֿ4</quarter4Abbreviation>
+ </ReservedWords>
+ </LC_MISC>
+ <LC_NumberingLevel ref="en_US"/>
+ <LC_OutLineNumberingLevel ref="en_US"/>
+</Locale>
diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx
index 34f4f6bbb520..8906a3433bea 100644
--- a/i18npool/source/localedata/localedata.cxx
+++ b/i18npool/source/localedata/localedata.cxx
@@ -169,6 +169,7 @@ static const struct {
{ "ast_ES", lcl_DATA_EURO },
{ "ltg_LV", lcl_DATA_EURO },
{ "hsb_DE", lcl_DATA_EURO },
+ { "dsb_DE", lcl_DATA_EURO },
{ "rue_SK", lcl_DATA_EURO },
{ "ja_JP", lcl_DATA_OTHERS },
@@ -251,6 +252,12 @@ static const struct {
{ "om_ET", lcl_DATA_OTHERS },
{ "plt_MG", lcl_DATA_OTHERS },
{ "mai_IN", lcl_DATA_OTHERS },
+ { "yi_US", lcl_DATA_OTHERS },
+ { "haw_US", lcl_DATA_OTHERS },
+ { "lif_NP", lcl_DATA_OTHERS },
+ { "ur_PK", lcl_DATA_OTHERS },
+ { "ht_HT", lcl_DATA_OTHERS },
+ { "jbo", lcl_DATA_OTHERS }
};
static const sal_Unicode under = sal_Unicode('_');
diff --git a/i18npool/source/paper/paper.cxx b/i18npool/source/paper/paper.cxx
index e94efa6e06c5..0d9235747fd6 100644
--- a/i18npool/source/paper/paper.cxx
+++ b/i18npool/source/paper/paper.cxx
@@ -27,6 +27,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_i18npool.hxx"
+
+#include <osl/diagnose.h>
#include <sal/config.h>
#include <rtl/ustring.hxx>
#include <rtl/string.hxx>
@@ -129,7 +131,6 @@ static PageDesc aDinTab[] =
{ MM2MM100( 227 ), MM2MM100( 356 ), "SuperA", NULL },
{ MM2MM100( 305 ), MM2MM100( 487 ), "SuperB", NULL },
{ IN2MM100( 8.5 ), IN2MM100( 12.69 ), "LetterPlus", NULL },
- { IN2MM100( 8.5 ), IN2MM100( 12.69 ), "LetterPlus", NULL },
{ MM2MM100( 210 ), MM2MM100( 330 ), "A4Plus", NULL },
{ MM2MM100( 200 ), MM2MM100( 148 ), "DoublePostcard", NULL },
{ MM2MM100( 105 ), MM2MM100( 148 ), "A6", NULL },
@@ -385,6 +386,9 @@ PaperInfo PaperInfo::getSystemDefaultPaper()
PaperInfo::PaperInfo(Paper eType) : m_eType(eType)
{
+ OSL_ENSURE( sizeof(aDinTab) / sizeof(aDinTab[0]) == NUM_PAPER_ENTRIES,
+ "mismatch between array entries and enum values" );
+
m_nPaperWidth = aDinTab[m_eType].m_nWidth;
m_nPaperHeight = aDinTab[m_eType].m_nHeight;
}
diff --git a/l10ntools/inc/cfgmerge.hxx b/l10ntools/inc/cfgmerge.hxx
index ae0708f5ff05..2f6418e1aa3f 100644
--- a/l10ntools/inc/cfgmerge.hxx
+++ b/l10ntools/inc/cfgmerge.hxx
@@ -76,13 +76,13 @@ public:
CfgStack() : CfgStackList( 10, 10 ) {}
~CfgStack();
- ULONG Push( CfgStackData *pStackData );
+ sal_uLong Push( CfgStackData *pStackData );
CfgStackData *Push( const ByteString &rTag, const ByteString &rId );
CfgStackData *Pop() { return Remove( Count() - 1 ); }
- CfgStackData *GetStackData( ULONG nPos = LIST_APPEND );
+ CfgStackData *GetStackData( sal_uLong nPos = LIST_APPEND );
- ByteString GetAccessPath( ULONG nPos = LIST_APPEND );
+ ByteString GetAccessPath( sal_uLong nPos = LIST_APPEND );
};
//
@@ -101,7 +101,7 @@ protected:
CfgStack aStack;
CfgStackData *pStackData;
- BOOL bLocalize;
+ sal_Bool bLocalize;
virtual void WorkOnText(
ByteString &rText,
@@ -121,7 +121,7 @@ private:
const ByteString &rIsoLang,
const ByteString &rResTyp );
-BOOL IsTokenClosed( const ByteString &rToken );
+sal_Bool IsTokenClosed( const ByteString &rToken );
public:
CfgParser();
@@ -181,9 +181,9 @@ private:
std::vector<ByteString> aLanguages;
ResData *pResData;
- BOOL bGerman;
+ sal_Bool bGerman;
ByteString sFilename;
- BOOL bEnglish;
+ sal_Bool bEnglish;
protected:
void WorkOnText(
diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx
index 222cd3bf5cb8..b315d6cb3040 100644
--- a/l10ntools/inc/export.hxx
+++ b/l10ntools/inc/export.hxx
@@ -61,7 +61,7 @@
struct eqstr{
- BOOL operator()(const char* s1, const char* s2) const{
+ sal_Bool operator()(const char* s1, const char* s2) const{
return strcmp(s1,s2)==0;
}
};
@@ -114,11 +114,11 @@ DECLARE_LIST( ExportListBase, ExportListEntry * )
class ExportList : public ExportListBase
{
private:
- ULONG nSourceLanguageListEntryCount;
+ sal_uLong nSourceLanguageListEntryCount;
public:
ExportList() : ExportListBase() { nSourceLanguageListEntryCount = 0; }
- ULONG GetSourceLanguageListEntryCount() { return nSourceLanguageListEntryCount; }
+ sal_uLong GetSourceLanguageListEntryCount() { return nSourceLanguageListEntryCount; }
void NewSourceLanguageListEntry() { nSourceLanguageListEntryCount++; }
};
@@ -144,21 +144,21 @@ class ResData
{
public:
~ResData();
- BOOL SetId( const ByteString &rId, USHORT nLevel );
+ sal_Bool SetId( const ByteString &rId, sal_uInt16 nLevel );
- USHORT nWidth;
- USHORT nChildIndex;
- USHORT nIdLevel;
- BOOL bChild;
- BOOL bChildWithText;
+ sal_uInt16 nWidth;
+ sal_uInt16 nChildIndex;
+ sal_uInt16 nIdLevel;
+ sal_Bool bChild;
+ sal_Bool bChildWithText;
- BOOL bText;
- BOOL bHelpText;
- BOOL bQuickHelpText;
- BOOL bTitle;
- BOOL bList;
+ sal_Bool bText;
+ sal_Bool bHelpText;
+ sal_Bool bQuickHelpText;
+ sal_Bool bTitle;
+ sal_Bool bList;
- BOOL bRestMerged;
+ sal_Bool bRestMerged;
ByteString sResTyp;
ByteString sId;
@@ -167,16 +167,16 @@ public:
ByteString sFilename;
ByteStringHashMap sText;
- USHORT nTextRefId;
+ sal_uInt16 nTextRefId;
ByteStringHashMap sHelpText;
- USHORT nHelpTextRefId;
+ sal_uInt16 nHelpTextRefId;
ByteStringHashMap sQuickHelpText;
- USHORT nQuickHelpTextRefId;
+ sal_uInt16 nQuickHelpTextRefId;
ByteStringHashMap sTitle;
- USHORT nTitleRefId;
+ sal_uInt16 nTitleRefId;
ByteString sTextTyp;
ByteStringHashMap aFallbackData;
@@ -201,14 +201,14 @@ public:
nWidth( 0 ),
nChildIndex( 0 ),
nIdLevel( ID_LEVEL_NULL ),
- bChild( FALSE ),
- bChildWithText( FALSE ),
- bText( FALSE ),
- bHelpText( FALSE ),
- bQuickHelpText( FALSE ),
- bTitle( FALSE ),
- bList( FALSE ),
- bRestMerged( FALSE ),
+ bChild( sal_False ),
+ bChildWithText( sal_False ),
+ bText( sal_False ),
+ bHelpText( sal_False ),
+ bQuickHelpText( sal_False ),
+ bTitle( sal_False ),
+ bList( sal_False ),
+ bRestMerged( sal_False ),
sGId( rGId ),
nTextRefId( REFID_NONE ),
nHelpTextRefId( REFID_NONE ),
@@ -229,14 +229,14 @@ public:
:
nChildIndex( 0 ),
nIdLevel( ID_LEVEL_NULL ),
- bChild( FALSE ),
- bChildWithText( FALSE ),
- bText( FALSE ),
- bHelpText( FALSE ),
- bQuickHelpText( FALSE ),
- bTitle( FALSE ),
- bList( FALSE ),
- bRestMerged( FALSE ),
+ bChild( sal_False ),
+ bChildWithText( sal_False ),
+ bText( sal_False ),
+ bHelpText( sal_False ),
+ bQuickHelpText( sal_False ),
+ bTitle( sal_False ),
+ bList( sal_False ),
+ bRestMerged( sal_False ),
sGId( rGId ),
sFilename( rFilename ),
nTextRefId( REFID_NONE ),
@@ -300,23 +300,23 @@ private:
ByteString sActPForm; // hold cur. system
- BOOL bDefine; // cur. res. in a define?
- BOOL bNextMustBeDefineEOL; // define but no \ at lineend
- ULONG nLevel; // res. recursiv? how deep?
- USHORT nList; // cur. res. is String- or FilterList
+ sal_Bool bDefine; // cur. res. in a define?
+ sal_Bool bNextMustBeDefineEOL; // define but no \ at lineend
+ sal_uLong nLevel; // res. recursiv? how deep?
+ sal_uInt16 nList; // cur. res. is String- or FilterList
ByteString nListLang;
- ULONG nListIndex;
- ULONG nListLevel;
+ sal_uLong nListIndex;
+ sal_uLong nListLevel;
bool bSkipFile;
ByteString sProject;
ByteString sRoot;
- BOOL bEnableExport;
- BOOL bMergeMode;
+ sal_Bool bEnableExport;
+ sal_Bool bMergeMode;
ByteString sMergeSrc;
ByteString sLastListLine;
- BOOL bError; // any errors while export?
- BOOL bReadOver;
- BOOL bDontWriteOutput;
+ sal_Bool bError; // any errors while export?
+ sal_Bool bReadOver;
+ sal_Bool bDontWriteOutput;
ByteString sLastTextTyp;
static bool isInitialized;
ByteString sFilename;
@@ -339,7 +339,7 @@ public:
static bool hasUTF8ByteOrderMarker( const ByteString &rString );
static void RemoveUTF8ByteOrderMarkerFromFile( const ByteString &rFilename );
static bool fileHasUTF8ByteOrderMarker( const ByteString &rString );
- static ByteString GetIsoLangByIndex( USHORT nIndex );
+ static ByteString GetIsoLangByIndex( sal_uInt16 nIndex );
static void QuotHTML( ByteString &rString );
static bool CopyFile( const ByteString& source , const ByteString& dest );
@@ -364,7 +364,7 @@ public:
static void FillInFallbacks( ResData *pResData );
static void FillInListFallbacks( ExportList *pList, const ByteString &nSource, const ByteString &nFallback );
static ByteString GetTimeStamp();
- static BOOL ConvertLineEnds( ByteString sSource, ByteString sDestination );
+ static sal_Bool ConvertLineEnds( ByteString sSource, ByteString sDestination );
static ByteString GetNativeFile( ByteString sSource );
static DirEntry GetTempFile();
@@ -375,11 +375,11 @@ private:
static std::vector<ByteString> aLanguages;
static std::vector<ByteString> aForcedLanguages;
- BOOL ListExists( ResData *pResData, USHORT nLst );
+ sal_Bool ListExists( ResData *pResData, sal_uInt16 nLst );
- BOOL WriteData( ResData *pResData, BOOL bCreateNew = FALSE );// called befor dest. cur ResData
- BOOL WriteExportList( ResData *pResData, ExportList *pExportList,
- const ByteString &rTyp, BOOL bCreateNew = FALSE );
+ sal_Bool WriteData( ResData *pResData, sal_Bool bCreateNew = sal_False );// called befor dest. cur ResData
+ sal_Bool WriteExportList( ResData *pResData, ExportList *pExportList,
+ const ByteString &rTyp, sal_Bool bCreateNew = sal_False );
ByteString MergePairedList( ByteString& sLine , ByteString& sText );
@@ -396,10 +396,10 @@ private:
void CleanValue( ByteString &rValue );
ByteString GetText( const ByteString &rSource, int nToken );
- BOOL PrepareTextToMerge( ByteString &rText, USHORT nTyp,
+ sal_Bool PrepareTextToMerge( ByteString &rText, sal_uInt16 nTyp,
ByteString &nLangIndex, ResData *pResData );
- void MergeRest( ResData *pResData, USHORT nMode = MERGE_MODE_NORMAL );
+ void MergeRest( ResData *pResData, sal_uInt16 nMode = MERGE_MODE_NORMAL );
void ConvertMergeContent( ByteString &rText );
void WriteToMerged( const ByteString &rText , bool bSDFContent );
@@ -408,17 +408,17 @@ private:
void CutComment( ByteString &rText );
public:
- Export( const ByteString &rOutput, BOOL bWrite,
+ Export( const ByteString &rOutput, sal_Bool bWrite,
const ByteString &rPrj, const ByteString &rPrjRoot , const ByteString& rFile );
- Export( const ByteString &rOutput, BOOL bWrite,
+ Export( const ByteString &rOutput, sal_Bool bWrite,
const ByteString &rPrj, const ByteString &rPrjRoot,
const ByteString &rMergeSource , const ByteString& rFile );
~Export();
void Init();
int Execute( int nToken, const char * pToken ); // called from lexer
- void SetError() { bError = TRUE; }
- BOOL GetError() { return bError; }
+ void SetError() { bError = sal_True; }
+ sal_Bool GetError() { return bError; }
};
@@ -459,8 +459,8 @@ public:
sTitle[ nId ] = rTitle;
bTitleFirst[ nId ] = true;
}
- BOOL GetText( ByteString &rReturn, USHORT nTyp, const ByteString &nLangIndex, BOOL bDel = FALSE );
- BOOL GetTransex3Text( ByteString &rReturn, USHORT nTyp, const ByteString &nLangIndex, BOOL bDel = FALSE );
+ sal_Bool GetText( ByteString &rReturn, sal_uInt16 nTyp, const ByteString &nLangIndex, sal_Bool bDel = sal_False );
+ sal_Bool GetTransex3Text( ByteString &rReturn, sal_uInt16 nTyp, const ByteString &nLangIndex, sal_Bool bDel = sal_False );
};
@@ -494,7 +494,7 @@ public:
PFormEntrys* GetPFObject( const ByteString& rPFO );
ByteString Dump();
- BOOL operator==( ResData *pData );
+ sal_Bool operator==( ResData *pData );
};
//
@@ -508,7 +508,7 @@ public:
class MergeDataFile
{
private:
- BOOL bErrorLog;
+ sal_Bool bErrorLog;
ByteString sErrorLog;
SvFileStream aErrLog;
MergeDataHashMap aMap;
@@ -525,7 +525,7 @@ class MergeDataFile
void WriteError( const ByteString &rLine );
public:
- MergeDataFile( const ByteString &rFileName, const ByteString& rFile , BOOL bErrLog, CharSet aCharSet, bool bCaseSensitive = false );
+ MergeDataFile( const ByteString &rFileName, const ByteString& rFile , sal_Bool bErrLog, CharSet aCharSet, bool bCaseSensitive = false );
~MergeDataFile();
std::vector<ByteString> GetLanguages();
diff --git a/l10ntools/inc/gsicheck.hxx b/l10ntools/inc/gsicheck.hxx
index fb1eecd38c82..6779557a4bb6 100644
--- a/l10ntools/inc/gsicheck.hxx
+++ b/l10ntools/inc/gsicheck.hxx
@@ -41,7 +41,7 @@ private:
ParserMessageList aMessages;
LineFormat aFormat;
- ULONG nLineNumber;
+ sal_uLong nLineNumber;
ByteString aUniqId;
ByteString aLineType;
@@ -50,15 +50,15 @@ private:
ByteString aQuickHelpText;
ByteString aTitle;
- BOOL bOK;
- BOOL bFixed;
+ sal_Bool bOK;
+ sal_Bool bFixed;
void ReassembleLine();
public:
- GSILine( const ByteString &rLine, ULONG nLine );
+ GSILine( const ByteString &rLine, sal_uLong nLine );
LineFormat GetLineFormat() const { return aFormat; }
- ULONG GetLineNumber() const { return nLineNumber; }
+ sal_uLong GetLineNumber() const { return nLineNumber; }
ByteString const GetUniqId() const { return aUniqId; }
ByteString const GetLineType() const { return aLineType; }
@@ -74,13 +74,13 @@ public:
void SetTitle( ByteString &aNew ) { aTitle = aNew; ReassembleLine(); }
ParserMessageList* GetMessageList() { return &aMessages; };
- BOOL HasMessages(){ return ( aMessages.Count() > 0 ); };
+ sal_Bool HasMessages(){ return ( aMessages.Count() > 0 ); };
- BOOL IsOK() const { return bOK; }
+ sal_Bool IsOK() const { return bOK; }
void NotOK();
- BOOL IsFixed() const { return bFixed; }
- void SetFixed() { bFixed = TRUE; };
+ sal_Bool IsFixed() const { return bFixed; }
+ void SetFixed() { bFixed = sal_True; };
};
//
@@ -97,31 +97,31 @@ private:
GSILine *pSourceLine;
GSILine *pReferenceLine;
void PrintList( ParserMessageList *pList, ByteString aPrefix, GSILine *pLine );
- BOOL bPrintContext;
- BOOL bCheckSourceLang;
- BOOL bCheckTranslationLang;
- BOOL bReference;
- BOOL bAllowKeyIDs;
- BOOL bAllowSuspicious;
+ sal_Bool bPrintContext;
+ sal_Bool bCheckSourceLang;
+ sal_Bool bCheckTranslationLang;
+ sal_Bool bReference;
+ sal_Bool bAllowKeyIDs;
+ sal_Bool bAllowSuspicious;
- BOOL bHasBlockError;
+ sal_Bool bHasBlockError;
- BOOL IsUTF8( const ByteString &aTestee, BOOL bFixTags, USHORT &nErrorPos, ByteString &aErrorMsg, BOOL &bHasBeenFixed, ByteString &aFixed ) const;
- BOOL TestUTF8( GSILine* pTestee, BOOL bFixTags );
- BOOL HasSuspiciousChars( GSILine* pTestee, GSILine* pSource );
+ sal_Bool IsUTF8( const ByteString &aTestee, sal_Bool bFixTags, sal_uInt16 &nErrorPos, ByteString &aErrorMsg, sal_Bool &bHasBeenFixed, ByteString &aFixed ) const;
+ sal_Bool TestUTF8( GSILine* pTestee, sal_Bool bFixTags );
+ sal_Bool HasSuspiciousChars( GSILine* pTestee, GSILine* pSource );
public:
- GSIBlock( BOOL PbPrintContext, BOOL bSource, BOOL bTrans, BOOL bRef, BOOL bAllowKID, BOOL bAllowSusp );
+ GSIBlock( sal_Bool PbPrintContext, sal_Bool bSource, sal_Bool bTrans, sal_Bool bRef, sal_Bool bAllowKID, sal_Bool bAllowSusp );
~GSIBlock();
- void PrintMessage( ByteString aType, ByteString aMsg, ByteString aPrefix, ByteString aContext, ULONG nLine, ByteString aUniqueId = ByteString() );
- void PrintError( ByteString aMsg, ByteString aPrefix, ByteString aContext, ULONG nLine, ByteString aUniqueId = ByteString() );
+ void PrintMessage( ByteString aType, ByteString aMsg, ByteString aPrefix, ByteString aContext, sal_uLong nLine, ByteString aUniqueId = ByteString() );
+ void PrintError( ByteString aMsg, ByteString aPrefix, ByteString aContext, sal_uLong nLine, ByteString aUniqueId = ByteString() );
void InsertLine( GSILine* pLine, const ByteString aSourceLang);
void SetReferenceLine( GSILine* pLine );
- BOOL CheckSyntax( ULONG nLine, BOOL bRequireSourceLine, BOOL bFixTags );
+ sal_Bool CheckSyntax( sal_uLong nLine, sal_Bool bRequireSourceLine, sal_Bool bFixTags );
- void WriteError( LazySvFileStream &aErrOut, BOOL bRequireSourceLine );
- void WriteCorrect( LazySvFileStream &aOkOut, BOOL bRequireSourceLine );
- void WriteFixed( LazySvFileStream &aFixOut, BOOL bRequireSourceLine );
+ void WriteError( LazySvFileStream &aErrOut, sal_Bool bRequireSourceLine );
+ void WriteCorrect( LazySvFileStream &aOkOut, sal_Bool bRequireSourceLine );
+ void WriteFixed( LazySvFileStream &aFixOut, sal_Bool bRequireSourceLine );
};
#endif
diff --git a/l10ntools/inc/l10ntools/vosapp.hxx b/l10ntools/inc/l10ntools/vosapp.hxx
index 49e10e15e3d4..ccfe07006f76 100644
--- a/l10ntools/inc/l10ntools/vosapp.hxx
+++ b/l10ntools/inc/l10ntools/vosapp.hxx
@@ -10,19 +10,19 @@
class Application
{
public:
- USHORT GetCommandLineParamCount();
- XubString GetCommandLineParam( USHORT nParam );
+ sal_uInt16 GetCommandLineParamCount();
+ XubString GetCommandLineParam( sal_uInt16 nParam );
virtual void Main() = 0;
};
// Urg: Cut & Paste from svapp.cxx: we don't want to depend on vcl
-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;
diff --git a/l10ntools/inc/lngmerge.hxx b/l10ntools/inc/lngmerge.hxx
index 843d1a6de3d2..dce939386539 100644
--- a/l10ntools/inc/lngmerge.hxx
+++ b/l10ntools/inc/lngmerge.hxx
@@ -43,11 +43,11 @@ DECLARE_LIST( LngLineList, ByteString * )
class LngParser
{
private:
- USHORT nError;
+ sal_uInt16 nError;
LngLineList *pLines;
ByteString sSource;
- BOOL bDBIsUTF8;
- BOOL bULF;
+ sal_Bool bDBIsUTF8;
+ sal_Bool bULF;
bool bQuiet;
std::vector<ByteString> aLanguages;
@@ -58,9 +58,9 @@ private:
const ByteString &rPrj ,
const ByteString &rRoot , const ByteString &sActFileName , const ByteString &sID );
public:
- LngParser( const ByteString &rLngFile, BOOL bUTF8, BOOL bULFFormat );
+ LngParser( const ByteString &rLngFile, sal_Bool bUTF8, sal_Bool bULFFormat );
~LngParser();
- BOOL CreateSDF( const ByteString &rSDFFile, const ByteString &rPrj, const ByteString &rRoot );
- BOOL Merge( const ByteString &rSDFFile, const ByteString &rDestinationFile , const ByteString &rPrj );
+ sal_Bool CreateSDF( const ByteString &rSDFFile, const ByteString &rPrj, const ByteString &rRoot );
+ sal_Bool Merge( const ByteString &rSDFFile, const ByteString &rDestinationFile , const ByteString &rPrj );
};
diff --git a/l10ntools/inc/srciter.hxx b/l10ntools/inc/srciter.hxx
index 36061346fe16..91e2c20a768a 100644
--- a/l10ntools/inc/srciter.hxx
+++ b/l10ntools/inc/srciter.hxx
@@ -49,7 +49,7 @@ public:
SourceTreeIterator( const ByteString &rRootDirectory, const ByteString &rVersion , bool bLocal_in = false);
virtual ~SourceTreeIterator();
- BOOL StartExecute();
+ sal_Bool StartExecute();
void EndExecute();
virtual void OnExecuteDirectory( const rtl::OUString &rDirectory );
diff --git a/l10ntools/inc/tagtest.hxx b/l10ntools/inc/tagtest.hxx
index 3e9b03916f4f..ef2a696d71d7 100644
--- a/l10ntools/inc/tagtest.hxx
+++ b/l10ntools/inc/tagtest.hxx
@@ -34,9 +34,9 @@
class GSILine;
-typedef USHORT TokenId;
+typedef sal_uInt16 TokenId;
-#define TOK_INVALIDPOS USHORT( 0xFFFF )
+#define TOK_INVALIDPOS sal_uInt16( 0xFFFF )
class ParserMessage;
@@ -74,24 +74,24 @@ private:
String aTagName;
StringHashMap aProperties;
- BOOL bClosed; // tag is closed <sdnf/>
- BOOL bCloseTag; // tag is close Tag </sdnf>
+ sal_Bool bClosed; // tag is closed <sdnf/>
+ sal_Bool bCloseTag; // tag is close Tag </sdnf>
- BOOL bIsBroken;
- BOOL bHasBeenFixed;
- BOOL bDone;
+ sal_Bool bIsBroken;
+ sal_Bool bHasBeenFixed;
+ sal_Bool bDone;
public:
String aTokenString;
TokenId nId;
- USHORT nPos; // Position in String
+ sal_uInt16 nPos; // Position in String
- TokenInfo():bClosed(FALSE),bCloseTag(FALSE),bIsBroken(FALSE),bHasBeenFixed(FALSE),bDone(FALSE),nId( 0 ){;}
-explicit TokenInfo( TokenId pnId, USHORT nP ):bClosed(FALSE),bCloseTag(FALSE),bIsBroken(FALSE),bHasBeenFixed(FALSE),bDone(FALSE),nId( pnId ),nPos(nP){;}
-explicit TokenInfo( TokenId pnId, USHORT nP, String paStr ):bClosed(FALSE),bCloseTag(FALSE),bIsBroken(FALSE),bHasBeenFixed(FALSE),bDone(FALSE),aTokenString( paStr ),nId( pnId ),nPos(nP) {;}
-explicit TokenInfo( TokenId pnId, USHORT nP, String paStr, ParserMessageList &rErrorList );
+ TokenInfo():bClosed(sal_False),bCloseTag(sal_False),bIsBroken(sal_False),bHasBeenFixed(sal_False),bDone(sal_False),nId( 0 ){;}
+explicit TokenInfo( TokenId pnId, sal_uInt16 nP ):bClosed(sal_False),bCloseTag(sal_False),bIsBroken(sal_False),bHasBeenFixed(sal_False),bDone(sal_False),nId( pnId ),nPos(nP){;}
+explicit TokenInfo( TokenId pnId, sal_uInt16 nP, String paStr ):bClosed(sal_False),bCloseTag(sal_False),bIsBroken(sal_False),bHasBeenFixed(sal_False),bDone(sal_False),aTokenString( paStr ),nId( pnId ),nPos(nP) {;}
+explicit TokenInfo( TokenId pnId, sal_uInt16 nP, String paStr, ParserMessageList &rErrorList );
String GetTagName() const;
@@ -100,35 +100,35 @@ explicit TokenInfo( TokenId pnId, USHORT nP, String paStr, ParserMessageList
/**
Is the property to be ignored or does it have the default value anyways
**/
- BOOL IsPropertyRelevant( const ByteString &aName, const String &aValue ) const;
- BOOL IsPropertyValueValid( const ByteString &aName, const String &aValue ) const;
+ sal_Bool IsPropertyRelevant( const ByteString &aName, const String &aValue ) const;
+ sal_Bool IsPropertyValueValid( const ByteString &aName, const String &aValue ) const;
/**
Does the property contain the same value for all languages
e.g.: the href in a link tag
**/
- BOOL IsPropertyInvariant( const ByteString &aName, const String &aValue ) const;
+ sal_Bool IsPropertyInvariant( const ByteString &aName, const String &aValue ) const;
/**
a subset of IsPropertyInvariant but containing only those that are fixable
we dont wat to fix e.g.: ahelp :: visibility
**/
- BOOL IsPropertyFixable( const ByteString &aName ) const;
- BOOL MatchesTranslation( TokenInfo& rInfo, BOOL bGenErrors, ParserMessageList &rErrorList, BOOL bFixTags = FALSE ) const;
+ sal_Bool IsPropertyFixable( const ByteString &aName ) const;
+ sal_Bool MatchesTranslation( TokenInfo& rInfo, sal_Bool bGenErrors, ParserMessageList &rErrorList, sal_Bool bFixTags = sal_False ) const;
- BOOL IsDone() const { return bDone; }
- void SetDone( BOOL bNew = TRUE ) { bDone = bNew; }
+ sal_Bool IsDone() const { return bDone; }
+ void SetDone( sal_Bool bNew = sal_True ) { bDone = bNew; }
- BOOL HasBeenFixed() const { return bHasBeenFixed; }
- void SetHasBeenFixed( BOOL bNew = TRUE ) { bHasBeenFixed = bNew; }
+ sal_Bool HasBeenFixed() const { return bHasBeenFixed; }
+ void SetHasBeenFixed( sal_Bool bNew = sal_True ) { bHasBeenFixed = bNew; }
};
class ParserMessageList : public Impl_ParserMessageList
{
public:
- void AddError( USHORT nErrorNr, ByteString aErrorText, const TokenInfo &rTag );
- void AddWarning( USHORT nErrorNr, ByteString aErrorText, const TokenInfo &rTag );
+ void AddError( sal_uInt16 nErrorNr, ByteString aErrorText, const TokenInfo &rTag );
+ void AddWarning( sal_uInt16 nErrorNr, ByteString aErrorText, const TokenInfo &rTag );
- BOOL HasErrors();
+ sal_Bool HasErrors();
};
@@ -235,13 +235,13 @@ public:
void Clear()
{
- for ( ULONG i = 0 ; i < Count() ; i++ )
+ for ( sal_uLong i = 0 ; i < Count() ; i++ )
delete TokenListImpl::GetObject( i );
TokenListImpl::Clear();
}
- void Insert( TokenInfo p, ULONG nIndex = LIST_APPEND )
+ void Insert( TokenInfo p, sal_uLong nIndex = LIST_APPEND )
{ TokenListImpl::Insert( new TokenInfo(p), nIndex ); }
-/* TokenInfo Remove( ULONG nIndex )
+/* TokenInfo Remove( sal_uLong nIndex )
{
TokenInfo aT = GetObject( nIndex );
delete TokenListImpl::GetObject( nIndex );
@@ -250,16 +250,16 @@ public:
}*/
// TokenInfo Remove( TokenInfo p ){ return Remove( GetPos( p ) ); }
// TokenInfo GetCurObject() const { return *TokenListImpl::GetCurObject(); }
- TokenInfo& GetObject( ULONG nIndex ) const
+ TokenInfo& GetObject( sal_uLong nIndex ) const
{
// if ( TokenListImpl::GetObject(nIndex) )
return *TokenListImpl::GetObject(nIndex);
// else
// return TokenInfo();
}
-/* ULONG GetPos( const TokenInfo p ) const
+/* sal_uLong GetPos( const TokenInfo p ) const
{
- for ( ULONG i = 0 ; i < Count() ; i++ )
+ for ( sal_uLong i = 0 ; i < Count() ; i++ )
if ( p == GetObject( i ) )
return i;
return LIST_ENTRY_NOTFOUND;
@@ -267,7 +267,7 @@ public:
TokenList( const TokenList& rList );
/* {
- for ( ULONG i = 0 ; i < rList.Count() ; i++ )
+ for ( sal_uLong i = 0 ; i < rList.Count() ; i++ )
{
Insert( rList.GetObject( i ), LIST_APPEND );
}
@@ -276,54 +276,54 @@ public:
class ParserMessage
{
- USHORT nErrorNr;
+ sal_uInt16 nErrorNr;
ByteString aErrorText;
- USHORT nTagBegin,nTagLength;
+ sal_uInt16 nTagBegin,nTagLength;
protected:
- ParserMessage( USHORT PnErrorNr, ByteString PaErrorText, const TokenInfo &rTag );
+ ParserMessage( sal_uInt16 PnErrorNr, ByteString PaErrorText, const TokenInfo &rTag );
public:
- USHORT GetErrorNr() { return nErrorNr; }
+ sal_uInt16 GetErrorNr() { return nErrorNr; }
ByteString GetErrorText() { return aErrorText; }
- USHORT GetTagBegin() { return nTagBegin; }
- USHORT GetTagLength() { return nTagLength; }
+ sal_uInt16 GetTagBegin() { return nTagBegin; }
+ sal_uInt16 GetTagLength() { return nTagLength; }
virtual ~ParserMessage() {}
- virtual BOOL IsError() =0;
+ virtual sal_Bool IsError() =0;
virtual ByteString Prefix() =0;
};
class ParserError : public ParserMessage
{
public:
- ParserError( USHORT PnErrorNr, ByteString PaErrorText, const TokenInfo &rTag );
+ ParserError( sal_uInt16 PnErrorNr, ByteString PaErrorText, const TokenInfo &rTag );
- virtual BOOL IsError() {return TRUE;};
+ virtual sal_Bool IsError() {return sal_True;};
virtual ByteString Prefix() {return "Error:"; };
};
class ParserWarning : public ParserMessage
{
public:
- ParserWarning( USHORT PnErrorNr, ByteString PaErrorText, const TokenInfo &rTag );
+ ParserWarning( sal_uInt16 PnErrorNr, ByteString PaErrorText, const TokenInfo &rTag );
- virtual BOOL IsError() {return FALSE;};
+ virtual sal_Bool IsError() {return sal_False;};
virtual ByteString Prefix() {return "Warning:"; };
};
class SimpleParser
{
private:
- USHORT nPos;
+ sal_uInt16 nPos;
String aSource;
String aLastToken;
TokenList aTokenList;
TokenInfo aNextTag; // to store closetag in case of combined tags like <br/>
- String GetNextTokenString( ParserMessageList &rErrorList, USHORT &rTokeStartPos );
+ String GetNextTokenString( ParserMessageList &rErrorList, sal_uInt16 &rTokeStartPos );
public:
SimpleParser();
@@ -335,9 +335,9 @@ public:
class TokenParser
{
- BOOL match( const TokenInfo &aCurrentToken, const TokenId &aExpectedToken );
- BOOL match( const TokenInfo &aCurrentToken, const TokenInfo &aExpectedToken );
- void ParseError( USHORT nErrNr, ByteString aErrMsg, const TokenInfo &rTag );
+ sal_Bool match( const TokenInfo &aCurrentToken, const TokenId &aExpectedToken );
+ sal_Bool match( const TokenInfo &aCurrentToken, const TokenInfo &aExpectedToken );
+ void ParseError( sal_uInt16 nErrNr, ByteString aErrMsg, const TokenInfo &rTag );
void Paragraph();
void PfCase();
void PfCaseBegin();
@@ -353,7 +353,7 @@ class TokenParser
TokenId nPfCaseOptions;
TokenId nAppCaseOptions;
- BOOL bPfCaseActive ,bAppCaseActive;
+ sal_Bool bPfCaseActive ,bAppCaseActive;
TokenId nActiveRefTypes;
@@ -363,7 +363,7 @@ public:
TokenParser();
void Parse( const String &aCode, ParserMessageList* pList );
// ParserMessageList& GetErrors(){ return aErrorList; }
-// BOOL HasErrors(){ return ( aErrorList.Count() > 0 ); }
+// sal_Bool HasErrors(){ return ( aErrorList.Count() > 0 ); }
TokenList& GetTokenList(){ return aParser.GetTokenList(); }
};
@@ -373,21 +373,21 @@ private:
TokenParser aReferenceParser;
TokenParser aTesteeParser;
ParserMessageList aCompareWarningList;
- void CheckTags( TokenList &aReference, TokenList &aTestee, BOOL bFixTags );
- BOOL IsTagMandatory( TokenInfo const &aToken, TokenId &aMetaTokens );
+ void CheckTags( TokenList &aReference, TokenList &aTestee, sal_Bool bFixTags );
+ sal_Bool IsTagMandatory( TokenInfo const &aToken, TokenId &aMetaTokens );
String aFixedTestee;
public:
void CheckReference( GSILine *aReference );
- void CheckTestee( GSILine *aTestee, BOOL bHasSourceLine, BOOL bFixTags );
+ void CheckTestee( GSILine *aTestee, sal_Bool bHasSourceLine, sal_Bool bFixTags );
// ParserMessageList& GetReferenceErrors(){ return aReferenceParser.GetErrors(); }
-// BOOL HasReferenceErrors(){ return aReferenceParser.HasErrors(); }
+// sal_Bool HasReferenceErrors(){ return aReferenceParser.HasErrors(); }
// ParserMessageList& GetTesteeErrors(){ return aTesteeParser.GetErrors(); }
-// BOOL HasTesteeErrors(){ return aTesteeParser.HasErrors(); }
+// sal_Bool HasTesteeErrors(){ return aTesteeParser.HasErrors(); }
ParserMessageList& GetCompareWarnings(){ return aCompareWarningList; }
- BOOL HasCompareWarnings(){ return ( aCompareWarningList.Count() > 0 ); }
+ sal_Bool HasCompareWarnings(){ return ( aCompareWarningList.Count() > 0 ); }
String GetFixedTestee(){ return aFixedTestee; }
};
diff --git a/l10ntools/inc/wtranode.hxx b/l10ntools/inc/wtranode.hxx
index af01a4b29d5c..99afe462a9ab 100644
--- a/l10ntools/inc/wtranode.hxx
+++ b/l10ntools/inc/wtranode.hxx
@@ -80,7 +80,7 @@ class WTT_Node // WordTransTree-Node
// INQUIRY
E_TokenType TokenType() const;
UINT8 Value() const;
- BOOL IsOnDeleting() const;
+ sal_Bool IsOnDeleting() const;
const ByteString & ReplaceString() const;
private:
@@ -102,7 +102,7 @@ WTT_Node::TokenType() const
inline UINT8
WTT_Node::Value() const
{ return nValue; }
-inline BOOL
+inline sal_Bool
WTT_Node::IsOnDeleting() const
{ return bIsOnDeleting; }
inline const ByteString &
diff --git a/l10ntools/inc/wtratree.hxx b/l10ntools/inc/wtratree.hxx
index 6fd33a7cb413..5ed45d350348 100644
--- a/l10ntools/inc/wtratree.hxx
+++ b/l10ntools/inc/wtratree.hxx
@@ -81,7 +81,7 @@ class WordTransTree
E_Result TransformNextToken();
// INQUIRY
- BOOL TextEndReached() const;
+ sal_Bool TextEndReached() const;
const char * Output() const;
// These 3 functions are valid between two calls of
@@ -132,7 +132,7 @@ class WordTransTree
-inline BOOL
+inline sal_Bool
WordTransTree::TextEndReached() const
{ return pInputPosition == pInputEnd; }
inline const char *
diff --git a/l10ntools/inc/xmlparse.hxx b/l10ntools/inc/xmlparse.hxx
index 69e74a83ec47..5be58ffb50a7 100644
--- a/l10ntools/inc/xmlparse.hxx
+++ b/l10ntools/inc/xmlparse.hxx
@@ -87,7 +87,7 @@ public:
void setValue(const String &rValue){sValue=rValue;}
/// returns true if two attributes are equal and have the same value
- BOOL IsEqual(
+ sal_Bool IsEqual(
const XMLAttribute &rAttribute // the attribute which has to be equal
)
{
@@ -107,7 +107,7 @@ protected:
XMLNode() {}
public:
- virtual USHORT GetNodeType() = 0;
+ virtual sal_uInt16 GetNodeType() = 0;
virtual ~XMLNode() {}
};
@@ -126,7 +126,7 @@ protected:
XMLChildNode( const XMLChildNode& obj);
XMLChildNode& operator=(const XMLChildNode& obj);
public:
- virtual USHORT GetNodeType() = 0;
+ virtual sal_uInt16 GetNodeType() = 0;
/// returns the parent of this node
XMLParentNode *GetParent() { return pParent; }
@@ -162,7 +162,7 @@ protected:
public:
- virtual USHORT GetNodeType() = 0;
+ virtual sal_uInt16 GetNodeType() = 0;
/// returns child list of this node
XMLChildNodeList *GetChildList() { return pChildList; }
@@ -201,7 +201,7 @@ typedef std::hash_map<ByteString , LangHashMap* ,
typedef std::hash_map<ByteString, int, hashByteString,equalByteString> HashMap;
/// Mapping XML tag names <-> have localizable strings
-typedef std::hash_map<ByteString , BOOL ,
+typedef std::hash_map<ByteString , sal_Bool ,
hashByteString,equalByteString> TagMap;
/** Holds information of a XML file, is root node of tree
@@ -219,7 +219,7 @@ public:
~XMLFile();
ByteString* GetGroupID(std::deque<ByteString> &groupid);
- void Print( XMLNode *pCur = NULL, USHORT nLevel = 0 );
+ void Print( XMLNode *pCur = NULL, sal_uInt16 nLevel = 0 );
virtual void SearchL10NElements( XMLParentNode *pCur, int pos = 0 );
void Extract( XMLFile *pCur = NULL );
void View();
@@ -227,14 +227,14 @@ public:
void showType(XMLParentNode* node);
XMLHashMap* GetStrings(){return XMLStrings;}
- BOOL Write( ByteString &rFilename );
- BOOL Write( ofstream &rStream , XMLNode *pCur = NULL );
+ sal_Bool Write( ByteString &rFilename );
+ sal_Bool Write( ofstream &rStream , XMLNode *pCur = NULL );
bool CheckExportStatus( XMLParentNode *pCur = NULL );// , int pos = 0 );
XMLFile& operator=(const XMLFile& obj);
- virtual USHORT GetNodeType();
+ virtual sal_uInt16 GetNodeType();
/// returns file name
const String &GetName() { return sFileName; }
@@ -275,10 +275,10 @@ public:
static void UnQuotHTML ( String &rString );
/// Return the numeric iso language code
- //USHORT GetLangByIsoLang( const ByteString &rIsoLang );
+ //sal_uInt16 GetLangByIsoLang( const ByteString &rIsoLang );
/// Return the alpha strings representation
- ByteString GetIsoLangByIndex( USHORT nIndex );
+ ByteString GetIsoLangByIndex( sal_uInt16 nIndex );
static XMLUtil& Instance();
~XMLUtil();
@@ -344,7 +344,7 @@ public:
XMLElement& operator=(const XMLElement& obj);
/// returns node type XML_NODE_ELEMENT
- virtual USHORT GetNodeType();
+ virtual sal_uInt16 GetNodeType();
/// returns element name
const String &GetName() { return sElementName; }
@@ -414,7 +414,7 @@ public:
XMLData(const XMLData& obj);
XMLData& operator=(const XMLData& obj);
- virtual USHORT GetNodeType();
+ virtual sal_uInt16 GetNodeType();
/// returns the data
const String &GetData() { return sData; }
@@ -446,7 +446,7 @@ public:
)
: XMLChildNode( Parent ), sComment( rComment ) {}
- virtual USHORT GetNodeType();
+ virtual sal_uInt16 GetNodeType();
XMLComment( const XMLComment& obj );
@@ -478,7 +478,7 @@ public:
XMLDefault& operator=(const XMLDefault& obj);
/// returns node type XML_NODE_TYPE_COMMENT
- virtual USHORT GetNodeType();
+ virtual sal_uInt16 GetNodeType();
/// returns the comment
const String &GetDefault() { return sDefault; }
@@ -490,8 +490,8 @@ public:
*/
struct XMLError {
XML_Error eCode; // the error code
- ULONG nLine; // error line number
- ULONG nColumn; // error column number
+ sal_uLong nLine; // error line number
+ sal_uLong nColumn; // error column number
String sMessage; // readable error message
};
diff --git a/l10ntools/inc/xrmmerge.hxx b/l10ntools/inc/xrmmerge.hxx
index e8c3d322c92b..91981aa41619 100644
--- a/l10ntools/inc/xrmmerge.hxx
+++ b/l10ntools/inc/xrmmerge.hxx
@@ -38,8 +38,8 @@ private:
ByteString sGID;
ByteString sLID;
- BOOL bError;
- BOOL bText;
+ sal_Bool bError;
+ sal_Bool bText;
bool sLocalized;
@@ -74,8 +74,8 @@ public:
int Execute( int nToken, char * pToken );
- void SetError( BOOL bErr = TRUE ) { bError = bErr; }
- BOOL GetError() { return bError; }
+ void SetError( sal_Bool bErr = sal_True ) { bError = bErr; }
+ sal_Bool GetError() { return bError; }
};
//
diff --git a/l10ntools/layout/layoutparse.cxx b/l10ntools/layout/layoutparse.cxx
index 6bb839a9409e..f24cc432bf41 100644
--- a/l10ntools/layout/layoutparse.cxx
+++ b/l10ntools/layout/layoutparse.cxx
@@ -44,7 +44,7 @@ LayoutXMLFile::SearchL10NElements( XMLParentNode* pCur, int )
/* Recurse int children, SearchL10NElements does not do that for us. */
if ( XMLChildNodeList* lst = pCur->GetChildList() )
- for ( ULONG i = 0; i < lst->Count(); i++ )
+ for ( sal_uLong i = 0; i < lst->Count(); i++ )
if ( lst->GetObject( i )->GetNodeType() == XML_NODE_TYPE_ELEMENT )
HandleElement( ( XMLElement* )lst->GetObject( i ) );
else if ( lst->GetObject( i )->GetNodeType() == XML_NODE_TYPE_COMMENT )
@@ -56,7 +56,7 @@ interestingAttributes( XMLAttributeList* lst )
{
std::vector<XMLAttribute*> interesting;
if ( lst )
- for ( ULONG i = 0; i < lst->Count(); i++ )
+ for ( sal_uLong i = 0; i < lst->Count(); i++ )
if ( lst->GetObject( i )->Equals( STRING( "id" ) ) )
interesting.insert( interesting.begin(), lst->GetObject( i ) );
else if ( ! BSTRING( *lst->GetObject( i ) ).CompareTo( "_", 1 ) )
@@ -116,7 +116,7 @@ void LayoutXMLFile::InsertL10NElement( ByteString const& id, XMLElement* element
(*languageMap)[ language ] = element;
}
-BOOL LayoutXMLFile::Write( ByteString &aFilename )
+sal_Bool LayoutXMLFile::Write( ByteString &aFilename )
{
if ( aFilename.Len() )
diff --git a/l10ntools/layout/layoutparse.hxx b/l10ntools/layout/layoutparse.hxx
index cd24f091d318..2cf560b96893 100644
--- a/l10ntools/layout/layoutparse.hxx
+++ b/l10ntools/layout/layoutparse.hxx
@@ -38,7 +38,7 @@ public:
LayoutXMLFile( bool mergeMode );
void SearchL10NElements( XMLParentNode *pCur, int pos = 0 );
- BOOL Write( ByteString &aFilename );
+ sal_Bool Write( ByteString &aFilename );
void HandleElement( XMLElement* element );
void InsertL10NElement( ByteString const& id, XMLElement* element );
diff --git a/l10ntools/layout/tralay.cxx b/l10ntools/layout/tralay.cxx
index 72fd1a1d8c5e..9e6fa32bb094 100644
--- a/l10ntools/layout/tralay.cxx
+++ b/l10ntools/layout/tralay.cxx
@@ -111,7 +111,7 @@ static ByteString ConvertSystemPath( const ByteString& rPath )
ByteString TranslateLayout::GetCommandLineParam( int i )
{
- return ByteString( OUSTRING_CSTR( Application::GetCommandLineParam( sal::static_int_cast< USHORT >( i ) ) ) );
+ return ByteString( OUSTRING_CSTR( Application::GetCommandLineParam( sal::static_int_cast< sal_uInt16 >( i ) ) ) );
}
ByteString TranslateLayout::GetOptionArgument( int const i )
@@ -163,7 +163,7 @@ void TranslateLayout::ParseCommandLine()
static XMLAttribute*
findAttribute( XMLAttributeList* lst, String const& name )
{
- for ( ULONG i = 0; i < lst->Count(); i++ )
+ for ( sal_uLong i = 0; i < lst->Count(); i++ )
if ( lst->GetObject( i )->Equals( name ) )
return lst->GetObject( i );
return 0;
@@ -243,7 +243,7 @@ static void insertMarker( XMLParentNode *p, ByteString const& file )
if ( XMLChildNodeList* lst = p->GetChildList() )
if ( lst->Count() )
{
- ULONG i = 1;
+ sal_uLong i = 1;
// Skip newline, if possible.
if ( lst->Count() > 1
&& lst->GetObject( 2 )->GetNodeType() == XML_NODE_TYPE_DEFAULT )
@@ -260,7 +260,7 @@ void TranslateLayout::MergeLanguage( ByteString const& language )
ByteString xmlFile = mFiles.front();
MergeDataFile mergeData( mLocalize, xmlFile,
- FALSE, RTL_TEXTENCODING_MS_1252 );
+ sal_False, RTL_TEXTENCODING_MS_1252 );
DirEntry aFile( xmlFile );
SimpleXMLParser aParser;
diff --git a/l10ntools/scripts/localize.pl b/l10ntools/scripts/localize.pl
index 323f7fe549b6..e432869d3a7b 100755
--- a/l10ntools/scripts/localize.pl
+++ b/l10ntools/scripts/localize.pl
@@ -175,7 +175,7 @@ sub splitfile{
exit( -1 );
}
my $src_root = $ENV{SOURCE_ROOT_DIR};
- my $ooo_src_root = $ENV{SRC_ROOT};
+ my $ooo_src_root = $src_root."/l10n/l10n";
my $so_l10n_path = $src_root."/sun/l10n_so/source";
my $ooo_l10n_path = $ooo_src_root."/l10n/source";
diff --git a/l10ntools/scripts/tool/l10ntool.py b/l10ntools/scripts/tool/l10ntool.py
index b65c262b6020..126b991c377b 100644
--- a/l10ntools/scripts/tool/l10ntool.py
+++ b/l10ntools/scripts/tool/l10ntool.py
@@ -122,6 +122,11 @@ class AbstractL10nTool:
pass
try:
+ os.remove(outputfilename)
+ except:
+ pass
+
+ try:
shutil.copy(inputfilename, outputfilename)
except IOError:
print "ERROR: Can not copy file '" + inputfilename + "' to " + "'" + outputfilename + "'"
diff --git a/l10ntools/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx
index e8feee1fe3c8..ab53f28a1092 100644
--- a/l10ntools/source/cfgmerge.cxx
+++ b/l10ntools/source/cfgmerge.cxx
@@ -54,11 +54,11 @@ extern "C" { int YYWarning( char * ); }
#define STATE_FORCE 0x000B
// set of global variables
-BOOL bEnableExport;
-BOOL bMergeMode;
-BOOL bErrorLog;
-BOOL bForce;
-BOOL bUTF8;
+sal_Bool bEnableExport;
+sal_Bool bMergeMode;
+sal_Bool bErrorLog;
+sal_Bool bForce;
+sal_Bool bUTF8;
ByteString sPrj;
ByteString sPrjRoot;
ByteString sInputFileName;
@@ -77,18 +77,18 @@ extern "C" {
extern char *GetOutputFile( int argc, char* argv[])
/*****************************************************************************/
{
- bEnableExport = FALSE;
- bMergeMode = FALSE;
- bErrorLog = TRUE;
- bForce = FALSE;
- bUTF8 = TRUE;
+ bEnableExport = sal_False;
+ bMergeMode = sal_False;
+ bErrorLog = sal_True;
+ bForce = sal_False;
+ bUTF8 = sal_True;
sPrj = "";
sPrjRoot = "";
sInputFileName = "";
sActFileName = "";
- USHORT nState = STATE_NON;
- BOOL bInput = FALSE;
+ sal_uInt16 nState = STATE_NON;
+ sal_Bool bInput = sal_False;
// parse command line
for( int i = 1; i < argc; i++ ) {
@@ -112,19 +112,19 @@ extern char *GetOutputFile( int argc, char* argv[])
}
else if ( sSwitch == "-E" ) {
nState = STATE_ERRORLOG;
- bErrorLog = FALSE;
+ bErrorLog = sal_False;
}
else if ( sSwitch == "-UTF8" ) {
nState = STATE_UTF8;
- bUTF8 = TRUE;
+ bUTF8 = sal_True;
}
else if ( sSwitch == "-NOUTF8" ) {
nState = STATE_UTF8;
- bUTF8 = FALSE;
+ bUTF8 = sal_False;
}
else if ( sSwitch == "-F" ) {
nState = STATE_FORCE;
- bForce = TRUE;
+ bForce = sal_True;
}
else if ( sSwitch == "-L" ) {
nState = STATE_LANGUAGES;
@@ -139,7 +139,7 @@ extern char *GetOutputFile( int argc, char* argv[])
}
case STATE_INPUT: {
sInputFileName = argv[ i ];
- bInput = TRUE; // source file found
+ bInput = sal_True; // source file found
}
break;
case STATE_OUTPUT: {
@@ -157,7 +157,7 @@ extern char *GetOutputFile( int argc, char* argv[])
break;
case STATE_MERGESRC: {
sMergeSrc = ByteString( argv[ i ]);
- bMergeMode = TRUE; // activate merge mode, cause merge database found
+ bMergeMode = sal_True; // activate merge mode, cause merge database found
}
break;
case STATE_LANGUAGES: {
@@ -170,7 +170,7 @@ extern char *GetOutputFile( int argc, char* argv[])
if ( bInput ) {
// command line is valid
- bEnableExport = TRUE;
+ bEnableExport = sal_True;
char *pReturn = new char[ sOutputFile.Len() + 1 ];
strcpy( pReturn, sOutputFile.GetBuffer()); // #100211# - checked
return pReturn;
@@ -309,19 +309,19 @@ CfgStackData* CfgStack::Push( const ByteString &rTag, const ByteString &rId )
CfgStack::~CfgStack()
/*****************************************************************************/
{
- for ( ULONG i = 0; i < Count(); i++ )
+ for ( sal_uLong i = 0; i < Count(); i++ )
delete GetObject( i );
}
/*****************************************************************************/
-ByteString CfgStack::GetAccessPath( ULONG nPos )
+ByteString CfgStack::GetAccessPath( sal_uLong nPos )
/*****************************************************************************/
{
if ( nPos == LIST_APPEND )
nPos = Count() - 1;
ByteString sReturn;
- for ( ULONG i = 0; i <= nPos; i++ ) {
+ for ( sal_uLong i = 0; i <= nPos; i++ ) {
if ( i )
sReturn += ".";
sReturn += GetStackData( i )->GetIdentifier();
@@ -331,7 +331,7 @@ ByteString CfgStack::GetAccessPath( ULONG nPos )
}
/*****************************************************************************/
-CfgStackData *CfgStack::GetStackData( ULONG nPos )
+CfgStackData *CfgStack::GetStackData( sal_uLong nPos )
/*****************************************************************************/
{
if ( nPos == LIST_APPEND )
@@ -348,7 +348,7 @@ CfgStackData *CfgStack::GetStackData( ULONG nPos )
CfgParser::CfgParser()
/*****************************************************************************/
: pStackData( NULL ),
- bLocalize( FALSE )
+ bLocalize( sal_False )
{
}
@@ -360,7 +360,7 @@ CfgParser::~CfgParser()
/*****************************************************************************/
-BOOL CfgParser::IsTokenClosed( const ByteString &rToken )
+sal_Bool CfgParser::IsTokenClosed( const ByteString &rToken )
/*****************************************************************************/
{
return rToken.GetChar( rToken.Len() - 2 ) == '/';
@@ -374,7 +374,7 @@ void CfgParser::AddText(
)
/*****************************************************************************/
{
- USHORT nTextLen = 0;
+ sal_uInt16 nTextLen = 0;
while ( rText.Len() != nTextLen ) {
nTextLen = rText.Len();
rText.SearchAndReplaceAll( "\n", " " );
@@ -407,7 +407,7 @@ int CfgParser::ExecuteAnalyzedToken( int nToken, char *pToken )
ByteString sTokenName;
ByteString sTokenId;
- BOOL bOutput = TRUE;
+ sal_Bool bOutput = sal_True;
switch ( nToken ) {
case CFG_TOKEN_PACKAGE:
@@ -439,7 +439,7 @@ int CfgParser::ExecuteAnalyzedToken( int nToken, char *pToken )
break;
case CFG_TOKEN_OORNAME:
sSearch = "oor:name=";
- bLocalize = TRUE;
+ bLocalize = sal_True;
break;
case CFG_TOKEN_OORVALUE:
sSearch = "oor:value=";
@@ -459,7 +459,7 @@ int CfgParser::ExecuteAnalyzedToken( int nToken, char *pToken )
sCurrentIsoLang = sTemp.GetToken( 1, '\"' ).GetToken( 0, '\"' );
if ( sCurrentIsoLang == NO_TRANSLATE_ISO )
- bLocalize = FALSE;
+ bLocalize = sal_False;
pStackData->sTextTag = sToken;
@@ -477,7 +477,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=\"TRUE\"" ) != STRING_NOTFOUND ));
+ ( sTemp.Search( "CFG:LOCALIZED=\"sal_True\"" ) != STRING_NOTFOUND ));
}
}
else if ( sTokenName == "label" ) {
@@ -514,11 +514,11 @@ int CfgParser::ExecuteAnalyzedToken( int nToken, char *pToken )
case CFG_TEXTCHAR:
sCurrentText += sToken;
- bOutput = FALSE;
+ bOutput = sal_False;
break;
case CFG_TOKEN_NO_TRANSLATE:
- bLocalize = FALSE;
+ bLocalize = sal_False;
break;
}
@@ -723,9 +723,9 @@ CfgMerge::CfgMerge(
: CfgOutputParser( rOutputFile ),
pMergeDataFile( NULL ),
pResData( NULL ),
- bGerman( FALSE ),
+ bGerman( sal_False ),
sFilename( rFilename ),
- bEnglish( FALSE )
+ bEnglish( sal_False )
{
if ( rMergeSource.Len()){
pMergeDataFile = new MergeDataFile(
@@ -775,9 +775,9 @@ void CfgMerge::WorkOnText(
}
//if ( nLangIndex.EqualsIgnoreCaseAscii("de") )
- // bGerman = TRUE;
+ // bGerman = sal_True;
if (( nLangIndex.EqualsIgnoreCaseAscii("en-US") ))
- bEnglish = TRUE;
+ bEnglish = sal_True;
PFormEntrys *pEntrys = pMergeDataFile->GetPFormEntrysCaseSensitive( pResData );
if ( pEntrys ) {
@@ -805,7 +805,7 @@ void CfgMerge::Output( const ByteString& rOutput )
pOutputStream->Write( rOutput.GetBuffer(), rOutput.Len());
}
-ULONG CfgStack::Push( CfgStackData *pStackData )
+sal_uLong CfgStack::Push( CfgStackData *pStackData )
{
Insert( pStackData, LIST_APPEND );
return Count() - 1;
@@ -825,7 +825,7 @@ void CfgMerge::WorkOnRessourceEnd()
sCur = aLanguages[ n ];
ByteString sContent;
- pEntrys->GetText( sContent, STRING_TYP_TEXT, sCur , TRUE );
+ pEntrys->GetText( sContent, STRING_TYP_TEXT, sCur , sal_True );
if (
// (!sCur.EqualsIgnoreCaseAscii("de") ) &&
( !sCur.EqualsIgnoreCaseAscii("en-US") ) &&
@@ -867,6 +867,6 @@ void CfgMerge::WorkOnRessourceEnd()
}
delete pResData;
pResData = NULL;
- bGerman = FALSE;
- bEnglish = FALSE;
+ bGerman = sal_False;
+ bEnglish = sal_False;
}
diff --git a/l10ntools/source/directory.cxx b/l10ntools/source/directory.cxx
index a36f8bd2361f..f7330a9b5ed9 100644
--- a/l10ntools/source/directory.cxx
+++ b/l10ntools/source/directory.cxx
@@ -107,7 +107,7 @@ void Directory::readDirectory()
void Directory::readDirectory ( const rtl::OUString& sFullpath )
{
- BOOL fFinished;
+ sal_Bool fFinished;
HANDLE hList;
TCHAR szDir[MAX_PATH+1];
TCHAR szSubDir[MAX_PATH+1];
@@ -128,7 +128,7 @@ void Directory::readDirectory ( const rtl::OUString& sFullpath )
}
else
{
- fFinished = FALSE;
+ fFinished = sal_False;
while (!fFinished)
{
@@ -157,7 +157,7 @@ void Directory::readDirectory ( const rtl::OUString& sFullpath )
{
if (GetLastError() == ERROR_NO_MORE_FILES)
{
- fFinished = TRUE;
+ fFinished = sal_True;
}
}
}
diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index d6c7a9533309..1012e19b6064 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -56,12 +56,12 @@ Export *pExport = 0L;
// set of global variables
DECLARE_LIST( FileList, ByteString * )
FileList aInputFileList;
-BOOL bEnableExport;
-BOOL bMergeMode;
-BOOL bErrorLog;
-BOOL bBreakWhenHelpText;
-BOOL bUnmerge;
-BOOL bUTF8;
+sal_Bool bEnableExport;
+sal_Bool bMergeMode;
+sal_Bool bErrorLog;
+sal_Bool bBreakWhenHelpText;
+sal_Bool bUnmerge;
+sal_Bool bUTF8;
ByteString sPrj;
ByteString sPrjRoot;
ByteString sActFileName;
@@ -84,12 +84,12 @@ extern "C" {
extern char *GetOutputFile( int argc, char* argv[])
/*****************************************************************************/
{
- bEnableExport = FALSE;
- bMergeMode = FALSE;
- bErrorLog = TRUE;
- bBreakWhenHelpText = FALSE;
- bUnmerge = FALSE;
- bUTF8 = TRUE;
+ bEnableExport = sal_False;
+ bMergeMode = sal_False;
+ bErrorLog = sal_True;
+ bBreakWhenHelpText = sal_False;
+ bUnmerge = sal_False;
+ bUTF8 = sal_True;
sPrj = "";
sPrjRoot = "";
sActFileName = "";
@@ -97,8 +97,8 @@ extern char *GetOutputFile( int argc, char* argv[])
Export::sForcedLanguages = "";
sTempFile = "";
pTempFile = NULL;
- USHORT nState = STATE_NON;
- BOOL bInput = FALSE;
+ sal_uInt16 nState = STATE_NON;
+ sal_Bool bInput = sal_False;
// parse command line
for( int i = 1; i < argc; i++ ) {
@@ -122,24 +122,24 @@ extern char *GetOutputFile( int argc, char* argv[])
}
else if (sSwitch == "-e" || sSwitch == "-E" ) {
nState = STATE_ERRORLOG;
- bErrorLog = FALSE;
+ bErrorLog = sal_False;
}
else if (sSwitch == "-b" || sSwitch == "-B" ) {
nState = STATE_BREAKHELP;
- bBreakWhenHelpText = TRUE;
+ bBreakWhenHelpText = sal_True;
}
else if (sSwitch == "-u" || sSwitch == "-U" ) {
nState = STATE_UNMERGE;
- bUnmerge = TRUE;
- bMergeMode = TRUE;
+ bUnmerge = sal_True;
+ bMergeMode = sal_True;
}
else if ( sSwitch.ToUpperAscii() == "-UTF8" ) {
nState = STATE_UTF8;
- bUTF8 = TRUE;
+ bUTF8 = sal_True;
}
else if ( sSwitch.ToUpperAscii() == "-NOUTF8" ) {
nState = STATE_UTF8;
- bUTF8 = FALSE;
+ bUTF8 = sal_False;
}
else if ( sSwitch == "-l" || sSwitch == "-L" ) {
nState = STATE_LANGUAGES;
@@ -151,7 +151,7 @@ extern char *GetOutputFile( int argc, char* argv[])
}
case STATE_INPUT: {
aInputFileList.Insert( new ByteString( argv[ i ]), LIST_APPEND );
- bInput = TRUE; // min. one source file found
+ bInput = sal_True; // min. one source file found
}
break;
case STATE_OUTPUT: {
@@ -168,7 +168,7 @@ extern char *GetOutputFile( int argc, char* argv[])
break;
case STATE_MERGESRC: {
sMergeSrc = ByteString( argv[ i ]);
- bMergeMode = TRUE; // activate merge mode, cause merge database found
+ bMergeMode = sal_True; // activate merge mode, cause merge database found
}
break;
case STATE_LANGUAGES: {
@@ -181,7 +181,7 @@ extern char *GetOutputFile( int argc, char* argv[])
if( bUnmerge ) sMergeSrc = ByteString();
if ( bInput ) {
// command line is valid
- bEnableExport = TRUE;
+ bEnableExport = sal_True;
char *pReturn = new char[ sOutputFile.Len() + 1 ];
strcpy( pReturn, sOutputFile.GetBuffer()); // #100211# - checked
return pReturn;
@@ -238,8 +238,8 @@ extern FILE *GetNextFile()
ByteString sOrigFile( sFileName );
sFileName = Export::GetNativeFile( sFileName );
- delete aInputFileList.GetObject(( ULONG ) 0 );
- aInputFileList.Remove(( ULONG ) 0 );
+ delete aInputFileList.GetObject(( sal_uLong ) 0 );
+ aInputFileList.Remove(( sal_uLong ) 0 );
if ( sFileName == "" ) {
fprintf( stderr, "ERROR: Could not precompile File %s\n",
@@ -324,7 +324,7 @@ int GetError()
// get error at global instance of class Export
if ( pExport->GetError())
return 1;
- return FALSE;
+ return sal_False;
}
}
@@ -372,7 +372,7 @@ bool ResData::isMerged( ByteString& sLang ){
}
/*****************************************************************************/
-BOOL ResData::SetId( const ByteString &rId, USHORT nLevel )
+sal_Bool ResData::SetId( const ByteString &rId, sal_uInt16 nLevel )
/*****************************************************************************/
{
if ( nLevel > nIdLevel )
@@ -396,10 +396,10 @@ BOOL ResData::SetId( const ByteString &rId, USHORT nLevel )
sId.EraseTrailingChars( '\t' );
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//
@@ -407,14 +407,14 @@ BOOL ResData::SetId( const ByteString &rId, USHORT nLevel )
//
/*****************************************************************************/
-Export::Export( const ByteString &rOutput, BOOL bWrite,
+Export::Export( const ByteString &rOutput, sal_Bool bWrite,
const ByteString &rPrj, const ByteString &rPrjRoot , const ByteString& rFile )
/*****************************************************************************/
:
pWordTransformer( NULL ),
aCharSet( RTL_TEXTENCODING_MS_1252 ),
- bDefine( FALSE ),
- bNextMustBeDefineEOL( FALSE ),
+ bDefine( sal_False ),
+ bNextMustBeDefineEOL( sal_False ),
nLevel( 0 ),
nList( LIST_NON ),
nListIndex( 0 ),
@@ -424,9 +424,9 @@ Export::Export( const ByteString &rOutput, BOOL bWrite,
sRoot( sPrjRoot ),
bEnableExport( bWrite ),
bMergeMode( bUnmerge ),
- bError( FALSE ),
- bReadOver( FALSE ),
- bDontWriteOutput( FALSE ),
+ bError( sal_False ),
+ bReadOver( sal_False ),
+ bDontWriteOutput( sal_False ),
sFilename( rFile )
{
pParseQueue = new ParserQueue( *this );
@@ -451,15 +451,15 @@ Export::Export( const ByteString &rOutput, BOOL bWrite,
}
/*****************************************************************************/
-Export::Export( const ByteString &rOutput, BOOL bWrite,
+Export::Export( const ByteString &rOutput, sal_Bool bWrite,
const ByteString &rPrj, const ByteString &rPrjRoot,
const ByteString &rMergeSource , const ByteString& rFile )
/*****************************************************************************/
:
pWordTransformer( NULL ),
aCharSet( RTL_TEXTENCODING_MS_1252 ),
- bDefine( FALSE ),
- bNextMustBeDefineEOL( FALSE ),
+ bDefine( sal_False ),
+ bNextMustBeDefineEOL( sal_False ),
nLevel( 0 ),
nList( LIST_NON ),
nListIndex( 0 ),
@@ -468,11 +468,11 @@ Export::Export( const ByteString &rOutput, BOOL bWrite,
sProject( sPrj ),
sRoot( sPrjRoot ),
bEnableExport( bWrite ),
- bMergeMode( TRUE ),
+ bMergeMode( sal_True ),
sMergeSrc( rMergeSource ),
- bError( FALSE ),
- bReadOver( FALSE ),
- bDontWriteOutput( FALSE ),
+ bError( sal_False ),
+ bReadOver( sal_False ),
+ bDontWriteOutput( sal_False ),
sFilename( rFile )
{
(void) rPrj;
@@ -497,15 +497,15 @@ void Export::Init()
{
// resets the internal status, used before parseing another file
sActPForm = "";
- bDefine = FALSE;
- bNextMustBeDefineEOL = FALSE;
+ bDefine = sal_False;
+ bNextMustBeDefineEOL = sal_False;
nLevel = 0;
nList = LIST_NON;
nListLang = ByteString( String::CreateFromAscii(""),RTL_TEXTENCODING_ASCII_US );
nListIndex = 0;
while ( aResStack.Count()) {
- delete aResStack.GetObject(( ULONG ) 0 );
- aResStack.Remove(( ULONG ) 0 );
+ delete aResStack.GetObject(( sal_uLong ) 0 );
+ aResStack.Remove(( sal_uLong ) 0 );
}
}
@@ -519,8 +519,8 @@ Export::~Export()
if ( bEnableExport )
aOutput.Close();
while ( aResStack.Count()) {
- delete aResStack.GetObject(( ULONG ) 0 );
- aResStack.Remove(( ULONG ) 0 );
+ delete aResStack.GetObject(( sal_uLong ) 0 );
+ aResStack.Remove(( sal_uLong ) 0 );
}
if ( bMergeMode && !bUnmerge ) {
@@ -543,16 +543,16 @@ int Export::Execute( int nToken, const char * pToken )
printf("sToken = %s\n",sToken.GetBuffer());
printf("nToken = %d\n",nToken);
printf("+---------------\n"); */
- BOOL bWriteToMerged = bMergeMode;
+ sal_Bool bWriteToMerged = bMergeMode;
if ( nToken == CONDITION ) {
ByteString sTestToken( pToken );
sTestToken.EraseAllChars( '\t' );
sTestToken.EraseAllChars( ' ' );
if (( !bReadOver ) && ( sTestToken.Search( "#ifndef__RSC_PARSER" ) == 0 ))
- bReadOver = TRUE;
+ bReadOver = sal_True;
else if (( bReadOver ) && ( sTestToken.Search( "#endif" ) == 0 ))
- bReadOver = FALSE;
+ bReadOver = sal_False;
}
if ((( nToken < FILTER_LEVEL ) || ( bReadOver )) &&
(!(( bNextMustBeDefineEOL ) && ( sOrig == "\n" )))) {
@@ -596,21 +596,21 @@ int Export::Execute( int nToken, const char * pToken )
if ( bNextMustBeDefineEOL ) {
if ( nToken != RSCDEFINELEND ) {
// end of macro found, so destroy res.
- bDefine = FALSE;
+ bDefine = sal_False;
if ( bMergeMode ) {
/*if ( bDontWriteOutput && bUnmerge ) {
- bDontWriteOutput = FALSE;
- bNextMustBeDefineEOL = FALSE;
- bDefine = TRUE;
+ bDontWriteOutput = sal_False;
+ bNextMustBeDefineEOL = sal_False;
+ bDefine = sal_True;
}*/
MergeRest( pResData );
}
- bNextMustBeDefineEOL = FALSE;
+ bNextMustBeDefineEOL = sal_False;
Execute( LEVELDOWN, "" );
}
else {
// next line also in macro definition
- bNextMustBeDefineEOL = FALSE;
+ bNextMustBeDefineEOL = sal_False;
if ( bMergeMode )
WriteToMerged( sOrig , false );
return 1;
@@ -623,20 +623,20 @@ int Export::Execute( int nToken, const char * pToken )
#if 0
// impossible, unsigned is never negative
if( sTmpLine.Len() < 0 ){
- if ( sTmpLine.GetChar(( USHORT )( sTmpLine.Len() - 1 )) != '\\' )
- bNextMustBeDefineEOL = TRUE;
+ if ( sTmpLine.GetChar(( sal_uInt16 )( sTmpLine.Len() - 1 )) != '\\' )
+ bNextMustBeDefineEOL = sal_True;
}
#endif
}
}
}
- BOOL bExecuteDown = FALSE;
+ sal_Bool bExecuteDown = sal_False;
if ( nToken != LEVELDOWN ) {
- USHORT nOpen = 0;
- USHORT nClose = 0;
- BOOL bReadOver1 = FALSE;
- USHORT i = 0;
+ sal_uInt16 nOpen = 0;
+ sal_uInt16 nClose = 0;
+ sal_Bool bReadOver1 = sal_False;
+ sal_uInt16 i = 0;
for ( i = 0; i < sToken.Len(); i++ ) {
if ( sToken.GetChar( i ) == '\"' )
bReadOver1 = !bReadOver1;
@@ -644,7 +644,7 @@ int Export::Execute( int nToken, const char * pToken )
nOpen++;
}
- bReadOver1 = FALSE;
+ bReadOver1 = sal_False;
for ( i = 0; i < sToken.Len(); i++ ) {
if ( sToken.GetChar( i ) == '\"' )
bReadOver1 = !bReadOver1;
@@ -653,7 +653,7 @@ int Export::Execute( int nToken, const char * pToken )
}
if ( nOpen < nClose )
- bExecuteDown = TRUE;
+ bExecuteDown = sal_True;
}
switch ( nToken ) {
@@ -673,17 +673,17 @@ int Export::Execute( int nToken, const char * pToken )
case RSCDEFINE:
- bDefine = TRUE; // res. defined in macro
+ bDefine = sal_True; // res. defined in macro
case RESSOURCE:
case RESSOURCEEXPR: {
- bDontWriteOutput = FALSE;
+ bDontWriteOutput = sal_False;
if ( nToken != RSCDEFINE )
- bNextMustBeDefineEOL = FALSE;
+ bNextMustBeDefineEOL = sal_False;
// this is the beginning of a new res.
nLevel++;
if ( nLevel > 1 ) {
- aResStack.GetObject( nLevel - 2 )->bChild = TRUE;
+ aResStack.GetObject( nLevel - 2 )->bChild = sal_True;
}
// create new instance for this res. and fill mandatory fields
@@ -720,12 +720,12 @@ int Export::Execute( int nToken, const char * pToken )
}
break;
case SMALRESSOURCE: {
- bDontWriteOutput = FALSE;
+ bDontWriteOutput = sal_False;
// this is the beginning of a new res.
- bNextMustBeDefineEOL = FALSE;
+ bNextMustBeDefineEOL = sal_False;
nLevel++;
if ( nLevel > 1 ) {
- aResStack.GetObject( nLevel - 2 )->bChild = TRUE;
+ aResStack.GetObject( nLevel - 2 )->bChild = sal_True;
}
// create new instance for this res. and fill mandatory fields
@@ -748,13 +748,13 @@ int Export::Execute( int nToken, const char * pToken )
if ( nList )
break;
- bDontWriteOutput = FALSE;
+ bDontWriteOutput = sal_False;
ByteString sLowerTyp;
if ( pResData )
sLowerTyp = "unknown";
nLevel++;
if ( nLevel > 1 ) {
- aResStack.GetObject( nLevel - 2 )->bChild = TRUE;
+ aResStack.GetObject( nLevel - 2 )->bChild = sal_True;
}
ResData *pNewData = new ResData( sActPForm, FullId() , sFilename );
@@ -765,11 +765,11 @@ int Export::Execute( int nToken, const char * pToken )
case LEVELDOWN: {
// pop
if ( !nList ) {
- bDontWriteOutput = FALSE;
+ bDontWriteOutput = sal_False;
if ( nLevel ) {
if ( bDefine && (nLevel == 1 )) {
- bDefine = FALSE;
- bNextMustBeDefineEOL = FALSE;
+ bDefine = sal_False;
+ bNextMustBeDefineEOL = sal_False;
}
WriteData( pResData );
delete aResStack.GetObject( nLevel - 1 );
@@ -779,7 +779,7 @@ int Export::Execute( int nToken, const char * pToken )
}
else {
if ( bDefine )
- bNextMustBeDefineEOL = TRUE;
+ bNextMustBeDefineEOL = sal_True;
if ( !nListLevel ) {
if ( bMergeMode )
MergeRest( pResData, MERGE_MODE_LIST );
@@ -791,7 +791,7 @@ int Export::Execute( int nToken, const char * pToken )
}
break;
case ASSIGNMENT: {
- bDontWriteOutput = FALSE;
+ bDontWriteOutput = sal_False;
// interpret different types of assignement
ByteString sKey = sToken.GetToken( 0, '=' );
sKey.EraseAllChars( ' ' );
@@ -810,7 +810,7 @@ int Export::Execute( int nToken, const char * pToken )
// ( sOrig.SearchAndReplace( "=", "[ de ] =" ));
//}
- pResData->bList = TRUE;
+ pResData->bList = sal_True;
nList = LIST_STRING;
//ByteString sLang("en-US" , RTL_TEXTENCODING_ASCII_US );
nListLang = SOURCE_LANGUAGE;
@@ -821,7 +821,7 @@ int Export::Execute( int nToken, const char * pToken )
//if ( bUnmerge ){
// ( sOrig.SearchAndReplace( "=", "[ de ] =" ));
//}
- pResData->bList = TRUE;
+ pResData->bList = sal_True;
nList = LIST_FILTER;
//ByteString sLang("en-US" , RTL_TEXTENCODING_ASCII_US );
nListLang = SOURCE_LANGUAGE;
@@ -831,7 +831,7 @@ int Export::Execute( int nToken, const char * pToken )
else if ( sKey == "UIENTRIES" ) {
//if ( bUnmerge ){
// ( sOrig.SearchAndReplace( "=", "[ de ] =" ));}
- pResData->bList = TRUE;
+ pResData->bList = sal_True;
nList = LIST_UIENTRIES;
//ByteString sLang("en-US" , RTL_TEXTENCODING_ASCII_US );
nListLang = SOURCE_LANGUAGE;
@@ -845,15 +845,15 @@ int Export::Execute( int nToken, const char * pToken )
Parse( LEVELUP, "" );
}
//if ( bUnmerge && ( nListLang.EqualsIgnoreCaseAscii("de") || nListLang.EqualsIgnoreCaseAscii("en-US") ) && ListExists( pResData, nList ))
- // bDontWriteOutput = TRUE;
+ // bDontWriteOutput = sal_True;
}
break;
case UIENTRIES:
case LISTASSIGNMENT: {
- bDontWriteOutput = FALSE;
+ bDontWriteOutput = sal_False;
ByteString sTmpToken( sToken);
sTmpToken.EraseAllChars(' ');
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
//nPos = sTmpToken.ToLowerAscii().Search("[de]=");
nPos = sTmpToken.ToLowerAscii().Search("[en-us]=");
if( nPos != STRING_NOTFOUND ) {
@@ -866,7 +866,7 @@ int Export::Execute( int nToken, const char * pToken )
ByteString sValue = sToken.GetToken( 1, '=' );
CleanValue( sValue );
if ( sKey.ToUpperAscii() == "STRINGLIST" ) {
- pResData->bList = TRUE;
+ pResData->bList = sal_True;
nList = LIST_STRING;
//ByteString sLang("en-US" , RTL_TEXTENCODING_ASCII_US );
nListLang = SOURCE_LANGUAGE;
@@ -874,7 +874,7 @@ int Export::Execute( int nToken, const char * pToken )
nListLevel = 0;
}
else if ( sKey == "FILTERLIST" ) {
- pResData->bList = TRUE;
+ pResData->bList = sal_True;
nList = LIST_FILTER;
//ByteString sLang("en-US" , RTL_TEXTENCODING_ASCII_US );
nListLang = SOURCE_LANGUAGE;
@@ -883,7 +883,7 @@ int Export::Execute( int nToken, const char * pToken )
}
// PairedList
else if ( sKey == "PAIREDLIST" ) {
- pResData->bList = TRUE;
+ pResData->bList = sal_True;
nList = LIST_PAIRED;
//ByteString sLang("en-US" , RTL_TEXTENCODING_ASCII_US );
nListLang = SOURCE_LANGUAGE;
@@ -892,7 +892,7 @@ int Export::Execute( int nToken, const char * pToken )
}
else if ( sKey == "ITEMLIST" ) {
- pResData->bList = TRUE;
+ pResData->bList = sal_True;
nList = LIST_ITEM;
//ByteString sLang("en-US" , RTL_TEXTENCODING_ASCII_US );
nListLang = SOURCE_LANGUAGE;
@@ -900,7 +900,7 @@ int Export::Execute( int nToken, const char * pToken )
nListLevel = 0;
}
else if ( sKey == "UIENTRIES" ) {
- pResData->bList = TRUE;
+ pResData->bList = sal_True;
nList = LIST_UIENTRIES;
//ByteString sLang("en-US" , RTL_TEXTENCODING_ASCII_US );
nListLang = SOURCE_LANGUAGE;
@@ -910,7 +910,7 @@ int Export::Execute( int nToken, const char * pToken )
/*if ( bUnmerge && ( nListLang.EqualsIgnoreCaseAscii( "de" )
|| nListLang.EqualsIgnoreCaseAscii("en-US" ) )
&& ListExists( pResData, nList ))
- bDontWriteOutput = TRUE;*/
+ bDontWriteOutput = sal_True;*/
}
else {
// new res. is a String- or FilterList
@@ -932,11 +932,11 @@ int Export::Execute( int nToken, const char * pToken )
CleanValue( sLang );
nListLang = sLang;
/*if (( bUnmerge ) && ( !nListLang.EqualsIgnoreCaseAscii("de")) && ( !nListLang.EqualsIgnoreCaseAscii("en-US")))
- bDontWriteOutput = TRUE;*/
+ bDontWriteOutput = sal_True;*/
nListIndex = 0;
nListLevel = 0;
/*if ( bUnmerge && nListLang.EqualsIgnoreCaseAscii("de") && ListExists( pResData, nList ) )
- bDontWriteOutput = TRUE;*/
+ bDontWriteOutput = sal_True;*/
}
}
}
@@ -963,7 +963,7 @@ int Export::Execute( int nToken, const char * pToken )
break;
case LONGTEXTLINE:
case TEXTLINE:
- bDontWriteOutput = FALSE;
+ bDontWriteOutput = sal_False;
if ( nLevel ) {
CutComment( sToken );
@@ -996,7 +996,7 @@ int Export::Execute( int nToken, const char * pToken )
if ( Export::isSourceLanguage( nLangIndex ) )
pResData->SetId( sText, ID_LEVEL_TEXT );
- pResData->bText = TRUE;
+ pResData->bText = sal_True;
pResData->sTextTyp = sOrigKey;
if ( bMergeMode ) {
PrepareTextToMerge( sOrig, STRING_TYP_TEXT, nLangIndex, pResData );
@@ -1017,7 +1017,7 @@ int Export::Execute( int nToken, const char * pToken )
// ( sOrig.SearchAndReplace( "=", "[ de ] =" ));
// }
SetChildWithText();
- pResData->bHelpText = TRUE;
+ pResData->bHelpText = sal_True;
if ( bBreakWhenHelpText ) {
ByteString sError( "\"HelpText\" found in source\n" );
YYWarning( sError.GetBufferAccess());
@@ -1042,7 +1042,7 @@ int Export::Execute( int nToken, const char * pToken )
// ( sOrig.SearchAndReplace( "=", "[ de ] =" ));
// }
SetChildWithText();
- pResData->bQuickHelpText = TRUE;
+ pResData->bQuickHelpText = sal_True;
if ( bMergeMode )
PrepareTextToMerge( sOrig, STRING_TYP_QUICKHELPTEXT, nLangIndex, pResData );
//if ( bUnmerge )
@@ -1061,7 +1061,7 @@ int Export::Execute( int nToken, const char * pToken )
// ( sOrig.SearchAndReplace( "=", "[ de ] =" ));
// }
SetChildWithText();
- pResData->bTitle = TRUE;
+ pResData->bTitle = sal_True;
if ( bMergeMode )
PrepareTextToMerge( sOrig, STRING_TYP_TITLE, nLangIndex, pResData );
//if ( bUnmerge )
@@ -1085,7 +1085,7 @@ int Export::Execute( int nToken, const char * pToken )
}
break;
case NEWTEXTINRES: {
- bDontWriteOutput = TRUE;
+ bDontWriteOutput = sal_True;
// this means something like // ### Achtung : Neuer Text ...
/*ByteString sLang( "GERMAN" );
ByteString sText = sToken.GetToken( 2, ':' ).GetToken( 0, '*' );
@@ -1095,7 +1095,7 @@ int Export::Execute( int nToken, const char * pToken )
}
break;
case APPFONTMAPPING: {
- bDontWriteOutput = FALSE;
+ bDontWriteOutput = sal_False;
// this is a AppfontMapping, so look if its a definition
// of field size
ByteString sKey = sToken.GetToken( 0, '=' );
@@ -1107,18 +1107,18 @@ int Export::Execute( int nToken, const char * pToken )
sMapping.EraseAllChars( ' ' );
sMapping.EraseAllChars( '\t' );
if ( sKey.ToUpperAscii() == "SIZE" ) {
- pResData->nWidth = ( USHORT ) sMapping.GetToken( 0, ',' ).ToInt64();
+ pResData->nWidth = ( sal_uInt16 ) sMapping.GetToken( 0, ',' ).ToInt64();
}
else if ( sKey == "POSSIZE" ) {
- pResData->nWidth = ( USHORT ) sMapping.GetToken( 2, ',' ).ToInt64();
+ pResData->nWidth = ( sal_uInt16 ) sMapping.GetToken( 2, ',' ).ToInt64();
}
}
break;
case RSCDEFINELEND:
- bDontWriteOutput = FALSE;
+ bDontWriteOutput = sal_False;
break;
case CONDITION: {
- bDontWriteOutput = FALSE;
+ bDontWriteOutput = sal_False;
while( sToken.SearchAndReplace( "\r", " " ) != STRING_NOTFOUND ) {};
while( sToken.SearchAndReplace( "\t", " " ) != STRING_NOTFOUND ) {};
while( sToken.SearchAndReplace( " ", " " ) != STRING_NOTFOUND ) {};
@@ -1147,16 +1147,16 @@ int Export::Execute( int nToken, const char * pToken )
}
else break;
if ( nLevel ) {
- WriteData( pResData, TRUE );
+ WriteData( pResData, sal_True );
pResData->sPForm = sActPForm;
}
}
break;
case EMPTYLINE : {
- bDontWriteOutput = FALSE;
+ bDontWriteOutput = sal_False;
if ( bDefine ) {
- bNextMustBeDefineEOL = FALSE;
- bDefine = FALSE;
+ bNextMustBeDefineEOL = sal_False;
+ bDefine = sal_False;
while ( nLevel )
Parse( LEVELDOWN, "" );
//WorkOnTokenSet( LEVELDOWN, pTkn );
@@ -1164,7 +1164,7 @@ int Export::Execute( int nToken, const char * pToken )
}
break;
case PRAGMA : {
- bDontWriteOutput = FALSE;
+ bDontWriteOutput = sal_False;
while( sToken.SearchAndReplace( "\t", " " ) != STRING_NOTFOUND ) {};
while( sToken.SearchAndReplace( " ", " " ) != STRING_NOTFOUND ) {};
sToken.EraseLeadingChars( ' ' );
@@ -1187,11 +1187,11 @@ int Export::Execute( int nToken, const char * pToken )
}
break;
case TEXTREFID : {
- bDontWriteOutput = TRUE;
+ bDontWriteOutput = sal_True;
/*ByteString sK = sToken.GetToken( 0, '=' );
ByteString sKey = sK.EraseAllChars( '\t' ).EraseAllChars( ' ' );
ByteString sT = sToken.GetToken( 1, '=' ).GetToken( 0, ';' );
- USHORT nRefId = ( USHORT ) sT.EraseAllChars( '\t' ).EraseAllChars( ' ' ).ToInt32();
+ sal_uInt16 nRefId = ( sal_uInt16 ) sT.EraseAllChars( '\t' ).EraseAllChars( ' ' ).ToInt32();
if (( sKey.ToUpperAscii() == "TEXT" ) ||
( sKey == "MESSAGE" ) ||
( sKey == "CUSTOMUNITTEXT" ) ||
@@ -1210,7 +1210,7 @@ int Export::Execute( int nToken, const char * pToken )
// the current token must be written to dest. without merging
if( bDefine && sOrig.Len() > 2 ){
- for( USHORT n = 0 ; n < sOrig.Len() ; n++ ){
+ for( sal_uInt16 n = 0 ; n < sOrig.Len() ; n++ ){
if( sOrig.GetChar( n ) == '\n' && sOrig.GetChar( n-1 ) != '\\'){
sOrig.Insert('\\' , n++ );
}
@@ -1234,8 +1234,8 @@ void Export::CutComment( ByteString &rText )
if ( rText.Search( "//" ) != STRING_NOTFOUND ) {
ByteString sWork( rText );
sWork.SearchAndReplaceAll( "\\\"", "XX" );
- USHORT i = 0;
- BOOL bInner = FALSE;
+ sal_uInt16 i = 0;
+ sal_Bool bInner = sal_False;
while ( i < sWork.Len() - 1 ) {
if ( sWork.GetChar( i ) == '\"' )
@@ -1254,8 +1254,8 @@ void Export::CutComment( ByteString &rText )
}
void Export::UnmergeUTF8( ByteString& sOrig ){
- USHORT nPos1 = sOrig.Search('\"');
- USHORT nPos2 = sOrig.SearchBackward('\"');
+ sal_uInt16 nPos1 = sOrig.Search('\"');
+ sal_uInt16 nPos2 = sOrig.SearchBackward('\"');
if( nPos1 > 0 && nPos2 > 0 && nPos1 < nPos2){
ByteString sPart = sOrig.Copy(nPos1+1 , nPos2-1);
ByteString sPartUTF8 = sPart;
@@ -1265,7 +1265,7 @@ void Export::UnmergeUTF8( ByteString& sOrig ){
}
/*****************************************************************************/
-BOOL Export::ListExists( ResData *pResData, USHORT nLst )
+sal_Bool Export::ListExists( ResData *pResData, sal_uInt16 nLst )
/*****************************************************************************/
{
switch ( nLst ) {
@@ -1275,20 +1275,20 @@ BOOL Export::ListExists( ResData *pResData, USHORT nLst )
case LIST_PAIRED: return pResData->pPairedList != NULL;
case LIST_UIENTRIES: return pResData->pUIEntries != NULL;
}
- return FALSE;
+ return sal_False;
}
/*****************************************************************************/
-BOOL Export::WriteData( ResData *pResData, BOOL bCreateNew )
+sal_Bool Export::WriteData( ResData *pResData, sal_Bool bCreateNew )
/*****************************************************************************/
{
if ( bMergeMode ) {
MergeRest( pResData );
- return TRUE;
+ return sal_True;
}
if ( bUnmerge )
- return TRUE;
+ return sal_True;
/* ByteStringHashMap::iterator pos3 = pResData->sText.begin();
ByteStringHashMap::iterator end3 = pResData->sText.end();
@@ -1449,7 +1449,7 @@ BOOL Export::WriteData( ResData *pResData, BOOL bCreateNew )
if ( bCreateNew )
pResData->pUIEntries = 0;
}
- return TRUE;
+ return sal_True;
}
ByteString Export::GetPairedListID( const ByteString& sText ){
// < "STRING" ; IDENTIFIER ; > ;
@@ -1477,8 +1477,8 @@ ByteString Export::StripList( const ByteString& sText ){
}
/*****************************************************************************/
-BOOL Export::WriteExportList( ResData *pResData, ExportList *pExportList,
- const ByteString &rTyp, BOOL bCreateNew )
+sal_Bool Export::WriteExportList( ResData *pResData, ExportList *pExportList,
+ const ByteString &rTyp, sal_Bool bCreateNew )
/*****************************************************************************/
{
ByteString sGID = pResData->sGId;
@@ -1492,7 +1492,7 @@ BOOL Export::WriteExportList( ResData *pResData, ExportList *pExportList,
ByteString sTimeStamp( Export::GetTimeStamp());
ByteString sCur;
- for ( ULONG i = 0; pExportList != NULL && i < pExportList->Count(); i++ ) {
+ for ( sal_uLong i = 0; pExportList != NULL && i < pExportList->Count(); i++ ) {
ExportListEntry *pEntry = pExportList->GetObject( i );
// mandatory for export: german and eng. and/or enus
//ByteString a("Export::WriteExportList::pEntry");
@@ -1555,7 +1555,7 @@ BOOL Export::WriteExportList( ResData *pResData, ExportList *pExportList,
if ( bCreateNew )
delete pExportList;
- return TRUE;
+ return sal_True;
}
/*****************************************************************************/
@@ -1565,7 +1565,7 @@ ByteString Export::FullId()
ByteString sFull;
if ( nLevel > 1 ) {
sFull = aResStack.GetObject( 0 )->sId;
- for ( USHORT i = 1; i < nLevel - 1; i++ ) {
+ for ( sal_uInt16 i = 1; i < nLevel - 1; i++ ) {
ByteString sToAdd = aResStack.GetObject( i )->sId;
if ( sToAdd.Len()) {
sFull += ".";
@@ -1695,7 +1695,7 @@ void Export::CleanValue( ByteString &rValue )
}
if ( rValue.Len()) {
- for ( USHORT i = rValue.Len() - 1; i > 0; i-- ) {
+ for ( sal_uInt16 i = rValue.Len() - 1; i > 0; i-- ) {
if (( rValue.GetChar( i ) == ' ' ) || ( rValue.GetChar( i ) == '\t' ) ||
( rValue.GetChar( i ) == '\n' ) || ( rValue.GetChar( i ) == ';' ) ||
( rValue.GetChar( i ) == '{' ) || ( rValue.GetChar( i ) == '\\' ) ||
@@ -1733,14 +1733,14 @@ ByteString Export::GetText( const ByteString &rSource, int nToken )
while ( sTmp.SearchAndReplace( "\\0x7F", "-=<[0x7F]>=-" )
!= STRING_NOTFOUND ) {};
- USHORT nStart = 0;
- USHORT nState = TXT_STATE_MACRO;
+ sal_uInt16 nStart = 0;
+ sal_uInt16 nState = TXT_STATE_MACRO;
nState = TXT_STATE_TEXT;
nStart = 1;
- for ( USHORT i = nStart; i < sTmp.GetTokenCount( '\"' ); i++ ) {
+ for ( sal_uInt16 i = nStart; i < sTmp.GetTokenCount( '\"' ); i++ ) {
ByteString sToken = sTmp.GetToken( i, '\"' );
if ( sToken.Len()) {
if ( nState == TXT_STATE_TEXT ) {
@@ -1800,7 +1800,7 @@ void Export::WriteToMerged( const ByteString &rText , bool bSDFContent )
ByteString sText( rText );
while ( sText.SearchAndReplace( " \n", "\n" ) != STRING_NOTFOUND ) {};
if( pParseQueue->bNextIsM && bSDFContent && sText.Len() > 2 ){
- for( USHORT n = 0 ; n < sText.Len() ; n++ ){
+ for( sal_uInt16 n = 0 ; n < sText.Len() ; n++ ){
if( sText.GetChar( n ) == '\n' && sText.GetChar( n-1 ) != '\\'){
sText.Insert('\\' , n++ );
@@ -1808,7 +1808,7 @@ void Export::WriteToMerged( const ByteString &rText , bool bSDFContent )
}
}
else if( pParseQueue->bLastWasM && sText.Len() > 2 ){
- for( USHORT n = 0 ; n < sText.Len() ; n++ ){
+ for( sal_uInt16 n = 0 ; n < sText.Len() ; n++ ){
if( sText.GetChar( n ) == '\n' && sText.GetChar( n-1 ) != '\\'){
sText.Insert('\\' , n++ );
}
@@ -1816,7 +1816,7 @@ void Export::WriteToMerged( const ByteString &rText , bool bSDFContent )
}
}
else if( pParseQueue->bCurrentIsM && bSDFContent && sText.Len() > 2 ){
- for( USHORT n = 0 ; n < sText.Len() ; n++ ){
+ for( sal_uInt16 n = 0 ; n < sText.Len() ; n++ ){
if( sText.GetChar( n ) == '\n' && sText.GetChar( n-1 ) != '\\'){
sText.Insert('\\' , n++ );
pParseQueue->bMflag=true;
@@ -1824,13 +1824,13 @@ void Export::WriteToMerged( const ByteString &rText , bool bSDFContent )
}
}
else if( pParseQueue->bMflag ){
- for( USHORT n = 1 ; n < sText.Len() ; n++ ){
+ for( sal_uInt16 n = 1 ; n < sText.Len() ; n++ ){
if( sText.GetChar( n ) == '\n' && sText.GetChar( n-1 ) != '\\'){
sText.Insert('\\' , n++ );
}
}
}
- for ( USHORT i = 0; i < sText.Len(); i++ ) {
+ for ( sal_uInt16 i = 0; i < sText.Len(); i++ ) {
if ( sText.GetChar( i ) != '\n' ){
aOutput.Write( ByteString( sText.GetChar( i )).GetBuffer(), 1 );
@@ -1847,11 +1847,11 @@ void Export::WriteToMerged( const ByteString &rText , bool bSDFContent )
void Export::ConvertMergeContent( ByteString &rText )
/*****************************************************************************/
{
- BOOL bNoOpen = ( rText.Search( "\\\"" ) != 0 );
+ sal_Bool bNoOpen = ( rText.Search( "\\\"" ) != 0 );
ByteString sClose( rText.Copy( rText.Len() - 2 ));
- BOOL bNoClose = ( sClose != "\\\"" );
+ sal_Bool bNoClose = ( sClose != "\\\"" );
ByteString sNew;
- for ( USHORT i = 0; i < rText.Len(); i++ ) {
+ for ( sal_uInt16 i = 0; i < rText.Len(); i++ ) {
ByteString sChar( rText.GetChar( i ));
if ( sChar == "\\" ) {
if (( i + 1 ) < rText.Len()) {
@@ -1900,13 +1900,13 @@ void Export::ConvertMergeContent( ByteString &rText )
}
/*****************************************************************************/
-BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp,
+sal_Bool Export::PrepareTextToMerge( ByteString &rText, sal_uInt16 nTyp,
ByteString &nLangIndex, ResData *pResData )
/*****************************************************************************/
{
// position to merge in:
- USHORT nStart = 0;
- USHORT nEnd = 0;
+ sal_uInt16 nStart = 0;
+ sal_uInt16 nEnd = 0;
ByteString sOldId = pResData->sId;
ByteString sOldGId = pResData->sGId;
ByteString sOldTyp = pResData->sResTyp;
@@ -1921,7 +1921,7 @@ BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp,
case LIST_ITEM :
{
if ( bUnmerge )
- return TRUE;
+ return sal_True;
ExportList *pList = NULL;
switch ( nTyp ) {
@@ -1968,17 +1968,17 @@ BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp,
nStart = rText.Search( "\"" );
if ( nStart == STRING_NOTFOUND ) {
rText = sOrigText;
- return FALSE;
+ return sal_False;
}
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
for ( nEnd = nStart + 1; nEnd < rText.Len() && !bFound; nEnd++ ) {
if ( rText.GetChar( nEnd ) == '\"' )
- bFound = TRUE;
+ bFound = sal_True;
}
if ( !bFound ) {
rText = sOrigText;
- return FALSE;
+ return sal_False;
}
nEnd --;
@@ -2010,22 +2010,22 @@ BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp,
if (( nLangIndex != ByteString("de") ) &&
( nLangIndex != ByteString("en-US") ))
{
- bDontWriteOutput = TRUE;
+ bDontWriteOutput = sal_True;
}
- return TRUE;
+ return sal_True;
}*/
nStart = rText.Search( "=" );
if ( nStart == STRING_NOTFOUND ) {
rText = sOrigText;
- return FALSE;
+ return sal_False;
}
nStart++;
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
while(( nStart < rText.Len()) && !bFound ) {
if (( rText.GetChar( nStart ) != ' ' ) && ( rText.GetChar( nStart ) != '\t' ))
- bFound = TRUE;
+ bFound = sal_True;
else
nStart ++;
}
@@ -2033,19 +2033,19 @@ BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp,
// no start position found
if ( !bFound ) {
rText = sOrigText;
- return FALSE;
+ return sal_False;
}
// position to end mergeing in
nEnd = rText.Len() - 1;
- bFound = FALSE;
+ bFound = sal_False;
while (( nEnd > nStart ) && !bFound ) {
if (( rText.GetChar( nEnd ) != ' ' ) && ( rText.GetChar( nEnd ) != '\t' ) &&
( rText.GetChar( nEnd ) != '\n' ) && ( rText.GetChar( nEnd ) != ';' ) &&
( rText.GetChar( nEnd ) != '{' ) && ( rText.GetChar( nEnd ) != '\\' ))
{
- bFound = TRUE;
+ bFound = sal_True;
}
else
nEnd --;
@@ -2080,7 +2080,7 @@ BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp,
if ( !pEntrys ) {
rText = sOrigText;
- return FALSE; // no data found
+ return sal_False; // no data found
}
ByteString sContent;
@@ -2088,12 +2088,12 @@ BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp,
//if ( !sContent.Len() && ( ! nLangIndex.EqualsIgnoreCaseAscii("en-US") )) {
if ( !sContent.Len() && ( ! Export::isSourceLanguage( nLangIndex ) )) {
rText = sOrigText;
- return FALSE; // no data found
+ return sal_False; // no data found
}
//if ( nLangIndex.EqualsIgnoreCaseAscii("en-US") ) {
if ( Export::isSourceLanguage( nLangIndex ) ) {
- return FALSE;
+ return sal_False;
}
ByteString sPostFix( rText.Copy( ++nEnd ));
@@ -2109,11 +2109,11 @@ BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp,
rText += sContent;
rText += sPostFix;
- return TRUE;
+ return sal_True;
}
/*****************************************************************************/
-void Export::MergeRest( ResData *pResData, USHORT nMode )
+void Export::MergeRest( ResData *pResData, sal_uInt16 nMode )
/*****************************************************************************/
{
//if ( bUnmerge ) { return;}
@@ -2137,8 +2137,8 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
bool bWriteNoSlash = false;
if ( pEntry && pResData->bText ) {
- BOOL bAddSemikolon = FALSE;
- BOOL bFirst = TRUE;
+ sal_Bool bAddSemikolon = sal_False;
+ sal_Bool bFirst = sal_True;
ByteString sCur;
ByteString sTmp = Export::sLanguages;
@@ -2146,7 +2146,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
sCur = aLanguages[ n ];
ByteString sText;
- BOOL bText = pEntry->GetTransex3Text( sText, STRING_TYP_TEXT, sCur , TRUE );
+ sal_Bool bText = pEntry->GetTransex3Text( sText, STRING_TYP_TEXT, sCur , sal_True );
if ( bText && sText.Len() && sText != "-" ) {
ByteString sOutput;
if ( bNextMustBeDefineEOL) {
@@ -2155,7 +2155,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
else
sOutput += ";\t\\\n";
}
- bFirst=FALSE;
+ bFirst=sal_False;
sOutput += "\t";
sOutput += pResData->sTextTyp;
//if ( !sCur.EqualsIgnoreCaseAscii("en-US")) {
@@ -2176,8 +2176,8 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
else if ( !bNextMustBeDefineEOL )
sOutput += ";\n";
else
- bAddSemikolon = TRUE;
- for ( USHORT j = 1; j < nLevel; j++ )
+ bAddSemikolon = sal_True;
+ for ( sal_uInt16 j = 1; j < nLevel; j++ )
sOutput += "\t";
WriteToMerged( sOutput , true );
}
@@ -2191,15 +2191,15 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
}
if ( pEntry && pResData->bQuickHelpText ) {
- BOOL bAddSemikolon = FALSE;
- BOOL bFirst = TRUE;
+ sal_Bool bAddSemikolon = sal_False;
+ sal_Bool bFirst = sal_True;
ByteString sCur;
for( unsigned int n = 0; n < aLanguages.size(); n++ ){
sCur = aLanguages[ n ];
ByteString sText;
- BOOL bText = pEntry->GetTransex3Text( sText, STRING_TYP_QUICKHELPTEXT, sCur, TRUE );
+ sal_Bool bText = pEntry->GetTransex3Text( sText, STRING_TYP_QUICKHELPTEXT, sCur, sal_True );
if ( bText && sText.Len() && sText != "-" ) {
ByteString sOutput;
if ( bNextMustBeDefineEOL) {
@@ -2208,7 +2208,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
else
sOutput += ";\t\\\n";
}
- bFirst=FALSE;
+ bFirst=sal_False;
sOutput += "\t";
sOutput += "QuickHelpText";
//if ( !sCur.EqualsIgnoreCaseAscii("en-US") ) {
@@ -2225,8 +2225,8 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
else if ( !bNextMustBeDefineEOL )
sOutput += ";\n";
else
- bAddSemikolon = TRUE;
- for ( USHORT j = 1; j < nLevel; j++ )
+ bAddSemikolon = sal_True;
+ for ( sal_uInt16 j = 1; j < nLevel; j++ )
sOutput += "\t";
WriteToMerged( sOutput ,true );
}
@@ -2238,15 +2238,15 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
}
if ( pEntry && pResData->bTitle ) {
- BOOL bAddSemikolon = FALSE;
- BOOL bFirst = TRUE;
+ sal_Bool bAddSemikolon = sal_False;
+ sal_Bool bFirst = sal_True;
ByteString sCur;
for( unsigned int n = 0; n < aLanguages.size(); n++ ){
sCur = aLanguages[ n ];
ByteString sText;
- BOOL bText = pEntry->GetTransex3Text( sText, STRING_TYP_TITLE, sCur, TRUE );
+ sal_Bool bText = pEntry->GetTransex3Text( sText, STRING_TYP_TITLE, sCur, sal_True );
if ( bText && sText.Len() && sText != "-" ) {
ByteString sOutput;
if ( bNextMustBeDefineEOL) {
@@ -2255,7 +2255,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
else
sOutput += ";\t\\\n";
}
- bFirst=FALSE;
+ bFirst=sal_False;
sOutput += "\t";
sOutput += "Title";
//if ( !sCur.EqualsIgnoreCaseAscii("en-US") ) {
@@ -2272,8 +2272,8 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
else if ( !bNextMustBeDefineEOL )
sOutput += ";\n";
else
- bAddSemikolon = TRUE;
- for ( USHORT j = 1; j < nLevel; j++ )
+ bAddSemikolon = sal_True;
+ for ( sal_uInt16 j = 1; j < nLevel; j++ )
sOutput += "\t";
WriteToMerged( sOutput ,true );
}
@@ -2297,9 +2297,9 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
pResData->sGId += ".";
pResData->sGId += sOldId;
ByteString sSpace;
- for ( USHORT i = 1; i < nLevel-1; i++ )
+ for ( sal_uInt16 i = 1; i < nLevel-1; i++ )
sSpace += "\t";
- for ( USHORT nT = LIST_STRING; nT <= LIST_UIENTRIES; nT++ ) {
+ for ( sal_uInt16 nT = LIST_STRING; nT <= LIST_UIENTRIES; nT++ ) {
ExportList *pList = NULL;
switch ( nT ) {
case LIST_STRING : pResData->sResTyp = "stringlist"; pList = pResData->pStringList; bPairedList = false; break;
@@ -2311,7 +2311,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
ByteString sCur;
for( unsigned int n = 0; n < aLanguages.size(); n++ ){
sCur = aLanguages[ n ];
- USHORT nIdx = 1;
+ sal_uInt16 nIdx = 1;
// Set matching pairedlist identifier
if( bPairedList && pResData->pPairedList && ( nIdx == 1 ) ){
@@ -2322,18 +2322,18 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
pResData->sId = ByteString("1");
PFormEntrys *pEntrys;
- ULONG nLIndex = 0;
- ULONG nMaxIndex = 0;
+ sal_uLong nLIndex = 0;
+ sal_uLong nMaxIndex = 0;
if ( pList )
nMaxIndex = pList->GetSourceLanguageListEntryCount();
pEntrys = pMergeDataFile->GetPFormEntrys( pResData );
while( pEntrys && ( nLIndex < nMaxIndex )) {
//printf("Lang %s, List Index %d\n",sCur.GetBuffer(),(int)nLIndex);
ByteString sText;
- BOOL bText;
- bText = pEntrys->GetTransex3Text( sText, STRING_TYP_TEXT, sCur, TRUE );
+ sal_Bool bText;
+ bText = pEntrys->GetTransex3Text( sText, STRING_TYP_TEXT, sCur, sal_True );
if( !bText )
- bText = pEntrys->GetTransex3Text( sText , STRING_TYP_TEXT, SOURCE_LANGUAGE , FALSE );
+ bText = pEntrys->GetTransex3Text( sText , STRING_TYP_TEXT, SOURCE_LANGUAGE , sal_False );
// Use fallback, if data is missing in sdf file
//if( !bText && pResData->sResTyp.Equals( "pairedlist" ) ){
@@ -2396,7 +2396,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
}
}
- USHORT nStart, nEnd;
+ sal_uInt16 nStart, nEnd;
nStart = sLine.Search( "\"" );
ByteString sPostFix;
@@ -2480,7 +2480,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
}
nListIndex++;
- ULONG nMaxIndex = 0;
+ sal_uLong nMaxIndex = 0;
if ( pList )
nMaxIndex = pList->GetSourceLanguageListEntryCount();
ByteString sLine;
@@ -2505,7 +2505,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
sText += sLine;
sText += " ;";
sText += "\n";
- for ( USHORT i = 0; i < nLevel; i++ )
+ for ( sal_uInt16 i = 0; i < nLevel; i++ )
sText += "\t";
WriteToMerged( sText ,false );
nListIndex++;
@@ -2535,15 +2535,15 @@ void Export::SetChildWithText()
/*****************************************************************************/
{
if ( aResStack.Count() > 1 ) {
- for ( ULONG i = 0; i < aResStack.Count() - 1; i++ ) {
- aResStack.GetObject( i )->bChildWithText = TRUE;
+ for ( sal_uLong i = 0; i < aResStack.Count() - 1; i++ ) {
+ aResStack.GetObject( i )->bChildWithText = sal_True;
}
}
}
void ParserQueue::Push( const QueueEntry& aEntry ){
// printf("nTyp = %d ",aEntry.nTyp);
- USHORT nLen = aEntry.sLine.Len();
+ sal_uInt16 nLen = aEntry.sLine.Len();
if( !bStart ){
aQueueCur->push( aEntry );
diff --git a/l10ntools/source/export2.cxx b/l10ntools/source/export2.cxx
index fc8f823b7deb..eb5f8d5fbf15 100644
--- a/l10ntools/source/export2.cxx
+++ b/l10ntools/source/export2.cxx
@@ -52,7 +52,7 @@ ResData::~ResData()
{
if ( pStringList ) {
// delete existing res. of type StringList
- for ( ULONG i = 0; i < pStringList->Count(); i++ ) {
+ for ( sal_uLong i = 0; i < pStringList->Count(); i++ ) {
ExportListEntry* test = pStringList->GetObject( i );
if( test != NULL ) delete test;
}
@@ -60,7 +60,7 @@ ResData::~ResData()
}
if ( pFilterList ) {
// delete existing res. of type FilterList
- for ( ULONG i = 0; i < pFilterList->Count(); i++ ) {
+ for ( sal_uLong i = 0; i < pFilterList->Count(); i++ ) {
ExportListEntry* test = pFilterList->GetObject( i );
delete test;
}
@@ -68,7 +68,7 @@ ResData::~ResData()
}
if ( pItemList ) {
// delete existing res. of type ItemList
- for ( ULONG i = 0; i < pItemList->Count(); i++ ) {
+ for ( sal_uLong i = 0; i < pItemList->Count(); i++ ) {
ExportListEntry* test = pItemList->GetObject( i );
delete test;
}
@@ -76,7 +76,7 @@ ResData::~ResData()
}
if ( pUIEntries ) {
// delete existing res. of type UIEntries
- for ( ULONG i = 0; i < pUIEntries->Count(); i++ ) {
+ for ( sal_uLong i = 0; i < pUIEntries->Count(); i++ ) {
ExportListEntry* test = pUIEntries->GetObject( i );
delete test;
}
@@ -145,8 +145,8 @@ void Export::QuotHTMLXRM( ByteString &rString )
/*****************************************************************************/
{
ByteString sReturn;
- //BOOL bBreak = FALSE;
- for ( USHORT i = 0; i < rString.Len(); i++ ) {
+ //sal_Bool bBreak = sal_False;
+ for ( sal_uInt16 i = 0; i < rString.Len(); i++ ) {
ByteString sTemp = rString.Copy( i );
if ( sTemp.Search( "<Arg n=" ) == 0 ) {
while ( i < rString.Len() && rString.GetChar( i ) != '>' ) {
@@ -214,7 +214,7 @@ void Export::QuotHTML( ByteString &rString )
/*****************************************************************************/
{
ByteString sReturn;
- for ( USHORT i = 0; i < rString.Len(); i++ ) {
+ for ( sal_uInt16 i = 0; i < rString.Len(); i++ ) {
ByteString sTemp = rString.Copy( i );
if ( sTemp.Search( "<Arg n=" ) == 0 ) {
while ( i < rString.Len() && rString.GetChar( i ) != '>' ) {
@@ -444,7 +444,7 @@ void Export::InitLanguages( bool bMergeMode ){
if( !isInitialized ){
ByteString sTmp;
ByteStringBoolHashMap aEnvLangs;
- for ( USHORT x = 0; x < sLanguages.GetTokenCount( ',' ); x++ ){
+ for ( sal_uInt16 x = 0; x < sLanguages.GetTokenCount( ',' ); x++ ){
sTmp = sLanguages.GetToken( x, ',' ).GetToken( 0, '=' );
sTmp.EraseLeadingAndTrailingChars();
if( bMergeMode && !isAllowed( sTmp ) ){}
@@ -461,7 +461,7 @@ void Export::InitForcedLanguages( bool bMergeMode ){
/*****************************************************************************/
ByteString sTmp;
ByteStringBoolHashMap aEnvLangs;
- for ( USHORT x = 0; x < sForcedLanguages.GetTokenCount( ',' ); x++ ){
+ for ( sal_uInt16 x = 0; x < sForcedLanguages.GetTokenCount( ',' ); x++ ){
sTmp = sForcedLanguages.GetToken( x, ',' ).GetToken( 0, '=' );
sTmp.EraseLeadingAndTrailingChars();
if( bMergeMode && isAllowed( sTmp ) ){}
@@ -558,7 +558,7 @@ void Export::FillInListFallbacks(
/*****************************************************************************/
{
- for ( ULONG i = 0; i < pList->Count(); i++ ) {
+ for ( sal_uLong i = 0; i < pList->Count(); i++ ) {
ExportListEntry *pEntry = pList->GetObject( i );
if ( !( *pEntry )[ nSource ].Len()){
( *pEntry )[ nSource ] = ( *pEntry )[ nFallback ];
@@ -582,7 +582,7 @@ ByteString Export::GetTimeStamp()
}
/*****************************************************************************/
-BOOL Export::ConvertLineEnds(
+sal_Bool Export::ConvertLineEnds(
ByteString sSource, ByteString sDestination )
/*****************************************************************************/
{
@@ -591,11 +591,11 @@ BOOL Export::ConvertLineEnds(
SvFileStream aSource( sSourceFile, STREAM_READ );
if ( !aSource.IsOpen())
- return FALSE;
+ return sal_False;
SvFileStream aDestination( sDestinationFile, STREAM_STD_WRITE | STREAM_TRUNC );
if ( !aDestination.IsOpen()) {
aSource.Close();
- return FALSE;
+ return sal_False;
}
ByteString sLine;
@@ -613,7 +613,7 @@ BOOL Export::ConvertLineEnds(
aSource.Close();
aDestination.Close();
- return TRUE;
+ return sal_True;
}
/*****************************************************************************/
@@ -623,7 +623,7 @@ ByteString Export::GetNativeFile( ByteString sSource )
DirEntry aTemp( GetTempFile());
ByteString sReturn( aTemp.GetFull(), RTL_TEXTENCODING_ASCII_US );
- for ( USHORT i = 0; i < 10; i++ )
+ for ( sal_uInt16 i = 0; i < 10; i++ )
if ( ConvertLineEnds( sSource, sReturn ))
return sReturn;
diff --git a/l10ntools/source/filter/utils/Cache.java b/l10ntools/source/filter/utils/Cache.java
index f4120b2140cc..d1d4766398d2 100644
--- a/l10ntools/source/filter/utils/Cache.java
+++ b/l10ntools/source/filter/utils/Cache.java
@@ -159,7 +159,6 @@ public class Cache
private static final java.lang.String FLAGNAME_PACKED = "PACKED";
private static final java.lang.String FLAGNAME_PREFERRED = "PREFERRED";
private static final java.lang.String FLAGNAME_READONLY = "READONLY";
- private static final java.lang.String FLAGNAME_SILENTEXPORT = "SILENTEXPORT";
private static final java.lang.String FLAGNAME_TEMPLATE = "TEMPLATE";
private static final java.lang.String FLAGNAME_TEMPLATEPATH = "TEMPLATEPATH";
private static final java.lang.String FLAGNAME_USESOPTIONS = "USESOPTIONS";
@@ -185,7 +184,6 @@ public class Cache
private static final int FLAGVAL_PACKED = 0x00100000; // 1048576
private static final int FLAGVAL_PREFERRED = 0x10000000; // 268435456
private static final int FLAGVAL_READONLY = 0x00010000; // 65536
- private static final int FLAGVAL_SILENTEXPORT = 0x00200000; // 2097152
private static final int FLAGVAL_TEMPLATE = 0x00000004; // 4
private static final int FLAGVAL_TEMPLATEPATH = 0x00000010; // 16
private static final int FLAGVAL_USESOPTIONS = 0x00000080; // 128
@@ -1358,9 +1356,6 @@ public class Cache
if (sFlagName.equals(FLAGNAME_READONLY))
nFlags |= FLAGVAL_READONLY;
else
- if (sFlagName.equals(FLAGNAME_SILENTEXPORT))
- nFlags |= FLAGVAL_SILENTEXPORT;
- else
if (sFlagName.equals(FLAGNAME_TEMPLATE))
nFlags |= FLAGVAL_TEMPLATE;
else
@@ -1455,9 +1450,6 @@ public class Cache
if((field & FLAGVAL_PACKED) == FLAGVAL_PACKED)
lFlags.add(FLAGNAME_PACKED);
- if((field & FLAGVAL_SILENTEXPORT) == FLAGVAL_SILENTEXPORT)
- lFlags.add(FLAGNAME_SILENTEXPORT);
-
if((field & FLAGVAL_BROWSERPREFERRED) == FLAGVAL_BROWSERPREFERRED)
lFlags.add(FLAGNAME_BROWSERPREFERRED);
diff --git a/l10ntools/source/gsicheck.cxx b/l10ntools/source/gsicheck.cxx
index 1ec9827a753d..61c7cf02fea3 100644
--- a/l10ntools/source/gsicheck.cxx
+++ b/l10ntools/source/gsicheck.cxx
@@ -40,7 +40,7 @@
/*****************************************************************************/
void PrintMessage( ByteString aType, ByteString aMsg, ByteString aPrefix,
- ByteString aContext, BOOL bPrintContext, ULONG nLine, ByteString aUniqueId = ByteString() )
+ ByteString aContext, sal_Bool bPrintContext, sal_uLong nLine, ByteString aUniqueId = ByteString() )
/*****************************************************************************/
{
fprintf( stdout, "%s %s, Line %lu", aType.GetBuffer(), aPrefix.GetBuffer(), nLine );
@@ -55,19 +55,19 @@ void PrintMessage( ByteString aType, ByteString aMsg, ByteString aPrefix,
/*****************************************************************************/
void PrintError( ByteString aMsg, ByteString aPrefix,
- ByteString aContext, BOOL bPrintContext, ULONG nLine, ByteString aUniqueId = ByteString() )
+ ByteString aContext, sal_Bool bPrintContext, sal_uLong nLine, ByteString aUniqueId = ByteString() )
/*****************************************************************************/
{
PrintMessage( "Error:", aMsg, aPrefix, aContext, bPrintContext, nLine, aUniqueId );
}
-BOOL LanguageOK( ByteString aLang )
+sal_Bool LanguageOK( ByteString aLang )
{
if ( !aLang.Len() )
- return FALSE;
+ return sal_False;
if ( aLang.IsNumericAscii() )
- return TRUE;
+ return sal_True;
if ( aLang.GetTokenCount( '-' ) == 1 )
return aLang.IsAlphaAscii() && aLang.IsLowerAscii();
@@ -80,7 +80,7 @@ BOOL LanguageOK( ByteString aLang )
&& !aTok1.EqualsIgnoreCaseAscii( aTok0 );
}
- return FALSE;
+ return sal_False;
}
@@ -94,13 +94,13 @@ class LazySvFileStream : public SvFileStream
private:
String aFileName;
- BOOL bOpened;
+ sal_Bool bOpened;
StreamMode eOpenMode;
public:
LazySvFileStream()
: aFileName()
- , bOpened( FALSE )
+ , bOpened( sal_False )
, eOpenMode( 0 )
{};
@@ -123,7 +123,7 @@ void LazySvFileStream::LazyOpen()
fprintf( stderr, "\nERROR: Could not open Output-File %s!\n\n", ByteString( aFileName, RTL_TEXTENCODING_ASCII_US ).GetBuffer() );
exit ( 4 );
}
- bOpened = TRUE;
+ bOpened = sal_True;
}
}
@@ -133,12 +133,12 @@ void LazySvFileStream::LazyOpen()
//
/*****************************************************************************/
-GSILine::GSILine( const ByteString &rLine, ULONG nLine )
+GSILine::GSILine( const ByteString &rLine, sal_uLong nLine )
/*****************************************************************************/
: ByteString( rLine )
, nLineNumber( nLine )
- , bOK( TRUE )
- , bFixed ( FALSE )
+ , bOK( sal_True )
+ , bFixed ( sal_False )
{
if ( rLine.GetTokenCount( '\t' ) == 15 )
{
@@ -154,18 +154,18 @@ GSILine::GSILine( const ByteString &rLine, ULONG nLine )
// do some more format checks here
if ( !rLine.GetToken( 8, '\t' ).IsNumericAscii() )
{
- PrintError( "The length field does not contain a number!", "Line format", rLine.GetToken( 8, '\t' ), TRUE, GetLineNumber(), GetUniqId() );
+ PrintError( "The length field does not contain a number!", "Line format", rLine.GetToken( 8, '\t' ), sal_True, GetLineNumber(), GetUniqId() );
NotOK();
}
if ( !LanguageOK( aLangId ) )
{
- PrintError( "The Language is invalid!", "Line format", aLangId, TRUE, GetLineNumber(), GetUniqId() );
+ PrintError( "The Language is invalid!", "Line format", aLangId, sal_True, GetLineNumber(), GetUniqId() );
NotOK();
}
// limit GID and LID to MAX_GID_LID_LEN chars each for database conformity, see #137575#
if ( rLine.GetToken( 4, '\t' ).Len() > MAX_GID_LID_LEN || rLine.GetToken( 5, '\t' ).Len() > MAX_GID_LID_LEN )
{
- PrintError( ByteString("GID and LID may only be ").Append( ByteString::CreateFromInt32(MAX_GID_LID_LEN) ).Append( " chars long each!" ), "Line format", aLangId, TRUE, GetLineNumber(), GetUniqId() );
+ PrintError( ByteString("GID and LID may only be ").Append( ByteString::CreateFromInt32(MAX_GID_LID_LEN) ).Append( " chars long each!" ), "Line format", aLangId, sal_True, GetLineNumber(), GetUniqId() );
NotOK();
}
}
@@ -173,8 +173,8 @@ GSILine::GSILine( const ByteString &rLine, ULONG nLine )
{
aFormat = FORMAT_GSI;
ByteString sTmp( rLine );
- USHORT nPos = sTmp.Search( "($$)" );
- USHORT nStart = 0;
+ sal_uInt16 nPos = sTmp.Search( "($$)" );
+ sal_uInt16 nStart = 0;
if ( nPos != STRING_NOTFOUND )
{
aUniqId = sTmp.Copy( nStart, nPos - nStart );
@@ -214,7 +214,7 @@ GSILine::GSILine( const ByteString &rLine, ULONG nLine )
void GSILine::NotOK()
/*****************************************************************************/
{
- bOK = FALSE;
+ bOK = sal_False;
}
/*****************************************************************************/
@@ -224,7 +224,7 @@ void GSILine::ReassembleLine()
ByteString aReassemble;
if ( GetLineFormat() == FORMAT_SDF )
{
- USHORT i;
+ sal_uInt16 i;
for ( i = 0 ; i < 10 ; i++ )
{
aReassemble.Append( GetToken( i, '\t' ) );
@@ -246,8 +246,8 @@ void GSILine::ReassembleLine()
}
else if ( GetLineFormat() == FORMAT_GSI )
{
- USHORT nPos = Search( "($$)" );
- USHORT nStart = 0;
+ sal_uInt16 nPos = Search( "($$)" );
+ sal_uInt16 nStart = 0;
if ( nPos != STRING_NOTFOUND )
{
nStart = nPos + 4; // + length of the delemiter
@@ -274,17 +274,17 @@ void GSILine::ReassembleLine()
*(ByteString*)this = aReassemble;
}
else
- PrintError( "Cannot reassemble GSI line (internal Error).", "Line format", "", FALSE, GetLineNumber(), GetUniqId() );
+ PrintError( "Cannot reassemble GSI line (internal Error).", "Line format", "", sal_False, GetLineNumber(), GetUniqId() );
}
else
- PrintError( "Cannot reassemble line of unknown type (internal Error).", "Line format", "", FALSE, GetLineNumber(), GetUniqId() );
+ PrintError( "Cannot reassemble line of unknown type (internal Error).", "Line format", "", sal_False, GetLineNumber(), GetUniqId() );
}
//
// class GSIBlock
//
/*****************************************************************************/
-GSIBlock::GSIBlock( BOOL PbPrintContext, BOOL bSource, BOOL bTrans, BOOL bRef, BOOL bAllowKID, BOOL bAllowSusp )
+GSIBlock::GSIBlock( sal_Bool PbPrintContext, sal_Bool bSource, sal_Bool bTrans, sal_Bool bRef, sal_Bool bAllowKID, sal_Bool bAllowSusp )
/*****************************************************************************/
: pSourceLine( NULL )
, pReferenceLine( NULL )
@@ -294,7 +294,7 @@ GSIBlock::GSIBlock( BOOL PbPrintContext, BOOL bSource, BOOL bTrans, BOOL bRef, B
, bReference( bRef )
, bAllowKeyIDs( bAllowKID )
, bAllowSuspicious( bAllowSusp )
- , bHasBlockError( FALSE )
+ , bHasBlockError( sal_False )
{
}
@@ -305,7 +305,7 @@ GSIBlock::~GSIBlock()
delete pSourceLine;
delete pReferenceLine;
- for ( ULONG i = 0; i < Count(); i++ )
+ for ( sal_uLong i = 0; i < Count(); i++ )
delete ( GetObject( i ));
}
@@ -318,7 +318,7 @@ void GSIBlock::InsertLine( GSILine* pLine, ByteString aSourceLang)
if ( pSourceLine )
{
PrintError( "Source Language entry double. Treating as Translation.", "File format", "", pLine->GetLineNumber(), pLine->GetUniqId() );
- bHasBlockError = TRUE;
+ bHasBlockError = sal_True;
pSourceLine->NotOK();
pLine->NotOK();
}
@@ -328,7 +328,7 @@ void GSIBlock::InsertLine( GSILine* pLine, ByteString aSourceLang)
return;
}
}
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
if ( aSourceLang.Len() ) // only check blockstructure if source lang is given
{
@@ -337,7 +337,7 @@ void GSIBlock::InsertLine( GSILine* pLine, ByteString aSourceLang)
if ( GetObject( nPos )->GetLanguageId().Equals( pLine->GetLanguageId() ) )
{
PrintError( "Translation Language entry double. Checking both.", "File format", "", pLine->GetLineNumber(), pLine->GetUniqId() );
- bHasBlockError = TRUE;
+ bHasBlockError = sal_True;
GetObject( nPos )->NotOK();
pLine->NotOK();
}
@@ -356,7 +356,7 @@ void GSIBlock::SetReferenceLine( GSILine* pLine )
/*****************************************************************************/
void GSIBlock::PrintMessage( ByteString aType, ByteString aMsg, ByteString aPrefix,
- ByteString aContext, ULONG nLine, ByteString aUniqueId )
+ ByteString aContext, sal_uLong nLine, ByteString aUniqueId )
/*****************************************************************************/
{
::PrintMessage( aType, aMsg, aPrefix, aContext, bPrintContext, nLine, aUniqueId );
@@ -364,7 +364,7 @@ void GSIBlock::PrintMessage( ByteString aType, ByteString aMsg, ByteString aPref
/*****************************************************************************/
void GSIBlock::PrintError( ByteString aMsg, ByteString aPrefix,
- ByteString aContext, ULONG nLine, ByteString aUniqueId )
+ ByteString aContext, sal_uLong nLine, ByteString aUniqueId )
/*****************************************************************************/
{
PrintMessage( "Error:", aMsg, aPrefix, aContext, nLine, aUniqueId );
@@ -375,7 +375,7 @@ void GSIBlock::PrintList( ParserMessageList *pList, ByteString aPrefix,
GSILine *pLine )
/*****************************************************************************/
{
- ULONG i;
+ sal_uLong i;
for ( i = 0 ; i < pList->Count() ; i++ )
{
ParserMessage *pMsg = pList->GetObject( i );
@@ -395,7 +395,7 @@ void GSIBlock::PrintList( ParserMessageList *pList, ByteString aPrefix,
}
/*****************************************************************************/
-BOOL GSIBlock::IsUTF8( const ByteString &aTestee, BOOL bFixTags, USHORT &nErrorPos, ByteString &aErrorMsg, BOOL &bHasBeenFixed, ByteString &aFixed ) const
+sal_Bool GSIBlock::IsUTF8( const ByteString &aTestee, sal_Bool bFixTags, sal_uInt16 &nErrorPos, ByteString &aErrorMsg, sal_Bool &bHasBeenFixed, ByteString &aFixed ) const
/*****************************************************************************/
{
String aUTF8Tester( aTestee, RTL_TEXTENCODING_UTF8 );
@@ -404,7 +404,7 @@ BOOL GSIBlock::IsUTF8( const ByteString &aTestee, BOOL bFixTags, USHORT &nErrorP
aUTF8Tester = String( aTestee.GetBuffer(), nErrorPos, RTL_TEXTENCODING_UTF8 );
nErrorPos = aUTF8Tester.Len();
aErrorMsg = ByteString( "UTF8 Encoding seems to be broken" );
- return FALSE;
+ return sal_False;
}
nErrorPos = aUTF8Tester.SearchChar( String::CreateFromAscii( "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0b\x0c\x0e\x0f"
@@ -412,25 +412,25 @@ BOOL GSIBlock::IsUTF8( const ByteString &aTestee, BOOL bFixTags, USHORT &nErrorP
if ( nErrorPos != STRING_NOTFOUND )
{
aErrorMsg = ByteString( "String contains illegal character" );
- return FALSE;
+ return sal_False;
}
if ( bFixTags )
{
- bHasBeenFixed = FALSE;
+ bHasBeenFixed = sal_False;
aFixed.Erase();
}
if ( !bAllowKeyIDs )
{
- BOOL bIsKeyID = FALSE;
- BOOL bNewId = FALSE;
+ sal_Bool bIsKeyID = sal_False;
+ sal_Bool bNewId = sal_False;
ByteString aID( aTestee );
- USHORT nAfterID = 0;
+ sal_uInt16 nAfterID = 0;
if ( aTestee.Equals( "{&", 0, 2 ) )
{ // check for strings from instset_native like "{&Tahoma8}335795.Installation Wiza ..."
- USHORT nTagEnd = aTestee.Search( '}' );
+ sal_uInt16 nTagEnd = aTestee.Search( '}' );
if ( nTagEnd != STRING_NOTFOUND )
{
if ( bFixTags )
@@ -445,7 +445,7 @@ BOOL GSIBlock::IsUTF8( const ByteString &aTestee, BOOL bFixTags, USHORT &nErrorP
if ( aID.Equals( aDelimiter, 6, aDelimiter.Len() ) )
{ // New KeyId 6 Letters, digits and spechial chars followed by delimiter
- bNewId = TRUE;
+ bNewId = sal_True;
nErrorPos = 1;
aID = aID.Copy( 0, 6 );
nAfterID += 6;
@@ -453,7 +453,7 @@ BOOL GSIBlock::IsUTF8( const ByteString &aTestee, BOOL bFixTags, USHORT &nErrorP
}
else if ( ( aID.GetChar(6) == '*' ) && aID.Equals( aDelimiter, 7, aDelimiter.Len() ) )
{ // New KeyId 6 Letters, digits and spechial chars followed by '*delimiter' to indicate translation in progress
- bNewId = TRUE;
+ bNewId = sal_True;
nErrorPos = 1;
aID = aID.Copy( 0, 6 );
nAfterID += 7;
@@ -461,7 +461,7 @@ BOOL GSIBlock::IsUTF8( const ByteString &aTestee, BOOL bFixTags, USHORT &nErrorP
}
else if ( aID.GetTokenCount( '.' ) > 1 )
{ // test for old KeyIDs 5 to 6 digits followed by a dot '44373.'
- bNewId = FALSE;
+ bNewId = sal_False;
nErrorPos = 1;
aID = aID.GetToken( 0, '.' );
nAfterID = nAfterID + aID.Len();
@@ -475,12 +475,12 @@ BOOL GSIBlock::IsUTF8( const ByteString &aTestee, BOOL bFixTags, USHORT &nErrorP
{
if ( aID.Len() == 6 )
{
- bIsKeyID = TRUE;
+ bIsKeyID = sal_True;
ByteString aDigits("0123456789abcdefghijklmnopqrstuvwxyz+-<=>");
- for ( USHORT i=0 ; i < aID.Len() ;i++ )
+ for ( sal_uInt16 i=0 ; i < aID.Len() ;i++ )
{
if ( aDigits.Search( aID.GetChar(i) ) == STRING_NOTFOUND )
- bIsKeyID = FALSE;
+ bIsKeyID = sal_False;
}
}
}
@@ -490,7 +490,7 @@ BOOL GSIBlock::IsUTF8( const ByteString &aTestee, BOOL bFixTags, USHORT &nErrorP
aID.Erase( aID.Len()-1 );
if ( aID.IsNumericAscii() && aID.Len() >= 5 )
- bIsKeyID = TRUE;
+ bIsKeyID = sal_True;
}
if ( bIsKeyID )
@@ -499,32 +499,32 @@ BOOL GSIBlock::IsUTF8( const ByteString &aTestee, BOOL bFixTags, USHORT &nErrorP
if ( bFixTags )
{
aFixed += aTestee.Copy( nAfterID );
- bHasBeenFixed = TRUE;
+ bHasBeenFixed = sal_True;
aErrorMsg = ByteString( "FIXED String containing KeyID" );
}
else
aErrorMsg = ByteString( "String contains KeyID" );
- return FALSE;
+ return sal_False;
}
}
- return TRUE;
+ return sal_True;
}
/*****************************************************************************/
-BOOL GSIBlock::TestUTF8( GSILine* pTestee, BOOL bFixTags )
+sal_Bool GSIBlock::TestUTF8( GSILine* pTestee, sal_Bool bFixTags )
/*****************************************************************************/
{
- USHORT nErrorPos = 0;
+ sal_uInt16 nErrorPos = 0;
ByteString aErrorMsg;
- BOOL bError = FALSE;
+ sal_Bool bError = sal_False;
ByteString aFixed;
- BOOL bHasBeenFixed = FALSE;
+ sal_Bool bHasBeenFixed = sal_False;
if ( !IsUTF8( pTestee->GetText(), bFixTags, nErrorPos, aErrorMsg, bHasBeenFixed, aFixed ) )
{
ByteString aContext( pTestee->GetText().Copy( nErrorPos, 20 ) );
PrintError( aErrorMsg.Append(" in Text at Position " ).Append( ByteString::CreateFromInt32( nErrorPos ) ), "Text format", aContext, pTestee->GetLineNumber(), pTestee->GetUniqId() );
- bError = TRUE;
+ bError = sal_True;
if ( bHasBeenFixed )
{
pTestee->SetText( aFixed );
@@ -535,7 +535,7 @@ BOOL GSIBlock::TestUTF8( GSILine* pTestee, BOOL bFixTags )
{
ByteString aContext( pTestee->GetQuickHelpText().Copy( nErrorPos, 20 ) );
PrintError( aErrorMsg.Append(" in QuickHelpText at Position " ).Append( ByteString::CreateFromInt32( nErrorPos ) ), "Text format", aContext, pTestee->GetLineNumber(), pTestee->GetUniqId() );
- bError = TRUE;
+ bError = sal_True;
if ( bHasBeenFixed )
{
pTestee->SetQuickHelpText( aFixed );
@@ -546,7 +546,7 @@ BOOL GSIBlock::TestUTF8( GSILine* pTestee, BOOL bFixTags )
{
ByteString aContext( pTestee->GetTitle().Copy( nErrorPos, 20 ) );
PrintError( aErrorMsg.Append(" in Title at Position " ).Append( ByteString::CreateFromInt32( nErrorPos ) ), "Text format", aContext, pTestee->GetLineNumber(), pTestee->GetUniqId() );
- bError = TRUE;
+ bError = sal_True;
if ( bHasBeenFixed )
{
pTestee->SetTitle( aFixed );
@@ -560,38 +560,38 @@ BOOL GSIBlock::TestUTF8( GSILine* pTestee, BOOL bFixTags )
/*****************************************************************************/
-BOOL GSIBlock::HasSuspiciousChars( GSILine* pTestee, GSILine* pSource )
+sal_Bool GSIBlock::HasSuspiciousChars( GSILine* pTestee, GSILine* pSource )
/*****************************************************************************/
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
if ( !bAllowSuspicious && ( nPos = pTestee->GetText().Search("??")) != STRING_NOTFOUND )
if ( pSource->GetText().Search("??") == STRING_NOTFOUND )
{
String aUTF8Tester = String( pTestee->GetText(), 0, nPos, RTL_TEXTENCODING_UTF8 );
- USHORT nErrorPos = aUTF8Tester.Len();
+ sal_uInt16 nErrorPos = aUTF8Tester.Len();
ByteString aContext( pTestee->GetText().Copy( nPos, 20 ) );
PrintError( ByteString("Found double questionmark in translation only. Looks like an encoding problem at Position " ).Append( ByteString::CreateFromInt32( nErrorPos ) ), "Text format", aContext, pTestee->GetLineNumber(), pTestee->GetUniqId() );
pTestee->NotOK();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*****************************************************************************/
-BOOL GSIBlock::CheckSyntax( ULONG nLine, BOOL bRequireSourceLine, BOOL bFixTags )
+sal_Bool GSIBlock::CheckSyntax( sal_uLong nLine, sal_Bool bRequireSourceLine, sal_Bool bFixTags )
/*****************************************************************************/
{
static LingTest aTester;
- BOOL bHasError = FALSE;
+ sal_Bool bHasError = sal_False;
if ( !pSourceLine )
{
if ( bRequireSourceLine )
{
PrintError( "No source language entry defined!", "File format", "", nLine );
- bHasBlockError = TRUE;
+ bHasBlockError = sal_True;
}
}
else
@@ -601,7 +601,7 @@ BOOL GSIBlock::CheckSyntax( ULONG nLine, BOOL bRequireSourceLine, BOOL bFixTags
{
PrintList( pSourceLine->GetMessageList(), "ReferenceString", pSourceLine );
pSourceLine->NotOK();
- bHasError = TRUE;
+ bHasError = sal_True;
}
}
if ( bReference )
@@ -617,7 +617,7 @@ BOOL GSIBlock::CheckSyntax( ULONG nLine, BOOL bRequireSourceLine, BOOL bFixTags
PrintError( "No reference line found. Entry is new in source file", "File format", "", pSource->GetLineNumber(), pSource->GetUniqId() );
else
PrintError( "No reference line found. Entry is new in source file", "File format", "", nLine );
- bHasBlockError = TRUE;
+ bHasBlockError = sal_True;
}
else
{
@@ -628,7 +628,7 @@ BOOL GSIBlock::CheckSyntax( ULONG nLine, BOOL bRequireSourceLine, BOOL bFixTags
aContext.Append( "\" --> \"" ).Append( pSourceLine->Copy( nPos - 5, 15) );
PrintError( "Source Language Entry has changed.", "File format", aContext, pSourceLine->GetLineNumber(), pSourceLine->GetUniqId() );
pSourceLine->NotOK();
- bHasError = TRUE;
+ bHasError = sal_True;
}
}
}
@@ -636,7 +636,7 @@ BOOL GSIBlock::CheckSyntax( ULONG nLine, BOOL bRequireSourceLine, BOOL bFixTags
if ( pSourceLine )
bHasError |= !TestUTF8( pSourceLine, bFixTags );
- ULONG i;
+ sal_uLong i;
for ( i = 0; i < Count(); i++ )
{
aTester.CheckTestee( GetObject( i ), pSourceLine != NULL, bFixTags );
@@ -644,7 +644,7 @@ BOOL GSIBlock::CheckSyntax( ULONG nLine, BOOL bRequireSourceLine, BOOL bFixTags
{
if ( GetObject( i )->HasMessages() || aTester.GetCompareWarnings().HasErrors() )
GetObject( i )->NotOK();
- bHasError = TRUE;
+ bHasError = sal_True;
PrintList( GetObject( i )->GetMessageList(), "Translation", GetObject( i ) );
PrintList( &(aTester.GetCompareWarnings()), "Translation Tag Missmatch", GetObject( i ) );
}
@@ -656,19 +656,19 @@ BOOL GSIBlock::CheckSyntax( ULONG nLine, BOOL bRequireSourceLine, BOOL bFixTags
return bHasError || bHasBlockError;
}
-void GSIBlock::WriteError( LazySvFileStream &aErrOut, BOOL bRequireSourceLine )
+void GSIBlock::WriteError( LazySvFileStream &aErrOut, sal_Bool bRequireSourceLine )
{
if ( pSourceLine && pSourceLine->IsOK() && bCheckSourceLang && !bHasBlockError )
return;
- BOOL bHasError = FALSE;
- BOOL bCopyAll = ( !pSourceLine && bRequireSourceLine ) || ( pSourceLine && !pSourceLine->IsOK() && !bCheckTranslationLang ) || bHasBlockError;
- ULONG i;
+ sal_Bool bHasError = sal_False;
+ sal_Bool bCopyAll = ( !pSourceLine && bRequireSourceLine ) || ( pSourceLine && !pSourceLine->IsOK() && !bCheckTranslationLang ) || bHasBlockError;
+ sal_uLong i;
for ( i = 0; i < Count(); i++ )
{
if ( !GetObject( i )->IsOK() || bCopyAll )
{
- bHasError = TRUE;
+ bHasError = sal_True;
aErrOut.LazyOpen();
aErrOut.WriteLine( *GetObject( i ) );
}
@@ -681,18 +681,18 @@ void GSIBlock::WriteError( LazySvFileStream &aErrOut, BOOL bRequireSourceLine )
}
}
-void GSIBlock::WriteCorrect( LazySvFileStream &aOkOut, BOOL bRequireSourceLine )
+void GSIBlock::WriteCorrect( LazySvFileStream &aOkOut, sal_Bool bRequireSourceLine )
{
if ( ( !pSourceLine && bRequireSourceLine ) || ( pSourceLine && !pSourceLine->IsOK() && !bCheckTranslationLang ) )
return;
- BOOL bHasOK = FALSE;
- ULONG i;
+ sal_Bool bHasOK = sal_False;
+ sal_uLong i;
for ( i = 0; i < Count(); i++ )
{
if ( ( GetObject( i )->IsOK() || bCheckSourceLang ) && !bHasBlockError )
{
- bHasOK = TRUE;
+ bHasOK = sal_True;
aOkOut.LazyOpen();
aOkOut.WriteLine( *GetObject( i ) );
}
@@ -705,18 +705,18 @@ void GSIBlock::WriteCorrect( LazySvFileStream &aOkOut, BOOL bRequireSourceLine )
}
}
-void GSIBlock::WriteFixed( LazySvFileStream &aFixOut, BOOL /*bRequireSourceLine*/ )
+void GSIBlock::WriteFixed( LazySvFileStream &aFixOut, sal_Bool /*bRequireSourceLine*/ )
{
if ( pSourceLine && !pSourceLine->IsFixed() && bCheckSourceLang )
return;
- BOOL bHasFixes = FALSE;
- ULONG i;
+ sal_Bool bHasFixes = sal_False;
+ sal_uLong i;
for ( i = 0; i < Count(); i++ )
{
if ( GetObject( i )->IsFixed() )
{
- bHasFixes = TRUE;
+ bHasFixes = sal_True;
aFixOut.LazyOpen();
aFixOut.WriteLine( *GetObject( i ) );
}
@@ -785,31 +785,31 @@ int _cdecl main( int argc, char *argv[] )
/*****************************************************************************/
{
- BOOL bError = FALSE;
- BOOL bPrintContext = FALSE;
- BOOL bCheckSourceLang = FALSE;
- BOOL bCheckTranslationLang = FALSE;
- BOOL bWriteError = FALSE;
- BOOL bWriteCorrect = FALSE;
- BOOL bWriteFixed = FALSE;
- BOOL bFixTags = FALSE;
- BOOL bAllowKID = FALSE;
- BOOL bAllowSuspicious = FALSE;
+ sal_Bool bError = sal_False;
+ sal_Bool bPrintContext = sal_False;
+ sal_Bool bCheckSourceLang = sal_False;
+ sal_Bool bCheckTranslationLang = sal_False;
+ sal_Bool bWriteError = sal_False;
+ sal_Bool bWriteCorrect = sal_False;
+ sal_Bool bWriteFixed = sal_False;
+ sal_Bool bFixTags = sal_False;
+ sal_Bool bAllowKID = sal_False;
+ sal_Bool bAllowSuspicious = sal_False;
String aErrorFilename;
String aCorrectFilename;
String aFixedFilename;
- BOOL bFileHasError = FALSE;
+ sal_Bool bFileHasError = sal_False;
ByteString aSourceLang( "en-US" ); // English is default
ByteString aFilename;
ByteString aReferenceFilename;
- BOOL bReferenceFile = FALSE;
- for ( USHORT i = 1 ; i < argc ; i++ )
+ sal_Bool bReferenceFile = sal_False;
+ for ( sal_uInt16 i = 1 ; i < argc ; i++ )
{
if ( *argv[ i ] == '-' )
{
switch (*(argv[ i ]+1))
{
- case 'c':bPrintContext = TRUE;
+ case 'c':bPrintContext = sal_True;
break;
case 'w':
{
@@ -819,61 +819,61 @@ int _cdecl main( int argc, char *argv[] )
if ( (i+1) < argc )
{
aErrorFilename = String( argv[ i+1 ], RTL_TEXTENCODING_ASCII_US );
- bWriteError = TRUE;
+ bWriteError = sal_True;
i++;
}
else
{
fprintf( stderr, "\nERROR: Switch %s requires parameter!\n\n", argv[ i ] );
- bError = TRUE;
+ bError = sal_True;
}
else
- bWriteError = TRUE;
+ bWriteError = sal_True;
}
else if ( (*(argv[ i ]+2)) == 'c' )
if ( (*(argv[ i ]+3)) == 'f' )
if ( (i+1) < argc )
{
aCorrectFilename = String( argv[ i+1 ], RTL_TEXTENCODING_ASCII_US );
- bWriteCorrect = TRUE;
+ bWriteCorrect = sal_True;
i++;
}
else
{
fprintf( stderr, "\nERROR: Switch %s requires parameter!\n\n", argv[ i ] );
- bError = TRUE;
+ bError = sal_True;
}
else
- bWriteCorrect = TRUE;
+ bWriteCorrect = sal_True;
else if ( (*(argv[ i ]+2)) == 'f' )
if ( (*(argv[ i ]+3)) == 'f' )
if ( (i+1) < argc )
{
aFixedFilename = String( argv[ i+1 ], RTL_TEXTENCODING_ASCII_US );
- bWriteFixed = TRUE;
- bFixTags = TRUE;
+ bWriteFixed = sal_True;
+ bFixTags = sal_True;
i++;
}
else
{
fprintf( stderr, "\nERROR: Switch %s requires parameter!\n\n", argv[ i ] );
- bError = TRUE;
+ bError = sal_True;
}
else
{
- bWriteFixed = TRUE;
- bFixTags = TRUE;
+ bWriteFixed = sal_True;
+ bFixTags = sal_True;
}
else
{
fprintf( stderr, "\nERROR: Unknown Switch %s!\n\n", argv[ i ] );
- bError = TRUE;
+ bError = sal_True;
}
}
break;
- case 's':bCheckSourceLang = TRUE;
+ case 's':bCheckSourceLang = sal_True;
break;
- case 't':bCheckTranslationLang = TRUE;
+ case 't':bCheckTranslationLang = sal_True;
break;
case 'l':
{
@@ -887,7 +887,7 @@ int _cdecl main( int argc, char *argv[] )
else
{
fprintf( stderr, "\nERROR: Switch %s requires parameter!\n\n", argv[ i ] );
- bError = TRUE;
+ bError = sal_True;
}
}
break;
@@ -896,34 +896,34 @@ int _cdecl main( int argc, char *argv[] )
if ( (i+1) < argc )
{
aReferenceFilename = argv[ i+1 ];
- bReferenceFile = TRUE;
+ bReferenceFile = sal_True;
i++;
}
else
{
fprintf( stderr, "\nERROR: Switch %s requires parameter!\n\n", argv[ i ] );
- bError = TRUE;
+ bError = sal_True;
}
}
break;
case 'f':
{
- bFixTags = TRUE;
+ bFixTags = sal_True;
}
break;
case 'k':
{
- bAllowKID = TRUE;
+ bAllowKID = sal_True;
}
break;
case 'e':
{
- bAllowSuspicious = TRUE;
+ bAllowSuspicious = sal_True;
}
break;
default:
fprintf( stderr, "\nERROR: Unknown Switch %s!\n\n", argv[ i ] );
- bError = TRUE;
+ bError = sal_True;
}
}
else
@@ -933,7 +933,7 @@ int _cdecl main( int argc, char *argv[] )
else
{
fprintf( stderr, "\nERROR: Only one filename may be specified!\n\n");
- bError = TRUE;
+ bError = sal_True;
}
}
}
@@ -1033,20 +1033,20 @@ int _cdecl main( int argc, char *argv[] )
ByteString sReferenceLine;
GSILine* pReferenceLine = NULL;
ByteString aOldReferenceId("No Valid ID"); // just set to something which can never be an ID
- ULONG nReferenceLine = 0;
+ sal_uLong nReferenceLine = 0;
ByteString sGSILine;
GSILine* pGSILine = NULL;
ByteString aOldId("No Valid ID"); // just set to something which can never be an ID
GSIBlock *pBlock = NULL;
- ULONG nLine = 0;
+ sal_uLong nLine = 0;
while ( !aGSI.IsEof() )
{
aGSI.ReadLine( sGSILine );
nLine++;
pGSILine = new GSILine( sGSILine, nLine );
- BOOL bDelete = TRUE;
+ sal_Bool bDelete = sal_True;
if ( pGSILine->Len() )
@@ -1057,7 +1057,7 @@ int _cdecl main( int argc, char *argv[] )
pGSILine->NotOK();
if ( bWriteError )
{
- bFileHasError = TRUE;
+ bFileHasError = sal_True;
aErrOut.LazyOpen();
aErrOut.WriteLine( *pGSILine );
}
@@ -1096,7 +1096,7 @@ int _cdecl main( int argc, char *argv[] )
// find corresponding line in reference file
if ( bReferenceFile )
{
- BOOL bContinueSearching = TRUE;
+ sal_Bool bContinueSearching = sal_True;
while ( ( !aReferenceGSI.IsEof() || pReferenceLine ) && bContinueSearching )
{
if ( !pReferenceLine )
@@ -1116,7 +1116,7 @@ int _cdecl main( int argc, char *argv[] )
{
// if ( pGSILine->GetLanguageId() == aSourceLang )
// PrintError( "No reference line found. Entry is new in source file", "File format", "", bPrintContext, pGSILine->GetLineNumber(), aId );
- bContinueSearching = FALSE;
+ bContinueSearching = sal_False;
}
else
{
@@ -1138,7 +1138,7 @@ int _cdecl main( int argc, char *argv[] )
}
pBlock->InsertLine( pGSILine, aSourceLang );
- bDelete = FALSE;
+ bDelete = sal_False;
}
}
if ( bDelete )
diff --git a/l10ntools/source/gsiconv.cxx b/l10ntools/source/gsiconv.cxx
index b2e470f604ea..5e332ac945a0 100644
--- a/l10ntools/source/gsiconv.cxx
+++ b/l10ntools/source/gsiconv.cxx
@@ -39,12 +39,12 @@
#define GSI_FILE_L10NFRAMEWORK 0x0002
/*****************************************************************************/
-USHORT GetGSIFileType( SvStream &rStream )
+sal_uInt16 GetGSIFileType( SvStream &rStream )
/*****************************************************************************/
{
- USHORT nFileType = GSI_FILE_UNKNOWN;
+ sal_uInt16 nFileType = GSI_FILE_UNKNOWN;
- ULONG nPos( rStream.Tell());
+ sal_uLong nPos( rStream.Tell());
rStream.Seek( STREAM_SEEK_TO_BEGIN );
ByteString sLine;
@@ -64,7 +64,7 @@ USHORT GetGSIFileType( SvStream &rStream )
}
/*****************************************************************************/
-ByteString GetGSILineId( const ByteString &rLine, USHORT nFileType )
+ByteString GetGSILineId( const ByteString &rLine, sal_uInt16 nFileType )
/*****************************************************************************/
{
ByteString sId;
@@ -89,7 +89,7 @@ ByteString GetGSILineId( const ByteString &rLine, USHORT nFileType )
}
/*****************************************************************************/
-ByteString GetGSILineLangId( const ByteString &rLine, USHORT nFileType )
+ByteString GetGSILineLangId( const ByteString &rLine, sal_uInt16 nFileType )
/*****************************************************************************/
{
ByteString sLangId;
@@ -108,8 +108,8 @@ ByteString GetGSILineLangId( const ByteString &rLine, USHORT nFileType )
}
/*****************************************************************************/
-void ConvertGSILine( BOOL bToUTF8, ByteString &rLine,
- rtl_TextEncoding nEncoding, USHORT nFileType )
+void ConvertGSILine( sal_Bool bToUTF8, ByteString &rLine,
+ rtl_TextEncoding nEncoding, sal_uInt16 nFileType )
/*****************************************************************************/
{
switch ( nFileType ) {
@@ -122,7 +122,7 @@ void ConvertGSILine( BOOL bToUTF8, ByteString &rLine,
case GSI_FILE_L10NFRAMEWORK: {
ByteString sConverted;
- for ( USHORT i = 0; i < rLine.GetTokenCount( '\t' ); i++ ) {
+ for ( sal_uInt16 i = 0; i < rLine.GetTokenCount( '\t' ); i++ ) {
ByteString sToken = rLine.GetToken( i, '\t' );
if (( i > 9 ) && ( i < 14 )) {
if( bToUTF8 )
@@ -231,9 +231,9 @@ int _cdecl main( int argc, char *argv[] )
exit ( 3 );
}
- USHORT nFileType( GetGSIFileType( aGSI ));
+ sal_uInt16 nFileType( GetGSIFileType( aGSI ));
- ULONG nMaxLines = (ULONG) ByteString( argv[ 2 ] ).ToInt64();
+ sal_uLong nMaxLines = (sal_uLong) ByteString( argv[ 2 ] ).ToInt64();
if ( !nMaxLines ) {
fprintf( stderr, "\nERROR: Linecount must be at least 1!\n\n" );
exit ( 3 );
@@ -241,8 +241,8 @@ int _cdecl main( int argc, char *argv[] )
ByteString sGSILine;
ByteString sOldId;
- ULONG nLine = 0;
- ULONG nOutputFile = 1;
+ sal_uLong nLine = 0;
+ sal_uLong nOutputFile = 1;
String sOutput( sBase );
sOutput += String( "_", RTL_TEXTENCODING_ASCII_US );
@@ -345,7 +345,7 @@ int _cdecl main( int argc, char *argv[] )
fprintf( stderr, "\nERROR: Could not open GSI-File %s!\n\n", ByteString( argv[ 3 ] ).GetBuffer());
exit ( 3 );
}
- USHORT nFileType( GetGSIFileType( aGSI ));
+ sal_uInt16 nFileType( GetGSIFileType( aGSI ));
ByteString sGSILine;
while ( !aGSI.IsEof()) {
diff --git a/l10ntools/source/helpex.cxx b/l10ntools/source/helpex.cxx
index 15239db5d9bd..0055c233a434 100644
--- a/l10ntools/source/helpex.cxx
+++ b/l10ntools/source/helpex.cxx
@@ -51,10 +51,10 @@
// set of global variables
ByteString sInputFile;
-BOOL bEnableExport;
-BOOL bMergeMode;
-BOOL bErrorLog;
-BOOL bUTF8;
+sal_Bool bEnableExport;
+sal_Bool bMergeMode;
+sal_Bool bErrorLog;
+sal_Bool bUTF8;
ByteString sPrj;
ByteString sPrjRoot;
ByteString sOutputFile;
@@ -63,20 +63,20 @@ ByteString sOutputFileY;
ByteString sSDFFile;
/*****************************************************************************/
-BOOL ParseCommandLine( int argc, char* argv[])
+sal_Bool ParseCommandLine( int argc, char* argv[])
/*****************************************************************************/
{
- bEnableExport = FALSE;
- bMergeMode = FALSE;
- bErrorLog = TRUE;
- bUTF8 = TRUE;
+ bEnableExport = sal_False;
+ bMergeMode = sal_False;
+ bErrorLog = sal_True;
+ bUTF8 = sal_True;
sPrj = "";
sPrjRoot = "";
Export::sLanguages = "";
Export::sForcedLanguages = "";
- USHORT nState = STATE_NON;
- BOOL bInput = FALSE;
+ sal_uInt16 nState = STATE_NON;
+ sal_Bool bInput = sal_False;
// parse command line
for( int i = 1; i < argc; i++ ) {
@@ -107,15 +107,15 @@ BOOL ParseCommandLine( int argc, char* argv[])
}
else if ( ByteString( argv[ i ]).ToUpperAscii() == "-E" ) {
nState = STATE_ERRORLOG;
- bErrorLog = FALSE;
+ bErrorLog = sal_False;
}
else if ( ByteString( argv[ i ]).ToUpperAscii() == "-UTF8" ) {
nState = STATE_UTF8;
- bUTF8 = TRUE;
+ bUTF8 = sal_True;
}
else if ( ByteString( argv[ i ]).ToUpperAscii() == "-NOUTF8" ) {
nState = STATE_UTF8;
- bUTF8 = FALSE;
+ bUTF8 = sal_False;
}
else if ( ByteString( argv[ i ]).ToUpperAscii() == "-L" ) {
nState = STATE_LANGUAGES;
@@ -123,12 +123,12 @@ BOOL ParseCommandLine( int argc, char* argv[])
else {
switch ( nState ) {
case STATE_NON: {
- return FALSE; // no valid command line
+ return sal_False; // no valid command line
}
//break;
case STATE_INPUT: {
sInputFile = argv[ i ];
- bInput = TRUE; // source file found
+ bInput = sal_True; // source file found
}
break;
case STATE_OUTPUT: {
@@ -154,7 +154,7 @@ BOOL ParseCommandLine( int argc, char* argv[])
break;
case STATE_SDFFILE: {
sSDFFile = argv[ i ];
- bMergeMode = TRUE; // activate merge mode, cause merge database found
+ bMergeMode = sal_True; // activate merge mode, cause merge database found
}
break;
case STATE_LANGUAGES: {
@@ -170,12 +170,12 @@ BOOL ParseCommandLine( int argc, char* argv[])
if ( bInput ) {
// command line is valid
- bEnableExport = TRUE;
- return TRUE;
+ bEnableExport = sal_True;
+ return sal_True;
}
// command line is not valid
- return FALSE;
+ return sal_False;
}
@@ -227,8 +227,8 @@ int _cdecl main( int argc, char *argv[] )
{
//sal_uInt64 startreadloc = Export::startMessure();
- MergeDataFile aMergeDataFile( sSDFFile, sInputFile , FALSE, RTL_TEXTENCODING_MS_1252 );
- //MergeDataFile aMergeDataFile( sSDFFile, sInputFile , FALSE, RTL_TEXTENCODING_MS_1252, false );
+ MergeDataFile aMergeDataFile( sSDFFile, sInputFile , sal_False, RTL_TEXTENCODING_MS_1252 );
+ //MergeDataFile aMergeDataFile( sSDFFile, sInputFile , sal_False, RTL_TEXTENCODING_MS_1252, false );
//Export::stopMessure( ByteString("read localize.sdf") , startreadloc );
hasNoError = aParser.Merge( sSDFFile, sOutputFile , Export::sLanguages , aMergeDataFile );
@@ -260,8 +260,8 @@ int _cdecl main( int argc, char *argv[] )
aFStream.close();
ByteString sHelpFile(""); // dummy
- //MergeDataFile aMergeDataFile( sSDFFile, sHelpFile , FALSE, RTL_TEXTENCODING_MS_1252, false );
- MergeDataFile aMergeDataFile( sSDFFile, sHelpFile , FALSE, RTL_TEXTENCODING_MS_1252 );
+ //MergeDataFile aMergeDataFile( sSDFFile, sHelpFile , sal_False, RTL_TEXTENCODING_MS_1252, false );
+ MergeDataFile aMergeDataFile( sSDFFile, sHelpFile , sal_False, RTL_TEXTENCODING_MS_1252 );
//aMergeDataFile.Dump();
std::vector<ByteString> aLanguages;
diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx
index 15cb1e311002..58f8af7d3446 100644
--- a/l10ntools/source/helpmerge.cxx
+++ b/l10ntools/source/helpmerge.cxx
@@ -260,7 +260,7 @@ bool HelpParser::CreateSDF(
DirEntry aTempFile( sUsedTempFile );
aTempFile.Kill();
}
- return TRUE;
+ return sal_True;
}
ByteString HelpParser::makeAbsolutePath( const ByteString& sHelpFile , const ByteString& rRoot_in )
@@ -574,9 +574,9 @@ void HelpParser::MakeDir( const ByteString& sPath ){
ByteString sTPath( sPath );
ByteString sDelimiter( DirEntry::GetAccessDelimiter(), RTL_TEXTENCODING_ASCII_US );
sTPath.SearchAndReplaceAll( sDelimiter , '/' );
- USHORT cnt = sTPath.GetTokenCount( '/' );
+ sal_uInt16 cnt = sTPath.GetTokenCount( '/' );
ByteString sCreateDir;
- for( USHORT i = 0 ; i < cnt ; i++ )
+ for( sal_uInt16 i = 0 ; i < cnt ; i++ )
{
sCreateDir += sTPath.GetToken( i , '/' );
sCreateDir += sDelimiter;
diff --git a/l10ntools/source/lngex.cxx b/l10ntools/source/lngex.cxx
index 4ec069a810f5..119a6009d8b1 100644
--- a/l10ntools/source/lngex.cxx
+++ b/l10ntools/source/lngex.cxx
@@ -48,31 +48,31 @@
// set of global variables
ByteString sInputFile;
-BOOL bEnableExport;
-BOOL bMergeMode;
-BOOL bErrorLog;
-BOOL bUTF8;
-BOOL bULF; // ULF = Unicode Language File
+sal_Bool bEnableExport;
+sal_Bool bMergeMode;
+sal_Bool bErrorLog;
+sal_Bool bUTF8;
+sal_Bool bULF; // ULF = Unicode Language File
ByteString sPrj;
ByteString sPrjRoot;
ByteString sOutputFile;
ByteString sMergeSrc;
/*****************************************************************************/
-BOOL ParseCommandLine( int argc, char* argv[])
+sal_Bool ParseCommandLine( int argc, char* argv[])
/*****************************************************************************/
{
- bEnableExport = FALSE;
- bMergeMode = FALSE;
- bErrorLog = TRUE;
- bUTF8 = TRUE;
- bULF = FALSE;
+ bEnableExport = sal_False;
+ bMergeMode = sal_False;
+ bErrorLog = sal_True;
+ bUTF8 = sal_True;
+ bULF = sal_False;
sPrj = "";
sPrjRoot = "";
Export::sLanguages = "";
- USHORT nState = STATE_NON;
- BOOL bInput = FALSE;
+ sal_uInt16 nState = STATE_NON;
+ sal_Bool bInput = sal_False;
// parse command line
for( int i = 1; i < argc; i++ ) {
@@ -95,19 +95,19 @@ BOOL ParseCommandLine( int argc, char* argv[])
}
else if ( sSwitch == "-E" ) {
nState = STATE_ERRORLOG;
- bErrorLog = FALSE;
+ bErrorLog = sal_False;
}
else if ( sSwitch == "-UTF8" ) {
nState = STATE_UTF8;
- bUTF8 = TRUE;
+ bUTF8 = sal_True;
}
/* else if ( sSwitch == "-NOUTF8" ) {
nState = STATE_UTF8;
- bUTF8 = FALSE;
+ bUTF8 = sal_False;
}*/
/* else if ( sSwitch == "-ULF" ) {
nState = STATE_ULF;
- bULF = TRUE;
+ bULF = sal_True;
}*/
else if ( sSwitch == "-L" ) {
nState = STATE_LANGUAGES;
@@ -115,12 +115,12 @@ BOOL ParseCommandLine( int argc, char* argv[])
else {
switch ( nState ) {
case STATE_NON: {
- return FALSE; // no valid command line
+ return sal_False; // no valid command line
}
//break;
case STATE_INPUT: {
sInputFile = argv[ i ];
- bInput = TRUE; // source file found
+ bInput = sal_True; // source file found
}
break;
case STATE_OUTPUT: {
@@ -138,7 +138,7 @@ BOOL ParseCommandLine( int argc, char* argv[])
break;
case STATE_MERGESRC: {
sMergeSrc = argv[ i ];
- bMergeMode = TRUE; // activate merge mode, cause merge database found
+ bMergeMode = sal_True; // activate merge mode, cause merge database found
}
break;
case STATE_LANGUAGES: {
@@ -151,13 +151,13 @@ BOOL ParseCommandLine( int argc, char* argv[])
if ( bInput ) {
// command line is valid
- bULF = TRUE;
- bEnableExport = TRUE;
- return TRUE;
+ bULF = sal_True;
+ bEnableExport = sal_True;
+ return sal_True;
}
// command line is not valid
- return FALSE;
+ return sal_False;
}
diff --git a/l10ntools/source/lngmerge.cxx b/l10ntools/source/lngmerge.cxx
index f0093bbccea7..f63469cff75b 100644
--- a/l10ntools/source/lngmerge.cxx
+++ b/l10ntools/source/lngmerge.cxx
@@ -38,7 +38,7 @@ using namespace std;
// class LngParser
//
/*****************************************************************************/
-LngParser::LngParser( const ByteString &rLngFile, BOOL bUTF8, BOOL bULFFormat )
+LngParser::LngParser( const ByteString &rLngFile, sal_Bool bUTF8, sal_Bool bULFFormat )
/*****************************************************************************/
:
nError( LNG_OK ),
@@ -76,7 +76,7 @@ LngParser::LngParser( const ByteString &rLngFile, BOOL bUTF8, BOOL bULFFormat )
LngParser::~LngParser()
/*****************************************************************************/
{
- for ( ULONG i = 0; i < pLines->Count(); i++ )
+ for ( sal_uLong i = 0; i < pLines->Count(); i++ )
delete pLines->GetObject( i );
delete pLines;
}
@@ -99,7 +99,7 @@ void LngParser::FillInFallbacks( ByteStringHashMap Text )
}
/*****************************************************************************/
-BOOL LngParser::CreateSDF(
+sal_Bool LngParser::CreateSDF(
const ByteString &rSDFFile, const ByteString &rPrj,
const ByteString &rRoot )
/*****************************************************************************/
@@ -124,8 +124,8 @@ BOOL LngParser::CreateSDF(
sFullEntry.Copy( sPrjEntry.Len() + 1 ), gsl_getSystemTextEncoding());
sActFileName.SearchAndReplaceAll( "/", "\\" );
- ULONG nPos = 0;
- BOOL bStart = true;
+ sal_uLong nPos = 0;
+ sal_Bool bStart = true;
ByteString sGroup;
ByteStringHashMap Text;
ByteString sID;
@@ -156,7 +156,7 @@ BOOL LngParser::CreateSDF(
const ByteString &sActFileName , const ByteString &sID )
{
- BOOL bExport = true;
+ sal_Bool bExport = true;
if ( bExport ) {
ByteString sTimeStamp( Export::GetTimeStamp());
ByteString sCur;
@@ -204,7 +204,7 @@ BOOL LngParser::CreateSDF(
}
/*****************************************************************************/
-BOOL LngParser::Merge(
+sal_Bool LngParser::Merge(
const ByteString &rSDFFile, const ByteString &rDestinationFile , const ByteString& rPrj )
/*****************************************************************************/
{
@@ -217,16 +217,16 @@ BOOL LngParser::Merge(
nError = LNG_COULD_NOT_OPEN;
}
nError = LNG_OK;
-// MergeDataFile( const ByteString &rFileName, const ByteString& rFile , BOOL bErrLog, CharSet aCharSet, BOOL bUTF8 );
+// MergeDataFile( const ByteString &rFileName, const ByteString& rFile , sal_Bool bErrLog, CharSet aCharSet, sal_Bool bUTF8 );
- MergeDataFile aMergeDataFile( rSDFFile, sSource , FALSE, RTL_TEXTENCODING_MS_1252);//, bDBIsUTF8 );
+ MergeDataFile aMergeDataFile( rSDFFile, sSource , sal_False, RTL_TEXTENCODING_MS_1252);//, bDBIsUTF8 );
ByteString sTmp( Export::sLanguages );
if( sTmp.ToUpperAscii().Equals("ALL") )
Export::SetLanguages( aMergeDataFile.GetLanguages() );
aLanguages = Export::GetLanguages();
- ULONG nPos = 0;
- BOOL bGroup = FALSE;
+ sal_uLong nPos = 0;
+ sal_Bool bGroup = sal_False;
ByteString sGroup;
// seek to next group
@@ -240,7 +240,7 @@ BOOL LngParser::Merge(
sGroup = sLine.GetToken( 1, '[' ).GetToken( 0, ']' );
sGroup.EraseLeadingChars( ' ' );
sGroup.EraseTrailingChars( ' ' );
- bGroup = TRUE;
+ bGroup = sal_True;
}
nPos ++;
}
@@ -248,13 +248,13 @@ BOOL LngParser::Merge(
while ( nPos < pLines->Count()) {
ByteStringHashMap Text;
ByteString sID( sGroup );
- ULONG nLastLangPos = 0;
+ sal_uLong nLastLangPos = 0;
ResData *pResData = new ResData( "", sID , sSource );
pResData->sResTyp = "LngText";
PFormEntrys *pEntrys = aMergeDataFile.GetPFormEntrys( pResData );
// read languages
- bGroup = FALSE;
+ bGroup = sal_False;
ByteString sLanguagesDone;
@@ -268,7 +268,7 @@ BOOL LngParser::Merge(
sGroup = sLine.GetToken( 1, '[' ).GetToken( 0, ']' );
sGroup.EraseLeadingChars( ' ' );
sGroup.EraseTrailingChars( ' ' );
- bGroup = TRUE;
+ bGroup = sal_True;
nPos ++;
sLanguagesDone = "";
}
@@ -290,7 +290,7 @@ BOOL LngParser::Merge(
ByteString sText = sLine.GetToken( 1, '\"' ).GetToken( 0, '\"' );
if( sLang.Len() ){
ByteString sNewText;
- pEntrys->GetText( sNewText, STRING_TYP_TEXT, sLang, TRUE );
+ pEntrys->GetText( sNewText, STRING_TYP_TEXT, sLang, sal_True );
if ( sNewText.Len()) {
ByteString *pLine = pLines->GetObject( nPos );
@@ -326,7 +326,7 @@ BOOL LngParser::Merge(
!sCur.EqualsIgnoreCaseAscii("en-US") && !Text[ sCur ].Len() && pEntrys ){
ByteString sNewText;
- pEntrys->GetText( sNewText, STRING_TYP_TEXT, sCur, TRUE );
+ pEntrys->GetText( sNewText, STRING_TYP_TEXT, sCur, sal_True );
if (( sNewText.Len()) &&
!(( sCur.Equals("x-comment") ) && ( sNewText == "-" )))
{
@@ -348,9 +348,9 @@ BOOL LngParser::Merge(
delete pResData;
}
- for ( ULONG i = 0; i < pLines->Count(); i++ )
+ for ( sal_uLong i = 0; i < pLines->Count(); i++ )
aDestination.WriteLine( *pLines->GetObject( i ));
aDestination.Close();
- return TRUE;
+ return sal_True;
}
diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index bbc27dc229e7..276048659e3f 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -129,7 +129,7 @@ class SourceTreeLocalizer : public SourceTreeIterator
{
private:
SvFileStream aSDF;
- USHORT nMode;
+ sal_uInt16 nMode;
ByteString sLanguageRestriction;
@@ -137,12 +137,12 @@ private:
int nFileCnt;
- const ByteString GetProjectName( BOOL bAbs = FALSE );
+ const ByteString GetProjectName( sal_Bool bAbs = sal_False );
const ByteString GetProjectRootRel();
- BOOL CheckNegativeList( const ByteString &rFileName );
- BOOL CheckPositiveList( const ByteString &rFileName );
+ sal_Bool CheckNegativeList( const ByteString &rFileName );
+ sal_Bool CheckPositiveList( const ByteString &rFileName );
void WorkOnFile(
const ByteString &rFileName,
@@ -158,8 +158,8 @@ private:
const ByteString &rCollectMode
);
void WorkOnDirectory( const ByteString &rDirectory );
- BOOL ExecuteMerge();
- BOOL MergeSingleFile(
+ sal_Bool ExecuteMerge();
+ sal_Bool MergeSingleFile(
const ByteString &rPrj,
const ByteString &rFile,
const ByteString &rSDFFile
@@ -174,8 +174,8 @@ public:
void SetLanguageRestriction( const ByteString& rRestrictions )
{ sLanguageRestriction = rRestrictions; }
int getFileCnt();
- BOOL Extract( const ByteString &rDestinationFile );
- BOOL Merge( const ByteString &rSourceFile , const ByteString &rOutput );
+ sal_Bool Extract( const ByteString &rDestinationFile );
+ sal_Bool Merge( const ByteString &rSourceFile , const ByteString &rOutput );
int GetFileCnt();
virtual void OnExecuteDirectory( const rtl::OUString &rDirectory );
};
@@ -198,10 +198,10 @@ SourceTreeLocalizer::~SourceTreeLocalizer()
}
/*****************************************************************************/
-const ByteString SourceTreeLocalizer::GetProjectName( BOOL bAbs )
+const ByteString SourceTreeLocalizer::GetProjectName( sal_Bool bAbs )
/*****************************************************************************/
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
DirEntry aCur;
aCur.ToAbs();
@@ -229,7 +229,7 @@ int SourceTreeLocalizer::GetFileCnt(){
const ByteString SourceTreeLocalizer::GetProjectRootRel()
/*****************************************************************************/
{
- ByteString sProjectRoot( GetProjectName( TRUE ));
+ ByteString sProjectRoot( GetProjectName( sal_True ));
DirEntry aCur;
aCur.ToAbs();
ByteString sCur( aCur.GetFull(), RTL_TEXTENCODING_ASCII_US );
@@ -242,10 +242,10 @@ const ByteString SourceTreeLocalizer::GetProjectRootRel()
sCur.SearchAndReplaceAll( sDelimiter, "/" );
sCur.EraseLeadingChars( '/' );
- ULONG nCount = sCur.GetTokenCount( '/' );
+ sal_uLong nCount = sCur.GetTokenCount( '/' );
ByteString sProjectRootRel;
- for ( ULONG i = 0; i < nCount; i++ ) {
+ for ( sal_uLong i = 0; i < nCount; i++ ) {
if ( sProjectRootRel.Len())
sProjectRootRel += sDelimiter;
sProjectRootRel += "..";
@@ -358,11 +358,11 @@ ByteString SourceTreeLocalizer::getSourceLanguages( ByteString sLanguageRestrict
}
/*****************************************************************************/
-BOOL SourceTreeLocalizer::CheckNegativeList( const ByteString &rFileName )
+sal_Bool SourceTreeLocalizer::CheckNegativeList( const ByteString &rFileName )
/*****************************************************************************/
{
- ULONG nIndex = 0;
- BOOL bReturn = TRUE;
+ sal_uLong nIndex = 0;
+ sal_Bool bReturn = sal_True;
ByteString sDelimiter(
DirEntry::GetAccessDelimiter(), RTL_TEXTENCODING_ASCII_US );
@@ -377,7 +377,7 @@ BOOL SourceTreeLocalizer::CheckNegativeList( const ByteString &rFileName )
sNegative.ToLowerAscii();
if( sFileName.Search( sNegative ) == sFileName.Len() - sNegative.Len())
- bReturn = FALSE;
+ bReturn = sal_False;
nIndex++;
sNegative = NegativeList[ nIndex ];
@@ -387,11 +387,11 @@ BOOL SourceTreeLocalizer::CheckNegativeList( const ByteString &rFileName )
}
/*****************************************************************************/
-BOOL SourceTreeLocalizer::CheckPositiveList( const ByteString &rFileName )
+sal_Bool SourceTreeLocalizer::CheckPositiveList( const ByteString &rFileName )
/*****************************************************************************/
{
- ULONG nIndex = 0;
- BOOL bReturn = FALSE;
+ sal_uLong nIndex = 0;
+ sal_Bool bReturn = sal_False;
ByteString sDelimiter(
DirEntry::GetAccessDelimiter(), RTL_TEXTENCODING_ASCII_US );
@@ -406,7 +406,7 @@ BOOL SourceTreeLocalizer::CheckPositiveList( const ByteString &rFileName )
sNegative.ToLowerAscii();
if( sFileName.Search( sNegative ) == sFileName.Len() - sNegative.Len())
- bReturn = TRUE;
+ bReturn = sal_True;
nIndex++;
sNegative = PositiveList[ nIndex ];
@@ -431,11 +431,11 @@ void SourceTreeLocalizer::WorkOnFileType(
DirEntry aEntry( sWild );
Dir aDir( sWild, FSYS_KIND_FILE );
- for ( USHORT i = 0; i < aDir.Count(); i++ ) {
+ for ( sal_uInt16 i = 0; i < aDir.Count(); i++ ) {
DirEntry aFile( aDir[ i ] );
ByteString sFile( aFile.GetFull(), RTL_TEXTENCODING_ASCII_US );
- BOOL bAllowed = TRUE;
+ sal_Bool bAllowed = sal_True;
if ( rCollectMode.Equals( "negative" ))
bAllowed = CheckNegativeList( sFile );
@@ -452,7 +452,7 @@ void SourceTreeLocalizer::WorkOnDirectory( const ByteString &rDirectory )
/*****************************************************************************/
{
//printf("Working on Directory %s\n",rDirectory.GetBuffer());
- ULONG nIndex = 0;
+ sal_uLong nIndex = 0;
ByteString sExtension( ExeTable[ nIndex ][ 0 ] );
ByteString sExecutable( ExeTable[ nIndex ][ 1 ] );
ByteString sParameter( ExeTable[ nIndex ][ 2 ] );
@@ -486,7 +486,7 @@ void SourceTreeLocalizer::OnExecuteDirectory( const rtl::OUString &aDirectory )
}
/*****************************************************************************/
-BOOL SourceTreeLocalizer::Extract( const ByteString &rDestinationFile )
+sal_Bool SourceTreeLocalizer::Extract( const ByteString &rDestinationFile )
/*****************************************************************************/
{
nMode = LOCALIZE_EXTRACT;
@@ -494,7 +494,7 @@ BOOL SourceTreeLocalizer::Extract( const ByteString &rDestinationFile )
aSDF.Open( String( rDestinationFile , RTL_TEXTENCODING_ASCII_US ) , STREAM_STD_WRITE );
aSDF.SetLineDelimiter( LINEEND_CRLF );
- BOOL bReturn = aSDF.IsOpen();
+ sal_Bool bReturn = aSDF.IsOpen();
if ( bReturn ) {
aSDF.Seek( STREAM_SEEK_TO_END );
bReturn = StartExecute();
@@ -509,7 +509,7 @@ BOOL SourceTreeLocalizer::Extract( const ByteString &rDestinationFile )
}
/*****************************************************************************/
-BOOL SourceTreeLocalizer::MergeSingleFile(
+sal_Bool SourceTreeLocalizer::MergeSingleFile(
const ByteString &rPrj,
const ByteString &rFile,
const ByteString &rSDFFile
@@ -518,7 +518,7 @@ BOOL SourceTreeLocalizer::MergeSingleFile(
{
//printf("MergeSingleFile(%s,%s,%s)",rPrj.GetBuffer(),rFile.GetBuffer(),rSDFFile.GetBuffer());
if ( !rFile.Len())
- return TRUE;
+ return sal_True;
ByteString sRoot( Export::GetEnv( "SRC_ROOT" ));
DirEntry aEntry( String( sRoot, RTL_TEXTENCODING_ASCII_US ));
@@ -536,7 +536,7 @@ BOOL SourceTreeLocalizer::MergeSingleFile(
ByteString sBCur( aEntry.GetFull(), RTL_TEXTENCODING_ASCII_US );
- ULONG nIndex = 0;
+ sal_uLong nIndex = 0;
ByteString sExtension( aEntry.GetExtension(), RTL_TEXTENCODING_ASCII_US );
ByteString sCandidate( ExeTable[ nIndex ][ 0 ] );
@@ -548,18 +548,18 @@ BOOL SourceTreeLocalizer::MergeSingleFile(
DirEntryKind theDir=FSYS_KIND_FILE;
Dir myDir( aEntry.GetPath(), theDir);
DirEntry current;
- BOOL found=FALSE;
- for( USHORT x=0; x < myDir.Count() && !found;){
+ sal_Bool found=sal_False;
+ for( sal_uInt16 x=0; x < myDir.Count() && !found;){
current=myDir[x++];
StringCompare result=current.GetName().CompareIgnoreCaseToAscii( aEntry.GetName() );
if( result==COMPARE_EQUAL ){
fprintf(stderr,"WARNING: %s not found\n", ByteString(aEntry.GetFull(),RTL_TEXTENCODING_ASCII_US).GetBuffer() );
fprintf(stderr,"but use %s instead \n" , ByteString(current.GetFull(), RTL_TEXTENCODING_ASCII_US).GetBuffer() );
aEntry=current;
- found=TRUE;
+ found=sal_True;
}
}
- if(!found) return TRUE;
+ if(!found) return sal_True;
}
@@ -598,7 +598,7 @@ BOOL SourceTreeLocalizer::MergeSingleFile(
sOutput.GetBuffer());
}
else {
- FileStat::SetReadOnlyFlag( aEntry, FALSE );
+ FileStat::SetReadOnlyFlag( aEntry, sal_False );
String myStr2(aEntry.GetFull());
String aTemp22 = String::CreateFromAscii("_tmp");
myStr2.Append(aTemp22);
@@ -643,14 +643,14 @@ BOOL SourceTreeLocalizer::MergeSingleFile(
aOut.Kill();
} // else
}
- return TRUE;
+ return sal_True;
}
/*****************************************************************************/
-BOOL SourceTreeLocalizer::ExecuteMerge( )
+sal_Bool SourceTreeLocalizer::ExecuteMerge( )
/*****************************************************************************/
{
DirEntry aEntry( Export::GetTempFile());
- BOOL bReturn = TRUE;
+ sal_Bool bReturn = sal_True;
bool bMerged = false;
ByteString sFileName;
@@ -712,18 +712,18 @@ BOOL SourceTreeLocalizer::ExecuteMerge( )
// Test
if( bLocal ){
- USHORT nPos = sFile.SearchBackward( '\\' );
+ sal_uInt16 nPos = sFile.SearchBackward( '\\' );
ByteString sTmp = sFile.Copy( nPos+1 , sFile.Len()-nPos-1 );
//printf("'%s'='%s'\n",sTmp.GetBuffer(), sOutputFileName.GetBuffer());
if( sTmp.CompareTo(sOutputFileName) == COMPARE_EQUAL ){
bMerged = true;
if ( !MergeSingleFile( sPrj, sFile, sSDFFile ))
- bReturn = FALSE;
+ bReturn = sal_False;
}else{
bMerged = true;
//printf("MergeSingleFile('%s','%s','%s')\n",sPrj.GetBuffer(),sFile.GetBuffer(),sSDFFile.GetBuffer());
if ( !MergeSingleFile( sPrj, sFile, sSDFFile ))
- bReturn = FALSE;
+ bReturn = sal_False;
}
}
}
@@ -742,7 +742,7 @@ BOOL SourceTreeLocalizer::ExecuteMerge( )
}
/*****************************************************************************/
-BOOL SourceTreeLocalizer::Merge( const ByteString &rSourceFile , const ByteString &rOutput )
+sal_Bool SourceTreeLocalizer::Merge( const ByteString &rSourceFile , const ByteString &rOutput )
/*****************************************************************************/
{
sOutputFile = rOutput;
@@ -750,7 +750,7 @@ BOOL SourceTreeLocalizer::Merge( const ByteString &rSourceFile , const ByteStrin
aSDF.Open( String( rSourceFile, RTL_TEXTENCODING_ASCII_US ),
STREAM_STD_READ );
- BOOL bReturn = aSDF.IsOpen();
+ sal_Bool bReturn = aSDF.IsOpen();
if ( bReturn ) {
bReturn = ExecuteMerge();
// aSDF.Close();
@@ -807,7 +807,7 @@ int Error()
}
/*****************************************************************************/
-BOOL CheckLanguages( ByteString &rLanguages )
+sal_Bool CheckLanguages( ByteString &rLanguages )
/*****************************************************************************/
{
ByteString sTmp( rLanguages );
@@ -824,17 +824,17 @@ int _cdecl main( int argc, char *argv[] )
{
String sTempBase( String::CreateFromAscii( "loc" ));
DirEntry::SetTempNameBase( sTempBase );
- USHORT nState = STATE_NONE;
+ sal_uInt16 nState = STATE_NONE;
- BOOL bExport = FALSE;
- BOOL bMerge = FALSE;
+ sal_Bool bExport = sal_False;
+ sal_Bool bMerge = sal_False;
bool bSkipLinks = false;
ByteString sLanguages;
ByteString sFileName;
ByteString sOutput;
- bExport = TRUE;
+ bExport = sal_True;
for( int i = 1; i < argc; i++ ) {
ByteString sSwitch( argv[ i ] );
@@ -844,7 +844,7 @@ int _cdecl main( int argc, char *argv[] )
nState = STATE_EXPORT;
if ( bMerge )
return Error();
- bExport = TRUE;
+ bExport = sal_True;
}
else if ( sSwitch.Equals( "-I" ) )
nState = STATE_ISOCODE;
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index 8c06d5a28171..21002d79141e 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -61,12 +61,12 @@ ByteString PFormEntrys::Dump()
return sRet;
}
-BOOL PFormEntrys::GetTransex3Text( ByteString &rReturn,
- USHORT nTyp, const ByteString &nLangIndex, BOOL bDel )
+sal_Bool PFormEntrys::GetTransex3Text( ByteString &rReturn,
+ sal_uInt16 nTyp, const ByteString &nLangIndex, sal_Bool bDel )
{
- BOOL rc = GetText( rReturn , nTyp , nLangIndex , bDel );
+ sal_Bool rc = GetText( rReturn , nTyp , nLangIndex , bDel );
ByteString test( rReturn );
- for( USHORT idx = 0; idx < rReturn.Len(); idx++ )
+ for( sal_uInt16 idx = 0; idx < rReturn.Len(); idx++ )
{
if( rReturn.GetChar( idx ) == '\"' && ( idx >= 1 ) && rReturn.GetChar( idx-1 ) == '\\' )
{
@@ -78,18 +78,18 @@ BOOL PFormEntrys::GetTransex3Text( ByteString &rReturn,
return rc;
}
/*****************************************************************************/
-BOOL PFormEntrys::GetText( ByteString &rReturn,
- USHORT nTyp, const ByteString &nLangIndex, BOOL bDel )
+sal_Bool PFormEntrys::GetText( ByteString &rReturn,
+ sal_uInt16 nTyp, const ByteString &nLangIndex, sal_Bool bDel )
{
- BOOL bReturn=TRUE;
+ sal_Bool bReturn=sal_True;
switch ( nTyp ) {
case STRING_TYP_TEXT :
rReturn = sText[ nLangIndex ];
if ( bDel )
sText[ nLangIndex ] = "";
bReturn = bTextFirst[ nLangIndex ];
- bTextFirst[ nLangIndex ] = FALSE;
+ bTextFirst[ nLangIndex ] = sal_False;
break;
case STRING_TYP_HELPTEXT :
rReturn = sHelpText;
@@ -99,14 +99,14 @@ BOOL PFormEntrys::GetText( ByteString &rReturn,
if ( bDel )
sQuickHelpText[ nLangIndex ] = "";
bReturn = bQuickHelpTextFirst[ nLangIndex ];
- bQuickHelpTextFirst[ nLangIndex ] = FALSE;
+ bQuickHelpTextFirst[ nLangIndex ] = sal_False;
break;
case STRING_TYP_TITLE :
rReturn = sTitle[ nLangIndex ];
if ( bDel )
sTitle[ nLangIndex ] = "";
bReturn = bTitleFirst[ nLangIndex ];
- bTitleFirst[ nLangIndex ] = FALSE;
+ bTitleFirst[ nLangIndex ] = sal_False;
break;
}
return bReturn;
@@ -163,7 +163,7 @@ PFormEntrys *MergeData::InsertEntry( const ByteString &rPForm )
return pFEntrys;
}
-BOOL MergeData::operator==( ResData *pData )
+sal_Bool MergeData::operator==( ResData *pData )
{
ByteString sResTyp_upper( pData->sResTyp );
sResTyp_upper.ToUpperAscii();
@@ -188,7 +188,7 @@ BOOL MergeData::operator==( ResData *pData )
MergeDataFile::MergeDataFile(
const ByteString &rFileName,
const ByteString& sFile,
- BOOL bErrLog,
+ sal_Bool bErrLog,
CharSet aCharSet,
bool bCaseSensitive)
: bErrorLog( bErrLog )
@@ -216,8 +216,7 @@ MergeDataFile::MergeDataFile(
{
// Skip all wrong filenames
const ::rtl::OString filename = lcl_NormalizeFilename(sLine.GetToken( 1 , '\t' ));
-
- if(isFileEmpty || (!isFileEmpty && filename.equals(sFileNormalized)))
+ if(isFileEmpty || sFileNormalized.equals("") || (!isFileEmpty && filename.equals(sFileNormalized)) )
{
xub_StrLen rIdx = 0;
const ByteString sTYP = sLine.GetToken( 3, '\t', rIdx );
diff --git a/l10ntools/source/srciter.cxx b/l10ntools/source/srciter.cxx
index e928a244efe6..0c5071fca053 100644
--- a/l10ntools/source/srciter.cxx
+++ b/l10ntools/source/srciter.cxx
@@ -40,7 +40,7 @@
SourceTreeIterator::SourceTreeIterator(
const ByteString &rRootDirectory, const ByteString &rVersion , bool bLocal_in )
/*****************************************************************************/
- : bInExecute( FALSE ) , bLocal( bLocal_in )
+ : bInExecute( sal_False ) , bLocal( bLocal_in )
{
(void) rVersion ;
@@ -103,31 +103,31 @@ void SourceTreeIterator::ExecuteDirectory( transex::Directory& aDirectory )
aDirectory.readDirectory();
OnExecuteDirectory( aDirectory.getFullName() );
if ( aDirectory.getSubDirectories().size() )
- for ( ULONG i=0;i < aDirectory.getSubDirectories().size();i++ )
+ for ( sal_uLong i=0;i < aDirectory.getSubDirectories().size();i++ )
ExecuteDirectory( aDirectory.getSubDirectories()[ i ] );
}
}
/*****************************************************************************/
-BOOL SourceTreeIterator::StartExecute()
+sal_Bool SourceTreeIterator::StartExecute()
/*****************************************************************************/
{
- bInExecute = TRUE; // FIXME
+ bInExecute = sal_True; // FIXME
ExecuteDirectory( aRootDirectory );
if ( bInExecute ) { // FIXME
- bInExecute = FALSE;
- return TRUE;
+ bInExecute = sal_False;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*****************************************************************************/
void SourceTreeIterator::EndExecute()
/*****************************************************************************/
{
- bInExecute = FALSE;
+ bInExecute = sal_False;
}
/*****************************************************************************/
diff --git a/l10ntools/source/tagtest.cxx b/l10ntools/source/tagtest.cxx
index c382aaa7272d..f60785343c91 100644
--- a/l10ntools/source/tagtest.cxx
+++ b/l10ntools/source/tagtest.cxx
@@ -42,12 +42,12 @@
-TokenInfo::TokenInfo( TokenId pnId, USHORT nP, String paStr, ParserMessageList &rErrorList )
-: bClosed(FALSE)
-, bCloseTag(FALSE)
-, bIsBroken(FALSE)
-, bHasBeenFixed(FALSE)
-, bDone(FALSE)
+TokenInfo::TokenInfo( TokenId pnId, sal_uInt16 nP, String paStr, ParserMessageList &rErrorList )
+: bClosed(sal_False)
+, bCloseTag(sal_False)
+, bIsBroken(sal_False)
+, bHasBeenFixed(sal_False)
+, bDone(sal_False)
, aTokenString( paStr )
, nId( pnId )
, nPos(nP)
@@ -90,14 +90,14 @@ CLOSETAG_HAS_TAG_NAME '>' -> FINISHED
*/
void TokenInfo::SplitTag( ParserMessageList &rErrorList )
{
- USHORT nLastPos = 2; // skip initial \<
- USHORT nCheckPos = nLastPos;
+ sal_uInt16 nLastPos = 2; // skip initial \<
+ sal_uInt16 nCheckPos = nLastPos;
String aDelims( String::CreateFromAscii( " \\=>/" ) );
String aPortion;
String aValue; // store the value of a property
ByteString aName; // store the name of a property/tag
- BOOL bCheckName = FALSE;
- BOOL bCheckEmpty = FALSE;
+ sal_Bool bCheckName = sal_False;
+ sal_Bool bCheckEmpty = sal_False;
sal_Unicode cDelim;
tagcheck aState = TC_START;
@@ -126,7 +126,7 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
switch ( cDelim )
{
case ' ': aState = TC_HAS_TAG_NAME;
- bCheckName = TRUE;
+ bCheckName = sal_True;
break;
case '/':
{
@@ -137,12 +137,12 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
else
{
aState = TC_CLOSED;
- bCheckName = TRUE;
+ bCheckName = sal_True;
}
}
break;
case '>': aState = TC_FINISHED;
- bCheckName = TRUE;
+ bCheckName = sal_True;
break;
default: aState = TC_ERROR;
}
@@ -156,16 +156,16 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
switch ( cDelim )
{
case '=': aState = TC_HAS_PROP_NAME_EQ;
- bCheckName = TRUE;
+ bCheckName = sal_True;
break;
case ' ': aState = TC_HAS_PROP_NAME_SP;
- bCheckName = TRUE;
+ bCheckName = sal_True;
break;
case '/': aState = TC_CLOSED;
- bCheckEmpty = TRUE;
+ bCheckEmpty = sal_True;
break;
case '>': aState = TC_FINISHED;
- bCheckEmpty = TRUE;
+ bCheckEmpty = sal_True;
break;
default: aState = TC_ERROR;
}
@@ -176,7 +176,7 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
switch ( cDelim )
{
case '=': aState = TC_HAS_PROP_NAME_EQ;
- bCheckEmpty = TRUE;
+ bCheckEmpty = sal_True;
break;
default: aState = TC_ERROR;
}
@@ -188,10 +188,10 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
switch ( cDelim )
{
case ' ': aState = TC_HAS_PROP_NAME_EQ_SP;
- bCheckEmpty = TRUE;
+ bCheckEmpty = sal_True;
break;
case '\"': aState = TC_INSIDE_STRING;
- bCheckEmpty = TRUE;
+ bCheckEmpty = sal_True;
aValue.Erase();
break;
default: aState = TC_ERROR;
@@ -203,7 +203,7 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
switch ( cDelim )
{
case '\"': aState = TC_INSIDE_STRING;
- bCheckEmpty = TRUE;
+ bCheckEmpty = sal_True;
aValue.Erase();
break;
default: aState = TC_ERROR;
@@ -224,14 +224,14 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
if ( !IsPropertyValueValid( aName, aValue ) )
{
rErrorList.AddError( 25, ByteString("Property '").Append(aName).Append("' has invalid value '").Append(ByteString( aValue, RTL_TEXTENCODING_UTF8 )).Append("' "), *this );
- bIsBroken = TRUE;
+ bIsBroken = sal_True;
}
aProperties[ aName ] = aValue;
}
else
{
rErrorList.AddError( 25, ByteString("Property '").Append(aName).Append("' defined twice "), *this );
- bIsBroken = TRUE;
+ bIsBroken = sal_True;
}
}
break;
@@ -251,13 +251,13 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
switch ( cDelim )
{
case ' ': aState = TC_HAS_TAG_NAME;
- bCheckEmpty = TRUE;
+ bCheckEmpty = sal_True;
break;
case '/': aState = TC_CLOSED;
- bCheckEmpty = TRUE;
+ bCheckEmpty = sal_True;
break;
case '>': aState = TC_FINISHED;
- bCheckEmpty = TRUE;
+ bCheckEmpty = sal_True;
break;
default: aState = TC_ERROR;
}
@@ -269,11 +269,11 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
switch ( cDelim )
{
case ' ': aState = TC_CLOSED_SPACE;
- bCheckEmpty = TRUE;
- bClosed = TRUE;
+ bCheckEmpty = sal_True;
+ bClosed = sal_True;
break;
case '>': aState = TC_FINISHED;
- bCheckEmpty = TRUE;
+ bCheckEmpty = sal_True;
break;
default: aState = TC_ERROR;
}
@@ -284,7 +284,7 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
switch ( cDelim )
{
case '>': aState = TC_FINISHED;
- bCheckEmpty = TRUE;
+ bCheckEmpty = sal_True;
break;
default: aState = TC_ERROR;
}
@@ -293,16 +293,16 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
// CLOSETAG ' ' -> CLOSETAG_HAS_TAG_NAME
// CLOSETAG '>' -> FINISHED
case TC_CLOSETAG:
- bCloseTag = TRUE;
+ bCloseTag = sal_True;
switch ( cDelim )
{
case ' ': aState = TC_CLOSETAG_HAS_TAG_NAME;
aTagName = aPortion;
- bCheckName = TRUE;
+ bCheckName = sal_True;
break;
case '>': aState = TC_FINISHED;
aTagName = aPortion;
- bCheckName = TRUE;
+ bCheckName = sal_True;
break;
default: aState = TC_ERROR;
}
@@ -313,7 +313,7 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
switch ( cDelim )
{
case '>': aState = TC_FINISHED;
- bCheckEmpty = TRUE;
+ bCheckEmpty = sal_True;
break;
default: aState = TC_ERROR;
}
@@ -321,7 +321,7 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
default: rErrorList.AddError( 99, "Internal error Parsing Tag ", *this );
- bIsBroken = TRUE;
+ bIsBroken = sal_True;
}
@@ -330,14 +330,14 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
if ( aPortion.Len() == 0 )
{
rErrorList.AddError( 25, "Tag/Property name missing ", *this );
- bIsBroken = TRUE;
+ bIsBroken = sal_True;
}
else
{
aName = ByteString( aPortion, RTL_TEXTENCODING_UTF8 );
// "a-zA-Z_-.0-9"
xub_StrLen nCount;
- BOOL bBroken = FALSE;
+ sal_Bool bBroken = sal_False;
const sal_Char* aBuf = aName.GetBuffer();
for ( nCount = 0 ; !bBroken && nCount < aName.Len() ; nCount++ )
{
@@ -353,11 +353,11 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
if ( bBroken )
{
rErrorList.AddError( 25, "Found illegal character in Tag/Property name ", *this );
- bIsBroken = TRUE;
+ bIsBroken = sal_True;
}
}
- bCheckName = FALSE;
+ bCheckName = sal_False;
}
if ( bCheckEmpty )
@@ -365,9 +365,9 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
if ( aPortion.Len() )
{
rErrorList.AddError( 25, ByteString("Found displaced characters '").Append(ByteString( aPortion, RTL_TEXTENCODING_UTF8 )).Append("' in Tag "), *this );
- bIsBroken = TRUE;
+ bIsBroken = sal_True;
}
- bCheckEmpty = FALSE;
+ bCheckEmpty = sal_False;
}
@@ -383,23 +383,23 @@ void TokenInfo::SplitTag( ParserMessageList &rErrorList )
if ( aState != TC_FINISHED )
{
rErrorList.AddError( 25, "Parsing error in Tag ", *this );
- bIsBroken = TRUE;
+ bIsBroken = sal_True;
}
}
-BOOL TokenInfo::IsPropertyRelevant( const ByteString &aName, const String &aValue ) const
+sal_Bool TokenInfo::IsPropertyRelevant( const ByteString &aName, const String &aValue ) const
{
if ( aTagName.EqualsAscii( "alt" ) && aName.Equals( "xml-lang" ) )
- return FALSE;
+ return sal_False;
if ( aTagName.EqualsAscii( "ahelp" ) && aName.Equals( "visibility" ) && aValue.EqualsAscii("visible") )
- return FALSE;
+ return sal_False;
if ( aTagName.EqualsAscii( "image" ) && (aName.Equals( "width" ) || aName.Equals( "height" )) )
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
-BOOL TokenInfo::IsPropertyValueValid( const ByteString &aName, const String &aValue ) const
+sal_Bool TokenInfo::IsPropertyValueValid( const ByteString &aName, const String &aValue ) const
{
/* removed due to i56740
if ( aTagName.EqualsAscii( "switchinline" ) && aName.Equals( "select" ) )
@@ -415,26 +415,26 @@ BOOL TokenInfo::IsPropertyValueValid( const ByteString &aName, const String &aVa
}
// we don't know any better so we assume it to be OK
- return TRUE;
+ return sal_True;
}
-BOOL TokenInfo::IsPropertyInvariant( const ByteString &aName, const String &aValue ) const
+sal_Bool TokenInfo::IsPropertyInvariant( const ByteString &aName, const String &aValue ) const
{
if ( aTagName.EqualsAscii( "link" ) && aName.Equals( "name" ) )
- return FALSE;
+ return sal_False;
if ( aTagName.EqualsAscii( "link" ) && aName.Equals( "href" ) )
{ // check for external reference
if ( aValue.Copy( 0, 5 ).EqualsIgnoreCaseAscii( "http:" )
|| aValue.Copy( 0, 6 ).EqualsIgnoreCaseAscii( "https:" )
|| aValue.Copy( 0, 4 ).EqualsIgnoreCaseAscii( "ftp:" ) )
- return FALSE;
+ return sal_False;
else
- return TRUE;
+ return sal_True;
}
- return TRUE;
+ return sal_True;
}
-BOOL TokenInfo::IsPropertyFixable( const ByteString &aName ) const
+sal_Bool TokenInfo::IsPropertyFixable( const ByteString &aName ) const
{
// name everything that is allowed to be fixed automatically here
if ( (aTagName.EqualsAscii( "ahelp" ) && aName.Equals( "hid" ))
@@ -443,25 +443,25 @@ BOOL TokenInfo::IsPropertyFixable( const ByteString &aName ) const
|| (aTagName.EqualsAscii( "variable" ) && aName.Equals( "id" ))
|| (aTagName.EqualsAscii( "image" ) && aName.Equals( "src" ))
|| (aTagName.EqualsAscii( "image" ) && aName.Equals( "id" ) ))
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
-BOOL TokenInfo::MatchesTranslation( TokenInfo& rInfo, BOOL bGenErrors, ParserMessageList &rErrorList, BOOL bFixTags ) const
+sal_Bool TokenInfo::MatchesTranslation( TokenInfo& rInfo, sal_Bool bGenErrors, ParserMessageList &rErrorList, sal_Bool bFixTags ) const
{
// check if tags are equal
// check if all existing properties are in the translation as well and
// wether they have a matching content (the same in most cases)
if ( nId != rInfo.nId )
- return FALSE;
+ return sal_False;
if ( !aTagName.Equals( rInfo.aTagName ) )
- return FALSE;
+ return sal_False;
// If one of the tags has formating errors already it does make no sense to check here, so return right away
if ( bGenErrors && ( bIsBroken || rInfo.bIsBroken ) )
- return TRUE;
+ return sal_True;
StringHashMap::const_iterator iProp;
for( iProp = aProperties.begin() ; iProp != aProperties.end(); ++iProp )
@@ -485,7 +485,7 @@ BOOL TokenInfo::MatchesTranslation( TokenInfo& rInfo, BOOL bGenErrors, ParserMes
else
rErrorList.AddError( 25, ByteString("Property '").Append(iProp->first).Append("': value different in Translation "), *this );
}
- else return FALSE;
+ else return sal_False;
}
}
}
@@ -496,7 +496,7 @@ BOOL TokenInfo::MatchesTranslation( TokenInfo& rInfo, BOOL bGenErrors, ParserMes
{
if ( bGenErrors )
rErrorList.AddError( 25, ByteString("Property '").Append(iProp->first).Append("' missing in Translation "), *this );
- else return FALSE;
+ else return sal_False;
}
}
}
@@ -508,7 +508,7 @@ BOOL TokenInfo::MatchesTranslation( TokenInfo& rInfo, BOOL bGenErrors, ParserMes
{
if ( bGenErrors )
rErrorList.AddError( 25, ByteString("Extra Property '").Append(iProp->first).Append("' in Translation "), rInfo );
- else return FALSE;
+ else return sal_False;
}
}
}
@@ -516,7 +516,7 @@ BOOL TokenInfo::MatchesTranslation( TokenInfo& rInfo, BOOL bGenErrors, ParserMes
// if we reach here eather
// the tags match completely or
// the tags match but not the properties and we generated errors for that
- return TRUE;
+ return sal_True;
}
String TokenInfo::GetTagName() const
@@ -548,23 +548,23 @@ String TokenInfo::MakeTag() const
}
-void ParserMessageList::AddError( USHORT nErrorNr, ByteString aErrorText, const TokenInfo &rTag )
+void ParserMessageList::AddError( sal_uInt16 nErrorNr, ByteString aErrorText, const TokenInfo &rTag )
{
Insert( new ParserError( nErrorNr, aErrorText, rTag ), LIST_APPEND );
}
-void ParserMessageList::AddWarning( USHORT nErrorNr, ByteString aErrorText, const TokenInfo &rTag )
+void ParserMessageList::AddWarning( sal_uInt16 nErrorNr, ByteString aErrorText, const TokenInfo &rTag )
{
Insert( new ParserWarning( nErrorNr, aErrorText, rTag ), LIST_APPEND );
}
-BOOL ParserMessageList::HasErrors()
+sal_Bool ParserMessageList::HasErrors()
{
- USHORT i;
+ sal_uInt16 i;
for ( i=0 ; i < Count() ; i++ )
if ( GetObject( i )->IsError() )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
struct Tag
@@ -669,7 +669,7 @@ void SimpleParser::Parse( String PaSource )
TokenInfo SimpleParser::GetNextToken( ParserMessageList &rErrorList )
{
TokenInfo aResult;
- USHORT nTokenStartPos = 0;
+ sal_uInt16 nTokenStartPos = 0;
if ( aNextTag.nId != TAG_NOMORETAGS )
{
aResult = aNextTag;
@@ -686,9 +686,9 @@ TokenInfo SimpleParser::GetNextToken( ParserMessageList &rErrorList )
{
// check for paired \" \"
bool bEven = true;
- USHORT nQuotePos = 0;
- USHORT nQuotedQuotesPos = aLastToken.SearchAscii( "\\\"" );
- USHORT nQuotedBackPos = aLastToken.SearchAscii( "\\\\" ); // this is only to kick out quoted backslashes
+ sal_uInt16 nQuotePos = 0;
+ sal_uInt16 nQuotedQuotesPos = aLastToken.SearchAscii( "\\\"" );
+ sal_uInt16 nQuotedBackPos = aLastToken.SearchAscii( "\\\\" ); // this is only to kick out quoted backslashes
while ( nQuotedQuotesPos != STRING_NOTFOUND )
{
if ( nQuotedBackPos <= nQuotedQuotesPos )
@@ -707,7 +707,7 @@ TokenInfo SimpleParser::GetNextToken( ParserMessageList &rErrorList )
}
// check if we have an end-tag or a start-tag
- USHORT nNonBlankStartPos,nNonBlankEndPos;
+ sal_uInt16 nNonBlankStartPos,nNonBlankEndPos;
nNonBlankStartPos = 2;
while ( aLastToken.GetChar(nNonBlankStartPos) == ' ' )
nNonBlankStartPos++;
@@ -725,7 +725,7 @@ TokenInfo SimpleParser::GetNextToken( ParserMessageList &rErrorList )
}
else
{
- USHORT i = 0;
+ sal_uInt16 i = 0;
while ( aKnownTags[i].nTag != TAG_UNKNOWN_TAG &&
aLastToken != aKnownTags[i].GetName() )
i++;
@@ -739,12 +739,12 @@ TokenInfo SimpleParser::GetNextToken( ParserMessageList &rErrorList )
return aResult;
}
-String SimpleParser::GetNextTokenString( ParserMessageList &rErrorList, USHORT &rTagStartPos )
+String SimpleParser::GetNextTokenString( ParserMessageList &rErrorList, sal_uInt16 &rTagStartPos )
{
-// USHORT nStyle1StartPos = aSource.SearchAscii( "<#", nPos );
- USHORT nStyle2StartPos = aSource.SearchAscii( "$[", nPos );
- USHORT nStyle3StartPos = aSource.SearchAscii( "\\<", nPos );
- USHORT nStyle4StartPos = aSource.SearchAscii( "\\\\", nPos ); // this is only to kick out quoted backslashes
+// sal_uInt16 nStyle1StartPos = aSource.SearchAscii( "<#", nPos );
+ sal_uInt16 nStyle2StartPos = aSource.SearchAscii( "$[", nPos );
+ sal_uInt16 nStyle3StartPos = aSource.SearchAscii( "\\<", nPos );
+ sal_uInt16 nStyle4StartPos = aSource.SearchAscii( "\\\\", nPos ); // this is only to kick out quoted backslashes
rTagStartPos = 0;
@@ -764,7 +764,7 @@ String SimpleParser::GetNextTokenString( ParserMessageList &rErrorList, USHORT &
/* if ( nStyle1StartPos < nStyle2StartPos && nStyle1StartPos <= nStyle3StartPos ) // <= to make sure our spechial tags are recognized before all others
{ // test for <# ... > style tokens
- USHORT nEndPos = aSource.SearchAscii( ">", nStyle1StartPos );
+ sal_uInt16 nEndPos = aSource.SearchAscii( ">", nStyle1StartPos );
if ( nEndPos == STRING_NOTFOUND )
{ // Token is incomplete. Skip start and search for better ones
nPos = nStyle1StartPos +2;
@@ -776,7 +776,7 @@ String SimpleParser::GetNextTokenString( ParserMessageList &rErrorList, USHORT &
}
else*/ if ( nStyle2StartPos < nStyle3StartPos )
{ // test for $[ ... ] style tokens
- USHORT nEndPos = aSource.SearchAscii( "]", nStyle2StartPos);
+ sal_uInt16 nEndPos = aSource.SearchAscii( "]", nStyle2StartPos);
if ( nEndPos == STRING_NOTFOUND )
{ // Token is incomplete. Skip start and search for better ones
nPos = nStyle2StartPos +2;
@@ -788,8 +788,8 @@ String SimpleParser::GetNextTokenString( ParserMessageList &rErrorList, USHORT &
}
else
{ // test for \< ... \> style tokens
- USHORT nEndPos = aSource.SearchAscii( "\\>", nStyle3StartPos);
- USHORT nQuotedBackPos = aSource.SearchAscii( "\\\\", nStyle3StartPos ); // this is only to kick out quoted backslashes
+ sal_uInt16 nEndPos = aSource.SearchAscii( "\\>", nStyle3StartPos);
+ sal_uInt16 nQuotedBackPos = aSource.SearchAscii( "\\\\", nStyle3StartPos ); // this is only to kick out quoted backslashes
while ( nQuotedBackPos <= nEndPos && nQuotedBackPos != STRING_NOTFOUND )
{
nEndPos = aSource.SearchAscii( "\\>", nQuotedBackPos +2);
@@ -816,7 +816,7 @@ String SimpleParser::GetLexem( TokenInfo const &aToken )
return aToken.aTokenString;
else
{
- USHORT i = 0;
+ sal_uInt16 i = 0;
while ( aKnownTags[i].nTag != TAG_UNKNOWN_TAG &&
aKnownTags[i].nTag != aToken.nId )
i++;
@@ -841,8 +841,8 @@ void TokenParser::Parse( const String &aCode, ParserMessageList* pList )
nPfCaseOptions = 0;
nAppCaseOptions = 0;
- bPfCaseActive = FALSE;
- bAppCaseActive = FALSE;
+ bPfCaseActive = sal_False;
+ bAppCaseActive = sal_False;
nActiveRefTypes = 0;
@@ -977,11 +977,11 @@ void TokenParser::Paragraph()
if ( ! bPfCaseActive )
{
//PfCases duerfen nicht verschachtelt sein:
- bPfCaseActive = TRUE;
+ bPfCaseActive = sal_True;
PfCase();
//So jetzt kann wieder ein PfCase kommen:
- bPfCaseActive = FALSE;
+ bPfCaseActive = sal_False;
Paragraph();
}
}
@@ -999,11 +999,11 @@ void TokenParser::Paragraph()
if ( !bAppCaseActive )
{
//AppCases duerfen nicht verschachtelt sein:
- bAppCaseActive = TRUE;
+ bAppCaseActive = sal_True;
AppCase();
//jetzt koennen wieder AppCases kommen:
- bAppCaseActive = FALSE;
+ bAppCaseActive = sal_False;
Paragraph();
}
}
@@ -1311,12 +1311,12 @@ void TokenParser::TagRef()
}
}
-BOOL TokenParser::match( const TokenInfo &aCurrentToken, const TokenId &aExpectedToken )
+sal_Bool TokenParser::match( const TokenInfo &aCurrentToken, const TokenId &aExpectedToken )
{
return match( aCurrentToken, TokenInfo( aExpectedToken, TOK_INVALIDPOS ) );
}
-BOOL TokenParser::match( const TokenInfo &aCurrentToken, const TokenInfo &rExpectedToken )
+sal_Bool TokenParser::match( const TokenInfo &aCurrentToken, const TokenInfo &rExpectedToken )
{
TokenInfo aExpectedToken( rExpectedToken );
if ( aCurrentToken.nId == aExpectedToken.nId )
@@ -1326,7 +1326,7 @@ BOOL TokenParser::match( const TokenInfo &aCurrentToken, const TokenInfo &rExpec
|| aCurrentToken.nId != TAG_COMMONEND )
{
aTag = aParser.GetNextToken( *pErrorList );
- return TRUE;
+ return sal_True;
}
}
@@ -1347,10 +1347,10 @@ BOOL TokenParser::match( const TokenInfo &aCurrentToken, const TokenInfo &rExpec
sTmp += " near ";
ParseError( 7, sTmp, aCurrentToken );
}
- return FALSE;
+ return sal_False;
}
-void TokenParser::ParseError( USHORT nErrNr, ByteString aErrMsg, const TokenInfo &rTag )
+void TokenParser::ParseError( sal_uInt16 nErrNr, ByteString aErrMsg, const TokenInfo &rTag )
{
pErrorList->AddError( nErrNr, aErrMsg, rTag);
@@ -1359,7 +1359,7 @@ void TokenParser::ParseError( USHORT nErrNr, ByteString aErrMsg, const TokenInfo
}
-ParserMessage::ParserMessage( USHORT PnErrorNr, ByteString PaErrorText, const TokenInfo &rTag )
+ParserMessage::ParserMessage( sal_uInt16 PnErrorNr, ByteString PaErrorText, const TokenInfo &rTag )
: nErrorNr( PnErrorNr )
, aErrorText( PaErrorText )
, nTagBegin( 0 )
@@ -1379,15 +1379,15 @@ ParserMessage::ParserMessage( USHORT PnErrorNr, ByteString PaErrorText, const To
nTagLength = aLexem.Len();
}
-ParserError::ParserError( USHORT ErrorNr, ByteString ErrorText, const TokenInfo &rTag )
+ParserError::ParserError( sal_uInt16 ErrorNr, ByteString ErrorText, const TokenInfo &rTag )
: ParserMessage( ErrorNr, ErrorText, rTag )
{}
-ParserWarning::ParserWarning( USHORT ErrorNr, ByteString ErrorText, const TokenInfo &rTag )
+ParserWarning::ParserWarning( sal_uInt16 ErrorNr, ByteString ErrorText, const TokenInfo &rTag )
: ParserMessage( ErrorNr, ErrorText, rTag )
{}
-BOOL LingTest::IsTagMandatory( TokenInfo const &aToken, TokenId &aMetaTokens )
+sal_Bool LingTest::IsTagMandatory( TokenInfo const &aToken, TokenId &aMetaTokens )
{
TokenId aTokenId = aToken.nId;
TokenId aTokenGroup = TAG_GROUP( aTokenId );
@@ -1404,7 +1404,7 @@ BOOL LingTest::IsTagMandatory( TokenInfo const &aToken, TokenId &aMetaTokens )
{
if ( TAG_GROUP_META == aTokenGroup )
aMetaTokens |= aTokenId;
- return TRUE;
+ return sal_True;
}
else if ( TAG_COMMONSTART == aTokenId
|| TAG_COMMONEND == aTokenId )
@@ -1416,12 +1416,12 @@ BOOL LingTest::IsTagMandatory( TokenInfo const &aToken, TokenId &aMetaTokens )
|| aTagName.EqualsIgnoreCaseAscii( "item" )
|| aTagName.EqualsIgnoreCaseAscii( "br" ) );
}
- return FALSE;
+ return sal_False;
}
-void LingTest::CheckTags( TokenList &aReference, TokenList &aTestee, BOOL bFixTags )
+void LingTest::CheckTags( TokenList &aReference, TokenList &aTestee, sal_Bool bFixTags )
{
- ULONG i=0,j=0;
+ sal_uLong i=0,j=0;
// Clean old Warnings
while ( aCompareWarningList.Count() )
{
@@ -1458,39 +1458,39 @@ void LingTest::CheckTags( TokenList &aReference, TokenList &aTestee, BOOL bFixTa
if ( aReference.GetObject( i ).IsDone() )
continue;
- BOOL bTagFound = FALSE;
+ sal_Bool bTagFound = sal_False;
for ( j=0 ; j < aTestee.Count() && !bTagFound ; j++ )
{
if ( aTestee.GetObject( j ).IsDone() )
continue;
- if ( aReference.GetObject( i ).MatchesTranslation( aTestee.GetObject( j ), FALSE, aCompareWarningList ) )
+ if ( aReference.GetObject( i ).MatchesTranslation( aTestee.GetObject( j ), sal_False, aCompareWarningList ) )
{
aReference.GetObject( i ).SetDone();
aTestee.GetObject( j ).SetDone();
- bTagFound = TRUE;
+ bTagFound = sal_True;
}
}
}
- BOOL bCanFix = TRUE;
+ sal_Bool bCanFix = sal_True;
if ( bFixTags )
{
// we fix only if its a really simple case
- USHORT nTagCount = 0;
+ sal_uInt16 nTagCount = 0;
for ( i=0 ; i < aReference.Count() ; i++ )
if ( !aReference.GetObject( i ).IsDone() )
nTagCount++;
if ( nTagCount > 1 )
- bCanFix = FALSE;
+ bCanFix = sal_False;
nTagCount = 0;
for ( i=0 ; i < aTestee.Count() ; i++ )
if ( !aTestee.GetObject( i ).IsDone() )
nTagCount++;
if ( nTagCount > 1 )
- bCanFix = FALSE;
+ bCanFix = sal_False;
}
// generate errors for tags that have differing attributes
@@ -1499,17 +1499,17 @@ void LingTest::CheckTags( TokenList &aReference, TokenList &aTestee, BOOL bFixTa
if ( aReference.GetObject( i ).IsDone() )
continue;
- BOOL bTagFound = FALSE;
+ sal_Bool bTagFound = sal_False;
for ( j=0 ; j < aTestee.Count() && !bTagFound ; j++ )
{
if ( aTestee.GetObject( j ).IsDone() )
continue;
- if ( aReference.GetObject( i ).MatchesTranslation( aTestee.GetObject( j ), TRUE, aCompareWarningList, bCanFix && bFixTags ) )
+ if ( aReference.GetObject( i ).MatchesTranslation( aTestee.GetObject( j ), sal_True, aCompareWarningList, bCanFix && bFixTags ) )
{
aReference.GetObject( i ).SetDone();
aTestee.GetObject( j ).SetDone();
- bTagFound = TRUE;
+ bTagFound = sal_True;
}
}
}
@@ -1531,10 +1531,10 @@ void LingTest::CheckTags( TokenList &aReference, TokenList &aTestee, BOOL bFixTa
}
for ( i=0 ; i < aReference.Count() ; i++ )
- aReference.GetObject( i ).SetDone( FALSE );
+ aReference.GetObject( i ).SetDone( sal_False );
for ( i=0 ; i < aTestee.Count() ; i++ )
- aTestee.GetObject( i ).SetDone( FALSE );
+ aTestee.GetObject( i ).SetDone( sal_False );
}
void LingTest::CheckReference( GSILine *aReference )
@@ -1542,7 +1542,7 @@ void LingTest::CheckReference( GSILine *aReference )
aReferenceParser.Parse( aReference->GetUText(), aReference->GetMessageList() );
}
-void LingTest::CheckTestee( GSILine *aTestee, BOOL bHasSourceLine, BOOL bFixTags )
+void LingTest::CheckTestee( GSILine *aTestee, sal_Bool bHasSourceLine, sal_Bool bFixTags )
{
aFixedTestee = aTestee->GetUText();
aTesteeParser.Parse( aFixedTestee, aTestee->GetMessageList() );
@@ -1553,14 +1553,14 @@ void LingTest::CheckTestee( GSILine *aTestee, BOOL bHasSourceLine, BOOL bFixTags
if ( bFixTags )
{
TokenList& aTesteeTokens = aTesteeParser.GetTokenList();
- BOOL bFixesDone = FALSE;
+ sal_Bool bFixesDone = sal_False;
// count backwards to allow replacing from right to left
int i;
for ( i=aTesteeTokens.Count()-1 ; i>=0 ; i-- )
{
if ( aTesteeTokens.GetObject( i ).HasBeenFixed() )
{
- bFixesDone = TRUE;
+ bFixesDone = sal_True;
aFixedTestee.Replace( aTesteeTokens.GetObject( i ).nPos, aTesteeTokens.GetObject( i ).aTokenString.Len(), aTesteeTokens.GetObject( i ).MakeTag() );
}
}
diff --git a/l10ntools/source/wtranode.cxx b/l10ntools/source/wtranode.cxx
index 47fadc5d17f7..1f51fea49d02 100644
--- a/l10ntools/source/wtranode.cxx
+++ b/l10ntools/source/wtranode.cxx
@@ -79,11 +79,11 @@ WTT_Node::~WTT_Node()
{
// Delete the tree hanging below this node:
- bIsOnDeleting = TRUE; // Avoid double deleting of multiple used nodes.
+ bIsOnDeleting = sal_True; // Avoid double deleting of multiple used nodes.
for (int i = 0; i < C_NR_OF_BRANCHES; i++)
{
- if (aBranches[i] != 0 ? ! aBranches[i]->IsOnDeleting() : FALSE)
+ if (aBranches[i] != 0 ? ! aBranches[i]->IsOnDeleting() : sal_False)
{
delete aBranches[i];
}
diff --git a/l10ntools/source/wtratree.cxx b/l10ntools/source/wtratree.cxx
index 28adf7c7142b..efd60ad48442 100644
--- a/l10ntools/source/wtratree.cxx
+++ b/l10ntools/source/wtratree.cxx
@@ -255,10 +255,10 @@ WordTransTree::TransformNextToken()
// 9. TB~Eot continue
// bNext and Prev are true, if there are alphabetic letters:
- BOOL bNext = pInputPosition + 1 != pInputEnd
+ sal_Bool bNext = pInputPosition + 1 != pInputEnd
? CalculateBranch(pInputPosition[1]) >= BR_ALPHABASE
- : FALSE;
- BOOL bPrev = pCurParseNode->Value() >= BR_ALPHABASE;
+ : sal_False;
+ sal_Bool bPrev = pCurParseNode->Value() >= BR_ALPHABASE;
if ( bNext && (bPrev || pCurParseNode == dpParsingTreeTop) )
{ // case 1. and 7.
@@ -330,11 +330,11 @@ WordTransTree::Handle_TokenToKeep()
void
WordTransTree::Handle_TokenToTransform()
{
- BOOL bHaveHotkey = CalculateBranch(cCurHotkey) >= BR_ALPHABASE;
+ sal_Bool bHaveHotkey = CalculateBranch(cCurHotkey) >= BR_ALPHABASE;
const ByteString & rReplace = pCurParseNode->ReplaceString();
// Find position of hotkey in replace-string:
- USHORT nHotkeyPos = bHaveHotkey
+ sal_uInt16 nHotkeyPos = bHaveHotkey
? rReplace.Search(char(cCurHotkey))
: STRING_NOTFOUND;
if (nHotkeyPos == STRING_NOTFOUND && bHaveHotkey)
@@ -365,7 +365,7 @@ WordTransTree::Handle_TokenToTransform()
if (nHotkeyPos == STRING_NOTFOUND)
{
eCurResult = HOTKEY_LOST;
- bHaveHotkey = FALSE;
+ bHaveHotkey = sal_False;
}
} // endif (nHotkeyPos == STRING_NOT_FOUND && bHaveHotkey)
diff --git a/l10ntools/source/xgfconv.cxx b/l10ntools/source/xgfconv.cxx
index 54b92fb3c1c2..0f406ca20b25 100644
--- a/l10ntools/source/xgfconv.cxx
+++ b/l10ntools/source/xgfconv.cxx
@@ -36,14 +36,14 @@ int _cdecl main( int argc, char *argv[] )
}
ByteString sLine;
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
while ( !aInput.IsEof()) {
aInput.ReadLine( sLine );
ByteString sLangId = sLine.GetToken( 0, '\t' );
ByteString sFile = sLine.GetToken( 1, '\t' );
ByteString sText = sLine.Copy( sLangId.Len() + sFile.Len() + 2 );
- USHORT nLangId = sLangId.ToInt32();
+ sal_uInt16 nLangId = sLangId.ToInt32();
CharSet aCharSet = Export::GetCharSet( nLangId );
if ( aCharSet != 0xFFFF && sText.Len()) {
sText = UTF8Converter::ConvertToUTF8( sText, aCharSet );
@@ -55,7 +55,7 @@ int _cdecl main( int argc, char *argv[] )
aOutput.WriteLine( sEmpty );
}
else
- bFirst = FALSE;
+ bFirst = sal_False;
aOutput.Write( sOutput.GetBuffer(), sOutput.Len());
}
}
diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index 14b5944488a9..06e86e0358e4 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -96,7 +96,7 @@ XMLParentNode::XMLParentNode( const XMLParentNode& obj)
if( obj.pChildList ){
pChildList=new XMLChildNodeList();
XMLChildNode* pNode = NULL;
- for ( ULONG i = 0; i < obj.pChildList->Count(); i++ ){
+ for ( sal_uLong i = 0; i < obj.pChildList->Count(); i++ ){
pNode = obj.pChildList->GetObject( i );
if( pNode != NULL){
switch(pNode->GetNodeType()){
@@ -126,7 +126,7 @@ XMLParentNode& XMLParentNode::operator=(const XMLParentNode& obj){
}
if( obj.pChildList ){
pChildList=new XMLChildNodeList();
- for ( ULONG i = 0; i < obj.pChildList->Count(); i++ )
+ for ( sal_uLong i = 0; i < obj.pChildList->Count(); i++ )
AddChild( obj.pChildList->GetObject( i ) );
}else pChildList = NULL;
@@ -160,7 +160,7 @@ int XMLParentNode::GetPosition( ByteString id ){
static const ByteString sDeStr = ByteString(String::CreateFromAscii(GERMAN_ISO2).ToLowerAscii() , RTL_TEXTENCODING_ASCII_US ).ToLowerAscii();
if ( pChildList ){
- for ( ULONG i = 0; i < pChildList->Count(); i++ ) {
+ for ( sal_uLong i = 0; i < pChildList->Count(); i++ ) {
XMLChildNode *pChild = pChildList->GetObject( i );
if ( pChild->GetNodeType() == XML_NODE_TYPE_ELEMENT ){
a = static_cast<XMLElement* >(pChild);
@@ -188,7 +188,7 @@ int XMLParentNode::RemoveChild( XMLElement *pRefElement )
{
XMLElement* a;
if ( pChildList ){
- for ( ULONG i = 0; i < pChildList->Count(); i++ ) {
+ for ( sal_uLong i = 0; i < pChildList->Count(); i++ ) {
XMLChildNode *pChild = pChildList->GetObject( i );
if ( pChild->GetNodeType() == XML_NODE_TYPE_ELEMENT ){
a = static_cast<XMLElement* >(pChild);
@@ -218,7 +218,7 @@ int XMLParentNode::RemoveChild( XMLElement *pRefElement )
void XMLParentNode::RemoveAndDeleteAllChilds(){
/*****************************************************************************/
if ( pChildList ) {
- for ( ULONG i = 0; i < pChildList->Count(); i++ )
+ for ( sal_uLong i = 0; i < pChildList->Count(); i++ )
delete pChildList->GetObject( i );
pChildList->Clear();
}
@@ -228,7 +228,7 @@ void XMLParentNode::RemoveAndDeleteAllChilds(){
XMLElement *XMLParentNode::GetChildElement( XMLElement *pRefElement )
/*****************************************************************************/
{
- for ( ULONG i = 0; i < pChildList->Count(); i++ ) {
+ for ( sal_uLong i = 0; i < pChildList->Count(); i++ ) {
XMLChildNode *pChild = pChildList->GetObject( i );
if ( pChild->GetNodeType() == XML_NODE_TYPE_ELEMENT )
if ((( XMLElement * ) pChild )->GetName() ==
@@ -238,14 +238,14 @@ XMLElement *XMLParentNode::GetChildElement( XMLElement *pRefElement )
if ( !pList )
return ( XMLElement * ) pChild;
- BOOL bMatch = FALSE;
- for ( ULONG j = 0; j < pList->Count() && bMatch; j++ ) {
+ sal_Bool bMatch = sal_False;
+ for ( sal_uLong j = 0; j < pList->Count() && bMatch; j++ ) {
XMLAttribute *pAttribute = pList->GetObject( j );
XMLAttribute *pCandidate =
(( XMLElement * ) pChild )->GetAttribute(
*pAttribute );
if ( !pCandidate || !pAttribute->IsEqual( *pCandidate ))
- bMatch = FALSE;
+ bMatch = sal_False;
}
if ( bMatch )
return ( XMLElement * ) pChild;
@@ -259,14 +259,14 @@ XMLElement *XMLParentNode::GetChildElement( XMLElement *pRefElement )
//
/*****************************************************************************/
-USHORT XMLFile::GetNodeType()
+sal_uInt16 XMLFile::GetNodeType()
/*****************************************************************************/
{
return XML_NODE_TYPE_FILE;
}
/*****************************************************************************/
-BOOL XMLFile::Write( ByteString &aFilename )
+sal_Bool XMLFile::Write( ByteString &aFilename )
/*****************************************************************************/
{
@@ -323,7 +323,7 @@ void XMLFile::WriteString( ofstream &rStream, const String &sString )
}
-BOOL XMLFile::Write( ofstream &rStream , XMLNode *pCur )
+sal_Bool XMLFile::Write( ofstream &rStream , XMLNode *pCur )
{
XMLUtil& xmlutil = XMLUtil::Instance();
(void) xmlutil;
@@ -334,7 +334,7 @@ BOOL XMLFile::Write( ofstream &rStream , XMLNode *pCur )
switch( pCur->GetNodeType()) {
case XML_NODE_TYPE_FILE: {
if( GetChildList())
- for ( ULONG i = 0; i < GetChildList()->Count(); i++ )
+ for ( sal_uLong i = 0; i < GetChildList()->Count(); i++ )
Write( rStream, GetChildList()->GetObject( i ));
}
break;
@@ -343,7 +343,7 @@ BOOL XMLFile::Write( ofstream &rStream , XMLNode *pCur )
rStream << "<";
WriteString( rStream, pElement->GetName());
if ( pElement->GetAttributeList())
- for ( ULONG j = 0; j < pElement->GetAttributeList()->Count(); j++ ) {
+ for ( sal_uLong j = 0; j < pElement->GetAttributeList()->Count(); j++ ) {
rStream << " ";
String sData(*pElement->GetAttributeList()->GetObject( j ));
xmlutil.QuotHTML( sData );
@@ -358,7 +358,7 @@ BOOL XMLFile::Write( ofstream &rStream , XMLNode *pCur )
rStream << "/>";
else {
rStream << ">";
- for ( ULONG k = 0; k < pElement->GetChildList()->Count(); k++ )
+ for ( sal_uLong k = 0; k < pElement->GetChildList()->Count(); k++ )
Write( rStream, pElement->GetChildList()->GetObject( k ));
rStream << "</";
WriteString( rStream, pElement->GetName());
@@ -387,11 +387,11 @@ BOOL XMLFile::Write( ofstream &rStream , XMLNode *pCur )
break;
}
}
- return TRUE;
+ return sal_True;
}
-void XMLFile::Print( XMLNode *pCur, USHORT nLevel )
+void XMLFile::Print( XMLNode *pCur, sal_uInt16 nLevel )
{
if ( !pCur )
@@ -400,7 +400,7 @@ void XMLFile::Print( XMLNode *pCur, USHORT nLevel )
switch( pCur->GetNodeType()) {
case XML_NODE_TYPE_FILE: {
if( GetChildList())
- for ( ULONG i = 0; i < GetChildList()->Count(); i++ )
+ for ( sal_uLong i = 0; i < GetChildList()->Count(); i++ )
Print( GetChildList()->GetObject( i ));
}
break;
@@ -409,7 +409,7 @@ void XMLFile::Print( XMLNode *pCur, USHORT nLevel )
fprintf( stdout, "<%s", ByteString( pElement->GetName(), RTL_TEXTENCODING_UTF8 ).GetBuffer());
if ( pElement->GetAttributeList())
- for ( ULONG j = 0; j < pElement->GetAttributeList()->Count(); j++ ){
+ for ( sal_uLong j = 0; j < pElement->GetAttributeList()->Count(); j++ ){
ByteString aAttrName( *pElement->GetAttributeList()->GetObject( j ), RTL_TEXTENCODING_UTF8 );
if( !aAttrName.EqualsIgnoreCaseAscii( XML_LANG ) ) {
fprintf( stdout, " %s=\"%s\"",
@@ -422,7 +422,7 @@ void XMLFile::Print( XMLNode *pCur, USHORT nLevel )
fprintf( stdout, "/>" );
else {
fprintf( stdout, ">" );
- for ( ULONG k = 0; k < pElement->GetChildList()->Count(); k++ )
+ for ( sal_uLong k = 0; k < pElement->GetChildList()->Count(); k++ )
Print( pElement->GetChildList()->GetObject( k ), nLevel + 1 );
fprintf( stdout, "</%s>", ByteString( pElement->GetName(), RTL_TEXTENCODING_UTF8 ).GetBuffer());
}
@@ -469,14 +469,14 @@ XMLFile::XMLFile( const String &rFileName ) // the file name, empty if created f
XMLStrings ( NULL )
{
-// nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("bookmark_value"),RTL_TEXTENCODING_ASCII_US) , TRUE) );
- nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("bookmark"),RTL_TEXTENCODING_ASCII_US) , TRUE) );
- nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("variable"),RTL_TEXTENCODING_ASCII_US) , TRUE) );
- nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("paragraph"),RTL_TEXTENCODING_ASCII_US) , TRUE) );
- nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("alt"),RTL_TEXTENCODING_ASCII_US) , TRUE) );
- nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("caption"),RTL_TEXTENCODING_ASCII_US) , TRUE) );
- nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("title"),RTL_TEXTENCODING_ASCII_US) , TRUE) );
- nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("link"),RTL_TEXTENCODING_ASCII_US) , TRUE) );
+// nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("bookmark_value"),RTL_TEXTENCODING_ASCII_US) , sal_True) );
+ nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("bookmark"),RTL_TEXTENCODING_ASCII_US) , sal_True) );
+ nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("variable"),RTL_TEXTENCODING_ASCII_US) , sal_True) );
+ nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("paragraph"),RTL_TEXTENCODING_ASCII_US) , sal_True) );
+ nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("alt"),RTL_TEXTENCODING_ASCII_US) , sal_True) );
+ nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("caption"),RTL_TEXTENCODING_ASCII_US) , sal_True) );
+ nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("title"),RTL_TEXTENCODING_ASCII_US) , sal_True) );
+ nodes_localize.insert( TagMap::value_type(ByteString(String::CreateFromAscii("link"),RTL_TEXTENCODING_ASCII_US) , sal_True) );
}
/*****************************************************************************/
void XMLFile::Extract( XMLFile *pCur )
@@ -517,7 +517,7 @@ void XMLFile::InsertL10NElement( XMLElement* pElement ){
LangHashMap* elem;
if( pElement->GetAttributeList() != NULL ){
- for ( ULONG j = 0; j < pElement->GetAttributeList()->Count(); j++ ){
+ for ( sal_uLong j = 0; j < pElement->GetAttributeList()->Count(); j++ ){
tmpStr=ByteString( *pElement->GetAttributeList()->GetObject( j ),RTL_TEXTENCODING_UTF8 );
if( tmpStr.CompareTo(ID)==COMPARE_EQUAL ){ // Get the "id" Attribute
id = ByteString( pElement->GetAttributeList()->GetObject( j )->GetValue(),RTL_TEXTENCODING_UTF8 );
@@ -633,7 +633,7 @@ void XMLFile::SearchL10NElements( XMLParentNode *pCur , int pos)
case XML_NODE_TYPE_FILE: {
XMLParentNode* pElement;
if( GetChildList()){
- for ( ULONG i = 0; i < GetChildList()->Count(); i++ ){
+ for ( sal_uLong i = 0; i < GetChildList()->Count(); i++ ){
pElement = (XMLParentNode*) GetChildList()->GetObject( i );
if( pElement->GetNodeType() == XML_NODE_TYPE_ELEMENT ) SearchL10NElements( pElement , i);
}
@@ -645,7 +645,7 @@ void XMLFile::SearchL10NElements( XMLParentNode *pCur , int pos)
ByteString sName(pElement->GetName(),RTL_TEXTENCODING_ASCII_US);
ByteString language,tmpStrVal,oldref;
if ( pElement->GetAttributeList()){
- for ( ULONG j = 0 , cnt = pElement->GetAttributeList()->Count(); j < cnt && bInsert; j++ ){
+ for ( sal_uLong j = 0 , cnt = pElement->GetAttributeList()->Count(); j < cnt && bInsert; j++ ){
const ByteString tmpStr( *pElement->GetAttributeList()->GetObject( j ),RTL_TEXTENCODING_UTF8 );
if( tmpStr.CompareTo(THEID)==COMPARE_EQUAL ){ // Get the "id" Attribute
tmpStrVal=ByteString( pElement->GetAttributeList()->GetObject( j )->GetValue(),RTL_TEXTENCODING_UTF8 );
@@ -670,7 +670,7 @@ void XMLFile::SearchL10NElements( XMLParentNode *pCur , int pos)
if ( bInsert && ( nodes_localize.find( sName.ToLowerAscii() ) != nodes_localize.end() ) )
InsertL10NElement(pElement);
else if ( bInsert && pElement->GetChildList() ){
- for ( ULONG k = 0; k < pElement->GetChildList()->Count(); k++ )
+ for ( sal_uLong k = 0; k < pElement->GetChildList()->Count(); k++ )
SearchL10NElements( (XMLParentNode*) pElement->GetChildList()->GetObject( k ) , k);
}
}
@@ -707,7 +707,7 @@ bool XMLFile::CheckExportStatus( XMLParentNode *pCur )
case XML_NODE_TYPE_FILE: {
XMLParentNode* pElement;
if( GetChildList()){
- for ( ULONG i = 0; i < GetChildList()->Count(); i++ ){
+ for ( sal_uLong i = 0; i < GetChildList()->Count(); i++ ){
pElement = (XMLParentNode*) GetChildList()->GetObject( i );
if( pElement->GetNodeType() == XML_NODE_TYPE_ELEMENT ) CheckExportStatus( pElement );//, i);
}
@@ -719,7 +719,7 @@ bool XMLFile::CheckExportStatus( XMLParentNode *pCur )
ByteString sName(pElement->GetName(),RTL_TEXTENCODING_ASCII_US);
if( sName.EqualsIgnoreCaseAscii( TOPIC ) ){
if ( pElement->GetAttributeList()){
- for ( ULONG j = 0 , cnt = pElement->GetAttributeList()->Count(); j < cnt && bInsert; j++ ){
+ for ( sal_uLong j = 0 , cnt = pElement->GetAttributeList()->Count(); j < cnt && bInsert; j++ ){
const ByteString tmpStr( *pElement->GetAttributeList()->GetObject( j ),RTL_TEXTENCODING_UTF8 );
if( tmpStr.EqualsIgnoreCaseAscii( STATUS ) ){
ByteString tmpStrVal=ByteString( pElement->GetAttributeList()->GetObject( j )->GetValue(),RTL_TEXTENCODING_UTF8 );
@@ -733,7 +733,7 @@ bool XMLFile::CheckExportStatus( XMLParentNode *pCur )
}
}
else if ( pElement->GetChildList() ){
- for ( ULONG k = 0; k < pElement->GetChildList()->Count(); k++ )
+ for ( sal_uLong k = 0; k < pElement->GetChildList()->Count(); k++ )
CheckExportStatus( (XMLParentNode*) pElement->GetChildList()->GetObject( k ) );//, k);
}
}
@@ -744,7 +744,7 @@ bool XMLFile::CheckExportStatus( XMLParentNode *pCur )
}
/*****************************************************************************/
-USHORT XMLElement::GetNodeType()
+sal_uInt16 XMLElement::GetNodeType()
/*****************************************************************************/
{
return XML_NODE_TYPE_ELEMENT;
@@ -768,7 +768,7 @@ XMLElement::XMLElement(const XMLElement& obj)
{
if ( obj.pAttributes ){
pAttributes = new XMLAttributeList();
- for ( ULONG i = 0; i < obj.pAttributes->Count(); i++ )
+ for ( sal_uLong i = 0; i < obj.pAttributes->Count(); i++ )
AddAttribute( *obj.pAttributes->GetObject( i ) , obj.pAttributes->GetObject( i )->GetValue() );
}
}
@@ -788,13 +788,13 @@ XMLElement& XMLElement::operator=(const XMLElement& obj){
nPos =obj.nPos;
if ( pAttributes ){
- for ( ULONG i = 0; i < pAttributes->Count(); i++ )
+ for ( sal_uLong i = 0; i < pAttributes->Count(); i++ )
delete pAttributes->GetObject( i );
delete pAttributes;
}
if ( obj.pAttributes ){
pAttributes =new XMLAttributeList();
- for ( ULONG i = 0; i < obj.pAttributes->Count(); i++ )
+ for ( sal_uLong i = 0; i < obj.pAttributes->Count(); i++ )
AddAttribute( *obj.pAttributes->GetObject( i ) , obj.pAttributes->GetObject( i )->GetValue() );
}
}
@@ -816,7 +816,7 @@ void XMLElement::ChangeLanguageTag( const String &rValue ){
static const String rName = String::CreateFromAscii("xml-lang");
SetLanguageId( ByteString(rValue,RTL_TEXTENCODING_UTF8) );
if ( pAttributes ){
- for ( ULONG i = 0; i < pAttributes->Count(); i++ ){
+ for ( sal_uLong i = 0; i < pAttributes->Count(); i++ ){
if ( *pAttributes->GetObject( i ) == rName ){
pAttributes->GetObject( i )->setValue(rValue);
}
@@ -827,7 +827,7 @@ void XMLElement::ChangeLanguageTag( const String &rValue ){
XMLChildNodeList* pCList = GetChildList();
if( pCList != NULL ){
- for ( ULONG i = 0; i < pCList->Count(); i++ ){
+ for ( sal_uLong i = 0; i < pCList->Count(); i++ ){
pNode = pCList->GetObject( i );
if( pNode != NULL && pNode->GetNodeType() == XML_NODE_TYPE_ELEMENT ){
pElem = static_cast< XMLElement* >(pNode);
@@ -845,7 +845,7 @@ XMLAttribute *XMLElement::GetAttribute( const String &rName )
/*****************************************************************************/
{
if ( pAttributes )
- for ( ULONG i = 0; i < pAttributes->Count(); i++ )
+ for ( sal_uLong i = 0; i < pAttributes->Count(); i++ )
if ( *pAttributes->GetObject( i ) == rName )
return pAttributes->GetObject( i );
@@ -857,7 +857,7 @@ XMLElement::~XMLElement()
/*****************************************************************************/
{
if ( pAttributes ) {
- for ( ULONG i = 0; i < pAttributes->Count(); i++ )
+ for ( sal_uLong i = 0; i < pAttributes->Count(); i++ )
delete pAttributes->GetObject( i );
delete pAttributes;
@@ -906,7 +906,7 @@ void XMLElement::Print(XMLNode *pCur, OUStringBuffer& buffer , bool rootelement
if ( pElement->GetAttributeList()){
if ( pElement->GetChildList()){
XMLChildNode* tmp=NULL;
- for ( ULONG k = 0; k < pElement->GetChildList()->Count(); k++ ){
+ for ( sal_uLong k = 0; k < pElement->GetChildList()->Count(); k++ ){
tmp=pElement->GetChildList()->GetObject( k );
Print( tmp, buffer , false);
}
@@ -923,7 +923,7 @@ void XMLElement::Print(XMLNode *pCur, OUStringBuffer& buffer , bool rootelement
buffer.append( OUString::createFromAscii("\\<") );
buffer.append( pElement->GetName() );
if ( pElement->GetAttributeList()){
- for ( ULONG j = 0; j < pElement->GetAttributeList()->Count(); j++ ){
+ for ( sal_uLong j = 0; j < pElement->GetAttributeList()->Count(); j++ ){
OUString aAttrName( *pElement->GetAttributeList()->GetObject( j ) );
if( !aAttrName.equalsIgnoreAsciiCase( XML_LANG ) ) {
@@ -941,7 +941,7 @@ void XMLElement::Print(XMLNode *pCur, OUStringBuffer& buffer , bool rootelement
else {
buffer.append( OUString::createFromAscii("\\>") );
XMLChildNode* tmp=NULL;
- for ( ULONG k = 0; k < pElement->GetChildList()->Count(); k++ ){
+ for ( sal_uLong k = 0; k < pElement->GetChildList()->Count(); k++ ){
tmp=pElement->GetChildList()->GetObject( k );
Print( tmp, buffer , false);
}
@@ -1006,7 +1006,7 @@ void XMLData::AddData( const String &rData) {
}
/*****************************************************************************/
-USHORT XMLData::GetNodeType()
+sal_uInt16 XMLData::GetNodeType()
/*****************************************************************************/
{
return XML_NODE_TYPE_DATA;
@@ -1017,7 +1017,7 @@ USHORT XMLData::GetNodeType()
//
/*****************************************************************************/
-USHORT XMLComment::GetNodeType()
+sal_uInt16 XMLComment::GetNodeType()
/*****************************************************************************/
{
return XML_NODE_TYPE_COMMENT;
@@ -1043,7 +1043,7 @@ XMLComment& XMLComment::operator=(const XMLComment& obj){
//
/*****************************************************************************/
-USHORT XMLDefault::GetNodeType()
+sal_uInt16 XMLDefault::GetNodeType()
/*****************************************************************************/
{
return XML_NODE_TYPE_DEFAULT;
@@ -1241,7 +1241,7 @@ XMLFile *SimpleXMLParser::Execute( SvMemoryStream *pStream )
pCurNode = pXMLFile;
pCurData = NULL;
- ULONG nPos = pStream->Tell();
+ sal_uLong nPos = pStream->Tell();
pStream->Seek( STREAM_SEEK_TO_END );
aErrorInformation.eCode = XML_ERROR_NONE;
@@ -1256,7 +1256,7 @@ XMLFile *SimpleXMLParser::Execute( SvMemoryStream *pStream )
aErrorInformation.sMessage = String::CreateFromAscii( "XML-File parsed successfully" );
if ( !XML_Parse(
- aParser, ( char * ) pStream->GetData() + nPos, pStream->Tell() - nPos, TRUE ))
+ aParser, ( char * ) pStream->GetData() + nPos, pStream->Tell() - nPos, sal_True ))
{
aErrorInformation.eCode = XML_GetErrorCode( aParser );
aErrorInformation.nLine = XML_GetErrorLineNumber( aParser );
@@ -1326,7 +1326,7 @@ void XMLUtil::QuotHTML( String &rString )
static const String QAMP(String::CreateFromAscii("&amp;"));
static const String SLASH(String::CreateFromAscii("\\"));
- for ( USHORT i = 0; i < rString.Len(); i++) {
+ for ( sal_uInt16 i = 0; i < rString.Len(); i++) {
if ( i < rString.Len()) {
switch ( rString.GetChar( i )) {
case '\\': if( i+1 <= rString.Len() ){
@@ -1443,7 +1443,7 @@ XMLUtil& XMLUtil::Instance(){
XMLUtil::~XMLUtil(){}
/*****************************************************************************/
/*****************************************************************************/
-ByteString XMLUtil::GetIsoLangByIndex( USHORT nIndex )
+ByteString XMLUtil::GetIsoLangByIndex( sal_uInt16 nIndex )
/*****************************************************************************/
{
if(nIndex > 0 && MAX_LANGUAGES >= nIndex )
diff --git a/l10ntools/source/xrmmerge.cxx b/l10ntools/source/xrmmerge.cxx
index fa7fdb4b4376..c5754a05f6a4 100644
--- a/l10ntools/source/xrmmerge.cxx
+++ b/l10ntools/source/xrmmerge.cxx
@@ -57,10 +57,10 @@ extern "C" { int YYWarning( char * ); }
#define STATE_ISOCODE99 0x000D
// set of global variables
-BOOL bEnableExport;
-BOOL bMergeMode;
-BOOL bErrorLog;
-BOOL bUTF8;
+sal_Bool bEnableExport;
+sal_Bool bMergeMode;
+sal_Bool bErrorLog;
+sal_Bool bUTF8;
ByteString sPrj;
ByteString sPrjRoot;
ByteString sInputFileName;
@@ -77,17 +77,17 @@ extern "C" {
extern char *GetOutputFile( int argc, char* argv[])
/*****************************************************************************/
{
- bEnableExport = FALSE;
- bMergeMode = FALSE;
- bErrorLog = TRUE;
- bUTF8 = TRUE;
+ bEnableExport = sal_False;
+ bMergeMode = sal_False;
+ bErrorLog = sal_True;
+ bUTF8 = sal_True;
sPrj = "";
sPrjRoot = "";
sInputFileName = "";
sActFileName = "";
Export::sLanguages = "";
- USHORT nState = STATE_NON;
- BOOL bInput = FALSE;
+ sal_uInt16 nState = STATE_NON;
+ sal_Bool bInput = sal_False;
// parse command line
for( int i = 1; i < argc; i++ ) {
@@ -108,15 +108,15 @@ extern char *GetOutputFile( int argc, char* argv[])
}
else if ( ByteString( argv[ i ] ).ToUpperAscii() == "-E" ) {
nState = STATE_ERRORLOG;
- bErrorLog = FALSE;
+ bErrorLog = sal_False;
}
else if ( ByteString( argv[ i ] ).ToUpperAscii() == "-UTF8" ) {
nState = STATE_UTF8;
- bUTF8 = TRUE;
+ bUTF8 = sal_True;
}
else if ( ByteString( argv[ i ] ).ToUpperAscii() == "-NOUTF8" ) {
nState = STATE_UTF8;
- bUTF8 = FALSE;
+ bUTF8 = sal_False;
}
else if ( ByteString( argv[ i ] ).ToUpperAscii() == "-L" ) {
nState = STATE_LANGUAGES;
@@ -131,7 +131,7 @@ extern char *GetOutputFile( int argc, char* argv[])
}
case STATE_INPUT: {
sInputFileName = argv[ i ];
- bInput = TRUE; // source file found
+ bInput = sal_True; // source file found
}
break;
case STATE_OUTPUT: {
@@ -148,7 +148,7 @@ extern char *GetOutputFile( int argc, char* argv[])
break;
case STATE_MERGESRC: {
sMergeSrc = ByteString( argv[ i ]);
- bMergeMode = TRUE; // activate merge mode, cause merge database found
+ bMergeMode = sal_True; // activate merge mode, cause merge database found
}
break;
case STATE_LANGUAGES: {
@@ -161,7 +161,7 @@ extern char *GetOutputFile( int argc, char* argv[])
if ( bInput ) {
// command line is valid
- bEnableExport = TRUE;
+ bEnableExport = sal_True;
char *pReturn = new char[ sOutputFile.Len() + 1 ];
strcpy( pReturn, sOutputFile.GetBuffer()); // #100211# - checked
return pReturn;
@@ -289,8 +289,8 @@ int GetError()
/*****************************************************************************/
XRMResParser::XRMResParser()
/*****************************************************************************/
- : bError( FALSE ),
- bText( FALSE )
+ : bError( sal_False ),
+ bText( sal_False )
{
aLanguages = Export::GetLanguages();
}
@@ -348,7 +348,7 @@ int XRMResParser::Execute( int nToken, char * pToken )
EndOfText( sCurrentOpenTag, sCurrentCloseTag );
ByteString sTmp = sGID;
sGID = "";
- for ( USHORT i = 0; i + 1 < sTmp.GetTokenCount( '.' ); i++ ) {
+ for ( sal_uInt16 i = 0; i + 1 < sTmp.GetTokenCount( '.' ); i++ ) {
if ( sGID.Len())
sGID += ".";
sGID += sTmp.GetToken( i, '.' );
@@ -364,7 +364,7 @@ int XRMResParser::Execute( int nToken, char * pToken )
//EndOfText( sCurrentOpenTag, sCurrentCloseTag );
sLID = sNewLID;
}
- bText = TRUE;
+ bText = sal_True;
sCurrentText = "";
sCurrentOpenTag = rToken;
Output( rToken );
@@ -379,7 +379,7 @@ int XRMResParser::Execute( int nToken, char * pToken )
WorkOnText( sCurrentOpenTag, sCurrentText );
Output( sCurrentText );
EndOfText( sCurrentOpenTag, sCurrentCloseTag );// <---
- bText = FALSE;
+ bText = sal_False;
rToken = ByteString("");
sCurrentText = ByteString("");
//printf("<-XRM_TEXT_END");
@@ -419,7 +419,7 @@ ByteString XRMResParser::GetAttribute( const ByteString &rToken, const ByteStrin
ByteString sSearch( " " );
sSearch += rAttribute;
sSearch += "=";
- USHORT nPos = sTmp.Search( sSearch );
+ sal_uInt16 nPos = sTmp.Search( sSearch );
if ( nPos != STRING_NOTFOUND ) {
sTmp = sTmp.Copy( nPos );
@@ -697,7 +697,7 @@ void XRMResMerge::EndOfText(
ByteString sContent;
if ( !sCur.EqualsIgnoreCaseAscii("en-US") &&
( pEntrys->GetText(
- sContent, STRING_TYP_TEXT, sCur, TRUE )) &&
+ sContent, STRING_TYP_TEXT, sCur, sal_True )) &&
( sContent != "-" ) && ( sContent.Len()))
{
ByteString sText( sContent );
@@ -717,7 +717,7 @@ void XRMResMerge::EndOfText(
sAdditionalLine += rCloseTag;
sAdditionalLine += "\n";
- for ( USHORT i = 0; i + 1 < GetGID().GetTokenCount( '.' ); i++ )
+ for ( sal_uInt16 i = 0; i + 1 < GetGID().GetTokenCount( '.' ); i++ )
sAdditionalLine += "\t";
Output( sAdditionalLine );
diff --git a/comphelper/source/xml/makefile.mk b/padmin/AllLangResTarget_spa.mk
index 8fa34b2477a2..1fd6e42dad56 100644
--- a/comphelper/source/xml/makefile.mk
+++ b/padmin/AllLangResTarget_spa.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
+# Copyright 2009 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -14,35 +14,35 @@
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
+# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#*************************************************************************
-PRJ=..$/..
-PRJNAME=comphelper
-TARGET=xml
+$(eval $(call gb_AllLangResTarget_AllLangResTarget,spa))
-ENABLE_EXCEPTIONS=TRUE
+$(eval $(call gb_AllLangResTarget_set_reslocation,spa,padmin))
-# --- Settings ----------------------------------
+$(eval $(call gb_AllLangResTarget_add_srs,spa,\
+ padmin/source \
+))
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
+$(eval $(call gb_SrsTarget_SrsTarget,padmin/source))
-# --- Files -------------------------------------
+$(eval $(call gb_SrsTarget_set_include,padmin/source,\
+ $$(INCLUDE) \
+))
-SLOFILES= \
- $(SLO)$/ofopxmlhelper.obj \
- $(SLO)$/attributelist.obj
+$(eval $(call gb_SrsTarget_add_files,padmin/source,\
+ padmin/source/padialog.src \
+ padmin/source/rtsetup.src \
+))
-# --- Targets ----------------------------------
-
-.INCLUDE : target.mk
+# vim: set noet sw=4 ts=4:
diff --git a/comphelper/source/eventattachermgr/makefile.mk b/padmin/Executable_spadmin.bin.mk
index 26aca0467d7d..ae677c1c86b4 100644
--- a/comphelper/source/eventattachermgr/makefile.mk
+++ b/padmin/Executable_spadmin.bin.mk
@@ -14,37 +14,57 @@
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
+# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#*************************************************************************
-PRJ=..$/..
-PRJINC=..$/..$/inc
-PRJNAME=comphelper
-TARGET=evtattmgr
+$(eval $(call gb_Executable_Executable,spadmin.bin))
-ENABLE_EXCEPTIONS=TRUE
+$(eval $(call gb_Executable_set_include,spadmin.bin,\
+ $$(INCLUDE) \
+ -I$(OUTDIR)/inc \
+ -I$(OUTDIR)/inc/offuh \
+))
-# --- Settings common for the whole project -----
+$(eval $(call gb_Executable_set_cxxflags,spadmin.bin,\
+ $$(CXXFLAGS) \
+))
+$(eval $(call gb_Executable_add_linked_static_libs,spadmin.bin,\
+ vclmain \
+))
-# --- Settings ----------------------------------
+$(eval $(call gb_Executable_add_linked_libs,spadmin.bin,\
+ spa \
+ svt \
+ vcl \
+ utl \
+ ucbhelper \
+ comphelper \
+ tl \
+ cppuhelper \
+ cppu \
+ sal \
+ stl \
+))
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
+$(eval $(call gb_Executable_add_exception_objects,spadmin.bin,\
+ padmin/source/desktopcontext \
+ padmin/source/pamain \
+))
-# --- Files -------------------------------------
-
-SLOFILES= $(SLO)$/eventattachermgr.obj
-
-# --- Targets ----------------------------------
-
-.INCLUDE : target.mk
+ifeq ($(OS),LINUX)
+$(eval $(call gb_Executable_add_linked_libs,spadmin.bin,\
+ dl \
+ pthread \
+))
+endif
+# vim: set noet sw=4 ts=4:
diff --git a/comphelper/source/officeinstdir/makefile.mk b/padmin/Library_spa.mk
index dfe195da662a..47618720d283 100644
--- a/comphelper/source/officeinstdir/makefile.mk
+++ b/padmin/Library_spa.mk
@@ -14,37 +14,63 @@
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
+# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#*************************************************************************
-PRJ=..$/..
-PRJINC=..$/..$/inc
-PRJNAME=comphelper
-TARGET=officeinstdir
+$(eval $(call gb_Library_Library,spa))
-ENABLE_EXCEPTIONS=TRUE
+$(eval $(call gb_Library_set_include,spa,\
+ $$(INCLUDE) \
+ -I$(OUTDIR)/inc/offuh \
+ -I$(OUTDIR)/inc/stl \
+))
-# --- Settings common for the whole project -----
+$(eval $(call gb_Library_set_defs,spa,\
+ $$(DEFS) \
+ -DSPA_DLLIMPLEMENTATION \
+))
+$(eval $(call gb_Library_add_linked_libs,spa,\
+ svt \
+ vcl \
+ utl \
+ tl \
+ basegfx \
+ comphelper \
+ i18nisolang1 \
+ stl \
+ cppu \
+ sal \
+ vos3 \
+))
-# --- Settings ----------------------------------
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
+$(eval $(call gb_Library_add_exception_objects,spa,\
+ padmin/source/adddlg \
+ padmin/source/cmddlg \
+ padmin/source/fontentry \
+ padmin/source/helper \
+ padmin/source/newppdlg \
+ padmin/source/padialog \
+ padmin/source/progress \
+ padmin/source/prtsetup \
+ padmin/source/titlectrl \
+))
-# --- Files -------------------------------------
-
-SLOFILES= $(SLO)$/officeinstallationdirectories.obj
-
-# --- Targets ----------------------------------
-
-.INCLUDE : target.mk
+ifeq ($(OS),LINUX)
+$(eval $(call gb_Library_add_linked_libs,spa,\
+ dl \
+ m \
+ pthread \
+))
+endif
+# vim: set noet sw=4 ts=4:
diff --git a/padmin/Makefile b/padmin/Makefile
new file mode 100644
index 000000000000..a79aff831024
--- /dev/null
+++ b/padmin/Makefile
@@ -0,0 +1,38 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+ifeq ($(strip $(SOLARENV)),)
+$(error No environment set!)
+endif
+
+gb_PARTIALBUILD := T
+GBUILDDIR := $(SOLARENV)/gbuild
+include $(GBUILDDIR)/gbuild.mk
+
+$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sot/util/makefile.pmk b/padmin/Module_padmin.mk
index 2d79b8068815..01fd4c99af19 100644
--- a/sot/util/makefile.pmk
+++ b/padmin/Module_padmin.mk
@@ -25,7 +25,17 @@
#
#*************************************************************************
-# define SOT_DLLIMPLEMENTATION (see @ = sotdllapi.h)
-CDEFS += -DSOT_DLLIMPLEMENTATION
-VISIBILITY_HIDDEN=TRUE
+$(eval $(call gb_Module_Module,padmin))
+
+ifeq ($(GUIBASE),unx)
+
+$(eval $(call gb_Module_add_targets,padmin,\
+ Executable_spadmin.bin \
+ Library_spa \
+ AllLangResTarget_spa \
+ Package_inc \
+))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/svtools/util/svt.pmk b/padmin/Package_inc.mk
index 24d898f030c1..3a2a3a3177e1 100644
--- a/svtools/util/svt.pmk
+++ b/padmin/Package_inc.mk
@@ -14,18 +14,17 @@
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
+# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#*************************************************************************
-# define SVT_DLLIMPLEMENTATION (see @ svtdllapi.h)
-CDEFS += -DSVT_DLLIMPLEMENTATION
+$(eval $(call gb_Package_Package,padmin_src,$(SRCDIR)/padmin/source))
+$(eval $(call gb_Package_add_file,padmin_src,bin/spadmin,spadmin.sh))
-VISIBILITY_HIDDEN=TRUE
diff --git a/padmin/prj/build.lst b/padmin/prj/build.lst
index 9aaab83cf7de..0e505f92f2a2 100644
--- a/padmin/prj/build.lst
+++ b/padmin/prj/build.lst
@@ -1,3 +1,3 @@
pd padmin : vcl svtools NULL
pd padmin usr1 - all pd_mkout NULL
-pd padmin\source nmake - all pd_source NULL
+pd padmin\prj nmake - all pd_prj NULL
diff --git a/padmin/prj/d.lst b/padmin/prj/d.lst
index 3b86822c24e8..8b137891791f 100644
--- a/padmin/prj/d.lst
+++ b/padmin/prj/d.lst
@@ -1,8 +1 @@
-mkdir: %COMMON_DEST%\bin%_EXT%\hid
-..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin%_EXT%\hid\*.hid
-..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\*.res
-..\%__SRC%\bin\*.bin %_DEST%\bin%_EXT%\*.bin
-..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT%\lib*.so
-..\%__SRC%\lib\lib*.dylib %_DEST%\lib%_EXT%\lib*.dylib
-..\%__SRC%\misc\spadmin.sh %_DEST%\bin%_EXT%\spadmin
diff --git a/comphelper/util/makefile.pmk b/padmin/prj/makefile.mk
index 9a2e65bb0be7..c73a3d944bbf 100644
--- a/comphelper/util/makefile.pmk
+++ b/padmin/prj/makefile.mk
@@ -25,11 +25,16 @@
#
#*************************************************************************
-.IF "$(GUI)" == "OS2"
-STL_OS2_BUILDING=1
-.ENDIF
+PRJ=..
+TARGET=prj
+
+.INCLUDE : settings.mk
-# define COMPHELPER_DLLIMPLEMENTATION (see @ comphelperdllapi.h)
-CDEFS += -DCOMPHELPER_DLLIMPLEMENTATION
+.IF "$(VERBOSE)"!=""
+VERBOSEFLAG :=
+.ELSE
+VERBOSEFLAG := -s
+.ENDIF
-VISIBILITY_HIDDEN=TRUE
+all:
+ cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET)
diff --git a/padmin/source/adddlg.cxx b/padmin/source/adddlg.cxx
index 0f398c7e480a..e3d94a05d0ef 100644
--- a/padmin/source/adddlg.cxx
+++ b/padmin/source/adddlg.cxx
@@ -61,18 +61,18 @@ APChooseDevicePage::APChooseDevicePage( AddPrinterDialog* pParent ) :
m_aOverTxt( this, PaResId( RID_ADDP_CHDEV_TXT_OVER ) )
{
FreeResource();
- m_aPrinterBtn.Check( TRUE );
- m_aFaxBtn.Check( FALSE );
- m_aPDFBtn.Check( FALSE );
- m_aOldBtn.Check( FALSE );
+ m_aPrinterBtn.Check( sal_True );
+ m_aFaxBtn.Check( sal_False );
+ m_aPDFBtn.Check( sal_False );
+ m_aOldBtn.Check( sal_False );
if( ! AddPrinterDialog::getOldPrinterLocation().Len() )
- m_aOldBtn.Enable( FALSE );
+ m_aOldBtn.Enable( sal_False );
if( ! PrinterInfoManager::get().addOrRemovePossible() )
{
- m_aPrinterBtn.Check( FALSE );
- m_aFaxBtn.Check( TRUE );
- m_aPrinterBtn.Enable( FALSE );
- m_aOldBtn.Enable( FALSE );
+ m_aPrinterBtn.Check( sal_False );
+ m_aFaxBtn.Check( sal_True );
+ m_aPrinterBtn.Enable( sal_False );
+ m_aOldBtn.Enable( sal_False );
}
}
@@ -129,7 +129,7 @@ bool APChooseDriverPage::check()
void APChooseDriverPage::fill( PrinterInfo& rInfo )
{
- USHORT nPos = m_aDriverBox.GetSelectEntryPos();
+ sal_uInt16 nPos = m_aDriverBox.GetSelectEntryPos();
String* pDriver = (String*)m_aDriverBox.GetEntryData( nPos );
rInfo.m_aDriverName = *pDriver;
#if OSL_DEBUG_LEVEL > 1
@@ -332,15 +332,15 @@ APNamePage::APNamePage( AddPrinterDialog* pParent, const String& rInitName, Devi
{
FreeResource();
if( eKind != DeviceKind::Printer )
- m_aDefaultBox.Show( FALSE );
+ m_aDefaultBox.Show( sal_False );
else
m_aNameEdt.SetText( rInitName );
if( eKind != DeviceKind::Fax )
- m_aFaxSwallowBox.Show( FALSE );
+ m_aFaxSwallowBox.Show( sal_False );
m_aNameEdt.SetText( AddPrinterDialog::uniquePrinterName( m_aNameEdt.GetText() ) );
- m_aDefaultBox.Check( FALSE );
- m_aFaxSwallowBox.Check( FALSE );
+ m_aDefaultBox.Check( sal_False );
+ m_aFaxSwallowBox.Check( sal_False );
}
APNamePage::~APNamePage()
@@ -374,16 +374,16 @@ APCommandPage::APCommandPage( AddPrinterDialog* pParent, DeviceKind::type eKind
::std::list< String > aCommands;
if( m_eKind == DeviceKind::Printer )
{
- m_aHelpBtn.Show( FALSE );
+ m_aHelpBtn.Show( sal_False );
Size aSize = m_aCommandTxt.GetSizePixel();
aSize.Width() = m_aCommandBox.GetSizePixel().Width();
m_aCommandTxt.SetSizePixel( aSize );
}
if( m_eKind != DeviceKind::Pdf )
{
- m_aPdfDirBtn.Show( FALSE );
- m_aPdfDirEdt.Show( FALSE );
- m_aPdfDirTxt.Show( FALSE );
+ m_aPdfDirBtn.Show( sal_False );
+ m_aPdfDirEdt.Show( sal_False );
+ m_aPdfDirTxt.Show( sal_False );
}
switch( m_eKind )
{
@@ -675,8 +675,8 @@ APFaxDriverPage::APFaxDriverPage( AddPrinterDialog* pParent )
{
FreeResource();
- m_aDefBtn.Check( TRUE );
- m_aSelectBtn.Check( FALSE );
+ m_aDefBtn.Check( sal_True );
+ m_aSelectBtn.Check( sal_False );
m_aSelectBtn.SetStyle( m_aSelectBtn.GetStyle() | WB_WORDBREAK );
}
@@ -708,9 +708,9 @@ APPdfDriverPage::APPdfDriverPage( AddPrinterDialog* pParent )
{
FreeResource();
- m_aDefBtn.Check( TRUE );
- m_aDistBtn.Check( FALSE );
- m_aSelectBtn.Check( FALSE );
+ m_aDefBtn.Check( sal_True );
+ m_aDistBtn.Check( sal_False );
+ m_aSelectBtn.Check( sal_False );
m_aSelectBtn.SetStyle( m_aSelectBtn.GetStyle() | WB_WORDBREAK );
}
@@ -758,9 +758,9 @@ AddPrinterDialog::AddPrinterDialog( Window* pParent )
{
FreeResource();
m_pCurrentPage = m_pChooseDevicePage = new APChooseDevicePage( this );
- m_pCurrentPage->Show( TRUE );
- m_aFinishPB.Enable( FALSE );
- m_aPrevPB.Enable( FALSE );
+ m_pCurrentPage->Show( sal_True );
+ m_aFinishPB.Enable( sal_False );
+ m_aPrevPB.Enable( sal_False );
m_aNextPB.SetClickHdl( LINK( this, AddPrinterDialog, ClickBtnHdl ) );
m_aPrevPB.SetClickHdl( LINK( this, AddPrinterDialog, ClickBtnHdl ) );
@@ -822,7 +822,7 @@ void AddPrinterDialog::DataChanged( const DataChangedEvent& rEv )
void AddPrinterDialog::advance()
{
- m_pCurrentPage->Show( FALSE );
+ m_pCurrentPage->Show( sal_False );
if( m_pCurrentPage == m_pChooseDevicePage )
{
if( m_pChooseDevicePage->isPrinter() )
@@ -830,30 +830,30 @@ void AddPrinterDialog::advance()
if( ! m_pChooseDriverPage )
m_pChooseDriverPage = new APChooseDriverPage( this );
m_pCurrentPage = m_pChooseDriverPage;
- m_aPrevPB.Enable( TRUE );
+ m_aPrevPB.Enable( sal_True );
}
else if( m_pChooseDevicePage->isOld() )
{
if( ! m_pOldPrinterPage )
m_pOldPrinterPage = new APOldPrinterPage( this );
m_pCurrentPage = m_pOldPrinterPage;
- m_aPrevPB.Enable( TRUE );
- m_aFinishPB.Enable( TRUE );
- m_aNextPB.Enable( FALSE );
+ m_aPrevPB.Enable( sal_True );
+ m_aFinishPB.Enable( sal_True );
+ m_aNextPB.Enable( sal_False );
}
else if( m_pChooseDevicePage->isFax() )
{
if( ! m_pFaxDriverPage )
m_pFaxDriverPage = new APFaxDriverPage( this );
m_pCurrentPage = m_pFaxDriverPage;
- m_aPrevPB.Enable( TRUE );
+ m_aPrevPB.Enable( sal_True );
}
else if( m_pChooseDevicePage->isPDF() )
{
if( ! m_pPdfDriverPage )
m_pPdfDriverPage = new APPdfDriverPage( this );
m_pCurrentPage = m_pPdfDriverPage;
- m_aPrevPB.Enable( TRUE );
+ m_aPrevPB.Enable( sal_True );
}
}
else if( m_pCurrentPage == m_pChooseDriverPage )
@@ -869,8 +869,8 @@ void AddPrinterDialog::advance()
else
m_pNamePage->setText( m_aPrinter.m_aPrinterName );
m_pCurrentPage = m_pNamePage;
- m_aFinishPB.Enable( TRUE );
- m_aNextPB.Enable( FALSE );
+ m_aFinishPB.Enable( sal_True );
+ m_aNextPB.Enable( sal_False );
}
else if( m_pCurrentPage == m_pFaxDriverPage )
{
@@ -898,8 +898,8 @@ void AddPrinterDialog::advance()
if( ! m_pFaxNamePage )
m_pFaxNamePage = new APNamePage( this, String(), DeviceKind::Fax );
m_pCurrentPage = m_pFaxNamePage;
- m_aNextPB.Enable( FALSE );
- m_aFinishPB.Enable( TRUE );
+ m_aNextPB.Enable( sal_False );
+ m_aFinishPB.Enable( sal_True );
}
else if( m_pCurrentPage == m_pPdfDriverPage )
{
@@ -927,26 +927,26 @@ void AddPrinterDialog::advance()
if( ! m_pPdfNamePage )
m_pPdfNamePage = new APNamePage( this, String(), DeviceKind::Pdf );
m_pCurrentPage = m_pPdfNamePage;
- m_aNextPB.Enable( FALSE );
- m_aFinishPB.Enable( TRUE );
+ m_aNextPB.Enable( sal_False );
+ m_aFinishPB.Enable( sal_True );
}
- m_pCurrentPage->Show( TRUE );
+ m_pCurrentPage->Show( sal_True );
m_aTitleImage.SetText( m_pCurrentPage->getTitle() );
}
void AddPrinterDialog::back()
{
- m_pCurrentPage->Show( FALSE );
+ m_pCurrentPage->Show( sal_False );
if( m_pCurrentPage == m_pChooseDriverPage )
{
m_pCurrentPage = m_pChooseDevicePage;
- m_aPrevPB.Enable( FALSE );
+ m_aPrevPB.Enable( sal_False );
}
else if( m_pCurrentPage == m_pNamePage )
{
m_pCurrentPage = m_pCommandPage;
- m_aNextPB.Enable( TRUE );
+ m_aNextPB.Enable( sal_True );
}
else if( m_pCurrentPage == m_pCommandPage )
{
@@ -955,13 +955,13 @@ void AddPrinterDialog::back()
else if( m_pCurrentPage == m_pOldPrinterPage )
{
m_pCurrentPage = m_pChooseDevicePage;
- m_aPrevPB.Enable( FALSE );
- m_aNextPB.Enable( TRUE );
+ m_aPrevPB.Enable( sal_False );
+ m_aNextPB.Enable( sal_True );
}
else if( m_pCurrentPage == m_pFaxDriverPage )
{
m_pCurrentPage = m_pChooseDevicePage;
- m_aPrevPB.Enable( FALSE );
+ m_aPrevPB.Enable( sal_False );
}
else if( m_pCurrentPage == m_pFaxSelectDriverPage )
{
@@ -970,17 +970,17 @@ void AddPrinterDialog::back()
else if( m_pCurrentPage == m_pFaxNamePage )
{
m_pCurrentPage = m_pFaxCommandPage;
- m_aNextPB.Enable( TRUE );
+ m_aNextPB.Enable( sal_True );
}
else if( m_pCurrentPage == m_pFaxCommandPage )
{
m_pCurrentPage = m_pFaxDriverPage->isDefault() ? (APTabPage*)m_pFaxDriverPage : (APTabPage*)m_pFaxSelectDriverPage;
- m_aNextPB.Enable( TRUE );
+ m_aNextPB.Enable( sal_True );
}
else if( m_pCurrentPage == m_pPdfDriverPage )
{
m_pCurrentPage = m_pChooseDevicePage;
- m_aPrevPB.Enable( FALSE );
+ m_aPrevPB.Enable( sal_False );
}
else if( m_pCurrentPage == m_pPdfSelectDriverPage )
{
@@ -989,14 +989,14 @@ void AddPrinterDialog::back()
else if( m_pCurrentPage == m_pPdfNamePage )
{
m_pCurrentPage = m_pPdfCommandPage;
- m_aNextPB.Enable( TRUE );
+ m_aNextPB.Enable( sal_True );
}
else if( m_pCurrentPage == m_pPdfCommandPage )
{
m_pCurrentPage = m_pPdfDriverPage->isDefault() || m_pPdfDriverPage->isDist() ? (APTabPage*)m_pPdfDriverPage : (APTabPage*)m_pPdfSelectDriverPage;
- m_aNextPB.Enable( TRUE );
+ m_aNextPB.Enable( sal_True );
}
- m_pCurrentPage->Show( TRUE );
+ m_pCurrentPage->Show( sal_True );
m_aTitleImage.SetText( m_pCurrentPage->getTitle() );
}
diff --git a/padmin/source/cmddlg.cxx b/padmin/source/cmddlg.cxx
index 76d181fb8e5e..d1fad0189b45 100644
--- a/padmin/source/cmddlg.cxx
+++ b/padmin/source/cmddlg.cxx
@@ -270,10 +270,10 @@ RTSCommandPage::RTSCommandPage( RTSDialog* pParent ) :
m_aPdfDirectoryButton.SetClickHdl( LINK( this, RTSCommandPage, ClickBtnHdl ) );
m_aExternalCB.SetToggleHdl( LINK( this, RTSCommandPage, ClickBtnHdl ) );
- m_aPdfDirectoryButton.Show( FALSE );
- m_aPdfDirectoryEdit.Show( FALSE );
- m_aPdfDirectoryText.Show( FALSE );
- m_aFaxSwallowBox.Show( FALSE );
+ m_aPdfDirectoryButton.Show( sal_False );
+ m_aPdfDirectoryEdit.Show( sal_False );
+ m_aPdfDirectoryText.Show( sal_False );
+ m_aFaxSwallowBox.Show( sal_False );
m_aCommandsCB.SetText( m_pParent->m_aJobData.m_aCommand );
m_aQuickCB.SetText( m_pParent->m_aJobData.m_aQuickCommand );
@@ -287,9 +287,9 @@ RTSCommandPage::RTSCommandPage( RTSDialog* pParent ) :
if( ! aToken.compareToAscii( "fax", 3 ) )
{
m_bWasFax = true;
- m_aFaxSwallowBox.Show( TRUE );
+ m_aFaxSwallowBox.Show( sal_True );
sal_Int32 nPos = 0;
- m_aFaxSwallowBox.Check( ! aToken.getToken( 1, '=', nPos ).compareToAscii( "swallow", 7 ) ? TRUE : FALSE );
+ m_aFaxSwallowBox.Check( ! aToken.getToken( 1, '=', nPos ).compareToAscii( "swallow", 7 ) ? sal_True : sal_False );
m_aConfigureBox.SelectEntryPos( m_nFaxEntry );
}
else if( ! aToken.compareToAscii( "pdf=", 4 ) )
@@ -297,9 +297,9 @@ RTSCommandPage::RTSCommandPage( RTSDialog* pParent ) :
m_bWasPdf = true;
sal_Int32 nPos = 0;
m_aPdfDirectoryEdit.SetText( aToken.getToken( 1, '=', nPos ) );
- m_aPdfDirectoryEdit.Show( TRUE );
- m_aPdfDirectoryButton.Show( TRUE );
- m_aPdfDirectoryText.Show( TRUE );
+ m_aPdfDirectoryEdit.Show( sal_True );
+ m_aPdfDirectoryButton.Show( sal_True );
+ m_aPdfDirectoryText.Show( sal_True );
m_aConfigureBox.SelectEntryPos( m_nPdfEntry );
}
else if( ! aToken.compareToAscii( "external_dialog" ) )
@@ -425,17 +425,17 @@ IMPL_LINK( RTSCommandPage, SelectHdl, Control*, pBox )
{
if( pBox == &m_aConfigureBox )
{
- BOOL bEnable = m_aConfigureBox.GetSelectEntryPos() == m_nPdfEntry ? TRUE : FALSE;
+ sal_Bool bEnable = m_aConfigureBox.GetSelectEntryPos() == m_nPdfEntry ? sal_True : sal_False;
m_aPdfDirectoryButton.Show( bEnable );
m_aPdfDirectoryEdit.Show( bEnable );
m_aPdfDirectoryText.Show( bEnable );
- bEnable = m_aConfigureBox.GetSelectEntryPos() == m_nFaxEntry ? TRUE : FALSE;
+ bEnable = m_aConfigureBox.GetSelectEntryPos() == m_nFaxEntry ? sal_True : sal_False;
m_aFaxSwallowBox.Show( bEnable );
UpdateCommands();
}
else if( pBox == &m_aCommandsCB )
{
- m_aRemovePB.Enable( TRUE );
+ m_aRemovePB.Enable( sal_True );
}
return 0;
diff --git a/padmin/source/cmddlg.hxx b/padmin/source/cmddlg.hxx
index 9e6d12cf4277..0b1e07dd1db7 100644
--- a/padmin/source/cmddlg.hxx
+++ b/padmin/source/cmddlg.hxx
@@ -79,9 +79,9 @@ private:
FixedText m_aConfigureText;
ListBox m_aConfigureBox;
- USHORT m_nPrinterEntry;
- USHORT m_nFaxEntry;
- USHORT m_nPdfEntry;
+ sal_uInt16 m_nPrinterEntry;
+ sal_uInt16 m_nFaxEntry;
+ sal_uInt16 m_nPdfEntry;
FixedText m_aPdfDirectoryText;
PushButton m_aPdfDirectoryButton;
Edit m_aPdfDirectoryEdit;
diff --git a/padmin/source/fontentry.cxx b/padmin/source/fontentry.cxx
index f67d2c0d18d6..93ed87e221a9 100644
--- a/padmin/source/fontentry.cxx
+++ b/padmin/source/fontentry.cxx
@@ -143,7 +143,7 @@ FontNameDlg::FontNameDlg( Window *pParent ) :
{
FreeResource();
- m_aFontBox.EnableMultiSelection( TRUE );
+ m_aFontBox.EnableMultiSelection( sal_True );
m_aOKButton.SetClickHdl( LINK( this, FontNameDlg, ClickBtnHdl ) );
m_aRenameButton.SetClickHdl( LINK( this, FontNameDlg, ClickBtnHdl ) );
@@ -256,8 +256,8 @@ void FontNameDlg::init()
::std::list< fontID > aFonts;
m_rFontManager.getFontList( aFonts );
m_aFontBox.Clear();
- m_aRemoveButton.Enable( FALSE );
- m_aRenameButton.Enable( FALSE );
+ m_aRemoveButton.Enable( sal_False );
+ m_aRenameButton.Enable( sal_False );
::std::hash_map< OUString, int, OUStringHash > aFamilies;
::std::list< fontID >::iterator font_it;
@@ -300,7 +300,7 @@ void FontNameDlg::init()
}
else
aEntry = fillFontEntry( aInfo, String( ByteString( aFile ), osl_getThreadTextEncoding() ), aFamilies[ aInfo.m_aFamilyName ] > 1 );
- USHORT nEntry = m_aFontBox.InsertEntry( aEntry );
+ sal_uInt16 nEntry = m_aFontBox.InsertEntry( aEntry );
m_aFontBox.SetEntryData( nEntry, (void*)(*font_it) );
}
}
@@ -310,7 +310,7 @@ IMPL_LINK( FontNameDlg, SelectHdl, ListBox*, pBox )
{
if( pBox == &m_aFontBox )
{
- BOOL bEnable = m_aFontBox.GetSelectEntryCount() ? TRUE : FALSE;
+ sal_Bool bEnable = m_aFontBox.GetSelectEntryCount() ? sal_True : sal_False;
m_aRemoveButton.Enable( bEnable );
m_aRenameButton.Enable( bEnable );
}
@@ -442,7 +442,7 @@ FontImportDialog::FontImportDialog( Window* pParent ) :
{
FreeResource();
- m_aNewFontsBox.EnableMultiSelection( TRUE );
+ m_aNewFontsBox.EnableMultiSelection( sal_True );
m_aOKBtn.SetClickHdl( LINK( this, FontImportDialog, ClickBtnHdl ) );
m_aSelectAllBtn.SetClickHdl( LINK( this, FontImportDialog, ClickBtnHdl ) );
@@ -450,8 +450,8 @@ FontImportDialog::FontImportDialog( Window* pParent ) :
m_aFromDirEdt.SetModifyHdl( LINK( this, FontImportDialog, ModifyHdl ) );
m_aRefreshTimer.SetTimeoutHdl( LINK( this, FontImportDialog, RefreshTimeoutHdl ) );
m_aRefreshTimer.SetTimeout( 2000 );
- m_aLinkOnlyBox.Check( FALSE );
- m_aSubDirsBox.Check( TRUE );
+ m_aLinkOnlyBox.Check( sal_False );
+ m_aSubDirsBox.Check( sal_True );
m_aSubDirsBox.SetToggleHdl( LINK( this, FontImportDialog, ToggleHdl ) );
Config& rPadminRC( getPadminRC() );
@@ -595,7 +595,7 @@ void FontImportDialog::fillFontBox()
aEntry = FontNameDlg::fillFontEntry( it->second.front(), aFile, aFamilies[ it->second.front().m_aFamilyName ] > 1 );
else
aEntry = FontNameDlg::fillFontEntry( it->second, aFile );
- USHORT nPos = m_aNewFontsBox.InsertEntry( aEntry );
+ sal_uInt16 nPos = m_aNewFontsBox.InsertEntry( aEntry );
m_aNewFontsBox.SetEntryData( nPos, (void*)&(it->first) );
}
}
@@ -616,12 +616,12 @@ void FontImportDialog::copyFonts()
m_pProgress = new ProgressDialog( this );
m_pProgress->setRange( 0, aFiles.size() );
m_pProgress->startOperation( m_aImportOperation );
- m_pProgress->Show( TRUE );
+ m_pProgress->Show( sal_True );
m_pProgress->setValue( 0 );
m_pProgress->Invalidate();
m_pProgress->Sync();
nSuccess = m_rFontManager.importFonts( aFiles, m_aLinkOnlyBox.IsChecked() ? true : false, this );
- m_pProgress->Show( FALSE );
+ m_pProgress->Show( sal_False );
delete m_pProgress;
m_pProgress = NULL;
}
@@ -649,10 +649,10 @@ IMPL_LINK( FontImportDialog, ClickBtnHdl, Button*, pButton )
}
else if( pButton == &m_aSelectAllBtn )
{
- m_aNewFontsBox.SetUpdateMode( FALSE );
+ m_aNewFontsBox.SetUpdateMode( sal_False );
for( int i = 0; i < m_aNewFontsBox.GetEntryCount(); i++ )
- m_aNewFontsBox.SelectEntryPos( i, TRUE );
- m_aNewFontsBox.SetUpdateMode( TRUE );
+ m_aNewFontsBox.SelectEntryPos( i, sal_True );
+ m_aNewFontsBox.SetUpdateMode( sal_True );
}
return 0;
}
diff --git a/padmin/source/helper.cxx b/padmin/source/helper.cxx
index b81d37df5cb1..cab3bc9bde71 100644
--- a/padmin/source/helper.cxx
+++ b/padmin/source/helper.cxx
@@ -219,13 +219,13 @@ QueryString::QueryString( Window* pParent, String& rQuery, String& rRet, const :
m_aComboBox.InsertEntry( m_rReturnValue );
for( ::std::list<String>::const_iterator it = rChoices.begin(); it != rChoices.end(); ++it )
m_aComboBox.InsertEntry( *it );
- m_aEdit.Show( FALSE );
+ m_aEdit.Show( sal_False );
m_bUseEdit = false;
}
else
{
m_aEdit.SetText( m_rReturnValue );
- m_aComboBox.Show( FALSE );
+ m_aComboBox.Show( sal_False );
m_bUseEdit = true;
}
SetText( Application::GetDisplayName() );
@@ -251,13 +251,13 @@ IMPL_LINK( QueryString, ClickBtnHdl, Button*, pButton )
* AreYouSure
*/
-BOOL padmin::AreYouSure( Window* pParent, int nRid )
+sal_Bool padmin::AreYouSure( Window* pParent, int nRid )
{
if( nRid == -1 )
nRid = RID_YOU_SURE;
QueryBox aQueryBox( pParent, WB_YES_NO | WB_DEF_NO,
String( PaResId( nRid ) ) );
- return aQueryBox.Execute() == RET_NO ? FALSE : TRUE;
+ return aQueryBox.Execute() == RET_NO ? sal_False : sal_True;
}
/*
diff --git a/padmin/source/helper.hxx b/padmin/source/helper.hxx
index 636241b826a6..5b7b710679a8 100644
--- a/padmin/source/helper.hxx
+++ b/padmin/source/helper.hxx
@@ -46,6 +46,13 @@
#endif
#include <vcl/combobox.hxx>
+#if defined SPA_DLLIMPLEMENTATION
+#define SPA_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#else
+#define SPA_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#endif
+
+
class Config;
#define PSPRINT_PPDDIR "driver"
@@ -110,7 +117,7 @@ public:
~QueryString();
};
-BOOL AreYouSure( Window*, int nRid = -1 );
+sal_Bool AreYouSure( Window*, int nRid = -1 );
ResId PaResId( sal_uInt32 nId );
diff --git a/padmin/source/makefile.mk b/padmin/source/makefile.mk
deleted file mode 100644
index 8bcbd51ef832..000000000000
--- a/padmin/source/makefile.mk
+++ /dev/null
@@ -1,115 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-.IF "$(GUIBASE)"=="aqua"
-
-dummy:
- @echo "Nothing to build for GUIBASE aqua."
-
-.ELSE
-
-PRJ=..
-PRJNAME=padmin
-TARGET=padmin
-TARGETTYPE=GUI
-ENABLE_EXCEPTIONS=TRUE
-LIBTARGET=NO
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE: settings.mk
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=$(TARGET)
-SRC1FILES=padialog.src rtsetup.src
-
-RESLIB1NAME=spa
-RESLIB1IMAGES=$(PRJ)$/source
-RESLIB1SRSFILES= $(SRS)$/padmin.srs
-RESLIB1DEPN=\
- padialog.src \
- padialog.hrc \
- rtsetup.src \
- rtsetup.hrc
-
-.IF "$(GUI)" == "UNX"
-
-SLOFILES=\
- $(SLO)$/padialog.obj \
- $(SLO)$/cmddlg.obj \
- $(SLO)$/progress.obj \
- $(SLO)$/newppdlg.obj \
- $(SLO)$/prtsetup.obj \
- $(SLO)$/fontentry.obj \
- $(SLO)$/helper.obj \
- $(SLO)$/adddlg.obj \
- $(SLO)$/titlectrl.obj
-
-
-OBJFILES=\
- $(OBJ)/pamain.obj
-
-SHL1TARGET= spa$(DLLPOSTFIX)
-SHL1OBJS=$(SLOFILES)
-SHL1STDLIBS=\
- $(SVTOOLLIB) \
- $(VCLLIB) \
- $(UNOTOOLSLIB) \
- $(TOOLSLIB) \
- $(COMPHELPERLIB) \
- $(CPPULIB) \
- $(SALLIB)
-
-APP1TARGET=spadmin.bin
-APP1DEPN+=$(SHL1TARGETN)
-
-APP1OBJS=\
- $(OBJ)$/desktopcontext.obj \
- $(OBJ)/pamain.obj
-
-APP1STDLIBS= \
- -l$(SHL1TARGET) \
- $(VCLLIB) \
- $(UNOTOOLSLIB) \
- $(TOOLSLIB) \
- $(UCBHELPERLIB) \
- $(COMPHELPERLIB) \
- $(CPPUHELPERLIB) \
- $(CPPULIB) \
- $(SALLIB)
-
-UNIXTEXT = $(MISC)$/spadmin.sh
-
-.ENDIF
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-.ENDIF # GUIBASE==aqua
-
diff --git a/padmin/source/newppdlg.cxx b/padmin/source/newppdlg.cxx
index e1760c28db30..636e2d7435ea 100644
--- a/padmin/source/newppdlg.cxx
+++ b/padmin/source/newppdlg.cxx
@@ -152,7 +152,7 @@ void PPDImportDialog::Import()
continue;
}
- USHORT nPos = m_aDriverLB.InsertEntry( aPrinterName );
+ sal_uInt16 nPos = m_aDriverLB.InsertEntry( aPrinterName );
m_aDriverLB.SetEntryData( nPos, new String( aPath.PathToFileName() ) );
}
}
diff --git a/padmin/source/padialog.cxx b/padmin/source/padialog.cxx
index d91ebea0c73d..bd81fe5d002b 100644
--- a/padmin/source/padialog.cxx
+++ b/padmin/source/padialog.cxx
@@ -68,12 +68,12 @@ using namespace com::sun::star;
using namespace com::sun::star::uno;
using namespace com::sun::star::beans;
-PADialog* PADialog::Create( Window* pParent, BOOL bAdmin )
+PADialog* PADialog::Create( Window* pParent, sal_Bool bAdmin )
{
return new PADialog( pParent, bAdmin );
}
-PADialog::PADialog( Window* pParent, BOOL /*bAdmin*/ ) :
+PADialog::PADialog( Window* pParent, sal_Bool /*bAdmin*/ ) :
ModalDialog( pParent, PaResId( RID_PADIALOG ) ),
m_aDevicesLB( this, PaResId( RID_PA_LB_DEV ) ),
m_aConfPB( this, PaResId( RID_PA_BTN_CONF ) ),
@@ -130,7 +130,7 @@ void PADialog::Init()
UpdateDevice();
UpdateText();
- m_aRemPB.Enable( FALSE );
+ m_aRemPB.Enable( sal_False );
m_aDevicesLB.SetDoubleClickHdl( LINK( this, PADialog, DoubleClickHdl ) );
m_aDevicesLB.SetSelectHdl( LINK( this, PADialog, SelectHdl ) );
@@ -146,23 +146,23 @@ void PADialog::Init()
::psp::PrintFontManager& rFontManager( ::psp::PrintFontManager::get() );
if( ! rFontManager.checkImportPossible() )
- m_aFontsPB.Enable( FALSE );
+ m_aFontsPB.Enable( sal_False );
if( rFontManager.hasFontconfig() )
{
- m_aFontsPB.Enable( FALSE );
- m_aFontsPB.Show( FALSE );
+ m_aFontsPB.Enable( sal_False );
+ m_aFontsPB.Show( sal_False );
}
// at this point no actual changes will be written
// but the write will have checked whether any writeable config exists
if( ! m_rPIManager.writePrinterConfig() )
{
- m_aAddPB.Enable( FALSE );
- m_aRemPB.Enable( FALSE );
- m_aConfPB.Enable( FALSE );
- m_aRenamePB.Enable( FALSE );
- m_aStdPB.Enable( FALSE );
- m_aCUPSCB.Enable( FALSE );
+ m_aAddPB.Enable( sal_False );
+ m_aRemPB.Enable( sal_False );
+ m_aConfPB.Enable( sal_False );
+ m_aRenamePB.Enable( sal_False );
+ m_aStdPB.Enable( sal_False );
+ m_aCUPSCB.Enable( sal_False );
ErrorBox aBox( GetParent(), WB_OK | WB_DEF_OK, String( PaResId( RID_ERR_NOWRITE ) ) );
aBox.Execute();
}
@@ -260,9 +260,9 @@ IMPL_LINK( PADialog, SelectHdl, ListBox*, pListBox )
String sSelect = getSelectedDevice();
String sDefPrt = m_rPIManager.getDefaultPrinter();
if( sDefPrt == sSelect || ! m_rPIManager.removePrinter( sSelect, true ) )
- m_aRemPB.Enable( FALSE );
+ m_aRemPB.Enable( sal_False );
else
- m_aRemPB.Enable( TRUE );
+ m_aRemPB.Enable( sal_True );
UpdateText();
}
return 0;
@@ -277,7 +277,7 @@ void PADialog::UpdateDefPrt()
if( m_aRemPB.HasFocus() )
m_aDevicesLB.GetFocus();
- m_aRemPB.Enable( FALSE );
+ m_aRemPB.Enable( sal_False );
}
void PADialog::UpdateText()
@@ -331,7 +331,7 @@ static Point project( const Point& rPoint )
static Color approachColor( const Color& rFrom, const Color& rTo )
{
Color aColor;
- UINT8 nDiff;
+ sal_uInt8 nDiff;
// approach red
if( rFrom.GetRed() < rTo.GetRed() )
{
@@ -456,7 +456,7 @@ void SpaPrinterController::printPage( int ) const
static const struct
{
const char* const pDirect;
- USHORT nResId;
+ sal_uInt16 nResId;
} aResIds[] =
{
{ NULL, RID_TXT_TESTPAGE_NAME },
@@ -653,7 +653,7 @@ void PADialog::RemDevice()
{
if( m_aDevicesLB.GetEntry( i ).CompareTo( aDefPrinter, aDefPrinter.Len() ) == COMPARE_EQUAL )
{
- m_aDevicesLB.SelectEntryPos( i, TRUE );
+ m_aDevicesLB.SelectEntryPos( i, sal_True );
UpdateText();
break;
}
@@ -662,7 +662,7 @@ void PADialog::RemDevice()
m_aDevicesLB.GetFocus();
if( m_aDevicesLB.GetEntryCount() < 2 )
- m_aRemPB.Enable( FALSE );
+ m_aRemPB.Enable( sal_False );
}
void PADialog::ConfigureDevice()
diff --git a/padmin/source/padialog.hxx b/padmin/source/padialog.hxx
index 2a8285f8af88..a0cee7b2af7d 100644
--- a/padmin/source/padialog.hxx
+++ b/padmin/source/padialog.hxx
@@ -50,7 +50,7 @@ class Printer;
namespace padmin {
- class PADialog : public ModalDialog
+ class SPA_DLLPUBLIC PADialog : public ModalDialog
{
private:
DelListBox m_aDevicesLB;
@@ -92,7 +92,7 @@ namespace padmin {
DECL_LINK( SelectHdl, ListBox* );
DECL_LINK( DelPressedHdl, ListBox* );
- PADialog( Window*, BOOL );
+ PADialog( Window*, sal_Bool );
void Init();
void UpdateDefPrt();
@@ -112,7 +112,7 @@ namespace padmin {
public:
~PADialog();
- static PADialog* Create( Window*, BOOL );
+ static PADialog* Create( Window*, sal_Bool );
};
} // namespace
diff --git a/padmin/source/padialog.src b/padmin/source/padialog.src
index 09ce29a2c682..85191f3dddf9 100644
--- a/padmin/source/padialog.src
+++ b/padmin/source/padialog.src
@@ -483,47 +483,47 @@ String RID_YOU_SURE
Bitmap RID_BUTTERFLY
{
- File = "butter.png" ;
+ File = "source/butter.png" ;
};
Bitmap RID_BMP_SMALL_PRINTER
{
- File = "print.png";
+ File = "source/print.png";
};
Bitmap RID_BMP_SMALL_FAX
{
- File = "fax.png";
+ File = "source/fax.png";
};
Bitmap RID_BMP_SMALL_PDF
{
- File = "pdf.png";
+ File = "source/pdf.png";
};
Bitmap RID_BMP_PRINTER
{
- File = "printer_large.png";
+ File = "source/printer_large.png";
};
Bitmap RID_BMP_SMALL_PRINTER_HC
{
- File = "printer_16_h.png";
+ File = "source/printer_16_h.png";
};
Bitmap RID_BMP_SMALL_FAX_HC
{
- File = "fax_16_h.png";
+ File = "source/fax_16_h.png";
};
Bitmap RID_BMP_SMALL_PDF_HC
{
- File = "printpdf_16_h.png";
+ File = "source/printpdf_16_h.png";
};
Bitmap RID_BMP_PRINTER_HC
{
- File = "printer_40x48_h.png";
+ File = "source/printer_40x48_h.png";
};
diff --git a/padmin/source/pamain.cxx b/padmin/source/pamain.cxx
index f46a2c8a3149..a780dddd915f 100644
--- a/padmin/source/pamain.cxx
+++ b/padmin/source/pamain.cxx
@@ -59,7 +59,7 @@ class MyApp : public Application
{
public:
void Main();
- virtual USHORT Exception( USHORT nError );
+ virtual sal_uInt16 Exception( sal_uInt16 nError );
static void ReadStringHook( String& );
};
@@ -82,7 +82,7 @@ void MyApp::ReadStringHook( String& rStr )
// -----------------------------------------------------------------------
-USHORT MyApp::Exception( USHORT nError )
+sal_uInt16 MyApp::Exception( sal_uInt16 nError )
{
switch( nError & EXC_MAJORTYPE )
{
@@ -149,7 +149,7 @@ void MyApp::Main()
if( Application::GetSettings().GetMiscSettings().GetEnableATToolSupport() )
{
- BOOL bQuitApp;
+ sal_Bool bQuitApp;
if( !InitAccessBridge( true, bQuitApp ) )
if( bQuitApp )
return;
@@ -160,7 +160,7 @@ void MyApp::Main()
ResMgr::SetReadStringHook( MyApp::ReadStringHook );
- pPADialog = PADialog::Create( NULL , FALSE );
+ pPADialog = PADialog::Create( NULL , sal_False );
Application::SetDisplayName( pPADialog->GetText() );
pPADialog->SetIcon(501);
pPADialog->Execute();
diff --git a/padmin/source/progress.cxx b/padmin/source/progress.cxx
index 03ef67db8da9..9a7cf537a842 100644
--- a/padmin/source/progress.cxx
+++ b/padmin/source/progress.cxx
@@ -41,7 +41,7 @@
using namespace padmin;
ProgressDialog::ProgressDialog( Window* pParent,
- BOOL bCancelable,
+ sal_Bool bCancelable,
int nMin, int nMax ) :
ModelessDialog( pParent, PaResId( RID_PROGRESS_DLG ) ),
maOperation( this, PaResId( RID_PROGRESS_OPERATION_TXT ) ),
@@ -51,7 +51,7 @@ ProgressDialog::ProgressDialog( Window* pParent,
maProgressBar( this, PaResId( RID_PROGRESS_STATUSBAR ) ),
mnMax( nMax ),
mnMin( nMin ),
- mbCanceled( FALSE )
+ mbCanceled( sal_False )
{
maFilename.SetStyle( maFilename.GetStyle() | WB_PATHELLIPSIS );
if( ! bCancelable )
@@ -75,9 +75,9 @@ void ProgressDialog::startOperation( const String& rOperation )
{
maOperation.SetText( rOperation );
maProgressBar.SetValue( 0 );
- mbCanceled = FALSE;
+ mbCanceled = sal_False;
if( ! IsVisible() )
- Show( TRUE );
+ Show( sal_True );
}
void ProgressDialog::setValue( int nValue )
@@ -97,7 +97,7 @@ IMPL_LINK( ProgressDialog, ClickBtnHdl, Button*, pButton )
{
if( pButton == &maCancelButton )
{
- mbCanceled = TRUE;
+ mbCanceled = sal_True;
}
return 0;
}
diff --git a/padmin/source/progress.hxx b/padmin/source/progress.hxx
index 552a049c3572..f249732549c6 100644
--- a/padmin/source/progress.hxx
+++ b/padmin/source/progress.hxx
@@ -45,10 +45,10 @@ namespace padmin {
ProgressBar maProgressBar;
int mnMax, mnMin;
- BOOL mbCanceled;
+ sal_Bool mbCanceled;
public:
- ProgressDialog( Window*, BOOL bCancelable = TRUE, int nMin = 0, int nMax = 100 );
+ ProgressDialog( Window*, sal_Bool bCancelable = sal_True, int nMin = 0, int nMax = 100 );
~ProgressDialog();
DECL_LINK( ClickBtnHdl, Button* );
@@ -58,7 +58,7 @@ namespace padmin {
void startOperation( const String& );
void setFilename( const String& );
- BOOL isCanceled() { return mbCanceled; }
+ sal_Bool isCanceled() { return mbCanceled; }
};
} // namespace
diff --git a/padmin/source/prtsetup.cxx b/padmin/source/prtsetup.cxx
index 8165b8015403..ad73d48ae48b 100644
--- a/padmin/source/prtsetup.cxx
+++ b/padmin/source/prtsetup.cxx
@@ -47,7 +47,7 @@ void RTSDialog::insertAllPPDValues( ListBox& rBox, const PPDParser* pParser, con
return;
const PPDValue* pValue = NULL;
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
String aOptionText;
for( int i = 0; i < pKey->countValues(); i++ )
@@ -150,7 +150,7 @@ IMPL_LINK( RTSDialog, ActivatePage, TabControl*, pTabCtrl )
if( pTabCtrl != &m_aTabControl )
return 0;
- USHORT nId = m_aTabControl.GetCurPageId();
+ sal_uInt16 nId = m_aTabControl.GetCurPageId();
if ( ! m_aTabControl.GetTabPage( nId ) )
{
@@ -242,7 +242,7 @@ RTSPaperPage::RTSPaperPage( RTSDialog* pParent ) :
FreeResource();
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
m_aOrientBox.InsertEntry( PORTRAIT_STRING );
m_aOrientBox.InsertEntry( LSCAPE_STRING );
@@ -284,8 +284,8 @@ void RTSPaperPage::update()
}
else
{
- m_aDuplexText.Enable( FALSE );
- m_aDuplexBox.Enable( FALSE );
+ m_aDuplexText.Enable( sal_False );
+ m_aDuplexBox.Enable( sal_False );
}
// paper
@@ -296,8 +296,8 @@ void RTSPaperPage::update()
}
else
{
- m_aPaperText.Enable( FALSE );
- m_aPaperBox.Enable( FALSE );
+ m_aPaperText.Enable( sal_False );
+ m_aPaperBox.Enable( sal_False );
}
// input slots
@@ -308,8 +308,8 @@ void RTSPaperPage::update()
}
else
{
- m_aSlotText.Enable( FALSE );
- m_aSlotBox.Enable( FALSE );
+ m_aSlotText.Enable( sal_False );
+ m_aSlotBox.Enable( sal_False );
}
}
@@ -386,14 +386,14 @@ RTSDevicePage::RTSDevicePage( RTSDialog* pParent ) :
case 1: m_aSpaceBox.SelectEntry( m_aSpaceColor );break;
}
- ULONG nLevelEntryData = 0;
+ sal_uLong nLevelEntryData = 0;
if( m_pParent->m_aJobData.m_nPDFDevice > 0 )
nLevelEntryData = 10;
else
nLevelEntryData = m_pParent->m_aJobData.m_nPSLevel+1;
- for( USHORT i = 0; i < m_aLevelBox.GetEntryCount(); i++ )
+ for( sal_uInt16 i = 0; i < m_aLevelBox.GetEntryCount(); i++ )
{
- if( (ULONG)m_aLevelBox.GetEntryData( i ) == nLevelEntryData )
+ if( (sal_uLong)m_aLevelBox.GetEntryData( i ) == nLevelEntryData )
{
m_aLevelBox.SelectEntryPos( i );
break;
@@ -416,7 +416,7 @@ RTSDevicePage::RTSDevicePage( RTSDialog* pParent ) :
)
{
String aEntry( m_pParent->m_aJobData.m_pParser->translateKey( pKey->getKey() ) );
- USHORT nPos = m_aPPDKeyBox.InsertEntry( aEntry );
+ sal_uInt16 nPos = m_aPPDKeyBox.InsertEntry( aEntry );
m_aPPDKeyBox.SetEntryData( nPos, (void*)pKey );
}
}
@@ -437,17 +437,17 @@ void RTSDevicePage::update()
// ------------------------------------------------------------------
-ULONG RTSDevicePage::getLevel()
+sal_uLong RTSDevicePage::getLevel()
{
- ULONG nLevel = (ULONG)m_aLevelBox.GetEntryData( m_aLevelBox.GetSelectEntryPos() );
+ sal_uLong nLevel = (sal_uLong)m_aLevelBox.GetEntryData( m_aLevelBox.GetSelectEntryPos() );
return nLevel < 10 ? nLevel-1 : 0;
}
// ------------------------------------------------------------------
-ULONG RTSDevicePage::getPDFDevice()
+sal_uLong RTSDevicePage::getPDFDevice()
{
- ULONG nLevel = (ULONG)m_aLevelBox.GetEntryData( m_aLevelBox.GetSelectEntryPos() );
+ sal_uLong nLevel = (sal_uLong)m_aLevelBox.GetEntryData( m_aLevelBox.GetSelectEntryPos() );
return nLevel > 9 ? 1 : 0;
}
@@ -490,7 +490,7 @@ void RTSDevicePage::FillValueBox( const PPDKey* pKey )
m_pParent->m_aJobData.m_pParser )
{
String aEntry( m_pParent->m_aJobData.m_pParser->translateOption( pKey->getKey(), pValue->m_aOption ) );
- USHORT nPos = m_aPPDValueBox.InsertEntry( aEntry );
+ sal_uInt16 nPos = m_aPPDValueBox.InsertEntry( aEntry );
m_aPPDValueBox.SetEntryData( nPos, (void*)pValue );
}
}
@@ -521,10 +521,10 @@ RTSOtherPage::RTSOtherPage( RTSDialog* pParent ) :
{
FreeResource();
- m_aTopLB.EnableEmptyFieldValue( TRUE );
- m_aBottomLB.EnableEmptyFieldValue( TRUE );
- m_aLeftLB.EnableEmptyFieldValue( TRUE );
- m_aRightLB.EnableEmptyFieldValue( TRUE );
+ m_aTopLB.EnableEmptyFieldValue( sal_True );
+ m_aBottomLB.EnableEmptyFieldValue( sal_True );
+ m_aLeftLB.EnableEmptyFieldValue( sal_True );
+ m_aRightLB.EnableEmptyFieldValue( sal_True );
m_aDefaultBtn.SetClickHdl( LINK( this, RTSOtherPage, ClickBtnHdl ) );
@@ -658,16 +658,16 @@ RTSFontSubstPage::RTSFontSubstPage( RTSDialog* pParent ) :
}
m_aEnableBox.Check( m_pParent->m_aJobData.m_bPerformFontSubstitution );
- m_aRemoveButton.Enable( FALSE );
+ m_aRemoveButton.Enable( sal_False );
if( ! m_pParent->m_aJobData.m_bPerformFontSubstitution )
{
- m_aSubstitutionsBox.Enable( FALSE );
- m_aSubstitutionsText.Enable( FALSE );
- m_aAddButton.Enable( FALSE );
- m_aToFontBox.Enable( FALSE );
- m_aToFontText.Enable( FALSE );
- m_aFromFontBox.Enable( FALSE );
- m_aFromFontText.Enable( FALSE );
+ m_aSubstitutionsBox.Enable( sal_False );
+ m_aSubstitutionsText.Enable( sal_False );
+ m_aAddButton.Enable( sal_False );
+ m_aToFontBox.Enable( sal_False );
+ m_aToFontText.Enable( sal_False );
+ m_aFromFontBox.Enable( sal_False );
+ m_aFromFontText.Enable( sal_False );
}
update();
@@ -686,7 +686,7 @@ RTSFontSubstPage::~RTSFontSubstPage()
void RTSFontSubstPage::update()
{
m_aSubstitutionsBox.Clear();
- m_aRemoveButton.Enable( FALSE );
+ m_aRemoveButton.Enable( sal_False );
// fill substitutions box
::std::hash_map< OUString, OUString, OUStringHash >::const_iterator it;
for( it = m_pParent->m_aJobData.m_aFontSubstitutes.begin();
@@ -728,7 +728,7 @@ IMPL_LINK( RTSFontSubstPage, ClickBtnHdl, Button*, pButton )
for( int i = 0; i < m_aSubstitutionsBox.GetSelectEntryCount(); i++ )
{
String aEntry( m_aSubstitutionsBox.GetSelectEntry( i ) );
- USHORT nPos = aEntry.SearchAscii( " -> " );
+ sal_uInt16 nPos = aEntry.SearchAscii( " -> " );
aEntry.Erase( nPos );
m_pParent->m_aJobData.m_aFontSubstitutes.erase( aEntry );
}
@@ -802,7 +802,7 @@ OString RTSPWDialog::getPassword() const
extern "C" {
- int Sal_SetupPrinterDriver( ::psp::PrinterInfo& rJobData )
+ int SPA_DLLPUBLIC Sal_SetupPrinterDriver( ::psp::PrinterInfo& rJobData )
{
int nRet = 0;
RTSDialog aDialog( rJobData, rJobData.m_aPrinterName, false );
@@ -816,14 +816,14 @@ extern "C" {
return nRet;
}
- int Sal_queryFaxNumber( String& rNumber )
+ int SPA_DLLPUBLIC Sal_queryFaxNumber( String& rNumber )
{
String aTmpString( PaResId( RID_TXT_QUERYFAXNUMBER ) );
QueryString aQuery( NULL, aTmpString, rNumber );
return aQuery.Execute();
}
- bool Sal_authenticateQuery( const OString& rServer, OString& rUserName, OString& rPassword )
+ bool SPA_DLLPUBLIC Sal_authenticateQuery( const OString& rServer, OString& rUserName, OString& rPassword )
{
bool bRet = false;
diff --git a/padmin/source/prtsetup.hxx b/padmin/source/prtsetup.hxx
index 72e3d81ee8d7..02a9325726fc 100644
--- a/padmin/source/prtsetup.hxx
+++ b/padmin/source/prtsetup.hxx
@@ -147,10 +147,10 @@ public:
void update();
- ULONG getLevel();
- ULONG getPDFDevice();
- ULONG getDepth() { return m_aDepthBox.GetSelectEntry().ToInt32(); }
- ULONG getColorDevice()
+ sal_uLong getLevel();
+ sal_uLong getPDFDevice();
+ sal_uLong getDepth() { return m_aDepthBox.GetSelectEntry().ToInt32(); }
+ sal_uLong getColorDevice()
{
String aSpace( m_aSpaceBox.GetSelectEntry() );
return aSpace == m_aSpaceColor ? 1 : ( aSpace == m_aSpaceGray ? -1 : 0 );
diff --git a/rsc/inc/rscall.h b/rsc/inc/rscall.h
index e556758054b8..4a1b20663904 100644
--- a/rsc/inc/rscall.h
+++ b/rsc/inc/rscall.h
@@ -95,7 +95,7 @@ struct RSCINST {
pClass = pCl;
pData = pClassData;
}
- BOOL IsInst() const { return( pData != NULL ); }
+ sal_Bool IsInst() const { return( pData != NULL ); }
};
/********************** S U B I N F O S T R U C T ************************/
diff --git a/rsc/inc/rscarray.hxx b/rsc/inc/rscarray.hxx
index e47c11e03777..6a5ebb934dc2 100644
--- a/rsc/inc/rscarray.hxx
+++ b/rsc/inc/rscarray.hxx
@@ -80,9 +80,9 @@ public:
pTypeClass = pClass;
}
virtual RscTop * GetTypeClass() const;
- RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, BOOL );
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, sal_Bool );
void Destroy( const RSCINST & rInst );
- virtual ERRTYPE GetValueEle( const RSCINST & rInst, INT32 lValue,
+ virtual ERRTYPE GetValueEle( const RSCINST & rInst, sal_Int32 lValue,
RscTop * pCreateClass,
RSCINST * pGetInst );
virtual ERRTYPE GetArrayEle( const RSCINST & rInst, Atom nId,
@@ -92,10 +92,10 @@ public:
// Gibt die Groesse der Klasse in Bytes
sal_uInt32 Size(){ return( nSize ); };
- BOOL IsConsistent( const RSCINST & rInst, RscInconsList * pList );
+ sal_Bool IsConsistent( const RSCINST & rInst, RscInconsList * pList );
virtual void SetToDefault( const RSCINST & rInst );
- BOOL IsDefault( const RSCINST & rInst );
- BOOL IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+ sal_Bool IsDefault( const RSCINST & rInst );
+ sal_Bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
virtual void WriteSrcHeader( const RSCINST & rInst, FILE * fOutput,
RscTypCont * pTC, sal_uInt32 nTab,
@@ -103,7 +103,7 @@ public:
void WriteSrc( const RSCINST & rInst, FILE * fOutput,
RscTypCont * pTC, sal_uInt32 nTab, const char * );
ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32, BOOL bExtra );
+ RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
virtual void WriteRcAccess( FILE * fOutput, RscTypCont * pTC,
const char * );
};
@@ -121,7 +121,7 @@ public:
RscTypCont * pTC, sal_uInt32 nTab, const char * );
virtual ERRTYPE WriteRcHeader( const RSCINST & rInst, RscWriteRc & aMem,
RscTypCont * pTC, const RscId & aId,
- sal_uInt32 nDeep, BOOL bExtra );
+ sal_uInt32 nDeep, sal_Bool bExtra );
};
diff --git a/rsc/inc/rscclass.hxx b/rsc/inc/rscclass.hxx
index 67cc59628fd0..e849a9969d07 100644
--- a/rsc/inc/rscclass.hxx
+++ b/rsc/inc/rscclass.hxx
@@ -37,7 +37,7 @@ class RscClass : public RscTop
{
protected:
struct RscClassInst{
- ULONG nVarDflt;
+ sal_uLong nVarDflt;
};
struct VARTYPE_STRUCT {
Atom nVarName; // Variablenname
@@ -54,13 +54,13 @@ protected:
sal_uInt32 nEntries; // Eintraege in pVarTypeList
VARTYPE_STRUCT * pVarTypeList; // Variablenliste
RSCINST GetInstData( CLASS_DATA pData, sal_uInt32 nEle,
- BOOL bGetCopy = FALSE );
+ sal_Bool bGetCopy = sal_False );
CLASS_DATA GetDfltData( sal_uInt32 nEle );
- BOOL IsDflt( CLASS_DATA pData, sal_uInt32 nEle );
- BOOL IsValueDflt( CLASS_DATA pData, sal_uInt32 nEle );
+ sal_Bool IsDflt( CLASS_DATA pData, sal_uInt32 nEle );
+ sal_Bool IsValueDflt( CLASS_DATA pData, sal_uInt32 nEle );
void SetVarDflt( CLASS_DATA pData, sal_uInt32 nEle,
- BOOL bSet );
- INT32 GetCorrectValues( const RSCINST & rInst, sal_uInt32 nVarPos,
+ sal_Bool bSet );
+ sal_Int32 GetCorrectValues( const RSCINST & rInst, sal_uInt32 nVarPos,
sal_uInt32 nTupelIdx, RscTypCont * pTC );
public:
RscClass( Atom nId, sal_uInt32 nTypId, RscTop * pSuperCl );
@@ -76,29 +76,29 @@ public:
virtual void EnumVariables( void * pData, VarEnumCallbackProc );
RSCINST GetVariable( const RSCINST & rInst, Atom nVarName,
const RSCINST & rInitInst,
- BOOL nInitDflt = FALSE,
+ sal_Bool nInitDflt = sal_False,
RscTop * pCreateClass = NULL );
RSCINST GetCopyVar( const RSCINST & rInst, Atom nVarName );
// Gibt die Groesse der Klasse in Bytes
sal_uInt32 Size(){ return( nSize ); };
- BOOL IsConsistent( const RSCINST & rInst, RscInconsList * pList );
+ sal_Bool IsConsistent( const RSCINST & rInst, RscInconsList * pList );
void SetToDefault( const RSCINST & rInst );
- BOOL IsDefault( const RSCINST & rInst );
- BOOL IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+ sal_Bool IsDefault( const RSCINST & rInst );
+ sal_Bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
void SetDefault( const RSCINST & rData, Atom nVarId );
using RscTop::GetDefault;
RSCINST GetDefault( Atom nVarId );
- RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, BOOL );
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, sal_Bool );
void Destroy( const RSCINST & rInst );
void WriteSrc( const RSCINST & rInst, FILE * fOutput,
RscTypCont * pTC, sal_uInt32 nTab, const char * );
ERRTYPE WriteInstRc( const RSCINST & rInst, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32, BOOL bExtra );
+ RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32, BOOL bExtra );
+ RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
void WriteSyntax( FILE * fOutput, RscTypCont * pTC );
void WriteRcAccess( FILE * fOutput, RscTypCont * pTC,
@@ -111,10 +111,10 @@ class RscSysDepend : public RscClass
public:
RscSysDepend( Atom nId, sal_uInt32 nTypId, RscTop * pSuper );
ERRTYPE WriteSysDependRc( const RSCINST &, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32, BOOL bExtra,
- BOOL bFirst = FALSE );
+ RscTypCont * pTC, sal_uInt32, sal_Bool bExtra,
+ sal_Bool bFirst = sal_False );
ERRTYPE WriteRc( const RSCINST &, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32, BOOL bExtra );
+ RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
};
class RscFirstSysDepend : public RscSysDepend
@@ -123,7 +123,7 @@ public:
RscFirstSysDepend( Atom nId, sal_uInt32 nTypId,
RscTop * pSuper );
ERRTYPE WriteRc( const RSCINST &, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32, BOOL bExtra );
+ RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
};
class RscTupel : public RscClass
diff --git a/rsc/inc/rscclobj.hxx b/rsc/inc/rscclobj.hxx
index 34bc38350399..75277813a8cb 100644
--- a/rsc/inc/rscclobj.hxx
+++ b/rsc/inc/rscclobj.hxx
@@ -51,23 +51,23 @@ DECLARE_LIST( RscInconsList, RscInconsistent * )
class ObjNode : public IdNode{
RscId aRscId; // Id der Resource
CLASS_DATA pRscObj;// pointer to a resourceobject
- ULONG lFileKey;// Dateischluessel
+ sal_uLong lFileKey;// Dateischluessel
protected:
using NameNode::Search;
public:
using NameNode::Insert;
- ObjNode( const RscId & rId, CLASS_DATA pData, ULONG lKey );
- ObjNode * DelObjNode( RscTop * pClass, ULONG lFileKey );
+ ObjNode( const RscId & rId, CLASS_DATA pData, sal_uLong lKey );
+ ObjNode * DelObjNode( RscTop * pClass, sal_uLong lFileKey );
sal_uInt32 GetId() const;
RscId GetRscId(){ return( aRscId ); }
- ULONG GetFileKey(){ return lFileKey; };
+ sal_uLong GetFileKey(){ return lFileKey; };
ObjNode* Search( const RscId &rName ) const{
// search the index in the b-tree
return( (ObjNode *)IdNode::Search( rName ) );
}
- BOOL Insert( ObjNode* pTN ){
+ sal_Bool Insert( ObjNode* pTN ){
// insert a new node in the b-tree
return( IdNode::Insert( (IdNode *)pTN ) );
}
@@ -75,7 +75,7 @@ public:
// get the Object from this Node
return( pRscObj );
}
- BOOL IsConsistent( RscInconsList * pList = NULL );
+ sal_Bool IsConsistent( RscInconsList * pList = NULL );
};
/******************* R e f N o d e ***************************************/
@@ -94,11 +94,11 @@ public:
// search the index in the b-tree
return( (RefNode *)IdNode::Search( typ ) );
};
- BOOL Insert( RefNode* pTN ){
+ sal_Bool Insert( RefNode* pTN ){
// insert a new node in the b-tree
return( IdNode::Insert( (IdNode *)pTN ) );
};
- BOOL PutObjNode( ObjNode * pPutObject );
+ sal_Bool PutObjNode( ObjNode * pPutObject );
// insert new node in b-tree pObjBiTree
ObjNode * GetObjNode( const RscId &rRscId );
diff --git a/rsc/inc/rscconst.hxx b/rsc/inc/rscconst.hxx
index 70612310fbab..a48ec3c05ab3 100644
--- a/rsc/inc/rscconst.hxx
+++ b/rsc/inc/rscconst.hxx
@@ -38,7 +38,7 @@ class RscConst : public RscTop
protected:
struct VarEle {
Atom nId; // Name der Konstante
- INT32 lValue; // Wert der Konstante
+ sal_Int32 lValue; // Wert der Konstante
};
VarEle * pVarArray; // Zeiger auf das Feld mit Konstanten
sal_uInt32 nEntries; // Anzahle der Eintraege im Feld
@@ -48,10 +48,10 @@ public:
virtual RSCCLASS_TYPE GetClassType() const;
sal_uInt32 GetEntryCount() const { return nEntries; }
// Die erlaubten Werte werden gesetzt
- ERRTYPE SetConstant( Atom nVarName, INT32 lValue );
+ ERRTYPE SetConstant( Atom nVarName, sal_Int32 lValue );
Atom GetConstant( sal_uInt32 nPos );
- BOOL GetConstValue( Atom nConstId, INT32 * pVal ) const;
- BOOL GetValueConst( INT32 nValue, Atom * pConstId ) const;
+ sal_Bool GetConstValue( Atom nConstId, sal_Int32 * pVal ) const;
+ sal_Bool GetValueConst( sal_Int32 nValue, Atom * pConstId ) const;
sal_uInt32 GetConstPos( Atom nConstId );
virtual void WriteSyntax( FILE * fOutput, RscTypCont * pTC );
virtual void WriteRcAccess( FILE * fOutput, RscTypCont * pTC,
@@ -62,34 +62,34 @@ public:
class RscEnum : public RscConst {
struct RscEnumInst {
sal_uInt32 nValue; // Position der Konstanten im Array
- BOOL bDflt; // Ist Default
+ sal_Bool bDflt; // Ist Default
};
sal_uInt32 nSize;
public:
RscEnum( Atom nId, sal_uInt32 nTypId );
- RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, BOOL );
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, sal_Bool );
sal_uInt32 Size(){ return nSize; }
virtual void SetToDefault( const RSCINST & rInst )
{
- ((RscEnumInst*)rInst.pData)->bDflt = TRUE;
+ ((RscEnumInst*)rInst.pData)->bDflt = sal_True;
}
- BOOL IsDefault( const RSCINST & rInst )
+ sal_Bool IsDefault( const RSCINST & rInst )
{
return( ((RscEnumInst*)rInst.pData)->bDflt );
};
// Als Default setzen
- BOOL IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+ sal_Bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
ERRTYPE SetConst( const RSCINST & rInst, Atom nValueId,
- INT32 nValue );
- ERRTYPE SetNumber( const RSCINST & rInst, INT32 nValue );
+ sal_Int32 nValue );
+ ERRTYPE SetNumber( const RSCINST & rInst, sal_Int32 nValue );
ERRTYPE GetConst( const RSCINST & rInst, Atom * );
- ERRTYPE GetNumber( const RSCINST & rInst, INT32 * nValue );
+ ERRTYPE GetNumber( const RSCINST & rInst, sal_Int32 * nValue );
void WriteSrc( const RSCINST &rInst, FILE * fOutput,
RscTypCont * pTC, sal_uInt32 nTab, const char * );
ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32, BOOL bExtra );
+ RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
};
class RscNameTable;
diff --git a/rsc/inc/rsccont.hxx b/rsc/inc/rsccont.hxx
index 49d2600d91df..668a40e0508e 100644
--- a/rsc/inc/rsccont.hxx
+++ b/rsc/inc/rsccont.hxx
@@ -41,7 +41,7 @@ struct ENTRY_STRUCT {
struct RscBaseContInst {
sal_uInt32 nEntries;
ENTRY_STRUCT * pEntries;
- BOOL bDflt;
+ sal_Bool bDflt;
};
class RscBaseCont : public RscTop
@@ -49,7 +49,7 @@ class RscBaseCont : public RscTop
protected:
RscTop * pTypeClass; // Typ der Eintraege
RscTop * pTypeClass1;// Zwei verschiedene Typen moeglich
- BOOL bNoId; // Keine Identifier
+ sal_Bool bNoId; // Keine Identifier
sal_uInt32 nSize; // Groesse der Instanzdaten dieser Klasse
// mit Superklassen
sal_uInt32 nOffInstData;// Offset auf eigen Instanzdaten
@@ -60,13 +60,13 @@ protected:
void ContWriteSrc( const RSCINST & rInst, FILE * fOutput,
RscTypCont * pTC, sal_uInt32 nTab, const char * );
ERRTYPE ContWriteRc( const RSCINST & rInst, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32, BOOL bExtra );
+ RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
void ContWriteRcAccess( FILE * fOutput, RscTypCont * pTC,
- const char *, BOOL nWriteSize );
+ const char *, sal_Bool nWriteSize );
public:
RscBaseCont( Atom nId, sal_uInt32 nTypId,
RscTop * pSuper = NULL,
- BOOL bNoId = TRUE );
+ sal_Bool bNoId = sal_True );
~RscBaseCont();
virtual RSCCLASS_TYPE GetClassType() const;
void SetTypeClass( RscTop * pClass, RscTop * pClass1 = NULL )
@@ -74,7 +74,7 @@ public:
pTypeClass = pClass;
pTypeClass1 = pClass1;
};
- RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, BOOL );
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, sal_Bool );
void Destroy( const RSCINST & rInst );
ERRTYPE GetElement( const RSCINST & rInst, const RscId & rEleName,
RscTop * pCreateClass, const RSCINST & rCreateInst,
@@ -89,19 +89,19 @@ public:
const RscId & rRscId);
SUBINFO_STRUCT GetInfoEle( const RSCINST & rInst, sal_uInt32 nPos );
ERRTYPE SetString( const RSCINST &, const char * pStr );
- ERRTYPE SetNumber( const RSCINST &, INT32 lValue );
- ERRTYPE SetBool( const RSCINST & rInst, BOOL bValue );
+ ERRTYPE SetNumber( const RSCINST &, sal_Int32 lValue );
+ ERRTYPE SetBool( const RSCINST & rInst, sal_Bool bValue );
ERRTYPE SetConst( const RSCINST & rInst, Atom nValueId,
- INT32 nValue );
+ sal_Int32 nValue );
ERRTYPE SetRef( const RSCINST & rInst, const RscId & rRefId );
// Gibt die Groesse der Klasse in Bytes
sal_uInt32 Size(){ return( nSize ); };
- BOOL IsConsistent( const RSCINST & rInst, RscInconsList * pList );
+ sal_Bool IsConsistent( const RSCINST & rInst, RscInconsList * pList );
void SetToDefault( const RSCINST & rInst );
- BOOL IsDefault( const RSCINST & rInst );
- BOOL IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+ sal_Bool IsDefault( const RSCINST & rInst );
+ sal_Bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
void Delete( const RSCINST & rInst, RscTop * pClass,
const RscId & rId );
@@ -110,7 +110,7 @@ public:
void WriteSrc( const RSCINST & rInst, FILE * fOutput,
RscTypCont * pTC, sal_uInt32 nTab, const char * );
ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32 , BOOL bExtra);
+ RscTypCont * pTC, sal_uInt32 , sal_Bool bExtra);
ERRTYPE WriteHxx( const RSCINST & rInst, FILE * fOutput,
RscTypCont * pTC, const RscId & rId );
ERRTYPE WriteCxx( const RSCINST & rInst, FILE * fOutput,
@@ -123,7 +123,7 @@ class RscContWriteSrc : public RscBaseCont
public:
RscContWriteSrc( Atom nId, sal_uInt32 nTypId,
RscTop * pSuper = NULL,
- BOOL bNoId = TRUE );
+ sal_Bool bNoId = sal_True );
void WriteSrc( const RSCINST & rInst, FILE * fOutput,
RscTypCont * pTC, sal_uInt32 nTab, const char * );
};
@@ -133,9 +133,9 @@ class RscCont : public RscContWriteSrc {
public:
RscCont( Atom nId, sal_uInt32 nTypId,
RscTop * pSuper = NULL,
- BOOL bNoId = TRUE );
+ sal_Bool bNoId = sal_True );
ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32, BOOL bExtra );
+ RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
void WriteRcAccess( FILE * fOutput, RscTypCont * pTC,
const char * );
};
@@ -145,9 +145,9 @@ class RscContExtraData : public RscContWriteSrc {
public:
RscContExtraData( Atom nId, sal_uInt32 nTypId,
RscTop * pSuper = NULL,
- BOOL bNoId = TRUE );
+ sal_Bool bNoId = sal_True );
ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32, BOOL bExtra );
+ RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
};
#endif //_RSCCONT_HXX
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index cbdf5a326a43..3e8b263a0399 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -79,7 +79,7 @@ class RscTypCont
ByteString aSearchPath; // Suchen der Bitmap, Icon, Pointer
ByteString aSysSearchPath; // aSearchPath plus language specific paths
sal_uInt32 nUniqueId; // eindeutiger Id fuer Systemresourcen
- ULONG nFilePos; // Position in der Datei ( MTF )
+ sal_uLong nFilePos; // Position in der Datei ( MTF )
sal_uInt32 nPMId; // eindeutiger Id fuer PM-Rseourcefile
// muss groesser als RSC_VERSIONCONTROL_ID sein
RscTop * pRoot; // Zeiger auf die Wurzel vom Typenbaum
@@ -145,8 +145,8 @@ class RscTypCont
Atom nSysWinId;
void Init(); // Initialisiert Klassen und Tabelle
- void SETCONST( RscConst *, const char *, UINT32 );
- void SETCONST( RscConst *, Atom, UINT32 );
+ void SETCONST( RscConst *, const char *, sal_uInt32 );
+ void SETCONST( RscConst *, Atom, sal_uInt32 );
RscEnum * InitLangType();
RscEnum * InitFieldUnitsType();
RscEnum * InitTimeFieldFormat();
@@ -265,7 +265,7 @@ class RscTypCont
void InsWinBit( RscTop * pClass, const ByteString & rName,
Atom nVal );
- void WriteInc( FILE * fOutput, ULONG lKey );
+ void WriteInc( FILE * fOutput, sal_uLong lKey );
public:
RscBool aBool;
@@ -296,7 +296,7 @@ public:
RscNameTable aNmTb; // Tabelle fuer Namen
RscFileTab aFileTab; // Tabelle der Dateinamen
sal_uInt32 nFlags;
- std::map<sal_uInt64, ULONG> aIdTranslator; //Ordnet Resourcetypen und Id's einen Id zu
+ std::map<sal_uInt64, sal_uLong> aIdTranslator; //Ordnet Resourcetypen und Id's einen Id zu
//(unter PM), oder eine Dateiposition (MTF)
RscTypCont( RscError *, RSCBYTEORDER_TYPE, const ByteString & rSearchPath, sal_uInt32 nFlags );
@@ -304,14 +304,14 @@ public:
Atom AddLanguage( const char* );
- BOOL IsPreload() const
- { return (nFlags & PRELOAD_FLAG) ? TRUE : FALSE; }
- BOOL IsSmart() const
- { return (nFlags & SMART_FLAG) ? TRUE : FALSE; }
- BOOL IsSysResTest() const
- { return (nFlags & NOSYSRESTEST_FLAG) ? FALSE : TRUE; }
- BOOL IsSrsDefault() const
- { return (nFlags & SRSDEFAULT_FLAG) ? TRUE : FALSE; }
+ sal_Bool IsPreload() const
+ { return (nFlags & PRELOAD_FLAG) ? sal_True : sal_False; }
+ sal_Bool IsSmart() const
+ { return (nFlags & SMART_FLAG) ? sal_True : sal_False; }
+ sal_Bool IsSysResTest() const
+ { return (nFlags & NOSYSRESTEST_FLAG) ? sal_False : sal_True; }
+ sal_Bool IsSrsDefault() const
+ { return (nFlags & SRSDEFAULT_FLAG) ? sal_True : sal_False; }
ByteString ChangeLanguage( const ByteString& rNewLang );
const std::vector< sal_uInt32 >& GetFallbacks() const
{ return aLangFallbacks; }
@@ -337,23 +337,23 @@ public:
CLASS_DATA Search( Atom typ, const RscId & rId );
void Delete( Atom typ, const RscId & rId );
// loescht alle Resourceobjekte diese Datei
- void Delete( ULONG lFileKey );
+ void Delete( sal_uLong lFileKey );
RscTop * GetRoot() { return( pRoot ); };
sal_uInt32 PutSysName( sal_uInt32 nRscTyp, char * pName, sal_uInt32 nConst,
- sal_uInt32 nId, BOOL bFirst );
+ sal_uInt32 nId, sal_Bool bFirst );
void ClearSysNames();
ERRTYPE WriteRc( WriteRcContext& rContext );
- void WriteSrc( FILE * fOutput, ULONG nFileIndex,
- CharSet nCharSet, BOOL bName = TRUE );
- ERRTYPE WriteHxx( FILE * fOutput, ULONG nFileKey);
- ERRTYPE WriteCxx( FILE * fOutput, ULONG nFileKey,
+ void WriteSrc( FILE * fOutput, sal_uLong nFileIndex,
+ CharSet nCharSet, sal_Bool bName = sal_True );
+ ERRTYPE WriteHxx( FILE * fOutput, sal_uLong nFileKey);
+ ERRTYPE WriteCxx( FILE * fOutput, sal_uLong nFileKey,
const ByteString & rHxxName );
void WriteSyntax( FILE * fOutput );
void WriteRcCtor( FILE * fOutput );
- void FillNameIdList( REResourceList * pList, ULONG lFileKey );
- BOOL MakeConsistent( RscInconsList * pList );
+ void FillNameIdList( REResourceList * pList, sal_uLong lFileKey );
+ sal_Bool MakeConsistent( RscInconsList * pList );
sal_uInt32 PutTranslatorKey( sal_uInt64 nKey );
- void IncFilePos( ULONG nOffset ){ nFilePos += nOffset; }
+ void IncFilePos( sal_uLong nOffset ){ nFilePos += nOffset; }
};
#endif
diff --git a/rsc/inc/rscdef.hxx b/rsc/inc/rscdef.hxx
index a21b03685325..8900c5708c99 100644
--- a/rsc/inc/rscdef.hxx
+++ b/rsc/inc/rscdef.hxx
@@ -56,37 +56,37 @@ public:
} aExp;
char cType;
char cUnused;
- BOOL IsNumber() const { return( RSCEXP_LONG == cType ); }
- BOOL IsExpression()const { return( RSCEXP_EXP == cType ); }
- BOOL IsDefinition()const { return( RSCEXP_DEF == cType ); }
- BOOL IsNothing() const { return( RSCEXP_NOTHING == cType ); }
- void SetLong( INT32 lValue ){
+ sal_Bool IsNumber() const { return( RSCEXP_LONG == cType ); }
+ sal_Bool IsExpression()const { return( RSCEXP_EXP == cType ); }
+ sal_Bool IsDefinition()const { return( RSCEXP_DEF == cType ); }
+ sal_Bool IsNothing() const { return( RSCEXP_NOTHING == cType ); }
+ void SetLong( sal_Int32 lValue ){
aExp.aLong.nHi = (short)(lValue >> 16);
aExp.aLong.nLo = (unsigned short)lValue;
cType = RSCEXP_LONG;
}
- INT32 GetLong() const{
+ sal_Int32 GetLong() const{
return aExp.aLong.nLo |
- ((INT32)aExp.aLong.nHi << 16);
+ ((sal_Int32)aExp.aLong.nHi << 16);
}
- BOOL Evaluate( INT32 * pValue ) const;
+ sal_Bool Evaluate( sal_Int32 * pValue ) const;
void GetMacro( ByteString & ) const;
};
/*********** R s c I d ***************************************************/
class RscId
{
- static BOOL bNames;// FALSE, bei den Namenoperation nur Zahlen
+ static sal_Bool bNames;// sal_False, bei den Namenoperation nur Zahlen
public:
RscExpType aExp; // Zahl, Define oder Ausdruck
- INT32 GetNumber() const;
+ sal_Int32 GetNumber() const;
void Create( const RscExpType & rExpType );
void Create(){ aExp.cType = RSCEXP_NOTHING; }
RscId() { Create(); }
RscId( RscDefine * pEle );
- RscId( INT32 lNumber )
+ RscId( sal_Int32 lNumber )
{ aExp.SetLong( lNumber ); }
RscId( const RscExpType & rExpType )
@@ -102,19 +102,19 @@ public:
RscId& operator = ( const RscId& rRscId );
- static BOOL IsSetNames();
- static void SetNames( BOOL bSet = TRUE );
- operator INT32() const; // Gibt Nummer zurueck
+ static sal_Bool IsSetNames();
+ static void SetNames( sal_Bool bSet = sal_True );
+ operator sal_Int32() const; // Gibt Nummer zurueck
ByteString GetName() const; // Gibt den Namen des Defines zurueck
ByteString GetMacro() const; // Gibt das Macro zurueck
- BOOL operator < ( const RscId& rRscId ) const;
- BOOL operator > ( const RscId& rRscId ) const;
- BOOL operator == ( const RscId& rRscId ) const;
- BOOL operator <= ( const RscId& rRscId ) const
+ sal_Bool operator < ( const RscId& rRscId ) const;
+ sal_Bool operator > ( const RscId& rRscId ) const;
+ sal_Bool operator == ( const RscId& rRscId ) const;
+ sal_Bool operator <= ( const RscId& rRscId ) const
{ return !(operator > ( rRscId )); }
- BOOL operator >= ( const RscId& rRscId ) const
+ sal_Bool operator >= ( const RscId& rRscId ) const
{ return !(operator < ( rRscId )); }
- BOOL IsId() const { return !aExp.IsNothing(); }
+ sal_Bool IsId() const { return !aExp.IsNothing(); }
};
/*********** R s c D e f i n e *******************************************/
@@ -125,15 +125,15 @@ friend class RscDefineList;
friend class RscDefTree;
friend class RscExpression;
friend class RscId;
- ULONG lFileKey; // zu welcher Datei gehoert das Define
+ sal_uLong lFileKey; // zu welcher Datei gehoert das Define
sal_uInt32 nRefCount; // Wieviele Referenzen auf dieses Objekt
- INT32 lId; // Identifier
+ sal_Int32 lId; // Identifier
RscExpression * pExp; // Ausdruck
protected:
- RscDefine( ULONG lFileKey, const ByteString & rDefName,
- INT32 lDefId );
- RscDefine( ULONG lFileKey, const ByteString & rDefName,
+ RscDefine( sal_uLong lFileKey, const ByteString & rDefName,
+ sal_Int32 lDefId );
+ RscDefine( sal_uLong lFileKey, const ByteString & rDefName,
RscExpression * pExpression );
~RscDefine();
void IncRef(){ nRefCount++; }
@@ -142,14 +142,14 @@ protected:
void DefineToNumber();
void SetName( const ByteString & rNewName ){ aName = rNewName; }
void ChangeMacro( RscExpression * pExpression );
- void ChangeMacro( INT32 lIdentifier );
+ void ChangeMacro( sal_Int32 lIdentifier );
using StringNode::Search;
public:
RscDefine * Search( const char * );
- ULONG GetFileKey() const { return lFileKey; }
- BOOL Evaluate();
- INT32 GetNumber() const { return lId; }
+ sal_uLong GetFileKey() const { return lFileKey; }
+ sal_Bool Evaluate();
+ sal_Int32 GetNumber() const { return lId; }
ByteString GetMacro();
};
@@ -160,14 +160,14 @@ friend class RscFile;
friend class RscFileTab;
private:
// pExpression wird auf jedenfall Eigentum der Liste
- RscDefine * New( ULONG lFileKey, const ByteString & rDefName,
- INT32 lDefId, ULONG lPos );
- RscDefine * New( ULONG lFileKey, const ByteString & rDefName,
- RscExpression * pExpression, ULONG lPos );
- BOOL Befor( const RscDefine * pFree, const RscDefine * pDepend );
- BOOL Remove( RscDefine * pDef );
- BOOL Remove( ULONG nIndex );
- BOOL Remove();
+ RscDefine * New( sal_uLong lFileKey, const ByteString & rDefName,
+ sal_Int32 lDefId, sal_uLong lPos );
+ RscDefine * New( sal_uLong lFileKey, const ByteString & rDefName,
+ RscExpression * pExpression, sal_uLong lPos );
+ sal_Bool Befor( const RscDefine * pFree, const RscDefine * pDepend );
+ sal_Bool Remove( RscDefine * pDef );
+ sal_Bool Remove( sal_uLong nIndex );
+ sal_Bool Remove();
public:
void WriteAll( FILE * fOutput );
};
@@ -182,16 +182,16 @@ public:
RscExpression( RscExpType aLE, char cOp,
RscExpType aRE );
~RscExpression();
- BOOL Evaluate( INT32 * pValue );
+ sal_Bool Evaluate( sal_Int32 * pValue );
ByteString GetMacro();
};
/********************** R S C F I L E ************************************/
class RscDepend {
- ULONG lKey;
+ sal_uLong lKey;
public:
- RscDepend( ULONG lIncKey ){ lKey = lIncKey; };
- ULONG GetFileKey(){ return lKey; }
+ RscDepend( sal_uLong lIncKey ){ lKey = lIncKey; };
+ sal_uLong GetFileKey(){ return lKey; }
};
DECLARE_LIST( RscDependList, RscDepend * )
@@ -199,22 +199,22 @@ DECLARE_LIST( RscDependList, RscDepend * )
class RscFile : public RscDependList
{
friend class RscFileTab;
- BOOL bIncFile; // Ist es eine Include-Datei
+ sal_Bool bIncFile; // Ist es eine Include-Datei
public:
- BOOL bLoaded; // Ist die Datei geladen
- BOOL bScanned; // Wurde Datei nach Inclide abgesucht
- BOOL bDirty; // Dirty-Flag
+ sal_Bool bLoaded; // Ist die Datei geladen
+ sal_Bool bScanned; // Wurde Datei nach Inclide abgesucht
+ sal_Bool bDirty; // Dirty-Flag
ByteString aFileName; // Name der Datei
ByteString aPathName; // Pfad und Name der Datei
RscDefineList aDefLst; // Liste der Defines
RscFile();
~RscFile();
- BOOL InsertDependFile( ULONG lDepFile, ULONG lPos );
- void RemoveDependFile( ULONG lDepFile );
- BOOL Depend( ULONG lDepend, ULONG lFree );
- void SetIncFlag(){ bIncFile = TRUE; };
- BOOL IsIncFile(){ return bIncFile; };
+ sal_Bool InsertDependFile( sal_uLong lDepFile, sal_uLong lPos );
+ void RemoveDependFile( sal_uLong lDepFile );
+ sal_Bool Depend( sal_uLong lDepend, sal_uLong lFree );
+ void SetIncFlag(){ bIncFile = sal_True; };
+ sal_Bool IsIncFile(){ return bIncFile; };
};
DECLARE_UNIQUEINDEX( RscSubFileTab, RscFile * )
@@ -223,11 +223,11 @@ DECLARE_UNIQUEINDEX( RscSubFileTab, RscFile * )
class RscDefTree {
RscDefine * pDefRoot;
public:
- static BOOL Evaluate( RscDefine * pDef );
+ static sal_Bool Evaluate( RscDefine * pDef );
RscDefTree(){ pDefRoot = NULL; }
~RscDefTree();
void Remove();
- BOOL Evaluate();
+ sal_Bool Evaluate();
RscDefine * Search( const char * pName );
void Insert( RscDefine * pDef );
void Remove( RscDefine * pDef );
@@ -235,40 +235,40 @@ public:
class RscFileTab : public RscSubFileTab {
RscDefTree aDefTree;
- ULONG Find( const ByteString & rName );
+ sal_uLong Find( const ByteString & rName );
public:
RscFileTab();
~RscFileTab();
RscDefine * FindDef( const char * );
RscDefine * FindDef( const ByteString& rStr ) { return FindDef( rStr.GetBuffer() ); }
- RscDefine * FindDef( ULONG lKey, const ByteString & );
+ RscDefine * FindDef( sal_uLong lKey, const ByteString & );
- BOOL Depend( ULONG lDepend, ULONG lFree );
- BOOL TestDef( ULONG lFileKey, ULONG lPos,
+ sal_Bool Depend( sal_uLong lDepend, sal_uLong lFree );
+ sal_Bool TestDef( sal_uLong lFileKey, sal_uLong lPos,
const RscDefine * pDefDec );
- BOOL TestDef( ULONG lFileKey, ULONG lPos,
+ sal_Bool TestDef( sal_uLong lFileKey, sal_uLong lPos,
const RscExpression * pExpDec );
- RscDefine * NewDef( ULONG lKey, const ByteString & rDefName,
- INT32 lId, ULONG lPos );
- RscDefine * NewDef( ULONG lKey, const ByteString & rDefName,
- RscExpression *, ULONG lPos );
+ RscDefine * NewDef( sal_uLong lKey, const ByteString & rDefName,
+ sal_Int32 lId, sal_uLong lPos );
+ RscDefine * NewDef( sal_uLong lKey, const ByteString & rDefName,
+ RscExpression *, sal_uLong lPos );
- BOOL ChangeDef( const ByteString & rDefName, INT32 lId );
- BOOL ChangeDef( const ByteString & rDefName, RscExpression * );
+ sal_Bool ChangeDef( const ByteString & rDefName, sal_Int32 lId );
+ sal_Bool ChangeDef( const ByteString & rDefName, RscExpression * );
- BOOL IsDefUsed( const ByteString & );
+ sal_Bool IsDefUsed( const ByteString & );
void DeleteDef( const ByteString & );
- BOOL ChangeDefName( const ByteString & rDefName,
+ sal_Bool ChangeDefName( const ByteString & rDefName,
const ByteString & rNewName );
// Alle Defines die in dieser Datei Definiert sind loeschen
- void DeleteFileContext( ULONG lKey );
- void DeleteFile( ULONG lKey );
- ULONG NewCodeFile( const ByteString & rName );
- ULONG NewIncFile( const ByteString & rName, const ByteString & rPath );
- RscFile * GetFile( ULONG lFileKey ){ return Get( lFileKey ); }
+ void DeleteFileContext( sal_uLong lKey );
+ void DeleteFile( sal_uLong lKey );
+ sal_uLong NewCodeFile( const ByteString & rName );
+ sal_uLong NewIncFile( const ByteString & rName, const ByteString & rPath );
+ RscFile * GetFile( sal_uLong lFileKey ){ return Get( lFileKey ); }
};
#endif // _RSCDEF_HXX
diff --git a/rsc/inc/rscerror.h b/rsc/inc/rscerror.h
index f3a4428127f3..41f012040a0c 100644
--- a/rsc/inc/rscerror.h
+++ b/rsc/inc/rscerror.h
@@ -105,9 +105,9 @@ public:
ERRTYPE( const ERRTYPE & rErr ) { nError = rErr.nError; };
ERRTYPE& operator = ( const ERRTYPE & rError );
operator sal_uInt32() const { return( nError ); }
- BOOL IsError() const { return( nError <= ERR_ERROREND ); }
- BOOL IsOk() const { return( !IsError() ); }
- BOOL IsWarning() const {
+ sal_Bool IsError() const { return( nError <= ERR_ERROREND ); }
+ sal_Bool IsOk() const { return( !IsError() ); }
+ sal_Bool IsWarning() const {
return( nError >= ERR_WARNINGSTART && nError <= ERR_WARNINGEND );
};
void Clear(){ nError = ERR_OK; }
diff --git a/rsc/inc/rscflag.hxx b/rsc/inc/rscflag.hxx
index d517e0e0d2b3..2c36fdde6221 100644
--- a/rsc/inc/rscflag.hxx
+++ b/rsc/inc/rscflag.hxx
@@ -41,30 +41,30 @@ class RscFlag : public RscConst {
RSCINST CreateBasic( RSCINST * pInst );
public:
RscFlag( Atom nId, sal_uInt32 nTypId );
- RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, BOOL );
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, sal_Bool );
RSCINST CreateClient( RSCINST * pInst, const RSCINST & rDflt,
- BOOL bOwnClass, Atom nConsId );
+ sal_Bool bOwnClass, Atom nConsId );
sal_uInt32 Size();
virtual void SetToDefault( const RSCINST & rInst );
- BOOL IsDefault( const RSCINST & rInst );
- BOOL IsDefault( const RSCINST & rInst, Atom nConstId );
+ sal_Bool IsDefault( const RSCINST & rInst );
+ sal_Bool IsDefault( const RSCINST & rInst, Atom nConstId );
// Ist das Flag gesetzt
- BOOL IsSet( const RSCINST & rInst, Atom nConstId );
+ sal_Bool IsSet( const RSCINST & rInst, Atom nConstId );
// Als Default setzen
- BOOL IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
- BOOL IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef,
+ sal_Bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+ sal_Bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef,
Atom nConstId );
ERRTYPE SetConst( const RSCINST & rInst, Atom nValueId,
- INT32 nValue );
+ sal_Int32 nValue );
ERRTYPE SetNotConst( const RSCINST & rInst, Atom nConstId );
void WriteSrc( const RSCINST & rInst, FILE * fOutput,
RscTypCont * pTC, sal_uInt32 nTab, const char * );
ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32, BOOL bExtra );
+ RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
};
/******************* R s c C l i e n t ***********************************/
@@ -76,26 +76,26 @@ public:
RscClient( Atom nId, sal_uInt32 nTypId, RscFlag * pClass,
Atom nConstantId );
virtual RSCCLASS_TYPE GetClassType() const;
- RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, BOOL );
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, sal_Bool );
sal_uInt32 Size(){ return( pRefClass->Size() ); };
// Eine Zuweisung an eine Variable
- BOOL IsDefault( const RSCINST & rInst ){
+ sal_Bool IsDefault( const RSCINST & rInst ){
return( pRefClass->IsDefault( rInst, nConstId ) );
};
// Als Default setzen
- BOOL IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ){
+ sal_Bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ){
return pRefClass->IsValueDefault( rInst,
pDef, nConstId );
}
- ERRTYPE SetBool( const RSCINST & rInst, BOOL bValue ){
+ ERRTYPE SetBool( const RSCINST & rInst, sal_Bool bValue ){
if( bValue )
return( pRefClass->SetConst( rInst, nConstId, bValue ) );
else
return( pRefClass->
SetNotConst( rInst, nConstId ) );
};
- ERRTYPE GetBool( const RSCINST & rInst, BOOL * pB ){
+ ERRTYPE GetBool( const RSCINST & rInst, sal_Bool * pB ){
*pB = pRefClass->IsSet( rInst, nConstId );
return( ERR_OK );
};
diff --git a/rsc/inc/rscinst.hxx b/rsc/inc/rscinst.hxx
index 6cdfac1173e7..107060dd863c 100644
--- a/rsc/inc/rscinst.hxx
+++ b/rsc/inc/rscinst.hxx
@@ -59,7 +59,7 @@ public:
RscInst& operator = ( const RscInst& rRscInst );
~RscInst();
void OverWrite( RscInstCopy & rInst );
- BOOL IsInst() const { return( aInst.IsInst() ); }
+ sal_Bool IsInst() const { return( aInst.IsInst() ); }
// Listen Methoden
ERRTYPE SetElement( const RscId & rName, RscInstCopy & rInst );
@@ -75,17 +75,17 @@ public:
ERRTYPE SetVar( Atom nVarName, RscInstCopy & rInst );
ERRTYPE SetConst( Atom nVarName, Atom nConstId );
- ERRTYPE SetBool( Atom nVarName, BOOL );
+ ERRTYPE SetBool( Atom nVarName, sal_Bool );
// Hack fuer X, Y, Width, Height
static ERRTYPE SetCorrectValues( RSCINST & rInst, RSCINST & rVarInst,
- INT32 lValue, sal_uInt32 nTupelIdx );
- ERRTYPE SetNumber( Atom nVarName, INT32 );
+ sal_Int32 lValue, sal_uInt32 nTupelIdx );
+ ERRTYPE SetNumber( Atom nVarName, sal_Int32 );
ERRTYPE SetString( Atom nVarName, const char * );
ERRTYPE SetConst( Atom nConstId );
- ERRTYPE SetBool( BOOL );
- ERRTYPE SetNumber( INT32 );
+ ERRTYPE SetBool( sal_Bool );
+ ERRTYPE SetNumber( sal_Int32 );
ERRTYPE SetString( const char * );
ERRTYPE SetRef( const RscId & rRscId );
ERRTYPE SetDefault( Atom nVarName );
@@ -93,17 +93,17 @@ public:
RscInst GetVar( Atom nVarName );
Atom GetConst( Atom nVarName = InvalidAtom );
sal_uInt32 GetConstPos( Atom nVarName = InvalidAtom );
- BOOL GetBool( Atom nVarName = InvalidAtom );
+ sal_Bool GetBool( Atom nVarName = InvalidAtom );
// Hack fuer X, Y, Width, Height
- static INT32 GetCorrectValues( RSCINST & rInst, RSCINST & rVarInst,
+ static sal_Int32 GetCorrectValues( RSCINST & rInst, RSCINST & rVarInst,
sal_uInt32 nTupelIdx );
- INT32 GetNumber( Atom nVarName = InvalidAtom );
+ sal_Int32 GetNumber( Atom nVarName = InvalidAtom );
const char *GetString( Atom nVarName = InvalidAtom );
RscId GetRef();
- BOOL IsDefault( Atom nVarName );
- BOOL IsConsistent( RscInconsList * pList );
+ sal_Bool IsDefault( Atom nVarName );
+ sal_Bool IsConsistent( RscInconsList * pList );
Atom GetClassEnum( Atom nVarName, sal_uInt32 nPos );
Atom GetClassEnum( sal_uInt32 nPos );
@@ -148,62 +148,62 @@ public:
// Konvertiert einen Namen in einen Typ
RscTop* GetClassType( Atom nClassName );
// Instanz einer Klasse erzeugen
- BOOL MakeConsistent( RscInconsList * pList );
+ sal_Bool MakeConsistent( RscInconsList * pList );
// Array mit Dateinamen
RscFileTab* GetFileTab();
// Eine Dateinamen-Instanz holen
- RscFile * GetFileStruct( ULONG lKey );
+ RscFile * GetFileStruct( sal_uLong lKey );
- ULONG AddSrcFile( const ByteString & rFileName );
- ULONG AddHrcFile( const ByteString & rFileName );
+ sal_uLong AddSrcFile( const ByteString & rFileName );
+ sal_uLong AddHrcFile( const ByteString & rFileName );
// Traegt die Include-Dateien in die Abhaengigkeitsliste
// von lFileKey ein
- void ScanForIncFiles( ULONG lFileKey );
- void RemoveFile( ULONG lKey );
+ void ScanForIncFiles( sal_uLong lFileKey );
+ void RemoveFile( sal_uLong lKey );
// Suche ueber alle DEFINES
RscDefine * FindDef( const ByteString & rName );
- ULONG GetFileKey( const ByteString & rFileName );
+ sal_uLong GetFileKey( const ByteString & rFileName );
};
class RscHrc
{
protected:
- ULONG lFileKey; // Index der Instanz
+ sal_uLong lFileKey; // Index der Instanz
RscDataBase * pDataBase;// Datenbasis
public:
// Kompilerinstanz erzeugen
- RscHrc( RscDataBase * pDBase, ULONG lKey );
+ RscHrc( RscDataBase * pDBase, sal_uLong lKey );
~RscHrc();
// Daten von Datei uebernehmen
ERRTYPE ReadFile();
- ULONG GetFileKey() const { return lFileKey; }
+ sal_uLong GetFileKey() const { return lFileKey; }
- void SetDirty( BOOL bSet );
- BOOL IsDirty();
+ void SetDirty( sal_Bool bSet );
+ sal_Bool IsDirty();
void SetPathName( const ByteString & );
ByteString GetPathName();
void SetFileName( const ByteString & );
ByteString GetFileName();
//Depend-Datei anhaengen
- void InsertDepend( ULONG lKey, ULONG lPos );
+ void InsertDepend( sal_uLong lKey, sal_uLong lPos );
// DefineList holen
RscDefineList * GetDefineList();
// Suche ueber all DEFINES im Zugriff
RscDefine * FindDef( const ByteString & rName );
- ERRTYPE NewDef( const ByteString & rMacroName, INT32 lValue,
- ULONG lPos );
+ ERRTYPE NewDef( const ByteString & rMacroName, sal_Int32 lValue,
+ sal_uLong lPos );
ERRTYPE NewDef( const ByteString & rMacroName, const ByteString & rMacro,
- ULONG lPos );
- ERRTYPE ChangeDef( const ByteString & rMacroName, INT32 lValue );
+ sal_uLong lPos );
+ ERRTYPE ChangeDef( const ByteString & rMacroName, sal_Int32 lValue );
ERRTYPE ChangeDef( const ByteString & rMacroName,
const ByteString & rMacro );
- BOOL IsDefUsed( const ByteString & );
+ sal_Bool IsDefUsed( const ByteString & );
void DeleteDef( const ByteString & rMacroName );
ERRTYPE ChangeDefName( const ByteString & rMacroName,
const ByteString & rNewName );
@@ -220,7 +220,7 @@ public:
class RscSrc : public RscHrc {
public:
// Kompilerinstanz erzeugen
- RscSrc( RscDataBase * pDBase, ULONG lKey );
+ RscSrc( RscDataBase * pDBase, sal_uLong lKey );
~RscSrc();
diff --git a/rsc/inc/rsckey.hxx b/rsc/inc/rsckey.hxx
index 717be1009154..221512e73eaf 100644
--- a/rsc/inc/rsckey.hxx
+++ b/rsc/inc/rsckey.hxx
@@ -39,13 +39,13 @@ typedef struct {
} KEY_STRUCT;
class RscNameTable {
- BOOL bSort; //soll bei jedem einfuegen sortiert werden?
+ sal_Bool bSort; //soll bei jedem einfuegen sortiert werden?
sal_uInt32 nEntries; //Anzahl der Eintr�ge
KEY_STRUCT * pTable;
public:
RscNameTable();
~RscNameTable();
- void SetSort( BOOL bSorted = TRUE );
+ void SetSort( sal_Bool bSorted = sal_True );
Atom Put( Atom nName, sal_uInt32 nTyp, long nValue );
Atom Put( Atom nName, sal_uInt32 nTyp );
Atom Put( const char * pName, sal_uInt32 nTyp, long nValue );
@@ -53,8 +53,8 @@ public:
Atom Put( Atom nName, sal_uInt32 nTyp, RscTop * pClass );
Atom Put( const char * pName, sal_uInt32 nTyp, RscTop * pClass );
- // TRUE, wurde gefunden
- BOOL Get( Atom nName, KEY_STRUCT * pEle );
+ // sal_True, wurde gefunden
+ sal_Bool Get( Atom nName, KEY_STRUCT * pEle );
};
diff --git a/rsc/inc/rsclst.hxx b/rsc/inc/rsclst.hxx
index 89e4bfda2402..942205c5671e 100644
--- a/rsc/inc/rsclst.hxx
+++ b/rsc/inc/rsclst.hxx
@@ -43,14 +43,14 @@ protected:
REResourceList* pParent;
RscId aRscId; //Id und Name des Resourceobjektes
ByteString aClassName;
- BOOL bVisible;
+ sal_Bool bVisible;
public:
REResourceList();
REResourceList( REResourceList * pParentList,
ByteString& rClassName,
const RscId & rResourceID,
- BOOL bVisible = FALSE );
+ sal_Bool bVisible = sal_False );
~REResourceList();
REResourceList* GetParent() { return pParent; }
@@ -59,9 +59,9 @@ public:
RscId GetRscId() { return aRscId; }
void SetRscId( const RscId & rId ){ aRscId = rId; }
- void SetVisible( BOOL bVis )
+ void SetVisible( sal_Bool bVis )
{ bVisible = bVis; }
- BOOL IsVisible() { return bVisible; }
+ sal_Bool IsVisible() { return bVisible; }
};
#endif // _RSCLST_HXX
diff --git a/rsc/inc/rscmgr.hxx b/rsc/inc/rscmgr.hxx
index b8c0e43031ee..43c2b9720958 100644
--- a/rsc/inc/rscmgr.hxx
+++ b/rsc/inc/rscmgr.hxx
@@ -37,8 +37,8 @@
class RscMgr : public RscClass {
struct RscMgrInst {
RscId aRefId; // nRefId = Referenz Identifier
- BOOL bDflt; // Ist Default
- void Create(){ aRefId.Create(); bDflt = TRUE; }
+ sal_Bool bDflt; // Ist Default
+ void Create(){ aRefId.Create(); bDflt = sal_True; }
void Destroy(){ aRefId.Destroy(); }
};
ERRTYPE IsToDeep( const RSCINST & rInst, sal_uInt32 nDeep = 0 );
@@ -46,10 +46,10 @@ public:
RscMgr( Atom nId, sal_uInt32 nTypId, RscTop * pSuperCl );
void SetToDefault( const RSCINST & rInst );
- BOOL IsDefault( const RSCINST & rInst );
- BOOL IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+ sal_Bool IsDefault( const RSCINST & rInst );
+ sal_Bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
- RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, BOOL );
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, sal_Bool );
void Destroy( const RSCINST & rInst );
sal_uInt32 Size();
void WriteSrcHeader( const RSCINST & aInst, FILE * fOutput,
@@ -60,9 +60,9 @@ public:
RscTypCont * pTC, sal_uInt32 nTab, const char * );
ERRTYPE WriteRcHeader( const RSCINST & rInst, RscWriteRc & aMem,
RscTypCont * pTC, const RscId & rId,
- sal_uInt32, BOOL bExtra );
+ sal_uInt32, sal_Bool bExtra );
ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32, BOOL bExtra );
+ RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
ERRTYPE WriteHxxHeader( const RSCINST & rInst, FILE * fOutput,
RscTypCont * pTC, const RscId & rId );
ERRTYPE WriteHxx( const RSCINST & rInst, FILE * fOutput,
@@ -71,7 +71,7 @@ public:
RscTypCont * pTC, const RscId & rId );
ERRTYPE WriteCxx( const RSCINST & rInst, FILE * fOutput,
RscTypCont * pTC, const RscId & rId );
- BOOL IsConsistent( const RSCINST & rInst,
+ sal_Bool IsConsistent( const RSCINST & rInst,
RscInconsList * pList = NULL );
ERRTYPE GetRef( const RSCINST & rInst, RscId * );
ERRTYPE SetRef( const RSCINST & rInst, const RscId & rRefId );
diff --git a/rsc/inc/rscpar.hxx b/rsc/inc/rscpar.hxx
index 989ec924550c..952c4670616c 100644
--- a/rsc/inc/rscpar.hxx
+++ b/rsc/inc/rscpar.hxx
@@ -41,10 +41,10 @@ class RscFileInst
ERRTYPE aFirstError;// Erster Fehler
sal_uInt32 nErrorLine; // Zeile des ersten Fehlers
sal_uInt32 nErrorPos; // Position des ersten Fehlers
- BOOL bIncLine; // Muss Zeilennummer incrementiert werden
+ sal_Bool bIncLine; // Muss Zeilennummer incrementiert werden
sal_uInt32 nLineNo; // Zeile in der Eingabedatei
- ULONG lFileIndex; // Index auf Eingabedatei
- ULONG lSrcIndex; // Index auf Basisdatei
+ sal_uLong lFileIndex; // Index auf Eingabedatei
+ sal_uLong lSrcIndex; // Index auf Basisdatei
FILE * fInputFile; // Eingabedatei
char * pInput; // Lesepuffer
sal_uInt32 nInputBufLen; // Laenge des Lesepuffers
@@ -54,20 +54,20 @@ class RscFileInst
sal_uInt32 nLineBufLen;//Lange des Zeilenpuffres
sal_uInt32 nScanPos; // Position in der Zeile
int cLastChar;
- BOOL bEof;
+ sal_Bool bEof;
public:
RscTypCont * pTypCont;
void Init(); // ctor initialisieren
- RscFileInst( RscTypCont * pTC, ULONG lIndexSrc,
- ULONG lFileIndex, FILE * fFile );
- RscFileInst( RscTypCont * pTC, ULONG lIndexSrc,
- ULONG lFileIndex, const ByteString & );
+ RscFileInst( RscTypCont * pTC, sal_uLong lIndexSrc,
+ sal_uLong lFileIndex, FILE * fFile );
+ RscFileInst( RscTypCont * pTC, sal_uLong lIndexSrc,
+ sal_uLong lFileIndex, const ByteString & );
~RscFileInst();
- BOOL IsEof() const { return bEof; }
- void SetFileIndex( ULONG lFIndex ) { lFileIndex = lFIndex; }
- ULONG GetFileIndex() { return( lFileIndex ); }
- ULONG GetSrcIndex() { return( lSrcIndex ); }
+ sal_Bool IsEof() const { return bEof; }
+ void SetFileIndex( sal_uLong lFIndex ) { lFileIndex = lFIndex; }
+ sal_uLong GetFileIndex() { return( lFileIndex ); }
+ sal_uLong GetSrcIndex() { return( lSrcIndex ); }
void SetLineNo( sal_uInt32 nLine ) { nLineNo = nLine; }
sal_uInt32 GetLineNo() { return( nLineNo ); }
sal_uInt32 GetScanPos() { return( nScanPos ); }
diff --git a/rsc/inc/rscrange.hxx b/rsc/inc/rscrange.hxx
index 96559037e51f..c23b2b97e715 100644
--- a/rsc/inc/rscrange.hxx
+++ b/rsc/inc/rscrange.hxx
@@ -38,36 +38,36 @@ class RscRange : public RscTop
protected:
struct RscRangeInst {
sal_uInt16 nValue; // nValue = Ausgangswert - nMin
- BOOL bDflt; // Ist Default
+ sal_Bool bDflt; // Ist Default
};
- INT32 nMin; // Minimum des Bereiches
- INT32 nMax; // Maximum des Bereiches
+ sal_Int32 nMin; // Minimum des Bereiches
+ sal_Int32 nMax; // Maximum des Bereiches
sal_uInt32 nSize;
public:
RscRange( Atom nId, sal_uInt32 nTypId );
virtual RSCCLASS_TYPE GetClassType() const;
- RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, BOOL );
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, sal_Bool );
// Der zulaessige Bereich wird gesetzt
- ERRTYPE SetRange( INT32 nMinimum, INT32 nMaximum );
+ ERRTYPE SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum );
// Gibt die Groesse der Klasse in Bytes
sal_uInt32 Size(){ return nSize; }
// Eine Zuweisung an eine Variable
virtual void SetToDefault( const RSCINST & rInst )
{
- ((RscRangeInst*)rInst.pData)->bDflt = TRUE;
+ ((RscRangeInst*)rInst.pData)->bDflt = sal_True;
}
- BOOL IsDefault( const RSCINST & rInst)
+ sal_Bool IsDefault( const RSCINST & rInst)
{
return( ((RscRangeInst*)rInst.pData)->bDflt );
};
// Als Default setzen
- BOOL IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
- ERRTYPE SetNumber( const RSCINST &, INT32 );
- ERRTYPE GetNumber( const RSCINST &, INT32 * );
+ sal_Bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+ ERRTYPE SetNumber( const RSCINST &, sal_Int32 );
+ ERRTYPE GetNumber( const RSCINST &, sal_Int32 * );
void WriteSrc( const RSCINST &, FILE * fOutput,
RscTypCont * pTC, sal_uInt32 nTab, const char * );
ERRTYPE WriteRc( const RSCINST &, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32, BOOL bExtra );
+ RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
void WriteRcAccess( FILE * fOutput, RscTypCont * pTC,
const char * );
};
@@ -78,37 +78,37 @@ class RscLongRange : public RscTop
protected:
struct RscLongRangeInst
{
- INT32 nValue; // nValue = Ausgangswert - nMin
- BOOL bDflt; // Ist Default
+ sal_Int32 nValue; // nValue = Ausgangswert - nMin
+ sal_Bool bDflt; // Ist Default
};
- INT32 nMin; // Minimum des Bereiches
- INT32 nMax; // Maximum des Bereiches
+ sal_Int32 nMin; // Minimum des Bereiches
+ sal_Int32 nMax; // Maximum des Bereiches
sal_uInt32 nSize;
public:
RscLongRange( Atom nId, sal_uInt32 nTypId );
virtual RSCCLASS_TYPE GetClassType() const;
- RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, BOOL );
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, sal_Bool );
// Der zulaessige Bereich wird gesetzt
- ERRTYPE SetRange( INT32 nMinimum, INT32 nMaximum );
+ ERRTYPE SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum );
// Gibt die Groesse der Klasse in Bytes
sal_uInt32 Size(){ return nSize; }
// Eine Zuweisung an eine Variable
virtual void SetToDefault( const RSCINST & rInst )
{
- ((RscLongRangeInst*)rInst.pData)->bDflt = TRUE;
+ ((RscLongRangeInst*)rInst.pData)->bDflt = sal_True;
}
- BOOL IsDefault( const RSCINST & rInst)
+ sal_Bool IsDefault( const RSCINST & rInst)
{
return( ((RscLongRangeInst*)rInst.pData)->bDflt );
};
// Als Default setzen
- BOOL IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
- ERRTYPE SetNumber( const RSCINST &, INT32 );
- ERRTYPE GetNumber( const RSCINST &, INT32 * );
+ sal_Bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+ ERRTYPE SetNumber( const RSCINST &, sal_Int32 );
+ ERRTYPE GetNumber( const RSCINST &, sal_Int32 * );
void WriteSrc( const RSCINST &, FILE * fOutput,
RscTypCont * pTC, sal_uInt32 nTab, const char * );
ERRTYPE WriteRc( const RSCINST &, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32, BOOL bExtra );
+ RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
void WriteRcAccess( FILE * fOutput, RscTypCont * pTC,
const char * );
@@ -121,7 +121,7 @@ public:
RscLongEnumRange( Atom nId, sal_uInt32 nTypId );
ERRTYPE SetConst( const RSCINST & rInst, Atom nValueId,
- INT32 nValue );
+ sal_Int32 nValue );
};
/******************* R s c I d R a n g e ***********************************/
@@ -129,41 +129,41 @@ class RscIdRange : public RscTop
{
sal_uInt32 nSize;
protected:
- INT32 nMin; // Minimum des Bereiches
- INT32 nMax; // Maximum des Bereiches
+ sal_Int32 nMin; // Minimum des Bereiches
+ sal_Int32 nMax; // Maximum des Bereiches
public:
RscIdRange( Atom nId, sal_uInt32 nTypId );
virtual RSCCLASS_TYPE GetClassType() const;
// Der zulaessige Bereich wird gesetzt
- ERRTYPE SetRange( INT32 nMinimum, INT32 nMaximum ){
+ ERRTYPE SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum ){
nMin = nMinimum;
nMax = nMaximum;
return ERR_OK;
}
- RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, BOOL );
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, sal_Bool );
void Destroy( const RSCINST & rInst );
sal_uInt32 Size(){ return nSize; }
virtual void SetToDefault( const RSCINST & rInst )
{
- ((RscId*)rInst.pData)->aExp.cUnused = TRUE;
+ ((RscId*)rInst.pData)->aExp.cUnused = sal_True;
}
- BOOL IsDefault( const RSCINST & rInst)
+ sal_Bool IsDefault( const RSCINST & rInst)
{
//cUnused wird fuer Defaultkennung verwendet
return ((RscId*)rInst.pData)->aExp.cUnused
- ? TRUE : FALSE;
+ ? sal_True : sal_False;
}
// Als Default setzen
- BOOL IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
- ERRTYPE SetNumber( const RSCINST &, INT32 );
- ERRTYPE GetNumber( const RSCINST &, INT32 * );
+ sal_Bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+ ERRTYPE SetNumber( const RSCINST &, sal_Int32 );
+ ERRTYPE GetNumber( const RSCINST &, sal_Int32 * );
ERRTYPE SetRef( const RSCINST &, const RscId & rRscId );
ERRTYPE GetRef( const RSCINST & rInst, RscId * );
void WriteSrc( const RSCINST &, FILE * fOutput,
RscTypCont * pTC, sal_uInt32 nTab, const char * );
ERRTYPE WriteRc( const RSCINST &, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32, BOOL bExtra );
- BOOL IsConsistent( const RSCINST & rInst, RscInconsList * pList );
+ RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
+ sal_Bool IsConsistent( const RSCINST & rInst, RscInconsList * pList );
void WriteRcAccess( FILE * fOutput, RscTypCont * pTC,
const char * );
@@ -176,14 +176,14 @@ public:
RscBool( Atom nId, sal_uInt32 nTypId );
virtual RSCCLASS_TYPE GetClassType() const;
// Der zulaessige Bereich wird gesetzt
- ERRTYPE SetRange( INT32, INT32 ){
+ ERRTYPE SetRange( sal_Int32, sal_Int32 ){
return( ERR_UNKNOWN_METHOD );
};
- ERRTYPE SetBool( const RSCINST & rInst, BOOL b ){
- return( SetNumber( rInst, (INT32)b ) );
+ ERRTYPE SetBool( const RSCINST & rInst, sal_Bool b ){
+ return( SetNumber( rInst, (sal_Int32)b ) );
};
- ERRTYPE GetBool( const RSCINST & rInst, BOOL * pB){
- INT32 l;
+ ERRTYPE GetBool( const RSCINST & rInst, sal_Bool * pB){
+ sal_Int32 l;
GetNumber( rInst, &l );
*pB = (0 != l);
return( ERR_OK );
@@ -196,14 +196,14 @@ public:
};
class RscBreakRange : public RscRange {
- INT32 nOutRange;
+ sal_Int32 nOutRange;
public:
RscBreakRange( Atom nId, sal_uInt32 nTypId );
- void SetOutRange( INT32 nNumber ){
+ void SetOutRange( sal_Int32 nNumber ){
nOutRange = nNumber;
}
- RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, BOOL );
- ERRTYPE SetNumber( const RSCINST &, INT32 );
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, sal_Bool );
+ ERRTYPE SetNumber( const RSCINST &, sal_Int32 );
};
#endif // _RSCRANGE_HXX
diff --git a/rsc/inc/rscrsc.hxx b/rsc/inc/rscrsc.hxx
index c2b0a70a1b66..711b686f8a27 100644
--- a/rsc/inc/rscrsc.hxx
+++ b/rsc/inc/rscrsc.hxx
@@ -129,8 +129,8 @@ public:
ByteString GetTmpFileName(); // Die Dateien werden geloescht
// Include Statements lesen
- ERRTYPE IncludeParser( ULONG lFileKey );
- ERRTYPE ParseOneFile( ULONG lFileKey, const RscCmdLine::OutputFile* pOutputFile, const WriteRcContext* pContext );
+ ERRTYPE IncludeParser( sal_uLong lFileKey );
+ ERRTYPE ParseOneFile( sal_uLong lFileKey, const RscCmdLine::OutputFile* pOutputFile, const WriteRcContext* pContext );
ERRTYPE Link();
void EndCompile();
};
diff --git a/rsc/inc/rscstr.hxx b/rsc/inc/rscstr.hxx
index 6d32a437b09e..e485a023d933 100644
--- a/rsc/inc/rscstr.hxx
+++ b/rsc/inc/rscstr.hxx
@@ -38,7 +38,7 @@ class RscString : public RscTop
RscTop * pRefClass;
struct RscStringInst {
char * pStr; // Zeiger auf String
- BOOL bDflt; // Ist Default
+ sal_Bool bDflt; // Ist Default
RscId aRefId; // ReferenzName
};
sal_uInt32 nSize;
@@ -50,20 +50,20 @@ public:
{
pRefClass = pClass;
};
- RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, BOOL );
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, sal_Bool );
// Der zulaessige Bereich wird gesetzt
void Destroy( const RSCINST & rInst );
sal_uInt32 Size(){ return nSize; }
void SetToDefault( const RSCINST & rInst )
{
- ((RscStringInst*)rInst.pData)->bDflt = TRUE;
+ ((RscStringInst*)rInst.pData)->bDflt = sal_True;
}
- BOOL IsDefault( const RSCINST & rInst)
+ sal_Bool IsDefault( const RSCINST & rInst)
{
return( ((RscStringInst*)rInst.pData)->bDflt );
};
// Als Default setzen
- BOOL IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+ sal_Bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
ERRTYPE SetString( const RSCINST &, const char * pStr );
ERRTYPE GetString( const RSCINST &, char ** ppStr );
ERRTYPE GetRef( const RSCINST & rInst, RscId * );
@@ -71,7 +71,7 @@ public:
void WriteSrc( const RSCINST &, FILE * fOutput,
RscTypCont * pTC, sal_uInt32 nTab, const char * );
ERRTYPE WriteRc( const RSCINST &, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32, BOOL bExtra );
+ RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
virtual void WriteRcAccess( FILE * fOutput, RscTypCont * pTC,
const char * );
};
diff --git a/rsc/inc/rsctools.hxx b/rsc/inc/rsctools.hxx
index 3a3eff653cd7..a119ab7f1431 100644
--- a/rsc/inc/rsctools.hxx
+++ b/rsc/inc/rsctools.hxx
@@ -48,8 +48,8 @@ enum RSCBYTEORDER_TYPE { RSC_BIGENDIAN, RSC_LITTLEENDIAN, RSC_SYSTEMENDIAN };
(nSize + sizeof( void * ) -1) / sizeof( void * ) * sizeof( void * )
/******************* F u n c t i o n F o r w a r d s *******************/
ByteString GetTmpFileName();
-BOOL Append( ByteString aDestFile, ByteString aSourceFile );
-BOOL Append( FILE * fDest, ByteString aSourceFile );
+sal_Bool Append( ByteString aDestFile, ByteString aSourceFile );
+sal_Bool Append( FILE * fDest, ByteString aSourceFile );
ByteString InputFile ( const char * pInput, const char * pExt );
ByteString OutputFile( ByteString aInput, const char * ext );
char * ResponseFile( RscPtrPtr * ppCmd, char ** ppArgv,
@@ -67,7 +67,7 @@ DECLARE_LIST( RscStrList, ByteString * )
class RscChar
{
public:
- static char * MakeUTF8( char * pStr, UINT16 nTextEncoding );
+ static char * MakeUTF8( char * pStr, sal_uInt16 nTextEncoding );
};
/****************** R s c P t r P t r ************************************/
@@ -92,7 +92,7 @@ public:
class RscWriteRc
{
sal_uInt32 nLen;
- BOOL bSwap;
+ sal_Bool bSwap;
RSCBYTEORDER_TYPE nByteOrder;
char * pMem;
char * GetPointer( sal_uInt32 nSize );
@@ -178,7 +178,7 @@ public:
{ Put( (sal_uInt16)nValue ); }
void PutUTF8( char * pData );
- void PutAt( sal_uInt32 nPos, INT32 lVal )
+ void PutAt( sal_uInt32 nPos, sal_Int32 lVal )
{
union
{
@@ -200,7 +200,7 @@ public:
}
void PutAt( sal_uInt32 nPos, sal_uInt32 lVal )
{
- PutAt( nPos, (INT32)lVal);
+ PutAt( nPos, (sal_Int32)lVal);
}
void PutAt( sal_uInt32 nPos, short nVal )
{
diff --git a/rsc/inc/rsctop.hxx b/rsc/inc/rsctop.hxx
index 85aa06614574..2e23d5ef410a 100644
--- a/rsc/inc/rsctop.hxx
+++ b/rsc/inc/rsctop.hxx
@@ -70,8 +70,8 @@ public:
sal_uInt32 GetTypId() const
{ return nTypId; };
// Gibt die Oberklasse zurueck
- BOOL InHierarchy( RscTop * pClass );
- BOOL IsCodeWriteable() const
+ sal_Bool InHierarchy( RscTop * pClass );
+ sal_Bool IsCodeWriteable() const
{
return( 0 != aCallParType.Len() );
}
@@ -114,7 +114,7 @@ public:
// pData, pClass im return koennen NULL sein
virtual RSCINST GetVariable( const RSCINST & rInst, Atom nVarName,
const RSCINST & rInitInst,
- BOOL nInitDflt = FALSE,
+ sal_Bool nInitDflt = sal_False,
RscTop * pCreateClass = NULL );
virtual RSCINST GetCopyVar( const RSCINST & rInst, Atom nVarName );
@@ -129,7 +129,7 @@ public:
// Liefert Instanz aus einem Feld zurueck
// pGetInst im return kann NULL sein
- virtual ERRTYPE GetValueEle( const RSCINST & rInst, INT32 lValue,
+ virtual ERRTYPE GetValueEle( const RSCINST & rInst, sal_Int32 lValue,
RscTop * pCreateClass,
RSCINST * pGetInst );
@@ -161,46 +161,46 @@ public:
virtual sal_uInt32 GetCount( const RSCINST & rInst );
// Eine Zuweisung an eine Variable
- virtual ERRTYPE SetNumber( const RSCINST & rInst, INT32 lValue );
+ virtual ERRTYPE SetNumber( const RSCINST & rInst, sal_Int32 lValue );
// Eine Zuweisung an eine Variable
- virtual ERRTYPE SetBool( const RSCINST & rInst, BOOL bValue );
+ virtual ERRTYPE SetBool( const RSCINST & rInst, sal_Bool bValue );
// Eine Zuweisung an eine Variable
virtual ERRTYPE SetConst( const RSCINST & rInst, Atom nValueId,
- INT32 nValue );
+ sal_Int32 nValue );
// Eine Zuweisung an eine Variable
virtual ERRTYPE SetNotConst( const RSCINST & rInst, Atom nId );
virtual ERRTYPE SetString( const RSCINST & rInst, const char * pStr );
- virtual ERRTYPE GetNumber( const RSCINST & rInst, INT32 * pN );
+ virtual ERRTYPE GetNumber( const RSCINST & rInst, sal_Int32 * pN );
- virtual ERRTYPE GetBool( const RSCINST & rInst, BOOL * pB );
+ virtual ERRTYPE GetBool( const RSCINST & rInst, sal_Bool * pB );
virtual ERRTYPE GetConst( const RSCINST & rInst, Atom * pH );
virtual ERRTYPE GetString( const RSCINST & rInst, char ** ppStr );
virtual RSCINST Create( RSCINST * pInst,
- const RSCINST & rDefInst, BOOL bOwnClass = FALSE );
+ const RSCINST & rDefInst, sal_Bool bOwnClass = sal_False );
// Instanz zerstoeren
virtual void Destroy( const RSCINST & rInst );
// prueft auf konsistenz
- virtual BOOL IsConsistent( const RSCINST & rInst,
+ virtual sal_Bool IsConsistent( const RSCINST & rInst,
RscInconsList * pList = NULL );
// Alles auf Default setzen
virtual void SetToDefault( const RSCINST & rInst );
// Ist Eingabe = Default
- virtual BOOL IsDefault( const RSCINST & rInst );
+ virtual sal_Bool IsDefault( const RSCINST & rInst );
// Gleiche Werte auf Default setzen
- virtual BOOL IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+ virtual sal_Bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
// Instanz auf Default setzen
virtual void SetDefault( const RSCINST & rInst, Atom nVarId );
@@ -222,9 +222,9 @@ public:
RscTypCont * pTC, sal_uInt32 nTab,const char * );
virtual ERRTYPE WriteRcHeader( const RSCINST & rInst, RscWriteRc & aMem,
RscTypCont * pTC, const RscId & aId,
- sal_uInt32 nDeep, BOOL bExtra );
+ sal_uInt32 nDeep, sal_Bool bExtra );
virtual ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32 nDeep, BOOL bExtra );
+ RscTypCont * pTC, sal_uInt32 nDeep, sal_Bool bExtra );
// Weiterleitung an Superklassen wird unterbunden
virtual ERRTYPE WriteHxxHeader( const RSCINST & rInst, FILE * fOutput,
diff --git a/rsc/inc/rsctree.hxx b/rsc/inc/rsctree.hxx
index 0ee0f3b5056f..30f56da2cdd7 100644
--- a/rsc/inc/rsctree.hxx
+++ b/rsc/inc/rsctree.hxx
@@ -70,15 +70,15 @@ public:
NameNode* Right() const{ return (NameNode *)pRight ; };
NameNode* Search( const NameNode * pName ) const;
// insert a new node in the b-tree
- BOOL Insert( NameNode * pTN, sal_uInt32 * nDepth );
- BOOL Insert( NameNode* pTN );
+ sal_Bool Insert( NameNode * pTN, sal_uInt32 * nDepth );
+ sal_Bool Insert( NameNode* pTN );
virtual COMPARE Compare( const NameNode * ) const;
virtual COMPARE Compare( const void * ) const;
NameNode* SearchParent( const NameNode * ) const;
// return ist neue Root
NameNode* Remove( NameNode * );
void OrderTree();
- BOOL IsOrderTree() const;
+ sal_Bool IsOrderTree() const;
};
diff --git a/rsc/source/misc/rscdbl.cxx b/rsc/source/misc/rscdbl.cxx
index 591f6b3fd4f6..7afde9e7c65b 100644
--- a/rsc/source/misc/rscdbl.cxx
+++ b/rsc/source/misc/rscdbl.cxx
@@ -81,7 +81,7 @@ void FillSubList( RSCINST & rInst, REResourceList * pList )
}
void FillListObj( ObjNode * pObjNode, RscTop * pRscTop,
- REResourceList * pList, ULONG lFileKey )
+ REResourceList * pList, sal_uLong lFileKey )
{
if( pObjNode ){
if( pObjNode->GetFileKey() == lFileKey ){
@@ -104,7 +104,7 @@ void FillListObj( ObjNode * pObjNode, RscTop * pRscTop,
};
}
-void FillList( RscTop * pRscTop, REResourceList * pList, ULONG lFileKey ){
+void FillList( RscTop * pRscTop, REResourceList * pList, sal_uLong lFileKey ){
if( pRscTop ){
FillList( (RscTop*)pRscTop->Left(), pList, lFileKey );
@@ -114,6 +114,6 @@ void FillList( RscTop * pRscTop, REResourceList * pList, ULONG lFileKey ){
};
}
-void RscTypCont::FillNameIdList( REResourceList * pList, ULONG lFileKey ){
+void RscTypCont::FillNameIdList( REResourceList * pList, sal_uLong lFileKey ){
FillList( pRoot, pList, lFileKey );
}
diff --git a/rsc/source/misc/rsclst.cxx b/rsc/source/misc/rsclst.cxx
index ee2d4a14f328..ec70635efc44 100644
--- a/rsc/source/misc/rsclst.cxx
+++ b/rsc/source/misc/rsclst.cxx
@@ -32,13 +32,13 @@
REResourceList :: REResourceList()
{
- bVisible = FALSE;
+ bVisible = sal_False;
pParent = NULL;
}
REResourceList :: REResourceList( REResourceList* pParentList,
ByteString& rClassName,
- const RscId & rResourceID, BOOL bVis )
+ const RscId & rResourceID, sal_Bool bVis )
{
pParent = pParentList;
aClassName = rClassName;
diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx
index af176fe24934..51df773ef182 100644
--- a/rsc/source/parser/rscdb.cxx
+++ b/rsc/source/parser/rscdb.cxx
@@ -65,9 +65,9 @@ RscTypCont :: RscTypCont( RscError * pErrHdl,
nSourceCharSet( RTL_TEXTENCODING_UTF8 ),
nByteOrder( nOrder ),
aSearchPath( rSearchPath ),
- aBool( pHS->getID( "BOOL" ), RSC_NOTYPE ),
+ aBool( pHS->getID( "sal_Bool" ), RSC_NOTYPE ),
aShort( pHS->getID( "short" ), RSC_NOTYPE ),
- aUShort( pHS->getID( "USHORT" ), RSC_NOTYPE ),
+ aUShort( pHS->getID( "sal_uInt16" ), RSC_NOTYPE ),
aLong( pHS->getID( "long" ), RSC_NOTYPE ),
aEnumLong( pHS->getID( "enum_long" ), RSC_NOTYPE ),
aIdUShort( pHS->getID( "IDUSHORT" ), RSC_NOTYPE ),
@@ -394,16 +394,16 @@ void RscTypCont :: Delete( Atom nRT, const RscId & rId ){
|*
*************************************************************************/
sal_uInt32 RscTypCont :: PutSysName( sal_uInt32 nRscTyp, char * pFileName,
- sal_uInt32 nConst, sal_uInt32 nId, BOOL bFirst )
+ sal_uInt32 nConst, sal_uInt32 nId, sal_Bool bFirst )
{
RscSysEntry * pSysEntry;
- BOOL bId1 = FALSE;
+ sal_Bool bId1 = sal_False;
pSysEntry = aSysLst.First();
while( pSysEntry )
{
if( pSysEntry->nKey == 1 )
- bId1 = TRUE;
+ bId1 = sal_True;
if( !strcmp( pSysEntry->aFileName.GetBuffer(), pFileName ) )
if( pSysEntry->nRscTyp == nRscTyp
&& pSysEntry->nTyp == nConst
@@ -423,7 +423,7 @@ sal_uInt32 RscTypCont :: PutSysName( sal_uInt32 nRscTyp, char * pFileName,
if( bFirst && !bId1 )
{
pSysEntry->nKey = 1;
- aSysLst.Insert( pSysEntry, (ULONG)0 );
+ aSysLst.Insert( pSysEntry, (sal_uLong)0 );
}
else
aSysLst.Insert( pSysEntry, LIST_APPEND );
@@ -441,7 +441,7 @@ sal_uInt32 RscTypCont :: PutSysName( sal_uInt32 nRscTyp, char * pFileName,
|* Letzte Aenderung MM 21.06.90
|*
*************************************************************************/
-void RscTypCont :: WriteInc( FILE * fOutput, ULONG lFileKey )
+void RscTypCont :: WriteInc( FILE * fOutput, sal_uLong lFileKey )
{
RscFile * pFName;
@@ -503,7 +503,7 @@ private:
ERRTYPE aError; // Enthaelt den ersten Fehler
RscTypCont* pTypCont;
FILE * fOutput; // AusgabeDatei
- ULONG lFileKey; // Welche src-Datei
+ sal_uLong lFileKey; // Welche src-Datei
RscTop * pClass;
DECL_LINK( CallBackWriteRc, ObjNode * );
@@ -555,7 +555,7 @@ IMPL_LINK( RscEnumerateObj, CallBackWriteRc, ObjNode *, pObjNode )
aError = pClass->WriteRcHeader( RSCINST( pClass, pObjNode->GetRscObj() ),
aMem, pTypCont,
- pObjNode->GetRscId(), 0, TRUE );
+ pObjNode->GetRscId(), 0, sal_True );
if( aError.IsError() || aError.IsWarning() )
pTypCont->pEH->Error( aError, pClass, pObjNode->GetRscId() );
@@ -650,18 +650,18 @@ void RscEnumerateObj :: WriteRcFile( RscWriteRc & rMem, FILE * fOut ){
if( nRT == RSC_VERSIONCONTROL )
{ // kommt immmer als letztes
- INT32 nCount = pTypCont->aIdTranslator.size();
+ sal_Int32 nCount = pTypCont->aIdTranslator.size();
// groesse der Tabelle
- UINT32 nSize = (nCount * (sizeof(sal_uInt64)+sizeof(INT32))) + sizeof(INT32);
+ sal_uInt32 nSize = (nCount * (sizeof(sal_uInt64)+sizeof(sal_Int32))) + sizeof(sal_Int32);
rMem.Put( nCount ); //Anzahl speichern
- for( std::map< sal_uInt64, ULONG >::const_iterator it =
+ for( std::map< sal_uInt64, sal_uLong >::const_iterator it =
pTypCont->aIdTranslator.begin(); it != pTypCont->aIdTranslator.end(); ++it )
{
// Schluessel schreiben
rMem.Put( it->first );
// Objekt Id oder Position schreiben
- rMem.Put( (INT32)it->second );
+ rMem.Put( (sal_Int32)it->second );
}
rMem.Put( nSize ); // Groesse hinten Speichern
}
@@ -703,7 +703,7 @@ public:
return aEnumObj.aError;
};
- ERRTYPE WriteSrc( ULONG lFileKey )
+ ERRTYPE WriteSrc( sal_uLong lFileKey )
{
aEnumObj.lFileKey = lFileKey;
@@ -712,7 +712,7 @@ public:
return aEnumObj.aError;
}
- ERRTYPE WriteCxx( ULONG lFileKey )
+ ERRTYPE WriteCxx( sal_uLong lFileKey )
{
aEnumObj.lFileKey = lFileKey;
@@ -721,7 +721,7 @@ public:
return aEnumObj.aError;
}
- ERRTYPE WriteHxx( ULONG lFileKey )
+ ERRTYPE WriteHxx( sal_uLong lFileKey )
{
aEnumObj.lFileKey = lFileKey;
@@ -814,7 +814,7 @@ ERRTYPE RscTypCont::WriteRc( WriteRcContext& rContext )
// version control
RscWriteRc aMem( nByteOrder );
- aVersion.pClass->WriteRcHeader( aVersion, aMem, this, RscId( RSCVERSION_ID ), 0, TRUE );
+ aVersion.pClass->WriteRcHeader( aVersion, aMem, this, RscId( RSCVERSION_ID ), 0, sal_True );
aEnumRef.aEnumObj.WriteRcFile( aMem, rContext.fOutput );
return aError;
@@ -829,8 +829,8 @@ ERRTYPE RscTypCont::WriteRc( WriteRcContext& rContext )
|* Letzte Aenderung MM 27.06.90
|*
*************************************************************************/
-void RscTypCont :: WriteSrc( FILE * fOutput, ULONG nFileKey,
- CharSet /*nCharSet*/, BOOL bName )
+void RscTypCont :: WriteSrc( FILE * fOutput, sal_uLong nFileKey,
+ CharSet /*nCharSet*/, sal_Bool bName )
{
RscFile * pFName;
RscEnumerateRef aEnumRef( this, pRoot, fOutput );
@@ -862,7 +862,7 @@ void RscTypCont :: WriteSrc( FILE * fOutput, ULONG nFileKey,
}
else
{
- RscId::SetNames( FALSE );
+ RscId::SetNames( sal_False );
if( NOFILE_INDEX == nFileKey )
{
pFName = aFileTab.First();
@@ -887,7 +887,7 @@ void RscTypCont :: WriteSrc( FILE * fOutput, ULONG nFileKey,
|* Letzte Aenderung MM 30.05.91
|*
*************************************************************************/
-ERRTYPE RscTypCont :: WriteHxx( FILE * fOutput, ULONG nFileKey )
+ERRTYPE RscTypCont :: WriteHxx( FILE * fOutput, sal_uLong nFileKey )
{
fprintf( fOutput, "#include <tools/rc.hxx>\n" );
fprintf( fOutput, "#include <tools/resid.hxx>\n" );
@@ -953,7 +953,7 @@ ERRTYPE RscTypCont :: WriteHxx( FILE * fOutput, ULONG nFileKey )
|* Letzte Aenderung MM 30.05.91
|*
*************************************************************************/
-ERRTYPE RscTypCont::WriteCxx( FILE * fOutput, ULONG nFileKey,
+ERRTYPE RscTypCont::WriteCxx( FILE * fOutput, sal_uLong nFileKey,
const ByteString & rHxxName )
{
RscEnumerateRef aEnumRef( this, pRoot, fOutput );
@@ -1019,14 +1019,14 @@ void RscTypCont::WriteRcCtor
*************************************************************************/
class RscDel
{
- ULONG lFileKey;
+ sal_uLong lFileKey;
DECL_LINK( Delete, RscTop * );
public:
- RscDel( RscTop * pRoot, ULONG lKey );
+ RscDel( RscTop * pRoot, sal_uLong lKey );
};
-inline RscDel::RscDel( RscTop * pRoot, ULONG lKey )
+inline RscDel::RscDel( RscTop * pRoot, sal_uLong lKey )
{
lFileKey = lKey;
pRoot->EnumNodes( LINK( this, RscDel, Delete ) );
@@ -1040,7 +1040,7 @@ IMPL_LINK_INLINE_START( RscDel, Delete, RscTop *, pNode )
}
IMPL_LINK_INLINE_END( RscDel, Delete, RscTop *, pNode )
-void RscTypCont :: Delete( ULONG lFileKey ){
+void RscTypCont :: Delete( sal_uLong lFileKey ){
// Resourceinstanzen loeschen
RscDel aDel( pRoot, lFileKey );
// Defines loeschen
@@ -1056,55 +1056,55 @@ void RscTypCont :: Delete( ULONG lFileKey ){
|* Letzte Aenderung MM 23.09.91
|*
*************************************************************************/
-BOOL IsInstConsistent( ObjNode * pObjNode, RscTop * pRscTop,
+sal_Bool IsInstConsistent( ObjNode * pObjNode, RscTop * pRscTop,
RscInconsList * pList )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( pObjNode ){
RSCINST aTmpI;
if( ! IsInstConsistent( (ObjNode*)pObjNode->Left(), pRscTop, pList ) )
- bRet = FALSE;
+ bRet = sal_False;
aTmpI.pClass = pRscTop;
aTmpI.pData = pObjNode->GetRscObj();
if( ! aTmpI.pClass->IsConsistent( aTmpI, pList ) )
- bRet = FALSE;
+ bRet = sal_False;
if( ! IsInstConsistent( (ObjNode*)pObjNode->Right(), pRscTop, pList ) )
- bRet = FALSE;
+ bRet = sal_False;
};
return( bRet );
}
-BOOL MakeConsistent( RscTop * pRscTop, RscInconsList * pList )
+sal_Bool MakeConsistent( RscTop * pRscTop, RscInconsList * pList )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( pRscTop ){
if( ! ::MakeConsistent( (RscTop*)pRscTop->Left(), pList ) )
- bRet = FALSE;
+ bRet = sal_False;
if( pRscTop->GetObjNode() ){
if( ! pRscTop->GetObjNode()->IsConsistent() ){
pRscTop->GetObjNode()->OrderTree();
if( ! pRscTop->GetObjNode()->IsConsistent( pList ) )
- bRet = FALSE;
+ bRet = sal_False;
}
if( ! IsInstConsistent( pRscTop->GetObjNode(), pRscTop, pList ) )
- bRet = FALSE;
+ bRet = sal_False;
}
if( ! ::MakeConsistent( (RscTop*)pRscTop->Right(), pList ) )
- bRet = FALSE;
+ bRet = sal_False;
};
return bRet;
}
-BOOL RscTypCont :: MakeConsistent( RscInconsList * pList ){
+sal_Bool RscTypCont :: MakeConsistent( RscInconsList * pList ){
return( ::MakeConsistent( pRoot, pList ) );
}
diff --git a/rsc/source/parser/rscibas.cxx b/rsc/source/parser/rscibas.cxx
index a60db4f54d2f..75239f82e55b 100644
--- a/rsc/source/parser/rscibas.cxx
+++ b/rsc/source/parser/rscibas.cxx
@@ -52,7 +52,7 @@
#include <hash_map>
/****************** M A C R O S ******************************************/
-void RscTypCont::SETCONST( RscConst * pClass, const char * szString, UINT32 nVal )
+void RscTypCont::SETCONST( RscConst * pClass, const char * szString, sal_uInt32 nVal )
{
#if OSL_DEBUG_LEVEL > 2
fprintf( stderr, "setconst : %s\n", szString );
@@ -61,7 +61,7 @@ void RscTypCont::SETCONST( RscConst * pClass, const char * szString, UINT32 nVal
CONSTNAME, nVal ), nVal );
}
-void RscTypCont::SETCONST( RscConst * pClass, Atom nName, UINT32 nVal )
+void RscTypCont::SETCONST( RscConst * pClass, Atom nName, sal_uInt32 nVal )
{
#if OSL_DEBUG_LEVEL > 2
fprintf( stderr, "setconst hash: %u\n", (unsigned int)nName );
@@ -484,12 +484,12 @@ RscEnum * RscTypCont::InitMessButtons()
{
RscEnum * pMessButtons;
pMessButtons = new RscEnum( pHS->getID( "EnumMessButtons" ), RSC_NOTYPE );
- SETCONST( pMessButtons, "WB_OK", sal::static_int_cast<UINT32>(WB_OK) );
- SETCONST( pMessButtons, "WB_OK_CANCEL", sal::static_int_cast<UINT32>(WB_OK_CANCEL) );
- SETCONST( pMessButtons, "WB_YES_NO", sal::static_int_cast<UINT32>(WB_YES_NO) );
- SETCONST( pMessButtons, "WB_YES_NO_CANCEL", sal::static_int_cast<UINT32>(WB_YES_NO_CANCEL) );
- SETCONST( pMessButtons, "WB_RETRY_CANCEL", sal::static_int_cast<UINT32>(WB_RETRY_CANCEL) );
- SETCONST( pMessButtons, "WB_ABORT_RETRY_IGNORE", sal::static_int_cast<UINT32>(WB_ABORT_RETRY_IGNORE) );
+ SETCONST( pMessButtons, "WB_OK", sal::static_int_cast<sal_uInt32>(WB_OK) );
+ SETCONST( pMessButtons, "WB_OK_CANCEL", sal::static_int_cast<sal_uInt32>(WB_OK_CANCEL) );
+ SETCONST( pMessButtons, "WB_YES_NO", sal::static_int_cast<sal_uInt32>(WB_YES_NO) );
+ SETCONST( pMessButtons, "WB_YES_NO_CANCEL", sal::static_int_cast<sal_uInt32>(WB_YES_NO_CANCEL) );
+ SETCONST( pMessButtons, "WB_RETRY_CANCEL", sal::static_int_cast<sal_uInt32>(WB_RETRY_CANCEL) );
+ SETCONST( pMessButtons, "WB_ABORT_RETRY_IGNORE", sal::static_int_cast<sal_uInt32>(WB_ABORT_RETRY_IGNORE) );
return( pMessButtons );
}
@@ -507,12 +507,12 @@ RscEnum * RscTypCont::InitMessDefButton(){
pMessDefButton = new RscEnum( pHS->getID( "EnumMessDefButton" ),
RSC_NOTYPE );
- SETCONST( pMessDefButton, "WB_DEF_OK", sal::static_int_cast<UINT32>(WB_DEF_OK) );
- SETCONST( pMessDefButton, "WB_DEF_CANCEL", sal::static_int_cast<UINT32>(WB_DEF_CANCEL) );
- SETCONST( pMessDefButton, "WB_DEF_RETRY", sal::static_int_cast<UINT32>(WB_DEF_RETRY) );
- SETCONST( pMessDefButton, "WB_DEF_YES", sal::static_int_cast<UINT32>(WB_DEF_YES) );
- SETCONST( pMessDefButton, "WB_DEF_NO", sal::static_int_cast<UINT32>(WB_DEF_NO) );
- SETCONST( pMessDefButton, "WB_DEF_IGNORE", sal::static_int_cast<UINT32>(WB_DEF_IGNORE) );
+ SETCONST( pMessDefButton, "WB_DEF_OK", sal::static_int_cast<sal_uInt32>(WB_DEF_OK) );
+ SETCONST( pMessDefButton, "WB_DEF_CANCEL", sal::static_int_cast<sal_uInt32>(WB_DEF_CANCEL) );
+ SETCONST( pMessDefButton, "WB_DEF_RETRY", sal::static_int_cast<sal_uInt32>(WB_DEF_RETRY) );
+ SETCONST( pMessDefButton, "WB_DEF_YES", sal::static_int_cast<sal_uInt32>(WB_DEF_YES) );
+ SETCONST( pMessDefButton, "WB_DEF_NO", sal::static_int_cast<sal_uInt32>(WB_DEF_NO) );
+ SETCONST( pMessDefButton, "WB_DEF_IGNORE", sal::static_int_cast<sal_uInt32>(WB_DEF_IGNORE) );
return( pMessDefButton );
}
diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx
index 8b9a088c76cc..45e8d5aac301 100644
--- a/rsc/source/parser/rscicpx.cxx
+++ b/rsc/source/parser/rscicpx.cxx
@@ -55,7 +55,7 @@ void RscTypCont::InsWinBit( RscTop * pClass, const ByteString & rName,
// Clientvariablen einfuegen
aBaseLst.Insert(
- pClient = new RscClient( pHS->getID( "BOOL" ), RSC_NOTYPE,
+ pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE,
&aWinBits, nVal ),
LIST_APPEND );
Atom nId = aNmTb.Put( rName.GetBuffer(), VARNAME );
@@ -76,7 +76,7 @@ RscTop * RscTypCont::InitClassMgr()
Atom nId;
aBaseLst.Insert( pClass =
- new RscBaseCont( InvalidAtom, RSC_NOTYPE, NULL, FALSE ),
+ new RscBaseCont( InvalidAtom, RSC_NOTYPE, NULL, sal_False ),
LIST_APPEND );
nId = pHS->getID( "Resource" );
@@ -218,7 +218,7 @@ RscTop * RscTypCont::InitClassImageList( RscTop * pSuper, RscTop * /*pClassBitma
pClassImageList->SetVariable( nId, pClassColor, NULL,
VAR_SVDYNAMIC, RSC_IMAGELIST_MASKCOLOR );
- RscCont * pCont = new RscCont( pHS->getID( "USHORT *" ), RSC_NOTYPE );
+ RscCont * pCont = new RscCont( pHS->getID( "sal_uInt16 *" ), RSC_NOTYPE );
pCont->SetTypeClass( &aIdUShort );
aBaseLst.Insert( pCont, LIST_APPEND );
nId = aNmTb.Put( "IdList", VARNAME );
@@ -271,7 +271,7 @@ RscTop * RscTypCont::InitClassWindow( RscTop * pSuper, RscEnum * pMapUnit,
VAR_HIDDEN | VAR_NOENUM );
aBaseLst.Insert(
- pClient = new RscClient( pHS->getID( "BOOL" ), RSC_NOTYPE,
+ pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE,
pFlag, nDisableId ),
LIST_APPEND );
nId = aNmTb.Put( "Disable", VARNAME );
@@ -279,7 +279,7 @@ RscTop * RscTypCont::InitClassWindow( RscTop * pSuper, RscEnum * pMapUnit,
VAR_NODATAINST, 0, nVarId );
aBaseLst.Insert(
- pClient = new RscClient( pHS->getID( "BOOL" ), RSC_NOTYPE,
+ pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE,
pFlag, nOutputSizeId ),
LIST_APPEND );
nId = aNmTb.Put( "OutputSize", VARNAME );
@@ -700,7 +700,7 @@ RscTop * RscTypCont::InitClassScrollBar( RscTop * pSuper )
{
RSCINST aDfltI;
- aDfltI = aShort.Create( NULL, RSCINST(), FALSE );
+ aDfltI = aShort.Create( NULL, RSCINST(), sal_False );
aDfltI.pClass->SetNumber( aDfltI, 100 );
// aDfltI.pClass->MakeDefault( aDfltI );
@@ -712,7 +712,7 @@ RscTop * RscTypCont::InitClassScrollBar( RscTop * pSuper )
{
RSCINST aDfltI;
- aDfltI = aShort.Create( NULL, RSCINST(), FALSE );
+ aDfltI = aShort.Create( NULL, RSCINST(), sal_False );
aDfltI.pClass->SetNumber( aDfltI, 1 );
// aDfltI.pClass->MakeDefault( aDfltI );
@@ -722,7 +722,7 @@ RscTop * RscTypCont::InitClassScrollBar( RscTop * pSuper )
{
RSCINST aDfltI;
- aDfltI = aShort.Create( NULL, RSCINST(), FALSE );
+ aDfltI = aShort.Create( NULL, RSCINST(), sal_False );
aDfltI.pClass->SetNumber( aDfltI, 1 );
// aDfltI.pClass->MakeDefault( aDfltI );
nId = aNmTb.Put( "LineSize", VARNAME );
@@ -762,8 +762,8 @@ RscTop * RscTypCont::InitClassListBox( RscTop * pSuper, RscArray * pStrLst )
INS_WINBIT(pClassListBox,DDExtraWidth)
{
- RSCINST aDflt = aUShort.Create( NULL, RSCINST(), FALSE );
- aDflt.pClass->SetNumber( aDflt, (USHORT)0xFFFF );
+ RSCINST aDflt = aUShort.Create( NULL, RSCINST(), sal_False );
+ aDflt.pClass->SetNumber( aDflt, (sal_uInt16)0xFFFF );
nId = aNmTb.Put( "CurPos", VARNAME );
pClassListBox->SetVariable( nId, &aUShort, &aDflt );
}
@@ -982,7 +982,7 @@ RscTop * RscTypCont::InitClassKeyCode( RscTop * pSuper, RscEnum * pKey )
// Clientvariablen einfuegen
aBaseLst.Insert(
- pClient = new RscClient( pHS->getID( "BOOL" ), RSC_NOTYPE,
+ pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE,
pFlag, nShiftId ),
LIST_APPEND );
nId = aNmTb.Put( "Shift", VARNAME );
@@ -990,7 +990,7 @@ RscTop * RscTypCont::InitClassKeyCode( RscTop * pSuper, RscEnum * pKey )
VAR_NODATAINST, 0, nVarId );
aBaseLst.Insert(
- pClient = new RscClient( pHS->getID( "BOOL" ), RSC_NOTYPE,
+ pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE,
pFlag, nMod1Id ),
LIST_APPEND );
nId = aNmTb.Put( "Modifier1", VARNAME );
@@ -999,7 +999,7 @@ RscTop * RscTypCont::InitClassKeyCode( RscTop * pSuper, RscEnum * pKey )
aBaseLst.Insert(
- pClient = new RscClient( pHS->getID( "BOOL" ), RSC_NOTYPE,
+ pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE,
pFlag, nMod2Id ),
LIST_APPEND );
nId = aNmTb.Put( "Modifier2", VARNAME );
@@ -1151,7 +1151,7 @@ RscTop * RscTypCont::InitClassMenuItem( RscTop * pSuper,
// Clientvariablen einfuegen
aBaseLst.Insert(
- pClient = new RscClient( pHS->getID( "BOOL" ), RSC_NOTYPE,
+ pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE,
pFlag, nCheckableId ),
LIST_APPEND );
nId = aNmTb.Put( "Checkable", VARNAME );
@@ -1159,7 +1159,7 @@ RscTop * RscTypCont::InitClassMenuItem( RscTop * pSuper,
VAR_NODATAINST, 0, nVarId );
aBaseLst.Insert(
- pClient = new RscClient( pHS->getID( "BOOL" ), RSC_NOTYPE,
+ pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE,
pFlag, nAutoCheckId ),
LIST_APPEND );
nId = aNmTb.Put( "AutoCheck", VARNAME );
@@ -1167,7 +1167,7 @@ RscTop * RscTypCont::InitClassMenuItem( RscTop * pSuper,
VAR_NODATAINST, 0, nVarId );
aBaseLst.Insert(
- pClient = new RscClient( pHS->getID( "BOOL" ), RSC_NOTYPE,
+ pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE,
pFlag, nRadioCheckId ),
LIST_APPEND );
nId = aNmTb.Put( "RadioCheck", VARNAME );
@@ -1175,7 +1175,7 @@ RscTop * RscTypCont::InitClassMenuItem( RscTop * pSuper,
VAR_NODATAINST, 0, nVarId );
aBaseLst.Insert(
- pClient = new RscClient( pHS->getID( "BOOL" ), RSC_NOTYPE,
+ pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE,
pFlag, nAboutId ),
LIST_APPEND );
nId = aNmTb.Put( "About", VARNAME );
@@ -1183,7 +1183,7 @@ RscTop * RscTypCont::InitClassMenuItem( RscTop * pSuper,
VAR_NODATAINST, 0, nVarId );
aBaseLst.Insert(
- pClient = new RscClient( pHS->getID( "BOOL" ), RSC_NOTYPE,
+ pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE,
pFlag, nHelpId ),
LIST_APPEND );
nId = aNmTb.Put( "Help", VARNAME );
@@ -1979,37 +1979,37 @@ RscTop * RscTypCont::InitClassToolBoxItem( RscTop * pSuper,
// Clientvariablen einfuegen
aBaseLst.Insert(
- pClient = new RscClient( pHS->getID( "BOOL" ), RSC_NOTYPE,
+ pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE,
pFlag, l_nCheckableId ), LIST_APPEND );
nId = aNmTb.Put( "Checkable", VARNAME );
pClassToolBoxItem->SetVariable( nId, pClient, NULL, VAR_NODATAINST, 0, l_nVarId );
aBaseLst.Insert(
- pClient = new RscClient( pHS->getID( "BOOL" ), RSC_NOTYPE,
+ pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE,
pFlag, l_nAutoCheckId ), LIST_APPEND );
nId = aNmTb.Put( "AutoCheck", VARNAME );
pClassToolBoxItem->SetVariable( nId, pClient, NULL, VAR_NODATAINST, 0, l_nVarId );
aBaseLst.Insert(
- pClient = new RscClient( pHS->getID( "BOOL" ), RSC_NOTYPE,
+ pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE,
pFlag, l_nRadioCheckId ), LIST_APPEND );
nId = aNmTb.Put( "RadioCheck", VARNAME );
pClassToolBoxItem->SetVariable( nId, pClient, NULL, VAR_NODATAINST, 0, l_nVarId );
aBaseLst.Insert(
- pClient = new RscClient( pHS->getID( "BOOL" ), RSC_NOTYPE,
+ pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE,
pFlag, l_nLeftId ), LIST_APPEND );
nId = aNmTb.Put( "Left", VARNAME );
pClassToolBoxItem->SetVariable( nId, pClient, NULL, VAR_NODATAINST, 0, l_nVarId );
aBaseLst.Insert(
- pClient = new RscClient( pHS->getID( "BOOL" ), RSC_NOTYPE,
+ pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE,
pFlag, l_nAutoSizeId ), LIST_APPEND );
nId = aNmTb.Put( "AutoSize", VARNAME );
pClassToolBoxItem->SetVariable( nId, pClient, NULL, VAR_NODATAINST, 0, l_nVarId );
aBaseLst.Insert(
- pClient = new RscClient( pHS->getID( "BOOL" ), RSC_NOTYPE,
+ pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE,
pFlag, l_nDropDownId ), LIST_APPEND );
nId = aNmTb.Put( "DropDown", VARNAME );
pClassToolBoxItem->SetVariable( nId, pClient, NULL, VAR_NODATAINST, 0, l_nVarId );
diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx
index aded8db5f865..a686fbb5a101 100644
--- a/rsc/source/parser/rscinit.cxx
+++ b/rsc/source/parser/rscinit.cxx
@@ -194,7 +194,7 @@ void RscTypCont::Init()
Atom nId;
- aNmTb.SetSort( FALSE );
+ aNmTb.SetSort( sal_False );
{
/********** C O M P I L E R T Y P E N ******************************/
aNmTb.Put( "LINE", LINE, (long)0 );
@@ -207,8 +207,8 @@ void RscTypCont::Init()
aNmTb.Put( "writeifset", WRITEIFSET, (long)0 );
/* Werte fuer Aufzaehlungstypen */
- aNmTb.Put( "TRUE", BOOLEAN, (long)TRUE );
- aNmTb.Put( "FALSE", BOOLEAN, (long)FALSE );
+ aNmTb.Put( "TRUE", BOOLEAN, (long)sal_True );
+ aNmTb.Put( "FALSE", BOOLEAN, (long)sal_False );
#if 0
/* Vordefinierte HilfeId's */
@@ -265,115 +265,115 @@ void RscTypCont::Init()
// Windows
nBorderId = pHS->getID( "WB_BORDER" );
- aWinBits.SetConstant( nBorderId, sal::static_int_cast<INT32>(WB_BORDER) );
+ aWinBits.SetConstant( nBorderId, sal::static_int_cast<sal_Int32>(WB_BORDER) );
nHideId = pHS->getID( "WB_HIDE" );
- aWinBits.SetConstant( nHideId, sal::static_int_cast<INT32>(WB_HIDE) );
+ aWinBits.SetConstant( nHideId, sal::static_int_cast<sal_Int32>(WB_HIDE) );
nClipChildrenId = pHS->getID( "WB_CLIPCHILDREN" );
- aWinBits.SetConstant( nClipChildrenId, sal::static_int_cast<INT32>(WB_CLIPCHILDREN) );
+ aWinBits.SetConstant( nClipChildrenId, sal::static_int_cast<sal_Int32>(WB_CLIPCHILDREN) );
nSizeableId = pHS->getID( "WB_SIZEABLE" );
- aWinBits.SetConstant( nSizeableId, sal::static_int_cast<INT32>(WB_SIZEABLE) );
+ aWinBits.SetConstant( nSizeableId, sal::static_int_cast<sal_Int32>(WB_SIZEABLE) );
nMoveableId = pHS->getID( "WB_MOVEABLE" );
- aWinBits.SetConstant( nMoveableId, sal::static_int_cast<INT32>(WB_MOVEABLE) );
+ aWinBits.SetConstant( nMoveableId, sal::static_int_cast<sal_Int32>(WB_MOVEABLE) );
nMinimizeId = pHS->getID( "WB_MINABLE" );
aWinBits.SetConstant( nMinimizeId, 0 /*WB_MINABLE*/ );
nMaximizeId = pHS->getID( "WB_MAXABLE" );
aWinBits.SetConstant( nMaximizeId, 0 /*WB_MAXABLE*/ );
nCloseableId = pHS->getID( "WB_CLOSEABLE" );
- aWinBits.SetConstant( nCloseableId, sal::static_int_cast<INT32>(WB_CLOSEABLE) );
+ aWinBits.SetConstant( nCloseableId, sal::static_int_cast<sal_Int32>(WB_CLOSEABLE) );
nAppId = pHS->getID( "WB_APP" );
- aWinBits.SetConstant( nAppId, sal::static_int_cast<INT32>(WB_APP) );
+ aWinBits.SetConstant( nAppId, sal::static_int_cast<sal_Int32>(WB_APP) );
nTabstopId = pHS->getID( "WB_TABSTOP" );
- aWinBits.SetConstant( nTabstopId, sal::static_int_cast<INT32>(WB_TABSTOP) );
+ aWinBits.SetConstant( nTabstopId, sal::static_int_cast<sal_Int32>(WB_TABSTOP) );
nGroupId = pHS->getID( "WB_GROUP" );
- aWinBits.SetConstant( nGroupId, sal::static_int_cast<INT32>(WB_GROUP) );
+ aWinBits.SetConstant( nGroupId, sal::static_int_cast<sal_Int32>(WB_GROUP) );
nSysmodalId = pHS->getID( "WB_SYSMODAL" );
aWinBits.SetConstant( nSysmodalId, 0 /*WB_SYSMODAL*/ );
}
{
nLeftId = pHS->getID( "WB_LEFT" );
- aWinBits.SetConstant( nLeftId, sal::static_int_cast<INT32>(WB_LEFT) );
+ aWinBits.SetConstant( nLeftId, sal::static_int_cast<sal_Int32>(WB_LEFT) );
nCenterId = pHS->getID( "WB_CENTER" );
- aWinBits.SetConstant( nCenterId, sal::static_int_cast<INT32>(WB_CENTER) );
+ aWinBits.SetConstant( nCenterId, sal::static_int_cast<sal_Int32>(WB_CENTER) );
nRightId = pHS->getID( "WB_RIGHT" );
- aWinBits.SetConstant( nRightId, sal::static_int_cast<INT32>(WB_RIGHT) );
+ aWinBits.SetConstant( nRightId, sal::static_int_cast<sal_Int32>(WB_RIGHT) );
nTopId = pHS->getID( "WB_TOP" );
- aWinBits.SetConstant( nTopId, sal::static_int_cast<INT32>(WB_TOP) );
+ aWinBits.SetConstant( nTopId, sal::static_int_cast<sal_Int32>(WB_TOP) );
nVCenterId = pHS->getID( "WB_VCENTER" );
- aWinBits.SetConstant( nVCenterId, sal::static_int_cast<INT32>(WB_VCENTER) );
+ aWinBits.SetConstant( nVCenterId, sal::static_int_cast<sal_Int32>(WB_VCENTER) );
nBottomId = pHS->getID( "WB_BOTTOM" );
- aWinBits.SetConstant( nBottomId, sal::static_int_cast<INT32>(WB_BOTTOM) );
+ aWinBits.SetConstant( nBottomId, sal::static_int_cast<sal_Int32>(WB_BOTTOM) );
nHScrollId = pHS->getID( "WB_HSCROLL" );
- aWinBits.SetConstant( nHScrollId, sal::static_int_cast<INT32>(WB_HSCROLL) );
+ aWinBits.SetConstant( nHScrollId, sal::static_int_cast<sal_Int32>(WB_HSCROLL) );
nVScrollId = pHS->getID( "WB_VSCROLL" );
- aWinBits.SetConstant( nVScrollId, sal::static_int_cast<INT32>(WB_VSCROLL) );
+ aWinBits.SetConstant( nVScrollId, sal::static_int_cast<sal_Int32>(WB_VSCROLL) );
nSortId = pHS->getID( "WB_SORT" );
- aWinBits.SetConstant( nSortId, sal::static_int_cast<INT32>(WB_SORT) );
+ aWinBits.SetConstant( nSortId, sal::static_int_cast<sal_Int32>(WB_SORT) );
nDefaultId = pHS->getID( "WB_DEFBUTTON" );
- aWinBits.SetConstant( nDefaultId, sal::static_int_cast<INT32>(WB_DEFBUTTON) );
+ aWinBits.SetConstant( nDefaultId, sal::static_int_cast<sal_Int32>(WB_DEFBUTTON) );
nRepeatId = pHS->getID( "WB_REPEAT" );
- aWinBits.SetConstant( nRepeatId, sal::static_int_cast<INT32>(WB_REPEAT) );
+ aWinBits.SetConstant( nRepeatId, sal::static_int_cast<sal_Int32>(WB_REPEAT) );
nSVLookId = pHS->getID( "WB_SVLOOK" );
- aWinBits.SetConstant( nSVLookId, sal::static_int_cast<INT32>(WB_3DLOOK) );
+ aWinBits.SetConstant( nSVLookId, sal::static_int_cast<sal_Int32>(WB_3DLOOK) );
nDropDownId = pHS->getID( "WB_DROPDOWN" );
- aWinBits.SetConstant( nDropDownId, sal::static_int_cast<INT32>(WB_DROPDOWN) );
+ aWinBits.SetConstant( nDropDownId, sal::static_int_cast<sal_Int32>(WB_DROPDOWN) );
nPassWordId = pHS->getID( "WB_PASSWORD" );
- aWinBits.SetConstant( nPassWordId, sal::static_int_cast<INT32>(WB_PASSWORD) );
+ aWinBits.SetConstant( nPassWordId, sal::static_int_cast<sal_Int32>(WB_PASSWORD) );
nReadOnlyId = pHS->getID( "WB_READONLY" );
- aWinBits.SetConstant( nReadOnlyId, sal::static_int_cast<INT32>(WB_READONLY) );
+ aWinBits.SetConstant( nReadOnlyId, sal::static_int_cast<sal_Int32>(WB_READONLY) );
nAutoSizeId = pHS->getID( "WB_AUTOSIZE" );
- aWinBits.SetConstant( nAutoSizeId, sal::static_int_cast<INT32>(WB_AUTOSIZE) );
+ aWinBits.SetConstant( nAutoSizeId, sal::static_int_cast<sal_Int32>(WB_AUTOSIZE) );
nSpinId = pHS->getID( "WB_SPIN" );
- aWinBits.SetConstant( nSpinId, sal::static_int_cast<INT32>(WB_SPIN) );
+ aWinBits.SetConstant( nSpinId, sal::static_int_cast<sal_Int32>(WB_SPIN) );
nTabControlId = pHS->getID( "WB_DIALOGCONTROL" );
- aWinBits.SetConstant( nTabControlId, sal::static_int_cast<INT32>(WB_DIALOGCONTROL) );
+ aWinBits.SetConstant( nTabControlId, sal::static_int_cast<sal_Int32>(WB_DIALOGCONTROL) );
nSimpleModeId = pHS->getID( "WB_SIMPLEMODE" );
- aWinBits.SetConstant( nSimpleModeId, sal::static_int_cast<INT32>(WB_SIMPLEMODE) );
+ aWinBits.SetConstant( nSimpleModeId, sal::static_int_cast<sal_Int32>(WB_SIMPLEMODE) );
nDragId = pHS->getID( "WB_DRAG" );
- aWinBits.SetConstant( nDragId, sal::static_int_cast<INT32>(WB_DRAG) );
+ aWinBits.SetConstant( nDragId, sal::static_int_cast<sal_Int32>(WB_DRAG) );
nScrollId = pHS->getID( "WB_SCROLL" );
- aWinBits.SetConstant( nScrollId, sal::static_int_cast<INT32>(WB_SCROLL) );
+ aWinBits.SetConstant( nScrollId, sal::static_int_cast<sal_Int32>(WB_SCROLL) );
nZoomableId = pHS->getID( "WB_ZOOMABLE" );
- aWinBits.SetConstant( nZoomableId, sal::static_int_cast<INT32>(WB_ROLLABLE) );
+ aWinBits.SetConstant( nZoomableId, sal::static_int_cast<sal_Int32>(WB_ROLLABLE) );
nHideWhenDeactivateId = pHS->getID( "WB_HIDEWHENDEACTIVATE" );
aWinBits.SetConstant( nHideWhenDeactivateId, 0 /*WB_HIDEWHENDEACTIVATE*/ );
nAutoHScrollId = pHS->getID( "WB_AUTOHSCROLL" );
- aWinBits.SetConstant( nAutoHScrollId, sal::static_int_cast<INT32>(WB_AUTOHSCROLL) );
+ aWinBits.SetConstant( nAutoHScrollId, sal::static_int_cast<sal_Int32>(WB_AUTOHSCROLL) );
nAutoVScrollId = pHS->getID( "WB_AUTOVSCROLL" );
- aWinBits.SetConstant( nAutoVScrollId, sal::static_int_cast<INT32>(WB_AUTOVSCROLL) );
+ aWinBits.SetConstant( nAutoVScrollId, sal::static_int_cast<sal_Int32>(WB_AUTOVSCROLL) );
nDDExtraWidthId = pHS->getID( "WB_DDEXTRAWIDTH" );
aWinBits.SetConstant( nDDExtraWidthId, 0 /*WB_DDEXTRAWIDTH*/ );
nWordBreakId = pHS->getID( "WB_WORDBREAK" );
- aWinBits.SetConstant( nWordBreakId, sal::static_int_cast<INT32>(WB_WORDBREAK) );
+ aWinBits.SetConstant( nWordBreakId, sal::static_int_cast<sal_Int32>(WB_WORDBREAK) );
nLeftLabelId = pHS->getID( "WB_LEFTLABEL" );
aWinBits.SetConstant( nLeftLabelId, 0 /*WB_LEFTLABEL*/ );
nHasLinesId = pHS->getID( "WB_HASLINES" );
- aWinBits.SetConstant( nHasLinesId, sal::static_int_cast<INT32>(WB_HASLINES) );
+ aWinBits.SetConstant( nHasLinesId, sal::static_int_cast<sal_Int32>(WB_HASLINES) );
nHasButtonsId = pHS->getID( "WB_HASBUTTONS" );
- aWinBits.SetConstant( nHasButtonsId, sal::static_int_cast<INT32>(WB_HASBUTTONS) );
+ aWinBits.SetConstant( nHasButtonsId, sal::static_int_cast<sal_Int32>(WB_HASBUTTONS) );
nRectStyleId = pHS->getID( "WB_RECTSTYLE" );
- aWinBits.SetConstant( nRectStyleId, sal::static_int_cast<INT32>(WB_RECTSTYLE) );
+ aWinBits.SetConstant( nRectStyleId, sal::static_int_cast<sal_Int32>(WB_RECTSTYLE) );
nLineSpacingId = pHS->getID( "WB_LINESPACING" );
- aWinBits.SetConstant( nLineSpacingId, sal::static_int_cast<INT32>(WB_LINESPACING) );
+ aWinBits.SetConstant( nLineSpacingId, sal::static_int_cast<sal_Int32>(WB_LINESPACING) );
nSmallStyleId = pHS->getID( "WB_SMALLSTYLE" );
- aWinBits.SetConstant( nSmallStyleId, sal::static_int_cast<INT32>(WB_SMALLSTYLE) );
+ aWinBits.SetConstant( nSmallStyleId, sal::static_int_cast<sal_Int32>(WB_SMALLSTYLE) );
nEnableResizingId = pHS->getID( "WB_ENABLERESIZING" );
aWinBits.SetConstant( nEnableResizingId, 0 /*WB_ENABLERESIZING*/ );
nDockableId = pHS->getID( "WB_DOCKABLE" );
- aWinBits.SetConstant( nDockableId, sal::static_int_cast<INT32>(WB_DOCKABLE) );
+ aWinBits.SetConstant( nDockableId, sal::static_int_cast<sal_Int32>(WB_DOCKABLE) );
nScaleId = pHS->getID( "WB_SCALE" );
- aWinBits.SetConstant( nScaleId, sal::static_int_cast<INT32>(WB_SCALE) );
+ aWinBits.SetConstant( nScaleId, sal::static_int_cast<sal_Int32>(WB_SCALE) );
nIgnoreTabId = pHS->getID( "WB_IGNORETAB" );
- aWinBits.SetConstant( nIgnoreTabId, sal::static_int_cast<INT32>(WB_IGNORETAB) );
+ aWinBits.SetConstant( nIgnoreTabId, sal::static_int_cast<sal_Int32>(WB_IGNORETAB) );
nNoSplitDrawId = pHS->getID( "WB_NOSPLITDRAW" );
- aWinBits.SetConstant( nNoSplitDrawId, sal::static_int_cast<INT32>(WB_NOSPLITDRAW) );
+ aWinBits.SetConstant( nNoSplitDrawId, sal::static_int_cast<sal_Int32>(WB_NOSPLITDRAW) );
nTopImageId = pHS->getID( "WB_TOPIMAGE" );
- aWinBits.SetConstant( nTopImageId, sal::static_int_cast<INT32>(WB_TOPIMAGE) );
+ aWinBits.SetConstant( nTopImageId, sal::static_int_cast<sal_Int32>(WB_TOPIMAGE) );
nNoLabelId = pHS->getID( "WB_NOLABEL" );
- aWinBits.SetConstant( nNoLabelId, sal::static_int_cast<INT32>(WB_NOLABEL) );
+ aWinBits.SetConstant( nNoLabelId, sal::static_int_cast<sal_Int32>(WB_NOLABEL) );
nVertId = pHS->getID( "WB_VERT" );
- aWinBits.SetConstant( nVertId, sal::static_int_cast<INT32>(WB_VERT) );
+ aWinBits.SetConstant( nVertId, sal::static_int_cast<sal_Int32>(WB_VERT) );
nSysWinId = pHS->getID( "WB_SYSTEMWINDOW" );
- aWinBits.SetConstant( nSysWinId, sal::static_int_cast<INT32>(WB_SYSTEMWINDOW) );
+ aWinBits.SetConstant( nSysWinId, sal::static_int_cast<sal_Int32>(WB_SYSTEMWINDOW) );
}
{
/********** I n i t B a s i c T y p e s **************************/
@@ -702,7 +702,7 @@ void RscTypCont::Init()
// Clientvariablen einfuegen
// Sysmodal
aBaseLst.Insert(
- pClient = new RscClient( pHS->getID( "BOOL" ), RSC_NOTYPE,
+ pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE,
&aWinBits, nRepeatId ),
LIST_APPEND );
nId = aNmTb.Put( "Repeat", VARNAME );
diff --git a/rsc/source/parser/rsckey.cxx b/rsc/source/parser/rsckey.cxx
index 4a42bea138bf..2108b0f349dc 100644
--- a/rsc/source/parser/rsckey.cxx
+++ b/rsc/source/parser/rsckey.cxx
@@ -78,7 +78,7 @@ int KeyCompare( const void * pFirst, const void * pSecond ){
|*
*************************************************************************/
RscNameTable::RscNameTable() {
- bSort = TRUE;
+ bSort = sal_True;
nEntries = 0;
pTable = NULL;
};
@@ -107,7 +107,7 @@ RscNameTable::~RscNameTable() {
|* Letzte Aenderung MM 28.02.91
|*
*************************************************************************/
-void RscNameTable::SetSort( BOOL bSorted ){
+void RscNameTable::SetSort( sal_Bool bSorted ){
bSort = bSorted;
if( bSort && pTable){
// Schluesselwort Feld sortieren
@@ -180,7 +180,7 @@ Atom RscNameTable::Put( const char * pName, sal_uInt32 nTyp, RscTop * pClass )
|* Letzte Aenderung MM 28.02.91
|*
*************************************************************************/
-BOOL RscNameTable::Get( Atom nName, KEY_STRUCT * pEle ){
+sal_Bool RscNameTable::Get( Atom nName, KEY_STRUCT * pEle ){
KEY_STRUCT * pKey = NULL;
KEY_STRUCT aSearchName;
sal_uInt32 i;
@@ -207,8 +207,8 @@ BOOL RscNameTable::Get( Atom nName, KEY_STRUCT * pEle ){
if( pKey ){ // Schluesselwort gefunden
*pEle = *pKey;
- return( TRUE );
+ return( sal_True );
};
- return( FALSE );
+ return( sal_False );
};
diff --git a/rsc/source/parser/rsclex.cxx b/rsc/source/parser/rsclex.cxx
index 76ec4c551d52..c8e02d792c6b 100755
--- a/rsc/source/parser/rsclex.cxx
+++ b/rsc/source/parser/rsclex.cxx
@@ -64,7 +64,7 @@ const char* StringContainer::putString( const char* pString )
/*************************************************************************/
int c;
-BOOL bLastInclude;// War letztes Symbol INCLUDE
+sal_Bool bLastInclude;// War letztes Symbol INCLUDE
RscFileInst* pFI;
RscTypCont* pTC;
RscExpression * pExp;
@@ -72,15 +72,15 @@ struct KeyVal {
int nKeyWord;
YYSTYPE aYYSType;
} aKeyVal[ 1 ];
-BOOL bTargetDefined;
+sal_Bool bTargetDefined;
StringContainer* pStringContainer = NULL;
/****************** C O D E **********************************************/
-UINT32 GetNumber(){
- UINT32 l = 0;
- UINT32 nLog = 10;
+sal_uInt32 GetNumber(){
+ sal_uInt32 l = 0;
+ sal_uInt32 nLog = 10;
if( '0' == c ){
c = pFI->GetFastChar();
@@ -119,7 +119,7 @@ int MakeToken( YYSTYPE * pTokenVal ){
int c1;
char * pStr;
- while( TRUE ){ // Kommentare und Leerzeichen ueberlesen
+ while( sal_True ){ // Kommentare und Leerzeichen ueberlesen
while( isspace( c ) )
c = pFI->GetFastChar();
if( '/' == c ){
@@ -151,7 +151,7 @@ int MakeToken( YYSTYPE * pTokenVal ){
}
if( bLastInclude ){
- bLastInclude = FALSE; //Zuruecksetzten
+ bLastInclude = sal_False; //Zuruecksetzten
if( '<' == c ){
OStringBuffer aBuf( 256 );
c = pFI->GetFastChar();
@@ -169,7 +169,7 @@ int MakeToken( YYSTYPE * pTokenVal ){
if( c == '"' )
{
OStringBuffer aBuf( 256 );
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
while( !bDone && !pFI->IsEof() && c )
{
c = pFI->GetFastChar();
@@ -187,7 +187,7 @@ int MakeToken( YYSTYPE * pTokenVal ){
// see rscyacc.y
}
else
- bDone = TRUE;
+ bDone = sal_True;
}
else if( c == '\\' )
{
@@ -240,10 +240,10 @@ int MakeToken( YYSTYPE * pTokenVal ){
pTokenVal->constname.nValue = aKey.yylval;
break;
case BOOLEAN:
- pTokenVal->svbool = (BOOL)aKey.yylval;
+ pTokenVal->svbool = (sal_Bool)aKey.yylval;
break;
case INCLUDE:
- bLastInclude = TRUE;
+ bLastInclude = sal_True;
default:
pTokenVal->value = aKey.yylval;
};
@@ -307,7 +307,7 @@ int yylex()
#endif
{
if( bTargetDefined )
- bTargetDefined = FALSE;
+ bTargetDefined = sal_False;
else
aKeyVal[ 0 ].nKeyWord =
MakeToken( &aKeyVal[ 0 ].aYYSType );
@@ -335,10 +335,10 @@ void InitParser( RscFileInst * pFileInst )
pFI = pFileInst;
pStringContainer = new StringContainer();
pExp = NULL; //fuer MacroParser
- bTargetDefined = FALSE;
+ bTargetDefined = sal_False;
// Anfangszeichen initialisieren
- bLastInclude = FALSE;
+ bLastInclude = sal_False;
c = pFI->GetFastChar();
}
@@ -364,7 +364,7 @@ void IncludeParser( RscFileInst * pFileInst )
int nToken; // Wert des Tokens
YYSTYPE aYYSType; // Daten des Tokens
RscFile * pFName; // Filestruktur
- ULONG lKey; // Fileschluessel
+ sal_uLong lKey; // Fileschluessel
RscTypCont * pTypCon = pFileInst->pTypCont;
pFName = pTypCon->aFileTab.Get( pFileInst->GetFileIndex() );
@@ -420,7 +420,7 @@ RscExpression * MacroParser( RscFileInst & rFileInst )
//Ziel auf macro_expression setzen
aKeyVal[ 0 ].nKeyWord = MACROTARGET;
- bTargetDefined = TRUE;
+ bTargetDefined = sal_True;
aError = yyparse();
pExpression = pExp;
diff --git a/rsc/source/parser/rsclex.hxx b/rsc/source/parser/rsclex.hxx
index 06c04f4126a3..ebda82aa4fdd 100644
--- a/rsc/source/parser/rsclex.hxx
+++ b/rsc/source/parser/rsclex.hxx
@@ -76,7 +76,7 @@ class ObjectStack {
ObjectStack () { pRoot = NULL; }
const RSCINST & Top () { return pRoot->aInst; }
- BOOL IsEmpty() { return( pRoot == NULL ); }
+ sal_Bool IsEmpty() { return( pRoot == NULL ); }
void IncTupelRec() { pRoot->nTupelRec++; }
void DecTupelRec() { pRoot->nTupelRec--; }
sal_uInt32 TupelRecCount() const { return pRoot->nTupelRec; }
diff --git a/rsc/source/parser/rscpar.cxx b/rsc/source/parser/rscpar.cxx
index 22606e2f8bf2..c7c09f8275da 100644
--- a/rsc/source/parser/rscpar.cxx
+++ b/rsc/source/parser/rscpar.cxx
@@ -52,7 +52,7 @@ void RscFileInst::Init()
*pLine = '\0';
nScanPos = 0;
cLastChar = '\0';
- bEof = FALSE;
+ bEof = sal_False;
};
/*************************************************************************
@@ -64,8 +64,8 @@ void RscFileInst::Init()
|* Letzte Aenderung MM 06.06.91
|*
*************************************************************************/
-RscFileInst::RscFileInst( RscTypCont * pTC, ULONG lIndexSrc,
- ULONG lFIndex, FILE * fFile )
+RscFileInst::RscFileInst( RscTypCont * pTC, sal_uLong lIndexSrc,
+ sal_uLong lFIndex, FILE * fFile )
{
pTypCont = pTC;
Init();
@@ -79,8 +79,8 @@ RscFileInst::RscFileInst( RscTypCont * pTC, ULONG lIndexSrc,
pInput = (char *)rtl_allocateMemory( nInputBufLen );
}
-RscFileInst::RscFileInst( RscTypCont * pTC, ULONG lIndexSrc,
- ULONG lFIndex, const ByteString& rBuf )
+RscFileInst::RscFileInst( RscTypCont * pTC, sal_uLong lIndexSrc,
+ sal_uLong lFIndex, const ByteString& rBuf )
{
pTypCont = pTC;
Init();
@@ -128,7 +128,7 @@ int RscFileInst::GetChar()
else if( nInputPos >= nInputEndPos && nInputEndPos != nInputBufLen )
{
// Dateiende
- bEof = TRUE;
+ bEof = sal_True;
return 0;
}
else
diff --git a/rsc/source/parser/rscyacc.cxx b/rsc/source/parser/rscyacc.cxx
index 0d5cc8faef0e..63be87f43649 100644
--- a/rsc/source/parser/rscyacc.cxx
+++ b/rsc/source/parser/rscyacc.cxx
@@ -63,7 +63,7 @@ RSCINST GetVarInst( const RSCINST & rInst, const char * pVarName )
return( aInst );
}
-void SetNumber( const RSCINST & rInst, const char * pVarName, INT32 lValue )
+void SetNumber( const RSCINST & rInst, const char * pVarName, sal_Int32 lValue )
{
RSCINST aInst;
@@ -79,7 +79,7 @@ void SetNumber( const RSCINST & rInst, const char * pVarName, INT32 lValue )
}
void SetConst( const RSCINST & rInst, const char * pVarName,
- Atom nValueId, INT32 nVal )
+ Atom nValueId, sal_Int32 nVal )
{
RSCINST aInst;
@@ -111,11 +111,11 @@ void SetString( const RSCINST & rInst, const char * pVarName, const char * pStr
RscId MakeRscId( RscExpType aExpType )
{
if( !aExpType.IsNothing() ){
- INT32 lValue;
+ sal_Int32 lValue;
if( !aExpType.Evaluate( &lValue ) )
pTC->pEH->Error( ERR_ZERODIVISION, NULL, RscId() );
- if( lValue < 1 || lValue > (INT32)0x7FFF )
+ if( lValue < 1 || lValue > (sal_Int32)0x7FFF )
{
pTC->pEH->Error( ERR_IDRANGE, NULL, RscId(),
ByteString::CreateFromInt32( lValue ).GetBuffer() );
@@ -129,7 +129,7 @@ RscId MakeRscId( RscExpType aExpType )
return RscId();
}
-BOOL DoClassHeader( RSCHEADER * pHeader, BOOL bMember )
+sal_Bool DoClassHeader( RSCHEADER * pHeader, sal_Bool bMember )
{
RSCINST aCopyInst;
RscId aName1 = MakeRscId( pHeader->nName1 );
@@ -177,7 +177,7 @@ BOOL DoClassHeader( RSCHEADER * pHeader, BOOL bMember )
{
if( S.IsEmpty() )
{
- if( (INT32)aName1 < 256 )
+ if( (sal_Int32)aName1 < 256 )
pTC->pEH->Error( WRN_GLOBALID, pHeader->pClass, aName1 );
if( aCopyInst.IsInst() )
@@ -199,7 +199,7 @@ BOOL DoClassHeader( RSCHEADER * pHeader, BOOL bMember )
RSCINST aTmpI;
ERRTYPE aError;
- if( (INT32)aName1 >= 256 && aName1.IsId() )
+ if( (sal_Int32)aName1 >= 256 && aName1.IsId() )
pTC->pEH->Error( WRN_LOCALID, pHeader->pClass, aName1 );
aError = S.Top().pClass->GetElement( S.Top(), aName1,
pHeader->pClass, aCopyInst, &aTmpI );
@@ -217,7 +217,7 @@ BOOL DoClassHeader( RSCHEADER * pHeader, BOOL bMember )
pHeader->pClass, RSCINST(), &aTmpI );
if( !aTmpI.IsInst() )
- return( FALSE );
+ return( sal_False );
}
S.Push( aTmpI );
};
@@ -230,7 +230,7 @@ BOOL DoClassHeader( RSCHEADER * pHeader, BOOL bMember )
pTC->pEH->Error( aError, S.Top().pClass, aName1 );
}
- return( TRUE );
+ return( sal_True );
}
RSCINST GetFirstTupelEle( const RSCINST & rTop )
diff --git a/rsc/source/parser/rscyacc.y b/rsc/source/parser/rscyacc.y
index a522d7416782..329884e498b6 100644
--- a/rsc/source/parser/rscyacc.y
+++ b/rsc/source/parser/rscyacc.y
@@ -39,7 +39,7 @@
Atom varid;
struct {
Atom hashid;
- INT32 nValue;
+ sal_Int32 nValue;
} constname;
RscTop * pClass;
RSCHEADER header;
@@ -47,11 +47,11 @@
CLASS_DATA pData;
RscTop * pClass;
} instance;
- INT32 value;
- USHORT ushort;
+ sal_Int32 value;
+ sal_uInt16 ushort;
short exp_short;
char * string;
- BOOL svbool;
+ sal_Bool svbool;
REF_ENUM copyref;
RscDefine * defineele;
CharSet charset;
@@ -130,7 +130,7 @@ resource_definitions
| MACROTARGET macro_expression
{
RscExpType aExpType;
- INT32 lValue;
+ sal_Int32 lValue;
aExpType.cType = RSCEXP_NOTHING;
pExp = new RscExpression( aExpType, '+', $2 );
@@ -143,13 +143,13 @@ resource_definition
: line_number
| '#' DEFINE SYMBOL macro_expression
{
- BOOL bError = FALSE;
+ sal_Bool bError = sal_False;
if( $4.IsNumber() ){
if( !pTC->aFileTab.NewDef( pFI->GetFileIndex(),
ByteString( $3 ),
$4.GetLong(), LIST_APPEND ) )
- bError = TRUE;
+ bError = sal_True;
}
else if( $4.IsDefinition() ){
RscExpType aExpType;
@@ -162,13 +162,13 @@ resource_definition
if( !pTC->aFileTab.NewDef( pFI->GetFileIndex(),
ByteString( $3 ), pExpr, LIST_APPEND ) )
- bError = TRUE;
+ bError = sal_True;
}
else if( $4.IsExpression() ){
if( !pTC->aFileTab.NewDef( pFI->GetFileIndex(),
ByteString( $3 ), $4.aExp.pExp,
LIST_APPEND ) )
- bError = TRUE;
+ bError = sal_True;
}
if( bError ){
@@ -200,7 +200,7 @@ resource_definition
new_class_definition_header
: CLASS SYMBOL id_expression ':' CLASSNAME
{
- INT32 lType;
+ sal_Int32 lType;
$3.Evaluate( &lType );
@@ -319,7 +319,7 @@ class_definition
class_header
: class_header_body
{
- if( !DoClassHeader( &$1, FALSE ) )
+ if( !DoClassHeader( &$1, sal_False ) )
return( ERR_ERROR );
$$ = $1;
}
@@ -528,7 +528,7 @@ var_header_class
{
RSCINST aInst;
- aInst = S.Top().pClass->GetVariable( S.Top(), $1, RSCINST(), FALSE, $3.pClass );
+ aInst = S.Top().pClass->GetVariable( S.Top(), $1, RSCINST(), sal_False, $3.pClass );
if( aInst.pData )
S.Push( aInst );
@@ -539,7 +539,7 @@ var_header_class
return( ERR_ERROR );
};
- if( !DoClassHeader( &$3, TRUE ) )
+ if( !DoClassHeader( &$3, sal_True ) )
return( ERR_ERROR );
$$ = $3;
}
@@ -567,7 +567,7 @@ var_header_class
pHS->getString( $1 ) );
return( ERR_ERROR );
};
- if( !DoClassHeader( &$6, TRUE ) )
+ if( !DoClassHeader( &$6, sal_True ) )
return( ERR_ERROR );
$$ = $6;
}
@@ -596,7 +596,7 @@ var_header_class
pHS->getString( $1 ) );
return( ERR_ERROR );
};
- if( !DoClassHeader( &$6, TRUE ) )
+ if( !DoClassHeader( &$6, sal_True ) )
return( ERR_ERROR );
$$ = $6;
}
@@ -784,7 +784,7 @@ list
var_bodysimple
: macro_expression
{
- INT32 l;
+ sal_Int32 l;
ERRTYPE aError;
if( !$1.Evaluate( &l ) )
@@ -1064,7 +1064,7 @@ id_expression
| macro_expression
{ // pExpession auswerten und loeschen
if( RSCEXP_EXP == $1.cType ){
- INT32 lValue;
+ sal_Int32 lValue;
if( !$1.Evaluate( &lValue ) )
pTC->pEH->Error( ERR_ZERODIVISION, NULL, RscId() );
@@ -1094,8 +1094,8 @@ line_number
pFI->SetLineNo( $3 );
pFI->SetFileIndex( pTC->aFileTab.NewCodeFile( ByteString( $4 ) ) );
pFName = pTC->aFileTab.Get( pFI->GetFileIndex() );
- pFName->bLoaded = TRUE;
- pFName->bScanned = TRUE;
+ pFName->bLoaded = sal_True;
+ pFName->bScanned = sal_True;
}
| '#' NUMBER STRING DUMMY_NUMBER
{
@@ -1104,8 +1104,8 @@ line_number
pFI->SetLineNo( $2 );
pFI->SetFileIndex( pTC->aFileTab.NewCodeFile( ByteString( $3 ) ) );
pFName = pTC->aFileTab.Get( pFI->GetFileIndex() );
- pFName->bLoaded = TRUE;
- pFName->bScanned = TRUE;
+ pFName->bLoaded = sal_True;
+ pFName->bScanned = sal_True;
}
| '#' NUMBER
{
diff --git a/rsc/source/prj/start.cxx b/rsc/source/prj/start.cxx
index a2841dd9765b..e25f68cff10a 100644
--- a/rsc/source/prj/start.cxx
+++ b/rsc/source/prj/start.cxx
@@ -89,11 +89,11 @@
|*
|* Beschreibung
*************************************************************************/
-static BOOL CallPrePro( const ByteString& rPrePro,
+static sal_Bool CallPrePro( const ByteString& rPrePro,
const ByteString& rInput,
const ByteString& rOutput,
RscPtrPtr * pCmdLine,
- BOOL bResponse )
+ sal_Bool bResponse )
{
RscPtrPtr aNewCmdL; // Kommandozeile
RscPtrPtr aRespCmdL; // Kommandozeile
@@ -193,9 +193,9 @@ static BOOL CallPrePro( const ByteString& rPrePro,
unlink( aRspFileName.GetBuffer() );
#endif
if ( nExit )
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
@@ -204,7 +204,7 @@ static BOOL CallPrePro( const ByteString& rPrePro,
|*
|* Beschreibung
*************************************************************************/
-static BOOL CallRsc2( ByteString aRsc2Name,
+static sal_Bool CallRsc2( ByteString aRsc2Name,
RscStrList * pInputList,
ByteString aSrsName,
RscPtrPtr * pCmdLine )
@@ -310,8 +310,8 @@ static BOOL CallRsc2( ByteString aRsc2Name,
unlink( aRspFileName.GetBuffer() );
#endif
if( nExit )
- return( FALSE );
- return( TRUE );
+ return( sal_False );
+ return( sal_True );
}
/*************************************************************************
@@ -325,11 +325,11 @@ static BOOL CallRsc2( ByteString aRsc2Name,
*************************************************************************/
SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
{
- BOOL bPrePro = TRUE;
- BOOL bResFile = TRUE;
- BOOL bHelp = FALSE;
- BOOL bError = FALSE;
- BOOL bResponse = FALSE;
+ sal_Bool bPrePro = sal_True;
+ sal_Bool bResFile = sal_True;
+ sal_Bool bHelp = sal_False;
+ sal_Bool bError = sal_False;
+ sal_Bool bResponse = sal_False;
ByteString aSolarbin(getenv("SOLARBINDIR"));
ByteString aDelim("/");
ByteString aPrePro; //( aSolarbin + aDelim + ByteString("rscpp"));
@@ -362,7 +362,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
ppStr = (char **)aCmdLine.GetBlock();
ppStr++;
i = 1;
- BOOL bSetSrs = FALSE;
+ sal_Bool bSetSrs = sal_False;
while( ppStr && i < (aCmdLine.GetCount() -1) )
{
if( '-' == **ppStr )
@@ -370,20 +370,20 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
if( !rsc_stricmp( (*ppStr) + 1, "p" )
|| !rsc_stricmp( (*ppStr) + 1, "l" ) )
{ // kein Preprozessor
- bPrePro = FALSE;
+ bPrePro = sal_False;
}
else if( !rsc_stricmp( (*ppStr) + 1, "r" )
|| !rsc_stricmp( (*ppStr) + 1, "s" ) )
{ // erzeugt kein .res-file
- bResFile = FALSE;
+ bResFile = sal_False;
}
else if( !rsc_stricmp( (*ppStr) + 1, "h" ) )
{ // Hilfe anzeigen
- bHelp = TRUE;
+ bHelp = sal_True;
}
else if( !rsc_strnicmp( (*ppStr) + 1, "presponse", 9 ) )
{ // anderer Name fuer den Preprozessor
- bResponse = TRUE;
+ bResponse = sal_True;
}
else if( !rsc_strnicmp( (*ppStr) + 1, "pp=", 3 ) )
{ // anderer Name fuer den Preprozessor
@@ -399,7 +399,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
}
else if( !rsc_strnicmp( (*ppStr) + 1, "fp=", 3 ) )
{ // anderer Name fuer .srs-file
- bSetSrs = TRUE;
+ bSetSrs = sal_True;
aSrsName = (*ppStr);
}
}
@@ -426,8 +426,8 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
if( bHelp )
{
- bPrePro = FALSE;
- bResFile = FALSE;
+ bPrePro = sal_False;
+ bResFile = sal_False;
};
if( bPrePro && aInputList.Count() )
{
@@ -440,7 +440,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
if( !CallPrePro( aPrePro, *pString, aTmpName, &aCmdLine, bResponse ) )
{
printf( "Error starting preprocessor\n" );
- bError = TRUE;
+ bError = sal_True;
break;
}
aTmpList.Insert( new ByteString( aTmpName ), CONTAINER_APPEND );
@@ -456,7 +456,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
if( !bHelp )
{
printf( "Error starting rsc2 compiler\n" );
- bError = TRUE;
+ bError = sal_True;
}
};
};
diff --git a/rsc/source/res/rscall.cxx b/rsc/source/res/rscall.cxx
index d04903ea8692..d4f28f598e3f 100644
--- a/rsc/source/res/rscall.cxx
+++ b/rsc/source/res/rscall.cxx
@@ -49,11 +49,11 @@ Atom nRsc_EXTRADATA = InvalidAtom;
void InitRscCompiler()
{
- pStdParType = new ByteString( "( const ResId & rResId, BOOL" );
+ pStdParType = new ByteString( "( const ResId & rResId, sal_Bool" );
pStdPar1 = new ByteString( '(' );
pStdPar2 = new ByteString( '(' );
- pWinParType = new ByteString( "( Window * pParent, const ResId & rResId, BOOL" );
+ pWinParType = new ByteString( "( Window * pParent, const ResId & rResId, sal_Bool" );
pWinPar1 = new ByteString( "( pParent," );
pWinPar2 = new ByteString( "( this," );
nRefDeep = 10;
diff --git a/rsc/source/res/rscarray.cxx b/rsc/source/res/rscarray.cxx
index 5e9023a83e83..cda959ebb79c 100644
--- a/rsc/source/res/rscarray.cxx
+++ b/rsc/source/res/rscarray.cxx
@@ -176,7 +176,7 @@ static RscInstNode * Create( RscInstNode * pNode )
}
RSCINST RscArray::Create( RSCINST * pInst, const RSCINST & rDflt,
- BOOL bOwnClass )
+ sal_Bool bOwnClass )
{
RSCINST aInst;
RscArrayInst * pClassData;
@@ -245,7 +245,7 @@ void RscArray::Destroy( const RSCINST & rInst )
ERRTYPE RscArray::GetValueEle
(
const RSCINST & rInst,
- INT32 lValue,
+ sal_Int32 lValue,
RscTop * pCreateClass,
RSCINST * pGetInst
)
@@ -313,7 +313,7 @@ ERRTYPE RscArray::GetArrayEle
RSCINST * pGetInst
)
{
- INT32 lValue;
+ sal_Int32 lValue;
if( !pTypeClass->GetConstValue( nId, &lValue ) )
{ // nicht gefunden
return ERR_ARRAY_INVALIDINDEX;
@@ -331,31 +331,31 @@ ERRTYPE RscArray::GetArrayEle
|* Letzte Aenderung MM 23.09.91
|*
*************************************************************************/
-static BOOL IsConsistent( RscInstNode * pNode, RscInconsList * pList )
+static sal_Bool IsConsistent( RscInstNode * pNode, RscInconsList * pList )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( pNode )
{
bRet = pNode->aInst.pClass->IsConsistent( pNode->aInst, pList );
if( !IsConsistent( pNode->Left(), pList ) )
- bRet = FALSE;
+ bRet = sal_False;
if( !IsConsistent( pNode->Right(), pList ) )
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
-BOOL RscArray::IsConsistent( const RSCINST & rInst, RscInconsList * pList )
+sal_Bool RscArray::IsConsistent( const RSCINST & rInst, RscInconsList * pList )
{
RscArrayInst * pClassData;
- BOOL bRet;
+ sal_Bool bRet;
bRet = RscTop::IsConsistent( rInst, pList );
pClassData = (RscArrayInst *)(rInst.pData + nOffInstData);
if( !::IsConsistent( pClassData->pNode, pList ) )
- bRet = FALSE;
+ bRet = sal_False;
return( bRet );
}
@@ -399,9 +399,9 @@ void RscArray::SetToDefault( const RSCINST & rInst )
|* Letzte Aenderung MM 25.04.91
|*
*************************************************************************/
-static BOOL IsDefault( RscInstNode * pNode )
+static sal_Bool IsDefault( RscInstNode * pNode )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( pNode )
{
@@ -414,13 +414,13 @@ static BOOL IsDefault( RscInstNode * pNode )
return bRet;
}
-BOOL RscArray::IsDefault( const RSCINST & rInst )
+sal_Bool RscArray::IsDefault( const RSCINST & rInst )
{
RscArrayInst * pClassData;
pClassData = (RscArrayInst *)(rInst.pData + nOffInstData);
- BOOL bRet = ::IsDefault( pClassData->pNode );
+ sal_Bool bRet = ::IsDefault( pClassData->pNode );
if( bRet )
bRet = RscTop::IsDefault( rInst );
@@ -436,9 +436,9 @@ BOOL RscArray::IsDefault( const RSCINST & rInst )
|* Letzte Aenderung MM 15.01.92
|*
*************************************************************************/
-static BOOL IsValueDefault( RscInstNode * pNode, CLASS_DATA pDef )
+static sal_Bool IsValueDefault( RscInstNode * pNode, CLASS_DATA pDef )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( pNode )
{
@@ -451,10 +451,10 @@ static BOOL IsValueDefault( RscInstNode * pNode, CLASS_DATA pDef )
return bRet;
}
-BOOL RscArray::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef )
+sal_Bool RscArray::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef )
{
RscArrayInst * pClassData;
- BOOL bRet;
+ sal_Bool bRet;
bRet = RscTop::IsValueDefault( rInst, pDef );
@@ -569,7 +569,7 @@ void RscArray::WriteSrc( const RSCINST & rInst, FILE * fOutput,
|* Beschreibung
*************************************************************************/
ERRTYPE RscArray::WriteRc( const RSCINST & rInst, RscWriteRc & rMem,
- RscTypCont * pTC, sal_uInt32 nDeep, BOOL bExtra )
+ RscTypCont * pTC, sal_uInt32 nDeep, sal_Bool bExtra )
{
ERRTYPE aError;
RscArrayInst * pClassData;
@@ -686,7 +686,7 @@ void RscClassArray::WriteSrc( const RSCINST & rInst, FILE * fOutput,
*************************************************************************/
ERRTYPE RscClassArray::WriteRcHeader( const RSCINST & rInst, RscWriteRc & aMem,
RscTypCont * pTC, const RscId & aId,
- sal_uInt32 nDeep, BOOL bExtra )
+ sal_uInt32 nDeep, sal_Bool bExtra )
{
// Eigenen Typ schreiben
return GetSuperClass()->WriteRcHeader( rInst, aMem, pTC, aId,
diff --git a/rsc/source/res/rscclass.cxx b/rsc/source/res/rscclass.cxx
index 877d11afee83..465e55a1e2cd 100644
--- a/rsc/source/res/rscclass.cxx
+++ b/rsc/source/res/rscclass.cxx
@@ -132,7 +132,7 @@ RSCINST RscClass::GetInstData
(
CLASS_DATA pData,
sal_uInt32 nEle,
- BOOL bGetCopy
+ sal_Bool bGetCopy
)
{
RSCINST aInst;
@@ -197,15 +197,15 @@ CLASS_DATA RscClass::GetDfltData( sal_uInt32 nEle )
|* Letzte Aenderung MM 22.07.91
|*
*************************************************************************/
-void RscClass::SetVarDflt( CLASS_DATA pData, sal_uInt32 nEle, BOOL bSet )
+void RscClass::SetVarDflt( CLASS_DATA pData, sal_uInt32 nEle, sal_Bool bSet )
{
RscClassInst * pClass;
pClass = (RscClassInst *)(pData + nSuperSize );
if( bSet )
- pClass->nVarDflt |= ((ULONG)1 << nEle);
+ pClass->nVarDflt |= ((sal_uLong)1 << nEle);
else
- pClass->nVarDflt &= ~((ULONG)1 << nEle);
+ pClass->nVarDflt &= ~((sal_uLong)1 << nEle);
}
/*************************************************************************
@@ -217,23 +217,23 @@ void RscClass::SetVarDflt( CLASS_DATA pData, sal_uInt32 nEle, BOOL bSet )
|* Letzte Aenderung MM 08.01.92
|*
*************************************************************************/
-BOOL RscClass::IsDflt( CLASS_DATA pData, sal_uInt32 nEle )
+sal_Bool RscClass::IsDflt( CLASS_DATA pData, sal_uInt32 nEle )
{
RscClassInst * pClass;
- BOOL bRet;
+ sal_Bool bRet;
pClass = (RscClassInst *)(pData + nSuperSize );
- if( pClass->nVarDflt & ((ULONG)1 << nEle) )
- bRet = TRUE;
+ if( pClass->nVarDflt & ((sal_uLong)1 << nEle) )
+ bRet = sal_True;
else
- bRet = FALSE;
+ bRet = sal_False;
/* {
//Variablenname ist Default
RSCINST aTmpI;
- aTmpI = GetInstData( pData, nEle, TRUE );
+ aTmpI = GetInstData( pData, nEle, sal_True );
if( aTmpI.IsInst() && !aTmpI.pClass->IsDefault( aTmpI ) )
- bRet = FALSE;
+ bRet = sal_False;
}
*/
return bRet;
@@ -252,7 +252,7 @@ RSCINST RscClass::Create
(
RSCINST * pInst,
const RSCINST & rDflt,
- BOOL bOwnClass
+ sal_Bool bOwnClass
)
{
sal_uInt32 i;
@@ -276,11 +276,11 @@ RSCINST RscClass::Create
((RscClassInst *)(aInst.pData + nSuperSize))->nVarDflt =
((RscClassInst *)(rDflt.pData + nSuperSize))->nVarDflt;
else
- ((RscClassInst *)(aInst.pData + nSuperSize))->nVarDflt = ~((ULONG)0);
+ ((RscClassInst *)(aInst.pData + nSuperSize))->nVarDflt = ~((sal_uLong)0);
for( i = 0; i < nEntries; i++ )
{
- aDfltI = GetInstData( bOwnClass ? rDflt.pData : NULL, i, TRUE );
+ aDfltI = GetInstData( bOwnClass ? rDflt.pData : NULL, i, sal_True );
if( (VAR_POINTER & pVarTypeList[ i ].nVarType)
&& !(VAR_NODATAINST & pVarTypeList[ i ].nVarType) )
@@ -304,7 +304,7 @@ RSCINST RscClass::Create
}
else
{
- aMemInst = GetInstData( aInst.pData, i, TRUE );
+ aMemInst = GetInstData( aInst.pData, i, sal_True );
aMemInst = aMemInst.pClass->Create( &aMemInst, aDfltI );
};
}
@@ -331,7 +331,7 @@ void RscClass::Destroy( const RSCINST & rInst )
{
RSCINST aTmpI;
- aTmpI = GetInstData( rInst.pData, i, TRUE );
+ aTmpI = GetInstData( rInst.pData, i, sal_True );
if( aTmpI.IsInst() )
{
// Objekt loeschen
@@ -400,7 +400,7 @@ ERRTYPE RscClass::SetVariable
}
nEntries++;
- if( nEntries > (sizeof( ULONG ) * 8) )
+ if( nEntries > (sizeof( sal_uLong ) * 8) )
{
// Bereich fuer Default zu klein
RscExit( 16 );
@@ -440,7 +440,7 @@ RSCINST RscClass::GetVariable
const RSCINST & rInst,
Atom nVarName,
const RSCINST & rInitInst,
- BOOL bInitDflt,
+ sal_Bool bInitDflt,
RscTop * pCreateClass
)
{
@@ -500,7 +500,7 @@ RSCINST RscClass::GetVariable
}
};
// auf nicht Default setzen
- SetVarDflt( rInst.pData, i, FALSE );
+ SetVarDflt( rInst.pData, i, sal_False );
return( aTmpI );
};
@@ -539,11 +539,11 @@ RSCINST RscClass::GetCopyVar
if( IsDflt( rInst.pData, i ) )
{
// mit Variablen Default initialiaieren
- aVarI = GetVariable( rInst, nVarName, RSCINST(), TRUE );
- SetVarDflt( rInst.pData, i, TRUE );
+ aVarI = GetVariable( rInst, nVarName, RSCINST(), sal_True );
+ SetVarDflt( rInst.pData, i, sal_True );
}
else
- aVarI = GetInstData( rInst.pData, i, TRUE );
+ aVarI = GetInstData( rInst.pData, i, sal_True );
};
return aVarI ;
@@ -559,11 +559,11 @@ RSCINST RscClass::GetCopyVar
|* Beschreibung
|*
*************************************************************************/
-BOOL RscClass::IsConsistent( const RSCINST & rInst, RscInconsList * pList )
+sal_Bool RscClass::IsConsistent( const RSCINST & rInst, RscInconsList * pList )
{
sal_uInt32 i = 0;
RSCINST aTmpI;
- BOOL bRet;
+ sal_Bool bRet;
bRet = RscTop::IsConsistent( rInst, pList );
@@ -571,11 +571,11 @@ BOOL RscClass::IsConsistent( const RSCINST & rInst, RscInconsList * pList )
{
if( !(VAR_NODATAINST & pVarTypeList[ i ].nVarType) )
{
- aTmpI = GetInstData( rInst.pData, i, TRUE );
+ aTmpI = GetInstData( rInst.pData, i, sal_True );
if( aTmpI.IsInst() )
if( ! aTmpI.pClass->IsConsistent( aTmpI, pList ) )
- bRet = FALSE;
+ bRet = sal_False;
}
};
@@ -603,12 +603,12 @@ void RscClass::SetToDefault( const RSCINST & rInst )
// auf Default gesetzt
if( !(VAR_NODATAINST & pVarTypeList[ i ].nVarType) )
{
- aTmpI = GetInstData( rInst.pData, i, TRUE );
+ aTmpI = GetInstData( rInst.pData, i, sal_True );
if( aTmpI.IsInst() )
aTmpI.pClass->SetToDefault( aTmpI );
}
}
- pClass->nVarDflt = ~((ULONG)0); // alles auf Default
+ pClass->nVarDflt = ~((sal_uLong)0); // alles auf Default
RscTop::SetToDefault( rInst );
}
@@ -620,7 +620,7 @@ void RscClass::SetToDefault( const RSCINST & rInst )
|* Beschreibung
|*
*************************************************************************/
-BOOL RscClass::IsDefault( const RSCINST & rInst )
+sal_Bool RscClass::IsDefault( const RSCINST & rInst )
{
sal_uInt32 i;
RSCINST aTmpI;
@@ -631,7 +631,7 @@ BOOL RscClass::IsDefault( const RSCINST & rInst )
// auf Default untersucht
if( !(VAR_NODATAINST & pVarTypeList[ i ].nVarType) )
if( !IsDflt( rInst.pData, i ) )
- return( FALSE );
+ return( sal_False );
};
return( RscTop::IsDefault( rInst ) );
@@ -670,24 +670,24 @@ RSCINST RscClass::GetDefault( Atom nVarId )
|* Beschreibung
|*
*************************************************************************/
-BOOL RscClass::IsValueDflt( CLASS_DATA pData, sal_uInt32 nEle )
+sal_Bool RscClass::IsValueDflt( CLASS_DATA pData, sal_uInt32 nEle )
{
RSCINST aTmpI;
- aTmpI = GetInstData( pData, nEle, TRUE );
+ aTmpI = GetInstData( pData, nEle, sal_True );
if( aTmpI.IsInst() )
{
if( VAR_SVDYNAMIC & pVarTypeList[ nEle ].nVarType )
- return FALSE;
+ return sal_False;
if( aTmpI.pClass == pVarTypeList[ nEle ].pClass )
//sie haben auch die gleiche Klasse
return aTmpI.pClass->IsValueDefault( aTmpI, GetDfltData( nEle ) );
else
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -697,39 +697,39 @@ BOOL RscClass::IsValueDflt( CLASS_DATA pData, sal_uInt32 nEle )
|* Beschreibung
|*
*************************************************************************/
-BOOL RscClass::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef )
+sal_Bool RscClass::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef )
{
sal_uInt32 i = 0;
RSCINST aTmpI;
RSCINST aDfltI;
if( !RscTop::IsValueDefault( rInst, pDef ) )
- return FALSE;
+ return sal_False;
if( pDef )
{
for( i = 0; i < nEntries; i++ )
{
- aTmpI = GetInstData( rInst.pData, i, TRUE );
+ aTmpI = GetInstData( rInst.pData, i, sal_True );
if( aTmpI.IsInst() )
{
if( aTmpI.pClass != pVarTypeList[ i ].pClass )
//sie haben nicht die gleiche Klasse
- return FALSE;
+ return sal_False;
- aDfltI = GetInstData( pDef, i, TRUE );
+ aDfltI = GetInstData( pDef, i, sal_True );
if( !aDfltI.IsInst() )
aDfltI.pData = GetDfltData( i );
if( !aTmpI.pClass->IsValueDefault( aTmpI, aDfltI.pData ) )
- return FALSE;
+ return sal_False;
}
}
}
else
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -749,12 +749,12 @@ void RscClass::SetDefault( const RSCINST & rInst, Atom nVarName )
if( i < nEntries )
{
- aTmpI = GetInstData( rInst.pData, i, TRUE );
+ aTmpI = GetInstData( rInst.pData, i, sal_True );
if( aTmpI.IsInst() )
{
aTmpI.pClass->Destroy( aTmpI );
aTmpI.pClass->Create( &aTmpI, RSCINST() );
- SetVarDflt( rInst.pData, i, TRUE );
+ SetVarDflt( rInst.pData, i, sal_True );
}
}
else //In Superklasse nach Variable suchen
@@ -805,20 +805,20 @@ void RscClass::WriteSrc
if( !IsDflt( rInst.pData, i ) )
{
- aTmpI = GetInstData( rInst.pData, i, TRUE );
+ aTmpI = GetInstData( rInst.pData, i, sal_True );
aTmpI.pClass->WriteSrcHeader(
aTmpI, fOutput, pTC, nTab, RscId(), pVarName );
}
fprintf( fOutput, "( " );
- aTmpI = GetInstData( rInst.pData, i+1, TRUE );
+ aTmpI = GetInstData( rInst.pData, i+1, sal_True );
if( !aTmpI.IsInst() )
aTmpI.pData = GetDfltData( i+1 );
aTmpI.pClass->WriteSrcHeader(
aTmpI, fOutput, pTC, nTab, RscId(), pVarName );
fprintf( fOutput, ", " );
- aTmpI = GetInstData( rInst.pData, i+2, TRUE );
+ aTmpI = GetInstData( rInst.pData, i+2, sal_True );
if( !aTmpI.IsInst() )
aTmpI.pData = GetDfltData( i+2 );
aTmpI.pClass->WriteSrcHeader(
@@ -830,7 +830,7 @@ void RscClass::WriteSrc
else if( !IsDflt( rInst.pData, i )
&& !IsValueDflt( rInst.pData, i ) )
{
- aTmpI = GetInstData( rInst.pData, i, TRUE );
+ aTmpI = GetInstData( rInst.pData, i, sal_True );
if( aTmpI.IsInst() )
{
@@ -858,7 +858,7 @@ void RscClass::WriteSrc
|* Beschreibung
|*
*************************************************************************/
-INT32 RscClass::GetCorrectValues
+sal_Int32 RscClass::GetCorrectValues
(
const RSCINST & rInst,
sal_uInt32 nVarPos,
@@ -866,11 +866,11 @@ INT32 RscClass::GetCorrectValues
RscTypCont * pTC
)
{
- INT32 nLang = 0;
- INT32 nBaseValue;
+ sal_Int32 nLang = 0;
+ sal_Int32 nBaseValue;
// Basiswert holen
- RSCINST aTmpI = GetInstData( rInst.pData, nVarPos, TRUE );
+ RSCINST aTmpI = GetInstData( rInst.pData, nVarPos, sal_True );
aTmpI.pClass->GetNumber( aTmpI, &nBaseValue );
// Sprach Delta holen
@@ -878,8 +878,8 @@ INT32 RscClass::GetCorrectValues
if( aTmpI.IsInst() )
{
RscWriteRc aMem;
- aTmpI.pClass->WriteRc( aTmpI, aMem, pTC, 0, FALSE );
- nLang = (INT32)aMem.GetShort( nTupelIdx * sizeof(sal_uInt16) );
+ aTmpI.pClass->WriteRc( aTmpI, aMem, pTC, 0, sal_False );
+ nLang = (sal_Int32)aMem.GetShort( nTupelIdx * sizeof(sal_uInt16) );
}
return nLang + nBaseValue;
@@ -891,7 +891,7 @@ ERRTYPE RscClass::WriteInstRc
RscWriteRc & rMem,
RscTypCont * pTC,
sal_uInt32 nDeep,
- BOOL bExtra
+ sal_Bool bExtra
)
{
sal_uInt32 i = 0;
@@ -920,35 +920,35 @@ ERRTYPE RscClass::WriteInstRc
{
if( nRsc_X == pVarTypeList[ i ].nVarName )
{
- INT32 nVal = GetCorrectValues( rInst, i, 0, pTC );
+ sal_Int32 nVal = GetCorrectValues( rInst, i, 0, pTC );
rMem.Put( nVal );
}
else if( nRsc_Y == pVarTypeList[ i ].nVarName )
{
- INT32 nVal = GetCorrectValues( rInst, i, 1, pTC );
+ sal_Int32 nVal = GetCorrectValues( rInst, i, 1, pTC );
rMem.Put( nVal );
}
else if( nRsc_WIDTH == pVarTypeList[ i ].nVarName )
{
- INT32 nVal = GetCorrectValues( rInst, i, 2, pTC );
+ sal_Int32 nVal = GetCorrectValues( rInst, i, 2, pTC );
rMem.Put( nVal );
}
else if( nRsc_HEIGHT == pVarTypeList[ i ].nVarName )
{
- INT32 nVal = GetCorrectValues( rInst, i, 3, pTC );
+ sal_Int32 nVal = GetCorrectValues( rInst, i, 3, pTC );
rMem.Put( nVal );
}
else
{
- aTmpI = GetInstData( rInst.pData, i, TRUE );
- // Nur an Variable Extradata bExtra nicht auf FALSE
+ aTmpI = GetInstData( rInst.pData, i, sal_True );
+ // Nur an Variable Extradata bExtra nicht auf sal_False
// setzen
aError = aTmpI.pClass->
WriteRcHeader( aTmpI, rMem, pTC,
RscId(), nDeep,
(nRsc_EXTRADATA
== pVarTypeList[ i ].nVarName)
- ? bExtra : FALSE );
+ ? bExtra : sal_False );
}
sal_uInt32 nMask = rMem.GetLong( nMaskOff );
nMask |= pVarTypeList[ i ].nMask;
@@ -962,15 +962,15 @@ ERRTYPE RscClass::WriteInstRc
aTmpI.pData = GetDfltData( i );
}
else
- aTmpI = GetInstData( rInst.pData, i, TRUE );
- // Nur an Variable Extradata bExtra nicht auf FALSE
+ aTmpI = GetInstData( rInst.pData, i, sal_True );
+ // Nur an Variable Extradata bExtra nicht auf sal_False
// setzen
aError = aTmpI.pClass->
WriteRcHeader( aTmpI, rMem, pTC,
RscId(), nDeep,
(nRsc_EXTRADATA
== pVarTypeList[ i ].nVarName)
- ? bExtra : FALSE );
+ ? bExtra : sal_False );
}
}
}
@@ -991,7 +991,7 @@ ERRTYPE RscClass::WriteRc
RscWriteRc & rMem,
RscTypCont * pTC,
sal_uInt32 nDeep,
- BOOL bExtra
+ sal_Bool bExtra
)
{
ERRTYPE aError;
@@ -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 = (BYTE *)GetClassRes();\n\n" );
+ fprintf( fOutput, "\tpResData = (tBYTE *)GetClassRes();\n\n" );
fprintf( fOutput, "\tnObjMask = *(sal_uInt32*)pResData;\n" );
fprintf( fOutput, "\tnOffset += 4;\n\n" );
@@ -1111,7 +1111,7 @@ RscSysDepend::RscSysDepend( Atom nId, sal_uInt32 nTypeId, RscTop * pSuper )
|*
*************************************************************************/
ERRTYPE RscSysDepend::WriteSysDependRc( const RSCINST & rInst, RscWriteRc & rMem,
- RscTypCont * pTC, sal_uInt32 nDeep, BOOL bExtra, BOOL bFirst )
+ RscTypCont * pTC, sal_uInt32 nDeep, sal_Bool bExtra, sal_Bool bFirst )
{
sal_uInt32 nId = 0xFFFFFFFF;
ERRTYPE aError;
@@ -1152,7 +1152,7 @@ ERRTYPE RscSysDepend::WriteSysDependRc( const RSCINST & rInst, RscWriteRc & rMem
|*
*************************************************************************/
ERRTYPE RscSysDepend::WriteRc( const RSCINST & rInst, RscWriteRc & rMem,
- RscTypCont * pTC, sal_uInt32 nDeep, BOOL bExtra )
+ RscTypCont * pTC, sal_uInt32 nDeep, sal_Bool bExtra )
{
ERRTYPE aError = RscClass::WriteRc( rInst, rMem, pTC, nDeep, bExtra );
@@ -1182,10 +1182,10 @@ RscFirstSysDepend::RscFirstSysDepend( Atom nId, sal_uInt32 nTypeId,
|*
*************************************************************************/
ERRTYPE RscFirstSysDepend::WriteRc( const RSCINST & rInst, RscWriteRc & rMem,
- RscTypCont * pTC, sal_uInt32 nDeep, BOOL bExtra )
+ RscTypCont * pTC, sal_uInt32 nDeep, sal_Bool bExtra )
{
ERRTYPE aError = RscClass::WriteRc( rInst, rMem, pTC, nDeep, bExtra );
- aError = WriteSysDependRc( rInst, rMem, pTC, nDeep, bExtra, TRUE );
+ aError = WriteSysDependRc( rInst, rMem, pTC, nDeep, bExtra, sal_True );
return aError;
}
@@ -1242,7 +1242,7 @@ void RscTupel::WriteSrc( const RSCINST & rInst, FILE * fOutput,
if( !IsDflt( rInst.pData, i )
&& !IsValueDflt( rInst.pData, i ) )
{
- aTmpI = GetInstData( rInst.pData, i, TRUE );
+ aTmpI = GetInstData( rInst.pData, i, sal_True );
if( aTmpI.IsInst() )
aTmpI.pClass->WriteSrcHeader(
diff --git a/rsc/source/res/rscclobj.cxx b/rsc/source/res/rscclobj.cxx
index b2632a73857c..632633d8d542 100644
--- a/rsc/source/res/rscclobj.cxx
+++ b/rsc/source/res/rscclobj.cxx
@@ -78,16 +78,16 @@ sal_uInt32 RefNode::GetId() const
|* Letzte Aenderung MM 27.06.90
|*
*************************************************************************/
-BOOL RefNode::PutObjNode( ObjNode * pPutObject ){
+sal_Bool RefNode::PutObjNode( ObjNode * pPutObject ){
// insert a node in the b-tree pObjBiTree
// if the node with the same name is in pObjBiTree,
-// return FALSE and no insert,
+// return sal_False and no insert,
if( pObjBiTree )
return( pObjBiTree->Insert( pPutObject ) );
pObjBiTree = pPutObject;
- return( TRUE );
+ return( sal_True );
}
/****************** O b j N o d e ****************************************/
@@ -120,7 +120,7 @@ ObjNode * RefNode :: GetObjNode( const RscId & rRscId ){
|* Letzte Aenderung MM 15.05.91
|*
*************************************************************************/
-ObjNode::ObjNode( const RscId & rId, CLASS_DATA pData, ULONG lKey ){
+ObjNode::ObjNode( const RscId & rId, CLASS_DATA pData, sal_uLong lKey ){
pRscObj = pData;
aRscId = rId;
lFileKey = lKey;
@@ -135,7 +135,7 @@ ObjNode::ObjNode( const RscId & rId, CLASS_DATA pData, ULONG lKey ){
|* Letzte Aenderung MM 09.12.91
|*
*************************************************************************/
-ObjNode * ObjNode::DelObjNode( RscTop * pClass, ULONG nFileKey ){
+ObjNode * ObjNode::DelObjNode( RscTop * pClass, sal_uLong nFileKey ){
ObjNode * pRetNode = this;
if( Right() )
@@ -183,13 +183,13 @@ sal_uInt32 ObjNode::GetId() const
|* Letzte Aenderung MM 23.09.91
|*
*************************************************************************/
-BOOL ObjNode::IsConsistent( RscInconsList * pList )
+sal_Bool ObjNode::IsConsistent( RscInconsList * pList )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( (long)aRscId > 0x7FFF || (long)aRscId < 1 )
{
- bRet = FALSE;
+ bRet = sal_False;
if( pList )
pList->Insert( new RscInconsistent( aRscId, aRscId ) );
}
@@ -198,10 +198,10 @@ BOOL ObjNode::IsConsistent( RscInconsList * pList )
if( Left() )
{
if( !((ObjNode *)Left())->IsConsistent( pList ) )
- bRet = FALSE;
+ bRet = sal_False;
if( ((ObjNode *)Left())->aRscId >= aRscId )
{
- bRet = FALSE;
+ bRet = sal_False;
if( pList )
pList->Insert(
new RscInconsistent( ((ObjNode *)Left())->GetRscId(),
@@ -212,14 +212,14 @@ BOOL ObjNode::IsConsistent( RscInconsList * pList )
{
if( ((ObjNode *)Right())->aRscId <= aRscId )
{
- bRet = FALSE;
+ bRet = sal_False;
if( pList )
pList->Insert(
new RscInconsistent( GetRscId(),
((ObjNode *)Right())->GetRscId() ) );
}
if( !((ObjNode *)Right())->IsConsistent( pList ) )
- bRet = FALSE;
+ bRet = sal_False;
};
};
diff --git a/rsc/source/res/rscconst.cxx b/rsc/source/res/rscconst.cxx
index 3961cbd539de..c089027a9a5b 100644
--- a/rsc/source/res/rscconst.cxx
+++ b/rsc/source/res/rscconst.cxx
@@ -99,7 +99,7 @@ RSCCLASS_TYPE RscConst::GetClassType() const
|* Letzte Aenderung MM 03.04.91
|*
*************************************************************************/
-ERRTYPE RscConst::SetConstant( Atom nVarName, INT32 lValue ){
+ERRTYPE RscConst::SetConstant( Atom nVarName, sal_Int32 lValue ){
if( pVarArray )
pVarArray = (VarEle *)
rtl_reallocateMemory( (void *)pVarArray,
@@ -138,7 +138,7 @@ Atom RscConst::GetConstant( sal_uInt32 nPos ){
|* Letzte Aenderung MM 15.05.91
|*
*************************************************************************/
-BOOL RscConst::GetConstValue( Atom nConst, INT32 * pValue ) const
+sal_Bool RscConst::GetConstValue( Atom nConst, sal_Int32 * pValue ) const
{
sal_uInt32 i = 0;
@@ -146,9 +146,9 @@ BOOL RscConst::GetConstValue( Atom nConst, INT32 * pValue ) const
if( pVarArray[ i ].nId == nConst )
{
*pValue = pVarArray[ i ].lValue;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -160,7 +160,7 @@ BOOL RscConst::GetConstValue( Atom nConst, INT32 * pValue ) const
|* Letzte Aenderung MM 15.05.91
|*
*************************************************************************/
-BOOL RscConst::GetValueConst( INT32 lValue, Atom * pConst ) const
+sal_Bool RscConst::GetValueConst( sal_Int32 lValue, Atom * pConst ) const
{
sal_uInt32 i = 0;
@@ -168,9 +168,9 @@ BOOL RscConst::GetValueConst( INT32 lValue, Atom * pConst ) const
if( pVarArray[ i ].lValue == lValue )
{
*pConst = pVarArray[ i ].nId;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -260,14 +260,14 @@ RscEnum::RscEnum( Atom nId, sal_uInt32 nTypeId )
|* Letzte Aenderung MM 03.04.91
|*
*************************************************************************/
-ERRTYPE RscEnum::SetConst( const RSCINST & rInst, Atom nConst, INT32 /*nVal*/ )
+ERRTYPE RscEnum::SetConst( const RSCINST & rInst, Atom nConst, sal_Int32 /*nVal*/ )
{
sal_uInt32 i = 0;
if( nEntries != (i = GetConstPos( nConst )) )
{
((RscEnumInst *)rInst.pData)->nValue = i;
- ((RscEnumInst *)rInst.pData)->bDflt = FALSE;
+ ((RscEnumInst *)rInst.pData)->bDflt = sal_False;
return( ERR_OK );
};
@@ -283,12 +283,12 @@ ERRTYPE RscEnum::SetConst( const RSCINST & rInst, Atom nConst, INT32 /*nVal*/ )
|* Letzte Aenderung MM 18.07.91
|*
*************************************************************************/
-ERRTYPE RscEnum::SetNumber( const RSCINST & rInst, INT32 lValue )
+ERRTYPE RscEnum::SetNumber( const RSCINST & rInst, sal_Int32 lValue )
{
sal_uInt32 i = 0;
for( i = 0; i < nEntries; i++ ){
- if( (INT32)pVarArray[ i ].lValue == lValue )
+ if( (sal_Int32)pVarArray[ i ].lValue == lValue )
return( SetConst( rInst, pVarArray[ i ].nId, lValue ) );
};
@@ -318,7 +318,7 @@ ERRTYPE RscEnum::GetConst( const RSCINST & rInst, Atom * pH ){
|* Letzte Aenderung MM 16.09.91
|*
*************************************************************************/
-ERRTYPE RscEnum::GetNumber( const RSCINST & rInst, INT32 * pNumber ){
+ERRTYPE RscEnum::GetNumber( const RSCINST & rInst, sal_Int32 * pNumber ){
*pNumber = pVarArray[ ((RscEnumInst *)rInst.pData)->nValue ].lValue;
return( ERR_OK );
}
@@ -332,7 +332,7 @@ ERRTYPE RscEnum::GetNumber( const RSCINST & rInst, INT32 * pNumber ){
|* Letzte Aenderung MM 03.04.91
|*
*************************************************************************/
-RSCINST RscEnum::Create( RSCINST * pInst, const RSCINST & rDflt, BOOL bOwnClass ){
+RSCINST RscEnum::Create( RSCINST * pInst, const RSCINST & rDflt, sal_Bool bOwnClass ){
RSCINST aInst;
if( !pInst ){
@@ -349,7 +349,7 @@ RSCINST RscEnum::Create( RSCINST * pInst, const RSCINST & rDflt, BOOL bOwnClass
memmove( aInst.pData, rDflt.pData, Size() );
else{
((RscEnumInst *)aInst.pData)->nValue = 0;
- ((RscEnumInst *)aInst.pData)->bDflt = TRUE;
+ ((RscEnumInst *)aInst.pData)->bDflt = sal_True;
}
return( aInst );
@@ -364,16 +364,16 @@ RSCINST RscEnum::Create( RSCINST * pInst, const RSCINST & rDflt, BOOL bOwnClass
|* Letzte Aenderung MM 15.01.92
|*
*************************************************************************/
-BOOL RscEnum::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ){
+sal_Bool RscEnum::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ){
if( pDef ){
if( ((RscEnumInst*)rInst.pData)->nValue ==
((RscEnumInst*)pDef)->nValue )
{
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -402,9 +402,9 @@ void RscEnum::WriteSrc( const RSCINST & rInst, FILE * fOutput,
|*
*************************************************************************/
ERRTYPE RscEnum::WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
- RscTypCont *, sal_uInt32, BOOL )
+ RscTypCont *, sal_uInt32, sal_Bool )
{
- aMem.Put( (INT32)pVarArray[ ((RscEnumInst *)rInst.pData)->nValue ].lValue );
+ aMem.Put( (sal_Int32)pVarArray[ ((RscEnumInst *)rInst.pData)->nValue ].lValue );
return( ERR_OK );
}
diff --git a/rsc/source/res/rsccont.cxx b/rsc/source/res/rsccont.cxx
index 072c5feaa31d..fabfe6bf0b17 100644
--- a/rsc/source/res/rsccont.cxx
+++ b/rsc/source/res/rsccont.cxx
@@ -70,7 +70,7 @@ void ENTRY_STRUCT::Destroy()
|*
*************************************************************************/
RscBaseCont::RscBaseCont( Atom nId, sal_uInt32 nTypeId, RscTop * pSuper,
- BOOL bNoIdent )
+ sal_Bool bNoIdent )
: RscTop( nId, nTypeId, pSuper ),
nSize( 0 )
{
@@ -141,7 +141,7 @@ void RscBaseCont::DestroyElements( RscBaseContInst * pClassData )
|*
*************************************************************************/
RSCINST RscBaseCont::Create( RSCINST * pInst, const RSCINST & rDflt,
- BOOL bOwnClass )
+ sal_Bool bOwnClass )
{
sal_uInt32 i = 0;
RSCINST aInst;
@@ -161,7 +161,7 @@ RSCINST RscBaseCont::Create( RSCINST * pInst, const RSCINST & rDflt,
pClassData = (RscBaseContInst *)(aInst.pData + nOffInstData);
pClassData->nEntries = 0;
pClassData->pEntries = NULL;
- pClassData->bDflt = TRUE;
+ pClassData->bDflt = sal_True;
if( bOwnClass ){
RscBaseContInst * pDfltClassData;
@@ -290,7 +290,7 @@ ERRTYPE RscBaseCont::GetElement( const RSCINST & rInst, const RscId & rEleName,
else
pCreateClass = pTypeClass;
- pClassData->bDflt = FALSE;
+ pClassData->bDflt = sal_False;
if( !bNoId )
aTmpI = SearchEle( rInst, rEleName, pCreateClass );
// Eintrag gefunden
@@ -513,11 +513,11 @@ else
|* Letzte Aenderung MM 12.06.91
|*
*************************************************************************/
-ERRTYPE RscBaseCont::SetNumber( const RSCINST & rInst, INT32 lValue ){
+ERRTYPE RscBaseCont::SetNumber( const RSCINST & rInst, sal_Int32 lValue ){
RscBaseContInst * pClassData;
RSCINST aTmpI;
ERRTYPE aError;
- INT32 lNumber;
+ sal_Int32 lNumber;
pClassData = (RscBaseContInst *)(rInst.pData + nOffInstData);
@@ -549,13 +549,13 @@ else
ERRTYPE RscBaseCont::SetBool
(
const RSCINST & rInst,
- BOOL bValue
+ sal_Bool bValue
)
{
RscBaseContInst * pClassData;
RSCINST aTmpI;
ERRTYPE aError;
- BOOL bBool;
+ sal_Bool bBool;
pClassData = (RscBaseContInst *)(rInst.pData + nOffInstData);
@@ -589,7 +589,7 @@ ERRTYPE RscBaseCont::SetConst
(
const RSCINST & rInst,
Atom nValueId,
- INT32 lValue
+ sal_Int32 lValue
)
{
RscBaseContInst * pClassData;
@@ -673,10 +673,10 @@ else
|* Letzte Aenderung MM 23.09.91
|*
*************************************************************************/
-BOOL RscBaseCont::IsConsistent( const RSCINST & rInst, RscInconsList * pList ){
+sal_Bool RscBaseCont::IsConsistent( const RSCINST & rInst, RscInconsList * pList ){
sal_uInt32 i = 0;
RscBaseContInst * pClassData;
- BOOL bRet;
+ sal_Bool bRet;
bRet = RscTop::IsConsistent( rInst, pList );
@@ -686,9 +686,9 @@ BOOL RscBaseCont::IsConsistent( const RSCINST & rInst, RscInconsList * pList ){
// Komplexitaet = n^2 / 2
for( i = 0; i < pClassData->nEntries; i++ ){
if( !bNoId ){
- if( (INT32)pClassData->pEntries[ i ].aName > 0x7FFF
- || (INT32)pClassData->pEntries[ i ].aName < 1 ){
- bRet = FALSE;
+ if( (sal_Int32)pClassData->pEntries[ i ].aName > 0x7FFF
+ || (sal_Int32)pClassData->pEntries[ i ].aName < 1 ){
+ bRet = sal_False;
if( pList )
pList->Insert( new RscInconsistent(
pClassData->pEntries[ i ].aName,
@@ -697,7 +697,7 @@ BOOL RscBaseCont::IsConsistent( const RSCINST & rInst, RscInconsList * pList ){
else if( SearchElePos( rInst, pClassData->pEntries[ i ].aName,
pClassData->pEntries[ i ].aInst.pClass, i +1 ).IsInst() )
{
- bRet = FALSE;
+ bRet = sal_False;
if( pList )
pList->Insert( new RscInconsistent(
pClassData->pEntries[ i ].aName,
@@ -706,7 +706,7 @@ BOOL RscBaseCont::IsConsistent( const RSCINST & rInst, RscInconsList * pList ){
}
if( ! pClassData->pEntries[ i ].aInst.pClass->
IsConsistent( pClassData->pEntries[ i ].aInst, pList ) )
- bRet = FALSE;
+ bRet = sal_False;
};
return( bRet );
@@ -746,20 +746,20 @@ void RscBaseCont::SetToDefault( const RSCINST & rInst )
|* Letzte Aenderung MM 25.04.91
|*
*************************************************************************/
-BOOL RscBaseCont::IsDefault( const RSCINST & rInst ){
+sal_Bool RscBaseCont::IsDefault( const RSCINST & rInst ){
sal_uInt32 i = 0;
RscBaseContInst * pClassData;
pClassData = (RscBaseContInst *)(rInst.pData + nOffInstData);
if( !pClassData->bDflt )
- return FALSE;
+ return sal_False;
for( i = 0; i < pClassData->nEntries; i++ ){
if( ! pClassData->pEntries[ i ].aInst.pClass->
IsDefault( pClassData->pEntries[ i ].aInst ) )
{
- return( FALSE );
+ return( sal_False );
};
};
@@ -775,19 +775,19 @@ BOOL RscBaseCont::IsDefault( const RSCINST & rInst ){
|* Letzte Aenderung MM 15.01.92
|*
*************************************************************************/
-BOOL RscBaseCont::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef )
+sal_Bool RscBaseCont::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef )
{
RscBaseContInst * pClassData;
if( !RscTop::IsValueDefault( rInst, pDef ) )
- return FALSE;
+ return sal_False;
pClassData = (RscBaseContInst *)(rInst.pData + nOffInstData);
if( pClassData->nEntries )
- return FALSE;
+ return sal_False;
else
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -886,14 +886,14 @@ void RscBaseCont::ContWriteSrc( const RSCINST & rInst, FILE * fOutput,
|*
*************************************************************************/
ERRTYPE RscBaseCont::ContWriteRc( const RSCINST & rInst, RscWriteRc & rMem,
- RscTypCont * pTC, sal_uInt32 nDeep, BOOL bExtra )
+ RscTypCont * pTC, sal_uInt32 nDeep, sal_Bool bExtra )
{
sal_uInt32 i = 0;
RscBaseContInst * pClassData;
ERRTYPE aError;
if( bExtra || bNoId )
- { // Nur Subresourcen schreiben, wenn bExtra == TRUE
+ { // Nur Subresourcen schreiben, wenn bExtra == sal_True
pClassData = (RscBaseContInst *)(rInst.pData + nOffInstData);
for( i = 0; i < pClassData->nEntries && aError.IsOk(); i++ ){
@@ -914,7 +914,7 @@ void RscBaseCont::ContWriteRcAccess
FILE * fOutput,
RscTypCont * pTC,
const char * pName,
- BOOL bWriteSize
+ sal_Bool bWriteSize
)
{
if( (bNoId || bWriteSize) && !pTypeClass1 )
@@ -965,7 +965,7 @@ void RscBaseCont::WriteSrc( const RSCINST & rInst, FILE * fOutput,
|*
*************************************************************************/
ERRTYPE RscBaseCont::WriteRc( const RSCINST & rInst, RscWriteRc & rMem,
- RscTypCont * pTC, sal_uInt32 nDeep, BOOL bExtra )
+ RscTypCont * pTC, sal_uInt32 nDeep, sal_Bool bExtra )
{
ERRTYPE aError;
@@ -1057,7 +1057,7 @@ ERRTYPE RscBaseCont::WriteCxx( const RSCINST & rInst, FILE * fOutput,
|*
*************************************************************************/
RscContWriteSrc::RscContWriteSrc( Atom nId, sal_uInt32 nTypeId,
- RscTop * pSuper, BOOL bNoIdent )
+ RscTop * pSuper, sal_Bool bNoIdent )
: RscBaseCont( nId, nTypeId, pSuper, bNoIdent )
{}
@@ -1100,7 +1100,7 @@ void RscContWriteSrc::WriteSrc( const RSCINST & rInst, FILE * fOutput,
|* Letzte Aenderung MM 08.05.91
|*
*************************************************************************/
-RscCont::RscCont( Atom nId, sal_uInt32 nTypeId, RscTop * pSuper, BOOL bNoIdent )
+RscCont::RscCont( Atom nId, sal_uInt32 nTypeId, RscTop * pSuper, sal_Bool bNoIdent )
: RscContWriteSrc( nId, nTypeId, pSuper, bNoIdent )
{}
@@ -1114,7 +1114,7 @@ RscCont::RscCont( Atom nId, sal_uInt32 nTypeId, RscTop * pSuper, BOOL bNoIdent )
|*
*************************************************************************/
ERRTYPE RscCont::WriteRc( const RSCINST & rInst, RscWriteRc & rMem,
- RscTypCont * pTC, sal_uInt32 nDeep, BOOL bExtra )
+ RscTypCont * pTC, sal_uInt32 nDeep, sal_Bool bExtra )
{
RscBaseContInst * pClassData;
ERRTYPE aError;
@@ -1139,7 +1139,7 @@ void RscCont::WriteRcAccess
const char * pName
)
{
- ContWriteRcAccess( fOutput, pTC, pName, TRUE );
+ ContWriteRcAccess( fOutput, pTC, pName, sal_True );
}
/*************************************************************************
@@ -1152,7 +1152,7 @@ void RscCont::WriteRcAccess
|*
*************************************************************************/
RscContExtraData::RscContExtraData( Atom nId, sal_uInt32 nTypeId,
- RscTop * pSuper, BOOL bNoIdent )
+ RscTop * pSuper, sal_Bool bNoIdent )
: RscContWriteSrc( nId, nTypeId, pSuper, bNoIdent )
{}
@@ -1166,7 +1166,7 @@ RscContExtraData::RscContExtraData( Atom nId, sal_uInt32 nTypeId,
|*
*************************************************************************/
ERRTYPE RscContExtraData::WriteRc( const RSCINST & rInst, RscWriteRc & rMem,
- RscTypCont * pTC, sal_uInt32 nDeep, BOOL bExtra )
+ RscTypCont * pTC, sal_uInt32 nDeep, sal_Bool bExtra )
{
ERRTYPE aError;
diff --git a/rsc/source/res/rscflag.cxx b/rsc/source/res/rscflag.cxx
index e742b806408e..48c583a3ff8e 100644
--- a/rsc/source/res/rscflag.cxx
+++ b/rsc/source/res/rscflag.cxx
@@ -100,7 +100,7 @@ ERRTYPE RscFlag::SetNotConst( const RSCINST & rInst, Atom nConst )
|* Letzte Aenderung MM 03.04.91
|*
*************************************************************************/
-ERRTYPE RscFlag::SetConst( const RSCINST & rInst, Atom nConst, INT32 /*nVal*/ )
+ERRTYPE RscFlag::SetConst( const RSCINST & rInst, Atom nConst, sal_Int32 /*nVal*/ )
{
sal_uInt32 i = 0, nFlag = 0;
@@ -147,7 +147,7 @@ RSCINST RscFlag::CreateBasic( RSCINST * pInst )
|* Letzte Aenderung MM 16.01.92
|*
*************************************************************************/
-RSCINST RscFlag::Create( RSCINST * pInst, const RSCINST & rDflt, BOOL bOwnClass )
+RSCINST RscFlag::Create( RSCINST * pInst, const RSCINST & rDflt, sal_Bool bOwnClass )
{
RSCINST aInst = CreateBasic( pInst );
sal_uInt32 i = 0;
@@ -179,7 +179,7 @@ RSCINST RscFlag::Create( RSCINST * pInst, const RSCINST & rDflt, BOOL bOwnClass
|*
*************************************************************************/
RSCINST RscFlag::CreateClient( RSCINST * pInst, const RSCINST & rDfltI,
- BOOL bOwnClass, Atom nConstId )
+ sal_Bool bOwnClass, Atom nConstId )
{
RSCINST aInst = CreateBasic( pInst );
sal_uInt32 i = 0, nFlag = 0;
@@ -231,17 +231,17 @@ void RscFlag::SetToDefault( const RSCINST & rInst )
|* Letzte Aenderung MM 03.04.91
|*
*************************************************************************/
-BOOL RscFlag::IsDefault( const RSCINST & rInst )
+sal_Bool RscFlag::IsDefault( const RSCINST & rInst )
{
sal_uInt32 i = 0;
for( i = 0; i < Size() / sizeof( RscFlagInst ); i++ )
if( ((RscFlagInst *)rInst.pData)[ i ].nDfltFlags != 0xFFFFFFFF )
- return( FALSE );
- return( TRUE );
+ return( sal_False );
+ return( sal_True );
}
-BOOL RscFlag::IsDefault( const RSCINST & rInst, Atom nConstId )
+sal_Bool RscFlag::IsDefault( const RSCINST & rInst, Atom nConstId )
{
sal_uInt32 i = 0, nFlag = 0;
@@ -249,11 +249,11 @@ BOOL RscFlag::IsDefault( const RSCINST & rInst, Atom nConstId )
nFlag = 1 << (i % (sizeof( sal_uInt32 ) * 8) );
i = i / (sizeof( sal_uInt32 ) * 8);
if( ((RscFlagInst *)rInst.pData)[ i ].nDfltFlags & nFlag )
- return( TRUE );
+ return( sal_True );
else
- return( FALSE );
+ return( sal_False );
};
- return( TRUE );
+ return( sal_True );
}
/*************************************************************************
@@ -265,7 +265,7 @@ BOOL RscFlag::IsDefault( const RSCINST & rInst, Atom nConstId )
|* Letzte Aenderung MM 25.04.91
|*
*************************************************************************/
-BOOL RscFlag::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef,
+sal_Bool RscFlag::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef,
Atom nConstId )
{
sal_uInt32 i = 0, nFlag = 0;
@@ -278,15 +278,15 @@ BOOL RscFlag::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef,
if( (((RscFlagInst *)rInst.pData)[ i ].nFlags & nFlag)
== (((RscFlagInst *)pDef)[ i ].nFlags & nFlag) )
{
- return TRUE;
+ return sal_True;
}
}
};
- return FALSE;
+ return sal_False;
}
-BOOL RscFlag::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef )
+sal_Bool RscFlag::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef )
{
sal_uInt32 i = 0;
@@ -299,7 +299,7 @@ BOOL RscFlag::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef )
if( (((RscFlagInst *)rInst.pData)[ nIndex ].nFlags & Flag)
!= (((RscFlagInst *)pDef)[ nIndex ].nFlags & Flag) )
{
- return FALSE;
+ return sal_False;
}
Flag <<= 1;
if( !Flag )
@@ -307,9 +307,9 @@ BOOL RscFlag::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef )
};
}
else
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -321,7 +321,7 @@ BOOL RscFlag::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef )
|* Letzte Aenderung MM 10.04.91
|*
*************************************************************************/
-BOOL RscFlag::IsSet( const RSCINST & rInst, Atom nConstId )
+sal_Bool RscFlag::IsSet( const RSCINST & rInst, Atom nConstId )
{
sal_uInt32 i = 0, nFlag = 0;
@@ -329,11 +329,11 @@ BOOL RscFlag::IsSet( const RSCINST & rInst, Atom nConstId )
nFlag = 1 << (i % (sizeof( sal_uInt32 ) * 8) );
i = i / (sizeof( sal_uInt32 ) * 8);
if( ((RscFlagInst *)rInst.pData)[ i ].nFlags & nFlag )
- return( TRUE );
+ return( sal_True );
else
- return( FALSE );
+ return( sal_False );
};
- return( TRUE );
+ return( sal_True );
}
/*************************************************************************
@@ -349,7 +349,7 @@ void RscFlag::WriteSrc( const RSCINST & rInst, FILE * fOutput,
RscTypCont *, sal_uInt32, const char * )
{
sal_uInt32 i = 0, Flag = 0, nIndex = 0;
- BOOL bComma = FALSE;
+ sal_Bool bComma = sal_False;
Flag = 1;
for( i = 0; i < nEntries; i++ ){
@@ -363,7 +363,7 @@ void RscFlag::WriteSrc( const RSCINST & rInst, FILE * fOutput,
fprintf( fOutput, "not " );
fprintf( fOutput, "%s", pHS->getString( pVarArray[ i ].nId ).getStr() );
}
- bComma = TRUE;
+ bComma = sal_True;
}
Flag <<= 1;
if( !Flag )
@@ -381,9 +381,9 @@ void RscFlag::WriteSrc( const RSCINST & rInst, FILE * fOutput,
|*
*************************************************************************/
ERRTYPE RscFlag::WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
- RscTypCont *, sal_uInt32, BOOL )
+ RscTypCont *, sal_uInt32, sal_Bool )
{
- INT32 lVal = 0;
+ sal_Int32 lVal = 0;
sal_uInt32 i = 0, Flag = 0, nIndex = 0;
Flag = 1;
@@ -397,7 +397,7 @@ ERRTYPE RscFlag::WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
Flag = 1;
};
- aMem.Put( (INT32)lVal );
+ aMem.Put( (sal_Int32)lVal );
return( ERR_OK );
}
@@ -460,7 +460,7 @@ void RscClient::WriteSrc( const RSCINST & rInst, FILE * fOutput,
|*
*************************************************************************/
RSCINST RscClient::Create( RSCINST * pInst, const RSCINST & rDflt,
- BOOL bOwnClass )
+ sal_Bool bOwnClass )
{
RSCINST aTmpI, aDfltI;
diff --git a/rsc/source/res/rscmgr.cxx b/rsc/source/res/rscmgr.cxx
index 3e3d29372fe7..69a989c1683b 100644
--- a/rsc/source/res/rscmgr.cxx
+++ b/rsc/source/res/rscmgr.cxx
@@ -78,7 +78,7 @@ sal_uInt32 RscMgr::Size()
|* Letzte Aenderung MM 03.04.91
|*
*************************************************************************/
-RSCINST RscMgr::Create( RSCINST * pInst, const RSCINST & rDflt, BOOL bOwnClass ){
+RSCINST RscMgr::Create( RSCINST * pInst, const RSCINST & rDflt, sal_Bool bOwnClass ){
RSCINST aInst;
RscMgrInst * pClassData;
@@ -136,7 +136,7 @@ void RscMgr::SetToDefault( const RSCINST & rInst )
RscMgrInst * pClassData;
pClassData = (RscMgrInst *)(rInst.pData + RscClass::Size());
- pClassData->bDflt = TRUE;
+ pClassData->bDflt = sal_True;
RscClass::SetToDefault( rInst );
}
@@ -150,12 +150,12 @@ void RscMgr::SetToDefault( const RSCINST & rInst )
|* Letzte Aenderung MM 12.06.91
|*
*************************************************************************/
-BOOL RscMgr::IsDefault( const RSCINST & rInst ){
+sal_Bool RscMgr::IsDefault( const RSCINST & rInst ){
RscMgrInst * pClassData;
pClassData = (RscMgrInst *)(rInst.pData + RscClass::Size());
if( !pClassData->bDflt )
- return( FALSE );
+ return( sal_False );
return( RscClass::IsDefault( rInst ) );
}
@@ -169,23 +169,23 @@ BOOL RscMgr::IsDefault( const RSCINST & rInst ){
|* Letzte Aenderung MM 12.06.91
|*
*************************************************************************/
-BOOL RscMgr::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ){
+sal_Bool RscMgr::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ){
RscMgrInst * pClassData;
RscMgrInst * pDfltData;
if( !RscClass::IsValueDefault( rInst, pDef ) )
- return FALSE;
+ return sal_False;
if( pDef ){
pClassData = (RscMgrInst *)(rInst.pData + RscClass::Size());
pDfltData = (RscMgrInst *)(pDef + RscClass::Size());
if( !pClassData->aRefId.IsId() && !pDfltData->aRefId.IsId() ){
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
@@ -254,7 +254,7 @@ void RscMgr::WriteSrc( const RSCINST &, FILE *, RscTypCont *, sal_uInt32,
*************************************************************************/
ERRTYPE RscMgr::WriteRcHeader( const RSCINST & rInst, RscWriteRc & rMem,
RscTypCont * pTC, const RscId &rId,
- sal_uInt32 nDeep, BOOL bExtra )
+ sal_uInt32 nDeep, sal_Bool bExtra )
{
RscMgrInst * pClassData;
ERRTYPE aError;
@@ -350,7 +350,7 @@ ERRTYPE RscMgr::WriteRcHeader( const RSCINST & rInst, RscWriteRc & rMem,
|*
*************************************************************************/
ERRTYPE RscMgr::WriteRc( const RSCINST &, RscWriteRc &,
- RscTypCont *, sal_uInt32, BOOL )
+ RscTypCont *, sal_uInt32, sal_Bool )
{
return( ERR_OK );
@@ -593,9 +593,9 @@ ERRTYPE RscMgr::WriteCxx( const RSCINST & rInst, FILE * fOutput,
|* Letzte Aenderung MM 23.09.91
|*
*************************************************************************/
-BOOL RscMgr::IsConsistent( const RSCINST & rInst, RscInconsList * pList )
+sal_Bool RscMgr::IsConsistent( const RSCINST & rInst, RscInconsList * pList )
{
- BOOL bRet;
+ sal_Bool bRet;
RscMgrInst * pClassData;
bRet = RscClass::IsConsistent( rInst, pList );
@@ -610,7 +610,7 @@ BOOL RscMgr::IsConsistent( const RSCINST & rInst, RscInconsList * pList )
pList->Insert(
new RscInconsistent( pClassData->aRefId,
pClassData->aRefId ) );
- bRet = FALSE;
+ bRet = sal_False;
}
return( bRet );
@@ -664,7 +664,7 @@ ERRTYPE RscMgr::IsToDeep( const RSCINST & rInst, sal_uInt32 nDeep )
aTmpI.pData = pObjNode->GetRscObj();
nDeep++;
}
- else //aTmpI.IsInst() wird FALSE, Schleife beenden
+ else //aTmpI.IsInst() wird sal_False, Schleife beenden
aTmpI.pData = NULL;
}
@@ -708,7 +708,7 @@ ERRTYPE RscMgr::SetRef( const RSCINST & rInst, const RscId & rRefId )
aError = IsToDeep( rInst );
if( aError.IsOk() )
- pClassData->bDflt = FALSE;
+ pClassData->bDflt = sal_False;
else
pClassData->aRefId = aOldId;
}
diff --git a/rsc/source/res/rscrange.cxx b/rsc/source/res/rscrange.cxx
index 5ade3936bdf8..78fa86b6fa48 100644
--- a/rsc/source/res/rscrange.cxx
+++ b/rsc/source/res/rscrange.cxx
@@ -82,7 +82,7 @@ RSCCLASS_TYPE RscRange::GetClassType() const
|* Letzte Aenderung MM 03.04.91
|*
*************************************************************************/
-ERRTYPE RscRange::SetRange( INT32 nMinimum, INT32 nMaximum )
+ERRTYPE RscRange::SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum )
{
if( nMinimum > nMaximum )
{
@@ -107,18 +107,18 @@ ERRTYPE RscRange::SetRange( INT32 nMinimum, INT32 nMaximum )
|* Letzte Aenderung MM 15.02.92
|*
*************************************************************************/
-BOOL RscRange::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef )
+sal_Bool RscRange::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef )
{
if( pDef )
{
if( ((RscRangeInst*)rInst.pData)->nValue ==
((RscRangeInst*)pDef)->nValue )
{
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -130,12 +130,12 @@ BOOL RscRange::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef )
|* Letzte Aenderung MM 03.04.91
|*
*************************************************************************/
-ERRTYPE RscRange::SetNumber( const RSCINST & rInst, INT32 nValue )
+ERRTYPE RscRange::SetNumber( const RSCINST & rInst, sal_Int32 nValue )
{
if( nMax < nValue || nMin > nValue )
return( ERR_RSCRANGE_OUTDEFSET );
((RscRangeInst *)rInst.pData)->nValue = (sal_uInt16)( nValue - nMin );
- ((RscRangeInst *)rInst.pData)->bDflt = FALSE;
+ ((RscRangeInst *)rInst.pData)->bDflt = sal_False;
return( ERR_OK );
}
@@ -148,7 +148,7 @@ ERRTYPE RscRange::SetNumber( const RSCINST & rInst, INT32 nValue )
|* Letzte Aenderung MM 22.04.91
|*
*************************************************************************/
-ERRTYPE RscRange::GetNumber( const RSCINST & rInst, INT32 * pN )
+ERRTYPE RscRange::GetNumber( const RSCINST & rInst, sal_Int32 * pN )
{
*pN = ((RscRangeInst *)rInst.pData)->nValue + nMin;
return( ERR_OK );
@@ -164,7 +164,7 @@ ERRTYPE RscRange::GetNumber( const RSCINST & rInst, INT32 * pN )
|*
*************************************************************************/
RSCINST RscRange::Create( RSCINST * pInst, const RSCINST & rDflt,
- BOOL bOwnClass )
+ sal_Bool bOwnClass )
{
RSCINST aInst;
@@ -187,7 +187,7 @@ RSCINST RscRange::Create( RSCINST * pInst, const RSCINST & rDflt,
((RscRangeInst *)aInst.pData)->nValue = (sal_uInt16)(0L - nMin);
else
((RscRangeInst *)aInst.pData)->nValue = 0;
- ((RscRangeInst *)aInst.pData)->bDflt = TRUE;
+ ((RscRangeInst *)aInst.pData)->bDflt = sal_True;
}
return( aInst );
@@ -218,7 +218,7 @@ void RscRange::WriteSrc( const RSCINST & rInst, FILE * fOutput,
|*
*************************************************************************/
ERRTYPE RscRange::WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
- RscTypCont *, sal_uInt32, BOOL )
+ RscTypCont *, sal_uInt32, sal_Bool )
{
if( nMin >= 0 )
{
@@ -292,7 +292,7 @@ RSCCLASS_TYPE RscLongRange::GetClassType() const
|* Letzte Aenderung MM 18.07.94
|*
*************************************************************************/
-ERRTYPE RscLongRange::SetRange( INT32 nMinimum, INT32 nMaximum )
+ERRTYPE RscLongRange::SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum )
{
if( nMinimum > nMaximum )
{
@@ -317,14 +317,14 @@ ERRTYPE RscLongRange::SetRange( INT32 nMinimum, INT32 nMaximum )
|* Letzte Aenderung MM 15.02.92
|*
*************************************************************************/
-BOOL RscLongRange::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef )
+sal_Bool RscLongRange::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef )
{
if( pDef )
return 0 == memcmp( &((RscLongRangeInst*)rInst.pData)->nValue,
&((RscLongRangeInst*)pDef)->nValue,
- sizeof( INT32 ) );
+ sizeof( sal_Int32 ) );
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -336,13 +336,13 @@ BOOL RscLongRange::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef )
|* Letzte Aenderung MM 18.07.94
|*
*************************************************************************/
-ERRTYPE RscLongRange::SetNumber( const RSCINST & rInst, INT32 nValue )
+ERRTYPE RscLongRange::SetNumber( const RSCINST & rInst, sal_Int32 nValue )
{
if( nMax < nValue || nMin > nValue )
return( ERR_RSCRANGE_OUTDEFSET );
void * pData = &((RscLongRangeInst*)rInst.pData)->nValue;
- memmove( pData, &nValue, sizeof( INT32 ) );
- ((RscLongRangeInst *)rInst.pData)->bDflt = FALSE;
+ memmove( pData, &nValue, sizeof( sal_Int32 ) );
+ ((RscLongRangeInst *)rInst.pData)->bDflt = sal_False;
return( ERR_OK );
}
@@ -355,10 +355,10 @@ ERRTYPE RscLongRange::SetNumber( const RSCINST & rInst, INT32 nValue )
|* Letzte Aenderung MM 22.04.91
|*
*************************************************************************/
-ERRTYPE RscLongRange::GetNumber( const RSCINST & rInst, INT32 * pN )
+ERRTYPE RscLongRange::GetNumber( const RSCINST & rInst, sal_Int32 * pN )
{
memmove( pN, &((RscLongRangeInst*)rInst.pData)->nValue,
- sizeof( INT32 ) );
+ sizeof( sal_Int32 ) );
return( ERR_OK );
}
@@ -372,7 +372,7 @@ ERRTYPE RscLongRange::GetNumber( const RSCINST & rInst, INT32 * pN )
|*
*************************************************************************/
RSCINST RscLongRange::Create( RSCINST * pInst, const RSCINST & rDflt,
- BOOL bOwnClass )
+ sal_Bool bOwnClass )
{
RSCINST aInst;
@@ -391,14 +391,14 @@ RSCINST RscLongRange::Create( RSCINST * pInst, const RSCINST & rDflt,
memmove( aInst.pData, rDflt.pData, sizeof( RscLongRangeInst ) );
else
{
- INT32 lDflt;
+ sal_Int32 lDflt;
if( 0L >= nMin && 0L <= nMax )
lDflt = 0;
else
lDflt = nMin;
void * pData = &((RscLongRangeInst*)aInst.pData)->nValue;
- memmove( pData, &lDflt, sizeof( INT32 ) );
- ((RscLongRangeInst *)aInst.pData)->bDflt = TRUE;
+ memmove( pData, &lDflt, sizeof( sal_Int32 ) );
+ ((RscLongRangeInst *)aInst.pData)->bDflt = sal_True;
}
return( aInst );
@@ -416,7 +416,7 @@ RSCINST RscLongRange::Create( RSCINST * pInst, const RSCINST & rDflt,
void RscLongRange::WriteSrc( const RSCINST & rInst, FILE * fOutput,
RscTypCont *, sal_uInt32, const char * )
{
- INT32 lVal;
+ sal_Int32 lVal;
GetNumber( rInst, &lVal );
fprintf( fOutput, "%d", static_cast<int>(lVal) );
}
@@ -431,12 +431,12 @@ void RscLongRange::WriteSrc( const RSCINST & rInst, FILE * fOutput,
|*
*************************************************************************/
ERRTYPE RscLongRange::WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
- RscTypCont *, sal_uInt32, BOOL )
+ RscTypCont *, sal_uInt32, sal_Bool )
{
- INT32 lVal;
+ sal_Int32 lVal;
GetNumber( rInst, &lVal );
- aMem.Put( (INT32)lVal );
+ aMem.Put( (sal_Int32)lVal );
return( ERR_OK );
}
@@ -451,7 +451,7 @@ void RscLongRange::WriteRcAccess
{
fprintf( fOutput, "\t\tSet%s( ", pName );
fprintf( fOutput, "GetLong( pResData+nOffset ) );\n" );
- fprintf( fOutput, "\t\tnOffset += sizeof( INT32 );\n" );
+ fprintf( fOutput, "\t\tnOffset += sizeof( sal_Int32 );\n" );
}
/****************** R s c L o n g E n u m R a n g e *********************/
@@ -471,7 +471,7 @@ RscLongEnumRange::RscLongEnumRange( Atom nId, sal_uInt32 nTypeId )
|* Beschreibung
*************************************************************************/
ERRTYPE RscLongEnumRange::SetConst( const RSCINST & rInst, Atom /*nConst*/,
- INT32 nValue )
+ sal_Int32 nValue )
{
return SetNumber( rInst, nValue );
}
@@ -516,7 +516,7 @@ RSCCLASS_TYPE RscIdRange::GetClassType() const
|* Letzte Aenderung MM 03.04.91
|*
*************************************************************************/
-RSCINST RscIdRange::Create( RSCINST * pInst, const RSCINST & rDflt, BOOL bOwnClass ){
+RSCINST RscIdRange::Create( RSCINST * pInst, const RSCINST & rDflt, sal_Bool bOwnClass ){
RSCINST aInst;
RscId * pClassData;
@@ -539,11 +539,11 @@ RSCINST RscIdRange::Create( RSCINST * pInst, const RSCINST & rDflt, BOOL bOwnCla
else{
*pClassData = RscId();
if( 0 >= nMin && 0 <= nMax )
- *pClassData = RscId( (INT32)0 );
+ *pClassData = RscId( (sal_Int32)0 );
else
*pClassData = RscId( nMin );
//cUnused wird fuer Defaultkennung verwendet
- ((RscId *)aInst.pData)->aExp.cUnused = TRUE;
+ ((RscId *)aInst.pData)->aExp.cUnused = sal_True;
}
return( aInst );
@@ -571,7 +571,7 @@ void RscIdRange :: Destroy( const RSCINST & rInst ){
|* Letzte Aenderung MM 15.01.92
|*
*************************************************************************/
-BOOL RscIdRange::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ){
+sal_Bool RscIdRange::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ){
if( pDef ){
if( ((RscId*)rInst.pData)->aExp.IsNumber()
&& ((RscId*)pDef)->aExp.IsNumber() )
@@ -579,12 +579,12 @@ BOOL RscIdRange::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ){
if( ((RscId*)rInst.pData)->GetNumber() ==
((RscId*)pDef)->GetNumber() )
{
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -596,13 +596,13 @@ BOOL RscIdRange::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ){
|* Letzte Aenderung MM 25.11.91
|*
*************************************************************************/
-ERRTYPE RscIdRange::SetNumber( const RSCINST & rInst, INT32 nValue )
+ERRTYPE RscIdRange::SetNumber( const RSCINST & rInst, sal_Int32 nValue )
{
if( nMax < nValue || nMin > nValue )
return( ERR_RSCRANGE_OUTDEFSET );
*(RscId *)rInst.pData = RscId( nValue );
- ((RscId *)rInst.pData)->aExp.cUnused = FALSE;
+ ((RscId *)rInst.pData)->aExp.cUnused = sal_False;
return( ERR_OK );
}
@@ -615,7 +615,7 @@ ERRTYPE RscIdRange::SetNumber( const RSCINST & rInst, INT32 nValue )
|* Letzte Aenderung MM 25.11.91
|*
*************************************************************************/
-ERRTYPE RscIdRange::GetNumber( const RSCINST & rInst, INT32 * plValue ){
+ERRTYPE RscIdRange::GetNumber( const RSCINST & rInst, sal_Int32 * plValue ){
*plValue = ((RscId *)rInst.pData)->GetNumber();
return( ERR_OK );
}
@@ -635,7 +635,7 @@ ERRTYPE RscIdRange::SetRef( const RSCINST & rInst, const RscId & rRscId ){
aError = SetNumber( rInst, rRscId );
if( aError.IsOk() ){
*(RscId *)rInst.pData = rRscId;
- ((RscId *)rInst.pData)->aExp.cUnused = FALSE;
+ ((RscId *)rInst.pData)->aExp.cUnused = sal_False;
}
}
else
@@ -684,11 +684,11 @@ void RscIdRange::WriteSrc( const RSCINST & rInst, FILE * fOutput,
|*
*************************************************************************/
ERRTYPE RscIdRange::WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
- RscTypCont *, sal_uInt32, BOOL )
+ RscTypCont *, sal_uInt32, sal_Bool )
{
- INT32 lVal = ((RscId*)rInst.pData)->GetNumber();
+ sal_Int32 lVal = ((RscId*)rInst.pData)->GetNumber();
- aMem.Put( (INT32)lVal );
+ aMem.Put( (sal_Int32)lVal );
return( ERR_OK );
}
@@ -703,7 +703,7 @@ void RscIdRange::WriteRcAccess
{
fprintf( fOutput, "\t\tSet%s( ", pName );
fprintf( fOutput, "GetLong( pResData+nOffset ) );\n" );
- fprintf( fOutput, "\t\tnOffset += sizeof( INT32 );\n" );
+ fprintf( fOutput, "\t\tnOffset += sizeof( sal_Int32 );\n" );
}
/*************************************************************************
@@ -715,16 +715,16 @@ void RscIdRange::WriteRcAccess
|* Letzte Aenderung MM 22.11.91
|*
*************************************************************************/
-BOOL RscIdRange::IsConsistent( const RSCINST & rInst, RscInconsList * pList )
+sal_Bool RscIdRange::IsConsistent( const RSCINST & rInst, RscInconsList * pList )
{
long nValue = ((RscId *)rInst.pData)->GetNumber();
if( (nMax >= nValue) && (nMin <= nValue) )
- return TRUE;
+ return sal_True;
else {
if( pList )
pList->Insert( new RscInconsistent(
*(RscId *)rInst.pData, *(RscId *)rInst.pData ) );
- return FALSE;
+ return sal_False;
}
}
@@ -770,7 +770,7 @@ RSCCLASS_TYPE RscBool::GetClassType() const
void RscBool::WriteSrc( const RSCINST & rInst, FILE * fOutput,
RscTypCont *, sal_uInt32, const char * )
{
- INT32 l;
+ sal_Int32 l;
GetNumber( rInst, &l );
if( l )
@@ -788,7 +788,7 @@ void RscBool::WriteRcAccess
)
{
fprintf( fOutput, "\t\tSet%s( ", pName );
- fprintf( fOutput, "(BOOL)*(short *)(pResData+nOffset) );\n" );
+ fprintf( fOutput, "(sal_Bool)*(short *)(pResData+nOffset) );\n" );
fprintf( fOutput, "\t\tnOffset += sizeof( short );\n" );
}
@@ -817,7 +817,7 @@ RscBreakRange :: RscBreakRange( Atom nId, sal_uInt32 nTypeId )
|* Letzte Aenderung MM 24.06.91
|*
*************************************************************************/
-ERRTYPE RscBreakRange::SetNumber( const RSCINST & rInst, INT32 nValue ){
+ERRTYPE RscBreakRange::SetNumber( const RSCINST & rInst, sal_Int32 nValue ){
if( nValue == nOutRange )
return( ERR_RSCRANGE_OUTDEFSET );
else
@@ -834,10 +834,10 @@ ERRTYPE RscBreakRange::SetNumber( const RSCINST & rInst, INT32 nValue ){
|*
*************************************************************************/
RSCINST RscBreakRange::Create( RSCINST * pInst, const RSCINST & rDflt,
- BOOL bOwnClass )
+ sal_Bool bOwnClass )
{
RSCINST aInst;
- INT32 l;
+ sal_Int32 l;
aInst = RscRange::Create( pInst, rDflt, bOwnClass );
diff --git a/rsc/source/res/rscstr.cxx b/rsc/source/res/rscstr.cxx
index 6bf25cf4dd58..ad668ac2b3cb 100644
--- a/rsc/source/res/rscstr.cxx
+++ b/rsc/source/res/rscstr.cxx
@@ -87,7 +87,7 @@ ERRTYPE RscString::SetString( const RSCINST & rInst, const char * pStr ){
ERRTYPE aError;
if( aError.IsOk() ){
- ((RscStringInst *)rInst.pData)->bDflt = FALSE;
+ ((RscStringInst *)rInst.pData)->bDflt = sal_False;
pTmp = ((RscStringInst *)rInst.pData)->pStr;
if( pTmp ){
@@ -147,7 +147,7 @@ ERRTYPE RscString::GetRef( const RSCINST & rInst, RscId * pRscId ){
ERRTYPE RscString::SetRef( const RSCINST & rInst, const RscId & rRefId ){
if( pRefClass ){
((RscStringInst *)rInst.pData)->aRefId = rRefId;
- ((RscStringInst *)rInst.pData)->bDflt = FALSE;
+ ((RscStringInst *)rInst.pData)->bDflt = sal_False;
}
else
return( ERR_REFNOTALLOWED );
@@ -165,7 +165,7 @@ ERRTYPE RscString::SetRef( const RSCINST & rInst, const RscId & rRefId ){
|*
*************************************************************************/
RSCINST RscString::Create( RSCINST * pInst, const RSCINST & rDflt,
- BOOL bOwnClass )
+ sal_Bool bOwnClass )
{
RSCINST aInst;
@@ -181,7 +181,7 @@ RSCINST RscString::Create( RSCINST * pInst, const RSCINST & rDflt,
((RscStringInst *)aInst.pData)->aRefId.Create();
((RscStringInst *)aInst.pData)->pStr = NULL;
- ((RscStringInst *)aInst.pData)->bDflt = TRUE;
+ ((RscStringInst *)aInst.pData)->bDflt = sal_True;
if( bOwnClass ){
((RscStringInst *)aInst.pData)->aRefId =
@@ -218,7 +218,7 @@ void RscString::Destroy( const RSCINST & rInst ){
|* Letzte Aenderung MM 15.01.92
|*
*************************************************************************/
-BOOL RscString::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ){
+sal_Bool RscString::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ){
RscStringInst * pData = (RscStringInst*)rInst.pData;
RscStringInst * pDefData = (RscStringInst*)pDef;
@@ -231,34 +231,34 @@ BOOL RscString::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ){
// Sind die Referenzidentifier gleich
if( pData->aRefId.GetNumber() == pDefData->aRefId.GetNumber() )
{
- return TRUE;
+ return sal_True;
}
}
}
else {
- BOOL bStrEmpty = FALSE;
- BOOL bDefStrEmpty = FALSE;
+ sal_Bool bStrEmpty = sal_False;
+ sal_Bool bDefStrEmpty = sal_False;
if( pData->pStr ){
bStrEmpty = ('\0' == *pData->pStr);
}
else
- bStrEmpty = TRUE;
+ bStrEmpty = sal_True;
if( pDefData->pStr ){
bDefStrEmpty = ('\0' == *pDefData->pStr);
}
else
- bDefStrEmpty = TRUE;
+ bDefStrEmpty = sal_True;
if( !bStrEmpty || !bDefStrEmpty ){
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -319,7 +319,7 @@ void RscString::WriteSrc( const RSCINST & rInst, FILE * fOutput,
|*
*************************************************************************/
ERRTYPE RscString::WriteRc( const RSCINST & rInst, RscWriteRc & rMem,
- RscTypCont * pTC, sal_uInt32 nDeep, BOOL bExtra )
+ RscTypCont * pTC, sal_uInt32 nDeep, sal_Bool bExtra )
{
ERRTYPE aError;
ObjNode * pObjNode = NULL;
diff --git a/rsc/source/res/rsctop.cxx b/rsc/source/res/rsctop.cxx
index 4b7887ebf298..cff9c92ab508 100644
--- a/rsc/source/res/rsctop.cxx
+++ b/rsc/source/res/rsctop.cxx
@@ -180,12 +180,12 @@ ERRTYPE RscTop :: GetRef( const RSCINST & rInst, RscId * pRscId ){
|* Letzte Aenderung MM 17.05.91
|*
*************************************************************************/
-BOOL RscTop::InHierarchy( RscTop * pClass ){
+sal_Bool RscTop::InHierarchy( RscTop * pClass ){
if( this == pClass )
- return( TRUE );
+ return( sal_True );
if( pSuperClass )
return( pSuperClass->InHierarchy( pClass ) );
- return( FALSE );
+ return( sal_False );
}
/*************************************************************************
@@ -238,7 +238,7 @@ RSCINST RscTop::GetVariable
const RSCINST & rInst,
Atom nVarName,
const RSCINST & rInitInst,
- BOOL bInitDflt,
+ sal_Bool bInitDflt,
RscTop * pCreateClass
)
{
@@ -342,7 +342,7 @@ ERRTYPE RscTop::GetArrayEle
ERRTYPE RscTop::GetValueEle
(
const RSCINST & rInst,
- INT32 lValue,
+ sal_Int32 lValue,
RscTop * pCreateClass,
RSCINST * pGetInst
)
@@ -469,7 +469,7 @@ sal_uInt32 RscTop::GetCount( const RSCINST & rInst ){
|* Letzte Aenderung MM 29.10.91
|*
*************************************************************************/
-ERRTYPE RscTop::SetNumber( const RSCINST & rInst, INT32 lValue ){
+ERRTYPE RscTop::SetNumber( const RSCINST & rInst, sal_Int32 lValue ){
if( pSuperClass )
return pSuperClass->
SetNumber( rInst, lValue );
@@ -486,7 +486,7 @@ ERRTYPE RscTop::SetNumber( const RSCINST & rInst, INT32 lValue ){
|* Letzte Aenderung MM 29.10.91
|*
*************************************************************************/
-ERRTYPE RscTop::SetBool( const RSCINST & rInst, BOOL bValue ){
+ERRTYPE RscTop::SetBool( const RSCINST & rInst, sal_Bool bValue ){
if( pSuperClass )
return pSuperClass->
SetBool( rInst, bValue );
@@ -503,7 +503,7 @@ ERRTYPE RscTop::SetBool( const RSCINST & rInst, BOOL bValue ){
|* Letzte Aenderung MM 29.10.91
|*
*************************************************************************/
-ERRTYPE RscTop::SetConst( const RSCINST & rInst, Atom nId, INT32 nVal )
+ERRTYPE RscTop::SetConst( const RSCINST & rInst, Atom nId, sal_Int32 nVal )
{
if( pSuperClass )
return pSuperClass->SetConst( rInst, nId, nVal );
@@ -554,7 +554,7 @@ ERRTYPE RscTop::SetString( const RSCINST & rInst, const char * pStr ){
|* Letzte Aenderung MM 29.10.91
|*
*************************************************************************/
-ERRTYPE RscTop::GetNumber( const RSCINST & rInst, INT32 * pN ){
+ERRTYPE RscTop::GetNumber( const RSCINST & rInst, sal_Int32 * pN ){
if( pSuperClass )
return pSuperClass->
GetNumber( rInst, pN );
@@ -571,7 +571,7 @@ ERRTYPE RscTop::GetNumber( const RSCINST & rInst, INT32 * pN ){
|* Letzte Aenderung MM 29.10.91
|*
*************************************************************************/
-ERRTYPE RscTop::GetBool( const RSCINST & rInst, BOOL * pB ){
+ERRTYPE RscTop::GetBool( const RSCINST & rInst, sal_Bool * pB ){
if( pSuperClass )
return pSuperClass->
GetBool( rInst, pB );
@@ -622,7 +622,7 @@ ERRTYPE RscTop::GetString( const RSCINST & rInst, char ** ppStr ){
|* Letzte Aenderung MM 17.07.91
|*
*************************************************************************/
-RSCINST RscTop::Create( RSCINST * pInst, const RSCINST & rDefInst, BOOL bOwnRange )
+RSCINST RscTop::Create( RSCINST * pInst, const RSCINST & rDefInst, sal_Bool bOwnRange )
{
if( pSuperClass )
return pSuperClass->
@@ -657,13 +657,13 @@ void RscTop::Destroy( const RSCINST & rInst ){
|* Letzte Aenderung MM 29.10.91
|*
*************************************************************************/
-BOOL RscTop::IsConsistent( const RSCINST & rInst,
+sal_Bool RscTop::IsConsistent( const RSCINST & rInst,
RscInconsList * pList )
{
if( pSuperClass )
return pSuperClass->IsConsistent( rInst, pList );
else
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -690,11 +690,11 @@ void RscTop::SetToDefault( const RSCINST & rInst )
|* Letzte Aenderung MM 29.10.91
|*
*************************************************************************/
-BOOL RscTop::IsDefault( const RSCINST & rInst ){
+sal_Bool RscTop::IsDefault( const RSCINST & rInst ){
if( pSuperClass )
return pSuperClass->IsDefault( rInst );
else
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -706,11 +706,11 @@ BOOL RscTop::IsDefault( const RSCINST & rInst ){
|* Letzte Aenderung MM 29.10.91
|*
*************************************************************************/
-BOOL RscTop::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ){
+sal_Bool RscTop::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ){
if( pSuperClass )
return pSuperClass->IsValueDefault( rInst, pDef );
else
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -907,7 +907,7 @@ void RscTop::WriteSrc( const RSCINST & rInst, FILE * fOutput,
*************************************************************************/
ERRTYPE RscTop::WriteRcHeader( const RSCINST & rInst, RscWriteRc & rMem,
RscTypCont * pTC, const RscId & rId,
- sal_uInt32 nDeep, BOOL bExtra )
+ sal_uInt32 nDeep, sal_Bool bExtra )
{
if( pSuperClass )
return( pSuperClass->
@@ -926,7 +926,7 @@ ERRTYPE RscTop::WriteRcHeader( const RSCINST & rInst, RscWriteRc & rMem,
|*
*************************************************************************/
ERRTYPE RscTop::WriteRc( const RSCINST & rInst, RscWriteRc & rMem,
- RscTypCont * pTC, sal_uInt32 nDeep, BOOL bExtra )
+ RscTypCont * pTC, sal_uInt32 nDeep, sal_Bool bExtra )
{
if( pSuperClass )
return( pSuperClass->
diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx
index 54073563403d..8e9379738fed 100644
--- a/rsc/source/rsc/rsc.cxx
+++ b/rsc/source/rsc/rsc.cxx
@@ -141,7 +141,7 @@ RscCmdLine::RscCmdLine( int argc, char ** argv, RscError * pEH )
RscPtrPtr aCmdLine; // Kommandozeile
ByteString aString;
sal_uInt32 i;
- BOOL bOutputSrsIsSet = FALSE;
+ sal_Bool bOutputSrsIsSet = sal_False;
Init(); // Defaults setzen
@@ -253,7 +253,7 @@ RscCmdLine::RscCmdLine( int argc, char ** argv, RscError * pEH )
else if( !rsc_strnicmp( (*ppStr) + 1, "fp=", 3 ) )
{ // anderer Name fuer .srs-file
aOutputSrs = (*ppStr) + 4;
- bOutputSrsIsSet = TRUE;
+ bOutputSrsIsSet = sal_True;
}
else if( !rsc_strnicmp( (*ppStr) + 1, "fl=", 3 ) )
{ // Name fuer listing-file
@@ -348,9 +348,9 @@ RscCmdLine::~RscCmdLine()
{
ByteString *pString;
- while( NULL != (pString = aInputList.Remove( (ULONG)0 )) )
+ while( NULL != (pString = aInputList.Remove( (sal_uLong)0 )) )
delete pString;
- while( NULL != (pString = aSymbolList.Remove( (ULONG)0 )) )
+ while( NULL != (pString = aSymbolList.Remove( (sal_uLong)0 )) )
delete pString;
}
@@ -576,7 +576,7 @@ void RscCompiler::EndCompile()
if( !pFN->IsIncFile() )
{
pTC->WriteSrc( foutput, NOFILE_INDEX,
- RTL_TEXTENCODING_UNICODE, FALSE );
+ RTL_TEXTENCODING_UNICODE, sal_False );
break; // ?T 281091MM nur eine Src-Datei
}
};
@@ -656,7 +656,7 @@ void RscCompiler::EndCompile()
|* Letzte Aenderung MM 21.06.91
|*
*************************************************************************/
-ERRTYPE RscCompiler :: IncludeParser( ULONG lFileKey )
+ERRTYPE RscCompiler :: IncludeParser( sal_uLong lFileKey )
{
FILE * finput;
RscFile * pFName;
@@ -681,7 +681,7 @@ ERRTYPE RscCompiler :: IncludeParser( ULONG lFileKey )
RscDepend * pDep;
RscFileInst aFileInst( pTC, lFileKey, lFileKey, finput );
- pFName->bScanned = TRUE;
+ pFName->bScanned = sal_True;
::IncludeParser( &aFileInst );
fclose( finput );
@@ -724,7 +724,7 @@ ERRTYPE RscCompiler :: IncludeParser( ULONG lFileKey )
|* Letzte Aenderung MM 26.06.91
|*
*************************************************************************/
-ERRTYPE RscCompiler :: ParseOneFile( ULONG lFileKey,
+ERRTYPE RscCompiler :: ParseOneFile( sal_uLong lFileKey,
const RscCmdLine::OutputFile* pOutputFile,
const WriteRcContext* pContext )
{
@@ -740,7 +740,7 @@ ERRTYPE RscCompiler :: ParseOneFile( ULONG lFileKey,
RscDepend * pDep;
//Include-Dateien vorher lesen
- pFName->bLoaded = TRUE; //Endlos Rekursion vermeiden
+ pFName->bLoaded = sal_True; //Endlos Rekursion vermeiden
pDep = pFName->First();
while( pDep && aError.IsOk() )
{
@@ -750,7 +750,7 @@ ERRTYPE RscCompiler :: ParseOneFile( ULONG lFileKey,
}
if( aError.IsError() )
- pFName->bLoaded = FALSE; //bei Fehler nicht geladenen
+ pFName->bLoaded = sal_False; //bei Fehler nicht geladenen
else
{
String aTmpName( ::GetTmpFileName(), RTL_TEXTENCODING_ASCII_US );
@@ -855,7 +855,7 @@ ERRTYPE RscCompiler::Link()
{
pTC->Delete( pTC->aFileTab.GetIndex( pFName ) );
pTC->aFileTab.Seek( pFName );
- pFName->bLoaded = FALSE;
+ pFName->bLoaded = sal_False;
}
}
@@ -1115,7 +1115,7 @@ ByteString RscCompiler::GetTmpFileName()
/********************************************************************/
/* */
-/* Function : BOOL openinput() */
+/* Function : sal_Bool openinput() */
/* */
/* Description : Check to see if the input file exists and can */
/* be opened for reading. */
diff --git a/rsc/source/tools/rscchar.cxx b/rsc/source/tools/rscchar.cxx
index 2e43844b9f08..f554040c4ec9 100644
--- a/rsc/source/tools/rscchar.cxx
+++ b/rsc/source/tools/rscchar.cxx
@@ -53,7 +53,7 @@
|* Letzte Aenderung MM 20.03.91
|*
*************************************************************************/
-char * RscChar::MakeUTF8( char * pStr, UINT16 nTextEncoding )
+char * RscChar::MakeUTF8( char * pStr, sal_uInt16 nTextEncoding )
{
sal_Size nMaxUniCodeBuf = strlen( pStr ) + 1;
if( nMaxUniCodeBuf * 6 > 0x0FFFFF )
@@ -113,7 +113,7 @@ char * RscChar::MakeUTF8( char * pStr, UINT16 nTextEncoding )
int i = 0;
while( '0' <= *pStr && '7' >= *pStr && i != 3 )
{
- nChar = nChar * 8 + (BYTE)*pStr - (BYTE)'0';
+ nChar = nChar * 8 + (sal_uInt8)*pStr - (sal_uInt8)'0';
++pStr;
i++;
}
@@ -134,11 +134,11 @@ char * RscChar::MakeUTF8( char * pStr, UINT16 nTextEncoding )
while( isxdigit( *pStr ) && i != 2 )
{
if( isdigit( *pStr ) )
- nChar = nChar * 16 + (BYTE)*pStr - (BYTE)'0';
+ nChar = nChar * 16 + (sal_uInt8)*pStr - (sal_uInt8)'0';
else if( isupper( *pStr ) )
- nChar = nChar * 16 + (BYTE)*pStr - (BYTE)'A' +10;
+ nChar = nChar * 16 + (sal_uInt8)*pStr - (sal_uInt8)'A' +10;
else
- nChar = nChar * 16 + (BYTE)*pStr - (BYTE)'a' +10;
+ nChar = nChar * 16 + (sal_uInt8)*pStr - (sal_uInt8)'a' +10;
++pStr;
i++;
}
diff --git a/rsc/source/tools/rscdef.cxx b/rsc/source/tools/rscdef.cxx
index eb714bbcc3c2..6231bbd92aae 100644
--- a/rsc/source/tools/rscdef.cxx
+++ b/rsc/source/tools/rscdef.cxx
@@ -34,7 +34,7 @@
/****************** C o d e **********************************************/
/****************** R s c I d ********************************************/
-BOOL RscId::bNames = TRUE;
+sal_Bool RscId::bNames = sal_True;
/*************************************************************************
|*
@@ -46,8 +46,8 @@ BOOL RscId::bNames = TRUE;
|* Letzte Aenderung MM 26.06.91
|*
*************************************************************************/
-void RscId::SetNames( BOOL bSet ) { bNames = bSet; }
-BOOL RscId::IsSetNames() { return bNames; }
+void RscId::SetNames( sal_Bool bSet ) { bNames = bSet; }
+sal_Bool RscId::IsSetNames() { return bNames; }
/*************************************************************************
|*
@@ -58,8 +58,8 @@ BOOL RscId::IsSetNames() { return bNames; }
|* Letzte Aenderung MM 17.05.91
|*
*************************************************************************/
-INT32 RscId::GetNumber() const{
- INT32 lVal;
+sal_Int32 RscId::GetNumber() const{
+ sal_Int32 lVal;
aExp.Evaluate( &lVal );
return lVal;
}
@@ -79,7 +79,7 @@ void RscId::Create( const RscExpType & rExpType )
if( aExp.IsDefinition() )
aExp.aExp.pDef->IncRef();
else if( aExp.IsExpression() ){
- INT32 lValue;
+ sal_Int32 lValue;
aExp.Evaluate( &lValue );
aExp.SetLong( lValue );
@@ -159,7 +159,7 @@ RscId& RscId::operator = ( const RscId& rRscId ){
|* Letzte Aenderung MM 16.05.91
|*
*************************************************************************/
-BOOL RscId::operator == ( const RscId& rRscId ) const
+sal_Bool RscId::operator == ( const RscId& rRscId ) const
{
return( GetNumber() == rRscId.GetNumber() );
}
@@ -173,7 +173,7 @@ BOOL RscId::operator == ( const RscId& rRscId ) const
|* Letzte Aenderung MM 16.05.91
|*
*************************************************************************/
-BOOL RscId::operator < ( const RscId& rRscId ) const
+sal_Bool RscId::operator < ( const RscId& rRscId ) const
{
return( GetNumber() < rRscId.GetNumber() );
}
@@ -187,21 +187,21 @@ BOOL RscId::operator < ( const RscId& rRscId ) const
|* Letzte Aenderung MM 16.05.91
|*
*************************************************************************/
-BOOL RscId::operator > ( const RscId& rRscId ) const
+sal_Bool RscId::operator > ( const RscId& rRscId ) const
{
return( GetNumber() > rRscId.GetNumber() );
}
/*************************************************************************
|*
-|* RscId::INT32()
+|* RscId::sal_Int32()
|*
|* Beschreibung
|* Ersterstellung MM 16.05.91
|* Letzte Aenderung MM 16.05.91
|*
*************************************************************************/
-RscId::operator INT32() const
+RscId::operator sal_Int32() const
{
return( GetNumber() );
}
@@ -261,7 +261,7 @@ ByteString RscId::GetMacro() const
|* Letzte Aenderung MM 01.11.91
|*
*************************************************************************/
-RscDefine::RscDefine( ULONG lKey, const ByteString & rDefName, INT32 lDefId )
+RscDefine::RscDefine( sal_uLong lKey, const ByteString & rDefName, sal_Int32 lDefId )
: StringNode( rDefName )
{
nRefCount = 0;
@@ -270,7 +270,7 @@ RscDefine::RscDefine( ULONG lKey, const ByteString & rDefName, INT32 lDefId )
pExp = NULL;
}
-RscDefine::RscDefine( ULONG lKey, const ByteString & rDefName,
+RscDefine::RscDefine( sal_uLong lKey, const ByteString & rDefName,
RscExpression * pExpression )
: StringNode( rDefName )
{
@@ -345,7 +345,7 @@ void RscDefine::ChangeMacro( RscExpression * pExpression ){
pExp->Evaluate( &lId );
}
-void RscDefine::ChangeMacro( INT32 lIdentifier ){
+void RscDefine::ChangeMacro( sal_Int32 lIdentifier ){
if( pExp ){
delete pExp;
pExp = NULL;
@@ -362,8 +362,8 @@ void RscDefine::ChangeMacro( INT32 lIdentifier ){
|* Letzte Aenderung MM 01.11.91
|*
*************************************************************************/
-BOOL RscDefine::Evaluate(){
- BOOL bRet = TRUE;
+sal_Bool RscDefine::Evaluate(){
+ sal_Bool bRet = sal_True;
if( pExp )
bRet = !pExp->Evaluate( &lId );
@@ -410,8 +410,8 @@ ByteString RscDefine::GetMacro()
|* Letzte Aenderung MM 04.11.91
|*
*************************************************************************/
-RscDefine * RscDefineList::New( ULONG lFileKey, const ByteString & rDefName,
- INT32 lDefId, ULONG lPos )
+RscDefine * RscDefineList::New( sal_uLong lFileKey, const ByteString & rDefName,
+ sal_Int32 lDefId, sal_uLong lPos )
{
RscDefine * pDef;
@@ -421,8 +421,8 @@ RscDefine * RscDefineList::New( ULONG lFileKey, const ByteString & rDefName,
return pDef;
}
-RscDefine * RscDefineList::New( ULONG lFileKey, const ByteString & rDefName,
- RscExpression * pExpression, ULONG lPos )
+RscDefine * RscDefineList::New( sal_uLong lFileKey, const ByteString & rDefName,
+ RscExpression * pExpression, sal_uLong lPos )
{
RscDefine * pDef;
@@ -442,7 +442,7 @@ RscDefine * RscDefineList::New( ULONG lFileKey, const ByteString & rDefName,
|* Letzte Aenderung MM 04.11.91
|*
*************************************************************************/
-BOOL RscDefineList::Remove( RscDefine * pDef ){
+sal_Bool RscDefineList::Remove( RscDefine * pDef ){
pDef = RscSubDefList::Remove( pDef );
if( pDef ){
pDef->DefineToNumber();
@@ -452,7 +452,7 @@ BOOL RscDefineList::Remove( RscDefine * pDef ){
return( NULL != pDef );
}
-BOOL RscDefineList::Remove( ULONG lIndex ){
+sal_Bool RscDefineList::Remove( sal_uLong lIndex ){
RscDefine * pDef = RscSubDefList::Remove( lIndex );
if( pDef ){
pDef->DefineToNumber();
@@ -462,10 +462,10 @@ BOOL RscDefineList::Remove( ULONG lIndex ){
return( NULL != pDef );
}
-BOOL RscDefineList::Remove(){
+sal_Bool RscDefineList::Remove(){
RscDefine * pDef;
- pDef = RscSubDefList::Remove( (ULONG)0 );
+ pDef = RscSubDefList::Remove( (sal_uLong)0 );
if( pDef ){
pDef->DefineToNumber();
@@ -483,7 +483,7 @@ BOOL RscDefineList::Remove(){
|* Letzte Aenderung MM 12.11.91
|*
*************************************************************************/
-BOOL RscDefineList::Befor( const RscDefine * pFree,
+sal_Bool RscDefineList::Befor( const RscDefine * pFree,
const RscDefine * pDepend )
{
RscDefine * pDef;
@@ -494,13 +494,13 @@ BOOL RscDefineList::Befor( const RscDefine * pFree,
pDef = Next();
while( pDef ){
if( pDef == pDepend )
- return TRUE;
+ return sal_True;
pDef = Next();
}
}
pDef = Next();
};
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -535,7 +535,7 @@ void RscDefineList::WriteAll( FILE * fOutput )
|* Letzte Aenderung MM 01.11.91
|*
*************************************************************************/
-BOOL RscExpType::Evaluate( INT32 * plValue ) const{
+sal_Bool RscExpType::Evaluate( sal_Int32 * plValue ) const{
if( IsDefinition() ){
aExp.pDef->Evaluate();
// Eventuellen Fehler ignorieren
@@ -548,7 +548,7 @@ BOOL RscExpType::Evaluate( INT32 * plValue ) const{
else
*plValue = GetLong();
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -626,9 +626,9 @@ RscExpression::~RscExpression(){
|* Letzte Aenderung MM 01.11.91
|*
*************************************************************************/
-BOOL RscExpression::Evaluate( INT32 * plValue ){
- INT32 lLeft;
- INT32 lRight;
+sal_Bool RscExpression::Evaluate( sal_Int32 * plValue ){
+ sal_Int32 lLeft;
+ sal_Int32 lRight;
// linken und rechten Zweig auswerten
if( aLeftExp.Evaluate( &lLeft ) && aRightExp.Evaluate( &lRight ) ){
@@ -648,12 +648,12 @@ BOOL RscExpression::Evaluate( INT32 * plValue ){
*plValue = lLeft << lRight;
else{
if( 0L == lRight )
- return FALSE;
+ return sal_False;
*plValue = lLeft / lRight;
};
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -712,10 +712,10 @@ ByteString RscExpression::GetMacro()
|*
*************************************************************************/
RscFile :: RscFile(){
- bLoaded = FALSE;
- bIncFile = FALSE;
- bDirty = FALSE;
- bScanned = FALSE;
+ bLoaded = sal_False;
+ bIncFile = sal_False;
+ bDirty = sal_False;
+ bScanned = sal_False;
}
/*************************************************************************
@@ -728,11 +728,11 @@ RscFile :: RscFile(){
|*
*************************************************************************/
RscFile :: ~RscFile(){
- RscDepend * pDep = Remove( (ULONG)0 );
+ RscDepend * pDep = Remove( (sal_uLong)0 );
while( pDep ){
delete pDep;
- pDep = Remove( (ULONG)0 );
+ pDep = Remove( (sal_uLong)0 );
}
//von hinten nach vorne ist besser wegen der Abhaengigkeiten
@@ -745,14 +745,14 @@ RscFile :: ~RscFile(){
|*
|* RscFile::Depend()
|*
-|* Beschreibung Diese Methode gibt TRUE zurueck, wenn lDepend
+|* Beschreibung Diese Methode gibt sal_True zurueck, wenn lDepend
|* existiert und hinter lFree steht, oder wenn
|* lDepend nicht existiert.
|* Ersterstellung MM 12.11.91
|* Letzte Aenderung MM 12.11.91
|*
*************************************************************************/
-BOOL RscFile::Depend( ULONG lDepend, ULONG lFree ){
+sal_Bool RscFile::Depend( sal_uLong lDepend, sal_uLong lFree ){
RscDepend * pDep;
pDep = Last();
@@ -760,15 +760,15 @@ BOOL RscFile::Depend( ULONG lDepend, ULONG lFree ){
if( pDep->GetFileKey() == lDepend ){
while( pDep ){
if( pDep->GetFileKey() == lFree )
- return TRUE;
+ return sal_True;
pDep = Prev();
}
- return FALSE;
+ return sal_False;
}
pDep = Prev();
};
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -780,14 +780,14 @@ BOOL RscFile::Depend( ULONG lDepend, ULONG lFree ){
|* Letzte Aenderung MM 06.01.92
|*
*************************************************************************/
-BOOL RscFile :: InsertDependFile( ULONG lIncFile, ULONG lPos )
+sal_Bool RscFile :: InsertDependFile( sal_uLong lIncFile, sal_uLong lPos )
{
RscDepend * pDep;
pDep = First();
while( pDep ){
if( pDep->GetFileKey() == lIncFile )
- return TRUE;
+ return sal_True;
pDep = Next();
}
@@ -799,7 +799,7 @@ BOOL RscFile :: InsertDependFile( ULONG lIncFile, ULONG lPos )
else
Insert( new RscDepend( lIncFile ), lPos );
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -811,7 +811,7 @@ BOOL RscFile :: InsertDependFile( ULONG lIncFile, ULONG lPos )
|* Letzte Aenderung MM 18.11.91
|*
*************************************************************************/
-void RscFile :: RemoveDependFile( ULONG lDepFile )
+void RscFile :: RemoveDependFile( sal_uLong lDepFile )
{
RscDepend * pDep = Last();
@@ -915,17 +915,17 @@ void RscDefTree::Remove( RscDefine * pDef ){
|* Letzte Aenderung MM 12.11.91
|*
*************************************************************************/
-BOOL RscDefTree::Evaluate( RscDefine * pDef ){
+sal_Bool RscDefTree::Evaluate( RscDefine * pDef ){
if( pDef ){
if( !Evaluate( (RscDefine *)pDef->Left() ) )
- return FALSE;
+ return sal_False;
if( !Evaluate( (RscDefine *)pDef->Right() ) )
- return FALSE;
+ return sal_False;
};
- return TRUE;
+ return sal_True;
}
-BOOL RscDefTree::Evaluate(){
+sal_Bool RscDefTree::Evaluate(){
return Evaluate( pDefRoot );
}
@@ -973,7 +973,7 @@ RscFileTab :: ~RscFileTab(){
|* Letzte Aenderung MM 16.05.91
|*
*************************************************************************/
-ULONG RscFileTab :: Find( const ByteString & rName )
+sal_uLong RscFileTab :: Find( const ByteString & rName )
{
RscFile * pFName;
@@ -1009,7 +1009,7 @@ RscDefine * RscFileTab::FindDef( const char * pName ){
|* Letzte Aenderung MM 01.11.91
|*
*************************************************************************/
-RscDefine * RscFileTab::FindDef( ULONG lFileKey, const ByteString & rName )
+RscDefine * RscFileTab::FindDef( sal_uLong lFileKey, const ByteString & rName )
{
RscDefine * pDef = FindDef( rName );
@@ -1030,20 +1030,20 @@ RscDefine * RscFileTab::FindDef( ULONG lFileKey, const ByteString & rName )
|* Letzte Aenderung MM 08.11.91
|*
*************************************************************************/
-BOOL RscFileTab::Depend( ULONG lDepend, ULONG lFree ){
+sal_Bool RscFileTab::Depend( sal_uLong lDepend, sal_uLong lFree ){
if( lDepend == lFree )
- return TRUE;
+ return sal_True;
RscFile * pFile = First();
while( pFile ){
if( !pFile->IsIncFile() ){
if( !pFile->Depend( lDepend, lFree ) )
- return FALSE;
+ return sal_False;
};
pFile = Next();
};
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -1055,17 +1055,17 @@ BOOL RscFileTab::Depend( ULONG lDepend, ULONG lFree ){
|* Letzte Aenderung MM 14.01.92
|*
*************************************************************************/
-BOOL RscFileTab::TestDef( ULONG lFileKey, ULONG lPos,
+sal_Bool RscFileTab::TestDef( sal_uLong lFileKey, sal_uLong lPos,
const RscDefine * pDefDec )
{
if( lFileKey == pDefDec->GetFileKey() ){
RscFile * pFile = GetFile( pDefDec->GetFileKey() );
if( pFile && (lPos <= pFile->aDefLst.GetPos( (RscDefine *)pDefDec ))
&& (lPos != LIST_APPEND) )
- return FALSE;
+ return sal_False;
}
else if( !Depend( lFileKey, pDefDec->GetFileKey() ) )
- return FALSE;
+ return sal_False;
return TestDef( lFileKey, lPos, pDefDec->pExp );
}
@@ -1079,29 +1079,29 @@ BOOL RscFileTab::TestDef( ULONG lFileKey, ULONG lPos,
|* Letzte Aenderung MM 14.01.92
|*
*************************************************************************/
-BOOL RscFileTab::TestDef( ULONG lFileKey, ULONG lPos,
+sal_Bool RscFileTab::TestDef( sal_uLong lFileKey, sal_uLong lPos,
const RscExpression * pExpDec )
{
if( !pExpDec )
- return TRUE;
+ return sal_True;
if( pExpDec->aLeftExp.IsExpression() )
if( !TestDef( lFileKey, lPos, pExpDec->aLeftExp.aExp.pExp ) )
- return FALSE;
+ return sal_False;
if( pExpDec->aLeftExp.IsDefinition() )
if( !TestDef( lFileKey, lPos, pExpDec->aLeftExp.aExp.pDef ) )
- return FALSE;
+ return sal_False;
if( pExpDec->aRightExp.IsExpression() )
if( !TestDef( lFileKey, lPos, pExpDec->aRightExp.aExp.pExp ) )
- return FALSE;
+ return sal_False;
if( pExpDec->aRightExp.IsDefinition() )
if( !TestDef( lFileKey, lPos, pExpDec->aRightExp.aExp.pDef ) )
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -1113,8 +1113,8 @@ BOOL RscFileTab::TestDef( ULONG lFileKey, ULONG lPos,
|* Letzte Aenderung MM 04.11.91
|*
*************************************************************************/
-RscDefine * RscFileTab::NewDef( ULONG lFileKey, const ByteString & rDefName,
- INT32 lId, ULONG lPos )
+RscDefine * RscFileTab::NewDef( sal_uLong lFileKey, const ByteString & rDefName,
+ sal_Int32 lId, sal_uLong lPos )
{
RscDefine * pDef = FindDef( rDefName );
@@ -1141,8 +1141,8 @@ RscDefine * RscFileTab::NewDef( ULONG lFileKey, const ByteString & rDefName,
|* Letzte Aenderung MM 04.11.91
|*
*************************************************************************/
-RscDefine * RscFileTab::NewDef( ULONG lFileKey, const ByteString & rDefName,
- RscExpression * pExp, ULONG lPos )
+RscDefine * RscFileTab::NewDef( sal_uLong lFileKey, const ByteString & rDefName,
+ RscExpression * pExp, sal_uLong lPos )
{
RscDefine * pDef = FindDef( rDefName );
@@ -1177,14 +1177,14 @@ RscDefine * RscFileTab::NewDef( ULONG lFileKey, const ByteString & rDefName,
|* Letzte Aenderung MM 22.11.91
|*
*************************************************************************/
-BOOL RscFileTab::IsDefUsed( const ByteString & rDefName )
+sal_Bool RscFileTab::IsDefUsed( const ByteString & rDefName )
{
RscDefine * pDef = FindDef( rDefName );
if( pDef )
return( pDef->GetRefCount() != 2 );
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -1219,7 +1219,7 @@ void RscFileTab::DeleteDef( const ByteString & rDefName )
|* Letzte Aenderung MM 11.11.91
|*
*************************************************************************/
-BOOL RscFileTab::ChangeDef( const ByteString & rDefName, INT32 lId )
+sal_Bool RscFileTab::ChangeDef( const ByteString & rDefName, sal_Int32 lId )
{
RscDefine * pDef = FindDef( rDefName );
@@ -1228,7 +1228,7 @@ BOOL RscFileTab::ChangeDef( const ByteString & rDefName, INT32 lId )
//alle Macros neu bewerten
return aDefTree.Evaluate();
};
- return( FALSE );
+ return( sal_False );
}
/*************************************************************************
@@ -1240,12 +1240,12 @@ BOOL RscFileTab::ChangeDef( const ByteString & rDefName, INT32 lId )
|* Letzte Aenderung MM 11.11.91
|*
*************************************************************************/
-BOOL RscFileTab::ChangeDef( const ByteString & rDefName,
+sal_Bool RscFileTab::ChangeDef( const ByteString & rDefName,
RscExpression * pExp )
{
RscDefine * pDef = FindDef( rDefName );
RscFile * pFile;
- ULONG lPos = 0;
+ sal_uLong lPos = 0;
if( pDef ){
pFile = GetFile( pDef->GetFileKey() );
@@ -1263,7 +1263,7 @@ BOOL RscFileTab::ChangeDef( const ByteString & rDefName,
// geloescht werden
delete pExp;
- return( FALSE );
+ return( sal_False );
}
/*************************************************************************
@@ -1275,7 +1275,7 @@ BOOL RscFileTab::ChangeDef( const ByteString & rDefName,
|* Letzte Aenderung MM 04.11.91
|*
*************************************************************************/
-BOOL RscFileTab::ChangeDefName( const ByteString & rDefName,
+sal_Bool RscFileTab::ChangeDefName( const ByteString & rDefName,
const ByteString & rNewName )
{
RscDefine * pDef = FindDef( rDefName );
@@ -1287,11 +1287,11 @@ BOOL RscFileTab::ChangeDefName( const ByteString & rDefName,
aDefTree.Remove( pDef );
pDef->SetName( rNewName );
aDefTree.Insert( pDef );
- return( TRUE );
+ return( sal_True );
}
};
- return( FALSE );
+ return( sal_False );
}
/*************************************************************************
@@ -1303,7 +1303,7 @@ BOOL RscFileTab::ChangeDefName( const ByteString & rDefName,
|* Letzte Aenderung MM 09.12.91
|*
*************************************************************************/
-void RscFileTab :: DeleteFileContext( ULONG lFileKey ){
+void RscFileTab :: DeleteFileContext( sal_uLong lFileKey ){
RscFile * pFName;
pFName = GetFile( lFileKey );
@@ -1315,7 +1315,7 @@ void RscFileTab :: DeleteFileContext( ULONG lFileKey ){
aDefTree.Remove( pDef );
pDef = pFName->aDefLst.Next();
};
- while( pFName->aDefLst.Remove( (ULONG)0 ) ) ;
+ while( pFName->aDefLst.Remove( (sal_uLong)0 ) ) ;
}
}
@@ -1328,7 +1328,7 @@ void RscFileTab :: DeleteFileContext( ULONG lFileKey ){
|* Letzte Aenderung MM 16.05.91
|*
*************************************************************************/
-void RscFileTab :: DeleteFile( ULONG lFileKey ){
+void RscFileTab :: DeleteFile( sal_uLong lFileKey ){
RscFile * pFName;
//Defines freigeben
@@ -1355,9 +1355,9 @@ void RscFileTab :: DeleteFile( ULONG lFileKey ){
|* Letzte Aenderung MM 16.05.91
|*
*************************************************************************/
-ULONG RscFileTab :: NewCodeFile( const ByteString & rName )
+sal_uLong RscFileTab :: NewCodeFile( const ByteString & rName )
{
- ULONG lKey;
+ sal_uLong lKey;
RscFile * pFName;
lKey = Find( rName );
@@ -1381,10 +1381,10 @@ ULONG RscFileTab :: NewCodeFile( const ByteString & rName )
|* Letzte Aenderung MM 16.05.91
|*
*************************************************************************/
-ULONG RscFileTab :: NewIncFile( const ByteString & rName,
+sal_uLong RscFileTab :: NewIncFile( const ByteString & rName,
const ByteString & rPath )
{
- ULONG lKey;
+ sal_uLong lKey;
RscFile * pFName;
lKey = Find( rName );
diff --git a/rsc/source/tools/rsctools.cxx b/rsc/source/tools/rsctools.cxx
index 93ecff2afe43..57345d0aa893 100644
--- a/rsc/source/tools/rsctools.cxx
+++ b/rsc/source/tools/rsctools.cxx
@@ -144,7 +144,7 @@ ByteString GetTmpFileName()
/* */
/* Description : appends text files */
/********************************************************************/
-BOOL Append( FILE * fDest, ByteString aTmpFile )
+sal_Bool Append( FILE * fDest, ByteString aTmpFile )
{
#define MAX_BUF 4096
char szBuf[ MAX_BUF ];
@@ -155,7 +155,7 @@ BOOL Append( FILE * fDest, ByteString aTmpFile )
if( !fDest || !fSource ){
if( fSource )
fclose( fSource );
- return FALSE;
+ return sal_False;
}
else{
do{ // append
@@ -165,14 +165,14 @@ BOOL Append( FILE * fDest, ByteString aTmpFile )
fclose( fSource );
};
- return TRUE;
+ return sal_True;
}
-BOOL Append( ByteString aOutputSrs, ByteString aTmpFile )
+sal_Bool Append( ByteString aOutputSrs, ByteString aTmpFile )
{
FILE * fDest = fopen( aOutputSrs.GetBuffer(), "ab" );
- BOOL bRet = Append( fDest, aTmpFile );
+ sal_Bool bRet = Append( fDest, aTmpFile );
if( fDest )
fclose( fDest );
@@ -390,10 +390,10 @@ RscWriteRc::RscWriteRc( RSCBYTEORDER_TYPE nOrder )
short nSwapTest = 1;
RSCBYTEORDER_TYPE nMachineOrder;
- bSwap = FALSE;
+ bSwap = sal_False;
if( nOrder != RSC_SYSTEMENDIAN )
{
- if( (BYTE)*(BYTE *)&nSwapTest )
+ if( (sal_uInt8)*(sal_uInt8 *)&nSwapTest )
nMachineOrder = RSC_LITTLEENDIAN;
else
nMachineOrder = RSC_BIGENDIAN;
diff --git a/rsc/source/tools/rsctree.cxx b/rsc/source/tools/rsctree.cxx
index 991e32aa580c..e719cc39548e 100644
--- a/rsc/source/tools/rsctree.cxx
+++ b/rsc/source/tools/rsctree.cxx
@@ -316,12 +316,12 @@ NameNode* NameNode::Search( const void * pSearch ) const{
|* Letzte Aenderung MM 11.01.91
|*
*************************************************************************/
-BOOL NameNode::Insert( NameNode * pTN, sal_uInt32* pnDepth ){
+sal_Bool NameNode::Insert( NameNode * pTN, sal_uInt32* pnDepth ){
// Ein Knoten wird in den Baum eingefuegt
-// Gibt es einen Knoten mit dem gleichen Namen, dann return FALSE
-// sonst return TRUE. Der Knoten wird auf jeden Fall eingefuegt.
+// Gibt es einen Knoten mit dem gleichen Namen, dann return sal_False
+// sonst return sal_True. Der Knoten wird auf jeden Fall eingefuegt.
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
int nCmp = Compare( pTN );
*pnDepth += 1;
@@ -337,7 +337,7 @@ BOOL NameNode::Insert( NameNode * pTN, sal_uInt32* pnDepth ){
else
pRight = pTN;
if( nCmp == EQUAL )
- bRet = FALSE;
+ bRet = sal_False;
};
return( bRet );
}
@@ -351,12 +351,12 @@ BOOL NameNode::Insert( NameNode * pTN, sal_uInt32* pnDepth ){
|* Letzte Aenderung MM 11.01.91
|*
*************************************************************************/
-BOOL NameNode::Insert( NameNode * pTN ){
+sal_Bool NameNode::Insert( NameNode * pTN ){
// insert a node in the tree.
-// if the node with the same name is in, return FALSE and no insert.
+// if the node with the same name is in, return sal_False and no insert.
// if not return true.
sal_uInt32 nDepth = 0;
- BOOL bRet;
+ sal_Bool bRet;
bRet = Insert( pTN, &nDepth );
if( bRet ){
@@ -412,14 +412,14 @@ void NameNode::SubOrderTree( NameNode * pOrderNode ){
|*
*************************************************************************/
class OrderCtrl {
- BOOL bOrder;
+ sal_Bool bOrder;
NameNode * pName;
DECL_LINK( CallBackFunc, NameNode * );
public:
- OrderCtrl() { bOrder = FALSE; pName = NULL; }
- BOOL IsOrder( const NameNode * pRoot )
+ OrderCtrl() { bOrder = sal_False; pName = NULL; }
+ sal_Bool IsOrder( const NameNode * pRoot )
{
- bOrder = TRUE;
+ bOrder = sal_True;
pName = NULL;
pRoot->EnumNodes( LINK( this, OrderCtrl, CallBackFunc ) );
return bOrder;
@@ -428,13 +428,13 @@ public:
IMPL_LINK_INLINE_START( OrderCtrl, CallBackFunc, NameNode *, pNext )
{
if( pName && pName->Compare( pNext ) != LESS )
- bOrder = FALSE;
+ bOrder = sal_False;
pName = pNext;
return 0;
}
IMPL_LINK_INLINE_END( OrderCtrl, CallBackFunc, NameNode *, pNext )
-BOOL NameNode::IsOrderTree() const{
+sal_Bool NameNode::IsOrderTree() const{
OrderCtrl aOrder;
return aOrder.IsOrder( this );
diff --git a/comphelper/qa/complex/comphelper/makefile.mk b/sot/JunitTest_sot_complex.mk
index 238bbd5c991d..e515ab539659 100644
--- a/comphelper/qa/complex/comphelper/makefile.mk
+++ b/sot/JunitTest_sot_complex.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -25,30 +25,25 @@
#
#*************************************************************************
-.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
-nothing .PHONY:
-.ELSE
+$(eval $(call gb_JunitTest_JunitTest,sot_complex))
-PRJ = ../../..
-PRJNAME = comphelper
-TARGET = qa_complex_comphelper
+$(eval $(call gb_JunitTest_add_sourcefiles,sot_complex,\
+ sot/qa/complex/olesimplestorage/OLESimpleStorageTest \
+ sot/qa/complex/olesimplestorage/OLESimpleStorageUnitTest \
+ sot/qa/complex/olesimplestorage/Test01 \
+ sot/qa/complex/olesimplestorage/TestHelper \
+))
-.IF "$(OOO_JUNIT_JAR)" != ""
-PACKAGE = complex/comphelper
-JAVATESTFILES = \
- Map.java \
- SequenceOutputStreamUnitTest.java
-
-JAVAFILES = $(JAVATESTFILES)
-JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar jurt.jar
-EXTRAJARFILES = $(OOO_JUNIT_JAR)
-.END
+$(eval $(call gb_JunitTest_add_jars,sot_complex,\
+ $(OUTDIR)/bin/OOoRunner.jar \
+ $(OUTDIR)/bin/ridl.jar \
+ $(OUTDIR)/bin/test.jar \
+ $(OUTDIR)/bin/unoil.jar \
+ $(OUTDIR)/bin/jurt.jar \
+))
-.INCLUDE: settings.mk
-.INCLUDE: target.mk
-.INCLUDE: installationtest.mk
-
-ALLTAR : javatest
-
-.END
+$(eval $(call gb_JunitTest_add_classes,sot_complex,\
+ complex.olesimplestorage.OLESimpleStorageUnitTest \
+))
+# vim: set noet sw=4 ts=4:
diff --git a/sot/Library_sot.mk b/sot/Library_sot.mk
new file mode 100644
index 000000000000..ef7d22c35081
--- /dev/null
+++ b/sot/Library_sot.mk
@@ -0,0 +1,81 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2009 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_Library_Library,sot))
+
+$(eval $(call gb_Library_add_package_headers,sot,sot_inc))
+
+$(eval $(call gb_Library_add_precompiled_header,sot,$(SRCDIR)/sot/inc/pch/precompiled_sot))
+
+$(eval $(call gb_Library_set_componentfile,sot,sot/util/sot))
+
+$(eval $(call gb_Library_set_include,sot,\
+ -I$(SRCDIR)/sot/inc/pch \
+ $$(INCLUDE) \
+ -I$(OUTDIR)/inc/offuh \
+))
+
+$(eval $(call gb_Library_set_defs,sot,\
+ $$(DEFS) \
+ -DSOT_DLLIMPLEMENTATION \
+))
+
+$(eval $(call gb_Library_add_linked_libs,sot,\
+ comphelper \
+ cppu \
+ cppuhelper \
+ sal \
+ tl \
+ ucbhelper \
+ stl \
+ utl \
+ $(gb_STDLIBS) \
+))
+
+$(eval $(call gb_Library_add_exception_objects,sot,\
+ sot/source/unoolestorage/xolesimplestorage \
+ sot/source/unoolestorage/register \
+ sot/source/base/formats \
+ sot/source/base/object \
+ sot/source/base/exchange \
+ sot/source/base/filelist \
+ sot/source/base/factory \
+ sot/source/sdstor/stg \
+ sot/source/sdstor/stgavl \
+ sot/source/sdstor/stgcache \
+ sot/source/sdstor/stgdir \
+ sot/source/sdstor/stgelem \
+ sot/source/sdstor/stgio \
+ sot/source/sdstor/stgole \
+ sot/source/sdstor/stgstrms \
+ sot/source/sdstor/storage \
+ sot/source/sdstor/storinfo \
+ sot/source/sdstor/ucbstorage \
+ sot/source/sdstor/unostorageholder \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sot/Makefile b/sot/Makefile
new file mode 100644
index 000000000000..a79aff831024
--- /dev/null
+++ b/sot/Makefile
@@ -0,0 +1,38 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+ifeq ($(strip $(SOLARENV)),)
+$(error No environment set!)
+endif
+
+gb_PARTIALBUILD := T
+GBUILDDIR := $(SOLARENV)/gbuild
+include $(GBUILDDIR)/gbuild.mk
+
+$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sot/Module_sot.mk b/sot/Module_sot.mk
new file mode 100644
index 000000000000..a9b72bf5f8d6
--- /dev/null
+++ b/sot/Module_sot.mk
@@ -0,0 +1,38 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2009 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_Module_Module,sot))
+
+$(eval $(call gb_Module_add_targets,sot,\
+ Package_inc \
+ Library_sot \
+))
+
+$(eval $(call gb_Module_add_subsequentcheck_targets,sot,\
+ JunitTest_sot_complex \
+))
+
diff --git a/sot/Package_inc.mk b/sot/Package_inc.mk
new file mode 100644
index 000000000000..1b664c263184
--- /dev/null
+++ b/sot/Package_inc.mk
@@ -0,0 +1,42 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2009 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_Package_Package,sot_inc,$(SRCDIR)/sot/inc))
+$(eval $(call gb_Package_add_file,sot_inc,inc/sot/absdev.hxx,sot/absdev.hxx))
+$(eval $(call gb_Package_add_file,sot_inc,inc/sot/agg.hxx,sot/agg.hxx))
+$(eval $(call gb_Package_add_file,sot_inc,inc/sot/clsids.hxx,sot/clsids.hxx))
+$(eval $(call gb_Package_add_file,sot_inc,inc/sot/exchange.hxx,sot/exchange.hxx))
+$(eval $(call gb_Package_add_file,sot_inc,inc/sot/factory.hxx,sot/factory.hxx))
+$(eval $(call gb_Package_add_file,sot_inc,inc/sot/filelist.hxx,sot/filelist.hxx))
+$(eval $(call gb_Package_add_file,sot_inc,inc/sot/formats.hxx,sot/formats.hxx))
+$(eval $(call gb_Package_add_file,sot_inc,inc/sot/object.hxx,sot/object.hxx))
+$(eval $(call gb_Package_add_file,sot_inc,inc/sot/sotdata.hxx,sot/sotdata.hxx))
+$(eval $(call gb_Package_add_file,sot_inc,inc/sot/sotdllapi.h,sot/sotdllapi.h))
+$(eval $(call gb_Package_add_file,sot_inc,inc/sot/sotref.hxx,sot/sotref.hxx))
+$(eval $(call gb_Package_add_file,sot_inc,inc/sot/stg.hxx,sot/stg.hxx))
+$(eval $(call gb_Package_add_file,sot_inc,inc/sot/storage.hxx,sot/storage.hxx))
+$(eval $(call gb_Package_add_file,sot_inc,inc/sot/storinfo.hxx,sot/storinfo.hxx))
diff --git a/sot/inc/makefile.mk b/sot/inc/makefile.mk
deleted file mode 100644
index bc31cd07e06b..000000000000
--- a/sot/inc/makefile.mk
+++ /dev/null
@@ -1,48 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-PRJ=..
-
-PRJNAME=sot
-TARGET=inc
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
-.IF "$(ENABLE_PCH)"!=""
-ALLTAR : \
- $(SLO)$/precompiled.pch \
- $(SLO)$/precompiled_ex.pch
-
-.ENDIF # "$(ENABLE_PCH)"!=""
-
diff --git a/sot/inc/sot/absdev.hxx b/sot/inc/sot/absdev.hxx
index 3d251d98e0b6..d882e6fc6b14 100644
--- a/sot/inc/sot/absdev.hxx
+++ b/sot/inc/sot/absdev.hxx
@@ -40,7 +40,7 @@ protected:
public:
virtual ~AbstractDeviceData() {}
virtual AbstractDeviceData * Copy() const = 0;
- virtual BOOL Equals( const AbstractDeviceData & ) const = 0;
+ virtual sal_Bool Equals( const AbstractDeviceData & ) const = 0;
JobSetup * GetJobSetup() const { return pJobSetup; }
};
diff --git a/sot/inc/sot/agg.hxx b/sot/inc/sot/agg.hxx
index 2f8cc7587458..cf07f6a8faff 100644
--- a/sot/inc/sot/agg.hxx
+++ b/sot/inc/sot/agg.hxx
@@ -41,21 +41,21 @@ struct SvAggregate
SotFactory * pFact;
SotObject * pObj;
};
- BOOL bFactory;
- BOOL bMainObj; // TRUE, das Objekt, welches das casting steuert
+ sal_Bool bFactory;
+ sal_Bool bMainObj; // sal_True, das Objekt, welches das casting steuert
SvAggregate()
: pFact( NULL )
- , bFactory( FALSE )
- , bMainObj( FALSE ) {}
- SvAggregate( SotObject * pObjP, BOOL bMainP )
+ , bFactory( sal_False )
+ , bMainObj( sal_False ) {}
+ SvAggregate( SotObject * pObjP, sal_Bool bMainP )
: pObj( pObjP )
- , bFactory( FALSE )
+ , bFactory( sal_False )
, bMainObj( bMainP ) {}
SvAggregate( SotFactory * pFactP )
: pFact( pFactP )
- , bFactory( TRUE )
- , bMainObj( FALSE ) {}
+ , bFactory( sal_True )
+ , bMainObj( sal_False ) {}
};
/************** class SvAggregateMemberList *****************************/
diff --git a/sot/inc/sot/exchange.hxx b/sot/inc/sot/exchange.hxx
index dc67e72a4f82..da5d5854f056 100644
--- a/sot/inc/sot/exchange.hxx
+++ b/sot/inc/sot/exchange.hxx
@@ -52,7 +52,7 @@ namespace com { namespace sun { namespace star { namespace datatransfer {
// - SotFormatStringId -
// ---------------------
-typedef ULONG SotFormatStringId;
+typedef sal_uLong SotFormatStringId;
// ----------------
// - DataFlavorEx -
@@ -77,14 +77,14 @@ typedef ::std::list< ::com::sun::star::datatransfer::DataFlavor > DataFlavorLi
typedef ::std::list< DataFlavorEx > DataFlavorExList;
SOT_DLLPUBLIC sal_Bool IsFormatSupported( const DataFlavorExVector& rDataFlavorExVector,
- ULONG nId );
+ sal_uLong nId );
// -------------------------
// - Vordefinierte Formate -
// -------------------------
-// Die Reihenfolge und die Werte dürfen nicht geändert werden,
-// da die Implementation sich darauf verläßt.
+// Die Reihenfolge und die Werte d�rfen nicht ge�ndert werden,
+// da die Implementation sich darauf verl��t.
// Standard-Formate fuer die es auch Copy/Paste-Methoden gibt
#define FORMAT_STRING 1
#define FORMAT_BITMAP 2
@@ -97,70 +97,70 @@ SOT_DLLPUBLIC sal_Bool IsFormatSupported( const DataFlavorExVector& rDataFlavorE
#define FORMAT_RTF 10
// Source-Options
-#define EXCHG_SOURCE_MOVEABLE ((USHORT)0x0001)
-#define EXCHG_SOURCE_COPYABLE ((USHORT)0x0002)
-#define EXCHG_SOURCE_LINKABLE ((USHORT)0x0004)
-#define EXCHG_SOURCE_PRINTABLE ((USHORT)0x0008)
-#define EXCHG_SOURCE_DISCARDABLE ((USHORT)0x0010)
-#define EXCHG_SOURCE_ALL ((USHORT)0x001F)
-#define EXCHG_SOURCE_DEF_COPYABLE ((USHORT)0x0020)
+#define EXCHG_SOURCE_MOVEABLE ((sal_uInt16)0x0001)
+#define EXCHG_SOURCE_COPYABLE ((sal_uInt16)0x0002)
+#define EXCHG_SOURCE_LINKABLE ((sal_uInt16)0x0004)
+#define EXCHG_SOURCE_PRINTABLE ((sal_uInt16)0x0008)
+#define EXCHG_SOURCE_DISCARDABLE ((sal_uInt16)0x0010)
+#define EXCHG_SOURCE_ALL ((sal_uInt16)0x001F)
+#define EXCHG_SOURCE_DEF_COPYABLE ((sal_uInt16)0x0020)
// Aktionen
-#define EXCHG_ACTION_MASK ((USHORT)0x00FF)
-#define EXCHG_INOUT_ACTION_NONE ((USHORT)com::sun::star::datatransfer::dnd::DNDConstants::ACTION_NONE)
+#define EXCHG_ACTION_MASK ((sal_uInt16)0x00FF)
+#define EXCHG_INOUT_ACTION_NONE ((sal_uInt16)com::sun::star::datatransfer::dnd::DNDConstants::ACTION_NONE)
#define EXCHG_IN_ACTION_DEFAULT EXCHG_INOUT_ACTION_NONE
-#define EXCHG_IN_ACTION_MOVE ((USHORT)com::sun::star::datatransfer::dnd::DNDConstants::ACTION_MOVE)
-#define EXCHG_IN_ACTION_COPY ((USHORT)com::sun::star::datatransfer::dnd::DNDConstants::ACTION_COPY)
-#define EXCHG_IN_ACTION_LINK ((USHORT)com::sun::star::datatransfer::dnd::DNDConstants::ACTION_LINK)
-#define EXCHG_INOUT_ACTION_PRINT ((USHORT)8)
-#define EXCHG_INOUT_ACTION_DISCARD ((USHORT)16)
-#define EXCHG_OUT_ACTION_INSERT_OBJ ((USHORT)17)
-#define EXCHG_OUT_ACTION_INSERT_BOOKMARK ((USHORT)18)
-#define EXCHG_OUT_ACTION_INSERT_FILELINK ((USHORT)19)
-#define EXCHG_OUT_ACTION_INSERT_FILE ((USHORT)20)
-#define EXCHG_OUT_ACTION_INSERT_FILELIST ((USHORT)21)
-#define EXCHG_OUT_ACTION_INSERT_IMAGEMAP ((USHORT)22)
-#define EXCHG_OUT_ACTION_INSERT_OLE ((USHORT)23)
-#define EXCHG_OUT_ACTION_INSERT_INTERACTIVE ((USHORT)24)
-#define EXCHG_OUT_ACTION_INSERT_URLBUTTON ((USHORT)25)
-#define EXCHG_OUT_ACTION_INSERT_CHAOSOBJ ((USHORT)26) // OBSOLET ab 500.b ?
-#define EXCHG_OUT_ACTION_REPLACE_OBJ ((USHORT)27)
-#define EXCHG_OUT_ACTION_REPLACE_LINK ((USHORT)28)
-#define EXCHG_OUT_ACTION_REPLACE_IMAGEMAP ((USHORT)29)
-#define EXCHG_OUT_ACTION_GET_ATTRIBUTES ((USHORT)30)
-#define EXCHG_OUT_ACTION_UPLOAD ((USHORT)31) // OBSOLET ab 500.b ?
-#define EXCHG_OUT_ACTION_MOVE_FILE ((USHORT)32)
-#define EXCHG_OUT_ACTION_MOVE_FILELIST ((USHORT)33)
-#define EXCHG_OUT_ACTION_UPDATE_RANGE ((USHORT)34)
-#define EXCHG_OUT_ACTION_INSERT_PRIVATE ((USHORT)35)
-#define EXCHG_OUT_ACTION_INSERT_HTML ((USHORT)36)
-#define EXCHG_OUT_ACTION_MOVE_PRIVATE ((USHORT)37)
-#define EXCHG_OUT_ACTION_INSERT_STRING ((USHORT)38)
-#define EXCHG_OUT_ACTION_INSERT_DRAWOBJ ((USHORT)39)
-#define EXCHG_OUT_ACTION_INSERT_SVXB ((USHORT)40)
-#define EXCHG_OUT_ACTION_INSERT_GDIMETAFILE ((USHORT)41)
-#define EXCHG_OUT_ACTION_INSERT_BITMAP ((USHORT)42)
-#define EXCHG_OUT_ACTION_INSERT_DDE ((USHORT)43)
-#define EXCHG_OUT_ACTION_INSERT_HYPERLINK ((USHORT)44)
-#define EXCHG_OUT_ACTION_REPLACE_DRAWOBJ ((USHORT)45)
-#define EXCHG_OUT_ACTION_REPLACE_SVXB ((USHORT)46)
-#define EXCHG_OUT_ACTION_REPLACE_GDIMETAFILE ((USHORT)47)
-#define EXCHG_OUT_ACTION_REPLACE_BITMAP ((USHORT)48)
-#define EXCHG_OUT_ACTION_REPLACE_GRAPH ((USHORT)49)
-#define EXCHG_OUT_ACTION_INSERT_GRAPH ((USHORT)50)
-#define EXCHG_OUT_ACTION_INSERT_MSGATTACH ((USHORT)51) // obsolet ab 500.b ?
-#define EXCHG_OUT_ACTION_COPY_CHAOSOBJ ((USHORT)52)
-#define EXCHG_OUT_ACTION_MOVE_CHAOSOBJ ((USHORT)53)
-#define EXCHG_OUT_ACTION_COPY_MSGATTACH ((USHORT)54)
-#define EXCHG_OUT_ACTION_COPY_BOOKMARK ((USHORT)55)
-#define EXCHG_OUT_ACTION_COPY_FILE ((USHORT)56)
-
-#define EXCHG_OUT_ACTION_FLAG_CREATE_THEME ((USHORT)0x0100)
-#define EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE ((USHORT)0x0200)
-#define EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP ((USHORT)0x0400)
-#define EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP ((USHORT)0x0800)
-#define EXCHG_OUT_ACTION_FLAG_FILL ((USHORT)0x1000)
-#define EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL ((USHORT)0x2000)
+#define EXCHG_IN_ACTION_MOVE ((sal_uInt16)com::sun::star::datatransfer::dnd::DNDConstants::ACTION_MOVE)
+#define EXCHG_IN_ACTION_COPY ((sal_uInt16)com::sun::star::datatransfer::dnd::DNDConstants::ACTION_COPY)
+#define EXCHG_IN_ACTION_LINK ((sal_uInt16)com::sun::star::datatransfer::dnd::DNDConstants::ACTION_LINK)
+#define EXCHG_INOUT_ACTION_PRINT ((sal_uInt16)8)
+#define EXCHG_INOUT_ACTION_DISCARD ((sal_uInt16)16)
+#define EXCHG_OUT_ACTION_INSERT_OBJ ((sal_uInt16)17)
+#define EXCHG_OUT_ACTION_INSERT_BOOKMARK ((sal_uInt16)18)
+#define EXCHG_OUT_ACTION_INSERT_FILELINK ((sal_uInt16)19)
+#define EXCHG_OUT_ACTION_INSERT_FILE ((sal_uInt16)20)
+#define EXCHG_OUT_ACTION_INSERT_FILELIST ((sal_uInt16)21)
+#define EXCHG_OUT_ACTION_INSERT_IMAGEMAP ((sal_uInt16)22)
+#define EXCHG_OUT_ACTION_INSERT_OLE ((sal_uInt16)23)
+#define EXCHG_OUT_ACTION_INSERT_INTERACTIVE ((sal_uInt16)24)
+#define EXCHG_OUT_ACTION_INSERT_URLBUTTON ((sal_uInt16)25)
+#define EXCHG_OUT_ACTION_INSERT_CHAOSOBJ ((sal_uInt16)26) // OBSOLET ab 500.b ?
+#define EXCHG_OUT_ACTION_REPLACE_OBJ ((sal_uInt16)27)
+#define EXCHG_OUT_ACTION_REPLACE_LINK ((sal_uInt16)28)
+#define EXCHG_OUT_ACTION_REPLACE_IMAGEMAP ((sal_uInt16)29)
+#define EXCHG_OUT_ACTION_GET_ATTRIBUTES ((sal_uInt16)30)
+#define EXCHG_OUT_ACTION_UPLOAD ((sal_uInt16)31) // OBSOLET ab 500.b ?
+#define EXCHG_OUT_ACTION_MOVE_FILE ((sal_uInt16)32)
+#define EXCHG_OUT_ACTION_MOVE_FILELIST ((sal_uInt16)33)
+#define EXCHG_OUT_ACTION_UPDATE_RANGE ((sal_uInt16)34)
+#define EXCHG_OUT_ACTION_INSERT_PRIVATE ((sal_uInt16)35)
+#define EXCHG_OUT_ACTION_INSERT_HTML ((sal_uInt16)36)
+#define EXCHG_OUT_ACTION_MOVE_PRIVATE ((sal_uInt16)37)
+#define EXCHG_OUT_ACTION_INSERT_STRING ((sal_uInt16)38)
+#define EXCHG_OUT_ACTION_INSERT_DRAWOBJ ((sal_uInt16)39)
+#define EXCHG_OUT_ACTION_INSERT_SVXB ((sal_uInt16)40)
+#define EXCHG_OUT_ACTION_INSERT_GDIMETAFILE ((sal_uInt16)41)
+#define EXCHG_OUT_ACTION_INSERT_BITMAP ((sal_uInt16)42)
+#define EXCHG_OUT_ACTION_INSERT_DDE ((sal_uInt16)43)
+#define EXCHG_OUT_ACTION_INSERT_HYPERLINK ((sal_uInt16)44)
+#define EXCHG_OUT_ACTION_REPLACE_DRAWOBJ ((sal_uInt16)45)
+#define EXCHG_OUT_ACTION_REPLACE_SVXB ((sal_uInt16)46)
+#define EXCHG_OUT_ACTION_REPLACE_GDIMETAFILE ((sal_uInt16)47)
+#define EXCHG_OUT_ACTION_REPLACE_BITMAP ((sal_uInt16)48)
+#define EXCHG_OUT_ACTION_REPLACE_GRAPH ((sal_uInt16)49)
+#define EXCHG_OUT_ACTION_INSERT_GRAPH ((sal_uInt16)50)
+#define EXCHG_OUT_ACTION_INSERT_MSGATTACH ((sal_uInt16)51) // obsolet ab 500.b ?
+#define EXCHG_OUT_ACTION_COPY_CHAOSOBJ ((sal_uInt16)52)
+#define EXCHG_OUT_ACTION_MOVE_CHAOSOBJ ((sal_uInt16)53)
+#define EXCHG_OUT_ACTION_COPY_MSGATTACH ((sal_uInt16)54)
+#define EXCHG_OUT_ACTION_COPY_BOOKMARK ((sal_uInt16)55)
+#define EXCHG_OUT_ACTION_COPY_FILE ((sal_uInt16)56)
+
+#define EXCHG_OUT_ACTION_FLAG_CREATE_THEME ((sal_uInt16)0x0100)
+#define EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE ((sal_uInt16)0x0200)
+#define EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP ((sal_uInt16)0x0400)
+#define EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP ((sal_uInt16)0x0800)
+#define EXCHG_OUT_ACTION_FLAG_FILL ((sal_uInt16)0x1000)
+#define EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL ((sal_uInt16)0x2000)
// Ziele
#define EXCHG_DEST_DOC_OLEOBJ 1
@@ -188,66 +188,66 @@ class SvGlobalName;
class SOT_DLLPUBLIC SotExchange
{
public:
- static ULONG RegisterFormat( const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
- static ULONG RegisterFormatName( const String& rName );
- static ULONG RegisterFormatMimeType( const String& rMimeType );
+ static sal_uLong RegisterFormat( const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
+ static sal_uLong RegisterFormatName( const String& rName );
+ static sal_uLong RegisterFormatMimeType( const String& rMimeType );
- static ULONG GetFormat( const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
- static String GetFormatName( ULONG nFormat );
- static sal_Bool GetFormatDataFlavor( ULONG nFormat, ::com::sun::star::datatransfer::DataFlavor& rFlavor );
- static String GetFormatMimeType( ULONG nFormat );
- static BOOL IsInternal( const SvGlobalName& );
- static ULONG GetFormatIdFromMimeType( const String& rMimeType );
+ static sal_uLong GetFormat( const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
+ static String GetFormatName( sal_uLong nFormat );
+ static sal_Bool GetFormatDataFlavor( sal_uLong nFormat, ::com::sun::star::datatransfer::DataFlavor& rFlavor );
+ static String GetFormatMimeType( sal_uLong nFormat );
+ static sal_Bool IsInternal( const SvGlobalName& );
+ static sal_uLong GetFormatIdFromMimeType( const String& rMimeType );
// bestimme die SotFormatStringId von dem registrierten Format
//JP 12.11.98: diese 3 Methoden sind ab sofort ueberfluessig, da
// die ClipboardIds statisch sind und aequivalent zur
// SotFormatStringId ist!
- static SotFormatStringId GetFormatStringId( ULONG nFormat )
+ static SotFormatStringId GetFormatStringId( sal_uLong nFormat )
{ return nFormat; }
static SotFormatStringId GetFormatStringId( const String& rName )
{ return SotExchange::RegisterFormatMimeType( rName ); }
- static ULONG RegisterSotFormatName( SotFormatStringId nId )
+ static sal_uLong RegisterSotFormatName( SotFormatStringId nId )
{ return nId; }
// same for XTransferable interface
- static USHORT GetExchangeAction(
+ static sal_uInt16 GetExchangeAction(
// XTransferable
const DataFlavorExVector& rDataFlavorExVector,
// Ziel der Aktion (EXCHG_DEST_*)
- USHORT nDestination,
+ sal_uInt16 nDestination,
// Aktionen, die Quelle unterstuetzt (EXCHG_SOURCE_...)
- USHORT nSourceOptions,
+ sal_uInt16 nSourceOptions,
// vom Anwender gewaehlte Aktion (EXCHG_IN_*, EXCHG_INOUT_*)
- USHORT nUserAction,
+ sal_uInt16 nUserAction,
// In:- Out: Zu benutzendes Format
- ULONG& rFormat,
+ sal_uLong& rFormat,
// In:- Out: Default-Action (EXCHG_IN_*, EXCHG_INOUT_*)
- USHORT& rDefaultAction,
+ sal_uInt16& rDefaultAction,
// In:- optional - check only for this specific format
- ULONG nOnlyTestFormat = 0,
+ sal_uLong nOnlyTestFormat = 0,
// In:- optional - check the contents of Xtransferable
const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >* pxTransferable = NULL );
// same for XTransferable interface
- static USHORT GetExchangeAction(
+ static sal_uInt16 GetExchangeAction(
// XTransferable
const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxTransferable,
// Ziel der Aktion (EXCHG_DEST_*)
- USHORT nDestination,
+ sal_uInt16 nDestination,
// Aktionen, die Quelle unterstuetzt (EXCHG_SOURCE_...)
- USHORT nSourceOptions,
+ sal_uInt16 nSourceOptions,
// vom Anwender gewaehlte Aktion (EXCHG_IN_*, EXCHG_INOUT_*)
- USHORT nUserAction,
+ sal_uInt16 nUserAction,
// In:- Out: Zu benutzendes Format
- ULONG& rFormat,
+ sal_uLong& rFormat,
// In:- Out: Default-Action (EXCHG_IN_*, EXCHG_INOUT_*)
- USHORT& rDefaultAction,
+ sal_uInt16& rDefaultAction,
// In:- optional - check only for this specific format
- ULONG nOnlyTestFormat = 0 );
+ sal_uLong nOnlyTestFormat = 0 );
- static USHORT IsChart( const SvGlobalName& rName );
- static USHORT IsMath( const SvGlobalName& rName );
+ static sal_uInt16 IsChart( const SvGlobalName& rName );
+ static sal_uInt16 IsMath( const SvGlobalName& rName );
};
#endif // _EXCHANGE_HXX
diff --git a/sot/inc/sot/factory.hxx b/sot/inc/sot/factory.hxx
index 7b7feb0e9ebe..064c4b6388a1 100644
--- a/sot/inc/sot/factory.hxx
+++ b/sot/inc/sot/factory.hxx
@@ -47,13 +47,13 @@ typedef void * (*CreateInstanceType)( SotObject ** );
//==================class SotFactory=======================================
class SOT_DLLPUBLIC SotFactory : public SvGlobalName
{
- USHORT nSuperCount; // Anzahl der Superklassen
+ sal_uInt16 nSuperCount; // Anzahl der Superklassen
const SotFactory ** pSuperClasses; // Superklassen
CreateInstanceType pCreateFunc;
String aClassName;
- static BOOL ExistTest( const SvGlobalName & );
+ static sal_Bool ExistTest( const SvGlobalName & );
protected:
virtual ~SotFactory();
public:
@@ -61,7 +61,7 @@ public:
static void DeInit();
static void IncSvObjectCount( SotObject * = NULL );
static void DecSvObjectCount( SotObject * = NULL );
- static UINT32 GetSvObjectCount();
+ static sal_uInt32 GetSvObjectCount();
static void TestInvariant();
static const SotFactory * Find( const SvGlobalName & );
@@ -74,8 +74,8 @@ public:
virtual void * CreateInstance( SotObject ** ppObj = NULL ) const;
void * CastAndAddRef( SotObject * ) const;
- BOOL Is( const SotFactory * pSuperClass ) const;
- const SotFactory * GetSuper( USHORT nPos ) const
+ sal_Bool Is( const SotFactory * pSuperClass ) const;
+ const SotFactory * GetSuper( sal_uInt16 nPos ) const
{
return nPos < nSuperCount ?
pSuperClasses[ nPos ]
diff --git a/sot/inc/sot/filelist.hxx b/sot/inc/sot/filelist.hxx
index 4c6c55534319..4db3e4866817 100644
--- a/sot/inc/sot/filelist.hxx
+++ b/sot/inc/sot/filelist.hxx
@@ -62,13 +62,13 @@ public:
SOT_DLLPUBLIC friend SvStream& operator>>( SvStream& rIStm, FileList& rFileList );
// Clipboard, D&D usw.
- static ULONG GetFormat();
+ static sal_uLong GetFormat();
// Liste fuellen/abfragen
void AppendFile( const String& rStr );
- String GetFile( ULONG i ) const;
- ULONG Count( void ) const;
+ String GetFile( sal_uLong i ) const;
+ sal_uLong Count( void ) const;
};
diff --git a/sot/inc/sot/formats.hxx b/sot/inc/sot/formats.hxx
index c9d7a3e69d78..303afecb5a17 100644
--- a/sot/inc/sot/formats.hxx
+++ b/sot/inc/sot/formats.hxx
@@ -46,145 +46,145 @@
#endif
#include <sot/exchange.hxx>
-#define SOT_FORMAT_SYSTEM_START ((ULONG)0)
-#define SOT_FORMAT_STRING ((ULONG)FORMAT_STRING)
-#define SOT_FORMAT_BITMAP ((ULONG)FORMAT_BITMAP)
-#define SOT_FORMAT_GDIMETAFILE ((ULONG)FORMAT_GDIMETAFILE)
-#define SOT_FORMAT_PRIVATE ((ULONG)FORMAT_PRIVATE)
-#define SOT_FORMAT_FILE ((ULONG)FORMAT_FILE)
-#define SOT_FORMAT_FILE_LIST ((ULONG)FORMAT_FILE_LIST)
-#define SOT_FORMAT_RTF ((ULONG)FORMAT_RTF)
+#define SOT_FORMAT_SYSTEM_START ((sal_uLong)0)
+#define SOT_FORMAT_STRING ((sal_uLong)FORMAT_STRING)
+#define SOT_FORMAT_BITMAP ((sal_uLong)FORMAT_BITMAP)
+#define SOT_FORMAT_GDIMETAFILE ((sal_uLong)FORMAT_GDIMETAFILE)
+#define SOT_FORMAT_PRIVATE ((sal_uLong)FORMAT_PRIVATE)
+#define SOT_FORMAT_FILE ((sal_uLong)FORMAT_FILE)
+#define SOT_FORMAT_FILE_LIST ((sal_uLong)FORMAT_FILE_LIST)
+#define SOT_FORMAT_RTF ((sal_uLong)FORMAT_RTF)
-#define SOT_FORMATSTR_ID_DRAWING ((ULONG)11)
-#define SOT_FORMATSTR_ID_SVXB ((ULONG)12)
-#define SOT_FORMATSTR_ID_SVIM ((ULONG)13)
-#define SOT_FORMATSTR_ID_XFA ((ULONG)14)
-#define SOT_FORMATSTR_ID_EDITENGINE ((ULONG)15)
-#define SOT_FORMATSTR_ID_INTERNALLINK_STATE ((ULONG)16)
-#define SOT_FORMATSTR_ID_SOLK ((ULONG)17)
-#define SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK ((ULONG)18)
-#define SOT_FORMATSTR_ID_TREELISTBOX ((ULONG)19)
-#define SOT_FORMATSTR_ID_NATIVE ((ULONG)20)
-#define SOT_FORMATSTR_ID_OWNERLINK ((ULONG)21)
-#define SOT_FORMATSTR_ID_STARSERVER ((ULONG)22)
-#define SOT_FORMATSTR_ID_STAROBJECT ((ULONG)23)
-#define SOT_FORMATSTR_ID_APPLETOBJECT ((ULONG)24)
-#define SOT_FORMATSTR_ID_PLUGIN_OBJECT ((ULONG)25)
-#define SOT_FORMATSTR_ID_STARWRITER_30 ((ULONG)26)
-#define SOT_FORMATSTR_ID_STARWRITER_40 ((ULONG)27)
-#define SOT_FORMATSTR_ID_STARWRITER_50 ((ULONG)28)
-#define SOT_FORMATSTR_ID_STARWRITERWEB_40 ((ULONG)29)
-#define SOT_FORMATSTR_ID_STARWRITERWEB_50 ((ULONG)30)
-#define SOT_FORMATSTR_ID_STARWRITERGLOB_40 ((ULONG)31)
-#define SOT_FORMATSTR_ID_STARWRITERGLOB_50 ((ULONG)32)
-#define SOT_FORMATSTR_ID_STARDRAW ((ULONG)33)
-#define SOT_FORMATSTR_ID_STARDRAW_40 ((ULONG)34)
-#define SOT_FORMATSTR_ID_STARIMPRESS_50 ((ULONG)35)
-#define SOT_FORMATSTR_ID_STARDRAW_50 ((ULONG)36)
-#define SOT_FORMATSTR_ID_STARCALC ((ULONG)37)
-#define SOT_FORMATSTR_ID_STARCALC_40 ((ULONG)38)
-#define SOT_FORMATSTR_ID_STARCALC_50 ((ULONG)39)
-#define SOT_FORMATSTR_ID_STARCHART ((ULONG)40)
-#define SOT_FORMATSTR_ID_STARCHART_40 ((ULONG)41)
-#define SOT_FORMATSTR_ID_STARCHART_50 ((ULONG)42)
-#define SOT_FORMATSTR_ID_STARIMAGE ((ULONG)43)
-#define SOT_FORMATSTR_ID_STARIMAGE_40 ((ULONG)44)
-#define SOT_FORMATSTR_ID_STARIMAGE_50 ((ULONG)45)
-#define SOT_FORMATSTR_ID_STARMATH ((ULONG)46)
-#define SOT_FORMATSTR_ID_STARMATH_40 ((ULONG)47)
-#define SOT_FORMATSTR_ID_STARMATH_50 ((ULONG)48)
-#define SOT_FORMATSTR_ID_STAROBJECT_PAINTDOC ((ULONG)49)
-#define SOT_FORMATSTR_ID_FILLED_AREA ((ULONG)50)
-#define SOT_FORMATSTR_ID_HTML ((ULONG)51)
-#define SOT_FORMATSTR_ID_HTML_SIMPLE ((ULONG)52)
-#define SOT_FORMATSTR_ID_CHAOS ((ULONG)53)
-#define SOT_FORMATSTR_ID_CNT_MSGATTACHFILE ((ULONG)54)
-#define SOT_FORMATSTR_ID_BIFF_5 ((ULONG)55)
-#define SOT_FORMATSTR_ID_BIFF__5 ((ULONG)56)
-#define SOT_FORMATSTR_ID_SYLK ((ULONG)57)
-#define SOT_FORMATSTR_ID_SYLK_BIGCAPS ((ULONG)58)
-#define SOT_FORMATSTR_ID_LINK ((ULONG)59)
-#define SOT_FORMATSTR_ID_DIF ((ULONG)60)
-#define SOT_FORMATSTR_ID_STARDRAW_TABBAR ((ULONG)61)
-#define SOT_FORMATSTR_ID_SONLK ((ULONG)62)
-#define SOT_FORMATSTR_ID_MSWORD_DOC ((ULONG)63)
-#define SOT_FORMATSTR_ID_STAR_FRAMESET_DOC ((ULONG)64)
-#define SOT_FORMATSTR_ID_OFFICE_DOC ((ULONG)65)
-#define SOT_FORMATSTR_ID_NOTES_DOCINFO ((ULONG)66)
-#define SOT_FORMATSTR_ID_NOTES_HNOTE ((ULONG)67)
-#define SOT_FORMATSTR_ID_NOTES_NATIVE ((ULONG)68)
-#define SOT_FORMATSTR_ID_SFX_DOC ((ULONG)69)
-#define SOT_FORMATSTR_ID_EVDF ((ULONG)70)
-#define SOT_FORMATSTR_ID_ESDF ((ULONG)71)
-#define SOT_FORMATSTR_ID_IDF ((ULONG)72)
-#define SOT_FORMATSTR_ID_EFTP ((ULONG)73)
-#define SOT_FORMATSTR_ID_EFD ((ULONG)74)
-#define SOT_FORMATSTR_ID_SVX_FORMFIELDEXCH ((ULONG)75)
-#define SOT_FORMATSTR_ID_EXTENDED_TABBAR ((ULONG)76)
-#define SOT_FORMATSTR_ID_SBA_DATAEXCHANGE ((ULONG)77)
-#define SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE ((ULONG)78)
-#define SOT_FORMATSTR_ID_SBA_PRIVATE_URL ((ULONG)79)
-#define SOT_FORMATSTR_ID_SBA_TABED ((ULONG)80)
-#define SOT_FORMATSTR_ID_SBA_TABID ((ULONG)81)
-#define SOT_FORMATSTR_ID_SBA_JOIN ((ULONG)82)
-#define SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ((ULONG)83)
-#define SOT_FORMATSTR_ID_LINKSRCDESCRIPTOR ((ULONG)84)
-#define SOT_FORMATSTR_ID_EMBED_SOURCE ((ULONG)85)
-#define SOT_FORMATSTR_ID_LINK_SOURCE ((ULONG)86)
-#define SOT_FORMATSTR_ID_EMBEDDED_OBJ ((ULONG)87)
-#define SOT_FORMATSTR_ID_FILECONTENT ((ULONG)88)
-#define SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR ((ULONG)89)
-#define SOT_FORMATSTR_ID_FILENAME ((ULONG)90)
-#define SOT_FORMATSTR_ID_SD_OLE ((ULONG)91)
-#define SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE ((ULONG)92)
-#define SOT_FORMATSTR_ID_EMBED_SOURCE_OLE ((ULONG)93)
-#define SOT_FORMATSTR_ID_OBJECTDESCRIPTOR_OLE ((ULONG)94)
-#define SOT_FORMATSTR_ID_LINKSRCDESCRIPTOR_OLE ((ULONG)95)
-#define SOT_FORMATSTR_ID_LINK_SOURCE_OLE ((ULONG)96)
-#define SOT_FORMATSTR_ID_SBA_CTRLDATAEXCHANGE ((ULONG)97)
-#define SOT_FORMATSTR_ID_OUTPLACE_OBJ ((ULONG)98)
-#define SOT_FORMATSTR_ID_CNT_OWN_CLIP ((ULONG)99)
-#define SOT_FORMATSTR_ID_INET_IMAGE ((ULONG)100)
-#define SOT_FORMATSTR_ID_NETSCAPE_IMAGE ((ULONG)101)
-#define SOT_FORMATSTR_ID_SBA_FORMEXCHANGE ((ULONG)102)
-#define SOT_FORMATSTR_ID_SBA_REPORTEXCHANGE ((ULONG)103)
-#define SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR ((ULONG)104)
-#define SOT_FORMATSTR_ID_STARCHARTDOCUMENT_50 ((ULONG)105)
-#define SOT_FORMATSTR_ID_GRAPHOBJ ((ULONG)106)
-#define SOT_FORMATSTR_ID_STARWRITER_60 ((ULONG)107)
-#define SOT_FORMATSTR_ID_STARWRITERWEB_60 ((ULONG)108)
-#define SOT_FORMATSTR_ID_STARWRITERGLOB_60 ((ULONG)109)
-#define SOT_FORMATSTR_ID_STARDRAW_60 ((ULONG)110)
-#define SOT_FORMATSTR_ID_STARIMPRESS_60 ((ULONG)111)
-#define SOT_FORMATSTR_ID_STARCALC_60 ((ULONG)112)
-#define SOT_FORMATSTR_ID_STARCHART_60 ((ULONG)113)
-#define SOT_FORMATSTR_ID_STARMATH_60 ((ULONG)114)
-#define SOT_FORMATSTR_ID_WMF ((ULONG)115)
-#define SOT_FORMATSTR_ID_DBACCESS_QUERY ((ULONG)116)
-#define SOT_FORMATSTR_ID_DBACCESS_TABLE ((ULONG)117)
-#define SOT_FORMATSTR_ID_DBACCESS_COMMAND ((ULONG)118)
-#define SOT_FORMATSTR_ID_DIALOG_60 ((ULONG)119)
-#define SOT_FORMATSTR_ID_EMF ((ULONG)120)
-#define SOT_FORMATSTR_ID_BIFF_8 ((ULONG)121)
-#define SOT_FORMATSTR_ID_BMP ((ULONG)122)
-#define SOT_FORMATSTR_ID_HTML_NO_COMMENT ((ULONG)123)
-#define SOT_FORMATSTR_ID_STARWRITER_8 ((ULONG)124)
-#define SOT_FORMATSTR_ID_STARWRITERWEB_8 ((ULONG)125)
-#define SOT_FORMATSTR_ID_STARWRITERGLOB_8 ((ULONG)126)
-#define SOT_FORMATSTR_ID_STARDRAW_8 ((ULONG)127)
-#define SOT_FORMATSTR_ID_STARIMPRESS_8 ((ULONG)128)
-#define SOT_FORMATSTR_ID_STARCALC_8 ((ULONG)129)
-#define SOT_FORMATSTR_ID_STARCHART_8 ((ULONG)130)
-#define SOT_FORMATSTR_ID_STARMATH_8 ((ULONG)131)
-#define SOT_FORMATSTR_ID_XFORMS ((ULONG)132)
-#define SOT_FORMATSTR_ID_STARWRITER_8_TEMPLATE ((ULONG)133)
-#define SOT_FORMATSTR_ID_STARDRAW_8_TEMPLATE ((ULONG)134)
-#define SOT_FORMATSTR_ID_STARIMPRESS_8_TEMPLATE ((ULONG)135)
-#define SOT_FORMATSTR_ID_STARCALC_8_TEMPLATE ((ULONG)136)
-#define SOT_FORMATSTR_ID_STARCHART_8_TEMPLATE ((ULONG)137)
-#define SOT_FORMATSTR_ID_STARMATH_8_TEMPLATE ((ULONG)138)
-#define SOT_FORMATSTR_ID_STARBASE_8 ((ULONG)139)
-#define SOT_FORMATSTR_ID_HC_GDIMETAFILE ((ULONG)140)
+#define SOT_FORMATSTR_ID_DRAWING ((sal_uLong)11)
+#define SOT_FORMATSTR_ID_SVXB ((sal_uLong)12)
+#define SOT_FORMATSTR_ID_SVIM ((sal_uLong)13)
+#define SOT_FORMATSTR_ID_XFA ((sal_uLong)14)
+#define SOT_FORMATSTR_ID_EDITENGINE ((sal_uLong)15)
+#define SOT_FORMATSTR_ID_INTERNALLINK_STATE ((sal_uLong)16)
+#define SOT_FORMATSTR_ID_SOLK ((sal_uLong)17)
+#define SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK ((sal_uLong)18)
+#define SOT_FORMATSTR_ID_TREELISTBOX ((sal_uLong)19)
+#define SOT_FORMATSTR_ID_NATIVE ((sal_uLong)20)
+#define SOT_FORMATSTR_ID_OWNERLINK ((sal_uLong)21)
+#define SOT_FORMATSTR_ID_STARSERVER ((sal_uLong)22)
+#define SOT_FORMATSTR_ID_STAROBJECT ((sal_uLong)23)
+#define SOT_FORMATSTR_ID_APPLETOBJECT ((sal_uLong)24)
+#define SOT_FORMATSTR_ID_PLUGIN_OBJECT ((sal_uLong)25)
+#define SOT_FORMATSTR_ID_STARWRITER_30 ((sal_uLong)26)
+#define SOT_FORMATSTR_ID_STARWRITER_40 ((sal_uLong)27)
+#define SOT_FORMATSTR_ID_STARWRITER_50 ((sal_uLong)28)
+#define SOT_FORMATSTR_ID_STARWRITERWEB_40 ((sal_uLong)29)
+#define SOT_FORMATSTR_ID_STARWRITERWEB_50 ((sal_uLong)30)
+#define SOT_FORMATSTR_ID_STARWRITERGLOB_40 ((sal_uLong)31)
+#define SOT_FORMATSTR_ID_STARWRITERGLOB_50 ((sal_uLong)32)
+#define SOT_FORMATSTR_ID_STARDRAW ((sal_uLong)33)
+#define SOT_FORMATSTR_ID_STARDRAW_40 ((sal_uLong)34)
+#define SOT_FORMATSTR_ID_STARIMPRESS_50 ((sal_uLong)35)
+#define SOT_FORMATSTR_ID_STARDRAW_50 ((sal_uLong)36)
+#define SOT_FORMATSTR_ID_STARCALC ((sal_uLong)37)
+#define SOT_FORMATSTR_ID_STARCALC_40 ((sal_uLong)38)
+#define SOT_FORMATSTR_ID_STARCALC_50 ((sal_uLong)39)
+#define SOT_FORMATSTR_ID_STARCHART ((sal_uLong)40)
+#define SOT_FORMATSTR_ID_STARCHART_40 ((sal_uLong)41)
+#define SOT_FORMATSTR_ID_STARCHART_50 ((sal_uLong)42)
+#define SOT_FORMATSTR_ID_STARIMAGE ((sal_uLong)43)
+#define SOT_FORMATSTR_ID_STARIMAGE_40 ((sal_uLong)44)
+#define SOT_FORMATSTR_ID_STARIMAGE_50 ((sal_uLong)45)
+#define SOT_FORMATSTR_ID_STARMATH ((sal_uLong)46)
+#define SOT_FORMATSTR_ID_STARMATH_40 ((sal_uLong)47)
+#define SOT_FORMATSTR_ID_STARMATH_50 ((sal_uLong)48)
+#define SOT_FORMATSTR_ID_STAROBJECT_PAINTDOC ((sal_uLong)49)
+#define SOT_FORMATSTR_ID_FILLED_AREA ((sal_uLong)50)
+#define SOT_FORMATSTR_ID_HTML ((sal_uLong)51)
+#define SOT_FORMATSTR_ID_HTML_SIMPLE ((sal_uLong)52)
+#define SOT_FORMATSTR_ID_CHAOS ((sal_uLong)53)
+#define SOT_FORMATSTR_ID_CNT_MSGATTACHFILE ((sal_uLong)54)
+#define SOT_FORMATSTR_ID_BIFF_5 ((sal_uLong)55)
+#define SOT_FORMATSTR_ID_BIFF__5 ((sal_uLong)56)
+#define SOT_FORMATSTR_ID_SYLK ((sal_uLong)57)
+#define SOT_FORMATSTR_ID_SYLK_BIGCAPS ((sal_uLong)58)
+#define SOT_FORMATSTR_ID_LINK ((sal_uLong)59)
+#define SOT_FORMATSTR_ID_DIF ((sal_uLong)60)
+#define SOT_FORMATSTR_ID_STARDRAW_TABBAR ((sal_uLong)61)
+#define SOT_FORMATSTR_ID_SONLK ((sal_uLong)62)
+#define SOT_FORMATSTR_ID_MSWORD_DOC ((sal_uLong)63)
+#define SOT_FORMATSTR_ID_STAR_FRAMESET_DOC ((sal_uLong)64)
+#define SOT_FORMATSTR_ID_OFFICE_DOC ((sal_uLong)65)
+#define SOT_FORMATSTR_ID_NOTES_DOCINFO ((sal_uLong)66)
+#define SOT_FORMATSTR_ID_NOTES_HNOTE ((sal_uLong)67)
+#define SOT_FORMATSTR_ID_NOTES_NATIVE ((sal_uLong)68)
+#define SOT_FORMATSTR_ID_SFX_DOC ((sal_uLong)69)
+#define SOT_FORMATSTR_ID_EVDF ((sal_uLong)70)
+#define SOT_FORMATSTR_ID_ESDF ((sal_uLong)71)
+#define SOT_FORMATSTR_ID_IDF ((sal_uLong)72)
+#define SOT_FORMATSTR_ID_EFTP ((sal_uLong)73)
+#define SOT_FORMATSTR_ID_EFD ((sal_uLong)74)
+#define SOT_FORMATSTR_ID_SVX_FORMFIELDEXCH ((sal_uLong)75)
+#define SOT_FORMATSTR_ID_EXTENDED_TABBAR ((sal_uLong)76)
+#define SOT_FORMATSTR_ID_SBA_DATAEXCHANGE ((sal_uLong)77)
+#define SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE ((sal_uLong)78)
+#define SOT_FORMATSTR_ID_SBA_PRIVATE_URL ((sal_uLong)79)
+#define SOT_FORMATSTR_ID_SBA_TABED ((sal_uLong)80)
+#define SOT_FORMATSTR_ID_SBA_TABID ((sal_uLong)81)
+#define SOT_FORMATSTR_ID_SBA_JOIN ((sal_uLong)82)
+#define SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ((sal_uLong)83)
+#define SOT_FORMATSTR_ID_LINKSRCDESCRIPTOR ((sal_uLong)84)
+#define SOT_FORMATSTR_ID_EMBED_SOURCE ((sal_uLong)85)
+#define SOT_FORMATSTR_ID_LINK_SOURCE ((sal_uLong)86)
+#define SOT_FORMATSTR_ID_EMBEDDED_OBJ ((sal_uLong)87)
+#define SOT_FORMATSTR_ID_FILECONTENT ((sal_uLong)88)
+#define SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR ((sal_uLong)89)
+#define SOT_FORMATSTR_ID_FILENAME ((sal_uLong)90)
+#define SOT_FORMATSTR_ID_SD_OLE ((sal_uLong)91)
+#define SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE ((sal_uLong)92)
+#define SOT_FORMATSTR_ID_EMBED_SOURCE_OLE ((sal_uLong)93)
+#define SOT_FORMATSTR_ID_OBJECTDESCRIPTOR_OLE ((sal_uLong)94)
+#define SOT_FORMATSTR_ID_LINKSRCDESCRIPTOR_OLE ((sal_uLong)95)
+#define SOT_FORMATSTR_ID_LINK_SOURCE_OLE ((sal_uLong)96)
+#define SOT_FORMATSTR_ID_SBA_CTRLDATAEXCHANGE ((sal_uLong)97)
+#define SOT_FORMATSTR_ID_OUTPLACE_OBJ ((sal_uLong)98)
+#define SOT_FORMATSTR_ID_CNT_OWN_CLIP ((sal_uLong)99)
+#define SOT_FORMATSTR_ID_INET_IMAGE ((sal_uLong)100)
+#define SOT_FORMATSTR_ID_NETSCAPE_IMAGE ((sal_uLong)101)
+#define SOT_FORMATSTR_ID_SBA_FORMEXCHANGE ((sal_uLong)102)
+#define SOT_FORMATSTR_ID_SBA_REPORTEXCHANGE ((sal_uLong)103)
+#define SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR ((sal_uLong)104)
+#define SOT_FORMATSTR_ID_STARCHARTDOCUMENT_50 ((sal_uLong)105)
+#define SOT_FORMATSTR_ID_GRAPHOBJ ((sal_uLong)106)
+#define SOT_FORMATSTR_ID_STARWRITER_60 ((sal_uLong)107)
+#define SOT_FORMATSTR_ID_STARWRITERWEB_60 ((sal_uLong)108)
+#define SOT_FORMATSTR_ID_STARWRITERGLOB_60 ((sal_uLong)109)
+#define SOT_FORMATSTR_ID_STARDRAW_60 ((sal_uLong)110)
+#define SOT_FORMATSTR_ID_STARIMPRESS_60 ((sal_uLong)111)
+#define SOT_FORMATSTR_ID_STARCALC_60 ((sal_uLong)112)
+#define SOT_FORMATSTR_ID_STARCHART_60 ((sal_uLong)113)
+#define SOT_FORMATSTR_ID_STARMATH_60 ((sal_uLong)114)
+#define SOT_FORMATSTR_ID_WMF ((sal_uLong)115)
+#define SOT_FORMATSTR_ID_DBACCESS_QUERY ((sal_uLong)116)
+#define SOT_FORMATSTR_ID_DBACCESS_TABLE ((sal_uLong)117)
+#define SOT_FORMATSTR_ID_DBACCESS_COMMAND ((sal_uLong)118)
+#define SOT_FORMATSTR_ID_DIALOG_60 ((sal_uLong)119)
+#define SOT_FORMATSTR_ID_EMF ((sal_uLong)120)
+#define SOT_FORMATSTR_ID_BIFF_8 ((sal_uLong)121)
+#define SOT_FORMATSTR_ID_BMP ((sal_uLong)122)
+#define SOT_FORMATSTR_ID_HTML_NO_COMMENT ((sal_uLong)123)
+#define SOT_FORMATSTR_ID_STARWRITER_8 ((sal_uLong)124)
+#define SOT_FORMATSTR_ID_STARWRITERWEB_8 ((sal_uLong)125)
+#define SOT_FORMATSTR_ID_STARWRITERGLOB_8 ((sal_uLong)126)
+#define SOT_FORMATSTR_ID_STARDRAW_8 ((sal_uLong)127)
+#define SOT_FORMATSTR_ID_STARIMPRESS_8 ((sal_uLong)128)
+#define SOT_FORMATSTR_ID_STARCALC_8 ((sal_uLong)129)
+#define SOT_FORMATSTR_ID_STARCHART_8 ((sal_uLong)130)
+#define SOT_FORMATSTR_ID_STARMATH_8 ((sal_uLong)131)
+#define SOT_FORMATSTR_ID_XFORMS ((sal_uLong)132)
+#define SOT_FORMATSTR_ID_STARWRITER_8_TEMPLATE ((sal_uLong)133)
+#define SOT_FORMATSTR_ID_STARDRAW_8_TEMPLATE ((sal_uLong)134)
+#define SOT_FORMATSTR_ID_STARIMPRESS_8_TEMPLATE ((sal_uLong)135)
+#define SOT_FORMATSTR_ID_STARCALC_8_TEMPLATE ((sal_uLong)136)
+#define SOT_FORMATSTR_ID_STARCHART_8_TEMPLATE ((sal_uLong)137)
+#define SOT_FORMATSTR_ID_STARMATH_8_TEMPLATE ((sal_uLong)138)
+#define SOT_FORMATSTR_ID_STARBASE_8 ((sal_uLong)139)
+#define SOT_FORMATSTR_ID_HC_GDIMETAFILE ((sal_uLong)140)
#define SOT_FORMATSTR_ID_USER_END SOT_FORMATSTR_ID_HC_GDIMETAFILE
#endif // _SOT_FORMATS_HXX
diff --git a/sot/inc/sot/object.hxx b/sot/inc/sot/object.hxx
index 563c90d89a54..0f72e61510a9 100644
--- a/sot/inc/sot/object.hxx
+++ b/sot/inc/sot/object.hxx
@@ -43,41 +43,41 @@
#define TEST_INVARIANT
#ifdef TEST_INVARIANT
#define SO2_DECL_INVARIANT() \
- virtual void TestObjRef( BOOL bFree ); \
- void TestMemberObjRef( BOOL bFree ); \
- virtual void TestInvariant( BOOL bPrint ); \
- void TestMemberInvariant( BOOL bPrint );
+ virtual void TestObjRef( sal_Bool bFree ); \
+ void TestMemberObjRef( sal_Bool bFree ); \
+ virtual void TestInvariant( sal_Bool bPrint ); \
+ void TestMemberInvariant( sal_Bool bPrint );
#define SO2_IMPL_INVARIANT(ClassName) \
-void __EXPORT ClassName::TestObjRef( BOOL bFree ) \
+void __EXPORT ClassName::TestObjRef( sal_Bool bFree ) \
{ \
TestMemberObjRef( bFree ); \
} \
-void __EXPORT ClassName::TestInvariant( BOOL bPrint ) \
+void __EXPORT ClassName::TestInvariant( sal_Bool bPrint ) \
{ \
TestMemberInvariant( bPrint ); \
}
#define SO2_IMPL_INVARIANT1(ClassName,Super1) \
-void __EXPORT ClassName::TestObjRef( BOOL bFree ) \
+void __EXPORT ClassName::TestObjRef( sal_Bool bFree ) \
{ \
TestMemberObjRef( bFree ); \
Super1::TestObjRef( bFree ); \
} \
-void __EXPORT ClassName::TestInvariant( BOOL bPrint ) \
+void __EXPORT ClassName::TestInvariant( sal_Bool bPrint ) \
{ \
TestMemberInvariant( bPrint ); \
Super1::TestInvariant( bPrint ); \
}
#define SO2_IMPL_INVARIANT2(ClassName,Super1,Super2) \
-void __EXPORT ClassName::TestObjRef( BOOL bFree ) \
+void __EXPORT ClassName::TestObjRef( sal_Bool bFree ) \
{ \
TestMemberObjRef( bFree ); \
Super1::TestObjRef( bFree ); \
Super2::TestObjRef( bFree ); \
} \
-void __EXPORT ClassName::TestInvariant( BOOL bPrint ) \
+void __EXPORT ClassName::TestInvariant( sal_Bool bPrint ) \
{ \
TestMemberInvariant( bPrint ); \
Super1::TestInvariant( bPrint ); \
@@ -85,14 +85,14 @@ void __EXPORT ClassName::TestInvariant( BOOL bPrint ) \
}
#define SO2_IMPL_INVARIANT3(ClassName,Super1,Super2,Super3) \
-void __EXPORT ClassName::TestObjRef( BOOL bFree ) \
+void __EXPORT ClassName::TestObjRef( sal_Bool bFree ) \
{ \
TestMemberObjRef( bFree ); \
Super1::TestObjRef( bFree ); \
Super2::TestObjRef( bFree ); \
Super3::TestObjRef( bFree ); \
} \
-void __EXPORT ClassName::TestInvariant( BOOL bPrint ) \
+void __EXPORT ClassName::TestInvariant( sal_Bool bPrint ) \
{ \
TestMemberInvariant( bPrint ); \
Super1::TestInvariant( bPrint ); \
@@ -101,7 +101,7 @@ void __EXPORT ClassName::TestInvariant( BOOL bPrint ) \
}
#define SO2_IMPL_INVARIANT4(ClassName,Super1,Super2,Super3,Super4) \
-void __EXPORT ClassName::TestObjRef( BOOL bFree ) \
+void __EXPORT ClassName::TestObjRef( sal_Bool bFree ) \
{ \
TestMemberObjRef( bFree ); \
Super1::TestObjRef( bFree ); \
@@ -109,7 +109,7 @@ void __EXPORT ClassName::TestObjRef( BOOL bFree ) \
Super3::TestObjRef( bFree ); \
Super4::TestObjRef( bFree ); \
} \
-void __EXPORT ClassName::TestInvariant( BOOL bPrint ) \
+void __EXPORT ClassName::TestInvariant( sal_Bool bPrint ) \
{ \
TestMemberInvariant( bPrint ); \
Super1::TestInvariant( bPrint ); \
@@ -386,9 +386,9 @@ class SOT_DLLPUBLIC SotObject : virtual public SvRefBase
{
friend class SotFactory;
friend class SvObject;
- USHORT nStrongLockCount;
- USHORT nOwnerLockCount;
- BOOL bOwner:1,
+ sal_uInt16 nStrongLockCount;
+ sal_uInt16 nOwnerLockCount;
+ sal_Bool bOwner:1,
bSVObject:1, // Ist Proxy, dann TRUE wenn andere Seite SV ist
bInClose:1; // TRUE, im DoClose
@@ -398,8 +398,8 @@ public:
protected:
#endif
virtual ~SotObject();
- void SetExtern() { bOwner = FALSE; }
- virtual BOOL Close();
+ void SetExtern() { bOwner = sal_False; }
+ virtual sal_Bool Close();
public:
SotObject();
SO2_DECL_BASIC_CLASS_DLL(SotObject,SOTDATA())
@@ -408,18 +408,18 @@ public:
// Nur damit die Makros in So3 nicht ganz ausufern
virtual IUnknown * GetInterface( const SvGlobalName & );
- BOOL Owner() const { return bOwner; }
+ sal_Bool Owner() const { return bOwner; }
void* CastAndAddRef( const SotFactory * pFact );
- USHORT Lock( BOOL bLock ); // affects nStrongLockCount
- USHORT GetOwnerLockCount() const { return nOwnerLockCount; }
- USHORT GetStrongLockCount() const { return nStrongLockCount; }
+ sal_uInt16 Lock( sal_Bool bLock ); // affects nStrongLockCount
+ sal_uInt16 GetOwnerLockCount() const { return nOwnerLockCount; }
+ sal_uInt16 GetStrongLockCount() const { return nStrongLockCount; }
- void OwnerLock( BOOL bLock );
+ void OwnerLock( sal_Bool bLock );
void RemoveOwnerLock();
- BOOL DoClose();
- BOOL IsInClose() const { return bInClose; }
+ sal_Bool DoClose();
+ sal_Bool IsInClose() const { return bInClose; }
private:
// Kopieren und Zuweisen dieses Objekttyps ist nicht erlaubt
diff --git a/sot/inc/sot/sotdata.hxx b/sot/inc/sot/sotdata.hxx
index 8d8775b5e181..213eea7f4ed3 100644
--- a/sot/inc/sot/sotdata.hxx
+++ b/sot/inc/sot/sotdata.hxx
@@ -45,7 +45,7 @@ class SotObjectList;
struct SotData_Impl
{
- UINT32 nSvObjCount;
+ sal_uInt32 nSvObjCount;
SotObjectList * pObjectList;
SotFactoryList * pFactoryList;
SotFactory * pSotObjectFactory;
diff --git a/sot/inc/sot/stg.hxx b/sot/inc/sot/stg.hxx
index 84373e26d596..630c7d6a4a0f 100644
--- a/sot/inc/sot/stg.hxx
+++ b/sot/inc/sot/stg.hxx
@@ -65,30 +65,30 @@ class StgStrm;
class SvGlobalName;
struct ClsId
{
- INT32 n1;
- INT16 n2, n3;
- UINT8 n4, n5, n6, n7, n8, n9, n10, n11;
+ sal_Int32 n1;
+ sal_Int16 n2, n3;
+ sal_uInt8 n4, n5, n6, n7, n8, n9, n10, n11;
};
class SOT_DLLPUBLIC StorageBase : public SvRefBase
{
protected:
- ULONG m_nError; // error code
+ sal_uLong m_nError; // error code
StreamMode m_nMode; // open mode
- BOOL m_bAutoCommit;
+ sal_Bool m_bAutoCommit;
StorageBase();
virtual ~StorageBase();
public:
TYPEINFO();
virtual const SvStream* GetSvStream() const = 0;
- virtual BOOL Validate( BOOL=FALSE ) const = 0;
- virtual BOOL ValidateMode( StreamMode ) const = 0;
+ virtual sal_Bool Validate( sal_Bool=sal_False ) const = 0;
+ virtual sal_Bool ValidateMode( StreamMode ) const = 0;
void ResetError() const;
- void SetError( ULONG ) const;
- ULONG GetError() const;
- BOOL Good() const { return BOOL( m_nError == SVSTREAM_OK ); }
+ void SetError( sal_uLong ) const;
+ sal_uLong GetError() const;
+ sal_Bool Good() const { return sal_Bool( m_nError == SVSTREAM_OK ); }
StreamMode GetMode() const { return m_nMode; }
- void SetAutoCommit( BOOL bSet )
+ void SetAutoCommit( sal_Bool bSet )
{ m_bAutoCommit = bSet; }
};
@@ -96,16 +96,16 @@ class BaseStorageStream : public StorageBase
{
public:
TYPEINFO();
- virtual ULONG Read( void * pData, ULONG nSize ) = 0;
- virtual ULONG Write( const void* pData, ULONG nSize ) = 0;
- virtual ULONG Seek( ULONG nPos ) = 0;
- virtual ULONG Tell() = 0;
+ virtual sal_uLong Read( void * pData, sal_uLong nSize ) = 0;
+ virtual sal_uLong Write( const void* pData, sal_uLong nSize ) = 0;
+ virtual sal_uLong Seek( sal_uLong nPos ) = 0;
+ virtual sal_uLong Tell() = 0;
virtual void Flush() = 0;
- virtual BOOL SetSize( ULONG nNewSize ) = 0;
- virtual BOOL CopyTo( BaseStorageStream * pDestStm ) = 0;
- virtual BOOL Commit() = 0;
- virtual BOOL Revert() = 0;
- virtual BOOL Equals( const BaseStorageStream& rStream ) const = 0;
+ virtual sal_Bool SetSize( sal_uLong nNewSize ) = 0;
+ virtual sal_Bool CopyTo( BaseStorageStream * pDestStm ) = 0;
+ virtual sal_Bool Commit() = 0;
+ virtual sal_Bool Revert() = 0;
+ virtual sal_Bool Equals( const BaseStorageStream& rStream ) const = 0;
};
class SvStorageInfoList;
@@ -114,45 +114,45 @@ class BaseStorage : public StorageBase
public:
TYPEINFO();
virtual const String& GetName() const = 0;
- virtual BOOL IsRoot() const = 0;
+ virtual sal_Bool IsRoot() const = 0;
virtual void SetClassId( const ClsId& ) = 0;
virtual const ClsId& GetClassId() const = 0;
virtual void SetDirty() = 0;
virtual void SetClass( const SvGlobalName & rClass,
- ULONG nOriginalClipFormat,
+ sal_uLong nOriginalClipFormat,
const String & rUserTypeName ) = 0;
virtual void SetConvertClass( const SvGlobalName & rConvertClass,
- ULONG nOriginalClipFormat,
+ sal_uLong nOriginalClipFormat,
const String & rUserTypeName ) = 0;
virtual SvGlobalName GetClassName() = 0;
- virtual ULONG GetFormat() = 0;
+ virtual sal_uLong GetFormat() = 0;
virtual String GetUserName() = 0;
- virtual BOOL ShouldConvert() = 0;
+ virtual sal_Bool ShouldConvert() = 0;
virtual void FillInfoList( SvStorageInfoList* ) const = 0;
- virtual BOOL CopyTo( BaseStorage* pDestStg ) const = 0;
- virtual BOOL Commit() = 0;
- virtual BOOL Revert() = 0;
+ virtual sal_Bool CopyTo( BaseStorage* pDestStg ) const = 0;
+ virtual sal_Bool Commit() = 0;
+ virtual sal_Bool Revert() = 0;
virtual BaseStorageStream* OpenStream( const String & rEleName,
StreamMode = STREAM_STD_READWRITE,
- BOOL bDirect = TRUE, const ByteString* pKey=0 ) = 0;
+ sal_Bool bDirect = sal_True, const ByteString* pKey=0 ) = 0;
virtual BaseStorage* OpenStorage( const String & rEleName,
StreamMode = STREAM_STD_READWRITE,
- BOOL bDirect = FALSE ) = 0;
+ sal_Bool bDirect = sal_False ) = 0;
virtual BaseStorage* OpenUCBStorage( const String & rEleName,
StreamMode = STREAM_STD_READWRITE,
- BOOL bDirect = FALSE ) = 0;
+ sal_Bool bDirect = sal_False ) = 0;
virtual BaseStorage* OpenOLEStorage( const String & rEleName,
StreamMode = STREAM_STD_READWRITE,
- BOOL bDirect = FALSE ) = 0;
- virtual BOOL IsStream( const String& rEleName ) const = 0;
- virtual BOOL IsStorage( const String& rEleName ) const = 0;
- virtual BOOL IsContained( const String& rEleName ) const = 0;
- virtual BOOL Remove( const String & rEleName ) = 0;
- virtual BOOL Rename( const String & rEleName, const String & rNewName ) = 0;
- virtual BOOL CopyTo( const String & rEleName, BaseStorage * pDest, const String & rNewName ) = 0;
- virtual BOOL MoveTo( const String & rEleName, BaseStorage * pDest, const String & rNewName ) = 0;
- virtual BOOL ValidateFAT() = 0;
- virtual BOOL Equals( const BaseStorage& rStream ) const = 0;
+ sal_Bool bDirect = sal_False ) = 0;
+ virtual sal_Bool IsStream( const String& rEleName ) const = 0;
+ virtual sal_Bool IsStorage( const String& rEleName ) const = 0;
+ virtual sal_Bool IsContained( const String& rEleName ) const = 0;
+ virtual sal_Bool Remove( const String & rEleName ) = 0;
+ virtual sal_Bool Rename( const String & rEleName, const String & rNewName ) = 0;
+ virtual sal_Bool CopyTo( const String & rEleName, BaseStorage * pDest, const String & rNewName ) = 0;
+ virtual sal_Bool MoveTo( const String & rEleName, BaseStorage * pDest, const String & rNewName ) = 0;
+ virtual sal_Bool ValidateFAT() = 0;
+ virtual sal_Bool Equals( const BaseStorage& rStream ) const = 0;
};
class OLEStorageBase
@@ -163,8 +163,8 @@ protected:
StgDirEntry* pEntry; // the dir entry
OLEStorageBase( StgIo*, StgDirEntry*, StreamMode& );
~OLEStorageBase();
- BOOL Validate_Impl( BOOL=FALSE ) const;
- BOOL ValidateMode_Impl( StreamMode, StgDirEntry* p = NULL ) const ;
+ sal_Bool Validate_Impl( sal_Bool=sal_False ) const;
+ sal_Bool ValidateMode_Impl( StreamMode, StgDirEntry* p = NULL ) const ;
const SvStream* GetSvStream_Impl() const;
public:
};
@@ -172,26 +172,26 @@ public:
class StorageStream : public BaseStorageStream, public OLEStorageBase
{
//friend class Storage;
- ULONG nPos; // current position
+ sal_uLong nPos; // current position
protected:
~StorageStream();
public:
TYPEINFO();
StorageStream( StgIo*, StgDirEntry*, StreamMode );
- virtual ULONG Read( void * pData, ULONG nSize );
- virtual ULONG Write( const void* pData, ULONG nSize );
- virtual ULONG Seek( ULONG nPos );
- virtual ULONG Tell() { return nPos; }
+ virtual sal_uLong Read( void * pData, sal_uLong nSize );
+ virtual sal_uLong Write( const void* pData, sal_uLong nSize );
+ virtual sal_uLong Seek( sal_uLong nPos );
+ virtual sal_uLong Tell() { return nPos; }
virtual void Flush();
- virtual BOOL SetSize( ULONG nNewSize );
- virtual BOOL CopyTo( BaseStorageStream * pDestStm );
- virtual BOOL Commit();
- virtual BOOL Revert();
- virtual BOOL Validate( BOOL=FALSE ) const;
- virtual BOOL ValidateMode( StreamMode ) const;
- BOOL ValidateMode( StreamMode, StgDirEntry* p ) const;
+ virtual sal_Bool SetSize( sal_uLong nNewSize );
+ virtual sal_Bool CopyTo( BaseStorageStream * pDestStm );
+ virtual sal_Bool Commit();
+ virtual sal_Bool Revert();
+ virtual sal_Bool Validate( sal_Bool=sal_False ) const;
+ virtual sal_Bool ValidateMode( StreamMode ) const;
+ sal_Bool ValidateMode( StreamMode, StgDirEntry* p ) const;
const SvStream* GetSvStream() const;
- virtual BOOL Equals( const BaseStorageStream& rStream ) const;
+ virtual sal_Bool Equals( const BaseStorageStream& rStream ) const;
};
class UCBStorageStream;
@@ -199,64 +199,64 @@ class UCBStorageStream;
class SOT_DLLPUBLIC Storage : public BaseStorage, public OLEStorageBase
{
String aName;
- BOOL bIsRoot;
- void Init( BOOL bCreate );
+ sal_Bool bIsRoot;
+ void Init( sal_Bool bCreate );
Storage( StgIo*, StgDirEntry*, StreamMode );
protected:
~Storage();
public:
TYPEINFO();
- Storage( const String &, StreamMode = STREAM_STD_READWRITE, BOOL bDirect = TRUE );
- Storage( SvStream& rStrm, BOOL bDirect = TRUE );
- Storage( UCBStorageStream& rStrm, BOOL bDirect = TRUE );
+ Storage( const String &, StreamMode = STREAM_STD_READWRITE, sal_Bool bDirect = sal_True );
+ Storage( SvStream& rStrm, sal_Bool bDirect = sal_True );
+ Storage( UCBStorageStream& rStrm, sal_Bool bDirect = sal_True );
- static BOOL IsStorageFile( const String & rFileName );
- static BOOL IsStorageFile( SvStream* );
+ static sal_Bool IsStorageFile( const String & rFileName );
+ static sal_Bool IsStorageFile( SvStream* );
virtual const String& GetName() const;
- virtual BOOL IsRoot() const { return bIsRoot; }
+ virtual sal_Bool IsRoot() const { return bIsRoot; }
virtual void SetClassId( const ClsId& );
virtual const ClsId& GetClassId() const;
virtual void SetDirty();
virtual void SetClass( const SvGlobalName & rClass,
- ULONG nOriginalClipFormat,
+ sal_uLong nOriginalClipFormat,
const String & rUserTypeName );
virtual void SetConvertClass( const SvGlobalName & rConvertClass,
- ULONG nOriginalClipFormat,
+ sal_uLong nOriginalClipFormat,
const String & rUserTypeName );
virtual SvGlobalName GetClassName();
- virtual ULONG GetFormat();
+ virtual sal_uLong GetFormat();
virtual String GetUserName();
- virtual BOOL ShouldConvert();
+ virtual sal_Bool ShouldConvert();
virtual void FillInfoList( SvStorageInfoList* ) const;
- virtual BOOL CopyTo( BaseStorage* pDestStg ) const;
- virtual BOOL Commit();
- virtual BOOL Revert();
+ virtual sal_Bool CopyTo( BaseStorage* pDestStg ) const;
+ virtual sal_Bool Commit();
+ virtual sal_Bool Revert();
virtual BaseStorageStream* OpenStream( const String & rEleName,
StreamMode = STREAM_STD_READWRITE,
- BOOL bDirect = TRUE, const ByteString* pKey=0 );
+ sal_Bool bDirect = sal_True, const ByteString* pKey=0 );
virtual BaseStorage* OpenStorage( const String & rEleName,
StreamMode = STREAM_STD_READWRITE,
- BOOL bDirect = FALSE );
+ sal_Bool bDirect = sal_False );
virtual BaseStorage* OpenUCBStorage( const String & rEleName,
StreamMode = STREAM_STD_READWRITE,
- BOOL bDirect = FALSE );
+ sal_Bool bDirect = sal_False );
virtual BaseStorage* OpenOLEStorage( const String & rEleName,
StreamMode = STREAM_STD_READWRITE,
- BOOL bDirect = FALSE );
- virtual BOOL IsStream( const String& rEleName ) const;
- virtual BOOL IsStorage( const String& rEleName ) const;
- virtual BOOL IsContained( const String& rEleName ) const;
- virtual BOOL Remove( const String & rEleName );
- virtual BOOL Rename( const String & rEleName, const String & rNewName );
- virtual BOOL CopyTo( const String & rEleName, BaseStorage * pDest, const String & rNewName );
- virtual BOOL MoveTo( const String & rEleName, BaseStorage * pDest, const String & rNewName );
- virtual BOOL ValidateFAT();
- virtual BOOL Validate( BOOL=FALSE ) const;
- virtual BOOL ValidateMode( StreamMode ) const;
- BOOL ValidateMode( StreamMode, StgDirEntry* p ) const;
+ sal_Bool bDirect = sal_False );
+ virtual sal_Bool IsStream( const String& rEleName ) const;
+ virtual sal_Bool IsStorage( const String& rEleName ) const;
+ virtual sal_Bool IsContained( const String& rEleName ) const;
+ virtual sal_Bool Remove( const String & rEleName );
+ virtual sal_Bool Rename( const String & rEleName, const String & rNewName );
+ virtual sal_Bool CopyTo( const String & rEleName, BaseStorage * pDest, const String & rNewName );
+ virtual sal_Bool MoveTo( const String & rEleName, BaseStorage * pDest, const String & rNewName );
+ virtual sal_Bool ValidateFAT();
+ virtual sal_Bool Validate( sal_Bool=sal_False ) const;
+ virtual sal_Bool ValidateMode( StreamMode ) const;
+ sal_Bool ValidateMode( StreamMode, StgDirEntry* p ) const;
virtual const SvStream* GetSvStream() const;
- virtual BOOL Equals( const BaseStorage& rStream ) const;
+ virtual sal_Bool Equals( const BaseStorage& rStream ) const;
};
class UCBStorageStream_Impl;
@@ -270,25 +270,25 @@ protected:
~UCBStorageStream();
public:
TYPEINFO();
- UCBStorageStream( const String& rName, StreamMode nMode, BOOL bDirect, const ByteString* pKey=0 );
- UCBStorageStream( const String& rName, StreamMode nMode, BOOL bDirect, const ByteString* pKey, BOOL bRepair, ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XProgressHandler > xProgress );
+ UCBStorageStream( const String& rName, StreamMode nMode, sal_Bool bDirect, const ByteString* pKey=0 );
+ UCBStorageStream( const String& rName, StreamMode nMode, sal_Bool bDirect, const ByteString* pKey, sal_Bool bRepair, ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XProgressHandler > xProgress );
UCBStorageStream( UCBStorageStream_Impl* );
- virtual ULONG Read( void * pData, ULONG nSize );
- virtual ULONG Write( const void* pData, ULONG nSize );
- virtual ULONG Seek( ULONG nPos );
- virtual ULONG Tell();
+ virtual sal_uLong Read( void * pData, sal_uLong nSize );
+ virtual sal_uLong Write( const void* pData, sal_uLong nSize );
+ virtual sal_uLong Seek( sal_uLong nPos );
+ virtual sal_uLong Tell();
virtual void Flush();
- virtual BOOL SetSize( ULONG nNewSize );
- virtual BOOL CopyTo( BaseStorageStream * pDestStm );
- virtual BOOL Commit();
- virtual BOOL Revert();
- virtual BOOL Validate( BOOL=FALSE ) const;
- virtual BOOL ValidateMode( StreamMode ) const;
+ virtual sal_Bool SetSize( sal_uLong nNewSize );
+ virtual sal_Bool CopyTo( BaseStorageStream * pDestStm );
+ virtual sal_Bool Commit();
+ virtual sal_Bool Revert();
+ virtual sal_Bool Validate( sal_Bool=sal_False ) const;
+ virtual sal_Bool ValidateMode( StreamMode ) const;
const SvStream* GetSvStream() const;
- virtual BOOL Equals( const BaseStorageStream& rStream ) const;
- BOOL SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue );
- BOOL GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue );
+ virtual sal_Bool Equals( const BaseStorageStream& rStream ) const;
+ sal_Bool SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue );
+ sal_Bool GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue );
SvStream* GetModifySvStream();
@@ -309,76 +309,76 @@ class SOT_DLLPUBLIC UCBStorage : public BaseStorage
protected:
~UCBStorage();
public:
- static BOOL IsStorageFile( SvStream* );
- static BOOL IsStorageFile( const String& rName );
- static BOOL IsDiskSpannedFile( SvStream* );
+ static sal_Bool IsStorageFile( SvStream* );
+ static sal_Bool IsStorageFile( const String& rName );
+ static sal_Bool IsDiskSpannedFile( SvStream* );
static String GetLinkedFile( SvStream& );
static String CreateLinkFile( const String& rName );
- UCBStorage( const ::ucbhelper::Content& rContent, const String& rName, StreamMode nMode, BOOL bDirect = TRUE, BOOL bIsRoot = TRUE );
+ UCBStorage( const ::ucbhelper::Content& rContent, const String& rName, StreamMode nMode, sal_Bool bDirect = sal_True, sal_Bool bIsRoot = sal_True );
UCBStorage( const String& rName,
StreamMode nMode,
- BOOL bDirect = TRUE,
- BOOL bIsRoot = TRUE );
+ sal_Bool bDirect = sal_True,
+ sal_Bool bIsRoot = sal_True );
UCBStorage( const String& rName,
StreamMode nMode,
- BOOL bDirect,
- BOOL bIsRoot,
- BOOL bIsRepair,
+ sal_Bool bDirect,
+ sal_Bool bIsRoot,
+ sal_Bool bIsRepair,
::com::sun::star::uno::Reference< ::com::sun::star::ucb::XProgressHandler >
xProgressHandler );
UCBStorage( UCBStorage_Impl* );
- UCBStorage( SvStream& rStrm, BOOL bDirect = TRUE );
+ UCBStorage( SvStream& rStrm, sal_Bool bDirect = sal_True );
TYPEINFO();
virtual const String& GetName() const;
- virtual BOOL IsRoot() const;
+ virtual sal_Bool IsRoot() const;
virtual void SetClassId( const ClsId& );
virtual const ClsId& GetClassId() const;
virtual void SetDirty();
virtual void SetClass( const SvGlobalName & rClass,
- ULONG nOriginalClipFormat,
+ sal_uLong nOriginalClipFormat,
const String & rUserTypeName );
virtual void SetConvertClass( const SvGlobalName & rConvertClass,
- ULONG nOriginalClipFormat,
+ sal_uLong nOriginalClipFormat,
const String & rUserTypeName );
virtual SvGlobalName GetClassName();
- virtual ULONG GetFormat();
+ virtual sal_uLong GetFormat();
virtual String GetUserName();
- virtual BOOL ShouldConvert();
+ virtual sal_Bool ShouldConvert();
virtual void FillInfoList( SvStorageInfoList* ) const;
- virtual BOOL CopyTo( BaseStorage* pDestStg ) const;
- virtual BOOL Commit();
- virtual BOOL Revert();
+ virtual sal_Bool CopyTo( BaseStorage* pDestStg ) const;
+ virtual sal_Bool Commit();
+ virtual sal_Bool Revert();
virtual BaseStorageStream* OpenStream( const String & rEleName,
StreamMode = STREAM_STD_READWRITE,
- BOOL bDirect = TRUE, const ByteString* pKey=0 );
+ sal_Bool bDirect = sal_True, const ByteString* pKey=0 );
virtual BaseStorage* OpenStorage( const String & rEleName,
StreamMode = STREAM_STD_READWRITE,
- BOOL bDirect = FALSE );
+ sal_Bool bDirect = sal_False );
virtual BaseStorage* OpenUCBStorage( const String & rEleName,
StreamMode = STREAM_STD_READWRITE,
- BOOL bDirect = FALSE );
+ sal_Bool bDirect = sal_False );
virtual BaseStorage* OpenOLEStorage( const String & rEleName,
StreamMode = STREAM_STD_READWRITE,
- BOOL bDirect = FALSE );
- virtual BOOL IsStream( const String& rEleName ) const;
- virtual BOOL IsStorage( const String& rEleName ) const;
- virtual BOOL IsContained( const String& rEleName ) const;
- virtual BOOL Remove( const String & rEleName );
- virtual BOOL Rename( const String & rEleName, const String & rNewName );
- virtual BOOL CopyTo( const String & rEleName, BaseStorage * pDest, const String & rNewName );
- virtual BOOL MoveTo( const String & rEleName, BaseStorage * pDest, const String & rNewName );
- virtual BOOL ValidateFAT();
- virtual BOOL Validate( BOOL=FALSE ) const;
- virtual BOOL ValidateMode( StreamMode ) const;
+ sal_Bool bDirect = sal_False );
+ virtual sal_Bool IsStream( const String& rEleName ) const;
+ virtual sal_Bool IsStorage( const String& rEleName ) const;
+ virtual sal_Bool IsContained( const String& rEleName ) const;
+ virtual sal_Bool Remove( const String & rEleName );
+ virtual sal_Bool Rename( const String & rEleName, const String & rNewName );
+ virtual sal_Bool CopyTo( const String & rEleName, BaseStorage * pDest, const String & rNewName );
+ virtual sal_Bool MoveTo( const String & rEleName, BaseStorage * pDest, const String & rNewName );
+ virtual sal_Bool ValidateFAT();
+ virtual sal_Bool Validate( sal_Bool=sal_False ) const;
+ virtual sal_Bool ValidateMode( StreamMode ) const;
virtual const SvStream* GetSvStream() const;
- virtual BOOL Equals( const BaseStorage& rStream ) const;
- BOOL SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue );
- BOOL GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue );
- BOOL GetProperty( const String& rEleName, const String& rName, ::com::sun::star::uno::Any& rValue );
+ virtual sal_Bool Equals( const BaseStorage& rStream ) const;
+ sal_Bool SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue );
+ sal_Bool GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue );
+ sal_Bool GetProperty( const String& rEleName, const String& rName, ::com::sun::star::uno::Any& rValue );
// HACK to avoid incompatible build, can be done since this feature is only for development
// should be removed before release
@@ -386,10 +386,10 @@ public:
//#if _SOLAR__PRIVATE
UCBStorageElement_Impl* FindElement_Impl( const String& rName ) const;
- BOOL CopyStorageElement_Impl( UCBStorageElement_Impl& rElement,
+ sal_Bool CopyStorageElement_Impl( UCBStorageElement_Impl& rElement,
BaseStorage* pDest, const String& rNew ) const;
BaseStorage* OpenStorage_Impl( const String & rEleName,
- StreamMode, BOOL bDirect, BOOL bForceUCBStorage );
+ StreamMode, sal_Bool bDirect, sal_Bool bForceUCBStorage );
//#endif
};
diff --git a/sot/inc/sot/storage.hxx b/sot/inc/sot/storage.hxx
index 572e100c7299..3c253fd80d1e 100644
--- a/sot/inc/sot/storage.hxx
+++ b/sot/inc/sot/storage.hxx
@@ -71,9 +71,9 @@ friend class SotStorage;
friend class ImpStream;
BaseStorageStream * pOwnStm;// Zeiger auf den eigenen Stream
protected:
- virtual ULONG GetData( void* pData, ULONG nSize );
- virtual ULONG PutData( const void* pData, ULONG nSize );
- virtual ULONG SeekPos( ULONG nPos );
+ virtual sal_uLong GetData( void* pData, sal_uLong nSize );
+ virtual sal_uLong PutData( const void* pData, sal_uLong nSize );
+ virtual sal_uLong SeekPos( sal_uLong nPos );
virtual void FlushData();
~SotStorageStream();
public:
@@ -91,13 +91,13 @@ public:
virtual void ResetError();
- virtual void SetSize( ULONG nNewSize );
- UINT32 GetSize() const;
- BOOL CopyTo( SotStorageStream * pDestStm );
- virtual BOOL Commit();
- virtual BOOL Revert();
- BOOL SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue );
- BOOL GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue );
+ virtual void SetSize( sal_uLong nNewSize );
+ sal_uInt32 GetSize() const;
+ sal_Bool CopyTo( SotStorageStream * pDestStm );
+ virtual sal_Bool Commit();
+ virtual sal_Bool Revert();
+ sal_Bool SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue );
+ sal_Bool GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue );
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >
GetXInputStream() const;
};
@@ -125,21 +125,21 @@ friend class ::binfilter::SvStorage;
BaseStorage * m_pTmpStg; // Temp-Storage fuer Transacted, nur auf diesem schreiben! ??? Useless ???
BaseStorage * m_pOwnStg; // Zielstorage
SvStream * m_pStorStm; // nur fuer SDSTORAGES
- ULONG m_nError;
+ sal_uLong m_nError;
String m_aName; // Name des Storage
- BOOL m_bIsRoot:1, // z.B.: File-Storage
+ sal_Bool m_bIsRoot:1, // z.B.: File-Storage
m_bDelStm:1;
ByteString m_aKey; // aKey.Len != 0 -> Verschluesselung
long m_nVersion;
protected:
~SotStorage();
- void CreateStorage( BOOL bUCBStorage, StreamMode, StorageMode );
+ void CreateStorage( sal_Bool bUCBStorage, StreamMode, StorageMode );
public:
SotStorage( const String &,
StreamMode = STREAM_STD_READWRITE,
StorageMode = 0 );
- SotStorage( BOOL bUCBStorage, const String &,
+ SotStorage( sal_Bool bUCBStorage, const String &,
StreamMode = STREAM_STD_READWRITE,
StorageMode = 0 );
SotStorage( const ::ucbhelper::Content& rContent, const String &,
@@ -147,8 +147,8 @@ public:
StorageMode = 0 );
SotStorage( BaseStorage * );
SotStorage( SvStream & rStm );
- SotStorage( BOOL bUCBStorage, SvStream & rStm );
- SotStorage( SvStream * pStm, BOOL bDelete );
+ SotStorage( sal_Bool bUCBStorage, SvStream & rStm );
+ SotStorage( SvStream * pStm, sal_Bool bDelete );
SotStorage();
SO2_DECL_BASIC_CLASS_DLL(SotStorage,SOTDATA())
SO2_DECL_INVARIANT()
@@ -156,12 +156,12 @@ public:
SvMemoryStream * CreateMemoryStream();
const SvStream * GetSvStream();
- static BOOL IsStorageFile( const String & rFileName );
- static BOOL IsStorageFile( SvStream* pStream );
+ static sal_Bool IsStorageFile( const String & rFileName );
+ static sal_Bool IsStorageFile( SvStream* pStream );
virtual const String & GetName() const;
- virtual BOOL Validate();
+ virtual sal_Bool Validate();
void SetKey( const ByteString& rKey );
const ByteString & GetKey() const { return m_aKey; }
@@ -175,37 +175,37 @@ public:
return m_nVersion;
}
- ULONG GetErrorCode() const { return m_nError; }
- ULONG GetError() const { return ERRCODE_TOERROR(m_nError); }
- void SetError( ULONG nErrorCode )
+ sal_uLong GetErrorCode() const { return m_nError; }
+ sal_uLong GetError() const { return ERRCODE_TOERROR(m_nError); }
+ void SetError( sal_uLong nErrorCode )
{
if( m_nError == SVSTREAM_OK )
m_nError = nErrorCode;
}
virtual void ResetError();
- BOOL IsRoot() const { return m_bIsRoot; }
- void SignAsRoot( BOOL b = TRUE ) { m_bIsRoot = b; }
- void SetDeleteStream( BOOL bDelete ) { m_bDelStm = bDelete; }
+ sal_Bool IsRoot() const { return m_bIsRoot; }
+ void SignAsRoot( sal_Bool b = sal_True ) { m_bIsRoot = b; }
+ void SetDeleteStream( sal_Bool bDelete ) { m_bDelStm = bDelete; }
// eigener Datenbereich
virtual void SetClass( const SvGlobalName & rClass,
- ULONG bOriginalClipFormat,
+ sal_uLong bOriginalClipFormat,
const String & rUserTypeName );
virtual void SetConvertClass( const SvGlobalName & rConvertClass,
- ULONG bOriginalClipFormat,
+ sal_uLong bOriginalClipFormat,
const String & rUserTypeName );
virtual SvGlobalName GetClassName();// Typ der Daten im Storage
- virtual ULONG GetFormat();
+ virtual sal_uLong GetFormat();
virtual String GetUserName();
- virtual BOOL ShouldConvert();
+ virtual sal_Bool ShouldConvert();
void SetName( const String& rName );
// Liste aller Elemente
virtual void FillInfoList( SvStorageInfoList * ) const;
- virtual BOOL CopyTo( SotStorage * pDestStg );
- virtual BOOL Commit();
- virtual BOOL Revert();
+ virtual sal_Bool CopyTo( SotStorage * pDestStg );
+ virtual sal_Bool Commit();
+ virtual sal_Bool Revert();
/* Element Methoden */
// Stream mit Verbindung zu Storage erzeugen,
@@ -226,26 +226,26 @@ public:
StreamMode = STREAM_STD_READWRITE,
StorageMode = STORAGE_TRANSACTED );
// Abfrage auf Storage oder Stream
- virtual BOOL IsStream( const String & rEleName ) const;
- virtual BOOL IsStorage( const String & rEleName ) const;
- virtual BOOL IsContained( const String & rEleName ) const;
+ virtual sal_Bool IsStream( const String & rEleName ) const;
+ virtual sal_Bool IsStorage( const String & rEleName ) const;
+ virtual sal_Bool IsContained( const String & rEleName ) const;
// Element loeschen
- virtual BOOL Remove( const String & rEleName );
+ virtual sal_Bool Remove( const String & rEleName );
// Elementnamen aendern
- virtual BOOL Rename( const String & rEleName,
+ virtual sal_Bool Rename( const String & rEleName,
const String & rNewName );
- virtual BOOL CopyTo( const String & rEleName, SotStorage * pDest,
+ virtual sal_Bool CopyTo( const String & rEleName, SotStorage * pDest,
const String & rNewName );
- virtual BOOL MoveTo( const String & rEleName, SotStorage * pDest,
+ virtual sal_Bool MoveTo( const String & rEleName, SotStorage * pDest,
const String & rNewName );
SvStream* GetTargetSvStream() const;
- BOOL SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue );
- BOOL GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue );
- BOOL GetProperty( const String& rEleName, const String& rName, ::com::sun::star::uno::Any& rValue );
- BOOL IsOLEStorage() const;
- static BOOL IsOLEStorage( const String & rFileName );
- static BOOL IsOLEStorage( SvStream* pStream );
+ sal_Bool SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue );
+ sal_Bool GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue );
+ sal_Bool GetProperty( const String& rEleName, const String& rName, ::com::sun::star::uno::Any& rValue );
+ sal_Bool IsOLEStorage() const;
+ static sal_Bool IsOLEStorage( const String & rFileName );
+ static sal_Bool IsOLEStorage( SvStream* pStream );
// this is temporary HACK, _MUST_ be removed before release
::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >
diff --git a/sot/inc/sot/storinfo.hxx b/sot/inc/sot/storinfo.hxx
index dab1f6d4540e..02db24529129 100644
--- a/sot/inc/sot/storinfo.hxx
+++ b/sot/inc/sot/storinfo.hxx
@@ -39,14 +39,14 @@ class SvStorageInfo
friend class SvStorage;
String aName;
SvGlobalName aClassName;
- ULONG nSize;
- BOOL bStream:1,
+ sal_uLong nSize;
+ sal_Bool bStream:1,
bStorage:1;
SvStorageInfo(){}; // Fuer SvStorage
public:
SvStorageInfo( const StgDirEntry& );
- SvStorageInfo( const String& rName, ULONG nSz, BOOL bIsStorage )
+ SvStorageInfo( const String& rName, sal_uLong nSz, sal_Bool bIsStorage )
: aName( rName )
, nSize( nSz )
, bStream( !bIsStorage )
@@ -55,9 +55,9 @@ public:
const SvGlobalName & GetClassName() const { return aClassName; }
const String & GetName() const { return aName; }
- BOOL IsStream() const { return bStream; }
- BOOL IsStorage() const { return bStorage; }
- ULONG GetSize() const { return nSize; }
+ sal_Bool IsStream() const { return bStream; }
+ sal_Bool IsStorage() const { return bStorage; }
+ sal_uLong GetSize() const { return nSize; }
};
class SOT_DLLPUBLIC SvStorageInfoList
@@ -66,7 +66,7 @@ class SOT_DLLPUBLIC SvStorageInfoList
const SvStorageInfo * Get( const String & rName );
};
-SOT_DLLPUBLIC ULONG ReadClipboardFormat( SvStream & rStm );
-SOT_DLLPUBLIC void WriteClipboardFormat( SvStream & rStm, ULONG nFormat );
+SOT_DLLPUBLIC sal_uLong ReadClipboardFormat( SvStream & rStm );
+SOT_DLLPUBLIC void WriteClipboardFormat( SvStream & rStm, sal_uLong nFormat );
#endif // _STORINFO_HXX
diff --git a/sot/prj/build.lst b/sot/prj/build.lst
index 9d6e785898a5..63f7a94cf054 100644..100755
--- a/sot/prj/build.lst
+++ b/sot/prj/build.lst
@@ -1,10 +1,2 @@
-to sot : LIBXSLT:libxslt tools ucbhelper unotools NULL
-to sot usr1 - all sot_mkout NULL
-to sot\inc nmake - all sot_inc NULL
-to sot\prj get - all sot_prj NULL
-to sot\source\base nmake - all sot_base sot_inc NULL
-to sot\source\sdstor nmake - all sot_sdst sot_inc NULL
-to sot\source\unoolestorage nmake - all sot_unoolestor sot_inc NULL
-to sot\util nmake - all sot_ut sot_base sot_sdst sot_unoolestor NULL
-
-# to sot\qa\complex\olesimplestorage nmake - all sot_complex sot_ut NULL
+to sot : tools ucbhelper unotools NULL
+to sot\prj nmake - all sot_prj NULL
diff --git a/sot/prj/d.lst b/sot/prj/d.lst
index ec3166bbea1a..e69de29bb2d1 100644
--- a/sot/prj/d.lst
+++ b/sot/prj/d.lst
@@ -1,15 +0,0 @@
-mkdir: %_DEST%\inc%_EXT%\sot
-..\inc\sot/*.hxx %_DEST%\inc%_EXT%\sot\*.hxx
-..\inc\sot\*.h %_DEST%\inc%_EXT%\sot\*.h
-
-..\%__SRC%\lib\sot.lib %_DEST%\lib%_EXT%\sot.lib
-..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT%
-..\%__SRC%\lib\lib*.so.* %_DEST%\lib%_EXT%
-..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib
-..\%__SRC%\lib\*.sl %_DEST%\lib%_EXT%\*.sl
-..\%__SRC%\lib\*.a %_DEST%\lib%_EXT%\*.a
-..\%__SRC%\slb\sot.lib %_DEST%\lib%_EXT%\xsot.lib
-..\%__SRC%\bin\sot?????.dll %_DEST%\bin%_EXT%\sot?????.dll
-..\%__SRC%\bin\sot?????.sym %_DEST%\bin%_EXT%\sot?????.sym
-..\%__SRC%\misc\sot?????.map %_DEST%\bin%_EXT%\sot?????.map
-..\%__SRC%\misc\sot.component %_DEST%\xml%_EXT%\sot.component
diff --git a/svl/util/svl.pmk b/sot/prj/makefile.mk
index 854fb6d6d453..e312a7ccab65 100644
--- a/svl/util/svl.pmk
+++ b/sot/prj/makefile.mk
@@ -25,7 +25,16 @@
#
#*************************************************************************
-# define SVL_DLLIMPLEMENTATION (see @ svldllapi.h)
-CDEFS += -DSVL_DLLIMPLEMENTATION
+PRJ=..
+TARGET=prj
-VISIBILITY_HIDDEN=TRUE
+.INCLUDE : settings.mk
+
+.IF "$(VERBOSE)"!=""
+VERBOSEFLAG :=
+.ELSE
+VERBOSEFLAG := -s
+.ENDIF
+
+all:
+ cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog
diff --git a/sot/qa/complex/olesimplestorage/makefile.mk b/sot/qa/complex/olesimplestorage/makefile.mk
deleted file mode 100644
index cf3facf94d66..000000000000
--- a/sot/qa/complex/olesimplestorage/makefile.mk
+++ /dev/null
@@ -1,62 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
-nothing .PHONY:
-.ELSE
-
-PRJ = ../../..
-PRJNAME = sot
-TARGET = qa_complex_olesimplestorage
-
-.IF "$(OOO_JUNIT_JAR)" != ""
-PACKAGE = complex/olesimplestorage
-JAVATESTFILES = \
- OLESimpleStorageUnitTest.java
-
-JAVAFILES = $(JAVATESTFILES) \
- OLESimpleStorageTest.java \
- Test01.java \
- TestHelper.java
-
-JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar jurt.jar
-EXTRAJARFILES = $(OOO_JUNIT_JAR)
-.END
-
-.INCLUDE: settings.mk
-.INCLUDE: target.mk
-.INCLUDE: installationtest.mk
-
-ALLTAR : javatest
-
-.END
-
-
-
-
-
-
diff --git a/sot/source/base/exchange.cxx b/sot/source/base/exchange.cxx
index d860c8b0f572..57e65862aea2 100644
--- a/sot/source/base/exchange.cxx
+++ b/sot/source/base/exchange.cxx
@@ -237,11 +237,11 @@ static List& InitFormats_Impl()
|*
|* Beschreibung CLIP.SDW
*************************************************************************/
-ULONG SotExchange::RegisterFormatName( const String& rName )
+sal_uLong SotExchange::RegisterFormatName( const String& rName )
{
const DataFlavorRepresentation *pFormatArray_Impl = FormatArray_Impl::get();
// teste zuerst die Standard - Name
- ULONG i, nMax = SOT_FORMAT_FILE_LIST;
+ sal_uLong i, nMax = SOT_FORMAT_FILE_LIST;
for( i = SOT_FORMAT_STRING; i <= nMax; ++i )
if( COMPARE_EQUAL == rName.CompareToAscii( pFormatArray_Impl[ i ].pName ) )
return i;
@@ -277,11 +277,11 @@ ULONG SotExchange::RegisterFormatName( const String& rName )
return nMax + SOT_FORMATSTR_ID_USER_END + 1;
}
-ULONG SotExchange::RegisterFormatMimeType( const String& rMimeType )
+sal_uLong SotExchange::RegisterFormatMimeType( const String& rMimeType )
{
const DataFlavorRepresentation *pFormatArray_Impl = FormatArray_Impl::get();
// teste zuerst die Standard - Name
- ULONG i, nMax = SOT_FORMAT_FILE_LIST;
+ sal_uLong i, nMax = SOT_FORMAT_FILE_LIST;
for( i = SOT_FORMAT_STRING; i <= nMax; ++i )
if( rMimeType.EqualsAscii( pFormatArray_Impl[ i ].pMimeType ) )
return i;
@@ -318,9 +318,9 @@ ULONG SotExchange::RegisterFormatMimeType( const String& rMimeType )
|*
|* Beschreibung CLIP.SDW
*************************************************************************/
-ULONG SotExchange::RegisterFormat( const DataFlavor& rFlavor )
+sal_uLong SotExchange::RegisterFormat( const DataFlavor& rFlavor )
{
- ULONG nRet = GetFormat( rFlavor );
+ sal_uLong nRet = GetFormat( rFlavor );
if( !nRet )
{
@@ -338,7 +338,7 @@ ULONG SotExchange::RegisterFormat( const DataFlavor& rFlavor )
|*
*************************************************************************/
-sal_Bool SotExchange::GetFormatDataFlavor( ULONG nFormat, DataFlavor& rFlavor )
+sal_Bool SotExchange::GetFormatDataFlavor( sal_uLong nFormat, DataFlavor& rFlavor )
{
sal_Bool bRet;
@@ -376,11 +376,11 @@ sal_Bool SotExchange::GetFormatDataFlavor( ULONG nFormat, DataFlavor& rFlavor )
/*************************************************************************
|*
-|* SotExchange::GetFormatMimeType( ULONG nFormat )
+|* SotExchange::GetFormatMimeType( sal_uLong nFormat )
|*
*************************************************************************/
-String SotExchange::GetFormatMimeType( ULONG nFormat )
+String SotExchange::GetFormatMimeType( sal_uLong nFormat )
{
String sMimeType;
if( SOT_FORMATSTR_ID_USER_END >= nFormat )
@@ -406,10 +406,10 @@ String SotExchange::GetFormatMimeType( ULONG nFormat )
|*
*************************************************************************/
-ULONG SotExchange::GetFormatIdFromMimeType( const String& rMimeType )
+sal_uLong SotExchange::GetFormatIdFromMimeType( const String& rMimeType )
{
const DataFlavorRepresentation *pFormatArray_Impl = FormatArray_Impl::get();
- ULONG i, nMax = SOT_FORMAT_FILE_LIST;
+ sal_uLong i, nMax = SOT_FORMAT_FILE_LIST;
for( i = SOT_FORMAT_STRING; i <= nMax; ++i )
if( rMimeType.EqualsAscii( pFormatArray_Impl[ i ].pMimeType ) )
return i;
@@ -443,12 +443,12 @@ ULONG SotExchange::GetFormatIdFromMimeType( const String& rMimeType )
|*
|* Beschreibung CLIP.SDW
*************************************************************************/
-ULONG SotExchange::GetFormat( const DataFlavor& rFlavor )
+sal_uLong SotExchange::GetFormat( const DataFlavor& rFlavor )
{
// teste zuerst die Standard - Name
const ::rtl::OUString& rMimeType = rFlavor.MimeType;
const String aMimeType( rMimeType );
- ULONG i, nMax = SOT_FORMAT_FILE_LIST;
+ sal_uLong i, nMax = SOT_FORMAT_FILE_LIST;
const DataFlavorRepresentation *pFormatArray_Impl = FormatArray_Impl::get();
for( i = SOT_FORMAT_STRING; i <= nMax; ++i )
if( aMimeType.EqualsAscii( pFormatArray_Impl[ i ].pMimeType ) )
@@ -482,7 +482,7 @@ ULONG SotExchange::GetFormat( const DataFlavor& rFlavor )
|*
|* Beschreibung CLIP.SDW
*************************************************************************/
-String SotExchange::GetFormatName( ULONG nFormat )
+String SotExchange::GetFormatName( sal_uLong nFormat )
{
DataFlavor aFlavor;
String aRet;
@@ -493,7 +493,7 @@ String SotExchange::GetFormatName( ULONG nFormat )
return aRet;
}
-BOOL SotExchange::IsInternal( const SvGlobalName& rName )
+sal_Bool SotExchange::IsInternal( const SvGlobalName& rName )
{
if ( rName == SvGlobalName(SO3_SW_CLASSID_60) ||
rName == SvGlobalName(SO3_SC_CLASSID_60) ||
@@ -503,6 +503,6 @@ BOOL SotExchange::IsInternal( const SvGlobalName& rName )
rName == SvGlobalName(SO3_SM_CLASSID_60) ||
rName == SvGlobalName(SO3_SWWEB_CLASSID_60) ||
rName == SvGlobalName(SO3_SWGLOB_CLASSID_60) )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
diff --git a/sot/source/base/factory.cxx b/sot/source/base/factory.cxx
index 3c034a980578..d04a7917b0b4 100644
--- a/sot/source/base/factory.cxx
+++ b/sot/source/base/factory.cxx
@@ -96,10 +96,10 @@ void SotFactory::DeInit()
aStr += " Count: ";
aStr += p->GetRefCount();
DBG_TRACE( "\tReferences:" );
- p->TestObjRef( FALSE );
+ p->TestObjRef( sal_False );
#ifdef TEST_INVARIANT
DBG_TRACE( "\tInvariant:" );
- p->TestInvariant( TRUE );
+ p->TestInvariant( sal_True );
#endif
p = pObjList->Next();
}
@@ -129,7 +129,7 @@ void SotFactory::DeInit()
if( pSotData->pDataFlavorList )
{
- for( ULONG i = 0, nMax = pSotData->pDataFlavorList->Count(); i < nMax; i++ )
+ for( sal_uLong i = 0, nMax = pSotData->pDataFlavorList->Count(); i < nMax; i++ )
delete (::com::sun::star::datatransfer::DataFlavor*) pSotData->pDataFlavorList->GetObject( i );
delete pSotData->pDataFlavorList;
pSotData->pDataFlavorList = NULL;
@@ -194,7 +194,7 @@ SotFactory::~SotFactory()
|*
|* Beschreibung Zugriffsmethoden auf SotData_Impl-Daten
*************************************************************************/
-UINT32 SotFactory::GetSvObjectCount()
+sal_uInt32 SotFactory::GetSvObjectCount()
{
return SOTDATA()->nSvObjCount;
}
@@ -295,10 +295,10 @@ void SotFactory::TestInvariant()
SotData_Impl * pSotData = SOTDATA();
if( pSotData->pObjectList )
{
- ULONG nCount = pSotData->pObjectList->Count();
- for( ULONG i = 0; i < nCount ; i++ )
+ sal_uLong nCount = pSotData->pObjectList->Count();
+ for( sal_uLong i = 0; i < nCount ; i++ )
{
- pSotData->pObjectList->GetObject( i )->TestInvariant( FALSE );
+ pSotData->pObjectList->GetObject( i )->TestInvariant( sal_False );
}
}
#endif
@@ -349,17 +349,17 @@ void * SotFactory::CastAndAddRef
|*
|* Beschreibung
*************************************************************************/
-BOOL SotFactory::Is( const SotFactory * pSuperCl ) const
+sal_Bool SotFactory::Is( const SotFactory * pSuperCl ) const
{
if( this == pSuperCl )
- return TRUE;
+ return sal_True;
- for( USHORT i = 0; i < nSuperCount; i++ )
+ for( sal_uInt16 i = 0; i < nSuperCount; i++ )
{
if( pSuperClasses[ i ]->Is( pSuperCl ) )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
diff --git a/sot/source/base/filelist.cxx b/sot/source/base/filelist.cxx
index 048f19e65bd7..345e6ddec84b 100644
--- a/sot/source/base/filelist.cxx
+++ b/sot/source/base/filelist.cxx
@@ -61,8 +61,8 @@ FileList::~FileList()
void FileList::ClearAll( void )
{
// Strings in der Liste loeschen
- ULONG nCount = pStrList->Count();
- for( ULONG i = 0 ; i < nCount ; i++ )
+ sal_uLong nCount = pStrList->Count();
+ for( sal_uLong i = 0 ; i < nCount ; i++ )
delete pStrList->GetObject( i );
// Liste loeschen
@@ -81,8 +81,8 @@ FileList& FileList::operator=( const FileList& rFileList )
*pStrList = *rFileList.pStrList;
// Strings in der Liste kopieren
- ULONG nCount = pStrList->Count();
- for( ULONG i = 0 ; i < nCount ; i++ )
+ sal_uLong nCount = pStrList->Count();
+ for( sal_uLong i = 0 ; i < nCount ; i++ )
pStrList->Replace( new String( *rFileList.pStrList->GetObject( i ) ), i );
return *this;
@@ -94,7 +94,7 @@ FileList& FileList::operator=( const FileList& rFileList )
|*
\*************************************************************************/
-ULONG FileList::GetFormat()
+sal_uLong FileList::GetFormat()
{
return FORMAT_FILE_LIST;
}
@@ -184,7 +184,7 @@ void FileList::AppendFile( const String& rStr )
pStrList->Insert( new String( rStr ) , pStrList->Count() );
}
-String FileList::GetFile( ULONG i ) const
+String FileList::GetFile( sal_uLong i ) const
{
String aStr;
if( i < pStrList->Count() )
@@ -192,7 +192,7 @@ String FileList::GetFile( ULONG i ) const
return aStr;
}
-ULONG FileList::Count( void ) const
+sal_uLong FileList::Count( void ) const
{
return pStrList->Count();
}
diff --git a/sot/source/base/formats.cxx b/sot/source/base/formats.cxx
index 58b08fb53f18..f04d5d439bdc 100644
--- a/sot/source/base/formats.cxx
+++ b/sot/source/base/formats.cxx
@@ -46,9 +46,9 @@ using namespace::com::sun::star::datatransfer;
struct SotAction_Impl
{
- ULONG nFormatId; // Clipboard Id
- USHORT nAction; // Action Id
- BYTE nContextCheckId; // additional check of content in clipboard
+ sal_uLong nFormatId; // Clipboard Id
+ sal_uInt16 nAction; // Action Id
+ sal_uInt8 nContextCheckId; // additional check of content in clipboard
};
@@ -68,7 +68,7 @@ struct SotAction_Impl
struct SotDestinationEntry_Impl
{
- USHORT nDestination;
+ sal_uInt16 nDestination;
const SotAction_Impl* aDefaultActions;
const SotAction_Impl* aMoveActions;
const SotAction_Impl* aCopyActions;
@@ -1283,7 +1283,7 @@ static SotDestinationEntry_Impl __READONLY_DATA aDestinationArray[] = \
// - new style GetExchange methods -
// ---------------------------------
-sal_Bool IsFormatSupported( const DataFlavorExVector& rDataFlavorExVector, ULONG nId )
+sal_Bool IsFormatSupported( const DataFlavorExVector& rDataFlavorExVector, sal_uLong nId )
{
DataFlavorExVector::iterator aIter( ( (DataFlavorExVector&) rDataFlavorExVector ).begin() );
DataFlavorExVector::iterator aEnd( ( (DataFlavorExVector&) rDataFlavorExVector ).end() );
@@ -1303,14 +1303,14 @@ sal_Bool IsFormatSupported( const DataFlavorExVector& rDataFlavorExVector, ULONG
// -----------------------------------------------------------------------------
-static BOOL CheckTransferableContext_Impl( const Reference< XTransferable >* pxTransferable, const SotAction_Impl&
+static sal_Bool CheckTransferableContext_Impl( const Reference< XTransferable >* pxTransferable, const SotAction_Impl&
#ifdef WNT
rEntry
#endif
)
{
DataFlavor aFlavor;
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
try
{
@@ -1323,7 +1323,7 @@ rEntry
{
case FILEGRPDSC_ONLY_URL:
{
- bRet = FALSE;
+ bRet = sal_False;
if( SotExchange::GetFormatDataFlavor( SOT_FORMATSTR_ID_FILECONTENT, aFlavor ) &&
(*pxTransferable)->isDataFlavorSupported( aFlavor ) &&
@@ -1367,11 +1367,11 @@ rEntry
// -----------------------------------------------------------------------------
-static USHORT GetTransferableAction_Impl(
+static sal_uInt16 GetTransferableAction_Impl(
const DataFlavorExVector& rDataFlavorExVector,
const SotAction_Impl* pArray,
- ULONG& rFormat,
- ULONG nOnlyTestFormat,
+ sal_uLong& rFormat,
+ sal_uLong nOnlyTestFormat,
const Reference< XTransferable >* pxTransferable )
{
try
@@ -1380,11 +1380,11 @@ static USHORT GetTransferableAction_Impl(
{
DataFlavor aFlavor;
const SotAction_Impl* pArrayStart = pArray;
- ULONG nId = pArray->nFormatId;
+ sal_uLong nId = pArray->nFormatId;
#if OSL_DEBUG_LEVEL > 1
// used for testing a specific format - change in the debugger the value
- static ULONG nChkFormat = 0;
+ static sal_uLong nChkFormat = 0;
if( nChkFormat )
{
for( ; 0xffff != pArray->nFormatId &&
@@ -1454,13 +1454,13 @@ static USHORT GetTransferableAction_Impl(
// -----------------------------------------------------------------------------
-USHORT SotExchange::GetExchangeAction( const DataFlavorExVector& rDataFlavorExVector,
- USHORT nDestination,
- USHORT nSourceOptions,
- USHORT nUserAction,
- ULONG& rFormat,
- USHORT& rDefaultAction,
- ULONG nOnlyTestFormat,
+sal_uInt16 SotExchange::GetExchangeAction( const DataFlavorExVector& rDataFlavorExVector,
+ sal_uInt16 nDestination,
+ sal_uInt16 nSourceOptions,
+ sal_uInt16 nUserAction,
+ sal_uLong& rFormat,
+ sal_uInt16& rDefaultAction,
+ sal_uLong nOnlyTestFormat,
const Reference< XTransferable >* pxTransferable )
{
// hier wird jetzt die oben definierte Tabelle "implementiert"
@@ -1568,11 +1568,11 @@ USHORT SotExchange::GetExchangeAction( const DataFlavorExVector& rDataFlavorExVe
// -----------------------------------------------------------------------------
-USHORT SotExchange::GetExchangeAction(
+sal_uInt16 SotExchange::GetExchangeAction(
const Reference< XTransferable >& rxTransferable,
- USHORT nDestination, USHORT nSourceOptions,
- USHORT nUserAction, ULONG& rFormat,
- USHORT& rDefaultAction, ULONG nOnlyTestFormat )
+ sal_uInt16 nDestination, sal_uInt16 nSourceOptions,
+ sal_uInt16 nUserAction, sal_uLong& rFormat,
+ sal_uInt16& rDefaultAction, sal_uLong nOnlyTestFormat )
{
DataFlavorExVector aVector;
@@ -1625,9 +1625,9 @@ USHORT SotExchange::GetExchangeAction(
nOnlyTestFormat, &rxTransferable ) );
}
-USHORT SotExchange::IsChart( const SvGlobalName& rName )
+sal_uInt16 SotExchange::IsChart( const SvGlobalName& rName )
{
- USHORT nRet=0;
+ sal_uInt16 nRet=0;
// if ( rName == SvGlobalName( SO3_SCH_CLASSID_8 ) )
// nRet = SOFFICE_FILEFORMAT_8;
// else
@@ -1643,9 +1643,9 @@ USHORT SotExchange::IsChart( const SvGlobalName& rName )
return nRet;
}
-USHORT SotExchange::IsMath( const SvGlobalName& rName )
+sal_uInt16 SotExchange::IsMath( const SvGlobalName& rName )
{
- USHORT nRet=0;
+ sal_uInt16 nRet=0;
// if ( rName == SvGlobalName( SO3_SM_CLASSID_8 ) )
// nRet = SOFFICE_FILEFORMAT_8;
// else
diff --git a/sot/source/base/makefile.mk b/sot/source/base/makefile.mk
deleted file mode 100644
index 861b7cc5969b..000000000000
--- a/sot/source/base/makefile.mk
+++ /dev/null
@@ -1,58 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=sot
-TARGET=base
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-.IF "$(COM)"=="GCC"
-NOOPTFILES= \
- $(SLO)$/exchange.obj
-.ENDIF # GCC
-
-SLOFILES= \
- $(SLO)$/factory.obj \
- $(SLO)$/object.obj \
- $(SLO)$/exchange.obj \
- $(SLO)$/filelist.obj \
- $(SLO)$/formats.obj
-
-EXCEPTIONSFILES= \
- $(SLO)$/formats.obj
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sot/source/base/object.cxx b/sot/source/base/object.cxx
index 70792a325d31..8c0bb0346605 100644
--- a/sot/source/base/object.cxx
+++ b/sot/source/base/object.cxx
@@ -59,7 +59,7 @@ SO2_IMPL_INVARIANT(SotObject)
|*
|* Beschreibung:
*************************************************************************/
-void SotObject::TestMemberObjRef( BOOL /*bFree*/ )
+void SotObject::TestMemberObjRef( sal_Bool /*bFree*/ )
{
}
@@ -69,7 +69,7 @@ void SotObject::TestMemberObjRef( BOOL /*bFree*/ )
|* Beschreibung:
*************************************************************************/
#ifdef TEST_INVARIANT
-void SotObject::TestMemberInvariant( BOOL /*bPrint*/ )
+void SotObject::TestMemberInvariant( sal_Bool /*bPrint*/ )
{
}
#endif
@@ -82,9 +82,9 @@ void SotObject::TestMemberInvariant( BOOL /*bPrint*/ )
SotObject::SotObject()
: nStrongLockCount( 0 )
, nOwnerLockCount( 0 )
- , bOwner ( TRUE )
- , bSVObject ( FALSE )
- , bInClose ( FALSE )
+ , bOwner ( sal_True )
+ , bSVObject ( sal_False )
+ , bInClose ( sal_False )
{
SotFactory::IncSvObjectCount( this );
}
@@ -127,10 +127,10 @@ void* SotObject::CastAndAddRef( const SotFactory * pFact )
}
//=========================================================================
-USHORT SotObject::Lock( BOOL bLock )
+sal_uInt16 SotObject::Lock( sal_Bool bLock )
{
SotObjectRef xHoldAlive( this );
- USHORT nRet;
+ sal_uInt16 nRet;
if( bLock )
{
AddRef();
@@ -151,7 +151,7 @@ USHORT SotObject::Lock( BOOL bLock )
//=========================================================================
void SotObject::OwnerLock
(
- BOOL bLock /* TRUE, lock. FALSE, unlock. */
+ sal_Bool bLock /* sal_True, lock. sal_False, unlock. */
)
/* [Beschreibung]
@@ -187,23 +187,23 @@ void SotObject::RemoveOwnerLock()
}
//=========================================================================
-BOOL SotObject::DoClose()
+sal_Bool SotObject::DoClose()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !bInClose )
{
SotObjectRef xHoldAlive( this );
- bInClose = TRUE;
+ bInClose = sal_True;
bRet = Close();
- bInClose = FALSE;
+ bInClose = sal_False;
}
return bRet;
}
//=========================================================================
-BOOL SotObject::Close()
+sal_Bool SotObject::Close()
{
- return TRUE;
+ return sal_True;
}
diff --git a/sot/source/sdstor/makefile.mk b/sot/source/sdstor/makefile.mk
deleted file mode 100644
index f5c6d81548c9..000000000000
--- a/sot/source/sdstor/makefile.mk
+++ /dev/null
@@ -1,64 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=sot
-TARGET=sdstor
-
-# --- Settings -----------------------------------------------------
-
-ENABLE_EXCEPTIONS=true
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(SLO)$/unostorageholder.obj \
- $(SLO)$/ucbstorage.obj \
- $(SLO)$/stg.obj \
- $(SLO)$/stgcache.obj \
- $(SLO)$/stgstrms.obj \
- $(SLO)$/stgelem.obj \
- $(SLO)$/stgio.obj \
- $(SLO)$/stgole.obj \
- $(SLO)$/stgdir.obj \
- $(SLO)$/stgavl.obj \
- $(SLO)$/storinfo.obj \
- $(SLO)$/storage.obj
-
-EXCEPTIONSFILES= \
- $(SLO)$/unostorageholder.obj\
- $(SLO)$/ucbstorage.obj\
- $(SLO)$/storage.obj
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sot/source/sdstor/stg.cxx b/sot/source/sdstor/stg.cxx
index c057b2d0aac0..bf1490447b08 100644
--- a/sot/source/sdstor/stg.cxx
+++ b/sot/source/sdstor/stg.cxx
@@ -66,7 +66,7 @@ TYPEINIT1( BaseStorageStream, StorageBase );
TYPEINIT1( BaseStorage, StorageBase );
StorageBase::StorageBase()
- : m_bAutoCommit( FALSE )
+ : m_bAutoCommit( sal_False )
{
m_nMode = STREAM_READ;
m_nError = SVSTREAM_OK;
@@ -79,14 +79,14 @@ StorageBase::~StorageBase()
// The following three methods are declared as const, since they
// may be called from within a const method.
-ULONG StorageBase::GetError() const
+sal_uLong StorageBase::GetError() const
{
- ULONG n = m_nError;
+ sal_uLong n = m_nError;
((StorageBase*) this)->m_nError = SVSTREAM_OK;
return n;
}
-void StorageBase::SetError( ULONG n ) const
+void StorageBase::SetError( sal_uLong n ) const
{
if( !m_nError )
((StorageBase*) this)->m_nError = n;
@@ -133,20 +133,20 @@ OLEStorageBase::~OLEStorageBase()
// Validate the instance for I/O
-BOOL OLEStorageBase::Validate_Impl( BOOL bWrite ) const
+sal_Bool OLEStorageBase::Validate_Impl( sal_Bool bWrite ) const
{
if( pEntry
&& !pEntry->bInvalid
&& ( !bWrite || !pEntry->bDirect || ( nStreamMode & STREAM_WRITE ) ) )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
-BOOL OLEStorageBase::ValidateMode_Impl( StreamMode m, StgDirEntry* p ) const
+sal_Bool OLEStorageBase::ValidateMode_Impl( StreamMode m, StgDirEntry* p ) const
{
if( m == INTERNAL_MODE )
- return TRUE;
- USHORT nCurMode = ( p && p->nRefCnt ) ? p->nMode : 0xFFFF;
+ return sal_True;
+ sal_uInt16 nCurMode = ( p && p->nRefCnt ) ? p->nMode : 0xFFFF;
if( ( m & 3 ) == STREAM_READ )
{
// only SHARE_DENYWRITE or SHARE_DENYALL allowed
@@ -154,7 +154,7 @@ BOOL OLEStorageBase::ValidateMode_Impl( StreamMode m, StgDirEntry* p ) const
&& ( nCurMode & STREAM_SHARE_DENYWRITE ) )
|| ( ( m & STREAM_SHARE_DENYALL )
&& ( nCurMode & STREAM_SHARE_DENYALL ) ) )
- return TRUE;
+ return sal_True;
}
else
{
@@ -163,9 +163,9 @@ BOOL OLEStorageBase::ValidateMode_Impl( StreamMode m, StgDirEntry* p ) const
// the commit may fail
if( ( m & STREAM_SHARE_DENYALL )
&& ( nCurMode & STREAM_SHARE_DENYALL ) )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -199,18 +199,18 @@ StorageStream::~StorageStream()
pEntry->Commit();
}
-BOOL StorageStream::Equals( const BaseStorageStream& rStream ) const
+sal_Bool StorageStream::Equals( const BaseStorageStream& rStream ) const
{
const StorageStream* pOther = PTR_CAST( StorageStream, &rStream );
return pOther && ( pOther->pEntry == pEntry );
}
-ULONG StorageStream::Read( void* pData, ULONG nSize )
+sal_uLong StorageStream::Read( void* pData, sal_uLong nSize )
{
if( Validate() )
{
pEntry->Seek( nPos );
- nSize = pEntry->Read( pData, (INT32) nSize );
+ nSize = pEntry->Read( pData, (sal_Int32) nSize );
pIo->MoveError( *this );
nPos += nSize;
}
@@ -219,12 +219,12 @@ ULONG StorageStream::Read( void* pData, ULONG nSize )
return nSize;
}
-ULONG StorageStream::Write( const void* pData, ULONG nSize )
+sal_uLong StorageStream::Write( const void* pData, sal_uLong nSize )
{
- if( Validate( TRUE ) )
+ if( Validate( sal_True ) )
{
pEntry->Seek( nPos );
- nSize = pEntry->Write( pData, (INT32) nSize );
+ nSize = pEntry->Write( pData, (sal_Int32) nSize );
pIo->MoveError( *this );
nPos += nSize;
}
@@ -233,7 +233,7 @@ ULONG StorageStream::Write( const void* pData, ULONG nSize )
return nSize;
}
-ULONG StorageStream::Seek( ULONG n )
+sal_uLong StorageStream::Seek( sal_uLong n )
{
if( Validate() )
return nPos = pEntry->Seek( n );
@@ -247,26 +247,26 @@ void StorageStream::Flush()
Commit();
}
-BOOL StorageStream::SetSize( ULONG nNewSize )
+sal_Bool StorageStream::SetSize( sal_uLong nNewSize )
{
- if( Validate( TRUE ) )
+ if( Validate( sal_True ) )
{
- BOOL b = pEntry->SetSize( (INT32) nNewSize );
+ sal_Bool b = pEntry->SetSize( (sal_Int32) nNewSize );
pIo->MoveError( *this );
return b;
}
else
- return FALSE;
+ return sal_False;
}
-BOOL StorageStream::Commit()
+sal_Bool StorageStream::Commit()
{
if( !Validate() )
- return FALSE;
+ return sal_False;
if( !( m_nMode & STREAM_WRITE ) )
{
SetError( SVSTREAM_ACCESS_DENIED );
- return FALSE;
+ return sal_False;
}
else
{
@@ -276,22 +276,22 @@ BOOL StorageStream::Commit()
}
}
-BOOL StorageStream::Revert()
+sal_Bool StorageStream::Revert()
{
pEntry->Revert();
pIo->MoveError( *this );
return Good();
}
-BOOL StorageStream::CopyTo( BaseStorageStream* pDest )
+sal_Bool StorageStream::CopyTo( BaseStorageStream* pDest )
{
- if( !Validate() || !pDest->Validate( TRUE ) || Equals( *pDest ) )
- return FALSE;
+ if( !Validate() || !pDest->Validate( sal_True ) || Equals( *pDest ) )
+ return sal_False;
pEntry->Copy( *pDest );
pDest->Commit();
pIo->MoveError( *this );
SetError( pDest->GetError() );
- return BOOL( Good() && pDest->Good() );
+ return sal_Bool( Good() && pDest->Good() );
}
const SvStream* StorageStream::GetSvStream() const
@@ -299,25 +299,25 @@ const SvStream* StorageStream::GetSvStream() const
return GetSvStream_Impl();
}
-BOOL StorageStream::Validate( BOOL bValidate ) const
+sal_Bool StorageStream::Validate( sal_Bool bValidate ) const
{
- BOOL bRet = Validate_Impl( bValidate );
+ sal_Bool bRet = Validate_Impl( bValidate );
if ( !bRet )
SetError( SVSTREAM_ACCESS_DENIED );
return bRet;
}
-BOOL StorageStream::ValidateMode( StreamMode nMode ) const
+sal_Bool StorageStream::ValidateMode( StreamMode nMode ) const
{
- BOOL bRet = ValidateMode_Impl( nMode, NULL );
+ sal_Bool bRet = ValidateMode_Impl( nMode, NULL );
if ( !bRet )
SetError( SVSTREAM_ACCESS_DENIED );
return bRet;
}
-BOOL StorageStream::ValidateMode( StreamMode nMode, StgDirEntry* p ) const
+sal_Bool StorageStream::ValidateMode( StreamMode nMode, StgDirEntry* p ) const
{
- BOOL bRet = ValidateMode_Impl( nMode, p );
+ sal_Bool bRet = ValidateMode_Impl( nMode, p );
if ( !bRet )
SetError( SVSTREAM_ACCESS_DENIED );
return bRet;
@@ -328,26 +328,26 @@ BOOL StorageStream::ValidateMode( StreamMode nMode, StgDirEntry* p ) const
SvStorageInfo::SvStorageInfo( const StgDirEntry& rE )
{
rE.aEntry.GetName( aName );
- bStorage = BOOL( rE.aEntry.GetType() == STG_STORAGE );
- bStream = BOOL( rE.aEntry.GetType() == STG_STREAM );
+ bStorage = sal_Bool( rE.aEntry.GetType() == STG_STORAGE );
+ bStream = sal_Bool( rE.aEntry.GetType() == STG_STREAM );
nSize = bStorage ? 0 : rE.aEntry.GetSize();
}
/////////////////////////// class Storage ////////////////////////////////
-BOOL Storage::IsStorageFile( const String & rFileName )
+sal_Bool Storage::IsStorageFile( const String & rFileName )
{
StgIo aIo;
if( aIo.Open( rFileName, STREAM_STD_READ ) )
return aIo.Load();
- return FALSE;
+ return sal_False;
}
-BOOL Storage::IsStorageFile( SvStream* pStream )
+sal_Bool Storage::IsStorageFile( SvStream* pStream )
{
StgHeader aHdr;
- ULONG nPos = pStream->Tell();
- BOOL bRet = ( aHdr.Load( *pStream ) && aHdr.Check() );
+ sal_uLong nPos = pStream->Tell();
+ sal_Bool bRet = ( aHdr.Load( *pStream ) && aHdr.Check() );
// It's not a stream error if it is too small for a OLE storage header
if ( pStream->GetErrorCode() == ERRCODE_IO_CANTSEEK )
@@ -361,21 +361,21 @@ BOOL Storage::IsStorageFile( SvStream* pStream )
TYPEINIT1( Storage, BaseStorage );
-Storage::Storage( const String& rFile, StreamMode m, BOOL bDirect )
- : OLEStorageBase( new StgIo, NULL, m_nMode ), aName( rFile ), bIsRoot( FALSE )
+Storage::Storage( const String& rFile, StreamMode m, sal_Bool bDirect )
+ : OLEStorageBase( new StgIo, NULL, m_nMode ), aName( rFile ), bIsRoot( sal_False )
{
- BOOL bTemp = FALSE;
+ sal_Bool bTemp = sal_False;
if( !aName.Len() )
{
// no name = temporary name!
aName = TempFile::CreateTempName();
- bTemp = TRUE;
+ bTemp = sal_True;
}
// the root storage creates the I/O system
m_nMode = m;
if( pIo->Open( aName, m ) )
{
- Init( BOOL( ( m & ( STREAM_TRUNC | STREAM_NOCREATE ) ) == STREAM_TRUNC ) );
+ Init( sal_Bool( ( m & ( STREAM_TRUNC | STREAM_NOCREATE ) ) == STREAM_TRUNC ) );
if( pEntry )
{
pEntry->bDirect = bDirect;
@@ -392,19 +392,19 @@ Storage::Storage( const String& rFile, StreamMode m, BOOL bDirect )
// Create a storage on a given stream.
-Storage::Storage( SvStream& r, BOOL bDirect )
- : OLEStorageBase( new StgIo, NULL, m_nMode ), bIsRoot( FALSE )
+Storage::Storage( SvStream& r, sal_Bool bDirect )
+ : OLEStorageBase( new StgIo, NULL, m_nMode ), bIsRoot( sal_False )
{
m_nMode = STREAM_READ;
if( r.IsWritable() )
m_nMode = STREAM_READ | STREAM_WRITE;
if( r.GetError() == SVSTREAM_OK )
{
- pIo->SetStrm( &r, FALSE );
- ULONG nSize = r.Seek( STREAM_SEEK_TO_END );
+ pIo->SetStrm( &r, sal_False );
+ sal_uLong nSize = r.Seek( STREAM_SEEK_TO_END );
r.Seek( 0L );
// Initializing is OK if the stream is empty
- Init( BOOL( nSize == 0 ) );
+ Init( sal_Bool( nSize == 0 ) );
if( pEntry )
{
pEntry->bDirect = bDirect;
@@ -420,8 +420,8 @@ Storage::Storage( SvStream& r, BOOL bDirect )
}
-Storage::Storage( UCBStorageStream& rStrm, BOOL bDirect )
- : OLEStorageBase( new StgIo, NULL, m_nMode ), bIsRoot( FALSE )
+Storage::Storage( UCBStorageStream& rStrm, sal_Bool bDirect )
+ : OLEStorageBase( new StgIo, NULL, m_nMode ), bIsRoot( sal_False )
{
m_nMode = STREAM_READ;
@@ -435,7 +435,7 @@ Storage::Storage( UCBStorageStream& rStrm, BOOL bDirect )
SvStream* pStream = rStrm.GetModifySvStream();
if ( !pStream )
{
- OSL_ENSURE( FALSE, "UCBStorageStream can not provide SvStream implementation!\n" );
+ OSL_ENSURE( sal_False, "UCBStorageStream can not provide SvStream implementation!\n" );
SetError( SVSTREAM_GENERALERROR );
pEntry = NULL;
return;
@@ -446,10 +446,10 @@ Storage::Storage( UCBStorageStream& rStrm, BOOL bDirect )
pIo->SetStrm( &rStrm );
- ULONG nSize = pStream->Seek( STREAM_SEEK_TO_END );
+ sal_uLong nSize = pStream->Seek( STREAM_SEEK_TO_END );
pStream->Seek( 0L );
// Initializing is OK if the stream is empty
- Init( BOOL( nSize == 0 ) );
+ Init( sal_Bool( nSize == 0 ) );
if( pEntry )
{
pEntry->bDirect = bDirect;
@@ -462,14 +462,14 @@ Storage::Storage( UCBStorageStream& rStrm, BOOL bDirect )
// Perform common code for both ctors above.
-void Storage::Init( BOOL bCreate )
+void Storage::Init( sal_Bool bCreate )
{
pEntry = NULL;
- BOOL bHdrLoaded = FALSE;
- bIsRoot = TRUE;
+ sal_Bool bHdrLoaded = sal_False;
+ bIsRoot = sal_True;
if( pIo->Good() )
{
- ULONG nSize = pIo->GetStrm()->Seek( STREAM_SEEK_TO_END );
+ sal_uLong nSize = pIo->GetStrm()->Seek( STREAM_SEEK_TO_END );
pIo->GetStrm()->Seek( 0L );
if( nSize )
{
@@ -498,7 +498,7 @@ void Storage::Init( BOOL bCreate )
// Internal ctor
Storage::Storage( StgIo* p, StgDirEntry* q, StreamMode m )
- : OLEStorageBase( p, q, m_nMode ), bIsRoot( FALSE )
+ : OLEStorageBase( p, q, m_nMode ), bIsRoot( sal_False )
{
if( q )
q->aEntry.GetName( aName );
@@ -561,7 +561,7 @@ void Storage::FillInfoList( SvStorageInfoList* pList ) const
// Open or create a substorage
-BaseStorage* Storage::OpenUCBStorage( const String& rName, StreamMode m, BOOL bDirect )
+BaseStorage* Storage::OpenUCBStorage( const String& rName, StreamMode m, sal_Bool bDirect )
{
DBG_ERROR("Not supported!");
/*
@@ -572,20 +572,20 @@ BaseStorage* Storage::OpenUCBStorage( const String& rName, StreamMode m, BOOL bD
return OpenStorage( rName, m, bDirect );
}
-BaseStorage* Storage::OpenOLEStorage( const String& rName, StreamMode m, BOOL bDirect )
+BaseStorage* Storage::OpenOLEStorage( const String& rName, StreamMode m, sal_Bool bDirect )
{
return OpenStorage( rName, m, bDirect );
}
-BaseStorage* Storage::OpenStorage( const String& rName, StreamMode m, BOOL bDirect )
+BaseStorage* Storage::OpenStorage( const String& rName, StreamMode m, sal_Bool bDirect )
{
if( !Validate() || !ValidateMode( m ) )
return new Storage( pIo, NULL, m );
- BOOL bSetAutoCommit = FALSE;
+ sal_Bool bSetAutoCommit = sal_False;
if( bDirect && !pEntry->bDirect )
{
- bSetAutoCommit = TRUE;
- bDirect = FALSE;
+ bSetAutoCommit = sal_True;
+ bDirect = sal_False;
}
StgDirEntry* p = pIo->pTOC->Find( *pEntry, rName );
@@ -593,14 +593,14 @@ BaseStorage* Storage::OpenStorage( const String& rName, StreamMode m, BOOL bDire
{
if( !( m & STREAM_NOCREATE ) )
{
- BOOL bTemp = FALSE;
+ sal_Bool bTemp = sal_False;
// create a new storage
String aNewName = rName;
if( !aNewName.Len() )
{
aNewName.AssignAscii( "Temp Stg " );
aNewName.Append( String::CreateFromInt32( ++nTmpCount ) );
- bTemp = TRUE;
+ bTemp = sal_True;
}
p = pIo->pTOC->Create( *pEntry, aNewName, STG_STORAGE );
if( p )
@@ -630,13 +630,13 @@ BaseStorage* Storage::OpenStorage( const String& rName, StreamMode m, BOOL bDire
}
Storage* pStg = new Storage( pIo, p, m );
pIo->MoveError( *pStg );
- if( m & STREAM_WRITE ) pStg->m_bAutoCommit = TRUE;
+ if( m & STREAM_WRITE ) pStg->m_bAutoCommit = sal_True;
return pStg;
}
// Open a stream
-BaseStorageStream* Storage::OpenStream( const String& rName, StreamMode m, BOOL,
+BaseStorageStream* Storage::OpenStream( const String& rName, StreamMode m, sal_Bool,
const ByteString*
#ifdef DBG_UTIL
pB
@@ -648,7 +648,7 @@ pB
if( !Validate() || !ValidateMode( m ) )
return new StorageStream( pIo, NULL, m );
StgDirEntry* p = pIo->pTOC->Find( *pEntry, rName );
- BOOL bTemp = FALSE;
+ sal_Bool bTemp = sal_False;
if( !p )
{
if( !( m & STREAM_NOCREATE ) )
@@ -660,7 +660,7 @@ pB
{
aNewName.AssignAscii( "Temp Strm " );
aNewName.Append( String::CreateFromInt32( ++nTmpCount ) );
- bTemp = TRUE;
+ bTemp = sal_True;
}
p = pIo->pTOC->Create( *pEntry, aNewName, STG_STREAM );
}
@@ -682,50 +682,50 @@ pB
}
StorageStream* pStm = new StorageStream( pIo, p, m );
if( p && !p->bDirect )
- pStm->SetAutoCommit( TRUE );
+ pStm->SetAutoCommit( sal_True );
pIo->MoveError( *pStm );
return pStm;
}
// Delete a stream or substorage by setting the temp bit.
-BOOL Storage::Remove( const String& rName )
+sal_Bool Storage::Remove( const String& rName )
{
- if( !Validate( TRUE ) )
- return FALSE;
+ if( !Validate( sal_True ) )
+ return sal_False;
StgDirEntry* p = pIo->pTOC->Find( *pEntry, rName );
if( p )
{
- p->Invalidate( TRUE );
- return TRUE;
+ p->Invalidate( sal_True );
+ return sal_True;
}
else
{
SetError( SVSTREAM_FILE_NOT_FOUND );
- return FALSE;
+ return sal_False;
}
}
// Rename a storage element
-BOOL Storage::Rename( const String& rOld, const String& rNew )
+sal_Bool Storage::Rename( const String& rOld, const String& rNew )
{
- if( Validate( TRUE ) )
+ if( Validate( sal_True ) )
{
- BOOL b = pIo->pTOC->Rename( *pEntry, rOld, rNew );
+ sal_Bool b = pIo->pTOC->Rename( *pEntry, rOld, rNew );
pIo->MoveError( *this );
return b;
}
else
- return FALSE;
+ return sal_False;
}
// Copy one element
-BOOL Storage::CopyTo( const String& rElem, BaseStorage* pDest, const String& rNew )
+sal_Bool Storage::CopyTo( const String& rElem, BaseStorage* pDest, const String& rNew )
{
- if( !Validate() || !pDest || !pDest->Validate( TRUE ) )
- return FALSE;
+ if( !Validate() || !pDest || !pDest->Validate( sal_True ) )
+ return sal_False;
StgDirEntry* pElem = pIo->pTOC->Find( *pEntry, rElem );
if( pElem )
{
@@ -734,7 +734,7 @@ BOOL Storage::CopyTo( const String& rElem, BaseStorage* pDest, const String& rNe
if( !pElem->IsContained( pDest->pEntry ) )
{
SetError( SVSTREAM_ACCESS_DENIED );
- return FALSE;
+ return sal_False;
}
*/
if( pElem->aEntry.GetType() == STG_STORAGE )
@@ -743,7 +743,7 @@ BOOL Storage::CopyTo( const String& rElem, BaseStorage* pDest, const String& rNe
BaseStorage* p1 = OpenStorage( rElem, INTERNAL_MODE );
BaseStorage* p2 = pDest->OpenOLEStorage( rNew, STREAM_WRITE | STREAM_SHARE_DENYALL, pEntry->bDirect );
- ULONG nTmpErr = p2->GetError();
+ sal_uLong nTmpErr = p2->GetError();
if( !nTmpErr )
{
p2->SetClassId( p1->GetClassId() );
@@ -761,7 +761,7 @@ BOOL Storage::CopyTo( const String& rElem, BaseStorage* pDest, const String& rNe
delete p1;
delete p2;
- return BOOL( Good() && pDest->Good() );
+ return sal_Bool( Good() && pDest->Good() );
}
else
{
@@ -769,7 +769,7 @@ BOOL Storage::CopyTo( const String& rElem, BaseStorage* pDest, const String& rNe
BaseStorageStream* p1 = OpenStream( rElem, INTERNAL_MODE );
BaseStorageStream* p2 = pDest->OpenStream( rNew, STREAM_WRITE | STREAM_SHARE_DENYALL, pEntry->bDirect );
- ULONG nTmpErr = p2->GetError();
+ sal_uLong nTmpErr = p2->GetError();
if( !nTmpErr )
{
p1->CopyTo( p2 );
@@ -786,58 +786,58 @@ BOOL Storage::CopyTo( const String& rElem, BaseStorage* pDest, const String& rNe
delete p1;
delete p2;
- return BOOL( Good() && pDest->Good() );
+ return sal_Bool( Good() && pDest->Good() );
}
}
SetError( SVSTREAM_FILE_NOT_FOUND );
- return FALSE;
+ return sal_False;
}
-BOOL Storage::CopyTo( BaseStorage* pDest ) const
+sal_Bool Storage::CopyTo( BaseStorage* pDest ) const
{
- if( !Validate() || !pDest || !pDest->Validate( TRUE ) || Equals( *pDest ) )
+ if( !Validate() || !pDest || !pDest->Validate( sal_True ) || Equals( *pDest ) )
{
SetError( SVSTREAM_ACCESS_DENIED );
- return FALSE;
+ return sal_False;
}
Storage* pThis = (Storage*) this;
/*
if( !pThis->pEntry->IsContained( pDest->pEntry ) )
{
SetError( SVSTREAM_ACCESS_DENIED );
- return FALSE;
+ return sal_False;
}
*/
pDest->SetClassId( GetClassId() );
pDest->SetDirty();
SvStorageInfoList aList;
FillInfoList( &aList );
- BOOL bRes = TRUE;
- for( USHORT i = 0; i < aList.Count() && bRes; i++ )
+ sal_Bool bRes = sal_True;
+ for( sal_uInt16 i = 0; i < aList.Count() && bRes; i++ )
{
SvStorageInfo& rInfo = aList.GetObject( i );
bRes = pThis->CopyTo( rInfo.GetName(), pDest, rInfo.GetName() );
}
if( !bRes )
SetError( pDest->GetError() );
- return BOOL( Good() && pDest->Good() );
+ return sal_Bool( Good() && pDest->Good() );
}
// Move one element
-BOOL Storage::MoveTo( const String& rElem, BaseStorage* pODest, const String& rNew )
+sal_Bool Storage::MoveTo( const String& rElem, BaseStorage* pODest, const String& rNew )
{
- if( !Validate() || !pODest || !pODest->Validate( TRUE ) || Equals( *pODest ) )
+ if( !Validate() || !pODest || !pODest->Validate( sal_True ) || Equals( *pODest ) )
{
SetError( SVSTREAM_ACCESS_DENIED );
- return FALSE;
+ return sal_False;
}
StgDirEntry* pElem = pIo->pTOC->Find( *pEntry, rElem );
if( pElem )
{
// Simplest case: both storages share the same file
- BOOL bRes;
+ sal_Bool bRes;
Storage *pOther = PTR_CAST( Storage, pODest );
if( pOther && pIo == pOther->pIo && rElem == rNew )
{
@@ -848,14 +848,14 @@ BOOL Storage::MoveTo( const String& rElem, BaseStorage* pODest, const String& rN
{
// cyclic move
SetError( SVSTREAM_ACCESS_DENIED );
- return FALSE;
+ return sal_False;
}
bRes = pIo->pTOC->Move( *pEntry, *pDest->pEntry, rNew );
if( !bRes )
{
pIo->MoveError( *this );
pDest->pIo->MoveError( *pDest );
- ULONG nErr = GetError();
+ sal_uLong nErr = GetError();
if( !nErr )
nErr = pDest->GetError();
SetError( nErr );
@@ -873,51 +873,51 @@ BOOL Storage::MoveTo( const String& rElem, BaseStorage* pODest, const String& rN
return bRes;
}
SetError( SVSTREAM_FILE_NOT_FOUND );
- return FALSE;
+ return sal_False;
}
-BOOL Storage::IsStorage( const String& rName ) const
+sal_Bool Storage::IsStorage( const String& rName ) const
{
if( Validate() )
{
StgDirEntry* p = pIo->pTOC->Find( *pEntry, rName );
if( p )
- return BOOL( p->aEntry.GetType() == STG_STORAGE );
+ return sal_Bool( p->aEntry.GetType() == STG_STORAGE );
}
- return FALSE;
+ return sal_False;
}
-BOOL Storage::IsStream( const String& rName ) const
+sal_Bool Storage::IsStream( const String& rName ) const
{
if( Validate() )
{
StgDirEntry* p = pIo->pTOC->Find( *pEntry, rName );
if( p )
- return BOOL( p->aEntry.GetType() == STG_STREAM );
+ return sal_Bool( p->aEntry.GetType() == STG_STREAM );
}
- return FALSE;
+ return sal_False;
}
-BOOL Storage::IsContained( const String& rName ) const
+sal_Bool Storage::IsContained( const String& rName ) const
{
if( Validate() )
- return BOOL( pIo->pTOC->Find( *pEntry, rName ) != NULL );
+ return sal_Bool( pIo->pTOC->Find( *pEntry, rName ) != NULL );
else
- return FALSE;
+ return sal_False;
}
// Commit all sub-elements within this storage. If this is
// the root, commit the FAT, the TOC and the header as well.
-BOOL Storage::Commit()
+sal_Bool Storage::Commit()
{
- BOOL bRes = TRUE;
+ sal_Bool bRes = sal_True;
if( !Validate() )
- return FALSE;
+ return sal_False;
if( !( m_nMode & STREAM_WRITE ) )
{
SetError( SVSTREAM_ACCESS_DENIED );
- return FALSE;
+ return sal_False;
}
else
{
@@ -936,9 +936,9 @@ BOOL Storage::Commit()
return bRes;
}
-BOOL Storage::Revert()
+sal_Bool Storage::Revert()
{
- return TRUE;
+ return sal_True;
}
///////////////////////////// OLE Support ////////////////////////////////
@@ -946,16 +946,16 @@ BOOL Storage::Revert()
// Set the storage type
void Storage::SetClass( const SvGlobalName & rClass,
- ULONG nOriginalClipFormat,
+ sal_uLong nOriginalClipFormat,
const String & rUserTypeName )
{
- if( Validate( TRUE ) )
+ if( Validate( sal_True ) )
{
// set the class name in the root entry
pEntry->aEntry.SetClassId( (const ClsId&) rClass.GetCLSID() );
pEntry->SetDirty();
// then create the streams
- StgCompObjStream aCompObj( *this, TRUE );
+ StgCompObjStream aCompObj( *this, sal_True );
aCompObj.GetClsId() = (const ClsId&) rClass.GetCLSID();
aCompObj.GetCbFormat() = nOriginalClipFormat;
aCompObj.GetUserName() = rUserTypeName;
@@ -973,14 +973,14 @@ void Storage::SetClass( const SvGlobalName & rClass,
}
void Storage::SetConvertClass( const SvGlobalName & rConvertClass,
- ULONG nOriginalClipFormat,
+ sal_uLong nOriginalClipFormat,
const String & rUserTypeName )
{
- if( Validate( TRUE ) )
+ if( Validate( sal_True ) )
{
SetClass( rConvertClass, nOriginalClipFormat, rUserTypeName );
// plus the convert flag:
- StgOleStream aOle( *this, TRUE );
+ StgOleStream aOle( *this, sal_True );
aOle.GetFlags() |= 4;
if( !aOle.Store() )
SetError( aOle.GetError() );
@@ -989,7 +989,7 @@ void Storage::SetConvertClass( const SvGlobalName & rConvertClass,
SvGlobalName Storage::GetClassName()
{
- StgCompObjStream aCompObj( *this, FALSE );
+ StgCompObjStream aCompObj( *this, sal_False );
if( aCompObj.Load() )
return SvGlobalName( (const CLSID&) aCompObj.GetClsId() );
pIo->ResetError();
@@ -1000,9 +1000,9 @@ SvGlobalName Storage::GetClassName()
return SvGlobalName();
}
-ULONG Storage::GetFormat()
+sal_uLong Storage::GetFormat()
{
- StgCompObjStream aCompObj( *this, FALSE );
+ StgCompObjStream aCompObj( *this, sal_False );
if( aCompObj.Load() )
return aCompObj.GetCbFormat();
pIo->ResetError();
@@ -1011,26 +1011,26 @@ ULONG Storage::GetFormat()
String Storage::GetUserName()
{
- StgCompObjStream aCompObj( *this, FALSE );
+ StgCompObjStream aCompObj( *this, sal_False );
if( aCompObj.Load() )
return aCompObj.GetUserName();
pIo->ResetError();
return String();
}
-BOOL Storage::ShouldConvert()
+sal_Bool Storage::ShouldConvert()
{
- StgOleStream aOle( *this, FALSE );
+ StgOleStream aOle( *this, sal_False );
if( aOle.Load() )
- return BOOL( ( aOle.GetFlags() & 4 ) != 0 );
+ return sal_Bool( ( aOle.GetFlags() & 4 ) != 0 );
else
{
pIo->ResetError();
- return FALSE;
+ return sal_False;
}
}
-BOOL Storage::ValidateFAT()
+sal_Bool Storage::ValidateFAT()
{
Link aLink = StgIo::GetErrorLink();
ErrCode nErr = pIo->ValidateFATs();
@@ -1058,31 +1058,31 @@ const SvStream* Storage::GetSvStream() const
return GetSvStream_Impl();
}
-BOOL Storage::Validate( BOOL bValidate ) const
+sal_Bool Storage::Validate( sal_Bool bValidate ) const
{
- BOOL bRet = Validate_Impl( bValidate );
+ sal_Bool bRet = Validate_Impl( bValidate );
if ( !bRet )
SetError( SVSTREAM_ACCESS_DENIED );
return bRet;
}
-BOOL Storage::ValidateMode( StreamMode nMode ) const
+sal_Bool Storage::ValidateMode( StreamMode nMode ) const
{
- BOOL bRet = ValidateMode_Impl( nMode );
+ sal_Bool bRet = ValidateMode_Impl( nMode );
if ( !bRet )
SetError( SVSTREAM_ACCESS_DENIED );
return bRet;
}
-BOOL Storage::ValidateMode( StreamMode nMode, StgDirEntry* p ) const
+sal_Bool Storage::ValidateMode( StreamMode nMode, StgDirEntry* p ) const
{
- BOOL bRet = ValidateMode_Impl( nMode, p );
+ sal_Bool bRet = ValidateMode_Impl( nMode, p );
if ( !bRet )
SetError( SVSTREAM_ACCESS_DENIED );
return bRet;
}
-BOOL Storage::Equals( const BaseStorage& rStorage ) const
+sal_Bool Storage::Equals( const BaseStorage& rStorage ) const
{
const Storage* pOther = PTR_CAST( Storage, &rStorage );
return pOther && ( pOther->pEntry == pEntry );
diff --git a/sot/source/sdstor/stgavl.cxx b/sot/source/sdstor/stgavl.cxx
index 3542a965da33..ad400f85dee5 100644
--- a/sot/source/sdstor/stgavl.cxx
+++ b/sot/source/sdstor/stgavl.cxx
@@ -212,7 +212,7 @@ StgAvlNode* StgAvlNode::RotRL()
// Remove a tree element. Return the removed element or NULL.
-StgAvlNode* StgAvlNode::Rem( StgAvlNode** p, StgAvlNode* pDel, BOOL bPtrs )
+StgAvlNode* StgAvlNode::Rem( StgAvlNode** p, StgAvlNode* pDel, sal_Bool bPtrs )
{
if( *p )
{
@@ -279,21 +279,21 @@ void StgAvlNode::StgEnum( short& n )
}
// Add node to AVL tree.
-// Return FALSE if the element already exists.
+// Return sal_False if the element already exists.
-BOOL StgAvlNode::Insert( StgAvlNode** pRoot, StgAvlNode* pIns )
+sal_Bool StgAvlNode::Insert( StgAvlNode** pRoot, StgAvlNode* pIns )
{
StgAvlNode* pPivot, *pHeavy, *pNewRoot, *pParent, *pPrev;
// special case - empty tree
if( *pRoot == NULL )
{
*pRoot = pIns;
- return TRUE;
+ return sal_True;
}
// find insertion point and return if already present
short nRes = (*pRoot)->Locate( pIns, &pPivot, &pParent, &pPrev );
if( !nRes )
- return FALSE;
+ return sal_False;
// add new node
if( nRes < 0 )
pPrev->pLeft = pIns;
@@ -323,19 +323,19 @@ BOOL StgAvlNode::Insert( StgAvlNode** pRoot, StgAvlNode* pIns )
else if( pPivot == pParent->pRight )
pParent->pRight = pNewRoot;
}
- return TRUE;
+ return sal_True;
}
-// Remove node from tree. Returns TRUE is found and removed.
+// Remove node from tree. Returns sal_True is found and removed.
// Actually delete if bDel
-BOOL StgAvlNode::Remove( StgAvlNode** pRoot, StgAvlNode* pDel, BOOL bDel )
+sal_Bool StgAvlNode::Remove( StgAvlNode** pRoot, StgAvlNode* pDel, sal_Bool bDel )
{
// special case - empty tree
if( *pRoot == NULL )
- return FALSE;
+ return sal_False;
// delete the element
- pDel = Rem( pRoot, pDel, FALSE );
+ pDel = Rem( pRoot, pDel, sal_False );
if( pDel )
{
if( bDel )
@@ -345,30 +345,30 @@ BOOL StgAvlNode::Remove( StgAvlNode** pRoot, StgAvlNode* pDel, BOOL bDel )
/* StgAvlNode* pNew = NULL;
while( *pRoot )
{
- StgAvlNode* p = Rem( pRoot, *pRoot, FALSE );
+ StgAvlNode* p = Rem( pRoot, *pRoot, sal_False );
Insert( &pNew, p );
}
*pRoot = pNew;*/
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
-// Move node to a different tree. Returns TRUE is found and moved. This routine
+// Move node to a different tree. Returns sal_True is found and moved. This routine
// may be called when the key has changed.
-BOOL StgAvlNode::Move
+sal_Bool StgAvlNode::Move
( StgAvlNode** pRoot1, StgAvlNode** pRoot2, StgAvlNode* pMove )
{
// special case - empty tree
if( *pRoot1 == NULL )
- return FALSE;
- pMove = Rem( pRoot1, pMove, FALSE );
+ return sal_False;
+ pMove = Rem( pRoot1, pMove, sal_False );
if( pMove )
return Insert( pRoot2, pMove );
else
- return FALSE;
+ return sal_False;
}
////////////////////////// class AvlIterator /////////////////////////
diff --git a/sot/source/sdstor/stgavl.hxx b/sot/source/sdstor/stgavl.hxx
index 66f424888e6d..29b33ae81109 100644
--- a/sot/source/sdstor/stgavl.hxx
+++ b/sot/source/sdstor/stgavl.hxx
@@ -46,7 +46,7 @@ private:
StgAvlNode* RotRR();
StgAvlNode* RotRL();
void StgEnum( short& );
- static StgAvlNode* Rem( StgAvlNode**, StgAvlNode*, BOOL );
+ static StgAvlNode* Rem( StgAvlNode**, StgAvlNode*, sal_Bool );
protected:
short nId; // iterator ID
short nBalance; // indicates tree balance
@@ -55,9 +55,9 @@ protected:
public:
virtual ~StgAvlNode();
StgAvlNode* Find( StgAvlNode* );
- static BOOL Insert( StgAvlNode**, StgAvlNode* );
- static BOOL Remove( StgAvlNode**, StgAvlNode*, BOOL bDel = TRUE );
- static BOOL Move( StgAvlNode**, StgAvlNode**, StgAvlNode* );
+ static sal_Bool Insert( StgAvlNode**, StgAvlNode* );
+ static sal_Bool Remove( StgAvlNode**, StgAvlNode*, sal_Bool bDel = sal_True );
+ static sal_Bool Move( StgAvlNode**, StgAvlNode**, StgAvlNode* );
virtual short Compare( const StgAvlNode* ) const = 0;
};
diff --git a/sot/source/sdstor/stgcache.cxx b/sot/source/sdstor/stgcache.cxx
index f4461383c0ba..5a0fde8b9cf1 100644
--- a/sot/source/sdstor/stgcache.cxx
+++ b/sot/source/sdstor/stgcache.cxx
@@ -52,10 +52,10 @@
//-----------------------------------------------------------------------------
typedef std::hash_map
<
- INT32,
+ sal_Int32,
StgPage *,
- std::hash< INT32 >,
- NAMESPACE_STD(equal_to)< INT32 >
+ std::hash< sal_Int32 >,
+ NAMESPACE_STD(equal_to)< sal_Int32 >
> UsrStgPagePtr_Impl;
#ifdef _MSC_VER
#pragma warning( disable: 4786 )
@@ -73,9 +73,9 @@ StgPage::StgPage( StgCache* p, short n )
{
pCache = p;
nData = n;
- bDirty = FALSE;
+ bDirty = sal_False;
nPage = 0;
- pData = new BYTE[ nData ];
+ pData = new sal_uInt8[ nData ];
pNext1 =
pNext2 =
pLast1 =
@@ -88,15 +88,15 @@ StgPage::~StgPage()
delete [] pData;
}
-void StgPage::SetPage( short nOff, INT32 nVal )
+void StgPage::SetPage( short nOff, sal_Int32 nVal )
{
- if( ( nOff < (short) ( nData / sizeof( INT32 ) ) ) && nOff >= 0 )
+ if( ( nOff < (short) ( nData / sizeof( sal_Int32 ) ) ) && nOff >= 0 )
{
#ifdef OSL_BIGENDIAN
nVal = SWAPLONG(nVal);
#endif
- ((INT32*) pData )[ nOff ] = nVal;
- bDirty = TRUE;
+ ((sal_Int32*) pData )[ nOff ] = nVal;
+ bDirty = sal_True;
}
}
@@ -105,7 +105,7 @@ void StgPage::SetPage( short nOff, INT32 nVal )
// The disk cache holds the cached sectors. The sector type differ according
// to their purpose.
-INT32 lcl_GetPageCount( ULONG nFileSize, short nPageSize )
+sal_Int32 lcl_GetPageCount( sal_uLong nFileSize, short nPageSize )
{
// return (nFileSize >= 512) ? (nFileSize - 512) / nPageSize : 0;
// #i61980# reallife: last page may be incomplete, return number of *started* pages
@@ -119,8 +119,8 @@ StgCache::StgCache()
pCur = pElem1 = NULL;
nPageSize = 512;
nError = SVSTREAM_OK;
- bMyStream = FALSE;
- bFile = FALSE;
+ bMyStream = sal_False;
+ bFile = sal_False;
pLRUCache = NULL;
pStorageStream = NULL;
}
@@ -128,15 +128,15 @@ StgCache::StgCache()
StgCache::~StgCache()
{
Clear();
- SetStrm( NULL, FALSE );
+ SetStrm( NULL, sal_False );
delete (UsrStgPagePtr_Impl*)pLRUCache;
}
void StgCache::SetPhysPageSize( short n )
{
nPageSize = n;
- ULONG nPos = pStrm->Tell();
- ULONG nFileSize = pStrm->Seek( STREAM_SEEK_TO_END );
+ sal_uLong nPos = pStrm->Tell();
+ sal_uLong nFileSize = pStrm->Seek( STREAM_SEEK_TO_END );
nPages = lcl_GetPageCount( nFileSize, nPageSize );
pStrm->Seek( nPos );
}
@@ -144,7 +144,7 @@ void StgCache::SetPhysPageSize( short n )
// Create a new cache element
// pCur points to this element
-StgPage* StgCache::Create( INT32 nPg )
+StgPage* StgCache::Create( sal_Int32 nPg )
{
StgPage* pElem = new StgPage( this, nPageSize );
pElem->nPage = nPg;
@@ -227,7 +227,7 @@ void StgCache::Clear()
// Look for a cached page
-StgPage* StgCache::Find( INT32 nPage )
+StgPage* StgCache::Find( sal_Int32 nPage )
{
if( !pLRUCache )
return NULL;
@@ -255,7 +255,7 @@ StgPage* StgCache::Find( INT32 nPage )
// Load a page into the cache
-StgPage* StgCache::Get( INT32 nPage, BOOL bForce )
+StgPage* StgCache::Get( sal_Int32 nPage, sal_Bool bForce )
{
StgPage* p = Find( nPage );
if( !p )
@@ -275,7 +275,7 @@ StgPage* StgCache::Get( INT32 nPage, BOOL bForce )
// to duplicate an existing stream or to create new entries.
// The new page is initially marked dirty. No owner is copied.
-StgPage* StgCache::Copy( INT32 nNew, INT32 nOld )
+StgPage* StgCache::Copy( sal_Int32 nNew, sal_Int32 nOld )
{
StgPage* p = Find( nNew );
if( !p )
@@ -283,7 +283,7 @@ StgPage* StgCache::Copy( INT32 nNew, INT32 nOld )
if( nOld >= 0 )
{
// old page: we must have this data!
- StgPage* q = Get( nOld, TRUE );
+ StgPage* q = Get( nOld, sal_True );
if( q )
memcpy( p->pData, q->pData, p->nData );
}
@@ -293,17 +293,17 @@ StgPage* StgCache::Copy( INT32 nNew, INT32 nOld )
// Flush the cache whose owner is given. NULL flushes all.
-BOOL StgCache::Commit( StgDirEntry* )
+sal_Bool StgCache::Commit( StgDirEntry* )
{
StgPage* p = pElem1;
if( p ) do
{
if( p->bDirty )
{
- BOOL b = Write( p->nPage, p->pData, 1 );
+ sal_Bool b = Write( p->nPage, p->pData, 1 );
if( !b )
- return FALSE;
- p->bDirty = FALSE;
+ return sal_False;
+ p->bDirty = sal_False;
}
p = p->pNext2;
} while( p != pElem1 );
@@ -316,10 +316,10 @@ BOOL StgCache::Commit( StgDirEntry* )
if( p->bDirty )
{
ErrorBox( NULL, WB_OK, String("SO2: Dirty Block in Ordered List") ).Execute();
- BOOL b = Write( p->nPage, p->pData, 1 );
+ sal_Bool b = Write( p->nPage, p->pData, 1 );
if( !b )
- return FALSE;
- p->bDirty = FALSE;
+ return sal_False;
+ p->bDirty = sal_False;
}
p = p->pNext2;
} while( p != pElem1 );
@@ -329,15 +329,15 @@ BOOL StgCache::Commit( StgDirEntry* )
if( p->bDirty )
{
ErrorBox( NULL, WB_OK, String("SO2: Dirty Block in LRU List") ).Execute();
- BOOL b = Write( p->nPage, p->pData, 1 );
+ sal_Bool b = Write( p->nPage, p->pData, 1 );
if( !b )
- return FALSE;
- p->bDirty = FALSE;
+ return sal_False;
+ p->bDirty = sal_False;
}
p = p->pNext1;
} while( p != pElem1 );
#endif
- return TRUE;
+ return sal_True;
}
void StgCache::Revert( StgDirEntry* )
@@ -345,7 +345,7 @@ void StgCache::Revert( StgDirEntry* )
// Set a stream
-void StgCache::SetStrm( SvStream* p, BOOL bMy )
+void StgCache::SetStrm( SvStream* p, sal_Bool bMy )
{
if( pStorageStream )
{
@@ -376,34 +376,34 @@ void StgCache::SetStrm( UCBStorageStream* pStgStream )
pStrm = pStorageStream->GetModifySvStream();
}
- bMyStream = FALSE;
+ bMyStream = sal_False;
}
// Open/close the disk file
-BOOL StgCache::Open( const String& rName, StreamMode nMode )
+sal_Bool StgCache::Open( const String& rName, StreamMode nMode )
{
// do not open in exclusive mode!
if( nMode & STREAM_SHARE_DENYALL )
nMode = ( ( nMode & ~STREAM_SHARE_DENYALL ) | STREAM_SHARE_DENYWRITE );
SvFileStream* pFileStrm = new SvFileStream( rName, nMode );
// SvStream "Feature" Write Open auch erfolgreich, wenns nicht klappt
- BOOL bAccessDenied = FALSE;
+ sal_Bool bAccessDenied = sal_False;
if( ( nMode & STREAM_WRITE ) && !pFileStrm->IsWritable() )
{
pFileStrm->Close();
- bAccessDenied = TRUE;
+ bAccessDenied = sal_True;
}
- SetStrm( pFileStrm, TRUE );
+ SetStrm( pFileStrm, sal_True );
if( pFileStrm->IsOpen() )
{
- ULONG nFileSize = pStrm->Seek( STREAM_SEEK_TO_END );
+ sal_uLong nFileSize = pStrm->Seek( STREAM_SEEK_TO_END );
nPages = lcl_GetPageCount( nFileSize, nPageSize );
pStrm->Seek( 0L );
}
else
nPages = 0;
- bFile = TRUE;
+ bFile = sal_True;
SetError( bAccessDenied ? ERRCODE_IO_ACCESSDENIED : pStrm->GetError() );
return Good();
}
@@ -419,7 +419,7 @@ void StgCache::Close()
// low level I/O
-BOOL StgCache::Read( INT32 nPage, void* pBuf, INT32 nPg )
+sal_Bool StgCache::Read( sal_Int32 nPage, void* pBuf, sal_Int32 nPg )
{
if( Good() )
{
@@ -431,9 +431,9 @@ BOOL StgCache::Read( INT32 nPage, void* pBuf, INT32 nPg )
SetError( SVSTREAM_READ_ERROR );
else if ( nPage < nPages )
{
- ULONG nPos = Page2Pos( nPage );
- INT32 nPg2 = ( ( nPage + nPg ) > nPages ) ? nPages - nPage : nPg;
- ULONG nBytes = nPg2 * nPageSize;
+ sal_uLong nPos = Page2Pos( nPage );
+ sal_Int32 nPg2 = ( ( nPage + nPg ) > nPages ) ? nPages - nPage : nPg;
+ sal_uLong nBytes = nPg2 * nPageSize;
// fixed address and size for the header
if( nPage == -1 )
{
@@ -458,12 +458,12 @@ BOOL StgCache::Read( INT32 nPage, void* pBuf, INT32 nPg )
return Good();
}
-BOOL StgCache::Write( INT32 nPage, void* pBuf, INT32 nPg )
+sal_Bool StgCache::Write( sal_Int32 nPage, void* pBuf, sal_Int32 nPg )
{
if( Good() )
{
- ULONG nPos = Page2Pos( nPage );
- ULONG nBytes = nPg * nPageSize;
+ sal_uLong nPos = Page2Pos( nPage );
+ sal_uLong nBytes = nPg * nPageSize;
// fixed address and size for the header
if( nPage == -1 )
nPos = 0L, nBytes = 512;
@@ -475,16 +475,16 @@ BOOL StgCache::Write( INT32 nPage, void* pBuf, INT32 nPg )
#endif
}
}
- ULONG nRes = pStrm->Write( pBuf, nBytes );
+ sal_uLong nRes = pStrm->Write( pBuf, nBytes );
if( nRes != nBytes )
SetError( SVSTREAM_WRITE_ERROR );
else
SetError( pStrm->GetError() );
#ifdef READ_AFTER_WRITE
- BYTE cBuf[ 512 ];
+ sal_uInt8 cBuf[ 512 ];
pStrm->Flush();
pStrm->Seek( nPos );
- BOOL bRes = ( pStrm->Read( cBuf, 512 ) == 512 );
+ sal_Bool bRes = ( pStrm->Read( cBuf, 512 ) == 512 );
if( bRes )
bRes = !memcmp( cBuf, pBuf, 512 );
if( !bRes )
@@ -499,10 +499,10 @@ BOOL StgCache::Write( INT32 nPage, void* pBuf, INT32 nPg )
// set the file size in pages
-BOOL StgCache::SetSize( INT32 n )
+sal_Bool StgCache::SetSize( sal_Int32 n )
{
// Add the file header
- INT32 nSize = n * nPageSize + 512;
+ sal_Int32 nSize = n * nPageSize + 512;
pStrm->SetStreamSize( nSize );
SetError( pStrm->GetError() );
if( !nError )
@@ -510,7 +510,7 @@ BOOL StgCache::SetSize( INT32 n )
return Good();
}
-void StgCache::SetError( ULONG n )
+void StgCache::SetError( sal_uLong n )
{
if( n && !nError )
nError = n;
@@ -533,13 +533,13 @@ void StgCache::MoveError( StorageBase& r )
// Utility functions
-INT32 StgCache::Page2Pos( INT32 nPage )
+sal_Int32 StgCache::Page2Pos( sal_Int32 nPage )
{
if( nPage < 0 ) nPage = 0;
return( nPage * nPageSize ) + nPageSize;
}
-INT32 StgCache::Pos2Page( INT32 nPos )
+sal_Int32 StgCache::Pos2Page( sal_Int32 nPos )
{
return ( ( nPos + nPageSize - 1 ) / nPageSize ) * nPageSize - 1;
}
diff --git a/sot/source/sdstor/stgcache.hxx b/sot/source/sdstor/stgcache.hxx
index 5379f837b8b1..d6849bdd4b3d 100644
--- a/sot/source/sdstor/stgcache.hxx
+++ b/sot/source/sdstor/stgcache.hxx
@@ -47,9 +47,9 @@ class StorageBase;
class StgCache {
StgPage* pCur; // top of LRU list
StgPage* pElem1; // top of ordered list
- ULONG nError; // error code
- INT32 nPages; // size of data area in pages
- USHORT nRef; // reference count
+ sal_uLong nError; // error code
+ sal_Int32 nPages; // size of data area in pages
+ sal_uInt16 nRef; // reference count
void * pLRUCache; // hash table of cached objects
short nPageSize; // page size of the file
UCBStorageStream* pStorageStream; // holds reference to UCB storage stream
@@ -57,40 +57,40 @@ class StgCache {
void Erase( StgPage* ); // delete a cache element
void InsertToLRU( StgPage* ); // insert into LRU list
void InsertToOrdered( StgPage* ); // insert into ordered list
- StgPage* Create( INT32 ); // create a cached page
+ StgPage* Create( sal_Int32 ); // create a cached page
protected:
SvStream* pStrm; // physical stream
- BOOL bMyStream; // TRUE: delete stream in dtor
- BOOL bFile; // TRUE: file stream
- INT32 Page2Pos( INT32 ); // page address --> file position
- INT32 Pos2Page( INT32 ); // file position --> page address
+ sal_Bool bMyStream; // sal_True: delete stream in dtor
+ sal_Bool bFile; // sal_True: file stream
+ sal_Int32 Page2Pos( sal_Int32 ); // page address --> file position
+ sal_Int32 Pos2Page( sal_Int32 ); // file position --> page address
public:
StgCache();
~StgCache();
void IncRef() { nRef++; }
- USHORT DecRef() { return --nRef; }
+ sal_uInt16 DecRef() { return --nRef; }
void SetPhysPageSize( short );
- INT32 GetPhysPages() { return nPages; }
+ sal_Int32 GetPhysPages() { return nPages; }
short GetPhysPageSize() { return nPageSize; }
SvStream* GetStrm() { return pStrm; }
- void SetStrm( SvStream*, BOOL );
+ void SetStrm( SvStream*, sal_Bool );
void SetStrm( UCBStorageStream* );
- BOOL IsWritable() { return pStrm->IsWritable(); }
- BOOL Good() { return BOOL( nError == SVSTREAM_OK ); }
- BOOL Bad() { return BOOL( nError != SVSTREAM_OK ); }
- ULONG GetError() { return nError; }
+ sal_Bool IsWritable() { return pStrm->IsWritable(); }
+ sal_Bool Good() { return sal_Bool( nError == SVSTREAM_OK ); }
+ sal_Bool Bad() { return sal_Bool( nError != SVSTREAM_OK ); }
+ sal_uLong GetError() { return nError; }
void MoveError( StorageBase& );
- void SetError( ULONG );
+ void SetError( sal_uLong );
void ResetError();
- BOOL Open( const String& rName, StreamMode );
+ sal_Bool Open( const String& rName, StreamMode );
void Close();
- BOOL Read( INT32 nPage, void* pBuf, INT32 nPages );
- BOOL Write( INT32 nPage, void* pBuf, INT32 nPages );
- BOOL SetSize( INT32 nPages );
- StgPage* Find( INT32 ); // find a cached page
- StgPage* Get( INT32, BOOL ); // get a cached page
- StgPage* Copy( INT32, INT32=STG_FREE ); // copy a page
- BOOL Commit( StgDirEntry* = NULL ); // flush all pages
+ sal_Bool Read( sal_Int32 nPage, void* pBuf, sal_Int32 nPages );
+ sal_Bool Write( sal_Int32 nPage, void* pBuf, sal_Int32 nPages );
+ sal_Bool SetSize( sal_Int32 nPages );
+ StgPage* Find( sal_Int32 ); // find a cached page
+ StgPage* Get( sal_Int32, sal_Bool ); // get a cached page
+ StgPage* Copy( sal_Int32, sal_Int32=STG_FREE ); // copy a page
+ sal_Bool Commit( StgDirEntry* = NULL ); // flush all pages
void Revert( StgDirEntry* = NULL ); // revert dirty pages
void Clear(); // clear the cache
};
@@ -101,32 +101,32 @@ class StgPage {
StgPage *pNext1, *pLast1; // LRU chain
StgPage *pNext2, *pLast2; // ordered chain
StgDirEntry* pOwner; // owner
- INT32 nPage; // page #
- BYTE* pData; // nPageSize characters
+ sal_Int32 nPage; // page #
+ sal_uInt8* pData; // nPageSize characters
short nData; // size of this page
- BOOL bDirty; // dirty flag
+ sal_Bool bDirty; // dirty flag
StgPage( StgCache*, short );
~StgPage();
public:
- void SetDirty() { bDirty = TRUE; }
- INT32 GetPage() { return nPage; }
+ void SetDirty() { bDirty = sal_True; }
+ sal_Int32 GetPage() { return nPage; }
void* GetData() { return pData; }
short GetSize() { return nData; }
void SetOwner( StgDirEntry* p ) { pOwner = p; }
// routines for accessing FAT pages
// Assume that the data is a FAT page and get/put FAT data.
- INT32 GetPage( short nOff )
+ sal_Int32 GetPage( short nOff )
{
- if( ( nOff >= (short) ( nData / sizeof( INT32 ) ) ) || nOff < 0 )
+ if( ( nOff >= (short) ( nData / sizeof( sal_Int32 ) ) ) || nOff < 0 )
return -1;
- INT32 n = ((INT32*) pData )[ nOff ];
+ sal_Int32 n = ((sal_Int32*) pData )[ nOff ];
#ifdef OSL_BIGENDIAN
return SWAPLONG(n);
#else
return n;
#endif
}
- void SetPage( short, INT32 ); // put an element
+ void SetPage( short, sal_Int32 ); // put an element
};
#endif
diff --git a/sot/source/sdstor/stgdir.cxx b/sot/source/sdstor/stgdir.cxx
index 8c553d0f8a32..42676a9dd222 100644
--- a/sot/source/sdstor/stgdir.cxx
+++ b/sot/source/sdstor/stgdir.cxx
@@ -54,7 +54,7 @@
// Problem der Implementation: Keine Hierarchischen commits. Daher nur
// insgesamt transaktionsorientert oder direkt.
-StgDirEntry::StgDirEntry( const void* pFrom, BOOL * pbOk ) : StgAvlNode()
+StgDirEntry::StgDirEntry( const void* pFrom, sal_Bool * pbOk ) : StgAvlNode()
{
*pbOk = aEntry.Load( pFrom );
@@ -81,14 +81,14 @@ void StgDirEntry::InitMembers()
nEntry =
nRefCnt = 0;
nMode = STREAM_READ;
- bDirect = TRUE;
+ bDirect = sal_True;
bInvalid =
bCreated =
bRenamed =
bRemoved =
bTemp =
bDirty =
- bZombie = FALSE;
+ bZombie = sal_False;
}
StgDirEntry::~StgDirEntry()
@@ -113,9 +113,9 @@ short StgDirEntry::Compare( const StgAvlNode* p ) const
// the TOC tree into the TOC stream. Remember that aSave is
// stored, not aEntry.
-void StgDirEntry::Enum( INT32& n )
+void StgDirEntry::Enum( sal_Int32& n )
{
- INT32 nLeft = STG_FREE, nRight = STG_FREE, nDown = STG_FREE;
+ sal_Int32 nLeft = STG_FREE, nRight = STG_FREE, nDown = STG_FREE;
nEntry = n++;
if( pLeft )
{
@@ -137,17 +137,17 @@ void StgDirEntry::Enum( INT32& n )
// Delete all temporary entries before writing the TOC stream.
// Until now Deltem is never called with bForce True
-void StgDirEntry::DelTemp( BOOL bForce )
+void StgDirEntry::DelTemp( sal_Bool bForce )
{
if( pLeft )
- ((StgDirEntry*) pLeft)->DelTemp( FALSE );
+ ((StgDirEntry*) pLeft)->DelTemp( sal_False );
if( pRight )
- ((StgDirEntry*) pRight)->DelTemp( FALSE );
+ ((StgDirEntry*) pRight)->DelTemp( sal_False );
if( pDown )
{
// If the storage is dead, of course all elements are dead, too
if( bInvalid && aEntry.GetType() == STG_STORAGE )
- bForce = TRUE;
+ bForce = sal_True;
pDown->DelTemp( bForce );
}
if( ( bForce || bInvalid )
@@ -157,12 +157,12 @@ void StgDirEntry::DelTemp( BOOL bForce )
if( pUp )
{
// this deletes the element if refcnt == 0!
- BOOL bDel = nRefCnt == 0;
+ sal_Bool bDel = nRefCnt == 0;
StgAvlNode::Remove( (StgAvlNode**) &pUp->pDown, this, bDel );
if( !bDel )
{
pLeft = pRight = pDown = 0;
- bInvalid = bZombie = TRUE;
+ bInvalid = bZombie = sal_True;
}
}
}
@@ -170,26 +170,26 @@ void StgDirEntry::DelTemp( BOOL bForce )
// Save the tree into the given dir stream
-BOOL StgDirEntry::Store( StgDirStrm& rStrm )
+sal_Bool StgDirEntry::Store( StgDirStrm& rStrm )
{
- void* pEntry = rStrm.GetEntry( nEntry, TRUE );
+ void* pEntry = rStrm.GetEntry( nEntry, sal_True );
if( !pEntry )
- return FALSE;
+ return sal_False;
// Do not store the current (maybe not commited) entry
aSave.Store( pEntry );
if( pLeft )
if( !((StgDirEntry*) pLeft)->Store( rStrm ) )
- return FALSE;
+ return sal_False;
if( pRight )
if( !((StgDirEntry*) pRight)->Store( rStrm ) )
- return FALSE;
+ return sal_False;
if( pDown )
if( !pDown->Store( rStrm ) )
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
-BOOL StgDirEntry::StoreStream( StgIo& rIo )
+sal_Bool StgDirEntry::StoreStream( StgIo& rIo )
{
if( aEntry.GetType() == STG_STREAM || aEntry.GetType() == STG_ROOT )
{
@@ -206,27 +206,27 @@ BOOL StgDirEntry::StoreStream( StgIo& rIo )
}
// or write the data stream
else if( !Tmp2Strm() )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// Save all dirty streams
-BOOL StgDirEntry::StoreStreams( StgIo& rIo )
+sal_Bool StgDirEntry::StoreStreams( StgIo& rIo )
{
if( !StoreStream( rIo ) )
- return FALSE;
+ return sal_False;
if( pLeft )
if( !((StgDirEntry*) pLeft)->StoreStreams( rIo ) )
- return FALSE;
+ return sal_False;
if( pRight )
if( !((StgDirEntry*) pRight)->StoreStreams( rIo ) )
- return FALSE;
+ return sal_False;
if( pDown )
if( !pDown->StoreStreams( rIo ) )
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
// Revert all directory entries after failure to write the TOC stream
@@ -244,24 +244,24 @@ void StgDirEntry::RevertAll()
// Look if any element of the tree is dirty
-BOOL StgDirEntry::IsDirty()
+sal_Bool StgDirEntry::IsDirty()
{
if( bDirty || bInvalid )
- return TRUE;
+ return sal_True;
if( pLeft && ((StgDirEntry*) pLeft)->IsDirty() )
- return TRUE;
+ return sal_True;
if( pRight && ((StgDirEntry*) pRight)->IsDirty() )
- return TRUE;
+ return sal_True;
if( pDown && pDown->IsDirty() )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
// Set up a stream.
-void StgDirEntry::OpenStream( StgIo& rIo, BOOL bForceBig )
+void StgDirEntry::OpenStream( StgIo& rIo, sal_Bool bForceBig )
{
- INT32 nThreshold = (USHORT) rIo.aHdr.GetThreshold();
+ sal_Int32 nThreshold = (sal_uInt16) rIo.aHdr.GetThreshold();
delete pStgStrm;
if( !bForceBig && aEntry.GetSize() < nThreshold )
pStgStrm = new StgSmallStrm( rIo, this );
@@ -271,7 +271,7 @@ void StgDirEntry::OpenStream( StgIo& rIo, BOOL bForceBig )
{
// This entry has invalid data, so delete that data
SetSize( 0L );
-// bRemoved = bInvalid = FALSE;
+// bRemoved = bInvalid = sal_False;
}
nPos = 0;
}
@@ -291,9 +291,9 @@ void StgDirEntry::Close()
// Get the current stream size
-INT32 StgDirEntry::GetSize()
+sal_Int32 StgDirEntry::GetSize()
{
- INT32 n;
+ sal_Int32 n;
if( pTmpStrm )
n = pTmpStrm->GetSize();
else if( pCurStrm )
@@ -304,14 +304,14 @@ INT32 StgDirEntry::GetSize()
// Set the stream size. This means also creating a temp stream.
-BOOL StgDirEntry::SetSize( INT32 nNewSize )
+sal_Bool StgDirEntry::SetSize( sal_Int32 nNewSize )
{
if (
!( nMode & STREAM_WRITE ) ||
(!bDirect && !pTmpStrm && !Strm2Tmp())
)
{
- return FALSE;
+ return sal_False;
}
if( nNewSize < nPos )
@@ -320,26 +320,26 @@ BOOL StgDirEntry::SetSize( INT32 nNewSize )
{
pTmpStrm->SetSize( nNewSize );
pStgStrm->GetIo().SetError( pTmpStrm->GetError() );
- return BOOL( pTmpStrm->GetError() == SVSTREAM_OK );
+ return sal_Bool( pTmpStrm->GetError() == SVSTREAM_OK );
}
else
{
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
StgIo& rIo = pStgStrm->GetIo();
- INT32 nThreshold = rIo.aHdr.GetThreshold();
+ sal_Int32 nThreshold = rIo.aHdr.GetThreshold();
// ensure the correct storage stream!
StgStrm* pOld = NULL;
- USHORT nOldSize = 0;
+ sal_uInt16 nOldSize = 0;
if( nNewSize >= nThreshold && pStgStrm->IsSmallStrm() )
{
pOld = pStgStrm;
- nOldSize = (USHORT) pOld->GetSize();
+ nOldSize = (sal_uInt16) pOld->GetSize();
pStgStrm = new StgDataStrm( rIo, STG_EOF, 0 );
}
else if( nNewSize < nThreshold && !pStgStrm->IsSmallStrm() )
{
pOld = pStgStrm;
- nOldSize = (USHORT) nNewSize;
+ nOldSize = (sal_uInt16) nNewSize;
pStgStrm = new StgSmallStrm( rIo, STG_EOF, 0 );
}
// now set the new size
@@ -351,16 +351,16 @@ BOOL StgDirEntry::SetSize( INT32 nNewSize )
// if so, we probably need to copy the old data
if( nOldSize )
{
- void* pBuf = new BYTE[ nOldSize ];
+ void* pBuf = new sal_uInt8[ nOldSize ];
pOld->Pos2Page( 0L );
pStgStrm->Pos2Page( 0L );
if( pOld->Read( pBuf, nOldSize )
&& pStgStrm->Write( pBuf, nOldSize ) )
- bRes = TRUE;
- delete[] static_cast<BYTE*>(pBuf);
+ bRes = sal_True;
+ delete[] static_cast<sal_uInt8*>(pBuf);
}
else
- bRes = TRUE;
+ bRes = sal_True;
if( bRes )
{
pOld->SetSize( 0 );
@@ -378,7 +378,7 @@ BOOL StgDirEntry::SetSize( INT32 nNewSize )
else
{
pStgStrm->Pos2Page( nPos );
- bRes = TRUE;
+ bRes = sal_True;
}
}
return bRes;
@@ -387,7 +387,7 @@ BOOL StgDirEntry::SetSize( INT32 nNewSize )
// Seek. On negative values, seek to EOF.
-INT32 StgDirEntry::Seek( INT32 nNew )
+sal_Int32 StgDirEntry::Seek( sal_Int32 nNew )
{
if( pTmpStrm )
{
@@ -403,7 +403,7 @@ INT32 StgDirEntry::Seek( INT32 nNew )
}
else
{
- INT32 nSize = aEntry.GetSize();
+ sal_Int32 nSize = aEntry.GetSize();
if( nNew < 0 )
nNew = nSize;
@@ -427,7 +427,7 @@ INT32 StgDirEntry::Seek( INT32 nNew )
// Read
-INT32 StgDirEntry::Read( void* p, INT32 nLen )
+sal_Int32 StgDirEntry::Read( void* p, sal_Int32 nLen )
{
if( nLen <= 0 )
return 0;
@@ -443,7 +443,7 @@ INT32 StgDirEntry::Read( void* p, INT32 nLen )
// Write
-INT32 StgDirEntry::Write( const void* p, INT32 nLen )
+sal_Int32 StgDirEntry::Write( const void* p, sal_Int32 nLen )
{
if( nLen <= 0 || !( nMode & STREAM_WRITE ) )
return 0;
@@ -461,7 +461,7 @@ INT32 StgDirEntry::Write( const void* p, INT32 nLen )
}
else
{
- INT32 nNew = nPos + nLen;
+ sal_Int32 nNew = nPos + nLen;
if( nNew > pStgStrm->GetSize() )
{
if( !SetSize( nNew ) )
@@ -478,16 +478,16 @@ INT32 StgDirEntry::Write( const void* p, INT32 nLen )
void StgDirEntry::Copy( StgDirEntry& rDest )
{
- INT32 n = GetSize();
+ sal_Int32 n = GetSize();
if( rDest.SetSize( n ) && n )
{
- BYTE aTempBytes[ 4096 ];
+ sal_uInt8 aTempBytes[ 4096 ];
void* p = static_cast<void*>( aTempBytes );
Seek( 0L );
rDest.Seek( 0L );
while( n )
{
- INT32 nn = n;
+ sal_Int32 nn = n;
if( nn > 4096 )
nn = 4096;
if( Read( p, nn ) != nn )
@@ -501,22 +501,22 @@ void StgDirEntry::Copy( StgDirEntry& rDest )
void StgDirEntry::Copy( BaseStorageStream& rDest )
{
- INT32 n = GetSize();
+ sal_Int32 n = GetSize();
if( rDest.SetSize( n ) && n )
{
- ULONG Pos = rDest.Tell();
- BYTE aTempBytes[ 4096 ];
+ sal_uLong Pos = rDest.Tell();
+ sal_uInt8 aTempBytes[ 4096 ];
void* p = static_cast<void*>( aTempBytes );
Seek( 0L );
rDest.Seek( 0L );
while( n )
{
- INT32 nn = n;
+ sal_Int32 nn = n;
if( nn > 4096 )
nn = 4096;
if( Read( p, nn ) != nn )
break;
- if( sal::static_int_cast<INT32>(rDest.Write( p, nn )) != nn )
+ if( sal::static_int_cast<sal_Int32>(rDest.Write( p, nn )) != nn )
break;
n -= nn;
}
@@ -526,12 +526,12 @@ void StgDirEntry::Copy( BaseStorageStream& rDest )
// Commit this entry
-BOOL StgDirEntry::Commit()
+sal_Bool StgDirEntry::Commit()
{
// OSL_ENSURE( nMode & STREAM_WRITE, "Trying to commit readonly stream!" );
aSave = aEntry;
- BOOL bRes = TRUE;
+ sal_Bool bRes = sal_True;
if( aEntry.GetType() == STG_STREAM )
{
if( pTmpStrm )
@@ -552,7 +552,7 @@ BOOL StgDirEntry::Commit()
// Revert the entry
-BOOL StgDirEntry::Revert()
+sal_Bool StgDirEntry::Revert()
{
aEntry = aSave;
switch( aEntry.GetType() )
@@ -563,24 +563,24 @@ BOOL StgDirEntry::Revert()
break;
case STG_STORAGE:
{
- BOOL bSomeRenamed = FALSE;
+ sal_Bool bSomeRenamed = sal_False;
StgIterator aOIter( *this );
StgDirEntry* op = aOIter.First();
while( op )
{
op->aEntry = op->aSave;
- op->bDirty = FALSE;
- bSomeRenamed = BOOL( bSomeRenamed | op->bRenamed );
+ op->bDirty = sal_False;
+ bSomeRenamed = sal_Bool( bSomeRenamed | op->bRenamed );
// Remove any new entries
if( op->bCreated )
{
- op->bCreated = FALSE;
+ op->bCreated = sal_False;
op->Close();
- op->bInvalid = TRUE;
+ op->bInvalid = sal_True;
}
// Reactivate any removed entries
else if( op->bRemoved )
- op->bRemoved = op->bInvalid = op->bTemp = FALSE;
+ op->bRemoved = op->bInvalid = op->bTemp = sal_False;
op = aOIter.Next();
}
// Resort all renamed entries
@@ -595,12 +595,12 @@ BOOL StgDirEntry::Revert()
StgAvlNode::Move
( (StgAvlNode**) &p->pUp->pDown,
(StgAvlNode**) &p->pUp->pDown, p );
- p->bRenamed = FALSE;
+ p->bRenamed = sal_False;
}
p = aIter.Next();
}
}
- DelTemp( FALSE );
+ DelTemp( sal_False );
break;
}
case STG_EMPTY:
@@ -609,22 +609,22 @@ BOOL StgDirEntry::Revert()
case STG_ROOT:
break;
}
- return TRUE;
+ return sal_True;
}
// Copy the stg stream to the temp stream
-BOOL StgDirEntry::Strm2Tmp()
+sal_Bool StgDirEntry::Strm2Tmp()
{
if( !pTmpStrm )
{
- ULONG n = 0;
+ sal_uLong n = 0;
if( pCurStrm )
{
// It was already commited once
pTmpStrm = new StgTmpStrm;
if( pTmpStrm->GetError() == SVSTREAM_OK && pTmpStrm->Copy( *pCurStrm ) )
- return TRUE;
+ return sal_True;
n = 1; // indicates error
}
else
@@ -635,15 +635,15 @@ BOOL StgDirEntry::Strm2Tmp()
{
if( n )
{
- BYTE aTempBytes[ 4096 ];
+ sal_uInt8 aTempBytes[ 4096 ];
void* p = static_cast<void*>( aTempBytes );
pStgStrm->Pos2Page( 0L );
while( n )
{
- ULONG nn = n;
+ sal_uLong nn = n;
if( nn > 4096 )
nn = 4096;
- if( (ULONG) pStgStrm->Read( p, nn ) != nn )
+ if( (sal_uLong) pStgStrm->Read( p, nn ) != nn )
break;
if( pTmpStrm->Write( p, nn ) != nn )
break;
@@ -661,41 +661,41 @@ BOOL StgDirEntry::Strm2Tmp()
pStgStrm->GetIo().SetError( pTmpStrm->GetError() );
delete pTmpStrm;
pTmpStrm = NULL;
- return FALSE;
+ return sal_False;
}
}
- return TRUE;
+ return sal_True;
}
// Copy the temp stream to the stg stream during the final commit
-BOOL StgDirEntry::Tmp2Strm()
+sal_Bool StgDirEntry::Tmp2Strm()
{
// We did commit once, but have not written since then
if( !pTmpStrm )
pTmpStrm = pCurStrm, pCurStrm = NULL;
if( pTmpStrm )
{
- ULONG n = pTmpStrm->GetSize();
+ sal_uLong n = pTmpStrm->GetSize();
StgStrm* pNewStrm;
StgIo& rIo = pStgStrm->GetIo();
- ULONG nThreshold = (ULONG) rIo.aHdr.GetThreshold();
+ sal_uLong nThreshold = (sal_uLong) rIo.aHdr.GetThreshold();
if( n < nThreshold )
pNewStrm = new StgSmallStrm( rIo, STG_EOF, 0 );
else
pNewStrm = new StgDataStrm( rIo, STG_EOF, 0 );
if( pNewStrm->SetSize( n ) )
{
- BYTE p[ 4096 ];
+ sal_uInt8 p[ 4096 ];
pTmpStrm->Seek( 0L );
while( n )
{
- ULONG nn = n;
+ sal_uLong nn = n;
if( nn > 4096 )
nn = 4096;
if( pTmpStrm->Read( p, nn ) != nn )
break;
- if( (ULONG) pNewStrm->Write( p, nn ) != nn )
+ if( (sal_uLong) pNewStrm->Write( p, nn ) != nn )
break;
n -= nn;
}
@@ -704,7 +704,7 @@ BOOL StgDirEntry::Tmp2Strm()
pTmpStrm->Seek( nPos );
pStgStrm->GetIo().SetError( pTmpStrm->GetError() );
delete pNewStrm;
- return FALSE;
+ return sal_False;
}
else
{
@@ -720,12 +720,12 @@ BOOL StgDirEntry::Tmp2Strm()
}
}
}
- return TRUE;
+ return sal_True;
}
// Check if the given entry is contained in this entry
-BOOL StgDirEntry::IsContained( StgDirEntry* pStg )
+sal_Bool StgDirEntry::IsContained( StgDirEntry* pStg )
{
if( aEntry.GetType() == STG_STORAGE )
{
@@ -734,25 +734,25 @@ BOOL StgDirEntry::IsContained( StgDirEntry* pStg )
while( p )
{
if( !p->aEntry.Compare( pStg->aEntry ) )
- return FALSE;
+ return sal_False;
if( p->aEntry.GetType() == STG_STORAGE )
if( !p->IsContained( pStg ) )
- return FALSE;
+ return sal_False;
p = aIter.Next();
}
}
- return TRUE;
+ return sal_True;
}
// Invalidate all open entries by setting the RefCount to 0. If the bDel
// flag is set, also set the invalid flag to indicate deletion during the
// next dir stream flush.
-void StgDirEntry::Invalidate( BOOL bDel )
+void StgDirEntry::Invalidate( sal_Bool bDel )
{
// nRefCnt = 0;
if( bDel )
- bRemoved = bInvalid = TRUE;
+ bRemoved = bInvalid = sal_True;
switch( aEntry.GetType() )
{
case STG_STORAGE:
@@ -807,12 +807,12 @@ StgDirStrm::~StgDirStrm()
// Recursively parse the directory tree during reading the TOC stream
-void StgDirStrm::SetupEntry( INT32 n, StgDirEntry* pUpper )
+void StgDirStrm::SetupEntry( sal_Int32 n, StgDirEntry* pUpper )
{
void* p = ( n == STG_FREE ) ? NULL : GetEntry( n );
if( p )
{
- BOOL bOk(FALSE);
+ sal_Bool bOk(sal_False);
StgDirEntry* pCur = new StgDirEntry( p, &bOk );
if( !bOk )
@@ -827,10 +827,10 @@ void StgDirStrm::SetupEntry( INT32 n, StgDirEntry* pUpper )
if( !pUpper )
pCur->aEntry.SetType( STG_ROOT );
- INT32 nLeft = pCur->aEntry.GetLeaf( STG_LEFT );
- INT32 nRight = pCur->aEntry.GetLeaf( STG_RIGHT );
+ sal_Int32 nLeft = pCur->aEntry.GetLeaf( STG_LEFT );
+ sal_Int32 nRight = pCur->aEntry.GetLeaf( STG_RIGHT );
// substorage?
- INT32 nLeaf = STG_FREE;
+ sal_Int32 nLeaf = STG_FREE;
if( pCur->aEntry.GetType() == STG_STORAGE || pCur->aEntry.GetType() == STG_ROOT )
{
nLeaf = pCur->aEntry.GetLeaf( STG_CHILD );
@@ -865,7 +865,7 @@ void StgDirStrm::SetupEntry( INT32 n, StgDirEntry* pUpper )
// Extend or shrink the directory stream.
-BOOL StgDirStrm::SetSize( INT32 nBytes )
+sal_Bool StgDirStrm::SetSize( sal_Int32 nBytes )
{
// Always allocate full pages
nBytes = ( ( nBytes + nPageSize - 1 ) / nPageSize ) * nPageSize;
@@ -874,67 +874,67 @@ BOOL StgDirStrm::SetSize( INT32 nBytes )
// Save the TOC stream into a new substream after saving all data streams
-BOOL StgDirStrm::Store()
+sal_Bool StgDirStrm::Store()
{
if( !pRoot->IsDirty() )
- return TRUE;
+ return sal_True;
if( !pRoot->StoreStreams( rIo ) )
- return FALSE;
+ return sal_False;
// After writing all streams, the data FAT stream has changed,
// so we have to commit the root again
pRoot->Commit();
// We want a completely new stream, so fake an empty stream
- INT32 nOldStart = nStart; // save for later deletion
- INT32 nOldSize = nSize;
+ sal_Int32 nOldStart = nStart; // save for later deletion
+ sal_Int32 nOldSize = nSize;
nStart = nPage = STG_EOF;
nSize = nPos = 0;
nOffset = 0;
// Delete all temporary entries
- pRoot->DelTemp( FALSE );
+ pRoot->DelTemp( sal_False );
// set the entry numbers
- INT32 n = 0;
+ sal_Int32 n = 0;
pRoot->Enum( n );
if( !SetSize( n * STGENTRY_SIZE ) )
{
nStart = nOldStart; nSize = nOldSize;
pRoot->RevertAll();
- return FALSE;
+ return sal_False;
}
// set up the cache elements for the new stream
if( !Copy( STG_FREE, nSize ) )
{
pRoot->RevertAll();
- return FALSE;
+ return sal_False;
}
// Write the data to the new stream
if( !pRoot->Store( *this ) )
{
pRoot->RevertAll();
- return FALSE;
+ return sal_False;
}
// fill any remaining entries with empty data
- INT32 ne = nSize / STGENTRY_SIZE;
+ sal_Int32 ne = nSize / STGENTRY_SIZE;
StgEntry aEmpty;
aEmpty.Init();
while( n < ne )
{
- void* p = GetEntry( n++, TRUE );
+ void* p = GetEntry( n++, sal_True );
if( !p )
{
pRoot->RevertAll();
- return FALSE;
+ return sal_False;
}
aEmpty.Store( p );
}
// Now we can release the old stream
- pFat->FreePages( nOldStart, TRUE );
+ pFat->FreePages( nOldStart, sal_True );
rIo.aHdr.SetTOCStart( nStart );
- return TRUE;
+ return sal_True;
}
// Get a dir entry.
-void* StgDirStrm::GetEntry( INT32 n, BOOL bDirty )
+void* StgDirStrm::GetEntry( sal_Int32 n, sal_Bool bDirty )
{
if( n < 0 )
return NULL;
@@ -942,7 +942,7 @@ void* StgDirStrm::GetEntry( INT32 n, BOOL bDirty )
n *= STGENTRY_SIZE;
if( n < 0 && n >= nSize )
return NULL;
- return GetPtr( n, TRUE, bDirty );
+ return GetPtr( n, sal_True, bDirty );
}
// Find a dir entry.
@@ -989,9 +989,9 @@ StgDirEntry* StgDirStrm::Create
}
pRes->bInvalid =
pRes->bRemoved =
- pRes->bTemp = FALSE;
+ pRes->bTemp = sal_False;
pRes->bCreated =
- pRes->bDirty = TRUE;
+ pRes->bDirty = sal_True;
}
else
{
@@ -1001,7 +1001,7 @@ StgDirEntry* StgDirStrm::Create
pRes->pUp = &rStg;
pRes->ppRoot = &pRoot;
pRes->bCreated =
- pRes->bDirty = TRUE;
+ pRes->bDirty = sal_True;
}
else
{
@@ -1014,44 +1014,44 @@ StgDirEntry* StgDirStrm::Create
// Rename the given entry.
-BOOL StgDirStrm::Rename( StgDirEntry& rStg, const String& rOld, const String& rNew )
+sal_Bool StgDirStrm::Rename( StgDirEntry& rStg, const String& rOld, const String& rNew )
{
StgDirEntry* p = Find( rStg, rOld );
if( p )
{
- if( !StgAvlNode::Remove( (StgAvlNode**) &rStg.pDown, p, FALSE ) )
- return FALSE;
+ if( !StgAvlNode::Remove( (StgAvlNode**) &rStg.pDown, p, sal_False ) )
+ return sal_False;
p->aEntry.SetName( rNew );
if( !StgAvlNode::Insert( (StgAvlNode**) &rStg.pDown, p ) )
- return FALSE;
- p->bRenamed = p->bDirty = TRUE;
- return TRUE;
+ return sal_False;
+ p->bRenamed = p->bDirty = sal_True;
+ return sal_True;
}
else
{
rIo.SetError( SVSTREAM_FILE_NOT_FOUND );
- return FALSE;
+ return sal_False;
}
}
// Move the given entry to a different storage.
-BOOL StgDirStrm::Move( StgDirEntry& rStg1, StgDirEntry& rStg2, const String& rName )
+sal_Bool StgDirStrm::Move( StgDirEntry& rStg1, StgDirEntry& rStg2, const String& rName )
{
StgDirEntry* p = Find( rStg1, rName );
if( p )
{
if( !StgAvlNode::Move
( (StgAvlNode**) &rStg1.pDown, (StgAvlNode**) &rStg2.pDown, p ) )
- return FALSE;
- p->bDirty = TRUE;
- return TRUE;
+ return sal_False;
+ p->bDirty = sal_True;
+ return sal_True;
}
else
{
rIo.SetError( SVSTREAM_FILE_NOT_FOUND );
- return FALSE;
+ return sal_False;
}
}
diff --git a/sot/source/sdstor/stgdir.hxx b/sot/source/sdstor/stgdir.hxx
index 3ef510a12e50..e3cf2cb78072 100644
--- a/sot/source/sdstor/stgdir.hxx
+++ b/sot/source/sdstor/stgdir.hxx
@@ -49,52 +49,52 @@ class StgDirEntry : public StgAvlNode
StgStrm* pStgStrm; // storage stream
StgTmpStrm* pTmpStrm; // temporary stream
StgTmpStrm* pCurStrm; // temp stream after commit
- INT32 nEntry; // entry # in TOC stream (temp)
- INT32 nPos; // current position
- BOOL bDirty; // dirty directory entry
- BOOL bCreated; // newly created entry
- BOOL bRemoved; // removed per Invalidate()
- BOOL bRenamed; // renamed
+ sal_Int32 nEntry; // entry # in TOC stream (temp)
+ sal_Int32 nPos; // current position
+ sal_Bool bDirty; // dirty directory entry
+ sal_Bool bCreated; // newly created entry
+ sal_Bool bRemoved; // removed per Invalidate()
+ sal_Bool bRenamed; // renamed
void InitMembers(); // ctor helper
virtual short Compare( const StgAvlNode* ) const;
- BOOL StoreStream( StgIo& ); // store the stream
- BOOL StoreStreams( StgIo& ); // store all streams
+ sal_Bool StoreStream( StgIo& ); // store the stream
+ sal_Bool StoreStreams( StgIo& ); // store all streams
void RevertAll(); // revert the whole tree
- BOOL Strm2Tmp(); // copy stgstream to temp file
- BOOL Tmp2Strm(); // copy temp file to stgstream
+ sal_Bool Strm2Tmp(); // copy stgstream to temp file
+ sal_Bool Tmp2Strm(); // copy temp file to stgstream
public:
StgEntry aEntry; // entry data
- INT32 nRefCnt; // reference count
+ sal_Int32 nRefCnt; // reference count
StreamMode nMode; // open mode
- BOOL bTemp; // TRUE: delete on dir flush
- BOOL bDirect; // TRUE: direct mode
- BOOL bZombie; // TRUE: Removed From StgIo
- BOOL bInvalid; // TRUE: invalid entry
- StgDirEntry( const void*, BOOL * pbOk );
+ sal_Bool bTemp; // sal_True: delete on dir flush
+ sal_Bool bDirect; // sal_True: direct mode
+ sal_Bool bZombie; // sal_True: Removed From StgIo
+ sal_Bool bInvalid; // sal_True: invalid entry
+ StgDirEntry( const void*, sal_Bool * pbOk );
StgDirEntry( const StgEntry& );
~StgDirEntry();
- void Invalidate( BOOL=FALSE ); // invalidate all open entries
- void Enum( INT32& ); // enumerate entries for iteration
- void DelTemp( BOOL ); // delete temporary entries
- BOOL Store( StgDirStrm& ); // save entry into dir strm
- BOOL IsContained( StgDirEntry* ); // check if subentry
+ void Invalidate( sal_Bool=sal_False ); // invalidate all open entries
+ void Enum( sal_Int32& ); // enumerate entries for iteration
+ void DelTemp( sal_Bool ); // delete temporary entries
+ sal_Bool Store( StgDirStrm& ); // save entry into dir strm
+ sal_Bool IsContained( StgDirEntry* ); // check if subentry
- void SetDirty() { bDirty = TRUE; }
- BOOL IsDirty();
+ void SetDirty() { bDirty = sal_True; }
+ sal_Bool IsDirty();
void ClearDirty();
- BOOL Commit();
- BOOL Revert();
+ sal_Bool Commit();
+ sal_Bool Revert();
- void OpenStream( StgIo&, BOOL=FALSE ); // set up an approbiate stream
+ void OpenStream( StgIo&, sal_Bool=sal_False ); // set up an approbiate stream
void Close();
- INT32 GetSize();
- BOOL SetSize( INT32 );
- INT32 Seek( INT32 );
- INT32 Tell() { return nPos; }
- INT32 Read( void*, INT32 );
- INT32 Write( const void*, INT32 );
+ sal_Int32 GetSize();
+ sal_Bool SetSize( sal_Int32 );
+ sal_Int32 Seek( sal_Int32 );
+ sal_Int32 Tell() { return nPos; }
+ sal_Int32 Read( void*, sal_Int32 );
+ sal_Int32 Write( const void*, sal_Int32 );
void Copy( StgDirEntry& );
void Copy( BaseStorageStream& );
};
@@ -104,19 +104,19 @@ class StgDirStrm : public StgDataStrm
friend class StgIterator;
StgDirEntry* pRoot; // root of dir tree
short nEntries; // entries per page
- void SetupEntry( INT32, StgDirEntry* );
+ void SetupEntry( sal_Int32, StgDirEntry* );
public:
StgDirStrm( StgIo& );
~StgDirStrm();
- virtual BOOL SetSize( INT32 ); // change the size
- BOOL Store();
- void* GetEntry( INT32 n, BOOL=FALSE );// get an entry
+ virtual sal_Bool SetSize( sal_Int32 ); // change the size
+ sal_Bool Store();
+ void* GetEntry( sal_Int32 n, sal_Bool=sal_False );// get an entry
StgDirEntry* GetRoot() { return pRoot; }
StgDirEntry* Find( StgDirEntry&, const String& );
StgDirEntry* Create( StgDirEntry&, const String&, StgEntryType );
- BOOL Remove( StgDirEntry&, const String& );
- BOOL Rename( StgDirEntry&, const String&, const String& );
- BOOL Move( StgDirEntry&, StgDirEntry&, const String& );
+ sal_Bool Remove( StgDirEntry&, const String& );
+ sal_Bool Rename( StgDirEntry&, const String&, const String& );
+ sal_Bool Move( StgDirEntry&, StgDirEntry&, const String& );
};
class StgIterator : public StgAvlIterator
diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx
index b140c7fb27e2..b781e4051c3d 100644
--- a/sot/source/sdstor/stgelem.cxx
+++ b/sot/source/sdstor/stgelem.cxx
@@ -39,7 +39,7 @@
#include "stgdir.hxx"
#include "stgio.hxx"
-static BYTE cStgSignature[ 8 ] = { 0xD0,0xCF,0x11,0xE0,0xA1,0xB1,0x1A,0xE1 };
+static sal_uInt8 cStgSignature[ 8 ] = { 0xD0,0xCF,0x11,0xE0,0xA1,0xB1,0x1A,0xE1 };
////////////////////////////// struct ClsId /////////////////////////////
@@ -62,17 +62,17 @@ SvStream& operator >>( SvStream& r, ClsId& rId )
SvStream& operator <<( SvStream& r, const ClsId& rId )
{
return
- r << (INT32) rId.n1
- << (INT16) rId.n2
- << (INT16) rId.n3
- << (UINT8) rId.n4
- << (UINT8) rId.n5
- << (UINT8) rId.n6
- << (UINT8) rId.n7
- << (UINT8) rId.n8
- << (UINT8) rId.n9
- << (UINT8) rId.n10
- << (UINT8) rId.n11;
+ r << (sal_Int32) rId.n1
+ << (sal_Int16) rId.n2
+ << (sal_Int16) rId.n3
+ << (sal_uInt8) rId.n4
+ << (sal_uInt8) rId.n5
+ << (sal_uInt8) rId.n6
+ << (sal_uInt8) rId.n7
+ << (sal_uInt8) rId.n8
+ << (sal_uInt8) rId.n9
+ << (sal_uInt8) rId.n10
+ << (sal_uInt8) rId.n11;
}
///////////////////////////// class StgHeader ////////////////////////////
@@ -99,14 +99,14 @@ void StgHeader::Init()
SetFATPage( i, STG_FREE );
}
-BOOL StgHeader::Load( StgIo& rIo )
+sal_Bool StgHeader::Load( StgIo& rIo )
{
SvStream& r = *rIo.GetStrm();
Load( r );
return rIo.Good();
}
-BOOL StgHeader::Load( SvStream& r )
+sal_Bool StgHeader::Load( SvStream& r )
{
r.Seek( 0L );
r.Read( cSignature, 8 );
@@ -129,10 +129,10 @@ BOOL StgHeader::Load( SvStream& r )
return r.GetErrorCode() == ERRCODE_NONE;
}
-BOOL StgHeader::Store( StgIo& rIo )
+sal_Bool StgHeader::Store( StgIo& rIo )
{
if( !bDirty )
- return TRUE;
+ return sal_True;
SvStream& r = *rIo.GetStrm();
r.Seek( 0L );
r.Write( cSignature, 8 + 16 );
@@ -140,7 +140,7 @@ BOOL StgHeader::Store( StgIo& rIo )
<< nByteOrder // 1C Unicode byte order indicator
<< nPageSize // 1E 1 << nPageSize = block size
<< nDataPageSize // 20 1 << this size == data block size
- << (INT32) 0 << (INT32) 0 << (INT16) 0
+ << (sal_Int32) 0 << (sal_Int32) 0 << (sal_Int16) 0
<< nFATSize // 2C total number of FAT pages
<< nTOCstrm // 30 starting page for the TOC stream
<< nReserved // 34
@@ -152,7 +152,7 @@ BOOL StgHeader::Store( StgIo& rIo )
for( short i = 0; i < 109; i++ )
r << nMasterFAT[ i ];
bDirty = !rIo.Good();
- return BOOL( !bDirty );
+ return sal_Bool( !bDirty );
}
static bool lcl_wontoverflow(short shift)
@@ -161,15 +161,15 @@ static bool lcl_wontoverflow(short shift)
}
// Perform thorough checks also on unknown variables
-BOOL StgHeader::Check()
+sal_Bool StgHeader::Check()
{
- return BOOL( memcmp( cSignature, cStgSignature, 8 ) == 0
+ return sal_Bool( memcmp( cSignature, cStgSignature, 8 ) == 0
&& (short) ( nVersion >> 16 ) == 3 )
&& lcl_wontoverflow(nPageSize)
&& lcl_wontoverflow(nDataPageSize);
}
-INT32 StgHeader::GetFATPage( short n ) const
+sal_Int32 StgHeader::GetFATPage( short n ) const
{
if( n >= 0 && n < 109 )
return nMasterFAT[ n ];
@@ -177,50 +177,50 @@ INT32 StgHeader::GetFATPage( short n ) const
return STG_EOF;
}
-void StgHeader::SetFATPage( short n, INT32 nb )
+void StgHeader::SetFATPage( short n, sal_Int32 nb )
{
if( n >= 0 && n < 109 )
{
if( nMasterFAT[ n ] != nb )
- bDirty = TRUE, nMasterFAT[ n ] = nb;
+ bDirty = sal_True, nMasterFAT[ n ] = nb;
}
}
void StgHeader::SetClassId( const ClsId& r )
{
if( memcmp( &aClsId, &r, sizeof( ClsId ) ) )
- bDirty = TRUE, memcpy( &aClsId, &r, sizeof( ClsId ) );
+ bDirty = sal_True, memcpy( &aClsId, &r, sizeof( ClsId ) );
}
-void StgHeader::SetTOCStart( INT32 n )
+void StgHeader::SetTOCStart( sal_Int32 n )
{
- if( n != nTOCstrm ) bDirty = TRUE, nTOCstrm = n;
+ if( n != nTOCstrm ) bDirty = sal_True, nTOCstrm = n;
}
-void StgHeader::SetDataFATStart( INT32 n )
+void StgHeader::SetDataFATStart( sal_Int32 n )
{
- if( n != nDataFAT ) bDirty = TRUE, nDataFAT = n;
+ if( n != nDataFAT ) bDirty = sal_True, nDataFAT = n;
}
-void StgHeader::SetDataFATSize( INT32 n )
+void StgHeader::SetDataFATSize( sal_Int32 n )
{
- if( n != nDataFATSize ) bDirty = TRUE, nDataFATSize = n;
+ if( n != nDataFATSize ) bDirty = sal_True, nDataFATSize = n;
}
-void StgHeader::SetFATSize( INT32 n )
+void StgHeader::SetFATSize( sal_Int32 n )
{
- if( n != nFATSize ) bDirty = TRUE, nFATSize = n;
+ if( n != nFATSize ) bDirty = sal_True, nFATSize = n;
}
-void StgHeader::SetFATChain( INT32 n )
+void StgHeader::SetFATChain( sal_Int32 n )
{
if( n != nMasterChain )
- bDirty = TRUE, nMasterChain = n;
+ bDirty = sal_True, nMasterChain = n;
}
-void StgHeader::SetMasters( INT32 n )
+void StgHeader::SetMasters( sal_Int32 n )
{
- if( n != nMaster ) bDirty = TRUE, nMaster = n;
+ if( n != nMaster ) bDirty = sal_True, nMaster = n;
}
///////////////////////////// class StgEntry /////////////////////////////
@@ -237,11 +237,11 @@ void ToUnicode_Impl( String& rName )
rName.Erase( 32 );
rName.Convert( ::GetSystemCharSet(), CHARSET_ANSI );
// brute force is OK
- BYTE* p = (BYTE*) rName.GetCharStr();
- for( USHORT i = 0; i < rName.Len(); i++, p++ )
+ sal_uInt8* p = (sal_uInt8*) rName.GetCharStr();
+ for( sal_uInt16 i = 0; i < rName.Len(); i++, p++ )
{
// check each character and substitute blanks for illegal ones
- BYTE cChar = *p;
+ sal_uInt8 cChar = *p;
if( cChar == '!' || cChar == ':' || cChar == '\\' || cChar == '/' )
*p = ' ';
}
@@ -253,14 +253,14 @@ static void FromUnicode( String& rName )
rName.Convert( CHARSET_ANSI, ::GetSystemCharSet() );
}
*/
-BOOL StgEntry::Init()
+sal_Bool StgEntry::Init()
{
memset( this, 0, sizeof (StgEntry) - sizeof( String ) );
SetLeaf( STG_LEFT, STG_FREE );
SetLeaf( STG_RIGHT, STG_FREE );
SetLeaf( STG_CHILD, STG_FREE );
SetLeaf( STG_DATA, STG_EOF );
- return TRUE;
+ return sal_True;
}
static String ToUpperUnicode( const String & rStr )
@@ -278,7 +278,7 @@ static String ToUpperUnicode( const String & rStr )
}
-BOOL StgEntry::SetName( const String& rName )
+sal_Bool StgEntry::SetName( const String& rName )
{
// I don't know the locale, so en_US is hopefully fine
aName = ToUpperUnicode( rName );
@@ -290,12 +290,12 @@ BOOL StgEntry::SetName( const String& rName )
while( i < 32 )
nName[ i++ ] = 0;
nNameLen = ( aName.Len() + 1 ) << 1;
- return TRUE;
+ return sal_True;
}
-INT32 StgEntry::GetLeaf( StgEntryRef eRef ) const
+sal_Int32 StgEntry::GetLeaf( StgEntryRef eRef ) const
{
- INT32 n = -1;
+ sal_Int32 n = -1;
switch( eRef )
{
case STG_LEFT: n = nLeft; break;
@@ -306,7 +306,7 @@ INT32 StgEntry::GetLeaf( StgEntryRef eRef ) const
return n;
}
-void StgEntry::SetLeaf( StgEntryRef eRef, INT32 nPage )
+void StgEntry::SetLeaf( StgEntryRef eRef, sal_Int32 nPage )
{
switch( eRef )
{
@@ -317,12 +317,12 @@ void StgEntry::SetLeaf( StgEntryRef eRef, INT32 nPage )
}
}
-const INT32* StgEntry::GetTime( StgEntryTime eTime ) const
+const sal_Int32* StgEntry::GetTime( StgEntryTime eTime ) const
{
return( eTime == STG_MODIFIED ) ? nMtime : nAtime;
}
-void StgEntry::SetTime( StgEntryTime eTime, INT32* pTime )
+void StgEntry::SetTime( StgEntryTime eTime, sal_Int32* pTime )
{
if( eTime == STG_MODIFIED )
nMtime[ 0 ] = *pTime++, nMtime[ 1 ] = *pTime;
@@ -337,7 +337,7 @@ void StgEntry::SetClassId( const ClsId& r )
void StgEntry::GetName( String& rName ) const
{
- UINT16 n = nNameLen;
+ sal_uInt16 n = nNameLen;
if( n )
n = ( n >> 1 ) - 1;
rName = String( nName, n );
@@ -362,7 +362,7 @@ short StgEntry::Compare( const StgEntry& r ) const
// These load/store operations are a bit more complicated,
// since they have to copy their contents into a packed structure.
-BOOL StgEntry::Load( const void* pFrom )
+sal_Bool StgEntry::Load( const void* pFrom )
{
SvMemoryStream r( (sal_Char*) pFrom, 128, STREAM_READ );
for( short i = 0; i < 32; i++ )
@@ -383,14 +383,14 @@ BOOL StgEntry::Load( const void* pFrom )
>> nSize // 78 file size
>> nUnknown; // 7C unknown
- UINT16 n = nNameLen;
+ sal_uInt16 n = nNameLen;
if( n )
n = ( n >> 1 ) - 1;
if( n > 31 || (nSize < 0 && cType != STG_STORAGE) )
{
// the size makes no sence for the substorage
// TODO/LATER: actually the size should be an unsigned value, but in this case it would mean a stream of more than 2Gb
- return FALSE;
+ return sal_False;
}
aName = String( nName, n );
@@ -398,7 +398,7 @@ BOOL StgEntry::Load( const void* pFrom )
aName = ToUpperUnicode( aName );
aName.Erase( 31 );
- return TRUE;
+ return sal_True;
}
void StgEntry::Store( void* pTo )
diff --git a/sot/source/sdstor/stgelem.hxx b/sot/source/sdstor/stgelem.hxx
index 951d3503adbc..9730813bb0ff 100644
--- a/sot/source/sdstor/stgelem.hxx
+++ b/sot/source/sdstor/stgelem.hxx
@@ -46,51 +46,51 @@ SvStream& operator<<( SvStream&, const ClsId& );
class StgHeader
{
- BYTE cSignature[ 8 ]; // 00 signature (see below)
+ sal_uInt8 cSignature[ 8 ]; // 00 signature (see below)
ClsId aClsId; // 08 Class ID
- INT32 nVersion; // 18 version number
- UINT16 nByteOrder; // 1C Unicode byte order indicator
- INT16 nPageSize; // 1E 1 << nPageSize = block size
- INT16 nDataPageSize; // 20 1 << this size == data block size
- BYTE bDirty; // 22 internal dirty flag
- BYTE cReserved[ 9 ]; // 23
- INT32 nFATSize; // 2C total number of FAT pages
- INT32 nTOCstrm; // 30 starting page for the TOC stream
- INT32 nReserved; // 34
- INT32 nThreshold; // 38 minimum file size for big data
- INT32 nDataFAT; // 3C page # of 1st data FAT block
- INT32 nDataFATSize; // 40 # of data fat blocks
- INT32 nMasterChain; // 44 chain to the next master block
- INT32 nMaster; // 48 # of additional master blocks
- INT32 nMasterFAT[ 109 ]; // 4C first 109 master FAT pages
+ sal_Int32 nVersion; // 18 version number
+ sal_uInt16 nByteOrder; // 1C Unicode byte order indicator
+ sal_Int16 nPageSize; // 1E 1 << nPageSize = block size
+ sal_Int16 nDataPageSize; // 20 1 << this size == data block size
+ sal_uInt8 bDirty; // 22 internal dirty flag
+ sal_uInt8 cReserved[ 9 ]; // 23
+ sal_Int32 nFATSize; // 2C total number of FAT pages
+ sal_Int32 nTOCstrm; // 30 starting page for the TOC stream
+ sal_Int32 nReserved; // 34
+ sal_Int32 nThreshold; // 38 minimum file size for big data
+ sal_Int32 nDataFAT; // 3C page # of 1st data FAT block
+ sal_Int32 nDataFATSize; // 40 # of data fat blocks
+ sal_Int32 nMasterChain; // 44 chain to the next master block
+ sal_Int32 nMaster; // 48 # of additional master blocks
+ sal_Int32 nMasterFAT[ 109 ]; // 4C first 109 master FAT pages
public:
StgHeader();
void Init(); // initialize the header
- BOOL Load( StgIo& );
- BOOL Load( SvStream& );
- BOOL Store( StgIo& );
- BOOL Check(); // check the signature and version
+ sal_Bool Load( StgIo& );
+ sal_Bool Load( SvStream& );
+ sal_Bool Store( StgIo& );
+ sal_Bool Check(); // check the signature and version
short GetByteOrder() const { return nByteOrder; }
- INT32 GetTOCStart() const { return nTOCstrm; }
- void SetTOCStart( INT32 n );
- INT32 GetDataFATStart() const { return nDataFAT; }
- void SetDataFATStart( INT32 n );
- INT32 GetDataFATSize() const { return nDataFATSize; }
- void SetDataFATSize( INT32 n );
- INT32 GetThreshold() const { return nThreshold; }
+ sal_Int32 GetTOCStart() const { return nTOCstrm; }
+ void SetTOCStart( sal_Int32 n );
+ sal_Int32 GetDataFATStart() const { return nDataFAT; }
+ void SetDataFATStart( sal_Int32 n );
+ sal_Int32 GetDataFATSize() const { return nDataFATSize; }
+ void SetDataFATSize( sal_Int32 n );
+ sal_Int32 GetThreshold() const { return nThreshold; }
short GetPageSize() const { return nPageSize; }
short GetDataPageSize() const { return nDataPageSize; }
- INT32 GetFATSize() const { return nFATSize; }
- void SetFATSize( INT32 n );
- INT32 GetFATChain() const { return nMasterChain; }
- void SetFATChain( INT32 n );
- INT32 GetMasters() const { return nMaster; }
- void SetMasters( INT32 n );
+ sal_Int32 GetFATSize() const { return nFATSize; }
+ void SetFATSize( sal_Int32 n );
+ sal_Int32 GetFATChain() const { return nMasterChain; }
+ void SetFATChain( sal_Int32 n );
+ sal_Int32 GetMasters() const { return nMaster; }
+ void SetMasters( sal_Int32 n );
short GetFAT1Size() const { return 109; }
const ClsId& GetClassId() const { return aClsId; }
void SetClassId( const ClsId& );
- INT32 GetFATPage( short ) const;
- void SetFATPage( short, INT32 );
+ sal_Int32 GetFATPage( short ) const;
+ void SetFATPage( short, sal_Int32 );
};
enum StgEntryType { // dir entry types:
@@ -119,42 +119,42 @@ class StgStream;
#define STGENTRY_SIZE 128
class StgEntry { // directory enty
- UINT16 nName[ 32 ]; // 00 name as WCHAR
- INT16 nNameLen; // 40 size of name in bytes including 00H
- BYTE cType; // 42 entry type
- BYTE cFlags; // 43 0 or 1 (tree balance?)
- INT32 nLeft; // 44 left node entry
- INT32 nRight; // 48 right node entry
- INT32 nChild; // 4C 1st child entry if storage
+ sal_uInt16 nName[ 32 ]; // 00 name as WCHAR
+ sal_Int16 nNameLen; // 40 size of name in bytes including 00H
+ sal_uInt8 cType; // 42 entry type
+ sal_uInt8 cFlags; // 43 0 or 1 (tree balance?)
+ sal_Int32 nLeft; // 44 left node entry
+ sal_Int32 nRight; // 48 right node entry
+ sal_Int32 nChild; // 4C 1st child entry if storage
ClsId aClsId; // 50 class ID (optional)
- INT32 nFlags; // 60 state flags(?)
- INT32 nMtime[ 2 ]; // 64 modification time
- INT32 nAtime[ 2 ]; // 6C creation and access time
- INT32 nPage1; // 74 starting block (either direct or translated)
- INT32 nSize; // 78 file size
- INT32 nUnknown; // 7C unknown
+ sal_Int32 nFlags; // 60 state flags(?)
+ sal_Int32 nMtime[ 2 ]; // 64 modification time
+ sal_Int32 nAtime[ 2 ]; // 6C creation and access time
+ sal_Int32 nPage1; // 74 starting block (either direct or translated)
+ sal_Int32 nSize; // 78 file size
+ sal_Int32 nUnknown; // 7C unknown
String aName; // Name as Compare String (ascii, upper)
public:
- BOOL Init(); // initialize the data
- BOOL SetName( const String& ); // store a name (ASCII, up to 32 chars)
+ sal_Bool Init(); // initialize the data
+ sal_Bool SetName( const String& ); // store a name (ASCII, up to 32 chars)
void GetName( String& rName ) const;
// fill in the name
short Compare( const StgEntry& ) const; // compare two entries
- BOOL Load( const void* );
+ sal_Bool Load( const void* );
void Store( void* );
StgEntryType GetType() const { return (StgEntryType) cType; }
- INT32 GetStartPage() const { return nPage1; }
- void SetType( StgEntryType t ) { cType = (BYTE) t; }
- BYTE GetFlags() const { return cFlags; }
- void SetFlags( BYTE c ) { cFlags = c; }
- INT32 GetSize() const { return nSize; }
- void SetSize( INT32 n ) { nSize = n; }
+ sal_Int32 GetStartPage() const { return nPage1; }
+ void SetType( StgEntryType t ) { cType = (sal_uInt8) t; }
+ sal_uInt8 GetFlags() const { return cFlags; }
+ void SetFlags( sal_uInt8 c ) { cFlags = c; }
+ sal_Int32 GetSize() const { return nSize; }
+ void SetSize( sal_Int32 n ) { nSize = n; }
const ClsId& GetClassId() const { return aClsId; }
void SetClassId( const ClsId& );
- INT32 GetLeaf( StgEntryRef ) const;
- void SetLeaf( StgEntryRef, INT32 );
- const INT32* GetTime( StgEntryTime ) const;
- void SetTime( StgEntryTime, INT32* );
+ sal_Int32 GetLeaf( StgEntryRef ) const;
+ void SetLeaf( StgEntryRef, sal_Int32 );
+ const sal_Int32* GetTime( StgEntryTime ) const;
+ void SetTime( StgEntryTime, sal_Int32* );
};
diff --git a/sot/source/sdstor/stgio.cxx b/sot/source/sdstor/stgio.cxx
index f2fe58165e23..36b841b29ca0 100644
--- a/sot/source/sdstor/stgio.cxx
+++ b/sot/source/sdstor/stgio.cxx
@@ -46,7 +46,7 @@ StgIo::StgIo() : StgCache()
pDataFAT = NULL;
pDataStrm = NULL;
pFAT = NULL;
- bCopied = FALSE;
+ bCopied = sal_False;
}
StgIo::~StgIo()
@@ -59,7 +59,7 @@ StgIo::~StgIo()
// Load the header. Do not set an error code if the header is invalid.
-BOOL StgIo::Load()
+sal_Bool StgIo::Load()
{
if( pStrm )
{
@@ -68,7 +68,7 @@ BOOL StgIo::Load()
if( aHdr.Check() )
SetupStreams();
else
- return FALSE;
+ return sal_False;
}
}
return Good();
@@ -76,7 +76,7 @@ BOOL StgIo::Load()
// Set up an initial, empty storage
-BOOL StgIo::Init()
+sal_Bool StgIo::Init()
{
aHdr.Init();
SetupStreams();
@@ -122,7 +122,7 @@ short StgIo::GetDataPageSize()
// Commit everything
-BOOL StgIo::CommitAll()
+sal_Bool StgIo::CommitAll()
{
// Store the data (all streams and the TOC)
if( pTOC->Store() )
@@ -135,82 +135,82 @@ BOOL StgIo::CommitAll()
if( aHdr.Store( *this ) )
{
pStrm->Flush();
- ULONG n = pStrm->GetError();
+ sal_uLong n = pStrm->GetError();
SetError( n );
#ifdef DBG_UTIL
if( n==0 ) ValidateFATs();
#endif
- return BOOL( n == 0 );
+ return sal_Bool( n == 0 );
}
}
}
SetError( SVSTREAM_WRITE_ERROR );
- return FALSE;
+ return sal_False;
}
class EasyFat
{
- INT32 *pFat;
- BOOL *pFree;
- INT32 nPages;
- INT32 nPageSize;
+ sal_Int32 *pFat;
+ sal_Bool *pFree;
+ sal_Int32 nPages;
+ sal_Int32 nPageSize;
public:
- EasyFat( StgIo & rIo, StgStrm *pFatStream, INT32 nPSize );
+ EasyFat( StgIo & rIo, StgStrm *pFatStream, sal_Int32 nPSize );
~EasyFat() { delete[] pFat; delete[] pFree; }
- INT32 GetPageSize() { return nPageSize; }
- INT32 Count() { return nPages; }
- INT32 operator[]( INT32 nOffset ) { return pFat[ nOffset ]; }
+ sal_Int32 GetPageSize() { return nPageSize; }
+ sal_Int32 Count() { return nPages; }
+ sal_Int32 operator[]( sal_Int32 nOffset ) { return pFat[ nOffset ]; }
- ULONG Mark( INT32 nPage, INT32 nCount, INT32 nExpect );
- BOOL HasUnrefChains();
+ sal_uLong Mark( sal_Int32 nPage, sal_Int32 nCount, sal_Int32 nExpect );
+ sal_Bool HasUnrefChains();
};
-EasyFat::EasyFat( StgIo& rIo, StgStrm* pFatStream, INT32 nPSize )
+EasyFat::EasyFat( StgIo& rIo, StgStrm* pFatStream, sal_Int32 nPSize )
{
nPages = pFatStream->GetSize() >> 2;
nPageSize = nPSize;
- pFat = new INT32[ nPages ];
- pFree = new BOOL[ nPages ];
+ pFat = new sal_Int32[ nPages ];
+ pFree = new sal_Bool[ nPages ];
StgPage *pPage = NULL;
- INT32 nFatPageSize = (1 << rIo.aHdr.GetPageSize()) - 2;
+ sal_Int32 nFatPageSize = (1 << rIo.aHdr.GetPageSize()) - 2;
- for( INT32 nPage = 0; nPage < nPages; nPage++ )
+ for( sal_Int32 nPage = 0; nPage < nPages; nPage++ )
{
if( ! (nPage % nFatPageSize) )
{
pFatStream->Pos2Page( nPage << 2 );
- INT32 nPhysPage = pFatStream->GetPage();
- pPage = rIo.Get( nPhysPage, TRUE );
+ sal_Int32 nPhysPage = pFatStream->GetPage();
+ pPage = rIo.Get( nPhysPage, sal_True );
}
pFat[ nPage ] = pPage->GetPage( short( nPage % nFatPageSize ) );
- pFree[ nPage ] = TRUE;
+ pFree[ nPage ] = sal_True;
}
}
-BOOL EasyFat::HasUnrefChains()
+sal_Bool EasyFat::HasUnrefChains()
{
- for( INT32 nPage = 0; nPage < nPages; nPage++ )
+ for( sal_Int32 nPage = 0; nPage < nPages; nPage++ )
{
if( pFree[ nPage ] && pFat[ nPage ] != -1 )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-ULONG EasyFat::Mark( INT32 nPage, INT32 nCount, INT32 nExpect )
+sal_uLong EasyFat::Mark( sal_Int32 nPage, sal_Int32 nCount, sal_Int32 nExpect )
{
if( nCount > 0 )
--nCount /= GetPageSize(), nCount++;
- INT32 nCurPage = nPage;
+ sal_Int32 nCurPage = nPage;
while( nCount != 0 )
{
- pFree[ nCurPage ] = FALSE;
+ pFree[ nCurPage ] = sal_False;
nCurPage = pFat[ nCurPage ];
//Stream zu lang
if( nCurPage != nExpect && nCount == 1 )
@@ -232,22 +232,22 @@ ULONG EasyFat::Mark( INT32 nPage, INT32 nCount, INT32 nExpect )
class Validator
{
- ULONG nError;
+ sal_uLong nError;
EasyFat aSmallFat;
EasyFat aFat;
StgIo &rIo;
- ULONG ValidateMasterFATs();
- ULONG ValidateDirectoryEntries();
- ULONG FindUnrefedChains();
- ULONG MarkAll( StgDirEntry *pEntry );
+ sal_uLong ValidateMasterFATs();
+ sal_uLong ValidateDirectoryEntries();
+ sal_uLong FindUnrefedChains();
+ sal_uLong MarkAll( StgDirEntry *pEntry );
public:
Validator( StgIo &rIo );
- BOOL IsError() { return nError != 0; }
+ sal_Bool IsError() { return nError != 0; }
};
Validator::Validator( StgIo &rIoP )
@@ -255,7 +255,7 @@ Validator::Validator( StgIo &rIoP )
aFat( rIoP, rIoP.pFAT, 1 << rIoP.aHdr.GetPageSize() ),
rIo( rIoP )
{
- ULONG nErr = nError = FAT_OK;
+ sal_uLong nErr = nError = FAT_OK;
if( ( nErr = ValidateMasterFATs() ) != FAT_OK )
nError = nErr;
@@ -265,13 +265,13 @@ Validator::Validator( StgIo &rIoP )
nError = nErr;
}
-ULONG Validator::ValidateMasterFATs()
+sal_uLong Validator::ValidateMasterFATs()
{
- INT32 nCount = rIo.aHdr.GetFATSize();
- ULONG nErr;
- for( INT32 i = 0; i < nCount; i++ )
+ sal_Int32 nCount = rIo.aHdr.GetFATSize();
+ sal_uLong nErr;
+ for( sal_Int32 i = 0; i < nCount; i++ )
{
- if( ( nErr = aFat.Mark(rIo.pFAT->GetPage( short(i), FALSE ), aFat.GetPageSize(), -3 )) != FAT_OK )
+ if( ( nErr = aFat.Mark(rIo.pFAT->GetPage( short(i), sal_False ), aFat.GetPageSize(), -3 )) != FAT_OK )
return nErr;
}
if( rIo.aHdr.GetMasters() )
@@ -280,10 +280,10 @@ ULONG Validator::ValidateMasterFATs()
return FAT_OK;
}
-ULONG Validator::MarkAll( StgDirEntry *pEntry )
+sal_uLong Validator::MarkAll( StgDirEntry *pEntry )
{
StgIterator aIter( *pEntry );
- ULONG nErr = FAT_OK;
+ sal_uLong nErr = FAT_OK;
for( StgDirEntry* p = aIter.First(); p ; p = aIter.Next() )
{
if( p->aEntry.GetType() == STG_STORAGE )
@@ -294,7 +294,7 @@ ULONG Validator::MarkAll( StgDirEntry *pEntry )
}
else
{
- INT32 nSize = p->aEntry.GetSize();
+ sal_Int32 nSize = p->aEntry.GetSize();
if( nSize < rIo.aHdr.GetThreshold() )
nErr = aSmallFat.Mark( p->aEntry.GetStartPage(),nSize, -2 );
else
@@ -306,10 +306,10 @@ ULONG Validator::MarkAll( StgDirEntry *pEntry )
return FAT_OK;
}
-ULONG Validator::ValidateDirectoryEntries()
+sal_uLong Validator::ValidateDirectoryEntries()
{
// Normale DirEntries
- ULONG nErr = MarkAll( rIo.pTOC->GetRoot() );
+ sal_uLong nErr = MarkAll( rIo.pTOC->GetRoot() );
if( nErr != FAT_OK )
return nErr;
// Small Data
@@ -329,7 +329,7 @@ ULONG Validator::ValidateDirectoryEntries()
return nErr;
}
-ULONG Validator::FindUnrefedChains()
+sal_uLong Validator::FindUnrefedChains()
{
if( aSmallFat.HasUnrefChains() ||
aFat.HasUnrefChains() )
@@ -350,12 +350,12 @@ const Link& StgIo::GetErrorLink()
return ErrorLink::get();
}
-ULONG StgIo::ValidateFATs()
+sal_uLong StgIo::ValidateFATs()
{
if( bFile )
{
Validator *pV = new Validator( *this );
- BOOL bRet1 = !pV->IsError(), bRet2 = TRUE ;
+ sal_Bool bRet1 = !pV->IsError(), bRet2 = sal_True ;
delete pV;
SvFileStream *pFileStrm = ( SvFileStream *) GetStrm();
StgIo aIo;
@@ -368,7 +368,7 @@ ULONG StgIo::ValidateFATs()
delete pV;
}
- ULONG nErr;
+ sal_uLong nErr;
if( bRet1 != bRet2 )
nErr = bRet1 ? FAT_ONFILEERROR : FAT_INMEMORYERROR;
else nErr = bRet1 ? FAT_OK : FAT_BOTHERROR;
@@ -378,7 +378,7 @@ ULONG StgIo::ValidateFATs()
aArg.aFile = pFileStrm->GetFileName();
aArg.nErr = nErr;
ErrorLink::get().Call( &aArg );
- bCopied = TRUE;
+ bCopied = sal_True;
}
// DBG_ASSERT( nErr == FAT_OK ,"Storage kaputt");
return nErr;
diff --git a/sot/source/sdstor/stgio.hxx b/sot/source/sdstor/stgio.hxx
index db1c00b8d521..45b1985618f1 100644
--- a/sot/source/sdstor/stgio.hxx
+++ b/sot/source/sdstor/stgio.hxx
@@ -53,12 +53,12 @@ enum FAT_ERROR
struct StgLinkArg
{
String aFile;
- ULONG nErr;
+ sal_uLong nErr;
};
class StgIo : public StgCache {
void SetupStreams(); // load all internal streams
- BOOL bCopied;
+ sal_Bool bCopied;
public:
StgIo();
~StgIo();
@@ -68,13 +68,13 @@ public:
StgDataStrm* pDataFAT; // small data FAT stream
StgDataStrm* pDataStrm; // small data stream
short GetDataPageSize(); // get the logical data page size
- BOOL Load(); // load a storage file
- BOOL Init(); // set up an empty file
- BOOL CommitAll(); // commit everything (root commit)
+ sal_Bool Load(); // load a storage file
+ sal_Bool Init(); // set up an empty file
+ sal_Bool CommitAll(); // commit everything (root commit)
static void SetErrorLink( const Link& );
static const Link& GetErrorLink();
- ULONG ValidateFATs( );
+ sal_uLong ValidateFATs( );
};
#endif
diff --git a/sot/source/sdstor/stgole.cxx b/sot/source/sdstor/stgole.cxx
index 0bb5887eed76..80481957b3d0 100644
--- a/sot/source/sdstor/stgole.cxx
+++ b/sot/source/sdstor/stgole.cxx
@@ -40,10 +40,10 @@
///////////////////////// class StgInternalStream ////////////////////////
StgInternalStream::StgInternalStream
- ( BaseStorage& rStg, const String& rName, BOOL bWr )
+ ( BaseStorage& rStg, const String& rName, sal_Bool bWr )
{
- bIsWritable = TRUE;
- USHORT nMode = bWr
+ bIsWritable = sal_True;
+ sal_uInt16 nMode = bWr
? STREAM_WRITE | STREAM_SHARE_DENYALL
: STREAM_READ | STREAM_SHARE_DENYWRITE | STREAM_NOCREATE;
pStrm = rStg.OpenStream( rName, nMode );
@@ -58,7 +58,7 @@ StgInternalStream::~StgInternalStream()
delete pStrm;
}
-ULONG StgInternalStream::GetData( void* pData, ULONG nSize )
+sal_uLong StgInternalStream::GetData( void* pData, sal_uLong nSize )
{
if( pStrm )
{
@@ -70,7 +70,7 @@ ULONG StgInternalStream::GetData( void* pData, ULONG nSize )
return 0;
}
-ULONG StgInternalStream::PutData( const void* pData, ULONG nSize )
+sal_uLong StgInternalStream::PutData( const void* pData, sal_uLong nSize )
{
if( pStrm )
{
@@ -82,7 +82,7 @@ ULONG StgInternalStream::PutData( const void* pData, ULONG nSize )
return 0;
}
-ULONG StgInternalStream::SeekPos( ULONG nPos )
+sal_uLong StgInternalStream::SeekPos( sal_uLong nPos )
{
return pStrm ? pStrm->Seek( nPos ) : 0;
}
@@ -104,43 +104,43 @@ void StgInternalStream::Commit()
///////////////////////// class StgCompObjStream /////////////////////////
-StgCompObjStream::StgCompObjStream( BaseStorage& rStg, BOOL bWr )
+StgCompObjStream::StgCompObjStream( BaseStorage& rStg, sal_Bool bWr )
: StgInternalStream( rStg, String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "\1CompObj" ) ), bWr )
{
memset( &aClsId, 0, sizeof( ClsId ) );
nCbFormat = 0;
}
-BOOL StgCompObjStream::Load()
+sal_Bool StgCompObjStream::Load()
{
memset( &aClsId, 0, sizeof( ClsId ) );
nCbFormat = 0;
aUserName.Erase();
if( GetError() != SVSTREAM_OK )
- return FALSE;
+ return sal_False;
Seek( 8L ); // skip the first part
- INT32 nMarker = 0;
+ sal_Int32 nMarker = 0;
*this >> nMarker;
if( nMarker == -1L )
{
*this >> aClsId;
- INT32 nLen1 = 0;
+ sal_Int32 nLen1 = 0;
*this >> nLen1;
// higher bits are ignored
nLen1 &= 0xFFFF;
- sal_Char* p = new sal_Char[ (USHORT) nLen1 ];
- if( Read( p, nLen1 ) == (ULONG) nLen1 )
+ sal_Char* p = new sal_Char[ (sal_uInt16) nLen1 ];
+ if( Read( p, nLen1 ) == (sal_uLong) nLen1 )
{
aUserName = nLen1 ? String( p, gsl_getSystemTextEncoding() ) : String();
/* // Now we can read the CB format
- INT32 nLen2 = 0;
+ sal_Int32 nLen2 = 0;
*this >> nLen2;
if( nLen2 > 0 )
{
// get a string name
if( nLen2 > nLen1 )
delete p, p = new char[ nLen2 ];
- if( Read( p, nLen2 ) == (ULONG) nLen2 && nLen2 )
+ if( Read( p, nLen2 ) == (sal_uLong) nLen2 && nLen2 )
nCbFormat = Exchange::RegisterFormatName( String( p ) );
else
SetError( SVSTREAM_GENERALERROR );
@@ -158,73 +158,73 @@ BOOL StgCompObjStream::Load()
SetError( SVSTREAM_GENERALERROR );
delete [] p;
}
- return BOOL( GetError() == SVSTREAM_OK );
+ return sal_Bool( GetError() == SVSTREAM_OK );
}
-BOOL StgCompObjStream::Store()
+sal_Bool StgCompObjStream::Store()
{
if( GetError() != SVSTREAM_OK )
- return FALSE;
+ return sal_False;
Seek( 0L );
ByteString aAsciiUserName( aUserName, RTL_TEXTENCODING_ASCII_US );
- *this << (INT16) 1 // Version?
- << (INT16) -2 // 0xFFFE = Byte Order Indicator
- << (INT32) 0x0A03 // Windows 3.10
- << (INT32) -1L
+ *this << (sal_Int16) 1 // Version?
+ << (sal_Int16) -2 // 0xFFFE = Byte Order Indicator
+ << (sal_Int32) 0x0A03 // Windows 3.10
+ << (sal_Int32) -1L
<< aClsId // Class ID
- << (INT32) (aAsciiUserName.Len() + 1)
+ << (sal_Int32) (aAsciiUserName.Len() + 1)
<< (const char *)aAsciiUserName.GetBuffer()
- << (UINT8) 0; // string terminator
+ << (sal_uInt8) 0; // string terminator
/* // determine the clipboard format string
String aCbFmt;
if( nCbFormat > FORMAT_GDIMETAFILE )
aCbFmt = Exchange::GetFormatName( nCbFormat );
if( aCbFmt.Len() )
- *this << (INT32) aCbFmt.Len() + 1
+ *this << (sal_Int32) aCbFmt.Len() + 1
<< (const char*) aCbFmt
- << (UINT8) 0;
+ << (sal_uInt8) 0;
else if( nCbFormat )
- *this << (INT32) -1 // for Windows
- << (INT32) nCbFormat;
+ *this << (sal_Int32) -1 // for Windows
+ << (sal_Int32) nCbFormat;
else
- *this << (INT32) 0; // no clipboard format
+ *this << (sal_Int32) 0; // no clipboard format
*/
WriteClipboardFormat( *this, nCbFormat );
- *this << (INT32) 0; // terminator
+ *this << (sal_Int32) 0; // terminator
Commit();
- return BOOL( GetError() == SVSTREAM_OK );
+ return sal_Bool( GetError() == SVSTREAM_OK );
}
/////////////////////////// class StgOleStream ///////////////////////////
-StgOleStream::StgOleStream( BaseStorage& rStg, BOOL bWr )
+StgOleStream::StgOleStream( BaseStorage& rStg, sal_Bool bWr )
: StgInternalStream( rStg, String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "\1Ole" ) ), bWr )
{
nFlags = 0;
}
-BOOL StgOleStream::Load()
+sal_Bool StgOleStream::Load()
{
nFlags = 0;
if( GetError() != SVSTREAM_OK )
- return FALSE;
- INT32 version = 0;
+ return sal_False;
+ sal_Int32 version = 0;
Seek( 0L );
*this >> version >> nFlags;
- return BOOL( GetError() == SVSTREAM_OK );
+ return sal_Bool( GetError() == SVSTREAM_OK );
}
-BOOL StgOleStream::Store()
+sal_Bool StgOleStream::Store()
{
if( GetError() != SVSTREAM_OK )
- return FALSE;
+ return sal_False;
Seek( 0L );
- *this << (INT32) 0x02000001 // OLE version, format
- << (INT32) nFlags // Object flags
- << (INT32) 0 // Update Options
- << (INT32) 0 // reserved
- << (INT32) 0; // Moniker 1
+ *this << (sal_Int32) 0x02000001 // OLE version, format
+ << (sal_Int32) nFlags // Object flags
+ << (sal_Int32) 0 // Update Options
+ << (sal_Int32) 0 // reserved
+ << (sal_Int32) 0; // Moniker 1
Commit();
- return BOOL( GetError() == SVSTREAM_OK );
+ return sal_Bool( GetError() == SVSTREAM_OK );
}
diff --git a/sot/source/sdstor/stgole.hxx b/sot/source/sdstor/stgole.hxx
index a9eebe1aae68..4f3901f5212b 100644
--- a/sot/source/sdstor/stgole.hxx
+++ b/sot/source/sdstor/stgole.hxx
@@ -36,12 +36,12 @@
class StgInternalStream : public SvStream
{
BaseStorageStream* pStrm;
- virtual ULONG GetData( void* pData, ULONG nSize );
- virtual ULONG PutData( const void* pData, ULONG nSize );
- virtual ULONG SeekPos( ULONG nPos );
+ virtual sal_uLong GetData( void* pData, sal_uLong nSize );
+ virtual sal_uLong PutData( const void* pData, sal_uLong nSize );
+ virtual sal_uLong SeekPos( sal_uLong nPos );
virtual void FlushData();
public:
- StgInternalStream( BaseStorage&, const String&, BOOL );
+ StgInternalStream( BaseStorage&, const String&, sal_Bool );
~StgInternalStream();
void Commit();
};
@@ -52,14 +52,14 @@ class StgCompObjStream : public StgInternalStream
{
ClsId aClsId;
String aUserName;
- ULONG nCbFormat;
+ sal_uLong nCbFormat;
public:
- StgCompObjStream( BaseStorage&, BOOL );
+ StgCompObjStream( BaseStorage&, sal_Bool );
ClsId& GetClsId() { return aClsId; }
String& GetUserName() { return aUserName; }
- ULONG& GetCbFormat() { return nCbFormat; }
- BOOL Load();
- BOOL Store();
+ sal_uLong& GetCbFormat() { return nCbFormat; }
+ sal_Bool Load();
+ sal_Bool Store();
};
// standard stream "\1Ole"
@@ -68,10 +68,10 @@ class StgOleStream : public StgInternalStream
{
sal_uInt32 nFlags;
public:
- StgOleStream( BaseStorage&, BOOL );
+ StgOleStream( BaseStorage&, sal_Bool );
sal_uInt32& GetFlags() { return nFlags; }
- BOOL Load();
- BOOL Store();
+ sal_Bool Load();
+ sal_Bool Store();
};
#endif
diff --git a/sot/source/sdstor/stgstrms.cxx b/sot/source/sdstor/stgstrms.cxx
index 840f2cf2bba8..b3a775417817 100644
--- a/sot/source/sdstor/stgstrms.cxx
+++ b/sot/source/sdstor/stgstrms.cxx
@@ -46,10 +46,10 @@
///////////////////////////// class StgFAT ///////////////////////////////
// The FAT class performs FAT operations on an underlying storage stream.
-// This stream is either the master FAT stream (m == TRUE ) or a normal
+// This stream is either the master FAT stream (m == sal_True ) or a normal
// storage stream, which then holds the FAT for small data allocations.
-StgFAT::StgFAT( StgStrm& r, BOOL m ) : rStrm( r )
+StgFAT::StgFAT( StgStrm& r, sal_Bool m ) : rStrm( r )
{
bPhys = m;
nPageSize = rStrm.GetIo().GetPhysPageSize();
@@ -61,7 +61,7 @@ StgFAT::StgFAT( StgStrm& r, BOOL m ) : rStrm( r )
// Retrieve the physical page for a given byte offset.
-StgPage* StgFAT::GetPhysPage( INT32 nByteOff )
+StgPage* StgFAT::GetPhysPage( sal_Int32 nByteOff )
{
StgPage* pPg = NULL;
// Position within the underlying stream
@@ -69,16 +69,16 @@ StgPage* StgFAT::GetPhysPage( INT32 nByteOff )
if( rStrm.Pos2Page( nByteOff ) )
{
nOffset = rStrm.GetOffset();
- INT32 nPhysPage = rStrm.GetPage();
+ sal_Int32 nPhysPage = rStrm.GetPage();
// get the physical page (must be present)
- pPg = rStrm.GetIo().Get( nPhysPage, TRUE );
+ pPg = rStrm.GetIo().Get( nPhysPage, sal_True );
}
return pPg;
}
// Get the follow page for a certain FAT page.
-INT32 StgFAT::GetNextPage( INT32 nPg )
+sal_Int32 StgFAT::GetNextPage( sal_Int32 nPg )
{
if( nPg >= 0 )
{
@@ -94,16 +94,16 @@ INT32 StgFAT::GetNextPage( INT32 nPg )
// underlying stream size. It is treated as a recommendation
// to abort the search to inhibit excessive file growth.
-INT32 StgFAT::FindBlock( INT32& nPgs )
+sal_Int32 StgFAT::FindBlock( sal_Int32& nPgs )
{
- INT32 nMinStart = STG_EOF, nMinLen = 0;
- INT32 nMaxStart = STG_EOF, nMaxLen = 0x7FFFFFFFL;
- INT32 nTmpStart = STG_EOF, nTmpLen = 0;
- INT32 nPages = rStrm.GetSize() >> 2;
- BOOL bFound = FALSE;
+ sal_Int32 nMinStart = STG_EOF, nMinLen = 0;
+ sal_Int32 nMaxStart = STG_EOF, nMaxLen = 0x7FFFFFFFL;
+ sal_Int32 nTmpStart = STG_EOF, nTmpLen = 0;
+ sal_Int32 nPages = rStrm.GetSize() >> 2;
+ sal_Bool bFound = sal_False;
StgPage* pPg = NULL;
short nEntry = 0;
- for( INT32 i = 0; i < nPages; i++, nEntry++ )
+ for( sal_Int32 i = 0; i < nPages; i++, nEntry++ )
{
if( !( nEntry % nEntries ) )
{
@@ -113,7 +113,7 @@ INT32 StgFAT::FindBlock( INT32& nPgs )
if( !pPg )
return STG_EOF;
}
- INT32 nCur = pPg->GetPage( nEntry );
+ sal_Int32 nCur = pPg->GetPage( nEntry );
if( nCur == STG_FREE )
{
// count the size of this area
@@ -131,12 +131,12 @@ INT32 StgFAT::FindBlock( INT32& nPgs )
{
if( nTmpLen > nPgs && nTmpLen < nMaxLen )
// block > requested size
- nMaxLen = nTmpLen, nMaxStart = nTmpStart, bFound = TRUE;
+ nMaxLen = nTmpLen, nMaxStart = nTmpStart, bFound = sal_True;
else if( nTmpLen >= nMinLen )
{
// block < requested size
nMinLen = nTmpLen, nMinStart = nTmpStart;
- bFound = TRUE;
+ bFound = sal_True;
if( nTmpLen == nPgs )
break;
}
@@ -157,8 +157,8 @@ INT32 StgFAT::FindBlock( INT32& nPgs )
if( nMinStart != STG_EOF && nMaxStart != STG_EOF )
{
// two areas found; return the best fit area
- INT32 nMinDiff = nPgs - nMinLen;
- INT32 nMaxDiff = nMaxLen - nPgs;
+ sal_Int32 nMinDiff = nPgs - nMinLen;
+ sal_Int32 nMaxDiff = nMaxLen - nPgs;
if( nMinDiff > nMaxDiff )
nMinStart = STG_EOF;
}
@@ -174,19 +174,19 @@ INT32 StgFAT::FindBlock( INT32& nPgs )
// Set up the consecutive chain for a given block.
-BOOL StgFAT::MakeChain( INT32 nStart, INT32 nPgs )
+sal_Bool StgFAT::MakeChain( sal_Int32 nStart, sal_Int32 nPgs )
{
- INT32 nPos = nStart << 2;
+ sal_Int32 nPos = nStart << 2;
StgPage* pPg = GetPhysPage( nPos );
if( !pPg || !nPgs )
- return FALSE;
+ return sal_False;
while( --nPgs )
{
if( nOffset >= nPageSize )
{
pPg = GetPhysPage( nPos );
if( !pPg )
- return FALSE;
+ return sal_False;
}
pPg->SetPage( nOffset >> 2, ++nStart );
nOffset += 4;
@@ -196,22 +196,22 @@ BOOL StgFAT::MakeChain( INT32 nStart, INT32 nPgs )
{
pPg = GetPhysPage( nPos );
if( !pPg )
- return FALSE;
+ return sal_False;
}
pPg->SetPage( nOffset >> 2, STG_EOF );
- return TRUE;
+ return sal_True;
}
// Allocate a block of data from the given page number on.
// It the page number is != STG_EOF, chain the block.
-INT32 StgFAT::AllocPages( INT32 nBgn, INT32 nPgs )
+sal_Int32 StgFAT::AllocPages( sal_Int32 nBgn, sal_Int32 nPgs )
{
- INT32 nOrig = nBgn;
- INT32 nLast = nBgn;
- INT32 nBegin = STG_EOF;
- INT32 nAlloc;
- INT32 nPages = rStrm.GetSize() >> 2;
+ sal_Int32 nOrig = nBgn;
+ sal_Int32 nLast = nBgn;
+ sal_Int32 nBegin = STG_EOF;
+ sal_Int32 nAlloc;
+ sal_Int32 nPages = rStrm.GetSize() >> 2;
short nPasses = 0;
// allow for two passes
while( nPasses < 2 )
@@ -247,7 +247,7 @@ INT32 StgFAT::AllocPages( INT32 nBgn, INT32 nPgs )
if( !rStrm.SetSize( ( nPages + nPgs ) << 2 ) )
return STG_EOF;
if( !bPhys && !InitNew( nPages ) )
- return FALSE;
+ return sal_False;
nPages = rStrm.GetSize() >> 2;
nPasses++;
}
@@ -267,9 +267,9 @@ INT32 StgFAT::AllocPages( INT32 nBgn, INT32 nPgs )
// It can be assumed that the stream size is always on
// a page boundary
-BOOL StgFAT::InitNew( INT32 nPage1 )
+sal_Bool StgFAT::InitNew( sal_Int32 nPage1 )
{
- INT32 n = ( ( rStrm.GetSize() >> 2 ) - nPage1 ) / nEntries;
+ sal_Int32 n = ( ( rStrm.GetSize() >> 2 ) - nPage1 ) / nEntries;
while( n-- )
{
StgPage* pPg = NULL;
@@ -279,29 +279,29 @@ BOOL StgFAT::InitNew( INT32 nPage1 )
// Initialize the page
pPg = rStrm.GetIo().Copy( rStrm.GetPage(), STG_FREE );
if ( !pPg )
- return FALSE;
+ return sal_False;
for( short i = 0; i < nEntries; i++ )
pPg->SetPage( i, STG_FREE );
nPage1++;
}
- return TRUE;
+ return sal_True;
}
// Release a chain
-BOOL StgFAT::FreePages( INT32 nStart, BOOL bAll )
+sal_Bool StgFAT::FreePages( sal_Int32 nStart, sal_Bool bAll )
{
while( nStart >= 0 )
{
StgPage* pPg = GetPhysPage( nStart << 2 );
if( !pPg )
- return FALSE;
+ return sal_False;
nStart = pPg->GetPage( nOffset >> 2 );
// The first released page is either set to EOF or FREE
pPg->SetPage( nOffset >> 2, bAll ? STG_FREE : STG_EOF );
- bAll = TRUE;
+ bAll = sal_True;
}
- return TRUE;
+ return sal_True;
}
///////////////////////////// class StgStrm ////////////////////////////////
@@ -339,21 +339,21 @@ void StgStrm::SetEntry( StgDirEntry& r )
// If the position is behind the size, set the stream right
// behind the EOF.
-BOOL StgStrm::Pos2Page( INT32 nBytePos )
+sal_Bool StgStrm::Pos2Page( sal_Int32 nBytePos )
{
- INT32 nRel, nBgn;
+ sal_Int32 nRel, nBgn;
// Values < 0 seek to the end
if( nBytePos < 0 || nBytePos >= nSize )
nBytePos = nSize;
// Adjust the position back to offset 0
nPos -= nOffset;
- INT32 nMask = ~( nPageSize - 1 );
- INT32 nOld = nPos & nMask;
- INT32 nNew = nBytePos & nMask;
+ sal_Int32 nMask = ~( nPageSize - 1 );
+ sal_Int32 nOld = nPos & nMask;
+ sal_Int32 nNew = nBytePos & nMask;
nOffset = (short) ( nBytePos & ~nMask );
nPos = nBytePos;
if( nOld == nNew )
- return TRUE;
+ return sal_True;
if( nNew > nOld )
{
// the new position is behind the current, so an incremental
@@ -370,7 +370,7 @@ BOOL StgStrm::Pos2Page( INT32 nBytePos )
}
// now, traverse the FAT chain.
nRel /= nPageSize;
- INT32 nLast = STG_EOF;
+ sal_Int32 nLast = STG_EOF;
while( nRel && nBgn >= 0 )
{
nLast = nBgn;
@@ -388,12 +388,12 @@ BOOL StgStrm::Pos2Page( INT32 nBytePos )
nOffset = nPageSize;
}
nPage = nBgn;
- return BOOL( nRel == 0 && nPage >= 0 );
+ return sal_Bool( nRel == 0 && nPage >= 0 );
}
// Retrieve the physical page for a given byte offset.
-StgPage* StgStrm::GetPhysPage( INT32 nBytePos, BOOL bForce )
+StgPage* StgStrm::GetPhysPage( sal_Int32 nBytePos, sal_Bool bForce )
{
if( !Pos2Page( nBytePos ) )
return NULL;
@@ -403,16 +403,16 @@ StgPage* StgStrm::GetPhysPage( INT32 nBytePos, BOOL bForce )
// Copy an entire stream. Both streams are allocated in the FAT.
// The target stream is this stream.
-BOOL StgStrm::Copy( INT32 nFrom, INT32 nBytes )
+sal_Bool StgStrm::Copy( sal_Int32 nFrom, sal_Int32 nBytes )
{
- INT32 nTo = nStart;
- INT32 nPgs = ( nBytes + nPageSize - 1 ) / nPageSize;
+ sal_Int32 nTo = nStart;
+ sal_Int32 nPgs = ( nBytes + nPageSize - 1 ) / nPageSize;
while( nPgs-- )
{
if( nTo < 0 )
{
rIo.SetError( SVSTREAM_FILEFORMAT_ERROR );
- return FALSE;
+ return sal_False;
}
rIo.Copy( nTo, nFrom );
if( nFrom >= 0 )
@@ -421,34 +421,34 @@ BOOL StgStrm::Copy( INT32 nFrom, INT32 nBytes )
if( nFrom < 0 )
{
rIo.SetError( SVSTREAM_FILEFORMAT_ERROR );
- return FALSE;
+ return sal_False;
}
}
nTo = pFat->GetNextPage( nTo );
}
- return TRUE;
+ return sal_True;
}
-BOOL StgStrm::SetSize( INT32 nBytes )
+sal_Bool StgStrm::SetSize( sal_Int32 nBytes )
{
// round up to page size
- INT32 nOld = ( ( nSize + nPageSize - 1 ) / nPageSize ) * nPageSize;
- INT32 nNew = ( ( nBytes + nPageSize - 1 ) / nPageSize ) * nPageSize;
+ sal_Int32 nOld = ( ( nSize + nPageSize - 1 ) / nPageSize ) * nPageSize;
+ sal_Int32 nNew = ( ( nBytes + nPageSize - 1 ) / nPageSize ) * nPageSize;
if( nNew > nOld )
{
if( !Pos2Page( nSize ) )
- return FALSE;
- INT32 nBgn = pFat->AllocPages( nPage, ( nNew - nOld ) / nPageSize );
+ return sal_False;
+ sal_Int32 nBgn = pFat->AllocPages( nPage, ( nNew - nOld ) / nPageSize );
if( nBgn == STG_EOF )
- return FALSE;
+ return sal_False;
if( nStart == STG_EOF )
nStart = nPage = nBgn;
}
else if( nNew < nOld )
{
- BOOL bAll = BOOL( nBytes == 0 );
+ sal_Bool bAll = sal_Bool( nBytes == 0 );
if( !Pos2Page( nBytes ) || !pFat->FreePages( nPage, bAll ) )
- return FALSE;
+ return sal_False;
if( bAll )
nStart = nPage = STG_EOF;
}
@@ -462,12 +462,12 @@ BOOL StgStrm::SetSize( INT32 nBytes )
}
nSize = nBytes;
pFat->SetLimit( GetPages() );
- return TRUE;
+ return sal_True;
}
// Return the # of allocated pages
-INT32 StgStrm::GetPages()
+sal_Int32 StgStrm::GetPages()
{
return ( nSize + nPageSize - 1 ) / nPageSize;
}
@@ -480,11 +480,11 @@ INT32 StgStrm::GetPages()
StgFATStrm::StgFATStrm( StgIo& r ) : StgStrm( r )
{
- pFat = new StgFAT( *this, TRUE );
+ pFat = new StgFAT( *this, sal_True );
nSize = rIo.aHdr.GetFATSize() * nPageSize;
}
-BOOL StgFATStrm::Pos2Page( INT32 nBytePos )
+sal_Bool StgFATStrm::Pos2Page( sal_Int32 nBytePos )
{
// Values < 0 seek to the end
if( nBytePos < 0 || nBytePos >= nSize )
@@ -492,38 +492,38 @@ BOOL StgFATStrm::Pos2Page( INT32 nBytePos )
nPage = nBytePos / nPageSize;
nOffset = (short) ( nBytePos % nPageSize );
nPos = nBytePos;
- nPage = GetPage( (short) nPage, FALSE );
- return BOOL( nPage >= 0 );
+ nPage = GetPage( (short) nPage, sal_False );
+ return sal_Bool( nPage >= 0 );
}
// Retrieve the physical page for a given byte offset.
// Since Pos2Page() already has computed the physical offset,
// use the byte offset directly.
-StgPage* StgFATStrm::GetPhysPage( INT32 nBytePos, BOOL bForce )
+StgPage* StgFATStrm::GetPhysPage( sal_Int32 nBytePos, sal_Bool bForce )
{
return rIo.Get( nBytePos / ( nPageSize >> 2 ), bForce );
}
// Get the page number entry for the given page offset.
-INT32 StgFATStrm::GetPage( short nOff, BOOL bMake, USHORT *pnMasterAlloc )
+sal_Int32 StgFATStrm::GetPage( short nOff, sal_Bool bMake, sal_uInt16 *pnMasterAlloc )
{
if( pnMasterAlloc ) *pnMasterAlloc = 0;
if( nOff < rIo.aHdr.GetFAT1Size() )
return rIo.aHdr.GetFATPage( nOff );
- INT32 nMaxPage = nSize >> 2;
+ sal_Int32 nMaxPage = nSize >> 2;
nOff = nOff - rIo.aHdr.GetFAT1Size();
// Anzahl der Masterpages, durch die wir iterieren muessen
- USHORT nMasterCount = ( nPageSize >> 2 ) - 1;
- USHORT nBlocks = nOff / nMasterCount;
+ sal_uInt16 nMasterCount = ( nPageSize >> 2 ) - 1;
+ sal_uInt16 nBlocks = nOff / nMasterCount;
// Offset in letzter Masterpage
nOff = nOff % nMasterCount;
StgPage* pOldPage = 0;
StgPage* pMaster = 0;
- INT32 nFAT = rIo.aHdr.GetFATChain();
- for( USHORT nCount = 0; nCount <= nBlocks; nCount++ )
+ sal_Int32 nFAT = rIo.aHdr.GetFATChain();
+ for( sal_uInt16 nCount = 0; nCount <= nBlocks; nCount++ )
{
if( nFAT == STG_EOF || nFAT == STG_FREE )
{
@@ -550,7 +550,7 @@ INT32 StgFATStrm::GetPage( short nOff, BOOL bMake, USHORT *pnMasterAlloc )
{
if( !Pos2Page( nFAT << 2 ) )
return STG_EOF;
- StgPage* pPg = rIo.Get( nPage, TRUE );
+ StgPage* pPg = rIo.Get( nPage, sal_True );
if( !pPg )
return STG_EOF;
pPg->SetPage( nOffset >> 2, STG_MASTER );
@@ -564,7 +564,7 @@ INT32 StgFATStrm::GetPage( short nOff, BOOL bMake, USHORT *pnMasterAlloc )
}
else
{
- pMaster = rIo.Get( nFAT, TRUE );
+ pMaster = rIo.Get( nFAT, sal_True );
if ( pMaster )
{
nFAT = pMaster->GetPage( nMasterCount );
@@ -581,30 +581,30 @@ INT32 StgFATStrm::GetPage( short nOff, BOOL bMake, USHORT *pnMasterAlloc )
// Set the page number entry for the given page offset.
-BOOL StgFATStrm::SetPage( short nOff, INT32 nNewPage )
+sal_Bool StgFATStrm::SetPage( short nOff, sal_Int32 nNewPage )
{
- BOOL bRes = TRUE;
+ sal_Bool bRes = sal_True;
if( nOff < rIo.aHdr.GetFAT1Size() )
rIo.aHdr.SetFATPage( nOff, nNewPage );
else
{
nOff = nOff - rIo.aHdr.GetFAT1Size();
// Anzahl der Masterpages, durch die wir iterieren muessen
- USHORT nMasterCount = ( nPageSize >> 2 ) - 1;
- USHORT nBlocks = nOff / nMasterCount;
+ sal_uInt16 nMasterCount = ( nPageSize >> 2 ) - 1;
+ sal_uInt16 nBlocks = nOff / nMasterCount;
// Offset in letzter Masterpage
nOff = nOff % nMasterCount;
StgPage* pMaster = 0;
- INT32 nFAT = rIo.aHdr.GetFATChain();
- for( USHORT nCount = 0; nCount <= nBlocks; nCount++ )
+ sal_Int32 nFAT = rIo.aHdr.GetFATChain();
+ for( sal_uInt16 nCount = 0; nCount <= nBlocks; nCount++ )
{
if( nFAT == STG_EOF || nFAT == STG_FREE )
{
pMaster = 0;
break;
}
- pMaster = rIo.Get( nFAT, TRUE );
+ pMaster = rIo.Get( nFAT, sal_True );
if ( pMaster )
nFAT = pMaster->GetPage( nMasterCount );
}
@@ -613,7 +613,7 @@ BOOL StgFATStrm::SetPage( short nOff, INT32 nNewPage )
else
{
rIo.SetError( SVSTREAM_GENERALERROR );
- bRes = FALSE;
+ bRes = sal_False;
}
}
@@ -621,16 +621,16 @@ BOOL StgFATStrm::SetPage( short nOff, INT32 nNewPage )
if( bRes )
{
Pos2Page( nNewPage << 2 );
- StgPage* pPg = rIo.Get( nPage, TRUE );
+ StgPage* pPg = rIo.Get( nPage, sal_True );
if( pPg )
pPg->SetPage( nOffset >> 2, STG_FAT );
else
- bRes = FALSE;
+ bRes = sal_False;
}
return bRes;
}
-BOOL StgFATStrm::SetSize( INT32 nBytes )
+sal_Bool StgFATStrm::SetSize( sal_Int32 nBytes )
{
// Set the number of entries to a multiple of the page size
short nOld = (short) ( ( nSize + ( nPageSize - 1 ) ) / nPageSize );
@@ -648,17 +648,17 @@ BOOL StgFATStrm::SetSize( INT32 nBytes )
{
// allocate master pages
// find a free master page slot
- INT32 nPg = 0;
- USHORT nMasterAlloc = 0;
- nPg = GetPage( nOld, TRUE, &nMasterAlloc );
+ sal_Int32 nPg = 0;
+ sal_uInt16 nMasterAlloc = 0;
+ nPg = GetPage( nOld, sal_True, &nMasterAlloc );
if( nPg == STG_EOF )
- return FALSE;
+ return sal_False;
// 4 Bytes have been used for Allocation of each MegaMasterPage
nBytes += nMasterAlloc << 2;
// find a free page using the FAT allocator
- INT32 n = 1;
- INT32 nNewPage = pFat->FindBlock( n );
+ sal_Int32 n = 1;
+ sal_Int32 nNewPage = pFat->FindBlock( n );
if( nNewPage == STG_EOF )
{
// no free pages found; create a new page
@@ -671,12 +671,12 @@ BOOL StgFATStrm::SetSize( INT32 nBytes )
// adjust the file size if necessary
if( nNewPage >= rIo.GetPhysPages() )
if( !rIo.SetSize( nNewPage + 1 ) )
- return FALSE;
+ return sal_False;
}
// Set up the page with empty entries
StgPage* pPg = rIo.Copy( nNewPage, STG_FREE );
if ( !pPg )
- return FALSE;
+ return sal_False;
for( short j = 0; j < ( nPageSize >> 2 ); j++ )
pPg->SetPage( j, STG_FREE );
@@ -687,22 +687,22 @@ BOOL StgFATStrm::SetSize( INT32 nBytes )
// MegaMasterPages were created, mark it them as used
- UINT32 nMax = rIo.aHdr.GetMasters( );
- UINT32 nFAT = rIo.aHdr.GetFATChain();
+ sal_uInt32 nMax = rIo.aHdr.GetMasters( );
+ sal_uInt32 nFAT = rIo.aHdr.GetFATChain();
if( nMasterAlloc )
- for( USHORT nCount = 0; nCount < nMax; nCount++ )
+ for( sal_uInt16 nCount = 0; nCount < nMax; nCount++ )
{
if( !Pos2Page( nFAT << 2 ) )
- return FALSE;
+ return sal_False;
if( nMax - nCount <= nMasterAlloc )
{
- StgPage* piPg = rIo.Get( nPage, TRUE );
+ StgPage* piPg = rIo.Get( nPage, sal_True );
if( !piPg )
- return FALSE;
+ return sal_False;
piPg->SetPage( nOffset >> 2, STG_MASTER );
}
- StgPage* pPage = rIo.Get( nFAT, TRUE );
- if( !pPage ) return FALSE;
+ StgPage* pPage = rIo.Get( nFAT, sal_True );
+ if( !pPage ) return sal_False;
nFAT = pPage->GetPage( (nPageSize >> 2 ) - 1 );
}
@@ -715,7 +715,7 @@ BOOL StgFATStrm::SetSize( INT32 nBytes )
}
nSize = nNew * nPageSize;
rIo.aHdr.SetFATSize( nNew );
- return TRUE;
+ return sal_True;
}
/////////////////////////// class StgDataStrm //////////////////////////////
@@ -725,7 +725,7 @@ BOOL StgFATStrm::SetSize( INT32 nBytes )
// The stream has a size increment which normally is 1, but which can be
// set to any value is you want the size to be incremented by certain values.
-StgDataStrm::StgDataStrm( StgIo& r, INT32 nBgn, INT32 nLen ) : StgStrm( r )
+StgDataStrm::StgDataStrm( StgIo& r, sal_Int32 nBgn, sal_Int32 nLen ) : StgStrm( r )
{
Init( nBgn, nLen );
}
@@ -737,9 +737,9 @@ StgDataStrm::StgDataStrm( StgIo& r, StgDirEntry* p ) : StgStrm( r )
p->aEntry.GetSize() );
}
-void StgDataStrm::Init( INT32 nBgn, INT32 nLen )
+void StgDataStrm::Init( sal_Int32 nBgn, sal_Int32 nLen )
{
- pFat = new StgFAT( *rIo.pFAT, TRUE );
+ pFat = new StgFAT( *rIo.pFAT, sal_True );
nStart = nPage = nBgn;
nSize = nLen;
nIncr = 1;
@@ -749,7 +749,7 @@ void StgDataStrm::Init( INT32 nBgn, INT32 nLen )
// determine the actual size of the stream by scanning
// the FAT chain and counting the # of pages allocated
nSize = 0;
- INT32 nOldBgn = -1;
+ sal_Int32 nOldBgn = -1;
while( nBgn >= 0 && nBgn != nOldBgn )
{
nOldBgn = nBgn;
@@ -763,18 +763,18 @@ void StgDataStrm::Init( INT32 nBgn, INT32 nLen )
// Set the size of a physical stream.
-BOOL StgDataStrm::SetSize( INT32 nBytes )
+sal_Bool StgDataStrm::SetSize( sal_Int32 nBytes )
{
nBytes = ( ( nBytes + nIncr - 1 ) / nIncr ) * nIncr;
- INT32 nOldSz = nSize;
+ sal_Int32 nOldSz = nSize;
if( ( nOldSz != nBytes ) )
{
if( !StgStrm::SetSize( nBytes ) )
- return FALSE;
- INT32 nMaxPage = pFat->GetMaxPage();
+ return sal_False;
+ sal_Int32 nMaxPage = pFat->GetMaxPage();
if( nMaxPage > rIo.GetPhysPages() )
if( !rIo.SetSize( nMaxPage ) )
- return FALSE;
+ return sal_False;
// If we only allocated one page or less, create this
// page in the cache for faster throughput. The current
// position is the former EOF point.
@@ -785,14 +785,14 @@ BOOL StgDataStrm::SetSize( INT32 nBytes )
rIo.Copy( nPage, STG_FREE );
}
}
- return TRUE;
+ return sal_True;
}
// Get the address of the data byte at a specified offset.
-// If bForce = TRUE, a read of non-existent data causes
+// If bForce = sal_True, a read of non-existent data causes
// a read fault.
-void* StgDataStrm::GetPtr( INT32 Pos, BOOL bForce, BOOL bDirty )
+void* StgDataStrm::GetPtr( sal_Int32 Pos, sal_Bool bForce, sal_Bool bDirty )
{
if( Pos2Page( Pos ) )
{
@@ -802,7 +802,7 @@ void* StgDataStrm::GetPtr( INT32 Pos, BOOL bForce, BOOL bDirty )
pPg->SetOwner( pEntry );
if( bDirty )
pPg->SetDirty();
- return ((BYTE *)pPg->GetData()) + nOffset;
+ return ((sal_uInt8 *)pPg->GetData()) + nOffset;
}
}
return NULL;
@@ -812,24 +812,24 @@ void* StgDataStrm::GetPtr( INT32 Pos, BOOL bForce, BOOL bDirty )
// the amount of consecutable blocks before doing a read. The result
// is the number of bytes read. No error is generated on EOF.
-INT32 StgDataStrm::Read( void* pBuf, INT32 n )
+sal_Int32 StgDataStrm::Read( void* pBuf, sal_Int32 n )
{
if ( n < 0 )
return 0;
if( ( nPos + n ) > nSize )
n = nSize - nPos;
- INT32 nDone = 0;
+ sal_Int32 nDone = 0;
while( n )
{
short nBytes = nPageSize - nOffset;
short nRes;
StgPage* pPg;
- if( (INT32) nBytes > n )
+ if( (sal_Int32) nBytes > n )
nBytes = (short) n;
if( nBytes )
{
- void *p = (BYTE *) pBuf + nDone;
+ void *p = (sal_uInt8 *) pBuf + nDone;
if( nBytes == nPageSize )
{
pPg = rIo.Find( nPage );
@@ -847,11 +847,11 @@ INT32 StgDataStrm::Read( void* pBuf, INT32 n )
else
{
// partial block read thru the cache.
- pPg = rIo.Get( nPage, FALSE );
+ pPg = rIo.Get( nPage, sal_False );
if( !pPg )
break;
pPg->SetOwner( pEntry );
- memcpy( p, (BYTE*)pPg->GetData() + nOffset, nBytes );
+ memcpy( p, (sal_uInt8*)pPg->GetData() + nOffset, nBytes );
nRes = nBytes;
}
nDone += nRes;
@@ -868,14 +868,14 @@ INT32 StgDataStrm::Read( void* pBuf, INT32 n )
return nDone;
}
-INT32 StgDataStrm::Write( const void* pBuf, INT32 n )
+sal_Int32 StgDataStrm::Write( const void* pBuf, sal_Int32 n )
{
- INT32 nDone = 0;
+ sal_Int32 nDone = 0;
if( ( nPos + n ) > nSize )
{
- INT32 nOld = nPos;
+ sal_Int32 nOld = nPos;
if( !SetSize( nPos + n ) )
- return FALSE;
+ return sal_False;
Pos2Page( nOld );
}
while( n )
@@ -883,11 +883,11 @@ INT32 StgDataStrm::Write( const void* pBuf, INT32 n )
short nBytes = nPageSize - nOffset;
short nRes;
StgPage* pPg;
- if( (INT32) nBytes > n )
+ if( (sal_Int32) nBytes > n )
nBytes = (short) n;
if( nBytes )
{
- const void *p = (const BYTE *) pBuf + nDone;
+ const void *p = (const sal_uInt8 *) pBuf + nDone;
if( nBytes == nPageSize )
{
pPg = rIo.Find( nPage );
@@ -906,11 +906,11 @@ INT32 StgDataStrm::Write( const void* pBuf, INT32 n )
else
{
// partial block read thru the cache.
- pPg = rIo.Get( nPage, FALSE );
+ pPg = rIo.Get( nPage, sal_False );
if( !pPg )
break;
pPg->SetOwner( pEntry );
- memcpy( (BYTE*)pPg->GetData() + nOffset, p, nBytes );
+ memcpy( (sal_uInt8*)pPg->GetData() + nOffset, p, nBytes );
pPg->SetDirty();
nRes = nBytes;
}
@@ -935,7 +935,7 @@ INT32 StgDataStrm::Write( const void* pBuf, INT32 n )
// is also a StgStream. The start of the FAT is in the header at DataRootPage,
// the stream itself is pointed to by the root entry (it holds start & size).
-StgSmallStrm::StgSmallStrm( StgIo& r, INT32 nBgn, INT32 nLen ) : StgStrm( r )
+StgSmallStrm::StgSmallStrm( StgIo& r, sal_Int32 nBgn, sal_Int32 nLen ) : StgStrm( r )
{
Init( nBgn, nLen );
}
@@ -947,9 +947,9 @@ StgSmallStrm::StgSmallStrm( StgIo& r, StgDirEntry* p ) : StgStrm( r )
p->aEntry.GetSize() );
}
-void StgSmallStrm::Init( INT32 nBgn, INT32 nLen )
+void StgSmallStrm::Init( sal_Int32 nBgn, sal_Int32 nLen )
{
- pFat = new StgFAT( *rIo.pDataFAT, FALSE );
+ pFat = new StgFAT( *rIo.pDataFAT, sal_False );
pData = rIo.pDataStrm;
nPageSize = rIo.GetDataPageSize();
nStart =
@@ -961,7 +961,7 @@ void StgSmallStrm::Init( INT32 nBgn, INT32 nLen )
// the amount of consecutable blocks before doing a read. The result
// is the number of bytes read. No error is generated on EOF.
-INT32 StgSmallStrm::Read( void* pBuf, INT32 n )
+sal_Int32 StgSmallStrm::Read( void* pBuf, sal_Int32 n )
{
// We can safely assume that reads are not huge, since the
// small stream is likely to be < 64 KBytes.
@@ -971,14 +971,14 @@ INT32 StgSmallStrm::Read( void* pBuf, INT32 n )
while( n )
{
short nBytes = nPageSize - nOffset;
- if( (INT32) nBytes > n )
+ if( (sal_Int32) nBytes > n )
nBytes = (short) n;
if( nBytes )
{
if( !pData->Pos2Page( nPage * nPageSize + nOffset ) )
break;
// all reading thru the stream
- short nRes = (short) pData->Read( (BYTE*)pBuf + nDone, nBytes );
+ short nRes = (short) pData->Read( (sal_uInt8*)pBuf + nDone, nBytes );
nDone = nDone + nRes;
nPos += nRes;
n -= nRes;
@@ -994,33 +994,33 @@ INT32 StgSmallStrm::Read( void* pBuf, INT32 n )
return nDone;
}
-INT32 StgSmallStrm::Write( const void* pBuf, INT32 n )
+sal_Int32 StgSmallStrm::Write( const void* pBuf, sal_Int32 n )
{
// you can safely assume that reads are not huge, since the
// small stream is likely to be < 64 KBytes.
short nDone = 0;
if( ( nPos + n ) > nSize )
{
- INT32 nOld = nPos;
+ sal_Int32 nOld = nPos;
if( !SetSize( nPos + n ) )
- return FALSE;
+ return sal_False;
Pos2Page( nOld );
}
while( n )
{
short nBytes = nPageSize - nOffset;
- if( (INT32) nBytes > n )
+ if( (sal_Int32) nBytes > n )
nBytes = (short) n;
if( nBytes )
{
// all writing goes thru the stream
- INT32 nDataPos = nPage * nPageSize + nOffset;
+ sal_Int32 nDataPos = nPage * nPageSize + nOffset;
if( pData->GetSize() < ( nDataPos + nBytes ) )
if( !pData->SetSize( nDataPos + nBytes ) )
break;
if( !pData->Pos2Page( nDataPos ) )
break;
- short nRes = (short) pData->Write( (BYTE*)pBuf + nDone, nBytes );
+ short nRes = (short) pData->Write( (sal_uInt8*)pBuf + nDone, nBytes );
nDone = nDone + nRes;
nPos += nRes;
n -= nRes;
@@ -1043,7 +1043,7 @@ INT32 StgSmallStrm::Write( const void* pBuf, INT32 n )
#define THRESHOLD 32768L
-StgTmpStrm::StgTmpStrm( ULONG nInitSize )
+StgTmpStrm::StgTmpStrm( sal_uLong nInitSize )
: SvMemoryStream( nInitSize > THRESHOLD
? 16
: ( nInitSize ? nInitSize : 16 ), 4096 )
@@ -1055,19 +1055,19 @@ StgTmpStrm::StgTmpStrm( ULONG nInitSize )
SetSize( nInitSize );
}
-BOOL StgTmpStrm::Copy( StgTmpStrm& rSrc )
+sal_Bool StgTmpStrm::Copy( StgTmpStrm& rSrc )
{
- ULONG n = rSrc.GetSize();
- ULONG nCur = rSrc.Tell();
+ sal_uLong n = rSrc.GetSize();
+ sal_uLong nCur = rSrc.Tell();
SetSize( n );
if( GetError() == SVSTREAM_OK )
{
- BYTE* p = new BYTE[ 4096 ];
+ sal_uInt8* p = new sal_uInt8[ 4096 ];
rSrc.Seek( 0L );
Seek( 0L );
while( n )
{
- ULONG nn = n;
+ sal_uLong nn = n;
if( nn > 4096 )
nn = 4096;
if( rSrc.Read( p, nn ) != nn )
@@ -1079,10 +1079,10 @@ BOOL StgTmpStrm::Copy( StgTmpStrm& rSrc )
delete [] p;
rSrc.Seek( nCur );
Seek( nCur );
- return BOOL( n == 0 );
+ return sal_Bool( n == 0 );
}
else
- return FALSE;
+ return sal_False;
}
StgTmpStrm::~StgTmpStrm()
@@ -1095,12 +1095,12 @@ StgTmpStrm::~StgTmpStrm()
}
}
-ULONG StgTmpStrm::GetSize() const
+sal_uLong StgTmpStrm::GetSize() const
{
- ULONG n;
+ sal_uLong n;
if( pStrm )
{
- ULONG old = pStrm->Tell();
+ sal_uLong old = pStrm->Tell();
n = pStrm->Seek( STREAM_SEEK_TO_END );
pStrm->Seek( old );
}
@@ -1109,7 +1109,7 @@ ULONG StgTmpStrm::GetSize() const
return n;
}
-void StgTmpStrm::SetSize( ULONG n )
+void StgTmpStrm::SetSize( sal_uLong n )
{
if( pStrm )
pStrm->SetStreamSize( n );
@@ -1119,15 +1119,15 @@ void StgTmpStrm::SetSize( ULONG n )
{
aName = TempFile::CreateTempName();
SvFileStream* s = new SvFileStream( aName, STREAM_READWRITE );
- ULONG nCur = Tell();
- ULONG i = nEndOfData;
+ sal_uLong nCur = Tell();
+ sal_uLong i = nEndOfData;
if( i )
{
- BYTE* p = new BYTE[ 4096 ];
+ sal_uInt8* p = new sal_uInt8[ 4096 ];
Seek( 0L );
while( i )
{
- ULONG nb = ( i > 4096 ) ? 4096 : i;
+ sal_uLong nb = ( i > 4096 ) ? 4096 : i;
if( Read( p, nb ) == nb
&& s->Write( p, nb ) == nb )
i -= nb;
@@ -1163,9 +1163,9 @@ void StgTmpStrm::SetSize( ULONG n )
{
if( n > nEndOfData )
{
- ULONG nCur = Tell();
+ sal_uLong nCur = Tell();
Seek( nEndOfData - 1 );
- *this << (BYTE) 0;
+ *this << (sal_uInt8) 0;
Seek( nCur );
}
else
@@ -1174,7 +1174,7 @@ void StgTmpStrm::SetSize( ULONG n )
}
}
-ULONG StgTmpStrm::GetData( void* pData, ULONG n )
+sal_uLong StgTmpStrm::GetData( void* pData, sal_uLong n )
{
if( pStrm )
{
@@ -1186,10 +1186,10 @@ ULONG StgTmpStrm::GetData( void* pData, ULONG n )
return SvMemoryStream::GetData( (sal_Char *)pData, n );
}
-ULONG StgTmpStrm::PutData( const void* pData, ULONG n )
+sal_uLong StgTmpStrm::PutData( const void* pData, sal_uLong n )
{
- UINT32 nCur = Tell();
- UINT32 nNew = nCur + n;
+ sal_uInt32 nCur = Tell();
+ sal_uInt32 nNew = nCur + n;
if( nNew > THRESHOLD && !pStrm )
{
SetSize( nNew );
@@ -1206,7 +1206,7 @@ ULONG StgTmpStrm::PutData( const void* pData, ULONG n )
return nNew;
}
-ULONG StgTmpStrm::SeekPos( ULONG n )
+sal_uLong StgTmpStrm::SeekPos( sal_uLong n )
{
if( n == STREAM_SEEK_TO_END )
n = GetSize();
diff --git a/sot/source/sdstor/stgstrms.hxx b/sot/source/sdstor/stgstrms.hxx
index 9b09f51db43f..a1bb0707cdd7 100644
--- a/sot/source/sdstor/stgstrms.hxx
+++ b/sot/source/sdstor/stgstrms.hxx
@@ -38,29 +38,29 @@ class StgPage;
class StgDirEntry;
// The FAT class performs FAT operations on an underlying storage stream.
-// This stream is either the physical FAT stream (bPhys == TRUE ) or a normal
+// This stream is either the physical FAT stream (bPhys == sal_True ) or a normal
// storage stream, which then holds the FAT for small data allocations.
class StgFAT
{ // FAT allocator
StgStrm& rStrm; // underlying stream
- INT32 nMaxPage; // highest page allocated so far
+ sal_Int32 nMaxPage; // highest page allocated so far
short nPageSize; // physical page size
short nEntries; // FAT entries per page
short nOffset; // current offset within page
- INT32 nLimit; // search limit recommendation
- BOOL bPhys; // TRUE: physical FAT
- StgPage* GetPhysPage( INT32 nPage );
- BOOL MakeChain( INT32 nStart, INT32 nPages );
- BOOL InitNew( INT32 nPage1 );
+ sal_Int32 nLimit; // search limit recommendation
+ sal_Bool bPhys; // sal_True: physical FAT
+ StgPage* GetPhysPage( sal_Int32 nPage );
+ sal_Bool MakeChain( sal_Int32 nStart, sal_Int32 nPages );
+ sal_Bool InitNew( sal_Int32 nPage1 );
public:
- StgFAT( StgStrm& rStrm, BOOL bMark );
- INT32 FindBlock( INT32& nPages );
- INT32 GetNextPage( INT32 nPg );
- INT32 AllocPages( INT32 nStart, INT32 nPages );
- BOOL FreePages( INT32 nStart, BOOL bAll );
- INT32 GetMaxPage() { return nMaxPage; }
- void SetLimit( INT32 n ) { nLimit = n; }
+ StgFAT( StgStrm& rStrm, sal_Bool bMark );
+ sal_Int32 FindBlock( sal_Int32& nPages );
+ sal_Int32 GetNextPage( sal_Int32 nPg );
+ sal_Int32 AllocPages( sal_Int32 nStart, sal_Int32 nPages );
+ sal_Bool FreePages( sal_Int32 nStart, sal_Bool bAll );
+ sal_Int32 GetMaxPage() { return nMaxPage; }
+ void SetLimit( sal_Int32 n ) { nLimit = n; }
};
// The base stream class provides basic functionality for seeking
@@ -72,31 +72,31 @@ protected:
StgIo& rIo; // I/O system
StgFAT* pFat; // FAT stream for allocations
StgDirEntry* pEntry; // dir entry (for ownership)
- INT32 nStart; // 1st data page
- INT32 nSize; // stream size in bytes
- INT32 nPos; // current byte position
- INT32 nPage; // current logical page
+ sal_Int32 nStart; // 1st data page
+ sal_Int32 nSize; // stream size in bytes
+ sal_Int32 nPos; // current byte position
+ sal_Int32 nPage; // current logical page
short nOffset; // offset into current page
short nPageSize; // logical page size
- BOOL Copy( INT32 nFrom, INT32 nBytes );
+ sal_Bool Copy( sal_Int32 nFrom, sal_Int32 nBytes );
StgStrm( StgIo& );
public:
virtual ~StgStrm();
StgIo& GetIo() { return rIo; }
- INT32 GetPos() { return nPos; }
- INT32 GetStart() { return nStart; }
- INT32 GetSize() { return nSize; }
- INT32 GetPage() { return nPage; }
+ sal_Int32 GetPos() { return nPos; }
+ sal_Int32 GetStart() { return nStart; }
+ sal_Int32 GetSize() { return nSize; }
+ sal_Int32 GetPage() { return nPage; }
short GetPageSize() { return nPageSize; }
- INT32 GetPages();
+ sal_Int32 GetPages();
short GetOffset() { return nOffset;}
void SetEntry( StgDirEntry& );
- virtual BOOL SetSize( INT32 );
- virtual BOOL Pos2Page( INT32 nBytePos );
- virtual INT32 Read( void*, INT32 ) { return 0; }
- virtual INT32 Write( const void*, INT32 ) { return 0; }
- virtual StgPage* GetPhysPage( INT32 nBytePos, BOOL bForce = FALSE );
- virtual BOOL IsSmallStrm() { return FALSE; }
+ virtual sal_Bool SetSize( sal_Int32 );
+ virtual sal_Bool Pos2Page( sal_Int32 nBytePos );
+ virtual sal_Int32 Read( void*, sal_Int32 ) { return 0; }
+ virtual sal_Int32 Write( const void*, sal_Int32 ) { return 0; }
+ virtual StgPage* GetPhysPage( sal_Int32 nBytePos, sal_Bool bForce = sal_False );
+ virtual sal_Bool IsSmallStrm() { return sal_False; }
};
// The FAT stream class provides physical access to the master FAT.
@@ -104,15 +104,15 @@ public:
// FAT allocator.
class StgFATStrm : public StgStrm { // the master FAT stream
- virtual BOOL Pos2Page( INT32 nBytePos );
- BOOL SetPage( short, INT32 );
+ virtual sal_Bool Pos2Page( sal_Int32 nBytePos );
+ sal_Bool SetPage( short, sal_Int32 );
public:
StgFATStrm( StgIo& );
virtual ~StgFATStrm() {}
using StgStrm::GetPage;
- INT32 GetPage( short, BOOL, USHORT *pnMasterAlloc = 0);
- virtual BOOL SetSize( INT32 );
- virtual StgPage* GetPhysPage( INT32 nBytePos, BOOL bForce = FALSE );
+ sal_Int32 GetPage( short, sal_Bool, sal_uInt16 *pnMasterAlloc = 0);
+ virtual sal_Bool SetSize( sal_Int32 );
+ virtual StgPage* GetPhysPage( sal_Int32 nBytePos, sal_Bool bForce = sal_False );
};
// The stream has a size increment which normally is 1, but which can be
@@ -121,15 +121,15 @@ public:
class StgDataStrm : public StgStrm // a physical data stream
{
short nIncr; // size adjust increment
- void Init( INT32 nBgn, INT32 nLen );
+ void Init( sal_Int32 nBgn, sal_Int32 nLen );
public:
- StgDataStrm( StgIo&, INT32 nBgn, INT32 nLen=-1 );
+ StgDataStrm( StgIo&, sal_Int32 nBgn, sal_Int32 nLen=-1 );
StgDataStrm( StgIo&, StgDirEntry* );
- void* GetPtr( INT32 nPos, BOOL bForce, BOOL bDirty );
+ void* GetPtr( sal_Int32 nPos, sal_Bool bForce, sal_Bool bDirty );
void SetIncrement( short n ) { nIncr = n ; }
- virtual BOOL SetSize( INT32 );
- virtual INT32 Read( void*, INT32 );
- virtual INT32 Write( const void*, INT32 );
+ virtual sal_Bool SetSize( sal_Int32 );
+ virtual sal_Int32 Read( void*, sal_Int32 );
+ virtual sal_Int32 Write( const void*, sal_Int32 );
};
// The small stream class provides access to streams with a size < 4096 bytes.
@@ -140,13 +140,13 @@ public:
class StgSmallStrm : public StgStrm // a logical data stream
{
StgStrm* pData; // the data stream
- void Init( INT32 nBgn, INT32 nLen );
+ void Init( sal_Int32 nBgn, sal_Int32 nLen );
public:
- StgSmallStrm( StgIo&, INT32 nBgn, INT32 nLen );
+ StgSmallStrm( StgIo&, sal_Int32 nBgn, sal_Int32 nLen );
StgSmallStrm( StgIo&, StgDirEntry* );
- virtual INT32 Read( void*, INT32 );
- virtual INT32 Write( const void*, INT32 );
- virtual BOOL IsSmallStrm() { return TRUE; }
+ virtual sal_Int32 Read( void*, sal_Int32 );
+ virtual sal_Int32 Write( const void*, sal_Int32 );
+ virtual sal_Bool IsSmallStrm() { return sal_True; }
};
class StgTmpStrm : public SvMemoryStream
@@ -154,17 +154,17 @@ class StgTmpStrm : public SvMemoryStream
String aName;
SvFileStream* pStrm;
using SvMemoryStream::GetData;
- virtual ULONG GetData( void* pData, ULONG nSize );
- virtual ULONG PutData( const void* pData, ULONG nSize );
- virtual ULONG SeekPos( ULONG nPos );
+ virtual sal_uLong GetData( void* pData, sal_uLong nSize );
+ virtual sal_uLong PutData( const void* pData, sal_uLong nSize );
+ virtual sal_uLong SeekPos( sal_uLong nPos );
virtual void FlushData();
public:
- StgTmpStrm( ULONG=16 );
+ StgTmpStrm( sal_uLong=16 );
~StgTmpStrm();
- BOOL Copy( StgTmpStrm& );
- void SetSize( ULONG );
- ULONG GetSize() const;
+ sal_Bool Copy( StgTmpStrm& );
+ void SetSize( sal_uLong );
+ sal_uLong GetSize() const;
};
#endif
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx
index e09c5fc864fc..13c254e0cb4d 100644
--- a/sot/source/sdstor/storage.cxx
+++ b/sot/source/sdstor/storage.cxx
@@ -75,12 +75,12 @@ SO2_IMPL_BASIC_CLASS1_DLL(SotStorageStream,SotStorageStreamFactory,SotObject,
SO2_IMPL_INVARIANT(SotStorageStream)
-void SotStorageStream::TestMemberObjRef( BOOL /*bFree*/ )
+void SotStorageStream::TestMemberObjRef( sal_Bool /*bFree*/ )
{
}
#ifdef TEST_INVARIANT
-void SotStorageStream::TestMemberInvariant( BOOL /*bPrint*/ )
+void SotStorageStream::TestMemberInvariant( sal_Bool /*bPrint*/ )
{
}
#endif
@@ -96,12 +96,12 @@ SvLockBytesRef MakeLockBytes_Impl( const String & rName, StreamMode nMode )
if( rName.Len() )
{
SvStream * pFileStm = new SvFileStream( rName, nMode );
- xLB = new SvLockBytes( pFileStm, TRUE );
+ xLB = new SvLockBytes( pFileStm, sal_True );
}
else
{
SvStream * pCacheStm = new SvCacheStream();
- xLB = new SvLockBytes( pCacheStm, TRUE );
+ xLB = new SvLockBytes( pCacheStm, sal_True );
}
return xLB;
}
@@ -116,9 +116,9 @@ SotStorageStream::SotStorageStream( const String & rName, StreamMode nMode,
, pOwnStm( NULL )
{
if( nMode & STREAM_WRITE )
- bIsWritable = TRUE;
+ bIsWritable = sal_True;
else
- bIsWritable = FALSE;
+ bIsWritable = sal_False;
DBG_ASSERT( !nStorageMode,"StorageModes ignored" );
}
@@ -128,9 +128,9 @@ SotStorageStream::SotStorageStream( BaseStorageStream * pStm )
if( pStm )
{
if( STREAM_WRITE & pStm->GetMode() )
- bIsWritable = TRUE;
+ bIsWritable = sal_True;
else
- bIsWritable = FALSE;
+ bIsWritable = sal_False;
pOwnStm = pStm;
SetError( pStm->GetError() );
@@ -139,7 +139,7 @@ SotStorageStream::SotStorageStream( BaseStorageStream * pStm )
else
{
pOwnStm = NULL;
- bIsWritable = TRUE;
+ bIsWritable = sal_True;
SetError( SVSTREAM_INVALID_PARAMETER );
}
}
@@ -148,7 +148,7 @@ SotStorageStream::SotStorageStream()
: pOwnStm( NULL )
{
// ??? wenn Init virtuell ist, entsprechen setzen
- bIsWritable = TRUE;
+ bIsWritable = sal_True;
}
/************************************************************************
@@ -170,7 +170,7 @@ SotStorageStream::~SotStorageStream()
*************************************************************************/
void SotStorageStream::SyncSvStream()
{
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
if( pOwnStm )
{
pOwnStm->Flush();
@@ -197,9 +197,9 @@ void SotStorageStream::ResetError()
|*
|* Beschreibung
*************************************************************************/
-ULONG SotStorageStream::GetData( void* pData, ULONG nSize )
+sal_uLong SotStorageStream::GetData( void* pData, sal_uLong nSize )
{
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
if( pOwnStm )
{
@@ -216,9 +216,9 @@ ULONG SotStorageStream::GetData( void* pData, ULONG nSize )
|*
|* Beschreibung
*************************************************************************/
-ULONG SotStorageStream::PutData( const void* pData, ULONG nSize )
+sal_uLong SotStorageStream::PutData( const void* pData, sal_uLong nSize )
{
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
if( pOwnStm )
{
@@ -235,9 +235,9 @@ ULONG SotStorageStream::PutData( const void* pData, ULONG nSize )
|*
|* Beschreibung
*************************************************************************/
-ULONG SotStorageStream::SeekPos( ULONG nPos )
+sal_uLong SotStorageStream::SeekPos( sal_uLong nPos )
{
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
if( pOwnStm )
{
@@ -270,9 +270,9 @@ void SotStorageStream::FlushData()
|*
|* Beschreibung
*************************************************************************/
-void SotStorageStream::SetSize( ULONG nNewSize )
+void SotStorageStream::SetSize( sal_uLong nNewSize )
{
- ULONG nPos = Tell();
+ sal_uLong nPos = Tell();
if( pOwnStm )
{
pOwnStm->SetSize( nNewSize );
@@ -295,11 +295,11 @@ void SotStorageStream::SetSize( ULONG nNewSize )
|* Beschreibung
|*
*************************************************************************/
-UINT32 SotStorageStream::GetSize() const
+sal_uInt32 SotStorageStream::GetSize() const
{
- ULONG nPos = Tell();
+ sal_uLong nPos = Tell();
((SotStorageStream *)this)->Seek( STREAM_SEEK_TO_END );
- ULONG nSize = Tell();
+ sal_uLong nSize = Tell();
((SotStorageStream *)this)->Seek( nPos );
return nSize;
}
@@ -309,19 +309,19 @@ UINT32 SotStorageStream::GetSize() const
|*
|* Beschreibung
*************************************************************************/
-BOOL SotStorageStream::CopyTo( SotStorageStream * pDestStm )
+sal_Bool SotStorageStream::CopyTo( SotStorageStream * pDestStm )
{
Flush(); // alle Daten schreiben
pDestStm->ClearBuffer();
if( !pOwnStm || !pDestStm->pOwnStm )
{ // Wenn Ole2 oder nicht nur eigene StorageStreams
- ULONG nPos = Tell(); // Position merken
+ sal_uLong nPos = Tell(); // Position merken
Seek( 0L );
pDestStm->SetSize( 0 ); // Ziel-Stream leeren
- void * pMem = new BYTE[ 8192 ];
- ULONG nRead;
+ void * pMem = new sal_uInt8[ 8192 ];
+ sal_uLong nRead;
while( 0 != (nRead = Read( pMem, 8192 )) )
{
if( nRead != pDestStm->Write( pMem, nRead ) )
@@ -330,7 +330,7 @@ BOOL SotStorageStream::CopyTo( SotStorageStream * pDestStm )
break;
}
}
- delete [] static_cast<BYTE*>(pMem);
+ delete [] static_cast<sal_uInt8*>(pMem);
// Position setzen
pDestStm->Seek( nPos );
Seek( nPos );
@@ -361,7 +361,7 @@ BOOL SotStorageStream::CopyTo( SotStorageStream * pDestStm )
|*
|* Beschreibung
*************************************************************************/
-BOOL SotStorageStream::Commit()
+sal_Bool SotStorageStream::Commit()
{
if( pOwnStm )
{
@@ -373,7 +373,7 @@ BOOL SotStorageStream::Commit()
return GetError() == SVSTREAM_OK;
}
-BOOL SotStorageStream::Revert()
+sal_Bool SotStorageStream::Revert()
{
if( !pOwnStm )
{
@@ -383,7 +383,7 @@ BOOL SotStorageStream::Revert()
return GetError() == SVSTREAM_OK;
}
-BOOL SotStorageStream::SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue )
+sal_Bool SotStorageStream::SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue )
{
UCBStorageStream* pStg = PTR_CAST( UCBStorageStream, pOwnStm );
if ( pStg )
@@ -393,11 +393,11 @@ BOOL SotStorageStream::SetProperty( const String& rName, const ::com::sun::star:
else
{
DBG_ERROR("Not implemented!");
- return FALSE;
+ return sal_False;
}
}
-BOOL SotStorageStream::GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue )
+sal_Bool SotStorageStream::GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue )
{
UCBStorageStream* pStg = PTR_CAST( UCBStorageStream, pOwnStm );
if ( pStg )
@@ -407,7 +407,7 @@ BOOL SotStorageStream::GetProperty( const String& rName, ::com::sun::star::uno::
else
{
DBG_ERROR("Not implemented!");
- return FALSE;
+ return sal_False;
}
}
@@ -454,12 +454,12 @@ SO2_IMPL_INVARIANT(SotStorage)
|*
|* Beschreibung
*************************************************************************/
-void SotStorage::TestMemberObjRef( BOOL /*bFree*/ )
+void SotStorage::TestMemberObjRef( sal_Bool /*bFree*/ )
{
}
#ifdef TEST_INVARIANT
-void SotStorage::TestMemberInvariant( BOOL /*bPrint*/ )
+void SotStorage::TestMemberInvariant( sal_Bool /*bPrint*/ )
{
}
#endif
@@ -471,7 +471,7 @@ void SotStorage::TestMemberInvariant( BOOL /*bPrint*/ )
|* Beschreibung Es muss ein I... Objekt an SvObject uebergeben
|* werden, da es sonst selbst ein IUnknown anlegt und
|* festlegt, dass alle weiteren I... Objekte mit
-|* delete zerstoert werden (Owner() == TRUE).
+|* delete zerstoert werden (Owner() == sal_True).
|* Es werden aber nur IStorage Objekte benutzt und nicht
|* selbst implementiert, deshalb wird so getan, als ob
|* das IStorage Objekt von aussen kam und es wird mit
@@ -491,8 +491,8 @@ void SotStorage::TestMemberInvariant( BOOL /*bPrint*/ )
: m_pOwnStg( NULL ) \
, m_pStorStm( NULL ) \
, m_nError( SVSTREAM_OK ) \
- , m_bIsRoot( FALSE ) \
- , m_bDelStm( FALSE ) \
+ , m_bIsRoot( sal_False ) \
+ , m_bDelStm( sal_False ) \
, m_nVersion( SOFFICE_FILEFORMAT_CURRENT )
SotStorage::SotStorage()
@@ -510,7 +510,7 @@ SotStorage::SotStorage( const ::ucbhelper::Content& rContent, const String & rNa
INIT_SotStorage()
{
m_aName = rName; // Namen merken
- m_pOwnStg = new UCBStorage( rContent, m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? FALSE : TRUE );
+ m_pOwnStg = new UCBStorage( rContent, m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? sal_False : sal_True );
SetError( m_pOwnStg->GetError() );
@@ -524,12 +524,12 @@ SotStorage::SotStorage( const String & rName, StreamMode nMode, StorageMode nSto
INIT_SotStorage()
{
m_aName = rName; // Namen merken
- CreateStorage( TRUE, nMode, nStorageMode );
+ CreateStorage( sal_True, nMode, nStorageMode );
if ( IsOLEStorage() )
m_nVersion = SOFFICE_FILEFORMAT_50;
}
-void SotStorage::CreateStorage( BOOL bForceUCBStorage, StreamMode nMode, StorageMode nStorageMode )
+void SotStorage::CreateStorage( sal_Bool bForceUCBStorage, StreamMode nMode, StorageMode nStorageMode )
{
DBG_ASSERT( !m_pStorStm && !m_pOwnStg, "Use only in ctor!" );
if( m_aName.Len() )
@@ -555,11 +555,11 @@ void SotStorage::CreateStorage( BOOL bForceUCBStorage, StreamMode nMode, Storage
if ( aURL.Len() )
{
::ucbhelper::Content aContent( aURL, ::com::sun::star::uno::Reference < ::com::sun::star::ucb::XCommandEnvironment >() );
- m_pOwnStg = new UCBStorage( aContent, aURL, nMode, FALSE );
+ m_pOwnStg = new UCBStorage( aContent, aURL, nMode, sal_False );
}
else
{
- m_pOwnStg = new Storage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? FALSE : TRUE );
+ m_pOwnStg = new Storage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? sal_False : sal_True );
SetError( ERRCODE_IO_NOTSUPPORTED );
}
}
@@ -573,7 +573,7 @@ void SotStorage::CreateStorage( BOOL bForceUCBStorage, StreamMode nMode, Storage
if ( m_pStorStm )
{
// try as UCBStorage, next try as OLEStorage
- BOOL bIsUCBStorage = UCBStorage::IsStorageFile( m_pStorStm );
+ sal_Bool bIsUCBStorage = UCBStorage::IsStorageFile( m_pStorStm );
if ( !bIsUCBStorage && bForceUCBStorage )
// if UCBStorage has priority, it should not be used only if it is really an OLEStorage
bIsUCBStorage = !Storage::IsStorageFile( m_pStorStm );
@@ -583,8 +583,8 @@ void SotStorage::CreateStorage( BOOL bForceUCBStorage, StreamMode nMode, Storage
if ( UCBStorage::GetLinkedFile( *m_pStorStm ).Len() )
{
// detect special unpacked storages
- m_pOwnStg = new UCBStorage( *m_pStorStm, (nStorageMode & STORAGE_TRANSACTED) ? FALSE : TRUE );
- m_bDelStm = TRUE;
+ m_pOwnStg = new UCBStorage( *m_pStorStm, (nStorageMode & STORAGE_TRANSACTED) ? sal_False : sal_True );
+ m_bDelStm = sal_True;
}
else
{
@@ -594,24 +594,24 @@ void SotStorage::CreateStorage( BOOL bForceUCBStorage, StreamMode nMode, Storage
// UCBStorage always works directly on the UCB content, so discard the stream first
DELETEZ( m_pStorStm );
- m_pOwnStg = new UCBStorage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? FALSE : TRUE );
+ m_pOwnStg = new UCBStorage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? sal_False : sal_True );
}
}
else
{
// OLEStorage can be opened with a stream
- m_pOwnStg = new Storage( *m_pStorStm, (nStorageMode & STORAGE_TRANSACTED) ? FALSE : TRUE );
- m_bDelStm = TRUE;
+ m_pOwnStg = new Storage( *m_pStorStm, (nStorageMode & STORAGE_TRANSACTED) ? sal_False : sal_True );
+ m_bDelStm = sal_True;
}
}
else if ( bForceUCBStorage )
{
- m_pOwnStg = new UCBStorage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? FALSE : TRUE );
+ m_pOwnStg = new UCBStorage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? sal_False : sal_True );
SetError( ERRCODE_IO_NOTSUPPORTED );
}
else
{
- m_pOwnStg = new Storage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? FALSE : TRUE );
+ m_pOwnStg = new Storage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? sal_False : sal_True );
SetError( ERRCODE_IO_NOTSUPPORTED );
}
}
@@ -620,9 +620,9 @@ void SotStorage::CreateStorage( BOOL bForceUCBStorage, StreamMode nMode, Storage
{
// temporary storage
if ( bForceUCBStorage )
- m_pOwnStg = new UCBStorage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? FALSE : TRUE );
+ m_pOwnStg = new UCBStorage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? sal_False : sal_True );
else
- m_pOwnStg = new Storage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? FALSE : TRUE );
+ m_pOwnStg = new Storage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? sal_False : sal_True );
m_aName = m_pOwnStg->GetName();
}
@@ -631,7 +631,7 @@ void SotStorage::CreateStorage( BOOL bForceUCBStorage, StreamMode nMode, Storage
SignAsRoot( m_pOwnStg->IsRoot() );
}
-SotStorage::SotStorage( BOOL bUCBStorage, const String & rName, StreamMode nMode, StorageMode nStorageMode )
+SotStorage::SotStorage( sal_Bool bUCBStorage, const String & rName, StreamMode nMode, StorageMode nStorageMode )
INIT_SotStorage()
{
m_aName = rName;
@@ -651,22 +651,22 @@ SotStorage::SotStorage( BaseStorage * pStor )
}
m_pOwnStg = pStor;
- ULONG nErr = m_pOwnStg ? m_pOwnStg->GetError() : SVSTREAM_CANNOT_MAKE;
+ sal_uLong nErr = m_pOwnStg ? m_pOwnStg->GetError() : SVSTREAM_CANNOT_MAKE;
SetError( nErr );
if ( IsOLEStorage() )
m_nVersion = SOFFICE_FILEFORMAT_50;
}
-SotStorage::SotStorage( BOOL bUCBStorage, SvStream & rStm )
+SotStorage::SotStorage( sal_Bool bUCBStorage, SvStream & rStm )
INIT_SotStorage()
{
SetError( rStm.GetError() );
// try as UCBStorage, next try as OLEStorage
if ( UCBStorage::IsStorageFile( &rStm ) || bUCBStorage )
- m_pOwnStg = new UCBStorage( rStm, FALSE );
+ m_pOwnStg = new UCBStorage( rStm, sal_False );
else
- m_pOwnStg = new Storage( rStm, FALSE );
+ m_pOwnStg = new Storage( rStm, sal_False );
SetError( m_pOwnStg->GetError() );
@@ -683,9 +683,9 @@ SotStorage::SotStorage( SvStream & rStm )
// try as UCBStorage, next try as OLEStorage
if ( UCBStorage::IsStorageFile( &rStm ) )
- m_pOwnStg = new UCBStorage( rStm, FALSE );
+ m_pOwnStg = new UCBStorage( rStm, sal_False );
else
- m_pOwnStg = new Storage( rStm, FALSE );
+ m_pOwnStg = new Storage( rStm, sal_False );
SetError( m_pOwnStg->GetError() );
@@ -695,16 +695,16 @@ SotStorage::SotStorage( SvStream & rStm )
SignAsRoot( m_pOwnStg->IsRoot() );
}
-SotStorage::SotStorage( SvStream * pStm, BOOL bDelete )
+SotStorage::SotStorage( SvStream * pStm, sal_Bool bDelete )
INIT_SotStorage()
{
SetError( pStm->GetError() );
// try as UCBStorage, next try as OLEStorage
if ( UCBStorage::IsStorageFile( pStm ) )
- m_pOwnStg = new UCBStorage( *pStm, FALSE );
+ m_pOwnStg = new UCBStorage( *pStm, sal_False );
else
- m_pOwnStg = new Storage( *pStm, FALSE );
+ m_pOwnStg = new Storage( *pStm, sal_False );
SetError( m_pOwnStg->GetError() );
@@ -798,7 +798,7 @@ uno::Reference< embed::XStorage > SotStorage::GetUNOAPIDuplicate( const String&
UCBStorage* pChildUCBStg = PTR_CAST( UCBStorage, pChildStorage->m_pOwnStg );
if ( pChildUCBStg )
{
- UCBStorage* pTempStorage = new UCBStorage( pTempFile->GetURL(), STREAM_WRITE, FALSE, TRUE );
+ UCBStorage* pTempStorage = new UCBStorage( pTempFile->GetURL(), STREAM_WRITE, sal_False, sal_True );
if ( pTempStorage )
{
pChildUCBStg->CopyTo( pTempStorage );
@@ -896,7 +896,7 @@ SvMemoryStream * SotStorage::CreateMemoryStream()
|*
|* Beschreibung
*************************************************************************/
-BOOL SotStorage::IsStorageFile( const String & rFileName )
+sal_Bool SotStorage::IsStorageFile( const String & rFileName )
{
String aName( rFileName );
INetURLObject aObj( aName );
@@ -909,25 +909,25 @@ BOOL SotStorage::IsStorageFile( const String & rFileName )
}
SvStream * pStm = ::utl::UcbStreamHelper::CreateStream( aName, STREAM_STD_READ );
- BOOL bRet = SotStorage::IsStorageFile( pStm );
+ sal_Bool bRet = SotStorage::IsStorageFile( pStm );
delete pStm;
return bRet;
}
-BOOL SotStorage::IsStorageFile( SvStream* pStream )
+sal_Bool SotStorage::IsStorageFile( SvStream* pStream )
{
/** code for new storages must come first! **/
if ( pStream )
{
long nPos = pStream->Tell();
- BOOL bRet = UCBStorage::IsStorageFile( pStream );
+ sal_Bool bRet = UCBStorage::IsStorageFile( pStream );
if ( !bRet )
bRet = Storage::IsStorageFile( pStream );
pStream->Seek( nPos );
return bRet;
}
else
- return FALSE;
+ return sal_False;
}
/*************************************************************************
|* SotStorage::GetStorage()
@@ -973,7 +973,7 @@ void SotStorage::ResetError()
|* Beschreibung
*************************************************************************/
void SotStorage::SetClass( const SvGlobalName & rName,
- ULONG nOriginalClipFormat,
+ sal_uLong nOriginalClipFormat,
const String & rUserTypeName )
{
DBG_ASSERT( Owner(), "must be owner" );
@@ -984,7 +984,7 @@ void SotStorage::SetClass( const SvGlobalName & rName,
}
void SotStorage::SetConvertClass( const SvGlobalName & rName,
- ULONG nOriginalClipFormat,
+ sal_uLong nOriginalClipFormat,
const String & rUserTypeName )
{
DBG_ASSERT( Owner(), "must be owner" );
@@ -1013,9 +1013,9 @@ SvGlobalName SotStorage::GetClassName()
return aGN;
}
-ULONG SotStorage::GetFormat()
+sal_uLong SotStorage::GetFormat()
{
- ULONG nFormat = 0;
+ sal_uLong nFormat = 0;
DBG_ASSERT( Owner(), "must be owner" );
if( m_pOwnStg )
nFormat = m_pOwnStg->GetFormat();
@@ -1035,14 +1035,14 @@ String SotStorage::GetUserName()
return aName;
}
-BOOL SotStorage::ShouldConvert()
+sal_Bool SotStorage::ShouldConvert()
{
DBG_ASSERT( Owner(), "must be owner" );
if( m_pOwnStg )
return m_pOwnStg->ShouldConvert();
else
SetError( SVSTREAM_GENERALERROR );
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -1062,7 +1062,7 @@ void SotStorage::FillInfoList( SvStorageInfoList * pFillList ) const
|*
|* Beschreibung
*************************************************************************/
-BOOL SotStorage::CopyTo( SotStorage * pDestStg )
+sal_Bool SotStorage::CopyTo( SotStorage * pDestStg )
{
DBG_ASSERT( Owner(), "must be owner" );
DBG_ASSERT( pDestStg->Owner(), "must be owner" );
@@ -1083,7 +1083,7 @@ BOOL SotStorage::CopyTo( SotStorage * pDestStg )
|*
|* Beschreibung
*************************************************************************/
-BOOL SotStorage::Commit()
+sal_Bool SotStorage::Commit()
{
DBG_ASSERT( Owner(), "must be owner" );
if( m_pOwnStg )
@@ -1101,7 +1101,7 @@ BOOL SotStorage::Commit()
|*
|* Beschreibung
*************************************************************************/
-BOOL SotStorage::Revert()
+sal_Bool SotStorage::Revert()
{
DBG_ASSERT( Owner(), "must be owner" );
if( m_pOwnStg )
@@ -1133,7 +1133,7 @@ SotStorageStream * SotStorage::OpenEncryptedSotStream( const String & rEleName,
nMode |= STREAM_SHARE_DENYALL;
ErrCode nE = m_pOwnStg->GetError();
BaseStorageStream* p = m_pOwnStg->OpenStream( rEleName, nMode,
- (nStorageMode & STORAGE_TRANSACTED) ? FALSE : TRUE, &rKey );
+ (nStorageMode & STORAGE_TRANSACTED) ? sal_False : sal_True, &rKey );
pStm = new SotStorageStream( p );
if( !nE )
@@ -1160,7 +1160,7 @@ SotStorageStream * SotStorage::OpenSotStream( const String & rEleName,
nMode |= STREAM_SHARE_DENYALL;
ErrCode nE = m_pOwnStg->GetError();
BaseStorageStream * p = m_pOwnStg->OpenStream( rEleName, nMode,
- (nStorageMode & STORAGE_TRANSACTED) ? FALSE : TRUE );
+ (nStorageMode & STORAGE_TRANSACTED) ? sal_False : sal_True );
pStm = new SotStorageStream( p );
if( !nE )
@@ -1189,7 +1189,7 @@ SotStorage * SotStorage::OpenSotStorage( const String & rEleName,
nMode |= STREAM_SHARE_DENYALL;
ErrCode nE = m_pOwnStg->GetError();
BaseStorage * p = m_pOwnStg->OpenStorage( rEleName, nMode,
- (nStorageMode & STORAGE_TRANSACTED) ? FALSE : TRUE );
+ (nStorageMode & STORAGE_TRANSACTED) ? sal_False : sal_True );
if( p )
{
pStor = new SotStorage( p );
@@ -1216,7 +1216,7 @@ SotStorage * SotStorage::OpenUCBStorage( const String & rEleName,
nMode |= STREAM_SHARE_DENYALL;
ErrCode nE = m_pOwnStg->GetError();
BaseStorage * p = m_pOwnStg->OpenUCBStorage( rEleName, nMode,
- (nStorageMode & STORAGE_TRANSACTED) ? FALSE : TRUE );
+ (nStorageMode & STORAGE_TRANSACTED) ? sal_False : sal_True );
pStor = new SotStorage( p );
if( !nE )
m_pOwnStg->ResetError(); // kein Fehler setzen
@@ -1237,7 +1237,7 @@ SotStorage * SotStorage::OpenOLEStorage( const String & rEleName,
nMode |= STREAM_SHARE_DENYALL;
ErrCode nE = m_pOwnStg->GetError();
BaseStorage * p = m_pOwnStg->OpenOLEStorage( rEleName, nMode,
- (nStorageMode & STORAGE_TRANSACTED) ? FALSE : TRUE );
+ (nStorageMode & STORAGE_TRANSACTED) ? sal_False : sal_True );
pStor = new SotStorage( p );
if( !nE )
m_pOwnStg->ResetError(); // kein Fehler setzen
@@ -1254,31 +1254,31 @@ SotStorage * SotStorage::OpenOLEStorage( const String & rEleName,
|*
|* Beschreibung
*************************************************************************/
-BOOL SotStorage::IsStorage( const String & rEleName ) const
+sal_Bool SotStorage::IsStorage( const String & rEleName ) const
{
DBG_ASSERT( Owner(), "must be owner" );
// ein bisschen schneller
if( m_pOwnStg )
return m_pOwnStg->IsStorage( rEleName );
- return FALSE;
+ return sal_False;
}
-BOOL SotStorage::IsStream( const String & rEleName ) const
+sal_Bool SotStorage::IsStream( const String & rEleName ) const
{
DBG_ASSERT( Owner(), "must be owner" );
// ein bisschen schneller
if( m_pOwnStg )
return m_pOwnStg->IsStream( rEleName );
- return FALSE;
+ return sal_False;
}
-BOOL SotStorage::IsContained( const String & rEleName ) const
+sal_Bool SotStorage::IsContained( const String & rEleName ) const
{
DBG_ASSERT( Owner(), "must be owner" );
// ein bisschen schneller
if( m_pOwnStg )
return m_pOwnStg->IsContained( rEleName );
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -1286,7 +1286,7 @@ BOOL SotStorage::IsContained( const String & rEleName ) const
|*
|* Beschreibung
*************************************************************************/
-BOOL SotStorage::Remove( const String & rEleName )
+sal_Bool SotStorage::Remove( const String & rEleName )
{
DBG_ASSERT( Owner(), "must be owner" );
if( m_pOwnStg )
@@ -1304,7 +1304,7 @@ BOOL SotStorage::Remove( const String & rEleName )
|*
|* Beschreibung
*************************************************************************/
-BOOL SotStorage::Rename( const String & rEleName, const String & rNewName )
+sal_Bool SotStorage::Rename( const String & rEleName, const String & rNewName )
{
DBG_ASSERT( Owner(), "must be owner" );
if( m_pOwnStg )
@@ -1322,7 +1322,7 @@ BOOL SotStorage::Rename( const String & rEleName, const String & rNewName )
|*
|* Beschreibung
*************************************************************************/
-BOOL SotStorage::CopyTo( const String & rEleName,
+sal_Bool SotStorage::CopyTo( const String & rEleName,
SotStorage * pNewSt, const String & rNewName )
{
DBG_ASSERT( Owner(), "must be owner" );
@@ -1343,7 +1343,7 @@ BOOL SotStorage::CopyTo( const String & rEleName,
|*
|* Beschreibung
*************************************************************************/
-BOOL SotStorage::MoveTo( const String & rEleName,
+sal_Bool SotStorage::MoveTo( const String & rEleName,
SotStorage * pNewSt, const String & rNewName )
{
DBG_ASSERT( Owner(), "must be owner" );
@@ -1378,16 +1378,16 @@ SvStream* SotStorage::GetTargetSvStream() const
}
-BOOL SotStorage::Validate()
+sal_Bool SotStorage::Validate()
{
DBG_ASSERT( m_bIsRoot, "Validate nur an Rootstorage" );
if( m_pOwnStg )
return m_pOwnStg->ValidateFAT();
else
- return TRUE;
+ return sal_True;
}
-BOOL SotStorage::SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue )
+sal_Bool SotStorage::SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue )
{
UCBStorage* pStg = PTR_CAST( UCBStorage, m_pOwnStg );
if ( pStg )
@@ -1397,11 +1397,11 @@ BOOL SotStorage::SetProperty( const String& rName, const ::com::sun::star::uno::
else
{
DBG_WARNING("W1:Not implemented!");
- return FALSE;
+ return sal_False;
}
}
-BOOL SotStorage::GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue )
+sal_Bool SotStorage::GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue )
{
UCBStorage* pStg = PTR_CAST( UCBStorage, m_pOwnStg );
if ( pStg )
@@ -1411,20 +1411,20 @@ BOOL SotStorage::GetProperty( const String& rName, ::com::sun::star::uno::Any& r
else if ( rName.CompareToAscii("MediaType") == COMPARE_EQUAL )
{
String aStr = SotExchange::GetFormatMimeType( GetFormat() );
- USHORT nPos = aStr.Search(';');
+ sal_uInt16 nPos = aStr.Search(';');
if ( nPos != STRING_NOTFOUND )
aStr = aStr.Copy( 0, nPos );
rValue <<= (::rtl::OUString) aStr;
- return TRUE;
+ return sal_True;
}
else
{
DBG_WARNING("W1:Not implemented!");
- return FALSE;
+ return sal_False;
}
}
-BOOL SotStorage::GetProperty( const String& rEleName, const String& rName, ::com::sun::star::uno::Any& rValue )
+sal_Bool SotStorage::GetProperty( const String& rEleName, const String& rName, ::com::sun::star::uno::Any& rValue )
{
UCBStorage* pStg = PTR_CAST( UCBStorage, m_pOwnStg );
if ( pStg )
@@ -1434,22 +1434,22 @@ BOOL SotStorage::GetProperty( const String& rEleName, const String& rName, ::com
else
{
DBG_WARNING("W1:Not implemented!");
- return FALSE;
+ return sal_False;
}
}
-BOOL SotStorage::IsOLEStorage() const
+sal_Bool SotStorage::IsOLEStorage() const
{
UCBStorage* pStg = PTR_CAST( UCBStorage, m_pOwnStg );
return !pStg;
}
-BOOL SotStorage::IsOLEStorage( const String & rFileName )
+sal_Bool SotStorage::IsOLEStorage( const String & rFileName )
{
return Storage::IsStorageFile( rFileName );
}
-BOOL SotStorage::IsOLEStorage( SvStream* pStream )
+sal_Bool SotStorage::IsOLEStorage( SvStream* pStream )
{
return Storage::IsStorageFile( pStream );
}
@@ -1506,7 +1506,7 @@ SotStorage* SotStorage::OpenOLEStorage( const com::sun::star::uno::Reference < c
pStream->SetError( ERRCODE_IO_GENERAL );
}
- return new SotStorage( pStream, TRUE );
+ return new SotStorage( pStream, sal_True );
}
sal_Int32 SotStorage::GetFormatID( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStorage )
diff --git a/sot/source/sdstor/storinfo.cxx b/sot/source/sdstor/storinfo.cxx
index f912dc6fc83f..383d2f20d1c5 100644
--- a/sot/source/sdstor/storinfo.cxx
+++ b/sot/source/sdstor/storinfo.cxx
@@ -39,7 +39,7 @@ PRV_SV_IMPL_OWNER_LIST(SvStorageInfoList,SvStorageInfo)
const SvStorageInfo * SvStorageInfoList::Get( const String & rEleName )
{
- for( ULONG i = 0; i < Count(); i++ )
+ for( sal_uLong i = 0; i < Count(); i++ )
{
const SvStorageInfo & rType = GetObject( i );
if( rType.GetName() == rEleName )
@@ -50,10 +50,10 @@ const SvStorageInfo * SvStorageInfoList::Get( const String & rEleName )
/************** class SvStorageInfo **************************************
*************************************************************************/
-ULONG ReadClipboardFormat( SvStream & rStm )
+sal_uLong ReadClipboardFormat( SvStream & rStm )
{
sal_uInt32 nFormat = 0;
- INT32 nLen = 0;
+ sal_Int32 nLen = 0;
rStm >> nLen;
if( rStm.IsEof() )
rStm.SetError( SVSTREAM_GENERALERROR );
@@ -61,7 +61,7 @@ ULONG ReadClipboardFormat( SvStream & rStm )
{
// get a string name
sal_Char * p = new sal_Char[ nLen ];
- if( rStm.Read( p, nLen ) == (ULONG) nLen )
+ if( rStm.Read( p, nLen ) == (sal_uLong) nLen )
{
nFormat = SotExchange::RegisterFormatName( String::CreateFromAscii( p, short(nLen-1) ) );
}
@@ -88,7 +88,7 @@ ULONG ReadClipboardFormat( SvStream & rStm )
return nFormat;
}
-void WriteClipboardFormat( SvStream & rStm, ULONG nFormat )
+void WriteClipboardFormat( SvStream & rStm, sal_uLong nFormat )
{
// determine the clipboard format string
String aCbFmt;
@@ -97,15 +97,15 @@ void WriteClipboardFormat( SvStream & rStm, ULONG nFormat )
if( aCbFmt.Len() )
{
ByteString aAsciiCbFmt( aCbFmt, RTL_TEXTENCODING_ASCII_US );
- rStm << (INT32) (aAsciiCbFmt.Len() + 1);
+ rStm << (sal_Int32) (aAsciiCbFmt.Len() + 1);
rStm << (const char *)aAsciiCbFmt.GetBuffer();
- rStm << (UINT8) 0;
+ rStm << (sal_uInt8) 0;
}
else if( nFormat )
- rStm << (INT32) -1 // for Windows
- << (INT32) nFormat;
+ rStm << (sal_Int32) -1 // for Windows
+ << (sal_Int32) nFormat;
else
- rStm << (INT32) 0; // no clipboard format
+ rStm << (sal_Int32) 0; // no clipboard format
}
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 4f265490a05e..532877117329 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -443,10 +443,10 @@ class UCBStorageStream_Impl : public SvRefBase, public SvStream
~UCBStorageStream_Impl();
public:
- virtual ULONG GetData( void* pData, ULONG nSize );
- virtual ULONG PutData( const void* pData, ULONG nSize );
- virtual ULONG SeekPos( ULONG nPos );
- virtual void SetSize( ULONG nSize );
+ virtual sal_uLong GetData( void* pData, sal_uLong nSize );
+ virtual sal_uLong PutData( const void* pData, sal_uLong nSize );
+ virtual sal_uLong SeekPos( sal_uLong nPos );
+ virtual void SetSize( sal_uLong nSize );
virtual void FlushData();
virtual void ResetError();
@@ -466,35 +466,35 @@ public:
RepresentModes m_nRepresentMode; // should it be used as XInputStream or as SvStream
long m_nError;
StreamMode m_nMode; // open mode ( read/write/trunc/nocreate/sharing )
- BOOL m_bSourceRead; // Source still contains useful information
- BOOL m_bModified; // only modified streams will be sent to the original content
- BOOL m_bCommited; // sending the streams is coordinated by the root storage of the package
- BOOL m_bDirect; // the storage and its streams are opened in direct mode; for UCBStorages
+ sal_Bool m_bSourceRead; // Source still contains useful information
+ sal_Bool m_bModified; // only modified streams will be sent to the original content
+ sal_Bool m_bCommited; // sending the streams is coordinated by the root storage of the package
+ sal_Bool m_bDirect; // the storage and its streams are opened in direct mode; for UCBStorages
// this means that the root storage does an autocommit when its external
// reference is destroyed
- BOOL m_bIsOLEStorage;// an OLEStorage on a UCBStorageStream makes this an Autocommit-stream
+ sal_Bool m_bIsOLEStorage;// an OLEStorage on a UCBStorageStream makes this an Autocommit-stream
- UCBStorageStream_Impl( const String&, StreamMode, UCBStorageStream*, BOOL, const ByteString* pKey=0, BOOL bRepair = FALSE, Reference< XProgressHandler > xProgress = Reference< XProgressHandler >() );
+ UCBStorageStream_Impl( const String&, StreamMode, UCBStorageStream*, sal_Bool, const ByteString* pKey=0, sal_Bool bRepair = sal_False, Reference< XProgressHandler > xProgress = Reference< XProgressHandler >() );
void Free();
- BOOL Init();
- BOOL Clear();
+ sal_Bool Init();
+ sal_Bool Clear();
sal_Int16 Commit(); // if modified and commited: transfer an XInputStream to the content
- BOOL Revert(); // discard all changes
+ sal_Bool Revert(); // discard all changes
BaseStorage* CreateStorage();// create an OLE Storage on the UCBStorageStream
- ULONG GetSize();
+ sal_uLong GetSize();
- ULONG ReadSourceWriteTemporary( ULONG aLength ); // read aLength from source and copy to temporary,
+ sal_uLong ReadSourceWriteTemporary( sal_uLong aLength ); // read aLength from source and copy to temporary,
// no seeking is produced
- ULONG ReadSourceWriteTemporary(); // read source till the end and copy to temporary,
+ sal_uLong ReadSourceWriteTemporary(); // read source till the end and copy to temporary,
// no seeking is produced
#if 0
- ULONG CopySourceToTemporary( ULONG aLength ); // same as ReadSourceWriteToTemporary( aLength )
+ sal_uLong CopySourceToTemporary( sal_uLong aLength ); // same as ReadSourceWriteToTemporary( aLength )
// but the writing is done at the end of temporary
// pointer position is not changed
#endif
- ULONG CopySourceToTemporary(); // same as ReadSourceWriteToTemporary()
+ sal_uLong CopySourceToTemporary(); // same as ReadSourceWriteToTemporary()
// but the writing is done at the end of temporary
// pointer position is not changed
Reference<XInputStream> GetXInputStream(); // return XInputStream, after that
@@ -527,34 +527,34 @@ public:
//SvStream* m_pStream; // the corresponding editable stream, only for storage on a stream
long m_nError;
StreamMode m_nMode; // open mode ( read/write/trunc/nocreate/sharing )
- BOOL m_bModified; // only modified elements will be sent to the original content
- BOOL m_bCommited; // sending the streams is coordinated by the root storage of the package
- BOOL m_bDirect; // the storage and its streams are opened in direct mode; for UCBStorages
+ sal_Bool m_bModified; // only modified elements will be sent to the original content
+ sal_Bool m_bCommited; // sending the streams is coordinated by the root storage of the package
+ sal_Bool m_bDirect; // the storage and its streams are opened in direct mode; for UCBStorages
// this means that the root storage does an autocommit when its external
// reference is destroyed
- BOOL m_bIsRoot; // marks this storage as root storages that manages all oommits and reverts
- BOOL m_bDirty; // ???
- BOOL m_bIsLinked;
- BOOL m_bListCreated;
- ULONG m_nFormat;
+ sal_Bool m_bIsRoot; // marks this storage as root storages that manages all oommits and reverts
+ sal_Bool m_bDirty; // ???
+ sal_Bool m_bIsLinked;
+ sal_Bool m_bListCreated;
+ sal_uLong m_nFormat;
String m_aUserTypeName;
SvGlobalName m_aClassId;
UCBStorageElementList_Impl m_aChildrenList;
- BOOL m_bRepairPackage;
+ sal_Bool m_bRepairPackage;
Reference< XProgressHandler > m_xProgressHandler;
UNOStorageHolderList* m_pUNOStorageHolderList;
- UCBStorage_Impl( const ::ucbhelper::Content&, const String&, StreamMode, UCBStorage*, BOOL, BOOL, BOOL = FALSE, Reference< XProgressHandler > = Reference< XProgressHandler >() );
- UCBStorage_Impl( const String&, StreamMode, UCBStorage*, BOOL, BOOL, BOOL = FALSE, Reference< XProgressHandler > = Reference< XProgressHandler >() );
- UCBStorage_Impl( SvStream&, UCBStorage*, BOOL );
+ UCBStorage_Impl( const ::ucbhelper::Content&, const String&, StreamMode, UCBStorage*, sal_Bool, sal_Bool, sal_Bool = sal_False, Reference< XProgressHandler > = Reference< XProgressHandler >() );
+ UCBStorage_Impl( const String&, StreamMode, UCBStorage*, sal_Bool, sal_Bool, sal_Bool = sal_False, Reference< XProgressHandler > = Reference< XProgressHandler >() );
+ UCBStorage_Impl( SvStream&, UCBStorage*, sal_Bool );
void Init();
sal_Int16 Commit();
- BOOL Revert();
- BOOL Insert( ::ucbhelper::Content *pContent );
- UCBStorage_Impl* OpenStorage( UCBStorageElement_Impl* pElement, StreamMode nMode, BOOL bDirect );
- UCBStorageStream_Impl* OpenStream( UCBStorageElement_Impl*, StreamMode, BOOL, const ByteString* pKey=0 );
+ sal_Bool Revert();
+ sal_Bool Insert( ::ucbhelper::Content *pContent );
+ UCBStorage_Impl* OpenStorage( UCBStorageElement_Impl* pElement, StreamMode nMode, sal_Bool bDirect );
+ UCBStorageStream_Impl* OpenStream( UCBStorageElement_Impl*, StreamMode, sal_Bool, const ByteString* pKey=0 );
void SetProps( const Sequence < Sequence < PropertyValue > >& rSequence, const String& );
void GetProps( sal_Int32&, Sequence < Sequence < PropertyValue > >& rSequence, const String& );
sal_Int32 GetObjectCount();
@@ -589,32 +589,32 @@ struct UCBStorageElement_Impl
{
String m_aName; // the actual URL relative to the root "folder"
String m_aOriginalName;// the original name in the content
- ULONG m_nSize;
- BOOL m_bIsFolder; // Only TRUE when it is a UCBStorage !
- BOOL m_bIsStorage; // Also TRUE when it is an OLEStorage !
- BOOL m_bIsRemoved; // element will be removed on commit
- BOOL m_bIsInserted; // element will be removed on revert
+ sal_uLong m_nSize;
+ sal_Bool m_bIsFolder; // Only sal_True when it is a UCBStorage !
+ sal_Bool m_bIsStorage; // Also sal_True when it is an OLEStorage !
+ sal_Bool m_bIsRemoved; // element will be removed on commit
+ sal_Bool m_bIsInserted; // element will be removed on revert
UCBStorage_ImplRef m_xStorage; // reference to the "real" storage
UCBStorageStream_ImplRef m_xStream; // reference to the "real" stream
UCBStorageElement_Impl( const ::rtl::OUString& rName,
- BOOL bIsFolder = FALSE, ULONG nSize = 0 )
+ sal_Bool bIsFolder = sal_False, sal_uLong nSize = 0 )
: m_aName( rName )
, m_aOriginalName( rName )
, m_nSize( nSize )
, m_bIsFolder( bIsFolder )
, m_bIsStorage( bIsFolder )
- , m_bIsRemoved( FALSE )
- , m_bIsInserted( FALSE )
+ , m_bIsRemoved( sal_False )
+ , m_bIsInserted( sal_False )
{
}
::ucbhelper::Content* GetContent();
- BOOL IsModified();
+ sal_Bool IsModified();
String GetContentType();
void SetContentType( const String& );
String GetOriginalContentType();
- BOOL IsLoaded()
+ sal_Bool IsLoaded()
{ return m_xStream.Is() || m_xStorage.Is(); }
};
@@ -664,9 +664,9 @@ String UCBStorageElement_Impl::GetOriginalContentType()
return String();
}
-BOOL UCBStorageElement_Impl::IsModified()
+sal_Bool UCBStorageElement_Impl::IsModified()
{
- BOOL bModified = m_bIsRemoved || m_bIsInserted || m_aName != m_aOriginalName;
+ sal_Bool bModified = m_bIsRemoved || m_bIsInserted || m_aName != m_aOriginalName;
if ( bModified )
{
if ( m_xStream.Is() )
@@ -678,7 +678,7 @@ BOOL UCBStorageElement_Impl::IsModified()
return bModified;
}
-UCBStorageStream_Impl::UCBStorageStream_Impl( const String& rName, StreamMode nMode, UCBStorageStream* pStream, BOOL bDirect, const ByteString* pKey, BOOL bRepair, Reference< XProgressHandler > xProgress )
+UCBStorageStream_Impl::UCBStorageStream_Impl( const String& rName, StreamMode nMode, UCBStorageStream* pStream, sal_Bool bDirect, const ByteString* pKey, sal_Bool bRepair, Reference< XProgressHandler > xProgress )
: m_pAntiImpl( pStream )
, m_aURL( rName )
, m_pContent( NULL )
@@ -687,10 +687,10 @@ UCBStorageStream_Impl::UCBStorageStream_Impl( const String& rName, StreamMode nM
, m_nError( 0 )
, m_nMode( nMode )
, m_bSourceRead( !( nMode & STREAM_TRUNC ) )
- , m_bModified( FALSE )
- , m_bCommited( FALSE )
+ , m_bModified( sal_False )
+ , m_bCommited( sal_False )
, m_bDirect( bDirect )
- , m_bIsOLEStorage( FALSE )
+ , m_bIsOLEStorage( sal_False )
{
// name is last segment in URL
INetURLObject aObj( rName );
@@ -775,7 +775,7 @@ Reference<XInputStream> UCBStorageStream_Impl::GetXInputStream()
CopySourceToTemporary();
// owner transfer of stream to wrapper
- aResult = new ::utl::OInputStreamWrapper( m_pStream, TRUE );
+ aResult = new ::utl::OInputStreamWrapper( m_pStream, sal_True );
m_pStream->Seek(0);
if( aResult.is() )
@@ -812,13 +812,13 @@ Reference<XInputStream> UCBStorageStream_Impl::GetXInputStream()
return aResult;
}
-BOOL UCBStorageStream_Impl::Init()
+sal_Bool UCBStorageStream_Impl::Init()
{
if( m_nRepresentMode == xinputstream )
{
DBG_ERROR( "XInputStream misuse!" );
SetError( ERRCODE_IO_ACCESSDENIED );
- return FALSE;
+ return sal_False;
}
if( !m_pStream )
@@ -840,7 +840,7 @@ BOOL UCBStorageStream_Impl::Init()
{
DBG_ERROR( "Suspicious temporary stream creation!" );
SetError( SVSTREAM_CANNOT_MAKE );
- return FALSE;
+ return sal_False;
}
SetError( m_pStream->GetError() );
@@ -871,12 +871,12 @@ BOOL UCBStorageStream_Impl::Init()
catch( BufferSizeExceededException& )
{
// the temporary stream already contain all the data
- m_bSourceRead = FALSE;
+ m_bSourceRead = sal_False;
}
catch( Exception& )
{
// something is really wrong
- m_bSourceRead = FALSE;
+ m_bSourceRead = sal_False;
DBG_ERROR( "Can not operate original stream!" );
SetError( SVSTREAM_CANNOT_MAKE );
}
@@ -886,7 +886,7 @@ BOOL UCBStorageStream_Impl::Init()
else
{
// if the new file is edited than no source exist
- m_bSourceRead = FALSE;
+ m_bSourceRead = sal_False;
//SetError( SVSTREAM_CANNOT_MAKE );
}
}
@@ -896,12 +896,12 @@ BOOL UCBStorageStream_Impl::Init()
return sal_True;
}
-ULONG UCBStorageStream_Impl::ReadSourceWriteTemporary()
+sal_uLong UCBStorageStream_Impl::ReadSourceWriteTemporary()
{
// read source stream till the end and copy all the data to
// the current position of the temporary stream
- ULONG aResult = 0;
+ sal_uLong aResult = 0;
if( m_bSourceRead )
{
@@ -909,7 +909,7 @@ ULONG UCBStorageStream_Impl::ReadSourceWriteTemporary()
try
{
- ULONG aReaded;
+ sal_uLong aReaded;
do
{
aReaded = m_rSource->readBytes( aData, 32000 );
@@ -919,7 +919,7 @@ ULONG UCBStorageStream_Impl::ReadSourceWriteTemporary()
#if OSL_DEBUG_LEVEL > 1
catch( Exception & e )
{
- OSL_ENSURE( FALSE, ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
+ OSL_ENSURE( sal_False, ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
#else
catch( Exception & )
{
@@ -927,18 +927,18 @@ ULONG UCBStorageStream_Impl::ReadSourceWriteTemporary()
}
}
- m_bSourceRead = FALSE;
+ m_bSourceRead = sal_False;
return aResult;
}
-ULONG UCBStorageStream_Impl::ReadSourceWriteTemporary( ULONG aLength )
+sal_uLong UCBStorageStream_Impl::ReadSourceWriteTemporary( sal_uLong aLength )
{
// read aLength bite from the source stream and copy them to the current
// position of the temporary stream
- ULONG aResult = 0;
+ sal_uLong aResult = 0;
if( m_bSourceRead )
{
@@ -947,22 +947,22 @@ ULONG UCBStorageStream_Impl::ReadSourceWriteTemporary( ULONG aLength )
try
{
- ULONG aReaded = 32000;
+ sal_uLong aReaded = 32000;
- for( ULONG pInd = 0; pInd < aLength && aReaded == 32000 ; pInd += 32000 )
+ for( sal_uLong pInd = 0; pInd < aLength && aReaded == 32000 ; pInd += 32000 )
{
- ULONG aToCopy = min( aLength - pInd, 32000 );
+ sal_uLong aToCopy = min( aLength - pInd, 32000 );
aReaded = m_rSource->readBytes( aData, aToCopy );
aResult += m_pStream->Write( aData.getArray(), aReaded );
}
if( aResult < aLength )
- m_bSourceRead = FALSE;
+ m_bSourceRead = sal_False;
}
#if OSL_DEBUG_LEVEL > 1
catch( Exception & e )
{
- OSL_ENSURE( FALSE, ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
+ OSL_ENSURE( sal_False, ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
#else
catch( Exception & )
{
@@ -973,14 +973,14 @@ ULONG UCBStorageStream_Impl::ReadSourceWriteTemporary( ULONG aLength )
return aResult;
}
-ULONG UCBStorageStream_Impl::CopySourceToTemporary()
+sal_uLong UCBStorageStream_Impl::CopySourceToTemporary()
{
// current position of the temporary stream is not changed
- ULONG aResult = 0;
+ sal_uLong aResult = 0;
if( m_bSourceRead )
{
- ULONG aPos = m_pStream->Tell();
+ sal_uLong aPos = m_pStream->Tell();
m_pStream->Seek( STREAM_SEEK_TO_END );
aResult = ReadSourceWriteTemporary();
m_pStream->Seek( aPos );
@@ -991,14 +991,14 @@ ULONG UCBStorageStream_Impl::CopySourceToTemporary()
}
#if 0
-ULONG UCBStorageStream_Impl::CopySourceToTemporary( ULONG aLength )
+sal_uLong UCBStorageStream_Impl::CopySourceToTemporary( sal_uLong aLength )
{
// current position of the temporary stream is not changed
- ULONG aResult = 0;
+ sal_uLong aResult = 0;
if( m_bSourceRead )
{
- ULONG aPos = m_pStream->Tell();
+ sal_uLong aPos = m_pStream->Tell();
m_pStream->Seek( STREAM_SEEK_TO_END );
aResult = ReadSourceWriteTemporary( aLength );
m_pStream->Seek( aPos );
@@ -1011,9 +1011,9 @@ ULONG UCBStorageStream_Impl::CopySourceToTemporary( ULONG aLength )
// UCBStorageStream_Impl must have a SvStream interface, because it then can be used as underlying stream
// of an OLEStorage; so every write access caused by storage operations marks the UCBStorageStream as modified
-ULONG UCBStorageStream_Impl::GetData( void* pData, ULONG nSize )
+sal_uLong UCBStorageStream_Impl::GetData( void* pData, sal_uLong nSize )
{
- ULONG aResult = 0;
+ sal_uLong aResult = 0;
if( !Init() )
return 0;
@@ -1026,20 +1026,20 @@ ULONG UCBStorageStream_Impl::GetData( void* pData, ULONG nSize )
// read the tail of the data from original stream
// copy this tail to the temporary stream
- ULONG aToRead = nSize - aResult;
+ sal_uLong aToRead = nSize - aResult;
pData = (void*)( (char*)pData + aResult );
try
{
Sequence<sal_Int8> aData( aToRead );
- ULONG aReaded = m_rSource->readBytes( aData, aToRead );
+ sal_uLong aReaded = m_rSource->readBytes( aData, aToRead );
aResult += m_pStream->Write( (void*)aData.getArray(), aReaded );
memcpy( pData, aData.getArray(), aReaded );
}
#if OSL_DEBUG_LEVEL > 1
catch( Exception & e )
{
- OSL_ENSURE( FALSE, ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
+ OSL_ENSURE( sal_False, ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
#else
catch( Exception & )
{
@@ -1047,13 +1047,13 @@ ULONG UCBStorageStream_Impl::GetData( void* pData, ULONG nSize )
}
if( aResult < nSize )
- m_bSourceRead = FALSE;
+ m_bSourceRead = sal_False;
}
return aResult;
}
-ULONG UCBStorageStream_Impl::PutData( const void* pData, ULONG nSize )
+sal_uLong UCBStorageStream_Impl::PutData( const void* pData, sal_uLong nSize )
{
if ( !(m_nMode & STREAM_WRITE) )
{
@@ -1064,7 +1064,7 @@ ULONG UCBStorageStream_Impl::PutData( const void* pData, ULONG nSize )
if( !nSize || !Init() )
return 0;
- ULONG aResult = m_pStream->Write( pData, nSize );
+ sal_uLong aResult = m_pStream->Write( pData, nSize );
m_bModified = aResult > 0;
@@ -1072,12 +1072,12 @@ ULONG UCBStorageStream_Impl::PutData( const void* pData, ULONG nSize )
}
-ULONG UCBStorageStream_Impl::SeekPos( ULONG nPos )
+sal_uLong UCBStorageStream_Impl::SeekPos( sal_uLong nPos )
{
if( !Init() )
return 0;
- ULONG aResult;
+ sal_uLong aResult;
if( nPos == STREAM_SEEK_TO_END )
{
@@ -1108,7 +1108,7 @@ ULONG UCBStorageStream_Impl::SeekPos( ULONG nPos )
{
aResult += ReadSourceWriteTemporary( nPos - aResult );
if( aResult < nPos )
- m_bSourceRead = FALSE;
+ m_bSourceRead = sal_False;
DBG_ASSERT( aResult == m_pStream->Tell(), "Error in stream arithmetic!\n" );
}
@@ -1129,7 +1129,7 @@ ULONG UCBStorageStream_Impl::SeekPos( ULONG nPos )
return aResult;
}
-void UCBStorageStream_Impl::SetSize( ULONG nSize )
+void UCBStorageStream_Impl::SetSize( sal_uLong nSize )
{
if ( !(m_nMode & STREAM_WRITE) )
{
@@ -1140,11 +1140,11 @@ void UCBStorageStream_Impl::SetSize( ULONG nSize )
if( !Init() )
return;
- m_bModified = TRUE;
+ m_bModified = sal_True;
if( m_bSourceRead )
{
- ULONG aPos = m_pStream->Tell();
+ sal_uLong aPos = m_pStream->Tell();
m_pStream->Seek( STREAM_SEEK_TO_END );
if( m_pStream->Tell() < nSize )
ReadSourceWriteTemporary( nSize - m_pStream->Tell() );
@@ -1152,7 +1152,7 @@ void UCBStorageStream_Impl::SetSize( ULONG nSize )
}
m_pStream->SetStreamSize( nSize );
- m_bSourceRead = FALSE;
+ m_bSourceRead = sal_False;
}
void UCBStorageStream_Impl::FlushData()
@@ -1163,7 +1163,7 @@ void UCBStorageStream_Impl::FlushData()
m_pStream->Flush();
}
- m_bCommited = TRUE;
+ m_bCommited = sal_True;
}
void UCBStorageStream_Impl::SetError( sal_uInt32 nErr )
@@ -1184,15 +1184,15 @@ void UCBStorageStream_Impl::ResetError()
m_pAntiImpl->ResetError();
}
-ULONG UCBStorageStream_Impl::GetSize()
+sal_uLong UCBStorageStream_Impl::GetSize()
{
if( !Init() )
return 0;
- ULONG nPos = m_pStream->Tell();
+ sal_uLong nPos = m_pStream->Tell();
m_pStream->Seek( STREAM_SEEK_TO_END );
ReadSourceWriteTemporary();
- ULONG nRet = m_pStream->Tell();
+ sal_uLong nRet = m_pStream->Tell();
m_pStream->Seek( nPos );
return nRet;
@@ -1252,8 +1252,8 @@ sal_Int16 UCBStorageStream_Impl::Commit()
INetURLObject aObj( m_aURL );
aObj.SetName( m_aName );
m_aURL = aObj.GetMainURL( INetURLObject::NO_DECODE );
- m_bModified = FALSE;
- m_bSourceRead = TRUE;
+ m_bModified = sal_False;
+ m_bSourceRead = sal_True;
}
catch ( CommandAbortedException& )
{
@@ -1274,7 +1274,7 @@ sal_Int16 UCBStorageStream_Impl::Commit()
return COMMIT_RESULT_FAILURE;
}
- m_bCommited = FALSE;
+ m_bCommited = sal_False;
return COMMIT_RESULT_SUCCESS;
}
}
@@ -1282,13 +1282,13 @@ sal_Int16 UCBStorageStream_Impl::Commit()
return COMMIT_RESULT_NOTHING_TO_DO;
}
-BOOL UCBStorageStream_Impl::Revert()
+sal_Bool UCBStorageStream_Impl::Revert()
{
// if an OLEStorage is created on this stream, no "revert" is neccessary because OLEStorages do nothing on "Revert" !
if ( m_bCommited )
{
DBG_ERROR("Revert while commit is in progress!" );
- return FALSE; // ???
+ return sal_False; // ???
}
Free();
@@ -1298,7 +1298,7 @@ BOOL UCBStorageStream_Impl::Revert()
m_aTempURL.Erase();
}
- m_bSourceRead = FALSE;
+ m_bSourceRead = sal_False;
try
{
m_rSource = m_pContent->openStream();
@@ -1306,11 +1306,11 @@ BOOL UCBStorageStream_Impl::Revert()
{
if ( m_pAntiImpl && ( m_nMode & STREAM_TRUNC ) )
// stream is in use and should be truncated
- m_bSourceRead = FALSE;
+ m_bSourceRead = sal_False;
else
{
m_nMode &= ~STREAM_TRUNC;
- m_bSourceRead = TRUE;
+ m_bSourceRead = sal_True;
}
}
else
@@ -1328,15 +1328,15 @@ BOOL UCBStorageStream_Impl::Revert()
{
}
- m_bModified = FALSE;
+ m_bModified = sal_False;
m_aName = m_aOriginalName;
m_aContentType = m_aOriginalContentType;
return ( GetError() == ERRCODE_NONE );
}
-BOOL UCBStorageStream_Impl::Clear()
+sal_Bool UCBStorageStream_Impl::Clear()
{
- BOOL bRet = ( m_pAntiImpl == NULL );
+ sal_Bool bRet = ( m_pAntiImpl == NULL );
DBG_ASSERT( bRet, "Removing used stream!" );
if( bRet )
{
@@ -1387,7 +1387,7 @@ void UCBStorageStream_Impl::PrepareCachedForReopen( StreamMode nMode )
}
}
-UCBStorageStream::UCBStorageStream( const String& rName, StreamMode nMode, BOOL bDirect, const ByteString* pKey )
+UCBStorageStream::UCBStorageStream( const String& rName, StreamMode nMode, sal_Bool bDirect, const ByteString* pKey )
{
// pImp must be initialized in the body, because otherwise the vtable of the stream is not initialized
// to class UCBStorageStream !
@@ -1396,7 +1396,7 @@ UCBStorageStream::UCBStorageStream( const String& rName, StreamMode nMode, BOOL
StorageBase::m_nMode = pImp->m_nMode;
}
-UCBStorageStream::UCBStorageStream( const String& rName, StreamMode nMode, BOOL bDirect, const ByteString* pKey, BOOL bRepair, Reference< XProgressHandler > xProgress )
+UCBStorageStream::UCBStorageStream( const String& rName, StreamMode nMode, sal_Bool bDirect, const ByteString* pKey, sal_Bool bRepair, Reference< XProgressHandler > xProgress )
{
// pImp must be initialized in the body, because otherwise the vtable of the stream is not initialized
// to class UCBStorageStream !
@@ -1423,13 +1423,13 @@ UCBStorageStream::~UCBStorageStream()
pImp->ReleaseRef();
}
-ULONG UCBStorageStream::Read( void * pData, ULONG nSize )
+sal_uLong UCBStorageStream::Read( void * pData, sal_uLong nSize )
{
//return pImp->m_pStream->Read( pData, nSize );
return pImp->GetData( pData, nSize );
}
-ULONG UCBStorageStream::Write( const void* pData, ULONG nSize )
+sal_uLong UCBStorageStream::Write( const void* pData, sal_uLong nSize )
{
/*
// mba: does occur in writer !
@@ -1439,18 +1439,18 @@ ULONG UCBStorageStream::Write( const void* pData, ULONG nSize )
return 0;
}
*/
- // pImp->m_bModified = TRUE;
+ // pImp->m_bModified = sal_True;
//return pImp->m_pStream->Write( pData, nSize );
return pImp->PutData( pData, nSize );
}
-ULONG UCBStorageStream::Seek( ULONG nPos )
+sal_uLong UCBStorageStream::Seek( sal_uLong nPos )
{
//return pImp->m_pStream->Seek( nPos );
return pImp->Seek( nPos );
}
-ULONG UCBStorageStream::Tell()
+sal_uLong UCBStorageStream::Tell()
{
if( !pImp->Init() )
return 0;
@@ -1463,32 +1463,32 @@ void UCBStorageStream::Flush()
Commit();
}
-BOOL UCBStorageStream::SetSize( ULONG nNewSize )
+sal_Bool UCBStorageStream::SetSize( sal_uLong nNewSize )
{
/*
if ( pImp->m_bCommited )
{
DBG_ERROR("Changing stream size while commit is in progress!" );
- return FALSE;
+ return sal_False;
}
*/
- // pImp->m_bModified = TRUE;
+ // pImp->m_bModified = sal_True;
//return pImp->m_pStream->SetStreamSize( nNewSize );
pImp->SetSize( nNewSize );
return !pImp->GetError();
}
-BOOL UCBStorageStream::Validate( BOOL bWrite ) const
+sal_Bool UCBStorageStream::Validate( sal_Bool bWrite ) const
{
return ( !bWrite || ( pImp->m_nMode & STREAM_WRITE ) );
}
-BOOL UCBStorageStream::ValidateMode( StreamMode m ) const
+sal_Bool UCBStorageStream::ValidateMode( StreamMode m ) const
{
// ???
if( m == ( STREAM_READ | STREAM_TRUNC ) ) // from stg.cxx
- return TRUE;
- USHORT nCurMode = 0xFFFF;
+ return sal_True;
+ sal_uInt16 nCurMode = 0xFFFF;
if( ( m & 3 ) == STREAM_READ )
{
// only SHARE_DENYWRITE or SHARE_DENYALL allowed
@@ -1496,7 +1496,7 @@ BOOL UCBStorageStream::ValidateMode( StreamMode m ) const
&& ( nCurMode & STREAM_SHARE_DENYWRITE ) )
|| ( ( m & STREAM_SHARE_DENYALL )
&& ( nCurMode & STREAM_SHARE_DENYALL ) ) )
- return TRUE;
+ return sal_True;
}
else
{
@@ -1505,10 +1505,10 @@ BOOL UCBStorageStream::ValidateMode( StreamMode m ) const
// the commit may fail
if( ( m & STREAM_SHARE_DENYALL )
&& ( nCurMode & STREAM_SHARE_DENYALL ) )
- return TRUE;
+ return sal_True;
}
- return TRUE;
+ return sal_True;
}
const SvStream* UCBStorageStream::GetSvStream() const
@@ -1530,28 +1530,28 @@ Reference< XInputStream > UCBStorageStream::GetXInputStream() const
return pImp->GetXInputStream();
}
-BOOL UCBStorageStream::Equals( const BaseStorageStream& rStream ) const
+sal_Bool UCBStorageStream::Equals( const BaseStorageStream& rStream ) const
{
// ???
return ((BaseStorageStream*) this ) == &rStream;
}
-BOOL UCBStorageStream::Commit()
+sal_Bool UCBStorageStream::Commit()
{
// mark this stream for sending it on root commit
pImp->FlushData();
- return TRUE;
+ return sal_True;
}
-BOOL UCBStorageStream::Revert()
+sal_Bool UCBStorageStream::Revert()
{
return pImp->Revert();
}
-BOOL UCBStorageStream::CopyTo( BaseStorageStream* pDestStm )
+sal_Bool UCBStorageStream::CopyTo( BaseStorageStream* pDestStm )
{
if( !pImp->Init() )
- return FALSE;
+ return sal_False;
UCBStorageStream* pStg = PTR_CAST( UCBStorageStream, pDestStm );
if ( pStg )
@@ -1559,18 +1559,18 @@ BOOL UCBStorageStream::CopyTo( BaseStorageStream* pDestStm )
pDestStm->SetSize( 0 );
Seek( STREAM_SEEK_TO_END );
- INT32 n = Tell();
+ sal_Int32 n = Tell();
if( n < 0 )
- return FALSE;
+ return sal_False;
if( pDestStm->SetSize( n ) && n )
{
- BYTE* p = new BYTE[ 4096 ];
+ sal_uInt8* p = new sal_uInt8[ 4096 ];
Seek( 0L );
pDestStm->Seek( 0L );
while( n )
{
- UINT32 nn = n;
+ sal_uInt32 nn = n;
if( nn > 4096 )
nn = 4096;
if( Read( p, nn ) != nn )
@@ -1583,13 +1583,13 @@ BOOL UCBStorageStream::CopyTo( BaseStorageStream* pDestStm )
delete[] p;
}
- return TRUE;
+ return sal_True;
}
-BOOL UCBStorageStream::SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue )
+sal_Bool UCBStorageStream::SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue )
{
if ( rName.CompareToAscii("Title") == COMPARE_EQUAL )
- return FALSE;
+ return sal_False;
if ( rName.CompareToAscii("MediaType") == COMPARE_EQUAL )
{
@@ -1603,34 +1603,34 @@ BOOL UCBStorageStream::SetProperty( const String& rName, const ::com::sun::star:
if ( pImp->m_pContent )
{
pImp->m_pContent->setPropertyValue( rName, rValue );
- return TRUE;
+ return sal_True;
}
}
catch ( Exception& )
{
}
- return FALSE;
+ return sal_False;
}
-BOOL UCBStorageStream::GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue )
+sal_Bool UCBStorageStream::GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue )
{
try
{
if ( pImp->m_pContent )
{
rValue = pImp->m_pContent->getPropertyValue( rName );
- return TRUE;
+ return sal_True;
}
}
catch ( Exception& )
{
}
- return FALSE;
+ return sal_False;
}
-UCBStorage::UCBStorage( SvStream& rStrm, BOOL bDirect )
+UCBStorage::UCBStorage( SvStream& rStrm, sal_Bool bDirect )
{
String aURL = GetLinkedFile( rStrm );
if ( aURL.Len() )
@@ -1640,7 +1640,7 @@ UCBStorage::UCBStorage( SvStream& rStrm, BOOL bDirect )
nMode = STREAM_READ | STREAM_WRITE;
::ucbhelper::Content aContent( aURL, Reference < XCommandEnvironment >() );
- pImp = new UCBStorage_Impl( aContent, aURL, nMode, this, bDirect, TRUE );
+ pImp = new UCBStorage_Impl( aContent, aURL, nMode, this, bDirect, sal_True );
}
else
{
@@ -1654,7 +1654,7 @@ UCBStorage::UCBStorage( SvStream& rStrm, BOOL bDirect )
StorageBase::m_nMode = pImp->m_nMode;
}
-UCBStorage::UCBStorage( const ::ucbhelper::Content& rContent, const String& rName, StreamMode nMode, BOOL bDirect, BOOL bIsRoot )
+UCBStorage::UCBStorage( const ::ucbhelper::Content& rContent, const String& rName, StreamMode nMode, sal_Bool bDirect, sal_Bool bIsRoot )
{
// pImp must be initialized in the body, because otherwise the vtable of the stream is not initialized
// to class UCBStorage !
@@ -1664,7 +1664,7 @@ UCBStorage::UCBStorage( const ::ucbhelper::Content& rContent, const String& rNam
StorageBase::m_nMode = pImp->m_nMode;
}
-UCBStorage::UCBStorage( const String& rName, StreamMode nMode, BOOL bDirect, BOOL bIsRoot, BOOL bIsRepair, Reference< XProgressHandler > xProgressHandler )
+UCBStorage::UCBStorage( const String& rName, StreamMode nMode, sal_Bool bDirect, sal_Bool bIsRoot, sal_Bool bIsRepair, Reference< XProgressHandler > xProgressHandler )
{
// pImp must be initialized in the body, because otherwise the vtable of the stream is not initialized
// to class UCBStorage !
@@ -1674,7 +1674,7 @@ UCBStorage::UCBStorage( const String& rName, StreamMode nMode, BOOL bDirect, BOO
StorageBase::m_nMode = pImp->m_nMode;
}
-UCBStorage::UCBStorage( const String& rName, StreamMode nMode, BOOL bDirect, BOOL bIsRoot )
+UCBStorage::UCBStorage( const String& rName, StreamMode nMode, sal_Bool bDirect, sal_Bool bIsRoot )
{
// pImp must be initialized in the body, because otherwise the vtable of the stream is not initialized
// to class UCBStorage !
@@ -1703,7 +1703,7 @@ UCBStorage::~UCBStorage()
pImp->ReleaseRef();
}
-UCBStorage_Impl::UCBStorage_Impl( const ::ucbhelper::Content& rContent, const String& rName, StreamMode nMode, UCBStorage* pStorage, BOOL bDirect, BOOL bIsRoot, BOOL bIsRepair, Reference< XProgressHandler > xProgressHandler )
+UCBStorage_Impl::UCBStorage_Impl( const ::ucbhelper::Content& rContent, const String& rName, StreamMode nMode, UCBStorage* pStorage, sal_Bool bDirect, sal_Bool bIsRoot, sal_Bool bIsRepair, Reference< XProgressHandler > xProgressHandler )
: m_pAntiImpl( pStorage )
, m_pContent( new ::ucbhelper::Content( rContent ) )
, m_pTempFile( NULL )
@@ -1711,13 +1711,13 @@ UCBStorage_Impl::UCBStorage_Impl( const ::ucbhelper::Content& rContent, const St
//, m_pStream( NULL )
, m_nError( 0 )
, m_nMode( nMode )
- , m_bModified( FALSE )
- , m_bCommited( FALSE )
+ , m_bModified( sal_False )
+ , m_bCommited( sal_False )
, m_bDirect( bDirect )
, m_bIsRoot( bIsRoot )
- , m_bDirty( FALSE )
- , m_bIsLinked( TRUE )
- , m_bListCreated( FALSE )
+ , m_bDirty( sal_False )
+ , m_bIsLinked( sal_True )
+ , m_bListCreated( sal_False )
, m_nFormat( 0 )
, m_aClassId( SvGlobalName() )
, m_bRepairPackage( bIsRepair )
@@ -1731,14 +1731,14 @@ UCBStorage_Impl::UCBStorage_Impl( const ::ucbhelper::Content& rContent, const St
// no name given = use temporary name!
DBG_ASSERT( m_bIsRoot, "SubStorage must have a name!" );
m_pTempFile = new ::utl::TempFile;
- m_pTempFile->EnableKillingFile( TRUE );
+ m_pTempFile->EnableKillingFile( sal_True );
m_aName = m_aOriginalName = aName = m_pTempFile->GetURL();
}
m_aURL = rName;
}
-UCBStorage_Impl::UCBStorage_Impl( const String& rName, StreamMode nMode, UCBStorage* pStorage, BOOL bDirect, BOOL bIsRoot, BOOL bIsRepair, Reference< XProgressHandler > xProgressHandler )
+UCBStorage_Impl::UCBStorage_Impl( const String& rName, StreamMode nMode, UCBStorage* pStorage, sal_Bool bDirect, sal_Bool bIsRoot, sal_Bool bIsRepair, Reference< XProgressHandler > xProgressHandler )
: m_pAntiImpl( pStorage )
, m_pContent( NULL )
, m_pTempFile( NULL )
@@ -1746,13 +1746,13 @@ UCBStorage_Impl::UCBStorage_Impl( const String& rName, StreamMode nMode, UCBStor
//, m_pStream( NULL )
, m_nError( 0 )
, m_nMode( nMode )
- , m_bModified( FALSE )
- , m_bCommited( FALSE )
+ , m_bModified( sal_False )
+ , m_bCommited( sal_False )
, m_bDirect( bDirect )
, m_bIsRoot( bIsRoot )
- , m_bDirty( FALSE )
- , m_bIsLinked( FALSE )
- , m_bListCreated( FALSE )
+ , m_bDirty( sal_False )
+ , m_bIsLinked( sal_False )
+ , m_bListCreated( sal_False )
, m_nFormat( 0 )
, m_aClassId( SvGlobalName() )
, m_bRepairPackage( bIsRepair )
@@ -1765,7 +1765,7 @@ UCBStorage_Impl::UCBStorage_Impl( const String& rName, StreamMode nMode, UCBStor
// no name given = use temporary name!
DBG_ASSERT( m_bIsRoot, "SubStorage must have a name!" );
m_pTempFile = new ::utl::TempFile;
- m_pTempFile->EnableKillingFile( TRUE );
+ m_pTempFile->EnableKillingFile( sal_True );
m_aName = m_aOriginalName = aName = m_pTempFile->GetURL();
}
@@ -1788,31 +1788,31 @@ UCBStorage_Impl::UCBStorage_Impl( const String& rName, StreamMode nMode, UCBStor
// substorages are opened like streams: the URL is a "child URL" of the root package URL
m_aURL = rName;
if ( m_aURL.CompareToAscii( "vnd.sun.star.pkg://", 19 ) != 0 )
- m_bIsLinked = TRUE;
+ m_bIsLinked = sal_True;
}
}
-UCBStorage_Impl::UCBStorage_Impl( SvStream& rStream, UCBStorage* pStorage, BOOL bDirect )
+UCBStorage_Impl::UCBStorage_Impl( SvStream& rStream, UCBStorage* pStorage, sal_Bool bDirect )
: m_pAntiImpl( pStorage )
, m_pContent( NULL )
, m_pTempFile( new ::utl::TempFile )
, m_pSource( &rStream )
, m_nError( 0 )
- , m_bModified( FALSE )
- , m_bCommited( FALSE )
+ , m_bModified( sal_False )
+ , m_bCommited( sal_False )
, m_bDirect( bDirect )
- , m_bIsRoot( TRUE )
- , m_bDirty( FALSE )
- , m_bIsLinked( FALSE )
- , m_bListCreated( FALSE )
+ , m_bIsRoot( sal_True )
+ , m_bDirty( sal_False )
+ , m_bIsLinked( sal_False )
+ , m_bListCreated( sal_False )
, m_nFormat( 0 )
, m_aClassId( SvGlobalName() )
- , m_bRepairPackage( FALSE )
+ , m_bRepairPackage( sal_False )
, m_pUNOStorageHolderList( NULL )
{
// opening in direct mode is too fuzzy because the data is transferred to the stream in the Commit() call,
// which will be called in the storages' dtor
- m_pTempFile->EnableKillingFile( TRUE );
+ m_pTempFile->EnableKillingFile( sal_True );
DBG_ASSERT( !bDirect, "Storage on a stream must not be opened in direct mode!" );
// UCBStorages work on a content, so a temporary file for a content must be created, even if the stream is only
@@ -1973,7 +1973,7 @@ void UCBStorage_Impl::ReadContent()
if ( m_bListCreated )
return;
- m_bListCreated = TRUE;
+ m_bListCreated = sal_True;
// create cursor for access to children
Sequence< ::rtl::OUString > aProps(4);
@@ -2011,9 +2011,9 @@ void UCBStorage_Impl::ReadContent()
aContentType = xRow->getString(3);
}
- BOOL bIsFolder( xRow->getBoolean(2) );
+ sal_Bool bIsFolder( xRow->getBoolean(2) );
sal_Int64 nSize = xRow->getLong(4);
- UCBStorageElement_Impl* pElement = new UCBStorageElement_Impl( aTitle, bIsFolder, (ULONG) nSize );
+ UCBStorageElement_Impl* pElement = new UCBStorageElement_Impl( aTitle, bIsFolder, (sal_uLong) nSize );
m_aChildrenList.Insert( pElement, LIST_APPEND );
sal_Bool bIsOfficeDocument = m_bIsLinked || ( m_aClassId != SvGlobalName() );
@@ -2044,13 +2044,13 @@ void UCBStorage_Impl::ReadContent()
::rtl::OUString aMediaType;
Any aAny = aContent.getPropertyValue( ::rtl::OUString::createFromAscii( "MediaType" ) );
if ( ( aAny >>= aMediaType ) && ( aMediaType.compareToAscii("application/vnd.sun.star.oleobject") == 0 ) )
- pElement->m_bIsStorage = TRUE;
+ pElement->m_bIsStorage = sal_True;
else if ( !aMediaType.getLength() )
{
// older files didn't have that special content type, so they must be detected
OpenStream( pElement, STREAM_STD_READ, m_bDirect );
if ( Storage::IsStorageFile( pElement->m_xStream ) )
- pElement->m_bIsStorage = TRUE;
+ pElement->m_bIsStorage = sal_True;
else
pElement->m_xStream->Free();
}
@@ -2118,7 +2118,7 @@ sal_Int32 UCBStorage_Impl::GetObjectCount()
::rtl::OUString Find_Impl( const Sequence < Sequence < PropertyValue > >& rSequence, const ::rtl::OUString& rPath )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
for ( sal_Int32 nSeqs=0; nSeqs<rSequence.getLength(); nSeqs++ )
{
const Sequence < PropertyValue >& rMyProps = rSequence[nSeqs];
@@ -2131,7 +2131,7 @@ sal_Int32 UCBStorage_Impl::GetObjectCount()
{
rtl::OUString aTmp;
if ( ( rAny.Value >>= aTmp ) && aTmp == rPath )
- bFound = TRUE;
+ bFound = sal_True;
if ( aType.getLength() )
break;
}
@@ -2269,11 +2269,11 @@ UCBStorage_Impl::~UCBStorage_Impl()
delete m_pTempFile;
}
-BOOL UCBStorage_Impl::Insert( ::ucbhelper::Content *pContent )
+sal_Bool UCBStorage_Impl::Insert( ::ucbhelper::Content *pContent )
{
// a new substorage is inserted into a UCBStorage ( given by the parameter pContent )
// it must be inserted with a title and a type
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
try
{
@@ -2310,7 +2310,7 @@ BOOL UCBStorage_Impl::Insert( ::ucbhelper::Content *pContent )
// remove old content, create an "empty" new one and initialize it with the new inserted
DELETEZ( m_pContent );
m_pContent = new ::ucbhelper::Content( aNewFolder );
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -2349,11 +2349,11 @@ sal_Int16 UCBStorage_Impl::Commit()
while ( pElement && nRet )
{
::ucbhelper::Content* pContent = pElement->GetContent();
- BOOL bDeleteContent = FALSE;
+ sal_Bool bDeleteContent = sal_False;
if ( !pContent && pElement->IsModified() )
{
// if the element has never been opened, no content has been created until now
- bDeleteContent = TRUE; // remember to delete it later
+ bDeleteContent = sal_True; // remember to delete it later
String aName( m_aURL );
aName += '/';
aName += pElement->m_aOriginalName;
@@ -2401,7 +2401,7 @@ sal_Int16 UCBStorage_Impl::Commit()
// OLE storage should be stored encrytped, if the storage uses encryption
pElement->m_xStream->m_aContentType = String::CreateFromAscii("application/vnd.sun.star.oleobject");
Any aValue;
- aValue <<= (BOOL) TRUE;
+ aValue <<= (sal_Bool) sal_True;
pElement->m_xStream->m_pContent->setPropertyValue(String::CreateFromAscii("Encrypted"), aValue );
}
@@ -2483,7 +2483,7 @@ sal_Int16 UCBStorage_Impl::Commit()
// write a manifest file
// first create a subfolder "META-inf"
Content aNewSubFolder;
- BOOL bRet = ::utl::UCBContentHelper::MakeFolder( *m_pContent, String::CreateFromAscii("META-INF"), aNewSubFolder );
+ sal_Bool bRet = ::utl::UCBContentHelper::MakeFolder( *m_pContent, String::CreateFromAscii("META-INF"), aNewSubFolder );
if ( bRet )
{
// create a stream to write the manifest file - use a temp file
@@ -2584,7 +2584,7 @@ sal_Int16 UCBStorage_Impl::Commit()
// after successfull root commit all elements names and types are adjusted and all removed elements
// are also removed from the lists
UCBStorageElement_Impl* pInnerElement = m_aChildrenList.First();
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
while ( pInnerElement && bRet )
{
UCBStorageElement_Impl* pNext = m_aChildrenList.Next();
@@ -2596,26 +2596,26 @@ sal_Int16 UCBStorage_Impl::Commit()
else
{
pInnerElement->m_aOriginalName = pInnerElement->m_aName;
- pInnerElement->m_bIsInserted = FALSE;
+ pInnerElement->m_bIsInserted = sal_False;
}
pInnerElement = pNext;
}
}
- m_bCommited = FALSE;
+ m_bCommited = sal_False;
}
return nRet;
}
-BOOL UCBStorage_Impl::Revert()
+sal_Bool UCBStorage_Impl::Revert()
{
UCBStorageElement_Impl* pElement = m_aChildrenList.First();
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
while ( pElement && bRet )
{
- pElement->m_bIsRemoved = FALSE;
+ pElement->m_bIsRemoved = sal_False;
if ( pElement->m_bIsInserted )
{
m_aChildrenList.Remove( pElement ); // correct usage of list ???
@@ -2634,7 +2634,7 @@ BOOL UCBStorage_Impl::Revert()
}
pElement->m_aName = pElement->m_aOriginalName;
- pElement->m_bIsRemoved = FALSE;
+ pElement->m_bIsRemoved = sal_False;
}
pElement = m_aChildrenList.Next();
@@ -2648,17 +2648,17 @@ const String& UCBStorage::GetName() const
return pImp->m_aName; // pImp->m_aURL ?!
}
-BOOL UCBStorage::IsRoot() const
+sal_Bool UCBStorage::IsRoot() const
{
return pImp->m_bIsRoot;
}
void UCBStorage::SetDirty()
{
- pImp->m_bDirty = TRUE;
+ pImp->m_bDirty = sal_True;
}
-void UCBStorage::SetClass( const SvGlobalName & rClass, ULONG nOriginalClipFormat, const String & rUserTypeName )
+void UCBStorage::SetClass( const SvGlobalName & rClass, sal_uLong nOriginalClipFormat, const String & rUserTypeName )
{
pImp->m_aClassId = rClass;
pImp->m_nFormat = nOriginalClipFormat;
@@ -2697,15 +2697,15 @@ const ClsId& UCBStorage::GetClassId() const
return ( const ClsId& ) pImp->m_aClassId.GetCLSID();
}
-void UCBStorage::SetConvertClass( const SvGlobalName & /*rConvertClass*/, ULONG /*nOriginalClipFormat*/, const String & /*rUserTypeName*/ )
+void UCBStorage::SetConvertClass( const SvGlobalName & /*rConvertClass*/, sal_uLong /*nOriginalClipFormat*/, const String & /*rUserTypeName*/ )
{
// ???
}
-BOOL UCBStorage::ShouldConvert()
+sal_Bool UCBStorage::ShouldConvert()
{
// ???
- return FALSE;
+ return sal_False;
}
SvGlobalName UCBStorage::GetClassName()
@@ -2713,7 +2713,7 @@ SvGlobalName UCBStorage::GetClassName()
return pImp->m_aClassId;
}
-ULONG UCBStorage::GetFormat()
+sal_uLong UCBStorage::GetFormat()
{
return pImp->m_nFormat;
}
@@ -2733,7 +2733,7 @@ void UCBStorage::FillInfoList( SvStorageInfoList* pList ) const
if ( !pElement->m_bIsRemoved )
{
// problem: what about the size of a substorage ?!
- ULONG nSize = pElement->m_nSize;
+ sal_uLong nSize = pElement->m_nSize;
if ( pElement->m_xStream.Is() )
nSize = pElement->m_xStream->GetSize();
SvStorageInfo aInfo( pElement->m_aName, nSize, pElement->m_bIsStorage );
@@ -2744,7 +2744,7 @@ void UCBStorage::FillInfoList( SvStorageInfoList* pList ) const
}
}
-BOOL UCBStorage::CopyStorageElement_Impl( UCBStorageElement_Impl& rElement, BaseStorage* pDest, const String& rNew ) const
+sal_Bool UCBStorage::CopyStorageElement_Impl( UCBStorageElement_Impl& rElement, BaseStorage* pDest, const String& rNew ) const
{
// insert stream or storage into the list or stream of the destination storage
// not into the content, this will be done on commit !
@@ -2755,7 +2755,7 @@ BOOL UCBStorage::CopyStorageElement_Impl( UCBStorageElement_Impl& rElement, Base
// the destination stream must not be open
BaseStorageStream* pOtherStream = pDest->OpenStream( rNew, STREAM_WRITE | STREAM_SHARE_DENYALL, pImp->m_bDirect );
BaseStorageStream* pStream = NULL;
- BOOL bDeleteStream = FALSE;
+ sal_Bool bDeleteStream = sal_False;
// if stream is already open, it is allowed to copy it, so be aware of this
if ( rElement.m_xStream.Is() )
@@ -2763,7 +2763,7 @@ BOOL UCBStorage::CopyStorageElement_Impl( UCBStorageElement_Impl& rElement, Base
if ( !pStream )
{
pStream = ( const_cast < UCBStorage* > (this) )->OpenStream( rElement.m_aName, STREAM_STD_READ, pImp->m_bDirect );
- bDeleteStream = TRUE;
+ bDeleteStream = sal_True;
}
pStream->CopyTo( pOtherStream );
@@ -2784,19 +2784,19 @@ BOOL UCBStorage::CopyStorageElement_Impl( UCBStorageElement_Impl& rElement, Base
BaseStorage* pStorage = NULL;
// if stream is already open, it is allowed to copy it, so be aware of this
- BOOL bDeleteStorage = FALSE;
+ sal_Bool bDeleteStorage = sal_False;
if ( rElement.m_xStorage.Is() )
pStorage = rElement.m_xStorage->m_pAntiImpl;
if ( !pStorage )
{
pStorage = ( const_cast < UCBStorage* > (this) )->OpenStorage( rElement.m_aName, pImp->m_nMode, pImp->m_bDirect );
- bDeleteStorage = TRUE;
+ bDeleteStorage = sal_True;
}
UCBStorage* pUCBDest = PTR_CAST( UCBStorage, pDest );
UCBStorage* pUCBCopy = PTR_CAST( UCBStorage, pStorage );
- BOOL bOpenUCBStorage = pUCBDest && pUCBCopy;
+ sal_Bool bOpenUCBStorage = pUCBDest && pUCBCopy;
BaseStorage* pOtherStorage = bOpenUCBStorage ?
pDest->OpenUCBStorage( rNew, STREAM_WRITE | STREAM_SHARE_DENYALL, pImp->m_bDirect ) :
pDest->OpenOLEStorage( rNew, STREAM_WRITE | STREAM_SHARE_DENYALL, pImp->m_bDirect );
@@ -2821,7 +2821,7 @@ BOOL UCBStorage::CopyStorageElement_Impl( UCBStorageElement_Impl& rElement, Base
delete pOtherStorage;
}
- return BOOL( Good() && pDest->Good() );
+ return sal_Bool( Good() && pDest->Good() );
}
UCBStorageElement_Impl* UCBStorage::FindElement_Impl( const String& rName ) const
@@ -2838,11 +2838,11 @@ UCBStorageElement_Impl* UCBStorage::FindElement_Impl( const String& rName ) cons
return pElement;
}
-BOOL UCBStorage::CopyTo( BaseStorage* pDestStg ) const
+sal_Bool UCBStorage::CopyTo( BaseStorage* pDestStg ) const
{
DBG_ASSERT( pDestStg != ((BaseStorage*)this), "Self-Copying is not possible!" );
if ( pDestStg == ((BaseStorage*)this) )
- return FALSE;
+ return sal_False;
// perhaps it's also a problem if one storage is a parent of the other ?!
// or if not: could be optimized ?!
@@ -2856,7 +2856,7 @@ BOOL UCBStorage::CopyTo( BaseStorage* pDestStg ) const
pDestStg->SetClassId( GetClassId() );
pDestStg->SetDirty();
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
UCBStorageElement_Impl* pElement = pImp->GetChildrenList().First();
while ( pElement && bRet )
{
@@ -2867,18 +2867,18 @@ BOOL UCBStorage::CopyTo( BaseStorage* pDestStg ) const
if( !bRet )
SetError( pDestStg->GetError() );
- return BOOL( Good() && pDestStg->Good() );
+ return sal_Bool( Good() && pDestStg->Good() );
}
-BOOL UCBStorage::CopyTo( const String& rElemName, BaseStorage* pDest, const String& rNew )
+sal_Bool UCBStorage::CopyTo( const String& rElemName, BaseStorage* pDest, const String& rNew )
{
if( !rElemName.Len() )
- return FALSE;
+ return sal_False;
if ( pDest == ((BaseStorage*) this) )
{
// can't double an element
- return FALSE;
+ return sal_False;
}
else
{
@@ -2889,28 +2889,28 @@ BOOL UCBStorage::CopyTo( const String& rElemName, BaseStorage* pDest, const Stri
else
{
SetError( SVSTREAM_FILE_NOT_FOUND );
- return FALSE;
+ return sal_False;
}
}
}
-BOOL UCBStorage::Commit()
+sal_Bool UCBStorage::Commit()
{
// mark this storage for sending it on root commit
- pImp->m_bCommited = TRUE;
+ pImp->m_bCommited = sal_True;
if ( pImp->m_bIsRoot )
// the root storage coordinates commiting by sending a Commit command to its content
return ( pImp->Commit() != COMMIT_RESULT_FAILURE );
else
- return TRUE;
+ return sal_True;
}
-BOOL UCBStorage::Revert()
+sal_Bool UCBStorage::Revert()
{
return pImp->Revert();
}
-BaseStorageStream* UCBStorage::OpenStream( const String& rEleName, StreamMode nMode, BOOL bDirect, const ByteString* pKey )
+BaseStorageStream* UCBStorage::OpenStream( const String& rEleName, StreamMode nMode, sal_Bool bDirect, const ByteString* pKey )
{
if( !rEleName.Len() )
return NULL;
@@ -2935,7 +2935,7 @@ BaseStorageStream* UCBStorage::OpenStream( const String& rEleName, StreamMode nM
{
// create a new UCBStorageElement and insert it into the list
pElement = new UCBStorageElement_Impl( rEleName );
- pElement->m_bIsInserted = TRUE;
+ pElement->m_bIsInserted = sal_True;
pImp->m_aChildrenList.Insert( pElement, LIST_APPEND );
}
}
@@ -2980,7 +2980,7 @@ BaseStorageStream* UCBStorage::OpenStream( const String& rEleName, StreamMode nM
return NULL;
}
-UCBStorageStream_Impl* UCBStorage_Impl::OpenStream( UCBStorageElement_Impl* pElement, StreamMode nMode, BOOL bDirect, const ByteString* pKey )
+UCBStorageStream_Impl* UCBStorage_Impl::OpenStream( UCBStorageElement_Impl* pElement, StreamMode nMode, sal_Bool bDirect, const ByteString* pKey )
{
String aName( m_aURL );
aName += '/';
@@ -2989,31 +2989,31 @@ UCBStorageStream_Impl* UCBStorage_Impl::OpenStream( UCBStorageElement_Impl* pEle
return pElement->m_xStream;
}
-BaseStorage* UCBStorage::OpenUCBStorage( const String& rEleName, StreamMode nMode, BOOL bDirect )
+BaseStorage* UCBStorage::OpenUCBStorage( const String& rEleName, StreamMode nMode, sal_Bool bDirect )
{
if( !rEleName.Len() )
return NULL;
- return OpenStorage_Impl( rEleName, nMode, bDirect, TRUE );
+ return OpenStorage_Impl( rEleName, nMode, bDirect, sal_True );
}
-BaseStorage* UCBStorage::OpenOLEStorage( const String& rEleName, StreamMode nMode, BOOL bDirect )
+BaseStorage* UCBStorage::OpenOLEStorage( const String& rEleName, StreamMode nMode, sal_Bool bDirect )
{
if( !rEleName.Len() )
return NULL;
- return OpenStorage_Impl( rEleName, nMode, bDirect, FALSE );
+ return OpenStorage_Impl( rEleName, nMode, bDirect, sal_False );
}
-BaseStorage* UCBStorage::OpenStorage( const String& rEleName, StreamMode nMode, BOOL bDirect )
+BaseStorage* UCBStorage::OpenStorage( const String& rEleName, StreamMode nMode, sal_Bool bDirect )
{
if( !rEleName.Len() )
return NULL;
- return OpenStorage_Impl( rEleName, nMode, bDirect, TRUE );
+ return OpenStorage_Impl( rEleName, nMode, bDirect, sal_True );
}
-BaseStorage* UCBStorage::OpenStorage_Impl( const String& rEleName, StreamMode nMode, BOOL bDirect, BOOL bForceUCBStorage )
+BaseStorage* UCBStorage::OpenStorage_Impl( const String& rEleName, StreamMode nMode, sal_Bool bDirect, sal_Bool bForceUCBStorage )
{
// try to find the storage element
UCBStorageElement_Impl *pElement = FindElement_Impl( rEleName );
@@ -3026,8 +3026,8 @@ BaseStorage* UCBStorage::OpenStorage_Impl( const String& rEleName, StreamMode nM
String aName( pImp->m_aURL );
aName += '/';
aName += rEleName; // ???
- UCBStorage *pStorage = new UCBStorage( aName, nMode, bDirect, FALSE, pImp->m_bRepairPackage, pImp->m_xProgressHandler );
- pStorage->pImp->m_bIsRoot = FALSE;
+ UCBStorage *pStorage = new UCBStorage( aName, nMode, bDirect, sal_False, pImp->m_bRepairPackage, pImp->m_xProgressHandler );
+ pStorage->pImp->m_bIsRoot = sal_False;
pStorage->pImp->m_bListCreated = sal_True; // the storage is pretty new, nothing to read
pStorage->SetError( GetError() );
return pStorage;
@@ -3037,7 +3037,7 @@ BaseStorage* UCBStorage::OpenStorage_Impl( const String& rEleName, StreamMode nM
// problem: perhaps an OLEStorage should be created ?!
// Because nothing is known about the element that should be created, an external parameter is needed !
pElement = new UCBStorageElement_Impl( rEleName );
- pElement->m_bIsInserted = TRUE;
+ pElement->m_bIsInserted = sal_True;
pImp->m_aChildrenList.Insert( pElement, LIST_APPEND );
}
@@ -3064,7 +3064,7 @@ BaseStorage* UCBStorage::OpenStorage_Impl( const String& rEleName, StreamMode nM
pElement->m_xStream->PrepareCachedForReopen( nMode );
pElement->m_xStream->Init();
- pElement->m_bIsStorage = TRUE;
+ pElement->m_bIsStorage = sal_True;
return pElement->m_xStream->CreateStorage(); // can only be created in transacted mode
}
else if ( pElement->m_xStorage.Is() )
@@ -3077,13 +3077,13 @@ BaseStorage* UCBStorage::OpenStorage_Impl( const String& rEleName, StreamMode nM
}
else
{
- BOOL bIsWritable = (( pElement->m_xStorage->m_nMode & STREAM_WRITE ) != 0);
+ sal_Bool bIsWritable = (( pElement->m_xStorage->m_nMode & STREAM_WRITE ) != 0);
if ( !bIsWritable && (( nMode & STREAM_WRITE ) != 0 ))
{
String aName( pImp->m_aURL );
aName += '/';
aName += pElement->m_aOriginalName;
- UCBStorage* pStorage = new UCBStorage( aName, nMode, bDirect, FALSE, pImp->m_bRepairPackage, pImp->m_xProgressHandler );
+ UCBStorage* pStorage = new UCBStorage( aName, nMode, bDirect, sal_False, pImp->m_bRepairPackage, pImp->m_xProgressHandler );
pElement->m_xStorage = pStorage->pImp;
return pStorage;
}
@@ -3097,7 +3097,7 @@ BaseStorage* UCBStorage::OpenStorage_Impl( const String& rEleName, StreamMode nM
else if ( !pElement->m_xStream.Is() )
{
// storage is opened the first time
- BOOL bIsWritable = (( pImp->m_nMode & STREAM_WRITE ) != 0 );
+ sal_Bool bIsWritable = (( pImp->m_nMode & STREAM_WRITE ) != 0 );
if ( pImp->m_bIsLinked && pImp->m_bIsRoot && bIsWritable )
{
// make sure that the root storage object has been created before substorages will be created
@@ -3107,7 +3107,7 @@ BaseStorage* UCBStorage::OpenStorage_Impl( const String& rEleName, StreamMode nM
Content aFolder( aFolderObj.GetMainURL( INetURLObject::NO_DECODE ), Reference < XCommandEnvironment >() );
pImp->m_pContent = new Content;
- BOOL bRet = ::utl::UCBContentHelper::MakeFolder( aFolder, pImp->m_aName, *pImp->m_pContent );
+ sal_Bool bRet = ::utl::UCBContentHelper::MakeFolder( aFolder, pImp->m_aName, *pImp->m_pContent );
if ( !bRet )
{
SetError( SVSTREAM_CANNOT_MAKE );
@@ -3128,31 +3128,31 @@ BaseStorage* UCBStorage::OpenStorage_Impl( const String& rEleName, StreamMode nM
return NULL;
}
-UCBStorage_Impl* UCBStorage_Impl::OpenStorage( UCBStorageElement_Impl* pElement, StreamMode nMode, BOOL bDirect )
+UCBStorage_Impl* UCBStorage_Impl::OpenStorage( UCBStorageElement_Impl* pElement, StreamMode nMode, sal_Bool bDirect )
{
UCBStorage_Impl* pRet = NULL;
String aName( m_aURL );
aName += '/';
aName += pElement->m_aOriginalName; // ???
- pElement->m_bIsStorage = pElement->m_bIsFolder = TRUE;
+ pElement->m_bIsStorage = pElement->m_bIsFolder = sal_True;
if ( m_bIsLinked && !::utl::UCBContentHelper::Exists( aName ) )
{
Content aNewFolder;
- BOOL bRet = ::utl::UCBContentHelper::MakeFolder( *m_pContent, pElement->m_aOriginalName, aNewFolder );
+ sal_Bool bRet = ::utl::UCBContentHelper::MakeFolder( *m_pContent, pElement->m_aOriginalName, aNewFolder );
if ( bRet )
- pRet = new UCBStorage_Impl( aNewFolder, aName, nMode, NULL, bDirect, FALSE, m_bRepairPackage, m_xProgressHandler );
+ pRet = new UCBStorage_Impl( aNewFolder, aName, nMode, NULL, bDirect, sal_False, m_bRepairPackage, m_xProgressHandler );
}
else
{
- pRet = new UCBStorage_Impl( aName, nMode, NULL, bDirect, FALSE, m_bRepairPackage, m_xProgressHandler );
+ pRet = new UCBStorage_Impl( aName, nMode, NULL, bDirect, sal_False, m_bRepairPackage, m_xProgressHandler );
}
if ( pRet )
{
pRet->m_bIsLinked = m_bIsLinked;
- pRet->m_bIsRoot = FALSE;
+ pRet->m_bIsRoot = sal_False;
// if name has been changed before creating the stream: set name!
pRet->m_aName = pElement->m_aOriginalName;
@@ -3165,41 +3165,41 @@ UCBStorage_Impl* UCBStorage_Impl::OpenStorage( UCBStorageElement_Impl* pElement,
return pRet;
}
-BOOL UCBStorage::IsStorage( const String& rEleName ) const
+sal_Bool UCBStorage::IsStorage( const String& rEleName ) const
{
if( !rEleName.Len() )
- return FALSE;
+ return sal_False;
const UCBStorageElement_Impl *pElement = FindElement_Impl( rEleName );
return ( pElement && pElement->m_bIsStorage );
}
-BOOL UCBStorage::IsStream( const String& rEleName ) const
+sal_Bool UCBStorage::IsStream( const String& rEleName ) const
{
if( !rEleName.Len() )
- return FALSE;
+ return sal_False;
const UCBStorageElement_Impl *pElement = FindElement_Impl( rEleName );
return ( pElement && !pElement->m_bIsStorage );
}
-BOOL UCBStorage::IsContained( const String & rEleName ) const
+sal_Bool UCBStorage::IsContained( const String & rEleName ) const
{
if( !rEleName.Len() )
- return FALSE;
+ return sal_False;
const UCBStorageElement_Impl *pElement = FindElement_Impl( rEleName );
return ( pElement != NULL );
}
-BOOL UCBStorage::Remove( const String& rEleName )
+sal_Bool UCBStorage::Remove( const String& rEleName )
{
if( !rEleName.Len() )
- return FALSE;
+ return sal_False;
UCBStorageElement_Impl *pElement = FindElement_Impl( rEleName );
if ( pElement )
{
- pElement->m_bIsRemoved = TRUE;
+ pElement->m_bIsRemoved = sal_True;
}
else
SetError( SVSTREAM_FILE_NOT_FOUND );
@@ -3207,16 +3207,16 @@ BOOL UCBStorage::Remove( const String& rEleName )
return ( pElement != NULL );
}
-BOOL UCBStorage::Rename( const String& rEleName, const String& rNewName )
+sal_Bool UCBStorage::Rename( const String& rEleName, const String& rNewName )
{
if( !rEleName.Len()|| !rNewName.Len() )
- return FALSE;
+ return sal_False;
UCBStorageElement_Impl *pAlreadyExisting = FindElement_Impl( rNewName );
if ( pAlreadyExisting )
{
SetError( SVSTREAM_ACCESS_DENIED );
- return FALSE; // can't change to a name that is already used
+ return sal_False; // can't change to a name that is already used
}
UCBStorageElement_Impl *pElement = FindElement_Impl( rEleName );
@@ -3230,10 +3230,10 @@ BOOL UCBStorage::Rename( const String& rEleName, const String& rNewName )
return pElement != NULL;
}
-BOOL UCBStorage::MoveTo( const String& rEleName, BaseStorage* pNewSt, const String& rNewName )
+sal_Bool UCBStorage::MoveTo( const String& rEleName, BaseStorage* pNewSt, const String& rNewName )
{
if( !rEleName.Len() || !rNewName.Len() )
- return FALSE;
+ return sal_False;
if ( pNewSt == ((BaseStorage*) this) && !FindElement_Impl( rNewName ) )
{
@@ -3257,31 +3257,31 @@ BOOL UCBStorage::MoveTo( const String& rEleName, BaseStorage* pNewSt, const Stri
}
*/
// MoveTo is done by first copying to the new destination and then removing the old element
- BOOL bRet = CopyTo( rEleName, pNewSt, rNewName );
+ sal_Bool bRet = CopyTo( rEleName, pNewSt, rNewName );
if ( bRet )
bRet = Remove( rEleName );
return bRet;
}
}
-BOOL UCBStorage::ValidateFAT()
+sal_Bool UCBStorage::ValidateFAT()
{
// ???
- return TRUE;
+ return sal_True;
}
-BOOL UCBStorage::Validate( BOOL bWrite ) const
+sal_Bool UCBStorage::Validate( sal_Bool bWrite ) const
{
// ???
return ( !bWrite || ( pImp->m_nMode & STREAM_WRITE ) );
}
-BOOL UCBStorage::ValidateMode( StreamMode m ) const
+sal_Bool UCBStorage::ValidateMode( StreamMode m ) const
{
// ???
if( m == ( STREAM_READ | STREAM_TRUNC ) ) // from stg.cxx
- return TRUE;
- USHORT nCurMode = 0xFFFF;
+ return sal_True;
+ sal_uInt16 nCurMode = 0xFFFF;
if( ( m & 3 ) == STREAM_READ )
{
// only SHARE_DENYWRITE or SHARE_DENYALL allowed
@@ -3289,7 +3289,7 @@ BOOL UCBStorage::ValidateMode( StreamMode m ) const
&& ( nCurMode & STREAM_SHARE_DENYWRITE ) )
|| ( ( m & STREAM_SHARE_DENYALL )
&& ( nCurMode & STREAM_SHARE_DENYALL ) ) )
- return TRUE;
+ return sal_True;
}
else
{
@@ -3298,10 +3298,10 @@ BOOL UCBStorage::ValidateMode( StreamMode m ) const
// the commit may fail
if( ( m & STREAM_SHARE_DENYALL )
&& ( nCurMode & STREAM_SHARE_DENYALL ) )
- return TRUE;
+ return sal_True;
}
- return TRUE;
+ return sal_True;
}
const SvStream* UCBStorage::GetSvStream() const
@@ -3311,13 +3311,13 @@ const SvStream* UCBStorage::GetSvStream() const
return pImp->m_pSource;
}
-BOOL UCBStorage::Equals( const BaseStorage& rStorage ) const
+sal_Bool UCBStorage::Equals( const BaseStorage& rStorage ) const
{
// ???
return ((BaseStorage*)this) == &rStorage;
}
-BOOL UCBStorage::IsStorageFile( const String& rFileName )
+sal_Bool UCBStorage::IsStorageFile( const String& rFileName )
{
String aFileURL = rFileName;
INetURLObject aObj( aFileURL );
@@ -3329,27 +3329,27 @@ BOOL UCBStorage::IsStorageFile( const String& rFileName )
}
SvStream * pStm = ::utl::UcbStreamHelper::CreateStream( aFileURL, STREAM_STD_READ );
- BOOL bRet = UCBStorage::IsStorageFile( pStm );
+ sal_Bool bRet = UCBStorage::IsStorageFile( pStm );
delete pStm;
return bRet;
}
-BOOL UCBStorage::IsStorageFile( SvStream* pFile )
+sal_Bool UCBStorage::IsStorageFile( SvStream* pFile )
{
if ( !pFile )
- return FALSE;
+ return sal_False;
- ULONG nPos = pFile->Tell();
+ sal_uLong nPos = pFile->Tell();
pFile->Seek( STREAM_SEEK_TO_END );
if ( pFile->Tell() < 4 )
- return FALSE;
+ return sal_False;
pFile->Seek(0);
- UINT32 nBytes;
+ sal_uInt32 nBytes;
*pFile >> nBytes;
// search for the magic bytes
- BOOL bRet = ( nBytes == 0x04034b50 );
+ sal_Bool bRet = ( nBytes == 0x04034b50 );
if ( !bRet )
{
// disk spanned file have an additional header in front of the usual one
@@ -3365,22 +3365,22 @@ BOOL UCBStorage::IsStorageFile( SvStream* pFile )
return bRet;
}
-BOOL UCBStorage::IsDiskSpannedFile( SvStream* pFile )
+sal_Bool UCBStorage::IsDiskSpannedFile( SvStream* pFile )
{
if ( !pFile )
- return FALSE;
+ return sal_False;
- ULONG nPos = pFile->Tell();
+ sal_uLong nPos = pFile->Tell();
pFile->Seek( STREAM_SEEK_TO_END );
if ( !pFile->Tell() )
- return FALSE;
+ return sal_False;
pFile->Seek(0);
- UINT32 nBytes;
+ sal_uInt32 nBytes;
*pFile >> nBytes;
// disk spanned file have an additional header in front of the usual one
- BOOL bRet = ( nBytes == 0x08074b50 );
+ sal_Bool bRet = ( nBytes == 0x08074b50 );
if ( bRet )
{
*pFile >> nBytes;
@@ -3394,13 +3394,13 @@ BOOL UCBStorage::IsDiskSpannedFile( SvStream* pFile )
String UCBStorage::GetLinkedFile( SvStream &rStream )
{
String aString;
- ULONG nPos = rStream.Tell();
+ sal_uLong nPos = rStream.Tell();
rStream.Seek( STREAM_SEEK_TO_END );
if ( !rStream.Tell() )
return aString;
rStream.Seek(0);
- UINT32 nBytes;
+ sal_uInt32 nBytes;
rStream >> nBytes;
if( nBytes == 0x04034b50 )
{
@@ -3430,7 +3430,7 @@ String UCBStorage::CreateLinkFile( const String& rName )
SvStream* pStream = pTempFile->GetStream( STREAM_STD_READWRITE | STREAM_TRUNC );
// write header
- *pStream << ( UINT32 ) 0x04034b50;
+ *pStream << ( sal_uInt32 ) 0x04034b50;
// assemble a new folder name in the destination folder
INetURLObject aObj( rName );
@@ -3441,7 +3441,7 @@ String UCBStorage::CreateLinkFile( const String& rName )
// create a folder and store its URL
Content aFolder( aFolderURL, Reference < XCommandEnvironment >() );
Content aNewFolder;
- BOOL bRet = ::utl::UCBContentHelper::MakeFolder( aFolder, aTitle, aNewFolder );
+ sal_Bool bRet = ::utl::UCBContentHelper::MakeFolder( aFolder, aTitle, aNewFolder );
if ( !bRet )
{
aFolderObj.insertName( aTitle );
@@ -3487,15 +3487,15 @@ String UCBStorage::CreateLinkFile( const String& rName )
return aURL;
}
- pTempFile->EnableKillingFile( TRUE );
+ pTempFile->EnableKillingFile( sal_True );
delete pTempFile;
return String();
}
-BOOL UCBStorage::SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue )
+sal_Bool UCBStorage::SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue )
{
if ( rName.CompareToAscii("Title") == COMPARE_EQUAL )
- return FALSE;
+ return sal_False;
if ( rName.CompareToAscii("MediaType") == COMPARE_EQUAL )
{
@@ -3509,38 +3509,38 @@ BOOL UCBStorage::SetProperty( const String& rName, const ::com::sun::star::uno::
if ( pImp->GetContent() )
{
pImp->m_pContent->setPropertyValue( rName, rValue );
- return TRUE;
+ return sal_True;
}
}
catch ( Exception& )
{
}
- return FALSE;
+ return sal_False;
}
-BOOL UCBStorage::GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue )
+sal_Bool UCBStorage::GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue )
{
try
{
if ( pImp->GetContent() )
{
rValue = pImp->m_pContent->getPropertyValue( rName );
- return TRUE;
+ return sal_True;
}
}
catch ( Exception& )
{
}
- return FALSE;
+ return sal_False;
}
-BOOL UCBStorage::GetProperty( const String& rEleName, const String& rName, ::com::sun::star::uno::Any& rValue )
+sal_Bool UCBStorage::GetProperty( const String& rEleName, const String& rName, ::com::sun::star::uno::Any& rValue )
{
UCBStorageElement_Impl *pEle = FindElement_Impl( rEleName );
if ( !pEle )
- return FALSE;
+ return sal_False;
if ( !pEle->m_bIsFolder )
{
@@ -3549,7 +3549,7 @@ BOOL UCBStorage::GetProperty( const String& rEleName, const String& rName, ::com
if ( pEle->m_xStream->m_nError )
{
pEle->m_xStream.Clear();
- return FALSE;
+ return sal_False;
}
try
@@ -3557,7 +3557,7 @@ BOOL UCBStorage::GetProperty( const String& rEleName, const String& rName, ::com
if ( pEle->m_xStream->m_pContent )
{
rValue = pEle->m_xStream->m_pContent->getPropertyValue( rName );
- return TRUE;
+ return sal_True;
}
}
catch ( Exception& )
@@ -3571,7 +3571,7 @@ BOOL UCBStorage::GetProperty( const String& rEleName, const String& rName, ::com
if ( pEle->m_xStorage->m_nError )
{
pEle->m_xStorage.Clear();
- return FALSE;
+ return sal_False;
}
try
@@ -3579,7 +3579,7 @@ BOOL UCBStorage::GetProperty( const String& rEleName, const String& rName, ::com
if ( pEle->m_xStorage->GetContent() )
{
rValue = pEle->m_xStorage->m_pContent->getPropertyValue( rName );
- return TRUE;
+ return sal_True;
}
}
catch ( Exception& )
@@ -3587,7 +3587,7 @@ BOOL UCBStorage::GetProperty( const String& rEleName, const String& rName, ::com
}
}
- return FALSE;
+ return sal_False;
}
UNOStorageHolderList* UCBStorage::GetUNOStorageHolderList()
diff --git a/sot/source/sdstor/unostorageholder.cxx b/sot/source/sdstor/unostorageholder.cxx
index 6224925c1820..00a905125ff6 100644
--- a/sot/source/sdstor/unostorageholder.cxx
+++ b/sot/source/sdstor/unostorageholder.cxx
@@ -133,7 +133,7 @@ void SAL_CALL UNOStorageHolder::commited( const lang::EventObject& /*aEvent*/ )
xComp->dispose();
- SotStorageRef rTempStorage = new SotStorage( TRUE, aTmpStorFile.GetURL(), STREAM_WRITE, STORAGE_TRANSACTED );
+ SotStorageRef rTempStorage = new SotStorage( sal_True, aTmpStorFile.GetURL(), STREAM_WRITE, STORAGE_TRANSACTED );
if ( !rTempStorage.Is() || rTempStorage->GetError() != ERRCODE_NONE )
throw uno::RuntimeException();
diff --git a/sot/source/unoolestorage/makefile.mk b/sot/source/unoolestorage/makefile.mk
deleted file mode 100644
index d88f72f14e51..000000000000
--- a/sot/source/unoolestorage/makefile.mk
+++ /dev/null
@@ -1,51 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=sot
-TARGET=unoolestorage
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(SLO)$/xolesimplestorage.obj \
- $(SLO)$/register.obj
-
-EXCEPTIONSFILES= \
- $(SLO)$/xolesimplestorage.obj \
- $(SLO)$/register.obj
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sot/util/makefile.mk b/sot/util/makefile.mk
deleted file mode 100644
index 453dbddc5857..000000000000
--- a/sot/util/makefile.mk
+++ /dev/null
@@ -1,89 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..
-
-PRJNAME=sot
-TARGET=sot
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-LIB1TARGET= $(SLB)$/$(TARGET).lib
-.IF "$(GUI)$(COM)"=="WNTGCC"
-LIB1ARCHIV= $(LB)$/lib$(TARGET)$(DLLPOSTFIX)_static.a
-.ELSE
-LIB1ARCHIV= $(LB)$/lib$(TARGET)$(DLLPOSTFIX).a
-.ENDIF
-LIB1FILES= $(SLB)$/base.lib \
- $(SLB)$/sdstor.lib \
- $(SLB)$/unoolestorage.lib
-
-SHL1TARGET= $(TARGET)$(DLLPOSTFIX)
-SHL1IMPLIB= $(TARGET)
-SHL1USE_EXPORTS=name
-SHL1LIBS= $(SLB)$/$(TARGET).lib
-
-SHL1STDLIBS=$(TOOLSLIB) $(SALLIB) $(UNOTOOLSLIB) $(CPPUHELPERLIB) $(COMPHELPERLIB) $(UCBHELPERLIB) $(CPPULIB)
-
-SHL1DEF= $(MISC)$/$(SHL1TARGET).def
-
-DEF1NAME =$(SHL1TARGET)
-DEF1DEPN =$(MISC)$/$(SHL1TARGET).flt \
- $(PRJ)$/inc$/sot/absdev.hxx \
- $(PRJ)$/inc$/sot/agg.hxx \
- $(PRJ)$/inc$/sot$/exchange.hxx \
- $(PRJ)$/inc$/sot$/factory.hxx \
- $(PRJ)$/inc$/sot$/object.hxx \
- $(PRJ)$/inc$/sot$/sotdata.hxx \
- $(PRJ)$/inc$/sot$/sotref.hxx \
- $(PRJ)$/inc$/sot/stg.hxx \
- $(PRJ)$/inc$/sot$/storage.hxx \
- $(PRJ)$/inc$/sot/storinfo.hxx
-DEFLIB1NAME =$(TARGET)
-DEF1DES =StarObjectsTools
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
-$(MISC)$/$(SHL1TARGET).flt: makefile.mk
- @echo ------------------------------
- @echo Making: $@
- $(TYPE) sot.flt > $@
-
-
-ALLTAR : $(MISC)/sot.component
-
-$(MISC)/sot.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
- sot.component
- $(XSLTPROC) --nonet --stringparam uri \
- '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
- $(SOLARENV)/bin/createcomponent.xslt sot.component
diff --git a/svl/AllLangResTarget_svl.mk b/svl/AllLangResTarget_svl.mk
index 6759202a5fa4..1ecd4dcff389 100644
--- a/svl/AllLangResTarget_svl.mk
+++ b/svl/AllLangResTarget_svl.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2009 by Sun Microsystems, Inc.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -14,12 +14,12 @@
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
+# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
diff --git a/svl/JunitTest_svl_complex.mk b/svl/JunitTest_svl_complex.mk
new file mode 100755
index 000000000000..f141dadc342b
--- /dev/null
+++ b/svl/JunitTest_svl_complex.mk
@@ -0,0 +1,59 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_JunitTest_JunitTest,svl_complex))
+
+$(eval $(call gb_JunitTest_set_defs,svl_complex,\
+ $$(DEFS) \
+ -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/svl/qa/complex/broken_document/test_documents \
+))
+
+$(eval $(call gb_JunitTest_add_jars,svl_complex,\
+ $(OUTDIR)/bin/OOoRunner.jar \
+ $(OUTDIR)/bin/ridl.jar \
+ $(OUTDIR)/bin/test.jar \
+ $(OUTDIR)/bin/unoil.jar \
+ $(OUTDIR)/bin/jurt.jar \
+ $(OUTDIR)/bin/ConnectivityTools.jar \
+))
+
+$(eval $(call gb_JunitTest_add_sourcefiles,svl_complex,\
+ svl/qa/complex/ConfigItems/CheckConfigItems \
+ svl/qa/complex/passwordcontainer/PasswordContainerUnitTest \
+ svl/qa/complex/passwordcontainer/TestHelper \
+ svl/qa/complex/passwordcontainer/Test03 \
+ svl/qa/complex/passwordcontainer/Test02 \
+ svl/qa/complex/passwordcontainer/Test01 \
+ svl/qa/complex/passwordcontainer/PasswordContainerTest \
+ svl/qa/complex/passwordcontainer/MasterPasswdHandler \
+))
+
+$(eval $(call gb_JunitTest_add_classes,svl_complex,\
+ complex.passwordcontainer.PasswordContainerUnitTest \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/svl/Library_fsstorage.mk b/svl/Library_fsstorage.mk
index 93ca50a2d9f4..f3b8f41e3c69 100644
--- a/svl/Library_fsstorage.mk
+++ b/svl/Library_fsstorage.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2009 by Sun Microsystems, Inc.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -14,12 +14,12 @@
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
+# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
@@ -50,13 +50,7 @@ $(eval $(call gb_Library_add_linked_libs,fsstorage,\
tl \
ucbhelper \
utl \
-))
-
-$(eval $(call gb_Library_add_linked_system_libs,fsstorage,\
- dl \
- icuuc \
- m \
- pthread \
+ $(gb_STDLIBS) \
))
$(eval $(call gb_Library_add_exception_objects,fsstorage,\
@@ -66,28 +60,4 @@ $(eval $(call gb_Library_add_exception_objects,fsstorage,\
svl/source/fsstor/ostreamcontainer \
))
-ifeq ($(OS),WNT)
-ifneq ($(USE_MINGW),)
-$(eval $(call gb_Library_add_linked_libs,fsstorage,\
- mingwthrd \
- $(gb_MINGW_LIBSTDCPP) \
- mingw32 \
- $(gb_MINGW_LIBGCC) \
- uwinapi \
- moldname \
- mingwex \
- kernel32 \
- msvcrt \
- user32 \
-))
-else
-$(eval $(call gb_Library_add_linked_libs,fsstorage,\
- kernel32 \
- msvcrt \
- oldnames \
- user32 \
- uwinapi \
-))
-endif
-endif
# vim: set noet sw=4 ts=4:
diff --git a/svl/Library_passwordcontainer.mk b/svl/Library_passwordcontainer.mk
index a0fbe88be93d..08acae0930ec 100644
--- a/svl/Library_passwordcontainer.mk
+++ b/svl/Library_passwordcontainer.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2009 by Sun Microsystems, Inc.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -14,12 +14,12 @@
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
+# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
@@ -48,13 +48,7 @@ $(eval $(call gb_Library_add_linked_libs,passwordcontainer,\
stl \
ucbhelper \
utl \
-))
-
-$(eval $(call gb_Library_add_linked_system_libs,passwordcontainer,\
- icuuc \
- dl \
- m \
- pthread \
+ $(gb_STDLIBS) \
))
$(eval $(call gb_Library_add_exception_objects,passwordcontainer,\
@@ -62,28 +56,4 @@ $(eval $(call gb_Library_add_exception_objects,passwordcontainer,\
svl/source/passwordcontainer/syscreds \
))
-ifeq ($(OS),WNT)
-ifneq ($(USE_MINGW),)
-$(eval $(call gb_Library_add_linked_libs,passwordcontainer,\
- mingwthrd \
- $(gb_MINGW_LIBSTDCPP) \
- mingw32 \
- $(gb_MINGW_LIBGCC) \
- uwinapi \
- moldname \
- mingwex \
- kernel32 \
- msvcrt \
- user32 \
-))
-else
-$(eval $(call gb_Library_add_linked_libs,passwordcontainer,\
- kernel32 \
- msvcrt \
- oldnames \
- user32 \
- uwinapi \
-))
-endif
-endif
# vim: set noet sw=4 ts=4:
diff --git a/svl/Library_svl.mk b/svl/Library_svl.mk
index 5181983b8bc1..0ad3ecc4aa87 100644
--- a/svl/Library_svl.mk
+++ b/svl/Library_svl.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2009 by Sun Microsystems, Inc.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -14,12 +14,12 @@
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
+# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
@@ -35,13 +35,9 @@ $(eval $(call gb_Library_set_componentfile,svl,svl/util/svl))
$(eval $(call gb_Library_set_include,svl,\
$$(SOLARINC) \
- -I$(WORKDIR)/inc/svl \
- -I$(WORKDIR)/inc/ \
- -I$(SRCDIR)/svl/inc \
-I$(SRCDIR)/svl/source/inc \
-I$(SRCDIR)/svl/inc/pch \
-I$(OUTDIR)/inc/offuh \
- -I$(OUTDIR)/inc \
))
$(eval $(call gb_Library_set_defs,svl,\
@@ -64,16 +60,9 @@ $(eval $(call gb_Library_add_linked_libs,svl,\
ucbhelper \
utl \
vos3 \
+ $(gb_STDLIBS) \
))
-$(eval $(call gb_Library_add_linked_system_libs,svl,\
- dl \
- icuuc \
- m \
- pthread \
-))
-
-
$(eval $(call gb_Library_add_exception_objects,svl,\
svl/inc/pch/precompiled_svl \
svl/source/config/asiancfg \
@@ -169,32 +158,10 @@ $(eval $(call gb_Library_add_exception_objects,svl,\
svl/source/svdde/ddewrap \
))
-ifneq ($(USE_MINGW),)
$(eval $(call gb_Library_add_linked_libs,svl,\
- mingwthrd \
- $(gb_MINGW_LIBSTDCPP) \
- mingw32 \
- $(gb_MINGW_LIBGCC) \
- uwinapi \
- mingwex \
- advapi32 \
- kernel32 \
- gdi32 \
- msvcrt \
- shell32 \
user32 \
))
-else
-$(eval $(call gb_Library_add_linked_libs,svl,\
- advapi32 \
- kernel32 \
- gdi32 \
- msvcrt \
- shell32 \
- user32 \
- uwinapi \
-))
-endif
+
else
$(eval $(call gb_Library_add_exception_objects,svl,\
svl/unx/source/svdde/ddedummy \
diff --git a/svl/Module_svl.mk b/svl/Module_svl.mk
index 6bba7a0836f7..108d487c8e0d 100644
--- a/svl/Module_svl.mk
+++ b/svl/Module_svl.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2009 by Sun Microsystems, Inc.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -14,12 +14,12 @@
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
+# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
@@ -35,6 +35,10 @@ $(eval $(call gb_Module_add_targets,svl,\
Package_inc \
))
+$(eval $(call gb_Module_add_subsequentcheck_targets,svl,\
+ JunitTest_svl_complex \
+))
+
#todo: dde platform dependent
#todo: package_inc
#todo: map file
diff --git a/svl/Package_inc.mk b/svl/Package_inc.mk
index 888cdc38cfa6..c070c9ee5a6f 100644
--- a/svl/Package_inc.mk
+++ b/svl/Package_inc.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2009 by Sun Microsystems, Inc.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -14,12 +14,12 @@
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
+# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
diff --git a/svl/inc/svl/aeitem.hxx b/svl/inc/svl/aeitem.hxx
index 34029c7563f4..b9ff02a69e78 100644
--- a/svl/inc/svl/aeitem.hxx
+++ b/svl/inc/svl/aeitem.hxx
@@ -40,32 +40,32 @@ class SVL_DLLPUBLIC SfxAllEnumItem: public SfxEnumItem
SvUShorts* pDisabledValues;
protected:
- USHORT _GetPosByValue( USHORT nValue ) const;
+ sal_uInt16 _GetPosByValue( sal_uInt16 nValue ) const;
public:
TYPEINFO();
SfxAllEnumItem();
- SfxAllEnumItem( USHORT nWhich);
- SfxAllEnumItem( USHORT nWhich, USHORT nVal );
- SfxAllEnumItem( USHORT nWhich, USHORT nVal, const XubString &rText );
- SfxAllEnumItem( USHORT nWhich, SvStream &rStream );
+ SfxAllEnumItem( sal_uInt16 nWhich);
+ SfxAllEnumItem( sal_uInt16 nWhich, sal_uInt16 nVal );
+ SfxAllEnumItem( sal_uInt16 nWhich, sal_uInt16 nVal, const XubString &rText );
+ SfxAllEnumItem( sal_uInt16 nWhich, SvStream &rStream );
SfxAllEnumItem( const SfxAllEnumItem & );
~SfxAllEnumItem();
- void InsertValue( USHORT nValue );
- void InsertValue( USHORT nValue, const XubString &rText );
- void RemoveValue( USHORT nValue );
+ void InsertValue( sal_uInt16 nValue );
+ void InsertValue( sal_uInt16 nValue, const XubString &rText );
+ void RemoveValue( sal_uInt16 nValue );
void RemoveAllValues();
- USHORT GetPosByValue( USHORT nValue ) const;
+ sal_uInt16 GetPosByValue( sal_uInt16 nValue ) const;
- virtual USHORT GetValueCount() const;
- virtual USHORT GetValueByPos( USHORT nPos ) const;
- virtual XubString GetValueTextByPos( USHORT nPos ) const;
+ virtual sal_uInt16 GetValueCount() const;
+ virtual sal_uInt16 GetValueByPos( sal_uInt16 nPos ) const;
+ virtual XubString GetValueTextByPos( sal_uInt16 nPos ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT nVersion) const;
- virtual BOOL IsEnabled( USHORT ) const;
- void DisableValue( USHORT );
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16 nVersion) const;
+ virtual sal_Bool IsEnabled( sal_uInt16 ) const;
+ void DisableValue( sal_uInt16 );
};
#endif
diff --git a/svl/inc/svl/brdcst.hxx b/svl/inc/svl/brdcst.hxx
index b55d78f99540..87eeab351b3c 100644
--- a/svl/inc/svl/brdcst.hxx
+++ b/svl/inc/svl/brdcst.hxx
@@ -47,7 +47,7 @@ friend class SfxListener;
SfxListenerArr_Impl aListeners;
private:
- BOOL AddListener( SfxListener& rListener );
+ sal_Bool AddListener( SfxListener& rListener );
void RemoveListener( SfxListener& rListener );
const SfxBroadcaster& operator=(const SfxBroadcaster &); // verboten
@@ -66,9 +66,9 @@ public:
void BroadcastDelayed( const SfxHint& rHint );
void BroadcastInIdle( const SfxHint& rHint );
- BOOL HasListeners() const;
- USHORT GetListenerCount() const { return aListeners.Count(); }
- SfxListener* GetListener( USHORT nNo ) const
+ sal_Bool HasListeners() const;
+ sal_uInt16 GetListenerCount() const { return aListeners.Count(); }
+ SfxListener* GetListener( sal_uInt16 nNo ) const
{ return (SfxListener*) aListeners[nNo]; }
};
diff --git a/svl/inc/svl/broadcast.hxx b/svl/inc/svl/broadcast.hxx
index 2acddb5e4f6b..758906877bc1 100644
--- a/svl/inc/svl/broadcast.hxx
+++ b/svl/inc/svl/broadcast.hxx
@@ -59,7 +59,7 @@ public:
void Broadcast( const SfxHint &rHint );
- BOOL HasListeners() const { return 0 != pRoot; }
+ sal_Bool HasListeners() const { return 0 != pRoot; }
};
diff --git a/svl/inc/svl/cenumitm.hxx b/svl/inc/svl/cenumitm.hxx
index 42c9d60373db..0d0cf3d7c053 100644
--- a/svl/inc/svl/cenumitm.hxx
+++ b/svl/inc/svl/cenumitm.hxx
@@ -38,7 +38,7 @@ DBG_NAMEEX(SfxEnumItemInterface)
class SVL_DLLPUBLIC SfxEnumItemInterface: public SfxPoolItem
{
protected:
- SfxEnumItemInterface(USHORT which): SfxPoolItem(which) {}
+ SfxEnumItemInterface(sal_uInt16 which): SfxPoolItem(which) {}
SfxEnumItemInterface(const SfxEnumItemInterface & rItem):
SfxPoolItem(rItem) {}
@@ -54,15 +54,15 @@ public:
const IntlWrapper * = 0)
const;
- virtual BOOL QueryValue(com::sun::star::uno::Any & rVal, BYTE = 0) const;
+ virtual sal_Bool QueryValue(com::sun::star::uno::Any & rVal, sal_uInt8 = 0) const;
- virtual BOOL PutValue(const com::sun::star::uno::Any & rVal, BYTE = 0);
+ virtual sal_Bool PutValue(const com::sun::star::uno::Any & rVal, sal_uInt8 = 0);
- virtual USHORT GetValueCount() const = 0;
+ virtual sal_uInt16 GetValueCount() const = 0;
- virtual XubString GetValueTextByPos(USHORT nPos) const;
+ virtual XubString GetValueTextByPos(sal_uInt16 nPos) const;
- virtual USHORT GetValueByPos(USHORT nPos) const;
+ virtual sal_uInt16 GetValueByPos(sal_uInt16 nPos) const;
/// Return the position of some value within this enumeration.
///
@@ -74,19 +74,19 @@ public:
///
/// @return The position of nValue within this enumeration, or USHRT_MAX
/// if not included.
- virtual USHORT GetPosByValue(USHORT nValue) const;
+ virtual sal_uInt16 GetPosByValue(sal_uInt16 nValue) const;
- virtual BOOL IsEnabled(USHORT nValue) const;
+ virtual sal_Bool IsEnabled(sal_uInt16 nValue) const;
- virtual USHORT GetEnumValue() const = 0;
+ virtual sal_uInt16 GetEnumValue() const = 0;
- virtual void SetEnumValue(USHORT nValue) = 0;
+ virtual void SetEnumValue(sal_uInt16 nValue) = 0;
virtual int HasBoolValue() const;
- virtual BOOL GetBoolValue() const;
+ virtual sal_Bool GetBoolValue() const;
- virtual void SetBoolValue(BOOL bValue);
+ virtual void SetBoolValue(sal_Bool bValue);
};
//============================================================================
@@ -94,13 +94,13 @@ DBG_NAMEEX(CntEnumItem)
class SVL_DLLPUBLIC CntEnumItem: public SfxEnumItemInterface
{
- USHORT m_nValue;
+ sal_uInt16 m_nValue;
protected:
- CntEnumItem(USHORT which = 0, USHORT nTheValue = 0):
+ CntEnumItem(sal_uInt16 which = 0, sal_uInt16 nTheValue = 0):
SfxEnumItemInterface(which), m_nValue(nTheValue) {}
- CntEnumItem(USHORT which, SvStream & rStream);
+ CntEnumItem(sal_uInt16 which, SvStream & rStream);
CntEnumItem(const CntEnumItem & rItem):
SfxEnumItemInterface(rItem), m_nValue(rItem.m_nValue) {}
@@ -108,18 +108,18 @@ protected:
public:
TYPEINFO();
- virtual SvStream & Store(SvStream & rStream, USHORT) const;
+ virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
- virtual USHORT GetEnumValue() const;
+ virtual sal_uInt16 GetEnumValue() const;
- virtual void SetEnumValue(USHORT nTheValue);
+ virtual void SetEnumValue(sal_uInt16 nTheValue);
- USHORT GetValue() const { return m_nValue; }
+ sal_uInt16 GetValue() const { return m_nValue; }
- inline void SetValue(USHORT nTheValue);
+ inline void SetValue(sal_uInt16 nTheValue);
};
-inline void CntEnumItem::SetValue(USHORT nTheValue)
+inline void CntEnumItem::SetValue(sal_uInt16 nTheValue)
{
DBG_ASSERT(GetRefCount() == 0, "CntEnumItem::SetValue(): Pooled item");
m_nValue = nTheValue;
@@ -130,15 +130,15 @@ DBG_NAMEEX(CntBoolItem)
class SVL_DLLPUBLIC CntBoolItem: public SfxPoolItem
{
- BOOL m_bValue;
+ sal_Bool m_bValue;
public:
TYPEINFO();
- CntBoolItem(USHORT which = 0, BOOL bTheValue = FALSE):
+ CntBoolItem(sal_uInt16 which = 0, sal_Bool bTheValue = sal_False):
SfxPoolItem(which), m_bValue(bTheValue) {}
- CntBoolItem(USHORT nWhich, SvStream & rStream);
+ CntBoolItem(sal_uInt16 nWhich, SvStream & rStream);
CntBoolItem(const CntBoolItem & rItem):
SfxPoolItem(rItem), m_bValue(rItem.m_bValue) {}
@@ -154,23 +154,23 @@ public:
const IntlWrapper * = 0)
const;
- virtual BOOL QueryValue(com::sun::star::uno::Any& rVal, BYTE = 0) const;
+ virtual sal_Bool QueryValue(com::sun::star::uno::Any& rVal, sal_uInt8 = 0) const;
- virtual BOOL PutValue(const com::sun::star::uno::Any& rVal, BYTE = 0);
+ virtual sal_Bool PutValue(const com::sun::star::uno::Any& rVal, sal_uInt8 = 0);
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
- virtual SvStream & Store(SvStream & rStream, USHORT) const;
+ virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
- virtual USHORT GetValueCount() const;
+ virtual sal_uInt16 GetValueCount() const;
- virtual UniString GetValueTextByVal(BOOL bTheValue) const;
+ virtual UniString GetValueTextByVal(sal_Bool bTheValue) const;
- BOOL GetValue() const { return m_bValue; }
+ sal_Bool GetValue() const { return m_bValue; }
- void SetValue(BOOL bTheValue) { m_bValue = bTheValue; }
+ void SetValue(sal_Bool bTheValue) { m_bValue = bTheValue; }
};
#endif // _SVTOOLS_CENUMITM_HXX
diff --git a/svl/inc/svl/cintitem.hxx b/svl/inc/svl/cintitem.hxx
index 929521d57cb1..68a532cee613 100644
--- a/svl/inc/svl/cintitem.hxx
+++ b/svl/inc/svl/cintitem.hxx
@@ -37,15 +37,15 @@ DBG_NAMEEX_VISIBILITY(CntByteItem, SVL_DLLPUBLIC)
class SVL_DLLPUBLIC CntByteItem: public SfxPoolItem
{
- BYTE m_nValue;
+ sal_uInt8 m_nValue;
public:
TYPEINFO();
- CntByteItem(USHORT which = 0, BYTE nTheValue = 0):
+ CntByteItem(sal_uInt16 which = 0, sal_uInt8 nTheValue = 0):
SfxPoolItem(which), m_nValue(nTheValue) { DBG_CTOR(CntByteItem, 0); }
- CntByteItem(USHORT which, SvStream & rStream);
+ CntByteItem(sal_uInt16 which, SvStream & rStream);
CntByteItem(const CntByteItem & rItem):
SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
@@ -64,30 +64,30 @@ public:
const IntlWrapper * = 0)
const;
- virtual BOOL QueryValue(com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0) const;
+ virtual sal_Bool QueryValue(com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0) const;
- virtual BOOL PutValue(const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0);
+ virtual sal_Bool PutValue(const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0);
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
- virtual SvStream & Store(SvStream & rStream, USHORT) const;
+ virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
- virtual BYTE GetMin() const;
+ virtual sal_uInt8 GetMin() const;
- virtual BYTE GetMax() const;
+ virtual sal_uInt8 GetMax() const;
virtual SfxFieldUnit GetUnit() const;
- BYTE GetValue() const { return m_nValue; }
+ sal_uInt8 GetValue() const { return m_nValue; }
- inline void SetValue(BYTE nTheValue);
+ inline void SetValue(sal_uInt8 nTheValue);
};
-inline void CntByteItem::SetValue(BYTE nTheValue)
+inline void CntByteItem::SetValue(sal_uInt8 nTheValue)
{
DBG_ASSERT(GetRefCount() == 0, "CntByteItem::SetValue(): Pooled item");
m_nValue = nTheValue;
@@ -98,16 +98,16 @@ DBG_NAMEEX_VISIBILITY(CntUInt16Item, SVL_DLLPUBLIC)
class SVL_DLLPUBLIC CntUInt16Item: public SfxPoolItem
{
- UINT16 m_nValue;
+ sal_uInt16 m_nValue;
public:
TYPEINFO();
- CntUInt16Item(USHORT which = 0, UINT16 nTheValue = 0):
+ CntUInt16Item(sal_uInt16 which = 0, sal_uInt16 nTheValue = 0):
SfxPoolItem(which), m_nValue(nTheValue)
{ DBG_CTOR(CntUInt16Item, 0); }
- CntUInt16Item(USHORT which, SvStream & rStream);
+ CntUInt16Item(sal_uInt16 which, SvStream & rStream);
CntUInt16Item(const CntUInt16Item & rItem):
SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
@@ -126,30 +126,30 @@ public:
const IntlWrapper * = 0)
const;
- virtual BOOL QueryValue(com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0) const;
+ virtual sal_Bool QueryValue(com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0) const;
- virtual BOOL PutValue(const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0);
+ virtual sal_Bool PutValue(const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0);
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
- virtual SvStream & Store(SvStream & rStream, USHORT) const;
+ virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
- virtual UINT16 GetMin() const;
+ virtual sal_uInt16 GetMin() const;
- virtual UINT16 GetMax() const;
+ virtual sal_uInt16 GetMax() const;
virtual SfxFieldUnit GetUnit() const;
- INT16 GetValue() const { return m_nValue; }
+ sal_Int16 GetValue() const { return m_nValue; }
- inline void SetValue(UINT16 nTheValue);
+ inline void SetValue(sal_uInt16 nTheValue);
};
-inline void CntUInt16Item::SetValue(UINT16 nTheValue)
+inline void CntUInt16Item::SetValue(sal_uInt16 nTheValue)
{
DBG_ASSERT(GetRefCount() == 0, "CntUInt16Item::SetValue(): Pooled item");
m_nValue = nTheValue;
@@ -160,16 +160,16 @@ DBG_NAMEEX_VISIBILITY(CntInt32Item, SVL_DLLPUBLIC)
class SVL_DLLPUBLIC CntInt32Item: public SfxPoolItem
{
- INT32 m_nValue;
+ sal_Int32 m_nValue;
public:
TYPEINFO();
- CntInt32Item(USHORT which = 0, INT32 nTheValue = 0):
+ CntInt32Item(sal_uInt16 which = 0, sal_Int32 nTheValue = 0):
SfxPoolItem(which), m_nValue(nTheValue)
{ DBG_CTOR(CntInt32Item, 0); }
- CntInt32Item(USHORT which, SvStream & rStream);
+ CntInt32Item(sal_uInt16 which, SvStream & rStream);
CntInt32Item(const CntInt32Item & rItem):
SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
@@ -188,30 +188,30 @@ public:
const IntlWrapper * = 0)
const;
- virtual BOOL QueryValue(com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0) const;
+ virtual sal_Bool QueryValue(com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0) const;
- virtual BOOL PutValue(const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0);
+ virtual sal_Bool PutValue(const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0);
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
- virtual SvStream & Store(SvStream &, USHORT) const;
+ virtual SvStream & Store(SvStream &, sal_uInt16) const;
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
- virtual INT32 GetMin() const;
+ virtual sal_Int32 GetMin() const;
- virtual INT32 GetMax() const;
+ virtual sal_Int32 GetMax() const;
virtual SfxFieldUnit GetUnit() const;
- INT32 GetValue() const { return m_nValue; }
+ sal_Int32 GetValue() const { return m_nValue; }
- inline void SetValue(INT32 nTheValue);
+ inline void SetValue(sal_Int32 nTheValue);
};
-inline void CntInt32Item::SetValue(INT32 nTheValue)
+inline void CntInt32Item::SetValue(sal_Int32 nTheValue)
{
DBG_ASSERT(GetRefCount() == 0, "CntInt32Item::SetValue(): Pooled item");
m_nValue = nTheValue;
@@ -222,16 +222,16 @@ DBG_NAMEEX_VISIBILITY(CntUInt32Item, SVL_DLLPUBLIC)
class SVL_DLLPUBLIC CntUInt32Item: public SfxPoolItem
{
- UINT32 m_nValue;
+ sal_uInt32 m_nValue;
public:
TYPEINFO();
- CntUInt32Item(USHORT which = 0, UINT32 nTheValue = 0):
+ CntUInt32Item(sal_uInt16 which = 0, sal_uInt32 nTheValue = 0):
SfxPoolItem(which), m_nValue(nTheValue)
{ DBG_CTOR(CntUInt32Item, 0); }
- CntUInt32Item(USHORT nWhich, SvStream & rStream);
+ CntUInt32Item(sal_uInt16 nWhich, SvStream & rStream);
CntUInt32Item(const CntUInt32Item & rItem):
SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
@@ -250,30 +250,30 @@ public:
const IntlWrapper * = 0)
const;
- virtual BOOL QueryValue(com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0) const;
+ virtual sal_Bool QueryValue(com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0) const;
- virtual BOOL PutValue(const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0);
+ virtual sal_Bool PutValue(const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0);
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
- virtual SvStream & Store(SvStream & rStream, USHORT) const;
+ virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
- virtual UINT32 GetMin() const;
+ virtual sal_uInt32 GetMin() const;
- virtual UINT32 GetMax() const;
+ virtual sal_uInt32 GetMax() const;
virtual SfxFieldUnit GetUnit() const;
- UINT32 GetValue() const { return m_nValue; }
+ sal_uInt32 GetValue() const { return m_nValue; }
- inline void SetValue(UINT32 nTheValue);
+ inline void SetValue(sal_uInt32 nTheValue);
};
-inline void CntUInt32Item::SetValue(UINT32 nTheValue)
+inline void CntUInt32Item::SetValue(sal_uInt32 nTheValue)
{
DBG_ASSERT(GetRefCount() == 0, "CntUInt32Item::SetValue(): Pooled item");
m_nValue = nTheValue;
diff --git a/svl/inc/svl/cntnrsrt.hxx b/svl/inc/svl/cntnrsrt.hxx
index 48ebef50ea58..7c0dc6863371 100644
--- a/svl/inc/svl/cntnrsrt.hxx
+++ b/svl/inc/svl/cntnrsrt.hxx
@@ -63,17 +63,17 @@
public: \
using Container::Count; \
\
- ClassName( USHORT InitSize, USHORT ReSize ) : \
+ ClassName( sal_uInt16 InitSize, sal_uInt16 ReSize ) : \
Container( CONTAINER_MAXBLOCKSIZE, InitSize, ReSize ) {} \
\
- BOOL Insert( Type* pObj ); \
+ sal_Bool Insert( Type* pObj ); \
\
- Type *Remove( ULONG nPos ) \
+ Type *Remove( sal_uLong nPos ) \
{ return (Type *)Container::Remove( nPos ); } \
\
Type *Remove( Type* pObj ); \
\
- void DeleteAndDestroy( ULONG nPos ) \
+ void DeleteAndDestroy( sal_uLong nPos ) \
{ \
Type *pObj = Remove( nPos ); \
if( pObj ) \
@@ -83,15 +83,15 @@ public: \
void DeleteAndDestroy() \
{ while( Count() ) DeleteAndDestroy( 0 ); } \
\
- Type* GetObject( ULONG nPos ) const \
+ Type* GetObject( sal_uLong nPos ) const \
{ return (Type *)Container::GetObject( nPos ); } \
\
- Type* operator[]( ULONG nPos ) const \
+ Type* operator[]( sal_uLong nPos ) const \
{ return GetObject(nPos); } \
\
- BOOL Seek_Entry( const Type *pObj, ULONG* pPos ) const; \
+ sal_Bool Seek_Entry( const Type *pObj, sal_uLong* pPos ) const; \
\
- ULONG GetPos( const Type* pObj ) const; \
+ sal_uLong GetPos( const Type* pObj ) const; \
#define DECLARE_CONTAINER_SORT( ClassName, Type ) \
@@ -111,10 +111,10 @@ class ClassName : private Container \
#define IMPL_CONTAINER_SORT( ClassName, Type, SortFunc ) \
-BOOL ClassName::Insert( Type *pObj ) \
+sal_Bool ClassName::Insert( Type *pObj ) \
{ \
- ULONG nPos; \
- BOOL bExist = Seek_Entry( pObj, &nPos ); \
+ sal_uLong nPos; \
+ sal_Bool bExist = Seek_Entry( pObj, &nPos ); \
if( !bExist ) \
Container::Insert( pObj, nPos ); \
return !bExist; \
@@ -122,25 +122,25 @@ BOOL ClassName::Insert( Type *pObj ) \
\
Type *ClassName::Remove( Type* pObj ) \
{ \
- ULONG nPos; \
+ sal_uLong nPos; \
if( Seek_Entry( pObj, &nPos ) ) \
return Remove( nPos ); \
else \
return 0; \
} \
\
-ULONG ClassName::GetPos( const Type* pObj ) const \
+sal_uLong ClassName::GetPos( const Type* pObj ) const \
{ \
- ULONG nPos; \
+ sal_uLong nPos; \
if( Seek_Entry( pObj, &nPos ) ) \
return nPos; \
else \
return CONTAINER_ENTRY_NOTFOUND; \
} \
\
-BOOL ClassName::Seek_Entry( const Type* pObj, ULONG* pPos ) const \
+sal_Bool ClassName::Seek_Entry( const Type* pObj, sal_uLong* pPos ) const \
{ \
- register ULONG nO = Count(), \
+ register sal_uLong nO = Count(), \
nM, \
nU = 0; \
if( nO > 0 ) \
@@ -154,21 +154,21 @@ BOOL ClassName::Seek_Entry( const Type* pObj, ULONG* pPos ) const \
if( 0 == nCmp ) \
{ \
if( pPos ) *pPos = nM; \
- return TRUE; \
+ return sal_True; \
} \
else if( nCmp < 0 ) \
nU = nM + 1; \
else if( nM == 0 ) \
{ \
if( pPos ) *pPos = nU; \
- return FALSE; \
+ return sal_False; \
} \
else \
nO = nM - 1; \
} \
} \
if( pPos ) *pPos = nU; \
- return FALSE; \
+ return sal_False; \
} \
#endif
diff --git a/svl/inc/svl/cntwall.hxx b/svl/inc/svl/cntwall.hxx
index a7f3dd0111a6..070795e6faf3 100644
--- a/svl/inc/svl/cntwall.hxx
+++ b/svl/inc/svl/cntwall.hxx
@@ -43,35 +43,35 @@ class SVL_DLLPUBLIC CntWallpaperItem : public SfxPoolItem
private:
UniString _aURL;
Color _nColor;
- USHORT _nStyle;
+ sal_uInt16 _nStyle;
public:
TYPEINFO();
- CntWallpaperItem( USHORT nWhich );
- CntWallpaperItem( USHORT nWhich, SvStream& rStream, USHORT nVersion );
+ CntWallpaperItem( sal_uInt16 nWhich );
+ CntWallpaperItem( sal_uInt16 nWhich, SvStream& rStream, sal_uInt16 nVersion );
CntWallpaperItem( const CntWallpaperItem& rCpy );
~CntWallpaperItem();
- virtual USHORT GetVersion(USHORT) const;
+ virtual sal_uInt16 GetVersion(sal_uInt16) const;
virtual int operator==( const SfxPoolItem& ) const;
- virtual SfxPoolItem* Create( SvStream&, USHORT nItemVersion ) const;
- virtual SvStream& Store( SvStream&, USHORT nItemVersion ) const;
+ virtual SfxPoolItem* Create( SvStream&, sal_uInt16 nItemVersion ) const;
+ virtual SvStream& Store( SvStream&, sal_uInt16 nItemVersion ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
- virtual BOOL PutValue ( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue ( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 );
void SetBitmapURL( const UniString& rURL ) { _aURL = rURL; }
void SetColor( Color nColor ) { _nColor = nColor; }
- void SetStyle( USHORT nStyle ) { _nStyle = nStyle; }
+ void SetStyle( sal_uInt16 nStyle ) { _nStyle = nStyle; }
const UniString& GetBitmapURL() const { return _aURL; }
Color GetColor() const { return _nColor; }
- USHORT GetStyle() const { return _nStyle; }
+ sal_uInt16 GetStyle() const { return _nStyle; }
};
////////////////////////////////////////////////////////////////////////////////
diff --git a/svl/inc/svl/converter.hxx b/svl/inc/svl/converter.hxx
index 062feafe6f29..c208a370bceb 100644
--- a/svl/inc/svl/converter.hxx
+++ b/svl/inc/svl/converter.hxx
@@ -33,8 +33,8 @@
class SvDbaseConverter
{
public:
- SVL_DLLPUBLIC static INT32 ConvertPrecisionToDbase(INT32 _nLen, INT32 _nScale);
- SVL_DLLPUBLIC static INT32 ConvertPrecisionToOdbc(INT32 _nLen, INT32 _nScale);
+ SVL_DLLPUBLIC static sal_Int32 ConvertPrecisionToDbase(sal_Int32 _nLen, sal_Int32 _nScale);
+ SVL_DLLPUBLIC static sal_Int32 ConvertPrecisionToOdbc(sal_Int32 _nLen, sal_Int32 _nScale);
};
#endif //_CONVERTER_HXX_
diff --git a/svl/inc/svl/ctypeitm.hxx b/svl/inc/svl/ctypeitm.hxx
index e83d37b8925e..bb3efc756187 100644
--- a/svl/inc/svl/ctypeitm.hxx
+++ b/svl/inc/svl/ctypeitm.hxx
@@ -42,17 +42,17 @@ public:
TYPEINFO();
CntContentTypeItem();
- CntContentTypeItem( USHORT nWhich, const XubString& rType );
- CntContentTypeItem( USHORT nWhich, const INetContentType eType );
+ CntContentTypeItem( sal_uInt16 nWhich, const XubString& rType );
+ CntContentTypeItem( sal_uInt16 nWhich, const INetContentType eType );
CntContentTypeItem( const CntContentTypeItem& rOrig );
virtual SfxPoolItem* Create( SvStream& rStream,
- USHORT nItemVersion ) const;
- virtual SvStream & Store(SvStream & rStream, USHORT) const;
+ sal_uInt16 nItemVersion ) const;
+ virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
virtual int operator==( const SfxPoolItem& rOrig ) const;
- virtual USHORT GetVersion(USHORT) const;
+ virtual sal_uInt16 GetVersion(sal_uInt16) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = NULL ) const;
@@ -68,10 +68,10 @@ public:
XubString &rText,
const IntlWrapper* pIntlWrapper = 0 ) const;
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
- virtual BOOL PutValue ( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0);
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue ( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0);
INetContentType GetEnumValue() const;
diff --git a/svl/inc/svl/custritm.hxx b/svl/inc/svl/custritm.hxx
index a24135e392c2..f0e01a6a7c32 100644
--- a/svl/inc/svl/custritm.hxx
+++ b/svl/inc/svl/custritm.hxx
@@ -42,10 +42,10 @@ class SVL_DLLPUBLIC CntUnencodedStringItem: public SfxPoolItem
public:
TYPEINFO();
- CntUnencodedStringItem(USHORT which = 0): SfxPoolItem(which)
+ CntUnencodedStringItem(sal_uInt16 which = 0): SfxPoolItem(which)
{ DBG_CTOR(CntUnencodedStringItem, 0); }
- CntUnencodedStringItem(USHORT which, const XubString & rTheValue):
+ CntUnencodedStringItem(sal_uInt16 which, const XubString & rTheValue):
SfxPoolItem(which), m_aValue(rTheValue)
{ DBG_CTOR(CntUnencodedStringItem, 0); }
@@ -68,11 +68,11 @@ public:
const IntlWrapper * = 0)
const;
- virtual BOOL QueryValue(com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0) const;
+ virtual sal_Bool QueryValue(com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0) const;
- virtual BOOL PutValue(const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0);
+ virtual sal_Bool PutValue(const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0);
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
diff --git a/svl/inc/svl/dateitem.hxx b/svl/inc/svl/dateitem.hxx
index 3ae5506d809a..bf2c7a3c6e54 100644
--- a/svl/inc/svl/dateitem.hxx
+++ b/svl/inc/svl/dateitem.hxx
@@ -46,8 +46,8 @@ private:
public:
TYPEINFO();
- SfxDateTimeItem( USHORT nWhich );
- SfxDateTimeItem( USHORT nWhich,
+ SfxDateTimeItem( sal_uInt16 nWhich );
+ SfxDateTimeItem( sal_uInt16 nWhich,
const DateTime& rDT );
SfxDateTimeItem( const SfxDateTimeItem& rCpy );
@@ -57,8 +57,8 @@ public:
virtual int operator==( const SfxPoolItem& ) const;
using SfxPoolItem::Compare;
virtual int Compare( const SfxPoolItem &rWith ) const;
- virtual SfxPoolItem* Create( SvStream&, USHORT nItemVersion ) const;
- virtual SvStream& Store( SvStream&, USHORT nItemVersion ) const;
+ virtual SfxPoolItem* Create( SvStream&, sal_uInt16 nItemVersion ) const;
+ virtual SvStream& Store( SvStream&, sal_uInt16 nItemVersion ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -74,10 +74,10 @@ public:
"SetDateTime() with pooled item" );
aDateTime = rDT; }
- virtual BOOL PutValue ( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue ( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 ) const;
};
class SfxColumnDateTimeItem : public SfxDateTimeItem
@@ -85,8 +85,8 @@ class SfxColumnDateTimeItem : public SfxDateTimeItem
public:
TYPEINFO();
- SfxColumnDateTimeItem( USHORT nWhich );
- SfxColumnDateTimeItem( USHORT nWhich,
+ SfxColumnDateTimeItem( sal_uInt16 nWhich );
+ SfxColumnDateTimeItem( sal_uInt16 nWhich,
const DateTime& rDT );
SfxColumnDateTimeItem( const SfxDateTimeItem& rCpy );
diff --git a/svl/inc/svl/eitem.hxx b/svl/inc/svl/eitem.hxx
index bc65db9c31dc..f6dbb9951d84 100644
--- a/svl/inc/svl/eitem.hxx
+++ b/svl/inc/svl/eitem.hxx
@@ -35,10 +35,10 @@
class SVL_DLLPUBLIC SfxEnumItem: public CntEnumItem
{
protected:
- SfxEnumItem(USHORT which = 0, USHORT nValue = 0):
+ SfxEnumItem(sal_uInt16 which = 0, sal_uInt16 nValue = 0):
CntEnumItem(which, nValue) {}
- SfxEnumItem(USHORT which, SvStream & rStream):
+ SfxEnumItem(sal_uInt16 which, SvStream & rStream):
CntEnumItem(which, rStream) {}
public:
@@ -52,13 +52,13 @@ class SVL_DLLPUBLIC SfxBoolItem: public CntBoolItem
public:
TYPEINFO();
- SfxBoolItem(USHORT which = 0, BOOL bValue = FALSE):
+ SfxBoolItem(sal_uInt16 which = 0, sal_Bool bValue = sal_False):
CntBoolItem(which, bValue) {}
- SfxBoolItem(USHORT which, SvStream & rStream):
+ SfxBoolItem(sal_uInt16 which, SvStream & rStream):
CntBoolItem(which, rStream) {}
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const
{ return new SfxBoolItem(Which(), rStream); }
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const
diff --git a/svl/inc/svl/filerec.hxx b/svl/inc/svl/filerec.hxx
index d0cc27b94b96..eef347ab772b 100644
--- a/svl/inc/svl/filerec.hxx
+++ b/svl/inc/svl/filerec.hxx
@@ -35,24 +35,24 @@
#include <tools/stream.hxx>
#include <svl/svarray.hxx>
-SV_DECL_VARARR( SfxUINT32s, UINT32, 8, 8 )
+SV_DECL_VARARR( SfxUINT32s, sal_uInt32, 8, 8 )
//------------------------------------------------------------------------
-#define SFX_BOOL_DONTCARE BOOL(2) // Don't-Care-Wert f"ur BOOLs
+#define SFX_BOOL_DONTCARE sal_Bool(2) // Don't-Care-Wert f"ur BOOLs
-#define SFX_REC_PRETAG_EXT BYTE(0x00) // Pre-Tag f"ur Extended-Records
-#define SFX_REC_PRETAG_EOR BYTE(0xFF) // Pre-Tag f"ur End-Of-Records
+#define SFX_REC_PRETAG_EXT sal_uInt8(0x00) // Pre-Tag f"ur Extended-Records
+#define SFX_REC_PRETAG_EOR sal_uInt8(0xFF) // Pre-Tag f"ur End-Of-Records
-#define SFX_REC_TYPE_NONE BYTE(0x00) // unbekannter Record-Typ
-#define SFX_REC_TYPE_FIRST BYTE(0x01)
-#define SFX_REC_TYPE_SINGLE BYTE(0x01) // Single-Content-Record
-#define SFX_REC_TYPE_FIXSIZE BYTE(0x02) // Fix-Size-Multi-Content-Record
-#define SFX_REC_TYPE_VARSIZE_RELOC BYTE(0x03) // variable Rec-Size
-#define SFX_REC_TYPE_VARSIZE BYTE(0x04) // alt (nicht verschiebbar)
-#define SFX_REC_TYPE_MIXTAGS_RELOC BYTE(0x07) // Mixed Tag Content-Record
-#define SFX_REC_TYPE_MIXTAGS BYTE(0x08) // alt (nicht verschiebbar)
-#define SFX_REC_TYPE_LAST BYTE(0x08)
+#define SFX_REC_TYPE_NONE sal_uInt8(0x00) // unbekannter Record-Typ
+#define SFX_REC_TYPE_FIRST sal_uInt8(0x01)
+#define SFX_REC_TYPE_SINGLE sal_uInt8(0x01) // Single-Content-Record
+#define SFX_REC_TYPE_FIXSIZE sal_uInt8(0x02) // Fix-Size-Multi-Content-Record
+#define SFX_REC_TYPE_VARSIZE_RELOC sal_uInt8(0x03) // variable Rec-Size
+#define SFX_REC_TYPE_VARSIZE sal_uInt8(0x04) // alt (nicht verschiebbar)
+#define SFX_REC_TYPE_MIXTAGS_RELOC sal_uInt8(0x07) // Mixed Tag Content-Record
+#define SFX_REC_TYPE_MIXTAGS sal_uInt8(0x08) // alt (nicht verschiebbar)
+#define SFX_REC_TYPE_LAST sal_uInt8(0x08)
#define SFX_REC_TYPE_MINI 0x100 // Mini-Record
#define SFX_REC_TYPE_DRAWENG 0x400 // Drawing-Engine-Record
#define SFX_REC_TYPE_EOR 0xF00 // End-Of-Records
@@ -124,9 +124,9 @@ SV_DECL_VARARR( SfxUINT32s, UINT32, 8, 8 )
Struktur des Mini-Records:
- 1 BYTE Pre-Tag
- 3 BYTE OffsetToEndOfRec
- OffsetToEndOfRec* 1 BYTE Content
+ 1 sal_uInt8 Pre-Tag
+ 3 sal_uInt8 OffsetToEndOfRec
+ OffsetToEndOfRec* 1 sal_uInt8 Content
Bei den Extended-Reords folgt auf diesen 4-Byte-Header ein erweiterter
Header, der zun"achst den o.g. Record-Typ, dann eine Versions-Kennung
@@ -134,13 +134,13 @@ SV_DECL_VARARR( SfxUINT32s, UINT32, 8, 8 )
Struktur des Extended-Records:
- 1 BYTE Pre-Tag (==0x00)
- 3 BYTE OffsetToEndOfRec
- OffsetToEndOfRec* 1 BYTE Content
- 1 BYTE Record-Type
- 1 BYTE Version
- 2 BYTE Tag
- ContentSize* 1 BYTE Content
+ 1 sal_uInt8 Pre-Tag (==0x00)
+ 3 sal_uInt8 OffsetToEndOfRec
+ OffsetToEndOfRec* 1 sal_uInt8 Content
+ 1 sal_uInt8 Record-Type
+ 1 sal_uInt8 Version
+ 2 sal_uInt8 Tag
+ ContentSize* 1 sal_uInt8 Content
(ContentSize = OffsetToEndOfRec - 8)
@@ -160,7 +160,7 @@ SV_DECL_VARARR( SfxUINT32s, UINT32, 8, 8 )
m"ussen.
=> die Bytes 2-4 werden bei allen Records als Offset zum Ende des
Records interpretiert, so da\s die Gesamt-Recors-Size sich wie
- folgt berechnet: sizeof(UINT32) + OffsetToEndOfRec
+ folgt berechnet: sizeof(sal_uInt32) + OffsetToEndOfRec
Die Records sollten einfach zu parsen un einheitlich aufgebaut sein.
=> Sie bauen aufeinander auf, so ist z.B. der SfxMiniRecord in jedem
@@ -191,7 +191,7 @@ class SVL_DLLPUBLIC SfxMiniRecordWriter
/* [Beschreibung]
Mit Instanzen dieser Klasse kann ein einfacher Record in einen Stream
- geschrieben werden, der sich durch ein BYTE-Tag identifiziert, sowie
+ geschrieben werden, der sich durch ein sal_uInt8-Tag identifiziert, sowie
seine eigene L"ange speichert und somit auch von "alteren Versionen
bzw. Readern, die diesen Record-Type (Tag) nicht kennen, "ubersprungen
werden kann. Es wird keine Version-Nummer gespeichert.
@@ -206,9 +206,9 @@ class SVL_DLLPUBLIC SfxMiniRecordWriter
[Fileformat]
- 1* BYTE Content-Tag (!= 0)
- 1* 3-BYTE OffsetToEndOfRec in Bytes
- SizeOfContent* BYTE Content
+ 1* sal_uInt8 Content-Tag (!= 0)
+ 1* 3-sal_uInt8 OffsetToEndOfRec in Bytes
+ SizeOfContent* sal_uInt8 Content
[Beispiel]
@@ -222,18 +222,18 @@ class SVL_DLLPUBLIC SfxMiniRecordWriter
{
protected:
SvStream* _pStream; // <SvStream>, in dem der Record liegt
- UINT32 _nStartPos; // Start-Position des Gesamt-Records im Stream
- FASTBOOL _bHeaderOk; /* TRUE, wenn der Header schon geschrieben ist;
+ sal_uInt32 _nStartPos; // Start-Position des Gesamt-Records im Stream
+ FASTBOOL _bHeaderOk; /* sal_True, wenn der Header schon geschrieben ist;
bei DBG_UTIL wird SFX_BOOL_DONTCARE ver-
wendet, um die Gr"o\se von Fix-Sized-Records
zu pr"ufen. */
- BYTE _nPreTag; // in den Header zu schreibendes 'Pre-Tag'
+ sal_uInt8 _nPreTag; // in den Header zu schreibendes 'Pre-Tag'
public:
inline SfxMiniRecordWriter( SvStream *pStream,
- BYTE nTag );
- inline SfxMiniRecordWriter( SvStream *pStream, BYTE nTag,
- UINT32 nSize );
+ sal_uInt8 nTag );
+ inline SfxMiniRecordWriter( SvStream *pStream, sal_uInt8 nTag,
+ sal_uInt32 nSize );
inline ~SfxMiniRecordWriter();
@@ -241,7 +241,7 @@ public:
inline void Reset();
- UINT32 Close( FASTBOOL bSeekToEndOfRec = TRUE );
+ sal_uInt32 Close( FASTBOOL bSeekToEndOfRec = sal_True );
private:
// not implementend, not allowed
@@ -280,35 +280,35 @@ class SVL_DLLPUBLIC SfxMiniRecordReader
{
protected:
SvStream* _pStream; // <SvStream>, aus dem gelesen wird
- UINT32 _nEofRec; // Position direkt hinter dem Record
- FASTBOOL _bSkipped; // TRUE: der Record wurde explizit geskippt
- BYTE _nPreTag; // aus dem Header gelesenes Pre-Tag
+ sal_uInt32 _nEofRec; // Position direkt hinter dem Record
+ FASTBOOL _bSkipped; // sal_True: der Record wurde explizit geskippt
+ sal_uInt8 _nPreTag; // aus dem Header gelesenes Pre-Tag
// Drei-Phasen-Ctor f"ur Subklassen
SfxMiniRecordReader() {}
- void Construct_Impl( SvStream *pStream, BYTE nTag )
+ void Construct_Impl( SvStream *pStream, sal_uInt8 nTag )
{
_pStream = pStream;
- _bSkipped = FALSE;
+ _bSkipped = sal_False;
_nPreTag = nTag;
}
- inline FASTBOOL SetHeader_Impl( UINT32 nHeader );
+ inline FASTBOOL SetHeader_Impl( sal_uInt32 nHeader );
// als ung"ultig markieren und zur"uck-seeken
- void SetInvalid_Impl( UINT32 nRecordStartPos )
+ void SetInvalid_Impl( sal_uInt32 nRecordStartPos )
{
_nPreTag = SFX_REC_PRETAG_EOR;
_pStream->Seek( nRecordStartPos );
}
public:
- static USHORT ScanRecordType( SvStream *pStream );
+ static sal_uInt16 ScanRecordType( SvStream *pStream );
SfxMiniRecordReader( SvStream *pStream );
- SfxMiniRecordReader( SvStream *pStream, BYTE nTag );
+ SfxMiniRecordReader( SvStream *pStream, sal_uInt8 nTag );
inline ~SfxMiniRecordReader();
- inline BYTE GetTag() const;
+ inline sal_uInt8 GetTag() const;
inline FASTBOOL IsValid() const;
inline SvStream& operator*() const;
@@ -328,8 +328,8 @@ class SVL_DLLPUBLIC SfxSingleRecordWriter: public SfxMiniRecordWriter
/* [Beschreibung]
Mit Instanzen dieser Klasse kann ein Record in einen Stream geschrieben
- werden, dessen einziger Inhalt sich durch ein UINT16-Tag und eine
- BYTE-Versions-Nummer identifiziert, sowie seine eigene L"ange speichert
+ werden, dessen einziger Inhalt sich durch ein sal_uInt16-Tag und eine
+ sal_uInt8-Versions-Nummer identifiziert, sowie seine eigene L"ange speichert
und somit auch von "alteren Versionen bzw. Readern, die diesen
Record-Type (Tag) nicht kennen, "ubersprungen werden kann.
@@ -343,12 +343,12 @@ class SVL_DLLPUBLIC SfxSingleRecordWriter: public SfxMiniRecordWriter
[Fileformat]
- 1* BYTE Pre-Tag (!= 0)
- 1* 3-BYTE OffsetToEndOfRec in Bytes
- 1* BYTE Record-Type (==SFX_REC_TYPE_SINGLE)
- 1* BYTE Content-Version
- 1* USHORT Content-Tag
- SizeOfContent* BYTE Content
+ 1* sal_uInt8 Pre-Tag (!= 0)
+ 1* 3-sal_uInt8 OffsetToEndOfRec in Bytes
+ 1* sal_uInt8 Record-Type (==SFX_REC_TYPE_SINGLE)
+ 1* sal_uInt8 Content-Version
+ 1* sal_uInt16 Content-Tag
+ SizeOfContent* sal_uInt8 Content
[Beispiel]
@@ -361,20 +361,20 @@ class SVL_DLLPUBLIC SfxSingleRecordWriter: public SfxMiniRecordWriter
{
protected:
- SfxSingleRecordWriter( BYTE nRecordType,
+ SfxSingleRecordWriter( sal_uInt8 nRecordType,
SvStream *pStream,
- UINT16 nTag, BYTE nCurVer );
+ sal_uInt16 nTag, sal_uInt8 nCurVer );
public:
SfxSingleRecordWriter( SvStream *pStream,
- UINT16 nTag, BYTE nCurVer );
+ sal_uInt16 nTag, sal_uInt8 nCurVer );
SfxSingleRecordWriter( SvStream *pStream,
- UINT16 nTag, BYTE nCurVer,
- UINT32 nSize );
+ sal_uInt16 nTag, sal_uInt8 nCurVer,
+ sal_uInt32 nSize );
inline void Reset();
- UINT32 Close( FASTBOOL bSeekToEndOfRec = TRUE );
+ sal_uInt32 Close( FASTBOOL bSeekToEndOfRec = sal_True );
};
//------------------------------------------------------------------------
@@ -409,9 +409,9 @@ class SVL_DLLPUBLIC SfxSingleRecordReader: public SfxMiniRecordReader
{
protected:
- UINT16 _nRecordTag; // Art des Gesamt-Inhalts
- BYTE _nRecordVer; // Version des Gesamt-Inhalts
- BYTE _nRecordType; // Record Type aus dem Header
+ sal_uInt16 _nRecordTag; // Art des Gesamt-Inhalts
+ sal_uInt8 _nRecordVer; // Version des Gesamt-Inhalts
+ sal_uInt8 _nRecordType; // Record Type aus dem Header
// Drei-Phasen-Ctor f"ur Subklassen
SfxSingleRecordReader() {}
@@ -420,17 +420,17 @@ protected:
SfxMiniRecordReader::Construct_Impl(
pStream, SFX_REC_PRETAG_EXT );
}
- FASTBOOL FindHeader_Impl( UINT16 nTypes, UINT16 nTag );
- FASTBOOL ReadHeader_Impl( USHORT nTypes );
+ FASTBOOL FindHeader_Impl( sal_uInt16 nTypes, sal_uInt16 nTag );
+ FASTBOOL ReadHeader_Impl( sal_uInt16 nTypes );
public:
SfxSingleRecordReader( SvStream *pStream );
- SfxSingleRecordReader( SvStream *pStream, USHORT nTag );
+ SfxSingleRecordReader( SvStream *pStream, sal_uInt16 nTag );
- inline UINT16 GetTag() const;
+ inline sal_uInt16 GetTag() const;
- inline BYTE GetVersion() const;
- inline FASTBOOL HasVersion( USHORT nVersion ) const;
+ inline sal_uInt8 GetVersion() const;
+ inline FASTBOOL HasVersion( sal_uInt16 nVersion ) const;
};
//------------------------------------------------------------------------
@@ -458,22 +458,22 @@ class SVL_DLLPUBLIC SfxMultiFixRecordWriter: public SfxSingleRecordWriter
[Fileformat]
- 1* BYTE Pre-Tag (==0)
- 1* 3-BYTE OffsetToEndOfRec in Bytes
- 1* BYTE Record-Type (==SFX_REC_TYPE_FIXSIZE)
- 1* BYTE Content-Version
- 1* UINT16 Content-Tag
- 1* UINT16 NumberOfContents
- 1* UINT32 SizeOfEachContent
+ 1* sal_uInt8 Pre-Tag (==0)
+ 1* 3-sal_uInt8 OffsetToEndOfRec in Bytes
+ 1* sal_uInt8 Record-Type (==SFX_REC_TYPE_FIXSIZE)
+ 1* sal_uInt8 Content-Version
+ 1* sal_uInt16 Content-Tag
+ 1* sal_uInt16 NumberOfContents
+ 1* sal_uInt32 SizeOfEachContent
NumberOfContents* (
- SizeOfEachContent BYTE Content
+ SizeOfEachContent sal_uInt8 Content
)
[Beispiel]
{
SfxMultiFixRecordWriter aRecord( pStream, MY_TAG_X, MY_VERSION );
- for ( USHORT n = 0; n < Count(); ++n )
+ for ( sal_uInt16 n = 0; n < Count(); ++n )
{
aRecord.NewContent();
*aRecord << aMember1[n];
@@ -484,28 +484,28 @@ class SVL_DLLPUBLIC SfxMultiFixRecordWriter: public SfxSingleRecordWriter
{
protected:
- UINT32 _nContentStartPos; /* Startposition des jeweiligen
+ sal_uInt32 _nContentStartPos; /* Startposition des jeweiligen
Contents - nur bei DBG_UTIL
und f"ur Subklassen */
- UINT32 _nContentSize; // Gr"o\se jedes Contents
- UINT16 _nContentCount; // jeweilige Anzahl der Contents
+ sal_uInt32 _nContentSize; // Gr"o\se jedes Contents
+ sal_uInt16 _nContentCount; // jeweilige Anzahl der Contents
- SfxMultiFixRecordWriter( BYTE nRecordType,
+ SfxMultiFixRecordWriter( sal_uInt8 nRecordType,
SvStream *pStream,
- UINT16 nTag, BYTE nCurVer,
- UINT32 nContentSize );
+ sal_uInt16 nTag, sal_uInt8 nCurVer,
+ sal_uInt32 nContentSize );
public:
SfxMultiFixRecordWriter( SvStream *pStream,
- UINT16 nTag, BYTE nCurVer,
- UINT32 nContentSize );
+ sal_uInt16 nTag, sal_uInt8 nCurVer,
+ sal_uInt32 nContentSize );
inline ~SfxMultiFixRecordWriter();
inline void NewContent();
inline void Reset();
- UINT32 Close( FASTBOOL bSeekToEndOfRec = TRUE );
+ sal_uInt32 Close( FASTBOOL bSeekToEndOfRec = sal_True );
};
//------------------------------------------------------------------------
@@ -531,23 +531,23 @@ class SVL_DLLPUBLIC SfxMultiVarRecordWriter: public SfxMultiFixRecordWriter
[Fileformat]
- 1* BYTE Pre-Tag (==0)
- 1* 3-BYTE OffsetToEndOfRec in Bytes
- 1* BYTE Record-Type (==SFX_FILETYPE_TYPE_VARSIZE)
- 1* BYTE Content-Version
- 1* USHORT Content-Tag
- 1* UINT16 NumberOfContents
- 1* UINT32 OffsetToOfsTable
+ 1* sal_uInt8 Pre-Tag (==0)
+ 1* 3-sal_uInt8 OffsetToEndOfRec in Bytes
+ 1* sal_uInt8 Record-Type (==SFX_FILETYPE_TYPE_VARSIZE)
+ 1* sal_uInt8 Content-Version
+ 1* sal_uInt16 Content-Tag
+ 1* sal_uInt16 NumberOfContents
+ 1* sal_uInt32 OffsetToOfsTable
NumberOfContents* (
- ContentSize* BYTE Content
+ ContentSize* sal_uInt8 Content
)
- NumberOfContents* UINT32 ContentOfs (je per <<8 verschoben)
+ NumberOfContents* sal_uInt32 ContentOfs (je per <<8 verschoben)
[Beispiel]
{
SfxMultiVarRecordWriter aRecord( pStream, MY_TAG_X, MY_VERSION );
- for ( USHORT n = 0; n < Count(); ++n )
+ for ( sal_uInt16 n = 0; n < Count(); ++n )
{
aRecord.NewContent();
*aRecord << aMember1[n];
@@ -559,24 +559,24 @@ class SVL_DLLPUBLIC SfxMultiVarRecordWriter: public SfxMultiFixRecordWriter
{
protected:
SfxUINT32s _aContentOfs;
- USHORT _nContentVer; // nur f"ur SfxMultiMixRecordWriter
+ sal_uInt16 _nContentVer; // nur f"ur SfxMultiMixRecordWriter
- SfxMultiVarRecordWriter( BYTE nRecordType,
+ SfxMultiVarRecordWriter( sal_uInt8 nRecordType,
SvStream *pStream,
- USHORT nRecordTag,
- BYTE nRecordVer );
+ sal_uInt16 nRecordTag,
+ sal_uInt8 nRecordVer );
void FlushContent_Impl();
public:
SfxMultiVarRecordWriter( SvStream *pStream,
- USHORT nRecordTag,
- BYTE nRecordVer );
+ sal_uInt16 nRecordTag,
+ sal_uInt8 nRecordVer );
virtual ~SfxMultiVarRecordWriter();
void NewContent();
- virtual UINT32 Close( FASTBOOL bSeekToEndOfRec = TRUE );
+ virtual sal_uInt32 Close( FASTBOOL bSeekToEndOfRec = sal_True );
};
//------------------------------------------------------------------------
@@ -601,27 +601,27 @@ class SVL_DLLPUBLIC SfxMultiMixRecordWriter: public SfxMultiVarRecordWriter
[Fileformat]
- 1* BYTE Pre-Tag (==0)
- 1* 3-BYTE OffsetToEndOfRec in Bytes
- 1* BYTE Record-Type (==SFX_REC_TYPE_MIXTAGS)
- 1* BYTE Content-Version
- 1* USHORT Record-Tag
- 1* UINT16 NumberOfContents
- 1* UINT32 OffsetToOfsTable
+ 1* sal_uInt8 Pre-Tag (==0)
+ 1* 3-sal_uInt8 OffsetToEndOfRec in Bytes
+ 1* sal_uInt8 Record-Type (==SFX_REC_TYPE_MIXTAGS)
+ 1* sal_uInt8 Content-Version
+ 1* sal_uInt16 Record-Tag
+ 1* sal_uInt16 NumberOfContents
+ 1* sal_uInt32 OffsetToOfsTable
NumberOfContents* (
- 1* USHORT Content-Tag
- ContentSize* BYTE Content
+ 1* sal_uInt16 Content-Tag
+ ContentSize* sal_uInt8 Content
)
- NumberOfContents* UINT32 ( ContentOfs << 8 + Version )
+ NumberOfContents* sal_uInt32 ( ContentOfs << 8 + Version )
*/
{
public:
inline SfxMultiMixRecordWriter( SvStream *pStream,
- USHORT nRecordTag,
- BYTE nRecordVer );
+ sal_uInt16 nRecordTag,
+ sal_uInt8 nRecordVer );
- void NewContent( USHORT nTag, BYTE nVersion );
+ void NewContent( sal_uInt16 nTag, sal_uInt8 nVersion );
// private: geht nicht, da einige Compiler dann auch vorherige privat machen
void NewContent()
@@ -646,7 +646,7 @@ class SVL_DLLPUBLIC SfxMultiRecordReader: public SfxSingleRecordReader
{
SfxMultiRecordReader aRecord( pStream );
- for ( USHORT nRecNo = 0; aRecord.GetContent(); ++nRecNo )
+ for ( sal_uInt16 nRecNo = 0; aRecord.GetContent(); ++nRecNo )
{
switch ( aRecord.GetTag() )
{
@@ -665,30 +665,30 @@ class SVL_DLLPUBLIC SfxMultiRecordReader: public SfxSingleRecordReader
*/
{
- UINT32 _nStartPos; // Start-Position des Records
- UINT32* _pContentOfs; // Offsets der Startpositionen
- UINT32 _nContentSize; // Size jedes einzelnen / Tabellen-Pos
- UINT16 _nContentCount; // Anzahl der Contents im Record
- UINT16 _nContentNo; /* der Index des aktuellen Contents
+ sal_uInt32 _nStartPos; // Start-Position des Records
+ sal_uInt32* _pContentOfs; // Offsets der Startpositionen
+ sal_uInt32 _nContentSize; // Size jedes einzelnen / Tabellen-Pos
+ sal_uInt16 _nContentCount; // Anzahl der Contents im Record
+ sal_uInt16 _nContentNo; /* der Index des aktuellen Contents
enth"alt jeweils den Index des
Contents, der beim n"achsten
GetContent() geholt wird */
- UINT16 _nContentTag; // Art-Kennung des aktuellen Contents
- BYTE _nContentVer; // Versions-Kennung des akt. Contents
+ sal_uInt16 _nContentTag; // Art-Kennung des aktuellen Contents
+ sal_uInt8 _nContentVer; // Versions-Kennung des akt. Contents
FASTBOOL ReadHeader_Impl();
public:
SfxMultiRecordReader( SvStream *pStream );
- SfxMultiRecordReader( SvStream *pStream, UINT16 nTag );
+ SfxMultiRecordReader( SvStream *pStream, sal_uInt16 nTag );
~SfxMultiRecordReader();
FASTBOOL GetContent();
- inline UINT16 GetContentTag();
- inline BYTE GetContentVersion() const;
- inline FASTBOOL HasContentVersion( USHORT nVersion ) const;
+ inline sal_uInt16 GetContentTag();
+ inline sal_uInt8 GetContentVersion() const;
+ inline FASTBOOL HasContentVersion( sal_uInt16 nVersion ) const;
- inline UINT32 ContentCount() const;
+ inline sal_uInt32 ContentCount() const;
};
//=========================================================================
@@ -696,7 +696,7 @@ public:
inline SfxMiniRecordWriter::SfxMiniRecordWriter
(
SvStream* pStream, // Stream, in dem der Record angelegt wird
- BYTE nTag // Record-Tag zwischen 0x01 und 0xFE
+ sal_uInt8 nTag // Record-Tag zwischen 0x01 und 0xFE
)
/* [Beschreibung]
@@ -708,7 +708,7 @@ inline SfxMiniRecordWriter::SfxMiniRecordWriter
: _pStream( pStream ),
_nStartPos( pStream->Tell() ),
- _bHeaderOk(FALSE),
+ _bHeaderOk(sal_False),
_nPreTag( nTag )
{
DBG_ASSERT( _nPreTag != 0xFF, "invalid Tag" );
@@ -722,8 +722,8 @@ inline SfxMiniRecordWriter::SfxMiniRecordWriter
inline SfxMiniRecordWriter::SfxMiniRecordWriter
(
SvStream* pStream, // Stream, in dem der Record angelegt wird
- BYTE nTag, // Record-Tag zwischen 0x01 und 0xFE
- UINT32 nSize // Gr"o\se der Daten in Bytes
+ sal_uInt8 nTag, // Record-Tag zwischen 0x01 und 0xFE
+ sal_uInt32 nSize // Gr"o\se der Daten in Bytes
)
/* [Beschreibung]
@@ -757,7 +757,7 @@ inline SfxMiniRecordWriter::~SfxMiniRecordWriter()
{
// wurde der Header noch nicht geschrieben oder mu\s er gepr"uft werden
- if ( !_bHeaderOk DBG(||TRUE) )
+ if ( !_bHeaderOk DBG(||sal_True) )
Close();
}
@@ -781,7 +781,7 @@ inline SvStream& SfxMiniRecordWriter::operator*() const
inline void SfxMiniRecordWriter::Reset()
{
_pStream->Seek( _nStartPos + SFX_REC_HEADERSIZE_MINI );
- _bHeaderOk = FALSE;
+ _bHeaderOk = sal_False;
}
//=========================================================================
@@ -813,12 +813,12 @@ inline void SfxMiniRecordReader::Skip()
{
_pStream->Seek(_nEofRec);
- _bSkipped = TRUE;
+ _bSkipped = sal_True;
}
//-------------------------------------------------------------------------
-inline BYTE SfxMiniRecordReader::GetTag() const
+inline sal_uInt8 SfxMiniRecordReader::GetTag() const
/* [Beschreibung]
@@ -865,18 +865,18 @@ inline SvStream& SfxMiniRecordReader::operator*() const
//=========================================================================
-inline UINT32 SfxSingleRecordWriter::Close( FASTBOOL bSeekToEndOfRec )
+inline sal_uInt32 SfxSingleRecordWriter::Close( FASTBOOL bSeekToEndOfRec )
// siehe <SfxMiniRecordWriter::Close(FASTBOOL)>
{
- UINT32 nRet = 0;
+ sal_uInt32 nRet = 0;
// wurde der Header noch nicht geschrieben?
if ( !_bHeaderOk )
{
// Basisklassen-Header schreiben
- UINT32 nEndPos = SfxMiniRecordWriter::Close( bSeekToEndOfRec );
+ sal_uInt32 nEndPos = SfxMiniRecordWriter::Close( bSeekToEndOfRec );
// ggf. ans Ende des eigenen Headers seeken oder hinter Rec bleiben
if ( !bSeekToEndOfRec )
@@ -900,12 +900,12 @@ inline void SfxSingleRecordWriter::Reset()
{
_pStream->Seek( _nStartPos + SFX_REC_HEADERSIZE_MINI +
SFX_REC_HEADERSIZE_SINGLE );
- _bHeaderOk = FALSE;
+ _bHeaderOk = sal_False;
}
//=========================================================================
-inline UINT16 SfxSingleRecordReader::GetTag() const
+inline sal_uInt16 SfxSingleRecordReader::GetTag() const
/* [Beschreibung]
@@ -918,7 +918,7 @@ inline UINT16 SfxSingleRecordReader::GetTag() const
//-------------------------------------------------------------------------
-inline BYTE SfxSingleRecordReader::GetVersion() const
+inline sal_uInt8 SfxSingleRecordReader::GetVersion() const
/* [Beschreibung]
@@ -931,7 +931,7 @@ inline BYTE SfxSingleRecordReader::GetVersion() const
//-------------------------------------------------------------------------
-inline FASTBOOL SfxSingleRecordReader::HasVersion( USHORT nVersion ) const
+inline FASTBOOL SfxSingleRecordReader::HasVersion( sal_uInt16 nVersion ) const
/* [Beschreibung]
@@ -973,7 +973,7 @@ inline void SfxMultiFixRecordWriter::NewContent()
{
#ifdef DBG_UTIL
- ULONG nOldStartPos;
+ sal_uLong nOldStartPos;
// Startposition des aktuellen Contents merken - Achtung Subklassen!
nOldStartPos = _nContentStartPos;
#endif
@@ -998,8 +998,8 @@ inline void SfxMultiFixRecordWriter::NewContent()
inline SfxMultiMixRecordWriter::SfxMultiMixRecordWriter
(
SvStream* pStream, // Stream, in dem der Record angelegt wird
- USHORT nRecordTag, // Gesamt-Record-Art-Kennung
- BYTE nRecordVer // Gesamt-Record-Versions-Kennung
+ sal_uInt16 nRecordTag, // Gesamt-Record-Art-Kennung
+ sal_uInt8 nRecordVer // Gesamt-Record-Versions-Kennung
)
/* [Beschreibung]
@@ -1021,12 +1021,12 @@ inline void SfxMultiFixRecordWriter::Reset()
_pStream->Seek( _nStartPos + SFX_REC_HEADERSIZE_MINI +
SFX_REC_HEADERSIZE_SINGLE +
SFX_REC_HEADERSIZE_MULTI );
- _bHeaderOk = FALSE;
+ _bHeaderOk = sal_False;
}
//=========================================================================
-inline UINT16 SfxMultiRecordReader::GetContentTag()
+inline sal_uInt16 SfxMultiRecordReader::GetContentTag()
/* [Beschreibung]
@@ -1040,7 +1040,7 @@ inline UINT16 SfxMultiRecordReader::GetContentTag()
//-------------------------------------------------------------------------
-inline BYTE SfxMultiRecordReader::GetContentVersion() const
+inline sal_uInt8 SfxMultiRecordReader::GetContentVersion() const
/* [Beschreibung]
@@ -1054,7 +1054,7 @@ inline BYTE SfxMultiRecordReader::GetContentVersion() const
//-------------------------------------------------------------------------
-inline FASTBOOL SfxMultiRecordReader::HasContentVersion( USHORT nVersion ) const
+inline FASTBOOL SfxMultiRecordReader::HasContentVersion( sal_uInt16 nVersion ) const
/* [Beschreibung]
@@ -1069,7 +1069,7 @@ inline FASTBOOL SfxMultiRecordReader::HasContentVersion( USHORT nVersion ) const
//-------------------------------------------------------------------------
-inline UINT32 SfxMultiRecordReader::ContentCount() const
+inline sal_uInt32 SfxMultiRecordReader::ContentCount() const
/* [Beschreibung]
diff --git a/svl/inc/svl/flagitem.hxx b/svl/inc/svl/flagitem.hxx
index f7fd52d2e714..ce9d3cb635e7 100644
--- a/svl/inc/svl/flagitem.hxx
+++ b/svl/inc/svl/flagitem.hxx
@@ -34,7 +34,7 @@
class SvStream;
-extern USHORT nSfxFlagVal[16];
+extern sal_uInt16 nSfxFlagVal[16];
// -----------------------------------------------------------------------
@@ -42,24 +42,24 @@ DBG_NAMEEX_VISIBILITY(SfxFlagItem, SVL_DLLPUBLIC)
class SVL_DLLPUBLIC SfxFlagItem: public SfxPoolItem
{
- USHORT nVal;
+ sal_uInt16 nVal;
public:
TYPEINFO();
- SfxFlagItem( USHORT nWhich = 0, USHORT nValue = 0 );
- SfxFlagItem( USHORT nWhich, SvStream & );
+ SfxFlagItem( sal_uInt16 nWhich = 0, sal_uInt16 nValue = 0 );
+ SfxFlagItem( sal_uInt16 nWhich, SvStream & );
SfxFlagItem( const SfxFlagItem& );
~SfxFlagItem() {
DBG_DTOR(SfxFlagItem, 0); }
- virtual BYTE GetFlagCount() const;
- virtual XubString GetFlagText( BYTE nFlag ) const;
+ virtual sal_uInt8 GetFlagCount() const;
+ virtual XubString GetFlagText( sal_uInt8 nFlag ) const;
virtual int operator==( const SfxPoolItem& ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT nVersion) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16 nVersion) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -67,14 +67,14 @@ public:
SfxMapUnit ePresMetric,
XubString &rText,
const IntlWrapper * = 0 ) const;
- USHORT GetValue() const { return nVal; }
- void SetValue( USHORT nNewVal ) {
+ sal_uInt16 GetValue() const { return nVal; }
+ void SetValue( sal_uInt16 nNewVal ) {
DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" );
nVal = nNewVal;
}
- int GetFlag( BYTE nFlag ) const {
+ int GetFlag( sal_uInt8 nFlag ) const {
return ( (nVal & nSfxFlagVal[nFlag]) != 0 ); }
- void SetFlag( BYTE nFlag, int bVal );
+ void SetFlag( sal_uInt8 nFlag, int bVal );
};
#endif
diff --git a/svl/inc/svl/globalnameitem.hxx b/svl/inc/svl/globalnameitem.hxx
index 727f06681b45..897bb09fc8ba 100644
--- a/svl/inc/svl/globalnameitem.hxx
+++ b/svl/inc/svl/globalnameitem.hxx
@@ -42,17 +42,17 @@ class SVL_DLLPUBLIC SfxGlobalNameItem: public SfxPoolItem
public:
TYPEINFO();
SfxGlobalNameItem();
- SfxGlobalNameItem( USHORT nWhich, const SvGlobalName& );
+ SfxGlobalNameItem( sal_uInt16 nWhich, const SvGlobalName& );
~SfxGlobalNameItem();
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
SvGlobalName GetValue() const { return m_aName; }
- virtual BOOL PutValue ( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue ( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 ) const;
};
#endif
diff --git a/svl/inc/svl/hint.hxx b/svl/inc/svl/hint.hxx
index f8f64fbd759b..a523ac68224f 100644
--- a/svl/inc/svl/hint.hxx
+++ b/svl/inc/svl/hint.hxx
@@ -44,26 +44,26 @@ public:
class Visibility Name: public SfxHint \
{ \
Type* pObj; \
- BOOL bIsOwner; \
+ sal_Bool bIsOwner; \
\
public: \
TYPEINFO(); \
- Name( Type* Object, BOOL bOwnedByHint = FALSE ); \
+ Name( Type* Object, sal_Bool bOwnedByHint = sal_False ); \
~Name(); \
\
Type* GetObject() const { return pObj; } \
- BOOL IsOwner() const { return bIsOwner; } \
+ sal_Bool IsOwner() const { return bIsOwner; } \
}
#define IMPL_PTRHINT_AUTODELETE(Name, Type) \
TYPEINIT1(Name, SfxHint); \
- Name::Name( Type* pObject, BOOL bOwnedByHint ) \
+ Name::Name( Type* pObject, sal_Bool bOwnedByHint ) \
{ pObj = pObject; bIsOwner = bOwnedByHint; } \
Name::~Name() { if ( bIsOwner ) delete pObj; }
#define IMPL_PTRHINT(Name, Type) \
TYPEINIT1(Name, SfxHint); \
- Name::Name( Type* pObject, BOOL bOwnedByHint ) \
+ Name::Name( Type* pObject, sal_Bool bOwnedByHint ) \
{ pObj = pObject; bIsOwner = bOwnedByHint; } \
Name::~Name() {}
diff --git a/svl/inc/svl/httpcook.hxx b/svl/inc/svl/httpcook.hxx
index b7b4a3cb0e90..9d2555d77848 100644
--- a/svl/inc/svl/httpcook.hxx
+++ b/svl/inc/svl/httpcook.hxx
@@ -61,8 +61,8 @@ struct CntHTTPCookie
String m_aDomain;
String m_aPath;
DateTime m_aExpires;
- USHORT m_nFlags;
- USHORT m_nPolicy;
+ sal_uInt16 m_nFlags;
+ sal_uInt16 m_nPolicy;
CntHTTPCookie (void)
: m_aExpires (Date(0), Time(0)),
@@ -70,14 +70,14 @@ struct CntHTTPCookie
m_nPolicy (CNTHTTP_COOKIE_POLICY_INTERACTIVE)
{}
- BOOL replaces (const CntHTTPCookie& rOther) const
+ sal_Bool replaces (const CntHTTPCookie& rOther) const
{
return ((m_aDomain == rOther.m_aDomain) &&
(m_aPath == rOther.m_aPath ) &&
(m_aName == rOther.m_aName ) );
}
- BOOL operator== (const CntHTTPCookie& rOther) const
+ sal_Bool operator== (const CntHTTPCookie& rOther) const
{
return ((m_aName == rOther.m_aName ) &&
(m_aValue == rOther.m_aValue ) &&
@@ -136,7 +136,7 @@ struct CntHTTPCookieRequest
const String& m_rURL;
List& m_rCookieList;
CntHTTPCookieRequestType m_eType;
- USHORT m_nRet;
+ sal_uInt16 m_nRet;
CntHTTPCookieRequest (
const String& rURL,
diff --git a/svl/inc/svl/ilstitem.hxx b/svl/inc/svl/ilstitem.hxx
index 6ecc317f7299..eddbe9e0efaa 100644
--- a/svl/inc/svl/ilstitem.hxx
+++ b/svl/inc/svl/ilstitem.hxx
@@ -42,7 +42,7 @@ public:
TYPEINFO();
SfxIntegerListItem();
- SfxIntegerListItem( USHORT nWhich, const SvULongs& rList );
+ SfxIntegerListItem( sal_uInt16 nWhich, const SvULongs& rList );
SfxIntegerListItem( const SfxIntegerListItem& rItem );
~SfxIntegerListItem();
@@ -55,8 +55,8 @@ public:
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual BOOL PutValue ( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue ( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
};
#endif // _SFXINTITEM_HXX
diff --git a/svl/inc/svl/imageitm.hxx b/svl/inc/svl/imageitm.hxx
index 63dc4c470a55..4dff6f5faebe 100644
--- a/svl/inc/svl/imageitm.hxx
+++ b/svl/inc/svl/imageitm.hxx
@@ -39,20 +39,20 @@ class SVL_DLLPUBLIC SfxImageItem : public SfxInt16Item
SfxImageItem_Impl* pImp;
public:
TYPEINFO();
- SfxImageItem( USHORT nWhich = 0, UINT16 nImage = 0 );
- SfxImageItem( USHORT nWhich, const String& rURL );
+ SfxImageItem( sal_uInt16 nWhich = 0, sal_uInt16 nImage = 0 );
+ SfxImageItem( sal_uInt16 nWhich, const String& rURL );
SfxImageItem( const SfxImageItem& );
virtual ~SfxImageItem();
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual int operator==( const SfxPoolItem& ) const;
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
void SetRotation( long nValue );
long GetRotation() const;
- void SetMirrored( BOOL bSet );
- BOOL IsMirrored() const;
+ void SetMirrored( sal_Bool bSet );
+ sal_Bool IsMirrored() const;
String GetURL() const;
};
diff --git a/svl/inc/svl/inethist.hxx b/svl/inc/svl/inethist.hxx
index aceac630924f..65e9f026a072 100644
--- a/svl/inc/svl/inethist.hxx
+++ b/svl/inc/svl/inethist.hxx
@@ -62,7 +62,7 @@ class INetURLHistory : public SfxBroadcaster
static void NormalizeUrl_Impl (INetURLObject &rUrl);
SVL_DLLPUBLIC void PutUrl_Impl (const INetURLObject &rUrl);
- SVL_DLLPUBLIC BOOL QueryUrl_Impl (const INetURLObject &rUrl);
+ SVL_DLLPUBLIC sal_Bool QueryUrl_Impl (const INetURLObject &rUrl);
/** Not implemented.
*/
@@ -76,7 +76,7 @@ public:
/** QueryProtocol.
*/
- BOOL QueryProtocol (INetProtocol eProto) const
+ sal_Bool QueryProtocol (INetProtocol eProto) const
{
return ((eProto == INET_PROT_FILE ) ||
(eProto == INET_PROT_FTP ) ||
@@ -86,22 +86,22 @@ public:
/** QueryUrl.
*/
- BOOL QueryUrl (const INetURLObject &rUrl)
+ sal_Bool QueryUrl (const INetURLObject &rUrl)
{
if (QueryProtocol (rUrl.GetProtocol()))
return QueryUrl_Impl (rUrl);
else
- return FALSE;
+ return sal_False;
}
- BOOL QueryUrl (const String &rUrl)
+ sal_Bool QueryUrl (const String &rUrl)
{
INetProtocol eProto =
INetURLObject::CompareProtocolScheme (rUrl);
if (QueryProtocol (eProto))
return QueryUrl_Impl (INetURLObject (rUrl));
else
- return FALSE;
+ return sal_False;
}
/** PutUrl.
diff --git a/svl/inc/svl/instrm.hxx b/svl/inc/svl/instrm.hxx
index d7585c13c3b7..124c80a21630 100644
--- a/svl/inc/svl/instrm.hxx
+++ b/svl/inc/svl/instrm.hxx
@@ -47,19 +47,19 @@ class SVL_DLLPUBLIC SvInputStream: public SvStream
com::sun::star::uno::Reference< com::sun::star::io::XSeekable >
m_xSeekable;
SvDataPipe_Impl * m_pPipe;
- ULONG m_nSeekedFrom;
+ sal_uLong m_nSeekedFrom;
SVL_DLLPRIVATE bool open();
- SVL_DLLPRIVATE virtual ULONG GetData(void * pData, ULONG nSize);
+ SVL_DLLPRIVATE virtual sal_uLong GetData(void * pData, sal_uLong nSize);
- SVL_DLLPRIVATE virtual ULONG PutData(void const *, ULONG);
+ SVL_DLLPRIVATE virtual sal_uLong PutData(void const *, sal_uLong);
- SVL_DLLPRIVATE virtual ULONG SeekPos(ULONG nPos);
+ SVL_DLLPRIVATE virtual sal_uLong SeekPos(sal_uLong nPos);
SVL_DLLPRIVATE virtual void FlushData();
- SVL_DLLPRIVATE virtual void SetSize(ULONG);
+ SVL_DLLPRIVATE virtual void SetSize(sal_uLong);
public:
SvInputStream(
@@ -69,11 +69,11 @@ public:
virtual ~SvInputStream();
- virtual USHORT IsA() const;
+ virtual sal_uInt16 IsA() const;
- virtual void AddMark(ULONG nPos);
+ virtual void AddMark(sal_uLong nPos);
- virtual void RemoveMark(ULONG nPos);
+ virtual void RemoveMark(sal_uLong nPos);
};
#endif // SVTOOLS_INSTRM_HXX
diff --git a/svl/inc/svl/intitem.hxx b/svl/inc/svl/intitem.hxx
index f0fff8440518..0ee15d1738e5 100644
--- a/svl/inc/svl/intitem.hxx
+++ b/svl/inc/svl/intitem.hxx
@@ -37,13 +37,13 @@ class SVL_DLLPUBLIC SfxByteItem: public CntByteItem
public:
TYPEINFO();
- SfxByteItem(USHORT which = 0, BYTE nValue = 0):
+ SfxByteItem(sal_uInt16 which = 0, sal_uInt8 nValue = 0):
CntByteItem(which, nValue) {}
- SfxByteItem(USHORT which, SvStream & rStream):
+ SfxByteItem(sal_uInt16 which, SvStream & rStream):
CntByteItem(which, rStream) {}
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const
{ return new SfxByteItem(*this); }
@@ -54,16 +54,16 @@ DBG_NAMEEX_VISIBILITY(SfxInt16Item, SVL_DLLPUBLIC)
class SVL_DLLPUBLIC SfxInt16Item: public SfxPoolItem
{
- INT16 m_nValue;
+ sal_Int16 m_nValue;
public:
TYPEINFO();
- SfxInt16Item(USHORT which = 0, INT16 nTheValue = 0):
+ SfxInt16Item(sal_uInt16 which = 0, sal_Int16 nTheValue = 0):
SfxPoolItem(which), m_nValue(nTheValue)
{ DBG_CTOR(SfxInt16Item, 0); }
- SfxInt16Item(USHORT nWhich, SvStream & rStream);
+ SfxInt16Item(sal_uInt16 nWhich, SvStream & rStream);
SfxInt16Item(const SfxInt16Item & rItem):
SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
@@ -82,30 +82,30 @@ public:
const IntlWrapper * = 0)
const;
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 );
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
- virtual SvStream & Store(SvStream & rStream, USHORT) const;
+ virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
- virtual INT16 GetMin() const;
+ virtual sal_Int16 GetMin() const;
- virtual INT16 GetMax() const;
+ virtual sal_Int16 GetMax() const;
virtual SfxFieldUnit GetUnit() const;
- INT16 GetValue() const { return m_nValue; }
+ sal_Int16 GetValue() const { return m_nValue; }
- inline void SetValue(INT16 nTheValue);
+ inline void SetValue(sal_Int16 nTheValue);
};
-inline void SfxInt16Item::SetValue(INT16 nTheValue)
+inline void SfxInt16Item::SetValue(sal_Int16 nTheValue)
{
DBG_ASSERT(GetRefCount() == 0, "SfxInt16Item::SetValue(); Pooled item");
m_nValue = nTheValue;
@@ -117,13 +117,13 @@ class SVL_DLLPUBLIC SfxUInt16Item: public CntUInt16Item
public:
TYPEINFO();
- SfxUInt16Item(USHORT which = 0, UINT16 nValue = 0):
+ SfxUInt16Item(sal_uInt16 which = 0, sal_uInt16 nValue = 0):
CntUInt16Item(which, nValue) {}
- SfxUInt16Item(USHORT which, SvStream & rStream):
+ SfxUInt16Item(sal_uInt16 which, SvStream & rStream):
CntUInt16Item(which, rStream) {}
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const
{ return new SfxUInt16Item(Which(), rStream); }
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const
@@ -136,13 +136,13 @@ class SVL_DLLPUBLIC SfxInt32Item: public CntInt32Item
public:
TYPEINFO();
- SfxInt32Item(USHORT which = 0, INT32 nValue = 0):
+ SfxInt32Item(sal_uInt16 which = 0, sal_Int32 nValue = 0):
CntInt32Item(which, nValue) {}
- SfxInt32Item(USHORT which, SvStream & rStream):
+ SfxInt32Item(sal_uInt16 which, SvStream & rStream):
CntInt32Item(which, rStream) {}
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const
{ return new SfxInt32Item(Which(), rStream); }
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const
@@ -156,13 +156,13 @@ class SVL_DLLPUBLIC SfxUInt32Item: public CntUInt32Item
public:
TYPEINFO();
- SfxUInt32Item(USHORT which = 0, UINT32 nValue = 0):
+ SfxUInt32Item(sal_uInt16 which = 0, sal_uInt32 nValue = 0):
CntUInt32Item(which, nValue) {}
- SfxUInt32Item(USHORT which, SvStream & rStream):
+ SfxUInt32Item(sal_uInt16 which, SvStream & rStream):
CntUInt32Item(which, rStream) {}
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const
{ return new SfxUInt32Item(Which(), rStream); }
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const
diff --git a/svl/inc/svl/itemiter.hxx b/svl/inc/svl/itemiter.hxx
index f80031871caf..db3f8d4cea8d 100644
--- a/svl/inc/svl/itemiter.hxx
+++ b/svl/inc/svl/itemiter.hxx
@@ -39,7 +39,7 @@ class SVL_DLLPUBLIC SfxItemIter
{
// Item-Feld - Start & Ende
const SfxItemSet& _rSet;
- USHORT _nStt, _nEnd, _nAkt;
+ sal_uInt16 _nStt, _nEnd, _nAkt;
public:
SfxItemIter( const SfxItemSet& rSet );
@@ -57,12 +57,12 @@ public:
const SfxPoolItem* NextItem();
const SfxPoolItem* PrevItem();
- BOOL IsAtStart() const { return _nAkt == _nStt; }
- BOOL IsAtEnd() const { return _nAkt == _nEnd; }
+ sal_Bool IsAtStart() const { return _nAkt == _nStt; }
+ sal_Bool IsAtEnd() const { return _nAkt == _nEnd; }
- USHORT GetCurPos() const { return _nAkt; }
- USHORT GetFirstPos() const { return _nStt; }
- USHORT GetLastPos() const { return _nEnd; }
+ sal_uInt16 GetCurPos() const { return _nAkt; }
+ sal_uInt16 GetFirstPos() const { return _nStt; }
+ sal_uInt16 GetLastPos() const { return _nEnd; }
};
#endif
diff --git a/svl/inc/svl/itempool.hxx b/svl/inc/svl/itempool.hxx
index daaa2b481ba3..735f9b1162aa 100644
--- a/svl/inc/svl/itempool.hxx
+++ b/svl/inc/svl/itempool.hxx
@@ -70,8 +70,8 @@ DBG_NAMEEX(SfxItemPool)
struct SfxItemInfo
{
- USHORT _nSID;
- USHORT _nFlags;
+ sal_uInt16 _nSID;
+ sal_uInt16 _nFlags;
};
//====================================================================
@@ -104,23 +104,23 @@ class SVL_DLLPUBLIC SfxItemPool
*/
{
- SVL_DLLPRIVATE void readTheItems(SvStream & rStream, sal_uInt32 nCount, USHORT nVersion,
+ SVL_DLLPRIVATE void readTheItems(SvStream & rStream, sal_uInt32 nCount, sal_uInt16 nVersion,
SfxPoolItem * pDefItem, SfxPoolItemArray_Impl ** pArr);
UniString aName;
- USHORT nStart, nEnd;
- USHORT _nFileFormatVersion;
+ sal_uInt16 nStart, nEnd;
+ sal_uInt16 _nFileFormatVersion;
#ifdef TF_POOLABLE
const SfxItemInfo* pItemInfos;
#else
- USHORT* pSlotIds;
+ sal_uInt16* pSlotIds;
#endif
SfxItemPool_Impl* pImp;
SfxPoolItem** ppStaticDefaults;
SfxPoolItem** ppPoolDefaults;
SfxItemPool* pSecondary;
SfxItemPool* pMaster;
- USHORT* _pPoolRanges;
+ sal_uInt16* _pPoolRanges;
FASTBOOL bPersistentRefCounts;
private:
@@ -137,16 +137,16 @@ public:
friend class SfxPoolWhichMap;
private:
- inline USHORT GetIndex_Impl(USHORT nWhich) const;
- inline USHORT GetSize_Impl() const { return nEnd - nStart + 1; }
+ inline sal_uInt16 GetIndex_Impl(sal_uInt16 nWhich) const;
+ inline sal_uInt16 GetSize_Impl() const { return nEnd - nStart + 1; }
SVL_DLLPRIVATE SvStream& Load1_Impl( SvStream &rStream );
- SVL_DLLPRIVATE FASTBOOL IsItemFlag_Impl( USHORT nWhich, USHORT nFlag ) const;
+ SVL_DLLPRIVATE FASTBOOL IsItemFlag_Impl( sal_uInt16 nWhich, sal_uInt16 nFlag ) const;
public:
// fuer dflt. SfxItemSet::CTOR, setze dflt. WhichRanges
- void FillItemIdRanges_Impl( USHORT*& pWhichRanges ) const;
- const USHORT* GetFrozenIdRanges() const
+ void FillItemIdRanges_Impl( sal_uInt16*& pWhichRanges ) const;
+ const sal_uInt16* GetFrozenIdRanges() const
{ return _pPoolRanges; }
FASTBOOL IsVer2_Impl() const;
@@ -154,23 +154,23 @@ public:
//---------------------------------------------------------------------
protected:
- static inline void SetRefCount( SfxPoolItem& rItem, ULONG n );
- static inline ULONG AddRef( const SfxPoolItem& rItem, ULONG n = 1 );
- static inline ULONG ReleaseRef( const SfxPoolItem& rItem, ULONG n = 1);
+ static inline void SetRefCount( SfxPoolItem& rItem, sal_uLong n );
+ static inline sal_uLong AddRef( const SfxPoolItem& rItem, sal_uLong n = 1 );
+ static inline sal_uLong ReleaseRef( const SfxPoolItem& rItem, sal_uLong n = 1);
public:
SfxItemPool( const SfxItemPool &rPool,
- BOOL bCloneStaticDefaults = FALSE );
+ sal_Bool bCloneStaticDefaults = sal_False );
SfxItemPool( const UniString &rName,
- USHORT nStart, USHORT nEnd,
+ sal_uInt16 nStart, sal_uInt16 nEnd,
#ifdef TF_POOLABLE
const SfxItemInfo *pItemInfos,
#endif
SfxPoolItem **pDefaults = 0,
#ifndef TF_POOLABLE
- USHORT *pSlotIds = 0,
+ sal_uInt16 *pSlotIds = 0,
#endif
- FASTBOOL bLoadRefCounts = TRUE );
+ FASTBOOL bLoadRefCounts = sal_True );
protected:
virtual ~SfxItemPool();
public:
@@ -179,14 +179,14 @@ public:
SfxBroadcaster& BC();
void SetPoolDefaultItem( const SfxPoolItem& );
- const SfxPoolItem* GetPoolDefaultItem( USHORT nWhich ) const;
- void ResetPoolDefaultItem( USHORT nWhich );
+ const SfxPoolItem* GetPoolDefaultItem( sal_uInt16 nWhich ) const;
+ void ResetPoolDefaultItem( sal_uInt16 nWhich );
void SetDefaults( SfxPoolItem **pDefaults );
- void ReleaseDefaults( BOOL bDelete = FALSE );
- static void ReleaseDefaults( SfxPoolItem **pDefaults, USHORT nCount, BOOL bDelete = FALSE );
+ void ReleaseDefaults( sal_Bool bDelete = sal_False );
+ static void ReleaseDefaults( SfxPoolItem **pDefaults, sal_uInt16 nCount, sal_Bool bDelete = sal_False );
- virtual SfxMapUnit GetMetric( USHORT nWhich ) const;
+ virtual SfxMapUnit GetMetric( sal_uInt16 nWhich ) const;
void SetDefaultMetric( SfxMapUnit eNewMetric );
virtual SfxItemPresentation GetPresentation( const SfxPoolItem& rItem,
SfxItemPresentation ePresentation,
@@ -197,22 +197,22 @@ public:
virtual SfxItemPool* Clone() const;
UniString const & GetName() const { return aName; }
- virtual const SfxPoolItem& Put( const SfxPoolItem&, USHORT nWhich = 0 );
+ virtual const SfxPoolItem& Put( const SfxPoolItem&, sal_uInt16 nWhich = 0 );
virtual void Remove( const SfxPoolItem& );
- virtual const SfxPoolItem& GetDefaultItem( USHORT nWhich ) const;
+ virtual const SfxPoolItem& GetDefaultItem( sal_uInt16 nWhich ) const;
const SfxPoolItem* LoadItem( SvStream &rStream,
- FASTBOOL bDirect = FALSE,
+ FASTBOOL bDirect = sal_False,
const SfxItemPool *pRefPool = 0 );
FASTBOOL StoreItem( SvStream &rStream,
const SfxPoolItem &rItem,
- FASTBOOL bDirect = FALSE ) const;
+ FASTBOOL bDirect = sal_False ) const;
sal_uInt32 GetSurrogate(const SfxPoolItem *) const;
- const SfxPoolItem * GetItem2(USHORT nWhich, sal_uInt32 nSurrogate) const;
- sal_uInt32 GetItemCount2(USHORT nWhich) const;
+ const SfxPoolItem * GetItem2(sal_uInt16 nWhich, sal_uInt32 nSurrogate) const;
+ sal_uInt32 GetItemCount2(sal_uInt16 nWhich) const;
const SfxPoolItem* LoadSurrogate(SvStream& rStream,
- USHORT &rWhich, USHORT nSlotId,
+ sal_uInt16 &rWhich, sal_uInt16 nSlotId,
const SfxItemPool* pRefPool = 0 );
FASTBOOL StoreSurrogate(SvStream& rStream,
const SfxPoolItem *pItem ) const;
@@ -223,14 +223,14 @@ public:
return bPersistentRefCounts; }
void LoadCompleted();
- USHORT GetFirstWhich() const { return nStart; }
- USHORT GetLastWhich() const { return nEnd; }
- FASTBOOL IsInRange( USHORT nWhich ) const {
+ sal_uInt16 GetFirstWhich() const { return nStart; }
+ sal_uInt16 GetLastWhich() const { return nEnd; }
+ FASTBOOL IsInRange( sal_uInt16 nWhich ) const {
return nWhich >= nStart &&
nWhich <= nEnd; }
- FASTBOOL IsInVersionsRange( USHORT nWhich ) const;
- FASTBOOL IsInStoringRange( USHORT nWhich ) const;
- void SetStoringRange( USHORT nFrom, USHORT nTo );
+ FASTBOOL IsInVersionsRange( sal_uInt16 nWhich ) const;
+ FASTBOOL IsInStoringRange( sal_uInt16 nWhich ) const;
+ void SetStoringRange( sal_uInt16 nFrom, sal_uInt16 nTo );
void SetSecondaryPool( SfxItemPool *pPool );
SfxItemPool* GetSecondaryPool() const {
return pSecondary; }
@@ -242,35 +242,35 @@ public:
void Delete();
#ifdef TF_POOLABLE
- FASTBOOL IsItemFlag( USHORT nWhich, USHORT nFlag ) const;
- FASTBOOL IsItemFlag( const SfxPoolItem &rItem, USHORT nFlag ) const
+ FASTBOOL IsItemFlag( sal_uInt16 nWhich, sal_uInt16 nFlag ) const;
+ FASTBOOL IsItemFlag( const SfxPoolItem &rItem, sal_uInt16 nFlag ) const
{ return IsItemFlag( rItem.Which(), nFlag ); }
void SetItemInfos( const SfxItemInfo *pInfos )
{ pItemInfos = pInfos; }
#else
int HasMap() const { return 0 != pSlotIds; }
- void SetMap( USHORT *pNewSlotIds )
+ void SetMap( sal_uInt16 *pNewSlotIds )
{ pSlotIds = pNewSlotIds; }
#endif
- USHORT GetWhich( USHORT nSlot, BOOL bDeep = TRUE ) const;
- USHORT GetSlotId( USHORT nWhich, BOOL bDeep = TRUE ) const;
- USHORT GetTrueWhich( USHORT nSlot, BOOL bDeep = TRUE ) const;
- USHORT GetTrueSlotId( USHORT nWhich, BOOL bDeep = TRUE ) const;
-
- void SetVersionMap( USHORT nVer,
- USHORT nOldStart, USHORT nOldEnd,
- USHORT *pWhichIdTab );
- USHORT GetNewWhich( USHORT nOldWhich ) const;
- USHORT GetVersion() const;
- USHORT GetFileFormatVersion() const
+ sal_uInt16 GetWhich( sal_uInt16 nSlot, sal_Bool bDeep = sal_True ) const;
+ sal_uInt16 GetSlotId( sal_uInt16 nWhich, sal_Bool bDeep = sal_True ) const;
+ sal_uInt16 GetTrueWhich( sal_uInt16 nSlot, sal_Bool bDeep = sal_True ) const;
+ sal_uInt16 GetTrueSlotId( sal_uInt16 nWhich, sal_Bool bDeep = sal_True ) const;
+
+ void SetVersionMap( sal_uInt16 nVer,
+ sal_uInt16 nOldStart, sal_uInt16 nOldEnd,
+ sal_uInt16 *pWhichIdTab );
+ sal_uInt16 GetNewWhich( sal_uInt16 nOldWhich ) const;
+ sal_uInt16 GetVersion() const;
+ sal_uInt16 GetFileFormatVersion() const
{ return _nFileFormatVersion; }
- void SetFileFormatVersion( USHORT nFileFormatVersion );
- USHORT GetLoadingVersion() const;
+ void SetFileFormatVersion( sal_uInt16 nFileFormatVersion );
+ sal_uInt16 GetLoadingVersion() const;
FASTBOOL IsCurrentVersionLoading() const;
- static int IsWhich(USHORT nId) {
+ static int IsWhich(sal_uInt16 nId) {
return nId && nId <= SFX_WHICH_MAX; }
- static int IsSlot(USHORT nId) {
+ static int IsSlot(sal_uInt16 nId) {
return nId && nId > SFX_WHICH_MAX; }
static const SfxItemPool* GetStoringPool();
@@ -283,19 +283,19 @@ private:
// --------------- Inline Implementierungen ------------------------------
// nur der Pool darf den Referenz-Zaehler manipulieren !!!
-inline void SfxItemPool::SetRefCount( SfxPoolItem& rItem, ULONG n )
+inline void SfxItemPool::SetRefCount( SfxPoolItem& rItem, sal_uLong n )
{
rItem.SetRefCount(n);
}
// nur der Pool darf den Referenz-Zaehler manipulieren !!!
-inline ULONG SfxItemPool::AddRef( const SfxPoolItem& rItem, ULONG n )
+inline sal_uLong SfxItemPool::AddRef( const SfxPoolItem& rItem, sal_uLong n )
{
return rItem.AddRef(n);
}
// nur der Pool darf den Referenz-Zaehler manipulieren !!!
-inline ULONG SfxItemPool::ReleaseRef( const SfxPoolItem& rItem, ULONG n )
+inline sal_uLong SfxItemPool::ReleaseRef( const SfxPoolItem& rItem, sal_uLong n )
{
return rItem.ReleaseRef(n);
}
diff --git a/svl/inc/svl/itemprop.hxx b/svl/inc/svl/itemprop.hxx
index 3a993b47ed47..c755f6e93f34 100644
--- a/svl/inc/svl/itemprop.hxx
+++ b/svl/inc/svl/itemprop.hxx
@@ -44,20 +44,20 @@
struct SfxItemPropertyMapEntry
{
const char* pName;
- USHORT nNameLen;
- USHORT nWID;
+ sal_uInt16 nNameLen;
+ sal_uInt16 nWID;
const com::sun::star::uno::Type* pType;
long nFlags;
- BYTE nMemberId;
+ sal_uInt8 nMemberId;
};
struct SfxItemPropertySimpleEntry
{
- USHORT nWID;
+ sal_uInt16 nWID;
const com::sun::star::uno::Type* pType;
long nFlags;
- BYTE nMemberId;
+ sal_uInt8 nMemberId;
SfxItemPropertySimpleEntry() :
nWID( 0 ),
@@ -65,8 +65,8 @@ struct SfxItemPropertySimpleEntry
nFlags( 0 ),
nMemberId( 0 ){}
- SfxItemPropertySimpleEntry(USHORT _nWID, const com::sun::star::uno::Type* _pType,
- long _nFlags, BYTE _nMemberId) :
+ SfxItemPropertySimpleEntry(sal_uInt16 _nWID, const com::sun::star::uno::Type* _pType,
+ long _nFlags, sal_uInt8 _nMemberId) :
nWID( _nWID ),
pType( _pType ),
nFlags( _nFlags ),
@@ -116,7 +116,7 @@ class SVL_DLLPUBLIC SfxItemPropertySet
SfxItemPropertyMap m_aMap;
mutable com::sun::star::uno::Reference<com::sun::star::beans::XPropertySetInfo> m_xInfo;
protected:
- virtual BOOL FillItem(SfxItemSet& rSet, USHORT nWhich, BOOL bGetProperty) const;
+ virtual sal_Bool FillItem(SfxItemSet& rSet, sal_uInt16 nWhich, sal_Bool bGetProperty) const;
public:
SfxItemPropertySet( const SfxItemPropertyMapEntry *pMap ) :
diff --git a/svl/inc/svl/itemset.hxx b/svl/inc/svl/itemset.hxx
index 30c4cc411fad..7e6429ca37ab 100644
--- a/svl/inc/svl/itemset.hxx
+++ b/svl/inc/svl/itemset.hxx
@@ -50,8 +50,8 @@ typedef SfxPoolItem const** SfxItemArray;
#ifndef DBG
#ifdef DBG_UTILx
#define DBG(s) s
-#define _pChildCount(THIS) ( *(USHORT**)SfxPointerServer::GetServer()->GetPointer(THIS) )
-#define _pChildCountCtor ( (*(USHORT**)SfxPointerServer::GetServer()->CreatePointer(this)) = new USHORT )
+#define _pChildCount(THIS) ( *(sal_uInt16**)SfxPointerServer::GetServer()->GetPointer(THIS) )
+#define _pChildCountCtor ( (*(sal_uInt16**)SfxPointerServer::GetServer()->CreatePointer(this)) = new sal_uInt16 )
#define _pChildCountDtor ( SfxPointerServer::GetServer()->ReleasePointer(this) )
#else
#define DBG(s)
@@ -79,8 +79,8 @@ class SVL_DLLPUBLIC SfxItemSet
SfxItemPool* _pPool; // der verwendete Pool
const SfxItemSet* _pParent; // Ableitung
SfxItemArray _aItems; // Item-Feld
- USHORT* _pWhichRanges; // Array von Which-Bereichen
- USHORT _nCount; // Anzahl Items
+ sal_uInt16* _pWhichRanges; // Array von Which-Bereichen
+ sal_uInt16 _nCount; // Anzahl Items
//---------------------------------------------------------------------
#ifndef _SFXITEMS_HXX
@@ -90,9 +90,9 @@ friend class SfxAllItemSet;
friend const char *DbgCheckItemSet( const void* );
private:
- SVL_DLLPRIVATE void InitRanges_Impl(const USHORT *nWhichPairTable);
- SVL_DLLPRIVATE void InitRanges_Impl(va_list pWhich, USHORT n1, USHORT n2, USHORT n3);
- SVL_DLLPRIVATE void InitRanges_Impl(USHORT nWh1, USHORT nWh2);
+ SVL_DLLPRIVATE void InitRanges_Impl(const sal_uInt16 *nWhichPairTable);
+ SVL_DLLPRIVATE void InitRanges_Impl(va_list pWhich, sal_uInt16 n1, sal_uInt16 n2, sal_uInt16 n3);
+ SVL_DLLPRIVATE void InitRanges_Impl(sal_uInt16 nWh1, sal_uInt16 nWh2);
public:
SfxItemArray GetItems_Impl() const { return _aItems; }
@@ -113,64 +113,64 @@ protected:
public:
SfxItemSet( const SfxItemSet& );
- SfxItemSet( SfxItemPool&, BOOL bTotalPoolRanges = FALSE );
- SfxItemSet( SfxItemPool&, USHORT nWhich1, USHORT nWhich2 );
+ SfxItemSet( SfxItemPool&, sal_Bool bTotalPoolRanges = sal_False );
+ SfxItemSet( SfxItemPool&, sal_uInt16 nWhich1, sal_uInt16 nWhich2 );
SfxItemSet( SfxItemPool&, USHORT_ARG nWh1, USHORT_ARG nWh2, USHORT_ARG nNull, ... );
- SfxItemSet( SfxItemPool&, const USHORT* nWhichPairTable );
+ SfxItemSet( SfxItemPool&, const sal_uInt16* nWhichPairTable );
virtual ~SfxItemSet();
- virtual SfxItemSet * Clone(BOOL bItems = TRUE, SfxItemPool *pToPool = 0) const;
+ virtual SfxItemSet * Clone(sal_Bool bItems = sal_True, SfxItemPool *pToPool = 0) const;
// Items erfragen
- USHORT Count() const { return _nCount; }
- USHORT TotalCount() const;
+ sal_uInt16 Count() const { return _nCount; }
+ sal_uInt16 TotalCount() const;
- virtual const SfxPoolItem& Get( USHORT nWhich, BOOL bSrchInParent = TRUE ) const;
- const SfxPoolItem* GetItem( USHORT nWhich, BOOL bSrchInParent = TRUE,
+ virtual const SfxPoolItem& Get( sal_uInt16 nWhich, sal_Bool bSrchInParent = sal_True ) const;
+ const SfxPoolItem* GetItem( sal_uInt16 nWhich, sal_Bool bSrchInParent = sal_True,
TypeId aItemType = 0 ) const;
// Which-Wert des Items an der Position nPos erfragen
- USHORT GetWhichByPos(USHORT nPos) const;
+ sal_uInt16 GetWhichByPos(sal_uInt16 nPos) const;
// Item-Status erfragen
- SfxItemState GetItemState( USHORT nWhich,
- BOOL bSrchInParent = TRUE,
+ SfxItemState GetItemState( sal_uInt16 nWhich,
+ sal_Bool bSrchInParent = sal_True,
const SfxPoolItem **ppItem = 0 ) const;
- virtual void DisableItem(USHORT nWhich);
- virtual void InvalidateItem( USHORT nWhich );
- virtual USHORT ClearItem( USHORT nWhich = 0);
- virtual void ClearInvalidItems( BOOL bHardDefault = FALSE );
+ virtual void DisableItem(sal_uInt16 nWhich);
+ virtual void InvalidateItem( sal_uInt16 nWhich );
+ virtual sal_uInt16 ClearItem( sal_uInt16 nWhich = 0);
+ virtual void ClearInvalidItems( sal_Bool bHardDefault = sal_False );
void InvalidateAllItems(); HACK(via nWhich = 0)
inline void SetParent( const SfxItemSet* pNew );
// Items hinzufuegen, loeschen etc.
- virtual const SfxPoolItem* Put( const SfxPoolItem&, USHORT nWhich );
+ virtual const SfxPoolItem* Put( const SfxPoolItem&, sal_uInt16 nWhich );
const SfxPoolItem* Put( const SfxPoolItem& rItem )
{ return Put(rItem, rItem.Which()); }
virtual int Put( const SfxItemSet&,
- BOOL bInvalidAsDefault = TRUE );
+ sal_Bool bInvalidAsDefault = sal_True );
void PutExtended( const SfxItemSet&,
SfxItemState eDontCareAs = SFX_ITEM_UNKNOWN,
SfxItemState eDefaultAs = SFX_ITEM_UNKNOWN );
- virtual int Set( const SfxItemSet&, BOOL bDeep = TRUE );
+ virtual int Set( const SfxItemSet&, sal_Bool bDeep = sal_True );
virtual void Intersect( const SfxItemSet& rSet );
- virtual void MergeValues( const SfxItemSet& rSet, BOOL bOverwriteDefaults = FALSE );
+ virtual void MergeValues( const SfxItemSet& rSet, sal_Bool bOverwriteDefaults = sal_False );
virtual void Differentiate( const SfxItemSet& rSet );
- virtual void MergeValue( const SfxPoolItem& rItem, BOOL bOverwriteDefaults = FALSE );
+ virtual void MergeValue( const SfxPoolItem& rItem, sal_Bool bOverwriteDefaults = sal_False );
SfxItemPool* GetPool() const { return _pPool; }
- const USHORT* GetRanges() const { return _pWhichRanges; }
- void SetRanges( const USHORT *pRanges );
- void MergeRange( USHORT nFrom, USHORT nTo );
+ const sal_uInt16* GetRanges() const { return _pWhichRanges; }
+ void SetRanges( const sal_uInt16 *pRanges );
+ void MergeRange( sal_uInt16 nFrom, sal_uInt16 nTo );
const SfxItemSet* GetParent() const { return _pParent; }
- virtual SvStream & Load( SvStream &, FASTBOOL bDirect = FALSE,
+ virtual SvStream & Load( SvStream &, FASTBOOL bDirect = sal_False,
const SfxItemPool *pRefPool = 0 );
- virtual SvStream & Store( SvStream &, FASTBOOL bDirect = FALSE ) const;
+ virtual SvStream & Store( SvStream &, FASTBOOL bDirect = sal_False ) const;
virtual int operator==(const SfxItemSet &) const;
};
@@ -194,19 +194,19 @@ class SVL_DLLPUBLIC SfxAllItemSet: public SfxItemSet
{
SfxVoidItem aDefault;
- USHORT nFree;
+ sal_uInt16 nFree;
public:
SfxAllItemSet( SfxItemPool &rPool );
SfxAllItemSet( const SfxItemSet & );
SfxAllItemSet( const SfxAllItemSet & );
- virtual SfxItemSet * Clone( BOOL bItems = TRUE, SfxItemPool *pToPool = 0 ) const;
- virtual const SfxPoolItem* Put( const SfxPoolItem&, USHORT nWhich );
+ virtual SfxItemSet * Clone( sal_Bool bItems = sal_True, SfxItemPool *pToPool = 0 ) const;
+ virtual const SfxPoolItem* Put( const SfxPoolItem&, sal_uInt16 nWhich );
const SfxPoolItem* Put( const SfxPoolItem& rItem )
{ return Put(rItem, rItem.Which()); }
virtual int Put( const SfxItemSet&,
- BOOL bInvalidAsDefault = TRUE );
+ sal_Bool bInvalidAsDefault = sal_True );
};
#endif // #ifndef _SFXITEMSET_HXX
diff --git a/svl/inc/svl/lckbitem.hxx b/svl/inc/svl/lckbitem.hxx
index 2204a57c17d4..6535264eeb78 100644
--- a/svl/inc/svl/lckbitem.hxx
+++ b/svl/inc/svl/lckbitem.hxx
@@ -42,23 +42,23 @@ class SVL_DLLPUBLIC SfxLockBytesItem : public SfxPoolItem
public:
TYPEINFO();
SfxLockBytesItem();
- SfxLockBytesItem( USHORT nWhich,
+ SfxLockBytesItem( sal_uInt16 nWhich,
SvLockBytes *pLockBytes );
- SfxLockBytesItem( USHORT nWhich, SvStream & );
+ SfxLockBytesItem( sal_uInt16 nWhich, SvStream & );
SfxLockBytesItem( const SfxLockBytesItem& );
~SfxLockBytesItem();
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT nItemVersion) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16 nItemVersion) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const;
SvLockBytes* GetValue() const { return _xVal; }
- virtual BOOL PutValue ( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue ( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 ) const;
};
#endif
diff --git a/svl/inc/svl/listener.hxx b/svl/inc/svl/listener.hxx
index 3107f5ceee56..e3bdea45169e 100644
--- a/svl/inc/svl/listener.hxx
+++ b/svl/inc/svl/listener.hxx
@@ -50,12 +50,12 @@ public:
SvtListener( const SvtListener &rCopy );
virtual ~SvtListener();
- BOOL StartListening( SvtBroadcaster& rBroadcaster );
- BOOL EndListening( SvtBroadcaster& rBroadcaster );
+ sal_Bool StartListening( SvtBroadcaster& rBroadcaster );
+ sal_Bool EndListening( SvtBroadcaster& rBroadcaster );
void EndListeningAll();
- BOOL IsListening( SvtBroadcaster& rBroadcaster ) const;
+ sal_Bool IsListening( SvtBroadcaster& rBroadcaster ) const;
- BOOL HasBroadcaster() const { return 0 != pBrdCastLst; }
+ sal_Bool HasBroadcaster() const { return 0 != pBrdCastLst; }
virtual void Notify( SvtBroadcaster& rBC, const SfxHint& rHint );
};
diff --git a/svl/inc/svl/lngmisc.hxx b/svl/inc/svl/lngmisc.hxx
index 5143d147227d..9dbe2d4740d0 100644
--- a/svl/inc/svl/lngmisc.hxx
+++ b/svl/inc/svl/lngmisc.hxx
@@ -45,29 +45,29 @@
namespace linguistic
{
-inline BOOL IsHyphen( sal_Unicode cChar )
+inline sal_Bool IsHyphen( sal_Unicode cChar )
{
return cChar == SVT_SOFT_HYPHEN || cChar == SVT_HARD_HYPHEN;
}
-inline BOOL IsControlChar( sal_Unicode cChar )
+inline sal_Bool IsControlChar( sal_Unicode cChar )
{
return cChar < (sal_Unicode) ' ';
}
-inline BOOL HasHyphens( const rtl::OUString &rTxt )
+inline sal_Bool HasHyphens( const rtl::OUString &rTxt )
{
return rTxt.indexOf( SVT_SOFT_HYPHEN ) != -1 ||
rTxt.indexOf( SVT_HARD_HYPHEN ) != -1;
}
-SVL_DLLPUBLIC INT32 GetNumControlChars( const rtl::OUString &rTxt );
-SVL_DLLPUBLIC BOOL RemoveHyphens( rtl::OUString &rTxt );
-SVL_DLLPUBLIC BOOL RemoveControlChars( rtl::OUString &rTxt );
+SVL_DLLPUBLIC sal_Int32 GetNumControlChars( const rtl::OUString &rTxt );
+SVL_DLLPUBLIC sal_Bool RemoveHyphens( rtl::OUString &rTxt );
+SVL_DLLPUBLIC sal_Bool RemoveControlChars( rtl::OUString &rTxt );
-SVL_DLLPUBLIC BOOL ReplaceControlChars( rtl::OUString &rTxt, sal_Char aRplcChar = ' ' );
+SVL_DLLPUBLIC sal_Bool ReplaceControlChars( rtl::OUString &rTxt, sal_Char aRplcChar = ' ' );
SVL_DLLPUBLIC String GetThesaurusReplaceText( const String &rText );
diff --git a/svl/inc/svl/lstner.hxx b/svl/inc/svl/lstner.hxx
index bc95573228f5..963ab3f2b654 100644
--- a/svl/inc/svl/lstner.hxx
+++ b/svl/inc/svl/lstner.hxx
@@ -57,15 +57,15 @@ public:
SfxListener( const SfxListener &rCopy );
virtual ~SfxListener();
- BOOL StartListening( SfxBroadcaster& rBroadcaster, BOOL bPreventDups = FALSE );
- BOOL EndListening( SfxBroadcaster& rBroadcaster, BOOL bAllDups = FALSE );
- void EndListening( USHORT nNo );
+ sal_Bool StartListening( SfxBroadcaster& rBroadcaster, sal_Bool bPreventDups = sal_False );
+ sal_Bool EndListening( SfxBroadcaster& rBroadcaster, sal_Bool bAllDups = sal_False );
+ void EndListening( sal_uInt16 nNo );
void EndListeningAll();
- BOOL IsListening( SfxBroadcaster& rBroadcaster ) const;
+ sal_Bool IsListening( SfxBroadcaster& rBroadcaster ) const;
- USHORT GetBroadcasterCount() const
+ sal_uInt16 GetBroadcasterCount() const
{ return aBCs.Count(); }
- SfxBroadcaster* GetBroadcasterJOE( USHORT nNo ) const
+ SfxBroadcaster* GetBroadcasterJOE( sal_uInt16 nNo ) const
{ return (SfxBroadcaster*) aBCs.GetObject(nNo); }
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
diff --git a/svl/inc/svl/macitem.hxx b/svl/inc/svl/macitem.hxx
index 48bc55cd1aa0..a82f4d11d58c 100644
--- a/svl/inc/svl/macitem.hxx
+++ b/svl/inc/svl/macitem.hxx
@@ -93,7 +93,7 @@ public:
ScriptType GetScriptType() const { return eType; }
- BOOL HasMacro() const { return aMacName.Len() ? TRUE : FALSE; }
+ sal_Bool HasMacro() const { return aMacName.Len() ? sal_True : sal_False; }
#ifdef SOLAR_JAVA
// JavaScript-Function-Objekt holen
@@ -125,7 +125,7 @@ DECLARE_TABLE( _SvxMacroTableDtor, SvxMacro* )
class SVL_DLLPUBLIC SvxMacroTableDtor : public _SvxMacroTableDtor
{
public:
- inline SvxMacroTableDtor( const USHORT nInitSz = 0, const USHORT nReSz = 1 );
+ inline SvxMacroTableDtor( const sal_uInt16 nInitSz = 0, const sal_uInt16 nReSz = 1 );
inline SvxMacroTableDtor( const SvxMacroTableDtor &rCpy ) : _SvxMacroTableDtor() { *this = rCpy; }
inline ~SvxMacroTableDtor() { DelDtor(); }
SvxMacroTableDtor& operator=( const SvxMacroTableDtor &rCpy );
@@ -133,14 +133,14 @@ public:
// loescht alle Eintraege
void DelDtor();
- SvStream& Read( SvStream &, USHORT nVersion = SVX_MACROTBL_AKTVERSION );
+ SvStream& Read( SvStream &, sal_uInt16 nVersion = SVX_MACROTBL_AKTVERSION );
SvStream& Write( SvStream & ) const;
- USHORT GetVersion() const { return SVX_MACROTBL_AKTVERSION; }
+ sal_uInt16 GetVersion() const { return SVX_MACROTBL_AKTVERSION; }
};
-inline SvxMacroTableDtor::SvxMacroTableDtor( const USHORT nInitSz,
- const USHORT nReSz)
+inline SvxMacroTableDtor::SvxMacroTableDtor( const sal_uInt16 nInitSz,
+ const sal_uInt16 nReSz)
: _SvxMacroTableDtor( nInitSz, nReSz )
{}
@@ -154,7 +154,7 @@ class SVL_DLLPUBLIC SvxMacroItem: public SfxPoolItem
public:
TYPEINFO();
- inline SvxMacroItem ( const USHORT nId /*= ITEMID_MACRO*/ );
+ inline SvxMacroItem ( const sal_uInt16 nId /*= ITEMID_MACRO*/ );
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
@@ -164,17 +164,17 @@ public:
XubString &rText,
const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
- virtual USHORT GetVersion( USHORT nFileFormatVersion ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const;
+ virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const;
inline const SvxMacroTableDtor& GetMacroTable() const { return aMacroTable;}
inline void SetMacroTable( const SvxMacroTableDtor& rTbl ) { aMacroTable = rTbl; }
- inline const SvxMacro& GetMacro( USHORT nEvent ) const;
- inline BOOL HasMacro( USHORT nEvent ) const;
- void SetMacro( USHORT nEvent, const SvxMacro& );
- inline BOOL DelMacro( USHORT nEvent );
+ inline const SvxMacro& GetMacro( sal_uInt16 nEvent ) const;
+ inline sal_Bool HasMacro( sal_uInt16 nEvent ) const;
+ void SetMacro( sal_uInt16 nEvent, const SvxMacro& );
+ inline sal_Bool DelMacro( sal_uInt16 nEvent );
private:
SvxMacroTableDtor aMacroTable;
@@ -183,7 +183,7 @@ private:
SvxMacroItem &operator=( const SvxMacroItem & );
};
-inline SvxMacroItem::SvxMacroItem( const USHORT nId )
+inline SvxMacroItem::SvxMacroItem( const sal_uInt16 nId )
: SfxPoolItem( nId )
{}
inline SvxMacroItem::SvxMacroItem( const SvxMacroItem &rCpy )
@@ -191,15 +191,15 @@ inline SvxMacroItem::SvxMacroItem( const SvxMacroItem &rCpy )
aMacroTable( rCpy.GetMacroTable() )
{}
-inline BOOL SvxMacroItem::HasMacro( USHORT nEvent ) const
+inline sal_Bool SvxMacroItem::HasMacro( sal_uInt16 nEvent ) const
{
return aMacroTable.IsKeyValid( nEvent );
}
-inline const SvxMacro& SvxMacroItem::GetMacro( USHORT nEvent ) const
+inline const SvxMacro& SvxMacroItem::GetMacro( sal_uInt16 nEvent ) const
{
return *(aMacroTable.Get(nEvent));
}
-inline BOOL SvxMacroItem::DelMacro( USHORT nEvent )
+inline sal_Bool SvxMacroItem::DelMacro( sal_uInt16 nEvent )
{
SvxMacro *pMacro = aMacroTable.Remove( nEvent );
delete pMacro;
diff --git a/svl/inc/svl/mailenum.hxx b/svl/inc/svl/mailenum.hxx
index e25fd2cfdcd2..bfce28ed00db 100644
--- a/svl/inc/svl/mailenum.hxx
+++ b/svl/inc/svl/mailenum.hxx
@@ -85,10 +85,10 @@ enum MailAction
// Textformat zum Versenden von Nachrichten ------------------------------
-#define TXTFORMAT_ASCII ((BYTE)0x01)
-#define TXTFORMAT_HTML ((BYTE)0x02)
-#define TXTFORMAT_RTF ((BYTE)0x04)
-#define TXTFORMAT_OFFICE ((BYTE)0x08)
+#define TXTFORMAT_ASCII ((sal_uInt8)0x01)
+#define TXTFORMAT_HTML ((sal_uInt8)0x02)
+#define TXTFORMAT_RTF ((sal_uInt8)0x04)
+#define TXTFORMAT_OFFICE ((sal_uInt8)0x08)
#endif
diff --git a/svl/inc/svl/metitem.hxx b/svl/inc/svl/metitem.hxx
index 5e7e792b61e7..a5eecbebfa61 100644
--- a/svl/inc/svl/metitem.hxx
+++ b/svl/inc/svl/metitem.hxx
@@ -38,8 +38,8 @@ class SVL_DLLPUBLIC SfxMetricItem: public SfxInt32Item
{
public:
TYPEINFO();
- SfxMetricItem( USHORT nWhich = 0, UINT32 nValue = 0 );
- SfxMetricItem( USHORT nWhich, SvStream & );
+ SfxMetricItem( sal_uInt16 nWhich = 0, sal_uInt32 nValue = 0 );
+ SfxMetricItem( sal_uInt16 nWhich, SvStream & );
SfxMetricItem( const SfxMetricItem& );
~SfxMetricItem() {
DBG_DTOR(SfxMetricItem, 0); }
diff --git a/svl/inc/svl/nranges.hxx b/svl/inc/svl/nranges.hxx
index b04f131d6e89..c7ba2029f5a6 100644
--- a/svl/inc/svl/nranges.hxx
+++ b/svl/inc/svl/nranges.hxx
@@ -35,12 +35,12 @@
#ifndef NUMTYPE
-#define NUMTYPE USHORT
+#define NUMTYPE sal_uInt16
#define SfxNumRanges SfxUShortRanges
#include <svl/nranges.hxx>
#undef NUMTYPE
-#define NUMTYPE ULONG
+#define NUMTYPE sal_uLong
#define SfxNumRanges SfxULongRanges
#include <svl/nranges.hxx>
@@ -66,8 +66,8 @@ public:
~SfxNumRanges()
{ delete [] _pRanges; }
- BOOL operator == ( const SfxNumRanges & ) const;
- BOOL operator != ( const SfxNumRanges & rRanges ) const
+ sal_Bool operator == ( const SfxNumRanges & ) const;
+ sal_Bool operator != ( const SfxNumRanges & rRanges ) const
{ return !( *this == rRanges ); }
SfxNumRanges& operator = ( const SfxNumRanges & );
@@ -77,10 +77,10 @@ public:
SfxNumRanges& operator /= ( const SfxNumRanges & );
NUMTYPE Count() const;
- BOOL IsEmpty() const
+ sal_Bool IsEmpty() const
{ return !_pRanges || 0 == *_pRanges; }
- BOOL Contains( NUMTYPE n ) const;
- BOOL Intersects( const SfxNumRanges & ) const;
+ sal_Bool Contains( NUMTYPE n ) const;
+ sal_Bool Intersects( const SfxNumRanges & ) const;
operator const NUMTYPE* () const
{ return _pRanges; }
diff --git a/svl/inc/svl/outstrm.hxx b/svl/inc/svl/outstrm.hxx
index f80f6f2c9616..b48cea2e04da 100644
--- a/svl/inc/svl/outstrm.hxx
+++ b/svl/inc/svl/outstrm.hxx
@@ -42,15 +42,15 @@ class SVL_DLLPUBLIC SvOutputStream: public SvStream
com::sun::star::uno::Reference< com::sun::star::io::XOutputStream >
m_xStream;
- SVL_DLLPRIVATE virtual ULONG GetData(void *, ULONG);
+ SVL_DLLPRIVATE virtual sal_uLong GetData(void *, sal_uLong);
- SVL_DLLPRIVATE virtual ULONG PutData(void const * pData, ULONG nSize);
+ SVL_DLLPRIVATE virtual sal_uLong PutData(void const * pData, sal_uLong nSize);
- SVL_DLLPRIVATE virtual ULONG SeekPos(ULONG);
+ SVL_DLLPRIVATE virtual sal_uLong SeekPos(sal_uLong);
SVL_DLLPRIVATE virtual void FlushData();
- SVL_DLLPRIVATE virtual void SetSize(ULONG);
+ SVL_DLLPRIVATE virtual void SetSize(sal_uLong);
public:
SvOutputStream(com::sun::star::uno::Reference<
@@ -59,7 +59,7 @@ public:
virtual ~SvOutputStream();
- virtual USHORT IsA() const;
+ virtual sal_uInt16 IsA() const;
};
#endif // SVTOOLS_OUTSTRM_HXX
diff --git a/svl/inc/svl/ownlist.hxx b/svl/inc/svl/ownlist.hxx
index 41f6cbff40d1..801441c297a1 100644
--- a/svl/inc/svl/ownlist.hxx
+++ b/svl/inc/svl/ownlist.hxx
@@ -86,10 +86,10 @@ class SVL_DLLPUBLIC SvCommandList
{
PRV_SV_DECL_OWNER_LIST(SvCommandList,SvCommand);
SvCommand & Append( const String & rCommand, const String & rArg );
- BOOL AppendCommands( const String & rCmd, USHORT * pEaten );
+ sal_Bool AppendCommands( const String & rCmd, sal_uInt16 * pEaten );
String GetCommands() const;
- BOOL FillFromSequence( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& );
+ sal_Bool FillFromSequence( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& );
void FillSequence( com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& );
SVL_DLLPUBLIC friend SvStream& operator >> ( SvStream& rStm, SvCommandList & );
diff --git a/svl/inc/svl/poolcach.hxx b/svl/inc/svl/poolcach.hxx
index 78bdca8177e6..182c9739f0cf 100644
--- a/svl/inc/svl/poolcach.hxx
+++ b/svl/inc/svl/poolcach.hxx
@@ -61,7 +61,7 @@ public:
const SfxItemSet *pPutSet );
~SfxItemPoolCache();
- const SfxSetItem& ApplyTo( const SfxSetItem& rSetItem, BOOL bNew = FALSE );
+ const SfxSetItem& ApplyTo( const SfxSetItem& rSetItem, sal_Bool bNew = sal_False );
};
diff --git a/svl/inc/svl/poolitem.hxx b/svl/inc/svl/poolitem.hxx
index d78e32877440..48e5a80166b7 100644
--- a/svl/inc/svl/poolitem.hxx
+++ b/svl/inc/svl/poolitem.hxx
@@ -143,7 +143,7 @@ enum SfxItemPresentation
// -----------------------------------------------------------------------
-typedef USHORT SfxItemState;
+typedef sal_uInt16 SfxItemState;
#define SFX_ITEM_UNKNOWN 0x0000
@@ -183,17 +183,17 @@ friend class SfxItemPoolCache;
friend class SfxItemSet;
friend class SfxVoidItem;
- ULONG nRefCount; // Referenzzaehler
- USHORT nWhich;
- USHORT nKind;
+ sal_uLong nRefCount; // Referenzzaehler
+ sal_uInt16 nWhich;
+ sal_uInt16 nKind;
private:
- inline void SetRefCount( ULONG n );
- inline void SetKind( USHORT n );
+ inline void SetRefCount( sal_uLong n );
+ inline void SetKind( sal_uInt16 n );
public:
- inline ULONG AddRef( ULONG n = 1 ) const;
+ inline sal_uLong AddRef( sal_uLong n = 1 ) const;
private:
- inline ULONG ReleaseRef( ULONG n = 1 ) const;
+ inline sal_uLong ReleaseRef( sal_uLong n = 1 ) const;
SVL_DLLPRIVATE long Delete_Impl(void*);
#if 0
@@ -203,17 +203,17 @@ private:
#endif
protected:
- SfxPoolItem( USHORT nWhich = 0 );
+ SfxPoolItem( sal_uInt16 nWhich = 0 );
SfxPoolItem( const SfxPoolItem& );
public:
TYPEINFO();
virtual ~SfxPoolItem();
- void SetWhich( USHORT nId ) {
+ void SetWhich( sal_uInt16 nId ) {
DBG_CHKTHIS(SfxPoolItem, 0);
nWhich = nId; }
- USHORT Which() const {
+ sal_uInt16 Which() const {
DBG_CHKTHIS(SfxPoolItem, 0);
return nWhich; }
virtual int operator==( const SfxPoolItem& ) const = 0;
@@ -228,19 +228,19 @@ public:
XubString &rText,
const IntlWrapper * pIntlWrapper = 0 ) const;
- virtual USHORT GetVersion( USHORT nFileFormatVersion ) const;
+ virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const;
virtual int ScaleMetrics( long lMult, long lDiv );
virtual int HasMetrics() const;
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
- virtual SfxPoolItem* Create( SvStream &, USHORT nItemVersion ) const;
- virtual SvStream& Store( SvStream &, USHORT nItemVersion ) const;
+ virtual SfxPoolItem* Create( SvStream &, sal_uInt16 nItemVersion ) const;
+ virtual SvStream& Store( SvStream &, sal_uInt16 nItemVersion ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const = 0;
- ULONG GetRefCount() const { return nRefCount; }
- inline USHORT GetKind() const { return nKind; }
+ sal_uLong GetRefCount() const { return nRefCount; }
+ inline sal_uInt16 GetKind() const { return nKind; }
/** Read in a Unicode string from a streamed byte string representation.
@@ -295,21 +295,21 @@ private:
// -----------------------------------------------------------------------
-inline void SfxPoolItem::SetRefCount( ULONG n )
+inline void SfxPoolItem::SetRefCount( sal_uLong n )
{
DBG_CHKTHIS( SfxPoolItem, 0 );
nRefCount = n;
nKind = 0;
}
-inline void SfxPoolItem::SetKind( USHORT n )
+inline void SfxPoolItem::SetKind( sal_uInt16 n )
{
DBG_CHKTHIS( SfxPoolItem, 0 );
nRefCount = SFX_ITEMS_SPECIAL;
nKind = n;
}
-inline ULONG SfxPoolItem::AddRef( ULONG n ) const
+inline sal_uLong SfxPoolItem::AddRef( sal_uLong n ) const
{
DBG_CHKTHIS( SfxPoolItem, 0 );
DBG_ASSERT( nRefCount <= SFX_ITEMS_MAXREF, "AddRef mit nicht-Pool-Item" );
@@ -317,7 +317,7 @@ inline ULONG SfxPoolItem::AddRef( ULONG n ) const
return ( ((SfxPoolItem *)this)->nRefCount += n );
}
-inline ULONG SfxPoolItem::ReleaseRef( ULONG n ) const
+inline sal_uLong SfxPoolItem::ReleaseRef( sal_uLong n ) const
{
DBG_CHKTHIS( SfxPoolItem, 0 );
DBG_ASSERT( nRefCount <= SFX_ITEMS_MAXREF, "AddRef mit nicht-Pool-Item" );
@@ -360,8 +360,8 @@ class SVL_DLLPUBLIC SfxVoidItem: public SfxPoolItem
SfxVoidItem & operator=( const SfxVoidItem& ); // not implemented.
public:
TYPEINFO();
- SfxVoidItem( USHORT nWhich );
- SfxVoidItem( USHORT nWhich, SvStream & );
+ SfxVoidItem( sal_uInt16 nWhich );
+ SfxVoidItem( sal_uInt16 nWhich, SvStream & );
SfxVoidItem( const SfxVoidItem& );
~SfxVoidItem();
@@ -375,7 +375,7 @@ public:
// von sich selbst eine Kopie erzeugen
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- void SetWhich(USHORT nWh) { nWhich = nWh; }
+ void SetWhich(sal_uInt16 nWh) { nWhich = nWh; }
};
// -----------------------------------------------------------------------
@@ -388,8 +388,8 @@ class SVL_DLLPUBLIC SfxSetItem: public SfxPoolItem
public:
TYPEINFO();
- SfxSetItem( USHORT nWhich, SfxItemSet *pSet );
- SfxSetItem( USHORT nWhich, const SfxItemSet &rSet );
+ SfxSetItem( sal_uInt16 nWhich, SfxItemSet *pSet );
+ SfxSetItem( sal_uInt16 nWhich, const SfxItemSet &rSet );
SfxSetItem( const SfxSetItem&, SfxItemPool *pPool = 0 );
~SfxSetItem();
@@ -403,8 +403,8 @@ public:
// von sich selbst eine Kopie erzeugen
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const = 0;
- virtual SfxPoolItem* Create(SvStream &, USHORT nVersion) const = 0;
- virtual SvStream& Store(SvStream &, USHORT nVer) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16 nVersion) const = 0;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nVer) const;
const SfxItemSet& GetItemSet() const
{ return *pSet; }
@@ -423,7 +423,7 @@ friend class SfxItemSet;
private:
TYPEINFO();
- SfxInvalidItem( USHORT nWhich, const SfxPoolItem &rDefault );
+ SfxInvalidItem( sal_uInt16 nWhich, const SfxPoolItem &rDefault );
SfxInvalidItem( const SfxInvalidItem& );
virtual ~SfxInvalidItem();
@@ -439,8 +439,8 @@ public:
// von sich selbst eine Kopie erzeugen
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT nVersion) const;
- virtual SvStream& Store(SvStream &, USHORT nVer ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16 nVersion) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nVer ) const;
};
#endif /* @@@ NOT USED @@@ */
@@ -449,7 +449,7 @@ public:
class SVL_DLLPUBLIC SfxItemHandle
{
- USHORT *pRef;
+ sal_uInt16 *pRef;
SfxPoolItem *pItem;
public:
SfxItemHandle( SfxPoolItem& );
diff --git a/svl/inc/svl/ptitem.hxx b/svl/inc/svl/ptitem.hxx
index 1911ac997527..c3072acdb933 100644
--- a/svl/inc/svl/ptitem.hxx
+++ b/svl/inc/svl/ptitem.hxx
@@ -44,8 +44,8 @@ class SVL_DLLPUBLIC SfxPointItem: public SfxPoolItem
public:
TYPEINFO();
SfxPointItem();
- SfxPointItem( USHORT nWhich, const Point& rVal );
- SfxPointItem( USHORT nWhich, SvStream & );
+ SfxPointItem( sal_uInt16 nWhich, const Point& rVal );
+ SfxPointItem( sal_uInt16 nWhich, SvStream & );
SfxPointItem( const SfxPointItem& );
~SfxPointItem() {
DBG_DTOR(SfxPointItem, 0); }
@@ -59,8 +59,8 @@ public:
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT nItemVersion) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16 nItemVersion) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
const Point& GetValue() const { return aVal; }
void SetValue( const Point& rNewVal ) {
@@ -68,10 +68,10 @@ public:
aVal = rNewVal;
}
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 );
};
#endif
diff --git a/svl/inc/svl/rectitem.hxx b/svl/inc/svl/rectitem.hxx
index da080ac95e11..b63d06096bd8 100644
--- a/svl/inc/svl/rectitem.hxx
+++ b/svl/inc/svl/rectitem.hxx
@@ -45,8 +45,8 @@ class SVL_DLLPUBLIC SfxRectangleItem: public SfxPoolItem
public:
TYPEINFO();
SfxRectangleItem();
- SfxRectangleItem( USHORT nWhich, const Rectangle& rVal );
- SfxRectangleItem( USHORT nWhich, SvStream & );
+ SfxRectangleItem( sal_uInt16 nWhich, const Rectangle& rVal );
+ SfxRectangleItem( sal_uInt16 nWhich, SvStream & );
SfxRectangleItem( const SfxRectangleItem& );
~SfxRectangleItem() {
DBG_DTOR(SfxRectangleItem, 0); }
@@ -59,18 +59,18 @@ public:
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT nItemVersion) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16 nItemVersion) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
const Rectangle& GetValue() const { return aVal; }
void SetValue( const Rectangle& rNewVal ) {
DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" );
aVal = rNewVal;
}
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 );
};
#endif
diff --git a/svl/inc/svl/rngitem.hxx b/svl/inc/svl/rngitem.hxx
index 890c9d4438c0..320c358f5520 100644
--- a/svl/inc/svl/rngitem.hxx
+++ b/svl/inc/svl/rngitem.hxx
@@ -29,7 +29,7 @@
#ifndef NUMTYPE
-#define NUMTYPE USHORT
+#define NUMTYPE sal_uInt16
#define SfxXRangeItem SfxRangeItem
#define SfxXRangesItem SfxUShortRangesItem
#include <svl/rngitem.hxx>
@@ -38,7 +38,7 @@
#undef SfxXRangesItem
#ifndef _SFXITEMS_HXX
-#define NUMTYPE ULONG
+#define NUMTYPE sal_uLong
#define SfxXRangeItem SfxULongRangeItem
#define SfxXRangesItem SfxULongRangesItem
#include <svl/rngitem.hxx>
@@ -65,8 +65,8 @@ private:
public:
TYPEINFO();
SfxXRangeItem();
- SfxXRangeItem( USHORT nWID, NUMTYPE nFrom, NUMTYPE nTo );
- SfxXRangeItem( USHORT nWID, SvStream &rStream );
+ SfxXRangeItem( sal_uInt16 nWID, NUMTYPE nFrom, NUMTYPE nTo );
+ SfxXRangeItem( sal_uInt16 nWID, SvStream &rStream );
SfxXRangeItem( const SfxXRangeItem& rItem );
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -79,9 +79,9 @@ public:
inline NUMTYPE From() const { return nFrom; }
inline NUMTYPE& To() { return nTo; }
inline NUMTYPE To() const { return nTo; }
- inline BOOL HasRange() const { return nTo>nFrom; }
- virtual SfxPoolItem* Create( SvStream &, USHORT nVersion ) const;
- virtual SvStream& Store( SvStream &, USHORT nItemVersion ) const;
+ inline sal_Bool HasRange() const { return nTo>nFrom; }
+ virtual SfxPoolItem* Create( SvStream &, sal_uInt16 nVersion ) const;
+ virtual SvStream& Store( SvStream &, sal_uInt16 nItemVersion ) const;
};
// -----------------------------------------------------------------------
@@ -94,8 +94,8 @@ private:
public:
TYPEINFO();
SfxXRangesItem();
- SfxXRangesItem( USHORT nWID, const NUMTYPE *pRanges );
- SfxXRangesItem( USHORT nWID, SvStream &rStream );
+ SfxXRangesItem( sal_uInt16 nWID, const NUMTYPE *pRanges );
+ SfxXRangesItem( sal_uInt16 nWID, SvStream &rStream );
SfxXRangesItem( const SfxXRangesItem& rItem );
virtual ~SfxXRangesItem();
virtual int operator==( const SfxPoolItem& ) const;
@@ -106,8 +106,8 @@ public:
const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
inline const NUMTYPE* GetRanges() const { return _pRanges; }
- virtual SfxPoolItem* Create( SvStream &, USHORT nVersion ) const;
- virtual SvStream& Store( SvStream &, USHORT nItemVersion ) const;
+ virtual SfxPoolItem* Create( SvStream &, sal_uInt16 nVersion ) const;
+ virtual SvStream& Store( SvStream &, sal_uInt16 nItemVersion ) const;
};
#endif
diff --git a/svl/inc/svl/sfontitm.hxx b/svl/inc/svl/sfontitm.hxx
index e7a6ecb366d0..3ce183ecbead 100644
--- a/svl/inc/svl/sfontitm.hxx
+++ b/svl/inc/svl/sfontitm.hxx
@@ -62,13 +62,13 @@ class SfxFontItem: public SfxPoolItem
public:
TYPEINFO();
- inline SfxFontItem(USHORT nWhich);
+ inline SfxFontItem(sal_uInt16 nWhich);
virtual int operator ==(const SfxPoolItem & rItem) const;
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
- virtual SvStream & Store(SvStream & rStream, USHORT) const;
+ virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const
{ return new SfxFontItem(*this); }
@@ -142,7 +142,7 @@ public:
inline void setLanguage(LanguageType nTheLanguage);
};
-inline SfxFontItem::SfxFontItem(USHORT which):
+inline SfxFontItem::SfxFontItem(sal_uInt16 which):
SfxPoolItem(which),
m_nCharSet(RTL_TEXTENCODING_DONTKNOW),
m_nLanguage(LANGUAGE_DONTKNOW),
diff --git a/svl/inc/svl/slstitm.hxx b/svl/inc/svl/slstitm.hxx
index 0936524c298a..d3f0249c18ea 100644
--- a/svl/inc/svl/slstitm.hxx
+++ b/svl/inc/svl/slstitm.hxx
@@ -44,8 +44,8 @@ public:
TYPEINFO();
SfxStringListItem();
- SfxStringListItem( USHORT nWhich, const List* pList=NULL );
- SfxStringListItem( USHORT nWhich, SvStream& rStream );
+ SfxStringListItem( sal_uInt16 nWhich, const List* pList=NULL );
+ SfxStringListItem( sal_uInt16 nWhich, SvStream& rStream );
SfxStringListItem( const SfxStringListItem& rItem );
~SfxStringListItem();
@@ -72,13 +72,13 @@ public:
XubString &rText,
const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create( SvStream &, USHORT nVersion ) const;
- virtual SvStream& Store( SvStream &, USHORT nItemVersion ) const;
- void Sort( BOOL bAscending = TRUE, List* pParallelList = 0 );
+ virtual SfxPoolItem* Create( SvStream &, sal_uInt16 nVersion ) const;
+ virtual SvStream& Store( SvStream &, sal_uInt16 nItemVersion ) const;
+ void Sort( sal_Bool bAscending = sal_True, List* pParallelList = 0 );
- virtual BOOL PutValue ( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue ( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 ) const;
};
#endif
diff --git a/svl/inc/svl/smplhint.hxx b/svl/inc/svl/smplhint.hxx
index cf705b41c5ae..9e3e867b1703 100644
--- a/svl/inc/svl/smplhint.hxx
+++ b/svl/inc/svl/smplhint.hxx
@@ -68,11 +68,11 @@
class SVL_DLLPUBLIC SfxSimpleHint: public SfxHint
{
private:
- ULONG nId;
+ sal_uLong nId;
public:
TYPEINFO();
- SfxSimpleHint( ULONG nId );
- ULONG GetId() const { return nId; }
+ SfxSimpleHint( sal_uLong nId );
+ sal_uLong GetId() const { return nId; }
};
//--------------------------------------------------------------------
@@ -84,14 +84,14 @@ public:
\
public: \
TYPEINFO(); \
- Name( USHORT nId, const Type& rObject ); \
+ Name( sal_uInt16 nId, const Type& rObject ); \
~Name(); \
const Type& GetObject() const { return aObj; } \
}
#define IMPL_OBJHINT(Name, Type) \
TYPEINIT1(Name, SfxSimpleHint); \
- Name::Name( USHORT nID, const Type& rObject ): \
+ Name::Name( sal_uInt16 nID, const Type& rObject ): \
SfxSimpleHint( nID ), aObj(rObject) \
{ } \
Name::~Name() {}
diff --git a/svl/inc/svl/srchitem.hxx b/svl/inc/svl/srchitem.hxx
index 3974a8f57b80..8053a204881a 100644
--- a/svl/inc/svl/srchitem.hxx
+++ b/svl/inc/svl/srchitem.hxx
@@ -89,8 +89,8 @@ public:
SvxSearchItem( const SvxSearchItem& rItem );
virtual ~SvxSearchItem();
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
virtual int operator == ( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -234,7 +234,7 @@ sal_Bool SvxSearchItem::IsLEVRelaxed() const
sal_uInt16 SvxSearchItem::GetLEVOther() const
{
- return (INT16) aSearchOpt.changedChars;
+ return (sal_Int16) aSearchOpt.changedChars;
}
void SvxSearchItem::SetLEVOther( sal_uInt16 nVal )
@@ -244,7 +244,7 @@ void SvxSearchItem::SetLEVOther( sal_uInt16 nVal )
sal_uInt16 SvxSearchItem::GetLEVShorter() const
{
- return (INT16) aSearchOpt.insertedChars;
+ return (sal_Int16) aSearchOpt.insertedChars;
}
void SvxSearchItem::SetLEVShorter( sal_uInt16 nVal )
@@ -254,7 +254,7 @@ void SvxSearchItem::SetLEVShorter( sal_uInt16 nVal )
sal_uInt16 SvxSearchItem::GetLEVLonger() const
{
- return (INT16) aSearchOpt.deletedChars;
+ return (sal_Int16) aSearchOpt.deletedChars;
}
void SvxSearchItem::SetLEVLonger( sal_uInt16 nVal )
diff --git a/svl/inc/svl/stritem.hxx b/svl/inc/svl/stritem.hxx
index 5604eb3de6ed..e7885f9065da 100644
--- a/svl/inc/svl/stritem.hxx
+++ b/svl/inc/svl/stritem.hxx
@@ -39,14 +39,14 @@ public:
SfxStringItem() {}
- SfxStringItem(USHORT which, const XubString & rValue):
+ SfxStringItem(sal_uInt16 which, const XubString & rValue):
CntUnencodedStringItem(which, rValue) {}
- SfxStringItem(USHORT nWhich, SvStream & rStream);
+ SfxStringItem(sal_uInt16 nWhich, SvStream & rStream);
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
- virtual SvStream & Store(SvStream & rStream, USHORT) const;
+ virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
};
diff --git a/svl/inc/svl/strmadpt.hxx b/svl/inc/svl/strmadpt.hxx
index 76ecf0223543..936e33071706 100644
--- a/svl/inc/svl/strmadpt.hxx
+++ b/svl/inc/svl/strmadpt.hxx
@@ -51,23 +51,23 @@ public:
rTheOutputStream):
m_xOutputStream(rTheOutputStream), m_nPosition(0) {}
- virtual ErrCode ReadAt(ULONG, void *, ULONG, ULONG *) const;
+ virtual ErrCode ReadAt(sal_uLong, void *, sal_uLong, sal_uLong *) const;
- virtual ErrCode WriteAt(ULONG nPos, const void * pBuffer, ULONG nCount,
- ULONG * pWritten);
+ virtual ErrCode WriteAt(sal_uLong nPos, const void * pBuffer, sal_uLong nCount,
+ sal_uLong * pWritten);
virtual ErrCode Flush() const;
- virtual ErrCode SetSize(ULONG);
+ virtual ErrCode SetSize(sal_uLong);
virtual ErrCode Stat(SvLockBytesStat * pStat, SvLockBytesStatFlag) const;
- virtual ErrCode FillAppend(const void * pBuffer, ULONG nCount,
- ULONG * pWritten);
+ virtual ErrCode FillAppend(const void * pBuffer, sal_uLong nCount,
+ sal_uLong * pWritten);
- virtual ULONG Tell() const;
+ virtual sal_uLong Tell() const;
- virtual ULONG Seek(ULONG);
+ virtual sal_uLong Seek(sal_uLong);
virtual void Terminate();
};
diff --git a/svl/inc/svl/style.hxx b/svl/inc/svl/style.hxx
index b3138309293f..5ae5cb8e673b 100644
--- a/svl/inc/svl/style.hxx
+++ b/svl/inc/svl/style.hxx
@@ -76,7 +76,7 @@ SfxSimpleHint(SFX_HINT_DYING) from:
SfxStyleSheetHint( SFX_STYLESHEET_CREATED, *p ) from:
SfxStyleSheetBasePool::Make( const String& rName,
- SfxStyleFamily eFam, USHORT mask, USHORT nPos)
+ SfxStyleFamily eFam, sal_uInt16 mask, sal_uInt16 nPos)
SfxStyleSheetHint( SFX_STYLESHEET_CHANGED, *pNew ) from:
SfxStyleSheetBasePool::Add( SfxStyleSheetBase& rSheet )
@@ -100,17 +100,17 @@ protected:
rtl::OUString maDisplayName;
String aHelpFile; // Name der Hilfedatei
SfxItemSet* pSet; // ItemSet
- USHORT nMask; // Flags
+ sal_uInt16 nMask; // Flags
- ULONG nHelpId; // Hilfe-ID
+ sal_uLong nHelpId; // Hilfe-ID
- BOOL bMySet; // TRUE: Set loeschen im dtor
+ sal_Bool bMySet; // sal_True: Set loeschen im dtor
SfxStyleSheetBase(); // do not use!
- SfxStyleSheetBase( const UniString&, SfxStyleSheetBasePool&, SfxStyleFamily eFam, USHORT mask );
+ SfxStyleSheetBase( const UniString&, SfxStyleSheetBasePool&, SfxStyleFamily eFam, sal_uInt16 mask );
SfxStyleSheetBase( const SfxStyleSheetBase& );
virtual ~SfxStyleSheetBase();
- virtual void Load( SvStream&, USHORT );
+ virtual void Load( SvStream&, sal_uInt16 );
virtual void Store( SvStream& );
public:
@@ -120,7 +120,7 @@ public:
virtual const UniString& GetName() const;
// sets the internal name of this style
- virtual BOOL SetName( const UniString& );
+ virtual sal_Bool SetName( const UniString& );
/** returns the display name of this style, it is used at the user interface.
If the display name is empty, this method returns the internal name. */
@@ -130,13 +130,13 @@ public:
virtual void SetDisplayName( const rtl::OUString& );
virtual const UniString& GetParent() const;
- virtual BOOL SetParent( const UniString& );
+ virtual sal_Bool SetParent( const UniString& );
virtual const UniString& GetFollow() const;
- virtual BOOL SetFollow( const UniString& );
- virtual BOOL HasFollowSupport() const; // Default TRUE
- virtual BOOL HasParentSupport() const; // Default TRUE
- virtual BOOL HasClearParentSupport() const; // Default FALSE
- virtual BOOL IsUsed() const; // Default TRUE
+ virtual sal_Bool SetFollow( const UniString& );
+ virtual sal_Bool HasFollowSupport() const; // Default sal_True
+ virtual sal_Bool HasParentSupport() const; // Default sal_True
+ virtual sal_Bool HasClearParentSupport() const; // Default sal_False
+ virtual sal_Bool IsUsed() const; // Default sal_True
// Default aus dem Itemset; entweder dem uebergebenen
// oder aus dem per GetItemSet() zurueckgelieferten Set
virtual UniString GetDescription();
@@ -144,16 +144,16 @@ public:
SfxStyleSheetBasePool& GetPool() { return rPool; }
SfxStyleFamily GetFamily() const { return nFamily; }
- USHORT GetMask() const { return nMask; }
- void SetMask( USHORT mask) { nMask = mask; }
- BOOL IsUserDefined() const
- { return BOOL( ( nMask & SFXSTYLEBIT_USERDEF) != 0 ); }
+ sal_uInt16 GetMask() const { return nMask; }
+ void SetMask( sal_uInt16 mask) { nMask = mask; }
+ sal_Bool IsUserDefined() const
+ { return sal_Bool( ( nMask & SFXSTYLEBIT_USERDEF) != 0 ); }
- virtual ULONG GetHelpId( String& rFile );
- virtual void SetHelpId( const String& r, ULONG nId );
+ virtual sal_uLong GetHelpId( String& rFile );
+ virtual void SetHelpId( const String& r, sal_uLong nId );
virtual SfxItemSet& GetItemSet();
- virtual USHORT GetVersion() const;
+ virtual sal_uInt16 GetVersion() const;
};
//=========================================================================
@@ -173,11 +173,11 @@ class SVL_DLLPUBLIC SfxStyleSheetIterator
{
public:
SfxStyleSheetIterator(SfxStyleSheetBasePool *pBase,
- SfxStyleFamily eFam, USHORT n=0xFFFF );
- virtual USHORT GetSearchMask() const;
+ SfxStyleFamily eFam, sal_uInt16 n=0xFFFF );
+ virtual sal_uInt16 GetSearchMask() const;
virtual SfxStyleFamily GetSearchFamily() const;
- virtual USHORT Count();
- virtual SfxStyleSheetBase *operator[](USHORT nIdx);
+ virtual sal_uInt16 Count();
+ virtual SfxStyleSheetBase *operator[](sal_uInt16 nIdx);
virtual SfxStyleSheetBase* First();
virtual SfxStyleSheetBase* Next();
virtual SfxStyleSheetBase* Find(const UniString& rStr);
@@ -187,18 +187,18 @@ protected:
SfxStyleSheetBasePool* pBasePool;
SfxStyleFamily nSearchFamily;
- USHORT nMask;
- BOOL SearchUsed() const { return bSearchUsed; }
+ sal_uInt16 nMask;
+ sal_Bool SearchUsed() const { return bSearchUsed; }
private:
- USHORT GetPos(){return nAktPosition;}
- SVL_DLLPRIVATE BOOL IsTrivialSearch();
- SVL_DLLPRIVATE BOOL DoesStyleMatch(SfxStyleSheetBase *pStyle);
+ sal_uInt16 GetPos(){return nAktPosition;}
+ SVL_DLLPRIVATE sal_Bool IsTrivialSearch();
+ SVL_DLLPRIVATE sal_Bool DoesStyleMatch(SfxStyleSheetBase *pStyle);
void* pImp;
SfxStyleSheetBase* pAktStyle;
- USHORT nAktPosition;
- BOOL bSearchUsed;
+ sal_uInt16 nAktPosition;
+ sal_Bool bSearchUsed;
friend class SfxStyleSheetBasePool;
};
@@ -215,18 +215,18 @@ friend class SfxStyleSheetBase;
SfxStyleSheetBasePool_Impl *pImp;
private:
- SVL_DLLPRIVATE BOOL Load1_Impl( SvStream& );
+ SVL_DLLPRIVATE sal_Bool Load1_Impl( SvStream& );
SVL_DLLPRIVATE SfxStyleSheetIterator& GetIterator_Impl();
protected:
String aAppName;
SfxItemPool& rPool;
SfxStyles aStyles;
SfxStyleFamily nSearchFamily;
- USHORT nMask;
+ sal_uInt16 nMask;
SfxStyleSheetBase& Add( SfxStyleSheetBase& );
- void ChangeParent( const UniString&, const UniString&, BOOL bVirtual = TRUE );
- virtual SfxStyleSheetBase* Create( const UniString&, SfxStyleFamily, USHORT );
+ void ChangeParent( const UniString&, const UniString&, sal_Bool bVirtual = sal_True );
+ virtual SfxStyleSheetBase* Create( const UniString&, SfxStyleFamily, sal_uInt16 );
virtual SfxStyleSheetBase* Create( const SfxStyleSheetBase& );
~SfxStyleSheetBasePool();
@@ -242,14 +242,14 @@ public:
SfxItemPool& GetPool();
const SfxItemPool& GetPool() const;
- virtual SfxStyleSheetIterator* CreateIterator(SfxStyleFamily, USHORT nMask);
- virtual USHORT Count();
- virtual SfxStyleSheetBase* operator[](USHORT nIdx);
+ virtual SfxStyleSheetIterator* CreateIterator(SfxStyleFamily, sal_uInt16 nMask);
+ virtual sal_uInt16 Count();
+ virtual SfxStyleSheetBase* operator[](sal_uInt16 nIdx);
virtual SfxStyleSheetBase& Make(const UniString&,
SfxStyleFamily eFam,
- USHORT nMask = 0xffff ,
- USHORT nPos = 0xffff);
+ sal_uInt16 nMask = 0xffff ,
+ sal_uInt16 nPos = 0xffff);
virtual void Replace(
SfxStyleSheetBase& rSource, SfxStyleSheetBase& rTarget );
@@ -265,21 +265,21 @@ public:
const SfxStyles& GetStyles();
virtual SfxStyleSheetBase* First();
virtual SfxStyleSheetBase* Next();
- virtual SfxStyleSheetBase* Find( const UniString&, SfxStyleFamily eFam, USHORT n=0xFFFF );
+ virtual SfxStyleSheetBase* Find( const UniString&, SfxStyleFamily eFam, sal_uInt16 n=0xFFFF );
- virtual BOOL SetParent(SfxStyleFamily eFam,
+ virtual sal_Bool SetParent(SfxStyleFamily eFam,
const UniString &rStyle,
const UniString &rParent);
SfxStyleSheetBase* Find(const UniString& rStr)
{ return Find(rStr, nSearchFamily, nMask); }
- void SetSearchMask(SfxStyleFamily eFam, USHORT n=0xFFFF );
- USHORT GetSearchMask() const;
+ void SetSearchMask(SfxStyleFamily eFam, sal_uInt16 n=0xFFFF );
+ sal_uInt16 GetSearchMask() const;
SfxStyleFamily GetSearchFamily() const { return nSearchFamily; }
- BOOL Load( SvStream& );
- BOOL Store( SvStream&, BOOL bUsed = TRUE );
+ sal_Bool Load( SvStream& );
+ sal_Bool Store( SvStream&, sal_Bool bUsed = sal_True );
};
//=========================================================================
@@ -290,11 +290,11 @@ class SVL_DLLPUBLIC SfxStyleSheet: public SfxStyleSheetBase,
public:
TYPEINFO();
- SfxStyleSheet( const UniString&, const SfxStyleSheetBasePool&, SfxStyleFamily, USHORT );
+ SfxStyleSheet( const UniString&, const SfxStyleSheetBasePool&, SfxStyleFamily, sal_uInt16 );
SfxStyleSheet( const SfxStyleSheet& );
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
- virtual BOOL SetParent( const UniString& );
+ virtual sal_Bool SetParent( const UniString& );
protected:
SfxStyleSheet(); // do not use!
@@ -307,13 +307,13 @@ class SVL_DLLPUBLIC SfxStyleSheetPool: public SfxStyleSheetBasePool
{
protected:
using SfxStyleSheetBasePool::Create;
- virtual SfxStyleSheetBase* Create(const UniString&, SfxStyleFamily, USHORT mask);
+ virtual SfxStyleSheetBase* Create(const UniString&, SfxStyleFamily, sal_uInt16 mask);
virtual SfxStyleSheetBase* Create(const SfxStyleSheet &);
public:
SfxStyleSheetPool( SfxItemPool const& );
-// virtual BOOL CopyTo(SfxStyleSheetPool &rDest, const String &rSourceName);
+// virtual sal_Bool CopyTo(SfxStyleSheetPool &rDest, const String &rSourceName);
};
//=========================================================================
@@ -333,13 +333,13 @@ public:
class SVL_DLLPUBLIC SfxStyleSheetPoolHint : public SfxHint
{
- USHORT nHint;
+ sal_uInt16 nHint;
public:
TYPEINFO();
- SfxStyleSheetPoolHint(USHORT nArgHint) : nHint(nArgHint){}
- USHORT GetHint() const
+ SfxStyleSheetPoolHint(sal_uInt16 nArgHint) : nHint(nArgHint){}
+ sal_uInt16 GetHint() const
{ return nHint; }
};
@@ -348,16 +348,16 @@ public:
class SVL_DLLPUBLIC SfxStyleSheetHint: public SfxHint
{
SfxStyleSheetBase* pStyleSh;
- USHORT nHint;
+ sal_uInt16 nHint;
public:
TYPEINFO();
- SfxStyleSheetHint( USHORT );
- SfxStyleSheetHint( USHORT, SfxStyleSheetBase& );
+ SfxStyleSheetHint( sal_uInt16 );
+ SfxStyleSheetHint( sal_uInt16, SfxStyleSheetBase& );
SfxStyleSheetBase* GetStyleSheet() const
{ return pStyleSh; }
- USHORT GetHint() const
+ sal_uInt16 GetHint() const
{ return nHint; }
};
@@ -369,9 +369,9 @@ public:
TYPEINFO();
SfxStyleSheetHintExtended(
- USHORT, const String& rOld );
+ sal_uInt16, const String& rOld );
SfxStyleSheetHintExtended(
- USHORT, const String& rOld,
+ sal_uInt16, const String& rOld,
SfxStyleSheetBase& );
const String& GetOldName() { return aName; }
};
@@ -379,7 +379,7 @@ public:
class SVL_DLLPUBLIC SfxUnoStyleSheet : public ::cppu::ImplInheritanceHelper2< SfxStyleSheet, ::com::sun::star::style::XStyle, ::com::sun::star::lang::XUnoTunnel >
{
public:
- SfxUnoStyleSheet( const UniString& _rName, const SfxStyleSheetBasePool& _rPool, SfxStyleFamily _eFamily, USHORT _nMaske );
+ SfxUnoStyleSheet( const UniString& _rName, const SfxStyleSheetBasePool& _rPool, SfxStyleFamily _eFamily, sal_uInt16 _nMaske );
SfxUnoStyleSheet( const SfxStyleSheet& _rSheet );
static SfxUnoStyleSheet* getUnoStyleSheet( const ::com::sun::star::uno::Reference< ::com::sun::star::style::XStyle >& xStyle );
diff --git a/svl/inc/svl/svarray.hxx b/svl/inc/svl/svarray.hxx
index d48998247eeb..19ee3a9e5077 100644
--- a/svl/inc/svl/svarray.hxx
+++ b/svl/inc/svl/svarray.hxx
@@ -118,15 +118,15 @@ inline void operator delete( void*, DummyType* ) {}
#if defined(PRODUCT)
#define _SVVARARR_DEF_GET_OP_INLINE( nm, ArrElem ) \
-ArrElem& operator[](USHORT nP) const { return *(pData+nP); }\
+ArrElem& operator[](sal_uInt16 nP) const { return *(pData+nP); }\
\
-void Insert( const nm * pI, USHORT nP,\
- USHORT nS = 0, USHORT nE = USHRT_MAX )\
+void Insert( const nm * pI, sal_uInt16 nP,\
+ sal_uInt16 nS = 0, sal_uInt16 nE = USHRT_MAX )\
{\
if( USHRT_MAX == nE ) \
nE = pI->nA; \
if( nS < nE ) \
- Insert( (const ArrElem*)pI->pData+nS, (USHORT)nE-nS, nP );\
+ Insert( (const ArrElem*)pI->pData+nS, (sal_uInt16)nE-nS, nP );\
}
#define _SVVARARR_IMPL_GET_OP_INLINE( nm, ArrElem )
@@ -134,64 +134,64 @@ void Insert( const nm * pI, USHORT nP,\
#else
#define _SVVARARR_DEF_GET_OP_INLINE( nm,ArrElem )\
-ArrElem& operator[](USHORT nP) const;\
-void Insert( const nm *pI, USHORT nP,\
- USHORT nS = 0, USHORT nE = USHRT_MAX );
+ArrElem& operator[](sal_uInt16 nP) const;\
+void Insert( const nm *pI, sal_uInt16 nP,\
+ sal_uInt16 nS = 0, sal_uInt16 nE = USHRT_MAX );
#define _SVVARARR_IMPL_GET_OP_INLINE( nm, ArrElem )\
-ArrElem& nm::operator[](USHORT nP) const\
+ArrElem& nm::operator[](sal_uInt16 nP) const\
{\
DBG_ASSERT( pData && nP < nA,"Op[]");\
return *(pData+nP);\
}\
-void nm::Insert( const nm *pI, USHORT nP, USHORT nStt, USHORT nE)\
+void nm::Insert( const nm *pI, sal_uInt16 nP, sal_uInt16 nStt, sal_uInt16 nE)\
{\
DBG_ASSERT(nP<=nA,"Ins,Ar[Start.End]");\
if( USHRT_MAX == nE ) \
nE = pI->nA; \
if( nStt < nE ) \
- Insert( (const ArrElem*)pI->pData+nStt, (USHORT)nE-nStt, nP );\
+ Insert( (const ArrElem*)pI->pData+nStt, (sal_uInt16)nE-nStt, nP );\
}
#endif
#define _SV_DECL_VARARR_GEN(nm, AE, IS, GS, AERef, vis )\
-typedef BOOL (*FnForEach_##nm)( const AERef, void* );\
+typedef sal_Bool (*FnForEach_##nm)( const AERef, void* );\
class vis nm\
{\
protected:\
AE *pData;\
- USHORT nFree;\
- USHORT nA;\
+ sal_uInt16 nFree;\
+ sal_uInt16 nA;\
\
void _resize(size_t n);\
\
public:\
- nm( USHORT= IS, BYTE= GS );\
+ nm( sal_uInt16= IS, sal_uInt8= GS );\
~nm() { rtl_freeMemory( pData ); }\
\
_SVVARARR_DEF_GET_OP_INLINE(nm, AE )\
- AERef GetObject(USHORT nP) const { return (*this)[nP]; } \
+ AERef GetObject(sal_uInt16 nP) const { return (*this)[nP]; } \
\
- void Insert( const AERef aE, USHORT nP );\
- void Insert( const AE *pE, USHORT nL, USHORT nP );\
- void Remove( USHORT nP, USHORT nL = 1 );\
- void Replace( const AERef aE, USHORT nP );\
- void Replace( const AE *pE, USHORT nL, USHORT nP );\
- USHORT Count() const { return nA; }\
+ void Insert( const AERef aE, sal_uInt16 nP );\
+ void Insert( const AE *pE, sal_uInt16 nL, sal_uInt16 nP );\
+ void Remove( sal_uInt16 nP, sal_uInt16 nL = 1 );\
+ void Replace( const AERef aE, sal_uInt16 nP );\
+ void Replace( const AE *pE, sal_uInt16 nL, sal_uInt16 nP );\
+ sal_uInt16 Count() const { return nA; }\
const AE* GetData() const { return (const AE*)pData; }\
\
void ForEach( CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
{\
_ForEach( 0, nA, fnForEach, pArgs );\
}\
- void ForEach( USHORT nS, USHORT nE, \
+ void ForEach( sal_uInt16 nS, sal_uInt16 nE, \
CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
{\
_ForEach( nS, nE, fnForEach, pArgs );\
}\
\
- void _ForEach( USHORT nStt, USHORT nE, \
+ void _ForEach( sal_uInt16 nStt, sal_uInt16 nE, \
CONCAT( FnForEach_, nm ) fnCall, void* pArgs = 0 );\
\
@@ -212,7 +212,7 @@ SV_DECL_VARARR_GEN(nm, AE, IS, GS, AE &, )
SV_DECL_VARARR_GEN(nm, AE, IS, GS, AE &, vis )
#define SV_IMPL_VARARR_GEN( nm, AE, AERef )\
-nm::nm( USHORT nInit, BYTE )\
+nm::nm( sal_uInt16 nInit, sal_uInt8 )\
: pData (0),\
nFree (nInit),\
nA (0)\
@@ -226,7 +226,7 @@ nm::nm( USHORT nInit, BYTE )\
\
void nm::_resize (size_t n)\
{\
- USHORT nL = ((n < USHRT_MAX) ? USHORT(n) : USHRT_MAX);\
+ sal_uInt16 nL = ((n < USHRT_MAX) ? sal_uInt16(n) : USHRT_MAX);\
AE* pE = (AE*)(rtl_reallocateMemory (pData, sizeof(AE) * nL));\
if ((pE != 0) || (nL == 0))\
{\
@@ -235,7 +235,7 @@ void nm::_resize (size_t n)\
}\
}\
\
-void nm::Insert( const AERef aE, USHORT nP )\
+void nm::Insert( const AERef aE, sal_uInt16 nP )\
{\
DBG_ASSERT(nP <= nA && nA < USHRT_MAX, "Ins 1");\
if (nFree < 1)\
@@ -246,7 +246,7 @@ void nm::Insert( const AERef aE, USHORT nP )\
++nA; --nFree;\
}\
\
-void nm::Insert( const AE* pE, USHORT nL, USHORT nP )\
+void nm::Insert( const AE* pE, sal_uInt16 nL, sal_uInt16 nP )\
{\
DBG_ASSERT(nP<=nA && ((long)nA+nL)<USHRT_MAX,"Ins n");\
if (nFree < nL)\
@@ -258,13 +258,13 @@ void nm::Insert( const AE* pE, USHORT nL, USHORT nP )\
nA = nA + nL; nFree = nFree - nL;\
}\
\
-void nm::Replace( const AERef aE, USHORT nP )\
+void nm::Replace( const AERef aE, sal_uInt16 nP )\
{\
if( nP < nA )\
*(pData+nP) = (AE&)aE;\
}\
\
-void nm::Replace( const AE *pE, USHORT nL, USHORT nP )\
+void nm::Replace( const AE *pE, sal_uInt16 nL, sal_uInt16 nP )\
{\
if( pE && nP < nA )\
{\
@@ -278,7 +278,7 @@ void nm::Replace( const AE *pE, USHORT nL, USHORT nP )\
}\
else \
{\
- USHORT nTmpLen = nA + nFree - nP; \
+ sal_uInt16 nTmpLen = nA + nFree - nP; \
memcpy( pData + nP, pE, nTmpLen * sizeof( AE ));\
nA = nA + nFree; \
nFree = 0; \
@@ -287,7 +287,7 @@ void nm::Replace( const AE *pE, USHORT nL, USHORT nP )\
}\
}\
\
-void nm::Remove( USHORT nP, USHORT nL )\
+void nm::Remove( sal_uInt16 nP, sal_uInt16 nL )\
{\
if( !nL )\
return;\
@@ -299,7 +299,7 @@ void nm::Remove( USHORT nP, USHORT nL )\
_resize (nA);\
}\
\
-void nm::_ForEach( USHORT nStt, USHORT nE, \
+void nm::_ForEach( sal_uInt16 nStt, sal_uInt16 nE, \
CONCAT( FnForEach_, nm ) fnCall, void* pArgs )\
{\
if( nStt >= nE || nE > nA )\
@@ -315,36 +315,36 @@ SV_IMPL_VARARR_GEN( nm, AE, AE & )
#define _SV_DECL_PTRARR_DEF_GEN( nm, AE, IS, GS, AERef, vis )\
_SV_DECL_VARARR_GEN( nm, AE, IS, GS, AERef, vis)\
-USHORT GetPos( const AERef aE ) const;\
+sal_uInt16 GetPos( const AERef aE ) const;\
};
#define _SV_DECL_PTRARR_DEF( nm, AE, IS, GS, vis )\
_SV_DECL_PTRARR_DEF_GEN( nm, AE, IS, GS, AE &, vis )
#define SV_DECL_PTRARR_GEN(nm, AE, IS, GS, Base, AERef, VPRef, vis )\
-typedef BOOL (*FnForEach_##nm)( const AERef, void* );\
+typedef sal_Bool (*FnForEach_##nm)( const AERef, void* );\
class vis nm: public Base \
{\
public:\
- nm( USHORT nIni=IS, BYTE nG=GS )\
+ nm( sal_uInt16 nIni=IS, sal_uInt8 nG=GS )\
: Base(nIni,nG) {}\
- void Insert( const nm *pI, USHORT nP, \
- USHORT nS = 0, USHORT nE = USHRT_MAX ) {\
+ void Insert( const nm *pI, sal_uInt16 nP, \
+ sal_uInt16 nS = 0, sal_uInt16 nE = USHRT_MAX ) {\
Base::Insert((const Base*)pI, nP, nS, nE);\
}\
- void Insert( const AERef aE, USHORT nP ) {\
+ void Insert( const AERef aE, sal_uInt16 nP ) {\
Base::Insert( (const VPRef )aE, nP );\
}\
- void Insert( const AE *pE, USHORT nL, USHORT nP ) {\
+ void Insert( const AE *pE, sal_uInt16 nL, sal_uInt16 nP ) {\
Base::Insert( (const VoidPtr*)pE, nL, nP );\
}\
- void Replace( const AERef aE, USHORT nP ) {\
+ void Replace( const AERef aE, sal_uInt16 nP ) {\
Base::Replace( (const VPRef)aE, nP );\
}\
- void Replace( const AE *pE, USHORT nL, USHORT nP ) {\
+ void Replace( const AE *pE, sal_uInt16 nL, sal_uInt16 nP ) {\
Base::Replace( (const VoidPtr*)pE, nL, nP );\
}\
- void Remove( USHORT nP, USHORT nL = 1) {\
+ void Remove( sal_uInt16 nP, sal_uInt16 nL = 1) {\
Base::Remove(nP,nL);\
}\
const AE* GetData() const {\
@@ -354,20 +354,20 @@ public:\
{\
_ForEach( 0, nA, (FnForEach_##Base)fnForEach, pArgs );\
}\
- void ForEach( USHORT nS, USHORT nE, \
+ void ForEach( sal_uInt16 nS, sal_uInt16 nE, \
CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
{\
_ForEach( nS, nE, (FnForEach_##Base)fnForEach, pArgs );\
}\
- AE operator[]( USHORT nP )const { \
+ AE operator[]( sal_uInt16 nP )const { \
return (AE)Base::operator[](nP); }\
- AE GetObject(USHORT nP) const { \
+ AE GetObject(sal_uInt16 nP) const { \
return (AE)Base::GetObject(nP); }\
\
- USHORT GetPos( const AERef aE ) const { \
+ sal_uInt16 GetPos( const AERef aE ) const { \
return Base::GetPos((const VPRef)aE);\
}\
- void DeleteAndDestroy( USHORT nP, USHORT nL=1 );\
+ void DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL=1 );\
private:\
nm( const nm& );\
nm& operator=( const nm& );\
@@ -380,30 +380,30 @@ SV_DECL_PTRARR_GEN(nm, AE, IS, GS, SvPtrarr, AE &, VoidPtr &, )
SV_DECL_PTRARR_GEN(nm, AE, IS, GS, SvPtrarr, AE &, VoidPtr &, vis )
#define SV_DECL_PTRARR_DEL_GEN(nm, AE, IS, GS, Base, AERef, VPRef, vis )\
-typedef BOOL (*FnForEach_##nm)( const AERef, void* );\
+typedef sal_Bool (*FnForEach_##nm)( const AERef, void* );\
class vis nm: public Base \
{\
public:\
- nm( USHORT nIni=IS, BYTE nG=GS )\
+ nm( sal_uInt16 nIni=IS, sal_uInt8 nG=GS )\
: Base(nIni,nG) {}\
~nm() { DeleteAndDestroy( 0, Count() ); }\
- void Insert( const nm *pI, USHORT nP, \
- USHORT nS = 0, USHORT nE = USHRT_MAX ) {\
+ void Insert( const nm *pI, sal_uInt16 nP, \
+ sal_uInt16 nS = 0, sal_uInt16 nE = USHRT_MAX ) {\
Base::Insert((const Base*)pI, nP, nS, nE);\
}\
- void Insert( const AERef aE, USHORT nP ) {\
+ void Insert( const AERef aE, sal_uInt16 nP ) {\
Base::Insert((const VPRef)aE, nP );\
}\
- void Insert( const AE *pE, USHORT nL, USHORT nP ) {\
+ void Insert( const AE *pE, sal_uInt16 nL, sal_uInt16 nP ) {\
Base::Insert( (const VoidPtr *)pE, nL, nP );\
}\
- void Replace( const AERef aE, USHORT nP ) {\
+ void Replace( const AERef aE, sal_uInt16 nP ) {\
Base::Replace( (const VPRef)aE, nP );\
}\
- void Replace( const AE *pE, USHORT nL, USHORT nP ) {\
+ void Replace( const AE *pE, sal_uInt16 nL, sal_uInt16 nP ) {\
Base::Replace( (const VoidPtr*)pE, nL, nP );\
}\
- void Remove( USHORT nP, USHORT nL = 1) {\
+ void Remove( sal_uInt16 nP, sal_uInt16 nL = 1) {\
Base::Remove(nP,nL);\
}\
const AE* GetData() const {\
@@ -413,20 +413,20 @@ public:\
{\
_ForEach( 0, nA, (FnForEach_##Base)fnForEach, pArgs );\
}\
- void ForEach( USHORT nS, USHORT nE, \
+ void ForEach( sal_uInt16 nS, sal_uInt16 nE, \
CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
{\
_ForEach( nS, nE, (FnForEach_##Base)fnForEach, pArgs );\
}\
- AE operator[]( USHORT nP )const { \
+ AE operator[]( sal_uInt16 nP )const { \
return (AE)Base::operator[](nP); }\
- AE GetObject( USHORT nP )const { \
+ AE GetObject( sal_uInt16 nP )const { \
return (AE)Base::GetObject(nP); }\
\
- USHORT GetPos( const AERef aE ) const { \
+ sal_uInt16 GetPos( const AERef aE ) const { \
return Base::GetPos((const VPRef)aE);\
} \
- void DeleteAndDestroy( USHORT nP, USHORT nL=1 );\
+ void DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL=1 );\
private:\
nm( const nm& );\
nm& operator=( const nm& );\
@@ -439,11 +439,11 @@ SV_DECL_PTRARR_DEL_GEN(nm, AE, IS, GS, SvPtrarr, AE &, VoidPtr &, )
SV_DECL_PTRARR_DEL_GEN(nm, AE, IS, GS, SvPtrarr, AE &, VoidPtr &, vis)
#define SV_IMPL_PTRARR_GEN(nm, AE, Base)\
-void nm::DeleteAndDestroy( USHORT nP, USHORT nL )\
+void nm::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL )\
{ \
if( nL ) {\
DBG_ASSERT( nP < nA && nP + nL <= nA,"Del");\
- for( USHORT n=nP; n < nP + nL; n++ ) \
+ for( sal_uInt16 n=nP; n < nP + nL; n++ ) \
delete *((AE*)pData+n); \
Base::Remove( nP, nL ); \
} \
@@ -464,27 +464,27 @@ _SV_DECL_PTRARR_DEF( SvPtrarr, VoidPtr, 0, 1, SVL_DLLPUBLIC )
#endif
#define _SORT_CLASS_DEF(nm, AE, IS, GS, vis)\
-typedef BOOL (*FnForEach_##nm)( const AE&, void* );\
+typedef sal_Bool (*FnForEach_##nm)( const AE&, void* );\
class vis nm : __MWERKS__PRIVATE nm##_SAR \
{\
public:\
- nm(USHORT nSize = IS, BYTE nG = GS)\
+ nm(sal_uInt16 nSize = IS, sal_uInt8 nG = GS)\
: nm##_SAR(nSize,nG) {}\
- void Insert( const nm *pI, USHORT nS=0, USHORT nE=USHRT_MAX );\
- BOOL Insert( const AE& aE );\
- BOOL Insert( const AE& aE, USHORT& rP );\
- void Insert( const AE *pE, USHORT nL );\
- void Remove( USHORT nP, USHORT nL = 1 );\
- void Remove( const AE& aE, USHORT nL = 1 );\
- USHORT Count() const { return nm##_SAR::Count(); }\
+ void Insert( const nm *pI, sal_uInt16 nS=0, sal_uInt16 nE=USHRT_MAX );\
+ sal_Bool Insert( const AE& aE );\
+ sal_Bool Insert( const AE& aE, sal_uInt16& rP );\
+ void Insert( const AE *pE, sal_uInt16 nL );\
+ void Remove( sal_uInt16 nP, sal_uInt16 nL = 1 );\
+ void Remove( const AE& aE, sal_uInt16 nL = 1 );\
+ sal_uInt16 Count() const { return nm##_SAR::Count(); }\
const AE* GetData() const { return (const AE*)pData; }\
\
/* Das Ende stehe im DECL-Makro !!! */
#define _SV_SEEK_PTR(nm,AE)\
-BOOL nm::Seek_Entry( const AE aE, USHORT* pP ) const\
+sal_Bool nm::Seek_Entry( const AE aE, sal_uInt16* pP ) const\
{\
- register USHORT nO = nm##_SAR::Count(),\
+ register sal_uInt16 nO = nm##_SAR::Count(),\
nM, \
nU = 0;\
if( nO > 0 )\
@@ -497,27 +497,27 @@ BOOL nm::Seek_Entry( const AE aE, USHORT* pP ) const\
if( (long)*(pData + nM) == rCmp )\
{\
if( pP ) *pP = nM;\
- return TRUE;\
+ return sal_True;\
}\
else if( (long)*(pData+ nM) < (long)aE )\
nU = nM + 1;\
else if( nM == 0 )\
{\
if( pP ) *pP = nU;\
- return FALSE;\
+ return sal_False;\
}\
else\
nO = nM - 1;\
}\
}\
if( pP ) *pP = nU;\
- return FALSE;\
+ return sal_False;\
}
#define _SV_SEEK_PTR_TO_OBJECT( nm,AE )\
-BOOL nm::Seek_Entry( const AE aE, USHORT* pP ) const\
+sal_Bool nm::Seek_Entry( const AE aE, sal_uInt16* pP ) const\
{\
- register USHORT nO = nm##_SAR::Count(),\
+ register sal_uInt16 nO = nm##_SAR::Count(),\
nM, \
nU = 0;\
if( nO > 0 )\
@@ -529,27 +529,27 @@ BOOL nm::Seek_Entry( const AE aE, USHORT* pP ) const\
if( *(*((AE*)pData + nM)) == *(aE) )\
{\
if( pP ) *pP = nM;\
- return TRUE;\
+ return sal_True;\
}\
else if( *(*((AE*)pData + nM)) < *(aE) )\
nU = nM + 1;\
else if( nM == 0 )\
{\
if( pP ) *pP = nU;\
- return FALSE;\
+ return sal_False;\
}\
else\
nO = nM - 1;\
}\
}\
if( pP ) *pP = nU;\
- return FALSE;\
+ return sal_False;\
}
#define _SV_SEEK_OBJECT( nm,AE )\
-BOOL nm::Seek_Entry( const AE & aE, USHORT* pP ) const\
+sal_Bool nm::Seek_Entry( const AE & aE, sal_uInt16* pP ) const\
{\
- register USHORT nO = nm##_SAR::Count(),\
+ register sal_uInt16 nO = nm##_SAR::Count(),\
nM, \
nU = 0;\
if( nO > 0 )\
@@ -561,29 +561,29 @@ BOOL nm::Seek_Entry( const AE & aE, USHORT* pP ) const\
if( *(pData + nM) == aE )\
{\
if( pP ) *pP = nM;\
- return TRUE;\
+ return sal_True;\
}\
else if( *(pData + nM) < aE )\
nU = nM + 1;\
else if( nM == 0 )\
{\
if( pP ) *pP = nU;\
- return FALSE;\
+ return sal_False;\
}\
else\
nO = nM - 1;\
}\
}\
if( pP ) *pP = nU;\
- return FALSE;\
+ return sal_False;\
}
#define _SV_IMPL_SORTAR_ALG(nm, AE)\
-void nm::Insert( const nm * pI, USHORT nS, USHORT nE )\
+void nm::Insert( const nm * pI, sal_uInt16 nS, sal_uInt16 nE )\
{\
if( USHRT_MAX == nE )\
nE = pI->Count();\
- USHORT nP;\
+ sal_uInt16 nP;\
const AE * pIArr = pI->GetData();\
for( ; nS < nE; ++nS )\
{\
@@ -597,39 +597,39 @@ void nm::Insert( const nm * pI, USHORT nS, USHORT nE )\
}\
}\
\
-BOOL nm::Insert( const AE & aE )\
+sal_Bool nm::Insert( const AE & aE )\
{\
- USHORT nP;\
- BOOL bExist;\
+ sal_uInt16 nP;\
+ sal_Bool bExist;\
bExist = Seek_Entry( aE, &nP );\
if( ! bExist )\
nm##_SAR::Insert( aE, nP );\
return !bExist;\
}\
-BOOL nm::Insert( const AE & aE, USHORT& rP )\
+sal_Bool nm::Insert( const AE & aE, sal_uInt16& rP )\
{\
- BOOL bExist;\
+ sal_Bool bExist;\
bExist = Seek_Entry( aE, &rP );\
if( ! bExist )\
nm##_SAR::Insert( aE, rP );\
return !bExist;\
}\
-void nm::Insert( const AE* pE, USHORT nL)\
+void nm::Insert( const AE* pE, sal_uInt16 nL)\
{\
- USHORT nP;\
- for( USHORT n = 0; n < nL; ++n )\
+ sal_uInt16 nP;\
+ for( sal_uInt16 n = 0; n < nL; ++n )\
if( ! Seek_Entry( *(pE+n), &nP ))\
nm##_SAR::Insert( *(pE+n), nP );\
}\
-void nm::Remove( USHORT nP, USHORT nL )\
+void nm::Remove( sal_uInt16 nP, sal_uInt16 nL )\
{\
if( nL )\
nm##_SAR::Remove( nP, nL);\
}\
\
-void nm::Remove( const AE &aE, USHORT nL )\
+void nm::Remove( const AE &aE, sal_uInt16 nL )\
{\
- USHORT nP;\
+ sal_uInt16 nP;\
if( nL && Seek_Entry( aE, &nP ) ) \
nm##_SAR::Remove( nP, nL);\
}\
@@ -637,20 +637,20 @@ void nm::Remove( const AE &aE, USHORT nL )\
#if defined(TCPP)
#define _SORTARR_BLC_CASTS(nm, AE )\
- BOOL Insert( AE &aE ) {\
+ sal_Bool Insert( AE &aE ) {\
return Insert( (const AE&)aE );\
}\
- USHORT GetPos( AE& aE ) const { \
+ sal_uInt16 GetPos( AE& aE ) const { \
return SvPtrarr::GetPos((const VoidPtr&)aE);\
}\
- void Remove( AE& aE, USHORT nL = 1 ) { \
+ void Remove( AE& aE, sal_uInt16 nL = 1 ) { \
Remove( (const AE&) aE, nL );\
}
#else
#define _SORTARR_BLC_CASTS(nm, AE )\
- USHORT GetPos( const AE& aE ) const { \
+ sal_uInt16 GetPos( const AE& aE ) const { \
return SvPtrarr::GetPos((const VoidPtr&)aE);\
}
@@ -659,23 +659,23 @@ void nm::Remove( const AE &aE, USHORT nL )\
#define _SV_DECL_PTRARR_SORT_ALG(nm, AE, IS, GS, vis)\
SV_DECL_PTRARR_VISIBILITY(nm##_SAR, AE, IS, GS, vis)\
_SORT_CLASS_DEF(nm, AE, IS, GS, vis)\
- AE operator[](USHORT nP) const {\
+ AE operator[](sal_uInt16 nP) const {\
return nm##_SAR::operator[]( nP );\
}\
- AE GetObject(USHORT nP) const {\
+ AE GetObject(sal_uInt16 nP) const {\
return nm##_SAR::GetObject( nP );\
}\
- BOOL Seek_Entry( const AE aE, USHORT* pP = 0 ) const;\
+ sal_Bool Seek_Entry( const AE aE, sal_uInt16* pP = 0 ) const;\
void ForEach( CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
{\
_ForEach( 0, nA, (FnForEach_SvPtrarr)fnForEach, pArgs );\
}\
- void ForEach( USHORT nS, USHORT nE, \
+ void ForEach( sal_uInt16 nS, sal_uInt16 nE, \
CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
{\
_ForEach( nS, nE, (FnForEach_SvPtrarr)fnForEach, pArgs );\
}\
- void DeleteAndDestroy( USHORT nP, USHORT nL=1 ); \
+ void DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL=1 ); \
_SORTARR_BLC_CASTS(nm, AE )\
\
/* Das Ende stehe im DECL-Makro !!! */
@@ -711,18 +711,18 @@ _SV_DECL_PTRARR_SORT_DEL(nm, AE, IS, GS, vis)
#define _SV_DECL_VARARR_SORT(nm, AE, IS, GS, vis)\
SV_DECL_VARARR_VISIBILITY(nm##_SAR, AE, IS, GS, vis)\
_SORT_CLASS_DEF(nm, AE, IS, GS, vis) \
- const AE& operator[](USHORT nP) const {\
+ const AE& operator[](sal_uInt16 nP) const {\
return nm##_SAR::operator[]( nP );\
}\
- const AE& GetObject(USHORT nP) const {\
+ const AE& GetObject(sal_uInt16 nP) const {\
return nm##_SAR::GetObject( nP );\
}\
- BOOL Seek_Entry( const AE & aE, USHORT* pP = 0 ) const;\
+ sal_Bool Seek_Entry( const AE & aE, sal_uInt16* pP = 0 ) const;\
void ForEach( CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
{\
_ForEach( 0, nA, (FnForEach_##nm##_SAR)fnForEach, pArgs );\
}\
- void ForEach( USHORT nS, USHORT nE, \
+ void ForEach( sal_uInt16 nS, sal_uInt16 nE, \
CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
{\
_ForEach( nS, nE, (FnForEach_##nm##_SAR)fnForEach, pArgs );\
@@ -740,10 +740,10 @@ _SV_DECL_VARARR_SORT(nm, AE, IS, GS, vis)
#define SV_IMPL_PTRARR_SORT( nm,AE )\
_SV_IMPL_SORTAR_ALG( nm,AE )\
- void nm::DeleteAndDestroy( USHORT nP, USHORT nL ) { \
+ void nm::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL ) { \
if( nL ) {\
DBG_ASSERT( nP < nA && nP + nL <= nA, "ERR_VAR_DEL" );\
- for( USHORT n=nP; n < nP + nL; n++ ) \
+ for( sal_uInt16 n=nP; n < nP + nL; n++ ) \
delete *((AE*)pData+n); \
SvPtrarr::Remove( nP, nL ); \
} \
@@ -752,10 +752,10 @@ _SV_SEEK_PTR( nm, AE )
#define SV_IMPL_OP_PTRARR_SORT( nm,AE )\
_SV_IMPL_SORTAR_ALG( nm,AE )\
- void nm::DeleteAndDestroy( USHORT nP, USHORT nL ) { \
+ void nm::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL ) { \
if( nL ) {\
DBG_ASSERT( nP < nA && nP + nL <= nA, "ERR_VAR_DEL" );\
- for( USHORT n=nP; n < nP + nL; n++ ) \
+ for( sal_uInt16 n=nP; n < nP + nL; n++ ) \
delete *((AE*)pData+n); \
SvPtrarr::Remove( nP, nL ); \
} \
diff --git a/svl/inc/svl/svdde.hxx b/svl/inc/svl/svdde.hxx
index bb14d0fcdcdf..35448521c459 100644
--- a/svl/inc/svl/svdde.hxx
+++ b/svl/inc/svl/svdde.hxx
@@ -92,11 +92,11 @@ class SVL_DLLPUBLIC DdeData
//#if 0 // _SOLAR__PRIVATE
SVL_DLLPRIVATE void Lock();
//#endif
- void SetFormat( ULONG nFmt );
+ void SetFormat( sal_uLong nFmt );
public:
DdeData();
- DdeData( const void*, long, ULONG = FORMAT_STRING );
+ DdeData( const void*, long, sal_uLong = FORMAT_STRING );
DdeData( const String& );
DdeData( const DdeData& );
~DdeData();
@@ -104,12 +104,12 @@ public:
operator const void*() const;
operator long() const;
- ULONG GetFormat() const;
+ sal_uLong GetFormat() const;
DdeData& operator = ( const DdeData& );
- static ULONG GetExternalFormat( ULONG nFmt );
- static ULONG GetInternalFormat( ULONG nFmt );
+ static sal_uLong GetExternalFormat( sal_uLong nFmt );
+ static sal_uLong GetInternalFormat( sal_uLong nFmt );
};
// ------------------
// - DdeServiceList -
@@ -156,7 +156,7 @@ class SVL_DLLPUBLIC DdeTransaction
{
public:
virtual void Data( const DdeData* );
- virtual void Done( BOOL bDataValid );
+ virtual void Done( sal_Bool bDataValid );
protected:
DdeConnection& rDde;
DdeData aDdeData;
@@ -166,14 +166,14 @@ protected:
long nTime;
Link aData;
Link aDone;
- BOOL bBusy;
+ sal_Bool bBusy;
DdeTransaction( DdeConnection&, const String&, long = 0 );
public:
virtual ~DdeTransaction();
- BOOL IsBusy() { return bBusy; }
+ sal_Bool IsBusy() { return bBusy; }
const String& GetName() const;
void Execute();
@@ -184,8 +184,8 @@ public:
void SetDoneHdl( const Link& rLink ) { aDone = rLink; }
const Link& GetDoneHdl() const { return aDone; }
- void SetFormat( ULONG nFmt ) { aDdeData.SetFormat( nFmt ); }
- ULONG GetFormat() const { return aDdeData.GetFormat(); }
+ void SetFormat( sal_uLong nFmt ) { aDdeData.SetFormat( nFmt ); }
+ sal_uLong GetFormat() const { return aDdeData.GetFormat(); }
long GetError();
@@ -253,7 +253,7 @@ class SVL_DLLPUBLIC DdePoke : public DdeTransaction
{
public:
DdePoke( DdeConnection&, const String&, const char*, long,
- ULONG = FORMAT_STRING, long = 0 );
+ sal_uLong = FORMAT_STRING, long = 0 );
DdePoke( DdeConnection&, const String&, const DdeData&, long = 0 );
DdePoke( DdeConnection&, const String&, const String&, long = 0 );
};
@@ -290,7 +290,7 @@ public:
static const DdeConnections& GetConnections();
- BOOL IsConnected();
+ sal_Bool IsConnected();
const String& GetServiceName();
const String& GetTopicName();
@@ -312,11 +312,11 @@ class SVL_DLLPUBLIC DdeItem
DdeTopic* pMyTopic;
DdeItemImp* pImpData;
- void IncMonitor( ULONG );
- void DecMonitor( ULONG );
+ void IncMonitor( sal_uLong );
+ void DecMonitor( sal_uLong );
protected:
- BYTE nType;
+ sal_uInt8 nType;
public:
DdeItem( const sal_Unicode* );
@@ -340,9 +340,9 @@ public:
DdeGetPutItem( const String& rStr );
DdeGetPutItem( const DdeItem& rItem );
- virtual DdeData* Get( ULONG );
- virtual BOOL Put( const DdeData* );
- virtual void AdviseLoop( BOOL ); // AdviseLoop starten/stoppen
+ virtual DdeData* Get( sal_uLong );
+ virtual sal_Bool Put( const DdeData* );
+ virtual void AdviseLoop( sal_Bool ); // AdviseLoop starten/stoppen
};
// ------------
@@ -356,16 +356,16 @@ class SVL_DLLPUBLIC DdeTopic
public:
virtual void Connect( long );
virtual void Disconnect( long );
- virtual DdeData* Get( ULONG );
- virtual BOOL Put( const DdeData* );
- virtual BOOL Execute( const String* );
+ virtual DdeData* Get( sal_uLong );
+ virtual sal_Bool Put( const DdeData* );
+ virtual sal_Bool Execute( const String* );
// evt. ein neues anlegen; return 0 -> es konnte nicht angelegt werden
- virtual BOOL MakeItem( const String& rItem );
+ virtual sal_Bool MakeItem( const String& rItem );
// es wird ein Warm-/Hot-Link eingerichtet. Return-Wert
// besagt ob es geklappt hat
- virtual BOOL StartAdviseLoop();
- virtual BOOL StopAdviseLoop();
+ virtual sal_Bool StartAdviseLoop();
+ virtual sal_Bool StopAdviseLoop();
private:
friend class DdeInternal;
@@ -401,7 +401,7 @@ public:
const Link& GetExecuteHdl() const { return aExecLink; }
void NotifyClient( const String& );
- BOOL IsSystemTopic();
+ sal_Bool IsSystemTopic();
void InsertItem( DdeItem* ); // fuer eigene Ableitungen!
DdeItem* AddItem( const DdeItem& ); // werden kopiert !
@@ -423,10 +423,10 @@ class SVL_DLLPUBLIC DdeService
friend class DdeInternal;
public:
- virtual BOOL IsBusy();
+ virtual sal_Bool IsBusy();
virtual String GetHelp();
// evt. ein neues anlegen; return 0 -> es konnte nicht angelegt werden
- virtual BOOL MakeTopic( const String& rItem );
+ virtual sal_Bool MakeTopic( const String& rItem );
protected:
virtual String Topics();
@@ -434,7 +434,7 @@ protected:
virtual String SysItems();
virtual String Status();
virtual String SysTopicGet( const String& );
- virtual BOOL SysTopicExecute( const String* );
+ virtual sal_Bool SysTopicExecute( const String* );
const DdeTopic* GetSysTopic() const { return pSysTopic; }
private:
@@ -445,7 +445,7 @@ private:
ConvList* pConv;
short nStatus;
- SVL_DLLPRIVATE BOOL HasCbFormat( USHORT );
+ SVL_DLLPRIVATE sal_Bool HasCbFormat( sal_uInt16 );
public:
DdeService( const String& );
@@ -460,9 +460,9 @@ public:
void AddTopic( const DdeTopic& );
void RemoveTopic( const DdeTopic& );
- void AddFormat( ULONG );
- void RemoveFormat( ULONG );
- BOOL HasFormat( ULONG );
+ void AddFormat( sal_uLong );
+ void RemoveFormat( sal_uLong );
+ sal_Bool HasFormat( sal_uLong );
private:
// DdeService( const DdeService& );
diff --git a/svl/inc/svl/svldata.hxx b/svl/inc/svl/svldata.hxx
index 24aef1fdf6d0..7d666a7e0d15 100644
--- a/svl/inc/svl/svldata.hxx
+++ b/svl/inc/svl/svldata.hxx
@@ -61,7 +61,7 @@ class SvtSimpleResId
String m_sValue;
public:
- SvtSimpleResId(USHORT nId, const ::com::sun::star::lang::Locale aLocale) : m_sValue(ImpSvlData::GetSvlData().GetSimpleRM(aLocale)->ReadString(nId)) { };
+ SvtSimpleResId(sal_uInt16 nId, const ::com::sun::star::lang::Locale aLocale) : m_sValue(ImpSvlData::GetSvlData().GetSimpleRM(aLocale)->ReadString(nId)) { };
operator String () const { return m_sValue; }
};
diff --git a/svl/inc/svl/svstdarr.hxx b/svl/inc/svl/svstdarr.hxx
index 608705dca43d..88f318c2d5d3 100644
--- a/svl/inc/svl/svstdarr.hxx
+++ b/svl/inc/svl/svstdarr.hxx
@@ -44,27 +44,27 @@
#include <svl/svarray.hxx>
#include <deque>
-typedef std::deque< BOOL > SvBools;
+typedef std::deque< sal_Bool > SvBools;
-typedef std::deque< BYTE > SvBytes;
+typedef std::deque< sal_uInt8 > SvBytes;
//#ifdef _SVSTDARR_ULONGS
#ifndef _SVSTDARR_ULONGS_DECL
-SV_DECL_VARARR_VISIBILITY( SvULongs, ULONG, 1, 1, SVL_DLLPUBLIC )
+SV_DECL_VARARR_VISIBILITY( SvULongs, sal_uLong, 1, 1, SVL_DLLPUBLIC )
#define _SVSTDARR_ULONGS_DECL
#endif
//#endif
//#ifdef _SVSTDARR_ULONGSSORT
#ifndef _SVSTDARR_ULONGSSORT_DECL
-SV_DECL_VARARR_SORT_VISIBILITY( SvULongsSort, ULONG, 1, 1, SVL_DLLPUBLIC )
+SV_DECL_VARARR_SORT_VISIBILITY( SvULongsSort, sal_uLong, 1, 1, SVL_DLLPUBLIC )
#define _SVSTDARR_ULONGSSORT_DECL
#endif
//#endif
//#ifdef _SVSTDARR_USHORTS
#ifndef _SVSTDARR_USHORTS_DECL
-SV_DECL_VARARR_VISIBILITY( SvUShorts, USHORT, 1, 1, SVL_DLLPUBLIC )
+SV_DECL_VARARR_VISIBILITY( SvUShorts, sal_uInt16, 1, 1, SVL_DLLPUBLIC )
#define _SVSTDARR_USHORTS_DECL
#endif
//#endif
@@ -72,37 +72,37 @@ SV_DECL_VARARR_VISIBILITY( SvUShorts, USHORT, 1, 1, SVL_DLLPUBLIC )
//#ifdef _SVSTDARR_USHORTSSORT
#ifndef _SVSTDARR_USHORTSSORT_DECL
-typedef BOOL (*FnForEach_SvUShortsSort)( const USHORT&, void* );
+typedef sal_Bool (*FnForEach_SvUShortsSort)( const sal_uInt16&, void* );
class SVL_DLLPUBLIC SvUShortsSort : __MWERKS__PRIVATE SvUShorts
{
public:
- SvUShortsSort(BYTE nSize = 1, BYTE nG = 1)
+ SvUShortsSort(sal_uInt8 nSize = 1, sal_uInt8 nG = 1)
: SvUShorts(nSize,nG) {}
- void Insert( const SvUShortsSort *pI, USHORT nS=0, USHORT nE=USHRT_MAX );
- BOOL Insert( const USHORT aE );
- BOOL Insert( const USHORT aE, USHORT& rP );
- void Insert( const USHORT *pE, USHORT nL );
+ void Insert( const SvUShortsSort *pI, sal_uInt16 nS=0, sal_uInt16 nE=USHRT_MAX );
+ sal_Bool Insert( const sal_uInt16 aE );
+ sal_Bool Insert( const sal_uInt16 aE, sal_uInt16& rP );
+ void Insert( const sal_uInt16 *pE, sal_uInt16 nL );
// remove ab Pos
- void RemoveAt( const USHORT nP, USHORT nL = 1 );
+ void RemoveAt( const sal_uInt16 nP, sal_uInt16 nL = 1 );
// remove ab dem Eintrag
- void Remove( const USHORT nP, USHORT nL = 1 );
- BOOL Seek_Entry( const USHORT aE, USHORT* pP = 0 ) const;
+ void Remove( const sal_uInt16 nP, sal_uInt16 nL = 1 );
+ sal_Bool Seek_Entry( const sal_uInt16 aE, sal_uInt16* pP = 0 ) const;
- USHORT Count() const { return SvUShorts::Count(); }
- const USHORT* GetData() const { return (const USHORT*)pData; }
+ sal_uInt16 Count() const { return SvUShorts::Count(); }
+ const sal_uInt16* GetData() const { return (const sal_uInt16*)pData; }
- const USHORT& operator[](USHORT nP) const {
+ const sal_uInt16& operator[](sal_uInt16 nP) const {
return SvUShorts::operator[]( nP );
}
- const USHORT& GetObject(USHORT nP) const {
+ const sal_uInt16& GetObject(sal_uInt16 nP) const {
return SvUShorts::GetObject( nP );
}
void ForEach( FnForEach_SvUShortsSort fnForEach, void* pArgs = 0 )
{
_ForEach( 0, nA, (FnForEach_SvUShorts)fnForEach, pArgs );
}
- void ForEach( USHORT nS, USHORT nE,
+ void ForEach( sal_uInt16 nS, sal_uInt16 nE,
FnForEach_SvUShortsSort fnForEach, void* pArgs = 0 )
{
_ForEach( nS, nE, (FnForEach_SvUShorts)fnForEach, pArgs );
diff --git a/svl/inc/svl/szitem.hxx b/svl/inc/svl/szitem.hxx
index 31878aa34be5..0e1aa5b365b1 100644
--- a/svl/inc/svl/szitem.hxx
+++ b/svl/inc/svl/szitem.hxx
@@ -46,8 +46,8 @@ private:
public:
TYPEINFO();
SfxSizeItem();
- SfxSizeItem( USHORT nWhich, const Size& rVal );
- SfxSizeItem( USHORT nWhich, SvStream & );
+ SfxSizeItem( sal_uInt16 nWhich, const Size& rVal );
+ SfxSizeItem( sal_uInt16 nWhich, SvStream & );
SfxSizeItem( const SfxSizeItem& );
~SfxSizeItem() { DBG_DTOR(SfxSizeItem, 0); }
@@ -58,14 +58,14 @@ public:
const IntlWrapper * = 0 ) const;
virtual int operator==( const SfxPoolItem& ) const;
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT nItemVersion) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16 nItemVersion) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
const Size& GetValue() const { return aVal; }
void SetValue( const Size& rNewVal ) {
diff --git a/svl/inc/svl/undo.hxx b/svl/inc/svl/undo.hxx
index 5aea03207626..3d2c46af496c 100644
--- a/svl/inc/svl/undo.hxx
+++ b/svl/inc/svl/undo.hxx
@@ -32,6 +32,10 @@
#include <tools/string.hxx>
#include <svl/svarray.hxx>
+#include <boost/scoped_ptr.hpp>
+
+#include <vector>
+
//====================================================================
class SVL_DLLPUBLIC SfxRepeatTarget
@@ -43,26 +47,36 @@ public:
//====================================================================
+class SVL_DLLPUBLIC SfxUndoContext
+{
+public:
+ virtual ~SfxUndoContext() = 0;
+};
+
+//====================================================================
+
class SVL_DLLPUBLIC SfxUndoAction
{
- BOOL bLinked;
+ sal_Bool bLinked;
public:
TYPEINFO();
SfxUndoAction();
virtual ~SfxUndoAction();
- virtual BOOL IsLinked();
- virtual void SetLinked( BOOL bIsLinked = TRUE );
+ virtual sal_Bool IsLinked();
+ virtual void SetLinked( sal_Bool bIsLinked = sal_True );
virtual void Undo();
+ virtual void UndoWithContext( SfxUndoContext& i_context );
virtual void Redo();
+ virtual void RedoWithContext( SfxUndoContext& i_context );
virtual void Repeat(SfxRepeatTarget&);
- virtual BOOL CanRepeat(SfxRepeatTarget&) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget&) const;
- virtual BOOL Merge( SfxUndoAction *pNextAction );
+ virtual sal_Bool Merge( SfxUndoAction *pNextAction );
- virtual UniString GetComment() const;
- virtual UniString GetRepeatComment(SfxRepeatTarget&) const;
- virtual USHORT GetId() const;
+ virtual UniString GetComment() const;
+ virtual UniString GetRepeatComment(SfxRepeatTarget&) const;
+ virtual sal_uInt16 GetId() const;
private:
SfxUndoAction& operator=( const SfxUndoAction& ); // n.i.!!
@@ -70,19 +84,67 @@ private:
//========================================================================
-SV_DECL_PTRARR( SfxUndoActions, SfxUndoAction*, 20, 8 )
+/// is a mark on the Undo stack
+typedef sal_Int32 UndoStackMark;
+#define MARK_INVALID ::std::numeric_limits< UndoStackMark >::max()
+
+//========================================================================
+
+struct MarkedUndoAction
+{
+ SfxUndoAction* pAction;
+ ::std::vector< UndoStackMark > aMarks;
+
+ MarkedUndoAction( SfxUndoAction* i_action )
+ :pAction( i_action )
+ ,aMarks()
+ {
+ }
+};
+
+class SfxUndoActions
+{
+private:
+ ::std::vector< MarkedUndoAction > m_aActions;
+
+public:
+ SfxUndoActions()
+ {
+ }
+
+ bool empty() const { return m_aActions.empty(); }
+ size_t size() const { return m_aActions.size(); }
+
+ const MarkedUndoAction& operator[]( size_t i ) const { return m_aActions[i]; }
+ MarkedUndoAction& operator[]( size_t i ) { return m_aActions[i]; }
+
+ void Remove( size_t i_pos )
+ {
+ m_aActions.erase( m_aActions.begin() + i_pos );
+ }
+
+ void Remove( size_t i_pos, size_t i_count )
+ {
+ m_aActions.erase( m_aActions.begin() + i_pos, m_aActions.begin() + i_pos + i_count );
+ }
+
+ void Insert( SfxUndoAction* i_action, size_t i_pos )
+ {
+ m_aActions.insert( m_aActions.begin() + i_pos, MarkedUndoAction( i_action ) );
+ }
+};
//====================================================================
-/** do not make use of this implementation details, unless you
+/** do not make use of these implementation details, unless you
really really have to! */
struct SVL_DLLPUBLIC SfxUndoArray
{
SfxUndoActions aUndoActions;
- USHORT nMaxUndoActions;
- USHORT nCurUndoAction;
+ size_t nMaxUndoActions;
+ size_t nCurUndoAction;
SfxUndoArray *pFatherUndoArray;
- SfxUndoArray(USHORT nMax=0):
+ SfxUndoArray(size_t nMax=0):
nMaxUndoActions(nMax), nCurUndoAction(0),
pFatherUndoArray(0) {}
~SfxUndoArray();
@@ -90,7 +152,7 @@ struct SVL_DLLPUBLIC SfxUndoArray
//=========================================================================
-/** do not make use of this implementation details, unless you
+/** do not make use of these implementation details, unless you
really really have to! */
class SVL_DLLPUBLIC SfxListUndoAction : public SfxUndoAction, public SfxUndoArray
@@ -109,87 +171,260 @@ class SVL_DLLPUBLIC SfxListUndoAction : public SfxUndoAction, public SfxUndoArra
TYPEINFO();
SfxListUndoAction( const UniString &rComment,
- const UniString rRepeatComment, USHORT Id, SfxUndoArray *pFather);
+ const UniString rRepeatComment, sal_uInt16 Id, SfxUndoArray *pFather);
virtual void Undo();
+ virtual void UndoWithContext( SfxUndoContext& i_context );
virtual void Redo();
+ virtual void RedoWithContext( SfxUndoContext& i_context );
virtual void Repeat(SfxRepeatTarget&);
- virtual BOOL CanRepeat(SfxRepeatTarget&) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget&) const;
- virtual BOOL Merge( SfxUndoAction *pNextAction );
+ virtual sal_Bool Merge( SfxUndoAction *pNextAction );
- virtual UniString GetComment() const;
- virtual UniString GetRepeatComment(SfxRepeatTarget&) const;
- virtual USHORT GetId() const;
+ virtual UniString GetComment() const;
+ virtual UniString GetRepeatComment(SfxRepeatTarget&) const;
+ virtual sal_uInt16 GetId() const;
void SetComment( const UniString& rComment );
private:
- USHORT nId;
- UniString aComment, aRepeatComment;
+ sal_uInt16 nId;
+ UniString aComment;
+ UniString aRepeatComment;
};
//=========================================================================
-class SVL_DLLPUBLIC SfxUndoManager
+/** is a callback interface for notifications about state changes of an SfxUndoManager
+*/
+class SAL_NO_VTABLE SfxUndoListener
{
- friend class SfxLinkUndoAction;
+public:
+ virtual void actionUndone( const String& i_actionComment ) = 0;
+ virtual void actionRedone( const String& i_actionComment ) = 0;
+ virtual void undoActionAdded( const String& i_actionComment ) = 0;
+ virtual void cleared() = 0;
+ virtual void clearedRedo() = 0;
+ virtual void resetAll() = 0;
+ virtual void listActionEntered( const String& i_comment ) = 0;
+ virtual void listActionLeft( const String& i_comment ) = 0;
+ virtual void listActionLeftAndMerged() = 0;
+ virtual void listActionCancelled() = 0;
+ virtual void undoManagerDying() = 0;
+};
- SfxUndoArray *pUndoArray;
- SfxUndoArray *pActUndoArray;
- SfxUndoArray *pFatherUndoArray;
+//=========================================================================
- bool mbUndoEnabled;
-public:
- SfxUndoManager( USHORT nMaxUndoActionCount = 20 );
- virtual ~SfxUndoManager();
+namespace svl
+{
+ class SAL_NO_VTABLE IUndoManager
+ {
+ public:
+ enum
+ {
+ CurrentLevel = true,
+ TopLevel = false
+ };
- virtual void SetMaxUndoActionCount( USHORT nMaxUndoActionCount );
- virtual USHORT GetMaxUndoActionCount() const;
- virtual void Clear();
+ virtual ~IUndoManager() { };
+
+ virtual void SetMaxUndoActionCount( size_t nMaxUndoActionCount ) = 0;
+ virtual size_t GetMaxUndoActionCount() const = 0;
+
+ virtual void AddUndoAction( SfxUndoAction *pAction, sal_Bool bTryMerg=sal_False ) = 0;
+
+ virtual size_t GetUndoActionCount( bool const i_currentLevel = CurrentLevel ) const = 0;
+ virtual sal_uInt16 GetUndoActionId() const = 0;
+ virtual UniString GetUndoActionComment( size_t nNo=0, bool const i_currentLevel = CurrentLevel ) const = 0;
+ virtual SfxUndoAction* GetUndoAction( size_t nNo=0 ) const = 0;
- virtual void AddUndoAction( SfxUndoAction *pAction, BOOL bTryMerg=FALSE );
+ virtual size_t GetRedoActionCount( bool const i_currentLevel = CurrentLevel ) const = 0;
+ virtual UniString GetRedoActionComment( size_t nNo=0, bool const i_currentLevel = CurrentLevel ) const = 0;
- virtual USHORT GetUndoActionCount() const;
- virtual USHORT GetUndoActionId(USHORT nNo=0) const;
- virtual UniString GetUndoActionComment( USHORT nNo=0 ) const;
- /** returns the nNo'th undo action from the top */
- SfxUndoAction* GetUndoAction( USHORT nNo=0 ) const;
+ virtual sal_Bool Undo() = 0;
+ virtual sal_Bool Redo() = 0;
- virtual BOOL Undo( USHORT nCount=1 );
- virtual void Undo( SfxUndoAction &rAction );
+ /** clears both the Redo and the Undo stack.
- virtual USHORT GetRedoActionCount() const;
- virtual USHORT GetRedoActionId(USHORT nNo=0) const;
- virtual UniString GetRedoActionComment( USHORT nNo=0 ) const;
+ Will assert and bail out when called while within a list action (<member>IsInListAction</member>).
+ */
+ virtual void Clear() = 0;
- virtual BOOL Redo( USHORT nCount=1 );
- virtual void Redo( SfxUndoAction &rAction );
+ /** clears the Redo stack.
+
+ Will assert and bail out when called while within a list action (<member>IsInListAction</member>).
+ */
+ virtual void ClearRedo() = 0;
+
+ /** leaves any possible open list action (<member>IsInListAction</member>), and clears both the Undo and the
+ Redo stack.
+
+ Effectively, calling this method is equivalent to <code>while ( IsInListAction() ) LeaveListAction();</code>,
+ followed by <code>Clear()</code>. The only difference to this calling sequence is that Reset is an
+ atomar operation, also resulting in only one notification.
+ */
+ virtual void Reset() = 0;
+
+ /** determines whether an Undo or Redo is currently running
+ */
+ virtual bool IsDoing() const = 0;
+
+ virtual size_t GetRepeatActionCount() const = 0;
+ virtual UniString GetRepeatActionComment( SfxRepeatTarget &rTarget) const = 0;
+ virtual sal_Bool Repeat( SfxRepeatTarget &rTarget ) = 0;
+ virtual sal_Bool CanRepeat( SfxRepeatTarget &rTarget ) const = 0;
+
+ virtual void EnterListAction(const UniString &rComment, const UniString& rRepeatComment, sal_uInt16 nId=0) = 0;
+
+ /** leaves the list action entered with EnterListAction
+ @return the number of the sub actions in the list which has just been left. Note that in case no such
+ actions exist, the list action does not contribute to the Undo stack, but is silently removed.
+ */
+ virtual size_t LeaveListAction() = 0;
+
+ /** leaves the list action entered with EnterListAction, and forcefully merges the previous
+ action on the stack into the newly created list action.
+
+ Say you have an Undo action A on the stack, then call EnterListAction, followed by one or more calls to
+ AddUndoAction, followed by a call to LeaveAndMergeListAction. In opposite to LeaveListAction, your Undo
+ stack will now still contain one undo action: the newly created list action, whose first child is the
+ original A, whose other children are those you added via AddUndoAction, and whose comment is the same as
+ the comment of A.
+
+ Effectively, this means that all actions added between EnterListAction and LeaveAndMergeListAction are
+ hidden from the user.
+
+ @return the number of the sub actions in the list which has just been left. Note that in case no such
+ actions exist, the list action does not contribute to the Undo stack, but is silently removed.
+ */
+ virtual size_t LeaveAndMergeListAction() = 0;
+
+ /// determines whether we're within a ListAction context, i.e. a LeaveListAction/LeaveAndMergeListAction call is pending
+ virtual bool IsInListAction() const = 0;
+
+ /// determines how many nested list actions are currently open
+ virtual size_t GetListActionDepth() const = 0;
+
+ /** clears the redo stack and removes the top undo action */
+ virtual void RemoveLastUndoAction() = 0;
+
+ // enables (true) or disables (false) recording of undo actions
+ // If undo actions are added while undo is disabled, they are deleted.
+ // Disabling undo does not clear the current undo buffer!
+ virtual void EnableUndo( bool bEnable ) = 0;
+
+ // returns true if undo is currently enabled
+ // This returns false if undo was disabled using EnableUndo( false ) and
+ // also during the runtime of the Undo() and Redo() methods.
+ virtual bool IsUndoEnabled() const = 0;
+
+ /// adds a new listener to be notified about changes in the UndoManager's state
+ virtual void AddUndoListener( SfxUndoListener& i_listener ) = 0;
+ virtual void RemoveUndoListener( SfxUndoListener& i_listener ) = 0;
+ };
+}
+
+//=========================================================================
+
+namespace svl { namespace undo { namespace impl
+{
+ class UndoManagerGuard;
+ class LockGuard;
+} } }
+
+struct SfxUndoManager_Data;
+class SVL_DLLPUBLIC SfxUndoManager : public ::svl::IUndoManager
+{
+ friend class SfxLinkUndoAction;
+
+ ::boost::scoped_ptr< SfxUndoManager_Data >
+ m_pData;
+public:
+ SfxUndoManager( size_t nMaxUndoActionCount = 20 );
+ virtual ~SfxUndoManager();
+
+ // IUndoManager overridables
+ virtual void SetMaxUndoActionCount( size_t nMaxUndoActionCount );
+ virtual size_t GetMaxUndoActionCount() const;
+ virtual void AddUndoAction( SfxUndoAction *pAction, sal_Bool bTryMerg=sal_False );
+ virtual size_t GetUndoActionCount( bool const i_currentLevel = CurrentLevel ) const;
+ virtual sal_uInt16 GetUndoActionId() const;
+ virtual UniString GetUndoActionComment( size_t nNo=0, bool const i_currentLevel = CurrentLevel ) const;
+ virtual SfxUndoAction* GetUndoAction( size_t nNo=0 ) const;
+ virtual size_t GetRedoActionCount( bool const i_currentLevel = CurrentLevel ) const;
+ virtual UniString GetRedoActionComment( size_t nNo=0, bool const i_currentLevel = CurrentLevel ) const;
+ virtual sal_Bool Undo();
+ virtual sal_Bool Redo();
+ virtual void Clear();
virtual void ClearRedo();
+ virtual void Reset();
+ virtual bool IsDoing() const;
+ virtual size_t GetRepeatActionCount() const;
+ virtual UniString GetRepeatActionComment( SfxRepeatTarget &rTarget) const;
+ virtual sal_Bool Repeat( SfxRepeatTarget &rTarget );
+ virtual sal_Bool CanRepeat( SfxRepeatTarget &rTarget ) const;
+ virtual void EnterListAction(const UniString &rComment, const UniString& rRepeatComment, sal_uInt16 nId=0);
+ virtual size_t LeaveListAction();
+ virtual size_t LeaveAndMergeListAction();
+ virtual bool IsInListAction() const;
+ virtual size_t GetListActionDepth() const;
+ virtual void RemoveLastUndoAction();
+ virtual void EnableUndo( bool bEnable );
+ virtual bool IsUndoEnabled() const;
+ virtual void AddUndoListener( SfxUndoListener& i_listener );
+ virtual void RemoveUndoListener( SfxUndoListener& i_listener );
+
+ /** marks the current top-level element of the Undo stack, and returns a unique ID for it
+ */
+ UndoStackMark MarkTopUndoAction();
+
+ /** removes a mark given by its ID.
+ After the call, the mark ID is invalid.
+ */
+ void RemoveMark( UndoStackMark const i_mark );
+
+ /** determines whether the top action on the Undo stack has a given mark
+ */
+ bool HasTopUndoActionMark( UndoStackMark const i_mark );
+
+ /** removes the oldest Undo actions from the stack
+ */
+ void RemoveOldestUndoActions( size_t const i_count );
+
+protected:
+ sal_Bool UndoWithContext( SfxUndoContext& i_context );
+ sal_Bool RedoWithContext( SfxUndoContext& i_context );
- virtual USHORT GetRepeatActionCount() const;
- virtual UniString GetRepeatActionComment( SfxRepeatTarget &rTarget, USHORT nNo = 0) const;
- virtual BOOL Repeat( SfxRepeatTarget &rTarget, USHORT nFrom=0, USHORT nCount=1 );
- virtual void Repeat( SfxRepeatTarget &rTarget, SfxUndoAction &rAction );
- virtual BOOL CanRepeat( SfxRepeatTarget &rTarget, USHORT nNo = 0 ) const;
- virtual BOOL CanRepeat( SfxRepeatTarget &rTarget, SfxUndoAction &rAction ) const;
+ void ImplClearRedo_NoLock( bool const i_currentLevel );
- virtual void EnterListAction(const UniString &rComment, const UniString& rRepeatComment, USHORT nId=0);
- virtual void LeaveListAction();
+ /** clears all undo actions on the current level, plus all undo actions on superordinate levels,
+ as soon as those levels are reached.
- /** clears the redo stack and removes the top undo action */
- void RemoveLastUndoAction();
+ If no list action is active currently, i.e. we're on the top level already, this method is equivalent to
+ ->Clear.
- // enables (true) or disables (false) recording of undo actions
- // If undo actions are added while undo is disabled, they are deleted.
- // Disabling undo does not clear the current undo buffer!
- void EnableUndo( bool bEnable );
+ Otherwise, the Undo actions on the current level are removed. Upon leaving the current list action, all
+ undo actions on the then-current level are removed, too. This is continued until the top level is reached.
+ */
+ void ClearAllLevels();
- // returns true if undo is currently enabled
- // This returns false if undo was disabled using EnableUndo( false ) and
- // also during the runtime of the Undo() and Redo() methods.
- bool IsUndoEnabled() const { return mbUndoEnabled; }
+private:
+ size_t ImplLeaveListAction( const bool i_merge, ::svl::undo::impl::UndoManagerGuard& i_guard );
+ bool ImplAddUndoAction_NoNotify( SfxUndoAction* pAction, bool bTryMerge, bool bClearRedo, ::svl::undo::impl::UndoManagerGuard& i_guard );
+ void ImplClearRedo( ::svl::undo::impl::UndoManagerGuard& i_guard, bool const i_currentLevel );
+ void ImplClearUndo( ::svl::undo::impl::UndoManagerGuard& i_guard );
+ void ImplClearCurrentLevel_NoNotify( ::svl::undo::impl::UndoManagerGuard& i_guard );
+ size_t ImplGetRedoActionCount_Lock( bool const i_currentLevel = CurrentLevel ) const;
+ bool ImplIsUndoEnabled_Lock() const;
+ bool ImplIsInListAction_Lock() const;
+ void ImplEnableUndo_Lock( bool const i_enable );
+
+ sal_Bool ImplUndo( SfxUndoContext* i_contextOrNull );
+ sal_Bool ImplRedo( SfxUndoContext* i_contextOrNull );
+
+ friend class ::svl::undo::impl::LockGuard;
};
//=========================================================================
@@ -213,23 +448,23 @@ class SVL_DLLPUBLIC SfxLinkUndoAction : public SfxUndoAction
{
public:
TYPEINFO();
- SfxLinkUndoAction(SfxUndoManager *pManager);
+ SfxLinkUndoAction(::svl::IUndoManager *pManager);
~SfxLinkUndoAction();
virtual void Undo();
virtual void Redo();
- virtual BOOL CanRepeat(SfxRepeatTarget& r) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& r) const;
virtual void Repeat(SfxRepeatTarget&r);
- virtual UniString GetComment() const;
- virtual UniString GetRepeatComment(SfxRepeatTarget&r) const;
- virtual USHORT GetId() const;
+ virtual UniString GetComment() const;
+ virtual UniString GetRepeatComment(SfxRepeatTarget&r) const;
+ virtual sal_uInt16 GetId() const;
SfxUndoAction* GetAction() const { return pAction; }
protected:
- SfxUndoManager *pUndoManager;
+ ::svl::IUndoManager *pUndoManager;
SfxUndoAction *pAction;
};
diff --git a/svl/inc/svl/visitem.hxx b/svl/inc/svl/visitem.hxx
index 9e9a0fcf4126..0305e0563938 100644
--- a/svl/inc/svl/visitem.hxx
+++ b/svl/inc/svl/visitem.hxx
@@ -43,14 +43,14 @@ class SVL_DLLPUBLIC SfxVisibilityItem: public SfxPoolItem
public:
TYPEINFO();
- SfxVisibilityItem(USHORT which = 0, sal_Bool bVisible = sal_True):
+ SfxVisibilityItem(sal_uInt16 which = 0, sal_Bool bVisible = sal_True):
SfxPoolItem(which)
{
m_nValue.bVisible = bVisible;
DBG_CTOR(SfxVisibilityItem, 0);
}
- SfxVisibilityItem(USHORT which, SvStream & rStream);
+ SfxVisibilityItem(sal_uInt16 which, SvStream & rStream);
SfxVisibilityItem(const SfxVisibilityItem & rItem):
SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
@@ -69,25 +69,25 @@ public:
const IntlWrapper * = 0)
const;
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 );
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
- virtual SvStream & Store(SvStream & rStream, USHORT) const;
+ virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
- virtual USHORT GetValueCount() const;
+ virtual sal_uInt16 GetValueCount() const;
- virtual UniString GetValueTextByVal(BOOL bTheValue) const;
+ virtual UniString GetValueTextByVal(sal_Bool bTheValue) const;
- BOOL GetValue() const { return m_nValue.bVisible; }
+ sal_Bool GetValue() const { return m_nValue.bVisible; }
- void SetValue(BOOL bVisible) { m_nValue.bVisible = bVisible; }
+ void SetValue(sal_Bool bVisible) { m_nValue.bVisible = bVisible; }
};
#endif // _SFXVISIBILITYITEM_HXX
diff --git a/svl/inc/svl/whiter.hxx b/svl/inc/svl/whiter.hxx
index 83a3e21e2b0e..eb9bb7d7e732 100644
--- a/svl/inc/svl/whiter.hxx
+++ b/svl/inc/svl/whiter.hxx
@@ -42,19 +42,19 @@ class SfxItemSet;
class SVL_DLLPUBLIC SfxWhichIter
{
- const USHORT *pRanges, *pStart;
- USHORT nOfst, nFrom, nTo;
+ const sal_uInt16 *pRanges, *pStart;
+ sal_uInt16 nOfst, nFrom, nTo;
public:
- SfxWhichIter( const SfxItemSet& rSet, USHORT nFrom = 0, USHORT nTo = USHRT_MAX );
+ SfxWhichIter( const SfxItemSet& rSet, sal_uInt16 nFrom = 0, sal_uInt16 nTo = USHRT_MAX );
~SfxWhichIter();
- USHORT GetCurWhich() const { return *pRanges + nOfst; }
- USHORT NextWhich();
- USHORT PrevWhich();
+ sal_uInt16 GetCurWhich() const { return *pRanges + nOfst; }
+ sal_uInt16 NextWhich();
+ sal_uInt16 PrevWhich();
- USHORT FirstWhich();
- USHORT LastWhich();
+ sal_uInt16 FirstWhich();
+ sal_uInt16 LastWhich();
};
#endif
diff --git a/svl/inc/svl/zforlist.hxx b/svl/inc/svl/zforlist.hxx
index 5492759d4d36..abb627567856 100644
--- a/svl/inc/svl/zforlist.hxx
+++ b/svl/inc/svl/zforlist.hxx
@@ -233,9 +233,9 @@ class SVL_DLLPUBLIC NfCurrencyEntry
String aSymbol; /// currency symbol
String aBankSymbol; /// currency abbreviation
LanguageType eLanguage; /// language/country value
- USHORT nPositiveFormat; /// position of symbol
- USHORT nNegativeFormat; /// position of symbol and type and position of negative sign
- USHORT nDigits; /// count of decimal digits
+ sal_uInt16 nPositiveFormat; /// position of symbol
+ sal_uInt16 nNegativeFormat; /// position of symbol and type and position of negative sign
+ sal_uInt16 nDigits; /// count of decimal digits
sal_Unicode cZeroChar; /// which character is used for zeros as last decimal digits
/// not implemented, prevent usage
@@ -249,7 +249,7 @@ private:
// nDecimalFormat := 0, 1, 2
// #,##0 or #,##0.00 or #,##0.-- are assigned
SVL_DLLPRIVATE void Impl_BuildFormatStringNumChars( String&,
- const LocaleDataWrapper&, USHORT nDecimalFormat ) const;
+ const LocaleDataWrapper&, sal_uInt16 nDecimalFormat ) const;
//#endif // __PRIVATE
public:
@@ -264,11 +264,11 @@ public:
~NfCurrencyEntry() {}
/// Symbols and language identical
- BOOL operator==( const NfCurrencyEntry& r ) const;
+ sal_Bool operator==( const NfCurrencyEntry& r ) const;
/// Set this format to be the EURo entry, overwrite other settings
void SetEuro();
- BOOL IsEuro() const;
+ sal_Bool IsEuro() const;
/** Apply format information (nPositiveFormat,
nNegativeFormat, nDigits, cZeroChar) of another format. */
@@ -277,43 +277,43 @@ public:
const String& GetSymbol() const { return aSymbol; }
const String& GetBankSymbol() const { return aBankSymbol; }
LanguageType GetLanguage() const { return eLanguage; }
- USHORT GetPositiveFormat() const { return nPositiveFormat; }
- USHORT GetNegativeFormat() const { return nNegativeFormat; }
- USHORT GetDigits() const { return nDigits; }
+ sal_uInt16 GetPositiveFormat() const { return nPositiveFormat; }
+ sal_uInt16 GetNegativeFormat() const { return nNegativeFormat; }
+ sal_uInt16 GetDigits() const { return nDigits; }
sal_Unicode GetZeroChar() const { return cZeroChar; }
- /** [$DM-407] (bBank==FALSE) or [$DEM] (bBank==TRUE)
- is assigned to rStr, if bBank==FALSE and
- bWithoutExtension==TRUE only [$DM] */
- void BuildSymbolString( String& rStr, BOOL bBank,
- BOOL bWithoutExtension = FALSE ) const;
+ /** [$DM-407] (bBank==sal_False) or [$DEM] (bBank==sal_True)
+ is assigned to rStr, if bBank==sal_False and
+ bWithoutExtension==sal_True only [$DM] */
+ void BuildSymbolString( String& rStr, sal_Bool bBank,
+ sal_Bool bWithoutExtension = sal_False ) const;
/** #,##0.00 [$DM-407] is assigned to rStr, separators
from rLoc, incl. minus sign but without [RED] */
- void BuildPositiveFormatString( String& rStr, BOOL bBank,
- const LocaleDataWrapper&, USHORT nDecimalFormat = 1 ) const;
- void BuildNegativeFormatString( String& rStr, BOOL bBank,
- const LocaleDataWrapper&, USHORT nDecimalFormat = 1 ) const;
+ void BuildPositiveFormatString( String& rStr, sal_Bool bBank,
+ const LocaleDataWrapper&, sal_uInt16 nDecimalFormat = 1 ) const;
+ void BuildNegativeFormatString( String& rStr, sal_Bool bBank,
+ const LocaleDataWrapper&, sal_uInt16 nDecimalFormat = 1 ) const;
- /** [$DM-407] (or [$DEM] if bBank==TRUE)
+ /** [$DM-407] (or [$DEM] if bBank==sal_True)
is appended/prepended to rStr, incl. minus sign */
- void CompletePositiveFormatString( String& rStr, BOOL bBank,
- USHORT nPosiFormat ) const;
- void CompleteNegativeFormatString( String& rStr, BOOL bBank,
- USHORT nNegaFormat ) const;
+ void CompletePositiveFormatString( String& rStr, sal_Bool bBank,
+ sal_uInt16 nPosiFormat ) const;
+ void CompleteNegativeFormatString( String& rStr, sal_Bool bBank,
+ sal_uInt16 nNegaFormat ) const;
/// rSymStr is appended/prepended to rStr, incl. minus sign
static void CompletePositiveFormatString( String& rStr,
- const String& rSymStr, USHORT nPosiFormat );
+ const String& rSymStr, sal_uInt16 nPosiFormat );
static void CompleteNegativeFormatString( String& rStr,
- const String& rSymStr, USHORT nNegaFormat );
+ const String& rSymStr, sal_uInt16 nNegaFormat );
/** Representation of a currency (symbol position and
negative sign) in other language settings */
- static USHORT GetEffectivePositiveFormat( USHORT nIntlFormat,
- USHORT nCurrFormat, BOOL bBank );
- static USHORT GetEffectiveNegativeFormat( USHORT nIntlFormat,
- USHORT nCurrFormat, BOOL bBank );
+ static sal_uInt16 GetEffectivePositiveFormat( sal_uInt16 nIntlFormat,
+ sal_uInt16 nCurrFormat, sal_Bool bBank );
+ static sal_uInt16 GetEffectiveNegativeFormat( sal_uInt16 nIntlFormat,
+ sal_uInt16 nCurrFormat, sal_Bool bBank );
/// General Unicode Euro symbol
static inline sal_Unicode GetEuroSymbol() { return sal_Unicode(0x20AC); }
@@ -359,23 +359,23 @@ public:
/// Set CallBack to ColorTable
void SetColorLink( const Link& rColorTableCallBack ) { aColorLink = rColorTableCallBack; }
/// Do the CallBack to ColorTable
- Color* GetUserDefColor(USHORT nIndex);
+ Color* GetUserDefColor(sal_uInt16 nIndex);
/// Change language/country, also input and format scanner
void ChangeIntl( LanguageType eLnge );
/// Change the reference null date
- void ChangeNullDate(USHORT nDay, USHORT nMonth, USHORT nYear);
+ void ChangeNullDate(sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear);
/// Change standard precision
void ChangeStandardPrec(short nPrec);
/// Set zero value suppression
- void SetNoZero(BOOL bNZ) { bNoZero = bNZ; }
+ void SetNoZero(sal_Bool bNZ) { bNoZero = bNZ; }
/** The language with which the formatter was initialized (system setting),
NOT the current language after a ChangeIntl() */
LanguageType GetLanguage() const { return IniLnge; }
// Determine whether two format types are input compatible or not
- BOOL IsCompatible(short eOldType, short eNewType);
+ sal_Bool IsCompatible(short eOldType, short eNewType);
/** Get table of formats of a specific type of a locale. A format FIndex is
tested whether it has the type and locale requested, if it doesn't
@@ -414,13 +414,13 @@ public:
nType contains the type of the format.
nKey contains the index key of the format.
*/
- BOOL PutEntry( String& rString, xub_StrLen& nCheckPos, short& nType, sal_uInt32& nKey,
+ sal_Bool PutEntry( String& rString, xub_StrLen& nCheckPos, short& nType, sal_uInt32& nKey,
LanguageType eLnge = LANGUAGE_DONTKNOW );
/** Same as <method>PutEntry</method> but the format code string is
considered to be of language/country eLnge and is converted to
language/country eNewLnge */
- BOOL PutandConvertEntry( String& rString, xub_StrLen& nCheckPos,
+ sal_Bool PutandConvertEntry( String& rString, xub_StrLen& nCheckPos,
short& nType, sal_uInt32& nKey,
LanguageType eLnge, LanguageType eNewLnge );
@@ -428,7 +428,7 @@ public:
is considered to be of the System language/country eLnge and is
converted to another System language/country eNewLnge. In this case
the automatic currency is converted too. */
- BOOL PutandConvertEntrySystem( String& rString, xub_StrLen& nCheckPos,
+ sal_Bool PutandConvertEntrySystem( String& rString, xub_StrLen& nCheckPos,
short& nType, sal_uInt32& nKey,
LanguageType eLnge, LanguageType eNewLnge );
@@ -466,20 +466,20 @@ public:
was empty, could not be converted or has errors, the eLnge locale's
standard number format is chosen instead. The index key is
guaranteed to represent some valid number format. If
- rNewInserted==FALSE and rCheckPos>0 the format code has errors
+ rNewInserted==sal_False and rCheckPos>0 the format code has errors
and/or could not be converted.
*/
sal_uInt32 GetIndexPuttingAndConverting( String & rString, LanguageType eLnge,
LanguageType eSysLnge, short & rType,
- BOOL & rNewInserted,
+ sal_Bool & rNewInserted,
xub_StrLen & rCheckPos );
/** Create a format code string using format nIndex as a template and
applying other settings (passed from the dialog) */
void GenerateFormat( String& sString, sal_uInt32 nIndex,
LanguageType eLnge = LANGUAGE_DONTKNOW,
- BOOL bThousand = FALSE, BOOL IsRed = FALSE,
- USHORT nPrecision = 0, USHORT nAnzLeading = 1 );
+ sal_Bool bThousand = sal_False, sal_Bool IsRed = sal_False,
+ sal_uInt16 nPrecision = 0, sal_uInt16 nAnzLeading = 1 );
/** Analyze an input string
@return
@@ -488,7 +488,7 @@ public:
returned in fOutNumber
<FALSE/> if input is not a number
*/
- BOOL IsNumberFormat( const String& sString, sal_uInt32& F_Index, double& fOutNumber );
+ sal_Bool IsNumberFormat( const String& sString, sal_uInt32& F_Index, double& fOutNumber );
/// Format a number according to a format index, return string and color
void GetOutputString( const double& fOutNumber, sal_uInt32 nFIndex,
@@ -510,13 +510,13 @@ public:
<FALSE/> if format code contains an error
<TRUE/> else, in which case the string and color are returned.
*/
- BOOL GetPreviewString( const String& sFormatString, double fPreviewNumber,
+ sal_Bool GetPreviewString( const String& sFormatString, double fPreviewNumber,
String& sOutString, Color** ppColor,
LanguageType eLnge = LANGUAGE_DONTKNOW );
/** Same as <method>GetPreviewString</method> but the format code string
may be either language/country eLnge or en_US english US */
- BOOL GetPreviewStringGuess( const String& sFormatString, double fPreviewNumber,
+ sal_Bool GetPreviewStringGuess( const String& sFormatString, double fPreviewNumber,
String& sOutString, Color** ppColor,
LanguageType eLnge = LANGUAGE_DONTKNOW );
@@ -525,7 +525,7 @@ public:
<FALSE/> if format code contains an error
<TRUE/> else, in which case the string and color are returned.
*/
- BOOL GetPreviewString( const String& sFormatString, const String& sPreviewString,
+ sal_Bool GetPreviewString( const String& sFormatString, const String& sPreviewString,
String& sOutString, Color** ppColor,
LanguageType eLnge = LANGUAGE_DONTKNOW );
@@ -537,14 +537,14 @@ public:
LanguageType eLnge = LANGUAGE_DONTKNOW );
/// Whether format index nFIndex is of type text or not
- BOOL IsTextFormat(sal_uInt32 nFIndex) const;
+ sal_Bool IsTextFormat(sal_uInt32 nFIndex) const;
/// Whether the 4th string subcode of format index nFIndex is present
- BOOL HasTextFormat(sal_uInt32 nFIndex) const;
+ sal_Bool HasTextFormat(sal_uInt32 nFIndex) const;
/// Load all formats from a stream
- BOOL Load( SvStream& rStream );
+ sal_Bool Load( SvStream& rStream );
/// Save all formats to a stream
- BOOL Save( SvStream& rStream ) const;
+ sal_Bool Save( SvStream& rStream ) const;
/// Reset of "Used" flags
void PrepareSave();
@@ -552,11 +552,11 @@ public:
void SetFormatUsed(sal_uInt32 nFIndex);
/// Get additional info of a format index, e.g. for dialog box
- void GetFormatSpecialInfo(sal_uInt32 nFormat, BOOL& bThousand, BOOL& IsRed,
- USHORT& nPrecision, USHORT& nAnzLeading);
+ void GetFormatSpecialInfo(sal_uInt32 nFormat, sal_Bool& bThousand, sal_Bool& IsRed,
+ sal_uInt16& nPrecision, sal_uInt16& nAnzLeading);
/// Count of decimals
- USHORT GetFormatPrecision( sal_uInt32 nFormat ) const;
+ sal_uInt16 GetFormatPrecision( sal_uInt32 nFormat ) const;
/** Get additional info of a format code string, e.g. for dialog box.
Uses a temporary parse, if possible use only if format code is not
@@ -565,12 +565,12 @@ public:
0 if format code string parsed without errors, otherwise error
position (like nCheckPos on <method>PutEntry</method>)
*/
- sal_uInt32 GetFormatSpecialInfo( const String&, BOOL& bThousand, BOOL& IsRed,
- USHORT& nPrecision, USHORT& nAnzLeading,
+ sal_uInt32 GetFormatSpecialInfo( const String&, sal_Bool& bThousand, sal_Bool& IsRed,
+ sal_uInt16& nPrecision, sal_uInt16& nAnzLeading,
LanguageType eLnge = LANGUAGE_DONTKNOW );
/// Check if format code string may be deleted by user
- BOOL IsUserDefined( const String& sStr, LanguageType eLnge = LANGUAGE_DONTKNOW );
+ sal_Bool IsUserDefined( const String& sStr, LanguageType eLnge = LANGUAGE_DONTKNOW );
/** Return the format index of the format code string for language/country,
or NUMBERFORMAT_ENTRY_NOT_FOUND */
@@ -598,14 +598,14 @@ public:
LanguageType eLnge );
/// Whether nFIndex is a special builtin format
- BOOL IsSpecialStandardFormat( sal_uInt32 nFIndex, LanguageType eLnge );
+ sal_Bool IsSpecialStandardFormat( sal_uInt32 nFIndex, LanguageType eLnge );
/// Return the reference date
Date* GetNullDate();
/// Return the standard decimal precision
sal_uInt16 GetStandardPrec();
/// Return whether zero suppression is switched on
- BOOL GetNoZero() { return bNoZero; }
+ sal_Bool GetNoZero() { return bNoZero; }
/** Get the type of a format (or NUMBERFORMAT_UNDEFINED if no entry),
but with NUMBERFORMAT_DEFINED masked out */
short GetType(sal_uInt32 nFIndex);
@@ -616,7 +616,7 @@ public:
SvNumberFormatterIndexTable* MergeFormatter(SvNumberFormatter& rNewTable);
/// Whether a merge table is present or not
- inline BOOL HasMergeFmtTbl() const;
+ inline sal_Bool HasMergeFmtTbl() const;
/// Return the new format index for an old format index, if a merge table exists
inline sal_uInt32 GetMergeFmtIndex( sal_uInt32 nOldFmt ) const;
@@ -626,7 +626,7 @@ public:
SvNumberFormatterMergeMap ConvertMergeTableToMap();
/// Return the last used position ever of a language/country combination
- USHORT GetLastInsertKey(sal_uInt32 CLOffset);
+ sal_uInt16 GetLastInsertKey(sal_uInt32 CLOffset);
/** Return the format index of a builtin format for a specific language/country.
If nFormat is not a builtin format nFormat is returned. */
@@ -659,12 +659,12 @@ public:
The name Year2000 is kept although the actual functionality is now a
TwoDigitYearStart which might be in any century.
*/
- void SetYear2000( USHORT nVal );
- USHORT GetYear2000() const;
- static USHORT GetYear2000Default();
+ void SetYear2000( sal_uInt16 nVal );
+ sal_uInt16 GetYear2000() const;
+ static sal_uInt16 GetYear2000Default();
- USHORT ExpandTwoDigitYear( USHORT nYear ) const;
- inline static USHORT ExpandTwoDigitYear( USHORT nYear, USHORT nTwoDigitYearStart );
+ sal_uInt16 ExpandTwoDigitYear( sal_uInt16 nYear ) const;
+ inline static sal_uInt16 ExpandTwoDigitYear( sal_uInt16 nYear, sal_uInt16 nTwoDigitYearStart );
/// DEPRICATED: Return first character of the decimal separator of the current language/country
sal_Unicode GetDecSep() const { return GetNumDecimalSep().GetChar(0); }
@@ -729,16 +729,16 @@ public:
@return
position of default format
*/
- USHORT GetCurrencyFormatStrings( NfWSStringsDtor&, const NfCurrencyEntry&,
- BOOL bBank ) const;
+ sal_uInt16 GetCurrencyFormatStrings( NfWSStringsDtor&, const NfCurrencyEntry&,
+ sal_Bool bBank ) const;
/** Whether nFormat is of type NUMBERFORMAT_CURRENCY and the format code
contains a new SYMBOLTYPE_CURRENCY and if so which one [$xxx-nnn].
If ppEntry is not NULL and exactly one entry is found, a [$xxx-nnn] is
returned, even if the format code only contains [$xxx] !
*/
- BOOL GetNewCurrencySymbolString( sal_uInt32 nFormat, String& rSymbol,
- const NfCurrencyEntry** ppEntry = NULL, BOOL* pBank = NULL ) const;
+ sal_Bool GetNewCurrencySymbolString( sal_uInt32 nFormat, String& rSymbol,
+ const NfCurrencyEntry** ppEntry = NULL, sal_Bool* pBank = NULL ) const;
/** Look up the corresponding <type>NfCurrencyEntry</type> matching
rSymbol (may be CurrencySymbol or CurrencyAbbreviation) and possibly
@@ -776,9 +776,9 @@ public:
The matching entry if unique (in which case bFoundBank is set),
else <NULL/>.
*/
- static const NfCurrencyEntry* GetCurrencyEntry( BOOL & bFoundBank,
+ static const NfCurrencyEntry* GetCurrencyEntry( sal_Bool & bFoundBank,
const String& rSymbol, const String& rExtension,
- LanguageType eFormatLanguage, BOOL bOnlyStringLanguage = FALSE );
+ LanguageType eFormatLanguage, sal_Bool bOnlyStringLanguage = sal_False );
/// Get compatibility ("automatic" old style) currency from I18N locale data
void GetCompatibilityCurrency( String& rSymbol, String& rAbbrev ) const;
@@ -791,7 +791,7 @@ public:
/** Return a keyword for a language/country and <type>NfKeywordIndex</type>
for XML import, to generate number format strings. */
- String GetKeyword( LanguageType eLnge, USHORT nIndex );
+ String GetKeyword( LanguageType eLnge, sal_uInt16 nIndex );
/** Return the GENERAL keyword in proper case ("General") for a
language/country, used in XML import */
@@ -821,7 +821,7 @@ private:
LanguageType IniLnge; // Initialized setting language/country
LanguageType ActLnge; // Current setting language/country
NfEvalDateFormat eEvalDateFormat; // DateFormat evaluation
- BOOL bNoZero; // Zero value suppression
+ sal_Bool bNoZero; // Zero value suppression
// cached locale data items needed almost any time
String aDecimalSep;
@@ -830,8 +830,8 @@ private:
#ifdef _ZFORLIST_CXX // ----- private Methoden -----
- SVL_DLLPRIVATE static BOOL bCurrencyTableInitialized;
- SVL_DLLPRIVATE static USHORT nSystemCurrencyPosition;
+ SVL_DLLPRIVATE static sal_Bool bCurrencyTableInitialized;
+ SVL_DLLPRIVATE static sal_uInt16 nSystemCurrencyPosition;
SVL_DLLPRIVATE static SvNumberFormatterRegistry_Impl* pFormatterRegistry;
// get the registry, create one if none exists
@@ -842,29 +842,29 @@ private:
// Changes initialized language/country, clears the entries and generates
// new ones, may ONLY be called by the binary file format load
- SVL_DLLPRIVATE void ImpChangeSysCL( LanguageType eLnge, BOOL bLoadingSO5 );
+ SVL_DLLPRIVATE void ImpChangeSysCL( LanguageType eLnge, sal_Bool bLoadingSO5 );
// Generate builtin formats provided by i18n behind CLOffset,
- // if bLoadingSO5==FALSE also generate additional i18n formats.
- SVL_DLLPRIVATE void ImpGenerateFormats( sal_uInt32 CLOffset, BOOL bLoadingSO5 );
+ // if bLoadingSO5==sal_False also generate additional i18n formats.
+ SVL_DLLPRIVATE void ImpGenerateFormats( sal_uInt32 CLOffset, sal_Bool bLoadingSO5 );
// Generate additional formats provided by i18n
SVL_DLLPRIVATE void ImpGenerateAdditionalFormats(
sal_uInt32 CLOffset,
NumberFormatCodeWrapper& rNumberFormatCode,
- BOOL bAfterLoadingSO5 );
+ sal_Bool bAfterLoadingSO5 );
SVL_DLLPRIVATE SvNumberformat* ImpInsertFormat(
const ::com::sun::star::i18n::NumberFormatCode& rCode,
sal_uInt32 nPos,
- BOOL bAfterLoadingSO5 = FALSE,
+ sal_Bool bAfterLoadingSO5 = sal_False,
sal_Int16 nOrgIndex = 0 );
// ImpInsertNewStandardFormat for new (since version ...) builtin formats
SVL_DLLPRIVATE SvNumberformat* ImpInsertNewStandardFormat(
const ::com::sun::star::i18n::NumberFormatCode& rCode,
sal_uInt32 nPos,
- USHORT nVersion,
- BOOL bAfterLoadingSO5 = FALSE,
+ sal_uInt16 nVersion,
+ sal_Bool bAfterLoadingSO5 = sal_False,
sal_Int16 nOrgIndex = 0 );
// Return CLOffset or (MaxCLOffset + SV_COUNTRY_LANGUAGE_OFFSET) if new language/country
@@ -877,7 +877,7 @@ private:
LanguageType eLnge );
// Create builtin formats for language/country if necessary, return CLOffset
- SVL_DLLPRIVATE sal_uInt32 ImpGenerateCL( LanguageType eLnge, BOOL bLoadingSO5 = FALSE );
+ SVL_DLLPRIVATE sal_uInt32 ImpGenerateCL( LanguageType eLnge, sal_Bool bLoadingSO5 = sal_False );
// Build negative currency format, old compatibility style
SVL_DLLPRIVATE void ImpGetNegCurrFormat( String& sNegStr, const String& rCurrSymbol );
@@ -914,16 +914,16 @@ private:
// FormatElement group.
SVL_DLLPRIVATE sal_Int32 ImpAdjustFormatCodeDefault(
::com::sun::star::i18n::NumberFormatCode * pFormatArr,
- sal_Int32 nCount, BOOL bCheckCorrectness = TRUE
+ sal_Int32 nCount, sal_Bool bCheckCorrectness = sal_True
);
// used as a loop body inside of GetNewCurrencySymbolString() and GetCurrencyEntry()
#ifndef DBG_UTIL
inline
#endif
- static BOOL ImpLookupCurrencyEntryLoopBody(
- const NfCurrencyEntry*& pFoundEntry, BOOL& bFoundBank,
- const NfCurrencyEntry* pData, USHORT nPos, const String& rSymbol );
+ static sal_Bool ImpLookupCurrencyEntryLoopBody(
+ const NfCurrencyEntry*& pFoundEntry, sal_Bool& bFoundBank,
+ const NfCurrencyEntry* pData, sal_uInt16 nPos, const String& rSymbol );
// link to be set at <method>SvtSysLocaleOptions::SetCurrencyChangeLink()</method>
DECL_DLLPRIVATE_STATIC_LINK( SvNumberFormatter, CurrencyChangeLink, void* );
@@ -1006,15 +1006,15 @@ inline sal_uInt32 SvNumberFormatter::GetMergeFmtIndex( sal_uInt32 nOldFmt ) cons
return pU ? *pU : nOldFmt;
}
-inline BOOL SvNumberFormatter::HasMergeFmtTbl() const
+inline sal_Bool SvNumberFormatter::HasMergeFmtTbl() const
{
return pMergeTable && (0 != pMergeTable->Count());
}
// static
-inline USHORT SvNumberFormatter::ExpandTwoDigitYear(
- USHORT nYear, USHORT nTwoDigitYearStart )
+inline sal_uInt16 SvNumberFormatter::ExpandTwoDigitYear(
+ sal_uInt16 nYear, sal_uInt16 nTwoDigitYearStart )
{
if ( nYear < 100 )
{
diff --git a/svl/inc/svl/zformat.hxx b/svl/inc/svl/zformat.hxx
index 7c361382796a..f610b44c4b6b 100644
--- a/svl/inc/svl/zformat.hxx
+++ b/svl/inc/svl/zformat.hxx
@@ -78,16 +78,16 @@ struct ImpSvNumberformatInfo // Struct for FormatInfo
{
String* sStrArray; // Array of symbols
short* nTypeArray; // Array of infos
- USHORT nThousand; // Count of group separator sequences
- USHORT nCntPre; // Count of digits before decimal point
- USHORT nCntPost; // Count of digits after decimal point
- USHORT nCntExp; // Count of exponent digits, or AM/PM
+ sal_uInt16 nThousand; // Count of group separator sequences
+ sal_uInt16 nCntPre; // Count of digits before decimal point
+ sal_uInt16 nCntPost; // Count of digits after decimal point
+ sal_uInt16 nCntExp; // Count of exponent digits, or AM/PM
short eScannedType; // Type determined by scan
- BOOL bThousand; // Has group (AKA thousand) separator
+ sal_Bool bThousand; // Has group (AKA thousand) separator
- void Copy( const ImpSvNumberformatInfo& rNumFor, USHORT nAnz );
- void Load(SvStream& rStream, USHORT nAnz);
- void Save(SvStream& rStream, USHORT nAnz) const;
+ void Copy( const ImpSvNumberformatInfo& rNumFor, sal_uInt16 nAnz );
+ void Load(SvStream& rStream, sal_uInt16 nAnz);
+ void Save(SvStream& rStream, sal_uInt16 nAnz) const;
};
// NativeNumber, represent numbers using CJK or other digits if nNum>0,
@@ -95,32 +95,32 @@ struct ImpSvNumberformatInfo // Struct for FormatInfo
class SvNumberNatNum
{
LanguageType eLang;
- BYTE nNum;
- BOOL bDBNum :1; // DBNum, to be converted to NatNum
- BOOL bDate :1; // Used in date? (needed for DBNum/NatNum mapping)
- BOOL bSet :1; // If set, since NatNum0 is possible
+ sal_uInt8 nNum;
+ sal_Bool bDBNum :1; // DBNum, to be converted to NatNum
+ sal_Bool bDate :1; // Used in date? (needed for DBNum/NatNum mapping)
+ sal_Bool bSet :1; // If set, since NatNum0 is possible
public:
- static BYTE MapDBNumToNatNum( BYTE nDBNum, LanguageType eLang, BOOL bDate );
- static BYTE MapNatNumToDBNum( BYTE nNatNum, LanguageType eLang, BOOL bDate );
+ static sal_uInt8 MapDBNumToNatNum( sal_uInt8 nDBNum, LanguageType eLang, sal_Bool bDate );
+ static sal_uInt8 MapNatNumToDBNum( sal_uInt8 nNatNum, LanguageType eLang, sal_Bool bDate );
SvNumberNatNum() : eLang( LANGUAGE_DONTKNOW ), nNum(0),
bDBNum(0), bDate(0), bSet(0) {}
- BOOL IsComplete() const { return bSet && eLang != LANGUAGE_DONTKNOW; }
- BYTE GetRawNum() const { return nNum; }
- BYTE GetNatNum() const { return bDBNum ? MapDBNumToNatNum( nNum, eLang, bDate ) : nNum; }
- BYTE GetDBNum() const { return bDBNum ? nNum : MapNatNumToDBNum( nNum, eLang, bDate ); }
+ sal_Bool IsComplete() const { return bSet && eLang != LANGUAGE_DONTKNOW; }
+ sal_uInt8 GetRawNum() const { return nNum; }
+ sal_uInt8 GetNatNum() const { return bDBNum ? MapDBNumToNatNum( nNum, eLang, bDate ) : nNum; }
+ sal_uInt8 GetDBNum() const { return bDBNum ? nNum : MapNatNumToDBNum( nNum, eLang, bDate ); }
LanguageType GetLang() const { return eLang; }
void SetLang( LanguageType e ) { eLang = e; }
- void SetNum( BYTE nNumber, BOOL bDBNumber )
+ void SetNum( sal_uInt8 nNumber, sal_Bool bDBNumber )
{
nNum = nNumber;
bDBNum = bDBNumber;
- bSet = TRUE;
+ bSet = sal_True;
}
- BOOL IsSet() const { return bSet; }
- void SetDate( BOOL bDateP ) { bDate = (bDateP != 0); }
+ sal_Bool IsSet() const { return bSet; }
+ void SetDate( sal_Bool bDateP ) { bDate = (bDateP != 0); }
};
class CharClass;
@@ -131,7 +131,7 @@ public:
ImpSvNumFor(); // Ctor without filling the Info
~ImpSvNumFor();
- void Enlarge(USHORT nAnz); // Init of arrays to the right size
+ void Enlarge(sal_uInt16 nAnz); // Init of arrays to the right size
void Load( SvStream& rStream, ImpSvNumberformatScan& rSc,
String& rLoadedColorName);
void Save( SvStream& rStream ) const;
@@ -144,7 +144,7 @@ public:
const ImpSvNumberformatInfo& Info() const { return aI; }
// Get count of substrings (symbols)
- USHORT GetnAnz() const { return nAnzStrings;}
+ sal_uInt16 GetnAnz() const { return nAnzStrings;}
Color* GetColor() const { return pColor; }
void SetColor( Color* pCol, String& rName )
@@ -152,22 +152,22 @@ public:
const String& GetColorName() const { return sColorName; }
// new SYMBOLTYPE_CURRENCY in subformat?
- BOOL HasNewCurrency() const;
- BOOL GetNewCurrencySymbol( String& rSymbol, String& rExtension ) const;
+ sal_Bool HasNewCurrency() const;
+ sal_Bool GetNewCurrencySymbol( String& rSymbol, String& rExtension ) const;
void SaveNewCurrencyMap( SvStream& rStream ) const;
void LoadNewCurrencyMap( SvStream& rStream );
// [NatNum1], [NatNum2], ...
- void SetNatNumNum( BYTE nNum, BOOL bDBNum ) { aNatNum.SetNum( nNum, bDBNum ); }
+ void SetNatNumNum( sal_uInt8 nNum, sal_Bool bDBNum ) { aNatNum.SetNum( nNum, bDBNum ); }
void SetNatNumLang( LanguageType eLang ) { aNatNum.SetLang( eLang ); }
- void SetNatNumDate( BOOL bDate ) { aNatNum.SetDate( bDate ); }
+ void SetNatNumDate( sal_Bool bDate ) { aNatNum.SetDate( bDate ); }
const SvNumberNatNum& GetNatNum() const { return aNatNum; }
private:
ImpSvNumberformatInfo aI; // Hilfsstruct fuer die restlichen Infos
String sColorName; // color name
Color* pColor; // pointer to color of subformat
- USHORT nAnzStrings; // count of symbols
+ sal_uInt16 nAnzStrings; // count of symbols
SvNumberNatNum aNatNum; // DoubleByteNumber
};
@@ -184,7 +184,7 @@ public:
ImpSvNumberInputScan* pISc,
xub_StrLen& nCheckPos,
LanguageType& eLan,
- BOOL bStand = FALSE );
+ sal_Bool bStand = sal_False );
// Copy ctor
SvNumberformat( SvNumberformat& rFormat );
@@ -202,16 +202,16 @@ public:
void SetType(const short eSetType) { eType = eSetType; }
// Standard means the I18N defined standard format of this type
- void SetStandard() { bStandard = TRUE; }
- BOOL IsStandard() const { return bStandard; }
+ void SetStandard() { bStandard = sal_True; }
+ sal_Bool IsStandard() const { return bStandard; }
// For versions before version nVer it is UserDefined, for newer versions
// it is builtin. nVer of SV_NUMBERFORMATTER_VERSION_...
- void SetNewStandardDefined( USHORT nVer )
+ void SetNewStandardDefined( sal_uInt16 nVer )
{ nNewStandardDefined = nVer; eType |= NUMBERFORMAT_DEFINED; }
- USHORT GetNewStandardDefined() const { return nNewStandardDefined; }
- BOOL IsAdditionalStandardDefined() const
+ sal_uInt16 GetNewStandardDefined() const { return nNewStandardDefined; }
+ sal_Bool IsAdditionalStandardDefined() const
{ return nNewStandardDefined == SV_NUMBERFORMATTER_VERSION_ADDITIONAL_I18N_FORMATS; }
LanguageType GetLanguage() const { return eLnge;}
@@ -221,12 +221,12 @@ public:
// Build a format string of application defined keywords
String GetMappedFormatstring( const NfKeywordTable& rKeywords,
const LocaleDataWrapper& rLoc,
- BOOL bDontQuote = FALSE ) const;
+ sal_Bool bDontQuote = sal_False ) const;
- void SetUsed(const BOOL b) { bIsUsed = b; }
- BOOL GetUsed() const { return bIsUsed; }
- BOOL IsStarFormatSupported() const { return bStarFlag; }
- void SetStarFormatSupport( BOOL b ) { bStarFlag = b; }
+ void SetUsed(const sal_Bool b) { bIsUsed = b; }
+ sal_Bool GetUsed() const { return bIsUsed; }
+ sal_Bool IsStarFormatSupported() const { return bStarFlag; }
+ void SetStarFormatSupport( sal_Bool b ) { bStarFlag = b; }
NfHackConversion Load( SvStream& rStream, ImpSvNumMultipleReadHeader& rHdr,
SvNumberFormatter* pConverter, ImpSvNumberInputScan& rISc );
@@ -242,54 +242,54 @@ public:
*/
bool GetOutputString( double fNumber, sal_uInt16 nCharCount, String& rOutString ) const;
- BOOL GetOutputString( double fNumber, String& OutString, Color** ppColor );
- BOOL GetOutputString( String& sString, String& OutString, Color** ppColor );
+ sal_Bool GetOutputString( double fNumber, String& OutString, Color** ppColor );
+ sal_Bool GetOutputString( String& sString, String& OutString, Color** ppColor );
// True if type text
- BOOL IsTextFormat() const { return (eType & NUMBERFORMAT_TEXT) != 0; }
+ sal_Bool IsTextFormat() const { return (eType & NUMBERFORMAT_TEXT) != 0; }
// True if 4th subformat present
- BOOL HasTextFormat() const
+ sal_Bool HasTextFormat() const
{
return (NumFor[3].GetnAnz() > 0) ||
(NumFor[3].Info().eScannedType == NUMBERFORMAT_TEXT);
}
- void GetFormatSpecialInfo(BOOL& bThousand,
- BOOL& IsRed,
- USHORT& nPrecision,
- USHORT& nAnzLeading) const;
+ void GetFormatSpecialInfo(sal_Bool& bThousand,
+ sal_Bool& IsRed,
+ sal_uInt16& nPrecision,
+ sal_uInt16& nAnzLeading) const;
/// Count of decimal precision
- USHORT GetFormatPrecision() const { return NumFor[0].Info().nCntPost; }
+ sal_uInt16 GetFormatPrecision() const { return NumFor[0].Info().nCntPost; }
- //! Read/write access on a special USHORT component, may only be used on the
+ //! Read/write access on a special sal_uInt16 component, may only be used on the
//! standard format 0, 5000, ... and only by the number formatter!
- USHORT GetLastInsertKey() const
+ sal_uInt16 GetLastInsertKey() const
{ return NumFor[0].Info().nThousand; }
- void SetLastInsertKey(USHORT nKey)
+ void SetLastInsertKey(sal_uInt16 nKey)
{ NumFor[0].Info().nThousand = nKey; }
//! Only onLoad: convert from stored to current system language/country
void ConvertLanguage( SvNumberFormatter& rConverter,
- LanguageType eConvertFrom, LanguageType eConvertTo, BOOL bSystem = FALSE );
+ LanguageType eConvertFrom, LanguageType eConvertTo, sal_Bool bSystem = sal_False );
// Substring of a subformat code nNumFor (0..3)
// nPos == 0xFFFF => last substring
- // bString==TRUE: first/last SYMBOLTYPE_STRING or SYMBOLTYPE_CURRENCY
- const String* GetNumForString( USHORT nNumFor, USHORT nPos,
- BOOL bString = FALSE ) const;
+ // bString==sal_True: first/last SYMBOLTYPE_STRING or SYMBOLTYPE_CURRENCY
+ const String* GetNumForString( sal_uInt16 nNumFor, sal_uInt16 nPos,
+ sal_Bool bString = sal_False ) const;
// Subtype of a subformat code nNumFor (0..3)
// nPos == 0xFFFF => last substring
- // bString==TRUE: first/last SYMBOLTYPE_STRING or SYMBOLTYPE_CURRENCY
- short GetNumForType( USHORT nNumFor, USHORT nPos, BOOL bString = FALSE ) const;
+ // bString==sal_True: first/last SYMBOLTYPE_STRING or SYMBOLTYPE_CURRENCY
+ short GetNumForType( sal_uInt16 nNumFor, sal_uInt16 nPos, sal_Bool bString = sal_False ) const;
/** If the count of string elements (substrings, ignoring [modifiers] and
so on) in a subformat code nNumFor (0..3) is equal to the given number.
Used by ImpSvNumberInputScan::IsNumberFormatMain() to detect a matched
format. */
- BOOL IsNumForStringElementCountEqual( USHORT nNumFor, USHORT nAllCount,
- USHORT nNumCount ) const
+ sal_Bool IsNumForStringElementCountEqual( sal_uInt16 nNumFor, sal_uInt16 nAllCount,
+ sal_uInt16 nNumCount ) const
{
if ( nNumFor < 4 )
{
@@ -298,19 +298,19 @@ public:
// strings of the format were matched and not just the starting
// sequence, so we don't have to check if GetnAnz() includes
// [modifiers] or anything else if both counts are equal.
- USHORT nCnt = NumFor[nNumFor].GetnAnz();
+ sal_uInt16 nCnt = NumFor[nNumFor].GetnAnz();
if ( nAllCount == nCnt )
- return TRUE;
+ return sal_True;
if ( nAllCount < nCnt ) // check ignoring [modifiers] and so on
return ImpGetNumForStringElementCount( nNumFor ) ==
(nAllCount - nNumCount);
}
- return FALSE;
+ return sal_False;
}
// Whether the second subformat code is really for negative numbers
// or another limit set.
- BOOL IsNegativeRealNegative() const
+ sal_Bool IsNegativeRealNegative() const
{
return fLimit1 == 0.0 && fLimit2 == 0.0 &&
( (eOp1 == NUMBERFORMAT_OP_GE && eOp2 == NUMBERFORMAT_OP_NO) ||
@@ -319,37 +319,37 @@ public:
}
// Whether the negative format is without a sign or not
- BOOL IsNegativeWithoutSign() const;
+ sal_Bool IsNegativeWithoutSign() const;
// Whether a new SYMBOLTYPE_CURRENCY is contained in the format
- BOOL HasNewCurrency() const;
+ sal_Bool HasNewCurrency() const;
// Build string from NewCurrency for saving it SO50 compatible
void Build50Formatstring( String& rStr ) const;
// strip [$-yyy] from all [$xxx-yyy] leaving only xxx's,
- // if bQuoteSymbol==TRUE the xxx will become "xxx"
+ // if bQuoteSymbol==sal_True the xxx will become "xxx"
static String StripNewCurrencyDelimiters( const String& rStr,
- BOOL bQuoteSymbol );
+ sal_Bool bQuoteSymbol );
// If a new SYMBOLTYPE_CURRENCY is contained if the format is of type
// NUMBERFORMAT_CURRENCY, and if so the symbol xxx and the extension nnn
// of [$xxx-nnn] are returned
- BOOL GetNewCurrencySymbol( String& rSymbol, String& rExtension ) const;
+ sal_Bool GetNewCurrencySymbol( String& rSymbol, String& rExtension ) const;
- static BOOL HasStringNegativeSign( const String& rStr );
+ static sal_Bool HasStringNegativeSign( const String& rStr );
/**
Whether a character at position nPos is somewhere between two matching
cQuote or not.
- If nPos points to a cQuote, a TRUE is returned on an opening cQuote,
- a FALSE is returned on a closing cQuote.
+ If nPos points to a cQuote, a sal_True is returned on an opening cQuote,
+ a sal_False is returned on a closing cQuote.
A cQuote between quotes may be escaped by a cEscIn, a cQuote outside of
quotes may be escaped by a cEscOut.
The default '\0' results in no escapement possible.
Defaults are set right according to the "unlogic" of the Numberformatter
*/
- static BOOL IsInQuote( const String& rString, xub_StrLen nPos,
+ static sal_Bool IsInQuote( const String& rString, xub_StrLen nPos,
sal_Unicode cQuote = '"',
sal_Unicode cEscIn = '\0', sal_Unicode cEscOut = '\\' );
@@ -401,23 +401,23 @@ public:
// used in XML export
void GetConditions( SvNumberformatLimitOps& rOper1, double& rVal1,
SvNumberformatLimitOps& rOper2, double& rVal2 ) const;
- Color* GetColor( USHORT nNumFor ) const;
- void GetNumForInfo( USHORT nNumFor, short& rScannedType,
- BOOL& bThousand, USHORT& nPrecision, USHORT& nAnzLeading ) const;
+ Color* GetColor( sal_uInt16 nNumFor ) const;
+ void GetNumForInfo( sal_uInt16 nNumFor, short& rScannedType,
+ sal_Bool& bThousand, sal_uInt16& nPrecision, sal_uInt16& nAnzLeading ) const;
// rAttr.Number not empty if NatNum attributes are to be stored
void GetNatNumXml(
::com::sun::star::i18n::NativeNumberXmlAttributes& rAttr,
- USHORT nNumFor ) const;
+ sal_uInt16 nNumFor ) const;
/** @returns <TRUE/> if E,EE,R,RR,AAA,AAAA in format code of subformat
nNumFor (0..3) and <b>no</b> preceding calendar was specified and the
currently loaded calendar is "gregorian". */
- BOOL IsOtherCalendar( USHORT nNumFor ) const
+ sal_Bool IsOtherCalendar( sal_uInt16 nNumFor ) const
{
if ( nNumFor < 4 )
return ImpIsOtherCalendar( NumFor[nNumFor] );
- return FALSE;
+ return sal_False;
}
/** Switches to the first non-"gregorian" calendar, but only if the current
@@ -439,13 +439,13 @@ public:
<TRUE/> if a calendar was specified and switched to,
<FALSE/> else.
*/
- BOOL SwitchToSpecifiedCalendar( String& rOrgCalendar, double& fOrgDateTime,
- USHORT nNumFor ) const
+ sal_Bool SwitchToSpecifiedCalendar( String& rOrgCalendar, double& fOrgDateTime,
+ sal_uInt16 nNumFor ) const
{
if ( nNumFor < 4 )
return ImpSwitchToSpecifiedCalendar( rOrgCalendar,
fOrgDateTime, NumFor[nNumFor] );
- return FALSE;
+ return sal_False;
}
private:
@@ -458,17 +458,17 @@ private:
LanguageType eLnge; // Language/country of the format
SvNumberformatLimitOps eOp1; // Operator for first condition
SvNumberformatLimitOps eOp2; // Operator for second condition
- USHORT nNewStandardDefined; // new builtin formats as of version 6
+ sal_uInt16 nNewStandardDefined; // new builtin formats as of version 6
short eType; // Type of format
- BOOL bStarFlag; // Take *n format as ESC n
- BOOL bStandard; // If this is a default standard format
- BOOL bIsUsed; // Flag as used for storing
+ sal_Bool bStarFlag; // Take *n format as ESC n
+ sal_Bool bStandard; // If this is a default standard format
+ sal_Bool bIsUsed; // Flag as used for storing
- SVL_DLLPRIVATE USHORT ImpGetNumForStringElementCount( USHORT nNumFor ) const;
+ SVL_DLLPRIVATE sal_uInt16 ImpGetNumForStringElementCount( sal_uInt16 nNumFor ) const;
- SVL_DLLPRIVATE BOOL ImpIsOtherCalendar( const ImpSvNumFor& rNumFor ) const;
+ SVL_DLLPRIVATE sal_Bool ImpIsOtherCalendar( const ImpSvNumFor& rNumFor ) const;
- SVL_DLLPRIVATE BOOL ImpSwitchToSpecifiedCalendar( String& rOrgCalendar,
+ SVL_DLLPRIVATE sal_Bool ImpSwitchToSpecifiedCalendar( String& rOrgCalendar,
double& fOrgDateTime, const ImpSvNumFor& rNumFor ) const;
#ifdef _ZFORMAT_CXX // ----- private implementation methods -----
@@ -504,25 +504,25 @@ private:
double& fLimit,
SvNumberformatLimitOps eOp);
- SVL_DLLPRIVATE ULONG ImpGGT(ULONG x, ULONG y);
- SVL_DLLPRIVATE ULONG ImpGGTRound(ULONG x, ULONG y);
+ SVL_DLLPRIVATE sal_uLong ImpGGT(sal_uLong x, sal_uLong y);
+ SVL_DLLPRIVATE sal_uLong ImpGGTRound(sal_uLong x, sal_uLong y);
// Helper function for number strings
// append string symbols, insert leading 0 or ' ', or ...
- SVL_DLLPRIVATE BOOL ImpNumberFill( String& sStr,
+ SVL_DLLPRIVATE sal_Bool ImpNumberFill( String& sStr,
double& rNumber,
xub_StrLen& k,
- USHORT& j,
- USHORT nIx,
+ sal_uInt16& j,
+ sal_uInt16 nIx,
short eSymbolType );
// Helper function to fill in the integer part and the group (AKA thousand) separators
- SVL_DLLPRIVATE BOOL ImpNumberFillWithThousands( String& sStr,
+ SVL_DLLPRIVATE sal_Bool ImpNumberFillWithThousands( String& sStr,
double& rNumber,
xub_StrLen k,
- USHORT j,
- USHORT nIx,
- USHORT nDigCnt );
+ sal_uInt16 j,
+ sal_uInt16 nIx,
+ sal_uInt16 nDigCnt );
// Hilfsfunktion zum Auffuellen der Vor-
// kommazahl auch mit Tausenderpunkt
@@ -531,18 +531,18 @@ private:
SVL_DLLPRIVATE void ImpDigitFill( String& sStr,
xub_StrLen nStart,
xub_StrLen& k,
- USHORT nIx,
+ sal_uInt16 nIx,
xub_StrLen & nDigitCount,
utl::DigitGroupingIterator & );
- SVL_DLLPRIVATE BOOL ImpGetDateOutput( double fNumber,
- USHORT nIx,
+ SVL_DLLPRIVATE sal_Bool ImpGetDateOutput( double fNumber,
+ sal_uInt16 nIx,
String& OutString );
- SVL_DLLPRIVATE BOOL ImpGetTimeOutput( double fNumber,
- USHORT nIx,
+ SVL_DLLPRIVATE sal_Bool ImpGetTimeOutput( double fNumber,
+ sal_uInt16 nIx,
String& OutString );
- SVL_DLLPRIVATE BOOL ImpGetDateTimeOutput( double fNumber,
- USHORT nIx,
+ SVL_DLLPRIVATE sal_Bool ImpGetDateTimeOutput( double fNumber,
+ sal_uInt16 nIx,
String& OutString );
// Switches to the "gregorian" calendar if the current calendar is
@@ -550,7 +550,7 @@ private:
// know a "before" era (like zh_TW ROC or ja_JP Gengou). If switched and
// rOrgCalendar was "gregorian" the string is emptied. If rOrgCalendar was
// empty the previous calendar name and date/time are returned.
- SVL_DLLPRIVATE BOOL ImpFallBackToGregorianCalendar( String& rOrgCalendar, double& fOrgDateTime );
+ SVL_DLLPRIVATE sal_Bool ImpFallBackToGregorianCalendar( String& rOrgCalendar, double& fOrgDateTime );
// Append a "G" short era string of the given calendar. In the case of a
// Gengou calendar this is a one character abbreviation, for other
@@ -558,8 +558,8 @@ private:
SVL_DLLPRIVATE static void ImpAppendEraG( String& OutString, const CalendarWrapper& rCal,
sal_Int16 nNatNum );
- SVL_DLLPRIVATE BOOL ImpGetNumberOutput( double fNumber,
- USHORT nIx,
+ SVL_DLLPRIVATE sal_Bool ImpGetNumberOutput( double fNumber,
+ sal_uInt16 nIx,
String& OutString );
SVL_DLLPRIVATE void ImpCopyNumberformat( const SvNumberformat& rFormat );
@@ -567,9 +567,9 @@ private:
// normal digits or other digits, depending on ImpSvNumFor.aNatNum,
// [NatNum1], [NatNum2], ...
SVL_DLLPRIVATE String ImpGetNatNumString( const SvNumberNatNum& rNum, sal_Int32 nVal,
- USHORT nMinDigits = 0 ) const;
+ sal_uInt16 nMinDigits = 0 ) const;
- String ImpIntToString( USHORT nIx, sal_Int32 nVal, USHORT nMinDigits = 0 ) const
+ String ImpIntToString( sal_uInt16 nIx, sal_Int32 nVal, sal_uInt16 nMinDigits = 0 ) const
{
const SvNumberNatNum& rNum = NumFor[nIx].GetNatNum();
if ( nMinDigits || rNum.IsComplete() )
diff --git a/svl/prj/build.lst b/svl/prj/build.lst
index 09acc768cb13..999cdf8947de 100644
--- a/svl/prj/build.lst
+++ b/svl/prj/build.lst
@@ -1,4 +1,2 @@
-sl svl : l10n rsc offuh ucbhelper unotools cppu cppuhelper comphelper sal sot LIBXSLT:libxslt NULL
-sl svl usr1 - all svl_mkout NULL
+sl svl : L10N:l10n rsc offuh ucbhelper unotools cppu cppuhelper comphelper sal sot LIBXSLT:libxslt NULL
sl svl\prj nmake - all svl_prj NULL
-sl svl\qa\complex\passwordcontainer nmake - all svl_qa_complex_passwordcontainer NULL
diff --git a/svl/prj/makefile.mk b/svl/prj/makefile.mk
index c73a3d944bbf..e312a7ccab65 100644
--- a/svl/prj/makefile.mk
+++ b/svl/prj/makefile.mk
@@ -37,4 +37,4 @@ VERBOSEFLAG := -s
.ENDIF
all:
- cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET)
+ cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog
diff --git a/svl/qa/complex/passwordcontainer/makefile.mk b/svl/qa/complex/passwordcontainer/makefile.mk
deleted file mode 100644
index 625404682761..000000000000
--- a/svl/qa/complex/passwordcontainer/makefile.mk
+++ /dev/null
@@ -1,134 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
-nothing .PHONY:
-.ELSE
-
-PRJ = ../../..
-PRJNAME = svl
-TARGET = qa_complex_passwordcontainer
-
-.IF "$(OOO_JUNIT_JAR)" != ""
-PACKAGE = complex/passwordcontainer
-
-# here store only Files which contain a @Test
-JAVATESTFILES = \
- PasswordContainerUnitTest.java
-
-
-# put here all other files
-JAVAFILES = $(JAVATESTFILES) \
- PasswordContainerTest.java\
- Test01.java\
- Test02.java\
- Test03.java\
- TestHelper.java\
- MasterPasswdHandler.java
-
-
-JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar
-EXTRAJARFILES = $(OOO_JUNIT_JAR)
-
-# Sample how to debug
-# JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y
-
-.END
-
-.INCLUDE: settings.mk
-.INCLUDE: target.mk
-.INCLUDE: installationtest.mk
-
-ALLTAR : javatest
-
-.END
-
-
-#
-#
-#
-#
-# PRJ = ..$/..$/..
-# TARGET = PasswordContainerUnitTest
-# PRJNAME=svl
-# PACKAGE = complex$/passwordcontainer
-#
-# # --- Settings -----------------------------------------------------
-# .INCLUDE: settings.mk
-#
-#
-# #----- compile .java files -----------------------------------------
-#
-# JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
-#
-# JAVAFILES =\
-# PasswordContainerUnitTest.java\
-# PasswordContainerTest.java\
-# TestHelper.java\
-# Test01.java\
-# Test02.java\
-# Test03.java\
-# MasterPasswdHandler.java
-#
-# JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
-#
-# #----- make a jar from compiled files ------------------------------
-#
-# MAXLINELENGTH = 100000
-#
-# JARCLASSDIRS = $(PACKAGE)
-# JARTARGET = $(TARGET).jar
-# JARCOMPRESS = TRUE
-#
-# # --- Parameters for the test --------------------------------------
-#
-# # start an office if the parameter is set for the makefile
-# .IF "$(OFFICE)" == ""
-# CT_APPEXECCOMMAND =
-# .ELSE
-# CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;"
-# .ENDIF
-#
-# # test base is java complex
-# CT_TESTBASE = -TestBase java_complex
-#
-# # test looks something like the.full.package.TestName
-# CT_TEST = -o $(PACKAGE:s\$/\.\).$(JAVAFILES:b)
-#
-# # start the runner application
-# CT_APP = org.openoffice.Runner
-#
-# # --- Targets ------------------------------------------------------
-#
-# .INCLUDE: target.mk
-#
-# RUN: run
-#
-# run:
-# +java -cp $(CLASSPATH) $(CT_APP) $(CT_TESTBASE) $(CT_APPEXECCOMMAND) $(CT_TEST)
-#
-#
diff --git a/svl/source/config/languageoptions.cxx b/svl/source/config/languageoptions.cxx
index 8f9aabd59500..9d9a31b85b40 100644
--- a/svl/source/config/languageoptions.cxx
+++ b/svl/source/config/languageoptions.cxx
@@ -211,7 +211,7 @@ sal_uInt16 SvtLanguageOptions::GetScriptTypeOfLanguage( sal_uInt16 nLang )
nLang = SvtSysLocale().GetLanguage();
sal_Int16 nScriptType = MsLangId::getScriptType( nLang );
- USHORT nScript;
+ sal_uInt16 nScript;
switch (nScriptType)
{
case ::com::sun::star::i18n::ScriptType::ASIAN:
diff --git a/svl/source/filerec/filerec.cxx b/svl/source/filerec/filerec.cxx
index 0d1b06be5d11..9e5a8b2027f9 100644
--- a/svl/source/filerec/filerec.cxx
+++ b/svl/source/filerec/filerec.cxx
@@ -32,12 +32,12 @@
//========================================================================
-SV_IMPL_VARARR( SfxUINT32s, UINT32 );
+SV_IMPL_VARARR( SfxUINT32s, sal_uInt32 );
//========================================================================
-/* Die folgenden Makros extrahieren Teilbereiche aus einem UINT32 Wert.
- Diese UINT32-Werte werden anstelle der einzelnen Werte gestreamt,
+/* Die folgenden Makros extrahieren Teilbereiche aus einem sal_uInt32 Wert.
+ Diese sal_uInt32-Werte werden anstelle der einzelnen Werte gestreamt,
um Calls zu sparen.
*/
@@ -52,33 +52,33 @@ SV_IMPL_VARARR( SfxUINT32s, UINT32 );
//-------------------------------------------------------------------------
-/* Die folgenden Makros setzen Teilbereiche zu einem UINT32 Wert zusammen.
- Diese UINT32-Werte werden anstelle der einzelnen Werte gestreamt,
+/* Die folgenden Makros setzen Teilbereiche zu einem sal_uInt32 Wert zusammen.
+ Diese sal_uInt32-Werte werden anstelle der einzelnen Werte gestreamt,
um Calls zu sparen.
*/
#define SFX_REC_MINI_HEADER(nPreTag,nStartPos,nEndPos) \
- ( UINT32(nPreTag) | \
- UINT32(nEndPos-nStartPos-SFX_REC_HEADERSIZE_MINI) << 8 )
+ ( sal_uInt32(nPreTag) | \
+ sal_uInt32(nEndPos-nStartPos-SFX_REC_HEADERSIZE_MINI) << 8 )
#define SFX_REC_HEADER(nRecType,nContentTag,nContentVer) \
- ( UINT32(nRecType) | \
- ( UINT32(nContentVer) << 8 ) | \
- ( UINT32(nContentTag) << 16 ) )
+ ( sal_uInt32(nRecType) | \
+ ( sal_uInt32(nContentVer) << 8 ) | \
+ ( sal_uInt32(nContentTag) << 16 ) )
#define SFX_REC_CONTENT_HEADER(nContentVer,n1StStartPos,nCurStartPos) \
- ( UINT32(nContentVer) | \
- UINT32( nCurStartPos - n1StStartPos ) << 8 )
+ ( sal_uInt32(nContentVer) | \
+ sal_uInt32( nCurStartPos - n1StStartPos ) << 8 )
//=========================================================================
-UINT32 SfxMiniRecordWriter::Close
+sal_uInt32 SfxMiniRecordWriter::Close
(
- FASTBOOL bSeekToEndOfRec /* TRUE (default)
+ FASTBOOL bSeekToEndOfRec /* sal_True (default)
Der Stream wird an das Ende des Records
positioniert.
- FALSE
+ sal_False
Der Stream wird an den Anfang des
Contents (also hinter den Header)
positioniert.
@@ -95,9 +95,9 @@ UINT32 SfxMiniRecordWriter::Close
[R"uckgabewert]
- UINT32 != 0
+ sal_uInt32 != 0
Position im Stream, die direkt hinter dem Record liegt.
- 'bSeekToEndOfRecord==TRUE'
+ 'bSeekToEndOfRecord==sal_True'
=> R"uckgabewert == aktuelle Stream-Position nach Aufruf
== 0
@@ -109,7 +109,7 @@ UINT32 SfxMiniRecordWriter::Close
if ( !_bHeaderOk )
{
// Header an den Anfang des Records schreiben
- UINT32 nEndPos = _pStream->Tell();
+ sal_uInt32 nEndPos = _pStream->Tell();
_pStream->Seek( _nStartPos );
*_pStream << SFX_REC_MINI_HEADER( _nPreTag, _nStartPos, nEndPos );
@@ -118,7 +118,7 @@ UINT32 SfxMiniRecordWriter::Close
_pStream->Seek( nEndPos );
// Header wurde JETZT geschrieben
- _bHeaderOk = TRUE;
+ _bHeaderOk = sal_True;
return nEndPos;
}
#ifdef DBG_UTIL
@@ -126,14 +126,14 @@ UINT32 SfxMiniRecordWriter::Close
else if ( SFX_BOOL_DONTCARE == _bHeaderOk )
{
// Header auslesen, um Soll-Gr"o\se zu bestimmen
- UINT32 nEndPos = _pStream->Tell();
+ sal_uInt32 nEndPos = _pStream->Tell();
_pStream->Seek( _nStartPos );
- UINT32 nHeader;
+ sal_uInt32 nHeader;
*_pStream >> nHeader;
_pStream->Seek( nEndPos );
// Soll-Gr"o\se mit Ist-Gr"o\se vergleichen
- DBG_ASSERT( nEndPos - SFX_REC_OFS(nHeader) == _nStartPos + sizeof(UINT32),
+ DBG_ASSERT( nEndPos - SFX_REC_OFS(nHeader) == _nStartPos + sizeof(sal_uInt32),
"fixed record size incorrect" );
DbgOutf( "SfxFileRec: written record until %ul", nEndPos );
}
@@ -145,7 +145,7 @@ UINT32 SfxMiniRecordWriter::Close
//=========================================================================
-USHORT SfxMiniRecordReader::ScanRecordType
+sal_uInt16 SfxMiniRecordReader::ScanRecordType
(
SvStream* pStream /* <SvStream> an dessen aktueller Position
ein Record liegt, dessen Typ erkannt werden
@@ -175,7 +175,7 @@ USHORT SfxMiniRecordReader::ScanRecordType
[R"uckgabewert]
- USHORT SFX_REC_TYPE_EOR
+ sal_uInt16 SFX_REC_TYPE_EOR
An der aktuellen Position des Streams
steht eine End-Of-Records-Kennung.
@@ -224,7 +224,7 @@ USHORT SfxMiniRecordReader::ScanRecordType
*pStream >> nHeader;
// k"onnte es sich um einen extended-Record handeln?
- USHORT nPreTag = sal::static_int_cast< USHORT >(SFX_REC_PRE(nHeader));
+ sal_uInt16 nPreTag = sal::static_int_cast< sal_uInt16 >(SFX_REC_PRE(nHeader));
if ( SFX_REC_PRETAG_EXT == nPreTag )
{
// die n"achsten 4 Bytes als extended-Header lesen
@@ -234,7 +234,7 @@ USHORT SfxMiniRecordReader::ScanRecordType
pStream->SeekRel(-8);
// liegt eine g"ultige Record-Kennung vor?
- USHORT nType = sal::static_int_cast< USHORT >(SFX_REC_TYP(nHeader));
+ sal_uInt16 nType = sal::static_int_cast< sal_uInt16 >(SFX_REC_TYP(nHeader));
if ( nType >= SFX_REC_TYPE_FIRST && nType <= SFX_REC_TYPE_LAST )
// entsprechenden extended-Record-Typ zur"uckliefern
return nType;
@@ -251,7 +251,7 @@ USHORT SfxMiniRecordReader::ScanRecordType
return nPreTag;
// liegt ein Drawin-Engine-Record vor?
- if ( nHeader == UINT32(*"DRMD") || nHeader == UINT32(*"DRVW") )
+ if ( nHeader == sal_uInt32(*"DRMD") || nHeader == sal_uInt32(*"DRVW") )
return SFX_REC_TYPE_DRAWENG;
// alle anderen sind grunds"atzlich g"ultige Mini-Records
@@ -260,29 +260,29 @@ USHORT SfxMiniRecordReader::ScanRecordType
//-------------------------------------------------------------------------
-FASTBOOL SfxMiniRecordReader::SetHeader_Impl( UINT32 nHeader )
+FASTBOOL SfxMiniRecordReader::SetHeader_Impl( sal_uInt32 nHeader )
/* [Beschreibung]
Interne Methode zum nachtr"aglichen Verarbeiten eines extern gelesenen
Headers. Falls der Header eine End-Of-Records-Kennung darstellt,
- wird am Stream ein Errorcode gesetzt und FALSE zur"uckgeliefert. Im
+ wird am Stream ein Errorcode gesetzt und sal_False zur"uckgeliefert. Im
Fehlerfall wird der Stream jedoch nicht auf den Record-Anfang zur"uck-
gesetzt.
*/
{
- FASTBOOL bRet = TRUE;
+ FASTBOOL bRet = sal_True;
// Record-Ende und Pre-Tag aus dem Header ermitteln
_nEofRec = _pStream->Tell() + SFX_REC_OFS(nHeader);
- _nPreTag = sal::static_int_cast< BYTE >(SFX_REC_PRE(nHeader));
+ _nPreTag = sal::static_int_cast< sal_uInt8 >(SFX_REC_PRE(nHeader));
// wenn End-Of-Record-Kennung, dann Fehler
if ( _nPreTag == SFX_REC_PRETAG_EOR )
{
_pStream->SetError( ERRCODE_IO_WRONGFORMAT );
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
@@ -309,12 +309,12 @@ SfxMiniRecordReader::SfxMiniRecordReader
*/
: _pStream( pStream ),
- _bSkipped( FALSE )
+ _bSkipped( sal_False )
{
// Header einlesen
- UINT32 nStartPos = pStream->Tell(); // um im Fehlerfall zur"uck zu-seeken
+ sal_uInt32 nStartPos = pStream->Tell(); // um im Fehlerfall zur"uck zu-seeken
DBG( DbgOutf( "SfxFileRec: reading record at %ul", nStartPos ) );
- UINT32 nHeader;
+ sal_uInt32 nHeader;
*pStream >> nHeader;
// Headerdaten extrahieren
@@ -337,7 +337,7 @@ SfxMiniRecordReader::SfxMiniRecordReader
Position sich ein <SfxMiniRecord>
befindet.
*/
- BYTE nTag // Pre-Tag des gew"unschten Records
+ sal_uInt8 nTag // Pre-Tag des gew"unschten Records
)
/* [Beschreibung]
@@ -350,13 +350,13 @@ SfxMiniRecordReader::SfxMiniRecordReader
Wird das Ende des Streams oder die Kennung SFX_REC_PRETAG_EOR
erreicht, bevor ein Record mit dem ge"unschten Pre-Tag gefunden wird,
- ist die erzeugte Instanz ung"ultig ('IsValid() == FALSE'). Ein ent-
+ ist die erzeugte Instanz ung"ultig ('IsValid() == sal_False'). Ein ent-
sprechender Error-Code (ERRCODE_IO_EOF bzw. ERRCODE_IO_WRONGFORMAT)
ist dann am Stream gesetzt, dessen Position ist dann au\serdem unver-
"andert.
Bei 'nTag==SFX_FILEREC_PRETAG_EOR' wird nicht versucht, einen Record
- zu lesen, es wird sofort 'IsValid()' auf FALSE gesetzt und kein Error-Code
+ zu lesen, es wird sofort 'IsValid()' auf sal_False gesetzt und kein Error-Code
am Stream gesetzt. Dies ist dauzu gedacht, ohne 'new' und 'delete'
abw"rtskompatibel SfxMiniRecords einbauen zu k"onnen. Siehe dazu
<SfxItemSet::Load()>.
@@ -384,14 +384,14 @@ SfxMiniRecordReader::SfxMiniRecordReader
}
// StartPos merken, um im Fehlerfall zur"uck-seeken zu k"onnen
- UINT32 nStartPos = pStream->Tell();
+ sal_uInt32 nStartPos = pStream->Tell();
// passenden Record suchen
- while(TRUE)
+ while(sal_True)
{
// Header lesen
DBG( DbgOutf( "SfxFileRec: searching record at %ul", pStream->Tell() ) );
- UINT32 nHeader;
+ sal_uInt32 nHeader;
*pStream >> nHeader;
// Headerdaten von Basisklasse extrahieren lassen
@@ -423,10 +423,10 @@ SfxMiniRecordReader::SfxMiniRecordReader
SfxSingleRecordWriter::SfxSingleRecordWriter
(
- BYTE nRecordType, // f"ur Subklassen
+ sal_uInt8 nRecordType, // f"ur Subklassen
SvStream* pStream, // Stream, in dem der Record angelegt wird
- UINT16 nContentTag, // Inhalts-Art-Kennung
- BYTE nContentVer // Inhalts-Versions-Kennung
+ sal_uInt16 nContentTag, // Inhalts-Art-Kennung
+ sal_uInt8 nContentVer // Inhalts-Versions-Kennung
)
/* [Beschreibung]
@@ -445,8 +445,8 @@ SfxSingleRecordWriter::SfxSingleRecordWriter
SfxSingleRecordWriter::SfxSingleRecordWriter
(
SvStream* pStream, // Stream, in dem der Record angelegt wird
- UINT16 nContentTag, // Inhalts-Art-Kennung
- BYTE nContentVer // Inhalts-Versions-Kennung
+ sal_uInt16 nContentTag, // Inhalts-Art-Kennung
+ sal_uInt8 nContentVer // Inhalts-Versions-Kennung
)
/* [Beschreibung]
@@ -467,9 +467,9 @@ SfxSingleRecordWriter::SfxSingleRecordWriter
SfxSingleRecordWriter::SfxSingleRecordWriter
(
SvStream* pStream, // Stream, in dem der Record angelegt wird
- UINT16 nContentTag, // Inhalts-Art-Kennung
- BYTE nContentVer, // Inhalts-Versions-Kennung
- UINT32 nContentSize // Gr"o\se des Inhalts in Bytes
+ sal_uInt16 nContentTag, // Inhalts-Art-Kennung
+ sal_uInt8 nContentVer, // Inhalts-Versions-Kennung
+ sal_uInt32 nContentSize // Gr"o\se des Inhalts in Bytes
)
/* [Beschreibung]
@@ -487,7 +487,7 @@ SfxSingleRecordWriter::SfxSingleRecordWriter
//=========================================================================
-inline FASTBOOL SfxSingleRecordReader::ReadHeader_Impl( USHORT nTypes )
+inline FASTBOOL SfxSingleRecordReader::ReadHeader_Impl( sal_uInt16 nTypes )
/* [Beschreibung]
@@ -501,19 +501,19 @@ inline FASTBOOL SfxSingleRecordReader::ReadHeader_Impl( USHORT nTypes )
FASTBOOL bRet;
// Basisklassen-Header einlesen
- UINT32 nHeader=0;
+ sal_uInt32 nHeader=0;
*_pStream >> nHeader;
if ( !SetHeader_Impl( nHeader ) )
- bRet = FALSE;
+ bRet = sal_False;
else
{
// eigenen Header einlesen
*_pStream >> nHeader;
- _nRecordVer = sal::static_int_cast< BYTE >(SFX_REC_VER(nHeader));
- _nRecordTag = sal::static_int_cast< UINT16 >(SFX_REC_TAG(nHeader));
+ _nRecordVer = sal::static_int_cast< sal_uInt8 >(SFX_REC_VER(nHeader));
+ _nRecordTag = sal::static_int_cast< sal_uInt16 >(SFX_REC_TAG(nHeader));
// falscher Record-Typ?
- _nRecordType = sal::static_int_cast< BYTE >(SFX_REC_TYP(nHeader));
+ _nRecordType = sal::static_int_cast< sal_uInt8 >(SFX_REC_TYP(nHeader));
bRet = 0 != ( nTypes & _nRecordType);
}
return bRet;
@@ -526,7 +526,7 @@ SfxSingleRecordReader::SfxSingleRecordReader( SvStream *pStream )
{
// Startposition merken, um im Fehlerfall zur"uck-seeken zu k"onnen
#ifdef DBG_UTIL
- UINT32 nStartPos = pStream->Tell();
+ sal_uInt32 nStartPos = pStream->Tell();
DBG( DbgOutf( "SfxFileRec: reading record at %ul", nStartPos ) );
#endif
@@ -544,10 +544,10 @@ SfxSingleRecordReader::SfxSingleRecordReader( SvStream *pStream )
//-------------------------------------------------------------------------
-SfxSingleRecordReader::SfxSingleRecordReader( SvStream *pStream, USHORT nTag )
+SfxSingleRecordReader::SfxSingleRecordReader( SvStream *pStream, sal_uInt16 nTag )
{
// StartPos merken, um im Fehlerfall zur"uck-seeken zu k"onnen
- UINT32 nStartPos = pStream->Tell();
+ sal_uInt32 nStartPos = pStream->Tell();
// richtigen Record suchen, ggf. Error-Code setzen und zur"uck-seeken
Construct_Impl( pStream );
@@ -563,8 +563,8 @@ SfxSingleRecordReader::SfxSingleRecordReader( SvStream *pStream, USHORT nTag )
FASTBOOL SfxSingleRecordReader::FindHeader_Impl
(
- UINT16 nTypes, // arithm. Veroderung erlaubter Record-Typen
- UINT16 nTag // zu findende Record-Art-Kennung
+ sal_uInt16 nTypes, // arithm. Veroderung erlaubter Record-Typen
+ sal_uInt16 nTag // zu findende Record-Art-Kennung
)
/* [Beschreibung]
@@ -574,18 +574,18 @@ FASTBOOL SfxSingleRecordReader::FindHeader_Impl
gekennzeichnet ist.
Kann ein solcher Record nicht gefunden werden, wird am Stream ein
- Errorcode gesetzt, zur"uck-geseekt und FALSE zur"uckgeliefert.
+ Errorcode gesetzt, zur"uck-geseekt und sal_False zur"uckgeliefert.
*/
{
// StartPos merken, um im Fehlerfall zur"uck-seeken zu k"onnen
- UINT32 nStartPos = _pStream->Tell();
+ sal_uInt32 nStartPos = _pStream->Tell();
// richtigen Record suchen
while ( !_pStream->IsEof() )
{
// Header lesen
- UINT32 nHeader;
+ sal_uInt32 nHeader;
DBG( DbgOutf( "SfxFileRec: searching record at %ul", _pStream->Tell() ) );
*_pStream >> nHeader;
if ( !SetHeader_Impl( nHeader ) )
@@ -597,17 +597,17 @@ FASTBOOL SfxSingleRecordReader::FindHeader_Impl
{
// Extended Header lesen
*_pStream >> nHeader;
- _nRecordTag = sal::static_int_cast< UINT16 >(SFX_REC_TAG(nHeader));
+ _nRecordTag = sal::static_int_cast< sal_uInt16 >(SFX_REC_TAG(nHeader));
// richtigen Record gefunden?
if ( _nRecordTag == nTag )
{
// gefundener Record-Typ passend?
- _nRecordType = sal::static_int_cast< BYTE >(
+ _nRecordType = sal::static_int_cast< sal_uInt8 >(
SFX_REC_TYP(nHeader));
if ( nTypes & _nRecordType )
// ==> gefunden
- return TRUE;
+ return sal_True;
// error => Such-Schleife abbrechen
break;
@@ -622,18 +622,18 @@ FASTBOOL SfxSingleRecordReader::FindHeader_Impl
// Fehler setzen und zur"uck-seeken
_pStream->SetError( ERRCODE_IO_WRONGFORMAT );
_pStream->Seek( nStartPos );
- return FALSE;
+ return sal_False;
}
//=========================================================================
SfxMultiFixRecordWriter::SfxMultiFixRecordWriter
(
- BYTE nRecordType, // Subklassen Record-Kennung
+ sal_uInt8 nRecordType, // Subklassen Record-Kennung
SvStream* pStream, // Stream, in dem der Record angelegt wird
- UINT16 nContentTag, // Content-Art-Kennung
- BYTE nContentVer, // Content-Versions-Kennung
- UINT32 // Gr"o\se jedes einzelnen Contents in Bytes
+ sal_uInt16 nContentTag, // Content-Art-Kennung
+ sal_uInt8 nContentVer, // Content-Versions-Kennung
+ sal_uInt32 // Gr"o\se jedes einzelnen Contents in Bytes
)
/* [Beschreibung]
@@ -653,9 +653,9 @@ SfxMultiFixRecordWriter::SfxMultiFixRecordWriter
SfxMultiFixRecordWriter::SfxMultiFixRecordWriter
(
SvStream* pStream, // Stream, in dem der Record angelegt wird
- UINT16 nContentTag, // Content-Art-Kennung
- BYTE nContentVer, // Content-Versions-Kennung
- UINT32 // Gr"o\se jedes einzelnen Contents in Bytes
+ sal_uInt16 nContentTag, // Content-Art-Kennung
+ sal_uInt8 nContentVer, // Content-Versions-Kennung
+ sal_uInt32 // Gr"o\se jedes einzelnen Contents in Bytes
)
/* [Beschreibung]
@@ -674,7 +674,7 @@ SfxMultiFixRecordWriter::SfxMultiFixRecordWriter
//------------------------------------------------------------------------
-UINT32 SfxMultiFixRecordWriter::Close( FASTBOOL bSeekToEndOfRec )
+sal_uInt32 SfxMultiFixRecordWriter::Close( FASTBOOL bSeekToEndOfRec )
// siehe <SfxMiniRecordWriter>
@@ -683,7 +683,7 @@ UINT32 SfxMultiFixRecordWriter::Close( FASTBOOL bSeekToEndOfRec )
if ( !_bHeaderOk )
{
// Position hinter Record merken, um sie restaurieren zu k"onnen
- UINT32 nEndPos = SfxSingleRecordWriter::Close( FALSE );
+ sal_uInt32 nEndPos = SfxSingleRecordWriter::Close( sal_False );
// gegen"uber SfxSingleRecord erweiterten Header schreiben
*_pStream << _nContentCount;
@@ -703,10 +703,10 @@ UINT32 SfxMultiFixRecordWriter::Close( FASTBOOL bSeekToEndOfRec )
SfxMultiVarRecordWriter::SfxMultiVarRecordWriter
(
- BYTE nRecordType, // Record-Kennung der Subklasse
+ sal_uInt8 nRecordType, // Record-Kennung der Subklasse
SvStream* pStream, // Stream, in dem der Record angelegt wird
- UINT16 nRecordTag, // Gesamt-Art-Kennung
- BYTE nRecordVer // Gesamt-Versions-Kennung
+ sal_uInt16 nRecordTag, // Gesamt-Art-Kennung
+ sal_uInt8 nRecordVer // Gesamt-Versions-Kennung
)
/* [Beschreibung]
@@ -724,8 +724,8 @@ SfxMultiVarRecordWriter::SfxMultiVarRecordWriter
SfxMultiVarRecordWriter::SfxMultiVarRecordWriter
(
SvStream* pStream, // Stream, in dem der Record angelegt wird
- UINT16 nRecordTag, // Gesamt-Art-Kennung
- BYTE nRecordVer // Gesamt-Versions-Kennung
+ sal_uInt16 nRecordTag, // Gesamt-Art-Kennung
+ sal_uInt8 nRecordVer // Gesamt-Versions-Kennung
)
/* [Beschreibung]
@@ -799,7 +799,7 @@ void SfxMultiVarRecordWriter::NewContent()
//-------------------------------------------------------------------------
-UINT32 SfxMultiVarRecordWriter::Close( FASTBOOL bSeekToEndOfRec )
+sal_uInt32 SfxMultiVarRecordWriter::Close( FASTBOOL bSeekToEndOfRec )
// siehe <SfxMiniRecordWriter>
@@ -812,24 +812,24 @@ UINT32 SfxMultiVarRecordWriter::Close( FASTBOOL bSeekToEndOfRec )
FlushContent_Impl();
// Content-Offset-Tabelle schreiben
- UINT32 nContentOfsPos = _pStream->Tell();
+ sal_uInt32 nContentOfsPos = _pStream->Tell();
//! darf man das so einr"ucken?
#if defined(OSL_LITENDIAN)
_pStream->Write( _aContentOfs.GetData(),
- sizeof(UINT32)*_nContentCount );
+ sizeof(sal_uInt32)*_nContentCount );
#else
- for ( USHORT n = 0; n < _nContentCount; ++n )
- *_pStream << UINT32(_aContentOfs[n]);
+ for ( sal_uInt16 n = 0; n < _nContentCount; ++n )
+ *_pStream << sal_uInt32(_aContentOfs[n]);
#endif
// SfxMultiFixRecordWriter::Close() "uberspringen!
- UINT32 nEndPos = SfxSingleRecordWriter::Close( FALSE );
+ sal_uInt32 nEndPos = SfxSingleRecordWriter::Close( sal_False );
// eigenen Header schreiben
*_pStream << _nContentCount;
if ( SFX_REC_TYPE_VARSIZE_RELOC == _nPreTag ||
SFX_REC_TYPE_MIXTAGS_RELOC == _nPreTag )
- *_pStream << static_cast<UINT32>(nContentOfsPos - ( _pStream->Tell() + sizeof(UINT32) ));
+ *_pStream << static_cast<sal_uInt32>(nContentOfsPos - ( _pStream->Tell() + sizeof(sal_uInt32) ));
else
*_pStream << nContentOfsPos;
@@ -847,8 +847,8 @@ UINT32 SfxMultiVarRecordWriter::Close( FASTBOOL bSeekToEndOfRec )
void SfxMultiMixRecordWriter::NewContent
(
- UINT16 nContentTag, // Kennung f"ur die Art des Contents
- BYTE nContentVer // Kennung f"ur die Version des Contents
+ sal_uInt16 nContentTag, // Kennung f"ur die Art des Contents
+ sal_uInt8 nContentVer // Kennung f"ur die Version des Contents
)
/* [Beschreibung]
@@ -891,18 +891,18 @@ FASTBOOL SfxMultiRecordReader::ReadHeader_Impl()
if ( _nRecordType != SFX_REC_TYPE_FIXSIZE )
{
// Tabelle aus dem Stream einlesen
- UINT32 nContentPos = _pStream->Tell();
+ sal_uInt32 nContentPos = _pStream->Tell();
if ( _nRecordType == SFX_REC_TYPE_VARSIZE_RELOC ||
_nRecordType == SFX_REC_TYPE_MIXTAGS_RELOC )
_pStream->SeekRel( + _nContentSize );
else
_pStream->Seek( _nContentSize );
- _pContentOfs = new UINT32[_nContentCount];
+ _pContentOfs = new sal_uInt32[_nContentCount];
//! darf man jetzt so einr"ucken
#if defined(OSL_LITENDIAN)
- _pStream->Read( _pContentOfs, sizeof(UINT32)*_nContentCount );
+ _pStream->Read( _pContentOfs, sizeof(sal_uInt32)*_nContentCount );
#else
- for ( USHORT n = 0; n < _nContentCount; ++n )
+ for ( sal_uInt16 n = 0; n < _nContentCount; ++n )
*_pStream >> _pContentOfs[n];
#endif
_pStream->Seek( nContentPos );
@@ -934,7 +934,7 @@ SfxMultiRecordReader::SfxMultiRecordReader( SvStream *pStream )
//-------------------------------------------------------------------------
-SfxMultiRecordReader::SfxMultiRecordReader( SvStream *pStream, UINT16 nTag )
+SfxMultiRecordReader::SfxMultiRecordReader( SvStream *pStream, sal_uInt16 nTag )
: _nContentNo(0)
{
// Position im Stream merken, um im Fehlerfall zur"uck-seeken zu k"onnen
@@ -971,8 +971,8 @@ FASTBOOL SfxMultiRecordReader::GetContent()
auf den Anfang des ersten Contents im Record und liest ggf. dessen
Header ein.
- Liegt laut Record-Header kein Content mehr vor, wird FALSE zur"uck-
- gegeben. Trotz einem TRUE-Returnwert kann am Stream ein Fehlercode
+ Liegt laut Record-Header kein Content mehr vor, wird sal_False zur"uck-
+ gegeben. Trotz einem sal_True-Returnwert kann am Stream ein Fehlercode
gesetzt sein, z.B. falls er unvorhergesehenerweise (kaputtes File)
zuende ist.
*/
@@ -982,10 +982,10 @@ FASTBOOL SfxMultiRecordReader::GetContent()
if ( _nContentNo < _nContentCount )
{
// den Stream an den Anfang des Contents positionieren
- UINT32 nOffset = _nRecordType == SFX_REC_TYPE_FIXSIZE
+ sal_uInt32 nOffset = _nRecordType == SFX_REC_TYPE_FIXSIZE
? _nContentNo * _nContentSize
: SFX_REC_CONTENT_OFS(_pContentOfs[_nContentNo]);
- UINT32 nNewPos = _nStartPos + nOffset;
+ sal_uInt32 nNewPos = _nStartPos + nOffset;
DBG_ASSERT( nNewPos >= _pStream->Tell(), "SfxMultiRecordReader::GetContent() - New position before current, to much data red!" );
// #99366#: correct stream pos in every case;
@@ -1000,17 +1000,17 @@ FASTBOOL SfxMultiRecordReader::GetContent()
if ( _nRecordType == SFX_REC_TYPE_MIXTAGS ||
_nRecordType == SFX_REC_TYPE_MIXTAGS_RELOC )
{
- _nContentVer = sal::static_int_cast< BYTE >(
+ _nContentVer = sal::static_int_cast< sal_uInt8 >(
SFX_REC_CONTENT_VER(_pContentOfs[_nContentNo]));
*_pStream >> _nContentTag;
}
// ContentNo weiterz"ahlen
++_nContentNo;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
diff --git a/svl/source/inc/passwordcontainer.hxx b/svl/source/inc/passwordcontainer.hxx
index 375632801368..e03432906f5f 100644
--- a/svl/source/inc/passwordcontainer.hxx
+++ b/svl/source/inc/passwordcontainer.hxx
@@ -411,13 +411,13 @@ public:
class RW_SvMemoryStream : public SvMemoryStream {
public:
- RW_SvMemoryStream( void* Buf, ULONG Size, StreamMode eMode ):
+ RW_SvMemoryStream( void* Buf, sal_uLong Size, StreamMode eMode ):
SvMemoryStream( Buf, Size, eMode){}
- RW_SvMemoryStream( ULONG InitSize=512, ULONG Resize=64 ):
+ RW_SvMemoryStream( sal_uLong InitSize=512, sal_uLong Resize=64 ):
SvMemoryStream( InitSize, Resize ){}
- ULONG getActualSize(){ return nEndOfData; }
+ sal_uLong getActualSize(){ return nEndOfData; }
};
diff --git a/svl/source/inc/poolio.hxx b/svl/source/inc/poolio.hxx
index 79cbbc463700..013b6c760096 100644
--- a/svl/source/inc/poolio.hxx
+++ b/svl/source/inc/poolio.hxx
@@ -35,12 +35,12 @@
struct SfxPoolVersion_Impl
{
- USHORT _nVer;
- USHORT _nStart, _nEnd;
- USHORT* _pMap;
+ sal_uInt16 _nVer;
+ sal_uInt16 _nStart, _nEnd;
+ sal_uInt16* _pMap;
- SfxPoolVersion_Impl( USHORT nVer, USHORT nStart, USHORT nEnd,
- USHORT *pMap )
+ SfxPoolVersion_Impl( sal_uInt16 nVer, sal_uInt16 nStart, sal_uInt16 nEnd,
+ sal_uInt16 *pMap )
: _nVer( nVer ),
_nStart( nStart ),
_nEnd( nEnd ),
@@ -75,17 +75,17 @@ struct SfxItemPool_Impl
SfxBroadcaster aBC;
SfxPoolItemArray_Impl** ppPoolItems;
SfxPoolVersionArr_Impl aVersions;
- USHORT nVersion;
- USHORT nLoadingVersion;
- USHORT nInitRefCount; // 1, beim Laden ggf. 2
- USHORT nVerStart, nVerEnd; // WhichRange in Versions
- USHORT nStoringStart, nStoringEnd; // zu speichernder Range
- BYTE nMajorVer, nMinorVer; // Pool selbst
+ sal_uInt16 nVersion;
+ sal_uInt16 nLoadingVersion;
+ sal_uInt16 nInitRefCount; // 1, beim Laden ggf. 2
+ sal_uInt16 nVerStart, nVerEnd; // WhichRange in Versions
+ sal_uInt16 nStoringStart, nStoringEnd; // zu speichernder Range
+ sal_uInt8 nMajorVer, nMinorVer; // Pool selbst
SfxMapUnit eDefMetric;
FASTBOOL bInSetItem;
FASTBOOL bStreaming; // in Load() bzw. Store()
- SfxItemPool_Impl( USHORT nStart, USHORT nEnd )
+ SfxItemPool_Impl( sal_uInt16 nStart, sal_uInt16 nEnd )
: ppPoolItems (new SfxPoolItemArray_Impl*[ nEnd - nStart + 1])
{
memset( ppPoolItems, 0, sizeof( SfxPoolItemArray_Impl* ) * ( nEnd - nStart + 1) );
@@ -126,76 +126,76 @@ struct SfxItemPool_Impl
#endif
#define CHECK_FILEFORMAT( rStream, nTag ) \
- { USHORT nFileTag; \
+ { sal_uInt16 nFileTag; \
rStream >> nFileTag; \
if ( nTag != nFileTag ) \
{ \
DBG_ERROR( #nTag ); /*! s.u. */ \
/*! error-code setzen und auswerten! */ \
(rStream).SetError(SVSTREAM_FILEFORMAT_ERROR); \
- pImp->bStreaming = FALSE; \
+ pImp->bStreaming = sal_False; \
return rStream; \
} \
}
#define CHECK_FILEFORMAT_RELEASE( rStream, nTag, pPointer ) \
- { USHORT nFileTag; \
+ { sal_uInt16 nFileTag; \
rStream >> nFileTag; \
if ( nTag != nFileTag ) \
{ \
DBG_ERROR( #nTag ); /*! s.u. */ \
/*! error-code setzen und auswerten! */ \
(rStream).SetError(SVSTREAM_FILEFORMAT_ERROR); \
- pImp->bStreaming = FALSE; \
+ pImp->bStreaming = sal_False; \
delete pPointer; \
return rStream; \
} \
}
#define CHECK_FILEFORMAT2( rStream, nTag1, nTag2 ) \
- { USHORT nFileTag; \
+ { sal_uInt16 nFileTag; \
rStream >> nFileTag; \
if ( nTag1 != nFileTag && nTag2 != nFileTag ) \
{ \
DBG_ERROR( #nTag1 ); /*! s.u. */ \
/*! error-code setzen und auswerten! */ \
(rStream).SetError(SVSTREAM_FILEFORMAT_ERROR); \
- pImp->bStreaming = FALSE; \
+ pImp->bStreaming = sal_False; \
return rStream; \
} \
}
-#define SFX_ITEMPOOL_VER_MAJOR BYTE(2)
-#define SFX_ITEMPOOL_VER_MINOR BYTE(0)
-
-#define SFX_ITEMPOOL_TAG_STARTPOOL_4 USHORT(0x1111)
-#define SFX_ITEMPOOL_TAG_STARTPOOL_5 USHORT(0xBBBB)
-#define SFX_ITEMPOOL_TAG_ITEMPOOL USHORT(0xAAAA)
-#define SFX_ITEMPOOL_TAG_ITEMS USHORT(0x2222)
-#define SFX_ITEMPOOL_TAG_ITEM USHORT(0x7777)
-#define SFX_ITEMPOOL_TAG_SIZES USHORT(0x3333)
-#define SFX_ITEMPOOL_TAG_DEFAULTS USHORT(0x4444)
-#define SFX_ITEMPOOL_TAG_VERSIONMAP USHORT(0x5555)
-#define SFX_ITEMPOOL_TAG_HEADER USHORT(0x6666)
-#define SFX_ITEMPOOL_TAG_ENDPOOL USHORT(0xEEEE)
-#define SFX_ITEMPOOL_TAG_TRICK4OLD USHORT(0xFFFF)
-
-#define SFX_ITEMPOOL_REC BYTE(0x01)
-#define SFX_ITEMPOOL_REC_HEADER BYTE(0x10)
-#define SFX_ITEMPOOL_REC_VERSIONMAP USHORT(0x0020)
-#define SFX_ITEMPOOL_REC_WHICHIDS USHORT(0x0030)
-#define SFX_ITEMPOOL_REC_ITEMS USHORT(0x0040)
-#define SFX_ITEMPOOL_REC_DEFAULTS USHORT(0x0050)
-
-#define SFX_ITEMSET_REC BYTE(0x02)
-
-#define SFX_STYLES_REC BYTE(0x03)
-#define SFX_STYLES_REC_HEADER USHORT(0x0010)
-#define SFX_STYLES_REC_STYLES USHORT(0x0020)
+#define SFX_ITEMPOOL_VER_MAJOR sal_uInt8(2)
+#define SFX_ITEMPOOL_VER_MINOR sal_uInt8(0)
+
+#define SFX_ITEMPOOL_TAG_STARTPOOL_4 sal_uInt16(0x1111)
+#define SFX_ITEMPOOL_TAG_STARTPOOL_5 sal_uInt16(0xBBBB)
+#define SFX_ITEMPOOL_TAG_ITEMPOOL sal_uInt16(0xAAAA)
+#define SFX_ITEMPOOL_TAG_ITEMS sal_uInt16(0x2222)
+#define SFX_ITEMPOOL_TAG_ITEM sal_uInt16(0x7777)
+#define SFX_ITEMPOOL_TAG_SIZES sal_uInt16(0x3333)
+#define SFX_ITEMPOOL_TAG_DEFAULTS sal_uInt16(0x4444)
+#define SFX_ITEMPOOL_TAG_VERSIONMAP sal_uInt16(0x5555)
+#define SFX_ITEMPOOL_TAG_HEADER sal_uInt16(0x6666)
+#define SFX_ITEMPOOL_TAG_ENDPOOL sal_uInt16(0xEEEE)
+#define SFX_ITEMPOOL_TAG_TRICK4OLD sal_uInt16(0xFFFF)
+
+#define SFX_ITEMPOOL_REC sal_uInt8(0x01)
+#define SFX_ITEMPOOL_REC_HEADER sal_uInt8(0x10)
+#define SFX_ITEMPOOL_REC_VERSIONMAP sal_uInt16(0x0020)
+#define SFX_ITEMPOOL_REC_WHICHIDS sal_uInt16(0x0030)
+#define SFX_ITEMPOOL_REC_ITEMS sal_uInt16(0x0040)
+#define SFX_ITEMPOOL_REC_DEFAULTS sal_uInt16(0x0050)
+
+#define SFX_ITEMSET_REC sal_uInt8(0x02)
+
+#define SFX_STYLES_REC sal_uInt8(0x03)
+#define SFX_STYLES_REC_HEADER sal_uInt16(0x0010)
+#define SFX_STYLES_REC_STYLES sal_uInt16(0x0020)
//========================================================================
-inline USHORT SfxItemPool::GetIndex_Impl(USHORT nWhich) const
+inline sal_uInt16 SfxItemPool::GetIndex_Impl(sal_uInt16 nWhich) const
{
DBG_CHKTHIS(SfxItemPool, 0);
DBG_ASSERT(nWhich >= nStart && nWhich <= nEnd, "Which-Id nicht im Pool-Bereich");
diff --git a/svl/source/items/aeitem.cxx b/svl/source/items/aeitem.cxx
index 36445162424b..370a3ebeb44e 100644
--- a/svl/source/items/aeitem.cxx
+++ b/svl/source/items/aeitem.cxx
@@ -47,7 +47,7 @@ TYPEINIT1_AUTOFACTORY(SfxAllEnumItem, SfxEnumItem)
struct SfxAllEnumValue_Impl
{
- USHORT nValue;
+ sal_uInt16 nValue;
XubString aText;
};
@@ -63,7 +63,7 @@ SfxAllEnumItem::SfxAllEnumItem() :
{
}
-SfxAllEnumItem::SfxAllEnumItem( USHORT which, USHORT nVal, const XubString &rText ):
+SfxAllEnumItem::SfxAllEnumItem( sal_uInt16 which, sal_uInt16 nVal, const XubString &rText ):
SfxEnumItem(which, nVal),
pValues( 0 ),
pDisabledValues( 0 )
@@ -74,7 +74,7 @@ SfxAllEnumItem::SfxAllEnumItem( USHORT which, USHORT nVal, const XubString &rTex
// -----------------------------------------------------------------------
-SfxAllEnumItem::SfxAllEnumItem(USHORT which, USHORT nVal):
+SfxAllEnumItem::SfxAllEnumItem(sal_uInt16 which, sal_uInt16 nVal):
SfxEnumItem(which, nVal),
pValues( 0 ),
pDisabledValues( 0 )
@@ -85,7 +85,7 @@ SfxAllEnumItem::SfxAllEnumItem(USHORT which, USHORT nVal):
// -----------------------------------------------------------------------
-SfxAllEnumItem::SfxAllEnumItem( USHORT which, SvStream &rStream ):
+SfxAllEnumItem::SfxAllEnumItem( sal_uInt16 which, SvStream &rStream ):
SfxEnumItem(which, rStream),
pValues( 0 ),
pDisabledValues( 0 )
@@ -97,7 +97,7 @@ SfxAllEnumItem::SfxAllEnumItem( USHORT which, SvStream &rStream ):
// -----------------------------------------------------------------------
-SfxAllEnumItem::SfxAllEnumItem(USHORT which):
+SfxAllEnumItem::SfxAllEnumItem(sal_uInt16 which):
SfxEnumItem(which, 0),
pValues( 0 ),
pDisabledValues( 0 )
@@ -119,7 +119,7 @@ SfxAllEnumItem::SfxAllEnumItem(const SfxAllEnumItem &rCopy):
pValues = new SfxAllEnumValueArr;
- for ( USHORT nPos = 0; nPos < rCopy.pValues->Count(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < rCopy.pValues->Count(); ++nPos )
{
SfxAllEnumValue_Impl *pVal = new SfxAllEnumValue_Impl;
pVal->nValue = rCopy.pValues->GetObject(nPos)->nValue;
@@ -131,7 +131,7 @@ SfxAllEnumItem::SfxAllEnumItem(const SfxAllEnumItem &rCopy):
if( rCopy.pDisabledValues )
{
pDisabledValues = new SvUShorts;
- for ( USHORT nPos = 0; nPos < rCopy.pDisabledValues->Count(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < rCopy.pDisabledValues->Count(); ++nPos )
{
pDisabledValues->Insert( rCopy.pDisabledValues->GetObject(nPos),
nPos );
@@ -150,7 +150,7 @@ SfxAllEnumItem::~SfxAllEnumItem()
// -----------------------------------------------------------------------
-USHORT SfxAllEnumItem::GetValueCount() const
+sal_uInt16 SfxAllEnumItem::GetValueCount() const
{
DBG_CHKTHIS(SfxAllEnumItem, 0);
return pValues ? pValues->Count() : 0;
@@ -158,7 +158,7 @@ USHORT SfxAllEnumItem::GetValueCount() const
// -----------------------------------------------------------------------
-XubString SfxAllEnumItem::GetValueTextByPos( USHORT nPos ) const
+XubString SfxAllEnumItem::GetValueTextByPos( sal_uInt16 nPos ) const
{
DBG_CHKTHIS(SfxAllEnumItem, 0);
DBG_ASSERT( pValues && nPos < pValues->Count(), "enum overflow" );
@@ -167,7 +167,7 @@ XubString SfxAllEnumItem::GetValueTextByPos( USHORT nPos ) const
// -----------------------------------------------------------------------
-USHORT SfxAllEnumItem::GetValueByPos( USHORT nPos ) const
+sal_uInt16 SfxAllEnumItem::GetValueByPos( sal_uInt16 nPos ) const
{
DBG_CHKTHIS(SfxAllEnumItem, 0);
DBG_ASSERT( pValues && nPos < pValues->Count(), "enum overflow" );
@@ -184,7 +184,7 @@ SfxPoolItem* SfxAllEnumItem::Clone( SfxItemPool * ) const
// -----------------------------------------------------------------------
-SfxPoolItem* SfxAllEnumItem::Create( SvStream & rStream, USHORT ) const
+SfxPoolItem* SfxAllEnumItem::Create( SvStream & rStream, sal_uInt16 ) const
{
DBG_CHKTHIS(SfxAllEnumItem, 0);
return new SfxAllEnumItem( Which(), rStream );
@@ -193,11 +193,11 @@ SfxPoolItem* SfxAllEnumItem::Create( SvStream & rStream, USHORT ) const
// -----------------------------------------------------------------------
-USHORT SfxAllEnumItem::_GetPosByValue( USHORT nVal ) const
+sal_uInt16 SfxAllEnumItem::_GetPosByValue( sal_uInt16 nVal ) const
/* [Beschreibung]
- Im Ggs. zu <SfxEnumItemInterface::GetPosByValue(USHORT)const> liefert
+ Im Ggs. zu <SfxEnumItemInterface::GetPosByValue(sal_uInt16)const> liefert
diese interne Methode bei nicht vorhandenen Values die Position,
an der der Wert liegen w"urde.
*/
@@ -209,7 +209,7 @@ USHORT SfxAllEnumItem::_GetPosByValue( USHORT nVal ) const
return 0;
//!O: binaere Suche oder SortArray verwenden
- USHORT nPos;
+ sal_uInt16 nPos;
for ( nPos = 0; nPos < pValues->Count(); ++nPos )
if ( pValues->GetObject(nPos)->nValue >= nVal )
return nPos;
@@ -218,11 +218,11 @@ USHORT SfxAllEnumItem::_GetPosByValue( USHORT nVal ) const
// -----------------------------------------------------------------------
-USHORT SfxAllEnumItem::GetPosByValue( USHORT nValue ) const
+sal_uInt16 SfxAllEnumItem::GetPosByValue( sal_uInt16 nValue ) const
/* [Beschreibung]
- Liefert im Gegensatz zu <SfxEnumItemInterface::GetPosByValue(USHORT)const>
+ Liefert im Gegensatz zu <SfxEnumItemInterface::GetPosByValue(sal_uInt16)const>
immer nValue zur"uck, solange nicht mindestens ein Wert mit einer der
Methoden <SfxAllEnumItem::InsertValue()> eingef"ugt wurde.
*/
@@ -238,7 +238,7 @@ USHORT SfxAllEnumItem::GetPosByValue( USHORT nValue ) const
// -----------------------------------------------------------------------
-void SfxAllEnumItem::InsertValue( USHORT nValue, const XubString &rValue )
+void SfxAllEnumItem::InsertValue( sal_uInt16 nValue, const XubString &rValue )
{
DBG_CHKTHIS(SfxAllEnumItem, 0);
SfxAllEnumValue_Impl *pVal = new SfxAllEnumValue_Impl;
@@ -256,7 +256,7 @@ void SfxAllEnumItem::InsertValue( USHORT nValue, const XubString &rValue )
// -----------------------------------------------------------------------
-void SfxAllEnumItem::InsertValue( USHORT nValue )
+void SfxAllEnumItem::InsertValue( sal_uInt16 nValue )
{
DBG_CHKTHIS(SfxAllEnumItem, 0);
SfxAllEnumValue_Impl *pVal = new SfxAllEnumValue_Impl;
@@ -269,7 +269,7 @@ void SfxAllEnumItem::InsertValue( USHORT nValue )
pValues->Insert( pTemp, _GetPosByValue(nValue) ); //! doppelte?!
}
-void SfxAllEnumItem::DisableValue( USHORT nValue )
+void SfxAllEnumItem::DisableValue( sal_uInt16 nValue )
{
DBG_CHKTHIS(SfxAllEnumItem, 0);
if ( !pDisabledValues )
@@ -278,24 +278,24 @@ void SfxAllEnumItem::DisableValue( USHORT nValue )
pDisabledValues->Insert( nValue, pDisabledValues->Count() );
}
-BOOL SfxAllEnumItem::IsEnabled( USHORT nValue ) const
+sal_Bool SfxAllEnumItem::IsEnabled( sal_uInt16 nValue ) const
{
if ( pDisabledValues )
{
- for ( USHORT i=0; i<pDisabledValues->Count(); i++ )
+ for ( sal_uInt16 i=0; i<pDisabledValues->Count(); i++ )
if ( (*pDisabledValues)[i] == nValue )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-void SfxAllEnumItem::RemoveValue( USHORT nValue )
+void SfxAllEnumItem::RemoveValue( sal_uInt16 nValue )
{
DBG_CHKTHIS(SfxAllEnumItem, 0);
- USHORT nPos = GetPosByValue(nValue);
+ sal_uInt16 nPos = GetPosByValue(nValue);
DBG_ASSERT( nPos != USHRT_MAX, "removing value not in enum" );
pValues->Remove( nPos );
}
diff --git a/svl/source/items/cenumitm.cxx b/svl/source/items/cenumitm.cxx
index c5e1a09ec324..a67df72113ba 100644
--- a/svl/source/items/cenumitm.cxx
+++ b/svl/source/items/cenumitm.cxx
@@ -33,7 +33,7 @@
#include <whassert.hxx>
#ifndef _CPPUHELPER_EXTRACT_HXX_
-#include <cppuhelper/extract.hxx>
+#include <comphelper/extract.hxx>
#endif
//============================================================================
@@ -70,7 +70,7 @@ SfxEnumItemInterface::GetPresentation(SfxItemPresentation, SfxMapUnit,
//============================================================================
// virtual
-BOOL SfxEnumItemInterface::QueryValue(com::sun::star::uno::Any& rVal, BYTE)
+sal_Bool SfxEnumItemInterface::QueryValue(com::sun::star::uno::Any& rVal, sal_uInt8)
const
{
rVal <<= sal_Int32(GetEnumValue());
@@ -79,14 +79,14 @@ BOOL SfxEnumItemInterface::QueryValue(com::sun::star::uno::Any& rVal, BYTE)
//============================================================================
// virtual
-BOOL SfxEnumItemInterface::PutValue(const com::sun::star::uno::Any& rVal,
- BYTE)
+sal_Bool SfxEnumItemInterface::PutValue(const com::sun::star::uno::Any& rVal,
+ sal_uInt8)
{
sal_Int32 nTheValue = 0;
if ( ::cppu::enum2int( nTheValue, rVal ) )
{
- SetEnumValue(USHORT(nTheValue));
+ SetEnumValue(sal_uInt16(nTheValue));
return true;
}
DBG_ERROR("SfxEnumItemInterface::PutValue(): Wrong type");
@@ -94,7 +94,7 @@ BOOL SfxEnumItemInterface::PutValue(const com::sun::star::uno::Any& rVal,
}
//============================================================================
-XubString SfxEnumItemInterface::GetValueTextByPos(USHORT) const
+XubString SfxEnumItemInterface::GetValueTextByPos(sal_uInt16) const
{
DBG_WARNING("SfxEnumItemInterface::GetValueTextByPos(): Pure virtual");
return XubString();
@@ -102,25 +102,25 @@ XubString SfxEnumItemInterface::GetValueTextByPos(USHORT) const
//============================================================================
// virtual
-USHORT SfxEnumItemInterface::GetValueByPos(USHORT nPos) const
+sal_uInt16 SfxEnumItemInterface::GetValueByPos(sal_uInt16 nPos) const
{
return nPos;
}
//============================================================================
// virtual
-USHORT SfxEnumItemInterface::GetPosByValue(USHORT nValue) const
+sal_uInt16 SfxEnumItemInterface::GetPosByValue(sal_uInt16 nValue) const
{
- USHORT nCount = GetValueCount();
- for (USHORT i = 0; i < nCount; ++i)
+ sal_uInt16 nCount = GetValueCount();
+ for (sal_uInt16 i = 0; i < nCount; ++i)
if (GetValueByPos(i) == nValue)
return i;
return USHRT_MAX;
}
-BOOL SfxEnumItemInterface::IsEnabled(USHORT) const
+sal_Bool SfxEnumItemInterface::IsEnabled(sal_uInt16) const
{
- return TRUE;
+ return sal_True;
}
//============================================================================
@@ -132,14 +132,14 @@ int SfxEnumItemInterface::HasBoolValue() const
//============================================================================
// virtual
-BOOL SfxEnumItemInterface::GetBoolValue() const
+sal_Bool SfxEnumItemInterface::GetBoolValue() const
{
return false;
}
//============================================================================
// virtual
-void SfxEnumItemInterface::SetBoolValue(BOOL)
+void SfxEnumItemInterface::SetBoolValue(sal_Bool)
{}
//============================================================================
@@ -151,7 +151,7 @@ void SfxEnumItemInterface::SetBoolValue(BOOL)
DBG_NAME(CntEnumItem)
//============================================================================
-CntEnumItem::CntEnumItem(USHORT which, SvStream & rStream):
+CntEnumItem::CntEnumItem(sal_uInt16 which, SvStream & rStream):
SfxEnumItemInterface(which)
{
m_nValue = 0;
@@ -163,7 +163,7 @@ TYPEINIT1(CntEnumItem, SfxEnumItemInterface)
//============================================================================
// virtual
-SvStream & CntEnumItem::Store(SvStream & rStream, USHORT) const
+SvStream & CntEnumItem::Store(SvStream & rStream, sal_uInt16) const
{
rStream << m_nValue;
return rStream;
@@ -171,14 +171,14 @@ SvStream & CntEnumItem::Store(SvStream & rStream, USHORT) const
//============================================================================
// virtual
-USHORT CntEnumItem::GetEnumValue() const
+sal_uInt16 CntEnumItem::GetEnumValue() const
{
return GetValue();
}
//============================================================================
// virtual
-void CntEnumItem::SetEnumValue(USHORT nTheValue)
+void CntEnumItem::SetEnumValue(sal_uInt16 nTheValue)
{
SetValue(nTheValue);
}
@@ -195,7 +195,7 @@ DBG_NAME(CntBoolItem)
TYPEINIT1_AUTOFACTORY(CntBoolItem, SfxPoolItem)
//============================================================================
-CntBoolItem::CntBoolItem(USHORT which, SvStream & rStream):
+CntBoolItem::CntBoolItem(sal_uInt16 which, SvStream & rStream):
SfxPoolItem(which)
{
m_bValue = false;
@@ -233,7 +233,7 @@ SfxItemPresentation CntBoolItem::GetPresentation(SfxItemPresentation,
//============================================================================
// virtual
-BOOL CntBoolItem::QueryValue(com::sun::star::uno::Any& rVal, BYTE) const
+sal_Bool CntBoolItem::QueryValue(com::sun::star::uno::Any& rVal, sal_uInt8) const
{
rVal <<= sal_Bool(m_bValue);
return true;
@@ -241,7 +241,7 @@ BOOL CntBoolItem::QueryValue(com::sun::star::uno::Any& rVal, BYTE) const
//============================================================================
// virtual
-BOOL CntBoolItem::PutValue(const com::sun::star::uno::Any& rVal, BYTE)
+sal_Bool CntBoolItem::PutValue(const com::sun::star::uno::Any& rVal, sal_uInt8)
{
sal_Bool bTheValue = sal_Bool();
if (rVal >>= bTheValue)
@@ -255,14 +255,14 @@ BOOL CntBoolItem::PutValue(const com::sun::star::uno::Any& rVal, BYTE)
//============================================================================
// virtual
-SfxPoolItem * CntBoolItem::Create(SvStream & rStream, USHORT) const
+SfxPoolItem * CntBoolItem::Create(SvStream & rStream, sal_uInt16) const
{
return new CntBoolItem(Which(), rStream);
}
//============================================================================
// virtual
-SvStream & CntBoolItem::Store(SvStream & rStream, USHORT) const
+SvStream & CntBoolItem::Store(SvStream & rStream, sal_uInt16) const
{
rStream << m_bValue;
return rStream;
@@ -277,18 +277,18 @@ SfxPoolItem * CntBoolItem::Clone(SfxItemPool *) const
//============================================================================
// virtual
-USHORT CntBoolItem::GetValueCount() const
+sal_uInt16 CntBoolItem::GetValueCount() const
{
return 2;
}
//============================================================================
// virtual
-UniString CntBoolItem::GetValueTextByVal(BOOL bTheValue) const
+UniString CntBoolItem::GetValueTextByVal(sal_Bool bTheValue) const
{
return
bTheValue ?
- UniString::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("TRUE")) :
- UniString::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("FALSE"));
+ UniString::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("sal_True")) :
+ UniString::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("sal_False"));
}
diff --git a/svl/source/items/cintitem.cxx b/svl/source/items/cintitem.cxx
index dd22ab757fe7..11f68ed69071 100644
--- a/svl/source/items/cintitem.cxx
+++ b/svl/source/items/cintitem.cxx
@@ -43,7 +43,7 @@ DBG_NAME(CntByteItem)
TYPEINIT1_AUTOFACTORY(CntByteItem, SfxPoolItem);
//============================================================================
-CntByteItem::CntByteItem(USHORT which, SvStream & rStream):
+CntByteItem::CntByteItem(sal_uInt16 which, SvStream & rStream):
SfxPoolItem(which)
{
DBG_CTOR(CntByteItem, 0);
@@ -87,41 +87,41 @@ SfxItemPresentation CntByteItem::GetPresentation(SfxItemPresentation,
//============================================================================
// virtual
-BOOL CntByteItem::QueryValue(com::sun::star::uno::Any& rVal,BYTE) const
+sal_Bool CntByteItem::QueryValue(com::sun::star::uno::Any& rVal,sal_uInt8) const
{
sal_Int8 nValue = m_nValue;
rVal <<= nValue;
- return TRUE;
+ return sal_True;
}
//============================================================================
// virtual
-BOOL CntByteItem::PutValue(const com::sun::star::uno::Any& rVal,BYTE)
+sal_Bool CntByteItem::PutValue(const com::sun::star::uno::Any& rVal,sal_uInt8)
{
sal_Int8 nValue = sal_Int8();
if (rVal >>= nValue)
{
m_nValue = nValue;
- return TRUE;
+ return sal_True;
}
DBG_ERROR( "CntByteItem::PutValue - Wrong type!" );
- return FALSE;
+ return sal_False;
}
//============================================================================
// virtual
-SfxPoolItem * CntByteItem::Create(SvStream & rStream, USHORT) const
+SfxPoolItem * CntByteItem::Create(SvStream & rStream, sal_uInt16) const
{
DBG_CHKTHIS(CntByteItem, 0);
short nTheValue = 0;
rStream >> nTheValue;
- return new CntByteItem(Which(), BYTE(nTheValue));
+ return new CntByteItem(Which(), sal_uInt8(nTheValue));
}
//============================================================================
// virtual
-SvStream & CntByteItem::Store(SvStream & rStream, USHORT) const
+SvStream & CntByteItem::Store(SvStream & rStream, sal_uInt16) const
{
DBG_CHKTHIS(CntByteItem, 0);
rStream << short(m_nValue);
@@ -138,7 +138,7 @@ SfxPoolItem * CntByteItem::Clone(SfxItemPool *) const
//============================================================================
// virtual
-BYTE CntByteItem::GetMin() const
+sal_uInt8 CntByteItem::GetMin() const
{
DBG_CHKTHIS(CntByteItem, 0);
return 0;
@@ -146,7 +146,7 @@ BYTE CntByteItem::GetMin() const
//============================================================================
// virtual
-BYTE CntByteItem::GetMax() const
+sal_uInt8 CntByteItem::GetMax() const
{
DBG_CHKTHIS(CntByteItem, 0);
return 255;
@@ -172,11 +172,11 @@ DBG_NAME(CntUInt16Item);
TYPEINIT1_AUTOFACTORY(CntUInt16Item, SfxPoolItem);
//============================================================================
-CntUInt16Item::CntUInt16Item(USHORT which, SvStream & rStream) :
+CntUInt16Item::CntUInt16Item(sal_uInt16 which, SvStream & rStream) :
SfxPoolItem(which)
{
DBG_CTOR(CntUInt16Item, 0);
- USHORT nTheValue = 0;
+ sal_uInt16 nTheValue = 0;
rStream >> nTheValue;
m_nValue = nTheValue;
}
@@ -222,32 +222,32 @@ SfxItemPresentation CntUInt16Item::GetPresentation(SfxItemPresentation,
//============================================================================
// virtual
-BOOL CntUInt16Item::QueryValue(com::sun::star::uno::Any& rVal,BYTE) const
+sal_Bool CntUInt16Item::QueryValue(com::sun::star::uno::Any& rVal,sal_uInt8) const
{
sal_Int32 nValue = m_nValue;
rVal <<= nValue;
- return TRUE;
+ return sal_True;
}
//============================================================================
// virtual
-BOOL CntUInt16Item::PutValue(const com::sun::star::uno::Any& rVal,BYTE)
+sal_Bool CntUInt16Item::PutValue(const com::sun::star::uno::Any& rVal,sal_uInt8)
{
sal_Int32 nValue = 0;
if (rVal >>= nValue)
{
DBG_ASSERT( nValue <= USHRT_MAX, "Overflow in UInt16 value!");
m_nValue = (sal_uInt16)nValue;
- return TRUE;
+ return sal_True;
}
DBG_ERROR( "CntUInt16Item::PutValue - Wrong type!" );
- return FALSE;
+ return sal_False;
}
//============================================================================
// virtual
-SfxPoolItem * CntUInt16Item::Create(SvStream & rStream, USHORT) const
+SfxPoolItem * CntUInt16Item::Create(SvStream & rStream, sal_uInt16) const
{
DBG_CHKTHIS(CntUInt16Item, 0);
return new CntUInt16Item(Which(), rStream);
@@ -255,10 +255,10 @@ SfxPoolItem * CntUInt16Item::Create(SvStream & rStream, USHORT) const
//============================================================================
// virtual
-SvStream & CntUInt16Item::Store(SvStream &rStream, USHORT) const
+SvStream & CntUInt16Item::Store(SvStream &rStream, sal_uInt16) const
{
DBG_CHKTHIS(CntUInt16Item, 0);
- rStream << USHORT(m_nValue);
+ rStream << sal_uInt16(m_nValue);
return rStream;
}
@@ -272,7 +272,7 @@ SfxPoolItem * CntUInt16Item::Clone(SfxItemPool *) const
//============================================================================
// virtual
-UINT16 CntUInt16Item::GetMin() const
+sal_uInt16 CntUInt16Item::GetMin() const
{
DBG_CHKTHIS(CntUInt16Item, 0);
return 0;
@@ -280,7 +280,7 @@ UINT16 CntUInt16Item::GetMin() const
//============================================================================
// virtual
-UINT16 CntUInt16Item::GetMax() const
+sal_uInt16 CntUInt16Item::GetMax() const
{
DBG_CHKTHIS(CntUInt16Item, 0);
return 65535;
@@ -306,7 +306,7 @@ DBG_NAME(CntInt32Item);
TYPEINIT1_AUTOFACTORY(CntInt32Item, SfxPoolItem);
//============================================================================
-CntInt32Item::CntInt32Item(USHORT which, SvStream & rStream) :
+CntInt32Item::CntInt32Item(sal_uInt16 which, SvStream & rStream) :
SfxPoolItem(which)
{
DBG_CTOR(CntInt32Item, 0);
@@ -354,31 +354,31 @@ SfxItemPresentation CntInt32Item::GetPresentation(SfxItemPresentation,
//============================================================================
// virtual
-BOOL CntInt32Item::QueryValue(com::sun::star::uno::Any& rVal,BYTE) const
+sal_Bool CntInt32Item::QueryValue(com::sun::star::uno::Any& rVal,sal_uInt8) const
{
sal_Int32 nValue = m_nValue;
rVal <<= nValue;
- return TRUE;
+ return sal_True;
}
//============================================================================
// virtual
-BOOL CntInt32Item::PutValue(const com::sun::star::uno::Any& rVal,BYTE)
+sal_Bool CntInt32Item::PutValue(const com::sun::star::uno::Any& rVal,sal_uInt8)
{
sal_Int32 nValue = 0;
if (rVal >>= nValue)
{
m_nValue = nValue;
- return TRUE;
+ return sal_True;
}
DBG_ERROR( "CntInt32Item::PutValue - Wrong type!" );
- return FALSE;
+ return sal_False;
}
//============================================================================
// virtual
-SfxPoolItem * CntInt32Item::Create(SvStream & rStream, USHORT) const
+SfxPoolItem * CntInt32Item::Create(SvStream & rStream, sal_uInt16) const
{
DBG_CHKTHIS(CntInt32Item, 0);
return new CntInt32Item(Which(), rStream);
@@ -386,7 +386,7 @@ SfxPoolItem * CntInt32Item::Create(SvStream & rStream, USHORT) const
//============================================================================
// virtual
-SvStream & CntInt32Item::Store(SvStream &rStream, USHORT) const
+SvStream & CntInt32Item::Store(SvStream &rStream, sal_uInt16) const
{
DBG_CHKTHIS(CntInt32Item, 0);
rStream << long(m_nValue);
@@ -403,15 +403,15 @@ SfxPoolItem * CntInt32Item::Clone(SfxItemPool *) const
//============================================================================
// virtual
-INT32 CntInt32Item::GetMin() const
+sal_Int32 CntInt32Item::GetMin() const
{
DBG_CHKTHIS(CntInt32Item, 0);
- return INT32(0x80000000);
+ return sal_Int32(0x80000000);
}
//============================================================================
// virtual
-INT32 CntInt32Item::GetMax() const
+sal_Int32 CntInt32Item::GetMax() const
{
DBG_CHKTHIS(CntInt32Item, 0);
return 0x7FFFFFFF;
@@ -437,7 +437,7 @@ DBG_NAME(CntUInt32Item);
TYPEINIT1_AUTOFACTORY(CntUInt32Item, SfxPoolItem);
//============================================================================
-CntUInt32Item::CntUInt32Item(USHORT which, SvStream & rStream) :
+CntUInt32Item::CntUInt32Item(sal_uInt16 which, SvStream & rStream) :
SfxPoolItem(which)
{
DBG_CTOR(CntUInt32Item, 0);
@@ -487,33 +487,33 @@ SfxItemPresentation CntUInt32Item::GetPresentation(SfxItemPresentation,
//============================================================================
// virtual
-BOOL CntUInt32Item::QueryValue(com::sun::star::uno::Any& rVal,BYTE) const
+sal_Bool CntUInt32Item::QueryValue(com::sun::star::uno::Any& rVal,sal_uInt8) const
{
sal_Int32 nValue = m_nValue;
DBG_ASSERT( nValue>=0, "Overflow in UInt32 value!");
rVal <<= nValue;
- return TRUE;
+ return sal_True;
}
//============================================================================
// virtual
-BOOL CntUInt32Item::PutValue(const com::sun::star::uno::Any& rVal,BYTE)
+sal_Bool CntUInt32Item::PutValue(const com::sun::star::uno::Any& rVal,sal_uInt8)
{
sal_Int32 nValue = 0;
if (rVal >>= nValue)
{
DBG_ASSERT( nValue>=0, "Overflow in UInt32 value!");
m_nValue = nValue;
- return TRUE;
+ return sal_True;
}
DBG_ERROR( "CntUInt32Item::PutValue - Wrong type!" );
- return FALSE;
+ return sal_False;
}
//============================================================================
// virtual
-SfxPoolItem * CntUInt32Item::Create(SvStream & rStream, USHORT) const
+SfxPoolItem * CntUInt32Item::Create(SvStream & rStream, sal_uInt16) const
{
DBG_CHKTHIS(CntUInt32Item, 0);
return new CntUInt32Item(Which(), rStream);
@@ -521,7 +521,7 @@ SfxPoolItem * CntUInt32Item::Create(SvStream & rStream, USHORT) const
//============================================================================
// virtual
-SvStream & CntUInt32Item::Store(SvStream &rStream, USHORT) const
+SvStream & CntUInt32Item::Store(SvStream &rStream, sal_uInt16) const
{
DBG_CHKTHIS(CntUInt32Item, 0);
rStream << static_cast<sal_uInt32>(m_nValue);
@@ -538,7 +538,7 @@ SfxPoolItem * CntUInt32Item::Clone(SfxItemPool *) const
//============================================================================
// virtual
-UINT32 CntUInt32Item::GetMin() const
+sal_uInt32 CntUInt32Item::GetMin() const
{
DBG_CHKTHIS(CntUInt32Item, 0);
return 0;
@@ -546,7 +546,7 @@ UINT32 CntUInt32Item::GetMin() const
//============================================================================
// virtual
-UINT32 CntUInt32Item::GetMax() const
+sal_uInt32 CntUInt32Item::GetMax() const
{
DBG_CHKTHIS(CntUInt32Item, 0);
return 0xFFFFFFFF;
diff --git a/svl/source/items/cntwall.cxx b/svl/source/items/cntwall.cxx
index 56632c675d01..e5d635990086 100644
--- a/svl/source/items/cntwall.cxx
+++ b/svl/source/items/cntwall.cxx
@@ -35,22 +35,22 @@
#include <svl/cntwall.hxx>
-#define CNTWALLPAPERITEM_STREAM_MAGIC ( (UINT32)0xfefefefe )
-#define CNTWALLPAPERITEM_STREAM_SEEKREL (-( (long)( sizeof( UINT32 ) ) ) )
+#define CNTWALLPAPERITEM_STREAM_MAGIC ( (sal_uInt32)0xfefefefe )
+#define CNTWALLPAPERITEM_STREAM_SEEKREL (-( (long)( sizeof( sal_uInt32 ) ) ) )
TYPEINIT1( CntWallpaperItem, SfxPoolItem );
// -----------------------------------------------------------------------
-CntWallpaperItem::CntWallpaperItem( USHORT which )
+CntWallpaperItem::CntWallpaperItem( sal_uInt16 which )
: SfxPoolItem( which ), _nColor( COL_TRANSPARENT ), _nStyle( 0 )
{
}
// -----------------------------------------------------------------------
-CntWallpaperItem::CntWallpaperItem( USHORT which, SvStream& rStream, USHORT nVersion )
+CntWallpaperItem::CntWallpaperItem( sal_uInt16 which, SvStream& rStream, sal_uInt16 nVersion )
: SfxPoolItem( which ), _nColor( COL_TRANSPARENT ), _nStyle( 0 )
{
- UINT32 nMagic = 0;
+ sal_uInt32 nMagic = 0;
rStream >> nMagic;
if ( nMagic == CNTWALLPAPERITEM_STREAM_MAGIC )
{
@@ -59,7 +59,7 @@ CntWallpaperItem::CntWallpaperItem( USHORT which, SvStream& rStream, USHORT nVer
readUnicodeString(rStream, _aURL, nVersion >= 1);
// !!! Color stream operators do not work - they discard any
// transparency info !!!
- _nColor.Read( rStream, TRUE );
+ _nColor.Read( rStream, sal_True );
rStream >> _nStyle;
}
else
@@ -110,33 +110,33 @@ int CntWallpaperItem::operator==( const SfxPoolItem& rItem ) const
if( ( rWallItem._nStyle == _nStyle ) &&
( rWallItem._nColor == _nColor ) &&
( rWallItem._aURL == _aURL ) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
//============================================================================
// virtual
-USHORT CntWallpaperItem::GetVersion(USHORT) const
+sal_uInt16 CntWallpaperItem::GetVersion(sal_uInt16) const
{
return 1; // because it uses SfxPoolItem::read/writeUnicodeString()
}
// -----------------------------------------------------------------------
-SfxPoolItem* CntWallpaperItem::Create( SvStream& rStream, USHORT nVersion) const
+SfxPoolItem* CntWallpaperItem::Create( SvStream& rStream, sal_uInt16 nVersion) const
{
return new CntWallpaperItem( Which(), rStream, nVersion );
}
// -----------------------------------------------------------------------
-SvStream& CntWallpaperItem::Store( SvStream& rStream, USHORT ) const
+SvStream& CntWallpaperItem::Store( SvStream& rStream, sal_uInt16 ) const
{
rStream << CNTWALLPAPERITEM_STREAM_MAGIC;
writeUnicodeString(rStream, _aURL);
// !!! Color stream operators do not work - they discard any
// transparency info !!!
// ??? Why the hell Color::Write(...) isn't const ???
- SAL_CONST_CAST( CntWallpaperItem*, this )->_nColor.Write( rStream, TRUE );
+ SAL_CONST_CAST( CntWallpaperItem*, this )->_nColor.Write( rStream, sal_True );
rStream << _nStyle;
return rStream;
@@ -150,18 +150,18 @@ SfxPoolItem* CntWallpaperItem::Clone( SfxItemPool* ) const
//----------------------------------------------------------------------------
// virtual
-BOOL CntWallpaperItem::QueryValue( com::sun::star::uno::Any&,BYTE ) const
+sal_Bool CntWallpaperItem::QueryValue( com::sun::star::uno::Any&,sal_uInt8 ) const
{
DBG_ERROR("Not implemented!");
- return FALSE;
+ return sal_False;
}
//----------------------------------------------------------------------------
// virtual
-BOOL CntWallpaperItem::PutValue( const com::sun::star::uno::Any&,BYTE )
+sal_Bool CntWallpaperItem::PutValue( const com::sun::star::uno::Any&,sal_uInt8 )
{
DBG_ERROR("Not implemented!");
- return FALSE;
+ return sal_False;
}
diff --git a/svl/source/items/ctypeitm.cxx b/svl/source/items/ctypeitm.cxx
index 576071b56e1c..184b692eaad9 100644
--- a/svl/source/items/ctypeitm.cxx
+++ b/svl/source/items/ctypeitm.cxx
@@ -35,8 +35,8 @@
//============================================================================
// The following defines are copied from chaos/source/items/cstritem.cxx:
-#define CNTSTRINGITEM_STREAM_MAGIC ( (UINT32)0xfefefefe )
-#define CNTSTRINGITEM_STREAM_SEEKREL (-( (long)( sizeof( UINT32 ) ) ) )
+#define CNTSTRINGITEM_STREAM_MAGIC ( (sal_uInt32)0xfefefefe )
+#define CNTSTRINGITEM_STREAM_SEEKREL (-( (long)( sizeof( sal_uInt32 ) ) ) )
//============================================================================
//
@@ -56,14 +56,14 @@ CntContentTypeItem::CntContentTypeItem()
}
//----------------------------------------------------------------------------
-CntContentTypeItem::CntContentTypeItem( USHORT which, const XubString& rType )
+CntContentTypeItem::CntContentTypeItem( sal_uInt16 which, const XubString& rType )
: CntUnencodedStringItem( which, rType ),
_eType( CONTENT_TYPE_NOT_INIT )
{
}
//----------------------------------------------------------------------------
-CntContentTypeItem::CntContentTypeItem( USHORT which,
+CntContentTypeItem::CntContentTypeItem( sal_uInt16 which,
const INetContentType eType )
: CntUnencodedStringItem( which, INetContentTypes::GetContentType( eType ) ),
_eType( eType )
@@ -80,7 +80,7 @@ CntContentTypeItem::CntContentTypeItem( const CntContentTypeItem& rOrig )
//============================================================================
// virtual
-USHORT CntContentTypeItem::GetVersion(USHORT) const
+sal_uInt16 CntContentTypeItem::GetVersion(sal_uInt16) const
{
return 1; // because it uses SfxPoolItem::read/writeUnicodeString()
}
@@ -88,17 +88,17 @@ USHORT CntContentTypeItem::GetVersion(USHORT) const
//----------------------------------------------------------------------------
// virtual
SfxPoolItem* CntContentTypeItem::Create( SvStream& rStream,
- USHORT nItemVersion ) const
+ sal_uInt16 nItemVersion ) const
{
// CntContentTypeItem used to be derived from CntStringItem, so take that
// into account:
UniString aValue;
readUnicodeString(rStream, aValue, nItemVersion >= 1);
- UINT32 nMagic = 0;
+ sal_uInt32 nMagic = 0;
rStream >> nMagic;
if (nMagic == CNTSTRINGITEM_STREAM_MAGIC)
{
- BOOL bEncrypted = FALSE;
+ sal_Bool bEncrypted = sal_False;
rStream >> bEncrypted;
DBG_ASSERT(!bEncrypted,
"CntContentTypeItem::Create() reads encrypted data");
@@ -111,12 +111,12 @@ SfxPoolItem* CntContentTypeItem::Create( SvStream& rStream,
//----------------------------------------------------------------------------
// virtual
-SvStream & CntContentTypeItem::Store(SvStream & rStream, USHORT) const
+SvStream & CntContentTypeItem::Store(SvStream & rStream, sal_uInt16) const
{
// CntContentTypeItem used to be derived from CntStringItem, so take that
// into account:
writeUnicodeString(rStream, GetValue());
- rStream << CNTSTRINGITEM_STREAM_MAGIC << BOOL(FALSE);
+ rStream << CNTSTRINGITEM_STREAM_MAGIC << sal_Bool(sal_False);
return rStream;
}
@@ -223,7 +223,7 @@ void CntContentTypeItem::SetValue( const INetContentType eType )
//----------------------------------------------------------------------------
// virtual
-BOOL CntContentTypeItem::QueryValue( com::sun::star::uno::Any& rVal,BYTE ) const
+sal_Bool CntContentTypeItem::QueryValue( com::sun::star::uno::Any& rVal,sal_uInt8 ) const
{
rVal <<= rtl::OUString(GetValue());
return true;
@@ -231,7 +231,7 @@ BOOL CntContentTypeItem::QueryValue( com::sun::star::uno::Any& rVal,BYTE ) const
//----------------------------------------------------------------------------
// virtual
-BOOL CntContentTypeItem::PutValue( const com::sun::star::uno::Any& rVal,BYTE )
+sal_Bool CntContentTypeItem::PutValue( const com::sun::star::uno::Any& rVal,sal_uInt8 )
{
rtl::OUString aValue;
if ( rVal >>= aValue )
diff --git a/svl/source/items/custritm.cxx b/svl/source/items/custritm.cxx
index 9d192cc7e7b8..ff5d2dadd751 100644
--- a/svl/source/items/custritm.cxx
+++ b/svl/source/items/custritm.cxx
@@ -106,7 +106,7 @@ CntUnencodedStringItem::GetPresentation(SfxItemPresentation, SfxMapUnit,
//============================================================================
// virtual
-BOOL CntUnencodedStringItem::QueryValue(com::sun::star::uno::Any& rVal, BYTE)
+sal_Bool CntUnencodedStringItem::QueryValue(com::sun::star::uno::Any& rVal, sal_uInt8)
const
{
rVal <<= rtl::OUString(m_aValue);
@@ -115,8 +115,8 @@ BOOL CntUnencodedStringItem::QueryValue(com::sun::star::uno::Any& rVal, BYTE)
//============================================================================
// virtual
-BOOL CntUnencodedStringItem::PutValue(const com::sun::star::uno::Any& rVal,
- BYTE)
+sal_Bool CntUnencodedStringItem::PutValue(const com::sun::star::uno::Any& rVal,
+ sal_uInt8)
{
rtl::OUString aTheValue;
if (rVal >>= aTheValue)
diff --git a/svl/source/items/dateitem.cxx b/svl/source/items/dateitem.cxx
index 27170c1d4f6e..eeaebb3fa2a7 100644
--- a/svl/source/items/dateitem.cxx
+++ b/svl/source/items/dateitem.cxx
@@ -56,7 +56,7 @@ TYPEINIT1(SfxDateTimeItem, SfxPoolItem);
// -----------------------------------------------------------------------
-SfxDateTimeItem::SfxDateTimeItem( USHORT which ) :
+SfxDateTimeItem::SfxDateTimeItem( sal_uInt16 which ) :
SfxPoolItem( which )
{
DBG_CTOR(SfxDateTimeItem, 0);
@@ -64,7 +64,7 @@ SfxDateTimeItem::SfxDateTimeItem( USHORT which ) :
// -----------------------------------------------------------------------
-SfxDateTimeItem::SfxDateTimeItem( USHORT which, const DateTime& rDT ) :
+SfxDateTimeItem::SfxDateTimeItem( sal_uInt16 which, const DateTime& rDT ) :
SfxPoolItem( which ),
aDateTime( rDT )
@@ -109,7 +109,7 @@ int SfxDateTimeItem::Compare( const SfxPoolItem& rItem ) const
// -----------------------------------------------------------------------
-SfxPoolItem* SfxDateTimeItem::Create( SvStream& rStream, USHORT ) const
+SfxPoolItem* SfxDateTimeItem::Create( SvStream& rStream, sal_uInt16 ) const
{
DBG_CHKTHIS(SfxDateTimeItem, 0);
sal_uInt32 nDate = 0;
@@ -122,7 +122,7 @@ SfxPoolItem* SfxDateTimeItem::Create( SvStream& rStream, USHORT ) const
// -----------------------------------------------------------------------
-SvStream& SfxDateTimeItem::Store( SvStream& rStream, USHORT ) const
+SvStream& SfxDateTimeItem::Store( SvStream& rStream, sal_uInt16 ) const
{
DBG_CHKTHIS(SfxDateTimeItem, 0);
rStream << aDateTime.GetDate();
@@ -174,8 +174,8 @@ SfxItemPresentation SfxDateTimeItem::GetPresentation
//----------------------------------------------------------------------------
// virtual
-BOOL SfxDateTimeItem::PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId )
+sal_Bool SfxDateTimeItem::PutValue( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId )
{
nMemberId &= ~CONVERT_TWIPS;
com::sun::star::util::DateTime aValue;
@@ -188,17 +188,17 @@ BOOL SfxDateTimeItem::PutValue( const com::sun::star::uno::Any& rVal,
aValue.Minutes,
aValue.Seconds,
aValue.HundredthSeconds ) );
- return TRUE;
+ return sal_True;
}
DBG_ERROR( "SfxDateTimeItem::PutValue - Wrong type!" );
- return FALSE;
+ return sal_False;
}
//----------------------------------------------------------------------------
// virtual
-BOOL SfxDateTimeItem::QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId ) const
+sal_Bool SfxDateTimeItem::QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
com::sun::star::util::DateTime aValue( aDateTime.Get100Sec(),
@@ -209,7 +209,7 @@ BOOL SfxDateTimeItem::QueryValue( com::sun::star::uno::Any& rVal,
aDateTime.GetMonth(),
aDateTime.GetYear() );
rVal <<= aValue;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -219,11 +219,11 @@ BOOL SfxDateTimeItem::QueryValue( com::sun::star::uno::Any& rVal,
TYPEINIT1(SfxColumnDateTimeItem, SfxDateTimeItem);
-SfxColumnDateTimeItem::SfxColumnDateTimeItem( USHORT which ) :
+SfxColumnDateTimeItem::SfxColumnDateTimeItem( sal_uInt16 which ) :
SfxDateTimeItem( which )
{}
-SfxColumnDateTimeItem::SfxColumnDateTimeItem( USHORT which, const DateTime& rDT ) :
+SfxColumnDateTimeItem::SfxColumnDateTimeItem( sal_uInt16 which, const DateTime& rDT ) :
SfxDateTimeItem( which, rDT )
{}
diff --git a/svl/source/items/flagitem.cxx b/svl/source/items/flagitem.cxx
index 93d88889daef..d1c0b84078a4 100644
--- a/svl/source/items/flagitem.cxx
+++ b/svl/source/items/flagitem.cxx
@@ -36,7 +36,7 @@
DBG_NAME(SfxFlagItem)
-USHORT nSfxFlagVal[16] =
+sal_uInt16 nSfxFlagVal[16] =
{
0x0001, 0x0002, 0x0004, 0x0008,
0x0010, 0x0020, 0x0040, 0x0080,
@@ -51,7 +51,7 @@ TYPEINIT1(SfxFlagItem, SfxPoolItem);
// -----------------------------------------------------------------------
-SfxFlagItem::SfxFlagItem( USHORT nW, USHORT nV ) :
+SfxFlagItem::SfxFlagItem( sal_uInt16 nW, sal_uInt16 nV ) :
SfxPoolItem( nW ),
nVal(nV)
{
@@ -60,7 +60,7 @@ SfxFlagItem::SfxFlagItem( USHORT nW, USHORT nV ) :
// -----------------------------------------------------------------------
-SfxFlagItem::SfxFlagItem( USHORT nW, SvStream &rStream) :
+SfxFlagItem::SfxFlagItem( sal_uInt16 nW, SvStream &rStream) :
SfxPoolItem( nW )
{
DBG_CTOR(SfxFlagItem, 0);
@@ -78,7 +78,7 @@ SfxFlagItem::SfxFlagItem( const SfxFlagItem& rItem ) :
// -----------------------------------------------------------------------
-SvStream& SfxFlagItem::Store(SvStream &rStream, USHORT) const
+SvStream& SfxFlagItem::Store(SvStream &rStream, sal_uInt16) const
{
DBG_CHKTHIS(SfxFlagItem, 0);
rStream << nVal;
@@ -98,32 +98,32 @@ SfxItemPresentation SfxFlagItem::GetPresentation
{
DBG_CHKTHIS(SfxFlagItem, 0);
rText.Erase();
- for ( BYTE nFlag = 0; nFlag < GetFlagCount(); ++nFlag )
+ for ( sal_uInt8 nFlag = 0; nFlag < GetFlagCount(); ++nFlag )
rText += XubString::CreateFromInt32( GetFlag(nFlag) );
return SFX_ITEM_PRESENTATION_NAMELESS;
}
// -----------------------------------------------------------------------
-XubString SfxFlagItem::GetFlagText( BYTE ) const
+XubString SfxFlagItem::GetFlagText( sal_uInt8 ) const
{
DBG_CHKTHIS(SfxFlagItem, 0);
- DBG_WARNING( "calling GetValueText(USHORT) on SfxFlagItem -- overload!" );
+ DBG_WARNING( "calling GetValueText(sal_uInt16) on SfxFlagItem -- overload!" );
return XubString();
}
// -----------------------------------------------------------------------
-BYTE SfxFlagItem::GetFlagCount() const
+sal_uInt8 SfxFlagItem::GetFlagCount() const
{
DBG_CHKTHIS(SfxFlagItem, 0);
- DBG_WARNING( "calling GetValueText(USHORT) on SfxFlagItem -- overload!" );
+ DBG_WARNING( "calling GetValueText(sal_uInt16) on SfxFlagItem -- overload!" );
return 0;
}
// -----------------------------------------------------------------------
-SfxPoolItem* SfxFlagItem::Create(SvStream &, USHORT) const
+SfxPoolItem* SfxFlagItem::Create(SvStream &, sal_uInt16) const
{
DBG_CHKTHIS(SfxFlagItem, 0);
DBG_WARNING( "calling Create() on SfxFlagItem -- overload!" );
@@ -141,7 +141,7 @@ int SfxFlagItem::operator==( const SfxPoolItem& rItem ) const
// -----------------------------------------------------------------------
-void SfxFlagItem::SetFlag( BYTE nFlag, int bVal )
+void SfxFlagItem::SetFlag( sal_uInt8 nFlag, int bVal )
{
if ( bVal )
nVal |= nSfxFlagVal[nFlag];
diff --git a/svl/source/items/globalnameitem.cxx b/svl/source/items/globalnameitem.cxx
index a0ebd97c89b6..c630a6b9b4f2 100644
--- a/svl/source/items/globalnameitem.cxx
+++ b/svl/source/items/globalnameitem.cxx
@@ -52,7 +52,7 @@ SfxGlobalNameItem::SfxGlobalNameItem()
// -----------------------------------------------------------------------
-SfxGlobalNameItem::SfxGlobalNameItem( USHORT nW, const SvGlobalName& rName )
+SfxGlobalNameItem::SfxGlobalNameItem( sal_uInt16 nW, const SvGlobalName& rName )
: SfxPoolItem( nW ),
m_aName( rName )
{
@@ -80,7 +80,7 @@ SfxPoolItem* SfxGlobalNameItem::Clone(SfxItemPool *) const
//----------------------------------------------------------------------------
// virtual
-BOOL SfxGlobalNameItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE )
+sal_Bool SfxGlobalNameItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 )
{
com::sun::star::uno::Reference < com::sun::star::script::XTypeConverter > xConverter
( ::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.script.Converter")),
@@ -94,21 +94,21 @@ BOOL SfxGlobalNameItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE )
if ( aSeq.getLength() == 16 )
{
m_aName.MakeFromMemory( (void*) aSeq.getConstArray() );
- return TRUE;
+ return sal_True;
}
DBG_ERROR( "SfxGlobalNameItem::PutValue - Wrong type!" );
- return FALSE;
+ return sal_False;
}
//----------------------------------------------------------------------------
// virtual
-BOOL SfxGlobalNameItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE ) const
+sal_Bool SfxGlobalNameItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 ) const
{
com::sun::star::uno::Sequence< sal_Int8 > aSeq( 16 );
void* pData = ( void* ) &m_aName.GetCLSID();
memcpy( aSeq.getArray(), pData, 16 );
rVal <<= aSeq;
- return TRUE;
+ return sal_True;
}
diff --git a/svl/source/items/ilstitem.cxx b/svl/source/items/ilstitem.cxx
index 691fa7d131be..66bc832c8125 100644
--- a/svl/source/items/ilstitem.cxx
+++ b/svl/source/items/ilstitem.cxx
@@ -43,11 +43,11 @@ SfxIntegerListItem::SfxIntegerListItem()
{
}
-SfxIntegerListItem::SfxIntegerListItem( USHORT which, const SvULongs& rList )
+SfxIntegerListItem::SfxIntegerListItem( sal_uInt16 which, const SvULongs& rList )
: SfxPoolItem( which )
{
m_aList.realloc( rList.Count() );
- for ( USHORT n=0; n<rList.Count(); n++ )
+ for ( sal_uInt16 n=0; n<rList.Count(); n++ )
m_aList[n] = rList[n];
}
@@ -64,7 +64,7 @@ SfxIntegerListItem::~SfxIntegerListItem()
int SfxIntegerListItem::operator==( const SfxPoolItem& rPoolItem ) const
{
if ( !rPoolItem.ISA( SfxIntegerListItem ) )
- return FALSE;
+ return sal_False;
const SfxIntegerListItem rItem = (const SfxIntegerListItem&) rPoolItem;
return rItem.m_aList == m_aList;
@@ -75,7 +75,7 @@ SfxPoolItem* SfxIntegerListItem::Clone( SfxItemPool * ) const
return new SfxIntegerListItem( *this );
}
-BOOL SfxIntegerListItem::PutValue ( const com::sun::star::uno::Any& rVal, BYTE )
+sal_Bool SfxIntegerListItem::PutValue ( const com::sun::star::uno::Any& rVal, sal_uInt8 )
{
::com::sun::star::uno::Reference < ::com::sun::star::script::XTypeConverter > xConverter
( ::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.script.Converter")),
@@ -84,20 +84,20 @@ BOOL SfxIntegerListItem::PutValue ( const com::sun::star::uno::Any& rVal, BYTE
try { aNew = xConverter->convertTo( rVal, ::getCppuType((const ::com::sun::star::uno::Sequence < sal_Int32 >*)0) ); }
catch (::com::sun::star::uno::Exception&)
{
- return FALSE;
+ return sal_False;
}
return ( aNew >>= m_aList );
}
-BOOL SfxIntegerListItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE ) const
+sal_Bool SfxIntegerListItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 ) const
{
rVal <<= m_aList;
- return TRUE;
+ return sal_True;
}
void SfxIntegerListItem::GetList( SvULongs& rList ) const
{
for ( sal_Int32 n=0; n<m_aList.getLength(); n++ )
- rList.Insert( m_aList[n], sal::static_int_cast< USHORT >(n) );
+ rList.Insert( m_aList[n], sal::static_int_cast< sal_uInt16 >(n) );
}
diff --git a/svl/source/items/imageitm.cxx b/svl/source/items/imageitm.cxx
index 88c3daa137dc..cd91f082ee1f 100644
--- a/svl/source/items/imageitm.cxx
+++ b/svl/source/items/imageitm.cxx
@@ -37,27 +37,27 @@ struct SfxImageItem_Impl
{
String aURL;
long nAngle;
- BOOL bMirrored;
+ sal_Bool bMirrored;
int operator == ( const SfxImageItem_Impl& rOther ) const
{ return nAngle == rOther.nAngle && bMirrored == rOther.bMirrored; }
};
//---------------------------------------------------------
-SfxImageItem::SfxImageItem( USHORT which, UINT16 nImage )
+SfxImageItem::SfxImageItem( sal_uInt16 which, sal_uInt16 nImage )
: SfxInt16Item( which, nImage )
{
pImp = new SfxImageItem_Impl;
pImp->nAngle = 0;
- pImp->bMirrored = FALSE;
+ pImp->bMirrored = sal_False;
}
-SfxImageItem::SfxImageItem( USHORT which, const String& rURL )
+SfxImageItem::SfxImageItem( sal_uInt16 which, const String& rURL )
: SfxInt16Item( which, 0 )
{
pImp = new SfxImageItem_Impl;
pImp->nAngle = 0;
- pImp->bMirrored = FALSE;
+ pImp->bMirrored = sal_False;
pImp->aURL = rURL;
}
@@ -87,7 +87,7 @@ int SfxImageItem::operator==( const SfxPoolItem& rItem ) const
return( ((SfxImageItem&) rItem).GetValue() == GetValue() && (*pImp == *(((SfxImageItem&)rItem).pImp) ) );
}
-BOOL SfxImageItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE ) const
+sal_Bool SfxImageItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 ) const
{
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > aSeq( 4 );
aSeq[0] = ::com::sun::star::uno::makeAny( GetValue() );
@@ -96,10 +96,10 @@ BOOL SfxImageItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE ) const
aSeq[3] = ::com::sun::star::uno::makeAny( rtl::OUString( pImp->aURL ));
rVal = ::com::sun::star::uno::makeAny( aSeq );
- return TRUE;
+ return sal_True;
}
-BOOL SfxImageItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE )
+sal_Bool SfxImageItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 )
{
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > aSeq;
if (( rVal >>= aSeq ) && ( aSeq.getLength() == 4 ))
@@ -112,10 +112,10 @@ BOOL SfxImageItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE )
aSeq[2] >>= pImp->bMirrored;
if ( aSeq[3] >>= aURL )
pImp->aURL = aURL;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
void SfxImageItem::SetRotation( long nValue )
@@ -128,12 +128,12 @@ long SfxImageItem::GetRotation() const
return pImp->nAngle;
}
-void SfxImageItem::SetMirrored( BOOL bSet )
+void SfxImageItem::SetMirrored( sal_Bool bSet )
{
pImp->bMirrored = bSet;
}
-BOOL SfxImageItem::IsMirrored() const
+sal_Bool SfxImageItem::IsMirrored() const
{
return pImp->bMirrored;
}
diff --git a/svl/source/items/intitem.cxx b/svl/source/items/intitem.cxx
index 0342af15e8cb..13c691123537 100644
--- a/svl/source/items/intitem.cxx
+++ b/svl/source/items/intitem.cxx
@@ -44,11 +44,11 @@ TYPEINIT1_AUTOFACTORY(SfxByteItem, CntByteItem);
//============================================================================
// virtual
-SfxPoolItem * SfxByteItem::Create(SvStream & rStream, USHORT) const
+SfxPoolItem * SfxByteItem::Create(SvStream & rStream, sal_uInt16) const
{
short nValue = 0;
rStream >> nValue;
- return new SfxByteItem(Which(), BYTE(nValue));
+ return new SfxByteItem(Which(), sal_uInt8(nValue));
}
//============================================================================
@@ -63,7 +63,7 @@ DBG_NAME(SfxInt16Item);
TYPEINIT1_AUTOFACTORY(SfxInt16Item, SfxPoolItem);
//============================================================================
-SfxInt16Item::SfxInt16Item(USHORT which, SvStream & rStream):
+SfxInt16Item::SfxInt16Item(sal_uInt16 which, SvStream & rStream):
SfxPoolItem(which)
{
DBG_CTOR(SfxInt16Item, 0);
@@ -111,31 +111,31 @@ SfxItemPresentation SfxInt16Item::GetPresentation(SfxItemPresentation,
//============================================================================
// virtual
-BOOL SfxInt16Item::QueryValue(com::sun::star::uno::Any& rVal, BYTE) const
+sal_Bool SfxInt16Item::QueryValue(com::sun::star::uno::Any& rVal, sal_uInt8) const
{
sal_Int16 nValue = m_nValue;
rVal <<= nValue;
- return TRUE;
+ return sal_True;
}
//============================================================================
// virtual
-BOOL SfxInt16Item::PutValue(const com::sun::star::uno::Any& rVal, BYTE )
+sal_Bool SfxInt16Item::PutValue(const com::sun::star::uno::Any& rVal, sal_uInt8 )
{
sal_Int16 nValue = sal_Int16();
if (rVal >>= nValue)
{
m_nValue = nValue;
- return TRUE;
+ return sal_True;
}
DBG_ERROR( "SfxInt16Item::PutValue - Wrong type!" );
- return FALSE;
+ return sal_False;
}
//============================================================================
// virtual
-SfxPoolItem * SfxInt16Item::Create(SvStream & rStream, USHORT) const
+SfxPoolItem * SfxInt16Item::Create(SvStream & rStream, sal_uInt16) const
{
DBG_CHKTHIS(SfxInt16Item, 0);
return new SfxInt16Item(Which(), rStream);
@@ -143,7 +143,7 @@ SfxPoolItem * SfxInt16Item::Create(SvStream & rStream, USHORT) const
//============================================================================
// virtual
-SvStream & SfxInt16Item::Store(SvStream & rStream, USHORT) const
+SvStream & SfxInt16Item::Store(SvStream & rStream, sal_uInt16) const
{
DBG_CHKTHIS(SfxInt16Item, 0);
rStream << short(m_nValue);
@@ -158,14 +158,14 @@ SfxPoolItem * SfxInt16Item::Clone(SfxItemPool *) const
}
//============================================================================
-INT16 SfxInt16Item::GetMin() const
+sal_Int16 SfxInt16Item::GetMin() const
{
DBG_CHKTHIS(SfxInt16Item, 0);
return -32768;
}
//============================================================================
-INT16 SfxInt16Item::GetMax() const
+sal_Int16 SfxInt16Item::GetMax() const
{
DBG_CHKTHIS(SfxInt16Item, 0);
return 32767;
@@ -217,14 +217,14 @@ DBG_NAME(SfxMetricItem);
TYPEINIT1_AUTOFACTORY(SfxMetricItem, SfxInt32Item);
//============================================================================
-SfxMetricItem::SfxMetricItem(USHORT which, UINT32 nValue):
+SfxMetricItem::SfxMetricItem(sal_uInt16 which, sal_uInt32 nValue):
SfxInt32Item(which, nValue)
{
DBG_CTOR(SfxMetricItem, 0);
}
//============================================================================
-SfxMetricItem::SfxMetricItem(USHORT which, SvStream & rStream):
+SfxMetricItem::SfxMetricItem(sal_uInt16 which, SvStream & rStream):
SfxInt32Item(which, rStream)
{
DBG_CTOR(SfxMetricItem, 0);
diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx
index d8bdeb330776..c5c0aa68addf 100644
--- a/svl/source/items/itempool.cxx
+++ b/svl/source/items/itempool.cxx
@@ -56,7 +56,7 @@ void SfxItemPool::RemoveSfxItemPoolUser(SfxItemPoolUser& rOldUser)
}
}
-const SfxPoolItem* SfxItemPool::GetPoolDefaultItem( USHORT nWhich ) const
+const SfxPoolItem* SfxItemPool::GetPoolDefaultItem( sal_uInt16 nWhich ) const
{
DBG_CHKTHIS(SfxItemPool, 0);
const SfxPoolItem* pRet;
@@ -74,15 +74,15 @@ const SfxPoolItem* SfxItemPool::GetPoolDefaultItem( USHORT nWhich ) const
// -----------------------------------------------------------------------
-inline FASTBOOL SfxItemPool::IsItemFlag_Impl( USHORT nPos, USHORT nFlag ) const
+inline FASTBOOL SfxItemPool::IsItemFlag_Impl( sal_uInt16 nPos, sal_uInt16 nFlag ) const
{
- USHORT nItemFlag = pItemInfos[nPos]._nFlags;
+ sal_uInt16 nItemFlag = pItemInfos[nPos]._nFlags;
return nFlag == (nItemFlag & nFlag);
}
// -----------------------------------------------------------------------
-FASTBOOL SfxItemPool::IsItemFlag( USHORT nWhich, USHORT nFlag ) const
+FASTBOOL SfxItemPool::IsItemFlag( sal_uInt16 nWhich, sal_uInt16 nFlag ) const
{
for ( const SfxItemPool *pPool = this; pPool; pPool = pPool->pSecondary )
{
@@ -90,7 +90,7 @@ FASTBOOL SfxItemPool::IsItemFlag( USHORT nWhich, USHORT nFlag ) const
return pPool->IsItemFlag_Impl( pPool->GetIndex_Impl(nWhich), nFlag);
}
DBG_ASSERT( !IsWhich(nWhich), "unknown which-id" );
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -107,8 +107,8 @@ SfxItemPool::SfxItemPool
(
UniString const & rName, /* Name des Pools zur Idetifikation
im File-Format */
- USHORT nStartWhich, /* erste Which-Id des Pools */
- USHORT nEndWhich, /* letzte Which-Id des Pools */
+ sal_uInt16 nStartWhich, /* erste Which-Id des Pools */
+ sal_uInt16 nEndWhich, /* letzte Which-Id des Pools */
#ifdef TF_POOLABLE
const SfxItemInfo* pInfos, /* SID-Map und Item-Flags */
#endif
@@ -116,7 +116,7 @@ SfxItemPool::SfxItemPool
wird direkt vom Pool referenziert,
jedoch kein Eigent"umer"ubergang */
#ifndef TF_POOLABLE
- USHORT* pSlotIdArray, /* Zuordnung von Slot-Ids zu Which-Ids */
+ sal_uInt16* pSlotIdArray, /* Zuordnung von Slot-Ids zu Which-Ids */
#endif
FASTBOOL bLoadRefCounts /* Ref-Counts mitladen oder auf 1 setzen */
)
@@ -148,8 +148,8 @@ SfxItemPool::SfxItemPool
[Querverweise]
<SfxItemPool::SetDefaults(SfxItemPool**)>
- <SfxItemPool::ReleaseDefaults(SfxPoolItem**,USHORT,BOOL)>
- <SfxItemPool::ReldaseDefaults(BOOL)>
+ <SfxItemPool::ReleaseDefaults(SfxPoolItem**,sal_uInt16,sal_Bool)>
+ <SfxItemPool::ReldaseDefaults(sal_Bool)>
*/
: aName(rName),
@@ -174,12 +174,12 @@ SfxItemPool::SfxItemPool
pImp->eDefMetric = SFX_MAPUNIT_TWIP;
pImp->nVersion = 0;
- pImp->bStreaming = FALSE;
+ pImp->bStreaming = sal_False;
pImp->nLoadingVersion = 0;
pImp->nInitRefCount = 1;
pImp->nVerStart = nStart;
pImp->nVerEnd = nEnd;
- pImp->bInSetItem = FALSE;
+ pImp->bInSetItem = sal_False;
pImp->nStoringStart = nStartWhich;
pImp->nStoringEnd = nEndWhich;
@@ -195,10 +195,10 @@ SfxItemPool::SfxItemPool
SfxItemPool::SfxItemPool
(
const SfxItemPool& rPool, // von dieser Instanz kopieren
- BOOL bCloneStaticDefaults /* TRUE
+ sal_Bool bCloneStaticDefaults /* sal_True
statische Defaults kopieren
- FALSE
+ sal_False
statische Defaults
"ubernehehmen */
)
@@ -233,12 +233,12 @@ SfxItemPool::SfxItemPool
DBG_CTOR(SfxItemPool, 0);
pImp->eDefMetric = rPool.pImp->eDefMetric;
pImp->nVersion = rPool.pImp->nVersion;
- pImp->bStreaming = FALSE;
+ pImp->bStreaming = sal_False;
pImp->nLoadingVersion = 0;
pImp->nInitRefCount = 1;
pImp->nVerStart = rPool.pImp->nVerStart;
pImp->nVerEnd = rPool.pImp->nVerEnd;
- pImp->bInSetItem = FALSE;
+ pImp->bInSetItem = sal_False;
pImp->nStoringStart = nStart;
pImp->nStoringEnd = nEnd;
@@ -248,7 +248,7 @@ SfxItemPool::SfxItemPool
if ( bCloneStaticDefaults )
{
SfxPoolItem **ppDefaults = new SfxPoolItem*[nEnd-nStart+1];
- for ( USHORT n = 0; n <= nEnd - nStart; ++n )
+ for ( sal_uInt16 n = 0; n <= nEnd - nStart; ++n )
{
(*( ppDefaults + n )) = (*( rPool.ppStaticDefaults + n ))->Clone(this);
(*( ppDefaults + n ))->SetKind( SFX_ITEMS_STATICDEFAULT );
@@ -260,7 +260,7 @@ SfxItemPool::SfxItemPool
SetDefaults( rPool.ppStaticDefaults );
// Pool Defaults kopieren
- for ( USHORT n = 0; n <= nEnd - nStart; ++n )
+ for ( sal_uInt16 n = 0; n <= nEnd - nStart; ++n )
if ( (*( rPool.ppPoolDefaults + n )) )
{
(*( ppPoolDefaults + n )) = (*( rPool.ppPoolDefaults + n ))->Clone(this);
@@ -295,7 +295,7 @@ void SfxItemPool::SetDefaults( SfxPoolItem **pDefaults )
DBG_ASSERT( (*ppStaticDefaults)->GetRefCount() == 0 ||
IsDefaultItem( (*ppStaticDefaults) ),
"das sind keine statics" );
- for ( USHORT n = 0; n <= nEnd - nStart; ++n )
+ for ( sal_uInt16 n = 0; n <= nEnd - nStart; ++n )
{
SFX_ASSERT( (*( ppStaticDefaults + n ))->Which() == n + nStart,
n + nStart, "static defaults not sorted" );
@@ -309,11 +309,11 @@ void SfxItemPool::SetDefaults( SfxPoolItem **pDefaults )
void SfxItemPool::ReleaseDefaults
(
- BOOL bDelete /* TRUE
+ sal_Bool bDelete /* sal_True
l"oscht sowohl das Array als auch die einzelnen
statischen Defaults
- FALSE
+ sal_False
l"oscht weder das Array noch die einzelnen
statischen Defaults */
)
@@ -332,7 +332,7 @@ void SfxItemPool::ReleaseDefaults
ReleaseDefaults( ppStaticDefaults, nEnd - nStart + 1, bDelete );
// KSO (22.10.98): ppStaticDefaults zeigt auf geloeschten Speicher,
- // wenn bDelete == TRUE.
+ // wenn bDelete == sal_True.
if ( bDelete )
ppStaticDefaults = 0;
}
@@ -343,13 +343,13 @@ void SfxItemPool::ReleaseDefaults
(
SfxPoolItem** pDefaults, /* freizugebende statische Defaults */
- USHORT nCount, /* Anzahl der statischen Defaults */
+ sal_uInt16 nCount, /* Anzahl der statischen Defaults */
- BOOL bDelete /* TRUE
+ sal_Bool bDelete /* sal_True
l"oscht sowohl das Array als auch die
einzelnen statischen Defaults
- FALSE
+ sal_False
l"oscht weder das Array noch die
einzelnen statischen Defaults */
)
@@ -367,7 +367,7 @@ void SfxItemPool::ReleaseDefaults
{
DBG_ASSERT( pDefaults, "erst wollen, dann nichts geben..." );
- for ( USHORT n = 0; n < nCount; ++n )
+ for ( sal_uInt16 n = 0; n < nCount; ++n )
{
SFX_ASSERT( IsStaticDefaultItem( *(pDefaults+n) ),
n, "das ist kein static-default" );
@@ -431,13 +431,13 @@ void SfxItemPool::SetSecondaryPool( SfxItemPool *pPool )
if ( pImp->ppPoolItems && pSecondary->pImp->ppPoolItems )
{
// hat der master SetItems?
- BOOL bHasSetItems = FALSE;
- for ( USHORT i = 0; !bHasSetItems && i < nEnd-nStart; ++i )
+ sal_Bool bHasSetItems = sal_False;
+ for ( sal_uInt16 i = 0; !bHasSetItems && i < nEnd-nStart; ++i )
bHasSetItems = ppStaticDefaults[i]->ISA(SfxSetItem);
// abgehaengte Pools muessen leer sein
- BOOL bOK = bHasSetItems;
- for ( USHORT n = 0;
+ sal_Bool bOK = bHasSetItems;
+ for ( sal_uInt16 n = 0;
bOK && n <= pSecondary->nEnd - pSecondary->nStart;
++n )
{
@@ -450,7 +450,7 @@ void SfxItemPool::SetSecondaryPool( SfxItemPool *pPool )
if ( !(*ppHtArr) )
{
DBG_ERROR( "old secondary pool must be empty" );
- bOK = FALSE;
+ bOK = sal_False;
break;
}
}
@@ -476,7 +476,7 @@ void SfxItemPool::SetSecondaryPool( SfxItemPool *pPool )
// -----------------------------------------------------------------------
-SfxMapUnit SfxItemPool::GetMetric( USHORT ) const
+SfxMapUnit SfxItemPool::GetMetric( sal_uInt16 ) const
{
DBG_CHKTHIS(SfxItemPool, 0);
@@ -555,7 +555,7 @@ void SfxItemPool::Delete()
SfxPoolItemArray_Impl** ppItemArr = pImp->ppPoolItems;
SfxPoolItem** ppDefaultItem = ppPoolDefaults;
SfxPoolItem** ppStaticDefaultItem = ppStaticDefaults;
- USHORT nArrCnt;
+ sal_uInt16 nArrCnt;
//Erst die SetItems abraeumen
HACK( "fuer Image, dort gibt es derzeit keine Statics - Bug" )
@@ -639,7 +639,7 @@ void SfxItemPool::Cleanup()
SfxPoolItemArray_Impl** ppItemArr = pImp->ppPoolItems;
SfxPoolItem** ppDefaultItem = ppPoolDefaults;
SfxPoolItem** ppStaticDefaultItem = ppStaticDefaults;
- USHORT nArrCnt;
+ sal_uInt16 nArrCnt;
HACK( "fuer Image, dort gibt es derzeit keine Statics - Bug" )
if ( ppStaticDefaults ) //HACK fuer Image, dort gibt es keine Statics!!
@@ -709,7 +709,7 @@ void SfxItemPool::SetPoolDefaultItem(const SfxPoolItem &rItem)
* Resets the default of the given <Which-Id> back to the static default.
* If a pool default exists it is removed.
*/
-void SfxItemPool::ResetPoolDefaultItem( USHORT nWhichId )
+void SfxItemPool::ResetPoolDefaultItem( sal_uInt16 nWhichId )
{
DBG_CHKTHIS(SfxItemPool, 0);
if ( IsInRange(nWhichId) )
@@ -732,7 +732,7 @@ void SfxItemPool::ResetPoolDefaultItem( USHORT nWhichId )
// -----------------------------------------------------------------------
-const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, USHORT nWhich )
+const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich )
{
DBG_ASSERT( !rItem.ISA(SfxSetItem) ||
0 != &((const SfxSetItem&)rItem).GetItemSet(),
@@ -743,7 +743,7 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, USHORT nWhich )
nWhich = rItem.Which();
// richtigen Secondary-Pool finden
- BOOL bSID = nWhich > SFX_WHICH_MAX;
+ sal_Bool bSID = nWhich > SFX_WHICH_MAX;
if ( !bSID && !IsInRange(nWhich) )
{
if ( pSecondary )
@@ -752,7 +752,7 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, USHORT nWhich )
}
// SID oder nicht poolable (neue Definition)?
- USHORT nIndex = bSID ? USHRT_MAX : GetIndex_Impl(nWhich);
+ sal_uInt16 nIndex = bSID ? USHRT_MAX : GetIndex_Impl(nWhich);
if ( USHRT_MAX == nIndex ||
IsItemFlag_Impl( nIndex, SFX_ITEM_NOT_POOLABLE ) )
{
@@ -773,7 +773,7 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, USHORT nWhich )
*ppItemArr = new SfxPoolItemArray_Impl;
SfxPoolItemArrayBase_Impl::iterator ppFree;
- BOOL ppFreeIsSet = FALSE;
+ sal_Bool ppFreeIsSet = sal_False;
SfxPoolItemArrayBase_Impl::iterator ppHtArray = (*ppItemArr)->begin();
if ( IsItemFlag_Impl( nIndex, SFX_ITEM_POOLABLE ) )
{
@@ -803,10 +803,10 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, USHORT nWhich )
}
}
else
- if ( ppFreeIsSet == FALSE )
+ if ( ppFreeIsSet == sal_False )
{
ppFree = ppHtArray;
- ppFreeIsSet = TRUE;
+ ppFreeIsSet = sal_True;
}
}
}
@@ -822,7 +822,7 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, USHORT nWhich )
if ( !*ppHtArr )
{
ppFree = ppHtArr;
- ppFreeIsSet = TRUE;
+ ppFreeIsSet = sal_True;
break;
}
@@ -849,7 +849,7 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, USHORT nWhich )
#endif
AddRef( *pNewItem, pImp->nInitRefCount );
SfxPoolItem* pTemp = pNewItem;
- if ( ppFreeIsSet == FALSE )
+ if ( ppFreeIsSet == sal_False )
(*ppItemArr)->push_back( pTemp );
else
{
@@ -873,8 +873,8 @@ void SfxItemPool::Remove( const SfxPoolItem& rItem )
"wo kommt denn hier ein Pool-Default her" );
// richtigen Secondary-Pool finden
- const USHORT nWhich = rItem.Which();
- BOOL bSID = nWhich > SFX_WHICH_MAX;
+ const sal_uInt16 nWhich = rItem.Which();
+ sal_Bool bSID = nWhich > SFX_WHICH_MAX;
if ( !bSID && !IsInRange(nWhich) )
{
if ( pSecondary )
@@ -886,7 +886,7 @@ void SfxItemPool::Remove( const SfxPoolItem& rItem )
}
// SID oder nicht poolable (neue Definition)?
- USHORT nIndex = bSID ? USHRT_MAX : GetIndex_Impl(nWhich);
+ sal_uInt16 nIndex = bSID ? USHRT_MAX : GetIndex_Impl(nWhich);
if ( bSID || IsItemFlag_Impl( nIndex, SFX_ITEM_NOT_POOLABLE ) )
{
SFX_ASSERT( USHRT_MAX != nIndex ||
@@ -941,7 +941,7 @@ void SfxItemPool::Remove( const SfxPoolItem& rItem )
// -----------------------------------------------------------------------
-const SfxPoolItem& SfxItemPool::GetDefaultItem( USHORT nWhich ) const
+const SfxPoolItem& SfxItemPool::GetDefaultItem( sal_uInt16 nWhich ) const
{
DBG_CHKTHIS(SfxItemPool, 0);
@@ -953,7 +953,7 @@ const SfxPoolItem& SfxItemPool::GetDefaultItem( USHORT nWhich ) const
}
DBG_ASSERT( ppStaticDefaults, "no defaults known - dont ask me for defaults" );
- USHORT nPos = GetIndex_Impl(nWhich);
+ sal_uInt16 nPos = GetIndex_Impl(nWhich);
SfxPoolItem *pDefault = *(ppPoolDefaults + nPos);
if ( pDefault )
return *pDefault;
@@ -981,17 +981,17 @@ void SfxItemPool::FreezeIdRanges()
// -----------------------------------------------------------------------
-void SfxItemPool::FillItemIdRanges_Impl( USHORT*& pWhichRanges ) const
+void SfxItemPool::FillItemIdRanges_Impl( sal_uInt16*& pWhichRanges ) const
{
DBG_CHKTHIS(SfxItemPool, 0);
DBG_ASSERT( !_pPoolRanges, "GetFrozenRanges() would be faster!" );
const SfxItemPool *pPool;
- USHORT nLevel = 0;
+ sal_uInt16 nLevel = 0;
for( pPool = this; pPool; pPool = pPool->pSecondary )
++nLevel;
- pWhichRanges = new USHORT[ 2*nLevel + 1 ];
+ pWhichRanges = new sal_uInt16[ 2*nLevel + 1 ];
nLevel = 0;
for( pPool = this; pPool; pPool = pPool->pSecondary )
@@ -1004,7 +1004,7 @@ void SfxItemPool::FillItemIdRanges_Impl( USHORT*& pWhichRanges ) const
// -----------------------------------------------------------------------
-const SfxPoolItem *SfxItemPool::GetItem2(USHORT nWhich, sal_uInt32 nOfst) const
+const SfxPoolItem *SfxItemPool::GetItem2(sal_uInt16 nWhich, sal_uInt32 nOfst) const
{
DBG_CHKTHIS(SfxItemPool, 0);
@@ -1029,7 +1029,7 @@ const SfxPoolItem *SfxItemPool::GetItem2(USHORT nWhich, sal_uInt32 nOfst) const
// -----------------------------------------------------------------------
-sal_uInt32 SfxItemPool::GetItemCount2(USHORT nWhich) const
+sal_uInt32 SfxItemPool::GetItemCount2(sal_uInt16 nWhich) const
{
DBG_CHKTHIS(SfxItemPool, 0);
@@ -1049,21 +1049,21 @@ sal_uInt32 SfxItemPool::GetItemCount2(USHORT nWhich) const
// -----------------------------------------------------------------------
-USHORT SfxItemPool::GetWhich( USHORT nSlotId, BOOL bDeep ) const
+sal_uInt16 SfxItemPool::GetWhich( sal_uInt16 nSlotId, sal_Bool bDeep ) const
{
if ( !IsSlot(nSlotId) )
return nSlotId;
#ifdef TF_POOLABLE
- USHORT nCount = nEnd - nStart + 1;
- for ( USHORT nOfs = 0; nOfs < nCount; ++nOfs )
+ sal_uInt16 nCount = nEnd - nStart + 1;
+ for ( sal_uInt16 nOfs = 0; nOfs < nCount; ++nOfs )
if ( pItemInfos[nOfs]._nSID == nSlotId )
return nOfs + nStart;
#else
if ( pSlotIds )
{
- USHORT nCount = nEnd - nStart + 1;
- for ( USHORT nOfs = 0; nOfs < nCount; ++nOfs )
+ sal_uInt16 nCount = nEnd - nStart + 1;
+ for ( sal_uInt16 nOfs = 0; nOfs < nCount; ++nOfs )
if ( pSlotIds[nOfs] == nSlotId )
return nOfs + nStart;
}
@@ -1075,7 +1075,7 @@ USHORT SfxItemPool::GetWhich( USHORT nSlotId, BOOL bDeep ) const
// -----------------------------------------------------------------------
-USHORT SfxItemPool::GetSlotId( USHORT nWhich, BOOL bDeep ) const
+sal_uInt16 SfxItemPool::GetSlotId( sal_uInt16 nWhich, sal_Bool bDeep ) const
{
if ( !IsWhich(nWhich) )
return nWhich;
@@ -1089,7 +1089,7 @@ USHORT SfxItemPool::GetSlotId( USHORT nWhich, BOOL bDeep ) const
}
#ifdef TF_POOLABLE
- USHORT nSID = pItemInfos[nWhich - nStart]._nSID;
+ sal_uInt16 nSID = pItemInfos[nWhich - nStart]._nSID;
return nSID ? nSID : nWhich;
#else
else if ( pSlotIds )
@@ -1100,21 +1100,21 @@ USHORT SfxItemPool::GetSlotId( USHORT nWhich, BOOL bDeep ) const
// -----------------------------------------------------------------------
-USHORT SfxItemPool::GetTrueWhich( USHORT nSlotId, BOOL bDeep ) const
+sal_uInt16 SfxItemPool::GetTrueWhich( sal_uInt16 nSlotId, sal_Bool bDeep ) const
{
if ( !IsSlot(nSlotId) )
return 0;
#ifdef TF_POOLABLE
- USHORT nCount = nEnd - nStart + 1;
- for ( USHORT nOfs = 0; nOfs < nCount; ++nOfs )
+ sal_uInt16 nCount = nEnd - nStart + 1;
+ for ( sal_uInt16 nOfs = 0; nOfs < nCount; ++nOfs )
if ( pItemInfos[nOfs]._nSID == nSlotId )
return nOfs + nStart;
#else
if ( pSlotIds )
{
- USHORT nCount = nEnd - nStart + 1;
- for ( USHORT nOfs = 0; nOfs < nCount; ++nOfs )
+ sal_uInt16 nCount = nEnd - nStart + 1;
+ for ( sal_uInt16 nOfs = 0; nOfs < nCount; ++nOfs )
if ( pSlotIds[nOfs] == nSlotId )
return nOfs + nStart;
}
@@ -1126,7 +1126,7 @@ USHORT SfxItemPool::GetTrueWhich( USHORT nSlotId, BOOL bDeep ) const
// -----------------------------------------------------------------------
-USHORT SfxItemPool::GetTrueSlotId( USHORT nWhich, BOOL bDeep ) const
+sal_uInt16 SfxItemPool::GetTrueSlotId( sal_uInt16 nWhich, sal_Bool bDeep ) const
{
if ( !IsWhich(nWhich) )
return 0;
@@ -1148,7 +1148,7 @@ USHORT SfxItemPool::GetTrueSlotId( USHORT nWhich, BOOL bDeep ) const
#endif
}
// -----------------------------------------------------------------------
-void SfxItemPool::SetFileFormatVersion( USHORT nFileFormatVersion )
+void SfxItemPool::SetFileFormatVersion( sal_uInt16 nFileFormatVersion )
/* [Description]
diff --git a/svl/source/items/itemprop.cxx b/svl/source/items/itemprop.cxx
index b3be80bc3d0b..eb146afe893b 100644
--- a/svl/source/items/itemprop.cxx
+++ b/svl/source/items/itemprop.cxx
@@ -214,9 +214,9 @@ SfxItemPropertySet::~SfxItemPropertySet()
/* -----------------------------21.02.00 11:26--------------------------------
---------------------------------------------------------------------------*/
-BOOL SfxItemPropertySet::FillItem(SfxItemSet&, USHORT, BOOL) const
+sal_Bool SfxItemPropertySet::FillItem(SfxItemSet&, sal_uInt16, sal_Bool) const
{
- return FALSE;
+ return sal_False;
}
/* -----------------------------06.06.01 12:32--------------------------------
@@ -227,7 +227,7 @@ void SfxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry& rEn
{
// get the SfxPoolItem
const SfxPoolItem* pItem = 0;
- SfxItemState eState = rSet.GetItemState( rEntry.nWID, TRUE, &pItem );
+ SfxItemState eState = rSet.GetItemState( rEntry.nWID, sal_True, &pItem );
if(SFX_ITEM_SET != eState && SFX_WHICH_MAX > rEntry.nWID )
pItem = &rSet.GetPool()->GetDefaultItem(rEntry.nWID);
// return item values as uno::Any
@@ -238,7 +238,7 @@ void SfxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry& rEn
else
{
SfxItemSet aSet(*rSet.GetPool(), rEntry.nWID, rEntry.nWID);
- if(FillItem(aSet, rEntry.nWID, TRUE))
+ if(FillItem(aSet, rEntry.nWID, sal_True))
{
const SfxPoolItem& rItem = aSet.Get(rEntry.nWID);
rItem.QueryValue( rAny, rEntry.nMemberId );
@@ -252,7 +252,7 @@ void SfxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry& rEn
if( rEntry.pType && TypeClass_ENUM == rEntry.pType->getTypeClass() &&
rAny.getValueTypeClass() == TypeClass_LONG )
{
- INT32 nTmp = *(INT32*)rAny.getValue();
+ sal_Int32 nTmp = *(sal_Int32*)rAny.getValue();
rAny.setValue( &nTmp, *rEntry.pType );
}
}
@@ -292,14 +292,14 @@ void SfxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry& rEn
// get the SfxPoolItem
const SfxPoolItem* pItem = 0;
SfxPoolItem *pNewItem = 0;
- SfxItemState eState = rSet.GetItemState( rEntry.nWID, TRUE, &pItem );
+ SfxItemState eState = rSet.GetItemState( rEntry.nWID, sal_True, &pItem );
if(SFX_ITEM_SET != eState && SFX_WHICH_MAX > rEntry.nWID )
pItem = &rSet.GetPool()->GetDefaultItem(rEntry.nWID);
//maybe there's another way to find an Item
if(eState < SFX_ITEM_DEFAULT)
{
SfxItemSet aSet(*rSet.GetPool(), rEntry.nWID, rEntry.nWID);
- if(FillItem(aSet, rEntry.nWID, FALSE))
+ if(FillItem(aSet, rEntry.nWID, sal_False))
{
const SfxPoolItem &rItem = aSet.Get(rEntry.nWID);
pNewItem = rItem.Clone();
@@ -345,10 +345,10 @@ PropertyState SfxItemPropertySet::getPropertyState(const SfxItemPropertySimpleEn
throw()
{
PropertyState eRet = PropertyState_DIRECT_VALUE;
- USHORT nWhich = rEntry.nWID;
+ sal_uInt16 nWhich = rEntry.nWID;
// item state holen
- SfxItemState eState = rSet.GetItemState( nWhich, FALSE );
+ SfxItemState eState = rSet.GetItemState( nWhich, sal_False );
// item-Wert als UnoAny zurueckgeben
if(eState == SFX_ITEM_DEFAULT)
eRet = PropertyState_DEFAULT_VALUE;
@@ -368,11 +368,11 @@ PropertyState SfxItemPropertySet::getPropertyState(
{
throw UnknownPropertyException();
}
- USHORT nWhich = pEntry->nWID;
+ sal_uInt16 nWhich = pEntry->nWID;
// item holen
const SfxPoolItem* pItem = 0;
- SfxItemState eState = rSet.GetItemState( nWhich, FALSE, &pItem );
+ SfxItemState eState = rSet.GetItemState( nWhich, sal_False, &pItem );
if(!pItem && nWhich != rSet.GetPool()->GetSlotId(nWhich))
pItem = &rSet.GetPool()->GetDefaultItem(nWhich);
// item-Wert als UnoAny zurueckgeben
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index 540db537be46..250e7f99a6ec 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -50,16 +50,16 @@
// STATIC DATA -----------------------------------------------------------
-static const USHORT nInitCount = 10; // einzelne USHORTs => 5 Paare ohne '0'
+static const sal_uInt16 nInitCount = 10; // einzelne USHORTs => 5 Paare ohne '0'
#ifdef DBG_UTIL
-static ULONG nRangesCopyCount = 0; // wie oft wurden Ranges kopiert
+static sal_uLong nRangesCopyCount = 0; // wie oft wurden Ranges kopiert
#endif
DBG_NAME(SfxItemSet)
//========================================================================
-#define NUMTYPE USHORT
+#define NUMTYPE sal_uInt16
#define SvNums SvUShorts
#define SfxNumRanges SfxUShortRanges
#include "nranges.cxx"
@@ -67,7 +67,7 @@ DBG_NAME(SfxItemSet)
#undef SvNums
#undef SfxNumRanges
-#define NUMTYPE ULONG
+#define NUMTYPE sal_uLong
#define SvNums SvULongs
#define SfxNumRanges SfxULongRanges
#include "nranges.cxx"
@@ -84,8 +84,8 @@ const sal_Char *DbgCheckItemSet( const void* pVoid )
{
const SfxItemSet *pSet = (const SfxItemSet*) pVoid;
SfxWhichIter aIter( *pSet );
- USHORT nCount = 0, n = 0;
- for ( USHORT nWh = aIter.FirstWhich(); nWh; nWh = aIter.NextWhich(), ++n )
+ sal_uInt16 nCount = 0, n = 0;
+ for ( sal_uInt16 nWh = aIter.FirstWhich(); nWh; nWh = aIter.NextWhich(), ++n )
{
const SfxPoolItem *pItem = pSet->_aItems[n];
if ( pItem )
@@ -115,12 +115,12 @@ SfxItemSet::SfxItemSet
SfxItemPool& rPool, /* der Pool, in dem die SfxPoolItems,
welche in dieses SfxItemSet gelangen,
aufgenommen werden sollen */
- BOOL
+ sal_Bool
#ifdef DBG_UTIL
#ifdef SFX_ITEMSET_NO_DEFAULT_CTOR
bTotalRanges /* komplette Pool-Ranges uebernehmen,
- muss auf TRUE gesetzt werden */
+ muss auf sal_True gesetzt werden */
#endif
#endif
)
@@ -152,19 +152,19 @@ SfxItemSet::SfxItemSet
#endif
#endif
- _pWhichRanges = (USHORT*) _pPool->GetFrozenIdRanges();
+ _pWhichRanges = (sal_uInt16*) _pPool->GetFrozenIdRanges();
DBG_ASSERT( _pWhichRanges, "don't create ItemSets with full range before FreezeIdRanges()" );
if ( !_pWhichRanges )
_pPool->FillItemIdRanges_Impl( _pWhichRanges );
- const USHORT nSize = TotalCount();
+ const sal_uInt16 nSize = TotalCount();
_aItems = new const SfxPoolItem* [ nSize ];
memset( (void*) _aItems, 0, nSize * sizeof( SfxPoolItem* ) );
}
// -----------------------------------------------------------------------
-SfxItemSet::SfxItemSet( SfxItemPool& rPool, USHORT nWhich1, USHORT nWhich2 ):
+SfxItemSet::SfxItemSet( SfxItemPool& rPool, sal_uInt16 nWhich1, sal_uInt16 nWhich2 ):
_pPool( &rPool ),
_pParent( 0 ),
_nCount( 0 )
@@ -179,25 +179,25 @@ SfxItemSet::SfxItemSet( SfxItemPool& rPool, USHORT nWhich1, USHORT nWhich2 ):
// -----------------------------------------------------------------------
-void SfxItemSet::InitRanges_Impl(USHORT nWh1, USHORT nWh2)
+void SfxItemSet::InitRanges_Impl(sal_uInt16 nWh1, sal_uInt16 nWh2)
{
DBG_CHKTHIS(SfxItemSet, 0);
- _pWhichRanges = new USHORT[ 3 ];
+ _pWhichRanges = new sal_uInt16[ 3 ];
*(_pWhichRanges+0) = nWh1;
*(_pWhichRanges+1) = nWh2;
*(_pWhichRanges+2) = 0;
- const USHORT nRg = nWh2 - nWh1 + 1;
+ const sal_uInt16 nRg = nWh2 - nWh1 + 1;
_aItems = new const SfxPoolItem* [ nRg ];
memset( (void*) _aItems, 0, nRg * sizeof( SfxPoolItem* ) );
}
// -----------------------------------------------------------------------
-void SfxItemSet::InitRanges_Impl(va_list pArgs, USHORT nWh1, USHORT nWh2, USHORT nNull)
+void SfxItemSet::InitRanges_Impl(va_list pArgs, sal_uInt16 nWh1, sal_uInt16 nWh2, sal_uInt16 nNull)
{
DBG_CHKTHIS(SfxItemSet, 0);
- USHORT nSize = InitializeRanges_Impl( _pWhichRanges, pArgs, nWh1, nWh2, nNull );
+ sal_uInt16 nSize = InitializeRanges_Impl( _pWhichRanges, pArgs, nWh1, nWh2, nNull );
_aItems = new const SfxPoolItem* [ nSize ];
memset( (void*) _aItems, 0, sizeof( SfxPoolItem* ) * nSize );
}
@@ -218,27 +218,27 @@ SfxItemSet::SfxItemSet( SfxItemPool& rPool,
if(!nNull)
InitRanges_Impl(
- sal::static_int_cast< USHORT >(nWh1),
- sal::static_int_cast< USHORT >(nWh2));
+ sal::static_int_cast< sal_uInt16 >(nWh1),
+ sal::static_int_cast< sal_uInt16 >(nWh2));
else {
va_list pArgs;
va_start( pArgs, nNull );
InitRanges_Impl(
- pArgs, sal::static_int_cast< USHORT >(nWh1),
- sal::static_int_cast< USHORT >(nWh2),
- sal::static_int_cast< USHORT >(nNull));
+ pArgs, sal::static_int_cast< sal_uInt16 >(nWh1),
+ sal::static_int_cast< sal_uInt16 >(nWh2),
+ sal::static_int_cast< sal_uInt16 >(nNull));
}
}
// -----------------------------------------------------------------------
-void SfxItemSet::InitRanges_Impl(const USHORT *pWhichPairTable)
+void SfxItemSet::InitRanges_Impl(const sal_uInt16 *pWhichPairTable)
{
DBG_CHKTHIS(SfxItemSet, 0);
DBG_TRACE1("SfxItemSet: Ranges-CopyCount==%ul", ++nRangesCopyCount);
- USHORT nCnt = 0;
- const USHORT* pPtr = pWhichPairTable;
+ sal_uInt16 nCnt = 0;
+ const sal_uInt16* pPtr = pWhichPairTable;
while( *pPtr )
{
nCnt += ( *(pPtr+1) - *pPtr ) + 1;
@@ -249,14 +249,14 @@ void SfxItemSet::InitRanges_Impl(const USHORT *pWhichPairTable)
memset( (void*) _aItems, 0, sizeof( SfxPoolItem* ) * nCnt );
std::ptrdiff_t cnt = pPtr - pWhichPairTable +1;
- _pWhichRanges = new USHORT[ cnt ];
- memcpy( _pWhichRanges, pWhichPairTable, sizeof( USHORT ) * cnt );
+ _pWhichRanges = new sal_uInt16[ cnt ];
+ memcpy( _pWhichRanges, pWhichPairTable, sizeof( sal_uInt16 ) * cnt );
}
// -----------------------------------------------------------------------
-SfxItemSet::SfxItemSet( SfxItemPool& rPool, const USHORT* pWhichPairTable ):
+SfxItemSet::SfxItemSet( SfxItemPool& rPool, const sal_uInt16* pWhichPairTable ):
_pPool( &rPool ),
_pParent( 0 ),
_pWhichRanges(0),
@@ -284,8 +284,8 @@ SfxItemSet::SfxItemSet( const SfxItemSet& rASet ):
DBG( ++*_pChildCount(_pParent) );
// errechne die Anzahl von Attributen
- USHORT nCnt = 0;
- USHORT* pPtr = rASet._pWhichRanges;
+ sal_uInt16 nCnt = 0;
+ sal_uInt16* pPtr = rASet._pWhichRanges;
while( *pPtr )
{
nCnt += ( *(pPtr+1) - *pPtr ) + 1;
@@ -296,7 +296,7 @@ SfxItemSet::SfxItemSet( const SfxItemSet& rASet ):
// Attribute kopieren
SfxItemArray ppDst = _aItems, ppSrc = rASet._aItems;
- for( USHORT n = nCnt; n; --n, ++ppDst, ++ppSrc )
+ for( sal_uInt16 n = nCnt; n; --n, ++ppDst, ++ppSrc )
if ( 0 == *ppSrc || // aktueller Default?
IsInvalidItem(*ppSrc) || // Dont Care?
IsStaticDefaultItem(*ppSrc) ) // nicht zu poolende Defaults
@@ -317,8 +317,8 @@ SfxItemSet::SfxItemSet( const SfxItemSet& rASet ):
// dann noch die Which Ranges kopieren
DBG_TRACE1("SfxItemSet: Ranges-CopyCount==%ul", ++nRangesCopyCount);
std::ptrdiff_t cnt = pPtr - rASet._pWhichRanges+1;
- _pWhichRanges = new USHORT[ cnt ];
- memcpy( _pWhichRanges, rASet._pWhichRanges, sizeof( USHORT ) * cnt);
+ _pWhichRanges = new sal_uInt16[ cnt ];
+ memcpy( _pWhichRanges, rASet._pWhichRanges, sizeof( sal_uInt16 ) * cnt);
}
// -----------------------------------------------------------------------
@@ -330,11 +330,11 @@ SfxItemSet::~SfxItemSet()
DBG( DBG_ASSERT( 0 == *_pChildCount(this), "SfxItemSet: deleting parent-itemset" ) )
#endif
- USHORT nCount = TotalCount();
+ sal_uInt16 nCount = TotalCount();
if( Count() )
{
SfxItemArray ppFnd = _aItems;
- for( USHORT nCnt = nCount; nCnt; --nCnt, ++ppFnd )
+ for( sal_uInt16 nCnt = nCount; nCnt; --nCnt, ++ppFnd )
if( *ppFnd && !IsInvalidItem(*ppFnd) )
{
if( !(*ppFnd)->Which() )
@@ -364,7 +364,7 @@ SfxItemSet::~SfxItemSet()
// -----------------------------------------------------------------------
-USHORT SfxItemSet::ClearItem( USHORT nWhich )
+sal_uInt16 SfxItemSet::ClearItem( sal_uInt16 nWhich )
// einzelnes Item oder alle Items (nWhich==0) l"oschen
@@ -373,12 +373,12 @@ USHORT SfxItemSet::ClearItem( USHORT nWhich )
if( !Count() )
return 0;
- USHORT nDel = 0;
+ sal_uInt16 nDel = 0;
SfxItemArray ppFnd = _aItems;
if( nWhich )
{
- const USHORT* pPtr = _pWhichRanges;
+ const sal_uInt16* pPtr = _pWhichRanges;
while( *pPtr )
{
// in diesem Bereich?
@@ -398,7 +398,7 @@ USHORT SfxItemSet::ClearItem( USHORT nWhich )
if ( nWhich <= SFX_WHICH_MAX )
{
const SfxPoolItem& rNew = _pParent
- ? _pParent->Get( nWhich, TRUE )
+ ? _pParent->Get( nWhich, sal_True )
: _pPool->GetDefaultItem( nWhich );
Changed( *pItemToClear, rNew );
@@ -420,7 +420,7 @@ USHORT SfxItemSet::ClearItem( USHORT nWhich )
{
nDel = _nCount;
- USHORT* pPtr = _pWhichRanges;
+ sal_uInt16* pPtr = _pWhichRanges;
while( *pPtr )
{
for( nWhich = *pPtr; nWhich <= *(pPtr+1); ++nWhich, ++ppFnd )
@@ -436,7 +436,7 @@ USHORT SfxItemSet::ClearItem( USHORT nWhich )
if ( nWhich <= SFX_WHICH_MAX )
{
const SfxPoolItem& rNew = _pParent
- ? _pParent->Get( nWhich, TRUE )
+ ? _pParent->Get( nWhich, sal_True )
: _pPool->GetDefaultItem( nWhich );
Changed( *pItemToClear, rNew );
@@ -464,15 +464,15 @@ USHORT SfxItemSet::ClearItem( USHORT nWhich )
// -----------------------------------------------------------------------
-void SfxItemSet::ClearInvalidItems( BOOL bHardDefault )
+void SfxItemSet::ClearInvalidItems( sal_Bool bHardDefault )
{
DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet);
- USHORT* pPtr = _pWhichRanges;
+ sal_uInt16* pPtr = _pWhichRanges;
SfxItemArray ppFnd = _aItems;
if ( bHardDefault )
while( *pPtr )
{
- for ( USHORT nWhich = *pPtr; nWhich <= *(pPtr+1); ++nWhich, ++ppFnd )
+ for ( sal_uInt16 nWhich = *pPtr; nWhich <= *(pPtr+1); ++nWhich, ++ppFnd )
if ( IsInvalidItem(*ppFnd) )
*ppFnd = &_pPool->Put( _pPool->GetDefaultItem(nWhich) );
pPtr += 2;
@@ -480,7 +480,7 @@ void SfxItemSet::ClearInvalidItems( BOOL bHardDefault )
else
while( *pPtr )
{
- for( USHORT nWhich = *pPtr; nWhich <= *(pPtr+1); ++nWhich, ++ppFnd )
+ for( sal_uInt16 nWhich = *pPtr; nWhich <= *(pPtr+1); ++nWhich, ++ppFnd )
if( IsInvalidItem(*ppFnd) )
{
*ppFnd = 0;
@@ -503,8 +503,8 @@ void SfxItemSet::InvalidateAllItems()
// -----------------------------------------------------------------------
-SfxItemState SfxItemSet::GetItemState( USHORT nWhich,
- BOOL bSrchInParent,
+SfxItemState SfxItemSet::GetItemState( sal_uInt16 nWhich,
+ sal_Bool bSrchInParent,
const SfxPoolItem **ppItem ) const
{
DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet);
@@ -514,7 +514,7 @@ SfxItemState SfxItemSet::GetItemState( USHORT nWhich,
do
{
SfxItemArray ppFnd = pAktSet->_aItems;
- const USHORT* pPtr = pAktSet->_pWhichRanges;
+ const sal_uInt16* pPtr = pAktSet->_pWhichRanges;
if (pPtr)
{
while ( *pPtr )
@@ -560,7 +560,7 @@ SfxItemState SfxItemSet::GetItemState( USHORT nWhich,
// -----------------------------------------------------------------------
-const SfxPoolItem* SfxItemSet::Put( const SfxPoolItem& rItem, USHORT nWhich )
+const SfxPoolItem* SfxItemSet::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich )
{
DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet);
DBG_ASSERT( !rItem.ISA(SfxSetItem) ||
@@ -569,7 +569,7 @@ const SfxPoolItem* SfxItemSet::Put( const SfxPoolItem& rItem, USHORT nWhich )
if ( !nWhich )
return 0; //! nur wegen Outliner-Bug
SfxItemArray ppFnd = _aItems;
- const USHORT* pPtr = _pWhichRanges;
+ const sal_uInt16* pPtr = _pWhichRanges;
while( *pPtr )
{
if( *pPtr <= nWhich && nWhich <= *(pPtr+1) )
@@ -621,7 +621,7 @@ const SfxPoolItem* SfxItemSet::Put( const SfxPoolItem& rItem, USHORT nWhich )
if (nWhich <= SFX_WHICH_MAX )
{
const SfxPoolItem& rOld = _pParent
- ? _pParent->Get( nWhich, TRUE )
+ ? _pParent->Get( nWhich, sal_True )
: _pPool->GetDefaultItem( nWhich );
Changed( rOld, rNew );
}
@@ -640,17 +640,17 @@ const SfxPoolItem* SfxItemSet::Put( const SfxPoolItem& rItem, USHORT nWhich )
// -----------------------------------------------------------------------
-int SfxItemSet::Put( const SfxItemSet& rSet, BOOL bInvalidAsDefault )
+int SfxItemSet::Put( const SfxItemSet& rSet, sal_Bool bInvalidAsDefault )
{
DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet);
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( rSet.Count() )
{
SfxItemArray ppFnd = rSet._aItems;
- const USHORT* pPtr = rSet._pWhichRanges;
+ const sal_uInt16* pPtr = rSet._pWhichRanges;
while ( *pPtr )
{
- for ( USHORT nWhich = *pPtr; nWhich <= *(pPtr+1); ++nWhich, ++ppFnd )
+ for ( sal_uInt16 nWhich = *pPtr; nWhich <= *(pPtr+1); ++nWhich, ++ppFnd )
if( *ppFnd )
{
if ( IsInvalidItem( *ppFnd ) )
@@ -702,10 +702,10 @@ void SfxItemSet::PutExtended
// don't "optimize" with "if( rSet.Count()" because of dont-care + defaults
SfxItemArray ppFnd = rSet._aItems;
- const USHORT* pPtr = rSet._pWhichRanges;
+ const sal_uInt16* pPtr = rSet._pWhichRanges;
while ( *pPtr )
{
- for ( USHORT nWhich = *pPtr; nWhich <= *(pPtr+1); ++nWhich, ++ppFnd )
+ for ( sal_uInt16 nWhich = *pPtr; nWhich <= *(pPtr+1); ++nWhich, ++ppFnd )
if( *ppFnd )
{
if ( IsInvalidItem( *ppFnd ) )
@@ -760,7 +760,7 @@ void SfxItemSet::PutExtended
// -----------------------------------------------------------------------
-void SfxItemSet::MergeRange( USHORT nFrom, USHORT nTo )
+void SfxItemSet::MergeRange( sal_uInt16 nFrom, sal_uInt16 nTo )
/** <H3>Description</H3>
Expands the ranges of settable items by 'nFrom' to 'nTo'. Keeps state of
@@ -768,8 +768,8 @@ void SfxItemSet::MergeRange( USHORT nFrom, USHORT nTo )
*/
{
- // special case: exactly one USHORT which is already included?
- if ( nFrom == nTo && SFX_ITEM_AVAILABLE <= GetItemState(nFrom, FALSE) )
+ // special case: exactly one sal_uInt16 which is already included?
+ if ( nFrom == nTo && SFX_ITEM_AVAILABLE <= GetItemState(nFrom, sal_False) )
return;
// merge new range
@@ -780,7 +780,7 @@ void SfxItemSet::MergeRange( USHORT nFrom, USHORT nTo )
// -----------------------------------------------------------------------
-void SfxItemSet::SetRanges( const USHORT *pNewRanges )
+void SfxItemSet::SetRanges( const sal_uInt16 *pNewRanges )
/** <H3>Description</H3>
@@ -792,8 +792,8 @@ void SfxItemSet::SetRanges( const USHORT *pNewRanges )
// identische Ranges?
if ( _pWhichRanges == pNewRanges )
return;
- const USHORT* pOld = _pWhichRanges;
- const USHORT* pNew = pNewRanges;
+ const sal_uInt16* pOld = _pWhichRanges;
+ const sal_uInt16* pNew = pNewRanges;
while ( *pOld == *pNew )
{
if ( !*pOld && !*pNew )
@@ -802,20 +802,20 @@ void SfxItemSet::SetRanges( const USHORT *pNewRanges )
}
// create new item-array (by iterating through all new ranges)
- ULONG nSize = Capacity_Impl(pNewRanges);
+ sal_uLong nSize = Capacity_Impl(pNewRanges);
SfxItemArray aNewItems = new const SfxPoolItem* [ nSize ];
- USHORT n = 0, nNewCount = 0;
+ sal_uInt16 n = 0, nNewCount = 0;
if ( _nCount == 0 )
memset( aNewItems, 0, nSize * sizeof( SfxPoolItem* ) );
else
{
- for ( const USHORT *pRange = pNewRanges; *pRange; pRange += 2 )
+ for ( const sal_uInt16 *pRange = pNewRanges; *pRange; pRange += 2 )
{
// iterate through all ids in the range
- for ( USHORT nWID = *pRange; nWID <= pRange[1]; ++nWID, ++n )
+ for ( sal_uInt16 nWID = *pRange; nWID <= pRange[1]; ++nWID, ++n )
{
// direct move of pointer (not via pool)
- SfxItemState eState = GetItemState( nWID, FALSE, aNewItems+n );
+ SfxItemState eState = GetItemState( nWID, sal_False, aNewItems+n );
if ( SFX_ITEM_SET == eState )
{
// increment new item count and possibly increment ref count
@@ -841,8 +841,8 @@ void SfxItemSet::SetRanges( const USHORT *pNewRanges )
}
}
// free old items
- USHORT nOldTotalCount = TotalCount();
- for ( USHORT nItem = 0; nItem < nOldTotalCount; ++nItem )
+ sal_uInt16 nOldTotalCount = TotalCount();
+ for ( sal_uInt16 nItem = 0; nItem < nOldTotalCount; ++nItem )
{
const SfxPoolItem *pItem = _aItems[nItem];
if ( pItem && !IsInvalidItem(pItem) && pItem->Which() )
@@ -858,15 +858,15 @@ void SfxItemSet::SetRanges( const USHORT *pNewRanges )
if( pNewRanges == GetPool()->GetFrozenIdRanges() )
{
delete[] _pWhichRanges;
- _pWhichRanges = ( USHORT* ) pNewRanges;
+ _pWhichRanges = ( sal_uInt16* ) pNewRanges;
}
else
{
- USHORT nCount = Count_Impl(pNewRanges) + 1;
+ sal_uInt16 nCount = Count_Impl(pNewRanges) + 1;
if ( _pWhichRanges != _pPool->GetFrozenIdRanges() )
delete[] _pWhichRanges;
- _pWhichRanges = new USHORT[ nCount ];
- memcpy( _pWhichRanges, pNewRanges, sizeof( USHORT ) * nCount );
+ _pWhichRanges = new sal_uInt16[ nCount ];
+ memcpy( _pWhichRanges, pNewRanges, sizeof( sal_uInt16 ) * nCount );
}
}
@@ -877,12 +877,12 @@ int SfxItemSet::Set
const SfxItemSet& rSet, /* das SfxItemSet, dessen SfxPoolItems
"ubernommen werden sollen */
- BOOL bDeep /* TRUE (default)
+ sal_Bool bDeep /* sal_True (default)
auch die SfxPoolItems aus den ggf. an
rSet vorhandenen Parents werden direkt
in das SfxItemSet "ubernommen
- FALSE
+ sal_False
die SfxPoolItems aus den Parents von
rSet werden nicht ber"ucksichtigt */
)
@@ -895,16 +895,16 @@ int SfxItemSet::Set
so da"s die "ubernommenen SfxPoolItems dabei ggf. vom SfxItemPool
von rSet in den SfxItemPool von *this "ubernommen werden.
- SfxPoolItems, f"ur die in rSet IsInvalidItem() == TRUE gilt,
+ SfxPoolItems, f"ur die in rSet IsInvalidItem() == sal_True gilt,
werden als Invalid-Item "ubernommen.
[R"uckgabewert]
- int TRUE
+ int sal_True
es wurden SfxPoolItems "ubernommen
- FALSE
+ sal_False
es wurden keine SfxPoolItems "ubernommen,
da z.B. die Which-Bereiche der SfxItemSets
keine Schnittmenge haben oder in der
@@ -915,23 +915,23 @@ int SfxItemSet::Set
{
DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet);
- int bRet = FALSE;
+ int bRet = sal_False;
if ( _nCount )
ClearItem();
if ( bDeep )
{
SfxWhichIter aIter(*this);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rSet.GetItemState( nWhich, TRUE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState( nWhich, sal_True, &pItem ) )
bRet |= 0 != Put( *pItem, pItem->Which() );
nWhich = aIter.NextWhich();
}
}
else
- bRet = Put(rSet, FALSE);
+ bRet = Put(rSet, sal_False);
return bRet;
}
@@ -940,8 +940,8 @@ int SfxItemSet::Set
const SfxPoolItem* SfxItemSet::GetItem
(
- USHORT nId, // Slot-Id oder Which-Id des Items
- BOOL bSrchInParent, // TRUE: auch in Parent-ItemSets suchen
+ sal_uInt16 nId, // Slot-Id oder Which-Id des Items
+ sal_Bool bSrchInParent, // sal_True: auch in Parent-ItemSets suchen
TypeId aItemType // != 0 => RTTI Pruefung mit Assertion
) const
@@ -958,9 +958,9 @@ const SfxPoolItem* SfxItemSet::GetItem
{
// ggf. in Which-Id umrechnen
- USHORT nWhich = GetPool()->GetWhich(nId);
+ sal_uInt16 nWhich = GetPool()->GetWhich(nId);
- // ist das Item gesetzt oder bei bDeep==TRUE verf"ugbar?
+ // ist das Item gesetzt oder bei bDeep==sal_True verf"ugbar?
const SfxPoolItem *pItem = 0;
SfxItemState eState = GetItemState( nWhich, bSrchInParent, &pItem );
if ( bSrchInParent && SFX_ITEM_AVAILABLE == eState &&
@@ -984,7 +984,7 @@ const SfxPoolItem* SfxItemSet::GetItem
//------------------------------------------------------------------------
-const SfxPoolItem& SfxItemSet::Get( USHORT nWhich, BOOL bSrchInParent) const
+const SfxPoolItem& SfxItemSet::Get( sal_uInt16 nWhich, sal_Bool bSrchInParent) const
{
DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet);
// suche den Bereich in dem das Which steht:
@@ -994,7 +994,7 @@ const SfxPoolItem& SfxItemSet::Get( USHORT nWhich, BOOL bSrchInParent) const
if( pAktSet->Count() )
{
SfxItemArray ppFnd = pAktSet->_aItems;
- const USHORT* pPtr = pAktSet->_pWhichRanges;
+ const sal_uInt16* pPtr = pAktSet->_pWhichRanges;
while( *pPtr )
{
if( *pPtr <= nWhich && nWhich <= *(pPtr+1) )
@@ -1050,11 +1050,11 @@ void SfxItemSet::Changed( const SfxPoolItem&, const SfxPoolItem& )
// -----------------------------------------------------------------------
-USHORT SfxItemSet::TotalCount() const
+sal_uInt16 SfxItemSet::TotalCount() const
{
DBG_CHKTHIS(SfxItemSet, 0); // wird im Ctor benutzt bevor vollst. init.
- USHORT nRet = 0;
- USHORT* pPtr = _pWhichRanges;
+ sal_uInt16 nRet = 0;
+ sal_uInt16* pPtr = _pWhichRanges;
while( *pPtr )
{
nRet += ( *(pPtr+1) - *pPtr ) + 1;
@@ -1081,16 +1081,16 @@ void SfxItemSet::Intersect( const SfxItemSet& rSet )
}
// teste mal, ob sich die Which-Bereiche unterscheiden.
- BOOL bEqual = TRUE;
- USHORT* pWh1 = _pWhichRanges;
- USHORT* pWh2 = rSet._pWhichRanges;
- USHORT nSize = 0;
+ sal_Bool bEqual = sal_True;
+ sal_uInt16* pWh1 = _pWhichRanges;
+ sal_uInt16* pWh2 = rSet._pWhichRanges;
+ sal_uInt16 nSize = 0;
- for( USHORT n = 0; *pWh1 && *pWh2; ++pWh1, ++pWh2, ++n )
+ for( sal_uInt16 n = 0; *pWh1 && *pWh2; ++pWh1, ++pWh2, ++n )
{
if( *pWh1 != *pWh2 )
{
- bEqual = FALSE;
+ bEqual = sal_False;
break;
}
if( n & 1 )
@@ -1110,11 +1110,11 @@ void SfxItemSet::Intersect( const SfxItemSet& rSet )
// aus dem Pool loeschen
if( !IsInvalidItem( *ppFnd1 ) )
{
- USHORT nWhich = (*ppFnd1)->Which();
+ sal_uInt16 nWhich = (*ppFnd1)->Which();
if(nWhich <= SFX_WHICH_MAX)
{
const SfxPoolItem& rNew = _pParent
- ? _pParent->Get( nWhich, TRUE )
+ ? _pParent->Get( nWhich, sal_True )
: _pPool->GetDefaultItem( nWhich );
Changed( **ppFnd1, rNew );
@@ -1129,12 +1129,12 @@ void SfxItemSet::Intersect( const SfxItemSet& rSet )
{
SfxItemIter aIter( *this );
const SfxPoolItem* pItem = aIter.GetCurItem();
- while( TRUE )
+ while( sal_True )
{
- USHORT nWhich = IsInvalidItem( pItem )
+ sal_uInt16 nWhich = IsInvalidItem( pItem )
? GetWhichByPos( aIter.GetCurPos() )
: pItem->Which();
- if( 0 == rSet.GetItemState( nWhich, FALSE ) )
+ if( 0 == rSet.GetItemState( nWhich, sal_False ) )
ClearItem( nWhich ); // loeschen
if( aIter.IsAtEnd() )
break;
@@ -1152,16 +1152,16 @@ void SfxItemSet::Differentiate( const SfxItemSet& rSet )
return;
// teste mal, ob sich die Which-Bereiche unterscheiden.
- BOOL bEqual = TRUE;
- USHORT* pWh1 = _pWhichRanges;
- USHORT* pWh2 = rSet._pWhichRanges;
- USHORT nSize = 0;
+ sal_Bool bEqual = sal_True;
+ sal_uInt16* pWh1 = _pWhichRanges;
+ sal_uInt16* pWh2 = rSet._pWhichRanges;
+ sal_uInt16 nSize = 0;
- for( USHORT n = 0; *pWh1 && *pWh2; ++pWh1, ++pWh2, ++n )
+ for( sal_uInt16 n = 0; *pWh1 && *pWh2; ++pWh1, ++pWh2, ++n )
{
if( *pWh1 != *pWh2 )
{
- bEqual = FALSE;
+ bEqual = sal_False;
break;
}
if( n & 1 )
@@ -1181,11 +1181,11 @@ void SfxItemSet::Differentiate( const SfxItemSet& rSet )
// aus dem Pool loeschen
if( !IsInvalidItem( *ppFnd1 ) )
{
- USHORT nWhich = (*ppFnd1)->Which();
+ sal_uInt16 nWhich = (*ppFnd1)->Which();
if(nWhich <= SFX_WHICH_MAX)
{
const SfxPoolItem& rNew = _pParent
- ? _pParent->Get( nWhich, TRUE )
+ ? _pParent->Get( nWhich, sal_True )
: _pPool->GetDefaultItem( nWhich );
Changed( **ppFnd1, rNew );
@@ -1200,12 +1200,12 @@ void SfxItemSet::Differentiate( const SfxItemSet& rSet )
{
SfxItemIter aIter( *this );
const SfxPoolItem* pItem = aIter.GetCurItem();
- while( TRUE )
+ while( sal_True )
{
- USHORT nWhich = IsInvalidItem( pItem )
+ sal_uInt16 nWhich = IsInvalidItem( pItem )
? GetWhichByPos( aIter.GetCurPos() )
: pItem->Which();
- if( SFX_ITEM_SET == rSet.GetItemState( nWhich, FALSE ) )
+ if( SFX_ITEM_SET == rSet.GetItemState( nWhich, sal_False ) )
ClearItem( nWhich ); // loeschen
if( aIter.IsAtEnd() )
break;
@@ -1225,79 +1225,79 @@ Grundsaetze:
1.-Item 2.-Item Values bIgnoreDefs Remove Assign Add
-set set == FALSE - - -
-default set == FALSE - - -
-dontcare set == FALSE - - -
-unknown set == FALSE - - -
-set default == FALSE - - -
-default default == FALSE - - -
-dontcare default == FALSE - - -
-unknown default == FALSE - - -
-set dontcare == FALSE 1.-Item -1 -
-default dontcare == FALSE - -1 -
-dontcare dontcare == FALSE - - -
-unknown dontcare == FALSE - - -
-set unknown == FALSE 1.-Item -1 -
-default unknown == FALSE - - -
-dontcare unknown == FALSE - - -
-unknown unknown == FALSE - - -
-
-set set != FALSE 1.-Item -1 -
-default set != FALSE - -1 -
-dontcare set != FALSE - - -
-unknown set != FALSE - - -
-set default != FALSE 1.-Item -1 -
-default default != FALSE - - -
-dontcare default != FALSE - - -
-unknown default != FALSE - - -
-set dontcare != FALSE 1.-Item -1 -
-default dontcare != FALSE - -1 -
-dontcare dontcare != FALSE - - -
-unknown dontcare != FALSE - - -
-set unknown != FALSE 1.-Item -1 -
-default unknown != FALSE - - -
-dontcare unknown != FALSE - - -
-unknown unknown != FALSE - - -
-
-set set == TRUE - - -
-default set == TRUE - 2.-Item 2.-Item
-dontcare set == TRUE - - -
-unknown set == TRUE - - -
-set default == TRUE - - -
-default default == TRUE - - -
-dontcare default == TRUE - - -
-unknown default == TRUE - - -
-set dontcare == TRUE - - -
-default dontcare == TRUE - -1 -
-dontcare dontcare == TRUE - - -
-unknown dontcare == TRUE - - -
-set unknown == TRUE - - -
-default unknown == TRUE - - -
-dontcare unknown == TRUE - - -
-unknown unknown == TRUE - - -
-
-set set != TRUE 1.-Item -1 -
-default set != TRUE - 2.-Item 2.-Item
-dontcare set != TRUE - - -
-unknown set != TRUE - - -
-set default != TRUE - - -
-default default != TRUE - - -
-dontcare default != TRUE - - -
-unknown default != TRUE - - -
-set dontcare != TRUE 1.-Item -1 -
-default dontcare != TRUE - -1 -
-dontcare dontcare != TRUE - - -
-unknown dontcare != TRUE - - -
-set unknown != TRUE - - -
-default unknown != TRUE - - -
-dontcare unknown != TRUE - - -
-unknown unknown != TRUE - - -
+set set == sal_False - - -
+default set == sal_False - - -
+dontcare set == sal_False - - -
+unknown set == sal_False - - -
+set default == sal_False - - -
+default default == sal_False - - -
+dontcare default == sal_False - - -
+unknown default == sal_False - - -
+set dontcare == sal_False 1.-Item -1 -
+default dontcare == sal_False - -1 -
+dontcare dontcare == sal_False - - -
+unknown dontcare == sal_False - - -
+set unknown == sal_False 1.-Item -1 -
+default unknown == sal_False - - -
+dontcare unknown == sal_False - - -
+unknown unknown == sal_False - - -
+
+set set != sal_False 1.-Item -1 -
+default set != sal_False - -1 -
+dontcare set != sal_False - - -
+unknown set != sal_False - - -
+set default != sal_False 1.-Item -1 -
+default default != sal_False - - -
+dontcare default != sal_False - - -
+unknown default != sal_False - - -
+set dontcare != sal_False 1.-Item -1 -
+default dontcare != sal_False - -1 -
+dontcare dontcare != sal_False - - -
+unknown dontcare != sal_False - - -
+set unknown != sal_False 1.-Item -1 -
+default unknown != sal_False - - -
+dontcare unknown != sal_False - - -
+unknown unknown != sal_False - - -
+
+set set == sal_True - - -
+default set == sal_True - 2.-Item 2.-Item
+dontcare set == sal_True - - -
+unknown set == sal_True - - -
+set default == sal_True - - -
+default default == sal_True - - -
+dontcare default == sal_True - - -
+unknown default == sal_True - - -
+set dontcare == sal_True - - -
+default dontcare == sal_True - -1 -
+dontcare dontcare == sal_True - - -
+unknown dontcare == sal_True - - -
+set unknown == sal_True - - -
+default unknown == sal_True - - -
+dontcare unknown == sal_True - - -
+unknown unknown == sal_True - - -
+
+set set != sal_True 1.-Item -1 -
+default set != sal_True - 2.-Item 2.-Item
+dontcare set != sal_True - - -
+unknown set != sal_True - - -
+set default != sal_True - - -
+default default != sal_True - - -
+dontcare default != sal_True - - -
+unknown default != sal_True - - -
+set dontcare != sal_True 1.-Item -1 -
+default dontcare != sal_True - -1 -
+dontcare dontcare != sal_True - - -
+unknown dontcare != sal_True - - -
+set unknown != sal_True - - -
+default unknown != sal_True - - -
+dontcare unknown != sal_True - - -
+unknown unknown != sal_True - - -
*/
-static void MergeItem_Impl( SfxItemPool *_pPool, USHORT &rCount,
+static void MergeItem_Impl( SfxItemPool *_pPool, sal_uInt16 &rCount,
const SfxPoolItem **ppFnd1, const SfxPoolItem *pFnd2,
- BOOL bIgnoreDefaults )
+ sal_Bool bIgnoreDefaults )
{
DBG_ASSERT( ppFnd1 != 0, "Merging to 0-Item" );
@@ -1310,11 +1310,11 @@ static void MergeItem_Impl( SfxItemPool *_pPool, USHORT &rCount,
else if ( pFnd2 && !bIgnoreDefaults &&
_pPool->GetDefaultItem(pFnd2->Which()) != *pFnd2 )
- // Entscheidungstabelle: default, set, !=, FALSE
+ // Entscheidungstabelle: default, set, !=, sal_False
*ppFnd1 = (SfxPoolItem*) -1;
else if ( pFnd2 && bIgnoreDefaults )
- // Entscheidungstabelle: default, set, egal, TRUE
+ // Entscheidungstabelle: default, set, egal, sal_True
*ppFnd1 = &_pPool->Put( *pFnd2 );
if ( *ppFnd1 )
@@ -1330,7 +1330,7 @@ static void MergeItem_Impl( SfxItemPool *_pPool, USHORT &rCount,
if ( !bIgnoreDefaults &&
**ppFnd1 != _pPool->GetDefaultItem((*ppFnd1)->Which()) )
{
- // Entscheidungstabelle: set, default, !=, FALSE
+ // Entscheidungstabelle: set, default, !=, sal_False
_pPool->Remove( **ppFnd1 );
*ppFnd1 = (SfxPoolItem*) -1;
}
@@ -1341,8 +1341,8 @@ static void MergeItem_Impl( SfxItemPool *_pPool, USHORT &rCount,
if ( !bIgnoreDefaults ||
**ppFnd1 != _pPool->GetDefaultItem( (*ppFnd1)->Which()) )
{
- // Entscheidungstabelle: set, dontcare, egal, FALSE
- // oder: set, dontcare, !=, TRUE
+ // Entscheidungstabelle: set, dontcare, egal, sal_False
+ // oder: set, dontcare, !=, sal_True
_pPool->Remove( **ppFnd1 );
*ppFnd1 = (SfxPoolItem*) -1;
}
@@ -1362,23 +1362,23 @@ static void MergeItem_Impl( SfxItemPool *_pPool, USHORT &rCount,
// -----------------------------------------------------------------------
-void SfxItemSet::MergeValues( const SfxItemSet& rSet, BOOL bIgnoreDefaults )
+void SfxItemSet::MergeValues( const SfxItemSet& rSet, sal_Bool bIgnoreDefaults )
{
// Achtung!!! Bei Aenderungen/Bugfixes immer obenstehende Tabelle pflegen!
DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet);
DBG_ASSERT( GetPool() == rSet.GetPool(), "MergeValues mit verschiedenen Pools" );
// teste mal, ob sich die Which-Bereiche unterscheiden.
- BOOL bEqual = TRUE;
- USHORT* pWh1 = _pWhichRanges;
- USHORT* pWh2 = rSet._pWhichRanges;
- USHORT nSize = 0;
+ sal_Bool bEqual = sal_True;
+ sal_uInt16* pWh1 = _pWhichRanges;
+ sal_uInt16* pWh2 = rSet._pWhichRanges;
+ sal_uInt16 nSize = 0;
- for( USHORT n = 0; *pWh1 && *pWh2; ++pWh1, ++pWh2, ++n )
+ for( sal_uInt16 n = 0; *pWh1 && *pWh2; ++pWh1, ++pWh2, ++n )
{
if( *pWh1 != *pWh2 )
{
- bEqual = FALSE;
+ bEqual = sal_False;
break;
}
if( n & 1 )
@@ -1398,11 +1398,11 @@ void SfxItemSet::MergeValues( const SfxItemSet& rSet, BOOL bIgnoreDefaults )
else
{
SfxWhichIter aIter( rSet );
- register USHORT nWhich;
+ register sal_uInt16 nWhich;
while( 0 != ( nWhich = aIter.NextWhich() ) )
{
const SfxPoolItem* pItem = 0;
- rSet.GetItemState( nWhich, TRUE, &pItem );
+ rSet.GetItemState( nWhich, sal_True, &pItem );
if( !pItem )
{
// nicht gesetzt, also default
@@ -1420,12 +1420,12 @@ void SfxItemSet::MergeValues( const SfxItemSet& rSet, BOOL bIgnoreDefaults )
// -----------------------------------------------------------------------
-void SfxItemSet::MergeValue( const SfxPoolItem& rAttr, BOOL bIgnoreDefaults )
+void SfxItemSet::MergeValue( const SfxPoolItem& rAttr, sal_Bool bIgnoreDefaults )
{
DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet);
SfxItemArray ppFnd = _aItems;
- const USHORT* pPtr = _pWhichRanges;
- const USHORT nWhich = rAttr.Which();
+ const sal_uInt16* pPtr = _pWhichRanges;
+ const sal_uInt16 nWhich = rAttr.Which();
while( *pPtr )
{
// in diesem Bereich?
@@ -1442,11 +1442,11 @@ void SfxItemSet::MergeValue( const SfxPoolItem& rAttr, BOOL bIgnoreDefaults )
// -----------------------------------------------------------------------
-void SfxItemSet::InvalidateItem( USHORT nWhich )
+void SfxItemSet::InvalidateItem( sal_uInt16 nWhich )
{
DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet);
SfxItemArray ppFnd = _aItems;
- const USHORT* pPtr = _pWhichRanges;
+ const sal_uInt16* pPtr = _pWhichRanges;
while( *pPtr )
{
if( *pPtr <= nWhich && nWhich <= *(pPtr+1) )
@@ -1476,11 +1476,11 @@ void SfxItemSet::InvalidateItem( USHORT nWhich )
// -----------------------------------------------------------------------
-USHORT SfxItemSet::GetWhichByPos( USHORT nPos ) const
+sal_uInt16 SfxItemSet::GetWhichByPos( sal_uInt16 nPos ) const
{
DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet);
- USHORT n = 0;
- USHORT* pPtr = _pWhichRanges;
+ sal_uInt16 n = 0;
+ sal_uInt16* pPtr = _pWhichRanges;
while( *pPtr )
{
n = ( *(pPtr+1) - *pPtr ) + 1;
@@ -1489,7 +1489,7 @@ USHORT SfxItemSet::GetWhichByPos( USHORT nPos ) const
nPos = nPos - n;
pPtr += 2;
}
- DBG_ASSERT( FALSE, "Hier sind wir falsch" );
+ DBG_ASSERT( sal_False, "Hier sind wir falsch" );
return 0;
}
@@ -1498,22 +1498,22 @@ USHORT SfxItemSet::GetWhichByPos( USHORT nPos ) const
SvStream &SfxItemSet::Store
(
SvStream& rStream, // Zielstream f"ur normale Items
- FASTBOOL bDirect // TRUE: Items direkt speicher, FALSE: Surrogate
+ FASTBOOL bDirect // sal_True: Items direkt speicher, sal_False: Surrogate
) const
/* [Beschreibung]
Speichert die <SfxItemSet>-Instanz in den angegebenen Stream. Dabei
- werden die Surrorage der gesetzten <SfxPoolItem>s bzw. ('bDirect==TRUE')
+ werden die Surrorage der gesetzten <SfxPoolItem>s bzw. ('bDirect==sal_True')
die gesetzten Items selbst wie folgt im Stream abgelegt:
- USHORT (Count) Anzahl der gesetzten Items
+ sal_uInt16 (Count) Anzahl der gesetzten Items
Count* _pPool->StoreItem() siehe <SfxItemPool::StoreItem()const>
[Querverweise]
- <SfxItemSet::Load(SvStream&,BOOL,const SfxItemPool*)>
+ <SfxItemSet::Load(SvStream&,sal_Bool,const SfxItemPool*)>
*/
{
@@ -1522,14 +1522,14 @@ SvStream &SfxItemSet::Store
DBG_ASSERTWARNING( _pPool == _pPool->GetMasterPool(), "kein Master-Pool" );
// Position des Counts merken, um ggf. zu korrigieren
- ULONG nCountPos = rStream.Tell();
+ sal_uLong nCountPos = rStream.Tell();
rStream << _nCount;
// wenn nichts zu speichern ist, auch keinen ItemIter aufsetzen!
if ( _nCount )
{
// mitz"ahlen wieviel Items tats"achlich gespeichert werden
- USHORT nWrittenCount = 0; // Anzahl in 'rStream' gestreamter Items
+ sal_uInt16 nWrittenCount = 0; // Anzahl in 'rStream' gestreamter Items
// "uber alle gesetzten Items iterieren
SfxItemIter aIter(*this);
@@ -1549,7 +1549,7 @@ SvStream &SfxItemSet::Store
if ( nWrittenCount != _nCount )
{
// tats"achlichen Count im Stream ablegen
- ULONG nPos = rStream.Tell();
+ sal_uLong nPos = rStream.Tell();
rStream.Seek( nCountPos );
rStream << nWrittenCount;
rStream.Seek( nPos );
@@ -1565,11 +1565,11 @@ SvStream &SfxItemSet::Load
(
SvStream& rStream, // Stream, aus dem geladen werden soll
- FASTBOOL bDirect, /* TRUE
+ FASTBOOL bDirect, /* sal_True
Items werden direkt aus dem Stream
gelesen, nicht "uber Surrogate
- FALSE (default)
+ sal_False (default)
Items werden "uber Surrogate gelesen */
const SfxItemPool* pRefPool /* Pool, der die Surrogate aufl"osen kann
@@ -1585,7 +1585,7 @@ SvStream &SfxItemSet::Load
[Querverweise]
- <SfxItemSet::Store(Stream&,BOOL)const>
+ <SfxItemSet::Store(Stream&,sal_Bool)const>
*/
{
@@ -1598,9 +1598,9 @@ SvStream &SfxItemSet::Load
pRefPool = _pPool;
// Anzahl der zu ladenden Items laden und dann ebensoviele Items
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
rStream >> nCount;
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
// Surrogat/Item laden und (Surrogat) aufl"osen lassen
const SfxPoolItem *pItem =
@@ -1610,9 +1610,9 @@ SvStream &SfxItemSet::Load
if ( pItem )
{
// Position f"ur Item-Pointer im Set suchen
- USHORT nWhich = pItem->Which();
+ sal_uInt16 nWhich = pItem->Which();
SfxItemArray ppFnd = _aItems;
- const USHORT* pPtr = _pWhichRanges;
+ const sal_uInt16* pPtr = _pWhichRanges;
while ( *pPtr )
{
// in diesem Bereich?
@@ -1647,48 +1647,48 @@ int SfxItemSet::operator==(const SfxItemSet &rCmp) const
if ( _pParent != rCmp._pParent ||
_pPool != rCmp._pPool ||
Count() != rCmp.Count() )
- return FALSE;
+ return sal_False;
// Ranges durchzaehlen lassen dauert laenger, muss aber auch gleich sein
- USHORT nCount1 = TotalCount();
- USHORT nCount2 = rCmp.TotalCount();
+ sal_uInt16 nCount1 = TotalCount();
+ sal_uInt16 nCount2 = rCmp.TotalCount();
if ( nCount1 != nCount2 )
- return FALSE;
+ return sal_False;
// sind die Ranges selbst ungleich?
- for ( USHORT nRange = 0; _pWhichRanges[nRange]; nRange += 2 )
+ for ( sal_uInt16 nRange = 0; _pWhichRanges[nRange]; nRange += 2 )
if ( _pWhichRanges[nRange] != rCmp._pWhichRanges[nRange] ||
_pWhichRanges[nRange+1] != rCmp._pWhichRanges[nRange+1] )
{
// dann m"ussen wir die langsame Methode verwenden
SfxWhichIter aIter( *this );
- for ( USHORT nWh = aIter.FirstWhich();
+ for ( sal_uInt16 nWh = aIter.FirstWhich();
nWh;
nWh = aIter.NextWhich() )
{
// wenn die Pointer von poolable Items ungleich sind,
// muessen die Items gleich sein
const SfxPoolItem *pItem1 = 0, *pItem2 = 0;
- if ( GetItemState( nWh, FALSE, &pItem1 ) !=
- rCmp.GetItemState( nWh, FALSE, &pItem2 ) ||
+ if ( GetItemState( nWh, sal_False, &pItem1 ) !=
+ rCmp.GetItemState( nWh, sal_False, &pItem2 ) ||
( pItem1 != pItem2 &&
( !pItem1 || IsInvalidItem(pItem1) ||
( _pPool->IsItemFlag(*pItem1, SFX_ITEM_POOLABLE) &&
*pItem1 != *pItem2 ) ) ) )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// Pointer alle gleich?
if ( 0 == memcmp( _aItems, rCmp._aItems, nCount1 * sizeof(_aItems[0]) ) )
- return TRUE;
+ return sal_True;
// dann werden wir wohl alle einzeln vergleichen muessen
const SfxPoolItem **ppItem1 = (const SfxPoolItem**) _aItems;
const SfxPoolItem **ppItem2 = (const SfxPoolItem**) rCmp._aItems;
- for ( USHORT nPos = 0; nPos < nCount1; ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < nCount1; ++nPos )
{
// wenn die Pointer von poolable Items ungleich sind,
// muessen die Items gleich sein
@@ -1697,18 +1697,18 @@ int SfxItemSet::operator==(const SfxItemSet &rCmp) const
( IsInvalidItem(*ppItem1) || IsInvalidItem(*ppItem2) ) ||
( _pPool->IsItemFlag(**ppItem1, SFX_ITEM_POOLABLE) ) ||
**ppItem1 != **ppItem2 ) )
- return FALSE;
+ return sal_False;
++ppItem1;
++ppItem2;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-SfxItemSet *SfxItemSet::Clone(BOOL bItems, SfxItemPool *pToPool ) const
+SfxItemSet *SfxItemSet::Clone(sal_Bool bItems, SfxItemPool *pToPool ) const
{
DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet);
if ( pToPool && pToPool != _pPool )
@@ -1717,11 +1717,11 @@ SfxItemSet *SfxItemSet::Clone(BOOL bItems, SfxItemPool *pToPool ) const
if ( bItems )
{
SfxWhichIter aIter(*pNewSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
const SfxPoolItem* pItem;
- if ( SFX_ITEM_SET == GetItemState( nWhich, FALSE, &pItem ) )
+ if ( SFX_ITEM_SET == GetItemState( nWhich, sal_False, &pItem ) )
pNewSet->Put( *pItem, pItem->Which() );
nWhich = aIter.NextWhich();
}
@@ -1740,8 +1740,8 @@ int SfxItemSet::PutDirect(const SfxPoolItem &rItem)
{
DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet);
SfxItemArray ppFnd = _aItems;
- const USHORT* pPtr = _pWhichRanges;
- const USHORT nWhich = rItem.Which();
+ const sal_uInt16* pPtr = _pWhichRanges;
+ const sal_uInt16 nWhich = rItem.Which();
#ifdef DBG_UTIL
IsPoolDefaultItem(&rItem) || _pPool->GetSurrogate(&rItem);
// nur Assertion in den callees provozieren
@@ -1756,7 +1756,7 @@ int SfxItemSet::PutDirect(const SfxPoolItem &rItem)
if( pOld ) // schon einer vorhanden
{
if( rItem == **ppFnd )
- return FALSE; // schon vorhanden !
+ return sal_False; // schon vorhanden !
_pPool->Remove( *pOld );
}
else
@@ -1772,18 +1772,18 @@ int SfxItemSet::PutDirect(const SfxPoolItem &rItem)
rItem.AddRef();
}
- return TRUE;
+ return sal_True;
}
ppFnd += *(pPtr+1) - *pPtr + 1;
pPtr += 2;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
SfxAllItemSet::SfxAllItemSet( SfxItemPool &rPool )
-: SfxItemSet(rPool, (const USHORT*) 0),
+: SfxItemSet(rPool, (const sal_uInt16*) 0),
aDefault(0),
nFree(nInitCount)
{
@@ -1791,8 +1791,8 @@ SfxAllItemSet::SfxAllItemSet( SfxItemPool &rPool )
_aItems = 0;
// nInitCount Paare an USHORTs fuer Ranges allozieren
- _pWhichRanges = new USHORT[ nInitCount + 1 ];
- memset( _pWhichRanges, 0, ( nInitCount + 1 ) * sizeof(USHORT) );
+ _pWhichRanges = new sal_uInt16[ nInitCount + 1 ];
+ memset( _pWhichRanges, 0, ( nInitCount + 1 ) * sizeof(sal_uInt16) );
}
@@ -1824,12 +1824,12 @@ SfxAllItemSet::SfxAllItemSet(const SfxAllItemSet &rCopy)
// -----------------------------------------------------------------------
-static USHORT *AddRanges_Impl(
- USHORT *pUS, std::ptrdiff_t nOldSize, USHORT nIncr)
+static sal_uInt16 *AddRanges_Impl(
+ sal_uInt16 *pUS, std::ptrdiff_t nOldSize, sal_uInt16 nIncr)
/* Diese interne Funktion erzeugt ein neues Which-Range-Array, welches von
dem 'nOldSize'-USHORTs langen 'pUS' kopiert wird und hinten an Platz
- f"ur 'nIncr' neue USHORTs hat. Das terminierende USHORT mit der '0'
+ f"ur 'nIncr' neue USHORTs hat. Das terminierende sal_uInt16 mit der '0'
wird weder in 'nOldSize' noch in 'nIncr' mitgez"ahlt, sondern implizit
hinzugerechnet.
@@ -1839,13 +1839,13 @@ static USHORT *AddRanges_Impl(
{
// neues Which-Range-Array anlegen
- USHORT *pNew = new USHORT[ nOldSize + nIncr + 1 ];
+ sal_uInt16 *pNew = new sal_uInt16[ nOldSize + nIncr + 1 ];
// die alten Ranges "ubernehmen
- memcpy( pNew, pUS, nOldSize * sizeof(USHORT) );
+ memcpy( pNew, pUS, nOldSize * sizeof(sal_uInt16) );
// die neuen auf 0 initialisieren
- memset( pNew + nOldSize, 0, ( nIncr + 1 ) * sizeof(USHORT) );
+ memset( pNew + nOldSize, 0, ( nIncr + 1 ) * sizeof(sal_uInt16) );
// das alte Array freigeben
delete[] pUS;
@@ -1855,7 +1855,7 @@ static USHORT *AddRanges_Impl(
// -----------------------------------------------------------------------
-static SfxItemArray AddItem_Impl(SfxItemArray pItems, USHORT nOldSize, USHORT nPos)
+static SfxItemArray AddItem_Impl(SfxItemArray pItems, sal_uInt16 nOldSize, sal_uInt16 nPos)
/* Diese interne Funktion erzeugt ein neues ItemArray, welches von 'pItems'
kopiert wird, an der Position 'nPos' jedoch Platz f"ur einen neuen
@@ -1893,17 +1893,17 @@ static SfxItemArray AddItem_Impl(SfxItemArray pItems, USHORT nOldSize, USHORT nP
// -----------------------------------------------------------------------
-const SfxPoolItem* SfxAllItemSet::Put( const SfxPoolItem& rItem, USHORT nWhich )
+const SfxPoolItem* SfxAllItemSet::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich )
// Putten mit automatischer Erweiterung der Whichs-Ids um die ID
// des Items.
{
- USHORT nPos = 0; // Position f"ur 'rItem' in '_aItems'
- const USHORT nItemCount = TotalCount();
+ sal_uInt16 nPos = 0; // Position f"ur 'rItem' in '_aItems'
+ const sal_uInt16 nItemCount = TotalCount();
// erstmal sehen, ob es schon einen passenden Bereich gibt
- USHORT *pPtr = _pWhichRanges;
+ sal_uInt16 *pPtr = _pWhichRanges;
while ( *pPtr )
{
// Which-Id liegt in diesem Bereich?
@@ -1986,15 +1986,15 @@ const SfxPoolItem* SfxAllItemSet::Put( const SfxPoolItem& rItem, USHORT nWhich )
const SfxPoolItem& rNew = _pPool->Put( rItem, nWhich );
// altes Item merken
- BOOL bIncrementCount = FALSE;
+ sal_Bool bIncrementCount = sal_False;
const SfxPoolItem* pOld = *( _aItems + nPos );
if ( reinterpret_cast< SfxPoolItem* >( -1 ) == pOld ) // state "dontcare"
pOld = NULL;
if ( !pOld )
{
- bIncrementCount = TRUE;
+ bIncrementCount = sal_True;
pOld = _pParent ?
- &_pParent->Get( nWhich, TRUE )
+ &_pParent->Get( nWhich, sal_True )
: nWhich <= SFX_WHICH_MAX ? &_pPool->GetDefaultItem( nWhich ) : 0;
}
@@ -2022,7 +2022,7 @@ const SfxPoolItem* SfxAllItemSet::Put( const SfxPoolItem& rItem, USHORT nWhich )
Put-Methoden dieser SubClass gehided wird.
*/
-int SfxAllItemSet::Put( const SfxItemSet& rSet, BOOL bInvalidAsDefault )
+int SfxAllItemSet::Put( const SfxItemSet& rSet, sal_Bool bInvalidAsDefault )
{
//? pruefen, ob Which-Ranges erweitert werden
return SfxItemSet::Put( rSet, bInvalidAsDefault );
@@ -2031,7 +2031,7 @@ int SfxAllItemSet::Put( const SfxItemSet& rSet, BOOL bInvalidAsDefault )
// -----------------------------------------------------------------------
// Item disablen, wenn durch ein VoidItem mit dem Which-Wert 0 ausgedrueckt
-void SfxItemSet::DisableItem(USHORT nWhich)
+void SfxItemSet::DisableItem(sal_uInt16 nWhich)
{
DBG_CHKTHIS(SfxItemSet, 0);
Put( SfxVoidItem(0), nWhich );
@@ -2040,18 +2040,18 @@ void SfxItemSet::DisableItem(USHORT nWhich)
// -----------------------------------------------------------------------
#if 0
-BOOL SfxAllItemSet::Remove(USHORT nWhich)
+sal_Bool SfxAllItemSet::Remove(sal_uInt16 nWhich)
{
DBG_CHKTHIS(SfxAllItemSet, 0);
- USHORT *pPtr = _pWhichRanges;
- USHORT nPos = 0;
+ sal_uInt16 *pPtr = _pWhichRanges;
+ sal_uInt16 nPos = 0;
while( *pPtr )
{
if( *pPtr <= nWhich && nWhich <= *(pPtr+1) )
{
- USHORT *pTmp = pPtr;
- USHORT nLeft = 0;
- USHORT nRest = 0;
+ sal_uInt16 *pTmp = pPtr;
+ sal_uInt16 nLeft = 0;
+ sal_uInt16 nRest = 0;
while(*++pTmp){
if( nLeft & 1 )
nRest = *pTmp - *(pTmp-1) + 1;
@@ -2063,7 +2063,7 @@ BOOL SfxAllItemSet::Remove(USHORT nWhich)
nRest -= nWhich - *pPtr;
// 3,3
if(*pPtr == nWhich && *(pPtr+1) == nWhich) {
- memmove(pPtr, pPtr + 2, nLeft * sizeof(USHORT));
+ memmove(pPtr, pPtr + 2, nLeft * sizeof(sal_uInt16));
nFree += 2;
}
// Anfang
@@ -2074,12 +2074,12 @@ BOOL SfxAllItemSet::Remove(USHORT nWhich)
(*(pPtr+1))--;
else {
if(nPos + nRest + 2 > nFree) {
- USHORT nOf = pPtr - _pWhichRanges;
+ sal_uInt16 nOf = pPtr - _pWhichRanges;
_pWhichRanges = IncrSize(_pWhichRanges, nPos + nRest, nInitCount);
nFree += nInitCount;
pPtr = _pWhichRanges + nOf;
}
- memmove(pPtr +2, pPtr, (nLeft+2) * sizeof(USHORT));
+ memmove(pPtr +2, pPtr, (nLeft+2) * sizeof(sal_uInt16));
*++pPtr = nWhich-1;
*++pPtr = nWhich+1;
nFree -= 2;
@@ -2100,13 +2100,13 @@ BOOL SfxAllItemSet::Remove(USHORT nWhich)
nPos += *(pPtr+1) - *pPtr + 1;
pPtr += 2;
}
- return *pPtr? TRUE: FALSE;
+ return *pPtr? sal_True: sal_False;
}
#endif
// -----------------------------------------------------------------------
-SfxItemSet *SfxAllItemSet::Clone(BOOL bItems, SfxItemPool *pToPool ) const
+SfxItemSet *SfxAllItemSet::Clone(sal_Bool bItems, SfxItemPool *pToPool ) const
{
DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet);
if ( pToPool && pToPool != _pPool )
diff --git a/svl/source/items/lckbitem.cxx b/svl/source/items/lckbitem.cxx
index f1845fc251ee..433bfeec1e8e 100644
--- a/svl/source/items/lckbitem.cxx
+++ b/svl/source/items/lckbitem.cxx
@@ -50,7 +50,7 @@ SfxLockBytesItem::SfxLockBytesItem()
// -----------------------------------------------------------------------
-SfxLockBytesItem::SfxLockBytesItem( USHORT nW, SvLockBytes *pLockBytes )
+SfxLockBytesItem::SfxLockBytesItem( sal_uInt16 nW, SvLockBytes *pLockBytes )
: SfxPoolItem( nW ),
_xVal( pLockBytes )
{
@@ -58,11 +58,11 @@ SfxLockBytesItem::SfxLockBytesItem( USHORT nW, SvLockBytes *pLockBytes )
// -----------------------------------------------------------------------
-SfxLockBytesItem::SfxLockBytesItem( USHORT nW, SvStream &rStream )
+SfxLockBytesItem::SfxLockBytesItem( sal_uInt16 nW, SvStream &rStream )
: SfxPoolItem( nW )
{
rStream.Seek( 0L );
- _xVal = new SvLockBytes( new SvCacheStream(), TRUE );
+ _xVal = new SvLockBytes( new SvCacheStream(), sal_True );
SvStream aLockBytesStream( _xVal );
rStream >> aLockBytesStream;
@@ -100,16 +100,16 @@ SfxPoolItem* SfxLockBytesItem::Clone(SfxItemPool *) const
#define MAX_BUF 32000
-SfxPoolItem* SfxLockBytesItem::Create( SvStream &rStream, USHORT ) const
+SfxPoolItem* SfxLockBytesItem::Create( SvStream &rStream, sal_uInt16 ) const
{
sal_uInt32 nSize = 0;
- ULONG nActRead = 0;
+ sal_uLong nActRead = 0;
sal_Char cTmpBuf[MAX_BUF];
SvMemoryStream aNewStream;
rStream >> nSize;
do {
- ULONG nToRead;
+ sal_uLong nToRead;
if( (nSize - nActRead) > MAX_BUF )
nToRead = MAX_BUF;
else
@@ -123,7 +123,7 @@ SfxPoolItem* SfxLockBytesItem::Create( SvStream &rStream, USHORT ) const
// -----------------------------------------------------------------------
-SvStream& SfxLockBytesItem::Store(SvStream &rStream, USHORT ) const
+SvStream& SfxLockBytesItem::Store(SvStream &rStream, sal_uInt16 ) const
{
SvStream aLockBytesStream( _xVal );
sal_uInt32 nSize = aLockBytesStream.Seek( STREAM_SEEK_TO_END );
@@ -137,7 +137,7 @@ SvStream& SfxLockBytesItem::Store(SvStream &rStream, USHORT ) const
//----------------------------------------------------------------------------
// virtual
-BOOL SfxLockBytesItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE )
+sal_Bool SfxLockBytesItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 )
{
com::sun::star::uno::Sequence< sal_Int8 > aSeq;
if ( rVal >>= aSeq )
@@ -148,21 +148,21 @@ BOOL SfxLockBytesItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE )
pStream->Write( (void*)aSeq.getConstArray(), aSeq.getLength() );
pStream->Seek(0);
- _xVal = new SvLockBytes( pStream, TRUE );
+ _xVal = new SvLockBytes( pStream, sal_True );
}
else
_xVal = NULL;
- return TRUE;
+ return sal_True;
}
DBG_ERROR( "SfxLockBytesItem::PutValue - Wrong type!" );
- return FALSE;
+ return sal_False;
}
//----------------------------------------------------------------------------
// virtual
-BOOL SfxLockBytesItem::QueryValue( com::sun::star::uno::Any& rVal,BYTE ) const
+sal_Bool SfxLockBytesItem::QueryValue( com::sun::star::uno::Any& rVal,sal_uInt8 ) const
{
if ( _xVal.Is() )
{
@@ -172,9 +172,9 @@ BOOL SfxLockBytesItem::QueryValue( com::sun::star::uno::Any& rVal,BYTE ) const
if ( _xVal->Stat( &aStat, SVSTATFLAG_DEFAULT ) == ERRCODE_NONE )
nLen = aStat.nSize;
else
- return FALSE;
+ return sal_False;
- ULONG nRead = 0;
+ sal_uLong nRead = 0;
com::sun::star::uno::Sequence< sal_Int8 > aSeq( nLen );
_xVal->ReadAt( 0, aSeq.getArray(), nLen, &nRead );
@@ -186,6 +186,6 @@ BOOL SfxLockBytesItem::QueryValue( com::sun::star::uno::Any& rVal,BYTE ) const
rVal <<= aSeq;
}
- return TRUE;
+ return sal_True;
}
diff --git a/svl/source/items/macitem.cxx b/svl/source/items/macitem.cxx
index acaa66839981..1cd7e194d266 100644
--- a/svl/source/items/macitem.cxx
+++ b/svl/source/items/macitem.cxx
@@ -121,7 +121,7 @@ SvxMacroTableDtor& SvxMacroTableDtor::operator=( const SvxMacroTableDtor& rTbl )
}
-SvStream& SvxMacroTableDtor::Read( SvStream& rStrm, USHORT nVersion )
+SvStream& SvxMacroTableDtor::Read( SvStream& rStrm, sal_uInt16 nVersion )
{
if( SVX_MACROTBL_VERSION40 <= nVersion )
rStrm >> nVersion;
@@ -130,7 +130,7 @@ SvStream& SvxMacroTableDtor::Read( SvStream& rStrm, USHORT nVersion )
for( short i = 0; i < nMacro; ++i )
{
- USHORT nCurKey, eType = STARBASIC;
+ sal_uInt16 nCurKey, eType = STARBASIC;
String aLibName, aMacName;
rStrm >> nCurKey;
SfxPoolItem::readByteString(rStrm, aLibName);
@@ -156,14 +156,14 @@ SvStream& SvxMacroTableDtor::Read( SvStream& rStrm, USHORT nVersion )
SvStream& SvxMacroTableDtor::Write( SvStream& rStream ) const
{
- USHORT nVersion = SOFFICE_FILEFORMAT_31 == rStream.GetVersion()
+ sal_uInt16 nVersion = SOFFICE_FILEFORMAT_31 == rStream.GetVersion()
? SVX_MACROTBL_VERSION31
: SVX_MACROTBL_AKTVERSION;
if( SVX_MACROTBL_VERSION40 <= nVersion )
rStream << nVersion;
- rStream << (USHORT)Count();
+ rStream << (sal_uInt16)Count();
SvxMacro* pMac = ((SvxMacroTableDtor*)this)->First();
while( pMac && rStream.GetError() == SVSTREAM_OK )
@@ -173,7 +173,7 @@ SvStream& SvxMacroTableDtor::Write( SvStream& rStream ) const
SfxPoolItem::writeByteString(rStream, pMac->GetMacName());
if( SVX_MACROTBL_VERSION40 <= nVersion )
- rStream << (USHORT)pMac->GetScriptType();
+ rStream << (sal_uInt16)pMac->GetScriptType();
pMac = ((SvxMacroTableDtor*)this)->Next();
}
return rStream;
@@ -203,20 +203,20 @@ int SvxMacroItem::operator==( const SfxPoolItem& rAttr ) const
// Anzahl unterschiedlich => auf jeden Fall ungleich
if ( rOwn.Count() != rOther.Count() )
- return FALSE;
+ return sal_False;
// einzeln verleichen; wegen Performance ist die Reihenfolge wichtig
- for ( USHORT nNo = 0; nNo < rOwn.Count(); ++nNo )
+ for ( sal_uInt16 nNo = 0; nNo < rOwn.Count(); ++nNo )
{
const SvxMacro *pOwnMac = rOwn.GetObject(nNo);
const SvxMacro *pOtherMac = rOther.GetObject(nNo);
if ( rOwn.GetKey(pOwnMac) != rOther.GetKey(pOtherMac) ||
pOwnMac->GetLibName() != pOtherMac->GetLibName() ||
pOwnMac->GetMacName() != pOtherMac->GetMacName() )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -257,14 +257,14 @@ SfxItemPresentation SvxMacroItem::GetPresentation
// -----------------------------------------------------------------------
-SvStream& SvxMacroItem::Store( SvStream& rStrm , USHORT ) const
+SvStream& SvxMacroItem::Store( SvStream& rStrm , sal_uInt16 ) const
{
return aMacroTable.Write( rStrm );
}
// -----------------------------------------------------------------------
-SfxPoolItem* SvxMacroItem::Create( SvStream& rStrm, USHORT nVersion ) const
+SfxPoolItem* SvxMacroItem::Create( SvStream& rStrm, sal_uInt16 nVersion ) const
{
SvxMacroItem* pAttr = new SvxMacroItem( Which() );
pAttr->aMacroTable.Read( rStrm, nVersion );
@@ -273,7 +273,7 @@ SfxPoolItem* SvxMacroItem::Create( SvStream& rStrm, USHORT nVersion ) const
// -----------------------------------------------------------------------
-void SvxMacroItem::SetMacro( USHORT nEvent, const SvxMacro& rMacro )
+void SvxMacroItem::SetMacro( sal_uInt16 nEvent, const SvxMacro& rMacro )
{
SvxMacro *pMacro;
if ( 0 != (pMacro=aMacroTable.Get(nEvent)) )
@@ -287,7 +287,7 @@ void SvxMacroItem::SetMacro( USHORT nEvent, const SvxMacro& rMacro )
// -----------------------------------------------------------------------
-USHORT SvxMacroItem::GetVersion( USHORT nFileFormatVersion ) const
+sal_uInt16 SvxMacroItem::GetVersion( sal_uInt16 nFileFormatVersion ) const
{
return SOFFICE_FILEFORMAT_31 == nFileFormatVersion
? 0 : aMacroTable.GetVersion();
diff --git a/svl/source/items/nranges.cxx b/svl/source/items/nranges.cxx
index 813c1fec8ebd..3684a748db14 100644
--- a/svl/source/items/nranges.cxx
+++ b/svl/source/items/nranges.cxx
@@ -63,7 +63,7 @@ NUMTYPE InitializeRanges_Impl( NUMTYPE *&rpRanges, va_list pArgs,
/** <H3>Description</H3>
- Creates an USHORT-ranges-array in 'rpRanges' using 'nWh1' and 'nWh2' as
+ Creates an sal_uInt16-ranges-array in 'rpRanges' using 'nWh1' and 'nWh2' as
first range, 'nNull' as terminator or start of 2nd range and 'pArgs' as
remaider.
@@ -73,7 +73,7 @@ NUMTYPE InitializeRanges_Impl( NUMTYPE *&rpRanges, va_list pArgs,
{
NUMTYPE nSize = 0, nIns = 0;
- USHORT nCnt = 0;
+ sal_uInt16 nCnt = 0;
SvNums aNumArr( 11, 8 );
aNumArr.Insert( nWh1, nCnt++ );
aNumArr.Insert( nWh2, nCnt++ );
@@ -232,20 +232,20 @@ SfxNumRanges::SfxNumRanges( const NUMTYPE* pArr )
//------------------------------------------------------------------------
-BOOL SfxNumRanges::operator==( const SfxNumRanges &rOther ) const
+sal_Bool SfxNumRanges::operator==( const SfxNumRanges &rOther ) const
{
// Object pointers equal?
if ( this == &rOther )
- return TRUE;
+ return sal_True;
// Ranges pointers equal?
if ( _pRanges == rOther._pRanges )
- return TRUE;
+ return sal_True;
// Counts equal?
NUMTYPE nCount = Count();
if ( nCount != rOther.Count() )
- return FALSE;
+ return sal_False;
// Check arrays.
NUMTYPE n = 0;
@@ -253,12 +253,12 @@ BOOL SfxNumRanges::operator==( const SfxNumRanges &rOther ) const
{
// Elements at current position equal?
if ( _pRanges[ n ] != rOther._pRanges[ n ] )
- return FALSE;
+ return sal_False;
++n;
}
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
@@ -776,21 +776,21 @@ SfxNumRanges& SfxNumRanges::operator /=
//------------------------------------------------------------------------
-BOOL SfxNumRanges::Intersects( const SfxNumRanges &rRanges ) const
+sal_Bool SfxNumRanges::Intersects( const SfxNumRanges &rRanges ) const
/** <H3>Description</H3>
Determines if at least one range in 'rRanges' intersects with one
range in '*this'.
- TRUE, if there is at least one with:
+ sal_True, if there is at least one with:
this->Contains( n ) && rRanges.Contains( n )
*/
{
// special cases: one is empty
if ( rRanges.IsEmpty() || IsEmpty() )
- return FALSE;
+ return sal_False;
// find at least one intersecting range
const NUMTYPE *pRange1 = _pRanges;
@@ -810,12 +810,12 @@ BOOL SfxNumRanges::Intersects( const SfxNumRanges &rRanges ) const
// the ranges are overlappung
else
- return TRUE;
+ return sal_True;
}
while ( *pRange2 );
// no intersection found
- return FALSE;
+ return sal_False;
}
//------------------------------------------------------------------------
@@ -834,7 +834,7 @@ NUMTYPE SfxNumRanges::Count() const
//------------------------------------------------------------------------
-BOOL SfxNumRanges::Contains( NUMTYPE n ) const
+sal_Bool SfxNumRanges::Contains( NUMTYPE n ) const
/** <H3>Description</H3>
@@ -844,7 +844,7 @@ BOOL SfxNumRanges::Contains( NUMTYPE n ) const
{
for ( NUMTYPE *pRange = _pRanges; *pRange && *pRange <= n; pRange += 2 )
if ( pRange[0] <= n && n <= pRange[1] )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
diff --git a/svl/source/items/poolcach.cxx b/svl/source/items/poolcach.cxx
index ab2bdfb91c84..6e13a3b77485 100644
--- a/svl/source/items/poolcach.cxx
+++ b/svl/source/items/poolcach.cxx
@@ -84,7 +84,7 @@ SfxItemPoolCache::~SfxItemPoolCache()
//------------------------------------------------------------------------
-const SfxSetItem& SfxItemPoolCache::ApplyTo( const SfxSetItem &rOrigItem, BOOL bNew )
+const SfxSetItem& SfxItemPoolCache::ApplyTo( const SfxSetItem &rOrigItem, sal_Bool bNew )
{
DBG_CHKTHIS(SfxItemPoolCache, 0);
DBG_ASSERT( pPool == rOrigItem.GetItemSet().GetPool(), "invalid Pool" );
diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx
index a3d87ca76e5d..ec55ba09195c 100644
--- a/svl/source/items/poolio.cxx
+++ b/svl/source/items/poolio.cxx
@@ -99,43 +99,43 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
;zun"achst ein Kompatiblit"ats-Header-Block
Start: 0x1111 SFX_ITEMPOOL_TAG_STARTPOOLS(_4/_5)
- BYTE MAJOR_VER ;SfxItemPool-Version
- BYTE MINOR_VER ;"
+ sal_uInt8 MAJOR_VER ;SfxItemPool-Version
+ sal_uInt8 MINOR_VER ;"
0xFFFF SFX_ITEMPOOL_TAG_TRICK4OLD ;ex. GetVersion()
- USHORT 0x0000 ;Pseudo-StyleSheetPool
- USHORT 0x0000 ;Pseudo-StyleSheetPool
+ sal_uInt16 0x0000 ;Pseudo-StyleSheetPool
+ sal_uInt16 0x0000 ;Pseudo-StyleSheetPool
;den ganzen Pool in einen Record
record SfxMiniRecod(SFX_ITEMPOOL_REC)
;je ein Header vorweg
Header: record SfxMiniRecord(SFX_ITEMPOOL_REC_HEADER)
- USHORT GetVersion() ;Which-Ranges etc.
+ sal_uInt16 GetVersion() ;Which-Ranges etc.
String GetName() ;Pool-Name
;die Versions-Map, um WhichIds neuer File-Versionen mappen zu k"onnen
Versions: record SfxMultiRecord(SFX_ITEMPOOL_REC_VERSIONS, 0)
- USHORT OldVersion
- USHORT OldStartWhich
- USHORT OldEndWhich
- USHORT[] NewWhich (OldEndWhich-OldStartWhich+1)
+ sal_uInt16 OldVersion
+ sal_uInt16 OldStartWhich
+ sal_uInt16 OldEndWhich
+ sal_uInt16[] NewWhich (OldEndWhich-OldStartWhich+1)
;jetzt die gepoolten Items (zuerst nicht-SfxSetItems)
Items: record SfxMultiRecord(SFX_ITEMPOOL_REC_WHICHIDS, 0)
content SlotId, 0
- USHORT WhichId
- USHORT pItem->GetVersion()
- USHORT Array-Size
+ sal_uInt16 WhichId
+ sal_uInt16 pItem->GetVersion()
+ sal_uInt16 Array-Size
record SfxMultiRecord(SFX_, 0)
content Surrogate
- USHORT RefCount
+ sal_uInt16 RefCount
unknown pItem->Store()
;jetzt die gesetzten Pool-Defaults
Defaults: record SfxMultiRecord(SFX_ITEMPOOL_REC_DEFAULTS, 0)
content SlotId, 0
- USHORT WhichId
- USHORT pPoolDef->GetVersion()
+ sal_uInt16 WhichId
+ sal_uInt16 pPoolDef->GetVersion()
unknown pPoolDef->Store();
;dahinter folgt ggf. der Secondary ohne Kompatiblit"ats-Header-Block
@@ -150,7 +150,7 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
pStoreMaster = pStoreMaster->pSecondary;
// Alter-Header (Version des Pools an sich und Inhalts-Version 0xffff)
- pImp->bStreaming = TRUE;
+ pImp->bStreaming = sal_True;
if ( !pStoreMaster )
{
rStream << ( rStream.GetVersion() >= SOFFICE_FILEFORMAT_50
@@ -160,8 +160,8 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
rStream << SFX_ITEMPOOL_TAG_TRICK4OLD;
// SfxStyleSheet-Bug umgehen
- rStream << UINT16(0); // Version
- rStream << UINT16(0); // Count (2. Schleife f"allt sonst auf die Fresse)
+ rStream << sal_uInt16(0); // Version
+ rStream << sal_uInt16(0); // Count (2. Schleife f"allt sonst auf die Fresse)
}
// jeder Pool ist als ganzes ein Record
@@ -183,9 +183,9 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
aVerRec.NewContent();
SfxPoolVersion_ImplPtr pVer = pImp->aVersions[nVerNo];
rStream << pVer->_nVer << pVer->_nStart << pVer->_nEnd;
- USHORT nCount = pVer->_nEnd - pVer->_nStart + 1;
- USHORT nNewWhich = 0;
- for ( USHORT n = 0; n < nCount; ++n )
+ sal_uInt16 nCount = pVer->_nEnd - pVer->_nStart + 1;
+ sal_uInt16 nNewWhich = 0;
+ for ( sal_uInt16 n = 0; n < nCount; ++n )
{
nNewWhich = pVer->_pMap[n];
rStream << nNewWhich;
@@ -193,7 +193,7 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
// Workaround gegen Bug in SetVersionMap der 312
if ( SOFFICE_FILEFORMAT_31 == _nFileFormatVersion )
- rStream << USHORT(nNewWhich+1);
+ rStream << sal_uInt16(nNewWhich+1);
}
}
@@ -202,15 +202,15 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
SfxMultiMixRecordWriter aWhichIdsRec( &rStream, SFX_ITEMPOOL_REC_WHICHIDS, 0 );
// erst Atomaren-Items und dann die Sets schreiben (wichtig beim Laden)
- for ( pImp->bInSetItem = FALSE; pImp->bInSetItem <= TRUE && !rStream.GetError(); ++pImp->bInSetItem )
+ for ( pImp->bInSetItem = sal_False; pImp->bInSetItem <= sal_True && !rStream.GetError(); ++pImp->bInSetItem )
{
SfxPoolItemArray_Impl **pArr = pImp->ppPoolItems;
SfxPoolItem **ppDefItem = ppStaticDefaults;
- const USHORT nSize = GetSize_Impl();
+ const sal_uInt16 nSize = GetSize_Impl();
for ( size_t i = 0; i < nSize && !rStream.GetError(); ++i, ++pArr, ++ppDefItem )
{
// Version des Items feststellen
- USHORT nItemVersion = (*ppDefItem)->GetVersion( _nFileFormatVersion );
+ sal_uInt16 nItemVersion = (*ppDefItem)->GetVersion( _nFileFormatVersion );
if ( USHRT_MAX == nItemVersion )
// => kam in zu exportierender Version gar nicht vor
continue;
@@ -225,7 +225,7 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
pImp->bInSetItem == (*ppDefItem)->ISA(SfxSetItem) )
{
// eigene Kennung, globale Which-Id und Item-Version
- USHORT nSlotId = GetSlotId( (*ppDefItem)->Which(), FALSE );
+ sal_uInt16 nSlotId = GetSlotId( (*ppDefItem)->Which(), sal_False );
aWhichIdsRec.NewContent(nSlotId, 0);
rStream << (*ppDefItem)->Which();
rStream << nItemVersion;
@@ -241,13 +241,13 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
const SfxPoolItem *pItem = (*pArr)->operator[](j);
if ( pItem && pItem->GetRefCount() ) //! siehe anderes MI-REF
{
- aItemsRec.NewContent((USHORT)j, 'X' );
+ aItemsRec.NewContent((sal_uInt16)j, 'X' );
if ( pItem->GetRefCount() == SFX_ITEMS_SPECIAL )
- rStream << (USHORT) pItem->GetKind();
+ rStream << (sal_uInt16) pItem->GetKind();
else
{
- rStream << (USHORT) pItem->GetRefCount();
+ rStream << (sal_uInt16) pItem->GetRefCount();
if( pItem->GetRefCount() > SFX_ITEMS_OLD_MAXREF )
rStream.SetError( ERRCODE_IO_NOTSTORABLEINBINARYFORMAT );
}
@@ -259,10 +259,10 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
#ifdef DBG_UTIL_MI
if ( !pItem->ISA(SfxSetItem) )
{
- ULONG nMark = rStream.Tell();
- rStream.Seek( nItemStartPos + sizeof(USHORT) );
+ sal_uLong nMark = rStream.Tell();
+ rStream.Seek( nItemStartPos + sizeof(sal_uInt16) );
SfxPoolItem *pClone = pItem->Create(rStream, nItemVersion );
- USHORT nWh = pItem->Which();
+ sal_uInt16 nWh = pItem->Which();
SFX_ASSERT( rStream.Tell() == nMark, nWh,"asymmetric store/create" );
SFX_ASSERT( *pClone == *pItem, nWh, "unequal after store/create" );
delete pClone;
@@ -274,27 +274,27 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
}
}
- pImp->bInSetItem = FALSE;
+ pImp->bInSetItem = sal_False;
}
// die gesetzten Defaults speichern (Pool-Defaults)
if ( !rStream.GetError() )
{
SfxMultiMixRecordWriter aDefsRec( &rStream, SFX_ITEMPOOL_REC_DEFAULTS, 0 );
- USHORT nCount = GetSize_Impl();
- for ( USHORT n = 0; n < nCount; ++n )
+ sal_uInt16 nCount = GetSize_Impl();
+ for ( sal_uInt16 n = 0; n < nCount; ++n )
{
const SfxPoolItem* pDefaultItem = ppPoolDefaults[n];
if ( pDefaultItem )
{
// Version ermitteln
- USHORT nItemVersion = pDefaultItem->GetVersion( _nFileFormatVersion );
+ sal_uInt16 nItemVersion = pDefaultItem->GetVersion( _nFileFormatVersion );
if ( USHRT_MAX == nItemVersion )
// => gab es in der Version noch nicht
continue;
// eigene Kennung, globale Kennung, Version
- USHORT nSlotId = GetSlotId( pDefaultItem->Which(), FALSE );
+ sal_uInt16 nSlotId = GetSlotId( pDefaultItem->Which(), sal_False );
aDefsRec.NewContent( nSlotId, 0 );
rStream << pDefaultItem->Which();
rStream << nItemVersion;
@@ -311,7 +311,7 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
if ( !rStream.GetError() && pSecondary )
pSecondary->Store( rStream );
- pImp->bStreaming = FALSE;
+ pImp->bStreaming = sal_False;
return rStream;
}
@@ -321,7 +321,7 @@ void SfxItemPool::LoadCompleted()
/* [Beschreibung]
- Wurde der SfxItemPool mit 'bRefCounts' == FALSE geladen, mu\s das
+ Wurde der SfxItemPool mit 'bRefCounts' == sal_False geladen, mu\s das
Laden der Dokumentinhalte mit einem Aufruf dieser Methode beendet
werden. Ansonsten hat der Aufruf dieser Methode keine Funktion.
@@ -347,7 +347,7 @@ void SfxItemPool::LoadCompleted()
// "uber alle Which-Werte iterieren
SfxPoolItemArray_Impl** ppItemArr = pImp->ppPoolItems;
- for( USHORT nArrCnt = GetSize_Impl(); nArrCnt; --nArrCnt, ++ppItemArr )
+ for( sal_uInt16 nArrCnt = GetSize_Impl(); nArrCnt; --nArrCnt, ++ppItemArr )
{
// ist "uberhaupt ein Item mit dem Which-Wert da?
if ( *ppItemArr )
@@ -382,7 +382,7 @@ void SfxItemPool::LoadCompleted()
//============================================================================
// This had to be moved to a method of its own to keep Solaris GCC happy:
void SfxItemPool::readTheItems (
- SvStream & rStream, sal_uInt32 nItemCount, USHORT nVersion,
+ SvStream & rStream, sal_uInt32 nItemCount, sal_uInt16 nVersion,
SfxPoolItem * pDefItem, SfxPoolItemArray_Impl ** ppArr)
{
SfxMultiRecordReader aItemsRec( &rStream, SFX_ITEMPOOL_REC_ITEMS );
@@ -390,11 +390,11 @@ void SfxItemPool::readTheItems (
SfxPoolItemArray_Impl *pNewArr = new SfxPoolItemArray_Impl();
SfxPoolItem *pItem = 0;
- ULONG n, nLastSurrogate = ULONG(-1);
+ sal_uLong n, nLastSurrogate = sal_uLong(-1);
while (aItemsRec.GetContent())
{
// n"achstes Surrogat holen
- USHORT nSurrogate = aItemsRec.GetContentTag();
+ sal_uInt16 nSurrogate = aItemsRec.GetContentTag();
DBG_ASSERT( aItemsRec.GetContentVersion() == 'X',
"not an item content" );
@@ -404,7 +404,7 @@ void SfxItemPool::readTheItems (
nLastSurrogate = nSurrogate;
// Ref-Count und Item laden
- USHORT nRef;
+ sal_uInt16 nRef;
rStream >> nRef;
pItem = pDefItem->Create(rStream, nVersion);
@@ -528,7 +528,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
pLoadMaster = pLoadMaster->pSecondary;
// Gesamt Header einlesen
- pImp->bStreaming = TRUE;
+ pImp->bStreaming = sal_True;
if ( !pLoadMaster )
{
// Format-Version laden
@@ -549,7 +549,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
if ( pImp->nMajorVer > SFX_ITEMPOOL_VER_MAJOR )
{
rStream.SetError(SVSTREAM_FILEFORMAT_ERROR);
- pImp->bStreaming = FALSE;
+ pImp->bStreaming = sal_False;
return rStream;
}
@@ -562,19 +562,19 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
SfxMiniRecordReader aPoolRec( &rStream, SFX_ITEMPOOL_REC );
if ( rStream.GetError() )
{
- pImp->bStreaming = FALSE;
+ pImp->bStreaming = sal_False;
return rStream;
}
// Einzel-Header
- int bOwnPool = TRUE;
+ int bOwnPool = sal_True;
UniString aExternName;
{
// Header-Record suchen
SfxMiniRecordReader aPoolHeaderRec( &rStream, SFX_ITEMPOOL_REC_HEADER );
if ( rStream.GetError() )
{
- pImp->bStreaming = FALSE;
+ pImp->bStreaming = sal_False;
return rStream;
}
@@ -588,7 +588,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
{
rStream.SetError(SVSTREAM_FILEFORMAT_ERROR);
aPoolRec.Skip();
- pImp->bStreaming = FALSE;
+ pImp->bStreaming = sal_False;
return rStream;
}
}
@@ -598,25 +598,25 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
SfxMultiRecordReader aVerRec( &rStream, SFX_ITEMPOOL_REC_VERSIONMAP );
if ( rStream.GetError() )
{
- pImp->bStreaming = FALSE;
+ pImp->bStreaming = sal_False;
return rStream;
}
// Versions-Maps einlesen
- USHORT nOwnVersion = pImp->nVersion;
- for ( USHORT nVerNo = 0; aVerRec.GetContent(); ++nVerNo )
+ sal_uInt16 nOwnVersion = pImp->nVersion;
+ for ( sal_uInt16 nVerNo = 0; aVerRec.GetContent(); ++nVerNo )
{
// Header f"ur einzelne Version einlesen
- USHORT nVersion, nHStart, nHEnd;
+ sal_uInt16 nVersion, nHStart, nHEnd;
rStream >> nVersion >> nHStart >> nHEnd;
- USHORT nCount = nHEnd - nHStart + 1;
+ sal_uInt16 nCount = nHEnd - nHStart + 1;
// Is new version is known?
if ( nVerNo >= pImp->aVersions.size() )
{
// Add new Version
- USHORT *pMap = new USHORT[nCount];
- for ( USHORT n = 0; n < nCount; ++n )
+ sal_uInt16 *pMap = new sal_uInt16[nCount];
+ for ( sal_uInt16 n = 0; n < nCount; ++n )
rStream >> pMap[n];
SetVersionMap( nVersion, nHStart, nHEnd, pMap );
}
@@ -625,7 +625,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
}
// Items laden
- FASTBOOL bSecondaryLoaded = FALSE;
+ FASTBOOL bSecondaryLoaded = sal_False;
long nSecondaryEnd = 0;
{
SfxMultiRecordReader aWhichIdsRec( &rStream, SFX_ITEMPOOL_REC_WHICHIDS);
@@ -633,8 +633,8 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
{
// SlotId, Which-Id und Item-Version besorgen
sal_uInt32 nCount;
- USHORT nVersion, nWhich;
- //!USHORT nSlotId = aWhichIdsRec.GetContentTag();
+ sal_uInt16 nVersion, nWhich;
+ //!sal_uInt16 nSlotId = aWhichIdsRec.GetContentTag();
rStream >> nWhich;
if ( pImp->nLoadingVersion != pImp->nVersion )
// Which-Id aus File-Version in Pool-Version verschieben
@@ -647,11 +647,11 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
rStream >> nVersion;
rStream >> nCount;
//!SFX_ASSERTWARNING( !nSlotId || !HasMap() ||
- //! ( nSlotId == GetSlotId( nWhich, FALSE ) ) ||
- //! !GetSlotId( nWhich, FALSE ),
+ //! ( nSlotId == GetSlotId( nWhich, sal_False ) ) ||
+ //! !GetSlotId( nWhich, sal_False ),
//! nWhich, "Slot/Which mismatch" );
- USHORT nIndex = GetIndex_Impl(nWhich);
+ sal_uInt16 nIndex = GetIndex_Impl(nWhich);
SfxPoolItemArray_Impl **ppArr = pImp->ppPoolItems + nIndex;
// SfxSetItems k"onnten Items aus Sekund"arpools beinhalten
@@ -660,12 +660,12 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
if ( !bSecondaryLoaded && pSecondary && pImp->bInSetItem )
{
// an das Ende des eigenen Pools seeken
- ULONG nLastPos = rStream.Tell();
+ sal_uLong nLastPos = rStream.Tell();
aPoolRec.Skip();
// Sekund"arpool einlesen
pSecondary->Load( rStream );
- bSecondaryLoaded = TRUE;
+ bSecondaryLoaded = sal_True;
nSecondaryEnd = rStream.Tell();
// zur"uck zu unseren eigenen Items
@@ -675,7 +675,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
// Items an sich lesen
readTheItems(rStream, nCount, nVersion, pDefItem, ppArr);
- pImp->bInSetItem = FALSE;
+ pImp->bInSetItem = sal_False;
}
}
@@ -686,8 +686,8 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
while ( aDefsRec.GetContent() )
{
// SlotId, Which-Id und Item-Version besorgen
- USHORT nVersion, nWhich;
- //!USHORT nSlotId = aDefsRec.GetContentTag();
+ sal_uInt16 nVersion, nWhich;
+ //!sal_uInt16 nSlotId = aDefsRec.GetContentTag();
rStream >> nWhich;
if ( pImp->nLoadingVersion != pImp->nVersion )
// Which-Id aus File-Version in Pool-Version verschieben
@@ -698,7 +698,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
continue;
rStream >> nVersion;
- //!SFX_ASSERTWARNING( !HasMap() || ( nSlotId == GetSlotId( nWhich, FALSE ) ),
+ //!SFX_ASSERTWARNING( !HasMap() || ( nSlotId == GetSlotId( nWhich, sal_False ) ),
//! nWhich, "Slot/Which mismatch" );
// Pool-Default-Item selbst laden
@@ -724,7 +724,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
if ( aExternName != aName )
aName.Erase();
- pImp->bStreaming = FALSE;
+ pImp->bStreaming = sal_False;
return rStream;
};
@@ -740,19 +740,19 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
rStream >> pImp->nMajorVer >> pImp->nMinorVer;
}
sal_uInt32 nAttribSize;
- int bOwnPool = TRUE;
+ int bOwnPool = sal_True;
UniString aExternName;
if ( pImp->nMajorVer > 1 || pImp->nMinorVer >= 2 )
rStream >> pImp->nLoadingVersion;
SfxPoolItem::readByteString(rStream, aExternName);
bOwnPool = aExternName == aName;
- pImp->bStreaming = TRUE;
+ pImp->bStreaming = sal_True;
//! solange wir keine fremden laden k"onnen
if ( !bOwnPool )
{
rStream.SetError(SVSTREAM_FILEFORMAT_ERROR);
- pImp->bStreaming = FALSE;
+ pImp->bStreaming = sal_False;
return rStream;
}
@@ -761,7 +761,7 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
pImp->nVersion < pImp->nLoadingVersion )
{
rStream.SetError(ERRCODE_IO_WRONGVERSION);
- pImp->bStreaming = FALSE;
+ pImp->bStreaming = sal_False;
return rStream;
}
@@ -769,20 +769,20 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
rStream >> nAttribSize;
// Size-Table einlesen
- ULONG nStartPos = rStream.Tell();
+ sal_uLong nStartPos = rStream.Tell();
rStream.SeekRel( nAttribSize );
CHECK_FILEFORMAT( rStream, SFX_ITEMPOOL_TAG_SIZES );
sal_uInt32 nSizeTableLen;
rStream >> nSizeTableLen;
sal_Char *pBuf = new sal_Char[nSizeTableLen];
rStream.Read( pBuf, nSizeTableLen );
- ULONG nEndOfSizes = rStream.Tell();
+ sal_uLong nEndOfSizes = rStream.Tell();
SvMemoryStream aSizeTable( pBuf, nSizeTableLen, STREAM_READ );
// ab Version 1.3 steht in der Size-Table eine Versions-Map
if ( pImp->nMajorVer > 1 || pImp->nMinorVer >= 3 )
{
- // Version-Map finden (letztes ULONG der Size-Table gibt Pos an)
+ // Version-Map finden (letztes sal_uLong der Size-Table gibt Pos an)
rStream.Seek( nEndOfSizes - sizeof(sal_uInt32) );
sal_uInt32 nVersionMapPos;
rStream >> nVersionMapPos;
@@ -790,22 +790,22 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
// Versions-Maps einlesen
CHECK_FILEFORMAT( rStream, SFX_ITEMPOOL_TAG_VERSIONMAP );
- USHORT nVerCount;
+ sal_uInt16 nVerCount;
rStream >> nVerCount;
- for ( USHORT nVerNo = 0; nVerNo < nVerCount; ++nVerNo )
+ for ( sal_uInt16 nVerNo = 0; nVerNo < nVerCount; ++nVerNo )
{
// Header f"ur einzelne Version einlesen
- USHORT nVersion, nHStart, nHEnd;
+ sal_uInt16 nVersion, nHStart, nHEnd;
rStream >> nVersion >> nHStart >> nHEnd;
- USHORT nCount = nHEnd - nHStart + 1;
- USHORT nBytes = (nCount)*sizeof(USHORT);
+ sal_uInt16 nCount = nHEnd - nHStart + 1;
+ sal_uInt16 nBytes = (nCount)*sizeof(sal_uInt16);
// Is new version is known?
if ( nVerNo >= pImp->aVersions.size() )
{
// Add new Version
- USHORT *pMap = new USHORT[nCount];
- for ( USHORT n = 0; n < nCount; ++n )
+ sal_uInt16 *pMap = new sal_uInt16[nCount];
+ for ( sal_uInt16 n = 0; n < nCount; ++n )
rStream >> pMap[n];
SetVersionMap( nVersion, nHStart, nHEnd, pMap );
}
@@ -818,9 +818,9 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
// Items laden
rStream.Seek( nStartPos );
CHECK_FILEFORMAT( rStream, SFX_ITEMPOOL_TAG_ITEMS );
- FASTBOOL bSecondaryLoaded = FALSE;
+ FASTBOOL bSecondaryLoaded = sal_False;
long nSecondaryEnd = 0;
- USHORT nWhich, nSlot;
+ sal_uInt16 nWhich, nSlot;
while ( rStream >> nWhich, nWhich )
{
// ggf. Which-Id aus alter Version verschieben?
@@ -828,10 +828,10 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
nWhich = GetNewWhich( nWhich );
rStream >> nSlot;
- USHORT nMappedWhich = GetWhich(nSlot, FALSE);
+ sal_uInt16 nMappedWhich = GetWhich(nSlot, sal_False);
int bKnownItem = bOwnPool || IsWhich(nMappedWhich);
- USHORT nRef, nCount, nVersion;
+ sal_uInt16 nRef, nCount, nVersion;
sal_uInt32 nAttrSize;
rStream >> nVersion >> nCount;
@@ -844,18 +844,18 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
nWhich = nMappedWhich;
//!SFX_ASSERTWARNING( !nSlot || !HasMap() ||
- //! ( nSlot == GetSlotId( nWhich, FALSE ) ) ||
- //! !GetSlotId( nWhich, FALSE ),
+ //! ( nSlot == GetSlotId( nWhich, sal_False ) ) ||
+ //! !GetSlotId( nWhich, sal_False ),
//! nWhich, "Slot/Which mismatch" );
- USHORT nIndex = GetIndex_Impl(nWhich);
+ sal_uInt16 nIndex = GetIndex_Impl(nWhich);
ppArr = pImp->ppPoolItems + nIndex;
pNewArr = new SfxPoolItemArray_Impl();
pDefItem = *(ppStaticDefaults + nIndex);
}
// Position vor ersten Item merken
- ULONG nLastPos = rStream.Tell();
+ sal_uLong nLastPos = rStream.Tell();
// SfxSetItems k"onnten Items aus Sekund"arpools beinhalten
if ( !bSecondaryLoaded && pSecondary && pDefItem->ISA(SfxSetItem) )
@@ -867,7 +867,7 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
// Sekund"arpool einlesen
pSecondary->Load1_Impl( rStream );
- bSecondaryLoaded = TRUE;
+ bSecondaryLoaded = sal_True;
nSecondaryEnd = rStream.Tell();
// zur"uck zu unseren eigenen Items
@@ -875,9 +875,9 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
}
// Items an sich lesen
- for ( USHORT j = 0; j < nCount; ++j )
+ for ( sal_uInt16 j = 0; j < nCount; ++j )
{
- ULONG nPos = nLastPos;
+ sal_uLong nPos = nLastPos;
rStream >> nRef;
if ( bKnownItem )
@@ -923,7 +923,7 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
*ppArr = pNewArr;
// die Items merken, die schon im Pool sind
- int bEmpty = TRUE;
+ int bEmpty = sal_True;
if ( 0 != pOldArr )
for ( size_t n = 0; bEmpty && n < pOldArr->size(); ++n )
bEmpty = pOldArr->operator[](n) == 0;
@@ -969,7 +969,7 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
if ( pImp->nMajorVer > 1 || pImp->nMinorVer > 0 )
CHECK_FILEFORMAT( rStream, SFX_ITEMPOOL_TAG_DEFAULTS );
- ULONG nLastPos = rStream.Tell();
+ sal_uLong nLastPos = rStream.Tell();
while ( rStream >> nWhich, nWhich )
{
// ggf. Which-Id aus alter Version verschieben?
@@ -977,12 +977,12 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
nWhich = GetNewWhich( nWhich );
rStream >> nSlot;
- USHORT nMappedWhich = GetWhich(nSlot, FALSE);
+ sal_uInt16 nMappedWhich = GetWhich(nSlot, sal_False);
int bKnownItem = bOwnPool || IsWhich(nMappedWhich);
- ULONG nPos = nLastPos;
+ sal_uLong nPos = nLastPos;
sal_uInt32 nSize;
- USHORT nVersion;
+ sal_uInt16 nVersion;
rStream >> nVersion;
if ( bKnownItem )
@@ -1020,7 +1020,7 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
if ( aExternName != aName )
aName.Erase();
- pImp->bStreaming = FALSE;
+ pImp->bStreaming = sal_False;
return rStream;
}
@@ -1029,8 +1029,8 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
const SfxPoolItem* SfxItemPool::LoadSurrogate
(
SvStream& rStream, // vor einem Surrogat positionierter Stream
- USHORT& rWhich, // Which-Id des zu ladenden <SfxPoolItem>s
- USHORT nSlotId, // Slot-Id des zu ladenden <SfxPoolItem>s
+ sal_uInt16& rWhich, // Which-Id des zu ladenden <SfxPoolItem>s
+ sal_uInt16 nSlotId, // Slot-Id des zu ladenden <SfxPoolItem>s
const SfxItemPool* pRefPool // <SfxItemPool> in dem das Surrogat gilt
)
@@ -1095,12 +1095,12 @@ const SfxPoolItem* SfxItemPool::LoadSurrogate
{
// Bei einem anders aufgebauten Pool im Stream, mu\s die SlotId
// aus dem Stream in eine Which-Id gemappt werden k"onnen.
- USHORT nMappedWhich = nSlotId ? GetWhich(nSlotId, TRUE) : 0;
+ sal_uInt16 nMappedWhich = nSlotId ? GetWhich(nSlotId, sal_True) : 0;
if ( IsWhich(nMappedWhich) )
{
// gemappte SlotId kann "ubernommen werden
rWhich = nMappedWhich;
- bResolvable = TRUE;
+ bResolvable = sal_True;
}
}
@@ -1144,7 +1144,7 @@ const SfxPoolItem* SfxItemPool::LoadSurrogate
}
}
- SFX_ASSERT( FALSE, rWhich, "can't resolve Which-Id in LoadSurrogate" );
+ SFX_ASSERT( sal_False, rWhich, "can't resolve Which-Id in LoadSurrogate" );
}
return 0;
@@ -1166,13 +1166,13 @@ FASTBOOL SfxItemPool::StoreSurrogate
[R"uckgabewert]
- FASTBOOL TRUE
+ FASTBOOL sal_True
es wurde ein echtes Surrogat gespeichert, auch
SFX_ITEMS_NULL bei 'pItem==0',
SFX_ITEMS_STATICDEFAULT und SFX_ITEMS_POOLDEFAULT
gelten als 'echte' Surrogate
- FALSE
+ sal_False
es wurde ein Dummy-Surrogat (SFX_ITEMS_DIRECT)
gespeichert, das eigentliche Item mu\s direkt
hinterher selbst gespeichert werden
@@ -1189,7 +1189,7 @@ FASTBOOL SfxItemPool::StoreSurrogate
}
rStream << SFX_ITEMS_NULL;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -1227,7 +1227,7 @@ sal_uInt32 SfxItemPool::GetSurrogate(const SfxPoolItem *pItem) const
// -----------------------------------------------------------------------
-FASTBOOL SfxItemPool::IsInStoringRange( USHORT nWhich ) const
+FASTBOOL SfxItemPool::IsInStoringRange( sal_uInt16 nWhich ) const
{
return nWhich >= pImp->nStoringStart &&
nWhich <= pImp->nStoringEnd;
@@ -1235,7 +1235,7 @@ FASTBOOL SfxItemPool::IsInStoringRange( USHORT nWhich ) const
//------------------------------------------------------------------------
-void SfxItemPool::SetStoringRange( USHORT nFrom, USHORT nTo )
+void SfxItemPool::SetStoringRange( sal_uInt16 nFrom, sal_uInt16 nTo )
/* [Beschreibung]
@@ -1262,10 +1262,10 @@ void SfxItemPool::SetStoringRange( USHORT nFrom, USHORT nTo )
void SfxItemPool::SetVersionMap
(
- USHORT nVer, /* neue Versionsnummer */
- USHORT nOldStart, /* alte erste Which-Id */
- USHORT nOldEnd, /* alte letzte Which-Id */
- USHORT* pOldWhichIdTab /* Array mit genau dem Aufbau der Which-Ids
+ sal_uInt16 nVer, /* neue Versionsnummer */
+ sal_uInt16 nOldStart, /* alte erste Which-Id */
+ sal_uInt16 nOldEnd, /* alte letzte Which-Id */
+ sal_uInt16* pOldWhichIdTab /* Array mit genau dem Aufbau der Which-Ids
der vorhergehenden Version, in denen
die jeweils neue Which-Id steht. */
)
@@ -1313,14 +1313,14 @@ void SfxItemPool::SetVersionMap
Dabei haben sich also die Ids 3 und 4 ge"andert. F"ur die neue Version
m"u\ste am Pool folgendes gesetzt werden:
- static USHORT nVersion1Map = { 1, 2, 5, 6 };
+ static sal_uInt16 nVersion1Map = { 1, 2, 5, 6 };
pPool->SetVersionMap( 1, 1, 4, &nVersion1Map );
[Querverweise]
<SfxItemPool::IsLoadingVersionCurrent()const>
- <SfxItemPool::GetNewWhich(USHORT)>
+ <SfxItemPool::GetNewWhich(sal_uInt16)>
<SfxItemPool::GetVersion()const>
<SfxItemPool::GetLoadingVersion()const>
*/
@@ -1335,9 +1335,9 @@ void SfxItemPool::SetVersionMap
pImp->nVersion = nVer;
// Versions-Range anpassen
- for ( USHORT n = 0; n < nOldEnd-nOldStart+1; ++n )
+ for ( sal_uInt16 n = 0; n < nOldEnd-nOldStart+1; ++n )
{
- USHORT nWhich = pOldWhichIdTab[n];
+ sal_uInt16 nWhich = pOldWhichIdTab[n];
if ( nWhich < pImp->nVerStart )
{
if ( !nWhich )
@@ -1351,9 +1351,9 @@ void SfxItemPool::SetVersionMap
// -----------------------------------------------------------------------
-USHORT SfxItemPool::GetNewWhich
+sal_uInt16 SfxItemPool::GetNewWhich
(
- USHORT nFileWhich // die aus dem Stream geladene Which-Id
+ sal_uInt16 nFileWhich // die aus dem Stream geladene Which-Id
) const
/* [Beschreibung]
@@ -1377,7 +1377,7 @@ USHORT SfxItemPool::GetNewWhich
[Querverweise]
<SfxItemPool::IsLoadingVersionCurrent()const>
- <SfxItemPool::SetVersionMap(USHORT,USHORT,USHORT,USHORT*)>
+ <SfxItemPool::SetVersionMap(sal_uInt16,sal_uInt16,sal_uInt16,sal_uInt16*)>
<SfxItemPool::GetVersion()const>
<SfxItemPool::GetLoadingVersion()const>
*/
@@ -1402,8 +1402,8 @@ USHORT SfxItemPool::GetNewWhich
{
SfxPoolVersion_ImplPtr pVerInfo = pImp->aVersions[nMap-1];
if ( pVerInfo->_nVer > pImp->nVersion )
- { USHORT nOfs;
- USHORT nCount = pVerInfo->_nEnd - pVerInfo->_nStart + 1;
+ { sal_uInt16 nOfs;
+ sal_uInt16 nCount = pVerInfo->_nEnd - pVerInfo->_nStart + 1;
for ( nOfs = 0;
nOfs <= nCount &&
pVerInfo->_pMap[nOfs] != nFileWhich;
@@ -1444,7 +1444,7 @@ USHORT SfxItemPool::GetNewWhich
// -----------------------------------------------------------------------
-FASTBOOL SfxItemPool::IsInVersionsRange( USHORT nWhich ) const
+FASTBOOL SfxItemPool::IsInVersionsRange( sal_uInt16 nWhich ) const
{
return nWhich >= pImp->nVerStart && nWhich <= pImp->nVerEnd;
}
@@ -1465,8 +1465,8 @@ FASTBOOL SfxItemPool::IsCurrentVersionLoading() const
[Querverweise]
- <SfxItemPool::SetVersionMap(USHORT,USHORT,USHORT,USHORT*)>
- <SfxItemPool::GetNewWhich(USHORT)const>
+ <SfxItemPool::SetVersionMap(sal_uInt16,sal_uInt16,sal_uInt16,sal_uInt16*)>
+ <SfxItemPool::GetNewWhich(sal_uInt16)const>
<SfxItemPool::GetVersion()const>
<SfxItemPool::GetLoadingVersion()const>
*/
@@ -1478,7 +1478,7 @@ FASTBOOL SfxItemPool::IsCurrentVersionLoading() const
// -----------------------------------------------------------------------
-USHORT SfxItemPool::GetVersion() const
+sal_uInt16 SfxItemPool::GetVersion() const
/* [Beschreibung]
@@ -1499,8 +1499,8 @@ USHORT SfxItemPool::GetVersion() const
[Querverweise]
<SfxItemPool::IsLoadingVersionCurrent()const>
- <SfxItemPool::SetVersionMap(USHORT,USHORT,USHORT,USHORT*)>
- <SfxItemPool::GetNewWhich(USHORT)const>
+ <SfxItemPool::SetVersionMap(sal_uInt16,sal_uInt16,sal_uInt16,sal_uInt16*)>
+ <SfxItemPool::GetNewWhich(sal_uInt16)const>
<SfxItemPool::GetLoadingVersion()const>
*/
@@ -1510,7 +1510,7 @@ USHORT SfxItemPool::GetVersion() const
// -----------------------------------------------------------------------
-USHORT SfxItemPool::GetLoadingVersion() const
+sal_uInt16 SfxItemPool::GetLoadingVersion() const
/* [Beschreibung]
@@ -1531,8 +1531,8 @@ USHORT SfxItemPool::GetLoadingVersion() const
[Querverweise]
<SfxItemPool::IsLoadingVersionCurrent()const>
- <SfxItemPool::SetVersionMap(USHORT,USHORT,USHORT,USHORT*)>
- <SfxItemPool::GetNewWhich(USHORT)const>
+ <SfxItemPool::SetVersionMap(sal_uInt16,sal_uInt16,sal_uInt16,sal_uInt16*)>
+ <SfxItemPool::GetNewWhich(sal_uInt16)const>
<SfxItemPool::GetVersion()const>
*/
@@ -1556,21 +1556,21 @@ FASTBOOL SfxItemPool::StoreItem( SvStream &rStream, const SfxPoolItem &rItem,
/* [Beschreibung]
Speichert das <SfxPoolItem> 'rItem' in den <SvStream> 'rStream'
- entweder als Surrogat ('bDirect == FALSE') oder direkt mit 'rItem.Store()'.
+ entweder als Surrogat ('bDirect == sal_False') oder direkt mit 'rItem.Store()'.
Nicht poolable Items werden immer direkt gespeichert. Items ohne Which-Id,
also SID-Items, werden nicht gespeichert, ebenso wenn Items, die in der
- File-Format-Version noch nicht vorhanden waren (return FALSE).
+ File-Format-Version noch nicht vorhanden waren (return sal_False).
Das Item wird im Stream wie folgt abgelegt:
- USHORT rItem.Which()
- USHORT GetSlotId( rItem.Which() ) bzw. 0 falls nicht verf"urbar
- USHORT GetSurrogate( &rItem ) bzw. SFX_ITEM_DIRECT bei '!SFX_ITEM_POOLBLE'
+ sal_uInt16 rItem.Which()
+ sal_uInt16 GetSlotId( rItem.Which() ) bzw. 0 falls nicht verf"urbar
+ sal_uInt16 GetSurrogate( &rItem ) bzw. SFX_ITEM_DIRECT bei '!SFX_ITEM_POOLBLE'
- optional (falls 'bDirect == TRUE' oder '!rItem.IsPoolable()':
+ optional (falls 'bDirect == sal_True' oder '!rItem.IsPoolable()':
- USHORT rItem.GetVersion()
- ULONG Size
+ sal_uInt16 rItem.GetVersion()
+ sal_uLong Size
Size rItem.Store()
@@ -1583,34 +1583,34 @@ FASTBOOL SfxItemPool::StoreItem( SvStream &rStream, const SfxPoolItem &rItem,
DBG_ASSERT( !IsInvalidItem(&rItem), "cannot store invalid items" );
if ( IsSlot( rItem.Which() ) )
- return FALSE;
+ return sal_False;
const SfxItemPool *pPool = this;
while ( !pPool->IsInStoringRange(rItem.Which()) )
if ( 0 == ( pPool = pPool->pSecondary ) )
- return FALSE;
+ return sal_False;
DBG_ASSERT( !pImp->bInSetItem || !rItem.ISA(SfxSetItem),
"SetItem contains ItemSet with SetItem" );
- USHORT nSlotId = pPool->GetSlotId( rItem.Which(), TRUE );
- USHORT nItemVersion = rItem.GetVersion(_nFileFormatVersion);
+ sal_uInt16 nSlotId = pPool->GetSlotId( rItem.Which(), sal_True );
+ sal_uInt16 nItemVersion = rItem.GetVersion(_nFileFormatVersion);
if ( USHRT_MAX == nItemVersion )
- return FALSE;
+ return sal_False;
rStream << rItem.Which() << nSlotId;
if ( bDirect || !pPool->StoreSurrogate( rStream, &rItem ) )
{
rStream << nItemVersion;
- rStream << (UINT32) 0L; // Platz fuer Laenge in Bytes
- ULONG nIStart = rStream.Tell();
+ rStream << (sal_uInt32) 0L; // Platz fuer Laenge in Bytes
+ sal_uLong nIStart = rStream.Tell();
rItem.Store(rStream, nItemVersion);
- ULONG nIEnd = rStream.Tell();
+ sal_uLong nIEnd = rStream.Tell();
rStream.Seek( nIStart-4 );
- rStream << (INT32) ( nIEnd-nIStart );
+ rStream << (sal_Int32) ( nIEnd-nIStart );
rStream.Seek( nIEnd );
}
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------------
@@ -1622,10 +1622,10 @@ const SfxPoolItem* SfxItemPool::LoadItem( SvStream &rStream, FASTBOOL bDirect,
// pRefPool==-1 => nicht putten!
{
- USHORT nWhich, nSlot; // nSurrogate;
+ sal_uInt16 nWhich, nSlot; // nSurrogate;
rStream >> nWhich >> nSlot;
- BOOL bDontPut = (SfxItemPool*)-1 == pRefPool;
+ sal_Bool bDontPut = (SfxItemPool*)-1 == pRefPool;
if ( bDontPut || !pRefPool )
pRefPool = this;
@@ -1638,7 +1638,7 @@ const SfxPoolItem* SfxItemPool::LoadItem( SvStream &rStream, FASTBOOL bDirect,
{
// WID in der Version nicht vorhanden => ueberspringen
sal_uInt32 nSurro;
- USHORT nVersion, nLen;
+ sal_uInt16 nVersion, nLen;
rStream >> nSurro;
if ( SFX_ITEMS_DIRECT == nSurro )
{
@@ -1669,17 +1669,17 @@ const SfxPoolItem* SfxItemPool::LoadItem( SvStream &rStream, FASTBOOL bDirect,
pItem = LoadSurrogate( rStream, nWhich, nSlot, pRefPool );
else
// sonst "uberspringen
- rStream.SeekRel( sizeof(USHORT) );
+ rStream.SeekRel( sizeof(sal_uInt16) );
}
// wird direkt, also nicht "uber Surrogat geladen?
if ( bDirect || ( nWhich && !pItem ) )
{
// bDirekt bzw. nicht IsPoolable() => Item direkt laden
- USHORT nVersion;
+ sal_uInt16 nVersion;
sal_uInt32 nLen;
rStream >> nVersion >> nLen;
- ULONG nIStart = rStream.Tell();
+ sal_uLong nIStart = rStream.Tell();
// Which-Id in dieser Version bekannt?
if ( nWhich )
@@ -1697,7 +1697,7 @@ const SfxPoolItem* SfxItemPool::LoadItem( SvStream &rStream, FASTBOOL bDirect,
}
else
pItem = 0;
- ULONG nIEnd = rStream.Tell();
+ sal_uLong nIEnd = rStream.Tell();
DBG_ASSERT( nIEnd <= (nIStart+nLen), "read past end of item" );
if ( (nIStart+nLen) != nIEnd )
rStream.Seek( nIStart+nLen );
diff --git a/svl/source/items/poolitem.cxx b/svl/source/items/poolitem.cxx
index 77cf3dfff014..8626daeffbd5 100644
--- a/svl/source/items/poolitem.cxx
+++ b/svl/source/items/poolitem.cxx
@@ -38,18 +38,18 @@ DBG_NAME(SfxVoidItem)
// @@@ DBG_NAME(SfxInvalidItem);
DBG_NAME(SfxItemHandle)
-BYTE nSfxFlag8Val[8] =
+sal_uInt8 nSfxFlag8Val[8] =
{
1, 2, 4, 8, 16, 32, 64, 128
};
-USHORT nSfxFlag16Val[16] =
+sal_uInt16 nSfxFlag16Val[16] =
{
1, 2, 4, 8, 16, 32, 64, 128, 256, 512,
1024, 2048, 4096, 8192, 16384, 32768
};
-ULONG nSfxFlag32Val[32] =
+sal_uLong nSfxFlag32Val[32] =
{
0x1L, 0x2L, 0x4L, 0x8L,
0x10L, 0x20L, 0x40L, 0x80L,
@@ -71,7 +71,7 @@ TYPEINIT1(SfxSetItem, SfxPoolItem);
// ------------------------------------------------------------------------
#if OSL_DEBUG_LEVEL > 1
-static ULONG nItemCount = 0;
+static sal_uLong nItemCount = 0;
const char* pw1 = "Wow! 10.000 items!";
const char* pw2 = "Wow! 100.000 items!";
@@ -83,7 +83,7 @@ const char* pw5 = "Wow! 10.000.000 items!";
IMPL_PTRHINT(SfxPoolItemHint,SfxPoolItem)
// SfxPoolItem -----------------------------------------------------------
-SfxPoolItem::SfxPoolItem( USHORT nW )
+SfxPoolItem::SfxPoolItem( sal_uInt16 nW )
: nRefCount( 0 ),
nWhich( nW )
, nKind( 0 )
@@ -192,26 +192,26 @@ int SfxPoolItem::operator==( const SfxPoolItem& rCmp ) const
int SfxPoolItem::IsPoolable() const
{
DBG_CHKTHIS(SfxPoolItem, 0);
- return TRUE;
+ return sal_True;
}
#endif
// -----------------------------------------------------------------------
-SfxPoolItem* SfxPoolItem::Create(SvStream &, USHORT) const
+SfxPoolItem* SfxPoolItem::Create(SvStream &, sal_uInt16) const
{
DBG_CHKTHIS(SfxPoolItem, 0);
return Clone(0);
}
// -----------------------------------------------------------------------
-USHORT SfxPoolItem::GetVersion( USHORT ) const
+sal_uInt16 SfxPoolItem::GetVersion( sal_uInt16 ) const
{
DBG_CHKTHIS(SfxPoolItem, 0);
return 0;
}
// -----------------------------------------------------------------------
-SvStream& SfxPoolItem::Store(SvStream &rStream, USHORT ) const
+SvStream& SfxPoolItem::Store(SvStream &rStream, sal_uInt16 ) const
{
DBG_CHKTHIS(SfxPoolItem, 0);
return rStream;
@@ -269,7 +269,7 @@ SfxItemPresentation SfxPoolItem::GetPresentation
von allen UI-relevanten SfxPoolItem-Subklassen "uberladen werden.
Da die Ma\seinheit des Wertes im SfxItemPool nur "uber
- <SfxItemPool::GetMetric(USHORT)const> erfragbar ist, und nicht etwa
+ <SfxItemPool::GetMetric(sal_uInt16)const> erfragbar ist, und nicht etwa
in der SfxPoolItem-Instanz oder -Subklasse verf"ugbar ist, wird die
eigene Ma\seinheit als 'eCoreMetric' "ubergeben.
@@ -312,7 +312,7 @@ SfxItemPresentation SfxPoolItem::GetPresentation
}
// SfxVoidItem ------------------------------------------------------------
-SfxVoidItem::SfxVoidItem( USHORT which ):
+SfxVoidItem::SfxVoidItem( sal_uInt16 which ):
SfxPoolItem(which)
{
DBG_CTOR(SfxVoidItem, 0);
@@ -334,7 +334,7 @@ rCmp
{
DBG_CHKTHIS(SfxVoidItem, 0);
DBG_ASSERT( SfxPoolItem::operator==( rCmp ), "unequal type" );
- return TRUE;
+ return sal_True;
}
// ------------------------------------------------------------------------
@@ -361,7 +361,7 @@ SfxPoolItem* SfxVoidItem::Clone(SfxItemPool *) const
// SfxInvalidItem ---------------------------------------------------------
#if 0 /* @@@ NOT USED @@@ */
-SfxInvalidItem::SfxInvalidItem( USHORT nWhich, const SfxPoolItem &rDefault ):
+SfxInvalidItem::SfxInvalidItem( sal_uInt16 nWhich, const SfxPoolItem &rDefault ):
SfxPoolItem(nWhich),
pDefaultItem(&rDefault)
{
@@ -414,7 +414,7 @@ SfxPoolItem* SfxInvalidItem::Clone(SfxItemPool *) const
}
// ------------------------------------------------------------------------
-SfxPoolItem* SfxInvalidItem::Create(SvStream &, USHORT nVersion) const
+SfxPoolItem* SfxInvalidItem::Create(SvStream &, sal_uInt16 nVersion) const
{
DBG_CHKTHIS(SfxInvalidItem, 0);
DBG_ERROR("SfxInvalidItem::Create() ist sinnlos");
@@ -422,7 +422,7 @@ SfxPoolItem* SfxInvalidItem::Create(SvStream &, USHORT nVersion) const
}
// ------------------------------------------------------------------------
-SvStream& SfxInvalidItem::Store(SvStream &rStream, USHORT nItemVersion ) const
+SvStream& SfxInvalidItem::Store(SvStream &rStream, sal_uInt16 nItemVersion ) const
{
DBG_CHKTHIS(SfxInvalidItem, 0);
DBG_ERROR("SfxInvalidItem::Store() ist sinnlos");
@@ -432,7 +432,7 @@ SvStream& SfxInvalidItem::Store(SvStream &rStream, USHORT nItemVersion ) const
// SfxItemHandle ----------------------------------------------------------
SfxItemHandle::SfxItemHandle(SfxPoolItem &rItem):
- pRef(new USHORT(1)),
+ pRef(new sal_uInt16(1)),
pItem(rItem.Clone(0))
{
DBG_CTOR(SfxItemHandle, 0);
@@ -504,18 +504,18 @@ void SfxPoolItem::Store(SvStream &rStream) const
// -----------------------------------------------------------------------
-BOOL SfxPoolItem::QueryValue( com::sun::star::uno::Any&, BYTE ) const
+sal_Bool SfxPoolItem::QueryValue( com::sun::star::uno::Any&, sal_uInt8 ) const
{
DBG_ERROR("There is no implementation for QueryValue for this item!");
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL SfxPoolItem::PutValue( const com::sun::star::uno::Any&, BYTE )
+sal_Bool SfxPoolItem::PutValue( const com::sun::star::uno::Any&, sal_uInt8 )
{
DBG_ERROR("There is no implementation for PutValue for this item!");
- return FALSE;
+ return sal_False;
}
SfxVoidItem::~SfxVoidItem()
diff --git a/svl/source/items/ptitem.cxx b/svl/source/items/ptitem.cxx
index 3c12745e5967..cd557312932c 100644
--- a/svl/source/items/ptitem.cxx
+++ b/svl/source/items/ptitem.cxx
@@ -57,7 +57,7 @@ SfxPointItem::SfxPointItem()
// -----------------------------------------------------------------------
-SfxPointItem::SfxPointItem( USHORT nW, const Point& rVal ) :
+SfxPointItem::SfxPointItem( sal_uInt16 nW, const Point& rVal ) :
SfxPoolItem( nW ),
aVal( rVal )
{
@@ -66,7 +66,7 @@ SfxPointItem::SfxPointItem( USHORT nW, const Point& rVal ) :
// -----------------------------------------------------------------------
-SfxPointItem::SfxPointItem( USHORT nW, SvStream &rStream ) :
+SfxPointItem::SfxPointItem( sal_uInt16 nW, SvStream &rStream ) :
SfxPoolItem( nW )
{
DBG_CTOR(SfxPointItem, 0);
@@ -120,7 +120,7 @@ SfxPoolItem* SfxPointItem::Clone(SfxItemPool *) const
// -----------------------------------------------------------------------
-SfxPoolItem* SfxPointItem::Create(SvStream &rStream, USHORT ) const
+SfxPoolItem* SfxPointItem::Create(SvStream &rStream, sal_uInt16 ) const
{
DBG_CHKTHIS(SfxPointItem, 0);
Point aStr;
@@ -130,7 +130,7 @@ SfxPoolItem* SfxPointItem::Create(SvStream &rStream, USHORT ) const
// -----------------------------------------------------------------------
-SvStream& SfxPointItem::Store(SvStream &rStream, USHORT ) const
+SvStream& SfxPointItem::Store(SvStream &rStream, sal_uInt16 ) const
{
DBG_CHKTHIS(SfxPointItem, 0);
rStream << aVal;
@@ -139,8 +139,8 @@ SvStream& SfxPointItem::Store(SvStream &rStream, USHORT ) const
// -----------------------------------------------------------------------
-BOOL SfxPointItem::QueryValue( uno::Any& rVal,
- BYTE nMemberId ) const
+sal_Bool SfxPointItem::QueryValue( uno::Any& rVal,
+ sal_uInt8 nMemberId ) const
{
sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
awt::Point aTmp(aVal.X(), aVal.Y());
@@ -155,20 +155,20 @@ BOOL SfxPointItem::QueryValue( uno::Any& rVal,
case 0: rVal <<= aTmp; break;
case MID_X: rVal <<= aTmp.X; break;
case MID_Y: rVal <<= aTmp.Y; break;
- default: DBG_ERROR("Wrong MemberId!"); return FALSE;
+ default: DBG_ERROR("Wrong MemberId!"); return sal_False;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL SfxPointItem::PutValue( const uno::Any& rVal,
- BYTE nMemberId )
+sal_Bool SfxPointItem::PutValue( const uno::Any& rVal,
+ sal_uInt8 nMemberId )
{
sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
awt::Point aValue;
sal_Int32 nVal = 0;
if ( !nMemberId )
@@ -194,7 +194,7 @@ BOOL SfxPointItem::PutValue( const uno::Any& rVal,
case 0: aVal.setX( aValue.X ); aVal.setY( aValue.Y ); break;
case MID_X: aVal.setX( nVal ); break;
case MID_Y: aVal.setY( nVal ); break;
- default: DBG_ERROR("Wrong MemberId!"); return FALSE;
+ default: DBG_ERROR("Wrong MemberId!"); return sal_False;
}
}
diff --git a/svl/source/items/rectitem.cxx b/svl/source/items/rectitem.cxx
index 893ac3c125b0..7aae8caceac5 100644
--- a/svl/source/items/rectitem.cxx
+++ b/svl/source/items/rectitem.cxx
@@ -54,7 +54,7 @@ SfxRectangleItem::SfxRectangleItem()
// -----------------------------------------------------------------------
-SfxRectangleItem::SfxRectangleItem( USHORT nW, const Rectangle& rVal ) :
+SfxRectangleItem::SfxRectangleItem( sal_uInt16 nW, const Rectangle& rVal ) :
SfxPoolItem( nW ),
aVal( rVal )
{
@@ -63,7 +63,7 @@ SfxRectangleItem::SfxRectangleItem( USHORT nW, const Rectangle& rVal ) :
// -----------------------------------------------------------------------
-SfxRectangleItem::SfxRectangleItem( USHORT nW, SvStream &rStream ) :
+SfxRectangleItem::SfxRectangleItem( sal_uInt16 nW, SvStream &rStream ) :
SfxPoolItem( nW )
{
DBG_CTOR(SfxRectangleItem, 0);
@@ -120,7 +120,7 @@ SfxPoolItem* SfxRectangleItem::Clone(SfxItemPool *) const
// -----------------------------------------------------------------------
-SfxPoolItem* SfxRectangleItem::Create(SvStream &rStream, USHORT ) const
+SfxPoolItem* SfxRectangleItem::Create(SvStream &rStream, sal_uInt16 ) const
{
DBG_CHKTHIS(SfxRectangleItem, 0);
Rectangle aStr;
@@ -130,7 +130,7 @@ SfxPoolItem* SfxRectangleItem::Create(SvStream &rStream, USHORT ) const
// -----------------------------------------------------------------------
-SvStream& SfxRectangleItem::Store(SvStream &rStream, USHORT ) const
+SvStream& SfxRectangleItem::Store(SvStream &rStream, sal_uInt16 ) const
{
DBG_CHKTHIS(SfxRectangleItem, 0);
rStream << aVal;
@@ -139,8 +139,8 @@ SvStream& SfxRectangleItem::Store(SvStream &rStream, USHORT ) const
// -----------------------------------------------------------------------
-BOOL SfxRectangleItem::QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId) const
+sal_Bool SfxRectangleItem::QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId) const
{
nMemberId &= ~CONVERT_TWIPS;
switch ( nMemberId )
@@ -157,17 +157,17 @@ BOOL SfxRectangleItem::QueryValue( com::sun::star::uno::Any& rVal,
case MID_RECT_RIGHT: rVal <<= aVal.getY(); break;
case MID_WIDTH: rVal <<= aVal.getWidth(); break;
case MID_HEIGHT: rVal <<= aVal.getHeight(); break;
- default: DBG_ERROR("Wrong MemberID!"); return FALSE;
+ default: DBG_ERROR("Wrong MemberID!"); return sal_False;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL SfxRectangleItem::PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId )
+sal_Bool SfxRectangleItem::PutValue( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
nMemberId &= ~CONVERT_TWIPS;
com::sun::star::awt::Rectangle aValue;
sal_Int32 nVal = 0;
@@ -190,7 +190,7 @@ BOOL SfxRectangleItem::PutValue( const com::sun::star::uno::Any& rVal,
case MID_RECT_RIGHT: aVal.setY( nVal ); break;
case MID_WIDTH: aVal.setWidth( nVal ); break;
case MID_HEIGHT: aVal.setHeight( nVal ); break;
- default: DBG_ERROR("Wrong MemberID!"); return FALSE;
+ default: DBG_ERROR("Wrong MemberID!"); return sal_False;
}
}
diff --git a/svl/source/items/rngitem.cxx b/svl/source/items/rngitem.cxx
index 2f9c58a362f6..2bb4fb4236c9 100644
--- a/svl/source/items/rngitem.cxx
+++ b/svl/source/items/rngitem.cxx
@@ -31,7 +31,7 @@
#ifndef NUMTYPE
-#define NUMTYPE USHORT
+#define NUMTYPE sal_uInt16
#define SfxXRangeItem SfxRangeItem
#define SfxXRangesItem SfxUShortRangesItem
#include <svl/rngitem.hxx>
diff --git a/svl/source/items/rngitem_inc.cxx b/svl/source/items/rngitem_inc.cxx
index ab8852756f7d..a9d68980ec6a 100644..100755
--- a/svl/source/items/rngitem_inc.cxx
+++ b/svl/source/items/rngitem_inc.cxx
@@ -52,7 +52,7 @@ SfxXRangeItem::SfxXRangeItem()
// -----------------------------------------------------------------------
-SfxXRangeItem::SfxXRangeItem( USHORT which, NUMTYPE from, NUMTYPE to ):
+SfxXRangeItem::SfxXRangeItem( sal_uInt16 which, NUMTYPE from, NUMTYPE to ):
SfxPoolItem( which ),
nFrom( from ),
nTo( to )
@@ -62,7 +62,7 @@ SfxXRangeItem::SfxXRangeItem( USHORT which, NUMTYPE from, NUMTYPE to ):
// -----------------------------------------------------------------------
-SfxXRangeItem::SfxXRangeItem( USHORT nW, SvStream &rStream ) :
+SfxXRangeItem::SfxXRangeItem( sal_uInt16 nW, SvStream &rStream ) :
SfxPoolItem( nW )
{
rStream >> nFrom;
@@ -115,7 +115,7 @@ SfxPoolItem* SfxXRangeItem::Clone(SfxItemPool *) const
// -----------------------------------------------------------------------
-SfxPoolItem* SfxXRangeItem::Create(SvStream &rStream, USHORT) const
+SfxPoolItem* SfxXRangeItem::Create(SvStream &rStream, sal_uInt16) const
{
NUMTYPE nVon, nBis;
rStream >> nVon;
@@ -125,7 +125,7 @@ SfxPoolItem* SfxXRangeItem::Create(SvStream &rStream, USHORT) const
// -----------------------------------------------------------------------
-SvStream& SfxXRangeItem::Store(SvStream &rStream, USHORT) const
+SvStream& SfxXRangeItem::Store(SvStream &rStream, sal_uInt16) const
{
rStream << nFrom;
rStream << nTo;
@@ -141,7 +141,7 @@ SfxXRangesItem::SfxXRangesItem()
//-------------------------------------------------------------------------
-SfxXRangesItem::SfxXRangesItem( USHORT nWID, const NUMTYPE *pRanges )
+SfxXRangesItem::SfxXRangesItem( sal_uInt16 nWID, const NUMTYPE *pRanges )
: SfxPoolItem( nWID )
{
NUMTYPE nCount = Count_Impl(pRanges) + 1;
@@ -151,7 +151,7 @@ SfxXRangesItem::SfxXRangesItem( USHORT nWID, const NUMTYPE *pRanges )
//-------------------------------------------------------------------------
-SfxXRangesItem::SfxXRangesItem( USHORT nWID, SvStream &rStream )
+SfxXRangesItem::SfxXRangesItem( sal_uInt16 nWID, SvStream &rStream )
: SfxPoolItem( nWID )
{
NUMTYPE nCount;
@@ -185,9 +185,9 @@ int SfxXRangesItem::operator==( const SfxPoolItem &rItem ) const
{
const SfxXRangesItem &rOther = (const SfxXRangesItem&) rItem;
if ( !_pRanges && !rOther._pRanges )
- return TRUE;
+ return sal_True;
if ( _pRanges || rOther._pRanges )
- return FALSE;
+ return sal_False;
NUMTYPE n;
for ( n = 0; _pRanges[n] && rOther._pRanges[n]; ++n )
@@ -218,14 +218,14 @@ SfxPoolItem* SfxXRangesItem::Clone( SfxItemPool * ) const
//-------------------------------------------------------------------------
-SfxPoolItem* SfxXRangesItem::Create( SvStream &rStream, USHORT ) const
+SfxPoolItem* SfxXRangesItem::Create( SvStream &rStream, sal_uInt16 ) const
{
return new SfxXRangesItem( Which(), rStream );
}
//-------------------------------------------------------------------------
-SvStream& SfxXRangesItem::Store( SvStream &rStream, USHORT ) const
+SvStream& SfxXRangesItem::Store( SvStream &rStream, sal_uInt16 ) const
{
NUMTYPE nCount = Count_Impl( _pRanges );
rStream >> nCount;
diff --git a/svl/source/items/sfontitm.cxx b/svl/source/items/sfontitm.cxx
index e76b3854c6be..f22c1cb7c26a 100644
--- a/svl/source/items/sfontitm.cxx
+++ b/svl/source/items/sfontitm.cxx
@@ -72,7 +72,7 @@ int SfxFontItem::operator ==(const SfxPoolItem & rItem) const
//============================================================================
// virtual
-SfxPoolItem * SfxFontItem::Create(SvStream & rStream, USHORT) const
+SfxPoolItem * SfxFontItem::Create(SvStream & rStream, sal_uInt16) const
{
VersionCompat aItemCompat(rStream, STREAM_READ);
SfxFontItem * pItem = new SfxFontItem(Which());
@@ -104,8 +104,8 @@ SfxPoolItem * SfxFontItem::Create(SvStream & rStream, USHORT) const
rStream >> nKerning;
pItem->m_bKerning = nKerning != 0;
}
- pItem->m_aColor.Read(rStream, TRUE);
- pItem->m_aFillColor.Read(rStream, TRUE);
+ pItem->m_aColor.Read(rStream, sal_True);
+ pItem->m_aFillColor.Read(rStream, sal_True);
sal_Int16 nFlags = 0;
rStream >> nFlags;
pItem->m_bHasFont = (nFlags & 4) != 0;
@@ -116,7 +116,7 @@ SfxPoolItem * SfxFontItem::Create(SvStream & rStream, USHORT) const
//============================================================================
// virtual
-SvStream & SfxFontItem::Store(SvStream & rStream, USHORT) const
+SvStream & SfxFontItem::Store(SvStream & rStream, sal_uInt16) const
{
VersionCompat aItemCompat(rStream, STREAM_WRITE, 1);
{
@@ -130,8 +130,8 @@ SvStream & SfxFontItem::Store(SvStream & rStream, USHORT) const
<< sal_Int8(m_bOutline) << sal_Int8(m_bShadow)
<< sal_Int8(m_bKerning);
}
- SAL_CONST_CAST(Color &, m_aColor).Write(rStream, TRUE);
- SAL_CONST_CAST(Color &, m_aFillColor).Write(rStream, TRUE);
+ SAL_CONST_CAST(Color &, m_aColor).Write(rStream, sal_True);
+ SAL_CONST_CAST(Color &, m_aFillColor).Write(rStream, sal_True);
rStream << sal_Int16(m_bHasFont << 2 | m_bHasColor
| m_bHasFillColor << 1);
return rStream;
diff --git a/svl/source/items/sitem.cxx b/svl/source/items/sitem.cxx
index 4a9c0af096ea..7f990aec36d3 100644
--- a/svl/source/items/sitem.cxx
+++ b/svl/source/items/sitem.cxx
@@ -45,16 +45,16 @@ DBG_NAME(SfxSetItem)
// --------------------------------------------------------------------------
-SfxSetItem::SfxSetItem( USHORT which, const SfxItemSet &rSet) :
+SfxSetItem::SfxSetItem( sal_uInt16 which, const SfxItemSet &rSet) :
SfxPoolItem(which),
- pSet(rSet.Clone(TRUE))
+ pSet(rSet.Clone(sal_True))
{
DBG_CTOR(SfxSetItem, 0);
}
// --------------------------------------------------------------------------
-SfxSetItem::SfxSetItem( USHORT which, SfxItemSet *pS) :
+SfxSetItem::SfxSetItem( sal_uInt16 which, SfxItemSet *pS) :
SfxPoolItem(which),
pSet(pS)
{
@@ -66,7 +66,7 @@ SfxSetItem::SfxSetItem( USHORT which, SfxItemSet *pS) :
SfxSetItem::SfxSetItem( const SfxSetItem& rCopy, SfxItemPool *pPool ) :
SfxPoolItem(rCopy.Which()),
- pSet(rCopy.pSet->Clone(TRUE, pPool))
+ pSet(rCopy.pSet->Clone(sal_True, pPool))
{
DBG_CTOR(SfxSetItem, 0);
}
@@ -105,7 +105,7 @@ SfxItemPresentation SfxSetItem::GetPresentation
// --------------------------------------------------------------------------
-SvStream& SfxSetItem::Store(SvStream& rStream, USHORT) const
+SvStream& SfxSetItem::Store(SvStream& rStream, sal_uInt16) const
{
GetItemSet().Store(rStream);
return rStream;
diff --git a/svl/source/items/slstitm.cxx b/svl/source/items/slstitm.cxx
index ec9757e278a8..be214cccf599 100644
--- a/svl/source/items/slstitm.cxx
+++ b/svl/source/items/slstitm.cxx
@@ -45,12 +45,12 @@ TYPEINIT1_AUTOFACTORY(SfxStringListItem, SfxPoolItem);
class SfxImpStringList
{
public:
- USHORT nRefCount;
+ sal_uInt16 nRefCount;
List aList;
SfxImpStringList() { nRefCount = 1; }
~SfxImpStringList();
- void Sort( BOOL bAscending, List* );
+ void Sort( sal_Bool bAscending, List* );
};
//------------------------------------------------------------------------
@@ -69,36 +69,36 @@ SfxImpStringList::~SfxImpStringList()
//------------------------------------------------------------------------
-void SfxImpStringList::Sort( BOOL bAscending, List* pParallelList )
+void SfxImpStringList::Sort( sal_Bool bAscending, List* pParallelList )
{
DBG_ASSERT(!pParallelList || pParallelList->Count() >= aList.Count(),"Sort:ParallelList too small");
- ULONG nCount = aList.Count();
+ sal_uLong nCount = aList.Count();
if( nCount > 1 )
{
nCount -= 2;
// Bubble Dir Einen
- BOOL bSwapped = TRUE;
+ sal_Bool bSwapped = sal_True;
while( bSwapped )
{
- bSwapped = FALSE;
- for( ULONG nCur = 0; nCur <= nCount; nCur++ )
+ bSwapped = sal_False;
+ for( sal_uLong nCur = 0; nCur <= nCount; nCur++ )
{
String* pStr1 = (String*)aList.GetObject( nCur );
String* pStr2 = (String*)aList.GetObject( nCur+1 );
// COMPARE_GREATER => pStr2 ist groesser als pStr1
StringCompare eCompare = pStr1->CompareIgnoreCaseToAscii( *pStr2 ); //@@@
- BOOL bSwap = FALSE;
+ sal_Bool bSwap = sal_False;
if( bAscending )
{
if( eCompare == COMPARE_LESS )
- bSwap = TRUE;
+ bSwap = sal_True;
}
else if( eCompare == COMPARE_GREATER )
- bSwap = TRUE;
+ bSwap = sal_True;
if( bSwap )
{
- bSwapped = TRUE;
+ bSwapped = sal_True;
aList.Replace( pStr1, nCur + 1 );
aList.Replace( pStr2, nCur );
if( pParallelList )
@@ -123,7 +123,7 @@ SfxStringListItem::SfxStringListItem() :
//------------------------------------------------------------------------
-SfxStringListItem::SfxStringListItem( USHORT which, const List* pList ) :
+SfxStringListItem::SfxStringListItem( sal_uInt16 which, const List* pList ) :
SfxPoolItem( which ),
pImp(NULL)
{
@@ -146,7 +146,7 @@ SfxStringListItem::SfxStringListItem( USHORT which, const List* pList ) :
//------------------------------------------------------------------------
-SfxStringListItem::SfxStringListItem( USHORT which, SvStream& rStream ) :
+SfxStringListItem::SfxStringListItem( sal_uInt16 which, SvStream& rStream ) :
SfxPoolItem( which ),
pImp(NULL)
{
@@ -214,9 +214,9 @@ int SfxStringListItem::operator==( const SfxPoolItem& rItem ) const
SfxStringListItem* pItem = (SfxStringListItem*)&rItem;
if( pImp == pItem->pImp )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
//------------------------------------------------------------------------
@@ -250,14 +250,14 @@ SfxPoolItem* SfxStringListItem::Clone( SfxItemPool *) const
//------------------------------------------------------------------------
-SfxPoolItem* SfxStringListItem::Create( SvStream & rStream, USHORT ) const
+SfxPoolItem* SfxStringListItem::Create( SvStream & rStream, sal_uInt16 ) const
{
return new SfxStringListItem( Which(), rStream );
}
//------------------------------------------------------------------------
-SvStream& SfxStringListItem::Store( SvStream & rStream, USHORT ) const
+SvStream& SfxStringListItem::Store( SvStream & rStream, sal_uInt16 ) const
{
if( !pImp )
{
@@ -347,14 +347,14 @@ XubString SfxStringListItem::GetString()
int SfxStringListItem::IsPoolable() const
{
- return FALSE;
+ return sal_False;
}
#endif
//------------------------------------------------------------------------
-void SfxStringListItem::Sort( BOOL bAscending, List* pParallelList )
+void SfxStringListItem::Sort( sal_Bool bAscending, List* pParallelList )
{
DBG_ASSERT(GetRefCount()==0,"Sort:RefCount!=0");
if( pImp )
@@ -393,22 +393,22 @@ void SfxStringListItem::GetStringList( com::sun::star::uno::Sequence< rtl::OUStr
//----------------------------------------------------------------------------
// virtual
-BOOL SfxStringListItem::PutValue( const com::sun::star::uno::Any& rVal,BYTE )
+sal_Bool SfxStringListItem::PutValue( const com::sun::star::uno::Any& rVal,sal_uInt8 )
{
com::sun::star::uno::Sequence< rtl::OUString > aValue;
if ( rVal >>= aValue )
{
SetStringList( aValue );
- return TRUE;
+ return sal_True;
}
DBG_ERROR( "SfxStringListItem::PutValue - Wrong type!" );
- return FALSE;
+ return sal_False;
}
//----------------------------------------------------------------------------
// virtual
-BOOL SfxStringListItem::QueryValue( com::sun::star::uno::Any& rVal,BYTE ) const
+sal_Bool SfxStringListItem::QueryValue( com::sun::star::uno::Any& rVal,sal_uInt8 ) const
{
// GetString() is not const!!!
SfxStringListItem* pThis = const_cast< SfxStringListItem * >( this );
@@ -416,7 +416,7 @@ BOOL SfxStringListItem::QueryValue( com::sun::star::uno::Any& rVal,BYTE ) const
com::sun::star::uno::Sequence< rtl::OUString > aStringList;
pThis->GetStringList( aStringList );
rVal = ::com::sun::star::uno::makeAny( aStringList );
- return TRUE;
+ return sal_True;
}
diff --git a/svl/source/items/srchitem.cxx b/svl/source/items/srchitem.cxx
index cc033bc6905e..225a5b99907b 100644
--- a/svl/source/items/srchitem.cxx
+++ b/svl/source/items/srchitem.cxx
@@ -99,7 +99,7 @@ static Sequence< ::rtl::OUString > lcl_GetNotifyNames()
const int nCount = sizeof( aTranslitNames ) / sizeof( aTranslitNames[0] );
Sequence< ::rtl::OUString > aNames( nCount );
::rtl::OUString* pNames = aNames.getArray();
- for (INT32 i = 0; i < nCount; ++i)
+ for (sal_Int32 i = 0; i < nCount; ++i)
pNames[i] = ::rtl::OUString::createFromAscii( aTranslitNames[i] );
return aNames;
@@ -128,7 +128,7 @@ SvxSearchItem::SvxSearchItem( const sal_uInt16 nId ) :
bBackward ( sal_False ),
bPattern ( sal_False ),
bContent ( sal_False ),
- bAsianOptions ( FALSE )
+ bAsianOptions ( sal_False )
{
EnableNotification( lcl_GetNotifyNames() );
@@ -145,7 +145,7 @@ SvxSearchItem::SvxSearchItem( const sal_uInt16 nId ) :
if (aOpt.IsWholeWordsOnly())
aSearchOpt.searchFlag |= SearchFlags::NORM_WORD_ONLY;
- INT32 &rFlags = aSearchOpt.transliterateFlags;
+ sal_Int32 &rFlags = aSearchOpt.transliterateFlags;
if (!aOpt.IsMatchCase())
rFlags |= TransliterationModules_IGNORE_CASE;
@@ -229,7 +229,7 @@ SfxPoolItem* SvxSearchItem::Clone( SfxItemPool *) const
// -----------------------------------------------------------------------
//! used below
-static BOOL operator == ( const SearchOptions& rItem1, const SearchOptions& rItem2 )
+static sal_Bool operator == ( const SearchOptions& rItem1, const SearchOptions& rItem2 )
{
return rItem1.algorithmType == rItem2.algorithmType &&
rItem1.searchFlag == rItem2.searchFlag &&
@@ -425,7 +425,7 @@ void SvxSearchItem::SetTransliterationFlags( sal_Int32 nFlags )
aSearchOpt.transliterateFlags = nFlags;
}
-sal_Bool SvxSearchItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+sal_Bool SvxSearchItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
switch ( nMemberId )
@@ -513,7 +513,7 @@ sal_Bool SvxSearchItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMember
// -----------------------------------------------------------------------
-sal_Bool SvxSearchItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId )
+sal_Bool SvxSearchItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId )
{
nMemberId &= ~CONVERT_TWIPS;
sal_Bool bRet = sal_False;
diff --git a/svl/source/items/stritem.cxx b/svl/source/items/stritem.cxx
index 6568dc3a99f5..de2d97d23c6a 100644
--- a/svl/source/items/stritem.cxx
+++ b/svl/source/items/stritem.cxx
@@ -39,7 +39,7 @@ TYPEINIT1_AUTOFACTORY(SfxStringItem, CntUnencodedStringItem)
//============================================================================
// virtual
-SfxStringItem::SfxStringItem(USHORT which, SvStream & rStream):
+SfxStringItem::SfxStringItem(sal_uInt16 which, SvStream & rStream):
CntUnencodedStringItem(which)
{
UniString aValue;
@@ -50,14 +50,14 @@ SfxStringItem::SfxStringItem(USHORT which, SvStream & rStream):
//============================================================================
// virtual
-SfxPoolItem * SfxStringItem::Create(SvStream & rStream, USHORT) const
+SfxPoolItem * SfxStringItem::Create(SvStream & rStream, sal_uInt16) const
{
return new SfxStringItem(Which(), rStream);
}
//============================================================================
// virtual
-SvStream & SfxStringItem::Store(SvStream & rStream, USHORT) const
+SvStream & SfxStringItem::Store(SvStream & rStream, sal_uInt16) const
{
writeByteString(rStream, GetValue());
return rStream;
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index 60c622208d53..8af4a67ea4f3 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -54,7 +54,7 @@
#include <algorithm>
#define STYLESTREAM "SfxStyleSheets"
-#define STYLESTREAM_VERSION USHORT(50)
+#define STYLESTREAM_VERSION sal_uInt16(50)
#ifdef DBG_UTIL
class DbgStyleSheetReferences
@@ -86,7 +86,7 @@ TYPEINIT1(SfxStyleSheetPoolHint, SfxHint);
SfxStyleSheetHintExtended::SfxStyleSheetHintExtended
(
- USHORT nAction, // SFX_STYLESHEET_... (s.o.)
+ sal_uInt16 nAction, // SFX_STYLESHEET_... (s.o.)
const String& rOldName
)
: SfxStyleSheetHint( nAction ),
@@ -94,7 +94,7 @@ SfxStyleSheetHintExtended::SfxStyleSheetHintExtended
{}
SfxStyleSheetHintExtended::SfxStyleSheetHintExtended
(
- USHORT nAction, // SFX_STYLESHEET_... (s.o.)
+ sal_uInt16 nAction, // SFX_STYLESHEET_... (s.o.)
const String& rOldName,
SfxStyleSheetBase& rStyleSheet // geh"ort weiterhin dem Aufrufer
)
@@ -106,7 +106,7 @@ SfxStyleSheetHintExtended::SfxStyleSheetHintExtended
SfxStyleSheetHint::SfxStyleSheetHint
(
- USHORT nAction, // SFX_STYLESHEET_... (s.o.)
+ sal_uInt16 nAction, // SFX_STYLESHEET_... (s.o.)
SfxStyleSheetBase& rStyleSheet // geh"ort weiterhin dem Aufrufer
)
: pStyleSh( &rStyleSheet ),
@@ -115,7 +115,7 @@ SfxStyleSheetHint::SfxStyleSheetHint
SfxStyleSheetHint::SfxStyleSheetHint
(
- USHORT nAction // SFX_STYLESHEET_... (s.o.)
+ sal_uInt16 nAction // SFX_STYLESHEET_... (s.o.)
)
: pStyleSh( NULL ),
nHint( nAction )
@@ -137,7 +137,7 @@ class SfxStyleSheetBasePool_Impl
// Konstruktoren
-SfxStyleSheetBase::SfxStyleSheetBase( const XubString& rName, SfxStyleSheetBasePool& r, SfxStyleFamily eFam, USHORT mask )
+SfxStyleSheetBase::SfxStyleSheetBase( const XubString& rName, SfxStyleSheetBasePool& r, SfxStyleFamily eFam, sal_uInt16 mask )
: rPool( r )
, nFamily( eFam )
, aName( rName )
@@ -146,7 +146,7 @@ SfxStyleSheetBase::SfxStyleSheetBase( const XubString& rName, SfxStyleSheetBaseP
, pSet( NULL )
, nMask(mask)
, nHelpId( 0 )
- , bMySet( FALSE )
+ , bMySet( sal_False )
{
#ifdef DBG_UTIL
aDbgStyleSheetReferences.mnStyles++;
@@ -206,7 +206,7 @@ SfxStyleSheetBase::~SfxStyleSheetBase()
}
}
-USHORT SfxStyleSheetBase::GetVersion() const
+sal_uInt16 SfxStyleSheetBase::GetVersion() const
{
return 0x0000;
}
@@ -218,24 +218,24 @@ const XubString& SfxStyleSheetBase::GetName() const
return aName;
}
-BOOL SfxStyleSheetBase::SetName( const XubString& rName )
+sal_Bool SfxStyleSheetBase::SetName( const XubString& rName )
{
if(rName.Len() == 0)
- return FALSE;
+ return sal_False;
if( aName != rName )
{
String aOldName = aName;
SfxStyleSheetBase *pOther = rPool.Find( rName, nFamily ) ;
if ( pOther && pOther != this )
- return FALSE;
+ return sal_False;
SfxStyleFamily eTmpFam=rPool.GetSearchFamily();
- USHORT nTmpMask=rPool.GetSearchMask();
+ sal_uInt16 nTmpMask=rPool.GetSearchMask();
rPool.SetSearchMask(nFamily);
if ( aName.Len() )
- rPool.ChangeParent( aName, rName, FALSE );
+ rPool.ChangeParent( aName, rName, sal_False );
if ( aFollow.Equals( aName ) )
aFollow = rName;
aName = rName;
@@ -243,7 +243,7 @@ BOOL SfxStyleSheetBase::SetName( const XubString& rName )
rPool.Broadcast( SfxStyleSheetHintExtended(
SFX_STYLESHEET_MODIFIED, aOldName, *this ) );
}
- return TRUE;
+ return sal_True;
}
rtl::OUString SfxStyleSheetBase::GetDisplayName() const
@@ -270,10 +270,10 @@ const XubString& SfxStyleSheetBase::GetParent() const
return aParent;
}
-BOOL SfxStyleSheetBase::SetParent( const XubString& rName )
+sal_Bool SfxStyleSheetBase::SetParent( const XubString& rName )
{
if ( rName == aName )
- return FALSE;
+ return sal_False;
if( aParent != rName )
{
@@ -281,20 +281,20 @@ BOOL SfxStyleSheetBase::SetParent( const XubString& rName )
if( rName.Len() && !pIter )
{
DBG_ERROR( "StyleSheet-Parent nicht gefunden" );
- return FALSE;
+ return sal_False;
}
// rekursive Verknuepfungen verhindern
if( aName.Len() )
while(pIter)
{
if(pIter->GetName() == aName && aName != rName)
- return FALSE;
+ return sal_False;
pIter = rPool.Find(pIter->GetParent(), nFamily);
}
aParent = rName;
}
rPool.Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_MODIFIED, *this ) );
- return TRUE;
+ return sal_True;
}
// Follow aendern
@@ -304,19 +304,19 @@ const XubString& SfxStyleSheetBase::GetFollow() const
return aFollow;
}
-BOOL SfxStyleSheetBase::SetFollow( const XubString& rName )
+sal_Bool SfxStyleSheetBase::SetFollow( const XubString& rName )
{
if( aFollow != rName )
{
if( !rPool.Find( rName, nFamily ) )
{
DBG_ERROR( "StyleSheet-Follow nicht gefunden" );
- return FALSE;
+ return sal_False;
}
aFollow = rName;
}
rPool.Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_MODIFIED, *this ) );
- return TRUE;
+ return sal_True;
}
// Itemset setzen. Die Dflt-Implementation legt ein neues Set an.
@@ -326,20 +326,20 @@ SfxItemSet& SfxStyleSheetBase::GetItemSet()
if( !pSet )
{
pSet = new SfxItemSet( rPool.GetPool() );
- bMySet = TRUE;
+ bMySet = sal_True;
}
return *pSet;
}
// Hilfe-Datei und -ID setzen und abfragen
-ULONG SfxStyleSheetBase::GetHelpId( String& rFile )
+sal_uLong SfxStyleSheetBase::GetHelpId( String& rFile )
{
rFile = aHelpFile;
return nHelpId;
}
-void SfxStyleSheetBase::SetHelpId( const String& rFile, ULONG nId )
+void SfxStyleSheetBase::SetHelpId( const String& rFile, sal_uLong nId )
{
aHelpFile = rFile;
nHelpId = nId;
@@ -347,30 +347,30 @@ void SfxStyleSheetBase::SetHelpId( const String& rFile, ULONG nId )
// Folgevorlage m"oglich? Default: Ja
-BOOL SfxStyleSheetBase::HasFollowSupport() const
+sal_Bool SfxStyleSheetBase::HasFollowSupport() const
{
- return TRUE;
+ return sal_True;
}
// Basisvorlage m"oglich? Default: Ja
-BOOL SfxStyleSheetBase::HasParentSupport() const
+sal_Bool SfxStyleSheetBase::HasParentSupport() const
{
- return TRUE;
+ return sal_True;
}
// Basisvorlage uf NULL setzen m"oglich? Default: Nein
-BOOL SfxStyleSheetBase::HasClearParentSupport() const
+sal_Bool SfxStyleSheetBase::HasClearParentSupport() const
{
- return FALSE;
+ return sal_False;
}
// Defaultmaessig sind alle StyleSheets Used
-BOOL SfxStyleSheetBase::IsUsed() const
+sal_Bool SfxStyleSheetBase::IsUsed() const
{
- return TRUE;
+ return sal_True;
}
// eingestellte Attribute ausgeben
@@ -417,30 +417,30 @@ SfxStyleFamily SfxStyleSheetIterator::GetSearchFamily() const
return nSearchFamily;
}
-inline BOOL SfxStyleSheetIterator::IsTrivialSearch()
+inline sal_Bool SfxStyleSheetIterator::IsTrivialSearch()
{
return nMask == 0xFFFF && GetSearchFamily() == SFX_STYLE_FAMILY_ALL;
}
-BOOL SfxStyleSheetIterator::DoesStyleMatch(SfxStyleSheetBase *pStyle)
+sal_Bool SfxStyleSheetIterator::DoesStyleMatch(SfxStyleSheetBase *pStyle)
{
return ((GetSearchFamily() == SFX_STYLE_FAMILY_ALL) ||
( pStyle->GetFamily() == GetSearchFamily() ))
&& (( pStyle->GetMask() & ( GetSearchMask() & ~SFXSTYLEBIT_USED )) ||
- ( bSearchUsed ? pStyle->IsUsed() : FALSE ) ||
+ ( bSearchUsed ? pStyle->IsUsed() : sal_False ) ||
GetSearchMask() == SFXSTYLEBIT_ALL );
}
SfxStyleSheetIterator::SfxStyleSheetIterator(SfxStyleSheetBasePool *pBase,
- SfxStyleFamily eFam, USHORT n)
+ SfxStyleFamily eFam, sal_uInt16 n)
{
pBasePool=pBase;
nSearchFamily=eFam;
- bSearchUsed=FALSE;
+ bSearchUsed=sal_False;
if((n != SFXSTYLEBIT_ALL ) && ((n & SFXSTYLEBIT_USED) == SFXSTYLEBIT_USED))
{
- bSearchUsed = TRUE;
+ bSearchUsed = sal_True;
n &= ~SFXSTYLEBIT_USED;
}
nMask=n;
@@ -451,13 +451,13 @@ SfxStyleSheetIterator::~SfxStyleSheetIterator()
}
-USHORT SfxStyleSheetIterator::Count()
+sal_uInt16 SfxStyleSheetIterator::Count()
{
- USHORT n = 0;
+ sal_uInt16 n = 0;
if( IsTrivialSearch())
- n = (USHORT) pBasePool->aStyles.size();
+ n = (sal_uInt16) pBasePool->aStyles.size();
else
- for(USHORT i=0; i<pBasePool->aStyles.size(); i++)
+ for(sal_uInt16 i=0; i<pBasePool->aStyles.size(); i++)
{
SfxStyleSheetBase* pStyle = pBasePool->aStyles[i].get();
if(DoesStyleMatch(pStyle))
@@ -466,13 +466,13 @@ USHORT SfxStyleSheetIterator::Count()
return n;
}
-SfxStyleSheetBase* SfxStyleSheetIterator::operator[](USHORT nIdx)
+SfxStyleSheetBase* SfxStyleSheetIterator::operator[](sal_uInt16 nIdx)
{
if( IsTrivialSearch())
return pBasePool->aStyles[nIdx].get();
- USHORT z = 0;
- for(USHORT n=0; n<pBasePool->aStyles.size(); n++)
+ sal_uInt16 z = 0;
+ for(sal_uInt16 n=0; n<pBasePool->aStyles.size(); n++)
{
SfxStyleSheetBase* pStyle = pBasePool->aStyles[n].get();
if( DoesStyleMatch(pStyle))
@@ -491,12 +491,12 @@ SfxStyleSheetBase* SfxStyleSheetIterator::operator[](USHORT nIdx)
SfxStyleSheetBase* SfxStyleSheetIterator::First()
{
- INT32 nIdx = -1;
+ sal_Int32 nIdx = -1;
if ( IsTrivialSearch() && pBasePool->aStyles.size() )
nIdx = 0;
else
- for( USHORT n = 0; n < pBasePool->aStyles.size(); n++ )
+ for( sal_uInt16 n = 0; n < pBasePool->aStyles.size(); n++ )
{
SfxStyleSheetBase* pStyle = pBasePool->aStyles[n].get();
@@ -509,7 +509,7 @@ SfxStyleSheetBase* SfxStyleSheetIterator::First()
if ( nIdx != -1 )
{
- nAktPosition = (USHORT)nIdx;
+ nAktPosition = (sal_uInt16)nIdx;
return pAktStyle = pBasePool->aStyles[nIdx].get();
}
return 0;
@@ -518,13 +518,13 @@ SfxStyleSheetBase* SfxStyleSheetIterator::First()
SfxStyleSheetBase* SfxStyleSheetIterator::Next()
{
- INT32 nIdx = -1;
+ sal_Int32 nIdx = -1;
if ( IsTrivialSearch() &&
- (USHORT)pBasePool->aStyles.size() > nAktPosition + 1 )
+ (sal_uInt16)pBasePool->aStyles.size() > nAktPosition + 1 )
nIdx = nAktPosition + 1;
else
- for( USHORT n = nAktPosition + 1; n < pBasePool->aStyles.size(); n++ )
+ for( sal_uInt16 n = nAktPosition + 1; n < pBasePool->aStyles.size(); n++ )
{
SfxStyleSheetBase* pStyle = pBasePool->aStyles[n].get();
@@ -537,7 +537,7 @@ SfxStyleSheetBase* SfxStyleSheetIterator::Next()
if ( nIdx != -1 )
{
- nAktPosition = (USHORT)nIdx;
+ nAktPosition = (sal_uInt16)nIdx;
return pAktStyle = pBasePool->aStyles[nIdx].get();
}
return 0;
@@ -546,11 +546,11 @@ SfxStyleSheetBase* SfxStyleSheetIterator::Next()
SfxStyleSheetBase* SfxStyleSheetIterator::Find(const XubString& rStr)
{
- for ( USHORT n = 0; n < pBasePool->aStyles.size(); n++ )
+ for ( sal_uInt16 n = 0; n < pBasePool->aStyles.size(); n++ )
{
SfxStyleSheetBase* pStyle = pBasePool->aStyles[n].get();
- // #98454# performance: in case of bSearchUsed==TRUE it may be
+ // #98454# performance: in case of bSearchUsed==sal_True it may be
// significant to first compare the name and only if it matches to call
// the style sheet IsUsed() method in DoesStyleMatch().
if ( pStyle->GetName().Equals( rStr ) && DoesStyleMatch( pStyle ) )
@@ -563,9 +563,9 @@ SfxStyleSheetBase* SfxStyleSheetIterator::Find(const XubString& rStr)
}
-USHORT SfxStyleSheetIterator::GetSearchMask() const
+sal_uInt16 SfxStyleSheetIterator::GetSearchMask() const
{
- USHORT mask = nMask;
+ sal_uInt16 mask = nMask;
if ( bSearchUsed )
mask |= SFXSTYLEBIT_USED;
@@ -637,7 +637,7 @@ SfxStyleSheetBasePool::~SfxStyleSheetBasePool()
delete pImp;
}
-BOOL SfxStyleSheetBasePool::SetParent(SfxStyleFamily eFam, const XubString& rStyle, const XubString& rParent)
+sal_Bool SfxStyleSheetBasePool::SetParent(SfxStyleFamily eFam, const XubString& rStyle, const XubString& rParent)
{
SfxStyleSheetIterator aIter(this,eFam,SFXSTYLEBIT_ALL);
SfxStyleSheetBase *pStyle =
@@ -646,16 +646,16 @@ BOOL SfxStyleSheetBasePool::SetParent(SfxStyleFamily eFam, const XubString& rSty
if(pStyle)
return pStyle->SetParent(rParent);
else
- return FALSE;
+ return sal_False;
}
-void SfxStyleSheetBasePool::SetSearchMask(SfxStyleFamily eFam, USHORT n)
+void SfxStyleSheetBasePool::SetSearchMask(SfxStyleFamily eFam, sal_uInt16 n)
{
nSearchFamily = eFam; nMask = n;
}
-USHORT SfxStyleSheetBasePool::GetSearchMask() const
+sal_uInt16 SfxStyleSheetBasePool::GetSearchMask() const
{
return nMask;
}
@@ -675,7 +675,7 @@ String SfxStyleSheetBasePool::GetStreamName()
SfxStyleSheetIterator* SfxStyleSheetBasePool::CreateIterator
(
SfxStyleFamily eFam,
- USHORT mask
+ sal_uInt16 mask
)
{
return new SfxStyleSheetIterator(this,eFam,mask);
@@ -686,7 +686,7 @@ SfxStyleSheetBase* SfxStyleSheetBasePool::Create
(
const XubString& rName,
SfxStyleFamily eFam,
- USHORT mask
+ sal_uInt16 mask
)
{
return new SfxStyleSheetBase( rName, *this, eFam, mask );
@@ -697,7 +697,7 @@ SfxStyleSheetBase* SfxStyleSheetBasePool::Create( const SfxStyleSheetBase& r )
return new SfxStyleSheetBase( r );
}
-SfxStyleSheetBase& SfxStyleSheetBasePool::Make( const XubString& rName, SfxStyleFamily eFam, USHORT mask, USHORT nPos)
+SfxStyleSheetBase& SfxStyleSheetBasePool::Make( const XubString& rName, SfxStyleFamily eFam, sal_uInt16 mask, sal_uInt16 nPos)
{
DBG_ASSERT( eFam != SFX_STYLE_FAMILY_ALL, "svl::SfxStyleSheetBasePool::Make(), FamilyAll is not a allowed Familie" );
@@ -765,19 +765,19 @@ SfxStyleSheetBasePool& SfxStyleSheetBasePool::operator+=( const SfxStyleSheetBas
//////////////////////////////// Suchen ////////////////////////////////////
-USHORT SfxStyleSheetBasePool::Count()
+sal_uInt16 SfxStyleSheetBasePool::Count()
{
return GetIterator_Impl().Count();
}
-SfxStyleSheetBase *SfxStyleSheetBasePool::operator[](USHORT nIdx)
+SfxStyleSheetBase *SfxStyleSheetBasePool::operator[](sal_uInt16 nIdx)
{
return GetIterator_Impl()[nIdx];
}
SfxStyleSheetBase* SfxStyleSheetBasePool::Find(const XubString& rName,
SfxStyleFamily eFam,
- USHORT mask)
+ sal_uInt16 mask)
{
SfxStyleSheetIterator aIter(this,eFam,mask);
return aIter.Find(rName);
@@ -866,9 +866,9 @@ void SfxStyleSheetBasePool::Clear()
void SfxStyleSheetBasePool::ChangeParent(const XubString& rOld,
const XubString& rNew,
- BOOL bVirtual)
+ sal_Bool bVirtual)
{
- const USHORT nTmpMask = GetSearchMask();
+ const sal_uInt16 nTmpMask = GetSearchMask();
SetSearchMask(GetSearchFamily(), 0xffff);
for( SfxStyleSheetBase* p = First(); p; p = Next() )
{
@@ -885,7 +885,7 @@ void SfxStyleSheetBasePool::ChangeParent(const XubString& rOld,
/////////////////////////// Laden/Speichern /////////////////////////////////
-void SfxStyleSheetBase::Load( SvStream&, USHORT )
+void SfxStyleSheetBase::Load( SvStream&, sal_uInt16 )
{
}
@@ -894,7 +894,7 @@ void SfxStyleSheetBase::Store( SvStream& )
}
-BOOL SfxStyleSheetBasePool::Load( SvStream& rStream )
+sal_Bool SfxStyleSheetBasePool::Load( SvStream& rStream )
{
// alte Version?
if ( !rPool.IsVer2_Impl() )
@@ -909,7 +909,7 @@ BOOL SfxStyleSheetBasePool::Load( SvStream& rStream )
{
SfxSingleRecordReader aHeaderRec( &rStream, SFX_STYLES_REC_HEADER );
if ( !aHeaderRec.IsValid() )
- return FALSE;
+ return sal_False;
aAppName = rPool.GetName();
rStream >> nCharSet;
@@ -920,15 +920,15 @@ BOOL SfxStyleSheetBasePool::Load( SvStream& rStream )
{
SfxMultiRecordReader aStylesRec( &rStream, SFX_STYLES_REC_STYLES );
if ( !aStylesRec.IsValid() )
- return FALSE;
+ return sal_False;
rtl_TextEncoding eEnc = GetSOLoadTextEncoding(
(rtl_TextEncoding)nCharSet,
- sal::static_int_cast< USHORT >(rStream.GetVersion()) );
+ sal::static_int_cast< sal_uInt16 >(rStream.GetVersion()) );
rtl_TextEncoding eOldEnc = rStream.GetStreamCharSet();
rStream.SetStreamCharSet( eEnc );
- USHORT nStyles;
+ sal_uInt16 nStyles;
for ( nStyles = 0; aStylesRec.GetContent(); nStyles++ )
{
// kann nicht mehr weiterlesen?
@@ -938,7 +938,7 @@ BOOL SfxStyleSheetBasePool::Load( SvStream& rStream )
// Globale Teile
XubString aName, aParent, aFollow;
String aHelpFile;
- USHORT nFamily, nStyleMask,nCount;
+ sal_uInt16 nFamily, nStyleMask,nCount;
sal_uInt32 nHelpId;
rStream.ReadByteString(aName, eEnc );
rStream.ReadByteString(aParent, eEnc );
@@ -952,7 +952,7 @@ BOOL SfxStyleSheetBasePool::Load( SvStream& rStream )
// Hier erst einmal Parent und Follow zwischenspeichern
rSheet.aParent = aParent;
rSheet.aFollow = aFollow;
- UINT32 nPos = rStream.Tell();
+ sal_uInt32 nPos = rStream.Tell();
rStream >> nCount;
if(nCount)
{
@@ -966,8 +966,8 @@ BOOL SfxStyleSheetBasePool::Load( SvStream& rStream )
//! rSet.Put( aTmpSet );
}
// Lokale Teile
- UINT32 nSize;
- USHORT nVer;
+ sal_uInt32 nSize;
+ sal_uInt16 nVer;
rStream >> nVer >> nSize;
nPos = rStream.Tell() + nSize;
rSheet.Load( rStream, nVer );
@@ -975,13 +975,13 @@ BOOL SfxStyleSheetBasePool::Load( SvStream& rStream )
}
// #72939# only loop through the styles that were really inserted
- ULONG n = aStyles.size();
+ sal_uLong n = aStyles.size();
//! delete pTmpPool;
// Jetzt Parent und Follow setzen. Alle Sheets sind geladen.
// Mit Setxxx() noch einmal den String eintragen, da diese
// virtuellen Methoden evtl. ueberlagert sind.
- for ( ULONG i = 0; i < n; i++ )
+ for ( sal_uLong i = 0; i < n; i++ )
{
SfxStyleSheetBase* p = aStyles[ i ].get();
XubString aText = p->aParent;
@@ -996,13 +996,13 @@ BOOL SfxStyleSheetBasePool::Load( SvStream& rStream )
}
// alles klar?
- return BOOL( rStream.GetError() == SVSTREAM_OK );
+ return sal_Bool( rStream.GetError() == SVSTREAM_OK );
}
-BOOL SfxStyleSheetBasePool::Load1_Impl( SvStream& rStream )
+sal_Bool SfxStyleSheetBasePool::Load1_Impl( SvStream& rStream )
{
aAppName = rPool.GetName();
- USHORT nVersion;
+ sal_uInt16 nVersion;
short nCharSet;
rStream >> nVersion;
@@ -1013,13 +1013,13 @@ BOOL SfxStyleSheetBasePool::Load1_Impl( SvStream& rStream )
rtl_TextEncoding eEnc = GetSOLoadTextEncoding(
(rtl_TextEncoding)nCharSet,
- sal::static_int_cast< USHORT >(rStream.GetVersion()) );
+ sal::static_int_cast< sal_uInt16 >(rStream.GetVersion()) );
rtl_TextEncoding eOldEnc = rStream.GetStreamCharSet();
rStream.SetStreamCharSet( eEnc );
- USHORT nStyles;
+ sal_uInt16 nStyles;
rStream >> nStyles;
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < nStyles; i++ )
{
// kann nicht mehr weiterlesen?
@@ -1032,7 +1032,7 @@ BOOL SfxStyleSheetBasePool::Load1_Impl( SvStream& rStream )
// Globale Teile
XubString aName, aParent, aFollow;
String aHelpFile;
- USHORT nFamily, nStyleMask,nCount;
+ sal_uInt16 nFamily, nStyleMask,nCount;
sal_uInt32 nHelpId;
rStream.ReadByteString(aName, eEnc );
rStream.ReadByteString(aParent, eEnc );
@@ -1041,7 +1041,7 @@ BOOL SfxStyleSheetBasePool::Load1_Impl( SvStream& rStream )
SfxPoolItem::readByteString(rStream, aHelpFile);
if(nVersion!=STYLESTREAM_VERSION)
{
- USHORT nTmpHelpId;
+ sal_uInt16 nTmpHelpId;
rStream >> nTmpHelpId;
nHelpId=nTmpHelpId;
}
@@ -1053,7 +1053,7 @@ BOOL SfxStyleSheetBasePool::Load1_Impl( SvStream& rStream )
// Hier erst einmal Parent und Follow zwischenspeichern
rSheet.aParent = aParent;
rSheet.aFollow = aFollow;
- UINT32 nPos = rStream.Tell();
+ sal_uInt32 nPos = rStream.Tell();
rStream >> nCount;
if(nCount) {
rStream.Seek( nPos );
@@ -1066,8 +1066,8 @@ BOOL SfxStyleSheetBasePool::Load1_Impl( SvStream& rStream )
//! rSet.Put( aTmpSet );
}
// Lokale Teile
- UINT32 nSize;
- USHORT nVer;
+ sal_uInt32 nSize;
+ sal_uInt16 nVer;
rStream >> nVer >> nSize;
nPos = rStream.Tell() + nSize;
rSheet.Load( rStream, nVer );
@@ -1091,16 +1091,16 @@ BOOL SfxStyleSheetBasePool::Load1_Impl( SvStream& rStream )
rStream.SetStreamCharSet( eOldEnc );
- return BOOL( rStream.GetError() == SVSTREAM_OK );
+ return sal_Bool( rStream.GetError() == SVSTREAM_OK );
}
-BOOL SfxStyleSheetBasePool::Store( SvStream& rStream, BOOL bUsed )
+sal_Bool SfxStyleSheetBasePool::Store( SvStream& rStream, sal_Bool bUsed )
{
// den ganzen StyleSheet-Pool in einen Mini-Record
SfxMiniRecordWriter aPoolRec( &rStream, SFX_STYLES_REC );
// Erst einmal die Dummies rauszaehlen; die werden nicht gespeichert
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
for( SfxStyleSheetBase* p = First(); p; p = Next() )
{
if(!bUsed || p->IsUsed())
@@ -1111,7 +1111,7 @@ BOOL SfxStyleSheetBasePool::Store( SvStream& rStream, BOOL bUsed )
rtl_TextEncoding eEnc
= ::GetSOStoreTextEncoding(
rStream.GetStreamCharSet(),
- sal::static_int_cast< USHORT >(rStream.GetVersion()) );
+ sal::static_int_cast< sal_uInt16 >(rStream.GetVersion()) );
rtl_TextEncoding eOldEnc = rStream.GetStreamCharSet();
rStream.SetStreamCharSet( eEnc );
@@ -1138,7 +1138,7 @@ BOOL SfxStyleSheetBasePool::Store( SvStream& rStream, BOOL bUsed )
{
if(!bUsed || p->IsUsed())
{
- USHORT nFamily = (USHORT)p->GetFamily();
+ sal_uInt16 nFamily = (sal_uInt16)p->GetFamily();
String* pName = new String( p->GetName() );
ByteString* pConvName = new ByteString( *pName, eEnc );
@@ -1150,7 +1150,7 @@ BOOL SfxStyleSheetBasePool::Store( SvStream& rStream, BOOL bUsed )
pConvName->SetChar(
1, sal::static_int_cast< char >(0xff & nFamily) );
- USHORT nInsPos, nAdd = aSortConvNames.Count();
+ sal_uInt16 nInsPos, nAdd = aSortConvNames.Count();
while( !aSortConvNames.Insert( pConvName, nInsPos ) )
(pConvName->Append( '_' )).Append(
ByteString::CreateFromInt32( nAdd++ ));
@@ -1161,9 +1161,9 @@ BOOL SfxStyleSheetBasePool::Store( SvStream& rStream, BOOL bUsed )
// now we have the list of the names, sorted by convertede names
// But now we need the sorted list of orignames.
{
- USHORT nInsPos, nEnd = aOrigNames.Count();
+ sal_uInt16 nInsPos, nEnd = aOrigNames.Count();
const ByteStringPtr* ppB = aSortConvNames.GetData();
- for( USHORT n = 0; n < nEnd; ++n, ++ppB )
+ for( sal_uInt16 n = 0; n < nEnd; ++n, ++ppB )
{
String* p = aOrigNames.GetObject( n );
aSortOrigNames.Insert( p, nInsPos );
@@ -1175,7 +1175,7 @@ BOOL SfxStyleSheetBasePool::Store( SvStream& rStream, BOOL bUsed )
ByteString sEmpty;
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
String sNm;
SfxMultiVarRecordWriter aStylesRec( &rStream, SFX_STYLES_REC_STYLES, 0 );
for( SfxStyleSheetBase* p = First(); p; p = Next() )
@@ -1187,7 +1187,7 @@ BOOL SfxStyleSheetBasePool::Store( SvStream& rStream, BOOL bUsed )
// Globale Teile speichern
String aHelpFile;
sal_uInt32 nHelpId = p->GetHelpId( aHelpFile );
- USHORT nFamily = sal::static_int_cast< USHORT >(p->GetFamily());
+ sal_uInt16 nFamily = sal::static_int_cast< sal_uInt16 >(p->GetFamily());
String sFamily( (sal_Unicode)nFamily );
(sNm = sFamily) += p->GetName();
@@ -1214,18 +1214,18 @@ BOOL SfxStyleSheetBasePool::Store( SvStream& rStream, BOOL bUsed )
if(p->pSet)
p->pSet->Store( rStream );
else
- rStream << (USHORT)0;
+ rStream << (sal_uInt16)0;
// Lokale Teile speichern
// Vor dem lokalen Teil wird die Laenge der lokalen Daten
- // als UINT32 sowie die Versionsnummer gespeichert.
- rStream << (USHORT) p->GetVersion();
- ULONG nPos1 = rStream.Tell();
- rStream << (UINT32) 0;
+ // als sal_uInt32 sowie die Versionsnummer gespeichert.
+ rStream << (sal_uInt16) p->GetVersion();
+ sal_uLong nPos1 = rStream.Tell();
+ rStream << (sal_uInt32) 0;
p->Store( rStream );
- ULONG nPos2 = rStream.Tell();
+ sal_uLong nPos2 = rStream.Tell();
rStream.Seek( nPos1 );
- rStream << (UINT32) ( nPos2 - nPos1 - sizeof( UINT32 ) );
+ rStream << (sal_uInt32) ( nPos2 - nPos1 - sizeof( sal_uInt32 ) );
rStream.Seek( nPos2 );
if( rStream.GetError() != SVSTREAM_OK )
break;
@@ -1235,7 +1235,7 @@ BOOL SfxStyleSheetBasePool::Store( SvStream& rStream, BOOL bUsed )
rStream.SetStreamCharSet( eOldEnc );
- return BOOL( rStream.GetError() == SVSTREAM_OK );
+ return sal_Bool( rStream.GetError() == SVSTREAM_OK );
}
SfxItemPool& SfxStyleSheetBasePool::GetPool()
@@ -1253,7 +1253,7 @@ const SfxItemPool& SfxStyleSheetBasePool::GetPool() const
SfxStyleSheet::SfxStyleSheet(const XubString &rName,
const SfxStyleSheetBasePool& r_Pool,
SfxStyleFamily eFam,
- USHORT mask ):
+ sal_uInt16 mask ):
SfxStyleSheetBase(rName, const_cast< SfxStyleSheetBasePool& >( r_Pool ), eFam, mask)
{}
@@ -1273,10 +1273,10 @@ SfxStyleSheet::~SfxStyleSheet()
}
-BOOL SfxStyleSheet::SetParent( const XubString& rName )
+sal_Bool SfxStyleSheet::SetParent( const XubString& rName )
{
if(aParent == rName)
- return TRUE;
+ return sal_True;
const XubString aOldParent(aParent);
if(SfxStyleSheetBase::SetParent(rName)) {
// aus der Benachrichtigungskette des alten
@@ -1293,9 +1293,9 @@ BOOL SfxStyleSheet::SetParent( const XubString& rName )
if(pParent)
StartListening(*pParent);
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// alle Zuhoerer benachtichtigen
@@ -1315,7 +1315,7 @@ SfxStyleSheetPool::SfxStyleSheetPool( SfxItemPool const& rSet)
/////////////////////////////////// Factory ////////////////////////////////
SfxStyleSheetBase* SfxStyleSheetPool::Create( const XubString& rName,
- SfxStyleFamily eFam, USHORT mask )
+ SfxStyleFamily eFam, sal_uInt16 mask )
{
return new SfxStyleSheet( rName, *this, eFam, mask );
}
@@ -1325,9 +1325,9 @@ SfxStyleSheetBase* SfxStyleSheetPool::Create( const SfxStyleSheet& r )
return new SfxStyleSheet( r );
}
/*
-BOOL SfxStyleSheetPool::CopyTo(SfxStyleSheetPool &, const String &)
+sal_Bool SfxStyleSheetPool::CopyTo(SfxStyleSheetPool &, const String &)
{
- return FALSE;
+ return sal_False;
}
*/
@@ -1335,7 +1335,7 @@ BOOL SfxStyleSheetPool::CopyTo(SfxStyleSheetPool &, const String &)
// class SfxUnoStyleSheet
// --------------------------------------------------------------------
-SfxUnoStyleSheet::SfxUnoStyleSheet( const UniString& _rName, const SfxStyleSheetBasePool& _rPool, SfxStyleFamily _eFamily, USHORT _nMaske )
+SfxUnoStyleSheet::SfxUnoStyleSheet( const UniString& _rName, const SfxStyleSheetBasePool& _rPool, SfxStyleFamily _eFamily, sal_uInt16 _nMaske )
: ::cppu::ImplInheritanceHelper2< SfxStyleSheet, ::com::sun::star::style::XStyle, ::com::sun::star::lang::XUnoTunnel >( _rName, _rPool, _eFamily, _nMaske )
{
}
diff --git a/svl/source/items/stylepool.cxx b/svl/source/items/stylepool.cxx
index 6d8799967650..8ad8346af075 100644
--- a/svl/source/items/stylepool.cxx
+++ b/svl/source/items/stylepool.cxx
@@ -405,13 +405,13 @@ public:
: maRoot(),
mnCount(0),
mpIgnorableItems( pIgnorableItems != 0
- ? pIgnorableItems->Clone( FALSE )
+ ? pIgnorableItems->Clone( sal_False )
: 0 )
{
DBG_ASSERT( !pIgnorableItems || !pIgnorableItems->Count(),
"<StylePoolImpl::StylePoolImpl(..)> - misusage: item set for ignorable item should be empty. Please correct usage." );
DBG_ASSERT( !mpIgnorableItems || !mpIgnorableItems->Count(),
- "<StylePoolImpl::StylePoolImpl(..)> - <SfxItemSet::Clone( FALSE )> does not work as excepted - <mpIgnorableItems> is not empty. Please inform OD." );
+ "<StylePoolImpl::StylePoolImpl(..)> - <SfxItemSet::Clone( sal_False )> does not work as excepted - <mpIgnorableItems> is not empty. Please inform OD." );
}
~StylePoolImpl()
diff --git a/svl/source/items/szitem.cxx b/svl/source/items/szitem.cxx
index 6c5ab66b8422..161468b1009b 100644
--- a/svl/source/items/szitem.cxx
+++ b/svl/source/items/szitem.cxx
@@ -54,7 +54,7 @@ SfxSizeItem::SfxSizeItem()
// -----------------------------------------------------------------------
-SfxSizeItem::SfxSizeItem( USHORT nW, const Size& rVal ) :
+SfxSizeItem::SfxSizeItem( sal_uInt16 nW, const Size& rVal ) :
SfxPoolItem( nW ),
aVal( rVal )
{
@@ -63,7 +63,7 @@ SfxSizeItem::SfxSizeItem( USHORT nW, const Size& rVal ) :
// -----------------------------------------------------------------------
-SfxSizeItem::SfxSizeItem( USHORT nW, SvStream &rStream ) :
+SfxSizeItem::SfxSizeItem( sal_uInt16 nW, SvStream &rStream ) :
SfxPoolItem( nW )
{
DBG_CTOR(SfxSizeItem, 0);
@@ -117,7 +117,7 @@ SfxPoolItem* SfxSizeItem::Clone(SfxItemPool *) const
// -----------------------------------------------------------------------
-SfxPoolItem* SfxSizeItem::Create(SvStream &rStream, USHORT ) const
+SfxPoolItem* SfxSizeItem::Create(SvStream &rStream, sal_uInt16 ) const
{
DBG_CHKTHIS(SfxSizeItem, 0);
Size aStr;
@@ -127,7 +127,7 @@ SfxPoolItem* SfxSizeItem::Create(SvStream &rStream, USHORT ) const
// -----------------------------------------------------------------------
-SvStream& SfxSizeItem::Store(SvStream &rStream, USHORT ) const
+SvStream& SfxSizeItem::Store(SvStream &rStream, sal_uInt16 ) const
{
DBG_CHKTHIS(SfxSizeItem, 0);
rStream << aVal;
@@ -135,8 +135,8 @@ SvStream& SfxSizeItem::Store(SvStream &rStream, USHORT ) const
}
// -----------------------------------------------------------------------
-BOOL SfxSizeItem::QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId ) const
+sal_Bool SfxSizeItem::QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId ) const
{
sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
@@ -159,20 +159,20 @@ BOOL SfxSizeItem::QueryValue( com::sun::star::uno::Any& rVal,
rVal <<= aTmp.getWidth(); break;
case MID_HEIGHT:
rVal <<= aTmp.getHeight(); break;
- default: DBG_ERROR("Wrong MemberId!"); return FALSE;
+ default: DBG_ERROR("Wrong MemberId!"); return sal_False;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL SfxSizeItem::PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId )
+sal_Bool SfxSizeItem::PutValue( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId )
{
sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
com::sun::star::awt::Size aValue;
sal_Int32 nVal = 0;
if ( !nMemberId )
diff --git a/svl/source/items/visitem.cxx b/svl/source/items/visitem.cxx
index 94fdf167496e..81726f017f3a 100644
--- a/svl/source/items/visitem.cxx
+++ b/svl/source/items/visitem.cxx
@@ -43,7 +43,7 @@ DBG_NAME(SfxVisibilityItem)
TYPEINIT1_AUTOFACTORY(SfxVisibilityItem, SfxPoolItem);
//============================================================================
-SfxVisibilityItem::SfxVisibilityItem(USHORT which, SvStream & rStream):
+SfxVisibilityItem::SfxVisibilityItem(sal_uInt16 which, SvStream & rStream):
SfxPoolItem(which)
{
DBG_CTOR(SfxVisibilityItem, 0);
@@ -85,26 +85,26 @@ SfxItemPresentation SfxVisibilityItem::GetPresentation(SfxItemPresentation,
//============================================================================
// virtual
-BOOL SfxVisibilityItem::QueryValue(com::sun::star::uno::Any& rVal,BYTE) const
+sal_Bool SfxVisibilityItem::QueryValue(com::sun::star::uno::Any& rVal,sal_uInt8) const
{
rVal <<= m_nValue;
- return TRUE;
+ return sal_True;
}
//============================================================================
// virtual
-BOOL SfxVisibilityItem::PutValue(const com::sun::star::uno::Any& rVal,BYTE)
+sal_Bool SfxVisibilityItem::PutValue(const com::sun::star::uno::Any& rVal,sal_uInt8)
{
if (rVal >>= m_nValue)
- return TRUE;
+ return sal_True;
DBG_ERROR( "SfxInt16Item::PutValue - Wrong type!" );
- return FALSE;
+ return sal_False;
}
//============================================================================
// virtual
-SfxPoolItem * SfxVisibilityItem::Create(SvStream & rStream, USHORT) const
+SfxPoolItem * SfxVisibilityItem::Create(SvStream & rStream, sal_uInt16) const
{
DBG_CHKTHIS(SfxVisibilityItem, 0);
return new SfxVisibilityItem(Which(), rStream);
@@ -112,7 +112,7 @@ SfxPoolItem * SfxVisibilityItem::Create(SvStream & rStream, USHORT) const
//============================================================================
// virtual
-SvStream & SfxVisibilityItem::Store(SvStream & rStream, USHORT) const
+SvStream & SfxVisibilityItem::Store(SvStream & rStream, sal_uInt16) const
{
DBG_CHKTHIS(SfxVisibilityItem, 0);
rStream << m_nValue.bVisible;
@@ -129,17 +129,17 @@ SfxPoolItem * SfxVisibilityItem::Clone(SfxItemPool *) const
//============================================================================
// virtual
-USHORT SfxVisibilityItem::GetValueCount() const
+sal_uInt16 SfxVisibilityItem::GetValueCount() const
{
return 2;
}
//============================================================================
// virtual
-UniString SfxVisibilityItem::GetValueTextByVal(BOOL bTheValue) const
+UniString SfxVisibilityItem::GetValueTextByVal(sal_Bool bTheValue) const
{
return
bTheValue ?
- UniString::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("TRUE")) :
- UniString::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("FALSE"));
+ UniString::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("sal_True")) :
+ UniString::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("sal_False"));
}
diff --git a/svl/source/items/whiter.cxx b/svl/source/items/whiter.cxx
index b50d9bc32a79..17e0e18115bb 100644
--- a/svl/source/items/whiter.cxx
+++ b/svl/source/items/whiter.cxx
@@ -36,7 +36,7 @@ DBG_NAME(SfxWhichIter)
// -----------------------------------------------------------------------
-SfxWhichIter::SfxWhichIter( const SfxItemSet& rSet, USHORT nFromWh, USHORT nToWh ):
+SfxWhichIter::SfxWhichIter( const SfxItemSet& rSet, sal_uInt16 nFromWh, sal_uInt16 nToWh ):
pRanges(rSet.GetRanges()),
pStart(rSet.GetRanges()),
nOfst(0), nFrom(nFromWh), nTo(nToWh)
@@ -55,19 +55,19 @@ SfxWhichIter::~SfxWhichIter()
// -----------------------------------------------------------------------
-USHORT SfxWhichIter::NextWhich()
+sal_uInt16 SfxWhichIter::NextWhich()
{
DBG_CHKTHIS(SfxWhichIter, 0);
while ( 0 != *pRanges )
{
- const USHORT nLastWhich = *pRanges + nOfst;
+ const sal_uInt16 nLastWhich = *pRanges + nOfst;
++nOfst;
if (*(pRanges+1) == nLastWhich)
{
pRanges += 2;
nOfst = 0;
}
- USHORT nWhich = *pRanges + nOfst;
+ sal_uInt16 nWhich = *pRanges + nOfst;
if ( 0 == nWhich || ( nWhich >= nFrom && nWhich <= nTo ) )
return nWhich;
}
@@ -76,7 +76,7 @@ USHORT SfxWhichIter::NextWhich()
// -----------------------------------------------------------------------
-USHORT SfxWhichIter::PrevWhich()
+sal_uInt16 SfxWhichIter::PrevWhich()
{
DBG_CHKTHIS(SfxWhichIter, 0);
while ( pRanges != pStart || 0 != nOfst )
@@ -87,7 +87,7 @@ USHORT SfxWhichIter::PrevWhich()
pRanges -= 2;
nOfst = *(pRanges+1) - (*pRanges);
}
- USHORT nWhich = *pRanges + nOfst;
+ sal_uInt16 nWhich = *pRanges + nOfst;
if ( nWhich >= nFrom && nWhich <= nTo )
return nWhich;
}
@@ -96,7 +96,7 @@ USHORT SfxWhichIter::PrevWhich()
// -----------------------------------------------------------------------
-USHORT SfxWhichIter::FirstWhich()
+sal_uInt16 SfxWhichIter::FirstWhich()
{
DBG_CHKTHIS(SfxWhichIter, 0);
pRanges = pStart;
@@ -108,13 +108,13 @@ USHORT SfxWhichIter::FirstWhich()
// -----------------------------------------------------------------------
-USHORT SfxWhichIter::LastWhich()
+sal_uInt16 SfxWhichIter::LastWhich()
{
DBG_CHKTHIS(SfxWhichIter, 0);
while(*pRanges)
++pRanges;
nOfst = 0;
- USHORT nWhich = *(pRanges-1);
+ sal_uInt16 nWhich = *(pRanges-1);
if ( nWhich >= nFrom && nWhich <= nTo )
return nWhich;
return PrevWhich();
diff --git a/svl/source/memtools/svarray.cxx b/svl/source/memtools/svarray.cxx
index 622533dceae2..f8b190d0cb4c 100644
--- a/svl/source/memtools/svarray.cxx
+++ b/svl/source/memtools/svarray.cxx
@@ -62,17 +62,17 @@
SV_IMPL_VARARR(SvPtrarr,VoidPtr)
-USHORT SvPtrarr::GetPos( const VoidPtr& aElement ) const
-{ USHORT n;
+sal_uInt16 SvPtrarr::GetPos( const VoidPtr& aElement ) const
+{ sal_uInt16 n;
for( n=0; n < nA && *(GetData()+n) != aElement; ) n++;
return ( n >= nA ? USHRT_MAX : n );
}
-SV_IMPL_VARARR( SvULongs, ULONG )
-SV_IMPL_VARARR( SvUShorts, USHORT )
+SV_IMPL_VARARR( SvULongs, sal_uLong )
+SV_IMPL_VARARR( SvUShorts, sal_uInt16 )
SV_IMPL_VARARR( SvLongs, long)
-SV_IMPL_VARARR_SORT( SvULongsSort, ULONG )
+SV_IMPL_VARARR_SORT( SvULongsSort, sal_uLong )
SV_IMPL_VARARR_SORT( SvLongsSort, long )
SV_IMPL_PTRARR( SvStrings, StringPtr )
@@ -91,19 +91,19 @@ SV_IMPL_OP_PTRARR_SORT( SvByteStringsSortDtor, ByteStringPtr )
// Array mit anderer Seek-Methode!
_SV_IMPL_SORTAR_ALG( SvStringsISort, StringPtr )
-void SvStringsISort::DeleteAndDestroy( USHORT nP, USHORT nL )
+void SvStringsISort::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL )
{
if( nL )
{
DBG_ASSERT( nP < nA && nP + nL <= nA, "ERR_VAR_DEL" );
- for( USHORT n=nP; n < nP + nL; n++ )
+ for( sal_uInt16 n=nP; n < nP + nL; n++ )
delete *((StringPtr*)pData+n);
SvPtrarr::Remove( nP, nL );
}
}
-BOOL SvStringsISort::Seek_Entry( const StringPtr aE, USHORT* pP ) const
+sal_Bool SvStringsISort::Seek_Entry( const StringPtr aE, sal_uInt16* pP ) const
{
- register USHORT nO = SvStringsISort_SAR::Count(),
+ register sal_uInt16 nO = SvStringsISort_SAR::Count(),
nM,
nU = 0;
if( nO > 0 )
@@ -117,40 +117,40 @@ BOOL SvStringsISort::Seek_Entry( const StringPtr aE, USHORT* pP ) const
if( COMPARE_EQUAL == eCmp )
{
if( pP ) *pP = nM;
- return TRUE;
+ return sal_True;
}
else if( COMPARE_LESS == eCmp )
nU = nM + 1;
else if( nM == 0 )
{
if( pP ) *pP = nU;
- return FALSE;
+ return sal_False;
}
else
nO = nM - 1;
}
}
if( pP ) *pP = nU;
- return FALSE;
+ return sal_False;
}
// ---------------- strings -------------------------------------
// Array mit anderer Seek-Methode!
_SV_IMPL_SORTAR_ALG( SvStringsISortDtor, StringPtr )
-void SvStringsISortDtor::DeleteAndDestroy( USHORT nP, USHORT nL )
+void SvStringsISortDtor::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL )
{
if( nL )
{
DBG_ASSERT( nP < nA && nP + nL <= nA, "ERR_VAR_DEL" );
- for( USHORT n=nP; n < nP + nL; n++ )
+ for( sal_uInt16 n=nP; n < nP + nL; n++ )
delete *((StringPtr*)pData+n);
SvPtrarr::Remove( nP, nL );
}
}
-BOOL SvStringsISortDtor::Seek_Entry( const StringPtr aE, USHORT* pP ) const
+sal_Bool SvStringsISortDtor::Seek_Entry( const StringPtr aE, sal_uInt16* pP ) const
{
- register USHORT nO = SvStringsISortDtor_SAR::Count(),
+ register sal_uInt16 nO = SvStringsISortDtor_SAR::Count(),
nM,
nU = 0;
if( nO > 0 )
@@ -164,29 +164,29 @@ BOOL SvStringsISortDtor::Seek_Entry( const StringPtr aE, USHORT* pP ) const
if( COMPARE_EQUAL == eCmp )
{
if( pP ) *pP = nM;
- return TRUE;
+ return sal_True;
}
else if( COMPARE_LESS == eCmp )
nU = nM + 1;
else if( nM == 0 )
{
if( pP ) *pP = nU;
- return FALSE;
+ return sal_False;
}
else
nO = nM - 1;
}
}
if( pP ) *pP = nU;
- return FALSE;
+ return sal_False;
}
// ---------------- Ushorts -------------------------------------
/* SortArray fuer UShorts */
-BOOL SvUShortsSort::Seek_Entry( const USHORT aE, USHORT* pP ) const
+sal_Bool SvUShortsSort::Seek_Entry( const sal_uInt16 aE, sal_uInt16* pP ) const
{
- register USHORT nO = SvUShorts::Count(),
+ register sal_uInt16 nO = SvUShorts::Count(),
nM,
nU = 0;
if( nO > 0 )
@@ -198,29 +198,29 @@ BOOL SvUShortsSort::Seek_Entry( const USHORT aE, USHORT* pP ) const
if( *(pData + nM) == aE )
{
if( pP ) *pP = nM;
- return TRUE;
+ return sal_True;
}
else if( *(pData + nM) < aE )
nU = nM + 1;
else if( nM == 0 )
{
if( pP ) *pP = nU;
- return FALSE;
+ return sal_False;
}
else
nO = nM - 1;
}
}
if( pP ) *pP = nU;
- return FALSE;
+ return sal_False;
}
-void SvUShortsSort::Insert( const SvUShortsSort * pI, USHORT nS, USHORT nE )
+void SvUShortsSort::Insert( const SvUShortsSort * pI, sal_uInt16 nS, sal_uInt16 nE )
{
if( USHRT_MAX == nE )
nE = pI->Count();
- USHORT nP;
- const USHORT * pIArr = pI->GetData();
+ sal_uInt16 nP;
+ const sal_uInt16 * pIArr = pI->GetData();
for( ; nS < nE; ++nS )
{
if( ! Seek_Entry( *(pIArr+nS), &nP) )
@@ -233,42 +233,42 @@ void SvUShortsSort::Insert( const SvUShortsSort * pI, USHORT nS, USHORT nE )
}
}
-BOOL SvUShortsSort::Insert( const USHORT aE )
+sal_Bool SvUShortsSort::Insert( const sal_uInt16 aE )
{
- USHORT nP;
- BOOL bExist = Seek_Entry( aE, &nP );
+ sal_uInt16 nP;
+ sal_Bool bExist = Seek_Entry( aE, &nP );
if( !bExist )
SvUShorts::Insert( aE, nP );
return !bExist;
}
-BOOL SvUShortsSort::Insert( const USHORT aE, USHORT& rP )
+sal_Bool SvUShortsSort::Insert( const sal_uInt16 aE, sal_uInt16& rP )
{
- BOOL bExist = Seek_Entry( aE, &rP );
+ sal_Bool bExist = Seek_Entry( aE, &rP );
if( !bExist )
SvUShorts::Insert( aE, rP );
return !bExist;
}
-void SvUShortsSort::Insert( const USHORT* pE, USHORT nL)
+void SvUShortsSort::Insert( const sal_uInt16* pE, sal_uInt16 nL)
{
- USHORT nP;
- for( USHORT n = 0; n < nL; ++n )
+ sal_uInt16 nP;
+ for( sal_uInt16 n = 0; n < nL; ++n )
if( ! Seek_Entry( *(pE+n), &nP ))
SvUShorts::Insert( *(pE+n), nP );
}
// remove ab Pos
-void SvUShortsSort::RemoveAt( const USHORT nP, USHORT nL )
+void SvUShortsSort::RemoveAt( const sal_uInt16 nP, sal_uInt16 nL )
{
if( nL )
SvUShorts::Remove( nP, nL);
}
// remove ab dem Eintrag
-void SvUShortsSort::Remove( const USHORT aE, USHORT nL )
+void SvUShortsSort::Remove( const sal_uInt16 aE, sal_uInt16 nL )
{
- USHORT nP;
+ sal_uInt16 nP;
if( nL && Seek_Entry( aE, &nP ) )
SvUShorts::Remove( nP, nL);
}
@@ -277,19 +277,19 @@ void SvUShortsSort::Remove( const USHORT aE, USHORT nL )
// Array mit anderer Seek-Methode!
_SV_IMPL_SORTAR_ALG( SvByteStringsISort, ByteStringPtr )
-void SvByteStringsISort::DeleteAndDestroy( USHORT nP, USHORT nL )
+void SvByteStringsISort::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL )
{
if( nL )
{
DBG_ASSERT( nP < nA && nP + nL <= nA, "ERR_VAR_DEL" );
- for( USHORT n=nP; n < nP + nL; n++ )
+ for( sal_uInt16 n=nP; n < nP + nL; n++ )
delete *((ByteStringPtr*)pData+n);
SvPtrarr::Remove( nP, nL );
}
}
-BOOL SvByteStringsISort::Seek_Entry( const ByteStringPtr aE, USHORT* pP ) const
+sal_Bool SvByteStringsISort::Seek_Entry( const ByteStringPtr aE, sal_uInt16* pP ) const
{
- register USHORT nO = SvByteStringsISort_SAR::Count(),
+ register sal_uInt16 nO = SvByteStringsISort_SAR::Count(),
nM,
nU = 0;
if( nO > 0 )
@@ -303,39 +303,39 @@ BOOL SvByteStringsISort::Seek_Entry( const ByteStringPtr aE, USHORT* pP ) const
if( COMPARE_EQUAL == eCmp )
{
if( pP ) *pP = nM;
- return TRUE;
+ return sal_True;
}
else if( COMPARE_LESS == eCmp )
nU = nM + 1;
else if( nM == 0 )
{
if( pP ) *pP = nU;
- return FALSE;
+ return sal_False;
}
else
nO = nM - 1;
}
}
if( pP ) *pP = nU;
- return FALSE;
+ return sal_False;
}
// Array mit anderer Seek-Methode!
_SV_IMPL_SORTAR_ALG( SvByteStringsISortDtor, ByteStringPtr )
-void SvByteStringsISortDtor::DeleteAndDestroy( USHORT nP, USHORT nL )
+void SvByteStringsISortDtor::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL )
{
if( nL )
{
DBG_ASSERT( nP < nA && nP + nL <= nA, "ERR_VAR_DEL" );
- for( USHORT n=nP; n < nP + nL; n++ )
+ for( sal_uInt16 n=nP; n < nP + nL; n++ )
delete *((ByteStringPtr*)pData+n);
SvPtrarr::Remove( nP, nL );
}
}
-BOOL SvByteStringsISortDtor::Seek_Entry( const ByteStringPtr aE, USHORT* pP ) const
+sal_Bool SvByteStringsISortDtor::Seek_Entry( const ByteStringPtr aE, sal_uInt16* pP ) const
{
- register USHORT nO = SvByteStringsISortDtor_SAR::Count(),
+ register sal_uInt16 nO = SvByteStringsISortDtor_SAR::Count(),
nM,
nU = 0;
if( nO > 0 )
@@ -349,20 +349,20 @@ BOOL SvByteStringsISortDtor::Seek_Entry( const ByteStringPtr aE, USHORT* pP ) co
if( COMPARE_EQUAL == eCmp )
{
if( pP ) *pP = nM;
- return TRUE;
+ return sal_True;
}
else if( COMPARE_LESS == eCmp )
nU = nM + 1;
else if( nM == 0 )
{
if( pP ) *pP = nU;
- return FALSE;
+ return sal_False;
}
else
nO = nM - 1;
}
}
if( pP ) *pP = nU;
- return FALSE;
+ return sal_False;
}
diff --git a/svl/source/misc/adrparse.cxx b/svl/source/misc/adrparse.cxx
index 1a349e47d9bf..e21037e0217f 100644
--- a/svl/source/misc/adrparse.cxx
+++ b/svl/source/misc/adrparse.cxx
@@ -774,7 +774,7 @@ SvAddressParser::SvAddressParser(UniString const & rInput): m_bHasFirst(false)
//============================================================================
SvAddressParser::~SvAddressParser()
{
- for (ULONG i = m_aRest.Count(); i != 0;)
+ for (sal_uLong i = m_aRest.Count(); i != 0;)
delete m_aRest.Remove(--i);
}
diff --git a/svl/source/misc/fstathelper.cxx b/svl/source/misc/fstathelper.cxx
index f39093f2e311..b90df8fb6f7e 100644
--- a/svl/source/misc/fstathelper.cxx
+++ b/svl/source/misc/fstathelper.cxx
@@ -42,7 +42,7 @@ using namespace ::rtl;
sal_Bool FStatHelper::GetModifiedDateTimeOfFile( const UniString& rURL,
Date* pDate, Time* pTime )
{
- sal_Bool bRet = FALSE;
+ sal_Bool bRet = sal_False;
try
{
::ucbhelper::Content aTestContent( rURL,
@@ -69,7 +69,7 @@ sal_Bool FStatHelper::GetModifiedDateTimeOfFile( const UniString& rURL,
sal_Bool FStatHelper::IsDocument( const UniString& rURL )
{
- BOOL bExist = FALSE;
+ sal_Bool bExist = sal_False;
try
{
::ucbhelper::Content aTestContent( rURL,
@@ -84,7 +84,7 @@ sal_Bool FStatHelper::IsDocument( const UniString& rURL )
sal_Bool FStatHelper::IsFolder( const UniString& rURL )
{
- BOOL bExist = FALSE;
+ sal_Bool bExist = sal_False;
try
{
::ucbhelper::Content aTestContent( rURL,
diff --git a/svl/source/misc/inethist.cxx b/svl/source/misc/inethist.cxx
index 28986aca1194..6e637f1b35a5 100644
--- a/svl/source/misc/inethist.cxx
+++ b/svl/source/misc/inethist.cxx
@@ -71,9 +71,9 @@ class INetURLHistory_Impl
{
/** Representation.
*/
- UINT32 m_nMagic;
- UINT16 m_nNext;
- UINT16 m_nMBZ;
+ sal_uInt32 m_nMagic;
+ sal_uInt16 m_nNext;
+ sal_uInt16 m_nMBZ;
/** Initialization.
*/
@@ -91,13 +91,13 @@ class INetURLHistory_Impl
{
/** Representation.
*/
- UINT32 m_nHash;
- UINT16 m_nLru;
- UINT16 m_nMBZ;
+ sal_uInt32 m_nHash;
+ sal_uInt16 m_nLru;
+ sal_uInt16 m_nMBZ;
/** Initialization.
*/
- void initialize (UINT16 nLru, UINT32 nHash = 0)
+ void initialize (sal_uInt16 nLru, sal_uInt32 nHash = 0)
{
m_nHash = nHash;
m_nLru = nLru;
@@ -106,20 +106,20 @@ class INetURLHistory_Impl
/** Comparison.
*/
- BOOL operator== (const hash_entry &rOther) const
+ sal_Bool operator== (const hash_entry &rOther) const
{
return (m_nHash == rOther.m_nHash);
}
- BOOL operator< (const hash_entry &rOther) const
+ sal_Bool operator< (const hash_entry &rOther) const
{
return (m_nHash < rOther.m_nHash);
}
- BOOL operator== (UINT32 nHash) const
+ sal_Bool operator== (sal_uInt32 nHash) const
{
return (m_nHash == nHash);
}
- BOOL operator< (UINT32 nHash) const
+ sal_Bool operator< (sal_uInt32 nHash) const
{
return (m_nHash < nHash);
}
@@ -131,13 +131,13 @@ class INetURLHistory_Impl
{
/** Representation.
*/
- UINT32 m_nHash;
- UINT16 m_nNext;
- UINT16 m_nPrev;
+ sal_uInt32 m_nHash;
+ sal_uInt16 m_nNext;
+ sal_uInt16 m_nPrev;
/** Initialization.
*/
- void initialize (UINT16 nThis, UINT32 nHash = 0)
+ void initialize (sal_uInt16 nThis, sal_uInt32 nHash = 0)
{
m_nHash = nHash;
m_nNext = nThis;
@@ -155,34 +155,34 @@ class INetURLHistory_Impl
*/
void initialize (void);
- void downheap (hash_entry a[], UINT16 n, UINT16 k);
- void heapsort (hash_entry a[], UINT16 n);
+ void downheap (hash_entry a[], sal_uInt16 n, sal_uInt16 k);
+ void heapsort (hash_entry a[], sal_uInt16 n);
/** capacity.
*/
- UINT16 capacity (void) const
+ sal_uInt16 capacity (void) const
{
- return (UINT16)(INETHIST_SIZE_LIMIT);
+ return (sal_uInt16)(INETHIST_SIZE_LIMIT);
}
/** crc32.
*/
- UINT32 crc32 (UniString const & rData) const
+ sal_uInt32 crc32 (UniString const & rData) const
{
return rtl_crc32 (0, rData.GetBuffer(), rData.Len() * sizeof(sal_Unicode));
}
/** find.
*/
- UINT16 find (UINT32 nHash) const;
+ sal_uInt16 find (sal_uInt32 nHash) const;
/** move.
*/
- void move (UINT16 nSI, UINT16 nDI);
+ void move (sal_uInt16 nSI, sal_uInt16 nDI);
/** backlink.
*/
- void backlink (UINT16 nThis, UINT16 nTail)
+ void backlink (sal_uInt16 nThis, sal_uInt16 nTail)
{
register lru_entry &rThis = m_pList[nThis];
register lru_entry &rTail = m_pList[nTail];
@@ -195,7 +195,7 @@ class INetURLHistory_Impl
/** unlink.
*/
- void unlink (UINT16 nThis)
+ void unlink (sal_uInt16 nThis)
{
register lru_entry &rThis = m_pList[nThis];
@@ -217,7 +217,7 @@ public:
/** putUrl/queryUrl.
*/
void putUrl (const String &rUrl);
- BOOL queryUrl (const String &rUrl);
+ sal_Bool queryUrl (const String &rUrl);
};
/*========================================================================
@@ -247,7 +247,7 @@ void INetURLHistory_Impl::initialize (void)
{
m_aHead.initialize();
- USHORT i, n = capacity();
+ sal_uInt16 i, n = capacity();
for (i = 0; i < n; i++)
m_pHash[i].initialize(i);
for (i = 0; i < n; i++)
@@ -259,12 +259,12 @@ void INetURLHistory_Impl::initialize (void)
/*
* downheap.
*/
-void INetURLHistory_Impl::downheap (hash_entry a[], UINT16 n, UINT16 k)
+void INetURLHistory_Impl::downheap (hash_entry a[], sal_uInt16 n, sal_uInt16 k)
{
hash_entry h = a[k];
while (k < n / 2)
{
- UINT16 i = k + k + 1;
+ sal_uInt16 i = k + k + 1;
if (((i + 1) < n) && (a[i] < a[i + 1])) i++;
if (!(h < a[i])) break;
a[k] = a[i];
@@ -276,11 +276,11 @@ void INetURLHistory_Impl::downheap (hash_entry a[], UINT16 n, UINT16 k)
/*
* heapsort.
*/
-void INetURLHistory_Impl::heapsort (hash_entry a[], UINT16 n)
+void INetURLHistory_Impl::heapsort (hash_entry a[], sal_uInt16 n)
{
hash_entry h;
- for (UINT16 k = (n - 1) / 2 + 1; k > 0; k--)
+ for (sal_uInt16 k = (n - 1) / 2 + 1; k > 0; k--)
downheap (a, n, k - 1);
while (n > 0)
@@ -295,15 +295,15 @@ void INetURLHistory_Impl::heapsort (hash_entry a[], UINT16 n)
/*
* find.
*/
-UINT16 INetURLHistory_Impl::find (UINT32 nHash) const
+sal_uInt16 INetURLHistory_Impl::find (sal_uInt32 nHash) const
{
- UINT16 l = 0;
- UINT16 r = capacity() - 1;
- UINT16 c = capacity();
+ sal_uInt16 l = 0;
+ sal_uInt16 r = capacity() - 1;
+ sal_uInt16 c = capacity();
while ((l < r) && (r < c))
{
- UINT16 m = (l + r) / 2;
+ sal_uInt16 m = (l + r) / 2;
if (m_pHash[m] == nHash)
return m;
@@ -318,7 +318,7 @@ UINT16 INetURLHistory_Impl::find (UINT32 nHash) const
/*
* move.
*/
-void INetURLHistory_Impl::move (UINT16 nSI, UINT16 nDI)
+void INetURLHistory_Impl::move (sal_uInt16 nSI, sal_uInt16 nDI)
{
hash_entry e = m_pHash[nSI];
if (nSI < nDI)
@@ -345,12 +345,12 @@ void INetURLHistory_Impl::move (UINT16 nSI, UINT16 nDI)
*/
void INetURLHistory_Impl::putUrl (const String &rUrl)
{
- UINT32 h = crc32 (rUrl);
- UINT16 k = find (h);
+ sal_uInt32 h = crc32 (rUrl);
+ sal_uInt16 k = find (h);
if ((k < capacity()) && (m_pHash[k] == h))
{
// Cache hit.
- UINT16 nMRU = m_pHash[k].m_nLru;
+ sal_uInt16 nMRU = m_pHash[k].m_nLru;
if (nMRU != m_aHead.m_nNext)
{
// Update LRU chain.
@@ -364,9 +364,9 @@ void INetURLHistory_Impl::putUrl (const String &rUrl)
else
{
// Cache miss. Obtain least recently used.
- UINT16 nLRU = m_pList[m_aHead.m_nNext].m_nPrev;
+ sal_uInt16 nLRU = m_pList[m_aHead.m_nNext].m_nPrev;
- UINT16 nSI = find (m_pList[nLRU].m_nHash);
+ sal_uInt16 nSI = find (m_pList[nLRU].m_nHash);
if (!(nLRU == m_pHash[nSI].m_nLru))
{
// Update LRU chain.
@@ -379,7 +379,7 @@ void INetURLHistory_Impl::putUrl (const String &rUrl)
m_aHead.m_nNext = m_pList[m_aHead.m_nNext].m_nPrev;
// Check source and destination.
- UINT16 nDI = std::min (k, UINT16(capacity() - 1));
+ sal_uInt16 nDI = std::min (k, sal_uInt16(capacity() - 1));
if (nSI < nDI)
{
if (!(m_pHash[nDI] < h))
@@ -400,19 +400,19 @@ void INetURLHistory_Impl::putUrl (const String &rUrl)
/*
* queryUrl.
*/
-BOOL INetURLHistory_Impl::queryUrl (const String &rUrl)
+sal_Bool INetURLHistory_Impl::queryUrl (const String &rUrl)
{
- UINT32 h = crc32 (rUrl);
- UINT16 k = find (h);
+ sal_uInt32 h = crc32 (rUrl);
+ sal_uInt16 k = find (h);
if ((k < capacity()) && (m_pHash[k] == h))
{
// Cache hit.
- return TRUE;
+ return sal_True;
}
else
{
// Cache miss.
- return FALSE;
+ return sal_False;
}
}
@@ -526,7 +526,7 @@ void INetURLHistory::PutUrl_Impl (const INetURLObject &rUrl)
/*
* QueryUrl_Impl.
*/
-BOOL INetURLHistory::QueryUrl_Impl (const INetURLObject &rUrl)
+sal_Bool INetURLHistory::QueryUrl_Impl (const INetURLObject &rUrl)
{
DBG_ASSERT (m_pImpl, "QueryUrl_Impl(): no Implementation");
if (m_pImpl)
@@ -536,7 +536,7 @@ BOOL INetURLHistory::QueryUrl_Impl (const INetURLObject &rUrl)
return m_pImpl->queryUrl (aHistUrl.GetMainURL(INetURLObject::NO_DECODE));
}
- return FALSE;
+ return sal_False;
}
diff --git a/svl/source/misc/inettype.cxx b/svl/source/misc/inettype.cxx
index 0b9efdf22afd..86d60bd971ad 100644
--- a/svl/source/misc/inettype.cxx
+++ b/svl/source/misc/inettype.cxx
@@ -337,7 +337,7 @@ MediaTypeEntry const aStaticTypeNameMap[CONTENT_TYPE_LAST + 1]
//============================================================================
/** A mapping from type IDs to presentation resource IDs. Sorted by type ID.
*/
-USHORT const aStaticResourceIDMap[CONTENT_TYPE_LAST + 1]
+sal_uInt16 const aStaticResourceIDMap[CONTENT_TYPE_LAST + 1]
= { STR_SVT_MIMETYPE_APP_OCTSTREAM, // CONTENT_TYPE_UNKNOWN
STR_SVT_MIMETYPE_APP_OCTSTREAM, // CONTENT_TYPE_APP_OCTSTREAM
STR_SVT_MIMETYPE_APP_PDF, // CONTENT_TYPE_APP_PDF
@@ -633,19 +633,19 @@ Registration * Registration::m_pRegistration = 0;
//============================================================================
Registration::~Registration()
{
- {for (ULONG i = 0; i < m_aTypeIDMap.Count(); ++i)
+ {for (sal_uLong i = 0; i < m_aTypeIDMap.Count(); ++i)
delete static_cast< TypeIDMapEntry * >(m_aTypeIDMap.GetObject(i));
}
m_aTypeIDMap.Clear();
- {for (USHORT i = 0; i < m_aTypeNameMap.Count(); ++i)
+ {for (sal_uInt16 i = 0; i < m_aTypeNameMap.Count(); ++i)
delete static_cast< TypeNameMapEntry * >(m_aTypeNameMap.GetObject(i));
}
- m_aTypeNameMap.Remove(USHORT(0), m_aTypeNameMap.Count());
- {for (USHORT i = 0; i < m_aExtensionMap.Count(); ++i)
+ m_aTypeNameMap.Remove(sal_uInt16(0), m_aTypeNameMap.Count());
+ {for (sal_uInt16 i = 0; i < m_aExtensionMap.Count(); ++i)
delete
static_cast< ExtensionMapEntry * >(m_aExtensionMap.GetObject(i));
}
- m_aExtensionMap.Remove(USHORT(0), m_aExtensionMap.Count());
+ m_aExtensionMap.Remove(sal_uInt16(0), m_aExtensionMap.Count());
}
//============================================================================
@@ -657,7 +657,7 @@ TypeNameMapEntry * Registration::getExtensionEntry(UniString const &
{
UniString aTheTypeName = rTypeName;
aTheTypeName.ToLowerAscii();
- USHORT nPos;
+ sal_uInt16 nPos;
if (m_pRegistration->m_aTypeNameMap.Seek_Entry(&aTheTypeName, &nPos))
return static_cast< TypeNameMapEntry * >(m_pRegistration->
m_aTypeNameMap.
@@ -720,7 +720,7 @@ INetContentType Registration::GetContentType(UniString const & rTypeName)
UniString aTheTypeName = rTypeName;
aTheTypeName.ToLowerAscii();
- USHORT nPos;
+ sal_uInt16 nPos;
return m_pRegistration->m_aTypeNameMap.Seek_Entry(&aTheTypeName, &nPos) ?
static_cast< TypeNameMapEntry * >(m_pRegistration->
m_aTypeNameMap.
@@ -764,7 +764,7 @@ UniString Registration::GetExtension(UniString const & rTypeName)
UniString aTheTypeName = rTypeName;
aTheTypeName.ToLowerAscii();
- USHORT nPos;
+ sal_uInt16 nPos;
return m_pRegistration->m_aTypeNameMap.Seek_Entry(&aTheTypeName, &nPos) ?
static_cast< TypeNameMapEntry * >(m_pRegistration->
m_aTypeNameMap.
@@ -781,7 +781,7 @@ INetContentType Registration::GetContentType4Extension(UniString const &
if (!m_pRegistration)
m_pRegistration = new Registration;
- USHORT nPos;
+ sal_uInt16 nPos;
return m_pRegistration->
m_aExtensionMap.
Seek_Entry(const_cast< UniString * >(&rExtension),
@@ -943,7 +943,7 @@ UniString INetContentTypes::GetContentType(INetContentType eTypeID)
UniString INetContentTypes::GetPresentation(INetContentType eTypeID,
const ::com::sun::star::lang::Locale& aLocale)
{
- USHORT nResID = USHORT();
+ sal_uInt16 nResID = sal_uInt16();
if (eTypeID <= CONTENT_TYPE_LAST)
nResID = aStaticResourceIDMap[eTypeID];
else
diff --git a/svl/source/misc/lngmisc.cxx b/svl/source/misc/lngmisc.cxx
index 1324a8fa842c..aba411079074 100644
--- a/svl/source/misc/lngmisc.cxx
+++ b/svl/source/misc/lngmisc.cxx
@@ -41,11 +41,11 @@ namespace linguistic
///////////////////////////////////////////////////////////////////////////
-INT32 GetNumControlChars( const OUString &rTxt )
+sal_Int32 GetNumControlChars( const OUString &rTxt )
{
- INT32 nCnt = 0;
- INT32 nLen = rTxt.getLength();
- for (INT32 i = 0; i < nLen; ++i)
+ sal_Int32 nCnt = 0;
+ sal_Int32 nLen = rTxt.getLength();
+ for (sal_Int32 i = 0; i < nLen; ++i)
{
if (IsControlChar( rTxt[i] ))
++nCnt;
@@ -54,33 +54,33 @@ INT32 GetNumControlChars( const OUString &rTxt )
}
-BOOL RemoveHyphens( OUString &rTxt )
+sal_Bool RemoveHyphens( OUString &rTxt )
{
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
if (HasHyphens( rTxt ))
{
String aTmp( rTxt );
aTmp.EraseAllChars( SVT_SOFT_HYPHEN );
aTmp.EraseAllChars( SVT_HARD_HYPHEN );
rTxt = aTmp;
- bModified = TRUE;
+ bModified = sal_True;
}
return bModified;
}
-BOOL RemoveControlChars( OUString &rTxt )
+sal_Bool RemoveControlChars( OUString &rTxt )
{
- BOOL bModified = FALSE;
- INT32 nCtrlChars = GetNumControlChars( rTxt );
+ sal_Bool bModified = sal_False;
+ sal_Int32 nCtrlChars = GetNumControlChars( rTxt );
if (nCtrlChars)
{
- INT32 nLen = rTxt.getLength();
- INT32 nSize = nLen - nCtrlChars;
+ sal_Int32 nLen = rTxt.getLength();
+ sal_Int32 nSize = nLen - nCtrlChars;
OUStringBuffer aBuf( nSize );
aBuf.setLength( nSize );
- INT32 nCnt = 0;
- for (INT32 i = 0; i < nLen; ++i)
+ sal_Int32 nCnt = 0;
+ for (sal_Int32 i = 0; i < nLen; ++i)
{
sal_Unicode cChar = rTxt[i];
if (!IsControlChar( cChar ))
@@ -91,7 +91,7 @@ BOOL RemoveControlChars( OUString &rTxt )
}
DBG_ASSERT( nCnt == nSize, "wrong size" );
rTxt = aBuf.makeStringAndClear();
- bModified = TRUE;
+ bModified = sal_True;
}
return bModified;
}
@@ -100,20 +100,20 @@ BOOL RemoveControlChars( OUString &rTxt )
// non breaking field character
#define CH_TXTATR_INWORD ((sal_Char) 0x02)
-BOOL ReplaceControlChars( rtl::OUString &rTxt, sal_Char /*aRplcChar*/ )
+sal_Bool ReplaceControlChars( rtl::OUString &rTxt, sal_Char /*aRplcChar*/ )
{
// the resulting string looks like this:
// 1. non breaking field characters get removed
// 2. remaining control characters will be replaced by ' '
- BOOL bModified = FALSE;
- INT32 nCtrlChars = GetNumControlChars( rTxt );
+ sal_Bool bModified = sal_False;
+ sal_Int32 nCtrlChars = GetNumControlChars( rTxt );
if (nCtrlChars)
{
- INT32 nLen = rTxt.getLength();
+ sal_Int32 nLen = rTxt.getLength();
OUStringBuffer aBuf( nLen );
- INT32 nCnt = 0;
- for (INT32 i = 0; i < nLen; ++i)
+ sal_Int32 nCnt = 0;
+ for (sal_Int32 i = 0; i < nLen; ++i)
{
sal_Unicode cChar = rTxt[i];
if (CH_TXTATR_INWORD != cChar)
@@ -126,7 +126,7 @@ BOOL ReplaceControlChars( rtl::OUString &rTxt, sal_Char /*aRplcChar*/ )
}
aBuf.setLength( nCnt );
rTxt = aBuf.makeStringAndClear();
- bModified = TRUE;
+ bModified = sal_True;
}
return bModified;
}
diff --git a/svl/source/misc/ownlist.cxx b/svl/source/misc/ownlist.cxx
index 9fd767c2253f..5d1d728b26e2 100644
--- a/svl/source/misc/ownlist.cxx
+++ b/svl/source/misc/ownlist.cxx
@@ -41,14 +41,14 @@ using namespace com::sun::star;
PRV_SV_IMPL_OWNER_LIST(SvCommandList,SvCommand)
-static String parseString(const String & rCmd, USHORT * pIndex)
+static String parseString(const String & rCmd, sal_uInt16 * pIndex)
{
String result;
if(rCmd.GetChar( *pIndex ) == '\"') {
(*pIndex) ++;
- USHORT begin = *pIndex;
+ sal_uInt16 begin = *pIndex;
while(*pIndex < rCmd.Len() && rCmd.GetChar((*pIndex) ++) != '\"') ;
@@ -58,9 +58,9 @@ static String parseString(const String & rCmd, USHORT * pIndex)
return result;
}
-static String parseWord(const String & rCmd, USHORT * pIndex)
+static String parseWord(const String & rCmd, sal_uInt16 * pIndex)
{
- USHORT begin = *pIndex;
+ sal_uInt16 begin = *pIndex;
while(*pIndex < rCmd.Len() && !isspace(rCmd.GetChar(*pIndex)) && rCmd.GetChar(*pIndex) != '=')
(*pIndex) ++;
@@ -68,7 +68,7 @@ static String parseWord(const String & rCmd, USHORT * pIndex)
return String(rCmd.Copy(begin, *pIndex - begin));
}
-static void eatSpace(const String & rCmd, USHORT * pIndex)
+static void eatSpace(const String & rCmd, sal_uInt16 * pIndex)
{
while(*pIndex < rCmd.Len() && isspace(rCmd.GetChar(*pIndex)))
(*pIndex) ++;
@@ -76,10 +76,10 @@ static void eatSpace(const String & rCmd, USHORT * pIndex)
//=========================================================================
-BOOL SvCommandList::AppendCommands
+sal_Bool SvCommandList::AppendCommands
(
const String & rCmd, /* Dieser Text wird in Kommandos umgesetzt */
- USHORT * pEaten /* Anzahl der Zeichen, die gelesen wurden */
+ sal_uInt16 * pEaten /* Anzahl der Zeichen, die gelesen wurden */
)
/* [Beschreibung]
@@ -88,11 +88,11 @@ BOOL SvCommandList::AppendCommands
[R"uckgabewert]
- BOOL TRUE, der Text wurde korrekt geparsed.
- FALSE, der Text wurde nicht korrekt geparsed.
+ sal_Bool sal_True, der Text wurde korrekt geparsed.
+ sal_False, der Text wurde nicht korrekt geparsed.
*/
{
- USHORT index = 0;
+ sal_uInt16 index = 0;
while(index < rCmd.Len())
{
@@ -115,14 +115,14 @@ BOOL SvCommandList::AppendCommands
*pEaten = index;
-// USHORT nPos = 0;
+// sal_uInt16 nPos = 0;
// while( nPos < rCmd.Len() )
// {
// // ein Zeichen ? Dann faengt hier eine Option an
// if( isalpha( rCmd[nPos] ) )
// {
// String aValue;
-// USHORT nStt = nPos;
+// sal_uInt16 nStt = nPos;
// register char c;
// while( nPos < rCmd.Len() &&
@@ -148,7 +148,7 @@ BOOL SvCommandList::AppendCommands
// if( nPos != rCmd.Len() )
// {
-// USHORT nLen = 0;
+// sal_uInt16 nLen = 0;
// nStt = nPos;
// if( '"' == c )
// {
@@ -181,7 +181,7 @@ BOOL SvCommandList::AppendCommands
// nPos++;
// }
// *pEaten = nPos;
- return TRUE;
+ return sal_True;
}
//=========================================================================
@@ -198,7 +198,7 @@ String SvCommandList::GetCommands() const
*/
{
String aRet;
- for( ULONG i = 0; i < aTypes.Count(); i++ )
+ for( sal_uLong i = 0; i < aTypes.Count(); i++ )
{
if( i != 0 )
aRet += ' ';
@@ -252,7 +252,7 @@ SvStream & operator >>
SvStream & Der "ubergebene Stream.
*/
{
- UINT32 nCount = 0;
+ sal_uInt32 nCount = 0;
rStm >> nCount;
if( !rStm.GetError() )
{
@@ -283,10 +283,10 @@ SvStream & operator <<
SvStream & Der "ubergebene Stream.
*/
{
- UINT32 nCount = rThis.aTypes.Count();
+ sal_uInt32 nCount = rThis.aTypes.Count();
rStm << nCount;
- for( UINT32 i = 0; i < nCount; i++ )
+ for( sal_uInt32 i = 0; i < nCount; i++ )
{
SvCommand * pCmd = (SvCommand *)rThis.aTypes.GetObject( i );
rStm << *pCmd;
@@ -294,7 +294,7 @@ SvStream & operator <<
return rStm;
}
-BOOL SvCommandList::FillFromSequence( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& aCommandSequence )
+sal_Bool SvCommandList::FillFromSequence( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& aCommandSequence )
{
const sal_Int32 nCount = aCommandSequence.getLength();
String aCommand, aArg;
@@ -308,7 +308,7 @@ BOOL SvCommandList::FillFromSequence( const com::sun::star::uno::Sequence < com:
Append( aCommand, aArg );
}
- return TRUE;
+ return sal_True;
}
void SvCommandList::FillSequence( com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& aCommandSequence )
diff --git a/svl/source/misc/strmadpt.cxx b/svl/source/misc/strmadpt.cxx
index c2347ef6fc0c..18f2788077a3 100644
--- a/svl/source/misc/strmadpt.cxx
+++ b/svl/source/misc/strmadpt.cxx
@@ -152,7 +152,7 @@ TYPEINIT1(SvOutputStreamOpenLockBytes, SvOpenLockBytes)
//============================================================================
// virtual
-ErrCode SvOutputStreamOpenLockBytes::ReadAt(ULONG, void *, ULONG, ULONG *)
+ErrCode SvOutputStreamOpenLockBytes::ReadAt(sal_uLong, void *, sal_uLong, sal_uLong *)
const
{
return ERRCODE_IO_CANTREAD;
@@ -160,8 +160,8 @@ ErrCode SvOutputStreamOpenLockBytes::ReadAt(ULONG, void *, ULONG, ULONG *)
//============================================================================
// virtual
-ErrCode SvOutputStreamOpenLockBytes::WriteAt(ULONG nPos, void const * pBuffer,
- ULONG nCount, ULONG * pWritten)
+ErrCode SvOutputStreamOpenLockBytes::WriteAt(sal_uLong nPos, void const * pBuffer,
+ sal_uLong nCount, sal_uLong * pWritten)
{
if (nPos != m_nPosition)
return ERRCODE_IO_CANTWRITE;
@@ -187,7 +187,7 @@ ErrCode SvOutputStreamOpenLockBytes::Flush() const
//============================================================================
// virtual
-ErrCode SvOutputStreamOpenLockBytes::SetSize(ULONG)
+ErrCode SvOutputStreamOpenLockBytes::SetSize(sal_uLong)
{
return ERRCODE_IO_NOTSUPPORTED;
}
@@ -205,15 +205,15 @@ ErrCode SvOutputStreamOpenLockBytes::Stat(SvLockBytesStat * pStat,
//============================================================================
// virtual
ErrCode SvOutputStreamOpenLockBytes::FillAppend(void const * pBuffer,
- ULONG nCount,
- ULONG * pWritten)
+ sal_uLong nCount,
+ sal_uLong * pWritten)
{
if (!m_xOutputStream.is())
return ERRCODE_IO_CANTWRITE;
if (nCount > 0
- && nCount > std::numeric_limits< ULONG >::max() - m_nPosition)
+ && nCount > std::numeric_limits< sal_uLong >::max() - m_nPosition)
{
- nCount = std::numeric_limits< ULONG >::max() - m_nPosition;
+ nCount = std::numeric_limits< sal_uLong >::max() - m_nPosition;
if (nCount == 0)
return ERRCODE_IO_CANTWRITE;
}
@@ -235,14 +235,14 @@ ErrCode SvOutputStreamOpenLockBytes::FillAppend(void const * pBuffer,
//============================================================================
// virtual
-ULONG SvOutputStreamOpenLockBytes::Tell() const
+sal_uLong SvOutputStreamOpenLockBytes::Tell() const
{
return m_nPosition;
}
//============================================================================
// virtual
-ULONG SvOutputStreamOpenLockBytes::Seek(ULONG)
+sal_uLong SvOutputStreamOpenLockBytes::Seek(sal_uLong)
{
return m_nPosition;
}
@@ -476,7 +476,7 @@ bool SvInputStream::open()
//============================================================================
// virtual
-ULONG SvInputStream::GetData(void * pData, ULONG nSize)
+sal_uLong SvInputStream::GetData(void * pData, sal_uLong nSize)
{
if (!open())
{
@@ -503,8 +503,8 @@ ULONG SvInputStream::GetData(void * pData, ULONG nSize)
{
sal_Int32 nRemain
= sal_Int32(
- std::min(ULONG(nSize - nRead),
- ULONG(std::numeric_limits< sal_Int32 >::max())));
+ std::min(sal_uLong(nSize - nRead),
+ sal_uLong(std::numeric_limits< sal_Int32 >::max())));
if (nRemain == 0)
break;
uno::Sequence< sal_Int8 > aBuffer;
@@ -540,8 +540,8 @@ ULONG SvInputStream::GetData(void * pData, ULONG nSize)
sal_Int32 nRemain
= sal_Int32(
std::min(
- ULONG(nSize - nRead),
- ULONG(std::numeric_limits< sal_Int32 >::max())));
+ sal_uLong(nSize - nRead),
+ sal_uLong(std::numeric_limits< sal_Int32 >::max())));
if (nRemain == 0)
break;
uno::Sequence< sal_Int8 > aBuffer;
@@ -571,7 +571,7 @@ ULONG SvInputStream::GetData(void * pData, ULONG nSize)
//============================================================================
// virtual
-ULONG SvInputStream::PutData(void const *, ULONG)
+sal_uLong SvInputStream::PutData(void const *, sal_uLong)
{
SetError(ERRCODE_IO_NOTSUPPORTED);
return 0;
@@ -584,7 +584,7 @@ void SvInputStream::FlushData()
//============================================================================
// virtual
-ULONG SvInputStream::SeekPos(ULONG nPos)
+sal_uLong SvInputStream::SeekPos(sal_uLong nPos)
{
if (open())
{
@@ -601,7 +601,7 @@ ULONG SvInputStream::SeekPos(ULONG nPos)
< STREAM_SEEK_TO_END)
{
m_nSeekedFrom = Tell();
- return ULONG(nLength);
+ return sal_uLong(nLength);
}
}
catch (io::IOException) {}
@@ -636,7 +636,7 @@ ULONG SvInputStream::SeekPos(ULONG nPos)
//============================================================================
// virtual
-void SvInputStream::SetSize(ULONG)
+void SvInputStream::SetSize(sal_uLong)
{
SetError(ERRCODE_IO_NOTSUPPORTED);
}
@@ -668,14 +668,14 @@ SvInputStream::~SvInputStream()
//============================================================================
// virtual
-USHORT SvInputStream::IsA() const
+sal_uInt16 SvInputStream::IsA() const
{
return 0;
}
//============================================================================
// virtual
-void SvInputStream::AddMark(ULONG nPos)
+void SvInputStream::AddMark(sal_uLong nPos)
{
if (open() && m_pPipe)
m_pPipe->addMark(nPos);
@@ -683,7 +683,7 @@ void SvInputStream::AddMark(ULONG nPos)
//============================================================================
// virtual
-void SvInputStream::RemoveMark(ULONG nPos)
+void SvInputStream::RemoveMark(sal_uLong nPos)
{
if (open() && m_pPipe)
m_pPipe->removeMark(nPos);
@@ -696,7 +696,7 @@ void SvInputStream::RemoveMark(ULONG nPos)
//============================================================================
// virtual
-ULONG SvOutputStream::GetData(void *, ULONG)
+sal_uLong SvOutputStream::GetData(void *, sal_uLong)
{
SetError(ERRCODE_IO_NOTSUPPORTED);
return 0;
@@ -704,20 +704,20 @@ ULONG SvOutputStream::GetData(void *, ULONG)
//============================================================================
// virtual
-ULONG SvOutputStream::PutData(void const * pData, ULONG nSize)
+sal_uLong SvOutputStream::PutData(void const * pData, sal_uLong nSize)
{
if (!m_xStream.is())
{
SetError(ERRCODE_IO_CANTWRITE);
return 0;
}
- ULONG nWritten = 0;
+ sal_uLong nWritten = 0;
for (;;)
{
sal_Int32 nRemain
= sal_Int32(
- std::min(ULONG(nSize - nWritten),
- ULONG(std::numeric_limits< sal_Int32 >::max())));
+ std::min(sal_uLong(nSize - nWritten),
+ sal_uLong(std::numeric_limits< sal_Int32 >::max())));
if (nRemain == 0)
break;
try
@@ -739,7 +739,7 @@ ULONG SvOutputStream::PutData(void const * pData, ULONG nSize)
//============================================================================
// virtual
-ULONG SvOutputStream::SeekPos(ULONG)
+sal_uLong SvOutputStream::SeekPos(sal_uLong)
{
SetError(ERRCODE_IO_NOTSUPPORTED);
return 0;
@@ -763,7 +763,7 @@ void SvOutputStream::FlushData()
//============================================================================
// virtual
-void SvOutputStream::SetSize(ULONG)
+void SvOutputStream::SetSize(sal_uLong)
{
SetError(ERRCODE_IO_NOTSUPPORTED);
}
@@ -790,7 +790,7 @@ SvOutputStream::~SvOutputStream()
//============================================================================
// virtual
-USHORT SvOutputStream::IsA() const
+sal_uInt16 SvOutputStream::IsA() const
{
return 0;
}
diff --git a/svl/source/notify/brdcst.cxx b/svl/source/notify/brdcst.cxx
index 29983ecedc17..ad7da10ed4f4 100644
--- a/svl/source/notify/brdcst.cxx
+++ b/svl/source/notify/brdcst.cxx
@@ -59,7 +59,7 @@ void SfxBroadcaster::Broadcast( const SfxHint &rHint )
if ( aListeners.Count() /*! || aGlobListeners.Count() */ )
{
// notify all registered listeners exactly once
- for ( USHORT n = 0; n < aListeners.Count(); ++n )
+ for ( sal_uInt16 n = 0; n < aListeners.Count(); ++n )
{
SfxListener* pListener = aListeners[n];
if ( pListener )
@@ -98,7 +98,7 @@ SfxBroadcaster::~SfxBroadcaster()
Broadcast( SfxSimpleHint(SFX_HINT_DYING) );
// remove all still registered listeners
- for ( USHORT nPos = 0; nPos < aListeners.Count(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < aListeners.Count(); ++nPos )
{
SfxListener *pListener = aListeners[nPos];
if ( pListener )
@@ -124,7 +124,7 @@ SfxBroadcaster::SfxBroadcaster( const SfxBroadcaster &rBC )
{
DBG_CTOR(SfxBroadcaster, 0);
- for ( USHORT n = 0; n < rBC.aListeners.Count(); ++n )
+ for ( sal_uInt16 n = 0; n < rBC.aListeners.Count(); ++n )
{
SfxListener *pListener = rBC.aListeners[n];
if ( pListener )
@@ -136,12 +136,12 @@ SfxBroadcaster::SfxBroadcaster( const SfxBroadcaster &rBC )
// add a new SfxListener to the list
-BOOL SfxBroadcaster::AddListener( SfxListener& rListener )
+sal_Bool SfxBroadcaster::AddListener( SfxListener& rListener )
{
DBG_CHKTHIS(SfxBroadcaster, 0);
const SfxListener *pListener = &rListener;
const SfxListener *pNull = 0;
- USHORT nFreePos = aListeners.GetPos( pNull );
+ sal_uInt16 nFreePos = aListeners.GetPos( pNull );
if ( nFreePos < aListeners.Count() )
aListeners.GetData()[nFreePos] = pListener;
else if ( aListeners.Count() < (USHRT_MAX-1) )
@@ -149,12 +149,12 @@ BOOL SfxBroadcaster::AddListener( SfxListener& rListener )
else
{
DBG_ERROR( "array overflow" );
- return FALSE;
+ return sal_False;
}
DBG_ASSERT( USHRT_MAX != aListeners.GetPos(pListener),
"AddListener failed" );
- return TRUE;
+ return sal_True;
}
//--------------------------------------------------------------------
@@ -172,8 +172,8 @@ void SfxBroadcaster::ListenersGone()
void SfxBroadcaster::Forward(SfxBroadcaster& rBC, const SfxHint& rHint)
{
- const USHORT nCount = aListeners.Count();
- for ( USHORT i = 0; i < nCount; ++i )
+ const sal_uInt16 nCount = aListeners.Count();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
SfxListener *pListener = aListeners[i];
if ( pListener )
@@ -189,7 +189,7 @@ void SfxBroadcaster::RemoveListener( SfxListener& rListener )
{
{DBG_CHKTHIS(SfxBroadcaster, 0);}
const SfxListener *pListener = &rListener;
- USHORT nPos = aListeners.GetPos(pListener);
+ sal_uInt16 nPos = aListeners.GetPos(pListener);
DBG_ASSERT( nPos != USHRT_MAX, "RemoveListener: Listener unknown" );
aListeners.GetData()[nPos] = 0;
if ( !HasListeners() )
@@ -198,12 +198,12 @@ void SfxBroadcaster::RemoveListener( SfxListener& rListener )
//--------------------------------------------------------------------
-BOOL SfxBroadcaster::HasListeners() const
+sal_Bool SfxBroadcaster::HasListeners() const
{
- for ( USHORT n = 0; n < aListeners.Count(); ++n )
+ for ( sal_uInt16 n = 0; n < aListeners.Count(); ++n )
if ( aListeners.GetObject(n) != 0 )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
//--------------------------------------------------------------------
diff --git a/svl/source/notify/broadcast.cxx b/svl/source/notify/broadcast.cxx
index e6a76132be6a..046b584e4385 100644
--- a/svl/source/notify/broadcast.cxx
+++ b/svl/source/notify/broadcast.cxx
@@ -93,7 +93,7 @@ void SvtBroadcaster::Broadcast( const SfxHint &rHint )
if( HasListeners() /* && !IsModifyLocked()*/ )
{
// LockModify();
-// bInModify = TRUE;
+// bInModify = sal_True;
SvtListenerIter aIter( *this );
SvtListener* pLast = aIter.GoStart();
@@ -104,7 +104,7 @@ void SvtBroadcaster::Broadcast( const SfxHint &rHint )
break;
} while( 0 != ( pLast = aIter.GoNext() ));
-// bInModify = FALSE;
+// bInModify = sal_False;
// UnlockModify();
}
}
@@ -128,7 +128,7 @@ void SvtBroadcaster::Forward( SvtBroadcaster& rBC, const SfxHint& rHint )
if( rBC.HasListeners() /* && !IsModifyLocked()*/ )
{
// LockModify();
-// bInModify = TRUE;
+// bInModify = sal_True;
SvtListenerIter aIter( rBC );
SvtListener* pLast = aIter.GoStart();
@@ -139,7 +139,7 @@ void SvtBroadcaster::Forward( SvtBroadcaster& rBC, const SfxHint& rHint )
break;
} while( 0 != ( pLast = aIter.GoNext() ));
-// bInModify = FALSE;
+// bInModify = sal_False;
// UnlockModify();
}
}
diff --git a/svl/source/notify/listener.cxx b/svl/source/notify/listener.cxx
index 44e3e187ff38..8a90a0ddfd3c 100644
--- a/svl/source/notify/listener.cxx
+++ b/svl/source/notify/listener.cxx
@@ -72,7 +72,7 @@ SvtListener::~SvtListener()
// registeres at a specific SvtBroadcaster
-BOOL SvtListener::StartListening( SvtBroadcaster& rBroadcaster )
+sal_Bool SvtListener::StartListening( SvtBroadcaster& rBroadcaster )
{
const SvtListenerBase* pLst = pBrdCastLst;
while( pLst )
@@ -80,19 +80,19 @@ BOOL SvtListener::StartListening( SvtBroadcaster& rBroadcaster )
if( &rBroadcaster == pLst->GetBroadcaster() )
{
// double, than return
- return FALSE;
+ return sal_False;
}
pLst = pLst->GetNext();
}
new SvtListenerBase( *this, rBroadcaster );
- return TRUE;
+ return sal_True;
}
//--------------------------------------------------------------------
// unregisteres at a specific SvtBroadcaster
-BOOL SvtListener::EndListening( SvtBroadcaster& rBroadcaster )
+sal_Bool SvtListener::EndListening( SvtBroadcaster& rBroadcaster )
{
SvtListenerBase *pLst = pBrdCastLst, *pPrev = pLst;
while( pLst )
@@ -105,12 +105,12 @@ BOOL SvtListener::EndListening( SvtBroadcaster& rBroadcaster )
pPrev->SetNext( pLst->GetNext() );
delete pLst;
- return TRUE;
+ return sal_True;
}
pPrev = pLst;
pLst = pLst->GetNext();
}
- return FALSE;
+ return sal_False;
}
//--------------------------------------------------------------------
@@ -132,7 +132,7 @@ void SvtListener::EndListeningAll()
//--------------------------------------------------------------------
-BOOL SvtListener::IsListening( SvtBroadcaster& rBroadcaster ) const
+sal_Bool SvtListener::IsListening( SvtBroadcaster& rBroadcaster ) const
{
const SvtListenerBase *pLst = pBrdCastLst;
while( pLst )
diff --git a/svl/source/notify/lstner.cxx b/svl/source/notify/lstner.cxx
index 3f003e6dde8f..36c6b665dd6d 100644
--- a/svl/source/notify/lstner.cxx
+++ b/svl/source/notify/lstner.cxx
@@ -61,7 +61,7 @@ SfxListener::SfxListener( const SfxListener &rListener )
{
DBG_CTOR(SfxListener, 0);
- for ( USHORT n = 0; n < rListener.aBCs.Count(); ++n )
+ for ( sal_uInt16 n = 0; n < rListener.aBCs.Count(); ++n )
StartListening( *rListener.aBCs[n] );
}
//--------------------------------------------------------------------
@@ -73,7 +73,7 @@ SfxListener::~SfxListener()
DBG_DTOR(SfxListener, 0);
// unregister at all remainding broadcasters
- for ( USHORT nPos = 0; nPos < aBCs.Count(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < aBCs.Count(); ++nPos )
{
SfxBroadcaster *pBC = aBCs[nPos];
pBC->RemoveListener(*this);
@@ -96,7 +96,7 @@ void SfxListener::RemoveBroadcaster_Impl( SfxBroadcaster& rBC )
// registeres at a specific SfxBroadcaster
-BOOL SfxListener::StartListening( SfxBroadcaster& rBroadcaster, BOOL bPreventDups )
+sal_Bool SfxListener::StartListening( SfxBroadcaster& rBroadcaster, sal_Bool bPreventDups )
{
DBG_CHKTHIS(SfxListener, 0);
@@ -108,23 +108,23 @@ BOOL SfxListener::StartListening( SfxBroadcaster& rBroadcaster, BOOL bPreventDup
aBCs.Insert( pBC, aBCs.Count() );
DBG_ASSERT( IsListening(rBroadcaster), "StartListening failed" );
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
//--------------------------------------------------------------------
// unregisteres at a specific SfxBroadcaster
-BOOL SfxListener::EndListening( SfxBroadcaster& rBroadcaster, BOOL bAllDups )
+sal_Bool SfxListener::EndListening( SfxBroadcaster& rBroadcaster, sal_Bool bAllDups )
{
DBG_CHKTHIS(SfxListener, 0);
if ( !IsListening( rBroadcaster ) )
- return FALSE;
+ return sal_False;
do
{
@@ -133,14 +133,14 @@ BOOL SfxListener::EndListening( SfxBroadcaster& rBroadcaster, BOOL bAllDups )
aBCs.Remove( aBCs.GetPos(pBC), 1 );
}
while ( bAllDups && IsListening( rBroadcaster ) );
- return TRUE;
+ return sal_True;
}
//--------------------------------------------------------------------
// unregisteres at a specific SfxBroadcaster by index
-void SfxListener::EndListening( USHORT nNo )
+void SfxListener::EndListening( sal_uInt16 nNo )
{
DBG_CHKTHIS(SfxListener, 0);
@@ -168,7 +168,7 @@ void SfxListener::EndListeningAll()
//--------------------------------------------------------------------
-BOOL SfxListener::IsListening( SfxBroadcaster& rBroadcaster ) const
+sal_Bool SfxListener::IsListening( SfxBroadcaster& rBroadcaster ) const
{
const SfxBroadcaster *pBC = &rBroadcaster;
return USHRT_MAX != aBCs.GetPos( pBC );
diff --git a/svl/source/notify/smplhint.cxx b/svl/source/notify/smplhint.cxx
index 98eecb91cfe2..9191e50f383e 100644
--- a/svl/source/notify/smplhint.cxx
+++ b/svl/source/notify/smplhint.cxx
@@ -39,7 +39,7 @@ TYPEINIT1(SfxSimpleHint, SfxHint);
//====================================================================
// creates a SimpleHint with the type nId
-SfxSimpleHint::SfxSimpleHint( ULONG nIdP )
+SfxSimpleHint::SfxSimpleHint( sal_uLong nIdP )
{
nId = nIdP;
}
diff --git a/svl/source/numbers/numfmuno.cxx b/svl/source/numbers/numfmuno.cxx
index 6aea37653633..3a4949f45cbc 100644
--- a/svl/source/numbers/numfmuno.cxx
+++ b/svl/source/numbers/numfmuno.cxx
@@ -183,7 +183,7 @@ sal_Int32 SAL_CALL SvNumberFormatterServiceObj::detectNumberFormat(
{
::osl::MutexGuard aGuard( m_aMutex );
- INT32 nRet = 0;
+ sal_Int32 nRet = 0;
SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : NULL;
if (pFormatter)
{
@@ -249,7 +249,7 @@ util::Color SAL_CALL SvNumberFormatterServiceObj::queryColorForNumber( sal_Int32
{
::osl::MutexGuard aGuard( m_aMutex );
- util::Color nRet = aDefaultColor; // color = INT32
+ util::Color nRet = aDefaultColor; // color = sal_Int32
SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : NULL;
if (pFormatter)
{
@@ -291,7 +291,7 @@ util::Color SAL_CALL SvNumberFormatterServiceObj::queryColorForString( sal_Int32
{
::osl::MutexGuard aGuard( m_aMutex );
- util::Color nRet = aDefaultColor; // color = INT32
+ util::Color nRet = aDefaultColor; // color = sal_Int32
SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : NULL;
if (pFormatter)
{
@@ -342,7 +342,7 @@ rtl::OUString SAL_CALL SvNumberFormatterServiceObj::convertNumberToPreviewString
LanguageType eLang = lcl_GetLanguage( nLocale );
Color* pColor = NULL;
- BOOL bOk;
+ sal_Bool bOk;
if ( bAllowEnglish )
bOk = pFormatter->GetPreviewStringGuess(
aFormString, fValue, aOutString, &pColor, eLang );
@@ -369,7 +369,7 @@ util::Color SAL_CALL SvNumberFormatterServiceObj::queryPreviewColorForNumber(
{
::osl::MutexGuard aGuard( m_aMutex );
- util::Color nRet = aDefaultColor; // color = INT32
+ util::Color nRet = aDefaultColor; // color = sal_Int32
SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : NULL;
if (pFormatter)
{
@@ -378,7 +378,7 @@ util::Color SAL_CALL SvNumberFormatterServiceObj::queryPreviewColorForNumber(
LanguageType eLang = lcl_GetLanguage( nLocale );
Color* pColor = NULL;
- BOOL bOk;
+ sal_Bool bOk;
if ( bAllowEnglish )
bOk = pFormatter->GetPreviewStringGuess(
aFormString, fValue, aOutString, &pColor, eLang );
@@ -485,7 +485,7 @@ sal_Int32 SAL_CALL SvNumberFormatsObj::queryKey( const rtl::OUString& aFormat,
{
::osl::MutexGuard aGuard( m_aMutex );
- INT32 nRet = 0;
+ sal_Int32 nRet = 0;
SvNumberFormatter* pFormatter = rSupplier.GetNumberFormatter();
if (pFormatter)
{
@@ -509,7 +509,7 @@ sal_Int32 SAL_CALL SvNumberFormatsObj::addNew( const rtl::OUString& aFormat,
{
::osl::MutexGuard aGuard( m_aMutex );
- INT32 nRet = 0;
+ sal_Int32 nRet = 0;
SvNumberFormatter* pFormatter = rSupplier.GetNumberFormatter();
if (pFormatter)
{
@@ -518,7 +518,7 @@ sal_Int32 SAL_CALL SvNumberFormatsObj::addNew( const rtl::OUString& aFormat,
sal_uInt32 nKey = 0;
xub_StrLen nCheckPos = 0;
short nType = 0;
- BOOL bOk = pFormatter->PutEntry( aFormStr, nCheckPos, nType, nKey, eLang );
+ sal_Bool bOk = pFormatter->PutEntry( aFormStr, nCheckPos, nType, nKey, eLang );
if (bOk)
nRet = nKey;
else if (nCheckPos)
@@ -540,7 +540,7 @@ sal_Int32 SAL_CALL SvNumberFormatsObj::addNewConverted( const rtl::OUString& aFo
{
::osl::MutexGuard aGuard( m_aMutex );
- INT32 nRet = 0;
+ sal_Int32 nRet = 0;
SvNumberFormatter* pFormatter = rSupplier.GetNumberFormatter();
if (pFormatter)
{
@@ -550,7 +550,7 @@ sal_Int32 SAL_CALL SvNumberFormatsObj::addNewConverted( const rtl::OUString& aFo
sal_uInt32 nKey = 0;
xub_StrLen nCheckPos = 0;
short nType = 0;
- BOOL bOk = pFormatter->PutandConvertEntry( aFormStr, nCheckPos, nType, nKey, eLang, eNewLang );
+ sal_Bool bOk = pFormatter->PutandConvertEntry( aFormStr, nCheckPos, nType, nKey, eLang, eNewLang );
if (bOk || nKey > 0)
nRet = nKey;
else if (nCheckPos)
@@ -605,7 +605,7 @@ sal_Int32 SAL_CALL SvNumberFormatsObj::getStandardIndex( const lang::Locale& nLo
{
::osl::MutexGuard aGuard( m_aMutex );
- INT32 nRet = 0;
+ sal_Int32 nRet = 0;
SvNumberFormatter* pFormatter = rSupplier.GetNumberFormatter();
if (pFormatter)
{
@@ -623,7 +623,7 @@ sal_Int32 SAL_CALL SvNumberFormatsObj::getStandardFormat( sal_Int16 nType, const
{
::osl::MutexGuard aGuard( m_aMutex );
- INT32 nRet = 0;
+ sal_Int32 nRet = 0;
SvNumberFormatter* pFormatter = rSupplier.GetNumberFormatter();
if (pFormatter)
{
@@ -644,7 +644,7 @@ sal_Int32 SAL_CALL SvNumberFormatsObj::getFormatIndex( sal_Int16 nIndex, const l
{
::osl::MutexGuard aGuard( m_aMutex );
- INT32 nRet = 0;
+ sal_Int32 nRet = 0;
SvNumberFormatter* pFormatter = rSupplier.GetNumberFormatter();
if (pFormatter)
{
@@ -662,7 +662,7 @@ sal_Bool SAL_CALL SvNumberFormatsObj::isTypeCompatible( sal_Int16 nOldType, sal_
{
::osl::MutexGuard aGuard( m_aMutex );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SvNumberFormatter* pFormatter = rSupplier.GetNumberFormatter();
if (pFormatter)
bRet = pFormatter->IsCompatible( nOldType, nNewType );
@@ -677,7 +677,7 @@ sal_Int32 SAL_CALL SvNumberFormatsObj::getFormatForLocale( sal_Int32 nKey, const
{
::osl::MutexGuard aGuard( m_aMutex );
- INT32 nRet = 0;
+ sal_Int32 nRet = 0;
SvNumberFormatter* pFormatter = rSupplier.GetNumberFormatter();
if (pFormatter)
{
@@ -715,7 +715,7 @@ uno::Sequence<rtl::OUString> SAL_CALL SvNumberFormatsObj::getSupportedServiceNam
//------------------------------------------------------------------------
-SvNumberFormatObj::SvNumberFormatObj( SvNumberFormatsSupplierObj& rParent, ULONG nK, const ::comphelper::SharedMutex& _rMutex )
+SvNumberFormatObj::SvNumberFormatObj( SvNumberFormatsSupplierObj& rParent, sal_uLong nK, const ::comphelper::SharedMutex& _rMutex )
:rSupplier( rParent )
,nKey( nK )
,m_aMutex( _rMutex )
@@ -759,8 +759,8 @@ uno::Any SAL_CALL SvNumberFormatObj::getPropertyValue( const rtl::OUString& aPro
const SvNumberformat* pFormat = pFormatter ? pFormatter->GetEntry(nKey) : NULL;
if (pFormat)
{
- BOOL bThousand, bRed;
- USHORT nDecimals, nLeading;
+ sal_Bool bThousand, bRed;
+ sal_uInt16 nDecimals, nLeading;
String aString = aPropertyName;
if (aString.EqualsAscii( PROPERTYNAME_FMTSTR ))
@@ -784,12 +784,12 @@ uno::Any SAL_CALL SvNumberFormatObj::getPropertyValue( const rtl::OUString& aPro
else if (aString.EqualsAscii( PROPERTYNAME_STDFORM ))
{
//! SvNumberformat Member bStandard rausreichen?
- BOOL bStandard = ( ( nKey % SV_COUNTRY_LANGUAGE_OFFSET ) == 0 );
+ sal_Bool bStandard = ( ( nKey % SV_COUNTRY_LANGUAGE_OFFSET ) == 0 );
aRet.setValue( &bStandard, getBooleanCppuType() );
}
else if (aString.EqualsAscii( PROPERTYNAME_USERDEF ))
{
- BOOL bUserDef = ( ( pFormat->GetType() & NUMBERFORMAT_DEFINED ) != 0 );
+ sal_Bool bUserDef = ( ( pFormat->GetType() & NUMBERFORMAT_DEFINED ) != 0 );
aRet.setValue( &bUserDef, getBooleanCppuType() );
}
else if (aString.EqualsAscii( PROPERTYNAME_DECIMALS ))
@@ -827,7 +827,7 @@ uno::Any SAL_CALL SvNumberFormatObj::getPropertyValue( const rtl::OUString& aPro
else if (aString.EqualsAscii( PROPERTYNAME_CURRABB ))
{
String aSymbol, aExt;
- BOOL bBank = FALSE;
+ sal_Bool bBank = sal_False;
pFormat->GetNewCurrencySymbol( aSymbol, aExt );
const NfCurrencyEntry* pCurr = pFormatter->GetCurrencyEntry( bBank,
aSymbol, aExt, pFormat->GetLanguage() );
@@ -889,7 +889,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL SvNumberFormatObj::getPropertyValue
if (pFormat)
{
String aSymbol, aExt, aAbb;
- BOOL bBank = FALSE;
+ sal_Bool bBank = sal_False;
pFormat->GetNewCurrencySymbol( aSymbol, aExt );
const NfCurrencyEntry* pCurr = pFormatter->GetCurrencyEntry( bBank,
aSymbol, aExt, pFormat->GetLanguage() );
@@ -898,11 +898,11 @@ uno::Sequence<beans::PropertyValue> SAL_CALL SvNumberFormatObj::getPropertyValue
String aFmtStr = pFormat->GetFormatstring();
String aComment = pFormat->GetComment();
- BOOL bStandard = ( ( nKey % SV_COUNTRY_LANGUAGE_OFFSET ) == 0 );
+ sal_Bool bStandard = ( ( nKey % SV_COUNTRY_LANGUAGE_OFFSET ) == 0 );
//! SvNumberformat Member bStandard rausreichen?
- BOOL bUserDef = ( ( pFormat->GetType() & NUMBERFORMAT_DEFINED ) != 0 );
- BOOL bThousand, bRed;
- USHORT nDecimals, nLeading;
+ sal_Bool bUserDef = ( ( pFormat->GetType() & NUMBERFORMAT_DEFINED ) != 0 );
+ sal_Bool bThousand, bRed;
+ sal_uInt16 nDecimals, nLeading;
pFormat->GetFormatSpecialInfo( bThousand, bRed, nDecimals, nLeading );
lang::Locale aLocale( MsLangId::convertLanguageToLocale(
pFormat->GetLanguage()));
@@ -1057,7 +1057,7 @@ uno::Any SAL_CALL SvNumberFormatSettingsObj::getPropertyValue( const rtl::OUStri
String aString = aPropertyName;
if (aString.EqualsAscii( PROPERTYNAME_NOZERO ))
{
- BOOL bNoZero = pFormatter->GetNoZero();
+ sal_Bool bNoZero = pFormatter->GetNoZero();
aRet.setValue( &bNoZero, getBooleanCppuType() );
}
else if (aString.EqualsAscii( PROPERTYNAME_NULLDATE ))
diff --git a/svl/source/numbers/numfmuno.hxx b/svl/source/numbers/numfmuno.hxx
index 09bc58a0b6ee..f3644cc4e7a5 100644
--- a/svl/source/numbers/numfmuno.hxx
+++ b/svl/source/numbers/numfmuno.hxx
@@ -183,11 +183,11 @@ class SvNumberFormatObj : public cppu::WeakImplHelper3<
{
private:
SvNumberFormatsSupplierObj& rSupplier;
- ULONG nKey;
+ sal_uLong nKey;
mutable ::comphelper::SharedMutex m_aMutex;
public:
- SvNumberFormatObj( SvNumberFormatsSupplierObj& rParent, ULONG nK, const ::comphelper::SharedMutex& _rMutex );
+ SvNumberFormatObj( SvNumberFormatsSupplierObj& rParent, sal_uLong nK, const ::comphelper::SharedMutex& _rMutex );
virtual ~SvNumberFormatObj();
// XPropertySet
diff --git a/svl/source/numbers/numhead.cxx b/svl/source/numbers/numhead.cxx
index adf42fe26f8f..98ed17982444 100644
--- a/svl/source/numbers/numhead.cxx
+++ b/svl/source/numbers/numhead.cxx
@@ -47,7 +47,7 @@
SvNumReadHeader::SvNumReadHeader(SvStream& rNewStream) :
rStream( rNewStream )
{
- ULONG nDataSize;
+ sal_uLong nDataSize;
rStream >> nDataSize;
nDataEnd = rStream.Tell() + nDataSize;
}
@@ -56,7 +56,7 @@ SvNumReadHeader::SvNumReadHeader(SvStream& rNewStream) :
SvNumReadHeader::~SvNumReadHeader()
{
- ULONG nReadEnd = rStream.Tell();
+ sal_uLong nReadEnd = rStream.Tell();
DBG_ASSERT( nReadEnd <= nDataEnd, "zuviele Bytes gelesen" );
if ( nReadEnd != nDataEnd )
rStream.Seek(nDataEnd); // Rest ueberspringen
@@ -64,9 +64,9 @@ SvNumReadHeader::~SvNumReadHeader()
//#pragma SEG_FUNCDEF(numhead_03)
-ULONG SvNumReadHeader::BytesLeft() const
+sal_uLong SvNumReadHeader::BytesLeft() const
{
- ULONG nReadEnd = rStream.Tell();
+ sal_uLong nReadEnd = rStream.Tell();
if (nReadEnd <= nDataEnd)
return nDataEnd-nReadEnd;
@@ -78,7 +78,7 @@ ULONG SvNumReadHeader::BytesLeft() const
//#pragma SEG_FUNCDEF(numhead_04)
-SvNumWriteHeader::SvNumWriteHeader(SvStream& rNewStream, ULONG nDefault) :
+SvNumWriteHeader::SvNumWriteHeader(SvStream& rNewStream, sal_uLong nDefault) :
rStream( rNewStream )
{
nDataSize = nDefault;
@@ -90,7 +90,7 @@ SvNumWriteHeader::SvNumWriteHeader(SvStream& rNewStream, ULONG nDefault) :
SvNumWriteHeader::~SvNumWriteHeader()
{
- ULONG nPos = rStream.Tell();
+ sal_uLong nPos = rStream.Tell();
if ( nPos - nDataPos != nDataSize ) // Default getroffen?
{
@@ -112,11 +112,11 @@ ImpSvNumMultipleReadHeader::ImpSvNumMultipleReadHeader(SvStream& rNewStream) :
{
sal_uInt32 nDataSize;
rStream >> nDataSize;
- ULONG nDataPos = rStream.Tell();
+ sal_uLong nDataPos = rStream.Tell();
nEntryEnd = nDataPos;
rStream.SeekRel(nDataSize);
- USHORT nID;
+ sal_uInt16 nID;
rStream >> nID;
if (nID != SV_NUMID_SIZES)
{
@@ -151,7 +151,7 @@ void ImpSvNumMultipleReadHeader::Skip( SvStream& rStream )
sal_uInt32 nDataSize;
rStream >> nDataSize;
rStream.SeekRel( nDataSize );
- USHORT nID;
+ sal_uInt16 nID;
rStream >> nID;
if ( nID != SV_NUMID_SIZES )
{
@@ -166,7 +166,7 @@ void ImpSvNumMultipleReadHeader::Skip( SvStream& rStream )
void ImpSvNumMultipleReadHeader::EndEntry()
{
- ULONG nPos = rStream.Tell();
+ sal_uLong nPos = rStream.Tell();
DBG_ASSERT( nPos <= nEntryEnd, "zuviel gelesen" );
if ( nPos != nEntryEnd )
rStream.Seek( nEntryEnd ); // Rest ueberspringen
@@ -176,7 +176,7 @@ void ImpSvNumMultipleReadHeader::EndEntry()
void ImpSvNumMultipleReadHeader::StartEntry()
{
- ULONG nPos = rStream.Tell();
+ sal_uLong nPos = rStream.Tell();
sal_uInt32 nEntrySize;
(*pMemStream) >> nEntrySize;
@@ -185,9 +185,9 @@ void ImpSvNumMultipleReadHeader::StartEntry()
//#pragma SEG_FUNCDEF(numhead_09)
-ULONG ImpSvNumMultipleReadHeader::BytesLeft() const
+sal_uLong ImpSvNumMultipleReadHeader::BytesLeft() const
{
- ULONG nReadEnd = rStream.Tell();
+ sal_uLong nReadEnd = rStream.Tell();
if (nReadEnd <= nEntryEnd)
return nEntryEnd-nReadEnd;
@@ -200,7 +200,7 @@ ULONG ImpSvNumMultipleReadHeader::BytesLeft() const
//#pragma SEG_FUNCDEF(numhead_0a)
ImpSvNumMultipleWriteHeader::ImpSvNumMultipleWriteHeader(SvStream& rNewStream,
- ULONG nDefault) :
+ sal_uLong nDefault) :
rStream( rNewStream ),
aMemStream( 4096, 4096 )
{
@@ -215,16 +215,16 @@ ImpSvNumMultipleWriteHeader::ImpSvNumMultipleWriteHeader(SvStream& rNewStream,
ImpSvNumMultipleWriteHeader::~ImpSvNumMultipleWriteHeader()
{
- ULONG nDataEnd = rStream.Tell();
+ sal_uLong nDataEnd = rStream.Tell();
- rStream << (USHORT) SV_NUMID_SIZES;
+ rStream << (sal_uInt16) SV_NUMID_SIZES;
rStream << static_cast<sal_uInt32>(aMemStream.Tell());
rStream.Write( aMemStream.GetData(), aMemStream.Tell() );
if ( nDataEnd - nDataPos != nDataSize ) // Default getroffen?
{
nDataSize = nDataEnd - nDataPos;
- ULONG nPos = rStream.Tell();
+ sal_uLong nPos = rStream.Tell();
rStream.Seek(nDataPos-sizeof(sal_uInt32));
rStream << nDataSize; // Groesse am Anfang eintragen
rStream.Seek(nPos);
@@ -235,7 +235,7 @@ ImpSvNumMultipleWriteHeader::~ImpSvNumMultipleWriteHeader()
void ImpSvNumMultipleWriteHeader::EndEntry()
{
- ULONG nPos = rStream.Tell();
+ sal_uLong nPos = rStream.Tell();
aMemStream << static_cast<sal_uInt32>(nPos - nEntryStart);
}
@@ -243,7 +243,7 @@ void ImpSvNumMultipleWriteHeader::EndEntry()
void ImpSvNumMultipleWriteHeader::StartEntry()
{
- ULONG nPos = rStream.Tell();
+ sal_uLong nPos = rStream.Tell();
nEntryStart = nPos;
}
diff --git a/svl/source/numbers/numhead.hxx b/svl/source/numbers/numhead.hxx
index 7df06033e0d7..c268d1869b8a 100644
--- a/svl/source/numbers/numhead.hxx
+++ b/svl/source/numbers/numhead.hxx
@@ -39,24 +39,24 @@ class SvNumReadHeader
{
private:
SvStream& rStream;
- ULONG nDataEnd;
+ sal_uLong nDataEnd;
public:
SvNumReadHeader(SvStream& rNewStream);
~SvNumReadHeader();
- ULONG BytesLeft() const;
+ sal_uLong BytesLeft() const;
};
class SvNumWriteHeader
{
private:
SvStream& rStream;
- ULONG nDataPos;
- ULONG nDataSize;
+ sal_uLong nDataPos;
+ sal_uLong nDataSize;
public:
- SvNumWriteHeader(SvStream& rNewStream, ULONG nDefault = 0);
+ SvNumWriteHeader(SvStream& rNewStream, sal_uLong nDefault = 0);
~SvNumWriteHeader();
};
@@ -70,8 +70,8 @@ private:
SvStream& rStream;
char* pBuf;
SvMemoryStream* pMemStream;
- ULONG nEndPos;
- ULONG nEntryEnd;
+ sal_uLong nEndPos;
+ sal_uLong nEntryEnd;
public:
ImpSvNumMultipleReadHeader(SvStream& rNewStream);
@@ -79,7 +79,7 @@ public:
void StartEntry();
void EndEntry();
- ULONG BytesLeft() const;
+ sal_uLong BytesLeft() const;
static void Skip( SvStream& ); // komplett ueberspringen
};
@@ -89,12 +89,12 @@ class ImpSvNumMultipleWriteHeader
private:
SvStream& rStream;
SvMemoryStream aMemStream;
- ULONG nDataPos;
+ sal_uLong nDataPos;
sal_uInt32 nDataSize;
- ULONG nEntryStart;
+ sal_uLong nEntryStart;
public:
- ImpSvNumMultipleWriteHeader(SvStream& rNewStream, ULONG nDefault = 0);
+ ImpSvNumMultipleWriteHeader(SvStream& rNewStream, sal_uLong nDefault = 0);
~ImpSvNumMultipleWriteHeader();
void StartEntry();
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index 8c63ed903825..ed845372b76e 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -61,11 +61,11 @@
#endif
-const BYTE ImpSvNumberInputScan::nMatchedEndString = 0x01;
-const BYTE ImpSvNumberInputScan::nMatchedMidString = 0x02;
-const BYTE ImpSvNumberInputScan::nMatchedStartString = 0x04;
-const BYTE ImpSvNumberInputScan::nMatchedVirgin = 0x08;
-const BYTE ImpSvNumberInputScan::nMatchedUsedAsReturn = 0x10;
+const sal_uInt8 ImpSvNumberInputScan::nMatchedEndString = 0x01;
+const sal_uInt8 ImpSvNumberInputScan::nMatchedMidString = 0x02;
+const sal_uInt8 ImpSvNumberInputScan::nMatchedStartString = 0x04;
+const sal_uInt8 ImpSvNumberInputScan::nMatchedVirgin = 0x08;
+const sal_uInt8 ImpSvNumberInputScan::nMatchedUsedAsReturn = 0x10;
/* It is not clear how we want timezones to be handled. Convert them to local
* time isn't wanted, as it isn't done in any other place and timezone
@@ -117,11 +117,11 @@ void ImpSvNumberInputScan::Reset()
// ER 16.06.97 18:56 Vorbelegung erfolgt jetzt in NumberStringDivision,
// wozu immer alles loeschen wenn einiges wieder benutzt oder gar nicht
// gebraucht wird..
- for (USHORT i = 0; i < SV_MAX_ANZ_INPUT_STRINGS; i++)
+ for (sal_uInt16 i = 0; i < SV_MAX_ANZ_INPUT_STRINGS; i++)
{
sStrArray[i].Erase();
nNums[i] = SV_MAX_ANZ_INPUT_STRINGS-1;
- IsNum[i] = FALSE;
+ IsNum[i] = sal_False;
}
#endif
nMonth = 0;
@@ -149,7 +149,7 @@ void ImpSvNumberInputScan::Reset()
//---------------------------------------------------------------------------
//
// static
-inline BOOL ImpSvNumberInputScan::MyIsdigit( sal_Unicode c )
+inline sal_Bool ImpSvNumberInputScan::MyIsdigit( sal_Unicode c )
{
// If the input string wouldn't be converted using TransformInput() we'd
// to use something similar to the following and to adapt many places.
@@ -158,7 +158,7 @@ inline BOOL ImpSvNumberInputScan::MyIsdigit( sal_Unicode c )
if ( c < 128 )
return isdigit( (unsigned char) c ) != 0;
if ( c < 256 )
- return FALSE;
+ return sal_False;
String aTmp( c );
return pFormatter->GetCharClass()->isDigit( aTmp, 0 );
#else
@@ -190,19 +190,19 @@ void ImpSvNumberInputScan::TransformInput( String& rStr )
// Only simple unsigned floating point values without any error detection,
// decimal separator has to be '.'
-double ImpSvNumberInputScan::StringToDouble( const String& rStr, BOOL bForceFraction )
+double ImpSvNumberInputScan::StringToDouble( const String& rStr, sal_Bool bForceFraction )
{
double fNum = 0.0;
double fFrac = 0.0;
int nExp = 0;
xub_StrLen nPos = 0;
xub_StrLen nLen = rStr.Len();
- BOOL bPreSep = !bForceFraction;
+ sal_Bool bPreSep = !bForceFraction;
while (nPos < nLen)
{
if (rStr.GetChar(nPos) == '.')
- bPreSep = FALSE;
+ bPreSep = sal_False;
else if (bPreSep)
fNum = fNum * 10.0 + (double) (rStr.GetChar(nPos) - '0');
else
@@ -246,11 +246,11 @@ enum ScanState // States der Turing-Maschine
SsGetString = 3
};
-BOOL ImpSvNumberInputScan::NextNumberStringSymbol(
+sal_Bool ImpSvNumberInputScan::NextNumberStringSymbol(
const sal_Unicode*& pStr,
String& rSymbol )
{
- BOOL isNumber = FALSE;
+ sal_Bool isNumber = sal_False;
sal_Unicode cToken;
ScanState eState = SsStart;
register const sal_Unicode* pHere = pStr;
@@ -265,7 +265,7 @@ BOOL ImpSvNumberInputScan::NextNumberStringSymbol(
if ( MyIsdigit( cToken ) )
{
eState = SsGetValue;
- isNumber = TRUE;
+ isNumber = sal_True;
}
else
eState = SsGetString;
@@ -311,11 +311,11 @@ BOOL ImpSvNumberInputScan::NextNumberStringSymbol(
// FIXME: should be grouping; it is only used though in case nAnzStrings is
// near SV_MAX_ANZ_INPUT_STRINGS, in NumberStringDivision().
-BOOL ImpSvNumberInputScan::SkipThousands(
+sal_Bool ImpSvNumberInputScan::SkipThousands(
const sal_Unicode*& pStr,
String& rSymbol )
{
- BOOL res = FALSE;
+ sal_Bool res = sal_False;
sal_Unicode cToken;
const String& rThSep = pFormatter->GetNumThousandSep();
register const sal_Unicode* pHere = pStr;
@@ -348,7 +348,7 @@ BOOL ImpSvNumberInputScan::SkipThousands(
if (nCounter == 3)
{
eState = SsStart;
- res = TRUE; // .000 combination found
+ res = sal_True; // .000 combination found
}
}
else
@@ -385,7 +385,7 @@ void ImpSvNumberInputScan::NumberStringDivision( const String& rString )
{
if ( NextNumberStringSymbol( pStr, sStrArray[nAnzStrings] ) )
{ // Zahl
- IsNum[nAnzStrings] = TRUE;
+ IsNum[nAnzStrings] = sal_True;
nNums[nAnzNums] = nAnzStrings;
nAnzNums++;
if (nAnzStrings >= SV_MAX_ANZ_INPUT_STRINGS - 7 &&
@@ -395,7 +395,7 @@ void ImpSvNumberInputScan::NumberStringDivision( const String& rString )
}
else
{
- IsNum[nAnzStrings] = FALSE;
+ IsNum[nAnzStrings] = sal_False;
}
nAnzStrings++;
}
@@ -405,34 +405,34 @@ void ImpSvNumberInputScan::NumberStringDivision( const String& rString )
//---------------------------------------------------------------------------
// Whether rString contains rWhat at nPos
-BOOL ImpSvNumberInputScan::StringContainsImpl( const String& rWhat,
+sal_Bool ImpSvNumberInputScan::StringContainsImpl( const String& rWhat,
const String& rString, xub_StrLen nPos )
{
if ( nPos + rWhat.Len() <= rString.Len() )
return StringPtrContainsImpl( rWhat, rString.GetBuffer(), nPos );
- return FALSE;
+ return sal_False;
}
//---------------------------------------------------------------------------
// Whether pString contains rWhat at nPos
-BOOL ImpSvNumberInputScan::StringPtrContainsImpl( const String& rWhat,
+sal_Bool ImpSvNumberInputScan::StringPtrContainsImpl( const String& rWhat,
const sal_Unicode* pString, xub_StrLen nPos )
{
if ( rWhat.Len() == 0 )
- return FALSE;
+ return sal_False;
register const sal_Unicode* pWhat = rWhat.GetBuffer();
register const sal_Unicode* const pEnd = pWhat + rWhat.Len();
register const sal_Unicode* pStr = pString + nPos;
while ( pWhat < pEnd )
{
if ( *pWhat != *pStr )
- return FALSE;
+ return sal_False;
pWhat++;
pStr++;
}
- return TRUE;
+ return sal_True;
}
@@ -441,15 +441,15 @@ BOOL ImpSvNumberInputScan::StringPtrContainsImpl( const String& rWhat,
//
// ueberspringt genau das angegebene Zeichen
-inline BOOL ImpSvNumberInputScan::SkipChar( sal_Unicode c, const String& rString,
+inline sal_Bool ImpSvNumberInputScan::SkipChar( sal_Unicode c, const String& rString,
xub_StrLen& nPos )
{
if ((nPos < rString.Len()) && (rString.GetChar(nPos) == c))
{
nPos++;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -478,15 +478,15 @@ inline void ImpSvNumberInputScan::SkipBlanks( const String& rString,
//
// jump over rWhat in rString at nPos
-inline BOOL ImpSvNumberInputScan::SkipString( const String& rWhat,
+inline sal_Bool ImpSvNumberInputScan::SkipString( const String& rWhat,
const String& rString, xub_StrLen& nPos )
{
if ( StringContains( rWhat, rString, nPos ) )
{
nPos = nPos + rWhat.Len();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -495,10 +495,10 @@ inline BOOL ImpSvNumberInputScan::SkipString( const String& rWhat,
//
// recognizes exactly ,111 in {3} and {3,2} or ,11 in {3,2} grouping
-inline BOOL ImpSvNumberInputScan::GetThousandSep(
+inline sal_Bool ImpSvNumberInputScan::GetThousandSep(
const String& rString,
xub_StrLen& nPos,
- USHORT nStringPos )
+ sal_uInt16 nStringPos )
{
const String& rSep = pFormatter->GetNumThousandSep();
// Is it an ordinary space instead of a non-breaking space?
@@ -507,7 +507,7 @@ inline BOOL ImpSvNumberInputScan::GetThousandSep(
if (!( (rString == rSep || bSpaceBreak) // nothing else
&& nStringPos < nAnzStrings - 1 // safety first!
&& IsNum[nStringPos+1] )) // number follows
- return FALSE; // no? => out
+ return sal_False; // no? => out
utl::DigitGroupingIterator aGrouping(
pFormatter->GetLocaleData()->getDigitGrouping());
@@ -524,9 +524,9 @@ inline BOOL ImpSvNumberInputScan::GetThousandSep(
)
{
nPos = nPos + rSep.Len();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -534,8 +534,8 @@ inline BOOL ImpSvNumberInputScan::GetThousandSep(
// GetLogical
//
// Conversion of text to logial value
-// "TRUE" => 1:
-// "FALSE"=> -1:
+// "sal_True" => 1:
+// "sal_False"=> -1:
// else => 0:
short ImpSvNumberInputScan::GetLogical( const String& rString )
@@ -642,10 +642,10 @@ int ImpSvNumberInputScan::GetDayOfWeek( const String& rString, xub_StrLen& nPos
// GetCurrency
//
// Lesen eines Waehrungssysmbols
-// '$' => TRUE
-// sonst => FALSE
+// '$' => sal_True
+// sonst => sal_False
-BOOL ImpSvNumberInputScan::GetCurrency( const String& rString, xub_StrLen& nPos,
+sal_Bool ImpSvNumberInputScan::GetCurrency( const String& rString, xub_StrLen& nPos,
const SvNumberformat* pFormat )
{
if ( rString.Len() > nPos )
@@ -660,7 +660,7 @@ BOOL ImpSvNumberInputScan::GetCurrency( const String& rString, xub_StrLen& nPos,
if ( StringContains( aUpperCurrSymbol, rString, nPos ) )
{
nPos = nPos + aUpperCurrSymbol.Len();
- return TRUE;
+ return sal_True;
}
if ( pFormat )
{
@@ -673,14 +673,14 @@ BOOL ImpSvNumberInputScan::GetCurrency( const String& rString, xub_StrLen& nPos,
if ( StringContains( aSymbol, rString, nPos ) )
{
nPos = nPos + aSymbol.Len();
- return TRUE;
+ return sal_True;
}
}
}
}
}
- return FALSE;
+ return sal_False;
}
@@ -690,15 +690,15 @@ BOOL ImpSvNumberInputScan::GetCurrency( const String& rString, xub_StrLen& nPos,
// Lesen des Zeitsymbols (AM od. PM) f. kurze Zeitangabe
//
// Rueckgabe:
-// "AM" od. "PM" => TRUE
-// sonst => FALSE
+// "AM" od. "PM" => sal_True
+// sonst => sal_False
//
// nAmPos:
// "AM" => 1
// "PM" => -1
// sonst => 0
-BOOL ImpSvNumberInputScan::GetTimeAmPm( const String& rString, xub_StrLen& nPos )
+sal_Bool ImpSvNumberInputScan::GetTimeAmPm( const String& rString, xub_StrLen& nPos )
{
if ( rString.Len() > nPos )
@@ -709,17 +709,17 @@ BOOL ImpSvNumberInputScan::GetTimeAmPm( const String& rString, xub_StrLen& nPos
{
nAmPm = 1;
nPos = nPos + pLoc->getTimeAM().Len();
- return TRUE;
+ return sal_True;
}
else if ( StringContains( pChr->upper( pLoc->getTimePM() ), rString, nPos ) )
{
nAmPm = -1;
nPos = nPos + pLoc->getTimePM().Len();
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
@@ -727,10 +727,10 @@ BOOL ImpSvNumberInputScan::GetTimeAmPm( const String& rString, xub_StrLen& nPos
// GetDecSep
//
// Lesen eines Dezimaltrenners (',')
-// ',' => TRUE
-// sonst => FALSE
+// ',' => sal_True
+// sonst => sal_False
-inline BOOL ImpSvNumberInputScan::GetDecSep( const String& rString, xub_StrLen& nPos )
+inline sal_Bool ImpSvNumberInputScan::GetDecSep( const String& rString, xub_StrLen& nPos )
{
if ( rString.Len() > nPos )
{
@@ -738,17 +738,17 @@ inline BOOL ImpSvNumberInputScan::GetDecSep( const String& rString, xub_StrLen&
if ( rString.Equals( rSep, nPos, rSep.Len() ) )
{
nPos = nPos + rSep.Len();
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
//---------------------------------------------------------------------------
// read a hundredth seconds separator
-inline BOOL ImpSvNumberInputScan::GetTime100SecSep( const String& rString, xub_StrLen& nPos )
+inline sal_Bool ImpSvNumberInputScan::GetTime100SecSep( const String& rString, xub_StrLen& nPos )
{
if ( rString.Len() > nPos )
{
@@ -756,10 +756,10 @@ inline BOOL ImpSvNumberInputScan::GetTime100SecSep( const String& rString, xub_S
if ( rString.Equals( rSep, nPos, rSep.Len() ) )
{
nPos = nPos + rSep.Len();
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
@@ -827,15 +827,15 @@ short ImpSvNumberInputScan::GetESign( const String& rString, xub_StrLen& nPos )
// i counts string portions, j counts numbers thereof.
// It should had been called SkipNumber instead.
-inline BOOL ImpSvNumberInputScan::GetNextNumber( USHORT& i, USHORT& j )
+inline sal_Bool ImpSvNumberInputScan::GetNextNumber( sal_uInt16& i, sal_uInt16& j )
{
if ( i < nAnzStrings && IsNum[i] )
{
j++;
i++;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -844,19 +844,19 @@ inline BOOL ImpSvNumberInputScan::GetNextNumber( USHORT& i, USHORT& j )
void ImpSvNumberInputScan::GetTimeRef(
double& fOutNumber,
- USHORT nIndex, // j-value of the first numeric time part of input, default 0
- USHORT nAnz ) // count of numeric time parts
+ sal_uInt16 nIndex, // j-value of the first numeric time part of input, default 0
+ sal_uInt16 nAnz ) // count of numeric time parts
{
- USHORT nHour;
- USHORT nMinute = 0;
- USHORT nSecond = 0;
+ sal_uInt16 nHour;
+ sal_uInt16 nMinute = 0;
+ sal_uInt16 nSecond = 0;
double fSecond100 = 0.0;
- USHORT nStartIndex = nIndex;
+ sal_uInt16 nStartIndex = nIndex;
if (nTimezonePos)
{
// find first timezone number index and adjust count
- for (USHORT j=0; j<nAnzNums; ++j)
+ for (sal_uInt16 j=0; j<nAnzNums; ++j)
{
if (nNums[j] == nTimezonePos)
{
@@ -871,7 +871,7 @@ void ImpSvNumberInputScan::GetTimeRef(
if (nDecPos == 2 && (nAnz == 3 || nAnz == 2)) // 20:45.5 or 45.5
nHour = 0;
else if (nIndex - nStartIndex < nAnz)
- nHour = (USHORT) sStrArray[nNums[nIndex++]].ToInt32();
+ nHour = (sal_uInt16) sStrArray[nNums[nIndex++]].ToInt32();
else
{
nHour = 0;
@@ -880,11 +880,11 @@ void ImpSvNumberInputScan::GetTimeRef(
if (nDecPos == 2 && nAnz == 2) // 45.5
nMinute = 0;
else if (nIndex - nStartIndex < nAnz)
- nMinute = (USHORT) sStrArray[nNums[nIndex++]].ToInt32();
+ nMinute = (sal_uInt16) sStrArray[nNums[nIndex++]].ToInt32();
if (nIndex - nStartIndex < nAnz)
- nSecond = (USHORT) sStrArray[nNums[nIndex++]].ToInt32();
+ nSecond = (sal_uInt16) sStrArray[nNums[nIndex++]].ToInt32();
if (nIndex - nStartIndex < nAnz)
- fSecond100 = StringToDouble( sStrArray[nNums[nIndex]], TRUE );
+ fSecond100 = StringToDouble( sStrArray[nNums[nIndex]], sal_True );
if (nAmPm == -1 && nHour != 12) // PM
nHour += 12;
else if (nAmPm == 1 && nHour == 12) // 12 AM
@@ -900,13 +900,13 @@ void ImpSvNumberInputScan::GetTimeRef(
//---------------------------------------------------------------------------
// ImplGetDay
-USHORT ImpSvNumberInputScan::ImplGetDay( USHORT nIndex )
+sal_uInt16 ImpSvNumberInputScan::ImplGetDay( sal_uInt16 nIndex )
{
- USHORT nRes = 0;
+ sal_uInt16 nRes = 0;
if (sStrArray[nNums[nIndex]].Len() <= 2)
{
- USHORT nNum = (USHORT) sStrArray[nNums[nIndex]].ToInt32();
+ sal_uInt16 nNum = (sal_uInt16) sStrArray[nNums[nIndex]].ToInt32();
if (nNum <= 31)
nRes = nNum;
}
@@ -918,14 +918,14 @@ USHORT ImpSvNumberInputScan::ImplGetDay( USHORT nIndex )
//---------------------------------------------------------------------------
// ImplGetMonth
-USHORT ImpSvNumberInputScan::ImplGetMonth( USHORT nIndex )
+sal_uInt16 ImpSvNumberInputScan::ImplGetMonth( sal_uInt16 nIndex )
{
// preset invalid month number
- USHORT nRes = pFormatter->GetCalendar()->getNumberOfMonthsInYear();
+ sal_uInt16 nRes = pFormatter->GetCalendar()->getNumberOfMonthsInYear();
if (sStrArray[nNums[nIndex]].Len() <= 2)
{
- USHORT nNum = (USHORT) sStrArray[nNums[nIndex]].ToInt32();
+ sal_uInt16 nNum = (sal_uInt16) sStrArray[nNums[nIndex]].ToInt32();
if ( 0 < nNum && nNum <= nRes )
nRes = nNum - 1; // zero based for CalendarFieldIndex::MONTH
}
@@ -939,13 +939,13 @@ USHORT ImpSvNumberInputScan::ImplGetMonth( USHORT nIndex )
//
// 30 -> 1930, 29 -> 2029, oder 56 -> 1756, 55 -> 1855, ...
-USHORT ImpSvNumberInputScan::ImplGetYear( USHORT nIndex )
+sal_uInt16 ImpSvNumberInputScan::ImplGetYear( sal_uInt16 nIndex )
{
- USHORT nYear = 0;
+ sal_uInt16 nYear = 0;
if (sStrArray[nNums[nIndex]].Len() <= 4)
{
- nYear = (USHORT) sStrArray[nNums[nIndex]].ToInt32();
+ nYear = (sal_uInt16) sStrArray[nNums[nIndex]].ToInt32();
nYear = SvNumberFormatter::ExpandTwoDigitYear( nYear, nYear2000 );
}
@@ -970,7 +970,7 @@ bool ImpSvNumberInputScan::MayBeIso8601()
//---------------------------------------------------------------------------
// GetDateRef
-BOOL ImpSvNumberInputScan::GetDateRef( double& fDays, USHORT& nCounter,
+sal_Bool ImpSvNumberInputScan::GetDateRef( double& fDays, sal_uInt16& nCounter,
const SvNumberformat* pFormat )
{
using namespace ::com::sun::star::i18n;
@@ -997,7 +997,7 @@ BOOL ImpSvNumberInputScan::GetDateRef( double& fDays, USHORT& nCounter,
eEDF = NF_EVALDATEFORMAT_INTL;
nFormatOrder = 1;
}
- BOOL res = TRUE;
+ sal_Bool res = sal_True;
const LocaleDataWrapper* pLoc = pFormatter->GetLocaleData();
CalendarWrapper* pCal = pFormatter->GetCalendar();
@@ -1006,45 +1006,45 @@ BOOL ImpSvNumberInputScan::GetDateRef( double& fDays, USHORT& nCounter,
pCal->setGregorianDateTime( Date() ); // today
String aOrgCalendar; // empty => not changed yet
DateFormat DateFmt;
- BOOL bFormatTurn;
+ sal_Bool bFormatTurn;
switch ( eEDF )
{
case NF_EVALDATEFORMAT_INTL :
- bFormatTurn = FALSE;
+ bFormatTurn = sal_False;
DateFmt = pLoc->getDateFormat();
break;
case NF_EVALDATEFORMAT_FORMAT :
- bFormatTurn = TRUE;
+ bFormatTurn = sal_True;
DateFmt = pFormat->GetDateOrder();
break;
case NF_EVALDATEFORMAT_INTL_FORMAT :
if ( nTryOrder == 1 )
{
- bFormatTurn = FALSE;
+ bFormatTurn = sal_False;
DateFmt = pLoc->getDateFormat();
}
else
{
- bFormatTurn = TRUE;
+ bFormatTurn = sal_True;
DateFmt = pFormat->GetDateOrder();
}
break;
case NF_EVALDATEFORMAT_FORMAT_INTL :
if ( nTryOrder == 2 )
{
- bFormatTurn = FALSE;
+ bFormatTurn = sal_False;
DateFmt = pLoc->getDateFormat();
}
else
{
- bFormatTurn = TRUE;
+ bFormatTurn = sal_True;
DateFmt = pFormat->GetDateOrder();
}
break;
default:
DBG_ERROR( "ImpSvNumberInputScan::GetDateRef: unknown NfEvalDateFormat" );
DateFmt = YMD;
- bFormatTurn = FALSE;
+ bFormatTurn = sal_False;
}
if ( bFormatTurn )
{
@@ -1083,7 +1083,7 @@ input for the following reasons:
#endif
}
- res = TRUE;
+ res = sal_True;
nCounter = 0;
// For incomplete dates, always assume first day of month if not specified.
pCal->setValue( CalendarFieldIndex::DAY_OF_MONTH, 1 );
@@ -1094,7 +1094,7 @@ input for the following reasons:
if (nMonthPos) // only month (Jan)
pCal->setValue( CalendarFieldIndex::MONTH, Abs(nMonth)-1 );
else
- res = FALSE;
+ res = sal_False;
break;
case 1: // only one number
@@ -1116,7 +1116,7 @@ input for the following reasons:
pCal->setValue( CalendarFieldIndex::YEAR, ImplGetYear(0) );
break;
default:
- res = FALSE;
+ res = sal_False;
break;
}
break;
@@ -1131,12 +1131,12 @@ input for the following reasons:
pCal->setValue( CalendarFieldIndex::YEAR, ImplGetYear(0) );
break;
default:
- res = FALSE;
+ res = sal_False;
break;
}
break;
default:
- res = FALSE;
+ res = sal_False;
break;
} // switch (nMonthPos)
break;
@@ -1223,7 +1223,7 @@ input for the following reasons:
}
break;
default:
- res = FALSE;
+ res = sal_False;
break;
}
}
@@ -1262,12 +1262,12 @@ input for the following reasons:
pCal->setValue( CalendarFieldIndex::YEAR, ImplGetYear(0) );
break;
default:
- res = FALSE;
+ res = sal_False;
break;
}
break;
default: // else, e.g. month at the end (94 10 Jan)
- res = FALSE;
+ res = sal_False;
break;
} // switch (nMonthPos)
break;
@@ -1280,7 +1280,7 @@ input for the following reasons:
nCounter = 3;
if ( nTimePos > 1 )
{ // find first time number index (should only be 3 or 2 anyway)
- for ( USHORT j = 0; j < nAnzNums; j++ )
+ for ( sal_uInt16 j = 0; j < nAnzNums; j++ )
{
if ( nNums[j] == nTimePos - 2 )
{
@@ -1312,7 +1312,7 @@ input for the following reasons:
pCal->setValue( CalendarFieldIndex::YEAR, ImplGetYear(0) );
break;
default:
- res = FALSE;
+ res = sal_False;
break;
}
}
@@ -1327,7 +1327,7 @@ input for the following reasons:
pCal->setValue( CalendarFieldIndex::YEAR, ImplGetYear(1) );
break;
default:
- res = FALSE;
+ res = sal_False;
break;
}
break;
@@ -1345,13 +1345,13 @@ input for the following reasons:
pCal->setValue( CalendarFieldIndex::YEAR, ImplGetYear(0) );
break;
default:
- res = FALSE;
+ res = sal_False;
break;
}
break;
default: // else, e.g. month at the end (94 10 Jan 8:23)
nCounter = 2;
- res = FALSE;
+ res = sal_False;
break;
} // switch (nMonthPos)
break;
@@ -1365,7 +1365,7 @@ input for the following reasons:
nTryOrder = nFormatOrder; // break for
}
else
- res = FALSE;
+ res = sal_False;
if ( aOrgCalendar.Len() )
pCal->loadCalendar( aOrgCalendar, pLoc->getLocale() ); // restore calendar
@@ -1463,10 +1463,10 @@ input for the following reasons:
// ScanStartString
//
// ersten String analysieren
-// Alles weg => TRUE
-// sonst => FALSE
+// Alles weg => sal_True
+// sonst => sal_False
-BOOL ImpSvNumberInputScan::ScanStartString( const String& rString,
+sal_Bool ImpSvNumberInputScan::ScanStartString( const String& rString,
const SvNumberformat* pFormat )
{
xub_StrLen nPos = 0;
@@ -1485,7 +1485,7 @@ BOOL ImpSvNumberInputScan::ScanStartString( const String& rString,
{ // Match against format in any case, so later on for a "x1-2-3" input
// we may distinguish between a xy-m-d (or similar) date and a x0-0-0
// format. No sign detection here!
- if ( ScanStringNumFor( rString, nPos, pFormat, 0, TRUE ) )
+ if ( ScanStringNumFor( rString, nPos, pFormat, 0, sal_True ) )
nMatchedAllStrings |= nMatchedStartString;
else
nMatchedAllStrings = 0;
@@ -1558,7 +1558,7 @@ BOOL ImpSvNumberInputScan::ScanStartString( const String& rString,
return MatchedReturn();
}
- return TRUE;
+ return sal_True;
}
@@ -1566,11 +1566,11 @@ BOOL ImpSvNumberInputScan::ScanStartString( const String& rString,
// ScanMidString
//
// String in der Mitte analysieren
-// Alles weg => TRUE
-// sonst => FALSE
+// Alles weg => sal_True
+// sonst => sal_False
-BOOL ImpSvNumberInputScan::ScanMidString( const String& rString,
- USHORT nStringPos, const SvNumberformat* pFormat )
+sal_Bool ImpSvNumberInputScan::ScanMidString( const String& rString,
+ sal_uInt16 nStringPos, const SvNumberformat* pFormat )
{
xub_StrLen nPos = 0;
short eOldScannedType = eScannedType;
@@ -1800,10 +1800,10 @@ BOOL ImpSvNumberInputScan::ScanMidString( const String& rString,
if ( nMatchedAllStrings & ~nMatchedVirgin )
eScannedType = eOldScannedType;
else
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
@@ -1811,10 +1811,10 @@ BOOL ImpSvNumberInputScan::ScanMidString( const String& rString,
// ScanEndString
//
// Schlussteil analysieren
-// Alles weg => TRUE
-// sonst => FALSE
+// Alles weg => sal_True
+// sonst => sal_False
-BOOL ImpSvNumberInputScan::ScanEndString( const String& rString,
+sal_Bool ImpSvNumberInputScan::ScanEndString( const String& rString,
const SvNumberformat* pFormat )
{
xub_StrLen nPos = 0;
@@ -2045,30 +2045,30 @@ BOOL ImpSvNumberInputScan::ScanEndString( const String& rString,
{
// does input EndString equal EndString in Format?
if ( !ScanStringNumFor( rString, nPos, pFormat, 0xFFFF ) )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
-BOOL ImpSvNumberInputScan::ScanStringNumFor(
+sal_Bool ImpSvNumberInputScan::ScanStringNumFor(
const String& rString, // String to scan
xub_StrLen nPos, // Position until which was consumed
const SvNumberformat* pFormat, // The format to match
- USHORT nString, // Substring of format, 0xFFFF => last
- BOOL bDontDetectNegation // Suppress sign detection
+ sal_uInt16 nString, // Substring of format, 0xFFFF => last
+ sal_Bool bDontDetectNegation // Suppress sign detection
)
{
if ( !pFormat )
- return FALSE;
+ return sal_False;
const ::utl::TransliterationWrapper* pTransliteration = pFormatter->GetTransliteration();
const String* pStr;
String aString( rString );
- BOOL bFound = FALSE;
- BOOL bFirst = TRUE;
- BOOL bContinue = TRUE;
- USHORT nSub;
+ sal_Bool bFound = sal_False;
+ sal_Bool bFirst = sal_True;
+ sal_Bool bContinue = sal_True;
+ sal_uInt16 nSub;
do
{
// Don't try "lower" subformats ff the very first match was the second
@@ -2077,22 +2077,22 @@ BOOL ImpSvNumberInputScan::ScanStringNumFor(
do
{ // Step through subformats, first positive, then negative, then
// other, but not the last (text) subformat.
- pStr = pFormat->GetNumForString( nSub, nString, TRUE );
+ pStr = pFormat->GetNumForString( nSub, nString, sal_True );
if ( pStr && pTransliteration->isEqual( aString, *pStr ) )
{
- bFound = TRUE;
- bContinue = FALSE;
+ bFound = sal_True;
+ bContinue = sal_False;
}
else if ( nSub < 2 )
++nSub;
else
- bContinue = FALSE;
+ bContinue = sal_False;
} while ( bContinue );
if ( !bFound && bFirst && nPos )
{ // try remaining substring
- bFirst = FALSE;
+ bFirst = sal_False;
aString.Erase( 0, nPos );
- bContinue = TRUE;
+ bContinue = sal_True;
}
} while ( bContinue );
@@ -2104,13 +2104,13 @@ BOOL ImpSvNumberInputScan::ScanStringNumFor(
aString.EraseAllChars( ' ' );
if ( (aString.Len() == 1) && (aString.GetChar(0) == '-') )
{
- bFound = TRUE;
+ bFound = sal_True;
nStringScanSign = -1;
nSub = 0; //! not 1
}
}
if ( !bFound )
- return FALSE;
+ return sal_False;
}
else if ( !bDontDetectNegation && (nSub == 1) &&
pFormat->IsNegativeRealNegative() )
@@ -2138,7 +2138,7 @@ BOOL ImpSvNumberInputScan::ScanStringNumFor(
nStringScanSign = -1;
}
nStringScanNumFor = nSub;
- return TRUE;
+ return sal_True;
}
@@ -2146,9 +2146,9 @@ BOOL ImpSvNumberInputScan::ScanStringNumFor(
// IsNumberFormatMain
//
// Recognizes types of number, exponential, fraction, percent, currency, date, time.
-// Else text => return FALSE
+// Else text => return sal_False
-BOOL ImpSvNumberInputScan::IsNumberFormatMain(
+sal_Bool ImpSvNumberInputScan::IsNumberFormatMain(
const String& rString, // string to be analyzed
double& , // OUT: result as number, if possible
const SvNumberformat* pFormat ) // maybe number format set to match against
@@ -2156,7 +2156,7 @@ BOOL ImpSvNumberInputScan::IsNumberFormatMain(
Reset();
NumberStringDivision( rString ); // breakdown into strings and numbers
if (nAnzStrings >= SV_MAX_ANZ_INPUT_STRINGS) // too many elements
- return FALSE; // Njet, Nope, ...
+ return sal_False; // Njet, Nope, ...
if (nAnzNums == 0) // no number in input
{
@@ -2172,17 +2172,17 @@ BOOL ImpSvNumberInputScan::IsNumberFormatMain(
{
eScannedType = NUMBERFORMAT_LOGICAL; // !!! it's a BOOLEAN
nMatchedAllStrings &= ~nMatchedVirgin;
- return TRUE;
+ return sal_True;
}
else
- return FALSE; // simple text
+ return sal_False; // simple text
}
else
- return FALSE; // simple text
+ return sal_False; // simple text
}
- USHORT i = 0; // mark any symbol
- USHORT j = 0; // mark only numbers
+ sal_uInt16 i = 0; // mark any symbol
+ sal_uInt16 j = 0; // mark only numbers
switch ( nAnzNums )
{
@@ -2197,14 +2197,14 @@ BOOL ImpSvNumberInputScan::IsNumberFormatMain(
{
eScannedType = NUMBERFORMAT_FRACTION;
nMatchedAllStrings &= ~nMatchedVirgin;
- return TRUE;
+ return sal_True;
}
}
}
else
{ // Analyze start string
if (!ScanStartString( sStrArray[i], pFormat )) // i=0
- return FALSE; // already an error
+ return sal_False; // already an error
i++; // next symbol, i=1
}
GetNextNumber(i,j); // i=1,2
@@ -2219,11 +2219,11 @@ BOOL ImpSvNumberInputScan::IsNumberFormatMain(
{
eScannedType = NUMBERFORMAT_FRACTION;
nMatchedAllStrings &= ~nMatchedVirgin;
- return TRUE;
+ return sal_True;
}
}
if (i < nAnzStrings && !ScanEndString( sStrArray[i], pFormat ))
- return FALSE;
+ return sal_False;
}
break;
case 2 : // Exactly 2 numbers in input
@@ -2231,16 +2231,16 @@ BOOL ImpSvNumberInputScan::IsNumberFormatMain(
if (!GetNextNumber(i,j)) // i=1,0
{ // Analyze start string
if (!ScanStartString( sStrArray[i], pFormat ))
- return FALSE; // already an error
+ return sal_False; // already an error
i++; // i=1
}
GetNextNumber(i,j); // i=1,2
if ( !ScanMidString( sStrArray[i], i, pFormat ) )
- return FALSE;
+ return sal_False;
i++; // next symbol, i=2,3
GetNextNumber(i,j); // i=3,4
if (i < nAnzStrings && !ScanEndString( sStrArray[i], pFormat ))
- return FALSE;
+ return sal_False;
if (eSetType == NUMBERFORMAT_FRACTION) // -1,200. as fraction
{
if (!nNegCheck && // no sign '('
@@ -2250,7 +2250,7 @@ BOOL ImpSvNumberInputScan::IsNumberFormatMain(
{
eScannedType = NUMBERFORMAT_FRACTION;
nMatchedAllStrings &= ~nMatchedVirgin;
- return TRUE;
+ return sal_True;
}
}
}
@@ -2260,24 +2260,24 @@ BOOL ImpSvNumberInputScan::IsNumberFormatMain(
if (!GetNextNumber(i,j)) // i=1,0
{ // Analyze start string
if (!ScanStartString( sStrArray[i], pFormat ))
- return FALSE; // already an error
+ return sal_False; // already an error
i++; // i=1
if (nDecPos == 1) // decimal separator at start => error
- return FALSE;
+ return sal_False;
}
GetNextNumber(i,j); // i=1,2
if ( !ScanMidString( sStrArray[i], i, pFormat ) )
- return FALSE;
+ return sal_False;
i++; // i=2,3
if (eScannedType == NUMBERFORMAT_SCIENTIFIC) // E only at end
- return FALSE;
+ return sal_False;
GetNextNumber(i,j); // i=3,4
if ( !ScanMidString( sStrArray[i], i, pFormat ) )
- return FALSE;
+ return sal_False;
i++; // i=4,5
GetNextNumber(i,j); // i=5,6
if (i < nAnzStrings && !ScanEndString( sStrArray[i], pFormat ))
- return FALSE;
+ return sal_False;
if (eSetType == NUMBERFORMAT_FRACTION) // -1,200,100. as fraction
{
if (!nNegCheck && // no sign '('
@@ -2287,11 +2287,11 @@ BOOL ImpSvNumberInputScan::IsNumberFormatMain(
{
eScannedType = NUMBERFORMAT_FRACTION;
nMatchedAllStrings &= ~nMatchedVirgin;
- return TRUE;
+ return sal_True;
}
}
if ( eScannedType == NUMBERFORMAT_FRACTION && nDecPos )
- return FALSE; // #36857# not a real fraction
+ return sal_False; // #36857# not a real fraction
}
break;
default: // More than 3 numbers in input
@@ -2299,45 +2299,45 @@ BOOL ImpSvNumberInputScan::IsNumberFormatMain(
if (!GetNextNumber(i,j)) // i=1,0
{ // Analyze startstring
if (!ScanStartString( sStrArray[i], pFormat ))
- return FALSE; // already an error
+ return sal_False; // already an error
i++; // i=1
if (nDecPos == 1) // decimal separator at start => error
- return FALSE;
+ return sal_False;
}
GetNextNumber(i,j); // i=1,2
if ( !ScanMidString( sStrArray[i], i, pFormat ) )
- return FALSE;
+ return sal_False;
i++; // i=2,3
- USHORT nThOld = 10; // just not 0 or 1
+ sal_uInt16 nThOld = 10; // just not 0 or 1
while (nThOld != nThousand && j < nAnzNums-1)
// Execute at least one time
// but leave one number.
{ // Loop over group separators
nThOld = nThousand;
if (eScannedType == NUMBERFORMAT_SCIENTIFIC) // E only at end
- return FALSE;
+ return sal_False;
GetNextNumber(i,j);
if ( i < nAnzStrings && !ScanMidString( sStrArray[i], i, pFormat ) )
- return FALSE;
+ return sal_False;
i++;
}
if (eScannedType == NUMBERFORMAT_DATE || // long date or
eScannedType == NUMBERFORMAT_TIME || // long time or
eScannedType == NUMBERFORMAT_UNDEFINED) // long number
{
- for (USHORT k = j; k < nAnzNums-1; k++)
+ for (sal_uInt16 k = j; k < nAnzNums-1; k++)
{
if (eScannedType == NUMBERFORMAT_SCIENTIFIC) // E only at endd
- return FALSE;
+ return sal_False;
GetNextNumber(i,j);
if ( i < nAnzStrings && !ScanMidString( sStrArray[i], i, pFormat ) )
- return FALSE;
+ return sal_False;
i++;
}
}
GetNextNumber(i,j);
if (i < nAnzStrings && !ScanEndString( sStrArray[i], pFormat ))
- return FALSE;
+ return sal_False;
if (eSetType == NUMBERFORMAT_FRACTION) // -1,200,100. as fraction
{
if (!nNegCheck && // no sign '('
@@ -2347,11 +2347,11 @@ BOOL ImpSvNumberInputScan::IsNumberFormatMain(
{
eScannedType = NUMBERFORMAT_FRACTION;
nMatchedAllStrings &= ~nMatchedVirgin;
- return TRUE;
+ return sal_True;
}
}
if ( eScannedType == NUMBERFORMAT_FRACTION && nDecPos )
- return FALSE; // #36857# not a real fraction
+ return sal_False; // #36857# not a real fraction
}
}
@@ -2359,18 +2359,18 @@ BOOL ImpSvNumberInputScan::IsNumberFormatMain(
{
nMatchedAllStrings &= ~nMatchedVirgin;
// did match including nMatchedUsedAsReturn
- BOOL bDidMatch = (nMatchedAllStrings != 0);
+ sal_Bool bDidMatch = (nMatchedAllStrings != 0);
if ( nMatchedAllStrings )
{
- BOOL bMatch = (pFormat ? pFormat->IsNumForStringElementCountEqual(
- nStringScanNumFor, nAnzStrings, nAnzNums ) : FALSE);
+ sal_Bool bMatch = (pFormat ? pFormat->IsNumForStringElementCountEqual(
+ nStringScanNumFor, nAnzStrings, nAnzNums ) : sal_False);
if ( !bMatch )
nMatchedAllStrings = 0;
}
if ( nMatchedAllStrings )
eScannedType = eSetType;
else if ( bDidMatch )
- return FALSE;
+ return sal_False;
else
eScannedType = NUMBERFORMAT_NUMBER;
// everything else should have been recognized by now
@@ -2378,36 +2378,36 @@ BOOL ImpSvNumberInputScan::IsNumberFormatMain(
else if ( eScannedType == NUMBERFORMAT_DATE )
{ // the very relaxed date input checks may interfere with a preset format
nMatchedAllStrings &= ~nMatchedVirgin;
- BOOL bWasReturn = ((nMatchedAllStrings & nMatchedUsedAsReturn) != 0);
+ sal_Bool bWasReturn = ((nMatchedAllStrings & nMatchedUsedAsReturn) != 0);
if ( nMatchedAllStrings )
{
- BOOL bMatch = (pFormat ? pFormat->IsNumForStringElementCountEqual(
- nStringScanNumFor, nAnzStrings, nAnzNums ) : FALSE);
+ sal_Bool bMatch = (pFormat ? pFormat->IsNumForStringElementCountEqual(
+ nStringScanNumFor, nAnzStrings, nAnzNums ) : sal_False);
if ( !bMatch )
nMatchedAllStrings = 0;
}
if ( nMatchedAllStrings )
eScannedType = eSetType;
else if ( bWasReturn )
- return FALSE;
+ return sal_False;
}
else
nMatchedAllStrings = 0; // reset flag to no substrings matched
- return TRUE;
+ return sal_True;
}
//---------------------------------------------------------------------------
-// return TRUE or FALSE depending on the nMatched... state and remember usage
-BOOL ImpSvNumberInputScan::MatchedReturn()
+// return sal_True or sal_False depending on the nMatched... state and remember usage
+sal_Bool ImpSvNumberInputScan::MatchedReturn()
{
if ( nMatchedAllStrings & ~nMatchedVirgin )
{
nMatchedAllStrings |= nMatchedUsedAsReturn;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -2442,7 +2442,7 @@ void ImpSvNumberInputScan::InitText()
pUpperDayText[j] = pChrCls->upper( xElems[j].FullName );
pUpperAbbrevDayText[j] = pChrCls->upper( xElems[j].AbbrevName );
}
- bTextInitialized = TRUE;
+ bTextInitialized = sal_True;
}
@@ -2461,7 +2461,7 @@ void ImpSvNumberInputScan::ChangeIntl()
cDecSep == '/' ||
cDecSep == '.' ||
cDecSep == pFormatter->GetDateSep().GetChar(0) );
- bTextInitialized = FALSE;
+ bTextInitialized = sal_False;
aUpperCurrSymbol.Erase();
}
@@ -2470,9 +2470,9 @@ void ImpSvNumberInputScan::ChangeIntl()
// ChangeNullDate
void ImpSvNumberInputScan::ChangeNullDate(
- const USHORT Day,
- const USHORT Month,
- const USHORT Year )
+ const sal_uInt16 Day,
+ const sal_uInt16 Month,
+ const sal_uInt16 Year )
{
if ( pNullDate )
*pNullDate = Date(Day, Month, Year);
@@ -2486,7 +2486,7 @@ void ImpSvNumberInputScan::ChangeNullDate(
//
// => does rString represent a number (also date, time et al)
-BOOL ImpSvNumberInputScan::IsNumberFormat(
+sal_Bool ImpSvNumberInputScan::IsNumberFormat(
const String& rString, // string to be analyzed
short& F_Type, // IN: old type, OUT: new type
double& fOutNumber, // OUT: number if convertable
@@ -2494,13 +2494,13 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
{
String sResString;
String aString;
- BOOL res; // return value
+ sal_Bool res; // return value
eSetType = F_Type; // old type set
if ( !rString.Len() )
- res = FALSE;
+ res = sal_False;
else if (rString.Len() > 308) // arbitrary
- res = FALSE;
+ res = sal_False;
else
{
// NoMoreUpperNeeded, all comparisons on UpperCase
@@ -2516,7 +2516,7 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
|| (nSign && (eScannedType == NUMBERFORMAT_DATE
|| eScannedType == NUMBERFORMAT_DATETIME))
) // signed date/datetime
- res = FALSE;
+ res = sal_False;
else
{ // check count of partial number strings
switch (eScannedType)
@@ -2530,7 +2530,7 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
if ( nMatchedAllStrings )
nThousand = nAnzNums - 1;
else if ( nAnzNums != 1 )
- res = FALSE;
+ res = sal_False;
}
else if (nDecPos == 2) // 1.05
{
@@ -2538,7 +2538,7 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
if ( nMatchedAllStrings )
nThousand = nAnzNums - 1;
else if ( nAnzNums != nThousand+2 )
- res = FALSE;
+ res = sal_False;
}
else // 1,100 or 1,100.
{
@@ -2546,7 +2546,7 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
if ( nMatchedAllStrings )
nThousand = nAnzNums - 1;
else if ( nAnzNums != nThousand+1 )
- res = FALSE;
+ res = sal_False;
}
break;
@@ -2554,17 +2554,17 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
if (nDecPos == 1) // .05
{
if (nAnzNums != 2)
- res = FALSE;
+ res = sal_False;
}
else if (nDecPos == 2) // 1.05
{
if (nAnzNums != nThousand+3)
- res = FALSE;
+ res = sal_False;
}
else // 1,100 or 1,100.
{
if (nAnzNums != nThousand+2)
- res = FALSE;
+ res = sal_False;
}
break;
@@ -2572,12 +2572,12 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
if (nMonth)
{ // month name and numbers
if (nAnzNums > 2)
- res = FALSE;
+ res = sal_False;
}
else
{
if (nAnzNums > 3)
- res = FALSE;
+ res = sal_False;
}
break;
@@ -2585,12 +2585,12 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
if (nDecPos)
{ // hundredth seconds included
if (nAnzNums > 4)
- res = FALSE;
+ res = sal_False;
}
else
{
if (nAnzNums > 3)
- res = FALSE;
+ res = sal_False;
}
break;
@@ -2600,12 +2600,12 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
if (nDecPos)
{ // hundredth seconds included
if (nAnzNums > 6)
- res = FALSE;
+ res = sal_False;
}
else
{
if (nAnzNums > 5)
- res = FALSE;
+ res = sal_False;
}
}
else
@@ -2613,12 +2613,12 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
if (nDecPos)
{ // hundredth seconds included
if (nAnzNums > 7)
- res = FALSE;
+ res = sal_False;
}
else
{
if (nAnzNums > 6)
- res = FALSE;
+ res = sal_False;
}
}
break;
@@ -2639,7 +2639,7 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
else if (nLogical == -1)
fOutNumber = 0.0; // False
else
- res = FALSE; // Oops
+ res = sal_False; // Oops
break;
case NUMBERFORMAT_PERCENT:
@@ -2652,13 +2652,13 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
sResString.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "0." ) );
else
sResString.Erase();
- USHORT k;
+ sal_uInt16 k;
for ( k = 0; k <= nThousand; k++)
sResString += sStrArray[nNums[k]]; // integer part
if ( nDecPos == 2 && k < nAnzNums ) // . somewhere
{
sResString += '.';
- USHORT nStop = (eScannedType == NUMBERFORMAT_SCIENTIFIC ?
+ sal_uInt16 nStop = (eScannedType == NUMBERFORMAT_SCIENTIFIC ?
nAnzNums-1 : nAnzNums);
for ( ; k < nStop; k++)
sResString += sStrArray[nNums[k]]; // fractional part
@@ -2682,7 +2682,7 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
fOutNumber = 0.0;
else
fOutNumber = DBL_MAX;
-/*!*/ return TRUE;
+/*!*/ return sal_True;
}
}
@@ -2719,12 +2719,12 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
if (fNenner != 0.0)
fOutNumber = fZaehler/fNenner;
else
- res = FALSE;
+ res = sal_False;
}
}
else // nAnzNums > 2
{
- USHORT k = 1;
+ sal_uInt16 k = 1;
sResString = sStrArray[nNums[0]];
if (nThousand > 0)
for (k = 1; k <= nThousand; k++)
@@ -2738,7 +2738,7 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
if (fNenner != 0.0)
fOutNumber += fZaehler/fNenner;
else
- res = FALSE;
+ res = sal_False;
}
}
@@ -2761,14 +2761,14 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
case NUMBERFORMAT_DATE:
{
- USHORT nCounter = 0; // dummy here
+ sal_uInt16 nCounter = 0; // dummy here
res = GetDateRef( fOutNumber, nCounter, pFormat );
}
break;
case NUMBERFORMAT_DATETIME:
{
- USHORT nCounter = 0; // needed here
+ sal_uInt16 nCounter = 0; // needed here
res = GetDateRef( fOutNumber, nCounter, pFormat );
if ( res )
{
@@ -2792,17 +2792,17 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
{
F_Type = NUMBERFORMAT_TEXT;
fOutNumber = -DBL_MAX;
- return TRUE;
+ return sal_True;
}
else if (fOutNumber > DBL_MAX) // 1.7E308
{
F_Type = NUMBERFORMAT_TEXT;
fOutNumber = DBL_MAX;
- return TRUE;
+ return sal_True;
}
}
- if (res == FALSE)
+ if (res == sal_False)
{
eScannedType = NUMBERFORMAT_TEXT;
fOutNumber = 0.0;
diff --git a/svl/source/numbers/zforfind.hxx b/svl/source/numbers/zforfind.hxx
index 42571f56dd92..3dc7976f6a59 100644
--- a/svl/source/numbers/zforfind.hxx
+++ b/svl/source/numbers/zforfind.hxx
@@ -46,12 +46,12 @@ public:
/// set reference date for offset calculation
void ChangeNullDate(
- const USHORT nDay,
- const USHORT nMonth,
- const USHORT nYear );
+ const sal_uInt16 nDay,
+ const sal_uInt16 nMonth,
+ const sal_uInt16 nYear );
/// convert input string to number
- BOOL IsNumberFormat(
+ sal_Bool IsNumberFormat(
const String& rString, /// input string
short& F_Type, /// format type (in + out)
double& fOutNumber, /// value determined (out)
@@ -61,12 +61,12 @@ public:
/// after IsNumberFormat: get decimal position
short GetDecPos() const { return nDecPos; }
/// after IsNumberFormat: get count of numeric substrings in input string
- USHORT GetAnzNums() const { return nAnzNums; }
+ sal_uInt16 GetAnzNums() const { return nAnzNums; }
/// set threshold of two-digit year input
- void SetYear2000( USHORT nVal ) { nYear2000 = nVal; }
+ void SetYear2000( sal_uInt16 nVal ) { nYear2000 = nVal; }
/// get threshold of two-digit year input
- USHORT GetYear2000() const { return nYear2000; }
+ sal_uInt16 GetYear2000() const { return nYear2000; }
private:
SvNumberFormatter* pFormatter;
@@ -75,50 +75,50 @@ private:
String* pUpperDayText; // Array of day of week names, uppercase
String* pUpperAbbrevDayText; // Array of day of week names, abbreviated, uppercase
String aUpperCurrSymbol; // Currency symbol, uppercase
- BOOL bTextInitialized; // Whether days and months are initialized
+ sal_Bool bTextInitialized; // Whether days and months are initialized
Date* pNullDate; // 30Dec1899
// Variables for provisional results:
String sStrArray[SV_MAX_ANZ_INPUT_STRINGS]; // Array of scanned substrings
- BOOL IsNum[SV_MAX_ANZ_INPUT_STRINGS]; // Whether a substring is numeric
- USHORT nNums[SV_MAX_ANZ_INPUT_STRINGS]; // Sequence of offsets to numeric strings
- USHORT nAnzStrings; // Total count of scanned substrings
- USHORT nAnzNums; // Count of numeric substrings
- BOOL bDecSepInDateSeps; // True <=> DecSep in {.,-,/,DateSep}
- BYTE nMatchedAllStrings; // Scan...String() matched all substrings,
+ sal_Bool IsNum[SV_MAX_ANZ_INPUT_STRINGS]; // Whether a substring is numeric
+ sal_uInt16 nNums[SV_MAX_ANZ_INPUT_STRINGS]; // Sequence of offsets to numeric strings
+ sal_uInt16 nAnzStrings; // Total count of scanned substrings
+ sal_uInt16 nAnzNums; // Count of numeric substrings
+ sal_Bool bDecSepInDateSeps; // True <=> DecSep in {.,-,/,DateSep}
+ sal_uInt8 nMatchedAllStrings; // Scan...String() matched all substrings,
// bit mask of nMatched... constants
- static const BYTE nMatchedEndString; // 0x01
- static const BYTE nMatchedMidString; // 0x02
- static const BYTE nMatchedStartString; // 0x04
- static const BYTE nMatchedVirgin; // 0x08
- static const BYTE nMatchedUsedAsReturn; // 0x10
+ static const sal_uInt8 nMatchedEndString; // 0x01
+ static const sal_uInt8 nMatchedMidString; // 0x02
+ static const sal_uInt8 nMatchedStartString; // 0x04
+ static const sal_uInt8 nMatchedVirgin; // 0x08
+ static const sal_uInt8 nMatchedUsedAsReturn; // 0x10
int nSign; // Sign of number
short nMonth; // Month (1..x) if date
// negative => short format
short nMonthPos; // 1 = front, 2 = middle
// 3 = end
- USHORT nTimePos; // Index of first time separator (+1)
+ sal_uInt16 nTimePos; // Index of first time separator (+1)
short nDecPos; // Index of substring containing "," (+1)
short nNegCheck; // '( )' for negative
short nESign; // Sign of exponent
short nAmPm; // +1 AM, -1 PM, 0 if none
short nLogical; // -1 => False, 1 => True
- USHORT nThousand; // Count of group (AKA thousand) separators
- USHORT nPosThousandString; // Position of concatenaded 000,000,000 string
+ sal_uInt16 nThousand; // Count of group (AKA thousand) separators
+ sal_uInt16 nPosThousandString; // Position of concatenaded 000,000,000 string
short eScannedType; // Scanned type
short eSetType; // Preset Type
- USHORT nStringScanNumFor; // Fixed strings recognized in
+ sal_uInt16 nStringScanNumFor; // Fixed strings recognized in
// pFormat->NumFor[nNumForStringScan]
short nStringScanSign; // Sign resulting of FixString
- USHORT nYear2000; // Two-digit threshold
+ sal_uInt16 nYear2000; // Two-digit threshold
// Year as 20xx
// default 18
// number <= nYear2000 => 20xx
// number > nYear2000 => 19xx
- USHORT nTimezonePos; // Index of timezone separator (+1)
- BYTE nMayBeIso8601; // 0:=dontknowyet, 1:=yes, 2:=no
+ sal_uInt16 nTimezonePos; // Index of timezone separator (+1)
+ sal_uInt8 nMayBeIso8601; // 0:=dontknowyet, 1:=yes, 2:=no
#ifdef _ZFORFIND_CXX // methods private to implementation
void Reset(); // Reset all variables before start of analysis
@@ -128,17 +128,17 @@ private:
// Convert string to double.
// Only simple unsigned floating point values without any error detection,
// decimal separator has to be '.'
- // If bForceFraction==TRUE the string is taken to be the fractional part
+ // If bForceFraction==sal_True the string is taken to be the fractional part
// of 0.1234 without the leading 0. (thus being just "1234").
double StringToDouble(
const String& rStr,
- BOOL bForceFraction = FALSE );
+ sal_Bool bForceFraction = sal_False );
- BOOL NextNumberStringSymbol( // Next number/string symbol
+ sal_Bool NextNumberStringSymbol( // Next number/string symbol
const sal_Unicode*& pStr,
String& rSymbol );
- BOOL SkipThousands( // Concatenate ,000,23 blocks
+ sal_Bool SkipThousands( // Concatenate ,000,23 blocks
const sal_Unicode*& pStr, // in input to 000123
String& rSymbol );
@@ -150,50 +150,50 @@ private:
// optimized substring versions
- static inline BOOL StringContains( // Whether rString contains rWhat at nPos
+ static inline sal_Bool StringContains( // Whether rString contains rWhat at nPos
const String& rWhat,
const String& rString,
xub_StrLen nPos )
{ // mostly used with one character
if ( rWhat.GetChar(0) != rString.GetChar(nPos) )
- return FALSE;
+ return sal_False;
return StringContainsImpl( rWhat, rString, nPos );
}
- static inline BOOL StringPtrContains( // Whether pString contains rWhat at nPos
+ static inline sal_Bool StringPtrContains( // Whether pString contains rWhat at nPos
const String& rWhat,
const sal_Unicode* pString,
xub_StrLen nPos ) // nPos MUST be a valid offset from pString
{ // mostly used with one character
if ( rWhat.GetChar(0) != *(pString+nPos) )
- return FALSE;
+ return sal_False;
return StringPtrContainsImpl( rWhat, pString, nPos );
}
- static BOOL StringContainsImpl( //! DO NOT use directly
+ static sal_Bool StringContainsImpl( //! DO NOT use directly
const String& rWhat,
const String& rString,
xub_StrLen nPos );
- static BOOL StringPtrContainsImpl( //! DO NOT use directly
+ static sal_Bool StringPtrContainsImpl( //! DO NOT use directly
const String& rWhat,
const sal_Unicode* pString,
xub_StrLen nPos );
- static inline BOOL SkipChar( // Skip a special character
+ static inline sal_Bool SkipChar( // Skip a special character
sal_Unicode c,
const String& rString,
xub_StrLen& nPos );
static inline void SkipBlanks( // Skip blank
const String& rString,
xub_StrLen& nPos );
- static inline BOOL SkipString( // Jump over rWhat in rString at nPos
+ static inline sal_Bool SkipString( // Jump over rWhat in rString at nPos
const String& rWhat,
const String& rString,
xub_StrLen& nPos );
- inline BOOL GetThousandSep( // Recognizes exactly ,111 as group separator
+ inline sal_Bool GetThousandSep( // Recognizes exactly ,111 as group separator
const String& rString,
xub_StrLen& nPos,
- USHORT nStringPos );
+ sal_uInt16 nStringPos );
short GetLogical( // Get boolean value
const String& rString );
short GetMonth( // Get month and advance string position
@@ -202,17 +202,17 @@ private:
int GetDayOfWeek( // Get day of week and advance string position
const String& rString,
xub_StrLen& nPos );
- BOOL GetCurrency( // Get currency symbol and advance string position
+ sal_Bool GetCurrency( // Get currency symbol and advance string position
const String& rString,
xub_StrLen& nPos,
const SvNumberformat* pFormat = NULL ); // optional number format to match against
- BOOL GetTimeAmPm( // Get symbol AM or PM and advance string position
+ sal_Bool GetTimeAmPm( // Get symbol AM or PM and advance string position
const String& rString,
xub_StrLen& nPos );
- inline BOOL GetDecSep( // Get decimal separator and advance string position
+ inline sal_Bool GetDecSep( // Get decimal separator and advance string position
const String& rString,
xub_StrLen& nPos );
- inline BOOL GetTime100SecSep( // Get hundredth seconds separator and advance string position
+ inline sal_Bool GetTime100SecSep( // Get hundredth seconds separator and advance string position
const String& rString,
xub_StrLen& nPos );
int GetSign( // Get sign and advance string position
@@ -222,30 +222,30 @@ private:
const String& rString,
xub_StrLen& nPos );
- inline BOOL GetNextNumber( // Get next number as array offset
- USHORT& i,
- USHORT& j );
+ inline sal_Bool GetNextNumber( // Get next number as array offset
+ sal_uInt16& i,
+ sal_uInt16& j );
void GetTimeRef( // Converts time -> double (only decimals)
double& fOutNumber, // result as double
- USHORT nIndex, // Index of hour in input
- USHORT nAnz ); // Count of time substrings in input
- USHORT ImplGetDay ( USHORT nIndex ); // Day input, 0 if no match
- USHORT ImplGetMonth( USHORT nIndex ); // Month input, zero based return, NumberOfMonths if no match
- USHORT ImplGetYear ( USHORT nIndex ); // Year input, 0 if no match
- BOOL GetDateRef( // Conversion of date to number
+ sal_uInt16 nIndex, // Index of hour in input
+ sal_uInt16 nAnz ); // Count of time substrings in input
+ sal_uInt16 ImplGetDay ( sal_uInt16 nIndex ); // Day input, 0 if no match
+ sal_uInt16 ImplGetMonth( sal_uInt16 nIndex ); // Month input, zero based return, NumberOfMonths if no match
+ sal_uInt16 ImplGetYear ( sal_uInt16 nIndex ); // Year input, 0 if no match
+ sal_Bool GetDateRef( // Conversion of date to number
double& fDays, // OUT: days diff to null date
- USHORT& nCounter, // Count of date substrings
+ sal_uInt16& nCounter, // Count of date substrings
const SvNumberformat* pFormat = NULL ); // optional number format to match against
- BOOL ScanStartString( // Analyze start of string
+ sal_Bool ScanStartString( // Analyze start of string
const String& rString,
const SvNumberformat* pFormat = NULL );
- BOOL ScanMidString( // Analyze middle substring
+ sal_Bool ScanMidString( // Analyze middle substring
const String& rString,
- USHORT nStringPos,
+ sal_uInt16 nStringPos,
const SvNumberformat* pFormat = NULL );
- BOOL ScanEndString( // Analyze end of string
+ sal_Bool ScanEndString( // Analyze end of string
const String& rString,
const SvNumberformat* pFormat = NULL );
@@ -255,27 +255,27 @@ private:
// Compare rString to substring of array indexed by nString
// nString == 0xFFFF => last substring
- BOOL ScanStringNumFor(
+ sal_Bool ScanStringNumFor(
const String& rString,
xub_StrLen nPos,
const SvNumberformat* pFormat,
- USHORT nString,
- BOOL bDontDetectNegation = FALSE );
+ sal_uInt16 nString,
+ sal_Bool bDontDetectNegation = sal_False );
- // if nMatchedAllStrings set nMatchedUsedAsReturn and return TRUE,
- // else do nothing and return FALSE
- BOOL MatchedReturn();
+ // if nMatchedAllStrings set nMatchedUsedAsReturn and return sal_True,
+ // else do nothing and return sal_False
+ sal_Bool MatchedReturn();
//! Be sure that the string to be analyzed is already converted to upper
//! case and if it contained native humber digits that they are already
//! converted to ASCII.
- BOOL IsNumberFormatMain( // Main anlyzing function
+ sal_Bool IsNumberFormatMain( // Main anlyzing function
const String& rString,
double& fOutNumber, // return value if string is numeric
const SvNumberformat* pFormat = NULL // optional number format to match against
);
- static inline BOOL MyIsdigit( sal_Unicode c );
+ static inline sal_Bool MyIsdigit( sal_Unicode c );
// native number transliteration if necessary
void TransformInput( String& rString );
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 7343a0a9c0e6..ebc1fa673fe2 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -88,7 +88,7 @@ using namespace ::com::sun::star::lang;
* (old currency) is recognized as a date (#53155#). */
#define UNKNOWN_SUBSTITUTE LANGUAGE_ENGLISH_US
-static BOOL bIndexTableInitialized = FALSE;
+static sal_Bool bIndexTableInitialized = sal_False;
static sal_uInt32 __FAR_DATA theIndexTable[NF_INDEX_TABLE_ENTRIES];
@@ -160,7 +160,7 @@ void SvNumberFormatterRegistry_Impl::ConfigurationChanged( utl::ConfigurationBro
// ====================================================================
SvNumberFormatterRegistry_Impl* SvNumberFormatter::pFormatterRegistry = NULL;
-BOOL SvNumberFormatter::bCurrencyTableInitialized = FALSE;
+sal_Bool SvNumberFormatter::bCurrencyTableInitialized = sal_False;
namespace
{
struct theCurrencyTable :
@@ -169,7 +169,7 @@ namespace
struct theLegacyOnlyCurrencyTable :
public rtl::Static< NfCurrencyTable, theLegacyOnlyCurrencyTable > {};
}
-USHORT SvNumberFormatter::nSystemCurrencyPosition = 0;
+sal_uInt16 SvNumberFormatter::nSystemCurrencyPosition = 0;
SV_IMPL_PTRARR( NfCurrencyTable, NfCurrencyEntry* );
SV_IMPL_PTRARR( NfWSStringsDtor, String* );
@@ -254,9 +254,9 @@ void SvNumberFormatter::ImpConstruct( LanguageType eLang )
pFormatScanner = new ImpSvNumberformatScan( this );
pFormatTable = NULL;
MaxCLOffset = 0;
- ImpGenerateFormats( 0, FALSE ); // 0 .. 999 for initialized language formats
+ ImpGenerateFormats( 0, sal_False ); // 0 .. 999 for initialized language formats
pMergeTable = NULL;
- bNoZero = FALSE;
+ bNoZero = sal_False;
::osl::MutexGuard aGuard( GetMutex() );
GetFormatterRegistry().Insert( this );
@@ -316,7 +316,7 @@ SvNumberFormatterRegistry_Impl& SvNumberFormatter::GetFormatterRegistry()
}
-Color* SvNumberFormatter::GetUserDefColor(USHORT nIndex)
+Color* SvNumberFormatter::GetUserDefColor(sal_uInt16 nIndex)
{
if( aColorLink.IsSet() )
return (Color*) ( aColorLink.Call( (void*) &nIndex ));
@@ -324,9 +324,9 @@ Color* SvNumberFormatter::GetUserDefColor(USHORT nIndex)
return NULL;
}
-void SvNumberFormatter::ChangeNullDate(USHORT nDay,
- USHORT nMonth,
- USHORT nYear)
+void SvNumberFormatter::ChangeNullDate(sal_uInt16 nDay,
+ sal_uInt16 nMonth,
+ sal_uInt16 nYear)
{
pFormatScanner->ChangeNullDate(nDay, nMonth, nYear);
pStringScanner->ChangeNullDate(nDay, nMonth, nYear);
@@ -347,7 +347,7 @@ sal_uInt16 SvNumberFormatter::GetStandardPrec()
return pFormatScanner->GetStandardPrec();
}
-void SvNumberFormatter::ImpChangeSysCL( LanguageType eLnge, BOOL bLoadingSO5 )
+void SvNumberFormatter::ImpChangeSysCL( LanguageType eLnge, sal_Bool bLoadingSO5 )
{
if (eLnge == LANGUAGE_DONTKNOW)
eLnge = UNKNOWN_SUBSTITUTE;
@@ -408,12 +408,12 @@ void SvNumberFormatter::ReplaceSystemCL( LanguageType eOldLanguage )
// reset ActLnge otherwise ChangeIntl() wouldn't switch if already LANGUAGE_SYSTEM
ActLnge = LANGUAGE_DONTKNOW;
ChangeIntl( LANGUAGE_SYSTEM );
- ImpGenerateFormats( nCLOffset, TRUE );
+ ImpGenerateFormats( nCLOffset, sal_True );
// convert additional and user defined from old system to new system
SvNumberformat* pStdFormat = (SvNumberformat*) aFTable.Get( nCLOffset + ZF_STANDARD );
sal_uInt32 nLastKey = nMaxBuiltin;
- pFormatScanner->SetConvertMode( eOldLanguage, LANGUAGE_SYSTEM, TRUE );
+ pFormatScanner->SetConvertMode( eOldLanguage, LANGUAGE_SYSTEM, sal_True );
aOldTable.First();
while ( aOldTable.Count() )
{
@@ -428,7 +428,7 @@ void SvNumberFormatter::ReplaceSystemCL( LanguageType eOldLanguage )
// a duplicate. Also won't mix up any LastInsertKey.
ChangeIntl( eOldLanguage );
LanguageType eLge = eOldLanguage; // ConvertMode changes this
- BOOL bCheck = FALSE;
+ sal_Bool bCheck = sal_False;
SvNumberformat* pNewEntry = new SvNumberformat( aString, pFormatScanner,
pStringScanner, nCheckPos, eLge );
if ( nCheckPos != 0 )
@@ -444,40 +444,40 @@ void SvNumberFormatter::ReplaceSystemCL( LanguageType eOldLanguage )
if ( !aFTable.Insert( nKey, pNewEntry ) )
delete pNewEntry;
else
- bCheck = TRUE;
+ bCheck = sal_True;
}
DBG_ASSERT( bCheck, "SvNumberFormatter::ReplaceSystemCL: couldn't convert" );
delete pOldEntry;
}
- pFormatScanner->SetConvertMode(FALSE);
- pStdFormat->SetLastInsertKey( USHORT(nLastKey - nCLOffset) );
+ pFormatScanner->SetConvertMode(sal_False);
+ pStdFormat->SetLastInsertKey( sal_uInt16(nLastKey - nCLOffset) );
// append new system additional formats
NumberFormatCodeWrapper aNumberFormatCode( xServiceManager, GetLocale() );
- ImpGenerateAdditionalFormats( nCLOffset, aNumberFormatCode, TRUE );
+ ImpGenerateAdditionalFormats( nCLOffset, aNumberFormatCode, sal_True );
}
-BOOL SvNumberFormatter::IsTextFormat(sal_uInt32 F_Index) const
+sal_Bool SvNumberFormatter::IsTextFormat(sal_uInt32 F_Index) const
{
SvNumberformat* pFormat = (SvNumberformat*) aFTable.Get(F_Index);
if (!pFormat)
- return FALSE;
+ return sal_False;
else
return pFormat->IsTextFormat();
}
-BOOL SvNumberFormatter::HasTextFormat(sal_uInt32 F_Index) const
+sal_Bool SvNumberFormatter::HasTextFormat(sal_uInt32 F_Index) const
{
SvNumberformat* pFormat = (SvNumberformat*) aFTable.Get(F_Index);
if (!pFormat)
- return FALSE;
+ return sal_False;
else
return pFormat->HasTextFormat();
}
-BOOL SvNumberFormatter::PutEntry(String& rString,
+sal_Bool SvNumberFormatter::PutEntry(String& rString,
xub_StrLen& nCheckPos,
short& nType,
sal_uInt32& nKey, // Formatnummer
@@ -487,14 +487,14 @@ BOOL SvNumberFormatter::PutEntry(String& rString,
if (rString.Len() == 0) // keinen Leerstring
{
nCheckPos = 1; // -> Fehler
- return FALSE;
+ return sal_False;
}
if (eLnge == LANGUAGE_DONTKNOW)
eLnge = IniLnge;
ChangeIntl(eLnge); // ggfs. austauschen
LanguageType eLge = eLnge; // Umgehung const fuer ConvertMode
- BOOL bCheck = FALSE;
+ sal_Bool bCheck = sal_False;
SvNumberformat* p_Entry = new SvNumberformat(rString,
pFormatScanner,
pStringScanner,
@@ -532,9 +532,9 @@ BOOL SvNumberFormatter::PutEntry(String& rString,
delete p_Entry;
else
{
- bCheck = TRUE;
+ bCheck = sal_True;
nKey = nPos+1;
- pStdFormat->SetLastInsertKey((USHORT) (nKey-CLOffset));
+ pStdFormat->SetLastInsertKey((sal_uInt16) (nKey-CLOffset));
}
}
}
@@ -543,48 +543,48 @@ BOOL SvNumberFormatter::PutEntry(String& rString,
return bCheck;
}
-BOOL SvNumberFormatter::PutandConvertEntry(String& rString,
+sal_Bool SvNumberFormatter::PutandConvertEntry(String& rString,
xub_StrLen& nCheckPos,
short& nType,
sal_uInt32& nKey,
LanguageType eLnge,
LanguageType eNewLnge)
{
- BOOL bRes;
+ sal_Bool bRes;
if (eNewLnge == LANGUAGE_DONTKNOW)
eNewLnge = IniLnge;
pFormatScanner->SetConvertMode(eLnge, eNewLnge);
bRes = PutEntry(rString, nCheckPos, nType, nKey, eLnge);
- pFormatScanner->SetConvertMode(FALSE);
+ pFormatScanner->SetConvertMode(sal_False);
return bRes;
}
-BOOL SvNumberFormatter::PutandConvertEntrySystem(String& rString,
+sal_Bool SvNumberFormatter::PutandConvertEntrySystem(String& rString,
xub_StrLen& nCheckPos,
short& nType,
sal_uInt32& nKey,
LanguageType eLnge,
LanguageType eNewLnge)
{
- BOOL bRes;
+ sal_Bool bRes;
if (eNewLnge == LANGUAGE_DONTKNOW)
eNewLnge = IniLnge;
- pFormatScanner->SetConvertMode(eLnge, eNewLnge, TRUE);
+ pFormatScanner->SetConvertMode(eLnge, eNewLnge, sal_True);
bRes = PutEntry(rString, nCheckPos, nType, nKey, eLnge);
- pFormatScanner->SetConvertMode(FALSE);
+ pFormatScanner->SetConvertMode(sal_False);
return bRes;
}
sal_uInt32 SvNumberFormatter::GetIndexPuttingAndConverting( String & rString,
LanguageType eLnge, LanguageType eSysLnge, short & rType,
- BOOL & rNewInserted, xub_StrLen & rCheckPos )
+ sal_Bool & rNewInserted, xub_StrLen & rCheckPos )
{
sal_uInt32 nKey = NUMBERFORMAT_ENTRY_NOT_FOUND;
- rNewInserted = FALSE;
+ rNewInserted = sal_False;
rCheckPos = 0;
// #62389# empty format string (of Writer) => General standard format
@@ -639,7 +639,7 @@ sal_uInt32 SvNumberFormatter::GetIndexPuttingAndConverting( String & rString,
if (rNewInserted)
{
DeleteEntry( nKey); // don't leave trails of rubbish
- rNewInserted = FALSE;
+ rNewInserted = sal_False;
}
nKey = GetStandardFormat( NUMBERFORMAT_CURRENCY, eLnge);
}
@@ -659,7 +659,7 @@ void SvNumberFormatter::PrepareSave()
SvNumberformat* pFormat = aFTable.First();
while (pFormat)
{
- pFormat->SetUsed(FALSE);
+ pFormat->SetUsed(sal_False);
pFormat = aFTable.Next();
}
}
@@ -668,41 +668,41 @@ void SvNumberFormatter::SetFormatUsed(sal_uInt32 nFIndex)
{
SvNumberformat* pFormat = (SvNumberformat*) aFTable.Get(nFIndex);
if (pFormat)
- pFormat->SetUsed(TRUE);
+ pFormat->SetUsed(sal_True);
}
-BOOL SvNumberFormatter::Load( SvStream& rStream )
+sal_Bool SvNumberFormatter::Load( SvStream& rStream )
{
LanguageType eSysLang = SvtSysLocale().GetLanguage();
SvNumberFormatter* pConverter = NULL;
ImpSvNumMultipleReadHeader aHdr( rStream );
- USHORT nVersion;
+ sal_uInt16 nVersion;
rStream >> nVersion;
SvNumberformat* pEntry;
sal_uInt32 nPos;
LanguageType eSaveSysLang, eLoadSysLang;
- USHORT nSysOnStore, eLge, eDummy; // Dummy fuer kompatibles Format
+ sal_uInt16 nSysOnStore, eLge, eDummy; // Dummy fuer kompatibles Format
rStream >> nSysOnStore >> eLge; // Systemeinstellung aus
// Dokument
eSaveSysLang = (nVersion < SV_NUMBERFORMATTER_VERSION_SYSTORE ?
LANGUAGE_SYSTEM : (LanguageType) nSysOnStore);
LanguageType eLnge = (LanguageType) eLge;
- ImpChangeSysCL( eLnge, TRUE );
+ ImpChangeSysCL( eLnge, sal_True );
rStream >> nPos;
while (nPos != NUMBERFORMAT_ENTRY_NOT_FOUND)
{
rStream >> eDummy >> eLge;
eLnge = (LanguageType) eLge;
- ImpGenerateCL( eLnge, TRUE ); // ggfs. neue Standardformate anlegen
+ ImpGenerateCL( eLnge, sal_True ); // ggfs. neue Standardformate anlegen
sal_uInt32 nOffset = nPos % SV_COUNTRY_LANGUAGE_OFFSET; // relativIndex
- BOOL bUserDefined = (nOffset > SV_MAX_ANZ_STANDARD_FORMATE);
+ sal_Bool bUserDefined = (nOffset > SV_MAX_ANZ_STANDARD_FORMATE);
//! HACK! ER 29.07.97 15:15
// SaveLang wurde bei SYSTEM nicht gespeichert sondern war auch SYSTEM,
// erst ab 364i Unterscheidung moeglich
- BOOL bConversionHack;
+ sal_Bool bConversionHack;
if ( eLnge == LANGUAGE_SYSTEM )
{
if ( nVersion < SV_NUMBERFORMATTER_VERSION_SYSTORE )
@@ -712,13 +712,13 @@ BOOL SvNumberFormatter::Load( SvStream& rStream )
}
else
{
- bConversionHack = FALSE;
+ bConversionHack = sal_False;
eLoadSysLang = eSysLang;
}
}
else
{
- bConversionHack = FALSE;
+ bConversionHack = sal_False;
eLoadSysLang = eSaveSysLang;
}
@@ -735,7 +735,7 @@ BOOL SvNumberFormatter::Load( SvStream& rStream )
{
case NF_CONVERT_GERMAN_ENGLISH :
pEntry->ConvertLanguage( *pConverter,
- LANGUAGE_ENGLISH_US, eSysLang, TRUE );
+ LANGUAGE_ENGLISH_US, eSysLang, sal_True );
break;
case NF_CONVERT_ENGLISH_GERMAN :
switch ( eSysLang )
@@ -749,7 +749,7 @@ BOOL SvNumberFormatter::Load( SvStream& rStream )
break;
default:
pEntry->ConvertLanguage( *pConverter,
- LANGUAGE_GERMAN, eSysLang, TRUE );
+ LANGUAGE_GERMAN, eSysLang, sal_True );
}
break;
case NF_CONVERT_NONE :
@@ -779,33 +779,33 @@ BOOL SvNumberFormatter::Load( SvStream& rStream )
case LANGUAGE_GERMAN_LIECHTENSTEIN:
// alles beim alten
pEntry->ConvertLanguage( *pConverter,
- eSaveSysLang, eLoadSysLang, TRUE );
+ eSaveSysLang, eLoadSysLang, sal_True );
break;
default:
// alte english nach neuem anderen
pEntry->ConvertLanguage( *pConverter,
- LANGUAGE_ENGLISH_US, eLoadSysLang, TRUE );
+ LANGUAGE_ENGLISH_US, eLoadSysLang, sal_True );
}
}
else
pEntry->ConvertLanguage( *pConverter,
- eSaveSysLang, eLoadSysLang, TRUE );
+ eSaveSysLang, eLoadSysLang, sal_True );
}
else
{ // nicht SYSTEM oder gleiches SYSTEM
if ( nVersion < SV_NUMBERFORMATTER_VERSION_KEYWORDS )
{
LanguageType eLoadLang;
- BOOL bSystem;
+ sal_Bool bSystem;
if ( eLnge == LANGUAGE_SYSTEM )
{
eLoadLang = eSysLang;
- bSystem = TRUE;
+ bSystem = sal_True;
}
else
{
eLoadLang = eLnge;
- bSystem = FALSE;
+ bSystem = sal_False;
}
switch ( eLoadLang )
{
@@ -842,9 +842,9 @@ BOOL SvNumberFormatter::Load( SvStream& rStream )
if ( nVersion >= SV_NUMBERFORMATTER_VERSION_YEAR2000 )
{
aHdr.StartEntry();
- if ( aHdr.BytesLeft() >= sizeof(UINT16) )
+ if ( aHdr.BytesLeft() >= sizeof(sal_uInt16) )
{
- UINT16 nY2k;
+ sal_uInt16 nY2k;
rStream >> nY2k;
if ( nVersion < SV_NUMBERFORMATTER_VERSION_TWODIGITYEAR && nY2k < 100 )
nY2k += 1901; // war vor src513e: 29, jetzt: 1930
@@ -861,28 +861,28 @@ BOOL SvNumberFormatter::Load( SvStream& rStream )
NumberFormatCodeWrapper aNumberFormatCode( xServiceManager, GetLocale() );
SvUShorts aList;
GetUsedLanguages( aList );
- USHORT nCount = aList.Count();
- for ( USHORT j=0; j<nCount; j++ )
+ sal_uInt16 nCount = aList.Count();
+ for ( sal_uInt16 j=0; j<nCount; j++ )
{
LanguageType eLang = aList[j];
ChangeIntl( eLang );
sal_uInt32 CLOffset = ImpGetCLOffset( eLang );
- ImpGenerateAdditionalFormats( CLOffset, aNumberFormatCode, TRUE );
+ ImpGenerateAdditionalFormats( CLOffset, aNumberFormatCode, sal_True );
}
ChangeIntl( eOldLanguage );
if (rStream.GetError())
- return FALSE;
+ return sal_False;
else
- return TRUE;
+ return sal_True;
}
-BOOL SvNumberFormatter::Save( SvStream& rStream ) const
+sal_Bool SvNumberFormatter::Save( SvStream& rStream ) const
{
ImpSvNumMultipleWriteHeader aHdr( rStream );
// ab 364i wird gespeichert was SYSTEM wirklich war, vorher hart LANGUAGE_SYSTEM
- rStream << (USHORT) SV_NUMBERFORMATTER_VERSION;
- rStream << (USHORT) SvtSysLocale().GetLanguage() << (USHORT) IniLnge;
+ rStream << (sal_uInt16) SV_NUMBERFORMATTER_VERSION;
+ rStream << (sal_uInt16) SvtSysLocale().GetLanguage() << (sal_uInt16) IniLnge;
SvNumberFormatTable* pTable = (SvNumberFormatTable*) &aFTable;
SvNumberformat* pEntry = (SvNumberformat*) pTable->First();
while (pEntry)
@@ -895,8 +895,8 @@ BOOL SvNumberFormatter::Save( SvStream& rStream ) const
(pTable->GetCurKey() % SV_COUNTRY_LANGUAGE_OFFSET == 0) )
{
rStream << static_cast<sal_uInt32>(pTable->GetCurKey())
- << (USHORT) LANGUAGE_SYSTEM
- << (USHORT) pEntry->GetLanguage();
+ << (sal_uInt16) LANGUAGE_SYSTEM
+ << (sal_uInt16) pEntry->GetLanguage();
pEntry->Save(rStream, aHdr);
}
pEntry = (SvNumberformat*) pTable->Next();
@@ -905,13 +905,13 @@ BOOL SvNumberFormatter::Save( SvStream& rStream ) const
// ab SV_NUMBERFORMATTER_VERSION_YEAR2000
aHdr.StartEntry();
- rStream << (UINT16) GetYear2000();
+ rStream << (sal_uInt16) GetYear2000();
aHdr.EndEntry();
if (rStream.GetError())
- return FALSE;
+ return sal_False;
else
- return TRUE;
+ return sal_True;
}
// static
@@ -940,14 +940,14 @@ void SvNumberFormatter::FillKeywordTable( NfKeywordTable& rKeywords,
{
ChangeIntl( eLang );
const String* pTable = pFormatScanner->GetKeywords();
- for ( USHORT i = 0; i < NF_KEYWORD_ENTRIES_COUNT; ++i )
+ for ( sal_uInt16 i = 0; i < NF_KEYWORD_ENTRIES_COUNT; ++i )
{
rKeywords[i] = pTable[i];
}
}
-String SvNumberFormatter::GetKeyword( LanguageType eLnge, USHORT nIndex )
+String SvNumberFormatter::GetKeyword( LanguageType eLnge, sal_uInt16 nIndex )
{
ChangeIntl(eLnge);
const String* pTable = pFormatScanner->GetKeywords();
@@ -1065,7 +1065,7 @@ SvNumberFormatTable& SvNumberFormatter::GetFirstEntryTable(
return GetEntryTable(eTypetmp, FIndex, rLnge);
}
-sal_uInt32 SvNumberFormatter::ImpGenerateCL( LanguageType eLnge, BOOL bLoadingSO5 )
+sal_uInt32 SvNumberFormatter::ImpGenerateCL( LanguageType eLnge, sal_Bool bLoadingSO5 )
{
ChangeIntl(eLnge);
sal_uInt32 CLOffset = ImpGetCLOffset(ActLnge);
@@ -1187,7 +1187,7 @@ SvNumberFormatTable& SvNumberFormatter::GetEntryTable(
return *pFormatTable;
}
-BOOL SvNumberFormatter::IsNumberFormat(const String& sString,
+sal_Bool SvNumberFormatter::IsNumberFormat(const String& sString,
sal_uInt32& F_Index,
double& fOutNumber)
{
@@ -1206,12 +1206,12 @@ BOOL SvNumberFormatter::IsNumberFormat(const String& sString,
FType = NUMBERFORMAT_DEFINED;
ChangeIntl(pFormat->GetLanguage());
}
- BOOL res;
+ sal_Bool res;
short RType = FType;
// Ergebnistyp
// ohne def-Kennung
if (RType == NUMBERFORMAT_TEXT) // Zahlzelle ->Stringz.
- res = FALSE;
+ res = sal_False;
else
res = pStringScanner->IsNumberFormat(sString, RType, fOutNumber, pFormat);
@@ -1241,13 +1241,13 @@ BOOL SvNumberFormatter::IsNumberFormat(const String& sString,
return res;
}
-BOOL SvNumberFormatter::IsCompatible(short eOldType,
+sal_Bool SvNumberFormatter::IsCompatible(short eOldType,
short eNewType)
{
if (eOldType == eNewType)
- return TRUE;
+ return sal_True;
else if (eOldType == NUMBERFORMAT_DEFINED)
- return TRUE;
+ return sal_True;
else
{
switch (eNewType)
@@ -1262,9 +1262,9 @@ BOOL SvNumberFormatter::IsCompatible(short eOldType,
case NUMBERFORMAT_FRACTION:
// case NUMBERFORMAT_LOGICAL:
case NUMBERFORMAT_DEFINED:
- return TRUE;
+ return sal_True;
default:
- return FALSE;
+ return sal_False;
}
}
break;
@@ -1273,9 +1273,9 @@ BOOL SvNumberFormatter::IsCompatible(short eOldType,
switch (eOldType)
{
case NUMBERFORMAT_DATETIME:
- return TRUE;
+ return sal_True;
default:
- return FALSE;
+ return sal_False;
}
}
break;
@@ -1284,9 +1284,9 @@ BOOL SvNumberFormatter::IsCompatible(short eOldType,
switch (eOldType)
{
case NUMBERFORMAT_DATETIME:
- return TRUE;
+ return sal_True;
default:
- return FALSE;
+ return sal_False;
}
}
break;
@@ -1296,16 +1296,16 @@ BOOL SvNumberFormatter::IsCompatible(short eOldType,
{
case NUMBERFORMAT_TIME:
case NUMBERFORMAT_DATE:
- return TRUE;
+ return sal_True;
default:
- return FALSE;
+ return sal_False;
}
}
break;
default:
- return FALSE;
+ return sal_False;
}
- return FALSE;
+ return sal_False;
}
}
@@ -1334,7 +1334,7 @@ sal_uInt32 SvNumberFormatter::ImpGetDefaultFormat( short nType )
default:
nSearch = CLOffset + ZF_STANDARD;
}
- sal_uInt32 nDefaultFormat = (sal_uInt32)(sal_uIntPtr) aDefaultFormatKeys.Get( nSearch );
+ sal_uInt32 nDefaultFormat = (sal_uInt32)(sal_uLong) aDefaultFormatKeys.Get( nSearch );
if ( !nDefaultFormat )
nDefaultFormat = NUMBERFORMAT_ENTRY_NOT_FOUND;
if ( nDefaultFormat == NUMBERFORMAT_ENTRY_NOT_FOUND )
@@ -1414,7 +1414,7 @@ sal_uInt32 SvNumberFormatter::GetStandardFormat( short eType, LanguageType eLnge
}
}
-BOOL SvNumberFormatter::IsSpecialStandardFormat( sal_uInt32 nFIndex,
+sal_Bool SvNumberFormatter::IsSpecialStandardFormat( sal_uInt32 nFIndex,
LanguageType eLnge )
{
return
@@ -1443,14 +1443,14 @@ sal_uInt32 SvNumberFormatter::GetStandardFormat( double fNumber, sal_uInt32 nFIn
{
case NUMBERFORMAT_TIME :
{
- BOOL bSign;
+ sal_Bool bSign;
if ( fNumber < 0.0 )
{
- bSign = TRUE;
+ bSign = sal_True;
fNumber = -fNumber;
}
else
- bSign = FALSE;
+ bSign = sal_False;
double fSeconds = fNumber * 86400;
if ( floor( fSeconds + 0.5 ) * 100 != floor( fSeconds * 100 + 0.5 ) )
{ // mit 100stel Sekunden
@@ -1562,14 +1562,14 @@ void SvNumberFormatter::GetOutputString(String& sString,
}
}
-BOOL SvNumberFormatter::GetPreviewString(const String& sFormatString,
+sal_Bool SvNumberFormatter::GetPreviewString(const String& sFormatString,
double fPreviewNumber,
String& sOutString,
Color** ppColor,
LanguageType eLnge)
{
if (sFormatString.Len() == 0) // keinen Leerstring
- return FALSE;
+ return sal_False;
xub_StrLen nCheckPos = STRING_NOTFOUND;
sal_uInt32 nKey;
@@ -1593,30 +1593,30 @@ BOOL SvNumberFormatter::GetPreviewString(const String& sFormatString,
else
p_Entry->GetOutputString(fPreviewNumber,sOutString, ppColor);
delete p_Entry;
- return TRUE;
+ return sal_True;
}
else
{
delete p_Entry;
- return FALSE;
+ return sal_False;
}
}
-BOOL SvNumberFormatter::GetPreviewStringGuess( const String& sFormatString,
+sal_Bool SvNumberFormatter::GetPreviewStringGuess( const String& sFormatString,
double fPreviewNumber,
String& sOutString,
Color** ppColor,
LanguageType eLnge )
{
if (sFormatString.Len() == 0) // keinen Leerstring
- return FALSE;
+ return sal_False;
if (eLnge == LANGUAGE_DONTKNOW)
eLnge = IniLnge;
ChangeIntl( eLnge );
eLnge = ActLnge;
- BOOL bEnglish = (eLnge == LANGUAGE_ENGLISH_US);
+ sal_Bool bEnglish = (eLnge == LANGUAGE_ENGLISH_US);
String aFormatStringUpper( pCharClass->upper( sFormatString ) );
sal_uInt32 nCLOffset = ImpGenerateCL( eLnge );
@@ -1624,7 +1624,7 @@ BOOL SvNumberFormatter::GetPreviewStringGuess( const String& sFormatString,
if ( nKey != NUMBERFORMAT_ENTRY_NOT_FOUND )
{ // Zielformat vorhanden
GetOutputString( fPreviewNumber, nKey, sOutString, ppColor );
- return TRUE;
+ return sal_True;
}
SvNumberformat *pEntry = NULL;
@@ -1641,7 +1641,7 @@ BOOL SvNumberFormatter::GetPreviewStringGuess( const String& sFormatString,
{
nCLOffset = ImpGenerateCL( LANGUAGE_ENGLISH_US );
nKey = ImpIsEntry( aFormatStringUpper, nCLOffset, LANGUAGE_ENGLISH_US );
- BOOL bEnglishFormat = (nKey != NUMBERFORMAT_ENTRY_NOT_FOUND);
+ sal_Bool bEnglishFormat = (nKey != NUMBERFORMAT_ENTRY_NOT_FOUND);
// try english --> other bzw. english nach other konvertieren
LanguageType eFormatLang = LANGUAGE_ENGLISH_US;
@@ -1649,7 +1649,7 @@ BOOL SvNumberFormatter::GetPreviewStringGuess( const String& sFormatString,
sTmpString = sFormatString;
pEntry = new SvNumberformat( sTmpString, pFormatScanner,
pStringScanner, nCheckPos, eFormatLang );
- pFormatScanner->SetConvertMode( FALSE );
+ pFormatScanner->SetConvertMode( sal_False );
ChangeIntl( eLnge );
if ( !bEnglishFormat )
@@ -1671,7 +1671,7 @@ BOOL SvNumberFormatter::GetPreviewStringGuess( const String& sFormatString,
sTmpString = sFormatString;
SvNumberformat* pEntry2 = new SvNumberformat( sTmpString, pFormatScanner,
pStringScanner, nCheckPos2, eFormatLang );
- pFormatScanner->SetConvertMode( FALSE );
+ pFormatScanner->SetConvertMode( sal_False );
ChangeIntl( eLnge );
if ( nCheckPos2 == 0 && !xTransliteration->isEqual( sFormatString,
pEntry2->GetFormatstring() ) )
@@ -1691,20 +1691,20 @@ BOOL SvNumberFormatter::GetPreviewStringGuess( const String& sFormatString,
ImpGenerateCL( eLnge ); // ggfs. neu Standardformate anlegen
pEntry->GetOutputString( fPreviewNumber, sOutString, ppColor );
delete pEntry;
- return TRUE;
+ return sal_True;
}
delete pEntry;
- return FALSE;
+ return sal_False;
}
-BOOL SvNumberFormatter::GetPreviewString( const String& sFormatString,
+sal_Bool SvNumberFormatter::GetPreviewString( const String& sFormatString,
const String& sPreviewString,
String& sOutString,
Color** ppColor,
LanguageType eLnge )
{
if (sFormatString.Len() == 0) // no empty string
- return FALSE;
+ return sal_False;
xub_StrLen nCheckPos = STRING_NOTFOUND;
sal_uInt32 nKey;
@@ -1740,12 +1740,12 @@ BOOL SvNumberFormatter::GetPreviewString( const String& sFormatString,
}
}
delete p_Entry;
- return TRUE;
+ return sal_True;
}
else
{
delete p_Entry;
- return FALSE;
+ return sal_False;
}
}
@@ -1782,7 +1782,7 @@ sal_uInt32 SvNumberFormatter::TestNewString(const String& sFormatString,
SvNumberformat* SvNumberFormatter::ImpInsertFormat(
const ::com::sun::star::i18n::NumberFormatCode& rCode,
- sal_uInt32 nPos, BOOL bAfterLoadingSO5, sal_Int16 nOrgIndex )
+ sal_uInt32 nPos, sal_Bool bAfterLoadingSO5, sal_Int16 nOrgIndex )
{
String aCodeStr( rCode.Code );
if ( rCode.Index < NF_INDEX_TABLE_ENTRIES &&
@@ -1790,7 +1790,7 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat(
rCode.Index != NF_CURRENCY_1000DEC2_CCC )
{ // strip surrounding [$...] on automatic currency
if ( aCodeStr.SearchAscii( "[$" ) != STRING_NOTFOUND )
- aCodeStr = SvNumberformat::StripNewCurrencyDelimiters( aCodeStr, FALSE );
+ aCodeStr = SvNumberformat::StripNewCurrencyDelimiters( aCodeStr, sal_False );
else
{
if (LocaleDataWrapper::areChecksEnabled() &&
@@ -1903,7 +1903,7 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat(
SvNumberformat* SvNumberFormatter::ImpInsertNewStandardFormat(
const ::com::sun::star::i18n::NumberFormatCode& rCode,
- sal_uInt32 nPos, USHORT nVersion, BOOL bAfterLoadingSO5,
+ sal_uInt32 nPos, sal_uInt16 nVersion, sal_Bool bAfterLoadingSO5,
sal_Int16 nOrgIndex )
{
SvNumberformat* pNewFormat = ImpInsertFormat( rCode, nPos,
@@ -1915,10 +1915,10 @@ SvNumberformat* SvNumberFormatter::ImpInsertNewStandardFormat(
}
void SvNumberFormatter::GetFormatSpecialInfo(sal_uInt32 nFormat,
- BOOL& bThousand,
- BOOL& IsRed,
- USHORT& nPrecision,
- USHORT& nAnzLeading)
+ sal_Bool& bThousand,
+ sal_Bool& IsRed,
+ sal_uInt16& nPrecision,
+ sal_uInt16& nAnzLeading)
{
const SvNumberformat* pFormat = aFTable.Get(nFormat);
@@ -1927,14 +1927,14 @@ void SvNumberFormatter::GetFormatSpecialInfo(sal_uInt32 nFormat,
nPrecision, nAnzLeading);
else
{
- bThousand = FALSE;
- IsRed = FALSE;
+ bThousand = sal_False;
+ IsRed = sal_False;
nPrecision = pFormatScanner->GetStandardPrec();
nAnzLeading = 0;
}
}
-USHORT SvNumberFormatter::GetFormatPrecision( sal_uInt32 nFormat ) const
+sal_uInt16 SvNumberFormatter::GetFormatPrecision( sal_uInt32 nFormat ) const
{
const SvNumberformat* pFormat = aFTable.Get( nFormat );
if ( pFormat )
@@ -1967,8 +1967,8 @@ String SvNumberFormatter::GetFormatDecimalSep( sal_uInt32 nFormat ) const
sal_uInt32 SvNumberFormatter::GetFormatSpecialInfo( const String& rFormatString,
- BOOL& bThousand, BOOL& IsRed, USHORT& nPrecision,
- USHORT& nAnzLeading, LanguageType eLnge )
+ sal_Bool& bThousand, sal_Bool& IsRed, sal_uInt16& nPrecision,
+ sal_uInt16& nAnzLeading, LanguageType eLnge )
{
xub_StrLen nCheckPos = 0;
@@ -1983,8 +1983,8 @@ sal_uInt32 SvNumberFormatter::GetFormatSpecialInfo( const String& rFormatString,
pFormat->GetFormatSpecialInfo( bThousand, IsRed, nPrecision, nAnzLeading );
else
{
- bThousand = FALSE;
- IsRed = FALSE;
+ bThousand = sal_False;
+ IsRed = sal_False;
nPrecision = pFormatScanner->GetStandardPrec();
nAnzLeading = 0;
}
@@ -2068,7 +2068,7 @@ sal_Int32 SvNumberFormatter::ImpGetFormatCodeIndex(
sal_Int32 SvNumberFormatter::ImpAdjustFormatCodeDefault(
::com::sun::star::i18n::NumberFormatCode * pFormatArr,
- sal_Int32 nCnt, BOOL bCheckCorrectness )
+ sal_Int32 nCnt, sal_Bool bCheckCorrectness )
{
using namespace ::com::sun::star;
@@ -2174,20 +2174,20 @@ sal_Int32 SvNumberFormatter::ImpAdjustFormatCodeDefault(
}
-void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, BOOL bLoadingSO5 )
+void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, sal_Bool bLoadingSO5 )
{
using namespace ::com::sun::star;
if ( !bIndexTableInitialized )
{
- for ( USHORT j=0; j<NF_INDEX_TABLE_ENTRIES; j++ )
+ for ( sal_uInt16 j=0; j<NF_INDEX_TABLE_ENTRIES; j++ )
{
theIndexTable[j] = NUMBERFORMAT_ENTRY_NOT_FOUND;
}
}
- BOOL bOldConvertMode = pFormatScanner->GetConvertMode();
+ sal_Bool bOldConvertMode = pFormatScanner->GetConvertMode();
if (bOldConvertMode)
- pFormatScanner->SetConvertMode(FALSE); // switch off for this function
+ pFormatScanner->SetConvertMode(sal_False); // switch off for this function
NumberFormatCodeWrapper aNumberFormatCode( xServiceManager, GetLocale() );
@@ -2201,7 +2201,7 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, BOOL bLoadingSO
// of a category (TLOT:=The Legacy Of Templin), altogether about 20 formats.
// Has to be incremented on each ImpInsertNewStandardformat, new formats
// must be appended, not inserted!
- USHORT nNewExtended = ZF_STANDARD_NEWEXTENDED;
+ sal_uInt16 nNewExtended = ZF_STANDARD_NEWEXTENDED;
// Number
uno::Sequence< i18n::NumberFormatCode > aFormatSeq
@@ -2353,7 +2353,7 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, BOOL bLoadingSO
pNewFormat = ImpInsertFormat( aFormatSeq[nIdx],
CLOffset + SetIndexTable( NF_CURRENCY_1000DEC2_CCC, ZF_STANDARD_CURRENCY+4 ));
if ( pNewFormat )
- pNewFormat->SetUsed(TRUE); // must be saved for older versions
+ pNewFormat->SetUsed(sal_True); // must be saved for older versions
aFormatSeq[nIdx].Default = bDefault;
// #.##0,-- since number formatter version 6
@@ -2406,7 +2406,7 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, BOOL bLoadingSO
pNewFormat = ImpInsertFormat( aFormatSeq[nIdx],
CLOffset + SetIndexTable( NF_DATE_SYS_DDMMYYYY, ZF_STANDARD_DATE+6 ));
if ( pNewFormat )
- pNewFormat->SetUsed(TRUE); // must be saved for older versions
+ pNewFormat->SetUsed(sal_True); // must be saved for older versions
// DD.MM.YY def/System, since number formatter version 6
nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_DATE_SYS_DDMMYY );
@@ -2597,22 +2597,22 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, BOOL bLoadingSO
- bIndexTableInitialized = TRUE;
+ bIndexTableInitialized = sal_True;
DBG_ASSERT( nNewExtended <= ZF_STANDARD_NEWEXTENDEDMAX,
"ImpGenerateFormats: overflow of nNewExtended standard formats" );
// Now all additional format codes provided by I18N, but only if not
// loading from old SO5 file format, then they are appended last.
if ( !bLoadingSO5 )
- ImpGenerateAdditionalFormats( CLOffset, aNumberFormatCode, FALSE );
+ ImpGenerateAdditionalFormats( CLOffset, aNumberFormatCode, sal_False );
if (bOldConvertMode)
- pFormatScanner->SetConvertMode(TRUE);
+ pFormatScanner->SetConvertMode(sal_True);
}
void SvNumberFormatter::ImpGenerateAdditionalFormats( sal_uInt32 CLOffset,
- NumberFormatCodeWrapper& rNumberFormatCode, BOOL bAfterLoadingSO5 )
+ NumberFormatCodeWrapper& rNumberFormatCode, sal_Bool bAfterLoadingSO5 )
{
using namespace ::com::sun::star;
@@ -2667,7 +2667,7 @@ void SvNumberFormatter::ImpGenerateAdditionalFormats( sal_uInt32 CLOffset,
{
pFormatArr = aFormatSeq.getArray();
// don't check ALL
- sal_Int32 nDef = ImpAdjustFormatCodeDefault( pFormatArr, nCodes, FALSE);
+ sal_Int32 nDef = ImpAdjustFormatCodeDefault( pFormatArr, nCodes, sal_False);
// don't have any defaults here
pFormatArr[nDef].Default = sal_False;
for ( j = 0; j < nCodes; j++ )
@@ -2685,7 +2685,7 @@ void SvNumberFormatter::ImpGenerateAdditionalFormats( sal_uInt32 CLOffset,
}
}
- pStdFormat->SetLastInsertKey( (USHORT)(nPos - CLOffset) );
+ pStdFormat->SetLastInsertKey( (sal_uInt16)(nPos - CLOffset) );
}
@@ -2704,15 +2704,15 @@ void SvNumberFormatter::ImpGetNegCurrFormat( String& sNegStr, const String& rCur
void SvNumberFormatter::GenerateFormat(String& sString,
sal_uInt32 nIndex,
LanguageType eLnge,
- BOOL bThousand,
- BOOL IsRed,
- USHORT nPrecision,
- USHORT nAnzLeading)
+ sal_Bool bThousand,
+ sal_Bool IsRed,
+ sal_uInt16 nPrecision,
+ sal_uInt16 nAnzLeading)
{
if (eLnge == LANGUAGE_DONTKNOW)
eLnge = IniLnge;
short eType = GetType(nIndex);
- USHORT i;
+ sal_uInt16 i;
ImpGenerateCL(eLnge); // ggfs. neu Standard-
// formate anlegen
sString.Erase();
@@ -2764,15 +2764,15 @@ void SvNumberFormatter::GenerateFormat(String& sString,
String sNegStr = sString;
String aCurr;
const NfCurrencyEntry* pEntry;
- BOOL bBank;
+ sal_Bool bBank;
if ( GetNewCurrencySymbolString( nIndex, aCurr, &pEntry, &bBank ) )
{
if ( pEntry )
{
- USHORT nPosiForm = NfCurrencyEntry::GetEffectivePositiveFormat(
+ sal_uInt16 nPosiForm = NfCurrencyEntry::GetEffectivePositiveFormat(
xLocaleData->getCurrPositiveFormat(),
pEntry->GetPositiveFormat(), bBank );
- USHORT nNegaForm = NfCurrencyEntry::GetEffectiveNegativeFormat(
+ sal_uInt16 nNegaForm = NfCurrencyEntry::GetEffectiveNegativeFormat(
xLocaleData->getCurrNegativeFormat(),
pEntry->GetNegativeFormat(), bBank );
pEntry->CompletePositiveFormatString( sString, bBank,
@@ -2782,12 +2782,12 @@ void SvNumberFormatter::GenerateFormat(String& sString,
}
else
{ // assume currency abbreviation (AKA banking symbol), not symbol
- USHORT nPosiForm = NfCurrencyEntry::GetEffectivePositiveFormat(
+ sal_uInt16 nPosiForm = NfCurrencyEntry::GetEffectivePositiveFormat(
xLocaleData->getCurrPositiveFormat(),
- xLocaleData->getCurrPositiveFormat(), TRUE );
- USHORT nNegaForm = NfCurrencyEntry::GetEffectiveNegativeFormat(
+ xLocaleData->getCurrPositiveFormat(), sal_True );
+ sal_uInt16 nNegaForm = NfCurrencyEntry::GetEffectiveNegativeFormat(
xLocaleData->getCurrNegativeFormat(),
- xLocaleData->getCurrNegativeFormat(), TRUE );
+ xLocaleData->getCurrNegativeFormat(), sal_True );
NfCurrencyEntry::CompletePositiveFormatString( sString, aCurr,
nPosiForm );
NfCurrencyEntry::CompleteNegativeFormatString( sNegStr, aCurr,
@@ -2825,7 +2825,7 @@ void SvNumberFormatter::GenerateFormat(String& sString,
}
}
-BOOL SvNumberFormatter::IsUserDefined(const String& sStr,
+sal_Bool SvNumberFormatter::IsUserDefined(const String& sStr,
LanguageType eLnge)
{
if (eLnge == LANGUAGE_DONTKNOW)
@@ -2835,11 +2835,11 @@ BOOL SvNumberFormatter::IsUserDefined(const String& sStr,
eLnge = ActLnge;
sal_uInt32 nKey = ImpIsEntry(sStr, CLOffset, eLnge);
if (nKey == NUMBERFORMAT_ENTRY_NOT_FOUND)
- return TRUE;
+ return sal_True;
SvNumberformat* pEntry = aFTable.Get(nKey);
if ( pEntry && ((pEntry->GetType() & NUMBERFORMAT_DEFINED) != 0) )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
sal_uInt32 SvNumberFormatter::GetEntryKey(const String& sStr,
@@ -2947,7 +2947,7 @@ SvNumberFormatterIndexTable* SvNumberFormatter::MergeFormatter(SvNumberFormatter
else if (!aFTable.Insert(nNewKey, pNewEntry))
delete pNewEntry;
else
- pStdFormat->SetLastInsertKey((USHORT) (nNewKey - nCLOffset));
+ pStdFormat->SetLastInsertKey((sal_uInt16) (nNewKey - nCLOffset));
}
if (nNewKey != nOldKey) // neuer Index
{
@@ -3011,7 +3011,7 @@ NfIndexTableOffset SvNumberFormatter::GetIndexTableOffset( sal_uInt32 nFormat )
sal_uInt32 nOffset = nFormat % SV_COUNTRY_LANGUAGE_OFFSET; // relativIndex
if ( nOffset > SV_MAX_ANZ_STANDARD_FORMATE )
return NF_INDEX_TABLE_ENTRIES; // kein eingebautes Format
- for ( USHORT j = 0; j < NF_INDEX_TABLE_ENTRIES; j++ )
+ for ( sal_uInt16 j = 0; j < NF_INDEX_TABLE_ENTRIES; j++ )
{
if ( theIndexTable[j] == nOffset )
return (NfIndexTableOffset) j;
@@ -3020,19 +3020,19 @@ NfIndexTableOffset SvNumberFormatter::GetIndexTableOffset( sal_uInt32 nFormat )
}
-void SvNumberFormatter::SetYear2000( USHORT nVal )
+void SvNumberFormatter::SetYear2000( sal_uInt16 nVal )
{
pStringScanner->SetYear2000( nVal );
}
-USHORT SvNumberFormatter::GetYear2000() const
+sal_uInt16 SvNumberFormatter::GetYear2000() const
{
return pStringScanner->GetYear2000();
}
-USHORT SvNumberFormatter::ExpandTwoDigitYear( USHORT nYear ) const
+sal_uInt16 SvNumberFormatter::ExpandTwoDigitYear( sal_uInt16 nYear ) const
{
if ( nYear < 100 )
return SvNumberFormatter::ExpandTwoDigitYear( nYear,
@@ -3042,9 +3042,9 @@ USHORT SvNumberFormatter::ExpandTwoDigitYear( USHORT nYear ) const
// static
-USHORT SvNumberFormatter::GetYear2000Default()
+sal_uInt16 SvNumberFormatter::GetYear2000Default()
{
- return (USHORT) ::utl::MiscCfg().GetYear2000();
+ return (sal_uInt16) ::utl::MiscCfg().GetYear2000();
}
@@ -3079,9 +3079,9 @@ const NfCurrencyEntry& SvNumberFormatter::GetCurrencyEntry( LanguageType eLang )
{
eLang = MsLangId::getRealLanguage( eLang );
const NfCurrencyTable& rTable = GetTheCurrencyTable();
- USHORT nCount = rTable.Count();
+ sal_uInt16 nCount = rTable.Count();
const NfCurrencyEntryPtr* ppData = rTable.GetData();
- for ( USHORT j = 0; j < nCount; j++, ppData++ )
+ for ( sal_uInt16 j = 0; j < nCount; j++, ppData++ )
{
if ( (*ppData)->GetLanguage() == eLang )
return **ppData;
@@ -3097,9 +3097,9 @@ const NfCurrencyEntry* SvNumberFormatter::GetCurrencyEntry(
{
eLang = MsLangId::getRealLanguage( eLang );
const NfCurrencyTable& rTable = GetTheCurrencyTable();
- USHORT nCount = rTable.Count();
+ sal_uInt16 nCount = rTable.Count();
const NfCurrencyEntryPtr* ppData = rTable.GetData();
- for ( USHORT j = 0; j < nCount; j++, ppData++ )
+ for ( sal_uInt16 j = 0; j < nCount; j++, ppData++ )
{
if ( (*ppData)->GetLanguage() == eLang &&
(*ppData)->GetBankSymbol() == rAbbrev )
@@ -3116,9 +3116,9 @@ const NfCurrencyEntry* SvNumberFormatter::GetLegacyOnlyCurrencyEntry(
if (!bCurrencyTableInitialized)
GetTheCurrencyTable(); // just for initialization
const NfCurrencyTable& rTable = theLegacyOnlyCurrencyTable::get();
- USHORT nCount = rTable.Count();
+ sal_uInt16 nCount = rTable.Count();
const NfCurrencyEntryPtr* ppData = rTable.GetData();
- for ( USHORT j = 0; j < nCount; j++, ppData++ )
+ for ( sal_uInt16 j = 0; j < nCount; j++, ppData++ )
{
if ( (*ppData)->GetSymbol() == rSymbol &&
(*ppData)->GetBankSymbol() == rAbbrev )
@@ -3147,11 +3147,11 @@ void SvNumberFormatter::SetDefaultSystemCurrency( const String& rAbbrev, Languag
if ( eLang == LANGUAGE_SYSTEM )
eLang = SvtSysLocale().GetLanguage();
const NfCurrencyTable& rTable = GetTheCurrencyTable();
- USHORT nCount = rTable.Count();
+ sal_uInt16 nCount = rTable.Count();
const NfCurrencyEntryPtr* ppData = rTable.GetData();
if ( rAbbrev.Len() )
{
- for ( USHORT j = 0; j < nCount; j++, ppData++ )
+ for ( sal_uInt16 j = 0; j < nCount; j++, ppData++ )
{
if ( (*ppData)->GetLanguage() == eLang && (*ppData)->GetBankSymbol() == rAbbrev )
{
@@ -3162,7 +3162,7 @@ void SvNumberFormatter::SetDefaultSystemCurrency( const String& rAbbrev, Languag
}
else
{
- for ( USHORT j = 0; j < nCount; j++, ppData++ )
+ for ( sal_uInt16 j = 0; j < nCount; j++, ppData++ )
{
if ( (*ppData)->GetLanguage() == eLang )
{
@@ -3188,8 +3188,8 @@ sal_uInt32 SvNumberFormatter::ImpGetDefaultSystemCurrencyFormat()
xub_StrLen nCheck;
short nType;
NfWSStringsDtor aCurrList;
- USHORT nDefault = GetCurrencyFormatStrings( aCurrList,
- GetCurrencyEntry( LANGUAGE_SYSTEM ), FALSE );
+ sal_uInt16 nDefault = GetCurrencyFormatStrings( aCurrList,
+ GetCurrencyEntry( LANGUAGE_SYSTEM ), sal_False );
DBG_ASSERT( aCurrList.Count(), "where is the NewCurrency System standard format?!?" );
// if already loaded or user defined nDefaultSystemCurrencyFormat
// will be set to the right value
@@ -3207,7 +3207,7 @@ sal_uInt32 SvNumberFormatter::ImpGetDefaultCurrencyFormat()
{
sal_uInt32 CLOffset = ImpGetCLOffset( ActLnge );
sal_uInt32 nDefaultCurrencyFormat =
- (sal_uInt32)(sal_uIntPtr) aDefaultFormatKeys.Get( CLOffset + ZF_STANDARD_CURRENCY );
+ (sal_uInt32)(sal_uLong) aDefaultFormatKeys.Get( CLOffset + ZF_STANDARD_CURRENCY );
if ( !nDefaultCurrencyFormat )
nDefaultCurrencyFormat = NUMBERFORMAT_ENTRY_NOT_FOUND;
if ( nDefaultCurrencyFormat == NUMBERFORMAT_ENTRY_NOT_FOUND )
@@ -3233,8 +3233,8 @@ sal_uInt32 SvNumberFormatter::ImpGetDefaultCurrencyFormat()
xub_StrLen nCheck;
short nType;
NfWSStringsDtor aCurrList;
- USHORT nDefault = GetCurrencyFormatStrings( aCurrList,
- GetCurrencyEntry( ActLnge ), FALSE );
+ sal_uInt16 nDefault = GetCurrencyFormatStrings( aCurrList,
+ GetCurrencyEntry( ActLnge ), sal_False );
DBG_ASSERT( aCurrList.Count(), "where is the NewCurrency standard format?" );
if ( aCurrList.Count() )
{
@@ -3265,39 +3265,39 @@ sal_uInt32 SvNumberFormatter::ImpGetDefaultCurrencyFormat()
// static
// try to make it inline if possible since this a loop body
-// TRUE: continue; FALSE: break loop, if pFoundEntry==NULL dupe found
+// sal_True: continue; sal_False: break loop, if pFoundEntry==NULL dupe found
#ifndef DBG_UTIL
inline
#endif
- BOOL SvNumberFormatter::ImpLookupCurrencyEntryLoopBody(
- const NfCurrencyEntry*& pFoundEntry, BOOL& bFoundBank,
- const NfCurrencyEntry* pData, USHORT nPos, const String& rSymbol )
+ sal_Bool SvNumberFormatter::ImpLookupCurrencyEntryLoopBody(
+ const NfCurrencyEntry*& pFoundEntry, sal_Bool& bFoundBank,
+ const NfCurrencyEntry* pData, sal_uInt16 nPos, const String& rSymbol )
{
- BOOL bFound;
+ sal_Bool bFound;
if ( pData->GetSymbol() == rSymbol )
{
- bFound = TRUE;
- bFoundBank = FALSE;
+ bFound = sal_True;
+ bFoundBank = sal_False;
}
else if ( pData->GetBankSymbol() == rSymbol )
{
- bFound = TRUE;
- bFoundBank = TRUE;
+ bFound = sal_True;
+ bFoundBank = sal_True;
}
else
- bFound = FALSE;
+ bFound = sal_False;
if ( bFound )
{
if ( pFoundEntry && pFoundEntry != pData )
{
pFoundEntry = NULL;
- return FALSE; // break loop, not unique
+ return sal_False; // break loop, not unique
}
if ( nPos == 0 )
{ // first entry is SYSTEM
pFoundEntry = MatchSystemCurrency();
if ( pFoundEntry )
- return FALSE; // break loop
+ return sal_False; // break loop
// even if there are more matching entries
// this one is propably the one we are looking for
else
@@ -3306,19 +3306,19 @@ inline
else
pFoundEntry = pData;
}
- return TRUE;
+ return sal_True;
}
-BOOL SvNumberFormatter::GetNewCurrencySymbolString( sal_uInt32 nFormat,
+sal_Bool SvNumberFormatter::GetNewCurrencySymbolString( sal_uInt32 nFormat,
String& rStr, const NfCurrencyEntry** ppEntry /* = NULL */,
- BOOL* pBank /* = NULL */ ) const
+ sal_Bool* pBank /* = NULL */ ) const
{
rStr.Erase();
if ( ppEntry )
*ppEntry = NULL;
if ( pBank )
- *pBank = FALSE;
+ *pBank = sal_False;
SvNumberformat* pFormat = (SvNumberformat*) aFTable.Get( nFormat );
if ( pFormat )
{
@@ -3327,11 +3327,11 @@ BOOL SvNumberFormatter::GetNewCurrencySymbolString( sal_uInt32 nFormat,
{
if ( ppEntry )
{
- BOOL bFoundBank = FALSE;
+ sal_Bool bFoundBank = sal_False;
// we definiteley need an entry matching the format code string
const NfCurrencyEntry* pFoundEntry = GetCurrencyEntry(
bFoundBank, aSymbol, aExtension, pFormat->GetLanguage(),
- TRUE );
+ sal_True );
if ( pFoundEntry )
{
*ppEntry = pFoundEntry;
@@ -3357,17 +3357,17 @@ BOOL SvNumberFormatter::GetNewCurrencySymbolString( sal_uInt32 nFormat,
rStr += aExtension;
rStr += ']';
}
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
// static
-const NfCurrencyEntry* SvNumberFormatter::GetCurrencyEntry( BOOL & bFoundBank,
+const NfCurrencyEntry* SvNumberFormatter::GetCurrencyEntry( sal_Bool & bFoundBank,
const String& rSymbol, const String& rExtension,
- LanguageType eFormatLanguage, BOOL bOnlyStringLanguage )
+ LanguageType eFormatLanguage, sal_Bool bOnlyStringLanguage )
{
xub_StrLen nExtLen = rExtension.Len();
LanguageType eExtLang;
@@ -3384,14 +3384,14 @@ const NfCurrencyEntry* SvNumberFormatter::GetCurrencyEntry( BOOL & bFoundBank,
eExtLang = LANGUAGE_DONTKNOW;
const NfCurrencyEntry* pFoundEntry = NULL;
const NfCurrencyTable& rTable = GetTheCurrencyTable();
- USHORT nCount = rTable.Count();
- BOOL bCont = TRUE;
+ sal_uInt16 nCount = rTable.Count();
+ sal_Bool bCont = sal_True;
// first try with given extension language/country
if ( nExtLen )
{
const NfCurrencyEntryPtr* ppData = rTable.GetData();
- for ( USHORT j = 0; j < nCount && bCont; j++, ppData++ )
+ for ( sal_uInt16 j = 0; j < nCount && bCont; j++, ppData++ )
{
LanguageType eLang = (*ppData)->GetLanguage();
if ( eLang == eExtLang ||
@@ -3413,7 +3413,7 @@ const NfCurrencyEntry* SvNumberFormatter::GetCurrencyEntry( BOOL & bFoundBank,
{
// now try the language/country of the number format
const NfCurrencyEntryPtr* ppData = rTable.GetData();
- for ( USHORT j = 0; j < nCount && bCont; j++, ppData++ )
+ for ( sal_uInt16 j = 0; j < nCount && bCont; j++, ppData++ )
{
LanguageType eLang = (*ppData)->GetLanguage();
if ( eLang == eFormatLanguage ||
@@ -3435,7 +3435,7 @@ const NfCurrencyEntry* SvNumberFormatter::GetCurrencyEntry( BOOL & bFoundBank,
if ( !nExtLen )
{
const NfCurrencyEntryPtr* ppData = rTable.GetData();
- for ( USHORT j = 0; j < nCount && bCont; j++, ppData++ )
+ for ( sal_uInt16 j = 0; j < nCount && bCont; j++, ppData++ )
{
bCont = ImpLookupCurrencyEntryLoopBody( pFoundEntry, bFoundBank,
*ppData, j, rSymbol );
@@ -3581,10 +3581,10 @@ void SvNumberFormatter::ImpInitCurrencyTable()
// ::osl::MutexGuard aGuard( GetMutex() );
// while ( !bCurrencyTableInitialized )
// ImpInitCurrencyTable();
- static BOOL bInitializing = FALSE;
+ static sal_Bool bInitializing = sal_False;
if ( bCurrencyTableInitialized || bInitializing )
return ;
- bInitializing = TRUE;
+ bInitializing = sal_True;
RTL_LOGFILE_CONTEXT_AUTHOR( aTimeLog, "svl", "er93726", "SvNumberFormatter::ImpInitCurrencyTable" );
@@ -3597,14 +3597,14 @@ void SvNumberFormatter::ImpInitCurrencyTable()
LanguageType eConfiguredCurrencyLanguage = LANGUAGE_SYSTEM;
SvtSysLocaleOptions().GetCurrencyAbbrevAndLanguage(
aConfiguredCurrencyAbbrev, eConfiguredCurrencyLanguage );
- USHORT nSecondarySystemCurrencyPosition = 0;
- USHORT nMatchingSystemCurrencyPosition = 0;
+ sal_uInt16 nSecondarySystemCurrencyPosition = 0;
+ sal_uInt16 nMatchingSystemCurrencyPosition = 0;
NfCurrencyEntryPtr pEntry;
// first entry is SYSTEM
pEntry = new NfCurrencyEntry( *pLocaleData, LANGUAGE_SYSTEM );
theCurrencyTable::get().Insert( pEntry, 0 );
- USHORT nCurrencyPos = 1;
+ sal_uInt16 nCurrencyPos = 1;
::com::sun::star::uno::Sequence< ::com::sun::star::lang::Locale > xLoc =
LocaleDataWrapper::getInstalledLocaleNames();
@@ -3613,7 +3613,7 @@ void SvNumberFormatter::ImpInitCurrencyTable()
Locale const * const pLocales = xLoc.getConstArray();
NfCurrencyTable &rCurrencyTable = theCurrencyTable::get();
NfCurrencyTable &rLegacyOnlyCurrencyTable = theLegacyOnlyCurrencyTable::get();
- USHORT nLegacyOnlyCurrencyPos = 0;
+ sal_uInt16 nLegacyOnlyCurrencyPos = 0;
for ( sal_Int32 nLocale = 0; nLocale < nLocaleCount; nLocale++ )
{
LanguageType eLang = MsLangId::convertLocaleToLanguage(
@@ -3621,8 +3621,8 @@ void SvNumberFormatter::ImpInitCurrencyTable()
#if OSL_DEBUG_LEVEL > 1
LanguageType eReal = MsLangId::getRealLanguage( eLang );
if ( eReal != eLang ) {
- BOOL bBreak;
- bBreak = TRUE;
+ sal_Bool bBreak;
+ bBreak = sal_True;
}
#endif
pLocaleData->setLocale( pLocales[nLocale] );
@@ -3648,7 +3648,7 @@ void SvNumberFormatter::ImpInitCurrencyTable()
rCurrencyTable.Insert( pEntry, nCurrencyPos++ );
if ( !nSystemCurrencyPosition && (aConfiguredCurrencyAbbrev.Len() ?
pEntry->GetBankSymbol() == aConfiguredCurrencyAbbrev &&
- pEntry->GetLanguage() == eConfiguredCurrencyLanguage : FALSE) )
+ pEntry->GetLanguage() == eConfiguredCurrencyLanguage : sal_False) )
nSystemCurrencyPosition = nCurrencyPos-1;
if ( !nMatchingSystemCurrencyPosition &&
pEntry->GetLanguage() == eSysLang )
@@ -3669,15 +3669,15 @@ void SvNumberFormatter::ImpInitCurrencyTable()
{
pEntry = new NfCurrencyEntry( pCurrencies[nCurrency], *pLocaleData, eLang );
// no dupes
- BOOL bInsert = TRUE;
+ sal_Bool bInsert = sal_True;
NfCurrencyEntry const * const * pData = rCurrencyTable.GetData();
- USHORT n = rCurrencyTable.Count();
+ sal_uInt16 n = rCurrencyTable.Count();
pData++; // skip first SYSTEM entry
- for ( USHORT j=1; j<n; j++ )
+ for ( sal_uInt16 j=1; j<n; j++ )
{
if ( *(*pData++) == *pEntry )
{
- bInsert = FALSE;
+ bInsert = sal_False;
break; // for
}
}
@@ -3715,20 +3715,20 @@ void SvNumberFormatter::ImpInitCurrencyTable()
delete pLocaleData;
SvtSysLocaleOptions::SetCurrencyChangeLink(
STATIC_LINK( NULL, SvNumberFormatter, CurrencyChangeLink ) );
- bInitializing = FALSE;
- bCurrencyTableInitialized = TRUE;
+ bInitializing = sal_False;
+ bCurrencyTableInitialized = sal_True;
}
-USHORT SvNumberFormatter::GetCurrencyFormatStrings( NfWSStringsDtor& rStrArr,
- const NfCurrencyEntry& rCurr, BOOL bBank ) const
+sal_uInt16 SvNumberFormatter::GetCurrencyFormatStrings( NfWSStringsDtor& rStrArr,
+ const NfCurrencyEntry& rCurr, sal_Bool bBank ) const
{
- USHORT nDefault = 0;
+ sal_uInt16 nDefault = 0;
if ( bBank )
{ // nur Bankensymbole
String aPositiveBank, aNegativeBank;
- rCurr.BuildPositiveFormatString( aPositiveBank, TRUE, *xLocaleData, 1 );
- rCurr.BuildNegativeFormatString( aNegativeBank, TRUE, *xLocaleData, 1 );
+ rCurr.BuildPositiveFormatString( aPositiveBank, sal_True, *xLocaleData, 1 );
+ rCurr.BuildNegativeFormatString( aNegativeBank, sal_True, *xLocaleData, 1 );
WSStringPtr pFormat1 = new String( aPositiveBank );
*pFormat1 += ';';
@@ -3758,14 +3758,14 @@ USHORT SvNumberFormatter::GetCurrencyFormatStrings( NfWSStringsDtor& rStrArr,
aRed += pFormatScanner->GetRedString();
aRed += ']';
- rCurr.BuildPositiveFormatString( aPositive, FALSE, *xLocaleData, 1 );
- rCurr.BuildNegativeFormatString( aNegative, FALSE, *xLocaleData, 1 );
+ rCurr.BuildPositiveFormatString( aPositive, sal_False, *xLocaleData, 1 );
+ rCurr.BuildNegativeFormatString( aNegative, sal_False, *xLocaleData, 1 );
if ( rCurr.GetDigits() )
{
- rCurr.BuildPositiveFormatString( aPositiveNoDec, FALSE, *xLocaleData, 0 );
- rCurr.BuildNegativeFormatString( aNegativeNoDec, FALSE, *xLocaleData, 0 );
- rCurr.BuildPositiveFormatString( aPositiveDashed, FALSE, *xLocaleData, 2 );
- rCurr.BuildNegativeFormatString( aNegativeDashed, FALSE, *xLocaleData, 2 );
+ rCurr.BuildPositiveFormatString( aPositiveNoDec, sal_False, *xLocaleData, 0 );
+ rCurr.BuildNegativeFormatString( aNegativeNoDec, sal_False, *xLocaleData, 0 );
+ rCurr.BuildPositiveFormatString( aPositiveDashed, sal_False, *xLocaleData, 2 );
+ rCurr.BuildNegativeFormatString( aNegativeDashed, sal_False, *xLocaleData, 2 );
pFormat1 = new String( aPositiveNoDec );
*pFormat1 += ';';
@@ -3848,7 +3848,7 @@ NfCurrencyEntry::NfCurrencyEntry( const ::com::sun::star::i18n::Currency & rCurr
}
-BOOL NfCurrencyEntry::operator==( const NfCurrencyEntry& r ) const
+sal_Bool NfCurrencyEntry::operator==( const NfCurrencyEntry& r ) const
{
return aSymbol == r.aSymbol
&& aBankSymbol == r.aBankSymbol
@@ -3869,10 +3869,10 @@ void NfCurrencyEntry::SetEuro()
}
-BOOL NfCurrencyEntry::IsEuro() const
+sal_Bool NfCurrencyEntry::IsEuro() const
{
if ( aBankSymbol.EqualsAscii( "EUR" ) )
- return TRUE;
+ return sal_True;
String aEuro( NfCurrencyEntry::GetEuroSymbol() );
return aSymbol == aEuro;
}
@@ -3886,8 +3886,8 @@ void NfCurrencyEntry::ApplyVariableInformation( const NfCurrencyEntry& r )
}
-void NfCurrencyEntry::BuildSymbolString( String& rStr, BOOL bBank,
- BOOL bWithoutExtension ) const
+void NfCurrencyEntry::BuildSymbolString( String& rStr, sal_Bool bBank,
+ sal_Bool bWithoutExtension ) const
{
rStr = '[';
rStr += '$';
@@ -3914,7 +3914,7 @@ void NfCurrencyEntry::BuildSymbolString( String& rStr, BOOL bBank,
void NfCurrencyEntry::Impl_BuildFormatStringNumChars( String& rStr,
- const LocaleDataWrapper& rLoc, USHORT nDecimalFormat ) const
+ const LocaleDataWrapper& rLoc, sal_uInt16 nDecimalFormat ) const
{
rStr.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "###0" ) );
rStr.Insert( rLoc.getNumThousandSep(), 1 );
@@ -3926,28 +3926,28 @@ void NfCurrencyEntry::Impl_BuildFormatStringNumChars( String& rStr,
}
-void NfCurrencyEntry::BuildPositiveFormatString( String& rStr, BOOL bBank,
- const LocaleDataWrapper& rLoc, USHORT nDecimalFormat ) const
+void NfCurrencyEntry::BuildPositiveFormatString( String& rStr, sal_Bool bBank,
+ const LocaleDataWrapper& rLoc, sal_uInt16 nDecimalFormat ) const
{
Impl_BuildFormatStringNumChars( rStr, rLoc, nDecimalFormat );
- USHORT nPosiForm = NfCurrencyEntry::GetEffectivePositiveFormat(
+ sal_uInt16 nPosiForm = NfCurrencyEntry::GetEffectivePositiveFormat(
rLoc.getCurrPositiveFormat(), nPositiveFormat, bBank );
CompletePositiveFormatString( rStr, bBank, nPosiForm );
}
-void NfCurrencyEntry::BuildNegativeFormatString( String& rStr, BOOL bBank,
- const LocaleDataWrapper& rLoc, USHORT nDecimalFormat ) const
+void NfCurrencyEntry::BuildNegativeFormatString( String& rStr, sal_Bool bBank,
+ const LocaleDataWrapper& rLoc, sal_uInt16 nDecimalFormat ) const
{
Impl_BuildFormatStringNumChars( rStr, rLoc, nDecimalFormat );
- USHORT nNegaForm = NfCurrencyEntry::GetEffectiveNegativeFormat(
+ sal_uInt16 nNegaForm = NfCurrencyEntry::GetEffectiveNegativeFormat(
rLoc.getCurrNegativeFormat(), nNegativeFormat, bBank );
CompleteNegativeFormatString( rStr, bBank, nNegaForm );
}
-void NfCurrencyEntry::CompletePositiveFormatString( String& rStr, BOOL bBank,
- USHORT nPosiForm ) const
+void NfCurrencyEntry::CompletePositiveFormatString( String& rStr, sal_Bool bBank,
+ sal_uInt16 nPosiForm ) const
{
String aSymStr;
BuildSymbolString( aSymStr, bBank );
@@ -3955,8 +3955,8 @@ void NfCurrencyEntry::CompletePositiveFormatString( String& rStr, BOOL bBank,
}
-void NfCurrencyEntry::CompleteNegativeFormatString( String& rStr, BOOL bBank,
- USHORT nNegaForm ) const
+void NfCurrencyEntry::CompleteNegativeFormatString( String& rStr, sal_Bool bBank,
+ sal_uInt16 nNegaForm ) const
{
String aSymStr;
BuildSymbolString( aSymStr, bBank );
@@ -3966,7 +3966,7 @@ void NfCurrencyEntry::CompleteNegativeFormatString( String& rStr, BOOL bBank,
// static
void NfCurrencyEntry::CompletePositiveFormatString( String& rStr,
- const String& rSymStr, USHORT nPositiveFormat )
+ const String& rSymStr, sal_uInt16 nPositiveFormat )
{
switch( nPositiveFormat )
{
@@ -3997,7 +3997,7 @@ void NfCurrencyEntry::CompletePositiveFormatString( String& rStr,
// static
void NfCurrencyEntry::CompleteNegativeFormatString( String& rStr,
- const String& rSymStr, USHORT nNegativeFormat )
+ const String& rSymStr, sal_uInt16 nNegativeFormat )
{
switch( nNegativeFormat )
{
@@ -4118,11 +4118,11 @@ void NfCurrencyEntry::CompleteNegativeFormatString( String& rStr,
// static
-USHORT NfCurrencyEntry::GetEffectivePositiveFormat( USHORT
+sal_uInt16 NfCurrencyEntry::GetEffectivePositiveFormat( sal_uInt16
#if ! NF_BANKSYMBOL_FIX_POSITION
nIntlFormat
#endif
- , USHORT nCurrFormat, BOOL bBank )
+ , sal_uInt16 nCurrFormat, sal_Bool bBank )
{
if ( bBank )
{
@@ -4154,7 +4154,7 @@ USHORT NfCurrencyEntry::GetEffectivePositiveFormat( USHORT
// nur aufrufen, wenn nCurrFormat wirklich mit Klammern ist
-USHORT lcl_MergeNegativeParenthesisFormat( USHORT nIntlFormat, USHORT nCurrFormat )
+sal_uInt16 lcl_MergeNegativeParenthesisFormat( sal_uInt16 nIntlFormat, sal_uInt16 nCurrFormat )
{
short nSign = 0; // -1:=Klammer 0:=links, 1:=mitte, 2:=rechts
switch ( nIntlFormat )
@@ -4239,8 +4239,8 @@ USHORT lcl_MergeNegativeParenthesisFormat( USHORT nIntlFormat, USHORT nCurrForma
// static
-USHORT NfCurrencyEntry::GetEffectiveNegativeFormat( USHORT nIntlFormat,
- USHORT nCurrFormat, BOOL bBank )
+sal_uInt16 NfCurrencyEntry::GetEffectiveNegativeFormat( sal_uInt16 nIntlFormat,
+ sal_uInt16 nCurrFormat, sal_Bool bBank )
{
if ( bBank )
{
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 3d943fef230c..92398792077d 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -74,13 +74,13 @@ const double EXP_LOWER_BOUND = 1.0E-4; // prefer scientific notation below this
const double _D_MAX_U_LONG_ = (double) 0xffffffff; // 4294967295.0
const double _D_MAX_LONG_ = (double) 0x7fffffff; // 2147483647.0
-const USHORT _MAX_FRACTION_PREC = 3;
+const sal_uInt16 _MAX_FRACTION_PREC = 3;
const double D_EPS = 1.0E-2;
const double _D_MAX_D_BY_100 = 1.7E306;
const double _D_MIN_M_BY_1000 = 2.3E-305;
-static BYTE cCharWidths[ 128-32 ] = {
+static sal_uInt8 cCharWidths[ 128-32 ] = {
1,1,1,2,2,3,2,1,1,1,1,2,1,1,1,1,
2,2,2,2,2,2,2,2,2,2,1,1,2,2,2,2,
3,2,2,2,2,2,2,3,2,1,2,2,2,3,3,3,
@@ -94,7 +94,7 @@ xub_StrLen SvNumberformat::InsertBlanks( String& r, xub_StrLen nPos, sal_Unicode
{
if( c >= 32 )
{
- USHORT n = 2; // Default fuer Zeichen > 128 (HACK!)
+ sal_uInt16 n = 2; // Default fuer Zeichen > 128 (HACK!)
if( c <= 127 )
n = cCharWidths[ c - 32 ];
while( n-- )
@@ -127,15 +127,15 @@ static long GetPrecExp( double fAbsVal )
}
}
-const USHORT nNewCurrencyVersionId = 0x434E; // "NC"
+const sal_uInt16 nNewCurrencyVersionId = 0x434E; // "NC"
const sal_Unicode cNewCurrencyMagic = 0x01; // Magic for format code in comment
-const USHORT nNewStandardFlagVersionId = 0x4653; // "SF"
+const sal_uInt16 nNewStandardFlagVersionId = 0x4653; // "SF"
/***********************Funktion SvNumberformatInfo******************************/
-void ImpSvNumberformatInfo::Copy( const ImpSvNumberformatInfo& rNumFor, USHORT nAnz )
+void ImpSvNumberformatInfo::Copy( const ImpSvNumberformatInfo& rNumFor, sal_uInt16 nAnz )
{
- for (USHORT i = 0; i < nAnz; i++)
+ for (sal_uInt16 i = 0; i < nAnz; i++)
{
sStrArray[i] = rNumFor.sStrArray[i];
nTypeArray[i] = rNumFor.nTypeArray[i];
@@ -148,9 +148,9 @@ void ImpSvNumberformatInfo::Copy( const ImpSvNumberformatInfo& rNumFor, USHORT n
nCntExp = rNumFor.nCntExp;
}
-void ImpSvNumberformatInfo::Save(SvStream& rStream, USHORT nAnz) const
+void ImpSvNumberformatInfo::Save(SvStream& rStream, sal_uInt16 nAnz) const
{
- for (USHORT i = 0; i < nAnz; i++)
+ for (sal_uInt16 i = 0; i < nAnz; i++)
{
rStream.WriteByteString( sStrArray[i], rStream.GetStreamCharSet() );
short nType = nTypeArray[i];
@@ -175,9 +175,9 @@ void ImpSvNumberformatInfo::Save(SvStream& rStream, USHORT nAnz) const
<< nCntPre << nCntPost << nCntExp;
}
-void ImpSvNumberformatInfo::Load(SvStream& rStream, USHORT nAnz)
+void ImpSvNumberformatInfo::Load(SvStream& rStream, sal_uInt16 nAnz)
{
- for (USHORT i = 0; i < nAnz; i++)
+ for (sal_uInt16 i = 0; i < nAnz; i++)
{
SvNumberformat::LoadString( rStream, sStrArray[i] );
rStream >> nTypeArray[i];
@@ -190,9 +190,9 @@ void ImpSvNumberformatInfo::Load(SvStream& rStream, USHORT nAnz)
//============================================================================
// static
-BYTE SvNumberNatNum::MapDBNumToNatNum( BYTE nDBNum, LanguageType eLang, BOOL bDate )
+sal_uInt8 SvNumberNatNum::MapDBNumToNatNum( sal_uInt8 nDBNum, LanguageType eLang, sal_Bool bDate )
{
- BYTE nNatNum = 0;
+ sal_uInt8 nNatNum = 0;
eLang = MsLangId::getRealLanguage( eLang ); // resolve SYSTEM etc.
eLang &= 0x03FF; // 10 bit primary language
if ( bDate )
@@ -244,9 +244,9 @@ BYTE SvNumberNatNum::MapDBNumToNatNum( BYTE nDBNum, LanguageType eLang, BOOL bDa
// static
-BYTE SvNumberNatNum::MapNatNumToDBNum( BYTE nNatNum, LanguageType eLang, BOOL bDate )
+sal_uInt8 SvNumberNatNum::MapNatNumToDBNum( sal_uInt8 nNatNum, LanguageType eLang, sal_Bool bDate )
{
- BYTE nDBNum = 0;
+ sal_uInt8 nDBNum = 0;
eLang = MsLangId::getRealLanguage( eLang ); // resolve SYSTEM etc.
eLang &= 0x03FF; // 10 bit primary language
if ( bDate )
@@ -330,7 +330,7 @@ ImpSvNumFor::ImpSvNumFor()
aI.nTypeArray = NULL;
aI.sStrArray = NULL;
aI.eScannedType = NUMBERFORMAT_UNDEFINED;
- aI.bThousand = FALSE;
+ aI.bThousand = sal_False;
aI.nThousand = 0;
aI.nCntPre = 0;
aI.nCntPost = 0;
@@ -340,13 +340,13 @@ ImpSvNumFor::ImpSvNumFor()
ImpSvNumFor::~ImpSvNumFor()
{
- for (USHORT i = 0; i < nAnzStrings; i++)
+ for (sal_uInt16 i = 0; i < nAnzStrings; i++)
aI.sStrArray[i].Erase();
delete [] aI.sStrArray;
delete [] aI.nTypeArray;
}
-void ImpSvNumFor::Enlarge(USHORT nAnz)
+void ImpSvNumFor::Enlarge(sal_uInt16 nAnz)
{
if ( nAnzStrings != nAnz )
{
@@ -390,7 +390,7 @@ void ImpSvNumFor::Save(SvStream& rStream) const
void ImpSvNumFor::Load(SvStream& rStream, ImpSvNumberformatScan& rSc,
String& rLoadedColorName )
{
- USHORT nAnz;
+ sal_uInt16 nAnz;
rStream >> nAnz; //! noch nicht direkt nAnzStrings wg. Enlarge
Enlarge( nAnz );
aI.Load( rStream, nAnz );
@@ -400,21 +400,21 @@ void ImpSvNumFor::Load(SvStream& rStream, ImpSvNumberformatScan& rSc,
}
-BOOL ImpSvNumFor::HasNewCurrency() const
+sal_Bool ImpSvNumFor::HasNewCurrency() const
{
- for ( USHORT j=0; j<nAnzStrings; j++ )
+ for ( sal_uInt16 j=0; j<nAnzStrings; j++ )
{
if ( aI.nTypeArray[j] == NF_SYMBOLTYPE_CURRENCY )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL ImpSvNumFor::GetNewCurrencySymbol( String& rSymbol,
+sal_Bool ImpSvNumFor::GetNewCurrencySymbol( String& rSymbol,
String& rExtension ) const
{
- for ( USHORT j=0; j<nAnzStrings; j++ )
+ for ( sal_uInt16 j=0; j<nAnzStrings; j++ )
{
if ( aI.nTypeArray[j] == NF_SYMBOLTYPE_CURRENCY )
{
@@ -423,18 +423,18 @@ BOOL ImpSvNumFor::GetNewCurrencySymbol( String& rSymbol,
rExtension = aI.sStrArray[j+1];
else
rExtension.Erase();
- return TRUE;
+ return sal_True;
}
}
//! kein Erase an rSymbol, rExtension
- return FALSE;
+ return sal_False;
}
void ImpSvNumFor::SaveNewCurrencyMap( SvStream& rStream ) const
{
- USHORT j;
- USHORT nCnt = 0;
+ sal_uInt16 j;
+ sal_uInt16 nCnt = 0;
for ( j=0; j<nAnzStrings; j++ )
{
switch ( aI.nTypeArray[j] )
@@ -463,11 +463,11 @@ void ImpSvNumFor::SaveNewCurrencyMap( SvStream& rStream ) const
void ImpSvNumFor::LoadNewCurrencyMap( SvStream& rStream )
{
- USHORT nCnt;
+ sal_uInt16 nCnt;
rStream >> nCnt;
- for ( USHORT j=0; j<nCnt; j++ )
+ for ( sal_uInt16 j=0; j<nCnt; j++ )
{
- USHORT nPos;
+ sal_uInt16 nPos;
short nType;
rStream >> nPos >> nType;
if ( nPos < nAnzStrings )
@@ -520,7 +520,7 @@ SvNumberformat::SvNumberformat( ImpSvNumberformatScan& rSc, LanguageType eLge )
rScan(rSc),
eLnge(eLge),
nNewStandardDefined(0),
- bStarFlag( FALSE )
+ bStarFlag( sal_False )
{
}
@@ -541,7 +541,7 @@ void SvNumberformat::ImpCopyNumberformat( const SvNumberformat& rFormat )
// #121103# when copying between documents, get color pointers from own scanner
ImpSvNumberformatScan* pColorSc = ( &rScan != &rFormat.rScan ) ? &rScan : NULL;
- for (USHORT i = 0; i < 4; i++)
+ for (sal_uInt16 i = 0; i < 4; i++)
NumFor[i].Copy(rFormat.NumFor[i], pColorSc);
}
@@ -558,10 +558,10 @@ SvNumberformat::SvNumberformat( SvNumberformat& rFormat, ImpSvNumberformatScan&
}
-BOOL lcl_SvNumberformat_IsBracketedPrefix( short nSymbolType )
+sal_Bool lcl_SvNumberformat_IsBracketedPrefix( short nSymbolType )
{
if ( nSymbolType > 0 )
- return TRUE; // conditions
+ return sal_True; // conditions
switch ( nSymbolType )
{
case BRACKET_SYMBOLTYPE_COLOR :
@@ -595,9 +595,9 @@ BOOL lcl_SvNumberformat_IsBracketedPrefix( short nSymbolType )
case BRACKET_SYMBOLTYPE_NATNUM17 :
case BRACKET_SYMBOLTYPE_NATNUM18 :
case BRACKET_SYMBOLTYPE_NATNUM19 :
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -606,11 +606,11 @@ SvNumberformat::SvNumberformat(String& rString,
ImpSvNumberInputScan* pISc,
xub_StrLen& nCheckPos,
LanguageType& eLan,
- BOOL bStan)
+ sal_Bool bStan)
:
rScan(*pSc),
nNewStandardDefined(0),
- bStarFlag( FALSE )
+ bStarFlag( sal_False )
{
// If the group (AKA thousand) separator is a Non-Breaking Space (French)
// replace all occurences by a simple space.
@@ -633,15 +633,15 @@ SvNumberformat::SvNumberformat(String& rString,
else
eLnge = eLan;
bStandard = bStan;
- bIsUsed = FALSE;
+ bIsUsed = sal_False;
fLimit1 = 0.0;
fLimit2 = 0.0;
eOp1 = NUMBERFORMAT_OP_NO;
eOp2 = NUMBERFORMAT_OP_NO;
eType = NUMBERFORMAT_DEFINED;
- BOOL bCancel = FALSE;
- BOOL bCondition = FALSE;
+ sal_Bool bCancel = sal_False;
+ sal_Bool bCondition = sal_False;
short eSymbolType;
xub_StrLen nPos = 0;
xub_StrLen nPosOld;
@@ -649,7 +649,7 @@ SvNumberformat::SvNumberformat(String& rString,
String aComment;
// Split into 4 sub formats
- USHORT nIndex;
+ sal_uInt16 nIndex;
for ( nIndex = 0; nIndex < 4 && !bCancel; nIndex++ )
{
// Original language/country may have to be reestablished
@@ -666,14 +666,14 @@ SvNumberformat::SvNumberformat(String& rString,
{
if ( nIndex == 0 && !bCondition )
{
- bCondition = TRUE;
+ bCondition = sal_True;
eOp1 = (SvNumberformatLimitOps) eSymbolType;
}
else if ( nIndex == 1 && bCondition )
eOp2 = (SvNumberformatLimitOps) eSymbolType;
else // error
{
- bCancel = TRUE; // break for
+ bCancel = sal_True; // break for
nCheckPos = nPosOld;
}
if (!bCancel)
@@ -707,7 +707,7 @@ SvNumberformat::SvNumberformat(String& rString,
nPos++;
else
{
- bCancel = TRUE; // break for
+ bCancel = sal_True; // break for
nCheckPos = nPos;
}
}
@@ -721,7 +721,7 @@ SvNumberformat::SvNumberformat(String& rString,
{
if ( NumFor[nIndex].GetColor() != NULL )
{ // error, more than one color
- bCancel = TRUE; // break for
+ bCancel = sal_True; // break for
nCheckPos = nPosOld;
}
else
@@ -730,7 +730,7 @@ SvNumberformat::SvNumberformat(String& rString,
NumFor[nIndex].SetColor( pColor, sStr);
if (pColor == NULL)
{ // error
- bCancel = TRUE; // break for
+ bCancel = sal_True; // break for
nCheckPos = nPosOld;
}
}
@@ -759,16 +759,16 @@ SvNumberformat::SvNumberformat(String& rString,
{
if ( NumFor[nIndex].GetNatNum().IsSet() )
{
- bCancel = TRUE; // break for
+ bCancel = sal_True; // break for
nCheckPos = nPosOld;
}
else
{
sStr.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "NatNum" ) );
//! eSymbolType is negative
- BYTE nNum = sal::static_int_cast< BYTE >(0 - (eSymbolType - BRACKET_SYMBOLTYPE_NATNUM0));
+ sal_uInt8 nNum = sal::static_int_cast< sal_uInt8 >(0 - (eSymbolType - BRACKET_SYMBOLTYPE_NATNUM0));
sStr += String::CreateFromInt32( nNum );
- NumFor[nIndex].SetNatNumNum( nNum, FALSE );
+ NumFor[nIndex].SetNatNumNum( nNum, sal_False );
}
}
break;
@@ -784,16 +784,16 @@ SvNumberformat::SvNumberformat(String& rString,
{
if ( NumFor[nIndex].GetNatNum().IsSet() )
{
- bCancel = TRUE; // break for
+ bCancel = sal_True; // break for
nCheckPos = nPosOld;
}
else
{
sStr.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "DBNum" ) );
//! eSymbolType is negative
- BYTE nNum = sal::static_int_cast< BYTE >(1 - (eSymbolType - BRACKET_SYMBOLTYPE_DBNUM1));
+ sal_uInt8 nNum = sal::static_int_cast< sal_uInt8 >(1 - (eSymbolType - BRACKET_SYMBOLTYPE_DBNUM1));
sStr += static_cast< sal_Unicode >('0' + nNum);
- NumFor[nIndex].SetNatNumNum( nNum, TRUE );
+ NumFor[nIndex].SetNatNumNum( nNum, sal_True );
}
}
break;
@@ -801,7 +801,7 @@ SvNumberformat::SvNumberformat(String& rString,
{
if ( NumFor[nIndex].GetNatNum().GetLang() != LANGUAGE_DONTKNOW )
{
- bCancel = TRUE; // break for
+ bCancel = sal_True; // break for
nCheckPos = nPosOld;
}
else
@@ -810,7 +810,7 @@ SvNumberformat::SvNumberformat(String& rString,
LanguageType eLang = ImpGetLanguageType( sStr, nTmp );
if ( eLang == LANGUAGE_DONTKNOW )
{
- bCancel = TRUE; // break for
+ bCancel = sal_True; // break for
nCheckPos = nPosOld;
}
else
@@ -851,7 +851,7 @@ SvNumberformat::SvNumberformat(String& rString,
else
{
xub_StrLen nStrPos = pSc->ScanFormat( sStr, aComment );
- USHORT nAnz = pSc->GetAnzResStrings();
+ sal_uInt16 nAnz = pSc->GetAnzResStrings();
if (nAnz == 0) // error
nStrPos = 1;
if (nStrPos == 0) // ok
@@ -863,7 +863,7 @@ SvNumberformat::SvNumberformat(String& rString,
aNat += String::CreateFromInt32( pSc->GetNatNumModifier());
aNat += ']';
sStr.Insert( aNat, 0);
- NumFor[nIndex].SetNatNumNum( pSc->GetNatNumModifier(), FALSE );
+ NumFor[nIndex].SetNatNumNum( pSc->GetNatNumModifier(), sal_False );
}
// #i53826# #i42727# For the Thai T speciality we need
// to freeze the locale and immunize it against
@@ -916,19 +916,19 @@ SvNumberformat::SvNumberformat(String& rString,
else
{
nCheckPos = nPosOld + nStrPos; // error in string
- bCancel = TRUE; // break for
+ bCancel = sal_True; // break for
}
}
}
else if (eSymbolType == BRACKET_SYMBOLTYPE_ERROR) // error
{
nCheckPos = nPosOld;
- bCancel = TRUE;
+ bCancel = sal_True;
}
else if ( lcl_SvNumberformat_IsBracketedPrefix( eSymbolType ) )
{
nCheckPos = nPosOld+1; // error, prefix in string
- bCancel = TRUE; // break for
+ bCancel = sal_True; // break for
}
}
if ( bCancel && !nCheckPos )
@@ -947,7 +947,7 @@ SvNumberformat::SvNumberformat(String& rString,
// hides any text. Need the type here for HasTextFormat()
NumFor[3].Info().eScannedType = NUMBERFORMAT_TEXT;
}
- bCancel = TRUE;
+ bCancel = sal_True;
}
if ( NumFor[nIndex].GetNatNum().IsSet() )
NumFor[nIndex].SetNatNumDate(
@@ -963,7 +963,7 @@ SvNumberformat::SvNumberformat(String& rString,
String aTmp;
if ( !pSc->ScanFormat( aAdd, aTmp ) )
{
- USHORT nAnz = pSc->GetAnzResStrings();
+ sal_uInt16 nAnz = pSc->GetAnzResStrings();
if ( nAnz )
{
NumFor[0].Enlarge(nAnz);
@@ -982,7 +982,7 @@ SvNumberformat::SvNumberformat(String& rString,
String aTmp;
if ( !pSc->ScanFormat( aAdd, aTmp ) )
{
- USHORT nAnz = pSc->GetAnzResStrings();
+ sal_uInt16 nAnz = pSc->GetAnzResStrings();
if ( nAnz )
{
NumFor[nIndex].Enlarge(nAnz);
@@ -1000,7 +1000,7 @@ SvNumberformat::SvNumberformat(String& rString,
String aTmp;
if ( !pSc->ScanFormat( aAdd, aTmp ) )
{
- USHORT nAnz = pSc->GetAnzResStrings();
+ sal_uInt16 nAnz = pSc->GetAnzResStrings();
if ( nAnz )
{
NumFor[nIndex].Enlarge(nAnz);
@@ -1416,12 +1416,12 @@ NfHackConversion SvNumberformat::Load( SvStream& rStream,
ImpSvNumberInputScan& rISc )
{
rHdr.StartEntry();
- USHORT nOp1, nOp2;
+ sal_uInt16 nOp1, nOp2;
SvNumberformat::LoadString( rStream, sFormatstring );
rStream >> eType >> fLimit1 >> fLimit2
>> nOp1 >> nOp2 >> bStandard >> bIsUsed;
NfHackConversion eHackConversion = NF_CONVERT_NONE;
- BOOL bOldConvert = FALSE;
+ sal_Bool bOldConvert = sal_False;
LanguageType eOldTmpLang = 0;
LanguageType eOldNewLang = 0;
if ( pHackConverter )
@@ -1431,7 +1431,7 @@ NfHackConversion SvNumberformat::Load( SvStream& rStream,
eOldNewLang = rScan.GetNewLnge();
}
String aLoadedColorName;
- for (USHORT i = 0; i < 4; i++)
+ for (sal_uInt16 i = 0; i < 4; i++)
{
NumFor[i].Load( rStream, rScan, aLoadedColorName );
if ( pHackConverter && eHackConversion == NF_CONVERT_NONE )
@@ -1477,25 +1477,25 @@ NfHackConversion SvNumberformat::Load( SvStream& rStream,
}
xub_StrLen nNewCurrencyEnd = STRING_NOTFOUND;
- BOOL bNewCurrencyComment = ( aComment.GetChar(0) == cNewCurrencyMagic &&
+ sal_Bool bNewCurrencyComment = ( aComment.GetChar(0) == cNewCurrencyMagic &&
(nNewCurrencyEnd = aComment.Search( cNewCurrencyMagic, 1 )) != STRING_NOTFOUND );
- BOOL bNewCurrencyLoaded = FALSE;
- BOOL bNewCurrency = FALSE;
+ sal_Bool bNewCurrencyLoaded = sal_False;
+ sal_Bool bNewCurrency = sal_False;
- BOOL bGoOn = TRUE;
+ sal_Bool bGoOn = sal_True;
while ( rHdr.BytesLeft() && bGoOn )
{ // as of SV_NUMBERFORMATTER_VERSION_NEW_CURR
- USHORT nId;
+ sal_uInt16 nId;
rStream >> nId;
switch ( nId )
{
case nNewCurrencyVersionId :
{
- bNewCurrencyLoaded = TRUE;
+ bNewCurrencyLoaded = sal_True;
rStream >> bNewCurrency;
if ( bNewCurrency )
{
- for ( USHORT j=0; j<4; j++ )
+ for ( sal_uInt16 j=0; j<4; j++ )
{
NumFor[j].LoadNewCurrencyMap( rStream );
}
@@ -1507,7 +1507,7 @@ NfHackConversion SvNumberformat::Load( SvStream& rStream,
break;
default:
DBG_ERRORFILE( "SvNumberformat::Load: unknown header bytes left nId" );
- bGoOn = FALSE; // stop reading unknown stream left over of newer versions
+ bGoOn = sal_False; // stop reading unknown stream left over of newer versions
// Would be nice to have multiple read/write headers instead
// but old versions wouldn't know it, TLOT.
}
@@ -1529,7 +1529,7 @@ NfHackConversion SvNumberformat::Load( SvStream& rStream,
aComment.Erase( 0, nNewCurrencyEnd+1 );
// Zustaende merken
short nDefined = ( eType & NUMBERFORMAT_DEFINED );
- USHORT nNewStandard = nNewStandardDefined;
+ sal_uInt16 nNewStandard = nNewStandardDefined;
// neu parsen etc.
String aStr( sFormatstring );
xub_StrLen nCheckPos = 0;
@@ -1551,11 +1551,11 @@ NfHackConversion SvNumberformat::Load( SvStream& rStream,
{
case NF_CONVERT_ENGLISH_GERMAN :
ConvertLanguage( *pHackConverter,
- LANGUAGE_ENGLISH_US, LANGUAGE_GERMAN, TRUE );
+ LANGUAGE_ENGLISH_US, LANGUAGE_GERMAN, sal_True );
break;
case NF_CONVERT_GERMAN_ENGLISH :
ConvertLanguage( *pHackConverter,
- LANGUAGE_GERMAN, LANGUAGE_ENGLISH_US, TRUE );
+ LANGUAGE_GERMAN, LANGUAGE_ENGLISH_US, sal_True );
break;
default:
DBG_ERRORFILE( "SvNumberformat::Load: eHackConversion unknown" );
@@ -1565,7 +1565,7 @@ NfHackConversion SvNumberformat::Load( SvStream& rStream,
}
void SvNumberformat::ConvertLanguage( SvNumberFormatter& rConverter,
- LanguageType eConvertFrom, LanguageType eConvertTo, BOOL bSystem )
+ LanguageType eConvertFrom, LanguageType eConvertTo, sal_Bool bSystem )
{
xub_StrLen nCheckPos;
sal_uInt32 nKey;
@@ -1586,7 +1586,7 @@ void SvNumberformat::ConvertLanguage( SvNumberFormatter& rConverter,
if ( bSystem )
eLnge = LANGUAGE_SYSTEM;
// pColor zeigt noch auf Tabelle in temporaerem Formatter/Scanner
- for ( USHORT i = 0; i < 4; i++ )
+ for ( sal_uInt16 i = 0; i < 4; i++ )
{
String aColorName = NumFor[i].GetColorName();
Color* pColor = rScan.GetColor( aColorName );
@@ -1638,7 +1638,7 @@ void SvNumberformat::Save( SvStream& rStream, ImpSvNumMultipleWriteHeader& rHdr
SetComment( "", aFormatstring, aComment );
#endif
- BOOL bNewCurrency = HasNewCurrency();
+ sal_Bool bNewCurrency = HasNewCurrency();
if ( bNewCurrency )
{ // SV_NUMBERFORMATTER_VERSION_NEW_CURR im Kommentar speichern
aComment.Insert( cNewCurrencyMagic, 0 );
@@ -1649,7 +1649,7 @@ void SvNumberformat::Save( SvStream& rStream, ImpSvNumMultipleWriteHeader& rHdr
// old SO5 versions do behave strange (no output) if standard flag is set
// on formats not prepared for it (not having the following exact types)
- BOOL bOldStandard = bStandard;
+ sal_Bool bOldStandard = bStandard;
if ( bOldStandard )
{
switch ( eType )
@@ -1663,15 +1663,15 @@ void SvNumberformat::Save( SvStream& rStream, ImpSvNumMultipleWriteHeader& rHdr
// ok to save
break;
default:
- bOldStandard = FALSE;
+ bOldStandard = sal_False;
}
}
rHdr.StartEntry();
rStream.WriteByteString( aFormatstring, rStream.GetStreamCharSet() );
- rStream << eType << fLimit1 << fLimit2 << (USHORT) eOp1 << (USHORT) eOp2
+ rStream << eType << fLimit1 << fLimit2 << (sal_uInt16) eOp1 << (sal_uInt16) eOp2
<< bOldStandard << bIsUsed;
- for (USHORT i = 0; i < 4; i++)
+ for (sal_uInt16 i = 0; i < 4; i++)
NumFor[i].Save(rStream);
// ab SV_NUMBERFORMATTER_VERSION_NEWSTANDARD
rStream.WriteByteString( aComment, rStream.GetStreamCharSet() );
@@ -1681,7 +1681,7 @@ void SvNumberformat::Save( SvStream& rStream, ImpSvNumMultipleWriteHeader& rHdr
rStream << bNewCurrency;
if ( bNewCurrency )
{
- for ( USHORT j=0; j<4; j++ )
+ for ( sal_uInt16 j=0; j<4; j++ )
{
NumFor[j].SaveNewCurrencyMap( rStream );
}
@@ -1698,34 +1698,34 @@ void SvNumberformat::Save( SvStream& rStream, ImpSvNumMultipleWriteHeader& rHdr
}
-BOOL SvNumberformat::HasNewCurrency() const
+sal_Bool SvNumberformat::HasNewCurrency() const
{
- for ( USHORT j=0; j<4; j++ )
+ for ( sal_uInt16 j=0; j<4; j++ )
{
if ( NumFor[j].HasNewCurrency() )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SvNumberformat::GetNewCurrencySymbol( String& rSymbol,
+sal_Bool SvNumberformat::GetNewCurrencySymbol( String& rSymbol,
String& rExtension ) const
{
- for ( USHORT j=0; j<4; j++ )
+ for ( sal_uInt16 j=0; j<4; j++ )
{
if ( NumFor[j].GetNewCurrencySymbol( rSymbol, rExtension ) )
- return TRUE;
+ return sal_True;
}
rSymbol.Erase();
rExtension.Erase();
- return FALSE;
+ return sal_False;
}
// static
String SvNumberformat::StripNewCurrencyDelimiters( const String& rStr,
- BOOL bQuoteSymbol )
+ sal_Bool bQuoteSymbol )
{
String aTmp;
xub_StrLen nStartPos, nPos, nLen;
@@ -1775,7 +1775,7 @@ String SvNumberformat::StripNewCurrencyDelimiters( const String& rStr,
void SvNumberformat::Build50Formatstring( String& rStr ) const
{
- rStr = StripNewCurrencyDelimiters( sFormatstring, TRUE );
+ rStr = StripNewCurrencyDelimiters( sFormatstring, sal_True );
}
@@ -1841,7 +1841,7 @@ void SvNumberformat::ImpGetOutputStdToPrecision(double& rNumber, String& rOutStr
void SvNumberformat::ImpGetOutputInputLine(double fNumber, String& OutString)
{
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
if ( (eType & NUMBERFORMAT_PERCENT) && (fabs(fNumber) < _D_MAX_D_BY_100))
{
if (fNumber == 0.0)
@@ -1850,7 +1850,7 @@ void SvNumberformat::ImpGetOutputInputLine(double fNumber, String& OutString)
return;
}
fNumber *= 100;
- bModified = TRUE;
+ bModified = sal_True;
}
if (fNumber == 0.0)
@@ -1885,12 +1885,12 @@ short SvNumberformat::ImpCheckCondition(double& fNumber,
}
}
-BOOL SvNumberformat::GetOutputString(String& sString,
+sal_Bool SvNumberformat::GetOutputString(String& sString,
String& OutString,
Color** ppColor)
{
OutString.Erase();
- USHORT nIx;
+ sal_uInt16 nIx;
if (eType & NUMBERFORMAT_TEXT)
nIx = 0;
else if (NumFor[3].GetnAnz() > 0)
@@ -1898,15 +1898,15 @@ BOOL SvNumberformat::GetOutputString(String& sString,
else
{
*ppColor = NULL; // no change of color
- return FALSE;
+ return sal_False;
}
*ppColor = NumFor[nIx].GetColor();
const ImpSvNumberformatInfo& rInfo = NumFor[nIx].Info();
if (rInfo.eScannedType == NUMBERFORMAT_TEXT)
{
- BOOL bRes = FALSE;
- const USHORT nAnz = NumFor[nIx].GetnAnz();
- for (USHORT i = 0; i < nAnz; i++)
+ sal_Bool bRes = sal_False;
+ const sal_uInt16 nAnz = NumFor[nIx].GetnAnz();
+ for (sal_uInt16 i = 0; i < nAnz; i++)
{
switch (rInfo.nTypeArray[i])
{
@@ -1915,7 +1915,7 @@ BOOL SvNumberformat::GetOutputString(String& sString,
{
OutString += (sal_Unicode) 0x1B;
OutString += rInfo.sStrArray[i].GetChar(1);
- bRes = TRUE;
+ bRes = sal_True;
}
break;
case NF_SYMBOLTYPE_BLANK:
@@ -1932,24 +1932,24 @@ BOOL SvNumberformat::GetOutputString(String& sString,
}
return bRes;
}
- return FALSE;
+ return sal_False;
}
/*
-void SvNumberformat::GetNextFareyNumber(ULONG nPrec, ULONG x0, ULONG x1,
- ULONG y0, ULONG y1,
- ULONG& x2,ULONG& y2)
+void SvNumberformat::GetNextFareyNumber(sal_uLong nPrec, sal_uLong x0, sal_uLong x1,
+ sal_uLong y0, sal_uLong y1,
+ sal_uLong& x2,sal_uLong& y2)
{
x2 = ((y0+nPrec)/y1)*x1 - x0;
y2 = ((y0+nPrec)/y1)*y1 - y0;
}
*/
-ULONG SvNumberformat::ImpGGT(ULONG x, ULONG y)
+sal_uLong SvNumberformat::ImpGGT(sal_uLong x, sal_uLong y)
{
if (y == 0)
return x;
else
{
- ULONG z = x%y;
+ sal_uLong z = x%y;
while (z)
{
x = y;
@@ -1960,13 +1960,13 @@ ULONG SvNumberformat::ImpGGT(ULONG x, ULONG y)
}
}
-ULONG SvNumberformat::ImpGGTRound(ULONG x, ULONG y)
+sal_uLong SvNumberformat::ImpGGTRound(sal_uLong x, sal_uLong y)
{
if (y == 0)
return x;
else
{
- ULONG z = x%y;
+ sal_uLong z = x%y;
while ((double)z/(double)y > D_EPS)
{
x = y;
@@ -2042,11 +2042,11 @@ bool SvNumberformat::GetOutputString(double fNumber, sal_uInt16 nCharCount, Stri
return true;
}
-BOOL SvNumberformat::GetOutputString(double fNumber,
+sal_Bool SvNumberformat::GetOutputString(double fNumber,
String& OutString,
Color** ppColor)
{
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
OutString.Erase(); // alles loeschen
*ppColor = NULL; // keine Farbaenderung
if (eType & NUMBERFORMAT_LOGICAL)
@@ -2055,14 +2055,14 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
OutString = rScan.GetTrueString();
else
OutString = rScan.GetFalseString();
- return FALSE;
+ return sal_False;
}
if (eType & NUMBERFORMAT_TEXT)
{
ImpGetOutputStandard(fNumber, OutString);
- return FALSE;
+ return sal_False;
}
- BOOL bHadStandard = FALSE;
+ sal_Bool bHadStandard = sal_False;
if (bStandard) // einzelne Standardformate
{
if (rScan.GetStandardPrec() == SvNumberFormatter::INPUTSTRING_PRECISION) // alle Zahlformate InputLine
@@ -2102,26 +2102,26 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
return false;
}
ImpGetOutputStandard(fNumber, OutString);
- bHadStandard = TRUE;
+ bHadStandard = sal_True;
}
break;
case NUMBERFORMAT_DATE:
bRes |= ImpGetDateOutput(fNumber, 0, OutString);
- bHadStandard = TRUE;
+ bHadStandard = sal_True;
break;
case NUMBERFORMAT_TIME:
bRes |= ImpGetTimeOutput(fNumber, 0, OutString);
- bHadStandard = TRUE;
+ bHadStandard = sal_True;
break;
case NUMBERFORMAT_DATETIME:
bRes |= ImpGetDateTimeOutput(fNumber, 0, OutString);
- bHadStandard = TRUE;
+ bHadStandard = sal_True;
break;
}
}
if ( !bHadStandard )
{
- USHORT nIx; // Index des Teilformats
+ sal_uInt16 nIx; // Index des Teilformats
short nCheck = ImpCheckCondition(fNumber, fLimit1, eOp1);
if (nCheck == -1 || nCheck == 1) // nur 1 String oder True
nIx = 0;
@@ -2138,20 +2138,20 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
fNumber = -fNumber; // Vorzeichen eliminieren
*ppColor = NumFor[nIx].GetColor();
const ImpSvNumberformatInfo& rInfo = NumFor[nIx].Info();
- const USHORT nAnz = NumFor[nIx].GetnAnz();
+ const sal_uInt16 nAnz = NumFor[nIx].GetnAnz();
if (nAnz == 0 && rInfo.eScannedType == NUMBERFORMAT_UNDEFINED)
- return FALSE; // leer => nichts
+ return sal_False; // leer => nichts
else if (nAnz == 0) // sonst Standard-Format
{
ImpGetOutputStandard(fNumber, OutString);
- return FALSE;
+ return sal_False;
}
switch (rInfo.eScannedType)
{
case NUMBERFORMAT_TEXT:
case NUMBERFORMAT_DEFINED:
{
- for (USHORT i = 0; i < nAnz; i++)
+ for (sal_uInt16 i = 0; i < nAnz; i++)
{
switch (rInfo.nTypeArray[i])
{
@@ -2160,7 +2160,7 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
{
OutString += (sal_Unicode) 0x1B;
OutString += rInfo.sStrArray[i].GetChar(1);
- bRes = TRUE;
+ bRes = sal_True;
}
break;
case NF_SYMBOLTYPE_BLANK:
@@ -2198,13 +2198,13 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
case NUMBERFORMAT_FRACTION:
{
String sStr, sFrac, sDiv; // Strings, Wert fuer
- ULONG nFrac, nDiv; // Vorkommaanteil
+ sal_uLong nFrac, nDiv; // Vorkommaanteil
// Zaehler und Nenner
- BOOL bSign = FALSE;
+ sal_Bool bSign = sal_False;
if (fNumber < 0)
{
if (nIx == 0) // nicht in hinteren
- bSign = TRUE; // Formaten
+ bSign = sal_True; // Formaten
fNumber = -fNumber;
}
double fNum = floor(fNumber); // Vorkommateil
@@ -2213,30 +2213,30 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
// zu gross
{
OutString = rScan.GetErrorString();
- return FALSE;
+ return sal_False;
}
if (rInfo.nCntExp == 0)
{
DBG_ERROR("SvNumberformat:: Bruch, nCntExp == 0");
- return FALSE;
+ return sal_False;
}
- ULONG nBasis = ((ULONG)floor( // 9, 99, 999 ,...
+ sal_uLong nBasis = ((sal_uLong)floor( // 9, 99, 999 ,...
pow(10.0,rInfo.nCntExp))) - 1;
- ULONG x0, y0, x1, y1;
+ sal_uLong x0, y0, x1, y1;
if (rInfo.nCntExp <= _MAX_FRACTION_PREC)
{
- BOOL bUpperHalf;
+ sal_Bool bUpperHalf;
if (fNumber > 0.5)
{
- bUpperHalf = TRUE;
+ bUpperHalf = sal_True;
fNumber -= (fNumber - 0.5) * 2.0;
}
else
- bUpperHalf = FALSE;
+ bUpperHalf = sal_False;
// Einstieg in Farey-Serie
// finden:
- x0 = (ULONG) floor(fNumber*nBasis); // z.B. 2/9 <= x < 3/9
+ x0 = (sal_uLong) floor(fNumber*nBasis); // z.B. 2/9 <= x < 3/9
if (x0 == 0) // => x0 = 2
{
y0 = 1;
@@ -2262,12 +2262,12 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
y1 = nBasis - 1;
double fUg = (double) x0 / (double) y0;
double fOg = (double) x1 / (double) y1;
- ULONG nGgt = ImpGGT(y0, x0); // x0/y0 kuerzen
+ sal_uLong nGgt = ImpGGT(y0, x0); // x0/y0 kuerzen
x0 /= nGgt;
y0 /= nGgt; // Einschachteln:
- ULONG x2 = 0;
- ULONG y2 = 0;
- BOOL bStop = FALSE;
+ sal_uLong x2 = 0;
+ sal_uLong y2 = 0;
+ sal_Bool bStop = sal_False;
while (!bStop)
{
#ifdef GCC
@@ -2291,20 +2291,20 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
if (fTest <= fOg)
{
fOg = fTest;
- bStop = TRUE;
+ bStop = sal_True;
}
else if (y1 == 1)
- bStop = TRUE;
+ bStop = sal_True;
} // of while
nGgt = ImpGGT(y1, x1); // x1/y1 kuerzen
x2 = x1 / nGgt;
y2 = y1 / nGgt;
if (x2*y0 - x0*y2 == 1 || y1 <= 1) // Test, ob x2/y2
- bStop = TRUE; // naechste Farey-Zahl
+ bStop = sal_True; // naechste Farey-Zahl
else
{
y1--;
- bStop = FALSE;
+ bStop = sal_False;
}
} // of while
x1 = x2;
@@ -2315,8 +2315,8 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
fup = (double)x1/(double)y1;
while (fNumber > fup)
{
- ULONG x2 = ((y0+nBasis)/y1)*x1 - x0; // naechste Farey-Zahl
- ULONG y2 = ((y0+nBasis)/y1)*y1 - y0;
+ sal_uLong x2 = ((y0+nBasis)/y1)*x1 - x0; // naechste Farey-Zahl
+ sal_uLong y2 = ((y0+nBasis)/y1)*y1 - y0;
// GetNextFareyNumber(nBasis, x0, x1, y0, y1, x2, y2);
x0 = x1;
y0 = y1;
@@ -2345,14 +2345,14 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
}
else // grosse Nenner
{ // 0,1234->123/1000
- ULONG nGgt;
+ sal_uLong nGgt;
/*
nDiv = nBasis+1;
- nFrac = ((ULONG)floor(0.5 + fNumber *
+ nFrac = ((sal_uLong)floor(0.5 + fNumber *
pow(10.0,rInfo.nCntExp)));
*/
nDiv = 10000000;
- nFrac = ((ULONG)floor(0.5 + fNumber * 10000000.0));
+ nFrac = ((sal_uLong)floor(0.5 + fNumber * 10000000.0));
nGgt = ImpGGT(nDiv, nFrac);
if (nGgt > 1)
{
@@ -2371,7 +2371,7 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
if (nDiv > nBasis)
{
nDiv = nBasis;
- nFrac = ((ULONG)floor(0.5 + fNumber *
+ nFrac = ((sal_uLong)floor(0.5 + fNumber *
pow(10.0,rInfo.nCntExp)));
nGgt = ImpGGTRound(nDiv, nFrac);
if (nGgt > 1)
@@ -2388,9 +2388,9 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
if (fNum1 > _D_MAX_U_LONG_)
{
OutString = rScan.GetErrorString();
- return FALSE;
+ return sal_False;
}
- nFrac = (ULONG) floor(fNum1);
+ nFrac = (sal_uLong) floor(fNum1);
sStr.Erase();
}
else if (fNum == 0.0 && nFrac != 0)
@@ -2413,10 +2413,10 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
sDiv = ImpIntToString( nIx, nDiv );
}
- USHORT j = nAnz-1; // letztes Symbol->rueckw.
+ sal_uInt16 j = nAnz-1; // letztes Symbol->rueckw.
xub_StrLen k; // Nenner:
bRes |= ImpNumberFill(sDiv, fNumber, k, j, nIx, NF_SYMBOLTYPE_FRAC);
- BOOL bCont = TRUE;
+ sal_Bool bCont = sal_True;
if (rInfo.nTypeArray[j] == NF_SYMBOLTYPE_FRAC)
{
if (rInfo.nCntPre > 0 && nFrac == 0)
@@ -2426,7 +2426,7 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
if ( j )
j--;
else
- bCont = FALSE;
+ bCont = sal_False;
}
// weiter Zaehler:
if ( !bCont )
@@ -2440,7 +2440,7 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
if ( j )
j--;
else
- bCont = FALSE;
+ bCont = sal_False;
}
}
// weiter Hauptzahl
@@ -2461,11 +2461,11 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
break;
case NUMBERFORMAT_SCIENTIFIC:
{
- BOOL bSign = FALSE;
+ sal_Bool bSign = sal_False;
if (fNumber < 0)
{
if (nIx == 0) // nicht in hinteren
- bSign = TRUE; // Formaten
+ bSign = sal_True; // Formaten
fNumber = -fNumber;
}
String sStr( ::rtl::math::doubleToUString( fNumber,
@@ -2505,7 +2505,7 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
ExpStr = String::CreateFromInt32( nExp );
}
}
- USHORT j = nAnz-1; // last symbol
+ sal_uInt16 j = nAnz-1; // last symbol
xub_StrLen k; // position in ExpStr
bRes |= ImpNumberFill(ExpStr, fNumber, k, j, nIx, NF_SYMBOLTYPE_EXP);
@@ -2515,7 +2515,7 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
if (nZeros)
ExpStr.Erase( 0, nZeros);
- BOOL bCont = TRUE;
+ sal_Bool bCont = sal_True;
if (rInfo.nTypeArray[j] == NF_SYMBOLTYPE_EXP)
{
const String& rStr = rInfo.sStrArray[j];
@@ -2527,7 +2527,7 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
if ( j )
j--;
else
- bCont = FALSE;
+ bCont = sal_False;
}
// weiter Hauptzahl:
if ( !bCont )
@@ -2550,20 +2550,20 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
return bRes;
}
-BOOL SvNumberformat::ImpGetTimeOutput(double fNumber,
- USHORT nIx,
+sal_Bool SvNumberformat::ImpGetTimeOutput(double fNumber,
+ sal_uInt16 nIx,
String& OutString)
{
using namespace ::com::sun::star::i18n;
- BOOL bCalendarSet = FALSE;
+ sal_Bool bCalendarSet = sal_False;
double fNumberOrig = fNumber;
- BOOL bRes = FALSE;
- BOOL bSign = FALSE;
+ sal_Bool bRes = sal_False;
+ sal_Bool bSign = sal_False;
if (fNumber < 0.0)
{
fNumber = -fNumber;
if (nIx == 0)
- bSign = TRUE;
+ bSign = sal_True;
}
const ImpSvNumberformatInfo& rInfo = NumFor[nIx].Info();
if (rInfo.bThousand) // []-Format
@@ -2571,22 +2571,22 @@ BOOL SvNumberformat::ImpGetTimeOutput(double fNumber,
if (fNumber > 1.0E10) // zu gross
{
OutString = rScan.GetErrorString();
- return FALSE;
+ return sal_False;
}
}
else
fNumber -= floor(fNumber); // sonst Datum abtrennen
- BOOL bInputLine;
+ sal_Bool bInputLine;
xub_StrLen nCntPost;
if ( rScan.GetStandardPrec() == 300 &&
0 < rInfo.nCntPost && rInfo.nCntPost < 7 )
{ // round at 7 decimals (+5 of 86400 == 12 significant digits)
- bInputLine = TRUE;
+ bInputLine = sal_True;
nCntPost = 7;
}
else
{
- bInputLine = FALSE;
+ bInputLine = sal_False;
nCntPost = xub_StrLen(rInfo.nCntPost);
}
if (bSign && !rInfo.bThousand) // kein []-Format
@@ -2594,14 +2594,14 @@ BOOL SvNumberformat::ImpGetTimeOutput(double fNumber,
double fTime = fNumber * 86400.0;
fTime = ::rtl::math::round( fTime, int(nCntPost) );
if (bSign && fTime == 0.0)
- bSign = FALSE; // nicht -00:00:00
+ bSign = sal_False; // nicht -00:00:00
if( floor( fTime ) > _D_MAX_U_LONG_ )
{
OutString = rScan.GetErrorString();
- return FALSE;
+ return sal_False;
}
- ULONG nSeconds = (ULONG)floor( fTime );
+ sal_uLong nSeconds = (sal_uLong)floor( fTime );
String sSecStr( ::rtl::math::doubleToUString( fTime-nSeconds,
rtl_math_StringFormat_F, int(nCntPost), '.'));
@@ -2620,7 +2620,7 @@ BOOL SvNumberformat::ImpGetTimeOutput(double fNumber,
xub_StrLen nSecPos = 0; // Zum Ziffernweisen
// abarbeiten
- ULONG nHour, nMin, nSec;
+ sal_uLong nHour, nMin, nSec;
if (!rInfo.bThousand) // kein [] Format
{
nHour = (nSeconds/3600) % 24;
@@ -2669,8 +2669,8 @@ BOOL SvNumberformat::ImpGetTimeOutput(double fNumber,
nHour -= 12;
}
}
- const USHORT nAnz = NumFor[nIx].GetnAnz();
- for (USHORT i = 0; i < nAnz; i++)
+ const sal_uInt16 nAnz = NumFor[nIx].GetnAnz();
+ for (sal_uInt16 i = 0; i < nAnz; i++)
{
switch (rInfo.nTypeArray[i])
{
@@ -2679,7 +2679,7 @@ BOOL SvNumberformat::ImpGetTimeOutput(double fNumber,
{
OutString += (sal_Unicode) 0x1B;
OutString += rInfo.sStrArray[i].GetChar(1);
- bRes = TRUE;
+ bRes = sal_True;
}
break;
case NF_SYMBOLTYPE_BLANK:
@@ -2713,7 +2713,7 @@ BOOL SvNumberformat::ImpGetTimeOutput(double fNumber,
double fDiff = DateTime(*(rScan.GetNullDate())) - GetCal().getEpochStart();
fDiff += fNumberOrig;
GetCal().setLocalDateTime( fDiff );
- bCalendarSet = TRUE;
+ bCalendarSet = sal_True;
}
if (cAmPm == 'a')
OutString += GetCal().getDisplayName(
@@ -2759,29 +2759,29 @@ BOOL SvNumberformat::ImpGetTimeOutput(double fNumber,
}
-BOOL SvNumberformat::ImpIsOtherCalendar( const ImpSvNumFor& rNumFor ) const
+sal_Bool SvNumberformat::ImpIsOtherCalendar( const ImpSvNumFor& rNumFor ) const
{
if ( GetCal().getUniqueID() != Gregorian::get() )
- return FALSE;
+ return sal_False;
const ImpSvNumberformatInfo& rInfo = rNumFor.Info();
- const USHORT nAnz = rNumFor.GetnAnz();
- USHORT i;
+ const sal_uInt16 nAnz = rNumFor.GetnAnz();
+ sal_uInt16 i;
for ( i = 0; i < nAnz; i++ )
{
switch ( rInfo.nTypeArray[i] )
{
case NF_SYMBOLTYPE_CALENDAR :
- return FALSE;
+ return sal_False;
case NF_KEY_EC :
case NF_KEY_EEC :
case NF_KEY_R :
case NF_KEY_RR :
case NF_KEY_AAA :
case NF_KEY_AAAA :
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
@@ -2830,7 +2830,7 @@ void SvNumberformat::SwitchToGregorianCalendar( const String& rOrgCalendar,
}
-BOOL SvNumberformat::ImpFallBackToGregorianCalendar( String& rOrgCalendar, double& fOrgDateTime )
+sal_Bool SvNumberformat::ImpFallBackToGregorianCalendar( String& rOrgCalendar, double& fOrgDateTime )
{
using namespace ::com::sun::star::i18n;
CalendarWrapper& rCal = GetCal();
@@ -2850,19 +2850,19 @@ BOOL SvNumberformat::ImpFallBackToGregorianCalendar( String& rOrgCalendar, doubl
rOrgCalendar.Erase();
rCal.loadCalendar( rGregorian, rLoc().getLocale() );
rCal.setDateTime( fOrgDateTime );
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
-BOOL SvNumberformat::ImpSwitchToSpecifiedCalendar( String& rOrgCalendar,
+sal_Bool SvNumberformat::ImpSwitchToSpecifiedCalendar( String& rOrgCalendar,
double& fOrgDateTime, const ImpSvNumFor& rNumFor ) const
{
const ImpSvNumberformatInfo& rInfo = rNumFor.Info();
- const USHORT nAnz = rNumFor.GetnAnz();
- for ( USHORT i = 0; i < nAnz; i++ )
+ const sal_uInt16 nAnz = rNumFor.GetnAnz();
+ for ( sal_uInt16 i = 0; i < nAnz; i++ )
{
if ( rInfo.nTypeArray[i] == NF_SYMBOLTYPE_CALENDAR )
{
@@ -2874,10 +2874,10 @@ BOOL SvNumberformat::ImpSwitchToSpecifiedCalendar( String& rOrgCalendar,
}
rCal.loadCalendar( rInfo.sStrArray[i], rLoc().getLocale() );
rCal.setDateTime( fOrgDateTime );
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
@@ -2906,27 +2906,27 @@ void SvNumberformat::ImpAppendEraG( String& OutString,
}
-BOOL SvNumberformat::ImpGetDateOutput(double fNumber,
- USHORT nIx,
+sal_Bool SvNumberformat::ImpGetDateOutput(double fNumber,
+ sal_uInt16 nIx,
String& OutString)
{
using namespace ::com::sun::star::i18n;
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
CalendarWrapper& rCal = GetCal();
double fDiff = DateTime(*(rScan.GetNullDate())) - rCal.getEpochStart();
fNumber += fDiff;
rCal.setLocalDateTime( fNumber );
String aOrgCalendar; // empty => not changed yet
double fOrgDateTime;
- BOOL bOtherCalendar = ImpIsOtherCalendar( NumFor[nIx] );
+ sal_Bool bOtherCalendar = ImpIsOtherCalendar( NumFor[nIx] );
if ( bOtherCalendar )
SwitchToOtherCalendar( aOrgCalendar, fOrgDateTime );
if ( ImpFallBackToGregorianCalendar( aOrgCalendar, fOrgDateTime ) )
- bOtherCalendar = FALSE;
+ bOtherCalendar = sal_False;
const ImpSvNumberformatInfo& rInfo = NumFor[nIx].Info();
- const USHORT nAnz = NumFor[nIx].GetnAnz();
+ const sal_uInt16 nAnz = NumFor[nIx].GetnAnz();
sal_Int16 nNatNum = NumFor[nIx].GetNatNum().GetNatNum();
- for (USHORT i = 0; i < nAnz; i++)
+ for (sal_uInt16 i = 0; i < nAnz; i++)
{
switch (rInfo.nTypeArray[i])
{
@@ -2945,7 +2945,7 @@ BOOL SvNumberformat::ImpGetDateOutput(double fNumber,
{
OutString += (sal_Unicode) 0x1B;
OutString += rInfo.sStrArray[i].GetChar(1);
- bRes = TRUE;
+ bRes = sal_True;
}
break;
case NF_SYMBOLTYPE_BLANK:
@@ -3089,29 +3089,29 @@ BOOL SvNumberformat::ImpGetDateOutput(double fNumber,
return bRes;
}
-BOOL SvNumberformat::ImpGetDateTimeOutput(double fNumber,
- USHORT nIx,
+sal_Bool SvNumberformat::ImpGetDateTimeOutput(double fNumber,
+ sal_uInt16 nIx,
String& OutString)
{
using namespace ::com::sun::star::i18n;
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
CalendarWrapper& rCal = GetCal();
double fDiff = DateTime(*(rScan.GetNullDate())) - rCal.getEpochStart();
fNumber += fDiff;
const ImpSvNumberformatInfo& rInfo = NumFor[nIx].Info();
- BOOL bInputLine;
+ sal_Bool bInputLine;
xub_StrLen nCntPost;
if ( rScan.GetStandardPrec() == 300 &&
0 < rInfo.nCntPost && rInfo.nCntPost < 7 )
{ // round at 7 decimals (+5 of 86400 == 12 significant digits)
- bInputLine = TRUE;
+ bInputLine = sal_True;
nCntPost = 7;
}
else
{
- bInputLine = FALSE;
+ bInputLine = sal_False;
nCntPost = xub_StrLen(rInfo.nCntPost);
}
double fTime = (fNumber - floor( fNumber )) * 86400.0;
@@ -3126,14 +3126,14 @@ BOOL SvNumberformat::ImpGetDateTimeOutput(double fNumber,
String aOrgCalendar; // empty => not changed yet
double fOrgDateTime;
- BOOL bOtherCalendar = ImpIsOtherCalendar( NumFor[nIx] );
+ sal_Bool bOtherCalendar = ImpIsOtherCalendar( NumFor[nIx] );
if ( bOtherCalendar )
SwitchToOtherCalendar( aOrgCalendar, fOrgDateTime );
if ( ImpFallBackToGregorianCalendar( aOrgCalendar, fOrgDateTime ) )
- bOtherCalendar = FALSE;
+ bOtherCalendar = sal_False;
sal_Int16 nNatNum = NumFor[nIx].GetNatNum().GetNatNum();
- ULONG nSeconds = (ULONG)floor( fTime );
+ sal_uLong nSeconds = (sal_uLong)floor( fTime );
String sSecStr( ::rtl::math::doubleToUString( fTime-nSeconds,
rtl_math_StringFormat_F, int(nCntPost), '.'));
sSecStr.EraseLeadingChars('0');
@@ -3151,7 +3151,7 @@ BOOL SvNumberformat::ImpGetDateTimeOutput(double fNumber,
xub_StrLen nSecPos = 0; // Zum Ziffernweisen
// abarbeiten
- ULONG nHour, nMin, nSec;
+ sal_uLong nHour, nMin, nSec;
if (!rInfo.bThousand) // [] Format
{
nHour = (nSeconds/3600) % 24;
@@ -3198,8 +3198,8 @@ BOOL SvNumberformat::ImpGetDateTimeOutput(double fNumber,
nHour -= 12;
}
}
- const USHORT nAnz = NumFor[nIx].GetnAnz();
- for (USHORT i = 0; i < nAnz; i++)
+ const sal_uInt16 nAnz = NumFor[nIx].GetnAnz();
+ for (sal_uInt16 i = 0; i < nAnz; i++)
{
switch (rInfo.nTypeArray[i])
{
@@ -3218,7 +3218,7 @@ BOOL SvNumberformat::ImpGetDateTimeOutput(double fNumber,
{
OutString += (sal_Unicode) 0x1B;
OutString += rInfo.sStrArray[i].GetChar(1);
- bRes = TRUE;
+ bRes = sal_True;
}
break;
case NF_SYMBOLTYPE_BLANK:
@@ -3411,23 +3411,23 @@ BOOL SvNumberformat::ImpGetDateTimeOutput(double fNumber,
return bRes;
}
-BOOL SvNumberformat::ImpGetNumberOutput(double fNumber,
- USHORT nIx,
+sal_Bool SvNumberformat::ImpGetNumberOutput(double fNumber,
+ sal_uInt16 nIx,
String& OutString)
{
- BOOL bRes = FALSE;
- BOOL bSign;
+ sal_Bool bRes = sal_False;
+ sal_Bool bSign;
if (fNumber < 0.0)
{
if (nIx == 0) // nicht in hinteren
- bSign = TRUE; // Formaten
+ bSign = sal_True; // Formaten
else
- bSign = FALSE;
+ bSign = sal_False;
fNumber = -fNumber;
}
else
{
- bSign = FALSE;
+ bSign = sal_False;
if ( ::rtl::math::isSignBitSet( fNumber ) )
fNumber = -fNumber; // yes, -0.0 is possible, eliminate '-'
}
@@ -3439,17 +3439,17 @@ BOOL SvNumberformat::ImpGetNumberOutput(double fNumber,
else
{
OutString = rScan.GetErrorString();
- return FALSE;
+ return sal_False;
}
}
- USHORT i, j;
+ sal_uInt16 i, j;
xub_StrLen k;
String sStr;
long nPrecExp;
- BOOL bInteger = FALSE;
+ sal_Bool bInteger = sal_False;
if ( rInfo.nThousand != FLAG_STANDARD_IN_FORMAT )
{ // special formatting only if no GENERAL keyword in format code
- const USHORT nThousand = rInfo.nThousand;
+ const sal_uInt16 nThousand = rInfo.nThousand;
for (i = 0; i < nThousand; i++)
{
if (fNumber > _D_MIN_M_BY_1000)
@@ -3493,12 +3493,12 @@ BOOL SvNumberformat::ImpGetNumberOutput(double fNumber,
while ( *++p == '0' )
;
if ( !*p )
- bInteger = TRUE;
+ bInteger = sal_True;
sStr.Erase( nPoint, 1 ); // . herausnehmen
}
if (bSign &&
(sStr.Len() == 0 || sStr.GetTokenCount('0') == sStr.Len()+1)) // nur 00000
- bSign = FALSE; // nicht -0.00
+ bSign = sal_False; // nicht -0.00
} // End of != FLAG_STANDARD_IN_FORMAT
// von hinten nach vorn
@@ -3508,8 +3508,8 @@ BOOL SvNumberformat::ImpGetNumberOutput(double fNumber,
// Nachkommastellen:
if (rInfo.nCntPost > 0)
{
- BOOL bTrailing = TRUE; // ob Endnullen?
- BOOL bFilled = FALSE; // ob aufgefuellt wurde ?
+ sal_Bool bTrailing = sal_True; // ob Endnullen?
+ sal_Bool bFilled = sal_False; // ob aufgefuellt wurde ?
short nType;
while (j > 0 && // rueckwaerts
(nType = rInfo.nTypeArray[j]) != NF_SYMBOLTYPE_DECSEP)
@@ -3521,7 +3521,7 @@ BOOL SvNumberformat::ImpGetNumberOutput(double fNumber,
{
sStr.Insert( (sal_Unicode) 0x1B, k /*++*/ );
sStr.Insert(rInfo.sStrArray[j].GetChar(1),k);
- bRes = TRUE;
+ bRes = sal_True;
}
break;
case NF_SYMBOLTYPE_BLANK:
@@ -3546,21 +3546,21 @@ BOOL SvNumberformat::ImpGetNumberOutput(double fNumber,
const sal_Unicode c = *p;
k--;
if ( sStr.GetChar(k) != '0' )
- bTrailing = FALSE;
+ bTrailing = sal_False;
if (bTrailing)
{
if ( c == '0' )
- bFilled = TRUE;
+ bFilled = sal_True;
else if ( c == '-' )
{
if ( bInteger )
sStr.SetChar( k, '-' );
- bFilled = TRUE;
+ bFilled = sal_True;
}
else if ( c == '?' )
{
sStr.SetChar( k, ' ' );
- bFilled = TRUE;
+ bFilled = sal_True;
}
else if ( !bFilled ) // #
sStr.Erase(k,1);
@@ -3602,27 +3602,27 @@ BOOL SvNumberformat::ImpGetNumberOutput(double fNumber,
return bRes;
}
-BOOL SvNumberformat::ImpNumberFillWithThousands(
+sal_Bool SvNumberformat::ImpNumberFillWithThousands(
String& sStr, // number string
double& rNumber, // number
xub_StrLen k, // position within string
- USHORT j, // symbol index within format code
- USHORT nIx, // subformat index
- USHORT nDigCnt) // count of integer digits in format
+ sal_uInt16 j, // symbol index within format code
+ sal_uInt16 nIx, // subformat index
+ sal_uInt16 nDigCnt) // count of integer digits in format
{
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
xub_StrLen nLeadingStringChars = 0; // inserted StringChars before number
xub_StrLen nDigitCount = 0; // count of integer digits from the right
- BOOL bStop = FALSE;
+ sal_Bool bStop = sal_False;
const ImpSvNumberformatInfo& rInfo = NumFor[nIx].Info();
// no normal thousands separators if number divided by thousands
- BOOL bDoThousands = (rInfo.nThousand == 0);
+ sal_Bool bDoThousands = (rInfo.nThousand == 0);
utl::DigitGroupingIterator aGrouping(
GetFormatter().GetLocaleData()->getDigitGrouping());
while (!bStop) // backwards
{
if (j == 0)
- bStop = TRUE;
+ bStop = sal_True;
switch (rInfo.nTypeArray[j])
{
case NF_SYMBOLTYPE_DECSEP:
@@ -3641,7 +3641,7 @@ BOOL SvNumberformat::ImpNumberFillWithThousands(
{
sStr.Insert( (sal_Unicode) 0x1B, k/*++*/ );
sStr.Insert(rInfo.sStrArray[j].GetChar(1),k);
- bRes = TRUE;
+ bRes = sal_True;
}
break;
case NF_SYMBOLTYPE_BLANK:
@@ -3761,7 +3761,7 @@ void SvNumberformat::ImpDigitFill(
String& sStr, // number string
xub_StrLen nStart, // start of digits
xub_StrLen& k, // position within string
- USHORT nIx, // subformat index
+ sal_uInt16 nIx, // subformat index
xub_StrLen & nDigitCount, // count of integer digits from the right so far
utl::DigitGroupingIterator & rGrouping ) // current grouping
{
@@ -3783,18 +3783,18 @@ void SvNumberformat::ImpDigitFill(
k = nStart;
}
-BOOL SvNumberformat::ImpNumberFill( String& sStr, // number string
+sal_Bool SvNumberformat::ImpNumberFill( String& sStr, // number string
double& rNumber, // number for "General" format
xub_StrLen& k, // position within string
- USHORT& j, // symbol index within format code
- USHORT nIx, // subformat index
+ sal_uInt16& j, // symbol index within format code
+ sal_uInt16 nIx, // subformat index
short eSymbolType ) // type of stop condition
{
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
k = sStr.Len(); // behind last digit
const ImpSvNumberformatInfo& rInfo = NumFor[nIx].Info();
// no normal thousands separators if number divided by thousands
- BOOL bDoThousands = (rInfo.nThousand == 0);
+ sal_Bool bDoThousands = (rInfo.nThousand == 0);
short nType;
while (j > 0 && (nType = rInfo.nTypeArray[j]) != eSymbolType )
{ // rueckwaerts:
@@ -3805,7 +3805,7 @@ BOOL SvNumberformat::ImpNumberFill( String& sStr, // number string
{
sStr.Insert( sal_Unicode(0x1B), k++ );
sStr.Insert(rInfo.sStrArray[j].GetChar(1),k);
- bRes = TRUE;
+ bRes = sal_True;
}
break;
case NF_SYMBOLTYPE_BLANK:
@@ -3873,10 +3873,10 @@ BOOL SvNumberformat::ImpNumberFill( String& sStr, // number string
return bRes;
}
-void SvNumberformat::GetFormatSpecialInfo(BOOL& bThousand,
- BOOL& IsRed,
- USHORT& nPrecision,
- USHORT& nAnzLeading) const
+void SvNumberformat::GetFormatSpecialInfo(sal_Bool& bThousand,
+ sal_Bool& IsRed,
+ sal_uInt16& nPrecision,
+ sal_uInt16& nAnzLeading) const
{
// as before: take info from nNumFor=0 for whole format (for dialog etc.)
@@ -3888,13 +3888,13 @@ void SvNumberformat::GetFormatSpecialInfo(BOOL& bThousand,
const Color* pColor = NumFor[1].GetColor();
if (fLimit1 == 0.0 && fLimit2 == 0.0 && pColor
&& (*pColor == rScan.GetRedColor()))
- IsRed = TRUE;
+ IsRed = sal_True;
else
- IsRed = FALSE;
+ IsRed = sal_False;
}
-void SvNumberformat::GetNumForInfo( USHORT nNumFor, short& rScannedType,
- BOOL& bThousand, USHORT& nPrecision, USHORT& nAnzLeading ) const
+void SvNumberformat::GetNumForInfo( sal_uInt16 nNumFor, short& rScannedType,
+ sal_Bool& bThousand, sal_uInt16& nPrecision, sal_uInt16& nAnzLeading ) const
{
// take info from a specified sub-format (for XML export)
@@ -3911,9 +3911,9 @@ void SvNumberformat::GetNumForInfo( USHORT nNumFor, short& rScannedType,
else
{
nAnzLeading = 0;
- BOOL bStop = FALSE;
- USHORT i = 0;
- const USHORT nAnz = NumFor[nNumFor].GetnAnz();
+ sal_Bool bStop = sal_False;
+ sal_uInt16 i = 0;
+ const sal_uInt16 nAnz = NumFor[nNumFor].GetnAnz();
while (!bStop && i < nAnz)
{
short nType = rInfo.nTypeArray[i];
@@ -3926,18 +3926,18 @@ void SvNumberformat::GetNumForInfo( USHORT nNumFor, short& rScannedType,
nAnzLeading++;
}
else if (nType == NF_SYMBOLTYPE_DECSEP || nType == NF_SYMBOLTYPE_EXP)
- bStop = TRUE;
+ bStop = sal_True;
i++;
}
}
}
-const String* SvNumberformat::GetNumForString( USHORT nNumFor, USHORT nPos,
- BOOL bString /* = FALSE */ ) const
+const String* SvNumberformat::GetNumForString( sal_uInt16 nNumFor, sal_uInt16 nPos,
+ sal_Bool bString /* = sal_False */ ) const
{
if ( nNumFor > 3 )
return NULL;
- USHORT nAnz = NumFor[nNumFor].GetnAnz();
+ sal_uInt16 nAnz = NumFor[nNumFor].GetnAnz();
if ( !nAnz )
return NULL;
if ( nPos == 0xFFFF )
@@ -3975,12 +3975,12 @@ const String* SvNumberformat::GetNumForString( USHORT nNumFor, USHORT nPos,
}
-short SvNumberformat::GetNumForType( USHORT nNumFor, USHORT nPos,
- BOOL bString /* = FALSE */ ) const
+short SvNumberformat::GetNumForType( sal_uInt16 nNumFor, sal_uInt16 nPos,
+ sal_Bool bString /* = sal_False */ ) const
{
if ( nNumFor > 3 )
return 0;
- USHORT nAnz = NumFor[nNumFor].GetnAnz();
+ sal_uInt16 nAnz = NumFor[nNumFor].GetnAnz();
if ( !nAnz )
return 0;
if ( nPos == 0xFFFF )
@@ -4017,15 +4017,15 @@ short SvNumberformat::GetNumForType( USHORT nNumFor, USHORT nPos,
}
-BOOL SvNumberformat::IsNegativeWithoutSign() const
+sal_Bool SvNumberformat::IsNegativeWithoutSign() const
{
if ( IsNegativeRealNegative() )
{
- const String* pStr = GetNumForString( 1, 0, TRUE );
+ const String* pStr = GetNumForString( 1, 0, sal_True );
if ( pStr )
return !HasStringNegativeSign( *pStr );
}
- return FALSE;
+ return sal_False;
}
@@ -4034,8 +4034,8 @@ DateFormat SvNumberformat::GetDateOrder() const
if ( (eType & NUMBERFORMAT_DATE) == NUMBERFORMAT_DATE )
{
short const * const pType = NumFor[0].Info().nTypeArray;
- USHORT nAnz = NumFor[0].GetnAnz();
- for ( USHORT j=0; j<nAnz; j++ )
+ sal_uInt16 nAnz = NumFor[0].GetnAnz();
+ for ( sal_uInt16 j=0; j<nAnz; j++ )
{
switch ( pType[j] )
{
@@ -4075,9 +4075,9 @@ sal_uInt32 SvNumberformat::GetExactDateOrder() const
return nRet;
}
short const * const pType = NumFor[0].Info().nTypeArray;
- USHORT nAnz = NumFor[0].GetnAnz();
+ sal_uInt16 nAnz = NumFor[0].GetnAnz();
int nShift = 0;
- for ( USHORT j=0; j<nAnz && nShift < 3; j++ )
+ for ( sal_uInt16 j=0; j<nAnz && nShift < 3; j++ )
{
switch ( pType[j] )
{
@@ -4119,7 +4119,7 @@ void SvNumberformat::GetConditions( SvNumberformatLimitOps& rOper1, double& rVal
}
-Color* SvNumberformat::GetColor( USHORT nNumFor ) const
+Color* SvNumberformat::GetColor( sal_uInt16 nNumFor ) const
{
if ( nNumFor > 3 )
return NULL;
@@ -4167,10 +4167,10 @@ void lcl_SvNumberformat_AddLimitStringImpl( String& rStr,
String SvNumberformat::GetMappedFormatstring(
const NfKeywordTable& rKeywords, const LocaleDataWrapper& rLocWrp,
- BOOL bDontQuote ) const
+ sal_Bool bDontQuote ) const
{
String aStr;
- BOOL bDefault[4];
+ sal_Bool bDefault[4];
// 1 subformat matches all if no condition specified,
bDefault[0] = ( NumFor[1].GetnAnz() == 0 && eOp1 == NUMBERFORMAT_OP_NO );
// with 2 subformats [>=0];[<0] is implied if no condition specified
@@ -4182,26 +4182,26 @@ String SvNumberformat::GetMappedFormatstring(
bDefault[2] = ( !bDefault[0] && !bDefault[1] &&
eOp1 == NUMBERFORMAT_OP_GT && fLimit1 == 0.0 &&
eOp2 == NUMBERFORMAT_OP_LT && fLimit2 == 0.0 );
- BOOL bDefaults = bDefault[0] || bDefault[1] || bDefault[2];
+ sal_Bool bDefaults = bDefault[0] || bDefault[1] || bDefault[2];
// from now on bDefault[] values are used to append empty subformats at the end
- bDefault[3] = FALSE;
+ bDefault[3] = sal_False;
if ( !bDefaults )
{ // conditions specified
if ( eOp1 != NUMBERFORMAT_OP_NO && eOp2 == NUMBERFORMAT_OP_NO )
- bDefault[0] = bDefault[1] = TRUE; // [];x
+ bDefault[0] = bDefault[1] = sal_True; // [];x
else if ( eOp1 != NUMBERFORMAT_OP_NO && eOp2 != NUMBERFORMAT_OP_NO &&
NumFor[2].GetnAnz() == 0 )
- bDefault[0] = bDefault[1] = bDefault[2] = bDefault[3] = TRUE; // [];[];;
+ bDefault[0] = bDefault[1] = bDefault[2] = bDefault[3] = sal_True; // [];[];;
// nothing to do if conditions specified for every subformat
}
else if ( bDefault[0] )
- bDefault[0] = FALSE; // a single unconditional subformat is never delimited
+ bDefault[0] = sal_False; // a single unconditional subformat is never delimited
else
{
if ( bDefault[2] && NumFor[2].GetnAnz() == 0 && NumFor[1].GetnAnz() > 0 )
- bDefault[3] = TRUE; // special cases x;x;; and ;x;;
+ bDefault[3] = sal_True; // special cases x;x;; and ;x;;
for ( int i=0; i<3 && !bDefault[i]; ++i )
- bDefault[i] = TRUE;
+ bDefault[i] = sal_True;
}
int nSem = 0; // needed ';' delimiters
int nSub = 0; // subformats delimited so far
@@ -4253,13 +4253,13 @@ String SvNumberformat::GetMappedFormatstring(
aPrefix += 't'; // must be lowercase, otherwise taken as literal
}
- USHORT nAnz = NumFor[n].GetnAnz();
+ sal_uInt16 nAnz = NumFor[n].GetnAnz();
if ( nSem && (nAnz || aPrefix.Len()) )
{
for ( ; nSem; --nSem )
aStr += ';';
for ( ; nSub <= n; ++nSub )
- bDefault[nSub] = FALSE;
+ bDefault[nSub] = sal_False;
}
if ( aPrefix.Len() )
@@ -4269,7 +4269,7 @@ String SvNumberformat::GetMappedFormatstring(
{
const short* pType = NumFor[n].Info().nTypeArray;
const String* pStr = NumFor[n].Info().sStrArray;
- for ( USHORT j=0; j<nAnz; j++ )
+ for ( sal_uInt16 j=0; j<nAnz; j++ )
{
if ( 0 <= pType[j] && pType[j] < NF_KEYWORD_ENTRIES_COUNT )
{
@@ -4328,7 +4328,7 @@ String SvNumberformat::GetMappedFormatstring(
String SvNumberformat::ImpGetNatNumString( const SvNumberNatNum& rNum,
- sal_Int32 nVal, USHORT nMinDigits ) const
+ sal_Int32 nVal, sal_uInt16 nMinDigits ) const
{
String aStr;
if ( nMinDigits )
@@ -4375,7 +4375,7 @@ void SvNumberformat::ImpTransliterateImpl( String& rStr,
void SvNumberformat::GetNatNumXml(
com::sun::star::i18n::NativeNumberXmlAttributes& rAttr,
- USHORT nNumFor ) const
+ sal_uInt16 nNumFor ) const
{
if ( nNumFor <= 3 )
{
@@ -4395,27 +4395,27 @@ void SvNumberformat::GetNatNumXml(
}
// static
-BOOL SvNumberformat::HasStringNegativeSign( const String& rStr )
+sal_Bool SvNumberformat::HasStringNegativeSign( const String& rStr )
{
// fuer Sign muss '-' am Anfang oder am Ende des TeilStrings sein (Blanks ignored)
xub_StrLen nLen = rStr.Len();
if ( !nLen )
- return FALSE;
+ return sal_False;
const sal_Unicode* const pBeg = rStr.GetBuffer();
const sal_Unicode* const pEnd = pBeg + nLen;
register const sal_Unicode* p = pBeg;
do
{ // Anfang
if ( *p == '-' )
- return TRUE;
+ return sal_True;
} while ( *p == ' ' && ++p < pEnd );
p = pEnd - 1;
do
{ // Ende
if ( *p == '-' )
- return TRUE;
+ return sal_True;
} while ( *p == ' ' && pBeg < --p );
- return FALSE;
+ return sal_False;
}
@@ -4476,9 +4476,9 @@ void SvNumberformat::EraseCommentBraces( String& rStr )
void SvNumberformat::EraseComment( String& rStr )
{
register const sal_Unicode* p = rStr.GetBuffer();
- BOOL bInString = FALSE;
- BOOL bEscaped = FALSE;
- BOOL bFound = FALSE;
+ sal_Bool bInString = sal_False;
+ sal_Bool bEscaped = sal_False;
+ sal_Bool bFound = sal_False;
xub_StrLen nPos = 0;
while ( !bFound && *p )
{
@@ -4494,14 +4494,14 @@ void SvNumberformat::EraseComment( String& rStr )
case '{' :
if ( !bEscaped && !bInString )
{
- bFound = TRUE;
+ bFound = sal_True;
nPos = sal::static_int_cast< xub_StrLen >(
p - rStr.GetBuffer());
}
break;
}
if ( bEscaped && *p != '\\' )
- bEscaped = FALSE;
+ bEscaped = sal_False;
++p;
}
if ( bFound )
@@ -4510,31 +4510,31 @@ void SvNumberformat::EraseComment( String& rStr )
// static
-BOOL SvNumberformat::IsInQuote( const String& rStr, xub_StrLen nPos,
+sal_Bool SvNumberformat::IsInQuote( const String& rStr, xub_StrLen nPos,
sal_Unicode cQuote, sal_Unicode cEscIn, sal_Unicode cEscOut )
{
xub_StrLen nLen = rStr.Len();
if ( nPos >= nLen )
- return FALSE;
+ return sal_False;
register const sal_Unicode* p0 = rStr.GetBuffer();
register const sal_Unicode* p = p0;
register const sal_Unicode* p1 = p0 + nPos;
- BOOL bQuoted = FALSE;
+ sal_Bool bQuoted = sal_False;
while ( p <= p1 )
{
if ( *p == cQuote )
{
if ( p == p0 )
- bQuoted = TRUE;
+ bQuoted = sal_True;
else if ( bQuoted )
{
if ( *(p-1) != cEscIn )
- bQuoted = FALSE;
+ bQuoted = sal_False;
}
else
{
if ( *(p-1) != cEscOut )
- bQuoted = TRUE;
+ bQuoted = sal_True;
}
}
p++;
@@ -4569,12 +4569,12 @@ xub_StrLen SvNumberformat::GetQuoteEnd( const String& rStr, xub_StrLen nPos,
}
-USHORT SvNumberformat::ImpGetNumForStringElementCount( USHORT nNumFor ) const
+sal_uInt16 SvNumberformat::ImpGetNumForStringElementCount( sal_uInt16 nNumFor ) const
{
- USHORT nCnt = 0;
- USHORT nAnz = NumFor[nNumFor].GetnAnz();
+ sal_uInt16 nCnt = 0;
+ sal_uInt16 nAnz = NumFor[nNumFor].GetnAnz();
short const * const pType = NumFor[nNumFor].Info().nTypeArray;
- for ( USHORT j=0; j<nAnz; ++j )
+ for ( sal_uInt16 j=0; j<nAnz; ++j )
{
switch ( pType[j] )
{
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index ab68d8309159..000649a6de80 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -81,7 +81,7 @@ namespace
ImpSvNumberformatScan::ImpSvNumberformatScan( SvNumberFormatter* pFormatterP )
{
pFormatter = pFormatterP;
- bConvertMode = FALSE;
+ bConvertMode = sal_False;
//! All keywords MUST be UPPERCASE!
sKeyword[NF_KEY_E].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "E" ) ); // Exponent
sKeyword[NF_KEY_AMPM].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "AM/PM" ) ); // AM/PM
@@ -97,8 +97,8 @@ ImpSvNumberformatScan::ImpSvNumberformatScan( SvNumberFormatter* pFormatterP )
sKeyword[NF_KEY_NNNN].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "NNNN" ) ); // Day of week long incl. separator
sKeyword[NF_KEY_WW].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "WW" ) ); // Week of year
sKeyword[NF_KEY_CCC].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "CCC" ) ); // Currency abbreviation
- bKeywordsNeedInit = TRUE; // locale dependent keywords
- bCompatCurNeedInit = TRUE; // locale dependent compatibility currency strings
+ bKeywordsNeedInit = sal_True; // locale dependent keywords
+ bCompatCurNeedInit = sal_True; // locale dependent compatibility currency strings
StandardColor[0] = Color(COL_BLACK);
StandardColor[1] = Color(COL_LIGHTBLUE);
@@ -127,8 +127,8 @@ ImpSvNumberformatScan::~ImpSvNumberformatScan()
void ImpSvNumberformatScan::ChangeIntl()
{
- bKeywordsNeedInit = TRUE;
- bCompatCurNeedInit = TRUE;
+ bKeywordsNeedInit = sal_True;
+ bCompatCurNeedInit = sal_True;
// may be initialized by InitSpecialKeyword()
sKeyword[NF_KEY_TRUE].Erase();
sKeyword[NF_KEY_FALSE].Erase();
@@ -146,7 +146,7 @@ void ImpSvNumberformatScan::InitSpecialKeyword( NfKeywordIndex eIdx ) const
if ( !sKeyword[NF_KEY_TRUE].Len() )
{
DBG_ERRORFILE( "InitSpecialKeyword: TRUE_WORD?" );
- ((ImpSvNumberformatScan*)this)->sKeyword[NF_KEY_TRUE].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "TRUE" ) );
+ ((ImpSvNumberformatScan*)this)->sKeyword[NF_KEY_TRUE].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "sal_True" ) );
}
break;
case NF_KEY_FALSE :
@@ -156,7 +156,7 @@ void ImpSvNumberformatScan::InitSpecialKeyword( NfKeywordIndex eIdx ) const
if ( !sKeyword[NF_KEY_FALSE].Len() )
{
DBG_ERRORFILE( "InitSpecialKeyword: FALSE_WORD?" );
- ((ImpSvNumberformatScan*)this)->sKeyword[NF_KEY_FALSE].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "FALSE" ) );
+ ((ImpSvNumberformatScan*)this)->sKeyword[NF_KEY_FALSE].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "sal_False" ) );
}
break;
default:
@@ -172,7 +172,7 @@ void ImpSvNumberformatScan::InitCompatCur() const
pFormatter->GetCompatibilityCurrency( pThis->sCurSymbol, pThis->sCurAbbrev );
// currency symbol upper case
pThis->sCurString = pFormatter->GetCharClass()->upper( sCurSymbol );
- bCompatCurNeedInit = FALSE;
+ bCompatCurNeedInit = sal_False;
}
@@ -181,7 +181,7 @@ void ImpSvNumberformatScan::InitKeywords() const
if ( !bKeywordsNeedInit )
return ;
((ImpSvNumberformatScan*)this)->SetDependentKeywords();
- bKeywordsNeedInit = FALSE;
+ bKeywordsNeedInit = sal_False;
}
@@ -457,7 +457,7 @@ void ImpSvNumberformatScan::SetDependentKeywords()
}
-void ImpSvNumberformatScan::ChangeNullDate(USHORT nDay, USHORT nMonth, USHORT nYear)
+void ImpSvNumberformatScan::ChangeNullDate(sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear)
{
if ( pNullDate )
*pNullDate = Date(nDay, nMonth, nYear);
@@ -515,7 +515,7 @@ Color* ImpSvNumberformatScan::GetColor(String& sStr)
{
long nIndex = sString.ToInt32();
if (nIndex > 0 && nIndex <= 64)
- pResult = pFormatter->GetUserDefColor((USHORT)nIndex-1);
+ pResult = pFormatter->GetUserDefColor((sal_uInt16)nIndex-1);
}
}
}
@@ -546,7 +546,7 @@ short ImpSvNumberformatScan::GetKeyWord( const String& sSymbol, xub_StrLen nPos
return NF_KEY_GENERAL;
//! MUST be a reverse search to find longer strings first
short i = NF_KEYWORD_ENTRIES_COUNT-1;
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
for ( ; i > NF_KEY_LASTKEYWORD_SO5; --i )
{
bFound = sString.Search(pKeyword[i]) == 0;
@@ -750,7 +750,7 @@ short ImpSvNumberformatScan::Next_Symbol( const String& rStr,
short nTmpType = GetKeyWord( rStr, nPos-1 );
if ( nTmpType )
{
- BOOL bCurrency = FALSE;
+ sal_Bool bCurrency = sal_False;
// "Automatic" currency may start with keyword,
// like "R" (Rand) and 'R' (era)
if ( nCurrPos != STRING_NOTFOUND &&
@@ -760,7 +760,7 @@ short ImpSvNumberformatScan::Next_Symbol( const String& rStr,
String aTest( rStr.Copy( nPos-1, sCurString.Len() ) );
pChrCls->toUpper( aTest );
if ( aTest == sCurString )
- bCurrency = TRUE;
+ bCurrency = sal_True;
}
if ( bCurrency )
{
@@ -840,7 +840,7 @@ short ImpSvNumberformatScan::Next_Symbol( const String& rStr,
}
else
{
- BOOL bDontStop = FALSE;
+ sal_Bool bDontStop = sal_False;
switch (cToken)
{
case '/': // AM/PM, A/P
@@ -856,7 +856,7 @@ short ImpSvNumberformatScan::Next_Symbol( const String& rStr,
&& (rStr.GetChar(nPos+1) == 'M' || rStr.GetChar(nPos+1) == 'm'))) )
{
sSymbol += cToken;
- bDontStop = TRUE;
+ bDontStop = sal_True;
}
}
}
@@ -925,7 +925,7 @@ xub_StrLen ImpSvNumberformatScan::Symbol_Division(const String& rString)
}
}
nAnzStrings = 0;
- BOOL bStar = FALSE; // wird bei '*'Detektion gesetzt
+ sal_Bool bStar = sal_False; // wird bei '*'Detektion gesetzt
Reset();
xub_StrLen nPos = 0;
@@ -938,7 +938,7 @@ xub_StrLen ImpSvNumberformatScan::Symbol_Division(const String& rString)
if (bStar)
return nPos; // Fehler: doppelter '*'
else
- bStar = TRUE;
+ bStar = sal_True;
}
nAnzStrings++;
}
@@ -946,7 +946,7 @@ xub_StrLen ImpSvNumberformatScan::Symbol_Division(const String& rString)
return 0; // 0 => ok
}
-void ImpSvNumberformatScan::SkipStrings(USHORT& i, xub_StrLen& nPos)
+void ImpSvNumberformatScan::SkipStrings(sal_uInt16& i, xub_StrLen& nPos)
{
while (i < nAnzStrings && ( nTypeArray[i] == NF_SYMBOLTYPE_STRING
|| nTypeArray[i] == NF_SYMBOLTYPE_BLANK
@@ -958,7 +958,7 @@ void ImpSvNumberformatScan::SkipStrings(USHORT& i, xub_StrLen& nPos)
}
-USHORT ImpSvNumberformatScan::PreviousKeyword(USHORT i)
+sal_uInt16 ImpSvNumberformatScan::PreviousKeyword(sal_uInt16 i)
{
short res = 0;
if (i > 0 && i < nAnzStrings)
@@ -972,7 +972,7 @@ USHORT ImpSvNumberformatScan::PreviousKeyword(USHORT i)
return res;
}
-USHORT ImpSvNumberformatScan::NextKeyword(USHORT i)
+sal_uInt16 ImpSvNumberformatScan::NextKeyword(sal_uInt16 i)
{
short res = 0;
if (i < nAnzStrings-1)
@@ -986,7 +986,7 @@ USHORT ImpSvNumberformatScan::NextKeyword(USHORT i)
return res;
}
-short ImpSvNumberformatScan::PreviousType( USHORT i )
+short ImpSvNumberformatScan::PreviousType( sal_uInt16 i )
{
if ( i > 0 && i < nAnzStrings )
{
@@ -999,7 +999,7 @@ short ImpSvNumberformatScan::PreviousType( USHORT i )
return 0;
}
-sal_Unicode ImpSvNumberformatScan::PreviousChar(USHORT i)
+sal_Unicode ImpSvNumberformatScan::PreviousChar(sal_uInt16 i)
{
sal_Unicode res = ' ';
if (i > 0 && i < nAnzStrings)
@@ -1016,7 +1016,7 @@ sal_Unicode ImpSvNumberformatScan::PreviousChar(USHORT i)
return res;
}
-sal_Unicode ImpSvNumberformatScan::NextChar(USHORT i)
+sal_Unicode ImpSvNumberformatScan::NextChar(sal_uInt16 i)
{
sal_Unicode res = ' ';
if (i < nAnzStrings-1)
@@ -1034,28 +1034,28 @@ sal_Unicode ImpSvNumberformatScan::NextChar(USHORT i)
return res;
}
-BOOL ImpSvNumberformatScan::IsLastBlankBeforeFrac(USHORT i)
+sal_Bool ImpSvNumberformatScan::IsLastBlankBeforeFrac(sal_uInt16 i)
{
- BOOL res = TRUE;
+ sal_Bool res = sal_True;
if (i < nAnzStrings-1)
{
- BOOL bStop = FALSE;
+ sal_Bool bStop = sal_False;
i++;
while (i < nAnzStrings-1 && !bStop)
{
i++;
if ( nTypeArray[i] == NF_SYMBOLTYPE_DEL &&
sStrArray[i].GetChar(0) == '/')
- bStop = TRUE;
+ bStop = sal_True;
else if ( nTypeArray[i] == NF_SYMBOLTYPE_DEL &&
sStrArray[i].GetChar(0) == ' ')
- res = FALSE;
+ res = sal_False;
}
if (!bStop) // kein '/'
- res = FALSE;
+ res = sal_False;
}
else
- res = FALSE; // kein '/' mehr
+ res = sal_False; // kein '/' mehr
return res;
}
@@ -1074,25 +1074,25 @@ void ImpSvNumberformatScan::Reset()
#endif
eScannedType = NUMBERFORMAT_UNDEFINED;
nRepPos = 0;
- bExp = FALSE;
- bThousand = FALSE;
+ bExp = sal_False;
+ bThousand = sal_False;
nThousand = 0;
- bDecSep = FALSE;
+ bDecSep = sal_False;
nDecPos = -1;
- nExpPos = (USHORT) -1;
- nBlankPos = (USHORT) -1;
+ nExpPos = (sal_uInt16) -1;
+ nBlankPos = (sal_uInt16) -1;
nCntPre = 0;
nCntPost = 0;
nCntExp = 0;
- bFrac = FALSE;
- bBlank = FALSE;
+ bFrac = sal_False;
+ bBlank = sal_False;
nNatNumModifier = 0;
}
-BOOL ImpSvNumberformatScan::Is100SecZero( USHORT i, BOOL bHadDecSep )
+sal_Bool ImpSvNumberformatScan::Is100SecZero( sal_uInt16 i, sal_Bool bHadDecSep )
{
- USHORT nIndexPre = PreviousKeyword( i );
+ sal_uInt16 nIndexPre = PreviousKeyword( i );
return (nIndexPre == NF_KEY_S || nIndexPre == NF_KEY_SS)
&& (bHadDecSep // S, SS ','
|| (i>0 && nTypeArray[i-1] == NF_SYMBOLTYPE_STRING));
@@ -1105,9 +1105,9 @@ xub_StrLen ImpSvNumberformatScan::ScanType(const String&)
const LocaleDataWrapper* pLoc = pFormatter->GetLocaleData();
xub_StrLen nPos = 0;
- USHORT i = 0;
+ sal_uInt16 i = 0;
short eNewType;
- BOOL bMatchBracket = FALSE;
+ sal_Bool bMatchBracket = sal_False;
bool bHaveGeneral = false; // if General/Standard encountered
SkipStrings(i, nPos);
@@ -1131,8 +1131,8 @@ xub_StrLen ImpSvNumberformatScan::ScanType(const String&)
case NF_KEY_M: // M
case NF_KEY_MM: // MM
{ // minute or month
- USHORT nIndexPre = PreviousKeyword(i);
- USHORT nIndexNex = NextKeyword(i);
+ sal_uInt16 nIndexPre = PreviousKeyword(i);
+ sal_uInt16 nIndexNex = NextKeyword(i);
sal_Unicode cChar = PreviousChar(i);
if (nIndexPre == NF_KEY_H || // H
nIndexPre == NF_KEY_HH || // HH
@@ -1199,7 +1199,7 @@ xub_StrLen ImpSvNumberformatScan::ScanType(const String&)
{
if ( Is100SecZero( i, bDecSep ) )
{
- bDecSep = TRUE; // subsequent 0's
+ bDecSep = sal_True; // subsequent 0's
eNewType = NUMBERFORMAT_TIME;
}
else
@@ -1222,18 +1222,18 @@ xub_StrLen ImpSvNumberformatScan::ScanType(const String&)
sStrArray[i+1].GetChar(0) == '$' )
{ // as of SV_NUMBERFORMATTER_VERSION_NEW_CURR
eNewType = NUMBERFORMAT_CURRENCY;
- bMatchBracket = TRUE;
+ bMatchBracket = sal_True;
}
else if ( i < nAnzStrings-1 &&
nTypeArray[i+1] == NF_SYMBOLTYPE_STRING &&
sStrArray[i+1].GetChar(0) == '~' )
{ // as of SV_NUMBERFORMATTER_VERSION_CALENDAR
eNewType = NUMBERFORMAT_DATE;
- bMatchBracket = TRUE;
+ bMatchBracket = sal_True;
}
else
{
- USHORT nIndexNex = NextKeyword(i);
+ sal_uInt16 nIndexNex = NextKeyword(i);
if (nIndexNex == NF_KEY_H || // H
nIndexNex == NF_KEY_HH || // HH
nIndexNex == NF_KEY_M || // M
@@ -1251,7 +1251,7 @@ xub_StrLen ImpSvNumberformatScan::ScanType(const String&)
break;
default:
if ( sStrArray[i] == pLoc->getTime100SecSep() )
- bDecSep = TRUE; // for SS,0
+ bDecSep = sal_True; // for SS,0
eNewType = NUMBERFORMAT_UNDEFINED;
break;
}
@@ -1388,7 +1388,7 @@ xub_StrLen ImpSvNumberformatScan::ScanType(const String&)
{
if ( nTypeArray[i] == NF_SYMBOLTYPE_DEL
&& sStrArray[i].GetChar(0) == ']' )
- bMatchBracket = FALSE;
+ bMatchBracket = sal_False;
else
nTypeArray[i] = NF_SYMBOLTYPE_STRING;
nPos = nPos + sStrArray[i].Len();
@@ -1409,7 +1409,7 @@ xub_StrLen ImpSvNumberformatScan::ScanType(const String&)
}
-bool ImpSvNumberformatScan::InsertSymbol( USHORT & nPos, svt::NfSymbolType eType, const String& rStr )
+bool ImpSvNumberformatScan::InsertSymbol( sal_uInt16 & nPos, svt::NfSymbolType eType, const String& rStr )
{
if (nAnzStrings >= NF_MAX_FORMAT_SYMBOLS || nPos > nAnzStrings)
return false;
@@ -1431,8 +1431,8 @@ bool ImpSvNumberformatScan::InsertSymbol( USHORT & nPos, svt::NfSymbolType eType
}
-int ImpSvNumberformatScan::FinalScanGetCalendar( xub_StrLen& nPos, USHORT& i,
- USHORT& rAnzResStrings )
+int ImpSvNumberformatScan::FinalScanGetCalendar( xub_StrLen& nPos, sal_uInt16& i,
+ sal_uInt16& rAnzResStrings )
{
if ( sStrArray[i].GetChar(0) == '[' &&
i < nAnzStrings-1 &&
@@ -1510,10 +1510,10 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
const CharClass* pChrCls = pFormatter->GetCharClass();
xub_StrLen nPos = 0; // error correction position
- USHORT i = 0; // symbol loop counter
- USHORT nCounter = 0; // counts digits
+ sal_uInt16 i = 0; // symbol loop counter
+ sal_uInt16 nCounter = 0; // counts digits
nAnzResStrings = nAnzStrings; // counts remaining symbols
- bDecSep = FALSE; // reset in case already used in TypeCheck
+ bDecSep = sal_False; // reset in case already used in TypeCheck
bool bThaiT = false; // Thai T NatNum modifier present
switch (eScannedType)
@@ -1595,7 +1595,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
{
if (bExp) // doppelt
return nPos;
- bExp = TRUE;
+ bExp = sal_True;
nExpPos = i;
if (bDecSep)
nCntPost = nCounter;
@@ -1611,7 +1611,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
{
if (bDecSep && nCounter > 0) // Nachkommastellen
return nPos; // Fehler
- bBlank = TRUE;
+ bBlank = sal_True;
nBlankPos = i;
nCntPre = nCounter;
nCounter = 0;
@@ -1736,7 +1736,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
nPos = nPos + sStrArray[i].Len();
if (!bThousand) // only once
{
- bThousand = TRUE;
+ bThousand = sal_True;
cThousandFill = sStrArray[i+1].GetChar(0);
}
// Eat it, will be reinserted at proper
@@ -1751,7 +1751,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
{ // #,,,,
if ( StringEqualsChar( sOldThousandSep, ' ' ) )
{ // strange, those French..
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
String& rStr = sStrArray[i];
// set a hard Non-Breaking Space or ConvertMode
const String& rSepF = pFormatter->GetNumThousandSep();
@@ -1763,7 +1763,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
nPos = nPos + sStrArray[i].Len();
if ( bFirst )
{
- bFirst = FALSE;
+ bFirst = sal_False;
rStr = rSepF;
nTypeArray[i] = NF_SYMBOLTYPE_THSEP;
}
@@ -1795,7 +1795,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
{
if ( bFirst )
{
- bFirst = FALSE;
+ bFirst = sal_False;
rStr = rSepF;
nTypeArray[i] = NF_SYMBOLTYPE_THSEP;
}
@@ -1872,7 +1872,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
nPos = nPos + sStrArray[i].Len();
nTypeArray[i] = NF_SYMBOLTYPE_DECSEP;
sStrArray[i] = pFormatter->GetNumDecimalSep();
- bDecSep = TRUE;
+ bDecSep = sal_True;
nDecPos = i;
nCntPre = nCounter;
nCounter = 0;
@@ -1890,7 +1890,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
{ // or behind /
if (bDecSep && nCounter > 0)// dec.
return nPos; // error
- bBlank = TRUE;
+ bBlank = sal_True;
nBlankPos = i;
nCntPre = nCounter;
nCounter = 0;
@@ -1927,7 +1927,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
return nPos ? nPos : 1; // /? not allowed
else if (!bFrac || (bDecSep && nCounter > 0))
{
- bFrac = TRUE;
+ bFrac = sal_True;
nCntPost = nCounter;
nCounter = 0;
nTypeArray[i] = NF_SYMBOLTYPE_FRAC;
@@ -1965,7 +1965,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
String& rStr = sStrArray[i];
String* pStr = &sStrArray[i];
nTypeArray[i] = NF_SYMBOLTYPE_CURRENCY; // wandeln
- BOOL bHadDash = FALSE;
+ sal_Bool bHadDash = sal_False;
i++;
while ( i < nAnzStrings &&
sStrArray[i].GetChar(0) != ']' )
@@ -1981,7 +1981,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
{
if ( sStrArray[i].GetChar(0) == '-' )
{
- bHadDash = TRUE;
+ bHadDash = sal_True;
pStr = &sStrArray[i];
nTypeArray[i] = NF_SYMBOLTYPE_CURREXT;
}
@@ -2062,7 +2062,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
}
if (bThousand) // Expansion of grouping separators
{
- USHORT nMaxPos;
+ sal_uInt16 nMaxPos;
if (bFrac)
{
if (bBlank)
@@ -2239,7 +2239,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
{
if ( Is100SecZero( i, bDecSep ) )
{
- bDecSep = TRUE;
+ bDecSep = sal_True;
nTypeArray[i] = NF_SYMBOLTYPE_DIGIT;
String& rStr = sStrArray[i];
i++;
@@ -2267,7 +2267,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
{
if (bThousand) // doppelt
return nPos;
- bThousand = TRUE; // bei Time frei
+ bThousand = sal_True; // bei Time frei
sal_Unicode cChar = pChrCls->upper( NextChar(i) ).GetChar(0);
if ( cChar == cOldKeyH )
nThousand = 1; // H
@@ -2300,7 +2300,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
}
else if ( sStrArray[i] == sOldTime100SecSep )
{
- bDecSep = TRUE;
+ bDecSep = sal_True;
nTypeArray[i] = NF_SYMBOLTYPE_TIME100SECSEP;
if ( bConvertMode )
sStrArray[i] = pLoc->getTime100SecSep();
@@ -2333,7 +2333,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
case NF_KEY_AMPM: // AM/PM
case NF_KEY_AP: // A/P
{
- bExp = TRUE; // missbraucht fuer A/P
+ bExp = sal_True; // missbraucht fuer A/P
sStrArray[i] = sKeyword[nTypeArray[i]]; // tTtT -> TTTT
nPos = nPos + sStrArray[i].Len();
i++;
@@ -2370,7 +2370,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
break; // of NUMBERFORMAT_TIME
case NUMBERFORMAT_DATETIME:
{
- BOOL bTimePart = FALSE;
+ sal_Bool bTimePart = sal_False;
while (i < nAnzStrings)
{
switch (nTypeArray[i])
@@ -2408,7 +2408,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
{
if ( bTimePart && Is100SecZero( i, bDecSep ) )
{
- bDecSep = TRUE;
+ bDecSep = sal_True;
nTypeArray[i] = NF_SYMBOLTYPE_DIGIT;
String& rStr = sStrArray[i];
i++;
@@ -2445,7 +2445,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
}
else if ( sStrArray[i] == sOldTime100SecSep )
{
- bDecSep = TRUE;
+ bDecSep = sal_True;
nTypeArray[i] = NF_SYMBOLTYPE_TIME100SECSEP;
if ( bConvertMode )
sStrArray[i] = pLoc->getTime100SecSep();
@@ -2473,8 +2473,8 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
case NF_KEY_AMPM: // AM/PM
case NF_KEY_AP: // A/P
{
- bTimePart = TRUE;
- bExp = TRUE; // missbraucht fuer A/P
+ bTimePart = sal_True;
+ bExp = sal_True; // missbraucht fuer A/P
sStrArray[i] = sKeyword[nTypeArray[i]]; // tTtT -> TTTT
nPos = nPos + sStrArray[i].Len();
i++;
@@ -2486,7 +2486,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
case NF_KEY_HH: // HH
case NF_KEY_S: // S
case NF_KEY_SS: // SS
- bTimePart = TRUE;
+ bTimePart = sal_True;
sStrArray[i] = sKeyword[nTypeArray[i]]; // tTtT -> TTTT
nPos = nPos + sStrArray[i].Len();
i++;
@@ -2517,7 +2517,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
case NF_KEY_GGG : // GGG
case NF_KEY_R : // R
case NF_KEY_RR : // RR
- bTimePart = FALSE;
+ bTimePart = sal_False;
sStrArray[i] = sKeyword[nTypeArray[i]]; // tTtT -> TTTT
nPos = nPos + sStrArray[i].Len();
i++;
@@ -2570,7 +2570,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
sOldCurString.GetChar(0) )
{
String aTmp( sStrArray[i] );
- USHORT j = i + 1;
+ sal_uInt16 j = i + 1;
while ( aTmp.Len() < sOldCurSymbol.Len() &&
j < nAnzStrings &&
nTypeArray[j] == NF_SYMBOLTYPE_STRING )
@@ -2615,7 +2615,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
{
xub_StrLen nStringPos = rString.Len();
xub_StrLen nArrPos = 0;
- USHORT iPos = i;
+ sal_uInt16 iPos = i;
do
{
if (sStrArray[i].Len() == 2 &&
@@ -2783,7 +2783,7 @@ xub_StrLen ImpSvNumberformatScan::ScanFormat( String& rString, String& rComment
// res = 0 => Format ok
}
-void ImpSvNumberformatScan::CopyInfo(ImpSvNumberformatInfo* pInfo, USHORT nAnz)
+void ImpSvNumberformatScan::CopyInfo(ImpSvNumberformatInfo* pInfo, sal_uInt16 nAnz)
{
size_t i,j;
j = 0;
diff --git a/svl/source/numbers/zforscan.hxx b/svl/source/numbers/zforscan.hxx
index 176da84b652e..9b04921cb7f4 100644
--- a/svl/source/numbers/zforscan.hxx
+++ b/svl/source/numbers/zforscan.hxx
@@ -42,7 +42,7 @@ const size_t NF_MAX_FORMAT_SYMBOLS = 100;
const size_t NF_MAX_DEFAULT_COLORS = 10;
// Hack: nThousand==1000 => "Default" occurs in format string
-const USHORT FLAG_STANDARD_IN_FORMAT = 1000;
+const sal_uInt16 FLAG_STANDARD_IN_FORMAT = 1000;
class ImpSvNumberformatScan
{
@@ -52,15 +52,15 @@ public:
~ImpSvNumberformatScan();
void ChangeIntl(); // tauscht Keywords aus
- void ChangeNullDate(USHORT nDay, USHORT nMonth, USHORT nYear);
+ void ChangeNullDate(sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear);
// tauscht Referenzdatum aus
void ChangeStandardPrec(sal_uInt16 nPrec); // tauscht Standardprecision aus
xub_StrLen ScanFormat( String& rString, String& rComment ); // Aufruf der Scan-Analyse
void CopyInfo(ImpSvNumberformatInfo* pInfo,
- USHORT nAnz); // Kopiert die FormatInfo
- USHORT GetAnzResStrings() const { return nAnzResStrings; }
+ sal_uInt16 nAnz); // Kopiert die FormatInfo
+ sal_uInt16 GetAnzResStrings() const { return nAnzResStrings; }
const CharClass& GetChrCls() const { return *pFormatter->GetCharClass(); }
const LocaleDataWrapper& GetLoc() const { return *pFormatter->GetLocaleData(); }
@@ -72,7 +72,7 @@ public:
InitKeywords();
return sKeyword;
}
- // Keywords used in output like TRUE and FALSE
+ // Keywords used in output like sal_True and sal_False
const String& GetSpecialKeyword( NfKeywordIndex eIdx ) const
{
if ( !sKeyword[eIdx].Len() )
@@ -123,18 +123,18 @@ public:
}
void SetConvertMode(LanguageType eTmpLge, LanguageType eNewLge,
- BOOL bSystemToSystem = FALSE )
+ sal_Bool bSystemToSystem = sal_False )
{
- bConvertMode = TRUE;
+ bConvertMode = sal_True;
eNewLnge = eNewLge;
eTmpLnge = eTmpLge;
bConvertSystemToSystem = bSystemToSystem;
}
- void SetConvertMode(BOOL bMode) { bConvertMode = bMode; }
+ void SetConvertMode(sal_Bool bMode) { bConvertMode = bMode; }
// Veraendert nur die Bool-Variable
// (zum temporaeren Unterbrechen des
// Convert-Modus)
- BOOL GetConvertMode() const { return bConvertMode; }
+ sal_Bool GetConvertMode() const { return bConvertMode; }
LanguageType GetNewLnge() const { return eNewLnge; }
// Lesezugriff auf ConvertMode
// und Konvertierungsland/Spr.
@@ -143,9 +143,9 @@ public:
// und Ausgangsland/Spr.
/// get Thai T speciality
- BYTE GetNatNumModifier() const { return nNatNumModifier; }
+ sal_uInt8 GetNatNumModifier() const { return nNatNumModifier; }
/// set Thai T speciality
- void SetNatNumModifier( BYTE n ) { nNatNumModifier = n; }
+ void SetNatNumModifier( sal_uInt8 n ) { nNatNumModifier = n; }
SvNumberFormatter* GetNumberformatter() { return pFormatter; }
// Zugriff auf Formatierer
@@ -164,42 +164,42 @@ private: // ---- privater Teil
String sStrArray[NF_MAX_FORMAT_SYMBOLS]; // Array der Symbole
short nTypeArray[NF_MAX_FORMAT_SYMBOLS]; // Array der Infos
// externe Infos:
- USHORT nAnzResStrings; // Anzahl der Ergebnissymbole
+ sal_uInt16 nAnzResStrings; // Anzahl der Ergebnissymbole
#if !(defined SOLARIS && defined X86)
short eScannedType; // Typ gemaess Scan
#else
int eScannedType; // wg. Optimierung
#endif
- BOOL bThousand; // Mit Tausenderpunkt
- USHORT nThousand; // Zaehlt ....-Folgen
- USHORT nCntPre; // Zaehlt Vorkommastellen
- USHORT nCntPost; // Zaehlt Nachkommastellen
- USHORT nCntExp; // Zaehlt Exp.Stellen, AM/PM
+ sal_Bool bThousand; // Mit Tausenderpunkt
+ sal_uInt16 nThousand; // Zaehlt ....-Folgen
+ sal_uInt16 nCntPre; // Zaehlt Vorkommastellen
+ sal_uInt16 nCntPost; // Zaehlt Nachkommastellen
+ sal_uInt16 nCntExp; // Zaehlt Exp.Stellen, AM/PM
// interne Infos:
- USHORT nAnzStrings; // Anzahl der Symbole
- USHORT nRepPos; // Position eines '*'
- USHORT nExpPos; // interne Position des E
- USHORT nBlankPos; // interne Position des Blank
+ sal_uInt16 nAnzStrings; // Anzahl der Symbole
+ sal_uInt16 nRepPos; // Position eines '*'
+ sal_uInt16 nExpPos; // interne Position des E
+ sal_uInt16 nBlankPos; // interne Position des Blank
short nDecPos; // interne Pos. des ,
- BOOL bExp; // wird bei Lesen des E gesetzt
- BOOL bFrac; // wird bei Lesen des / gesetzt
- BOOL bBlank; // wird bei ' '(Fraction) ges.
- BOOL bDecSep; // Wird beim ersten , gesetzt
- mutable BOOL bKeywordsNeedInit; // Locale dependent keywords need to be initialized
- mutable BOOL bCompatCurNeedInit; // Locale dependent compatibility currency need to be initialized
+ sal_Bool bExp; // wird bei Lesen des E gesetzt
+ sal_Bool bFrac; // wird bei Lesen des / gesetzt
+ sal_Bool bBlank; // wird bei ' '(Fraction) ges.
+ sal_Bool bDecSep; // Wird beim ersten , gesetzt
+ mutable sal_Bool bKeywordsNeedInit; // Locale dependent keywords need to be initialized
+ mutable sal_Bool bCompatCurNeedInit; // Locale dependent compatibility currency need to be initialized
String sCurSymbol; // Currency symbol for compatibility format codes
String sCurString; // Currency symbol in upper case
String sCurAbbrev; // Currency abbreviation
String sErrStr; // String fuer Fehlerausgaben
- BOOL bConvertMode; // Wird im Convert-Mode gesetzt
+ sal_Bool bConvertMode; // Wird im Convert-Mode gesetzt
// Land/Sprache, in die der
LanguageType eNewLnge; // gescannte String konvertiert
// wird (fuer Excel Filter)
// Land/Sprache, aus der der
LanguageType eTmpLnge; // gescannte String konvertiert
// wird (fuer Excel Filter)
- BOOL bConvertSystemToSystem; // Whether the conversion is
+ sal_Bool bConvertSystemToSystem; // Whether the conversion is
// from one system locale to
// another system locale (in
// this case the automatic
@@ -208,7 +208,7 @@ private: // ---- privater Teil
xub_StrLen nCurrPos; // Position des Waehrungssymbols
- BYTE nNatNumModifier; // Thai T speciality
+ sal_uInt8 nNatNumModifier; // Thai T speciality
void InitKeywords() const;
void InitSpecialKeyword( NfKeywordIndex eIdx ) const;
@@ -217,32 +217,32 @@ private: // ---- privater Teil
#ifdef _ZFORSCAN_CXX // ----- private Methoden -----
void SetDependentKeywords();
// Setzt die Sprachabh. Keyw.
- void SkipStrings(USHORT& i,xub_StrLen& nPos);// Ueberspringt StringSymbole
- USHORT PreviousKeyword(USHORT i); // Gibt Index des vorangeh.
+ void SkipStrings(sal_uInt16& i,xub_StrLen& nPos);// Ueberspringt StringSymbole
+ sal_uInt16 PreviousKeyword(sal_uInt16 i); // Gibt Index des vorangeh.
// Schluesselworts oder 0
- USHORT NextKeyword(USHORT i); // Gibt Index des naechsten
+ sal_uInt16 NextKeyword(sal_uInt16 i); // Gibt Index des naechsten
// Schluesselworts oder 0
- sal_Unicode PreviousChar(USHORT i); // Gibt letzten Buchstaben
+ sal_Unicode PreviousChar(sal_uInt16 i); // Gibt letzten Buchstaben
// vor der Position,
// skipt EMPTY, STRING, STAR, BLANK
- sal_Unicode NextChar(USHORT i); // Gibt ersten Buchst. danach
- short PreviousType( USHORT i ); // Gibt Typ vor Position,
+ sal_Unicode NextChar(sal_uInt16 i); // Gibt ersten Buchst. danach
+ short PreviousType( sal_uInt16 i ); // Gibt Typ vor Position,
// skipt EMPTY
- BOOL IsLastBlankBeforeFrac(USHORT i); // True <=> es kommt kein ' '
+ sal_Bool IsLastBlankBeforeFrac(sal_uInt16 i); // True <=> es kommt kein ' '
// mehr bis zum '/'
void Reset(); // Reset aller Variablen
// vor Analysestart
short GetKeyWord( const String& sSymbol, // determine keyword at nPos
xub_StrLen nPos ); // return 0 <=> not found
- inline BOOL IsAmbiguousE( short nKey ) // whether nKey is ambiguous E of NF_KEY_E/NF_KEY_EC
+ inline sal_Bool IsAmbiguousE( short nKey ) // whether nKey is ambiguous E of NF_KEY_E/NF_KEY_EC
{
return (nKey == NF_KEY_EC || nKey == NF_KEY_E) &&
(GetKeywords()[NF_KEY_EC] == GetKeywords()[NF_KEY_E]);
}
// if 0 at strArray[i] is of S,00 or SS,00 or SS"any"00 in ScanType() or FinalScan()
- BOOL Is100SecZero( USHORT i, BOOL bHadDecSep );
+ sal_Bool Is100SecZero( sal_uInt16 i, sal_Bool bHadDecSep );
short Next_Symbol(const String& rStr,
xub_StrLen& nPos,
@@ -252,14 +252,14 @@ private: // ---- privater Teil
xub_StrLen FinalScan( String& rString, String& rComment ); // Endanalyse mit Vorgabe
// des Typs
// -1:= error, return nPos in FinalScan; 0:= no calendar, 1:= calendar found
- int FinalScanGetCalendar( xub_StrLen& nPos, USHORT& i, USHORT& nAnzResStrings );
+ int FinalScanGetCalendar( xub_StrLen& nPos, sal_uInt16& i, sal_uInt16& nAnzResStrings );
/** Insert symbol into nTypeArray and sStrArray, e.g. grouping separator.
If at nPos-1 a symbol type NF_SYMBOLTYPE_EMPTY is present, that is
reused instead of shifting all one up and nPos is decremented! */
- bool InsertSymbol( USHORT & nPos, svt::NfSymbolType eType, const String& rStr );
+ bool InsertSymbol( sal_uInt16 & nPos, svt::NfSymbolType eType, const String& rStr );
- static inline BOOL StringEqualsChar( const String& rStr, sal_Unicode ch )
+ static inline sal_Bool StringEqualsChar( const String& rStr, sal_Unicode ch )
{ return rStr.GetChar(0) == ch && rStr.Len() == 1; }
// Yes, for efficiency get the character first and then compare length
// because in most places where this is used the string is one char.
diff --git a/svl/source/svdde/ddecli.cxx b/svl/source/svdde/ddecli.cxx
index 236f57824da2..ec1adf1fd300 100644
--- a/svl/source/svdde/ddecli.cxx
+++ b/svl/source/svdde/ddecli.cxx
@@ -86,7 +86,7 @@ HDDEDATA CALLBACK DdeInternal::CliCallback(
if( self )
{
DdeTransaction* t;
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
for( t = self->aTransactions.First(); t; t = self->aTransactions.Next() )
{
switch( nCode )
@@ -95,9 +95,9 @@ HDDEDATA CALLBACK DdeInternal::CliCallback(
if( (DWORD)t->nId == nInfo1 )
{
nCode = t->nType & (XCLASS_MASK | XTYP_MASK);
- t->bBusy = FALSE;
+ t->bBusy = sal_False;
t->Done( 0 != hData );
- bFound = TRUE;
+ bFound = sal_True;
}
break;
@@ -108,11 +108,11 @@ HDDEDATA CALLBACK DdeInternal::CliCallback(
: DdeGetLastError( pInst->hDdeInstCli );
t = 0;
nRet = 0;
- bFound = TRUE;
+ bFound = sal_True;
break;
case XTYP_ADVDATA:
- bFound = BOOL( *t->pName == hText2 );
+ bFound = sal_Bool( *t->pName == hText2 );
break;
}
if( bFound )
@@ -222,7 +222,7 @@ DdeConnection::~DdeConnection()
// --- DdeConnection::IsConnected() --------------------------------
-BOOL DdeConnection::IsConnected()
+sal_Bool DdeConnection::IsConnected()
{
CONVINFO c;
#ifdef OS2
@@ -231,13 +231,13 @@ BOOL DdeConnection::IsConnected()
c.cb = sizeof( c );
#endif
if ( DdeQueryConvInfo( pImp->hConv, QID_SYNC, &c ) )
- return TRUE;
+ return sal_True;
else
{
DdeInstData* pInst = ImpGetInstData();
pImp->hConv = DdeReconnect( pImp->hConv );
pImp->nStatus = pImp->hConv ? DMLERR_NO_ERROR : DdeGetLastError( pInst->hDdeInstCli );
- return BOOL( pImp->nStatus == DMLERR_NO_ERROR );
+ return sal_Bool( pImp->nStatus == DMLERR_NO_ERROR );
}
}
@@ -280,7 +280,7 @@ DdeTransaction::DdeTransaction( DdeConnection& d, const String& rItemName,
nTime = n;
nId = 0;
nType = 0;
- bBusy = FALSE;
+ bBusy = sal_False;
rDde.aTransactions.Insert( this );
}
@@ -306,7 +306,7 @@ void DdeTransaction::Execute()
HSZ hItem = *pName;
void* pData = (void*)(const void *)aDdeData;
DWORD nData = (DWORD)(long)aDdeData;
- ULONG nIntFmt = aDdeData.pImp->nFmt;
+ sal_uLong nIntFmt = aDdeData.pImp->nFmt;
UINT nExtFmt = DdeData::GetExternalFormat( nIntFmt );
DdeInstData* pInst = ImpGetInstData();
@@ -342,7 +342,7 @@ void DdeTransaction::Execute()
if ( nId && rDde.pImp->hConv )
DdeAbandonTransaction( pInst->hDdeInstCli, rDde.pImp->hConv, nId);
nId = 0;
- bBusy = TRUE;
+ bBusy = sal_True;
HDDEDATA hRet = DdeClientTransaction( (unsigned char*)pData, nData,
rDde.pImp->hConv, hItem, nExtFmt,
(UINT)nType, TIMEOUT_ASYNC,
@@ -373,7 +373,7 @@ void __EXPORT DdeTransaction::Data( const DdeData* p )
// --- DdeTransaction::Done() --------------------------------------
-void __EXPORT DdeTransaction::Done( BOOL bDataValid )
+void __EXPORT DdeTransaction::Done( sal_Bool bDataValid )
{
aDone.Call( (void*)bDataValid );
}
@@ -389,7 +389,7 @@ DdeLink::DdeLink( DdeConnection& d, const String& aItemName, long n ) :
DdeLink::~DdeLink()
{
- nType = (USHORT)XTYP_ADVSTOP;
+ nType = (sal_uInt16)XTYP_ADVSTOP;
nTime = 0;
}
@@ -427,7 +427,7 @@ DdeHotLink::DdeHotLink( DdeConnection& d, const String& i, long n ) :
// --- DdePoke::DdePoke() ------------------------------------------
DdePoke::DdePoke( DdeConnection& d, const String& i, const char* p,
- long l, ULONG f, long n ) :
+ long l, sal_uLong f, long n ) :
DdeTransaction( d, i, n )
{
aDdeData = DdeData( p, l, f );
diff --git a/svl/source/svdde/ddedata.cxx b/svl/source/svdde/ddedata.cxx
index 369306c22874..7f78f4d4398a 100644
--- a/svl/source/svdde/ddedata.cxx
+++ b/svl/source/svdde/ddedata.cxx
@@ -54,7 +54,7 @@ DdeData::DdeData()
// --- DdeData::DdeData() ------------------------------------------
-DdeData::DdeData( const void* p, long n, ULONG f )
+DdeData::DdeData( const void* p, long n, sal_uLong f )
{
pImp = new DdeDataImp;
pImp->hData = NULL;
@@ -105,12 +105,12 @@ void DdeData::Lock()
// --- DdeData::GetFormat() ----------------------------------------
-ULONG DdeData::GetFormat() const
+sal_uLong DdeData::GetFormat() const
{
return pImp->nFmt;
}
-void DdeData::SetFormat( ULONG nFmt )
+void DdeData::SetFormat( sal_uLong nFmt )
{
pImp->nFmt = nFmt;
}
@@ -144,7 +144,7 @@ DdeData& DdeData::operator = ( const DdeData& rData )
return *this;
}
-ULONG DdeData::GetExternalFormat( ULONG nFmt )
+sal_uLong DdeData::GetExternalFormat( sal_uLong nFmt )
{
switch( nFmt )
{
@@ -173,7 +173,7 @@ ULONG DdeData::GetExternalFormat( ULONG nFmt )
if( aName.Len() )
{
HATOMTBL hSysTable = WinQuerySystemAtomTable();
- nFmt = (ULONG)WinAddAtom( hSysTable, (PSZ)aName.GetBuffer() );
+ nFmt = (sal_uLong)WinAddAtom( hSysTable, (PSZ)aName.GetBuffer() );
}
#endif
#endif
@@ -182,7 +182,7 @@ ULONG DdeData::GetExternalFormat( ULONG nFmt )
return nFmt;
}
-ULONG DdeData::GetInternalFormat( ULONG nFmt )
+sal_uLong DdeData::GetInternalFormat( sal_uLong nFmt )
{
switch( nFmt )
{
diff --git a/svl/source/svdde/ddeimp.hxx b/svl/source/svdde/ddeimp.hxx
index 708b2736f9cf..cef0bb386201 100644
--- a/svl/source/svdde/ddeimp.hxx
+++ b/svl/source/svdde/ddeimp.hxx
@@ -32,11 +32,11 @@
#include "ddemlos2.h"
-#define WORD USHORT
-#define DWORD ULONG
-#define LPBYTE BYTE*
-#define LPWORD USHORT*
-#define LPDWORD ULONG*
+#define WORD sal_uInt16
+#define DWORD sal_uLong
+#define LPBYTE sal_uInt8*
+#define LPWORD sal_uInt16*
+#define LPDWORD sal_uLong*
#define LPCTSTR PCSZ
#else
@@ -49,10 +49,10 @@
/*
extern "C"
{
-#define BOOL WIN_BOOL
-#define BYTE WIN_BYTE
-#undef BOOL
-#undef BYTE
+#define sal_Bool WIN_BOOL
+#define sal_uInt8 WIN_BYTE
+#undef sal_Bool
+#undef sal_uInt8
};
*/
@@ -143,7 +143,7 @@ struct DdeDataImp
HDDEDATA hData;
LPBYTE pData;
long nData;
- ULONG nFmt;
+ sal_uLong nFmt;
};
class DdeConnections;
@@ -151,15 +151,15 @@ class DdeServices;
struct DdeInstData
{
- USHORT nRefCount;
+ sal_uInt16 nRefCount;
DdeConnections* pConnections;
// Server
long hCurConvSvr;
- ULONG hDdeInstSvr;
+ sal_uLong hDdeInstSvr;
short nInstanceSvr;
DdeServices* pServicesSvr;
// Client
- ULONG hDdeInstCli;
+ sal_uLong hDdeInstCli;
short nInstanceCli;
};
diff --git a/svl/source/svdde/ddesvr.cxx b/svl/source/svdde/ddesvr.cxx
index c361f259d610..3d3c5029c6a7 100644
--- a/svl/source/svdde/ddesvr.cxx
+++ b/svl/source/svdde/ddesvr.cxx
@@ -48,10 +48,10 @@ enum DdeItemType
struct DdeItemImpData
{
- ULONG nHCnv;
- USHORT nCnt;
+ sal_uLong nHCnv;
+ sal_uInt16 nCnt;
- DdeItemImpData( ULONG nH ) : nHCnv( nH ), nCnt( 1 ) {}
+ DdeItemImpData( sal_uLong nH ) : nHCnv( nH ), nCnt( 1 ) {}
};
SV_DECL_VARARR( DdeItemImp, DdeItemImpData, 1, 1 )
@@ -106,7 +106,7 @@ HDDEDATA CALLBACK _export DdeInternal::SvrCallback(
{
if( hText1 )
{
- USHORT n = 0;
+ sal_uInt16 n = 0;
while( STRING_NOTFOUND != n )
{
String s( sTopics.GetToken( 0, '\t', n ));
@@ -159,7 +159,7 @@ HDDEDATA CALLBACK _export DdeInternal::SvrCallback(
}
#else
String sTopics( pService->Topics() );
- USHORT n = 0;
+ sal_uInt16 n = 0;
while( STRING_NOTFOUND != n )
{
String s( sTopics.GetToken( 0, '\t', n ));
@@ -240,7 +240,7 @@ found:
return (HDDEDATA)NULL;
}
- BOOL bExec = BOOL(nCode == XTYP_EXECUTE);
+ sal_Bool bExec = sal_Bool(nCode == XTYP_EXECUTE);
pTopic = pC->pTopic;
if ( pTopic && !bExec )
pItem = FindItem( *pTopic, hText2 );
@@ -256,7 +256,7 @@ found:
else
pTopic->aItem.Erase();
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
pInst->hCurConvSvr = (long)hConv;
switch( nCode )
{
@@ -345,14 +345,14 @@ found:
pItem->IncMonitor( (long)hConv );
pInst->hCurConvSvr = NULL;
}
- return (HDDEDATA)TRUE;
+ return (HDDEDATA)sal_True;
case XTYP_ADVSTOP:
pItem->DecMonitor( (long)hConv );
if( !pItem->pImpData )
pTopic->StopAdviseLoop();
pInst->hCurConvSvr = NULL;
- return (HDDEDATA)TRUE;
+ return (HDDEDATA)sal_True;
case XTYP_EXECUTE:
{
@@ -400,7 +400,7 @@ DdeTopic* DdeInternal::FindTopic( DdeService& rService, HSZ hTopic )
{
DdeTopic* s;
DdeTopics& rTopics = rService.aTopics;
- int bWeiter = FALSE;
+ int bWeiter = sal_False;
DdeInstData* pInst = ImpGetInstData();
DBG_ASSERT(pInst,"SVDDE:No instance data");
@@ -433,7 +433,7 @@ DdeItem* DdeInternal::FindItem( DdeTopic& rTopic, HSZ hItem )
DdeItems& rItems = rTopic.aItems;
DdeInstData* pInst = ImpGetInstData();
DBG_ASSERT(pInst,"SVDDE:No instance data");
- int bWeiter = FALSE;
+ int bWeiter = sal_False;
do { // middle check loop
@@ -569,7 +569,7 @@ void DdeService::RemoveTopic( const DdeTopic& rTopic )
aTopics.Remove( t );
// JP 27.07.95: und alle Conversions loeschen !!!
// (sonst wird auf geloeschten Topics gearbeitet!!)
- for( ULONG n = pConv->Count(); n; )
+ for( sal_uLong n = pConv->Count(); n; )
{
Conversation* pC = pConv->GetObject( --n );
if( pC->pTopic == &rTopic )
@@ -585,21 +585,21 @@ void DdeService::RemoveTopic( const DdeTopic& rTopic )
// --- DdeService::HasCbFormat() -----------------------------------
-BOOL DdeService::HasCbFormat( USHORT nFmt )
+sal_Bool DdeService::HasCbFormat( sal_uInt16 nFmt )
{
- return BOOL( aFormats.GetPos( nFmt ) != LIST_ENTRY_NOTFOUND );
+ return sal_Bool( aFormats.GetPos( nFmt ) != LIST_ENTRY_NOTFOUND );
}
// --- DdeService::HasFormat() -------------------------------------
-BOOL DdeService::HasFormat( ULONG nFmt )
+sal_Bool DdeService::HasFormat( sal_uLong nFmt )
{
- return HasCbFormat( (USHORT)DdeData::GetExternalFormat( nFmt ));
+ return HasCbFormat( (sal_uInt16)DdeData::GetExternalFormat( nFmt ));
}
// --- DdeService::AddFormat() -------------------------------------
-void DdeService::AddFormat( ULONG nFmt )
+void DdeService::AddFormat( sal_uLong nFmt )
{
nFmt = DdeData::GetExternalFormat( nFmt );
aFormats.Remove( nFmt );
@@ -608,7 +608,7 @@ void DdeService::AddFormat( ULONG nFmt )
// --- DdeService::RemoveFormat() ----------------------------------
-void DdeService::RemoveFormat( ULONG nFmt )
+void DdeService::RemoveFormat( sal_uLong nFmt )
{
aFormats.Remove( DdeData::GetExternalFormat( nFmt ) );
}
@@ -645,9 +645,9 @@ const String& DdeTopic::GetName() const
// --- DdeTopic::IsSystemTopic() -----------------------------------
-BOOL DdeTopic::IsSystemTopic()
+sal_Bool DdeTopic::IsSystemTopic()
{
- return BOOL (GetName() == reinterpret_cast<const sal_Unicode*>(SZDDESYS_TOPIC));
+ return sal_Bool (GetName() == reinterpret_cast<const sal_Unicode*>(SZDDESYS_TOPIC));
}
// --- DdeTopic::AddItem() -----------------------------------------
@@ -741,7 +741,7 @@ void __EXPORT DdeTopic::_Disconnect( long nId )
// --- DdeTopic::Get() ---------------------------------------------
-DdeData* __EXPORT DdeTopic::Get( ULONG nFmt )
+DdeData* __EXPORT DdeTopic::Get( sal_uLong nFmt )
{
if ( aGetLink.IsSet() )
return (DdeData*)aGetLink.Call( (void*)nFmt );
@@ -751,22 +751,22 @@ DdeData* __EXPORT DdeTopic::Get( ULONG nFmt )
// --- DdeTopic::Put() ---------------------------------------------
-BOOL __EXPORT DdeTopic::Put( const DdeData* r )
+sal_Bool __EXPORT DdeTopic::Put( const DdeData* r )
{
if ( aPutLink.IsSet() )
- return (BOOL)aPutLink.Call( (void*) r );
+ return (sal_Bool)aPutLink.Call( (void*) r );
else
- return FALSE;
+ return sal_False;
}
// --- DdeTopic::Execute() -----------------------------------------
-BOOL __EXPORT DdeTopic::Execute( const String* r )
+sal_Bool __EXPORT DdeTopic::Execute( const String* r )
{
if ( aExecLink.IsSet() )
- return (BOOL)aExecLink.Call( (void*)r );
+ return (sal_Bool)aExecLink.Call( (void*)r );
else
- return FALSE;
+ return sal_False;
}
// --- DdeTopic::GetConvId() ---------------------------------------
@@ -780,16 +780,16 @@ long DdeTopic::GetConvId()
// --- DdeTopic::StartAdviseLoop() ---------------------------------
-BOOL DdeTopic::StartAdviseLoop()
+sal_Bool DdeTopic::StartAdviseLoop()
{
- return FALSE;
+ return sal_False;
}
// --- DdeTopic::StopAdviseLoop() ----------------------------------
-BOOL DdeTopic::StopAdviseLoop()
+sal_Bool DdeTopic::StopAdviseLoop()
{
- return FALSE;
+ return sal_False;
}
// --- DdeItem::DdeItem() ------------------------------------------
@@ -859,17 +859,17 @@ void DdeItem::NotifyClient()
// --- DdeItem::IncMonitor() ------------------------------------------
-void DdeItem::IncMonitor( ULONG nHCnv )
+void DdeItem::IncMonitor( sal_uLong nHCnv )
{
if( !pImpData )
{
pImpData = new DdeItemImp;
if( DDEGETPUTITEM == nType )
- ((DdeGetPutItem*)this)->AdviseLoop( TRUE );
+ ((DdeGetPutItem*)this)->AdviseLoop( sal_True );
}
else
{
- for( USHORT n = pImpData->Count(); n; )
+ for( sal_uInt16 n = pImpData->Count(); n; )
if( (*pImpData)[ --n ].nHCnv == nHCnv )
{
++(*pImpData)[ n ].nHCnv;
@@ -882,12 +882,12 @@ void DdeItem::IncMonitor( ULONG nHCnv )
// --- DdeItem::DecMonitor() ------------------------------------------
-void DdeItem::DecMonitor( ULONG nHCnv )
+void DdeItem::DecMonitor( sal_uLong nHCnv )
{
if( pImpData )
{
DdeItemImpData* pData = (DdeItemImpData*)pImpData->GetData();
- for( USHORT n = pImpData->Count(); n; --n, ++pData )
+ for( sal_uInt16 n = pImpData->Count(); n; --n, ++pData )
if( pData->nHCnv == nHCnv )
{
if( !pData->nCnt || !--pData->nCnt )
@@ -898,7 +898,7 @@ void DdeItem::DecMonitor( ULONG nHCnv )
{
delete pImpData, pImpData = 0;
if( DDEGETPUTITEM == nType )
- ((DdeGetPutItem*)this)->AdviseLoop( FALSE );
+ ((DdeGetPutItem*)this)->AdviseLoop( sal_False );
}
}
return ;
@@ -912,7 +912,7 @@ short DdeItem::GetLinks()
{
short nCnt = 0;
if( pImpData )
- for( USHORT n = pImpData->Count(); n; )
+ for( sal_uInt16 n = pImpData->Count(); n; )
nCnt = nCnt + (*pImpData)[ --n ].nCnt;
return nCnt;
}
@@ -944,21 +944,21 @@ DdeGetPutItem::DdeGetPutItem( const DdeItem& rItem )
// --- DdeGetPutData::Get() ----------------------------------------
-DdeData* DdeGetPutItem::Get( ULONG )
+DdeData* DdeGetPutItem::Get( sal_uLong )
{
return 0;
}
// --- DdeGetPutData::Put() ----------------------------------------
-BOOL DdeGetPutItem::Put( const DdeData* )
+sal_Bool DdeGetPutItem::Put( const DdeData* )
{
- return FALSE;
+ return sal_False;
}
// --- DdeGetPutData::AdviseLoop() ---------------------------------
-void DdeGetPutItem::AdviseLoop( BOOL )
+void DdeGetPutItem::AdviseLoop( sal_Bool )
{
}
@@ -1023,7 +1023,7 @@ String DdeService::Formats()
s += '\t';
p = buf;
- switch( (USHORT)f )
+ switch( (sal_uInt16)f )
{
case CF_TEXT:
p = reinterpret_cast<LPCTSTR>(String::CreateFromAscii("TEXT").GetBuffer());
@@ -1070,9 +1070,9 @@ String DdeService::Status()
// --- DdeService::IsBusy() ----------------------------------------
-BOOL __EXPORT DdeService::IsBusy()
+sal_Bool __EXPORT DdeService::IsBusy()
{
- return FALSE;
+ return sal_False;
}
// --- DdeService::GetHelp() ----------------------------------------
@@ -1082,14 +1082,14 @@ String __EXPORT DdeService::GetHelp()
return String();
}
-BOOL DdeTopic::MakeItem( const String& )
+sal_Bool DdeTopic::MakeItem( const String& )
{
- return FALSE;
+ return sal_False;
}
-BOOL DdeService::MakeTopic( const String& )
+sal_Bool DdeService::MakeTopic( const String& )
{
- return FALSE;
+ return sal_False;
}
String DdeService::SysTopicGet( const String& )
@@ -1097,8 +1097,8 @@ String DdeService::SysTopicGet( const String& )
return String();
}
-BOOL DdeService::SysTopicExecute( const String* )
+sal_Bool DdeService::SysTopicExecute( const String* )
{
- return FALSE;
+ return sal_False;
}
diff --git a/svl/source/svsql/converter.cxx b/svl/source/svsql/converter.cxx
index 3b162cecadee..2f6fa9f8c389 100644
--- a/svl/source/svsql/converter.cxx
+++ b/svl/source/svsql/converter.cxx
@@ -29,12 +29,12 @@
#include "precompiled_svl.hxx"
#include <svl/converter.hxx>
-INT32 SvDbaseConverter::ConvertPrecisionToDbase(INT32 _nLen, INT32 _nScale)
+sal_Int32 SvDbaseConverter::ConvertPrecisionToDbase(sal_Int32 _nLen, sal_Int32 _nScale)
{
return _nScale ? _nLen +2 : _nLen +1;
}
//------------------------------------------------------------------------
-INT32 SvDbaseConverter::ConvertPrecisionToOdbc(INT32 _nLen, INT32 _nScale)
+sal_Int32 SvDbaseConverter::ConvertPrecisionToOdbc(sal_Int32 _nLen, sal_Int32 _nScale)
{
return _nScale ? _nLen -2 : _nLen -1;
}
diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx
index fa5eca964a8c..af22c04c79ff 100644
--- a/svl/source/undo/undo.cxx
+++ b/svl/source/undo/undo.cxx
@@ -30,10 +30,16 @@
#include <com/sun/star/uno/Exception.hpp>
+#include <comphelper/flagguard.hxx>
#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
#include <svl/undo.hxx>
+#include <vector>
+#include <list>
+#include <limits>
+
using ::com::sun::star::uno::Exception;
// STATIC DATA -----------------------------------------------------------
@@ -55,14 +61,20 @@ SfxRepeatTarget::~SfxRepeatTarget()
//------------------------------------------------------------------------
-BOOL SfxUndoAction::IsLinked()
+SfxUndoContext::~SfxUndoContext()
+{
+}
+
+//------------------------------------------------------------------------
+
+sal_Bool SfxUndoAction::IsLinked()
{
return bLinked;
}
//------------------------------------------------------------------------
-void SfxUndoAction::SetLinked( BOOL bIsLinked )
+void SfxUndoAction::SetLinked( sal_Bool bIsLinked )
{
bLinked = bIsLinked;
}
@@ -79,15 +91,15 @@ SfxUndoAction::~SfxUndoAction()
SfxUndoAction::SfxUndoAction()
{
DBG_CTOR(SfxUndoAction, 0);
- SetLinked( FALSE );
+ SetLinked( sal_False );
}
//------------------------------------------------------------------------
-BOOL SfxUndoAction::Merge( SfxUndoAction * )
+sal_Bool SfxUndoAction::Merge( SfxUndoAction * )
{
DBG_CHKTHIS(SfxUndoAction, 0);
- return FALSE;
+ return sal_False;
}
//------------------------------------------------------------------------
@@ -101,7 +113,7 @@ XubString SfxUndoAction::GetComment() const
//------------------------------------------------------------------------
-USHORT SfxUndoAction::GetId() const
+sal_uInt16 SfxUndoAction::GetId() const
{
DBG_CHKTHIS(SfxUndoAction, 0);
return 0;
@@ -117,7 +129,6 @@ XubString SfxUndoAction::GetRepeatComment(SfxRepeatTarget&) const
//------------------------------------------------------------------------
-
void SfxUndoAction::Undo()
{
// die sind nur konzeptuell pure virtual
@@ -126,6 +137,14 @@ void SfxUndoAction::Undo()
//------------------------------------------------------------------------
+void SfxUndoAction::UndoWithContext( SfxUndoContext& i_context )
+{
+ (void)i_context;
+ Undo();
+}
+
+//------------------------------------------------------------------------
+
void SfxUndoAction::Redo()
{
// die sind nur konzeptuell pure virtual
@@ -134,6 +153,14 @@ void SfxUndoAction::Redo()
//------------------------------------------------------------------------
+void SfxUndoAction::RedoWithContext( SfxUndoContext& i_context )
+{
+ (void)i_context;
+ Redo();
+}
+
+//------------------------------------------------------------------------
+
void SfxUndoAction::Repeat(SfxRepeatTarget&)
{
// die sind nur konzeptuell pure virtual
@@ -143,213 +170,561 @@ void SfxUndoAction::Repeat(SfxRepeatTarget&)
//------------------------------------------------------------------------
-BOOL SfxUndoAction::CanRepeat(SfxRepeatTarget&) const
+sal_Bool SfxUndoAction::CanRepeat(SfxRepeatTarget&) const
{
- return TRUE;
+ return sal_True;
}
//========================================================================
+typedef ::std::vector< SfxUndoListener* > UndoListeners;
+
+struct SVL_DLLPRIVATE SfxUndoManager_Data
+{
+ ::osl::Mutex aMutex;
+ SfxUndoArray* pUndoArray;
+ SfxUndoArray* pActUndoArray;
+ SfxUndoArray* pFatherUndoArray;
+
+ sal_Int32 mnLockCount;
+ sal_Int32 mnMarks;
+ sal_Int32 mnEmptyMark;
+ bool mbDoing;
+ bool mbClearUntilTopLevel;
+
+ UndoListeners aListeners;
+
+ SfxUndoManager_Data( size_t i_nMaxUndoActionCount )
+ :pUndoArray( new SfxUndoArray( i_nMaxUndoActionCount ) )
+ ,pActUndoArray( NULL )
+ ,pFatherUndoArray( NULL )
+ ,mnLockCount( 0 )
+ ,mnMarks( 0 )
+ ,mnEmptyMark(MARK_INVALID)
+ ,mbDoing( false )
+ ,mbClearUntilTopLevel( false )
+ {
+ pActUndoArray = pUndoArray;
+ }
+
+ ~SfxUndoManager_Data()
+ {
+ delete pUndoArray;
+ }
+};
+
+//========================================================================
+
+namespace svl { namespace undo { namespace impl
+{
+ //--------------------------------------------------------------------
+ class SVL_DLLPRIVATE LockGuard
+ {
+ public:
+ LockGuard( SfxUndoManager& i_manager )
+ :m_manager( i_manager )
+ {
+ m_manager.ImplEnableUndo_Lock( false );
+ }
+
+ ~LockGuard()
+ {
+ m_manager.ImplEnableUndo_Lock( true );
+ }
+
+ private:
+ SfxUndoManager& m_manager;
+ };
+
+ //--------------------------------------------------------------------
+ typedef void ( SfxUndoListener::*UndoListenerVoidMethod )();
+ typedef void ( SfxUndoListener::*UndoListenerStringMethod )( const String& );
+
+ //--------------------------------------------------------------------
+ struct SVL_DLLPRIVATE NotifyUndoListener : public ::std::unary_function< SfxUndoListener*, void >
+ {
+ NotifyUndoListener()
+ :m_notificationMethod( NULL )
+ ,m_altNotificationMethod( NULL )
+ ,m_sActionComment()
+ {
+ }
+
+ NotifyUndoListener( UndoListenerVoidMethod i_notificationMethod )
+ :m_notificationMethod( i_notificationMethod )
+ ,m_altNotificationMethod( NULL )
+ ,m_sActionComment()
+ {
+ }
+
+ NotifyUndoListener( UndoListenerStringMethod i_notificationMethod, const String& i_actionComment )
+ :m_notificationMethod( NULL )
+ ,m_altNotificationMethod( i_notificationMethod )
+ ,m_sActionComment( i_actionComment )
+ {
+ }
+
+ bool is() const
+ {
+ return ( m_notificationMethod != NULL ) || ( m_altNotificationMethod != NULL );
+ }
+
+ void operator()( SfxUndoListener* i_listener ) const
+ {
+ OSL_PRECOND( is(), "NotifyUndoListener: this will crash!" );
+ if ( m_altNotificationMethod != NULL )
+ {
+ ( i_listener->*m_altNotificationMethod )( m_sActionComment );
+ }
+ else
+ {
+ ( i_listener->*m_notificationMethod )();
+ }
+ }
+
+ private:
+ UndoListenerVoidMethod m_notificationMethod;
+ UndoListenerStringMethod m_altNotificationMethod;
+ String m_sActionComment;
+ };
+
+ //--------------------------------------------------------------------
+ class SVL_DLLPRIVATE UndoManagerGuard
+ {
+ public:
+ UndoManagerGuard( SfxUndoManager_Data& i_managerData )
+ :m_rManagerData( i_managerData )
+ ,m_aGuard( i_managerData.aMutex )
+ ,m_notifiers()
+ {
+ }
+
+ ~UndoManagerGuard();
+
+ void clear()
+ {
+ m_aGuard.clear();
+ }
+
+ void reset()
+ {
+ m_aGuard.reset();
+ }
+
+ void cancelNotifications()
+ {
+ m_notifiers.clear();
+ }
+
+ /** marks the given Undo action for deletion
+
+ The Undo action will be put into a list, whose members will be deleted from within the destructor of the
+ UndoManagerGuard. This deletion will happen without the UndoManager's mutex locked.
+ */
+ void markForDeletion( SfxUndoAction* i_action )
+ {
+ // remember
+ if ( i_action )
+ m_aUndoActionsCleanup.push_back( i_action );
+ }
+
+ /** schedules the given SfxUndoListener method to be called for all registered listeners.
+
+ The notification will happen after the Undo manager's mutex has been released, and after all pending
+ deletions of Undo actions are done.
+ */
+ void scheduleNotification( UndoListenerVoidMethod i_notificationMethod )
+ {
+ m_notifiers.push_back( NotifyUndoListener( i_notificationMethod ) );
+ }
+
+ void scheduleNotification( UndoListenerStringMethod i_notificationMethod, const String& i_actionComment )
+ {
+ m_notifiers.push_back( NotifyUndoListener( i_notificationMethod, i_actionComment ) );
+ }
+
+ private:
+ SfxUndoManager_Data& m_rManagerData;
+ ::osl::ResettableMutexGuard m_aGuard;
+ ::std::list< SfxUndoAction* > m_aUndoActionsCleanup;
+ ::std::list< NotifyUndoListener > m_notifiers;
+ };
+
+ UndoManagerGuard::~UndoManagerGuard()
+ {
+ // copy members
+ UndoListeners aListenersCopy( m_rManagerData.aListeners );
+
+ // release mutex
+ m_aGuard.clear();
+
+ // delete all actions
+ while ( !m_aUndoActionsCleanup.empty() )
+ {
+ SfxUndoAction* pAction = m_aUndoActionsCleanup.front();
+ m_aUndoActionsCleanup.pop_front();
+ try
+ {
+ delete pAction;
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
+ // handle scheduled notification
+ for ( ::std::list< NotifyUndoListener >::const_iterator notifier = m_notifiers.begin();
+ notifier != m_notifiers.end();
+ ++notifier
+ )
+ {
+ if ( notifier->is() )
+ ::std::for_each( aListenersCopy.begin(), aListenersCopy.end(), *notifier );
+ }
+ }
+} } }
+
+using namespace ::svl::undo::impl;
+
+//========================================================================
+
+SfxUndoManager::SfxUndoManager( size_t nMaxUndoActionCount )
+ :m_pData( new SfxUndoManager_Data( nMaxUndoActionCount ) )
+{
+}
-SfxUndoManager::SfxUndoManager( USHORT nMaxUndoActionCount )
- : pFatherUndoArray(0)
- , mbUndoEnabled( true )
+//------------------------------------------------------------------------
+
+SfxUndoManager::~SfxUndoManager()
{
- pUndoArray=new SfxUndoArray(nMaxUndoActionCount);
- pActUndoArray=pUndoArray;
+ UndoListeners aListenersCopy;
+ {
+ UndoManagerGuard aGuard( *m_pData );
+ aListenersCopy = m_pData->aListeners;
+ }
+ ::std::for_each( aListenersCopy.begin(), aListenersCopy.end(),
+ NotifyUndoListener( &SfxUndoListener::undoManagerDying ) );
}
//------------------------------------------------------------------------
+void SfxUndoManager::EnableUndo( bool i_enable )
+{
+ UndoManagerGuard aGuard( *m_pData );
+ ImplEnableUndo_Lock( i_enable );
-SfxUndoManager::~SfxUndoManager()
+}
+
+//------------------------------------------------------------------------
+
+void SfxUndoManager::ImplEnableUndo_Lock( bool const i_enable )
{
- delete pUndoArray;
+ if ( !i_enable )
+ ++m_pData->mnLockCount;
+ else
+ {
+ OSL_PRECOND( m_pData->mnLockCount > 0, "SfxUndoManager::ImplEnableUndo_NoNotify: not disabled, so why enabling?" );
+ if ( m_pData->mnLockCount > 0 )
+ --m_pData->mnLockCount;
+ }
}
//------------------------------------------------------------------------
-void SfxUndoManager::EnableUndo( bool bEnable )
+bool SfxUndoManager::IsUndoEnabled() const
{
- mbUndoEnabled = bEnable;
+ UndoManagerGuard aGuard( *m_pData );
+ return ImplIsUndoEnabled_Lock();
}
//------------------------------------------------------------------------
+bool SfxUndoManager::ImplIsUndoEnabled_Lock() const
+{
+ return m_pData->mnLockCount == 0;
+}
+
+//------------------------------------------------------------------------
-void SfxUndoManager::SetMaxUndoActionCount( USHORT nMaxUndoActionCount )
+void SfxUndoManager::SetMaxUndoActionCount( size_t nMaxUndoActionCount )
{
+ UndoManagerGuard aGuard( *m_pData );
+
// Remove entries from the pActUndoArray when we have to reduce
// the number of entries due to a lower nMaxUndoActionCount.
// Both redo and undo action entries will be removed until we reached the
// new nMaxUndoActionCount.
- long nNumToDelete = pActUndoArray->aUndoActions.Count() - nMaxUndoActionCount;
- if ( nNumToDelete > 0 )
+ long nNumToDelete = m_pData->pActUndoArray->aUndoActions.size() - nMaxUndoActionCount;
+ while ( nNumToDelete > 0 )
{
- while ( nNumToDelete > 0 )
+ size_t nPos = m_pData->pActUndoArray->aUndoActions.size();
+ if ( nPos > m_pData->pActUndoArray->nCurUndoAction )
{
- USHORT nPos = pActUndoArray->aUndoActions.Count();
- if ( nPos > pActUndoArray->nCurUndoAction )
+ SfxUndoAction* pAction = m_pData->pActUndoArray->aUndoActions[nPos-1].pAction;
+ if ( !pAction->IsLinked() )
{
- if ( !pActUndoArray->aUndoActions[nPos-1]->IsLinked() )
- {
- delete pActUndoArray->aUndoActions[nPos-1];
- pActUndoArray->aUndoActions.Remove( nPos-1 );
- --nNumToDelete;
- }
+ aGuard.markForDeletion( pAction );
+ m_pData->pActUndoArray->aUndoActions.Remove( nPos-1 );
+ --nNumToDelete;
}
+ }
- if ( nNumToDelete > 0 && pActUndoArray->nCurUndoAction > 0 )
+ if ( nNumToDelete > 0 && m_pData->pActUndoArray->nCurUndoAction > 0 )
+ {
+ SfxUndoAction* pAction = m_pData->pActUndoArray->aUndoActions[0].pAction;
+ if ( !pAction->IsLinked() )
{
- if ( !pActUndoArray->aUndoActions[0]->IsLinked() )
- {
- delete pActUndoArray->aUndoActions[0];
- pActUndoArray->aUndoActions.Remove(0);
- --pActUndoArray->nCurUndoAction;
- --nNumToDelete;
- }
+ aGuard.markForDeletion( pAction );
+ m_pData->pActUndoArray->aUndoActions.Remove(0);
+ --m_pData->pActUndoArray->nCurUndoAction;
+ --nNumToDelete;
}
-
- if ( nPos == pActUndoArray->aUndoActions.Count() )
- break; // Cannot delete more entries
}
+
+ if ( nPos == m_pData->pActUndoArray->aUndoActions.size() )
+ break; // Cannot delete more entries
}
- pActUndoArray->nMaxUndoActions = nMaxUndoActionCount;
+ m_pData->pActUndoArray->nMaxUndoActions = nMaxUndoActionCount;
}
//------------------------------------------------------------------------
-USHORT SfxUndoManager::GetMaxUndoActionCount() const
+size_t SfxUndoManager::GetMaxUndoActionCount() const
{
- return pActUndoArray->nMaxUndoActions;
+ UndoManagerGuard aGuard( *m_pData );
+ return m_pData->pActUndoArray->nMaxUndoActions;
}
//------------------------------------------------------------------------
-void SfxUndoManager::Clear()
+void SfxUndoManager::ImplClearCurrentLevel_NoNotify( UndoManagerGuard& i_guard )
{
- while ( pActUndoArray->aUndoActions.Count() )
+ // clear array
+ while ( !m_pData->pActUndoArray->aUndoActions.empty() )
{
- SfxUndoAction *pAction=
- pActUndoArray->aUndoActions[pActUndoArray->aUndoActions.Count() - 1];
- pActUndoArray->aUndoActions.Remove( pActUndoArray->aUndoActions.Count() - 1 );
- delete pAction;
+ size_t deletePos = m_pData->pActUndoArray->aUndoActions.size() - 1;
+ SfxUndoAction* pAction = m_pData->pActUndoArray->aUndoActions[ deletePos ].pAction;
+ i_guard.markForDeletion( pAction );
+ m_pData->pActUndoArray->aUndoActions.Remove( deletePos );
}
- pActUndoArray->nCurUndoAction = 0;
+ m_pData->pActUndoArray->nCurUndoAction = 0;
+
+ m_pData->mnMarks = 0;
+ m_pData->mnEmptyMark = MARK_INVALID;
}
//------------------------------------------------------------------------
-void SfxUndoManager::ClearRedo()
+void SfxUndoManager::Clear()
{
- while ( pActUndoArray->aUndoActions.Count() > pActUndoArray->nCurUndoAction )
- {
- SfxUndoAction *pAction=
- pActUndoArray->aUndoActions[pActUndoArray->aUndoActions.Count() - 1];
- pActUndoArray->aUndoActions.Remove( pActUndoArray->aUndoActions.Count() - 1 );
- delete pAction;
- }
+ UndoManagerGuard aGuard( *m_pData );
+
+ OSL_ENSURE( !ImplIsInListAction_Lock(), "SfxUndoManager::Clear: suspicious call - do you really wish to clear the current level?" );
+ ImplClearCurrentLevel_NoNotify( aGuard );
+
+ // notify listeners
+ aGuard.scheduleNotification( &SfxUndoListener::cleared );
}
//------------------------------------------------------------------------
-void SfxUndoManager::AddUndoAction( SfxUndoAction *pAction, BOOL bTryMerge )
+void SfxUndoManager::ClearAllLevels()
{
- if( mbUndoEnabled )
+ UndoManagerGuard aGuard( *m_pData );
+ ImplClearCurrentLevel_NoNotify( aGuard );
+
+ if ( ImplIsInListAction_Lock() )
+ {
+ m_pData->mbClearUntilTopLevel = true;
+ }
+ else
{
- // Redo-Actions loeschen
- for ( USHORT nPos = pActUndoArray->aUndoActions.Count();
- nPos > pActUndoArray->nCurUndoAction; --nPos )
- delete pActUndoArray->aUndoActions[nPos-1];
+ aGuard.scheduleNotification( &SfxUndoListener::cleared );
+ }
+}
- pActUndoArray->aUndoActions.Remove(
- pActUndoArray->nCurUndoAction,
- pActUndoArray->aUndoActions.Count() - pActUndoArray->nCurUndoAction );
+//------------------------------------------------------------------------
- if ( pActUndoArray->nMaxUndoActions )
- {
- SfxUndoAction *pTmpAction = pActUndoArray->nCurUndoAction ?
- pActUndoArray->aUndoActions[pActUndoArray->nCurUndoAction-1] : 0;
+void SfxUndoManager::ImplClearRedo_NoLock( bool const i_currentLevel )
+{
+ UndoManagerGuard aGuard( *m_pData );
+ ImplClearRedo( aGuard, i_currentLevel );
+}
- if ( !bTryMerge || !(pTmpAction && pTmpAction->Merge(pAction)) )
- {
- // auf Max-Anzahl anpassen
- if( pActUndoArray == pUndoArray )
- while( pActUndoArray->aUndoActions.Count() >=
- pActUndoArray->nMaxUndoActions &&
- !pActUndoArray->aUndoActions[0]->IsLinked() )
- {
- delete pActUndoArray->aUndoActions[0];
- pActUndoArray->aUndoActions.Remove(0);
- --pActUndoArray->nCurUndoAction;
- }
-
- // neue Action anh"angen
- const SfxUndoAction* pTemp = pAction;
- pActUndoArray->aUndoActions.Insert(
- pTemp, pActUndoArray->nCurUndoAction++ );
- return;
- }
- }
- }
- delete pAction;
+//------------------------------------------------------------------------
+
+void SfxUndoManager::ClearRedo()
+{
+ OSL_ENSURE( !IsInListAction(), "SfxUndoManager::ClearRedo: suspicious call - do you really wish to clear the current level?" );
+ ImplClearRedo_NoLock( CurrentLevel );
}
//------------------------------------------------------------------------
-USHORT SfxUndoManager::GetUndoActionCount() const
+void SfxUndoManager::Reset()
{
- return pActUndoArray->nCurUndoAction;
+ UndoManagerGuard aGuard( *m_pData );
+
+ // clear all locks
+ while ( !ImplIsUndoEnabled_Lock() )
+ ImplEnableUndo_Lock( true );
+
+ // cancel all list actions
+ while ( IsInListAction() )
+ ImplLeaveListAction( false, aGuard );
+
+ // clear both stacks
+ ImplClearCurrentLevel_NoNotify( aGuard );
+
+ // cancel the notifications scheduled by ImplLeaveListAction,
+ // as we want to do an own, dedicated notification
+ aGuard.cancelNotifications();
+
+ // schedule notification
+ aGuard.scheduleNotification( &SfxUndoListener::resetAll );
}
//------------------------------------------------------------------------
-XubString SfxUndoManager::GetUndoActionComment( USHORT nNo ) const
+void SfxUndoManager::ImplClearUndo( UndoManagerGuard& i_guard )
{
- DBG_ASSERT( nNo < pActUndoArray->nCurUndoAction, "svl::SfxUndoManager::GetUndoActionComment(), illegal id!" );
- if( nNo < pActUndoArray->nCurUndoAction )
+ while ( m_pData->pActUndoArray->nCurUndoAction > 0 )
{
- return pActUndoArray->aUndoActions[pActUndoArray->nCurUndoAction-1-nNo]->GetComment(); //!
+ SfxUndoAction* pUndoAction = m_pData->pActUndoArray->aUndoActions[0].pAction;
+ m_pData->pActUndoArray->aUndoActions.Remove( 0 );
+ i_guard.markForDeletion( pUndoAction );
+ --m_pData->pActUndoArray->nCurUndoAction;
}
- else
+ // TODO: notifications? We don't have clearedUndo, only cleared and clearedRedo at the SfxUndoListener
+}
+
+//------------------------------------------------------------------------
+
+void SfxUndoManager::ImplClearRedo( UndoManagerGuard& i_guard, bool const i_currentLevel )
+{
+ SfxUndoArray* pUndoArray = ( i_currentLevel == IUndoManager::CurrentLevel ) ? m_pData->pActUndoArray : m_pData->pUndoArray;
+
+ // clearance
+ while ( pUndoArray->aUndoActions.size() > pUndoArray->nCurUndoAction )
{
- XubString aEmpty;
- return aEmpty;
+ size_t deletePos = pUndoArray->aUndoActions.size() - 1;
+ SfxUndoAction* pAction = pUndoArray->aUndoActions[ deletePos ].pAction;
+ pUndoArray->aUndoActions.Remove( deletePos );
+ i_guard.markForDeletion( pAction );
}
+
+ // notification - only if the top level's stack was cleared
+ if ( i_currentLevel == IUndoManager::TopLevel )
+ i_guard.scheduleNotification( &SfxUndoListener::clearedRedo );
}
//------------------------------------------------------------------------
-USHORT SfxUndoManager::GetUndoActionId( USHORT nNo ) const
+bool SfxUndoManager::ImplAddUndoAction_NoNotify( SfxUndoAction *pAction, bool bTryMerge, bool bClearRedo, UndoManagerGuard& i_guard )
{
- DBG_ASSERT( nNo < pActUndoArray->nCurUndoAction, "svl::SfxUndoManager::GetUndoActionId(), illegal id!" );
- if( nNo < pActUndoArray->nCurUndoAction )
+ if ( !ImplIsUndoEnabled_Lock() || ( m_pData->pActUndoArray->nMaxUndoActions == 0 ) )
{
- return pActUndoArray->aUndoActions[pActUndoArray->nCurUndoAction-1-nNo]->GetId(); //!
+ i_guard.markForDeletion( pAction );
+ return false;
}
- else
+
+ // merge, if required
+ SfxUndoAction* pMergeWithAction = m_pData->pActUndoArray->nCurUndoAction ?
+ m_pData->pActUndoArray->aUndoActions[m_pData->pActUndoArray->nCurUndoAction-1].pAction : NULL;
+ if ( bTryMerge && ( !pMergeWithAction || !pMergeWithAction->Merge( pAction ) ) )
{
- return 0;
+ i_guard.markForDeletion( pAction );
+ return false;
+ }
+
+ // clear redo stack, if requested
+ if ( bClearRedo && ( ImplGetRedoActionCount_Lock( CurrentLevel ) > 0 ) )
+ ImplClearRedo( i_guard, IUndoManager::CurrentLevel );
+
+ // respect max number
+ if( m_pData->pActUndoArray == m_pData->pUndoArray )
+ {
+ while( m_pData->pActUndoArray->aUndoActions.size() >=
+ m_pData->pActUndoArray->nMaxUndoActions &&
+ !m_pData->pActUndoArray->aUndoActions[0].pAction->IsLinked() )
+ {
+ i_guard.markForDeletion( m_pData->pActUndoArray->aUndoActions[0].pAction );
+ m_pData->pActUndoArray->aUndoActions.Remove(0);
+ --m_pData->pActUndoArray->nCurUndoAction;
+ }
}
+
+ // append new action
+ m_pData->pActUndoArray->aUndoActions.Insert( pAction, m_pData->pActUndoArray->nCurUndoAction++ );
+ return true;
}
//------------------------------------------------------------------------
-SfxUndoAction* SfxUndoManager::GetUndoAction( USHORT nNo ) const
+void SfxUndoManager::AddUndoAction( SfxUndoAction *pAction, sal_Bool bTryMerge )
{
- DBG_ASSERT( nNo < pActUndoArray->nCurUndoAction, "svl::SfxUndoManager::GetUndoAction(), illegal id!" );
- if( nNo < pActUndoArray->nCurUndoAction )
+ UndoManagerGuard aGuard( *m_pData );
+
+ // add
+ if ( ImplAddUndoAction_NoNotify( pAction, bTryMerge, true, aGuard ) )
{
- return pActUndoArray->aUndoActions[pActUndoArray->nCurUndoAction-1-nNo]; //!
+ // notify listeners
+ aGuard.scheduleNotification( &SfxUndoListener::undoActionAdded, pAction->GetComment() );
}
- else
+}
+
+//------------------------------------------------------------------------
+
+size_t SfxUndoManager::GetUndoActionCount( bool const i_currentLevel ) const
+{
+ UndoManagerGuard aGuard( *m_pData );
+ const SfxUndoArray* pUndoArray = i_currentLevel ? m_pData->pActUndoArray : m_pData->pUndoArray;
+ return pUndoArray->nCurUndoAction;
+}
+
+//------------------------------------------------------------------------
+
+XubString SfxUndoManager::GetUndoActionComment( size_t nNo, bool const i_currentLevel ) const
+{
+ UndoManagerGuard aGuard( *m_pData );
+
+ String sComment;
+ const SfxUndoArray* pUndoArray = i_currentLevel ? m_pData->pActUndoArray : m_pData->pUndoArray;
+ DBG_ASSERT( nNo < pUndoArray->nCurUndoAction, "svl::SfxUndoManager::GetUndoActionComment: illegal index!" );
+ if( nNo < pUndoArray->nCurUndoAction )
{
- return 0;
+ sComment = pUndoArray->aUndoActions[ pUndoArray->nCurUndoAction - 1 - nNo ].pAction->GetComment();
}
+ return sComment;
+}
+
+//------------------------------------------------------------------------
+
+sal_uInt16 SfxUndoManager::GetUndoActionId() const
+{
+ UndoManagerGuard aGuard( *m_pData );
+
+ DBG_ASSERT( m_pData->pActUndoArray->nCurUndoAction > 0, "svl::SfxUndoManager::GetUndoActionId(), illegal id!" );
+ if ( m_pData->pActUndoArray->nCurUndoAction == 0 )
+ return NULL;
+ return m_pData->pActUndoArray->aUndoActions[m_pData->pActUndoArray->nCurUndoAction-1].pAction->GetId();
+}
+
+//------------------------------------------------------------------------
+
+SfxUndoAction* SfxUndoManager::GetUndoAction( size_t nNo ) const
+{
+ UndoManagerGuard aGuard( *m_pData );
+
+ DBG_ASSERT( nNo < m_pData->pActUndoArray->nCurUndoAction, "svl::SfxUndoManager::GetUndoAction(), illegal id!" );
+ if( nNo >= m_pData->pActUndoArray->nCurUndoAction )
+ return NULL;
+ return m_pData->pActUndoArray->aUndoActions[m_pData->pActUndoArray->nCurUndoAction-1-nNo].pAction;
}
//------------------------------------------------------------------------
@@ -357,196 +732,284 @@ SfxUndoAction* SfxUndoManager::GetUndoAction( USHORT nNo ) const
/** clears the redo stack and removes the top undo action */
void SfxUndoManager::RemoveLastUndoAction()
{
- DBG_ASSERT( pActUndoArray->nCurUndoAction, "svl::SfxUndoManager::RemoveLastUndoAction(), no action to remove?!" );
- if( pActUndoArray->nCurUndoAction )
- {
- pActUndoArray->nCurUndoAction--;
+ UndoManagerGuard aGuard( *m_pData );
+
+ ENSURE_OR_RETURN_VOID( m_pData->pActUndoArray->nCurUndoAction, "svl::SfxUndoManager::RemoveLastUndoAction(), no action to remove?!" );
- // delete redo-actions and top action
- USHORT nPos;
- for ( nPos = pActUndoArray->aUndoActions.Count(); nPos > pActUndoArray->nCurUndoAction; --nPos )
- delete pActUndoArray->aUndoActions[nPos-1];
+ m_pData->pActUndoArray->nCurUndoAction--;
- pActUndoArray->aUndoActions.Remove(
- pActUndoArray->nCurUndoAction,
- pActUndoArray->aUndoActions.Count() - pActUndoArray->nCurUndoAction );
+ // delete redo-actions and top action
+ for ( size_t nPos = m_pData->pActUndoArray->aUndoActions.size(); nPos > m_pData->pActUndoArray->nCurUndoAction; --nPos )
+ {
+ aGuard.markForDeletion( m_pData->pActUndoArray->aUndoActions[nPos-1].pAction );
}
+
+ m_pData->pActUndoArray->aUndoActions.Remove(
+ m_pData->pActUndoArray->nCurUndoAction,
+ m_pData->pActUndoArray->aUndoActions.size() - m_pData->pActUndoArray->nCurUndoAction );
}
//------------------------------------------------------------------------
-BOOL SfxUndoManager::Undo( USHORT )
+bool SfxUndoManager::IsDoing() const
{
- bool bUndoWasEnabled = mbUndoEnabled;
- mbUndoEnabled = false;
+ UndoManagerGuard aGuard( *m_pData );
+ return m_pData->mbDoing;
+}
- BOOL bRet = FALSE;
+//------------------------------------------------------------------------
- try
- {
- DBG_ASSERT( pActUndoArray == pUndoArray, "svl::SfxUndoManager::Undo(), LeaveListAction() not yet called!" );
- if ( pActUndoArray->nCurUndoAction )
- {
- Undo( *pActUndoArray->aUndoActions[ --pActUndoArray->nCurUndoAction ] );
- bRet = TRUE;
- }
- }
- catch( Exception& e )
- {
- mbUndoEnabled = bUndoWasEnabled;
- throw e;
- }
- mbUndoEnabled = bUndoWasEnabled;
- return bRet;
+sal_Bool SfxUndoManager::Undo()
+{
+ return ImplUndo( NULL );
}
//------------------------------------------------------------------------
-void SfxUndoManager::Undo( SfxUndoAction &rAction )
+sal_Bool SfxUndoManager::UndoWithContext( SfxUndoContext& i_context )
{
- bool bUndoWasEnabled = mbUndoEnabled;
- mbUndoEnabled = false;
+ return ImplUndo( &i_context );
+}
+
+//------------------------------------------------------------------------
+
+sal_Bool SfxUndoManager::ImplUndo( SfxUndoContext* i_contextOrNull )
+{
+ UndoManagerGuard aGuard( *m_pData );
+ OSL_ENSURE( !IsDoing(), "SfxUndoManager::Undo: *nested* Undo/Redo actions? How this?" );
+
+ ::comphelper::FlagGuard aDoingGuard( m_pData->mbDoing );
+ LockGuard aLockGuard( *this );
+
+ if ( ImplIsInListAction_Lock() )
+ {
+ OSL_ENSURE( false, "SfxUndoManager::Undo: not possible when within a list action!" );
+ return sal_False;
+ }
+
+ if ( m_pData->pActUndoArray->nCurUndoAction == 0 )
+ {
+ OSL_ENSURE( false, "SfxUndoManager::Undo: undo stack is empty!" );
+ return sal_False;
+ }
+
+ SfxUndoAction* pAction = m_pData->pActUndoArray->aUndoActions[ --m_pData->pActUndoArray->nCurUndoAction ].pAction;
+ const String sActionComment = pAction->GetComment();
try
{
- rAction.Undo();
+ // clear the guard/mutex before calling into the SfxUndoAction - this can be an extension-implemented UNO component
+ // nowadays ...
+ aGuard.clear();
+ if ( i_contextOrNull != NULL )
+ pAction->UndoWithContext( *i_contextOrNull );
+ else
+ pAction->Undo();
+ aGuard.reset();
}
- catch( Exception& e )
+ catch( ... )
{
- mbUndoEnabled = bUndoWasEnabled;
- throw e;
+ aGuard.reset();
+
+ // in theory, somebody might have tampered with all of *m_pData while the mutex was unlocked. So, see if
+ // we still find pAction in our current Undo array
+ size_t nCurAction = 0;
+ while ( nCurAction < m_pData->pActUndoArray->aUndoActions.size() )
+ {
+ if ( m_pData->pActUndoArray->aUndoActions[ nCurAction++ ].pAction == pAction )
+ {
+ // the Undo action is still there ...
+ // assume the error is a permanent failure, and clear the Undo stack
+ ImplClearUndo( aGuard );
+ throw;
+ }
+ }
+ OSL_ENSURE( false, "SfxUndoManager::Undo: can't clear the Undo stack after the failure - some other party was faster ..." );
+ throw;
}
- mbUndoEnabled = bUndoWasEnabled;
+ aGuard.scheduleNotification( &SfxUndoListener::actionUndone, sActionComment );
+
+ return sal_True;
}
//------------------------------------------------------------------------
-USHORT SfxUndoManager::GetRedoActionCount() const
+size_t SfxUndoManager::GetRedoActionCount( bool const i_currentLevel ) const
{
- return pActUndoArray->aUndoActions.Count() - pActUndoArray->nCurUndoAction; //!
+ UndoManagerGuard aGuard( *m_pData );
+ return ImplGetRedoActionCount_Lock( i_currentLevel );
}
//------------------------------------------------------------------------
-XubString SfxUndoManager::GetRedoActionComment( USHORT nNo ) const
+size_t SfxUndoManager::ImplGetRedoActionCount_Lock( bool const i_currentLevel ) const
{
- return pActUndoArray->aUndoActions[pActUndoArray->nCurUndoAction+nNo]->GetComment(); //!
+ const SfxUndoArray* pUndoArray = i_currentLevel ? m_pData->pActUndoArray : m_pData->pUndoArray;
+ return pUndoArray->aUndoActions.size() - pUndoArray->nCurUndoAction;
}
//------------------------------------------------------------------------
-USHORT SfxUndoManager::GetRedoActionId( USHORT nNo ) const
+XubString SfxUndoManager::GetRedoActionComment( size_t nNo, bool const i_currentLevel ) const
{
- return pActUndoArray->aUndoActions[pActUndoArray->nCurUndoAction+nNo]->GetId(); //!
+ UndoManagerGuard aGuard( *m_pData );
+ const SfxUndoArray* pUndoArray = i_currentLevel ? m_pData->pActUndoArray : m_pData->pUndoArray;
+ return pUndoArray->aUndoActions[ pUndoArray->nCurUndoAction + nNo ].pAction->GetComment();
}
//------------------------------------------------------------------------
-BOOL SfxUndoManager::Redo( USHORT )
+sal_Bool SfxUndoManager::Redo()
{
- bool bUndoWasEnabled = mbUndoEnabled;
- mbUndoEnabled = false;
-
- BOOL bRet = FALSE;
+ return ImplRedo( NULL );
+}
- try
- {
- if ( pActUndoArray->aUndoActions.Count() > pActUndoArray->nCurUndoAction )
- {
- Redo( *pActUndoArray->aUndoActions[pActUndoArray->nCurUndoAction++] );
- bRet = TRUE;
- }
- }
- catch( Exception& e )
- {
- mbUndoEnabled = bUndoWasEnabled;
- throw e;
- }
+//------------------------------------------------------------------------
- mbUndoEnabled = bUndoWasEnabled;
- return bRet;
+sal_Bool SfxUndoManager::RedoWithContext( SfxUndoContext& i_context )
+{
+ return ImplRedo( &i_context );
}
//------------------------------------------------------------------------
-void SfxUndoManager::Redo( SfxUndoAction &rAction )
+sal_Bool SfxUndoManager::ImplRedo( SfxUndoContext* i_contextOrNull )
{
- bool bUndoWasEnabled = mbUndoEnabled;
- mbUndoEnabled = false;
+ UndoManagerGuard aGuard( *m_pData );
+ OSL_ENSURE( !IsDoing(), "SfxUndoManager::Redo: *nested* Undo/Redo actions? How this?" );
+
+ ::comphelper::FlagGuard aDoingGuard( m_pData->mbDoing );
+ LockGuard aLockGuard( *this );
+
+ if ( ImplIsInListAction_Lock() )
+ {
+ OSL_ENSURE( false, "SfxUndoManager::Redo: not possible when within a list action!" );
+ return sal_False;
+ }
+
+ if ( m_pData->pActUndoArray->nCurUndoAction >= m_pData->pActUndoArray->aUndoActions.size() )
+ {
+ OSL_ENSURE( false, "SfxUndoManager::Redo: redo stack is empty!" );
+ return sal_False;
+ }
+ SfxUndoAction* pAction = m_pData->pActUndoArray->aUndoActions[ m_pData->pActUndoArray->nCurUndoAction++ ].pAction;
+ const String sActionComment = pAction->GetComment();
try
{
- rAction.Redo();
+ // clear the guard/mutex before calling into the SfxUndoAction - this can be a extension-implemented UNO component
+ // nowadays ...
+ aGuard.clear();
+ if ( i_contextOrNull != NULL )
+ pAction->RedoWithContext( *i_contextOrNull );
+ else
+ pAction->Redo();
+ aGuard.reset();
}
- catch( Exception& e )
+ catch( ... )
{
- mbUndoEnabled = bUndoWasEnabled;
- throw e;
+ aGuard.reset();
+
+ // in theory, somebody might have tampered with all of *m_pData while the mutex was unlocked. So, see if
+ // we still find pAction in our current Undo array
+ size_t nCurAction = 0;
+ while ( nCurAction < m_pData->pActUndoArray->aUndoActions.size() )
+ {
+ if ( m_pData->pActUndoArray->aUndoActions[ nCurAction ].pAction == pAction )
+ {
+ // the Undo action is still there ...
+ // assume the error is a permanent failure, and clear the Undo stack
+ ImplClearRedo( aGuard, IUndoManager::CurrentLevel );
+ throw;
+ }
+ ++nCurAction;
+ }
+ OSL_ENSURE( false, "SfxUndoManager::Redo: can't clear the Undo stack after the failure - some other party was faster ..." );
+ throw;
}
- mbUndoEnabled = bUndoWasEnabled;
+ aGuard.scheduleNotification( &SfxUndoListener::actionRedone, sActionComment );
+
+ return sal_True;
}
//------------------------------------------------------------------------
-USHORT SfxUndoManager::GetRepeatActionCount() const
+size_t SfxUndoManager::GetRepeatActionCount() const
{
- return pActUndoArray->aUndoActions.Count();
+ UndoManagerGuard aGuard( *m_pData );
+ return m_pData->pActUndoArray->aUndoActions.size();
}
//------------------------------------------------------------------------
-XubString SfxUndoManager::GetRepeatActionComment( SfxRepeatTarget &rTarget, USHORT nNo ) const
+XubString SfxUndoManager::GetRepeatActionComment( SfxRepeatTarget &rTarget) const
{
- return pActUndoArray->aUndoActions[ pActUndoArray->aUndoActions.Count() - 1 - nNo ]
+ UndoManagerGuard aGuard( *m_pData );
+ return m_pData->pActUndoArray->aUndoActions[ m_pData->pActUndoArray->aUndoActions.size() - 1 ].pAction
->GetRepeatComment(rTarget);
}
//------------------------------------------------------------------------
-BOOL SfxUndoManager::Repeat( SfxRepeatTarget &rTarget, USHORT /*nFrom*/, USHORT /*nCount*/ )
+sal_Bool SfxUndoManager::Repeat( SfxRepeatTarget &rTarget )
{
- if ( pActUndoArray->aUndoActions.Count() )
+ UndoManagerGuard aGuard( *m_pData );
+ if ( !m_pData->pActUndoArray->aUndoActions.empty() )
{
- Repeat( rTarget, *pActUndoArray->aUndoActions[ pActUndoArray->aUndoActions.Count() - 1 ] );
- return TRUE;
+ SfxUndoAction* pAction = m_pData->pActUndoArray->aUndoActions[ m_pData->pActUndoArray->aUndoActions.size() - 1 ].pAction;
+ aGuard.clear();
+ if ( pAction->CanRepeat( rTarget ) )
+ pAction->Repeat( rTarget );
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//------------------------------------------------------------------------
-void SfxUndoManager::Repeat( SfxRepeatTarget &rTarget, SfxUndoAction &rAction )
+sal_Bool SfxUndoManager::CanRepeat( SfxRepeatTarget &rTarget ) const
{
- if ( rAction.CanRepeat(rTarget) )
- rAction.Repeat(rTarget);
+ UndoManagerGuard aGuard( *m_pData );
+ if ( !m_pData->pActUndoArray->aUndoActions.empty() )
+ {
+ size_t nActionNo = m_pData->pActUndoArray->aUndoActions.size() - 1;
+ return m_pData->pActUndoArray->aUndoActions[nActionNo].pAction->CanRepeat(rTarget);
+ }
+ return sal_False;
}
//------------------------------------------------------------------------
-BOOL SfxUndoManager::CanRepeat( SfxRepeatTarget &rTarget, SfxUndoAction &rAction ) const
+void SfxUndoManager::AddUndoListener( SfxUndoListener& i_listener )
{
- return rAction.CanRepeat(rTarget);
+ UndoManagerGuard aGuard( *m_pData );
+ m_pData->aListeners.push_back( &i_listener );
}
//------------------------------------------------------------------------
-BOOL SfxUndoManager::CanRepeat( SfxRepeatTarget &rTarget, USHORT nNo ) const
+void SfxUndoManager::RemoveUndoListener( SfxUndoListener& i_listener )
{
- if ( pActUndoArray->aUndoActions.Count() > nNo )
+ UndoManagerGuard aGuard( *m_pData );
+ for ( UndoListeners::iterator lookup = m_pData->aListeners.begin();
+ lookup != m_pData->aListeners.end();
+ ++lookup
+ )
{
- USHORT nActionNo = pActUndoArray->aUndoActions.Count() - 1 - nNo;
- return pActUndoArray->aUndoActions[nActionNo]->CanRepeat(rTarget);
+ if ( (*lookup) == &i_listener )
+ {
+ m_pData->aListeners.erase( lookup );
+ break;
+ }
}
-
- return FALSE;
}
//------------------------------------------------------------------------
void SfxUndoManager::EnterListAction(
- const XubString& rComment, const XubString &rRepeatComment, USHORT nId )
+ const XubString& rComment, const XubString &rRepeatComment, sal_uInt16 nId )
/* [Beschreibung]
@@ -554,74 +1017,275 @@ void SfxUndoManager::EnterListAction(
*/
{
- if( !mbUndoEnabled )
+ UndoManagerGuard aGuard( *m_pData );
+
+ if( !ImplIsUndoEnabled_Lock() )
return;
- if ( !pUndoArray->nMaxUndoActions )
+ if ( !m_pData->pUndoArray->nMaxUndoActions )
return;
- pFatherUndoArray=pActUndoArray;
- SfxListUndoAction *pAction=new SfxListUndoAction(
- rComment, rRepeatComment, nId, pActUndoArray);
- AddUndoAction( pAction );
- pActUndoArray=pAction;
+ m_pData->pFatherUndoArray = m_pData->pActUndoArray;
+ SfxListUndoAction* pAction = new SfxListUndoAction( rComment, rRepeatComment, nId, m_pData->pActUndoArray );
+ OSL_VERIFY( ImplAddUndoAction_NoNotify( pAction, false, false, aGuard ) );
+ // expected to succeed: all conditions under which it could fail should have been checked already
+ m_pData->pActUndoArray = pAction;
+
+ // notification
+ aGuard.scheduleNotification( &SfxUndoListener::listActionEntered, rComment );
}
//------------------------------------------------------------------------
-void SfxUndoManager::LeaveListAction()
+bool SfxUndoManager::IsInListAction() const
+{
+ UndoManagerGuard aGuard( *m_pData );
+ return ImplIsInListAction_Lock();
+}
-/* [Beschreibung]
+//------------------------------------------------------------------------
- Verlaesst die aktuelle ListAction und geht eine Ebene nach oben.
-*/
+bool SfxUndoManager::ImplIsInListAction_Lock() const
{
- if ( !mbUndoEnabled )
- return;
+ return ( m_pData->pActUndoArray != m_pData->pUndoArray );
+}
- if ( !pUndoArray->nMaxUndoActions )
- return;
+//------------------------------------------------------------------------
+
+size_t SfxUndoManager::GetListActionDepth() const
+{
+ UndoManagerGuard aGuard( *m_pData );
+ size_t nDepth(0);
- if( pActUndoArray == pUndoArray )
+ SfxUndoArray* pLookup( m_pData->pActUndoArray );
+ while ( pLookup != m_pData->pUndoArray )
{
- DBG_ERROR( "svl::SfxUndoManager::LeaveListAction(), called without calling EnterListAction()!" );
- return;
+ pLookup = pLookup->pFatherUndoArray;
+ ++nDepth;
}
- DBG_ASSERT(pActUndoArray->pFatherUndoArray,"svl::SfxUndoManager::LeaveListAction(), no father undo array!?");
+ return nDepth;
+}
+
+//------------------------------------------------------------------------
- SfxUndoArray* pTmp=pActUndoArray;
- pActUndoArray=pActUndoArray->pFatherUndoArray;
+size_t SfxUndoManager::LeaveListAction()
+{
+ UndoManagerGuard aGuard( *m_pData );
+ size_t nCount = ImplLeaveListAction( false, aGuard );
- // If no undo action where added, delete the undo list action
- SfxUndoAction *pTmpAction= pActUndoArray->aUndoActions[pActUndoArray->nCurUndoAction-1];
- if(!pTmp->nCurUndoAction)
+ if ( m_pData->mbClearUntilTopLevel )
{
- pActUndoArray->aUndoActions.Remove( --pActUndoArray->nCurUndoAction);
- delete pTmpAction;
+ ImplClearCurrentLevel_NoNotify( aGuard );
+ if ( !ImplIsInListAction_Lock() )
+ {
+ m_pData->mbClearUntilTopLevel = false;
+ aGuard.scheduleNotification( &SfxUndoListener::cleared );
+ }
+ nCount = 0;
}
- else
+
+ return nCount;
+}
+
+//------------------------------------------------------------------------
+
+size_t SfxUndoManager::LeaveAndMergeListAction()
+{
+ UndoManagerGuard aGuard( *m_pData );
+ return ImplLeaveListAction( true, aGuard );
+}
+
+//------------------------------------------------------------------------
+
+size_t SfxUndoManager::ImplLeaveListAction( const bool i_merge, UndoManagerGuard& i_guard )
+{
+ if ( !ImplIsUndoEnabled_Lock() )
+ return 0;
+
+ if ( !m_pData->pUndoArray->nMaxUndoActions )
+ return 0;
+
+ if( !ImplIsInListAction_Lock() )
{
- // if the undo array has no comment, try to get it from its children
- SfxListUndoAction* pList = dynamic_cast< SfxListUndoAction * >( pTmpAction );
- if( pList && pList->GetComment().Len() == 0 )
+ DBG_ERROR( "svl::SfxUndoManager::ImplLeaveListAction, called without calling EnterListAction()!" );
+ return 0;
+ }
+
+ DBG_ASSERT( m_pData->pActUndoArray->pFatherUndoArray, "SfxUndoManager::ImplLeaveListAction, no father undo array!?" );
+
+ // the array/level which we're about to leave
+ SfxUndoArray* pArrayToLeave = m_pData->pActUndoArray;
+ // one step up
+ m_pData->pActUndoArray = m_pData->pActUndoArray->pFatherUndoArray;
+
+ // If no undo actions were added to the list, delete the list action
+ const size_t nListActionElements = pArrayToLeave->nCurUndoAction;
+ if ( nListActionElements == 0 )
+ {
+ SfxUndoAction* pCurrentAction= m_pData->pActUndoArray->aUndoActions[ m_pData->pActUndoArray->nCurUndoAction-1 ].pAction;
+ m_pData->pActUndoArray->aUndoActions.Remove( --m_pData->pActUndoArray->nCurUndoAction );
+ i_guard.markForDeletion( pCurrentAction );
+
+ i_guard.scheduleNotification( &SfxUndoListener::listActionCancelled );
+ return 0;
+ }
+
+ // now that it is finally clear the list action is non-trivial, and does participate in the Undo stack, clear
+ // the redo stack
+ ImplClearRedo( i_guard, IUndoManager::CurrentLevel );
+
+ SfxUndoAction* pCurrentAction= m_pData->pActUndoArray->aUndoActions[ m_pData->pActUndoArray->nCurUndoAction-1 ].pAction;
+ SfxListUndoAction* pListAction = dynamic_cast< SfxListUndoAction * >( pCurrentAction );
+ ENSURE_OR_RETURN( pListAction, "SfxUndoManager::ImplLeaveListAction: list action expected at this position!", nListActionElements );
+
+ if ( i_merge )
+ {
+ // merge the list action with its predecessor on the same level
+ OSL_ENSURE( m_pData->pActUndoArray->nCurUndoAction > 1,
+ "SfxUndoManager::ImplLeaveListAction: cannot merge the list action if there's no other action on the same level - check this beforehand!" );
+ if ( m_pData->pActUndoArray->nCurUndoAction > 1 )
{
- USHORT n;
- for( n = 0; n < pList->aUndoActions.Count(); n++ )
+ SfxUndoAction* pPreviousAction = m_pData->pActUndoArray->aUndoActions[ m_pData->pActUndoArray->nCurUndoAction - 2 ].pAction;
+ m_pData->pActUndoArray->aUndoActions.Remove( m_pData->pActUndoArray->nCurUndoAction - 2 );
+ --m_pData->pActUndoArray->nCurUndoAction;
+ pListAction->aUndoActions.Insert( pPreviousAction, 0 );
+ ++pListAction->nCurUndoAction;
+
+ pListAction->SetComment( pPreviousAction->GetComment() );
+ }
+ }
+
+ // if the undo array has no comment, try to get it from its children
+ if ( pListAction->GetComment().Len() == 0 )
+ {
+ for( size_t n = 0; n < pListAction->aUndoActions.size(); n++ )
+ {
+ if( pListAction->aUndoActions[n].pAction->GetComment().Len() )
{
- if( pList->aUndoActions[n]->GetComment().Len() )
- {
- pList->SetComment( pList->aUndoActions[n]->GetComment() );
- break;
- }
+ pListAction->SetComment( pListAction->aUndoActions[n].pAction->GetComment() );
+ break;
}
}
}
+
+ // notify listeners
+ i_guard.scheduleNotification( &SfxUndoListener::listActionLeft, pListAction->GetComment() );
+
+ // outta here
+ return nListActionElements;
}
//------------------------------------------------------------------------
+UndoStackMark SfxUndoManager::MarkTopUndoAction()
+{
+ UndoManagerGuard aGuard( *m_pData );
+
+ OSL_ENSURE( !IsInListAction(),
+ "SfxUndoManager::MarkTopUndoAction(): suspicious call!" );
+ OSL_ENSURE((m_pData->mnMarks + 1) < (m_pData->mnEmptyMark - 1),
+ "SfxUndoManager::MarkTopUndoAction(): mark overflow!");
+
+ size_t const nActionPos = m_pData->pUndoArray->nCurUndoAction;
+ if (0 == nActionPos)
+ {
+ --m_pData->mnEmptyMark;
+ return m_pData->mnEmptyMark;
+ }
-USHORT SfxListUndoAction::GetId() const
+ m_pData->pUndoArray->aUndoActions[ nActionPos-1 ].aMarks.push_back(
+ ++m_pData->mnMarks );
+ return m_pData->mnMarks;
+}
+
+//------------------------------------------------------------------------
+void SfxUndoManager::RemoveMark( UndoStackMark const i_mark )
+{
+ UndoManagerGuard aGuard( *m_pData );
+
+ if ((m_pData->mnEmptyMark < i_mark) || (MARK_INVALID == i_mark))
+ {
+ return; // nothing to remove
+ }
+ else if (i_mark == m_pData->mnEmptyMark)
+ {
+ --m_pData->mnEmptyMark; // never returned from MarkTop => invalid
+ return;
+ }
+
+ for ( size_t i=0; i<m_pData->pUndoArray->aUndoActions.size(); ++i )
+ {
+ MarkedUndoAction& rAction = m_pData->pUndoArray->aUndoActions[i];
+ for ( ::std::vector< UndoStackMark >::iterator markPos = rAction.aMarks.begin();
+ markPos != rAction.aMarks.end();
+ ++markPos
+ )
+ {
+ if ( *markPos == i_mark )
+ {
+ rAction.aMarks.erase( markPos );
+ return;
+ }
+ }
+ }
+ OSL_ENSURE( false, "SfxUndoManager::RemoveMark: mark not found!" );
+ // TODO: this might be too offensive. There are situations where we implicitly remove marks
+ // without our clients, in particular the client which created the mark, having a chance to know
+ // about this.
+}
+
+//------------------------------------------------------------------------
+bool SfxUndoManager::HasTopUndoActionMark( UndoStackMark const i_mark )
+{
+ UndoManagerGuard aGuard( *m_pData );
+
+ size_t nActionPos = m_pData->pUndoArray->nCurUndoAction;
+ if ( nActionPos == 0 )
+ {
+ return (i_mark == m_pData->mnEmptyMark);
+ }
+
+ const MarkedUndoAction& rAction =
+ m_pData->pUndoArray->aUndoActions[ nActionPos-1 ];
+ for ( ::std::vector< UndoStackMark >::const_iterator markPos = rAction.aMarks.begin();
+ markPos != rAction.aMarks.end();
+ ++markPos
+ )
+ {
+ if ( *markPos == i_mark )
+ return true;
+ }
+
+ return false;
+}
+
+//------------------------------------------------------------------------
+
+void SfxUndoManager::RemoveOldestUndoActions( size_t const i_count )
+{
+ UndoManagerGuard aGuard( *m_pData );
+
+ size_t nActionsToRemove = i_count;
+ while ( nActionsToRemove )
+ {
+ SfxUndoAction* pActionToRemove = m_pData->pUndoArray->aUndoActions[0].pAction;
+
+ if ( IsInListAction() && ( m_pData->pUndoArray->nCurUndoAction == 1 ) )
+ {
+ OSL_ENSURE( false, "SfxUndoManager::RemoveOldestUndoActions: cannot remove a not-yet-closed list action!" );
+ return;
+ }
+
+ aGuard.markForDeletion( pActionToRemove );
+ m_pData->pUndoArray->aUndoActions.Remove( 0 );
+ --m_pData->pUndoArray->nCurUndoAction;
+ --nActionsToRemove;
+ }
+}
+
+//------------------------------------------------------------------------
+
+sal_uInt16 SfxListUndoAction::GetId() const
{
return nId;
}
@@ -654,7 +1318,7 @@ SfxListUndoAction::SfxListUndoAction
(
const XubString &rComment,
const XubString rRepeatComment,
- USHORT Id,
+ sal_uInt16 Id,
SfxUndoArray *pFather
)
: nId(Id), aComment(rComment), aRepeatComment(rRepeatComment)
@@ -667,8 +1331,17 @@ SfxListUndoAction::SfxListUndoAction
void SfxListUndoAction::Undo()
{
- for(INT16 i=nCurUndoAction-1;i>=0;i--)
- aUndoActions[i]->Undo();
+ for(size_t i=nCurUndoAction;i>0;)
+ aUndoActions[--i].pAction->Undo();
+ nCurUndoAction=0;
+}
+
+//------------------------------------------------------------------------
+
+void SfxListUndoAction::UndoWithContext( SfxUndoContext& i_context )
+{
+ for(size_t i=nCurUndoAction;i>0;)
+ aUndoActions[--i].pAction->UndoWithContext( i_context );
nCurUndoAction=0;
}
@@ -676,39 +1349,48 @@ void SfxListUndoAction::Undo()
void SfxListUndoAction::Redo()
{
- for(USHORT i=nCurUndoAction;i<aUndoActions.Count();i++)
- aUndoActions[i]->Redo();
- nCurUndoAction = aUndoActions.Count();
+ for(size_t i=nCurUndoAction;i<aUndoActions.size();i++)
+ aUndoActions[i].pAction->Redo();
+ nCurUndoAction = aUndoActions.size();
+}
+
+//------------------------------------------------------------------------
+
+void SfxListUndoAction::RedoWithContext( SfxUndoContext& i_context )
+{
+ for(size_t i=nCurUndoAction;i<aUndoActions.size();i++)
+ aUndoActions[i].pAction->RedoWithContext( i_context );
+ nCurUndoAction = aUndoActions.size();
}
//------------------------------------------------------------------------
void SfxListUndoAction::Repeat(SfxRepeatTarget&rTarget)
{
- for(USHORT i=0;i<nCurUndoAction;i++)
- aUndoActions[i]->Repeat(rTarget);
+ for(size_t i=0;i<nCurUndoAction;i++)
+ aUndoActions[i].pAction->Repeat(rTarget);
}
//------------------------------------------------------------------------
-BOOL SfxListUndoAction::CanRepeat(SfxRepeatTarget&r) const
+sal_Bool SfxListUndoAction::CanRepeat(SfxRepeatTarget&r) const
{
- for(USHORT i=0;i<nCurUndoAction;i++)
- if(!aUndoActions[i]->CanRepeat(r))
- return FALSE;
- return TRUE;
+ for(size_t i=0;i<nCurUndoAction;i++)
+ if(!aUndoActions[i].pAction->CanRepeat(r))
+ return sal_False;
+ return sal_True;
}
//------------------------------------------------------------------------
-BOOL SfxListUndoAction::Merge( SfxUndoAction *pNextAction )
+sal_Bool SfxListUndoAction::Merge( SfxUndoAction *pNextAction )
{
- return aUndoActions.Count() && aUndoActions[aUndoActions.Count()-1]->Merge( pNextAction );
+ return !aUndoActions.empty() && aUndoActions[aUndoActions.size()-1].pAction->Merge( pNextAction );
}
//------------------------------------------------------------------------
-SfxLinkUndoAction::SfxLinkUndoAction(SfxUndoManager *pManager)
+SfxLinkUndoAction::SfxLinkUndoAction(::svl::IUndoManager *pManager)
/* [Beschreibung]
Richtet eine LinkAction ein, die auf einen weiteren UndoManager zeigt.
@@ -718,10 +1400,15 @@ SfxLinkUndoAction::SfxLinkUndoAction(SfxUndoManager *pManager)
{
pUndoManager = pManager;
+ SfxUndoManager* pUndoManagerImplementation = dynamic_cast< SfxUndoManager* >( pManager );
+ ENSURE_OR_THROW( pUndoManagerImplementation != NULL, "unsupported undo manager implementation!" );
+ // yes, this cast is dirty. But reaching into the the SfxUndoManager's implementation,
+ // directly accessing its internal stack, and tampering with an action on that stack
+ // is dirty, too.
if ( pManager->GetMaxUndoActionCount() )
{
- USHORT nPos = pManager->GetUndoActionCount()-1;
- pAction = pManager->pActUndoArray->aUndoActions[nPos];
+ size_t nPos = pManager->GetUndoActionCount()-1;
+ pAction = pUndoManagerImplementation->m_pData->pActUndoArray->aUndoActions[nPos].pAction;
pAction->SetLinked();
}
else
@@ -733,7 +1420,7 @@ SfxLinkUndoAction::SfxLinkUndoAction(SfxUndoManager *pManager)
void SfxLinkUndoAction::Undo()
{
if ( pAction )
- pUndoManager->Undo(1);
+ pUndoManager->Undo();
}
//------------------------------------------------------------------------
@@ -741,15 +1428,15 @@ void SfxLinkUndoAction::Undo()
void SfxLinkUndoAction::Redo()
{
if ( pAction )
- pUndoManager->Redo(1);
+ pUndoManager->Redo();
}
//------------------------------------------------------------------------
-BOOL SfxLinkUndoAction::CanRepeat(SfxRepeatTarget& r) const
+sal_Bool SfxLinkUndoAction::CanRepeat(SfxRepeatTarget& r) const
{
- return pAction && pUndoManager->CanRepeat(r,*pAction);
+ return pAction && pAction->CanRepeat(r);
}
@@ -758,8 +1445,8 @@ BOOL SfxLinkUndoAction::CanRepeat(SfxRepeatTarget& r) const
void SfxLinkUndoAction::Repeat(SfxRepeatTarget&r)
{
- if ( pAction )
- pUndoManager->Repeat(r,*pAction);
+ if ( pAction && pAction->CanRepeat( r ) )
+ pAction->Repeat( r );
}
@@ -789,7 +1476,7 @@ XubString SfxLinkUndoAction::GetRepeatComment(SfxRepeatTarget&r) const
SfxLinkUndoAction::~SfxLinkUndoAction()
{
if( pAction )
- pAction->SetLinked( FALSE );
+ pAction->SetLinked( sal_False );
}
@@ -797,20 +1484,16 @@ SfxLinkUndoAction::~SfxLinkUndoAction()
SfxUndoArray::~SfxUndoArray()
{
- while ( aUndoActions.Count() )
+ while ( !aUndoActions.empty() )
{
- SfxUndoAction *pAction =
- aUndoActions[ aUndoActions.Count() - 1 ];
- aUndoActions.Remove( aUndoActions.Count() - 1 );
+ SfxUndoAction *pAction = aUndoActions[ aUndoActions.size() - 1 ].pAction;
+ aUndoActions.Remove( aUndoActions.size() - 1 );
delete pAction;
}
}
-USHORT SfxLinkUndoAction::GetId() const
+sal_uInt16 SfxLinkUndoAction::GetId() const
{
return pAction ? pAction->GetId() : 0;
}
-
-
-
diff --git a/svl/unx/source/svdde/ddedummy.cxx b/svl/unx/source/svdde/ddedummy.cxx
index 4f92c80e36f2..e769ee73b9cb 100644
--- a/svl/unx/source/svdde/ddedummy.cxx
+++ b/svl/unx/source/svdde/ddedummy.cxx
@@ -42,7 +42,7 @@ DdeData::DdeData( const DdeData& )
{
}
-DdeData::DdeData( const void*, long, ULONG)
+DdeData::DdeData( const void*, long, sal_uLong)
{
}
@@ -50,11 +50,11 @@ DdeData::~DdeData( void )
{
}
-void DdeData::SetFormat( ULONG )
+void DdeData::SetFormat( sal_uLong )
{
}
-ULONG DdeData::GetFormat() const
+sal_uLong DdeData::GetFormat() const
{
return 0L;
}
@@ -111,7 +111,7 @@ void DdeTransaction::Execute(void)
{
}
-void DdeTransaction::Done( BOOL )
+void DdeTransaction::Done( sal_Bool )
{
}
@@ -168,34 +168,34 @@ void DdeTopic::RemoveItem( const DdeItem& )
{
}
-DdeData* DdeTopic::Get( ULONG )
+DdeData* DdeTopic::Get( sal_uLong )
{
return NULL;
}
-BOOL DdeTopic::MakeItem( const String& )
+sal_Bool DdeTopic::MakeItem( const String& )
{
- return FALSE;
+ return sal_False;
}
-BOOL DdeTopic::StartAdviseLoop()
+sal_Bool DdeTopic::StartAdviseLoop()
{
- return FALSE;
+ return sal_False;
}
-BOOL DdeTopic::StopAdviseLoop()
+sal_Bool DdeTopic::StopAdviseLoop()
{
- return FALSE;
+ return sal_False;
}
-BOOL DdeTopic::Execute( const String* )
+sal_Bool DdeTopic::Execute( const String* )
{
- return FALSE;
+ return sal_False;
}
-BOOL DdeTopic::Put( const DdeData* )
+sal_Bool DdeTopic::Put( const DdeData* )
{
- return FALSE;
+ return sal_False;
}
const String& DdeTopic::GetName() const
@@ -228,17 +228,17 @@ String DdeService::SysTopicGet(const String& rString) {
return rString;
}
-BOOL DdeService::SysTopicExecute(const String*) {
- return FALSE;
+sal_Bool DdeService::SysTopicExecute(const String*) {
+ return sal_False;
}
DdeService::~DdeService()
{
}
-BOOL DdeService::IsBusy()
+sal_Bool DdeService::IsBusy()
{
- return FALSE;
+ return sal_False;
}
String DdeService::GetHelp()
@@ -246,7 +246,7 @@ String DdeService::GetHelp()
return String::EmptyString();
}
-void DdeService::AddFormat( ULONG )
+void DdeService::AddFormat( sal_uLong )
{
}
@@ -258,9 +258,9 @@ void DdeService::RemoveTopic( const DdeTopic& )
{
}
-BOOL DdeService::MakeTopic( const String& )
+sal_Bool DdeService::MakeTopic( const String& )
{
- return FALSE;
+ return sal_False;
}
const String& DdeService::GetName() const
@@ -305,17 +305,17 @@ DdeItem( rItem )
{
}
-DdeData* DdeGetPutItem::Get( ULONG )
+DdeData* DdeGetPutItem::Get( sal_uLong )
{
return NULL;
}
-BOOL DdeGetPutItem::Put( const DdeData* )
+sal_Bool DdeGetPutItem::Put( const DdeData* )
{
- return FALSE;
+ return sal_False;
}
-void DdeGetPutItem::AdviseLoop( BOOL )
+void DdeGetPutItem::AdviseLoop( sal_Bool )
{
}
diff --git a/svtools/AllLangResTarget_productregistration.mk b/svtools/AllLangResTarget_productregistration.mk
index af510d338c6e..e6f2fd093f07 100644
--- a/svtools/AllLangResTarget_productregistration.mk
+++ b/svtools/AllLangResTarget_productregistration.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2009 by Sun Microsystems, Inc.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -14,12 +14,12 @@
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
+# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
diff --git a/svtools/AllLangResTarget_svt.mk b/svtools/AllLangResTarget_svt.mk
index c41bc9d6b29e..6c13a6fcdb3f 100644
--- a/svtools/AllLangResTarget_svt.mk
+++ b/svtools/AllLangResTarget_svt.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2009 by Sun Microsystems, Inc.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -14,12 +14,12 @@
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
+# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
diff --git a/svtools/Executable_bmp.mk b/svtools/Executable_bmp.mk
index 67b21600e523..115665ed0d18 100644
--- a/svtools/Executable_bmp.mk
+++ b/svtools/Executable_bmp.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2009 by Sun Microsystems, Inc.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -14,12 +14,12 @@
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
+# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
@@ -45,6 +45,7 @@ $(eval $(call gb_Executable_add_linked_libs,bmp,\
tl \
vcl \
vos3 \
+ $(gb_STDLIBS) \
))
$(eval $(call gb_Executable_add_exception_objects,bmp,\
@@ -52,35 +53,4 @@ $(eval $(call gb_Executable_add_exception_objects,bmp,\
svtools/bmpmaker/bmpcore \
))
-ifeq ($(OS),WNT)
-ifneq ($(USE_MINGW),)
-$(eval $(call gb_Executable_add_linked_libs,bmp,\
- mingwthrd \
- $(gb_MINGW_LIBSTDCPP) \
- mingw32 \
- $(gb_MINGW_LIBGCC) \
- uwinapi \
- moldname \
- mingwex \
- kernel32 \
- msvcrt \
- user32 \
-))
-else
-$(eval $(call gb_Executable_add_linked_libs,bmp,\
- kernel32 \
- msvcrt \
- oldnames \
- user32 \
- uwinapi \
-))
-endif
-endif
-
-ifeq ($(OS),LINUX)
-$(eval $(call gb_Executable_add_linked_libs,bmp,\
- dl \
- pthread \
-))
-endif
# vim: set noet sw=4 ts=4:
diff --git a/svtools/Executable_bmpsum.mk b/svtools/Executable_bmpsum.mk
index 6b2c0466f0ec..37fa508bdda2 100644
--- a/svtools/Executable_bmpsum.mk
+++ b/svtools/Executable_bmpsum.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2009 by Sun Microsystems, Inc.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -14,12 +14,12 @@
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
+# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
@@ -42,41 +42,11 @@ $(eval $(call gb_Executable_add_linked_libs,bmpsum,\
tl \
vcl \
vos3 \
+ $(gb_STDLIBS) \
))
$(eval $(call gb_Executable_add_exception_objects,bmpsum,\
svtools/bmpmaker/bmpsum \
))
-ifeq ($(OS),WNT)
-ifneq ($(USE_MINGW),)
-$(eval $(call gb_Executable_add_linked_libs,bmpsum,\
- mingwthrd \
- $(gb_MINGW_LIBSTDCPP) \
- mingw32 \
- $(gb_MINGW_LIBGCC) \
- uwinapi \
- moldname \
- mingwex \
- kernel32 \
- msvcrt \
- user32 \
-))
-else
-$(eval $(call gb_Executable_add_linked_libs,bmpsum,\
- kernel32 \
- msvcrt \
- oldnames \
- user32 \
- uwinapi \
-))
-endif
-endif
-
-ifeq ($(OS),LINUX)
-$(eval $(call gb_Executable_add_linked_libs,bmpsum,\
- dl \
- pthread \
-))
-endif
# vim: set noet sw=4 ts=4:
diff --git a/svtools/Executable_g2g.mk b/svtools/Executable_g2g.mk
index d6b96970eacc..d55b37abd565 100644
--- a/svtools/Executable_g2g.mk
+++ b/svtools/Executable_g2g.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2009 by Sun Microsystems, Inc.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -14,12 +14,12 @@
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
+# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
@@ -44,40 +44,11 @@ $(eval $(call gb_Executable_add_linked_libs,g2g,\
tl \
vcl \
vos3 \
+ $(gb_STDLIBS) \
))
$(eval $(call gb_Executable_add_exception_objects,g2g,\
svtools/bmpmaker/g2g \
))
-ifeq ($(OS),WNT)
-ifneq ($(USE_MINGW),)
-$(eval $(call gb_Executable_add_linked_libs,g2g,\
- mingwthrd \
- $(gb_MINGW_LIBSTDCPP) \
- mingw32 \
- $(gb_MINGW_LIBGCC) \
- uwinapi \
- moldname \
- mingwex \
- kernel32 \
- msvcrt \
- user32 \
-))
-else
-$(eval $(call gb_Executable_add_linked_libs,g2g,\
- kernel32 \
- msvcrt \
- oldnames \
- user32 \
- uwinapi \
-))
-endif
-endif
-ifeq ($(OS),LINUX)
-$(eval $(call gb_Executable_add_linked_libs,g2g,\
- pthread \
- dl \
- X11 \
-))
-endif
+
# vim: set noet sw=4 ts=4:
diff --git a/comphelper/source/compare/makefile.mk b/svtools/JunitTest_svtools_unoapi.mk
index 156701d1d969..baaefc84c5be 100644..100755
--- a/comphelper/source/compare/makefile.mk
+++ b/svtools/JunitTest_svtools_unoapi.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -25,23 +25,29 @@
#
#*************************************************************************
-PRJ=..$/..
-PRJINC=..$/..$/inc
-PRJNAME=comphelper
-TARGET=compare
+$(eval $(call gb_JunitTest_JunitTest,svtools_unoapi))
-ENABLE_EXCEPTIONS=TRUE
+$(eval $(call gb_JunitTest_set_defs,svtools_unoapi,\
+ $$(DEFS) \
+ -Dorg.openoffice.test.arg.sce=$(SRCDIR)/svtools/qa/unoapi/svtools.sce \
+ -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/svtools/qa/unoapi/knownissues.xcl \
+ -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/svtools/qa/unoapi/testdocuments \
+))
-# --- Settings ----------------------------------
+$(eval $(call gb_JunitTest_add_jars,svtools_unoapi,\
+ $(OUTDIR)/bin/OOoRunner.jar \
+ $(OUTDIR)/bin/ridl.jar \
+ $(OUTDIR)/bin/test.jar \
+ $(OUTDIR)/bin/unoil.jar \
+ $(OUTDIR)/bin/jurt.jar \
+))
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
+$(eval $(call gb_JunitTest_add_sourcefiles,svtools_unoapi,\
+ svtools/qa/unoapi/Test \
+))
-# --- Files -------------------------------------
-
-SLOFILES=$(SLO)$/AnyCompareFactory.obj
-
-# --- Targets ----------------------------------
-
-.INCLUDE : target.mk
+$(eval $(call gb_JunitTest_add_classes,svtools_unoapi,\
+ org.openoffice.svtools.qa.unoapi.Test \
+))
+# vim: set noet sw=4 ts=4:
diff --git a/svtools/Library_hatchwindowfactory.mk b/svtools/Library_hatchwindowfactory.mk
index 3e96d22588c8..b92313e446d7 100644
--- a/svtools/Library_hatchwindowfactory.mk
+++ b/svtools/Library_hatchwindowfactory.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2009 by Sun Microsystems, Inc.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -14,12 +14,12 @@
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
+# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
@@ -47,6 +47,7 @@ $(eval $(call gb_Library_add_linked_libs,hatchwindowfactory,\
tk \
tl \
vcl \
+ $(gb_STDLIBS) \
))
$(eval $(call gb_Library_add_exception_objects,hatchwindowfactory,\
@@ -56,36 +57,4 @@ $(eval $(call gb_Library_add_exception_objects,hatchwindowfactory,\
svtools/source/hatchwindow/ipwin \
))
-ifeq ($(OS),LINUX)
-$(eval $(call gb_Library_add_linked_libs,hatchwindowfactory,\
- dl \
- m \
- pthread \
-))
-endif
-ifeq ($(OS),WNT)
-ifneq ($(USE_MINGW),)
-$(eval $(call gb_Library_add_linked_libs,hatchwindowfactory,\
- mingwthrd \
- $(gb_MINGW_LIBSTDCPP) \
- mingw32 \
- $(gb_MINGW_LIBGCC) \
- uwinapi \
- moldname \
- mingwex \
- kernel32 \
- msvcrt \
- user32 \
-))
-else
-$(eval $(call gb_Library_add_linked_libs,hatchwindowfactory,\
- kernel32 \
- msvcrt \
- oldnames \
- stl \
- user32 \
- uwinapi \
-))
-endif
-endif
# vim: set noet sw=4 ts=4:
diff --git a/svtools/Library_productregistration.mk b/svtools/Library_productregistration.mk
index 5df44f631097..6e76b1d6c9db 100644
--- a/svtools/Library_productregistration.mk
+++ b/svtools/Library_productregistration.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2009 by Sun Microsystems, Inc.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -14,12 +14,12 @@
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
+# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
@@ -50,6 +50,7 @@ $(eval $(call gb_Library_add_linked_libs,productregistration,\
tl \
utl \
vcl \
+ $(gb_STDLIBS) \
))
$(eval $(call gb_Library_add_exception_objects,productregistration,\
@@ -57,36 +58,4 @@ $(eval $(call gb_Library_add_exception_objects,productregistration,\
svtools/source/productregistration/registrationdlg \
))
-ifeq ($(OS),LINUX)
-$(eval $(call gb_Library_add_linked_libs,productregistration,\
- dl \
- m \
- pthread \
-))
-endif
-
-ifeq ($(OS),WNT)
-ifneq ($(USE_MINGW),)
-$(eval $(call gb_Library_add_linked_libs,productregistration,\
- mingwthrd \
- $(gb_MINGW_LIBSTDCPP) \
- mingw32 \
- $(gb_MINGW_LIBGCC) \
- uwinapi \
- moldname \
- mingwex \
- kernel32 \
- msvcrt \
- user32 \
-))
-else
-$(eval $(call gb_Library_add_linked_libs,productregistration,\
- kernel32 \
- msvcrt \
- oldnames \
- user32 \
- uwinapi \
-))
-endif
-endif
# vim: set noet sw=4 ts=4:
diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk
index fb0fae66ca12..01bc05ebaeca 100644
--- a/svtools/Library_svt.mk
+++ b/svtools/Library_svt.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2009 by Sun Microsystems, Inc.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -14,12 +14,12 @@
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
+# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
@@ -70,6 +70,7 @@ $(eval $(call gb_Library_add_linked_libs,svt,\
utl \
vcl \
vos3 \
+ $(gb_STDLIBS) \
))
ifeq ($(SYSTEM_JPEG),YES)
@@ -249,6 +250,8 @@ $(eval $(call gb_Library_add_exception_objects,svt,\
svtools/source/table/tablecontrol \
svtools/source/table/tablecontrol_impl \
svtools/source/table/tabledatawindow \
+ svtools/source/table/mousefunction \
+ svtools/source/table/cellvalueconversion \
svtools/source/table/tablegeometry \
svtools/source/toolpanel/drawerlayouter \
svtools/source/toolpanel/dummypanel \
@@ -277,6 +280,7 @@ $(eval $(call gb_Library_add_exception_objects,svt,\
svtools/source/uno/toolboxcontroller \
svtools/source/uno/treecontrolpeer \
svtools/source/uno/unocontroltablemodel \
+ svtools/source/uno/unogridcolumnfacade \
svtools/source/uno/unoevent \
svtools/source/uno/unoiface \
svtools/source/uno/unoimap \
@@ -290,46 +294,14 @@ $(eval $(call gb_Library_add_cobjects,svt,\
svtools/source/filter.vcl/jpeg/jpegc \
))
-ifeq ($(OS),LINUX)
-$(eval $(call gb_Library_add_linked_libs,svt,\
- dl \
- m \
- pthread \
-))
-endif
-
ifeq ($(OS),WNT)
-ifneq ($(USE_MINGW),)
-$(eval $(call gb_Library_add_linked_libs,svt,\
- mingwthrd \
- $(gb_MINGW_LIBSTDCPP) \
- mingw32 \
- $(gb_MINGW_LIBGCC) \
- uwinapi \
- moldname \
- mingwex \
- advapi32 \
- gdi32 \
- kernel32 \
- msvcrt \
- ole32 \
- oleaut32 \
- user32 \
- uuid \
-))
-else
$(eval $(call gb_Library_add_linked_libs,svt,\
advapi32 \
gdi32 \
- kernel32 \
- msvcrt \
- oldnames \
ole32 \
oleaut32 \
user32 \
uuid \
- uwinapi \
))
endif
-endif
# vim: set noet sw=4 ts=4:
diff --git a/svtools/Module_svtools.mk b/svtools/Module_svtools.mk
index bc760add6d26..0b669d9dee1b 100644
--- a/svtools/Module_svtools.mk
+++ b/svtools/Module_svtools.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2009 by Sun Microsystems, Inc.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -14,12 +14,12 @@
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
+# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
@@ -39,6 +39,10 @@ $(eval $(call gb_Module_add_targets,svtools,\
Package_inc \
))
+$(eval $(call gb_Module_add_subsequentcheck_targets,svtools,\
+ JunitTest_svtools_unoapi \
+))
+
#todo: javapatchres
#todo: jpeg on mac in svtools/util/makefile.mk
#todo: deliver errtxt.src as ehdl.srs
diff --git a/svtools/Package_inc.mk b/svtools/Package_inc.mk
index f6a48e845679..4162e8f53fea 100644
--- a/svtools/Package_inc.mk
+++ b/svtools/Package_inc.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2009 by Sun Microsystems, Inc.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -14,12 +14,12 @@
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
+# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
@@ -145,15 +145,15 @@ $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svxbox.hxx,svtools/svx
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/sychconv.hxx,svtools/sychconv.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/syntaxhighlight.hxx,svtools/syntaxhighlight.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/tabbar.hxx,svtools/tabbar.hxx))
-$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/abstracttablecontrol.hxx,svtools/table/abstracttablecontrol.hxx))
+$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/tablecontrolinterface.hxx,svtools/table/tablecontrolinterface.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/defaultinputhandler.hxx,svtools/table/defaultinputhandler.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/gridtablerenderer.hxx,svtools/table/gridtablerenderer.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/tablecontrol.hxx,svtools/table/tablecontrol.hxx))
-$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/tabledatawindow.hxx,svtools/table/tabledatawindow.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/tableinputhandler.hxx,svtools/table/tableinputhandler.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/tablemodel.hxx,svtools/table/tablemodel.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/tablerenderer.hxx,svtools/table/tablerenderer.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/tabletypes.hxx,svtools/table/tabletypes.hxx))
+$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/tablesort.hxx,svtools/table/tablesort.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/taskbar.hxx,svtools/taskbar.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/templatefoldercache.hxx,svtools/templatefoldercache.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/templdlg.hxx,svtools/templdlg.hxx))
diff --git a/svtools/bmpmaker/bmp.cxx b/svtools/bmpmaker/bmp.cxx
index 76a4d3ef4043..43f285c1b422 100644
--- a/svtools/bmpmaker/bmp.cxx
+++ b/svtools/bmpmaker/bmp.cxx
@@ -54,19 +54,19 @@ class BmpApp : public BmpCreator
private:
String aOutputFileName;
- BYTE cExitCode;
+ sal_uInt8 cExitCode;
- BOOL GetCommandOption( const ::std::vector< String >& rArgs, const String& rSwitch, String& rSwitchParam );
- BOOL GetCommandOptions( const ::std::vector< String >& rArgs, const String& rSwitch, ::std::vector< String >& rSwitchParams );
+ sal_Bool GetCommandOption( const ::std::vector< String >& rArgs, const String& rSwitch, String& rSwitchParam );
+ sal_Bool GetCommandOptions( const ::std::vector< String >& rArgs, const String& rSwitch, ::std::vector< String >& rSwitchParams );
- void SetExitCode( BYTE cExit )
+ void SetExitCode( sal_uInt8 cExit )
{
if( ( EXIT_NOERROR == cExitCode ) || ( cExit != EXIT_NOERROR ) )
cExitCode = cExit;
}
void ShowUsage();
- virtual void Message( const String& rText, BYTE cExitCode );
+ virtual void Message( const String& rText, sal_uInt8 cExitCode );
public:
@@ -90,9 +90,9 @@ BmpApp::~BmpApp()
// -----------------------------------------------------------------------
-BOOL BmpApp::GetCommandOption( const ::std::vector< String >& rArgs, const String& rSwitch, String& rParam )
+sal_Bool BmpApp::GetCommandOption( const ::std::vector< String >& rArgs, const String& rSwitch, String& rParam )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
for( int i = 0, nCount = rArgs.size(); ( i < nCount ) && !bRet; i++ )
{
@@ -104,7 +104,7 @@ BOOL BmpApp::GetCommandOption( const ::std::vector< String >& rArgs, const Strin
if( aTestStr.CompareIgnoreCaseToAscii( rArgs[ i ] ) == COMPARE_EQUAL )
{
- bRet = TRUE;
+ bRet = sal_True;
if( i < ( nCount - 1 ) )
rParam = rArgs[ i + 1 ];
@@ -122,9 +122,9 @@ BOOL BmpApp::GetCommandOption( const ::std::vector< String >& rArgs, const Strin
// -----------------------------------------------------------------------
-BOOL BmpApp::GetCommandOptions( const ::std::vector< String >& rArgs, const String& rSwitch, ::std::vector< String >& rParams )
+sal_Bool BmpApp::GetCommandOptions( const ::std::vector< String >& rArgs, const String& rSwitch, ::std::vector< String >& rParams )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
for( int i = 0, nCount = rArgs.size(); ( i < nCount ); i++ )
{
@@ -154,7 +154,7 @@ BOOL BmpApp::GetCommandOptions( const ::std::vector< String >& rArgs, const Stri
// -----------------------------------------------------------------------
-void BmpApp::Message( const String& rText, BYTE cExit )
+void BmpApp::Message( const String& rText, sal_uInt8 cExit )
{
if( EXIT_NOERROR != cExit )
SetExitCode( cExit );
@@ -188,7 +188,7 @@ int BmpApp::Start( const ::std::vector< String >& rArgs )
if( rArgs.size() >= 6 )
{
LangInfo aLangInfo;
- USHORT nCurCmd = 0;
+ sal_uInt16 nCurCmd = 0;
const String aSrsName( rArgs[ nCurCmd++ ] );
::std::vector< String > aInDirVector;
ByteString aLangDir;
diff --git a/svtools/bmpmaker/bmpcore.cxx b/svtools/bmpmaker/bmpcore.cxx
index 9e134c06a670..ed3ae80b2788 100644
--- a/svtools/bmpmaker/bmpcore.cxx
+++ b/svtools/bmpmaker/bmpcore.cxx
@@ -72,7 +72,7 @@ BmpCreator::~BmpCreator()
// -----------------------------------------------------------------------------
-void BmpCreator::Message( const String&, BYTE )
+void BmpCreator::Message( const String&, sal_uInt8 )
{
}
@@ -329,7 +329,7 @@ void BmpCreator::Create( const String& rSRSName,
{
DirEntry aFileName( ImplGetSystemFileName( rSRSName ) ), aOutDir( ImplGetSystemFileName( rOutName ) );
::std::vector< DirEntry > aInDirs;
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
aFileName.ToAbs();
aOutDir.ToAbs();
@@ -361,7 +361,7 @@ void BmpCreator::Create( const String& rSRSName,
{
String aText;
ByteString aByteText;
- BOOL bLangDep = FALSE;
+ sal_Bool bLangDep = sal_False;
do
{
@@ -389,7 +389,7 @@ void BmpCreator::Create( const String& rSRSName,
aByteText.Search( '[' ) != STRING_NOTFOUND &&
aByteText.Search( ']' ) != STRING_NOTFOUND )
{
- bLangDep = TRUE;
+ bLangDep = sal_True;
}
if (!pSRS->ReadLine(aByteText))
@@ -401,13 +401,13 @@ void BmpCreator::Create( const String& rSRSName,
// if image list is not language dependent, don't do anything for languages except german
if( aText.Len() )
{
- bDone = TRUE;
+ bDone = sal_True;
ImplCreate( aInDirs, aOutDir, aName, rLang );
}
/* else if( ( rLang.mnLangNum != 49 ) && !bLangDep )
{
Message( String( RTL_CONSTASCII_USTRINGPARAM( "INFO: ImageList is not language dependent! Nothing to do for this language." ) ) );
- bDone = TRUE;
+ bDone = sal_True;
}*/
}
while ( aText.Len() );
diff --git a/svtools/bmpmaker/bmpcore.hxx b/svtools/bmpmaker/bmpcore.hxx
index ece4fa09cf78..ee836cc4a5e5 100644
--- a/svtools/bmpmaker/bmpcore.hxx
+++ b/svtools/bmpmaker/bmpcore.hxx
@@ -55,7 +55,7 @@
struct LangInfo
{
char maLangDir[ 257 ];
- USHORT mnLangNum;
+ sal_uInt16 mnLangNum;
};
// --------------
@@ -71,8 +71,8 @@ private:
Size aTotSize;
Point aPos;
SvFileStream* pSRS;
- ULONG nTotCount;
- USHORT nPos;
+ sal_uLong nTotCount;
+ sal_uInt16 nPos;
void ImplCreate( const ::std::vector< DirEntry >& rInDirs,
const DirEntry& rOut,
@@ -81,7 +81,7 @@ private:
protected:
- virtual void Message( const String& rText, BYTE cExitCode = EXIT_NOERROR );
+ virtual void Message( const String& rText, sal_uInt8 cExitCode = EXIT_NOERROR );
public:
diff --git a/svtools/bmpmaker/bmpsum.cxx b/svtools/bmpmaker/bmpsum.cxx
index 7c264e694a12..0ac43ce57148 100644
--- a/svtools/bmpmaker/bmpsum.cxx
+++ b/svtools/bmpmaker/bmpsum.cxx
@@ -58,16 +58,16 @@ private:
sal_uInt32 cExitCode;
- BOOL GetCommandOption( const ::std::vector< String >& rArgs, const String& rSwitch, String& rSwitchParam );
- BOOL GetCommandOptions( const ::std::vector< String >& rArgs, const String& rSwitch, ::std::vector< String >& rSwitchParams );
+ sal_Bool GetCommandOption( const ::std::vector< String >& rArgs, const String& rSwitch, String& rSwitchParam );
+ sal_Bool GetCommandOptions( const ::std::vector< String >& rArgs, const String& rSwitch, ::std::vector< String >& rSwitchParams );
- void SetExitCode( BYTE cExit )
+ void SetExitCode( sal_uInt8 cExit )
{
if( ( EXIT_NOERROR == cExitCode ) || ( cExit != EXIT_NOERROR ) )
cExitCode = cExit;
}
void ShowUsage();
- void Message( const String& rText, BYTE cExitCode );
+ void Message( const String& rText, sal_uInt8 cExitCode );
sal_uInt64 GetCRC( const BitmapEx& rBmpEx );
@@ -96,9 +96,9 @@ BmpSum::~BmpSum()
// -----------------------------------------------------------------------
-BOOL BmpSum::GetCommandOption( const ::std::vector< String >& rArgs, const String& rSwitch, String& rParam )
+sal_Bool BmpSum::GetCommandOption( const ::std::vector< String >& rArgs, const String& rSwitch, String& rParam )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
for( int i = 0, nCount = rArgs.size(); ( i < nCount ) && !bRet; i++ )
{
@@ -110,7 +110,7 @@ BOOL BmpSum::GetCommandOption( const ::std::vector< String >& rArgs, const Strin
if( aTestStr.CompareIgnoreCaseToAscii( rArgs[ i ] ) == COMPARE_EQUAL )
{
- bRet = TRUE;
+ bRet = sal_True;
if( i < ( nCount - 1 ) )
rParam = rArgs[ i + 1 ];
@@ -128,9 +128,9 @@ BOOL BmpSum::GetCommandOption( const ::std::vector< String >& rArgs, const Strin
// -----------------------------------------------------------------------
-BOOL BmpSum::GetCommandOptions( const ::std::vector< String >& rArgs, const String& rSwitch, ::std::vector< String >& rParams )
+sal_Bool BmpSum::GetCommandOptions( const ::std::vector< String >& rArgs, const String& rSwitch, ::std::vector< String >& rParams )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
for( int i = 0, nCount = rArgs.size(); ( i < nCount ); i++ )
{
@@ -160,7 +160,7 @@ BOOL BmpSum::GetCommandOptions( const ::std::vector< String >& rArgs, const Stri
// -----------------------------------------------------------------------
-void BmpSum::Message( const String& rText, BYTE nExitCode )
+void BmpSum::Message( const String& rText, sal_uInt8 nExitCode )
{
if( EXIT_NOERROR != nExitCode )
SetExitCode( nExitCode );
diff --git a/svtools/bmpmaker/g2g.cxx b/svtools/bmpmaker/g2g.cxx
index 6f4ee0f86279..0a308cccda40 100644
--- a/svtools/bmpmaker/g2g.cxx
+++ b/svtools/bmpmaker/g2g.cxx
@@ -56,13 +56,13 @@ class G2GApp
{
private:
- BYTE cExitCode;
+ sal_uInt8 cExitCode;
void ShowUsage();
- BOOL GetCommandOption( const ::std::vector< String >& rArgs, const String& rSwitch, String& rParam );
- void SetExitCode( BYTE cExit ) { if( ( EXIT_NOERROR == cExitCode ) || ( cExit != EXIT_NOERROR ) ) cExitCode = cExit; }
+ sal_Bool GetCommandOption( const ::std::vector< String >& rArgs, const String& rSwitch, String& rParam );
+ void SetExitCode( sal_uInt8 cExit ) { if( ( EXIT_NOERROR == cExitCode ) || ( cExit != EXIT_NOERROR ) ) cExitCode = cExit; }
- virtual void Message( const String& rText, BYTE cExitCode = EXIT_NOERROR );
+ virtual void Message( const String& rText, sal_uInt8 cExitCode = EXIT_NOERROR );
public:
@@ -86,9 +86,9 @@ G2GApp::~G2GApp()
// -----------------------------------------------------------------------
-BOOL G2GApp::GetCommandOption( const ::std::vector< String >& rArgs, const String& rSwitch, String& rParam )
+sal_Bool G2GApp::GetCommandOption( const ::std::vector< String >& rArgs, const String& rSwitch, String& rParam )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
for( int i = 0, nCount = rArgs.size(); ( i < nCount ) && !bRet; i++ )
{
@@ -100,7 +100,7 @@ BOOL G2GApp::GetCommandOption( const ::std::vector< String >& rArgs, const Strin
if( aTestStr.CompareIgnoreCaseToAscii( rArgs[ i ] ) == COMPARE_EQUAL )
{
- bRet = TRUE;
+ bRet = sal_True;
if( i < ( nCount - 1 ) )
rParam = rArgs[ i + 1 ];
@@ -118,7 +118,7 @@ BOOL G2GApp::GetCommandOption( const ::std::vector< String >& rArgs, const Strin
// -----------------------------------------------------------------------
-void G2GApp::Message( const String& rText, BYTE nExitCode )
+void G2GApp::Message( const String& rText, sal_uInt8 nExitCode )
{
if( EXIT_NOERROR != nExitCode )
SetExitCode( nExitCode );
@@ -148,7 +148,7 @@ void G2GApp::ShowUsage()
int G2GApp::Start( const ::std::vector< String >& rArgs )
{
int nCmdCount = rArgs.size();
- USHORT nCurCmd = 0;
+ sal_uInt16 nCurCmd = 0;
cExitCode = EXIT_NOERROR;
@@ -167,7 +167,7 @@ int G2GApp::Start( const ::std::vector< String >& rArgs )
if( aInFile.Len() && aOutFile.Len() && aFilterStr.Len() )
{
- const USHORT nExportFilter = aFilter.GetExportFormatNumberForShortName( aFilterStr );
+ const sal_uInt16 nExportFilter = aFilter.GetExportFormatNumberForShortName( aFilterStr );
if( GRFILTER_FORMAT_NOTFOUND == nExportFilter )
Message( String( RTL_CONSTASCII_USTRINGPARAM( "invalid graphic filter" ) ), EXIT_INVALID_GRAPHICFILTER );
@@ -198,9 +198,9 @@ int G2GApp::Start( const ::std::vector< String >& rArgs )
if( bHex )
{
- const BYTE cTransR = ( LOWERHEXTONUM( aHexStr.GetChar( 0 ) ) << 4 ) | LOWERHEXTONUM( aHexStr.GetChar( 1 ) );
- const BYTE cTransG = ( LOWERHEXTONUM( aHexStr.GetChar( 2 ) ) << 4 ) | LOWERHEXTONUM( aHexStr.GetChar( 3 ) );
- const BYTE cTransB = ( LOWERHEXTONUM( aHexStr.GetChar( 4 ) ) << 4 ) | LOWERHEXTONUM( aHexStr.GetChar( 5 ) );
+ const sal_uInt8 cTransR = ( LOWERHEXTONUM( aHexStr.GetChar( 0 ) ) << 4 ) | LOWERHEXTONUM( aHexStr.GetChar( 1 ) );
+ const sal_uInt8 cTransG = ( LOWERHEXTONUM( aHexStr.GetChar( 2 ) ) << 4 ) | LOWERHEXTONUM( aHexStr.GetChar( 3 ) );
+ const sal_uInt8 cTransB = ( LOWERHEXTONUM( aHexStr.GetChar( 4 ) ) << 4 ) | LOWERHEXTONUM( aHexStr.GetChar( 5 ) );
BitmapEx aBmpEx( aGraphic.GetBitmapEx() );
Bitmap aOldBmp( aBmpEx.GetBitmap() );
diff --git a/svtools/inc/svtools/DocumentInfoPreview.hxx b/svtools/inc/svtools/DocumentInfoPreview.hxx
index ae57b1a68b32..92c9c72b36bc 100644
--- a/svtools/inc/svtools/DocumentInfoPreview.hxx
+++ b/svtools/inc/svtools/DocumentInfoPreview.hxx
@@ -53,7 +53,7 @@ namespace svtools
::com::sun::star::document::XDocumentProperties>& i_xDocProps
,const String& i_rURL);
void InsertEntry( const String& rTitle, const String& rValue );
- void SetAutoScroll(BOOL _bAutoScroll);
+ void SetAutoScroll(sal_Bool _bAutoScroll);
};
}
diff --git a/svtools/inc/svtools/acceleratorexecute.hxx b/svtools/inc/svtools/acceleratorexecute.hxx
index 3ee79e1fca0c..b5e9f99d2c4b 100644
--- a/svtools/inc/svtools/acceleratorexecute.hxx
+++ b/svtools/inc/svtools/acceleratorexecute.hxx
@@ -222,7 +222,7 @@ class SVT_DLLPUBLIC AcceleratorExecute : private TMutexInit
specify the accelerator for execute.
@return [sal_Bool]
- TRUE if this key is configured and match to a command.
+ sal_True if this key is configured and match to a command.
Attention: This state does not mean the success state
of the corresponding execute. Because its done asynchronous!
*/
diff --git a/svtools/inc/svtools/accessiblefactory.hxx b/svtools/inc/svtools/accessiblefactory.hxx
index 9606e93a2fa0..372af4fdca25 100755
--- a/svtools/inc/svtools/accessiblefactory.hxx
+++ b/svtools/inc/svtools/accessiblefactory.hxx
@@ -28,16 +28,12 @@
#ifndef SVTOOLS_ACCESSIBLE_FACTORY_HXX
#define SVTOOLS_ACCESSIBLE_FACTORY_HXX
-#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX
+#include "AccessibleBrowseBoxObjType.hxx"
+#include "accessibletableprovider.hxx"
+
#include <com/sun/star/uno/Reference.hxx>
-#endif
-#ifndef _RTL_REF_HXX
#include <rtl/ref.hxx>
-#endif
-#include "AccessibleBrowseBoxObjType.hxx"
-#include "accessibletableprovider.hxx"
-#include "accessibletable.hxx"
namespace com { namespace sun { namespace star {
namespace accessibility {
@@ -64,6 +60,11 @@ namespace svt
class ToolPanelDeck;
class IToolPanelDeck;
class PanelTabBar;
+ namespace table
+ {
+ class IAccessibleTable;
+ class IAccessibleTableControl;
+ }
/** a function which is able to create a factory for the standard Accessible/Context
components needed for standard toolkit controls
diff --git a/svtools/inc/svtools/accessibletable.hxx b/svtools/inc/svtools/accessibletable.hxx
index 8ff17a2b71c7..d7bd98481404 100644
--- a/svtools/inc/svtools/accessibletable.hxx
+++ b/svtools/inc/svtools/accessibletable.hxx
@@ -101,7 +101,7 @@ public:
// Window
virtual Rectangle GetWindowExtentsRelative( Window *pRelativeWindow ) const = 0;
virtual void GrabFocus()= 0;
- virtual XACC GetAccessible( BOOL bCreate = TRUE )= 0;
+ virtual XACC GetAccessible( sal_Bool bCreate = sal_True )= 0;
virtual Window* GetAccessibleParentWindow() const= 0;
virtual Window* GetWindowInstance()= 0;
virtual sal_Int32 GetAccessibleControlCount() const = 0;
@@ -109,11 +109,9 @@ public:
virtual long GetRowCount() const= 0;
virtual long GetColumnCount() const= 0;
virtual sal_Bool HasRowHeader() const= 0;
- virtual sal_Int32 GetSelectedRowCount() const= 0;
- virtual bool IsRowSelected( long _nRow ) const= 0;
virtual sal_Bool ConvertPointToCellAddress( sal_Int32& _rnRow, sal_Int32& _rnColPos, const Point& _rPoint )= 0;
- virtual Rectangle calcHeaderRect( sal_Bool _bIsColumnBar, BOOL _bOnScreen = TRUE ) = 0;
- virtual Rectangle calcTableRect( BOOL _bOnScreen = TRUE ) = 0;
+ virtual Rectangle calcHeaderRect( sal_Bool _bIsColumnBar, sal_Bool _bOnScreen = sal_True ) = 0;
+ virtual Rectangle calcTableRect( sal_Bool _bOnScreen = sal_True ) = 0;
virtual Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex)= 0;
virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint)= 0;
virtual void FillAccessibleStateSetForCell( ::utl::AccessibleStateSetHelper& _rStateSet, sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const= 0;
@@ -122,9 +120,13 @@ public:
virtual ::rtl::OUString GetColumnDescription( sal_uInt16 _nColumnPos ) const = 0;
virtual ::rtl::OUString GetColumnName( sal_Int32 _nIndex ) const = 0;
virtual ::com::sun::star::uno::Any GetCellContent( sal_Int32 _nRowPos, sal_Int32 _nColPos) const = 0;
- virtual std::vector<sal_Int32>& GetSelectedRows() = 0;
- virtual void RemoveSelectedRow(sal_Int32 _nRowPos) = 0;
virtual ::rtl::OUString GetAccessibleCellText(sal_Int32 _nRowPos, sal_Int32 _nColPos) const = 0;
+
+ virtual sal_Int32 GetSelectedRowCount() const = 0;
+ virtual sal_Int32 GetSelectedRowIndex( sal_Int32 const i_selectionIndex ) const = 0;
+ virtual bool IsRowSelected( sal_Int32 const i_rowIndex ) const = 0;
+ virtual void SelectRow( sal_Int32 const i_rowIndex, bool const i_select ) = 0;
+ virtual void SelectAllRows( bool const i_select ) = 0;
};
// ----------------------------------------------------------------------------
diff --git a/svtools/inc/svtools/accessibletableprovider.hxx b/svtools/inc/svtools/accessibletableprovider.hxx
index d14aecce9f58..dba96768f8bf 100644
--- a/svtools/inc/svtools/accessibletableprovider.hxx
+++ b/svtools/inc/svtools/accessibletableprovider.hxx
@@ -91,7 +91,7 @@ public:
virtual void SetNoSelection() = 0;
virtual void SelectAll() = 0;
- virtual void SelectRow( long _nRow, BOOL _bSelect = TRUE, BOOL bExpand = TRUE ) = 0;
+ virtual void SelectRow( long _nRow, sal_Bool _bSelect = sal_True, sal_Bool bExpand = sal_True ) = 0;
virtual void SelectColumn( sal_uInt16 _nColumnPos, sal_Bool _bSelect = sal_True ) = 0;
virtual sal_Int32 GetSelectedRowCount() const = 0;
virtual sal_Int32 GetSelectedColumnCount() const = 0;
@@ -103,11 +103,11 @@ public:
/** @return <TRUE/>, if the cell is visible. */
virtual sal_Bool IsCellVisible( sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const = 0;
- virtual String GetAccessibleCellText( long _nRow, USHORT _nColumnPos ) const = 0;
+ virtual String GetAccessibleCellText( long _nRow, sal_uInt16 _nColumnPos ) const = 0;
- virtual Rectangle calcHeaderRect( sal_Bool _bIsColumnBar, BOOL _bOnScreen = TRUE ) = 0;
- virtual Rectangle calcTableRect( BOOL _bOnScreen = TRUE ) = 0;
- virtual Rectangle GetFieldRectPixelAbs( sal_Int32 _nRow, sal_uInt16 _nColumnPos, BOOL _bIsHeader, BOOL _bOnScreen = TRUE ) = 0;
+ virtual Rectangle calcHeaderRect( sal_Bool _bIsColumnBar, sal_Bool _bOnScreen = sal_True ) = 0;
+ virtual Rectangle calcTableRect( sal_Bool _bOnScreen = sal_True ) = 0;
+ virtual Rectangle GetFieldRectPixelAbs( sal_Int32 _nRow, sal_uInt16 _nColumnPos, sal_Bool _bIsHeader, sal_Bool _bOnScreen = sal_True ) = 0;
virtual XACC CreateAccessibleCell( sal_Int32 _nRow, sal_uInt16 _nColumnPos ) = 0;
virtual XACC CreateAccessibleRowHeader( sal_Int32 _nRow ) = 0;
@@ -129,12 +129,12 @@ public:
virtual void GrabTableFocus() = 0;
// OutputDevice
- virtual BOOL GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector ) = 0;
+ virtual sal_Bool GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector ) = 0;
// Window
virtual Rectangle GetWindowExtentsRelative( Window *pRelativeWindow ) const = 0;
virtual void GrabFocus() = 0;
- virtual XACC GetAccessible( BOOL bCreate = TRUE ) = 0;
+ virtual XACC GetAccessible( sal_Bool bCreate = sal_True ) = 0;
virtual Window* GetAccessibleParentWindow() const = 0;
virtual Window* GetWindowInstance() = 0;
diff --git a/svtools/inc/svtools/apearcfg.hxx b/svtools/inc/svtools/apearcfg.hxx
index 5dea74761e17..ef59e86df96c 100644
--- a/svtools/inc/svtools/apearcfg.hxx
+++ b/svtools/inc/svtools/apearcfg.hxx
@@ -59,9 +59,9 @@ class SVT_DLLPUBLIC SvtTabAppearanceCfg : public utl::ConfigItem
short nAAMinPixelHeight ;
#endif
- BOOL bMenuMouseFollow ;
+ sal_Bool bMenuMouseFollow ;
#if defined( UNX ) || defined ( FS_PRIV_DEBUG )
- BOOL bFontAntialiasing ;
+ sal_Bool bFontAntialiasing ;
#endif
static sal_Bool bInitialized ;
@@ -75,29 +75,29 @@ public:
virtual void Commit();
virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& _rPropertyNames);
- USHORT GetDragMode () const { return nDragMode; }
- void SetDragMode ( USHORT nSet );
+ sal_uInt16 GetDragMode () const { return nDragMode; }
+ void SetDragMode ( sal_uInt16 nSet );
- USHORT GetScaleFactor () const { return nScaleFactor; }
- void SetScaleFactor ( USHORT nSet );
+ sal_uInt16 GetScaleFactor () const { return nScaleFactor; }
+ void SetScaleFactor ( sal_uInt16 nSet );
- USHORT GetSnapMode () const { return nSnapMode; }
- void SetSnapMode ( USHORT nSet );
+ sal_uInt16 GetSnapMode () const { return nSnapMode; }
+ void SetSnapMode ( sal_uInt16 nSet );
- USHORT GetMiddleMouseButton () const { return nMiddleMouse; }
- void SetMiddleMouseButton ( USHORT nSet );
+ sal_uInt16 GetMiddleMouseButton () const { return nMiddleMouse; }
+ void SetMiddleMouseButton ( sal_uInt16 nSet );
void SetApplicationDefaults ( Application* pApp );
- void SetMenuMouseFollow(BOOL bSet) {bMenuMouseFollow = bSet; SetModified();}
- BOOL IsMenuMouseFollow() const{return bMenuMouseFollow;}
+ void SetMenuMouseFollow(sal_Bool bSet) {bMenuMouseFollow = bSet; SetModified();}
+ sal_Bool IsMenuMouseFollow() const{return bMenuMouseFollow;}
#if defined( UNX ) || defined ( FS_PRIV_DEBUG )
- void SetFontAntiAliasing( BOOL bSet ) { bFontAntialiasing = bSet; SetModified(); }
- BOOL IsFontAntiAliasing() const { return bFontAntialiasing; }
+ void SetFontAntiAliasing( sal_Bool bSet ) { bFontAntialiasing = bSet; SetModified(); }
+ sal_Bool IsFontAntiAliasing() const { return bFontAntialiasing; }
- USHORT GetFontAntialiasingMinPixelHeight( ) const { return nAAMinPixelHeight; }
- void SetFontAntialiasingMinPixelHeight( USHORT _nMinHeight ) { nAAMinPixelHeight = _nMinHeight; SetModified(); }
+ sal_uInt16 GetFontAntialiasingMinPixelHeight( ) const { return nAAMinPixelHeight; }
+ void SetFontAntialiasingMinPixelHeight( sal_uInt16 _nMinHeight ) { nAAMinPixelHeight = _nMinHeight; SetModified(); }
#endif
static sal_Bool IsInitialized() { return bInitialized; }
diff --git a/svtools/inc/svtools/asynclink.hxx b/svtools/inc/svtools/asynclink.hxx
index 41c6f3e92388..d5aebd370966 100644
--- a/svtools/inc/svtools/asynclink.hxx
+++ b/svtools/inc/svtools/asynclink.hxx
@@ -44,10 +44,10 @@ namespace svtools {
class SVT_DLLPUBLIC AsynchronLink
{
Link _aLink;
- ULONG _nEventId;
+ sal_uLong _nEventId;
Timer* _pTimer;
- BOOL _bInCall;
- BOOL* _pDeleted;
+ sal_Bool _bInCall;
+ sal_Bool* _pDeleted;
void* _pArg;
vos::OMutex* _pMutex;
@@ -56,19 +56,19 @@ class SVT_DLLPUBLIC AsynchronLink
public:
AsynchronLink( const Link& rLink ) :
- _aLink( rLink ), _nEventId( 0 ), _pTimer( 0 ), _bInCall( FALSE ),
+ _aLink( rLink ), _nEventId( 0 ), _pTimer( 0 ), _bInCall( sal_False ),
_pDeleted( 0 ), _pMutex( 0 ){}
- AsynchronLink() : _nEventId( 0 ), _pTimer( 0 ), _bInCall( FALSE ),
+ AsynchronLink() : _nEventId( 0 ), _pTimer( 0 ), _bInCall( sal_False ),
_pDeleted( 0 ), _pMutex( 0 ){}
~AsynchronLink();
void CreateMutex();
void operator=( const Link& rLink ) { _aLink = rLink; }
- void Call( void* pObj, BOOL bAllowDoubles = FALSE,
- BOOL bUseTimer = FALSE );
+ void Call( void* pObj, sal_Bool bAllowDoubles = sal_False,
+ sal_Bool bUseTimer = sal_False );
void ForcePendingCall( );
void ClearPendingCall( );
- BOOL IsSet() const { return _aLink.IsSet(); }
+ sal_Bool IsSet() const { return _aLink.IsSet(); }
Link GetLink() const { return _aLink; }
};
diff --git a/svtools/inc/svtools/brwbox.hxx b/svtools/inc/svtools/brwbox.hxx
index 42fb4b4d36ac..fe17531b3c92 100644
--- a/svtools/inc/svtools/brwbox.hxx
+++ b/svtools/inc/svtools/brwbox.hxx
@@ -67,7 +67,7 @@ namespace utl {
#define BROWSER_INVALIDID USHRT_MAX
#define BROWSER_ENDOFSELECTION (long)(SFX_ENDOFSELECTION)
-typedef ULONG BrowserMode;
+typedef sal_uLong BrowserMode;
#define BROWSER_COLUMNSELECTION 0x0001
#define BROWSER_MULTISELECTION 0x0002
@@ -153,20 +153,20 @@ class BrowseEvent
Window* pWin;
long nRow;
Rectangle aRect;
- USHORT nCol;
- USHORT nColId;
+ sal_uInt16 nCol;
+ sal_uInt16 nColId;
public:
BrowseEvent();
BrowseEvent( Window* pWindow,
long nAbsRow,
- USHORT nColumn, USHORT nColumnId,
+ sal_uInt16 nColumn, sal_uInt16 nColumnId,
const Rectangle& rRect );
Window* GetWindow() const { return pWin; }
long GetRow() const { return nRow; }
- USHORT GetColumn() const { return nCol; }
- USHORT GetColumnId() const { return nColId; }
+ sal_uInt16 GetColumn() const { return nCol; }
+ sal_uInt16 GetColumnId() const { return nColId; }
const Rectangle& GetRect() const { return aRect; }
};
@@ -180,7 +180,7 @@ public:
BrowserMouseEvent();
BrowserMouseEvent( BrowserDataWin* pWin, const MouseEvent& rEvt );
BrowserMouseEvent( Window* pWin, const MouseEvent& rEvt,
- long nAbsRow, USHORT nColumn, USHORT nColumnId,
+ long nAbsRow, sal_uInt16 nColumn, sal_uInt16 nColumnId,
const Rectangle& rRect );
};
@@ -253,45 +253,45 @@ class SVT_DLLPUBLIC BrowseBox
ScrollBar aHScroll; // horizontal scrollbar
long nDataRowHeight; // height of a single data-row
- USHORT nTitleLines; // number of lines in title row
- ULONG nControlAreaWidth; // width of fixed area beneeth hscroll
- BOOL bThumbDragging; // handle thumb dragging
- BOOL bColumnCursor; // single columns and fields selectable
- BOOL bMultiSelection;// allow multiple selected rows
- BOOL bKeepHighlight; // don't hide selection on LoseFocus
-
- BOOL bHLines; // draw lines between rows
- BOOL bVLines; // draw lines between columns
- BOOL bHDots; // draw lines between rows dotted
- BOOL bVDots; // draw lines between columns dotted
+ sal_uInt16 nTitleLines; // number of lines in title row
+ sal_uLong nControlAreaWidth; // width of fixed area beneeth hscroll
+ sal_Bool bThumbDragging; // handle thumb dragging
+ sal_Bool bColumnCursor; // single columns and fields selectable
+ sal_Bool bMultiSelection;// allow multiple selected rows
+ sal_Bool bKeepHighlight; // don't hide selection on LoseFocus
+
+ sal_Bool bHLines; // draw lines between rows
+ sal_Bool bVLines; // draw lines between columns
+ sal_Bool bHDots; // draw lines between rows dotted
+ sal_Bool bVDots; // draw lines between columns dotted
Color aGridLineColor; // color for lines, default dark grey
- BOOL bBootstrapped; // child windows resized etc.
+ sal_Bool bBootstrapped; // child windows resized etc.
long nTopRow; // no. of first visible row (0...)
long nCurRow; // no. of row with cursor
long nRowCount; // total number of rows in model
- USHORT nFirstCol; // no. of first visible scrollable column
- USHORT nCurColId; // column id of cursor
+ sal_uInt16 nFirstCol; // no. of first visible scrollable column
+ sal_uInt16 nCurColId; // column id of cursor
- BOOL bSelecting;
- BOOL bRowDividerDrag;
- BOOL bHit;
- BOOL mbInteractiveRowHeight;
+ sal_Bool bSelecting;
+ sal_Bool bRowDividerDrag;
+ sal_Bool bHit;
+ sal_Bool mbInteractiveRowHeight;
Point a1stPoint;
Point a2ndPoint;
long nResizeX; // mouse position at start of resizing
long nMinResizeX; // never drag more left
long nDragX; // last dragged column (MouseMove)
- USHORT nResizeCol; // resize this column in MouseMove
- BOOL bResizing; // mouse captured for column resizing
-
- BOOL bSelect; // select or deselect
- BOOL bSelectionIsVisible; // depending on focus
- BOOL bScrolling; // hidden cursor while scrolling
- BOOL bNotToggleSel; // set while in ToggleSelection() etc.
- BOOL bHasFocus; // set/unset in Get/LoseFocus
- BOOL bHideSelect; // hide selection (highlight)
- BOOL bHideCursor; // hide cursor (frame)
+ sal_uInt16 nResizeCol; // resize this column in MouseMove
+ sal_Bool bResizing; // mouse captured for column resizing
+
+ sal_Bool bSelect; // select or deselect
+ sal_Bool bSelectionIsVisible; // depending on focus
+ sal_Bool bScrolling; // hidden cursor while scrolling
+ sal_Bool bNotToggleSel; // set while in ToggleSelection() etc.
+ sal_Bool bHasFocus; // set/unset in Get/LoseFocus
+ sal_Bool bHideSelect; // hide selection (highlight)
+ sal_Bool bHideCursor; // hide cursor (frame)
Range aSelRange; // for selection expansion
BrowserColumns* pCols; // array of column-descriptions
@@ -304,7 +304,7 @@ class SVT_DLLPUBLIC BrowseBox
::std::auto_ptr< ::svt::BrowseBoxImpl > m_pImpl; // impl structure of the BrowseBox object
- BOOL m_bFocusOnlyCursor; // hide cursor if we don't have the focus
+ sal_Bool m_bFocusOnlyCursor; // hide cursor if we don't have the focus
Color m_aCursorColor; // special color for cursor, COL_TRANSPARENT for usual (VCL-painted) "inverted" cursor
BrowserMode m_nCurrentMode; // last argument of SetMode (redundant, as our other members represent the current settings, too)
@@ -312,16 +312,16 @@ private:
//#if 0 // _SOLAR__PRIVATE
SVT_DLLPRIVATE void ConstructImpl(BrowserMode nMode);
SVT_DLLPRIVATE void ExpandRowSelection( const BrowserMouseEvent& rEvt );
- SVT_DLLPRIVATE void ToggleSelection( BOOL bForce = FALSE );
+ SVT_DLLPRIVATE void ToggleSelection( sal_Bool bForce = sal_False );
SVT_DLLPRIVATE void UpdateScrollbars();
SVT_DLLPRIVATE void AutoSizeLastColumn();
SVT_DLLPRIVATE long ImpGetDataRowHeight() const;
- SVT_DLLPRIVATE Rectangle ImplFieldRectPixel( long nRow, USHORT nColId ) const;
- SVT_DLLPRIVATE USHORT FrozenColCount() const;
+ SVT_DLLPRIVATE Rectangle ImplFieldRectPixel( long nRow, sal_uInt16 nColId ) const;
+ SVT_DLLPRIVATE sal_uInt16 FrozenColCount() const;
- SVT_DLLPRIVATE void ColumnInserted( USHORT nPos );
+ SVT_DLLPRIVATE void ColumnInserted( sal_uInt16 nPos );
DECL_DLLPRIVATE_LINK( ScrollHdl, ScrollBar * );
DECL_DLLPRIVATE_LINK( EndScrollHdl, ScrollBar * );
@@ -330,26 +330,26 @@ private:
SVT_DLLPRIVATE long GetFrozenWidth() const;
//#endif
- BOOL GoToRow(long nRow, BOOL bRowColMove, BOOL bDoNotModifySelection = FALSE );
+ sal_Bool GoToRow(long nRow, sal_Bool bRowColMove, sal_Bool bDoNotModifySelection = sal_False );
- BOOL GoToColumnId( USHORT nColId, BOOL bMakeVisible, BOOL bRowColMove = FALSE);
- void SelectColumnPos( USHORT nCol, BOOL _bSelect, BOOL bMakeVisible);
- void SelectColumnId( USHORT nColId, BOOL _bSelect, BOOL bMakeVisible)
+ sal_Bool GoToColumnId( sal_uInt16 nColId, sal_Bool bMakeVisible, sal_Bool bRowColMove = sal_False);
+ void SelectColumnPos( sal_uInt16 nCol, sal_Bool _bSelect, sal_Bool bMakeVisible);
+ void SelectColumnId( sal_uInt16 nColId, sal_Bool _bSelect, sal_Bool bMakeVisible)
{ SelectColumnPos( GetColumnPos(nColId), _bSelect, bMakeVisible); }
- void ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, BOOL _bForeignDevice, BOOL _bDrawSelections);
+ void ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, sal_Bool _bForeignDevice, sal_Bool _bDrawSelections);
- BOOL PaintCursorIfHiddenOnce() const { return !m_bFocusOnlyCursor && !HasFocus(); }
+ sal_Bool PaintCursorIfHiddenOnce() const { return !m_bFocusOnlyCursor && !HasFocus(); }
- USHORT ToggleSelectedColumn();
- void SetToggledSelectedColumn(USHORT _nSelectedColumnId);
+ sal_uInt16 ToggleSelectedColumn();
+ void SetToggledSelectedColumn(sal_uInt16 _nSelectedColumnId);
protected:
/// retrieves the XAccessible implementation associated with the BrowseBox instance
::svt::IAccessibleFactory& getAccessibleFactory();
protected:
- USHORT ColCount() const;
+ sal_uInt16 ColCount() const;
// software plug for database access
// Der RowCount wird jetzt intern automatisch gezaehlt
@@ -362,19 +362,19 @@ protected:
// fuer Anzeige im VScrollBar z.B. auf "?" oder setzen
void SetRealRowCount( const String &rRealRowCount );
- // Return Value muss immer TRUE sein - SeekRow *muss* klappen!
+ // Return Value muss immer sal_True sein - SeekRow *muss* klappen!
// (sonst ASSERT) MI: wer hat das eingebaut? Das darf nicht so sein!
/** seeks for the given row position
@param nRow
nRow starts at 0
*/
- virtual BOOL SeekRow( long nRow ) = 0;
+ virtual sal_Bool SeekRow( long nRow ) = 0;
virtual void DrawCursor();
virtual void PaintRow( OutputDevice &rDev, const Rectangle &rRect );
virtual void PaintData( Window& rWin, const Rectangle& rRect );
virtual void PaintField( OutputDevice& rDev, const Rectangle& rRect,
- USHORT nColumnId ) const = 0;
+ sal_uInt16 nColumnId ) const = 0;
// Benachrichtigung an die abgeleitete Klasse, dass sich der sichtbare
// Bereich von Rows geaendert hat. Aus dieser Methode heraus darf
// die abgeleitete Klasse Aenderungen des Model mit Hilfe der Methoden
@@ -392,13 +392,13 @@ protected:
// dadurch aendert sich nur die Numerierung der sichtbaren Rows
// - Scrollen (und daraus resultierend eine andere erste sichtbare Row)
// - Resize des Fensters
- virtual void VisibleRowsChanged( long nNewTopRow, USHORT nNumRows);
+ virtual void VisibleRowsChanged( long nNewTopRow, sal_uInt16 nNumRows);
// Anzahl sichtbarer Rows in dem Fenster (inkl. "angeschnittener" Rows)
- USHORT GetVisibleRows()
- { return (USHORT)((pDataWin->GetOutputSizePixel().Height() - 1 )/ GetDataRowHeight() + 1); }
+ sal_uInt16 GetVisibleRows()
+ { return (sal_uInt16)((pDataWin->GetOutputSizePixel().Height() - 1 )/ GetDataRowHeight() + 1); }
long GetTopRow() { return nTopRow; }
- USHORT GetFirstVisibleColNumber() const { return nFirstCol; }
+ sal_uInt16 GetFirstVisibleColNumber() const { return nFirstCol; }
// Focus-Rect ein-/ausschalten
void DoShowCursor( const char *pWhoLog );
@@ -452,7 +452,7 @@ public:
virtual void GetFocus();
virtual void Resize();
virtual void Paint( const Rectangle& rRect );
- virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags );
+ virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags );
virtual void Command( const CommandEvent& rEvt );
virtual void StartDrag( sal_Int8 _nAction, const Point& _rPosPixel );
@@ -470,18 +470,18 @@ public:
virtual void EndScroll();
virtual void Select();
virtual void DoubleClick( const BrowserMouseEvent& rEvt );
- virtual BOOL IsCursorMoveAllowed( long nNewRow, USHORT nNewColId ) const;
+ virtual sal_Bool IsCursorMoveAllowed( long nNewRow, sal_uInt16 nNewColId ) const;
virtual void CursorMoved();
- virtual void ColumnMoved( USHORT nColId );
- virtual void ColumnResized( USHORT nColId );
- virtual long QueryColumnResize( USHORT nColId, long nWidth );
+ virtual void ColumnMoved( sal_uInt16 nColId );
+ virtual void ColumnResized( sal_uInt16 nColId );
+ virtual long QueryColumnResize( sal_uInt16 nColId, long nWidth );
/// called when the row height has been changed interactively
virtual void RowHeightChanged();
virtual long QueryMinimumRowHeight();
// Window-Control (pass to DataWindow)
- void SetUpdateMode( BOOL bUpdate );
- BOOL GetUpdateMode() const;
+ void SetUpdateMode( sal_Bool bUpdate );
+ sal_Bool GetUpdateMode() const;
// map-mode and font control
void SetFont( const Font& rNewFont );
@@ -495,73 +495,73 @@ public:
const Color& GetGridLineColor() const {return aGridLineColor;}
// inserting, changing, removing and freezing of columns
- void InsertHandleColumn( ULONG nWidth );
- void InsertDataColumn( USHORT nItemId, const Image& rImage,
+ void InsertHandleColumn( sal_uLong nWidth );
+ void InsertDataColumn( sal_uInt16 nItemId, const Image& rImage,
long nSize, HeaderBarItemBits nBits = HIB_STDSTYLE,
- USHORT nPos = HEADERBAR_APPEND );
- void InsertDataColumn( USHORT nItemId, const XubString& rText,
+ sal_uInt16 nPos = HEADERBAR_APPEND );
+ void InsertDataColumn( sal_uInt16 nItemId, const XubString& rText,
long nSize, HeaderBarItemBits nBits = HIB_STDSTYLE,
- USHORT nPos = HEADERBAR_APPEND );
- void InsertDataColumn( USHORT nItemId,
+ sal_uInt16 nPos = HEADERBAR_APPEND );
+ void InsertDataColumn( sal_uInt16 nItemId,
const Image& rImage, const XubString& rText,
long nSize, HeaderBarItemBits nBits = HIB_STDSTYLE,
- USHORT nPos = HEADERBAR_APPEND,
+ sal_uInt16 nPos = HEADERBAR_APPEND,
// Hilfstext bei leerem rText
const String* pHelpText = 0 );
- void SetColumnTitle( USHORT nColumnId, const String &rTitle );
- void SetColumnMode( USHORT nColumnId, BrowserColumnMode nFlags );
- void SetColumnWidth( USHORT nColumnId, ULONG nWidth );
- void SetColumnPos( USHORT nColumnId, USHORT nPos );
- void FreezeColumn( USHORT nColumnId, BOOL bFreeze = TRUE );
+ void SetColumnTitle( sal_uInt16 nColumnId, const String &rTitle );
+ void SetColumnMode( sal_uInt16 nColumnId, BrowserColumnMode nFlags );
+ void SetColumnWidth( sal_uInt16 nColumnId, sal_uLong nWidth );
+ void SetColumnPos( sal_uInt16 nColumnId, sal_uInt16 nPos );
+ void FreezeColumn( sal_uInt16 nColumnId, sal_Bool bFreeze = sal_True );
void UnfreezeColumns();
- void RemoveColumn( USHORT nColumnId );
+ void RemoveColumn( sal_uInt16 nColumnId );
void RemoveColumns();
// control of title and data row height
void SetDataRowHeight( long nPixel );
long GetDataRowHeight() const;
- void SetTitleLines( USHORT nLines );
- USHORT GetTitleLines() const { return nTitleLines; }
+ void SetTitleLines( sal_uInt16 nLines );
+ sal_uInt16 GetTitleLines() const { return nTitleLines; }
virtual long GetTitleHeight() const;
// access to dynamic values of cursor row
- String GetColumnTitle( USHORT nColumnId ) const;
- BrowserColumnMode GetColumnMode( USHORT nColumnId ) const;
- Rectangle GetFieldRect( USHORT nColumnId ) const;
- ULONG GetColumnWidth( USHORT nColumnId ) const;
- USHORT GetColumnId( USHORT nPos ) const;
- USHORT GetColumnPos( USHORT nColumnId ) const;
- BOOL IsFrozen( USHORT nColumnId ) const;
+ String GetColumnTitle( sal_uInt16 nColumnId ) const;
+ BrowserColumnMode GetColumnMode( sal_uInt16 nColumnId ) const;
+ Rectangle GetFieldRect( sal_uInt16 nColumnId ) const;
+ sal_uLong GetColumnWidth( sal_uInt16 nColumnId ) const;
+ sal_uInt16 GetColumnId( sal_uInt16 nPos ) const;
+ sal_uInt16 GetColumnPos( sal_uInt16 nColumnId ) const;
+ sal_Bool IsFrozen( sal_uInt16 nColumnId ) const;
// movement of visible area
void ResetScroll();
long ScrollColumns( long nColumns );
long ScrollRows( long nRows );
long ScrollPages( long nPagesY );
- BOOL MakeFieldVisible( long nRow, USHORT nColId, BOOL bComplete = FALSE );
+ sal_Bool MakeFieldVisible( long nRow, sal_uInt16 nColId, sal_Bool bComplete = sal_False );
// access and movement of cursor
long GetCurRow() const { return nCurRow; }
- USHORT GetCurColumnId() const { return nCurColId; }
- BOOL GoToRow( long nRow );
- BOOL GoToRowAndDoNotModifySelection( long nRow );
- BOOL GoToColumnId( USHORT nColId );
- BOOL GoToRowColumnId( long nRow, USHORT nColId );
+ sal_uInt16 GetCurColumnId() const { return nCurColId; }
+ sal_Bool GoToRow( long nRow );
+ sal_Bool GoToRowAndDoNotModifySelection( long nRow );
+ sal_Bool GoToColumnId( sal_uInt16 nColId );
+ sal_Bool GoToRowColumnId( long nRow, sal_uInt16 nColId );
// selections
virtual void SetNoSelection();
virtual void SelectAll();
- virtual void SelectRow( long nRow, BOOL _bSelect = TRUE, BOOL bExpand = TRUE );
- void SelectColumnPos( USHORT nCol, BOOL _bSelect = TRUE )
- { SelectColumnPos( nCol, _bSelect, TRUE); }
- void SelectColumnId( USHORT nColId, BOOL _bSelect = TRUE )
- { SelectColumnPos( GetColumnPos(nColId), _bSelect, TRUE); }
+ virtual void SelectRow( long nRow, sal_Bool _bSelect = sal_True, sal_Bool bExpand = sal_True );
+ void SelectColumnPos( sal_uInt16 nCol, sal_Bool _bSelect = sal_True )
+ { SelectColumnPos( nCol, _bSelect, sal_True); }
+ void SelectColumnId( sal_uInt16 nColId, sal_Bool _bSelect = sal_True )
+ { SelectColumnPos( GetColumnPos(nColId), _bSelect, sal_True); }
long GetSelectRowCount() const;
- USHORT GetSelectColumnCount() const;
+ sal_uInt16 GetSelectColumnCount() const;
virtual bool IsRowSelected( long nRow ) const;
- bool IsColumnSelected( USHORT nColumnId ) const;
+ bool IsColumnSelected( sal_uInt16 nColumnId ) const;
sal_Bool IsAllSelected() const;
- long FirstSelectedRow( BOOL bInverse = FALSE );
+ long FirstSelectedRow( sal_Bool bInverse = sal_False );
long LastSelectedRow();
long PrevSelectedRow();
long NextSelectedRow();
@@ -573,40 +573,40 @@ public:
long FirstSelectedColumn( ) const;
long NextSelectedColumn( ) const;
- BOOL IsResizing() const { return bResizing; }
+ sal_Bool IsResizing() const { return bResizing; }
// access to positions of fields, column and rows
Window& GetEventWindow() const;
Window& GetDataWindow() const { return *pDataWin; }
Rectangle GetRowRectPixel( long nRow,
- BOOL bRelToBrowser = TRUE ) const;
- Rectangle GetFieldRectPixel( long nRow, USHORT nColId,
- BOOL bRelToBrowser = TRUE) const;
- BOOL IsFieldVisible( long nRow, USHORT nColId,
- BOOL bComplete = FALSE ) const;
+ sal_Bool bRelToBrowser = sal_True ) const;
+ Rectangle GetFieldRectPixel( long nRow, sal_uInt16 nColId,
+ sal_Bool bRelToBrowser = sal_True) const;
+ sal_Bool IsFieldVisible( long nRow, sal_uInt16 nColId,
+ sal_Bool bComplete = sal_False ) const;
long GetRowAtYPosPixel( long nY,
- BOOL bRelToBrowser = TRUE ) const;
- USHORT GetColumnAtXPosPixel( long nX,
- BOOL bRelToBrowser = TRUE ) const;
+ sal_Bool bRelToBrowser = sal_True ) const;
+ sal_uInt16 GetColumnAtXPosPixel( long nX,
+ sal_Bool bRelToBrowser = sal_True ) const;
// invalidations
void Clear();
- void RowRemoved( long nRow, long nNumRows = 1, BOOL bDoPaint = TRUE );
- void RowModified( long nRow, USHORT nColId = USHRT_MAX );
- void RowInserted( long nRow, long nNumRows = 1, BOOL bDoPaint = TRUE, BOOL bKeepSelection = FALSE );
+ void RowRemoved( long nRow, long nNumRows = 1, sal_Bool bDoPaint = sal_True );
+ void RowModified( long nRow, sal_uInt16 nColId = USHRT_MAX );
+ void RowInserted( long nRow, long nNumRows = 1, sal_Bool bDoPaint = sal_True, sal_Bool bKeepSelection = sal_False );
// miscellanous
- void ReserveControlArea( USHORT nWidth = USHRT_MAX );
+ void ReserveControlArea( sal_uInt16 nWidth = USHRT_MAX );
Rectangle GetControlArea() const;
- BOOL ProcessKey( const KeyEvent& rEvt );
- void Dispatch( USHORT nId );
+ sal_Bool ProcessKey( const KeyEvent& rEvt );
+ void Dispatch( sal_uInt16 nId );
void SetMode( BrowserMode nMode = 0 );
BrowserMode GetMode( ) const { return m_nCurrentMode; }
bool IsInCommandEvent() const;
void SetCursorColor(const Color& _rCol);
Color GetCursorColor() const { return m_aCursorColor; }
- void ResetSelecting() { bSelecting = FALSE; }
+ void ResetSelecting() { bSelecting = sal_False; }
/** specifies that the user is allowed to interactively change the height of a row,
by simply dragging an arbitrary row separator.
@@ -614,21 +614,21 @@ public:
Note that this works only if there's a handle column, since only in this case,
there *is* something for the user to click onto
*/
- void EnableInteractiveRowHeight( BOOL _bEnable = TRUE ) { mbInteractiveRowHeight = _bEnable; }
- BOOL IsInteractiveRowHeightEnabled( ) const { return mbInteractiveRowHeight; }
+ void EnableInteractiveRowHeight( sal_Bool _bEnable = sal_True ) { mbInteractiveRowHeight = _bEnable; }
+ sal_Bool IsInteractiveRowHeightEnabled( ) const { return mbInteractiveRowHeight; }
/// access to selected methods, to be granted to the BrowserColumn
struct BrowserColumnAccess { friend class BrowserColumn; private: BrowserColumnAccess() { } };
/** public version of PaintField, with selected access rights for the BrowserColumn
*/
- void DoPaintField( OutputDevice& rDev, const Rectangle& rRect, USHORT nColumnId, BrowserColumnAccess ) const
+ void DoPaintField( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId, BrowserColumnAccess ) const
{ PaintField( rDev, rRect, nColumnId ); }
/** suggests a default width for a column containing a given text
The width is calculated so that the text fits completely, plus som margin.
*/
- ULONG GetDefaultColumnWidth( const String& _rText ) const;
+ sal_uLong GetDefaultColumnWidth( const String& _rText ) const;
/** GetCellText returns the text at the given position
@param _nRow
@@ -638,12 +638,12 @@ public:
@return
the text out of the cell
*/
- virtual String GetCellText(long _nRow, USHORT _nColId) const;
+ virtual String GetCellText(long _nRow, sal_uInt16 _nColId) const;
/** @return
the current column count
*/
- USHORT GetColumnCount() const { return ColCount(); }
+ sal_uInt16 GetColumnCount() const { return ColCount(); }
/** commitBrowseBoxEvent commit the event at all listeners of the browsebox
@param nEventId
@@ -692,7 +692,7 @@ public:
@return
the Rectangle
*/
- virtual Rectangle calcHeaderRect(sal_Bool _bIsColumnBar,BOOL _bOnScreen = TRUE);
+ virtual Rectangle calcHeaderRect(sal_Bool _bIsColumnBar,sal_Bool _bOnScreen = sal_True);
/** calculates the Rectangle of the table
@param _bOnScreen
@@ -700,7 +700,7 @@ public:
@return
the Rectangle
*/
- virtual Rectangle calcTableRect(BOOL _bOnScreen = TRUE);
+ virtual Rectangle calcTableRect(sal_Bool _bOnScreen = sal_True);
/**
@param _nRowId
@@ -712,7 +712,7 @@ public:
@return
the Rectangle
*/
- virtual Rectangle GetFieldRectPixelAbs(sal_Int32 _nRowId,sal_uInt16 _nColId, BOOL _bIsHeader, BOOL _bOnScreen = TRUE);
+ virtual Rectangle GetFieldRectPixelAbs(sal_Int32 _nRowId,sal_uInt16 _nColId, sal_Bool _bIsHeader, sal_Bool _bOnScreen = sal_True);
/// return <TRUE/> if and only if the accessible object for this instance has been created and is alive
sal_Bool isAccessibleAlive( ) const;
@@ -836,7 +836,7 @@ public:
virtual sal_uInt16 GetCurrColumn() const;
virtual sal_Bool HasRowHeader() const;
virtual sal_Bool IsCellFocusable() const;
- virtual BOOL GoToCell( sal_Int32 _nRow, sal_uInt16 _nColumn );
+ virtual sal_Bool GoToCell( sal_Int32 _nRow, sal_uInt16 _nColumn );
virtual void SelectColumn( sal_uInt16 _nColumn, sal_Bool _bSelect = sal_True );
virtual sal_Bool IsColumnSelected( long _nColumn ) const;
virtual sal_Int32 GetSelectedRowCount() const;
@@ -844,11 +844,11 @@ public:
virtual void GetAllSelectedRows( ::com::sun::star::uno::Sequence< sal_Int32 >& _rRows ) const;
virtual void GetAllSelectedColumns( ::com::sun::star::uno::Sequence< sal_Int32 >& _rColumns ) const;
virtual sal_Bool IsCellVisible( sal_Int32 _nRow, sal_uInt16 _nColumn ) const;
- virtual String GetAccessibleCellText(long _nRow, USHORT _nColPos) const;
- virtual BOOL GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector );
+ virtual String GetAccessibleCellText(long _nRow, sal_uInt16 _nColPos) const;
+ virtual sal_Bool GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector );
virtual Rectangle GetWindowExtentsRelative( Window *pRelativeWindow ) const;
virtual void GrabFocus();
- virtual XACC GetAccessible( BOOL bCreate = TRUE );
+ virtual XACC GetAccessible( sal_Bool bCreate = sal_True );
virtual Window* GetAccessibleParentWindow() const;
virtual Window* GetWindowInstance();
diff --git a/svtools/inc/svtools/calendar.hxx b/svtools/inc/svtools/calendar.hxx
index f85887873bb0..61e75705ba01 100644
--- a/svtools/inc/svtools/calendar.hxx
+++ b/svtools/inc/svtools/calendar.hxx
@@ -138,16 +138,16 @@ wenn man beispielsweise den Bereich eingrenzen oder erweitern will. Der
Bereich wird mit SelectDate()/SelectDateRange() umgesetzt und mit
GetSelectDateCount()/GetSelectDate() abgefragt. Wenn man wissen moechte,
in welche Richtung selektiert wird, kann dies ueber IsSelectLeft()
-abgefragt werden. TRUE bedeutet eine Selektion nach links oder oben,
-FALSE eine Selektion nach rechts oder unten.
+abgefragt werden. sal_True bedeutet eine Selektion nach links oder oben,
+sal_False eine Selektion nach rechts oder unten.
--------------------------------------------------------------------------
Wenn sich der Date-Range-Bereich anpasst und man dort die Selektion
uebernehmen will, sollte dies nur gemacht werden, wenn
-IsScrollDateRangeChanged() TRUE zurueckliefert. Denn diese Methode liefert
-TRUE zurueck, wenn der Bereich durch Betaetigung von den Scroll-Buttons
-ausgeloest wurde. Bei FALSE wurde dies durch Resize(), Methoden-Aufrufen
+IsScrollDateRangeChanged() sal_True zurueckliefert. Denn diese Methode liefert
+sal_True zurueck, wenn der Bereich durch Betaetigung von den Scroll-Buttons
+ausgeloest wurde. Bei sal_False wurde dies durch Resize(), Methoden-Aufrufen
oder durch Beendigung einer Selektion ausgeloest.
*************************************************************************/
@@ -169,7 +169,7 @@ oder durch Beendigung einer Selektion ausgeloest.
#define WB_MULTISELECT ((WinBits)0x00400000)
#endif
-#define DIB_BOLD ((USHORT)0x0001)
+#define DIB_BOLD ((sal_uInt16)0x0001)
// ------------
// - Calendar -
@@ -203,7 +203,7 @@ private:
Color* mpStandardColor;
Color* mpSaturdayColor;
Color* mpSundayColor;
- ULONG mnDayCount;
+ sal_uLong mnDayCount;
long mnDaysOffX;
long mnWeekDayOffY;
long mnDaysOffY;
@@ -218,10 +218,10 @@ private:
long mnDummy3;
long mnDummy4;
WinBits mnWinStyle;
- USHORT mnFirstYear;
- USHORT mnLastYear;
- USHORT mnRequestYear;
- BOOL mbCalc:1,
+ sal_uInt16 mnFirstYear;
+ sal_uInt16 mnLastYear;
+ sal_uInt16 mnRequestYear;
+ sal_Bool mbCalc:1,
mbFormat:1,
mbDrag:1,
mbSelection:1,
@@ -245,7 +245,7 @@ private:
Link maDoubleClickHdl;
Link maSelectHdl;
Timer maDragScrollTimer;
- USHORT mnDragScrollHitTest;
+ sal_uInt16 mnDragScrollHitTest;
#ifdef _SV_CALENDAR_CXX
using Control::ImplInitSettings;
@@ -255,30 +255,30 @@ private:
SVT_DLLPRIVATE void ImplGetWeekFont( Font& rFont ) const;
SVT_DLLPRIVATE void ImplFormat();
using Window::ImplHitTest;
- SVT_DLLPRIVATE USHORT ImplHitTest( const Point& rPos, Date& rDate ) const;
- SVT_DLLPRIVATE void ImplDrawSpin( BOOL bDrawPrev = TRUE, BOOL bDrawNext = TRUE );
+ SVT_DLLPRIVATE sal_uInt16 ImplHitTest( const Point& rPos, Date& rDate ) const;
+ SVT_DLLPRIVATE void ImplDrawSpin( sal_Bool bDrawPrev = sal_True, sal_Bool bDrawNext = sal_True );
SVT_DLLPRIVATE void ImplDrawDate( long nX, long nY,
- USHORT nDay, USHORT nMonth, USHORT nYear,
+ sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear,
DayOfWeek eDayOfWeek,
- BOOL bBack = TRUE, BOOL bOther = FALSE,
- ULONG nToday = 0 );
- SVT_DLLPRIVATE void ImplDraw( BOOL bPaint = FALSE );
+ sal_Bool bBack = sal_True, sal_Bool bOther = sal_False,
+ sal_uLong nToday = 0 );
+ SVT_DLLPRIVATE void ImplDraw( sal_Bool bPaint = sal_False );
SVT_DLLPRIVATE void ImplUpdateDate( const Date& rDate );
SVT_DLLPRIVATE void ImplUpdateSelection( Table* pOld );
- SVT_DLLPRIVATE void ImplMouseSelect( const Date& rDate, USHORT nHitTest,
- BOOL bMove, BOOL bExpand, BOOL bExtended );
- SVT_DLLPRIVATE void ImplUpdate( BOOL bCalcNew = FALSE );
+ SVT_DLLPRIVATE void ImplMouseSelect( const Date& rDate, sal_uInt16 nHitTest,
+ sal_Bool bMove, sal_Bool bExpand, sal_Bool bExtended );
+ SVT_DLLPRIVATE void ImplUpdate( sal_Bool bCalcNew = sal_False );
using Window::ImplScroll;
- SVT_DLLPRIVATE void ImplScroll( BOOL bPrev );
+ SVT_DLLPRIVATE void ImplScroll( sal_Bool bPrev );
SVT_DLLPRIVATE void ImplInvertDropPos();
SVT_DLLPRIVATE void ImplShowMenu( const Point& rPos, const Date& rDate );
- SVT_DLLPRIVATE void ImplTracking( const Point& rPos, BOOL bRepeat );
- SVT_DLLPRIVATE void ImplEndTracking( BOOL bCancel );
+ SVT_DLLPRIVATE void ImplTracking( const Point& rPos, sal_Bool bRepeat );
+ SVT_DLLPRIVATE void ImplEndTracking( sal_Bool bCancel );
SVT_DLLPRIVATE DayOfWeek ImplGetWeekStart() const;
#endif
protected:
- BOOL ShowDropPos( const Point& rPos, Date& rDate );
+ sal_Bool ShowDropPos( const Point& rPos, Date& rDate );
void HideDropPos();
DECL_STATIC_LINK( Calendar, ScrollHdl, Timer *);
@@ -316,29 +316,29 @@ public:
/// Set how many days of a week must reside in the first week of a year.
void SetMinimumNumberOfDaysInWeek( sal_Int16 nDays );
- void SelectDate( const Date& rDate, BOOL bSelect = TRUE );
+ void SelectDate( const Date& rDate, sal_Bool bSelect = sal_True );
void SelectDateRange( const Date& rStartDate, const Date& rEndDate,
- BOOL bSelect = TRUE );
+ sal_Bool bSelect = sal_True );
void SetNoSelection();
- BOOL IsDateSelected( const Date& rDate ) const;
- ULONG GetSelectDateCount() const;
- Date GetSelectDate( ULONG nIndex = 0 ) const;
- void EnableCallEverySelect( BOOL bEvery = TRUE ) { mbAllSel = bEvery; }
- BOOL IsCallEverySelectEnabled() const { return mbAllSel; }
+ sal_Bool IsDateSelected( const Date& rDate ) const;
+ sal_uLong GetSelectDateCount() const;
+ Date GetSelectDate( sal_uLong nIndex = 0 ) const;
+ void EnableCallEverySelect( sal_Bool bEvery = sal_True ) { mbAllSel = bEvery; }
+ sal_Bool IsCallEverySelectEnabled() const { return mbAllSel; }
- USHORT GetRequestYear() const { return mnRequestYear; }
+ sal_uInt16 GetRequestYear() const { return mnRequestYear; }
void SetCurDate( const Date& rNewDate );
Date GetCurDate() const { return maCurDate; }
void SetFirstDate( const Date& rNewFirstDate );
Date GetFirstDate() const { return maFirstDate; }
Date GetLastDate() const { return GetFirstDate() + mnDayCount; }
- ULONG GetDayCount() const { return mnDayCount; }
+ sal_uLong GetDayCount() const { return mnDayCount; }
Date GetFirstMonth() const;
Date GetLastMonth() const;
- USHORT GetMonthCount() const;
- BOOL GetDate( const Point& rPos, Date& rDate ) const;
+ sal_uInt16 GetMonthCount() const;
+ sal_Bool GetDate( const Point& rPos, Date& rDate ) const;
Rectangle GetDateRect( const Date& rDate ) const;
- BOOL GetDropDate( Date& rDate ) const;
+ sal_Bool GetDropDate( Date& rDate ) const;
long GetCurMonthPerLine() const { return mnMonthPerLine; }
long GetCurLines() const { return mnLines; }
@@ -353,7 +353,7 @@ public:
void AddDateInfo( const Date& rDate, const XubString& rText,
const Color* pTextColor = NULL,
const Color* pFrameColor = NULL,
- USHORT nFlags = 0 );
+ sal_uInt16 nFlags = 0 );
void RemoveDateInfo( const Date& rDate );
void ClearDateInfo();
XubString GetDateInfoText( const Date& rDate );
@@ -361,9 +361,9 @@ public:
void StartSelection();
void EndSelection();
- BOOL IsTravelSelect() const { return mbTravelSelect; }
- BOOL IsScrollDateRangeChanged() const { return mbScrollDateRange; }
- BOOL IsSelectLeft() const { return mbSelLeft; }
+ sal_Bool IsTravelSelect() const { return mbTravelSelect; }
+ sal_Bool IsScrollDateRangeChanged() const { return mbScrollDateRange; }
+ sal_Bool IsSelectLeft() const { return mbSelLeft; }
Size CalcWindowSizePixel( long nCalcMonthPerLine = 1,
long nCalcLines = 1 ) const;
@@ -459,8 +459,8 @@ private:
PushButton* mpTodayBtn;
PushButton* mpNoneBtn;
Date maDefaultDate;
- BOOL mbToday;
- BOOL mbNone;
+ sal_Bool mbToday;
+ sal_Bool mbNone;
Link maSelectHdl;
#ifdef _SV_CALENDAR_CXX
@@ -476,17 +476,17 @@ public:
virtual void Select();
- virtual BOOL ShowDropDown( BOOL bShow );
+ virtual sal_Bool ShowDropDown( sal_Bool bShow );
virtual Calendar* CreateCalendar( Window* pParent );
Calendar* GetCalendar();
void SetDefaultDate( const Date& rDate ) { maDefaultDate = rDate; }
Date GetDefaultDate() const { return maDefaultDate; }
- void EnableToday( BOOL bToday = TRUE ) { mbToday = bToday; }
- BOOL IsTodayEnabled() const { return mbToday; }
- void EnableNone( BOOL bNone = TRUE ) { mbNone = bNone; }
- BOOL IsNoneEnabled() const { return mbNone; }
+ void EnableToday( sal_Bool bToday = sal_True ) { mbToday = bToday; }
+ sal_Bool IsTodayEnabled() const { return mbToday; }
+ void EnableNone( sal_Bool bNone = sal_True ) { mbNone = bNone; }
+ sal_Bool IsNoneEnabled() const { return mbNone; }
void SetCalendarStyle( WinBits nStyle ) { mnCalendarStyle = nStyle; }
WinBits GetCalendarStyle() const { return mnCalendarStyle; }
diff --git a/svtools/inc/svtools/cliplistener.hxx b/svtools/inc/svtools/cliplistener.hxx
index ab20d6d7aa20..5051633bd6b6 100644
--- a/svtools/inc/svtools/cliplistener.hxx
+++ b/svtools/inc/svtools/cliplistener.hxx
@@ -46,7 +46,7 @@ public:
TransferableClipboardListener( const Link& rCallback );
~TransferableClipboardListener();
- void AddRemoveListener( Window* pWin, BOOL bAdd );
+ void AddRemoveListener( Window* pWin, sal_Bool bAdd );
void ClearCallbackLink();
// XEventListener
diff --git a/svtools/inc/svtools/colctrl.hxx b/svtools/inc/svtools/colctrl.hxx
index d76f8e881269..7841ce93952e 100644
--- a/svtools/inc/svtools/colctrl.hxx
+++ b/svtools/inc/svtools/colctrl.hxx
@@ -72,7 +72,7 @@ public:
Color GetColor() const { return maColor; };
void SetColor( const Color& rCol );
- void SetColor( const ColorHSB& rCol, BOOL bSetColor = TRUE );
+ void SetColor( const ColorHSB& rCol, sal_Bool bSetColor = sal_True );
short GetLuminance() const { return mnLuminance; };
void SetLuminance( short nLum );
@@ -111,27 +111,27 @@ enum CMCPosition { CMC_TOPLEFT, CMC_TOPRIGHT, CMC_BOTTOMLEFT, CMC_BOTTOMRIGHT, C
class ColorMixingControl : public ValueSet
{
private:
- USHORT mnRows;
- USHORT mnColumns;
+ sal_uInt16 mnRows;
+ sal_uInt16 mnColumns;
Color maColor[4];
void Initialize();
- Color CalcDifferenceColor( USHORT nCol1, USHORT nCol2, USHORT nSteps );
- void FillRow( USHORT nRow );
- void FillColumn( USHORT nColumn );
+ Color CalcDifferenceColor( sal_uInt16 nCol1, sal_uInt16 nCol2, sal_uInt16 nSteps );
+ void FillRow( sal_uInt16 nRow );
+ void FillColumn( sal_uInt16 nColumn );
public:
ColorMixingControl( Window* pParent, WinBits nStyle = 0,
- USHORT nRows = 4, USHORT nColumns = 4 );
+ sal_uInt16 nRows = 4, sal_uInt16 nColumns = 4 );
ColorMixingControl( Window* pParent, const ResId& rResId,
- USHORT nRows = 4, USHORT nColumns = 4 );
+ sal_uInt16 nRows = 4, sal_uInt16 nColumns = 4 );
~ColorMixingControl();
- USHORT GetRows() const { return mnRows; };
- void SetRows( USHORT nRows );
- USHORT GetColumns() const { return mnColumns; };
- void SetColumns( USHORT nColumns );
+ sal_uInt16 GetRows() const { return mnRows; };
+ void SetRows( sal_uInt16 nRows );
+ sal_uInt16 GetColumns() const { return mnColumns; };
+ void SetColumns( sal_uInt16 nColumns );
using ValueSet::GetColor;
Color GetColor( CMCPosition ePos ) const { return maColor[ ePos ]; };
@@ -149,23 +149,23 @@ public:
class ColorHSB
{
private:
- USHORT mnHue; // Farbwinkel, 360 Grad
- USHORT mnSat; // Saturation, 100 %
- USHORT mnBri; // Brightness, 100 %
+ sal_uInt16 mnHue; // Farbwinkel, 360 Grad
+ sal_uInt16 mnSat; // Saturation, 100 %
+ sal_uInt16 mnBri; // Brightness, 100 %
public:
ColorHSB()
{ mnHue=0; mnSat=0; mnBri=0; }
- ColorHSB( USHORT nH, USHORT nS, USHORT nB )
+ ColorHSB( sal_uInt16 nH, sal_uInt16 nS, sal_uInt16 nB )
{ mnHue=nH; mnSat=nS; mnBri=nB; }
ColorHSB( const Color& rColor );
- void SetHue( USHORT nH ) { mnHue=nH; }
- void SetSat( USHORT nS ) { mnSat=nS; }
- void SetBri( USHORT nB ) { mnBri=nB; }
- USHORT GetHue() const { return mnHue; }
- USHORT GetSat() const { return mnSat; }
- USHORT GetBri() const { return mnBri; }
+ void SetHue( sal_uInt16 nH ) { mnHue=nH; }
+ void SetSat( sal_uInt16 nS ) { mnSat=nS; }
+ void SetBri( sal_uInt16 nB ) { mnBri=nB; }
+ sal_uInt16 GetHue() const { return mnHue; }
+ sal_uInt16 GetSat() const { return mnSat; }
+ sal_uInt16 GetBri() const { return mnBri; }
Color GetRGB() const;
};
@@ -176,26 +176,26 @@ public:
class ColorCMYK
{
private:
- USHORT mnCyan;
- USHORT mnMagenta;
- USHORT mnYellow;
- USHORT mnKey;
+ sal_uInt16 mnCyan;
+ sal_uInt16 mnMagenta;
+ sal_uInt16 mnYellow;
+ sal_uInt16 mnKey;
public:
ColorCMYK()
{ mnCyan=0; mnMagenta=0; mnYellow=0; mnKey=100; }
- ColorCMYK( USHORT nC, USHORT nM, USHORT nY, USHORT nK )
+ ColorCMYK( sal_uInt16 nC, sal_uInt16 nM, sal_uInt16 nY, sal_uInt16 nK )
{ mnCyan=nC; mnMagenta=nM; mnYellow=nY; mnKey=nK; }
ColorCMYK( const Color& rColor );
- void SetCyan( USHORT nC ) { mnCyan=nC; }
- void SetMagenta( USHORT nM ) { mnMagenta=nM; }
- void SetYellow( USHORT nY ) { mnYellow=nY; }
- void SetKey( USHORT nK ) { mnKey=nK; }
- USHORT GetCyan() const { return mnCyan; }
- USHORT GetMagenta() const { return mnMagenta; }
- USHORT GetYellow() const { return mnYellow; }
- USHORT GetKey() const { return mnKey; }
+ void SetCyan( sal_uInt16 nC ) { mnCyan=nC; }
+ void SetMagenta( sal_uInt16 nM ) { mnMagenta=nM; }
+ void SetYellow( sal_uInt16 nY ) { mnYellow=nY; }
+ void SetKey( sal_uInt16 nK ) { mnKey=nK; }
+ sal_uInt16 GetCyan() const { return mnCyan; }
+ sal_uInt16 GetMagenta() const { return mnMagenta; }
+ sal_uInt16 GetYellow() const { return mnYellow; }
+ sal_uInt16 GetKey() const { return mnKey; }
Color GetRGB() const;
};
diff --git a/svtools/inc/svtools/ctrlbox.hxx b/svtools/inc/svtools/ctrlbox.hxx
index 9e6e942daf1e..46e3a64d49f6 100644
--- a/svtools/inc/svtools/ctrlbox.hxx
+++ b/svtools/inc/svtools/ctrlbox.hxx
@@ -181,60 +181,60 @@ public:
virtual void UserDraw( const UserDrawEvent& rUDEvt );
using ListBox::InsertEntry;
- virtual USHORT InsertEntry( const XubString& rStr,
- USHORT nPos = LISTBOX_APPEND );
- virtual USHORT InsertEntry( const Color& rColor, const XubString& rStr,
- USHORT nPos = LISTBOX_APPEND );
+ virtual sal_uInt16 InsertEntry( const XubString& rStr,
+ sal_uInt16 nPos = LISTBOX_APPEND );
+ virtual sal_uInt16 InsertEntry( const Color& rColor, const XubString& rStr,
+ sal_uInt16 nPos = LISTBOX_APPEND );
void InsertAutomaticEntry();
using ListBox::RemoveEntry;
- virtual void RemoveEntry( USHORT nPos );
+ virtual void RemoveEntry( sal_uInt16 nPos );
virtual void Clear();
void CopyEntries( const ColorListBox& rBox );
using ListBox::GetEntryPos;
- virtual USHORT GetEntryPos( const Color& rColor ) const;
- virtual Color GetEntryColor( USHORT nPos ) const;
+ virtual sal_uInt16 GetEntryPos( const Color& rColor ) const;
+ virtual Color GetEntryColor( sal_uInt16 nPos ) const;
Size GetImageSize() const { return aImageSize; }
- void SelectEntry( const XubString& rStr, BOOL bSelect = TRUE )
+ void SelectEntry( const XubString& rStr, sal_Bool bSelect = sal_True )
{ ListBox::SelectEntry( rStr, bSelect ); }
- void SelectEntry( const Color& rColor, BOOL bSelect = TRUE );
- XubString GetSelectEntry( USHORT nSelIndex = 0 ) const
+ void SelectEntry( const Color& rColor, sal_Bool bSelect = sal_True );
+ XubString GetSelectEntry( sal_uInt16 nSelIndex = 0 ) const
{ return ListBox::GetSelectEntry( nSelIndex ); }
- Color GetSelectEntryColor( USHORT nSelIndex = 0 ) const;
- BOOL IsEntrySelected( const XubString& rStr ) const
+ Color GetSelectEntryColor( sal_uInt16 nSelIndex = 0 ) const;
+ sal_Bool IsEntrySelected( const XubString& rStr ) const
{ return ListBox::IsEntrySelected( rStr ); }
- BOOL IsEntrySelected( const Color& rColor ) const;
+ sal_Bool IsEntrySelected( const Color& rColor ) const;
private:
// declared as private because some compilers would generate the default functions
ColorListBox( const ColorListBox& );
ColorListBox& operator =( const ColorListBox& );
- void SetEntryData( USHORT nPos, void* pNewData );
- void* GetEntryData( USHORT nPos ) const;
+ void SetEntryData( sal_uInt16 nPos, void* pNewData );
+ void* GetEntryData( sal_uInt16 nPos ) const;
};
-inline void ColorListBox::SelectEntry( const Color& rColor, BOOL bSelect )
+inline void ColorListBox::SelectEntry( const Color& rColor, sal_Bool bSelect )
{
- USHORT nPos = GetEntryPos( rColor );
+ sal_uInt16 nPos = GetEntryPos( rColor );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
ListBox::SelectEntryPos( nPos, bSelect );
}
-inline BOOL ColorListBox::IsEntrySelected( const Color& rColor ) const
+inline sal_Bool ColorListBox::IsEntrySelected( const Color& rColor ) const
{
- USHORT nPos = GetEntryPos( rColor );
+ sal_uInt16 nPos = GetEntryPos( rColor );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
return IsEntryPosSelected( nPos );
else
- return FALSE;
+ return sal_False;
}
-inline Color ColorListBox::GetSelectEntryColor( USHORT nSelIndex ) const
+inline Color ColorListBox::GetSelectEntryColor( sal_uInt16 nSelIndex ) const
{
- USHORT nPos = GetSelectEntryPos( nSelIndex );
+ sal_uInt16 nPos = GetSelectEntryPos( nSelIndex );
Color aColor;
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
aColor = GetEntryColor( nPos );
@@ -259,7 +259,7 @@ class SVT_DLLPUBLIC LineListBox : public ListBox
using Window::ImplInit;
SVT_DLLPRIVATE void ImplInit();
void UpdateLineColors( void );
- BOOL UpdatePaintLineColor( void ); // returns TRUE if maPaintCol has changed
+ sal_Bool UpdatePaintLineColor( void ); // returns sal_True if maPaintCol has changed
inline const Color& GetPaintColor( void ) const;
virtual void DataChanged( const DataChangedEvent& rDCEvt );
@@ -269,25 +269,25 @@ public:
virtual ~LineListBox();
using ListBox::InsertEntry;
- virtual USHORT InsertEntry( const XubString& rStr, USHORT nPos = LISTBOX_APPEND );
- virtual USHORT InsertEntry( long nLine1, long nLine2 = 0, long nDistance = 0, USHORT nPos = LISTBOX_APPEND );
+ virtual sal_uInt16 InsertEntry( const XubString& rStr, sal_uInt16 nPos = LISTBOX_APPEND );
+ virtual sal_uInt16 InsertEntry( long nLine1, long nLine2 = 0, long nDistance = 0, sal_uInt16 nPos = LISTBOX_APPEND );
using ListBox::RemoveEntry;
- virtual void RemoveEntry( USHORT nPos );
+ virtual void RemoveEntry( sal_uInt16 nPos );
virtual void Clear();
using ListBox::GetEntryPos;
- USHORT GetEntryPos( long nLine1, long nLine2 = 0, long nDistance = 0 ) const;
- long GetEntryLine1( USHORT nPos ) const;
- long GetEntryLine2( USHORT nPos ) const;
- long GetEntryDistance( USHORT nPos ) const;
-
- inline void SelectEntry( const XubString& rStr, BOOL bSelect = TRUE ) { ListBox::SelectEntry( rStr, bSelect ); }
- void SelectEntry( long nLine1, long nLine2 = 0, long nDistance = 0, BOOL bSelect = TRUE );
- long GetSelectEntryLine1( USHORT nSelIndex = 0 ) const;
- long GetSelectEntryLine2( USHORT nSelIndex = 0 ) const;
- long GetSelectEntryDistance( USHORT nSelIndex = 0 ) const;
- inline BOOL IsEntrySelected( const XubString& rStr ) const { return ListBox::IsEntrySelected( rStr ); }
- BOOL IsEntrySelected( long nLine1, long nLine2 = 0, long nDistance = 0 ) const;
+ sal_uInt16 GetEntryPos( long nLine1, long nLine2 = 0, long nDistance = 0 ) const;
+ long GetEntryLine1( sal_uInt16 nPos ) const;
+ long GetEntryLine2( sal_uInt16 nPos ) const;
+ long GetEntryDistance( sal_uInt16 nPos ) const;
+
+ inline void SelectEntry( const XubString& rStr, sal_Bool bSelect = sal_True ) { ListBox::SelectEntry( rStr, bSelect ); }
+ void SelectEntry( long nLine1, long nLine2 = 0, long nDistance = 0, sal_Bool bSelect = sal_True );
+ long GetSelectEntryLine1( sal_uInt16 nSelIndex = 0 ) const;
+ long GetSelectEntryLine2( sal_uInt16 nSelIndex = 0 ) const;
+ long GetSelectEntryDistance( sal_uInt16 nSelIndex = 0 ) const;
+ inline sal_Bool IsEntrySelected( const XubString& rStr ) const { return ListBox::IsEntrySelected( rStr ); }
+ sal_Bool IsEntrySelected( long nLine1, long nLine2 = 0, long nDistance = 0 ) const;
inline void SetUnit( FieldUnit eNewUnit ) { eUnit = eNewUnit; }
inline FieldUnit GetUnit() const { return eUnit; }
@@ -301,51 +301,51 @@ private:
// declared as private because some compilers would generate the default methods
LineListBox( const LineListBox& );
LineListBox& operator =( const LineListBox& );
- void SetEntryData( USHORT nPos, void* pNewData );
- void* GetEntryData( USHORT nPos ) const;
+ void SetEntryData( sal_uInt16 nPos, void* pNewData );
+ void* GetEntryData( sal_uInt16 nPos ) const;
};
-inline void LineListBox::SelectEntry( long nLine1, long nLine2, long nDistance, BOOL bSelect )
+inline void LineListBox::SelectEntry( long nLine1, long nLine2, long nDistance, sal_Bool bSelect )
{
- USHORT nPos = GetEntryPos( nLine1, nLine2, nDistance );
+ sal_uInt16 nPos = GetEntryPos( nLine1, nLine2, nDistance );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
ListBox::SelectEntryPos( nPos, bSelect );
}
-inline long LineListBox::GetSelectEntryLine1( USHORT nSelIndex ) const
+inline long LineListBox::GetSelectEntryLine1( sal_uInt16 nSelIndex ) const
{
- USHORT nPos = GetSelectEntryPos( nSelIndex );
+ sal_uInt16 nPos = GetSelectEntryPos( nSelIndex );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
return GetEntryLine1( nPos );
else
return 0;
}
-inline long LineListBox::GetSelectEntryLine2( USHORT nSelIndex ) const
+inline long LineListBox::GetSelectEntryLine2( sal_uInt16 nSelIndex ) const
{
- USHORT nPos = GetSelectEntryPos( nSelIndex );
+ sal_uInt16 nPos = GetSelectEntryPos( nSelIndex );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
return GetEntryLine2( nPos );
else
return 0;
}
-inline long LineListBox::GetSelectEntryDistance( USHORT nSelIndex ) const
+inline long LineListBox::GetSelectEntryDistance( sal_uInt16 nSelIndex ) const
{
- USHORT nPos = GetSelectEntryPos( nSelIndex );
+ sal_uInt16 nPos = GetSelectEntryPos( nSelIndex );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
return GetEntryDistance( nPos );
else
return 0;
}
-inline BOOL LineListBox::IsEntrySelected( long nLine1, long nLine2, long nDistance ) const
+inline sal_Bool LineListBox::IsEntrySelected( long nLine1, long nLine2, long nDistance ) const
{
- USHORT nPos = GetEntryPos( nLine1, nLine2, nDistance );
+ sal_uInt16 nPos = GetEntryPos( nLine1, nLine2, nDistance );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
return IsEntryPosSelected( nPos );
else
- return FALSE;
+ return sal_False;
}
inline void LineListBox::SetColor( const Color& rColor )
@@ -372,8 +372,8 @@ private:
Image maImagePrinterFont;
Image maImageBitmapFont;
Image maImageScalableFont;
- BOOL mbWYSIWYG;
- BOOL mbSymbols;
+ sal_Bool mbWYSIWYG;
+ sal_Bool mbSymbols;
#ifdef _CTRLBOX_CXX
SVT_DLLPRIVATE void ImplCalcUserItemSize();
@@ -393,11 +393,11 @@ public:
void Fill( const FontList* pList );
- void EnableWYSIWYG( BOOL bEnable = TRUE );
- BOOL IsWYSIWYGEnabled() const { return mbWYSIWYG; }
+ void EnableWYSIWYG( sal_Bool bEnable = sal_True );
+ sal_Bool IsWYSIWYGEnabled() const { return mbWYSIWYG; }
- void EnableSymbols( BOOL bEnable = TRUE );
- BOOL IsSymbolsEnabled() const { return mbSymbols; }
+ void EnableSymbols( sal_Bool bEnable = sal_True );
+ sal_Bool IsSymbolsEnabled() const { return mbSymbols; }
private:
// declared as private because some compilers would generate the default functions
@@ -447,13 +447,13 @@ class SVT_DLLPUBLIC FontSizeBox : public MetricBox
{
FontInfo aFontInfo;
const FontList* pFontList;
- USHORT nRelMin;
- USHORT nRelMax;
- USHORT nRelStep;
+ sal_uInt16 nRelMin;
+ sal_uInt16 nRelMax;
+ sal_uInt16 nRelStep;
short nPtRelMin;
short nPtRelMax;
short nPtRelStep;
- BOOL bRelativeMode:1,
+ sal_Bool bRelativeMode:1,
bRelative:1,
bPtRelative:1,
bStdSize:1;
@@ -476,22 +476,22 @@ public:
void Fill( const FontInfo* pInfo, const FontList* pList );
- void EnableRelativeMode( USHORT nMin = 50, USHORT nMax = 150,
- USHORT nStep = 5 );
+ void EnableRelativeMode( sal_uInt16 nMin = 50, sal_uInt16 nMax = 150,
+ sal_uInt16 nStep = 5 );
void EnablePtRelativeMode( short nMin = -200, short nMax = 200,
short nStep = 10 );
- BOOL IsRelativeMode() const { return bRelativeMode; }
- void SetRelative( BOOL bRelative = FALSE );
- BOOL IsRelative() const { return bRelative; }
- void SetPtRelative( BOOL bPtRel = TRUE )
- { bPtRelative = bPtRel; SetRelative( TRUE ); }
- BOOL IsPtRelative() const { return bPtRelative; }
+ sal_Bool IsRelativeMode() const { return bRelativeMode; }
+ void SetRelative( sal_Bool bRelative = sal_False );
+ sal_Bool IsRelative() const { return bRelative; }
+ void SetPtRelative( sal_Bool bPtRel = sal_True )
+ { bPtRelative = bPtRel; SetRelative( sal_True ); }
+ sal_Bool IsPtRelative() const { return bPtRelative; }
virtual void SetValue( sal_Int64 nNewValue, FieldUnit eInUnit );
virtual void SetValue( sal_Int64 nNewValue );
virtual sal_Int64 GetValue( FieldUnit eOutUnit ) const;
virtual sal_Int64 GetValue() const;
- sal_Int64 GetValue( USHORT nPos, FieldUnit eOutUnit ) const;
+ sal_Int64 GetValue( sal_uInt16 nPos, FieldUnit eOutUnit ) const;
void SetUserValue( sal_Int64 nNewValue, FieldUnit eInUnit );
void SetUserValue( sal_Int64 nNewValue ) { SetUserValue( nNewValue, FUNIT_NONE ); }
diff --git a/svtools/inc/svtools/ctrltool.hxx b/svtools/inc/svtools/ctrltool.hxx
index a0eb5db2b955..8444951a8623 100644
--- a/svtools/inc/svtools/ctrltool.hxx
+++ b/svtools/inc/svtools/ctrltool.hxx
@@ -63,7 +63,7 @@ class FontNameMenu, class FontStyleMenu, class FontSizeMenu
--------------------------------------------------------------------------
FontList::FontList( OutputDevice* pDevice, OutputDevice* pDevice2 = NULL,
- BOOL bAll = TRUE );
+ sal_Bool bAll = sal_True );
Konstruktor der Klasse FontList. Vom uebergebenen OutputDevice werden die
entsprechenden Fonts abgefragt. Das OutputDevice muss solange existieren,
@@ -80,8 +80,8 @@ Device-Schriften (eine fuer Drucker und eine fuer den Bildschirm) vorhanden
sind, wird die vom uebergebenen Device "pDevice" bevorzugt.
Mit dem dritten Parameter kann man angeben, ob nur skalierbare Schriften
-abgefragt werden sollen oder alle. Wenn TRUE uebergeben wird, werden auch
-Bitmap-Schriften mit abgefragt. Bei FALSE werden Vector-Schriften und
+abgefragt werden sollen oder alle. Wenn sal_True uebergeben wird, werden auch
+Bitmap-Schriften mit abgefragt. Bei sal_False werden Vector-Schriften und
scalierbare Schriften abgefragt.
--------------------------------------------------------------------------
@@ -147,11 +147,11 @@ von der FontList, sollte deshalb das Array nicht mehr referenziert werden.
// - FontList -
// ------------
-#define FONTLIST_FONTINFO_NOTFOUND ((USHORT)0xFFFF)
+#define FONTLIST_FONTINFO_NOTFOUND ((sal_uInt16)0xFFFF)
-#define FONTLIST_FONTNAMETYPE_PRINTER ((USHORT)0x0001)
-#define FONTLIST_FONTNAMETYPE_SCREEN ((USHORT)0x0002)
-#define FONTLIST_FONTNAMETYPE_SCALABLE ((USHORT)0x0004)
+#define FONTLIST_FONTNAMETYPE_PRINTER ((sal_uInt16)0x0001)
+#define FONTLIST_FONTNAMETYPE_SCREEN ((sal_uInt16)0x0002)
+#define FONTLIST_FONTNAMETYPE_SCALABLE ((sal_uInt16)0x0004)
class SVT_DLLPUBLIC FontList : private List
{
@@ -175,16 +175,16 @@ private:
OutputDevice* mpDev2;
#ifdef CTRLTOOL_CXX
- SVT_DLLPRIVATE ImplFontListNameInfo* ImplFind( const XubString& rSearchName, ULONG* pIndex ) const;
+ SVT_DLLPRIVATE ImplFontListNameInfo* ImplFind( const XubString& rSearchName, sal_uLong* pIndex ) const;
SVT_DLLPRIVATE ImplFontListNameInfo* ImplFindByName( const XubString& rStr ) const;
- SVT_DLLPRIVATE void ImplInsertFonts( OutputDevice* pDev, BOOL bAll,
- BOOL bInsertData );
+ SVT_DLLPRIVATE void ImplInsertFonts( OutputDevice* pDev, sal_Bool bAll,
+ sal_Bool bInsertData );
#endif
public:
FontList( OutputDevice* pDevice,
OutputDevice* pDevice2 = NULL,
- BOOL bAll = TRUE );
+ sal_Bool bAll = sal_True );
~FontList();
FontList* Clone() const;
@@ -192,7 +192,7 @@ public:
OutputDevice* GetDevice() const { return mpDev; }
OutputDevice* GetDevice2() const { return mpDev2; }
XubString GetFontMapText( const FontInfo& rInfo ) const;
- USHORT GetFontNameType( const XubString& rFontName ) const;
+ sal_uInt16 GetFontNameType( const XubString& rFontName ) const;
const XubString& GetNormalStr() const { return maNormal; }
const XubString& GetItalicStr() const { return maNormalItalic; }
@@ -207,11 +207,11 @@ public:
FontWeight eWeight,
FontItalic eItalic ) const;
- BOOL IsAvailable( const XubString& rName ) const;
- USHORT GetFontNameCount() const
- { return (USHORT)List::Count(); }
- const FontInfo& GetFontName( USHORT nFont ) const;
- USHORT GetFontNameType( USHORT nFont ) const;
+ sal_Bool IsAvailable( const XubString& rName ) const;
+ sal_uInt16 GetFontNameCount() const
+ { return (sal_uInt16)List::Count(); }
+ const FontInfo& GetFontName( sal_uInt16 nFont ) const;
+ sal_uInt16 GetFontNameType( sal_uInt16 nFont ) const;
sal_Handle GetFirstFontInfo( const XubString& rName ) const;
sal_Handle GetNextFontInfo( sal_Handle hFontInfo ) const;
const FontInfo& GetFontInfo( sal_Handle hFontInfo ) const;
@@ -233,19 +233,19 @@ class SVT_DLLPUBLIC FontSizeNames
{
private:
struct ImplFSNameItem* mpArray;
- ULONG mnElem;
+ sal_uLong mnElem;
public:
FontSizeNames( LanguageType eLanguage /* = LANGUAGE_DONTKNOW */ );
- ULONG Count() const { return mnElem; }
- BOOL IsEmpty() const { return !mnElem; }
+ sal_uLong Count() const { return mnElem; }
+ sal_Bool IsEmpty() const { return !mnElem; }
long Name2Size( const String& ) const;
String Size2Name( long ) const;
- String GetIndexName( ULONG nIndex ) const;
- long GetIndexSize( ULONG nIndex ) const;
+ String GetIndexName( sal_uLong nIndex ) const;
+ long GetIndexSize( sal_uLong nIndex ) const;
};
#endif // _CTRLTOOL_HXX
diff --git a/svtools/inc/svtools/editbrowsebox.hxx b/svtools/inc/svtools/editbrowsebox.hxx
index 26ff11e11ca2..24a8baa8ac4b 100644
--- a/svtools/inc/svtools/editbrowsebox.hxx
+++ b/svtools/inc/svtools/editbrowsebox.hxx
@@ -99,7 +99,7 @@ namespace svt
protected:
Control* pWindow;
- sal_Bool bSuspended; // <TRUE> if the window is hidden and disabled
+ sal_Bool bSuspended; // <sal_True> if the window is hidden and disabled
public:
TYPEINFO();
@@ -142,8 +142,8 @@ namespace svt
virtual String GetText( LineEnd aSeparator ) const = 0;
virtual void SetText( const String& _rStr ) = 0;
- virtual BOOL IsReadOnly() const = 0;
- virtual void SetReadOnly( BOOL bReadOnly ) = 0;
+ virtual sal_Bool IsReadOnly() const = 0;
+ virtual void SetReadOnly( sal_Bool bReadOnly ) = 0;
virtual xub_StrLen GetMaxTextLen() const = 0;
virtual void SetMaxTextLen( xub_StrLen _nMaxLen ) = 0;
@@ -178,8 +178,8 @@ namespace svt
virtual String GetText( LineEnd aSeparator ) const;
virtual void SetText( const String& _rStr );
- virtual BOOL IsReadOnly() const;
- virtual void SetReadOnly( BOOL bReadOnly );
+ virtual sal_Bool IsReadOnly() const;
+ virtual void SetReadOnly( sal_Bool bReadOnly );
virtual xub_StrLen GetMaxTextLen() const;
virtual void SetMaxTextLen( xub_StrLen _nMaxLen );
@@ -220,7 +220,7 @@ namespace svt
virtual void Modify();
private:
- BOOL dispatchKeyEvent( const KeyEvent& _rEvent );
+ sal_Bool dispatchKeyEvent( const KeyEvent& _rEvent );
};
//==================================================================
@@ -246,7 +246,7 @@ namespace svt
class SVT_DLLPUBLIC EditCellController : public CellController
{
IEditImplementation* m_pEditImplementation;
- BOOL m_bOwnImplementation; // did we create m_pEditImplementation?
+ sal_Bool m_bOwnImplementation; // did we create m_pEditImplementation?
public:
TYPEINFO();
@@ -302,7 +302,7 @@ namespace svt
virtual void GetFocus();
virtual long PreNotify(NotifyEvent& rEvt);
virtual void Paint(const Rectangle& rClientRect);
- virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags );
+ virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags );
virtual void StateChanged( StateChangedType nStateChange );
virtual void DataChanged( const DataChangedEvent& _rEvent );
virtual void Resize();
@@ -487,7 +487,7 @@ namespace svt
CellControllerRef aController,
aOldController;
- ULONG nStartEvent, nEndEvent, nCellModifiedEvent; // event ids
+ sal_uLong nStartEvent, nEndEvent, nCellModifiedEvent; // event ids
Window* m_pFocusWhileRequest;
// In ActivateCell, we grab the focus asynchronously, but if between requesting activation
// and the asynchornous event the focus has changed, we won't grab it for ourself.
@@ -664,7 +664,7 @@ namespace svt
virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint);
::com::sun::star::uno::Reference<
- ::com::sun::star::accessibility::XAccessible > CreateAccessibleCheckBoxCell(long _nRow, USHORT _nColumnPos,const TriState& eState,sal_Bool _bEnabled=sal_True);
+ ::com::sun::star::accessibility::XAccessible > CreateAccessibleCheckBoxCell(long _nRow, sal_uInt16 _nColumnPos,const TriState& eState,sal_Bool _bEnabled=sal_True);
protected:
// creates the accessible which wraps the active cell
void implCreateActiveAccessible( );
diff --git a/svtools/inc/svtools/editimplementation.hxx b/svtools/inc/svtools/editimplementation.hxx
index 987d94c7bcee..fcdd140d78d6 100644
--- a/svtools/inc/svtools/editimplementation.hxx
+++ b/svtools/inc/svtools/editimplementation.hxx
@@ -74,14 +74,14 @@ void GenericEditImplementation< EDIT >::SetSelection( const Selection& _rSelecti
//----------------------------------------------------------------------
template <class EDIT>
-void GenericEditImplementation< EDIT >::SetReadOnly( BOOL bReadOnly )
+void GenericEditImplementation< EDIT >::SetReadOnly( sal_Bool bReadOnly )
{
m_rEdit.SetReadOnly( bReadOnly );
}
//----------------------------------------------------------------------
template <class EDIT>
-BOOL GenericEditImplementation< EDIT >::IsReadOnly() const
+sal_Bool GenericEditImplementation< EDIT >::IsReadOnly() const
{
return m_rEdit.IsReadOnly();
}
diff --git a/svtools/inc/svtools/editsyntaxhighlighter.hxx b/svtools/inc/svtools/editsyntaxhighlighter.hxx
index 01add0c4ce1d..aca298fd1d31 100644
--- a/svtools/inc/svtools/editsyntaxhighlighter.hxx
+++ b/svtools/inc/svtools/editsyntaxhighlighter.hxx
@@ -41,7 +41,7 @@ class SVT_DLLPUBLIC MultiLineEditSyntaxHighlight : public MultiLineEdit
svtools::ColorConfig m_aColorConfig;
private:
- virtual void DoBracketHilight(USHORT aKey);
+ virtual void DoBracketHilight(sal_uInt16 aKey);
protected:
virtual long PreNotify( NotifyEvent& rNEvt );
diff --git a/svtools/inc/svtools/ehdl.hxx b/svtools/inc/svtools/ehdl.hxx
index 967c41636ea3..56255f48f2f2 100644
--- a/svtools/inc/svtools/ehdl.hxx
+++ b/svtools/inc/svtools/ehdl.hxx
@@ -43,16 +43,16 @@ class SVT_DLLPUBLIC SfxErrorContext : private ErrorContext
{
public:
SfxErrorContext(
- USHORT nCtxIdP, Window *pWin=0,
- USHORT nResIdP=USHRT_MAX, ResMgr *pMgrP=0);
+ sal_uInt16 nCtxIdP, Window *pWin=0,
+ sal_uInt16 nResIdP=USHRT_MAX, ResMgr *pMgrP=0);
SfxErrorContext(
- USHORT nCtxIdP, const String &aArg1, Window *pWin=0,
- USHORT nResIdP=USHRT_MAX, ResMgr *pMgrP=0);
- virtual BOOL GetString(ULONG nErrId, String &rStr);
+ sal_uInt16 nCtxIdP, const String &aArg1, Window *pWin=0,
+ sal_uInt16 nResIdP=USHRT_MAX, ResMgr *pMgrP=0);
+ virtual sal_Bool GetString(sal_uLong nErrId, String &rStr);
private:
- USHORT nCtxId;
- USHORT nResId;
+ sal_uInt16 nCtxId;
+ sal_uInt16 nResId;
ResMgr *pMgr;
String aArg1;
};
@@ -60,26 +60,26 @@ private:
class SVT_DLLPUBLIC SfxErrorHandler : private ErrorHandler
{
public:
- SfxErrorHandler(USHORT nId, ULONG lStart, ULONG lEnd, ResMgr *pMgr=0);
+ SfxErrorHandler(sal_uInt16 nId, sal_uLong lStart, sal_uLong lEnd, ResMgr *pMgr=0);
~SfxErrorHandler();
protected:
- virtual BOOL GetErrorString(ULONG lErrId, String &, USHORT&) const;
- virtual BOOL GetMessageString(ULONG lErrId, String &, USHORT&) const;
+ virtual sal_Bool GetErrorString(sal_uLong lErrId, String &, sal_uInt16&) const;
+ virtual sal_Bool GetMessageString(sal_uLong lErrId, String &, sal_uInt16&) const;
private:
- ULONG lStart;
- ULONG lEnd;
- USHORT nId;
+ sal_uLong lStart;
+ sal_uLong lEnd;
+ sal_uInt16 nId;
ResMgr *pMgr;
ResMgr *pFreeMgr;
//#if 0 // _SOLAR__PRIVATE
- SVT_DLLPRIVATE BOOL GetClassString(ULONG lErrId, String &) const;
+ SVT_DLLPRIVATE sal_Bool GetClassString(sal_uLong lErrId, String &) const;
//#endif
- virtual BOOL CreateString(
- const ErrorInfo *, String &, USHORT &) const;
+ virtual sal_Bool CreateString(
+ const ErrorInfo *, String &, sal_uInt16 &) const;
};
#endif
diff --git a/svtools/inc/svtools/embedhlp.hxx b/svtools/inc/svtools/embedhlp.hxx
index bc9770c1bcc8..46169d645c91 100644
--- a/svtools/inc/svtools/embedhlp.hxx
+++ b/svtools/inc/svtools/embedhlp.hxx
@@ -57,8 +57,8 @@ namespace svt
EmbeddedObjectRef_Impl* mpImp;
NS_UNO::Reference < NS_EMBED::XEmbeddedObject > mxObj;
- SVT_DLLPRIVATE SvStream* GetGraphicStream( BOOL bUpdate ) const;
- /* SVT_DLLPRIVATE */ void GetReplacement( BOOL bUpdate );
+ SVT_DLLPRIVATE SvStream* GetGraphicStream( sal_Bool bUpdate ) const;
+ /* SVT_DLLPRIVATE */ void GetReplacement( sal_Bool bUpdate );
SVT_DLLPRIVATE void Construct_Impl();
EmbeddedObjectRef& operator = ( const EmbeddedObjectRef& );
@@ -69,7 +69,7 @@ namespace svt
static void DrawPaintReplacement( const Rectangle &rRect, const String &rText, OutputDevice *pOut );
static void DrawShading( const Rectangle &rRect, OutputDevice *pOut );
- static BOOL TryRunningState( const NS_UNO::Reference < NS_EMBED::XEmbeddedObject >& );
+ static sal_Bool TryRunningState( const NS_UNO::Reference < NS_EMBED::XEmbeddedObject >& );
static void SetGraphicToContainer( const Graphic& rGraphic,
comphelper::EmbeddedObjectContainer& aContainer,
const ::rtl::OUString& aName,
@@ -94,7 +94,7 @@ namespace svt
~EmbeddedObjectRef();
EmbeddedObjectRef( const EmbeddedObjectRef& );
- BOOL TryRunningState();
+ sal_Bool TryRunningState();
// assigning to a container enables the object to exchange graphical representations with a storage
void AssignToContainer( comphelper::EmbeddedObjectContainer* pContainer, const ::rtl::OUString& rPersistName );
@@ -117,15 +117,15 @@ namespace svt
const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInGrStream,
const ::rtl::OUString& rMediaType );
- void UpdateReplacement() { GetReplacement( TRUE ); }
+ void UpdateReplacement() { GetReplacement( sal_True ); }
void UpdateReplacementOnDemand();
MapUnit GetMapUnit() const;
- void Lock( BOOL bLock = TRUE );
- BOOL IsLocked() const;
+ void Lock( sal_Bool bLock = sal_True );
+ sal_Bool IsLocked() const;
void Clear();
- BOOL is() const { return mxObj.is(); }
+ sal_Bool is() const { return mxObj.is(); }
- BOOL IsChart() const;
+ sal_Bool IsChart() const;
// #i104867#
// Provides a graphic version number for the fetchable Graphic during this object's lifetime. Internally,
diff --git a/svtools/inc/svtools/expander.hxx b/svtools/inc/svtools/expander.hxx
index c0f3cfc7632a..ec53a515c989 100644
--- a/svtools/inc/svtools/expander.hxx
+++ b/svtools/inc/svtools/expander.hxx
@@ -52,9 +52,9 @@ private:
Image aActiveImage;
Rectangle maFocusRect;
ImageList maExpanderImages;
- BOOL mbIsExpanded;
- BOOL mbHasFocusRect;
- BOOL mbIsInMouseDown;
+ sal_Bool mbIsExpanded;
+ sal_Bool mbHasFocusRect;
+ sal_Bool mbIsInMouseDown;
Link maToggleHdl;
SvExpanderStateType eType;
@@ -75,9 +75,9 @@ public:
SvExpander( Window* pParent, WinBits nStyle = 0 );
SvExpander( Window* pParent, const ResId& rResId );
- BOOL IsExpanded() {return mbIsExpanded;}
+ sal_Bool IsExpanded() {return mbIsExpanded;}
- void SetToExpanded(BOOL bFlag=TRUE);
+ void SetToExpanded(sal_Bool bFlag=sal_True);
void SetExpanderImage( SvExpanderStateType eType);
Image GetExpanderImage(SvExpanderStateType eType);
diff --git a/svtools/inc/svtools/filectrl.hxx b/svtools/inc/svtools/filectrl.hxx
index dd314bb23ca1..97475c8b38ca 100644
--- a/svtools/inc/svtools/filectrl.hxx
+++ b/svtools/inc/svtools/filectrl.hxx
@@ -39,14 +39,14 @@
#define STR_FILECTRL_BUTTONTEXT 333 // ID-Range?!
// Flags for FileControl
-typedef USHORT FileControlMode;
-#define FILECTRL_RESIZEBUTTONBYPATHLEN ((USHORT)0x0001)//if this is set, the button will become small as soon as the Text in the Edit Field is to long to be shown completely
+typedef sal_uInt16 FileControlMode;
+#define FILECTRL_RESIZEBUTTONBYPATHLEN ((sal_uInt16)0x0001)//if this is set, the button will become small as soon as the Text in the Edit Field is to long to be shown completely
// Flags for internal use of FileControl
-typedef USHORT FileControlMode_Internal;
-#define FILECTRL_INRESIZE ((USHORT)0x0001)
-#define FILECTRL_ORIGINALBUTTONTEXT ((USHORT)0x0002)
+typedef sal_uInt16 FileControlMode_Internal;
+#define FILECTRL_INRESIZE ((sal_uInt16)0x0001)
+#define FILECTRL_ORIGINALBUTTONTEXT ((sal_uInt16)0x0002)
class SVT_DLLPUBLIC FileControl : public Window
@@ -56,7 +56,7 @@ private:
PushButton maButton;
String maButtonText;
- BOOL mbOpenDlg;
+ sal_Bool mbOpenDlg;
Link maDialogCreatedHdl;
@@ -80,10 +80,10 @@ public:
Edit& GetEdit() { return maEdit; }
PushButton& GetButton() { return maButton; }
- void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags );
+ void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags );
- void SetOpenDialog( BOOL bOpen ) { mbOpenDlg = bOpen; }
- BOOL IsOpenDialog() const { return mbOpenDlg; }
+ void SetOpenDialog( sal_Bool bOpen ) { mbOpenDlg = bOpen; }
+ sal_Bool IsOpenDialog() const { return mbOpenDlg; }
void SetText( const XubString& rStr );
XubString GetText() const;
@@ -92,8 +92,8 @@ public:
void SetSelection( const Selection& rSelection ) { maEdit.SetSelection( rSelection ); }
Selection GetSelection() const { return maEdit.GetSelection(); }
- void SetReadOnly( BOOL bReadOnly = TRUE ) { maEdit.SetReadOnly( bReadOnly ); }
- BOOL IsReadOnly() const { return maEdit.IsReadOnly(); }
+ void SetReadOnly( sal_Bool bReadOnly = sal_True ) { maEdit.SetReadOnly( bReadOnly ); }
+ sal_Bool IsReadOnly() const { return maEdit.IsReadOnly(); }
//------
//manipulate the Button-Text:
diff --git a/svtools/inc/svtools/filedlg.hxx b/svtools/inc/svtools/filedlg.hxx
index c04e48fc7658..59fd393ea73c 100644
--- a/svtools/inc/svtools/filedlg.hxx
+++ b/svtools/inc/svtools/filedlg.hxx
@@ -53,7 +53,7 @@ protected:
UniString aDfltExt; // Default - Extension
public:
- PathDialog( Window* pParent, WinBits nWinStyle = 0, BOOL bCreateDir = TRUE );
+ PathDialog( Window* pParent, WinBits nWinStyle = 0, sal_Bool bCreateDir = sal_True );
~PathDialog();
virtual long OK();
@@ -92,9 +92,9 @@ public:
void RemoveAllFilter();
void SetCurFilter( const UniString& rFilter );
UniString GetCurFilter() const;
- USHORT GetFilterCount() const;
- UniString GetFilterName( USHORT nPos ) const;
- UniString GetFilterType( USHORT nPos ) const;
+ sal_uInt16 GetFilterCount() const;
+ UniString GetFilterName( sal_uInt16 nPos ) const;
+ UniString GetFilterType( sal_uInt16 nPos ) const;
void SetFileSelectHdl( const Link& rLink ) { aFileHdlLink = rLink; }
const Link& GetFileSelectHdl() const { return aFileHdlLink; }
diff --git a/svtools/inc/svtools/fileview.hxx b/svtools/inc/svtools/fileview.hxx
index db704a0e6784..a88009ffa7c3 100644
--- a/svtools/inc/svtools/fileview.hxx
+++ b/svtools/inc/svtools/fileview.hxx
@@ -189,7 +189,7 @@ public:
void SetDoubleClickHdl( const Link& rHdl );
void SetOpenDoneHdl( const Link& rHdl );
- ULONG GetSelectionCount() const;
+ sal_uLong GetSelectionCount() const;
SvLBoxEntry* FirstSelected() const;
SvLBoxEntry* NextSelected( SvLBoxEntry* pEntry ) const;
void EnableAutoResize();
@@ -199,7 +199,7 @@ public:
void EnableDelete( sal_Bool bEnable );
void EnableNameReplacing( sal_Bool bEnable = sal_True );
// translate folder names or display doc-title instead of file name
- // EnableContextMenu( TRUE )/EnableDelete(TRUE) disable name replacing!
+ // EnableContextMenu( sal_True )/EnableDelete(sal_True) disable name replacing!
// save and load column size and sort order
String GetConfigString() const;
diff --git a/svtools/inc/svtools/filter.hxx b/svtools/inc/svtools/filter.hxx
index 8c6f014d4219..66c80dde2d79 100644
--- a/svtools/inc/svtools/filter.hxx
+++ b/svtools/inc/svtools/filter.hxx
@@ -44,7 +44,7 @@
struct ImplDirEntryHelper
{
- static BOOL Exists( const INetURLObject& rObj );
+ static sal_Bool Exists( const INetURLObject& rObj );
static void Kill( const String& rStr );
};
@@ -64,8 +64,8 @@ class Graphic;
#define GRFILTER_OUTHINT_GREY 1
-#define GRFILTER_FORMAT_NOTFOUND ((USHORT)0xFFFF)
-#define GRFILTER_FORMAT_DONTKNOW ((USHORT)0xFFFF)
+#define GRFILTER_FORMAT_NOTFOUND ((sal_uInt16)0xFFFF)
+#define GRFILTER_FORMAT_DONTKNOW ((sal_uInt16)0xFFFF)
#define GRFILTER_I_FLAGS_SET_LOGSIZE_FOR_JPEG 00000001
#define GRFILTER_I_FLAGS_DONT_SET_LOGSIZE_FOR_JPEG 00000002
@@ -107,32 +107,32 @@ class Graphic;
// unterstuetzten Grafik-Fileformate
// ------------------------------------
-#define GFF_NOT ( (USHORT)0x0000 )
-#define GFF_BMP ( (USHORT)0x0001 )
-#define GFF_GIF ( (USHORT)0x0002 )
-#define GFF_JPG ( (USHORT)0x0003 )
-#define GFF_PCD ( (USHORT)0x0004 )
-#define GFF_PCX ( (USHORT)0x0005 )
-#define GFF_PNG ( (USHORT)0x0006 )
-#define GFF_TIF ( (USHORT)0x0007 )
-#define GFF_XBM ( (USHORT)0x0008 )
-#define GFF_XPM ( (USHORT)0x0009 )
-#define GFF_PBM ( (USHORT)0x000a )
-#define GFF_PGM ( (USHORT)0x000b )
-#define GFF_PPM ( (USHORT)0x000c )
-#define GFF_RAS ( (USHORT)0x000d )
-#define GFF_TGA ( (USHORT)0x000e )
-#define GFF_PSD ( (USHORT)0x000f )
-#define GFF_EPS ( (USHORT)0x0010 )
-#define GFF_DXF ( (USHORT)0x00f1 )
-#define GFF_MET ( (USHORT)0x00f2 )
-#define GFF_PCT ( (USHORT)0x00f3 )
-#define GFF_SGF ( (USHORT)0x00f4 )
-#define GFF_SVM ( (USHORT)0x00f5 )
-#define GFF_WMF ( (USHORT)0x00f6 )
-#define GFF_SGV ( (USHORT)0x00f7 )
-#define GFF_EMF ( (USHORT)0x00f8 )
-#define GFF_XXX ( (USHORT)0xffff )
+#define GFF_NOT ( (sal_uInt16)0x0000 )
+#define GFF_BMP ( (sal_uInt16)0x0001 )
+#define GFF_GIF ( (sal_uInt16)0x0002 )
+#define GFF_JPG ( (sal_uInt16)0x0003 )
+#define GFF_PCD ( (sal_uInt16)0x0004 )
+#define GFF_PCX ( (sal_uInt16)0x0005 )
+#define GFF_PNG ( (sal_uInt16)0x0006 )
+#define GFF_TIF ( (sal_uInt16)0x0007 )
+#define GFF_XBM ( (sal_uInt16)0x0008 )
+#define GFF_XPM ( (sal_uInt16)0x0009 )
+#define GFF_PBM ( (sal_uInt16)0x000a )
+#define GFF_PGM ( (sal_uInt16)0x000b )
+#define GFF_PPM ( (sal_uInt16)0x000c )
+#define GFF_RAS ( (sal_uInt16)0x000d )
+#define GFF_TGA ( (sal_uInt16)0x000e )
+#define GFF_PSD ( (sal_uInt16)0x000f )
+#define GFF_EPS ( (sal_uInt16)0x0010 )
+#define GFF_DXF ( (sal_uInt16)0x00f1 )
+#define GFF_MET ( (sal_uInt16)0x00f2 )
+#define GFF_PCT ( (sal_uInt16)0x00f3 )
+#define GFF_SGF ( (sal_uInt16)0x00f4 )
+#define GFF_SVM ( (sal_uInt16)0x00f5 )
+#define GFF_WMF ( (sal_uInt16)0x00f6 )
+#define GFF_SGV ( (sal_uInt16)0x00f7 )
+#define GFF_EMF ( (sal_uInt16)0x00f8 )
+#define GFF_XXX ( (sal_uInt16)0xffff )
// ---------------------
// - GraphicDescriptor -
@@ -145,38 +145,38 @@ class SVT_DLLPUBLIC GraphicDescriptor
String aPathExt;
Size aPixSize;
Size aLogSize;
- USHORT nBitsPerPixel;
- USHORT nPlanes;
- USHORT nFormat;
- BOOL bCompressed;
- BOOL bOwnStream;
+ sal_uInt16 nBitsPerPixel;
+ sal_uInt16 nPlanes;
+ sal_uInt16 nFormat;
+ sal_Bool bCompressed;
+ sal_Bool bOwnStream;
void ImpConstruct();
- BOOL ImpDetectBMP( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectGIF( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectJPG( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectPCD( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectPCX( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectPNG( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectTIF( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectXBM( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectXPM( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectPBM( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectPGM( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectPPM( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectRAS( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectTGA( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectPSD( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectEPS( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectDXF( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectMET( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectPCT( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectSGF( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectSVM( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectWMF( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectSGV( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectEMF( SvStream& rStm, BOOL bExtendedInfo );
+ sal_Bool ImpDetectBMP( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectGIF( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectJPG( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectPCD( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectPCX( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectPNG( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectTIF( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectXBM( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectXPM( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectPBM( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectPGM( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectPPM( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectRAS( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectTGA( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectPSD( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectEPS( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectDXF( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectMET( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectPCT( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectSGF( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectSVM( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectWMF( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectSGV( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectEMF( SvStream& rStm, sal_Bool bExtendedInfo );
GraphicDescriptor( const GraphicDescriptor& );
GraphicDescriptor& operator=( const GraphicDescriptor& );
@@ -200,14 +200,14 @@ public:
virtual ~GraphicDescriptor();
// Startet die Detektion;
- // bei bExtendedInfo == TRUE werden soweit wie moeglich
+ // bei bExtendedInfo == sal_True werden soweit wie moeglich
// Daten aus dem jeweiligen FileHeader ermittelt
// ( Groesse, Farbtiefe usw. )
- virtual BOOL Detect( BOOL bExtendedInfo = FALSE );
+ virtual sal_Bool Detect( sal_Bool bExtendedInfo = sal_False );
// liefert das Fileformat nach erfolgreicher Detektion zurueck;
// wenn kein Format erkannt wurde, ist das Formart GFF_NOT
- USHORT GetFileFormat() const { return nFormat; }
+ sal_uInt16 GetFileFormat() const { return nFormat; }
// liefert die Pixel-Bildgroesse oder 0-Size zurueck
const Size& GetSizePixel() const { return (Size&) aPixSize; }
@@ -216,13 +216,13 @@ public:
const Size& GetSize_100TH_MM() const { return (Size&) aLogSize; }
// liefert die Bits/Pixel oder 0 zurueck
- USHORT GetBitsPerPixel() const { return nBitsPerPixel; }
+ sal_uInt16 GetBitsPerPixel() const { return nBitsPerPixel; }
// liefert die Anzahl der Planes oder 0 zurueck
- USHORT GetPlanes() const { return nPlanes; }
+ sal_uInt16 GetPlanes() const { return nPlanes; }
// zeigt an, ob das Bild evtl. komprimiert (wie auch immer) ist
- BOOL IsCompressed() const { return bCompressed; }
+ sal_Bool IsCompressed() const { return bCompressed; }
// gibt die Filternummer des Filters zurueck,
// der im GraphicFilter zum Lesen dieses Formats
@@ -236,8 +236,8 @@ public:
struct FilterErrorEx
{
- ULONG nFilterError;
- ULONG nStreamError;
+ sal_uLong nFilterError;
+ sal_uLong nStreamError;
long nDummy1;
long nDummy2;
long nDummy3;
@@ -257,7 +257,7 @@ class SVT_DLLPUBLIC GraphicFilter
private:
void ImplInit();
- ULONG ImplSetError( ULONG nError, const SvStream* pStm = NULL );
+ sal_uLong ImplSetError( sal_uLong nError, const SvStream* pStm = NULL );
sal_uInt16 ImpTestOrFindFormat( const String& rPath, SvStream& rStream, sal_uInt16& rFormat );
DECL_LINK( FilterCallback, ConvertData* pData );
@@ -285,73 +285,73 @@ public:
void SetFilterPath( const String& rFilterPath ) { aFilterPath = rFilterPath; };
- USHORT GetImportFormatCount();
- USHORT GetImportFormatNumber( const String& rFormatName );
- USHORT GetImportFormatNumberForMediaType( const String& rMediaType );
- USHORT GetImportFormatNumberForShortName( const String& rShortName );
+ sal_uInt16 GetImportFormatCount();
+ sal_uInt16 GetImportFormatNumber( const String& rFormatName );
+ sal_uInt16 GetImportFormatNumberForMediaType( const String& rMediaType );
+ sal_uInt16 GetImportFormatNumberForShortName( const String& rShortName );
sal_uInt16 GetImportFormatNumberForTypeName( const String& rType );
- String GetImportFormatName( USHORT nFormat );
- String GetImportFormatTypeName( USHORT nFormat );
- String GetImportFormatMediaType( USHORT nFormat );
- String GetImportFormatShortName( USHORT nFormat );
- String GetImportOSFileType( USHORT nFormat );
- String GetImportWildcard( USHORT nFormat, sal_Int32 nEntry = 0 );
- BOOL IsImportPixelFormat( USHORT nFormat );
-
- USHORT GetExportFormatCount();
- USHORT GetExportFormatNumber( const String& rFormatName );
- USHORT GetExportFormatNumberForMediaType( const String& rShortName );
- USHORT GetExportFormatNumberForShortName( const String& rShortName );
+ String GetImportFormatName( sal_uInt16 nFormat );
+ String GetImportFormatTypeName( sal_uInt16 nFormat );
+ String GetImportFormatMediaType( sal_uInt16 nFormat );
+ String GetImportFormatShortName( sal_uInt16 nFormat );
+ String GetImportOSFileType( sal_uInt16 nFormat );
+ String GetImportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry = 0 );
+ sal_Bool IsImportPixelFormat( sal_uInt16 nFormat );
+
+ sal_uInt16 GetExportFormatCount();
+ sal_uInt16 GetExportFormatNumber( const String& rFormatName );
+ sal_uInt16 GetExportFormatNumberForMediaType( const String& rShortName );
+ sal_uInt16 GetExportFormatNumberForShortName( const String& rShortName );
sal_uInt16 GetExportFormatNumberForTypeName( const String& rType );
- String GetExportFormatName( USHORT nFormat );
- String GetExportFormatTypeName( USHORT nFormat );
- String GetExportFormatMediaType( USHORT nFormat );
- String GetExportFormatShortName( USHORT nFormat );
- String GetExportOSFileType( USHORT nFormat );
- String GetExportWildcard( USHORT nFormat, sal_Int32 nEntry = 0 );
- BOOL IsExportPixelFormat( USHORT nFormat );
-
- BOOL HasImportDialog( USHORT nFormat );
- BOOL DoImportDialog( Window* pWindow, USHORT nFormat );
-
- BOOL HasExportDialog( USHORT nFormat );
- BOOL DoExportDialog( Window* pWindow, USHORT nFormat );
- BOOL DoExportDialog( Window* pWindow, USHORT nFormat, FieldUnit eFieldUnit );
-
- USHORT ExportGraphic( const Graphic& rGraphic, const INetURLObject& rPath,
- USHORT nFormat = GRFILTER_FORMAT_DONTKNOW,
+ String GetExportFormatName( sal_uInt16 nFormat );
+ String GetExportFormatTypeName( sal_uInt16 nFormat );
+ String GetExportFormatMediaType( sal_uInt16 nFormat );
+ String GetExportFormatShortName( sal_uInt16 nFormat );
+ String GetExportOSFileType( sal_uInt16 nFormat );
+ String GetExportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry = 0 );
+ sal_Bool IsExportPixelFormat( sal_uInt16 nFormat );
+
+ sal_Bool HasImportDialog( sal_uInt16 nFormat );
+ sal_Bool DoImportDialog( Window* pWindow, sal_uInt16 nFormat );
+
+ sal_Bool HasExportDialog( sal_uInt16 nFormat );
+ sal_Bool DoExportDialog( Window* pWindow, sal_uInt16 nFormat );
+ sal_Bool DoExportDialog( Window* pWindow, sal_uInt16 nFormat, FieldUnit eFieldUnit );
+
+ sal_uInt16 ExportGraphic( const Graphic& rGraphic, const INetURLObject& rPath,
+ sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW,
const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >* pFilterData = NULL );
- USHORT ExportGraphic( const Graphic& rGraphic, const String& rPath,
- SvStream& rOStm, USHORT nFormat = GRFILTER_FORMAT_DONTKNOW,
+ sal_uInt16 ExportGraphic( const Graphic& rGraphic, const String& rPath,
+ SvStream& rOStm, sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW,
const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >* pFilterData = NULL );
long GetExportGraphicHint() const { return nExpGraphHint; }
- USHORT CanImportGraphic( const INetURLObject& rPath,
- USHORT nFormat = GRFILTER_FORMAT_DONTKNOW,
- USHORT * pDeterminedFormat = NULL);
+ sal_uInt16 CanImportGraphic( const INetURLObject& rPath,
+ sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW,
+ sal_uInt16 * pDeterminedFormat = NULL);
- USHORT ImportGraphic( Graphic& rGraphic, const INetURLObject& rPath,
- USHORT nFormat = GRFILTER_FORMAT_DONTKNOW,
- USHORT * pDeterminedFormat = NULL, sal_uInt32 nImportFlags = 0 );
+ sal_uInt16 ImportGraphic( Graphic& rGraphic, const INetURLObject& rPath,
+ sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW,
+ sal_uInt16 * pDeterminedFormat = NULL, sal_uInt32 nImportFlags = 0 );
- USHORT CanImportGraphic( const String& rPath, SvStream& rStream,
- USHORT nFormat = GRFILTER_FORMAT_DONTKNOW,
- USHORT * pDeterminedFormat = NULL);
+ sal_uInt16 CanImportGraphic( const String& rPath, SvStream& rStream,
+ sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW,
+ sal_uInt16 * pDeterminedFormat = NULL);
- USHORT ImportGraphic( Graphic& rGraphic, const String& rPath,
+ sal_uInt16 ImportGraphic( Graphic& rGraphic, const String& rPath,
SvStream& rStream,
- USHORT nFormat = GRFILTER_FORMAT_DONTKNOW,
- USHORT * pDeterminedFormat = NULL, sal_uInt32 nImportFlags = 0 );
+ sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW,
+ sal_uInt16 * pDeterminedFormat = NULL, sal_uInt32 nImportFlags = 0 );
- USHORT ImportGraphic( Graphic& rGraphic, const String& rPath,
+ sal_uInt16 ImportGraphic( Graphic& rGraphic, const String& rPath,
SvStream& rStream,
- USHORT nFormat,
- USHORT * pDeterminedFormat, sal_uInt32 nImportFlags,
+ sal_uInt16 nFormat,
+ sal_uInt16 * pDeterminedFormat, sal_uInt32 nImportFlags,
com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >* pFilterData );
- BOOL Setup( USHORT nFormat );
+ sal_Bool Setup( sal_uInt16 nFormat );
- void Abort() { bAbort = TRUE; }
+ void Abort() { bAbort = sal_True; }
const FilterErrorEx& GetLastError() const;
void ResetLastError();
@@ -361,15 +361,15 @@ public:
static int LoadGraphic( const String& rPath, const String& rFilter,
Graphic& rGraphic,
GraphicFilter* pFilter = NULL,
- USHORT* pDeterminedFormat = NULL );
+ sal_uInt16* pDeterminedFormat = NULL );
};
// ------------------------------------
// - Windows Metafile Lesen/Schreiben -
// ------------------------------------
-SVT_DLLPUBLIC BOOL ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigItem* pConfigItem );
-SVT_DLLPUBLIC BOOL WriteWindowMetafile( SvStream& rStream, const GDIMetaFile& rMTF );
-SVT_DLLPUBLIC BOOL WriteWindowMetafileBits( SvStream& rStream, const GDIMetaFile& rMTF );
+SVT_DLLPUBLIC sal_Bool ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigItem* pConfigItem );
+SVT_DLLPUBLIC sal_Bool WriteWindowMetafile( SvStream& rStream, const GDIMetaFile& rMTF );
+SVT_DLLPUBLIC sal_Bool WriteWindowMetafileBits( SvStream& rStream, const GDIMetaFile& rMTF );
#endif //_FILTER_HXX
diff --git a/svtools/inc/svtools/fltcall.hxx b/svtools/inc/svtools/fltcall.hxx
index d0bf054d724e..3da14a9a83f9 100644
--- a/svtools/inc/svtools/fltcall.hxx
+++ b/svtools/inc/svtools/fltcall.hxx
@@ -55,19 +55,19 @@ struct FltCallDialogParameter
eFieldUnit ( eFiUni ) {};
};
-typedef BOOL (*PFilterCall)(SvStream & rStream, Graphic & rGraphic,
+typedef sal_Bool (*PFilterCall)(SvStream & rStream, Graphic & rGraphic,
FilterConfigItem* pConfigItem, sal_Bool bPrefDialog);
// Von diesem Typ sind sowohl Export-Filter-Funktionen als auch Import-Filter-Funktionen.
// rFileName ist der komplette Pfadname der zu importierenden bzw. zu exportierenden Datei.
// pCallBack darf auch NULL sein. pCallerData wird der Callback-Funktion uebergeben.
// pOptionsConfig darf NULL sein. Anderenfalls ist die Gruppe des Config schon gesetzt
// und darf von dem Filter nicht geaendert werden!
- // Wenn bPrefDialog==TRUE gilt, wird ggf. ein Preferences-Dialog durchgefuehrt.
+ // Wenn bPrefDialog==sal_True gilt, wird ggf. ein Preferences-Dialog durchgefuehrt.
-typedef BOOL ( *PFilterDlgCall )( FltCallDialogParameter& );
+typedef sal_Bool ( *PFilterDlgCall )( FltCallDialogParameter& );
// Von diesem Typ sind sowohl Export-Filter-Funktionen als auch Import-Filter-Funktionen.
// Uebergeben wird ein Pointer auf ein Parent-Fenster und auf die Options-Config.
- // pOptions und pWindow duerfen NULL sein, in diesem Fall wird FALSE zurueckgeliefert.
+ // pOptions und pWindow duerfen NULL sein, in diesem Fall wird sal_False zurueckgeliefert.
// Anderenfalls ist die Gruppe der Config schon gesetzt
// und darf von dem Filter nicht geaendert werden!
diff --git a/svtools/inc/svtools/fltdefs.hxx b/svtools/inc/svtools/fltdefs.hxx
index 86462c2faa33..fa987d912588 100644
--- a/svtools/inc/svtools/fltdefs.hxx
+++ b/svtools/inc/svtools/fltdefs.hxx
@@ -40,12 +40,12 @@
typedef struct RGBQUAD
{
- BYTE rgbBlue;
- BYTE rgbGreen;
- BYTE rgbRed;
- BYTE rgbReserved;
+ sal_uInt8 rgbBlue;
+ sal_uInt8 rgbGreen;
+ sal_uInt8 rgbRed;
+ sal_uInt8 rgbReserved;
- RGBQUAD( const BYTE cRed = 0, const BYTE cGreen = 0, const BYTE cBlue = 0 ) :
+ RGBQUAD( const sal_uInt8 cRed = 0, const sal_uInt8 cGreen = 0, const sal_uInt8 cBlue = 0 ) :
rgbBlue ( cBlue ),
rgbGreen ( cGreen ),
rgbRed ( cRed ),
@@ -53,7 +53,7 @@ typedef struct RGBQUAD
} RGBQUAD;
-typedef BYTE* PDIBBYTE;
+typedef sal_uInt8* PDIBBYTE;
#define MEMCPY memcpy
#define MEMSET memset
#define GLOBALALLOC(nSize) ((PDIBBYTE)GlobalAlloc(GMEM_FIXED,(nSize)))
@@ -62,18 +62,18 @@ typedef BYTE* PDIBBYTE;
#else
-typedef BYTE* PDIBBYTE;
+typedef sal_uInt8* PDIBBYTE;
#define MEMCPY memcpy
#define MEMSET memset
-#define GLOBALALLOC(nSize) ((PDIBBYTE)new BYTE[(nSize)])
+#define GLOBALALLOC(nSize) ((PDIBBYTE)new sal_uInt8[(nSize)])
#define GLOBALFREE(pPointer) (delete[] (pPointer))
#endif
#if defined ( OS2 ) || defined ( UNX )
-void ReadBitmap( SvStream& rIStream, Bitmap& rBmp, USHORT nDefaultHeight = 0, ULONG nOffBits = 0 );
-void ReplaceInfoHeader( SvStream& rStm, BYTE* pBuffer );
+void ReadBitmap( SvStream& rIStream, Bitmap& rBmp, sal_uInt16 nDefaultHeight = 0, sal_uLong nOffBits = 0 );
+void ReplaceInfoHeader( SvStream& rStm, sal_uInt8* pBuffer );
#ifdef OS2
#define RGBQUAD RGBQUADOS2
@@ -87,12 +87,12 @@ void ReplaceInfoHeader( SvStream& rStm, BYTE* pBuffer );
typedef struct RGBQUAD
{
- BYTE rgbBlue;
- BYTE rgbGreen;
- BYTE rgbRed;
- BYTE rgbReserved;
+ sal_uInt8 rgbBlue;
+ sal_uInt8 rgbGreen;
+ sal_uInt8 rgbRed;
+ sal_uInt8 rgbReserved;
- RGBQUAD( const BYTE cRed = 0, const BYTE cGreen = 0, const BYTE cBlue = 0 ) :
+ RGBQUAD( const sal_uInt8 cRed = 0, const sal_uInt8 cGreen = 0, const sal_uInt8 cBlue = 0 ) :
rgbBlue ( cBlue ),
rgbGreen ( cGreen ),
rgbRed ( cRed ),
@@ -101,27 +101,27 @@ typedef struct RGBQUAD
typedef struct BITMAPFILEHEADER
{
- UINT16 bfType;
- UINT32 bfSize;
- UINT16 bfReserved1;
- UINT16 bfReserved2;
- UINT32 bfOffBits;
+ sal_uInt16 bfType;
+ sal_uInt32 bfSize;
+ sal_uInt16 bfReserved1;
+ sal_uInt16 bfReserved2;
+ sal_uInt32 bfOffBits;
} BITMAPFILEHEADER;
typedef BITMAPFILEHEADER* PBITMAPFILEHEADER;
typedef struct BITMAPINFOHEADER
{
- UINT32 biSize;
- UINT32 biWidth;
- UINT32 biHeight;
- UINT16 biPlanes;
- UINT16 biBitCount;
- UINT32 biCompression;
- UINT32 biSizeImage;
- UINT32 biXPelsPerMeter;
- UINT32 biYPelsPerMeter;
- UINT32 biClrUsed;
- UINT32 biClrImportant;
+ sal_uInt32 biSize;
+ sal_uInt32 biWidth;
+ sal_uInt32 biHeight;
+ sal_uInt16 biPlanes;
+ sal_uInt16 biBitCount;
+ sal_uInt32 biCompression;
+ sal_uInt32 biSizeImage;
+ sal_uInt32 biXPelsPerMeter;
+ sal_uInt32 biYPelsPerMeter;
+ sal_uInt32 biClrUsed;
+ sal_uInt32 biClrImportant;
} BITMAPINFOHEADER;
typedef BITMAPINFOHEADER* PBITMAPINFOHEADER;
diff --git a/svtools/inc/svtools/fmtfield.hxx b/svtools/inc/svtools/fmtfield.hxx
index 9226f78b77fc..4e036e974828 100644
--- a/svtools/inc/svtools/fmtfield.hxx
+++ b/svtools/inc/svtools/fmtfield.hxx
@@ -44,7 +44,7 @@
namespace validation { class NumberValidator; }
#endif
-typedef USHORT FORMAT_CHANGE_TYPE;
+typedef sal_uInt16 FORMAT_CHANGE_TYPE;
#define FCT_KEYONLY 0x00 // only a new key was set
#define FCT_FORMATTER 0x01 // a new formatter weas set, usually implies a change of the key, too
#define FCT_PRECISION 0x02 // a new precision was set
@@ -60,7 +60,7 @@ private:
class StaticFormatter
{
static SvNumberFormatter* s_cFormatter;
- static ULONG s_nReferences;
+ static sal_uLong s_nReferences;
public:
StaticFormatter();
~StaticFormatter();
@@ -77,19 +77,19 @@ protected:
double m_dMinValue;
double m_dMaxValue;
- BOOL m_bHasMin : 1;
- BOOL m_bHasMax : 1;
+ sal_Bool m_bHasMin : 1;
+ sal_Bool m_bHasMax : 1;
- BOOL m_bStrictFormat : 1;
+ sal_Bool m_bStrictFormat : 1;
- BOOL m_bValueDirty : 1;
- BOOL m_bEnableEmptyField : 1;
- BOOL m_bAutoColor : 1;
- BOOL m_bEnableNaN : 1;
+ sal_Bool m_bValueDirty : 1;
+ sal_Bool m_bEnableEmptyField : 1;
+ sal_Bool m_bAutoColor : 1;
+ sal_Bool m_bEnableNaN : 1;
double m_dCurrentValue;
double m_dDefaultValue;
- ULONG m_nFormatKey;
+ sal_uLong m_nFormatKey;
SvNumberFormatter* m_pFormatter;
StaticFormatter m_aStaticFormatter;
@@ -100,7 +100,7 @@ protected:
// es macht einen Unterschied, ob man bei eingestellter Textformatierung beim LostFocus den aktuellen String durch
// den Formatter jagt und das Ergebnis anzeigt oder erst aus dem String ein double macht, das formatiert und dann
// ausgibt
- BOOL m_bTreatAsNumber;
+ sal_Bool m_bTreatAsNumber;
// und mit den folgenden Members koennen wir das Ganze hier auch zur formatierten Text-Ausgabe benutzen ...
String m_sCurrentTextValue;
String m_sDefaultText;
@@ -112,18 +112,18 @@ protected:
bool m_bUseInputStringForFormatting;
public:
- FormattedField(Window* pParent, WinBits nStyle = 0, SvNumberFormatter* pInitialFormatter = NULL, INT32 nFormatKey = 0);
- FormattedField(Window* pParent, const ResId& rResId, SvNumberFormatter* pInitialFormatter = NULL, INT32 nFormatKey = 0);
+ FormattedField(Window* pParent, WinBits nStyle = 0, SvNumberFormatter* pInitialFormatter = NULL, sal_Int32 nFormatKey = 0);
+ FormattedField(Window* pParent, const ResId& rResId, SvNumberFormatter* pInitialFormatter = NULL, sal_Int32 nFormatKey = 0);
virtual ~FormattedField();
// Min-/Max-Verwaltung
- BOOL HasMinValue() const { return m_bHasMin; }
- void ClearMinValue() { m_bHasMin = FALSE; }
+ sal_Bool HasMinValue() const { return m_bHasMin; }
+ void ClearMinValue() { m_bHasMin = sal_False; }
void SetMinValue(double dMin);
double GetMinValue() const { return m_dMinValue; }
- BOOL HasMaxValue() const { return m_bHasMax; }
- void ClearMaxValue() { m_bHasMax = FALSE; }
+ sal_Bool HasMaxValue() const { return m_bHasMax; }
+ void ClearMaxValue() { m_bHasMax = sal_False; }
void SetMaxValue(double dMax);
double GetMaxValue() const { return m_dMaxValue; }
@@ -137,30 +137,30 @@ public:
void SetTextValue(const XubString& rText);
// der String wird in ein double umgewandelt (durch den Formatter) und anschliessen in SetValue gesteckt
- BOOL IsEmptyFieldEnabled() const { return m_bEnableEmptyField; }
- void EnableEmptyField(BOOL bEnable);
+ sal_Bool IsEmptyFieldEnabled() const { return m_bEnableEmptyField; }
+ void EnableEmptyField(sal_Bool bEnable);
// wenn nicht enabled, wird beim Verlassen des Feldes der Text auf den letzten gueltigen zurueckgesetzt
- void SetDefaultValue(double dDefault) { m_dDefaultValue = dDefault; m_bValueDirty = TRUE; }
+ void SetDefaultValue(double dDefault) { m_dDefaultValue = dDefault; m_bValueDirty = sal_True; }
// wenn der aktuelle String ungueltig ist, liefert GetValue() diesen Default-Wert
double GetDefaultValue() const { return m_dDefaultValue; }
// Einstellungen fuer das Format
- ULONG GetFormatKey() const { return m_nFormatKey; }
- void SetFormatKey(ULONG nFormatKey);
+ sal_uLong GetFormatKey() const { return m_nFormatKey; }
+ void SetFormatKey(sal_uLong nFormatKey);
SvNumberFormatter* GetFormatter() const { return m_pFormatter; }
- void SetFormatter(SvNumberFormatter* pFormatter, BOOL bResetFormat = TRUE);
- // wenn bResetFormat FALSE ist, wird versucht, das alte eingestellte Format mit 'hinueberzuretten' (teuer, wenn es sich nicht
+ void SetFormatter(SvNumberFormatter* pFormatter, sal_Bool bResetFormat = sal_True);
+ // wenn bResetFormat sal_False ist, wird versucht, das alte eingestellte Format mit 'hinueberzuretten' (teuer, wenn es sich nicht
// um eines der Standard-Formate handelt, die in allen Formattern gleich sind)
- // wenn TRUE, wird als neuer FormatKey 0 gesetzt
+ // wenn sal_True, wird als neuer FormatKey 0 gesetzt
- BOOL GetThousandsSep() const;
- void SetThousandsSep(BOOL _bUseSeparator);
+ sal_Bool GetThousandsSep() const;
+ void SetThousandsSep(sal_Bool _bUseSeparator);
// the is no check if the current format is numeric, so be cautious when calling these functions
- USHORT GetDecimalDigits() const;
- void SetDecimalDigits(USHORT _nPrecision);
+ sal_uInt16 GetDecimalDigits() const;
+ void SetDecimalDigits(sal_uInt16 _nPrecision);
// the is no check if the current format is numeric, so be cautious when calling these functions
SvNumberFormatter* StandardFormatter() { return m_aStaticFormatter; }
@@ -169,11 +169,11 @@ public:
// also ist etwas Vorsicht angebracht ...
void GetFormat(XubString& rFormatString, LanguageType& eLang) const;
- BOOL SetFormat(const XubString& rFormatString, LanguageType eLang);
- // FALSE, wenn der FormatString nicht gesetzt werden konnte (also wahrscheinlich ungueltig ist)
+ sal_Bool SetFormat(const XubString& rFormatString, LanguageType eLang);
+ // sal_False, wenn der FormatString nicht gesetzt werden konnte (also wahrscheinlich ungueltig ist)
- BOOL IsStrictFormat() const { return m_bStrictFormat; }
- void SetStrictFormat(BOOL bEnable) { m_bStrictFormat = bEnable; }
+ sal_Bool IsStrictFormat() const { return m_bStrictFormat; }
+ void SetStrictFormat(sal_Bool bEnable) { m_bStrictFormat = bEnable; }
// Formatueberpruefung waehrend der Eingabe ?
// Spin-Handling
@@ -193,15 +193,15 @@ public:
void SetSpinLast(double dLast) { m_dSpinLast = dLast; }
double GetSpinLast() const { return m_dSpinLast; }
- BOOL TreatingAsNumber() const { return m_bTreatAsNumber; }
- void TreatAsNumber(BOOL bDoSo) { m_bTreatAsNumber = bDoSo; }
+ sal_Bool TreatingAsNumber() const { return m_bTreatAsNumber; }
+ void TreatAsNumber(sal_Bool bDoSo) { m_bTreatAsNumber = bDoSo; }
public:
virtual void SetText( const XubString& rStr );
virtual void SetText( const XubString& rStr, const Selection& rNewSelection );
void SetValidateText(const XubString& rText, const String* pErrorText = NULL);
- // die folgenden Methoden sind interesant, wenn m_bTreatAsNumber auf FALSE sitzt
+ // die folgenden Methoden sind interesant, wenn m_bTreatAsNumber auf sal_False sitzt
/** nehmen wir mal an, irgendjemand will das ganze schoene double-Handling gar nicht haben, sondern
einfach den Text formatiert ausgeben ...
(der Text wird einfach nur durch den Formatter gejagt und dann gesetzt)
@@ -222,12 +222,12 @@ public:
*/
void Commit();
- // enable automatic coloring. if set to TRUE, and the format the field is working with for any current value
+ // enable automatic coloring. if set to sal_True, and the format the field is working with for any current value
// says that it has to be painted in a special color (e.g. a format where negative numbers should be printed
// red), the text is painted with that color automatically.
// The color used is the same as returned by GetLastOutputColor()
- void SetAutoColor(BOOL _bAutomatic);
- BOOL GetAutoColor() const { return m_bAutoColor; }
+ void SetAutoColor(sal_Bool _bAutomatic);
+ sal_Bool GetAutoColor() const { return m_bAutoColor; }
/** enables handling of not-a-number value.
@@ -243,8 +243,8 @@ public:
control, and then tabs out of it, the text "foo" will persist, and GetValue will
return NaN in subsequent calls.
*/
- void EnableNotANumber( BOOL _bEnable );
- BOOL IsNotANumberEnabled( ) const { return m_bEnableNaN; }
+ void EnableNotANumber( sal_Bool _bEnable );
+ sal_Bool IsNotANumberEnabled( ) const { return m_bEnableNaN; }
/** When being set to true, the strings in the field are formatted using the
InputLine format. That's also what you get in Calc when you edit a cell
@@ -258,16 +258,16 @@ protected:
virtual void Modify();
// CheckText ueberschreiben fuer Ueberpruefung zur Eingabezeit
- virtual BOOL CheckText(const XubString&) const { return TRUE; }
+ virtual sal_Bool CheckText(const XubString&) const { return sal_True; }
// any aspect of the current format has changed
virtual void FormatChanged(FORMAT_CHANGE_TYPE nWhat);
void ImplSetTextImpl(const XubString& rNew, Selection* pNewSel);
- void ImplSetValue(double dValue, BOOL bForce);
- BOOL ImplGetValue(double& dNewVal);
+ void ImplSetValue(double dValue, sal_Bool bForce);
+ sal_Bool ImplGetValue(double& dNewVal);
- void ImplSetFormatKey(ULONG nFormatKey);
+ void ImplSetFormatKey(sal_uLong nFormatKey);
// SetFormatKey without FormatChanged notification
virtual SvNumberFormatter* CreateFormatter() { SetFormatter(StandardFormatter()); return m_pFormatter; }
@@ -313,7 +313,7 @@ public:
virtual ~DoubleNumericField();
protected:
- virtual BOOL CheckText(const XubString& sText) const;
+ virtual sal_Bool CheckText(const XubString& sText) const;
virtual void FormatChanged(FORMAT_CHANGE_TYPE nWhat);
void ResetConformanceTester();
@@ -327,8 +327,8 @@ protected:
class DoubleCurrencyField : public FormattedField
{
XubString m_sCurrencySymbol;
- BOOL m_bPrependCurrSym;
- BOOL m_bChangingFormat;
+ sal_Bool m_bPrependCurrSym;
+ sal_Bool m_bChangingFormat;
public:
DoubleCurrencyField(Window* pParent, WinBits nStyle = 0);
@@ -337,8 +337,8 @@ public:
XubString getCurrencySymbol() const { return m_sCurrencySymbol; }
void setCurrencySymbol(const XubString& _sSymbol);
- BOOL getPrependCurrSym() const { return m_bPrependCurrSym; }
- void setPrependCurrSym(BOOL _bPrepend);
+ sal_Bool getPrependCurrSym() const { return m_bPrependCurrSym; }
+ void setPrependCurrSym(sal_Bool _bPrepend);
protected:
virtual void FormatChanged(FORMAT_CHANGE_TYPE nWhat);
diff --git a/svtools/inc/svtools/generictoolboxcontroller.hxx b/svtools/inc/svtools/generictoolboxcontroller.hxx
index 0e9dc73a6882..674429bf2e4d 100644
--- a/svtools/inc/svtools/generictoolboxcontroller.hxx
+++ b/svtools/inc/svtools/generictoolboxcontroller.hxx
@@ -46,7 +46,7 @@ class SVT_DLLPUBLIC GenericToolboxController : public svt::ToolboxController
GenericToolboxController( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager,
const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame,
ToolBox* pToolBox,
- USHORT nID,
+ sal_uInt16 nID,
const rtl::OUString& aCommand );
virtual ~GenericToolboxController();
diff --git a/svtools/inc/svtools/grfmgr.hxx b/svtools/inc/svtools/grfmgr.hxx
index 3ed608c1525d..9841d4e312ef 100644
--- a/svtools/inc/svtools/grfmgr.hxx
+++ b/svtools/inc/svtools/grfmgr.hxx
@@ -104,14 +104,14 @@ private:
long mnTopCrop;
long mnRightCrop;
long mnBottomCrop;
- USHORT mnRotate10;
+ sal_uInt16 mnRotate10;
short mnContPercent;
short mnLumPercent;
short mnRPercent;
short mnGPercent;
short mnBPercent;
- BOOL mbInvert;
- BYTE mcTransparency;
+ sal_Bool mbInvert;
+ sal_uInt8 mcTransparency;
GraphicDrawMode meDrawMode;
void* mpDummy;
@@ -121,14 +121,14 @@ public:
GraphicAttr();
~GraphicAttr();
- BOOL operator==( const GraphicAttr& rAttr ) const;
- BOOL operator!=( const GraphicAttr& rAttr ) const { return !( *this == rAttr ); }
+ sal_Bool operator==( const GraphicAttr& rAttr ) const;
+ sal_Bool operator!=( const GraphicAttr& rAttr ) const { return !( *this == rAttr ); }
void SetDrawMode( GraphicDrawMode eDrawMode ) { meDrawMode = eDrawMode; }
GraphicDrawMode GetDrawMode() const { return meDrawMode; }
- void SetMirrorFlags( ULONG nMirrFlags ) { mnMirrFlags = nMirrFlags; }
- ULONG GetMirrorFlags() const { return mnMirrFlags; }
+ void SetMirrorFlags( sal_uLong nMirrFlags ) { mnMirrFlags = nMirrFlags; }
+ sal_uLong GetMirrorFlags() const { return mnMirrFlags; }
void SetCrop( long nLeft_100TH_MM, long nTop_100TH_MM, long nRight_100TH_MM, long nBottom_100TH_MM )
{
@@ -140,8 +140,8 @@ public:
long GetRightCrop() const { return mnRightCrop; }
long GetBottomCrop() const { return mnBottomCrop; }
- void SetRotation( USHORT nRotate10 ) { mnRotate10 = nRotate10; }
- USHORT GetRotation() const { return mnRotate10; }
+ void SetRotation( sal_uInt16 nRotate10 ) { mnRotate10 = nRotate10; }
+ sal_uInt16 GetRotation() const { return mnRotate10; }
void SetLuminance( short nLuminancePercent ) { mnLumPercent = nLuminancePercent; }
short GetLuminance() const { return mnLumPercent; }
@@ -161,22 +161,22 @@ public:
void SetGamma( double fGamma ) { mfGamma = fGamma; }
double GetGamma() const { return mfGamma; }
- void SetInvert( BOOL bInvert ) { mbInvert = bInvert; }
- BOOL IsInvert() const { return mbInvert; }
+ void SetInvert( sal_Bool bInvert ) { mbInvert = bInvert; }
+ sal_Bool IsInvert() const { return mbInvert; }
- void SetTransparency( BYTE cTransparency ) { mcTransparency = cTransparency; }
- BYTE GetTransparency() const { return mcTransparency; }
+ void SetTransparency( sal_uInt8 cTransparency ) { mcTransparency = cTransparency; }
+ sal_uInt8 GetTransparency() const { return mcTransparency; }
- BOOL IsSpecialDrawMode() const { return( meDrawMode != GRAPHICDRAWMODE_STANDARD ); }
- BOOL IsMirrored() const { return( mnMirrFlags != 0UL ); }
- BOOL IsCropped() const
+ sal_Bool IsSpecialDrawMode() const { return( meDrawMode != GRAPHICDRAWMODE_STANDARD ); }
+ sal_Bool IsMirrored() const { return( mnMirrFlags != 0UL ); }
+ sal_Bool IsCropped() const
{
return( mnLeftCrop != 0 || mnTopCrop != 0 ||
mnRightCrop != 0 || mnBottomCrop != 0 );
}
- BOOL IsRotated() const { return( ( mnRotate10 % 3600 ) != 0 ); }
- BOOL IsTransparent() const { return( mcTransparency > 0 ); }
- BOOL IsAdjusted() const
+ sal_Bool IsRotated() const { return( ( mnRotate10 % 3600 ) != 0 ); }
+ sal_Bool IsTransparent() const { return( mcTransparency > 0 ); }
+ sal_Bool IsAdjusted() const
{
return( mnLumPercent != 0 || mnContPercent != 0 || mnRPercent != 0 ||
mnGPercent != 0 || mnBPercent != 0 || mfGamma != 1.0 || mbInvert );
@@ -202,7 +202,7 @@ private:
GraphicAttr maAttr;
Size maPrefSize;
MapMode maPrefMapMode;
- ULONG mnSizeBytes;
+ sal_uLong mnSizeBytes;
GraphicType meType;
GraphicManager* mpMgr;
String* mpLink;
@@ -210,17 +210,17 @@ private:
String* mpUserData;
Timer* mpSwapOutTimer;
GrfSimpleCacheObj* mpSimpleCache;
- ULONG mnAnimationLoopCount;
+ sal_uLong mnAnimationLoopCount;
void* mpDummy1;
void* mpDummy2;
- BOOL mbAutoSwapped : 1;
- BOOL mbTransparent : 1;
- BOOL mbAnimated : 1;
- BOOL mbEPS : 1;
- BOOL mbIsInSwapIn : 1;
- BOOL mbIsInSwapOut : 1;
- BOOL mbAlpha : 1;
- BOOL mbDummyFlag8 : 1;
+ sal_Bool mbAutoSwapped : 1;
+ sal_Bool mbTransparent : 1;
+ sal_Bool mbAnimated : 1;
+ sal_Bool mbEPS : 1;
+ sal_Bool mbIsInSwapIn : 1;
+ sal_Bool mbIsInSwapOut : 1;
+ sal_Bool mbAlpha : 1;
+ sal_Bool mbDummyFlag8 : 1;
void SVT_DLLPRIVATE ImplConstruct();
void SVT_DLLPRIVATE ImplAssignGraphicData();
@@ -228,9 +228,9 @@ private:
const ByteString* pID = NULL,
const GraphicObject* pCopyObj = NULL );
void SVT_DLLPRIVATE ImplAutoSwapIn();
- BOOL SVT_DLLPRIVATE ImplIsAutoSwapped() const { return mbAutoSwapped; }
- BOOL SVT_DLLPRIVATE ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& rSz, const GraphicAttr* pAttr,
- PolyPolygon& rClipPolyPoly, BOOL& bRectClipRegion ) const;
+ sal_Bool SVT_DLLPRIVATE ImplIsAutoSwapped() const { return mbAutoSwapped; }
+ sal_Bool SVT_DLLPRIVATE ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& rSz, const GraphicAttr* pAttr,
+ PolyPolygon& rClipPolyPoly, sal_Bool& bRectClipRegion ) const;
/** Render a given number of tiles in an optimized way
@@ -276,22 +276,22 @@ private:
bool SVT_DLLPRIVATE ImplRenderTempTile( VirtualDevice& rVDev, int nExponent,
int nNumTilesX, int nNumTilesY,
const Size& rTileSizePixel,
- const GraphicAttr* pAttr, ULONG nFlags );
+ const GraphicAttr* pAttr, sal_uLong nFlags );
/// internally called by ImplRenderTempTile()
bool SVT_DLLPRIVATE ImplRenderTileRecursive( VirtualDevice& rVDev, int nExponent, int nMSBFactor,
int nNumOrigTilesX, int nNumOrigTilesY,
int nRemainderTilesX, int nRemainderTilesY,
const Size& rTileSizePixel, const GraphicAttr* pAttr,
- ULONG nFlags, ImplTileInfo& rTileInfo );
+ sal_uLong nFlags, ImplTileInfo& rTileInfo );
bool SVT_DLLPRIVATE ImplDrawTiled( OutputDevice* pOut, const Rectangle& rArea, const Size& rSizePixel,
- const Size& rOffset, const GraphicAttr* pAttr, ULONG nFlags, int nTileCacheSize1D );
+ const Size& rOffset, const GraphicAttr* pAttr, sal_uLong nFlags, int nTileCacheSize1D );
bool SVT_DLLPRIVATE ImplDrawTiled( OutputDevice& rOut, const Point& rPos,
int nNumTilesX, int nNumTilesY,
const Size& rTileSize,
- const GraphicAttr* pAttr, ULONG nFlags );
+ const GraphicAttr* pAttr, sal_uLong nFlags );
void SVT_DLLPRIVATE ImplTransformBitmap( BitmapEx& rBmpEx,
const GraphicAttr& rAttr,
@@ -299,7 +299,7 @@ private:
const Size& rCropRightBottom,
const Rectangle& rCropRect,
const Size& rDstSize,
- BOOL bEnlarge ) const;
+ sal_Bool bEnlarge ) const;
DECL_LINK( ImplAutoSwapOutHdl, void* );
@@ -309,7 +309,7 @@ protected:
virtual SvStream* GetSwapStream() const;
// !!! to be removed
- virtual ULONG GetReleaseFromCache() const;
+ virtual sal_uLong GetReleaseFromCache() const;
virtual void Load( SvStream& );
virtual void Save( SvStream& );
@@ -327,14 +327,14 @@ public:
~GraphicObject();
GraphicObject& operator=( const GraphicObject& rCacheObj );
- BOOL operator==( const GraphicObject& rCacheObj ) const;
- BOOL operator!=( const GraphicObject& rCacheObj ) const { return !( *this == rCacheObj ); }
+ sal_Bool operator==( const GraphicObject& rCacheObj ) const;
+ sal_Bool operator!=( const GraphicObject& rCacheObj ) const { return !( *this == rCacheObj ); }
- BOOL HasSwapStreamHdl() const { return( mpSwapStreamHdl != NULL && mpSwapStreamHdl->IsSet() ); }
+ sal_Bool HasSwapStreamHdl() const { return( mpSwapStreamHdl != NULL && mpSwapStreamHdl->IsSet() ); }
void SetSwapStreamHdl();
- void SetSwapStreamHdl( const Link& rHdl, const ULONG nSwapOutTimeout = 0UL );
+ void SetSwapStreamHdl( const Link& rHdl, const sal_uLong nSwapOutTimeout = 0UL );
Link GetSwapStreamHdl() const;
- ULONG GetSwapOutTimeout() const { return( mpSwapOutTimer ? mpSwapOutTimer->GetTimeout() : 0 ); }
+ sal_uLong GetSwapOutTimeout() const { return( mpSwapOutTimer ? mpSwapOutTimer->GetTimeout() : 0 ); }
void FireSwapInRequest();
void FireSwapOutRequest();
@@ -342,8 +342,8 @@ public:
void SetGraphicManager( const GraphicManager& rMgr );
GraphicManager& GetGraphicManager() const { return *mpMgr; }
- BOOL IsCached( OutputDevice* pOut, const Point& rPt, const Size& rSz,
- const GraphicAttr* pAttr = NULL, ULONG nFlags = GRFMGR_DRAW_STANDARD) const;
+ sal_Bool IsCached( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+ const GraphicAttr* pAttr = NULL, sal_uLong nFlags = GRFMGR_DRAW_STANDARD) const;
void ReleaseFromCache();
const Graphic& GetGraphic() const;
@@ -381,12 +381,12 @@ public:
void SetAttr( const GraphicAttr& rAttr );
const GraphicAttr& GetAttr() const { return maAttr; }
- BOOL HasLink() const { return( mpLink != NULL && mpLink->Len() > 0 ); }
+ sal_Bool HasLink() const { return( mpLink != NULL && mpLink->Len() > 0 ); }
void SetLink();
void SetLink( const String& rLink );
String GetLink() const;
- BOOL HasUserData() const { return( mpUserData != NULL && mpUserData->Len() > 0 ); }
+ sal_Bool HasUserData() const { return( mpUserData != NULL && mpUserData->Len() > 0 ); }
void SetUserData();
void SetUserData( const String& rUserData );
String GetUserData() const;
@@ -396,36 +396,36 @@ public:
GraphicType GetType() const { return meType; }
const Size& GetPrefSize() const { return maPrefSize; }
const MapMode& GetPrefMapMode() const { return maPrefMapMode; }
- ULONG GetSizeBytes() const { return mnSizeBytes; }
- ULONG GetChecksum() const;
- BOOL IsTransparent() const { return mbTransparent; }
- BOOL IsAlpha() const { return mbAlpha; }
- BOOL IsAnimated() const { return mbAnimated; }
- BOOL IsEPS() const { return mbEPS; }
+ sal_uLong GetSizeBytes() const { return mnSizeBytes; }
+ sal_uLong GetChecksum() const;
+ sal_Bool IsTransparent() const { return mbTransparent; }
+ sal_Bool IsAlpha() const { return mbAlpha; }
+ sal_Bool IsAnimated() const { return mbAnimated; }
+ sal_Bool IsEPS() const { return mbEPS; }
void ResetAnimationLoopCount();
List* GetAnimationInfoList() const;
Link GetAnimationNotifyHdl() const { return maGraphic.GetAnimationNotifyHdl(); }
void SetAnimationNotifyHdl( const Link& rLink );
- BOOL SwapOut();
- BOOL SwapOut( SvStream* pOStm );
- BOOL SwapIn();
- BOOL SwapIn( SvStream* pIStm );
+ sal_Bool SwapOut();
+ sal_Bool SwapOut( SvStream* pOStm );
+ sal_Bool SwapIn();
+ sal_Bool SwapIn( SvStream* pIStm );
- BOOL IsInSwapIn() const { return mbIsInSwapIn; }
- BOOL IsInSwapOut() const { return mbIsInSwapOut; }
- BOOL IsInSwap() const { return( mbIsInSwapOut || mbIsInSwapOut ); }
- BOOL IsSwappedOut() const { return( mbAutoSwapped || maGraphic.IsSwapOut() ); }
+ sal_Bool IsInSwapIn() const { return mbIsInSwapIn; }
+ sal_Bool IsInSwapOut() const { return mbIsInSwapOut; }
+ sal_Bool IsInSwap() const { return( mbIsInSwapOut || mbIsInSwapOut ); }
+ sal_Bool IsSwappedOut() const { return( mbAutoSwapped || maGraphic.IsSwapOut() ); }
void SetSwapState();
- BOOL Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
- const GraphicAttr* pAttr = NULL, ULONG nFlags = GRFMGR_DRAW_STANDARD );
+ sal_Bool Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+ const GraphicAttr* pAttr = NULL, sal_uLong nFlags = GRFMGR_DRAW_STANDARD );
- BOOL DrawWithPDFHandling( OutputDevice& rOutDev,
+ sal_Bool DrawWithPDFHandling( OutputDevice& rOutDev,
const Point& rPt, const Size& rSz,
const GraphicAttr* pGrfAttr = NULL,
- const ULONG nFlags = GRFMGR_DRAW_STANDARD );
+ const sal_uLong nFlags = GRFMGR_DRAW_STANDARD );
/** Draw the graphic repeatedly into the given output rectangle
@@ -458,14 +458,14 @@ public:
is. This is useful if e.g. you want only a few, very large
bitmap drawings appear on the outdev.
- @return TRUE, if drawing completed successfully
+ @return sal_True, if drawing completed successfully
*/
- BOOL DrawTiled( OutputDevice* pOut, const Rectangle& rArea, const Size& rSize,
+ sal_Bool DrawTiled( OutputDevice* pOut, const Rectangle& rArea, const Size& rSize,
const Size& rOffset, const GraphicAttr* pAttr = NULL,
- ULONG nFlags = GRFMGR_DRAW_STANDARD, int nTileCacheSize1D=128 );
+ sal_uLong nFlags = GRFMGR_DRAW_STANDARD, int nTileCacheSize1D=128 );
- BOOL StartAnimation( OutputDevice* pOut, const Point& rPt, const Size& rSz, long nExtraData = 0L,
- const GraphicAttr* pAttr = NULL, ULONG nFlags = GRFMGR_DRAW_STANDARD,
+ sal_Bool StartAnimation( OutputDevice* pOut, const Point& rPt, const Size& rSz, long nExtraData = 0L,
+ const GraphicAttr* pAttr = NULL, sal_uLong nFlags = GRFMGR_DRAW_STANDARD,
OutputDevice* pFirstFrameOutDev = NULL );
void StopAnimation( OutputDevice* pOut = NULL, long nExtraData = 0L );
@@ -493,33 +493,33 @@ private:
GraphicManager( const GraphicManager& ) {}
GraphicManager& operator=( const GraphicManager& ) { return *this; }
- BOOL SVT_DLLPRIVATE ImplDraw( OutputDevice* pOut, const Point& rPt,
+ sal_Bool SVT_DLLPRIVATE ImplDraw( OutputDevice* pOut, const Point& rPt,
const Size& rSz, GraphicObject& rObj,
const GraphicAttr& rAttr,
- const ULONG nFlags, BOOL& rCached );
+ const sal_uLong nFlags, sal_Bool& rCached );
- BOOL SVT_DLLPRIVATE ImplCreateOutput( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+ sal_Bool SVT_DLLPRIVATE ImplCreateOutput( OutputDevice* pOut, const Point& rPt, const Size& rSz,
const BitmapEx& rBmpEx, const GraphicAttr& rAttr,
- const ULONG nFlags, BitmapEx* pBmpEx = NULL );
- BOOL SVT_DLLPRIVATE ImplCreateOutput( OutputDevice* pOut,
+ const sal_uLong nFlags, BitmapEx* pBmpEx = NULL );
+ sal_Bool SVT_DLLPRIVATE ImplCreateOutput( OutputDevice* pOut,
const Point& rPt, const Size& rSz,
const GDIMetaFile& rMtf, const GraphicAttr& rAttr,
- const ULONG nFlags, GDIMetaFile& rOutMtf, BitmapEx& rOutBmpEx );
+ const sal_uLong nFlags, GDIMetaFile& rOutMtf, BitmapEx& rOutBmpEx );
- BOOL SVT_DLLPRIVATE ImplCreateScaled( const BitmapEx& rBmpEx,
+ sal_Bool SVT_DLLPRIVATE ImplCreateScaled( const BitmapEx& rBmpEx,
long* pMapIX, long* pMapFX, long* pMapIY, long* pMapFY,
long nStartX, long nEndX, long nStartY, long nEndY,
BitmapEx& rOutBmpEx );
- BOOL SVT_DLLPRIVATE ImplCreateRotatedScaled( const BitmapEx& rBmpEx,
- USHORT nRot10, const Size& rOutSzPix, const Size& rUntSzPix,
+ sal_Bool SVT_DLLPRIVATE ImplCreateRotatedScaled( const BitmapEx& rBmpEx,
+ sal_uInt16 nRot10, const Size& rOutSzPix, const Size& rUntSzPix,
long* pMapIX, long* pMapFX, long* pMapIY, long* pMapFY,
long nStartX, long nEndX, long nStartY, long nEndY,
BitmapEx& rOutBmpEx );
- static void SVT_DLLPRIVATE ImplAdjust( BitmapEx& rBmpEx, const GraphicAttr& rAttr, ULONG nAdjustmentFlags );
- static void SVT_DLLPRIVATE ImplAdjust( GDIMetaFile& rMtf, const GraphicAttr& rAttr, ULONG nAdjustmentFlags );
- static void SVT_DLLPRIVATE ImplAdjust( Animation& rAnimation, const GraphicAttr& rAttr, ULONG nAdjustmentFlags );
+ static void SVT_DLLPRIVATE ImplAdjust( BitmapEx& rBmpEx, const GraphicAttr& rAttr, sal_uLong nAdjustmentFlags );
+ static void SVT_DLLPRIVATE ImplAdjust( GDIMetaFile& rMtf, const GraphicAttr& rAttr, sal_uLong nAdjustmentFlags );
+ static void SVT_DLLPRIVATE ImplAdjust( Animation& rAnimation, const GraphicAttr& rAttr, sal_uLong nAdjustmentFlags );
static void SVT_DLLPRIVATE ImplDraw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
const GDIMetaFile& rMtf, const GraphicAttr& rAttr );
@@ -529,42 +529,42 @@ private:
const ByteString* pID = NULL,
const GraphicObject* pCopyObj = NULL );
void SVT_DLLPRIVATE ImplUnregisterObj( const GraphicObject& rObj );
- inline BOOL SVT_DLLPRIVATE ImplHasObjects() const { return( maObjList.Count() > 0UL ); }
+ inline sal_Bool SVT_DLLPRIVATE ImplHasObjects() const { return( maObjList.Count() > 0UL ); }
// Only used in swap case by GraphicObject
void SVT_DLLPRIVATE ImplGraphicObjectWasSwappedOut( const GraphicObject& rObj );
- BOOL SVT_DLLPRIVATE ImplFillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute );
+ sal_Bool SVT_DLLPRIVATE ImplFillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute );
void SVT_DLLPRIVATE ImplGraphicObjectWasSwappedIn( const GraphicObject& rObj );
ByteString SVT_DLLPRIVATE ImplGetUniqueID( const GraphicObject& rObj ) const;
public:
- GraphicManager( ULONG nCacheSize = 10000000UL, ULONG nMaxObjCacheSize = 2400000UL );
+ GraphicManager( sal_uLong nCacheSize = 10000000UL, sal_uLong nMaxObjCacheSize = 2400000UL );
~GraphicManager();
- void SetMaxCacheSize( ULONG nNewCacheSize );
- ULONG GetMaxCacheSize() const;
+ void SetMaxCacheSize( sal_uLong nNewCacheSize );
+ sal_uLong GetMaxCacheSize() const;
- void SetMaxObjCacheSize( ULONG nNewMaxObjSize, BOOL bDestroyGreaterCached = FALSE );
- ULONG GetMaxObjCacheSize() const;
+ void SetMaxObjCacheSize( sal_uLong nNewMaxObjSize, sal_Bool bDestroyGreaterCached = sal_False );
+ sal_uLong GetMaxObjCacheSize() const;
- ULONG GetUsedCacheSize() const;
- ULONG GetFreeCacheSize() const;
+ sal_uLong GetUsedCacheSize() const;
+ sal_uLong GetFreeCacheSize() const;
- void SetCacheTimeout( ULONG nTimeoutSeconds );
- ULONG GetCacheTimeout() const;
+ void SetCacheTimeout( sal_uLong nTimeoutSeconds );
+ sal_uLong GetCacheTimeout() const;
void ClearCache();
void ReleaseFromCache( const GraphicObject& rObj );
- BOOL IsInCache( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+ sal_Bool IsInCache( OutputDevice* pOut, const Point& rPt, const Size& rSz,
const GraphicObject& rObj, const GraphicAttr& rAttr ) const;
- BOOL DrawObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+ sal_Bool DrawObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
GraphicObject& rObj, const GraphicAttr& rAttr,
- const ULONG nFlags, BOOL& rCached );
+ const sal_uLong nFlags, sal_Bool& rCached );
};
#endif // _GRFMGR_HXX
diff --git a/svtools/inc/svtools/headbar.hxx b/svtools/inc/svtools/headbar.hxx
index c225a95d1f55..106184e040f6 100644
--- a/svtools/inc/svtools/headbar.hxx
+++ b/svtools/inc/svtools/headbar.hxx
@@ -105,7 +105,7 @@ StartDrag() Dieser Handler wird gerufen, wenn Draggen gestartet
wird, bzw. wenn ein Item angeklickt wurde.
In diesem Handler sollte spaetestens mit SetDragSize()
die Groesse der Size-Linie gesetzt werden, wenn
- IsItemMode() FALSE zurueckliefert.
+ IsItemMode() sal_False zurueckliefert.
Drag() Dieser Handler wird gerufen, wenn gedraggt wird. Wenn
mit SetDragSize() keine Groesse gesetzt wird, kann
dieser Handler dafuer benutzt werden, um die
@@ -116,12 +116,12 @@ Drag() Dieser Handler wird gerufen, wenn gedraggt wird. Wenn
EndDrag() Dieser Handler wird gerufen, wenn ein Drag-Vorgang
beendet wurde. Wenn im EndDrag-Handler GetCurItemId()
0 zurueckliefert, wurde der Drag-Vorgang abgebrochen.
- Wenn dies nicht der Fall ist und IsItemMode() FALSE
+ Wenn dies nicht der Fall ist und IsItemMode() sal_False
zurueckliefert, sollte von dem gedraggten Item
die neue Groesse mit GetItemSize() abgefragt werden
und entsprechend im dazugehoerigem Control uebernommen
- werden. Wenn IsItemMode() TRUE, GetCurItemId() eine Id
- und IsItemDrag() TRUE zurueckliefert, wurde dieses
+ werden. Wenn IsItemMode() sal_True, GetCurItemId() eine Id
+ und IsItemDrag() sal_True zurueckliefert, wurde dieses
Item verschoben. Es sollte dann mit GetItemPos() die
neue Position abgefragt werden und auch die Daten
im dazugehoerigem Control angepasst werden. Ansonsten
@@ -143,12 +143,12 @@ GetItemDragPos() Liefert die Position zurueck, an der ein Item verschoben
oder wenn kein ItemDrag aktiv ist.
IsItemMode() Mit dieser Methode kann abgefragt werden, ob fuer ein
Item oder einen Trenner der Handler gerufen wurde.
- TRUE - Handler wurde fuer das Item gerufen
- FALSE - Handler wurde fuer den Trenner gerufen
+ sal_True - Handler wurde fuer das Item gerufen
+ sal_False - Handler wurde fuer den Trenner gerufen
IsItemDrag() Mit dieser Methode kann abgefragt werden, ob ein
Item gedragt oder selektiert wurde.
- TRUE - Item wird verschoben
- FALSE - Item wird selektiert
+ sal_True - Item wird verschoben
+ sal_False - Item wird selektiert
SetDragSize() Mit dieser Methode wird gesetzt, wir gross der
Trennstrich sein soll, der vom Control gemalt wird.
Dies sollte so gross sein, wie das angrenzende Fenster
@@ -200,7 +200,7 @@ class ImplHeadItemList;
// - HeaderBarItemBits -
// ---------------------
-typedef USHORT HeaderBarItemBits;
+typedef sal_uInt16 HeaderBarItemBits;
// ----------------------------
// - Bits fuer HeaderBarItems -
@@ -227,8 +227,8 @@ typedef USHORT HeaderBarItemBits;
// - HeaderBar-Types -
// -------------------
-#define HEADERBAR_APPEND ((USHORT)0xFFFF)
-#define HEADERBAR_ITEM_NOTFOUND ((USHORT)0xFFFF)
+#define HEADERBAR_APPEND ((sal_uInt16)0xFFFF)
+#define HEADERBAR_ITEM_NOTFOUND ((sal_uInt16)0xFFFF)
#define HEADERBAR_FULLSIZE ((long)1000000000)
#define HEADERBAR_TEXTOFF 2
@@ -250,14 +250,14 @@ private:
long mnStartPos;
long mnDragPos;
long mnMouseOff;
- USHORT mnCurItemId;
- USHORT mnItemDragPos;
- BOOL mbDragable;
- BOOL mbDrag;
- BOOL mbItemDrag;
- BOOL mbOutDrag;
- BOOL mbButtonStyle;
- BOOL mbItemMode;
+ sal_uInt16 mnCurItemId;
+ sal_uInt16 mnItemDragPos;
+ sal_Bool mbDragable;
+ sal_Bool mbDrag;
+ sal_Bool mbItemDrag;
+ sal_Bool mbOutDrag;
+ sal_Bool mbButtonStyle;
+ sal_Bool mbItemMode;
Link maStartDragHdl;
Link maDragHdl;
Link maEndDragHdl;
@@ -272,25 +272,25 @@ private:
#ifdef _SV_HEADBAR_CXX
using Window::ImplInit;
SVT_DLLPRIVATE void ImplInit( WinBits nWinStyle );
- SVT_DLLPRIVATE void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
- SVT_DLLPRIVATE long ImplGetItemPos( USHORT nPos ) const;
- SVT_DLLPRIVATE Rectangle ImplGetItemRect( USHORT nPos ) const;
+ SVT_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
+ SVT_DLLPRIVATE long ImplGetItemPos( sal_uInt16 nPos ) const;
+ SVT_DLLPRIVATE Rectangle ImplGetItemRect( sal_uInt16 nPos ) const;
using Window::ImplHitTest;
- SVT_DLLPRIVATE USHORT ImplHitTest( const Point& rPos, long& nMouseOff, USHORT& nPos ) const;
- SVT_DLLPRIVATE void ImplInvertDrag( USHORT nStartPos, USHORT nEndPos );
+ SVT_DLLPRIVATE sal_uInt16 ImplHitTest( const Point& rPos, long& nMouseOff, sal_uInt16& nPos ) const;
+ SVT_DLLPRIVATE void ImplInvertDrag( sal_uInt16 nStartPos, sal_uInt16 nEndPos );
SVT_DLLPRIVATE void ImplDrawItem( OutputDevice* pDev,
- USHORT nPos, BOOL bHigh, BOOL bDrag,
+ sal_uInt16 nPos, sal_Bool bHigh, sal_Bool bDrag,
const Rectangle& rItemRect,
const Rectangle* pRect,
- ULONG nFlags );
- SVT_DLLPRIVATE void ImplDrawItem( USHORT nPos, BOOL bHigh = FALSE,
- BOOL bDrag = FALSE,
+ sal_uLong nFlags );
+ SVT_DLLPRIVATE void ImplDrawItem( sal_uInt16 nPos, sal_Bool bHigh = sal_False,
+ sal_Bool bDrag = sal_False,
const Rectangle* pRect = NULL );
- SVT_DLLPRIVATE void ImplUpdate( USHORT nPos,
- BOOL bEnd = FALSE, BOOL bDirect = FALSE );
- SVT_DLLPRIVATE void ImplStartDrag( const Point& rPos, BOOL bCommand );
+ SVT_DLLPRIVATE void ImplUpdate( sal_uInt16 nPos,
+ sal_Bool bEnd = sal_False, sal_Bool bDirect = sal_False );
+ SVT_DLLPRIVATE void ImplStartDrag( const Point& rPos, sal_Bool bCommand );
SVT_DLLPRIVATE void ImplDrag( const Point& rPos );
- SVT_DLLPRIVATE void ImplEndDrag( BOOL bCancel );
+ SVT_DLLPRIVATE void ImplEndDrag( sal_Bool bCancel );
#endif
public:
@@ -302,7 +302,7 @@ public:
virtual void MouseMove( const MouseEvent& rMEvt );
virtual void Tracking( const TrackingEvent& rTEvt );
virtual void Paint( const Rectangle& rRect );
- virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags );
+ virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags );
virtual void Resize();
virtual void Command( const CommandEvent& rCEvt );
virtual void RequestHelp( const HelpEvent& rHEvt );
@@ -316,18 +316,18 @@ public:
virtual void Select();
virtual void DoubleClick();
- void InsertItem( USHORT nItemId, const Image& rImage,
+ void InsertItem( sal_uInt16 nItemId, const Image& rImage,
long nSize, HeaderBarItemBits nBits = HIB_STDSTYLE,
- USHORT nPos = HEADERBAR_APPEND );
- void InsertItem( USHORT nItemId, const XubString& rText,
+ sal_uInt16 nPos = HEADERBAR_APPEND );
+ void InsertItem( sal_uInt16 nItemId, const XubString& rText,
long nSize, HeaderBarItemBits nBits = HIB_STDSTYLE,
- USHORT nPos = HEADERBAR_APPEND );
- void InsertItem( USHORT nItemId,
+ sal_uInt16 nPos = HEADERBAR_APPEND );
+ void InsertItem( sal_uInt16 nItemId,
const Image& rImage, const XubString& rText,
long nSize, HeaderBarItemBits nBits = HIB_STDSTYLE,
- USHORT nPos = HEADERBAR_APPEND );
- void RemoveItem( USHORT nItemId );
- void MoveItem( USHORT nItemId, USHORT nNewPos );
+ sal_uInt16 nPos = HEADERBAR_APPEND );
+ void RemoveItem( sal_uInt16 nItemId );
+ void MoveItem( sal_uInt16 nItemId, sal_uInt16 nNewPos );
void Clear();
void SetOffset( long nNewOffset = 0 );
@@ -335,33 +335,33 @@ public:
inline void SetDragSize( long nNewSize = 0 ) { mnDragSize = nNewSize; }
long GetDragSize() const { return mnDragSize; }
- USHORT GetItemCount() const;
- USHORT GetItemPos( USHORT nItemId ) const;
- USHORT GetItemId( USHORT nPos ) const;
- USHORT GetItemId( const Point& rPos ) const;
- Rectangle GetItemRect( USHORT nItemId ) const;
- USHORT GetCurItemId() const { return mnCurItemId; }
+ sal_uInt16 GetItemCount() const;
+ sal_uInt16 GetItemPos( sal_uInt16 nItemId ) const;
+ sal_uInt16 GetItemId( sal_uInt16 nPos ) const;
+ sal_uInt16 GetItemId( const Point& rPos ) const;
+ Rectangle GetItemRect( sal_uInt16 nItemId ) const;
+ sal_uInt16 GetCurItemId() const { return mnCurItemId; }
long GetDragPos() const { return mnDragPos; }
- USHORT GetItemDragPos() const { return mnItemDragPos; }
- BOOL IsItemMode() const { return mbItemMode; }
- BOOL IsItemDrag() const { return mbItemDrag; }
-
- void SetItemSize( USHORT nItemId, long nNewSize );
- long GetItemSize( USHORT nItemId ) const;
- void SetItemBits( USHORT nItemId, HeaderBarItemBits nNewBits );
- HeaderBarItemBits GetItemBits( USHORT nItemId ) const;
- void SetItemData( USHORT nItemId, void* pNewData );
- void* GetItemData( USHORT nItemId ) const;
-
- void SetItemImage( USHORT nItemId, const Image& rImage );
- Image GetItemImage( USHORT nItemId ) const;
- void SetItemText( USHORT nItemId, const XubString& rText );
- XubString GetItemText( USHORT nItemId ) const;
-
- void SetHelpText( USHORT nItemId, const XubString& rText );
- XubString GetHelpText( USHORT nItemId ) const;
- void SetHelpId( USHORT nItemId, const rtl::OString& nHelpId );
- rtl::OString GetHelpId( USHORT nItemId ) const;
+ sal_uInt16 GetItemDragPos() const { return mnItemDragPos; }
+ sal_Bool IsItemMode() const { return mbItemMode; }
+ sal_Bool IsItemDrag() const { return mbItemDrag; }
+
+ void SetItemSize( sal_uInt16 nItemId, long nNewSize );
+ long GetItemSize( sal_uInt16 nItemId ) const;
+ void SetItemBits( sal_uInt16 nItemId, HeaderBarItemBits nNewBits );
+ HeaderBarItemBits GetItemBits( sal_uInt16 nItemId ) const;
+ void SetItemData( sal_uInt16 nItemId, void* pNewData );
+ void* GetItemData( sal_uInt16 nItemId ) const;
+
+ void SetItemImage( sal_uInt16 nItemId, const Image& rImage );
+ Image GetItemImage( sal_uInt16 nItemId ) const;
+ void SetItemText( sal_uInt16 nItemId, const XubString& rText );
+ XubString GetItemText( sal_uInt16 nItemId ) const;
+
+ void SetHelpText( sal_uInt16 nItemId, const XubString& rText );
+ XubString GetHelpText( sal_uInt16 nItemId ) const;
+ void SetHelpId( sal_uInt16 nItemId, const rtl::OString& nHelpId );
+ rtl::OString GetHelpId( sal_uInt16 nItemId ) const;
Size CalcWindowSizePixel() const;
@@ -383,7 +383,7 @@ public:
inline void SetCreateAccessibleHdl( const Link& rLink ) { maCreateAccessibleHdl = rLink; }
inline const Link& GetCreateAccessibleHdl() const { return maCreateAccessibleHdl; }
- inline BOOL IsDragable() const { return mbDragable; }
+ inline sal_Bool IsDragable() const { return mbDragable; }
/** Creates and returns the accessible object of the header bar. */
virtual ::com::sun::star::uno::Reference<
diff --git a/svtools/inc/svtools/htmlcfg.hxx b/svtools/inc/svtools/htmlcfg.hxx
index c27df0a9a67f..7778ffacfd7b 100644
--- a/svtools/inc/svtools/htmlcfg.hxx
+++ b/svtools/inc/svtools/htmlcfg.hxx
@@ -64,37 +64,37 @@ public:
virtual void Commit();
virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& _rPropertyNames);
- USHORT GetFontSize(USHORT nPos) const;
- void SetFontSize(USHORT nPos, USHORT nSize);
+ sal_uInt16 GetFontSize(sal_uInt16 nPos) const;
+ void SetFontSize(sal_uInt16 nPos, sal_uInt16 nSize);
- BOOL IsImportUnknown() const;
- void SetImportUnknown(BOOL bSet);
+ sal_Bool IsImportUnknown() const;
+ void SetImportUnknown(sal_Bool bSet);
- USHORT GetExportMode() const;
- void SetExportMode(USHORT nSet);
+ sal_uInt16 GetExportMode() const;
+ void SetExportMode(sal_uInt16 nSet);
- BOOL IsStarBasic() const;
- void SetStarBasic(BOOL bSet);
+ sal_Bool IsStarBasic() const;
+ void SetStarBasic(sal_Bool bSet);
- BOOL IsStarBasicWarning() const;
- void SetStarBasicWarning(BOOL bSet);
+ sal_Bool IsStarBasicWarning() const;
+ void SetStarBasicWarning(sal_Bool bSet);
- BOOL IsSaveGraphicsLocal() const;
- void SetSaveGraphicsLocal(BOOL bSet);
+ sal_Bool IsSaveGraphicsLocal() const;
+ void SetSaveGraphicsLocal(sal_Bool bSet);
- BOOL IsPrintLayoutExtension() const;
- void SetPrintLayoutExtension(BOOL bSet);
+ sal_Bool IsPrintLayoutExtension() const;
+ void SetPrintLayoutExtension(sal_Bool bSet);
- BOOL IsIgnoreFontFamily() const;
- void SetIgnoreFontFamily(BOOL bSet);
+ sal_Bool IsIgnoreFontFamily() const;
+ void SetIgnoreFontFamily(sal_Bool bSet);
sal_Bool IsDefaultTextEncoding() const;
rtl_TextEncoding GetTextEncoding() const;
void SetTextEncoding( rtl_TextEncoding );
static SvxHtmlOptions* Get();
- BOOL IsNumbersEnglishUS() const;
- void SetNumbersEnglishUS(BOOL bSet);
+ sal_Bool IsNumbersEnglishUS() const;
+ void SetNumbersEnglishUS(sal_Bool bSet);
void AddListenerLink( const Link& rLink );
void RemoveListenerLink( const Link& rLink );
diff --git a/svtools/inc/svtools/htmlout.hxx b/svtools/inc/svtools/htmlout.hxx
index 1a21f1154602..dbb8d63914a2 100644
--- a/svtools/inc/svtools/htmlout.hxx
+++ b/svtools/inc/svtools/htmlout.hxx
@@ -45,7 +45,7 @@ struct HTMLOutEvent
{
const sal_Char *pBasicName;
const sal_Char *pJavaName;
- USHORT nEvent;
+ sal_uInt16 nEvent;
};
struct SVT_DLLPUBLIC HTMLOutContext
@@ -71,7 +71,7 @@ struct HTMLOutFuncs
String *pNonConvertableChars = 0);
SVT_DLLPUBLIC static SvStream& Out_AsciiTag( SvStream&, const sal_Char* pStr,
- BOOL bOn = TRUE,
+ sal_Bool bOn = sal_True,
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252);
SVT_DLLPUBLIC static SvStream& Out_Char( SvStream&, sal_Unicode cChar,
HTMLOutContext& rContext,
@@ -79,13 +79,13 @@ struct HTMLOutFuncs
SVT_DLLPUBLIC static SvStream& Out_String( SvStream&, const String&,
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252,
String *pNonConvertableChars = 0 );
- SVT_DLLPUBLIC static SvStream& Out_Hex( SvStream&, ULONG nHex, BYTE nLen,
+ SVT_DLLPUBLIC static SvStream& Out_Hex( SvStream&, sal_uLong nHex, sal_uInt8 nLen,
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252 );
SVT_DLLPUBLIC static SvStream& Out_Color( SvStream&, const Color&,
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252 );
SVT_DLLPUBLIC static SvStream& Out_ImageMap( SvStream&, const String&, const ImageMap&, const String&,
const HTMLOutEvent *pEventTable,
- BOOL bOutStarBasic,
+ sal_Bool bOutStarBasic,
const sal_Char *pDelim = 0,
const sal_Char *pIndentArea = 0,
const sal_Char *pIndentMap = 0,
@@ -107,18 +107,18 @@ struct HTMLOutFuncs
// der 3. Parameter ist ein Array von HTMLOutEvents, das mit einem
// nur aus 0 bestehen Eintrag terminiert ist.
SVT_DLLPUBLIC static SvStream& Out_Events( SvStream&, const SvxMacroTableDtor&,
- const HTMLOutEvent*, BOOL bOutStarBasic,
+ const HTMLOutEvent*, sal_Bool bOutStarBasic,
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252,
String *pNonConvertableChars = 0 );
// <TD SDVAL="..." SDNUM="...">
SVT_DLLPUBLIC static ByteString& CreateTableDataOptionsValNum( ByteString& aStrTD,
- BOOL bValue, double fVal, ULONG nFormat,
+ sal_Bool bValue, double fVal, sal_uLong nFormat,
SvNumberFormatter& rFormatter,
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252,
String *pNonConvertableChars = 0 );
- SVT_DLLPUBLIC static BOOL PrivateURLToInternalImg( String& rURL );
+ SVT_DLLPUBLIC static sal_Bool PrivateURLToInternalImg( String& rURL );
};
#endif
diff --git a/svtools/inc/svtools/htmltokn.h b/svtools/inc/svtools/htmltokn.h
index 7c43c1463e25..5b577093ce8a 100644
--- a/svtools/inc/svtools/htmltokn.h
+++ b/svtools/inc/svtools/htmltokn.h
@@ -46,7 +46,7 @@ SVT_DLLPUBLIC int GetHTMLToken( const String& rName );
int GetHTMLOption( const String& rName );
// suche die 24-bit-Farbe zu einem Farbnamen (nicht gefunden = ULONG_MAX)
-SVT_DLLPUBLIC ULONG GetHTMLColor( const String& rName );
+SVT_DLLPUBLIC sal_uIntPtr GetHTMLColor( const String& rName );
// beginnen immer ab 256, groesser als ein char
const int HTML_TOKEN_START = 0x100;
diff --git a/svtools/inc/svtools/imap.hxx b/svtools/inc/svtools/imap.hxx
index 52212e365c87..e43d97eef9b9 100644
--- a/svtools/inc/svtools/imap.hxx
+++ b/svtools/inc/svtools/imap.hxx
@@ -53,13 +53,13 @@ protected:
// Binaer laden/speichern
void ImpWriteImageMap( SvStream& rOStm, const String& ) const ;
- void ImpReadImageMap( SvStream& rIStm, USHORT nCount, const String& );
+ void ImpReadImageMap( SvStream& rIStm, sal_uInt16 nCount, const String& );
// Im-/Export
void ImpWriteCERN( SvStream& rOStm, const String& rBaseURL ) const;
void ImpWriteNCSA( SvStream& rOStm, const String& rBaseURL ) const;
- ULONG ImpReadCERN( SvStream& rOStm, const String& rBaseURL );
- ULONG ImpReadNCSA( SvStream& rOStm, const String& rBaseURL );
+ sal_uLong ImpReadCERN( SvStream& rOStm, const String& rBaseURL );
+ sal_uLong ImpReadNCSA( SvStream& rOStm, const String& rBaseURL );
void ImpReadCERNLine( const ByteString& rLine, const String& rBaseURL );
Point ImpReadCERNCoords( const char** ppStr );
@@ -70,7 +70,7 @@ protected:
String ImpReadNCSAURL( const char** ppStr, const String& rBaseURL );
Point ImpReadNCSACoords( const char** ppStr );
- ULONG ImpDetectFormat( SvStream& rIStm );
+ sal_uLong ImpDetectFormat( SvStream& rIStm );
public:
@@ -89,8 +89,8 @@ public:
ImageMap& operator=( const ImageMap& rImageMap );
// Vergleichsoperator (es wird alles auf Gleichheit geprueft)
- BOOL operator==( const ImageMap& rImageMap );
- BOOL operator!=( const ImageMap& rImageMap );
+ sal_Bool operator==( const ImageMap& rImageMap );
+ sal_Bool operator!=( const ImageMap& rImageMap );
// In die Map wird ein neues IMap-Obkekt ans Ende eingefuegt
void InsertIMapObject( const IMapObject& rIMapObject );
@@ -101,7 +101,7 @@ public:
IMapObject* GetNextIMapObject() { return (IMapObject*) maList.Next(); }
IMapObject* GetLastIMapObject() { return (IMapObject*) maList.Last(); }
IMapObject* GetPrevIMapObject() { return (IMapObject*) maList.Prev(); }
- IMapObject* GetIMapObject( USHORT nPos ) const { return (IMapObject*) maList.GetObject( nPos ); }
+ IMapObject* GetIMapObject( sal_uInt16 nPos ) const { return (IMapObject*) maList.GetObject( nPos ); }
// Gibt das Objekt zurueck, das zuerst getroffen wurde oder NULL;
// Groessen- und Positionsangaben sind in 1/100mm;
@@ -112,16 +112,16 @@ public:
IMapObject* GetHitIMapObject( const Size& rOriginalSize,
const Size& rDisplaySize,
const Point& rRelHitPoint,
- ULONG nFlags = 0 );
+ sal_uLong nFlags = 0 );
// Gibt die Gesamtanzahl der IMap-Objekte zurueck
- UINT16 GetIMapObjectCount() const { return (UINT16) maList.Count(); }
+ sal_uInt16 GetIMapObjectCount() const { return (sal_uInt16) maList.Count(); }
// Loescht alle internen Objekte
void ClearImageMap();
// liefert die aktuelle Versionsnummer
- UINT16 GetVersion() const;
+ sal_uInt16 GetVersion() const;
// liefert / setzt den Namen der ImageMap
const String& GetName() const { return aName; }
@@ -137,8 +137,8 @@ public:
void Write ( SvStream& rOStm, const String& rBaseURL ) const;
void Read( SvStream& rIStm, const String& rBaseURL );
- void Write( SvStream& rOStm, ULONG nFormat, const String& rBaseURL ) const;
- ULONG Read( SvStream& rIStm, ULONG nFormat, const String& rBaseURL );
+ void Write( SvStream& rOStm, sal_uLong nFormat, const String& rBaseURL ) const;
+ sal_uLong Read( SvStream& rIStm, sal_uLong nFormat, const String& rBaseURL );
};
/******************************************************************************
@@ -152,18 +152,18 @@ public:
class IMapCompat
{
SvStream* pRWStm;
- ULONG nCompatPos;
- ULONG nTotalSize;
- USHORT nStmMode;
+ sal_uLong nCompatPos;
+ sal_uLong nTotalSize;
+ sal_uInt16 nStmMode;
IMapCompat() {}
IMapCompat( const IMapCompat& ) {}
IMapCompat& operator=( const IMapCompat& ) { return *this; }
- BOOL operator==( const IMapCompat& ) { return FALSE; }
+ sal_Bool operator==( const IMapCompat& ) { return sal_False; }
public:
- IMapCompat( SvStream& rStm, const USHORT nStreamMode );
+ IMapCompat( SvStream& rStm, const sal_uInt16 nStreamMode );
~IMapCompat();
};
diff --git a/svtools/inc/svtools/imapcirc.hxx b/svtools/inc/svtools/imapcirc.hxx
index e3ea5349d376..88f7fffa8d22 100644
--- a/svtools/inc/svtools/imapcirc.hxx
+++ b/svtools/inc/svtools/imapcirc.hxx
@@ -42,9 +42,9 @@ class Fraction;
class SVT_DLLPUBLIC IMapCircleObject : public IMapObject
{
Point aCenter;
- ULONG nRadius;
+ sal_uLong nRadius;
- void ImpConstruct( const Point& rCenter, ULONG nRad, BOOL bPixel );
+ void ImpConstruct( const Point& rCenter, sal_uLong nRad, sal_Bool bPixel );
protected:
@@ -55,21 +55,21 @@ protected:
public:
IMapCircleObject() {};
- IMapCircleObject( const Point& rCenter, ULONG nRad,
+ IMapCircleObject( const Point& rCenter, sal_uLong nRad,
const String& rURL,
const String& rAltText,
const String& rDesc,
const String& rTarget,
const String& rName,
- BOOL bActive = TRUE,
- BOOL bPixelCoords = TRUE );
+ sal_Bool bActive = sal_True,
+ sal_Bool bPixelCoords = sal_True );
virtual ~IMapCircleObject() {};
- virtual UINT16 GetType() const;
- virtual BOOL IsHit( const Point& rPoint ) const;
+ virtual sal_uInt16 GetType() const;
+ virtual sal_Bool IsHit( const Point& rPoint ) const;
- Point GetCenter( BOOL bPixelCoords = TRUE ) const;
- ULONG GetRadius( BOOL bPixelCoords = TRUE ) const;
+ Point GetCenter( sal_Bool bPixelCoords = sal_True ) const;
+ sal_uLong GetRadius( sal_Bool bPixelCoords = sal_True ) const;
// liefert das BoundRect des Kreis-Objektes in 1/100mm
virtual Rectangle GetBoundRect() const;
@@ -77,7 +77,7 @@ public:
void Scale( const Fraction& rFractX, const Fraction& rFracY );
using IMapObject::IsEqual;
- BOOL IsEqual( const IMapCircleObject& rEqObj );
+ sal_Bool IsEqual( const IMapCircleObject& rEqObj );
// Im-/Export
void WriteCERN( SvStream& rOStm, const String& rBaseURL ) const;
diff --git a/svtools/inc/svtools/imapobj.hxx b/svtools/inc/svtools/imapobj.hxx
index c557727124cc..42e6b1740b70 100644
--- a/svtools/inc/svtools/imapobj.hxx
+++ b/svtools/inc/svtools/imapobj.hxx
@@ -36,13 +36,13 @@ class Point;
class Rectangle;
class SvStream;
-#define IMAP_OBJ_NONE ((UINT16)0x0000)
-#define IMAP_OBJ_RECTANGLE ((UINT16)0x0001)
-#define IMAP_OBJ_CIRCLE ((UINT16)0x0002)
-#define IMAP_OBJ_POLYGON ((UINT16)0x0003)
-#define IMAP_OBJ_VERSION ((UINT16)0x0005)
+#define IMAP_OBJ_NONE ((sal_uInt16)0x0000)
+#define IMAP_OBJ_RECTANGLE ((sal_uInt16)0x0001)
+#define IMAP_OBJ_CIRCLE ((sal_uInt16)0x0002)
+#define IMAP_OBJ_POLYGON ((sal_uInt16)0x0003)
+#define IMAP_OBJ_VERSION ((sal_uInt16)0x0005)
-#define IMAGE_MAP_VERSION ((UINT16)0x0001)
+#define IMAGE_MAP_VERSION ((sal_uInt16)0x0001)
#define IMAPMAGIC "SDIMAP"
@@ -73,11 +73,11 @@ class SVT_DLLPUBLIC IMapObject
String aTarget;
String aName;
SvxMacroTableDtor aEventList;
- BOOL bActive;
+ sal_Bool bActive;
protected:
- UINT16 nReadVersion;
+ sal_uInt16 nReadVersion;
// Binaer-Im-/Export
virtual void WriteIMapObject( SvStream& rOStm ) const = 0;
@@ -99,12 +99,12 @@ public:
const String& rDesc,
const String& rTarget,
const String& rName,
- BOOL bActive );
+ sal_Bool bActive );
virtual ~IMapObject() {};
- virtual UINT16 GetVersion() const;
- virtual UINT16 GetType() const = 0;
- virtual BOOL IsHit( const Point& rPoint ) const = 0;
+ virtual sal_uInt16 GetVersion() const;
+ virtual sal_uInt16 GetType() const = 0;
+ virtual sal_Bool IsHit( const Point& rPoint ) const = 0;
void Write ( SvStream& rOStm, const String& rBaseURL ) const;
void Read( SvStream& rIStm, const String& rBaseURL );
@@ -126,33 +126,33 @@ public:
const String& GetName() const { return aName; }
void SetName( const String& rName ) { aName = rName; }
- BOOL IsActive() const { return bActive; }
- void SetActive( BOOL bSetActive = TRUE ) { bActive = bSetActive; }
+ sal_Bool IsActive() const { return bActive; }
+ void SetActive( sal_Bool bSetActive = sal_True ) { bActive = bSetActive; }
static Point GetPixelPoint( const Point& rLogPoint );
static Point GetLogPoint( const Point& rPixelPoint );
- BOOL IsEqual( const IMapObject& rEqObj );
+ sal_Bool IsEqual( const IMapObject& rEqObj );
// IMap-Events
inline const SvxMacroTableDtor& GetMacroTable() const { return aEventList;}
inline void SetMacroTable( const SvxMacroTableDtor& rTbl ) { aEventList = rTbl; }
- inline const SvxMacro& GetEvent( USHORT nEvent ) const;
- inline BOOL HasEvent( USHORT nEvent ) const;
- void SetEvent( USHORT nEvent, const SvxMacro& );
- inline BOOL DelEvent( USHORT nEvent );
+ inline const SvxMacro& GetEvent( sal_uInt16 nEvent ) const;
+ inline sal_Bool HasEvent( sal_uInt16 nEvent ) const;
+ void SetEvent( sal_uInt16 nEvent, const SvxMacro& );
+ inline sal_Bool DelEvent( sal_uInt16 nEvent );
};
-inline BOOL IMapObject::HasEvent( USHORT nEvent ) const
+inline sal_Bool IMapObject::HasEvent( sal_uInt16 nEvent ) const
{
return aEventList.IsKeyValid( nEvent );
}
-inline const SvxMacro& IMapObject::GetEvent( USHORT nEvent ) const
+inline const SvxMacro& IMapObject::GetEvent( sal_uInt16 nEvent ) const
{
return *(aEventList.Get( nEvent ));
}
-inline BOOL IMapObject::DelEvent( USHORT nEvent )
+inline sal_Bool IMapObject::DelEvent( sal_uInt16 nEvent )
{
SvxMacro *pMacro = aEventList.Remove( nEvent );
delete pMacro;
diff --git a/svtools/inc/svtools/imappoly.hxx b/svtools/inc/svtools/imappoly.hxx
index 00d22cbe2de0..e6d31f78597a 100644
--- a/svtools/inc/svtools/imappoly.hxx
+++ b/svtools/inc/svtools/imappoly.hxx
@@ -44,9 +44,9 @@ class SVT_DLLPUBLIC IMapPolygonObject : public IMapObject
{
Polygon aPoly;
Rectangle aEllipse;
- BOOL bEllipse;
+ sal_Bool bEllipse;
- SVT_DLLPRIVATE void ImpConstruct( const Polygon& rPoly, BOOL bPixel );
+ SVT_DLLPRIVATE void ImpConstruct( const Polygon& rPoly, sal_Bool bPixel );
protected:
@@ -54,7 +54,7 @@ protected:
virtual void WriteIMapObject( SvStream& rOStm ) const;
virtual void ReadIMapObject( SvStream& rIStm );
- BOOL ReadPreProLine( SvStream& rIStm, String& rStr );
+ sal_Bool ReadPreProLine( SvStream& rIStm, String& rStr );
public:
IMapPolygonObject() {};
@@ -64,26 +64,26 @@ public:
const String& rDesc,
const String& rTarget,
const String& rName,
- BOOL bActive = TRUE,
- BOOL bPixelCoords = TRUE );
+ sal_Bool bActive = sal_True,
+ sal_Bool bPixelCoords = sal_True );
virtual ~IMapPolygonObject() {};
- virtual UINT16 GetType() const;
- virtual BOOL IsHit( const Point& rPoint ) const;
+ virtual sal_uInt16 GetType() const;
+ virtual sal_Bool IsHit( const Point& rPoint ) const;
- Polygon GetPolygon( BOOL bPixelCoords = TRUE ) const;
+ Polygon GetPolygon( sal_Bool bPixelCoords = sal_True ) const;
// liefert das BoundRect des Polygon-Objektes in 1/100mm
virtual Rectangle GetBoundRect() const { return aPoly.GetBoundRect(); }
- BOOL HasExtraEllipse() const { return bEllipse; }
+ sal_Bool HasExtraEllipse() const { return bEllipse; }
const Rectangle& GetExtraEllipse() const { return aEllipse; }
void SetExtraEllipse( const Rectangle& rEllipse );
void Scale( const Fraction& rFractX, const Fraction& rFracY );
using IMapObject::IsEqual;
- BOOL IsEqual( const IMapPolygonObject& rEqObj );
+ sal_Bool IsEqual( const IMapPolygonObject& rEqObj );
// Im-/Export
void WriteCERN( SvStream& rOStm, const String& rBaseURL ) const;
diff --git a/svtools/inc/svtools/imaprect.hxx b/svtools/inc/svtools/imaprect.hxx
index 8eacaaaf3531..3e6d80f52bef 100644
--- a/svtools/inc/svtools/imaprect.hxx
+++ b/svtools/inc/svtools/imaprect.hxx
@@ -43,7 +43,7 @@ class SVT_DLLPUBLIC IMapRectangleObject : public IMapObject
{
Rectangle aRect;
- SVT_DLLPRIVATE void ImpConstruct( const Rectangle& rRect, BOOL bPixel );
+ SVT_DLLPRIVATE void ImpConstruct( const Rectangle& rRect, sal_Bool bPixel );
protected:
@@ -60,14 +60,14 @@ public:
const String& rDesc,
const String& rTarget,
const String& rName,
- BOOL bActive = TRUE,
- BOOL bPixelCoords = TRUE );
+ sal_Bool bActive = sal_True,
+ sal_Bool bPixelCoords = sal_True );
virtual ~IMapRectangleObject() {};
- virtual UINT16 GetType() const;
- virtual BOOL IsHit( const Point& rPoint ) const;
+ virtual sal_uInt16 GetType() const;
+ virtual sal_Bool IsHit( const Point& rPoint ) const;
- Rectangle GetRectangle( BOOL bPixelCoords = TRUE ) const;
+ Rectangle GetRectangle( sal_Bool bPixelCoords = sal_True ) const;
// liefert das BoundRect des Rechteck-Objektes in 1/100mm
virtual Rectangle GetBoundRect() const { return aRect; }
@@ -75,7 +75,7 @@ public:
void Scale( const Fraction& rFractX, const Fraction& rFracY );
using IMapObject::IsEqual;
- BOOL IsEqual( const IMapRectangleObject& rEqObj );
+ sal_Bool IsEqual( const IMapRectangleObject& rEqObj );
// Im-/Export
void WriteCERN( SvStream& rOStm, const String& rBaseURL ) const;
diff --git a/svtools/inc/svtools/inetimg.hxx b/svtools/inc/svtools/inetimg.hxx
index 924bbad831d6..61204e9d0935 100644
--- a/svtools/inc/svtools/inetimg.hxx
+++ b/svtools/inc/svtools/inetimg.hxx
@@ -77,8 +77,8 @@ public:
const Size& GetSizePixel() const { return aSizePixel; }
// Im-/Export
- sal_Bool Write( SvStream& rOStm, ULONG nFormat ) const;
- sal_Bool Read( SvStream& rIStm, ULONG nFormat );
+ sal_Bool Write( SvStream& rOStm, sal_uLong nFormat ) const;
+ sal_Bool Read( SvStream& rIStm, sal_uLong nFormat );
};
#endif // #ifndef _INETIMG_HXX
diff --git a/svtools/inc/svtools/inettbc.hxx b/svtools/inc/svtools/inettbc.hxx
index 9394f1ba5ccd..b65e8b0edea7 100644
--- a/svtools/inc/svtools/inettbc.hxx
+++ b/svtools/inc/svtools/inettbc.hxx
@@ -51,17 +51,17 @@ friend class SvtURLBox_Impl;
SvtMatchContext_Impl* pCtx;
SvtURLBox_Impl* pImp;
INetProtocol eSmartProtocol;
- BOOL bAutoCompleteMode : 1;
- BOOL bOnlyDirectories : 1;
- BOOL bModified : 1;
- BOOL bTryAutoComplete : 1;
- BOOL bCtrlClick : 1;
- BOOL bHistoryDisabled : 1;
- BOOL bNoSelection : 1;
- BOOL bIsAutoCompleteEnabled : 1;
+ sal_Bool bAutoCompleteMode : 1;
+ sal_Bool bOnlyDirectories : 1;
+ sal_Bool bModified : 1;
+ sal_Bool bTryAutoComplete : 1;
+ sal_Bool bCtrlClick : 1;
+ sal_Bool bHistoryDisabled : 1;
+ sal_Bool bNoSelection : 1;
+ sal_Bool bIsAutoCompleteEnabled : 1;
- SVT_DLLPRIVATE BOOL ProcessKey( const KeyCode& rCode );
- SVT_DLLPRIVATE void TryAutoComplete( BOOL bForce );
+ SVT_DLLPRIVATE sal_Bool ProcessKey( const KeyCode& rCode );
+ SVT_DLLPRIVATE void TryAutoComplete( sal_Bool bForce );
SVT_DLLPRIVATE void UpdatePicklistForSmartProtocol_Impl();
DECL_DLLPRIVATE_LINK( AutoCompleteHdl_Impl, void* );
using Window::ImplInit;
@@ -83,11 +83,11 @@ public:
const String& GetBaseURL() const { return aBaseURL; }
void SetOpenHdl( const Link& rLink ) { aOpenHdl = rLink; }
const Link& GetOpenHdl() const { return aOpenHdl; }
- void SetOnlyDirectories( BOOL bDir = TRUE );
- void SetNoURLSelection( BOOL bSet = TRUE );
+ void SetOnlyDirectories( sal_Bool bDir = sal_True );
+ void SetNoURLSelection( sal_Bool bSet = sal_True );
INetProtocol GetSmartProtocol() const { return eSmartProtocol; }
void SetSmartProtocol( INetProtocol eProt );
- BOOL IsCtrlOpen()
+ sal_Bool IsCtrlOpen()
{ return bCtrlClick; }
String GetURL();
void DisableHistory();
@@ -100,7 +100,7 @@ public:
void SetUrlFilter( const IUrlFilter* _pFilter );
const IUrlFilter* GetUrlFilter( ) const;
- inline void EnableAutocompletion( BOOL _bEnable = TRUE )
+ inline void EnableAutocompletion( sal_Bool _bEnable = sal_True )
{ bIsAutoCompleteEnabled = _bEnable; }
void SetPlaceHolder( const String& sPlaceHolder ) { aPlaceHolder = sPlaceHolder; }
String GetPlaceHolder() { return aPlaceHolder; }
diff --git a/svtools/inc/svtools/ivctrl.hxx b/svtools/inc/svtools/ivctrl.hxx
index 5bea4675b62e..9e42f12dffb1 100644
--- a/svtools/inc/svtools/ivctrl.hxx
+++ b/svtools/inc/svtools/ivctrl.hxx
@@ -85,7 +85,7 @@ class SvxIconChoiceCtrlEntry
Rectangle aRect; // Bounding-Rect des Entries
Rectangle aGridRect; // nur gesetzt im Grid-Modus
- ULONG nPos;
+ sal_uLong nPos;
// die Eintragsposition in der Eintragsliste entspricht der beim Insert vorgegebenen
// [Sortier-]Reihenfolge (->Reihenfolge der Anker in der Ankerliste!). Im AutoArrange-Modus
@@ -95,12 +95,12 @@ class SvxIconChoiceCtrlEntry
SvxIconChoiceCtrlEntry* pflink; // forward (rechter Nachbar)
SvxIconChoiceCtrlTextMode eTextMode;
- USHORT nX,nY; // fuer Tastatursteuerung
- USHORT nFlags;
+ sal_uInt16 nX,nY; // fuer Tastatursteuerung
+ sal_uInt16 nFlags;
- void ClearFlags( USHORT nMask ) { nFlags &= (~nMask); }
- void SetFlags( USHORT nMask ) { nFlags |= nMask; }
- void AssignFlags( USHORT _nFlags ) { nFlags = _nFlags; }
+ void ClearFlags( sal_uInt16 nMask ) { nFlags &= (~nMask); }
+ void SetFlags( sal_uInt16 nMask ) { nFlags |= nMask; }
+ void AssignFlags( sal_uInt16 _nFlags ) { nFlags = _nFlags; }
// setzt den linken Nachbarn (A <-> B ==> A <-> this <-> B)
void SetBacklink( SvxIconChoiceCtrlEntry* pA )
@@ -120,9 +120,9 @@ class SvxIconChoiceCtrlEntry
}
public:
- SvxIconChoiceCtrlEntry( USHORT nFlags = 0 );
- SvxIconChoiceCtrlEntry( const String& rText, const Image& rImage, USHORT nFlags = 0 );
- SvxIconChoiceCtrlEntry( const String& rText, const Image& rImage, const Image& rImageHC, USHORT nFlags = 0 );
+ SvxIconChoiceCtrlEntry( sal_uInt16 nFlags = 0 );
+ SvxIconChoiceCtrlEntry( const String& rText, const Image& rImage, sal_uInt16 nFlags = 0 );
+ SvxIconChoiceCtrlEntry( const String& rText, const Image& rImage, const Image& rImageHC, sal_uInt16 nFlags = 0 );
~SvxIconChoiceCtrlEntry () {}
void SetImage ( const Image& rImage ) { aImage = rImage; }
@@ -139,21 +139,21 @@ public:
const Rectangle & GetBoundRect() const { return aRect; }
- void SetFocus ( BOOL bSet )
+ void SetFocus ( sal_Bool bSet )
{ nFlags = ( bSet ? nFlags | ICNVIEW_FLAG_FOCUSED : nFlags & ~ICNVIEW_FLAG_FOCUSED ); }
SvxIconChoiceCtrlTextMode GetTextMode() const { return eTextMode; }
- USHORT GetFlags() const { return nFlags; }
- BOOL IsSelected() const { return (BOOL)((nFlags & ICNVIEW_FLAG_SELECTED) !=0); }
- BOOL IsFocused() const { return (BOOL)((nFlags & ICNVIEW_FLAG_FOCUSED) !=0); }
- BOOL IsInUse() const { return (BOOL)((nFlags & ICNVIEW_FLAG_IN_USE) !=0); }
- BOOL IsCursored() const { return (BOOL)((nFlags & ICNVIEW_FLAG_CURSORED) !=0); }
- BOOL IsDropTarget() const { return (BOOL)((nFlags & ICNVIEW_FLAG_DROP_TARGET) !=0); }
- BOOL IsBlockingEmphasis() const { return (BOOL)((nFlags & ICNVIEW_FLAG_BLOCK_EMPHASIS) !=0); }
- BOOL WasMoved() const { return (BOOL)((nFlags & ICNVIEW_FLAG_POS_MOVED) !=0); }
- void SetMoved( BOOL bMoved );
- BOOL IsPosLocked() const { return (BOOL)((nFlags & ICNVIEW_FLAG_POS_LOCKED) !=0); }
- void LockPos( BOOL bLock );
+ sal_uInt16 GetFlags() const { return nFlags; }
+ sal_Bool IsSelected() const { return (sal_Bool)((nFlags & ICNVIEW_FLAG_SELECTED) !=0); }
+ sal_Bool IsFocused() const { return (sal_Bool)((nFlags & ICNVIEW_FLAG_FOCUSED) !=0); }
+ sal_Bool IsInUse() const { return (sal_Bool)((nFlags & ICNVIEW_FLAG_IN_USE) !=0); }
+ sal_Bool IsCursored() const { return (sal_Bool)((nFlags & ICNVIEW_FLAG_CURSORED) !=0); }
+ sal_Bool IsDropTarget() const { return (sal_Bool)((nFlags & ICNVIEW_FLAG_DROP_TARGET) !=0); }
+ sal_Bool IsBlockingEmphasis() const { return (sal_Bool)((nFlags & ICNVIEW_FLAG_BLOCK_EMPHASIS) !=0); }
+ sal_Bool WasMoved() const { return (sal_Bool)((nFlags & ICNVIEW_FLAG_POS_MOVED) !=0); }
+ void SetMoved( sal_Bool bMoved );
+ sal_Bool IsPosLocked() const { return (sal_Bool)((nFlags & ICNVIEW_FLAG_POS_LOCKED) !=0); }
+ void LockPos( sal_Bool bLock );
// Nur bei AutoArrange gesetzt. Den Kopf der Liste gibts per SvxIconChoiceCtrl::GetPredecessorHead
SvxIconChoiceCtrlEntry* GetSuccessor() const { return pflink; }
SvxIconChoiceCtrlEntry* GetPredecessor() const { return pblink; }
@@ -174,10 +174,10 @@ class SvxIconChoiceCtrlColumnInfo
Image aColImage;
long nWidth;
SvxIconChoiceCtrlColumnAlign eAlignment;
- USHORT nSubItem;
+ sal_uInt16 nSubItem;
public:
- SvxIconChoiceCtrlColumnInfo( USHORT nSub, long nWd,
+ SvxIconChoiceCtrlColumnInfo( sal_uInt16 nSub, long nWd,
SvxIconChoiceCtrlColumnAlign eAlign ) :
nWidth( nWd ), eAlignment( eAlign ), nSubItem( nSub ) {}
SvxIconChoiceCtrlColumnInfo( const SvxIconChoiceCtrlColumnInfo& );
@@ -186,13 +186,13 @@ public:
void SetImage( const Image& rImg ) { aColImage = rImg; }
void SetWidth( long nWd ) { nWidth = nWd; }
void SetAlignment( SvxIconChoiceCtrlColumnAlign eAlign ) { eAlignment = eAlign; }
- void SetSubItem( USHORT nSub) { nSubItem = nSub; }
+ void SetSubItem( sal_uInt16 nSub) { nSubItem = nSub; }
const String& GetText() const { return aColText; }
const Image& GetImage() const { return aColImage; }
long GetWidth() const { return nWidth; }
SvxIconChoiceCtrlColumnAlign GetAlignment() const { return eAlignment; }
- USHORT GetSubItem() const { return nSubItem; }
+ sal_uInt16 GetSubItem() const { return nSubItem; }
};
//###################################################################################################################################
@@ -241,15 +241,15 @@ class SVT_DLLPUBLIC SvtIconChoiceCtrl : public Control
Link _aVisRectChangedHdl;
KeyEvent* _pCurKeyEvent;
SvxIconChoiceCtrl_Impl* _pImp;
- BOOL _bAutoFontColor;
+ sal_Bool _bAutoFontColor;
protected:
virtual void KeyInput( const KeyEvent& rKEvt );
- virtual BOOL EditedEntry( SvxIconChoiceCtrlEntry*, const XubString& rNewText, BOOL bCancelled );
+ virtual sal_Bool EditedEntry( SvxIconChoiceCtrlEntry*, const XubString& rNewText, sal_Bool bCancelled );
virtual void DocumentRectChanged();
virtual void VisibleRectChanged();
- virtual BOOL EditingEntry( SvxIconChoiceCtrlEntry* pEntry );
+ virtual sal_Bool EditingEntry( SvxIconChoiceCtrlEntry* pEntry );
virtual void Command( const CommandEvent& rCEvt );
virtual void Paint( const Rectangle& rRect );
virtual void MouseButtonDown( const MouseEvent& rMEvt );
@@ -269,11 +269,11 @@ protected:
virtual String GetEntryText(
SvxIconChoiceCtrlEntry* pEntry,
- BOOL bInplaceEdit );
+ sal_Bool bInplaceEdit );
virtual void FillLayoutData() const;
- void CallImplEventListeners(ULONG nEvent, void* pData);
+ void CallImplEventListeners(sal_uLong nEvent, void* pData);
public:
@@ -284,9 +284,9 @@ public:
void SetStyle( WinBits nWinStyle );
WinBits GetStyle() const;
- BOOL SetChoiceWithCursor ( BOOL bDo = TRUE );
+ sal_Bool SetChoiceWithCursor ( sal_Bool bDo = sal_True );
- void SetUpdateMode( BOOL bUpdateMode );
+ void SetUpdateMode( sal_Bool bUpdateMode );
void SetFont( const Font& rFont );
void SetPointFont( const Font& rFont );
@@ -299,17 +299,17 @@ public:
void ArrangeIcons();
- SvxIconChoiceCtrlEntry* InsertEntry( ULONG nPos = LIST_APPEND,
+ SvxIconChoiceCtrlEntry* InsertEntry( sal_uLong nPos = LIST_APPEND,
const Point* pPos = 0,
- USHORT nFlags = 0 );
+ sal_uInt16 nFlags = 0 );
SvxIconChoiceCtrlEntry* InsertEntry( const String& rText, const Image& rImage,
- ULONG nPos = LIST_APPEND,
+ sal_uLong nPos = LIST_APPEND,
const Point* pPos = 0,
- USHORT nFlags = 0 );
+ sal_uInt16 nFlags = 0 );
SvxIconChoiceCtrlEntry* InsertEntry( const String& rText, const Image& rImage, const Image& rImageHC,
- ULONG nPos = LIST_APPEND,
+ sal_uLong nPos = LIST_APPEND,
const Point* pPos = 0,
- USHORT nFlags = 0 );
+ sal_uInt16 nFlags = 0 );
/** creates automatic mnemonics for all icon texts in the control
*/
@@ -326,14 +326,14 @@ public:
void RemoveEntry( SvxIconChoiceCtrlEntry* pEntry );
- BOOL DoKeyInput( const KeyEvent& rKEvt );
+ sal_Bool DoKeyInput( const KeyEvent& rKEvt );
- BOOL IsEntryEditing() const;
+ sal_Bool IsEntryEditing() const;
void Clear();
- ULONG GetEntryCount() const;
- SvxIconChoiceCtrlEntry* GetEntry( ULONG nPos ) const;
- ULONG GetEntryListPos( SvxIconChoiceCtrlEntry* pEntry ) const;
+ sal_uLong GetEntryCount() const;
+ SvxIconChoiceCtrlEntry* GetEntry( sal_uLong nPos ) const;
+ sal_uLong GetEntryListPos( SvxIconChoiceCtrlEntry* pEntry ) const;
using Window::SetCursor;
void SetCursor( SvxIconChoiceCtrlEntry* pEntry );
SvxIconChoiceCtrlEntry* GetCursor() const;
@@ -341,16 +341,16 @@ public:
// Neu-Berechnung gecachter View-Daten und Invalidierung im Fenster
void InvalidateEntry( SvxIconChoiceCtrlEntry* pEntry );
- // bHit==FALSE: Eintrag gilt als getroffen, wenn Position im BoundRect liegt
- // ==TRUE : Bitmap oder Text muss getroffen sein
- SvxIconChoiceCtrlEntry* GetEntry( const Point& rPosPixel, BOOL bHit = FALSE ) const;
+ // bHit==sal_False: Eintrag gilt als getroffen, wenn Position im BoundRect liegt
+ // ==sal_True : Bitmap oder Text muss getroffen sein
+ SvxIconChoiceCtrlEntry* GetEntry( const Point& rPosPixel, sal_Bool bHit = sal_False ) const;
// Gibt den naechsten ueber pCurEntry liegenden Eintrag (ZOrder)
- SvxIconChoiceCtrlEntry* GetNextEntry( const Point& rPosPixel, SvxIconChoiceCtrlEntry* pCurEntry, BOOL ) const;
+ SvxIconChoiceCtrlEntry* GetNextEntry( const Point& rPosPixel, SvxIconChoiceCtrlEntry* pCurEntry, sal_Bool ) const;
// Gibt den naechsten unter pCurEntry liegenden Eintrag (ZOrder)
- SvxIconChoiceCtrlEntry* GetPrevEntry( const Point& rPosPixel, SvxIconChoiceCtrlEntry* pCurEntry, BOOL ) const;
+ SvxIconChoiceCtrlEntry* GetPrevEntry( const Point& rPosPixel, SvxIconChoiceCtrlEntry* pCurEntry, sal_Bool ) const;
- // in dem ULONG wird die Position in der Liste des gefunden Eintrags zurueckgegeben
- SvxIconChoiceCtrlEntry* GetSelectedEntry( ULONG& rPos ) const;
+ // in dem sal_uLong wird die Position in der Liste des gefunden Eintrags zurueckgegeben
+ SvxIconChoiceCtrlEntry* GetSelectedEntry( sal_uLong& rPos ) const;
void SetEntryTextMode( SvxIconChoiceCtrlTextMode eMode, SvxIconChoiceCtrlEntry* pEntry = 0 );
SvxIconChoiceCtrlTextMode GetEntryTextMode( const SvxIconChoiceCtrlEntry* pEntry = 0 ) const;
@@ -360,19 +360,19 @@ public:
void Flush();
- virtual BOOL HasBackground() const;
- virtual BOOL HasFont() const;
- virtual BOOL HasFontTextColor() const;
- virtual BOOL HasFontFillColor() const;
+ virtual sal_Bool HasBackground() const;
+ virtual sal_Bool HasFont() const;
+ virtual sal_Bool HasFontTextColor() const;
+ virtual sal_Bool HasFontFillColor() const;
- void SetFontColorToBackground ( BOOL bDo = TRUE ) { _bAutoFontColor = bDo; }
- BOOL AutoFontColor () { return _bAutoFontColor; }
+ void SetFontColorToBackground ( sal_Bool bDo = sal_True ) { _bAutoFontColor = bDo; }
+ sal_Bool AutoFontColor () { return _bAutoFontColor; }
Point GetLogicPos( const Point& rPosPixel ) const;
Point GetPixelPos( const Point& rPosLogic ) const;
void SetSelectionMode( SelectionMode eMode );
- BOOL HandleShortCutKey( const KeyEvent& rKeyEvent );
+ sal_Bool HandleShortCutKey( const KeyEvent& rKeyEvent );
Rectangle GetBoundingBox( SvxIconChoiceCtrlEntry* pEntry ) const;
Rectangle GetEntryCharacterBounds( const sal_Int32 _nEntryPos, const sal_Int32 _nCharacterIndex ) const;
diff --git a/svtools/inc/svtools/javainteractionhandler.hxx b/svtools/inc/svtools/javainteractionhandler.hxx
index 87ed9da0fc3d..56dbe0e03423 100644
--- a/svtools/inc/svtools/javainteractionhandler.hxx
+++ b/svtools/inc/svtools/javainteractionhandler.hxx
@@ -75,7 +75,7 @@ private:
bool m_bJavaNotFound_Handled;
bool m_bVMCreationFailure_Handled;
bool m_bRestartRequired_Handled;
- USHORT m_nResult_JavaDisabled;
+ sal_uInt16 m_nResult_JavaDisabled;
};
}
diff --git a/svtools/inc/svtools/localresaccess.hxx b/svtools/inc/svtools/localresaccess.hxx
index c72f68f64f03..b00a306d0535 100644
--- a/svtools/inc/svtools/localresaccess.hxx
+++ b/svtools/inc/svtools/localresaccess.hxx
@@ -68,7 +68,7 @@ namespace svt
FreeResource();
}
- inline BOOL IsAvailableRes( const ResId& _rId ) const
+ inline sal_Bool IsAvailableRes( const ResId& _rId ) const
{
return Resource::IsAvailableRes( _rId );
}
diff --git a/svtools/inc/svtools/parhtml.hxx b/svtools/inc/svtools/parhtml.hxx
index a302b40d9d4b..8de20132cbc4 100644
--- a/svtools/inc/svtools/parhtml.hxx
+++ b/svtools/inc/svtools/parhtml.hxx
@@ -120,7 +120,7 @@ public:
// ... als Enum pOptEnums ist ein HTMLOptionEnum-Array
sal_uInt16 GetEnum( const HTMLOptionEnum *pOptEnums,
sal_uInt16 nDflt=0 ) const;
- BOOL GetEnum( sal_uInt16 &rEnum, const HTMLOptionEnum *pOptEnums ) const;
+ sal_Bool GetEnum( sal_uInt16 &rEnum, const HTMLOptionEnum *pOptEnums ) const;
// ... und als ein par spezielle Enums
HTMLInputType GetInputType() const; // <INPUT TYPE=...>
@@ -134,20 +134,20 @@ SV_DECL_PTRARR(HTMLOptions,HTMLOptionPtr,16,16)
class SVT_DLLPUBLIC HTMLParser : public SvParser
{
- BOOL bNewDoc : 1; // neues Doc lesen ?
- BOOL bIsInHeader : 1; // scanne Header-Bereich
- BOOL bIsInBody : 1; // scanne Body-Bereich
- BOOL bReadListing : 1; // Lese Listings
- BOOL bReadXMP : 1; // Lese XMP
- BOOL bReadPRE : 1; // Lese preformatted Text
- BOOL bReadTextArea : 1; // Lese TEXTAREA
- BOOL bReadScript : 1; // Lesen von <SCRIPT>
- BOOL bReadStyle : 1; // Lesen von <STYLE>
- BOOL bEndTokenFound : 1; // </SCRIPT> oder </STYLE> gefunden
-
- BOOL bPre_IgnoreNewPara : 1; // Flags fuers lesen von PRE-Absaetzen
- BOOL bReadNextChar : 1; // TRUE: NextChar nochmals lesen (JavaScript!)
- BOOL bReadComment : 1; // TRUE: NextChar nochmals lesen (JavaScript!)
+ sal_Bool bNewDoc : 1; // neues Doc lesen ?
+ sal_Bool bIsInHeader : 1; // scanne Header-Bereich
+ sal_Bool bIsInBody : 1; // scanne Body-Bereich
+ sal_Bool bReadListing : 1; // Lese Listings
+ sal_Bool bReadXMP : 1; // Lese XMP
+ sal_Bool bReadPRE : 1; // Lese preformatted Text
+ sal_Bool bReadTextArea : 1; // Lese TEXTAREA
+ sal_Bool bReadScript : 1; // Lesen von <SCRIPT>
+ sal_Bool bReadStyle : 1; // Lesen von <STYLE>
+ sal_Bool bEndTokenFound : 1; // </SCRIPT> oder </STYLE> gefunden
+
+ sal_Bool bPre_IgnoreNewPara : 1; // Flags fuers lesen von PRE-Absaetzen
+ sal_Bool bReadNextChar : 1; // sal_True: NextChar nochmals lesen (JavaScript!)
+ sal_Bool bReadComment : 1; // sal_True: NextChar nochmals lesen (JavaScript!)
sal_uInt32 nPre_LinePos; // Pos in der Line im PRE-Tag
@@ -166,43 +166,43 @@ protected:
virtual ~HTMLParser();
- void FinishHeader( BOOL bBody ) { bIsInHeader = FALSE; bIsInBody = bBody; }
+ void FinishHeader( sal_Bool bBody ) { bIsInHeader = sal_False; bIsInBody = bBody; }
public:
- HTMLParser( SvStream& rIn, int bReadNewDoc = TRUE );
+ HTMLParser( SvStream& rIn, int bReadNewDoc = sal_True );
virtual SvParserState CallParser(); // Aufruf des Parsers
- BOOL IsNewDoc() const { return bNewDoc; }
- BOOL IsInHeader() const { return bIsInHeader; }
- BOOL IsInBody() const { return bIsInBody; }
- BOOL IsValidSyntax() const { return TRUE; }
- BOOL IsReadListing() const { return bReadListing; }
- BOOL IsReadXMP() const { return bReadXMP; }
- BOOL IsReadPRE() const { return bReadPRE; }
- BOOL IsReadScript() const { return bReadScript; }
- BOOL IsReadStyle() const { return bReadStyle; }
+ sal_Bool IsNewDoc() const { return bNewDoc; }
+ sal_Bool IsInHeader() const { return bIsInHeader; }
+ sal_Bool IsInBody() const { return bIsInBody; }
+ sal_Bool IsValidSyntax() const { return sal_True; }
+ sal_Bool IsReadListing() const { return bReadListing; }
+ sal_Bool IsReadXMP() const { return bReadXMP; }
+ sal_Bool IsReadPRE() const { return bReadPRE; }
+ sal_Bool IsReadScript() const { return bReadScript; }
+ sal_Bool IsReadStyle() const { return bReadStyle; }
- void SetReadNextChar() { bReadNextChar = TRUE; }
+ void SetReadNextChar() { bReadNextChar = sal_True; }
// PRE-/LISTING oder XMP-Modus starten/beenden oder Tags entsprechend
// filtern
- inline void StartPRE( BOOL bRestart=FALSE );
- void FinishPRE() { bReadPRE = FALSE; }
+ inline void StartPRE( sal_Bool bRestart=sal_False );
+ void FinishPRE() { bReadPRE = sal_False; }
int FilterPRE( int nToken );
- inline void StartListing( BOOL bRestart=FALSE );
- void FinishListing() { bReadListing = FALSE; }
+ inline void StartListing( sal_Bool bRestart=sal_False );
+ void FinishListing() { bReadListing = sal_False; }
int FilterListing( int nToken );
- inline void StartXMP( BOOL bRestart=FALSE );
- void FinishXMP() { bReadXMP = FALSE; }
+ inline void StartXMP( sal_Bool bRestart=sal_False );
+ void FinishXMP() { bReadXMP = sal_False; }
int FilterXMP( int nToken );
- void FinishTextArea() { bReadTextArea = FALSE; }
+ void FinishTextArea() { bReadTextArea = sal_False; }
// PRE-/LSITING- und XMP-Modus beenden
- void FinishPREListingXMP() { bReadPRE = bReadListing = bReadXMP = FALSE; }
+ void FinishPREListingXMP() { bReadPRE = bReadListing = bReadXMP = sal_False; }
// Das aktuelle Token dem aktuellen Modus (PRE, XMP, ...) entsprechend
// Filtern und die Flags setzen. Wird von Continue aufgerufen, bevor
@@ -212,7 +212,7 @@ public:
// Scannen eines Scripts beenden (sollte nur unmittelbar nach dem
// Lesen eines <SCRIPT> aufgerufen werden
- void EndScanScript() { bReadScript = FALSE; }
+ void EndScanScript() { bReadScript = sal_False; }
void ReadRawData( const sal_Char *pEndToken ) { aEndToken.AssignAscii(pEndToken); }
@@ -253,43 +253,43 @@ public:
// Ist der uebergebene 0-terminierte String (vermutlich) der Anfang
// eines HTML-Files? Er sollte mind. 80 Zeichen lang sein.
- // Mit Ausnahme des Falls, dass SwitchToUCS2==FALSE und
+ // Mit Ausnahme des Falls, dass SwitchToUCS2==sal_False und
// SVPAR_CS_DONTKNOW uebergeben wird muss der String mit zwei(!)
// 0-Bytes an einer geraden(!) Position terminiert sein.
static FASTBOOL IsHTMLFormat( const sal_Char* pHeader,
- BOOL bSwitchToUCS2 = FALSE,
+ sal_Bool bSwitchToUCS2 = sal_False,
rtl_TextEncoding eEnc=RTL_TEXTENCODING_DONTKNOW );
- BOOL ParseScriptOptions( String& rLangString, const String&, HTMLScriptLanguage& rLang,
+ sal_Bool ParseScriptOptions( String& rLangString, const String&, HTMLScriptLanguage& rLang,
String& rSrc, String& rLibrary, String& rModule );
// Einen Kommentar um den Inhalt von <SCRIPT> oder <STYLE> entfernen
// Bei 'bFull' wird ggf. die gesammte Zeile hinter einem "<!--"
// entfernt (fuer JavaSript)
- static void RemoveSGMLComment( String &rString, BOOL bFull );
+ static void RemoveSGMLComment( String &rString, sal_Bool bFull );
- static BOOL InternalImgToPrivateURL( String& rURL );
+ static sal_Bool InternalImgToPrivateURL( String& rURL );
static rtl_TextEncoding GetEncodingByHttpHeader( SvKeyValueIterator *pHTTPHeader );
- BOOL SetEncodingByHTTPHeader( SvKeyValueIterator *pHTTPHeader );
+ sal_Bool SetEncodingByHTTPHeader( SvKeyValueIterator *pHTTPHeader );
};
-inline void HTMLParser::StartPRE( BOOL bRestart )
+inline void HTMLParser::StartPRE( sal_Bool bRestart )
{
- bReadPRE = TRUE;
+ bReadPRE = sal_True;
bPre_IgnoreNewPara = !bRestart;
nPre_LinePos = 0UL;
}
-inline void HTMLParser::StartListing( BOOL bRestart )
+inline void HTMLParser::StartListing( sal_Bool bRestart )
{
- bReadListing = TRUE;
+ bReadListing = sal_True;
bPre_IgnoreNewPara = !bRestart;
nPre_LinePos = 0UL;
}
-inline void HTMLParser::StartXMP( BOOL bRestart )
+inline void HTMLParser::StartXMP( sal_Bool bRestart )
{
- bReadXMP = TRUE;
+ bReadXMP = sal_True;
bPre_IgnoreNewPara = !bRestart;
nPre_LinePos = 0UL;
}
diff --git a/svtools/inc/svtools/parrtf.hxx b/svtools/inc/svtools/parrtf.hxx
index b96e3937231d..212fe9cafaed 100644
--- a/svtools/inc/svtools/parrtf.hxx
+++ b/svtools/inc/svtools/parrtf.hxx
@@ -35,9 +35,9 @@
struct RtfParserState_Impl
{
rtl_TextEncoding eCodeSet;
- BYTE nUCharOverread;
+ sal_uInt8 nUCharOverread;
- RtfParserState_Impl( BYTE nUOverread, rtl_TextEncoding eCdSt )
+ RtfParserState_Impl( sal_uInt8 nUOverread, rtl_TextEncoding eCdSt )
: eCodeSet( eCdSt ), nUCharOverread( nUOverread )
{}
};
@@ -50,7 +50,7 @@ class SVT_DLLPUBLIC SvRTFParser : public SvParser
int nOpenBrakets;
rtl_TextEncoding eCodeSet, eUNICodeSet;
- BYTE nUCharOverread;
+ sal_uInt8 nUCharOverread;
private:
static short _inSkipGroup;
@@ -76,7 +76,7 @@ protected:
void SetUNICodeSet( rtl_TextEncoding eSet ) { eUNICodeSet = eSet; }
public:
- SvRTFParser( SvStream& rIn, BYTE nStackSize = 3 );
+ SvRTFParser( SvStream& rIn, sal_uInt8 nStackSize = 3 );
virtual SvParserState CallParser(); // Aufruf des Parsers
diff --git a/svtools/inc/svtools/prgsbar.hxx b/svtools/inc/svtools/prgsbar.hxx
index c02d400c6931..25411b696c84 100644
--- a/svtools/inc/svtools/prgsbar.hxx
+++ b/svtools/inc/svtools/prgsbar.hxx
@@ -72,15 +72,15 @@ private:
Point maPos;
long mnPrgsWidth;
long mnPrgsHeight;
- USHORT mnPercent;
- USHORT mnPercentCount;
- BOOL mbCalcNew;
+ sal_uInt16 mnPercent;
+ sal_uInt16 mnPercentCount;
+ sal_Bool mbCalcNew;
#ifdef _SV_PRGSBAR_CXX
using Window::ImplInit;
SVT_DLLPRIVATE void ImplInit();
- SVT_DLLPRIVATE void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
- SVT_DLLPRIVATE void ImplDrawProgress( USHORT nOldPerc, USHORT nNewPerc );
+ SVT_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
+ SVT_DLLPRIVATE void ImplDrawProgress( sal_uInt16 nOldPerc, sal_uInt16 nNewPerc );
#endif
public:
@@ -93,8 +93,8 @@ public:
virtual void StateChanged( StateChangedType nStateChange );
virtual void DataChanged( const DataChangedEvent& rDCEvt );
- void SetValue( USHORT nNewPercent );
- USHORT GetValue() const { return mnPercent; }
+ void SetValue( sal_uInt16 nNewPercent );
+ sal_uInt16 GetValue() const { return mnPercent; }
};
#endif // _PRGSBAR_HXX
diff --git a/svtools/inc/svtools/prnsetup.hxx b/svtools/inc/svtools/prnsetup.hxx
index 8e1ced9ed1a0..07f131fda07b 100644
--- a/svtools/inc/svtools/prnsetup.hxx
+++ b/svtools/inc/svtools/prnsetup.hxx
@@ -112,7 +112,7 @@ public:
void ImplFillPrnDlgListBox( const Printer* pPrinter,
ListBox* pBox, PushButton* pPropBtn );
-void ImplFreePrnDlgListBox( ListBox* pBox, BOOL bClear = TRUE );
+void ImplFreePrnDlgListBox( ListBox* pBox, sal_Bool bClear = sal_True );
Printer* ImplPrnDlgListBoxSelect( ListBox* pBox, PushButton* pPropBtn,
Printer* pPrinter, Printer* pTempPrinter );
Printer* ImplPrnDlgUpdatePrinter( Printer* pPrinter, Printer* pTempPrinter );
diff --git a/svtools/inc/svtools/rtfout.hxx b/svtools/inc/svtools/rtfout.hxx
index b9bfbc901848..72e488353b72 100644
--- a/svtools/inc/svtools/rtfout.hxx
+++ b/svtools/inc/svtools/rtfout.hxx
@@ -50,15 +50,15 @@ public:
static SvStream& Out_Char( SvStream&, sal_Unicode cChar,
int *pUCMode,
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252,
- BOOL bWriteHelpFile = FALSE );
+ sal_Bool bWriteHelpFile = sal_False );
static SvStream& Out_String( SvStream&, const String&,
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252,
- BOOL bWriteHelpFile = FALSE );
+ sal_Bool bWriteHelpFile = sal_False );
static SvStream& Out_Fontname( SvStream&, const String&,
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252,
- BOOL bWriteHelpFile = FALSE );
+ sal_Bool bWriteHelpFile = sal_False );
- static SvStream& Out_Hex( SvStream&, ULONG nHex, BYTE nLen );
+ static SvStream& Out_Hex( SvStream&, sal_uLong nHex, sal_uInt8 nLen );
};
diff --git a/svtools/inc/svtools/ruler.hxx b/svtools/inc/svtools/ruler.hxx
index c2649b298ba6..6ad47779e1d9 100644
--- a/svtools/inc/svtools/ruler.hxx
+++ b/svtools/inc/svtools/ruler.hxx
@@ -138,7 +138,7 @@ SetMargin2() mit Parametern aufgerufen werden, kann bei diesen
folgendes angegeben werden:
long nPos - Offset zum NullPunkt in Pixel
- USHORT nStyle - Bit-Style:
+ sal_uInt16 nStyle - Bit-Style:
RULER_MARGIN_SIZEABLE
Rand kann in der Groesse veraendert werden.
@@ -154,7 +154,7 @@ initialisiert werden muessen:
long nPos - Offset zum NullPunkt in Pixel
long nWidth - Breite des Spaltenabstands in Pixel (kann zum
Beispiel fuer Tabellenspalten auch 0 sein)
- USHORT nStyle - Bit-Style:
+ sal_uInt16 nStyle - Bit-Style:
RULER_BORDER_SIZEABLE
Spaltenabstand kann in der Groesse veraendert
werden. Dieses Flag sollte nur gesetzt werden,
@@ -190,7 +190,7 @@ Parameter muss ein Array vom Typ RulerIndent uebergeben werden, wobei folgende
Werte initialisiert werden muessen:
long nPos - Offset zum NullPunkt in Pixel
- USHORT nStyle - Bit-Style:
+ sal_uInt16 nStyle - Bit-Style:
RULER_INDENT_TOP (Erstzeileneinzug)
RULER_INDENT_BOTTOM (Linker/Rechter Einzug)
RULER_INDENT_BORDER (Verical line that shows the border distance)
@@ -206,7 +206,7 @@ Parameter muss ein Array vom Typ RulerTab uebergeben werden, wobei folgende
Werte initialisiert werden muessen:
long nPos - Offset zum NullPunkt in Pixel
- USHORT nStyle - Bit-Style:
+ sal_uInt16 nStyle - Bit-Style:
RULER_TAB_DEFAULT (kann nicht selektiert werden)
RULER_TAB_LEFT
RULER_TAB_CENTER
@@ -223,7 +223,7 @@ muss ein Array vom Typ RulerLine uebergeben werden, wobei folgende Werte
initialisiert werden muessen:
long nPos - Offset zum NullPunkt in Pixel
- USHORT nStyle - Bit-Style (muss zur Zeit immer 0 sein)
+ sal_uInt16 nStyle - Bit-Style (muss zur Zeit immer 0 sein)
Mit SetArrows() koennen Bemassungspfeile im Lineal angezeigt werden. Wenn
Bemassungspfeile gesetzt werden, werden im Lineal auch keine Unterteilungen
@@ -234,7 +234,7 @@ uebergeben werden, wobei folgende Werte initialisiert werden muessen:
long nPos - Offset zum NullPunkt in Pixel
long nWidth - Breite des Pfeils
long nLogWidth - Breite des Pfeils in logischer Einheit
- USHORT nStyle - Bit-Style (muss zur Zeit immer 0 sein)
+ sal_uInt16 nStyle - Bit-Style (muss zur Zeit immer 0 sein)
Mit SetSourceUnit() wird die Einheit eingestellt, in welcher die logischen
Werte vorliegen, die bei SetArrows() uebergeben werden. Dabei werden nur die
@@ -246,7 +246,7 @@ Wenn auch vom Benutzer die Raender, Tabs, Border, ... ueber das Lineal
geaendert werden koennen, muss etwas mehr Aufwand getrieben werden. Dazu
muessen die Methoden StartDrag(), Drag() und EndDrag() ueberlagert werden.
Bei der Methode StartDrag() besteht die Moeglichkeit durch das zurueckgeben
-von FALSE das Draggen zu verhindern. Im Drag-Handler muss die Drag-Position
+von sal_False das Draggen zu verhindern. Im Drag-Handler muss die Drag-Position
abgefragt werden und die Werte muessen an die neue Position verschoben werden.
Dazu ruft man einfach die einzelnen Set-Methoden auf. Solange man sich
im Drag-Handler befindet, werden sich die Werte nur gemerkt und erst
@@ -254,10 +254,10 @@ danach das Lineal neu ausgegeben. Alle Handler koennen auch als Links ueber
entsprechende Set..Hdl()-Methoden gesetzt werden.
- StartDrag()
- Wird gerufen, wenn das Draggen gestartet wird. Wenn FALSE
- zurueckgegeben wird, wird das Draggen nicht ausgefuehrt. Bei TRUE
+ Wird gerufen, wenn das Draggen gestartet wird. Wenn sal_False
+ zurueckgegeben wird, wird das Draggen nicht ausgefuehrt. Bei sal_True
wird das Draggen zugelassen. Wenn der Handler nicht ueberlagert
- wird, wird FALSE zurueckgegeben.
+ wird, wird sal_False zurueckgegeben.
- EndDrag()
Wird gerufen, wenn das Draggen beendet wird.
@@ -325,7 +325,7 @@ es folgende Abfrage-Methoden.
gezogen, werden automatisch die alten Werte dargestellt, ohne das
der Drag-Handler gerufen wird.
Falls der Benutzer jedoch den Wert auf die alte Position
- zurueckgeschoben hat, liefert die Methode trotzdem FALSE. Falls
+ zurueckgeschoben hat, liefert die Methode trotzdem sal_False. Falls
dies vermieden werden soll, muss sich die Applikation im StartDrag-
Handler den alten Wert merken und im EndDrag-Handler den Wert
vergleichen.
@@ -372,7 +372,7 @@ es folgende Abfrage-Methoden.
gegebenenfalls ueber das Abfangen des MouseButtonDown-Handlers
auch ueber die rechte Maustaste etwas auf ein Item anzuwenden. Als
Paramter ueber gibt man die Fensterposition und gegebenenfalls
- einen Pointer auf einen USHORT, um die Array-Position eines
+ einen Pointer auf einen sal_uInt16, um die Array-Position eines
Tabs, Indent oder Borders mitzubekommen. Als Type werden folgende
Werte zurueckgegeben:
RULER_TYPE_DONTKNOW (kein Element im Linealbereich)
@@ -388,7 +388,7 @@ mit CancelDrag() abgebrochen werden. Folgende Methoden gibt es fuer die
Drag-Steuerung:
- IsDrag()
- Liefert TRUE zurueck, wenn sich das Lineal im Drag-Vorgang befindet.
+ Liefert sal_True zurueck, wenn sich das Lineal im Drag-Vorgang befindet.
- CancelDrag()
Bricht den Drag-Vorgang ab, falls einer durchgefuehrt wird. Dabei
@@ -443,7 +443,7 @@ womit man bestimmte Aktionen abfangen kann.
RULER_EXTRA_DONTKNOW (Nichts)
RULER_EXTRA_NULLOFFSET (Koordinaaten-Kreuz)
RULER_EXTRA_TAB (Tab)
- - USHORT nStyle Bitfeld als Style:
+ - sal_uInt16 nStyle Bitfeld als Style:
RULER_STYLE_HIGHLIGHT (selektiert)
RULER_TAB_... (ein Tab-Style)
@@ -553,9 +553,9 @@ enum RulerType { RULER_TYPE_DONTKNOW, RULER_TYPE_OUTSIDE,
enum RulerExtra { RULER_EXTRA_DONTKNOW,
RULER_EXTRA_NULLOFFSET, RULER_EXTRA_TAB };
-#define RULER_STYLE_HIGHLIGHT ((USHORT)0x8000)
-#define RULER_STYLE_DONTKNOW ((USHORT)0x4000)
-#define RULER_STYLE_INVISIBLE ((USHORT)0x2000)
+#define RULER_STYLE_HIGHLIGHT ((sal_uInt16)0x8000)
+#define RULER_STYLE_DONTKNOW ((sal_uInt16)0x4000)
+#define RULER_STYLE_INVISIBLE ((sal_uInt16)0x2000)
#define RULER_DRAGSIZE_MOVE 0
#define RULER_DRAGSIZE_1 1
@@ -574,24 +574,24 @@ enum RulerExtra { RULER_EXTRA_DONTKNOW,
// - RulerMargin -
// ---------------
-#define RULER_MARGIN_SIZEABLE ((USHORT)0x0001)
+#define RULER_MARGIN_SIZEABLE ((sal_uInt16)0x0001)
// ---------------
// - RulerBorder -
// ---------------
-#define RULER_BORDER_SIZEABLE ((USHORT)0x0001)
-#define RULER_BORDER_MOVEABLE ((USHORT)0x0002)
-#define RULER_BORDER_VARIABLE ((USHORT)0x0004)
-#define RULER_BORDER_TABLE ((USHORT)0x0008)
-#define RULER_BORDER_SNAP ((USHORT)0x0010)
-#define RULER_BORDER_MARGIN ((USHORT)0x0020)
+#define RULER_BORDER_SIZEABLE ((sal_uInt16)0x0001)
+#define RULER_BORDER_MOVEABLE ((sal_uInt16)0x0002)
+#define RULER_BORDER_VARIABLE ((sal_uInt16)0x0004)
+#define RULER_BORDER_TABLE ((sal_uInt16)0x0008)
+#define RULER_BORDER_SNAP ((sal_uInt16)0x0010)
+#define RULER_BORDER_MARGIN ((sal_uInt16)0x0020)
struct RulerBorder
{
long nPos;
long nWidth;
- USHORT nStyle;
+ sal_uInt16 nStyle;
//minimum/maximum position, supported for table borders/rows
long nMinPos;
long nMaxPos;
@@ -601,33 +601,33 @@ struct RulerBorder
// - RulerIndent -
// ---------------
-#define RULER_INDENT_TOP ((USHORT)0x0000)
-#define RULER_INDENT_BOTTOM ((USHORT)0x0001)
-#define RULER_INDENT_BORDER ((USHORT)0x0002)
-#define RULER_INDENT_STYLE ((USHORT)0x000F)
+#define RULER_INDENT_TOP ((sal_uInt16)0x0000)
+#define RULER_INDENT_BOTTOM ((sal_uInt16)0x0001)
+#define RULER_INDENT_BORDER ((sal_uInt16)0x0002)
+#define RULER_INDENT_STYLE ((sal_uInt16)0x000F)
struct RulerIndent
{
long nPos;
- USHORT nStyle;
+ sal_uInt16 nStyle;
};
// ------------
// - RulerTab -
// ------------
-#define RULER_TAB_LEFT ((USHORT)0x0000)
-#define RULER_TAB_RIGHT ((USHORT)0x0001)
-#define RULER_TAB_DECIMAL ((USHORT)0x0002)
-#define RULER_TAB_CENTER ((USHORT)0x0003)
-#define RULER_TAB_DEFAULT ((USHORT)0x0004)
-#define RULER_TAB_STYLE ((USHORT)0x000F)
-#define RULER_TAB_RTL ((USHORT)0x0010)
+#define RULER_TAB_LEFT ((sal_uInt16)0x0000)
+#define RULER_TAB_RIGHT ((sal_uInt16)0x0001)
+#define RULER_TAB_DECIMAL ((sal_uInt16)0x0002)
+#define RULER_TAB_CENTER ((sal_uInt16)0x0003)
+#define RULER_TAB_DEFAULT ((sal_uInt16)0x0004)
+#define RULER_TAB_STYLE ((sal_uInt16)0x000F)
+#define RULER_TAB_RTL ((sal_uInt16)0x0010)
struct RulerTab
{
long nPos;
- USHORT nStyle;
+ sal_uInt16 nStyle;
};
#define RULER_TAB_WIDTH 7
@@ -640,7 +640,7 @@ struct RulerTab
struct RulerLine
{
long nPos;
- USHORT nStyle;
+ sal_uInt16 nStyle;
};
// --------------
@@ -652,7 +652,7 @@ struct RulerArrow
long nPos;
long nWidth;
long nLogWidth;
- USHORT nStyle;
+ sal_uInt16 nStyle;
};
class ImplRulerData;
@@ -676,33 +676,33 @@ private:
long mnBorderWidth;
long mnStartDragPos;
long mnDragPos;
- ULONG mnUpdateEvtId;
+ sal_uLong mnUpdateEvtId;
ImplRulerData* mpSaveData;
ImplRulerData* mpData;
ImplRulerData* mpDragData;
Rectangle maExtraRect;
WinBits mnWinStyle;
- USHORT mnUnitIndex;
- USHORT mnDragAryPos;
- USHORT mnDragSize;
- USHORT mnDragScroll;
- USHORT mnDragModifier;
- USHORT mnExtraStyle;
- USHORT mnExtraClicks;
- USHORT mnExtraModifier;
+ sal_uInt16 mnUnitIndex;
+ sal_uInt16 mnDragAryPos;
+ sal_uInt16 mnDragSize;
+ sal_uInt16 mnDragScroll;
+ sal_uInt16 mnDragModifier;
+ sal_uInt16 mnExtraStyle;
+ sal_uInt16 mnExtraClicks;
+ sal_uInt16 mnExtraModifier;
RulerExtra meExtraType;
RulerType meDragType;
MapUnit meSourceUnit;
FieldUnit meUnit;
Fraction maZoom;
- BOOL mbCalc;
- BOOL mbFormat;
- BOOL mbDrag;
- BOOL mbDragDelete;
- BOOL mbDragCanceled;
- BOOL mbAutoWinWidth;
- BOOL mbActive;
- BYTE mnUpdateFlags;
+ sal_Bool mbCalc;
+ sal_Bool mbFormat;
+ sal_Bool mbDrag;
+ sal_Bool mbDragDelete;
+ sal_Bool mbDragCanceled;
+ sal_Bool mbAutoWinWidth;
+ sal_Bool mbActive;
+ sal_uInt8 mnUpdateFlags;
Link maStartDragHdl;
Link maDragHdl;
Link maEndDragHdl;
@@ -718,27 +718,27 @@ private:
SVT_DLLPRIVATE void ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter );
SVT_DLLPRIVATE void ImplDrawArrows( long nCenter );
SVT_DLLPRIVATE void ImplDrawBorders( long nMin, long nMax, long nVirTop, long nVirBottom );
- SVT_DLLPRIVATE void ImplDrawIndent( const Polygon& rPoly, USHORT nStyle );
+ SVT_DLLPRIVATE void ImplDrawIndent( const Polygon& rPoly, sal_uInt16 nStyle );
SVT_DLLPRIVATE void ImplDrawIndents( long nMin, long nMax, long nVirTop, long nVirBottom );
- SVT_DLLPRIVATE void ImplDrawTab( OutputDevice* pDevice, const Point& rPos, USHORT nStyle );
+ SVT_DLLPRIVATE void ImplDrawTab( OutputDevice* pDevice, const Point& rPos, sal_uInt16 nStyle );
SVT_DLLPRIVATE void ImplDrawTabs( long nMin, long nMax, long nVirTop, long nVirBottom );
using Window::ImplInit;
SVT_DLLPRIVATE void ImplInit( WinBits nWinBits );
- SVT_DLLPRIVATE void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
+ SVT_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
SVT_DLLPRIVATE void ImplCalc();
SVT_DLLPRIVATE void ImplFormat();
- SVT_DLLPRIVATE void ImplInitExtraField( BOOL bUpdate );
- SVT_DLLPRIVATE void ImplInvertLines( BOOL bErase = FALSE );
+ SVT_DLLPRIVATE void ImplInitExtraField( sal_Bool bUpdate );
+ SVT_DLLPRIVATE void ImplInvertLines( sal_Bool bErase = sal_False );
SVT_DLLPRIVATE void ImplDraw();
- SVT_DLLPRIVATE void ImplDrawExtra( BOOL bPaint = FALSE );
- SVT_DLLPRIVATE void ImplUpdate( BOOL bMustCalc = FALSE );
+ SVT_DLLPRIVATE void ImplDrawExtra( sal_Bool bPaint = sal_False );
+ SVT_DLLPRIVATE void ImplUpdate( sal_Bool bMustCalc = sal_False );
using Window::ImplHitTest;
- SVT_DLLPRIVATE BOOL ImplHitTest( const Point& rPos,
+ SVT_DLLPRIVATE sal_Bool ImplHitTest( const Point& rPos,
ImplRulerHitTest* pHitTest,
- BOOL bRequiredStyle = FALSE,
- USHORT nRequiredStyle = 0 ) const;
- SVT_DLLPRIVATE BOOL ImplDocHitTest( const Point& rPos, RulerType eDragType, ImplRulerHitTest* pHitTest ) const;
- SVT_DLLPRIVATE BOOL ImplStartDrag( ImplRulerHitTest* pHitTest, USHORT nModifier );
+ sal_Bool bRequiredStyle = sal_False,
+ sal_uInt16 nRequiredStyle = 0 ) const;
+ SVT_DLLPRIVATE sal_Bool ImplDocHitTest( const Point& rPos, RulerType eDragType, ImplRulerHitTest* pHitTest ) const;
+ SVT_DLLPRIVATE sal_Bool ImplStartDrag( ImplRulerHitTest* pHitTest, sal_uInt16 nModifier );
SVT_DLLPRIVATE void ImplDrag( const Point& rPos );
SVT_DLLPRIVATE void ImplEndDrag();
DECL_DLLPRIVATE_LINK( ImplUpdateHdl, void* );
@@ -769,7 +769,7 @@ public:
void Activate();
void Deactivate();
- BOOL IsActive() const { return mbActive; }
+ sal_Bool IsActive() const { return mbActive; }
void SetWinPos( long nOff = 0, long nWidth = 0 );
long GetWinOffset() const { return mnWinOff; }
@@ -789,67 +789,67 @@ public:
void SetSourceUnit( MapUnit eNewUnit ) { meSourceUnit = eNewUnit; }
MapUnit GetSourceUnit() const { return meSourceUnit; }
- void SetExtraType( RulerExtra eNewExtraType, USHORT nStyle = 0 );
+ void SetExtraType( RulerExtra eNewExtraType, sal_uInt16 nStyle = 0 );
RulerExtra GetExtraType() const { return meExtraType; }
- USHORT GetExtraStyle() const { return mnExtraStyle; }
- USHORT GetExtraClicks() const { return mnExtraClicks; }
- USHORT GetExtraModifier() const { return mnExtraModifier; }
+ sal_uInt16 GetExtraStyle() const { return mnExtraStyle; }
+ sal_uInt16 GetExtraClicks() const { return mnExtraClicks; }
+ sal_uInt16 GetExtraModifier() const { return mnExtraModifier; }
- BOOL StartDocDrag( const MouseEvent& rMEvt,
+ sal_Bool StartDocDrag( const MouseEvent& rMEvt,
RulerType eDragType = RULER_TYPE_DONTKNOW );
RulerType GetDocType( const Point& rPos,
RulerType eDragType = RULER_TYPE_DONTKNOW,
- USHORT* pAryPos = NULL ) const;
+ sal_uInt16* pAryPos = NULL ) const;
RulerType GetDragType() const { return meDragType; }
long GetDragPos() const { return mnDragPos; }
- USHORT GetDragAryPos() const { return mnDragAryPos; }
- USHORT GetDragSize() const { return mnDragSize; }
- BOOL IsDragDelete() const { return mbDragDelete; }
- BOOL IsDragCanceled() const { return mbDragCanceled; }
- USHORT GetDragScroll() const { return mnDragScroll; }
- USHORT GetDragModifier() const { return mnDragModifier; }
- BOOL IsDrag() const { return mbDrag; }
+ sal_uInt16 GetDragAryPos() const { return mnDragAryPos; }
+ sal_uInt16 GetDragSize() const { return mnDragSize; }
+ sal_Bool IsDragDelete() const { return mbDragDelete; }
+ sal_Bool IsDragCanceled() const { return mbDragCanceled; }
+ sal_uInt16 GetDragScroll() const { return mnDragScroll; }
+ sal_uInt16 GetDragModifier() const { return mnDragModifier; }
+ sal_Bool IsDrag() const { return mbDrag; }
void CancelDrag();
long GetClickPos() const { return mnDragPos; }
RulerType GetClickType() const { return meDragType; }
- USHORT GetClickAryPos() const { return mnDragAryPos; }
+ sal_uInt16 GetClickAryPos() const { return mnDragAryPos; }
using Window::GetType;
RulerType GetType( const Point& rPos,
- USHORT* pAryPos = NULL ) const;
+ sal_uInt16* pAryPos = NULL ) const;
void SetNullOffset( long nPos );
long GetNullOffset() const;
void SetMargin1() { SetMargin1( 0, RULER_STYLE_INVISIBLE ); }
- void SetMargin1( long nPos, USHORT nMarginStyle = RULER_MARGIN_SIZEABLE );
+ void SetMargin1( long nPos, sal_uInt16 nMarginStyle = RULER_MARGIN_SIZEABLE );
long GetMargin1() const;
- USHORT GetMargin1Style() const;
+ sal_uInt16 GetMargin1Style() const;
void SetMargin2() { SetMargin2( 0, RULER_STYLE_INVISIBLE ); }
- void SetMargin2( long nPos, USHORT nMarginStyle = RULER_MARGIN_SIZEABLE );
+ void SetMargin2( long nPos, sal_uInt16 nMarginStyle = RULER_MARGIN_SIZEABLE );
long GetMargin2() const;
- USHORT GetMargin2Style() const;
+ sal_uInt16 GetMargin2Style() const;
- void SetLines( USHORT n = 0, const RulerLine* pLineAry = NULL );
- USHORT GetLineCount() const;
+ void SetLines( sal_uInt16 n = 0, const RulerLine* pLineAry = NULL );
+ sal_uInt16 GetLineCount() const;
const RulerLine* GetLines() const;
- void SetArrows( USHORT n = 0, const RulerArrow* pArrowAry = NULL );
- USHORT GetArrowCount() const;
+ void SetArrows( sal_uInt16 n = 0, const RulerArrow* pArrowAry = NULL );
+ sal_uInt16 GetArrowCount() const;
const RulerArrow* GetArrows() const;
- void SetBorders( USHORT n = 0, const RulerBorder* pBrdAry = NULL );
- USHORT GetBorderCount() const;
+ void SetBorders( sal_uInt16 n = 0, const RulerBorder* pBrdAry = NULL );
+ sal_uInt16 GetBorderCount() const;
const RulerBorder* GetBorders() const;
- void SetIndents( USHORT n = 0, const RulerIndent* pIndentAry = NULL );
- USHORT GetIndentCount() const;
+ void SetIndents( sal_uInt16 n = 0, const RulerIndent* pIndentAry = NULL );
+ sal_uInt16 GetIndentCount() const;
const RulerIndent* GetIndents() const;
- void SetTabs( USHORT n = 0, const RulerTab* pTabAry = NULL );
- USHORT GetTabCount() const;
+ void SetTabs( sal_uInt16 n = 0, const RulerTab* pTabAry = NULL );
+ sal_uInt16 GetTabCount() const;
const RulerTab* GetTabs() const;
static void DrawTab( OutputDevice* pDevice,
- const Point& rPos, USHORT nStyle );
+ const Point& rPos, sal_uInt16 nStyle );
void SetStyle( WinBits nStyle );
WinBits GetStyle() const { return mnWinStyle; }
@@ -868,7 +868,7 @@ public:
const Link& GetExtraDownHdl() const { return maExtraDownHdl; }
//set text direction right-to-left
- void SetTextRTL(BOOL bRTL);
+ void SetTextRTL(sal_Bool bRTL);
};
#endif // _RULER_HXX
diff --git a/svtools/inc/svtools/scrwin.hxx b/svtools/inc/svtools/scrwin.hxx
index 1542ed667133..deeab0ee3fd9 100644
--- a/svtools/inc/svtools/scrwin.hxx
+++ b/svtools/inc/svtools/scrwin.hxx
@@ -40,7 +40,7 @@ class DataChangedEvent;
// - ScrollableWindow-Type -
// -------------------------
-typedef USHORT ScrollableWindowFlags;
+typedef sal_uInt16 ScrollableWindowFlags;
#define SCRWIN_THUMBDRAGGING 1
#define SCRWIN_VCENTER 2
@@ -62,7 +62,7 @@ private:
ScrollBar aVScroll; // the scrollbars
ScrollBar aHScroll;
ScrollBarBox aCornerWin; // window in the bottom right corner
- BOOL bScrolling:1, // user controlled scrolling
+ sal_Bool bScrolling:1, // user controlled scrolling
bHandleDragging:1, // scroll window while dragging
bHCenter:1,
bVCenter:1;
@@ -94,15 +94,15 @@ public:
Size GetTotalSize() { return PixelToLogic( aTotPixSz ); }
void SetVisibleSize( const Size& rNewSize );
- BOOL MakeVisible( const Rectangle& rTarget, BOOL bSloppy = FALSE );
+ sal_Bool MakeVisible( const Rectangle& rTarget, sal_Bool bSloppy = sal_False );
Rectangle GetVisibleArea() const;
- void SetLineSize( ULONG nHorz, ULONG nVert );
+ void SetLineSize( sal_uLong nHorz, sal_uLong nVert );
using Window::Scroll;
- virtual void Scroll( long nDeltaX, long nDeltaY, USHORT nFlags = 0 );
+ virtual void Scroll( long nDeltaX, long nDeltaY, sal_uInt16 nFlags = 0 );
void ScrollLines( long nLinesX, long nLinesY );
- void ScrollPages( long nPagesX, ULONG nOverlapX,
- long nPagesY, ULONG nOverlapY );
+ void ScrollPages( long nPagesX, sal_uLong nOverlapX,
+ long nPagesY, sal_uLong nOverlapY );
private:
SVT_DLLPRIVATE Size GetOutputSizePixel() const;
diff --git a/svtools/inc/svtools/stdmenu.hxx b/svtools/inc/svtools/stdmenu.hxx
index 1b7e9816a103..34626dbd7721 100644
--- a/svtools/inc/svtools/stdmenu.hxx
+++ b/svtools/inc/svtools/stdmenu.hxx
@@ -189,7 +189,7 @@ private:
Link maSelectHdl;
Link maHighlightHdl;
- SVT_DLLPRIVATE BOOL ImplIsAlreadyInserted( const XubString& rStyleName, USHORT nCount );
+ SVT_DLLPRIVATE sal_Bool ImplIsAlreadyInserted( const XubString& rStyleName, sal_uInt16 nCount );
public:
FontStyleMenu();
diff --git a/svtools/inc/svtools/svicnvw.hxx b/svtools/inc/svtools/svicnvw.hxx
index 68a76d25e108..6aab24a32d70 100644
--- a/svtools/inc/svtools/svicnvw.hxx
+++ b/svtools/inc/svtools/svicnvw.hxx
@@ -63,20 +63,20 @@ enum SvIconViewTextMode
class SvIcnVwDataEntry : public SvViewDataEntry
{
friend class SvImpIconView;
- USHORT nIcnVwFlags;
+ sal_uInt16 nIcnVwFlags;
SvIconViewTextMode eTextMode;
public:
Rectangle aRect; // Bounding-Rect des Entries
Rectangle aGridRect; // gesetzt im Grid-Modus
Size aTextSize; // nur gesetzt im Grid-Modus
- USHORT nX,nY; // fuer Tastatursteuerung
+ sal_uInt16 nX,nY; // fuer Tastatursteuerung
SvIcnVwDataEntry();
virtual ~SvIcnVwDataEntry();
- BOOL IsEntryPosLocked() const { return (BOOL)((nIcnVwFlags & ICNVW_FLAG_POS_LOCKED) !=0); }
- void ClearVwFlags( USHORT nMask ) { nIcnVwFlags &= (~nMask); }
- void SetVwFlags( USHORT nMask ) { nIcnVwFlags |= nMask; }
- USHORT GetVwFlags() const { return nIcnVwFlags; }
+ sal_Bool IsEntryPosLocked() const { return (sal_Bool)((nIcnVwFlags & ICNVW_FLAG_POS_LOCKED) !=0); }
+ void ClearVwFlags( sal_uInt16 nMask ) { nIcnVwFlags &= (~nMask); }
+ void SetVwFlags( sal_uInt16 nMask ) { nIcnVwFlags |= nMask; }
+ sal_uInt16 GetVwFlags() const { return nIcnVwFlags; }
SvIconViewTextMode GetTextMode() const { return eTextMode; }
};
@@ -89,7 +89,7 @@ class SvIconView : public SvLBox
SvImpIconView* pImp;
Image aCollapsedEntryBmp;
Image aExpandedEntryBmp;
- USHORT nIcnVwFlags;
+ sal_uInt16 nIcnVwFlags;
void SetModel( SvLBoxTreeList* );
protected:
@@ -121,15 +121,15 @@ public:
void DisconnectFromModel();
SvLBoxEntry* InsertEntry( const XubString& rText, SvLBoxEntry* pParent = 0,
- BOOL bChildsOnDemand = FALSE,
- ULONG nPos=LIST_APPEND );
+ sal_Bool bChildsOnDemand = sal_False,
+ sal_uLong nPos=LIST_APPEND );
SvLBoxEntry* InsertEntry( const XubString& rText,
const Image& rExpandedEntryBmp,
const Image& rCollapsedEntryBmp,
SvLBoxEntry* pParent = 0,
- BOOL bChildsOnDemand = FALSE,
- ULONG nPos = LIST_APPEND );
+ sal_Bool bChildsOnDemand = sal_False,
+ sal_uLong nPos = LIST_APPEND );
const Image& GetDefaultExpandedEntryBmp() const { return aExpandedEntryBmp;}
const Image& GetDefaultCollapsedEntryBmp() const { return aCollapsedEntryBmp;}
@@ -146,7 +146,7 @@ public:
virtual SvLBoxEntry* CloneEntry( SvLBoxEntry* pSource );
- virtual USHORT IsA();
+ virtual sal_uInt16 IsA();
virtual void RequestingChilds( SvLBoxEntry* pParent );
@@ -158,7 +158,7 @@ public:
virtual void Resize();
virtual void GetFocus();
virtual void LoseFocus();
- void SetUpdateMode( BOOL );
+ void SetUpdateMode( sal_Bool );
using SvListView::SetModel;
virtual void SetModel( SvLBoxTreeList*, SvLBoxEntry* pParent );
@@ -166,40 +166,40 @@ public:
virtual void ModelHasInserted( SvListEntry* pEntry );
virtual void ModelHasInsertedTree( SvListEntry* pEntry );
virtual void ModelIsMoving(SvListEntry* pSource,
- SvListEntry* pTargetParent, ULONG nChildPos );
+ SvListEntry* pTargetParent, sal_uLong nChildPos );
virtual void ModelHasMoved(SvListEntry* pSource );
virtual void ModelIsRemoving( SvListEntry* pEntry );
virtual void ModelHasRemoved( SvListEntry* pEntry );
virtual void ModelHasEntryInvalidated( SvListEntry* pEntry );
- virtual void ShowTargetEmphasis( SvLBoxEntry*, BOOL bShow );
+ virtual void ShowTargetEmphasis( SvLBoxEntry*, sal_Bool bShow );
using Window::GetDropTarget;
virtual SvLBoxEntry* GetDropTarget( const Point& );
virtual Region GetDragRegion() const;
// NotifyMoving/Copying ueberladen, da wir bei GetDropTarget
// einen "magic pointer" zurueckgeben, falls in einen leeren
// Bereich auf der IconView gedroppt wird.
- virtual BOOL NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos);
- virtual BOOL NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos);
+ virtual sal_Bool NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+ SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos);
+ virtual sal_Bool NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+ SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos);
// gibt TopLeft des BoundingRects zurueck
// Konvertierung in Fensterposition: MapMode.Origin addieren
Point GetEntryPosition( SvLBoxEntry* ) const;
void SetEntryPosition( SvLBoxEntry*, const Point& rDocPos);
void SetEntryPosition( SvLBoxEntry*, const Point& rDocPos,
- BOOL bAdjustAtGrid );
+ sal_Bool bAdjustAtGrid );
void SetFont( const Font& rFont );
void SetDefaultFont();
using SvLBox::GetEntry;
- SvLBoxEntry* GetEntry( const Point& rPixPos, BOOL ) const;
+ SvLBoxEntry* GetEntry( const Point& rPixPos, sal_Bool ) const;
// Gibt den naechsten ueber pCurEntry liegenden Eintrag (ZOrder)
- SvLBoxEntry* GetNextEntry( const Point& rPixPos, SvLBoxEntry* pCurEntry, BOOL ) const;
+ SvLBoxEntry* GetNextEntry( const Point& rPixPos, SvLBoxEntry* pCurEntry, sal_Bool ) const;
// Gibt den naechsten unter pCurEntry liegenden Eintrag (ZOrder)
- SvLBoxEntry* GetPrevEntry( const Point& rPixPos, SvLBoxEntry* pCurEntry, BOOL ) const;
+ SvLBoxEntry* GetPrevEntry( const Point& rPixPos, SvLBoxEntry* pCurEntry, sal_Bool ) const;
SvLBoxEntry* GetEntryFromLogicPos( const Point& rDocPos ) const;
@@ -213,8 +213,8 @@ public:
void SetSelectionMode( SelectionMode );
using SvListView::Select;
- BOOL Select( SvLBoxEntry* pEntry, BOOL bSelect=TRUE );
- void SelectAll( BOOL bSelect, BOOL bPaint=TRUE );
+ sal_Bool Select( SvLBoxEntry* pEntry, sal_Bool bSelect=sal_True );
+ void SelectAll( sal_Bool bSelect, sal_Bool bPaint=sal_True );
virtual void SetCurEntry( SvLBoxEntry* _pEntry );
virtual SvLBoxEntry*
GetCurEntry() const;
@@ -222,28 +222,28 @@ public:
// logische Koordinaten
void SelectRect(
const Rectangle& rRect,
- BOOL bAdd = FALSE,
+ sal_Bool bAdd = sal_False,
// die Schnittmenge mit rRect wird invertiert
- // wird bei bAdd == FALSE ignoriert
+ // wird bei bAdd == sal_False ignoriert
SvPtrarr* pOtherRects = 0,
short nBorderOffs = -5 );
- ULONG GetSelectionCount() const;
+ sal_uLong GetSelectionCount() const;
virtual void Arrange();
void SetSpaceBetweenEntries( long nHor, long Ver );
long GetHorSpaceBetweenEntries();
long GetVerSpaceBetweenEntries();
- void EnableInplaceEditing( BOOL bEnable );
+ void EnableInplaceEditing( sal_Bool bEnable );
void EditEntry( SvLBoxEntry* pEntry = 0 );
- virtual BOOL EditingEntry( SvLBoxEntry* pEntry, Selection& );
- virtual BOOL EditedEntry( SvLBoxEntry*, const XubString& rNewText );
+ virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& );
+ virtual sal_Bool EditedEntry( SvLBoxEntry*, const XubString& rNewText );
void SetCurParent( SvLBoxEntry* pNewParent );
SvLBoxEntry* GetCurParent() const;
- virtual void ModelNotification( USHORT nActionId, SvListEntry* pEntry1,
- SvListEntry* pEntry2, ULONG nPos );
+ virtual void ModelNotification( sal_uInt16 nActionId, SvListEntry* pEntry1,
+ SvListEntry* pEntry2, sal_uLong nPos );
// 0,0: Grid-Modus ausschalten
void SetGrid( long nDX, long nDY );
@@ -253,7 +253,7 @@ public:
// nDeltaX < 0 : View bewegt sich auf dem Doc nach links
// nDeltaX > 0 : View bewegt sich auf dem Doc nach rechts
using Window::Scroll;
- virtual void Scroll( long nDeltaX, long nDeltaY, USHORT nFlags = 0 );
+ virtual void Scroll( long nDeltaX, long nDeltaY, sal_uInt16 nFlags = 0 );
virtual void PrepareCommandEvent( const CommandEvent& );
virtual void StartDrag( sal_Int8 nAction, const Point& );
@@ -271,14 +271,14 @@ public:
const Point& rRefPosPixel,
long& rScrollX,
long& rScrollY,
- BOOL bInDragDrop = FALSE,
- USHORT nBorderWidth = 10 );
+ sal_Bool bInDragDrop = sal_False,
+ sal_uInt16 nBorderWidth = 10 );
using Window::EndTracking;
void EndTracking();
void AdjustAtGrid( SvLBoxEntry* pEntry = 0 );
- void LockEntryPos( SvLBoxEntry* pEntry, BOOL bLock = TRUE );
- BOOL IsEntryPosLocked( const SvLBoxEntry* pEntry ) const;
+ void LockEntryPos( SvLBoxEntry* pEntry, sal_Bool bLock = sal_True );
+ sal_Bool IsEntryPosLocked( const SvLBoxEntry* pEntry ) const;
void SetTextMode( SvIconViewTextMode, SvLBoxEntry* pEntry = 0 );
SvIconViewTextMode GetTextMode( const SvLBoxEntry* pEntry = 0 ) const;
diff --git a/svtools/inc/svtools/svlbitm.hxx b/svtools/inc/svtools/svlbitm.hxx
index 5158c38fbd87..e6881e6ddb44 100644
--- a/svtools/inc/svtools/svlbitm.hxx
+++ b/svtools/inc/svtools/svlbitm.hxx
@@ -66,11 +66,11 @@ private:
long nWidth;
long nHeight;
SvLBoxButtonData_Impl* pImpl;
- BOOL bDataOk;
+ sal_Bool bDataOk;
SvButtonState eState;
SVT_DLLPRIVATE void SetWidthAndHeight();
- SVT_DLLPRIVATE void InitData( BOOL bImagesFromDefault,
+ SVT_DLLPRIVATE void InitData( sal_Bool bImagesFromDefault,
bool _bRadioBtn, const Control* pControlForSettings = NULL );
public:
// include creating default images (CheckBox or RadioButton)
@@ -80,17 +80,17 @@ public:
SvLBoxButtonData();
~SvLBoxButtonData();
- USHORT GetIndex( USHORT nItemState );
+ sal_uInt16 GetIndex( sal_uInt16 nItemState );
inline long Width();
inline long Height();
void SetLink( const Link& rLink) { aLink=rLink; }
const Link& GetLink() const { return aLink; }
- BOOL IsRadio();
+ sal_Bool IsRadio();
// weil Buttons nicht von LinkHdl abgeleitet sind
void CallLink();
- void StoreButtonState( SvLBoxEntry* pEntry, USHORT nItemFlags );
- SvButtonState ConvertToButtonState( USHORT nItemFlags ) const;
+ void StoreButtonState( SvLBoxEntry* pEntry, sal_uInt16 nItemFlags );
+ SvButtonState ConvertToButtonState( sal_uInt16 nItemFlags ) const;
inline SvButtonState GetActButtonState() const;
SvLBoxEntry* GetActEntry() const;
@@ -100,7 +100,7 @@ public:
void SetDefaultImages( const Control* pControlForSettings = NULL );
// set images acording to the color scheeme of the Control
// pControlForSettings == NULL: settings are taken from Application
- BOOL HasDefaultImages( void ) const;
+ sal_Bool HasDefaultImages( void ) const;
};
inline long SvLBoxButtonData::Width()
@@ -128,14 +128,14 @@ class SVT_DLLPUBLIC SvLBoxString : public SvLBoxItem
{
XubString aStr;
public:
- SvLBoxString( SvLBoxEntry*,USHORT nFlags,const XubString& rStr);
+ SvLBoxString( SvLBoxEntry*,sal_uInt16 nFlags,const XubString& rStr);
SvLBoxString();
virtual ~SvLBoxString();
- virtual USHORT IsA();
+ virtual sal_uInt16 IsA();
void InitViewData( SvLBox*,SvLBoxEntry*,SvViewDataItem* );
XubString GetText() const { return aStr; }
void SetText( SvLBoxEntry*, const XubString& rStr );
- void Paint( const Point&, SvLBox& rDev, USHORT nFlags,SvLBoxEntry* );
+ void Paint( const Point&, SvLBox& rDev, sal_uInt16 nFlags,SvLBoxEntry* );
SvLBoxItem* Create() const;
void Clone( SvLBoxItem* pSource );
};
@@ -144,13 +144,13 @@ class SvLBoxBmp : public SvLBoxItem
{
Image aBmp;
public:
- SvLBoxBmp( SvLBoxEntry*, USHORT nFlags, Image );
+ SvLBoxBmp( SvLBoxEntry*, sal_uInt16 nFlags, Image );
SvLBoxBmp();
virtual ~SvLBoxBmp();
- virtual USHORT IsA();
+ virtual sal_uInt16 IsA();
void InitViewData( SvLBox*,SvLBoxEntry*,SvViewDataItem* );
void SetBitmap( SvLBoxEntry*, Image );
- void Paint( const Point&, SvLBox& rView, USHORT nFlags,SvLBoxEntry* );
+ void Paint( const Point&, SvLBox& rView, sal_uInt16 nFlags,SvLBoxEntry* );
SvLBoxItem* Create() const;
void Clone( SvLBoxItem* pSource );
};
@@ -173,9 +173,9 @@ class SVT_DLLPUBLIC SvLBoxButton : public SvLBoxItem
{
SvLBoxButtonData* pData;
SvLBoxButtonKind eKind;
- USHORT nItemFlags;
- USHORT nImgArrOffs;
- USHORT nBaseOffs;
+ sal_uInt16 nItemFlags;
+ sal_uInt16 nImgArrOffs;
+ sal_uInt16 nBaseOffs;
void ImplAdjustBoxSize( Size& io_rCtrlSize, ControlType i_eType, Window* pParent );
public:
@@ -185,31 +185,31 @@ public:
// (see SV_BMP_STATICIMAGE; nFlags are effectively ignored
// for that kind).
SvLBoxButton( SvLBoxEntry* pEntry,
- SvLBoxButtonKind eTheKind, USHORT nFlags,
+ SvLBoxButtonKind eTheKind, sal_uInt16 nFlags,
SvLBoxButtonData* pBData );
SvLBoxButton();
virtual ~SvLBoxButton();
void InitViewData( SvLBox*,SvLBoxEntry*,SvViewDataItem* );
- virtual USHORT IsA();
- void Check( SvLBox* pView, SvLBoxEntry*, BOOL bCheck );
- virtual BOOL ClickHdl(SvLBox* pView, SvLBoxEntry* );
- void Paint( const Point&, SvLBox& rView, USHORT nFlags,SvLBoxEntry* );
+ virtual sal_uInt16 IsA();
+ void Check( SvLBox* pView, SvLBoxEntry*, sal_Bool bCheck );
+ virtual sal_Bool ClickHdl(SvLBox* pView, SvLBoxEntry* );
+ void Paint( const Point&, SvLBox& rView, sal_uInt16 nFlags,SvLBoxEntry* );
SvLBoxItem* Create() const;
void Clone( SvLBoxItem* pSource );
- USHORT GetButtonFlags() const { return nItemFlags; }
- BOOL IsStateChecked() const { return (BOOL)(nItemFlags & SV_ITEMSTATE_CHECKED)!=0; }
- BOOL IsStateUnchecked() const { return (BOOL)(nItemFlags & SV_ITEMSTATE_UNCHECKED)!=0; }
- BOOL IsStateTristate() const { return (BOOL)(nItemFlags & SV_ITEMSTATE_TRISTATE)!=0; }
- BOOL IsStateHilighted() const { return (BOOL)(nItemFlags & SV_ITEMSTATE_HILIGHTED)!=0; }
+ sal_uInt16 GetButtonFlags() const { return nItemFlags; }
+ sal_Bool IsStateChecked() const { return (sal_Bool)(nItemFlags & SV_ITEMSTATE_CHECKED)!=0; }
+ sal_Bool IsStateUnchecked() const { return (sal_Bool)(nItemFlags & SV_ITEMSTATE_UNCHECKED)!=0; }
+ sal_Bool IsStateTristate() const { return (sal_Bool)(nItemFlags & SV_ITEMSTATE_TRISTATE)!=0; }
+ sal_Bool IsStateHilighted() const { return (sal_Bool)(nItemFlags & SV_ITEMSTATE_HILIGHTED)!=0; }
void SetStateChecked();
void SetStateUnchecked();
void SetStateTristate();
- void SetStateHilighted( BOOL bHilight );
+ void SetStateHilighted( sal_Bool bHilight );
SvLBoxButtonKind GetKind() const { return eKind; }
- void SetBaseOffs( USHORT nOffs ) { nBaseOffs = nOffs; }
- USHORT GetBaseOffs() const { return nBaseOffs; }
+ void SetBaseOffs( sal_uInt16 nOffs ) { nBaseOffs = nOffs; }
+ sal_uInt16 GetBaseOffs() const { return nBaseOffs; }
// Check whether this button can be modified via UI, sounding a beep if it
// cannot be modified:
@@ -231,7 +231,7 @@ inline void SvLBoxButton::SetStateTristate()
nItemFlags &= SV_STATE_MASK;
nItemFlags |= SV_ITEMSTATE_TRISTATE;
}
-inline void SvLBoxButton::SetStateHilighted( BOOL bHilight )
+inline void SvLBoxButton::SetStateHilighted( sal_Bool bHilight )
{
if ( bHilight )
nItemFlags |= SV_ITEMSTATE_HILIGHTED;
@@ -245,18 +245,18 @@ class SVT_DLLPUBLIC SvLBoxContextBmp : public SvLBoxItem
{
SvLBoxContextBmp_Impl* m_pImpl;
public:
- SvLBoxContextBmp( SvLBoxEntry*,USHORT nFlags,Image,Image,
- USHORT nEntryFlagsBmp1);
+ SvLBoxContextBmp( SvLBoxEntry*,sal_uInt16 nFlags,Image,Image,
+ sal_uInt16 nEntryFlagsBmp1);
SvLBoxContextBmp();
virtual ~SvLBoxContextBmp();
- virtual USHORT IsA();
+ virtual sal_uInt16 IsA();
void InitViewData( SvLBox*,SvLBoxEntry*,SvViewDataItem* );
- void Paint( const Point&, SvLBox& rView, USHORT nFlags,SvLBoxEntry* );
+ void Paint( const Point&, SvLBox& rView, sal_uInt16 nFlags,SvLBoxEntry* );
SvLBoxItem* Create() const;
void Clone( SvLBoxItem* pSource );
- BOOL SetModeImages( const Image& _rBitmap1, const Image& _rBitmap2, BmpColorMode _eMode = BMP_COLOR_NORMAL );
+ sal_Bool SetModeImages( const Image& _rBitmap1, const Image& _rBitmap2, BmpColorMode _eMode = BMP_COLOR_NORMAL );
void GetModeImages( Image& _rBitmap1, Image& _rBitmap2, BmpColorMode _eMode = BMP_COLOR_NORMAL ) const;
inline void SetBitmap1( const Image& _rImage, BmpColorMode _eMode = BMP_COLOR_NORMAL );
diff --git a/svtools/inc/svtools/svlbox.hxx b/svtools/inc/svtools/svlbox.hxx
index 95fbd9f014d1..fd524e512a9e 100644
--- a/svtools/inc/svtools/svlbox.hxx
+++ b/svtools/inc/svtools/svlbox.hxx
@@ -102,21 +102,21 @@ class SvLBoxTab
void* pUserData;
public:
SvLBoxTab();
- SvLBoxTab( long nPos, USHORT nFlags=SV_LBOXTAB_ADJUST_LEFT );
+ SvLBoxTab( long nPos, sal_uInt16 nFlags=SV_LBOXTAB_ADJUST_LEFT );
SvLBoxTab( const SvLBoxTab& );
~SvLBoxTab();
- USHORT nFlags;
+ sal_uInt16 nFlags;
void SetUserData( void* pPtr ) { pUserData = pPtr; }
void* GetUserData() const { return pUserData; }
- BOOL IsDynamic() const { return (BOOL)((nFlags & SV_LBOXTAB_DYNAMIC)!=0); }
+ sal_Bool IsDynamic() const { return (sal_Bool)((nFlags & SV_LBOXTAB_DYNAMIC)!=0); }
void SetPos( long nNewPos) { nPos = nNewPos; }
long GetPos() const { return nPos; }
long CalcOffset( long nItemLength, long nTabWidth );
// long CalcOffset( const String&, const OutputDevice& );
- BOOL IsEditable() const { return (BOOL)((nFlags & SV_LBOXTAB_EDITABLE)!=0); }
- BOOL IsPushable() const { return (BOOL)((nFlags & SV_LBOXTAB_PUSHABLE)!=0); }
+ sal_Bool IsEditable() const { return (sal_Bool)((nFlags & SV_LBOXTAB_EDITABLE)!=0); }
+ sal_Bool IsPushable() const { return (sal_Bool)((nFlags & SV_LBOXTAB_PUSHABLE)!=0); }
};
// *********************************************************************
@@ -138,7 +138,7 @@ class SvViewDataEntry : public SvViewData
{
public:
SvViewDataItem* pItemData; // ein Array von SvViewDataItems
- USHORT nItmCnt; // Anzahl Items fuer delete-operator
+ sal_uInt16 nItmCnt; // Anzahl Items fuer delete-operator
SvViewDataEntry();
virtual ~SvViewDataEntry();
@@ -151,20 +151,20 @@ public:
class SVT_DLLPUBLIC SvLBoxItem
{
public:
- SvLBoxItem( SvLBoxEntry*, USHORT nFlags );
+ SvLBoxItem( SvLBoxEntry*, sal_uInt16 nFlags );
SvLBoxItem();
virtual ~SvLBoxItem();
- virtual USHORT IsA() = 0;
+ virtual sal_uInt16 IsA() = 0;
const Size& GetSize( SvLBox* pView, SvLBoxEntry* pEntry );
const Size& GetSize( SvLBoxEntry*, SvViewDataEntry* );
- const Size& GetSize( SvViewDataEntry* pData, USHORT nItemPos )
+ const Size& GetSize( SvViewDataEntry* pData, sal_uInt16 nItemPos )
{
SvViewDataItem* pIData=pData->pItemData+nItemPos;
return pIData->aSize;
}
virtual void Paint( const Point& rPos, SvLBox& rOutDev,
- USHORT nViewDataEntryFlags,
+ sal_uInt16 nViewDataEntryFlags,
SvLBoxEntry* pEntry ) = 0;
virtual void InitViewData( SvLBox* pView, SvLBoxEntry* pEntry,
@@ -194,7 +194,7 @@ class SVT_DLLPUBLIC SvLBoxEntry : public SvListEntry
SvPtrarr aItems;
void* pUserData;
- USHORT nEntryFlags;
+ sal_uInt16 nEntryFlags;
//#if 0 // _SOLAR__PRIVATE
SVT_DLLPRIVATE void DeleteItems_Impl();
//#endif
@@ -203,24 +203,24 @@ public:
SvLBoxEntry();
virtual ~SvLBoxEntry();
- USHORT ItemCount() const { return (USHORT)aItems.Count(); }
+ sal_uInt16 ItemCount() const { return (sal_uInt16)aItems.Count(); }
// DARF NUR GERUFEN WERDEN, WENN DER EINTRAG NOCH NICHT IM MODEL
// EINGEFUEGT IST, DA SONST FUER DAS ITEM KEINE VIEW-ABHAENGIGEN
// DATEN ALLOZIERT WERDEN!
void AddItem( SvLBoxItem* pItem );
- void ReplaceItem( SvLBoxItem* pNewItem, USHORT nPos );
- SvLBoxItem* GetItem( USHORT nPos ) const { return (SvLBoxItem*)aItems.GetObject(nPos ); }
- SvLBoxItem* GetFirstItem( USHORT nId );
- USHORT GetPos( SvLBoxItem* pItem ) const { return aItems.GetPos( pItem ); }
+ void ReplaceItem( SvLBoxItem* pNewItem, sal_uInt16 nPos );
+ SvLBoxItem* GetItem( sal_uInt16 nPos ) const { return (SvLBoxItem*)aItems.GetObject(nPos ); }
+ SvLBoxItem* GetFirstItem( sal_uInt16 nId );
+ sal_uInt16 GetPos( SvLBoxItem* pItem ) const { return aItems.GetPos( pItem ); }
void* GetUserData() const { return pUserData; }
void SetUserData( void* pPtr ) { pUserData = pPtr; }
virtual void Clone( SvListEntry* pSource );
- void EnableChildsOnDemand( BOOL bEnable=TRUE );
- BOOL HasChildsOnDemand() const { return (BOOL)((nEntryFlags & SV_ENTRYFLAG_CHILDS_ON_DEMAND)!=0); }
- BOOL HasInUseEmphasis() const { return (BOOL)((nEntryFlags & SV_ENTRYFLAG_IN_USE)!=0); }
+ void EnableChildsOnDemand( sal_Bool bEnable=sal_True );
+ sal_Bool HasChildsOnDemand() const { return (sal_Bool)((nEntryFlags & SV_ENTRYFLAG_CHILDS_ON_DEMAND)!=0); }
+ sal_Bool HasInUseEmphasis() const { return (sal_Bool)((nEntryFlags & SV_ENTRYFLAG_IN_USE)!=0); }
- USHORT GetFlags() const { return nEntryFlags; }
- void SetFlags( USHORT nFlags ) { nEntryFlags = nFlags; }
+ sal_uInt16 GetFlags() const { return nEntryFlags; }
+ void SetFlags( sal_uInt16 nFlags ) { nEntryFlags = nFlags; }
};
// *********************************************************************
@@ -229,7 +229,7 @@ public:
#define WB_FORCE_SELECTION ((WinBits)0x8000)
-#define DragDropMode USHORT
+#define DragDropMode sal_uInt16
#define SV_DRAGDROP_NONE (DragDropMode)0x0000
#define SV_DRAGDROP_CTRL_MOVE (DragDropMode)0x0001
#define SV_DRAGDROP_CTRL_COPY (DragDropMode)0x0002
@@ -305,18 +305,18 @@ protected:
SvLBox_Impl* pLBoxImpl;
- USHORT nImpFlags;
+ sal_uInt16 nImpFlags;
// Move/CopySelection: Position des aktuellen Eintrags in Selektionsliste
- USHORT nCurEntrySelPos;
+ sal_uInt16 nCurEntrySelPos;
DragDropMode nDragDropMode;
SelectionMode eSelMode;
sal_Int8 nDragOptions;
- BOOL CheckDragAndDropMode( SvLBox* pSource, sal_Int8 );
- void ImplShowTargetEmphasis( SvLBoxEntry* pEntry, BOOL bShow);
- void EnableSelectionAsDropTarget( BOOL bEnable = TRUE,
- BOOL bWithChilds = TRUE );
+ sal_Bool CheckDragAndDropMode( SvLBox* pSource, sal_Int8 );
+ void ImplShowTargetEmphasis( SvLBoxEntry* pEntry, sal_Bool bShow);
+ void EnableSelectionAsDropTarget( sal_Bool bEnable = sal_True,
+ sal_Bool bWithChilds = sal_True );
// standard impl gibt 0 zurueck; muss von abgeleiteten Klassen, die
// D&D unterstuetzen, ueberladen werden
using Window::GetDropTarget;
@@ -331,23 +331,23 @@ protected:
// invalidate children on enable/disable
virtual void StateChanged( StateChangedType );
- virtual ULONG Insert( SvLBoxEntry* pEnt,SvLBoxEntry* pPar,ULONG nPos=LIST_APPEND);
- virtual ULONG Insert( SvLBoxEntry* pEntry,ULONG nRootPos = LIST_APPEND );
+ virtual sal_uLong Insert( SvLBoxEntry* pEnt,SvLBoxEntry* pPar,sal_uLong nPos=LIST_APPEND);
+ virtual sal_uLong Insert( SvLBoxEntry* pEntry,sal_uLong nRootPos = LIST_APPEND );
void InsertTree( SvLBoxEntry* pTree, SvLBoxEntry* pTarget) {pModel->InsertTree( pTree, pTarget ); }
// Inplace-Editing
SvInplaceEdit2* pEdCtrl;
- void EnableInplaceEditing( BOOL bEnable){if(bEnable)nImpFlags|=SVLBOX_EDT_ENABLED; else nImpFlags&=~SVLBOX_EDT_ENABLED;}
- BOOL IsInplaceEditingEnabled() const { return (BOOL)((nImpFlags&SVLBOX_EDT_ENABLED)!=0); }
+ void EnableInplaceEditing( sal_Bool bEnable){if(bEnable)nImpFlags|=SVLBOX_EDT_ENABLED; else nImpFlags&=~SVLBOX_EDT_ENABLED;}
+ sal_Bool IsInplaceEditingEnabled() const { return (sal_Bool)((nImpFlags&SVLBOX_EDT_ENABLED)!=0); }
virtual void EditingRequest( SvLBoxEntry* pEntry, SvLBoxItem* pItem,
const Point& rMousePos );
void EditText( const String&, const Rectangle&,const Selection&);
- void EditText( const String&, const Rectangle&,const Selection&, BOOL bMulti);
+ void EditText( const String&, const Rectangle&,const Selection&, sal_Bool bMulti);
void EditTextMultiLine( const String&, const Rectangle&,const Selection&);
void CancelTextEditing();
- BOOL IsEditingActive() const { return (BOOL)((nImpFlags & SVLBOX_IN_EDT)!=0); }
- BOOL EditingCanceled() const;
- void EndEditing( BOOL bCancel = FALSE );
+ sal_Bool IsEditingActive() const { return (sal_Bool)((nImpFlags & SVLBOX_IN_EDT)!=0); }
+ sal_Bool EditingCanceled() const;
+ void EndEditing( sal_Bool bCancel = sal_False );
bool IsEmptyTextAllowed() const;
void ForbidEmptyText();
// Callback EditText
@@ -365,7 +365,7 @@ protected:
virtual void Command( const CommandEvent& rCEvt );
virtual void KeyInput( const KeyEvent& rKEvt );
- virtual SvLBoxEntry* GetEntry( const Point& rPos, BOOL bHit=FALSE ) const;
+ virtual SvLBoxEntry* GetEntry( const Point& rPos, sal_Bool bHit=sal_False ) const;
virtual void ModelHasEntryInvalidated( SvListEntry* pEntry );
// handler and methods for Drag - finished handler. This link can be set
@@ -403,12 +403,12 @@ public:
void SetModel( SvLBoxTreeList* );
void DisconnectFromModel();
- virtual USHORT IsA();
- ULONG GetEntryCount() const {return pModel->GetEntryCount();}
+ virtual sal_uInt16 IsA();
+ sal_uLong GetEntryCount() const {return pModel->GetEntryCount();}
SvLBoxEntry* First() const { return (SvLBoxEntry*)(pModel->First()); }
- SvLBoxEntry* Next( SvLBoxEntry* pEntry, USHORT* pDepth=0 ) const { return (SvLBoxEntry*)(pModel->Next(pEntry,pDepth));}
- SvLBoxEntry* Prev( SvLBoxEntry* pEntry, USHORT* pDepth=0 ) const { return (SvLBoxEntry*)(pModel->Prev(pEntry,pDepth));}
- SvLBoxEntry* Last( USHORT* pDepth=0 ) const { return (SvLBoxEntry*)(pModel->Last(pDepth));}
+ SvLBoxEntry* Next( SvLBoxEntry* pEntry, sal_uInt16* pDepth=0 ) const { return (SvLBoxEntry*)(pModel->Next(pEntry,pDepth));}
+ SvLBoxEntry* Prev( SvLBoxEntry* pEntry, sal_uInt16* pDepth=0 ) const { return (SvLBoxEntry*)(pModel->Prev(pEntry,pDepth));}
+ SvLBoxEntry* Last( sal_uInt16* pDepth=0 ) const { return (SvLBoxEntry*)(pModel->Last(pDepth));}
SvLBoxEntry* FirstChild(SvLBoxEntry* pParent ) const { return (SvLBoxEntry*)(pModel->FirstChild(pParent)); }
SvLBoxEntry* NextSibling(SvLBoxEntry* pEntry ) const { return (SvLBoxEntry*)(pModel->NextSibling( pEntry )); }
@@ -421,9 +421,9 @@ public:
SvLBoxEntry* PrevSelected( SvLBoxEntry* pEntry ) const { return (SvLBoxEntry*)(SvListView::PrevSelected(pEntry)); }
SvLBoxEntry* LastSelected() const { return (SvLBoxEntry*)(SvListView::LastSelected()); }
- BOOL CopySelection( SvLBox* pSource, SvLBoxEntry* pTarget );
- BOOL MoveSelection( SvLBox* pSource, SvLBoxEntry* pTarget );
- BOOL MoveSelectionCopyFallbackPossible( SvLBox* pSource, SvLBoxEntry* pTarget, sal_Bool bAllowCopyFallback );
+ sal_Bool CopySelection( SvLBox* pSource, SvLBoxEntry* pTarget );
+ sal_Bool MoveSelection( SvLBox* pSource, SvLBoxEntry* pTarget );
+ sal_Bool MoveSelectionCopyFallbackPossible( SvLBox* pSource, SvLBoxEntry* pTarget, sal_Bool bAllowCopyFallback );
void RemoveSelection();
DragDropMode GetDragDropMode() const { return nDragDropMode; }
@@ -432,8 +432,8 @@ public:
virtual void SetSelectionMode( SelectionMode );
// pParent==0 -> Root-Ebene
- SvLBoxEntry* GetEntry( SvLBoxEntry* pParent, ULONG nPos ) const { return (SvLBoxEntry*)(pModel->GetEntry(pParent,nPos)); }
- SvLBoxEntry* GetEntry( ULONG nRootPos ) const { return (SvLBoxEntry*)(pModel->GetEntry(nRootPos)); }
+ SvLBoxEntry* GetEntry( SvLBoxEntry* pParent, sal_uLong nPos ) const { return (SvLBoxEntry*)(pModel->GetEntry(pParent,nPos)); }
+ SvLBoxEntry* GetEntry( sal_uLong nRootPos ) const { return (SvLBoxEntry*)(pModel->GetEntry(nRootPos)); }
SvLBoxEntry* GetEntryFromPath( const ::std::deque< sal_Int32 >& _rPath ) const;
void FillEntryPath( SvLBoxEntry* pEntry, ::std::deque< sal_Int32 >& _rPath ) const;
@@ -444,8 +444,8 @@ public:
SvLBoxEntry* GetRootLevelParent(SvLBoxEntry* pEntry ) const { return (SvLBoxEntry*)(pModel->GetRootLevelParent( pEntry ));}
using Window::GetChildCount;
- ULONG GetChildCount( SvLBoxEntry* pParent ) const { return pModel->GetChildCount(pParent); }
- ULONG GetLevelChildCount( SvLBoxEntry* pParent ) const;
+ sal_uLong GetChildCount( SvLBoxEntry* pParent ) const { return pModel->GetChildCount(pParent); }
+ sal_uLong GetLevelChildCount( SvLBoxEntry* pParent ) const;
SvViewDataEntry* GetViewDataEntry( SvListEntry* pEntry ) const { return (SvViewDataEntry*)SvListView::GetViewData(pEntry); }
SvViewDataItem* GetViewDataItem( SvListEntry*, SvLBoxItem* ) const;
@@ -488,21 +488,21 @@ public:
*/
bool HandleKeyInput( const KeyEvent& rKEvt );
- virtual BOOL Expand( SvLBoxEntry* pParent );
- virtual BOOL Collapse( SvLBoxEntry* pParent );
- virtual BOOL Select( SvLBoxEntry* pEntry, BOOL bSelect=TRUE );
- virtual ULONG SelectChilds( SvLBoxEntry* pParent, BOOL bSelect );
- virtual void SelectAll( BOOL bSelect, BOOL bPaint=TRUE );
+ virtual sal_Bool Expand( SvLBoxEntry* pParent );
+ virtual sal_Bool Collapse( SvLBoxEntry* pParent );
+ virtual sal_Bool Select( SvLBoxEntry* pEntry, sal_Bool bSelect=sal_True );
+ virtual sal_uLong SelectChilds( SvLBoxEntry* pParent, sal_Bool bSelect );
+ virtual void SelectAll( sal_Bool bSelect, sal_Bool bPaint=sal_True );
virtual void SetCurEntry( SvLBoxEntry* _pEntry ) = 0;
virtual SvLBoxEntry*
GetCurEntry() const = 0;
// Model
- void SetInUseEmphasis( SvLBoxEntry* pEntry, BOOL bInUse=TRUE);
+ void SetInUseEmphasis( SvLBoxEntry* pEntry, sal_Bool bInUse=sal_True);
// View
- void SetCursorEmphasis( SvLBoxEntry* pEntry, BOOL bCursored=TRUE);
- BOOL HasCursorEmphasis( SvLBoxEntry* pEntry ) const;
+ void SetCursorEmphasis( SvLBoxEntry* pEntry, sal_Bool bCursored=sal_True);
+ sal_Bool HasCursorEmphasis( SvLBoxEntry* pEntry ) const;
void SetSelectHdl( const Link& rNewHdl ) {aSelectHdl=rNewHdl; }
void SetDeselectHdl( const Link& rNewHdl ) {aDeselectHdl=rNewHdl; }
@@ -518,8 +518,8 @@ public:
virtual long ExpandingHdl();
virtual void SelectHdl();
virtual void DeselectHdl();
- virtual BOOL DoubleClickHdl();
- BOOL IsTravelSelect() const { return (BOOL)((nImpFlags&SVLBOX_IS_TRAVELSELECT)!=0);}
+ virtual sal_Bool DoubleClickHdl();
+ sal_Bool IsTravelSelect() const { return (sal_Bool)((nImpFlags&SVLBOX_IS_TRAVELSELECT)!=0);}
SvLBoxEntry* GetHdlEntry() const { return pHdlEntry; }
SvLBoxItem* GetHdlItem() const;
@@ -536,7 +536,7 @@ public:
virtual DragDropMode NotifyStartDrag( TransferDataContainer& rData,
SvLBoxEntry* );
virtual void DragFinished( sal_Int8 nDropAction );
- virtual BOOL NotifyAcceptDrop( SvLBoxEntry* );
+ virtual sal_Bool NotifyAcceptDrop( SvLBoxEntry* );
void SetDragOptions( sal_Int8 nOptions ) { nDragOptions = nOptions; }
sal_Int8 GetDragOptions() const { return nDragOptions; }
@@ -545,25 +545,25 @@ public:
SvLBox* GetTargetView() const;
virtual void NotifyRemoving( SvLBoxEntry* );
- virtual void ShowTargetEmphasis( SvLBoxEntry*, BOOL bShow );
+ virtual void ShowTargetEmphasis( SvLBoxEntry*, sal_Bool bShow );
virtual SvLBoxEntry* CloneEntry( SvLBoxEntry* pSource );
virtual SvLBoxEntry* CreateEntry() const; // zum 'new'en von Entries
- // Rueckgabe: TRUE==Ok, FALSE==Abbrechen
- virtual BOOL NotifyMoving(
+ // Rueckgabe: sal_True==Ok, sal_False==Abbrechen
+ virtual sal_Bool NotifyMoving(
SvLBoxEntry* pTarget, // D&D-Drop-Position in this->GetModel()
SvLBoxEntry* pEntry, // Zu verschiebender Entry aus
// GetSourceListBox()->GetModel()
SvLBoxEntry*& rpNewParent, // Neuer Target-Parent
- ULONG& rNewChildPos); // Position in Childlist des Target-Parents
+ sal_uLong& rNewChildPos); // Position in Childlist des Target-Parents
- // Rueckgabe: TRUE==Ok, FALSE==Abbrechen
- virtual BOOL NotifyCopying(
+ // Rueckgabe: sal_True==Ok, sal_False==Abbrechen
+ virtual sal_Bool NotifyCopying(
SvLBoxEntry* pTarget, // D&D-Drop-Position in this->GetModel()
SvLBoxEntry* pEntry, // Zu kopierender Entry aus
// GetSourceListBox()->GetModel()
SvLBoxEntry*& rpNewParent, // Neuer Target-Parent
- ULONG& rNewChildPos); // Position in Childlist des Target-Parents
+ sal_uLong& rNewChildPos); // Position in Childlist des Target-Parents
// ACCESSIBILITY ==========================================================
@@ -596,7 +596,7 @@ struct SvLBoxDDInfo
SvLBoxEntry* pDDStartEntry;
// relative Position im Eintrag bei Drag-Beginn (IconView)
long nMouseRelX,nMouseRelY;
- ULONG nRes1,nRes2,nRes3,nRes4;
+ sal_uLong nRes1,nRes2,nRes3,nRes4;
};
class SvInplaceEdit : public Edit
@@ -605,8 +605,8 @@ class SvInplaceEdit : public Edit
Accelerator aAccReturn;
Accelerator aAccEscape;
Timer aTimer;
- BOOL bCanceled;
- BOOL bAlreadyInCallBack;
+ sal_Bool bCanceled;
+ sal_Bool bAlreadyInCallBack;
//#if 0 // _SOLAR__PRIVATE
void CallCallBackHdl_Impl();
@@ -623,9 +623,9 @@ public:
virtual void KeyInput( const KeyEvent& rKEvt );
virtual void LoseFocus();
- BOOL EditingCanceled() const { return bCanceled; }
+ sal_Bool EditingCanceled() const { return bCanceled; }
String GetText() const { return Edit::GetText(); }
- void StopEditing( BOOL bCancel = FALSE );
+ void StopEditing( sal_Bool bCancel = sal_False );
};
class SvInplaceEdit2
@@ -635,9 +635,9 @@ class SvInplaceEdit2
Accelerator aAccEscape;
Timer aTimer;
Edit* pEdit;
- BOOL bCanceled;
- BOOL bAlreadyInCallBack;
- BOOL bMultiLine;
+ sal_Bool bCanceled;
+ sal_Bool bAlreadyInCallBack;
+ sal_Bool bMultiLine;
//#if 0 // _SOLAR__PRIVATE
void CallCallBackHdl_Impl();
@@ -649,14 +649,14 @@ class SvInplaceEdit2
public:
SvInplaceEdit2( Window* pParent, const Point& rPos, const Size& rSize,
const String& rData, const Link& rNotifyEditEnd,
- const Selection&, BOOL bMultiLine = FALSE );
+ const Selection&, sal_Bool bMultiLine = sal_False );
~SvInplaceEdit2();
- BOOL KeyInput( const KeyEvent& rKEvt );
+ sal_Bool KeyInput( const KeyEvent& rKEvt );
void LoseFocus();
- BOOL EditingCanceled() const { return bCanceled; }
+ sal_Bool EditingCanceled() const { return bCanceled; }
String GetText() const;
String GetSavedValue() const;
- void StopEditing( BOOL bCancel = FALSE );
+ void StopEditing( sal_Bool bCancel = sal_False );
void Hide();
};
@@ -667,7 +667,7 @@ inline SvViewDataItem* SvLBox::GetViewDataItem( SvListEntry* pEntry,
(SvViewDataEntry*)SvListView::GetViewData(pEntry);
DBG_ASSERT(pEntryData,"Entry not in View");
DBG_ASSERT(pEntryData->pItemData,"No ItemData");
- USHORT nItemPos = ((SvLBoxEntry*)pEntry)->GetPos( pItem );
+ sal_uInt16 nItemPos = ((SvLBoxEntry*)pEntry)->GetPos( pItem );
return (pEntryData->pItemData+nItemPos);
}
diff --git a/svtools/inc/svtools/svmedit.hxx b/svtools/inc/svtools/svmedit.hxx
index 9c8a4a34dbf6..01c2c46fee91 100644
--- a/svtools/inc/svtools/svmedit.hxx
+++ b/svtools/inc/svtools/svmedit.hxx
@@ -59,7 +59,7 @@ protected:
virtual long PreNotify( NotifyEvent& rNEvt );
long Notify( NotifyEvent& rNEvt );
using Control::ImplInitSettings;
- void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
+ void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
WinBits ImplInitStyle( WinBits nStyle );
ExtTextEngine* GetTextEngine() const;
@@ -78,17 +78,17 @@ public:
virtual void SetModifyFlag();
virtual void ClearModifyFlag();
- virtual BOOL IsModified() const;
+ virtual sal_Bool IsModified() const;
- virtual void EnableUpdateData( ULONG nTimeout = EDIT_UPDATEDATA_TIMEOUT );
+ virtual void EnableUpdateData( sal_uLong nTimeout = EDIT_UPDATEDATA_TIMEOUT );
virtual void DisableUpdateData() { delete pUpdateDataTimer; pUpdateDataTimer = NULL; }
- virtual ULONG IsUpdateDataEnabled() const;
+ virtual sal_uLong IsUpdateDataEnabled() const;
- virtual void SetReadOnly( BOOL bReadOnly = TRUE );
- virtual BOOL IsReadOnly() const;
+ virtual void SetReadOnly( sal_Bool bReadOnly = sal_True );
+ virtual sal_Bool IsReadOnly() const;
- void EnableFocusSelectionHide( BOOL bHide );
- BOOL IsFocusSelectionHideEnabled() const;
+ void EnableFocusSelectionHide( sal_Bool bHide );
+ sal_Bool IsFocusSelectionHideEnabled() const;
virtual void SetMaxTextLen( xub_StrLen nMaxLen = 0 );
virtual xub_StrLen GetMaxTextLen() const;
@@ -113,8 +113,8 @@ public:
String GetTextLines() const;
String GetTextLines( LineEnd aSeparator ) const;
- void SetRightToLeft( BOOL bRightToLeft );
- BOOL IsRightToLeft() const;
+ void SetRightToLeft( sal_Bool bRightToLeft );
+ sal_Bool IsRightToLeft() const;
void SaveValue() { aSaveValue = GetText(); }
const XubString& GetSavedValue() const { return aSaveValue; }
@@ -131,22 +131,22 @@ public:
Size CalcMinimumSize() const;
Size CalcAdjustedSize( const Size& rPrefSize ) const;
using Edit::CalcSize;
- Size CalcSize( USHORT nColumns, USHORT nLines ) const;
- void GetMaxVisColumnsAndLines( USHORT& rnCols, USHORT& rnLines ) const;
+ Size CalcSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const;
+ void GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const;
- void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags );
+ void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags );
- void SetLeftMargin( USHORT n );
- USHORT GetLeftMargin() const;
+ void SetLeftMargin( sal_uInt16 n );
+ sal_uInt16 GetLeftMargin() const;
virtual
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >
- GetComponentInterface(BOOL bCreate = TRUE);
+ GetComponentInterface(sal_Bool bCreate = sal_True);
void DisableSelectionOnFocus();
};
-inline ULONG MultiLineEdit::IsUpdateDataEnabled() const
+inline sal_uLong MultiLineEdit::IsUpdateDataEnabled() const
{
return pUpdateDataTimer ? pUpdateDataTimer->GetTimeout() : 0;
}
diff --git a/svtools/inc/svtools/svmedit2.hxx b/svtools/inc/svtools/svmedit2.hxx
index e09592cfc172..70bd623fef0a 100644
--- a/svtools/inc/svtools/svmedit2.hxx
+++ b/svtools/inc/svtools/svmedit2.hxx
@@ -40,14 +40,14 @@ public:
~ExtMultiLineEdit();
// methods of TextView
- void InsertText( const String& rNew, BOOL bSelect = FALSE );
- void SetAutoScroll( BOOL bAutoScroll );
- void EnableCursor( BOOL bEnable );
+ void InsertText( const String& rNew, sal_Bool bSelect = sal_False );
+ void SetAutoScroll( sal_Bool bAutoScroll );
+ void EnableCursor( sal_Bool bEnable );
// methods of TextEngine
- void SetAttrib( const TextAttrib& rAttr, ULONG nPara, USHORT nStart, USHORT nEnd );
- void SetLeftMargin( USHORT nLeftMargin );
- ULONG GetParagraphCount() const;
+ void SetAttrib( const TextAttrib& rAttr, sal_uLong nPara, sal_uInt16 nStart, sal_uInt16 nEnd );
+ void SetLeftMargin( sal_uInt16 nLeftMargin );
+ sal_uLong GetParagraphCount() const;
};
#endif
diff --git a/svtools/inc/svtools/svparser.hxx b/svtools/inc/svtools/svparser.hxx
index bd24298011e2..7eac9c93d425 100644
--- a/svtools/inc/svtools/svparser.hxx
+++ b/svtools/inc/svtools/svparser.hxx
@@ -58,21 +58,21 @@ class SVT_DLLPUBLIC SvParser : public SvRefBase
protected:
SvStream& rInput;
String aToken; // gescanntes Token
- ULONG nlLineNr; // akt. Zeilen Nummer
- ULONG nlLinePos; // akt. Spalten Nummer
+ sal_uLong nlLineNr; // akt. Zeilen Nummer
+ sal_uLong nlLinePos; // akt. Spalten Nummer
SvParser_Impl *pImplData; // interne Daten
long nTokenValue; // zusaetzlicher Wert (RTF)
- BOOL bTokenHasValue; // indicates whether nTokenValue is valid
+ sal_Bool bTokenHasValue; // indicates whether nTokenValue is valid
SvParserState eState; // Status auch in abgl. Klassen
rtl_TextEncoding eSrcEnc; // Source encoding
- ULONG nNextChPos;
+ sal_uLong nNextChPos;
sal_Unicode nNextCh; // Akt. Zeichen fuer die "lex"
- BOOL bDownloadingFile : 1;// TRUE: Es wird gerade ein externes
+ sal_Bool bDownloadingFile : 1;// sal_True: Es wird gerade ein externes
// File geladen. d.h. alle
// DataAvailable Links muessen
// ignoriert werden.
@@ -81,16 +81,16 @@ protected:
// Stream als ANSI gelesen,
// aber als CharSet DONTKNOW
// zurueckgegeben.
- BOOL bUCS2BSrcEnc : 1; // oder als big-endian UCS2
- BOOL bSwitchToUCS2 : 1; // Umschalten des ist erlaubt
+ sal_Bool bUCS2BSrcEnc : 1; // oder als big-endian UCS2
+ sal_Bool bSwitchToUCS2 : 1; // Umschalten des ist erlaubt
- BOOL bRTF_InTextRead : 1; // only for RTF-Parser!!!
+ sal_Bool bRTF_InTextRead : 1; // only for RTF-Parser!!!
struct TokenStackType
{
String sToken;
long nTokenValue;
- BOOL bTokenHasValue;
+ sal_Bool bTokenHasValue;
int nTokenId;
inline TokenStackType() { nTokenId = 0; }
@@ -100,7 +100,7 @@ protected:
// Methoden fuer Token-Stack
int SkipToken( short nCnt = -1 ); // n Tokens zurueck "skippen"
TokenStackType* GetStackPtr( short nCnt );
- inline BYTE GetStackPos() const;
+ inline sal_uInt8 GetStackPos() const;
// scanne das naechste Token:
// Tokenstack abarbeiten und ggfs. _GetNextToken() rufen. Diese
@@ -119,22 +119,22 @@ protected:
private:
TokenStackType* pTokenStack;
TokenStackType *pTokenStackPos;
- BYTE nTokenStackSize, nTokenStackPos;
+ sal_uInt8 nTokenStackSize, nTokenStackPos;
public:
// Konstruktor
- SvParser( SvStream& rIn, BYTE nStackSize = 3 );
+ SvParser( SvStream& rIn, sal_uInt8 nStackSize = 3 );
virtual SvParserState CallParser() = 0; // Aufruf des Parsers
inline SvParserState GetStatus() const { return eState; } // StatusInfo
- inline ULONG GetLineNr() const { return nlLineNr; }
- inline ULONG GetLinePos() const { return nlLinePos; }
- inline ULONG IncLineNr() { return ++nlLineNr; }
- inline ULONG IncLinePos() { return ++nlLinePos; }
- inline ULONG SetLineNr( ULONG nlNum ); // inline unten
- inline ULONG SetLinePos( ULONG nlPos ); // inline unten
+ inline sal_uLong GetLineNr() const { return nlLineNr; }
+ inline sal_uLong GetLinePos() const { return nlLinePos; }
+ inline sal_uLong IncLineNr() { return ++nlLineNr; }
+ inline sal_uLong IncLinePos() { return ++nlLinePos; }
+ inline sal_uLong SetLineNr( sal_uLong nlNum ); // inline unten
+ inline sal_uLong SetLinePos( sal_uLong nlPos ); // inline unten
sal_Unicode GetNextChar();
void RereadLookahead();
@@ -151,24 +151,24 @@ public:
/*virtual*/ void RestoreState();
virtual void Continue( int nToken );
- inline void SetDownloadingFile( BOOL bSet ) { bDownloadingFile = bSet; }
- inline BOOL IsDownloadingFile() const { return bDownloadingFile; }
+ inline void SetDownloadingFile( sal_Bool bSet ) { bDownloadingFile = bSet; }
+ inline sal_Bool IsDownloadingFile() const { return bDownloadingFile; }
// Set/get source encoding. The UCS2BEncoding flag is valid if source
// encoding is UCS2. It specifies a big endian encoding.
void SetSrcEncoding( rtl_TextEncoding eSrcEnc );
rtl_TextEncoding GetSrcEncoding() const { return eSrcEnc; }
- void SetSrcUCS2BEncoding( BOOL bSet ) { bUCS2BSrcEnc = bSet; }
- BOOL IsSrcUCS2BEncoding() const { return bUCS2BSrcEnc; }
+ void SetSrcUCS2BEncoding( sal_Bool bSet ) { bUCS2BSrcEnc = bSet; }
+ sal_Bool IsSrcUCS2BEncoding() const { return bUCS2BSrcEnc; }
// Darf der Zeichensatz auf UCS/2 umgeschaltet werden, wenn
// in den ersten beiden Zeichen im Stream eine BOM steht?
- void SetSwitchToUCS2( BOOL bSet ) { bSwitchToUCS2 = bSet; }
- BOOL IsSwitchToUCS2() const { return bSwitchToUCS2; }
+ void SetSwitchToUCS2( sal_Bool bSet ) { bSwitchToUCS2 = bSet; }
+ sal_Bool IsSwitchToUCS2() const { return bSwitchToUCS2; }
// Aus wie vielen Bytes betseht ein Zeichen
- inline USHORT GetCharSize() const;
+ inline sal_uInt16 GetCharSize() const;
int GetSaveToken() const;
@@ -176,8 +176,8 @@ public:
// 'pWhichIds' von Which-Ids. Es hat die Lange 'nWhichIds'.
// Die Which-Map wird nicht geloescht.
static void BuildWhichTbl( SvUShorts &rWhichMap,
- USHORT *pWhichIds,
- USHORT nWhichIds );
+ sal_uInt16 *pWhichIds,
+ sal_uInt16 nWhichIds );
};
@@ -189,16 +189,16 @@ SV_IMPL_REF(SvParser)
-inline ULONG SvParser::SetLineNr( ULONG nlNum )
-{ ULONG nlOld = nlLineNr; nlLineNr = nlNum; return nlOld; }
+inline sal_uLong SvParser::SetLineNr( sal_uLong nlNum )
+{ sal_uLong nlOld = nlLineNr; nlLineNr = nlNum; return nlOld; }
-inline ULONG SvParser::SetLinePos( ULONG nlPos )
-{ ULONG nlOld = nlLinePos; nlLinePos = nlPos; return nlOld; }
+inline sal_uLong SvParser::SetLinePos( sal_uLong nlPos )
+{ sal_uLong nlOld = nlLinePos; nlLinePos = nlPos; return nlOld; }
-inline BYTE SvParser::GetStackPos() const
+inline sal_uInt8 SvParser::GetStackPos() const
{ return nTokenStackPos; }
-inline USHORT SvParser::GetCharSize() const
+inline sal_uInt16 SvParser::GetCharSize() const
{
return (RTL_TEXTENCODING_UCS2 == eSrcEnc) ? 2 : 1;
}
@@ -263,7 +263,7 @@ class SVT_DLLPUBLIC SvKeyValueIterator : public SvRefBase,
/** Representation.
*/
SvKeyValueList_Impl* m_pList;
- USHORT m_nPos;
+ sal_uInt16 m_nPos;
public:
/** Construction/Destruction.
@@ -273,8 +273,8 @@ public:
/** Operation.
*/
- virtual BOOL GetFirst (SvKeyValue &rKeyVal);
- virtual BOOL GetNext (SvKeyValue &rKeyVal);
+ virtual sal_Bool GetFirst (SvKeyValue &rKeyVal);
+ virtual sal_Bool GetNext (SvKeyValue &rKeyVal);
virtual void Append (const SvKeyValue &rKeyVal);
};
diff --git a/svtools/inc/svtools/svtabbx.hxx b/svtools/inc/svtools/svtabbx.hxx
index 89fd92a4fc09..be891d69bbbc 100644
--- a/svtools/inc/svtools/svtabbx.hxx
+++ b/svtools/inc/svtools/svtabbx.hxx
@@ -47,10 +47,10 @@ enum SvTabJustify
struct TabListBoxEventData
{
SvLBoxEntry* m_pEntry;
- USHORT m_nColumn;
+ sal_uInt16 m_nColumn;
String m_sOldText;
- TabListBoxEventData( SvLBoxEntry* pEntry, USHORT nColumn, const String& rOldText ) :
+ TabListBoxEventData( SvLBoxEntry* pEntry, sal_uInt16 nColumn, const String& rOldText ) :
m_pEntry( pEntry ), m_nColumn( nColumn ), m_sOldText( rOldText ) {}
};
@@ -58,71 +58,71 @@ class SVT_DLLPUBLIC SvTabListBox : public SvTreeListBox
{
private:
SvLBoxTab* pTabList;
- USHORT nTabCount;
+ sal_uInt16 nTabCount;
XubString aCurEntry;
- ULONG nDummy1;
- ULONG nDummy2;
+ sal_uLong nDummy1;
+ sal_uLong nDummy2;
protected:
SvLBoxEntry* pViewParent;
- static const xub_Unicode* GetToken( const xub_Unicode* pPtr, USHORT& rLen );
+ static const xub_Unicode* GetToken( const xub_Unicode* pPtr, sal_uInt16& rLen );
virtual void SetTabs();
virtual void InitEntry( SvLBoxEntry*, const XubString&, const Image&, const Image&, SvLBoxButtonKind );
- String GetTabEntryText( ULONG nPos, USHORT nCol ) const;
- SvLBoxEntry* GetEntryOnPos( ULONG _nEntryPos ) const;
- SvLBoxEntry* GetChildOnPos( SvLBoxEntry* _pParent, ULONG _nEntryPos, ULONG& _rPos ) const;
+ String GetTabEntryText( sal_uLong nPos, sal_uInt16 nCol ) const;
+ SvLBoxEntry* GetEntryOnPos( sal_uLong _nEntryPos ) const;
+ SvLBoxEntry* GetChildOnPos( SvLBoxEntry* _pParent, sal_uLong _nEntryPos, sal_uLong& _rPos ) const;
public:
SvTabListBox( Window* pParent, WinBits = WB_BORDER );
SvTabListBox( Window* pParent, const ResId& );
~SvTabListBox();
void SetTabs( long* pTabs, MapUnit = MAP_APPFONT );
- USHORT TabCount() const { return (USHORT)nTabCount; }
+ sal_uInt16 TabCount() const { return (sal_uInt16)nTabCount; }
using SvTreeListBox::GetTab;
- long GetTab( USHORT nTab ) const;
- void SetTab( USHORT nTab, long nValue, MapUnit = MAP_APPFONT );
- long GetLogicTab( USHORT nTab );
+ long GetTab( sal_uInt16 nTab ) const;
+ void SetTab( sal_uInt16 nTab, long nValue, MapUnit = MAP_APPFONT );
+ long GetLogicTab( sal_uInt16 nTab );
virtual SvLBoxEntry* InsertEntry( const XubString& rText, SvLBoxEntry* pParent = 0,
- BOOL bChildsOnDemand = FALSE,
- ULONG nPos=LIST_APPEND, void* pUserData = 0,
+ sal_Bool bChildsOnDemand = sal_False,
+ sal_uLong nPos=LIST_APPEND, void* pUserData = 0,
SvLBoxButtonKind eButtonKind = SvLBoxButtonKind_enabledCheckbox );
virtual SvLBoxEntry* InsertEntry( const XubString& rText,
const Image& rExpandedEntryBmp,
const Image& rCollapsedEntryBmp,
SvLBoxEntry* pParent = 0,
- BOOL bChildsOnDemand = FALSE,
- ULONG nPos = LIST_APPEND, void* pUserData = 0,
+ sal_Bool bChildsOnDemand = sal_False,
+ sal_uLong nPos = LIST_APPEND, void* pUserData = 0,
SvLBoxButtonKind eButtonKind = SvLBoxButtonKind_enabledCheckbox );
- virtual SvLBoxEntry* InsertEntryToColumn( const XubString&, ULONG nPos = LIST_APPEND,
- USHORT nCol = 0xffff, void* pUserData = NULL );
+ virtual SvLBoxEntry* InsertEntryToColumn( const XubString&, sal_uLong nPos = LIST_APPEND,
+ sal_uInt16 nCol = 0xffff, void* pUserData = NULL );
virtual SvLBoxEntry* InsertEntryToColumn( const XubString&, SvLBoxEntry* pParent,
- ULONG nPos, USHORT nCol, void* pUserData = NULL );
+ sal_uLong nPos, sal_uInt16 nCol, void* pUserData = NULL );
virtual SvLBoxEntry* InsertEntryToColumn( const XubString&, const Image& rExpandedEntryBmp,
const Image& rCollapsedEntryBmp, SvLBoxEntry* pParent = NULL,
- ULONG nPos = LIST_APPEND, USHORT nCol = 0xffff, void* pUserData = NULL );
+ sal_uLong nPos = LIST_APPEND, sal_uInt16 nCol = 0xffff, void* pUserData = NULL );
virtual String GetEntryText( SvLBoxEntry* pEntry ) const;
- String GetEntryText( SvLBoxEntry*, USHORT nCol ) const;
- String GetEntryText( ULONG nPos, USHORT nCol = 0xffff ) const;
+ String GetEntryText( SvLBoxEntry*, sal_uInt16 nCol ) const;
+ String GetEntryText( sal_uLong nPos, sal_uInt16 nCol = 0xffff ) const;
using SvTreeListBox::SetEntryText;
- void SetEntryText( const XubString&, ULONG, USHORT nCol=0xffff );
- void SetEntryText(const XubString&,SvLBoxEntry*,USHORT nCol=0xffff);
- String GetCellText( ULONG nPos, USHORT nCol ) const;
- ULONG GetEntryPos( const XubString&, USHORT nCol = 0xffff );
- ULONG GetEntryPos( const SvLBoxEntry* pEntry ) const;
+ void SetEntryText( const XubString&, sal_uLong, sal_uInt16 nCol=0xffff );
+ void SetEntryText(const XubString&,SvLBoxEntry*,sal_uInt16 nCol=0xffff);
+ String GetCellText( sal_uLong nPos, sal_uInt16 nCol ) const;
+ sal_uLong GetEntryPos( const XubString&, sal_uInt16 nCol = 0xffff );
+ sal_uLong GetEntryPos( const SvLBoxEntry* pEntry ) const;
virtual void Resize();
- void SetTabJustify( USHORT nTab, SvTabJustify );
- SvTabJustify GetTabJustify( USHORT nTab ) const;
+ void SetTabJustify( sal_uInt16 nTab, SvTabJustify );
+ SvTabJustify GetTabJustify( sal_uInt16 nTab ) const;
};
-inline long SvTabListBox::GetTab( USHORT nTab ) const
+inline long SvTabListBox::GetTab( sal_uInt16 nTab ) const
{
DBG_ASSERT( nTab < nTabCount, "GetTabPos:Invalid Tab" );
return pTabList[nTab].GetPos();
@@ -160,17 +160,17 @@ public:
virtual void Paint( const Rectangle& );
void InitHeaderBar( HeaderBar* pHeaderBar );
- sal_Bool IsItemChecked( SvLBoxEntry* pEntry, USHORT nCol ) const;
+ sal_Bool IsItemChecked( SvLBoxEntry* pEntry, sal_uInt16 nCol ) const;
- virtual SvLBoxEntry* InsertEntryToColumn( const XubString&, ULONG nPos = LIST_APPEND,
- USHORT nCol = 0xffff, void* pUserData = NULL );
+ virtual SvLBoxEntry* InsertEntryToColumn( const XubString&, sal_uLong nPos = LIST_APPEND,
+ sal_uInt16 nCol = 0xffff, void* pUserData = NULL );
virtual SvLBoxEntry* InsertEntryToColumn( const XubString&, SvLBoxEntry* pParent,
- ULONG nPos, USHORT nCol, void* pUserData = NULL );
+ sal_uLong nPos, sal_uInt16 nCol, void* pUserData = NULL );
virtual SvLBoxEntry* InsertEntryToColumn( const XubString&, const Image& rExpandedEntryBmp,
const Image& rCollapsedEntryBmp, SvLBoxEntry* pParent = NULL,
- ULONG nPos = LIST_APPEND, USHORT nCol = 0xffff, void* pUserData = NULL );
- virtual ULONG Insert( SvLBoxEntry* pEnt,SvLBoxEntry* pPar,ULONG nPos=LIST_APPEND);
- virtual ULONG Insert( SvLBoxEntry* pEntry, ULONG nRootPos = LIST_APPEND );
+ sal_uLong nPos = LIST_APPEND, sal_uInt16 nCol = 0xffff, void* pUserData = NULL );
+ virtual sal_uLong Insert( SvLBoxEntry* pEnt,SvLBoxEntry* pPar,sal_uLong nPos=LIST_APPEND);
+ virtual sal_uLong Insert( SvLBoxEntry* pEntry, sal_uLong nRootPos = LIST_APPEND );
void RemoveEntry( SvLBoxEntry* _pEntry );
void Clear();
@@ -207,8 +207,8 @@ public:
virtual void SetNoSelection();
using SvListView::SelectAll;
virtual void SelectAll();
- virtual void SelectAll( BOOL bSelect, BOOL bPaint = TRUE );
- virtual void SelectRow( long _nRow, BOOL _bSelect = TRUE, BOOL bExpand = TRUE );
+ virtual void SelectAll( sal_Bool bSelect, sal_Bool bPaint = sal_True );
+ virtual void SelectRow( long _nRow, sal_Bool _bSelect = sal_True, sal_Bool bExpand = sal_True );
virtual void SelectColumn( sal_uInt16 _nColumn, sal_Bool _bSelect = sal_True );
virtual sal_Int32 GetSelectedRowCount() const;
virtual sal_Int32 GetSelectedColumnCount() const;
@@ -220,11 +220,11 @@ public:
/** @return <TRUE/>, if the cell is visible. */
virtual sal_Bool IsCellVisible( sal_Int32 _nRow, sal_uInt16 _nColumn ) const;
- virtual String GetAccessibleCellText( long _nRow, USHORT _nColumnPos ) const;
+ virtual String GetAccessibleCellText( long _nRow, sal_uInt16 _nColumnPos ) const;
- virtual Rectangle calcHeaderRect( sal_Bool _bIsColumnBar, BOOL _bOnScreen = TRUE );
- virtual Rectangle calcTableRect( BOOL _bOnScreen = TRUE );
- virtual Rectangle GetFieldRectPixelAbs( sal_Int32 _nRow, sal_uInt16 _nColumn, BOOL _bIsHeader, BOOL _bOnScreen = TRUE );
+ virtual Rectangle calcHeaderRect( sal_Bool _bIsColumnBar, sal_Bool _bOnScreen = sal_True );
+ virtual Rectangle calcTableRect( sal_Bool _bOnScreen = sal_True );
+ virtual Rectangle GetFieldRectPixelAbs( sal_Int32 _nRow, sal_uInt16 _nColumn, sal_Bool _bIsHeader, sal_Bool _bOnScreen = sal_True );
virtual XACC CreateAccessibleCell( sal_Int32 _nRow, sal_uInt16 _nColumn );
virtual XACC CreateAccessibleRowHeader( sal_Int32 _nRow );
@@ -248,12 +248,12 @@ public:
virtual void GrabTableFocus();
// OutputDevice
- virtual BOOL GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector );
+ virtual sal_Bool GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector );
// Window
virtual Rectangle GetWindowExtentsRelative( Window *pRelativeWindow ) const;
virtual void GrabFocus();
- virtual XACC GetAccessible( BOOL bCreate = TRUE );
+ virtual XACC GetAccessible( sal_Bool bCreate = sal_True );
virtual Window* GetAccessibleParentWindow() const;
/** Creates and returns the accessible object of the whole BrowseBox. */
diff --git a/svtools/inc/svtools/svtdata.hxx b/svtools/inc/svtools/svtdata.hxx
index ad7b60b3f2b7..d2012f067e38 100644
--- a/svtools/inc/svtools/svtdata.hxx
+++ b/svtools/inc/svtools/svtdata.hxx
@@ -60,8 +60,8 @@ public:
class SVT_DLLPUBLIC SvtResId: public ResId
{
public:
- SvtResId(USHORT nId, const ::com::sun::star::lang::Locale aLocale);
- SvtResId(USHORT nId);
+ SvtResId(sal_uInt16 nId, const ::com::sun::star::lang::Locale aLocale);
+ SvtResId(sal_uInt16 nId);
// VCL dependant, only available in SVT, not in SVL!
};
diff --git a/svtools/inc/svtools/svtools.hrc b/svtools/inc/svtools/svtools.hrc
index 0461064f7d96..554fc63f5c7c 100644
--- a/svtools/inc/svtools/svtools.hrc
+++ b/svtools/inc/svtools/svtools.hrc
@@ -35,6 +35,9 @@
#define RID_SVTOOLS_BITMAP_START (RID_SVTOOLS_START + 0)
#define RID_SVTOOLS_IMAGELIST_START (RID_SVTOOLS_START + 0)
+#define ABOUT_STR_COPYRIGHT (RID_SVTOOLS_START + 1)
+#define ABOUT_STR_DEVELOPER_ARY (RID_SVTOOLS_START + 2)
+
//.............................................................................
// various unsorted stuff
@@ -249,6 +252,10 @@
#define STR_SVT_ACC_DESC_FOLDER (STR_SVT_ACC_BEGIN+4)
#define STR_SVT_ACC_DESC_FILE (STR_SVT_ACC_BEGIN+5)
#define STR_SVT_ACC_EMPTY_FIELD (STR_SVT_ACC_BEGIN+6)
+//IAccessible2 implementation
+#define STR_SVT_ACC_LISTENTRY_SELCTED_STATE (STR_SVT_ACC_BEGIN+7)
+#define STR_SVT_ACC_RULER_VERT_NAME (STR_SVT_ACC_BEGIN+8)
+#define STR_SVT_ACC_RULER_HORZ_NAME (STR_SVT_ACC_BEGIN+9)
#define STR_SVT_ACC_END (STR_SVT_ACC_EMPTY_FIELD)
#define STR_SVT_INDEXENTRY_START (STR_SVT_ACC_END + 1)
@@ -387,6 +394,11 @@
#define RID_IMG_PRNDLG_COLLATE_HC (STR_SVT_PRNDLG_START + 31)
#define RID_IMG_PRNDLG_NOCOLLATE_HC (STR_SVT_PRNDLG_START + 32)
+// IAccessible2 implementation in 2009
+#define STR_PARAGRAPH_START (STR_SVT_PRNDLG_START + 50)
+#define STR_PARAGRAPH (STR_PARAGRAPH_START + 0)
+#define STR_PARAGRAPH_END (STR_PARAGRAPH)
+
#endif // #ifndef _SVTOOLS_HRC
// ******************************************************************* EOF
diff --git a/svtools/inc/svtools/svtreebx.hxx b/svtools/inc/svtools/svtreebx.hxx
index 79402cb13f23..7705050bc3ca 100644
--- a/svtools/inc/svtools/svtreebx.hxx
+++ b/svtools/inc/svtools/svtreebx.hxx
@@ -70,12 +70,12 @@ class SVT_DLLPUBLIC SvTreeListBox : public SvLBox
Image aCurInsertedColBmp;
short nContextBmpWidthMax;
- USHORT nFirstSelTab, nLastSelTab;
+ sal_uInt16 nFirstSelTab, nLastSelTab;
short nEntryHeight;
short nEntryHeightOffs;
short nIndent;
short nFocusWidth;
- USHORT aContextBmpMode;
+ sal_uInt16 aContextBmpMode;
#ifdef _SVTREEBX_CXX
DECL_DLLPRIVATE_LINK( CheckButtonClick, SvLBoxButtonData * );
@@ -89,19 +89,19 @@ class SVT_DLLPUBLIC SvTreeListBox : public SvLBox
SVT_DLLPRIVATE void ImpEntryInserted( SvLBoxEntry* pEntry );
SVT_DLLPRIVATE long PaintEntry1( SvLBoxEntry*, long nLine,
- USHORT nTabFlagMask=0xffff,
- BOOL bHasClipRegion=FALSE );
+ sal_uInt16 nTabFlagMask=0xffff,
+ sal_Bool bHasClipRegion=sal_False );
SVT_DLLPRIVATE void InitTreeView();
SVT_DLLPRIVATE SvLBoxItem* GetItem_Impl( SvLBoxEntry*, long nX, SvLBoxTab** ppTab,
- USHORT nEmptyWidth );
+ sal_uInt16 nEmptyWidth );
SVT_DLLPRIVATE void ImplInitStyle();
#endif
protected:
SvLBoxButtonData* pCheckButtonData;
- USHORT nTreeFlags;
+ sal_uInt16 nTreeFlags;
SvLBoxEntry* pEdEntry;
SvLBoxItem* pEdItem;
@@ -119,13 +119,13 @@ protected:
// Bitmaps, beim Wechsel des Models usw. automatisch gerufen
virtual void SetTabs();
void SetTabs_Impl();
- void AddTab( long nPos,USHORT nFlags=SV_LBOXTAB_ADJUST_LEFT,
+ void AddTab( long nPos,sal_uInt16 nFlags=SV_LBOXTAB_ADJUST_LEFT,
void* pUserData = 0 );
- USHORT TabCount() const { return aTabs.Count(); }
+ sal_uInt16 TabCount() const { return aTabs.Count(); }
SvLBoxTab* GetFirstDynamicTab() const;
- SvLBoxTab* GetFirstDynamicTab( USHORT& rTabPos ) const;
- SvLBoxTab* GetFirstTab( USHORT nFlagMask, USHORT& rTabPos );
- SvLBoxTab* GetLastTab( USHORT nFlagMask, USHORT& rTabPos );
+ SvLBoxTab* GetFirstDynamicTab( sal_uInt16& rTabPos ) const;
+ SvLBoxTab* GetFirstTab( sal_uInt16 nFlagMask, sal_uInt16& rTabPos );
+ SvLBoxTab* GetLastTab( sal_uInt16 nFlagMask, sal_uInt16& rTabPos );
SvLBoxTab* GetTab( SvLBoxEntry*, SvLBoxItem* ) const;
void ClearTabList();
@@ -145,8 +145,8 @@ protected:
// in das Control hineingezeichnet werden
virtual void NotifyInvalidating();
- virtual ULONG GetAscInsertionPos( SvLBoxEntry*, SvLBoxEntry* pParent );
- virtual ULONG GetDescInsertionPos( SvLBoxEntry*, SvLBoxEntry* pParent );
+ virtual sal_uLong GetAscInsertionPos( SvLBoxEntry*, SvLBoxEntry* pParent );
+ virtual sal_uLong GetDescInsertionPos( SvLBoxEntry*, SvLBoxEntry* pParent );
virtual void Command( const CommandEvent& rCEvt );
virtual void RequestHelp( const HelpEvent& rHEvt );
@@ -155,11 +155,11 @@ protected:
virtual void DataChanged( const DataChangedEvent& rDCEvt );
virtual void StateChanged( StateChangedType nStateChange );
- void InitSettings(BOOL bFont,BOOL bForeground,BOOL bBackground);
- BOOL IsCellFocusEnabled() const;
- bool SetCurrentTabPos( USHORT _nNewPos );
- USHORT GetCurrentTabPos() const;
- void CallImplEventListeners(ULONG nEvent, void* pData);
+ void InitSettings(sal_Bool bFont,sal_Bool bForeground,sal_Bool bBackground);
+ sal_Bool IsCellFocusEnabled() const;
+ bool SetCurrentTabPos( sal_uInt16 _nNewPos );
+ sal_uInt16 GetCurrentTabPos() const;
+ void CallImplEventListeners(sal_uLong nEvent, void* pData);
void ImplEditEntry( SvLBoxEntry* pEntry );
@@ -200,16 +200,16 @@ public:
}
virtual SvLBoxEntry* InsertEntry( const XubString& rText, SvLBoxEntry* pParent = 0,
- BOOL bChildsOnDemand = FALSE,
- ULONG nPos=LIST_APPEND, void* pUserData = 0,
+ sal_Bool bChildsOnDemand = sal_False,
+ sal_uLong nPos=LIST_APPEND, void* pUserData = 0,
SvLBoxButtonKind eButtonKind = SvLBoxButtonKind_enabledCheckbox );
virtual SvLBoxEntry* InsertEntry( const XubString& rText,
const Image& rExpandedEntryBmp,
const Image& rCollapsedEntryBmp,
SvLBoxEntry* pParent = 0,
- BOOL bChildsOnDemand = FALSE,
- ULONG nPos = LIST_APPEND, void* pUserData = 0,
+ sal_Bool bChildsOnDemand = sal_False,
+ sal_uLong nPos = LIST_APPEND, void* pUserData = 0,
SvLBoxButtonKind eButtonKind = SvLBoxButtonKind_enabledCheckbox );
const Image& GetDefaultExpandedEntryBmp( BmpColorMode _eMode = BMP_COLOR_NORMAL ) const;
@@ -221,8 +221,8 @@ public:
void SetCheckButtonState( SvLBoxEntry*, SvButtonState );
SvButtonState GetCheckButtonState( SvLBoxEntry* ) const;
- void ShowExpandBitmapOnCursor( BOOL );
- BOOL IsExpandBitmapOnCursor() const { return (BOOL)(aContextBmpMode & SVLISTENTRYFLAG_FOCUSED)!=0; }
+ void ShowExpandBitmapOnCursor( sal_Bool );
+ sal_Bool IsExpandBitmapOnCursor() const { return (sal_Bool)(aContextBmpMode & SVLISTENTRYFLAG_FOCUSED)!=0; }
void SetEntryText(SvLBoxEntry*, const XubString& );
void SetExpandedEntryBmp( SvLBoxEntry* _pEntry, const Image& _rImage, BmpColorMode _eMode = BMP_COLOR_NORMAL );
@@ -239,24 +239,24 @@ public:
virtual SvLBoxEntry* CloneEntry( SvLBoxEntry* pSource );
- virtual USHORT IsA();
+ virtual sal_uInt16 IsA();
- void SetSublistOpenWithReturn( BOOL bMode = TRUE ); // open/close sublist with return/enter
- BOOL IsSublistOpenWithReturn() const;
- void SetSublistOpenWithLeftRight( BOOL bMode = TRUE ); // open/close sublist with cursor left/right
- BOOL IsSublistOpenWithLeftRight() const;
+ void SetSublistOpenWithReturn( sal_Bool bMode = sal_True ); // open/close sublist with return/enter
+ sal_Bool IsSublistOpenWithReturn() const;
+ void SetSublistOpenWithLeftRight( sal_Bool bMode = sal_True ); // open/close sublist with cursor left/right
+ sal_Bool IsSublistOpenWithLeftRight() const;
- void EnableInplaceEditing( BOOL bEnable );
- BOOL IsInplaceEditingEnabled() const { return SvLBox::IsInplaceEditingEnabled(); }
+ void EnableInplaceEditing( sal_Bool bEnable );
+ sal_Bool IsInplaceEditingEnabled() const { return SvLBox::IsInplaceEditingEnabled(); }
inline void ForbidEmptyText() { SvLBox::ForbidEmptyText(); }
// Editiert das erste StringItem des Entries, 0==Cursor
void EditEntry( SvLBoxEntry* pEntry = NULL );
void CancelEditing();
- virtual BOOL EditingEntry( SvLBoxEntry* pEntry, Selection& );
- virtual BOOL EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText );
- BOOL IsEditingActive() const { return SvLBox::IsEditingActive(); }
- void EndEditing( BOOL bCancel = FALSE ) { SvLBox::EndEditing( bCancel ); }
- BOOL EditingCanceled() const { return SvLBox::EditingCanceled(); }
+ virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& );
+ virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText );
+ sal_Bool IsEditingActive() const { return SvLBox::IsEditingActive(); }
+ void EndEditing( sal_Bool bCancel = sal_False ) { SvLBox::EndEditing( bCancel ); }
+ sal_Bool EditingCanceled() const { return SvLBox::EditingCanceled(); }
virtual void RequestingChilds( SvLBoxEntry* pParent );
@@ -268,9 +268,9 @@ public:
virtual void Resize();
virtual void GetFocus();
virtual void LoseFocus();
- void SetUpdateMode( BOOL );
+ void SetUpdateMode( sal_Bool );
// aktualisiert nicht die vertikale ScrollBar
- void SetUpdateModeFast( BOOL );
+ void SetUpdateModeFast( sal_Bool );
using SvListView::SetModel;
void SetModel( SvLBoxTreeList* );
@@ -278,19 +278,19 @@ public:
virtual void ModelHasInserted( SvListEntry* pEntry );
virtual void ModelHasInsertedTree( SvListEntry* pEntry );
virtual void ModelIsMoving(SvListEntry* pSource,
- SvListEntry* pTargetParent, ULONG nChildPos );
+ SvListEntry* pTargetParent, sal_uLong nChildPos );
virtual void ModelHasMoved(SvListEntry* pSource );
virtual void ModelIsRemoving( SvListEntry* pEntry );
virtual void ModelHasRemoved( SvListEntry* pEntry );
virtual void ModelHasEntryInvalidated( SvListEntry* pEntry );
- void ShowTargetEmphasis( SvLBoxEntry*, BOOL bShow );
+ void ShowTargetEmphasis( SvLBoxEntry*, sal_Bool bShow );
using Window::GetDropTarget;
SvLBoxEntry* GetDropTarget( const Point& );
void ScrollOutputArea( short nDeltaEntries );
short GetEntryHeight() const { return nEntryHeight; }
- void SetEntryHeight( short nHeight, BOOL bAlways = FALSE );
+ void SetEntryHeight( short nHeight, sal_Bool bAlways = sal_False );
Size GetOutputSizePixel() const;
short GetIndent() const { return nIndent; }
void SetIndent( short nIndent );
@@ -299,7 +299,7 @@ public:
Point GetEntryPosition( SvLBoxEntry* ) const;
void ShowEntry( SvLBoxEntry* ); // !!!OBSOLETE, use MakeVisible
virtual void MakeVisible( SvLBoxEntry* );
- void MakeVisible( SvLBoxEntry*, BOOL bMoveToTop );
+ void MakeVisible( SvLBoxEntry*, sal_Bool bMoveToTop );
void SetCollapsedNodeBmp( const Image&, BmpColorMode _eMode = BMP_COLOR_NORMAL );
void SetExpandedNodeBmp( const Image&, BmpColorMode _eMode = BMP_COLOR_NORMAL );
@@ -309,15 +309,15 @@ public:
void SetFont( const Font& rFont );
using Window::SetCursor;
- void SetCursor( SvLBoxEntry* pEntry, BOOL bForceNoSelect = FALSE );
+ void SetCursor( SvLBoxEntry* pEntry, sal_Bool bForceNoSelect = sal_False );
- SvLBoxEntry* GetEntry( const Point& rPos, BOOL bHit = FALSE ) const;
- SvLBoxEntry* GetEntry( SvLBoxEntry* pParent, ULONG nPos ) const { return SvLBox::GetEntry(pParent,nPos); }
- SvLBoxEntry* GetEntry( ULONG nRootPos ) const { return SvLBox::GetEntry(nRootPos);}
+ SvLBoxEntry* GetEntry( const Point& rPos, sal_Bool bHit = sal_False ) const;
+ SvLBoxEntry* GetEntry( SvLBoxEntry* pParent, sal_uLong nPos ) const { return SvLBox::GetEntry(pParent,nPos); }
+ SvLBoxEntry* GetEntry( sal_uLong nRootPos ) const { return SvLBox::GetEntry(nRootPos);}
void PaintEntry( SvLBoxEntry* );
long PaintEntry( SvLBoxEntry*, long nLine,
- USHORT nTabFlagMask=0xffff );
+ sal_uInt16 nTabFlagMask=0xffff );
virtual Rectangle GetFocusRect( SvLBoxEntry*, long nLine );
// Beruecksichtigt Einrueckung
virtual long GetTabPos( SvLBoxEntry*, SvLBoxTab* );
@@ -328,23 +328,23 @@ public:
void SetDragDropMode( DragDropMode );
void SetSelectionMode( SelectionMode );
- void SetAddMode( BOOL bAdd );
- BOOL IsAddMode() const;
-
- virtual BOOL Expand( SvLBoxEntry* pParent );
- virtual BOOL Collapse( SvLBoxEntry* pParent );
- virtual BOOL Select( SvLBoxEntry* pEntry, BOOL bSelect=TRUE );
- virtual ULONG SelectChilds( SvLBoxEntry* pParent, BOOL bSelect );
- virtual void SelectAll( BOOL bSelect, BOOL bPaint = TRUE );
+ void SetAddMode( sal_Bool bAdd );
+ sal_Bool IsAddMode() const;
+
+ virtual sal_Bool Expand( SvLBoxEntry* pParent );
+ virtual sal_Bool Collapse( SvLBoxEntry* pParent );
+ virtual sal_Bool Select( SvLBoxEntry* pEntry, sal_Bool bSelect=sal_True );
+ virtual sal_uLong SelectChilds( SvLBoxEntry* pParent, sal_Bool bSelect );
+ virtual void SelectAll( sal_Bool bSelect, sal_Bool bPaint = sal_True );
virtual void SetCurEntry( SvLBoxEntry* _pEntry );
virtual SvLBoxEntry*
GetCurEntry() const;
using Window::Invalidate;
- virtual void Invalidate( USHORT nFlags = 0);
- virtual void Invalidate( const Rectangle&, USHORT nFlags = 0 );
+ virtual void Invalidate( sal_uInt16 nFlags = 0);
+ virtual void Invalidate( const Rectangle&, sal_uInt16 nFlags = 0 );
- void SetHighlightRange(USHORT nFirstTab=0,USHORT nLastTab=0xffff);
+ void SetHighlightRange(sal_uInt16 nFirstTab=0,sal_uInt16 nLastTab=0xffff);
void RemoveHighlightRange();
virtual Region GetDragRegion() const;
@@ -353,16 +353,16 @@ public:
void RemoveParentKeepChilds( SvLBoxEntry* pParent );
DECL_LINK( DefaultCompare, SvSortData* );
- virtual void ModelNotification( USHORT nActionId, SvListEntry* pEntry1,
- SvListEntry* pEntry2, ULONG nPos );
+ virtual void ModelNotification( sal_uInt16 nActionId, SvListEntry* pEntry1,
+ SvListEntry* pEntry2, sal_uLong nPos );
long GetTextOffset() const;
void EndSelection();
- BOOL IsNodeButton( const Point& rPos ) const;
+ sal_Bool IsNodeButton( const Point& rPos ) const;
void RepaintScrollBars() const;
ScrollBar* GetVScroll();
ScrollBar* GetHScroll();
- void EnableAsyncDrag( BOOL b );
+ void EnableAsyncDrag( sal_Bool b );
SvLBoxEntry* GetFirstEntryInView() const;
SvLBoxEntry* GetNextEntryInView(SvLBoxEntry*) const;
@@ -375,11 +375,11 @@ public:
void CancelPendingEdit();
virtual PopupMenu* CreateContextMenu( void );
- virtual void ExcecuteContextMenuAction( USHORT nSelectedPopupEntry );
+ virtual void ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry );
void EnableContextMenuHandling( void );
- void EnableContextMenuHandling( BOOL bEnable );
- BOOL IsContextMenuHandlingEnabled( void ) const;
+ void EnableContextMenuHandling( sal_Bool bEnable );
+ sal_Bool IsContextMenuHandlingEnabled( void ) const;
void EnableList( bool _bEnable );
diff --git a/svtools/inc/svtools/svxbox.hxx b/svtools/inc/svtools/svxbox.hxx
index a4a920e692be..5697f39a4ca7 100644
--- a/svtools/inc/svtools/svxbox.hxx
+++ b/svtools/inc/svtools/svxbox.hxx
@@ -50,16 +50,16 @@ class SVT_DLLPUBLIC SvxBoxEntry
friend class SvxComboBox;
public:
- SvxBoxEntry( const String& aName, USHORT nId=0 );
+ SvxBoxEntry( const String& aName, sal_uInt16 nId=0 );
SvxBoxEntry( const SvxBoxEntry& rOrg );
SvxBoxEntry();
String aName;
- USHORT nId;
+ sal_uInt16 nId;
private:
- BOOL bModified;
- BOOL bNew;
+ sal_Bool bModified;
+ sal_Bool bNew;
};
// class SvxListBox ------------------------------------------------------
@@ -79,30 +79,30 @@ public:
void InsertNewEntry( const SvxBoxEntry& rEntry );
void InsertEntry( const SvxBoxEntry& rEntry,
- USHORT nId = LISTBOX_ENTRY_NOTFOUND );
+ sal_uInt16 nId = LISTBOX_ENTRY_NOTFOUND );
- void RemoveEntry( USHORT nPos );
+ void RemoveEntry( sal_uInt16 nPos );
void RemoveEntry( const SvxBoxEntry& rEntry );
void Clear();
- USHORT GetEntryPos( const SvxBoxEntry& rEntry ) const;
- const SvxBoxEntry& GetSvxBoxEntry( USHORT nIdx ) const;
+ sal_uInt16 GetEntryPos( const SvxBoxEntry& rEntry ) const;
+ const SvxBoxEntry& GetSvxBoxEntry( sal_uInt16 nIdx ) const;
- inline BOOL IsEntrySelected( const SvxBoxEntry& rEntry ) const;
- const SvxBoxEntry& GetSelectSvxBoxEntry( USHORT nIdx = 0 ) const;
+ inline sal_Bool IsEntrySelected( const SvxBoxEntry& rEntry ) const;
+ const SvxBoxEntry& GetSelectSvxBoxEntry( sal_uInt16 nIdx = 0 ) const;
inline void SelectEntry( const SvxBoxEntry& rEntry,
- BOOL bSelect = TRUE );
+ sal_Bool bSelect = sal_True );
- void ModifyEntry( USHORT nPos, const String& aName );
- USHORT GetModifiedCount() const;
- const SvxBoxEntry& GetModifiedEntry( USHORT nPos ) const;
+ void ModifyEntry( sal_uInt16 nPos, const String& aName );
+ sal_uInt16 GetModifiedCount() const;
+ const SvxBoxEntry& GetModifiedEntry( sal_uInt16 nPos ) const;
- USHORT GetRemovedCount() const;
- const SvxBoxEntry& GetRemovedEntry( USHORT nPos ) const;
+ sal_uInt16 GetRemovedCount() const;
+ const SvxBoxEntry& GetRemovedEntry( sal_uInt16 nPos ) const;
- USHORT GetNewCount() const;
- const SvxBoxEntry& GetNewEntry( USHORT nPos ) const;
+ sal_uInt16 GetNewCount() const;
+ const SvxBoxEntry& GetNewEntry( sal_uInt16 nPos ) const;
private:
SvxEntryLst aEntryLst;
@@ -115,10 +115,10 @@ private:
// inlines ---------------------------------------------------------------
-inline BOOL SvxListBox::IsEntrySelected( const SvxBoxEntry& aEntry ) const
+inline sal_Bool SvxListBox::IsEntrySelected( const SvxBoxEntry& aEntry ) const
{ return ListBox::IsEntrySelected( aEntry.aName ); }
-inline void SvxListBox::SelectEntry( const SvxBoxEntry& aEntry, BOOL bSelect )
+inline void SvxListBox::SelectEntry( const SvxBoxEntry& aEntry, sal_Bool bSelect )
{ ListBox::SelectEntry( aEntry.aName, bSelect ); }
// enum SvxComboBoxStyle -------------------------------------------------
@@ -143,33 +143,33 @@ class SVT_DLLPUBLIC SvxComboBox : public ComboBox
public:
SvxComboBox( Window* pParent,
- WinBits nBits = WB_BORDER, USHORT nStyleBits = SVX_CBS_ALL );
- SvxComboBox( Window* pParent, const ResId& rId, USHORT nStyleBits = SVX_CBS_ALL );
+ WinBits nBits = WB_BORDER, sal_uInt16 nStyleBits = SVX_CBS_ALL );
+ SvxComboBox( Window* pParent, const ResId& rId, sal_uInt16 nStyleBits = SVX_CBS_ALL );
~SvxComboBox();
void InsertNewEntry( const SvxBoxEntry& );
void InsertEntry( const SvxBoxEntry& );
- void RemoveEntry( USHORT nPos );
+ void RemoveEntry( sal_uInt16 nPos );
void RemoveEntry( const SvxBoxEntry& rEntry );
void Clear();
- USHORT GetEntryPos( const SvxBoxEntry& rEntry ) const;
- const SvxBoxEntry& GetEntry( USHORT nIdx ) const;
+ sal_uInt16 GetEntryPos( const SvxBoxEntry& rEntry ) const;
+ const SvxBoxEntry& GetEntry( sal_uInt16 nIdx ) const;
- void ModifyEntry( USHORT nPos, const String& aName );
- USHORT GetModifiedCount() const;
- const SvxBoxEntry& GetModifiedEntry( USHORT nPos ) const;
+ void ModifyEntry( sal_uInt16 nPos, const String& aName );
+ sal_uInt16 GetModifiedCount() const;
+ const SvxBoxEntry& GetModifiedEntry( sal_uInt16 nPos ) const;
- USHORT GetRemovedCount() const;
- const SvxBoxEntry& GetRemovedEntry( USHORT nPos ) const;
+ sal_uInt16 GetRemovedCount() const;
+ const SvxBoxEntry& GetRemovedEntry( sal_uInt16 nPos ) const;
- USHORT GetNewCount() const;
- const SvxBoxEntry& GetNewEntry( USHORT nPos ) const;
+ sal_uInt16 GetNewCount() const;
+ const SvxBoxEntry& GetNewEntry( sal_uInt16 nPos ) const;
- USHORT GetStyle() const { return nStyle; }
- void SetStyle( const USHORT nSt ) { nStyle = nSt; }
+ sal_uInt16 GetStyle() const { return nStyle; }
+ void SetStyle( const sal_uInt16 nSt ) { nStyle = nSt; }
String GetText() const;
@@ -177,7 +177,7 @@ private:
SvxEntryLst aEntryLst;
SvxEntryLst aDelEntryLst;
SvxBoxEntry aDefault;
- USHORT nStyle;
+ sal_uInt16 nStyle;
virtual void KeyInput( const KeyEvent& rKEvt );
diff --git a/svtools/inc/svtools/sychconv.hxx b/svtools/inc/svtools/sychconv.hxx
index 4056556a2100..c5ab6d78059c 100644
--- a/svtools/inc/svtools/sychconv.hxx
+++ b/svtools/inc/svtools/sychconv.hxx
@@ -41,7 +41,7 @@ class SymCharConverter
{
public:
- static BOOL Convert( Font& rFont, UniString& rString, OutputDevice* pDev = NULL );
+ static sal_Bool Convert( Font& rFont, UniString& rString, OutputDevice* pDev = NULL );
};
#endif // _CHARCONV_HXX
diff --git a/svtools/inc/svtools/syntaxhighlight.hxx b/svtools/inc/svtools/syntaxhighlight.hxx
index e406c33fc54f..5539e97b7a4d 100644
--- a/svtools/inc/svtools/syntaxhighlight.hxx
+++ b/svtools/inc/svtools/syntaxhighlight.hxx
@@ -74,7 +74,7 @@ enum TokenTypes
TT_PARAMETER
};
-struct HighlightPortion { UINT16 nBegin; UINT16 nEnd; TokenTypes tokenType; };
+struct HighlightPortion { sal_uInt16 nBegin; sal_uInt16 nEnd; TokenTypes tokenType; };
typedef std::vector<HighlightPortion> HighlightPortions;
@@ -110,23 +110,23 @@ class SimpleTokenizer_Impl
{
HighlighterLanguage aLanguage;
// Zeichen-Info-Tabelle
- USHORT aCharTypeTab[256];
+ sal_uInt16 aCharTypeTab[256];
const sal_Unicode* mpStringBegin;
const sal_Unicode* mpActualPos;
// Zeile und Spalte
- UINT32 nLine;
- UINT32 nCol;
+ sal_uInt32 nLine;
+ sal_uInt32 nCol;
sal_Unicode peekChar( void ) { return *mpActualPos; }
sal_Unicode getChar( void ) { nCol++; return *mpActualPos++; }
// Hilfsfunktion: Zeichen-Flag Testen
- BOOL testCharFlags( sal_Unicode c, USHORT nTestFlags );
+ sal_Bool testCharFlags( sal_Unicode c, sal_uInt16 nTestFlags );
// Neues Token holen, Leerstring == nix mehr da
- BOOL getNextToken( /*out*/TokenTypes& reType,
+ sal_Bool getNextToken( /*out*/TokenTypes& reType,
/*out*/const sal_Unicode*& rpStartPos, /*out*/const sal_Unicode*& rpEndPos );
String getTokStr( /*out*/const sal_Unicode* pStartPos, /*out*/const sal_Unicode* pEndPos );
@@ -138,16 +138,16 @@ class SimpleTokenizer_Impl
#endif
const char** ppListKeyWords;
- UINT16 nKeyWordCount;
+ sal_uInt16 nKeyWordCount;
public:
SimpleTokenizer_Impl( HighlighterLanguage aLang = HIGHLIGHT_BASIC );
~SimpleTokenizer_Impl( void );
- UINT16 parseLine( UINT32 nLine, const String* aSource );
- void getHighlightPortions( UINT32 nParseLine, const String& rLine,
+ sal_uInt16 parseLine( sal_uInt32 nLine, const String* aSource );
+ void getHighlightPortions( sal_uInt32 nParseLine, const String& rLine,
/*out*/HighlightPortions& portions );
- void setKeyWords( const char** ppKeyWords, UINT16 nCount );
+ void setKeyWords( const char** ppKeyWords, sal_uInt16 nCount );
};
@@ -163,7 +163,7 @@ class SVT_DLLPUBLIC SyntaxHighlighter
HighlighterLanguage eLanguage;
SimpleTokenizer_Impl* m_pSimpleTokenizer;
char* m_pKeyWords;
- UINT16 m_nKeyWordCount;
+ sal_uInt16 m_nKeyWordCount;
// void initializeKeyWords( HighlighterLanguage eLanguage );
@@ -177,10 +177,10 @@ public:
// nur Zeile 0 angegeben werden.
void initialize( HighlighterLanguage eLanguage_ );
- const Range notifyChange( UINT32 nLine, INT32 nLineCountDifference,
- const String* pChangedLines, UINT32 nArrayLength);
+ const Range notifyChange( sal_uInt32 nLine, sal_Int32 nLineCountDifference,
+ const String* pChangedLines, sal_uInt32 nArrayLength);
- void getHighlightPortions( UINT32 nLine, const String& rLine,
+ void getHighlightPortions( sal_uInt32 nLine, const String& rLine,
HighlightPortions& pPortions );
HighlighterLanguage GetLanguage() { return eLanguage;}
diff --git a/svtools/inc/svtools/tabbar.hxx b/svtools/inc/svtools/tabbar.hxx
index 2757811ba34e..cab942b452b6 100644
--- a/svtools/inc/svtools/tabbar.hxx
+++ b/svtools/inc/svtools/tabbar.hxx
@@ -86,10 +86,10 @@ DoubleClick - Wird gerufen, wenn ein DoubleClick im TabBar ausgeloest
ActivatePage - Wird gerufen, wenn eine andere Seite aktiviert wird.
GetCurPageId() gibt die aktivierte Seite zurueck.
DeactivatePage - Wird gerufen, wenn eine Seite deaktiviert wird. Wenn
- eine andere Seite aktiviert werden darf, muss TRUE
+ eine andere Seite aktiviert werden darf, muss sal_True
zurueckgegeben werden, wenn eine andere Seite von
der Aktivierung ausgeschlossen werden soll, muss
- FALSE zurueckgegeben werden. GetCurPageId() gibt die
+ sal_False zurueckgegeben werden. GetCurPageId() gibt die
zu deaktivierende Seite zurueck.
@@ -104,7 +104,7 @@ werden. Dabei muss in den Handlern folgendes implementiert werden:
Command - Wenn in diesem Handler das Dragging gestartet werden
soll, muss StartDrag() gerufen werden. Diese Methode
selektiert dann den entsprechenden Eintrag oder gibt
- FALSE zurueck, wenn das Dragging nicht durchgefuhert
+ sal_False zurueck, wenn das Dragging nicht durchgefuhert
werden kann.
QueryDrop - Dieser Handler wird von StarView immer dann gerufen, wenn
@@ -162,7 +162,7 @@ SwitchPage - Diese Methode muss vom QueryDrop-Handler gerufen werden,
Das umschalten der Seite passiert zeitverzoegert (500 ms)
und wird automatisch von dieser Methode verwaltet.
In der Methode muss die Position vom Event uebergeben
- werden. Diese Methode gibt TRUE zurueck, wenn die Page
+ werden. Diese Methode gibt sal_True zurueck, wenn die Page
umgeschaltet wurde.
EndSwitchPage - Diese Methode setzt die Daten fuer das umschalten der
@@ -223,7 +223,7 @@ EnableEditMode - Damit kann eingestellt werden, das bei Alt+LeftClick
Im StartRenaming()-Handler kann dann das Umbenennen
noch abgelehnt werden.
StartEditMode - Mit dieser Methode wird der EditModus auf einem
- Tab gestartet. FALSE wird zurueckgegeben, wenn
+ Tab gestartet. sal_False wird zurueckgegeben, wenn
der Editmodus schon aktiv ist, mit StartRenaming()
der Modus abgelehnt wurde oder kein Platz zum
Editieren vorhanden ist.
@@ -244,7 +244,7 @@ GetEditPageId - Mit dieser Methode wird in den Renaming-Handlern
StartRenaming() - Dieser Handler wird gerufen, wenn ueber StartEditMode()
der Editmodus gestartet wurde. Mit GetEditPageId()
kann abgefragt werden, welcher Tab umbenannt werden
- soll. FALSE sollte zurueckgegeben werden, wenn
+ soll. sal_False sollte zurueckgegeben werden, wenn
der Editmodus nicht gestartet werden soll.
AllowRenaming() - Dieser Handler wird gerufen, wenn der Editmodus
beendet wird (nicht bei Cancel). In diesem Handler
@@ -308,7 +308,7 @@ ueber einem bzw. ueber welchem Item durchgefuehrt wurde.
// - TabBarPageBits -
// ------------------
-typedef USHORT TabBarPageBits;
+typedef sal_uInt16 TabBarPageBits;
// -------------------------
// - Bits fuer TabBarPages -
@@ -320,8 +320,8 @@ typedef USHORT TabBarPageBits;
// - TabBar-Types -
// ----------------
-#define TABBAR_RENAMING_YES ((long)TRUE)
-#define TABBAR_RENAMING_NO ((long)FALSE)
+#define TABBAR_RENAMING_YES ((long)sal_True)
+#define TABBAR_RENAMING_NO ((long)sal_False)
#define TABBAR_RENAMING_CANCEL ((long)2)
// ----------
@@ -352,25 +352,25 @@ private:
long mnOffY;
long mnLastOffX;
long mnSplitSize;
- ULONG mnSwitchTime;
+ sal_uLong mnSwitchTime;
WinBits mnWinStyle;
- USHORT mnCurPageId;
- USHORT mnFirstPos;
- USHORT mnDropPos;
- USHORT mnSwitchId;
- USHORT mnEditId;
- BOOL mbFormat;
- BOOL mbFirstFormat;
- BOOL mbSizeFormat;
- BOOL mbAutoMaxWidth;
- BOOL mbInSwitching;
- BOOL mbAutoEditMode;
- BOOL mbEditCanceled;
- BOOL mbDropPos;
- BOOL mbInSelect;
- BOOL mbSelColor;
- BOOL mbSelTextColor;
- BOOL mbMirrored;
+ sal_uInt16 mnCurPageId;
+ sal_uInt16 mnFirstPos;
+ sal_uInt16 mnDropPos;
+ sal_uInt16 mnSwitchId;
+ sal_uInt16 mnEditId;
+ sal_Bool mbFormat;
+ sal_Bool mbFirstFormat;
+ sal_Bool mbSizeFormat;
+ sal_Bool mbAutoMaxWidth;
+ sal_Bool mbInSwitching;
+ sal_Bool mbAutoEditMode;
+ sal_Bool mbEditCanceled;
+ sal_Bool mbDropPos;
+ sal_Bool mbInSelect;
+ sal_Bool mbSelColor;
+ sal_Bool mbSelTextColor;
+ sal_Bool mbMirrored;
Link maSelectHdl;
Link maDoubleClickHdl;
Link maSplitHdl;
@@ -382,13 +382,13 @@ private:
using Window::ImplInit;
SVT_DLLPRIVATE void ImplInit( WinBits nWinStyle );
- SVT_DLLPRIVATE void ImplInitSettings( BOOL bFont, BOOL bBackground );
+ SVT_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bBackground );
SVT_DLLPRIVATE void ImplGetColors( Color& rFaceColor, Color& rFaceTextColor,
Color& rSelectColor, Color& rSelectTextColor );
- SVT_DLLPRIVATE void ImplShowPage( USHORT nPos );
- SVT_DLLPRIVATE BOOL ImplCalcWidth();
+ SVT_DLLPRIVATE void ImplShowPage( sal_uInt16 nPos );
+ SVT_DLLPRIVATE sal_Bool ImplCalcWidth();
SVT_DLLPRIVATE void ImplFormat();
- SVT_DLLPRIVATE USHORT ImplGetLastFirstPos();
+ SVT_DLLPRIVATE sal_uInt16 ImplGetLastFirstPos();
SVT_DLLPRIVATE void ImplInitControls();
SVT_DLLPRIVATE void ImplEnableControls();
SVT_DLLPRIVATE void ImplSelect();
@@ -422,102 +422,102 @@ public:
virtual void EndRenaming();
virtual void Mirror();
- void InsertPage( USHORT nPageId, const XubString& rText,
+ void InsertPage( sal_uInt16 nPageId, const XubString& rText,
TabBarPageBits nBits = 0,
- USHORT nPos = TabBar::APPEND );
- void RemovePage( USHORT nPageId );
- void MovePage( USHORT nPageId, USHORT nNewPos );
+ sal_uInt16 nPos = TabBar::APPEND );
+ void RemovePage( sal_uInt16 nPageId );
+ void MovePage( sal_uInt16 nPageId, sal_uInt16 nNewPos );
- Color GetTabBgColor( USHORT nPageId ) const;
- void SetTabBgColor( USHORT nPageId, const Color& aTabBgColor );
- BOOL IsDefaultTabBgColor( USHORT nPageId );
+ Color GetTabBgColor( sal_uInt16 nPageId ) const;
+ void SetTabBgColor( sal_uInt16 nPageId, const Color& aTabBgColor );
+ sal_Bool IsDefaultTabBgColor( sal_uInt16 nPageId );
void Clear();
- void EnablePage( USHORT nPageId, BOOL bEnable = TRUE );
- BOOL IsPageEnabled( USHORT nPageId ) const;
+ void EnablePage( sal_uInt16 nPageId, sal_Bool bEnable = sal_True );
+ sal_Bool IsPageEnabled( sal_uInt16 nPageId ) const;
- void SetPageBits( USHORT nPageId, TabBarPageBits nBits = 0 );
- TabBarPageBits GetPageBits( USHORT nPageId ) const;
+ void SetPageBits( sal_uInt16 nPageId, TabBarPageBits nBits = 0 );
+ TabBarPageBits GetPageBits( sal_uInt16 nPageId ) const;
- USHORT GetPageCount() const;
- USHORT GetPageId( USHORT nPos ) const;
- USHORT GetPagePos( USHORT nPageId ) const;
- USHORT GetPageId( const Point& rPos ) const;
- Rectangle GetPageRect( USHORT nPageId ) const;
+ sal_uInt16 GetPageCount() const;
+ sal_uInt16 GetPageId( sal_uInt16 nPos ) const;
+ sal_uInt16 GetPagePos( sal_uInt16 nPageId ) const;
+ sal_uInt16 GetPageId( const Point& rPos ) const;
+ Rectangle GetPageRect( sal_uInt16 nPageId ) const;
// returns the rectangle in which page tabs are drawn
Rectangle GetPageArea() const;
- void SetCurPageId( USHORT nPageId );
- USHORT GetCurPageId() const { return mnCurPageId; }
+ void SetCurPageId( sal_uInt16 nPageId );
+ sal_uInt16 GetCurPageId() const { return mnCurPageId; }
- void SetFirstPageId( USHORT nPageId );
- USHORT GetFirstPageId() const { return GetPageId( mnFirstPos ); }
- void MakeVisible( USHORT nPageId );
+ void SetFirstPageId( sal_uInt16 nPageId );
+ sal_uInt16 GetFirstPageId() const { return GetPageId( mnFirstPos ); }
+ void MakeVisible( sal_uInt16 nPageId );
- void SelectPage( USHORT nPageId, BOOL bSelect = TRUE );
- void SelectPageRange( BOOL bSelect = FALSE,
- USHORT nStartPos = 0,
- USHORT nEndPos = TabBar::APPEND );
- USHORT GetSelectPage( USHORT nSelIndex = 0 ) const;
- USHORT GetSelectPageCount() const;
- BOOL IsPageSelected( USHORT nPageId ) const;
+ void SelectPage( sal_uInt16 nPageId, sal_Bool bSelect = sal_True );
+ void SelectPageRange( sal_Bool bSelect = sal_False,
+ sal_uInt16 nStartPos = 0,
+ sal_uInt16 nEndPos = TabBar::APPEND );
+ sal_uInt16 GetSelectPage( sal_uInt16 nSelIndex = 0 ) const;
+ sal_uInt16 GetSelectPageCount() const;
+ sal_Bool IsPageSelected( sal_uInt16 nPageId ) const;
- void EnableAutoMaxPageWidth( BOOL bEnable = TRUE ) { mbAutoMaxWidth = bEnable; }
- BOOL IsAutoMaxPageWidthEnabled() const { return mbAutoMaxWidth; }
+ void EnableAutoMaxPageWidth( sal_Bool bEnable = sal_True ) { mbAutoMaxWidth = bEnable; }
+ sal_Bool IsAutoMaxPageWidthEnabled() const { return mbAutoMaxWidth; }
void SetMaxPageWidth( long nMaxWidth );
long GetMaxPageWidth() const { return mnMaxPageWidth; }
void ResetMaxPageWidth() { SetMaxPageWidth( 0 ); }
- BOOL IsMaxPageWidth() const { return mnMaxPageWidth != 0; }
+ sal_Bool IsMaxPageWidth() const { return mnMaxPageWidth != 0; }
- void EnableEditMode( BOOL bEnable = TRUE ) { mbAutoEditMode = bEnable; }
- BOOL IsEditModeEnabled() const { return mbAutoEditMode; }
- BOOL StartEditMode( USHORT nPageId );
- void EndEditMode( BOOL bCancel = FALSE );
+ void EnableEditMode( sal_Bool bEnable = sal_True ) { mbAutoEditMode = bEnable; }
+ sal_Bool IsEditModeEnabled() const { return mbAutoEditMode; }
+ sal_Bool StartEditMode( sal_uInt16 nPageId );
+ void EndEditMode( sal_Bool bCancel = sal_False );
void SetEditText( const XubString& rText ) { maEditText = rText; }
const XubString& GetEditText() const { return maEditText; }
- BOOL IsInEditMode() const { return (mpEdit != NULL); }
- BOOL IsEditModeCanceled() const { return mbEditCanceled; }
- USHORT GetEditPageId() const { return mnEditId; }
+ sal_Bool IsInEditMode() const { return (mpEdit != NULL); }
+ sal_Bool IsEditModeCanceled() const { return mbEditCanceled; }
+ sal_uInt16 GetEditPageId() const { return mnEditId; }
/** Mirrors the entire control including position of buttons and splitter.
Mirroring is done relative to the current direction of the GUI.
- @param bMirrored TRUE = the control will draw itself RTL in LTR GUI,
- and vice versa; FALSE = the control behaves according to the
+ @param bMirrored sal_True = the control will draw itself RTL in LTR GUI,
+ and vice versa; sal_False = the control behaves according to the
current direction of the GUI. */
- void SetMirrored( BOOL bMirrored = TRUE );
- /** Returns TRUE, if the control is set to mirrored mode (see SetMirrored()). */
- BOOL IsMirrored() const { return mbMirrored; }
+ void SetMirrored( sal_Bool bMirrored = sal_True );
+ /** Returns sal_True, if the control is set to mirrored mode (see SetMirrored()). */
+ sal_Bool IsMirrored() const { return mbMirrored; }
/** Sets the control to LTR or RTL mode regardless of the GUI direction.
- @param bRTL FALSE = the control will draw from left to right;
- TRUE = the control will draw from right to left. */
- void SetEffectiveRTL( BOOL bRTL );
- /** Returns TRUE, if the control draws from right to left (see SetEffectiveRTL()). */
- BOOL IsEffectiveRTL() const;
-
- BOOL StartDrag( const CommandEvent& rCEvt, Region& rRegion );
- USHORT ShowDropPos( const Point& rPos );
+ @param bRTL sal_False = the control will draw from left to right;
+ sal_True = the control will draw from right to left. */
+ void SetEffectiveRTL( sal_Bool bRTL );
+ /** Returns sal_True, if the control draws from right to left (see SetEffectiveRTL()). */
+ sal_Bool IsEffectiveRTL() const;
+
+ sal_Bool StartDrag( const CommandEvent& rCEvt, Region& rRegion );
+ sal_uInt16 ShowDropPos( const Point& rPos );
void HideDropPos();
- BOOL SwitchPage( const Point& rPos );
+ sal_Bool SwitchPage( const Point& rPos );
void EndSwitchPage();
- BOOL IsInSwitching() { return mbInSwitching; }
+ sal_Bool IsInSwitching() { return mbInSwitching; }
void SetSelectColor();
void SetSelectColor( const Color& rColor );
const Color& GetSelectColor() const { return maSelColor; }
- BOOL IsSelectColor() const { return mbSelColor; }
+ sal_Bool IsSelectColor() const { return mbSelColor; }
void SetSelectTextColor();
void SetSelectTextColor( const Color& rColor );
const Color& GetSelectTextColor() const { return maSelTextColor; }
- BOOL IsSelectTextColor() const { return mbSelTextColor; }
-
- void SetPageText( USHORT nPageId, const XubString& rText );
- XubString GetPageText( USHORT nPageId ) const;
- void SetHelpText( USHORT nPageId, const XubString& rText );
- XubString GetHelpText( USHORT nPageId ) const;
- void SetHelpId( USHORT nPageId, const rtl::OString& nHelpId );
- rtl::OString GetHelpId( USHORT nPageId ) const;
+ sal_Bool IsSelectTextColor() const { return mbSelTextColor; }
+
+ void SetPageText( sal_uInt16 nPageId, const XubString& rText );
+ XubString GetPageText( sal_uInt16 nPageId ) const;
+ void SetHelpText( sal_uInt16 nPageId, const XubString& rText );
+ XubString GetHelpText( sal_uInt16 nPageId ) const;
+ void SetHelpId( sal_uInt16 nPageId, const rtl::OString& nHelpId );
+ rtl::OString GetHelpId( sal_uInt16 nPageId ) const;
long GetSplitSize() const { return mnSplitSize; }
long GetMinSize() const;
diff --git a/svtools/inc/svtools/table/abstracttablecontrol.hxx b/svtools/inc/svtools/table/abstracttablecontrol.hxx
deleted file mode 100644
index 9206f20ecbcb..000000000000
--- a/svtools/inc/svtools/table/abstracttablecontrol.hxx
+++ /dev/null
@@ -1,134 +0,0 @@
-/*************************************************************************
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
-************************************************************************/
-
-#ifndef SVTOOLS_INC_TABLE_ABSTRACTTABLECONTROL_HXX
-#define SVTOOLS_INC_TABLE_ABSTRACTTABLECONTROL_HXX
-
-#include <sal/types.h>
-#include <vcl/event.hxx>
-#include <vcl/seleng.hxx>
-#include "tabletypes.hxx"
-//........................................................................
-namespace svt { namespace table
-{
-//........................................................................
-
- enum TableControlAction
- {
- /// moves the cursor in the table control one row up, if possible, by keeping the current column
- cursorUp,
- /// moves the cursor in the table control one row down, if possible, by keeping the current column
- cursorDown,
- /// moves the cursor in the table control one column to the left, if possible, by keeping the current row
- cursorLeft,
- /// moves the cursor in the table control one column to the right, if possible, by keeping the current row
- cursorRight,
- /// moves the cursor to the beginning of the current line
- cursorToLineStart,
- /// moves the cursor to the end of the current line
- cursorToLineEnd,
- /// moves the cursor to the first row, keeping the current column
- cursorToFirstLine,
- /// moves the cursor to the last row, keeping the current column
- cursorToLastLine,
- /// moves the cursor one page up, keeping the current column
- cursorPageUp,
- /// moves the cursor one page down, keeping the current column
- cursorPageDown,
- /// moves the cursor to the top-most, left-most cell
- cursorTopLeft,
- /// moves the cursor to the bottom-most, right-most cell
- cursorBottomRight,
- /// selects the row, where the actual cursor is
- cursorSelectRow,
- /// selects the rows, above the actual cursor is
- cursorSelectRowUp,
- /// selects the row, beneath the actual cursor is
- cursorSelectRowDown,
- /// selects the row, from the actual cursor till top
- cursorSelectRowAreaTop,
- /// selects the row, from the actual cursor till bottom
- cursorSelectRowAreaBottom,
-
-
- /// invalid and final enumeration value, not to be actually used
- invalidTableControlAction
- };
-
- //====================================================================
- //= IAbstractTableControl
- //====================================================================
- /** defines a callback interface to be implemented by a concrete table control
- */
- class SAL_NO_VTABLE IAbstractTableControl
- {
- public:
- /** hides the cell cursor
-
- The method cares for successive calls, that is, for every call to
- ->hideCursor(), you need one call to ->showCursor. Only if the number
- of both calls matches, the cursor is really shown.
-
- @see showCursor
- */
- virtual void hideCursor() = 0;
-
- /** shows the cell cursor
-
- @see hideCursor
- */
- virtual void showCursor() = 0;
-
- /** dispatches an action to the table control
-
- @return
- <TRUE/> if the action could be dispatched successfully, <FALSE/> otherwise. Usual
- failure conditions include some other instance vetoing the action, or impossibility
- to execute the action at all (for instance moving up one row when already positioned
- on the very first row).
-
- @see TableControlAction
- */
- virtual bool dispatchAction( TableControlAction _eAction ) = 0;
- /** returns selection engine*/
- virtual SelectionEngine* getSelEngine() = 0;
- virtual void setCursorAtCurrentCell(const Point& rPoint) = 0;
- virtual bool isTooltipActive() = 0;
- virtual rtl::OUString& setTooltip(const Point& rPoint ) = 0;
- virtual RowPos getCurrentRow(const Point& rPoint ) = 0;
- virtual void resizeColumn(const Point& rPoint ) = 0;
- virtual bool startResizeColumn(const Point& rPoint) = 0;
- virtual bool endResizeColumn(const Point& rPoint) = 0;
- virtual bool isRowSelected(RowPos _nRow) = 0;
-
- virtual ~IAbstractTableControl() {};
- };
-
-//........................................................................
-} } // namespace svt::table
-//........................................................................
-
-#endif // SVTOOLS_INC_TABLE_ABSTRACTTABLECONTROL_HXX
diff --git a/svtools/inc/svtools/table/defaultinputhandler.hxx b/svtools/inc/svtools/table/defaultinputhandler.hxx
index ca760896d539..6990f903cdb2 100644
--- a/svtools/inc/svtools/table/defaultinputhandler.hxx
+++ b/svtools/inc/svtools/table/defaultinputhandler.hxx
@@ -27,43 +27,44 @@
#ifndef SVTOOLS_INC_TABLE_DEFAULTINPUTHANDLER_HXX
#define SVTOOLS_INC_TABLE_DEFAULTINPUTHANDLER_HXX
-#include <svtools/table/tableinputhandler.hxx>
+#include "svtools/table/tableinputhandler.hxx"
+#include "svtools/table/tabletypes.hxx"
-//........................................................................
+#include <boost/scoped_ptr.hpp>
+
+//......................................................................................................................
namespace svt { namespace table
{
-//........................................................................
+//......................................................................................................................
struct DefaultInputHandler_Impl;
- //====================================================================
+ //==================================================================================================================
//= DefaultInputHandler
- //====================================================================
+ //==================================================================================================================
class DefaultInputHandler : public ITableInputHandler
{
- friend class TableDataWindow;
private:
- DefaultInputHandler_Impl* m_pImpl;
- bool m_bResize;
+ ::boost::scoped_ptr< DefaultInputHandler_Impl > m_pImpl;
public:
DefaultInputHandler();
~DefaultInputHandler();
- virtual bool MouseMove ( IAbstractTableControl& _rControl, const MouseEvent& rMEvt );
- virtual bool MouseButtonDown ( IAbstractTableControl& _rControl, const MouseEvent& rMEvt );
- virtual bool MouseButtonUp ( IAbstractTableControl& _rControl, const MouseEvent& rMEvt );
- virtual bool KeyInput ( IAbstractTableControl& _rControl, const KeyEvent& rKEvt );
- virtual bool GetFocus ( IAbstractTableControl& _rControl );
- virtual bool LoseFocus ( IAbstractTableControl& _rControl );
- virtual bool RequestHelp ( IAbstractTableControl& _rControl, const HelpEvent& rHEvt );
- virtual bool Command ( IAbstractTableControl& _rControl, const CommandEvent& rCEvt );
- virtual bool PreNotify ( IAbstractTableControl& _rControl, NotifyEvent& rNEvt );
- virtual bool Notify ( IAbstractTableControl& _rControl, NotifyEvent& rNEvt );
+ virtual bool MouseMove ( ITableControl& _rControl, const MouseEvent& rMEvt );
+ virtual bool MouseButtonDown ( ITableControl& _rControl, const MouseEvent& rMEvt );
+ virtual bool MouseButtonUp ( ITableControl& _rControl, const MouseEvent& rMEvt );
+ virtual bool KeyInput ( ITableControl& _rControl, const KeyEvent& rKEvt );
+ virtual bool GetFocus ( ITableControl& _rControl );
+ virtual bool LoseFocus ( ITableControl& _rControl );
+ virtual bool RequestHelp ( ITableControl& _rControl, const HelpEvent& rHEvt );
+ virtual bool Command ( ITableControl& _rControl, const CommandEvent& rCEvt );
+ virtual bool PreNotify ( ITableControl& _rControl, NotifyEvent& rNEvt );
+ virtual bool Notify ( ITableControl& _rControl, NotifyEvent& rNEvt );
};
-//........................................................................
+//......................................................................................................................
} } // namespace svt::table
-//........................................................................
+//......................................................................................................................
#endif // SVTOOLS_INC_TABLE_DEFAULTINPUTHANDLER_HXX
diff --git a/svtools/inc/svtools/table/gridtablerenderer.hxx b/svtools/inc/svtools/table/gridtablerenderer.hxx
index e474306c0423..c472fa408574 100644
--- a/svtools/inc/svtools/table/gridtablerenderer.hxx
+++ b/svtools/inc/svtools/table/gridtablerenderer.hxx
@@ -29,6 +29,8 @@
#include <svtools/table/tablemodel.hxx>
+#include <boost/scoped_ptr.hpp>
+
//........................................................................
namespace svt { namespace table
{
@@ -43,14 +45,11 @@ namespace svt { namespace table
This class is able to paint a table grid, table headers, and cell
backgrounds according to the selected/active state of cells.
-
- TODO update the documentation when it's decided whether this renderer
- also does value handling
*/
class GridTableRenderer : public ITableRenderer
{
private:
- GridTableRenderer_Impl* m_pImpl;
+ ::boost::scoped_ptr< GridTableRenderer_Impl > m_pImpl;
public:
/** creates a table renderer associated with the given model
@@ -72,9 +71,17 @@ namespace svt { namespace table
This method returns the index of the last row which has been prepared
*/
- RowPos getCurrentRow();
+ RowPos getCurrentRow() const;
+
+ /** determines whether or not to paint grid lines
+ */
+ bool useGridLines() const;
- protected:
+ /** controls whether or not to paint grid lines
+ */
+ void useGridLines( bool const i_use );
+
+ public:
// ITableRenderer overridables
virtual void PaintHeaderArea(
OutputDevice& _rDevice, const Rectangle& _rArea,
@@ -89,17 +96,34 @@ namespace svt { namespace table
virtual void PaintRowHeader(
bool _bActive, bool _bSelected,
OutputDevice& _rDevice, const Rectangle& _rArea,
- const StyleSettings& _rStyle, rtl::OUString& _rText );
- virtual void PaintCellImage( ColPos _nColumn,
- bool _bActive, bool _bSelected,
- OutputDevice& _rDevice, const Rectangle& _rArea,
- const StyleSettings& _rStyle, Image* _pCellData );
- virtual void PaintCellString( ColPos _nColumn,
+ const StyleSettings& _rStyle );
+ virtual void PaintCell( ColPos const i_col,
bool _bActive, bool _bSelected,
OutputDevice& _rDevice, const Rectangle& _rArea,
- const StyleSettings& _rStyle, rtl::OUString& _rText );
+ const StyleSettings& _rStyle );
virtual void ShowCellCursor( Window& _rView, const Rectangle& _rCursorRect);
virtual void HideCellCursor( Window& _rView, const Rectangle& _rCursorRect);
+ virtual bool FitsIntoCell(
+ ::com::sun::star::uno::Any const & i_cellContent,
+ ColPos const i_colPos, RowPos const i_rowPos,
+ bool const i_active, bool const i_selected,
+ OutputDevice& i_targetDevice, Rectangle const & i_targetArea
+ );
+
+ private:
+ struct CellRenderContext;
+
+ void impl_paintCellContent(
+ CellRenderContext const & i_context
+ );
+ void impl_paintCellImage(
+ CellRenderContext const & i_context,
+ Image const & i_image
+ );
+ void impl_paintCellText(
+ CellRenderContext const & i_context,
+ ::rtl::OUString const & i_text
+ );
};
//........................................................................
} } // namespace svt::table
diff --git a/svtools/inc/svtools/table/tablecontrol.hxx b/svtools/inc/svtools/table/tablecontrol.hxx
index f3b7ed88b565..8afc2209227c 100644
--- a/svtools/inc/svtools/table/tablecontrol.hxx
+++ b/svtools/inc/svtools/table/tablecontrol.hxx
@@ -28,13 +28,16 @@
#define SVTOOLS_INC_TABLE_TABLECONTROL_HXX
#include "svtools/svtdllapi.h"
-#include <svtools/table/tablemodel.hxx>
+#include "svtools/table/tablemodel.hxx"
+#include "svtools/accessibletable.hxx"
+#include "svtools/accessiblefactory.hxx"
+
#include <vcl/ctrl.hxx>
#include <vcl/seleng.hxx>
-#include <svtools/table/tabledatawindow.hxx>
-#include <svtools/accessibletable.hxx>
-#include <com/sun/star/util/Color.hpp>
-#include <svtools/accessiblefactory.hxx>
+
+#include <boost/shared_ptr.hpp>
+#include <boost/scoped_ptr.hpp>
+
//........................................................................
namespace svt { namespace table
@@ -42,8 +45,6 @@ namespace svt { namespace table
//........................................................................
class TableControl_Impl;
- class TableDataWindow;
- class AccessibleTableControl_Impl;
//====================================================================
//= TableControl
@@ -63,31 +64,19 @@ namespace svt { namespace table
The control supports the concept of a <em>current</em> (or <em>active</em>
cell).
The control supports accessibility, this is encapsulated in IAccessibleTable
-
- // TODO: scrolling?
*/
class SVT_DLLPUBLIC TableControl : public Control, public IAccessibleTable
{
private:
- DECL_DLLPRIVATE_LINK( ImplMouseButtonDownHdl, MouseEvent* );
- DECL_DLLPRIVATE_LINK( ImplMouseButtonUpHdl, MouseEvent* );
+ ::boost::shared_ptr< TableControl_Impl > m_pImpl;
- DECL_DLLPRIVATE_LINK( ImplSelectHdl, void* );
- TableControl_Impl* m_pImpl;
- ::com::sun::star::uno::Sequence< sal_Int32 > m_nCols;
- ::com::sun::star::uno::Sequence< ::rtl::OUString > m_aText;
- Link m_aSelectHdl;
- bool m_bSelectionChanged;
- bool m_bTooltip;
public:
- ::std::auto_ptr< AccessibleTableControl_Impl > m_pAccessTable;
-
TableControl( Window* _pParent, WinBits _nStyle );
~TableControl();
/// sets a new table model
- SVT_DLLPRIVATE void SetModel( PTableModel _pModel );
+ void SetModel( PTableModel _pModel );
/// retrieves the current table model
PTableModel GetModel() const;
@@ -107,9 +96,8 @@ namespace svt { namespace table
*/
sal_Int32 GetCurrentRow() const;
- /** returns the row, which contains the input point*/
-
- ColPos GetCurrentRow (const Point& rPoint);
+ ITableControl&
+ getTableControlInterface();
/** retrieves the current column
@@ -125,7 +113,7 @@ namespace svt { namespace table
/** activates the cell at the given position
@return
- <TRUE/> if the move was successful, <FALSE/> otherwise. Usual
+ <sal_True/> if the move was successful, <FALSE/> otherwise. Usual
failure conditions include some other instance vetoing the move,
or impossibility to execute the move at all (for instance because
of invalid coordinates).
@@ -135,7 +123,7 @@ namespace svt { namespace table
/** moves the active cell to the given column, by keeping the active row
@return
- <TRUE/> if the move was successful, <FALSE/> otherwise. Usual
+ <sal_True/> if the move was successful, <FALSE/> otherwise. Usual
failure conditions include some other instance vetoing the move,
or impossibility to execute the move at all (for instance because
of invalid coordinates).
@@ -148,7 +136,7 @@ namespace svt { namespace table
/** moves the active cell to the given row, by keeping the active column
@return
- <TRUE/> if the move was successful, <FALSE/> otherwise. Usual
+ <sal_True/> if the move was successful, <FALSE/> otherwise. Usual
failure conditions include some other instance vetoing the move,
or impossibility to execute the move at all (for instance because
of invalid coordinates).
@@ -157,22 +145,17 @@ namespace svt { namespace table
{
return GoTo( GetCurrentColumn(), _nRow );
}
- SVT_DLLPRIVATE virtual void Resize();
- virtual void Select();
- SVT_DLLPRIVATE void SetSelectHdl( const Link& rLink ) { m_aSelectHdl = rLink; }
- const Link& GetSelectHdl() const { return m_aSelectHdl; }
- /**invalidates the table if table has been changed e.g. new row added
- */
- void InvalidateDataWindow(RowPos _nRowStart, RowPos _nRowEnd, bool _bRemoved);
- /**gets the vector, which contains the selected rows
- */
- std::vector<sal_Int32>& GetSelectedRows();
- /**after removing a row, updates the vector which contains the selected rows
- if the row, which should be removed, is selected, it will be erased from the vector
- */
- SelectionEngine* getSelEngine();
- TableDataWindow* getDataWindow();
+ SVT_DLLPRIVATE virtual void Resize();
+ virtual void Select();
+ void SetSelectHdl( const Link& rLink );
+ const Link& GetSelectHdl() const;
+
+ /**after removing a row, updates the vector which contains the selected rows
+ if the row, which should be removed, is selected, it will be erased from the vector
+ */
+ SelectionEngine* getSelEngine();
+ Window& getDataWindow();
// Window overridables
virtual void GetFocus();
@@ -180,55 +163,55 @@ namespace svt { namespace table
virtual void KeyInput( const KeyEvent& rKEvt );
virtual void StateChanged( StateChangedType i_nStateChange );
- /** Creates and returns the accessible object of the whole GridControl. */
- SVT_DLLPRIVATE virtual XACC CreateAccessible();
- SVT_DLLPRIVATE virtual XACC CreateAccessibleControl( sal_Int32 _nIndex );
- SVT_DLLPRIVATE virtual ::rtl::OUString GetAccessibleObjectName(AccessibleTableControlObjType eObjType, sal_Int32 _nRow, sal_Int32 _nCol) const;
- SVT_DLLPRIVATE virtual sal_Bool GoToCell( sal_Int32 _nColumnPos, sal_Int32 _nRow );
- SVT_DLLPRIVATE virtual ::rtl::OUString GetAccessibleObjectDescription(AccessibleTableControlObjType eObjType, sal_Int32 _nPosition = -1) const;
- virtual void FillAccessibleStateSet(
- ::utl::AccessibleStateSetHelper& rStateSet,
- AccessibleTableControlObjType eObjType ) const;
- //// Window
- virtual Rectangle GetWindowExtentsRelative( Window *pRelativeWindow ) const;
- virtual void GrabFocus();
- virtual XACC GetAccessible( BOOL bCreate = TRUE );
- virtual Window* GetAccessibleParentWindow() const;
- virtual Window* GetWindowInstance();
- virtual sal_Int32 GetAccessibleControlCount() const;
- virtual sal_Bool ConvertPointToControlIndex( sal_Int32& _rnIndex, const Point& _rPoint );
- virtual long GetRowCount() const;
- virtual long GetColumnCount() const;
- virtual sal_Bool HasRowHeader() const;
- virtual sal_Int32 GetSelectedRowCount() const;
- virtual bool IsRowSelected( long _nRow ) const;
- virtual sal_Bool ConvertPointToCellAddress( sal_Int32& _rnRow, sal_Int32& _rnColPos, const Point& _rPoint );
- virtual Rectangle calcHeaderRect( sal_Bool _bIsColumnBar, BOOL _bOnScreen = TRUE );
- virtual Rectangle calcTableRect( BOOL _bOnScreen = TRUE );
- virtual Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex);
- virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint);
- virtual void FillAccessibleStateSetForCell( ::utl::AccessibleStateSetHelper& _rStateSet, sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const;
- virtual ::rtl::OUString GetRowDescription( sal_Int32 _nRow ) const;
- virtual ::rtl::OUString GetRowName(sal_Int32 _nIndex) const;
- virtual ::rtl::OUString GetColumnDescription( sal_uInt16 _nColumnPos ) const;
- virtual ::rtl::OUString GetColumnName( sal_Int32 _nIndex ) const;
- virtual ::com::sun::star::uno::Any GetCellContent( sal_Int32 _nRowPos, sal_Int32 _nColPos) const;
- virtual sal_Bool HasRowHeader();
- virtual sal_Bool HasColHeader();
- virtual sal_Bool isAccessibleAlive( ) const;
- virtual void commitGridControlEvent( sal_Int16 _nEventId, const com::sun::star::uno::Any& _rNewValue, const com::sun::star::uno::Any& _rOldValue );
- virtual void RemoveSelectedRow(RowPos _nRowPos);
- virtual ::rtl::OUString GetAccessibleCellText(sal_Int32 _nRowPos, sal_Int32 _nColPos) const;
- ::com::sun::star::uno::Sequence< sal_Int32 >& getColumnsForTooltip();
- ::com::sun::star::uno::Sequence< ::rtl::OUString >& getTextForTooltip();
- void setTooltip(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aText, const ::com::sun::star::uno::Sequence< sal_Int32 >& nCols);
- void clearSelection();
- void selectionChanged(bool _bChanged);
- bool isTooltip();
-
- protected:
- /// retrieves the XAccessible implementation associated with the GridControl instance
- ::svt::IAccessibleFactory& getAccessibleFactory();
+ /** Creates and returns the accessible object of the whole GridControl. */
+ SVT_DLLPRIVATE virtual XACC CreateAccessible();
+ SVT_DLLPRIVATE virtual XACC CreateAccessibleControl( sal_Int32 _nIndex );
+ SVT_DLLPRIVATE virtual ::rtl::OUString GetAccessibleObjectName(AccessibleTableControlObjType eObjType, sal_Int32 _nRow, sal_Int32 _nCol) const;
+ SVT_DLLPRIVATE virtual sal_Bool GoToCell( sal_Int32 _nColumnPos, sal_Int32 _nRow );
+ SVT_DLLPRIVATE virtual ::rtl::OUString GetAccessibleObjectDescription(AccessibleTableControlObjType eObjType, sal_Int32 _nPosition = -1) const;
+ virtual void FillAccessibleStateSet(
+ ::utl::AccessibleStateSetHelper& rStateSet,
+ AccessibleTableControlObjType eObjType ) const;
+
+ // .............................................................................................................
+ // IAccessibleTable
+ virtual Rectangle GetWindowExtentsRelative( Window *pRelativeWindow ) const;
+ virtual void GrabFocus();
+ virtual XACC GetAccessible( sal_Bool bCreate = sal_True );
+ virtual Window* GetAccessibleParentWindow() const;
+ virtual Window* GetWindowInstance();
+ virtual sal_Int32 GetAccessibleControlCount() const;
+ virtual sal_Bool ConvertPointToControlIndex( sal_Int32& _rnIndex, const Point& _rPoint );
+ virtual long GetRowCount() const;
+ virtual long GetColumnCount() const;
+ virtual sal_Bool HasRowHeader() const;
+ virtual sal_Bool ConvertPointToCellAddress( sal_Int32& _rnRow, sal_Int32& _rnColPos, const Point& _rPoint );
+ virtual Rectangle calcHeaderRect( sal_Bool _bIsColumnBar, sal_Bool _bOnScreen = sal_True );
+ virtual Rectangle calcTableRect( sal_Bool _bOnScreen = sal_True );
+ virtual Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex);
+ virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint);
+ virtual void FillAccessibleStateSetForCell( ::utl::AccessibleStateSetHelper& _rStateSet, sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const;
+ virtual ::rtl::OUString GetRowDescription( sal_Int32 _nRow ) const;
+ virtual ::rtl::OUString GetRowName(sal_Int32 _nIndex) const;
+ virtual ::rtl::OUString GetColumnDescription( sal_uInt16 _nColumnPos ) const;
+ virtual ::rtl::OUString GetColumnName( sal_Int32 _nIndex ) const;
+ virtual ::com::sun::star::uno::Any GetCellContent( sal_Int32 _nRowPos, sal_Int32 _nColPos) const;
+ virtual sal_Bool HasRowHeader();
+ virtual sal_Bool HasColHeader();
+ virtual ::rtl::OUString GetAccessibleCellText(sal_Int32 _nRowPos, sal_Int32 _nColPos) const;
+
+ virtual sal_Int32 GetSelectedRowCount() const;
+ virtual sal_Int32 GetSelectedRowIndex( sal_Int32 const i_selectionIndex ) const;
+ virtual bool IsRowSelected( sal_Int32 const i_rowIndex ) const;
+ virtual void SelectRow( sal_Int32 const i_rowIndex, bool const i_select );
+ virtual void SelectAllRows( bool const i_select );
+ // .............................................................................................................
+
+ private:
+ DECL_DLLPRIVATE_LINK( ImplMouseButtonDownHdl, MouseEvent* );
+ DECL_DLLPRIVATE_LINK( ImplMouseButtonUpHdl, MouseEvent* );
+
+ DECL_DLLPRIVATE_LINK( ImplSelectHdl, void* );
private:
TableControl(); // never implemented
diff --git a/svtools/inc/svtools/table/tablecontrolinterface.hxx b/svtools/inc/svtools/table/tablecontrolinterface.hxx
new file mode 100644
index 000000000000..74e9688d01db
--- /dev/null
+++ b/svtools/inc/svtools/table/tablecontrolinterface.hxx
@@ -0,0 +1,254 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+************************************************************************/
+
+#ifndef SVTOOLS_INC_TABLE_ABSTRACTTABLECONTROL_HXX
+#define SVTOOLS_INC_TABLE_ABSTRACTTABLECONTROL_HXX
+
+#include <sal/types.h>
+#include <vcl/event.hxx>
+#include <vcl/seleng.hxx>
+
+#include "svtools/table/tabletypes.hxx"
+#include "svtools/table/tablemodel.hxx"
+
+class Pointer;
+
+//......................................................................................................................
+namespace svt { namespace table
+{
+//......................................................................................................................
+
+ //==================================================================================================================
+ //= TableControlAction
+ //==================================================================================================================
+ enum TableControlAction
+ {
+ /// moves the cursor in the table control one row up, if possible, by keeping the current column
+ cursorUp,
+ /// moves the cursor in the table control one row down, if possible, by keeping the current column
+ cursorDown,
+ /// moves the cursor in the table control one column to the left, if possible, by keeping the current row
+ cursorLeft,
+ /// moves the cursor in the table control one column to the right, if possible, by keeping the current row
+ cursorRight,
+ /// moves the cursor to the beginning of the current line
+ cursorToLineStart,
+ /// moves the cursor to the end of the current line
+ cursorToLineEnd,
+ /// moves the cursor to the first row, keeping the current column
+ cursorToFirstLine,
+ /// moves the cursor to the last row, keeping the current column
+ cursorToLastLine,
+ /// moves the cursor one page up, keeping the current column
+ cursorPageUp,
+ /// moves the cursor one page down, keeping the current column
+ cursorPageDown,
+ /// moves the cursor to the top-most, left-most cell
+ cursorTopLeft,
+ /// moves the cursor to the bottom-most, right-most cell
+ cursorBottomRight,
+ /// selects the row, where the actual cursor is
+ cursorSelectRow,
+ /// selects the rows, above the actual cursor is
+ cursorSelectRowUp,
+ /// selects the row, beneath the actual cursor is
+ cursorSelectRowDown,
+ /// selects the row, from the actual cursor till top
+ cursorSelectRowAreaTop,
+ /// selects the row, from the actual cursor till bottom
+ cursorSelectRowAreaBottom,
+
+ /// invalid and final enumeration value, not to be actually used
+ invalidTableControlAction
+ };
+
+ //==================================================================================================================
+ //= TableCellArea
+ //==================================================================================================================
+ enum TableCellArea
+ {
+ CellContent,
+ ColumnDivider
+ };
+
+ //==================================================================================================================
+ //= TableCell
+ //==================================================================================================================
+ struct TableCell
+ {
+ ColPos nColumn;
+ RowPos nRow;
+ TableCellArea eArea;
+
+ TableCell()
+ :nColumn( COL_INVALID )
+ ,nRow( ROW_INVALID )
+ ,eArea( CellContent )
+ {
+ }
+
+ TableCell( ColPos const i_column, RowPos const i_row )
+ :nColumn( i_column )
+ ,nRow( i_row )
+ ,eArea( CellContent )
+ {
+ }
+ };
+
+ //==================================================================================================================
+ //= ColumnMetrics
+ //==================================================================================================================
+ struct ColumnMetrics
+ {
+ /** the start of the column, in pixels. Might be negative, in case the column is scrolled out of the visible
+ area.
+ */
+ long nStartPixel;
+
+ /** the end of the column, in pixels, plus 1. Effectively, this is the accumulated width of a all columns
+ up to the current one.
+ */
+ long nEndPixel;
+
+ ColumnMetrics()
+ :nStartPixel(0)
+ ,nEndPixel(0)
+ {
+ }
+
+ ColumnMetrics( long const i_start, long const i_end )
+ :nStartPixel( i_start )
+ ,nEndPixel( i_end )
+ {
+ }
+ };
+
+ //==================================================================================================================
+ //= TableArea
+ //==================================================================================================================
+ enum TableArea
+ {
+ TableAreaColumnHeaders,
+ TableAreaRowHeaders,
+ TableAreaDataArea,
+ TableAreaAll
+ };
+
+ //==================================================================================================================
+ //= ITableControl
+ //==================================================================================================================
+ /** defines a callback interface to be implemented by a concrete table control
+ */
+ class SAL_NO_VTABLE ITableControl
+ {
+ public:
+ /** hides the cell cursor
+
+ The method cares for successive calls, that is, for every call to
+ ->hideCursor(), you need one call to ->showCursor. Only if the number
+ of both calls matches, the cursor is really shown.
+
+ @see showCursor
+ */
+ virtual void hideCursor() = 0;
+
+ /** shows the cell cursor
+
+ @see hideCursor
+ */
+ virtual void showCursor() = 0;
+
+ /** dispatches an action to the table control
+
+ @return
+ <TRUE/> if the action could be dispatched successfully, <FALSE/> otherwise. Usual
+ failure conditions include some other instance vetoing the action, or impossibility
+ to execute the action at all (for instance moving up one row when already positioned
+ on the very first row).
+
+ @see TableControlAction
+ */
+ virtual bool dispatchAction( TableControlAction _eAction ) = 0;
+
+ /** returns selection engine*/
+ virtual SelectionEngine* getSelEngine() = 0;
+
+ /** returns the table model
+
+ The returned model is guaranteed to not be <NULL/>.
+ */
+ virtual PTableModel getModel() const = 0;
+
+ /// returns the index of the currently active column
+ virtual ColPos getCurrentColumn() const = 0;
+
+ /// returns the index of the currently active row
+ virtual RowPos getCurrentRow() const = 0;
+
+ /// activates the given cell
+ virtual bool activateCell( ColPos const i_col, RowPos const i_row ) = 0;
+
+ /// retrieves the size of the table window, in pixels
+ virtual ::Size getTableSizePixel() const = 0;
+
+ /// sets a new mouse pointer for the table window
+ virtual void setPointer( Pointer const & i_pointer ) = 0;
+
+ /// captures the mouse to the table window
+ virtual void captureMouse() = 0;
+
+ /// releases the mouse, after it had previously been captured
+ virtual void releaseMouse() = 0;
+
+ /// invalidates the table window
+ virtual void invalidate( TableArea const i_what ) = 0;
+
+ /// calculates a width, given in pixels, into a AppFont-based width
+ virtual long pixelWidthToAppFont( long const i_pixels ) const = 0;
+
+ /// shows a trackign rectangle
+ virtual void showTracking( Rectangle const & i_location, sal_uInt16 const i_flags ) = 0;
+
+ /// hides a prviously shown tracking rectangle
+ virtual void hideTracking() = 0;
+
+ /// does a hit test for the given pixel coordinates
+ virtual TableCell hitTest( const Point& rPoint ) const = 0;
+
+ /// retrieves the metrics for a given column
+ virtual ColumnMetrics getColumnMetrics( ColPos const i_column ) const = 0;
+
+ /// determines whether a given row is selected
+ virtual bool isRowSelected( RowPos _nRow ) const = 0;
+
+ virtual ~ITableControl() {};
+ };
+
+//......................................................................................................................
+} } // namespace svt::table
+//......................................................................................................................
+
+#endif // SVTOOLS_INC_TABLE_ABSTRACTTABLECONTROL_HXX
diff --git a/svtools/inc/svtools/table/tableinputhandler.hxx b/svtools/inc/svtools/table/tableinputhandler.hxx
index 6d6af9f641bb..87803f03e240 100644
--- a/svtools/inc/svtools/table/tableinputhandler.hxx
+++ b/svtools/inc/svtools/table/tableinputhandler.hxx
@@ -40,7 +40,7 @@ namespace svt { namespace table
{
//........................................................................
- class IAbstractTableControl;
+ class ITableControl;
//====================================================================
//= ITableInputHandler
@@ -56,16 +56,16 @@ namespace svt { namespace table
// or whether it has been sufficiently handled by the ->ITableInputHandler instance
// (<FALSE/>).
- virtual bool MouseMove ( IAbstractTableControl& _rControl, const MouseEvent& rMEvt ) = 0;
- virtual bool MouseButtonDown ( IAbstractTableControl& _rControl, const MouseEvent& rMEvt ) = 0;
- virtual bool MouseButtonUp ( IAbstractTableControl& _rControl, const MouseEvent& rMEvt ) = 0;
- virtual bool KeyInput ( IAbstractTableControl& _rControl, const KeyEvent& rKEvt ) = 0;
- virtual bool GetFocus ( IAbstractTableControl& _rControl ) = 0;
- virtual bool LoseFocus ( IAbstractTableControl& _rControl ) = 0;
- virtual bool RequestHelp ( IAbstractTableControl& _rControl, const HelpEvent& rHEvt ) = 0;
- virtual bool Command ( IAbstractTableControl& _rControl, const CommandEvent& rCEvt ) = 0;
- virtual bool PreNotify ( IAbstractTableControl& _rControl, NotifyEvent& rNEvt ) = 0;
- virtual bool Notify ( IAbstractTableControl& _rControl, NotifyEvent& rNEvt ) = 0;
+ virtual bool MouseMove ( ITableControl& _rControl, const MouseEvent& rMEvt ) = 0;
+ virtual bool MouseButtonDown ( ITableControl& _rControl, const MouseEvent& rMEvt ) = 0;
+ virtual bool MouseButtonUp ( ITableControl& _rControl, const MouseEvent& rMEvt ) = 0;
+ virtual bool KeyInput ( ITableControl& _rControl, const KeyEvent& rKEvt ) = 0;
+ virtual bool GetFocus ( ITableControl& _rControl ) = 0;
+ virtual bool LoseFocus ( ITableControl& _rControl ) = 0;
+ virtual bool RequestHelp ( ITableControl& _rControl, const HelpEvent& rHEvt ) = 0;
+ virtual bool Command ( ITableControl& _rControl, const CommandEvent& rCEvt ) = 0;
+ virtual bool PreNotify ( ITableControl& _rControl, NotifyEvent& rNEvt ) = 0;
+ virtual bool Notify ( ITableControl& _rControl, NotifyEvent& rNEvt ) = 0;
virtual ~ITableInputHandler() { }
};
diff --git a/svtools/inc/svtools/table/tablemodel.hxx b/svtools/inc/svtools/table/tablemodel.hxx
index 3da396d9d86c..94f03b684e64 100644..100755
--- a/svtools/inc/svtools/table/tablemodel.hxx
+++ b/svtools/inc/svtools/table/tablemodel.hxx
@@ -28,16 +28,22 @@
#define SVTOOLS_INC_TABLE_TABLEMODEL_HXX
#include "svtools/svtdllapi.h"
-#include <svtools/table/tabletypes.hxx>
-#include <svtools/table/tablerenderer.hxx>
-#include <svtools/table/tableinputhandler.hxx>
-#include <rtl/ref.hxx>
-#include <sal/types.h>
+#include "svtools/table/tabletypes.hxx"
+#include "svtools/table/tablerenderer.hxx"
+#include "svtools/table/tableinputhandler.hxx"
+#include "svtools/table/tablesort.hxx"
+
#include <com/sun/star/util/Color.hpp>
-#include <boost/shared_ptr.hpp>
#include <com/sun/star/style/VerticalAlignment.hpp>
#include <com/sun/star/style/HorizontalAlignment.hpp>
+#include <rtl/ref.hxx>
+#include <sal/types.h>
+
+#include <boost/shared_ptr.hpp>
+#include <boost/optional.hpp>
+#include <boost/enable_shared_from_this.hpp>
+
//........................................................................
namespace svt { namespace table
{
@@ -45,19 +51,6 @@ namespace svt { namespace table
//====================================================================
- //= cell data
- //====================================================================
- struct TableContentType
- {
- ::rtl::OUString sContent;
- Image* pImage;
- TableContentType() :
- sContent(),
- pImage( )
- {
- }
- };
- //====================================================================
//= ScrollbarVisibility
//====================================================================
enum ScrollbarVisibility
@@ -78,13 +71,24 @@ namespace svt { namespace table
//====================================================================
//= ITableModelListener
//====================================================================
+ typedef sal_Int32 ColumnAttributeGroup;
+ #define COL_ATTRS_NONE (0x00000000)
+ /// denotes column attributes related to the width of the column
+ #define COL_ATTRS_WIDTH (0x00000001)
+ /// denotes column attributes related to the appearance of the column, i.e. those relevant for rendering
+ #define COL_ATTRS_APPEARANCE (0x00000002)
+ /// denotes the entirety of column attributes
+ #define COL_ATTRS_ALL (0x7FFFFFFF)
+
+ //====================================================================
+ //= ITableModelListener
+ //====================================================================
/** declares an interface to be implemented by components interested in
changes in an ->ITableModel
*/
- class SAL_NO_VTABLE ITableModelListener
+ class SAL_NO_VTABLE ITableModelListener : public ::boost::enable_shared_from_this< ITableModelListener >
{
public:
- //virtual void onTableModelChanged(PTableModel pTableModel) = 0;
/** notifies the listener that one or more rows have been inserted into
the table
@@ -100,7 +104,8 @@ namespace svt { namespace table
the table
@param first
- the old index of the first removed row
+ the old index of the first removed row. If this is <code>-1</code>, then all
+ rows have been removed from the model.
@param last
the old index of the last removed row. Must not be smaller
than ->first
@@ -116,27 +121,19 @@ namespace svt { namespace table
the index of the last newly inserted row. Must not be smaller
than ->first
*/
- virtual void columnsInserted( ColPos first, ColPos last ) = 0;
+ virtual void columnInserted( ColPos const i_colIndex ) = 0;
/** notifies the listener that one or more columns have been removed from
the table
- @param first
- the old index of the first removed row
- @param last
- the old index of the last removed row. Must not be smaller
- than ->first
+ @param i_colIndex
+ the old index of the removed column
*/
- virtual void columnsRemoved( ColPos first, ColPos last ) = 0;
-
- /** notifies the listener that a column in the table has moved
+ virtual void columnRemoved( ColPos const i_colIndex ) = 0;
- @param oldIndex
- the old index of the column within the model
- @param newIndex
- the new index of the column within the model
+ /** notifies the listener that all columns have been removed form the model
*/
- virtual void columnMoved( ColPos oldIndex, ColPos newIndex ) = 0;
+ virtual void allColumnsRemoved() = 0;
/** notifies the listener that a rectangular cell range in the table
has been updated
@@ -145,7 +142,24 @@ namespace svt { namespace table
they have about the cells in question, in particular any possibly
cached cell values.
*/
- virtual void cellsUpdated( ColPos firstCol, ColPos lastCol, RowPos firstRow, RowPos lastRow ) = 0;
+ virtual void cellsUpdated( ColPos const i_firstCol, ColPos i_lastCol, RowPos const i_firstRow, RowPos const i_lastRow ) = 0;
+
+ /** notifies the listener that attributes of a given column changed
+
+ @param i_column
+ the position of the column whose attributes changed
+ @param i_attributeGroup
+ a combination of one or more <code>COL_ATTRS_*</code> flags, denoting the attribute group(s)
+ in which changes occurred.
+ */
+ virtual void columnChanged( ColPos const i_column, ColumnAttributeGroup const i_attributeGroup ) = 0;
+
+ /** notifies the listener that the metrics of the table changed.
+
+ Metrics here include the column header height, the row header width, the row height, and the presence
+ of both the row and column header.
+ */
+ virtual void tableMetricsChanged() = 0;
/// deletes the listener instance
virtual ~ITableModelListener(){};
@@ -172,7 +186,8 @@ namespace svt { namespace table
@see setID
*/
- virtual ColumnID getID() const = 0;
+ virtual ::com::sun::star::uno::Any
+ getID() const = 0;
/** sets a new column ID
@@ -183,7 +198,7 @@ namespace svt { namespace table
@see getID
*/
- virtual bool setID( const ColumnID _nID ) = 0;
+ virtual void setID( const ::com::sun::star::uno::Any& _nID ) = 0;
/** returns the name of the column
@@ -200,7 +215,15 @@ namespace svt { namespace table
*/
virtual void setName( const String& _rName ) = 0;
- /** determines whether the column can be resized
+ /** retrieves the help text to be displayed for the column.
+ */
+ virtual String getHelpText() const = 0;
+
+ /** sets a new the help text to be displayed for the column.
+ */
+ virtual void setHelpText( const String& i_helpText ) = 0;
+
+ /** determines whether the column can be interactively resized
@see getMinWidth
@see getMaxWidth
@@ -216,40 +239,41 @@ namespace svt { namespace table
*/
virtual void setResizable( bool _bResizable ) = 0;
- /** returns the width of the column, in 1/100 millimeters
+ /** denotes the relative flexibility of the column
- The returned value must be a positive ->TableMetrics value.
+ This flexibility is taken into account when a table control auto-resizes its columns, because the available
+ space changed. In this case, the columns grow or shrink according to their flexibility.
- It can also be COLWIDTH_FIT_TO_VIEW, to indicate that the width of the column
- should automatically be adjusted to completely fit the view. For instance, a
- model's last column could return this value, to indicate that it is to occupy
- all horizontal space remaining in the view, after all other columns have been
- layouted.
+ A value of 0 means the column is not auto-resized at all.
+ */
+ virtual sal_Int32 getFlexibility() const = 0;
- If there is more than one column with width COLWIDTH_FIT_TO_VIEW in a model,
- they're all layouted equal-width.
+ /** sets a new flexibility value for the column
- If the columns with a read width (i.e. other than COLWIDTH_FIT_TO_VIEW) are,
- in sum, wider than the view, then the view is free to choose a real width for any
- columns which return COLWIDTH_FIT_TO_VIEW here.
+ @see getFlexibility
+ */
+ virtual void setFlexibility( sal_Int32 const i_flexibility ) = 0;
+
+ /** returns the width of the column, in app-font unitss
+
+ The returned value must be a positive ->TableMetrics value.
@see setWidth
@see getMinWidth
@see getMaxWidth
- @see COLWIDTH_FIT_TO_VIEW
*/
virtual TableMetrics getWidth() const = 0;
/** sets a new width for the column
@param _nWidth
- the new width, in 1/100 millimeters
+ the new width, app-font units
@see getWidth
*/
virtual void setWidth( TableMetrics _nWidth ) = 0;
- /** returns the minimum width of the column, in 1/100 millimeters, or 0 if the column
+ /** returns the minimum width of the column, in app-font units, or 0 if the column
does not have a minimal width
@see setMinWidth
@@ -258,7 +282,7 @@ namespace svt { namespace table
*/
virtual TableMetrics getMinWidth() const = 0;
- /** sets the minimum width of the column, in 1/100 millimeters
+ /** sets the minimum width of the column, in app-font units
@see getMinWidth
@see setMaxWidth
@@ -266,7 +290,7 @@ namespace svt { namespace table
*/
virtual void setMinWidth( TableMetrics _nMinWidth ) = 0;
- /** returns the maximum width of the column, in 1/100 millimeters, or 0 if the column
+ /** returns the maximum width of the column, in app-font units, or 0 if the column
does not have a minimal width
@see setMaxWidth
@@ -275,7 +299,7 @@ namespace svt { namespace table
*/
virtual TableMetrics getMaxWidth() const = 0;
- /** sets the maximum width of the column, in 1/100 millimeters
+ /** sets the maximum width of the column, in app-font units
@see getMaxWidth
@see setMinWidth
@@ -283,24 +307,14 @@ namespace svt { namespace table
*/
virtual void setMaxWidth( TableMetrics _nMaxWidth ) = 0;
- /** returns the preferred width of the column, or 0 if the column
- does not have a preferred width.
-
- @see setMaxWidth
- @see getMinWidth
- @see getWidth
+ /** retrieves the horizontal alignment to be used for content in this cell
*/
- virtual TableMetrics getPreferredWidth() const = 0;
- /** sets the preferred width of the column, to be used when user resizes column
+ virtual ::com::sun::star::style::HorizontalAlignment getHorizontalAlign() = 0;
- @see getMaxWidth
- @see setMinWidth
- @see setWidth
+ /** sets a new the horizontal alignment to be used for content in this cell
*/
- virtual void setPreferredWidth( TableMetrics _nPrefWidth ) = 0;
-
- virtual ::com::sun::star::style::HorizontalAlignment getHorizontalAlign() = 0;
virtual void setHorizontalAlign(::com::sun::star::style::HorizontalAlignment _xAlign) = 0;
+
/// deletes the column model instance
virtual ~IColumnModel() { }
};
@@ -322,9 +336,6 @@ namespace svt { namespace table
*/
virtual TableSize getRowCount() const = 0;
- SVT_DLLPRIVATE virtual void setColumnCount(TableSize _nColCount) = 0;
- SVT_DLLPRIVATE virtual void setRowCount(TableSize _nRowCount) = 0;
-
/** determines whether the table has column headers
If this method returns <TRUE/>, the renderer returned by
@@ -333,15 +344,6 @@ namespace svt { namespace table
@see IColumnRenderer
*/
virtual bool hasColumnHeaders() const = 0;
- /** sets whether the table should have row headers
- @see IColumnRenderer
- */
- SVT_DLLPRIVATE virtual void setRowHeaders( bool rowHeaders) = 0;
-
- /** sets whether the table should have column headers
- @see IColumnRenderer
- */
- SVT_DLLPRIVATE virtual void setColumnHeaders( bool columnHeaders) = 0;
/** determines whether the table has row headers
@@ -359,14 +361,6 @@ namespace svt { namespace table
*/
virtual bool isCellEditable( ColPos col, RowPos row ) const = 0;
- /** adds the given listener to the list of ->ITableModelListener's
- */
- SVT_DLLPRIVATE virtual void addTableModelListener( const PTableModelListener& listener ) = 0;
-
- /** revokes the given listener from the list of ->ITableModelListener's
- */
- SVT_DLLPRIVATE virtual void removeTableModelListener( const PTableModelListener& listener ) = 0;
-
/** returns a model for a certain column
@param column
@@ -375,27 +369,15 @@ namespace svt { namespace table
@return
the model of the column in question. Must not be <NULL/>
-
- @see getColumnModelByID
*/
virtual PColumnModel getColumnModel( ColPos column ) = 0;
- /** finds a column model by ID
-
- @param id
- the id of the column which is to be looked up
- @return
- the column model with the given ID, or <NULL/> if there is
- no such column
- */
- virtual PColumnModel getColumnModelByID( ColumnID id ) = 0;
-
/** returns a renderer which is able to paint the table represented
by this table model
@return the renderer to use. Must not be <NULL/>
*/
- SVT_DLLPRIVATE virtual PTableRenderer getRenderer() const = 0;
+ virtual PTableRenderer getRenderer() const = 0;
/** returns the component handling input in a view associated with the model
*/
@@ -404,12 +386,10 @@ namespace svt { namespace table
/** determines the height of rows in the table.
@return
- the logical height of rows in the table, in 1/100 millimeters. The height must be
+ the logical height of rows in the table, in app-font units. The height must be
greater 0.
*/
- SVT_DLLPRIVATE virtual TableMetrics getRowHeight() const = 0;
-
- SVT_DLLPRIVATE virtual void setRowHeight(TableMetrics _nRowHeight) = 0;
+ virtual TableMetrics getRowHeight() const = 0;
/** determines the height of the column header row
@@ -417,10 +397,10 @@ namespace svt { namespace table
returned <FALSE/>.
@return
- the logical height of the column header row, in 1/100 millimeters.
+ the logical height of the column header row, in app-font units.
Must be greater than 0.
*/
- SVT_DLLPRIVATE virtual TableMetrics getColumnHeaderHeight() const = 0;
+ virtual TableMetrics getColumnHeaderHeight() const = 0;
/** determines the width of the row header column
@@ -428,48 +408,105 @@ namespace svt { namespace table
returned <FALSE/>.
@return
- the logical width of the row header column, in 1/100 millimeters.
+ the logical width of the row header column, in app-font units.
Must be greater than 0.
*/
- SVT_DLLPRIVATE virtual TableMetrics getRowHeaderWidth() const = 0;
+ virtual TableMetrics getRowHeaderWidth() const = 0;
- /** determines the visibility of the vertical scrollbar of the table control
- @param overAllHeight the height of the table with all rows
- @param actHeight the given height of the table
+ /** returns the visibilit mode of the vertical scrollbar
*/
- virtual ScrollbarVisibility getVerticalScrollbarVisibility(int overAllHeight,int actHeight) const = 0;
+ virtual ScrollbarVisibility getVerticalScrollbarVisibility() const = 0;
- /** determines the visibility of the horizontal scrollbar of the table control
- @param overAllWidth the width of the table with all columns
- @param actWidth the given width of the table
+ /** returns the visibilit mode of the horizontal scrollbar
*/
- virtual ScrollbarVisibility getHorizontalScrollbarVisibility(int overAllWidth, int actWidth) const = 0;
- virtual bool hasVerticalScrollbar() =0;
- virtual bool hasHorizontalScrollbar() = 0;
- /** fills cells with content
- */
- virtual void setCellContent(const std::vector< std::vector< ::com::sun::star::uno::Any > >& cellContent)=0;
- /** gets the content of the cells
- */
- virtual std::vector< std::vector< ::com::sun::star::uno::Any > >& getCellContent() = 0;
- /**sets title of header rows
- */
- SVT_DLLPRIVATE virtual void setRowHeaderName(const std::vector<rtl::OUString>& cellColumnContent)=0;
- /** gets title of header rows
- */
- virtual std::vector<rtl::OUString>& getRowHeaderName() = 0;
- SVT_DLLPRIVATE virtual ::com::sun::star::util::Color getLineColor() = 0;
- SVT_DLLPRIVATE virtual void setLineColor(::com::sun::star::util::Color _rColor) = 0;
- SVT_DLLPRIVATE virtual ::com::sun::star::util::Color getHeaderBackgroundColor() = 0;
- SVT_DLLPRIVATE virtual void setHeaderBackgroundColor(::com::sun::star::util::Color _rColor) = 0;
- SVT_DLLPRIVATE virtual ::com::sun::star::util::Color getTextColor() = 0;
- SVT_DLLPRIVATE virtual void setTextColor(::com::sun::star::util::Color _rColor) = 0;
- SVT_DLLPRIVATE virtual ::com::sun::star::util::Color getOddRowBackgroundColor() = 0;
- SVT_DLLPRIVATE virtual void setOddRowBackgroundColor(::com::sun::star::util::Color _rColor) = 0;
- SVT_DLLPRIVATE virtual ::com::sun::star::util::Color getEvenRowBackgroundColor() = 0;
- SVT_DLLPRIVATE virtual void setEvenRowBackgroundColor(::com::sun::star::util::Color _rColor) = 0;
- SVT_DLLPRIVATE virtual ::com::sun::star::style::VerticalAlignment getVerticalAlign() = 0;
- SVT_DLLPRIVATE virtual void setVerticalAlign(::com::sun::star::style::VerticalAlignment _xAlign) = 0;
+ virtual ScrollbarVisibility getHorizontalScrollbarVisibility() const = 0;
+
+ /** adds a listener to be notified of changes in the table model
+ */
+ virtual void addTableModelListener( const PTableModelListener& i_listener ) = 0;
+
+ /** remove a listener to be notified of changes in the table model
+ */
+ virtual void removeTableModelListener( const PTableModelListener& i_listener ) = 0;
+
+ /** retrieves the content of the given cell
+ */
+ virtual void getCellContent( ColPos const i_col, RowPos const i_row, ::com::sun::star::uno::Any& o_cellContent ) = 0;
+
+ /** returns an object which should be displayed as tooltip for the given cell
+
+ At the moment, only string-convertible values are supported here. In the future, one might imagine displaying
+ scaled-down versions of a graphic in a cell, and a larger version of that very graphic as tooltip.
+
+ If no tooltip object is provided, then the cell content is used, and displayed as tooltip for the cell
+ if and only if it doesn't fit into the cell's space itself.
+
+ @param i_col
+ The column index of the cell in question. COL_ROW_HEADERS is a valid argument here.
+ @param i_row
+ The row index of the cell in question.
+ @param o_cellToolTip
+ takes the tooltip object upon return.
+ */
+ virtual void getCellToolTip( ColPos const i_col, RowPos const i_row, ::com::sun::star::uno::Any & o_cellToolTip ) = 0;
+
+ /** retrieves title of a given row
+ */
+ virtual ::com::sun::star::uno::Any getRowHeading( RowPos const i_rowPos ) const = 0;
+
+ /** returns the color to be used for rendering the grid lines.
+
+ If this value is not set, a default color from the style settings will be used.
+ */
+ virtual ::boost::optional< ::Color > getLineColor() const = 0;
+
+ /** returns the color to be used for rendering the header background.
+
+ If this value is not set, a default color from the style settings will be used.
+ */
+ virtual ::boost::optional< ::Color > getHeaderBackgroundColor() const = 0;
+
+ /** returns the color to be used for rendering the header text.
+
+ If this value is not set, a default color from the style settings will be used.
+ */
+ virtual ::boost::optional< ::Color > getHeaderTextColor() const = 0;
+
+ /** returns the color to be used for rendering cell texts.
+
+ If this value is not set, a default color from the style settings will be used.
+ */
+ virtual ::boost::optional< ::Color > getTextColor() const = 0;
+
+ /** returns the color to be used for text lines (underline, strikethrough) when rendering cell text.
+
+ If this value is not set, a default color from the style settings will be used.
+ */
+ virtual ::boost::optional< ::Color > getTextLineColor() const = 0;
+
+ /** returns the colors to be used for the row backgrounds.
+
+ If this value is not set, every second row will have a background color derived from the style settings's
+ selection color, the other rows will not have a special background at all.
+
+ If this value is an empty sequence, the rows will not have a special background at all, instead the
+ normal background of the complete control will be used.
+
+ If value is a non-empty sequence, then rows will have the background colors as specified in the sequence,
+ in alternating order.
+ */
+ virtual ::boost::optional< ::std::vector< ::Color > >
+ getRowBackgroundColors() const = 0;
+
+ /** determines the vertical alignment of content within a cell
+ */
+ virtual ::com::sun::star::style::VerticalAlignment getVerticalAlign() const = 0;
+
+ /** returns an adapter to the sorting functionality of the model
+
+ It is legitimate to return <NULL/> here, in this case, the table model does not support sorting.
+ */
+ virtual ITableDataSort* getSortAdapter() = 0;
/// destroys the table model instance
virtual ~ITableModel() { }
diff --git a/svtools/inc/svtools/table/tablerenderer.hxx b/svtools/inc/svtools/table/tablerenderer.hxx
index f81771dd22e6..3d50c9d70ee7 100644
--- a/svtools/inc/svtools/table/tablerenderer.hxx
+++ b/svtools/inc/svtools/table/tablerenderer.hxx
@@ -46,6 +46,7 @@ namespace svt { namespace table
class SAL_NO_VTABLE ITableRenderer
{
public:
+
/** paints a (part of) header area
There are two header areas in a table control:
@@ -175,12 +176,10 @@ namespace svt { namespace table
the are into which the row header should be painted
@param _rStyle
the style to be used for drawing
- @param _rText
- the title of the header row
*/
virtual void PaintRowHeader( bool _bActive, bool _bSelected,
OutputDevice& _rDevice, const Rectangle& _rArea,
- const StyleSettings& _rStyle, rtl::OUString& _rText ) = 0;
+ const StyleSettings& _rStyle ) = 0;
/** paints a certain cell
@@ -207,46 +206,11 @@ namespace svt { namespace table
the are into which the cell should be painted
@param _rStyle
the style to be used for drawing
- @param _pCellData
- the content of the cell
*/
- virtual void PaintCellImage( ColPos _nColumn,
+ virtual void PaintCell( ColPos const i_col,
bool _bActive, bool _bSelected,
OutputDevice& _rDevice, const Rectangle& _rArea,
- const StyleSettings& _rStyle, Image* _pCellData ) = 0;
-
- /** paints a certain cell
-
- The row to be painted is denoted by the most recent call to
- ->PrepareRow.
-
- @param _bSelected
- <TRUE/> if and only if the cell to be painted is
- selected currently. This is the case if either
- the row or the column of the cell is currently selected.
- <br/>
- Note that this flag is equal to the respective flag in the
- previous ->PrepareRow call, it's passed here for convinience
- only.
- @param _bActive
- <TRUE/> if the cell is currently active.
- <br/>
- Note that this flag is equal to the respective flag in the
- previous ->PrepareRow call, it's passed here for convinience
- only.
- @param _rDevice
- denotes the device to paint onto
- @param _rArea
- the are into which the cell should be painted
- @param _rStyle
- the style to be used for drawing
- @param _rText
- the content of the cell
- */
- virtual void PaintCellString( ColPos _nColumn,
- bool _bActive, bool _bSelected,
- OutputDevice& _rDevice, const Rectangle& _rArea,
- const StyleSettings& _rStyle, rtl::OUString& _rText ) = 0;
+ const StyleSettings& _rStyle ) = 0;
/** draws a cell cursor in the given rectangle
@@ -262,6 +226,41 @@ namespace svt { namespace table
*/
virtual void HideCellCursor( Window& _rView, const Rectangle& _rCursorRect) = 0;
+ /** checks whether a given cell content fits into a given target area on a given device.
+
+ @param i_colPos
+ denotes the column which the cell content would be painted into. Your renderer implementation
+ would only need this parameter if rendering is done differently for different columns.
+
+ @param i_rowPos
+ denotes the row which the cell content would be painted into. Your renderer implementation
+ would only need this parameter if rendering is done differently for different rows.
+
+ @param i_active
+ is <TRUE/> if and only if the renderer should assume the cell content would be painted for the active
+ cell.
+
+ @param i_selected
+ is <TRUE/> if and only if the renderer should assume the cell content would be painted for a selected
+ cell.
+
+ @param i_targetDevice
+ denotes the target device for the assumed rendering operation
+
+ @param i_targetArea
+ denotes the area within the target device for the assumed rendering operation.
+
+ @return
+ <TRUE/> if and only if the given cell content could be rendered into the given device and the
+ given area.
+ */
+ virtual bool FitsIntoCell(
+ ::com::sun::star::uno::Any const & i_cellContent,
+ ColPos const i_colPos, RowPos const i_rowPos,
+ bool const i_active, bool const i_selected,
+ OutputDevice& i_targetDevice, Rectangle const & i_targetArea
+ ) = 0;
+
/// deletes the renderer instance
virtual ~ITableRenderer() { }
};
diff --git a/svtools/inc/svtools/table/tablesort.hxx b/svtools/inc/svtools/table/tablesort.hxx
new file mode 100755
index 000000000000..1690b4d51344
--- /dev/null
+++ b/svtools/inc/svtools/table/tablesort.hxx
@@ -0,0 +1,91 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SVTOOLS_TABLESORT_HXX
+#define SVTOOLS_TABLESORT_HXX
+
+#include "svtools/table/tabletypes.hxx"
+
+//......................................................................................................................
+namespace svt { namespace table
+{
+//......................................................................................................................
+
+ //==================================================================================================================
+ //= ColumnSortDirection
+ //==================================================================================================================
+ enum ColumnSortDirection
+ {
+ ColumnSortAscending,
+ ColumnSortDescending
+ };
+
+ //==================================================================================================================
+ //= ColumnSort
+ //==================================================================================================================
+ struct ColumnSort
+ {
+ ColPos nColumnPos;
+ ColumnSortDirection eSortDirection;
+
+ ColumnSort()
+ :nColumnPos( COL_INVALID )
+ ,eSortDirection( ColumnSortAscending )
+ {
+ }
+
+ ColumnSort( ColPos const i_columnPos, ColumnSortDirection const i_sortDirection )
+ :nColumnPos( i_columnPos )
+ ,eSortDirection( i_sortDirection )
+ {
+ }
+ };
+
+ //==================================================================================================================
+ //= ITableDataSort
+ //==================================================================================================================
+ /** provides sorting functionality for the datta underlying an ITableModel
+ */
+ class SAL_NO_VTABLE ITableDataSort
+ {
+ public:
+ /** sorts the rows in the model by the given column's data, in the given direction.
+ */
+ virtual void sortByColumn( ColPos const i_column, ColumnSortDirection const i_sortDirection ) = 0;
+
+ /** retrieves the current sort order of the data
+
+ If the <code>nColumnIndex</code> member of the returned srtructure is <code>COL_INVALID</code>, then
+ the data is currently not sorted.
+ */
+ virtual ColumnSort getCurrentSortOrder() const = 0;
+ };
+
+//......................................................................................................................
+} } // namespace svt::table
+//......................................................................................................................
+
+#endif // SVTOOLS_TABLESORT_HXX
diff --git a/svtools/inc/svtools/table/tabletypes.hxx b/svtools/inc/svtools/table/tabletypes.hxx
index 645120e30d4b..ae20851992e3 100644
--- a/svtools/inc/svtools/table/tabletypes.hxx
+++ b/svtools/inc/svtools/table/tabletypes.hxx
@@ -49,14 +49,7 @@ namespace svt { namespace table
*/
typedef sal_Int32 AnyPos;
- /// the ID of a column in a table
- typedef sal_Int32 ColumnID;
-
typedef sal_Int32 TableMetrics;
-/** special column width value which indicates that the column should be
- automatically resized to fit the view
-*/
-#define COLWIDTH_FIT_TO_VIEW ((::svt::table::TableMetrics)-1)
/// denotes the column containing the row headers
#define COL_ROW_HEADERS ((::svt::table::ColPos)-1)
diff --git a/svtools/inc/svtools/taskbar.hxx b/svtools/inc/svtools/taskbar.hxx
index d4a6699e2d5e..b254473c7f19 100644
--- a/svtools/inc/svtools/taskbar.hxx
+++ b/svtools/inc/svtools/taskbar.hxx
@@ -150,11 +150,11 @@ public:
virtual void RequestHelp( const HelpEvent& rHEvt );
- void InsertButton( USHORT nItemId,
+ void InsertButton( sal_uInt16 nItemId,
const Image& rImage, const String& rText,
- USHORT nPos = TOOLBOX_APPEND )
+ sal_uInt16 nPos = TOOLBOX_APPEND )
{ InsertItem( nItemId, rImage, rText, TIB_LEFT | TIB_AUTOSIZE, nPos ); }
- void RemoveButton( USHORT nItemId )
+ void RemoveButton( sal_uInt16 nItemId )
{ RemoveItem( nItemId ); }
};
@@ -162,7 +162,7 @@ public:
// - TaskToolBox-Types -
// ---------------------
-#define TASKTOOLBOX_TASK_NOTFOUND ((USHORT)0xFFFF)
+#define TASKTOOLBOX_TASK_NOTFOUND ((sal_uInt16)0xFFFF)
// ---------------
// - TaskToolBox -
@@ -176,18 +176,18 @@ private:
ImplTaskItemList* mpItemList;
TaskBar* mpNotifyTaskBar;
Point maContextMenuPos;
- ULONG mnOldItemCount;
+ sal_uLong mnOldItemCount;
long mnMaxTextWidth;
long mnDummy1;
- USHORT mnUpdatePos;
- USHORT mnUpdateNewPos;
- USHORT mnActiveItemId;
- USHORT mnNewActivePos;
- USHORT mnTaskItem;
- USHORT mnSmallItem;
- USHORT mnDummy2;
- BOOL mbMinActivate;
- BOOL mbDummy1;
+ sal_uInt16 mnUpdatePos;
+ sal_uInt16 mnUpdateNewPos;
+ sal_uInt16 mnActiveItemId;
+ sal_uInt16 mnNewActivePos;
+ sal_uInt16 mnTaskItem;
+ sal_uInt16 mnSmallItem;
+ sal_uInt16 mnDummy2;
+ sal_Bool mbMinActivate;
+ sal_Bool mbDummy1;
Link maActivateTaskHdl;
Link maContextMenuHdl;
@@ -203,9 +203,9 @@ public:
TaskToolBox( Window* pParent, WinBits nWinStyle = 0 );
~TaskToolBox();
- void ActivateTaskItem( USHORT nItemId,
- BOOL bMinActivate = FALSE );
- USHORT GetTaskItem( const Point& rPos ) const;
+ void ActivateTaskItem( sal_uInt16 nItemId,
+ sal_Bool bMinActivate = sal_False );
+ sal_uInt16 GetTaskItem( const Point& rPos ) const;
virtual void ActivateTask();
virtual void ContextMenu();
@@ -219,12 +219,12 @@ public:
void StartUpdateTask();
void UpdateTask( const Image& rImage, const String& rText,
- BOOL bActive = FALSE );
+ sal_Bool bActive = sal_False );
void EndUpdateTask();
const Point& GetContextMenuPos() const { return maContextMenuPos; }
- USHORT GetTaskItem() const { return mnTaskItem; }
- BOOL IsMinActivate() const { return mbMinActivate; }
+ sal_uInt16 GetTaskItem() const { return mnTaskItem; }
+ sal_Bool IsMinActivate() const { return mbMinActivate; }
void SetActivateTaskHdl( const Link& rLink ) { maActivateTaskHdl = rLink; }
const Link& GetActivateTaskHdl() const { return maActivateTaskHdl; }
@@ -232,9 +232,9 @@ public:
const Link& GetContextMenuHdl() const { return maContextMenuHdl; }
};
-inline USHORT TaskToolBox::GetTaskItem( const Point& rPos ) const
+inline sal_uInt16 TaskToolBox::GetTaskItem( const Point& rPos ) const
{
- USHORT nId = GetItemId( rPos );
+ sal_uInt16 nId = GetItemId( rPos );
if ( nId )
return nId-1;
else
@@ -248,18 +248,18 @@ inline USHORT TaskToolBox::GetTaskItem( const Point& rPos ) const
class ITaskStatusNotify
{
public:
- virtual BOOL MouseButtonDown( USHORT nItemd, const MouseEvent& rMEvt );
- virtual BOOL MouseButtonUp( USHORT nItemd, const MouseEvent& rMEvt );
- virtual BOOL MouseMove( USHORT nItemd, const MouseEvent& rMEvt );
- virtual BOOL Command( USHORT nItemd, const CommandEvent& rCEvt );
- virtual BOOL UpdateHelp( USHORT nItemd );
+ virtual sal_Bool MouseButtonDown( sal_uInt16 nItemd, const MouseEvent& rMEvt );
+ virtual sal_Bool MouseButtonUp( sal_uInt16 nItemd, const MouseEvent& rMEvt );
+ virtual sal_Bool MouseMove( sal_uInt16 nItemd, const MouseEvent& rMEvt );
+ virtual sal_Bool Command( sal_uInt16 nItemd, const CommandEvent& rCEvt );
+ virtual sal_Bool UpdateHelp( sal_uInt16 nItemd );
};
// -----------------------
// - TaskStatusFieldItem -
// -----------------------
-#define TASKSTATUSFIELDITEM_FLASH ((USHORT)0x0001)
+#define TASKSTATUSFIELDITEM_FLASH ((sal_uInt16)0x0001)
class TaskStatusFieldItem
{
@@ -269,7 +269,7 @@ private:
XubString maQuickHelpText;
XubString maHelpText;
rtl::OString maHelpId;
- USHORT mnFlags;
+ sal_uInt16 mnFlags;
public:
TaskStatusFieldItem();
@@ -278,7 +278,7 @@ public:
const Image& rImage,
const XubString& rQuickHelpText,
const XubString& rHelpText,
- USHORT nFlags );
+ sal_uInt16 nFlags );
~TaskStatusFieldItem();
void SetNotifyObject( ITaskStatusNotify* pNotify ) { mpNotify = pNotify; }
@@ -291,8 +291,8 @@ public:
const XubString& GetHelpText() const { return maHelpText; }
void SetHelpId( const rtl::OString& rHelpId ) { maHelpId = rHelpId; }
const rtl::OString& GetHelpId() const { return maHelpId; }
- void SetFlags( USHORT nFlags ) { mnFlags = nFlags; }
- USHORT GetFlags() const { return mnFlags; }
+ void SetFlags( sal_uInt16 nFlags ) { mnFlags = nFlags; }
+ sal_uInt16 GetFlags() const { return mnFlags; }
const TaskStatusFieldItem& operator=( const TaskStatusFieldItem& rItem );
};
@@ -301,10 +301,10 @@ public:
// - TaskStatusBar -
// -----------------
-#define TASKSTATUSBAR_STATUSFIELDID ((USHORT)61000)
+#define TASKSTATUSBAR_STATUSFIELDID ((sal_uInt16)61000)
-#define TASKSTATUSBAR_CLOCKID ((USHORT)61000)
-#define TASKSTATUSFIELD_CLOCK ((USHORT)0x0001)
+#define TASKSTATUSBAR_CLOCKID ((sal_uInt16)61000)
+#define TASKSTATUSFIELD_CLOCK ((sal_uInt16)0x0001)
class SVT_DLLPUBLIC TaskStatusBar : public StatusBar
{
@@ -320,19 +320,19 @@ private:
long mnClockWidth;
long mnItemWidth;
long mnFieldWidth;
- USHORT mnFieldFlags;
- USHORT mnDummy1;
- BOOL mbFlashItems;
- BOOL mbOutInterval;
- BOOL mbDummy1;
- BOOL mbDummy2;
+ sal_uInt16 mnFieldFlags;
+ sal_uInt16 mnDummy1;
+ sal_Bool mbFlashItems;
+ sal_Bool mbOutInterval;
+ sal_Bool mbDummy1;
+ sal_Bool mbDummy2;
#ifdef _TASKBAR_CXX
- SVT_DLLPRIVATE ImplTaskSBFldItem* ImplGetFieldItem( USHORT nItemId ) const;
- SVT_DLLPRIVATE ImplTaskSBFldItem* ImplGetFieldItem( const Point& rPos, BOOL& rFieldRect ) const;
- SVT_DLLPRIVATE BOOL ImplUpdateClock();
- SVT_DLLPRIVATE BOOL ImplUpdateFlashItems();
- SVT_DLLPRIVATE void ImplUpdateField( BOOL bItems );
+ SVT_DLLPRIVATE ImplTaskSBFldItem* ImplGetFieldItem( sal_uInt16 nItemId ) const;
+ SVT_DLLPRIVATE ImplTaskSBFldItem* ImplGetFieldItem( const Point& rPos, sal_Bool& rFieldRect ) const;
+ SVT_DLLPRIVATE sal_Bool ImplUpdateClock();
+ SVT_DLLPRIVATE sal_Bool ImplUpdateFlashItems();
+ SVT_DLLPRIVATE void ImplUpdateField( sal_Bool bItems );
DECL_DLLPRIVATE_LINK( ImplTimerHdl, Timer* );
#endif
@@ -348,20 +348,20 @@ public:
virtual void UserDraw( const UserDrawEvent& rUDEvt );
void InsertStatusField( long nOffset = STATUSBAR_OFFSET,
- USHORT nPos = STATUSBAR_APPEND,
- USHORT nFlags = TASKSTATUSFIELD_CLOCK );
+ sal_uInt16 nPos = STATUSBAR_APPEND,
+ sal_uInt16 nFlags = TASKSTATUSFIELD_CLOCK );
void RemoveStatusField()
{ maTimer.Stop(); RemoveItem( TASKSTATUSBAR_STATUSFIELDID ); }
- void SetFieldFlags( USHORT nFlags );
- USHORT GetFieldFlags() const { return mnFieldFlags; }
+ void SetFieldFlags( sal_uInt16 nFlags );
+ sal_uInt16 GetFieldFlags() const { return mnFieldFlags; }
void SetNotifyObject( ITaskStatusNotify* pNotify ) { mpNotify = pNotify; }
ITaskStatusNotify* GetNotifyObject() const { return mpNotify; }
- void AddStatusFieldItem( USHORT nItemId, const TaskStatusFieldItem& rItem,
- USHORT nPos = 0xFFFF );
- void ModifyStatusFieldItem( USHORT nItemId, const TaskStatusFieldItem& rItem );
- void RemoveStatusFieldItem( USHORT nItemId );
- BOOL GetStatusFieldItem( USHORT nItemId, TaskStatusFieldItem& rItem ) const;
+ void AddStatusFieldItem( sal_uInt16 nItemId, const TaskStatusFieldItem& rItem,
+ sal_uInt16 nPos = 0xFFFF );
+ void ModifyStatusFieldItem( sal_uInt16 nItemId, const TaskStatusFieldItem& rItem );
+ void RemoveStatusFieldItem( sal_uInt16 nItemId );
+ sal_Bool GetStatusFieldItem( sal_uInt16 nItemId, TaskStatusFieldItem& rItem ) const;
};
// -----------
@@ -388,15 +388,15 @@ private:
long mnDummy3;
long mnDummy4;
WinBits mnWinBits;
- USHORT mnLines;
- BOOL mbStatusText;
- BOOL mbShowItems;
- BOOL mbAutoHide;
- BOOL mbAlignDummy1;
- BOOL mbDummy1;
- BOOL mbDummy2;
- BOOL mbDummy3;
- BOOL mbDummy4;
+ sal_uInt16 mnLines;
+ sal_Bool mbStatusText;
+ sal_Bool mbShowItems;
+ sal_Bool mbAutoHide;
+ sal_Bool mbAlignDummy1;
+ sal_Bool mbDummy1;
+ sal_Bool mbDummy2;
+ sal_Bool mbDummy3;
+ sal_Bool mbDummy4;
Link maTaskResizeHdl;
#ifdef _TASKBAR_CXX
@@ -424,10 +424,10 @@ public:
void Format();
- void SetLines( USHORT nLines );
- USHORT GetLines() const { return mnLines; }
- void EnableAutoHide( BOOL bAutoHide = TRUE );
- BOOL IsAutoHideEnabled() const { return mbAutoHide; }
+ void SetLines( sal_uInt16 nLines );
+ sal_uInt16 GetLines() const { return mnLines; }
+ void EnableAutoHide( sal_Bool bAutoHide = sal_True );
+ sal_Bool IsAutoHideEnabled() const { return mbAutoHide; }
void ShowStatusText( const String& rText );
void HideStatusText();
@@ -466,7 +466,7 @@ class SVT_DLLPUBLIC WindowArrange
private:
List* mpWinList;
void* mpDummy;
- ULONG mnDummy;
+ sal_uLong mnDummy;
#ifdef _TASKBAR_CXX
SVT_DLLPRIVATE void ImplTile( const Rectangle& rRect );
@@ -479,12 +479,12 @@ public:
WindowArrange();
~WindowArrange();
- void AddWindow( Window* pWindow, ULONG nPos = LIST_APPEND )
+ void AddWindow( Window* pWindow, sal_uLong nPos = LIST_APPEND )
{ mpWinList->Insert( (void*)pWindow, nPos ); }
void RemoveAllWindows()
{ mpWinList->Clear(); }
- void Arrange( USHORT nType, const Rectangle& rRect );
+ void Arrange( sal_uInt16 nType, const Rectangle& rRect );
};
#endif // _TASKBAR_HXX
diff --git a/svtools/inc/svtools/testtool.hxx b/svtools/inc/svtools/testtool.hxx
index ea00fe33cdbf..be0f217f4475 100644
--- a/svtools/inc/svtools/testtool.hxx
+++ b/svtools/inc/svtools/testtool.hxx
@@ -46,7 +46,7 @@ class RemoteControl
{
friend class StatementFlow;
- BOOL m_bIdleInserted;
+ sal_Bool m_bIdleInserted;
#if OSL_DEBUG_LEVEL > 1
EditWindow *m_pDbgWin;
#endif
@@ -55,14 +55,14 @@ class RemoteControl
public:
RemoteControl();
~RemoteControl();
- BOOL QueCommands( ULONG nServiceId, SvStream *pIn );
+ sal_Bool QueCommands( sal_uLong nServiceId, SvStream *pIn );
SvStream* GetReturnStream();
DECL_LINK( IdleHdl, Application* );
DECL_LINK( CommandHdl, Application* );
DECL_LINK( QueCommandsEvent, CommunicationLink* );
- ULONG nStoredServiceId;
+ sal_uLong nStoredServiceId;
SvStream *pStoredStream;
void ExecuteURL( String &aURL );
diff --git a/svtools/inc/svtools/textdata.hxx b/svtools/inc/svtools/textdata.hxx
index 809d64248eb6..e9654cc0378b 100644
--- a/svtools/inc/svtools/textdata.hxx
+++ b/svtools/inc/svtools/textdata.hxx
@@ -33,71 +33,51 @@
#include <svl/smplhint.hxx>
#include <tools/string.hxx>
-#define TEXTUNDO_START 100
-#define TEXTUNDO_REMOVECHARS 100
-#define TEXTUNDO_CONNECTPARAS 101
-#define TEXTUNDO_SPLITPARA 102
-#define TEXTUNDO_INSERTCHARS 103
-#define TEXTUNDO_DELCONTENT 104
-#define TEXTUNDO_DELETE 105
-#define TEXTUNDO_CUT 106
-#define TEXTUNDO_PASTE 107
-#define TEXTUNDO_INSERT 108
-#define TEXTUNDO_ATTRIBS 109
-#define TEXTUNDO_DRAGANDDROP 110
-#define TEXTUNDO_READ 111
-#define TEXTUNDO_END 149
-
-#define XTEXTUNDO_START 150
-#define XTEXTUNDO_END 199
-
-#define TEXTUNDO_USER 200
-
// Fuer Notify, wenn alle Absaetze geloescht wurden...
#define TEXT_PARA_ALL 0xFFFFFFFF
class TextPaM
{
private:
- ULONG mnPara;
- USHORT mnIndex;
+ sal_uLong mnPara;
+ sal_uInt16 mnIndex;
public:
TextPaM() { mnPara = 0, mnIndex = 0; }
- TextPaM( ULONG nPara, USHORT nIndex ) { mnPara = nPara, mnIndex = nIndex; }
+ TextPaM( sal_uLong nPara, sal_uInt16 nIndex ) { mnPara = nPara, mnIndex = nIndex; }
- ULONG GetPara() const { return mnPara; }
- ULONG& GetPara() { return mnPara; }
+ sal_uLong GetPara() const { return mnPara; }
+ sal_uLong& GetPara() { return mnPara; }
- USHORT GetIndex() const { return mnIndex; }
- USHORT& GetIndex() { return mnIndex; }
+ sal_uInt16 GetIndex() const { return mnIndex; }
+ sal_uInt16& GetIndex() { return mnIndex; }
- inline BOOL operator == ( const TextPaM& rPaM ) const;
- inline BOOL operator != ( const TextPaM& rPaM ) const;
- inline BOOL operator < ( const TextPaM& rPaM ) const;
- inline BOOL operator > ( const TextPaM& rPaM ) const;
+ inline sal_Bool operator == ( const TextPaM& rPaM ) const;
+ inline sal_Bool operator != ( const TextPaM& rPaM ) const;
+ inline sal_Bool operator < ( const TextPaM& rPaM ) const;
+ inline sal_Bool operator > ( const TextPaM& rPaM ) const;
};
-inline BOOL TextPaM::operator == ( const TextPaM& rPaM ) const
+inline sal_Bool TextPaM::operator == ( const TextPaM& rPaM ) const
{
- return ( ( mnPara == rPaM.mnPara ) && ( mnIndex == rPaM.mnIndex ) ) ? TRUE : FALSE;
+ return ( ( mnPara == rPaM.mnPara ) && ( mnIndex == rPaM.mnIndex ) ) ? sal_True : sal_False;
}
-inline BOOL TextPaM::operator != ( const TextPaM& rPaM ) const
+inline sal_Bool TextPaM::operator != ( const TextPaM& rPaM ) const
{
return !( *this == rPaM );
}
-inline BOOL TextPaM::operator < ( const TextPaM& rPaM ) const
+inline sal_Bool TextPaM::operator < ( const TextPaM& rPaM ) const
{
return ( ( mnPara < rPaM.mnPara ) ||
- ( ( mnPara == rPaM.mnPara ) && mnIndex < rPaM.mnIndex ) ) ? TRUE : FALSE;
+ ( ( mnPara == rPaM.mnPara ) && mnIndex < rPaM.mnIndex ) ) ? sal_True : sal_False;
}
-inline BOOL TextPaM::operator > ( const TextPaM& rPaM ) const
+inline sal_Bool TextPaM::operator > ( const TextPaM& rPaM ) const
{
return ( ( mnPara > rPaM.mnPara ) ||
- ( ( mnPara == rPaM.mnPara ) && mnIndex > rPaM.mnIndex ) ) ? TRUE : FALSE;
+ ( ( mnPara == rPaM.mnPara ) && mnIndex > rPaM.mnIndex ) ) ? sal_True : sal_False;
}
class SVT_DLLPUBLIC TextSelection
@@ -119,18 +99,18 @@ public:
void Justify();
- BOOL HasRange() const { return maStartPaM != maEndPaM; }
+ sal_Bool HasRange() const { return maStartPaM != maEndPaM; }
- inline BOOL operator == ( const TextSelection& rSel ) const;
- inline BOOL operator != ( const TextSelection& rSel ) const;
+ inline sal_Bool operator == ( const TextSelection& rSel ) const;
+ inline sal_Bool operator != ( const TextSelection& rSel ) const;
};
-inline BOOL TextSelection::operator == ( const TextSelection& rSel ) const
+inline sal_Bool TextSelection::operator == ( const TextSelection& rSel ) const
{
return ( ( maStartPaM == rSel.maStartPaM ) && ( maEndPaM == rSel.maEndPaM ) );
}
-inline BOOL TextSelection::operator != ( const TextSelection& rSel ) const
+inline sal_Bool TextSelection::operator != ( const TextSelection& rSel ) const
{
return !( *this == rSel );
}
@@ -153,30 +133,30 @@ inline BOOL TextSelection::operator != ( const TextSelection& rSel ) const
class SVT_DLLPUBLIC TextHint : public SfxSimpleHint
{
private:
- ULONG mnValue;
+ sal_uLong mnValue;
public:
TYPEINFO();
- TextHint( ULONG nId );
- TextHint( ULONG nId, ULONG nValue );
+ TextHint( sal_uLong nId );
+ TextHint( sal_uLong nId, sal_uLong nValue );
- ULONG GetValue() const { return mnValue; }
- void SetValue( ULONG n ) { mnValue = n; }
+ sal_uLong GetValue() const { return mnValue; }
+ void SetValue( sal_uLong n ) { mnValue = n; }
};
struct TEIMEInfos
{
String aOldTextAfterStartPos;
- USHORT* pAttribs;
+ sal_uInt16* pAttribs;
TextPaM aPos;
- USHORT nLen;
- BOOL bCursor;
- BOOL bWasCursorOverwrite;
+ sal_uInt16 nLen;
+ sal_Bool bCursor;
+ sal_Bool bWasCursorOverwrite;
TEIMEInfos( const TextPaM& rPos, const String& rOldTextAfterStartPos );
~TEIMEInfos();
- void CopyAttribs( const USHORT* pA, USHORT nL );
+ void CopyAttribs( const sal_uInt16* pA, sal_uInt16 nL );
void DestroyAttribs();
};
@@ -195,11 +175,11 @@ struct TEIMEInfos
template <class T> class ToolsList : public ::std::vector< T >
{
public:
- ULONG Count() const { return static_cast<ULONG>(::std::vector< T >::size()); }
- ULONG GetPos( T pObject ) const { return ( ::std::find( this->begin(), this->end(), pObject ) ) - this->begin(); }
- T GetObject( ULONG nIndex ) const { return (*this)[nIndex]; }
- void Insert( T pObject, ULONG nPos ) { ::std::vector< T >::insert( this->begin()+nPos, pObject ); }
- void Remove( ULONG nPos ) { ::std::vector< T >::erase( this->begin()+nPos ); }
+ sal_uLong Count() const { return static_cast<sal_uLong>(::std::vector< T >::size()); }
+ sal_uLong GetPos( T pObject ) const { return ( ::std::find( this->begin(), this->end(), pObject ) ) - this->begin(); }
+ T GetObject( sal_uLong nIndex ) const { return (*this)[nIndex]; }
+ void Insert( T pObject, sal_uLong nPos ) { ::std::vector< T >::insert( this->begin()+nPos, pObject ); }
+ void Remove( sal_uLong nPos ) { ::std::vector< T >::erase( this->begin()+nPos ); }
};
#endif // _TEXTDATA_HXX
diff --git a/svtools/inc/svtools/texteng.hxx b/svtools/inc/svtools/texteng.hxx
index ef27edee2efe..5a50fee0f68b 100644
--- a/svtools/inc/svtools/texteng.hxx
+++ b/svtools/inc/svtools/texteng.hxx
@@ -39,7 +39,6 @@ class TextAttrib;
class TextCharAttrib;
class TextUndo;
class TextUndoManager;
-class SfxUndoManager;
class EditSelFunctionSet;
class EditSelEngine;
class IdleFormatter;
@@ -49,6 +48,11 @@ class SfxUndoAction;
class KeyEvent;
class Timer;
+namespace svl
+{
+ class IUndoManager;
+}
+
class TextLine;
class TETextPortion;
#include <svl/brdcst.hxx>
@@ -117,110 +121,110 @@ private:
Font maFont;
Color maTextColor;
- USHORT mnCharHeight;
- USHORT mnFixCharWidth100;
+ sal_uInt16 mnCharHeight;
+ sal_uInt16 mnFixCharWidth100;
- ULONG mnMaxTextLen;
- ULONG mnMaxTextWidth;
- ULONG mnCurTextWidth;
- ULONG mnCurTextHeight;
- ULONG mnDefTab;
+ sal_uLong mnMaxTextLen;
+ sal_uLong mnMaxTextWidth;
+ sal_uLong mnCurTextWidth;
+ sal_uLong mnCurTextHeight;
+ sal_uLong mnDefTab;
TxtAlign meAlign;
- BOOL mbIsFormatting : 1; // Semaphore wegen der Hook's
- BOOL mbFormatted : 1;
- BOOL mbUpdate : 1;
- BOOL mbModified : 1;
- BOOL mbUndoEnabled : 1;
- BOOL mbIsInUndo : 1;
- BOOL mbDowning : 1;
- BOOL mbRightToLeft : 1;
- BOOL mbHasMultiLineParas : 1;
+ sal_Bool mbIsFormatting : 1; // Semaphore wegen der Hook's
+ sal_Bool mbFormatted : 1;
+ sal_Bool mbUpdate : 1;
+ sal_Bool mbModified : 1;
+ sal_Bool mbUndoEnabled : 1;
+ sal_Bool mbIsInUndo : 1;
+ sal_Bool mbDowning : 1;
+ sal_Bool mbRightToLeft : 1;
+ sal_Bool mbHasMultiLineParas : 1;
TextEngine( const TextEngine& ) : SfxBroadcaster() {}
TextEngine& operator=( const TextEngine& ) { return *this; }
protected:
- void CursorMoved( ULONG nNode );
+ void CursorMoved( sal_uLong nNode );
void TextModified();
void ImpInitDoc();
void ImpRemoveText();
TextPaM ImpDeleteText( const TextSelection& rSel );
- TextPaM ImpInsertText( const TextSelection& rSel, sal_Unicode c, BOOL bOverwrite = FALSE );
+ TextPaM ImpInsertText( const TextSelection& rSel, sal_Unicode c, sal_Bool bOverwrite = sal_False );
TextPaM ImpInsertText( const TextSelection& rSel, const String& rText );
- TextPaM ImpInsertParaBreak( const TextSelection& rTextSelection, BOOL bKeepEndingAttribs = TRUE );
- TextPaM ImpInsertParaBreak( const TextPaM& rPaM, BOOL bKeepEndingAttribs = TRUE );
- void ImpRemoveChars( const TextPaM& rPaM, USHORT nChars, SfxUndoAction* pCurUndo = 0 );
- TextPaM ImpConnectParagraphs( ULONG nLeft, ULONG nRight );
- void ImpRemoveParagraph( ULONG nPara );
- void ImpInitWritingDirections( ULONG nPara );
+ TextPaM ImpInsertParaBreak( const TextSelection& rTextSelection, sal_Bool bKeepEndingAttribs = sal_True );
+ TextPaM ImpInsertParaBreak( const TextPaM& rPaM, sal_Bool bKeepEndingAttribs = sal_True );
+ void ImpRemoveChars( const TextPaM& rPaM, sal_uInt16 nChars, SfxUndoAction* pCurUndo = 0 );
+ TextPaM ImpConnectParagraphs( sal_uLong nLeft, sal_uLong nRight );
+ void ImpRemoveParagraph( sal_uLong nPara );
+ void ImpInitWritingDirections( sal_uLong nPara );
LocaleDataWrapper* ImpGetLocaleDataWrapper();
// to remain compatible in the minor release we copy the above ImpInsertText
// function and add the extra parameter we need but make sure this function
// gets not exported. First and seconf parameter swapped to have a different signatur.
- SAL_DLLPRIVATE TextPaM ImpInsertText( sal_Unicode c, const TextSelection& rSel, BOOL bOverwrite = FALSE, BOOL bIsUserInput = sal_False );
+ SAL_DLLPRIVATE TextPaM ImpInsertText( sal_Unicode c, const TextSelection& rSel, sal_Bool bOverwrite = sal_False, sal_Bool bIsUserInput = sal_False );
// some other new functions needed that must not be exported to remain compatible
SAL_DLLPRIVATE ::com::sun::star::uno::Reference < ::com::sun::star::i18n::XExtendedInputSequenceChecker > GetInputSequenceChecker() const;
- SAL_DLLPRIVATE BOOL IsInputSequenceCheckingRequired( sal_Unicode c, const TextSelection& rCurSel ) const;
+ SAL_DLLPRIVATE sal_Bool IsInputSequenceCheckingRequired( sal_Unicode c, const TextSelection& rCurSel ) const;
// Broadcasten bzw. Selektionen anpassen:
- void ImpParagraphInserted( ULONG nPara );
- void ImpParagraphRemoved( ULONG nPara );
- void ImpCharsRemoved( ULONG nPara, USHORT nPos, USHORT nChars );
- void ImpCharsInserted( ULONG nPara, USHORT nPos, USHORT nChars );
- void ImpFormattingParagraph( ULONG nPara );
+ void ImpParagraphInserted( sal_uLong nPara );
+ void ImpParagraphRemoved( sal_uLong nPara );
+ void ImpCharsRemoved( sal_uLong nPara, sal_uInt16 nPos, sal_uInt16 nChars );
+ void ImpCharsInserted( sal_uLong nPara, sal_uInt16 nPos, sal_uInt16 nChars );
+ void ImpFormattingParagraph( sal_uLong nPara );
void ImpTextHeightChanged();
void ImpTextFormatted();
DECL_LINK( IdleFormatHdl, Timer * );
void CheckIdleFormatter();
- void IdleFormatAndUpdate( TextView* pCurView = 0, USHORT nMaxTimerRestarts = 5 );
+ void IdleFormatAndUpdate( TextView* pCurView = 0, sal_uInt16 nMaxTimerRestarts = 5 );
- BOOL CreateLines( ULONG nPara );
- void CreateAndInsertEmptyLine( ULONG nPara );
- void ImpBreakLine( ULONG nPara, TextLine* pLine, TETextPortion* pPortion, USHORT nPortionStart, long nRemainingWidth );
- USHORT SplitTextPortion( ULONG nPara, USHORT nPos );
- void CreateTextPortions( ULONG nPara, USHORT nStartPos );
- void RecalcTextPortion( ULONG nPara, USHORT nStartPos, short nNewChars );
- void SeekCursor( ULONG nNode, USHORT nPos, Font& rFont, OutputDevice* pOutDev );
+ sal_Bool CreateLines( sal_uLong nPara );
+ void CreateAndInsertEmptyLine( sal_uLong nPara );
+ void ImpBreakLine( sal_uLong nPara, TextLine* pLine, TETextPortion* pPortion, sal_uInt16 nPortionStart, long nRemainingWidth );
+ sal_uInt16 SplitTextPortion( sal_uLong nPara, sal_uInt16 nPos );
+ void CreateTextPortions( sal_uLong nPara, sal_uInt16 nStartPos );
+ void RecalcTextPortion( sal_uLong nPara, sal_uInt16 nStartPos, short nNewChars );
+ void SeekCursor( sal_uLong nNode, sal_uInt16 nPos, Font& rFont, OutputDevice* pOutDev );
void FormatDoc();
void FormatFullDoc();
void FormatAndUpdate( TextView* pCurView = 0 );
- BOOL IsFormatting() const { return mbIsFormatting; }
+ sal_Bool IsFormatting() const { return mbIsFormatting; }
void UpdateViews( TextView* pCurView = 0 );
- void SetUpdateMode( BOOL bUp, TextView* pCurView, BOOL bForceUpdate );
+ void SetUpdateMode( sal_Bool bUp, TextView* pCurView, sal_Bool bForceUpdate );
void ImpPaint( OutputDevice* pOut, const Point& rStartPos, Rectangle const* pPaintArea, TextSelection const* pPaintRange = 0, TextSelection const* pSelection = 0 );
void UpdateSelections();
- BOOL IsFormatted() const { return mbFormatted; }
+ sal_Bool IsFormatted() const { return mbFormatted; }
- USHORT GetCharPos( ULONG nPara, USHORT nLine, long nDocPosX, BOOL bSmart = FALSE );
- Rectangle GetEditCursor( const TextPaM& rPaM, BOOL bSpecial, BOOL bPreferPortionStart = FALSE );
- USHORT ImpFindIndex( ULONG nPortion, const Point& rPosInPara, BOOL bSmart );
- long ImpGetPortionXOffset( ULONG nPara, TextLine* pLine, USHORT nTextPortion );
- long ImpGetXPos( ULONG nPara, TextLine* pLine, USHORT nIndex, BOOL bPreferPortionStart = FALSE );
- long ImpGetOutputOffset( ULONG nPara, TextLine* pLine, USHORT nIndex, USHORT nIndex2 );
- BYTE ImpGetRightToLeft( ULONG nPara, USHORT nPos, USHORT* pStart = NULL, USHORT* pEnd = NULL );
- void ImpInitLayoutMode( OutputDevice* pOutDev, BOOL bDrawingR2LPortion = FALSE );
+ sal_uInt16 GetCharPos( sal_uLong nPara, sal_uInt16 nLine, long nDocPosX, sal_Bool bSmart = sal_False );
+ Rectangle GetEditCursor( const TextPaM& rPaM, sal_Bool bSpecial, sal_Bool bPreferPortionStart = sal_False );
+ sal_uInt16 ImpFindIndex( sal_uLong nPortion, const Point& rPosInPara, sal_Bool bSmart );
+ long ImpGetPortionXOffset( sal_uLong nPara, TextLine* pLine, sal_uInt16 nTextPortion );
+ long ImpGetXPos( sal_uLong nPara, TextLine* pLine, sal_uInt16 nIndex, sal_Bool bPreferPortionStart = sal_False );
+ long ImpGetOutputOffset( sal_uLong nPara, TextLine* pLine, sal_uInt16 nIndex, sal_uInt16 nIndex2 );
+ sal_uInt8 ImpGetRightToLeft( sal_uLong nPara, sal_uInt16 nPos, sal_uInt16* pStart = NULL, sal_uInt16* pEnd = NULL );
+ void ImpInitLayoutMode( OutputDevice* pOutDev, sal_Bool bDrawingR2LPortion = sal_False );
TxtAlign ImpGetAlign() const;
- ULONG CalcTextHeight();
- ULONG CalcParaHeight( ULONG nParagraph ) const;
- ULONG CalcTextWidth( ULONG nPara );
- ULONG CalcTextWidth( ULONG nPara, USHORT nPortionStart, USHORT nPortionLen, const Font* pFont = 0 );
- Range GetInvalidYOffsets( ULONG nPortion );
+ sal_uLong CalcTextHeight();
+ sal_uLong CalcParaHeight( sal_uLong nParagraph ) const;
+ sal_uLong CalcTextWidth( sal_uLong nPara );
+ sal_uLong CalcTextWidth( sal_uLong nPara, sal_uInt16 nPortionStart, sal_uInt16 nPortionLen, const Font* pFont = 0 );
+ Range GetInvalidYOffsets( sal_uLong nPortion );
// Fuer Undo/Redo
- void InsertContent( TextNode* pNode, ULONG nPara );
- TextPaM SplitContent( ULONG nNode, USHORT nSepPos );
- TextPaM ConnectContents( ULONG nLeftNode );
+ void InsertContent( TextNode* pNode, sal_uLong nPara );
+ TextPaM SplitContent( sal_uLong nNode, sal_uInt16 nSepPos );
+ TextPaM ConnectContents( sal_uLong nLeftNode );
// Ans API uebergebene PaM's und Selektionen auf einen gueltigen Bereich einstellen
void ValidateSelection( TextSelection& rSel ) const;
@@ -236,80 +240,81 @@ public:
String GetTextLines( LineEnd aSeparator = LINEEND_LF ) const;
void ReplaceText(const TextSelection& rSel, const String& rText);
- ULONG GetTextLen( LineEnd aSeparator = LINEEND_LF ) const;
- ULONG GetTextLen( const TextSelection& rSel, LineEnd aSeparator = LINEEND_LF ) const;
+ sal_uLong GetTextLen( LineEnd aSeparator = LINEEND_LF ) const;
+ sal_uLong GetTextLen( const TextSelection& rSel, LineEnd aSeparator = LINEEND_LF ) const;
void SetFont( const Font& rFont );
const Font& GetFont() const { return maFont; }
- void SetDefTab( USHORT nDefTab );
- USHORT GetDefTab() const;
+ void SetDefTab( sal_uInt16 nDefTab );
+ sal_uInt16 GetDefTab() const;
- void SetLeftMargin( USHORT n );
- USHORT GetLeftMargin() const;
+ void SetLeftMargin( sal_uInt16 n );
+ sal_uInt16 GetLeftMargin() const;
- void SetUpdateMode( BOOL bUpdate );
- BOOL GetUpdateMode() const { return mbUpdate; }
+ void SetUpdateMode( sal_Bool bUpdate );
+ sal_Bool GetUpdateMode() const { return mbUpdate; }
- USHORT GetViewCount() const;
- TextView* GetView( USHORT nView ) const;
+ sal_uInt16 GetViewCount() const;
+ TextView* GetView( sal_uInt16 nView ) const;
void InsertView( TextView* pTextView );
void RemoveView( TextView* pTextView );
TextView* GetActiveView() const;
void SetActiveView( TextView* pView );
- void SetMaxTextLen( ULONG nLen );
- ULONG GetMaxTextLen() const { return mnMaxTextLen; }
+ void SetMaxTextLen( sal_uLong nLen );
+ sal_uLong GetMaxTextLen() const { return mnMaxTextLen; }
- void SetMaxTextWidth( ULONG nWidth );
- ULONG GetMaxTextWidth() const { return mnMaxTextWidth; }
+ void SetMaxTextWidth( sal_uLong nWidth );
+ sal_uLong GetMaxTextWidth() const { return mnMaxTextWidth; }
- ULONG GetTextHeight() const;
- ULONG CalcTextWidth();
- USHORT GetCharHeight() const { return mnCharHeight; }
+ sal_uLong GetTextHeight() const;
+ sal_uLong CalcTextWidth();
+ sal_uInt16 GetCharHeight() const { return mnCharHeight; }
- ULONG GetParagraphCount() const;
- String GetText( ULONG nParagraph ) const;
- USHORT GetTextLen( ULONG nParagraph ) const;
- ULONG GetTextHeight( ULONG nParagraph ) const;
+ sal_uLong GetParagraphCount() const;
+ String GetText( sal_uLong nParagraph ) const;
+ sal_uInt16 GetTextLen( sal_uLong nParagraph ) const;
+ sal_uLong GetTextHeight( sal_uLong nParagraph ) const;
- USHORT GetLineCount( ULONG nParagraph ) const;
- USHORT GetLineLen( ULONG nParagraph, USHORT nLine ) const;
+ sal_uInt16 GetLineCount( sal_uLong nParagraph ) const;
+ sal_uInt16 GetLineLen( sal_uLong nParagraph, sal_uInt16 nLine ) const;
- void SetRightToLeft( BOOL bR2L );
- BOOL IsRightToLeft() const { return mbRightToLeft; }
+ void SetRightToLeft( sal_Bool bR2L );
+ sal_Bool IsRightToLeft() const { return mbRightToLeft; }
- BOOL HasUndoManager() const { return mpUndoManager ? TRUE : FALSE; }
- SfxUndoManager& GetUndoManager();
- void UndoActionStart( USHORT nId );
- void UndoActionEnd( USHORT nId );
- void InsertUndo( TextUndo* pUndo, BOOL bTryMerge = FALSE );
- BOOL IsInUndo() { return mbIsInUndo; }
- void SetIsInUndo( BOOL bInUndo ) { mbIsInUndo = bInUndo; }
+ sal_Bool HasUndoManager() const { return mpUndoManager ? sal_True : sal_False; }
+ ::svl::IUndoManager&
+ GetUndoManager();
+ void UndoActionStart( sal_uInt16 nId = 0 );
+ void UndoActionEnd();
+ void InsertUndo( TextUndo* pUndo, sal_Bool bTryMerge = sal_False );
+ sal_Bool IsInUndo() { return mbIsInUndo; }
+ void SetIsInUndo( sal_Bool bInUndo ) { mbIsInUndo = bInUndo; }
void ResetUndo();
- void EnableUndo( BOOL bEnable );
- BOOL IsUndoEnabled() { return mbUndoEnabled; }
+ void EnableUndo( sal_Bool bEnable );
+ sal_Bool IsUndoEnabled() { return mbUndoEnabled; }
- void SetModified( BOOL bModified ) { mbModified = bModified; }
- BOOL IsModified() const { return mbModified; }
+ void SetModified( sal_Bool bModified ) { mbModified = bModified; }
+ sal_Bool IsModified() const { return mbModified; }
- BOOL Read( SvStream& rInput, const TextSelection* pSel = NULL );
+ sal_Bool Read( SvStream& rInput, const TextSelection* pSel = NULL );
- BOOL Write( SvStream& rOutput, const TextSelection* pSel = NULL, BOOL bHTML = FALSE );
+ sal_Bool Write( SvStream& rOutput, const TextSelection* pSel = NULL, sal_Bool bHTML = sal_False );
- TextPaM GetPaM( const Point& rDocPos, BOOL bSmart = TRUE );
- Rectangle PaMtoEditCursor( const TextPaM& rPaM, BOOL bSpecial = FALSE );
+ TextPaM GetPaM( const Point& rDocPos, sal_Bool bSmart = sal_True );
+ Rectangle PaMtoEditCursor( const TextPaM& rPaM, sal_Bool bSpecial = sal_False );
String GetWord( const TextPaM& rCursorPos, TextPaM* pStartOfWord = 0 );
- BOOL HasAttrib( USHORT nWhich ) const;
- const TextAttrib* FindAttrib( const TextPaM& rPaM, USHORT nWhich ) const;
- const TextCharAttrib* FindCharAttrib( const TextPaM& rPaM, USHORT nWhich ) const;
+ sal_Bool HasAttrib( sal_uInt16 nWhich ) const;
+ const TextAttrib* FindAttrib( const TextPaM& rPaM, sal_uInt16 nWhich ) const;
+ const TextCharAttrib* FindCharAttrib( const TextPaM& rPaM, sal_uInt16 nWhich ) const;
- void RemoveAttribs( ULONG nPara, USHORT nWhich, BOOL bIdleFormatAndUpdate );
- void RemoveAttrib( ULONG nPara, const TextCharAttrib& rAttrib );
- void RemoveAttribs( ULONG nPara, BOOL bIdleFormatAndUpdate = TRUE );
- void SetAttrib( const TextAttrib& rAttr, ULONG nPara, USHORT nStart, USHORT nEnd, BOOL bIdleFormatAndUpdate = TRUE );
+ void RemoveAttribs( sal_uLong nPara, sal_uInt16 nWhich, sal_Bool bIdleFormatAndUpdate );
+ void RemoveAttrib( sal_uLong nPara, const TextCharAttrib& rAttrib );
+ void RemoveAttribs( sal_uLong nPara, sal_Bool bIdleFormatAndUpdate = sal_True );
+ void SetAttrib( const TextAttrib& rAttr, sal_uLong nPara, sal_uInt16 nStart, sal_uInt16 nEnd, sal_Bool bIdleFormatAndUpdate = sal_True );
TxtAlign GetTextAlign() const { return meAlign; }
void SetTextAlign( TxtAlign eAlign );
@@ -320,9 +325,9 @@ public:
::com::sun::star::lang::Locale GetLocale();
::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator > GetBreakIterator();
- static BOOL DoesKeyChangeText( const KeyEvent& rKeyEvent );
- static BOOL DoesKeyMoveCursor( const KeyEvent& rKeyEvent );
- static BOOL IsSimpleCharInput( const KeyEvent& rKeyEvent );
+ static sal_Bool DoesKeyChangeText( const KeyEvent& rKeyEvent );
+ static sal_Bool DoesKeyMoveCursor( const KeyEvent& rKeyEvent );
+ static sal_Bool IsSimpleCharInput( const KeyEvent& rKeyEvent );
};
#endif // _TEXTENG_HXX
diff --git a/svtools/inc/svtools/textview.hxx b/svtools/inc/svtools/textview.hxx
index c17084a1d693..f1f25685e68b 100644
--- a/svtools/inc/svtools/textview.hxx
+++ b/svtools/inc/svtools/textview.hxx
@@ -73,16 +73,16 @@ protected:
void ShowSelection();
void HideSelection();
void ShowSelection( const TextSelection& rSel );
- void ImpShowHideSelection( BOOL bShow, const TextSelection* pRange = NULL );
+ void ImpShowHideSelection( sal_Bool bShow, const TextSelection* pRange = NULL );
TextSelection ImpMoveCursor( const KeyEvent& rKeyEvent );
- TextPaM ImpDelete( BOOL bForward, BYTE nMode );
- void ImpSetSelection( const TextSelection& rNewSel, BOOL bUI );
- BOOL IsInSelection( const TextPaM& rPaM );
+ TextPaM ImpDelete( sal_Bool bForward, sal_uInt8 nMode );
+ void ImpSetSelection( const TextSelection& rNewSel, sal_Bool bUI );
+ sal_Bool IsInSelection( const TextPaM& rPaM );
void ImpPaint( OutputDevice* pOut, const Point& rStartPos, Rectangle const* pPaintArea, TextSelection const* pPaintRange = 0, TextSelection const* pSelection = 0 );
- void ImpPaint( const Rectangle& rRect, BOOL bUseVirtDev );
- void ImpShowCursor( BOOL bGotoCursor, BOOL bForceVisCursor, BOOL bEndKey );
+ void ImpPaint( const Rectangle& rRect, sal_Bool bUseVirtDev );
+ void ImpShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, sal_Bool bEndKey );
void ImpHighlight( const TextSelection& rSel );
void ImpSetSelection( const TextSelection& rSelection );
Point ImpGetOutputStartPos( const Point& rStartDocPos ) const;
@@ -91,7 +91,7 @@ protected:
void ImpShowDDCursor();
bool ImplTruncateNewText( rtl::OUString& rNewText ) const;
- BOOL ImplCheckTextLen( const String& rNewText );
+ sal_Bool ImplCheckTextLen( const String& rNewText );
VirtualDevice* GetVirtualDevice();
@@ -117,27 +117,27 @@ public:
void Invalidate();
void Scroll( long nHorzScroll, long nVertScroll );
- void ShowCursor( BOOL bGotoCursor = TRUE, BOOL bForceVisCursor = TRUE );
+ void ShowCursor( sal_Bool bGotoCursor = sal_True, sal_Bool bForceVisCursor = sal_True );
void HideCursor();
- void EnableCursor( BOOL bEnable );
- BOOL IsCursorEnabled() const;
+ void EnableCursor( sal_Bool bEnable );
+ sal_Bool IsCursorEnabled() const;
const TextSelection& GetSelection() const;
TextSelection& GetSelection();
void SetSelection( const TextSelection& rNewSel );
- void SetSelection( const TextSelection& rNewSel, BOOL bGotoCursor );
- BOOL HasSelection() const;
+ void SetSelection( const TextSelection& rNewSel, sal_Bool bGotoCursor );
+ sal_Bool HasSelection() const;
String GetSelected();
String GetSelected( LineEnd aSeparator );
void DeleteSelected();
- void InsertNewText( const rtl::OUString& rNew, BOOL bSelect = FALSE );
+ void InsertNewText( const rtl::OUString& rNew, sal_Bool bSelect = sal_False );
// deprecated: use InsertNewText instead
- void InsertText( const String& rNew, BOOL bSelect = FALSE );
+ void InsertText( const String& rNew, sal_Bool bSelect = sal_False );
- BOOL KeyInput( const KeyEvent& rKeyEvent );
+ sal_Bool KeyInput( const KeyEvent& rKeyEvent );
void Paint( const Rectangle& rRect );
void MouseButtonUp( const MouseEvent& rMouseEvent );
void MouseButtonDown( const MouseEvent& rMouseEvent );
@@ -154,8 +154,8 @@ public:
void Undo();
void Redo();
- BOOL Read( SvStream& rInput );
- BOOL Write( SvStream& rOutput );
+ sal_Bool Read( SvStream& rInput );
+ sal_Bool Write( SvStream& rOutput );
void SetStartDocPos( const Point& rPos );
const Point& GetStartDocPos() const;
@@ -163,26 +163,26 @@ public:
Point GetDocPos( const Point& rWindowPos ) const;
Point GetWindowPos( const Point& rDocPos ) const;
- void SetInsertMode( BOOL bInsert );
- BOOL IsInsertMode() const;
+ void SetInsertMode( sal_Bool bInsert );
+ sal_Bool IsInsertMode() const;
- void SetAutoIndentMode( BOOL bAutoIndent );
- BOOL IsAutoIndentMode() const;
+ void SetAutoIndentMode( sal_Bool bAutoIndent );
+ sal_Bool IsAutoIndentMode() const;
- void SetReadOnly( BOOL bReadOnly );
- BOOL IsReadOnly() const;
+ void SetReadOnly( sal_Bool bReadOnly );
+ sal_Bool IsReadOnly() const;
- void SetAutoScroll( BOOL bAutoScroll );
- BOOL IsAutoScroll() const;
+ void SetAutoScroll( sal_Bool bAutoScroll );
+ sal_Bool IsAutoScroll() const;
- BOOL SetCursorAtPoint( const Point& rPointPixel );
- BOOL IsSelectionAtPoint( const Point& rPointPixel );
+ sal_Bool SetCursorAtPoint( const Point& rPointPixel );
+ sal_Bool IsSelectionAtPoint( const Point& rPointPixel );
- void SetPaintSelection( BOOL bPaint);
- BOOL IsPaintSelection() const;
+ void SetPaintSelection( sal_Bool bPaint);
+ sal_Bool IsPaintSelection() const;
- void SetHighlightSelection( BOOL bSelectByHighlight );
- BOOL IsHighlightSelection() const;
+ void SetHighlightSelection( sal_Bool bSelectByHighlight );
+ sal_Bool IsHighlightSelection() const;
void EraseVirtualDevice();
@@ -192,8 +192,8 @@ public:
TextPaM PageDown( const TextPaM& rPaM );
TextPaM CursorUp( const TextPaM& rPaM );
TextPaM CursorDown( const TextPaM& rPaM );
- TextPaM CursorLeft( const TextPaM& rPaM, USHORT nCharacterIteratorMode );
- TextPaM CursorRight( const TextPaM& rPaM, USHORT nCharacterIteratorMode );
+ TextPaM CursorLeft( const TextPaM& rPaM, sal_uInt16 nCharacterIteratorMode );
+ TextPaM CursorRight( const TextPaM& rPaM, sal_uInt16 nCharacterIteratorMode );
TextPaM CursorWordLeft( const TextPaM& rPaM );
TextPaM CursorWordRight( const TextPaM& rPaM );
TextPaM CursorStartOfLine( const TextPaM& rPaM );
@@ -204,8 +204,8 @@ public:
TextPaM CursorEndOfDoc();
// Old, remove!
- TextPaM CursorLeft( const TextPaM& rPaM, BOOL bWordMode = FALSE );
- TextPaM CursorRight( const TextPaM& rPaM, BOOL bWordMode = FALSE );
+ TextPaM CursorLeft( const TextPaM& rPaM, sal_Bool bWordMode = sal_False );
+ TextPaM CursorRight( const TextPaM& rPaM, sal_Bool bWordMode = sal_False );
/**
Drag and Drop, deleting and selection regards all text that has an attribute
diff --git a/svtools/inc/svtools/toolpanel/paneltabbar.hxx b/svtools/inc/svtools/toolpanel/paneltabbar.hxx
index 668935d8a739..0d24b76e5684 100644
--- a/svtools/inc/svtools/toolpanel/paneltabbar.hxx
+++ b/svtools/inc/svtools/toolpanel/paneltabbar.hxx
@@ -88,7 +88,7 @@ namespace svt
virtual void DataChanged( const DataChangedEvent& i_rDataChanedEvent );
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >
- GetComponentInterface( BOOL i_bCreate );
+ GetComponentInterface( sal_Bool i_bCreate );
private:
::std::auto_ptr< PanelTabBar_Impl > m_pImpl;
diff --git a/svtools/inc/svtools/toolpanel/toolpaneldeck.hxx b/svtools/inc/svtools/toolpanel/toolpaneldeck.hxx
index a1009591ffba..15367703f39a 100755
--- a/svtools/inc/svtools/toolpanel/toolpaneldeck.hxx
+++ b/svtools/inc/svtools/toolpanel/toolpaneldeck.hxx
@@ -177,7 +177,7 @@ namespace svt
virtual void GetFocus();
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >
- GetComponentInterface( BOOL i_bCreate );
+ GetComponentInterface( sal_Bool i_bCreate );
private:
::std::auto_ptr< ToolPanelDeck_Impl > m_pImpl;
diff --git a/svtools/inc/svtools/transfer.hxx b/svtools/inc/svtools/transfer.hxx
index 5eac1484fff9..ce7d1fdc5e47 100644
--- a/svtools/inc/svtools/transfer.hxx
+++ b/svtools/inc/svtools/transfer.hxx
@@ -573,11 +573,11 @@ public:
void CopyImageMap( const ImageMap& rImgMap );
void CopyGraphic( const Graphic& rGrf );
void CopyString( const String& rStr );
- void CopyString( USHORT nFmt, const String& rStr );
- void CopyAny( USHORT nFmt, const ::com::sun::star::uno::Any& rAny );
+ void CopyString( sal_uInt16 nFmt, const String& rStr );
+ void CopyAny( sal_uInt16 nFmt, const ::com::sun::star::uno::Any& rAny );
- void CopyByteString( ULONG nFormatId, const ByteString& rStr );
- void CopyAnyData( ULONG nFormatId, const sal_Char* pData, ULONG nLen );
+ void CopyByteString( sal_uLong nFormatId, const ByteString& rStr );
+ void CopyAnyData( sal_uLong nFormatId, const sal_Char* pData, sal_uLong nLen );
sal_Bool HasAnyData() const;
diff --git a/svtools/inc/svtools/treelist.hxx b/svtools/inc/svtools/treelist.hxx
index 3ba013d90830..6576b6a736b2 100644
--- a/svtools/inc/svtools/treelist.hxx
+++ b/svtools/inc/svtools/treelist.hxx
@@ -66,10 +66,10 @@ class SvListEntry;
class SvTreeEntryList : public List // SvEntryListStd
{
public:
- SvTreeEntryList(USHORT nInitPos=16, USHORT nResize=16 )
+ SvTreeEntryList(sal_uInt16 nInitPos=16, sal_uInt16 nResize=16 )
: List( nInitPos, nResize )
{}
- SvTreeEntryList(USHORT BlockSize, USHORT InitSize, USHORT Resize )
+ SvTreeEntryList(sal_uInt16 BlockSize, sal_uInt16 InitSize, sal_uInt16 Resize )
: List(BlockSize, InitSize, Resize )
{}
@@ -84,8 +84,8 @@ friend class SvListView;
private:
SvListEntry* pParent;
SvTreeEntryList* pChilds;
- ULONG nAbsPos;
- ULONG nListPos;
+ sal_uLong nAbsPos;
+ sal_uLong nListPos;
void SetListPositions();
void InvalidateChildrensListPositions()
@@ -96,14 +96,14 @@ public:
SvListEntry();
SvListEntry( const SvListEntry& );
virtual ~SvListEntry();
- BOOL HasChilds() { return (BOOL)(pChilds!=0); }
- BOOL HasChildListPos() const
+ sal_Bool HasChilds() { return (sal_Bool)(pChilds!=0); }
+ sal_Bool HasChildListPos() const
{
if( pParent && !(pParent->nListPos & 0x80000000) )
- return TRUE;
- else return FALSE;
+ return sal_True;
+ else return sal_False;
}
- ULONG GetChildListPos() const
+ sal_uLong GetChildListPos() const
{
if( pParent && (pParent->nListPos & 0x80000000) )
pParent->SetListPositions();
@@ -119,26 +119,26 @@ class SvViewData
friend class SvTreeList;
friend class SvListView;
- ULONG nVisPos;
+ sal_uLong nVisPos;
protected:
- USHORT nFlags;
+ sal_uInt16 nFlags;
public:
SvViewData();
SvViewData( const SvViewData& );
virtual ~SvViewData();
- BOOL IsSelected() const { return (BOOL)(nFlags&SVLISTENTRYFLAG_SELECTED)!=0; }
- BOOL IsExpanded() const { return (BOOL)(nFlags&SVLISTENTRYFLAG_EXPANDED)!=0; }
- BOOL HasFocus() const { return (BOOL)(nFlags&SVLISTENTRYFLAG_FOCUSED)!=0; }
- void SetFocus( BOOL bFocus)
+ sal_Bool IsSelected() const { return (sal_Bool)(nFlags&SVLISTENTRYFLAG_SELECTED)!=0; }
+ sal_Bool IsExpanded() const { return (sal_Bool)(nFlags&SVLISTENTRYFLAG_EXPANDED)!=0; }
+ sal_Bool HasFocus() const { return (sal_Bool)(nFlags&SVLISTENTRYFLAG_FOCUSED)!=0; }
+ void SetFocus( sal_Bool bFocus)
{
if ( !bFocus )
nFlags &= (~SVLISTENTRYFLAG_FOCUSED);
else
nFlags |= SVLISTENTRYFLAG_FOCUSED;
}
- BOOL IsCursored() const { return (BOOL)(nFlags&SVLISTENTRYFLAG_CURSORED)!=0; }
- void SetCursored( BOOL bCursored )
+ sal_Bool IsCursored() const { return (sal_Bool)(nFlags&SVLISTENTRYFLAG_CURSORED)!=0; }
+ void SetCursored( sal_Bool bCursored )
{
if ( !bCursored )
nFlags &= (~SVLISTENTRYFLAG_CURSORED);
@@ -146,7 +146,7 @@ public:
nFlags |= SVLISTENTRYFLAG_CURSORED;
}
- USHORT GetFlags() const { return nFlags; }
+ sal_uInt16 GetFlags() const { return nFlags; }
void SetSelectable( bool bSelectable )
{
@@ -174,38 +174,38 @@ class SVT_DLLPUBLIC SvTreeList
friend class SvListView;
List aViewList;
- ULONG nEntryCount;
+ sal_uLong nEntryCount;
Link aCloneLink;
Link aCompareLink;
SvSortMode eSortMode;
- USHORT nRefCount;
+ sal_uInt16 nRefCount;
- BOOL bAbsPositionsValid;
+ sal_Bool bAbsPositionsValid;
SvListEntry* FirstVisible() const { return First(); }
- SvListEntry* NextVisible( const SvListView*,SvListEntry* pEntry, USHORT* pDepth=0 ) const;
- SvListEntry* PrevVisible( const SvListView*,SvListEntry* pEntry, USHORT* pDepth=0 ) const;
- SvListEntry* LastVisible( const SvListView*,USHORT* pDepth=0 ) const;
- SvListEntry* NextVisible( const SvListView*,SvListEntry* pEntry, USHORT& rDelta ) const;
- SvListEntry* PrevVisible( const SvListView*,SvListEntry* pEntry, USHORT& rDelta ) const;
-
- BOOL IsEntryVisible( const SvListView*,SvListEntry* pEntry ) const;
- SvListEntry* GetEntryAtVisPos( const SvListView*,ULONG nVisPos ) const;
- ULONG GetVisiblePos( const SvListView*,SvListEntry* pEntry ) const;
- ULONG GetVisibleCount( const SvListView* ) const;
- ULONG GetVisibleChildCount( const SvListView*,SvListEntry* pParent ) const;
+ SvListEntry* NextVisible( const SvListView*,SvListEntry* pEntry, sal_uInt16* pDepth=0 ) const;
+ SvListEntry* PrevVisible( const SvListView*,SvListEntry* pEntry, sal_uInt16* pDepth=0 ) const;
+ SvListEntry* LastVisible( const SvListView*,sal_uInt16* pDepth=0 ) const;
+ SvListEntry* NextVisible( const SvListView*,SvListEntry* pEntry, sal_uInt16& rDelta ) const;
+ SvListEntry* PrevVisible( const SvListView*,SvListEntry* pEntry, sal_uInt16& rDelta ) const;
+
+ sal_Bool IsEntryVisible( const SvListView*,SvListEntry* pEntry ) const;
+ SvListEntry* GetEntryAtVisPos( const SvListView*,sal_uLong nVisPos ) const;
+ sal_uLong GetVisiblePos( const SvListView*,SvListEntry* pEntry ) const;
+ sal_uLong GetVisibleCount( const SvListView* ) const;
+ sal_uLong GetVisibleChildCount( const SvListView*,SvListEntry* pParent ) const;
SvListEntry* FirstSelected( const SvListView*) const;
SvListEntry* NextSelected( const SvListView*,SvListEntry* pEntry ) const;
SvListEntry* PrevSelected( const SvListView*,SvListEntry* pEntry ) const;
SvListEntry* LastSelected( const SvListView*) const;
- BOOL Select( SvListView*,SvListEntry* pEntry, BOOL bSelect=TRUE );
- ULONG SelectChilds( SvListView*,SvListEntry* pParent, BOOL bSelect );
- void SelectAll( SvListView*,BOOL bSelect ); // ruft nicht Select-Hdl
- ULONG GetChildSelectionCount( const SvListView*,SvListEntry* pParent ) const;
+ sal_Bool Select( SvListView*,SvListEntry* pEntry, sal_Bool bSelect=sal_True );
+ sal_uLong SelectChilds( SvListView*,SvListEntry* pParent, sal_Bool bSelect );
+ void SelectAll( SvListView*,sal_Bool bSelect ); // ruft nicht Select-Hdl
+ sal_uLong GetChildSelectionCount( const SvListView*,SvListEntry* pParent ) const;
void Expand( SvListView*,SvListEntry* pParent );
void Collapse( SvListView*,SvListEntry* pParent );
@@ -214,12 +214,12 @@ class SVT_DLLPUBLIC SvTreeList
SVT_DLLPRIVATE void SetAbsolutePositions();
SVT_DLLPRIVATE SvTreeEntryList*CloneChilds( SvTreeEntryList* pChilds,
SvListEntry* pNewParent,
- ULONG& nCloneCount ) const;
+ sal_uLong& nCloneCount ) const;
SVT_DLLPRIVATE void SetListPositions( SvTreeEntryList* );
// rPos wird bei SortModeNone nicht geaendert
SVT_DLLPRIVATE void GetInsertionPos( SvListEntry* pEntry, SvListEntry* pParent,
- ULONG& rPos );
+ sal_uLong& rPos );
SVT_DLLPRIVATE void ResortChilds( SvListEntry* pParent );
//#endif /* _SOLAR__PRIVATE */
@@ -234,57 +234,57 @@ public:
void InsertView( SvListView* );
void RemoveView( SvListView* );
- ULONG GetViewCount() const { return aViewList.Count(); }
- SvListView* GetView(ULONG nPos) const {return (SvListView*)aViewList.GetObject(nPos);}
- void Broadcast( USHORT nActionId, SvListEntry* pEntry1=0,
- SvListEntry* pEntry2=0, ULONG nPos=0 );
+ sal_uLong GetViewCount() const { return aViewList.Count(); }
+ SvListView* GetView(sal_uLong nPos) const {return (SvListView*)aViewList.GetObject(nPos);}
+ void Broadcast( sal_uInt16 nActionId, SvListEntry* pEntry1=0,
+ SvListEntry* pEntry2=0, sal_uLong nPos=0 );
// informiert alle Listener
void InvalidateEntry( SvListEntry* );
- ULONG GetEntryCount() const { return nEntryCount; }
+ sal_uLong GetEntryCount() const { return nEntryCount; }
SvListEntry* First() const;
- SvListEntry* Next( SvListEntry* pEntry, USHORT* pDepth=0 ) const;
- SvListEntry* Prev( SvListEntry* pEntry, USHORT* pDepth=0 ) const;
- SvListEntry* Last( USHORT* pDepth=0 ) const;
+ SvListEntry* Next( SvListEntry* pEntry, sal_uInt16* pDepth=0 ) const;
+ SvListEntry* Prev( SvListEntry* pEntry, sal_uInt16* pDepth=0 ) const;
+ SvListEntry* Last( sal_uInt16* pDepth=0 ) const;
SvListEntry* FirstChild( SvListEntry* pParent ) const;
SvListEntry* NextSibling( SvListEntry* pEntry ) const;
SvListEntry* PrevSibling( SvListEntry* pEntry ) const;
SvListEntry* LastSibling( SvListEntry* pEntry ) const;
- ULONG Insert( SvListEntry* pEntry,SvListEntry* pPar,ULONG nPos=LIST_APPEND);
- ULONG Insert( SvListEntry* pEntry,ULONG nRootPos = LIST_APPEND ) { return Insert(pEntry, pRootItem, nRootPos ); }
+ sal_uLong Insert( SvListEntry* pEntry,SvListEntry* pPar,sal_uLong nPos=LIST_APPEND);
+ sal_uLong Insert( SvListEntry* pEntry,sal_uLong nRootPos = LIST_APPEND ) { return Insert(pEntry, pRootItem, nRootPos ); }
void InsertTree( SvListEntry* pTree, SvListEntry* pTarget );
void InsertTree( SvListEntry* pTree, SvListEntry* pTargetParent,
- ULONG nListPos );
+ sal_uLong nListPos );
// Entries muessen im gleichen Model stehen!
void Move( SvListEntry* pSource, SvListEntry* pTarget );
// erzeugt ggf. Child-List
- ULONG Move( SvListEntry* pSource, SvListEntry* pTargetParent,
- ULONG nListPos);
+ sal_uLong Move( SvListEntry* pSource, SvListEntry* pTargetParent,
+ sal_uLong nListPos);
void Copy( SvListEntry* pSource, SvListEntry* pTarget );
- ULONG Copy( SvListEntry* pSource, SvListEntry* pTargetParent,
- ULONG nListPos);
+ sal_uLong Copy( SvListEntry* pSource, SvListEntry* pTargetParent,
+ sal_uLong nListPos);
- BOOL Remove( SvListEntry* pEntry );
+ sal_Bool Remove( SvListEntry* pEntry );
void Clear();
- BOOL HasChilds( SvListEntry* pEntry ) const;
- BOOL HasParent( SvListEntry* pEntry ) const { return (BOOL)(pEntry->pParent!=pRootItem); }
- BOOL IsChild( SvListEntry* pParent, SvListEntry* pChild ) const;
- BOOL IsInChildList( SvListEntry* pParent, SvListEntry* pChild) const;
- SvListEntry* GetEntry( SvListEntry* pParent, ULONG nPos ) const;
- SvListEntry* GetEntry( ULONG nRootPos ) const;
- SvListEntry* GetEntryAtAbsPos( ULONG nAbsPos ) const;
+ sal_Bool HasChilds( SvListEntry* pEntry ) const;
+ sal_Bool HasParent( SvListEntry* pEntry ) const { return (sal_Bool)(pEntry->pParent!=pRootItem); }
+ sal_Bool IsChild( SvListEntry* pParent, SvListEntry* pChild ) const;
+ sal_Bool IsInChildList( SvListEntry* pParent, SvListEntry* pChild) const;
+ SvListEntry* GetEntry( SvListEntry* pParent, sal_uLong nPos ) const;
+ SvListEntry* GetEntry( sal_uLong nRootPos ) const;
+ SvListEntry* GetEntryAtAbsPos( sal_uLong nAbsPos ) const;
SvListEntry* GetParent( SvListEntry* pEntry ) const;
SvListEntry* GetRootLevelParent( SvListEntry* pEntry ) const;
SvTreeEntryList* GetChildList( SvListEntry* pParent ) const;
- ULONG GetAbsPos( SvListEntry* pEntry ) const;
- ULONG GetRelPos( SvListEntry* pChild ) const { return pChild->GetChildListPos(); }
- ULONG GetChildCount( SvListEntry* pParent ) const;
- USHORT GetDepth( SvListEntry* pEntry ) const;
- BOOL IsAtRootDepth( SvListEntry* pEntry ) const { return (BOOL)(pEntry->pParent==pRootItem); }
+ sal_uLong GetAbsPos( SvListEntry* pEntry ) const;
+ sal_uLong GetRelPos( SvListEntry* pChild ) const { return pChild->GetChildListPos(); }
+ sal_uLong GetChildCount( SvListEntry* pParent ) const;
+ sal_uInt16 GetDepth( SvListEntry* pEntry ) const;
+ sal_Bool IsAtRootDepth( SvListEntry* pEntry ) const { return (sal_Bool)(pEntry->pParent==pRootItem); }
// das Model ruft zum Clonen von Entries den Clone-Link auf,
// damit man sich nicht vom Model ableiten muss, wenn man
@@ -292,14 +292,14 @@ public:
// Deklaration des Clone-Handlers:
// DECL_LINK(CloneHdl,SvListEntry*);
// der Handler muss einen SvListEntry* zurueckgeben
- SvListEntry* Clone( SvListEntry* pEntry, ULONG& nCloneCount ) const;
+ SvListEntry* Clone( SvListEntry* pEntry, sal_uLong& nCloneCount ) const;
void SetCloneLink( const Link& rLink ) { aCloneLink=rLink; }
const Link& GetCloneLink() const { return aCloneLink; }
virtual SvListEntry* CloneEntry( SvListEntry* ) const; // ruft den Clone-Link
virtual SvListEntry* CreateEntry() const; // zum 'new'en von Entries
- USHORT GetRefCount() const { return nRefCount; }
- void SetRefCount( USHORT nRef ) { nRefCount = nRef; }
+ sal_uInt16 GetRefCount() const { return nRefCount; }
+ void SetRefCount( sal_uInt16 nRef ) { nRefCount = nRef; }
void SetSortMode( SvSortMode eMode ) { eSortMode = eMode; }
SvSortMode GetSortMode() const { return eSortMode; }
@@ -315,9 +315,9 @@ class SVT_DLLPUBLIC SvListView
{
friend class SvTreeList;
- ULONG nVisibleCount;
- ULONG nSelectionCount;
- BOOL bVisPositionsValid;
+ sal_uLong nVisibleCount;
+ sal_uLong nSelectionCount;
+ sal_Bool bVisPositionsValid;
//#if 0 // _SOLAR__PRIVATE
SVT_DLLPRIVATE void InitTable();
@@ -329,8 +329,8 @@ protected:
Table aDataTable; // Mapping SvListEntry -> ViewData
SvTreeList* pModel;
- void ActionMoving( SvListEntry* pEntry,SvListEntry* pTargetPrnt,ULONG nChildPos);
- void ActionMoved( SvListEntry* pEntry,SvListEntry* pTargetPrnt,ULONG nChildPos);
+ void ActionMoving( SvListEntry* pEntry,SvListEntry* pTargetPrnt,sal_uLong nChildPos);
+ void ActionMoved( SvListEntry* pEntry,SvListEntry* pTargetPrnt,sal_uLong nChildPos);
void ActionInserted( SvListEntry* pEntry );
void ActionInsertedTree( SvListEntry* pEntry );
void ActionRemoving( SvListEntry* pEntry );
@@ -345,40 +345,40 @@ public:
void Clear();
SvTreeList* GetModel() const { return pModel; }
virtual void SetModel( SvTreeList* );
- virtual void ModelNotification( USHORT nActionId, SvListEntry* pEntry1,
- SvListEntry* pEntry2, ULONG nPos );
+ virtual void ModelNotification( sal_uInt16 nActionId, SvListEntry* pEntry1,
+ SvListEntry* pEntry2, sal_uLong nPos );
- ULONG GetVisibleCount() const { return pModel->GetVisibleCount( (SvListView*)this );}
+ sal_uLong GetVisibleCount() const { return pModel->GetVisibleCount( (SvListView*)this );}
SvListEntry* FirstVisible() const { return pModel->FirstVisible(); }
- SvListEntry* NextVisible( SvListEntry* pEntry, USHORT* pDepth=0 ) const {return pModel->NextVisible(this,pEntry,pDepth); }
- SvListEntry* PrevVisible( SvListEntry* pEntry, USHORT* pDepth=0 ) const {return pModel->PrevVisible(this,pEntry,pDepth); }
- SvListEntry* LastVisible( USHORT* pDepth=0 ) const { return pModel->LastVisible(this,pDepth);}
- SvListEntry* NextVisible( SvListEntry* pEntry, USHORT& rDelta ) const { return pModel->NextVisible(this,pEntry,rDelta); }
- SvListEntry* PrevVisible( SvListEntry* pEntry, USHORT& rDelta ) const { return pModel->PrevVisible(this,pEntry,rDelta); }
+ SvListEntry* NextVisible( SvListEntry* pEntry, sal_uInt16* pDepth=0 ) const {return pModel->NextVisible(this,pEntry,pDepth); }
+ SvListEntry* PrevVisible( SvListEntry* pEntry, sal_uInt16* pDepth=0 ) const {return pModel->PrevVisible(this,pEntry,pDepth); }
+ SvListEntry* LastVisible( sal_uInt16* pDepth=0 ) const { return pModel->LastVisible(this,pDepth);}
+ SvListEntry* NextVisible( SvListEntry* pEntry, sal_uInt16& rDelta ) const { return pModel->NextVisible(this,pEntry,rDelta); }
+ SvListEntry* PrevVisible( SvListEntry* pEntry, sal_uInt16& rDelta ) const { return pModel->PrevVisible(this,pEntry,rDelta); }
- ULONG GetSelectionCount() const { return nSelectionCount; }
+ sal_uLong GetSelectionCount() const { return nSelectionCount; }
SvListEntry* FirstSelected() const { return pModel->FirstSelected(this);}
SvListEntry* NextSelected( SvListEntry* pEntry ) const { return pModel->NextSelected(this,pEntry); }
SvListEntry* PrevSelected( SvListEntry* pEntry ) const { return pModel->PrevSelected(this,pEntry); }
SvListEntry* LastSelected() const { return pModel->LastSelected(this); }
- SvListEntry* GetEntryAtVisPos( ULONG nVisPos ) const { return pModel->GetEntryAtVisPos((SvListView*)this,nVisPos); }
- ULONG GetVisiblePos( SvListEntry* pEntry ) const { return pModel->GetVisiblePos((SvListView*)this,pEntry); }
+ SvListEntry* GetEntryAtVisPos( sal_uLong nVisPos ) const { return pModel->GetEntryAtVisPos((SvListView*)this,nVisPos); }
+ sal_uLong GetVisiblePos( SvListEntry* pEntry ) const { return pModel->GetVisiblePos((SvListView*)this,pEntry); }
- ULONG GetVisibleChildCount(SvListEntry* pParent ) const { return pModel->GetVisibleChildCount((SvListView*)this,pParent); }
- ULONG GetChildSelectionCount( SvListEntry* pParent ) const { return pModel->GetChildSelectionCount((SvListView*)this,pParent); }
+ sal_uLong GetVisibleChildCount(SvListEntry* pParent ) const { return pModel->GetVisibleChildCount((SvListView*)this,pParent); }
+ sal_uLong GetChildSelectionCount( SvListEntry* pParent ) const { return pModel->GetChildSelectionCount((SvListView*)this,pParent); }
void Expand( SvListEntry* pParent ) { pModel->Expand((SvListView*)this,pParent); }
void Collapse( SvListEntry* pParent ) { pModel->Collapse((SvListView*)this,pParent); }
- BOOL Select( SvListEntry* pEntry, BOOL bSelect=TRUE ) { return pModel->Select((SvListView*)this,pEntry,bSelect); }
- ULONG SelectChilds( SvListEntry* pParent, BOOL bSelect ) { return pModel->SelectChilds((SvListView*)this,pParent, bSelect); }
+ sal_Bool Select( SvListEntry* pEntry, sal_Bool bSelect=sal_True ) { return pModel->Select((SvListView*)this,pEntry,bSelect); }
+ sal_uLong SelectChilds( SvListEntry* pParent, sal_Bool bSelect ) { return pModel->SelectChilds((SvListView*)this,pParent, bSelect); }
// ruft nicht Select-Hdl
- virtual void SelectAll( BOOL bSelect, BOOL ) { pModel->SelectAll((SvListView*)this, bSelect); }
- BOOL IsEntryVisible( SvListEntry* pEntry ) const { return pModel->IsEntryVisible((SvListView*)this,pEntry); }
- BOOL IsExpanded( SvListEntry* pEntry ) const;
- BOOL IsSelected( SvListEntry* pEntry ) const;
- BOOL HasEntryFocus( SvListEntry* pEntry ) const;
- void SetEntryFocus( SvListEntry* pEntry, BOOL bFocus ) const;
+ virtual void SelectAll( sal_Bool bSelect, sal_Bool ) { pModel->SelectAll((SvListView*)this, bSelect); }
+ sal_Bool IsEntryVisible( SvListEntry* pEntry ) const { return pModel->IsEntryVisible((SvListView*)this,pEntry); }
+ sal_Bool IsExpanded( SvListEntry* pEntry ) const;
+ sal_Bool IsSelected( SvListEntry* pEntry ) const;
+ sal_Bool HasEntryFocus( SvListEntry* pEntry ) const;
+ void SetEntryFocus( SvListEntry* pEntry, sal_Bool bFocus ) const;
SvViewData* GetViewData( SvListEntry* pEntry ) const;
- BOOL HasViewData() const { return aDataTable.Count() > 1;} // eine ROOT gibts immer
+ sal_Bool HasViewData() const { return aDataTable.Count() > 1;} // eine ROOT gibts immer
virtual SvViewData* CreateViewData( SvListEntry* pEntry );
virtual void InitViewData( SvViewData*, SvListEntry* pEntry );
@@ -386,38 +386,38 @@ public:
virtual void ModelHasInserted( SvListEntry* pEntry );
virtual void ModelHasInsertedTree( SvListEntry* pEntry );
virtual void ModelIsMoving( SvListEntry* pSource, SvListEntry* pTargetParent,
- ULONG nPos );
+ sal_uLong nPos );
virtual void ModelHasMoved( SvListEntry* pSource );
virtual void ModelIsRemoving( SvListEntry* pEntry );
virtual void ModelHasRemoved( SvListEntry* pEntry );
virtual void ModelHasEntryInvalidated( SvListEntry* pEntry );
};
-inline BOOL SvListView::IsExpanded( SvListEntry* pEntry ) const
+inline sal_Bool SvListView::IsExpanded( SvListEntry* pEntry ) const
{
DBG_ASSERT(pEntry,"IsExpanded:No Entry");
- SvViewData* pData = (SvViewData*)aDataTable.Get( (ULONG)pEntry );
+ SvViewData* pData = (SvViewData*)aDataTable.Get( (sal_uLong)pEntry );
DBG_ASSERT(pData,"Entry not in Table");
return pData->IsExpanded();
}
-inline BOOL SvListView::IsSelected( SvListEntry* pEntry ) const
+inline sal_Bool SvListView::IsSelected( SvListEntry* pEntry ) const
{
DBG_ASSERT(pEntry,"IsExpanded:No Entry");
- SvViewData* pData = (SvViewData*)aDataTable.Get( (ULONG)pEntry );
+ SvViewData* pData = (SvViewData*)aDataTable.Get( (sal_uLong)pEntry );
DBG_ASSERT(pData,"Entry not in Table");
return pData->IsSelected();
}
-inline BOOL SvListView::HasEntryFocus( SvListEntry* pEntry ) const
+inline sal_Bool SvListView::HasEntryFocus( SvListEntry* pEntry ) const
{
DBG_ASSERT(pEntry,"IsExpanded:No Entry");
- SvViewData* pData = (SvViewData*)aDataTable.Get( (ULONG)pEntry );
+ SvViewData* pData = (SvViewData*)aDataTable.Get( (sal_uLong)pEntry );
DBG_ASSERT(pData,"Entry not in Table");
return pData->HasFocus();
}
-inline void SvListView::SetEntryFocus( SvListEntry* pEntry, BOOL bFocus ) const
+inline void SvListView::SetEntryFocus( SvListEntry* pEntry, sal_Bool bFocus ) const
{
DBG_ASSERT(pEntry,"SetEntryFocus:No Entry");
- SvViewData* pData = (SvViewData*)aDataTable.Get( (ULONG)pEntry );
+ SvViewData* pData = (SvViewData*)aDataTable.Get( (sal_uLong)pEntry );
DBG_ASSERT(pData,"Entry not in Table");
pData->SetFocus(bFocus);
}
@@ -425,22 +425,22 @@ inline void SvListView::SetEntryFocus( SvListEntry* pEntry, BOOL bFocus ) const
inline SvViewData* SvListView::GetViewData( SvListEntry* pEntry ) const
{
#ifndef DBG_UTIL
- return (SvViewData*)aDataTable.Get( (ULONG)pEntry );
+ return (SvViewData*)aDataTable.Get( (sal_uLong)pEntry );
#else
- SvViewData* pResult = (SvViewData*)aDataTable.Get( (ULONG)pEntry );
+ SvViewData* pResult = (SvViewData*)aDataTable.Get( (sal_uLong)pEntry );
DBG_ASSERT(pResult,"Entry not in model or wrong view");
return pResult;
#endif
}
-inline BOOL SvTreeList::HasChilds( SvListEntry* pEntry ) const
+inline sal_Bool SvTreeList::HasChilds( SvListEntry* pEntry ) const
{
if ( !pEntry )
pEntry = pRootItem;
- return (BOOL)(pEntry->pChilds != 0);
+ return (sal_Bool)(pEntry->pChilds != 0);
}
-inline SvListEntry* SvTreeList::GetEntry( SvListEntry* pParent, ULONG nPos ) const
+inline SvListEntry* SvTreeList::GetEntry( SvListEntry* pParent, sal_uLong nPos ) const
{ if ( !pParent )
pParent = pRootItem;
SvListEntry* pRet = 0;
@@ -449,7 +449,7 @@ inline SvListEntry* SvTreeList::GetEntry( SvListEntry* pParent, ULONG nPos ) con
return pRet;
}
-inline SvListEntry* SvTreeList::GetEntry( ULONG nRootPos ) const
+inline SvListEntry* SvTreeList::GetEntry( sal_uLong nRootPos ) const
{
SvListEntry* pRet;
if ( nEntryCount )
@@ -480,18 +480,18 @@ class ClassName : public SvTreeList \
public: \
Type First() const \
{ return (Type)SvTreeList::First(); } \
- Type Next( SvListEntry* pEntry, USHORT* pDepth=0 ) const \
+ Type Next( SvListEntry* pEntry, sal_uInt16* pDepth=0 ) const \
{ return (Type)SvTreeList::Next(pEntry,pDepth); } \
- Type Prev( SvListEntry* pEntry, USHORT* pDepth=0 ) const \
+ Type Prev( SvListEntry* pEntry, sal_uInt16* pDepth=0 ) const \
{ return (Type)SvTreeList::Prev(pEntry,pDepth); } \
- Type Last( USHORT* pDepth=0 ) const \
+ Type Last( sal_uInt16* pDepth=0 ) const \
{ return (Type)SvTreeList::Last(pDepth); } \
\
- Type Clone( SvListEntry* pEntry, ULONG& nCloneCount ) const \
+ Type Clone( SvListEntry* pEntry, sal_uLong& nCloneCount ) const \
{ return (Type)SvTreeList::Clone(pEntry,nCloneCount); } \
- Type GetEntry( SvListEntry* pParent, ULONG nPos ) const \
+ Type GetEntry( SvListEntry* pParent, sal_uLong nPos ) const \
{ return (Type)SvTreeList::GetEntry(pParent,nPos); } \
- Type GetEntry( ULONG nRootPos ) const \
+ Type GetEntry( sal_uLong nRootPos ) const \
{ return (Type)SvTreeList::GetEntry(nRootPos); } \
Type GetParent( SvListEntry* pEntry ) const \
{ return (Type)SvTreeList::GetParent(pEntry); } \
@@ -507,7 +507,7 @@ public: \
using SvTreeList::LastSibling; \
Type LastSibling( Type pEntry ) const \
{ return (Type)SvTreeList::LastSibling(pEntry); } \
- Type GetEntryAtAbsPos( ULONG nAbsPos ) const \
+ Type GetEntryAtAbsPos( sal_uLong nAbsPos ) const \
{ return (Type)SvTreeList::GetEntryAtAbsPos( nAbsPos); } \
};
diff --git a/svtools/inc/svtools/ttprops.hxx b/svtools/inc/svtools/ttprops.hxx
index 15f080b9aa3d..1a6802b9a51c 100644
--- a/svtools/inc/svtools/ttprops.hxx
+++ b/svtools/inc/svtools/ttprops.hxx
@@ -36,7 +36,7 @@
class SfxPoolItem;
class Bitmap;
-// Defines zur Steuerung der Ausführung von Slots
+// Defines zur Steuerung der Ausf�hrung von Slots
#define EXECUTE_NO 0
#define EXECUTE_POSSIBLE 1
#define EXECUTE_YES 2
@@ -60,10 +60,10 @@ class Bitmap;
class SVT_DLLPUBLIC TTProperties : public ApplicationProperty
{
- USHORT nDonePRs; // Verwaltung für die Properties, die nur einmal gerufen werden mussen.
- SVT_DLLPRIVATE BOOL RequestProperty( USHORT nRequest );
+ sal_uInt16 nDonePRs; // Verwaltung f�r die Properties, die nur einmal gerufen werden mussen.
+ SVT_DLLPRIVATE sal_Bool RequestProperty( sal_uInt16 nRequest );
- BOOL HasSlots(){ return nPropertyVersion == TT_PROPERTIES_VERSION; }
+ sal_Bool HasSlots(){ return nPropertyVersion == TT_PROPERTIES_VERSION; }
public:
TYPEINFO();
@@ -75,31 +75,31 @@ public:
, nPropertyVersion( 0 )
{}
- BOOL GetSlots();
+ sal_Bool GetSlots();
/// ExecuteFunction
- USHORT mnSID;
+ sal_uInt16 mnSID;
SfxPoolItem** mppArgs;
- USHORT mnMode;
- USHORT ExecuteFunction( USHORT nSID, SfxPoolItem** ppArgs = NULL, USHORT nMode = 0 );
+ sal_uInt16 mnMode;
+ sal_uInt16 ExecuteFunction( sal_uInt16 nSID, SfxPoolItem** ppArgs = NULL, sal_uInt16 nMode = 0 );
/// Img
Bitmap *mpBmp;
- BOOL Img( Bitmap *pBmp );
+ sal_Bool Img( Bitmap *pBmp );
- static SvtResId GetSvtResId( USHORT nId );
+ static SvtResId GetSvtResId( sal_uInt16 nId );
- ULONG nSidOpenUrl;
- ULONG nSidFileName;
- ULONG nSidNewDocDirect;
- ULONG nSidCopy;
- ULONG nSidPaste;
- ULONG nSidSourceView;
- ULONG nSidSelectAll;
- ULONG nSidReferer;
+ sal_uLong nSidOpenUrl;
+ sal_uLong nSidFileName;
+ sal_uLong nSidNewDocDirect;
+ sal_uLong nSidCopy;
+ sal_uLong nSidPaste;
+ sal_uLong nSidSourceView;
+ sal_uLong nSidSelectAll;
+ sal_uLong nSidReferer;
- USHORT nActualPR;
- USHORT nPropertyVersion; // Wird bei jedem call gesetzt.
+ sal_uInt16 nActualPR;
+ sal_uInt16 nPropertyVersion; // Wird bei jedem call gesetzt.
};
#endif // _SVTOOLS_TTPROPS_HXX
diff --git a/svtools/inc/svtools/txtattr.hxx b/svtools/inc/svtools/txtattr.hxx
index 29723a38129b..46e0c82b6760 100644
--- a/svtools/inc/svtools/txtattr.hxx
+++ b/svtools/inc/svtools/txtattr.hxx
@@ -48,17 +48,17 @@ class Font;
class SVT_DLLPUBLIC TextAttrib
{
private:
- USHORT mnWhich;
+ sal_uInt16 mnWhich;
protected:
- TextAttrib( USHORT nWhich ) { mnWhich = nWhich; }
+ TextAttrib( sal_uInt16 nWhich ) { mnWhich = nWhich; }
TextAttrib( const TextAttrib& rAttr ) { mnWhich = rAttr.mnWhich; }
public:
virtual ~TextAttrib();
- USHORT Which() const { return mnWhich; }
+ sal_uInt16 Which() const { return mnWhich; }
virtual void SetFont( Font& rFont ) const = 0;
virtual TextAttrib* Clone() const = 0;
@@ -150,84 +150,84 @@ class TextCharAttrib
{
private:
TextAttrib* mpAttr;
- USHORT mnStart;
- USHORT mnEnd;
+ sal_uInt16 mnStart;
+ sal_uInt16 mnEnd;
protected:
public:
- TextCharAttrib( const TextAttrib& rAttr, USHORT nStart, USHORT nEnd );
+ TextCharAttrib( const TextAttrib& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
TextCharAttrib( const TextCharAttrib& rTextCharAttrib );
~TextCharAttrib();
const TextAttrib& GetAttr() const { return *mpAttr; }
- USHORT Which() const { return mpAttr->Which(); }
+ sal_uInt16 Which() const { return mpAttr->Which(); }
- USHORT GetStart() const { return mnStart; }
- USHORT& GetStart() { return mnStart; }
+ sal_uInt16 GetStart() const { return mnStart; }
+ sal_uInt16& GetStart() { return mnStart; }
- USHORT GetEnd() const { return mnEnd; }
- USHORT& GetEnd() { return mnEnd; }
+ sal_uInt16 GetEnd() const { return mnEnd; }
+ sal_uInt16& GetEnd() { return mnEnd; }
- inline USHORT GetLen() const;
+ inline sal_uInt16 GetLen() const;
- inline void MoveForward( USHORT nDiff );
- inline void MoveBackward( USHORT nDiff );
+ inline void MoveForward( sal_uInt16 nDiff );
+ inline void MoveBackward( sal_uInt16 nDiff );
- inline void Expand( USHORT nDiff );
- inline void Collaps( USHORT nDiff );
+ inline void Expand( sal_uInt16 nDiff );
+ inline void Collaps( sal_uInt16 nDiff );
- inline BOOL IsIn( USHORT nIndex );
- inline BOOL IsInside( USHORT nIndex );
- inline BOOL IsEmpty();
+ inline sal_Bool IsIn( sal_uInt16 nIndex );
+ inline sal_Bool IsInside( sal_uInt16 nIndex );
+ inline sal_Bool IsEmpty();
};
-inline USHORT TextCharAttrib::GetLen() const
+inline sal_uInt16 TextCharAttrib::GetLen() const
{
DBG_ASSERT( mnEnd >= mnStart, "TextCharAttrib: nEnd < nStart!" );
return mnEnd-mnStart;
}
-inline void TextCharAttrib::MoveForward( USHORT nDiff )
+inline void TextCharAttrib::MoveForward( sal_uInt16 nDiff )
{
DBG_ASSERT( ((long)mnEnd + nDiff) <= 0xFFFF, "TextCharAttrib: MoveForward?!" );
mnStart = mnStart + nDiff;
mnEnd = mnEnd + nDiff;
}
-inline void TextCharAttrib::MoveBackward( USHORT nDiff )
+inline void TextCharAttrib::MoveBackward( sal_uInt16 nDiff )
{
DBG_ASSERT( ((long)mnStart - nDiff) >= 0, "TextCharAttrib: MoveBackward?!" );
mnStart = mnStart - nDiff;
mnEnd = mnEnd - nDiff;
}
-inline void TextCharAttrib::Expand( USHORT nDiff )
+inline void TextCharAttrib::Expand( sal_uInt16 nDiff )
{
DBG_ASSERT( ( ((long)mnEnd + nDiff) <= (long)0xFFFF ), "TextCharAttrib: Expand?!" );
mnEnd = mnEnd + nDiff;
}
-inline void TextCharAttrib::Collaps( USHORT nDiff )
+inline void TextCharAttrib::Collaps( sal_uInt16 nDiff )
{
DBG_ASSERT( (long)mnEnd - nDiff >= (long)mnStart, "TextCharAttrib: Collaps?!" );
mnEnd = mnEnd - nDiff;
}
-inline BOOL TextCharAttrib::IsIn( USHORT nIndex )
+inline sal_Bool TextCharAttrib::IsIn( sal_uInt16 nIndex )
{
return ( ( mnStart <= nIndex ) && ( mnEnd >= nIndex ) );
}
-inline BOOL TextCharAttrib::IsInside( USHORT nIndex )
+inline sal_Bool TextCharAttrib::IsInside( sal_uInt16 nIndex )
{
return ( ( mnStart < nIndex ) && ( mnEnd > nIndex ) );
}
-inline BOOL TextCharAttrib::IsEmpty()
+inline sal_Bool TextCharAttrib::IsEmpty()
{
return mnStart == mnEnd;
}
diff --git a/svtools/inc/svtools/unitconv.hxx b/svtools/inc/svtools/unitconv.hxx
index becc41543396..c612506501b2 100644
--- a/svtools/inc/svtools/unitconv.hxx
+++ b/svtools/inc/svtools/unitconv.hxx
@@ -43,11 +43,11 @@ typedef long (*FUNC_CONVERT)(long);
// Functions -------------------------------------------------------------
-SVT_DLLPUBLIC void SetFieldUnit( MetricField& rCtrl, FieldUnit eUnit, BOOL bAll = FALSE );
-SVT_DLLPUBLIC void SetFieldUnit( MetricBox& rCtrl, FieldUnit eUnit, BOOL bAll = FALSE );
+SVT_DLLPUBLIC void SetFieldUnit( MetricField& rCtrl, FieldUnit eUnit, sal_Bool bAll = sal_False );
+SVT_DLLPUBLIC void SetFieldUnit( MetricBox& rCtrl, FieldUnit eUnit, sal_Bool bAll = sal_False );
SVT_DLLPUBLIC long CalcToUnit( float nIn, SfxMapUnit eUnit );
-SVT_DLLPUBLIC long CalcToPoint( long nIn, SfxMapUnit eUnit, USHORT nFaktor );
+SVT_DLLPUBLIC long CalcToPoint( long nIn, SfxMapUnit eUnit, sal_uInt16 nFaktor );
SVT_DLLPUBLIC long ItemToControl( long nIn, SfxMapUnit eItem, SfxFieldUnit eCtrl );
SVT_DLLPUBLIC long ControlToItem( long nIn, SfxFieldUnit eCtrl, SfxMapUnit eItem );
diff --git a/svtools/inc/svtools/valueset.hxx b/svtools/inc/svtools/valueset.hxx
index 0937d824daf0..620f20cffb46 100644
--- a/svtools/inc/svtools/valueset.hxx
+++ b/svtools/inc/svtools/valueset.hxx
@@ -149,7 +149,7 @@ Mit CalcWindowSizePixel() kann die genaue Fenstergroesse fuer eine bestimmte
Itemgroesse berechnet werden. Dazu muessen vorher aber alle relevanten
Daten (Spaltenanzahl/...) gesetzt werden und falls keine Zeilenanzahl
eingestellt wird, muessen auch alle Items eingefuegt werden. Falls das
-Window mit WB_BORDER/Border=TRUE erzeugt wurde, muss die Groesse mit
+Window mit WB_BORDER/Border=sal_True erzeugt wurde, muss die Groesse mit
SetOutputSizePixel() gesetzt werden, im anderen Fall koennen auch die
anderen Groessen-Methoden benutzt werden. Mit CalcItemSize() laesst sich
die innere und aeussere Groesse eines Items berechnen (dabei wird der
@@ -169,7 +169,7 @@ Da die Ausgabeflaeche vorberechnet wird, sollten erst alle Items eingefuegt
werden und dann erst Show() aufgerufen werden. Wenn dies nicht gemacht wird,
erscheint das erste Paint etwas langsamer. Deshalb sollte, wenn dieses
Control aus der Resource geladen wird und das Control erst im Programm
-mit Items versorgt wird, mit Hide = TRUE geladen werden und im Programm
+mit Items versorgt wird, mit Hide = sal_True geladen werden und im Programm
dann mit Show() angezeigt werden.
Bei einem sichbaren Control kann die Erzeugung der neuen Ausgabeflaeche
@@ -179,7 +179,7 @@ vor dem Paint aktiviert werden, indem Format() aufgerufen wird.
Wenn man ein Drag and Drop aus dem ValueSet heraus starten will, muss
der Command-Handler ueberlagert werden. Aus diesem muss dann StartDrag
-aufgerufen werden. Wenn diese Methode TRUE zurueckliefert, kann mit
+aufgerufen werden. Wenn diese Methode sal_True zurueckliefert, kann mit
ExecuteDrag() der Drag-Vorgang gestartet werden, ansonsten sollte keine
Verarbeitung stattfinden. Diese Methode sorgt dafuer, das das ValueSet
seine Verarbeitung abbricht und gegebenenfalls den Eintrag selektiert. Es
@@ -218,7 +218,7 @@ gewuenschten WinBits (vor Show) mit SetStyle() gesetzt werden.
// - ValueSet-Item-Typen -
// -----------------------
-#define VIB_NODOUBLECLICK ((USHORT)0x0080)
+#define VIB_NODOUBLECLICK ((sal_uInt16)0x0080)
// ------------------
// - ValueSet-Typen -
@@ -237,8 +237,8 @@ gewuenschten WinBits (vor Show) mit SetStyle() gesetzt werden.
// - ValueSet -
// ------------
-#define VALUESET_APPEND ((USHORT)0xFFFF)
-#define VALUESET_ITEM_NOTFOUND ((USHORT)0xFFFF)
+#define VALUESET_APPEND ((sal_uInt16)0xFFFF)
+#define VALUESET_ITEM_NOTFOUND ((sal_uInt16)0xFFFF)
class SVT_DLLPUBLIC ValueSet : public Control
{
@@ -254,27 +254,27 @@ private:
long mnLines;
long mnUserItemWidth;
long mnUserItemHeight;
- USHORT mnOldItemId;
- USHORT mnSelItemId;
- USHORT mnHighItemId;
- USHORT mnDropPos;
- USHORT mnCols;
- USHORT mnCurCol;
- USHORT mnUserCols;
- USHORT mnUserVisLines;
- USHORT mnFirstLine;
- USHORT mnSpacing;
- USHORT mnFrameStyle;
- BOOL mbFormat;
- BOOL mbHighlight;
- BOOL mbSelection;
- BOOL mbNoSelection;
- BOOL mbDrawSelection;
- BOOL mbBlackSel;
- BOOL mbDoubleSel;
- BOOL mbScroll;
- BOOL mbDropPos;
- BOOL mbFullMode;
+ sal_uInt16 mnOldItemId;
+ sal_uInt16 mnSelItemId;
+ sal_uInt16 mnHighItemId;
+ sal_uInt16 mnDropPos;
+ sal_uInt16 mnCols;
+ sal_uInt16 mnCurCol;
+ sal_uInt16 mnUserCols;
+ sal_uInt16 mnUserVisLines;
+ sal_uInt16 mnFirstLine;
+ sal_uInt16 mnSpacing;
+ sal_uInt16 mnFrameStyle;
+ sal_Bool mbFormat;
+ sal_Bool mbHighlight;
+ sal_Bool mbSelection;
+ sal_Bool mbNoSelection;
+ sal_Bool mbDrawSelection;
+ sal_Bool mbBlackSel;
+ sal_Bool mbDoubleSel;
+ sal_Bool mbScroll;
+ sal_Bool mbDropPos;
+ sal_Bool mbFullMode;
Color maColor;
Link maDoubleClickHdl;
Link maSelectHdl;
@@ -285,27 +285,27 @@ private:
using Control::ImplInitSettings;
using Window::ImplInit;
SVT_DLLPRIVATE void ImplInit();
- SVT_DLLPRIVATE void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
+ SVT_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
SVT_DLLPRIVATE void ImplInitScrollBar();
SVT_DLLPRIVATE void ImplDeleteItems();
SVT_DLLPRIVATE void ImplFormatItem( ValueSetItem* pItem );
SVT_DLLPRIVATE void ImplDrawItemText( const XubString& rStr );
SVT_DLLPRIVATE void ImplDrawSelect();
- SVT_DLLPRIVATE void ImplHideSelect( USHORT nItemId );
- SVT_DLLPRIVATE void ImplHighlightItem( USHORT nItemId, BOOL bIsSelection = TRUE );
- SVT_DLLPRIVATE void ImplDrawDropPos( BOOL bShow );
+ SVT_DLLPRIVATE void ImplHideSelect( sal_uInt16 nItemId );
+ SVT_DLLPRIVATE void ImplHighlightItem( sal_uInt16 nItemId, sal_Bool bIsSelection = sal_True );
+ SVT_DLLPRIVATE void ImplDrawDropPos( sal_Bool bShow );
SVT_DLLPRIVATE void ImplDraw();
using Window::ImplScroll;
- SVT_DLLPRIVATE BOOL ImplScroll( const Point& rPos );
- SVT_DLLPRIVATE USHORT ImplGetItem( const Point& rPoint, BOOL bMove = FALSE ) const;
- SVT_DLLPRIVATE ValueSetItem* ImplGetItem( USHORT nPos );
+ SVT_DLLPRIVATE sal_Bool ImplScroll( const Point& rPos );
+ SVT_DLLPRIVATE sal_uInt16 ImplGetItem( const Point& rPoint, sal_Bool bMove = sal_False ) const;
+ SVT_DLLPRIVATE ValueSetItem* ImplGetItem( sal_uInt16 nPos );
SVT_DLLPRIVATE ValueSetItem* ImplGetFirstItem();
- SVT_DLLPRIVATE USHORT ImplGetVisibleItemCount() const;
- SVT_DLLPRIVATE ValueSetItem* ImplGetVisibleItem( USHORT nVisiblePos );
+ SVT_DLLPRIVATE sal_uInt16 ImplGetVisibleItemCount() const;
+ SVT_DLLPRIVATE ValueSetItem* ImplGetVisibleItem( sal_uInt16 nVisiblePos );
SVT_DLLPRIVATE void ImplFireAccessibleEvent( short nEventId, const ::com::sun::star::uno::Any& rOldValue, const ::com::sun::star::uno::Any& rNewValue );
- SVT_DLLPRIVATE BOOL ImplHasAccessibleListeners();
- SVT_DLLPRIVATE void ImplTracking( const Point& rPos, BOOL bRepeat );
- SVT_DLLPRIVATE void ImplEndTracking( const Point& rPos, BOOL bCancel );
+ SVT_DLLPRIVATE sal_Bool ImplHasAccessibleListeners();
+ SVT_DLLPRIVATE void ImplTracking( const Point& rPos, sal_Bool bRepeat );
+ SVT_DLLPRIVATE void ImplEndTracking( const Point& rPos, sal_Bool bCancel );
DECL_DLLPRIVATE_LINK( ImplScrollHdl, ScrollBar* );
DECL_DLLPRIVATE_LINK( ImplTimerHdl, Timer* );
#endif
@@ -316,8 +316,8 @@ private:
protected:
- BOOL StartDrag( const CommandEvent& rCEvt, Region& rRegion );
- USHORT ShowDropPos( const Point& rPos );
+ sal_Bool StartDrag( const CommandEvent& rCEvt, Region& rRegion );
+ sal_uInt16 ShowDropPos( const Point& rPos );
void HideDropPos();
protected:
@@ -347,68 +347,68 @@ public:
virtual void DoubleClick();
virtual void UserDraw( const UserDrawEvent& rUDEvt );
- void InsertItem( USHORT nItemId, const Image& rImage,
- USHORT nPos = VALUESET_APPEND );
- void InsertItem( USHORT nItemId, const Color& rColor,
- USHORT nPos = VALUESET_APPEND );
- void InsertItem( USHORT nItemId,
+ void InsertItem( sal_uInt16 nItemId, const Image& rImage,
+ sal_uInt16 nPos = VALUESET_APPEND );
+ void InsertItem( sal_uInt16 nItemId, const Color& rColor,
+ sal_uInt16 nPos = VALUESET_APPEND );
+ void InsertItem( sal_uInt16 nItemId,
const Image& rImage, const XubString& rStr,
- USHORT nPos = VALUESET_APPEND );
- void InsertItem( USHORT nItemId,
+ sal_uInt16 nPos = VALUESET_APPEND );
+ void InsertItem( sal_uInt16 nItemId,
const Color& rColor, const XubString& rStr,
- USHORT nPos = VALUESET_APPEND );
- void InsertItem( USHORT nItemId,
- USHORT nPos = VALUESET_APPEND );
- void InsertSpace( USHORT nItemId,
- USHORT nPos = VALUESET_APPEND );
- void RemoveItem( USHORT nItemId );
+ sal_uInt16 nPos = VALUESET_APPEND );
+ void InsertItem( sal_uInt16 nItemId,
+ sal_uInt16 nPos = VALUESET_APPEND );
+ void InsertSpace( sal_uInt16 nItemId,
+ sal_uInt16 nPos = VALUESET_APPEND );
+ void RemoveItem( sal_uInt16 nItemId );
void CopyItems( const ValueSet& rValueSet );
void Clear();
- USHORT GetItemCount() const;
- USHORT GetItemPos( USHORT nItemId ) const;
- USHORT GetItemId( USHORT nPos ) const;
- USHORT GetItemId( const Point& rPos ) const;
- Rectangle GetItemRect( USHORT nItemId ) const;
-
- void EnableFullItemMode( BOOL bFullMode = TRUE );
- BOOL IsFullItemModeEnabled() const { return mbFullMode; }
- void SetColCount( USHORT nNewCols = 1 );
- USHORT GetColCount() const { return mnUserCols; }
- void SetLineCount( USHORT nNewLines = 0 );
- USHORT GetLineCount() const { return mnUserVisLines; }
+ sal_uInt16 GetItemCount() const;
+ sal_uInt16 GetItemPos( sal_uInt16 nItemId ) const;
+ sal_uInt16 GetItemId( sal_uInt16 nPos ) const;
+ sal_uInt16 GetItemId( const Point& rPos ) const;
+ Rectangle GetItemRect( sal_uInt16 nItemId ) const;
+
+ void EnableFullItemMode( sal_Bool bFullMode = sal_True );
+ sal_Bool IsFullItemModeEnabled() const { return mbFullMode; }
+ void SetColCount( sal_uInt16 nNewCols = 1 );
+ sal_uInt16 GetColCount() const { return mnUserCols; }
+ void SetLineCount( sal_uInt16 nNewLines = 0 );
+ sal_uInt16 GetLineCount() const { return mnUserVisLines; }
void SetItemWidth( long nItemWidth = 0 );
long GetItemWidth() const { return mnUserItemWidth; }
void SetItemHeight( long nLineHeight = 0 );
long GetItemHeight() const { return mnUserItemHeight; }
- void SetFirstLine( USHORT nNewLine = 0 );
- USHORT GetFirstLine() const { return mnFirstLine; }
+ void SetFirstLine( sal_uInt16 nNewLine = 0 );
+ sal_uInt16 GetFirstLine() const { return mnFirstLine; }
- void SelectItem( USHORT nItemId );
- USHORT GetSelectItemId() const { return mnSelItemId; }
- BOOL IsItemSelected( USHORT nItemId ) const
- { return ((!mbNoSelection && (nItemId == mnSelItemId)) ? TRUE : FALSE); }
+ void SelectItem( sal_uInt16 nItemId );
+ sal_uInt16 GetSelectItemId() const { return mnSelItemId; }
+ sal_Bool IsItemSelected( sal_uInt16 nItemId ) const
+ { return ((!mbNoSelection && (nItemId == mnSelItemId)) ? sal_True : sal_False); }
void SetNoSelection();
- BOOL IsNoSelection() const { return mbNoSelection; }
-
- void SetItemBits( USHORT nItemId, USHORT nBits );
- USHORT GetItemBits( USHORT nItemId ) const;
- void SetItemImage( USHORT nItemId, const Image& rImage );
- Image GetItemImage( USHORT nItemId ) const;
- void SetItemColor( USHORT nItemId, const Color& rColor );
- Color GetItemColor( USHORT nItemId ) const;
- void SetItemData( USHORT nItemId, void* pData );
- void* GetItemData( USHORT nItemId ) const;
- void SetItemText( USHORT nItemId, const XubString& rStr );
- XubString GetItemText( USHORT nItemId ) const;
+ sal_Bool IsNoSelection() const { return mbNoSelection; }
+
+ void SetItemBits( sal_uInt16 nItemId, sal_uInt16 nBits );
+ sal_uInt16 GetItemBits( sal_uInt16 nItemId ) const;
+ void SetItemImage( sal_uInt16 nItemId, const Image& rImage );
+ Image GetItemImage( sal_uInt16 nItemId ) const;
+ void SetItemColor( sal_uInt16 nItemId, const Color& rColor );
+ Color GetItemColor( sal_uInt16 nItemId ) const;
+ void SetItemData( sal_uInt16 nItemId, void* pData );
+ void* GetItemData( sal_uInt16 nItemId ) const;
+ void SetItemText( sal_uInt16 nItemId, const XubString& rStr );
+ XubString GetItemText( sal_uInt16 nItemId ) const;
void SetColor( const Color& rColor );
void SetColor() { SetColor( Color( COL_TRANSPARENT ) ); }
Color GetColor() const { return maColor; }
- BOOL IsColor() const { return maColor.GetTransparency() == 0; }
+ sal_Bool IsColor() const { return maColor.GetTransparency() == 0; }
- void SetExtraSpacing( USHORT nNewSpacing );
- USHORT GetExtraSpacing() { return mnSpacing; }
+ void SetExtraSpacing( sal_uInt16 nNewSpacing );
+ sal_uInt16 GetExtraSpacing() { return mnSpacing; }
void Format();
@@ -416,9 +416,9 @@ public:
void EndSelection();
Size CalcWindowSizePixel( const Size& rItemSize,
- USHORT nCalcCols = 0,
- USHORT nCalcLines = 0 );
- Size CalcItemSizePixel( const Size& rSize, BOOL bOut = TRUE ) const;
+ sal_uInt16 nCalcCols = 0,
+ sal_uInt16 nCalcLines = 0 );
+ Size CalcItemSizePixel( const Size& rSize, sal_Bool bOut = sal_True ) const;
long GetScrollWidth() const;
void SetSelectHdl( const Link& rLink ) { maSelectHdl = rLink; }
diff --git a/svtools/inc/svtools/wallitem.hxx b/svtools/inc/svtools/wallitem.hxx
index 533d5ae3f6d3..e8b45c080198 100644
--- a/svtools/inc/svtools/wallitem.hxx
+++ b/svtools/inc/svtools/wallitem.hxx
@@ -46,7 +46,7 @@ class Window;
class SfxItemSet;
typedef void* (*CreateSvxBrushTabPage)(Window *pParent, const SfxItemSet &rAttrSet);
-typedef USHORT* (*GetSvxBrushTabPageRanges)();
+typedef sal_uInt16* (*GetSvxBrushTabPageRanges)();
class Graphic;
class String;
diff --git a/svtools/inc/svtools/wizardmachine.hxx b/svtools/inc/svtools/wizardmachine.hxx
index 02562ac4bb63..5212fd67aed3 100644
--- a/svtools/inc/svtools/wizardmachine.hxx
+++ b/svtools/inc/svtools/wizardmachine.hxx
@@ -153,8 +153,8 @@ namespace svt
// restrict access to some aspects of our base class
SVT_DLLPRIVATE void AddPage( TabPage* pPage ) { WizardDialog::AddPage(pPage); }
SVT_DLLPRIVATE void RemovePage( TabPage* pPage ) { WizardDialog::RemovePage(pPage); }
- SVT_DLLPRIVATE void SetPage( USHORT nLevel, TabPage* pPage ) { WizardDialog::SetPage(nLevel, pPage); }
- // TabPage* GetPage( USHORT nLevel ) const { return WizardDialog::GetPage(nLevel); }
+ SVT_DLLPRIVATE void SetPage( sal_uInt16 nLevel, TabPage* pPage ) { WizardDialog::SetPage(nLevel, pPage); }
+ // TabPage* GetPage( sal_uInt16 nLevel ) const { return WizardDialog::GetPage(nLevel); }
// TODO: probably the complete page handling (next, previous etc.) should be prohibited ...
// IMPORTANT:
diff --git a/svtools/inc/svtools/wizdlg.hxx b/svtools/inc/svtools/wizdlg.hxx
index 5bd2db5672ed..cda86da2d249 100644
--- a/svtools/inc/svtools/wizdlg.hxx
+++ b/svtools/inc/svtools/wizdlg.hxx
@@ -66,7 +66,7 @@ berechnet und genommen.
ShowPrevPage()/ShowNextPage() zeigt die vorherige/naechste TabPage
an. Dazu wird zuerst der Deactivate-Handler vom Dialog gerufen und
-wenn dieser TRUE zurueckgegeben hat, wird der Acivate-Handler
+wenn dieser sal_True zurueckgegeben hat, wird der Acivate-Handler
vom Dialog gerufen und die entsprechende TabPage angezeigt.
Finnsh() kann gerufen werden, wenn der Finnish-Button betaetigt
wird. Dort wird dann auch noch der Deactivate-Page-Handler vom
@@ -117,10 +117,10 @@ Level 0 die erste Seite ist.
Der DeactivatePage()-Handler wird gerufen, wenn eine neue TabPage
angezeigt werden soll. In diesem Handler kann noch eine Fehler-
ueberprufung stattfinden und das Umschalten gegebenenfalls verhindert
-werden, indem FALSE zurueckgegeben wird. Der Handler kann auch als
+werden, indem sal_False zurueckgegeben wird. Der Handler kann auch als
Link gesetzt werden. Die Defaultimplementierung ruft den Link und
gibt den Rueckgabewert des Links zurueck und wenn kein Link gesetzt
-ist, wird TRUE zurueckgegeben.
+ist, wird sal_True zurueckgegeben.
--------------------------------------------------------------------------
@@ -146,7 +146,7 @@ maNextBtn.SetClickHdl( LINK( this, MyWizardDlg, ImplNextHdl ) );
SetViewWindow( &maPreview );
// Show line between Buttons and Page
-ShowButtonFixedLine( TRUE );
+ShowButtonFixedLine( sal_True );
// Call ActivatePage, because the first page should be created an activated
ActivatePage();
@@ -229,7 +229,7 @@ private:
PushButton* mpPrevBtn;
PushButton* mpNextBtn;
Window* mpViewWindow;
- USHORT mnCurLevel;
+ sal_uInt16 mnCurLevel;
WindowAlign meViewAlign;
Link maActivateHdl;
Link maDeactivateHdl;
@@ -257,7 +257,7 @@ private:
SVT_DLLPRIVATE void ImplPosCtrls();
SVT_DLLPRIVATE void ImplPosTabPage();
SVT_DLLPRIVATE void ImplShowTabPage( TabPage* pPage );
- SVT_DLLPRIVATE TabPage* ImplGetPage( USHORT nLevel ) const;
+ SVT_DLLPRIVATE TabPage* ImplGetPage( sal_uInt16 nLevel ) const;
#endif
public:
@@ -272,16 +272,16 @@ public:
virtual void ActivatePage();
virtual long DeactivatePage();
- BOOL ShowPrevPage();
- BOOL ShowNextPage();
- BOOL ShowPage( USHORT nLevel );
- BOOL Finnish( long nResult = 0 );
- USHORT GetCurLevel() const { return mnCurLevel; }
+ sal_Bool ShowPrevPage();
+ sal_Bool ShowNextPage();
+ sal_Bool ShowPage( sal_uInt16 nLevel );
+ sal_Bool Finnish( long nResult = 0 );
+ sal_uInt16 GetCurLevel() const { return mnCurLevel; }
void AddPage( TabPage* pPage );
void RemovePage( TabPage* pPage );
- void SetPage( USHORT nLevel, TabPage* pPage );
- TabPage* GetPage( USHORT nLevel ) const;
+ void SetPage( sal_uInt16 nLevel, TabPage* pPage );
+ TabPage* GetPage( sal_uInt16 nLevel ) const;
void AddButton( Button* pButton, long nOffset = 0 );
void RemoveButton( Button* pButton );
@@ -291,8 +291,8 @@ public:
void SetNextButton( PushButton* pButton ) { mpNextBtn = pButton; }
PushButton* GetNextButton() const { return mpNextBtn; }
- void ShowButtonFixedLine( BOOL bVisible );
- BOOL IsButtonFixedLineVisible();
+ void ShowButtonFixedLine( sal_Bool bVisible );
+ sal_Bool IsButtonFixedLineVisible();
void SetViewWindow( Window* pWindow ) { mpViewWindow = pWindow; }
Window* GetViewWindow() const { return mpViewWindow; }
diff --git a/svtools/inc/svtools/wmf.hxx b/svtools/inc/svtools/wmf.hxx
index a41b6180747b..678540beae32 100644
--- a/svtools/inc/svtools/wmf.hxx
+++ b/svtools/inc/svtools/wmf.hxx
@@ -31,16 +31,16 @@
#include "svtools/svtdllapi.h"
#include <svtools/fltcall.hxx>
-BOOL ConvertWMFToGDIMetaFile( SvStream & rStreamWMF, GDIMetaFile & rGDIMetaFile, FilterConfigItem* pConfigItem = NULL );
+sal_Bool ConvertWMFToGDIMetaFile( SvStream & rStreamWMF, GDIMetaFile & rGDIMetaFile, FilterConfigItem* pConfigItem = NULL );
-SVT_DLLPUBLIC BOOL ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigItem* pConfigItem );
+SVT_DLLPUBLIC sal_Bool ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigItem* pConfigItem );
-SVT_DLLPUBLIC BOOL ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pConfigItem = NULL, BOOL bPlaceable = TRUE );
+SVT_DLLPUBLIC sal_Bool ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pConfigItem = NULL, sal_Bool bPlaceable = sal_True );
-BOOL ConvertGDIMetaFileToEMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pConfigItem = NULL );
+sal_Bool ConvertGDIMetaFileToEMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pConfigItem = NULL );
-SVT_DLLPUBLIC BOOL WriteWindowMetafile( SvStream& rStream, const GDIMetaFile& rMTF );
+SVT_DLLPUBLIC sal_Bool WriteWindowMetafile( SvStream& rStream, const GDIMetaFile& rMTF );
-SVT_DLLPUBLIC BOOL WriteWindowMetafileBits( SvStream& rStream, const GDIMetaFile& rMTF );
+SVT_DLLPUBLIC sal_Bool WriteWindowMetafileBits( SvStream& rStream, const GDIMetaFile& rMTF );
#endif
diff --git a/svtools/inc/svtools/xtextedt.hxx b/svtools/inc/svtools/xtextedt.hxx
index 46c6441e005e..6b133fbe8c75 100644
--- a/svtools/inc/svtools/xtextedt.hxx
+++ b/svtools/inc/svtools/xtextedt.hxx
@@ -31,10 +31,6 @@
#include <svtools/texteng.hxx>
#include <svtools/textview.hxx>
-#define XTEXTUNDO_REPLACEALL (XTEXTUNDO_START+1)
-#define XTEXTUNDO_INDENTBLOCK 122
-#define XTEXTUNDO_UNINDENTBLOCK 123
-
namespace com {
namespace sun {
namespace star {
@@ -55,25 +51,25 @@ public:
void SetGroupChars( const String& r ) { maGroupChars = r; }
TextSelection MatchGroup( const TextPaM& rCursor ) const;
- BOOL Search( TextSelection& rSel, const ::com::sun::star::util::SearchOptions& rSearchOptions, BOOL bForward = TRUE );
+ sal_Bool Search( TextSelection& rSel, const ::com::sun::star::util::SearchOptions& rSearchOptions, sal_Bool bForward = sal_True );
};
class SVT_DLLPUBLIC ExtTextView : public TextView
{
protected:
- BOOL ImpIndentBlock( BOOL bRight );
+ sal_Bool ImpIndentBlock( sal_Bool bRight );
public:
ExtTextView( ExtTextEngine* pEng, Window* pWindow );
~ExtTextView();
- BOOL MatchGroup();
+ sal_Bool MatchGroup();
- BOOL Search( const ::com::sun::star::util::SearchOptions& rSearchOptions, BOOL bForward );
- USHORT Replace( const ::com::sun::star::util::SearchOptions& rSearchOptions, BOOL bAll, BOOL bForward );
+ sal_Bool Search( const ::com::sun::star::util::SearchOptions& rSearchOptions, sal_Bool bForward );
+ sal_uInt16 Replace( const ::com::sun::star::util::SearchOptions& rSearchOptions, sal_Bool bAll, sal_Bool bForward );
- BOOL IndentBlock();
- BOOL UnindentBlock();
+ sal_Bool IndentBlock();
+ sal_Bool UnindentBlock();
};
#endif // _XTEXTEDT_HXX
diff --git a/svtools/inc/svtools/xwindowitem.hxx b/svtools/inc/svtools/xwindowitem.hxx
index eca425cf1369..7e639904245f 100644
--- a/svtools/inc/svtools/xwindowitem.hxx
+++ b/svtools/inc/svtools/xwindowitem.hxx
@@ -52,8 +52,8 @@ class SVT_DLLPUBLIC XWindowItem : public SfxPoolItem
public:
TYPEINFO();
XWindowItem();
- explicit XWindowItem( USHORT nWhich, Window * pWin );
- XWindowItem( USHORT nWhich, com::sun::star::uno::Reference< com::sun::star::awt::XWindow > & rxWin );
+ explicit XWindowItem( sal_uInt16 nWhich, Window * pWin );
+ XWindowItem( sal_uInt16 nWhich, com::sun::star::uno::Reference< com::sun::star::awt::XWindow > & rxWin );
XWindowItem( const XWindowItem &rItem );
~XWindowItem();
diff --git a/svtools/prj/build.lst b/svtools/prj/build.lst
index 3f9e02b26ca3..ff9aa6a9875c 100644
--- a/svtools/prj/build.lst
+++ b/svtools/prj/build.lst
@@ -1,3 +1,2 @@
-st svtools : l10n svl offuh toolkit ucbhelper unotools JPEG:jpeg cppu cppuhelper comphelper sal sot jvmfwk LIBXSLT:libxslt NULL
+st svtools : L10N:l10n svl offuh toolkit ucbhelper unotools JPEG:jpeg cppu cppuhelper comphelper sal sot jvmfwk LIBXSLT:libxslt NULL
st svtools\prj nmake - all st_prj NULL
-st svtools\qa\unoapi nmake - all st_qa_unoapi NULL
diff --git a/svtools/prj/makefile.mk b/svtools/prj/makefile.mk
index c73a3d944bbf..e312a7ccab65 100644
--- a/svtools/prj/makefile.mk
+++ b/svtools/prj/makefile.mk
@@ -37,4 +37,4 @@ VERBOSEFLAG := -s
.ENDIF
all:
- cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET)
+ cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog
diff --git a/svtools/qa/unoapi/Test.java b/svtools/qa/unoapi/Test.java
index 8ae4af55ed61..b17f870d0b99 100644
--- a/svtools/qa/unoapi/Test.java
+++ b/svtools/qa/unoapi/Test.java
@@ -27,6 +27,7 @@ package org.openoffice.svtools.qa.unoapi;
import org.openoffice.Runner;
import org.openoffice.test.OfficeConnection;
+import org.openoffice.test.Argument;
import static org.junit.Assert.*;
public final class Test {
@@ -43,8 +44,8 @@ public final class Test {
@org.junit.Test public void test() {
assertTrue(
Runner.run(
- "-sce", "svtools.sce", "-xcl", "knownissues.xcl", "-cs",
- connection.getDescription()));
+ "-sce", Argument.get("sce"), "-xcl", Argument.get("xcl"), "-tdoc",
+ Argument.get("tdoc"), "-cs", connection.getDescription()));
}
private final OfficeConnection connection = new OfficeConnection();
diff --git a/svtools/qa/unoapi/makefile.mk b/svtools/qa/unoapi/makefile.mk
deleted file mode 100644
index e3afb77e637a..000000000000
--- a/svtools/qa/unoapi/makefile.mk
+++ /dev/null
@@ -1,48 +0,0 @@
-#*************************************************************************
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#***********************************************************************/
-
-.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
-nothing .PHONY:
-.ELSE
-
-PRJ = ../..
-PRJNAME = svtools
-TARGET = qa_unoapi
-
-.IF "$(OOO_JUNIT_JAR)" != ""
-PACKAGE = org/openoffice/svtools/qa/unoapi
-JAVATESTFILES = Test.java
-JAVAFILES = $(JAVATESTFILES)
-JARFILES = OOoRunner.jar ridl.jar test.jar
-EXTRAJARFILES = $(OOO_JUNIT_JAR)
-.END
-
-.INCLUDE: settings.mk
-.INCLUDE: target.mk
-.INCLUDE: installationtest.mk
-
-ALLTAR : javatest
-
-.END
diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx
index 3a29c4ae63fa..09fe2880fec0 100644
--- a/svtools/source/brwbox/brwbox1.cxx
+++ b/svtools/source/brwbox/brwbox1.cxx
@@ -99,7 +99,7 @@ namespace
void BrowseBox::ConstructImpl( BrowserMode nMode )
{
DBG_TRACE1( "BrowseBox: %p->ConstructImpl", this );
- bMultiSelection = FALSE;
+ bMultiSelection = sal_False;
pColSel = 0;
pDataWin = 0;
pVScroll = 0;
@@ -112,26 +112,26 @@ void BrowseBox::ConstructImpl( BrowserMode nMode )
InitSettings_Impl( this );
InitSettings_Impl( pDataWin );
- bBootstrapped = FALSE;
+ bBootstrapped = sal_False;
nDataRowHeight = 0;
nTitleLines = 1;
nFirstCol = 0;
nTopRow = 0;
nCurRow = BROWSER_ENDOFSELECTION;
nCurColId = 0;
- bResizing = FALSE;
- bSelect = FALSE;
- bSelecting = FALSE;
- bScrolling = FALSE;
- bSelectionIsVisible = FALSE;
- bNotToggleSel = FALSE;
- bRowDividerDrag = FALSE;
- bHit = FALSE;
- mbInteractiveRowHeight = FALSE;
- bHideSelect = FALSE;
+ bResizing = sal_False;
+ bSelect = sal_False;
+ bSelecting = sal_False;
+ bScrolling = sal_False;
+ bSelectionIsVisible = sal_False;
+ bNotToggleSel = sal_False;
+ bRowDividerDrag = sal_False;
+ bHit = sal_False;
+ mbInteractiveRowHeight = sal_False;
+ bHideSelect = sal_False;
bHideCursor = NO_CURSOR_HIDE;
nRowCount = 0;
- m_bFocusOnlyCursor = TRUE;
+ m_bFocusOnlyCursor = sal_True;
m_aCursorColor = COL_TRANSPARENT;
m_nCurrentMode = 0;
nControlAreaWidth = USHRT_MAX;
@@ -194,7 +194,7 @@ BrowseBox::~BrowseBox()
delete pVScroll;
// free columns-space
- for ( USHORT n = 0; n < pCols->Count(); ++n )
+ for ( sal_uInt16 n = 0; n < pCols->Count(); ++n )
delete pCols->GetObject(n);
delete pCols;
delete pColSel;
@@ -271,18 +271,18 @@ void BrowseBox::SetFont( const Font& rNewFont )
//-------------------------------------------------------------------
-ULONG BrowseBox::GetDefaultColumnWidth( const String& _rText ) const
+sal_uLong BrowseBox::GetDefaultColumnWidth( const String& _rText ) const
{
return GetDataWindow().GetTextWidth( _rText ) + GetDataWindow().GetTextWidth( '0' ) * 4;
}
//-------------------------------------------------------------------
-void BrowseBox::InsertHandleColumn( ULONG nWidth )
+void BrowseBox::InsertHandleColumn( sal_uLong nWidth )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- pCols->Insert( new BrowserColumn( 0, Image(), String(), nWidth, GetZoom(), 0 ), (ULONG) 0 );
+ pCols->Insert( new BrowserColumn( 0, Image(), String(), nWidth, GetZoom(), 0 ), (sal_uLong) 0 );
FreezeColumn( 0 );
// Headerbar anpassen
@@ -301,19 +301,19 @@ void BrowseBox::InsertHandleColumn( ULONG nWidth )
}
//-------------------------------------------------------------------
-void BrowseBox::InsertDataColumn( USHORT nItemId, const Image& rImage,
- long nWidth, HeaderBarItemBits nBits, USHORT nPos )
+void BrowseBox::InsertDataColumn( sal_uInt16 nItemId, const Image& rImage,
+ long nWidth, HeaderBarItemBits nBits, sal_uInt16 nPos )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
pCols->Insert( new BrowserColumn( nItemId, rImage, String(), nWidth, GetZoom(), nBits ),
- Min( nPos, (USHORT)(pCols->Count()) ) );
+ Min( nPos, (sal_uInt16)(pCols->Count()) ) );
if ( nCurColId == 0 )
nCurColId = nItemId;
if ( getDataWindow()->pHeaderBar )
{
// Handlecolumn nicht in der Headerbar
- USHORT nHeaderPos = nPos;
+ sal_uInt16 nHeaderPos = nPos;
if (nHeaderPos != HEADERBAR_APPEND && !GetColumnId(0))
nHeaderPos--;
getDataWindow()->pHeaderBar->InsertItem(
@@ -324,20 +324,20 @@ void BrowseBox::InsertDataColumn( USHORT nItemId, const Image& rImage,
//-------------------------------------------------------------------
-void BrowseBox::InsertDataColumn( USHORT nItemId, const XubString& rText,
- long nWidth, HeaderBarItemBits nBits, USHORT nPos )
+void BrowseBox::InsertDataColumn( sal_uInt16 nItemId, const XubString& rText,
+ long nWidth, HeaderBarItemBits nBits, sal_uInt16 nPos )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
pCols->Insert( new BrowserColumn( nItemId, Image(), rText, nWidth, GetZoom(), nBits ),
- Min( nPos, (USHORT)(pCols->Count()) ) );
+ Min( nPos, (sal_uInt16)(pCols->Count()) ) );
if ( nCurColId == 0 )
nCurColId = nItemId;
if ( getDataWindow()->pHeaderBar )
{
// Handlecolumn nicht in der Headerbar
- USHORT nHeaderPos = nPos;
+ sal_uInt16 nHeaderPos = nPos;
if (nHeaderPos != HEADERBAR_APPEND && !GetColumnId(0))
nHeaderPos--;
getDataWindow()->pHeaderBar->InsertItem(
@@ -348,21 +348,21 @@ void BrowseBox::InsertDataColumn( USHORT nItemId, const XubString& rText,
//-------------------------------------------------------------------
-void BrowseBox::InsertDataColumn( USHORT nItemId,
+void BrowseBox::InsertDataColumn( sal_uInt16 nItemId,
const Image& rImage, const XubString& rText,
- long nWidth, HeaderBarItemBits nBits, USHORT nPos,
+ long nWidth, HeaderBarItemBits nBits, sal_uInt16 nPos,
const String* pHelpText )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
pCols->Insert( new BrowserColumn( nItemId, rImage, rText, nWidth, GetZoom(), nBits ),
- Min( nPos, (USHORT)(pCols->Count()) ) );
+ Min( nPos, (sal_uInt16)(pCols->Count()) ) );
if ( nCurColId == 0 )
nCurColId = nItemId;
if ( getDataWindow()->pHeaderBar )
{
// Handlecolumn nicht in der Headerbar
- USHORT nHeaderPos = nPos;
+ sal_uInt16 nHeaderPos = nPos;
if (nHeaderPos != HEADERBAR_APPEND && !GetColumnId(0))
nHeaderPos--;
@@ -377,20 +377,20 @@ void BrowseBox::InsertDataColumn( USHORT nItemId,
ColumnInserted( nPos );
}
//-------------------------------------------------------------------
-USHORT BrowseBox::ToggleSelectedColumn()
+sal_uInt16 BrowseBox::ToggleSelectedColumn()
{
- USHORT nSelectedColId = USHRT_MAX;
+ sal_uInt16 nSelectedColId = USHRT_MAX;
if ( pColSel && pColSel->GetSelectCount() )
{
DoHideCursor( "ToggleSelectedColumn" );
ToggleSelection();
nSelectedColId = pCols->GetObject(pColSel->FirstSelected())->GetId();
- pColSel->SelectAll(FALSE);
+ pColSel->SelectAll(sal_False);
}
return nSelectedColId;
}
// -----------------------------------------------------------------------------
-void BrowseBox::SetToggledSelectedColumn(USHORT _nSelectedColumnId)
+void BrowseBox::SetToggledSelectedColumn(sal_uInt16 _nSelectedColumnId)
{
if ( pColSel && _nSelectedColumnId != USHRT_MAX )
{
@@ -401,7 +401,7 @@ void BrowseBox::SetToggledSelectedColumn(USHORT _nSelectedColumnId)
}
}
// -----------------------------------------------------------------------------
-void BrowseBox::FreezeColumn( USHORT nItemId, BOOL bFreeze )
+void BrowseBox::FreezeColumn( sal_uInt16 nItemId, sal_Bool bFreeze )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -410,7 +410,7 @@ void BrowseBox::FreezeColumn( USHORT nItemId, BOOL bFreeze )
return;
// get the position in the current array
- USHORT nItemPos = GetColumnPos( nItemId );
+ sal_uInt16 nItemPos = GetColumnPos( nItemId );
if ( nItemPos >= pCols->Count() )
// not available!
return;
@@ -420,7 +420,7 @@ void BrowseBox::FreezeColumn( USHORT nItemId, BOOL bFreeze )
return;
// remark the column selection
- USHORT nSelectedColId = ToggleSelectedColumn();
+ sal_uInt16 nSelectedColId = ToggleSelectedColumn();
// freeze or unfreeze?
if ( bFreeze )
@@ -429,11 +429,11 @@ void BrowseBox::FreezeColumn( USHORT nItemId, BOOL bFreeze )
if ( nItemPos != 0 && !pCols->GetObject(nItemPos-1)->IsFrozen() )
{
// move to the right of the last frozen column
- USHORT nFirstScrollable = FrozenColCount();
+ sal_uInt16 nFirstScrollable = FrozenColCount();
BrowserColumn *pColumn = pCols->GetObject(nItemPos);
- pCols->Remove( (ULONG) nItemPos );
+ pCols->Remove( (sal_uLong) nItemPos );
nItemPos = nFirstScrollable;
- pCols->Insert( pColumn, (ULONG) nItemPos );
+ pCols->Insert( pColumn, (sal_uLong) nItemPos );
}
// adjust the number of the first scrollable and visible column
@@ -446,11 +446,11 @@ void BrowseBox::FreezeColumn( USHORT nItemId, BOOL bFreeze )
if ( nItemPos != FrozenColCount()-1 )
{
// move to the leftmost scrollable colum
- USHORT nFirstScrollable = FrozenColCount();
+ sal_uInt16 nFirstScrollable = FrozenColCount();
BrowserColumn *pColumn = pCols->GetObject(nItemPos);
- pCols->Remove( (ULONG) nItemPos );
+ pCols->Remove( (sal_uLong) nItemPos );
nItemPos = nFirstScrollable;
- pCols->Insert( pColumn, (ULONG) nItemPos );
+ pCols->Insert( pColumn, (sal_uLong) nItemPos );
}
// adjust the number of the first scrollable and visible column
@@ -473,7 +473,7 @@ void BrowseBox::FreezeColumn( USHORT nItemId, BOOL bFreeze )
//-------------------------------------------------------------------
-void BrowseBox::SetColumnPos( USHORT nColumnId, USHORT nPos )
+void BrowseBox::SetColumnPos( sal_uInt16 nColumnId, sal_uInt16 nPos )
{
// never set pos of the handle-column
if ( nColumnId == 0 )
@@ -484,7 +484,7 @@ void BrowseBox::SetColumnPos( USHORT nColumnId, USHORT nPos )
return;
// get the position in the current array
- USHORT nOldPos = GetColumnPos( nColumnId );
+ sal_uInt16 nOldPos = GetColumnPos( nColumnId );
if ( nOldPos >= pCols->Count() )
// not available!
return;
@@ -493,7 +493,7 @@ void BrowseBox::SetColumnPos( USHORT nColumnId, USHORT nPos )
if (nOldPos != nPos)
{
// remark the column selection
- USHORT nSelectedColId = ToggleSelectedColumn();
+ sal_uInt16 nSelectedColId = ToggleSelectedColumn();
// determine old column area
Size aDataWinSize( pDataWin->GetSizePixel() );
@@ -503,7 +503,7 @@ void BrowseBox::SetColumnPos( USHORT nColumnId, USHORT nPos )
Rectangle aFromRect( GetFieldRect( nColumnId) );
aFromRect.Right() += 2*MIN_COLUMNWIDTH;
- USHORT nNextPos = nOldPos + 1;
+ sal_uInt16 nNextPos = nOldPos + 1;
if ( nOldPos > nPos )
nNextPos = nOldPos - 1;
@@ -546,7 +546,7 @@ void BrowseBox::SetColumnPos( USHORT nColumnId, USHORT nPos )
// adjust header bar positions
if ( getDataWindow()->pHeaderBar )
{
- USHORT nNewPos = nPos;
+ sal_uInt16 nNewPos = nPos;
if ( !GetColumnId(0) )
--nNewPos;
getDataWindow()->pHeaderBar->MoveItem(nColumnId,nNewPos);
@@ -588,7 +588,7 @@ void BrowseBox::SetColumnPos( USHORT nColumnId, USHORT nPos )
//-------------------------------------------------------------------
-void BrowseBox::SetColumnMode( USHORT nColumnId, BrowserColumnMode nFlags )
+void BrowseBox::SetColumnMode( sal_uInt16 nColumnId, BrowserColumnMode nFlags )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -597,7 +597,7 @@ void BrowseBox::SetColumnMode( USHORT nColumnId, BrowserColumnMode nFlags )
return;
// get the position in the current array
- USHORT nColumnPos = GetColumnPos( nColumnId );
+ sal_uInt16 nColumnPos = GetColumnPos( nColumnId );
if ( nColumnPos >= pCols->Count() )
// not available!
return;
@@ -617,7 +617,7 @@ void BrowseBox::SetColumnMode( USHORT nColumnId, BrowserColumnMode nFlags )
//-------------------------------------------------------------------
-void BrowseBox::SetColumnTitle( USHORT nItemId, const String& rTitle )
+void BrowseBox::SetColumnTitle( sal_uInt16 nItemId, const String& rTitle )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -626,7 +626,7 @@ void BrowseBox::SetColumnTitle( USHORT nItemId, const String& rTitle )
return;
// get the position in the current array
- USHORT nItemPos = GetColumnPos( nItemId );
+ sal_uInt16 nItemPos = GetColumnPos( nItemId );
if ( nItemPos >= pCols->Count() )
// not available!
return;
@@ -664,12 +664,12 @@ void BrowseBox::SetColumnTitle( USHORT nItemId, const String& rTitle )
//-------------------------------------------------------------------
-void BrowseBox::SetColumnWidth( USHORT nItemId, ULONG nWidth )
+void BrowseBox::SetColumnWidth( sal_uInt16 nItemId, sal_uLong nWidth )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
// get the position in the current array
- USHORT nItemPos = GetColumnPos( nItemId );
+ sal_uInt16 nItemPos = GetColumnPos( nItemId );
if ( nItemPos >= pCols->Count() )
return;
@@ -686,7 +686,7 @@ void BrowseBox::SetColumnWidth( USHORT nItemId, ULONG nWidth )
nMaxWidth -= getDataWindow()->bAutoSizeLastCol
? GetFieldRect(nItemId).Left()
: GetFrozenWidth();
- if ( ( (BrowserDataWin*)pDataWin )->bAutoSizeLastCol || nWidth > (ULONG)nMaxWidth )
+ if ( ( (BrowserDataWin*)pDataWin )->bAutoSizeLastCol || nWidth > (sal_uLong)nMaxWidth )
{
nWidth = nMaxWidth > 16 ? nMaxWidth : nOldWidth;
nWidth = QueryColumnResize( nItemId, nWidth );
@@ -697,11 +697,11 @@ void BrowseBox::SetColumnWidth( USHORT nItemId, ULONG nWidth )
// In AutoSizeLastColumn() wird SetColumnWidth mit nWidth==0xffff
// gerufen. Deshalb muss hier nochmal geprueft werden, ob sich die
// Breite tatsaechlich geaendert hat.
- if( (ULONG)nOldWidth == nWidth )
+ if( (sal_uLong)nOldWidth == nWidth )
return;
// soll die Aenderung sofort dargestellt werden?
- BOOL bUpdate = GetUpdateMode() &&
+ sal_Bool bUpdate = GetUpdateMode() &&
( pCols->GetObject(nItemPos)->IsFrozen() || nItemPos >= nFirstCol );
if ( bUpdate )
@@ -729,7 +729,7 @@ void BrowseBox::SetColumnWidth( USHORT nItemId, ULONG nWidth )
{
// X-Pos der veraenderten Spalte ermitteln
long nX = 0;
- for ( USHORT nCol = 0; nCol < nItemPos; ++nCol )
+ for ( sal_uInt16 nCol = 0; nCol < nItemPos; ++nCol )
{
BrowserColumn *pCol = pCols->GetObject(nCol);
if ( pCol->IsFrozen() || nCol >= nFirstCol )
@@ -738,18 +738,18 @@ void BrowseBox::SetColumnWidth( USHORT nItemId, ULONG nWidth )
// eigentliches scroll+invalidate
pDataWin->SetClipRegion();
- BOOL bSelVis = bSelectionIsVisible;
- bSelectionIsVisible = FALSE;
+ sal_Bool bSelVis = bSelectionIsVisible;
+ bSelectionIsVisible = sal_False;
if( GetBackground().IsScrollable() )
{
- Rectangle aScrRect( nX + std::min( (ULONG)nOldWidth, nWidth ), 0,
+ Rectangle aScrRect( nX + std::min( (sal_uLong)nOldWidth, nWidth ), 0,
GetSizePixel().Width() , // the header is longer than the datawin
pDataWin->GetPosPixel().Y() - 1 );
Control::Scroll( nWidth-nOldWidth, 0, aScrRect, SCROLL_FLAGS );
aScrRect.Bottom() = pDataWin->GetSizePixel().Height();
getDataWindow()->Scroll( nWidth-nOldWidth, 0, aScrRect, SCROLL_FLAGS );
- Rectangle aInvRect( nX, 0, nX + std::max( nWidth, (ULONG)nOldWidth ), USHRT_MAX );
+ Rectangle aInvRect( nX, 0, nX + std::max( nWidth, (sal_uLong)nOldWidth ), USHRT_MAX );
Control::Invalidate( aInvRect, INVALIDATE_NOCHILDREN );
( (BrowserDataWin*)pDataWin )->Invalidate( aInvRect );
}
@@ -787,7 +787,7 @@ void BrowseBox::AutoSizeLastColumn()
if ( getDataWindow()->bAutoSizeLastCol &&
getDataWindow()->GetUpdateMode() )
{
- USHORT nId = GetColumnId( (USHORT)pCols->Count() - 1 );
+ sal_uInt16 nId = GetColumnId( (sal_uInt16)pCols->Count() - 1 );
SetColumnWidth( nId, LONG_MAX );
ColumnResized( nId );
}
@@ -795,12 +795,12 @@ void BrowseBox::AutoSizeLastColumn()
//-------------------------------------------------------------------
-void BrowseBox::RemoveColumn( USHORT nItemId )
+void BrowseBox::RemoveColumn( sal_uInt16 nItemId )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
// Spaltenposition ermitteln
- USHORT nPos = GetColumnPos(nItemId);
+ sal_uInt16 nPos = GetColumnPos(nItemId);
if ( nPos >= ColCount() )
// nicht vorhanden
return;
@@ -814,7 +814,7 @@ void BrowseBox::RemoveColumn( USHORT nItemId )
nCurColId = 0;
// Spalte entfernen
- delete( pCols->Remove( (ULONG) nPos ));
+ delete( pCols->Remove( (sal_uLong) nPos ));
// OJ #93534#
if ( nFirstCol >= nPos && nFirstCol > FrozenColCount() )
{
@@ -884,12 +884,12 @@ void BrowseBox::RemoveColumns()
unsigned int nOldCount = pCols->Count();
// alle Spalten entfernen
while ( pCols->Count() )
- delete ( pCols->Remove( (ULONG) 0 ));
+ delete ( pCols->Remove( (sal_uLong) 0 ));
// Spaltenselektion korrigieren
if ( pColSel )
{
- pColSel->SelectAll(FALSE);
+ pColSel->SelectAll(sal_False);
pColSel->SetTotalRange( Range( 0, 0 ) );
}
@@ -947,11 +947,11 @@ void BrowseBox::RemoveColumns()
//-------------------------------------------------------------------
-String BrowseBox::GetColumnTitle( USHORT nId ) const
+String BrowseBox::GetColumnTitle( sal_uInt16 nId ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- USHORT nItemPos = GetColumnPos( nId );
+ sal_uInt16 nItemPos = GetColumnPos( nId );
if ( nItemPos >= pCols->Count() )
return String();
return pCols->GetObject(nItemPos)->Title();
@@ -966,11 +966,11 @@ long BrowseBox::GetRowCount() const
//-------------------------------------------------------------------
-USHORT BrowseBox::ColCount() const
+sal_uInt16 BrowseBox::ColCount() const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- return (USHORT) pCols->Count();
+ return (sal_uInt16) pCols->Count();
}
//-------------------------------------------------------------------
@@ -999,7 +999,7 @@ void BrowseBox::SetDataRowHeight( long nPixel )
//-------------------------------------------------------------------
-void BrowseBox::SetTitleLines( USHORT nLines )
+void BrowseBox::SetTitleLines( sal_uInt16 nLines )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -1019,9 +1019,9 @@ long BrowseBox::ScrollColumns( long nCols )
// implicitly hides cursor while scrolling
StartScroll();
- bScrolling = TRUE;
- BOOL bScrollable = pDataWin->GetBackground().IsScrollable();
- BOOL bInvalidateView = FALSE;
+ bScrolling = sal_True;
+ sal_Bool bScrollable = pDataWin->GetBackground().IsScrollable();
+ sal_Bool bInvalidateView = sal_False;
// scrolling one column to the right?
if ( nCols == 1 )
@@ -1032,7 +1032,7 @@ long BrowseBox::ScrollColumns( long nCols )
if ( !bScrollable )
{
- bInvalidateView = TRUE;
+ bInvalidateView = sal_True;
}
else
{
@@ -1078,7 +1078,7 @@ long BrowseBox::ScrollColumns( long nCols )
if ( !bScrollable )
{
- bInvalidateView = TRUE;
+ bInvalidateView = sal_True;
}
else
{
@@ -1113,7 +1113,7 @@ long BrowseBox::ScrollColumns( long nCols )
pDataWin->GetSizePixel() ) );
}
- nFirstCol = nFirstCol + (USHORT)nCols;
+ nFirstCol = nFirstCol + (sal_uInt16)nCols;
aHScroll.SetThumbPos( nFirstCol - FrozenColCount() );
}
@@ -1121,7 +1121,7 @@ long BrowseBox::ScrollColumns( long nCols )
if ( getDataWindow()->pHeaderBar )
{
long nWidth = 0;
- for ( USHORT nCol = 0;
+ for ( sal_uInt16 nCol = 0;
nCol < pCols->Count() && nCol < nFirstCol;
++nCol )
{
@@ -1145,7 +1145,7 @@ long BrowseBox::ScrollColumns( long nCols )
getDataWindow()->Update();
Update();
}
- bScrolling = FALSE;
+ bScrolling = sal_False;
EndScroll();
return nCols;
@@ -1169,8 +1169,8 @@ long BrowseBox::ScrollRows( long nRows )
if ( nNewTopRow == nTopRow )
return 0;
- USHORT nVisibleRows =
- (USHORT)(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1);
+ sal_uInt16 nVisibleRows =
+ (sal_uInt16)(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1);
VisibleRowsChanged(nNewTopRow, nVisibleRows);
@@ -1220,7 +1220,7 @@ long BrowseBox::ScrollPages( long )
//-------------------------------------------------------------------
-void BrowseBox::RowModified( long nRow, USHORT nColId )
+void BrowseBox::RowModified( long nRow, sal_uInt16 nColId )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -1235,7 +1235,7 @@ void BrowseBox::RowModified( long nRow, USHORT nColId )
else
{
// invalidate the specific field
- aRect = GetFieldRectPixel( nRow, nColId, FALSE );
+ aRect = GetFieldRectPixel( nRow, nColId, sal_False );
}
getDataWindow()->Invalidate( aRect );
}
@@ -1301,7 +1301,7 @@ void BrowseBox::Clear()
}
}
// -----------------------------------------------------------------------------
-void BrowseBox::RowInserted( long nRow, long nNumRows, BOOL bDoPaint, BOOL bKeepSelection )
+void BrowseBox::RowInserted( long nRow, long nNumRows, sal_Bool bDoPaint, sal_Bool bKeepSelection )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -1324,7 +1324,7 @@ void BrowseBox::RowInserted( long nRow, long nNumRows, BOOL bDoPaint, BOOL bKeep
#endif
// adjust total row count
- BOOL bLastRow = nRow >= nRowCount;
+ sal_Bool bLastRow = nRow >= nRowCount;
nRowCount += nNumRows;
DoHideCursor( "RowInserted" );
@@ -1368,9 +1368,9 @@ void BrowseBox::RowInserted( long nRow, long nNumRows, BOOL bDoPaint, BOOL bKeep
// adjust the cursor
if ( nCurRow == BROWSER_ENDOFSELECTION )
- GoToRow( 0, FALSE, bKeepSelection );
+ GoToRow( 0, sal_False, bKeepSelection );
else if ( nRow <= nCurRow )
- GoToRow( nCurRow += nNumRows, FALSE, bKeepSelection );
+ GoToRow( nCurRow += nNumRows, sal_False, bKeepSelection );
// adjust the vertical scrollbar
if ( bDoPaint )
@@ -1417,7 +1417,7 @@ void BrowseBox::RowInserted( long nRow, long nNumRows, BOOL bDoPaint, BOOL bKeep
//-------------------------------------------------------------------
-void BrowseBox::RowRemoved( long nRow, long nNumRows, BOOL bDoPaint )
+void BrowseBox::RowRemoved( long nRow, long nNumRows, sal_Bool bDoPaint )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -1590,20 +1590,20 @@ void BrowseBox::RowRemoved( long nRow, long nNumRows, BOOL bDoPaint )
//-------------------------------------------------------------------
-BOOL BrowseBox::GoToRow( long nRow)
+sal_Bool BrowseBox::GoToRow( long nRow)
{
- return GoToRow(nRow, FALSE, FALSE);
+ return GoToRow(nRow, sal_False, sal_False);
}
//-------------------------------------------------------------------
-BOOL BrowseBox::GoToRowAndDoNotModifySelection( long nRow )
+sal_Bool BrowseBox::GoToRowAndDoNotModifySelection( long nRow )
{
- return GoToRow( nRow, FALSE, TRUE );
+ return GoToRow( nRow, sal_False, sal_True );
}
//-------------------------------------------------------------------
-BOOL BrowseBox::GoToRow( long nRow, BOOL bRowColMove, BOOL bKeepSelection )
+sal_Bool BrowseBox::GoToRow( long nRow, sal_Bool bRowColMove, sal_Bool bKeepSelection )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -1611,22 +1611,22 @@ BOOL BrowseBox::GoToRow( long nRow, BOOL bRowColMove, BOOL bKeepSelection )
// nothing to do?
if ( nRow == nCurRow && ( bMultiSelection || uRow.nSel == nRow ) )
- return TRUE;
+ return sal_True;
// out of range?
if ( nRow < 0 || nRow >= nRowCount )
- return FALSE;
+ return sal_False;
// nicht erlaubt?
if ( ( !bRowColMove && !IsCursorMoveAllowed( nRow, nCurColId ) ) )
- return FALSE;
+ return sal_False;
if ( getDataWindow()->bNoScrollBack && nRow < nTopRow )
nRow = nTopRow;
// compute the last visible row
Size aSz( pDataWin->GetSizePixel() );
- USHORT nVisibleRows = USHORT( aSz.Height() / GetDataRowHeight() - 1 );
+ sal_uInt16 nVisibleRows = sal_uInt16( aSz.Height() / GetDataRowHeight() - 1 );
long nLastRow = nTopRow + nVisibleRows;
// suspend Updates
@@ -1638,11 +1638,11 @@ BOOL BrowseBox::GoToRow( long nRow, BOOL bRowColMove, BOOL bKeepSelection )
DoHideCursor( "GoToRow" );
// must we scroll?
- BOOL bWasVisible = bSelectionIsVisible;
+ sal_Bool bWasVisible = bSelectionIsVisible;
if (! bMultiSelection)
{
if( !bKeepSelection )
- bSelectionIsVisible = FALSE;
+ bSelectionIsVisible = sal_False;
}
if ( nRow < nTopRow )
ScrollRows( nRow - nTopRow );
@@ -1684,46 +1684,46 @@ BOOL BrowseBox::GoToRow( long nRow, BOOL bRowColMove, BOOL bKeepSelection )
if ( !bSelecting )
Select();
else
- bSelect = TRUE;
+ bSelect = sal_True;
}
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------
-BOOL BrowseBox::GoToColumnId( USHORT nColId)
+sal_Bool BrowseBox::GoToColumnId( sal_uInt16 nColId)
{
- return GoToColumnId(nColId,TRUE,FALSE);
+ return GoToColumnId(nColId,sal_True,sal_False);
}
-BOOL BrowseBox::GoToColumnId( USHORT nColId, BOOL bMakeVisible, BOOL bRowColMove)
+sal_Bool BrowseBox::GoToColumnId( sal_uInt16 nColId, sal_Bool bMakeVisible, sal_Bool bRowColMove)
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
if (!bColumnCursor)
- return FALSE;
+ return sal_False;
// erlaubt?
if (!bRowColMove && !IsCursorMoveAllowed( nCurRow, nColId ) )
- return FALSE;
+ return sal_False;
- if ( nColId != nCurColId || (bMakeVisible && !IsFieldVisible(nCurRow, nColId, TRUE)))
+ if ( nColId != nCurColId || (bMakeVisible && !IsFieldVisible(nCurRow, nColId, sal_True)))
{
- USHORT nNewPos = GetColumnPos(nColId);
+ sal_uInt16 nNewPos = GetColumnPos(nColId);
BrowserColumn* pColumn = pCols->GetObject( nNewPos );
DBG_ASSERT( pColumn, "no column object - invalid id?" );
if ( !pColumn )
- return FALSE;
+ return sal_False;
DoHideCursor( "GoToColumnId" );
nCurColId = nColId;
- USHORT nFirstPos = nFirstCol;
- USHORT nWidth = (USHORT)pColumn->Width();
- USHORT nLastPos = GetColumnAtXPosPixel(
- pDataWin->GetSizePixel().Width()-nWidth, FALSE );
- USHORT nFrozen = FrozenColCount();
+ sal_uInt16 nFirstPos = nFirstCol;
+ sal_uInt16 nWidth = (sal_uInt16)pColumn->Width();
+ sal_uInt16 nLastPos = GetColumnAtXPosPixel(
+ pDataWin->GetSizePixel().Width()-nWidth, sal_False );
+ sal_uInt16 nFrozen = FrozenColCount();
if ( bMakeVisible && nLastPos &&
nNewPos >= nFrozen && ( nNewPos < nFirstPos || nNewPos > nLastPos ) )
{
@@ -1736,35 +1736,35 @@ BOOL BrowseBox::GoToColumnId( USHORT nColId, BOOL bMakeVisible, BOOL bRowColMove
DoShowCursor( "GoToColumnId" );
if (!bRowColMove)
CursorMoved();
- return TRUE;
+ return sal_True;
}
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------
-BOOL BrowseBox::GoToRowColumnId( long nRow, USHORT nColId )
+sal_Bool BrowseBox::GoToRowColumnId( long nRow, sal_uInt16 nColId )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
// out of range?
if ( nRow < 0 || nRow >= nRowCount )
- return FALSE;
+ return sal_False;
if (!bColumnCursor)
- return FALSE;
+ return sal_False;
// nothing to do ?
if ( nRow == nCurRow && ( bMultiSelection || uRow.nSel == nRow ) &&
- nColId == nCurColId && IsFieldVisible(nCurRow, nColId, TRUE))
- return TRUE;
+ nColId == nCurColId && IsFieldVisible(nCurRow, nColId, sal_True))
+ return sal_True;
// erlaubt?
if (!IsCursorMoveAllowed(nRow, nColId))
- return FALSE;
+ return sal_False;
DoHideCursor( "GoToRowColumnId" );
- BOOL bMoved = GoToRow(nRow, TRUE) && GoToColumnId(nColId, TRUE, TRUE);
+ sal_Bool bMoved = GoToRow(nRow, sal_True) && GoToColumnId(nColId, sal_True, sal_True);
DoShowCursor( "GoToRowColumnId" );
if (bMoved)
@@ -1791,15 +1791,15 @@ void BrowseBox::SetNoSelection()
// unselect all
if ( bMultiSelection )
- uRow.pSel->SelectAll(FALSE);
+ uRow.pSel->SelectAll(sal_False);
else
uRow.nSel = BROWSER_ENDOFSELECTION;
if ( pColSel )
- pColSel->SelectAll(FALSE);
+ pColSel->SelectAll(sal_False);
if ( !bSelecting )
Select();
else
- bSelect = TRUE;
+ bSelect = sal_True;
// restore screen
DBG_TRACE1( "BrowseBox: %p->ShowCursor", this );
@@ -1835,7 +1835,7 @@ void BrowseBox::SetSelection( const MultiSelection &rSel )
if ( !bSelecting )
Select();
else
- bSelect = TRUE;
+ bSelect = sal_True;
// restore screen
ToggleSelection();
@@ -1865,8 +1865,8 @@ void BrowseBox::SelectAll()
// select all rows
if ( pColSel )
- pColSel->SelectAll(FALSE);
- uRow.pSel->SelectAll(TRUE);
+ pColSel->SelectAll(sal_False);
+ uRow.pSel->SelectAll(sal_True);
// Handle-Column nicht highlighten
BrowserColumn *pFirstCol = pCols->GetObject(0);
@@ -1876,8 +1876,8 @@ void BrowseBox::SelectAll()
if ( !bHideSelect )
{
Rectangle aHighlightRect;
- USHORT nVisibleRows =
- (USHORT)(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1);
+ sal_uInt16 nVisibleRows =
+ (sal_uInt16)(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1);
for ( long nRow = Max( nTopRow, uRow.pSel->FirstSelected() );
nRow != BROWSER_ENDOFSELECTION && nRow < nTopRow + nVisibleRows;
nRow = uRow.pSel->NextSelected() )
@@ -1890,7 +1890,7 @@ void BrowseBox::SelectAll()
if ( !bSelecting )
Select();
else
- bSelect = TRUE;
+ bSelect = sal_True;
// restore screen
DBG_TRACE1( "BrowseBox: %p->ShowCursor", this );
@@ -1920,7 +1920,7 @@ void BrowseBox::SelectAll()
//-------------------------------------------------------------------
-void BrowseBox::SelectRow( long nRow, BOOL _bSelect, BOOL bExpand )
+void BrowseBox::SelectRow( long nRow, sal_Bool _bSelect, sal_Bool bExpand )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -1928,7 +1928,7 @@ void BrowseBox::SelectRow( long nRow, BOOL _bSelect, BOOL bExpand )
{
// deselecting is impossible, selecting via cursor
if ( _bSelect )
- GoToRow(nRow, FALSE);
+ GoToRow(nRow, sal_False);
return;
}
@@ -1939,11 +1939,11 @@ void BrowseBox::SelectRow( long nRow, BOOL _bSelect, BOOL bExpand )
{
ToggleSelection();
if ( bMultiSelection )
- uRow.pSel->SelectAll(FALSE);
+ uRow.pSel->SelectAll(sal_False);
else
uRow.nSel = BROWSER_ENDOFSELECTION;
if ( pColSel )
- pColSel->SelectAll(FALSE);
+ pColSel->SelectAll(sal_False);
}
// set new selection
@@ -1971,7 +1971,7 @@ void BrowseBox::SelectRow( long nRow, BOOL _bSelect, BOOL bExpand )
if ( !bSelecting )
Select();
else
- bSelect = TRUE;
+ bSelect = sal_True;
// restore screen
DBG_TRACE1( "BrowseBox: %p->ShowCursor", this );
@@ -2004,7 +2004,7 @@ long BrowseBox::GetSelectRowCount() const
//-------------------------------------------------------------------
-void BrowseBox::SelectColumnPos( USHORT nNewColPos, BOOL _bSelect, BOOL bMakeVisible )
+void BrowseBox::SelectColumnPos( sal_uInt16 nNewColPos, sal_Bool _bSelect, sal_Bool bMakeVisible )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -2026,10 +2026,10 @@ void BrowseBox::SelectColumnPos( USHORT nNewColPos, BOOL _bSelect, BOOL bMakeVis
DBG_TRACE1( "BrowseBox: %p->HideCursor", this );
ToggleSelection();
if ( bMultiSelection )
- uRow.pSel->SelectAll(FALSE);
+ uRow.pSel->SelectAll(sal_False);
else
uRow.nSel = BROWSER_ENDOFSELECTION;
- pColSel->SelectAll(FALSE);
+ pColSel->SelectAll(sal_False);
if ( pColSel->Select( nNewColPos, _bSelect ) )
{
@@ -2037,7 +2037,7 @@ void BrowseBox::SelectColumnPos( USHORT nNewColPos, BOOL _bSelect, BOOL bMakeVis
// only highlight painted areas
pDataWin->Update();
- Rectangle aFieldRectPix( GetFieldRectPixel( nCurRow, nCurColId, FALSE ) );
+ Rectangle aFieldRectPix( GetFieldRectPixel( nCurRow, nCurColId, sal_False ) );
Rectangle aRect(
Point( aFieldRectPix.Left() - MIN_COLUMNWIDTH, 0 ),
Size( pCols->GetObject(nNewColPos)->Width(),
@@ -2046,7 +2046,7 @@ void BrowseBox::SelectColumnPos( USHORT nNewColPos, BOOL _bSelect, BOOL bMakeVis
if ( !bSelecting )
Select();
else
- bSelect = TRUE;
+ bSelect = sal_True;
if ( isAccessibleAlive() )
{
@@ -2070,12 +2070,12 @@ void BrowseBox::SelectColumnPos( USHORT nNewColPos, BOOL _bSelect, BOOL bMakeVis
//-------------------------------------------------------------------
-USHORT BrowseBox::GetSelectColumnCount() const
+sal_uInt16 BrowseBox::GetSelectColumnCount() const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
// while bAutoSelect (==!pColSel), 1 if any rows (yes rows!) else none
- return pColSel ? (USHORT) pColSel->GetSelectCount() :
+ return pColSel ? (sal_uInt16) pColSel->GetSelectCount() :
nCurRow >= 0 ? 1 : 0;
}
@@ -2093,7 +2093,7 @@ long BrowseBox::NextSelectedColumn( ) const
//-------------------------------------------------------------------
-long BrowseBox::FirstSelectedRow( BOOL bInverse )
+long BrowseBox::FirstSelectedRow( sal_Bool bInverse )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -2138,7 +2138,7 @@ bool BrowseBox::IsRowSelected( long nRow ) const
//-------------------------------------------------------------------
-bool BrowseBox::IsColumnSelected( USHORT nColumnId ) const
+bool BrowseBox::IsColumnSelected( sal_uInt16 nColumnId ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -2157,11 +2157,11 @@ sal_Bool BrowseBox::IsAllSelected() const
//-------------------------------------------------------------------
-BOOL BrowseBox::MakeFieldVisible
+sal_Bool BrowseBox::MakeFieldVisible
(
long nRow, // Zeilen-Nr des Feldes (beginnend mit 0)
- USHORT nColId, // Spalten-Id des Feldes
- BOOL bComplete // (== FALSE), TRUE => vollst"andig sichtbar machen
+ sal_uInt16 nColId, // Spalten-Id des Feldes
+ sal_Bool bComplete // (== sal_False), sal_True => vollst"andig sichtbar machen
)
/* [Beschreibung]
@@ -2172,11 +2172,11 @@ BOOL BrowseBox::MakeFieldVisible
[R"uckgabewert]
- BOOL TRUE
+ sal_Bool sal_True
Das angegebene Feld wurde sichtbar gemacht, bzw. war
bereits sichtbar.
- FALSE
+ sal_False
Das angegebene Feld konnte nicht sichtbar bzw. bei
'bComplete' nicht vollst"andig sichtbar gemacht werden.
*/
@@ -2186,16 +2186,16 @@ BOOL BrowseBox::MakeFieldVisible
if ( !bBootstrapped ||
( aTestSize.Width() == 0 && aTestSize.Height() == 0 ) )
- return FALSE;
+ return sal_False;
// ist es schon sichtbar?
- BOOL bVisible = IsFieldVisible( nRow, nColId, bComplete );
+ sal_Bool bVisible = IsFieldVisible( nRow, nColId, bComplete );
if ( bVisible )
- return TRUE;
+ return sal_True;
// Spaltenposition und Feld-Rechteck und Ausgabebereich berechnen
- USHORT nColPos = GetColumnPos( nColId );
- Rectangle aFieldRect = GetFieldRectPixel( nRow, nColId, FALSE );
+ sal_uInt16 nColPos = GetColumnPos( nColId );
+ Rectangle aFieldRect = GetFieldRectPixel( nRow, nColId, sal_False );
Rectangle aDataRect = Rectangle( Point(0, 0), pDataWin->GetSizePixel() );
// links au\serhalb?
@@ -2212,7 +2212,7 @@ BOOL BrowseBox::MakeFieldVisible
if ( ScrollColumns( 1 ) != 1 )
// nichts mehr zu scrollen
break;
- aFieldRect = GetFieldRectPixel( nRow, nColId, FALSE );
+ aFieldRect = GetFieldRectPixel( nRow, nColId, sal_False );
}
// oben au\serhalb?
@@ -2238,19 +2238,19 @@ BOOL BrowseBox::MakeFieldVisible
//-------------------------------------------------------------------
-BOOL BrowseBox::IsFieldVisible( long nRow, USHORT nColumnId,
- BOOL bCompletely ) const
+sal_Bool BrowseBox::IsFieldVisible( long nRow, sal_uInt16 nColumnId,
+ sal_Bool bCompletely ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
// durch frozen-Column verdeckt?
- USHORT nColPos = GetColumnPos( nColumnId );
+ sal_uInt16 nColPos = GetColumnPos( nColumnId );
if ( nColPos >= FrozenColCount() && nColPos < nFirstCol )
- return FALSE;
+ return sal_False;
Rectangle aRect( ImplFieldRectPixel( nRow, nColumnId ) );
if ( aRect.IsEmpty() )
- return FALSE;
+ return sal_False;
// get the visible area
Rectangle aOutRect( Point(0, 0), pDataWin->GetOutputSizePixel() );
@@ -2265,8 +2265,8 @@ BOOL BrowseBox::IsFieldVisible( long nRow, USHORT nColumnId,
//-------------------------------------------------------------------
-Rectangle BrowseBox::GetFieldRectPixel( long nRow, USHORT nColumnId,
- BOOL bRelToBrowser) const
+Rectangle BrowseBox::GetFieldRectPixel( long nRow, sal_uInt16 nColumnId,
+ sal_Bool bRelToBrowser) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -2288,7 +2288,7 @@ Rectangle BrowseBox::GetFieldRectPixel( long nRow, USHORT nColumnId,
//-------------------------------------------------------------------
-Rectangle BrowseBox::GetRowRectPixel( long nRow, BOOL bRelToBrowser ) const
+Rectangle BrowseBox::GetRowRectPixel( long nRow, sal_Bool bRelToBrowser ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -2317,14 +2317,14 @@ Rectangle BrowseBox::GetRowRectPixel( long nRow, BOOL bRelToBrowser ) const
//-------------------------------------------------------------------
-Rectangle BrowseBox::ImplFieldRectPixel( long nRow, USHORT nColumnId ) const
+Rectangle BrowseBox::ImplFieldRectPixel( long nRow, sal_uInt16 nColumnId ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
// compute the X-coordinte realtiv to DataWin by accumulation
long nColX = 0;
- USHORT nFrozenCols = FrozenColCount();
- USHORT nCol;
+ sal_uInt16 nFrozenCols = FrozenColCount();
+ sal_uInt16 nCol;
for ( nCol = 0;
nCol < pCols->Count() && pCols->GetObject(nCol)->GetId() != nColumnId;
++nCol )
@@ -2348,7 +2348,7 @@ Rectangle BrowseBox::ImplFieldRectPixel( long nRow, USHORT nColumnId ) const
//-------------------------------------------------------------------
-long BrowseBox::GetRowAtYPosPixel( long nY, BOOL bRelToBrowser ) const
+long BrowseBox::GetRowAtYPosPixel( long nY, sal_Bool bRelToBrowser ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -2369,7 +2369,7 @@ long BrowseBox::GetRowAtYPosPixel( long nY, BOOL bRelToBrowser ) const
//-------------------------------------------------------------------
-Rectangle BrowseBox::GetFieldRect( USHORT nColumnId ) const
+Rectangle BrowseBox::GetFieldRect( sal_uInt16 nColumnId ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -2378,14 +2378,14 @@ Rectangle BrowseBox::GetFieldRect( USHORT nColumnId ) const
//-------------------------------------------------------------------
-USHORT BrowseBox::GetColumnAtXPosPixel( long nX, BOOL ) const
+sal_uInt16 BrowseBox::GetColumnAtXPosPixel( long nX, sal_Bool ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
// accumulate the withds of the visible columns
long nColX = 0;
- USHORT nCol;
- for ( nCol = 0; nCol < USHORT(pCols->Count()); ++nCol )
+ sal_uInt16 nCol;
+ for ( nCol = 0; nCol < sal_uInt16(pCols->Count()); ++nCol )
{
BrowserColumn *pCol = pCols->GetObject(nCol);
if ( pCol->IsFrozen() || nCol >= nFirstCol )
@@ -2400,7 +2400,7 @@ USHORT BrowseBox::GetColumnAtXPosPixel( long nX, BOOL ) const
//-------------------------------------------------------------------
-void BrowseBox::ReserveControlArea( USHORT nWidth )
+void BrowseBox::ReserveControlArea( sal_uInt16 nWidth )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -2461,9 +2461,9 @@ void BrowseBox::SetMode( BrowserMode nMode )
DBG_ASSERT( !( getDataWindow()->bAutoVScroll && getDataWindow()->bNoVScroll ),
"BrowseBox::SetMode: AutoVScroll *and* NoVScroll?" );
if ( getDataWindow()->bAutoHScroll )
- getDataWindow()->bNoHScroll = FALSE;
+ getDataWindow()->bNoHScroll = sal_False;
if ( getDataWindow()->bAutoVScroll )
- getDataWindow()->bNoVScroll = FALSE;
+ getDataWindow()->bNoVScroll = sal_False;
if ( getDataWindow()->bNoHScroll )
aHScroll.Hide();
@@ -2577,40 +2577,40 @@ void BrowseBox::SetMode( BrowserMode nMode )
//-------------------------------------------------------------------
-void BrowseBox::VisibleRowsChanged( long, USHORT )
+void BrowseBox::VisibleRowsChanged( long, sal_uInt16 )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
// Das alte Verhalten: NumRows automatisch korrigieren:
if ( nRowCount < GetRowCount() )
{
- RowInserted(nRowCount,GetRowCount() - nRowCount,FALSE);
+ RowInserted(nRowCount,GetRowCount() - nRowCount,sal_False);
}
else if ( nRowCount > GetRowCount() )
{
- RowRemoved(nRowCount-(nRowCount - GetRowCount()),nRowCount - GetRowCount(),FALSE);
+ RowRemoved(nRowCount-(nRowCount - GetRowCount()),nRowCount - GetRowCount(),sal_False);
}
}
//-------------------------------------------------------------------
-BOOL BrowseBox::IsCursorMoveAllowed( long, USHORT ) const
+sal_Bool BrowseBox::IsCursorMoveAllowed( long, sal_uInt16 ) const
/* [Beschreibung]
Diese virtuelle Methode wird immer gerufen bevor der Cursor direkt
- bewegt werden soll. Durch 'return FALSE' kann verhindert werden, da\s
+ bewegt werden soll. Durch 'return sal_False' kann verhindert werden, da\s
dies geschieht, wenn z.B. ein Datensatz irgendwelchen Rules widerspricht.
Diese Methode wird nicht gerufen, wenn die Cursorbewegung durch
ein L"oschen oder Einf"ugen (einer Zeile/Spalte) ausgel"ost wird, also
genaugenommen nur eine Cursor-Korrektur vorliegt.
- Die Basisimplementierung liefert derzeit immer TRUE.
+ Die Basisimplementierung liefert derzeit immer sal_True.
*/
{
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------
@@ -2728,10 +2728,10 @@ void BrowseBox::LoseFocus()
if ( !bKeepHighlight )
{
ToggleSelection();
- bSelectionIsVisible = FALSE;
+ bSelectionIsVisible = sal_False;
}
- bHasFocus = FALSE;
+ bHasFocus = sal_False;
}
Control::LoseFocus();
}
@@ -2747,12 +2747,12 @@ void BrowseBox::GetFocus()
{
if ( !bSelectionIsVisible )
{
- bSelectionIsVisible = TRUE;
+ bSelectionIsVisible = sal_True;
if ( bBootstrapped )
ToggleSelection();
}
- bHasFocus = TRUE;
+ bHasFocus = sal_True;
DoShowCursor( "GetFocus" );
}
Control::GetFocus();
diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx
index 53c2a5ac86f6..c37fb6915725 100644
--- a/svtools/source/brwbox/brwbox2.cxx
+++ b/svtools/source/brwbox/brwbox2.cxx
@@ -177,7 +177,7 @@ void BrowseBox::StateChanged( StateChangedType nStateChange )
}
else if ( STATE_CHANGE_INITSHOW == nStateChange )
{
- bBootstrapped = TRUE; // muss zuerst gesetzt werden!
+ bBootstrapped = sal_True; // muss zuerst gesetzt werden!
Resize();
if ( bMultiSelection )
@@ -190,8 +190,8 @@ void BrowseBox::StateChanged( StateChangedType nStateChange )
if ( HasFocus() )
{
- bSelectionIsVisible = TRUE;
- bHasFocus = TRUE;
+ bSelectionIsVisible = sal_True;
+ bHasFocus = sal_True;
}
UpdateScrollbars();
AutoSizeLastColumn();
@@ -205,7 +205,7 @@ void BrowseBox::StateChanged( StateChangedType nStateChange )
pHeaderBar->SetZoom(GetZoom());
// let the cols calc their new widths and adjust the header bar
- for ( USHORT nPos = 0; nPos < pCols->Count(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < pCols->Count(); ++nPos )
{
pCols->GetObject(nPos)->ZoomChanged(GetZoom());
if ( pHeaderBar )
@@ -285,7 +285,7 @@ void BrowseBox::RowHeightChanged()
//-------------------------------------------------------------------
-long BrowseBox::QueryColumnResize( USHORT, long nWidth )
+long BrowseBox::QueryColumnResize( sal_uInt16, long nWidth )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
return nWidth;
@@ -293,14 +293,14 @@ long BrowseBox::QueryColumnResize( USHORT, long nWidth )
//-------------------------------------------------------------------
-void BrowseBox::ColumnResized( USHORT )
+void BrowseBox::ColumnResized( sal_uInt16 )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
}
//-------------------------------------------------------------------
-void BrowseBox::ColumnMoved( USHORT )
+void BrowseBox::ColumnMoved( sal_uInt16 )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
}
@@ -330,7 +330,7 @@ void BrowseBox::EndScroll()
#pragma optimize( "", off )
#endif
-void BrowseBox::ToggleSelection( BOOL bForce )
+void BrowseBox::ToggleSelection( sal_Bool bForce )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -342,8 +342,8 @@ void BrowseBox::ToggleSelection( BOOL bForce )
return;
// only highlight painted areas!
- bNotToggleSel = TRUE;
- if ( FALSE && !getDataWindow()->bInPaint )
+ bNotToggleSel = sal_True;
+ if ( sal_False && !getDataWindow()->bInPaint )
pDataWin->Update();
// accumulate areas of rows to highlight
@@ -372,7 +372,7 @@ void BrowseBox::ToggleSelection( BOOL bForce )
if ( aHighlightList.Count() && nLastRowInRect == ( nRow - 1 ) )
aHighlightList.First()->Union( aAddRect );
else
- aHighlightList.Insert( new Rectangle( aAddRect ), (ULONG) 0 );
+ aHighlightList.Insert( new Rectangle( aAddRect ), (sal_uLong) 0 );
nLastRowInRect = nRow;
}
@@ -391,7 +391,7 @@ void BrowseBox::ToggleSelection( BOOL bForce )
{
Rectangle aRect( GetFieldRectPixel(nCurRow,
pCols->GetObject(nColId)->GetId(),
- FALSE ) );
+ sal_False ) );
aRect.Left() -= MIN_COLUMNWIDTH;
aRect.Right() += MIN_COLUMNWIDTH;
aRect.Top() = 0;
@@ -399,7 +399,7 @@ void BrowseBox::ToggleSelection( BOOL bForce )
pDataWin->Invalidate( aRect );
}
- bNotToggleSel = FALSE;
+ bNotToggleSel = sal_False;
}
#ifdef _MSC_VER
@@ -410,15 +410,15 @@ void BrowseBox::ToggleSelection( BOOL bForce )
void BrowseBox::DrawCursor()
{
- BOOL bReallyHide = FALSE;
+ sal_Bool bReallyHide = sal_False;
if ( SMART_CURSOR_HIDE == bHideCursor )
{
if ( !GetSelectRowCount() && !GetSelectColumnCount() )
- bReallyHide = TRUE;
+ bReallyHide = sal_True;
}
else if ( HARD_CURSOR_HIDE == bHideCursor )
{
- bReallyHide = TRUE;
+ bReallyHide = sal_True;
}
bReallyHide |= !bSelectionIsVisible || !IsUpdateMode() || bScrolling || nCurRow < 0;
@@ -436,7 +436,7 @@ void BrowseBox::DrawCursor()
Rectangle aCursor;
if ( bColumnCursor )
{
- aCursor = GetFieldRectPixel( nCurRow, nCurColId, FALSE );
+ aCursor = GetFieldRectPixel( nCurRow, nCurColId, sal_False );
//! --aCursor.Bottom();
aCursor.Left() -= MIN_COLUMNWIDTH;
aCursor.Right() += 1;
@@ -481,11 +481,11 @@ void BrowseBox::DrawCursor()
//-------------------------------------------------------------------
-ULONG BrowseBox::GetColumnWidth( USHORT nId ) const
+sal_uLong BrowseBox::GetColumnWidth( sal_uInt16 nId ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- USHORT nItemPos = GetColumnPos( nId );
+ sal_uInt16 nItemPos = GetColumnPos( nId );
if ( nItemPos >= pCols->Count() )
return 0;
return pCols->GetObject(nItemPos)->Width();
@@ -493,7 +493,7 @@ ULONG BrowseBox::GetColumnWidth( USHORT nId ) const
//-------------------------------------------------------------------
-USHORT BrowseBox::GetColumnId( USHORT nPos ) const
+sal_uInt16 BrowseBox::GetColumnId( sal_uInt16 nPos ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -504,11 +504,11 @@ USHORT BrowseBox::GetColumnId( USHORT nPos ) const
//-------------------------------------------------------------------
-USHORT BrowseBox::GetColumnPos( USHORT nId ) const
+sal_uInt16 BrowseBox::GetColumnPos( sal_uInt16 nId ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- for ( USHORT nPos = 0; nPos < pCols->Count(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < pCols->Count(); ++nPos )
if ( pCols->GetObject(nPos)->GetId() == nId )
return nPos;
return BROWSER_INVALIDID;
@@ -516,14 +516,14 @@ USHORT BrowseBox::GetColumnPos( USHORT nId ) const
//-------------------------------------------------------------------
-BOOL BrowseBox::IsFrozen( USHORT nColumnId ) const
+sal_Bool BrowseBox::IsFrozen( sal_uInt16 nColumnId ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- for ( USHORT nPos = 0; nPos < pCols->Count(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < pCols->Count(); ++nPos )
if ( pCols->GetObject(nPos)->GetId() == nColumnId )
return pCols->GetObject(nPos)->IsFrozen();
- return FALSE;
+ return sal_False;
}
//-------------------------------------------------------------------
@@ -540,34 +540,34 @@ void BrowseBox::ExpandRowSelection( const BrowserMouseEvent& rEvt )
Range aJustifiedRange( aSelRange );
aJustifiedRange.Justify();
- BOOL bSelectThis = ( bSelect != aJustifiedRange.IsInside( rEvt.GetRow() ) );
+ sal_Bool bSelectThis = ( bSelect != aJustifiedRange.IsInside( rEvt.GetRow() ) );
if ( aJustifiedRange.IsInside( rEvt.GetRow() ) )
{
// down and up
while ( rEvt.GetRow() < aSelRange.Max() )
{ // ZTC/Mac bug - dont put these statemants together!
- SelectRow( aSelRange.Max(), bSelectThis, TRUE );
+ SelectRow( aSelRange.Max(), bSelectThis, sal_True );
--aSelRange.Max();
}
while ( rEvt.GetRow() > aSelRange.Max() )
{ // ZTC/Mac bug - dont put these statemants together!
- SelectRow( aSelRange.Max(), bSelectThis, TRUE );
+ SelectRow( aSelRange.Max(), bSelectThis, sal_True );
++aSelRange.Max();
}
}
else
{
// up and down
- BOOL bOldSelecting = bSelecting;
- bSelecting = TRUE;
+ sal_Bool bOldSelecting = bSelecting;
+ bSelecting = sal_True;
while ( rEvt.GetRow() < aSelRange.Max() )
{ // ZTC/Mac bug - dont put these statemants together!
--aSelRange.Max();
if ( !IsRowSelected( aSelRange.Max() ) )
{
- SelectRow( aSelRange.Max(), bSelectThis, TRUE );
- bSelect = TRUE;
+ SelectRow( aSelRange.Max(), bSelectThis, sal_True );
+ bSelect = sal_True;
}
}
while ( rEvt.GetRow() > aSelRange.Max() )
@@ -575,8 +575,8 @@ void BrowseBox::ExpandRowSelection( const BrowserMouseEvent& rEvt )
++aSelRange.Max();
if ( !IsRowSelected( aSelRange.Max() ) )
{
- SelectRow( aSelRange.Max(), bSelectThis, TRUE );
- bSelect = TRUE;
+ SelectRow( aSelRange.Max(), bSelectThis, sal_True );
+ bSelect = sal_True;
}
}
bSelecting = bOldSelecting;
@@ -586,9 +586,9 @@ void BrowseBox::ExpandRowSelection( const BrowserMouseEvent& rEvt )
}
else
if ( !bMultiSelection || !IsRowSelected( rEvt.GetRow() ) )
- SelectRow( rEvt.GetRow(), TRUE );
+ SelectRow( rEvt.GetRow(), sal_True );
- GoToRow( rEvt.GetRow(), FALSE );
+ GoToRow( rEvt.GetRow(), sal_False );
DoShowCursor( "ExpandRowSelection" );
}
@@ -601,21 +601,21 @@ void BrowseBox::Resize()
BrowseBox::StateChanged( STATE_CHANGE_INITSHOW );
if ( !pCols->Count() )
{
- getDataWindow()->bResizeOnPaint = TRUE;
+ getDataWindow()->bResizeOnPaint = sal_True;
return;
}
- getDataWindow()->bResizeOnPaint = FALSE;
+ getDataWindow()->bResizeOnPaint = sal_False;
// calc the size of the scrollbars
// (we can't ask the scrollbars for their widths cause if we're zoomed they still have to be
// resized - which is done in UpdateScrollbars)
- ULONG nSBSize = GetSettings().GetStyleSettings().GetScrollBarSize();
+ sal_uLong nSBSize = GetSettings().GetStyleSettings().GetScrollBarSize();
if (IsZoom())
- nSBSize = (ULONG)(nSBSize * (double)GetZoom());
+ nSBSize = (sal_uLong)(nSBSize * (double)GetZoom());
DoHideCursor( "Resize" );
- USHORT nOldVisibleRows =
- (USHORT)(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1);
+ sal_uInt16 nOldVisibleRows =
+ (sal_uInt16)(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1);
// did we need a horiz. scroll bar oder gibt es eine Control Area?
if ( !getDataWindow()->bNoHScroll &&
@@ -638,8 +638,8 @@ void BrowseBox::Resize()
Point( 0, GetTitleHeight() ),
Size( nDataWidth, nDataHeight ) );
- USHORT nVisibleRows =
- (USHORT)(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1);
+ sal_uInt16 nVisibleRows =
+ (sal_uInt16)(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1);
// TopRow ist unveraendert, aber die Anzahl sichtbarer Zeilen hat sich
// geaendert
@@ -681,8 +681,8 @@ void BrowseBox::Paint( const Rectangle& rRect )
return;
BrowserColumn *pFirstCol = pCols->GetObject(0);
- BOOL bHandleCol = pFirstCol && pFirstCol->GetId() == 0;
- BOOL bHeaderBar = getDataWindow()->pHeaderBar != NULL;
+ sal_Bool bHandleCol = pFirstCol && pFirstCol->GetId() == 0;
+ sal_Bool bHeaderBar = getDataWindow()->pHeaderBar != NULL;
// draw delimitational lines
if ( !getDataWindow()->bNoHScroll )
@@ -709,7 +709,7 @@ void BrowseBox::Paint( const Rectangle& rRect )
{
// iterate through columns to redraw
long nX = 0;
- USHORT nCol;
+ sal_uInt16 nCol;
for ( nCol = 0;
nCol < pCols->Count() && nX < rRect.Right();
++nCol )
@@ -729,7 +729,7 @@ void BrowseBox::Paint( const Rectangle& rRect )
{
ButtonFrame aButtonFrame( Point( nX, 0 ),
Size( pCol->Width()-1, GetTitleHeight()-1 ),
- pCol->Title(), FALSE, FALSE,
+ pCol->Title(), sal_False, sal_False,
0 != (BROWSER_COLUMN_TITLEABBREVATION&pCol->Flags()),
!IsEnabled());
aButtonFrame.Draw( *this );
@@ -774,9 +774,9 @@ void BrowseBox::PaintRow( OutputDevice&, const Rectangle& )
//-------------------------------------------------------------------
-void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags )
+void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags )
{
- BOOL bDrawSelection = (nFlags & WINDOW_DRAW_NOSELECTION) == 0;
+ sal_Bool bDrawSelection = (nFlags & WINDOW_DRAW_NOSELECTION) == 0;
// we need pixel coordinates
Size aRealSize = pDev->LogicToPixel(rSize);
@@ -820,7 +820,7 @@ void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
nDataRowHeight = nForeignHeightPixel;
// this counts for the column widths, too
- USHORT nPos;
+ sal_uInt16 nPos;
for ( nPos = 0; nPos < pCols->Count(); ++nPos )
{
BrowserColumn* pCurrent = pCols->GetObject(nPos);
@@ -865,7 +865,7 @@ void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
{
ButtonFrame aButtonFrame( aRealPos,
Size( pFirstCol->Width()-1, nTitleHeight-1 ),
- pFirstCol->Title(), FALSE, FALSE, FALSE, !IsEnabled());
+ pFirstCol->Title(), sal_False, sal_False, sal_False, !IsEnabled());
aButtonFrame.Draw( *pDev );
pDev->Push( PUSH_LINECOLOR );
@@ -888,7 +888,7 @@ void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
pDev->SetClipRegion( pDev->PixelToLogic( aRegion ) );
// do we have to paint the background
- BOOL bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && GetDataWindow().IsControlBackground();
+ sal_Bool bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && GetDataWindow().IsControlBackground();
if ( bBackground )
{
Rectangle aRect( aRealPos, aRealSize );
@@ -896,7 +896,7 @@ void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
pDev->DrawRect( aRect );
}
- ImplPaintData( *pDev, Rectangle( aRealPos, aRealSize ), TRUE, bDrawSelection );
+ ImplPaintData( *pDev, Rectangle( aRealPos, aRealSize ), sal_True, bDrawSelection );
// restore the column widths/data row height
nDataRowHeight = nOriginalHeight;
@@ -917,7 +917,7 @@ void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
//-------------------------------------------------------------------
-void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, BOOL _bForeignDevice, BOOL _bDrawSelections)
+void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, sal_Bool _bForeignDevice, sal_Bool _bDrawSelections)
{
Point aOverallAreaPos = _bForeignDevice ? _rRect.TopLeft() : Point(0,0);
Size aOverallAreaSize = _bForeignDevice ? _rRect.GetSize() : GetDataWindow().GetOutputSizePixel();
@@ -926,8 +926,8 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, BOOL
long nDataRowHeigt = GetDataRowHeight();
// compute relative rows to redraw
- ULONG nRelTopRow = _bForeignDevice ? 0 : ((ULONG)_rRect.Top() / nDataRowHeigt);
- ULONG nRelBottomRow = (ULONG)(_bForeignDevice ? aOverallAreaSize.Height() : _rRect.Bottom()) / nDataRowHeigt;
+ sal_uLong nRelTopRow = _bForeignDevice ? 0 : ((sal_uLong)_rRect.Top() / nDataRowHeigt);
+ sal_uLong nRelBottomRow = (sal_uLong)(_bForeignDevice ? aOverallAreaSize.Height() : _rRect.Bottom()) / nDataRowHeigt;
// cache frequently used values
Point aPos( aOverallAreaPos.X(), nRelTopRow * nDataRowHeigt + aOverallAreaPos.Y() );
@@ -947,19 +947,19 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, BOOL
Color aDelimiterLineColor( ::svtools::ColorConfig().GetColorValue( ::svtools::CALCGRID ).nColor );
// redraw the invalid fields
- BOOL bRetouching = FALSE;
- for ( ULONG nRelRow = nRelTopRow;
- nRelRow <= nRelBottomRow && (ULONG)nTopRow+nRelRow < (ULONG)nRowCount;
+ sal_Bool bRetouching = sal_False;
+ for ( sal_uLong nRelRow = nRelTopRow;
+ nRelRow <= nRelBottomRow && (sal_uLong)nTopRow+nRelRow < (sal_uLong)nRowCount;
++nRelRow, aPos.Y() += nDataRowHeigt )
{
// get row
// Zur Sicherheit auf zul"assigen Bereich abfragen:
- DBG_ASSERT( (USHORT)(nTopRow+nRelRow) < nRowCount, "BrowseBox::ImplPaintData: invalid seek" );
- if ( (nTopRow+long(nRelRow)) < 0 || (USHORT)(nTopRow+nRelRow) >= nRowCount )
+ DBG_ASSERT( (sal_uInt16)(nTopRow+nRelRow) < nRowCount, "BrowseBox::ImplPaintData: invalid seek" );
+ if ( (nTopRow+long(nRelRow)) < 0 || (sal_uInt16)(nTopRow+nRelRow) >= nRowCount )
continue;
// prepare row
- ULONG nRow = nTopRow+nRelRow;
+ sal_uLong nRow = nTopRow+nRelRow;
if ( !SeekRow( nRow) ) {
DBG_ERROR("BrowseBox::ImplPaintData: SeekRow gescheitert");
}
@@ -973,7 +973,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, BOOL
Size( _rRect.GetSize().Width(), nDataRowHeigt ) );
PaintRow( _rOut, aRowRect );
- BOOL bRowSelected = _bDrawSelections
+ sal_Bool bRowSelected = _bDrawSelections
&& !bHideSelect
&& IsRowSelected( nRow );
if ( bRowSelected )
@@ -985,7 +985,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, BOOL
}
// iterate through columns to redraw
- USHORT nCol;
+ sal_uInt16 nCol;
for ( nCol = 0; nCol < pCols->Count(); ++nCol )
{
// get column
@@ -1009,7 +1009,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, BOOL
}
// prepare Column-AutoHighlight
- BOOL bColAutoHighlight = _bDrawSelections
+ sal_Bool bColAutoHighlight = _bDrawSelections
&& bColumnCursor
&& IsColumnSelected( pCol->GetId() );
if ( bColAutoHighlight )
@@ -1023,7 +1023,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, BOOL
_rOut.DrawRect( aFieldRect );
}
- if (!m_bFocusOnlyCursor && (pCol->GetId() == GetCurColumnId()) && (nRow == (ULONG)GetCurRow()))
+ if (!m_bFocusOnlyCursor && (pCol->GetId() == GetCurColumnId()) && (nRow == (sal_uLong)GetCurRow()))
DrawCursor();
// draw a single field
@@ -1049,7 +1049,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, BOOL
Region aClipToField(Rectangle(aPos, aFieldSize));
_rOut.SetClipRegion(aClipToField);
}
- pCol->Draw( *this, _rOut, aPos, FALSE );
+ pCol->Draw( *this, _rOut, aPos, sal_False );
if (_bForeignDevice)
_rOut.SetClipRegion();
}
@@ -1067,7 +1067,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, BOOL
}
if ( nCol == pCols->Count() )
- bRetouching = TRUE;
+ bRetouching = sal_True;
// reset auto-highlight
if ( bRowSelected )
@@ -1129,7 +1129,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, BOOL
_rOut.SetLineColor( aDelimiterLineColor );
Point aVertPos( aOverallAreaPos.X() - 1, aOverallAreaPos.Y() );
long nDeltaY = aOverallAreaBRPos.Y();
- for ( USHORT nCol = 0; nCol < pCols->Count(); ++nCol )
+ for ( sal_uInt16 nCol = 0; nCol < pCols->Count(); ++nCol )
{
// get column
BrowserColumn *pCol = pCols->GetObject(nCol);
@@ -1177,7 +1177,7 @@ void BrowseBox::PaintData( Window& rWin, const Rectangle& rRect )
Resize();
// MI: wer war das denn? Window::Update();
- ImplPaintData(rWin, rRect, FALSE, TRUE);
+ ImplPaintData(rWin, rRect, sal_False, sal_True);
}
//-------------------------------------------------------------------
@@ -1193,19 +1193,19 @@ void BrowseBox::UpdateScrollbars()
BrowserDataWin *pBDW = (BrowserDataWin*) pDataWin;
if ( pBDW->bInUpdateScrollbars )
{
- pBDW->bHadRecursion = TRUE;
+ pBDW->bHadRecursion = sal_True;
return;
}
- pBDW->bInUpdateScrollbars = TRUE;
+ pBDW->bInUpdateScrollbars = sal_True;
// the size of the corner window (and the width of the VSB/height of the HSB)
- ULONG nCornerSize = GetSettings().GetStyleSettings().GetScrollBarSize();
+ sal_uLong nCornerSize = GetSettings().GetStyleSettings().GetScrollBarSize();
if (IsZoom())
- nCornerSize = (ULONG)(nCornerSize * (double)GetZoom());
+ nCornerSize = (sal_uLong)(nCornerSize * (double)GetZoom());
// needs VScroll?
long nMaxRows = (pDataWin->GetSizePixel().Height()) / GetDataRowHeight();
- BOOL bNeedsVScroll = getDataWindow()->bAutoVScroll
+ sal_Bool bNeedsVScroll = getDataWindow()->bAutoVScroll
? nTopRow || ( nRowCount > nMaxRows )
: !getDataWindow()->bNoVScroll;
Size aDataWinSize = pDataWin->GetSizePixel();
@@ -1227,10 +1227,10 @@ void BrowseBox::UpdateScrollbars()
}
// needs HScroll?
- ULONG nLastCol = GetColumnAtXPosPixel( aDataWinSize.Width() - 1 );
+ sal_uLong nLastCol = GetColumnAtXPosPixel( aDataWinSize.Width() - 1 );
- USHORT nFrozenCols = FrozenColCount();
- BOOL bNeedsHScroll = getDataWindow()->bAutoHScroll
+ sal_uInt16 nFrozenCols = FrozenColCount();
+ sal_Bool bNeedsHScroll = getDataWindow()->bAutoHScroll
? ( nFirstCol > nFrozenCols ) || ( nLastCol <= pCols->Count() )
: !getDataWindow()->bNoHScroll;
if ( !bNeedsHScroll )
@@ -1251,7 +1251,7 @@ void BrowseBox::UpdateScrollbars()
}
// adjust position and Width of horizontal scrollbar
- ULONG nHScrX = nControlAreaWidth == USHRT_MAX
+ sal_uLong nHScrX = nControlAreaWidth == USHRT_MAX
? 0
: nControlAreaWidth;
@@ -1310,7 +1310,7 @@ void BrowseBox::UpdateScrollbars()
// needs corner-window?
// (do that AFTER positioning BOTH scrollbars)
- ULONG nActualCorderWidth = 0;
+ sal_uLong nActualCorderWidth = 0;
if (aHScroll.IsVisible() && pVScroll && pVScroll->IsVisible() )
{
// if we have both scrollbars, the corner window fills the point of intersection of these two
@@ -1338,7 +1338,7 @@ void BrowseBox::UpdateScrollbars()
if ( getDataWindow()->pHeaderBar )
{
long nWidth = 0;
- for ( USHORT nCol = 0;
+ for ( sal_uInt16 nCol = 0;
nCol < pCols->Count() && nCol < nFirstCol;
++nCol )
{
@@ -1350,21 +1350,21 @@ void BrowseBox::UpdateScrollbars()
getDataWindow()->pHeaderBar->SetOffset( nWidth );
}
- pBDW->bInUpdateScrollbars = FALSE;
+ pBDW->bInUpdateScrollbars = sal_False;
if ( pBDW->bHadRecursion )
{
- pBDW->bHadRecursion = FALSE;
+ pBDW->bHadRecursion = sal_False;
UpdateScrollbars();
}
}
//-------------------------------------------------------------------
-void BrowseBox::SetUpdateMode( BOOL bUpdate )
+void BrowseBox::SetUpdateMode( sal_Bool bUpdate )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- BOOL bWasUpdate = IsUpdateMode();
+ sal_Bool bWasUpdate = IsUpdateMode();
if ( bWasUpdate == bUpdate )
return;
@@ -1392,7 +1392,7 @@ void BrowseBox::SetUpdateMode( BOOL bUpdate )
//-------------------------------------------------------------------
-BOOL BrowseBox::GetUpdateMode() const
+sal_Bool BrowseBox::GetUpdateMode() const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -1406,7 +1406,7 @@ long BrowseBox::GetFrozenWidth() const
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
long nWidth = 0;
- for ( USHORT nCol = 0;
+ for ( sal_uInt16 nCol = 0;
nCol < pCols->Count() && pCols->GetObject(nCol)->IsFrozen();
++nCol )
nWidth += pCols->GetObject(nCol)->Width();
@@ -1415,7 +1415,7 @@ long BrowseBox::GetFrozenWidth() const
//-------------------------------------------------------------------
-void BrowseBox::ColumnInserted( USHORT nPos )
+void BrowseBox::ColumnInserted( sal_uInt16 nPos )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -1426,10 +1426,10 @@ void BrowseBox::ColumnInserted( USHORT nPos )
//-------------------------------------------------------------------
-USHORT BrowseBox::FrozenColCount() const
+sal_uInt16 BrowseBox::FrozenColCount() const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- USHORT nCol;
+ sal_uInt16 nCol;
for ( nCol = 0;
nCol < pCols->Count() && pCols->GetObject(nCol)->IsFrozen();
++nCol )
@@ -1506,7 +1506,7 @@ void BrowseBox::MouseButtonDown( const MouseEvent& rEvt )
long nX = 0;
long nWidth = GetOutputSizePixel().Width();
- for ( USHORT nCol = 0; nCol < pCols->Count() && nX < nWidth; ++nCol )
+ for ( sal_uInt16 nCol = 0; nCol < pCols->Count() && nX < nWidth; ++nCol )
{
// is this column visible?
BrowserColumn *pCol = pCols->GetObject(nCol);
@@ -1519,7 +1519,7 @@ void BrowseBox::MouseButtonDown( const MouseEvent& rEvt )
if ( pCol->GetId() && Abs( nR - rEvtPos.X() ) < 2 )
{
// start resizing the column
- bResizing = TRUE;
+ bResizing = sal_True;
nResizeCol = nCol;
nDragX = nResizeX = rEvtPos.X();
SetPointer( Pointer( POINTER_HSPLIT ) );
@@ -1542,7 +1542,7 @@ void BrowseBox::MouseButtonDown( const MouseEvent& rEvt )
// event occured out of data area
if ( rEvt.IsRight() )
pDataWin->Command(
- CommandEvent( Point( 1, LONG_MAX ), COMMAND_CONTEXTMENU, TRUE ) );
+ CommandEvent( Point( 1, LONG_MAX ), COMMAND_CONTEXTMENU, sal_True ) );
else
SetNoSelection();
}
@@ -1560,17 +1560,17 @@ void BrowseBox::MouseMove( const MouseEvent& rEvt )
Pointer aNewPointer;
- USHORT nX = 0;
- for ( USHORT nCol = 0;
- nCol < USHORT(pCols->Count()) &&
- ( nX + pCols->GetObject(nCol)->Width() ) < USHORT(GetOutputSizePixel().Width());
+ sal_uInt16 nX = 0;
+ for ( sal_uInt16 nCol = 0;
+ nCol < sal_uInt16(pCols->Count()) &&
+ ( nX + pCols->GetObject(nCol)->Width() ) < sal_uInt16(GetOutputSizePixel().Width());
++nCol )
// is this column visible?
if ( pCols->GetObject(nCol)->IsFrozen() || nCol >= nFirstCol )
{
// compute right end of column
BrowserColumn *pCol = pCols->GetObject(nCol);
- USHORT nR = (USHORT)(nX + pCol->Width() - 1);
+ sal_uInt16 nR = (sal_uInt16)(nX + pCol->Width() - 1);
// show resize-pointer?
if ( bResizing || ( pCol->GetId() &&
@@ -1585,8 +1585,8 @@ void BrowseBox::MouseMove( const MouseEvent& rEvt )
// erlaubte breite abholen und neues Delta
nDragX = Max( rEvt.GetPosPixel().X(), nMinResizeX );
long nDeltaX = nDragX - nResizeX;
- USHORT nId = GetColumnId(nResizeCol);
- ULONG nOldWidth = GetColumnWidth(nId);
+ sal_uInt16 nId = GetColumnId(nResizeCol);
+ sal_uLong nOldWidth = GetColumnWidth(nId);
nDragX = QueryColumnResize( GetColumnId(nResizeCol),
nOldWidth + nDeltaX )
+ nResizeX - nOldWidth;
@@ -1624,7 +1624,7 @@ void BrowseBox::MouseButtonUp( const MouseEvent & rEvt )
long nMaxX = pDataWin->GetSizePixel().Width();
nDragX = Min( nDragX, nMaxX );
long nDeltaX = nDragX - nResizeX;
- USHORT nId = GetColumnId(nResizeCol);
+ sal_uInt16 nId = GetColumnId(nResizeCol);
SetColumnWidth( GetColumnId(nResizeCol), GetColumnWidth(nId) + nDeltaX );
ColumnResized( nId );
}
@@ -1632,7 +1632,7 @@ void BrowseBox::MouseButtonUp( const MouseEvent & rEvt )
// end action
SetPointer( Pointer() );
ReleaseMouse();
- bResizing = FALSE;
+ bResizing = sal_False;
}
else
MouseButtonUp( BrowserMouseEvent( (BrowserDataWin*)pDataWin,
@@ -1644,8 +1644,8 @@ void BrowseBox::MouseButtonUp( const MouseEvent & rEvt )
//-------------------------------------------------------------------
-BOOL bExtendedMode = FALSE;
-BOOL bFieldMode = FALSE;
+sal_Bool bExtendedMode = sal_False;
+sal_Bool bFieldMode = sal_False;
void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
{
@@ -1660,14 +1660,14 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
if ( rEvt.GetRow() >= 0 )
{
GoToRow( rEvt.GetRow() );
- SelectRow( rEvt.GetRow(), TRUE, FALSE );
+ SelectRow( rEvt.GetRow(), sal_True, sal_False );
}
else
{
if ( bColumnCursor && rEvt.GetColumn() != 0 )
{
if ( rEvt.GetColumn() < pCols->Count() )
- SelectColumnPos( rEvt.GetColumn(), TRUE, FALSE);
+ SelectColumnPos( rEvt.GetColumn(), sal_True, sal_False);
}
}
DoubleClick( rEvt );
@@ -1679,7 +1679,7 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
if ( rEvt.GetClicks() == 1 )
{
// initialise flags
- bHit = FALSE;
+ bHit = sal_False;
a1stPoint =
a2ndPoint = PixelToLogic( rEvt.GetPosPixel() );
@@ -1692,7 +1692,7 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
}
// while selecting, no cursor
- bSelecting = TRUE;
+ bSelecting = sal_True;
DoHideCursor( "MouseButtonDown" );
// DataRow?
@@ -1708,19 +1708,19 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
{
ToggleSelection();
if ( bMultiSelection )
- uRow.pSel->SelectAll(FALSE);
+ uRow.pSel->SelectAll(sal_False);
else
uRow.nSel = BROWSER_ENDOFSELECTION;
if ( pColSel )
- pColSel->SelectAll(FALSE);
- bSelect = TRUE;
+ pColSel->SelectAll(sal_False);
+ bSelect = sal_True;
}
// expanding mode?
if ( rEvt.GetMode() & MOUSE_RANGESELECT )
{
// select the further touched rows too
- bSelect = TRUE;
+ bSelect = sal_True;
ExpandRowSelection( rEvt );
return;
}
@@ -1729,7 +1729,7 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
else if ( IsRowSelected( rEvt.GetRow() ) )
{
// auf Drag&Drop warten
- bHit = TRUE;
+ bHit = sal_True;
bExtendedMode = MOUSE_MULTISELECT ==
( rEvt.GetMode() & MOUSE_MULTISELECT );
return;
@@ -1743,7 +1743,7 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
aSelRange = Range( rEvt.GetRow(), rEvt.GetRow() );
SelectRow( rEvt.GetRow(),
!uRow.pSel->IsSelected( rEvt.GetRow() ) );
- bSelect = TRUE;
+ bSelect = sal_True;
return;
}
}
@@ -1751,9 +1751,9 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
// select directly
SetNoSelection();
GoToRow( rEvt.GetRow() );
- SelectRow( rEvt.GetRow(), TRUE );
+ SelectRow( rEvt.GetRow(), sal_True );
aSelRange = Range( rEvt.GetRow(), rEvt.GetRow() );
- bSelect = TRUE;
+ bSelect = sal_True;
}
else // Column/Field-Selection
{
@@ -1761,14 +1761,14 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
if ( IsColumnSelected( rEvt.GetColumn() ) ||
IsRowSelected( rEvt.GetRow() ) )
{
- bHit = TRUE;
- bFieldMode = TRUE;
+ bHit = sal_True;
+ bFieldMode = sal_True;
return;
}
SetNoSelection();
GoToRowColumnId( rEvt.GetRow(), rEvt.GetColumnId() );
- bSelect = TRUE;
+ bSelect = sal_True;
}
}
else
@@ -1782,11 +1782,11 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
SelectAll();
}
else
- SelectColumnId( rEvt.GetColumnId(), TRUE, FALSE );
+ SelectColumnId( rEvt.GetColumnId(), sal_True, sal_False );
}
// ggf. Cursor wieder an
- bSelecting = FALSE;
+ bSelecting = sal_False;
DoShowCursor( "MouseButtonDown" );
if ( bSelect )
Select();
@@ -1812,7 +1812,7 @@ void BrowseBox::MouseButtonUp( const BrowserMouseEvent &rEvt )
{
aSelRange = Range( rEvt.GetRow(), rEvt.GetRow() );
if ( bExtendedMode )
- SelectRow( rEvt.GetRow(), FALSE );
+ SelectRow( rEvt.GetRow(), sal_False );
else
{
SetNoSelection();
@@ -1821,19 +1821,19 @@ void BrowseBox::MouseButtonUp( const BrowserMouseEvent &rEvt )
else
{
GoToRow( rEvt.GetRow() );
- SelectRow( rEvt.GetRow(), TRUE );
+ SelectRow( rEvt.GetRow(), sal_True );
}
}
- bSelect = TRUE;
- bExtendedMode = FALSE;
- bFieldMode = FALSE;
- bHit = FALSE;
+ bSelect = sal_True;
+ bExtendedMode = sal_False;
+ bFieldMode = sal_False;
+ bHit = sal_False;
}
// activate cursor
if ( bSelecting )
{
- bSelecting = FALSE;
+ bSelecting = sal_False;
DoShowCursor( "MouseButtonUp" );
if ( bSelect )
Select();
@@ -1850,16 +1850,16 @@ void BrowseBox::KeyInput( const KeyEvent& rEvt )
//-------------------------------------------------------------------
-BOOL BrowseBox::ProcessKey( const KeyEvent& rEvt )
+sal_Bool BrowseBox::ProcessKey( const KeyEvent& rEvt )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- USHORT nCode = rEvt.GetKeyCode().GetCode();
- BOOL bShift = rEvt.GetKeyCode().IsShift();
- BOOL bCtrl = rEvt.GetKeyCode().IsMod1();
- BOOL bAlt = rEvt.GetKeyCode().IsMod2();
+ sal_uInt16 nCode = rEvt.GetKeyCode().GetCode();
+ sal_Bool bShift = rEvt.GetKeyCode().IsShift();
+ sal_Bool bCtrl = rEvt.GetKeyCode().IsMod1();
+ sal_Bool bAlt = rEvt.GetKeyCode().IsMod2();
- USHORT nId = BROWSER_NONE;
+ sal_uInt16 nId = BROWSER_NONE;
if ( !bAlt && !bCtrl && !bShift )
{
@@ -1921,12 +1921,12 @@ BOOL BrowseBox::ProcessKey( const KeyEvent& rEvt )
//-------------------------------------------------------------------
-void BrowseBox::Dispatch( USHORT nId )
+void BrowseBox::Dispatch( sal_uInt16 nId )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
long nRowsOnPage = pDataWin->GetSizePixel().Height() / GetDataRowHeight();
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
switch ( nId )
{
@@ -1937,11 +1937,11 @@ void BrowseBox::Dispatch( USHORT nId )
case BROWSER_CURSORDOWN:
if ( ( GetCurRow() + 1 ) < nRowCount )
- bDone = GoToRow( GetCurRow() + 1, FALSE );
+ bDone = GoToRow( GetCurRow() + 1, sal_False );
break;
case BROWSER_CURSORUP:
if ( GetCurRow() > 0 )
- bDone = GoToRow( GetCurRow() - 1, FALSE );
+ bDone = GoToRow( GetCurRow() - 1, sal_False );
break;
case BROWSER_SELECTHOME:
if ( GetRowCount() )
@@ -1949,7 +1949,7 @@ void BrowseBox::Dispatch( USHORT nId )
DoHideCursor( "BROWSER_SELECTHOME" );
for ( long nRow = GetCurRow(); nRow >= 0; --nRow )
SelectRow( nRow );
- GoToRow( 0, TRUE );
+ GoToRow( 0, sal_True );
DoShowCursor( "BROWSER_SELECTHOME" );
}
break;
@@ -1960,7 +1960,7 @@ void BrowseBox::Dispatch( USHORT nId )
long nRows = GetRowCount();
for ( long nRow = GetCurRow(); nRow < nRows; ++nRow )
SelectRow( nRow );
- GoToRow( GetRowCount() - 1, TRUE );
+ GoToRow( GetRowCount() - 1, sal_True );
DoShowCursor( "BROWSER_SELECTEND" );
}
break;
@@ -1971,12 +1971,12 @@ void BrowseBox::Dispatch( USHORT nId )
// deselect the current row, if it isn't the first
// and there is no other selected row above
long nRow = GetCurRow();
- BOOL bLocalSelect = ( !IsRowSelected( nRow ) ||
+ sal_Bool bLocalSelect = ( !IsRowSelected( nRow ) ||
GetSelectRowCount() == 1 || IsRowSelected( nRow - 1 ) );
- SelectRow( nRow, bLocalSelect, TRUE );
- bDone = GoToRow( GetCurRow() + 1 , FALSE );
+ SelectRow( nRow, bLocalSelect, sal_True );
+ bDone = GoToRow( GetCurRow() + 1 , sal_False );
if ( bDone )
- SelectRow( GetCurRow(), TRUE, TRUE );
+ SelectRow( GetCurRow(), sal_True, sal_True );
}
else
bDone = ScrollRows( 1 ) != 0;
@@ -1988,40 +1988,40 @@ void BrowseBox::Dispatch( USHORT nId )
// deselect the current row, if it isn't the first
// and there is no other selected row under
long nRow = GetCurRow();
- BOOL bLocalSelect = ( !IsRowSelected( nRow ) ||
+ sal_Bool bLocalSelect = ( !IsRowSelected( nRow ) ||
GetSelectRowCount() == 1 || IsRowSelected( nRow + 1 ) );
- SelectRow( nCurRow, bLocalSelect, TRUE );
- bDone = GoToRow( nRow - 1 , FALSE );
+ SelectRow( nCurRow, bLocalSelect, sal_True );
+ bDone = GoToRow( nRow - 1 , sal_False );
if ( bDone )
- SelectRow( GetCurRow(), TRUE, TRUE );
+ SelectRow( GetCurRow(), sal_True, sal_True );
}
break;
case BROWSER_CURSORPAGEDOWN:
- bDone = (BOOL)ScrollRows( nRowsOnPage );
+ bDone = (sal_Bool)ScrollRows( nRowsOnPage );
break;
case BROWSER_CURSORPAGEUP:
- bDone = (BOOL)ScrollRows( -nRowsOnPage );
+ bDone = (sal_Bool)ScrollRows( -nRowsOnPage );
break;
case BROWSER_CURSOREND:
if ( bColumnCursor )
{
- USHORT nNewId = GetColumnId(ColCount() -1);
+ sal_uInt16 nNewId = GetColumnId(ColCount() -1);
bDone = (nNewId != 0) && GoToColumnId( nNewId );
break;
}
case BROWSER_CURSORENDOFFILE:
- bDone = GoToRow( nRowCount - 1, FALSE );
+ bDone = GoToRow( nRowCount - 1, sal_False );
break;
case BROWSER_CURSORRIGHT:
if ( bColumnCursor )
{
- USHORT nNewPos = GetColumnPos( GetCurColumnId() ) + 1;
- USHORT nNewId = GetColumnId( nNewPos );
+ sal_uInt16 nNewPos = GetColumnPos( GetCurColumnId() ) + 1;
+ sal_uInt16 nNewId = GetColumnId( nNewPos );
if (nNewId != 0) // Am Zeilenende ?
bDone = GoToColumnId( nNewId );
else
{
- USHORT nColId = ( GetColumnId(0) == 0 ) ? GetColumnId(1) : GetColumnId(0);
+ sal_uInt16 nColId = ( GetColumnId(0) == 0 ) ? GetColumnId(1) : GetColumnId(0);
if ( GetRowCount() )
bDone = ( nCurRow < GetRowCount() - 1 ) && GoToRowColumnId( nCurRow + 1, nColId );
else if ( ColCount() )
@@ -2034,18 +2034,18 @@ void BrowseBox::Dispatch( USHORT nId )
case BROWSER_CURSORHOME:
if ( bColumnCursor )
{
- USHORT nNewId = GetColumnId(1);
+ sal_uInt16 nNewId = GetColumnId(1);
bDone = (nNewId != 0) && GoToColumnId( nNewId );
break;
}
case BROWSER_CURSORTOPOFFILE:
- bDone = GoToRow( 0, FALSE );
+ bDone = GoToRow( 0, sal_False );
break;
case BROWSER_CURSORLEFT:
if ( bColumnCursor )
{
- USHORT nNewPos = GetColumnPos( GetCurColumnId() ) - 1;
- USHORT nNewId = GetColumnId( nNewPos );
+ sal_uInt16 nNewPos = GetColumnPos( GetCurColumnId() ) - 1;
+ sal_uInt16 nNewId = GetColumnId( nNewPos );
if (nNewId != 0)
bDone = GoToColumnId( nNewId );
else
@@ -2061,13 +2061,13 @@ void BrowseBox::Dispatch( USHORT nId )
break;
case BROWSER_ENHANCESELECTION:
if ( GetRowCount() )
- SelectRow( GetCurRow(), !IsRowSelected( GetCurRow() ), TRUE );
- bDone = TRUE;
+ SelectRow( GetCurRow(), !IsRowSelected( GetCurRow() ), sal_True );
+ bDone = sal_True;
break;
case BROWSER_SELECT:
if ( GetRowCount() )
- SelectRow( GetCurRow(), !IsRowSelected( GetCurRow() ), FALSE );
- bDone = TRUE;
+ SelectRow( GetCurRow(), !IsRowSelected( GetCurRow() ), sal_False );
+ bDone = sal_True;
break;
case BROWSER_MOVECOLUMNLEFT:
case BROWSER_MOVECOLUMNRIGHT:
@@ -2075,20 +2075,20 @@ void BrowseBox::Dispatch( USHORT nId )
BrowserHeader* pHeaderBar = getDataWindow()->pHeaderBar;
if ( pHeaderBar && pHeaderBar->IsDragable() )
{
- USHORT nColId = GetCurColumnId();
- BOOL bColumnSelected = IsColumnSelected(nColId);
- USHORT nNewPos = GetColumnPos(nColId);
- BOOL bMoveAllowed = FALSE;
+ sal_uInt16 nColId = GetCurColumnId();
+ sal_Bool bColumnSelected = IsColumnSelected(nColId);
+ sal_uInt16 nNewPos = GetColumnPos(nColId);
+ sal_Bool bMoveAllowed = sal_False;
if ( BROWSER_MOVECOLUMNLEFT == nId && nNewPos > 1 )
- --nNewPos,bMoveAllowed = TRUE;
+ --nNewPos,bMoveAllowed = sal_True;
else if ( BROWSER_MOVECOLUMNRIGHT == nId && nNewPos < (ColCount()-1) )
- ++nNewPos,bMoveAllowed = TRUE;
+ ++nNewPos,bMoveAllowed = sal_True;
if ( bMoveAllowed )
{
SetColumnPos( nColId, nNewPos );
ColumnMoved( nColId );
- MakeFieldVisible(GetCurRow(),nColId,TRUE);
+ MakeFieldVisible(GetCurRow(),nColId,sal_True);
if ( bColumnSelected )
SelectColumnId(nColId);
}
@@ -2119,7 +2119,7 @@ void BrowseBox::SetCursorColor(const Color& _rCol)
DoShowCursor("SetCursorColor");
}
// -----------------------------------------------------------------------------
-Rectangle BrowseBox::calcHeaderRect(sal_Bool _bIsColumnBar,BOOL _bOnScreen)
+Rectangle BrowseBox::calcHeaderRect(sal_Bool _bIsColumnBar,sal_Bool _bOnScreen)
{
Window* pParent = NULL;
if ( !_bOnScreen )
@@ -2143,14 +2143,14 @@ Rectangle BrowseBox::calcHeaderRect(sal_Bool _bIsColumnBar,BOOL _bOnScreen)
return Rectangle(aTopLeft,Size(nWidth,nHeight));
}
// -----------------------------------------------------------------------------
-Rectangle BrowseBox::calcTableRect(BOOL _bOnScreen)
+Rectangle BrowseBox::calcTableRect(sal_Bool _bOnScreen)
{
Window* pParent = NULL;
if ( !_bOnScreen )
pParent = GetAccessibleParentWindow();
Rectangle aRect( GetWindowExtentsRelative( pParent ) );
- Rectangle aRowBar = calcHeaderRect(FALSE,pParent == NULL);
+ Rectangle aRowBar = calcHeaderRect(sal_False,pParent == NULL);
long nX = aRowBar.Right() - aRect.Left();
long nY = aRowBar.Top() - aRect.Top();
@@ -2159,7 +2159,7 @@ Rectangle BrowseBox::calcTableRect(BOOL _bOnScreen)
return Rectangle(aRowBar.TopRight(), Size(aSize.A() - nX, aSize.B() - nY - aHScroll.GetSizePixel().Height()) );
}
// -----------------------------------------------------------------------------
-Rectangle BrowseBox::GetFieldRectPixelAbs( sal_Int32 _nRowId,sal_uInt16 _nColId, BOOL /*_bIsHeader*/, BOOL _bOnScreen )
+Rectangle BrowseBox::GetFieldRectPixelAbs( sal_Int32 _nRowId,sal_uInt16 _nColId, sal_Bool /*_bIsHeader*/, sal_Bool _bOnScreen )
{
Window* pParent = NULL;
if ( !_bOnScreen )
diff --git a/svtools/source/brwbox/brwbox3.cxx b/svtools/source/brwbox/brwbox3.cxx
index 102af1b6e1a1..966f8e8596fc 100644
--- a/svtools/source/brwbox/brwbox3.cxx
+++ b/svtools/source/brwbox/brwbox3.cxx
@@ -172,7 +172,7 @@ sal_Int32 BrowseBox::GetAccessibleControlCount() const
Reference< XAccessible > BrowseBox::CreateAccessibleControl( sal_Int32 )
{
- DBG_ASSERT( FALSE, "BrowseBox::CreateAccessibleControl: to be overwritten!" );
+ DBG_ASSERT( sal_False, "BrowseBox::CreateAccessibleControl: to be overwritten!" );
return NULL;
}
// -----------------------------------------------------------------------------
@@ -192,7 +192,7 @@ sal_Bool BrowseBox::ConvertPointToCellAddress(
sal_Bool BrowseBox::ConvertPointToRowHeader( sal_Int32& rnRow, const Point& rPoint )
{
rnRow = GetRowAtYPosPixel(rPoint.Y());
- // USHORT nColumnId = GetColumnAtXPosPixel(rPoint.X());
+ // sal_uInt16 nColumnId = GetColumnAtXPosPixel(rPoint.X());
return rnRow != BROWSER_INVALIDID;// && nColumnId == 0;
}
// -----------------------------------------------------------------------------
@@ -397,7 +397,7 @@ void BrowseBox::GrabTableFocus()
GrabFocus();
}
// -----------------------------------------------------------------------------
-String BrowseBox::GetCellText(long, USHORT ) const
+String BrowseBox::GetCellText(long, sal_uInt16 ) const
{
DBG_ASSERT(0,"This method has to be implemented by the derived classes! BUG!!");
return String();
@@ -531,13 +531,13 @@ sal_Bool BrowseBox::IsCellVisible( sal_Int32 _nRow, sal_uInt16 _nColumnPos ) con
return IsFieldVisible( _nRow, GetColumnId( _nColumnPos ) );
}
// -----------------------------------------------------------------------------
-String BrowseBox::GetAccessibleCellText(long _nRow, USHORT _nColPos) const
+String BrowseBox::GetAccessibleCellText(long _nRow, sal_uInt16 _nColPos) const
{
return GetCellText( _nRow, GetColumnId( _nColPos ) );
}
// -----------------------------------------------------------------------------
-BOOL BrowseBox::GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector )
+sal_Bool BrowseBox::GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector )
{
return Control::GetGlyphBoundRects( rOrigin, rStr, nIndex, nLen, nBase, rVector );
}
@@ -552,7 +552,7 @@ void BrowseBox::GrabFocus()
Control::GrabFocus();
}
// -----------------------------------------------------------------------------
-Reference< XAccessible > BrowseBox::GetAccessible( BOOL bCreate )
+Reference< XAccessible > BrowseBox::GetAccessible( sal_Bool bCreate )
{
return Control::GetAccessible( bCreate );
}
diff --git a/svtools/source/brwbox/brwhead.cxx b/svtools/source/brwbox/brwhead.cxx
index 39845b84f7e0..b517f6d931e5 100644
--- a/svtools/source/brwbox/brwhead.cxx
+++ b/svtools/source/brwbox/brwhead.cxx
@@ -79,7 +79,7 @@ void BrowserHeader::EndDrag()
Update();
// not aborted?
- USHORT nId = GetCurItemId();
+ sal_uInt16 nId = GetCurItemId();
if ( nId )
{
// Handle-Column?
@@ -98,7 +98,7 @@ void BrowserHeader::EndDrag()
// column drag
// Hat sich die Position eigentlich veraendert
// Handlecolumn beruecksichtigen
- USHORT nOldPos = _pBrowseBox->GetColumnPos(nId),
+ sal_uInt16 nOldPos = _pBrowseBox->GetColumnPos(nId),
nNewPos = GetItemPos( nId );
if (!_pBrowseBox->GetColumnId(0)) // Handle
diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx
index cb43e4989355..377180653780 100644
--- a/svtools/source/brwbox/datwin.cxx
+++ b/svtools/source/brwbox/datwin.cxx
@@ -67,7 +67,7 @@ void ButtonFrame::Draw( OutputDevice& rDev )
{
Window *pWin = (Window*) &rDev;
if( bPressed )
- pWin->DrawSelectionBackground( aRect, 0, TRUE, FALSE, FALSE );
+ pWin->DrawSelectionBackground( aRect, 0, sal_True, sal_False, sal_False );
}
else
{
@@ -84,10 +84,10 @@ void ButtonFrame::Draw( OutputDevice& rDev )
String aVal = rDev.GetEllipsisString(aText,aInnerRect.GetWidth() - 2*MIN_COLUMNWIDTH);
Font aFont( rDev.GetFont() );
- BOOL bOldTransp = aFont.IsTransparent();
+ sal_Bool bOldTransp = aFont.IsTransparent();
if ( !bOldTransp )
{
- aFont.SetTransparent( TRUE );
+ aFont.SetTransparent( sal_True );
rDev.SetFont( aFont );
}
@@ -102,7 +102,7 @@ void ButtonFrame::Draw( OutputDevice& rDev )
// restore settings
if ( !bOldTransp )
{
- aFont.SetTransparent(FALSE);
+ aFont.SetTransparent(sal_False);
rDev.SetFont( aFont );
}
if (m_bDrawDisabled)
@@ -123,14 +123,14 @@ void ButtonFrame::Draw( OutputDevice& rDev )
//-------------------------------------------------------------------
-BrowserColumn::BrowserColumn( USHORT nItemId, const class Image &rImage,
- const String& rTitle, ULONG nWidthPixel, const Fraction& rCurrentZoom,
+BrowserColumn::BrowserColumn( sal_uInt16 nItemId, const class Image &rImage,
+ const String& rTitle, sal_uLong nWidthPixel, const Fraction& rCurrentZoom,
HeaderBarItemBits nFlags )
: _nId( nItemId ),
_nWidth( nWidthPixel ),
_aImage( rImage ),
_aTitle( rTitle ),
- _bFrozen( FALSE ),
+ _bFrozen( sal_False ),
_nFlags( nFlags )
{
double n = (double)_nWidth;
@@ -145,7 +145,7 @@ BrowserColumn::~BrowserColumn()
//-------------------------------------------------------------------
-void BrowserColumn::SetWidth(ULONG nNewWidthPixel, const Fraction& rCurrentZoom)
+void BrowserColumn::SetWidth(sal_uLong nNewWidthPixel, const Fraction& rCurrentZoom)
{
_nWidth = nNewWidthPixel;
double n = (double)_nWidth;
@@ -156,13 +156,13 @@ void BrowserColumn::SetWidth(ULONG nNewWidthPixel, const Fraction& rCurrentZoom)
//-------------------------------------------------------------------
-void BrowserColumn::Draw( BrowseBox& rBox, OutputDevice& rDev, const Point& rPos, BOOL bCurs )
+void BrowserColumn::Draw( BrowseBox& rBox, OutputDevice& rDev, const Point& rPos, sal_Bool bCurs )
{
if ( _nId == 0 )
{
// paint handle column
ButtonFrame( rPos, Size( Width()-1, rBox.GetDataRowHeight()-1 ),
- String(), FALSE, bCurs,
+ String(), sal_False, bCurs,
0 != (BROWSER_COLUMN_TITLEABBREVATION&_nFlags) ).Draw( rDev );
Color aOldLineColor = rDev.GetLineColor();
rDev.SetLineColor( Color( COL_BLACK ) );
@@ -216,18 +216,18 @@ BrowserDataWin::BrowserDataWin( BrowseBox* pParent )
,pEventWin( pParent )
,pCornerWin( 0 )
,pDtorNotify( 0 )
- ,bInPaint( FALSE )
- ,bInCommand( FALSE )
- ,bNoScrollBack( FALSE )
- ,bNoHScroll( FALSE )
- ,bNoVScroll( FALSE )
- ,bUpdateMode( TRUE )
- ,bResizeOnPaint( FALSE )
- ,bUpdateOnUnlock( FALSE )
- ,bInUpdateScrollbars( FALSE )
- ,bHadRecursion( FALSE )
- ,bOwnDataChangedHdl( FALSE )
- ,bCallingDropCallback( FALSE )
+ ,bInPaint( sal_False )
+ ,bInCommand( sal_False )
+ ,bNoScrollBack( sal_False )
+ ,bNoHScroll( sal_False )
+ ,bNoVScroll( sal_False )
+ ,bUpdateMode( sal_True )
+ ,bResizeOnPaint( sal_False )
+ ,bUpdateOnUnlock( sal_False )
+ ,bInUpdateScrollbars( sal_False )
+ ,bHadRecursion( sal_False )
+ ,bOwnDataChangedHdl( sal_False )
+ ,bCallingDropCallback( sal_False )
,nUpdateLock( 0 )
,nCursorHidden( 0 )
,m_nDragRowDividerLimit( 0 )
@@ -241,7 +241,7 @@ BrowserDataWin::BrowserDataWin( BrowseBox* pParent )
BrowserDataWin::~BrowserDataWin()
{
if( pDtorNotify )
- *pDtorNotify = TRUE;
+ *pDtorNotify = sal_True;
}
//-------------------------------------------------------------------
@@ -253,14 +253,14 @@ void BrowserDataWin::LeaveUpdateLock()
if (bUpdateOnUnlock )
{
Control::Update();
- bUpdateOnUnlock = FALSE;
+ bUpdateOnUnlock = sal_False;
}
}
}
//-------------------------------------------------------------------
void InitSettings_Impl( Window *pWin,
- BOOL bFont, BOOL bForeground, BOOL bBackground )
+ sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground )
{
const StyleSettings& rStyleSettings =
pWin->GetSettings().GetStyleSettings();
@@ -296,7 +296,7 @@ void BrowserDataWin::Update()
if ( !nUpdateLock )
Control::Update();
else
- bUpdateOnUnlock = TRUE;
+ bUpdateOnUnlock = sal_True;
}
//-------------------------------------------------------------------
@@ -307,9 +307,9 @@ void BrowserDataWin::DataChanged( const DataChangedEvent& rDCEvt )
{
if( !bOwnDataChangedHdl )
{
- InitSettings_Impl( this, TRUE, TRUE, TRUE );
+ InitSettings_Impl( this, sal_True, sal_True, sal_True );
Invalidate();
- InitSettings_Impl( GetParent(), TRUE, TRUE, TRUE );
+ InitSettings_Impl( GetParent(), sal_True, sal_True, sal_True );
GetParent()->Invalidate();
GetParent()->Resize();
}
@@ -328,9 +328,9 @@ void BrowserDataWin::Paint( const Rectangle& rRect )
aInvalidRegion.Insert( new Rectangle( rRect ) );
return;
}
- bInPaint = TRUE;
+ bInPaint = sal_True;
( (BrowseBox*) GetParent() )->PaintData( *this, rRect );
- bInPaint = FALSE;
+ bInPaint = sal_False;
DoOutstandingInvalidations();
}
else
@@ -352,7 +352,7 @@ BrowseEvent BrowserDataWin::CreateBrowseEvent( const Point& rPosPixel )
// find column under mouse
long nMouseX = rPosPixel.X();
long nColX = 0;
- USHORT nCol;
+ sal_uInt16 nCol;
for ( nCol = 0;
nCol < pBox->pCols->Count() && nColX < GetSizePixel().Width();
++nCol )
@@ -362,7 +362,7 @@ BrowseEvent BrowserDataWin::CreateBrowseEvent( const Point& rPosPixel )
if ( nMouseX < nColX )
break;
}
- USHORT nColId = BROWSER_INVALIDID;
+ sal_uInt16 nColId = BROWSER_INVALIDID;
if ( nCol < pBox->pCols->Count() )
nColId = pBox->pCols->GetObject(nCol)->GetId();
@@ -424,14 +424,14 @@ void BrowserDataWin::Command( const CommandEvent& rEvt )
return;
Point aEventPos( rEvt.GetMousePosPixel() );
- long nRow = pBox->GetRowAtYPosPixel( aEventPos.Y(), FALSE);
+ long nRow = pBox->GetRowAtYPosPixel( aEventPos.Y(), sal_False);
MouseEvent aMouseEvt( aEventPos, 1, MOUSE_SELECT, MOUSE_LEFT );
if ( COMMAND_CONTEXTMENU == rEvt.GetCommand() && rEvt.IsMouseEvent() &&
nRow < pBox->GetRowCount() && !pBox->IsRowSelected(nRow) )
{
- BOOL bDeleted = FALSE;
+ sal_Bool bDeleted = sal_False;
pDtorNotify = &bDeleted;
- bInCommand = TRUE;
+ bInCommand = sal_True;
MouseButtonDown( aMouseEvt );
if( bDeleted )
return;
@@ -439,20 +439,20 @@ void BrowserDataWin::Command( const CommandEvent& rEvt )
if( bDeleted )
return;
pDtorNotify = 0;
- bInCommand = FALSE;
+ bInCommand = sal_False;
}
aEventPos.Y() += GetParent()->GetTitleHeight();
CommandEvent aEvt( aEventPos, rEvt.GetCommand(),
rEvt.IsMouseEvent(), rEvt.GetData() );
- bInCommand = TRUE;
- BOOL bDeleted = FALSE;
+ bInCommand = sal_True;
+ sal_Bool bDeleted = sal_False;
pDtorNotify = &bDeleted;
GetParent()->Command( aEvt );
if( bDeleted )
return;
pDtorNotify = 0;
- bInCommand = FALSE;
+ bInCommand = sal_False;
if ( COMMAND_STARTDRAG == rEvt.GetCommand() )
MouseButtonUp( aMouseEvt );
@@ -462,7 +462,7 @@ void BrowserDataWin::Command( const CommandEvent& rEvt )
//-------------------------------------------------------------------
-BOOL BrowserDataWin::ImplRowDividerHitTest( const BrowserMouseEvent& _rEvent )
+sal_Bool BrowserDataWin::ImplRowDividerHitTest( const BrowserMouseEvent& _rEvent )
{
if ( ! ( GetParent()->IsInteractiveRowHeightEnabled()
&& ( _rEvent.GetRow() >= 0 )
@@ -470,7 +470,7 @@ BOOL BrowserDataWin::ImplRowDividerHitTest( const BrowserMouseEvent& _rEvent )
&& ( _rEvent.GetColumnId() == 0 )
)
)
- return FALSE;
+ return sal_False;
long nDividerDistance = GetParent()->GetDataRowHeight() - ( _rEvent.GetPosPixel().Y() % GetParent()->GetDataRowHeight() );
return ( nDividerDistance <= 4 );
@@ -570,7 +570,7 @@ void BrowserDataWin::StartRowDividerDrag( const Point& _rStartPos )
m_nDragRowDividerLimit = nDragRowDividerCurrentPos - nDataRowHeight;
- GetParent()->bRowDividerDrag = TRUE;
+ GetParent()->bRowDividerDrag = sal_True;
GetParent()->ImplStartTracking();
Rectangle aDragSplitRect( 0, m_nDragRowDividerLimit, GetOutputSizePixel().Width(), nDragRowDividerCurrentPos );
@@ -594,7 +594,7 @@ void BrowserDataWin::Tracking( const TrackingEvent& rTEvt )
if ( rTEvt.IsTrackingEnded() )
{
HideTracking();
- GetParent()->bRowDividerDrag = FALSE;
+ GetParent()->bRowDividerDrag = sal_False;
GetParent()->ImplEndTracking();
if ( !rTEvt.IsTrackingCanceled() )
@@ -645,7 +645,7 @@ void BrowserDataWin::RequestHelp( const HelpEvent& rHEvt )
//===================================================================
BrowseEvent::BrowseEvent( Window* pWindow,
- long nAbsRow, USHORT nColumn, USHORT nColumnId,
+ long nAbsRow, sal_uInt16 nColumn, sal_uInt16 nColumnId,
const Rectangle& rRect ):
pWin(pWindow),
nRow(nAbsRow),
@@ -666,7 +666,7 @@ BrowserMouseEvent::BrowserMouseEvent( BrowserDataWin *pWindow,
//-------------------------------------------------------------------
BrowserMouseEvent::BrowserMouseEvent( Window *pWindow, const MouseEvent& rEvt,
- long nAbsRow, USHORT nColumn, USHORT nColumnId,
+ long nAbsRow, sal_uInt16 nColumn, sal_uInt16 nColumnId,
const Rectangle& rRect ):
MouseEvent(rEvt),
BrowseEvent( pWindow, nAbsRow, nColumn, nColumnId, rRect )
@@ -693,7 +693,7 @@ BrowserExecuteDropEvent::BrowserExecuteDropEvent( BrowserDataWin *pWindow, const
//-------------------------------------------------------------------
-void BrowserDataWin::SetUpdateMode( BOOL bMode )
+void BrowserDataWin::SetUpdateMode( sal_Bool bMode )
{
DBG_ASSERT( !bUpdateMode || aInvalidRegion.Count() == 0,
"invalid region not empty" );
@@ -720,7 +720,7 @@ void BrowserDataWin::DoOutstandingInvalidations()
//-------------------------------------------------------------------
-void BrowserDataWin::Invalidate( USHORT nFlags )
+void BrowserDataWin::Invalidate( sal_uInt16 nFlags )
{
if ( !GetUpdateMode() )
{
@@ -737,7 +737,7 @@ void BrowserDataWin::Invalidate( USHORT nFlags )
//-------------------------------------------------------------------
-void BrowserDataWin::Invalidate( const Rectangle& rRect, USHORT nFlags )
+void BrowserDataWin::Invalidate( const Rectangle& rRect, sal_uInt16 nFlags )
{
if ( !GetUpdateMode() )
aInvalidRegion.Insert( new Rectangle( rRect ) );
@@ -749,20 +749,21 @@ void BrowserDataWin::Invalidate( const Rectangle& rRect, USHORT nFlags )
void BrowserScrollBar::Tracking( const TrackingEvent& rTEvt )
{
- ULONG nPos = GetThumbPos();
+ sal_uLong nPos = GetThumbPos();
if ( nPos != _nLastPos )
{
- if ( _nTip )
- Help::HideTip( _nTip );
-
String aTip( String::CreateFromInt32(nPos) );
aTip += '/';
if ( _pDataWin->GetRealRowCount().Len() )
aTip += _pDataWin->GetRealRowCount();
else
aTip += String::CreateFromInt32(GetRangeMax());
+
Rectangle aRect( GetPointerPosPixel(), Size( GetTextHeight(), GetTextWidth( aTip ) ) );
- _nTip = Help::ShowTip( this, aRect, aTip );
+ if ( _nTip )
+ Help::UpdateTip( _nTip, this, aRect, aTip );
+ else
+ _nTip = Help::ShowTip( this, aRect, aTip );
_nLastPos = nPos;
}
diff --git a/svtools/source/brwbox/datwin.hxx b/svtools/source/brwbox/datwin.hxx
index 1deb8aeb5b56..91b22d764bb0 100644
--- a/svtools/source/brwbox/datwin.hxx
+++ b/svtools/source/brwbox/datwin.hxx
@@ -53,18 +53,18 @@ class ButtonFrame
Rectangle aRect;
Rectangle aInnerRect;
String aText;
- BOOL bPressed;
- BOOL bCurs;
- BOOL bAbbr;
- BOOL m_bDrawDisabled;
+ sal_Bool bPressed;
+ sal_Bool bCurs;
+ sal_Bool bAbbr;
+ sal_Bool m_bDrawDisabled;
public:
ButtonFrame( const Point& rPt, const Size& rSz,
const String &rText,
- BOOL bPress = FALSE,
- BOOL bCursor = FALSE,
- BOOL bAbbreviate = TRUE,
- BOOL _bDrawDisabled = FALSE)
+ sal_Bool bPress = sal_False,
+ sal_Bool bCursor = sal_False,
+ sal_Bool bAbbreviate = sal_True,
+ sal_Bool _bDrawDisabled = sal_False)
:aRect( rPt, rSz )
,aInnerRect( Point( aRect.Left()+1, aRect.Top()+1 ),
Size( aRect.GetWidth()-2, aRect.GetHeight()-2 ) )
@@ -83,34 +83,34 @@ public:
class BrowserColumn
{
- USHORT _nId;
- ULONG _nOriginalWidth;
- ULONG _nWidth;
+ sal_uInt16 _nId;
+ sal_uLong _nOriginalWidth;
+ sal_uLong _nWidth;
Image _aImage;
String _aTitle;
- BOOL _bFrozen;
+ sal_Bool _bFrozen;
HeaderBarItemBits _nFlags;
public:
- BrowserColumn( USHORT nItemId, const Image &rImage,
- const String& rTitle, ULONG nWidthPixel, const Fraction& rCurrentZoom,
+ BrowserColumn( sal_uInt16 nItemId, const Image &rImage,
+ const String& rTitle, sal_uLong nWidthPixel, const Fraction& rCurrentZoom,
HeaderBarItemBits nFlags );
virtual ~BrowserColumn();
- USHORT GetId() const { return _nId; }
+ sal_uInt16 GetId() const { return _nId; }
- ULONG Width() { return _nWidth; }
+ sal_uLong Width() { return _nWidth; }
Image& GetImage() { return _aImage; }
String& Title() { return _aTitle; }
HeaderBarItemBits& Flags() { return _nFlags; }
- BOOL IsFrozen() const { return _bFrozen; }
- void Freeze( BOOL bFreeze = TRUE ) { _bFrozen = bFreeze; }
+ sal_Bool IsFrozen() const { return _bFrozen; }
+ void Freeze( sal_Bool bFreeze = sal_True ) { _bFrozen = bFreeze; }
virtual void Draw( BrowseBox& rBox, OutputDevice& rDev,
- const Point& rPos, BOOL bCurs );
+ const Point& rPos, sal_Bool bCurs );
- void SetWidth(ULONG nNewWidthPixel, const Fraction& rCurrentZoom);
+ void SetWidth(sal_uLong nNewWidthPixel, const Fraction& rCurrentZoom);
void ZoomChanged(const Fraction& rNewZoom);
};
@@ -125,7 +125,7 @@ public:
BrowserHeader* pHeaderBar; // only for BROWSER_HEADERBAR_NEW
Window* pEventWin; // Window of forwarded events
ScrollBarBox* pCornerWin; // Window in the corner btw the ScrollBars
- BOOL* pDtorNotify;
+ sal_Bool* pDtorNotify;
AutoTimer aMouseTimer; // recalls MouseMove on dragging out
MouseEvent aRepeatEvt; // a MouseEvent to repeat
Point aLastMousePos; // verhindert pseudo-MouseMoves
@@ -133,8 +133,8 @@ public:
String aRealRowCount; // zur Anzeige im VScrollBar
RectangleList aInvalidRegion; // invalidated Rectangles during !UpdateMode
- FASTBOOL bInPaint; // TRUE while in Paint
- FASTBOOL bInCommand; // TRUE while in Command
+ FASTBOOL bInPaint; // sal_True while in Paint
+ FASTBOOL bInCommand; // sal_True while in Command
FASTBOOL bNoScrollBack; // nur vorwaerts scrollen
FASTBOOL bNoHScroll; // kein horizontaler Scrollbar
FASTBOOL bNoVScroll; // no vertical scrollbar
@@ -148,7 +148,7 @@ public:
FASTBOOL bHadRecursion; // Rekursion war aufgetreten
FASTBOOL bOwnDataChangedHdl; // dont change colors in DataChanged
FASTBOOL bCallingDropCallback; // we're in a callback to AcceptDrop or ExecuteDrop curently
- USHORT nUpdateLock; // lock count, dont call Control::Update()!
+ sal_uInt16 nUpdateLock; // lock count, dont call Control::Update()!
short nCursorHidden; // new conuter for DoHide/ShowCursor
long m_nDragRowDividerLimit;
@@ -184,20 +184,20 @@ public:
{ return (BrowseBox*) Window::GetParent(); }
const String& GetRealRowCount() const { return aRealRowCount; }
- void SetUpdateMode( BOOL bMode );
+ void SetUpdateMode( sal_Bool bMode );
FASTBOOL GetUpdateMode() const { return bUpdateMode; }
void EnterUpdateLock() { ++nUpdateLock; }
void LeaveUpdateLock();
void Update();
void DoOutstandingInvalidations();
- void Invalidate( USHORT nFlags = 0 );
- void Invalidate( const Rectangle& rRect, USHORT nFlags = 0 );
- void Invalidate( const Region& rRegion, USHORT nFlags = 0 )
+ void Invalidate( sal_uInt16 nFlags = 0 );
+ void Invalidate( const Rectangle& rRect, sal_uInt16 nFlags = 0 );
+ void Invalidate( const Region& rRegion, sal_uInt16 nFlags = 0 )
{ Control::Invalidate( rRegion, nFlags ); }
protected:
void StartRowDividerDrag( const Point& _rStartPos );
- BOOL ImplRowDividerHitTest( const BrowserMouseEvent& _rEvent );
+ sal_Bool ImplRowDividerHitTest( const BrowserMouseEvent& _rEvent );
};
//-------------------------------------------------------------------
@@ -213,8 +213,8 @@ inline void BrowserDataWin::Repaint()
class BrowserScrollBar: public ScrollBar
{
- ULONG _nTip;
- ULONG _nLastPos;
+ sal_uLong _nTip;
+ sal_uLong _nLastPos;
BrowserDataWin* _pDataWin;
public:
@@ -234,7 +234,7 @@ public:
//===================================================================
void InitSettings_Impl( Window *pWin,
- BOOL bFont = TRUE, BOOL bForeground = TRUE, BOOL bBackground = TRUE );
+ sal_Bool bFont = sal_True, sal_Bool bForeground = sal_True, sal_Bool bBackground = sal_True );
//===================================================================
diff --git a/svtools/source/brwbox/ebbcontrols.cxx b/svtools/source/brwbox/ebbcontrols.cxx
index edf56f0b9b34..9f870a9f0681 100644
--- a/svtools/source/brwbox/ebbcontrols.cxx
+++ b/svtools/source/brwbox/ebbcontrols.cxx
@@ -80,7 +80,7 @@ namespace svt
nPos = 0;
if (nPos >= GetEntryCount())
nPos = GetEntryCount() - 1;
- SetText(GetEntry(sal::static_int_cast< USHORT >(nPos)));
+ SetText(GetEntry(sal::static_int_cast< sal_uInt16 >(nPos)));
return 1;
}
}
@@ -187,7 +187,7 @@ namespace svt
nPos = 0;
if (nPos >= GetEntryCount())
nPos = GetEntryCount() - 1;
- SelectEntryPos(sal::static_int_cast< USHORT >(nPos));
+ SelectEntryPos(sal::static_int_cast< sal_uInt16 >(nPos));
Select(); // for calling Modify
return 1;
}
@@ -311,7 +311,7 @@ namespace svt
}
//------------------------------------------------------------------
- void CheckBoxControl::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags )
+ void CheckBoxControl::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags )
{
pBox->Draw(pDev,rPos,rSize,nFlags);
}
@@ -399,7 +399,7 @@ namespace svt
EditCellController::EditCellController( Edit* _pEdit )
:CellController( _pEdit )
,m_pEditImplementation( new EditImplementation( *_pEdit ) )
- ,m_bOwnImplementation( TRUE )
+ ,m_bOwnImplementation( sal_True )
{
}
@@ -407,7 +407,7 @@ namespace svt
EditCellController::EditCellController( MultiLineTextCell* _pEdit )
:CellController( _pEdit )
,m_pEditImplementation( new MultiLineEditImplementation( *_pEdit ) )
- ,m_bOwnImplementation( TRUE )
+ ,m_bOwnImplementation( sal_True )
{
}
@@ -415,7 +415,7 @@ namespace svt
EditCellController::EditCellController( IEditImplementation* _pImplementation )
:CellController( &_pImplementation->GetControl() )
,m_pEditImplementation( _pImplementation )
- ,m_bOwnImplementation( FALSE )
+ ,m_bOwnImplementation( sal_False )
{
}
@@ -552,21 +552,21 @@ namespace svt
//------------------------------------------------------------------
void MultiLineTextCell::Modify()
{
- GetTextEngine()->SetModified( TRUE );
+ GetTextEngine()->SetModified( sal_True );
MultiLineEdit::Modify();
}
//------------------------------------------------------------------
- BOOL MultiLineTextCell::dispatchKeyEvent( const KeyEvent& _rEvent )
+ sal_Bool MultiLineTextCell::dispatchKeyEvent( const KeyEvent& _rEvent )
{
Selection aOldSelection( GetSelection() );
- BOOL bWasModified = IsModified();
+ sal_Bool bWasModified = IsModified();
ClearModifyFlag( );
- BOOL bHandled = GetTextView()->KeyInput( _rEvent );
+ sal_Bool bHandled = GetTextView()->KeyInput( _rEvent );
- BOOL bIsModified = IsModified();
+ sal_Bool bIsModified = IsModified();
if ( bWasModified && !bIsModified )
// not sure whether this can really happen
SetModifyFlag();
@@ -579,9 +579,9 @@ namespace svt
if ( aNewSelection != aOldSelection // selection changed
|| bIsModified // or some other modification
)
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//------------------------------------------------------------------
@@ -599,7 +599,7 @@ namespace svt
const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent();
const KeyCode& rKeyCode = pKeyEvent->GetKeyCode();
- USHORT nCode = rKeyCode.GetCode();
+ sal_uInt16 nCode = rKeyCode.GetCode();
if ( ( nCode == KEY_RETURN ) && ( rKeyCode.GetModifier() == KEY_MOD1 ) )
{
diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx
index 4f0afbaf5d2d..04bb47c2ab3e 100644
--- a/svtools/source/brwbox/editbrowsebox.cxx
+++ b/svtools/source/brwbox/editbrowsebox.cxx
@@ -629,7 +629,7 @@ namespace svt
{
while ( GetSelectColumnCount( ) )
SelectColumnPos(
- sal::static_int_cast< USHORT >(FirstSelectedColumn()),
+ sal::static_int_cast< sal_uInt16 >(FirstSelectedColumn()),
sal_False );
Select();
}
diff --git a/svtools/source/brwbox/editbrowsebox2.cxx b/svtools/source/brwbox/editbrowsebox2.cxx
index ed62b2cb1520..9f247a580fc9 100644
--- a/svtools/source/brwbox/editbrowsebox2.cxx
+++ b/svtools/source/brwbox/editbrowsebox2.cxx
@@ -42,7 +42,7 @@ namespace svt
using namespace ::com::sun::star::accessibility::AccessibleEventId;
// -----------------------------------------------------------------------------
-Reference< XAccessible > EditBrowseBox::CreateAccessibleCheckBoxCell(long _nRow, USHORT _nColumnPos,const TriState& eState,sal_Bool _bEnabled)
+Reference< XAccessible > EditBrowseBox::CreateAccessibleCheckBoxCell(long _nRow, sal_uInt16 _nColumnPos,const TriState& eState,sal_Bool _bEnabled)
{
Reference< XAccessible > xAccessible( GetAccessible() );
Reference< XAccessibleContext > xAccContext;
@@ -163,7 +163,7 @@ void EditBrowseBox::DetermineFocus( const sal_uInt16 _nGetFocusFlags )
)
{
long nRows = GetRowCount();
- USHORT nCols = ColCount();
+ sal_uInt16 nCols = ColCount();
if ( ( nRows > 0 ) && ( nCols > 0 ) )
{
@@ -195,7 +195,7 @@ Rectangle EditBrowseBox::GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nCol
if ( SeekRow(_nRow) )
{
CellController* pController = GetController(
- _nRow, GetColumnId( sal::static_int_cast< USHORT >(_nColumnPos) ) );
+ _nRow, GetColumnId( sal::static_int_cast< sal_uInt16 >(_nColumnPos) ) );
if ( pController )
aRect = pController->GetWindow().GetCharacterBounds(_nIndex);
}
@@ -208,7 +208,7 @@ sal_Int32 EditBrowseBox::GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumn
if ( SeekRow(_nRow) )
{
CellController* pController = GetController(
- _nRow, GetColumnId( sal::static_int_cast< USHORT >(_nColumnPos) ) );
+ _nRow, GetColumnId( sal::static_int_cast< sal_uInt16 >(_nColumnPos) ) );
if ( pController )
nRet = pController->GetWindow().GetIndexForPoint(_rPoint);
}
diff --git a/svtools/source/config/accessibilityoptions.cxx b/svtools/source/config/accessibilityoptions.cxx
index b2d2c54232b0..1cd368df0f5f 100644
--- a/svtools/source/config/accessibilityoptions.cxx
+++ b/svtools/source/config/accessibilityoptions.cxx
@@ -515,14 +515,14 @@ SvtAccessibilityOptions::SvtAccessibilityOptions()
}
++sm_nAccessibilityRefCount;
}
- //StartListening( *sm_pSingleImplConfig, TRUE );
+ //StartListening( *sm_pSingleImplConfig, sal_True );
}
// -----------------------------------------------------------------------
SvtAccessibilityOptions::~SvtAccessibilityOptions()
{
- //EndListening( *sm_pSingleImplConfig, TRUE );
+ //EndListening( *sm_pSingleImplConfig, sal_True );
::osl::MutexGuard aGuard( SingletonMutex::get() );
if( !--sm_nAccessibilityRefCount )
{
diff --git a/svtools/source/config/apearcfg.cxx b/svtools/source/config/apearcfg.cxx
index 4a95d0c03dcd..1c581dbf8f53 100644
--- a/svtools/source/config/apearcfg.cxx
+++ b/svtools/source/config/apearcfg.cxx
@@ -59,9 +59,9 @@ SvtTabAppearanceCfg::SvtTabAppearanceCfg()
#if defined( UNX ) || defined ( FS_PRIV_DEBUG )
,nAAMinPixelHeight ( DEFAULT_AAMINHEIGHT )
#endif
- ,bMenuMouseFollow(FALSE)
+ ,bMenuMouseFollow(sal_False)
#if defined( UNX ) || defined ( FS_PRIV_DEBUG )
- ,bFontAntialiasing ( TRUE )
+ ,bFontAntialiasing ( sal_True )
#endif
{
RTL_LOGFILE_CONTEXT(aLog, "svtools SvtTabAppearanceCfg::SvtTabAppearanceCfg()");
@@ -165,7 +165,7 @@ void SvtTabAppearanceCfg::Notify( const com::sun::star::uno::Sequence< rtl::OUSt
Beschreibung:
--------------------------------------------------------------------*/
-void SvtTabAppearanceCfg::SetDragMode ( USHORT nSet )
+void SvtTabAppearanceCfg::SetDragMode ( sal_uInt16 nSet )
{
nDragMode = nSet;
SetModified();
@@ -175,7 +175,7 @@ void SvtTabAppearanceCfg::SetDragMode ( USHORT nSet )
Beschreibung:
--------------------------------------------------------------------*/
-void SvtTabAppearanceCfg::SetScaleFactor ( USHORT nSet )
+void SvtTabAppearanceCfg::SetScaleFactor ( sal_uInt16 nSet )
{
nScaleFactor = nSet;
SetModified();
@@ -185,7 +185,7 @@ void SvtTabAppearanceCfg::SetScaleFactor ( USHORT nSet )
Beschreibung:
--------------------------------------------------------------------*/
-void SvtTabAppearanceCfg::SetSnapMode ( USHORT nSet )
+void SvtTabAppearanceCfg::SetSnapMode ( sal_uInt16 nSet )
{
nSnapMode = nSet;
SetModified();
@@ -193,7 +193,7 @@ void SvtTabAppearanceCfg::SetSnapMode ( USHORT nSet )
/*--------------------------------------------------------------------
Beschreibung:
--------------------------------------------------------------------*/
-void SvtTabAppearanceCfg::SetMiddleMouseButton ( USHORT nSet )
+void SvtTabAppearanceCfg::SetMiddleMouseButton ( sal_uInt16 nSet )
{
nMiddleMouse = nSet;
SetModified();
@@ -211,7 +211,7 @@ void SvtTabAppearanceCfg::SetApplicationDefaults ( Application* pApp )
// SetStandard...Styles() resets the UseSystemUIFonts flag,
// but we don't want to change it now, so save the flag before ...
- BOOL bUseSystemUIFonts = hAppStyle.GetUseSystemUIFonts();
+ sal_Bool bUseSystemUIFonts = hAppStyle.GetUseSystemUIFonts();
hAppStyle.SetStandardStyles();
// and set it here
hAppStyle.SetUseSystemUIFonts( bUseSystemUIFonts );
@@ -230,7 +230,7 @@ void SvtTabAppearanceCfg::SetApplicationDefaults ( Application* pApp )
// Mouse Snap
MouseSettings hMouseSettings = hAppSettings.GetMouseSettings();
- ULONG nMouseOptions = hMouseSettings.GetOptions();
+ sal_uLong nMouseOptions = hMouseSettings.GetOptions();
nMouseOptions &= ! (MOUSE_OPTION_AUTOCENTERPOS | MOUSE_OPTION_AUTODEFBTNPOS);
@@ -251,7 +251,7 @@ void SvtTabAppearanceCfg::SetApplicationDefaults ( Application* pApp )
// Merge and Publish Settings
- ULONG nFollow = hMouseSettings.GetFollow();
+ sal_uLong nFollow = hMouseSettings.GetFollow();
if(bMenuMouseFollow)
nFollow |= MOUSE_FOLLOW_MENU;
else
diff --git a/svtools/source/config/colorcfg.cxx b/svtools/source/config/colorcfg.cxx
index 7a151d609e6e..91e93cc65998 100644
--- a/svtools/source/config/colorcfg.cxx
+++ b/svtools/source/config/colorcfg.cxx
@@ -550,7 +550,7 @@ ColorConfigValue ColorConfig::GetColorValue(ColorConfigEntry eEntry, sal_Bool bS
if(COL_AUTO == sal::static_int_cast<ColorData>(aRet.nColor))
aRet.nColor = ColorConfig::GetDefaultColor(eEntry).GetColor();
//#103495# don't allow grey between 40% and 60% as application background
- const UINT8 nRed = COLORDATA_RED( aRet.nColor);
+ const sal_uInt8 nRed = COLORDATA_RED( aRet.nColor);
if(eEntry == APPBACKGROUND &&
(nRed == COLORDATA_GREEN( aRet.nColor)) &&
(nRed == COLORDATA_BLUE( aRet.nColor)) &&
@@ -569,14 +569,14 @@ EditableColorConfig::EditableColorConfig() :
m_pImpl(new ColorConfig_Impl),
m_bModified(sal_False)
{
- m_pImpl->BlockBroadcasts(TRUE);
+ m_pImpl->BlockBroadcasts(sal_True);
}
/*-- 25.03.2002 12:03:08---------------------------------------------------
-----------------------------------------------------------------------*/
EditableColorConfig::~EditableColorConfig()
{
- m_pImpl->BlockBroadcasts(FALSE);
+ m_pImpl->BlockBroadcasts(sal_False);
if(m_bModified)
m_pImpl->SetModified();
if(m_pImpl->IsModified())
@@ -674,12 +674,12 @@ void EditableColorConfig::Commit()
// -----------------------------------------------------------------------------
void EditableColorConfig::DisableBroadcast()
{
- m_pImpl->BlockBroadcasts(TRUE);
+ m_pImpl->BlockBroadcasts(sal_True);
}
// -----------------------------------------------------------------------------
void EditableColorConfig::EnableBroadcast()
{
- m_pImpl->BlockBroadcasts(FALSE);
+ m_pImpl->BlockBroadcasts(sal_False);
}
// -----------------------------------------------------------------------------
diff --git a/svtools/source/config/htmlcfg.cxx b/svtools/source/config/htmlcfg.cxx
index b8a9660ee8dc..1be097f17ab5 100644
--- a/svtools/source/config/htmlcfg.cxx
+++ b/svtools/source/config/htmlcfg.cxx
@@ -276,7 +276,7 @@ void SvxHtmlOptions::AddListenerLink( const Link& rLink )
void SvxHtmlOptions::RemoveListenerLink( const Link& rLink )
{
- for ( USHORT n=0; n<pImp->aList.Count(); n++ )
+ for ( sal_uInt16 n=0; n<pImp->aList.Count(); n++ )
{
if ( (*pImp->aList.GetObject(n) ) == rLink )
{
@@ -288,7 +288,7 @@ void SvxHtmlOptions::RemoveListenerLink( const Link& rLink )
void SvxHtmlOptions::CallListeners()
{
- for ( USHORT n = 0; n < pImp->aList.Count(); ++n )
+ for ( sal_uInt16 n = 0; n < pImp->aList.Count(); ++n )
pImp->aList.GetObject(n)->Call( this );
}
@@ -300,14 +300,14 @@ void SvxHtmlOptions::Notify( const com::sun::star::uno::Sequence< rtl::OUString
}
// -----------------------------------------------------------------------
-USHORT SvxHtmlOptions::GetFontSize(USHORT nPos) const
+sal_uInt16 SvxHtmlOptions::GetFontSize(sal_uInt16 nPos) const
{
if(nPos < HTML_FONT_COUNT)
- return (USHORT)pImp->aFontSizeArr[nPos];
+ return (sal_uInt16)pImp->aFontSizeArr[nPos];
return 0;
}
// -----------------------------------------------------------------------
-void SvxHtmlOptions::SetFontSize(USHORT nPos, USHORT nSize)
+void SvxHtmlOptions::SetFontSize(sal_uInt16 nPos, sal_uInt16 nSize)
{
if(nPos < HTML_FONT_COUNT)
{
@@ -321,7 +321,7 @@ void SvxHtmlOptions::SetFontSize(USHORT nPos, USHORT nSize)
// -----------------------------------------------------------------------
-BOOL SvxHtmlOptions::IsImportUnknown() const
+sal_Bool SvxHtmlOptions::IsImportUnknown() const
{
return 0 != (pImp->nFlags & HTMLCFG_UNKNOWN_TAGS) ;
}
@@ -329,7 +329,7 @@ BOOL SvxHtmlOptions::IsImportUnknown() const
// -----------------------------------------------------------------------
-void SvxHtmlOptions::SetImportUnknown(BOOL bSet)
+void SvxHtmlOptions::SetImportUnknown(sal_Bool bSet)
{
if(bSet)
pImp->nFlags |= HTMLCFG_UNKNOWN_TAGS;
@@ -341,15 +341,15 @@ void SvxHtmlOptions::SetImportUnknown(BOOL bSet)
// -----------------------------------------------------------------------
-USHORT SvxHtmlOptions::GetExportMode() const
+sal_uInt16 SvxHtmlOptions::GetExportMode() const
{
- return (USHORT)pImp->nExportMode;
+ return (sal_uInt16)pImp->nExportMode;
}
// -----------------------------------------------------------------------
-void SvxHtmlOptions::SetExportMode(USHORT nSet)
+void SvxHtmlOptions::SetExportMode(sal_uInt16 nSet)
{
if(nSet <= HTML_CFG_MAX )
{
@@ -362,7 +362,7 @@ void SvxHtmlOptions::SetExportMode(USHORT nSet)
// -----------------------------------------------------------------------
-BOOL SvxHtmlOptions::IsStarBasic() const
+sal_Bool SvxHtmlOptions::IsStarBasic() const
{
return 0 != (pImp->nFlags & HTMLCFG_STAR_BASIC) ;
}
@@ -370,7 +370,7 @@ BOOL SvxHtmlOptions::IsStarBasic() const
// -----------------------------------------------------------------------
-void SvxHtmlOptions::SetStarBasic(BOOL bSet)
+void SvxHtmlOptions::SetStarBasic(sal_Bool bSet)
{
if(bSet)
pImp->nFlags |= HTMLCFG_STAR_BASIC;
@@ -383,14 +383,14 @@ void SvxHtmlOptions::SetStarBasic(BOOL bSet)
--------------------------------------------------*/
-BOOL SvxHtmlOptions::IsSaveGraphicsLocal() const
+sal_Bool SvxHtmlOptions::IsSaveGraphicsLocal() const
{
return 0 != (pImp->nFlags & HTMLCFG_LOCAL_GRF) ;
}
/*-----------------14.02.97 08.34-------------------
--------------------------------------------------*/
-void SvxHtmlOptions::SetSaveGraphicsLocal(BOOL bSet)
+void SvxHtmlOptions::SetSaveGraphicsLocal(sal_Bool bSet)
{
if(bSet)
pImp->nFlags |= HTMLCFG_LOCAL_GRF;
@@ -403,9 +403,9 @@ void SvxHtmlOptions::SetSaveGraphicsLocal(BOOL bSet)
--------------------------------------------------*/
-BOOL SvxHtmlOptions::IsPrintLayoutExtension() const
+sal_Bool SvxHtmlOptions::IsPrintLayoutExtension() const
{
- BOOL bRet = 0 != (pImp->nFlags & HTMLCFG_PRINT_LAYOUT_EXTENSION);
+ sal_Bool bRet = 0 != (pImp->nFlags & HTMLCFG_PRINT_LAYOUT_EXTENSION);
switch( pImp->nExportMode )
{
case HTML_CFG_MSIE_40:
@@ -413,14 +413,14 @@ BOOL SvxHtmlOptions::IsPrintLayoutExtension() const
case HTML_CFG_WRITER :
break;
default:
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
/*-----------------10/21/97 08:34am-----------------
--------------------------------------------------*/
-void SvxHtmlOptions::SetPrintLayoutExtension(BOOL bSet)
+void SvxHtmlOptions::SetPrintLayoutExtension(sal_Bool bSet)
{
if(bSet)
pImp->nFlags |= HTMLCFG_PRINT_LAYOUT_EXTENSION;
@@ -433,14 +433,14 @@ void SvxHtmlOptions::SetPrintLayoutExtension(BOOL bSet)
--------------------------------------------------*/
-BOOL SvxHtmlOptions::IsIgnoreFontFamily() const
+sal_Bool SvxHtmlOptions::IsIgnoreFontFamily() const
{
return 0 != (pImp->nFlags & HTMLCFG_IGNORE_FONT_FAMILY) ;
}
/*-----------------10.07.98 10.02-------------------
--------------------------------------------------*/
-void SvxHtmlOptions::SetIgnoreFontFamily(BOOL bSet)
+void SvxHtmlOptions::SetIgnoreFontFamily(sal_Bool bSet)
{
if(bSet)
pImp->nFlags |= HTMLCFG_IGNORE_FONT_FAMILY;
@@ -451,14 +451,14 @@ void SvxHtmlOptions::SetIgnoreFontFamily(BOOL bSet)
/* -----------------05.02.99 09:03-------------------
*
* --------------------------------------------------*/
-BOOL SvxHtmlOptions::IsStarBasicWarning() const
+sal_Bool SvxHtmlOptions::IsStarBasicWarning() const
{
return 0 != (pImp->nFlags & HTMLCFG_IS_BASIC_WARNING) ;
}
/* -----------------05.02.99 09:03-------------------
*
* --------------------------------------------------*/
-void SvxHtmlOptions::SetStarBasicWarning(BOOL bSet)
+void SvxHtmlOptions::SetStarBasicWarning(sal_Bool bSet)
{
if(bSet)
pImp->nFlags |= HTMLCFG_IS_BASIC_WARNING;
@@ -506,14 +506,14 @@ SvxHtmlOptions* SvxHtmlOptions::Get()
/* ---------------------- 2006-06-07T21:02+0200 ---------------------- */
-BOOL SvxHtmlOptions::IsNumbersEnglishUS() const
+sal_Bool SvxHtmlOptions::IsNumbersEnglishUS() const
{
return 0 != (pImp->nFlags & HTMLCFG_NUMBERS_ENGLISH_US) ;
}
/* ---------------------- 2006-06-07T21:02+0200 ---------------------- */
-void SvxHtmlOptions::SetNumbersEnglishUS(BOOL bSet)
+void SvxHtmlOptions::SetNumbersEnglishUS(sal_Bool bSet)
{
if(bSet)
pImp->nFlags |= HTMLCFG_NUMBERS_ENGLISH_US;
diff --git a/svtools/source/config/menuoptions.cxx b/svtools/source/config/menuoptions.cxx
index e33251050b81..28f52fe2b23b 100644
--- a/svtools/source/config/menuoptions.cxx
+++ b/svtools/source/config/menuoptions.cxx
@@ -176,7 +176,7 @@ class SvtMenuOptions_Impl : public ConfigItem
{
m_bDontHideDisabledEntries = bState;
SetModified();
- for ( USHORT n=0; n<aList.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aList.Count(); n++ )
aList.GetObject(n)->Call( this );
Commit();
}
@@ -185,7 +185,7 @@ class SvtMenuOptions_Impl : public ConfigItem
{
m_bFollowMouse = bState;
SetModified();
- for ( USHORT n=0; n<aList.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aList.Count(); n++ )
aList.GetObject(n)->Call( this );
Commit();
}
@@ -194,7 +194,7 @@ class SvtMenuOptions_Impl : public ConfigItem
{
m_nMenuIcons = bState;
SetModified();
- for ( USHORT n=0; n<aList.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aList.Count(); n++ )
aList.GetObject(n)->Call( this );
Commit();
}
@@ -299,7 +299,7 @@ SvtMenuOptions_Impl::~SvtMenuOptions_Impl()
Commit();
}
- for ( USHORT n=0; n<aList.Count(); )
+ for ( sal_uInt16 n=0; n<aList.Count(); )
delete aList.Remove(n);
}
@@ -358,7 +358,7 @@ void SvtMenuOptions_Impl::Notify( const Sequence< OUString >& seqPropertyNames )
if ( bMenuSettingsChanged )
m_nMenuIcons = bSystemMenuIcons ? 2 : bMenuIcons;
- for ( USHORT n=0; n<aList.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aList.Count(); n++ )
aList.GetObject(n)->Call( this );
}
@@ -427,7 +427,7 @@ void SvtMenuOptions_Impl::AddListenerLink( const Link& rLink )
void SvtMenuOptions_Impl::RemoveListenerLink( const Link& rLink )
{
- for ( USHORT n=0; n<aList.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aList.Count(); n++ )
{
if ( (*aList.GetObject(n) ) == rLink )
{
diff --git a/svtools/source/config/miscopt.cxx b/svtools/source/config/miscopt.cxx
index 2f455734a01d..9668a2144ebf 100644
--- a/svtools/source/config/miscopt.cxx
+++ b/svtools/source/config/miscopt.cxx
@@ -81,7 +81,7 @@ using namespace ::com::sun::star;
#define PROPERTYCOUNT 6
-#define VCL_TOOLBOX_STYLE_FLAT ((USHORT)0x0004) // from <vcl/toolbox.hxx>
+#define VCL_TOOLBOX_STYLE_FLAT ((sal_uInt16)0x0004) // from <vcl/toolbox.hxx>
DECLARE_LIST( LinkList, Link * )
@@ -374,7 +374,7 @@ SvtMiscOptions_Impl::~SvtMiscOptions_Impl()
Commit();
}
- for ( USHORT n=0; n<aList.Count(); )
+ for ( sal_uInt16 n=0; n<aList.Count(); )
delete aList.Remove(n);
}
@@ -467,7 +467,7 @@ void SvtMiscOptions_Impl::AddListenerLink( const Link& rLink )
void SvtMiscOptions_Impl::RemoveListenerLink( const Link& rLink )
{
- for ( USHORT n=0; n<aList.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aList.Count(); n++ )
{
if ( (*aList.GetObject(n) ) == rLink )
{
@@ -479,7 +479,7 @@ void SvtMiscOptions_Impl::RemoveListenerLink( const Link& rLink )
void SvtMiscOptions_Impl::CallListeners()
{
- for ( USHORT n = 0; n < aList.Count(); ++n )
+ for ( sal_uInt16 n = 0; n < aList.Count(); ++n )
aList.GetObject(n)->Call( this );
}
@@ -725,7 +725,7 @@ sal_Int16 SvtMiscOptions::GetCurrentSymbolsSize() const
{
// Use system settings, we have to retrieve the toolbar icon size from the
// Application class
- ULONG nStyleIconSize = Application::GetSettings().GetStyleSettings().GetToolbarIconSize();
+ sal_uLong nStyleIconSize = Application::GetSettings().GetStyleSettings().GetToolbarIconSize();
if ( nStyleIconSize == STYLE_TOOLBAR_ICONSIZE_LARGE )
eOptSymbolsSize = SFX_SYMBOLS_SIZE_LARGE;
else
diff --git a/svtools/source/config/printoptions.cxx b/svtools/source/config/printoptions.cxx
index 46e1f737d347..237d7f79a1c1 100644
--- a/svtools/source/config/printoptions.cxx
+++ b/svtools/source/config/printoptions.cxx
@@ -75,7 +75,7 @@
// - statics -
// -----------
-static USHORT aDPIArray[] = { 72, 96, 150, 200, 300, 600 };
+static sal_uInt16 aDPIArray[] = { 72, 96, 150, 200, 300, 600 };
#define DPI_COUNT (sizeof(aDPIArray)/sizeof(aDPIArray[0 ]))
@@ -748,7 +748,7 @@ void SvtBasePrintOptions::GetPrinterOptions( PrinterOptions& rOptions ) const
rOptions.SetReducedGradientStepCount( GetReducedGradientStepCount() );
rOptions.SetReduceBitmaps( IsReduceBitmaps() );
rOptions.SetReducedBitmapMode( (PrinterBitmapMode) GetReducedBitmapMode() );
- rOptions.SetReducedBitmapResolution( aDPIArray[ Min( (USHORT) GetReducedBitmapResolution(), (USHORT)( DPI_COUNT - 1 ) ) ] );
+ rOptions.SetReducedBitmapResolution( aDPIArray[ Min( (sal_uInt16) GetReducedBitmapResolution(), (sal_uInt16)( DPI_COUNT - 1 ) ) ] );
rOptions.SetReducedBitmapIncludesTransparency( IsReducedBitmapIncludesTransparency() );
rOptions.SetConvertToGreyscales( IsConvertToGreyscales() );
}
@@ -771,7 +771,7 @@ void SvtBasePrintOptions::SetPrinterOptions( const PrinterOptions& rOptions )
SetReducedBitmapIncludesTransparency( rOptions.IsReducedBitmapIncludesTransparency() );
SetConvertToGreyscales( rOptions.IsConvertToGreyscales() );
- const USHORT nDPI = rOptions.GetReducedBitmapResolution();
+ const sal_uInt16 nDPI = rOptions.GetReducedBitmapResolution();
if( nDPI < aDPIArray[ 0 ] )
SetReducedBitmapResolution( 0 );
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index c9b9b23786b4..4ea086ad7580 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -113,7 +113,7 @@ namespace
struct ReleaseSolarMutex
{
private:
- ULONG m_nCount;
+ sal_uLong m_nCount;
public:
inline ReleaseSolarMutex()
@@ -219,7 +219,7 @@ private:
sal_Bool Kill( const OUString& rURL );
protected:
- virtual BOOL DoubleClickHdl();
+ virtual sal_Bool DoubleClickHdl();
virtual ::rtl::OUString GetAccessibleObjectDescription( ::svt::AccessibleBrowseBoxObjType _eType, sal_Int32 _nPos ) const;
public:
@@ -228,7 +228,7 @@ public:
virtual void Resize();
virtual void KeyInput( const KeyEvent& rKEvt );
- virtual BOOL EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText );
+ virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText );
void ClearAll();
HeaderBar* GetHeaderBar() const { return mpHeaderBar; }
@@ -243,7 +243,7 @@ public:
DECL_LINK( ResetQuickSearch_Impl, Timer * );
virtual PopupMenu* CreateContextMenu( void );
- virtual void ExcecuteContextMenuAction( USHORT nSelectedPopentry );
+ virtual void ExcecuteContextMenuAction( sal_uInt16 nSelectedPopentry );
};
// class HashedEntry --------------------------------------------------
@@ -473,9 +473,9 @@ void NameTranslationList::Init()
aConfig.SetGroup( ByteString( pSection ) );
- USHORT nKeyCnt = aConfig.GetKeyCount();
+ sal_uInt16 nKeyCnt = aConfig.GetKeyCount();
- for( USHORT nCnt = 0 ; nCnt < nKeyCnt ; ++nCnt )
+ for( sal_uInt16 nCnt = 0 ; nCnt < nKeyCnt ; ++nCnt )
Insert( new NameTranslationEntry( aConfig.GetKeyName( nCnt ), aConfig.ReadKey( nCnt ) ) );
}
}
@@ -615,7 +615,7 @@ public:
String FolderInserted( const OUString& rURL,
const OUString& rTitle );
- ULONG GetEntryPos( const OUString& rURL );
+ sal_uLong GetEntryPos( const OUString& rURL );
inline void EnableContextMenu( sal_Bool bEnable );
inline void EnableDelete( sal_Bool bEnable );
@@ -965,7 +965,7 @@ PopupMenu* ViewTabListBox_Impl::CreateContextMenu( void )
// -----------------------------------------------------------------------
-void ViewTabListBox_Impl::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
+void ViewTabListBox_Impl::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry )
{
switch ( nSelectedPopupEntry )
{
@@ -983,7 +983,7 @@ void ViewTabListBox_Impl::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry
void ViewTabListBox_Impl::ClearAll()
{
- for ( USHORT i = 0; i < GetEntryCount(); ++i )
+ for ( sal_uInt16 i = 0; i < GetEntryCount(); ++i )
delete (SvtContentEntry*)GetEntry(i)->GetUserData();
Clear();
}
@@ -1059,10 +1059,10 @@ void ViewTabListBox_Impl::DeleteEntries()
}
// -----------------------------------------------------------------------
-BOOL ViewTabListBox_Impl::EditedEntry( SvLBoxEntry* pEntry,
+sal_Bool ViewTabListBox_Impl::EditedEntry( SvLBoxEntry* pEntry,
const XubString& rNewText )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
OUString aURL;
SvtContentEntry* pData = (SvtContentEntry*)pEntry->GetUserData();
@@ -1107,7 +1107,7 @@ BOOL ViewTabListBox_Impl::EditedEntry( SvLBoxEntry* pEntry,
pData->maURL = aURL;
pEntry->SetUserData( pData );
- bRet = TRUE;
+ bRet = sal_True;
}
}
catch( Exception const & )
@@ -1145,7 +1145,7 @@ void ViewTabListBox_Impl::DoQuickSearch( const xub_Unicode& rChar )
SvLBoxEntry* pEntry = GetEntry( mnSearchIndex );
if ( pEntry )
{
- SelectAll( FALSE );
+ SelectAll( sal_False );
Select( pEntry );
SetCurEntry( pEntry );
MakeVisible( pEntry );
@@ -1161,10 +1161,10 @@ void ViewTabListBox_Impl::DoQuickSearch( const xub_Unicode& rChar )
}
// -----------------------------------------------------------------------
-BOOL ViewTabListBox_Impl::DoubleClickHdl()
+sal_Bool ViewTabListBox_Impl::DoubleClickHdl()
{
SvHeaderTabListBox::DoubleClickHdl();
- return FALSE;
+ return sal_False;
// this means "do no additional handling". Especially this means that the SvImpLBox does not
// recognize that the entry at the double click position change after the handler call (which is
// the case if in the handler, our content was replaced)
@@ -1311,7 +1311,7 @@ void SvtFileView::OpenFolder( const Sequence< OUString >& aContents )
{
mpImp->mpView->ClearAll();
const OUString* pFileProperties = aContents.getConstArray();
- UINT32 i, nCount = aContents.getLength();
+ sal_uInt32 i, nCount = aContents.getLength();
for ( i = 0; i < nCount; ++i )
{
String aRow( pFileProperties[i] );
@@ -1343,7 +1343,7 @@ void SvtFileView::OpenFolder( const Sequence< OUString >& aContents )
// detect image
sal_Bool bDoInsert = sal_True;
INetURLObject aObj( aImageURL.Len() > 0 ? aImageURL : aURL );
- Image aImage = SvFileInformationManager::GetImage( aObj, FALSE, isHighContrast( this ) );
+ Image aImage = SvFileInformationManager::GetImage( aObj, sal_False, isHighContrast( this ) );
if ( bDoInsert )
{
@@ -1391,7 +1391,7 @@ sal_Bool SvtFileView::CreateNewFolder( const String& rNewFolder )
String sTitle = aObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
String sEntry = mpImp->FolderInserted( sURL, sTitle );
SvLBoxEntry* pEntry = mpImp->mpView->InsertEntry( sEntry, mpImp->maFolderImage, mpImp->maFolderImage );
- SvtContentEntry* pUserData = new SvtContentEntry( sURL, TRUE );
+ SvtContentEntry* pUserData = new SvtContentEntry( sURL, sal_True );
pEntry->SetUserData( pUserData );
mpImp->mpView->MakeVisible( pEntry );
bRet = sal_True;
@@ -1577,7 +1577,7 @@ void SvtFileView::CancelRunningAsyncAction()
void SvtFileView::SetNoSelection()
{
- mpImp->mpView->SelectAll( FALSE );
+ mpImp->mpView->SelectAll( sal_False );
}
// -----------------------------------------------------------------------
@@ -1612,7 +1612,7 @@ void SvtFileView::SetDoubleClickHdl( const Link& rHdl )
// -----------------------------------------------------------------------
-ULONG SvtFileView::GetSelectionCount() const
+sal_uLong SvtFileView::GetSelectionCount() const
{
return mpImp->mpView->GetSelectionCount();
}
@@ -1684,7 +1684,7 @@ void SvtFileView::EndInplaceEditing( bool _bCancel )
IMPL_LINK( SvtFileView, HeaderSelect_Impl, HeaderBar*, pBar )
{
DBG_ASSERT( pBar, "no headerbar" );
- USHORT nItemID = pBar->GetCurItemId();
+ sal_uInt16 nItemID = pBar->GetCurItemId();
HeaderBarItemBits nBits;
@@ -1705,7 +1705,7 @@ IMPL_LINK( SvtFileView, HeaderSelect_Impl, HeaderBar*, pBar )
nBits = pBar->GetItemBits( nItemID );
- BOOL bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW );
+ sal_Bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW );
if ( bUp )
{
@@ -1729,10 +1729,10 @@ IMPL_LINK( SvtFileView, HeaderEndDrag_Impl, HeaderBar*, pBar )
if ( !pBar->IsItemMode() )
{
Size aSize;
- USHORT nTabs = pBar->GetItemCount();
+ sal_uInt16 nTabs = pBar->GetItemCount();
long nTmpSize = 0;
- for ( USHORT i = 1; i <= nTabs; ++i )
+ for ( sal_uInt16 i = 1; i <= nTabs; ++i )
{
long nWidth = pBar->GetItemSize(i);
aSize.Width() = nWidth + nTmpSize;
@@ -1755,14 +1755,14 @@ String SvtFileView::GetConfigString() const
sRet += String::CreateFromInt32( mpImp->mnSortColumn );
sRet += ';';
HeaderBarItemBits nBits = pBar->GetItemBits( mpImp->mnSortColumn );
- BOOL bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW );
+ sal_Bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW );
sRet += bUp ? '1' : '0';
sRet += ';';
- USHORT nCount = pBar->GetItemCount();
- for ( USHORT i = 0; i < nCount; ++i )
+ sal_uInt16 nCount = pBar->GetItemCount();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
- USHORT nId = pBar->GetItemId(i);
+ sal_uInt16 nId = pBar->GetItemId(i);
sRet += String::CreateFromInt32( nId );
sRet += ';';
sRet += String::CreateFromInt32( pBar->GetItemSize( nId ) );
@@ -1779,9 +1779,9 @@ void SvtFileView::SetConfigString( const String& rCfgStr )
HeaderBar* pBar = mpImp->mpView->GetHeaderBar();
DBG_ASSERT( pBar, "invalid headerbar" );
- USHORT nIdx = 0;
- mpImp->mnSortColumn = (USHORT)rCfgStr.GetToken( 0, ';', nIdx ).ToInt32();
- BOOL bUp = (BOOL)(USHORT)rCfgStr.GetToken( 0, ';', nIdx ).ToInt32();
+ sal_uInt16 nIdx = 0;
+ mpImp->mnSortColumn = (sal_uInt16)rCfgStr.GetToken( 0, ';', nIdx ).ToInt32();
+ sal_Bool bUp = (sal_Bool)(sal_uInt16)rCfgStr.GetToken( 0, ';', nIdx ).ToInt32();
HeaderBarItemBits nBits = pBar->GetItemBits( mpImp->mnSortColumn );
if ( bUp )
@@ -1798,7 +1798,7 @@ void SvtFileView::SetConfigString( const String& rCfgStr )
while ( nIdx != STRING_NOTFOUND )
{
- USHORT nItemId = (USHORT)rCfgStr.GetToken( 0, ';', nIdx ).ToInt32();
+ sal_uInt16 nItemId = (sal_uInt16)rCfgStr.GetToken( 0, ';', nIdx ).ToInt32();
pBar->SetItemSize( nItemId, rCfgStr.GetToken( 0, ';', nIdx ).ToInt32() );
}
@@ -2192,7 +2192,7 @@ void SvtFileView_Impl::OpenFolder_Impl()
{
::osl::MutexGuard aGuard( maMutex );
- mpView->SetUpdateMode( FALSE );
+ mpView->SetUpdateMode( sal_False );
mpView->ClearAll();
std::vector< SortingData_Impl* >::iterator aIt;
@@ -2215,7 +2215,7 @@ void SvtFileView_Impl::OpenFolder_Impl()
InitSelection();
++mnSuspendSelectCallback;
- mpView->SetUpdateMode( TRUE );
+ mpView->SetUpdateMode( sal_True );
--mnSuspendSelectCallback;
ResetCursor();
@@ -2227,9 +2227,9 @@ void SvtFileView_Impl::ResetCursor()
// deselect
SvLBoxEntry* pEntry = mpView->FirstSelected();
if ( pEntry )
- mpView->Select( pEntry, FALSE );
+ mpView->Select( pEntry, sal_False );
// set cursor to the first entry
- mpView->SetCursor( mpView->First(), TRUE );
+ mpView->SetCursor( mpView->First(), sal_True );
mpView->Update();
}
@@ -2361,10 +2361,10 @@ void SvtFileView_Impl::CreateDisplayText_Impl()
::svtools::VolumeInfo aVolInfo( (*aIt)->mbIsVolume, (*aIt)->mbIsRemote,
(*aIt)->mbIsRemoveable, (*aIt)->mbIsFloppy,
(*aIt)->mbIsCompactDisc );
- (*aIt)->maImage = SvFileInformationManager::GetFolderImage( aVolInfo, FALSE, isHighContrast( mpView ) );
+ (*aIt)->maImage = SvFileInformationManager::GetFolderImage( aVolInfo, sal_False, isHighContrast( mpView ) );
}
else
- (*aIt)->maImage = SvFileInformationManager::GetFileImage( INetURLObject( (*aIt)->maTargetURL ), FALSE, isHighContrast( mpView ));
+ (*aIt)->maImage = SvFileInformationManager::GetFileImage( INetURLObject( (*aIt)->maTargetURL ), sal_False, isHighContrast( mpView ));
}
}
@@ -2449,7 +2449,7 @@ void SvtFileView_Impl::CreateVector_Impl( const Sequence < OUString > &rList )
// detect the image
INetURLObject aObj( pEntry->maImageURL.getLength() ? pEntry->maImageURL : pEntry->maTargetURL );
- pEntry->maImage = SvFileInformationManager::GetImage( aObj, FALSE, isHighContrast( mpView ) );
+ pEntry->maImage = SvFileInformationManager::GetImage( aObj, sal_False, isHighContrast( mpView ) );
maContent.push_back( pEntry );
}
@@ -2480,7 +2480,7 @@ void SvtFileView_Impl::Resort_Impl( sal_Int16 nColumn, sal_Bool bAscending )
if ( !mbIsFirstResort )
{
- ULONG nPos = GetEntryPos( aEntryURL );
+ sal_uLong nPos = GetEntryPos( aEntryURL );
if ( nPos < mpView->GetEntryCount() )
{
pEntry = mpView->GetEntry( nPos );
@@ -2569,7 +2569,7 @@ sal_Bool CompareSortingData_Impl( SortingData_Impl* const aOne, SortingData_Impl
}
}
- // when the two elements are equal, we must not return TRUE (which would
+ // when the two elements are equal, we must not return sal_True (which would
// happen if we just return ! ( a < b ) when not sorting ascending )
if ( bEqual )
return sal_False;
@@ -2659,7 +2659,7 @@ String SvtFileView_Impl::FolderInserted( const OUString& rURL, const OUString& r
::svtools::VolumeInfo aVolInfo;
pData->maType = SvFileInformationManager::GetFolderDescription( aVolInfo );
- pData->maImage = SvFileInformationManager::GetFolderImage( aVolInfo, FALSE, isHighContrast( mpView ) );
+ pData->maImage = SvFileInformationManager::GetFolderImage( aVolInfo, sal_False, isHighContrast( mpView ) );
OUString aValue;
OUString aTab = OUString::createFromAscii( "\t" );
@@ -2688,12 +2688,12 @@ String SvtFileView_Impl::FolderInserted( const OUString& rURL, const OUString& r
}
// -----------------------------------------------------------------------
-ULONG SvtFileView_Impl::GetEntryPos( const OUString& rURL )
+sal_uLong SvtFileView_Impl::GetEntryPos( const OUString& rURL )
{
::osl::MutexGuard aGuard( maMutex );
std::vector< SortingData_Impl* >::iterator aIt;
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
for ( aIt = maContent.begin(); aIt != maContent.end(); aIt++ )
{
diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx
index 6b0f2cdccdd8..a54d578593cd 100644
--- a/svtools/source/contnr/imivctl.hxx
+++ b/svtools/source/contnr/imivctl.hxx
@@ -59,7 +59,7 @@ class IcnGridMap_Impl;
#define F_VER_SBARSIZE_WITH_HBAR 0x0001
#define F_HOR_SBARSIZE_WITH_VBAR 0x0002
-#define F_PAINTED 0x0004 // TRUE nach erstem Paint
+#define F_PAINTED 0x0004 // sal_True nach erstem Paint
#define F_ADD_MODE 0x0008
#define F_SELECTING_RECT 0x0020
#define F_DOWN_CTRL 0x0080
@@ -108,11 +108,11 @@ enum IcnViewFieldType
//
struct LocalFocus
{
- BOOL bOn;
+ sal_Bool bOn;
Rectangle aRect;
Color aPenColor;
- LocalFocus() { bOn = FALSE; }
+ LocalFocus() { bOn = sal_False; }
};
///////////////////////////////////////////////////////////////////////////////
@@ -132,18 +132,18 @@ private:
public:
EntryList_Impl(
SvxIconChoiceCtrl_Impl*,
- USHORT _nInitSize = 1024,
- USHORT _nReSize = 1024 );
+ sal_uInt16 _nInitSize = 1024,
+ sal_uInt16 _nReSize = 1024 );
EntryList_Impl(
SvxIconChoiceCtrl_Impl*,
- USHORT _nBlockSize,
- USHORT _nInitSize,
- USHORT _nReSize );
+ sal_uInt16 _nBlockSize,
+ sal_uInt16 _nInitSize,
+ sal_uInt16 _nReSize );
~EntryList_Impl();
void Clear();
- void Insert( SvxIconChoiceCtrlEntry* pEntry, ULONG nPos );
- SvxIconChoiceCtrlEntry* Remove( ULONG nPos );
+ void Insert( SvxIconChoiceCtrlEntry* pEntry, sal_uLong nPos );
+ SvxIconChoiceCtrlEntry* Remove( sal_uLong nPos );
void Remove( SvxIconChoiceCtrlEntry* pEntry );
};
@@ -158,7 +158,7 @@ class SvxIconChoiceCtrl_Impl
friend class EntryList_Impl;
friend class IcnGridMap_Impl;
- BOOL bChooseWithCursor;
+ sal_Bool bChooseWithCursor;
EntryList_Impl aEntries;
ScrollBar aVerSBar;
ScrollBar aHorSBar;
@@ -188,12 +188,12 @@ class SvxIconChoiceCtrl_Impl
IcnViewEdit_Impl* pEdit;
WinBits nWinBits;
long nMaxBoundHeight; // Hoehe des hoechsten BoundRects
- USHORT nFlags;
- USHORT nCurTextDrawFlags;
- ULONG nUserEventAdjustScrBars;
- ULONG nUserEventShowCursor;
+ sal_uInt16 nFlags;
+ sal_uInt16 nCurTextDrawFlags;
+ sal_uLong nUserEventAdjustScrBars;
+ sal_uLong nUserEventShowCursor;
SvxIconChoiceCtrlEntry* pCurHighlightFrame;
- BOOL bHighlightFramePressed;
+ sal_Bool bHighlightFramePressed;
SvxIconChoiceCtrlEntry* pHead; // Eintrag oben links
SvxIconChoiceCtrlEntry* pCursor;
SvxIconChoiceCtrlEntry* pPrevDropTarget;
@@ -211,16 +211,16 @@ class SvxIconChoiceCtrl_Impl
SvxIconChoiceCtrlEntry* pCurEditedEntry;
SvxIconChoiceCtrlTextMode eTextMode;
SelectionMode eSelectionMode;
- ULONG nSelectionCount;
+ sal_uLong nSelectionCount;
SvxIconChoiceCtrlPositionMode ePositionMode;
- BOOL bBoundRectsDirty;
- BOOL bUpdateMode;
- BOOL bEntryEditingEnabled;
- BOOL bInDragDrop;
+ sal_Bool bBoundRectsDirty;
+ sal_Bool bUpdateMode;
+ sal_Bool bEntryEditingEnabled;
+ sal_Bool bInDragDrop;
- void ShowCursor( BOOL bShow );
+ void ShowCursor( sal_Bool bShow );
- void ImpArrange( BOOL bKeepPredecessors = FALSE );
+ void ImpArrange( sal_Bool bKeepPredecessors = sal_False );
void AdjustVirtSize( const Rectangle& );
void ResetVirtSize();
void CheckScrollBars();
@@ -235,16 +235,16 @@ class SvxIconChoiceCtrl_Impl
DECL_LINK( VisRectChangedHdl, void* );
DECL_LINK( CallSelectHdlHdl, void* );
- void AdjustScrollBars( BOOL bVirtSizeGrowedOnly = FALSE);
+ void AdjustScrollBars( sal_Bool bVirtSizeGrowedOnly = sal_False);
void PositionScrollBars( long nRealWidth, long nRealHeight );
long GetScrollBarPageSize( long nVisibleRange ) const { return ((nVisibleRange*75)/100); }
long GetScrollBarLineSize() const { return nMaxBoundHeight / 2; }
- BOOL HandleScrollCommand( const CommandEvent& rCmd );
+ sal_Bool HandleScrollCommand( const CommandEvent& rCmd );
void ToDocPos( Point& rPosPixel ) { rPosPixel -= pView->GetMapMode().GetOrigin(); }
void InitScrollBarBox();
SvxIconChoiceCtrlEntry* FindNewCursor();
void ToggleSelection( SvxIconChoiceCtrlEntry* );
- void DeselectAllBut( SvxIconChoiceCtrlEntry*, BOOL bPaintSync=FALSE );
+ void DeselectAllBut( SvxIconChoiceCtrlEntry*, sal_Bool bPaintSync=sal_False );
void Center( SvxIconChoiceCtrlEntry* pEntry ) const;
void StopEditTimer() { aEditTimer.Stop(); }
void StartEditTimer() { aEditTimer.Start(); }
@@ -253,13 +253,13 @@ class SvxIconChoiceCtrl_Impl
void SelectRect(
SvxIconChoiceCtrlEntry* pEntry1,
SvxIconChoiceCtrlEntry* pEntry2,
- BOOL bAdd = TRUE,
+ sal_Bool bAdd = sal_True,
SvPtrarr* pOtherRects = 0 );
void SelectRange(
SvxIconChoiceCtrlEntry* pStart,
SvxIconChoiceCtrlEntry* pEnd,
- BOOL bAdd = TRUE );
+ sal_Bool bAdd = sal_True );
void AddSelectedRect( const Rectangle& );
void AddSelectedRect(
@@ -275,27 +275,27 @@ class SvxIconChoiceCtrl_Impl
Point AdjustAtGrid(
const Rectangle& rCenterRect, // "Schwerpunkt" des Objekts (typ. Bmp-Rect)
const Rectangle& rBoundRect ) const;
- ULONG GetPredecessorGrid( const Point& rDocPos) const;
+ sal_uLong GetPredecessorGrid( const Point& rDocPos) const;
void InitPredecessors();
void ClearPredecessors();
- BOOL CheckVerScrollBar();
- BOOL CheckHorScrollBar();
+ sal_Bool CheckVerScrollBar();
+ sal_Bool CheckHorScrollBar();
void CancelUserEvents();
- void EntrySelected( SvxIconChoiceCtrlEntry* pEntry, BOOL bSelect,
- BOOL bSyncPaint );
+ void EntrySelected( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bSelect,
+ sal_Bool bSyncPaint );
void SaveSelection( List** );
- void RepaintEntries( USHORT nEntryFlagsMask );
+ void RepaintEntries( sal_uInt16 nEntryFlagsMask );
void SetListPositions();
void SetDefaultTextSize();
- BOOL IsAutoArrange() const {
- return (BOOL)(ePositionMode == IcnViewPositionModeAutoArrange); }
- BOOL IsAutoAdjust() const {
- return (BOOL)(ePositionMode == IcnViewPositionModeAutoAdjust); }
+ sal_Bool IsAutoArrange() const {
+ return (sal_Bool)(ePositionMode == IcnViewPositionModeAutoArrange); }
+ sal_Bool IsAutoAdjust() const {
+ return (sal_Bool)(ePositionMode == IcnViewPositionModeAutoAdjust); }
void DocRectChanged() { aDocRectChangedTimer.Start(); }
void VisRectChanged() { aVisRectChangedTimer.Start(); }
- void SetOrigin( const Point&, BOOL bDoNotUpdateWallpaper = FALSE );
+ void SetOrigin( const Point&, sal_Bool bDoNotUpdateWallpaper = sal_False );
DECL_LINK( TextEditEndedHdl, IcnViewEdit_Impl* );
@@ -303,7 +303,7 @@ class SvxIconChoiceCtrl_Impl
void HideFocus ();
void DrawFocusRect ( OutputDevice* pOut );
- BOOL IsMnemonicChar( sal_Unicode cChar, ULONG& rPos ) const;
+ sal_Bool IsMnemonicChar( sal_Unicode cChar, sal_uLong& rPos ) const;
public:
@@ -315,52 +315,52 @@ public:
SvxIconChoiceCtrl_Impl( SvtIconChoiceCtrl* pView, WinBits nWinStyle );
~SvxIconChoiceCtrl_Impl();
- BOOL SetChoiceWithCursor ( BOOL bDo = TRUE ) { BOOL bOld=bChooseWithCursor; bChooseWithCursor = bDo; return bOld; }
- void Clear( BOOL bInCtor = FALSE );
+ sal_Bool SetChoiceWithCursor ( sal_Bool bDo = sal_True ) { sal_Bool bOld=bChooseWithCursor; bChooseWithCursor = bDo; return bOld; }
+ void Clear( sal_Bool bInCtor = sal_False );
void SetStyle( WinBits nWinStyle );
WinBits GetStyle() const { return nWinBits; }
- void InsertEntry( SvxIconChoiceCtrlEntry*, ULONG nPos, const Point* pPos=0 );
+ void InsertEntry( SvxIconChoiceCtrlEntry*, sal_uLong nPos, const Point* pPos=0 );
void CreateAutoMnemonics( MnemonicGenerator* _pGenerator = NULL );
void RemoveEntry( SvxIconChoiceCtrlEntry* pEntry );
void FontModified();
- void SelectAll( BOOL bSelect = TRUE, BOOL bPaint = TRUE );
+ void SelectAll( sal_Bool bSelect = sal_True, sal_Bool bPaint = sal_True );
void SelectEntry(
SvxIconChoiceCtrlEntry*,
- BOOL bSelect,
- BOOL bCallHdl = TRUE,
- BOOL bAddToSelection = FALSE,
- BOOL bSyncPaint = FALSE );
+ sal_Bool bSelect,
+ sal_Bool bCallHdl = sal_True,
+ sal_Bool bAddToSelection = sal_False,
+ sal_Bool bSyncPaint = sal_False );
void Paint( const Rectangle& rRect );
- BOOL MouseButtonDown( const MouseEvent& );
- BOOL MouseButtonUp( const MouseEvent& );
- BOOL MouseMove( const MouseEvent&);
- BOOL RequestHelp( const HelpEvent& rHEvt );
+ sal_Bool MouseButtonDown( const MouseEvent& );
+ sal_Bool MouseButtonUp( const MouseEvent& );
+ sal_Bool MouseMove( const MouseEvent&);
+ sal_Bool RequestHelp( const HelpEvent& rHEvt );
void SetCursor_Impl(
SvxIconChoiceCtrlEntry* pOldCursor,
SvxIconChoiceCtrlEntry* pNewCursor,
- BOOL bMod1,
- BOOL bShift,
- BOOL bPaintSync = FALSE);
- BOOL KeyInput( const KeyEvent& );
+ sal_Bool bMod1,
+ sal_Bool bShift,
+ sal_Bool bPaintSync = sal_False);
+ sal_Bool KeyInput( const KeyEvent& );
void Resize();
void GetFocus();
void LoseFocus();
- void SetUpdateMode( BOOL bUpdate );
- BOOL GetUpdateMode() const { return bUpdateMode; }
- void PaintEntry( SvxIconChoiceCtrlEntry* pEntry, BOOL bIsBackgroundPainted=FALSE );
+ void SetUpdateMode( sal_Bool bUpdate );
+ sal_Bool GetUpdateMode() const { return bUpdateMode; }
+ void PaintEntry( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bIsBackgroundPainted=sal_False );
void PaintEntry(
SvxIconChoiceCtrlEntry*,
const Point&,
OutputDevice* pOut = 0,
- BOOL bIsBackgroundPainted = FALSE);
+ sal_Bool bIsBackgroundPainted = sal_False);
void PaintEntryVirtOutDev( SvxIconChoiceCtrlEntry* );
void SetEntryPos(
SvxIconChoiceCtrlEntry* pEntry,
const Point& rPos,
- BOOL bAdjustRow = FALSE,
- BOOL bCheckScrollBars = FALSE,
- BOOL bKeepGridMap = FALSE );
+ sal_Bool bAdjustRow = sal_False,
+ sal_Bool bCheckScrollBars = sal_False,
+ sal_Bool bKeepGridMap = sal_False );
void InvalidateEntry( SvxIconChoiceCtrlEntry* );
IcnViewFieldType GetItem( SvxIconChoiceCtrlEntry*, const Point& rAbsPos );
@@ -370,25 +370,25 @@ public:
SvxIconChoiceCtrlEntry* GetCurEntry() const { return pCursor; }
void SetCursor(
SvxIconChoiceCtrlEntry*,
- // TRUE == bei Single-Selection die Sel. mitfuehren
- BOOL bSyncSingleSelection = TRUE,
- BOOL bShowFocusAsync = FALSE );
+ // sal_True == bei Single-Selection die Sel. mitfuehren
+ sal_Bool bSyncSingleSelection = sal_True,
+ sal_Bool bShowFocusAsync = sal_False );
- SvxIconChoiceCtrlEntry* GetEntry( const Point& rDocPos, BOOL bHit = FALSE );
+ SvxIconChoiceCtrlEntry* GetEntry( const Point& rDocPos, sal_Bool bHit = sal_False );
SvxIconChoiceCtrlEntry* GetNextEntry( const Point& rDocPos, SvxIconChoiceCtrlEntry* pCurEntry );
SvxIconChoiceCtrlEntry* GetPrevEntry( const Point& rDocPos, SvxIconChoiceCtrlEntry* pCurEntry );
Point GetEntryPos( SvxIconChoiceCtrlEntry* );
- void MakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, BOOL bBound = TRUE );
+ void MakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bBound = sal_True );
- void Arrange(BOOL bKeepPredecessors = FALSE, long nSetMaxVirtWidth =0, long nSetMaxVirtHeight =0 );
+ void Arrange(sal_Bool bKeepPredecessors = sal_False, long nSetMaxVirtWidth =0, long nSetMaxVirtHeight =0 );
Rectangle CalcFocusRect( SvxIconChoiceCtrlEntry* );
Rectangle CalcBmpRect( SvxIconChoiceCtrlEntry*, const Point* pPos = 0 );
Rectangle CalcTextRect(
SvxIconChoiceCtrlEntry*,
const Point* pPos = 0,
- BOOL bForInplaceEdit = FALSE,
+ sal_Bool bForInplaceEdit = sal_False,
const String* pStr = 0 );
long CalcBoundingWidth( SvxIconChoiceCtrlEntry* ) const;
@@ -405,44 +405,44 @@ public:
void RecalcAllBoundingRectsSmart();
const Rectangle& GetEntryBoundRect( SvxIconChoiceCtrlEntry* );
void InvalidateBoundingRect( SvxIconChoiceCtrlEntry* );
- void InvalidateBoundingRect( Rectangle& rRect ) { rRect.Right() = LONG_MAX; bBoundRectsDirty = TRUE; }
- BOOL IsBoundingRectValid( const Rectangle& rRect ) const { return (BOOL)( rRect.Right() != LONG_MAX ); }
+ void InvalidateBoundingRect( Rectangle& rRect ) { rRect.Right() = LONG_MAX; bBoundRectsDirty = sal_True; }
+ sal_Bool IsBoundingRectValid( const Rectangle& rRect ) const { return (sal_Bool)( rRect.Right() != LONG_MAX ); }
void PaintEmphasis(
const Rectangle& rRect1,
const Rectangle& rRect2,
- BOOL bSelected,
- BOOL bDropTarget,
- BOOL bCursored,
+ sal_Bool bSelected,
+ sal_Bool bDropTarget,
+ sal_Bool bCursored,
OutputDevice* pOut,
- BOOL bIsBackgroundPainted = FALSE);
+ sal_Bool bIsBackgroundPainted = sal_False);
void PaintItem(
const Rectangle& rRect,
IcnViewFieldType eItem,
SvxIconChoiceCtrlEntry* pEntry,
- USHORT nPaintFlags,
+ sal_uInt16 nPaintFlags,
OutputDevice* pOut,
const String* pStr = 0,
::vcl::ControlLayoutData* _pLayoutData = NULL );
- // berechnet alle BoundingRects neu, wenn bMustRecalcBoundingRects == TRUE
+ // berechnet alle BoundingRects neu, wenn bMustRecalcBoundingRects == sal_True
void CheckBoundingRects() { if (bBoundRectsDirty) RecalcAllBoundingRectsSmart(); }
// berechnet alle invalidierten BoundingRects neu
void UpdateBoundingRects();
- void ShowTargetEmphasis( SvxIconChoiceCtrlEntry* pEntry, BOOL bShow );
+ void ShowTargetEmphasis( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bShow );
void PrepareCommandEvent( const CommandEvent& );
void Command( const CommandEvent& rCEvt );
void ToTop( SvxIconChoiceCtrlEntry* );
- ULONG GetSelectionCount() const;
+ sal_uLong GetSelectionCount() const;
void SetGrid( const Size& );
Size GetMinGrid() const;
- ULONG GetGridCount(
+ sal_uLong GetGridCount(
const Size& rSize,
- BOOL bCheckScrBars,
- BOOL bSmartScrBar ) const;
- void Scroll( long nDeltaX, long nDeltaY, BOOL bScrollBar = FALSE );
+ sal_Bool bCheckScrBars,
+ sal_Bool bSmartScrBar ) const;
+ void Scroll( long nDeltaX, long nDeltaY, sal_Bool bScrollBar = sal_False );
const Size& GetItemSize( SvxIconChoiceCtrlEntry*, IcnViewFieldType ) const;
void HideDDIcon();
@@ -451,67 +451,67 @@ public:
SvxIconChoiceCtrlEntry* pRefEntry,
const Point& rPos );
- BOOL IsOver(
+ sal_Bool IsOver(
SvPtrarr* pSelectedRectList,
const Rectangle& rEntryBoundRect ) const;
void SelectRect(
const Rectangle&,
- BOOL bAdd = TRUE,
+ sal_Bool bAdd = sal_True,
SvPtrarr* pOtherRects = 0 );
void CalcScrollOffsets(
const Point& rRefPosPixel,
long& rX,
long& rY,
- BOOL bDragDrop = FALSE,
- USHORT nBorderWidth = 10 );
+ sal_Bool bDragDrop = sal_False,
+ sal_uInt16 nBorderWidth = 10 );
- BOOL IsTextHit( SvxIconChoiceCtrlEntry* pEntry, const Point& rDocPos );
+ sal_Bool IsTextHit( SvxIconChoiceCtrlEntry* pEntry, const Point& rDocPos );
void MakeVisible(
const Rectangle& rDocPos,
- BOOL bInScrollBarEvent=FALSE,
- BOOL bCallRectChangedHdl = TRUE );
+ sal_Bool bInScrollBarEvent=sal_False,
+ sal_Bool bCallRectChangedHdl = sal_True );
void AdjustEntryAtGrid( SvxIconChoiceCtrlEntry* pStart = 0 );
void SetEntryTextMode( SvxIconChoiceCtrlTextMode, SvxIconChoiceCtrlEntry* pEntry = 0 );
SvxIconChoiceCtrlTextMode GetTextMode( const SvxIconChoiceCtrlEntry* pEntry = 0 ) const;
void ShowEntryFocusRect( const SvxIconChoiceCtrlEntry* pEntry );
- void EnableEntryEditing( BOOL bEnable ) { bEntryEditingEnabled = bEnable; }
- BOOL IsEntryEditingEnabled() const { return bEntryEditingEnabled; }
- BOOL IsEntryEditing() const { return (BOOL)(pCurEditedEntry!=0); }
+ void EnableEntryEditing( sal_Bool bEnable ) { bEntryEditingEnabled = bEnable; }
+ sal_Bool IsEntryEditingEnabled() const { return bEntryEditingEnabled; }
+ sal_Bool IsEntryEditing() const { return (sal_Bool)(pCurEditedEntry!=0); }
void EditEntry( SvxIconChoiceCtrlEntry* pEntry );
- void StopEntryEditing( BOOL bCancel );
- void LockEntryPos( SvxIconChoiceCtrlEntry* pEntry, BOOL bLock );
- ULONG GetEntryCount() const { return aEntries.Count(); }
- SvxIconChoiceCtrlEntry* GetEntry( ULONG nPos ) const { return (SvxIconChoiceCtrlEntry*)aEntries.GetObject(nPos); }
- SvxIconChoiceCtrlEntry* GetFirstSelectedEntry( ULONG& ) const;
- SvxIconChoiceCtrlEntry* GetNextSelectedEntry( ULONG& ) const;
+ void StopEntryEditing( sal_Bool bCancel );
+ void LockEntryPos( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bLock );
+ sal_uLong GetEntryCount() const { return aEntries.Count(); }
+ SvxIconChoiceCtrlEntry* GetEntry( sal_uLong nPos ) const { return (SvxIconChoiceCtrlEntry*)aEntries.GetObject(nPos); }
+ SvxIconChoiceCtrlEntry* GetFirstSelectedEntry( sal_uLong& ) const;
+ SvxIconChoiceCtrlEntry* GetNextSelectedEntry( sal_uLong& ) const;
SvxIconChoiceCtrlEntry* GetHdlEntry() const { return pHdlEntry; }
void SetHdlEntry( SvxIconChoiceCtrlEntry* pEntry ) { pHdlEntry = pEntry; }
SvxIconChoiceCtrlTextMode GetEntryTextModeSmart( const SvxIconChoiceCtrlEntry* pEntry ) const;
void SetSelectionMode( SelectionMode eMode ) { eSelectionMode=eMode; }
SelectionMode GetSelectionMode() const { return eSelectionMode; }
- BOOL AreEntriesMoved() const { return (BOOL)((nFlags & F_MOVED_ENTRIES)!=0); }
- void SetEntriesMoved( BOOL bMoved )
+ sal_Bool AreEntriesMoved() const { return (sal_Bool)((nFlags & F_MOVED_ENTRIES)!=0); }
+ void SetEntriesMoved( sal_Bool bMoved )
{
if( bMoved ) nFlags |= F_MOVED_ENTRIES;
else nFlags &= ~(F_MOVED_ENTRIES);
}
- ULONG GetEntryListPos( SvxIconChoiceCtrlEntry* ) const;
- void SetEntryListPos( SvxIconChoiceCtrlEntry* pEntry, ULONG nNewPos );
+ sal_uLong GetEntryListPos( SvxIconChoiceCtrlEntry* ) const;
+ void SetEntryListPos( SvxIconChoiceCtrlEntry* pEntry, sal_uLong nNewPos );
void SetEntryImageSize( const Size& rSize ) { aImageSize = rSize; }
- void SetEntryFlags( SvxIconChoiceCtrlEntry* pEntry, USHORT nFlags );
- SvxIconChoiceCtrlEntry* GoLeftRight( SvxIconChoiceCtrlEntry*, BOOL bRight );
- SvxIconChoiceCtrlEntry* GoUpDown( SvxIconChoiceCtrlEntry*, BOOL bDown );
+ void SetEntryFlags( SvxIconChoiceCtrlEntry* pEntry, sal_uInt16 nFlags );
+ SvxIconChoiceCtrlEntry* GoLeftRight( SvxIconChoiceCtrlEntry*, sal_Bool bRight );
+ SvxIconChoiceCtrlEntry* GoUpDown( SvxIconChoiceCtrlEntry*, sal_Bool bDown );
void InitSettings();
Rectangle GetOutputRect() const;
- BOOL ArePredecessorsSet() const { return (BOOL)(pHead != 0); }
+ sal_Bool ArePredecessorsSet() const { return (sal_Bool)(pHead != 0); }
SvxIconChoiceCtrlEntry* GetPredecessorHead() const { return pHead; }
void SetEntryPredecessor(SvxIconChoiceCtrlEntry* pEntry,SvxIconChoiceCtrlEntry* pPredecessor);
- BOOL GetEntryPredecessor(SvxIconChoiceCtrlEntry* pEntry,SvxIconChoiceCtrlEntry** ppPredecessor);
+ sal_Bool GetEntryPredecessor(SvxIconChoiceCtrlEntry* pEntry,SvxIconChoiceCtrlEntry** ppPredecessor);
// liefert gueltige Ergebnisse nur im AutoArrange-Modus!
SvxIconChoiceCtrlEntry* FindEntryPredecessor( SvxIconChoiceCtrlEntry* pEntry, const Point& );
@@ -519,24 +519,24 @@ public:
SvxIconChoiceCtrlPositionMode GetPositionMode() const { return ePositionMode;}
void Flush();
- void SetColumn( USHORT nIndex, const SvxIconChoiceCtrlColumnInfo& );
- const SvxIconChoiceCtrlColumnInfo* GetColumn( USHORT nIndex ) const;
- const SvxIconChoiceCtrlColumnInfo* GetItemColumn( USHORT nSubItem, long& rLeft ) const;
+ void SetColumn( sal_uInt16 nIndex, const SvxIconChoiceCtrlColumnInfo& );
+ const SvxIconChoiceCtrlColumnInfo* GetColumn( sal_uInt16 nIndex ) const;
+ const SvxIconChoiceCtrlColumnInfo* GetItemColumn( sal_uInt16 nSubItem, long& rLeft ) const;
Rectangle GetDocumentRect() const { return Rectangle( Point(), aVirtOutputSize ); }
Rectangle GetVisibleRect() const { return GetOutputRect(); }
- void SetEntryHighlightFrame( SvxIconChoiceCtrlEntry* pEntry,BOOL bKeepHighlightFlags=FALSE );
+ void SetEntryHighlightFrame( SvxIconChoiceCtrlEntry* pEntry,sal_Bool bKeepHighlightFlags=sal_False );
void HideEntryHighlightFrame();
void DrawHighlightFrame( OutputDevice* pOut,
- const Rectangle& rBmpRect, BOOL bHide );
+ const Rectangle& rBmpRect, sal_Bool bHide );
void StopSelectTimer() { aCallSelectHdlTimer.Stop(); }
void Tracking( const TrackingEvent& rTEvt );
Point GetPopupMenuPosPixel() const;
- BOOL HandleShortCutKey( const KeyEvent& rKeyEvent );
+ sal_Bool HandleShortCutKey( const KeyEvent& rKeyEvent );
- void CallEventListeners( ULONG nEvent, void* pData = NULL );
+ void CallEventListeners( sal_uLong nEvent, void* pData = NULL );
inline ::svt::IAccessibleFactory&
GetAccessibleFactory() { return aAccFactory.getFactory(); }
@@ -558,12 +558,12 @@ class IcnCursor_Impl
void ImplCreate();
void Create() { if( !pColumns ) ImplCreate(); }
- USHORT GetSortListPos( SvPtrarr* pList, long nValue, int bVertical);
- SvxIconChoiceCtrlEntry* SearchCol(USHORT nCol,USHORT nTop,USHORT nBottom,USHORT nPref,
- BOOL bDown, BOOL bSimple );
+ sal_uInt16 GetSortListPos( SvPtrarr* pList, long nValue, int bVertical);
+ SvxIconChoiceCtrlEntry* SearchCol(sal_uInt16 nCol,sal_uInt16 nTop,sal_uInt16 nBottom,sal_uInt16 nPref,
+ sal_Bool bDown, sal_Bool bSimple );
- SvxIconChoiceCtrlEntry* SearchRow(USHORT nRow,USHORT nRight,USHORT nLeft,USHORT nPref,
- BOOL bRight, BOOL bSimple );
+ SvxIconChoiceCtrlEntry* SearchRow(sal_uInt16 nRow,sal_uInt16 nRight,sal_uInt16 nLeft,sal_uInt16 nPref,
+ sal_Bool bRight, sal_Bool bSimple );
public:
IcnCursor_Impl( SvxIconChoiceCtrl_Impl* pOwner );
@@ -571,9 +571,9 @@ public:
void Clear();
// fuer Cursortravelling usw.
- SvxIconChoiceCtrlEntry* GoLeftRight( SvxIconChoiceCtrlEntry*, BOOL bRight );
- SvxIconChoiceCtrlEntry* GoUpDown( SvxIconChoiceCtrlEntry*, BOOL bDown );
- SvxIconChoiceCtrlEntry* GoPageUpDown( SvxIconChoiceCtrlEntry*, BOOL bDown );
+ SvxIconChoiceCtrlEntry* GoLeftRight( SvxIconChoiceCtrlEntry*, sal_Bool bRight );
+ SvxIconChoiceCtrlEntry* GoUpDown( SvxIconChoiceCtrlEntry*, sal_Bool bDown );
+ SvxIconChoiceCtrlEntry* GoPageUpDown( SvxIconChoiceCtrlEntry*, sal_Bool bDown );
// Erzeugt fuer jede Zeile (Hoehe=nGridDY) eine nach BoundRect.Left()
// sortierte Liste der Eintraege, die in ihr stehen. Eine Liste kann
@@ -585,7 +585,7 @@ public:
// ----------------------------------------------------------------------------------------------
-typedef ULONG GridId;
+typedef sal_uLong GridId;
#define GRID_NOT_FOUND ((GridId)ULONG_MAX)
@@ -593,14 +593,14 @@ class IcnGridMap_Impl
{
Rectangle _aLastOccupiedGrid;
SvxIconChoiceCtrl_Impl* _pView;
- BOOL* _pGridMap;
- USHORT _nGridCols, _nGridRows;
+ sal_Bool* _pGridMap;
+ sal_uInt16 _nGridCols, _nGridRows;
void Expand();
void Create_Impl();
void Create() { if(!_pGridMap) Create_Impl(); }
- void GetMinMapSize( USHORT& rDX, USHORT& rDY ) const;
+ void GetMinMapSize( sal_uInt16& rDX, sal_uInt16& rDY ) const;
public:
IcnGridMap_Impl(SvxIconChoiceCtrl_Impl* pView);
@@ -608,22 +608,22 @@ public:
void Clear();
- GridId GetGrid( const Point& rDocPos, BOOL* pbClipped = 0 );
- GridId GetGrid( USHORT nGridX, USHORT nGridY );
- GridId GetUnoccupiedGrid( BOOL bOccupyFound=TRUE );
+ GridId GetGrid( const Point& rDocPos, sal_Bool* pbClipped = 0 );
+ GridId GetGrid( sal_uInt16 nGridX, sal_uInt16 nGridY );
+ GridId GetUnoccupiedGrid( sal_Bool bOccupyFound=sal_True );
- void OccupyGrids( const Rectangle&, BOOL bOccupy = TRUE );
- void OccupyGrids( const SvxIconChoiceCtrlEntry*, BOOL bOccupy = TRUE );
- void OccupyGrid( GridId nId, BOOL bOccupy = TRUE )
+ void OccupyGrids( const Rectangle&, sal_Bool bOccupy = sal_True );
+ void OccupyGrids( const SvxIconChoiceCtrlEntry*, sal_Bool bOccupy = sal_True );
+ void OccupyGrid( GridId nId, sal_Bool bOccupy = sal_True )
{
- DBG_ASSERT(!_pGridMap || nId<(ULONG)(_nGridCols*_nGridRows),"OccupyGrid: Bad GridId");
- if(_pGridMap && nId < (ULONG)(_nGridCols *_nGridRows) )
+ DBG_ASSERT(!_pGridMap || nId<(sal_uLong)(_nGridCols*_nGridRows),"OccupyGrid: Bad GridId");
+ if(_pGridMap && nId < (sal_uLong)(_nGridCols *_nGridRows) )
_pGridMap[ nId ] = bOccupy;
}
Rectangle GetGridRect( GridId );
- void GetGridCoord( GridId, USHORT& rGridX, USHORT& rGridY );
- static ULONG GetGridCount( const Size& rSizePixel, USHORT nGridWidth, USHORT nGridHeight );
+ void GetGridCoord( GridId, sal_uInt16& rGridX, sal_uInt16& rGridY );
+ static sal_uLong GetGridCount( const Size& rSizePixel, sal_uInt16 nGridWidth, sal_uInt16 nGridHeight );
void OutputSizeChanged();
};
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index ff7c42e9309a..3963ce48c255 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -68,7 +68,7 @@ struct SvxIconChoiceCtrlEntry_Impl
: _pEntry( pEntry), _aPos( rBoundRect.TopLeft()) {}
};
-static BOOL bEndScrollInvalidate = TRUE;
+static sal_Bool bEndScrollInvalidate = sal_True;
// ----------------------------------------------------------------------------------------------
@@ -78,9 +78,9 @@ class IcnViewEdit_Impl : public MultiLineEdit
Accelerator aAccReturn;
Accelerator aAccEscape;
Timer aTimer;
- BOOL bCanceled;
- BOOL bAlreadyInCallback;
- BOOL bGrabFocus;
+ sal_Bool bCanceled;
+ sal_Bool bAlreadyInCallback;
+ sal_Bool bGrabFocus;
void CallCallBackHdl_Impl();
DECL_LINK( Timeout_Impl, Timer * );
@@ -99,9 +99,9 @@ public:
~IcnViewEdit_Impl();
virtual void KeyInput( const KeyEvent& rKEvt );
virtual long PreNotify( NotifyEvent& rNEvt );
- BOOL EditingCanceled() const { return bCanceled; }
- void StopEditing( BOOL bCancel = FALSE );
- BOOL IsGrabFocus() const { return bGrabFocus; }
+ sal_Bool EditingCanceled() const { return bCanceled; }
+ void StopEditing( sal_Bool bCancel = sal_False );
+ sal_Bool IsGrabFocus() const { return bGrabFocus; }
};
// ----------------------------------------------------------------------------------------------
@@ -117,7 +117,7 @@ SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl( SvtIconChoiceCtrl* pCurView,
aImageSize( 32, 32 ),
pColumns( 0 )
{
- bChooseWithCursor=FALSE;
+ bChooseWithCursor=sal_False;
pEntryPaintDev = 0;
pCurEditedEntry = 0;
pCurHighlightFrame = 0;
@@ -128,10 +128,10 @@ SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl( SvtIconChoiceCtrl* pCurView,
pHdlEntry = 0;
pHead = NULL;
pCursor = NULL;
- bUpdateMode = TRUE;
- bEntryEditingEnabled = FALSE;
- bInDragDrop = FALSE;
- bHighlightFramePressed = FALSE;
+ bUpdateMode = sal_True;
+ bEntryEditingEnabled = sal_False;
+ bInDragDrop = sal_False;
+ bHighlightFramePressed = sal_False;
eSelectionMode = MULTIPLE_SELECTION;
pView = pCurView;
pZOrderList = new List; //SvPtrarr;
@@ -171,7 +171,7 @@ SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl( SvtIconChoiceCtrl* pCurView,
aVisRectChangedTimer.SetTimeout( 50 );
aVisRectChangedTimer.SetTimeoutHdl(LINK(this,SvxIconChoiceCtrl_Impl,VisRectChangedHdl));
- Clear( TRUE );
+ Clear( sal_True );
SetGrid( Size(100, 70) );
}
@@ -195,17 +195,17 @@ SvxIconChoiceCtrl_Impl::~SvxIconChoiceCtrl_Impl()
ClearColumnList();
}
-void SvxIconChoiceCtrl_Impl::Clear( BOOL bInCtor )
+void SvxIconChoiceCtrl_Impl::Clear( sal_Bool bInCtor )
{
- StopEntryEditing( TRUE );
+ StopEntryEditing( sal_True );
nSelectionCount = 0;
DELETEZ(pDraggedSelection);
- bInDragDrop = FALSE;
+ bInDragDrop = sal_False;
pCurHighlightFrame = 0;
StopEditTimer();
CancelUserEvents();
- ShowCursor( FALSE );
- bBoundRectsDirty = FALSE;
+ ShowCursor( sal_False );
+ bBoundRectsDirty = sal_False;
nMaxBoundHeight = 0;
nFlags &= ~(F_PAINTED | F_MOVED_ENTRIES);
@@ -229,8 +229,8 @@ void SvxIconChoiceCtrl_Impl::Clear( BOOL bInCtor )
pView->Invalidate(INVALIDATE_NOCHILDREN);
}
AdjustScrollBars();
- ULONG nCount = aEntries.Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ sal_uLong nCount = aEntries.Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pCur = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur );
delete pCur;
@@ -259,19 +259,19 @@ void SvxIconChoiceCtrl_Impl::SetStyle( WinBits nWinStyle )
IMPL_LINK( SvxIconChoiceCtrl_Impl, ScrollUpDownHdl, ScrollBar*, pScrollBar )
{
- StopEntryEditing( TRUE );
+ StopEntryEditing( sal_True );
// Pfeil hoch: delta=-1; Pfeil runter: delta=+1
- Scroll( 0, pScrollBar->GetDelta(), TRUE );
- bEndScrollInvalidate = TRUE;
+ Scroll( 0, pScrollBar->GetDelta(), sal_True );
+ bEndScrollInvalidate = sal_True;
return 0;
}
IMPL_LINK( SvxIconChoiceCtrl_Impl, ScrollLeftRightHdl, ScrollBar*, pScrollBar )
{
- StopEntryEditing( TRUE );
+ StopEntryEditing( sal_True );
// Pfeil links: delta=-1; Pfeil rechts: delta=+1
- Scroll( pScrollBar->GetDelta(), 0, TRUE );
- bEndScrollInvalidate = TRUE;
+ Scroll( pScrollBar->GetDelta(), 0, sal_True );
+ bEndScrollInvalidate = sal_True;
return 0;
}
@@ -293,11 +293,11 @@ void SvxIconChoiceCtrl_Impl::FontModified()
DELETEZ(pDDTempDev);
DELETEZ(pEntryPaintDev);
SetDefaultTextSize();
- ShowCursor( FALSE );
- ShowCursor( TRUE );
+ ShowCursor( sal_False );
+ ShowCursor( sal_True );
}
-void SvxIconChoiceCtrl_Impl::InsertEntry( SvxIconChoiceCtrlEntry* pEntry, ULONG nPos,
+void SvxIconChoiceCtrl_Impl::InsertEntry( SvxIconChoiceCtrlEntry* pEntry, sal_uLong nPos,
const Point* pPos )
{
StopEditTimer();
@@ -314,13 +314,13 @@ void SvxIconChoiceCtrl_Impl::InsertEntry( SvxIconChoiceCtrlEntry* pEntry, ULONG
{
Size aSize( CalcBoundingSize( pEntry ) );
SetBoundingRect_Impl( pEntry, *pPos, aSize );
- SetEntryPos( pEntry, *pPos, FALSE, TRUE, TRUE /*keep grid map*/ );
+ SetEntryPos( pEntry, *pPos, sal_False, sal_True, sal_True /*keep grid map*/ );
pEntry->nFlags |= ICNVIEW_FLAG_POS_MOVED;
- SetEntriesMoved( TRUE );
+ SetEntriesMoved( sal_True );
}
else
{
- // wenn der UpdateMode TRUE ist, wollen wir nicht pauschal alle
+ // wenn der UpdateMode sal_True ist, wollen wir nicht pauschal alle
// BoundRects auf 'zu ueberpruefen' setzen, sondern nur das des
// neuen Eintrags. Deshalb kein InvalidateBoundingRect aufrufen!
pEntry->aRect.Right() = LONG_MAX;
@@ -347,8 +347,8 @@ void SvxIconChoiceCtrl_Impl::CreateAutoMnemonics( MnemonicGenerator* _pGenerator
pAutoDeleteOwnGenerator.reset( _pGenerator );
}
- ULONG nEntryCount = GetEntryCount();
- ULONG i;
+ sal_uLong nEntryCount = GetEntryCount();
+ sal_uLong i;
// insert texts in generator
for( i = 0; i < nEntryCount; ++i )
@@ -381,8 +381,8 @@ void SvxIconChoiceCtrl_Impl::SetListPositions()
if( nFlags & F_ENTRYLISTPOS_VALID )
return;
- ULONG nCount = aEntries.Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ sal_uLong nCount = aEntries.Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur );
pEntry->nPos = nCur;
@@ -392,14 +392,14 @@ void SvxIconChoiceCtrl_Impl::SetListPositions()
void SvxIconChoiceCtrl_Impl::RemoveEntry( SvxIconChoiceCtrlEntry* pEntry )
{
- BOOL bSyncSingleSelection;
+ sal_Bool bSyncSingleSelection;
// bei Single-Selection wird die Selektion beim Umsetzen des Cursors
// mitgefuehrt. Das soll aber nur erfolgen, wenn ueberhaupt ein
// Eintrag selektiert ist.
if( GetSelectionCount() )
- bSyncSingleSelection = TRUE;
+ bSyncSingleSelection = sal_True;
else
- bSyncSingleSelection = FALSE;
+ bSyncSingleSelection = sal_False;
if( pEntry == pCurHighlightFrame )
pCurHighlightFrame = 0;
@@ -407,7 +407,7 @@ void SvxIconChoiceCtrl_Impl::RemoveEntry( SvxIconChoiceCtrlEntry* pEntry )
if( bInDragDrop )
{
DELETEZ(pDraggedSelection);
- bInDragDrop = FALSE;
+ bInDragDrop = sal_False;
}
if( pEntry->IsSelected() )
@@ -424,25 +424,25 @@ void SvxIconChoiceCtrl_Impl::RemoveEntry( SvxIconChoiceCtrlEntry* pEntry )
pAnchor = 0;
if( pEntry->IsSelected() )
nSelectionCount--;
- BOOL bEntryBoundValid = IsBoundingRectValid( pEntry->aRect );
+ sal_Bool bEntryBoundValid = IsBoundingRectValid( pEntry->aRect );
if( bEntryBoundValid )
pView->Invalidate( pEntry->aRect );
- BOOL bSetNewCursor = FALSE;
+ sal_Bool bSetNewCursor = sal_False;
SvxIconChoiceCtrlEntry* pNewCursor = NULL;
if( pEntry == pCursor )
{
- bSetNewCursor = TRUE;
+ bSetNewCursor = sal_True;
pNewCursor = FindNewCursor();
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
pCursor = 0;
}
- BOOL bCurEntryPosValid = (nFlags & F_ENTRYLISTPOS_VALID) ? TRUE : FALSE;
+ sal_Bool bCurEntryPosValid = (nFlags & F_ENTRYLISTPOS_VALID) ? sal_True : sal_False;
if( bCurEntryPosValid && aEntries.GetObject(aEntries.Count()-1) != pEntry )
nFlags &= ~F_ENTRYLISTPOS_VALID;
- ULONG nPos = pZOrderList->GetPos( (void*)pEntry );
+ sal_uLong nPos = pZOrderList->GetPos( (void*)pEntry );
pZOrderList->Remove( nPos );
if( bCurEntryPosValid )
{
@@ -460,12 +460,12 @@ void SvxIconChoiceCtrl_Impl::RemoveEntry( SvxIconChoiceCtrlEntry* pEntry )
{
// Fokusrechteck asynchron einblenden, um das Loeschen einer
// Multiselektion zu beschleunigen.
- SetCursor( pNewCursor, bSyncSingleSelection, TRUE );
+ SetCursor( pNewCursor, bSyncSingleSelection, sal_True );
}
}
-void SvxIconChoiceCtrl_Impl::SelectEntry( SvxIconChoiceCtrlEntry* pEntry, BOOL bSelect,
- BOOL bCallHdl, BOOL bAdd, BOOL bSyncPaint )
+void SvxIconChoiceCtrl_Impl::SelectEntry( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bSelect,
+ sal_Bool bCallHdl, sal_Bool bAdd, sal_Bool bSyncPaint )
{
if( eSelectionMode == NO_SELECTION )
return;
@@ -482,7 +482,7 @@ void SvxIconChoiceCtrl_Impl::SelectEntry( SvxIconChoiceCtrlEntry* pEntry, BOOL b
if( pEntry->IsSelected() != bSelect )
{
pHdlEntry = pEntry;
- USHORT nEntryFlags = pEntry->GetFlags();
+ sal_uInt16 nEntryFlags = pEntry->GetFlags();
if( bSelect )
{
nEntryFlags |= ICNVIEW_FLAG_SELECTED;
@@ -503,8 +503,8 @@ void SvxIconChoiceCtrl_Impl::SelectEntry( SvxIconChoiceCtrlEntry* pEntry, BOOL b
}
}
-void SvxIconChoiceCtrl_Impl::EntrySelected( SvxIconChoiceCtrlEntry* pEntry, BOOL bSelect,
- BOOL bSyncPaint )
+void SvxIconChoiceCtrl_Impl::EntrySelected( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bSelect,
+ sal_Bool bSyncPaint )
{
// bei SingleSelection dafuer sorgen, dass der Cursor immer
// auf dem (einzigen) selektierten Eintrag steht. Aber nur,
@@ -524,7 +524,7 @@ void SvxIconChoiceCtrl_Impl::EntrySelected( SvxIconChoiceCtrlEntry* pEntry, BOOL
if( bUpdateMode )
{
if( pEntry == pCursor )
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
if( pView->IsTracking() && (bSelect || !pView->HasBackground()) ) // beim Tracken immer synchron
PaintEntry( pEntry );
else if( bSyncPaint ) // synchron & mit virtuellem OutDev!
@@ -534,7 +534,7 @@ void SvxIconChoiceCtrl_Impl::EntrySelected( SvxIconChoiceCtrlEntry* pEntry, BOOL
pView->Invalidate( CalcFocusRect( pEntry ) );
}
if( pEntry == pCursor )
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
} // if( bUpdateMode )
// --> OD 2009-05-27 #i101012#
@@ -551,9 +551,9 @@ void SvxIconChoiceCtrl_Impl::ResetVirtSize()
StopEditTimer();
aVirtOutputSize.Width() = 0;
aVirtOutputSize.Height() = 0;
- BOOL bLockedEntryFound = FALSE;
- const ULONG nCount = aEntries.Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ sal_Bool bLockedEntryFound = sal_False;
+ const sal_uLong nCount = aEntries.Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pCur = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur );
pCur->ClearFlags( ICNVIEW_FLAG_POS_MOVED );
@@ -564,7 +564,7 @@ void SvxIconChoiceCtrl_Impl::ResetVirtSize()
FindBoundingRect( pCur );
else
AdjustVirtSize( pCur->aRect );
- bLockedEntryFound = TRUE;
+ bLockedEntryFound = sal_True;
}
else
InvalidateBoundingRect( pCur->aRect );
@@ -576,8 +576,8 @@ void SvxIconChoiceCtrl_Impl::ResetVirtSize()
if( aVirtOutputSize.Width() < aRealOutputSize.Width() ||
aVirtOutputSize.Height() < aRealOutputSize.Height() )
{
- ULONG nGridCount = IcnGridMap_Impl::GetGridCount(
- aRealOutputSize, (USHORT)nGridDX, (USHORT)nGridDY );
+ sal_uLong nGridCount = IcnGridMap_Impl::GetGridCount(
+ aRealOutputSize, (sal_uInt16)nGridDX, (sal_uInt16)nGridDY );
if( nGridCount < nCount )
{
if( nWinBits & WB_ALIGN_TOP )
@@ -625,11 +625,11 @@ void SvxIconChoiceCtrl_Impl::AdjustVirtSize( const Rectangle& rRect )
void SvxIconChoiceCtrl_Impl::InitPredecessors()
{
DBG_ASSERT(!pHead,"SvxIconChoiceCtrl_Impl::InitPredecessors() >> Already initialized");
- ULONG nCount = aEntries.Count();
+ sal_uLong nCount = aEntries.Count();
if( nCount )
{
SvxIconChoiceCtrlEntry* pPrev = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( 0 );
- for( ULONG nCur = 1; nCur <= nCount; nCur++ )
+ for( sal_uLong nCur = 1; nCur <= nCount; nCur++ )
{
pPrev->ClearFlags( ICNVIEW_FLAG_POS_LOCKED | ICNVIEW_FLAG_POS_MOVED |
ICNVIEW_FLAG_PRED_SET);
@@ -654,8 +654,8 @@ void SvxIconChoiceCtrl_Impl::ClearPredecessors()
{
if( pHead )
{
- ULONG nCount = aEntries.Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ sal_uLong nCount = aEntries.Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pCur = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur );
pCur->pflink = 0;
@@ -666,7 +666,7 @@ void SvxIconChoiceCtrl_Impl::ClearPredecessors()
}
}
-void SvxIconChoiceCtrl_Impl::Arrange( BOOL bKeepPredecessors, long nSetMaxVirtWidth, long nSetMaxVirtHeight )
+void SvxIconChoiceCtrl_Impl::Arrange( sal_Bool bKeepPredecessors, long nSetMaxVirtWidth, long nSetMaxVirtHeight )
{
if ( nSetMaxVirtWidth != 0 )
nMaxVirtWidth = nSetMaxVirtWidth;
@@ -681,23 +681,23 @@ void SvxIconChoiceCtrl_Impl::Arrange( BOOL bKeepPredecessors, long nSetMaxVirtWi
ImpArrange( bKeepPredecessors );
}
-void SvxIconChoiceCtrl_Impl::ImpArrange( BOOL bKeepPredecessors )
+void SvxIconChoiceCtrl_Impl::ImpArrange( sal_Bool bKeepPredecessors )
{
static Point aEmptyPoint;
- BOOL bOldUpdate = bUpdateMode;
+ sal_Bool bOldUpdate = bUpdateMode;
Rectangle aCurOutputArea( GetOutputRect() );
if( (nWinBits & WB_SMART_ARRANGE) && aCurOutputArea.TopLeft() != aEmptyPoint )
- bUpdateMode = FALSE;
+ bUpdateMode = sal_False;
aAutoArrangeTimer.Stop();
nFlags &= ~F_MOVED_ENTRIES;
nFlags |= F_ARRANGING;
StopEditTimer();
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
ResetVirtSize();
if( !bKeepPredecessors )
ClearPredecessors();
- bBoundRectsDirty = FALSE;
+ bBoundRectsDirty = sal_False;
SetOrigin( Point() );
VisRectChanged();
RecalcAllBoundingRectsSmart();
@@ -710,12 +710,12 @@ void SvxIconChoiceCtrl_Impl::ImpArrange( BOOL bKeepPredecessors )
MakeVisible( aCurOutputArea );
SetUpdateMode( bOldUpdate );
}
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
void SvxIconChoiceCtrl_Impl::Paint( const Rectangle& rRect )
{
- bEndScrollInvalidate = FALSE;
+ bEndScrollInvalidate = sal_False;
#if defined(OV_DRAWGRID)
Color aOldColor ( pView->GetLineColor() );
@@ -764,14 +764,14 @@ void SvxIconChoiceCtrl_Impl::Paint( const Rectangle& rRect )
if( !pCursor )
{
// set cursor to item with focus-flag
- BOOL bfound = FALSE;
- for ( ULONG i = 0; i < pView->GetEntryCount() && !bfound; i++)
+ sal_Bool bfound = sal_False;
+ for ( sal_uLong i = 0; i < pView->GetEntryCount() && !bfound; i++)
{
SvxIconChoiceCtrlEntry* pEntry = pView->GetEntry ( i );
if( pEntry->IsFocused() )
{
pCursor = pEntry;
- bfound=TRUE;
+ bfound=sal_True;
}
}
@@ -783,31 +783,31 @@ void SvxIconChoiceCtrl_Impl::Paint( const Rectangle& rRect )
if ( pView->HasFocus() )
GetFocus();
- ULONG nCount = pZOrderList->Count();
+ sal_uLong nCount = pZOrderList->Count();
if( !nCount )
return;
- BOOL bResetClipRegion = FALSE;
+ sal_Bool bResetClipRegion = sal_False;
if( !pView->IsClipRegion() )
{
Rectangle aOutputArea( GetOutputRect() );
- bResetClipRegion = TRUE;
+ bResetClipRegion = sal_True;
pView->SetClipRegion( aOutputArea );
}
- const USHORT nListInitSize = aEntries.Count() > USHRT_MAX ?
- USHRT_MAX : (USHORT)aEntries.Count();
+ const sal_uInt16 nListInitSize = aEntries.Count() > USHRT_MAX ?
+ USHRT_MAX : (sal_uInt16)aEntries.Count();
List* pNewZOrderList = new List( nListInitSize );
List* pPaintedEntries = new List( nListInitSize );
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
while( nCount )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)(pZOrderList->GetObject(nPos ));
const Rectangle& rBoundRect = GetEntryBoundRect( pEntry );
if( rRect.IsOver( rBoundRect ) )
{
- PaintEntry( pEntry, rBoundRect.TopLeft(), pView, TRUE );
+ PaintEntry( pEntry, rBoundRect.TopLeft(), pView, sal_True );
// Eintraege, die neu gezeichnet werden, auf Top setzen
pPaintedEntries->Insert( pEntry, LIST_APPEND );
}
@@ -822,7 +822,7 @@ void SvxIconChoiceCtrl_Impl::Paint( const Rectangle& rRect )
nCount = pPaintedEntries->Count();
if( nCount )
{
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
pZOrderList->Insert( pPaintedEntries->GetObject(nCur), LIST_APPEND);
}
delete pPaintedEntries;
@@ -831,20 +831,20 @@ void SvxIconChoiceCtrl_Impl::Paint( const Rectangle& rRect )
pView->SetClipRegion();
}
-void SvxIconChoiceCtrl_Impl::RepaintEntries( USHORT nEntryFlagsMask )
+void SvxIconChoiceCtrl_Impl::RepaintEntries( sal_uInt16 nEntryFlagsMask )
{
- const ULONG nCount = pZOrderList->Count();
+ const sal_uLong nCount = pZOrderList->Count();
if( !nCount )
return;
- BOOL bResetClipRegion = FALSE;
+ sal_Bool bResetClipRegion = sal_False;
Rectangle aOutRect( GetOutputRect() );
if( !pView->IsClipRegion() )
{
- bResetClipRegion = TRUE;
+ bResetClipRegion = sal_True;
pView->SetClipRegion( aOutRect );
}
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)(pZOrderList->GetObject(nCur));
if( pEntry->GetFlags() & nEntryFlagsMask )
@@ -880,28 +880,28 @@ IcnViewFieldType SvxIconChoiceCtrl_Impl::GetItem( SvxIconChoiceCtrlEntry* pEntry
return IcnViewFieldTypeDontknow;
}
-BOOL SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
+sal_Bool SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
{
- BOOL bHandled = TRUE;
- bHighlightFramePressed = FALSE;
+ sal_Bool bHandled = sal_True;
+ bHighlightFramePressed = sal_False;
StopEditTimer();
- BOOL bGotFocus = (BOOL)(!pView->HasFocus() && !(nWinBits & WB_NOPOINTERFOCUS));
+ sal_Bool bGotFocus = (sal_Bool)(!pView->HasFocus() && !(nWinBits & WB_NOPOINTERFOCUS));
if( !(nWinBits & WB_NOPOINTERFOCUS) )
pView->GrabFocus();
Point aDocPos( rMEvt.GetPosPixel() );
if(aDocPos.X()>=aOutputSize.Width() || aDocPos.Y()>=aOutputSize.Height())
- return FALSE;
+ return sal_False;
ToDocPos( aDocPos );
- SvxIconChoiceCtrlEntry* pEntry = GetEntry( aDocPos, TRUE );
+ SvxIconChoiceCtrlEntry* pEntry = GetEntry( aDocPos, sal_True );
if( pEntry )
- MakeEntryVisible( pEntry, FALSE );
+ MakeEntryVisible( pEntry, sal_False );
if( rMEvt.IsShift() && eSelectionMode != SINGLE_SELECTION )
{
if( pEntry )
- SetCursor_Impl( pCursor, pEntry, rMEvt.IsMod1(), rMEvt.IsShift(), TRUE);
- return TRUE;
+ SetCursor_Impl( pCursor, pEntry, rMEvt.IsMod1(), rMEvt.IsShift(), sal_True);
+ return sal_True;
}
if( pAnchor && (rMEvt.IsShift() || rMEvt.IsMod1())) // Tastaturselektion?
@@ -932,7 +932,7 @@ BOOL SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
if( !pEntry && !(nWinBits & WB_NODRAGSELECTION))
pView->StartTracking( STARTTRACK_SCROLLREPEAT );
- return TRUE;
+ return sal_True;
}
else
{
@@ -954,17 +954,17 @@ BOOL SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
pView->StartTracking( STARTTRACK_SCROLLREPEAT );
}
else
- bHandled = FALSE;
+ bHandled = sal_False;
return bHandled;
}
}
- BOOL bSelected = pEntry->IsSelected();
- BOOL bEditingEnabled = IsEntryEditingEnabled();
+ sal_Bool bSelected = pEntry->IsSelected();
+ sal_Bool bEditingEnabled = IsEntryEditingEnabled();
if( rMEvt.GetClicks() == 2 )
{
DeselectAllBut( pEntry );
- SelectEntry( pEntry, TRUE, TRUE, FALSE, TRUE );
+ SelectEntry( pEntry, sal_True, sal_True, sal_False, sal_True );
pHdlEntry = pEntry;
pView->ClickIcon();
}
@@ -995,8 +995,8 @@ BOOL SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
if( rMEvt.IsLeft() && (nWinBits & WB_HIGHLIGHTFRAME) )
{
pCurHighlightFrame = 0; // Neues painten des Frames erzwingen
- bHighlightFramePressed = TRUE;
- SetEntryHighlightFrame( pEntry, TRUE );
+ bHighlightFramePressed = sal_True;
+ SetEntryHighlightFrame( pEntry, sal_True );
}
}
else
@@ -1005,9 +1005,9 @@ BOOL SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
{
if( !bSelected )
{
- DeselectAllBut( pEntry, TRUE /* Synchron painten */ );
+ DeselectAllBut( pEntry, sal_True /* Synchron painten */ );
SetCursor( pEntry );
- SelectEntry( pEntry, TRUE, TRUE, FALSE, TRUE );
+ SelectEntry( pEntry, sal_True, sal_True, sal_False, sal_True );
}
else
{
@@ -1027,13 +1027,13 @@ BOOL SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
return bHandled;
}
-BOOL SvxIconChoiceCtrl_Impl::MouseButtonUp( const MouseEvent& rMEvt )
+sal_Bool SvxIconChoiceCtrl_Impl::MouseButtonUp( const MouseEvent& rMEvt )
{
- BOOL bHandled = FALSE;
+ sal_Bool bHandled = sal_False;
if( rMEvt.IsRight() && (nFlags & (F_DOWN_CTRL | F_DOWN_DESELECT) ))
{
nFlags &= ~(F_DOWN_CTRL | F_DOWN_DESELECT);
- bHandled = TRUE;
+ bHandled = sal_True;
}
Point aDocPos( rMEvt.GetPosPixel() );
@@ -1046,32 +1046,32 @@ BOOL SvxIconChoiceCtrl_Impl::MouseButtonUp( const MouseEvent& rMEvt )
// Ctrl & MultiSelection
ToggleSelection( pDocEntry );
SetCursor( pDocEntry );
- bHandled = TRUE;
+ bHandled = sal_True;
}
else if( nFlags & F_DOWN_DESELECT )
{
DeselectAllBut( pDocEntry );
SetCursor( pDocEntry );
- SelectEntry( pDocEntry, TRUE, TRUE, FALSE, TRUE );
- bHandled = TRUE;
+ SelectEntry( pDocEntry, sal_True, sal_True, sal_False, sal_True );
+ bHandled = sal_True;
}
}
nFlags &= ~(F_DOWN_CTRL | F_DOWN_DESELECT);
if( nFlags & F_START_EDITTIMER_IN_MOUSEUP )
{
- bHandled = TRUE;
+ bHandled = sal_True;
StartEditTimer();
nFlags &= ~F_START_EDITTIMER_IN_MOUSEUP;
}
if((nWinBits & WB_HIGHLIGHTFRAME) && bHighlightFramePressed && pCurHighlightFrame)
{
- bHandled = TRUE;
+ bHandled = sal_True;
SvxIconChoiceCtrlEntry* pEntry = pCurHighlightFrame;
pCurHighlightFrame = 0; // Neues painten des Frames erzwingen
- bHighlightFramePressed = FALSE;
- SetEntryHighlightFrame( pEntry, TRUE );
+ bHighlightFramePressed = sal_False;
+ SetEntryHighlightFrame( pEntry, sal_True );
#if 0
CallSelectHandler( pCurHighlightFrame );
#else
@@ -1080,27 +1080,27 @@ BOOL SvxIconChoiceCtrl_Impl::MouseButtonUp( const MouseEvent& rMEvt )
// set focus on Icon
SvxIconChoiceCtrlEntry* pOldCursor = pCursor;
- SetCursor_Impl( pOldCursor, pHdlEntry, FALSE, FALSE, TRUE );
+ SetCursor_Impl( pOldCursor, pHdlEntry, sal_False, sal_False, sal_True );
#endif
pHdlEntry = 0;
}
return bHandled;
}
-BOOL SvxIconChoiceCtrl_Impl::MouseMove( const MouseEvent& rMEvt )
+sal_Bool SvxIconChoiceCtrl_Impl::MouseMove( const MouseEvent& rMEvt )
{
const Point aDocPos( pView->PixelToLogic(rMEvt.GetPosPixel()) );
if( pView->IsTracking() )
- return FALSE;
+ return sal_False;
else if( nWinBits & WB_HIGHLIGHTFRAME )
{
- SvxIconChoiceCtrlEntry* pEntry = GetEntry( aDocPos, TRUE );
+ SvxIconChoiceCtrlEntry* pEntry = GetEntry( aDocPos, sal_True );
SetEntryHighlightFrame( pEntry );
}
else
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
void SvxIconChoiceCtrl_Impl::Tracking( const TrackingEvent& rTEvt )
@@ -1124,7 +1124,7 @@ void SvxIconChoiceCtrl_Impl::Tracking( const TrackingEvent& rTEvt )
long nScrollDX, nScrollDY;
- CalcScrollOffsets( aPosPixel, nScrollDX, nScrollDY, FALSE );
+ CalcScrollOffsets( aPosPixel, nScrollDX, nScrollDY, sal_False );
if( nScrollDX || nScrollDY )
{
pView->HideTracking();
@@ -1134,7 +1134,7 @@ void SvxIconChoiceCtrl_Impl::Tracking( const TrackingEvent& rTEvt )
if( aRect != aCurSelectionRect )
{
pView->HideTracking();
- BOOL bAdd = (nFlags & F_ADD_MODE) ? TRUE : FALSE;
+ sal_Bool bAdd = (nFlags & F_ADD_MODE) ? sal_True : sal_False;
SelectRect( aRect, bAdd, &aSelectedRectList );
}
pView->ShowTracking( aRect, SHOWTRACK_SMALL | SHOWTRACK_CLIP );
@@ -1142,25 +1142,25 @@ void SvxIconChoiceCtrl_Impl::Tracking( const TrackingEvent& rTEvt )
}
void SvxIconChoiceCtrl_Impl::SetCursor_Impl( SvxIconChoiceCtrlEntry* pOldCursor,
- SvxIconChoiceCtrlEntry* pNewCursor, BOOL bMod1, BOOL bShift, BOOL bPaintSync )
+ SvxIconChoiceCtrlEntry* pNewCursor, sal_Bool bMod1, sal_Bool bShift, sal_Bool bPaintSync )
{
if( pNewCursor )
{
SvxIconChoiceCtrlEntry* pFilterEntry = 0;
- BOOL bDeselectAll = FALSE;
+ sal_Bool bDeselectAll = sal_False;
if( eSelectionMode != SINGLE_SELECTION )
{
if( !bMod1 && !bShift )
- bDeselectAll = TRUE;
+ bDeselectAll = sal_True;
else if( bShift && !bMod1 && !pAnchor )
{
- bDeselectAll = TRUE;
+ bDeselectAll = sal_True;
pFilterEntry = pOldCursor;
}
}
if( bDeselectAll )
DeselectAllBut( pFilterEntry, bPaintSync );
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
MakeEntryVisible( pNewCursor );
SetCursor( pNewCursor );
if( bMod1 && !bShift )
@@ -1182,58 +1182,58 @@ void SvxIconChoiceCtrl_Impl::SetCursor_Impl( SvxIconChoiceCtrlEntry* pOldCursor,
}
else
{
- SelectEntry( pCursor, TRUE, TRUE, FALSE, bPaintSync );
+ SelectEntry( pCursor, sal_True, sal_True, sal_False, bPaintSync );
aCurSelectionRect = GetEntryBoundRect( pCursor );
}
}
}
-BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
+sal_Bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
{
StopEditTimer();
- BOOL bMod2 = rKEvt.GetKeyCode().IsMod2();
+ sal_Bool bMod2 = rKEvt.GetKeyCode().IsMod2();
sal_Unicode cChar = rKEvt.GetCharCode();
- ULONG nPos = (ULONG)-1;
+ sal_uLong nPos = (sal_uLong)-1;
if ( bMod2 && cChar && IsMnemonicChar( cChar, nPos ) )
{
// shortcut is clicked
SvxIconChoiceCtrlEntry* pNewCursor = GetEntry( nPos );
SvxIconChoiceCtrlEntry* pOldCursor = pCursor;
if ( pNewCursor != pOldCursor )
- SetCursor_Impl( pOldCursor, pNewCursor, FALSE, FALSE, FALSE );
- return TRUE;
+ SetCursor_Impl( pOldCursor, pNewCursor, sal_False, sal_False, sal_False );
+ return sal_True;
}
if ( bMod2 )
// no actions with <ALT>
- return FALSE;
+ return sal_False;
- BOOL bKeyUsed = TRUE;
- BOOL bMod1 = rKEvt.GetKeyCode().IsMod1();
- BOOL bShift = rKEvt.GetKeyCode().IsShift();
+ sal_Bool bKeyUsed = sal_True;
+ sal_Bool bMod1 = rKEvt.GetKeyCode().IsMod1();
+ sal_Bool bShift = rKEvt.GetKeyCode().IsShift();
if( eSelectionMode == SINGLE_SELECTION || eSelectionMode == NO_SELECTION)
{
- bShift = FALSE;
- bMod1 = FALSE;
+ bShift = sal_False;
+ bMod1 = sal_False;
}
if( bMod1 )
nFlags |= F_ADD_MODE;
- BOOL bDeselectAll = FALSE;
+ sal_Bool bDeselectAll = sal_False;
if( eSelectionMode != SINGLE_SELECTION )
{
if( !bMod1 && !bShift )
- bDeselectAll = TRUE;
+ bDeselectAll = sal_True;
if( bShift && !bMod1 && !pAnchor )
- bDeselectAll = TRUE;
+ bDeselectAll = sal_True;
}
SvxIconChoiceCtrlEntry* pNewCursor;
SvxIconChoiceCtrlEntry* pOldCursor = pCursor;
- USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
switch( nCode )
{
case KEY_UP:
@@ -1242,10 +1242,10 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
{
MakeEntryVisible( pCursor );
if( nCode == KEY_UP )
- pNewCursor = pImpCursor->GoUpDown(pCursor,FALSE);
+ pNewCursor = pImpCursor->GoUpDown(pCursor,sal_False);
else
- pNewCursor = pImpCursor->GoPageUpDown(pCursor,FALSE);
- SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, TRUE );
+ pNewCursor = pImpCursor->GoPageUpDown(pCursor,sal_False);
+ SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, sal_True );
if( !pNewCursor )
{
Rectangle aRect( GetEntryBoundRect( pCursor ) );
@@ -1272,10 +1272,10 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
if( pCursor )
{
if( nCode == KEY_DOWN )
- pNewCursor=pImpCursor->GoUpDown( pCursor,TRUE );
+ pNewCursor=pImpCursor->GoUpDown( pCursor,sal_True );
else
- pNewCursor=pImpCursor->GoPageUpDown( pCursor,TRUE );
- SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, TRUE );
+ pNewCursor=pImpCursor->GoPageUpDown( pCursor,sal_True );
+ SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, sal_True );
if ( bChooseWithCursor && pNewCursor != NULL)
{
@@ -1290,8 +1290,8 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
case KEY_RIGHT:
if( pCursor )
{
- pNewCursor=pImpCursor->GoLeftRight(pCursor,TRUE );
- SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, TRUE );
+ pNewCursor=pImpCursor->GoLeftRight(pCursor,sal_True );
+ SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, sal_True );
}
break;
@@ -1299,8 +1299,8 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
if( pCursor )
{
MakeEntryVisible( pCursor );
- pNewCursor = pImpCursor->GoLeftRight(pCursor,FALSE );
- SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, TRUE );
+ pNewCursor = pImpCursor->GoLeftRight(pCursor,sal_False );
+ SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, sal_True );
if( !pNewCursor )
{
Rectangle aRect( GetEntryBoundRect(pCursor));
@@ -1320,13 +1320,13 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
if( pView->IsTracking() )
{
HideSelectionRect();
- //SelectAll( FALSE );
+ //SelectAll( sal_False );
SetNoSelection();
ClearSelectedRectList();
nFlags &= ~F_TRACKING;
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
#endif
@@ -1335,7 +1335,7 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
if( !bMod1 && !bShift )
EditTimeoutHdl( 0 );
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_F8:
@@ -1347,7 +1347,7 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
nFlags |= F_ADD_MODE;
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_SPACE:
@@ -1355,12 +1355,12 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
{
if( !bMod1 )
{
- //SelectAll( FALSE );
+ //SelectAll( sal_False );
SetNoSelection();
ClearSelectedRectList();
// click Icon with spacebar
- SetEntryHighlightFrame( GetCurEntry(), TRUE );
+ SetEntryHighlightFrame( GetCurEntry(), sal_True );
pView->ClickIcon();
pHdlEntry = pCurHighlightFrame;
pCurHighlightFrame=0;
@@ -1389,9 +1389,9 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
case KEY_DIVIDE :
case KEY_A:
if( bMod1 && (eSelectionMode != SINGLE_SELECTION))
- SelectAll( TRUE );
+ SelectAll( sal_True );
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_SUBTRACT:
@@ -1399,7 +1399,7 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
if( bMod1 )
SetNoSelection();
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_RETURN:
@@ -1409,14 +1409,14 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
/*pView->*/EditEntry( pCursor );
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_END:
if( pCursor )
{
pNewCursor = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( aEntries.Count() - 1 );
- SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, TRUE );
+ SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, sal_True );
}
break;
@@ -1424,12 +1424,12 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
if( pCursor )
{
pNewCursor = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( 0 );
- SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, TRUE );
+ SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, sal_True );
}
break;
default:
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
}
return bKeyUsed;
@@ -1455,7 +1455,7 @@ void SvxIconChoiceCtrl_Impl::PositionScrollBars( long nRealWidth, long nRealHeig
aVerSBar.SetPosPixel( aPos );
}
-void SvxIconChoiceCtrl_Impl::AdjustScrollBars( BOOL )
+void SvxIconChoiceCtrl_Impl::AdjustScrollBars( sal_Bool )
{
Rectangle aOldOutRect( GetOutputRect() );
long nVirtHeight = aVirtOutputSize.Height();
@@ -1487,7 +1487,7 @@ void SvxIconChoiceCtrl_Impl::AdjustScrollBars( BOOL )
sal_Bool bNoVerSBar = ( nWinBits & WB_NOVSCROLL ) != 0;
sal_Bool bNoHorSBar = ( nWinBits & WB_NOHSCROLL ) != 0;
- USHORT nResult = 0;
+ sal_uInt16 nResult = 0;
if( nVirtHeight )
{
// activate ver scrollbar ?
@@ -1625,23 +1625,23 @@ void SvxIconChoiceCtrl_Impl::Resize()
VisRectChanged();
}
-BOOL SvxIconChoiceCtrl_Impl::CheckHorScrollBar()
+sal_Bool SvxIconChoiceCtrl_Impl::CheckHorScrollBar()
{
if( !pZOrderList || !aHorSBar.IsVisible() )
- return FALSE;
+ return sal_False;
const MapMode& rMapMode = pView->GetMapMode();
Point aOrigin( rMapMode.GetOrigin() );
if(!( nWinBits & WB_HSCROLL) && !aOrigin.X() )
{
long nWidth = aOutputSize.Width();
- const ULONG nCount = pZOrderList->Count();
+ const sal_uLong nCount = pZOrderList->Count();
long nMostRight = 0;
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)pZOrderList->GetObject(nCur);
long nRight = GetEntryBoundRect(pEntry).Right();
if( nRight > nWidth )
- return FALSE;
+ return sal_False;
if( nRight > nMostRight )
nMostRight = nRight;
}
@@ -1658,28 +1658,28 @@ BOOL SvxIconChoiceCtrl_Impl::CheckHorScrollBar()
aSize.Height() += nHorSBarHeight;
aVerSBar.SetSizePixel( aSize );
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SvxIconChoiceCtrl_Impl::CheckVerScrollBar()
+sal_Bool SvxIconChoiceCtrl_Impl::CheckVerScrollBar()
{
if( !pZOrderList || !aVerSBar.IsVisible() )
- return FALSE;
+ return sal_False;
const MapMode& rMapMode = pView->GetMapMode();
Point aOrigin( rMapMode.GetOrigin() );
if(!( nWinBits & WB_VSCROLL) && !aOrigin.Y() )
{
long nDeepest = 0;
long nHeight = aOutputSize.Height();
- const ULONG nCount = pZOrderList->Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ const sal_uLong nCount = pZOrderList->Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)pZOrderList->GetObject(nCur);
long nBottom = GetEntryBoundRect(pEntry).Bottom();
if( nBottom > nHeight )
- return FALSE;
+ return sal_False;
if( nBottom > nDeepest )
nDeepest = nBottom;
}
@@ -1696,9 +1696,9 @@ BOOL SvxIconChoiceCtrl_Impl::CheckVerScrollBar()
aSize.Width() += nVerSBarWidth;
aHorSBar.SetSizePixel( aSize );
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -1721,7 +1721,7 @@ void SvxIconChoiceCtrl_Impl::GetFocus()
if( pCursor )
{
pCursor->SetFlags( ICNVIEW_FLAG_FOCUSED );
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
}
@@ -1730,7 +1730,7 @@ void SvxIconChoiceCtrl_Impl::LoseFocus()
StopEditTimer();
if( pCursor )
pCursor->ClearFlags( ICNVIEW_FLAG_FOCUSED );
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
// HideFocus ();
// pView->Invalidate ( aFocus.aRect );
@@ -1738,7 +1738,7 @@ void SvxIconChoiceCtrl_Impl::LoseFocus()
RepaintEntries( ICNVIEW_FLAG_SELECTED );
}
-void SvxIconChoiceCtrl_Impl::SetUpdateMode( BOOL bUpdate )
+void SvxIconChoiceCtrl_Impl::SetUpdateMode( sal_Bool bUpdate )
{
if( bUpdate != bUpdateMode )
{
@@ -1753,7 +1753,7 @@ void SvxIconChoiceCtrl_Impl::SetUpdateMode( BOOL bUpdate )
}
}
-void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, BOOL bIsBackgroundPainted )
+void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bIsBackgroundPainted )
{
Point aPos( GetEntryPos( pEntry ) );
PaintEntry( pEntry, aPos, 0, bIsBackgroundPainted );
@@ -1762,8 +1762,8 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, BOOL bI
// Prios der Emphasis: bDropTarget => bCursored => bSelected
void SvxIconChoiceCtrl_Impl::PaintEmphasis(
const Rectangle& rTextRect, const Rectangle& rImageRect,
- BOOL bSelected, BOOL bDropTarget, BOOL bCursored, OutputDevice* pOut,
- BOOL bIsBackgroundPainted )
+ sal_Bool bSelected, sal_Bool bDropTarget, sal_Bool bCursored, OutputDevice* pOut,
+ sal_Bool bIsBackgroundPainted )
{
static Color aTransparent( COL_TRANSPARENT );
@@ -1783,14 +1783,14 @@ void SvxIconChoiceCtrl_Impl::PaintEmphasis(
const StyleSettings& rSettings = pOut->GetSettings().GetStyleSettings();
Color aOldFillColor( pOut->GetFillColor() );
- BOOL bSolidTextRect = FALSE;
- BOOL bSolidImageRect = FALSE;
+ sal_Bool bSolidTextRect = sal_False;
+ sal_Bool bSolidImageRect = sal_False;
if( bDropTarget && ( eSelectionMode != NO_SELECTION ) )
{
pOut->SetFillColor( rSettings.GetHighlightColor() );
- bSolidTextRect = TRUE;
- bSolidImageRect = TRUE;
+ bSolidTextRect = sal_True;
+ bSolidImageRect = sal_True;
}
else
{
@@ -1803,7 +1803,7 @@ void SvxIconChoiceCtrl_Impl::PaintEmphasis(
const Color& rFillColor = pView->GetFont().GetFillColor();
pOut->SetFillColor( rFillColor );
if( rFillColor != aTransparent )
- bSolidTextRect = TRUE;
+ bSolidTextRect = sal_True;
}
}
}
@@ -1843,14 +1843,14 @@ void SvxIconChoiceCtrl_Impl::PaintEmphasis(
void SvxIconChoiceCtrl_Impl::PaintItem( const Rectangle& rRect,
- IcnViewFieldType eItem, SvxIconChoiceCtrlEntry* pEntry, USHORT nPaintFlags,
+ IcnViewFieldType eItem, SvxIconChoiceCtrlEntry* pEntry, sal_uInt16 nPaintFlags,
OutputDevice* pOut, const String* pStr, ::vcl::ControlLayoutData* _pLayoutData )
{
if( eItem == IcnViewFieldTypeText )
{
String aText;
if( !pStr )
- aText = pView->GetEntryText( pEntry, FALSE );
+ aText = pView->GetEntryText( pEntry, sal_False );
else
aText = *pStr;
@@ -1866,7 +1866,7 @@ void SvxIconChoiceCtrl_Impl::PaintItem( const Rectangle& rRect,
{
Color aBkgColor( pOut->GetBackground().GetColor() );
Color aFontColor;
- USHORT nColor = ( aBkgColor.GetRed() + aBkgColor.GetGreen() + aBkgColor.GetBlue() ) / 3;
+ sal_uInt16 nColor = ( aBkgColor.GetRed() + aBkgColor.GetGreen() + aBkgColor.GetBlue() ) / 3;
if ( nColor > 127 )
aFontColor.SetColor ( COL_BLACK );
else
@@ -1944,19 +1944,19 @@ void SvxIconChoiceCtrl_Impl::PaintEntryVirtOutDev( SvxIconChoiceCtrlEntry* pEntr
void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const Point& rPos,
- OutputDevice* pOut, BOOL bIsBackgroundPainted )
+ OutputDevice* pOut, sal_Bool bIsBackgroundPainted )
{
if( !pOut )
pOut = pView;
- BOOL bSelected = FALSE;
+ sal_Bool bSelected = sal_False;
if( eSelectionMode != NO_SELECTION )
bSelected = pEntry->IsSelected();
- BOOL bCursored = pEntry->IsCursored();
- BOOL bDropTarget = pEntry->IsDropTarget();
- BOOL bNoEmphasis = pEntry->IsBlockingEmphasis();
+ sal_Bool bCursored = pEntry->IsCursored();
+ sal_Bool bDropTarget = pEntry->IsDropTarget();
+ sal_Bool bNoEmphasis = pEntry->IsBlockingEmphasis();
Font aTempFont( pOut->GetFont() );
@@ -1968,8 +1968,8 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const P
}
*/
- String aEntryText( pView->GetEntryText( pEntry, FALSE ) );
- Rectangle aTextRect( CalcTextRect(pEntry,&rPos,FALSE,&aEntryText));
+ String aEntryText( pView->GetEntryText( pEntry, sal_False ) );
+ Rectangle aTextRect( CalcTextRect(pEntry,&rPos,sal_False,&aEntryText));
Rectangle aBmpRect( CalcBmpRect(pEntry, &rPos ) );
sal_Bool bShowSelection =
@@ -2009,14 +2009,14 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const P
pOut->SetFillColor( );
}
- BOOL bResetClipRegion = FALSE;
+ sal_Bool bResetClipRegion = sal_False;
if( !pView->IsClipRegion() && (aVerSBar.IsVisible() || aHorSBar.IsVisible()) )
{
Rectangle aOutputArea( GetOutputRect() );
if( aOutputArea.IsOver(aTextRect) || aOutputArea.IsOver(aBmpRect) )
{
pView->SetClipRegion( aOutputArea );
- bResetClipRegion = TRUE;
+ bResetClipRegion = sal_True;
}
}
@@ -2032,10 +2032,10 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const P
#endif
sal_Bool bLargeIconMode = WB_ICON == ( nWinBits & (VIEWMODE_MASK) );
- USHORT nBmpPaintFlags = PAINTFLAG_VER_CENTERED;
+ sal_uInt16 nBmpPaintFlags = PAINTFLAG_VER_CENTERED;
if ( bLargeIconMode )
nBmpPaintFlags |= PAINTFLAG_HOR_CENTERED;
- USHORT nTextPaintFlags = bLargeIconMode ? PAINTFLAG_HOR_CENTERED : PAINTFLAG_VER_CENTERED;
+ sal_uInt16 nTextPaintFlags = bLargeIconMode ? PAINTFLAG_HOR_CENTERED : PAINTFLAG_VER_CENTERED;
if( !bNoEmphasis )
PaintEmphasis(aTextRect,aBmpRect,bSelected,bDropTarget,bCursored,pOut,bIsBackgroundPainted);
@@ -2051,7 +2051,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const P
// Highlight-Frame zeichnen
if( pEntry == pCurHighlightFrame && !bNoEmphasis )
- DrawHighlightFrame( pOut, CalcFocusRect( pEntry ), FALSE );
+ DrawHighlightFrame( pOut, CalcFocusRect( pEntry ), sal_False );
pOut->SetFont( aTempFont );
if( bResetClipRegion )
@@ -2059,15 +2059,15 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const P
}
void SvxIconChoiceCtrl_Impl::SetEntryPos( SvxIconChoiceCtrlEntry* pEntry, const Point& rPos,
- BOOL bAdjustAtGrid, BOOL bCheckScrollBars, BOOL bKeepGridMap )
+ sal_Bool bAdjustAtGrid, sal_Bool bCheckScrollBars, sal_Bool bKeepGridMap )
{
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
Rectangle aBoundRect( GetEntryBoundRect( pEntry ));
pView->Invalidate( aBoundRect );
ToTop( pEntry );
if( !IsAutoArrange() )
{
- BOOL bAdjustVirtSize = FALSE;
+ sal_Bool bAdjustVirtSize = sal_False;
if( rPos != aBoundRect.TopLeft() )
{
Point aGridOffs(
@@ -2078,7 +2078,7 @@ void SvxIconChoiceCtrl_Impl::SetEntryPos( SvxIconChoiceCtrlEntry* pEntry, const
aBoundRect.SetPos( rPos );
pEntry->aRect = aBoundRect;
pEntry->aGridRect.SetPos( rPos + aGridOffs );
- bAdjustVirtSize = TRUE;
+ bAdjustVirtSize = sal_True;
}
if( bAdjustAtGrid )
{
@@ -2097,7 +2097,7 @@ void SvxIconChoiceCtrl_Impl::SetEntryPos( SvxIconChoiceCtrlEntry* pEntry, const
Point aNewPos( AdjustAtGrid( aCenterRect, rBoundRect ) );
Rectangle aNewBoundRect( aNewPos, pEntry->aRect.GetSize());
AdjustVirtSize( aNewBoundRect );
- bAdjustVirtSize = FALSE;
+ bAdjustVirtSize = sal_False;
}
AdjustEntryAtGrid( pEntry );
ToTop( pEntry );
@@ -2117,7 +2117,7 @@ void SvxIconChoiceCtrl_Impl::SetEntryPos( SvxIconChoiceCtrlEntry* pEntry, const
SetEntryPredecessor( pEntry, pPrev );
aAutoArrangeTimer.Start();
}
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
void SvxIconChoiceCtrl_Impl::SetNoSelection()
@@ -2126,16 +2126,16 @@ void SvxIconChoiceCtrl_Impl::SetNoSelection()
if( !(nFlags & F_CLEARING_SELECTION ))
{
nFlags |= F_CLEARING_SELECTION;
- DeselectAllBut( 0, TRUE );
+ DeselectAllBut( 0, sal_True );
nFlags &= ~F_CLEARING_SELECTION;
}
}
-SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetEntry( const Point& rDocPos, BOOL bHit )
+SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetEntry( const Point& rDocPos, sal_Bool bHit )
{
CheckBoundingRects();
// Z-Order-Liste vom Ende her absuchen
- ULONG nCount = pZOrderList->Count();
+ sal_uLong nCount = pZOrderList->Count();
while( nCount )
{
nCount--;
@@ -2166,11 +2166,11 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetNextEntry( const Point& rDocP
{
CheckBoundingRects();
SvxIconChoiceCtrlEntry* pTarget = 0;
- const ULONG nStartPos = pZOrderList->GetPos( (void*)pCurEntry );
+ const sal_uLong nStartPos = pZOrderList->GetPos( (void*)pCurEntry );
if( nStartPos != LIST_ENTRY_NOTFOUND )
{
- const ULONG nCount = pZOrderList->Count();
- for( ULONG nCur = nStartPos+1; nCur < nCount; nCur++ )
+ const sal_uLong nCount = pZOrderList->Count();
+ for( sal_uLong nCur = nStartPos+1; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)(pZOrderList->GetObject(nCur));
if( pEntry->aRect.IsInside( rDocPos ) )
@@ -2187,7 +2187,7 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetPrevEntry( const Point& rDocP
{
CheckBoundingRects();
SvxIconChoiceCtrlEntry* pTarget = 0;
- ULONG nStartPos = pZOrderList->GetPos( (void*)pCurEntry );
+ sal_uLong nStartPos = pZOrderList->GetPos( (void*)pCurEntry );
if( nStartPos != LIST_ENTRY_NOTFOUND && nStartPos != 0 )
{
nStartPos--;
@@ -2209,7 +2209,7 @@ Point SvxIconChoiceCtrl_Impl::GetEntryPos( SvxIconChoiceCtrlEntry* pEntry )
return pEntry->aRect.TopLeft();
}
-void SvxIconChoiceCtrl_Impl::MakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, BOOL bBound )
+void SvxIconChoiceCtrl_Impl::MakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bBound )
{
if ( bBound )
{
@@ -2263,7 +2263,7 @@ Rectangle SvxIconChoiceCtrl_Impl::CalcBmpRect( SvxIconChoiceCtrlEntry* pEntry, c
}
Rectangle SvxIconChoiceCtrl_Impl::CalcTextRect( SvxIconChoiceCtrlEntry* pEntry,
- const Point* pEntryPos, BOOL bEdit, const String* pStr )
+ const Point* pEntryPos, sal_Bool bEdit, const String* pStr )
{
String aEntryText;
if( !pStr )
@@ -2381,8 +2381,8 @@ void SvxIconChoiceCtrl_Impl::RecalcAllBoundingRects()
{
nMaxBoundHeight = 0;
pZOrderList->Clear();
- ULONG nCount = aEntries.Count();
- ULONG nCur;
+ sal_uLong nCount = aEntries.Count();
+ sal_uLong nCur;
SvxIconChoiceCtrlEntry* pEntry;
if( !IsAutoArrange() || !pHead )
@@ -2407,7 +2407,7 @@ void SvxIconChoiceCtrl_Impl::RecalcAllBoundingRects()
nCur++;
}
}
- bBoundRectsDirty = FALSE;
+ bBoundRectsDirty = sal_False;
AdjustScrollBars();
}
@@ -2415,9 +2415,9 @@ void SvxIconChoiceCtrl_Impl::RecalcAllBoundingRectsSmart()
{
nMaxBoundHeight = 0;
pZOrderList->Clear();
- ULONG nCur;
+ sal_uLong nCur;
SvxIconChoiceCtrlEntry* pEntry;
- const ULONG nCount = aEntries.Count();
+ const sal_uLong nCount = aEntries.Count();
if( !IsAutoArrange() || !pHead )
{
@@ -2460,8 +2460,8 @@ void SvxIconChoiceCtrl_Impl::RecalcAllBoundingRectsSmart()
void SvxIconChoiceCtrl_Impl::UpdateBoundingRects()
{
- const ULONG nCount = aEntries.Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ const sal_uLong nCount = aEntries.Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur );
GetEntryBoundRect( pEntry );
@@ -2477,7 +2477,7 @@ void SvxIconChoiceCtrl_Impl::FindBoundingRect( SvxIconChoiceCtrlEntry* pEntry )
return;
}
Size aSize( CalcBoundingSize( pEntry ) );
- Point aPos(pGridMap->GetGridRect(pGridMap->GetUnoccupiedGrid(TRUE)).TopLeft());
+ Point aPos(pGridMap->GetGridRect(pGridMap->GetUnoccupiedGrid(sal_True)).TopLeft());
SetBoundingRect_Impl( pEntry, aPos, aSize );
}
@@ -2492,33 +2492,33 @@ void SvxIconChoiceCtrl_Impl::SetBoundingRect_Impl( SvxIconChoiceCtrlEntry* pEntr
}
-void SvxIconChoiceCtrl_Impl::SetCursor( SvxIconChoiceCtrlEntry* pEntry, BOOL bSyncSingleSelection,
- BOOL bShowFocusAsync )
+void SvxIconChoiceCtrl_Impl::SetCursor( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bSyncSingleSelection,
+ sal_Bool bShowFocusAsync )
{
if( pEntry == pCursor )
{
if( pCursor && eSelectionMode == SINGLE_SELECTION && bSyncSingleSelection &&
!pCursor->IsSelected() )
- SelectEntry( pCursor, TRUE, TRUE );
+ SelectEntry( pCursor, sal_True, sal_True );
return;
}
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
SvxIconChoiceCtrlEntry* pOldCursor = pCursor;
pCursor = pEntry;
if( pOldCursor )
{
pOldCursor->ClearFlags( ICNVIEW_FLAG_FOCUSED );
if( eSelectionMode == SINGLE_SELECTION && bSyncSingleSelection )
- SelectEntry( pOldCursor, FALSE, TRUE ); // alten Cursor deselektieren
+ SelectEntry( pOldCursor, sal_False, sal_True ); // alten Cursor deselektieren
}
if( pCursor )
{
ToTop( pCursor );
pCursor->SetFlags( ICNVIEW_FLAG_FOCUSED );
if( eSelectionMode == SINGLE_SELECTION && bSyncSingleSelection )
- SelectEntry( pCursor, TRUE, TRUE );
+ SelectEntry( pCursor, sal_True, sal_True );
if( !bShowFocusAsync )
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
else
{
if( !nUserEventShowCursor )
@@ -2530,7 +2530,7 @@ void SvxIconChoiceCtrl_Impl::SetCursor( SvxIconChoiceCtrlEntry* pEntry, BOOL bSy
}
-void SvxIconChoiceCtrl_Impl::ShowCursor( BOOL bShow )
+void SvxIconChoiceCtrl_Impl::ShowCursor( sal_Bool bShow )
{
if( !pCursor || !bShow || !pView->HasFocus() )
{
@@ -2569,7 +2569,7 @@ void SvxIconChoiceCtrl_Impl::ShowDDIcon( SvxIconChoiceCtrlEntry* pRefEntry, cons
DELETEZ(pDDDev);
DELETEZ(pDDBufDev);
}
- BOOL bSelected = pRefEntry->IsSelected();
+ sal_Bool bSelected = pRefEntry->IsSelected();
pRefEntry->ClearFlags( ICNVIEW_FLAG_SELECTED );
if( !pDDDev )
{
@@ -2706,16 +2706,16 @@ void SvxIconChoiceCtrl_Impl::InvalidateBoundingRect( SvxIconChoiceCtrlEntry* pEn
}
-BOOL SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd )
+sal_Bool SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd )
{
Rectangle aDocRect( GetDocumentRect() );
Rectangle aVisRect( GetVisibleRect() );
if( aVisRect.IsInside( aDocRect ))
- return FALSE;
+ return sal_False;
Size aDocSize( aDocRect.GetSize() );
Size aVisSize( aVisRect.GetSize() );
- BOOL bHor = aDocSize.Width() > aVisSize.Width();
- BOOL bVer = aDocSize.Height() > aVisSize.Height();
+ sal_Bool bHor = aDocSize.Width() > aVisSize.Width();
+ sal_Bool bVer = aDocSize.Height() > aVisSize.Height();
long nScrollDX = 0, nScrollDY = 0;
@@ -2724,7 +2724,7 @@ BOOL SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd )
case COMMAND_STARTAUTOSCROLL:
{
pView->EndTracking();
- USHORT nScrollFlags = 0;
+ sal_uInt16 nScrollFlags = 0;
if( bHor )
nScrollFlags |= AUTOSCROLL_HORZ;
if( bVer )
@@ -2732,7 +2732,7 @@ BOOL SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd )
if( nScrollFlags )
{
pView->StartAutoScroll( nScrollFlags );
- return TRUE;
+ return sal_True;
}
}
break;
@@ -2742,7 +2742,7 @@ BOOL SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd )
const CommandWheelData* pData = rCmd.GetWheelData();
if( pData && (COMMAND_WHEEL_SCROLL == pData->GetMode()) && !pData->IsHorz() )
{
- ULONG nScrollLines = pData->GetScrollLines();
+ sal_uLong nScrollLines = pData->GetScrollLines();
if( nScrollLines == COMMAND_WHEEL_PAGESCROLL )
{
nScrollDY = GetScrollBarPageSize( aVisSize.Width() );
@@ -2777,9 +2777,9 @@ BOOL SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd )
aVisRect.Left() -= nScrollDX;
aVisRect.Right() -= nScrollDX;
MakeVisible( aVisRect );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -2806,7 +2806,7 @@ void SvxIconChoiceCtrl_Impl::ToTop( SvxIconChoiceCtrlEntry* pEntry )
{
if( pZOrderList->GetObject( pZOrderList->Count() - 1 ) != pEntry )
{
- ULONG nPos = pZOrderList->GetPos( (void*)pEntry );
+ sal_uLong nPos = pZOrderList->GetPos( (void*)pEntry );
pZOrderList->Remove( nPos );
pZOrderList->Insert( pEntry, LIST_APPEND );
}
@@ -2826,10 +2826,10 @@ void SvxIconChoiceCtrl_Impl::ClipAtVirtOutRect( Rectangle& rRect ) const
// rRect: Bereich des Dokumentes (in Dokumentkoordinaten), der
// sichtbar gemacht werden soll.
-// bScrBar == TRUE: Das Rect wurde aufgrund eines ScrollBar-Events berechnet
+// bScrBar == sal_True: Das Rect wurde aufgrund eines ScrollBar-Events berechnet
-void SvxIconChoiceCtrl_Impl::MakeVisible( const Rectangle& rRect, BOOL bScrBar,
- BOOL bCallRectChangedHdl )
+void SvxIconChoiceCtrl_Impl::MakeVisible( const Rectangle& rRect, sal_Bool bScrBar,
+ sal_Bool bCallRectChangedHdl )
{
Rectangle aVirtRect( rRect );
ClipAtVirtOutRect( aVirtRect );
@@ -2875,7 +2875,7 @@ void SvxIconChoiceCtrl_Impl::MakeVisible( const Rectangle& rRect, BOOL bScrBar,
{
HideDDIcon();
pView->Update();
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
}
// Origin fuer SV invertieren (damit wir in
@@ -2883,7 +2883,7 @@ void SvxIconChoiceCtrl_Impl::MakeVisible( const Rectangle& rRect, BOOL bScrBar,
aOrigin *= -1;
SetOrigin( aOrigin );
- BOOL bScrollable = pView->GetBackground().IsScrollable();
+ sal_Bool bScrollable = pView->GetBackground().IsScrollable();
if( pView->HasBackground() && !bScrollable )
{
Rectangle aRect( GetOutputRect());
@@ -2915,7 +2915,7 @@ void SvxIconChoiceCtrl_Impl::MakeVisible( const Rectangle& rRect, BOOL bScrBar,
}
if( GetUpdateMode() )
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
// pruefen, ob ScrollBars noch benoetigt werden
CheckScrollBars();
@@ -2936,15 +2936,15 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::FindNewCursor()
SvxIconChoiceCtrlEntry* pNewCursor;
if( pCursor )
{
- pNewCursor = pImpCursor->GoLeftRight( pCursor, FALSE );
+ pNewCursor = pImpCursor->GoLeftRight( pCursor, sal_False );
if( !pNewCursor )
{
- pNewCursor = pImpCursor->GoLeftRight( pCursor, TRUE );
+ pNewCursor = pImpCursor->GoLeftRight( pCursor, sal_True );
if( !pNewCursor )
{
- pNewCursor = pImpCursor->GoUpDown( pCursor, FALSE );
+ pNewCursor = pImpCursor->GoUpDown( pCursor, sal_False );
if( !pNewCursor )
- pNewCursor = pImpCursor->GoUpDown( pCursor, TRUE );
+ pNewCursor = pImpCursor->GoUpDown( pCursor, sal_True );
}
}
}
@@ -2954,7 +2954,7 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::FindNewCursor()
return pNewCursor;
}
-ULONG SvxIconChoiceCtrl_Impl::GetSelectionCount() const
+sal_uLong SvxIconChoiceCtrl_Impl::GetSelectionCount() const
{
if( (nWinBits & WB_HIGHLIGHTFRAME) && pCurHighlightFrame )
return 1;
@@ -2963,27 +2963,27 @@ ULONG SvxIconChoiceCtrl_Impl::GetSelectionCount() const
void SvxIconChoiceCtrl_Impl::ToggleSelection( SvxIconChoiceCtrlEntry* pEntry )
{
- BOOL bSel;
+ sal_Bool bSel;
if( pEntry->IsSelected() )
- bSel = FALSE;
+ bSel = sal_False;
else
- bSel = TRUE;
- SelectEntry( pEntry, bSel, TRUE, TRUE );
+ bSel = sal_True;
+ SelectEntry( pEntry, bSel, sal_True, sal_True );
}
void SvxIconChoiceCtrl_Impl::DeselectAllBut( SvxIconChoiceCtrlEntry* pThisEntryNot,
- BOOL bPaintSync )
+ sal_Bool bPaintSync )
{
ClearSelectedRectList();
//
// !!!!!!! Todo: Evtl. Z-Orderlist abarbeiten !!!!!!!
//
- ULONG nCount = aEntries.Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ sal_uLong nCount = aEntries.Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur );
if( pEntry != pThisEntryNot && pEntry->IsSelected() )
- SelectEntry( pEntry, FALSE, TRUE, TRUE, bPaintSync );
+ SelectEntry( pEntry, sal_False, sal_True, sal_True, bPaintSync );
}
pAnchor = 0;
nFlags &= (~F_ADD_MODE);
@@ -3119,7 +3119,7 @@ void SvxIconChoiceCtrl_Impl::Center( SvxIconChoiceCtrlEntry* pEntry ) const
// Die Deltas entsprechen Offsets, um die die View auf dem Doc verschoben wird
// links, hoch: Offsets < 0
// rechts, runter: Offsets > 0
-void SvxIconChoiceCtrl_Impl::Scroll( long nDeltaX, long nDeltaY, BOOL bScrollBar )
+void SvxIconChoiceCtrl_Impl::Scroll( long nDeltaX, long nDeltaY, sal_Bool bScrollBar )
{
const MapMode& rMapMode = pView->GetMapMode();
Point aOrigin( rMapMode.GetOrigin() );
@@ -3172,7 +3172,7 @@ static Rectangle GetHotSpot( const Rectangle& rRect )
}
void SvxIconChoiceCtrl_Impl::SelectRect( SvxIconChoiceCtrlEntry* pEntry1, SvxIconChoiceCtrlEntry* pEntry2,
- BOOL bAdd, SvPtrarr* pOtherRects )
+ sal_Bool bAdd, SvPtrarr* pOtherRects )
{
DBG_ASSERT(pEntry1 && pEntry2,"SelectEntry: Invalid Entry-Ptr");
Rectangle aRect( GetEntryBoundRect( pEntry1 ) );
@@ -3180,7 +3180,7 @@ void SvxIconChoiceCtrl_Impl::SelectRect( SvxIconChoiceCtrlEntry* pEntry1, SvxIco
SelectRect( aRect, bAdd, pOtherRects );
}
-void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, BOOL bAdd,
+void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, sal_Bool bAdd,
SvPtrarr* pOtherRects )
{
aCurSelectionRect = rRect;
@@ -3188,53 +3188,53 @@ void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, BOOL bAdd,
return;
// Flag setzen, damit im Select kein ToTop gerufen wird
- BOOL bAlreadySelectingRect = nFlags & F_SELECTING_RECT ? TRUE : FALSE;
+ sal_Bool bAlreadySelectingRect = nFlags & F_SELECTING_RECT ? sal_True : sal_False;
nFlags |= F_SELECTING_RECT;
CheckBoundingRects();
pView->Update();
- const ULONG nCount = pZOrderList->Count();
+ const sal_uLong nCount = pZOrderList->Count();
Rectangle aRect( rRect );
aRect.Justify();
- BOOL bCalcOverlap = (bAdd && pOtherRects && pOtherRects->Count()) ? TRUE : FALSE;
+ sal_Bool bCalcOverlap = (bAdd && pOtherRects && pOtherRects->Count()) ? sal_True : sal_False;
- BOOL bResetClipRegion = FALSE;
+ sal_Bool bResetClipRegion = sal_False;
if( !pView->IsClipRegion() )
{
- bResetClipRegion = TRUE;
+ bResetClipRegion = sal_True;
pView->SetClipRegion( GetOutputRect() );
}
- for( ULONG nPos = 0; nPos < nCount; nPos++ )
+ for( sal_uLong nPos = 0; nPos < nCount; nPos++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)(pZOrderList->GetObject(nPos ));
if( !IsBoundingRectValid( pEntry->aRect ))
FindBoundingRect( pEntry );
Rectangle aBoundRect( GetHotSpot( pEntry->aRect ) );
- BOOL bSelected = pEntry->IsSelected();
+ sal_Bool bSelected = pEntry->IsSelected();
- BOOL bOverlaps;
+ sal_Bool bOverlaps;
if( bCalcOverlap )
bOverlaps = IsOver( pOtherRects, aBoundRect );
else
- bOverlaps = FALSE;
- BOOL bOver = aRect.IsOver( aBoundRect );
+ bOverlaps = sal_False;
+ sal_Bool bOver = aRect.IsOver( aBoundRect );
if( bOver && !bOverlaps )
{
// Ist im neuen Selektionsrechteck und in keinem alten
// => selektieren
if( !bSelected )
- SelectEntry( pEntry, TRUE, TRUE, TRUE );
+ SelectEntry( pEntry, sal_True, sal_True, sal_True );
}
else if( !bAdd )
{
// ist ausserhalb des Selektionsrechtecks
// => Selektion entfernen
if( bSelected )
- SelectEntry( pEntry, FALSE, TRUE, TRUE );
+ SelectEntry( pEntry, sal_False, sal_True, sal_True );
}
else if( bAdd && bOverlaps )
{
@@ -3254,19 +3254,19 @@ void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, BOOL bAdd,
{
// Schnittmenge zwischen alten Rects & aktuellem Rect desel.
if( bSelected )
- SelectEntry( pEntry, FALSE, TRUE, TRUE );
+ SelectEntry( pEntry, sal_False, sal_True, sal_True );
}
else
{
// Eintrag eines alten Rects selektieren
if( !bSelected )
- SelectEntry( pEntry, TRUE, TRUE, TRUE );
+ SelectEntry( pEntry, sal_True, sal_True, sal_True );
}
}
else if( !bOver && bSelected )
{
// Der Eintrag liegt voellig ausserhalb und wird deshalb desel.
- SelectEntry( pEntry, FALSE, TRUE, TRUE );
+ SelectEntry( pEntry, sal_False, sal_True, sal_True );
}
}
@@ -3281,13 +3281,13 @@ void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, BOOL bAdd,
void SvxIconChoiceCtrl_Impl::SelectRange(
SvxIconChoiceCtrlEntry* pStart,
SvxIconChoiceCtrlEntry* pEnd,
- BOOL bAdd )
+ sal_Bool bAdd )
{
- ULONG nFront = GetEntryListPos( pStart );
- ULONG nBack = GetEntryListPos( pEnd );
- ULONG nFirst = std::min( nFront, nBack );
- ULONG nLast = std::max( nFront, nBack );
- ULONG i;
+ sal_uLong nFront = GetEntryListPos( pStart );
+ sal_uLong nBack = GetEntryListPos( pEnd );
+ sal_uLong nFirst = std::min( nFront, nBack );
+ sal_uLong nLast = std::max( nFront, nBack );
+ sal_uLong i;
SvxIconChoiceCtrlEntry* pEntry;
if ( ! bAdd )
@@ -3298,7 +3298,7 @@ void SvxIconChoiceCtrl_Impl::SelectRange(
{
pEntry = GetEntry( i );
if( pEntry->IsSelected() )
- SelectEntry( pEntry, FALSE, TRUE, TRUE, TRUE );
+ SelectEntry( pEntry, sal_False, sal_True, sal_True, sal_True );
}
}
@@ -3307,33 +3307,33 @@ void SvxIconChoiceCtrl_Impl::SelectRange(
{
pEntry = GetEntry( i );
if( ! pEntry->IsSelected() )
- SelectEntry( pEntry, TRUE, TRUE, TRUE, TRUE );
+ SelectEntry( pEntry, sal_True, sal_True, sal_True, sal_True );
}
if ( ! bAdd )
{
// deselect everything behind the last entry if not in
// adding mode
- ULONG nEnd = GetEntryCount();
+ sal_uLong nEnd = GetEntryCount();
for ( ; i<nEnd; i++ )
{
pEntry = GetEntry( i );
if( pEntry->IsSelected() )
- SelectEntry( pEntry, FALSE, TRUE, TRUE, TRUE );
+ SelectEntry( pEntry, sal_False, sal_True, sal_True, sal_True );
}
}
}
-BOOL SvxIconChoiceCtrl_Impl::IsOver( SvPtrarr* pRectList, const Rectangle& rBoundRect ) const
+sal_Bool SvxIconChoiceCtrl_Impl::IsOver( SvPtrarr* pRectList, const Rectangle& rBoundRect ) const
{
- const USHORT nCount = pRectList->Count();
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ const sal_uInt16 nCount = pRectList->Count();
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
Rectangle* pRect = (Rectangle*)pRectList->GetObject( nCur );
if( rBoundRect.IsOver( *pRect ))
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
void SvxIconChoiceCtrl_Impl::AddSelectedRect( SvxIconChoiceCtrlEntry* pEntry1,
@@ -3354,8 +3354,8 @@ void SvxIconChoiceCtrl_Impl::AddSelectedRect( const Rectangle& rRect )
void SvxIconChoiceCtrl_Impl::ClearSelectedRectList()
{
- const USHORT nCount = aSelectedRectList.Count();
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ const sal_uInt16 nCount = aSelectedRectList.Count();
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
Rectangle* pRect = (Rectangle*)aSelectedRectList.GetObject( nCur );
delete pRect;
@@ -3364,7 +3364,7 @@ void SvxIconChoiceCtrl_Impl::ClearSelectedRectList()
}
void SvxIconChoiceCtrl_Impl::CalcScrollOffsets( const Point& rPosPixel,
- long& rX, long& rY, BOOL isInDragDrop, USHORT nBorderWidth)
+ long& rX, long& rY, sal_Bool isInDragDrop, sal_uInt16 nBorderWidth)
{
// Scrolling der View, falls sich der Mauszeiger im Grenzbereich des
// Fensters befindet
@@ -3372,8 +3372,8 @@ void SvxIconChoiceCtrl_Impl::CalcScrollOffsets( const Point& rPosPixel,
long nPixelToScrollY = 0;
Size aWndSize = aOutputSize;
- nBorderWidth = (USHORT)(Min( (long)(aWndSize.Height()-1), (long)nBorderWidth ));
- nBorderWidth = (USHORT)(Min( (long)(aWndSize.Width()-1), (long)nBorderWidth ));
+ nBorderWidth = (sal_uInt16)(Min( (long)(aWndSize.Height()-1), (long)nBorderWidth ));
+ nBorderWidth = (sal_uInt16)(Min( (long)(aWndSize.Width()-1), (long)nBorderWidth ));
if ( rPosPixel.X() < nBorderWidth )
{
@@ -3434,16 +3434,16 @@ void SvxIconChoiceCtrl_Impl::PrepareCommandEvent( const CommandEvent& rCEvt )
StopEditTimer();
SvxIconChoiceCtrlEntry* pEntry = pView->GetEntry( rCEvt.GetMousePosPixel() );
if( (nFlags & F_DOWN_CTRL) && pEntry && !pEntry->IsSelected() )
- SelectEntry( pEntry, TRUE, TRUE );
+ SelectEntry( pEntry, sal_True, sal_True );
nFlags &= ~(F_DOWN_CTRL | F_DOWN_DESELECT);
}
-BOOL SvxIconChoiceCtrl_Impl::IsTextHit( SvxIconChoiceCtrlEntry* pEntry, const Point& rDocPos )
+sal_Bool SvxIconChoiceCtrl_Impl::IsTextHit( SvxIconChoiceCtrlEntry* pEntry, const Point& rDocPos )
{
Rectangle aRect( CalcTextRect( pEntry ));
if( aRect.IsInside( rDocPos ) )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
IMPL_LINK(SvxIconChoiceCtrl_Impl, EditTimeoutHdl, Timer*, EMPTYARG )
@@ -3469,8 +3469,8 @@ void SvxIconChoiceCtrl_Impl::AdjustEntryAtGrid( SvxIconChoiceCtrlEntry* pStart )
{
SvPtrarr aLists;
pImpCursor->CreateGridAjustData( aLists, pStart );
- const USHORT nCount = aLists.Count();
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ const sal_uInt16 nCount = aLists.Count();
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
AdjustAtGrid( *(SvPtrarr*)aLists[ nCur ], pStart );
IcnCursor_Impl::DestroyGridAdjustData( aLists );
CheckScrollBars();
@@ -3482,18 +3482,18 @@ void SvxIconChoiceCtrl_Impl::AdjustAtGrid( const SvPtrarr& rRow, SvxIconChoiceCt
if( !rRow.Count() )
return;
- BOOL bGo;
+ sal_Bool bGo;
if( !pStart )
- bGo = TRUE;
+ bGo = sal_True;
else
- bGo = FALSE;
+ bGo = sal_False;
long nCurRight = 0;
- for( USHORT nCur = 0; nCur < rRow.Count(); nCur++ )
+ for( sal_uInt16 nCur = 0; nCur < rRow.Count(); nCur++ )
{
SvxIconChoiceCtrlEntry* pCur = (SvxIconChoiceCtrlEntry*)rRow[ nCur ];
if( !bGo && pCur == pStart )
- bGo = TRUE;
+ bGo = sal_True;
//SvIcnVwDataEntry* pViewData = ICNVIEWDATA(pCur);
// Massgebend (fuer unser Auge) ist die Bitmap, da sonst
@@ -3557,7 +3557,7 @@ void SvxIconChoiceCtrl_Impl::SetEntryTextMode( SvxIconChoiceCtrlTextMode eMode,
if( eTextMode == IcnShowTextDontKnow )
eTextMode = IcnShowTextShort;
eTextMode = eMode;
- Arrange( TRUE );
+ Arrange( sal_True );
}
}
else
@@ -3611,20 +3611,20 @@ void SvxIconChoiceCtrl_Impl::ShowFocus ( Rectangle& rRect )
{
Color aBkgColor ( pView->GetBackground().GetColor() );
Color aPenColor;
- USHORT nColor = ( aBkgColor.GetRed() + aBkgColor.GetGreen() + aBkgColor.GetBlue() ) / 3;
+ sal_uInt16 nColor = ( aBkgColor.GetRed() + aBkgColor.GetGreen() + aBkgColor.GetBlue() ) / 3;
if ( nColor > 128 )
aPenColor.SetColor ( COL_BLACK );
else
aPenColor.SetColor( COL_WHITE );
- aFocus.bOn = TRUE;
+ aFocus.bOn = sal_True;
aFocus.aPenColor = aPenColor;
aFocus.aRect = rRect;
}
void SvxIconChoiceCtrl_Impl::HideFocus ()
{
- aFocus.bOn = FALSE;
+ aFocus.bOn = sal_False;
}
void SvxIconChoiceCtrl_Impl::DrawFocusRect ( OutputDevice* pOut )
@@ -3644,12 +3644,12 @@ void SvxIconChoiceCtrl_Impl::DrawFocusRect ( OutputDevice* pOut )
pOut->DrawPolyLine ( aPolygon, aLineInfo );
}
-sal_Bool SvxIconChoiceCtrl_Impl::IsMnemonicChar( sal_Unicode cChar, ULONG& rPos ) const
+sal_Bool SvxIconChoiceCtrl_Impl::IsMnemonicChar( sal_Unicode cChar, sal_uLong& rPos ) const
{
sal_Bool bRet = sal_False;
const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper();
- ULONG nEntryCount = GetEntryCount();
- for ( ULONG i = 0; i < nEntryCount; ++i )
+ sal_uLong nEntryCount = GetEntryCount();
+ for ( sal_uLong i = 0; i < nEntryCount; ++i )
{
if ( rI18nHelper.MatchMnemonic( GetEntry( i )->GetText(), cChar ) )
{
@@ -3675,7 +3675,7 @@ IMPL_LINK(SvxIconChoiceCtrl_Impl, UserEventHdl, void*, nId )
else if( nId == EVENTID_SHOW_CURSOR )
{
nUserEventShowCursor = 0;
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
return 0;
}
@@ -3697,12 +3697,12 @@ void SvxIconChoiceCtrl_Impl::CancelUserEvents()
void SvxIconChoiceCtrl_Impl::InvalidateEntry( SvxIconChoiceCtrlEntry* pEntry )
{
if( pEntry == pCursor )
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
pView->Invalidate( pEntry->aRect );
Center( pEntry );
pView->Invalidate( pEntry->aRect );
if( pEntry == pCursor )
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
void SvxIconChoiceCtrl_Impl::EditEntry( SvxIconChoiceCtrlEntry* pEntry )
@@ -3711,13 +3711,13 @@ void SvxIconChoiceCtrl_Impl::EditEntry( SvxIconChoiceCtrlEntry* pEntry )
if( !pEntry )
return;
- StopEntryEditing( TRUE );
+ StopEntryEditing( sal_True );
DELETEZ(pEdit);
SetNoSelection();
pCurEditedEntry = pEntry;
- String aEntryText( pView->GetEntryText( pEntry, TRUE ) );
- Rectangle aRect( CalcTextRect( pEntry, 0, TRUE, &aEntryText ) );
+ String aEntryText( pView->GetEntryText( pEntry, sal_True ) );
+ Rectangle aRect( CalcTextRect( pEntry, 0, sal_True, &aEntryText ) );
MakeVisible( aRect );
Point aPos( aRect.TopLeft() );
aPos = pView->GetPixelPos( aPos );
@@ -3758,7 +3758,7 @@ IMPL_LINK( SvxIconChoiceCtrl_Impl, TextEditEndedHdl, IcnViewEdit_Impl*, EMPTYARG
if( pView->EditedEntry( pCurEditedEntry, aText, pEdit->EditingCanceled() ) )
InvalidateEntry( pCurEditedEntry );
if( !GetSelectionCount() )
- SelectEntry( pCurEditedEntry, TRUE );
+ SelectEntry( pCurEditedEntry, sal_True );
pEdit->Hide();
if( pEdit->IsGrabFocus() )
@@ -3769,13 +3769,13 @@ IMPL_LINK( SvxIconChoiceCtrl_Impl, TextEditEndedHdl, IcnViewEdit_Impl*, EMPTYARG
return 0;
}
-void SvxIconChoiceCtrl_Impl::StopEntryEditing( BOOL bCancel )
+void SvxIconChoiceCtrl_Impl::StopEntryEditing( sal_Bool bCancel )
{
if( pEdit )
pEdit->StopEditing( bCancel );
}
-void SvxIconChoiceCtrl_Impl::LockEntryPos( SvxIconChoiceCtrlEntry* pEntry, BOOL bLock )
+void SvxIconChoiceCtrl_Impl::LockEntryPos( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bLock )
{
if( bLock )
pEntry->SetFlags( ICNVIEW_FLAG_POS_LOCKED );
@@ -3783,7 +3783,7 @@ void SvxIconChoiceCtrl_Impl::LockEntryPos( SvxIconChoiceCtrlEntry* pEntry, BOOL
pEntry->ClearFlags( ICNVIEW_FLAG_POS_LOCKED );
}
-SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetFirstSelectedEntry( ULONG& rPos ) const
+SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetFirstSelectedEntry( sal_uLong& rPos ) const
{
if( !GetSelectionCount() )
return 0;
@@ -3794,10 +3794,10 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetFirstSelectedEntry( ULONG& rP
return pCurHighlightFrame;
}
- ULONG nCount = aEntries.Count();
+ sal_uLong nCount = aEntries.Count();
if( !pHead )
{
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur );
if( pEntry->IsSelected() )
@@ -3829,14 +3829,14 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetFirstSelectedEntry( ULONG& rP
}
// kein Round Robin!
-SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetNextSelectedEntry( ULONG& rStartPos ) const
+SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetNextSelectedEntry( sal_uLong& rStartPos ) const
{
- ULONG nCount = aEntries.Count();
+ sal_uLong nCount = aEntries.Count();
if( rStartPos > nCount || !GetSelectionCount() )
return 0;
if( !pHead )
{
- for( ULONG nCur = rStartPos+1; nCur < nCount; nCur++ )
+ for( sal_uLong nCur = rStartPos+1; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur );
if( pEntry->IsSelected() )
@@ -3865,15 +3865,15 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetNextSelectedEntry( ULONG& rSt
return 0;
}
-void SvxIconChoiceCtrl_Impl::SelectAll( BOOL bSelect, BOOL bPaint )
+void SvxIconChoiceCtrl_Impl::SelectAll( sal_Bool bSelect, sal_Bool bPaint )
{
- bPaint = TRUE;
+ bPaint = sal_True;
- ULONG nCount = aEntries.Count();
- for( ULONG nCur = 0; nCur < nCount && (bSelect || GetSelectionCount() ); nCur++ )
+ sal_uLong nCount = aEntries.Count();
+ for( sal_uLong nCur = 0; nCur < nCount && (bSelect || GetSelectionCount() ); nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur );
- SelectEntry( pEntry, bSelect, TRUE, TRUE, bPaint );
+ SelectEntry( pEntry, bSelect, sal_True, sal_True, bPaint );
}
nFlags &= (~F_ADD_MODE);
pAnchor = 0;
@@ -3883,7 +3883,7 @@ void SvxIconChoiceCtrl_Impl::SaveSelection( List** ppList )
{
if( !*ppList )
*ppList = new List;
- ULONG nPos;
+ sal_uLong nPos;
SvxIconChoiceCtrlEntry* pEntry = GetFirstSelectedEntry( nPos );
while( pEntry && GetSelectionCount() != (*ppList)->Count() )
{
@@ -3896,12 +3896,12 @@ IcnViewEdit_Impl::IcnViewEdit_Impl( SvtIconChoiceCtrl* pParent, const Point& rPo
const Size& rSize, const XubString& rData, const Link& rNotifyEditEnd ) :
MultiLineEdit( pParent, (pParent->GetStyle() & WB_ICON) ? WB_CENTER : WB_LEFT),
aCallBackHdl( rNotifyEditEnd ),
- bCanceled( FALSE ),
- bAlreadyInCallback( FALSE ),
- bGrabFocus( FALSE )
+ bCanceled( sal_False ),
+ bAlreadyInCallback( sal_False ),
+ bGrabFocus( sal_False )
{
Font aFont( pParent->GetPointFont() );
- aFont.SetTransparent( FALSE );
+ aFont.SetTransparent( sal_False );
SetControlFont( aFont );
if( !pParent->HasFontFillColor() )
{
@@ -3941,7 +3941,7 @@ void IcnViewEdit_Impl::CallCallBackHdl_Impl()
aTimer.Stop();
if ( !bAlreadyInCallback )
{
- bAlreadyInCallback = TRUE;
+ bAlreadyInCallback = sal_True;
GetpApp()->RemoveAccel( &aAccReturn );
GetpApp()->RemoveAccel( &aAccEscape );
Hide();
@@ -3957,16 +3957,16 @@ IMPL_LINK( IcnViewEdit_Impl, Timeout_Impl, Timer*, EMPTYARG )
IMPL_LINK( IcnViewEdit_Impl, ReturnHdl_Impl, Accelerator*, EMPTYARG )
{
- bCanceled = FALSE;
- bGrabFocus = TRUE;
+ bCanceled = sal_False;
+ bGrabFocus = sal_True;
CallCallBackHdl_Impl();
return 1;
}
IMPL_LINK( IcnViewEdit_Impl, EscapeHdl_Impl, Accelerator*, EMPTYARG )
{
- bCanceled = TRUE;
- bGrabFocus = TRUE;
+ bCanceled = sal_True;
+ bGrabFocus = sal_True;
CallCallBackHdl_Impl();
return 1;
}
@@ -3974,19 +3974,19 @@ IMPL_LINK( IcnViewEdit_Impl, EscapeHdl_Impl, Accelerator*, EMPTYARG )
void IcnViewEdit_Impl::KeyInput( const KeyEvent& rKEvt )
{
KeyCode aCode = rKEvt.GetKeyCode();
- USHORT nCode = aCode.GetCode();
+ sal_uInt16 nCode = aCode.GetCode();
switch ( nCode )
{
case KEY_ESCAPE:
- bCanceled = TRUE;
- bGrabFocus = TRUE;
+ bCanceled = sal_True;
+ bGrabFocus = sal_True;
CallCallBackHdl_Impl();
break;
case KEY_RETURN:
- bCanceled = FALSE;
- bGrabFocus = TRUE;
+ bCanceled = sal_False;
+ bGrabFocus = sal_True;
CallCallBackHdl_Impl();
break;
@@ -4002,7 +4002,7 @@ long IcnViewEdit_Impl::PreNotify( NotifyEvent& rNEvt )
if ( !bAlreadyInCallback &&
((!Application::GetFocusWindow()) || !IsChild(Application::GetFocusWindow())))
{
- bCanceled = FALSE;
+ bCanceled = sal_False;
aTimer.SetTimeout(10);
aTimer.SetTimeoutHdl(LINK(this,IcnViewEdit_Impl,Timeout_Impl));
aTimer.Start();
@@ -4011,7 +4011,7 @@ long IcnViewEdit_Impl::PreNotify( NotifyEvent& rNEvt )
return 0;
}
-void IcnViewEdit_Impl::StopEditing( BOOL bCancel )
+void IcnViewEdit_Impl::StopEditing( sal_Bool bCancel )
{
if ( !bAlreadyInCallback )
{
@@ -4020,22 +4020,22 @@ void IcnViewEdit_Impl::StopEditing( BOOL bCancel )
}
}
-ULONG SvxIconChoiceCtrl_Impl::GetEntryListPos( SvxIconChoiceCtrlEntry* pEntry ) const
+sal_uLong SvxIconChoiceCtrl_Impl::GetEntryListPos( SvxIconChoiceCtrlEntry* pEntry ) const
{
if( !(nFlags & F_ENTRYLISTPOS_VALID ))
((SvxIconChoiceCtrl_Impl*)this)->SetListPositions();
return pEntry->nPos;
}
-void SvxIconChoiceCtrl_Impl::SetEntryListPos( SvxIconChoiceCtrlEntry* pListEntry, ULONG nNewPos )
+void SvxIconChoiceCtrl_Impl::SetEntryListPos( SvxIconChoiceCtrlEntry* pListEntry, sal_uLong nNewPos )
{
- ULONG nCurPos = GetEntryListPos( pListEntry );
+ sal_uLong nCurPos = GetEntryListPos( pListEntry );
if( nCurPos == nNewPos )
return;
aEntries.List::Remove( nCurPos );
aEntries.List::Insert( (void*)pListEntry, nNewPos );
// Eintragspositionen anpassen
- ULONG nStart, nEnd;
+ sal_uLong nStart, nEnd;
if( nNewPos < nCurPos )
{
nStart = nNewPos;
@@ -4053,19 +4053,19 @@ void SvxIconChoiceCtrl_Impl::SetEntryListPos( SvxIconChoiceCtrlEntry* pListEntry
}
}
-void SvxIconChoiceCtrl_Impl::SetEntryFlags( SvxIconChoiceCtrlEntry* pEntry, USHORT nEntryFlags )
+void SvxIconChoiceCtrl_Impl::SetEntryFlags( SvxIconChoiceCtrlEntry* pEntry, sal_uInt16 nEntryFlags )
{
pEntry->nFlags = nEntryFlags;
if( nEntryFlags & ICNVIEW_FLAG_POS_MOVED )
nFlags |= F_MOVED_ENTRIES;
}
-SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GoLeftRight( SvxIconChoiceCtrlEntry* pStart, BOOL bRight )
+SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GoLeftRight( SvxIconChoiceCtrlEntry* pStart, sal_Bool bRight )
{
return pImpCursor->GoLeftRight( pStart, bRight );
}
-SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GoUpDown( SvxIconChoiceCtrlEntry* pStart, BOOL bDown )
+SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GoUpDown( SvxIconChoiceCtrlEntry* pStart, sal_Bool bDown )
{
return pImpCursor->GoUpDown( pStart, bDown );
}
@@ -4116,14 +4116,14 @@ void SvxIconChoiceCtrl_Impl::InitSettings()
}
}
-EntryList_Impl::EntryList_Impl( SvxIconChoiceCtrl_Impl* pOwner, USHORT _nInitSize , USHORT _nReSize ) :
+EntryList_Impl::EntryList_Impl( SvxIconChoiceCtrl_Impl* pOwner, sal_uInt16 _nInitSize , sal_uInt16 _nReSize ) :
List( _nInitSize, _nReSize ),
_pOwner( pOwner )
{
_pOwner->pHead = 0;
}
-EntryList_Impl::EntryList_Impl( SvxIconChoiceCtrl_Impl* pOwner, USHORT _nBlockSize, USHORT _nInitSize, USHORT _nReSize ) :
+EntryList_Impl::EntryList_Impl( SvxIconChoiceCtrl_Impl* pOwner, sal_uInt16 _nBlockSize, sal_uInt16 _nInitSize, sal_uInt16 _nReSize ) :
List( _nBlockSize, _nInitSize, _nReSize ),
_pOwner( pOwner )
{
@@ -4141,14 +4141,14 @@ void EntryList_Impl::Clear()
List::Clear();
}
-void EntryList_Impl::Insert( SvxIconChoiceCtrlEntry* pEntry, ULONG nPos )
+void EntryList_Impl::Insert( SvxIconChoiceCtrlEntry* pEntry, sal_uLong nPos )
{
List::Insert( pEntry, nPos );
if( _pOwner->pHead )
pEntry->SetBacklink( _pOwner->pHead->pblink );
}
-SvxIconChoiceCtrlEntry* EntryList_Impl::Remove( ULONG nPos )
+SvxIconChoiceCtrlEntry* EntryList_Impl::Remove( sal_uLong nPos )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)List::Remove( nPos );
DBG_ASSERT(pEntry,"EntryList_Impl::Remove > Entry not found");
@@ -4182,14 +4182,14 @@ void EntryList_Impl::Removed_Impl( SvxIconChoiceCtrlEntry* pEntry )
void SvxIconChoiceCtrl_Impl::SetPositionMode( SvxIconChoiceCtrlPositionMode eMode )
{
- ULONG nCur;
+ sal_uLong nCur;
if( eMode == ePositionMode )
return;
SvxIconChoiceCtrlPositionMode eOldMode = ePositionMode;
ePositionMode = eMode;
- ULONG nCount = aEntries.Count();
+ sal_uLong nCount = aEntries.Count();
if( eOldMode == IcnViewPositionModeAutoArrange )
{
@@ -4258,12 +4258,12 @@ void SvxIconChoiceCtrl_Impl::SetEntryPredecessor( SvxIconChoiceCtrlEntry* pEntry
if( pEntry == pPredecessor )
return;
- ULONG nPos1 = GetEntryListPos( pEntry );
+ sal_uLong nPos1 = GetEntryListPos( pEntry );
if( !pHead )
{
if( pPredecessor )
{
- ULONG nPos2 = GetEntryListPos( pPredecessor );
+ sal_uLong nPos2 = GetEntryListPos( pPredecessor );
if( nPos1 == (nPos2 + 1) )
return; // ist schon Vorgaenger
}
@@ -4277,16 +4277,16 @@ void SvxIconChoiceCtrl_Impl::SetEntryPredecessor( SvxIconChoiceCtrlEntry* pEntry
if( !pPredecessor && pHead == pEntry )
return; // ist schon der Erste
- BOOL bSetHead = FALSE;
+ sal_Bool bSetHead = sal_False;
if( !pPredecessor )
{
- bSetHead = TRUE;
+ bSetHead = sal_True;
pPredecessor = pHead->pblink;
}
if( pEntry == pHead )
{
pHead = pHead->pflink;
- bSetHead = FALSE;
+ bSetHead = sal_False;
}
if( pEntry != pPredecessor )
{
@@ -4299,12 +4299,12 @@ void SvxIconChoiceCtrl_Impl::SetEntryPredecessor( SvxIconChoiceCtrlEntry* pEntry
aAutoArrangeTimer.Start();
}
-BOOL SvxIconChoiceCtrl_Impl::GetEntryPredecessor( SvxIconChoiceCtrlEntry* pEntry,
+sal_Bool SvxIconChoiceCtrl_Impl::GetEntryPredecessor( SvxIconChoiceCtrlEntry* pEntry,
SvxIconChoiceCtrlEntry** ppPredecessor )
{
*ppPredecessor = 0;
if( !pHead )
- return FALSE;
+ return sal_False;
DBG_ASSERT(pEntry->pblink,"GetEntryPredecessor: Backward link not set");
DBG_ASSERT(pEntry->pflink,"GetEntryPredecessor: Forward link not set");
@@ -4312,14 +4312,14 @@ BOOL SvxIconChoiceCtrl_Impl::GetEntryPredecessor( SvxIconChoiceCtrlEntry* pEntry
{
SvxIconChoiceCtrlEntry* pFirst = (SvxIconChoiceCtrlEntry*)aEntries.GetObject(0);
if( pFirst != pEntry )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
*ppPredecessor = pEntry->pblink;
if( !(pEntry->nFlags & ICNVIEW_FLAG_PRED_SET) &&
(GetEntryListPos( *ppPredecessor ) + 1) == GetEntryListPos( pEntry ))
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::FindEntryPredecessor( SvxIconChoiceCtrlEntry* pEntry,
@@ -4328,8 +4328,8 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::FindEntryPredecessor( SvxIconCho
Point aPos( rPosTopLeft ); //TopLeft
Rectangle aCenterRect( CalcBmpRect( pEntry, &aPos ));
Point aNewPos( aCenterRect.Center() );
- ULONG nGrid = GetPredecessorGrid( aNewPos );
- ULONG nCount = aEntries.Count();
+ sal_uLong nGrid = GetPredecessorGrid( aNewPos );
+ sal_uLong nCount = aEntries.Count();
if( nGrid == ULONG_MAX )
return 0;
if( nGrid >= nCount )
@@ -4339,26 +4339,26 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::FindEntryPredecessor( SvxIconCho
SvxIconChoiceCtrlEntry* pCur = pHead; // Grid 0
// todo: Liste von hinten aufrollen wenn nGrid > nCount/2
- for( ULONG nCur = 0; nCur < nGrid; nCur++ )
+ for( sal_uLong nCur = 0; nCur < nGrid; nCur++ )
pCur = pCur->pflink;
return pCur;
}
-ULONG SvxIconChoiceCtrl_Impl::GetPredecessorGrid( const Point& rPos) const
+sal_uLong SvxIconChoiceCtrl_Impl::GetPredecessorGrid( const Point& rPos) const
{
Point aPos( rPos );
aPos.X() -= LROFFS_WINBORDER;
aPos.Y() -= TBOFFS_WINBORDER;
- USHORT nMaxCol = (USHORT)(aVirtOutputSize.Width() / nGridDX);
+ sal_uInt16 nMaxCol = (sal_uInt16)(aVirtOutputSize.Width() / nGridDX);
if( nMaxCol )
nMaxCol--;
- USHORT nGridX = (USHORT)(aPos.X() / nGridDX);
+ sal_uInt16 nGridX = (sal_uInt16)(aPos.X() / nGridDX);
if( nGridX > nMaxCol )
nGridX = nMaxCol;
- USHORT nGridY = (USHORT)(aPos.Y() / nGridDY);
- USHORT nGridsX = (USHORT)(aOutputSize.Width() / nGridDX);
- ULONG nGrid = (nGridY * nGridsX) + nGridX;
+ sal_uInt16 nGridY = (sal_uInt16)(aPos.Y() / nGridDY);
+ sal_uInt16 nGridsX = (sal_uInt16)(aOutputSize.Width() / nGridDX);
+ sal_uLong nGrid = (nGridY * nGridsX) + nGridX;
long nMiddle = (nGridX * nGridDX) + (nGridDX / 2);
if( rPos.X() < nMiddle )
{
@@ -4378,27 +4378,27 @@ void SvxIconChoiceCtrl_Impl::Flush()
}
}
-BOOL SvxIconChoiceCtrl_Impl::RequestHelp( const HelpEvent& rHEvt )
+sal_Bool SvxIconChoiceCtrl_Impl::RequestHelp( const HelpEvent& rHEvt )
{
if ( !(rHEvt.GetMode() & HELPMODE_QUICK ) )
- return FALSE;
+ return sal_False;
Point aPos( pView->ScreenToOutputPixel(rHEvt.GetMousePosPixel() ) );
aPos -= pView->GetMapMode().GetOrigin();
- SvxIconChoiceCtrlEntry* pEntry = GetEntry( aPos, TRUE );
+ SvxIconChoiceCtrlEntry* pEntry = GetEntry( aPos, sal_True );
if ( !pEntry )
- return FALSE;
+ return sal_False;
String sQuickHelpText = pEntry->GetQuickHelpText();
- String aEntryText( pView->GetEntryText( pEntry, FALSE ) );
- Rectangle aTextRect( CalcTextRect( pEntry, 0, FALSE, &aEntryText ) );
+ String aEntryText( pView->GetEntryText( pEntry, sal_False ) );
+ Rectangle aTextRect( CalcTextRect( pEntry, 0, sal_False, &aEntryText ) );
if ( ( !aTextRect.IsInside( aPos ) || !aEntryText.Len() ) && !sQuickHelpText.Len() )
- return FALSE;
+ return sal_False;
Rectangle aOptTextRect( aTextRect );
aOptTextRect.Bottom() = LONG_MAX;
- USHORT nNewFlags = nCurTextDrawFlags;
+ sal_uInt16 nNewFlags = nCurTextDrawFlags;
nNewFlags &= ~( TEXT_DRAW_CLIP | TEXT_DRAW_ENDELLIPSIS );
aOptTextRect = pView->GetTextRect( aOptTextRect, aEntryText, nNewFlags );
if ( aOptTextRect != aTextRect || sQuickHelpText.Len() > 0 )
@@ -4419,7 +4419,7 @@ BOOL SvxIconChoiceCtrl_Impl::RequestHelp( const HelpEvent& rHEvt )
Help::ShowQuickHelp( (Window*)pView, aOptTextRect, sHelpText, QUICKHELP_LEFT | QUICKHELP_VCENTER );
}
- return TRUE;
+ return sal_True;
}
void SvxIconChoiceCtrl_Impl::ClearColumnList()
@@ -4427,8 +4427,8 @@ void SvxIconChoiceCtrl_Impl::ClearColumnList()
if( !pColumns )
return;
- const USHORT nCount = pColumns->Count();
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ const sal_uInt16 nCount = pColumns->Count();
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlColumnInfo* pInfo = (SvxIconChoiceCtrlColumnInfo*)
pColumns->GetObject( nCur );
@@ -4437,7 +4437,7 @@ void SvxIconChoiceCtrl_Impl::ClearColumnList()
DELETEZ(pColumns);
}
-void SvxIconChoiceCtrl_Impl::SetColumn( USHORT nIndex, const SvxIconChoiceCtrlColumnInfo& rInfo)
+void SvxIconChoiceCtrl_Impl::SetColumn( sal_uInt16 nIndex, const SvxIconChoiceCtrlColumnInfo& rInfo)
{
if( !pColumns )
pColumns = new SvPtrarr;
@@ -4467,22 +4467,22 @@ void SvxIconChoiceCtrl_Impl::SetColumn( USHORT nIndex, const SvxIconChoiceCtrlCo
Arrange( IsAutoArrange() );
}
-const SvxIconChoiceCtrlColumnInfo* SvxIconChoiceCtrl_Impl::GetColumn( USHORT nIndex ) const
+const SvxIconChoiceCtrlColumnInfo* SvxIconChoiceCtrl_Impl::GetColumn( sal_uInt16 nIndex ) const
{
if( !pColumns || nIndex >= pColumns->Count() )
return 0;
return (const SvxIconChoiceCtrlColumnInfo*)pColumns->GetObject( nIndex );
}
-const SvxIconChoiceCtrlColumnInfo* SvxIconChoiceCtrl_Impl::GetItemColumn( USHORT nSubItem,
+const SvxIconChoiceCtrlColumnInfo* SvxIconChoiceCtrl_Impl::GetItemColumn( sal_uInt16 nSubItem,
long& rLeft ) const
{
rLeft = 0;
if( !pColumns )
return 0;
- const USHORT nCount = pColumns->Count();
+ const sal_uInt16 nCount = pColumns->Count();
const SvxIconChoiceCtrlColumnInfo* pCol = 0;
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
pCol = (const SvxIconChoiceCtrlColumnInfo*)pColumns->GetObject( nCur );
if( !pCol || pCol->GetSubItem() == nSubItem )
@@ -4493,7 +4493,7 @@ const SvxIconChoiceCtrlColumnInfo* SvxIconChoiceCtrl_Impl::GetItemColumn( USHORT
}
void SvxIconChoiceCtrl_Impl::DrawHighlightFrame(
- OutputDevice* pOut, const Rectangle& rBmpRect, BOOL bHide )
+ OutputDevice* pOut, const Rectangle& rBmpRect, sal_Bool bHide )
{
Rectangle aBmpRect( rBmpRect );
long nBorder = 2;
@@ -4509,7 +4509,7 @@ void SvxIconChoiceCtrl_Impl::DrawHighlightFrame(
else
{
DecorationView aDecoView( pOut );
- USHORT nDecoFlags;
+ sal_uInt16 nDecoFlags;
if ( bHighlightFramePressed )
nDecoFlags = FRAME_HIGHLIGHT_TESTBACKGROUND | FRAME_HIGHLIGHT_IN;
else
@@ -4519,20 +4519,20 @@ void SvxIconChoiceCtrl_Impl::DrawHighlightFrame(
}
void SvxIconChoiceCtrl_Impl::SetEntryHighlightFrame( SvxIconChoiceCtrlEntry* pEntry,
- BOOL bKeepHighlightFlags )
+ sal_Bool bKeepHighlightFlags )
{
if( pEntry == pCurHighlightFrame )
return;
if( !bKeepHighlightFlags )
- bHighlightFramePressed = FALSE;
+ bHighlightFramePressed = sal_False;
HideEntryHighlightFrame();
pCurHighlightFrame = pEntry;
if( pEntry )
{
Rectangle aBmpRect( CalcFocusRect(pEntry) );
- DrawHighlightFrame( pView, aBmpRect, FALSE );
+ DrawHighlightFrame( pView, aBmpRect, sal_False );
}
}
@@ -4544,7 +4544,7 @@ void SvxIconChoiceCtrl_Impl::HideEntryHighlightFrame()
SvxIconChoiceCtrlEntry* pEntry = pCurHighlightFrame;
pCurHighlightFrame = 0;
Rectangle aBmpRect( CalcFocusRect(pEntry) );
- DrawHighlightFrame( pView, aBmpRect, TRUE );
+ DrawHighlightFrame( pView, aBmpRect, sal_True );
}
void SvxIconChoiceCtrl_Impl::CallSelectHandler( SvxIconChoiceCtrlEntry* )
@@ -4585,7 +4585,7 @@ Point SvxIconChoiceCtrl_Impl::GetPopupMenuPosPixel() const
SvxIconChoiceCtrlEntry* pEntry = GetCurEntry();
if( !pEntry || !pEntry->IsSelected() )
{
- ULONG nNext;
+ sal_uLong nNext;
pEntry = GetFirstSelectedEntry( nNext );
}
if( pEntry )
@@ -4597,14 +4597,14 @@ Point SvxIconChoiceCtrl_Impl::GetPopupMenuPosPixel() const
return aResult;
}
-void SvxIconChoiceCtrl_Impl::SetOrigin( const Point& rPos, BOOL bDoNotUpdateWallpaper )
+void SvxIconChoiceCtrl_Impl::SetOrigin( const Point& rPos, sal_Bool bDoNotUpdateWallpaper )
{
MapMode aMapMode( pView->GetMapMode() );
aMapMode.SetOrigin( rPos );
pView->SetMapMode( aMapMode );
if( !bDoNotUpdateWallpaper )
{
- BOOL bScrollable = pView->GetBackground().IsScrollable();
+ sal_Bool bScrollable = pView->GetBackground().IsScrollable();
if( pView->HasBackground() && !bScrollable )
{
Rectangle aRect( GetOutputRect());
@@ -4615,8 +4615,8 @@ void SvxIconChoiceCtrl_Impl::SetOrigin( const Point& rPos, BOOL bDoNotUpdateWall
}
}
-ULONG SvxIconChoiceCtrl_Impl::GetGridCount( const Size& rSize, BOOL bCheckScrBars,
- BOOL bSmartScrBar ) const
+sal_uLong SvxIconChoiceCtrl_Impl::GetGridCount( const Size& rSize, sal_Bool bCheckScrBars,
+ sal_Bool bSmartScrBar ) const
{
Size aSize( rSize );
if( bCheckScrBars && aHorSBar.IsVisible() )
@@ -4634,19 +4634,19 @@ ULONG SvxIconChoiceCtrl_Impl::GetGridCount( const Size& rSize, BOOL bCheckScrBar
if( aSize.Height() < 0 )
aSize.Height() = 0;
- return IcnGridMap_Impl::GetGridCount( aSize, (USHORT)nGridDX, (USHORT)nGridDY );
+ return IcnGridMap_Impl::GetGridCount( aSize, (sal_uInt16)nGridDX, (sal_uInt16)nGridDY );
}
-BOOL SvxIconChoiceCtrl_Impl::HandleShortCutKey( const KeyEvent& rKEvt )
+sal_Bool SvxIconChoiceCtrl_Impl::HandleShortCutKey( const KeyEvent& rKEvt )
{
StopEditTimer();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
DBG_ASSERT( rKEvt.GetKeyCode().IsMod2(), "*SvxIconChoiceCtrl_Impl::HandleShortCutKey(): no <ALT> pressed!?" );
sal_Unicode cChar = rKEvt.GetCharCode();
- ULONG nPos = (ULONG)-1;
+ sal_uLong nPos = (sal_uLong)-1;
if( cChar && IsMnemonicChar( cChar, nPos ) )
{
@@ -4655,7 +4655,7 @@ BOOL SvxIconChoiceCtrl_Impl::HandleShortCutKey( const KeyEvent& rKEvt )
SvxIconChoiceCtrlEntry* pOldCursor = pCursor;
if( pNewCursor != pOldCursor )
{
- SetCursor_Impl( pOldCursor, pNewCursor, FALSE, FALSE, FALSE );
+ SetCursor_Impl( pOldCursor, pNewCursor, sal_False, sal_False, sal_False );
if( pNewCursor != NULL )
{
@@ -4665,7 +4665,7 @@ BOOL SvxIconChoiceCtrl_Impl::HandleShortCutKey( const KeyEvent& rKEvt )
pCurHighlightFrame = NULL;
}
}
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -4673,7 +4673,7 @@ BOOL SvxIconChoiceCtrl_Impl::HandleShortCutKey( const KeyEvent& rKEvt )
// -----------------------------------------------------------------------
-void SvxIconChoiceCtrl_Impl::CallEventListeners( ULONG nEvent, void* pData )
+void SvxIconChoiceCtrl_Impl::CallEventListeners( sal_uLong nEvent, void* pData )
{
pView->CallImplEventListeners( nEvent, pData );
}
diff --git a/svtools/source/contnr/imivctl2.cxx b/svtools/source/contnr/imivctl2.cxx
index 7cb92e8cef07..539477c03599 100644
--- a/svtools/source/contnr/imivctl2.cxx
+++ b/svtools/source/contnr/imivctl2.cxx
@@ -47,14 +47,14 @@ IcnCursor_Impl::~IcnCursor_Impl()
delete[] pRows;
}
-USHORT IcnCursor_Impl::GetSortListPos( SvPtrarr* pList, long nValue,
+sal_uInt16 IcnCursor_Impl::GetSortListPos( SvPtrarr* pList, long nValue,
int bVertical )
{
- USHORT nCount = (USHORT)pList->Count();
+ sal_uInt16 nCount = (sal_uInt16)pList->Count();
if( !nCount )
return 0;
- USHORT nCurPos = 0;
+ sal_uInt16 nCurPos = 0;
long nPrevValue = LONG_MIN;
while( nCount )
{
@@ -66,7 +66,7 @@ USHORT IcnCursor_Impl::GetSortListPos( SvPtrarr* pList, long nValue,
else
nCurValue = rRect.Left();
if( nValue >= nPrevValue && nValue <= nCurValue )
- return (USHORT)nCurPos;
+ return (sal_uInt16)nCurPos;
nPrevValue = nCurValue;
nCount--;
nCurPos++;
@@ -84,8 +84,8 @@ void IcnCursor_Impl::ImplCreate()
pColumns = new SvPtrarr[ nCols ];
pRows = new SvPtrarr[ nRows ];
- ULONG nCount = pView->aEntries.Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ sal_uLong nCount = pView->aEntries.Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)pView->aEntries.GetObject( nCur );
// const Rectangle& rRect = pView->GetEntryBoundRect( pEntry );
@@ -99,10 +99,10 @@ void IcnCursor_Impl::ImplCreate()
if( nX >= nCols )
nX = sal::static_int_cast< short >(nCols - 1);
- USHORT nIns = GetSortListPos( &pColumns[nX], rRect.Top(), TRUE );
+ sal_uInt16 nIns = GetSortListPos( &pColumns[nX], rRect.Top(), sal_True );
pColumns[ nX ].Insert( pEntry, nIns );
- nIns = GetSortListPos( &pRows[nY], rRect.Left(), FALSE );
+ nIns = GetSortListPos( &pRows[nY], rRect.Left(), sal_False );
pRows[ nY ].Insert( pEntry, nIns );
pEntry->nX = nX;
@@ -127,12 +127,12 @@ void IcnCursor_Impl::Clear()
}
}
-SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(USHORT nCol,USHORT nTop,USHORT nBottom,
- USHORT, BOOL bDown, BOOL bSimple )
+SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(sal_uInt16 nCol,sal_uInt16 nTop,sal_uInt16 nBottom,
+ sal_uInt16, sal_Bool bDown, sal_Bool bSimple )
{
DBG_ASSERT(pCurEntry,"SearchCol: No reference entry");
SvPtrarr* pList = &(pColumns[ nCol ]);
- const USHORT nCount = pList->Count();
+ const sal_uInt16 nCount = pList->Count();
if( !nCount )
return 0;
@@ -140,7 +140,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(USHORT nCol,USHORT nTop,USHORT
if( bSimple )
{
- USHORT nListPos = pList->GetPos( pCurEntry );
+ sal_uInt16 nListPos = pList->GetPos( pCurEntry );
DBG_ASSERT(nListPos!=0xffff,"Entry not in Col-List");
if( bDown )
{
@@ -173,18 +173,18 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(USHORT nCol,USHORT nTop,USHORT
if( nTop > nBottom )
{
- USHORT nTemp = nTop;
+ sal_uInt16 nTemp = nTop;
nTop = nBottom;
nBottom = nTemp;
}
long nMinDistance = LONG_MAX;
SvxIconChoiceCtrlEntry* pResult = 0;
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)(pList->GetObject( nCur ));
if( pEntry != pCurEntry )
{
- USHORT nY = pEntry->nY;
+ sal_uInt16 nY = pEntry->nY;
if( nY >= nTop && nY <= nBottom )
{
const Rectangle& rRect = pView->GetEntryBoundRect( pEntry );
@@ -202,12 +202,12 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(USHORT nCol,USHORT nTop,USHORT
return pResult;
}
-SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(USHORT nRow,USHORT nLeft,USHORT nRight,
- USHORT, BOOL bRight, BOOL bSimple )
+SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(sal_uInt16 nRow,sal_uInt16 nLeft,sal_uInt16 nRight,
+ sal_uInt16, sal_Bool bRight, sal_Bool bSimple )
{
DBG_ASSERT(pCurEntry,"SearchRow: No reference entry");
SvPtrarr* pList = &(pRows[ nRow ]);
- const USHORT nCount = pList->Count();
+ const sal_uInt16 nCount = pList->Count();
if( !nCount )
return 0;
@@ -215,7 +215,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(USHORT nRow,USHORT nLeft,USHOR
if( bSimple )
{
- USHORT nListPos = pList->GetPos( pCurEntry );
+ sal_uInt16 nListPos = pList->GetPos( pCurEntry );
DBG_ASSERT(nListPos!=0xffff,"Entry not in Row-List");
if( bRight )
{
@@ -248,18 +248,18 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(USHORT nRow,USHORT nLeft,USHOR
}
if( nRight < nLeft )
{
- USHORT nTemp = nRight;
+ sal_uInt16 nTemp = nRight;
nRight = nLeft;
nLeft = nTemp;
}
long nMinDistance = LONG_MAX;
SvxIconChoiceCtrlEntry* pResult = 0;
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)(pList->GetObject( nCur ));
if( pEntry != pCurEntry )
{
- USHORT nX = pEntry->nX;
+ sal_uInt16 nX = pEntry->nX;
if( nX >= nLeft && nX <= nRight )
{
const Rectangle& rRect = pView->GetEntryBoundRect( pEntry );
@@ -281,7 +281,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(USHORT nRow,USHORT nLeft,USHOR
/*
Sucht ab dem uebergebenen Eintrag den naechsten rechts- bzw.
- linksstehenden. Suchverfahren am Beispiel bRight = TRUE:
+ linksstehenden. Suchverfahren am Beispiel bRight = sal_True:
c
b c
@@ -296,21 +296,21 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(USHORT nRow,USHORT nLeft,USHOR
a,b,c : 2., 3., 4. Suchrechteck
*/
-SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoLeftRight( SvxIconChoiceCtrlEntry* pCtrlEntry, BOOL bRight )
+SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoLeftRight( SvxIconChoiceCtrlEntry* pCtrlEntry, sal_Bool bRight )
{
SvxIconChoiceCtrlEntry* pResult;
pCurEntry = pCtrlEntry;
Create();
- USHORT nY = pCtrlEntry->nY;
- USHORT nX = pCtrlEntry->nX;
+ sal_uInt16 nY = pCtrlEntry->nY;
+ sal_uInt16 nX = pCtrlEntry->nX;
DBG_ASSERT(nY< nRows,"GoLeftRight:Bad column");
DBG_ASSERT(nX< nCols,"GoLeftRight:Bad row");
// Nachbar auf gleicher Zeile ?
if( bRight )
pResult = SearchRow(
- nY, nX, sal::static_int_cast< USHORT >(nCols-1), nX, TRUE, TRUE );
+ nY, nX, sal::static_int_cast< sal_uInt16 >(nCols-1), nX, sal_True, sal_True );
else
- pResult = SearchRow( nY, nX ,0, nX, FALSE, TRUE );
+ pResult = SearchRow( nY, nX ,0, nX, sal_False, sal_True );
if( pResult )
return pResult;
@@ -328,11 +328,11 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoLeftRight( SvxIconChoiceCtrlEntry* pCt
nLastCol = -1; // 0-1
}
- USHORT nRowMin = nY;
- USHORT nRowMax = nY;
+ sal_uInt16 nRowMin = nY;
+ sal_uInt16 nRowMax = nY;
do
{
- SvxIconChoiceCtrlEntry* pEntry = SearchCol((USHORT)nCurCol,nRowMin,nRowMax,nY,TRUE, FALSE);
+ SvxIconChoiceCtrlEntry* pEntry = SearchCol((sal_uInt16)nCurCol,nRowMin,nRowMax,nY,sal_True, sal_False);
if( pEntry )
return pEntry;
if( nRowMin )
@@ -344,7 +344,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoLeftRight( SvxIconChoiceCtrlEntry* pCt
return 0;
}
-SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoPageUpDown( SvxIconChoiceCtrlEntry* pStart, BOOL bDown)
+SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoPageUpDown( SvxIconChoiceCtrlEntry* pStart, sal_Bool bDown)
{
if( pView->IsAutoArrange() && !(pView->nWinBits & WB_ALIGN_TOP) )
{
@@ -366,7 +366,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoPageUpDown( SvxIconChoiceCtrlEntry* pS
nNewPos = 0;
}
if( nPos != nNewPos )
- return (SvxIconChoiceCtrlEntry*)pView->aEntries.GetObject( (ULONG)nNewPos );
+ return (SvxIconChoiceCtrlEntry*)pView->aEntries.GetObject( (sal_uLong)nNewPos );
return 0;
}
long nOpt = pView->GetEntryBoundRect( pStart ).Top();
@@ -404,11 +404,11 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoPageUpDown( SvxIconChoiceCtrlEntry* pS
return 0;
}
-SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoUpDown( SvxIconChoiceCtrlEntry* pCtrlEntry, BOOL bDown)
+SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoUpDown( SvxIconChoiceCtrlEntry* pCtrlEntry, sal_Bool bDown)
{
if( pView->IsAutoArrange() && !(pView->nWinBits & WB_ALIGN_TOP) )
{
- ULONG nPos = pView->GetEntryListPos( pCtrlEntry );
+ sal_uLong nPos = pView->GetEntryListPos( pCtrlEntry );
if( bDown && nPos < (pView->aEntries.Count() - 1) )
return (SvxIconChoiceCtrlEntry*)pView->aEntries.GetObject( nPos + 1 );
else if( !bDown && nPos > 0 )
@@ -419,17 +419,17 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoUpDown( SvxIconChoiceCtrlEntry* pCtrlE
SvxIconChoiceCtrlEntry* pResult;
pCurEntry = pCtrlEntry;
Create();
- USHORT nY = pCtrlEntry->nY;
- USHORT nX = pCtrlEntry->nX;
+ sal_uInt16 nY = pCtrlEntry->nY;
+ sal_uInt16 nX = pCtrlEntry->nX;
DBG_ASSERT(nY<nRows,"GoUpDown:Bad column");
DBG_ASSERT(nX<nCols,"GoUpDown:Bad row");
// Nachbar in gleicher Spalte ?
if( bDown )
pResult = SearchCol(
- nX, nY, sal::static_int_cast< USHORT >(nRows-1), nY, TRUE, TRUE );
+ nX, nY, sal::static_int_cast< sal_uInt16 >(nRows-1), nY, sal_True, sal_True );
else
- pResult = SearchCol( nX, nY ,0, nY, FALSE, TRUE );
+ pResult = SearchCol( nX, nY ,0, nY, sal_False, sal_True );
if( pResult )
return pResult;
@@ -447,11 +447,11 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoUpDown( SvxIconChoiceCtrlEntry* pCtrlE
nLastRow = -1; // 0-1
}
- USHORT nColMin = nX;
- USHORT nColMax = nX;
+ sal_uInt16 nColMin = nX;
+ sal_uInt16 nColMax = nX;
do
{
- SvxIconChoiceCtrlEntry* pEntry = SearchRow((USHORT)nCurRow,nColMin,nColMax,nX,TRUE, FALSE);
+ SvxIconChoiceCtrlEntry* pEntry = SearchRow((sal_uInt16)nCurRow,nColMin,nColMax,nX,sal_True, sal_False);
if( pEntry )
return pEntry;
if( nColMin )
@@ -493,23 +493,23 @@ void IcnCursor_Impl::CreateGridAjustData( SvPtrarr& rLists, SvxIconChoiceCtrlEnt
{
if( !pRefEntry )
{
- USHORT nGridRows = (USHORT)(pView->aVirtOutputSize.Height() / pView->nGridDY);
+ sal_uInt16 nGridRows = (sal_uInt16)(pView->aVirtOutputSize.Height() / pView->nGridDY);
nGridRows++; // wg. Abrundung!
if( !nGridRows )
return;
- for( USHORT nCurList = 0; nCurList < nGridRows; nCurList++ )
+ for( sal_uInt16 nCurList = 0; nCurList < nGridRows; nCurList++ )
{
SvPtrarr* pRow = new SvPtrarr;
rLists.Insert( (void*)pRow, nCurList );
}
- const ULONG nCount = pView->aEntries.Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ const sal_uLong nCount = pView->aEntries.Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)pView->aEntries.GetObject( nCur );
const Rectangle& rRect = pView->GetEntryBoundRect( pEntry );
short nY = (short)( ((rRect.Top()+rRect.Bottom())/2) / pView->nGridDY );
- USHORT nIns = GetSortListPos((SvPtrarr*)rLists[nY],rRect.Left(),FALSE);
+ sal_uInt16 nIns = GetSortListPos((SvPtrarr*)rLists[nY],rRect.Left(),sal_False);
((SvPtrarr*)rLists[ nY ])->Insert( pEntry, nIns );
}
}
@@ -522,8 +522,8 @@ void IcnCursor_Impl::CreateGridAjustData( SvPtrarr& rLists, SvxIconChoiceCtrlEnt
short nRefRow = (short)( ((rRefRect.Top()+rRefRect.Bottom())/2) / pView->nGridDY );
SvPtrarr* pRow = new SvPtrarr;
rLists.Insert( (void*)pRow, 0 );
- ULONG nCount = pView->aEntries.Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ sal_uLong nCount = pView->aEntries.Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)pView->aEntries.GetObject( nCur );
Rectangle rRect( pView->CalcBmpRect(pEntry) );
@@ -531,7 +531,7 @@ void IcnCursor_Impl::CreateGridAjustData( SvPtrarr& rLists, SvxIconChoiceCtrlEnt
short nY = (short)( ((rRect.Top()+rRect.Bottom())/2) / pView->nGridDY );
if( nY == nRefRow )
{
- USHORT nIns = GetSortListPos( pRow, rRect.Left(), FALSE );
+ sal_uInt16 nIns = GetSortListPos( pRow, rRect.Left(), sal_False );
pRow->Insert( pEntry, nIns );
}
}
@@ -541,8 +541,8 @@ void IcnCursor_Impl::CreateGridAjustData( SvPtrarr& rLists, SvxIconChoiceCtrlEnt
//static
void IcnCursor_Impl::DestroyGridAdjustData( SvPtrarr& rLists )
{
- const USHORT nCount = rLists.Count();
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ const sal_uInt16 nCount = rLists.Count();
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
SvPtrarr* pArr = (SvPtrarr*)rLists[ nCur ];
delete pArr;
@@ -569,16 +569,16 @@ void IcnGridMap_Impl::Expand()
Create_Impl();
else
{
- USHORT nNewGridRows = _nGridRows;
- USHORT nNewGridCols = _nGridCols;
+ sal_uInt16 nNewGridRows = _nGridRows;
+ sal_uInt16 nNewGridCols = _nGridCols;
if( _pView->nWinBits & WB_ALIGN_TOP )
nNewGridRows += 50;
else
nNewGridCols += 50;
- BOOL* pNewGridMap = new BOOL[nNewGridRows*nNewGridCols];
- memset( pNewGridMap, 0, nNewGridRows * nNewGridCols * sizeof(BOOL) );
- memcpy( pNewGridMap, _pGridMap, _nGridRows * _nGridCols * sizeof(BOOL) );
+ sal_Bool* pNewGridMap = new sal_Bool[nNewGridRows*nNewGridCols];
+ memset( pNewGridMap, 0, nNewGridRows * nNewGridCols * sizeof(sal_Bool) );
+ memcpy( pNewGridMap, _pGridMap, _nGridRows * _nGridCols * sizeof(sal_Bool) );
delete[] _pGridMap;
_pGridMap = pNewGridMap;
_nGridRows = nNewGridRows;
@@ -597,15 +597,15 @@ void IcnGridMap_Impl::Create_Impl()
else
_nGridCols += 50;
- _pGridMap = new BOOL[ _nGridRows * _nGridCols];
+ _pGridMap = new sal_Bool[ _nGridRows * _nGridCols];
memset( (void*)_pGridMap, 0, _nGridRows * _nGridCols );
- const ULONG nCount = _pView->aEntries.Count();
- for( ULONG nCur=0; nCur < nCount; nCur++ )
+ const sal_uLong nCount = _pView->aEntries.Count();
+ for( sal_uLong nCur=0; nCur < nCount; nCur++ )
OccupyGrids( (SvxIconChoiceCtrlEntry*)_pView->aEntries.GetObject( nCur ));
}
-void IcnGridMap_Impl::GetMinMapSize( USHORT& rDX, USHORT& rDY ) const
+void IcnGridMap_Impl::GetMinMapSize( sal_uInt16& rDX, sal_uInt16& rDY ) const
{
long nX, nY;
if( _pView->nWinBits & WB_ALIGN_TOP )
@@ -643,11 +643,11 @@ void IcnGridMap_Impl::GetMinMapSize( USHORT& rDX, USHORT& rDY ) const
if( !nDY )
nDY++;
- rDX = (USHORT)nDX;
- rDY = (USHORT)nDY;
+ rDX = (sal_uInt16)nDX;
+ rDY = (sal_uInt16)nDY;
}
-GridId IcnGridMap_Impl::GetGrid( USHORT nGridX, USHORT nGridY )
+GridId IcnGridMap_Impl::GetGrid( sal_uInt16 nGridX, sal_uInt16 nGridY )
{
Create();
if( _pView->nWinBits & WB_ALIGN_TOP )
@@ -656,7 +656,7 @@ GridId IcnGridMap_Impl::GetGrid( USHORT nGridX, USHORT nGridY )
return nGridY + ( nGridX * _nGridRows );
}
-GridId IcnGridMap_Impl::GetGrid( const Point& rDocPos, BOOL* pbClipped )
+GridId IcnGridMap_Impl::GetGrid( const Point& rDocPos, sal_Bool* pbClipped )
{
Create();
@@ -666,28 +666,28 @@ GridId IcnGridMap_Impl::GetGrid( const Point& rDocPos, BOOL* pbClipped )
nY -= TBOFFS_WINBORDER;
nX /= _pView->nGridDX;
nY /= _pView->nGridDY;
- BOOL bClipped = FALSE;
+ sal_Bool bClipped = sal_False;
if( nX >= _nGridCols )
{
nX = _nGridCols - 1;
- bClipped = TRUE;
+ bClipped = sal_True;
}
if( nY >= _nGridRows )
{
nY = _nGridRows - 1;
- bClipped = TRUE;
+ bClipped = sal_True;
}
- GridId nId = GetGrid( (USHORT)nX, (USHORT)nY );
+ GridId nId = GetGrid( (sal_uInt16)nX, (sal_uInt16)nY );
if( pbClipped )
*pbClipped = bClipped;
- DBG_ASSERT(nId <(ULONG)(_nGridCols*_nGridRows),"GetGrid failed");
+ DBG_ASSERT(nId <(sal_uLong)(_nGridCols*_nGridRows),"GetGrid failed");
return nId;
}
Rectangle IcnGridMap_Impl::GetGridRect( GridId nId )
{
Create();
- USHORT nGridX, nGridY;
+ sal_uInt16 nGridX, nGridY;
GetGridCoord( nId, nGridX, nGridY );
const long nLeft = nGridX * _pView->nGridDX+ LROFFS_WINBORDER;
const long nTop = nGridY * _pView->nGridDY + TBOFFS_WINBORDER;
@@ -697,28 +697,28 @@ Rectangle IcnGridMap_Impl::GetGridRect( GridId nId )
nTop + _pView->nGridDY );
}
-GridId IcnGridMap_Impl::GetUnoccupiedGrid( BOOL bOccupyFound )
+GridId IcnGridMap_Impl::GetUnoccupiedGrid( sal_Bool bOccupyFound )
{
Create();
- ULONG nStart = 0;
- BOOL bExpanded = FALSE;
+ sal_uLong nStart = 0;
+ sal_Bool bExpanded = sal_False;
while( 1 )
{
- const ULONG nCount = (USHORT)(_nGridCols * _nGridRows);
- for( ULONG nCur = nStart; nCur < nCount; nCur++ )
+ const sal_uLong nCount = (sal_uInt16)(_nGridCols * _nGridRows);
+ for( sal_uLong nCur = nStart; nCur < nCount; nCur++ )
{
if( !_pGridMap[ nCur ] )
{
if( bOccupyFound )
- _pGridMap[ nCur ] = TRUE;
+ _pGridMap[ nCur ] = sal_True;
return (GridId)nCur;
}
}
DBG_ASSERT(!bExpanded,"ExpandGrid failed");
if( bExpanded )
return 0; // prevent never ending loop
- bExpanded = TRUE;
+ bExpanded = sal_True;
Expand();
nStart = nCount;
}
@@ -729,7 +729,7 @@ GridId IcnGridMap_Impl::GetUnoccupiedGrid( BOOL bOccupyFound )
// Bounding-Rect, kann aber zu kleinen Ueberlappungen fuehren
#define OCCUPY_CENTER
-void IcnGridMap_Impl::OccupyGrids( const SvxIconChoiceCtrlEntry* pEntry, BOOL bOccupy )
+void IcnGridMap_Impl::OccupyGrids( const SvxIconChoiceCtrlEntry* pEntry, sal_Bool bOccupy )
{
if( !_pGridMap || !_pView->IsBoundingRectValid( pEntry->aRect ))
return;
@@ -741,7 +741,7 @@ void IcnGridMap_Impl::OccupyGrids( const SvxIconChoiceCtrlEntry* pEntry, BOOL bO
}
-void IcnGridMap_Impl::OccupyGrids( const Rectangle& rRect, BOOL bUsed )
+void IcnGridMap_Impl::OccupyGrids( const Rectangle& rRect, sal_Bool bUsed )
{
if( !_pGridMap )
return;
@@ -755,17 +755,17 @@ void IcnGridMap_Impl::OccupyGrids( const Rectangle& rRect, BOOL bUsed )
else
_aLastOccupiedGrid.SetEmpty();
- BOOL bTopLeftClipped, bBottomRightClipped;
+ sal_Bool bTopLeftClipped, bBottomRightClipped;
GridId nIdTL = GetGrid( rRect.TopLeft(), &bTopLeftClipped );
GridId nIdBR = GetGrid( rRect.BottomRight(), &bBottomRightClipped );
if( bTopLeftClipped && bBottomRightClipped )
return;
- USHORT nX1,nX2,nY1,nY2;
+ sal_uInt16 nX1,nX2,nY1,nY2;
GetGridCoord( nIdTL, nX1, nY1 );
GetGridCoord( nIdBR, nX2, nY2 );
- USHORT nTemp;
+ sal_uInt16 nTemp;
if( nX1 > nX2 )
{
nTemp = nX1;
@@ -794,20 +794,20 @@ void IcnGridMap_Impl::Clear()
}
}
-ULONG IcnGridMap_Impl::GetGridCount( const Size& rSizePixel, USHORT nDX, USHORT nDY)
+sal_uLong IcnGridMap_Impl::GetGridCount( const Size& rSizePixel, sal_uInt16 nDX, sal_uInt16 nDY)
{
long ndx = (rSizePixel.Width() - LROFFS_WINBORDER) / nDX;
if( ndx < 0 ) ndx *= -1;
long ndy = (rSizePixel.Height() - TBOFFS_WINBORDER) / nDY;
if( ndy < 0 ) ndy *= -1;
- return (ULONG)(ndx * ndy);
+ return (sal_uLong)(ndx * ndy);
}
void IcnGridMap_Impl::OutputSizeChanged()
{
if( _pGridMap )
{
- USHORT nCols, nRows;
+ sal_uInt16 nCols, nRows;
GetMinMapSize( nCols, nRows );
if( _pView->nWinBits & WB_ALIGN_TOP )
{
@@ -829,18 +829,18 @@ void IcnGridMap_Impl::OutputSizeChanged()
// Independendly of the views alignment (TOP or LEFT) the gridmap
// should contain the data in a continues region, to make it possible
// to copy the whole block if the gridmap needs to be expanded.
-void IcnGridMap_Impl::GetGridCoord( GridId nId, USHORT& rGridX, USHORT& rGridY )
+void IcnGridMap_Impl::GetGridCoord( GridId nId, sal_uInt16& rGridX, sal_uInt16& rGridY )
{
Create();
if( _pView->nWinBits & WB_ALIGN_TOP )
{
- rGridX = (USHORT)(nId % _nGridCols);
- rGridY = (USHORT)(nId / _nGridCols);
+ rGridX = (sal_uInt16)(nId % _nGridCols);
+ rGridY = (sal_uInt16)(nId / _nGridCols);
}
else
{
- rGridX = (USHORT)(nId / _nGridRows);
- rGridY = (USHORT)(nId % _nGridRows);
+ rGridX = (sal_uInt16)(nId / _nGridRows);
+ rGridY = (sal_uInt16)(nId % _nGridRows);
}
}
diff --git a/svtools/source/contnr/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx
index 9d494e5c32db..8a94d3ff086b 100644
--- a/svtools/source/contnr/ivctrl.cxx
+++ b/svtools/source/contnr/ivctrl.cxx
@@ -41,7 +41,7 @@ using namespace ::com::sun::star::accessibility;
|
\*****************************************************************************/
-SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( const String& rText, const Image& rImage, USHORT _nFlags )
+SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( const String& rText, const Image& rImage, sal_uInt16 _nFlags )
{
aText = rText;
aImage = rImage;
@@ -54,7 +54,7 @@ SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( const String& rText, const Image
pflink = 0;
}
-SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( const String& rText, const Image& rImage, const Image& rImageHC, USHORT _nFlags )
+SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( const String& rText, const Image& rImage, const Image& rImageHC, sal_uInt16 _nFlags )
{
aText = rText;
aImage = rImage;
@@ -67,7 +67,7 @@ SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( const String& rText, const Image
pflink = 0;
}
-SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( USHORT _nFlags )
+SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( sal_uInt16 _nFlags )
{
pUserData = NULL;
@@ -77,7 +77,7 @@ SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( USHORT _nFlags )
pflink = 0;
}
-void SvxIconChoiceCtrlEntry::SetMoved( BOOL bMoved )
+void SvxIconChoiceCtrlEntry::SetMoved( sal_Bool bMoved )
{
if( bMoved )
nFlags |= ICNVIEW_FLAG_POS_MOVED;
@@ -85,7 +85,7 @@ void SvxIconChoiceCtrlEntry::SetMoved( BOOL bMoved )
nFlags &= ~ICNVIEW_FLAG_POS_MOVED;
}
-void SvxIconChoiceCtrlEntry::LockPos( BOOL bLock )
+void SvxIconChoiceCtrlEntry::LockPos( sal_Bool bLock )
{
if( bLock )
nFlags |= ICNVIEW_FLAG_POS_LOCKED;
@@ -130,7 +130,7 @@ SvtIconChoiceCtrl::SvtIconChoiceCtrl( Window* pParent, WinBits nWinStyle ) :
_pCurKeyEvent ( NULL ),
_pImp ( new SvxIconChoiceCtrl_Impl( this, nWinStyle ) ),
- _bAutoFontColor ( FALSE )
+ _bAutoFontColor ( sal_False )
{
SetLineColor();
@@ -145,7 +145,7 @@ SvtIconChoiceCtrl::SvtIconChoiceCtrl( Window* pParent, const ResId& rResId ) :
_pCurKeyEvent ( NULL ),
_pImp ( new SvxIconChoiceCtrl_Impl( this, WB_BORDER ) ),
- _bAutoFontColor ( FALSE )
+ _bAutoFontColor ( sal_False )
{
SetLineColor();
@@ -160,14 +160,14 @@ SvtIconChoiceCtrl::~SvtIconChoiceCtrl()
delete _pImp;
}
-SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( ULONG nPos, const Point* pPos, USHORT nFlags )
+SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( sal_uLong nPos, const Point* pPos, sal_uInt16 nFlags )
{
SvxIconChoiceCtrlEntry* pEntry = new SvxIconChoiceCtrlEntry( nFlags );
_pImp->InsertEntry( pEntry, nPos, pPos );
return pEntry;
}
-SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( const String& rText, const Image& rImage, ULONG nPos, const Point* pPos, USHORT nFlags )
+SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( const String& rText, const Image& rImage, sal_uLong nPos, const Point* pPos, sal_uInt16 nFlags )
{
SvxIconChoiceCtrlEntry* pEntry = new SvxIconChoiceCtrlEntry( rText, rImage, nFlags);
@@ -176,7 +176,7 @@ SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( const String& rText, con
return pEntry;
}
-SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( const String& rText, const Image& rImage, const Image& rImageHC, ULONG nPos, const Point* pPos, USHORT nFlags )
+SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( const String& rText, const Image& rImage, const Image& rImageHC, sal_uLong nPos, const Point* pPos, sal_uInt16 nFlags )
{
SvxIconChoiceCtrlEntry* pEntry = new SvxIconChoiceCtrlEntry( rText, rImage, rImageHC, nFlags);
@@ -185,37 +185,37 @@ SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( const String& rText, con
return pEntry;
}
-BOOL SvtIconChoiceCtrl::EditedEntry( SvxIconChoiceCtrlEntry*, const XubString&, BOOL )
+sal_Bool SvtIconChoiceCtrl::EditedEntry( SvxIconChoiceCtrlEntry*, const XubString&, sal_Bool )
{
- return TRUE;
+ return sal_True;
}
-BOOL SvtIconChoiceCtrl::EditingEntry( SvxIconChoiceCtrlEntry* )
+sal_Bool SvtIconChoiceCtrl::EditingEntry( SvxIconChoiceCtrlEntry* )
{
- return TRUE;
+ return sal_True;
}
void SvtIconChoiceCtrl::DrawEntryImage( SvxIconChoiceCtrlEntry* pEntry, const Point& rPos, OutputDevice& rDev )
{
rDev.DrawImage( rPos, GetSettings().GetStyleSettings().GetHighContrastMode() ? pEntry->GetImageHC() : pEntry->GetImage() );
}
-String SvtIconChoiceCtrl::GetEntryText( SvxIconChoiceCtrlEntry* pEntry, BOOL )
+String SvtIconChoiceCtrl::GetEntryText( SvxIconChoiceCtrlEntry* pEntry, sal_Bool )
{
return pEntry->GetText();
}
-BOOL SvtIconChoiceCtrl::HasBackground() const
+sal_Bool SvtIconChoiceCtrl::HasBackground() const
{
- return FALSE;
+ return sal_False;
}
-BOOL SvtIconChoiceCtrl::HasFont() const
+sal_Bool SvtIconChoiceCtrl::HasFont() const
{
- return FALSE;
+ return sal_False;
}
-BOOL SvtIconChoiceCtrl::HasFontTextColor() const
+sal_Bool SvtIconChoiceCtrl::HasFontTextColor() const
{
- return TRUE;
+ return sal_True;
}
-BOOL SvtIconChoiceCtrl::HasFontFillColor() const
+sal_Bool SvtIconChoiceCtrl::HasFontFillColor() const
{
- return TRUE;
+ return sal_True;
}
void SvtIconChoiceCtrl::Paint( const Rectangle& rRect )
@@ -247,7 +247,7 @@ void SvtIconChoiceCtrl::ArrangeIcons()
Size aFullSize;
Rectangle aEntryRect;
- for ( ULONG i = 0; i < GetEntryCount(); i++ )
+ for ( sal_uLong i = 0; i < GetEntryCount(); i++ )
{
SvxIconChoiceCtrlEntry* pEntry = GetEntry ( i );
aEntryRect = _pImp->GetEntryBoundRect ( pEntry );
@@ -255,14 +255,14 @@ void SvtIconChoiceCtrl::ArrangeIcons()
aFullSize.setWidth ( aFullSize.getWidth()+aEntryRect.GetWidth() );
}
- _pImp->Arrange ( FALSE, aFullSize.getWidth() );
+ _pImp->Arrange ( sal_False, aFullSize.getWidth() );
}
else if ( GetStyle() & WB_ALIGN_LEFT )
{
Size aFullSize;
Rectangle aEntryRect;
- for ( ULONG i = 0; i < GetEntryCount(); i++ )
+ for ( sal_uLong i = 0; i < GetEntryCount(); i++ )
{
SvxIconChoiceCtrlEntry* pEntry = GetEntry ( i );
aEntryRect = _pImp->GetEntryBoundRect ( pEntry );
@@ -270,13 +270,13 @@ void SvtIconChoiceCtrl::ArrangeIcons()
aFullSize.setHeight ( aFullSize.getHeight()+aEntryRect.GetHeight() );
}
- _pImp->Arrange ( FALSE, 0, aFullSize.getHeight() );
+ _pImp->Arrange ( sal_False, 0, aFullSize.getHeight() );
}
else
{
_pImp->Arrange();
}
- _pImp->Arrange( FALSE, 0, 1000 );
+ _pImp->Arrange( sal_False, 0, 1000 );
}
void SvtIconChoiceCtrl::Resize()
{
@@ -312,7 +312,7 @@ void SvtIconChoiceCtrl::GetFocus()
{
_pImp->GetFocus();
Control::GetFocus();
- ULONG nPos;
+ sal_uLong nPos;
SvxIconChoiceCtrlEntry* pSelectedEntry = GetSelectedEntry ( nPos );
if ( pSelectedEntry )
_pImp->CallEventListeners( VCLEVENT_LISTBOX_SELECT, pSelectedEntry );
@@ -324,7 +324,7 @@ void SvtIconChoiceCtrl::LoseFocus()
Control::LoseFocus();
}
-void SvtIconChoiceCtrl::SetUpdateMode( BOOL bUpdate )
+void SvtIconChoiceCtrl::SetUpdateMode( sal_Bool bUpdate )
{
Control::SetUpdateMode( bUpdate );
_pImp->SetUpdateMode( bUpdate );
@@ -346,7 +346,7 @@ void SvtIconChoiceCtrl::SetPointFont( const Font& rFont )
_pImp->FontModified();
}
}
-SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetEntry( const Point& rPixPos, BOOL bHit ) const
+SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetEntry( const Point& rPixPos, sal_Bool bHit ) const
{
Point aPos( rPixPos );
aPos -= GetMapMode().GetOrigin();
@@ -377,25 +377,25 @@ SvxIconChoiceCtrlTextMode SvtIconChoiceCtrl::GetEntryTextMode( const SvxIconChoi
return _pImp->GetEntryTextModeSmart( pEntry );
}
-SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetNextEntry( const Point& rPixPos, SvxIconChoiceCtrlEntry* pCurEntry, BOOL ) const
+SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetNextEntry( const Point& rPixPos, SvxIconChoiceCtrlEntry* pCurEntry, sal_Bool ) const
{
Point aPos( rPixPos );
aPos -= GetMapMode().GetOrigin();
return ((SvtIconChoiceCtrl*)this)->_pImp->GetNextEntry( aPos, pCurEntry );
}
-SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetPrevEntry( const Point& rPixPos, SvxIconChoiceCtrlEntry* pCurEntry, BOOL ) const
+SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetPrevEntry( const Point& rPixPos, SvxIconChoiceCtrlEntry* pCurEntry, sal_Bool ) const
{
Point aPos( rPixPos );
aPos -= GetMapMode().GetOrigin();
return ((SvtIconChoiceCtrl*)this)->_pImp->GetPrevEntry( aPos, pCurEntry );
}
-ULONG SvtIconChoiceCtrl::GetEntryCount() const
+sal_uLong SvtIconChoiceCtrl::GetEntryCount() const
{
return _pImp->GetEntryCount();
}
-SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetEntry( ULONG nPos ) const
+SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetEntry( sal_uLong nPos ) const
{
return _pImp->GetEntry( nPos );
}
@@ -415,30 +415,30 @@ void SvtIconChoiceCtrl::RemoveEntry( SvxIconChoiceCtrlEntry* pEntry )
_pImp->RemoveEntry( pEntry );
}
-SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetSelectedEntry( ULONG& rPos ) const
+SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetSelectedEntry( sal_uLong& rPos ) const
{
return _pImp->GetFirstSelectedEntry( rPos );
}
void SvtIconChoiceCtrl::ClickIcon()
{
- ULONG nPos;
+ sal_uLong nPos;
GetSelectedEntry ( nPos );
_aClickIconHdl.Call( this );
}
-BOOL SvtIconChoiceCtrl::IsEntryEditing() const
+sal_Bool SvtIconChoiceCtrl::IsEntryEditing() const
{
return _pImp->IsEntryEditing();
}
-BOOL SvtIconChoiceCtrl::SetChoiceWithCursor ( BOOL bDo )
+sal_Bool SvtIconChoiceCtrl::SetChoiceWithCursor ( sal_Bool bDo )
{
return _pImp->SetChoiceWithCursor (bDo);
}
void SvtIconChoiceCtrl::KeyInput( const KeyEvent& rKEvt )
{
- BOOL bKeyUsed = DoKeyInput( rKEvt );
+ sal_Bool bKeyUsed = DoKeyInput( rKEvt );
if ( !bKeyUsed )
{
_pCurKeyEvent = (KeyEvent*)&rKEvt;
@@ -446,17 +446,17 @@ void SvtIconChoiceCtrl::KeyInput( const KeyEvent& rKEvt )
_pCurKeyEvent = NULL;
}
}
-BOOL SvtIconChoiceCtrl::DoKeyInput( const KeyEvent& rKEvt )
+sal_Bool SvtIconChoiceCtrl::DoKeyInput( const KeyEvent& rKEvt )
{
// unter OS/2 bekommen wir auch beim Editieren Key-Up/Down
if( IsEntryEditing() )
- return TRUE;
+ return sal_True;
_pCurKeyEvent = (KeyEvent*)&rKEvt;
- BOOL bHandled = _pImp->KeyInput( rKEvt );
+ sal_Bool bHandled = _pImp->KeyInput( rKEvt );
_pCurKeyEvent = NULL;
return bHandled;
}
-ULONG SvtIconChoiceCtrl::GetEntryListPos( SvxIconChoiceCtrlEntry* pEntry ) const
+sal_uLong SvtIconChoiceCtrl::GetEntryListPos( SvxIconChoiceCtrlEntry* pEntry ) const
{
return _pImp->GetEntryListPos( pEntry );
}
@@ -561,7 +561,7 @@ void SvtIconChoiceCtrl::SetSelectionMode( SelectionMode eMode )
_pImp->SetSelectionMode( eMode );
}
-BOOL SvtIconChoiceCtrl::HandleShortCutKey( const KeyEvent& r )
+sal_Bool SvtIconChoiceCtrl::HandleShortCutKey( const KeyEvent& r )
{
return _pImp->HandleShortCutKey( r );
}
@@ -615,7 +615,7 @@ void SvtIconChoiceCtrl::SetNoSelection()
_pImp->SetNoSelection();
}
-void SvtIconChoiceCtrl::CallImplEventListeners(ULONG nEvent, void* pData)
+void SvtIconChoiceCtrl::CallImplEventListeners(sal_uLong nEvent, void* pData)
{
CallEventListeners(nEvent, pData);
}
diff --git a/svtools/source/contnr/svcontnr.src b/svtools/source/contnr/svcontnr.src
index bcd1e060664f..e0449fc3f644 100644
--- a/svtools/source/contnr/svcontnr.src
+++ b/svtools/source/contnr/svcontnr.src
@@ -74,30 +74,3 @@ String STR_SVT_ACC_EMPTY_FIELD
Text [ en-US ] = "Empty Field";
};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/svtools/source/contnr/svicnvw.cxx b/svtools/source/contnr/svicnvw.cxx
index 6fd0f5bf0c9c..72768dd01746 100644
--- a/svtools/source/contnr/svicnvw.cxx
+++ b/svtools/source/contnr/svicnvw.cxx
@@ -106,7 +106,7 @@ void SvIconView::DisconnectFromModel()
SvLBoxEntry* SvIconView::InsertEntry( const XubString& rText,
- SvLBoxEntry* pParent, BOOL bChildsOnDemand, ULONG nPos )
+ SvLBoxEntry* pParent, sal_Bool bChildsOnDemand, sal_uLong nPos )
{
SvLBoxEntry* pEntry = CreateEntry(
rText, aCollapsedEntryBmp, aExpandedEntryBmp );
@@ -122,7 +122,7 @@ SvLBoxEntry* SvIconView::InsertEntry( const XubString& rText,
SvLBoxEntry* SvIconView::InsertEntry( const XubString& rText,
const Image& rExpEntryBmp,
const Image& rCollEntryBmp,
- SvLBoxEntry* pParent, BOOL bChildsOnDemand, ULONG nPos)
+ SvLBoxEntry* pParent, sal_Bool bChildsOnDemand, sal_uLong nPos)
{
SvLBoxEntry* pEntry = CreateEntry(
rText, rCollEntryBmp, rExpEntryBmp );
@@ -218,7 +218,7 @@ SvLBoxEntry* SvIconView::CloneEntry( SvLBoxEntry* pSource )
}
-USHORT SvIconView::IsA()
+sal_uInt16 SvIconView::IsA()
{
return SV_LISTBOX_ID_ICONVIEW;
}
@@ -226,7 +226,7 @@ USHORT SvIconView::IsA()
void SvIconView::RequestingChilds( SvLBoxEntry* pParent )
{
if ( !pParent->HasChilds() )
- InsertEntry( String::CreateFromAscii("<dummy>"), pParent, FALSE, LIST_APPEND );
+ InsertEntry( String::CreateFromAscii("<dummy>"), pParent, sal_False, LIST_APPEND );
}
void __EXPORT SvIconView::Paint( const Rectangle& rRect )
@@ -256,7 +256,7 @@ void __EXPORT SvIconView::KeyInput( const KeyEvent& rKEvt )
return;
nImpFlags |= SVLBOX_IS_TRAVELSELECT;
- BOOL bKeyUsed = pImp->KeyInput( rKEvt );
+ sal_Bool bKeyUsed = pImp->KeyInput( rKEvt );
if ( !bKeyUsed )
SvLBox::KeyInput( rKEvt );
nImpFlags &= ~SVLBOX_IS_TRAVELSELECT;
@@ -280,7 +280,7 @@ void __EXPORT SvIconView::LoseFocus()
SvLBox::LoseFocus();
}
-void SvIconView::SetUpdateMode( BOOL bUpdate )
+void SvIconView::SetUpdateMode( sal_Bool bUpdate )
{
Control::SetUpdateMode( bUpdate );
if ( bUpdate )
@@ -319,7 +319,7 @@ void __EXPORT SvIconView::ModelHasInsertedTree( SvListEntry* pEntry )
}
void __EXPORT SvIconView::ModelIsMoving(SvListEntry* pSource,
- SvListEntry* /* pTargetParent */ , ULONG /* nChildPos */ )
+ SvListEntry* /* pTargetParent */ , sal_uLong /* nChildPos */ )
{
pImp->MovingEntry( (SvLBoxEntry*)pSource );
}
@@ -348,7 +348,7 @@ void __EXPORT SvIconView::ModelHasEntryInvalidated( SvListEntry* pEntry )
pImp->ModelHasEntryInvalidated( pEntry );
}
-void SvIconView::ShowTargetEmphasis( SvLBoxEntry* pEntry, BOOL bShow )
+void SvIconView::ShowTargetEmphasis( SvLBoxEntry* pEntry, sal_Bool bShow )
{
pImp->ShowTargetEmphasis( pEntry, bShow );
}
@@ -360,10 +360,10 @@ Point SvIconView::GetEntryPosition( SvLBoxEntry* pEntry ) const
void SvIconView::SetEntryPosition( SvLBoxEntry* pEntry, const Point& rPos)
{
- pImp->SetEntryPosition( pEntry, rPos, FALSE, TRUE );
+ pImp->SetEntryPosition( pEntry, rPos, sal_False, sal_True );
}
-void SvIconView::SetEntryPosition( SvLBoxEntry* pEntry, const Point& rPos, BOOL bAdjustAtGrid )
+void SvIconView::SetEntryPosition( SvLBoxEntry* pEntry, const Point& rPos, sal_Bool bAdjustAtGrid )
{
pImp->SetEntryPosition( pEntry, rPos, bAdjustAtGrid );
}
@@ -371,7 +371,7 @@ void SvIconView::SetEntryPosition( SvLBoxEntry* pEntry, const Point& rPos, BOOL
void SvIconView::SetFont( const Font& rFont )
{
Font aTempFont( rFont );
- aTempFont.SetTransparent( TRUE );
+ aTempFont.SetTransparent( sal_True );
SvLBox::SetFont( aTempFont );
RecalcViewData();
pImp->ChangedFont();
@@ -387,7 +387,7 @@ SvLBoxEntry* SvIconView::GetDropTarget( const Point& rPos )
return pImp->GetDropTarget( rPos );
}
-SvLBoxEntry* SvIconView::GetEntry( const Point& rPixPos, BOOL ) const
+SvLBoxEntry* SvIconView::GetEntry( const Point& rPixPos, sal_Bool ) const
{
Point aPos( rPixPos );
aPos -= GetMapMode().GetOrigin();
@@ -440,10 +440,10 @@ void SvIconView::SetSelectionMode( SelectionMode eSelectMode )
pImp->SetSelectionMode( eSelectMode );
}
-BOOL SvIconView::Select( SvLBoxEntry* pEntry, BOOL bSelect )
+sal_Bool SvIconView::Select( SvLBoxEntry* pEntry, sal_Bool bSelect )
{
EndEditing();
- BOOL bRetVal = SvListView::Select( pEntry, bSelect );
+ sal_Bool bRetVal = SvListView::Select( pEntry, bSelect );
if( bRetVal )
{
pImp->EntrySelected( pEntry, bSelect );
@@ -453,7 +453,7 @@ BOOL SvIconView::Select( SvLBoxEntry* pEntry, BOOL bSelect )
return bRetVal;
}
-void SvIconView::SelectAll( BOOL bSelect, BOOL )
+void SvIconView::SelectAll( sal_Bool bSelect, sal_Bool )
{
SvLBoxEntry* pEntry = pImp->GetCurParent();
pEntry = FirstChild( pEntry );
@@ -478,7 +478,7 @@ SvLBoxEntry* SvIconView::GetCurEntry() const
void SvIconView::Arrange()
{
#ifdef DBG_UTIL
- USHORT n=1;
+ sal_uInt16 n=1;
if( n == 1 && n-1 == 0 )
{
pImp->Arrange();
@@ -498,20 +498,20 @@ void SvIconView::SetSpaceBetweenEntries( long nX, long nY )
pImp->SetSpaceBetweenEntries( nX, nY );
}
-BOOL SvIconView::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos )
+sal_Bool SvIconView::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+ SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos )
{
return pImp->NotifyMoving(pTarget,pEntry,rpNewParent,rNewChildPos);
}
-BOOL SvIconView::NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos )
+sal_Bool SvIconView::NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+ SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos )
{
return pImp->NotifyCopying(pTarget,pEntry,rpNewParent,rNewChildPos);
}
-void SvIconView::EnableInplaceEditing( BOOL bEnable )
+void SvIconView::EnableInplaceEditing( sal_Bool bEnable )
{
SvLBox::EnableInplaceEditing( bEnable );
}
@@ -524,7 +524,7 @@ void SvIconView::EditingRequest( SvLBoxEntry* pEntry, SvLBoxItem* pItem,
Selection aSel( SELECTION_MIN, SELECTION_MAX );
if ( EditingEntry( pEntry, aSel ) )
{
- SelectAll( FALSE );
+ SelectAll( sal_False );
EditItemText( pEntry, (SvLBoxString*)pItem, aSel );
}
}
@@ -537,7 +537,7 @@ void SvIconView::EditItemText( SvLBoxEntry* pEntry, SvLBoxItem* pItem,
DBG_ASSERT(pEntry&&pItem,"EditItemText:Params?");
pCurEdEntry = pEntry;
pCurEdItem = pItem;
- Rectangle aRect( pImp->CalcTextRect( pEntry, (SvLBoxString*)pItem,0,TRUE ));
+ Rectangle aRect( pImp->CalcTextRect( pEntry, (SvLBoxString*)pItem,0,sal_True ));
aRect.Bottom() += 4;
pImp->MakeVisible( aRect ); // vor der Umrechnung in Pixel-Koord. rufen!
@@ -564,7 +564,7 @@ void SvIconView::EditItemText( SvLBoxEntry* pEntry, SvLBoxItem* pItem,
#endif
#endif // OS2
- EditText( ((SvLBoxString*)pItem)->GetText(), aRect, rSel, TRUE );
+ EditText( ((SvLBoxString*)pItem)->GetText(), aRect, rSel, sal_True );
}
void SvIconView::EditEntry( SvLBoxEntry* pEntry )
@@ -579,7 +579,7 @@ void SvIconView::EditEntry( SvLBoxEntry* pEntry )
Selection aSel( SELECTION_MIN, SELECTION_MAX );
if( EditingEntry( pEntry, aSel ) )
{
- SelectAll( FALSE );
+ SelectAll( sal_False );
EditItemText( pEntry, pItem, aSel );
}
}
@@ -599,14 +599,14 @@ void SvIconView::EditedText( const XubString& rStr )
}
-BOOL SvIconView::EditingEntry( SvLBoxEntry*, Selection& )
+sal_Bool SvIconView::EditingEntry( SvLBoxEntry*, Selection& )
{
- return TRUE;
+ return sal_True;
}
-BOOL SvIconView::EditedEntry( SvLBoxEntry*, const XubString& )
+sal_Bool SvIconView::EditedEntry( SvLBoxEntry*, const XubString& )
{
- return TRUE;
+ return sal_True;
}
@@ -659,9 +659,9 @@ Region SvIconView::GetDragRegion() const
return aRegion;
}
-ULONG SvIconView::GetSelectionCount() const
+sal_uLong SvIconView::GetSelectionCount() const
{
- return (ULONG)(pImp->GetSelectionCount());
+ return (sal_uLong)(pImp->GetSelectionCount());
}
void SvIconView::SetGrid( long nDX, long nDY )
@@ -669,18 +669,18 @@ void SvIconView::SetGrid( long nDX, long nDY )
pImp->SetGrid( nDX, nDY );
}
-void SvIconView::ModelNotification( USHORT nActionId, SvListEntry* pEntry1,
- SvListEntry* pEntry2, ULONG nPos )
+void SvIconView::ModelNotification( sal_uInt16 nActionId, SvListEntry* pEntry1,
+ SvListEntry* pEntry2, sal_uLong nPos )
{
SvLBox::ModelNotification( nActionId, pEntry1, pEntry2, nPos );
switch( nActionId )
{
case LISTACTION_RESORTING:
- SetUpdateMode( FALSE );
+ SetUpdateMode( sal_False );
break;
case LISTACTION_RESORTED:
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
Arrange();
break;
@@ -692,9 +692,9 @@ void SvIconView::ModelNotification( USHORT nActionId, SvListEntry* pEntry1,
}
-void SvIconView::Scroll( long nDeltaX, long nDeltaY, USHORT )
+void SvIconView::Scroll( long nDeltaX, long nDeltaY, sal_uInt16 )
{
- pImp->Scroll( nDeltaX, nDeltaY, FALSE );
+ pImp->Scroll( nDeltaX, nDeltaY, sal_False );
}
void SvIconView::PrepareCommandEvent( const CommandEvent& rCEvt )
@@ -705,7 +705,7 @@ void SvIconView::PrepareCommandEvent( const CommandEvent& rCEvt )
void SvIconView::StartDrag( sal_Int8 nAction, const Point& rPos )
{
pImp->SttDrag( rPos );
- SvLBoxEntry* pEntry = GetEntry( rPos, TRUE );
+ SvLBoxEntry* pEntry = GetEntry( rPos, sal_True );
pImp->mpViewData = pEntry;
SvLBox::StartDrag( nAction, rPos );
}
@@ -751,14 +751,14 @@ void SvIconView::HideShowDDIcon( SvLBoxEntry* pRefEntry, const Point& rPos )
pImp->HideShowDDIcon( pRefEntry, rPos );
}
-void SvIconView::SelectRect( const Rectangle& rRect, BOOL bAdd,
+void SvIconView::SelectRect( const Rectangle& rRect, sal_Bool bAdd,
SvPtrarr* pRects, short nOffs )
{
pImp->SelectRect( rRect, bAdd, pRects, nOffs );
}
void SvIconView::CalcScrollOffsets( const Point& rRefPosPixel, long& rX, long& rY,
- BOOL b, USHORT nBorderWidth )
+ sal_Bool b, sal_uInt16 nBorderWidth )
{
pImp->CalcScrollOffsets( rRefPosPixel, rX, rY, b, nBorderWidth );
}
@@ -782,7 +782,7 @@ void SvIconView::AdjustAtGrid( SvLBoxEntry* pEntry )
pImp->AdjustAtGrid( pEntry );
}
-void SvIconView::LockEntryPos( SvLBoxEntry* pEntry, BOOL bLock )
+void SvIconView::LockEntryPos( SvLBoxEntry* pEntry, sal_Bool bLock )
{
SvIcnVwDataEntry* pViewData = (SvIcnVwDataEntry*)GetViewData( pEntry );
if( bLock )
@@ -791,7 +791,7 @@ void SvIconView::LockEntryPos( SvLBoxEntry* pEntry, BOOL bLock )
pViewData->ClearVwFlags( ICNVW_FLAG_POS_LOCKED );
}
-BOOL SvIconView::IsEntryPosLocked( const SvLBoxEntry* pEntry ) const
+sal_Bool SvIconView::IsEntryPosLocked( const SvLBoxEntry* pEntry ) const
{
const SvIcnVwDataEntry* pViewData = (const SvIcnVwDataEntry*)GetViewData( (SvListEntry*)pEntry );
return pViewData->IsEntryPosLocked();
@@ -807,14 +807,14 @@ SvIconViewTextMode SvIconView::GetTextMode( const SvLBoxEntry* pEntry ) const
return pImp->GetTextMode( pEntry );
}
-SvLBoxEntry* SvIconView::GetNextEntry( const Point& rPixPos, SvLBoxEntry* pCurEntry, BOOL ) const
+SvLBoxEntry* SvIconView::GetNextEntry( const Point& rPixPos, SvLBoxEntry* pCurEntry, sal_Bool ) const
{
Point aPos( rPixPos );
aPos -= GetMapMode().GetOrigin();
return ((SvIconView*)this)->pImp->GetNextEntry( aPos, pCurEntry );
}
-SvLBoxEntry* SvIconView::GetPrevEntry( const Point& rPixPos, SvLBoxEntry* pCurEntry, BOOL ) const
+SvLBoxEntry* SvIconView::GetPrevEntry( const Point& rPixPos, SvLBoxEntry* pCurEntry, sal_Bool ) const
{
Point aPos( rPixPos );
aPos -= GetMapMode().GetOrigin();
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index 74c6bb163797..7d63304203cd 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -71,7 +71,7 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvLBoxTreeList* pLBTree, WinBits n
pView = pLBView;
pTree = pLBTree;
aSelEng.SetFunctionSet( (FunctionSet*)&aFctSet );
- aSelEng.ExpandSelectionOnMouseMove( FALSE );
+ aSelEng.ExpandSelectionOnMouseMove( sal_False );
SetStyle( nWinStyle );
SetSelectionMode( SINGLE_SELECTION );
SetDragDropMode( 0 );
@@ -97,7 +97,7 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvLBoxTreeList* pLBTree, WinBits n
nYoffsNodeBmp = 0;
nNodeBmpWidth = 0;
- bAsyncBeginDrag = FALSE;
+ bAsyncBeginDrag = sal_False;
aAsyncBeginDragTimer.SetTimeout( 0 );
aAsyncBeginDragTimer.SetTimeoutHdl( LINK(this,SvImpLBox,BeginDragHdl));
// Button-Animation in Listbox
@@ -115,11 +115,11 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvLBoxTreeList* pLBTree, WinBits n
pMostRightEntry = 0;
nCurUserEvent = 0xffffffff;
- bUpdateMode = TRUE;
- bInVScrollHdl = FALSE;
+ bUpdateMode = sal_True;
+ bInVScrollHdl = sal_False;
nFlags |= F_FILLING;
- bSubLstOpRet = bSubLstOpLR = bContextMenuHandling = bIsCellFocusEnabled = FALSE;
+ bSubLstOpRet = bSubLstOpLR = bContextMenuHandling = bIsCellFocusEnabled = sal_False;
}
SvImpLBox::~SvImpLBox()
@@ -163,7 +163,7 @@ short SvImpLBox::UpdateContextBmpWidthVector( SvLBoxEntry* pEntry, short nWidth
{
DBG_ASSERT( pView->pModel, "View and Model aren't valid!" );
- USHORT nDepth = pView->pModel->GetDepth( pEntry );
+ sal_uInt16 nDepth = pView->pModel->GetDepth( pEntry );
// initialize vector if necessary
std::vector< short >::size_type nSize = aContextBmpWidthVector.size();
while ( nDepth > nSize )
@@ -211,7 +211,7 @@ void SvImpLBox::UpdateContextBmpWidthVectorFromMovedEntry( SvLBoxEntry* pEntry )
void SvImpLBox::UpdateContextBmpWidthMax( SvLBoxEntry* pEntry )
{
- USHORT nDepth = pView->pModel->GetDepth( pEntry );
+ sal_uInt16 nDepth = pView->pModel->GetDepth( pEntry );
if( aContextBmpWidthVector.size() < 1 )
return;
short nWidth = aContextBmpWidthVector[ nDepth ];
@@ -246,7 +246,7 @@ void SvImpLBox::SetStyle( WinBits i_nWinStyle )
{
m_nStyle = i_nWinStyle;
if ( ( m_nStyle & WB_SIMPLEMODE) && ( aSelEng.GetSelectionMode() == MULTIPLE_SELECTION ) )
- aSelEng.AddAlways( TRUE );
+ aSelEng.AddAlways( sal_True );
}
void SvImpLBox::SetExtendedWindowBits( ExtendedWinBits _nBits )
@@ -333,11 +333,11 @@ IMPL_LINK( SvImpLBox, ScrollUpDownHdl, ScrollBar *, pScrollBar )
nFlags &= (~F_FILLING);
- bInVScrollHdl = TRUE;
+ bInVScrollHdl = sal_True;
if( pView->IsEditingActive() )
{
- pView->EndEditing( TRUE ); // Cancel
+ pView->EndEditing( sal_True ); // Cancel
pView->Update();
}
BeginScroll();
@@ -347,7 +347,7 @@ IMPL_LINK( SvImpLBox, ScrollUpDownHdl, ScrollBar *, pScrollBar )
if( nDelta == 1 )
CursorDown();
else
- PageDown( (USHORT) nDelta );
+ PageDown( (sal_uInt16) nDelta );
}
else
{
@@ -355,9 +355,9 @@ IMPL_LINK( SvImpLBox, ScrollUpDownHdl, ScrollBar *, pScrollBar )
if( nDelta == 1 )
CursorUp();
else
- PageUp( (USHORT) nDelta );
+ PageUp( (sal_uInt16) nDelta );
}
- bInVScrollHdl = FALSE;
+ bInVScrollHdl = sal_False;
return 0;
}
@@ -369,13 +369,13 @@ void SvImpLBox::CursorDown()
{
nFlags &= (~F_FILLING);
pView->NotifyScrolling( -1 );
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
pView->Update();
pStartEntry = pNextFirstToDraw;
Rectangle aArea( GetVisibleArea() );
pView->Scroll( 0, -(pView->GetEntryHeight()), aArea, SCROLL_NOCHILDREN );
pView->Update();
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
pView->NotifyScrolled();
}
}
@@ -388,31 +388,31 @@ void SvImpLBox::CursorUp()
nFlags &= (~F_FILLING);
long nEntryHeight = pView->GetEntryHeight();
pView->NotifyScrolling( 1 );
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
pView->Update();
pStartEntry = pPrevFirstToDraw;
Rectangle aArea( GetVisibleArea() );
aArea.Bottom() -= nEntryHeight;
pView->Scroll( 0, nEntryHeight, aArea, SCROLL_NOCHILDREN );
pView->Update();
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
pView->NotifyScrolled();
}
}
-void SvImpLBox::PageDown( USHORT nDelta )
+void SvImpLBox::PageDown( sal_uInt16 nDelta )
{
- USHORT nRealDelta = nDelta;
+ sal_uInt16 nRealDelta = nDelta;
if( !nDelta )
return;
SvLBoxEntry* pNext;
pNext = (SvLBoxEntry*)(pView->NextVisible( pStartEntry, nRealDelta ));
- if( (ULONG)pNext == (ULONG)pStartEntry )
+ if( (sal_uLong)pNext == (sal_uLong)pStartEntry )
return;
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
nFlags &= (~F_FILLING);
pView->Update();
@@ -436,21 +436,21 @@ void SvImpLBox::PageDown( USHORT nDelta )
pView->NotifyScrolled();
}
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
-void SvImpLBox::PageUp( USHORT nDelta )
+void SvImpLBox::PageUp( sal_uInt16 nDelta )
{
- USHORT nRealDelta = nDelta;
+ sal_uInt16 nRealDelta = nDelta;
if( !nDelta )
return;
SvLBoxEntry* pPrev = (SvLBoxEntry*)(pView->PrevVisible( pStartEntry, nRealDelta ));
- if( (ULONG)pPrev == (ULONG)pStartEntry )
+ if( (sal_uLong)pPrev == (sal_uLong)pStartEntry )
return;
nFlags &= (~F_FILLING);
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
pView->Update();
pStartEntry = pPrev;
@@ -470,10 +470,10 @@ void SvImpLBox::PageUp( USHORT nDelta )
pView->NotifyScrolled();
}
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
-void SvImpLBox::KeyUp( BOOL bPageUp, BOOL bNotifyScroll )
+void SvImpLBox::KeyUp( sal_Bool bPageUp, sal_Bool bNotifyScroll )
{
if( !aVerSBar.IsVisible() )
return;
@@ -507,7 +507,7 @@ void SvImpLBox::KeyUp( BOOL bPageUp, BOOL bNotifyScroll )
}
-void SvImpLBox::KeyDown( BOOL bPageDown, BOOL bNotifyScroll )
+void SvImpLBox::KeyDown( sal_Bool bPageDown, sal_Bool bNotifyScroll )
{
if( !aVerSBar.IsVisible() )
return;
@@ -582,15 +582,15 @@ void SvImpLBox::InvalidateEntry( SvLBoxEntry* pEntry )
}
if( !(nFlags & F_IN_PAINT ))
{
- BOOL bHasFocusRect = FALSE;
+ sal_Bool bHasFocusRect = sal_False;
if( pEntry==pCursor && pView->HasFocus() )
{
- bHasFocusRect = TRUE;
- ShowCursor( FALSE );
+ bHasFocusRect = sal_True;
+ ShowCursor( sal_False );
}
InvalidateEntry( GetEntryLine( pEntry ) );
if( bHasFocusRect )
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
}
@@ -615,7 +615,7 @@ void SvImpLBox::RecalcFocusRect()
// Setzt Cursor. Passt bei SingleSelection die Selektion an
//
-void SvImpLBox::SetCursor( SvLBoxEntry* pEntry, BOOL bForceNoSelect )
+void SvImpLBox::SetCursor( SvLBoxEntry* pEntry, sal_Bool bForceNoSelect )
{
SvViewDataEntry* pViewDataNewCur = 0;
if( pEntry )
@@ -638,18 +638,18 @@ void SvImpLBox::SetCursor( SvLBoxEntry* pEntry, BOOL bForceNoSelect )
SvLBoxEntry* pOldCursor = pCursor;
if( pCursor && pEntry != pCursor )
{
- pView->SetEntryFocus( pCursor, FALSE );
+ pView->SetEntryFocus( pCursor, sal_False );
if( bSimpleTravel )
- pView->Select( pCursor, FALSE );
+ pView->Select( pCursor, sal_False );
pView->HideFocus();
}
pCursor = pEntry;
if( pCursor )
{
- pViewDataNewCur->SetFocus( TRUE );
+ pViewDataNewCur->SetFocus( sal_True );
if(!bForceNoSelect && bSimpleTravel && !(nFlags & F_DESEL_ALL) && GetUpdateMode())
{
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
}
// Mehrfachselektion: Im Cursor-Move selektieren, wenn
// nicht im Add-Mode (Ctrl-F8)
@@ -658,11 +658,11 @@ void SvImpLBox::SetCursor( SvLBoxEntry* pEntry, BOOL bForceNoSelect )
!(nFlags & F_DESEL_ALL) && !aSelEng.IsAddMode() &&
!bForceNoSelect )
{
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
}
else
{
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
if( pAnchor )
@@ -676,7 +676,7 @@ void SvImpLBox::SetCursor( SvLBoxEntry* pEntry, BOOL bForceNoSelect )
pView->OnCurrentEntryChanged();
}
-void SvImpLBox::ShowCursor( BOOL bShow )
+void SvImpLBox::ShowCursor( sal_Bool bShow )
{
if( !bShow || !pCursor || !pView->HasFocus() )
{
@@ -701,8 +701,8 @@ void SvImpLBox::ShowCursor( BOOL bShow )
-void SvImpLBox::UpdateAll( BOOL bInvalidateCompleteView,
- BOOL bUpdateVerScrollBar )
+void SvImpLBox::UpdateAll( sal_Bool bInvalidateCompleteView,
+ sal_Bool bUpdateVerScrollBar )
{
if( bUpdateVerScrollBar )
FindMostRight(0);
@@ -711,8 +711,8 @@ void SvImpLBox::UpdateAll( BOOL bInvalidateCompleteView,
FillView();
ShowVerSBar();
if( bSimpleTravel && pCursor && pView->HasFocus() )
- pView->Select( pCursor, TRUE );
- ShowCursor( TRUE );
+ pView->Select( pCursor, sal_True );
+ ShowCursor( sal_True );
if( bInvalidateCompleteView )
pView->Invalidate();
else
@@ -726,7 +726,7 @@ IMPL_LINK_INLINE_START( SvImpLBox, ScrollLeftRightHdl, ScrollBar *, pScrollBar )
{
if( pView->IsEditingActive() )
{
- pView->EndEditing( TRUE ); // Cancel
+ pView->EndEditing( sal_True ); // Cancel
pView->Update();
}
pView->nFocusWidth = -1;
@@ -743,7 +743,7 @@ void SvImpLBox::KeyLeftRight( long nDelta )
BeginScroll();
nFlags &= (~F_FILLING);
pView->NotifyScrolling( 0 ); // 0 == horizontales Scrolling
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
// neuen Origin berechnen
long nPos = aHorSBar.GetThumbPos();
@@ -761,7 +761,7 @@ void SvImpLBox::KeyLeftRight( long nDelta )
else
pView->Invalidate();
RecalcFocusRect();
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
pView->NotifyScrolled();
}
@@ -780,8 +780,8 @@ SvLBoxEntry* SvImpLBox::GetClickedEntry( const Point& rPoint ) const
if( pView->GetEntryCount() == 0 || !pStartEntry || !pView->GetEntryHeight())
return 0;
- USHORT nClickedEntry = (USHORT)(rPoint.Y() / pView->GetEntryHeight() );
- USHORT nTemp = nClickedEntry;
+ sal_uInt16 nClickedEntry = (sal_uInt16)(rPoint.Y() / pView->GetEntryHeight() );
+ sal_uInt16 nTemp = nClickedEntry;
SvLBoxEntry* pEntry = (SvLBoxEntry*)(pView->NextVisible( pStartEntry, nTemp ));
return pEntry;
}
@@ -790,13 +790,13 @@ SvLBoxEntry* SvImpLBox::GetClickedEntry( const Point& rPoint ) const
// prueft, ob der Eintrag "richtig" getroffen wurde
// (Focusrect+ ContextBitmap bei TreeListBox)
//
-BOOL SvImpLBox::EntryReallyHit(SvLBoxEntry* pEntry,const Point& rPosPixel,long nLine)
+sal_Bool SvImpLBox::EntryReallyHit(SvLBoxEntry* pEntry,const Point& rPosPixel,long nLine)
{
- BOOL bRet;
+ sal_Bool bRet;
// bei "besonderen" Entries (mit CheckButtons usw.) sind wir
// nicht so pingelig
if( pEntry->ItemCount() >= 3 )
- return TRUE;
+ return sal_True;
Rectangle aRect( pView->GetFocusRect( pEntry, nLine ));
aRect.Right() = GetOutputSize().Width() - pView->GetMapMode().GetOrigin().X();
@@ -809,9 +809,9 @@ BOOL SvImpLBox::EntryReallyHit(SvLBoxEntry* pEntry,const Point& rPosPixel,long n
Point aPos( rPosPixel );
aPos -= pView->GetMapMode().GetOrigin();
if( aRect.IsInside( aPos ) )
- bRet = TRUE;
+ bRet = sal_True;
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
@@ -824,8 +824,8 @@ SvLBoxEntry* SvImpLBox::GetEntry( const Point& rPoint ) const
|| !pView->GetEntryHeight())
return 0;
- USHORT nClickedEntry = (USHORT)(rPoint.Y() / pView->GetEntryHeight() );
- USHORT nTemp = nClickedEntry;
+ sal_uInt16 nClickedEntry = (sal_uInt16)(rPoint.Y() / pView->GetEntryHeight() );
+ sal_uInt16 nTemp = nClickedEntry;
SvLBoxEntry* pEntry = (SvLBoxEntry*)(pView->NextVisible( pStartEntry, nTemp ));
if( nTemp != nClickedEntry )
pEntry = 0;
@@ -833,7 +833,7 @@ SvLBoxEntry* SvImpLBox::GetEntry( const Point& rPoint ) const
}
-SvLBoxEntry* SvImpLBox::MakePointVisible(const Point& rPoint,BOOL bNotifyScroll)
+SvLBoxEntry* SvImpLBox::MakePointVisible(const Point& rPoint,sal_Bool bNotifyScroll)
{
if( !pCursor )
return 0;
@@ -848,19 +848,19 @@ SvLBoxEntry* SvImpLBox::MakePointVisible(const Point& rPoint,BOOL bNotifyScroll)
pEntry = (SvLBoxEntry*)(pView->NextVisible( pCursor ));
if( pEntry && pEntry != pCursor )
- pView->SetEntryFocus( pCursor, FALSE );
+ pView->SetEntryFocus( pCursor, sal_False );
if( nY < 0 )
- KeyUp( FALSE, bNotifyScroll );
+ KeyUp( sal_False, bNotifyScroll );
else
- KeyDown( FALSE, bNotifyScroll );
+ KeyDown( sal_False, bNotifyScroll );
}
else
{
pEntry = GetClickedEntry( rPoint );
if( !pEntry )
{
- USHORT nSteps = 0xFFFF;
+ sal_uInt16 nSteps = 0xFFFF;
// LastVisible ist noch nicht implementiert!
pEntry = (SvLBoxEntry*)(pView->NextVisible( pStartEntry, nSteps ));
}
@@ -869,7 +869,7 @@ SvLBoxEntry* SvImpLBox::MakePointVisible(const Point& rPoint,BOOL bNotifyScroll)
if( pEntry != pCursor &&
aSelEng.GetSelectionMode() == SINGLE_SELECTION
)
- pView->Select( pCursor, FALSE );
+ pView->Select( pCursor, sal_False );
}
}
return pEntry;
@@ -897,11 +897,11 @@ void SvImpLBox::Paint( const Rectangle& rRect )
SvLBoxEntry* pFirst = pView->First();
if( pFirst != pStartEntry )
{
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
pStartEntry = pView->First();
aVerSBar.SetThumbPos( 0 );
StopUserEvent();
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
nCurUserEvent = Application::PostUserEvent(LINK(this,SvImpLBox,MyUserEvent),(void*)1);
return;
}
@@ -913,8 +913,8 @@ void SvImpLBox::Paint( const Rectangle& rRect )
}
#ifdef XX_OV
- ULONG nXAbsPos = (USHORT)pTree->GetAbsPos( pStartEntry );
- ULONG nXVisPos = pView->GetVisiblePos( pStartEntry );
+ sal_uLong nXAbsPos = (sal_uInt16)pTree->GetAbsPos( pStartEntry );
+ sal_uLong nXVisPos = pView->GetVisiblePos( pStartEntry );
SvLBoxString* pXStr = (SvLBoxString*)pStartEntry->GetFirstItem( SV_ITEM_ID_LBOXSTRING);
#endif
@@ -927,8 +927,8 @@ void SvImpLBox::Paint( const Rectangle& rRect )
long nEntryHeight = pView->GetEntryHeight();
// Bereich der zu zeichnenden Entries berechnen
- USHORT nStartLine = (USHORT)( rRect.Top() / nEntryHeight );
- USHORT nCount = (USHORT)( nRectHeight / nEntryHeight );
+ sal_uInt16 nStartLine = (sal_uInt16)( rRect.Top() / nEntryHeight );
+ sal_uInt16 nCount = (sal_uInt16)( nRectHeight / nEntryHeight );
nCount += 2; // keine Zeile vergessen
long nY = nStartLine * nEntryHeight;
@@ -948,10 +948,10 @@ void SvImpLBox::Paint( const Rectangle& rRect )
pView->SetClipRegion( aClipRegion );
- for( USHORT n=0; n< nCount && pEntry; n++ )
+ for( sal_uInt16 n=0; n< nCount && pEntry; n++ )
{
/*long nMaxRight=*/
- pView->PaintEntry1( pEntry, nY, 0xffff, TRUE );
+ pView->PaintEntry1( pEntry, nY, 0xffff, sal_True );
nY += nEntryHeight;
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
}
@@ -959,7 +959,7 @@ void SvImpLBox::Paint( const Rectangle& rRect )
if ( !pCursor && ( ( nExtendedWinBits & EWB_NO_AUTO_CURENTRY ) == 0 ) )
{
// do not select if multiselection or explicit set
- BOOL bNotSelect = ( aSelEng.GetSelectionMode() == MULTIPLE_SELECTION )
+ sal_Bool bNotSelect = ( aSelEng.GetSelectionMode() == MULTIPLE_SELECTION )
|| ( ( m_nStyle & WB_NOINITIALSELECTION ) == WB_NOINITIALSELECTION );
SetCursor( pStartEntry, bNotSelect );
}
@@ -975,12 +975,12 @@ void SvImpLBox::Paint( const Rectangle& rRect )
nFlags &= (~F_IN_PAINT);
}
-void SvImpLBox::MakeVisible( SvLBoxEntry* pEntry, BOOL bMoveToTop )
+void SvImpLBox::MakeVisible( SvLBoxEntry* pEntry, sal_Bool bMoveToTop )
{
if( !pEntry )
return;
- BOOL bInView = IsEntryInView( pEntry );
+ sal_Bool bInView = IsEntryInView( pEntry );
if( bInView && (!bMoveToTop || pStartEntry == pEntry) )
return; // ist schon sichtbar
@@ -997,7 +997,7 @@ void SvImpLBox::MakeVisible( SvLBoxEntry* pEntry, BOOL bMoveToTop )
if( !pView->IsExpanded( pParent ) )
{
#ifdef DBG_UTIL
- BOOL bRet =
+ sal_Bool bRet =
#endif
pView->Expand( pParent );
DBG_ASSERT(bRet,"Not expanded!");
@@ -1011,10 +1011,10 @@ void SvImpLBox::MakeVisible( SvLBoxEntry* pEntry, BOOL bMoveToTop )
}
pStartEntry = pEntry;
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
FillView();
aVerSBar.SetThumbPos( (long)(pView->GetVisiblePos( pStartEntry )) );
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
pView->Invalidate();
}
@@ -1030,21 +1030,21 @@ void SvImpLBox::RepaintSelectionItems()
if( nNodeBmpTabDistance == NODE_BMP_TABDIST_NOTVALID )
SetNodeBmpTabDistance();
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
long nEntryHeight = pView->GetEntryHeight();
- ULONG nCount = nVisibleCount;
+ sal_uLong nCount = nVisibleCount;
long nY = 0;
SvLBoxEntry* pEntry = pStartEntry;
- for( ULONG n=0; n< nCount && pEntry; n++ )
+ for( sal_uLong n=0; n< nCount && pEntry; n++ )
{
pView->PaintEntry1( pEntry, nY, 0xffff ); //wg. ItemsetBrowser SV_LBOXTAB_SHOW_SELECTION );
nY += nEntryHeight;
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
}
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
@@ -1080,7 +1080,7 @@ void SvImpLBox::DrawNet()
SvLBoxTab* pFirstDynamicTab = pView->GetFirstDynamicTab();
while( pTree->GetDepth( pEntry ) > 0 )
pEntry = pView->GetParent( pEntry );
- USHORT nOffs = (USHORT)(pView->GetVisiblePos( pStartEntry ) -
+ sal_uInt16 nOffs = (sal_uInt16)(pView->GetVisiblePos( pStartEntry ) -
pView->GetVisiblePos( pEntry ));
long nY = 0;
nY -= ( nOffs * nEntryHeight );
@@ -1095,12 +1095,12 @@ void SvImpLBox::DrawNet()
aCol = rStyleSettings.GetShadowColor();
pView->SetLineColor( aCol );
Point aPos1, aPos2;
- USHORT nDistance;
- ULONG nMax = nVisibleCount + nOffs + 1;
+ sal_uInt16 nDistance;
+ sal_uLong nMax = nVisibleCount + nOffs + 1;
const Image& rExpandedNodeBitmap = GetExpandedNodeBmp();
- for( ULONG n=0; n< nMax && pEntry; n++ )
+ for( sal_uLong n=0; n< nMax && pEntry; n++ )
{
if( pView->IsExpanded(pEntry) )
{
@@ -1116,7 +1116,7 @@ void SvImpLBox::DrawNet()
pChild = pView->FirstChild( pEntry );
DBG_ASSERT(pChild,"Child?");
pChild = pTree->LastSibling( pChild );
- nDistance = (USHORT)(pView->GetVisiblePos(pChild) -
+ nDistance = (sal_uInt16)(pView->GetVisiblePos(pChild) -
pView->GetVisiblePos(pEntry));
aPos2 = aPos1;
aPos2.Y() += nDistance * nEntryHeight;
@@ -1171,7 +1171,7 @@ static long GetOptSize( TabBar* pTabBar )
return pTabBar->CalcWindowSizePixel().Width();
}
-void SvImpLBox::PositionScrollBars( Size& rSize, USHORT nMask )
+void SvImpLBox::PositionScrollBars( Size& rSize, sal_uInt16 nMask )
{
long nOverlap = 0;
@@ -1229,19 +1229,19 @@ void SvImpLBox::PositionScrollBars( Size& rSize, USHORT nMask )
}
// nResult: Bit0 == VerSBar Bit1 == HorSBar
-USHORT SvImpLBox::AdjustScrollBars( Size& rSize )
+sal_uInt16 SvImpLBox::AdjustScrollBars( Size& rSize )
{
long nEntryHeight = pView->GetEntryHeight();
if( !nEntryHeight )
return 0;
- USHORT nResult = 0;
+ sal_uInt16 nResult = 0;
Size aOSize( pView->Control::GetOutputSizePixel() );
const WinBits nWindowStyle = pView->GetStyle();
- BOOL bVerSBar = ( nWindowStyle & WB_VSCROLL ) != 0;
- BOOL bHorBar = FALSE;
+ sal_Bool bVerSBar = ( nWindowStyle & WB_VSCROLL ) != 0;
+ sal_Bool bHorBar = sal_False;
long nMaxRight = aOSize.Width(); //GetOutputSize().Width();
Point aOrigin( pView->GetMapMode().GetOrigin() );
aOrigin.X() *= -1;
@@ -1250,10 +1250,10 @@ USHORT SvImpLBox::AdjustScrollBars( Size& rSize )
if( pTabBar || (
(nWindowStyle & WB_HSCROLL) &&
(nVis < nMostRight || nMaxRight < nMostRight) ))
- bHorBar = TRUE;
+ bHorBar = sal_True;
// Anzahl aller nicht eingeklappten Eintraege
- ULONG nTotalCount = pView->GetVisibleCount();
+ sal_uLong nTotalCount = pView->GetVisibleCount();
// Anzahl in der View sichtbarer Eintraege
nVisibleCount = aOSize.Height() / nEntryHeight;
@@ -1268,7 +1268,7 @@ USHORT SvImpLBox::AdjustScrollBars( Size& rSize )
{
if( (nWindowStyle & WB_HSCROLL) &&
(nVis < nMostRight || nMaxRight < nMostRight) )
- bHorBar = TRUE;
+ bHorBar = sal_True;
}
}
@@ -1331,7 +1331,7 @@ USHORT SvImpLBox::AdjustScrollBars( Size& rSize )
nTemp = nNewThumbPos - nTemp;
if( pView->IsEditingActive() )
{
- pView->EndEditing( TRUE ); // Cancel
+ pView->EndEditing( sal_True ); // Cancel
pView->Update();
}
pView->nFocusWidth = -1;
@@ -1387,23 +1387,23 @@ void SvImpLBox::FillView()
{
if( !pStartEntry )
{
- USHORT nVisibleViewCount = (USHORT)(pView->GetVisibleCount());
- USHORT nTempThumb = (USHORT)aVerSBar.GetThumbPos();
+ sal_uInt16 nVisibleViewCount = (sal_uInt16)(pView->GetVisibleCount());
+ sal_uInt16 nTempThumb = (sal_uInt16)aVerSBar.GetThumbPos();
if( nTempThumb >= nVisibleViewCount )
nTempThumb = nVisibleViewCount - 1;
pStartEntry = (SvLBoxEntry*)(pView->GetEntryAtVisPos(nTempThumb));
}
if( pStartEntry )
{
- USHORT nLast = (USHORT)(pView->GetVisiblePos( (SvLBoxEntry*)(pView->LastVisible())));
- USHORT nThumb = (USHORT)(pView->GetVisiblePos( pStartEntry ));
- USHORT nCurDispEntries = nLast-nThumb+1;
+ sal_uInt16 nLast = (sal_uInt16)(pView->GetVisiblePos( (SvLBoxEntry*)(pView->LastVisible())));
+ sal_uInt16 nThumb = (sal_uInt16)(pView->GetVisiblePos( pStartEntry ));
+ sal_uInt16 nCurDispEntries = nLast-nThumb+1;
if( nCurDispEntries < nVisibleCount )
{
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
// Fenster fuellen, indem der Thumb schrittweise
// nach oben bewegt wird
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
SvLBoxEntry* pTemp = pStartEntry;
while( nCurDispEntries < nVisibleCount && pTemp )
{
@@ -1413,13 +1413,13 @@ void SvImpLBox::FillView()
nThumb--;
pStartEntry = pTemp;
nCurDispEntries++;
- bFound = TRUE;
+ bFound = sal_True;
}
}
if( bFound )
{
aVerSBar.SetThumbPos( nThumb );
- ShowCursor( TRUE ); // Focusrect neu berechnen
+ ShowCursor( sal_True ); // Focusrect neu berechnen
pView->Invalidate();
}
}
@@ -1431,11 +1431,11 @@ void SvImpLBox::FillView()
void SvImpLBox::ShowVerSBar()
{
- BOOL bVerBar = ( pView->GetStyle() & WB_VSCROLL ) != 0;
- ULONG nVis = 0;
+ sal_Bool bVerBar = ( pView->GetStyle() & WB_VSCROLL ) != 0;
+ sal_uLong nVis = 0;
if( !bVerBar )
nVis = pView->GetVisibleCount();
- if( bVerBar || (nVisibleCount && nVis > (ULONG)(nVisibleCount-1)) )
+ if( bVerBar || (nVisibleCount && nVis > (sal_uLong)(nVisibleCount-1)) )
{
if( !aVerSBar.IsVisible() )
{
@@ -1504,18 +1504,18 @@ void SvImpLBox::SyncVerThumb()
aVerSBar.SetThumbPos( 0 );
}
-BOOL SvImpLBox::IsEntryInView( SvLBoxEntry* pEntry ) const
+sal_Bool SvImpLBox::IsEntryInView( SvLBoxEntry* pEntry ) const
{
// Parent eingeklappt
if( !pView->IsEntryVisible(pEntry) )
- return FALSE;
+ return sal_False;
long nY = GetEntryLine( pEntry );
if( nY < 0 )
- return FALSE;
+ return sal_False;
long nMax = nVisibleCount * pView->GetEntryHeight();
if( nY >= nMax )
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
@@ -1558,10 +1558,10 @@ void SvImpLBox::IndentChanged( short /* nIndentPixel */ ) {}
void SvImpLBox::EntryExpanded( SvLBoxEntry* pEntry )
{
- // SelAllDestrAnch( FALSE, TRUE ); //DeselectAll();
+ // SelAllDestrAnch( sal_False, sal_True ); //DeselectAll();
if( GetUpdateMode() )
{
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
long nY = GetEntryLine( pEntry );
if( IsLineVisible(nY) )
{
@@ -1573,7 +1573,7 @@ void SvImpLBox::EntryExpanded( SvLBoxEntry* pEntry )
// die Thumb-Position korrigiert werden.
SyncVerThumb();
ShowVerSBar();
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
}
@@ -1582,7 +1582,7 @@ void SvImpLBox::EntryCollapsed( SvLBoxEntry* pEntry )
if( !pView->IsEntryVisible( pEntry ) )
return;
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
if( !pMostRightEntry || pTree->IsChild( pEntry,pMostRightEntry ) )
{
@@ -1592,13 +1592,13 @@ void SvImpLBox::EntryCollapsed( SvLBoxEntry* pEntry )
if( pStartEntry )
{
long nOldThumbPos = aVerSBar.GetThumbPos();
- ULONG nVisList = pView->GetVisibleCount();
+ sal_uLong nVisList = pView->GetVisibleCount();
aVerSBar.SetRange( Range(0, nVisList-1) );
long nNewThumbPos = aVerSBar.GetThumbPos();
if( nNewThumbPos != nOldThumbPos )
{
pStartEntry = pView->First();
- USHORT nDistance = (USHORT)nNewThumbPos;
+ sal_uInt16 nDistance = (sal_uInt16)nNewThumbPos;
if( nDistance )
pStartEntry = (SvLBoxEntry*)(pView->NextVisible( pStartEntry,
nDistance));
@@ -1614,9 +1614,9 @@ void SvImpLBox::EntryCollapsed( SvLBoxEntry* pEntry )
SetCursor( pEntry );
if( GetUpdateMode() )
ShowVerSBar();
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
if( GetUpdateMode() && pCursor )
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
}
void SvImpLBox::CollapsingEntry( SvLBoxEntry* pEntry )
@@ -1624,7 +1624,7 @@ void SvImpLBox::CollapsingEntry( SvLBoxEntry* pEntry )
if( !pView->IsEntryVisible( pEntry ) || !pStartEntry )
return;
- SelAllDestrAnch( FALSE, TRUE ); // deselectall
+ SelAllDestrAnch( sal_False, sal_True ); // deselectall
// ist der eingeklappte Parent sichtbar ?
long nY = GetEntryLine( pEntry );
@@ -1667,7 +1667,7 @@ void SvImpLBox::SetNodeBmpTabDistance()
//
// korrigiert bei SingleSelection den Cursor
//
-void SvImpLBox::EntrySelected( SvLBoxEntry* pEntry, BOOL bSelect )
+void SvImpLBox::EntrySelected( SvLBoxEntry* pEntry, sal_Bool bSelect )
{
if( nFlags & F_IGNORE_SELECT )
return;
@@ -1694,9 +1694,9 @@ void SvImpLBox::EntrySelected( SvLBoxEntry* pEntry, BOOL bSelect )
long nY = GetEntryLine( pEntry );
if( IsLineVisible( nY ) )
{
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
pView->PaintEntry1( pEntry, nY, 0xffff ); // wg. ItemsetBrowser SV_LBOXTAB_SHOW_SELECTION );
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
}
}
@@ -1740,14 +1740,14 @@ void SvImpLBox::RemovingEntry( SvLBoxEntry* pEntry )
if( pCursor && pCursor == pEntry )
{
if( bSimpleTravel )
- pView->Select( pCursor, FALSE );
- ShowCursor( FALSE ); // Focus-Rect weg
+ pView->Select( pCursor, sal_False );
+ ShowCursor( sal_False ); // Focus-Rect weg
// NextSibling, weil auch Childs des Cursors geloescht werden
pTemp = pView->NextSibling( pCursor );
if( !pTemp )
pTemp = (SvLBoxEntry*)(pView->PrevVisible( pCursor ));
- SetCursor( pTemp, TRUE );
+ SetCursor( pTemp, sal_True );
}
if( pStartEntry && pStartEntry == pEntry )
{
@@ -1780,10 +1780,10 @@ void SvImpLBox::EntryRemoved()
if( !pStartEntry )
pStartEntry = pTree->First();
if( !pCursor )
- SetCursor( pStartEntry, TRUE );
+ SetCursor( pStartEntry, sal_True );
if( pCursor && (bSimpleTravel || !pView->GetSelectionCount() ))
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
if( GetUpdateMode())
{
@@ -1811,9 +1811,9 @@ void SvImpLBox::EntryRemoved()
MakeVisible( pCursor );
}
else
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
}
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
nFlags &= (~F_REMOVED_RECALC_MOST_RIGHT);
}
@@ -1822,12 +1822,12 @@ void SvImpLBox::EntryRemoved()
void SvImpLBox::MovingEntry( SvLBoxEntry* pEntry )
{
int bDeselAll = nFlags & F_DESEL_ALL;
- SelAllDestrAnch( FALSE, TRUE ); // DeselectAll();
+ SelAllDestrAnch( sal_False, sal_True ); // DeselectAll();
if( !bDeselAll )
nFlags &= (~F_DESEL_ALL);
if( pEntry == pCursor )
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
if( IsEntryInView( pEntry ) )
pView->Invalidate();
if( pEntry == pStartEntry )
@@ -1860,8 +1860,8 @@ void SvImpLBox::EntryMoved( SvLBoxEntry* pEntry )
pStartEntry = pView->First();
aVerSBar.SetRange( Range(0, pView->GetVisibleCount()-1));
- USHORT nFirstPos = (USHORT)pTree->GetAbsPos( pStartEntry );
- USHORT nNewPos = (USHORT)pTree->GetAbsPos( pEntry );
+ sal_uInt16 nFirstPos = (sal_uInt16)pTree->GetAbsPos( pStartEntry );
+ sal_uInt16 nNewPos = (sal_uInt16)pTree->GetAbsPos( pEntry );
FindMostRight(0);
if( nNewPos < nFirstPos ) //!!!Notloesung
pStartEntry = pEntry;
@@ -1870,7 +1870,7 @@ void SvImpLBox::EntryMoved( SvLBoxEntry* pEntry )
if( pEntry == pCursor )
{
if( pView->IsEntryVisible( pCursor ) )
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
else
{
SvLBoxEntry* pParent = pEntry;
@@ -1900,16 +1900,16 @@ void SvImpLBox::EntryInserted( SvLBoxEntry* pEntry )
return;
int bDeselAll = nFlags & F_DESEL_ALL;
if( bDeselAll )
- SelAllDestrAnch( FALSE, TRUE );
+ SelAllDestrAnch( sal_False, sal_True );
else
DestroyAnchor();
// nFlags &= (~F_DESEL_ALL);
-// ShowCursor( FALSE ); // falls sich Cursor nach unten verschiebt
+// ShowCursor( sal_False ); // falls sich Cursor nach unten verschiebt
long nY = GetEntryLine( pEntry );
- BOOL bEntryVisible = IsLineVisible( nY );
+ sal_Bool bEntryVisible = IsLineVisible( nY );
if( bEntryVisible )
{
- ShowCursor( FALSE ); // falls sich Cursor nach unten verschiebt
+ ShowCursor( sal_False ); // falls sich Cursor nach unten verschiebt
nY -= pView->GetEntryHeight(); // wg. Linien
InvalidateEntriesFrom( nY );
}
@@ -1918,9 +1918,9 @@ void SvImpLBox::EntryInserted( SvLBoxEntry* pEntry )
// pruefen, ob die View komplett gefuellt ist. Wenn
// nicht, dann pStartEntry und den Cursor anpassen
// (automatisches scrollen)
- USHORT nLast = (USHORT)(pView->GetVisiblePos( (SvLBoxEntry*)(pView->LastVisible())));
- USHORT nThumb = (USHORT)(pView->GetVisiblePos( pStartEntry ));
- USHORT nCurDispEntries = nLast-nThumb+1;
+ sal_uInt16 nLast = (sal_uInt16)(pView->GetVisiblePos( (SvLBoxEntry*)(pView->LastVisible())));
+ sal_uInt16 nThumb = (sal_uInt16)(pView->GetVisiblePos( pStartEntry ));
+ sal_uInt16 nCurDispEntries = nLast-nThumb+1;
if( nCurDispEntries < nVisibleCount )
{
// beim naechsten Paint-Event setzen
@@ -1953,7 +1953,7 @@ void SvImpLBox::EntryInserted( SvLBoxEntry* pEntry )
aVerSBar.SetRange( Range(0, pView->GetVisibleCount()-1));
SyncVerThumb(); // falls vor Thumb eingefuegt wurde
ShowVerSBar();
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
if( pStartEntry != pView->First() && (nFlags & F_FILLING) )
pView->Update();
}
@@ -1968,7 +1968,7 @@ void SvImpLBox::EntryInserted( SvLBoxEntry* pEntry )
// ****** Steuerung der Controlanimation
-BOOL SvImpLBox::ButtonDownCheckCtrl(const MouseEvent& rMEvt, SvLBoxEntry* pEntry,
+sal_Bool SvImpLBox::ButtonDownCheckCtrl(const MouseEvent& rMEvt, SvLBoxEntry* pEntry,
long nY )
{
SvLBoxItem* pItem = pView->GetItem(pEntry,rMEvt.GetPosPixel().X(),&pActiveTab);
@@ -1979,18 +1979,18 @@ BOOL SvImpLBox::ButtonDownCheckCtrl(const MouseEvent& rMEvt, SvLBoxEntry* pEntry
if( pCursor == pActiveEntry )
pView->HideFocus();
pView->CaptureMouse();
- pActiveButton->SetStateHilighted( TRUE );
+ pActiveButton->SetStateHilighted( sal_True );
pView->PaintEntry1( pActiveEntry, nY,
SV_LBOXTAB_PUSHABLE | SV_LBOXTAB_ADJUST_CENTER |
SV_LBOXTAB_ADJUST_RIGHT );
- return TRUE;
+ return sal_True;
}
else
pActiveButton = 0;
- return FALSE;
+ return sal_False;
}
-BOOL SvImpLBox::MouseMoveCheckCtrl( const MouseEvent& rMEvt, SvLBoxEntry* pEntry)
+sal_Bool SvImpLBox::MouseMoveCheckCtrl( const MouseEvent& rMEvt, SvLBoxEntry* pEntry)
{
if( pActiveButton )
{
@@ -2001,7 +2001,7 @@ BOOL SvImpLBox::MouseMoveCheckCtrl( const MouseEvent& rMEvt, SvLBoxEntry* pEntry
{
if( !pActiveButton->IsStateHilighted() )
{
- pActiveButton->SetStateHilighted(TRUE );
+ pActiveButton->SetStateHilighted(sal_True );
nY = GetEntryLine( pActiveEntry );
pView->PaintEntry1( pActiveEntry, nY,
SV_LBOXTAB_PUSHABLE | SV_LBOXTAB_ADJUST_CENTER |
@@ -2012,24 +2012,24 @@ BOOL SvImpLBox::MouseMoveCheckCtrl( const MouseEvent& rMEvt, SvLBoxEntry* pEntry
{
if( pActiveButton->IsStateHilighted() )
{
- pActiveButton->SetStateHilighted(FALSE );
+ pActiveButton->SetStateHilighted(sal_False );
nY = GetEntryLine( pActiveEntry );
pView->PaintEntry1( pActiveEntry, nY, SV_LBOXTAB_PUSHABLE );
}
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SvImpLBox::ButtonUpCheckCtrl( const MouseEvent& rMEvt )
+sal_Bool SvImpLBox::ButtonUpCheckCtrl( const MouseEvent& rMEvt )
{
if( pActiveButton )
{
pView->ReleaseMouse();
SvLBoxEntry* pEntry = GetClickedEntry( rMEvt.GetPosPixel() );
long nY = GetEntryLine( pActiveEntry );
- pActiveButton->SetStateHilighted( FALSE );
+ pActiveButton->SetStateHilighted( sal_False );
long nMouseX = rMEvt.GetPosPixel().X();
if( pEntry == pActiveEntry &&
pView->GetItem( pActiveEntry, nMouseX ) == pActiveButton )
@@ -2038,26 +2038,26 @@ BOOL SvImpLBox::ButtonUpCheckCtrl( const MouseEvent& rMEvt )
SV_LBOXTAB_PUSHABLE | SV_LBOXTAB_ADJUST_CENTER |
SV_LBOXTAB_ADJUST_RIGHT );
if( pCursor == pActiveEntry )
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
pActiveButton = 0;
pActiveEntry = 0;
pActiveTab = 0;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// ******* Steuerung Plus/Minus-Button zum Expandieren/Kollabieren
-// FALSE == kein Expand/Collapse-Button getroffen
-BOOL SvImpLBox::IsNodeButton( const Point& rPosPixel, SvLBoxEntry* pEntry ) const
+// sal_False == kein Expand/Collapse-Button getroffen
+sal_Bool SvImpLBox::IsNodeButton( const Point& rPosPixel, SvLBoxEntry* pEntry ) const
{
if( !pEntry->HasChilds() && !pEntry->HasChildsOnDemand() )
- return FALSE;
+ return sal_False;
SvLBoxTab* pFirstDynamicTab = pView->GetFirstDynamicTab();
if( !pFirstDynamicTab )
- return FALSE;
+ return sal_False;
long nMouseX = rPosPixel.X();
// in Doc-Koords umrechnen
@@ -2067,26 +2067,26 @@ BOOL SvImpLBox::IsNodeButton( const Point& rPosPixel, SvLBoxEntry* pEntry ) cons
long nX = pView->GetTabPos( pEntry, pFirstDynamicTab);
nX += nNodeBmpTabDistance;
if( nMouseX < nX )
- return FALSE;
+ return sal_False;
nX += nNodeBmpWidth;
if( nMouseX > nX )
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
-// FALSE == hit no node button
-BOOL SvImpLBox::ButtonDownCheckExpand( const MouseEvent& rMEvt, SvLBoxEntry* pEntry, long /* nY */ )
+// sal_False == hit no node button
+sal_Bool SvImpLBox::ButtonDownCheckExpand( const MouseEvent& rMEvt, SvLBoxEntry* pEntry, long /* nY */ )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( pView->IsEditingActive() && pEntry == pView->pEdEntry )
// inplace editing -> nothing to do
- bRet = TRUE;
+ bRet = sal_True;
else if ( IsNodeButton( rMEvt.GetPosPixel(), pEntry ) )
{
if ( pView->IsExpanded( pEntry ) )
{
- pView->EndEditing( TRUE );
+ pView->EndEditing( sal_True );
pView->Collapse( pEntry );
}
else
@@ -2094,7 +2094,7 @@ BOOL SvImpLBox::ButtonDownCheckExpand( const MouseEvent& rMEvt, SvLBoxEntry* pEn
// you can expand an entry, which is in editing
pView->Expand( pEntry );
}
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -2161,7 +2161,7 @@ void SvImpLBox::MouseButtonDown( const MouseEvent& rMEvt )
{
// neu selektieren & tschuess
if( !bSimpleTravel && !aSelEng.IsAlwaysAdding())
- SelAllDestrAnch( FALSE, TRUE ); // DeselectAll();
+ SelAllDestrAnch( sal_False, sal_True ); // DeselectAll();
SetCursor( pEntry );
return;
@@ -2174,7 +2174,7 @@ void SvImpLBox::MouseButtonDown( const MouseEvent& rMEvt )
pView->Expand( pEntry );
if( pEntry == pCursor ) // nur wenn Entryitem angeklickt wurde
// (Nodebutton ist kein Entryitem!)
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
return;
}
}
@@ -2182,7 +2182,7 @@ void SvImpLBox::MouseButtonDown( const MouseEvent& rMEvt )
else
{
// CheckButton? (TreeListBox: Check + Info)
- if( ButtonDownCheckCtrl(rMEvt, pEntry, nY) == TRUE)
+ if( ButtonDownCheckCtrl(rMEvt, pEntry, nY) == sal_True)
return;
// Inplace-Editing?
#if 0
@@ -2232,28 +2232,28 @@ void SvImpLBox::MouseMove( const MouseEvent& rMEvt)
return;
}
-BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
+sal_Bool SvImpLBox::KeyInput( const KeyEvent& rKEvt)
{
aEditTimer.Stop();
const KeyCode& rKeyCode = rKEvt.GetKeyCode();
if( rKeyCode.IsMod2() )
- return FALSE; // Alt-Taste nicht auswerten
+ return sal_False; // Alt-Taste nicht auswerten
nFlags &= (~F_FILLING);
if( !pCursor )
pCursor = pStartEntry;
if( !pCursor )
- return FALSE;
+ return sal_False;
- BOOL bKeyUsed = TRUE;
+ sal_Bool bKeyUsed = sal_True;
- USHORT nDelta = (USHORT)aVerSBar.GetPageSize();
- USHORT aCode = rKeyCode.GetCode();
+ sal_uInt16 nDelta = (sal_uInt16)aVerSBar.GetPageSize();
+ sal_uInt16 aCode = rKeyCode.GetCode();
- BOOL bShift = rKeyCode.IsShift();
- BOOL bMod1 = rKeyCode.IsMod1();
+ sal_Bool bShift = rKeyCode.IsShift();
+ sal_Bool bMod1 = rKeyCode.IsMod1();
SvLBoxEntry* pNewCursor;
@@ -2285,7 +2285,7 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
aSelEng.CursorPosChanging( bShift, bMod1 );
SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
if( !IsEntryInView( pNewCursor ) )
- KeyUp( FALSE );
+ KeyUp( sal_False );
}
break;
@@ -2318,13 +2318,13 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
else
{
if( pCursor )
- pView->Select( pCursor, FALSE );
- KeyDown( FALSE );
+ pView->Select( pCursor, sal_False );
+ KeyDown( sal_False );
SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
}
}
else
- KeyDown( FALSE ); // weil ScrollBar-Range evtl. noch
+ KeyDown( sal_False ); // weil ScrollBar-Range evtl. noch
// scrollen erlaubt
break;
@@ -2337,7 +2337,7 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
if ( nCurTabPos < ( pView->TabCount() - 1 /*!2*/ ) )
{
++nCurTabPos;
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
CallEventListeners( VCLEVENT_LISTBOX_SELECT, pCursor );
}
}
@@ -2357,7 +2357,7 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
}
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
}
@@ -2368,7 +2368,7 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
if ( nCurTabPos > FIRST_ENTRY_TAB )
{
--nCurTabPos;
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
CallEventListeners( VCLEVENT_LISTBOX_SELECT, pCursor );
}
}
@@ -2400,7 +2400,7 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
else if( bSubLstOpLR && IsExpandable() )
pView->Collapse( pCursor );
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
}
@@ -2417,19 +2417,19 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
if( nDelta )
{
- DBG_ASSERT(pNewCursor&&(ULONG)pNewCursor!=(ULONG)pCursor,"Cursor?");
+ DBG_ASSERT(pNewCursor&&(sal_uLong)pNewCursor!=(sal_uLong)pCursor,"Cursor?");
aSelEng.CursorPosChanging( bShift, bMod1 );
if( IsEntryInView( pNewCursor ) )
SetCursor( pNewCursor );
else
{
SetCursor( pNewCursor );
- KeyUp( TRUE );
+ KeyUp( sal_True );
}
}
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_PAGEDOWN:
@@ -2445,21 +2445,21 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
if( nDelta )
{
- DBG_ASSERT(pNewCursor&&(ULONG)pNewCursor!=(ULONG)pCursor,"Cursor?");
+ DBG_ASSERT(pNewCursor&&(sal_uLong)pNewCursor!=(sal_uLong)pCursor,"Cursor?");
aSelEng.CursorPosChanging( bShift, bMod1 );
if( IsEntryInView( pNewCursor ) )
SetCursor( pNewCursor );
else
{
SetCursor( pNewCursor );
- KeyDown( TRUE );
+ KeyDown( sal_True );
}
}
else
- KeyDown( FALSE ); // siehe KEY_DOWN
+ KeyDown( sal_False ); // siehe KEY_DOWN
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_SPACE:
@@ -2480,17 +2480,17 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
}
else if ( !pView->IsSelected( pCursor ) )
{
- SelAllDestrAnch( FALSE );
- pView->Select( pCursor, TRUE );
+ SelAllDestrAnch( sal_False );
+ pView->Select( pCursor, sal_True );
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_RETURN:
@@ -2502,7 +2502,7 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
pView->Expand( pCursor );
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_F2:
@@ -2512,7 +2512,7 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
EditTimerCall( 0 );
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_F8:
@@ -2520,12 +2520,12 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
!(m_nStyle & WB_SIMPLEMODE))
{
if( aSelEng.IsAlwaysAdding() )
- aSelEng.AddAlways( FALSE );
+ aSelEng.AddAlways( sal_False );
else
- aSelEng.AddAlways( TRUE );
+ aSelEng.AddAlways( sal_True );
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
@@ -2548,7 +2548,7 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
pView->Expand( pCursor );
if( bMod1 )
{
- USHORT nRefDepth = pTree->GetDepth( pCursor );
+ sal_uInt16 nRefDepth = pTree->GetDepth( pCursor );
SvLBoxEntry* pCur = pTree->Next( pCursor );
while( pCur && pTree->GetDepth(pCur) > nRefDepth )
{
@@ -2559,14 +2559,14 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
}
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_A:
if( bMod1 )
- SelAllDestrAnch( TRUE );
+ SelAllDestrAnch( sal_True );
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_SUBTRACT:
@@ -2580,7 +2580,7 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
SvLBoxEntry* pParentToCollapse = (SvLBoxEntry*)pTree->GetRootLevelParent(pCursor);
if( pParentToCollapse )
{
- USHORT nRefDepth;
+ sal_uInt16 nRefDepth;
// Sonderbehandlung Explorer: Befindet sich auf der
// Root nur ein Eintrag,dann den Root-Entry nicht
// einklappen
@@ -2610,21 +2610,21 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
}
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_DIVIDE :
if( bMod1 )
- SelAllDestrAnch( TRUE );
+ SelAllDestrAnch( sal_True );
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_COMMA :
if( bMod1 )
- SelAllDestrAnch( FALSE );
+ SelAllDestrAnch( sal_False );
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_HOME :
@@ -2637,14 +2637,14 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
if( pNewCursor && pNewCursor != pCursor )
{
-// SelAllDestrAnch( FALSE );
+// SelAllDestrAnch( sal_False );
aSelEng.CursorPosChanging( bShift, bMod1 );
SetCursor( pNewCursor );
if( !IsEntryInView( pNewCursor ) )
MakeVisible( pNewCursor );
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_END :
@@ -2657,14 +2657,14 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
if( pNewCursor && pNewCursor != pCursor)
{
-// SelAllDestrAnch( FALSE );
+// SelAllDestrAnch( sal_False );
aSelEng.CursorPosChanging( bShift, bMod1 );
SetCursor( pNewCursor );
if( !IsEntryInView( pNewCursor ) )
MakeVisible( pNewCursor );
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_ESCAPE:
@@ -2673,18 +2673,18 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
case KEY_BACKSPACE:
// #105907# must not be handled because this quits dialogs and does other magic things...
// if there are other single keys which should not be handled, they can be added here
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
default:
// is there any reason why we should eat the events here? The only place where this is called
- // is from SvTreeListBox::KeyInput. If we set bKeyUsed to TRUE here, then the key input
+ // is from SvTreeListBox::KeyInput. If we set bKeyUsed to sal_True here, then the key input
// is just silenced. However, we want SvLBox::KeyInput to get a chance, to do the QuickSelection
// handling.
// (The old code here which intentionally set bKeyUsed to TRUE said this was because of "quick search"
// handling, but actually there was no quick search handling anymore. We just re-implemented it.)
// #i31275# / 2009-06-16 / frank.schoenheit@sun.com
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
}
return bKeyUsed;
@@ -2694,11 +2694,11 @@ void __EXPORT SvImpLBox::GetFocus()
{
if( pCursor )
{
- pView->SetEntryFocus( pCursor, TRUE );
- ShowCursor( TRUE );
+ pView->SetEntryFocus( pCursor, sal_True );
+ ShowCursor( sal_True );
// auskommentiert wg. deselectall
// if( bSimpleTravel && !pView->IsSelected(pCursor) )
-// pView->Select( pCursor, TRUE );
+// pView->Select( pCursor, sal_True );
}
if( m_nStyle & WB_HIDESELECTION )
{
@@ -2715,7 +2715,7 @@ void __EXPORT SvImpLBox::GetFocus()
SvViewData* pViewData = pView->GetViewData( pEntry );
if( pViewData->IsCursored() )
{
- pViewData->SetCursored( FALSE );
+ pViewData->SetCursored( sal_False );
InvalidateEntry( pEntry );
}
pEntry = pView->GetModel()->Next( pEntry );
@@ -2730,8 +2730,8 @@ void __EXPORT SvImpLBox::LoseFocus()
{
aEditTimer.Stop();
if( pCursor )
- pView->SetEntryFocus( pCursor,FALSE );
- ShowCursor( FALSE );
+ pView->SetEntryFocus( pCursor,sal_False );
+ ShowCursor( sal_False );
if( m_nStyle & WB_HIDESELECTION )
{
@@ -2739,7 +2739,7 @@ void __EXPORT SvImpLBox::LoseFocus()
while( pEntry )
{
//SvViewData* pViewData = pView->GetViewData( pEntry );
- //pViewData->SetCursored( TRUE );
+ //pViewData->SetCursored( sal_True );
InvalidateEntry( pEntry );
pEntry = pView->NextSelected( pEntry );
}
@@ -2751,7 +2751,7 @@ void __EXPORT SvImpLBox::LoseFocus()
// SelectionEngine
// ********************************************************************
-inline void SvImpLBox::SelectEntry( SvLBoxEntry* pEntry, BOOL bSelect )
+inline void SvImpLBox::SelectEntry( SvLBoxEntry* pEntry, sal_Bool bSelect )
{
pView->Select( pEntry, bSelect );
}
@@ -2797,7 +2797,7 @@ void __EXPORT ImpLBSelEng::CreateCursor()
*/
-BOOL __EXPORT ImpLBSelEng::SetCursorAtPoint(const Point& rPoint, BOOL bDontSelectAtCursor)
+sal_Bool __EXPORT ImpLBSelEng::SetCursorAtPoint(const Point& rPoint, sal_Bool bDontSelectAtCursor)
{
SvLBoxEntry* pNewCursor = pImp->MakePointVisible( rPoint );
if( pNewCursor != pImp->pCursor )
@@ -2808,19 +2808,19 @@ BOOL __EXPORT ImpLBSelEng::SetCursorAtPoint(const Point& rPoint, BOOL bDontSelec
// bei SimpleTravel wird in SetCursor selektiert und
// der Select-Handler gerufen
//if( !bDontSelectAtCursor && !pImp->bSimpleTravel )
- // pImp->SelectEntry( pNewCursor, TRUE );
+ // pImp->SelectEntry( pNewCursor, sal_True );
pImp->SetCursor( pNewCursor, bDontSelectAtCursor );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL __EXPORT ImpLBSelEng::IsSelectionAtPoint( const Point& rPoint )
+sal_Bool __EXPORT ImpLBSelEng::IsSelectionAtPoint( const Point& rPoint )
{
SvLBoxEntry* pEntry = pImp->MakePointVisible( rPoint );
if( pEntry )
return pView->IsSelected(pEntry);
- return FALSE;
+ return sal_False;
}
void __EXPORT ImpLBSelEng::DeselectAtPoint( const Point& rPoint )
@@ -2828,7 +2828,7 @@ void __EXPORT ImpLBSelEng::DeselectAtPoint( const Point& rPoint )
SvLBoxEntry* pEntry = pImp->MakePointVisible( rPoint );
if( !pEntry )
return;
- pImp->SelectEntry( pEntry, FALSE );
+ pImp->SelectEntry( pEntry, sal_False );
}
/*
@@ -2837,13 +2837,13 @@ void __EXPORT ImpLBSelEng::SelectAtPoint( const Point& rPoint )
SvLBoxEntry* pEntry = pImp->MakePointVisible( rPoint );
if( !pEntry )
return;
- pImp->SelectEntry( pEntry, TRUE );
+ pImp->SelectEntry( pEntry, sal_True );
}
*/
void __EXPORT ImpLBSelEng::DeselectAll()
{
- pImp->SelAllDestrAnch( FALSE, FALSE ); // SelectionEngine nicht resetten!
+ pImp->SelAllDestrAnch( sal_False, sal_False ); // SelectionEngine nicht resetten!
pImp->nFlags &= (~F_DESEL_ALL);
}
@@ -2854,9 +2854,9 @@ void __EXPORT ImpLBSelEng::DeselectAll()
void SvImpLBox::SetAnchorSelection(SvLBoxEntry* pOldCursor,SvLBoxEntry* pNewCursor)
{
SvLBoxEntry* pEntry;
- ULONG nAnchorVisPos = pView->GetVisiblePos( pAnchor );
- ULONG nOldVisPos = pView->GetVisiblePos( pOldCursor );
- ULONG nNewVisPos = pView->GetVisiblePos( pNewCursor );
+ sal_uLong nAnchorVisPos = pView->GetVisiblePos( pAnchor );
+ sal_uLong nOldVisPos = pView->GetVisiblePos( pOldCursor );
+ sal_uLong nNewVisPos = pView->GetVisiblePos( pNewCursor );
if( nOldVisPos > nAnchorVisPos ||
( nAnchorVisPos==nOldVisPos && nNewVisPos > nAnchorVisPos) )
@@ -2866,11 +2866,11 @@ void SvImpLBox::SetAnchorSelection(SvLBoxEntry* pOldCursor,SvLBoxEntry* pNewCurs
pEntry = pOldCursor;
while( pEntry && pEntry != pNewCursor )
{
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
}
if( pEntry )
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
return;
}
@@ -2879,20 +2879,20 @@ void SvImpLBox::SetAnchorSelection(SvLBoxEntry* pOldCursor,SvLBoxEntry* pNewCurs
pEntry = pAnchor;
while( pEntry && pEntry != pOldCursor )
{
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
}
if( pEntry )
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
pEntry = pNewCursor;
while( pEntry && pEntry != pAnchor )
{
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
}
if( pEntry )
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
return;
}
@@ -2902,11 +2902,11 @@ void SvImpLBox::SetAnchorSelection(SvLBoxEntry* pOldCursor,SvLBoxEntry* pNewCurs
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
while( pEntry && pEntry != pOldCursor )
{
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
}
if( pEntry )
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
return;
}
}
@@ -2917,11 +2917,11 @@ void SvImpLBox::SetAnchorSelection(SvLBoxEntry* pOldCursor,SvLBoxEntry* pNewCurs
pEntry = pNewCursor;
while( pEntry && pEntry != pOldCursor )
{
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
}
if( pEntry )
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
return;
}
@@ -2930,19 +2930,19 @@ void SvImpLBox::SetAnchorSelection(SvLBoxEntry* pOldCursor,SvLBoxEntry* pNewCurs
pEntry = pOldCursor;
while( pEntry && pEntry != pAnchor )
{
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
}
if( pEntry )
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
pEntry = pAnchor;
while( pEntry && pEntry != pNewCursor )
{
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
}
if( pEntry )
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
return;
}
@@ -2951,7 +2951,7 @@ void SvImpLBox::SetAnchorSelection(SvLBoxEntry* pOldCursor,SvLBoxEntry* pNewCurs
pEntry = pOldCursor;
while( pEntry && pEntry != pNewCursor )
{
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
}
return;
@@ -2959,8 +2959,8 @@ void SvImpLBox::SetAnchorSelection(SvLBoxEntry* pOldCursor,SvLBoxEntry* pNewCurs
}
}
-void SvImpLBox::SelAllDestrAnch( BOOL bSelect, BOOL bDestroyAnchor,
- BOOL bSingleSelToo )
+void SvImpLBox::SelAllDestrAnch( sal_Bool bSelect, sal_Bool bDestroyAnchor,
+ sal_Bool bSingleSelToo )
{
SvLBoxEntry* pEntry;
nFlags &= (~F_DESEL_ALL);
@@ -2968,7 +2968,7 @@ void SvImpLBox::SelAllDestrAnch( BOOL bSelect, BOOL bDestroyAnchor,
{
if( pCursor && !pView->IsSelected( pCursor ))
{
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
}
return;
}
@@ -2986,7 +2986,7 @@ void SvImpLBox::SelAllDestrAnch( BOOL bSelect, BOOL bDestroyAnchor,
if( !bSelect && pView->GetSelectionCount()==1 && pCursor &&
pView->IsSelected( pCursor ))
{
- pView->Select( pCursor, FALSE );
+ pView->Select( pCursor, sal_False );
if( bDestroyAnchor )
DestroyAnchor(); // Anker loeschen & SelectionEngine zuruecksetzen
else
@@ -2997,8 +2997,8 @@ void SvImpLBox::SelAllDestrAnch( BOOL bSelect, BOOL bDestroyAnchor,
if( bSimpleTravel && !pCursor && !GetUpdateMode() )
nFlags |= F_DESEL_ALL;
- ShowCursor( FALSE );
- BOOL bUpdate = GetUpdateMode();
+ ShowCursor( sal_False );
+ sal_Bool bUpdate = GetUpdateMode();
nFlags |= F_IGNORE_SELECT; // EntryInserted soll nix tun
pEntry = pTree->First();
@@ -3021,18 +3021,18 @@ void SvImpLBox::SelAllDestrAnch( BOOL bSelect, BOOL bDestroyAnchor,
DestroyAnchor(); // Anker loeschen & SelectionEngine zuruecksetzen
else
pAnchor = 0; // internen Anker immer loeschen
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
void SvImpLBox::SetSelectionMode( SelectionMode eSelMode )
{
aSelEng.SetSelectionMode( eSelMode);
if( eSelMode == SINGLE_SELECTION )
- bSimpleTravel = TRUE;
+ bSimpleTravel = sal_True;
else
- bSimpleTravel = FALSE;
+ bSimpleTravel = sal_False;
if( (m_nStyle & WB_SIMPLEMODE) && (eSelMode == MULTIPLE_SELECTION) )
- aSelEng.AddAlways( TRUE );
+ aSelEng.AddAlways( sal_True );
}
// ***********************************************************************
@@ -3043,13 +3043,13 @@ void SvImpLBox::SetDragDropMode( DragDropMode eDDMode )
{
if( eDDMode && eDDMode != SV_DRAGDROP_APP_DROP )
{
- aSelEng.ExpandSelectionOnMouseMove( FALSE );
- aSelEng.EnableDrag( TRUE );
+ aSelEng.ExpandSelectionOnMouseMove( sal_False );
+ aSelEng.EnableDrag( sal_True );
}
else
{
- aSelEng.ExpandSelectionOnMouseMove( TRUE );
- aSelEng.EnableDrag( FALSE );
+ aSelEng.ExpandSelectionOnMouseMove( sal_True );
+ aSelEng.EnableDrag( sal_False );
}
}
@@ -3098,7 +3098,7 @@ void SvImpLBox::PaintDDCursor( SvLBoxEntry* pInsertionPos )
--------------------------------------------------*/
void lcl_DeleteSubPopups(PopupMenu* pPopup)
{
- for(USHORT i = 0; i < pPopup->GetItemCount(); i++)
+ for(sal_uInt16 i = 0; i < pPopup->GetItemCount(); i++)
{
PopupMenu* pSubPopup = pPopup->GetPopupMenu( pPopup->GetItemId( i ));
if(pSubPopup)
@@ -3111,7 +3111,7 @@ void lcl_DeleteSubPopups(PopupMenu* pPopup)
void SvImpLBox::Command( const CommandEvent& rCEvt )
{
- USHORT nCommand = rCEvt.GetCommand();
+ sal_uInt16 nCommand = rCEvt.GetCommand();
if( nCommand == COMMAND_CONTEXTMENU )
aEditTimer.Stop();
@@ -3124,7 +3124,7 @@ void SvImpLBox::Command( const CommandEvent& rCEvt )
if( bContextMenuHandling && nCommand == COMMAND_CONTEXTMENU )
{
Point aPopupPos;
- BOOL bClickedIsFreePlace = FALSE;
+ sal_Bool bClickedIsFreePlace = sal_False;
std::stack<SvLBoxEntry*> aSelRestore;
if( rCEvt.IsMouseEvent() )
@@ -3135,7 +3135,7 @@ void SvImpLBox::Command( const CommandEvent& rCEvt )
SvLBoxEntry* pClickedEntry = GetEntry( aPopupPos );
if( pClickedEntry )
{ // mouse in non empty area
- BOOL bClickedIsSelected = FALSE;
+ sal_Bool bClickedIsSelected = sal_False;
// collect the currently selected entries
SvLBoxEntry* pSelected = pView->FirstSelected();
@@ -3148,32 +3148,32 @@ void SvImpLBox::Command( const CommandEvent& rCEvt )
// if the entry which the user clicked at is not selected
if( !bClickedIsSelected )
{ // deselect all other and select the clicked one
- pView->SelectAll( FALSE );
+ pView->SelectAll( sal_False );
pView->SetCursor( pClickedEntry );
}
}
else if( aSelEng.GetSelectionMode() == SINGLE_SELECTION )
{//modified by BerryJia for fixing Bug102739 2002-9-9 17:00(Beijing Time)
- bClickedIsFreePlace = TRUE;
- INT32 nSelectedEntries = pView->GetSelectionCount();
+ bClickedIsFreePlace = sal_True;
+ sal_Int32 nSelectedEntries = pView->GetSelectionCount();
SvLBoxEntry* pSelected = pView->FirstSelected();
- for(USHORT nSel = 0; nSel < nSelectedEntries; nSel++ )
+ for(sal_uInt16 nSel = 0; nSel < nSelectedEntries; nSel++ )
{
aSelRestore.push(pSelected);
pSelected = pView->NextSelected( pSelected );
}
- pView->SelectAll( FALSE );
+ pView->SelectAll( sal_False );
}
else
{ // deselect all
- pView->SelectAll( FALSE );
+ pView->SelectAll( sal_False );
}
}
else
{ // key event (or at least no mouse event)
- INT32 nSelectionCount = pView->GetSelectionCount();
+ sal_Int32 nSelectionCount = pView->GetSelectionCount();
if( nSelectionCount )
{ // now allways take first visible as base for positioning the menu
@@ -3204,7 +3204,7 @@ void SvImpLBox::Command( const CommandEvent& rCEvt )
if( pPopup )
{
// do action for selected entry in popup menu
- USHORT nMenuAction = pPopup->Execute( pView, aPopupPos );
+ sal_uInt16 nMenuAction = pPopup->Execute( pView, aPopupPos );
if ( nMenuAction )
pView->ExcecuteContextMenuAction( nMenuAction );
lcl_DeleteSubPopups(pPopup);
@@ -3218,7 +3218,7 @@ void SvImpLBox::Command( const CommandEvent& rCEvt )
SvLBoxEntry* pEntry = aSelRestore.top();
//#i19717# the entry is maybe already deleted
bool bFound = false;
- for(ULONG nEntry = 0; nEntry < pView->GetEntryCount(); nEntry++)
+ for(sal_uLong nEntry = 0; nEntry < pView->GetEntryCount(); nEntry++)
if(pEntry == pView->GetEntry(nEntry))
{
bFound = true;
@@ -3277,12 +3277,12 @@ void SvImpLBox::SetCurEntry( SvLBoxEntry* pEntry )
if ( ( aSelEng.GetSelectionMode() != SINGLE_SELECTION )
&& ( aSelEng.GetSelectionMode() != NO_SELECTION )
)
- SelAllDestrAnch( FALSE, TRUE, FALSE );
+ SelAllDestrAnch( sal_False, sal_True, sal_False );
if ( pEntry )
MakeVisible( pEntry );
SetCursor( pEntry );
if ( pEntry && ( aSelEng.GetSelectionMode() != NO_SELECTION ) )
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
}
IMPL_LINK( SvImpLBox, EditTimerCall, Timer *, EMPTYARG )
@@ -3304,21 +3304,21 @@ IMPL_LINK( SvImpLBox, EditTimerCall, Timer *, EMPTYARG )
SvLBoxEntry* pEntry = GetCurEntry();
if( pEntry )
{
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
pView->ImplEditEntry( pEntry );
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
}
return 0;
}
-BOOL SvImpLBox::RequestHelp( const HelpEvent& rHEvt )
+sal_Bool SvImpLBox::RequestHelp( const HelpEvent& rHEvt )
{
if( rHEvt.GetMode() & HELPMODE_QUICK )
{
Point aPos( pView->ScreenToOutputPixel( rHEvt.GetMousePosPixel() ));
if( !GetVisibleArea().IsInside( aPos ))
- return FALSE;
+ return sal_False;
SvLBoxEntry* pEntry = GetEntry( aPos );
if( pEntry )
@@ -3327,18 +3327,18 @@ BOOL SvImpLBox::RequestHelp( const HelpEvent& rHEvt )
SvLBoxTab* pTab;
SvLBoxString* pItem = (SvLBoxString*)(pView->GetItem( pEntry, aPos.X(), &pTab ));
if( !pItem || pItem->IsA() != SV_ITEM_ID_LBOXSTRING )
- return FALSE;
+ return sal_False;
aPos = GetEntryPosition( pEntry );
aPos.X() = pView->GetTabPos( pEntry, pTab ); //pTab->GetPos();
Size aSize( pItem->GetSize( pView, pEntry ) );
SvLBoxTab* pNextTab = NextTab( pTab );
- BOOL bItemClipped = FALSE;
+ sal_Bool bItemClipped = sal_False;
// wurde das Item von seinem rechten Nachbarn abgeschnitten?
if( pNextTab && pView->GetTabPos(pEntry,pNextTab) < aPos.X()+aSize.Width() )
{
aSize.Width() = pNextTab->GetPos() - pTab->GetPos();
- bItemClipped = TRUE;
+ bItemClipped = sal_True;
}
Rectangle aItemRect( aPos, aSize );
@@ -3359,19 +3359,19 @@ BOOL SvImpLBox::RequestHelp( const HelpEvent& rHEvt )
Help::ShowQuickHelp( pView, aItemRect,
pItem->GetText(), QUICKHELP_LEFT | QUICKHELP_VCENTER );
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return sal_False;
}
SvLBoxTab* SvImpLBox::NextTab( SvLBoxTab* pTab )
{
- USHORT nTabCount = pView->TabCount();
+ sal_uInt16 nTabCount = pView->TabCount();
if( nTabCount <= 1 )
return 0;
- for( USHORT nTab=0; nTab < (nTabCount-1); nTab++)
+ for( sal_uInt16 nTab=0; nTab < (nTabCount-1); nTab++)
{
if( pView->aTabs[nTab]==pTab )
return (SvLBoxTab*)(pView->aTabs[nTab+1]);
@@ -3389,28 +3389,28 @@ void SvImpLBox::RepaintScrollBars()
{
}
-void SvImpLBox::SetUpdateMode( BOOL bMode )
+void SvImpLBox::SetUpdateMode( sal_Bool bMode )
{
if( bUpdateMode != bMode )
{
bUpdateMode = bMode;
if( bUpdateMode )
- UpdateAll( FALSE );
+ UpdateAll( sal_False );
}
}
-void SvImpLBox::SetUpdateModeFast( BOOL bMode )
+void SvImpLBox::SetUpdateModeFast( sal_Bool bMode )
{
if( bUpdateMode != bMode )
{
bUpdateMode = bMode;
if( bUpdateMode )
- UpdateAll( FALSE, FALSE );
+ UpdateAll( sal_False, sal_False );
}
}
-BOOL SvImpLBox::SetMostRight( SvLBoxEntry* pEntry )
+sal_Bool SvImpLBox::SetMostRight( SvLBoxEntry* pEntry )
{
if( pView->nTreeFlags & TREEFLAG_RECALCTABS )
{
@@ -3419,8 +3419,8 @@ BOOL SvImpLBox::SetMostRight( SvLBoxEntry* pEntry )
nFlags &= ~F_IGNORE_CHANGED_TABS;
}
- USHORT nLastTab = pView->aTabs.Count() - 1;
- USHORT nLastItem = pEntry->ItemCount() - 1;
+ sal_uInt16 nLastTab = pView->aTabs.Count() - 1;
+ sal_uInt16 nLastItem = pEntry->ItemCount() - 1;
if( nLastTab != USHRT_MAX && nLastItem != USHRT_MAX )
{
if( nLastItem < nLastTab )
@@ -3446,10 +3446,10 @@ BOOL SvImpLBox::SetMostRight( SvLBoxEntry* pEntry )
{
nMostRight = nRight;
pMostRightEntry = pEntry;
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
void SvImpLBox::FindMostRight( SvLBoxEntry* pEntryToIgnore )
@@ -3483,8 +3483,8 @@ void SvImpLBox::FindMostRight_Impl( SvLBoxEntry* pParent, SvLBoxEntry* pEntryToI
if( !pList )
return;
- ULONG nCount = pList->Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ sal_uLong nCount = pList->Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvLBoxEntry* pChild = (SvLBoxEntry*)pList->GetObject( nCur );
if( pChild != pEntryToIgnore )
@@ -3591,7 +3591,7 @@ const Image& SvImpLBox::GetDefaultCollapsedNodeImage( BmpColorMode _eMode )
}
// -----------------------------------------------------------------------
-void SvImpLBox::CallEventListeners( ULONG nEvent, void* pData )
+void SvImpLBox::CallEventListeners( sal_uLong nEvent, void* pData )
{
if ( pView )
pView->CallImplEventListeners( nEvent, pData);
@@ -3599,14 +3599,14 @@ void SvImpLBox::CallEventListeners( ULONG nEvent, void* pData )
// -----------------------------------------------------------------------
-bool SvImpLBox::SetCurrentTabPos( USHORT _nNewPos )
+bool SvImpLBox::SetCurrentTabPos( sal_uInt16 _nNewPos )
{
bool bRet = false;
if ( pView && _nNewPos < ( pView->TabCount() - 2 ) )
{
nCurTabPos = _nNewPos;
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
bRet = true;
}
diff --git a/svtools/source/contnr/svimpicn.cxx b/svtools/source/contnr/svimpicn.cxx
index 0d335429d564..420c0fcd2162 100644
--- a/svtools/source/contnr/svimpicn.cxx
+++ b/svtools/source/contnr/svimpicn.cxx
@@ -100,30 +100,30 @@
#undef TEXT_DRAW_WORDBREAK
#endif
-// #define TEXT_DRAW_DISABLE ((USHORT)0x0001)
-// #define TEXT_DRAW_3DLOOK ((USHORT)0x0002)
-// #define TEXT_DRAW_MNEMONIC ((USHORT)0x0004)
-#define TEXT_DRAW_LEFT ((USHORT)0x0010)
-#define TEXT_DRAW_CENTER ((USHORT)0x0020)
-#define TEXT_DRAW_RIGHT ((USHORT)0x0040)
-#define TEXT_DRAW_TOP ((USHORT)0x0080)
-#define TEXT_DRAW_VCENTER ((USHORT)0x0100)
-#define TEXT_DRAW_BOTTOM ((USHORT)0x0200)
-#define TEXT_DRAW_ENDELLIPSIS ((USHORT)0x0400)
-#define TEXT_DRAW_PATHELLIPSIS ((USHORT)0x0800)
-#define TEXT_DRAW_CLIP ((USHORT)0x1000)
-#define TEXT_DRAW_MULTILINE ((USHORT)0x2000)
-#define TEXT_DRAW_WORDBREAK ((USHORT)0x4000)
+// #define TEXT_DRAW_DISABLE ((sal_uInt16)0x0001)
+// #define TEXT_DRAW_3DLOOK ((sal_uInt16)0x0002)
+// #define TEXT_DRAW_MNEMONIC ((sal_uInt16)0x0004)
+#define TEXT_DRAW_LEFT ((sal_uInt16)0x0010)
+#define TEXT_DRAW_CENTER ((sal_uInt16)0x0020)
+#define TEXT_DRAW_RIGHT ((sal_uInt16)0x0040)
+#define TEXT_DRAW_TOP ((sal_uInt16)0x0080)
+#define TEXT_DRAW_VCENTER ((sal_uInt16)0x0100)
+#define TEXT_DRAW_BOTTOM ((sal_uInt16)0x0200)
+#define TEXT_DRAW_ENDELLIPSIS ((sal_uInt16)0x0400)
+#define TEXT_DRAW_PATHELLIPSIS ((sal_uInt16)0x0800)
+#define TEXT_DRAW_CLIP ((sal_uInt16)0x1000)
+#define TEXT_DRAW_MULTILINE ((sal_uInt16)0x2000)
+#define TEXT_DRAW_WORDBREAK ((sal_uInt16)0x4000)
XubString GetEllipsisString( OutputDevice* pDev,
const XubString& rStr, long nMaxWidth,
- USHORT nStyle = TEXT_DRAW_ENDELLIPSIS )
+ sal_uInt16 nStyle = TEXT_DRAW_ENDELLIPSIS )
{
XubString aStr = rStr;
if ( nStyle & TEXT_DRAW_ENDELLIPSIS )
{
- USHORT nIndex = pDev->GetTextBreak( rStr, nMaxWidth );
+ sal_uInt16 nIndex = pDev->GetTextBreak( rStr, nMaxWidth );
if ( nIndex != STRING_LEN )
{
aStr.Erase( nIndex );
@@ -151,11 +151,11 @@ class TextLineInfo
{
private:
long mnWidth;
- USHORT mnIndex;
- USHORT mnLen;
+ sal_uInt16 mnIndex;
+ sal_uInt16 mnLen;
public:
- TextLineInfo( long nWidth, USHORT nIndex, USHORT nLen )
+ TextLineInfo( long nWidth, sal_uInt16 nIndex, sal_uInt16 nLen )
{
mnWidth = nWidth;
mnIndex = nIndex;
@@ -163,8 +163,8 @@ public:
}
long GetWidth() const { return mnWidth; }
- USHORT GetIndex() const { return mnIndex; }
- USHORT GetLen() const { return mnLen; }
+ sal_uInt16 GetIndex() const { return mnIndex; }
+ sal_uInt16 GetLen() const { return mnLen; }
};
#define MULTITEXTLINEINFO_RESIZE 16
@@ -174,8 +174,8 @@ class MultiTextLineInfo
{
private:
PTextLineInfo* mpLines;
- USHORT mnLines;
- USHORT mnSize;
+ sal_uInt16 mnLines;
+ sal_uInt16 mnSize;
public:
MultiTextLineInfo();
@@ -184,9 +184,9 @@ public:
void AddLine( TextLineInfo* pLine );
void Clear();
- TextLineInfo* GetLine( USHORT nLine ) const
+ TextLineInfo* GetLine( sal_uInt16 nLine ) const
{ return mpLines[nLine]; }
- USHORT Count() const { return mnLines; }
+ sal_uInt16 Count() const { return mnLines; }
private:
MultiTextLineInfo( const MultiTextLineInfo& );
@@ -202,7 +202,7 @@ MultiTextLineInfo::MultiTextLineInfo()
MultiTextLineInfo::~MultiTextLineInfo()
{
- for ( USHORT i = 0; i < mnLines; i++ )
+ for ( sal_uInt16 i = 0; i < mnLines; i++ )
delete mpLines[i];
delete [] mpLines;
}
@@ -223,7 +223,7 @@ void MultiTextLineInfo::AddLine( TextLineInfo* pLine )
void MultiTextLineInfo::Clear()
{
- for ( USHORT i = 0; i < mnLines; i++ )
+ for ( sal_uInt16 i = 0; i < mnLines; i++ )
delete mpLines[i];
mnLines = 0;
}
@@ -232,7 +232,7 @@ void MultiTextLineInfo::Clear()
long GetTextLines( OutputDevice* pDev, MultiTextLineInfo& rLineInfo,
long nWidth, const XubString& rStr,
- USHORT nStyle = TEXT_DRAW_WORDBREAK )
+ sal_uInt16 nStyle = TEXT_DRAW_WORDBREAK )
{
rLineInfo.Clear();
if ( !rStr.Len() )
@@ -240,20 +240,20 @@ long GetTextLines( OutputDevice* pDev, MultiTextLineInfo& rLineInfo,
if ( nWidth <= 0 )
nWidth = 1;
- USHORT nStartPos = 0; // Start-Position der Zeile
- USHORT nLastLineLen = 0; // Zeilenlaenge bis zum vorherigen Wort
- USHORT nLastWordPos = 0; // Position des letzten Wortanfangs
- USHORT i = 0;
- USHORT nPos; // StartPositon der Zeile (nur Temp)
- USHORT nLen; // Laenge der Zeile (nur Temp)
- USHORT nStrLen = rStr.Len();
+ sal_uInt16 nStartPos = 0; // Start-Position der Zeile
+ sal_uInt16 nLastLineLen = 0; // Zeilenlaenge bis zum vorherigen Wort
+ sal_uInt16 nLastWordPos = 0; // Position des letzten Wortanfangs
+ sal_uInt16 i = 0;
+ sal_uInt16 nPos; // StartPositon der Zeile (nur Temp)
+ sal_uInt16 nLen; // Laenge der Zeile (nur Temp)
+ sal_uInt16 nStrLen = rStr.Len();
long nMaxLineWidth = 0; // Maximale Zeilenlaenge
long nLineWidth; // Aktuelle Zeilenlaenge
long nLastLineWidth = 0; // Zeilenlaenge der letzten Zeile
xub_Unicode c;
xub_Unicode c2;
const xub_Unicode* pStr = rStr.GetBuffer();
- BOOL bHardBreak = FALSE;
+ sal_Bool bHardBreak = sal_False;
do
{
@@ -261,9 +261,9 @@ long GetTextLines( OutputDevice* pDev, MultiTextLineInfo& rLineInfo,
// Auf Zeilenende ermitteln
if ( (c == _CR) || (c == _LF) )
- bHardBreak = TRUE;
+ bHardBreak = sal_True;
else
- bHardBreak = FALSE;
+ bHardBreak = sal_False;
// Testen, ob ein Wortende erreicht ist
if ( bHardBreak || (i == nStrLen) ||
@@ -378,9 +378,9 @@ long GetTextLines( OutputDevice* pDev, MultiTextLineInfo& rLineInfo,
// -----------------------------------------------------------------------
-USHORT GetTextLines( OutputDevice* pDev, const Rectangle& rRect,
+sal_uInt16 GetTextLines( OutputDevice* pDev, const Rectangle& rRect,
const XubString& rStr,
- USHORT nStyle = TEXT_DRAW_WORDBREAK,
+ sal_uInt16 nStyle = TEXT_DRAW_WORDBREAK,
long* pMaxWidth = NULL )
{
MultiTextLineInfo aMultiLineInfo;
@@ -395,10 +395,10 @@ USHORT GetTextLines( OutputDevice* pDev, const Rectangle& rRect,
Rectangle GetTextRect( OutputDevice* pDev, const Rectangle& rRect,
const XubString& rStr,
- USHORT nStyle = TEXT_DRAW_WORDBREAK )
+ sal_uInt16 nStyle = TEXT_DRAW_WORDBREAK )
{
Rectangle aRect = rRect;
- USHORT nLines;
+ sal_uInt16 nLines;
long nWidth = rRect.GetWidth();
long nMaxWidth;
long nTextHeight;
@@ -407,13 +407,13 @@ Rectangle GetTextRect( OutputDevice* pDev, const Rectangle& rRect,
{
MultiTextLineInfo aMultiLineInfo;
TextLineInfo* pLineInfo;
- USHORT nFormatLines;
+ sal_uInt16 nFormatLines;
nMaxWidth = 0;
GetTextLines( pDev, aMultiLineInfo, nWidth, rStr, nStyle );
nFormatLines = aMultiLineInfo.Count();
nTextHeight = pDev->GetTextHeight();
- nLines = (USHORT)(aRect.GetHeight()/nTextHeight);
+ nLines = (sal_uInt16)(aRect.GetHeight()/nTextHeight);
if ( nFormatLines <= nLines )
nLines = nFormatLines;
else
@@ -423,7 +423,7 @@ Rectangle GetTextRect( OutputDevice* pDev, const Rectangle& rRect,
else
nMaxWidth = nWidth;
}
- for ( USHORT i = 0; i < nLines; i++ )
+ for ( sal_uInt16 i = 0; i < nLines; i++ )
{
pLineInfo = aMultiLineInfo.GetLine( i );
if ( pLineInfo->GetWidth() > nMaxWidth )
@@ -465,7 +465,7 @@ Rectangle GetTextRect( OutputDevice* pDev, const Rectangle& rRect,
// -----------------------------------------------------------------------
void DrawText( OutputDevice* pDev, const Rectangle& rRect,
- const XubString& rStr, USHORT nStyle = 0 )
+ const XubString& rStr, sal_uInt16 nStyle = 0 )
{
if ( !rStr.Len() || rRect.IsEmpty() )
return;
@@ -487,10 +487,10 @@ void DrawText( OutputDevice* pDev, const Rectangle& rRect,
TextLineInfo* pLineInfo;
long nTextHeight = pDev->GetTextHeight();
long nMaxTextWidth;
- USHORT i;
- USHORT nLines = (USHORT)(nHeight/nTextHeight);
- USHORT nFormatLines;
- BOOL bIsClipRegion = FALSE;
+ sal_uInt16 i;
+ sal_uInt16 nLines = (sal_uInt16)(nHeight/nTextHeight);
+ sal_uInt16 nFormatLines;
+ sal_Bool bIsClipRegion = sal_False;
nMaxTextWidth = GetTextLines( pDev, aMultiLineInfo, nWidth, rStr, nStyle );
nFormatLines = aMultiLineInfo.Count();
@@ -611,7 +611,7 @@ void DrawText( OutputDevice* pDev, const Rectangle& rRect,
if ( nStyle & TEXT_DRAW_CLIP )
{
- BOOL bIsClipRegion = pDev->IsClipRegion();
+ sal_Bool bIsClipRegion = pDev->IsClipRegion();
if ( bIsClipRegion )
{
Region aOldRegion = pDev->GetClipRegion();
@@ -649,7 +649,7 @@ class ImpIcnCursor
SvImpIconView* pView;
SvPtrarr* pColumns;
SvPtrarr* pRows;
- BOOL* pGridMap;
+ sal_Bool* pGridMap;
long nGridDX, nGridDY;
long nGridCols, nGridRows;
long nCols;
@@ -661,39 +661,39 @@ class ImpIcnCursor
void ImplCreate();
void Create() { if( !pColumns ) ImplCreate(); }
- USHORT GetSortListPos( SvPtrarr* pList, long nValue, int bVertical);
- SvLBoxEntry* SearchCol(USHORT nCol,USHORT nTop,USHORT nBottom,USHORT nPref,
- BOOL bDown, BOOL bSimple );
- SvLBoxEntry* SearchRow(USHORT nRow,USHORT nRight,USHORT nLeft,USHORT nPref,
- BOOL bRight, BOOL bSimple );
+ sal_uInt16 GetSortListPos( SvPtrarr* pList, long nValue, int bVertical);
+ SvLBoxEntry* SearchCol(sal_uInt16 nCol,sal_uInt16 nTop,sal_uInt16 nBottom,sal_uInt16 nPref,
+ sal_Bool bDown, sal_Bool bSimple );
+ SvLBoxEntry* SearchRow(sal_uInt16 nRow,sal_uInt16 nRight,sal_uInt16 nLeft,sal_uInt16 nPref,
+ sal_Bool bRight, sal_Bool bSimple );
void ExpandGrid();
void CreateGridMap();
- // Rueckgabe FALSE: Eintrag liegt nicht in der GridMap. rGridx,y werden
+ // Rueckgabe sal_False: Eintrag liegt nicht in der GridMap. rGridx,y werden
// dann an nGridCols, nGridRows geclippt
- BOOL GetGrid( const Point& rDocPos, USHORT& rGridX, USHORT& rGridY ) const;
- void SetGridUsed( USHORT nDX, USHORT nDY, BOOL bUsed )
+ sal_Bool GetGrid( const Point& rDocPos, sal_uInt16& rGridX, sal_uInt16& rGridY ) const;
+ void SetGridUsed( sal_uInt16 nDX, sal_uInt16 nDY, sal_Bool bUsed )
{
pGridMap[ (nDY * nGridCols) + nDX ] = bUsed;
}
- BOOL IsGridUsed( USHORT nDX, USHORT nDY )
+ sal_Bool IsGridUsed( sal_uInt16 nDX, sal_uInt16 nDY )
{
return pGridMap[ (nDY * nGridCols) + nDX ];
}
public:
ImpIcnCursor( SvImpIconView* pOwner );
~ImpIcnCursor();
- void Clear( BOOL bGridToo = TRUE );
+ void Clear( sal_Bool bGridToo = sal_True );
// fuer Cursortravelling usw.
- SvLBoxEntry* GoLeftRight( SvLBoxEntry*, BOOL bRight );
- SvLBoxEntry* GoUpDown( SvLBoxEntry*, BOOL bDown );
+ SvLBoxEntry* GoLeftRight( SvLBoxEntry*, sal_Bool bRight );
+ SvLBoxEntry* GoUpDown( SvLBoxEntry*, sal_Bool bDown );
- // Rueckgaebe: FALSE == Das leere Rect steht hinter dem letzten
+ // Rueckgaebe: sal_False == Das leere Rect steht hinter dem letzten
// Eintrag; d.h. beim naechsten Einfuegen ergibt sich das naechste
// leere Rechteck durch Addition. Hinweis: Das Rechteck kann dann
// ausserhalb des View-Space liegen
- BOOL FindEmptyGridRect( Rectangle& rRect );
+ sal_Bool FindEmptyGridRect( Rectangle& rRect );
// Erzeugt fuer jede Zeile (Hoehe=nGridDY) eine nach BoundRect.Left()
// sortierte Liste der Eintraege, die in ihr stehen. Eine Liste kann
@@ -701,7 +701,7 @@ public:
// muessen mit DestroyGridAdjustData geloescht werden
void CreateGridAjustData( SvPtrarr& pLists, SvLBoxEntry* pRow=0);
static void DestroyGridAdjustData( SvPtrarr& rLists );
- void SetGridUsed( const Rectangle&, BOOL bUsed = TRUE );
+ void SetGridUsed( const Rectangle&, sal_Bool bUsed = sal_True );
};
@@ -740,7 +740,7 @@ SvImpIconView::SvImpIconView( SvIconView* pCurView, SvLBoxTreeList* pTree,
aEditTimer.SetTimeout( 800 );
aEditTimer.SetTimeoutHdl(LINK(this,SvImpIconView,EditTimeoutHdl));
- Clear( TRUE );
+ Clear( sal_True );
}
SvImpIconView::~SvImpIconView()
@@ -755,14 +755,14 @@ SvImpIconView::~SvImpIconView()
ClearSelectedRectList();
}
-void SvImpIconView::Clear( BOOL bInCtor )
+void SvImpIconView::Clear( sal_Bool bInCtor )
{
StopEditTimer();
CancelUserEvent();
nMaxBmpWidth = 0;
nMaxBmpHeight = 0;
nMaxTextWidth = 0;
- bMustRecalcBoundingRects = FALSE;
+ bMustRecalcBoundingRects = sal_False;
nMaxBoundHeight = 0;
//XXX
@@ -797,17 +797,17 @@ void SvImpIconView::SetStyle( const WinBits i_nWinStyle )
IMPL_LINK( SvImpIconView, ScrollUpDownHdl, ScrollBar *, pScrollBar )
{
- pView->EndEditing( TRUE );
+ pView->EndEditing( sal_True );
// Pfeil hoch: delta=-1; Pfeil runter: delta=+1
- Scroll( 0, pScrollBar->GetDelta(), TRUE );
+ Scroll( 0, pScrollBar->GetDelta(), sal_True );
return 0;
}
IMPL_LINK( SvImpIconView, ScrollLeftRightHdl, ScrollBar *, pScrollBar )
{
- pView->EndEditing( TRUE );
+ pView->EndEditing( sal_True );
// Pfeil links: delta=-1; Pfeil rechts: delta=+1
- Scroll( pScrollBar->GetDelta(), 0, TRUE );
+ Scroll( pScrollBar->GetDelta(), 0, sal_True );
return 0;
}
@@ -847,7 +847,7 @@ void SvImpIconView::CheckSizes( SvLBoxEntry* pEntry,
{
nMaxTextWidth = aSize.Width();
if( !(nFlags & F_GRIDMODE ) )
- bMustRecalcBoundingRects = TRUE;
+ bMustRecalcBoundingRects = sal_True;
}
}
SvLBoxContextBmp* pBmpItem = (SvLBoxContextBmp*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXCONTEXTBMP));
@@ -859,14 +859,14 @@ void SvImpIconView::CheckSizes( SvLBoxEntry* pEntry,
nMaxBmpWidth = aSize.Width();
nMaxBmpWidth += (2*LROFFS_ICON);
if( !(nFlags & F_GRIDMODE ) )
- bMustRecalcBoundingRects = TRUE;
+ bMustRecalcBoundingRects = sal_True;
}
if( aSize.Height() > nMaxBmpHeight )
{
nMaxBmpHeight = aSize.Height();
nMaxBmpHeight += (2*TBOFFS_ICON);;
if( !(nFlags & F_GRIDMODE ) )
- bMustRecalcBoundingRects = TRUE;
+ bMustRecalcBoundingRects = sal_True;
}
}
}
@@ -879,9 +879,9 @@ void SvImpIconView::EntryInserted( SvLBoxEntry* pEntry )
DBG_ASSERT(pZOrderList->GetPos(pEntry)==0xffff,"EntryInserted:ZOrder?");
pZOrderList->Insert( pEntry, pZOrderList->Count() );
if( nFlags & F_GRIDMODE )
- pImpCursor->Clear( FALSE );
+ pImpCursor->Clear( sal_False );
else
- pImpCursor->Clear( TRUE );
+ pImpCursor->Clear( sal_True );
SvIcnVwDataEntry* pViewData = ICNVIEWDATA(pEntry);
CheckSizes( pEntry, pViewData );
if( pView->IsUpdateMode() )
@@ -911,11 +911,11 @@ void SvImpIconView::RemovingEntry( SvLBoxEntry* pEntry )
if( pEntry == pCursor )
{
SvLBoxEntry* pNewCursor = GetNewCursor();
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
pCursor = 0; // damit er nicht deselektiert wird
SetCursor( pNewCursor );
}
- USHORT nPos = pZOrderList->GetPos( (void*)pEntry );
+ sal_uInt16 nPos = pZOrderList->GetPos( (void*)pEntry );
pZOrderList->Remove( nPos, 1 );
pImpCursor->Clear();
}
@@ -958,7 +958,7 @@ void SvImpIconView::MovingEntry( SvLBoxEntry* pEntry )
void SvImpIconView::EntryMoved( SvLBoxEntry* pEntry )
{
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
SvIcnVwDataEntry* pViewData = ICNVIEWDATA(pEntry);
if( pModel->GetParent(pEntry)==pCurParent )
{
@@ -986,9 +986,9 @@ void SvImpIconView::EntryMoved( SvLBoxEntry* pEntry )
SetCursor( pNextCursor );
}
pImpCursor->Clear();
- USHORT nPos = pZOrderList->GetPos( (void*)pEntry );
+ sal_uInt16 nPos = pZOrderList->GetPos( (void*)pEntry );
pZOrderList->Remove( nPos, 1 );
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
// wenn er nochmal in dieser View auftaucht, muss sein
// Bounding-Rect neu berechnet werden
InvalidateBoundingRect( pViewData->aRect );
@@ -1013,7 +1013,7 @@ void SvImpIconView::CollapsingEntry( SvLBoxEntry* )
{
}
-void SvImpIconView::EntrySelected( SvLBoxEntry* pEntry, BOOL bSelect )
+void SvImpIconView::EntrySelected( SvLBoxEntry* pEntry, sal_Bool bSelect )
{
if( pModel->GetParent(pEntry) != pCurParent )
return;
@@ -1033,13 +1033,13 @@ void SvImpIconView::EntrySelected( SvLBoxEntry* pEntry, BOOL bSelect )
if( pView->IsUpdateMode() )
{
if( pEntry == pCursor )
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
if( nFlags & F_RUBBERING )
PaintEntry( pEntry );
else
pView->Invalidate( GetBoundingRect( pEntry ) );
if( pEntry == pCursor )
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
}
@@ -1131,7 +1131,7 @@ void SvImpIconView::ResetVirtSize()
StopEditTimer();
aVirtOutputSize.Width() = 0;
aVirtOutputSize.Height() = 0;
- BOOL bLockedEntryFound = FALSE;
+ sal_Bool bLockedEntryFound = sal_False;
nFlags &= (~F_GRID_INSERT);
SvLBoxEntry* pCur = pModel->FirstChild( pCurParent );
while( pCur )
@@ -1144,7 +1144,7 @@ void SvImpIconView::ResetVirtSize()
FindBoundingRect( pCur, pViewData );
else
AdjustVirtSize( pViewData->aRect );
- bLockedEntryFound = TRUE;
+ bLockedEntryFound = sal_True;
}
else
InvalidateBoundingRect( pViewData->aRect );
@@ -1198,16 +1198,16 @@ void SvImpIconView::Arrange()
void SvImpIconView::ImpArrange()
{
StopEditTimer();
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
ResetVirtSize();
- bMustRecalcBoundingRects = FALSE;
+ bMustRecalcBoundingRects = sal_False;
MapMode aMapMode( pView->GetMapMode());
aMapMode.SetOrigin( Point() );
pView->SetMapMode( aMapMode );
CheckAllSizes();
RecalcAllBoundingRectsSmart();
pView->Invalidate();
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
void SvImpIconView::Paint( const Rectangle& rRect )
@@ -1249,14 +1249,14 @@ void SvImpIconView::Paint( const Rectangle& rRect )
if( !pCursor )
pCursor = pModel->FirstChild( pCurParent );
- USHORT nCount = pZOrderList->Count();
+ sal_uInt16 nCount = pZOrderList->Count();
if( !nCount )
return;
SvPtrarr* pNewZOrderList = new SvPtrarr;
SvPtrarr* pPaintedEntries = new SvPtrarr;
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
while( nCount )
{
SvLBoxEntry* pEntry = (SvLBoxEntry*)(pZOrderList->GetObject(nPos ));
@@ -1279,7 +1279,7 @@ void SvImpIconView::Paint( const Rectangle& rRect )
nCount = pPaintedEntries->Count();
if( nCount )
{
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
pZOrderList->Insert( pPaintedEntries->GetObject( nCur ),pZOrderList->Count());
}
delete pPaintedEntries;
@@ -1289,7 +1289,7 @@ void SvImpIconView::Paint( const Rectangle& rRect )
PaintResizeRect( aRect );
}
-BOOL SvImpIconView::GetResizeRect( Rectangle& rRect )
+sal_Bool SvImpIconView::GetResizeRect( Rectangle& rRect )
{
if( aHorSBar.IsVisible() && aVerSBar.IsVisible() )
{
@@ -1300,9 +1300,9 @@ BOOL SvImpIconView::GetResizeRect( Rectangle& rRect )
aOrigin.Y() += aOutputSize.Height();
rRect.SetPos( aOrigin );
rRect.SetSize( Size( nVerSBarWidth, nHorSBarHeight));
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
void SvImpIconView::PaintResizeRect( const Rectangle& rRect )
@@ -1362,7 +1362,7 @@ void SvImpIconView::MouseButtonDown( const MouseEvent& rMEvt)
{
if( !rMEvt.IsMod1() ) // Ctrl
{
- pView->SelectAll( FALSE );
+ pView->SelectAll( sal_False );
ClearSelectedRectList();
}
else
@@ -1374,8 +1374,8 @@ void SvImpIconView::MouseButtonDown( const MouseEvent& rMEvt)
return;
}
- BOOL bSelected = pView->IsSelected( pEntry );
- BOOL bEditingEnabled = pView->IsInplaceEditingEnabled();
+ sal_Bool bSelected = pView->IsSelected( pEntry );
+ sal_Bool bEditingEnabled = pView->IsInplaceEditingEnabled();
if( rMEvt.GetClicks() == 2 )
{
@@ -1399,7 +1399,7 @@ void SvImpIconView::MouseButtonDown( const MouseEvent& rMEvt)
{
DeselectAllBut( pEntry );
SetCursor( pEntry );
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
if( bEditingEnabled && bSelected && !rMEvt.GetModifier() &&
rMEvt.IsLeft() && IsTextHit( pEntry, aDocPos ) )
{
@@ -1414,7 +1414,7 @@ void SvImpIconView::MouseButtonDown( const MouseEvent& rMEvt)
{
DeselectAllBut( pEntry );
SetCursor( pEntry );
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
}
else
{
@@ -1449,7 +1449,7 @@ void SvImpIconView::MouseButtonUp( const MouseEvent& rMEvt )
nFlags &= ~(F_RUBBERING | F_ADD_MODE);
}
- SvLBoxEntry* pEntry = pView->GetEntry( rMEvt.GetPosPixel(), TRUE );
+ SvLBoxEntry* pEntry = pView->GetEntry( rMEvt.GetPosPixel(), sal_True );
if( pEntry )
{
if( nFlags & F_DOWN_CTRL )
@@ -1462,7 +1462,7 @@ void SvImpIconView::MouseButtonUp( const MouseEvent& rMEvt )
{
DeselectAllBut( pEntry );
SetCursor( pEntry );
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
}
}
@@ -1498,12 +1498,12 @@ void SvImpIconView::MouseMove( const MouseEvent& rMEvt )
long nScrollDX, nScrollDY;
- CalcScrollOffsets(rMEvt.GetPosPixel(),nScrollDX,nScrollDY,FALSE );
- BOOL bSelRectHidden = FALSE;
+ CalcScrollOffsets(rMEvt.GetPosPixel(),nScrollDX,nScrollDY,sal_False );
+ sal_Bool bSelRectHidden = sal_False;
if( nScrollDX || nScrollDY )
{
HideSelectionRect();
- bSelRectHidden = TRUE;
+ bSelRectHidden = sal_True;
pView->Scroll( nScrollDX, nScrollDY );
}
Point aDocPos( rMEvt.GetPosPixel() );
@@ -1512,8 +1512,8 @@ void SvImpIconView::MouseMove( const MouseEvent& rMEvt )
if( aRect != aCurSelectionRect )
{
HideSelectionRect();
- bSelRectHidden = TRUE;
- BOOL bAdd = (nFlags & F_ADD_MODE) ? TRUE : FALSE;
+ bSelRectHidden = sal_True;
+ sal_Bool bAdd = (nFlags & F_ADD_MODE) ? sal_True : sal_False;
SelectRect( aRect, bAdd, &aSelectedRectList );
}
if( bSelRectHidden )
@@ -1521,32 +1521,32 @@ void SvImpIconView::MouseMove( const MouseEvent& rMEvt )
}
}
-BOOL SvImpIconView::KeyInput( const KeyEvent& rKEvt )
+sal_Bool SvImpIconView::KeyInput( const KeyEvent& rKEvt )
{
StopEditTimer();
- BOOL bKeyUsed = TRUE;
- BOOL bMod1 = rKEvt.GetKeyCode().IsMod1();
- BOOL bInAddMode = (BOOL)((nFlags & F_ADD_MODE) != 0);
+ sal_Bool bKeyUsed = sal_True;
+ sal_Bool bMod1 = rKEvt.GetKeyCode().IsMod1();
+ sal_Bool bInAddMode = (sal_Bool)((nFlags & F_ADD_MODE) != 0);
int bDeselAll = (pView->GetSelectionMode() != SINGLE_SELECTION) &&
!bInAddMode;
SvLBoxEntry* pNewCursor;
- USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
switch( nCode )
{
case KEY_UP:
if( pCursor )
{
MakeVisible( pCursor );
- pNewCursor = pImpCursor->GoUpDown(pCursor,FALSE);
+ pNewCursor = pImpCursor->GoUpDown(pCursor,sal_False);
if( pNewCursor )
{
if( bDeselAll )
- pView->SelectAll( FALSE );
- ShowCursor( FALSE );
+ pView->SelectAll( sal_False );
+ ShowCursor( sal_False );
MakeVisible( pNewCursor );
SetCursor( pNewCursor );
if( !bInAddMode )
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
}
else
{
@@ -1564,17 +1564,17 @@ BOOL SvImpIconView::KeyInput( const KeyEvent& rKEvt )
case KEY_DOWN:
if( pCursor )
{
- pNewCursor=pImpCursor->GoUpDown( pCursor,TRUE );
+ pNewCursor=pImpCursor->GoUpDown( pCursor,sal_True );
if( pNewCursor )
{
MakeVisible( pCursor );
if( bDeselAll )
- pView->SelectAll( FALSE );
- ShowCursor( FALSE );
+ pView->SelectAll( sal_False );
+ ShowCursor( sal_False );
MakeVisible( pNewCursor );
SetCursor( pNewCursor );
if( !bInAddMode )
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
}
}
break;
@@ -1582,17 +1582,17 @@ BOOL SvImpIconView::KeyInput( const KeyEvent& rKEvt )
case KEY_RIGHT:
if( pCursor )
{
- pNewCursor=pImpCursor->GoLeftRight(pCursor,TRUE );
+ pNewCursor=pImpCursor->GoLeftRight(pCursor,sal_True );
if( pNewCursor )
{
MakeVisible( pCursor );
if( bDeselAll )
- pView->SelectAll( FALSE );
- ShowCursor( FALSE );
+ pView->SelectAll( sal_False );
+ ShowCursor( sal_False );
MakeVisible( pNewCursor );
SetCursor( pNewCursor );
if( !bInAddMode )
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
}
}
break;
@@ -1601,16 +1601,16 @@ BOOL SvImpIconView::KeyInput( const KeyEvent& rKEvt )
if( pCursor )
{
MakeVisible( pCursor );
- pNewCursor = pImpCursor->GoLeftRight(pCursor,FALSE );
+ pNewCursor = pImpCursor->GoLeftRight(pCursor,sal_False );
if( pNewCursor )
{
if( bDeselAll )
- pView->SelectAll( FALSE );
- ShowCursor( FALSE );
+ pView->SelectAll( sal_False );
+ ShowCursor( sal_False );
MakeVisible( pNewCursor );
SetCursor( pNewCursor );
if( !bInAddMode )
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
}
else
{
@@ -1629,7 +1629,7 @@ BOOL SvImpIconView::KeyInput( const KeyEvent& rKEvt )
if( nFlags & F_RUBBERING )
{
HideSelectionRect();
- pView->SelectAll( FALSE );
+ pView->SelectAll( sal_False );
nFlags &= ~F_RUBBERING;
}
break;
@@ -1670,13 +1670,13 @@ BOOL SvImpIconView::KeyInput( const KeyEvent& rKEvt )
case KEY_ADD:
case KEY_DIVIDE :
if( bMod1 )
- pView->SelectAll( TRUE );
+ pView->SelectAll( sal_True );
break;
case KEY_SUBTRACT:
case KEY_COMMA :
if( bMod1 )
- pView->SelectAll( FALSE );
+ pView->SelectAll( sal_False );
break;
case KEY_RETURN:
@@ -1688,7 +1688,7 @@ BOOL SvImpIconView::KeyInput( const KeyEvent& rKEvt )
break;
default:
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
}
return bKeyUsed;
@@ -1756,7 +1756,7 @@ void SvImpIconView::AdjustScrollBars()
bool bVerSBar = (pView->GetStyle() & WB_VSCROLL) ? true : false;
bool bHorSBar = (pView->GetStyle() & WB_HSCROLL) ? true : false;
- USHORT nResult = 0;
+ sal_uInt16 nResult = 0;
if( nVirtHeight )
{
// activate ver scrollbar ?
@@ -1896,23 +1896,23 @@ void __EXPORT SvImpIconView::Resize()
#endif
}
-BOOL SvImpIconView::CheckHorScrollBar()
+sal_Bool SvImpIconView::CheckHorScrollBar()
{
if( !pZOrderList || !aHorSBar.IsVisible() )
- return FALSE;
+ return sal_False;
const MapMode& rMapMode = pView->GetMapMode();
Point aOrigin( rMapMode.GetOrigin() );
if(!(pView->GetStyle() & WB_HSCROLL) && !aOrigin.X() )
{
long nWidth = aOutputSize.Width();
- USHORT nCount = pZOrderList->Count();
+ sal_uInt16 nCount = pZOrderList->Count();
long nMostRight = 0;
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
SvLBoxEntry* pEntry = (SvLBoxEntry*)pZOrderList->operator[](nCur);
long nRight = GetBoundingRect(pEntry).Right();
if( nRight > nWidth )
- return FALSE;
+ return sal_False;
if( nRight > nMostRight )
nMostRight = nRight;
}
@@ -1929,28 +1929,28 @@ BOOL SvImpIconView::CheckHorScrollBar()
aSize.Height() += nHorSBarHeight;
aVerSBar.SetSizePixel( aSize );
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SvImpIconView::CheckVerScrollBar()
+sal_Bool SvImpIconView::CheckVerScrollBar()
{
if( !pZOrderList || !aVerSBar.IsVisible() )
- return FALSE;
+ return sal_False;
const MapMode& rMapMode = pView->GetMapMode();
Point aOrigin( rMapMode.GetOrigin() );
if(!(pView->GetStyle() & WB_VSCROLL) && !aOrigin.Y() )
{
long nDeepest = 0;
long nHeight = aOutputSize.Height();
- USHORT nCount = pZOrderList->Count();
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ sal_uInt16 nCount = pZOrderList->Count();
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
SvLBoxEntry* pEntry = (SvLBoxEntry*)pZOrderList->operator[](nCur);
long nBottom = GetBoundingRect(pEntry).Bottom();
if( nBottom > nHeight )
- return FALSE;
+ return sal_False;
if( nBottom > nDeepest )
nDeepest = nBottom;
}
@@ -1967,9 +1967,9 @@ BOOL SvImpIconView::CheckVerScrollBar()
aSize.Width() += nVerSBarWidth;
aHorSBar.SetSizePixel( aSize );
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -1986,8 +1986,8 @@ void __EXPORT SvImpIconView::GetFocus()
{
if( pCursor )
{
- pView->SetEntryFocus( pCursor, TRUE );
- ShowCursor( TRUE );
+ pView->SetEntryFocus( pCursor, sal_True );
+ ShowCursor( sal_True );
}
}
@@ -1995,8 +1995,8 @@ void __EXPORT SvImpIconView::LoseFocus()
{
StopEditTimer();
if( pCursor )
- pView->SetEntryFocus( pCursor,FALSE );
- ShowCursor( FALSE );
+ pView->SetEntryFocus( pCursor,sal_False );
+ ShowCursor( sal_False );
}
void SvImpIconView::UpdateAll()
@@ -2012,8 +2012,8 @@ void SvImpIconView::PaintEntry( SvLBoxEntry* pEntry, SvIcnVwDataEntry* pViewData
PaintEntry( pEntry, aPos, pViewData );
}
-void SvImpIconView::PaintEmphasis( const Rectangle& rRect, BOOL bSelected,
- BOOL bCursored, OutputDevice* pOut )
+void SvImpIconView::PaintEmphasis( const Rectangle& rRect, sal_Bool bSelected,
+ sal_Bool bCursored, OutputDevice* pOut )
{
// HACK fuer D&D
if( nFlags & F_NO_EMPHASIS )
@@ -2051,7 +2051,7 @@ void SvImpIconView::PaintEmphasis( const Rectangle& rRect, BOOL bSelected,
}
void SvImpIconView::PaintItem( const Rectangle& rRect,
- SvLBoxItem* pItem, SvLBoxEntry* pEntry, USHORT nPaintFlags,
+ SvLBoxItem* pItem, SvLBoxEntry* pEntry, sal_uInt16 nPaintFlags,
OutputDevice* pOut )
{
if( nViewMode == VIEWMODE_ICON && pItem->IsA() == SV_ITEM_ID_LBOXSTRING )
@@ -2089,8 +2089,8 @@ void SvImpIconView::PaintEntry( SvLBoxEntry* pEntry, const Point& rPos,
SvLBoxString* pStringItem = (SvLBoxString*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXSTRING));
- BOOL bSelected = pViewData->IsSelected();
- BOOL bCursored = pViewData->IsCursored();
+ sal_Bool bSelected = pViewData->IsSelected();
+ sal_Bool bCursored = pViewData->IsCursored();
Font aTempFont( pOut->GetFont() );
// waehrend D&D nicht die Fontfarbe wechseln, da sonst auch die
@@ -2102,7 +2102,7 @@ void SvImpIconView::PaintEntry( SvLBoxEntry* pEntry, const Point& rPos,
aNewFont.SetColor( rStyleSettings.GetHighlightTextColor() );
pOut->SetFont( aNewFont );
}
- Rectangle aTextRect( CalcTextRect(pEntry,pStringItem,&rPos,FALSE,pViewData));
+ Rectangle aTextRect( CalcTextRect(pEntry,pStringItem,&rPos,sal_False,pViewData));
Rectangle aBmpRect( CalcBmpRect(pEntry, &rPos, pViewData ) );
switch( nViewMode )
@@ -2112,7 +2112,7 @@ void SvImpIconView::PaintEntry( SvLBoxEntry* pEntry, const Point& rPos,
PaintEmphasis( aBmpRect, bSelected, bCursored, pOut );
PaintItem( aBmpRect, pBmpItem, pEntry,
PAINTFLAG_HOR_CENTERED | PAINTFLAG_VER_CENTERED, pOut );
- PaintEmphasis( aTextRect, bSelected, FALSE, pOut );
+ PaintEmphasis( aTextRect, bSelected, sal_False, pOut );
PaintItem( aTextRect, pStringItem, pEntry, PAINTFLAG_HOR_CENTERED, pOut );
break;
@@ -2120,7 +2120,7 @@ void SvImpIconView::PaintEntry( SvLBoxEntry* pEntry, const Point& rPos,
pBmpItem = (SvLBoxContextBmp*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXCONTEXTBMP));
PaintEmphasis( aBmpRect, bSelected, bCursored, pOut );
PaintItem( aBmpRect, pBmpItem, pEntry, PAINTFLAG_VER_CENTERED, pOut );
- PaintEmphasis( aTextRect, bSelected, FALSE, pOut );
+ PaintEmphasis( aTextRect, bSelected, sal_False, pOut );
PaintItem( aTextRect, pStringItem, pEntry,PAINTFLAG_VER_CENTERED, pOut );
break;
@@ -2133,11 +2133,11 @@ void SvImpIconView::PaintEntry( SvLBoxEntry* pEntry, const Point& rPos,
}
void SvImpIconView::SetEntryPosition( SvLBoxEntry* pEntry, const Point& rPos,
- BOOL bAdjustAtGrid, BOOL bCheckScrollBars )
+ sal_Bool bAdjustAtGrid, sal_Bool bCheckScrollBars )
{
if( pModel->GetParent(pEntry) == pCurParent )
{
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
SvIcnVwDataEntry* pViewData = ICNVIEWDATA(pEntry);
Rectangle aBoundRect( GetBoundingRect( pEntry, pViewData ));
pView->Invalidate( aBoundRect );
@@ -2163,7 +2163,7 @@ void SvImpIconView::SetEntryPosition( SvLBoxEntry* pEntry, const Point& rPos,
CheckScrollBars();
PaintEntry( pEntry, pViewData );
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
}
@@ -2174,7 +2174,7 @@ void SvImpIconView::ViewDataInitialized( SvLBoxEntry*)
void SvImpIconView::ModelHasEntryInvalidated( SvListEntry* pEntry )
{
if( pEntry == pCursor )
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
SvIcnVwDataEntry* pViewData = ICNVIEWDATA(pEntry);
pView->Invalidate( pViewData->aRect );
@@ -2187,7 +2187,7 @@ void SvImpIconView::ModelHasEntryInvalidated( SvListEntry* pEntry )
ViewDataInitialized( (SvLBoxEntry*)pEntry );
pView->Invalidate( pViewData->aRect );
if( pEntry == pCursor )
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
@@ -2209,9 +2209,9 @@ void SvImpIconView::SetSelectionMode( SelectionMode )
{
}
-BOOL SvImpIconView::IsEntryInView( SvLBoxEntry* )
+sal_Bool SvImpIconView::IsEntryInView( SvLBoxEntry* )
{
- return FALSE;
+ return sal_False;
}
SvLBoxEntry* SvImpIconView::GetDropTarget( const Point& rPos )
@@ -2229,7 +2229,7 @@ SvLBoxEntry* SvImpIconView::GetEntry( const Point& rDocPos )
CheckBoundingRects();
SvLBoxEntry* pTarget = 0;
// Z-Order-Liste vom Ende her absuchen
- USHORT nCount = pZOrderList->Count();
+ sal_uInt16 nCount = pZOrderList->Count();
while( nCount )
{
nCount--;
@@ -2248,11 +2248,11 @@ SvLBoxEntry* SvImpIconView::GetNextEntry( const Point& rDocPos, SvLBoxEntry* pCu
{
CheckBoundingRects();
SvLBoxEntry* pTarget = 0;
- USHORT nStartPos = pZOrderList->GetPos( (void*)pCurEntry );
+ sal_uInt16 nStartPos = pZOrderList->GetPos( (void*)pCurEntry );
if( nStartPos != USHRT_MAX )
{
- USHORT nCount = pZOrderList->Count();
- for( USHORT nCur = nStartPos+1; nCur < nCount; nCur++ )
+ sal_uInt16 nCount = pZOrderList->Count();
+ for( sal_uInt16 nCur = nStartPos+1; nCur < nCount; nCur++ )
{
SvLBoxEntry* pEntry = (SvLBoxEntry*)(pZOrderList->GetObject(nCur));
SvIcnVwDataEntry* pViewData = ICNVIEWDATA(pEntry);
@@ -2270,7 +2270,7 @@ SvLBoxEntry* SvImpIconView::GetPrevEntry( const Point& rDocPos, SvLBoxEntry* pCu
{
CheckBoundingRects();
SvLBoxEntry* pTarget = 0;
- USHORT nStartPos = pZOrderList->GetPos( (void*)pCurEntry );
+ sal_uInt16 nStartPos = pZOrderList->GetPos( (void*)pCurEntry );
if( nStartPos != USHRT_MAX && nStartPos != 0 )
{
nStartPos--;
@@ -2350,7 +2350,7 @@ Rectangle SvImpIconView::CalcBmpRect( SvLBoxEntry* pEntry, const Point* pPos,
}
Rectangle SvImpIconView::CalcTextRect( SvLBoxEntry* pEntry,
- SvLBoxString* pItem, const Point* pPos, BOOL bForInplaceEdit,
+ SvLBoxString* pItem, const Point* pPos, sal_Bool bForInplaceEdit,
SvIcnVwDataEntry* pViewData )
{
long nBmpHeight, nBmpWidth;
@@ -2503,7 +2503,7 @@ void SvImpIconView::RecalcAllBoundingRects()
pZOrderList->Insert( pEntry, pZOrderList->Count() );
pEntry = pModel->NextSibling( pEntry );
}
- bMustRecalcBoundingRects = FALSE;
+ bMustRecalcBoundingRects = sal_False;
AdjustScrollBars();
}
@@ -2582,26 +2582,26 @@ void SvImpIconView::SetCursor( SvLBoxEntry* pEntry )
if( pEntry == pCursor )
return;
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
if( pCursor )
{
- pView->SetEntryFocus( pCursor, FALSE );
+ pView->SetEntryFocus( pCursor, sal_False );
if( pView->GetSelectionMode() == SINGLE_SELECTION )
- pView->Select( pCursor, FALSE );
+ pView->Select( pCursor, sal_False );
}
pCursor = pEntry;
ToTop( pCursor );
if( pCursor )
{
- pView->SetEntryFocus(pCursor, TRUE );
+ pView->SetEntryFocus(pCursor, sal_True );
if( pView->GetSelectionMode() == SINGLE_SELECTION )
- pView->Select( pCursor, TRUE );
- ShowCursor( TRUE );
+ pView->Select( pCursor, sal_True );
+ ShowCursor( sal_True );
}
}
-void SvImpIconView::ShowCursor( BOOL bShow )
+void SvImpIconView::ShowCursor( sal_Bool bShow )
{
if( !pCursor || !bShow || !pView->HasFocus() )
{
@@ -2640,7 +2640,7 @@ void SvImpIconView::ShowDDIcon( SvLBoxEntry* pRefEntry, const Point& rPosPix )
DELETEZ(pDDDev);
DELETEZ(pDDBufDev);
}
- BOOL bSelected = pView->SvListView::Select( pRefEntry, FALSE );
+ sal_Bool bSelected = pView->SvListView::Select( pRefEntry, sal_False );
if( !pDDDev )
{
if( pDDBufDev )
@@ -2678,7 +2678,7 @@ void SvImpIconView::ShowDDIcon( SvLBoxEntry* pRefEntry, const Point& rPosPix )
PaintEntry( pRefEntry, aPos );
nFlags &= ~F_NO_EMPHASIS;
if( bSelected )
- pView->SvListView::Select( pRefEntry, TRUE );
+ pView->SvListView::Select( pRefEntry, sal_True );
}
void SvImpIconView::HideShowDDIcon( SvLBoxEntry* pRefEntry, const Point& rPosPix )
@@ -2769,12 +2769,12 @@ void SvImpIconView::HideShowDDIcon( SvLBoxEntry* pRefEntry, const Point& rPosPix
pDDDev->GetOutputSizePixel(),
*pDDTempDev );
- BOOL bSelected = pView->SvListView::Select( pRefEntry, FALSE );
+ sal_Bool bSelected = pView->SvListView::Select( pRefEntry, sal_False );
if( bSelected )
- pView->SvListView::Select( pRefEntry, TRUE );
+ pView->SvListView::Select( pRefEntry, sal_True );
}
-void SvImpIconView::ShowTargetEmphasis( SvLBoxEntry* pEntry, BOOL )
+void SvImpIconView::ShowTargetEmphasis( SvLBoxEntry* pEntry, sal_Bool )
{
CheckBoundingRects();
Rectangle aRect;
@@ -2794,8 +2794,8 @@ void SvImpIconView::ShowTargetEmphasis( SvLBoxEntry* pEntry, BOOL )
ImpDrawXORRect( aRect );
}
-BOOL SvImpIconView::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewPar, ULONG& rNewChildPos )
+sal_Bool SvImpIconView::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+ SvLBoxEntry*& rpNewPar, sal_uLong& rNewChildPos )
{
if( pTarget == pCurParent && pModel->GetParent(pEntry) == pCurParent )
{
@@ -2805,14 +2805,14 @@ BOOL SvImpIconView::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
Size aSize( pViewData->aRect.GetSize() );
Point aNewPos = FindNextEntryPos( aSize );
AdjustVirtSize( Rectangle( aNewPos, aSize ) );
- SetEntryPosition( pEntry, aNewPos, FALSE, TRUE );
- return FALSE;
+ SetEntryPosition( pEntry, aNewPos, sal_False, sal_True );
+ return sal_False;
}
return pView->SvLBox::NotifyMoving(pTarget,pEntry,rpNewPar,rNewChildPos);
}
-BOOL SvImpIconView::NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos )
+sal_Bool SvImpIconView::NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+ SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos )
{
return pView->SvLBox::NotifyCopying(pTarget,pEntry,rpNewParent,rNewChildPos);
}
@@ -2849,9 +2849,9 @@ void SvImpIconView::PrepareCommandEvent( const Point& rPt )
aMouseMoveTimer.Stop();
StopEditTimer();
nFlags |= F_CMD_ARRIVED;
- SvLBoxEntry* pEntry = pView->GetEntry( rPt, TRUE );
+ SvLBoxEntry* pEntry = pView->GetEntry( rPt, sal_True );
if( (nFlags & F_DOWN_CTRL) && pEntry && !pView->IsSelected(pEntry) )
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
nFlags &= ~(F_DOWN_CTRL | F_DOWN_DESELECT);
}
@@ -2860,12 +2860,12 @@ void SvImpIconView::SttDrag( const Point& rPos )
PrepareCommandEvent( rPos );
nFlags |= F_DRAG_SOURCE;
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
}
void SvImpIconView::EndDrag()
{
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
nFlags &= (~F_DRAG_SOURCE);
}
@@ -2874,7 +2874,7 @@ void SvImpIconView::ToTop( SvLBoxEntry* pEntry )
DBG_ASSERT(pZOrderList->GetPos(pEntry)!=0xffff,"ToTop:ZOrder?");
if( pZOrderList->GetObject( pZOrderList->Count() -1 ) != pEntry )
{
- USHORT nPos = pZOrderList->GetPos( (void*)pEntry );
+ sal_uInt16 nPos = pZOrderList->GetPos( (void*)pEntry );
pZOrderList->Remove( nPos, 1 );
pZOrderList->Insert( pEntry, pZOrderList->Count() );
}
@@ -2901,9 +2901,9 @@ void SvImpIconView::ClipAtVirtOutRect( Rectangle& rRect ) const
// rRect: Bereich des Dokumentes (in Dokumentkoordinaten), der
// sichtbar gemacht werden soll.
-// bScrBar == TRUE: Das Rect wurde aufgrund eines ScrollBar-Events berechnet
+// bScrBar == sal_True: Das Rect wurde aufgrund eines ScrollBar-Events berechnet
-void SvImpIconView::MakeVisible( const Rectangle& rRect, BOOL bScrBar )
+void SvImpIconView::MakeVisible( const Rectangle& rRect, sal_Bool bScrBar )
{
Rectangle aRect( rRect );
ClipAtVirtOutRect( aRect );
@@ -2957,7 +2957,7 @@ void SvImpIconView::MakeVisible( const Rectangle& rRect, BOOL bScrBar )
pView->SetMapMode( aMapMode );
// in umgekehrte Richtung scrollen!
- pView->Control::Scroll( -nDx, -nDy, aOutputArea, TRUE );
+ pView->Control::Scroll( -nDx, -nDy, aOutputArea, sal_True );
if( aHorSBar.IsVisible() || aVerSBar.IsVisible() )
{
if( !bScrBar )
@@ -2981,15 +2981,15 @@ SvLBoxEntry* SvImpIconView::GetNewCursor()
SvLBoxEntry* pNewCursor;
if( pCursor )
{
- pNewCursor = pImpCursor->GoLeftRight( pCursor, FALSE );
+ pNewCursor = pImpCursor->GoLeftRight( pCursor, sal_False );
if( !pNewCursor )
{
- pNewCursor = pImpCursor->GoLeftRight( pCursor, TRUE );
+ pNewCursor = pImpCursor->GoLeftRight( pCursor, sal_True );
if( !pNewCursor )
{
- pNewCursor = pImpCursor->GoUpDown( pCursor, FALSE );
+ pNewCursor = pImpCursor->GoUpDown( pCursor, sal_False );
if( !pNewCursor )
- pNewCursor = pImpCursor->GoUpDown( pCursor, TRUE );
+ pNewCursor = pImpCursor->GoUpDown( pCursor, sal_True );
}
}
}
@@ -3000,9 +3000,9 @@ SvLBoxEntry* SvImpIconView::GetNewCursor()
}
-USHORT SvImpIconView:: GetSelectionCount() const
+sal_uInt16 SvImpIconView:: GetSelectionCount() const
{
- USHORT nSelected = 0;
+ sal_uInt16 nSelected = 0;
SvLBoxEntry* pEntry = pModel->FirstChild( pCurParent);
while( pEntry )
{
@@ -3016,11 +3016,11 @@ USHORT SvImpIconView:: GetSelectionCount() const
void SvImpIconView::ToggleSelection( SvLBoxEntry* pEntry )
{
- BOOL bSel;
+ sal_Bool bSel;
if( pView->IsSelected( pEntry ) )
- bSel = FALSE;
+ bSel = sal_False;
else
- bSel = TRUE;
+ bSel = sal_True;
pView->Select( pEntry, bSel );
}
@@ -3031,7 +3031,7 @@ void SvImpIconView::DeselectAllBut( SvLBoxEntry* pThisEntryNot )
while( pEntry )
{
if( pEntry != pThisEntryNot && pView->IsSelected( pEntry ))
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
pEntry = pModel->NextSibling( pEntry );
}
}
@@ -3061,14 +3061,14 @@ ImpIcnCursor::~ImpIcnCursor()
delete pGridMap;
}
-USHORT ImpIcnCursor::GetSortListPos( SvPtrarr* pList, long nValue,
+sal_uInt16 ImpIcnCursor::GetSortListPos( SvPtrarr* pList, long nValue,
int bVertical )
{
- USHORT nCount = (USHORT)pList->Count();
+ sal_uInt16 nCount = (sal_uInt16)pList->Count();
if( !nCount )
return 0;
- USHORT nCurPos = 0;
+ sal_uInt16 nCurPos = 0;
long nPrevValue = LONG_MIN;
while( nCount )
{
@@ -3080,7 +3080,7 @@ USHORT ImpIcnCursor::GetSortListPos( SvPtrarr* pList, long nValue,
else
nCurValue = rRect.Left();
if( nValue >= nPrevValue && nValue <= nCurValue )
- return (USHORT)nCurPos;
+ return (sal_uInt16)nCurPos;
nPrevValue = nCurValue;
nCount--;
nCurPos++;
@@ -3116,10 +3116,10 @@ void ImpIcnCursor::ImplCreate()
if( nX >= nCols )
nX = sal::static_int_cast< short >(nCols - 1);
- USHORT nIns = GetSortListPos( &pColumns[nX], rRect.Top(), TRUE );
+ sal_uInt16 nIns = GetSortListPos( &pColumns[nX], rRect.Top(), sal_True );
pColumns[ nX ].Insert( pEntry, nIns );
- nIns = GetSortListPos( &pRows[nY], rRect.Left(), FALSE );
+ nIns = GetSortListPos( &pRows[nY], rRect.Left(), sal_False );
pRows[ nY ].Insert( pEntry, nIns );
pViewData->nX = nX;
@@ -3163,7 +3163,7 @@ void ImpIcnCursor::CreateGridMap()
//XXX
//nGridRows += 50; // in fuenfziger-Schritten
- pGridMap = new BOOL[ nGridRows*nGridCols];
+ pGridMap = new sal_Bool[ nGridRows*nGridCols];
memset( (void*)pGridMap, 0, nGridRows*nGridCols );
SvLBoxTreeList* pModel = pView->pModel;
@@ -3182,49 +3182,49 @@ void ImpIcnCursor::CreateGridMap()
}
}
-BOOL ImpIcnCursor::GetGrid( const Point& rDocPos, USHORT& rGridX, USHORT& rGridY ) const
+sal_Bool ImpIcnCursor::GetGrid( const Point& rDocPos, sal_uInt16& rGridX, sal_uInt16& rGridY ) const
{
Point aPos( rDocPos );
aPos.X() -= LROFFS_WINBORDER;
aPos.Y() -= TBOFFS_WINBORDER;
- rGridX = (USHORT)(aPos.X() / nGridDX);
- rGridY = (USHORT)(aPos.Y() / nGridDY);
- BOOL bInGrid = TRUE;
+ rGridX = (sal_uInt16)(aPos.X() / nGridDX);
+ rGridY = (sal_uInt16)(aPos.Y() / nGridDY);
+ sal_Bool bInGrid = sal_True;
if( rGridX >= nGridCols )
{
- rGridX = sal::static_int_cast< USHORT >(nGridCols - 1);
- bInGrid = FALSE;
+ rGridX = sal::static_int_cast< sal_uInt16 >(nGridCols - 1);
+ bInGrid = sal_False;
}
if( rGridY >= nGridRows )
{
- rGridY = sal::static_int_cast< USHORT >(nGridRows - 1);
+ rGridY = sal::static_int_cast< sal_uInt16 >(nGridRows - 1);
if( !bInGrid )
- return FALSE; // beide Koordinaten nicht im Grid
+ return sal_False; // beide Koordinaten nicht im Grid
}
- return TRUE;
+ return sal_True;
}
-void ImpIcnCursor::SetGridUsed( const Rectangle& rRect, BOOL bUsed )
+void ImpIcnCursor::SetGridUsed( const Rectangle& rRect, sal_Bool bUsed )
{
CreateGridMap();
- USHORT nTLX, nTLY, nBRX, nBRY;
+ sal_uInt16 nTLX, nTLY, nBRX, nBRY;
- BOOL bTLInGrid = GetGrid( rRect.TopLeft(), nTLX, nTLY );
- BOOL bBRInGrid = GetGrid( rRect.BottomRight(), nBRX, nBRY );
+ sal_Bool bTLInGrid = GetGrid( rRect.TopLeft(), nTLX, nTLY );
+ sal_Bool bBRInGrid = GetGrid( rRect.BottomRight(), nBRX, nBRY );
if( !bTLInGrid && !bBRInGrid )
return;
- for( USHORT nCurY = nTLY; nCurY <= nBRY; nCurY++ )
+ for( sal_uInt16 nCurY = nTLY; nCurY <= nBRY; nCurY++ )
{
- for( USHORT nCurX = nTLX; nCurX <= nBRX; nCurX++ )
+ for( sal_uInt16 nCurX = nTLX; nCurX <= nBRX; nCurX++ )
{
SetGridUsed( nCurX, nCurY, bUsed );
}
}
}
-void ImpIcnCursor::Clear( BOOL bGridToo )
+void ImpIcnCursor::Clear( sal_Bool bGridToo )
{
if( pColumns )
{
@@ -3244,12 +3244,12 @@ void ImpIcnCursor::Clear( BOOL bGridToo )
}
}
-SvLBoxEntry* ImpIcnCursor::SearchCol(USHORT nCol,USHORT nTop,USHORT nBottom,
- USHORT, BOOL bDown, BOOL bSimple )
+SvLBoxEntry* ImpIcnCursor::SearchCol(sal_uInt16 nCol,sal_uInt16 nTop,sal_uInt16 nBottom,
+ sal_uInt16, sal_Bool bDown, sal_Bool bSimple )
{
DBG_ASSERT(pCurEntry,"SearchCol: No reference entry");
SvPtrarr* pList = &(pColumns[ nCol ]);
- USHORT nCount = pList->Count();
+ sal_uInt16 nCount = pList->Count();
if( !nCount )
return 0;
@@ -3257,7 +3257,7 @@ SvLBoxEntry* ImpIcnCursor::SearchCol(USHORT nCol,USHORT nTop,USHORT nBottom,
if( bSimple )
{
- USHORT nListPos = pList->GetPos( pCurEntry );
+ sal_uInt16 nListPos = pList->GetPos( pCurEntry );
DBG_ASSERT(nListPos!=0xffff,"Entry not in Col-List");
if( bDown )
{
@@ -3290,19 +3290,19 @@ SvLBoxEntry* ImpIcnCursor::SearchCol(USHORT nCol,USHORT nTop,USHORT nBottom,
if( nTop > nBottom )
{
- USHORT nTemp = nTop;
+ sal_uInt16 nTemp = nTop;
nTop = nBottom;
nBottom = nTemp;
}
long nMinDistance = LONG_MAX;
SvLBoxEntry* pResult = 0;
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
SvLBoxEntry* pEntry = (SvLBoxEntry*)(pList->GetObject( nCur ));
if( pEntry != pCurEntry )
{
SvIcnVwDataEntry* pViewData = ICNVIEWDATA2(pEntry);
- USHORT nY = pViewData->nY;
+ sal_uInt16 nY = pViewData->nY;
if( nY >= nTop && nY <= nBottom )
{
const Rectangle& rRect = pView->GetBoundingRect( pEntry );
@@ -3320,12 +3320,12 @@ SvLBoxEntry* ImpIcnCursor::SearchCol(USHORT nCol,USHORT nTop,USHORT nBottom,
return pResult;
}
-SvLBoxEntry* ImpIcnCursor::SearchRow(USHORT nRow,USHORT nLeft,USHORT nRight,
- USHORT, BOOL bRight, BOOL bSimple )
+SvLBoxEntry* ImpIcnCursor::SearchRow(sal_uInt16 nRow,sal_uInt16 nLeft,sal_uInt16 nRight,
+ sal_uInt16, sal_Bool bRight, sal_Bool bSimple )
{
DBG_ASSERT(pCurEntry,"SearchRow: No reference entry");
SvPtrarr* pList = &(pRows[ nRow ]);
- USHORT nCount = pList->Count();
+ sal_uInt16 nCount = pList->Count();
if( !nCount )
return 0;
@@ -3333,7 +3333,7 @@ SvLBoxEntry* ImpIcnCursor::SearchRow(USHORT nRow,USHORT nLeft,USHORT nRight,
if( bSimple )
{
- USHORT nListPos = pList->GetPos( pCurEntry );
+ sal_uInt16 nListPos = pList->GetPos( pCurEntry );
DBG_ASSERT(nListPos!=0xffff,"Entry not in Row-List");
if( bRight )
{
@@ -3366,19 +3366,19 @@ SvLBoxEntry* ImpIcnCursor::SearchRow(USHORT nRow,USHORT nLeft,USHORT nRight,
}
if( nRight < nLeft )
{
- USHORT nTemp = nRight;
+ sal_uInt16 nTemp = nRight;
nRight = nLeft;
nLeft = nTemp;
}
long nMinDistance = LONG_MAX;
SvLBoxEntry* pResult = 0;
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
SvLBoxEntry* pEntry = (SvLBoxEntry*)(pList->GetObject( nCur ));
if( pEntry != pCurEntry )
{
SvIcnVwDataEntry* pViewData = ICNVIEWDATA2(pEntry);
- USHORT nX = pViewData->nX;
+ sal_uInt16 nX = pViewData->nX;
if( nX >= nLeft && nX <= nRight )
{
const Rectangle& rRect = pView->GetBoundingRect( pEntry );
@@ -3400,7 +3400,7 @@ SvLBoxEntry* ImpIcnCursor::SearchRow(USHORT nRow,USHORT nLeft,USHORT nRight,
/*
Sucht ab dem uebergebenen Eintrag den naechsten rechts- bzw.
- linksstehenden. Suchverfahren am Beispiel bRight = TRUE:
+ linksstehenden. Suchverfahren am Beispiel bRight = sal_True:
c
b c
@@ -3415,22 +3415,22 @@ SvLBoxEntry* ImpIcnCursor::SearchRow(USHORT nRow,USHORT nLeft,USHORT nRight,
a,b,c : 2., 3., 4. Suchrechteck
*/
-SvLBoxEntry* ImpIcnCursor::GoLeftRight( SvLBoxEntry* pIcnEntry, BOOL bRight )
+SvLBoxEntry* ImpIcnCursor::GoLeftRight( SvLBoxEntry* pIcnEntry, sal_Bool bRight )
{
SvLBoxEntry* pResult;
pCurEntry = pIcnEntry;
Create();
SvIcnVwDataEntry* pViewData = ICNVIEWDATA2(pIcnEntry);
- USHORT nY = pViewData->nY;
- USHORT nX = pViewData->nX;
+ sal_uInt16 nY = pViewData->nY;
+ sal_uInt16 nX = pViewData->nX;
DBG_ASSERT(nY< nRows,"GoLeftRight:Bad column");
DBG_ASSERT(nX< nCols,"GoLeftRight:Bad row");
// Nachbar auf gleicher Zeile ?
if( bRight )
pResult = SearchRow(
- nY, nX, sal::static_int_cast< USHORT >(nCols-1), nX, TRUE, TRUE );
+ nY, nX, sal::static_int_cast< sal_uInt16 >(nCols-1), nX, sal_True, sal_True );
else
- pResult = SearchRow( nY, nX ,0, nX, FALSE, TRUE );
+ pResult = SearchRow( nY, nX ,0, nX, sal_False, sal_True );
if( pResult )
return pResult;
@@ -3448,11 +3448,11 @@ SvLBoxEntry* ImpIcnCursor::GoLeftRight( SvLBoxEntry* pIcnEntry, BOOL bRight )
nLastCol = -1; // 0-1
}
- USHORT nRowMin = nY;
- USHORT nRowMax = nY;
+ sal_uInt16 nRowMin = nY;
+ sal_uInt16 nRowMax = nY;
do
{
- SvLBoxEntry* pEntry = SearchCol((USHORT)nCurCol,nRowMin,nRowMax,nY,TRUE, FALSE);
+ SvLBoxEntry* pEntry = SearchCol((sal_uInt16)nCurCol,nRowMin,nRowMax,nY,sal_True, sal_False);
if( pEntry )
return pEntry;
if( nRowMin )
@@ -3464,23 +3464,23 @@ SvLBoxEntry* ImpIcnCursor::GoLeftRight( SvLBoxEntry* pIcnEntry, BOOL bRight )
return 0;
}
-SvLBoxEntry* ImpIcnCursor::GoUpDown( SvLBoxEntry* pIcnEntry, BOOL bDown)
+SvLBoxEntry* ImpIcnCursor::GoUpDown( SvLBoxEntry* pIcnEntry, sal_Bool bDown)
{
SvLBoxEntry* pResult;
pCurEntry = pIcnEntry;
Create();
SvIcnVwDataEntry* pViewData = ICNVIEWDATA2(pIcnEntry);
- USHORT nY = pViewData->nY;
- USHORT nX = pViewData->nX;
+ sal_uInt16 nY = pViewData->nY;
+ sal_uInt16 nX = pViewData->nX;
DBG_ASSERT(nY<nRows,"GoUpDown:Bad column");
DBG_ASSERT(nX<nCols,"GoUpDown:Bad row");
// Nachbar in gleicher Spalte ?
if( bDown )
pResult = SearchCol(
- nX, nY, sal::static_int_cast< USHORT >(nRows-1), nY, TRUE, TRUE );
+ nX, nY, sal::static_int_cast< sal_uInt16 >(nRows-1), nY, sal_True, sal_True );
else
- pResult = SearchCol( nX, nY ,0, nY, FALSE, TRUE );
+ pResult = SearchCol( nX, nY ,0, nY, sal_False, sal_True );
if( pResult )
return pResult;
@@ -3498,11 +3498,11 @@ SvLBoxEntry* ImpIcnCursor::GoUpDown( SvLBoxEntry* pIcnEntry, BOOL bDown)
nLastRow = -1; // 0-1
}
- USHORT nColMin = nX;
- USHORT nColMax = nX;
+ sal_uInt16 nColMin = nX;
+ sal_uInt16 nColMax = nX;
do
{
- SvLBoxEntry* pEntry = SearchRow((USHORT)nCurRow,nColMin,nColMax,nX,TRUE, FALSE);
+ SvLBoxEntry* pEntry = SearchRow((sal_uInt16)nCurRow,nColMin,nColMax,nX,sal_True, sal_False);
if( pEntry )
return pEntry;
if( nColMin )
@@ -3564,29 +3564,29 @@ void ImpIcnCursor::ExpandGrid()
}
}
-BOOL ImpIcnCursor::FindEmptyGridRect( Rectangle& rRect )
+sal_Bool ImpIcnCursor::FindEmptyGridRect( Rectangle& rRect )
{
CreateGridMap();
- USHORT nCount = (USHORT)(nGridCols * nGridRows);
+ sal_uInt16 nCount = (sal_uInt16)(nGridCols * nGridRows);
if( !nCount )
- return FALSE;
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ return sal_False;
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
if( !pGridMap[ nCur ] )
{
- USHORT nCol = (USHORT)(nCur % nGridCols);
- USHORT nRow = (USHORT)(nCur / nGridCols);
+ sal_uInt16 nCol = (sal_uInt16)(nCur % nGridCols);
+ sal_uInt16 nRow = (sal_uInt16)(nCur / nGridCols);
rRect.Top() = nRow * nGridDY + TBOFFS_WINBORDER;
rRect.Bottom() = rRect.Top() + nGridDY;
rRect.Left() = nCol * nGridDX+ LROFFS_WINBORDER;
rRect.Right() = rRect.Left() + nGridDX;
- SetGridUsed( nCol, nRow, TRUE );
+ SetGridUsed( nCol, nRow, sal_True );
//XXX
//if( nRow + 5 > nGridRows )
// ExpandGrid();
DBG_ASSERT(pGridMap[nCur],"SetGridUsed failed");
- return TRUE;
+ return sal_True;
}
}
// Gridmap ist voll: Um eine Zeile erweitern
@@ -3594,22 +3594,22 @@ BOOL ImpIcnCursor::FindEmptyGridRect( Rectangle& rRect )
rRect.Bottom() = rRect.Top() + nGridDY;
rRect.Left() = LROFFS_WINBORDER;
rRect.Right() = rRect.Left() + nGridDX;
- return FALSE;
+ return sal_False;
//XXX
//ExpandGrid();
- //return TRUE;
+ //return sal_True;
}
void ImpIcnCursor::CreateGridAjustData( SvPtrarr& rLists, SvLBoxEntry* pRefEntry)
{
if( !pRefEntry )
{
- USHORT nAdjustRows = (USHORT)(pView->aVirtOutputSize.Height() / pView->nGridDY);
+ sal_uInt16 nAdjustRows = (sal_uInt16)(pView->aVirtOutputSize.Height() / pView->nGridDY);
nAdjustRows++; // wg. Abrundung!
if( !nAdjustRows )
return;
- for( USHORT nCurList = 0; nCurList < nAdjustRows; nCurList++ )
+ for( sal_uInt16 nCurList = 0; nCurList < nAdjustRows; nCurList++ )
{
SvPtrarr* pRow = new SvPtrarr;
rLists.Insert( (void*)pRow, nCurList );
@@ -3619,7 +3619,7 @@ void ImpIcnCursor::CreateGridAjustData( SvPtrarr& rLists, SvLBoxEntry* pRefEntry
{
const Rectangle& rRect = pView->GetBoundingRect( pEntry );
short nY = (short)( ((rRect.Top()+rRect.Bottom())/2) / pView->nGridDY );
- USHORT nIns = GetSortListPos((SvPtrarr*)rLists[nY],rRect.Left(),FALSE);
+ sal_uInt16 nIns = GetSortListPos((SvPtrarr*)rLists[nY],rRect.Left(),sal_False);
((SvPtrarr*)rLists[ nY ])->Insert( pEntry, nIns );
pEntry = pView->pModel->NextSibling( pEntry );
}
@@ -3643,7 +3643,7 @@ void ImpIcnCursor::CreateGridAjustData( SvPtrarr& rLists, SvLBoxEntry* pRefEntry
short nY = (short)( ((rRect.Top()+rRect.Bottom())/2) / pView->nGridDY );
if( nY == nRefRow )
{
- USHORT nIns = GetSortListPos( pRow, rRect.Left(), FALSE );
+ sal_uInt16 nIns = GetSortListPos( pRow, rRect.Left(), sal_False );
pRow->Insert( pEntry, nIns );
}
pEntry = pView->pModel->NextSibling( pEntry );
@@ -3654,8 +3654,8 @@ void ImpIcnCursor::CreateGridAjustData( SvPtrarr& rLists, SvLBoxEntry* pRefEntry
//static
void ImpIcnCursor::DestroyGridAdjustData( SvPtrarr& rLists )
{
- USHORT nCount = rLists.Count();
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ sal_uInt16 nCount = rLists.Count();
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
SvPtrarr* pArr = (SvPtrarr*)rLists[ nCur ];
delete pArr;
@@ -3712,7 +3712,7 @@ void SvImpIconView::Center( SvLBoxEntry* pEntry,
// Die Deltas entsprechen Offsets, um die die View auf dem Doc verschoben wird
// links, hoch: Offsets < 0
// rechts, runter: Offsets > 0
-void SvImpIconView::Scroll( long nDeltaX, long nDeltaY, BOOL bScrollBar )
+void SvImpIconView::Scroll( long nDeltaX, long nDeltaY, sal_Bool bScrollBar )
{
const MapMode& rMapMode = pView->GetMapMode();
Point aOrigin( rMapMode.GetOrigin() );
@@ -3750,7 +3750,7 @@ Rectangle SvImpIconView::CalcFocusRect( SvLBoxEntry* pEntry )
}
-void SvImpIconView::SelectRect( const Rectangle& rRect, BOOL bAdd,
+void SvImpIconView::SelectRect( const Rectangle& rRect, sal_Bool bAdd,
SvPtrarr* pOtherRects, short nBorderOffs )
{
if( !pZOrderList || !pZOrderList->Count() )
@@ -3758,7 +3758,7 @@ void SvImpIconView::SelectRect( const Rectangle& rRect, BOOL bAdd,
CheckBoundingRects();
pView->Update();
- USHORT nCount = pZOrderList->Count();
+ sal_uInt16 nCount = pZOrderList->Count();
Rectangle aRect( rRect );
aRect.Justify();
@@ -3769,9 +3769,9 @@ void SvImpIconView::SelectRect( const Rectangle& rRect, BOOL bAdd,
aRect.Top() -= nBorderOffs;
aRect.Bottom() += nBorderOffs;
}
- BOOL bCalcOverlap = (bAdd && pOtherRects && pOtherRects->Count()) ? TRUE : FALSE;
+ sal_Bool bCalcOverlap = (bAdd && pOtherRects && pOtherRects->Count()) ? sal_True : sal_False;
- for( USHORT nPos = 0; nPos < nCount; nPos++ )
+ for( sal_uInt16 nPos = 0; nPos < nCount; nPos++ )
{
SvLBoxEntry* pEntry = (SvLBoxEntry*)(pZOrderList->GetObject(nPos ));
@@ -3780,28 +3780,28 @@ void SvImpIconView::SelectRect( const Rectangle& rRect, BOOL bAdd,
if( !IsBoundingRectValid( pViewData->aRect ))
FindBoundingRect( pEntry, pViewData );
const Rectangle& rBoundRect = pViewData->aRect;
- BOOL bSelected = pViewData->IsSelected();
+ sal_Bool bSelected = pViewData->IsSelected();
- BOOL bOverlaps;
+ sal_Bool bOverlaps;
if( bCalcOverlap )
bOverlaps = IsOver( pOtherRects, rBoundRect );
else
- bOverlaps = FALSE;
- BOOL bOver = aRect.IsOver( rBoundRect );
+ bOverlaps = sal_False;
+ sal_Bool bOver = aRect.IsOver( rBoundRect );
if( bOver && !bOverlaps )
{
// Ist im neuen Selektionsrechteck und in keinem alten
// => selektieren
if( !bSelected )
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
}
else if( !bAdd )
{
// ist ausserhalb des Selektionsrechtecks
// => Selektion entfernen
if( bSelected )
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
}
else if( bAdd && bOverlaps )
{
@@ -3821,34 +3821,34 @@ void SvImpIconView::SelectRect( const Rectangle& rRect, BOOL bAdd,
{
// Schnittmenge zwischen alten Rects & aktuellem Rect desel.
if( bSelected )
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
}
else
{
// Eintrag eines alten Rects selektieren
if( !bSelected )
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
}
}
else if( !bOver && bSelected )
{
// Der Eintrag liegt voellig ausserhalb und wird deshalb desel.
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
}
}
pView->Update();
}
-BOOL SvImpIconView::IsOver( SvPtrarr* pRectList, const Rectangle& rBoundRect ) const
+sal_Bool SvImpIconView::IsOver( SvPtrarr* pRectList, const Rectangle& rBoundRect ) const
{
- USHORT nCount = pRectList->Count();
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ sal_uInt16 nCount = pRectList->Count();
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
Rectangle* pRect = (Rectangle*)pRectList->GetObject( nCur );
if( rBoundRect.IsOver( *pRect ))
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
void SvImpIconView::AddSelectedRect( const Rectangle& rRect, short nBorderOffs )
@@ -3867,8 +3867,8 @@ void SvImpIconView::AddSelectedRect( const Rectangle& rRect, short nBorderOffs )
void SvImpIconView::ClearSelectedRectList()
{
- USHORT nCount = aSelectedRectList.Count();
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ sal_uInt16 nCount = aSelectedRectList.Count();
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
Rectangle* pRect = (Rectangle*)aSelectedRectList.GetObject( nCur );
delete pRect;
@@ -3906,7 +3906,7 @@ void SvImpIconView::ImpDrawXORRect( const Rectangle& rRect )
}
void SvImpIconView::CalcScrollOffsets( const Point& rPosPixel,
- long& rX, long& rY, BOOL bInDragDrop, USHORT nBorderWidth)
+ long& rX, long& rY, sal_Bool bInDragDrop, sal_uInt16 nBorderWidth)
{
// Scrolling der View, falls sich der Mauszeiger im Grenzbereich des
// Fensters befindet
@@ -3914,8 +3914,8 @@ void SvImpIconView::CalcScrollOffsets( const Point& rPosPixel,
long nPixelToScrollY = 0;
Size aWndSize = aOutputSize;
- nBorderWidth = (USHORT)(Min( (long)(aWndSize.Height()-1), (long)nBorderWidth ));
- nBorderWidth = (USHORT)(Min( (long)(aWndSize.Width()-1), (long)nBorderWidth ));
+ nBorderWidth = (sal_uInt16)(Min( (long)(aWndSize.Height()-1), (long)nBorderWidth ));
+ nBorderWidth = (sal_uInt16)(Min( (long)(aWndSize.Width()-1), (long)nBorderWidth ));
if ( rPosPixel.X() < nBorderWidth )
{
@@ -3967,16 +3967,16 @@ void SvImpIconView::EndTracking()
}
}
-BOOL SvImpIconView::IsTextHit( SvLBoxEntry* pEntry, const Point& rDocPos )
+sal_Bool SvImpIconView::IsTextHit( SvLBoxEntry* pEntry, const Point& rDocPos )
{
SvLBoxString* pItem = (SvLBoxString*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXSTRING));
if( pItem )
{
Rectangle aRect( CalcTextRect( pEntry, pItem ));
if( aRect.IsInside( rDocPos ) )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
IMPL_LINK(SvImpIconView, EditTimeoutHdl, Timer*, EMPTYARG )
@@ -4001,8 +4001,8 @@ void SvImpIconView::AdjustAtGrid( SvLBoxEntry* pStart )
{
SvPtrarr aLists;
pImpCursor->CreateGridAjustData( aLists, pStart );
- USHORT nCount = aLists.Count();
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ sal_uInt16 nCount = aLists.Count();
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
AdjustAtGrid( *(SvPtrarr*)aLists[ nCur ], pStart );
}
@@ -4016,18 +4016,18 @@ void SvImpIconView::AdjustAtGrid( const SvPtrarr& rRow, SvLBoxEntry* pStart )
if( !rRow.Count() )
return;
- BOOL bGo;
+ sal_Bool bGo;
if( !pStart )
- bGo = TRUE;
+ bGo = sal_True;
else
- bGo = FALSE;
+ bGo = sal_False;
long nCurRight = 0;
- for( USHORT nCur = 0; nCur < rRow.Count(); nCur++ )
+ for( sal_uInt16 nCur = 0; nCur < rRow.Count(); nCur++ )
{
SvLBoxEntry* pCur = (SvLBoxEntry*)rRow[ nCur ];
if( !bGo && pCur == pStart )
- bGo = TRUE;
+ bGo = sal_True;
SvIcnVwDataEntry* pViewData = ICNVIEWDATA(pCur);
// Massgebend (fuer das menschliche Auge) ist die Bitmap, da sonst
diff --git a/svtools/source/contnr/svlbitm.cxx b/svtools/source/contnr/svlbitm.cxx
index d260f984c2b0..89e888de0318 100644
--- a/svtools/source/contnr/svlbitm.cxx
+++ b/svtools/source/contnr/svlbitm.cxx
@@ -44,20 +44,20 @@
struct SvLBoxButtonData_Impl
{
SvLBoxEntry* pEntry;
- BOOL bDefaultImages;
- BOOL bShowRadioButton;
+ sal_Bool bDefaultImages;
+ sal_Bool bShowRadioButton;
- SvLBoxButtonData_Impl() : pEntry( NULL ), bDefaultImages( FALSE ), bShowRadioButton( FALSE ) {}
+ SvLBoxButtonData_Impl() : pEntry( NULL ), bDefaultImages( sal_False ), bShowRadioButton( sal_False ) {}
};
DBG_NAME(SvLBoxButtonData)
-void SvLBoxButtonData::InitData( BOOL bImagesFromDefault, bool _bRadioBtn, const Control* pCtrl )
+void SvLBoxButtonData::InitData( sal_Bool bImagesFromDefault, bool _bRadioBtn, const Control* pCtrl )
{
pImpl = new SvLBoxButtonData_Impl;
- bDataOk = FALSE;
+ bDataOk = sal_False;
eState = SV_BUTTON_UNCHECKED;
pImpl->bDefaultImages = bImagesFromDefault;
pImpl->bShowRadioButton = ( _bRadioBtn != false );
@@ -70,21 +70,21 @@ SvLBoxButtonData::SvLBoxButtonData( const Control* pControlForSettings )
{
DBG_CTOR(SvLBoxButtonData,0);
- InitData( TRUE, false, pControlForSettings );
+ InitData( sal_True, false, pControlForSettings );
}
SvLBoxButtonData::SvLBoxButtonData( const Control* pControlForSettings, bool _bRadioBtn )
{
DBG_CTOR(SvLBoxButtonData,0);
- InitData( TRUE, _bRadioBtn, pControlForSettings );
+ InitData( sal_True, _bRadioBtn, pControlForSettings );
}
SvLBoxButtonData::SvLBoxButtonData()
{
DBG_CTOR(SvLBoxButtonData,0);
- InitData( FALSE, false );
+ InitData( sal_False, false );
}
SvLBoxButtonData::~SvLBoxButtonData()
@@ -103,11 +103,11 @@ void SvLBoxButtonData::CallLink()
aLink.Call( this );
}
-USHORT SvLBoxButtonData::GetIndex( USHORT nItemState )
+sal_uInt16 SvLBoxButtonData::GetIndex( sal_uInt16 nItemState )
{
DBG_CHKTHIS(SvLBoxButtonData,0);
nItemState &= 0x000F;
- USHORT nIdx;
+ sal_uInt16 nIdx;
switch( nItemState )
{
case SV_ITEMSTATE_UNCHECKED:
@@ -134,18 +134,18 @@ void SvLBoxButtonData::SetWidthAndHeight()
Size aSize = aBmps[0].GetSizePixel();
nWidth = aSize.Width();
nHeight = aSize.Height();
- bDataOk = TRUE;
+ bDataOk = sal_True;
}
-void SvLBoxButtonData::StoreButtonState( SvLBoxEntry* pActEntry, USHORT nItemFlags )
+void SvLBoxButtonData::StoreButtonState( SvLBoxEntry* pActEntry, sal_uInt16 nItemFlags )
{
DBG_CHKTHIS(SvLBoxButtonData,0);
pImpl->pEntry = pActEntry;
eState = ConvertToButtonState( nItemFlags );
}
-SvButtonState SvLBoxButtonData::ConvertToButtonState( USHORT nItemFlags ) const
+SvButtonState SvLBoxButtonData::ConvertToButtonState( sal_uInt16 nItemFlags ) const
{
DBG_CHKTHIS(SvLBoxButtonData,0);
nItemFlags &= (SV_ITEMSTATE_UNCHECKED |
@@ -196,12 +196,12 @@ void SvLBoxButtonData::SetDefaultImages( const Control* pCtrl )
}
}
-BOOL SvLBoxButtonData::HasDefaultImages( void ) const
+sal_Bool SvLBoxButtonData::HasDefaultImages( void ) const
{
return pImpl->bDefaultImages;
}
-BOOL SvLBoxButtonData::IsRadio() {
+sal_Bool SvLBoxButtonData::IsRadio() {
return pImpl->bShowRadioButton;
}
@@ -211,7 +211,7 @@ BOOL SvLBoxButtonData::IsRadio() {
DBG_NAME(SvLBoxString);
-SvLBoxString::SvLBoxString( SvLBoxEntry* pEntry,USHORT nFlags,const XubString& rStr) :
+SvLBoxString::SvLBoxString( SvLBoxEntry* pEntry,sal_uInt16 nFlags,const XubString& rStr) :
SvLBoxItem( pEntry, nFlags )
{
DBG_CTOR(SvLBoxString,0);
@@ -228,19 +228,19 @@ SvLBoxString::~SvLBoxString()
DBG_DTOR(SvLBoxString,0);
}
-USHORT SvLBoxString::IsA()
+sal_uInt16 SvLBoxString::IsA()
{
DBG_CHKTHIS(SvLBoxString,0);
return SV_ITEM_ID_LBOXSTRING;
}
-void SvLBoxString::Paint( const Point& rPos, SvLBox& rDev, USHORT /* nFlags */,
+void SvLBoxString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 /* nFlags */,
SvLBoxEntry* _pEntry)
{
DBG_CHKTHIS(SvLBoxString,0);
if ( _pEntry )
{
- USHORT nStyle = rDev.IsEnabled() ? 0 : TEXT_DRAW_DISABLE;
+ sal_uInt16 nStyle = rDev.IsEnabled() ? 0 : TEXT_DRAW_DISABLE;
if ( rDev.IsEntryMnemonicsEnabled() )
nStyle |= TEXT_DRAW_MNEMONIC;
rDev.DrawText( Rectangle(rPos,GetSize(&rDev,_pEntry)),aStr,nStyle);
@@ -283,7 +283,7 @@ void SvLBoxString::InitViewData( SvLBox* pView,SvLBoxEntry* pEntry,
DBG_NAME(SvLBoxBmp);
-SvLBoxBmp::SvLBoxBmp( SvLBoxEntry* pEntry, USHORT nFlags, Image aBitmap ) :
+SvLBoxBmp::SvLBoxBmp( SvLBoxEntry* pEntry, sal_uInt16 nFlags, Image aBitmap ) :
SvLBoxItem( pEntry, nFlags )
{
DBG_CTOR(SvLBoxBmp,0);
@@ -300,7 +300,7 @@ SvLBoxBmp::~SvLBoxBmp()
DBG_DTOR(SvLBoxBmp,0);
}
-USHORT SvLBoxBmp::IsA()
+sal_uInt16 SvLBoxBmp::IsA()
{
DBG_CHKTHIS(SvLBoxBmp,0);
return SV_ITEM_ID_LBOXBMP;
@@ -321,11 +321,11 @@ void SvLBoxBmp::InitViewData( SvLBox* pView,SvLBoxEntry* pEntry,
pViewData->aSize = aBmp.GetSizePixel();
}
-void SvLBoxBmp::Paint( const Point& rPos, SvLBox& rDev, USHORT /* nFlags */,
+void SvLBoxBmp::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 /* nFlags */,
SvLBoxEntry* )
{
DBG_CHKTHIS(SvLBoxBmp,0);
- USHORT nStyle = rDev.IsEnabled() ? 0 : IMAGE_DRAW_DISABLE;
+ sal_uInt16 nStyle = rDev.IsEnabled() ? 0 : IMAGE_DRAW_DISABLE;
rDev.DrawImage( rPos, aBmp ,nStyle);
}
@@ -348,7 +348,7 @@ void SvLBoxBmp::Clone( SvLBoxItem* pSource )
DBG_NAME(SvLBoxButton);
SvLBoxButton::SvLBoxButton( SvLBoxEntry* pEntry, SvLBoxButtonKind eTheKind,
- USHORT nFlags, SvLBoxButtonData* pBData )
+ sal_uInt16 nFlags, SvLBoxButtonData* pBData )
: SvLBoxItem( pEntry, nFlags )
{
DBG_CTOR(SvLBoxButton,0);
@@ -372,13 +372,13 @@ SvLBoxButton::~SvLBoxButton()
DBG_DTOR(SvLBoxButton,0);
}
-USHORT SvLBoxButton::IsA()
+sal_uInt16 SvLBoxButton::IsA()
{
DBG_CHKTHIS(SvLBoxButton,0);
return SV_ITEM_ID_LBOXBUTTON;
}
-void SvLBoxButton::Check(SvLBox*, SvLBoxEntry*, BOOL bOn)
+void SvLBoxButton::Check(SvLBox*, SvLBoxEntry*, sal_Bool bOn)
{
DBG_CHKTHIS(SvLBoxButton,0);
if ( bOn != IsStateChecked() )
@@ -390,7 +390,7 @@ void SvLBoxButton::Check(SvLBox*, SvLBoxEntry*, BOOL bOn)
}
}
-BOOL SvLBoxButton::ClickHdl( SvLBox*, SvLBoxEntry* pEntry )
+sal_Bool SvLBoxButton::ClickHdl( SvLBox*, SvLBoxEntry* pEntry )
{
DBG_CHKTHIS(SvLBoxButton,0);
if ( CheckModification() )
@@ -402,22 +402,22 @@ BOOL SvLBoxButton::ClickHdl( SvLBox*, SvLBoxEntry* pEntry )
pData->StoreButtonState( pEntry, nItemFlags );
pData->CallLink();
}
- return FALSE;
+ return sal_False;
}
-void SvLBoxButton::Paint( const Point& rPos, SvLBox& rDev, USHORT /* nFlags */,
+void SvLBoxButton::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 /* nFlags */,
SvLBoxEntry* /*pEntry*/ )
{
DBG_CHKTHIS(SvLBoxButton,0);
- USHORT nIndex = eKind == SvLBoxButtonKind_staticImage
+ sal_uInt16 nIndex = eKind == SvLBoxButtonKind_staticImage
? SV_BMP_STATICIMAGE : pData->GetIndex( nItemFlags );
- USHORT nStyle = eKind != SvLBoxButtonKind_disabledCheckbox &&
+ sal_uInt16 nStyle = eKind != SvLBoxButtonKind_disabledCheckbox &&
rDev.IsEnabled() ? 0 : IMAGE_DRAW_DISABLE;
///
//Native drawing
///
- BOOL bNativeOK = FALSE;
+ sal_Bool bNativeOK = sal_False;
ControlType eCtrlType = (pData->IsRadio())? CTRL_RADIOBUTTON : CTRL_CHECKBOX;
if ( nIndex != SV_BMP_STATICIMAGE && rDev.IsNativeControlSupported( eCtrlType, PART_ENTIRE_CONTROL) )
{
@@ -520,14 +520,14 @@ struct SvLBoxContextBmp_Impl
Image m_aImage1_hc;
Image m_aImage2_hc;
- USHORT m_nB2IndicatorFlags;
+ sal_uInt16 m_nB2IndicatorFlags;
};
// ***************************************************************
DBG_NAME(SvLBoxContextBmp)
-SvLBoxContextBmp::SvLBoxContextBmp( SvLBoxEntry* pEntry, USHORT nItemFlags,
- Image aBmp1, Image aBmp2, USHORT nEntryFlags )
+SvLBoxContextBmp::SvLBoxContextBmp( SvLBoxEntry* pEntry, sal_uInt16 nItemFlags,
+ Image aBmp1, Image aBmp2, sal_uInt16 nEntryFlags )
:SvLBoxItem( pEntry, nItemFlags )
,m_pImpl( new SvLBoxContextBmp_Impl )
{
@@ -551,13 +551,13 @@ SvLBoxContextBmp::~SvLBoxContextBmp()
DBG_DTOR(SvLBoxContextBmp,0);
}
-USHORT SvLBoxContextBmp::IsA()
+sal_uInt16 SvLBoxContextBmp::IsA()
{
DBG_CHKTHIS(SvLBoxContextBmp,0);
return SV_ITEM_ID_LBOXCONTEXTBMP;
}
-BOOL SvLBoxContextBmp::SetModeImages( const Image& _rBitmap1, const Image& _rBitmap2, BmpColorMode _eMode )
+sal_Bool SvLBoxContextBmp::SetModeImages( const Image& _rBitmap1, const Image& _rBitmap2, BmpColorMode _eMode )
{
DBG_CHKTHIS(SvLBoxContextBmp,0);
@@ -612,7 +612,7 @@ void SvLBoxContextBmp::InitViewData( SvLBox* pView,SvLBoxEntry* pEntry,
}
void SvLBoxContextBmp::Paint( const Point& _rPos, SvLBox& _rDev,
- USHORT _nViewDataEntryFlags, SvLBoxEntry* _pEntry )
+ sal_uInt16 _nViewDataEntryFlags, SvLBoxEntry* _pEntry )
{
DBG_CHKTHIS(SvLBoxContextBmp,0);
@@ -629,7 +629,7 @@ void SvLBoxContextBmp::Paint( const Point& _rPos, SvLBox& _rDev,
sal_Bool _bSemiTransparent = _pEntry && ( 0 != ( SV_ENTRYFLAG_SEMITRANSPARENT & _pEntry->GetFlags( ) ) );
// draw
- USHORT nStyle = _rDev.IsEnabled() ? 0 : IMAGE_DRAW_DISABLE;
+ sal_uInt16 nStyle = _rDev.IsEnabled() ? 0 : IMAGE_DRAW_DISABLE;
if ( _bSemiTransparent )
nStyle |= IMAGE_DRAW_SEMITRANSPARENT;
_rDev.DrawImage( _rPos, rImage, nStyle);
diff --git a/svtools/source/contnr/svlbox.cxx b/svtools/source/contnr/svlbox.cxx
index abdd1c1889ee..e4e4abdc96a2 100644
--- a/svtools/source/contnr/svlbox.cxx
+++ b/svtools/source/contnr/svlbox.cxx
@@ -31,7 +31,7 @@
/*
Todo:
- Anker loeschen in SelectionEngine bei manuellem Selektieren
- - SelectAll( FALSE ), nur die deselektierten Entries repainten
+ - SelectAll( sal_False ), nur die deselektierten Entries repainten
*/
#include <string.h>
@@ -77,14 +77,14 @@ SvInplaceEdit::SvInplaceEdit
Edit( pParent, WB_LEFT ),
aCallBackHdl ( rNotifyEditEnd ),
- bCanceled ( FALSE ),
- bAlreadyInCallBack ( FALSE )
+ bCanceled ( sal_False ),
+ bAlreadyInCallBack ( sal_False )
{
DBG_CTOR(SvInplaceEdit,0);
Font aFont( pParent->GetFont() );
- aFont.SetTransparent( FALSE );
+ aFont.SetTransparent( sal_False );
Color aColor( pParent->GetBackground().GetColor() );
aFont.SetFillColor(aColor );
SetFont( aFont );
@@ -120,7 +120,7 @@ SvInplaceEdit::~SvInplaceEdit()
IMPL_LINK_INLINE_START( SvInplaceEdit, ReturnHdl_Impl, Accelerator *, EMPTYARG )
{
DBG_CHKTHIS(SvInplaceEdit,0);
- bCanceled = FALSE;
+ bCanceled = sal_False;
CallCallBackHdl_Impl();
return 1;
}
@@ -129,7 +129,7 @@ IMPL_LINK_INLINE_END( SvInplaceEdit, ReturnHdl_Impl, Accelerator *, EMPTYARG )
IMPL_LINK_INLINE_START( SvInplaceEdit, EscapeHdl_Impl, Accelerator *, EMPTYARG )
{
DBG_CHKTHIS(SvInplaceEdit,0);
- bCanceled = TRUE;
+ bCanceled = sal_True;
CallCallBackHdl_Impl();
return 1;
}
@@ -138,16 +138,16 @@ IMPL_LINK_INLINE_END( SvInplaceEdit, EscapeHdl_Impl, Accelerator *, EMPTYARG )
void SvInplaceEdit::KeyInput( const KeyEvent& rKEvt )
{
DBG_CHKTHIS(SvInplaceEdit,0);
- USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
switch ( nCode )
{
case KEY_ESCAPE:
- bCanceled = TRUE;
+ bCanceled = sal_True;
CallCallBackHdl_Impl();
break;
case KEY_RETURN:
- bCanceled = FALSE;
+ bCanceled = sal_False;
CallCallBackHdl_Impl();
break;
@@ -156,7 +156,7 @@ void SvInplaceEdit::KeyInput( const KeyEvent& rKEvt )
}
}
-void SvInplaceEdit::StopEditing( BOOL bCancel )
+void SvInplaceEdit::StopEditing( sal_Bool bCancel )
{
DBG_CHKTHIS(SvInplaceEdit,0);
if ( !bAlreadyInCallBack )
@@ -171,7 +171,7 @@ void SvInplaceEdit::LoseFocus()
DBG_CHKTHIS(SvInplaceEdit,0);
if ( !bAlreadyInCallBack )
{
- bCanceled = FALSE;
+ bCanceled = sal_False;
aTimer.SetTimeout(10);
aTimer.SetTimeoutHdl(LINK(this,SvInplaceEdit,Timeout_Impl));
aTimer.Start();
@@ -192,12 +192,12 @@ void SvInplaceEdit::CallCallBackHdl_Impl()
aTimer.Stop();
if ( !bAlreadyInCallBack )
{
- bAlreadyInCallBack = TRUE;
+ bAlreadyInCallBack = sal_True;
GetpApp()->RemoveAccel( &aAccReturn );
GetpApp()->RemoveAccel( &aAccEscape );
Hide();
aCallBackHdl.Call( this );
- // bAlreadyInCallBack = FALSE;
+ // bAlreadyInCallBack = sal_False;
}
}
@@ -268,12 +268,12 @@ SvInplaceEdit2::SvInplaceEdit2
const String& rData,
const Link& rNotifyEditEnd,
const Selection& rSelection,
- BOOL bMulti
+ sal_Bool bMulti
) :
aCallBackHdl ( rNotifyEditEnd ),
- bCanceled ( FALSE ),
- bAlreadyInCallBack ( FALSE ),
+ bCanceled ( sal_False ),
+ bAlreadyInCallBack ( sal_False ),
bMultiLine ( bMulti )
{
@@ -285,7 +285,7 @@ SvInplaceEdit2::SvInplaceEdit2
pEdit = new MyEdit_Impl( pParent, this );
Font aFont( pParent->GetFont() );
- aFont.SetTransparent( FALSE );
+ aFont.SetTransparent( sal_False );
Color aColor( pParent->GetBackground().GetColor() );
aFont.SetFillColor(aColor );
pEdit->SetFont( aFont );
@@ -333,7 +333,7 @@ void SvInplaceEdit2::Hide()
IMPL_LINK_INLINE_START( SvInplaceEdit2, ReturnHdl_Impl, Accelerator *, EMPTYARG )
{
DBG_CHKTHIS(SvInplaceEdit2,0);
- bCanceled = FALSE;
+ bCanceled = sal_False;
CallCallBackHdl_Impl();
return 1;
}
@@ -342,35 +342,35 @@ IMPL_LINK_INLINE_END( SvInplaceEdit2, ReturnHdl_Impl, Accelerator *, EMPTYARG )
IMPL_LINK_INLINE_START( SvInplaceEdit2, EscapeHdl_Impl, Accelerator *, EMPTYARG )
{
DBG_CHKTHIS(SvInplaceEdit2,0);
- bCanceled = TRUE;
+ bCanceled = sal_True;
CallCallBackHdl_Impl();
return 1;
}
IMPL_LINK_INLINE_END( SvInplaceEdit2, EscapeHdl_Impl, Accelerator *, EMPTYARG )
-BOOL SvInplaceEdit2::KeyInput( const KeyEvent& rKEvt )
+sal_Bool SvInplaceEdit2::KeyInput( const KeyEvent& rKEvt )
{
DBG_CHKTHIS(SvInplaceEdit2,0);
KeyCode aCode = rKEvt.GetKeyCode();
- USHORT nCode = aCode.GetCode();
+ sal_uInt16 nCode = aCode.GetCode();
switch ( nCode )
{
case KEY_ESCAPE:
- bCanceled = TRUE;
+ bCanceled = sal_True;
CallCallBackHdl_Impl();
- return TRUE;
+ return sal_True;
case KEY_RETURN:
- bCanceled = FALSE;
+ bCanceled = sal_False;
CallCallBackHdl_Impl();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-void SvInplaceEdit2::StopEditing( BOOL bCancel )
+void SvInplaceEdit2::StopEditing( sal_Bool bCancel )
{
DBG_CHKTHIS(SvInplaceEdit2,0);
if ( !bAlreadyInCallBack )
@@ -387,7 +387,7 @@ void SvInplaceEdit2::LoseFocus()
&& ((!Application::GetFocusWindow()) || !pEdit->IsChild( Application::GetFocusWindow()) )
)
{
- bCanceled = FALSE;
+ bCanceled = sal_False;
aTimer.SetTimeout(10);
aTimer.SetTimeoutHdl(LINK(this,SvInplaceEdit2,Timeout_Impl));
aTimer.Start();
@@ -408,7 +408,7 @@ void SvInplaceEdit2::CallCallBackHdl_Impl()
aTimer.Stop();
if ( !bAlreadyInCallBack )
{
- bAlreadyInCallBack = TRUE;
+ bAlreadyInCallBack = sal_True;
GetpApp()->RemoveAccel( &aAccReturn );
GetpApp()->RemoveAccel( &aAccEscape );
pEdit->Hide();
@@ -435,7 +435,7 @@ SvLBoxTab::SvLBoxTab()
nFlags = 0;
}
-SvLBoxTab::SvLBoxTab( long nPosition, USHORT nTabFlags )
+SvLBoxTab::SvLBoxTab( long nPosition, sal_uInt16 nTabFlags )
{
DBG_CTOR(SvLBoxTab,0);
nPos = nPosition;
@@ -494,7 +494,7 @@ long SvLBoxTab::CalcOffset( const String& rStr, const OutputDevice& rOutDev )
long nWidth;
if ( nFlags & SV_LBOXTAB_ADJUST_NUMERIC )
{
- USHORT nPos = rStr.Search( '.' );
+ sal_uInt16 nPos = rStr.Search( '.' );
if ( nPos == STRING_NOTFOUND )
nPos = rStr.Search( ',' );
if ( nPos == STRING_NOTFOUND )
@@ -518,7 +518,7 @@ long SvLBoxTab::CalcOffset( const String& rStr, const OutputDevice& rOutDev )
DBG_NAME(SvLBoxItem);
-SvLBoxItem::SvLBoxItem( SvLBoxEntry*, USHORT )
+SvLBoxItem::SvLBoxItem( SvLBoxEntry*, sal_uInt16 )
{
DBG_CTOR(SvLBoxItem,0);
}
@@ -543,7 +543,7 @@ const Size& SvLBoxItem::GetSize( SvLBox* pView,SvLBoxEntry* pEntry )
const Size& SvLBoxItem::GetSize( SvLBoxEntry* pEntry, SvViewDataEntry* pViewData)
{
DBG_CHKTHIS(SvLBoxItem,0);
- USHORT nItemPos = pEntry->GetPos( this );
+ sal_uInt16 nItemPos = pEntry->GetPos( this );
SvViewDataItem* pItemData = pViewData->pItemData+nItemPos;
return pItemData->aSize;
}
@@ -584,7 +584,7 @@ SvLBoxEntry::~SvLBoxEntry()
void SvLBoxEntry::DeleteItems_Impl()
{
DBG_CHKTHIS(SvLBoxEntry,0);
- USHORT nCount = aItems.Count();
+ sal_uInt16 nCount = aItems.Count();
while( nCount )
{
nCount--;
@@ -607,8 +607,8 @@ void SvLBoxEntry::Clone( SvListEntry* pSource )
SvListEntry::Clone( pSource );
SvLBoxItem* pNewItem;
DeleteItems_Impl();
- USHORT nCount = ((SvLBoxEntry*)pSource)->ItemCount();
- USHORT nCurPos = 0;
+ sal_uInt16 nCount = ((SvLBoxEntry*)pSource)->ItemCount();
+ sal_uInt16 nCurPos = 0;
while( nCurPos < nCount )
{
SvLBoxItem* pItem = ((SvLBoxEntry*)pSource)->GetItem( nCurPos );
@@ -621,7 +621,7 @@ void SvLBoxEntry::Clone( SvListEntry* pSource )
nEntryFlags = ((SvLBoxEntry*)pSource)->nEntryFlags;
}
-void SvLBoxEntry::EnableChildsOnDemand( BOOL bEnable )
+void SvLBoxEntry::EnableChildsOnDemand( sal_Bool bEnable )
{
DBG_CHKTHIS(SvLBoxEntry,0);
if ( bEnable )
@@ -630,7 +630,7 @@ void SvLBoxEntry::EnableChildsOnDemand( BOOL bEnable )
nEntryFlags &= (~SV_ENTRYFLAG_CHILDS_ON_DEMAND);
}
-void SvLBoxEntry::ReplaceItem( SvLBoxItem* pNewItem, USHORT nPos )
+void SvLBoxEntry::ReplaceItem( SvLBoxItem* pNewItem, sal_uInt16 nPos )
{
DBG_CHKTHIS(SvLBoxEntry,0);
DBG_ASSERT(pNewItem,"ReplaceItem:No Item");
@@ -643,10 +643,10 @@ void SvLBoxEntry::ReplaceItem( SvLBoxItem* pNewItem, USHORT nPos )
}
}
-SvLBoxItem* SvLBoxEntry::GetFirstItem( USHORT nId )
+SvLBoxItem* SvLBoxEntry::GetFirstItem( sal_uInt16 nId )
{
- USHORT nCount = aItems.Count();
- USHORT nCur = 0;
+ sal_uInt16 nCount = aItems.Count();
+ sal_uInt16 nCur = 0;
SvLBoxItem* pItem;
while( nCur < nCount )
{
@@ -802,7 +802,7 @@ bool SvLBox::IsEntryMnemonicsEnabled() const
return pLBoxImpl->m_bEntryMnemonicsEnabled;
}
-USHORT SvLBox::IsA()
+sal_uInt16 SvLBox::IsA()
{
DBG_CHKTHIS(SvLBox,0);
return SVLISTBOX_ID_LBOX;
@@ -815,17 +815,17 @@ IMPL_LINK_INLINE_START( SvLBox, CloneHdl_Impl, SvListEntry*, pEntry )
}
IMPL_LINK_INLINE_END( SvLBox, CloneHdl_Impl, SvListEntry*, pEntry )
-ULONG SvLBox::Insert( SvLBoxEntry* pEntry, SvLBoxEntry* pParent, ULONG nPos )
+sal_uLong SvLBox::Insert( SvLBoxEntry* pEntry, SvLBoxEntry* pParent, sal_uLong nPos )
{
DBG_CHKTHIS(SvLBox,0);
- ULONG nInsPos = pModel->Insert( pEntry, pParent, nPos );
+ sal_uLong nInsPos = pModel->Insert( pEntry, pParent, nPos );
return nInsPos;
}
-ULONG SvLBox::Insert( SvLBoxEntry* pEntry,ULONG nRootPos )
+sal_uLong SvLBox::Insert( SvLBoxEntry* pEntry,sal_uLong nRootPos )
{
DBG_CHKTHIS(SvLBox,0);
- ULONG nInsPos = pModel->Insert( pEntry, nRootPos );
+ sal_uLong nInsPos = pModel->Insert( pEntry, nRootPos );
return nInsPos;
}
@@ -853,48 +853,48 @@ void SvLBox::DeselectHdl()
aDeselectHdl.Call( this );
}
-BOOL SvLBox::DoubleClickHdl()
+sal_Bool SvLBox::DoubleClickHdl()
{
DBG_CHKTHIS(SvLBox,0);
aDoubleClickHdl.Call( this );
- return TRUE;
+ return sal_True;
}
-BOOL SvLBox::CheckDragAndDropMode( SvLBox* pSource, sal_Int8 nAction )
+sal_Bool SvLBox::CheckDragAndDropMode( SvLBox* pSource, sal_Int8 nAction )
{
DBG_CHKTHIS(SvLBox,0);
if ( pSource == this )
{
if ( !(nDragDropMode & (SV_DRAGDROP_CTRL_MOVE | SV_DRAGDROP_CTRL_COPY) ) )
- return FALSE; // D&D innerhalb der Liste gesperrt
+ return sal_False; // D&D innerhalb der Liste gesperrt
if( DND_ACTION_MOVE == nAction )
{
if ( !(nDragDropMode & SV_DRAGDROP_CTRL_MOVE) )
- return FALSE; // kein lokales Move
+ return sal_False; // kein lokales Move
}
else
{
if ( !(nDragDropMode & SV_DRAGDROP_CTRL_COPY))
- return FALSE; // kein lokales Copy
+ return sal_False; // kein lokales Copy
}
}
else
{
if ( !(nDragDropMode & SV_DRAGDROP_APP_DROP ) )
- return FALSE; // kein Drop
+ return sal_False; // kein Drop
if ( DND_ACTION_MOVE == nAction )
{
if ( !(nDragDropMode & SV_DRAGDROP_APP_MOVE) )
- return FALSE; // kein globales Move
+ return sal_False; // kein globales Move
}
else
{
if ( !(nDragDropMode & SV_DRAGDROP_APP_COPY))
- return FALSE; // kein globales Copy
+ return sal_False; // kein globales Copy
}
}
- return TRUE;
+ return sal_True;
}
@@ -920,19 +920,19 @@ void SvLBox::NotifyRemoving( SvLBoxEntry* )
- Entry wird an das Ende der Target-Childlist gehaengt
*/
#ifdef DBG_UTIL
-BOOL SvLBox::NotifyMoving(
+sal_Bool SvLBox::NotifyMoving(
SvLBoxEntry* pTarget, // D&D-Drop-Position in this->GetModel()
SvLBoxEntry* pEntry, // Zu verschiebender Entry aus
// GetSourceListBox()->GetModel()
SvLBoxEntry*& rpNewParent, // Neuer Target-Parent
- ULONG& rNewChildPos) // Position in Childlist des Target-Parents
+ sal_uLong& rNewChildPos) // Position in Childlist des Target-Parents
#else
-BOOL SvLBox::NotifyMoving(
+sal_Bool SvLBox::NotifyMoving(
SvLBoxEntry* pTarget, // D&D-Drop-Position in this->GetModel()
SvLBoxEntry*, // Zu verschiebender Entry aus
// GetSourceListBox()->GetModel()
SvLBoxEntry*& rpNewParent, // Neuer Target-Parent
- ULONG& rNewChildPos) // Position in Childlist des Target-Parents
+ sal_uLong& rNewChildPos) // Position in Childlist des Target-Parents
#endif
{
DBG_CHKTHIS(SvLBox,0);
@@ -941,7 +941,7 @@ BOOL SvLBox::NotifyMoving(
{
rpNewParent = 0;
rNewChildPos = 0;
- return TRUE;
+ return sal_True;
}
if ( !pTarget->HasChilds() && !pTarget->HasChildsOnDemand() )
{
@@ -960,15 +960,15 @@ BOOL SvLBox::NotifyMoving(
else
rNewChildPos = LIST_APPEND;
}
- return TRUE;
+ return sal_True;
}
-BOOL SvLBox::NotifyCopying(
+sal_Bool SvLBox::NotifyCopying(
SvLBoxEntry* pTarget, // D&D-Drop-Position in this->GetModel()
SvLBoxEntry* pEntry, // Zu kopierender Entry aus
// GetSourceListBox()->GetModel()
SvLBoxEntry*& rpNewParent, // Neuer Target-Parent
- ULONG& rNewChildPos) // Position in Childlist des Target-Parents
+ sal_uLong& rNewChildPos) // Position in Childlist des Target-Parents
{
DBG_CHKTHIS(SvLBox,0);
return NotifyMoving(pTarget,pEntry,rpNewParent,rNewChildPos);
@@ -978,7 +978,7 @@ BOOL SvLBox::NotifyCopying(
{
rpNewParent = 0;
rNewChildPos = 0;
- return TRUE;
+ return sal_True;
}
if ( !pTarget->HasChilds() && !pTarget->HasChildsOnDemand() )
{
@@ -995,7 +995,7 @@ BOOL SvLBox::NotifyCopying(
else
rNewChildPos = LIST_APPEND;
}
- return TRUE;
+ return sal_True;
*/
}
@@ -1009,13 +1009,13 @@ SvLBoxEntry* SvLBox::CloneEntry( SvLBoxEntry* pSource )
// Rueckgabe: Alle Entries wurden kopiert
-BOOL SvLBox::CopySelection( SvLBox* pSource, SvLBoxEntry* pTarget )
+sal_Bool SvLBox::CopySelection( SvLBox* pSource, SvLBoxEntry* pTarget )
{
DBG_CHKTHIS(SvLBox,0);
nCurEntrySelPos = 0; // Selektionszaehler fuer NotifyMoving/Copying
- BOOL bSuccess = TRUE;
+ sal_Bool bSuccess = sal_True;
SvTreeEntryList aList;
- BOOL bClone = (BOOL)( (ULONG)(pSource->GetModel()) != (ULONG)GetModel() );
+ sal_Bool bClone = (sal_Bool)( (sal_uLong)(pSource->GetModel()) != (sal_uLong)GetModel() );
Link aCloneLink( pModel->GetCloneLink() );
pModel->SetCloneLink( LINK(this, SvLBox, CloneHdl_Impl ));
@@ -1026,7 +1026,7 @@ BOOL SvLBox::CopySelection( SvLBox* pSource, SvLBoxEntry* pTarget )
while ( pSourceEntry )
{
// Childs werden automatisch mitkopiert
- pSource->SelectChilds( pSourceEntry, FALSE );
+ pSource->SelectChilds( pSourceEntry, sal_False );
aList.Insert( pSourceEntry, LIST_APPEND );
pSourceEntry = pSource->NextSelected( pSourceEntry );
}
@@ -1035,13 +1035,13 @@ BOOL SvLBox::CopySelection( SvLBox* pSource, SvLBoxEntry* pTarget )
while ( pSourceEntry )
{
SvLBoxEntry* pNewParent = 0;
- ULONG nInsertionPos = LIST_APPEND;
- BOOL bOk=NotifyCopying(pTarget,pSourceEntry,pNewParent,nInsertionPos);
+ sal_uLong nInsertionPos = LIST_APPEND;
+ sal_Bool bOk=NotifyCopying(pTarget,pSourceEntry,pNewParent,nInsertionPos);
if ( bOk )
{
if ( bClone )
{
- ULONG nCloneCount = 0;
+ sal_uLong nCloneCount = 0;
pSourceEntry = (SvLBoxEntry*)
pModel->Clone( (SvListEntry*)pSourceEntry, nCloneCount );
pModel->InsertTree( (SvListEntry*)pSourceEntry,
@@ -1049,15 +1049,15 @@ BOOL SvLBox::CopySelection( SvLBox* pSource, SvLBoxEntry* pTarget )
}
else
{
- ULONG nListPos = pModel->Copy( (SvListEntry*)pSourceEntry,
+ sal_uLong nListPos = pModel->Copy( (SvListEntry*)pSourceEntry,
(SvListEntry*)pNewParent, nInsertionPos );
pSourceEntry = GetEntry( pNewParent, nListPos );
}
}
else
- bSuccess = FALSE;
+ bSuccess = sal_False;
- if( bOk == (BOOL)2 ) // !!!HACK verschobenen Entry sichtbar machen?
+ if( bOk == (sal_Bool)2 ) // !!!HACK verschobenen Entry sichtbar machen?
MakeVisible( pSourceEntry );
pSourceEntry = (SvLBoxEntry*)aList.Next();
@@ -1067,18 +1067,18 @@ BOOL SvLBox::CopySelection( SvLBox* pSource, SvLBoxEntry* pTarget )
}
// Rueckgabe: Alle Entries wurden verschoben
-BOOL SvLBox::MoveSelection( SvLBox* pSource, SvLBoxEntry* pTarget )
+sal_Bool SvLBox::MoveSelection( SvLBox* pSource, SvLBoxEntry* pTarget )
{
return MoveSelectionCopyFallbackPossible( pSource, pTarget, sal_False );
}
-BOOL SvLBox::MoveSelectionCopyFallbackPossible( SvLBox* pSource, SvLBoxEntry* pTarget, sal_Bool bAllowCopyFallback )
+sal_Bool SvLBox::MoveSelectionCopyFallbackPossible( SvLBox* pSource, SvLBoxEntry* pTarget, sal_Bool bAllowCopyFallback )
{
DBG_CHKTHIS(SvLBox,0);
nCurEntrySelPos = 0; // Selektionszaehler fuer NotifyMoving/Copying
- BOOL bSuccess = TRUE;
+ sal_Bool bSuccess = sal_True;
SvTreeEntryList aList;
- BOOL bClone = (BOOL)( (ULONG)(pSource->GetModel()) != (ULONG)GetModel() );
+ sal_Bool bClone = (sal_Bool)( (sal_uLong)(pSource->GetModel()) != (sal_uLong)GetModel() );
Link aCloneLink( pModel->GetCloneLink() );
if ( bClone )
pModel->SetCloneLink( LINK(this, SvLBox, CloneHdl_Impl ));
@@ -1087,7 +1087,7 @@ BOOL SvLBox::MoveSelectionCopyFallbackPossible( SvLBox* pSource, SvLBoxEntry* pT
while ( pSourceEntry )
{
// Childs werden automatisch mitbewegt
- pSource->SelectChilds( pSourceEntry, FALSE );
+ pSource->SelectChilds( pSourceEntry, sal_False );
aList.Insert( pSourceEntry, LIST_APPEND );
pSourceEntry = pSource->NextSelected( pSourceEntry );
}
@@ -1096,7 +1096,7 @@ BOOL SvLBox::MoveSelectionCopyFallbackPossible( SvLBox* pSource, SvLBoxEntry* pT
while ( pSourceEntry )
{
SvLBoxEntry* pNewParent = 0;
- ULONG nInsertionPos = LIST_APPEND;
+ sal_uLong nInsertionPos = LIST_APPEND;
sal_Bool bOk = NotifyMoving(pTarget,pSourceEntry,pNewParent,nInsertionPos);
sal_Bool bCopyOk = bOk;
if ( !bOk && bAllowCopyFallback )
@@ -1109,7 +1109,7 @@ BOOL SvLBox::MoveSelectionCopyFallbackPossible( SvLBox* pSource, SvLBoxEntry* pT
{
if ( bClone )
{
- ULONG nCloneCount = 0;
+ sal_uLong nCloneCount = 0;
pSourceEntry = (SvLBoxEntry*)
pModel->Clone( (SvListEntry*)pSourceEntry, nCloneCount );
pModel->InsertTree( (SvListEntry*)pSourceEntry,
@@ -1126,9 +1126,9 @@ BOOL SvLBox::MoveSelectionCopyFallbackPossible( SvLBox* pSource, SvLBoxEntry* pT
}
}
else
- bSuccess = FALSE;
+ bSuccess = sal_False;
- if( bOk == (BOOL)2 ) // !!!HACK verschobenen Entry sichtbar machen?
+ if( bOk == (sal_Bool)2 ) // !!!HACK verschobenen Entry sichtbar machen?
MakeVisible( pSourceEntry );
pSourceEntry = (SvLBoxEntry*)aList.Next();
@@ -1149,7 +1149,7 @@ void SvLBox::RemoveSelection()
aList.Insert( pEntry );
if ( pEntry->HasChilds() )
// Remove loescht Childs automatisch
- SelectChilds( pEntry, FALSE );
+ SelectChilds( pEntry, sal_False );
pEntry = NextSelected( pEntry );
}
pEntry = (SvLBoxEntry*)aList.First();
@@ -1182,8 +1182,8 @@ void SvLBox::RecalcViewData()
SvLBoxEntry* pEntry = First();
while( pEntry )
{
- USHORT nCount = pEntry->ItemCount();
- USHORT nCurPos = 0;
+ sal_uInt16 nCount = pEntry->ItemCount();
+ sal_uInt16 nCurPos = 0;
while ( nCurPos < nCount )
{
SvLBoxItem* pItem = pEntry->GetItem( nCurPos );
@@ -1207,7 +1207,7 @@ void SvLBox::StateChanged( StateChangedType eType )
Control::StateChanged( eType );
}
-void SvLBox::ImplShowTargetEmphasis( SvLBoxEntry* pEntry, BOOL bShow)
+void SvLBox::ImplShowTargetEmphasis( SvLBoxEntry* pEntry, sal_Bool bShow)
{
DBG_CHKTHIS(SvLBox,0);
if ( bShow && (nImpFlags & SVLBOX_TARGEMPH_VIS) )
@@ -1221,31 +1221,31 @@ void SvLBox::ImplShowTargetEmphasis( SvLBoxEntry* pEntry, BOOL bShow)
nImpFlags &= ~SVLBOX_TARGEMPH_VIS;
}
-void SvLBox::ShowTargetEmphasis( SvLBoxEntry*, BOOL /* bShow */ )
+void SvLBox::ShowTargetEmphasis( SvLBoxEntry*, sal_Bool /* bShow */ )
{
DBG_CHKTHIS(SvLBox,0);
}
-BOOL SvLBox::Expand( SvLBoxEntry* )
+sal_Bool SvLBox::Expand( SvLBoxEntry* )
{
DBG_CHKTHIS(SvLBox,0);
- return TRUE;
+ return sal_True;
}
-BOOL SvLBox::Collapse( SvLBoxEntry* )
+sal_Bool SvLBox::Collapse( SvLBoxEntry* )
{
DBG_CHKTHIS(SvLBox,0);
- return TRUE;
+ return sal_True;
}
-BOOL SvLBox::Select( SvLBoxEntry*, BOOL )
+sal_Bool SvLBox::Select( SvLBoxEntry*, sal_Bool )
{
DBG_CHKTHIS(SvLBox,0);
- return FALSE;
+ return sal_False;
}
-ULONG SvLBox::SelectChilds( SvLBoxEntry* , BOOL )
+sal_uLong SvLBox::SelectChilds( SvLBoxEntry* , sal_Bool )
{
DBG_CHKTHIS(SvLBox,0);
return 0;
@@ -1257,7 +1257,7 @@ void SvLBox::OnCurrentEntryChanged()
pLBoxImpl->m_aQuickSelectionEngine.Reset();
}
-void SvLBox::SelectAll( BOOL /* bSelect */ , BOOL /* bPaint */ )
+void SvLBox::SelectAll( sal_Bool /* bSelect */ , sal_Bool /* bPaint */ )
{
DBG_CHKTHIS(SvLBox,0);
}
@@ -1286,9 +1286,9 @@ void SvLBox::FillEntryPath( SvLBoxEntry* pEntry, ::std::deque< sal_Int32 >& _rPa
if ( pEntry )
{
SvLBoxEntry* pParentEntry = GetParent( pEntry );
- while ( TRUE )
+ while ( sal_True )
{
- ULONG i, nCount = GetLevelChildCount( pParentEntry );
+ sal_uLong i, nCount = GetLevelChildCount( pParentEntry );
for ( i = 0; i < nCount; ++i )
{
SvLBoxEntry* pTemp = GetEntry( pParentEntry, i );
@@ -1318,11 +1318,11 @@ String SvLBox::GetEntryText( SvLBoxEntry* ) const
return String();
}
-ULONG SvLBox::GetLevelChildCount( SvLBoxEntry* _pParent ) const
+sal_uLong SvLBox::GetLevelChildCount( SvLBoxEntry* _pParent ) const
{
DBG_CHKTHIS(SvLBox,0);
- ULONG nCount = 0;
+ sal_uLong nCount = 0;
SvLBoxEntry* pEntry = FirstChild( _pParent );
while ( pEntry )
{
@@ -1361,8 +1361,8 @@ void SvLBox::InitViewData( SvViewData* pData, SvListEntry* pEntry )
pEntryData->pItemData = new SvViewDataItem[ pInhEntry->ItemCount() ];
SvViewDataItem* pItemData = pEntryData->pItemData;
pEntryData->nItmCnt = pInhEntry->ItemCount(); // Anzahl Items fuer delete
- USHORT nCount = pInhEntry->ItemCount();
- USHORT nCurPos = 0;
+ sal_uInt16 nCount = pInhEntry->ItemCount();
+ sal_uInt16 nCurPos = 0;
while( nCurPos < nCount )
{
SvLBoxItem* pItem = pInhEntry->GetItem( nCurPos );
@@ -1374,10 +1374,10 @@ void SvLBox::InitViewData( SvViewData* pData, SvListEntry* pEntry )
-void SvLBox::EnableSelectionAsDropTarget( BOOL bEnable, BOOL bWithChilds )
+void SvLBox::EnableSelectionAsDropTarget( sal_Bool bEnable, sal_Bool bWithChilds )
{
DBG_CHKTHIS(SvLBox,0);
- USHORT nRefDepth;
+ sal_uInt16 nRefDepth;
SvLBoxEntry* pTemp;
SvLBoxEntry* pSelEntry = FirstSelected();
@@ -1428,11 +1428,11 @@ SvLBoxEntry* SvLBox::GetDropTarget( const Point& )
void SvLBox::EditText( const String& rStr, const Rectangle& rRect,
const Selection& rSel )
{
- EditText( rStr, rRect, rSel, FALSE );
+ EditText( rStr, rRect, rSel, sal_False );
}
void SvLBox::EditText( const String& rStr, const Rectangle& rRect,
- const Selection& rSel, BOOL bMulti )
+ const Selection& rSel, sal_Bool bMulti )
{
DBG_CHKTHIS(SvLBox,0);
if( pEdCtrl )
@@ -1474,11 +1474,11 @@ void SvLBox::CancelTextEditing()
{
DBG_CHKTHIS(SvLBox,0);
if ( pEdCtrl )
- pEdCtrl->StopEditing( TRUE );
+ pEdCtrl->StopEditing( sal_True );
nImpFlags &= (~SVLBOX_IN_EDT);
}
-void SvLBox::EndEditing( BOOL bCancel )
+void SvLBox::EndEditing( sal_Bool bCancel )
{
DBG_CHKTHIS(SvLBox,0);
if( pEdCtrl )
@@ -1592,7 +1592,7 @@ void SvLBox::SelectSearchEntry( const void* _pEntry )
if ( !pEntry )
return;
- SelectAll( FALSE );
+ SelectAll( sal_False );
SetCurEntry( pEntry );
Select( pEntry );
}
@@ -1643,7 +1643,7 @@ bool SvLBox::HandleKeyInput( const KeyEvent& _rKEvt )
return false;
}
-SvLBoxEntry* SvLBox::GetEntry( const Point&, BOOL ) const
+SvLBoxEntry* SvLBox::GetEntry( const Point&, sal_Bool ) const
{
DBG_CHKTHIS(SvLBox,0);
return 0;
@@ -1652,15 +1652,15 @@ SvLBoxEntry* SvLBox::GetEntry( const Point&, BOOL ) const
void SvLBox::ModelHasEntryInvalidated( SvListEntry* pEntry )
{
DBG_CHKTHIS(SvLBox,0);
- USHORT nCount = ((SvLBoxEntry*)pEntry)->ItemCount();
- for( USHORT nIdx = 0; nIdx < nCount; nIdx++ )
+ sal_uInt16 nCount = ((SvLBoxEntry*)pEntry)->ItemCount();
+ for( sal_uInt16 nIdx = 0; nIdx < nCount; nIdx++ )
{
SvLBoxItem* pItem = ((SvLBoxEntry*)pEntry)->GetItem( nIdx );
pItem->InitViewData( this, (SvLBoxEntry*)pEntry, 0 );
}
}
-void SvLBox::SetInUseEmphasis( SvLBoxEntry* pEntry, BOOL bInUse )
+void SvLBox::SetInUseEmphasis( SvLBoxEntry* pEntry, sal_Bool bInUse )
{
DBG_CHKTHIS(SvLBox,0);
DBG_ASSERT(pEntry,"SetInUseEmphasis:No Entry");
@@ -1682,7 +1682,7 @@ void SvLBox::SetInUseEmphasis( SvLBoxEntry* pEntry, BOOL bInUse )
}
}
-void SvLBox::SetCursorEmphasis( SvLBoxEntry* pEntry, BOOL bCursored )
+void SvLBox::SetCursorEmphasis( SvLBoxEntry* pEntry, sal_Bool bCursored )
{
DBG_CHKTHIS(SvLBox,0);
DBG_ASSERT(pEntry,"SetInUseEmphasis:No Entry");
@@ -1697,7 +1697,7 @@ void SvLBox::SetCursorEmphasis( SvLBoxEntry* pEntry, BOOL bCursored )
}
}
-BOOL SvLBox::HasCursorEmphasis( SvLBoxEntry* pEntry ) const
+sal_Bool SvLBox::HasCursorEmphasis( SvLBoxEntry* pEntry ) const
{
DBG_CHKTHIS(SvLBox,0);
DBG_ASSERT(pEntry,"SetInUseEmphasis:No Entry");
@@ -1716,11 +1716,11 @@ void SvLBox::ReadDragServerInfo(const Point&, SvLBoxDDInfo* )
DBG_CHKTHIS(SvLBox,0);
}
-BOOL SvLBox::EditingCanceled() const
+sal_Bool SvLBox::EditingCanceled() const
{
if( pEdCtrl && pEdCtrl->EditingCanceled() )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
@@ -1732,7 +1732,7 @@ sal_Int8 SvLBox::AcceptDrop( const AcceptDropEvent& rEvt )
if( rEvt.mbLeaving || !CheckDragAndDropMode( pDDSource, rEvt.mnAction ) )
{
- ImplShowTargetEmphasis( pTargetEntry, FALSE );
+ ImplShowTargetEmphasis( pTargetEntry, sal_False );
}
else if( !nDragDropMode )
{
@@ -1759,12 +1759,12 @@ sal_Int8 SvLBox::AcceptDrop( const AcceptDropEvent& rEvt )
// **** Emphasis zeichnen ****
if( DND_ACTION_NONE == nRet )
- ImplShowTargetEmphasis( pTargetEntry, FALSE );
+ ImplShowTargetEmphasis( pTargetEntry, sal_False );
else if( pEntry != pTargetEntry || !(nImpFlags & SVLBOX_TARGEMPH_VIS) )
{
- ImplShowTargetEmphasis( pTargetEntry, FALSE );
+ ImplShowTargetEmphasis( pTargetEntry, sal_False );
pTargetEntry = pEntry;
- ImplShowTargetEmphasis( pTargetEntry, TRUE );
+ ImplShowTargetEmphasis( pTargetEntry, sal_True );
}
}
return nRet;
@@ -1776,9 +1776,9 @@ sal_Int8 SvLBox::ExecuteDrop( const ExecuteDropEvent& rEvt, SvLBox* pSourceView
sal_Int8 nRet = DND_ACTION_NONE;
DBG_ASSERT( pSourceView, "SvLBox::ExecuteDrop(): no source view" );
- pSourceView->EnableSelectionAsDropTarget( TRUE, TRUE );
+ pSourceView->EnableSelectionAsDropTarget( sal_True, sal_True );
- ImplShowTargetEmphasis( pTargetEntry, FALSE );
+ ImplShowTargetEmphasis( pTargetEntry, sal_False );
pDDTarget = this;
SvLBoxDDInfo aDDInfo;
@@ -1874,8 +1874,8 @@ void SvLBox::StartDrag( sal_Int8, const Point& rPosPixel )
pDDSource = this;
pDDTarget = 0;
- BOOL bOldUpdateMode = Control::IsUpdateMode();
- Control::SetUpdateMode( TRUE );
+ sal_Bool bOldUpdateMode = Control::IsUpdateMode();
+ Control::SetUpdateMode( sal_True );
Update();
Control::SetUpdateMode( bOldUpdateMode );
@@ -1883,8 +1883,8 @@ void SvLBox::StartDrag( sal_Int8, const Point& rPosPixel )
// Wichtig: Wenn im DropHandler die Selektion der
// SourceListBox veraendert wird, muessen vorher die Eintraege
// als DropTargets wieder freigeschaltet werden:
- // (GetSourceListBox()->EnableSelectionAsDropTarget( TRUE, TRUE );)
- EnableSelectionAsDropTarget( FALSE, TRUE /* with Childs */ );
+ // (GetSourceListBox()->EnableSelectionAsDropTarget( sal_True, sal_True );)
+ EnableSelectionAsDropTarget( sal_False, sal_True /* with Childs */ );
pContainer->StartDrag( this, nDragOptions, GetDragFinishedHdl() );
}
@@ -1895,18 +1895,18 @@ nAction
#endif
)
{
- EnableSelectionAsDropTarget( TRUE, TRUE );
+ EnableSelectionAsDropTarget( sal_True, sal_True );
#ifndef UNX
if( (nAction == DND_ACTION_MOVE) && ( (pDDTarget &&
- ((ULONG)(pDDTarget->GetModel())!=(ULONG)(this->GetModel()))) ||
+ ((sal_uLong)(pDDTarget->GetModel())!=(sal_uLong)(this->GetModel()))) ||
!pDDTarget ))
{
RemoveSelection();
}
#endif
- ImplShowTargetEmphasis( pTargetEntry, FALSE );
+ ImplShowTargetEmphasis( pTargetEntry, sal_False );
pDDSource = 0;
pDDTarget = 0;
pTargetEntry = 0;
@@ -1919,10 +1919,10 @@ DragDropMode SvLBox::NotifyStartDrag( TransferDataContainer&, SvLBoxEntry* )
return (DragDropMode)0xffff;
}
-BOOL SvLBox::NotifyAcceptDrop( SvLBoxEntry* )
+sal_Bool SvLBox::NotifyAcceptDrop( SvLBoxEntry* )
{
DBG_CHKTHIS(SvLBox,0);
- return TRUE;
+ return sal_True;
}
// handler and methods for Drag - finished handler.
@@ -1939,20 +1939,20 @@ namespace
void SvLBox::AddBoxToDDList_Impl( const SvLBox& rB )
{
- ULONG nVal = (ULONG)&rB;
+ sal_uLong nVal = (sal_uLong)&rB;
SortLBoxes::get().Insert( nVal );
}
void SvLBox::RemoveBoxFromDDList_Impl( const SvLBox& rB )
{
- ULONG nVal = (ULONG)&rB;
+ sal_uLong nVal = (sal_uLong)&rB;
SortLBoxes::get().Remove( nVal );
}
IMPL_STATIC_LINK( SvLBox, DragFinishHdl_Impl, sal_Int8*, pAction )
{
- ULONG nVal = (ULONG)pThis;
- USHORT nFnd;
+ sal_uLong nVal = (sal_uLong)pThis;
+ sal_uInt16 nFnd;
SvULongsSort &rSortLBoxes = SortLBoxes::get();
if( rSortLBoxes.Seek_Entry( nVal, &nFnd ) )
{
diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx
index 53fbded59f11..ed48f9fc6352 100644
--- a/svtools/source/contnr/svtabbx.cxx
+++ b/svtools/source/contnr/svtabbx.cxx
@@ -75,7 +75,7 @@ void SvTabListBox::SetTabs()
*/
// alle anderen Tabs an Liste haengen
- for( USHORT nCurTab = 1; nCurTab < nTabCount; nCurTab++ )
+ for( sal_uInt16 nCurTab = 1; nCurTab < nTabCount; nCurTab++ )
{
SvLBoxTab* pTab = pTabList+nCurTab;
AddTab( pTab->GetPos(), pTab->nFlags );
@@ -90,10 +90,10 @@ void SvTabListBox::InitEntry( SvLBoxEntry* pEntry, const XubString& rStr,
XubString aToken;
const xub_Unicode* pCurToken = aCurEntry.GetBuffer();
- USHORT nCurTokenLen;
+ sal_uInt16 nCurTokenLen;
const xub_Unicode* pNextToken = GetToken( pCurToken, nCurTokenLen );
- USHORT nCount = nTabCount; nCount--;
- for( USHORT nToken = 0; nToken < nCount; nToken++ )
+ sal_uInt16 nCount = nTabCount; nCount--;
+ for( sal_uInt16 nToken = 0; nToken < nCount; nToken++ )
{
if( pCurToken && nCurTokenLen )
// aToken.Assign( pCurToken, nCurTokenLen );
@@ -147,7 +147,7 @@ void SvTabListBox::SetTabs( long* pTabs, MapUnit eMapUnit )
return;
delete [] pTabList;
- USHORT nCount = (USHORT)(*pTabs);
+ sal_uInt16 nCount = (sal_uInt16)(*pTabs);
pTabList = new SvLBoxTab[ nCount ];
nTabCount = nCount;
@@ -155,7 +155,7 @@ void SvTabListBox::SetTabs( long* pTabs, MapUnit eMapUnit )
MapMode aMMDest( MAP_PIXEL );
pTabs++;
- for( USHORT nIdx = 0; nIdx < nCount; nIdx++, pTabs++ )
+ for( sal_uInt16 nIdx = 0; nIdx < nCount; nIdx++, pTabs++ )
{
Size aSize( *pTabs, 0 );
aSize = LogicToLogic( aSize, &aMMSource, &aMMDest );
@@ -168,7 +168,7 @@ void SvTabListBox::SetTabs( long* pTabs, MapUnit eMapUnit )
Invalidate();
}
-void SvTabListBox::SetTab( USHORT nTab,long nValue,MapUnit eMapUnit )
+void SvTabListBox::SetTab( sal_uInt16 nTab,long nValue,MapUnit eMapUnit )
{
DBG_ASSERT(nTab<nTabCount,"Invalid Tab-Pos");
if( nTab < nTabCount )
@@ -187,8 +187,8 @@ void SvTabListBox::SetTab( USHORT nTab,long nValue,MapUnit eMapUnit )
}
SvLBoxEntry* SvTabListBox::InsertEntry( const XubString& rText, SvLBoxEntry* pParent,
- BOOL /*bChildsOnDemand*/,
- ULONG nPos, void* pUserData,
+ sal_Bool /*bChildsOnDemand*/,
+ sal_uLong nPos, void* pUserData,
SvLBoxButtonKind )
{
return InsertEntryToColumn( rText, pParent, nPos, 0xffff, pUserData );
@@ -198,15 +198,15 @@ SvLBoxEntry* SvTabListBox::InsertEntry( const XubString& rText,
const Image& rExpandedEntryBmp,
const Image& rCollapsedEntryBmp,
SvLBoxEntry* pParent,
- BOOL /*bChildsOnDemand*/,
- ULONG nPos, void* pUserData,
+ sal_Bool /*bChildsOnDemand*/,
+ sal_uLong nPos, void* pUserData,
SvLBoxButtonKind )
{
return InsertEntryToColumn( rText, rExpandedEntryBmp, rCollapsedEntryBmp,
pParent, nPos, 0xffff, pUserData );
}
-SvLBoxEntry* SvTabListBox::InsertEntryToColumn(const XubString& rStr,SvLBoxEntry* pParent,ULONG nPos,USHORT nCol,
+SvLBoxEntry* SvTabListBox::InsertEntryToColumn(const XubString& rStr,SvLBoxEntry* pParent,sal_uLong nPos,sal_uInt16 nCol,
void* pUser )
{
XubString aStr;
@@ -220,7 +220,7 @@ SvLBoxEntry* SvTabListBox::InsertEntryToColumn(const XubString& rStr,SvLBoxEntry
}
aStr += rStr;
XubString aFirstStr( aStr );
- USHORT nEnd = aFirstStr.Search( '\t' );
+ sal_uInt16 nEnd = aFirstStr.Search( '\t' );
if( nEnd != STRING_NOTFOUND )
{
aFirstStr.Erase( nEnd );
@@ -229,12 +229,12 @@ SvLBoxEntry* SvTabListBox::InsertEntryToColumn(const XubString& rStr,SvLBoxEntry
}
else
aCurEntry.Erase();
- return SvTreeListBox::InsertEntry( aFirstStr, pParent, FALSE, nPos, pUser );
+ return SvTreeListBox::InsertEntry( aFirstStr, pParent, sal_False, nPos, pUser );
}
SvLBoxEntry* SvTabListBox::InsertEntryToColumn( const XubString& rStr,
const Image& rExpandedEntryBmp, const Image& rCollapsedEntryBmp,
- SvLBoxEntry* pParent,ULONG nPos,USHORT nCol, void* pUser )
+ SvLBoxEntry* pParent,sal_uLong nPos,sal_uInt16 nCol, void* pUser )
{
XubString aStr;
if( nCol != 0xffff )
@@ -247,7 +247,7 @@ SvLBoxEntry* SvTabListBox::InsertEntryToColumn( const XubString& rStr,
}
aStr += rStr;
XubString aFirstStr( aStr );
- USHORT nEnd = aFirstStr.Search( '\t' );
+ sal_uInt16 nEnd = aFirstStr.Search( '\t' );
if( nEnd != STRING_NOTFOUND )
{
aFirstStr.Erase( nEnd );
@@ -260,11 +260,11 @@ SvLBoxEntry* SvTabListBox::InsertEntryToColumn( const XubString& rStr,
return SvTreeListBox::InsertEntry(
aFirstStr,
rExpandedEntryBmp, rCollapsedEntryBmp,
- pParent, FALSE, nPos, pUser );
+ pParent, sal_False, nPos, pUser );
}
-SvLBoxEntry* SvTabListBox::InsertEntryToColumn( const XubString& rStr, ULONG nPos,
- USHORT nCol, void* pUser )
+SvLBoxEntry* SvTabListBox::InsertEntryToColumn( const XubString& rStr, sal_uLong nPos,
+ sal_uInt16 nCol, void* pUser )
{
return InsertEntryToColumn( rStr,0,nPos, nCol, pUser );
}
@@ -274,14 +274,14 @@ String SvTabListBox::GetEntryText( SvLBoxEntry* pEntry ) const
return GetEntryText( pEntry, 0xffff );
}
-String SvTabListBox::GetEntryText( SvLBoxEntry* pEntry, USHORT nCol ) const
+String SvTabListBox::GetEntryText( SvLBoxEntry* pEntry, sal_uInt16 nCol ) const
{
DBG_ASSERT(pEntry,"GetEntryText:Invalid Entry");
XubString aResult;
if( pEntry )
{
- USHORT nCount = pEntry->ItemCount();
- USHORT nCur = 0;
+ sal_uInt16 nCount = pEntry->ItemCount();
+ sal_uInt16 nCur = 0;
while( nCur < nCount )
{
SvLBoxItem* pStr = pEntry->GetItem( nCur );
@@ -306,19 +306,19 @@ String SvTabListBox::GetEntryText( SvLBoxEntry* pEntry, USHORT nCol ) const
return aResult;
}
-String SvTabListBox::GetEntryText( ULONG nPos, USHORT nCol ) const
+String SvTabListBox::GetEntryText( sal_uLong nPos, sal_uInt16 nCol ) const
{
SvLBoxEntry* pEntry = GetEntryOnPos( nPos );
return GetEntryText( pEntry, nCol );
}
-void SvTabListBox::SetEntryText( const XubString& rStr, ULONG nPos, USHORT nCol )
+void SvTabListBox::SetEntryText( const XubString& rStr, sal_uLong nPos, sal_uInt16 nCol )
{
SvLBoxEntry* pEntry = SvTreeListBox::GetEntry( nPos );
SetEntryText( rStr, pEntry, nCol );
}
-void SvTabListBox::SetEntryText( const XubString& rStr, SvLBoxEntry* pEntry, USHORT nCol )
+void SvTabListBox::SetEntryText( const XubString& rStr, SvLBoxEntry* pEntry, sal_uInt16 nCol )
{
DBG_ASSERT(pEntry,"SetEntryText:Invalid Entry");
if( !pEntry )
@@ -328,14 +328,14 @@ void SvTabListBox::SetEntryText( const XubString& rStr, SvLBoxEntry* pEntry, USH
if ( sOldText == rStr )
return;
- USHORT nTextColumn = nCol;
+ sal_uInt16 nTextColumn = nCol;
const xub_Unicode* pCurToken = rStr.GetBuffer();
- USHORT nCurTokenLen;
+ sal_uInt16 nCurTokenLen;
const xub_Unicode* pNextToken = GetToken( pCurToken, nCurTokenLen );
XubString aTemp;
- USHORT nCount = pEntry->ItemCount();
- USHORT nCur = 0;
+ sal_uInt16 nCount = pEntry->ItemCount();
+ sal_uInt16 nCur = 0;
while( nCur < nCount )
{
SvLBoxItem* pStr = pEntry->GetItem( nCur );
@@ -375,7 +375,7 @@ void SvTabListBox::SetEntryText( const XubString& rStr, SvLBoxEntry* pEntry, USH
delete pData;
}
-String SvTabListBox::GetCellText( ULONG nPos, USHORT nCol ) const
+String SvTabListBox::GetCellText( sal_uLong nPos, sal_uInt16 nCol ) const
{
SvLBoxEntry* pEntry = GetEntryOnPos( nPos );
DBG_ASSERT( pEntry, "SvTabListBox::GetCellText(): Invalid Entry" );
@@ -389,9 +389,9 @@ String SvTabListBox::GetCellText( ULONG nPos, USHORT nCol ) const
return aResult;
}
-ULONG SvTabListBox::GetEntryPos( const XubString& rStr, USHORT nCol )
+sal_uLong SvTabListBox::GetEntryPos( const XubString& rStr, sal_uInt16 nCol )
{
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
SvLBoxEntry* pEntry = First();
while( pEntry )
{
@@ -404,9 +404,9 @@ ULONG SvTabListBox::GetEntryPos( const XubString& rStr, USHORT nCol )
return 0xffffffff;
}
-ULONG SvTabListBox::GetEntryPos( const SvLBoxEntry* pEntry ) const
+sal_uLong SvTabListBox::GetEntryPos( const SvLBoxEntry* pEntry ) const
{
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
SvLBoxEntry* pTmpEntry = First();
while( pTmpEntry )
{
@@ -424,7 +424,7 @@ void __EXPORT SvTabListBox::Resize()
}
// static
-const xub_Unicode* SvTabListBox::GetToken( const xub_Unicode* pPtr, USHORT& rLen )
+const xub_Unicode* SvTabListBox::GetToken( const xub_Unicode* pPtr, sal_uInt16& rLen )
{
if( !pPtr || *pPtr == 0 )
{
@@ -432,7 +432,7 @@ const xub_Unicode* SvTabListBox::GetToken( const xub_Unicode* pPtr, USHORT& rLen
return 0;
}
xub_Unicode c = *pPtr;
- USHORT nLen = 0;
+ sal_uInt16 nLen = 0;
while( c != '\t' && c != 0 )
{
pPtr++;
@@ -447,15 +447,15 @@ const xub_Unicode* SvTabListBox::GetToken( const xub_Unicode* pPtr, USHORT& rLen
return pPtr;
}
-String SvTabListBox::GetTabEntryText( ULONG nPos, USHORT nCol ) const
+String SvTabListBox::GetTabEntryText( sal_uLong nPos, sal_uInt16 nCol ) const
{
SvLBoxEntry* pEntry = SvTreeListBox::GetEntry( nPos );
DBG_ASSERT( pEntry, "GetTabEntryText(): Invalid entry " );
XubString aResult;
if ( pEntry )
{
- USHORT nCount = pEntry->ItemCount();
- USHORT nCur = ( 0 == nCol && IsCellFocusEnabled() ) ? GetCurrentTabPos() : 0;
+ sal_uInt16 nCount = pEntry->ItemCount();
+ sal_uInt16 nCur = ( 0 == nCol && IsCellFocusEnabled() ) ? GetCurrentTabPos() : 0;
while( nCur < nCount )
{
SvLBoxItem* pStr = pEntry->GetItem( nCur );
@@ -485,10 +485,10 @@ String SvTabListBox::GetTabEntryText( ULONG nPos, USHORT nCol ) const
return aResult;
}
-SvLBoxEntry* SvTabListBox::GetEntryOnPos( ULONG _nEntryPos ) const
+SvLBoxEntry* SvTabListBox::GetEntryOnPos( sal_uLong _nEntryPos ) const
{
SvLBoxEntry* pEntry = NULL;
- ULONG i, nPos = 0, nCount = GetLevelChildCount( NULL );
+ sal_uLong i, nPos = 0, nCount = GetLevelChildCount( NULL );
for ( i = 0; i < nCount; ++i )
{
SvLBoxEntry* pParent = GetEntry(i);
@@ -509,9 +509,9 @@ SvLBoxEntry* SvTabListBox::GetEntryOnPos( ULONG _nEntryPos ) const
return pEntry;
}
-SvLBoxEntry* SvTabListBox::GetChildOnPos( SvLBoxEntry* _pParent, ULONG _nEntryPos, ULONG& _rPos ) const
+SvLBoxEntry* SvTabListBox::GetChildOnPos( SvLBoxEntry* _pParent, sal_uLong _nEntryPos, sal_uLong& _rPos ) const
{
- ULONG i, nCount = GetLevelChildCount( _pParent );
+ sal_uLong i, nCount = GetLevelChildCount( _pParent );
for ( i = 0; i < nCount; ++i )
{
SvLBoxEntry* pParent = GetEntry( _pParent, i );
@@ -529,33 +529,33 @@ SvLBoxEntry* SvTabListBox::GetChildOnPos( SvLBoxEntry* _pParent, ULONG _nEntryPo
return NULL;
}
-void SvTabListBox::SetTabJustify( USHORT nTab, SvTabJustify eJustify)
+void SvTabListBox::SetTabJustify( sal_uInt16 nTab, SvTabJustify eJustify)
{
if( nTab >= nTabCount )
return;
SvLBoxTab* pTab = &(pTabList[ nTab ]);
- USHORT nFlags = pTab->nFlags;
+ sal_uInt16 nFlags = pTab->nFlags;
nFlags &= (~MYTABMASK);
- nFlags |= (USHORT)eJustify;
+ nFlags |= (sal_uInt16)eJustify;
pTab->nFlags = nFlags;
SvTreeListBox::nTreeFlags |= TREEFLAG_RECALCTABS;
if( IsUpdateMode() )
Invalidate();
}
-SvTabJustify SvTabListBox::GetTabJustify( USHORT nTab ) const
+SvTabJustify SvTabListBox::GetTabJustify( sal_uInt16 nTab ) const
{
SvTabJustify eResult = AdjustLeft;
if( nTab >= nTabCount )
return eResult;
SvLBoxTab* pTab = &(pTabList[ nTab ]);
- USHORT nFlags = pTab->nFlags;
+ sal_uInt16 nFlags = pTab->nFlags;
nFlags &= MYTABMASK;
eResult = (SvTabJustify)nFlags;
return eResult;
}
-long SvTabListBox::GetLogicTab( USHORT nTab )
+long SvTabListBox::GetLogicTab( sal_uInt16 nTab )
{
if( SvTreeListBox::nTreeFlags & TREEFLAG_RECALCTABS )
((SvTabListBox*)this)->SetTabs();
@@ -583,7 +583,7 @@ SvHeaderTabListBox::SvHeaderTabListBox( Window* pParent, WinBits nWinStyle ) :
SvTabListBox( pParent, nWinStyle ),
- m_bFirstPaint ( TRUE ),
+ m_bFirstPaint ( sal_True ),
m_pImpl ( new ::svt::SvHeaderTabListBoxImpl ),
m_pAccessible ( NULL )
{
@@ -595,7 +595,7 @@ SvHeaderTabListBox::SvHeaderTabListBox( Window* pParent, const ResId& rResId ) :
SvTabListBox( pParent, rResId ),
- m_bFirstPaint ( TRUE ),
+ m_bFirstPaint ( sal_True ),
m_pImpl ( new ::svt::SvHeaderTabListBoxImpl ),
m_pAccessible ( NULL )
{
@@ -614,7 +614,7 @@ void SvHeaderTabListBox::Paint( const Rectangle& rRect )
{
if ( m_bFirstPaint )
{
- m_bFirstPaint = FALSE;
+ m_bFirstPaint = sal_False;
RepaintScrollBars();
}
SvTabListBox::Paint( rRect );
@@ -633,14 +633,14 @@ void SvHeaderTabListBox::InitHeaderBar( HeaderBar* pHeaderBar )
// -----------------------------------------------------------------------
-sal_Bool SvHeaderTabListBox::IsItemChecked( SvLBoxEntry* pEntry, USHORT nCol ) const
+sal_Bool SvHeaderTabListBox::IsItemChecked( SvLBoxEntry* pEntry, sal_uInt16 nCol ) const
{
SvButtonState eState = SV_BUTTON_UNCHECKED;
SvLBoxButton* pItem = (SvLBoxButton*)( pEntry->GetItem( nCol + 1 ) );
if ( pItem && ( (SvLBoxItem*)pItem )->IsA() == SV_ITEM_ID_LBOXBUTTON )
{
- USHORT nButtonFlags = pItem->GetButtonFlags();
+ sal_uInt16 nButtonFlags = pItem->GetButtonFlags();
eState = pCheckButtonData->ConvertToButtonState( nButtonFlags );
}
@@ -650,7 +650,7 @@ sal_Bool SvHeaderTabListBox::IsItemChecked( SvLBoxEntry* pEntry, USHORT nCol ) c
// -----------------------------------------------------------------------
SvLBoxEntry* SvHeaderTabListBox::InsertEntryToColumn(
- const XubString& rStr, ULONG nPos, USHORT nCol, void* pUserData )
+ const XubString& rStr, sal_uLong nPos, sal_uInt16 nCol, void* pUserData )
{
SvLBoxEntry* pEntry = SvTabListBox::InsertEntryToColumn( rStr, nPos, nCol, pUserData );
RecalculateAccessibleChildren();
@@ -660,7 +660,7 @@ SvLBoxEntry* SvHeaderTabListBox::InsertEntryToColumn(
// -----------------------------------------------------------------------
SvLBoxEntry* SvHeaderTabListBox::InsertEntryToColumn(
- const XubString& rStr, SvLBoxEntry* pParent, ULONG nPos, USHORT nCol, void* pUserData )
+ const XubString& rStr, SvLBoxEntry* pParent, sal_uLong nPos, sal_uInt16 nCol, void* pUserData )
{
SvLBoxEntry* pEntry = SvTabListBox::InsertEntryToColumn( rStr, pParent, nPos, nCol, pUserData );
RecalculateAccessibleChildren();
@@ -671,7 +671,7 @@ SvLBoxEntry* SvHeaderTabListBox::InsertEntryToColumn(
SvLBoxEntry* SvHeaderTabListBox::InsertEntryToColumn(
const XubString& rStr, const Image& rExpandedEntryBmp, const Image& rCollapsedEntryBmp,
- SvLBoxEntry* pParent, ULONG nPos, USHORT nCol, void* pUserData )
+ SvLBoxEntry* pParent, sal_uLong nPos, sal_uInt16 nCol, void* pUserData )
{
SvLBoxEntry* pEntry = SvTabListBox::InsertEntryToColumn(
rStr, rExpandedEntryBmp, rCollapsedEntryBmp, pParent, nPos, nCol, pUserData );
@@ -681,19 +681,19 @@ SvLBoxEntry* SvHeaderTabListBox::InsertEntryToColumn(
// -----------------------------------------------------------------------
-ULONG SvHeaderTabListBox::Insert(
- SvLBoxEntry* pEnt, SvLBoxEntry* pPar, ULONG nPos )
+sal_uLong SvHeaderTabListBox::Insert(
+ SvLBoxEntry* pEnt, SvLBoxEntry* pPar, sal_uLong nPos )
{
- ULONG n = SvTabListBox::Insert( pEnt, pPar, nPos );
+ sal_uLong n = SvTabListBox::Insert( pEnt, pPar, nPos );
RecalculateAccessibleChildren();
return n;
}
// -----------------------------------------------------------------------
-ULONG SvHeaderTabListBox::Insert( SvLBoxEntry* pEntry, ULONG nRootPos )
+sal_uLong SvHeaderTabListBox::Insert( SvLBoxEntry* pEntry, sal_uLong nRootPos )
{
- ULONG nPos = SvTabListBox::Insert( pEntry, nRootPos );
+ sal_uLong nPos = SvTabListBox::Insert( pEntry, nRootPos );
RecalculateAccessibleChildren();
return nPos;
}
@@ -765,7 +765,7 @@ sal_Bool SvHeaderTabListBox::IsCellCheckBox( long _nRow, sal_uInt16 _nColumn, Tr
SvLBoxEntry* pEntry = GetEntry( _nRow );
if ( pEntry )
{
- USHORT nItemCount = pEntry->ItemCount();
+ sal_uInt16 nItemCount = pEntry->ItemCount();
if ( nItemCount > ( _nColumn + 1 ) )
{
SvLBoxButton* pItem = (SvLBoxButton*)( pEntry->GetItem( _nColumn + 1 ) );
@@ -801,8 +801,8 @@ sal_Int32 SvHeaderTabListBox::GetCurrRow() const
SvLBoxEntry* pEntry = GetCurEntry();
if ( pEntry )
{
- ULONG nCount = GetEntryCount();
- for ( ULONG i = 0; i < nCount; ++i )
+ sal_uLong nCount = GetEntryCount();
+ for ( sal_uLong i = 0; i < nCount; ++i )
{
if ( pEntry == GetEntry(i) )
{
@@ -843,11 +843,11 @@ sal_Bool SvHeaderTabListBox::IsCellFocusable() const
// -----------------------------------------------------------------------
sal_Bool SvHeaderTabListBox::GoToCell( sal_Int32 _nRow, sal_uInt16 _nColumn )
{
- sal_Bool bRet = ( IsCellFocusEnabled() == TRUE );
+ sal_Bool bRet = ( IsCellFocusEnabled() == sal_True );
if ( bRet )
{
// first set cursor to _nRow
- SetCursor( GetEntry( _nRow ), TRUE );
+ SetCursor( GetEntry( _nRow ), sal_True );
// then set the focus into _nColumn
bRet = ( SetCurrentTabPos( _nColumn ) == true );
}
@@ -856,22 +856,22 @@ sal_Bool SvHeaderTabListBox::GoToCell( sal_Int32 _nRow, sal_uInt16 _nColumn )
// -----------------------------------------------------------------------
void SvHeaderTabListBox::SetNoSelection()
{
- SvLBox::SelectAll( FALSE );
+ SvLBox::SelectAll( sal_False );
}
// -----------------------------------------------------------------------
void SvHeaderTabListBox::SelectAll()
{
- SvLBox::SelectAll( TRUE );
+ SvLBox::SelectAll( sal_True );
}
// -----------------------------------------------------------------------
-void SvHeaderTabListBox::SelectAll( BOOL bSelect, BOOL bPaint )
+void SvHeaderTabListBox::SelectAll( sal_Bool bSelect, sal_Bool bPaint )
{
- // overwritten just to disambiguate the SelectAll() from the base' class SelectAll( BOOl, BOOL )
+ // overwritten just to disambiguate the SelectAll() from the base' class SelectAll( BOOl, sal_Bool )
SvTabListBox::SelectAll( bSelect, bPaint );
}
// -----------------------------------------------------------------------
-void SvHeaderTabListBox::SelectRow( long _nRow, BOOL _bSelect, BOOL )
+void SvHeaderTabListBox::SelectRow( long _nRow, sal_Bool _bSelect, sal_Bool )
{
Select( GetEntry( _nRow ), _bSelect );
}
@@ -898,7 +898,7 @@ bool SvHeaderTabListBox::IsRowSelected( long _nRow ) const
// -----------------------------------------------------------------------
sal_Bool SvHeaderTabListBox::IsColumnSelected( long ) const
{
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
void SvHeaderTabListBox::GetAllSelectedRows( ::com::sun::star::uno::Sequence< sal_Int32 >& ) const
@@ -914,12 +914,12 @@ sal_Bool SvHeaderTabListBox::IsCellVisible( sal_Int32, sal_uInt16 ) const
return sal_True;
}
// -----------------------------------------------------------------------
-String SvHeaderTabListBox::GetAccessibleCellText( long _nRow, USHORT _nColumnPos ) const
+String SvHeaderTabListBox::GetAccessibleCellText( long _nRow, sal_uInt16 _nColumnPos ) const
{
return ::rtl::OUString( GetTabEntryText( _nRow, _nColumnPos ) );
}
// -----------------------------------------------------------------------
-Rectangle SvHeaderTabListBox::calcHeaderRect( sal_Bool _bIsColumnBar, BOOL _bOnScreen )
+Rectangle SvHeaderTabListBox::calcHeaderRect( sal_Bool _bIsColumnBar, sal_Bool _bOnScreen )
{
Rectangle aRect;
if ( _bIsColumnBar )
@@ -933,7 +933,7 @@ Rectangle SvHeaderTabListBox::calcHeaderRect( sal_Bool _bIsColumnBar, BOOL _bOnS
return aRect;
}
// -----------------------------------------------------------------------
-Rectangle SvHeaderTabListBox::calcTableRect( BOOL _bOnScreen )
+Rectangle SvHeaderTabListBox::calcTableRect( sal_Bool _bOnScreen )
{
Window* pParent = NULL;
if ( !_bOnScreen )
@@ -943,14 +943,14 @@ Rectangle SvHeaderTabListBox::calcTableRect( BOOL _bOnScreen )
return aRect;
}
// -----------------------------------------------------------------------
-Rectangle SvHeaderTabListBox::GetFieldRectPixelAbs( sal_Int32 _nRow, sal_uInt16 _nColumn, BOOL _bIsHeader, BOOL _bOnScreen )
+Rectangle SvHeaderTabListBox::GetFieldRectPixelAbs( sal_Int32 _nRow, sal_uInt16 _nColumn, sal_Bool _bIsHeader, sal_Bool _bOnScreen )
{
DBG_ASSERT( !_bIsHeader || 0 == _nRow, "invalid parameters" );
Rectangle aRect;
SvLBoxEntry* pEntry = GetEntry( _nRow );
if ( pEntry )
{
- aRect = _bIsHeader ? calcHeaderRect( sal_True, FALSE ) : GetBoundingRect( pEntry );
+ aRect = _bIsHeader ? calcHeaderRect( sal_True, sal_False ) : GetBoundingRect( pEntry );
Point aTopLeft = aRect.TopLeft();
DBG_ASSERT( m_pImpl->m_pHeaderBar->GetItemCount() > _nColumn, "invalid column" );
Rectangle aItemRect = m_pImpl->m_pHeaderBar->GetItemRect( m_pImpl->m_pHeaderBar->GetItemId( _nColumn ) );
@@ -1108,7 +1108,7 @@ sal_Bool SvHeaderTabListBox::ConvertPointToColumnHeader( sal_uInt16&, const Poin
}
case ::svt::BBTYPE_COLUMNHEADERCELL:
{
- aRetText = m_pImpl->m_pHeaderBar->GetItemText( m_pImpl->m_pHeaderBar->GetItemId( (USHORT)_nPos ) );
+ aRetText = m_pImpl->m_pHeaderBar->GetItemText( m_pImpl->m_pHeaderBar->GetItemId( (sal_uInt16)_nPos ) );
break;
}
@@ -1227,7 +1227,7 @@ void SvHeaderTabListBox::GrabTableFocus()
GrabFocus();
}
// -----------------------------------------------------------------------
-BOOL SvHeaderTabListBox::GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector )
+sal_Bool SvHeaderTabListBox::GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector )
{
return Control::GetGlyphBoundRects( rOrigin, rStr, nIndex, nLen, nBase, rVector );
}
@@ -1242,7 +1242,7 @@ void SvHeaderTabListBox::GrabFocus()
Control::GrabFocus();
}
// -----------------------------------------------------------------------
-Reference< XAccessible > SvHeaderTabListBox::GetAccessible( BOOL bCreate )
+Reference< XAccessible > SvHeaderTabListBox::GetAccessible( sal_Bool bCreate )
{
return Control::GetAccessible( bCreate );
}
@@ -1286,7 +1286,7 @@ Rectangle SvHeaderTabListBox::GetFieldCharacterBounds(sal_Int32,sal_Int32,sal_In
// -----------------------------------------------------------------------------
sal_Int32 SvHeaderTabListBox::GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint)
{
- String sText = GetAccessibleCellText( _nRow, static_cast< USHORT >( _nColumnPos ) );
+ String sText = GetAccessibleCellText( _nRow, static_cast< sal_uInt16 >( _nColumnPos ) );
MetricVector aRects;
if ( GetGlyphBoundRects(Point(0,0),sText,0,STRING_LEN,0,aRects) )
{
diff --git a/svtools/source/contnr/svtreebx.cxx b/svtools/source/contnr/svtreebx.cxx
index 9d6bc78caff9..b48bcb0910ee 100644
--- a/svtools/source/contnr/svtreebx.cxx
+++ b/svtools/source/contnr/svtreebx.cxx
@@ -109,7 +109,7 @@ void SvTreeListBox::InitTreeView()
SetFont( GetFont() );
SetSpaceBetweenEntries( 0 );
SetLineColor();
- InitSettings( TRUE, TRUE, TRUE );
+ InitSettings( sal_True, sal_True, sal_True );
ImplInitStyle();
SetTabs();
}
@@ -149,28 +149,28 @@ void SvTreeListBox::DisconnectFromModel()
}
-USHORT SvTreeListBox::IsA()
+sal_uInt16 SvTreeListBox::IsA()
{
DBG_CHKTHIS(SvTreeListBox,0);
return SV_LISTBOX_ID_TREEBOX;
}
-void SvTreeListBox::SetSublistOpenWithReturn( BOOL b )
+void SvTreeListBox::SetSublistOpenWithReturn( sal_Bool b )
{
pImp->bSubLstOpRet = b;
}
-BOOL SvTreeListBox::IsSublistOpenWithReturn() const
+sal_Bool SvTreeListBox::IsSublistOpenWithReturn() const
{
return pImp->bSubLstOpRet;
}
-void SvTreeListBox::SetSublistOpenWithLeftRight( BOOL b )
+void SvTreeListBox::SetSublistOpenWithLeftRight( sal_Bool b )
{
pImp->bSubLstOpLR = b;
}
-BOOL SvTreeListBox::IsSublistOpenWithLeftRight() const
+sal_Bool SvTreeListBox::IsSublistOpenWithLeftRight() const
{
return pImp->bSubLstOpLR;
}
@@ -179,12 +179,12 @@ void SvTreeListBox::Resize()
{
DBG_CHKTHIS(SvTreeListBox,0);
if( IsEditingActive() )
- EndEditing( TRUE );
+ EndEditing( sal_True );
SvLBox::Resize();
pImp->Resize();
nFocusWidth = -1;
- pImp->ShowCursor( FALSE );
- pImp->ShowCursor( TRUE );
+ pImp->ShowCursor( sal_False );
+ pImp->ShowCursor( sal_True );
}
/* Faelle:
@@ -224,12 +224,12 @@ void SvTreeListBox::SetTabs()
{
DBG_CHKTHIS(SvTreeListBox,0);
if( IsEditingActive() )
- EndEditing( TRUE );
+ EndEditing( sal_True );
nTreeFlags &= (~TREEFLAG_RECALCTABS);
nFocusWidth = -1;
const WinBits nStyle( GetStyle() );
- BOOL bHasButtons = (nStyle & WB_HASBUTTONS)!=0;
- BOOL bHasButtonsAtRoot = (nStyle & (WB_HASLINESATROOT |
+ sal_Bool bHasButtons = (nStyle & WB_HASBUTTONS)!=0;
+ sal_Bool bHasButtonsAtRoot = (nStyle & (WB_HASLINESATROOT |
WB_HASBUTTONSATROOT))!=0;
long nStartPos = TAB_STARTPOS;
long nNodeWidthPixel = GetExpandedNodeBmp().GetSizePixel().Width();
@@ -354,8 +354,8 @@ String SvTreeListBox::SearchEntryText( SvLBoxEntry* pEntry ) const
DBG_CHKTHIS(SvTreeListBox,0);
DBG_ASSERT( pEntry, "SvTreeListBox::SearchEntryText(): no entry" );
String sRet;
- USHORT nCount = pEntry->ItemCount();
- USHORT nCur = 0;
+ sal_uInt16 nCount = pEntry->ItemCount();
+ sal_uInt16 nCur = 0;
SvLBoxItem* pItem;
while( nCur < nCount )
{
@@ -399,7 +399,7 @@ IMPL_LINK_INLINE_START( SvTreeListBox, CheckButtonClick, SvLBoxButtonData *, pDa
IMPL_LINK_INLINE_END( SvTreeListBox, CheckButtonClick, SvLBoxButtonData *, pData )
SvLBoxEntry* SvTreeListBox::InsertEntry( const XubString& aText,SvLBoxEntry* pParent,
- BOOL bChildsOnDemand, ULONG nPos, void* pUser,
+ sal_Bool bChildsOnDemand, sal_uLong nPos, void* pUser,
SvLBoxButtonKind eButtonKind )
{
DBG_CHKTHIS(SvTreeListBox,0);
@@ -439,7 +439,7 @@ SvLBoxEntry* SvTreeListBox::InsertEntry( const XubString& aText,SvLBoxEntry* pPa
SvLBoxEntry* SvTreeListBox::InsertEntry( const XubString& aText,
const Image& aExpEntryBmp, const Image& aCollEntryBmp,
- SvLBoxEntry* pParent, BOOL bChildsOnDemand, ULONG nPos, void* pUser,
+ SvLBoxEntry* pParent, sal_Bool bChildsOnDemand, sal_uLong nPos, void* pUser,
SvLBoxButtonKind eButtonKind )
{
DBG_CHKTHIS(SvTreeListBox,0);
@@ -524,7 +524,7 @@ void SvTreeListBox::ImpEntryInserted( SvLBoxEntry* pEntry )
SvLBoxEntry* pParent = (SvLBoxEntry*)pModel->GetParent( pEntry );
if( pParent )
{
- USHORT nFlags = pParent->GetFlags();
+ sal_uInt16 nFlags = pParent->GetFlags();
nFlags &= ~SV_ENTRYFLAG_NO_NODEBMP;
pParent->SetFlags( nFlags );
}
@@ -586,7 +586,7 @@ SvButtonState SvTreeListBox::GetCheckButtonState( SvLBoxEntry* pEntry ) const
SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXBUTTON));
if(!pItem)
return SV_BUTTON_TRISTATE;
- USHORT nButtonFlags = pItem->GetButtonFlags();
+ sal_uInt16 nButtonFlags = pItem->GetButtonFlags();
eState = pCheckButtonData->ConvertToButtonState( nButtonFlags );
}
return eState;
@@ -654,7 +654,7 @@ SvLBoxEntry* SvTreeListBox::CloneEntry( SvLBoxEntry* pSource )
// *********************************************************************
-void SvTreeListBox::ShowExpandBitmapOnCursor( BOOL bYes )
+void SvTreeListBox::ShowExpandBitmapOnCursor( sal_Bool bYes )
{
DBG_CHKTHIS(SvTreeListBox,0);
if( bYes )
@@ -752,19 +752,19 @@ void SvTreeListBox::SetDontKnowNodeBitmap( const Image& rDontKnowBmp, BmpColorMo
pImp->SetDontKnowNodeBmp( rDontKnowBmp, _eMode );
}
-BOOL SvTreeListBox::EditingEntry( SvLBoxEntry*, Selection& )
+sal_Bool SvTreeListBox::EditingEntry( SvLBoxEntry*, Selection& )
{
DBG_CHKTHIS(SvTreeListBox,0);
- return TRUE;
+ return sal_True;
}
-BOOL SvTreeListBox::EditedEntry( SvLBoxEntry* /*pEntry*/,const XubString& /*rNewText*/)
+sal_Bool SvTreeListBox::EditedEntry( SvLBoxEntry* /*pEntry*/,const XubString& /*rNewText*/)
{
DBG_CHKTHIS(SvTreeListBox,0);
- return TRUE;
+ return sal_True;
}
-void SvTreeListBox::EnableInplaceEditing( BOOL bOn )
+void SvTreeListBox::EnableInplaceEditing( sal_Bool bOn )
{
DBG_CHKTHIS(SvTreeListBox,0);
SvLBox::EnableInplaceEditing( bOn );
@@ -780,7 +780,7 @@ void SvTreeListBox::KeyInput( const KeyEvent& rKEvt )
nImpFlags |= SVLBOX_IS_TRAVELSELECT;
#ifdef OVDEBUG
- USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
switch ( nCode )
{
case KEY_F1:
@@ -804,7 +804,7 @@ void SvTreeListBox::RequestingChilds( SvLBoxEntry* pParent )
{
DBG_CHKTHIS(SvTreeListBox,0);
if( !pParent->HasChilds() )
- InsertEntry( String::CreateFromAscii("<dummy>"), pParent, FALSE, LIST_APPEND );
+ InsertEntry( String::CreateFromAscii("<dummy>"), pParent, sal_False, LIST_APPEND );
}
void SvTreeListBox::GetFocus()
@@ -850,7 +850,7 @@ void SvTreeListBox::ModelHasCleared()
// Invalidate();
}
-void SvTreeListBox::ShowTargetEmphasis( SvLBoxEntry* pEntry, BOOL /* bShow */ )
+void SvTreeListBox::ShowTargetEmphasis( SvLBoxEntry* pEntry, sal_Bool /* bShow */ )
{
DBG_CHKTHIS(SvTreeListBox,0);
pImp->PaintDDCursor( pEntry );
@@ -874,13 +874,13 @@ void SvTreeListBox::ScrollOutputArea( short nDeltaEntries )
long nTemp = nThumb + nVis;
if( nDeltaEntries > (nMax - nTemp) )
nDeltaEntries = (short)(nMax - nTemp);
- pImp->PageDown( (USHORT)nDeltaEntries );
+ pImp->PageDown( (sal_uInt16)nDeltaEntries );
}
else
{
if( nDeltaEntries > nThumb )
nDeltaEntries = (short)nThumb;
- pImp->PageUp( (USHORT)nDeltaEntries );
+ pImp->PageUp( (sal_uInt16)nDeltaEntries );
}
pImp->SyncVerThumb();
NotifyEndScroll();
@@ -924,8 +924,8 @@ void SvTreeListBox::SetEntryHeight( SvLBoxEntry* pEntry )
{
DBG_CHKTHIS(SvTreeListBox,0);
short nHeight, nHeightMax=0;
- USHORT nCount = pEntry->ItemCount();
- USHORT nCur = 0;
+ sal_uInt16 nCount = pEntry->ItemCount();
+ sal_uInt16 nCur = 0;
SvViewDataEntry* pViewData = GetViewDataEntry( pEntry );
while( nCur < nCount )
{
@@ -944,7 +944,7 @@ void SvTreeListBox::SetEntryHeight( SvLBoxEntry* pEntry )
}
}
-void SvTreeListBox::SetEntryHeight( short nHeight, BOOL bAlways )
+void SvTreeListBox::SetEntryHeight( short nHeight, sal_Bool bAlways )
{
DBG_CHKTHIS(SvTreeListBox,0);
@@ -985,12 +985,12 @@ void SvTreeListBox::AdjustEntryHeight( const Font& rFont )
}
}
-BOOL SvTreeListBox::Expand( SvLBoxEntry* pParent )
+sal_Bool SvTreeListBox::Expand( SvLBoxEntry* pParent )
{
DBG_CHKTHIS(SvTreeListBox,0);
pHdlEntry = pParent;
- BOOL bExpanded = FALSE;
- USHORT nFlags;
+ sal_Bool bExpanded = sal_False;
+ sal_uInt16 nFlags;
if( pParent->HasChildsOnDemand() )
RequestingChilds( pParent );
@@ -999,7 +999,7 @@ BOOL SvTreeListBox::Expand( SvLBoxEntry* pParent )
nImpFlags |= SVLBOX_IS_EXPANDING;
if( ExpandingHdl() )
{
- bExpanded = TRUE;
+ bExpanded = sal_True;
SvListView::Expand( pParent );
pImp->EntryExpanded( pParent );
pHdlEntry = pParent;
@@ -1028,16 +1028,16 @@ BOOL SvTreeListBox::Expand( SvLBoxEntry* pParent )
return bExpanded;
}
-BOOL SvTreeListBox::Collapse( SvLBoxEntry* pParent )
+sal_Bool SvTreeListBox::Collapse( SvLBoxEntry* pParent )
{
DBG_CHKTHIS(SvTreeListBox,0);
nImpFlags &= ~SVLBOX_IS_EXPANDING;
pHdlEntry = pParent;
- BOOL bCollapsed = FALSE;
+ sal_Bool bCollapsed = sal_False;
if( ExpandingHdl() )
{
- bCollapsed = TRUE;
+ bCollapsed = sal_True;
pImp->CollapsingEntry( pParent );
SvListView::Collapse( pParent );
pImp->EntryCollapsed( pParent );
@@ -1055,11 +1055,11 @@ BOOL SvTreeListBox::Collapse( SvLBoxEntry* pParent )
return bCollapsed;
}
-BOOL SvTreeListBox::Select( SvLBoxEntry* pEntry, BOOL bSelect )
+sal_Bool SvTreeListBox::Select( SvLBoxEntry* pEntry, sal_Bool bSelect )
{
DBG_CHKTHIS(SvTreeListBox,0);
DBG_ASSERT(pEntry,"Select: Null-Ptr");
- BOOL bRetVal = SvListView::Select( pEntry, bSelect );
+ sal_Bool bRetVal = SvListView::Select( pEntry, bSelect );
DBG_ASSERT(IsSelected(pEntry)==bSelect,"Select failed");
if( bRetVal )
{
@@ -1076,14 +1076,14 @@ BOOL SvTreeListBox::Select( SvLBoxEntry* pEntry, BOOL bSelect )
return bRetVal;
}
-ULONG SvTreeListBox::SelectChilds( SvLBoxEntry* pParent, BOOL bSelect )
+sal_uLong SvTreeListBox::SelectChilds( SvLBoxEntry* pParent, sal_Bool bSelect )
{
DBG_CHKTHIS(SvTreeListBox,0);
pImp->DestroyAnchor();
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
if( !pParent->HasChilds() )
return 0;
- USHORT nRefDepth = pModel->GetDepth( pParent );
+ sal_uInt16 nRefDepth = pModel->GetDepth( pParent );
SvLBoxEntry* pChild = FirstChild( pParent );
do {
nRet++;
@@ -1093,19 +1093,19 @@ ULONG SvTreeListBox::SelectChilds( SvLBoxEntry* pParent, BOOL bSelect )
return nRet;
}
-void SvTreeListBox::SelectAll( BOOL bSelect, BOOL )
+void SvTreeListBox::SelectAll( sal_Bool bSelect, sal_Bool )
{
DBG_CHKTHIS(SvTreeListBox,0);
pImp->SelAllDestrAnch(
bSelect,
- TRUE, // Anker loeschen,
- TRUE ); // auch bei SINGLE_SELECTION den Cursor deselektieren
+ sal_True, // Anker loeschen,
+ sal_True ); // auch bei SINGLE_SELECTION den Cursor deselektieren
}
void SvTreeListBox::ModelHasInsertedTree( SvListEntry* pEntry )
{
DBG_CHKTHIS(SvTreeListBox,0);
- USHORT nRefDepth = pModel->GetDepth( (SvLBoxEntry*)pEntry );
+ sal_uInt16 nRefDepth = pModel->GetDepth( (SvLBoxEntry*)pEntry );
SvLBoxEntry* pTmp = (SvLBoxEntry*)pEntry;
do
{
@@ -1124,7 +1124,7 @@ void SvTreeListBox::ModelHasInserted( SvListEntry* pEntry )
void SvTreeListBox::ModelIsMoving(SvListEntry* pSource,
SvListEntry* /* pTargetParent */,
- ULONG /* nChildPos */ )
+ sal_uLong /* nChildPos */ )
{
DBG_CHKTHIS(SvTreeListBox,0);
pImp->MovingEntry( (SvLBoxEntry*)pSource );
@@ -1146,9 +1146,11 @@ void SvTreeListBox::ModelIsRemoving( SvListEntry* pEntry )
NotifyRemoving( (SvLBoxEntry*)pEntry );
}
-void SvTreeListBox::ModelHasRemoved( SvListEntry* /* pEntry */ )
+void SvTreeListBox::ModelHasRemoved( SvListEntry* pEntry )
{
DBG_CHKTHIS(SvTreeListBox,0);
+ if ( pEntry == pHdlEntry)
+ pHdlEntry = NULL;
pImp->EntryRemoved();
}
@@ -1171,7 +1173,7 @@ void SvTreeListBox::SetFont( const Font& rFont )
{
DBG_CHKTHIS(SvTreeListBox,0);
Font aTempFont( rFont );
- aTempFont.SetTransparent( TRUE );
+ aTempFont.SetTransparent( sal_True );
Control::SetFont( aTempFont );
AdjustEntryHeight( aTempFont );
// immer Invalidieren, sonst fallen wir
@@ -1208,13 +1210,13 @@ void SvTreeListBox::MouseMove( const MouseEvent& rMEvt )
}
-void SvTreeListBox::SetUpdateMode( BOOL bUpdate )
+void SvTreeListBox::SetUpdateMode( sal_Bool bUpdate )
{
DBG_CHKTHIS(SvTreeListBox,0);
pImp->SetUpdateMode( bUpdate );
}
-void SvTreeListBox::SetUpdateModeFast( BOOL bUpdate )
+void SvTreeListBox::SetUpdateModeFast( sal_Bool bUpdate )
{
DBG_CHKTHIS(SvTreeListBox,0);
pImp->SetUpdateModeFast( bUpdate );
@@ -1234,7 +1236,7 @@ void SvTreeListBox::SetSpaceBetweenEntries( short nOffsLogic )
}
}
-void SvTreeListBox::SetCursor( SvLBoxEntry* pEntry, BOOL bForceNoSelect )
+void SvTreeListBox::SetCursor( SvLBoxEntry* pEntry, sal_Bool bForceNoSelect )
{
DBG_CHKTHIS(SvTreeListBox,0);
pImp->SetCursor(pEntry, bForceNoSelect);
@@ -1271,7 +1273,7 @@ void SvTreeListBox::MakeVisible( SvLBoxEntry* pEntry )
pImp->MakeVisible(pEntry);
}
-void SvTreeListBox::MakeVisible( SvLBoxEntry* pEntry, BOOL bMoveToTop )
+void SvTreeListBox::MakeVisible( SvLBoxEntry* pEntry, sal_Bool bMoveToTop )
{
pImp->MakeVisible( pEntry, bMoveToTop );
}
@@ -1292,11 +1294,11 @@ void SvTreeListBox::EditItemText( SvLBoxEntry* pEntry, SvLBoxString* pItem,
DBG_ASSERT(pEntry&&pItem,"EditItemText: Bad params");
if( IsSelected( pEntry ))
{
- pImp->ShowCursor( FALSE );
- SvListView::Select( pEntry, FALSE );
+ pImp->ShowCursor( sal_False );
+ SvListView::Select( pEntry, sal_False );
PaintEntry( pEntry );
- SvListView::Select( pEntry, TRUE );
- pImp->ShowCursor( TRUE );
+ SvListView::Select( pEntry, sal_True );
+ pImp->ShowCursor( sal_True );
}
pEdEntry = pEntry;
pEdItem = pItem;
@@ -1309,7 +1311,7 @@ void SvTreeListBox::EditItemText( SvLBoxEntry* pEntry, SvLBoxString* pItem,
aPos.X() = GetTabPos( pEntry, pTab );
long nOutputWidth = pImp->GetOutputSize().Width();
Size aSize( nOutputWidth - aPos.X(), aItemSize.Height() );
- USHORT nPos = aTabs.GetPos( pTab );
+ sal_uInt16 nPos = aTabs.GetPos( pTab );
if( nPos+1 < aTabs.Count() )
{
SvLBoxTab* pRightTab = (SvLBoxTab*)aTabs.GetObject( nPos + 1 );
@@ -1355,8 +1357,8 @@ void SvTreeListBox::ImplEditEntry( SvLBoxEntry* pEntry )
bool bIsMouseTriggered = nClickX >= 0;
SvLBoxString* pItem = NULL;
- USHORT nCount = pEntry->ItemCount();
- for( USHORT i = 0 ; i < nCount ; i++ )
+ sal_uInt16 nCount = pEntry->ItemCount();
+ for( sal_uInt16 i = 0 ; i < nCount ; i++ )
{
SvLBoxItem* pTmpItem = pEntry->GetItem( i );
if( pTmpItem->IsA() != SV_ITEM_ID_LBOXSTRING )
@@ -1385,7 +1387,7 @@ void SvTreeListBox::ImplEditEntry( SvLBoxEntry* pEntry )
Selection aSel( SELECTION_MIN, SELECTION_MAX );
if( pItem && EditingEntry( pEntry, aSel ) )
{
- SelectAll( FALSE );
+ SelectAll( sal_False );
MakeVisible( pEntry );
EditItemText( pEntry, pItem, aSel );
}
@@ -1435,7 +1437,7 @@ void SvTreeListBox::EditingRequest( SvLBoxEntry* pEntry, SvLBoxItem* pItem,
Selection aSel( SELECTION_MIN, SELECTION_MAX );
if( EditingEntry( pEntry, aSel ) )
{
- SelectAll( FALSE );
+ SelectAll( sal_False );
EditItemText( pEntry, (SvLBoxString*)pItem, aSel );
}
}
@@ -1449,7 +1451,7 @@ SvLBoxEntry* SvTreeListBox::GetDropTarget( const Point& rPos )
// Scrollen
if( rPos.Y() < 12 )
{
- SvLBox::ImplShowTargetEmphasis( SvLBox::pTargetEntry, FALSE );
+ SvLBox::ImplShowTargetEmphasis( SvLBox::pTargetEntry, sal_False );
ScrollOutputArea( +1 );
}
else
@@ -1457,7 +1459,7 @@ SvLBoxEntry* SvTreeListBox::GetDropTarget( const Point& rPos )
Size aSize( pImp->GetOutputSize() );
if( rPos.Y() > aSize.Height() - 12 )
{
- SvLBox::ImplShowTargetEmphasis( SvLBox::pTargetEntry, FALSE );
+ SvLBox::ImplShowTargetEmphasis( SvLBox::pTargetEntry, sal_False );
ScrollOutputArea( -1 );
}
}
@@ -1474,7 +1476,7 @@ SvLBoxEntry* SvTreeListBox::GetDropTarget( const Point& rPos )
}
-SvLBoxEntry* SvTreeListBox::GetEntry( const Point& rPos, BOOL bHit ) const
+SvLBoxEntry* SvTreeListBox::GetEntry( const Point& rPos, sal_Bool bHit ) const
{
DBG_CHKTHIS(SvTreeListBox,0);
SvLBoxEntry* pEntry = pImp->GetEntry( rPos );
@@ -1538,21 +1540,21 @@ void SvTreeListBox::InvalidateEntry( SvLBoxEntry* pEntry )
}
-long SvTreeListBox::PaintEntry(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags)
+long SvTreeListBox::PaintEntry(SvLBoxEntry* pEntry,long nLine,sal_uInt16 nTabFlags)
{
return PaintEntry1(pEntry,nLine,nTabFlags);
}
#define SV_TAB_BORDER 8
-long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags,
- BOOL bHasClipRegion )
+long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,sal_uInt16 nTabFlags,
+ sal_Bool bHasClipRegion )
{
DBG_CHKTHIS(SvTreeListBox,0);
Rectangle aRect; // multi purpose
- BOOL bHorSBar = pImp->HasHorScrollBar();
+ sal_Bool bHorSBar = pImp->HasHorScrollBar();
PreparePaint( pEntry );
// #97680# ------------------
@@ -1578,12 +1580,12 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags,
Color aBackupColor = GetFillColor();
bool bCurFontIsSel = false;
- BOOL bInUse = pEntry->HasInUseEmphasis();
+ sal_Bool bInUse = pEntry->HasInUseEmphasis();
// wenn eine ClipRegion von aussen gesetzt wird, dann
// diese nicht zuruecksetzen
const WinBits nWindowStyle = GetStyle();
- const BOOL bResetClipRegion = !bHasClipRegion;
- const BOOL bHideSelection = ((nWindowStyle & WB_HIDESELECTION) && !HasFocus())!=0;
+ const sal_Bool bResetClipRegion = !bHasClipRegion;
+ const sal_Bool bHideSelection = ((nWindowStyle & WB_HIDESELECTION) && !HasFocus())!=0;
const StyleSettings& rSettings = GetSettings().GetStyleSettings();
Font aHighlightFont( GetFont() );
@@ -1595,24 +1597,24 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags,
if( !bHasClipRegion && nWindowStyle & WB_HSCROLL )
{
SetClipRegion( Region(pImp->GetClipRegionRect()) );
- bHasClipRegion = TRUE;
+ bHasClipRegion = sal_True;
}
SvViewDataEntry* pViewDataEntry = GetViewDataEntry( pEntry );
- USHORT nTabCount = aTabs.Count();
- USHORT nItemCount = pEntry->ItemCount();
- USHORT nCurTab = 0;
- USHORT nCurItem = 0;
+ sal_uInt16 nTabCount = aTabs.Count();
+ sal_uInt16 nItemCount = pEntry->ItemCount();
+ sal_uInt16 nCurTab = 0;
+ sal_uInt16 nCurItem = 0;
while( nCurTab < nTabCount && nCurItem < nItemCount )
{
SvLBoxTab* pTab = (SvLBoxTab*)aTabs.GetObject( nCurTab );
- USHORT nNextTab = nCurTab + 1;
+ sal_uInt16 nNextTab = nCurTab + 1;
SvLBoxTab* pNextTab = nNextTab < nTabCount ? (SvLBoxTab*)aTabs.GetObject(nNextTab) : 0;
SvLBoxItem* pItem = nCurItem < nItemCount ? pEntry->GetItem(nCurItem) : 0;
- USHORT nFlags = pTab->nFlags;
+ sal_uInt16 nFlags = pTab->nFlags;
Size aSize( pItem->GetSize( pViewDataEntry, nCurItem ));
long nTabPos = GetTabPos( pEntry, pTab );
@@ -1638,7 +1640,7 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags,
if( !bHasClipRegion && nX + aSize.Width() >= nMaxRight )
{
SetClipRegion( Region(pImp->GetClipRegionRect()) );
- bHasClipRegion = TRUE;
+ bHasClipRegion = sal_True;
}
aEntryPos.X() = nX;
aEntryPos.Y() = nLine;
@@ -1648,7 +1650,7 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags,
Wallpaper aWallpaper = GetBackground();
int bSelTab = nFlags & SV_LBOXTAB_SHOW_SELECTION;
- USHORT nItemType = pItem->IsA();
+ sal_uInt16 nItemType = pItem->IsA();
if ( pViewDataEntry->IsSelected() && bSelTab && !pViewDataEntry->IsCursored() )
{
@@ -1762,7 +1764,7 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags,
SetFont( aBackupFont );
}
- USHORT nFirstDynTabPos;
+ sal_uInt16 nFirstDynTabPos;
SvLBoxTab* pFirstDynamicTab = GetFirstDynamicTab( nFirstDynTabPos );
long nDynTabPos = GetTabPos( pEntry, pFirstDynamicTab );
nDynTabPos += pImp->nNodeBmpTabDistance;
@@ -1776,7 +1778,7 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags,
{
// ersten festen Tab suchen, und pruefen ob die Node-Bitmap
// in ihn hineinragt
- USHORT nNextTab = nFirstDynTabPos;
+ sal_uInt16 nNextTab = nFirstDynTabPos;
SvLBoxTab* pNextTab;
do
{
@@ -1809,12 +1811,12 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags,
}
aPos.Y() += (nTempEntryHeight - pImg->GetSizePixel().Height()) / 2;
- USHORT nStyle = 0;
+ sal_uInt16 nStyle = 0;
if ( !IsEnabled() )
nStyle |= IMAGE_DRAW_DISABLE;
//native
- BOOL bNativeOK = FALSE;
+ sal_Bool bNativeOK = sal_False;
if ( IsNativeControlSupported( CTRL_LISTNODE, PART_ENTIRE_CONTROL) )
{
ImplControlValue aControlValue;
@@ -1868,7 +1870,7 @@ Rectangle SvTreeListBox::GetFocusRect( SvLBoxEntry* pEntry, long nLine )
long nRealWidth = pImp->GetOutputSize().Width();
nRealWidth -= GetMapMode().GetOrigin().X();
- USHORT nCurTab;
+ sal_uInt16 nCurTab;
SvLBoxTab* pTab = GetFirstTab( SV_LBOXTAB_SHOW_SELECTION, nCurTab );
long nTabPos = 0;
if( pTab )
@@ -1886,7 +1888,7 @@ Rectangle SvTreeListBox::GetFocusRect( SvLBoxEntry* pEntry, long nLine )
nNextTabPos += 50;
}
- BOOL bUserSelection = (BOOL)( nTreeFlags & TREEFLAG_USESEL ) != 0;
+ sal_Bool bUserSelection = (sal_Bool)( nTreeFlags & TREEFLAG_USESEL ) != 0;
if( !bUserSelection )
{
if( pTab && nCurTab < pEntry->ItemCount() )
@@ -1911,7 +1913,7 @@ Rectangle SvTreeListBox::GetFocusRect( SvLBoxEntry* pEntry, long nLine )
// wenn erster SelTab != 0, dann muessen wir auch rechnen
if( nFocusWidth == -1 || nFirstSelTab )
{
- USHORT nLastTab;
+ sal_uInt16 nLastTab;
SvLBoxTab* pLastTab = GetLastTab(SV_LBOXTAB_SHOW_SELECTION,nLastTab);
nLastTab++;
if( nLastTab < aTabs.Count() ) // gibts noch einen ?
@@ -1959,23 +1961,23 @@ long SvTreeListBox::GetTabPos( SvLBoxEntry* pEntry, SvLBoxTab* pTab)
long nPos = pTab->GetPos();
if( pTab->IsDynamic() )
{
- USHORT nDepth = pModel->GetDepth( pEntry );
- nDepth = nDepth * (USHORT)nIndent;
+ sal_uInt16 nDepth = pModel->GetDepth( pEntry );
+ nDepth = nDepth * (sal_uInt16)nIndent;
nPos += (long)nDepth;
}
return nPos;
}
SvLBoxItem* SvTreeListBox::GetItem_Impl( SvLBoxEntry* pEntry, long nX,
- SvLBoxTab** ppTab, USHORT nEmptyWidth )
+ SvLBoxTab** ppTab, sal_uInt16 nEmptyWidth )
{
DBG_CHKTHIS(SvTreeListBox,0);
SvLBoxItem* pItemClicked = 0;
- USHORT nTabCount = aTabs.Count();
- USHORT nItemCount = pEntry->ItemCount();
+ sal_uInt16 nTabCount = aTabs.Count();
+ sal_uInt16 nItemCount = pEntry->ItemCount();
SvLBoxTab* pTab = (SvLBoxTab*)aTabs.GetObject(0);
SvLBoxItem* pItem = pEntry->GetItem(0);
- USHORT nNextItem = 1;
+ sal_uInt16 nNextItem = 1;
nX -= GetMapMode().GetOrigin().X();
long nRealWidth = pImp->GetOutputSize().Width();
nRealWidth -= GetMapMode().GetOrigin().X();
@@ -2044,9 +2046,9 @@ SvLBoxItem* SvTreeListBox::GetFirstDynamicItem( SvLBoxEntry* pEntry )
SvLBoxTab* pTab = (SvLBoxTab*)aTabs.GetObject(0);
SvLBoxItem* pItem = pEntry->GetItem(0);
- USHORT nTabCount = aTabs.Count();
+ sal_uInt16 nTabCount = aTabs.Count();
- USHORT nNext = 1;
+ sal_uInt16 nNext = 1;
while ( !pTab->IsDynamic() && nNext < nTabCount )
{
pItem = pEntry->GetItem( nNext );
@@ -2056,7 +2058,7 @@ SvLBoxItem* SvTreeListBox::GetFirstDynamicItem( SvLBoxEntry* pEntry )
return pItem;
}
-void SvTreeListBox::AddTab(long nTabPos,USHORT nFlags,void* pUserData )
+void SvTreeListBox::AddTab(long nTabPos,sal_uInt16 nFlags,void* pUserData )
{
DBG_CHKTHIS(SvTreeListBox,0);
nFocusWidth = -1;
@@ -2065,7 +2067,7 @@ void SvTreeListBox::AddTab(long nTabPos,USHORT nFlags,void* pUserData )
aTabs.Insert( pTab, aTabs.Count() );
if( nTreeFlags & TREEFLAG_USESEL )
{
- USHORT nPos = aTabs.Count() - 1;
+ sal_uInt16 nPos = aTabs.Count() - 1;
if( nPos >= nFirstSelTab && nPos <= nLastSelTab )
pTab->nFlags |= SV_LBOXTAB_SHOW_SELECTION;
else
@@ -2077,11 +2079,11 @@ void SvTreeListBox::AddTab(long nTabPos,USHORT nFlags,void* pUserData )
-SvLBoxTab* SvTreeListBox::GetFirstDynamicTab( USHORT& rPos ) const
+SvLBoxTab* SvTreeListBox::GetFirstDynamicTab( sal_uInt16& rPos ) const
{
DBG_CHKTHIS(SvTreeListBox,0);
- USHORT nCurTab = 0;
- USHORT nTabCount = aTabs.Count();
+ sal_uInt16 nCurTab = 0;
+ sal_uInt16 nTabCount = aTabs.Count();
while( nCurTab < nTabCount )
{
SvLBoxTab* pTab = (SvLBoxTab*)aTabs.GetObject(nCurTab);
@@ -2097,21 +2099,21 @@ SvLBoxTab* SvTreeListBox::GetFirstDynamicTab( USHORT& rPos ) const
SvLBoxTab* SvTreeListBox::GetFirstDynamicTab() const
{
- USHORT nDummy;
+ sal_uInt16 nDummy;
return GetFirstDynamicTab( nDummy );
}
SvLBoxTab* SvTreeListBox::GetTab( SvLBoxEntry* pEntry, SvLBoxItem* pItem) const
{
DBG_CHKTHIS(SvTreeListBox,0);
- USHORT nPos = pEntry->GetPos( pItem );
+ sal_uInt16 nPos = pEntry->GetPos( pItem );
return (SvLBoxTab*)aTabs.GetObject( nPos );
}
void SvTreeListBox::ClearTabList()
{
DBG_CHKTHIS(SvTreeListBox,0);
- USHORT nTabCount = aTabs.Count();
+ sal_uInt16 nTabCount = aTabs.Count();
while( nTabCount )
{
nTabCount--;
@@ -2155,7 +2157,7 @@ void SvTreeListBox::NotifyInvalidating()
DBG_CHKTHIS(SvTreeListBox,0);
}
-void SvTreeListBox::Invalidate( USHORT nInvalidateFlags )
+void SvTreeListBox::Invalidate( sal_uInt16 nInvalidateFlags )
{
DBG_CHKTHIS(SvTreeListBox,0);
if( nFocusWidth == -1 )
@@ -2166,7 +2168,7 @@ void SvTreeListBox::Invalidate( USHORT nInvalidateFlags )
pImp->Invalidate();
}
-void SvTreeListBox::Invalidate( const Rectangle& rRect, USHORT nInvalidateFlags )
+void SvTreeListBox::Invalidate( const Rectangle& rRect, sal_uInt16 nInvalidateFlags )
{
DBG_CHKTHIS(SvTreeListBox,0);
if( nFocusWidth == -1 )
@@ -2177,11 +2179,11 @@ void SvTreeListBox::Invalidate( const Rectangle& rRect, USHORT nInvalidateFlags
}
-void SvTreeListBox::SetHighlightRange( USHORT nStart, USHORT nEnd)
+void SvTreeListBox::SetHighlightRange( sal_uInt16 nStart, sal_uInt16 nEnd)
{
DBG_CHKTHIS(SvTreeListBox,0);
- USHORT nTemp;
+ sal_uInt16 nTemp;
nTreeFlags |= TREEFLAG_USESEL;
if( nStart > nEnd )
{
@@ -2204,12 +2206,12 @@ void SvTreeListBox::RemoveHighlightRange()
Invalidate();
}
-ULONG SvTreeListBox::GetAscInsertionPos(SvLBoxEntry*,SvLBoxEntry*)
+sal_uLong SvTreeListBox::GetAscInsertionPos(SvLBoxEntry*,SvLBoxEntry*)
{
return LIST_APPEND;
}
-ULONG SvTreeListBox::GetDescInsertionPos(SvLBoxEntry*,SvLBoxEntry*)
+sal_uLong SvTreeListBox::GetDescInsertionPos(SvLBoxEntry*,SvLBoxEntry*)
{
DBG_CHKTHIS(SvTreeListBox,0);
return LIST_APPEND;
@@ -2255,10 +2257,10 @@ void SvTreeListBox::RemoveParentKeepChilds( SvLBoxEntry* pParent )
pModel->Remove( pParent );
}
-SvLBoxTab* SvTreeListBox::GetFirstTab( USHORT nFlagMask, USHORT& rPos )
+SvLBoxTab* SvTreeListBox::GetFirstTab( sal_uInt16 nFlagMask, sal_uInt16& rPos )
{
- USHORT nTabCount = aTabs.Count();
- for( USHORT nPos = 0; nPos < nTabCount; nPos++ )
+ sal_uInt16 nTabCount = aTabs.Count();
+ for( sal_uInt16 nPos = 0; nPos < nTabCount; nPos++ )
{
SvLBoxTab* pTab = (SvLBoxTab*)aTabs.GetObject( nPos );
if( (pTab->nFlags & nFlagMask) )
@@ -2271,17 +2273,17 @@ SvLBoxTab* SvTreeListBox::GetFirstTab( USHORT nFlagMask, USHORT& rPos )
return 0;
}
-SvLBoxTab* SvTreeListBox::GetLastTab( USHORT nFlagMask, USHORT& rTabPos )
+SvLBoxTab* SvTreeListBox::GetLastTab( sal_uInt16 nFlagMask, sal_uInt16& rTabPos )
{
short nTabCount = (short)aTabs.Count();
if( nTabCount )
{
for( short nPos = nTabCount-1; nPos >= 0; nPos-- )
{
- SvLBoxTab* pTab = (SvLBoxTab*)aTabs.GetObject( (USHORT)nPos );
+ SvLBoxTab* pTab = (SvLBoxTab*)aTabs.GetObject( (sal_uInt16)nPos );
if( (pTab->nFlags & nFlagMask) )
{
- rTabPos = (USHORT)nPos;
+ rTabPos = (sal_uInt16)nPos;
return pTab;
}
}
@@ -2290,12 +2292,12 @@ SvLBoxTab* SvTreeListBox::GetLastTab( USHORT nFlagMask, USHORT& rTabPos )
return 0;
}
-void SvTreeListBox::SetAddMode( BOOL bAdd )
+void SvTreeListBox::SetAddMode( sal_Bool bAdd )
{
pImp->SetAddMode( bAdd );
}
-BOOL SvTreeListBox::IsAddMode() const
+sal_Bool SvTreeListBox::IsAddMode() const
{
return pImp->IsAddMode();
}
@@ -2321,8 +2323,8 @@ IMPL_LINK( SvTreeListBox, DefaultCompare, SvSortData*, pData )
return pImp->pIntlWrapper->getCaseCollator()->compareString( aLeft, aRight );
}
-void SvTreeListBox::ModelNotification( USHORT nActionId, SvListEntry* pEntry1,
- SvListEntry* pEntry2, ULONG nPos )
+void SvTreeListBox::ModelNotification( sal_uInt16 nActionId, SvListEntry* pEntry1,
+ SvListEntry* pEntry2, sal_uLong nPos )
{
if( nActionId == LISTACTION_CLEARING )
CancelTextEditing();
@@ -2350,14 +2352,14 @@ void SvTreeListBox::ModelNotification( USHORT nActionId, SvListEntry* pEntry1,
break;
case LISTACTION_RESORTING:
- SetUpdateMode( FALSE );
+ SetUpdateMode( sal_False );
break;
case LISTACTION_RESORTED:
// nach Sortierung den ersten Eintrag anzeigen, dabei die
// Selektion erhalten.
- MakeVisible( (SvLBoxEntry*)pModel->First(), TRUE );
- SetUpdateMode( TRUE );
+ MakeVisible( (SvLBoxEntry*)pModel->First(), sal_True );
+ SetUpdateMode( sal_True );
break;
case LISTACTION_CLEARED:
@@ -2372,8 +2374,8 @@ long SvTreeListBox::GetTextOffset() const
{
DBG_CHKTHIS(SvTreeListBox,0);
const WinBits nWindowStyle = GetStyle();
- BOOL bHasButtons = (nWindowStyle & WB_HASBUTTONS)!=0;
- BOOL bHasButtonsAtRoot = (nWindowStyle & (WB_HASLINESATROOT |
+ sal_Bool bHasButtons = (nWindowStyle & WB_HASBUTTONS)!=0;
+ sal_Bool bHasButtonsAtRoot = (nWindowStyle & (WB_HASLINESATROOT |
WB_HASBUTTONSATROOT))!=0;
long nStartPos = TAB_STARTPOS;
long nNodeWidthPixel = GetExpandedNodeBmp().GetSizePixel().Width();
@@ -2451,12 +2453,12 @@ void SvTreeListBox::EndSelection()
pImp->EndSelection();
}
-BOOL SvTreeListBox::IsNodeButton( const Point& rPos ) const
+sal_Bool SvTreeListBox::IsNodeButton( const Point& rPos ) const
{
SvLBoxEntry* pEntry = GetEntry( rPos );
if( pEntry )
return pImp->IsNodeButton( rPos, pEntry );
- return FALSE;
+ return sal_False;
}
void SvTreeListBox::RepaintScrollBars() const
@@ -2474,7 +2476,7 @@ ScrollBar *SvTreeListBox::GetHScroll()
return &((SvTreeListBox*)this)->pImp->aHorSBar;
}
-void SvTreeListBox::EnableAsyncDrag( BOOL b )
+void SvTreeListBox::EnableAsyncDrag( sal_Bool b )
{
pImp->EnableAsyncDrag( b );
}
@@ -2512,9 +2514,9 @@ void SvTreeListBox::DataChanged( const DataChangedEvent& rDCEvt )
{
if( (rDCEvt.GetType()==DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
- nEntryHeight = 0; // _together_ with TRUE of 1. par (bFont) of InitSettings() a zero-height
+ nEntryHeight = 0; // _together_ with sal_True of 1. par (bFont) of InitSettings() a zero-height
// forces complete recalc of heights!
- InitSettings( TRUE, TRUE, TRUE );
+ InitSettings( sal_True, sal_True, sal_True );
Invalidate();
}
else
@@ -2528,7 +2530,7 @@ void SvTreeListBox::StateChanged( StateChangedType i_nStateChange )
ImplInitStyle();
}
-void SvTreeListBox::InitSettings(BOOL bFont,BOOL bForeground,BOOL bBackground)
+void SvTreeListBox::InitSettings(sal_Bool bFont,sal_Bool bForeground,sal_Bool bBackground)
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
if( bFont )
@@ -2555,17 +2557,17 @@ void SvTreeListBox::InitSettings(BOOL bFont,BOOL bForeground,BOOL bBackground)
pCheckButtonData->SetDefaultImages( this );
}
-BOOL SvTreeListBox::IsCellFocusEnabled() const
+sal_Bool SvTreeListBox::IsCellFocusEnabled() const
{
return pImp->IsCellFocusEnabled();
}
-bool SvTreeListBox::SetCurrentTabPos( USHORT _nNewPos )
+bool SvTreeListBox::SetCurrentTabPos( sal_uInt16 _nNewPos )
{
return pImp->SetCurrentTabPos( _nNewPos );
}
-USHORT SvTreeListBox::GetCurrentTabPos() const
+sal_uInt16 SvTreeListBox::GetCurrentTabPos() const
{
return pImp->GetCurrentTabPos();
}
@@ -2587,7 +2589,7 @@ PopupMenu* SvTreeListBox::CreateContextMenu( void )
return NULL;
}
-void SvTreeListBox::ExcecuteContextMenuAction( USHORT )
+void SvTreeListBox::ExcecuteContextMenuAction( sal_uInt16 )
{
DBG_WARNING( "SvTreeListBox::ExcecuteContextMenuAction(): now there's happening nothing!" );
}
@@ -2596,17 +2598,17 @@ void SvTreeListBox::EnableContextMenuHandling( void )
{
DBG_ASSERT( pImp, "-SvTreeListBox::EnableContextMenuHandling(): No implementation!" );
- pImp->bContextMenuHandling = TRUE;
+ pImp->bContextMenuHandling = sal_True;
}
-void SvTreeListBox::EnableContextMenuHandling( BOOL b )
+void SvTreeListBox::EnableContextMenuHandling( sal_Bool b )
{
DBG_ASSERT( pImp, "-SvTreeListBox::EnableContextMenuHandling(): No implementation!" );
pImp->bContextMenuHandling = b;
}
-BOOL SvTreeListBox::IsContextMenuHandlingEnabled( void ) const
+sal_Bool SvTreeListBox::IsContextMenuHandlingEnabled( void ) const
{
DBG_ASSERT( pImp, "-SvTreeListBox::IsContextMenuHandlingEnabled(): No implementation!" );
@@ -2671,7 +2673,7 @@ void SvTreeListBox::EnableCellFocus()
pImp->EnableCellFocus();
}
-void SvTreeListBox::CallImplEventListeners(ULONG nEvent, void* pData)
+void SvTreeListBox::CallImplEventListeners(sal_uLong nEvent, void* pData)
{
CallEventListeners(nEvent, pData);
}
diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx
index 86bab5b8e42a..2959d8e0460f 100644
--- a/svtools/source/contnr/templwin.cxx
+++ b/svtools/source/contnr/templwin.cxx
@@ -121,7 +121,7 @@ extern ::rtl::OUString CreateExactSizeText_Impl( sal_Int64 nSize ); // fileview.
struct FolderHistory
{
String m_sURL;
- ULONG m_nGroup;
+ sal_uLong m_nGroup;
FolderHistory( const String& _rURL, sal_Int32 _nGroup ) :
m_sURL( _rURL ), m_nGroup( _nGroup ) {}
@@ -134,7 +134,7 @@ ODocumentInfoPreview::ODocumentInfoPreview( Window* pParent ,WinBits _nBits) : W
{
m_pEditWin = new SvtExtendedMultiLineEdit_Impl(this,_nBits);
m_pEditWin->Show();
- m_pEditWin->EnableCursor( FALSE );
+ m_pEditWin->EnableCursor( sal_False );
m_pInfoTable = new SvtDocInfoTable_Impl();
// detect application language
m_aLocale = SvtPathOptions().GetLocale();
@@ -183,7 +183,7 @@ void ODocumentInfoPreview::fill(
if (!i_xDocProps.is()) throw RuntimeException();
::rtl::OUString aStr;
- m_pEditWin->SetAutoScroll( FALSE );
+ m_pEditWin->SetAutoScroll( sal_False );
aStr = i_xDocProps->getTitle();
if (aStr.getLength()) {
@@ -237,7 +237,7 @@ void ODocumentInfoPreview::fill(
// size
if ( i_rURL.Len() > 0 )
{
- ULONG nDocSize = ::utl::UCBContentHelper::GetSize( i_rURL );
+ sal_uLong nDocSize = ::utl::UCBContentHelper::GetSize( i_rURL );
m_pEditWin->InsertEntry(
m_pInfoTable->GetString( DI_SIZE ),
CreateExactSizeText_Impl( nDocSize ) );
@@ -285,7 +285,7 @@ void ODocumentInfoPreview::fill(
}
m_pEditWin->SetSelection( Selection( 0, 0 ) );
- m_pEditWin->SetAutoScroll( TRUE );
+ m_pEditWin->SetAutoScroll( sal_True );
}
// -----------------------------------------------------------------------------
@@ -340,7 +340,7 @@ SvtIconWindow_Impl::SvtIconWindow_Impl( Window* pParent ) :
aIconCtrl.SetAccessibleName( String( RTL_CONSTASCII_USTRINGPARAM("Groups") ) );
aIconCtrl.SetHelpId( HID_TEMPLATEDLG_ICONCTRL );
- aIconCtrl.SetChoiceWithCursor( TRUE );
+ aIconCtrl.SetChoiceWithCursor( sal_True );
aIconCtrl.SetSelectionMode( SINGLE_SELECTION );
aIconCtrl.Show();
@@ -413,7 +413,7 @@ SvtIconWindow_Impl::SvtIconWindow_Impl( Window* pParent ) :
SvtIconWindow_Impl::~SvtIconWindow_Impl()
{
- for ( ULONG i = 0; i < aIconCtrl.GetEntryCount(); ++i )
+ for ( sal_uLong i = 0; i < aIconCtrl.GetEntryCount(); ++i )
{
SvxIconChoiceCtrlEntry* pEntry = aIconCtrl.GetEntry( i );
delete (String*)pEntry->GetUserData();
@@ -423,7 +423,7 @@ SvtIconWindow_Impl::~SvtIconWindow_Impl()
SvxIconChoiceCtrlEntry* SvtIconWindow_Impl::GetEntry( const String& rURL ) const
{
SvxIconChoiceCtrlEntry* pEntry = NULL;
- for ( ULONG i = 0; i < aIconCtrl.GetEntryCount(); ++i )
+ for ( sal_uLong i = 0; i < aIconCtrl.GetEntryCount(); ++i )
{
SvxIconChoiceCtrlEntry* pTemp = aIconCtrl.GetEntry( i );
String aURL( *( (String*)pTemp->GetUserData() ) );
@@ -461,7 +461,7 @@ String SvtIconWindow_Impl::GetCursorPosIconURL() const
String SvtIconWindow_Impl::GetSelectedIconURL() const
{
- ULONG nPos;
+ sal_uLong nPos;
SvxIconChoiceCtrlEntry* pEntry = aIconCtrl.GetSelectedEntry( nPos );
String aURL;
if ( pEntry )
@@ -471,7 +471,7 @@ String SvtIconWindow_Impl::GetSelectedIconURL() const
String SvtIconWindow_Impl::GetSelectedIconText() const
{
- ULONG nPos;
+ sal_uLong nPos;
return MnemonicGenerator::EraseAllMnemonicChars( aIconCtrl.GetSelectedEntry( nPos )->GetText() );
}
@@ -489,9 +489,9 @@ void SvtIconWindow_Impl::InvalidateIconControl()
aIconCtrl.Invalidate();
}
-ULONG SvtIconWindow_Impl::GetCursorPos() const
+sal_uLong SvtIconWindow_Impl::GetCursorPos() const
{
- ULONG nPos = ~ULONG(0);
+ sal_uLong nPos = ~sal_uLong(0);
SvxIconChoiceCtrlEntry* pCursorEntry = aIconCtrl.GetCursor( );
if ( pCursorEntry )
@@ -500,15 +500,15 @@ ULONG SvtIconWindow_Impl::GetCursorPos() const
return nPos;
}
-ULONG SvtIconWindow_Impl::GetSelectEntryPos() const
+sal_uLong SvtIconWindow_Impl::GetSelectEntryPos() const
{
- ULONG nPos;
+ sal_uLong nPos;
if ( !aIconCtrl.GetSelectedEntry( nPos ) )
- nPos = ~ULONG(0);
+ nPos = ~sal_uLong(0);
return nPos;
}
-void SvtIconWindow_Impl::SetCursorPos( ULONG nPos )
+void SvtIconWindow_Impl::SetCursorPos( sal_uLong nPos )
{
SvxIconChoiceCtrlEntry* pEntry = aIconCtrl.GetEntry( nPos );
aIconCtrl.SetCursor( pEntry );
@@ -525,7 +525,7 @@ long SvtIconWindow_Impl::CalcHeight() const
{
// calculate the required height of the IconControl
long nHeight = 0;
- ULONG nCount = aIconCtrl.GetEntryCount();
+ sal_uLong nCount = aIconCtrl.GetEntryCount();
if ( nCount > 0 )
// bottom of the last icon
nHeight = aIconCtrl.GetEntry(nCount-1)->GetBoundRect().Bottom();
@@ -544,9 +544,9 @@ sal_Bool SvtIconWindow_Impl::IsRootURL( const String& rURL ) const
rURL == aSamplesFolderRootURL;
}
-ULONG SvtIconWindow_Impl::GetRootPos( const String& rURL ) const
+sal_uLong SvtIconWindow_Impl::GetRootPos( const String& rURL ) const
{
- ULONG nPos = ~ULONG(0);
+ sal_uLong nPos = ~sal_uLong(0);
if ( aNewDocumentRootURL.Match( rURL ) == STRING_MATCH )
nPos = 0;
else if ( aTemplateRootURL.Match( rURL ) == STRING_MATCH )
@@ -646,7 +646,7 @@ Sequence< ::rtl::OUString > SvtFileViewWindow_Impl::GetNewDocContents() const
::rtl::OUString aImageURL;
::rtl::OUString aTargetFrame;
- UINT32 i, nCount = aDynamicMenuEntries.getLength();
+ sal_uInt32 i, nCount = aDynamicMenuEntries.getLength();
::rtl::OUString sSeparator( ASCII_STR("private:separator") );
::rtl::OUString sSlotURL( ASCII_STR("slot:5500") );
@@ -788,7 +788,7 @@ void SvtExtendedMultiLineEdit_Impl::InsertEntry( const String& rTitle, const Str
aText += rTitle;
aText += ':';
InsertText( aText );
- ULONG nPara = GetParagraphCount() - 1;
+ sal_uLong nPara = GetParagraphCount() - 1;
SetAttrib( TextAttribFontWeight( WEIGHT_BOLD ), nPara, 0, aText.Len() );
aText = '\n';
@@ -968,7 +968,7 @@ void SvtFrameWindow_Impl::OpenFile( const String& rURL, sal_Bool bPreview, sal_B
// disabling must be done here, does not work in ctor because
// execute of the dialog will overwrite it
// ( own execute method would help )
- pTextWin->EnableInput( FALSE, TRUE );
+ pTextWin->EnableInput( sal_False, sal_True );
if ( pTextWin->IsReallyVisible() )
{
sal_Bool b = sal_True;
@@ -1106,7 +1106,7 @@ SvtTemplateWindow::~SvtTemplateWindow()
delete pFrameWin;
if ( pHistoryList )
{
- for ( UINT32 i = 0; i < pHistoryList->Count(); ++i )
+ for ( sal_uInt32 i = 0; i < pHistoryList->Count(); ++i )
delete pHistoryList->GetObject(i);
delete pHistoryList;
}
@@ -1123,7 +1123,7 @@ IMPL_LINK ( SvtTemplateWindow , IconClickHdl_Impl, SvtIconChoiceCtrl *, EMPTYARG
{
pFileWin->OpenRoot( aURL );
pIconWin->InvalidateIconControl();
- aFileViewTB.EnableItem( TI_DOCTEMPLATE_PRINT, FALSE );
+ aFileViewTB.EnableItem( TI_DOCTEMPLATE_PRINT, sal_False );
}
return 0;
}
@@ -1160,10 +1160,10 @@ IMPL_LINK ( SvtTemplateWindow , FileDblClickHdl_Impl, SvtFileView *, EMPTYARG )
IMPL_LINK ( SvtTemplateWindow , NewFolderHdl_Impl, SvtFileView *, EMPTYARG )
{
pFrameWin->OpenFile( String(), sal_True, sal_False, sal_False );
- aFileViewTB.EnableItem( TI_DOCTEMPLATE_PRINT, FALSE );
+ aFileViewTB.EnableItem( TI_DOCTEMPLATE_PRINT, sal_False );
String sURL = pFileWin->GetFolderURL();
- ULONG nPos = pIconWin->GetRootPos( sURL );
+ sal_uLong nPos = pIconWin->GetRootPos( sURL );
AppendHistoryURL( sURL, nPos );
aNewFolderHdl.Call( this );
@@ -1234,7 +1234,7 @@ void SvtTemplateWindow::PrintFile( const String& rURL )
// ------------------------------------------------------------------------
-void SvtTemplateWindow::AppendHistoryURL( const String& rURL, ULONG nGroup )
+void SvtTemplateWindow::AppendHistoryURL( const String& rURL, sal_uLong nGroup )
{
sal_Bool bInsert = sal_True;
if ( !pHistoryList )
@@ -1267,7 +1267,7 @@ void SvtTemplateWindow::OpenHistory()
// ------------------------------------------------------------------------
-void SvtTemplateWindow::DoAction( USHORT nAction )
+void SvtTemplateWindow::DoAction( sal_uInt16 nAction )
{
switch( nAction )
{
@@ -1316,16 +1316,16 @@ void SvtTemplateWindow::InitToolBoxes()
aSize.Height() += 4;
aFrameWinTB.SetPosSizePixel( Point( pFrameWin->GetPosPixel().X() + 2, 2 ), aSize );
- BOOL bFlat = ( SvtMiscOptions().GetToolboxStyle() == TOOLBOX_STYLE_FLAT );
+ sal_Bool bFlat = ( SvtMiscOptions().GetToolboxStyle() == TOOLBOX_STYLE_FLAT );
if ( bFlat )
{
aFileViewTB.SetOutStyle( TOOLBOX_STYLE_FLAT );
aFrameWinTB.SetOutStyle( TOOLBOX_STYLE_FLAT );
}
- aFileViewTB.EnableItem( TI_DOCTEMPLATE_BACK, FALSE );
- aFileViewTB.EnableItem( TI_DOCTEMPLATE_PREV, FALSE );
- aFileViewTB.EnableItem( TI_DOCTEMPLATE_PRINT, FALSE );
+ aFileViewTB.EnableItem( TI_DOCTEMPLATE_BACK, sal_False );
+ aFileViewTB.EnableItem( TI_DOCTEMPLATE_PREV, sal_False );
+ aFileViewTB.EnableItem( TI_DOCTEMPLATE_PRINT, sal_False );
Link aLink = LINK( this, SvtTemplateWindow, ClickHdl_Impl );
aFileViewTB.SetClickHdl( aLink );
@@ -1337,7 +1337,7 @@ void SvtTemplateWindow::InitToolBoxes()
void SvtTemplateWindow::InitToolBoxImages()
{
SvtMiscOptions aMiscOpt;
- BOOL bLarge = aMiscOpt.AreCurrentSymbolsLarge();
+ sal_Bool bLarge = aMiscOpt.AreCurrentSymbolsLarge();
sal_Bool bHiContrast = aFileViewTB.GetSettings().GetStyleSettings().GetHighContrastMode();
aFileViewTB.SetItemImage( TI_DOCTEMPLATE_BACK, Image( SvtResId(
@@ -1369,13 +1369,13 @@ void SvtTemplateWindow::UpdateIcons()
long SvtTemplateWindow::PreNotify( NotifyEvent& rNEvt )
{
- USHORT nType = rNEvt.GetType();
+ sal_uInt16 nType = rNEvt.GetType();
long nRet = 0;
if ( EVENT_KEYINPUT == nType && rNEvt.GetKeyEvent() )
{
const KeyCode& rKeyCode = rNEvt.GetKeyEvent()->GetKeyCode();
- USHORT nCode = rKeyCode.GetCode();
+ sal_uInt16 nCode = rKeyCode.GetCode();
if ( KEY_BACKSPACE == nCode && !rKeyCode.GetModifier() && pFileWin->HasChildPathFocus() )
{
@@ -1574,7 +1574,7 @@ void SvtTemplateWindow::ReadViewSettings()
// the selected view (details or preview)
pFrameWin->ToggleView( TI_DOCTEMPLATE_DOCINFO == nSelectedView );
- aFrameWinTB.CheckItem( (sal_uInt16)nSelectedView, TRUE );
+ aFrameWinTB.CheckItem( (sal_uInt16)nSelectedView, sal_True );
// the split ratio
sal_Int32 nSplitFileAndFrameSize = aSplitWin.GetItemSize( FILEWIN_ID ) + aSplitWin.GetItemSize( FRAMEWIN_ID );
diff --git a/svtools/source/contnr/templwin.hxx b/svtools/source/contnr/templwin.hxx
index d8ec12224f60..c6100ba5bc20 100644
--- a/svtools/source/contnr/templwin.hxx
+++ b/svtools/source/contnr/templwin.hxx
@@ -94,13 +94,13 @@ public:
String GetCursorPosIconURL() const;
String GetIconText( const String& rURL ) const;
void InvalidateIconControl();
- void SetCursorPos( ULONG nPos );
- ULONG GetCursorPos() const;
- ULONG GetSelectEntryPos() const;
+ void SetCursorPos( sal_uLong nPos );
+ sal_uLong GetCursorPos() const;
+ sal_uLong GetSelectEntryPos() const;
void SetFocus();
long CalcHeight() const;
sal_Bool IsRootURL( const String& rURL ) const;
- ULONG GetRootPos( const String& rURL ) const;
+ sal_uLong GetRootPos( const String& rURL ) const;
void UpdateIcons( sal_Bool _bHiContrast );
inline sal_Bool ProcessKeyEvent( const KeyEvent& rKEvt );
@@ -267,9 +267,9 @@ private:
DECL_LINK( ResizeHdl_Impl, SplitWindow* ); // used for split and initial setting of toolbar pos
void PrintFile( const String& rURL );
- void AppendHistoryURL( const String& rURL, ULONG nGroup );
+ void AppendHistoryURL( const String& rURL, sal_uLong nGroup );
void OpenHistory();
- void DoAction( USHORT nAction );
+ void DoAction( sal_uInt16 nAction );
void InitToolBoxes();
void InitToolBoxImages();
void UpdateIcons();
diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx
index 1b96f1ac89e4..c4ec516a735b 100644
--- a/svtools/source/contnr/treelist.cxx
+++ b/svtools/source/contnr/treelist.cxx
@@ -89,7 +89,7 @@ void SvListEntry::SetListPositions()
if( pChilds )
{
SvListEntry *pEntry = (SvListEntry*)pChilds->First();
- ULONG nCur = 0;
+ sal_uLong nCur = 0;
while ( pEntry )
{
pEntry->nListPos &= 0x80000000;
@@ -152,7 +152,7 @@ void SvTreeEntryList::DestroyAll()
SvTreeList::SvTreeList()
{
nEntryCount = 0;
- bAbsPositionsValid = FALSE;
+ bAbsPositionsValid = sal_False;
nRefCount = 1;
pRootItem = new SvListEntry;
eSortMode = SortNone;
@@ -188,11 +188,11 @@ SvTreeList::~SvTreeList()
|*
*************************************************************************/
-void SvTreeList::Broadcast( USHORT nActionId, SvListEntry* pEntry1,
- SvListEntry* pEntry2, ULONG nPos )
+void SvTreeList::Broadcast( sal_uInt16 nActionId, SvListEntry* pEntry1,
+ SvListEntry* pEntry2, sal_uLong nPos )
{
- ULONG nViewCount = aViewList.Count();
- for( ULONG nCurView = 0; nCurView < nViewCount; nCurView++ )
+ sal_uLong nViewCount = aViewList.Count();
+ for( sal_uLong nCurView = 0; nCurView < nViewCount; nCurView++ )
{
SvListView* pView = (SvListView*)aViewList.GetObject( nCurView );
if( pView )
@@ -202,7 +202,7 @@ void SvTreeList::Broadcast( USHORT nActionId, SvListEntry* pEntry1,
void SvTreeList::InsertView( SvListView* pView)
{
- ULONG nPos = aViewList.GetPos( pView );
+ sal_uLong nPos = aViewList.GetPos( pView );
if ( nPos == LIST_ENTRY_NOTFOUND )
{
aViewList.Insert( pView, LIST_APPEND );
@@ -212,7 +212,7 @@ void SvTreeList::InsertView( SvListView* pView)
void SvTreeList::RemoveView( SvListView* pView )
{
- ULONG nPos = aViewList.GetPos( pView );
+ sal_uLong nPos = aViewList.GetPos( pView );
if ( nPos != LIST_ENTRY_NOTFOUND )
{
aViewList.Remove( pView );
@@ -222,15 +222,15 @@ void SvTreeList::RemoveView( SvListView* pView )
// Ein Entry ist sichtbar, wenn alle Parents expandiert sind
-BOOL SvTreeList::IsEntryVisible( const SvListView* pView, SvListEntry* pEntry ) const
+sal_Bool SvTreeList::IsEntryVisible( const SvListView* pView, SvListEntry* pEntry ) const
{
DBG_ASSERT(pView&&pEntry,"IsVisible:Invalid Params");
- BOOL bRetVal=FALSE;
+ sal_Bool bRetVal=sal_False;
do
{
if ( pEntry == pRootItem )
{
- bRetVal=TRUE;
+ bRetVal=sal_True;
break;
}
pEntry = pEntry->pParent;
@@ -238,10 +238,10 @@ BOOL SvTreeList::IsEntryVisible( const SvListView* pView, SvListEntry* pEntry )
return bRetVal;
}
-USHORT SvTreeList::GetDepth( SvListEntry* pEntry ) const
+sal_uInt16 SvTreeList::GetDepth( SvListEntry* pEntry ) const
{
DBG_ASSERT(pEntry&&pEntry!=pRootItem,"GetDepth:Bad Entry");
- USHORT nDepth = 0;
+ sal_uInt16 nDepth = 0;
while( pEntry->pParent != pRootItem )
{
nDepth++;
@@ -290,20 +290,20 @@ void SvTreeList::Clear()
|*
*************************************************************************/
-BOOL SvTreeList::IsChild( SvListEntry* pParent, SvListEntry* pChild ) const
+sal_Bool SvTreeList::IsChild( SvListEntry* pParent, SvListEntry* pChild ) const
{
if ( !pParent )
pParent = pRootItem;
- BOOL bIsChild = FALSE;
+ sal_Bool bIsChild = sal_False;
SvTreeEntryList* pList = pParent->pChilds;
if ( !pList )
- return FALSE;
+ return sal_False;
SvListEntry* pActualChild = (SvListEntry*)(pList->First());
while( !bIsChild && pActualChild )
{
if ( pActualChild == pChild )
- bIsChild = TRUE;
+ bIsChild = sal_True;
else
{
if ( pActualChild->pChilds )
@@ -314,7 +314,7 @@ BOOL SvTreeList::IsChild( SvListEntry* pParent, SvListEntry* pChild ) const
return bIsChild;
}
-ULONG SvTreeList::Move(SvListEntry* pSrcEntry,SvListEntry* pTargetParent,ULONG nListPos)
+sal_uLong SvTreeList::Move(SvListEntry* pSrcEntry,SvListEntry* pTargetParent,sal_uLong nListPos)
{
// pDest darf Null sein!
DBG_ASSERT(pSrcEntry,"Entry?");
@@ -329,7 +329,7 @@ ULONG SvTreeList::Move(SvListEntry* pSrcEntry,SvListEntry* pTargetParent,ULONG n
if ( pSrcEntry == pTargetParent )
return pSrcEntry->GetChildListPos();
- bAbsPositionsValid = FALSE;
+ bAbsPositionsValid = sal_False;
SvTreeEntryList* pDstList = pTargetParent->pChilds;
SvTreeEntryList* pSrcList = pSrcEntry->pParent->pChilds;
@@ -358,20 +358,20 @@ ULONG SvTreeList::Move(SvListEntry* pSrcEntry,SvListEntry* pTargetParent,ULONG n
// Listenpositionen in Zielliste korrigieren
SetListPositions( pDstList );
- if ( pSrcList && (ULONG)pSrcList != (ULONG)pDstList )
+ if ( pSrcList && (sal_uLong)pSrcList != (sal_uLong)pDstList )
SetListPositions( pSrcList );
#ifdef CHECK_INTEGRITY
CheckIntegrity();
#endif
- ULONG nRetVal = pDstList->GetPos( pSrcEntry );
+ sal_uLong nRetVal = pDstList->GetPos( pSrcEntry );
DBG_ASSERT(nRetVal==pSrcEntry->GetChildListPos(),"ListPos not valid");
Broadcast( LISTACTION_MOVED,pSrcEntry,pTargetParent,nRetVal);
return nRetVal;
}
-ULONG SvTreeList::Copy(SvListEntry* pSrcEntry,SvListEntry* pTargetParent,ULONG nListPos)
+sal_uLong SvTreeList::Copy(SvListEntry* pSrcEntry,SvListEntry* pTargetParent,sal_uLong nListPos)
{
// pDest darf Null sein!
DBG_ASSERT(pSrcEntry,"Entry?");
@@ -380,9 +380,9 @@ ULONG SvTreeList::Copy(SvListEntry* pSrcEntry,SvListEntry* pTargetParent,ULONG n
if ( !pTargetParent->pChilds )
pTargetParent->pChilds = new SvTreeEntryList;
- bAbsPositionsValid = FALSE;
+ bAbsPositionsValid = sal_False;
- ULONG nCloneCount = 0;
+ sal_uLong nCloneCount = 0;
SvListEntry* pClonedEntry = Clone( pSrcEntry, nCloneCount );
nEntryCount += nCloneCount;
@@ -395,7 +395,7 @@ ULONG SvTreeList::Copy(SvListEntry* pSrcEntry,SvListEntry* pTargetParent,ULONG n
CheckIntegrity();
#endif
Broadcast( LISTACTION_INSERTED_TREE, pClonedEntry );
- ULONG nRetVal = pDstList->GetPos( pClonedEntry );
+ sal_uLong nRetVal = pDstList->GetPos( pClonedEntry );
return nRetVal;
}
@@ -414,7 +414,7 @@ CheckIntegrity();
void SvTreeList::Move( SvListEntry* pSrcEntry, SvListEntry* pDstEntry )
{
SvListEntry* pParent;
- ULONG nPos;
+ sal_uLong nPos;
if ( !pDstEntry )
{
@@ -443,7 +443,7 @@ void SvTreeList::Move( SvListEntry* pSrcEntry, SvListEntry* pDstEntry )
void SvTreeList::Copy( SvListEntry* pSrcEntry, SvListEntry* pDstEntry )
{
SvListEntry* pParent;
- ULONG nPos;
+ sal_uLong nPos;
if ( !pDstEntry )
{
@@ -470,7 +470,7 @@ void SvTreeList::Copy( SvListEntry* pSrcEntry, SvListEntry* pDstEntry )
void SvTreeList::InsertTree( SvListEntry* pSrcEntry, SvListEntry* pDstEntry)
{
SvListEntry* pParent;
- ULONG nPos;
+ sal_uLong nPos;
if ( !pDstEntry )
{
@@ -487,7 +487,7 @@ void SvTreeList::InsertTree( SvListEntry* pSrcEntry, SvListEntry* pDstEntry)
void SvTreeList::InsertTree(SvListEntry* pSrcEntry,
- SvListEntry* pTargetParent,ULONG nListPos)
+ SvListEntry* pTargetParent,sal_uLong nListPos)
{
DBG_ASSERT(pSrcEntry,"InsertTree:Entry?");
if ( !pSrcEntry )
@@ -501,7 +501,7 @@ void SvTreeList::InsertTree(SvListEntry* pSrcEntry,
// Sortierung beruecksichtigen
GetInsertionPos( pSrcEntry, pTargetParent, nListPos );
- bAbsPositionsValid = FALSE;
+ bAbsPositionsValid = sal_False;
pSrcEntry->pParent = pTargetParent; // Parent umsetzen
SvTreeEntryList* pDstList = pTargetParent->pChilds;
@@ -540,7 +540,7 @@ SvListEntry* SvTreeList::CreateEntry() const
|*
*************************************************************************/
-SvListEntry* SvTreeList::Clone( SvListEntry* pEntry, ULONG& nCloneCount ) const
+SvListEntry* SvTreeList::Clone( SvListEntry* pEntry, sal_uLong& nCloneCount ) const
{
SvListEntry* pClonedEntry = CloneEntry( pEntry );
nCloneCount = 1;
@@ -562,7 +562,7 @@ SvListEntry* SvTreeList::Clone( SvListEntry* pEntry, ULONG& nCloneCount ) const
SvTreeEntryList* SvTreeList::CloneChilds( SvTreeEntryList* pChilds,
SvListEntry* pNewParent,
- ULONG& nCloneCount ) const
+ sal_uLong& nCloneCount ) const
{
DBG_ASSERT(pChilds->Count(),"Childs?");
SvTreeEntryList* pClonedChilds = new SvTreeEntryList;
@@ -596,16 +596,16 @@ SvTreeEntryList* SvTreeList::CloneChilds( SvTreeEntryList* pChilds,
|*
*************************************************************************/
-ULONG SvTreeList::GetChildCount( SvListEntry* pParent ) const
+sal_uLong SvTreeList::GetChildCount( SvListEntry* pParent ) const
{
if ( !pParent )
return GetEntryCount();
if ( !pParent || !pParent->pChilds)
return 0;
- ULONG nCount = 0;
- USHORT nRefDepth = GetDepth( pParent );
- USHORT nActDepth = nRefDepth;
+ sal_uLong nCount = 0;
+ sal_uInt16 nRefDepth = GetDepth( pParent );
+ sal_uInt16 nActDepth = nRefDepth;
do
{
pParent = Next( pParent, &nActDepth );
@@ -625,16 +625,16 @@ ULONG SvTreeList::GetChildCount( SvListEntry* pParent ) const
|*
*************************************************************************/
-ULONG SvTreeList::GetVisibleChildCount(const SvListView* pView, SvListEntry* pParent) const
+sal_uLong SvTreeList::GetVisibleChildCount(const SvListView* pView, SvListEntry* pParent) const
{
DBG_ASSERT(pView,"GetVisChildCount:No View");
if ( !pParent )
pParent = pRootItem;
if ( !pParent || !pView->IsExpanded(pParent) || !pParent->pChilds )
return 0;
- ULONG nCount = 0;
- USHORT nRefDepth = GetDepth( pParent );
- USHORT nActDepth = nRefDepth;
+ sal_uLong nCount = 0;
+ sal_uInt16 nRefDepth = GetDepth( pParent );
+ sal_uInt16 nActDepth = nRefDepth;
do
{
pParent = NextVisible( pView, pParent, &nActDepth );
@@ -644,16 +644,16 @@ ULONG SvTreeList::GetVisibleChildCount(const SvListView* pView, SvListEntry* pPa
return nCount;
}
-ULONG SvTreeList::GetChildSelectionCount(const SvListView* pView,SvListEntry* pParent) const
+sal_uLong SvTreeList::GetChildSelectionCount(const SvListView* pView,SvListEntry* pParent) const
{
DBG_ASSERT(pView,"GetChildSelCount:No View");
if ( !pParent )
pParent = pRootItem;
if ( !pParent || !pParent->pChilds)
return 0;
- ULONG nCount = 0;
- USHORT nRefDepth = GetDepth( pParent );
- USHORT nActDepth = nRefDepth;
+ sal_uLong nCount = 0;
+ sal_uInt16 nRefDepth = GetDepth( pParent );
+ sal_uInt16 nActDepth = nRefDepth;
do
{
pParent = Next( pParent, &nActDepth );
@@ -692,22 +692,22 @@ SvListEntry* SvTreeList::First() const
|* Letzte Aenderung 17.08.94
|*
*************************************************************************/
-SvListEntry* SvTreeList::Next( SvListEntry* pActEntry, USHORT* pDepth ) const
+SvListEntry* SvTreeList::Next( SvListEntry* pActEntry, sal_uInt16* pDepth ) const
{
DBG_ASSERT( pActEntry && pActEntry->pParent, "SvTreeList::Next: invalid entry/parent!" );
if ( !pActEntry || !pActEntry->pParent )
return NULL;
- USHORT nDepth = 0;
- int bWithDepth = FALSE;
+ sal_uInt16 nDepth = 0;
+ int bWithDepth = sal_False;
if ( pDepth )
{
nDepth = *pDepth;
- bWithDepth = TRUE;
+ bWithDepth = sal_True;
}
SvTreeEntryList* pActualList = pActEntry->pParent->pChilds;
- ULONG nActualPos = pActEntry->GetChildListPos();
+ sal_uLong nActualPos = pActEntry->GetChildListPos();
if ( pActEntry->pChilds /* && pActEntry->pChilds->Count() */ )
{
@@ -756,20 +756,20 @@ SvListEntry* SvTreeList::Next( SvListEntry* pActEntry, USHORT* pDepth ) const
|* Letzte Aenderung 17.08.94
|*
*************************************************************************/
-SvListEntry* SvTreeList::Prev( SvListEntry* pActEntry, USHORT* pDepth ) const
+SvListEntry* SvTreeList::Prev( SvListEntry* pActEntry, sal_uInt16* pDepth ) const
{
DBG_ASSERT(pActEntry!=0,"Entry?");
- USHORT nDepth = 0;
- int bWithDepth = FALSE;
+ sal_uInt16 nDepth = 0;
+ int bWithDepth = sal_False;
if ( pDepth )
{
nDepth = *pDepth;
- bWithDepth = TRUE;
+ bWithDepth = sal_True;
}
SvTreeEntryList* pActualList = pActEntry->pParent->pChilds;
- ULONG nActualPos = pActEntry->GetChildListPos();
+ sal_uLong nActualPos = pActEntry->GetChildListPos();
if ( nActualPos > 0 )
{
@@ -809,7 +809,7 @@ SvListEntry* SvTreeList::Prev( SvListEntry* pActEntry, USHORT* pDepth ) const
|*
*************************************************************************/
-SvListEntry* SvTreeList::Last( USHORT* /* nDepth */ ) const
+SvListEntry* SvTreeList::Last( sal_uInt16* /* nDepth */ ) const
{
SvTreeEntryList* pActList = pRootItem->pChilds;
// if ( pActList->Count() == 0 )
@@ -835,7 +835,7 @@ SvListEntry* SvTreeList::Last( USHORT* /* nDepth */ ) const
|*
*************************************************************************/
-ULONG SvTreeList::GetVisiblePos( const SvListView* pView, SvListEntry* pEntry ) const
+sal_uLong SvTreeList::GetVisiblePos( const SvListView* pView, SvListEntry* pEntry ) const
{
DBG_ASSERT(pView&&pEntry,"View/Entry?");
@@ -859,7 +859,7 @@ ULONG SvTreeList::GetVisiblePos( const SvListView* pView, SvListEntry* pEntry )
|*
*************************************************************************/
-ULONG SvTreeList::GetVisibleCount( const SvListView* pView ) const
+sal_uLong SvTreeList::GetVisibleCount( const SvListView* pView ) const
{
DBG_ASSERT(pView,"GetVisCount:No View");
if( !pView->HasViewData() )
@@ -867,7 +867,7 @@ ULONG SvTreeList::GetVisibleCount( const SvListView* pView ) const
if ( pView->nVisibleCount )
return pView->nVisibleCount;
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
SvListEntry* pEntry = First(); // erster Eintrag immer sichtbar
while ( pEntry )
{
@@ -883,7 +883,7 @@ ULONG SvTreeList::GetVisibleCount( const SvListView* pView ) const
}
#endif
((SvListView*)pView)->nVisibleCount = nPos;
- ((SvListView*)pView)->bVisPositionsValid = TRUE;
+ ((SvListView*)pView)->bVisPositionsValid = sal_True;
return nPos;
}
@@ -901,22 +901,22 @@ ULONG SvTreeList::GetVisibleCount( const SvListView* pView ) const
// Funktion geht aus Geschwindigkeitsgruenden davon aus,
// das der uebergebene Eintrag bereits sichtbar ist
-SvListEntry* SvTreeList::NextVisible(const SvListView* pView,SvListEntry* pActEntry,USHORT* pActDepth) const
+SvListEntry* SvTreeList::NextVisible(const SvListView* pView,SvListEntry* pActEntry,sal_uInt16* pActDepth) const
{
DBG_ASSERT(pView,"NextVisible:No View");
if ( !pActEntry )
return 0;
- USHORT nDepth = 0;
- int bWithDepth = FALSE;
+ sal_uInt16 nDepth = 0;
+ int bWithDepth = sal_False;
if ( pActDepth )
{
nDepth = *pActDepth;
- bWithDepth = TRUE;
+ bWithDepth = sal_True;
}
SvTreeEntryList* pActualList = pActEntry->pParent->pChilds;
- ULONG nActualPos = pActEntry->GetChildListPos();
+ sal_uLong nActualPos = pActEntry->GetChildListPos();
if ( pView->IsExpanded(pActEntry) )
{
@@ -971,20 +971,20 @@ SvListEntry* SvTreeList::NextVisible(const SvListView* pView,SvListEntry* pActEn
// Funktion geht aus Geschwindigkeitsgruenden davon aus,
// das der uebergebene Eintrag bereits sichtbar ist
-SvListEntry* SvTreeList::PrevVisible(const SvListView* pView, SvListEntry* pActEntry, USHORT* pActDepth) const
+SvListEntry* SvTreeList::PrevVisible(const SvListView* pView, SvListEntry* pActEntry, sal_uInt16* pActDepth) const
{
DBG_ASSERT(pView&&pActEntry,"PrevVis:View/Entry?");
- USHORT nDepth = 0;
- int bWithDepth = FALSE;
+ sal_uInt16 nDepth = 0;
+ int bWithDepth = sal_False;
if ( pActDepth )
{
nDepth = *pActDepth;
- bWithDepth = TRUE;
+ bWithDepth = sal_True;
}
SvTreeEntryList* pActualList = pActEntry->pParent->pChilds;
- ULONG nActualPos = pActEntry->GetChildListPos();
+ sal_uLong nActualPos = pActEntry->GetChildListPos();
if ( nActualPos > 0 )
{
@@ -1024,7 +1024,7 @@ SvListEntry* SvTreeList::PrevVisible(const SvListView* pView, SvListEntry* pActE
|*
*************************************************************************/
-SvListEntry* SvTreeList::LastVisible( const SvListView* pView, USHORT* pDepth) const
+SvListEntry* SvTreeList::LastVisible( const SvListView* pView, sal_uInt16* pDepth) const
{
DBG_ASSERT(pView,"LastVis:No View");
SvListEntry* pEntry = Last();
@@ -1045,20 +1045,20 @@ SvListEntry* SvTreeList::LastVisible( const SvListView* pView, USHORT* pDepth) c
|*
*************************************************************************/
-SvListEntry* SvTreeList::NextVisible(const SvListView* pView,SvListEntry* pEntry,USHORT& nDelta) const
+SvListEntry* SvTreeList::NextVisible(const SvListView* pView,SvListEntry* pEntry,sal_uInt16& nDelta) const
{
DBG_ASSERT(pView&&pEntry&&IsEntryVisible(pView,pEntry),"NextVis:Wrong Prms/!Vis");
- ULONG nVisPos = GetVisiblePos( pView, pEntry );
+ sal_uLong nVisPos = GetVisiblePos( pView, pEntry );
// nDelta Eintraege vorhanden ?
// Beispiel: 0,1,2,3,4,5,6,7,8,9 nVisPos=5 nDelta=7
// nNewDelta = 10-nVisPos-1 == 4
if ( nVisPos+nDelta >= pView->nVisibleCount )
{
- nDelta = (USHORT)(pView->nVisibleCount-nVisPos);
+ nDelta = (sal_uInt16)(pView->nVisibleCount-nVisPos);
nDelta--;
}
- USHORT nDeltaTmp = nDelta;
+ sal_uInt16 nDeltaTmp = nDelta;
while( nDeltaTmp )
{
pEntry = NextVisible( pView, pEntry );
@@ -1078,17 +1078,17 @@ SvListEntry* SvTreeList::NextVisible(const SvListView* pView,SvListEntry* pEntry
|*
*************************************************************************/
-SvListEntry* SvTreeList::PrevVisible( const SvListView* pView, SvListEntry* pEntry, USHORT& nDelta ) const
+SvListEntry* SvTreeList::PrevVisible( const SvListView* pView, SvListEntry* pEntry, sal_uInt16& nDelta ) const
{
DBG_ASSERT(pView&&pEntry&&IsEntryVisible(pView,pEntry),"PrevVis:Parms/!Vis");
- ULONG nVisPos = GetVisiblePos( pView, pEntry );
+ sal_uLong nVisPos = GetVisiblePos( pView, pEntry );
// nDelta Eintraege vorhanden ?
// Beispiel: 0,1,2,3,4,5,6,7,8,9 nVisPos=8 nDelta=20
// nNewDelta = nNewVisPos
if ( nDelta > nVisPos )
- nDelta = (USHORT)nVisPos;
- USHORT nDeltaTmp = nDelta;
+ nDelta = (sal_uInt16)nVisPos;
+ sal_uInt16 nDeltaTmp = nDelta;
while( nDeltaTmp )
{
pEntry = PrevVisible( pView, pEntry );
@@ -1138,8 +1138,8 @@ SvListEntry* SvTreeList::NextSibling( SvListEntry* pEntry ) const
if( !pEntry )
return 0;
SvTreeEntryList* pList = pEntry->pParent->pChilds;
-// ULONG nPos = pList->GetPos( pEntry );
- ULONG nPos = pEntry->GetChildListPos();
+// sal_uLong nPos = pList->GetPos( pEntry );
+ sal_uLong nPos = pEntry->GetChildListPos();
nPos++;
pEntry = (SvListEntry*)(pList->GetObject( nPos ));
return pEntry;
@@ -1152,8 +1152,8 @@ SvListEntry* SvTreeList::PrevSibling( SvListEntry* pEntry ) const
return 0;
SvTreeEntryList* pList = pEntry->pParent->pChilds;
- // ULONG nPos = pList->GetPos( pEntry );
- ULONG nPos = pEntry->GetChildListPos();
+ // sal_uLong nPos = pList->GetPos( pEntry );
+ sal_uLong nPos = pEntry->GetChildListPos();
if ( nPos == 0 )
return 0;
nPos--;
@@ -1243,7 +1243,7 @@ SvListEntry* SvTreeList::LastSelected( const SvListView* pView ) const
|* Letzte Aenderung 17.08.94
|*
*************************************************************************/
-ULONG SvTreeList::Insert( SvListEntry* pEntry,SvListEntry* pParent,ULONG nPos )
+sal_uLong SvTreeList::Insert( SvListEntry* pEntry,SvListEntry* pParent,sal_uLong nPos )
{
DBG_ASSERT( pEntry,"Entry?");
@@ -1262,7 +1262,7 @@ ULONG SvTreeList::Insert( SvListEntry* pEntry,SvListEntry* pParent,ULONG nPos )
// Sortierung beruecksichtigen
GetInsertionPos( pEntry, pParent, nPos );
- bAbsPositionsValid = FALSE;
+ bAbsPositionsValid = sal_False;
pEntry->pParent = pParent;
pList->Insert( pEntry, nPos );
@@ -1289,7 +1289,7 @@ CheckIntegrity();
|*
*************************************************************************/
-ULONG SvTreeList::GetAbsPos( SvListEntry* pEntry) const
+sal_uLong SvTreeList::GetAbsPos( SvListEntry* pEntry) const
{
if ( !bAbsPositionsValid )
((SvTreeList*)this)->SetAbsolutePositions();
@@ -1308,7 +1308,7 @@ ULONG SvTreeList::GetAbsPos( SvListEntry* pEntry) const
void SvTreeList::SetAbsolutePositions()
{
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
SvListEntry* pEntry = First();
while ( pEntry )
{
@@ -1316,7 +1316,7 @@ void SvTreeList::SetAbsolutePositions()
nPos++;
pEntry = Next( pEntry );
}
- bAbsPositionsValid = TRUE;
+ bAbsPositionsValid = sal_True;
#ifdef CHECK_INTEGRITY
CheckIntegrity();
#endif
@@ -1347,7 +1347,7 @@ void SvTreeList::Expand( SvListView* pView, SvListEntry* pEntry )
// wenn Parent sichtbar dann Statusdaten invalidieren
if ( pView->IsExpanded( pParent ) )
{
- pView->bVisPositionsValid = FALSE;
+ pView->bVisPositionsValid = sal_False;
pView->nVisibleCount = 0;
}
#ifdef CHECK_INTEGRITY
@@ -1380,7 +1380,7 @@ void SvTreeList::Collapse( SvListView* pView, SvListEntry* pEntry )
if ( pView->IsExpanded(pParent) )
{
pView->nVisibleCount = 0;
- pView->bVisPositionsValid = FALSE;
+ pView->bVisPositionsValid = sal_False;
}
#ifdef CHECK_INTEGRITY
CheckIntegrity();
@@ -1398,14 +1398,14 @@ CheckIntegrity();
|*
*************************************************************************/
-BOOL SvTreeList::Select( SvListView* pView, SvListEntry* pEntry, BOOL bSelect )
+sal_Bool SvTreeList::Select( SvListView* pView, SvListEntry* pEntry, sal_Bool bSelect )
{
DBG_ASSERT(pView&&pEntry,"Select:View/Entry?");
SvViewData* pViewData = pView->GetViewData( pEntry );
if ( bSelect )
{
if ( pViewData->IsSelected() || !pViewData->IsSelectable() )
- return FALSE;
+ return sal_False;
else
{
pViewData->nFlags |= SVLISTENTRYFLAG_SELECTED;
@@ -1415,7 +1415,7 @@ BOOL SvTreeList::Select( SvListView* pView, SvListEntry* pEntry, BOOL bSelect )
else
{
if ( !pViewData->IsSelected() )
- return FALSE;
+ return sal_False;
else
{
pViewData->nFlags &= ~( SVLISTENTRYFLAG_SELECTED );
@@ -1425,7 +1425,7 @@ BOOL SvTreeList::Select( SvListView* pView, SvListEntry* pEntry, BOOL bSelect )
#ifdef CHECK_INTEGRITY
CheckIntegrity();
#endif
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -1437,7 +1437,7 @@ CheckIntegrity();
|* Letzte Aenderung 05.04.01
|*
*************************************************************************/
-BOOL SvTreeList::Remove( SvListEntry* pEntry )
+sal_Bool SvTreeList::Remove( SvListEntry* pEntry )
{
DBG_ASSERT(pEntry,"Cannot remove root, use clear");
@@ -1448,22 +1448,22 @@ BOOL SvTreeList::Remove( SvListEntry* pEntry )
// Explorer aus der View Eintraege, die er nicht in die View
// eingefuegt hat. Da sich der Kunde fuer ein platzendes
// Office nichts kaufen kann, fange ich diesen Fall ab.
- return FALSE;
+ return sal_False;
}
Broadcast( LISTACTION_REMOVING, pEntry );
- ULONG nRemoved = 1 + GetChildCount(pEntry);
- bAbsPositionsValid = FALSE;
+ sal_uLong nRemoved = 1 + GetChildCount(pEntry);
+ bAbsPositionsValid = sal_False;
SvListEntry* pParent = pEntry->pParent;
SvTreeEntryList* pList = pParent->pChilds;
DBG_ASSERT(pList,"Remove:No Childlist");
- BOOL bLastEntry = FALSE;
+ sal_Bool bLastEntry = sal_False;
if ( pEntry->HasChildListPos() )
{
- ULONG nListPos = pEntry->GetChildListPos();
- bLastEntry = (nListPos == (pList->Count()-1) ) ? TRUE : FALSE;
+ sal_uLong nListPos = pEntry->GetChildListPos();
+ bLastEntry = (nListPos == (pList->Count()-1) ) ? sal_True : sal_False;
pList->Remove( nListPos );
}
else
@@ -1493,7 +1493,7 @@ CheckIntegrity();
Broadcast( LISTACTION_REMOVED, pEntry );
delete pEntry; // loescht auch alle Childs
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -1506,7 +1506,7 @@ CheckIntegrity();
|*
*************************************************************************/
-ULONG SvTreeList::SelectChilds(SvListView* pView, SvListEntry* pParent,BOOL bSelect )
+sal_uLong SvTreeList::SelectChilds(SvListView* pView, SvListEntry* pParent,sal_Bool bSelect )
{
DBG_ASSERT(pView&&pParent,"SelChilds:View/Parent?");
if ( !pParent->pChilds )
@@ -1514,9 +1514,9 @@ ULONG SvTreeList::SelectChilds(SvListView* pView, SvListEntry* pParent,BOOL bSel
if ( pParent->pChilds->Count() == 0 )
return 0;
- USHORT nRefDepth = GetDepth( pParent );
- USHORT nDepth = nRefDepth;
- ULONG nCount = 0;
+ sal_uInt16 nRefDepth = GetDepth( pParent );
+ sal_uInt16 nDepth = nRefDepth;
+ sal_uLong nCount = 0;
pParent = Next( pParent );
do
{
@@ -1531,7 +1531,7 @@ CheckIntegrity();
return nCount;
}
-void SvTreeList::SelectAll( SvListView* pView, BOOL bSelect )
+void SvTreeList::SelectAll( SvListView* pView, sal_Bool bSelect )
{
DBG_ASSERT(pView,"SelectAll:NoView");
SvListEntry* pEntry = First();
@@ -1555,7 +1555,7 @@ CheckIntegrity();
}
-SvListEntry* SvTreeList::GetEntryAtAbsPos( ULONG nAbsPos ) const
+SvListEntry* SvTreeList::GetEntryAtAbsPos( sal_uLong nAbsPos ) const
{
SvListEntry* pEntry = First();
while ( nAbsPos && pEntry )
@@ -1566,7 +1566,7 @@ SvListEntry* SvTreeList::GetEntryAtAbsPos( ULONG nAbsPos ) const
return pEntry;
}
-SvListEntry* SvTreeList::GetEntryAtVisPos( const SvListView* pView, ULONG nVisPos ) const
+SvListEntry* SvTreeList::GetEntryAtVisPos( const SvListView* pView, sal_uLong nVisPos ) const
{
DBG_ASSERT(pView,"GetEntryAtVisPos:No View");
SvListEntry* pEntry = First();
@@ -1587,7 +1587,7 @@ void SvTreeList::SetListPositions( SvTreeEntryList* pList )
pEntry->pParent->InvalidateChildrensListPositions();
}
/*
- ULONG nListPos = 0;
+ sal_uLong nListPos = 0;
SvListEntry* pEntry = (SvListEntry*)(pList->First());
while( pEntry )
{
@@ -1604,13 +1604,13 @@ void SvTreeList::InvalidateEntry( SvListEntry* pEntry )
Broadcast( LISTACTION_INVALIDATE_ENTRY, pEntry );
}
-BOOL SvTreeList::IsInChildList( SvListEntry* pParent, SvListEntry* pChild) const
+sal_Bool SvTreeList::IsInChildList( SvListEntry* pParent, SvListEntry* pChild) const
{
if ( !pParent )
pParent = pRootItem;
- BOOL bIsChild = FALSE;
+ sal_Bool bIsChild = sal_False;
if ( pParent->pChilds )
- bIsChild = (BOOL)(pParent->pChilds->GetPos(pChild) != LIST_ENTRY_NOTFOUND);
+ bIsChild = (sal_Bool)(pParent->pChilds->GetPos(pChild) != LIST_ENTRY_NOTFOUND);
return bIsChild;
}
@@ -1618,7 +1618,7 @@ BOOL SvTreeList::IsInChildList( SvListEntry* pParent, SvListEntry* pChild) const
void lcl_CheckList( SvTreeEntryList* pList )
{
SvListEntry* pEntry = (SvListEntry*)(pList->First());
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
while ( pEntry )
{
DBG_ASSERT(pEntry->GetChildListPos()==nPos,"Wrong ListPos");
@@ -1629,7 +1629,7 @@ void lcl_CheckList( SvTreeEntryList* pList )
void SvTreeList::CheckIntegrity() const
{
- ULONG nMyEntryCount = 0;
+ sal_uLong nMyEntryCount = 0;
if ( pRootItem->pChilds )
{
lcl_CheckList( pRootItem->pChilds );
@@ -1680,7 +1680,7 @@ SvListView::SvListView( SvTreeList* pModell )
pModel = 0;
nSelectionCount = 0;
nVisibleCount = 0;
- bVisPositionsValid = FALSE;
+ bVisPositionsValid = sal_False;
SetModel( pModell );
}
@@ -1690,7 +1690,7 @@ SvListView::SvListView()
pModel = 0;
nSelectionCount = 0;
nVisibleCount = 0;
- bVisPositionsValid = FALSE;
+ bVisPositionsValid = sal_False;
}
@@ -1724,7 +1724,7 @@ void SvListView::InitTable()
pEntry = pModel->pRootItem;
pViewData = new SvViewData;
pViewData->nFlags = SVLISTENTRYFLAG_EXPANDED;
- aDataTable.Insert( (ULONG)pEntry, pViewData );
+ aDataTable.Insert( (sal_uLong)pEntry, pViewData );
// Jetzt alle anderen Entries
pEntry = pModel->First();
while( pEntry )
@@ -1732,7 +1732,7 @@ void SvListView::InitTable()
pViewData = CreateViewData( pEntry );
DBG_ASSERT(pViewData,"InitTable:No ViewData");
InitViewData( pViewData, pEntry );
- aDataTable.Insert( (ULONG)pEntry, pViewData );
+ aDataTable.Insert( (sal_uLong)pEntry, pViewData );
pEntry = pModel->Next( pEntry );
}
}
@@ -1760,25 +1760,25 @@ void SvListView::Clear()
ClearTable();
nSelectionCount = 0;
nVisibleCount = 0;
- bVisPositionsValid = FALSE;
+ bVisPositionsValid = sal_False;
if( pModel )
{
// RootEntry einfuegen
SvListEntry* pEntry = pModel->pRootItem;
SvViewData* pViewData = new SvViewData;
pViewData->nFlags = SVLISTENTRYFLAG_EXPANDED;
- aDataTable.Insert( (ULONG)pEntry, pViewData );
+ aDataTable.Insert( (sal_uLong)pEntry, pViewData );
}
}
void SvListView::SetModel( SvTreeList* pNewModel )
{
DBG_CHKTHIS(SvListView,0);
- BOOL bBroadcastCleared = FALSE;
+ sal_Bool bBroadcastCleared = sal_False;
if ( pModel )
{
pModel->RemoveView( this );
- bBroadcastCleared = TRUE;
+ bBroadcastCleared = sal_True;
ModelNotification( LISTACTION_CLEARING,0,0,0 );
if ( pModel->GetRefCount() == 0 )
delete pModel;
@@ -1807,7 +1807,7 @@ void SvListView::ModelHasInsertedTree( SvListEntry* )
}
void SvListView::ModelIsMoving( SvListEntry* /* pSource */ ,
- SvListEntry* /* pTargetParent */ , ULONG /* nPos */ )
+ SvListEntry* /* pTargetParent */ , sal_uLong /* nPos */ )
{
DBG_CHKTHIS(SvListView,0);
}
@@ -1833,28 +1833,28 @@ void SvListView::ModelHasEntryInvalidated( SvListEntry*)
DBG_CHKTHIS(SvListView,0);
}
-void SvListView::ActionMoving( SvListEntry* pEntry,SvListEntry*,ULONG)
+void SvListView::ActionMoving( SvListEntry* pEntry,SvListEntry*,sal_uLong)
{
DBG_CHKTHIS(SvListView,0);
SvListEntry* pParent = pEntry->pParent;
DBG_ASSERT(pParent,"Model not consistent");
if( pParent != pModel->pRootItem && pParent->pChilds->Count() == 1 )
{
- SvViewData* pViewData = (SvViewData*)aDataTable.Get( (ULONG)pParent );
+ SvViewData* pViewData = (SvViewData*)aDataTable.Get( (sal_uLong)pParent );
pViewData->nFlags &= (~SVLISTENTRYFLAG_EXPANDED);
}
// vorlaeufig
nVisibleCount = 0;
- bVisPositionsValid = FALSE;
+ bVisPositionsValid = sal_False;
}
void SvListView::ActionMoved( SvListEntry* /* pEntry */ ,
SvListEntry* /* pTargetPrnt */ ,
- ULONG /* nChildPos */ )
+ sal_uLong /* nChildPos */ )
{
DBG_CHKTHIS(SvListView,0);
nVisibleCount = 0;
- bVisPositionsValid = FALSE;
+ bVisPositionsValid = sal_False;
}
void SvListView::ActionInserted( SvListEntry* pEntry )
@@ -1864,14 +1864,14 @@ void SvListView::ActionInserted( SvListEntry* pEntry )
SvViewData* pData = CreateViewData( pEntry );
InitViewData( pData, pEntry );
#ifdef DBG_UTIL
- BOOL bSuccess =
+ sal_Bool bSuccess =
#endif
- aDataTable.Insert( (ULONG)pEntry, pData );
+ aDataTable.Insert( (sal_uLong)pEntry, pData );
DBG_ASSERT(bSuccess,"Entry already in View");
if ( nVisibleCount && pModel->IsEntryVisible( this, pEntry ))
{
nVisibleCount = 0;
- bVisPositionsValid = FALSE;
+ bVisPositionsValid = sal_False;
}
}
@@ -1881,18 +1881,18 @@ void SvListView::ActionInsertedTree( SvListEntry* pEntry )
if ( pModel->IsEntryVisible( this, pEntry ))
{
nVisibleCount = 0;
- bVisPositionsValid = FALSE;
+ bVisPositionsValid = sal_False;
}
// ueber Entry und seine Childs iterieren
SvListEntry* pCurEntry = pEntry;
- USHORT nRefDepth = pModel->GetDepth( pCurEntry );
+ sal_uInt16 nRefDepth = pModel->GetDepth( pCurEntry );
while( pCurEntry )
{
- DBG_ASSERT(aDataTable.Get((ULONG)pCurEntry)==0,"Entry already in Table");
+ DBG_ASSERT(aDataTable.Get((sal_uLong)pCurEntry)==0,"Entry already in Table");
SvViewData* pViewData = CreateViewData( pCurEntry );
DBG_ASSERT(pViewData,"No ViewData");
InitViewData( pViewData, pEntry );
- aDataTable.Insert( (ULONG)pCurEntry, pViewData );
+ aDataTable.Insert( (sal_uLong)pCurEntry, pViewData );
pCurEntry = pModel->Next( pCurEntry );
if ( pCurEntry && pModel->GetDepth(pCurEntry) <= nRefDepth)
pCurEntry = 0;
@@ -1907,9 +1907,9 @@ void SvListView::RemoveViewData( SvListEntry* pParent )
SvListEntry* pCur = (SvListEntry*)pChilds->First();
while( pCur )
{
- SvViewData* pViewData = (SvViewData*)aDataTable.Get((ULONG)pCur);
+ SvViewData* pViewData = (SvViewData*)aDataTable.Get((sal_uLong)pCur);
delete pViewData;
- aDataTable.Remove( (ULONG)pCur );
+ aDataTable.Remove( (sal_uLong)pCur );
if( pCur->HasChilds())
RemoveViewData( pCur );
pCur = (SvListEntry*)pChilds->Next();
@@ -1924,12 +1924,12 @@ void SvListView::ActionRemoving( SvListEntry* pEntry )
DBG_CHKTHIS(SvListView,0);
DBG_ASSERT(pEntry,"Remove:No Entry");
- SvViewData* pViewData = (SvViewData*)aDataTable.Get( (ULONG)pEntry );
- ULONG nSelRemoved = 0;
+ SvViewData* pViewData = (SvViewData*)aDataTable.Get( (sal_uLong)pEntry );
+ sal_uLong nSelRemoved = 0;
if ( pViewData->IsSelected() )
nSelRemoved = 1 + pModel->GetChildSelectionCount( this, pEntry );
nSelectionCount -= nSelRemoved;
- ULONG nVisibleRemoved = 0;
+ sal_uLong nVisibleRemoved = 0;
if ( pModel->IsEntryVisible( this, pEntry ) )
nVisibleRemoved = 1 + pModel->GetVisibleChildCount( this, pEntry );
if( nVisibleCount )
@@ -1942,18 +1942,18 @@ void SvListView::ActionRemoving( SvListEntry* pEntry )
#endif
nVisibleCount -= nVisibleRemoved;
}
- bVisPositionsValid = FALSE;
+ bVisPositionsValid = sal_False;
- pViewData = (SvViewData*)aDataTable.Get((ULONG)pEntry);
+ pViewData = (SvViewData*)aDataTable.Get((sal_uLong)pEntry);
delete pViewData;
- aDataTable.Remove( (ULONG)pEntry );
+ aDataTable.Remove( (sal_uLong)pEntry );
RemoveViewData( pEntry );
SvListEntry* pCurEntry = pEntry->pParent;
if ( pCurEntry && pCurEntry != pModel->pRootItem &&
pCurEntry->pChilds->Count() == 1 )
{
- pViewData = (SvViewData*)aDataTable.Get((ULONG)pCurEntry);
+ pViewData = (SvViewData*)aDataTable.Get((sal_uLong)pCurEntry);
pViewData->nFlags &= (~SVLISTENTRYFLAG_EXPANDED);
}
}
@@ -1969,8 +1969,8 @@ void SvListView::ActionClear()
Clear();
}
-void SvListView::ModelNotification( USHORT nActionId, SvListEntry* pEntry1,
- SvListEntry* pEntry2, ULONG nPos )
+void SvListView::ModelNotification( sal_uInt16 nActionId, SvListEntry* pEntry1,
+ SvListEntry* pEntry2, sal_uLong nPos )
{
DBG_CHKTHIS(SvListView,0);
switch( nActionId )
@@ -2010,7 +2010,7 @@ void SvListView::ModelNotification( USHORT nActionId, SvListEntry* pEntry1,
ModelHasEntryInvalidated( pEntry1 );
break;
case LISTACTION_RESORTED:
- bVisPositionsValid = FALSE;
+ bVisPositionsValid = sal_False;
break;
case LISTACTION_RESORTING:
break;
@@ -2038,7 +2038,7 @@ StringCompare SvTreeList::Compare( SvListEntry* pLeft, SvListEntry* pRight) cons
void SvTreeList::Resort()
{
Broadcast( LISTACTION_RESORTING );
- bAbsPositionsValid = FALSE;
+ bAbsPositionsValid = sal_False;
ResortChilds( pRootItem );
Broadcast( LISTACTION_RESORTED );
}
@@ -2052,11 +2052,11 @@ void SvTreeList::ResortChilds( SvListEntry* pParent )
List aList( *pChildList );
pChildList->Clear();
- ULONG nCount = aList.Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ sal_uLong nCount = aList.Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvListEntry* pCurEntry = (SvListEntry*)aList.GetObject( nCur );
- ULONG nListPos = LIST_APPEND;
+ sal_uLong nListPos = LIST_APPEND;
GetInsertionPos( pCurEntry, pParent, nListPos );
pChildList->Insert( pCurEntry, nListPos );
if( pCurEntry->pChilds )
@@ -2066,7 +2066,7 @@ void SvTreeList::ResortChilds( SvListEntry* pParent )
}
void SvTreeList::GetInsertionPos( SvListEntry* pEntry, SvListEntry* pParent,
- ULONG& rPos )
+ sal_uLong& rPos )
{
DBG_ASSERT(pEntry,"No Entry");
diff --git a/svtools/source/control/asynclink.cxx b/svtools/source/control/asynclink.cxx
index d3ef0c349f08..7231470528d5 100755
--- a/svtools/source/control/asynclink.cxx
+++ b/svtools/source/control/asynclink.cxx
@@ -42,11 +42,11 @@ void AsynchronLink::CreateMutex()
if( !_pMutex ) _pMutex = new vos::OMutex;
}
-void AsynchronLink::Call( void* pObj, BOOL
+void AsynchronLink::Call( void* pObj, sal_Bool
#ifdef DBG_UTIL
bAllowDoubles
#endif
-, BOOL bUseTimer )
+, sal_Bool bUseTimer )
{
#ifdef DBG_UTIL
if ( bUseTimer || !_bInCall )
@@ -92,7 +92,7 @@ AsynchronLink::~AsynchronLink()
Application::RemoveUserEvent( _nEventId );
}
delete _pTimer;
- if( _pDeleted ) *_pDeleted = TRUE;
+ if( _pDeleted ) *_pDeleted = sal_True;
delete _pMutex;
}
@@ -125,13 +125,13 @@ void AsynchronLink::ClearPendingCall()
void AsynchronLink::Call_Impl( void* pArg )
{
- _bInCall = TRUE;
- BOOL bDeleted = FALSE;
+ _bInCall = sal_True;
+ sal_Bool bDeleted = sal_False;
_pDeleted = &bDeleted;
_aLink.Call( pArg );
if( !bDeleted )
{
- _bInCall = FALSE;
+ _bInCall = sal_False;
_pDeleted = 0;
}
}
diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx
index 043d7023508b..17790d1ad4c8 100755
--- a/svtools/source/control/calendar.cxx
+++ b/svtools/source/control/calendar.cxx
@@ -62,12 +62,12 @@
#define WEEKNUMBER_HEIGHT 85
-#define CALENDAR_HITTEST_DAY ((USHORT)0x0001)
-#define CALENDAR_HITTEST_WEEK ((USHORT)0x0002)
-#define CALENDAR_HITTEST_MONTHTITLE ((USHORT)0x0004)
-#define CALENDAR_HITTEST_PREV ((USHORT)0x0008)
-#define CALENDAR_HITTEST_NEXT ((USHORT)0x0010)
-#define CALENDAR_HITTEST_OUTSIDE ((USHORT)0x1000)
+#define CALENDAR_HITTEST_DAY ((sal_uInt16)0x0001)
+#define CALENDAR_HITTEST_WEEK ((sal_uInt16)0x0002)
+#define CALENDAR_HITTEST_MONTHTITLE ((sal_uInt16)0x0004)
+#define CALENDAR_HITTEST_PREV ((sal_uInt16)0x0008)
+#define CALENDAR_HITTEST_NEXT ((sal_uInt16)0x0010)
+#define CALENDAR_HITTEST_OUTSIDE ((sal_uInt16)0x1000)
#define MENU_YEAR_COUNT 3
@@ -82,7 +82,7 @@ struct ImplDateInfo
XubString maText;
Color* mpTextColor;
Color* mpFrameColor;
- USHORT mnFlags;
+ sal_uInt16 mnFlags;
ImplDateInfo( const XubString& rText ) :
maText( rText )
@@ -94,7 +94,7 @@ DECLARE_TABLE( ImplDateTable, ImplDateInfo* )
// =======================================================================
-static void ImplCalendarSelectDate( Table* pTable, const Date& rDate, BOOL bSelect )
+static void ImplCalendarSelectDate( Table* pTable, const Date& rDate, sal_Bool bSelect )
{
if ( bSelect )
pTable->Insert( rDate.GetDate(), TABLE_DATE_SELECTED );
@@ -107,7 +107,7 @@ static void ImplCalendarSelectDate( Table* pTable, const Date& rDate, BOOL bSele
static void ImplCalendarSelectDateRange( Table* pTable,
const Date& rStartDate,
const Date& rEndDate,
- BOOL bSelect )
+ sal_Bool bSelect )
{
Date aStartDate = rStartDate;
Date aEndDate = rEndDate;
@@ -208,24 +208,24 @@ void Calendar::ImplInit( WinBits nWinStyle )
mnFirstYear = 0;
mnLastYear = 0;
mnRequestYear = 0;
- mbCalc = TRUE;
- mbFormat = TRUE;
- mbDrag = FALSE;
- mbSelection = FALSE;
- mbMultiSelection = FALSE;
- mbWeekSel = FALSE;
- mbUnSel = FALSE;
- mbMenuDown = FALSE;
- mbSpinDown = FALSE;
- mbPrevIn = FALSE;
- mbNextIn = FALSE;
- mbDirect = FALSE;
- mbInSelChange = FALSE;
- mbTravelSelect = FALSE;
- mbScrollDateRange = FALSE;
- mbSelLeft = FALSE;
- mbAllSel = FALSE;
- mbDropPos = FALSE;
+ mbCalc = sal_True;
+ mbFormat = sal_True;
+ mbDrag = sal_False;
+ mbSelection = sal_False;
+ mbMultiSelection = sal_False;
+ mbWeekSel = sal_False;
+ mbUnSel = sal_False;
+ mbMenuDown = sal_False;
+ mbSpinDown = sal_False;
+ mbPrevIn = sal_False;
+ mbNextIn = sal_False;
+ mbDirect = sal_False;
+ mbInSelChange = sal_False;
+ mbTravelSelect = sal_False;
+ mbScrollDateRange = sal_False;
+ mbSelLeft = sal_False;
+ mbAllSel = sal_False;
+ mbDropPos = sal_False;
::rtl::OUString aGregorian( RTL_CONSTASCII_USTRINGPARAM( "gregorian"));
maCalendarWrapper.loadCalendar( aGregorian,
@@ -252,14 +252,14 @@ void Calendar::ImplInit( WinBits nWinStyle )
}
SetFirstDate( maCurDate );
- ImplCalendarSelectDate( mpSelectTable, maCurDate, TRUE );
+ ImplCalendarSelectDate( mpSelectTable, maCurDate, sal_True );
// Sonstige Strings erzeugen
maDayText = XubString( SvtResId( STR_SVT_CALENDAR_DAY ) );
maWeekText = XubString( SvtResId( STR_SVT_CALENDAR_WEEK ) );
// Tagestexte anlegen
- for ( USHORT i = 0; i < 31; i++ )
+ for ( sal_uInt16 i = 0; i < 31; i++ )
mpDayText[i] = new UniString( UniString::CreateFromInt32( i+1 ) );
maDragScrollTimer.SetTimeoutHdl( STATIC_LINK( this, Calendar, ScrollHdl ) );
@@ -338,7 +338,7 @@ Calendar::~Calendar()
if ( mpRestoreSelectTable )
delete mpRestoreSelectTable;
- for ( USHORT i = 0; i < 31; i++ )
+ for ( sal_uInt16 i = 0; i < 31; i++ )
delete mpDayText[i];
}
@@ -346,7 +346,7 @@ Calendar::~Calendar()
void Calendar::SetMinimumNumberOfDaysInWeek( sal_Int16 nDays )
{
- ImplUpdate( TRUE );
+ ImplUpdate( sal_True );
maCalendarWrapper.setMinimumNumberOfDaysForFirstWeek( nDays);
}
@@ -354,7 +354,7 @@ void Calendar::SetMinimumNumberOfDaysInWeek( sal_Int16 nDays )
void Calendar::SetWeekStart( sal_Int16 nDay )
{
- ImplUpdate( TRUE );
+ ImplUpdate( sal_True );
switch (nDay)
{
case i18n::Weekdays::SUNDAY :
@@ -529,23 +529,23 @@ void Calendar::ImplFormat()
nDay %= 7;
}
- mbCalc = FALSE;
+ mbCalc = sal_False;
}
// Anzahl Tage berechnen
DayOfWeek eStartDay = ImplGetWeekStart();
- USHORT nWeekDay;
+ sal_uInt16 nWeekDay;
Date aTempDate = GetFirstMonth();
maFirstDate = aTempDate;
- nWeekDay = (USHORT)aTempDate.GetDayOfWeek();
- nWeekDay = (nWeekDay+(7-(USHORT)eStartDay)) % 7;
- maFirstDate -= (ULONG)nWeekDay;
+ nWeekDay = (sal_uInt16)aTempDate.GetDayOfWeek();
+ nWeekDay = (nWeekDay+(7-(sal_uInt16)eStartDay)) % 7;
+ maFirstDate -= (sal_uLong)nWeekDay;
mnDayCount = nWeekDay;
- USHORT nDaysInMonth;
- USHORT nMonthCount = (USHORT)(mnMonthPerLine*mnLines);
- for ( USHORT i = 0; i < nMonthCount; i++ )
+ sal_uInt16 nDaysInMonth;
+ sal_uInt16 nMonthCount = (sal_uInt16)(mnMonthPerLine*mnLines);
+ for ( sal_uInt16 i = 0; i < nMonthCount; i++ )
{
nDaysInMonth = aTempDate.GetDaysInMonth();
mnDayCount += nDaysInMonth;
@@ -555,8 +555,8 @@ void Calendar::ImplFormat()
aTempDate2--;
nDaysInMonth = aTempDate2.GetDaysInMonth();
aTempDate2 -= nDaysInMonth-1;
- nWeekDay = (USHORT)aTempDate2.GetDayOfWeek();
- nWeekDay = (nWeekDay+(7-(USHORT)eStartDay)) % 7;
+ nWeekDay = (sal_uInt16)aTempDate2.GetDayOfWeek();
+ nWeekDay = (nWeekDay+(7-(sal_uInt16)eStartDay)) % 7;
mnDayCount += 42-nDaysInMonth-nWeekDay;
// Farben festlegen
@@ -574,8 +574,8 @@ void Calendar::ImplFormat()
}
// DateInfo besorgen
- USHORT nNewFirstYear = maFirstDate.GetYear();
- USHORT nNewLastYear = GetLastDate().GetYear();
+ sal_uInt16 nNewFirstYear = maFirstDate.GetYear();
+ sal_uInt16 nNewLastYear = GetLastDate().GetYear();
if ( mnFirstYear )
{
if ( nNewFirstYear < mnFirstYear )
@@ -600,12 +600,12 @@ void Calendar::ImplFormat()
}
mnRequestYear = 0;
- mbFormat = FALSE;
+ mbFormat = sal_False;
}
// -----------------------------------------------------------------------
-USHORT Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const
+sal_uInt16 Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const
{
if ( mbFormat )
return 0;
@@ -619,7 +619,7 @@ USHORT Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const
long nY;
long nOffX;
long nYMonth;
- USHORT nDay;
+ sal_uInt16 nDay;
DayOfWeek eStartDay = ImplGetWeekStart();
rDate = GetFirstMonth();
@@ -636,7 +636,7 @@ USHORT Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const
if ( (rPos.X() < nX) && (rPos.Y() < nYMonth) )
return 0;
- USHORT nDaysInMonth = rDate.GetDaysInMonth();
+ sal_uInt16 nDaysInMonth = rDate.GetDaysInMonth();
// Entsprechender Monat gefunden
if ( (rPos.X() > nX) && (rPos.Y() < nYMonth) &&
@@ -650,8 +650,8 @@ USHORT Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const
long nDayY = nY+mnDaysOffY;
if ( rPos.Y() < nDayY )
return 0;
- USHORT nDayIndex = (USHORT)rDate.GetDayOfWeek();
- nDayIndex = (nDayIndex+(7-(USHORT)eStartDay)) % 7;
+ sal_uInt16 nDayIndex = (sal_uInt16)rDate.GetDayOfWeek();
+ nDayIndex = (nDayIndex+(7-(sal_uInt16)eStartDay)) % 7;
if ( (i == 0) && (j == 0) )
{
Date aTempDate = rDate;
@@ -692,9 +692,9 @@ USHORT Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const
}
if ( (i == mnLines-1) && (j == mnMonthPerLine-1) )
{
- USHORT nWeekDay = (USHORT)rDate.GetDayOfWeek();
- nWeekDay = (nWeekDay+(7-(USHORT)eStartDay)) % 7;
- USHORT nDayCount = 42-nDaysInMonth-nWeekDay;
+ sal_uInt16 nWeekDay = (sal_uInt16)rDate.GetDayOfWeek();
+ nWeekDay = (nWeekDay+(7-(sal_uInt16)eStartDay)) % 7;
+ sal_uInt16 nDayCount = 42-nDaysInMonth-nWeekDay;
Date aTempDate = rDate;
aTempDate += nDaysInMonth;
for ( nDay = 1; nDay <= nDayCount; nDay++ )
@@ -737,7 +737,7 @@ USHORT Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const
// -----------------------------------------------------------------------
static void ImplDrawSpinArrow( OutputDevice* pDev, const Rectangle& rRect,
- BOOL bPrev )
+ sal_Bool bPrev )
{
long i;
long n;
@@ -782,7 +782,7 @@ static void ImplDrawSpinArrow( OutputDevice* pDev, const Rectangle& rRect,
// -----------------------------------------------------------------------
-void Calendar::ImplDrawSpin( BOOL bDrawPrev, BOOL bDrawNext )
+void Calendar::ImplDrawSpin( sal_Bool bDrawPrev, sal_Bool bDrawNext )
{
if ( !bDrawPrev && !bDrawNext )
return;
@@ -796,7 +796,7 @@ void Calendar::ImplDrawSpin( BOOL bDrawPrev, BOOL bDrawNext )
aOutRect.Top() += 3;
aOutRect.Right() -= 3;
aOutRect.Bottom() -= 3;
- ImplDrawSpinArrow( this, aOutRect, TRUE );
+ ImplDrawSpinArrow( this, aOutRect, sal_True );
}
if ( bDrawNext )
{
@@ -805,33 +805,33 @@ void Calendar::ImplDrawSpin( BOOL bDrawPrev, BOOL bDrawNext )
aOutRect.Top() += 3;
aOutRect.Right() -= 3;
aOutRect.Bottom() -= 3;
- ImplDrawSpinArrow( this, aOutRect, FALSE );
+ ImplDrawSpinArrow( this, aOutRect, sal_False );
}
}
// -----------------------------------------------------------------------
void Calendar::ImplDrawDate( long nX, long nY,
- USHORT nDay, USHORT nMonth, USHORT nYear,
+ sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear,
DayOfWeek eDayOfWeek,
- BOOL bBack, BOOL bOther, ULONG nToday )
+ sal_Bool bBack, sal_Bool bOther, sal_uLong nToday )
{
ImplDateInfo* pDateInfo;
Color* pTextColor = NULL;
const String& rDay = *(mpDayText[nDay-1]);
Rectangle aDateRect( nX, nY, nX+mnDayWidth-1, nY+mnDayHeight-1 );
- BOOL bSel = FALSE;
- BOOL bFocus = FALSE;
+ sal_Bool bSel = sal_False;
+ sal_Bool bFocus = sal_False;
// Aktueller Tag
if ( (nDay == maCurDate.GetDay()) &&
(nMonth == maCurDate.GetMonth()) &&
(nYear == maCurDate.GetYear()) )
- bFocus = TRUE;
+ bFocus = sal_True;
if ( mpSelectTable )
{
if ( mpSelectTable->IsKeyValid( Date( nDay, nMonth, nYear ).GetDate() ) )
- bSel = TRUE;
+ bSel = sal_True;
}
// Dateinfo ermitteln
@@ -869,11 +869,11 @@ void Calendar::ImplDrawDate( long nX, long nY,
// Font ermitteln
Font aOldFont = GetFont();
- BOOL bBoldFont = FALSE;
+ sal_Bool bBoldFont = sal_False;
if ( (mnWinStyle & WB_BOLDTEXT) &&
pDateInfo && (pDateInfo->mnFlags & DIB_BOLD) )
{
- bBoldFont = TRUE;
+ bBoldFont = sal_True;
Font aFont = aOldFont;
if ( aFont.GetWeight() < WEIGHT_BOLD )
aFont.SetWeight( WEIGHT_BOLD );
@@ -965,7 +965,7 @@ void Calendar::ImplDrawDate( long nX, long nY,
// -----------------------------------------------------------------------
-void Calendar::ImplDraw( BOOL bPaint )
+void Calendar::ImplDraw( sal_Bool bPaint )
{
ImplFormat();
@@ -979,10 +979,10 @@ void Calendar::ImplDraw( BOOL bPaint )
long nDeltaY;
long nDayX;
long nDayY;
- ULONG nToday = Date().GetDate();
- USHORT nDay;
- USHORT nMonth;
- USHORT nYear;
+ sal_uLong nToday = Date().GetDate();
+ sal_uInt16 nDay;
+ sal_uInt16 nMonth;
+ sal_uInt16 nYear;
Date aDate = GetFirstMonth();
DayOfWeek eStartDay = ImplGetWeekStart();
@@ -1119,7 +1119,7 @@ void Calendar::ImplDraw( BOOL bPaint )
nDayX -= mnWeekWidth;
nDayY = nY+mnDaysOffY;
maCalendarWrapper.setGregorianDateTime( aDate);
- for ( USHORT nWeekCount = 0; nWeekCount < 6; nWeekCount++ )
+ for ( sal_uInt16 nWeekCount = 0; nWeekCount < 6; nWeekCount++ )
{
sal_Int16 nWeek = maCalendarWrapper.getValue( i18n::CalendarFieldIndex::WEEK_OF_YEAR);
String aWeekText( String::CreateFromInt32( nWeek));
@@ -1133,7 +1133,7 @@ void Calendar::ImplDraw( BOOL bPaint )
}
// Tage ausgeben
- USHORT nDaysInMonth = aDate.GetDaysInMonth();
+ sal_uInt16 nDaysInMonth = aDate.GetDaysInMonth();
nDayX = nX+mnDaysOffX;
nDayY = nY+mnDaysOffY;
if ( !bPaint )
@@ -1142,8 +1142,8 @@ void Calendar::ImplDraw( BOOL bPaint )
nDayX+(7*mnDayWidth)-1, nDayY+(6*mnDayHeight)-1 );
Erase( aClearRect );
}
- USHORT nDayIndex = (USHORT)aDate.GetDayOfWeek();
- nDayIndex = (nDayIndex+(7-(USHORT)eStartDay)) % 7;
+ sal_uInt16 nDayIndex = (sal_uInt16)aDate.GetDayOfWeek();
+ nDayIndex = (nDayIndex+(7-(sal_uInt16)eStartDay)) % 7;
if ( (i == 0) && (j == 0) )
{
Date aTempDate = aDate;
@@ -1153,15 +1153,15 @@ void Calendar::ImplDraw( BOOL bPaint )
nDeltaX = nDayX + (nDay*mnDayWidth);
ImplDrawDate( nDeltaX, nDayY, nDay+aTempDate.GetDay(),
aTempDate.GetMonth(), aTempDate.GetYear(),
- (DayOfWeek)((nDay+(USHORT)eStartDay)%7), FALSE, TRUE, nToday );
+ (DayOfWeek)((nDay+(sal_uInt16)eStartDay)%7), sal_False, sal_True, nToday );
}
}
for ( nDay = 1; nDay <= nDaysInMonth; nDay++ )
{
nDeltaX = nDayX + (nDayIndex*mnDayWidth);
ImplDrawDate( nDeltaX, nDayY, nDay, nMonth, nYear,
- (DayOfWeek)((nDayIndex+(USHORT)eStartDay)%7),
- FALSE, FALSE, nToday );
+ (DayOfWeek)((nDayIndex+(sal_uInt16)eStartDay)%7),
+ sal_False, sal_False, nToday );
if ( nDayIndex == 6 )
{
nDayIndex = 0;
@@ -1172,9 +1172,9 @@ void Calendar::ImplDraw( BOOL bPaint )
}
if ( (i == mnLines-1) && (j == mnMonthPerLine-1) )
{
- USHORT nWeekDay = (USHORT)aDate.GetDayOfWeek();
- nWeekDay = (nWeekDay+(7-(USHORT)eStartDay)) % 7;
- USHORT nDayCount = 42-nDaysInMonth-nWeekDay;
+ sal_uInt16 nWeekDay = (sal_uInt16)aDate.GetDayOfWeek();
+ nWeekDay = (nWeekDay+(7-(sal_uInt16)eStartDay)) % 7;
+ sal_uInt16 nDayCount = 42-nDaysInMonth-nWeekDay;
Date aTempDate = aDate;
aTempDate += nDaysInMonth;
for ( nDay = 1; nDay <= nDayCount; nDay++ )
@@ -1182,8 +1182,8 @@ void Calendar::ImplDraw( BOOL bPaint )
nDeltaX = nDayX + (nDayIndex*mnDayWidth);
ImplDrawDate( nDeltaX, nDayY, nDay,
aTempDate.GetMonth(), aTempDate.GetYear(),
- (DayOfWeek)((nDayIndex+(USHORT)eStartDay)%7),
- FALSE, TRUE, nToday );
+ (DayOfWeek)((nDayIndex+(sal_uInt16)eStartDay)%7),
+ sal_False, sal_True, nToday );
if ( nDayIndex == 6 )
{
nDayIndex = 0;
@@ -1215,10 +1215,10 @@ void Calendar::ImplUpdateDate( const Date& rDate )
Rectangle aDateRect( GetDateRect( rDate ) );
if ( !aDateRect.IsEmpty() )
{
- BOOL bOther = (rDate < GetFirstMonth()) || (rDate > GetLastMonth());
+ sal_Bool bOther = (rDate < GetFirstMonth()) || (rDate > GetLastMonth());
ImplDrawDate( aDateRect.Left(), aDateRect.Top(),
rDate.GetDay(), rDate.GetMonth(), rDate.GetYear(),
- rDate.GetDayOfWeek(), TRUE, bOther );
+ rDate.GetDayOfWeek(), sal_True, bOther );
}
}
}
@@ -1229,7 +1229,7 @@ void Calendar::ImplUpdateSelection( Table* pOld )
{
Table* pNew = mpSelectTable;
void* p;
- ULONG nKey;
+ sal_uLong nKey;
p = pOld->First();
while ( p )
@@ -1260,8 +1260,8 @@ void Calendar::ImplUpdateSelection( Table* pOld )
// -----------------------------------------------------------------------
-void Calendar::ImplMouseSelect( const Date& rDate, USHORT nHitTest,
- BOOL bMove, BOOL bExpand, BOOL bExtended )
+void Calendar::ImplMouseSelect( const Date& rDate, sal_uInt16 nHitTest,
+ sal_Bool bMove, sal_Bool bExpand, sal_Bool bExtended )
{
Table* pOldSel = new Table( *mpSelectTable );
Date aOldDate = maCurDate;
@@ -1297,35 +1297,35 @@ void Calendar::ImplMouseSelect( const Date& rDate, USHORT nHitTest,
{
if ( mbSelLeft )
{
- ImplCalendarSelectDateRange( mpSelectTable, Date( 1, 1, 0 ), aTempDate, FALSE );
- ImplCalendarSelectDateRange( mpSelectTable, maAnchorDate, Date( 31, 12, 9999 ), FALSE );
+ ImplCalendarSelectDateRange( mpSelectTable, Date( 1, 1, 0 ), aTempDate, sal_False );
+ ImplCalendarSelectDateRange( mpSelectTable, maAnchorDate, Date( 31, 12, 9999 ), sal_False );
}
else
{
- ImplCalendarSelectDateRange( mpSelectTable, Date( 1, 1, 0 ), maAnchorDate, FALSE );
- ImplCalendarSelectDateRange( mpSelectTable, aTempDate, Date( 31, 12, 9999 ), FALSE );
+ ImplCalendarSelectDateRange( mpSelectTable, Date( 1, 1, 0 ), maAnchorDate, sal_False );
+ ImplCalendarSelectDateRange( mpSelectTable, aTempDate, Date( 31, 12, 9999 ), sal_False );
}
}
- ImplCalendarSelectDateRange( mpSelectTable, aTempDate, maAnchorDate, TRUE );
+ ImplCalendarSelectDateRange( mpSelectTable, aTempDate, maAnchorDate, sal_True );
}
else if ( bExtended && !(mnWinStyle & WB_RANGESELECT) )
{
maAnchorDate = aTempDate;
if ( IsDateSelected( aTempDate ) )
{
- mbUnSel = TRUE;
- ImplCalendarSelectDate( mpSelectTable, aTempDate, FALSE );
+ mbUnSel = sal_True;
+ ImplCalendarSelectDate( mpSelectTable, aTempDate, sal_False );
}
else
{
- ImplCalendarSelectDate( mpSelectTable, aTempDate, TRUE );
+ ImplCalendarSelectDate( mpSelectTable, aTempDate, sal_True );
}
}
else
{
maAnchorDate = aTempDate;
ImplCalendarClearSelectDate( mpSelectTable );
- ImplCalendarSelectDate( mpSelectTable, aTempDate, TRUE );
+ ImplCalendarSelectDate( mpSelectTable, aTempDate, sal_True );
}
mpRestoreSelectTable = new Table( *mpSelectTable );
@@ -1334,9 +1334,9 @@ void Calendar::ImplMouseSelect( const Date& rDate, USHORT nHitTest,
else
{
if ( aTempDate < maCurDate )
- mbSelLeft = TRUE;
+ mbSelLeft = sal_True;
else
- mbSelLeft = FALSE;
+ mbSelLeft = sal_False;
if ( !(nHitTest & CALENDAR_HITTEST_DAY) )
aTempDate = maOldCurDate;
if ( !bMove )
@@ -1344,19 +1344,19 @@ void Calendar::ImplMouseSelect( const Date& rDate, USHORT nHitTest,
if ( aTempDate != maCurDate )
{
maCurDate = aTempDate;
- ImplCalendarSelectDate( mpSelectTable, aOldDate, FALSE );
- ImplCalendarSelectDate( mpSelectTable, maCurDate, TRUE );
+ ImplCalendarSelectDate( mpSelectTable, aOldDate, sal_False );
+ ImplCalendarSelectDate( mpSelectTable, maCurDate, sal_True );
}
}
- BOOL bNewSel = *pOldSel != *mpSelectTable;
+ sal_Bool bNewSel = *pOldSel != *mpSelectTable;
if ( (maCurDate != aOldDate) || bNewSel )
{
if ( bNewSel )
{
- mbInSelChange = TRUE;
+ mbInSelChange = sal_True;
SelectionChanging();
- mbInSelChange = FALSE;
+ mbInSelChange = sal_False;
}
HideFocus();
if ( bNewSel )
@@ -1372,7 +1372,7 @@ void Calendar::ImplMouseSelect( const Date& rDate, USHORT nHitTest,
// -----------------------------------------------------------------------
-void Calendar::ImplUpdate( BOOL bCalcNew )
+void Calendar::ImplUpdate( sal_Bool bCalcNew )
{
if ( IsReallyVisible() && IsUpdateMode() )
{
@@ -1382,8 +1382,8 @@ void Calendar::ImplUpdate( BOOL bCalcNew )
{
if ( mbDirect )
{
- mbFormat = TRUE;
- ImplDraw( FALSE );
+ mbFormat = sal_True;
+ ImplDraw( sal_False );
return;
}
else
@@ -1392,8 +1392,8 @@ void Calendar::ImplUpdate( BOOL bCalcNew )
}
if ( bCalcNew )
- mbCalc = TRUE;
- mbFormat = TRUE;
+ mbCalc = sal_True;
+ mbFormat = sal_True;
}
// -----------------------------------------------------------------------
@@ -1408,7 +1408,7 @@ void Calendar::ImplInvertDropPos()
// -----------------------------------------------------------------------
-void Calendar::ImplScroll( BOOL bPrev )
+void Calendar::ImplScroll( sal_Bool bPrev )
{
Date aNewFirstMonth = GetFirstMonth();
if ( bPrev )
@@ -1418,9 +1418,9 @@ void Calendar::ImplScroll( BOOL bPrev )
}
else
aNewFirstMonth += aNewFirstMonth.GetDaysInMonth();
- mbDirect = TRUE;
+ mbDirect = sal_True;
SetFirstDate( aNewFirstMonth );
- mbDirect = FALSE;
+ mbDirect = sal_False;
}
// -----------------------------------------------------------------------
@@ -1432,12 +1432,12 @@ void Calendar::ImplShowMenu( const Point& rPos, const Date& rDate )
Date aOldFirstDate = GetFirstMonth();
PopupMenu aPopupMenu;
PopupMenu* pYearPopupMenus[MENU_YEAR_COUNT];
- USHORT nMonthOff;
- USHORT nCurItemId;
- USHORT nYear = rDate.GetYear()-1;
- USHORT i;
- USHORT j;
- USHORT nYearIdCount = 1000;
+ sal_uInt16 nMonthOff;
+ sal_uInt16 nCurItemId;
+ sal_uInt16 nYear = rDate.GetYear()-1;
+ sal_uInt16 i;
+ sal_uInt16 j;
+ sal_uInt16 nYearIdCount = 1000;
nMonthOff = (rDate.GetYear()-aOldFirstDate.GetYear())*12;
if ( aOldFirstDate.GetMonth() < rDate.GetMonth() )
@@ -1458,9 +1458,9 @@ void Calendar::ImplShowMenu( const Point& rPos, const Date& rDate )
nYearIdCount += 1000;
}
- mbMenuDown = TRUE;
+ mbMenuDown = sal_True;
nCurItemId = aPopupMenu.Execute( this, rPos );
- mbMenuDown = FALSE;
+ mbMenuDown = sal_False;
// Menu zerstoeren
aPopupMenu.SetPopupMenu( 2, NULL );
@@ -1472,10 +1472,10 @@ void Calendar::ImplShowMenu( const Point& rPos, const Date& rDate )
if ( nCurItemId )
{
- USHORT nTempMonthOff = nMonthOff % 12;
- USHORT nTempYearOff = nMonthOff / 12;
- USHORT nNewMonth = nCurItemId % 1000;
- USHORT nNewYear = nYear+((nCurItemId-1000)/1000);
+ sal_uInt16 nTempMonthOff = nMonthOff % 12;
+ sal_uInt16 nTempYearOff = nMonthOff / 12;
+ sal_uInt16 nNewMonth = nCurItemId % 1000;
+ sal_uInt16 nNewYear = nYear+((nCurItemId-1000)/1000);
if ( nTempMonthOff < nNewMonth )
nNewMonth = nNewMonth - nTempMonthOff;
else
@@ -1490,10 +1490,10 @@ void Calendar::ImplShowMenu( const Point& rPos, const Date& rDate )
// -----------------------------------------------------------------------
-void Calendar::ImplTracking( const Point& rPos, BOOL bRepeat )
+void Calendar::ImplTracking( const Point& rPos, sal_Bool bRepeat )
{
Date aTempDate = maCurDate;
- USHORT nHitTest = ImplHitTest( rPos, aTempDate );
+ sal_uInt16 nHitTest = ImplHitTest( rPos, aTempDate );
if ( mbSpinDown )
{
@@ -1502,29 +1502,29 @@ void Calendar::ImplTracking( const Point& rPos, BOOL bRepeat )
if ( bRepeat && (mbPrevIn || mbNextIn) )
{
- mbScrollDateRange = TRUE;
+ mbScrollDateRange = sal_True;
ImplScroll( mbPrevIn );
- mbScrollDateRange = FALSE;
+ mbScrollDateRange = sal_False;
}
}
else
- ImplMouseSelect( aTempDate, nHitTest, TRUE, FALSE, FALSE );
+ ImplMouseSelect( aTempDate, nHitTest, sal_True, sal_False, sal_False );
}
// -----------------------------------------------------------------------
-void Calendar::ImplEndTracking( BOOL bCancel )
+void Calendar::ImplEndTracking( sal_Bool bCancel )
{
- BOOL bSelection = mbSelection;
- BOOL bSpinDown = mbSpinDown;
+ sal_Bool bSelection = mbSelection;
+ sal_Bool bSpinDown = mbSpinDown;
- mbDrag = FALSE;
- mbSelection = FALSE;
- mbMultiSelection = FALSE;
- mbUnSel = FALSE;
- mbSpinDown = FALSE;
- mbPrevIn = FALSE;
- mbNextIn = FALSE;
+ mbDrag = sal_False;
+ mbSelection = sal_False;
+ mbMultiSelection = sal_False;
+ mbUnSel = sal_False;
+ mbSpinDown = sal_False;
+ mbPrevIn = sal_False;
+ mbNextIn = sal_False;
if ( bCancel )
{
@@ -1553,15 +1553,15 @@ void Calendar::ImplEndTracking( BOOL bCancel )
if ( !bCancel )
{
// Feststellen, ob wir sichtbaren Bereich scrollen sollen
- ULONG nSelCount = mpSelectTable->Count();
+ sal_uLong nSelCount = mpSelectTable->Count();
if ( nSelCount )
{
Date aFirstSelDate( mpSelectTable->GetObjectKey( 0 ) );
Date aLastSelDate( mpSelectTable->GetObjectKey( nSelCount-1 ) );
if ( aLastSelDate < GetFirstMonth() )
- ImplScroll( TRUE );
+ ImplScroll( sal_True );
else if ( GetLastMonth() < aFirstSelDate )
- ImplScroll( FALSE );
+ ImplScroll( sal_False );
}
}
@@ -1583,13 +1583,13 @@ void Calendar::ImplEndTracking( BOOL bCancel )
IMPL_STATIC_LINK( Calendar, ScrollHdl, Timer*, EMPTYARG )
{
- BOOL bPrevIn = (pThis->mnDragScrollHitTest & CALENDAR_HITTEST_PREV) != 0;
- BOOL bNextIn = (pThis->mnDragScrollHitTest & CALENDAR_HITTEST_NEXT) != 0;
+ sal_Bool bPrevIn = (pThis->mnDragScrollHitTest & CALENDAR_HITTEST_PREV) != 0;
+ sal_Bool bNextIn = (pThis->mnDragScrollHitTest & CALENDAR_HITTEST_NEXT) != 0;
if( bNextIn || bPrevIn )
{
- pThis->mbScrollDateRange = TRUE;
+ pThis->mbScrollDateRange = sal_True;
pThis->ImplScroll( bPrevIn );
- pThis->mbScrollDateRange = FALSE;
+ pThis->mbScrollDateRange = sal_False;
}
return 0;
}
@@ -1601,7 +1601,7 @@ void Calendar::MouseButtonDown( const MouseEvent& rMEvt )
if ( rMEvt.IsLeft() && !mbMenuDown )
{
Date aTempDate = maCurDate;
- USHORT nHitTest = ImplHitTest( rMEvt.GetPosPixel(), aTempDate );
+ sal_uInt16 nHitTest = ImplHitTest( rMEvt.GetPosPixel(), aTempDate );
if ( nHitTest )
{
if ( nHitTest & CALENDAR_HITTEST_MONTHTITLE )
@@ -1614,10 +1614,10 @@ void Calendar::MouseButtonDown( const MouseEvent& rMEvt )
mbNextIn = (nHitTest & CALENDAR_HITTEST_NEXT) != 0;
if ( mbPrevIn || mbNextIn )
{
- mbSpinDown = TRUE;
- mbScrollDateRange = TRUE;
+ mbSpinDown = sal_True;
+ mbScrollDateRange = sal_True;
ImplScroll( mbPrevIn );
- mbScrollDateRange = FALSE;
+ mbScrollDateRange = sal_False;
// Hier muss BUTTONREPEAT stehen, also nicht wieder
// auf SCROLLREPEAT aendern, sondern mit TH abklaeren,
// warum es evtl. anders sein sollte (71775)
@@ -1636,16 +1636,16 @@ void Calendar::MouseButtonDown( const MouseEvent& rMEvt )
if ( !mbSelection )
{
- mbDrag = TRUE;
+ mbDrag = sal_True;
StartTracking();
}
mbMultiSelection = (mnWinStyle & (WB_MULTISELECT | WB_RANGESELECT)) != 0;
if ( (nHitTest & CALENDAR_HITTEST_DAY) && mbMultiSelection )
- mbWeekSel = TRUE;
+ mbWeekSel = sal_True;
else
- mbWeekSel = FALSE;
- ImplMouseSelect( aTempDate, nHitTest, FALSE, rMEvt.IsShift(), rMEvt.IsMod1() );
+ mbWeekSel = sal_False;
+ ImplMouseSelect( aTempDate, nHitTest, sal_False, rMEvt.IsShift(), rMEvt.IsMod1() );
}
}
}
@@ -1662,7 +1662,7 @@ void Calendar::MouseButtonDown( const MouseEvent& rMEvt )
void Calendar::MouseButtonUp( const MouseEvent& rMEvt )
{
if ( rMEvt.IsLeft() && mbSelection )
- ImplEndTracking( FALSE );
+ ImplEndTracking( sal_False );
else
Control::MouseButtonUp( rMEvt );
}
@@ -1672,7 +1672,7 @@ void Calendar::MouseButtonUp( const MouseEvent& rMEvt )
void Calendar::MouseMove( const MouseEvent& rMEvt )
{
if ( mbSelection && rMEvt.GetButtons() )
- ImplTracking( rMEvt.GetPosPixel(), FALSE );
+ ImplTracking( rMEvt.GetPosPixel(), sal_False );
else
Control::MouseMove( rMEvt );
}
@@ -1694,9 +1694,9 @@ void Calendar::Tracking( const TrackingEvent& rTEvt )
void Calendar::KeyInput( const KeyEvent& rKEvt )
{
Date aNewDate = maCurDate;
- BOOL bMultiSel = (mnWinStyle & (WB_RANGESELECT | WB_MULTISELECT)) != 0;
- BOOL bExpand = rKEvt.GetKeyCode().IsShift();
- BOOL bExtended = rKEvt.GetKeyCode().IsMod1();
+ sal_Bool bMultiSel = (mnWinStyle & (WB_RANGESELECT | WB_MULTISELECT)) != 0;
+ sal_Bool bExpand = rKEvt.GetKeyCode().IsShift();
+ sal_Bool bExtended = rKEvt.GetKeyCode().IsMod1();
switch ( rKEvt.GetKeyCode().GetCode() )
{
@@ -1741,13 +1741,13 @@ void Calendar::KeyInput( const KeyEvent& rKEvt )
{
if ( !bExpand )
{
- BOOL bDateSel = IsDateSelected( maCurDate );
+ sal_Bool bDateSel = IsDateSelected( maCurDate );
SelectDate( maCurDate, !bDateSel );
- mbSelLeft = FALSE;
+ mbSelLeft = sal_False;
SelectionChanging();
- mbTravelSelect = TRUE;
+ mbTravelSelect = sal_True;
Select();
- mbTravelSelect = FALSE;
+ mbTravelSelect = sal_False;
}
}
else
@@ -1770,23 +1770,23 @@ void Calendar::KeyInput( const KeyEvent& rKEvt )
{
if ( mbSelLeft )
{
- ImplCalendarSelectDateRange( mpSelectTable, Date( 1, 1, 0 ), aNewDate, FALSE );
- ImplCalendarSelectDateRange( mpSelectTable, maAnchorDate, Date( 31, 12, 9999 ), FALSE );
+ ImplCalendarSelectDateRange( mpSelectTable, Date( 1, 1, 0 ), aNewDate, sal_False );
+ ImplCalendarSelectDateRange( mpSelectTable, maAnchorDate, Date( 31, 12, 9999 ), sal_False );
}
else
{
- ImplCalendarSelectDateRange( mpSelectTable, Date( 1, 1, 0 ), maAnchorDate, FALSE );
- ImplCalendarSelectDateRange( mpSelectTable, aNewDate, Date( 31, 12, 9999 ), FALSE );
+ ImplCalendarSelectDateRange( mpSelectTable, Date( 1, 1, 0 ), maAnchorDate, sal_False );
+ ImplCalendarSelectDateRange( mpSelectTable, aNewDate, Date( 31, 12, 9999 ), sal_False );
}
}
- ImplCalendarSelectDateRange( mpSelectTable, aNewDate, maAnchorDate, TRUE );
- mbDirect = TRUE;
+ ImplCalendarSelectDateRange( mpSelectTable, aNewDate, maAnchorDate, sal_True );
+ mbDirect = sal_True;
SetCurDate( aNewDate );
- mbDirect = FALSE;
+ mbDirect = sal_False;
maAnchorDate = aOldAnchorDate;
- mbInSelChange = TRUE;
+ mbInSelChange = sal_True;
SelectionChanging();
- mbInSelChange = FALSE;
+ mbInSelChange = sal_False;
ImplUpdateSelection( pOldSel );
delete pOldSel;
}
@@ -1795,15 +1795,15 @@ void Calendar::KeyInput( const KeyEvent& rKEvt )
if ( mnWinStyle & WB_RANGESELECT )
{
SetNoSelection();
- SelectDate( aNewDate, TRUE );
+ SelectDate( aNewDate, sal_True );
}
- mbDirect = TRUE;
+ mbDirect = sal_True;
SetCurDate( aNewDate );
- mbDirect = FALSE;
+ mbDirect = sal_False;
}
- mbTravelSelect = TRUE;
+ mbTravelSelect = sal_True;
Select();
- mbTravelSelect = FALSE;
+ mbTravelSelect = sal_False;
}
}
@@ -1811,7 +1811,7 @@ void Calendar::KeyInput( const KeyEvent& rKEvt )
void Calendar::Paint( const Rectangle& )
{
- ImplDraw( TRUE );
+ ImplDraw( sal_True );
}
// -----------------------------------------------------------------------
@@ -1834,7 +1834,7 @@ void Calendar::LoseFocus()
void Calendar::Resize()
{
- ImplUpdate( TRUE );
+ ImplUpdate( sal_True );
Control::Resize();
}
@@ -1880,8 +1880,8 @@ void Calendar::RequestHelp( const HelpEvent& rHEvt )
if ( rHEvt.GetMode() & HELPMODE_QUICK )
{
maCalendarWrapper.setGregorianDateTime( aDate);
- USHORT nWeek = (USHORT) maCalendarWrapper.getValue( i18n::CalendarFieldIndex::WEEK_OF_YEAR);
- USHORT nMonth = aDate.GetMonth();
+ sal_uInt16 nWeek = (sal_uInt16) maCalendarWrapper.getValue( i18n::CalendarFieldIndex::WEEK_OF_YEAR);
+ sal_uInt16 nMonth = aDate.GetMonth();
XubString aStr( maDayText );
aStr.AppendAscii( ": " );
aStr.Append( XubString::CreateFromInt32( aDate.GetDayOfYear() ) );
@@ -1918,7 +1918,7 @@ void Calendar::Command( const CommandEvent& rCEvt )
if ( !mbSelection && rCEvt.IsMouseEvent() )
{
Date aTempDate = maCurDate;
- USHORT nHitTest = ImplHitTest( rCEvt.GetMousePosPixel(), aTempDate );
+ sal_uInt16 nHitTest = ImplHitTest( rCEvt.GetMousePosPixel(), aTempDate );
if ( nHitTest & CALENDAR_HITTEST_MONTHTITLE )
{
ImplShowMenu( rCEvt.GetMousePosPixel(), aTempDate );
@@ -1936,7 +1936,7 @@ void Calendar::Command( const CommandEvent& rCEvt )
{
while ( nNotchDelta < 0 )
{
- ImplScroll( TRUE );
+ ImplScroll( sal_True );
nNotchDelta++;
}
}
@@ -1944,7 +1944,7 @@ void Calendar::Command( const CommandEvent& rCEvt )
{
while ( nNotchDelta > 0 )
{
- ImplScroll( FALSE );
+ ImplScroll( sal_False );
nNotchDelta--;
}
}
@@ -2019,7 +2019,7 @@ void Calendar::Select()
// -----------------------------------------------------------------------
-void Calendar::SelectDate( const Date& rDate, BOOL bSelect )
+void Calendar::SelectDate( const Date& rDate, sal_Bool bSelect )
{
if ( !rDate.IsValid() )
return;
@@ -2043,7 +2043,7 @@ void Calendar::SelectDate( const Date& rDate, BOOL bSelect )
// -----------------------------------------------------------------------
void Calendar::SelectDateRange( const Date& rStartDate, const Date& rEndDate,
- BOOL bSelect )
+ sal_Bool bSelect )
{
if ( !rStartDate.IsValid() || !rEndDate.IsValid() )
return;
@@ -2086,21 +2086,21 @@ void Calendar::SetNoSelection()
// -----------------------------------------------------------------------
-BOOL Calendar::IsDateSelected( const Date& rDate ) const
+sal_Bool Calendar::IsDateSelected( const Date& rDate ) const
{
return mpSelectTable->IsKeyValid( rDate.GetDate() );
}
// -----------------------------------------------------------------------
-ULONG Calendar::GetSelectDateCount() const
+sal_uLong Calendar::GetSelectDateCount() const
{
return mpSelectTable->Count();
}
// -----------------------------------------------------------------------
-Date Calendar::GetSelectDate( ULONG nIndex ) const
+Date Calendar::GetSelectDate( sal_uLong nIndex ) const
{
if ( nIndex < mpSelectTable->Count() )
return Date( mpSelectTable->GetObjectKey( nIndex ) );
@@ -2120,18 +2120,18 @@ void Calendar::SetCurDate( const Date& rNewDate )
if ( maCurDate != rNewDate )
{
- BOOL bUpdate = IsVisible() && IsUpdateMode();
+ sal_Bool bUpdate = IsVisible() && IsUpdateMode();
Date aOldDate = maCurDate;
maCurDate = rNewDate;
maAnchorDate = maCurDate;
if ( !(mnWinStyle & (WB_RANGESELECT | WB_MULTISELECT)) )
{
- ImplCalendarSelectDate( mpSelectTable, aOldDate, FALSE );
- ImplCalendarSelectDate( mpSelectTable, maCurDate, TRUE );
+ ImplCalendarSelectDate( mpSelectTable, aOldDate, sal_False );
+ ImplCalendarSelectDate( mpSelectTable, maCurDate, sal_True );
}
else if ( !HasFocus() )
- bUpdate = FALSE;
+ bUpdate = sal_False;
// Aktuelles Datum noch in den sichtbaren Bereich verschieben
if ( mbFormat || (maCurDate < GetFirstMonth()) )
@@ -2176,7 +2176,7 @@ void Calendar::SetFirstDate( const Date& rNewFirstDate )
if ( maFirstDate != rNewFirstDate )
{
maFirstDate = Date( 1, rNewFirstDate.GetMonth(), rNewFirstDate.GetYear() );
- mbDropPos = FALSE;
+ mbDropPos = sal_False;
ImplUpdate();
}
}
@@ -2201,8 +2201,8 @@ Date Calendar::GetFirstMonth() const
Date Calendar::GetLastMonth() const
{
Date aDate = GetFirstMonth();
- USHORT nMonthCount = GetMonthCount();
- for ( USHORT i = 0; i < nMonthCount; i++ )
+ sal_uInt16 nMonthCount = GetMonthCount();
+ for ( sal_uInt16 i = 0; i < nMonthCount; i++ )
aDate += aDate.GetDaysInMonth();
aDate--;
return aDate;
@@ -2210,39 +2210,39 @@ Date Calendar::GetLastMonth() const
// -----------------------------------------------------------------------
-USHORT Calendar::GetMonthCount() const
+sal_uInt16 Calendar::GetMonthCount() const
{
if ( mbFormat )
return 1;
else
- return (USHORT)(mnMonthPerLine*mnLines);
+ return (sal_uInt16)(mnMonthPerLine*mnLines);
}
// -----------------------------------------------------------------------
-BOOL Calendar::GetDropDate( Date& rDate ) const
+sal_Bool Calendar::GetDropDate( Date& rDate ) const
{
if( mbDropPos )
{
rDate = maDropDate;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL Calendar::GetDate( const Point& rPos, Date& rDate ) const
+sal_Bool Calendar::GetDate( const Point& rPos, Date& rDate ) const
{
Date aDate = maCurDate;
- USHORT nHitTest = ImplHitTest( rPos, aDate );
+ sal_uInt16 nHitTest = ImplHitTest( rPos, aDate );
if ( nHitTest & CALENDAR_HITTEST_DAY )
{
rDate = aDate;
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -2256,8 +2256,8 @@ Rectangle Calendar::GetDateRect( const Date& rDate ) const
long nX;
long nY;
- ULONG nDaysOff;
- USHORT nDayIndex;
+ sal_uLong nDaysOff;
+ sal_uInt16 nDayIndex;
Date aDate = GetFirstMonth();
if ( rDate < aDate )
@@ -2274,13 +2274,13 @@ Rectangle Calendar::GetDateRect( const Date& rDate ) const
Date aLastDate = GetLastMonth();
if ( rDate > aLastDate )
{
- USHORT nWeekDay = (USHORT)aLastDate.GetDayOfWeek();
- nWeekDay = (nWeekDay+(7-(USHORT)ImplGetWeekStart())) % 7;
+ sal_uInt16 nWeekDay = (sal_uInt16)aLastDate.GetDayOfWeek();
+ nWeekDay = (nWeekDay+(7-(sal_uInt16)ImplGetWeekStart())) % 7;
aLastDate -= nWeekDay;
aRect = GetDateRect( aLastDate );
nDaysOff = rDate-aLastDate;
nDayIndex = 0;
- for ( USHORT i = 0; i <= nDaysOff; i++ )
+ for ( sal_uInt16 i = 0; i <= nDaysOff; i++ )
{
if ( aLastDate == rDate )
{
@@ -2307,7 +2307,7 @@ Rectangle Calendar::GetDateRect( const Date& rDate ) const
nX = 0;
for ( long j = 0; j < mnMonthPerLine; j++ )
{
- USHORT nDaysInMonth = aDate.GetDaysInMonth();
+ sal_uInt16 nDaysInMonth = aDate.GetDaysInMonth();
// Monat gerufen
if ( (aDate.GetMonth() == rDate.GetMonth()) &&
@@ -2315,9 +2315,9 @@ Rectangle Calendar::GetDateRect( const Date& rDate ) const
{
long nDayX = nX+mnDaysOffX;
long nDayY = nY+mnDaysOffY;
- nDayIndex = (USHORT)aDate.GetDayOfWeek();
- nDayIndex = (nDayIndex+(7-(USHORT)ImplGetWeekStart())) % 7;
- for ( USHORT nDay = 1; nDay <= nDaysInMonth; nDay++ )
+ nDayIndex = (sal_uInt16)aDate.GetDayOfWeek();
+ nDayIndex = (nDayIndex+(7-(sal_uInt16)ImplGetWeekStart())) % 7;
+ for ( sal_uInt16 nDay = 1; nDay <= nDaysInMonth; nDay++ )
{
if ( nDay == rDate.GetDay() )
{
@@ -2384,13 +2384,13 @@ void Calendar::SetSundayColor( const Color& rColor )
void Calendar::AddDateInfo( const Date& rDate, const String& rText,
const Color* pTextColor, const Color* pFrameColor,
- USHORT nFlags )
+ sal_uInt16 nFlags )
{
if ( !mpDateTable )
mpDateTable = new ImplDateTable( 256, 256 );
- BOOL bChanged = FALSE;
- ULONG nKey = rDate.GetDate();
+ sal_Bool bChanged = sal_False;
+ sal_uLong nKey = rDate.GetDate();
ImplDateInfo* pDateInfo = mpDateTable->Get( nKey );
if ( pDateInfo )
pDateInfo->maText = rText;
@@ -2406,13 +2406,13 @@ void Calendar::AddDateInfo( const Date& rDate, const String& rText,
if ( *(pDateInfo->mpTextColor) != *pTextColor )
{
*(pDateInfo->mpTextColor) = *pTextColor;
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
else
{
pDateInfo->mpTextColor = new Color( *pTextColor );
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
else
@@ -2421,7 +2421,7 @@ void Calendar::AddDateInfo( const Date& rDate, const String& rText,
{
delete pDateInfo->mpTextColor;
pDateInfo->mpTextColor = NULL;
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
if ( pFrameColor )
@@ -2431,13 +2431,13 @@ void Calendar::AddDateInfo( const Date& rDate, const String& rText,
if ( *(pDateInfo->mpFrameColor) != *pFrameColor )
{
*(pDateInfo->mpFrameColor) = *pFrameColor;
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
else
{
pDateInfo->mpFrameColor = new Color( *pFrameColor );
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
else
@@ -2446,13 +2446,13 @@ void Calendar::AddDateInfo( const Date& rDate, const String& rText,
{
delete pDateInfo->mpFrameColor;
pDateInfo->mpFrameColor = NULL;
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
if ( pDateInfo->mnFlags != nFlags )
{
pDateInfo->mnFlags = nFlags;
- bChanged = TRUE;
+ bChanged = sal_True;
}
if ( bChanged )
@@ -2483,7 +2483,7 @@ void Calendar::ClearDateInfo()
ImplDateInfo* pDateInfo = mpDateTable->First();
while ( pDateInfo )
{
- ULONG nKey = mpDateTable->GetCurKey();
+ sal_uLong nKey = mpDateTable->GetCurKey();
mpDateTable->Remove( nKey );
Date aDate( nKey );
ImplUpdateDate( aDate );
@@ -2502,7 +2502,7 @@ XubString Calendar::GetDateInfoText( const Date& rDate )
XubString aRet;
if ( mpDateTable )
{
- ULONG nKey = rDate.GetDate();
+ sal_uLong nKey = rDate.GetDate();
ImplDateInfo* pDateInfo = mpDateTable->Get( nKey );
if ( pDateInfo )
aRet = pDateInfo->maText;
@@ -2512,7 +2512,7 @@ XubString Calendar::GetDateInfoText( const Date& rDate )
// -----------------------------------------------------------------------
-BOOL Calendar::ShowDropPos( const Point& rPos, Date& rDate )
+sal_Bool Calendar::ShowDropPos( const Point& rPos, Date& rDate )
{
Date aTempDate = maCurDate;
mnDragScrollHitTest = ImplHitTest( rPos, aTempDate );
@@ -2534,12 +2534,12 @@ BOOL Calendar::ShowDropPos( const Point& rPos, Date& rDate )
if( mbDropPos )
ImplInvertDropPos();
maDropDate = aTempDate;
- mbDropPos = TRUE;
+ mbDropPos = sal_True;
ImplInvertDropPos();
}
rDate = maDropDate;
- return TRUE;
+ return sal_True;
}
}
}
@@ -2547,7 +2547,7 @@ BOOL Calendar::ShowDropPos( const Point& rPos, Date& rDate )
maDragScrollTimer.Stop();
HideDropPos();
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -2557,7 +2557,7 @@ void Calendar::HideDropPos()
if ( mbDropPos )
{
ImplInvertDropPos();
- mbDropPos = FALSE;
+ mbDropPos = sal_False;
}
}
@@ -2570,7 +2570,7 @@ void Calendar::StartSelection()
maOldCurDate = maCurDate;
mpOldSelectTable = new Table( *mpSelectTable );
- mbSelection = TRUE;
+ mbSelection = sal_True;
}
// -----------------------------------------------------------------------
@@ -2582,12 +2582,12 @@ void Calendar::EndSelection()
if ( !mbSelection )
ReleaseMouse();
- mbDrag = FALSE;
- mbSelection = FALSE;
- mbMultiSelection = FALSE;
- mbSpinDown = FALSE;
- mbPrevIn = FALSE;
- mbNextIn = FALSE;
+ mbDrag = sal_False;
+ mbSelection = sal_False;
+ mbMultiSelection = sal_False;
+ mbSpinDown = sal_False;
+ mbPrevIn = sal_False;
+ mbNextIn = sal_False;
}
}
@@ -2668,8 +2668,8 @@ public:
void SetCalendar( Calendar* pCalendar )
{ mpCalendar = pCalendar; }
- PushButton* EnableTodayBtn( BOOL bEnable );
- PushButton* EnableNoneBtn( BOOL bEnable );
+ PushButton* EnableTodayBtn( sal_Bool bEnable );
+ PushButton* EnableNoneBtn( sal_Bool bEnable );
void ArrangeButtons();
long Notify( NotifyEvent& rNEvt );
@@ -2697,7 +2697,7 @@ ImplCFieldFloatWin::~ImplCFieldFloatWin()
// -----------------------------------------------------------------------
-PushButton* ImplCFieldFloatWin::EnableTodayBtn( BOOL bEnable )
+PushButton* ImplCFieldFloatWin::EnableTodayBtn( sal_Bool bEnable )
{
if ( bEnable )
{
@@ -2729,7 +2729,7 @@ PushButton* ImplCFieldFloatWin::EnableTodayBtn( BOOL bEnable )
// -----------------------------------------------------------------------
-PushButton* ImplCFieldFloatWin::EnableNoneBtn( BOOL bEnable )
+PushButton* ImplCFieldFloatWin::EnableNoneBtn( sal_Bool bEnable )
{
if ( bEnable )
{
@@ -2848,8 +2848,8 @@ CalendarField::CalendarField( Window* pParent, WinBits nWinStyle ) :
mpFloatWin = NULL;
mpCalendar = NULL;
mnCalendarStyle = 0;
- mbToday = FALSE;
- mbNone = FALSE;
+ mbToday = sal_False;
+ mbNone = sal_False;
}
// -----------------------------------------------------------------------
@@ -2861,8 +2861,8 @@ CalendarField::CalendarField( Window* pParent, const ResId& rResId ) :
mpFloatWin = NULL;
mpCalendar = NULL;
mnCalendarStyle = 0;
- mbToday = FALSE;
- mbNone = FALSE;
+ mbToday = sal_False;
+ mbNone = sal_False;
}
// -----------------------------------------------------------------------
@@ -2948,7 +2948,7 @@ void CalendarField::Select()
// -----------------------------------------------------------------------
-BOOL CalendarField::ShowDropDown( BOOL bShow )
+sal_Bool CalendarField::ShowDropDown( sal_Bool bShow )
{
if ( bShow )
{
@@ -2993,7 +2993,7 @@ BOOL CalendarField::ShowDropDown( BOOL bShow )
mpCalendar->EndSelection();
EndDropDown();
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 91c446a880a9..219b5428edeb 100755
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -59,10 +59,10 @@ static sal_Unicode aImplStarSymbolText[] = {0x2706,0x2704,0x270D,0xE033,0x2211,0
struct ImplColorListData
{
Color aColor;
- BOOL bColor;
+ sal_Bool bColor;
- ImplColorListData() : aColor( COL_BLACK ) { bColor = FALSE; }
- ImplColorListData( const Color& rColor ) : aColor( rColor ) { bColor = TRUE; }
+ ImplColorListData() : aColor( COL_BLACK ) { bColor = sal_False; }
+ ImplColorListData( const Color& rColor ) : aColor( rColor ) { bColor = sal_True; }
};
DECLARE_LIST( ImpColorList, ImplColorListData* )
@@ -76,7 +76,7 @@ void ColorListBox::ImplInit()
aImageSize.Height() = GetTextHeight();
aImageSize.Height() -= 2;
- EnableUserDraw( TRUE );
+ EnableUserDraw( sal_True );
SetUserItemSize( aImageSize );
}
@@ -84,7 +84,7 @@ void ColorListBox::ImplInit()
void ColorListBox::ImplDestroyColorEntries()
{
- for ( USHORT n = (USHORT) pColorList->Count(); n; )
+ for ( sal_uInt16 n = (sal_uInt16) pColorList->Count(); n; )
{
ImplColorListData* pData = pColorList->GetObject( --n );
delete pData;
@@ -118,7 +118,7 @@ ColorListBox::~ColorListBox()
// -----------------------------------------------------------------------
-USHORT ColorListBox::InsertEntry( const XubString& rStr, USHORT nPos )
+sal_uInt16 ColorListBox::InsertEntry( const XubString& rStr, sal_uInt16 nPos )
{
nPos = ListBox::InsertEntry( rStr, nPos );
if ( nPos != LISTBOX_ERROR )
@@ -131,8 +131,8 @@ USHORT ColorListBox::InsertEntry( const XubString& rStr, USHORT nPos )
// -----------------------------------------------------------------------
-USHORT ColorListBox::InsertEntry( const Color& rColor, const XubString& rStr,
- USHORT nPos )
+sal_uInt16 ColorListBox::InsertEntry( const Color& rColor, const XubString& rStr,
+ sal_uInt16 nPos )
{
nPos = ListBox::InsertEntry( rStr, nPos );
if ( nPos != LISTBOX_ERROR )
@@ -153,7 +153,7 @@ void ColorListBox::InsertAutomaticEntry()
// -----------------------------------------------------------------------
-void ColorListBox::RemoveEntry( USHORT nPos )
+void ColorListBox::RemoveEntry( sal_uInt16 nPos )
{
ListBox::RemoveEntry( nPos );
delete pColorList->Remove( nPos );
@@ -175,11 +175,11 @@ void ColorListBox::CopyEntries( const ColorListBox& rBox )
ImplDestroyColorEntries();
// Daten kopieren
- USHORT nCount = (USHORT) rBox.pColorList->Count();
- for ( USHORT n = 0; n < nCount; n++ )
+ sal_uInt16 nCount = (sal_uInt16) rBox.pColorList->Count();
+ for ( sal_uInt16 n = 0; n < nCount; n++ )
{
ImplColorListData* pData = rBox.pColorList->GetObject( n );
- USHORT nPos = InsertEntry( rBox.GetEntry( n ), LISTBOX_APPEND );
+ sal_uInt16 nPos = InsertEntry( rBox.GetEntry( n ), LISTBOX_APPEND );
if ( nPos != LISTBOX_ERROR )
pColorList->Insert( new ImplColorListData( *pData ), nPos );
}
@@ -187,9 +187,9 @@ void ColorListBox::CopyEntries( const ColorListBox& rBox )
// -----------------------------------------------------------------------
-USHORT ColorListBox::GetEntryPos( const Color& rColor ) const
+sal_uInt16 ColorListBox::GetEntryPos( const Color& rColor ) const
{
- for( USHORT n = (USHORT) pColorList->Count(); n; )
+ for( sal_uInt16 n = (sal_uInt16) pColorList->Count(); n; )
{
ImplColorListData* pData = pColorList->GetObject( --n );
if ( pData->bColor && ( pData->aColor == rColor ) )
@@ -200,7 +200,7 @@ USHORT ColorListBox::GetEntryPos( const Color& rColor ) const
// -----------------------------------------------------------------------
-Color ColorListBox::GetEntryColor( USHORT nPos ) const
+Color ColorListBox::GetEntryColor( sal_uInt16 nPos ) const
{
Color aColor;
ImplColorListData* pData = pColorList->GetObject( nPos );
@@ -226,13 +226,13 @@ void ColorListBox::UserDraw( const UserDrawEvent& rUDEvt )
rUDEvt.GetDevice()->SetLineColor( rUDEvt.GetDevice()->GetTextColor() );
rUDEvt.GetDevice()->DrawRect( Rectangle( aPos, aImageSize ) );
rUDEvt.GetDevice()->Pop();
- ListBox::DrawEntry( rUDEvt, FALSE, TRUE, FALSE );
+ ListBox::DrawEntry( rUDEvt, sal_False, sal_True, sal_False );
}
else
- ListBox::DrawEntry( rUDEvt, FALSE, TRUE, TRUE );
+ ListBox::DrawEntry( rUDEvt, sal_False, sal_True, sal_True );
}
else
- ListBox::DrawEntry( rUDEvt, TRUE, TRUE, FALSE );
+ ListBox::DrawEntry( rUDEvt, sal_True, sal_True, sal_False );
}
// =======================================================================
@@ -385,8 +385,8 @@ LineListBox::LineListBox( Window* pParent, const ResId& rResId ) :
LineListBox::~LineListBox()
{
- ULONG n = 0;
- ULONG nCount = pLineList->Count();
+ sal_uLong n = 0;
+ sal_uLong nCount = pLineList->Count();
while ( n < nCount )
{
ImpLineListData* pData = pLineList->GetObject( n );
@@ -399,7 +399,7 @@ LineListBox::~LineListBox()
// -----------------------------------------------------------------------
-USHORT LineListBox::InsertEntry( const XubString& rStr, USHORT nPos )
+sal_uInt16 LineListBox::InsertEntry( const XubString& rStr, sal_uInt16 nPos )
{
nPos = ListBox::InsertEntry( rStr, nPos );
if ( nPos != LISTBOX_ERROR )
@@ -409,8 +409,8 @@ USHORT LineListBox::InsertEntry( const XubString& rStr, USHORT nPos )
// -----------------------------------------------------------------------
-USHORT LineListBox::InsertEntry( long nLine1, long nLine2, long nDistance,
- USHORT nPos )
+sal_uInt16 LineListBox::InsertEntry( long nLine1, long nLine2, long nDistance,
+ sal_uInt16 nPos )
{
XubString aStr;
Bitmap aBmp;
@@ -430,7 +430,7 @@ USHORT LineListBox::InsertEntry( long nLine1, long nLine2, long nDistance,
// -----------------------------------------------------------------------
-void LineListBox::RemoveEntry( USHORT nPos )
+void LineListBox::RemoveEntry( sal_uInt16 nPos )
{
ListBox::RemoveEntry( nPos );
ImpLineListData* pData = pLineList->Remove( nPos );
@@ -442,8 +442,8 @@ void LineListBox::RemoveEntry( USHORT nPos )
void LineListBox::Clear()
{
- ULONG n = 0;
- ULONG nCount = pLineList->Count();
+ sal_uLong n = 0;
+ sal_uLong nCount = pLineList->Count();
while ( n < nCount )
{
ImpLineListData* pData = pLineList->GetObject( n );
@@ -458,11 +458,11 @@ void LineListBox::Clear()
// -----------------------------------------------------------------------
-USHORT LineListBox::GetEntryPos( long nLine1, long nLine2,
+sal_uInt16 LineListBox::GetEntryPos( long nLine1, long nLine2,
long nDistance ) const
{
- ULONG n = 0;
- ULONG nCount = pLineList->Count();
+ sal_uLong n = 0;
+ sal_uLong nCount = pLineList->Count();
while ( n < nCount )
{
ImpLineListData* pData = pLineList->GetObject( n );
@@ -471,7 +471,7 @@ USHORT LineListBox::GetEntryPos( long nLine1, long nLine2,
if ( (pData->nLine1 == nLine1) &&
(pData->nLine2 == nLine2) &&
(pData->nDistance == nDistance) )
- return (USHORT)n;
+ return (sal_uInt16)n;
}
n++;
@@ -482,7 +482,7 @@ USHORT LineListBox::GetEntryPos( long nLine1, long nLine2,
// -----------------------------------------------------------------------
-long LineListBox::GetEntryLine1( USHORT nPos ) const
+long LineListBox::GetEntryLine1( sal_uInt16 nPos ) const
{
ImpLineListData* pData = pLineList->GetObject( nPos );
if ( pData )
@@ -493,7 +493,7 @@ long LineListBox::GetEntryLine1( USHORT nPos ) const
// -----------------------------------------------------------------------
-long LineListBox::GetEntryLine2( USHORT nPos ) const
+long LineListBox::GetEntryLine2( sal_uInt16 nPos ) const
{
ImpLineListData* pData = pLineList->GetObject( nPos );
if ( pData )
@@ -504,7 +504,7 @@ long LineListBox::GetEntryLine2( USHORT nPos ) const
// -----------------------------------------------------------------------
-long LineListBox::GetEntryDistance( USHORT nPos ) const
+long LineListBox::GetEntryDistance( sal_uInt16 nPos ) const
{
ImpLineListData* pData = pLineList->GetObject( nPos );
if ( pData )
@@ -519,7 +519,7 @@ void LineListBox::UpdateLineColors( void )
{
if( UpdatePaintLineColor() )
{
- ULONG nCount = pLineList->Count();
+ sal_uLong nCount = pLineList->Count();
if( !nCount )
return;
@@ -527,34 +527,34 @@ void LineListBox::UpdateLineColors( void )
Bitmap aBmp;
// exchange entries which containing lines
- SetUpdateMode( FALSE );
+ SetUpdateMode( sal_False );
- USHORT nSelEntry = GetSelectEntryPos();
- for( ULONG n = 0 ; n < nCount ; ++n )
+ sal_uInt16 nSelEntry = GetSelectEntryPos();
+ for( sal_uLong n = 0 ; n < nCount ; ++n )
{
ImpLineListData* pData = pLineList->GetObject( n );
if( pData )
{
// exchange listbox data
- ListBox::RemoveEntry( USHORT( n ) );
+ ListBox::RemoveEntry( sal_uInt16( n ) );
ImpGetLine( pData->nLine1, pData->nLine2, pData->nDistance, aBmp, aStr );
- ListBox::InsertEntry( aStr, aBmp, USHORT( n ) );
+ ListBox::InsertEntry( aStr, aBmp, sal_uInt16( n ) );
}
}
if( nSelEntry != LISTBOX_ENTRY_NOTFOUND )
SelectEntryPos( nSelEntry );
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
Invalidate();
}
}
// -----------------------------------------------------------------------
-BOOL LineListBox::UpdatePaintLineColor( void )
+sal_Bool LineListBox::UpdatePaintLineColor( void )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
const StyleSettings& rSettings = GetSettings().GetStyleSettings();
Color aNewCol( rSettings.GetWindowColor().IsDark()? rSettings.GetLabelTextColor() : aColor );
@@ -583,10 +583,10 @@ void LineListBox::DataChanged( const DataChangedEvent& rDCEvt )
struct ImplFontNameListData
{
FontInfo maInfo;
- USHORT mnType;
+ sal_uInt16 mnType;
ImplFontNameListData( const FontInfo& rInfo,
- USHORT nType ) :
+ sal_uInt16 nType ) :
maInfo( rInfo ),
mnType( nType )
{}
@@ -601,8 +601,8 @@ FontNameBox::FontNameBox( Window* pParent, WinBits nWinStyle ) :
{
InitBitmaps();
mpFontList = NULL;
- mbWYSIWYG = FALSE;
- mbSymbols = FALSE;
+ mbWYSIWYG = sal_False;
+ mbSymbols = sal_False;
}
// -------------------------------------------------------------------
@@ -612,8 +612,8 @@ FontNameBox::FontNameBox( Window* pParent, const ResId& rResId ) :
{
InitBitmaps();
mpFontList = NULL;
- mbWYSIWYG = FALSE;
- mbSymbols = FALSE;
+ mbWYSIWYG = sal_False;
+ mbSymbols = sal_False;
}
// -------------------------------------------------------------------
@@ -637,7 +637,7 @@ void FontNameBox::DataChanged( const DataChangedEvent& rDCEvt )
void FontNameBox::InitBitmaps( void )
{
- BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
+ sal_Bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
maImagePrinterFont = Image( SvtResId( bHC? RID_IMG_PRINTERFONT_HC : RID_IMG_PRINTERFONT ) );
maImageBitmapFont = Image( SvtResId( bHC? RID_IMG_BITMAPFONT_HC : RID_IMG_BITMAPFONT ) );
@@ -672,14 +672,14 @@ void FontNameBox::Fill( const FontList* pList )
mpFontList = new ImplFontList;
// insert fonts
- USHORT nFontCount = pList->GetFontNameCount();
- for ( USHORT i = 0; i < nFontCount; i++ )
+ sal_uInt16 nFontCount = pList->GetFontNameCount();
+ for ( sal_uInt16 i = 0; i < nFontCount; i++ )
{
const FontInfo& rFontInfo = pList->GetFontName( i );
- ULONG nIndex = InsertEntry( rFontInfo.GetName() );
+ sal_uLong nIndex = InsertEntry( rFontInfo.GetName() );
if ( nIndex != LISTBOX_ERROR )
{
- USHORT nType = pList->GetFontNameType( i );
+ sal_uInt16 nType = pList->GetFontNameType( i );
ImplFontNameListData* pData = new ImplFontNameListData( rFontInfo, nType );
mpFontList->Insert( pData, nIndex );
}
@@ -694,7 +694,7 @@ void FontNameBox::Fill( const FontList* pList )
// -------------------------------------------------------------------
-void FontNameBox::EnableWYSIWYG( BOOL bEnable )
+void FontNameBox::EnableWYSIWYG( sal_Bool bEnable )
{
if ( bEnable != mbWYSIWYG )
{
@@ -706,7 +706,7 @@ void FontNameBox::EnableWYSIWYG( BOOL bEnable )
// -------------------------------------------------------------------
-void FontNameBox::EnableSymbols( BOOL bEnable )
+void FontNameBox::EnableSymbols( sal_Bool bEnable )
{
if ( bEnable != mbSymbols )
{
@@ -723,21 +723,21 @@ void FontNameBox::ImplCalcUserItemSize()
Size aUserItemSz;
if ( mbWYSIWYG && mpFontList )
{
- USHORT nMaxLen = 0;
- BOOL bSymbolFont = FALSE;
- BOOL bStarSymbol = FALSE;
- for ( USHORT n = GetEntryCount(); n; )
+ sal_uInt16 nMaxLen = 0;
+ sal_Bool bSymbolFont = sal_False;
+ sal_Bool bStarSymbol = sal_False;
+ for ( sal_uInt16 n = GetEntryCount(); n; )
{
ImplFontNameListData* pData = mpFontList->GetObject( --n );
XubString aFontName = pData->maInfo.GetName();
if ( aFontName.Len() > nMaxLen )
nMaxLen = aFontName.Len();
if ( pData->maInfo.GetCharSet() == RTL_TEXTENCODING_SYMBOL )
- bSymbolFont = TRUE;
+ bSymbolFont = sal_True;
// starsymbol is a unicode font, but gets WYSIWIG symbols
if( aFontName.EqualsIgnoreCaseAscii( "starsymbol" )
|| aFontName.EqualsIgnoreCaseAscii( "opensymbol" ) )
- bSymbolFont = bStarSymbol = TRUE;
+ bSymbolFont = bStarSymbol = sal_True;
}
// guess maximimum width
@@ -775,7 +775,7 @@ void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt )
{
ImplFontNameListData* pData = mpFontList->GetObject( rUDEvt.GetItemId() );
const FontInfo& rInfo = pData->maInfo;
- USHORT nType = pData->mnType;
+ sal_uInt16 nType = pData->mnType;
Point aTopLeft = rUDEvt.GetRect().TopLeft();
long nX = aTopLeft.X();
long nH = rUDEvt.GetRect().GetHeight();
@@ -887,11 +887,11 @@ void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt )
rUDEvt.GetDevice()->DrawText( aPos, aString );
rUDEvt.GetDevice()->SetFont( aOldFont );
- DrawEntry( rUDEvt, FALSE, FALSE); // draw seperator
+ DrawEntry( rUDEvt, sal_False, sal_False); // draw seperator
}
else
{
- DrawEntry( rUDEvt, TRUE, TRUE );
+ DrawEntry( rUDEvt, sal_True, sal_True );
}
}
@@ -943,12 +943,12 @@ void FontStyleBox::Modify()
CharClass aChrCls( ::comphelper::getProcessServiceFactory(),
GetSettings().GetLocale() );
XubString aStr = GetText();
- USHORT nEntryCount = GetEntryCount();
+ sal_uInt16 nEntryCount = GetEntryCount();
if ( GetEntryPos( aStr ) == COMBOBOX_ENTRY_NOTFOUND )
{
aChrCls.toUpper( aStr );
- for ( USHORT i = 0; i < nEntryCount; i++ )
+ for ( sal_uInt16 i = 0; i < nEntryCount; i++ )
{
XubString aEntryText = GetEntry( i );
aChrCls.toUpper( aEntryText );
@@ -972,7 +972,7 @@ void FontStyleBox::Fill( const XubString& rName, const FontList* pList )
// else aLastStyle will overwritten
// store prior selection position and clear box
XubString aOldText = GetText();
- USHORT nPos = GetEntryPos( aOldText );
+ sal_uInt16 nPos = GetEntryPos( aOldText );
Clear();
// does a font with this name already exist?
@@ -983,11 +983,11 @@ void FontStyleBox::Fill( const XubString& rName, const FontList* pList )
FontWeight eLastWeight = WEIGHT_DONTKNOW;
FontItalic eLastItalic = ITALIC_NONE;
FontWidth eLastWidth = WIDTH_DONTKNOW;
- BOOL bNormal = FALSE;
- BOOL bItalic = FALSE;
- BOOL bBold = FALSE;
- BOOL bBoldItalic = FALSE;
- BOOL bInsert = FALSE;
+ sal_Bool bNormal = sal_False;
+ sal_Bool bItalic = sal_False;
+ sal_Bool bBold = sal_False;
+ sal_Bool bBoldItalic = sal_False;
+ sal_Bool bInsert = sal_False;
FontInfo aInfo;
while ( hFontInfo )
{
@@ -1007,16 +1007,16 @@ void FontStyleBox::Fill( const XubString& rName, const FontList* pList )
if ( eWeight <= WEIGHT_NORMAL )
{
if ( eItalic != ITALIC_NONE )
- bItalic = TRUE;
+ bItalic = sal_True;
else
- bNormal = TRUE;
+ bNormal = sal_True;
}
else
{
if ( eItalic != ITALIC_NONE )
- bBoldItalic = TRUE;
+ bBoldItalic = sal_True;
else
- bBold = TRUE;
+ bBold = sal_True;
}
// For wrong StyleNames we replace this with the correct once
@@ -1050,11 +1050,11 @@ void FontStyleBox::Fill( const XubString& rName, const FontList* pList )
}
if ( !bItalic && (aStyleText == pList->GetItalicStr()) )
- bItalic = TRUE;
+ bItalic = sal_True;
else if ( !bBold && (aStyleText == pList->GetBoldStr()) )
- bBold = TRUE;
+ bBold = sal_True;
else if ( !bBoldItalic && (aStyleText == pList->GetBoldItalicStr()) )
- bBoldItalic = TRUE;
+ bBoldItalic = sal_True;
hFontInfo = pList->GetNextFontInfo( hFontInfo );
}
@@ -1133,15 +1133,15 @@ FontSizeBox::~FontSizeBox()
void FontSizeBox::ImplInit()
{
- EnableAutocomplete( FALSE );
+ EnableAutocomplete( sal_False );
- bRelativeMode = FALSE;
- bPtRelative = FALSE;
- bRelative = FALSE;
- bStdSize = FALSE;
+ bRelativeMode = sal_False;
+ bPtRelative = sal_False;
+ bRelative = sal_False;
+ bStdSize = sal_False;
pFontList = NULL;
- SetShowTrailingZeros( FALSE );
+ SetShowTrailingZeros( sal_False );
SetDecimalDigits( 1 );
SetMin( 20 );
SetMax( 9999 );
@@ -1177,24 +1177,24 @@ void FontSizeBox::Modify()
XubString aStr = GetText();
aStr.EraseLeadingChars();
- BOOL bNewMode = bRelative;
- BOOL bOldPtRelMode = bPtRelative;
+ sal_Bool bNewMode = bRelative;
+ sal_Bool bOldPtRelMode = bPtRelative;
if ( bRelative )
{
- bPtRelative = FALSE;
+ bPtRelative = sal_False;
const xub_Unicode* pStr = aStr.GetBuffer();
while ( *pStr )
{
if ( ((*pStr < '0') || (*pStr > '9')) && (*pStr != '%') )
{
if ( ('-' == *pStr || '+' == *pStr) && !bPtRelative )
- bPtRelative = TRUE;
+ bPtRelative = sal_True;
else if ( bPtRelative && 'p' == *pStr && 't' == *++pStr )
;
else
{
- bNewMode = FALSE;
+ bNewMode = sal_False;
break;
}
}
@@ -1205,14 +1205,14 @@ void FontSizeBox::Modify()
{
if ( STRING_NOTFOUND != aStr.Search( '%' ) )
{
- bNewMode = TRUE;
- bPtRelative = FALSE;
+ bNewMode = sal_True;
+ bPtRelative = sal_False;
}
if ( '-' == aStr.GetChar( 0 ) || '+' == aStr.GetChar( 0 ) )
{
- bNewMode = TRUE;
- bPtRelative = TRUE;
+ bNewMode = sal_True;
+ bPtRelative = sal_True;
}
}
@@ -1253,24 +1253,24 @@ void FontSizeBox::Fill( const FontInfo* pInfo, const FontList* pList )
// for standard sizes we don't need to bother
if ( bStdSize && GetEntryCount() && aFontSizeNames.IsEmpty() )
return;
- bStdSize = TRUE;
+ bStdSize = sal_True;
}
else
- bStdSize = FALSE;
+ bStdSize = sal_False;
Selection aSelection = GetSelection();
XubString aStr = GetText();
Clear();
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
if ( !aFontSizeNames.IsEmpty() )
{
if ( pAry == pList->GetStdSizeAry() )
{
// for scalable fonts all font size names
- ULONG nCount = aFontSizeNames.Count();
- for( ULONG i = 0; i < nCount; i++ )
+ sal_uLong nCount = aFontSizeNames.Count();
+ for( sal_uLong i = 0; i < nCount; i++ )
{
String aSizeName = aFontSizeNames.GetIndexName( i );
long nSize = aFontSizeNames.GetIndexSize( i );
@@ -1313,9 +1313,9 @@ void FontSizeBox::Fill( const FontInfo* pInfo, const FontList* pList )
// -----------------------------------------------------------------------
-void FontSizeBox::EnableRelativeMode( USHORT nMin, USHORT nMax, USHORT nStep )
+void FontSizeBox::EnableRelativeMode( sal_uInt16 nMin, sal_uInt16 nMax, sal_uInt16 nStep )
{
- bRelativeMode = TRUE;
+ bRelativeMode = sal_True;
nRelMin = nMin;
nRelMax = nMax;
nRelStep = nStep;
@@ -1326,7 +1326,7 @@ void FontSizeBox::EnableRelativeMode( USHORT nMin, USHORT nMax, USHORT nStep )
void FontSizeBox::EnablePtRelativeMode( short nMin, short nMax, short nStep )
{
- bRelativeMode = TRUE;
+ bRelativeMode = sal_True;
nPtRelMin = nMin;
nPtRelMax = nMax;
nPtRelStep = nStep;
@@ -1335,7 +1335,7 @@ void FontSizeBox::EnablePtRelativeMode( short nMin, short nMax, short nStep )
// -----------------------------------------------------------------------
-void FontSizeBox::SetRelative( BOOL bNewRelative )
+void FontSizeBox::SetRelative( sal_Bool bNewRelative )
{
if ( bRelativeMode )
{
@@ -1345,8 +1345,8 @@ void FontSizeBox::SetRelative( BOOL bNewRelative )
if ( bNewRelative )
{
- bRelative = TRUE;
- bStdSize = FALSE;
+ bRelative = sal_True;
+ bStdSize = sal_False;
if ( bPtRelative )
{
@@ -1374,7 +1374,7 @@ void FontSizeBox::SetRelative( BOOL bNewRelative )
SetUnit( FUNIT_CUSTOM );
Clear();
- USHORT i = nRelMin;
+ sal_uInt16 i = nRelMin;
while ( i <= nRelMax )
{
InsertValue( i );
@@ -1384,7 +1384,7 @@ void FontSizeBox::SetRelative( BOOL bNewRelative )
}
else
{
- bRelative = bPtRelative = FALSE;
+ bRelative = bPtRelative = sal_False;
SetDecimalDigits( 1 );
SetMin( 20 );
SetMax( 9999 );
@@ -1424,7 +1424,7 @@ void FontSizeBox::SetValue( sal_Int64 nNewValue, FieldUnit eInUnit )
mnLastValue = nTempValue;
SetText( aName );
mnFieldValue = mnLastValue;
- SetEmptyFieldValueData( FALSE );
+ SetEmptyFieldValueData( sal_False );
return;
}
}
@@ -1441,7 +1441,7 @@ void FontSizeBox::SetValue( sal_Int64 nNewValue )
// -----------------------------------------------------------------------
-sal_Int64 FontSizeBox::GetValue( USHORT nPos, FieldUnit eOutUnit ) const
+sal_Int64 FontSizeBox::GetValue( sal_uInt16 nPos, FieldUnit eOutUnit ) const
{
if ( !bRelative )
{
diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx
index 979a8a3a3d32..1314f416eec6 100755
--- a/svtools/source/control/ctrltool.cxx
+++ b/svtools/source/control/ctrltool.cxx
@@ -115,7 +115,7 @@ class ImplFontListNameInfo
private:
XubString maSearchName;
ImplFontListFontInfo* mpFirst;
- USHORT mnType;
+ sal_uInt16 mnType;
ImplFontListNameInfo( const XubString& rSearchName ) :
maSearchName( rSearchName )
@@ -163,7 +163,7 @@ static void ImplMakeSearchStringFromName( XubString& rStr )
// -----------------------------------------------------------------------
-ImplFontListNameInfo* FontList::ImplFind( const XubString& rSearchName, ULONG* pIndex ) const
+ImplFontListNameInfo* FontList::ImplFind( const XubString& rSearchName, sal_uLong* pIndex ) const
{
// Wenn kein Eintrag in der Liste oder der Eintrag groesser ist als
// der Letzte, dann hinten dranhaengen. Wir vergleichen erst mit dem
@@ -171,7 +171,7 @@ ImplFontListNameInfo* FontList::ImplFind( const XubString& rSearchName, ULONG* p
// und somit die Wahrscheinlichkeit das hinten angehaengt werden muss
// sehr gross ist.
StringCompare eComp;
- ULONG nCnt = Count();
+ sal_uLong nCnt = Count();
if ( !nCnt )
{
if ( pIndex )
@@ -195,9 +195,9 @@ ImplFontListNameInfo* FontList::ImplFind( const XubString& rSearchName, ULONG* p
// Fonts in der Liste suchen
ImplFontListNameInfo* pCompareData;
ImplFontListNameInfo* pFoundData = NULL;
- ULONG nLow = 0;
- ULONG nHigh = nCnt-1;
- ULONG nMid;
+ sal_uLong nLow = 0;
+ sal_uLong nHigh = nCnt-1;
+ sal_uLong nMid;
do
{
@@ -246,12 +246,12 @@ ImplFontListNameInfo* FontList::ImplFindByName( const XubString& rStr ) const
// -----------------------------------------------------------------------
-void FontList::ImplInsertFonts( OutputDevice* pDevice, BOOL bAll,
- BOOL bInsertData )
+void FontList::ImplInsertFonts( OutputDevice* pDevice, sal_Bool bAll,
+ sal_Bool bInsertData )
{
rtl_TextEncoding eSystemEncoding = gsl_getSystemTextEncoding();
- USHORT nType;
+ sal_uInt16 nType;
if ( pDevice->GetOutDevType() != OUTDEV_PRINTER )
nType = FONTLIST_FONTNAMETYPE_SCREEN;
else
@@ -259,7 +259,7 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, BOOL bAll,
// Alle Fonts vom Device abfragen
int n = pDevice->GetDevFontCount();
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < n; i++ )
{
FontInfo aFontInfo = pDevice->GetDevFont( i );
@@ -271,7 +271,7 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, BOOL bAll,
XubString aSearchName = aFontInfo.GetName();
ImplFontListNameInfo* pData;
- ULONG nIndex;
+ sal_uLong nIndex;
ImplMakeSearchString( aSearchName );
pData = ImplFind( aSearchName, &nIndex );
@@ -291,7 +291,7 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, BOOL bAll,
{
if ( bInsertData )
{
- BOOL bInsert = TRUE;
+ sal_Bool bInsert = sal_True;
ImplFontListFontInfo* pPrev = NULL;
ImplFontListFontInfo* pTemp = pData->mpFirst;
ImplFontListFontInfo* pNewInfo = new ImplFontListFontInfo( aFontInfo, pDevice );
@@ -312,7 +312,7 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, BOOL bAll,
pTemp->mpNext = pTemp2;
}
delete pNewInfo;
- bInsert = FALSE;
+ bInsert = sal_False;
}
break;
@@ -344,8 +344,8 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, BOOL bAll,
// =======================================================================
-FontList::FontList( OutputDevice* pDevice, OutputDevice* pDevice2, BOOL bAll ) :
- List( 4096, sal::static_int_cast< USHORT >(pDevice->GetDevFontCount()), 32 )
+FontList::FontList( OutputDevice* pDevice, OutputDevice* pDevice2, sal_Bool bAll ) :
+ List( 4096, sal::static_int_cast< sal_uInt16 >(pDevice->GetDevFontCount()), 32 )
{
// Variablen initialisieren
mpDev = pDevice;
@@ -362,14 +362,14 @@ FontList::FontList( OutputDevice* pDevice, OutputDevice* pDevice2, BOOL bAll ) :
maBlack = XubString( SvtResId( STR_SVT_STYLE_BLACK ) );
maBlackItalic = XubString( SvtResId( STR_SVT_STYLE_BLACK_ITALIC ) );
- ImplInsertFonts( pDevice, bAll, TRUE );
+ ImplInsertFonts( pDevice, bAll, sal_True );
// Gegebenenfalls muessen wir mit den Bildschirmfonts vergleichen,
// damit dort die eigentlich doppelten auf Equal mappen koennen
- BOOL bCompareWindow = FALSE;
+ sal_Bool bCompareWindow = sal_False;
if ( !pDevice2 && (pDevice->GetOutDevType() == OUTDEV_PRINTER) )
{
- bCompareWindow = TRUE;
+ bCompareWindow = sal_True;
pDevice2 = Application::GetDefaultDevice();
}
@@ -527,12 +527,12 @@ XubString FontList::GetFontMapText( const FontInfo& rInfo ) const
}
// search for synthetic style
- USHORT nType = pData->mnType;
+ sal_uInt16 nType = pData->mnType;
const XubString& rStyleName = rInfo.GetStyleName();
if ( rStyleName.Len() )
{
- BOOL bNotSynthetic = FALSE;
- BOOL bNoneAvailable = FALSE;
+ sal_Bool bNotSynthetic = sal_False;
+ sal_Bool bNoneAvailable = sal_False;
FontWeight eWeight = rInfo.GetWeight();
FontItalic eItalic = rInfo.GetItalic();
ImplFontListFontInfo* pFontInfo = pData->mpFirst;
@@ -541,7 +541,7 @@ XubString FontList::GetFontMapText( const FontInfo& rInfo ) const
if ( (eWeight == pFontInfo->GetWeight()) &&
(eItalic == pFontInfo->GetItalic()) )
{
- bNotSynthetic = TRUE;
+ bNotSynthetic = sal_True;
break;
}
@@ -598,7 +598,7 @@ XubString FontList::GetFontMapText( const FontInfo& rInfo ) const
// -----------------------------------------------------------------------
-USHORT FontList::GetFontNameType( const XubString& rFontName ) const
+sal_uInt16 FontList::GetFontNameType( const XubString& rFontName ) const
{
ImplFontListNameInfo* pData = ImplFindByName( rFontName );
if ( pData )
@@ -746,14 +746,14 @@ FontInfo FontList::Get( const XubString& rName,
// -----------------------------------------------------------------------
-BOOL FontList::IsAvailable( const XubString& rName ) const
+sal_Bool FontList::IsAvailable( const XubString& rName ) const
{
return (ImplFindByName( rName ) != 0);
}
// -----------------------------------------------------------------------
-const FontInfo& FontList::GetFontName( USHORT nFont ) const
+const FontInfo& FontList::GetFontName( sal_uInt16 nFont ) const
{
DBG_ASSERT( nFont < GetFontNameCount(), "FontList::GetFontName(): nFont >= Count" );
@@ -763,7 +763,7 @@ const FontInfo& FontList::GetFontName( USHORT nFont ) const
// -----------------------------------------------------------------------
-USHORT FontList::GetFontNameType( USHORT nFont ) const
+sal_uInt16 FontList::GetFontNameType( sal_uInt16 nFont ) const
{
DBG_ASSERT( nFont < GetFontNameCount(), "FontList::GetFontNameType(): nFont >= Count" );
@@ -829,8 +829,8 @@ const long* FontList::GetSizeAry( const FontInfo& rInfo ) const
MapMode aMap( MAP_10TH_INCH, Point(), Fraction( 1, 72 ), Fraction( 1, 72 ) );
pDevice->SetMapMode( aMap );
- USHORT i;
- USHORT nRealCount = 0;
+ sal_uInt16 i;
+ sal_uInt16 nRealCount = 0;
long nOldHeight = 0;
((FontList*)this)->mpSizeAry = new long[nDevSizeCount+1];
for ( i = 0; i < nDevSizeCount; i++ )
@@ -991,7 +991,7 @@ String FontSizeNames::Size2Name( long nValue ) const
//------------------------------------------------------------------------
-String FontSizeNames::GetIndexName( ULONG nIndex ) const
+String FontSizeNames::GetIndexName( sal_uLong nIndex ) const
{
String aStr;
@@ -1003,7 +1003,7 @@ String FontSizeNames::GetIndexName( ULONG nIndex ) const
//------------------------------------------------------------------------
-long FontSizeNames::GetIndexSize( ULONG nIndex ) const
+long FontSizeNames::GetIndexSize( sal_uLong nIndex ) const
{
if ( nIndex >= mnElem )
return 0;
diff --git a/svtools/source/control/filectrl.cxx b/svtools/source/control/filectrl.cxx
index 3541a43effc1..eff46b78b2a2 100755
--- a/svtools/source/control/filectrl.cxx
+++ b/svtools/source/control/filectrl.cxx
@@ -45,12 +45,12 @@ FileControl::FileControl( Window* pParent, WinBits nStyle, FileControlMode nFlag
mnInternalFlags( FILECTRL_ORIGINALBUTTONTEXT )
{
maButton.SetClickHdl( LINK( this, FileControl, ButtonHdl ) );
- mbOpenDlg = TRUE;
+ mbOpenDlg = sal_True;
maButton.Show();
maEdit.Show();
- SetCompoundControl( TRUE );
+ SetCompoundControl( sal_True );
SetStyle( ImplInitStyle( GetStyle() ) );
}
@@ -154,7 +154,7 @@ void FileControl::Resize()
if( mnInternalFlags & FILECTRL_INRESIZE )
return;
- mnInternalFlags |= FILECTRL_INRESIZE;//InResize = TRUE
+ mnInternalFlags |= FILECTRL_INRESIZE;//InResize = sal_True
Size aOutSz = GetOutputSizePixel();
long nButtonTextWidth = maButton.GetTextWidth( maButtonText );
@@ -163,7 +163,7 @@ void FileControl::Resize()
( mnFlags & FILECTRL_RESIZEBUTTONBYPATHLEN
? ( maEdit.GetTextWidth( maEdit.GetText() )
<= aOutSz.Width() - nButtonTextWidth - ButtonBorder )
- : TRUE ) )
+ : sal_True ) )
)
{
maButton.SetText( maButtonText );
@@ -179,7 +179,7 @@ void FileControl::Resize()
maEdit.SetPosSizePixel( 0, 0, aOutSz.Width()-nButtonWidth, aOutSz.Height() );
maButton.SetPosSizePixel( aOutSz.Width()-nButtonWidth, 0, nButtonWidth, aOutSz.Height() );
- mnInternalFlags &= ~FILECTRL_INRESIZE; //InResize = FALSE
+ mnInternalFlags &= ~FILECTRL_INRESIZE; //InResize = sal_False
}
// -----------------------------------------------------------------------
@@ -200,7 +200,7 @@ void FileControl::GetFocus()
// -----------------------------------------------------------------------
-void FileControl::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags )
+void FileControl::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags )
{
WinBits nOldEditStyle = GetEdit().GetStyle();
if ( GetStyle() & WB_BORDER )
diff --git a/svtools/source/control/filectrl.src b/svtools/source/control/filectrl.src
index dc8bbb5905d6..f9d63b65b838 100644..100755
--- a/svtools/source/control/filectrl.src
+++ b/svtools/source/control/filectrl.src
@@ -31,28 +31,20 @@ String STR_FILECTRL_BUTTONTEXT
Text [ en-US ] = "Browse..." ;
};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+String STR_TABBAR_PUSHBUTTON_MOVET0HOME
+{
+ Text [ en-US ] = "Move To Home" ;
+};
+String STR_TABBAR_PUSHBUTTON_MOVELEFT
+{
+ Text [ en-US ] = "Move Left" ;
+};
+String STR_TABBAR_PUSHBUTTON_MOVERIGHT
+{
+ Text [ en-US ] = "Move Right" ;
+};
+String STR_TABBAR_PUSHBUTTON_MOVETOEND
+{
+ Text [ en-US ] = "Move To End" ;
+};
diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx
index 5b986dc10f9d..f123af14d510 100644..100755
--- a/svtools/source/control/fmtfield.cxx
+++ b/svtools/source/control/fmtfield.cxx
@@ -305,7 +305,7 @@ namespace validation
//==============================================================================
SvNumberFormatter* FormattedField::StaticFormatter::s_cFormatter = NULL;
-ULONG FormattedField::StaticFormatter::s_nReferences = 0;
+sal_uLong FormattedField::StaticFormatter::s_nReferences = 0;
//------------------------------------------------------------------------------
SvNumberFormatter* FormattedField::StaticFormatter::GetFormatter()
@@ -345,13 +345,13 @@ DBG_NAME(FormattedField);
m_aLastSelection(0,0) \
,m_dMinValue(0) \
,m_dMaxValue(0) \
- ,m_bHasMin(FALSE) \
- ,m_bHasMax(FALSE) \
- ,m_bStrictFormat(TRUE) \
- ,m_bValueDirty(TRUE) \
- ,m_bEnableEmptyField(TRUE) \
- ,m_bAutoColor(FALSE) \
- ,m_bEnableNaN(FALSE) \
+ ,m_bHasMin(sal_False) \
+ ,m_bHasMax(sal_False) \
+ ,m_bStrictFormat(sal_True) \
+ ,m_bValueDirty(sal_True) \
+ ,m_bEnableEmptyField(sal_True) \
+ ,m_bAutoColor(sal_False) \
+ ,m_bEnableNaN(sal_False) \
,m_dCurrentValue(0) \
,m_dDefaultValue(0) \
,m_nFormatKey(0) \
@@ -359,12 +359,12 @@ DBG_NAME(FormattedField);
,m_dSpinSize(1) \
,m_dSpinFirst(-1000000) \
,m_dSpinLast(1000000) \
- ,m_bTreatAsNumber(TRUE) \
+ ,m_bTreatAsNumber(sal_True) \
,m_pLastOutputColor(NULL) \
,m_bUseInputStringForFormatting(false)
//------------------------------------------------------------------------------
-FormattedField::FormattedField(Window* pParent, WinBits nStyle, SvNumberFormatter* pInitialFormatter, INT32 nFormatKey)
+FormattedField::FormattedField(Window* pParent, WinBits nStyle, SvNumberFormatter* pInitialFormatter, sal_Int32 nFormatKey)
:SpinField(pParent, nStyle)
,INIT_MEMBERS()
{
@@ -378,7 +378,7 @@ FormattedField::FormattedField(Window* pParent, WinBits nStyle, SvNumberFormatte
}
//------------------------------------------------------------------------------
-FormattedField::FormattedField(Window* pParent, const ResId& rResId, SvNumberFormatter* pInitialFormatter, INT32 nFormatKey)
+FormattedField::FormattedField(Window* pParent, const ResId& rResId, SvNumberFormatter* pInitialFormatter, sal_Int32 nFormatKey)
:SpinField(pParent, rResId)
,INIT_MEMBERS()
{
@@ -408,7 +408,7 @@ void FormattedField::SetValidateText(const XubString& rText, const String* pErro
if (pErrorText)
ImplSetTextImpl(*pErrorText, NULL);
else
- ImplSetValue(m_dDefaultValue, TRUE);
+ ImplSetValue(m_dDefaultValue, sal_True);
}
//------------------------------------------------------------------------------
@@ -417,7 +417,7 @@ void FormattedField::SetText(const XubString& rStr)
DBG_CHKTHIS(FormattedField, NULL);
SpinField::SetText(rStr);
- m_bValueDirty = TRUE;
+ m_bValueDirty = sal_True;
}
//------------------------------------------------------------------------------
@@ -426,7 +426,7 @@ void FormattedField::SetText( const XubString& rStr, const Selection& rNewSelect
DBG_CHKTHIS(FormattedField, NULL);
SpinField::SetText( rStr, rNewSelection );
- m_bValueDirty = TRUE;
+ m_bValueDirty = sal_True;
}
//------------------------------------------------------------------------------
@@ -455,8 +455,8 @@ void FormattedField::SetTextFormatted(const XubString& rStr)
Selection aSel(GetSelection());
Selection aNewSel(aSel);
aNewSel.Justify();
- USHORT nNewLen = sFormatted.Len();
- USHORT nCurrentLen = GetText().Len();
+ sal_uInt16 nNewLen = sFormatted.Len();
+ sal_uInt16 nCurrentLen = GetText().Len();
if ((nNewLen > nCurrentLen) && (aNewSel.Max() == nCurrentLen))
{ // the new text is longer and the cursor was behind the last char (of the old text)
if (aNewSel.Min() == 0)
@@ -464,7 +464,7 @@ void FormattedField::SetTextFormatted(const XubString& rStr)
aNewSel.Max() = nNewLen;
if (!nCurrentLen)
{ // there wasn't really a previous selection (as there was no previous text), we're setting a new one -> check the selection options
- ULONG nSelOptions = GetSettings().GetStyleSettings().GetSelectionOptions();
+ sal_uLong nSelOptions = GetSettings().GetStyleSettings().GetSelectionOptions();
if (nSelOptions & SELECTION_OPTION_SHOWFIRST)
{ // selection should be from right to left -> swap min and max
aNewSel.Min() = aNewSel.Max();
@@ -483,7 +483,7 @@ void FormattedField::SetTextFormatted(const XubString& rStr)
else
aNewSel = aSel; // don't use the justified version
SpinField::SetText(sFormatted, aNewSel);
- m_bValueDirty = FALSE;
+ m_bValueDirty = sal_False;
}
//------------------------------------------------------------------------------
@@ -492,13 +492,13 @@ String FormattedField::GetTextValue() const
if (m_bValueDirty)
{
((FormattedField*)this)->m_sCurrentTextValue = GetText();
- ((FormattedField*)this)->m_bValueDirty = FALSE;
+ ((FormattedField*)this)->m_bValueDirty = sal_False;
}
return m_sCurrentTextValue;
}
//------------------------------------------------------------------------------
-void FormattedField::EnableNotANumber( BOOL _bEnable )
+void FormattedField::EnableNotANumber( sal_Bool _bEnable )
{
if ( m_bEnableNaN == _bEnable )
return;
@@ -507,7 +507,7 @@ void FormattedField::EnableNotANumber( BOOL _bEnable )
}
//------------------------------------------------------------------------------
-void FormattedField::SetAutoColor(BOOL _bAutomatic)
+void FormattedField::SetAutoColor(sal_Bool _bAutomatic)
{
if (_bAutomatic == m_bAutoColor)
return;
@@ -529,7 +529,7 @@ void FormattedField::Modify()
if (!IsStrictFormat())
{
- m_bValueDirty = TRUE;
+ m_bValueDirty = sal_True;
SpinField::Modify();
return;
}
@@ -539,7 +539,7 @@ void FormattedField::Modify()
{
m_sLastValidText = sCheck;
m_aLastSelection = GetSelection();
- m_bValueDirty = TRUE;
+ m_bValueDirty = sal_True;
}
else
{
@@ -569,8 +569,8 @@ void FormattedField::ImplSetTextImpl(const XubString& rNew, Selection* pNewSel)
Selection aSel(GetSelection());
aSel.Justify();
- USHORT nNewLen = rNew.Len();
- USHORT nCurrentLen = GetText().Len();
+ sal_uInt16 nNewLen = rNew.Len();
+ sal_uInt16 nCurrentLen = GetText().Len();
if ((nNewLen > nCurrentLen) && (aSel.Max() == nCurrentLen))
{ // new new text is longer and the cursor is behind the last char
@@ -579,7 +579,7 @@ void FormattedField::ImplSetTextImpl(const XubString& rNew, Selection* pNewSel)
aSel.Max() = nNewLen;
if (!nCurrentLen)
{ // there wasn't really a previous selection (as there was no previous text), we're setting a new one -> check the selection options
- ULONG nSelOptions = GetSettings().GetStyleSettings().GetSelectionOptions();
+ sal_uLong nSelOptions = GetSettings().GetStyleSettings().GetSelectionOptions();
if (nSelOptions & SELECTION_OPTION_SHOWFIRST)
{ // selection should be from right to left -> swap min and max
aSel.Min() = aSel.Max();
@@ -598,7 +598,7 @@ void FormattedField::ImplSetTextImpl(const XubString& rNew, Selection* pNewSel)
SpinField::SetText(rNew, aSel);
}
- m_bValueDirty = TRUE;
+ m_bValueDirty = sal_True;
// muss nicht stimmen, aber sicherheitshalber ...
}
@@ -612,12 +612,12 @@ long FormattedField::PreNotify(NotifyEvent& rNEvt)
}
//------------------------------------------------------------------------------
-void FormattedField::ImplSetFormatKey(ULONG nFormatKey)
+void FormattedField::ImplSetFormatKey(sal_uLong nFormatKey)
{
DBG_CHKTHIS(FormattedField, NULL);
m_nFormatKey = nFormatKey;
- BOOL bNeedFormatter = (m_pFormatter == NULL) && (nFormatKey != 0);
+ sal_Bool bNeedFormatter = (m_pFormatter == NULL) && (nFormatKey != 0);
if (bNeedFormatter)
{
ImplGetFormatter(); // damit wird ein Standard-Formatter angelegt
@@ -632,16 +632,16 @@ void FormattedField::ImplSetFormatKey(ULONG nFormatKey)
}
//------------------------------------------------------------------------------
-void FormattedField::SetFormatKey(ULONG nFormatKey)
+void FormattedField::SetFormatKey(sal_uLong nFormatKey)
{
DBG_CHKTHIS(FormattedField, NULL);
- BOOL bNoFormatter = (m_pFormatter == NULL);
+ sal_Bool bNoFormatter = (m_pFormatter == NULL);
ImplSetFormatKey(nFormatKey);
FormatChanged((bNoFormatter && (m_pFormatter != NULL)) ? FCT_FORMATTER : FCT_KEYONLY);
}
//------------------------------------------------------------------------------
-void FormattedField::SetFormatter(SvNumberFormatter* pFormatter, BOOL bResetFormat)
+void FormattedField::SetFormatter(SvNumberFormatter* pFormatter, sal_Bool bResetFormat)
{
DBG_CHKTHIS(FormattedField, NULL);
@@ -675,7 +675,7 @@ void FormattedField::SetFormatter(SvNumberFormatter* pFormatter, BOOL bResetForm
LanguageType aNewLang = pDefaultEntry ? pDefaultEntry->GetLanguage() : LANGUAGE_DONTKNOW;
// den alten Format-String in die neue Sprache konvertieren
- USHORT nCheckPos;
+ sal_uInt16 nCheckPos;
short nType;
pFormatter->PutandConvertEntry(sOldFormat, nCheckPos, nType, nDestKey, aOldLang, aNewLang);
m_nFormatKey = nDestKey;
@@ -697,47 +697,47 @@ void FormattedField::GetFormat(XubString& rFormatString, LanguageType& eLang) co
}
//------------------------------------------------------------------------------
-BOOL FormattedField::SetFormat(const XubString& rFormatString, LanguageType eLang)
+sal_Bool FormattedField::SetFormat(const XubString& rFormatString, LanguageType eLang)
{
DBG_CHKTHIS(FormattedField, NULL);
sal_uInt32 nNewKey = ImplGetFormatter()->TestNewString(rFormatString, eLang);
if (nNewKey == NUMBERFORMAT_ENTRY_NOT_FOUND)
{
- USHORT nCheckPos;
+ sal_uInt16 nCheckPos;
short nType;
XubString rFormat(rFormatString);
if (!ImplGetFormatter()->PutEntry(rFormat, nCheckPos, nType, nNewKey, eLang))
- return FALSE;
+ return sal_False;
DBG_ASSERT(nNewKey != NUMBERFORMAT_ENTRY_NOT_FOUND, "FormattedField::SetFormatString : PutEntry returned an invalid key !");
}
if (nNewKey != m_nFormatKey)
SetFormatKey(nNewKey);
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------------
-BOOL FormattedField::GetThousandsSep() const
+sal_Bool FormattedField::GetThousandsSep() const
{
DBG_ASSERT(!ImplGetFormatter()->IsTextFormat(m_nFormatKey),
"FormattedField::GetThousandsSep : your'e sure what your'e doing when setting the precision of a text format ?");
- BOOL bThousand, IsRed;
- USHORT nPrecision, nAnzLeading;
+ sal_Bool bThousand, IsRed;
+ sal_uInt16 nPrecision, nAnzLeading;
ImplGetFormatter()->GetFormatSpecialInfo(m_nFormatKey, bThousand, IsRed, nPrecision, nAnzLeading);
return bThousand;
}
//------------------------------------------------------------------------------
-void FormattedField::SetThousandsSep(BOOL _bUseSeparator)
+void FormattedField::SetThousandsSep(sal_Bool _bUseSeparator)
{
DBG_ASSERT(!ImplGetFormatter()->IsTextFormat(m_nFormatKey),
"FormattedField::SetThousandsSep : your'e sure what your'e doing when setting the precision of a text format ?");
// get the current settings
- BOOL bThousand, IsRed;
- USHORT nPrecision, nAnzLeading;
+ sal_Bool bThousand, IsRed;
+ sal_uInt16 nPrecision, nAnzLeading;
ImplGetFormatter()->GetFormatSpecialInfo(m_nFormatKey, bThousand, IsRed, nPrecision, nAnzLeading);
if (bThousand == _bUseSeparator)
return;
@@ -750,7 +750,7 @@ void FormattedField::SetThousandsSep(BOOL _bUseSeparator)
// generate a new format ...
ImplGetFormatter()->GenerateFormat(sFmtDescription, m_nFormatKey, eLang, _bUseSeparator, IsRed, nPrecision, nAnzLeading);
// ... and introduce it to the formatter
- USHORT nCheckPos;
+ sal_uInt16 nCheckPos;
sal_uInt32 nNewKey;
short nType;
ImplGetFormatter()->PutEntry(sFmtDescription, nCheckPos, nType, nNewKey, eLang);
@@ -761,27 +761,27 @@ void FormattedField::SetThousandsSep(BOOL _bUseSeparator)
}
//------------------------------------------------------------------------------
-USHORT FormattedField::GetDecimalDigits() const
+sal_uInt16 FormattedField::GetDecimalDigits() const
{
DBG_ASSERT(!ImplGetFormatter()->IsTextFormat(m_nFormatKey),
"FormattedField::GetDecimalDigits : your'e sure what your'e doing when setting the precision of a text format ?");
- BOOL bThousand, IsRed;
- USHORT nPrecision, nAnzLeading;
+ sal_Bool bThousand, IsRed;
+ sal_uInt16 nPrecision, nAnzLeading;
ImplGetFormatter()->GetFormatSpecialInfo(m_nFormatKey, bThousand, IsRed, nPrecision, nAnzLeading);
return nPrecision;
}
//------------------------------------------------------------------------------
-void FormattedField::SetDecimalDigits(USHORT _nPrecision)
+void FormattedField::SetDecimalDigits(sal_uInt16 _nPrecision)
{
DBG_ASSERT(!ImplGetFormatter()->IsTextFormat(m_nFormatKey),
"FormattedField::SetDecimalDigits : your'e sure what your'e doing when setting the precision of a text format ?");
// get the current settings
- BOOL bThousand, IsRed;
- USHORT nPrecision, nAnzLeading;
+ sal_Bool bThousand, IsRed;
+ sal_uInt16 nPrecision, nAnzLeading;
ImplGetFormatter()->GetFormatSpecialInfo(m_nFormatKey, bThousand, IsRed, nPrecision, nAnzLeading);
if (nPrecision == _nPrecision)
return;
@@ -794,7 +794,7 @@ void FormattedField::SetDecimalDigits(USHORT _nPrecision)
// generate a new format ...
ImplGetFormatter()->GenerateFormat(sFmtDescription, m_nFormatKey, eLang, bThousand, IsRed, _nPrecision, nAnzLeading);
// ... and introduce it to the formatter
- USHORT nCheckPos;
+ sal_uInt16 nCheckPos;
sal_uInt32 nNewKey;
short nType;
ImplGetFormatter()->PutEntry(sFmtDescription, nCheckPos, nType, nNewKey, eLang);
@@ -831,7 +831,7 @@ void FormattedField::Commit()
{ // consider the field as modified
Modify();
// but we have the most recent value now
- m_bValueDirty = FALSE;
+ m_bValueDirty = sal_False;
}
}
@@ -845,7 +845,7 @@ void FormattedField::ReFormat()
double dValue = GetValue();
if ( m_bEnableNaN && ::rtl::math::isNan( dValue ) )
return;
- ImplSetValue( dValue, TRUE );
+ ImplSetValue( dValue, sal_True );
}
else
SetTextFormatted(GetTextValue());
@@ -860,7 +860,7 @@ long FormattedField::Notify(NotifyEvent& rNEvt)
if ((rNEvt.GetType() == EVENT_KEYINPUT) && !IsReadOnly())
{
const KeyEvent& rKEvt = *rNEvt.GetKeyEvent();
- USHORT nMod = rKEvt.GetKeyCode().GetModifier();
+ sal_uInt16 nMod = rKEvt.GetKeyCode().GetModifier();
switch ( rKEvt.GetKeyCode().GetCode() )
{
case KEY_UP:
@@ -901,7 +901,7 @@ long FormattedField::Notify(NotifyEvent& rNEvt)
{
if (TreatingAsNumber())
{
- ImplSetValue(m_dCurrentValue, TRUE);
+ ImplSetValue(m_dCurrentValue, sal_True);
Modify();
}
else
@@ -912,7 +912,7 @@ long FormattedField::Notify(NotifyEvent& rNEvt)
else
SetTextFormatted(m_sDefaultText);
}
- m_bValueDirty = FALSE;
+ m_bValueDirty = sal_False;
}
}
else
@@ -931,7 +931,7 @@ void FormattedField::SetMinValue(double dMin)
DBG_ASSERT(m_bTreatAsNumber, "FormattedField::SetMinValue : only to be used in numeric mode !");
m_dMinValue = dMin;
- m_bHasMin = TRUE;
+ m_bHasMin = sal_True;
// fuer die Ueberpruefung des aktuellen Wertes an der neuen Grenze -> ImplSetValue
ReFormat();
}
@@ -943,7 +943,7 @@ void FormattedField::SetMaxValue(double dMax)
DBG_ASSERT(m_bTreatAsNumber, "FormattedField::SetMaxValue : only to be used in numeric mode !");
m_dMaxValue = dMax;
- m_bHasMax = TRUE;
+ m_bHasMax = sal_True;
// fuer die Ueberpruefung des aktuellen Wertes an der neuen Grenze -> ImplSetValue
ReFormat();
}
@@ -957,7 +957,7 @@ void FormattedField::SetTextValue(const XubString& rText)
}
//------------------------------------------------------------------------------
-void FormattedField::EnableEmptyField(BOOL bEnable)
+void FormattedField::EnableEmptyField(sal_Bool bEnable)
{
DBG_CHKTHIS(FormattedField, NULL);
if (bEnable == m_bEnableEmptyField)
@@ -965,11 +965,11 @@ void FormattedField::EnableEmptyField(BOOL bEnable)
m_bEnableEmptyField = bEnable;
if (!m_bEnableEmptyField && GetText().Len()==0)
- ImplSetValue(m_dCurrentValue, TRUE);
+ ImplSetValue(m_dCurrentValue, sal_True);
}
//------------------------------------------------------------------------------
-void FormattedField::ImplSetValue(double dVal, BOOL bForce)
+void FormattedField::ImplSetValue(double dVal, sal_Bool bForce)
{
DBG_CHKTHIS(FormattedField, NULL);
@@ -982,7 +982,7 @@ void FormattedField::ImplSetValue(double dVal, BOOL bForce)
DBG_ASSERT(ImplGetFormatter() != NULL, "FormattedField::ImplSetValue : can't set a value without a formatter !");
- m_bValueDirty = FALSE;
+ m_bValueDirty = sal_False;
m_dCurrentValue = dVal;
String sNewText;
@@ -1003,23 +1003,23 @@ void FormattedField::ImplSetValue(double dVal, BOOL bForce)
}
ImplSetTextImpl(sNewText, NULL);
- m_bValueDirty = FALSE;
+ m_bValueDirty = sal_False;
DBG_ASSERT(CheckText(sNewText), "FormattedField::ImplSetValue : formatted string doesn't match the criteria !");
}
//------------------------------------------------------------------------------
-BOOL FormattedField::ImplGetValue(double& dNewVal)
+sal_Bool FormattedField::ImplGetValue(double& dNewVal)
{
DBG_CHKTHIS(FormattedField, NULL);
dNewVal = m_dCurrentValue;
if (!m_bValueDirty)
- return TRUE;
+ return sal_True;
dNewVal = m_dDefaultValue;
String sText(GetText());
if (!sText.Len())
- return TRUE;
+ return sal_True;
DBG_ASSERT(ImplGetFormatter() != NULL, "FormattedField::ImplGetValue : can't give you a current value without a formatter !");
@@ -1035,7 +1035,7 @@ BOOL FormattedField::ImplGetValue(double& dNewVal)
// the language of our format
LanguageType eLanguage = m_pFormatter->GetEntry(m_nFormatKey)->GetLanguage();
// the default number format for this language
- ULONG nStandardNumericFormat = m_pFormatter->GetStandardFormat(NUMBERFORMAT_NUMBER, eLanguage);
+ sal_uLong nStandardNumericFormat = m_pFormatter->GetStandardFormat(NUMBERFORMAT_NUMBER, eLanguage);
sal_uInt32 nTempFormat = nStandardNumericFormat;
double dTemp;
@@ -1049,14 +1049,14 @@ BOOL FormattedField::ImplGetValue(double& dNewVal)
// which equals 300 percent.
}
if (!ImplGetFormatter()->IsNumberFormat(sText, nFormatKey, dNewVal))
- return FALSE;
+ return sal_False;
if (m_bHasMin && (dNewVal<m_dMinValue))
dNewVal = m_dMinValue;
if (m_bHasMax && (dNewVal>m_dMaxValue))
dNewVal = m_dMaxValue;
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------------
@@ -1079,7 +1079,7 @@ double FormattedField::GetValue()
m_dCurrentValue = m_dDefaultValue;
}
- m_bValueDirty = FALSE;
+ m_bValueDirty = sal_False;
return m_dCurrentValue;
}
@@ -1166,7 +1166,7 @@ void DoubleNumericField::FormatChanged(FORMAT_CHANGE_TYPE nWhat)
}
//------------------------------------------------------------------------------
-BOOL DoubleNumericField::CheckText(const XubString& sText) const
+sal_Bool DoubleNumericField::CheckText(const XubString& sText) const
{
// We'd like to implement this using the NumberFormatter::IsNumberFormat, but unfortunately, this doesn't
// recognize fragments of numbers (like, for instance "1e", which happens during entering e.g. "1e10")
@@ -1174,19 +1174,19 @@ BOOL DoubleNumericField::CheckText(const XubString& sText) const
#ifdef REGEXP_SUPPORT
if (!sText.Len())
- return TRUE;
+ return sal_True;
String sForceComplete = '_';
sForceComplete += sText;
sForceComplete += '_';
- USHORT nStart = 0, nEnd = sForceComplete.Len();
- BOOL bFound = m_pConformanceTester->SearchFrwrd(sForceComplete, &nStart, &nEnd);
+ sal_uInt16 nStart = 0, nEnd = sForceComplete.Len();
+ sal_Bool bFound = m_pConformanceTester->SearchFrwrd(sForceComplete, &nStart, &nEnd);
if (bFound && (nStart == 0) && (nEnd == sForceComplete.Len()))
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
#else
return m_pNumberValidator->isValidNumericFragment( sText );
#endif
@@ -1252,9 +1252,9 @@ void DoubleNumericField::ResetConformanceTester()
//------------------------------------------------------------------------------
DoubleCurrencyField::DoubleCurrencyField(Window* pParent, WinBits nStyle)
:FormattedField(pParent, nStyle)
- ,m_bChangingFormat(FALSE)
+ ,m_bChangingFormat(sal_False)
{
- m_bPrependCurrSym = FALSE;
+ m_bPrependCurrSym = sal_False;
// initialize with a system currency format
m_sCurrencySymbol = SvtSysLocale().GetLocaleData().getCurrSymbol();
@@ -1264,9 +1264,9 @@ DoubleCurrencyField::DoubleCurrencyField(Window* pParent, WinBits nStyle)
//------------------------------------------------------------------------------
DoubleCurrencyField::DoubleCurrencyField(Window* pParent, const ResId& rResId)
:FormattedField(pParent, rResId)
- ,m_bChangingFormat(FALSE)
+ ,m_bChangingFormat(sal_False)
{
- m_bPrependCurrSym = FALSE;
+ m_bPrependCurrSym = sal_False;
// initialize with a system currency format
m_sCurrencySymbol = SvtSysLocale().GetLocaleData().getCurrSymbol();
@@ -1313,7 +1313,7 @@ void DoubleCurrencyField::setCurrencySymbol(const String& _sSymbol)
}
//------------------------------------------------------------------------------
-void DoubleCurrencyField::setPrependCurrSym(BOOL _bPrepend)
+void DoubleCurrencyField::setPrependCurrSym(sal_Bool _bPrepend)
{
if (m_bPrependCurrSym == _bPrepend)
return;
@@ -1330,8 +1330,8 @@ void DoubleCurrencyField::UpdateCurrencyFormat()
XubString sOldFormat;
LanguageType eLanguage;
GetFormat(sOldFormat, eLanguage);
- BOOL bThSep = GetThousandsSep();
- USHORT nDigits = GetDecimalDigits();
+ sal_Bool bThSep = GetThousandsSep();
+ sal_uInt16 nDigits = GetDecimalDigits();
// build a new format string with the base class' and my own settings
Locale aLocale;
@@ -1391,8 +1391,8 @@ void DoubleCurrencyField::UpdateCurrencyFormat()
}
// set this new basic format
- m_bChangingFormat = TRUE;
+ m_bChangingFormat = sal_True;
SetFormat(sNewFormat, eLanguage);
- m_bChangingFormat = FALSE;
+ m_bChangingFormat = sal_False;
}
diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx
index 7b1f2ad87108..06886339fda5 100755
--- a/svtools/source/control/headbar.cxx
+++ b/svtools/source/control/headbar.cxx
@@ -50,7 +50,7 @@
struct ImplHeadItem
{
- USHORT mnId;
+ sal_uInt16 mnId;
HeaderBarItemBits mnBits;
long mnSize;
rtl::OString maHelpId;
@@ -75,8 +75,8 @@ DECLARE_LIST( ImplHeadItemList, ImplHeadItem* )
#define HEADERBAR_DRAGOFF 4
#define HEADERBAR_DRAGOUTOFF 15
-#define HEAD_HITTEST_ITEM ((USHORT)0x0001)
-#define HEAD_HITTEST_DIVIDER ((USHORT)0x0002)
+#define HEAD_HITTEST_ITEM ((sal_uInt16)0x0001)
+#define HEAD_HITTEST_DIVIDER ((sal_uInt16)0x0002)
// =======================================================================
@@ -94,20 +94,20 @@ void HeaderBar::ImplInit( WinBits nWinStyle )
mnMouseOff = 0;
mnCurItemId = 0;
mnItemDragPos = HEADERBAR_ITEM_NOTFOUND;
- mbDrag = FALSE;
- mbItemDrag = FALSE;
- mbOutDrag = FALSE;
- mbItemMode = FALSE;
+ mbDrag = sal_False;
+ mbItemDrag = sal_False;
+ mbOutDrag = sal_False;
+ mbItemMode = sal_False;
// StyleBits auswerten
if ( nWinStyle & WB_DRAG )
- mbDragable = TRUE;
+ mbDragable = sal_True;
else
- mbDragable = FALSE;
+ mbDragable = sal_False;
if ( nWinStyle & WB_BUTTONSTYLE )
- mbButtonStyle = TRUE;
+ mbButtonStyle = sal_True;
else
- mbButtonStyle = FALSE;
+ mbButtonStyle = sal_False;
if ( nWinStyle & WB_BORDER )
{
mnBorderOff1 = 1;
@@ -119,7 +119,7 @@ void HeaderBar::ImplInit( WinBits nWinStyle )
mnBorderOff2 = 1;
}
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
}
// -----------------------------------------------------------------------
@@ -156,8 +156,8 @@ HeaderBar::~HeaderBar()
// -----------------------------------------------------------------------
-void HeaderBar::ImplInitSettings( BOOL bFont,
- BOOL bForeground, BOOL bBackground )
+void HeaderBar::ImplInitSettings( sal_Bool bFont,
+ sal_Bool bForeground, sal_Bool bBackground )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -194,17 +194,17 @@ void HeaderBar::ImplInitSettings( BOOL bFont,
// -----------------------------------------------------------------------
-long HeaderBar::ImplGetItemPos( USHORT nPos ) const
+long HeaderBar::ImplGetItemPos( sal_uInt16 nPos ) const
{
long nX = -mnOffset;
- for ( USHORT i = 0; i < nPos; i++ )
+ for ( sal_uInt16 i = 0; i < nPos; i++ )
nX += mpItemList->GetObject( i )->mnSize;
return nX;
}
// -----------------------------------------------------------------------
-Rectangle HeaderBar::ImplGetItemRect( USHORT nPos ) const
+Rectangle HeaderBar::ImplGetItemRect( sal_uInt16 nPos ) const
{
Rectangle aRect( ImplGetItemPos( nPos ), 0, 0, mnDY-1 );
aRect.Right() = aRect.Left() + mpItemList->GetObject( nPos )->mnSize - 1;
@@ -216,21 +216,21 @@ Rectangle HeaderBar::ImplGetItemRect( USHORT nPos ) const
// -----------------------------------------------------------------------
-USHORT HeaderBar::ImplHitTest( const Point& rPos,
- long& nMouseOff, USHORT& nPos ) const
+sal_uInt16 HeaderBar::ImplHitTest( const Point& rPos,
+ long& nMouseOff, sal_uInt16& nPos ) const
{
ImplHeadItem* pItem;
- USHORT nCount = (USHORT)mpItemList->Count();
- BOOL bLastFixed = TRUE;
+ sal_uInt16 nCount = (sal_uInt16)mpItemList->Count();
+ sal_Bool bLastFixed = sal_True;
long nX = -mnOffset;
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
pItem = mpItemList->GetObject( i );
if ( rPos.X() < (nX+pItem->mnSize) )
{
- USHORT nMode;
+ sal_uInt16 nMode;
if ( !bLastFixed && (rPos.X() < (nX+HEADERBAR_SPLITOFF)) )
{
@@ -258,9 +258,9 @@ USHORT HeaderBar::ImplHitTest( const Point& rPos,
}
if ( pItem->mnBits & HIB_FIXED )
- bLastFixed = TRUE;
+ bLastFixed = sal_True;
else
- bLastFixed = FALSE;
+ bLastFixed = sal_False;
nX += pItem->mnSize;
}
@@ -281,7 +281,7 @@ USHORT HeaderBar::ImplHitTest( const Point& rPos,
// -----------------------------------------------------------------------
-void HeaderBar::ImplInvertDrag( USHORT nStartPos, USHORT nEndPos )
+void HeaderBar::ImplInvertDrag( sal_uInt16 nStartPos, sal_uInt16 nEndPos )
{
Rectangle aRect1 = ImplGetItemRect( nStartPos );
Rectangle aRect2 = ImplGetItemRect( nEndPos );
@@ -330,10 +330,10 @@ void HeaderBar::ImplInvertDrag( USHORT nStartPos, USHORT nEndPos )
// -----------------------------------------------------------------------
void HeaderBar::ImplDrawItem( OutputDevice* pDev,
- USHORT nPos, BOOL bHigh, BOOL bDrag,
+ sal_uInt16 nPos, sal_Bool bHigh, sal_Bool bDrag,
const Rectangle& rItemRect,
const Rectangle* pRect,
- ULONG )
+ sal_uLong )
{
Rectangle aRect = rItemRect;
@@ -387,9 +387,9 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
// avoid 3D borders
Color aSelectionTextColor( COL_TRANSPARENT );
if( bHigh )
- DrawSelectionBackground( aRect, 1, TRUE, FALSE, FALSE, &aSelectionTextColor );
+ DrawSelectionBackground( aRect, 1, sal_True, sal_False, sal_False, &aSelectionTextColor );
else if ( !mbButtonStyle || (nBits & HIB_FLAT) )
- DrawSelectionBackground( aRect, 0, TRUE, FALSE, FALSE, &aSelectionTextColor );
+ DrawSelectionBackground( aRect, 0, sal_True, sal_False, sal_False, &aSelectionTextColor );
// Wenn kein Platz, dann brauchen wir auch nichts ausgeben
if ( aRect.GetWidth() < 1 )
@@ -416,14 +416,14 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
}
// Text auf entsprechende Laenge kuerzen
- BOOL bLeftText = FALSE;
+ sal_Bool bLeftText = sal_False;
long nMaxTxtWidth = aRect.GetWidth()-(HEADERBAR_TEXTOFF*2)-nArrowWidth;
if ( nBits & (HIB_LEFTIMAGE | HIB_RIGHTIMAGE) )
nMaxTxtWidth -= aImageSize.Width();
long nTxtWidth = aTxtSize.Width();
if ( nTxtWidth > nMaxTxtWidth )
{
- bLeftText = TRUE;
+ bLeftText = sal_True;
// 3 == Len of "..."
pItem->maOutText.AppendAscii( "..." );
do
@@ -557,7 +557,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
}
if ( nImagePos+aImageSize.Width() <= aRect.Right() )
{
- USHORT nStyle = 0;
+ sal_uInt16 nStyle = 0;
if ( !IsEnabled() )
nStyle |= IMAGE_DRAW_DISABLE;
pDev->DrawImage( Point( nImagePos, nImagePosY ), pItem->maImage, nStyle );
@@ -580,11 +580,11 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
}
// Feststellen, ob Platz genug ist, das Item zu malen
- BOOL bDraw = TRUE;
+ sal_Bool bDraw = sal_True;
if ( nArrowX < aRect.Left()+HEADERBAR_TEXTOFF )
- bDraw = FALSE;
+ bDraw = sal_False;
else if ( nArrowX+HEAD_ARROWSIZE2 > aRect.Right() )
- bDraw = FALSE;
+ bDraw = sal_False;
if ( bDraw )
{
@@ -643,7 +643,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
// -----------------------------------------------------------------------
-void HeaderBar::ImplDrawItem( USHORT nPos, BOOL bHigh, BOOL bDrag,
+void HeaderBar::ImplDrawItem( sal_uInt16 nPos, sal_Bool bHigh, sal_Bool bDrag,
const Rectangle* pRect )
{
Rectangle aRect = ImplGetItemRect( nPos );
@@ -652,14 +652,14 @@ void HeaderBar::ImplDrawItem( USHORT nPos, BOOL bHigh, BOOL bDrag,
// -----------------------------------------------------------------------
-void HeaderBar::ImplUpdate( USHORT nPos, BOOL bEnd, BOOL bDirect )
+void HeaderBar::ImplUpdate( sal_uInt16 nPos, sal_Bool bEnd, sal_Bool bDirect )
{
if ( IsVisible() && IsUpdateMode() )
{
if ( !bDirect )
{
Rectangle aRect;
- USHORT nItemCount = (USHORT)(mpItemList->Count());
+ sal_uInt16 nItemCount = (sal_uInt16)(mpItemList->Count());
if ( nPos < nItemCount )
aRect = ImplGetItemRect( nPos );
else
@@ -676,11 +676,11 @@ void HeaderBar::ImplUpdate( USHORT nPos, BOOL bEnd, BOOL bDirect )
}
else
{
- for ( USHORT i = nPos; i < mpItemList->Count(); i++ )
+ for ( sal_uInt16 i = nPos; i < mpItemList->Count(); i++ )
ImplDrawItem( i );
if ( bEnd )
{
- Rectangle aRect = ImplGetItemRect( (USHORT)mpItemList->Count() );
+ Rectangle aRect = ImplGetItemRect( (sal_uInt16)mpItemList->Count() );
aRect.Left() = aRect.Right();
aRect.Right() = mnDX-1;
if ( aRect.Left() < aRect.Right() )
@@ -696,31 +696,31 @@ void HeaderBar::ImplUpdate( USHORT nPos, BOOL bEnd, BOOL bDirect )
// -----------------------------------------------------------------------
-void HeaderBar::ImplStartDrag( const Point& rMousePos, BOOL bCommand )
+void HeaderBar::ImplStartDrag( const Point& rMousePos, sal_Bool bCommand )
{
- USHORT nPos;
- USHORT nHitTest = ImplHitTest( rMousePos, mnMouseOff, nPos );
+ sal_uInt16 nPos;
+ sal_uInt16 nHitTest = ImplHitTest( rMousePos, mnMouseOff, nPos );
if ( nHitTest )
{
- mbDrag = FALSE;
+ mbDrag = sal_False;
ImplHeadItem* pItem = mpItemList->GetObject( nPos );
if ( nHitTest & HEAD_HITTEST_DIVIDER )
- mbDrag = TRUE;
+ mbDrag = sal_True;
else
{
if ( ((pItem->mnBits & HIB_CLICKABLE) && !(pItem->mnBits & HIB_FLAT)) ||
(mbDragable && !(pItem->mnBits & HIB_FIXEDPOS)) )
{
- mbItemMode = TRUE;
- mbDrag = TRUE;
+ mbItemMode = sal_True;
+ mbDrag = sal_True;
if ( bCommand )
{
if ( mbDragable )
- mbItemDrag = TRUE;
+ mbItemDrag = sal_True;
else
{
- mbItemMode = FALSE;
- mbDrag = FALSE;
+ mbItemMode = sal_False;
+ mbDrag = sal_False;
}
}
}
@@ -737,7 +737,7 @@ void HeaderBar::ImplStartDrag( const Point& rMousePos, BOOL bCommand )
if ( mbDrag )
{
- mbOutDrag = FALSE;
+ mbOutDrag = sal_False;
mnCurItemId = pItem->mnId;
mnItemDragPos = nPos;
StartTracking();
@@ -745,7 +745,7 @@ void HeaderBar::ImplStartDrag( const Point& rMousePos, BOOL bCommand )
mnDragPos = mnStartPos;
StartDrag();
if ( mbItemMode )
- ImplDrawItem( nPos, TRUE, mbItemDrag );
+ ImplDrawItem( nPos, sal_True, mbItemDrag );
else
{
Rectangle aSizeRect( mnDragPos, 0, mnDragPos, mnDragSize+mnDY );
@@ -761,17 +761,17 @@ void HeaderBar::ImplStartDrag( const Point& rMousePos, BOOL bCommand )
void HeaderBar::ImplDrag( const Point& rMousePos )
{
- BOOL bNewOutDrag;
- USHORT nPos = GetItemPos( mnCurItemId );
+ sal_Bool bNewOutDrag;
+ sal_uInt16 nPos = GetItemPos( mnCurItemId );
mnDragPos = rMousePos.X()-mnMouseOff;
if ( mbItemMode )
{
Rectangle aItemRect = ImplGetItemRect( nPos );
if ( aItemRect.IsInside( rMousePos ) )
- bNewOutDrag = FALSE;
+ bNewOutDrag = sal_False;
else
- bNewOutDrag = TRUE;
+ bNewOutDrag = sal_True;
// Evt. ItemDrag anschalten
if ( bNewOutDrag && mbDragable && !mbItemDrag &&
@@ -779,24 +779,24 @@ void HeaderBar::ImplDrag( const Point& rMousePos )
{
if ( (rMousePos.Y() >= aItemRect.Top()) && (rMousePos.Y() <= aItemRect.Bottom()) )
{
- mbItemDrag = TRUE;
- ImplDrawItem( nPos, TRUE, mbItemDrag );
+ mbItemDrag = sal_True;
+ ImplDrawItem( nPos, sal_True, mbItemDrag );
}
}
- USHORT nOldItemDragPos = mnItemDragPos;
+ sal_uInt16 nOldItemDragPos = mnItemDragPos;
if ( mbItemDrag )
{
if ( (rMousePos.Y() < -HEADERBAR_DRAGOUTOFF) || (rMousePos.Y() > mnDY+HEADERBAR_DRAGOUTOFF) )
- bNewOutDrag = TRUE;
+ bNewOutDrag = sal_True;
else
- bNewOutDrag = FALSE;
+ bNewOutDrag = sal_False;
if ( bNewOutDrag )
mnItemDragPos = HEADERBAR_ITEM_NOTFOUND;
else
{
- USHORT nTempId = GetItemId( Point( rMousePos.X(), 2 ) );
+ sal_uInt16 nTempId = GetItemId( Point( rMousePos.X(), 2 ) );
if ( nTempId )
mnItemDragPos = GetItemPos( nTempId );
else
@@ -840,7 +840,7 @@ void HeaderBar::ImplDrag( const Point& rMousePos )
(mnItemDragPos != nPos) &&
(mnItemDragPos != HEADERBAR_ITEM_NOTFOUND) )
{
- ImplDrawItem( mnItemDragPos, FALSE, TRUE );
+ ImplDrawItem( mnItemDragPos, sal_False, sal_True );
ImplInvertDrag( nPos, mnItemDragPos );
}
}
@@ -866,7 +866,7 @@ void HeaderBar::ImplDrag( const Point& rMousePos )
// -----------------------------------------------------------------------
-void HeaderBar::ImplEndDrag( BOOL bCancel )
+void HeaderBar::ImplEndDrag( sal_Bool bCancel )
{
HideTracking();
@@ -874,7 +874,7 @@ void HeaderBar::ImplEndDrag( BOOL bCancel )
{
if ( mbItemMode && (!mbOutDrag || mbItemDrag) )
{
- USHORT nPos = GetItemPos( mnCurItemId );
+ sal_uInt16 nPos = GetItemPos( mnCurItemId );
ImplDrawItem( nPos );
}
@@ -882,7 +882,7 @@ void HeaderBar::ImplEndDrag( BOOL bCancel )
}
else
{
- USHORT nPos = GetItemPos( mnCurItemId );
+ sal_uInt16 nPos = GetItemPos( mnCurItemId );
if ( mbItemMode )
{
if ( mbItemDrag )
@@ -911,18 +911,18 @@ void HeaderBar::ImplEndDrag( BOOL bCancel )
{
ImplHeadItem* pItem = mpItemList->GetObject( nPos );
pItem->mnSize += nDelta;
- ImplUpdate( nPos, TRUE );
+ ImplUpdate( nPos, sal_True );
}
}
}
- mbDrag = FALSE;
+ mbDrag = sal_False;
EndDrag();
mnCurItemId = 0;
mnItemDragPos = HEADERBAR_ITEM_NOTFOUND;
- mbOutDrag = FALSE;
- mbItemMode = FALSE;
- mbItemDrag = FALSE;
+ mbOutDrag = sal_False;
+ mbItemMode = sal_False;
+ mbItemDrag = sal_False;
}
// -----------------------------------------------------------------------
@@ -934,23 +934,23 @@ void HeaderBar::MouseButtonDown( const MouseEvent& rMEvt )
if ( rMEvt.GetClicks() == 2 )
{
long nTemp;
- USHORT nPos;
- USHORT nHitTest = ImplHitTest( rMEvt.GetPosPixel(), nTemp, nPos );
+ sal_uInt16 nPos;
+ sal_uInt16 nHitTest = ImplHitTest( rMEvt.GetPosPixel(), nTemp, nPos );
if ( nHitTest )
{
ImplHeadItem* pItem = mpItemList->GetObject( nPos );
if ( nHitTest & HEAD_HITTEST_DIVIDER )
- mbItemMode = FALSE;
+ mbItemMode = sal_False;
else
- mbItemMode = TRUE;
+ mbItemMode = sal_True;
mnCurItemId = pItem->mnId;
DoubleClick();
- mbItemMode = FALSE;
+ mbItemMode = sal_False;
mnCurItemId = 0;
}
}
else
- ImplStartDrag( rMEvt.GetPosPixel(), FALSE );
+ ImplStartDrag( rMEvt.GetPosPixel(), sal_False );
}
}
@@ -959,9 +959,9 @@ void HeaderBar::MouseButtonDown( const MouseEvent& rMEvt )
void HeaderBar::MouseMove( const MouseEvent& rMEvt )
{
long nTemp1;
- USHORT nTemp2;
+ sal_uInt16 nTemp2;
PointerStyle eStyle = POINTER_ARROW;
- USHORT nHitTest = ImplHitTest( rMEvt.GetPosPixel(), nTemp1, nTemp2 );
+ sal_uInt16 nHitTest = ImplHitTest( rMEvt.GetPosPixel(), nTemp1, nTemp2 );
if ( nHitTest & HEAD_HITTEST_DIVIDER )
eStyle = POINTER_HSIZEBAR;
@@ -1000,20 +1000,20 @@ void HeaderBar::Paint( const Rectangle& rRect )
}
}
- USHORT nCurItemPos;
+ sal_uInt16 nCurItemPos;
if ( mbDrag )
nCurItemPos = GetItemPos( mnCurItemId );
else
nCurItemPos = HEADERBAR_ITEM_NOTFOUND;
- USHORT nItemCount = (USHORT)mpItemList->Count();
- for ( USHORT i = 0; i < nItemCount; i++ )
- ImplDrawItem( i, (i == nCurItemPos) ? TRUE : FALSE, FALSE, &rRect );
+ sal_uInt16 nItemCount = (sal_uInt16)mpItemList->Count();
+ for ( sal_uInt16 i = 0; i < nItemCount; i++ )
+ ImplDrawItem( i, (i == nCurItemPos) ? sal_True : sal_False, sal_False, &rRect );
}
// -----------------------------------------------------------------------
void HeaderBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
- ULONG nFlags )
+ sal_uLong nFlags )
{
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
@@ -1050,8 +1050,8 @@ void HeaderBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
Rectangle aItemRect( aRect );
// aItemRect.Bottom()--;
- USHORT nItemCount = (USHORT)mpItemList->Count();
- for ( USHORT i = 0; i < nItemCount; i++ )
+ sal_uInt16 nItemCount = (sal_uInt16)mpItemList->Count();
+ for ( sal_uInt16 i = 0; i < nItemCount; i++ )
{
aItemRect.Left() = aRect.Left()+ImplGetItemPos( i );
aItemRect.Right() = aItemRect.Left() + mpItemList->GetObject( i )->mnSize - 1;
@@ -1060,7 +1060,7 @@ void HeaderBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
aItemRect.Right() = 16000;
Region aRegion( aRect );
pDev->SetClipRegion( aRegion );
- ImplDrawItem( pDev, i, FALSE, FALSE, aItemRect, &aRect, nFlags );
+ ImplDrawItem( pDev, i, sal_False, sal_False, aItemRect, &aRect, nFlags );
pDev->SetClipRegion();
}
@@ -1084,7 +1084,7 @@ void HeaderBar::Command( const CommandEvent& rCEvt )
{
if ( rCEvt.IsMouseEvent() && (rCEvt.GetCommand() == COMMAND_STARTDRAG) && !mbDrag )
{
- ImplStartDrag( rCEvt.GetMousePosPixel(), TRUE );
+ ImplStartDrag( rCEvt.GetMousePosPixel(), sal_True );
return;
}
@@ -1095,7 +1095,7 @@ void HeaderBar::Command( const CommandEvent& rCEvt )
void HeaderBar::RequestHelp( const HelpEvent& rHEvt )
{
- USHORT nItemId = GetItemId( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) );
+ sal_uInt16 nItemId = GetItemId( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) );
if ( nItemId )
{
if ( rHEvt.GetMode() & (HELPMODE_QUICK | HELPMODE_BALLOON) )
@@ -1158,17 +1158,17 @@ void HeaderBar::StateChanged( StateChangedType nType )
else if ( (nType == STATE_CHANGE_ZOOM) ||
(nType == STATE_CHANGE_CONTROLFONT) )
{
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
{
- ImplInitSettings( FALSE, TRUE, FALSE );
+ ImplInitSettings( sal_False, sal_True, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
{
- ImplInitSettings( FALSE, FALSE, TRUE );
+ ImplInitSettings( sal_False, sal_False, sal_True );
Invalidate();
}
}
@@ -1184,7 +1184,7 @@ void HeaderBar::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE)) )
{
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
Invalidate();
}
}
@@ -1232,8 +1232,8 @@ void HeaderBar::DoubleClick()
// -----------------------------------------------------------------------
-void HeaderBar::InsertItem( USHORT nItemId, const Image& rImage,
- long nSize, HeaderBarItemBits nBits, USHORT nPos )
+void HeaderBar::InsertItem( sal_uInt16 nItemId, const Image& rImage,
+ long nSize, HeaderBarItemBits nBits, sal_uInt16 nPos )
{
DBG_ASSERT( nItemId, "HeaderBar::InsertItem(): ItemId == 0" );
DBG_ASSERT( GetItemPos( nItemId ) == HEADERBAR_ITEM_NOTFOUND,
@@ -1249,13 +1249,13 @@ void HeaderBar::InsertItem( USHORT nItemId, const Image& rImage,
mpItemList->Insert( pItem, nPos );
// Ausgabe updaten
- ImplUpdate( nPos, TRUE );
+ ImplUpdate( nPos, sal_True );
}
// -----------------------------------------------------------------------
-void HeaderBar::InsertItem( USHORT nItemId, const XubString& rText,
- long nSize, HeaderBarItemBits nBits, USHORT nPos )
+void HeaderBar::InsertItem( sal_uInt16 nItemId, const XubString& rText,
+ long nSize, HeaderBarItemBits nBits, sal_uInt16 nPos )
{
DBG_ASSERT( nItemId, "HeaderBar::InsertItem(): ItemId == 0" );
DBG_ASSERT( GetItemPos( nItemId ) == HEADERBAR_ITEM_NOTFOUND,
@@ -1271,15 +1271,15 @@ void HeaderBar::InsertItem( USHORT nItemId, const XubString& rText,
mpItemList->Insert( pItem, nPos );
// Ausgabe updaten
- ImplUpdate( nPos, TRUE );
+ ImplUpdate( nPos, sal_True );
}
// -----------------------------------------------------------------------
-void HeaderBar::InsertItem( USHORT nItemId,
+void HeaderBar::InsertItem( sal_uInt16 nItemId,
const Image& rImage, const XubString& rText,
long nSize, HeaderBarItemBits nBits,
- USHORT nPos )
+ sal_uInt16 nPos )
{
DBG_ASSERT( nItemId, "HeaderBar::InsertItem(): ItemId == 0" );
DBG_ASSERT( GetItemPos( nItemId ) == HEADERBAR_ITEM_NOTFOUND,
@@ -1296,27 +1296,27 @@ void HeaderBar::InsertItem( USHORT nItemId,
mpItemList->Insert( pItem, nPos );
// Ausgabe updaten
- ImplUpdate( nPos, TRUE );
+ ImplUpdate( nPos, sal_True );
}
// -----------------------------------------------------------------------
-void HeaderBar::RemoveItem( USHORT nItemId )
+void HeaderBar::RemoveItem( sal_uInt16 nItemId )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
{
ImplHeadItem* pItem = mpItemList->Remove( nPos );
delete pItem;
- ImplUpdate( nPos, TRUE );
+ ImplUpdate( nPos, sal_True );
}
}
// -----------------------------------------------------------------------
-void HeaderBar::MoveItem( USHORT nItemId, USHORT nNewPos )
+void HeaderBar::MoveItem( sal_uInt16 nItemId, sal_uInt16 nNewPos )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
{
if ( nPos != nNewPos )
@@ -1325,7 +1325,7 @@ void HeaderBar::MoveItem( USHORT nItemId, USHORT nNewPos )
if ( nNewPos < nPos )
nPos = nNewPos;
mpItemList->Insert( pItem, nNewPos );
- ImplUpdate( nPos, TRUE );
+ ImplUpdate( nPos, sal_True );
}
}
}
@@ -1343,7 +1343,7 @@ void HeaderBar::Clear()
}
mpItemList->Clear();
- ImplUpdate( 0, TRUE );
+ ImplUpdate( 0, sal_True );
}
// -----------------------------------------------------------------------
@@ -1363,20 +1363,20 @@ void HeaderBar::SetOffset( long nNewOffset )
// -----------------------------------------------------------------------
-USHORT HeaderBar::GetItemCount() const
+sal_uInt16 HeaderBar::GetItemCount() const
{
- return (USHORT)mpItemList->Count();
+ return (sal_uInt16)mpItemList->Count();
}
// -----------------------------------------------------------------------
-USHORT HeaderBar::GetItemPos( USHORT nItemId ) const
+sal_uInt16 HeaderBar::GetItemPos( sal_uInt16 nItemId ) const
{
ImplHeadItem* pItem = mpItemList->First();
while ( pItem )
{
if ( pItem->mnId == nItemId )
- return (USHORT)mpItemList->GetCurPos();
+ return (sal_uInt16)mpItemList->GetCurPos();
pItem = mpItemList->Next();
}
@@ -1385,7 +1385,7 @@ USHORT HeaderBar::GetItemPos( USHORT nItemId ) const
// -----------------------------------------------------------------------
-USHORT HeaderBar::GetItemId( USHORT nPos ) const
+sal_uInt16 HeaderBar::GetItemId( sal_uInt16 nPos ) const
{
ImplHeadItem* pItem = mpItemList->GetObject( nPos );
if ( pItem )
@@ -1396,9 +1396,9 @@ USHORT HeaderBar::GetItemId( USHORT nPos ) const
// -----------------------------------------------------------------------
-USHORT HeaderBar::GetItemId( const Point& rPos ) const
+sal_uInt16 HeaderBar::GetItemId( const Point& rPos ) const
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
while ( nPos < mpItemList->Count() )
{
if ( ImplGetItemRect( nPos ).IsInside( rPos ) )
@@ -1412,10 +1412,10 @@ USHORT HeaderBar::GetItemId( const Point& rPos ) const
// -----------------------------------------------------------------------
-Rectangle HeaderBar::GetItemRect( USHORT nItemId ) const
+Rectangle HeaderBar::GetItemRect( sal_uInt16 nItemId ) const
{
Rectangle aRect;
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
aRect = ImplGetItemRect( nPos );
return aRect;
@@ -1423,25 +1423,25 @@ Rectangle HeaderBar::GetItemRect( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void HeaderBar::SetItemSize( USHORT nItemId, long nNewSize )
+void HeaderBar::SetItemSize( sal_uInt16 nItemId, long nNewSize )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
{
ImplHeadItem* pItem = mpItemList->GetObject( nPos );
if ( pItem->mnSize != nNewSize )
{
pItem->mnSize = nNewSize;
- ImplUpdate( nPos, TRUE );
+ ImplUpdate( nPos, sal_True );
}
}
}
// -----------------------------------------------------------------------
-long HeaderBar::GetItemSize( USHORT nItemId ) const
+long HeaderBar::GetItemSize( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
return mpItemList->GetObject( nPos )->mnSize;
else
@@ -1450,9 +1450,9 @@ long HeaderBar::GetItemSize( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void HeaderBar::SetItemBits( USHORT nItemId, HeaderBarItemBits nNewBits )
+void HeaderBar::SetItemBits( sal_uInt16 nItemId, HeaderBarItemBits nNewBits )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
{
ImplHeadItem* pItem = mpItemList->GetObject( nPos );
@@ -1466,9 +1466,9 @@ void HeaderBar::SetItemBits( USHORT nItemId, HeaderBarItemBits nNewBits )
// -----------------------------------------------------------------------
-HeaderBarItemBits HeaderBar::GetItemBits( USHORT nItemId ) const
+HeaderBarItemBits HeaderBar::GetItemBits( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
return mpItemList->GetObject( nPos )->mnBits;
else
@@ -1477,9 +1477,9 @@ HeaderBarItemBits HeaderBar::GetItemBits( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void HeaderBar::SetItemData( USHORT nItemId, void* pNewData )
+void HeaderBar::SetItemData( sal_uInt16 nItemId, void* pNewData )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
{
mpItemList->GetObject( nPos )->mpUserData = pNewData;
@@ -1489,9 +1489,9 @@ void HeaderBar::SetItemData( USHORT nItemId, void* pNewData )
// -----------------------------------------------------------------------
-void* HeaderBar::GetItemData( USHORT nItemId ) const
+void* HeaderBar::GetItemData( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
return mpItemList->GetObject( nPos )->mpUserData;
else
@@ -1500,9 +1500,9 @@ void* HeaderBar::GetItemData( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void HeaderBar::SetItemImage( USHORT nItemId, const Image& rImage )
+void HeaderBar::SetItemImage( sal_uInt16 nItemId, const Image& rImage )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
{
mpItemList->GetObject( nPos )->maImage = rImage;
@@ -1512,9 +1512,9 @@ void HeaderBar::SetItemImage( USHORT nItemId, const Image& rImage )
// -----------------------------------------------------------------------
-Image HeaderBar::GetItemImage( USHORT nItemId ) const
+Image HeaderBar::GetItemImage( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
return mpItemList->GetObject( nPos )->maImage;
else
@@ -1523,9 +1523,9 @@ Image HeaderBar::GetItemImage( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void HeaderBar::SetItemText( USHORT nItemId, const XubString& rText )
+void HeaderBar::SetItemText( sal_uInt16 nItemId, const XubString& rText )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
{
mpItemList->GetObject( nPos )->maText = rText;
@@ -1535,9 +1535,9 @@ void HeaderBar::SetItemText( USHORT nItemId, const XubString& rText )
// -----------------------------------------------------------------------
-XubString HeaderBar::GetItemText( USHORT nItemId ) const
+XubString HeaderBar::GetItemText( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
return mpItemList->GetObject( nPos )->maText;
else
@@ -1546,18 +1546,18 @@ XubString HeaderBar::GetItemText( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void HeaderBar::SetHelpText( USHORT nItemId, const XubString& rText )
+void HeaderBar::SetHelpText( sal_uInt16 nItemId, const XubString& rText )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
mpItemList->GetObject( nPos )->maHelpText = rText;
}
// -----------------------------------------------------------------------
-XubString HeaderBar::GetHelpText( USHORT nItemId ) const
+XubString HeaderBar::GetHelpText( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
{
ImplHeadItem* pItem = mpItemList->GetObject( nPos );
@@ -1576,18 +1576,18 @@ XubString HeaderBar::GetHelpText( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void HeaderBar::SetHelpId( USHORT nItemId, const rtl::OString& rHelpId )
+void HeaderBar::SetHelpId( sal_uInt16 nItemId, const rtl::OString& rHelpId )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
mpItemList->GetObject( nPos )->maHelpId = rHelpId;
}
// -----------------------------------------------------------------------
-rtl::OString HeaderBar::GetHelpId( USHORT nItemId ) const
+rtl::OString HeaderBar::GetHelpId( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
rtl::OString aRet;
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
aRet = mpItemList->GetObject( nPos )->maHelpId;
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index 574f2bde4e1e..94db99a66194 100755
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -116,17 +116,17 @@ class SvtMatchContext_Impl : public ::vos::OThread
String aBaseURL;
String aText;
SvtURLBox* pBox;
- BOOL bStop;
- BOOL bOnlyDirectories;
- BOOL bNoSelection;
+ sal_Bool bStop;
+ sal_Bool bOnlyDirectories;
+ sal_Bool bNoSelection;
DECL_STATIC_LINK( SvtMatchContext_Impl, Select_Impl, void* );
virtual void SAL_CALL onTerminated( );
virtual void SAL_CALL run();
virtual void SAL_CALL Cancel();
- void Insert( const String& rCompletion, const String& rURL, BOOL bForce = FALSE);
- void ReadFolder( const String& rURL, const String& rMatch, BOOL bSmart );
+ void Insert( const String& rCompletion, const String& rURL, sal_Bool bForce = sal_False);
+ void ReadFolder( const String& rURL, const String& rMatch, sal_Bool bSmart );
void FillPicklist( SvStringsDtor& rPickList );
public:
@@ -154,7 +154,7 @@ SvtMatchContext_Impl::SvtMatchContext_Impl(
, aBaseURL( pBoxP->aBaseURL )
, aText( rText )
, pBox( pBoxP )
- , bStop( FALSE )
+ , bStop( sal_False )
, bOnlyDirectories( pBoxP->bOnlyDirectories )
, bNoSelection( pBoxP->bNoSelection )
{
@@ -199,7 +199,7 @@ void SvtMatchContext_Impl::FillPicklist( SvStringsDtor& rPickList )
seqPropertySet[nProperty].Value >>= sTitle;
aURL.SetURL( sTitle );
const StringPtr pStr = new String( aURL.GetMainURL( INetURLObject::DECODE_WITH_CHARSET ) );
- rPickList.Insert( pStr, (USHORT) nItem );
+ rPickList.Insert( pStr, (sal_uInt16) nItem );
break;
}
}
@@ -216,7 +216,7 @@ void SAL_CALL SvtMatchContext_Impl::Cancel()
//-------------------------------------------------------------------------
void SvtMatchContext_Impl::Stop()
{
- bStop = TRUE;
+ bStop = sal_True;
if( isRunning() )
terminate();
@@ -246,7 +246,7 @@ IMPL_STATIC_LINK( SvtMatchContext_Impl, Select_Impl, void*, )
}
SvtURLBox* pBox = pThis->pBox;
- pBox->bAutoCompleteMode = TRUE;
+ pBox->bAutoCompleteMode = sal_True;
// did we filter completions which otherwise would have been valid?
// (to be filled below)
@@ -255,7 +255,7 @@ IMPL_STATIC_LINK( SvtMatchContext_Impl, Select_Impl, void*, )
// insert all completed strings into the listbox
pBox->Clear();
- for( USHORT nPos = 0; nPos<pThis->pCompletions->Count(); nPos++ )
+ for( sal_uInt16 nPos = 0; nPos<pThis->pCompletions->Count(); nPos++ )
{
String sCompletion( *(*pThis->pCompletions)[nPos] );
@@ -325,12 +325,12 @@ IMPL_STATIC_LINK( SvtMatchContext_Impl, Select_Impl, void*, )
//-------------------------------------------------------------------------
void SvtMatchContext_Impl::Insert( const String& rCompletion,
const String& rURL,
- BOOL bForce )
+ sal_Bool bForce )
{
if( !bForce )
{
// avoid doubles
- for( USHORT nPos = pCompletions->Count(); nPos--; )
+ for( sal_uInt16 nPos = pCompletions->Count(); nPos--; )
if( *(*pCompletions)[ nPos ] == rCompletion )
return;
}
@@ -344,7 +344,7 @@ void SvtMatchContext_Impl::Insert( const String& rCompletion,
//-------------------------------------------------------------------------
void SvtMatchContext_Impl::ReadFolder( const String& rURL,
const String& rMatch,
- BOOL bSmart )
+ sal_Bool bSmart )
{
// check folder to scan
if( !UCBContentHelper::IsFolder( rURL ) )
@@ -369,7 +369,7 @@ void SvtMatchContext_Impl::ReadFolder( const String& rURL,
String aNewText( aText );
aNewText += '/';
- Insert( aNewText, rURL, TRUE );
+ Insert( aNewText, rURL, sal_True );
return;
}
@@ -495,7 +495,7 @@ void SvtMatchContext_Impl::ReadFolder( const String& rURL,
if ( bIsFolder )
aInput += aDelimiter;
- Insert( aInput, aObj.GetMainURL( INetURLObject::NO_DECODE ), TRUE );
+ Insert( aInput, aObj.GetMainURL( INetURLObject::NO_DECODE ), sal_True );
}
}
}
@@ -564,7 +564,7 @@ String SvtURLBox::ParseSmart( String aText, String aBaseURL, String aWorkDir )
aObj.setFinalSlash();
// take base URL and append current input
- bool bWasAbsolute = FALSE;
+ bool bWasAbsolute = sal_False;
#ifdef UNX
// don't support FSYS_MAC under Unix, because here ':' is a valid character for a filename
INetURLObject::FSysStyle eStyle = static_cast< INetURLObject::FSysStyle >( INetURLObject::FSYS_VOS | INetURLObject::FSYS_UNX | INetURLObject::FSYS_DOS );
@@ -605,7 +605,7 @@ void SvtMatchContext_Impl::run()
pURLs->Remove( 0, pURLs->Count() );
// check for input
- USHORT nTextLen = aText.Len();
+ sal_uInt16 nTextLen = aText.Len();
if ( !nTextLen )
return;
@@ -657,7 +657,7 @@ void SvtMatchContext_Impl::run()
// don't scan history picklist if only directories are allowed, picklist contains only files
return;
- BOOL bFull = FALSE;
+ sal_Bool bFull = sal_False;
int nCount = aPickList.Count();
INetURLObject aCurObj;
@@ -666,7 +666,7 @@ void SvtMatchContext_Impl::run()
aObj.SetSmartProtocol( eSmartProt == INET_PROT_NOT_VALID ? INET_PROT_HTTP : eSmartProt );
for( ;; )
{
- for( USHORT nPos = 0; schedule() && nPos < nCount; nPos++ )
+ for( sal_uInt16 nPos = 0; schedule() && nPos < nCount; nPos++ )
{
aCurObj.SetURL( *aPickList.GetObject( nPos ) );
aCurObj.SetSmartURL( aCurObj.GetURLNoPass());
@@ -756,7 +756,7 @@ void SvtMatchContext_Impl::run()
}
if( !bFull )
- bFull = TRUE;
+ bFull = sal_True;
else
break;
}
@@ -767,7 +767,7 @@ void SvtMatchContext_Impl::run()
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
-void SvtURLBox::TryAutoComplete( BOOL bForce )
+void SvtURLBox::TryAutoComplete( sal_Bool bForce )
{
if( Application::AnyInput( INPUT_KEYBOARD ) ) return;
@@ -776,7 +776,7 @@ void SvtURLBox::TryAutoComplete( BOOL bForce )
Selection aSelection( GetSelection() );
if( aSelection.Max() != aCurText.Len() && !bForce )
return;
- USHORT nLen = (USHORT)aSelection.Min();
+ sal_uInt16 nLen = (sal_uInt16)aSelection.Min();
aCurText.Erase( nLen );
if( aCurText.Len() && bIsAutoCompleteEnabled )
{
@@ -794,13 +794,13 @@ SvtURLBox::SvtURLBox( Window* pParent, INetProtocol eSmart )
: ComboBox( pParent , WB_DROPDOWN | WB_AUTOSIZE | WB_AUTOHSCROLL ),
pCtx( 0 ),
eSmartProtocol( eSmart ),
- bAutoCompleteMode( FALSE ),
- bOnlyDirectories( FALSE ),
- bTryAutoComplete( FALSE ),
- bCtrlClick( FALSE ),
- bHistoryDisabled( FALSE ),
- bNoSelection( FALSE ),
- bIsAutoCompleteEnabled( TRUE )
+ bAutoCompleteMode( sal_False ),
+ bOnlyDirectories( sal_False ),
+ bTryAutoComplete( sal_False ),
+ bCtrlClick( sal_False ),
+ bHistoryDisabled( sal_False ),
+ bNoSelection( sal_False ),
+ bIsAutoCompleteEnabled( sal_True )
{
ImplInit();
@@ -815,13 +815,13 @@ SvtURLBox::SvtURLBox( Window* pParent, WinBits _nStyle, INetProtocol eSmart )
: ComboBox( pParent, _nStyle ),
pCtx( 0 ),
eSmartProtocol( eSmart ),
- bAutoCompleteMode( FALSE ),
- bOnlyDirectories( FALSE ),
- bTryAutoComplete( FALSE ),
- bCtrlClick( FALSE ),
- bHistoryDisabled( FALSE ),
- bNoSelection( FALSE ),
- bIsAutoCompleteEnabled( TRUE )
+ bAutoCompleteMode( sal_False ),
+ bOnlyDirectories( sal_False ),
+ bTryAutoComplete( sal_False ),
+ bCtrlClick( sal_False ),
+ bHistoryDisabled( sal_False ),
+ bNoSelection( sal_False ),
+ bIsAutoCompleteEnabled( sal_True )
{
ImplInit();
}
@@ -831,13 +831,13 @@ SvtURLBox::SvtURLBox( Window* pParent, const ResId& _rResId, INetProtocol eSmart
: ComboBox( pParent , _rResId ),
pCtx( 0 ),
eSmartProtocol( eSmart ),
- bAutoCompleteMode( FALSE ),
- bOnlyDirectories( FALSE ),
- bTryAutoComplete( FALSE ),
- bCtrlClick( FALSE ),
- bHistoryDisabled( FALSE ),
- bNoSelection( FALSE ),
- bIsAutoCompleteEnabled( TRUE )
+ bAutoCompleteMode( sal_False ),
+ bOnlyDirectories( sal_False ),
+ bTryAutoComplete( sal_False ),
+ bCtrlClick( sal_False ),
+ bHistoryDisabled( sal_False ),
+ bNoSelection( sal_False ),
+ bIsAutoCompleteEnabled( sal_True )
{
ImplInit();
}
@@ -847,8 +847,9 @@ void SvtURLBox::ImplInit()
{
pImp = new SvtURLBox_Impl();
- SetHelpId( ".uno:OpenURL" );
- EnableAutocomplete( FALSE );
+ if ( GetHelpId().getLength() == 0 )
+ SetHelpId( ".uno:OpenURL" );
+ EnableAutocomplete( sal_False );
SetText( String() );
@@ -930,7 +931,7 @@ void SvtURLBox::UpdatePicklistForSmartProtocol_Impl()
if ( aURL.Len() && ( !pImp->pUrlFilter || pImp->pUrlFilter->isUrlAllowed( aURL ) ) )
{
- BOOL bFound = (aURL.GetChar(aURL.Len()-1) == '/' );
+ sal_Bool bFound = (aURL.GetChar(aURL.Len()-1) == '/' );
if ( !bFound )
{
String aUpperURL( aURL );
@@ -960,7 +961,7 @@ void SvtURLBox::UpdatePicklistForSmartProtocol_Impl()
}
//-------------------------------------------------------------------------
-BOOL SvtURLBox::ProcessKey( const KeyCode& rKey )
+sal_Bool SvtURLBox::ProcessKey( const KeyCode& rKey )
{
// every key input stops the current matching thread
if( pCtx )
@@ -978,7 +979,7 @@ BOOL SvtURLBox::ProcessKey( const KeyCode& rKey )
if ( bAutoCompleteMode )
{
// reset picklist
- bAutoCompleteMode = FALSE;
+ bAutoCompleteMode = sal_False;
Selection aSelection( GetSelection() );
SetSelection( Selection( aSelection.Min(), aSelection.Min() ) );
if ( bOnlyDirectories )
@@ -989,19 +990,19 @@ BOOL SvtURLBox::ProcessKey( const KeyCode& rKey )
}
bCtrlClick = rKey.IsMod1();
- BOOL bHandled = FALSE;
+ sal_Bool bHandled = sal_False;
if ( GetOpenHdl().IsSet() )
{
- bHandled = TRUE;
+ bHandled = sal_True;
GetOpenHdl().Call(this);
}
else if ( GetSelectHdl().IsSet() )
{
- bHandled = TRUE;
+ bHandled = sal_True;
GetSelectHdl().Call(this);
}
- bCtrlClick = FALSE;
+ bCtrlClick = sal_False;
ClearModifyFlag();
return bHandled;
@@ -1009,9 +1010,9 @@ BOOL SvtURLBox::ProcessKey( const KeyCode& rKey )
else if ( aCode == KEY_RETURN && !GetText().Len() && GetOpenHdl().IsSet() )
{
// for file dialog
- bAutoCompleteMode = FALSE;
+ bAutoCompleteMode = sal_False;
GetOpenHdl().Call(this);
- return TRUE;
+ return sal_True;
}
else if( aCode == KEY_ESCAPE )
{
@@ -1027,15 +1028,15 @@ BOOL SvtURLBox::ProcessKey( const KeyCode& rKey )
}
else
{
- return FALSE;
+ return sal_False;
}
- bAutoCompleteMode = FALSE;
- return TRUE;
+ bAutoCompleteMode = sal_False;
+ return sal_True;
}
else
{
- return FALSE;
+ return sal_False;
}
}
@@ -1056,15 +1057,15 @@ long SvtURLBox::PreNotify( NotifyEvent& rNEvt )
KeyCode aCode( rKey.GetCode() );
if( ProcessKey( rKey ) )
{
- return TRUE;
+ return sal_True;
}
else if( ( aCode == KEY_UP || aCode == KEY_DOWN ) && !rKey.IsMod2() )
{
Selection aSelection( GetSelection() );
- USHORT nLen = (USHORT)aSelection.Min();
+ sal_uInt16 nLen = (sal_uInt16)aSelection.Min();
GetSubEdit()->KeyInput( rEvent );
SetSelection( Selection( nLen, GetText().Len() ) );
- return TRUE;
+ return sal_True;
}
if ( MatchesPlaceHolder( GetText() ) )
@@ -1083,7 +1084,7 @@ IMPL_LINK( SvtURLBox, AutoCompleteHdl_Impl, void*, EMPTYARG )
{
if ( GetSubEdit()->GetAutocompleteAction() == AUTOCOMPLETE_KEYINPUT )
{
- TryAutoComplete( FALSE );
+ TryAutoComplete( sal_False );
return 1L;
}
@@ -1122,7 +1123,7 @@ void SvtURLBox::Select()
}
//-------------------------------------------------------------------------
-void SvtURLBox::SetOnlyDirectories( BOOL bDir )
+void SvtURLBox::SetOnlyDirectories( sal_Bool bDir )
{
bOnlyDirectories = bDir;
if ( bOnlyDirectories )
@@ -1130,7 +1131,7 @@ void SvtURLBox::SetOnlyDirectories( BOOL bDir )
}
//-------------------------------------------------------------------------
-void SvtURLBox::SetNoURLSelection( BOOL bSet )
+void SvtURLBox::SetNoURLSelection( sal_Bool bSet )
{
bNoSelection = bSet;
}
@@ -1147,7 +1148,7 @@ String SvtURLBox::GetURL()
// try to get the right case preserving URL from the list of URLs
if ( pImp->pCompletions && pImp->pURLs )
{
- for( USHORT nPos=0; nPos<pImp->pCompletions->Count(); nPos++ )
+ for( sal_uInt16 nPos=0; nPos<pImp->pCompletions->Count(); nPos++ )
{
#ifdef DBG_UTIL
String aTmp( *(*pImp->pCompletions)[ nPos ] );
@@ -1228,7 +1229,7 @@ String SvtURLBox::GetURL()
//-------------------------------------------------------------------------
void SvtURLBox::DisableHistory()
{
- bHistoryDisabled = TRUE;
+ bHistoryDisabled = sal_True;
UpdatePicklistForSmartProtocol_Impl();
}
diff --git a/svtools/source/control/prgsbar.cxx b/svtools/source/control/prgsbar.cxx
index bb57d043b11d..86b49c782398 100755
--- a/svtools/source/control/prgsbar.cxx
+++ b/svtools/source/control/prgsbar.cxx
@@ -44,9 +44,9 @@
void ProgressBar::ImplInit()
{
mnPercent = 0;
- mbCalcNew = TRUE;
+ mbCalcNew = sal_True;
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
}
static WinBits clearProgressBarBorder( Window* pParent, WinBits nOrgStyle )
@@ -85,8 +85,8 @@ ProgressBar::~ProgressBar()
// -----------------------------------------------------------------------
-void ProgressBar::ImplInitSettings( BOOL bFont,
- BOOL bForeground, BOOL bBackground )
+void ProgressBar::ImplInitSettings( sal_Bool bFont,
+ sal_Bool bForeground, sal_Bool bBackground )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -108,8 +108,8 @@ void ProgressBar::ImplInitSettings( BOOL bFont,
{
if( (GetStyle() & WB_BORDER) )
SetBorderStyle( WINDOW_BORDER_REMOVEBORDER );
- EnableChildTransparentMode( TRUE );
- SetPaintTransparent( TRUE );
+ EnableChildTransparentMode( sal_True );
+ SetPaintTransparent( sal_True );
SetBackground();
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
}
@@ -147,18 +147,18 @@ void ProgressBar::ImplInitSettings( BOOL bFont,
// -----------------------------------------------------------------------
-void ProgressBar::ImplDrawProgress( USHORT nOldPerc, USHORT nNewPerc )
+void ProgressBar::ImplDrawProgress( sal_uInt16 nOldPerc, sal_uInt16 nNewPerc )
{
if ( mbCalcNew )
{
- mbCalcNew = FALSE;
+ mbCalcNew = sal_False;
Size aSize = GetOutputSizePixel();
mnPrgsHeight = aSize.Height()-(PROGRESSBAR_WIN_OFFSET*2);
mnPrgsWidth = (mnPrgsHeight*2)/3;
maPos.Y() = PROGRESSBAR_WIN_OFFSET;
long nMaxWidth = (aSize.Width()-(PROGRESSBAR_WIN_OFFSET*2)+PROGRESSBAR_OFFSET);
- USHORT nMaxCount = (USHORT)(nMaxWidth / (mnPrgsWidth+PROGRESSBAR_OFFSET));
+ sal_uInt16 nMaxCount = (sal_uInt16)(nMaxWidth / (mnPrgsWidth+PROGRESSBAR_OFFSET));
if ( nMaxCount <= 1 )
nMaxCount = 1;
else
@@ -187,20 +187,20 @@ void ProgressBar::Paint( const Rectangle& )
void ProgressBar::Resize()
{
- mbCalcNew = TRUE;
+ mbCalcNew = sal_True;
if ( IsReallyVisible() )
Invalidate();
}
// -----------------------------------------------------------------------
-void ProgressBar::SetValue( USHORT nNewPercent )
+void ProgressBar::SetValue( sal_uInt16 nNewPercent )
{
DBG_ASSERTWARNING( nNewPercent <= 100, "StatusBar::SetProgressValue(): nPercent > 100" );
if ( nNewPercent < mnPercent )
{
- mbCalcNew = TRUE;
+ mbCalcNew = sal_True;
mnPercent = nNewPercent;
if ( IsReallyVisible() )
{
@@ -223,19 +223,19 @@ void ProgressBar::StateChanged( StateChangedType nType )
if ( (nType == STATE_CHANGE_ZOOM) ||
(nType == STATE_CHANGE_CONTROLFONT) )
{
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
Invalidate();
}
else
*/
if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
{
- ImplInitSettings( FALSE, TRUE, FALSE );
+ ImplInitSettings( sal_False, sal_True, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
{
- ImplInitSettings( FALSE, FALSE, TRUE );
+ ImplInitSettings( sal_False, sal_False, sal_True );
Invalidate();
}
@@ -249,7 +249,7 @@ void ProgressBar::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
Invalidate();
}
diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx
index f4c04a7000af..118c16c3a4dc 100755
--- a/svtools/source/control/roadmap.cxx
+++ b/svtools/source/control/roadmap.cxx
@@ -120,9 +120,9 @@ namespace svt
void SetClickHdl( const Link& rLink );
const Link& GetClickHdl() const;
- void SetZOrder( RoadmapItem* pRefRoadmapHyperLabel, USHORT nFlags );
- void Enable( BOOL bEnable = TRUE);
- BOOL IsEnabled() const;
+ void SetZOrder( RoadmapItem* pRefRoadmapHyperLabel, sal_uInt16 nFlags );
+ void Enable( sal_Bool bEnable = sal_True);
+ sal_Bool IsEnabled() const;
void GrabFocus();
bool Contains( const Window* _pWindow ) const;
@@ -884,7 +884,7 @@ namespace svt
}
//---------------------------------------------------------------------
- void RoadmapItem::SetZOrder( RoadmapItem* pRefRoadmapHyperLabel, USHORT nFlags )
+ void RoadmapItem::SetZOrder( RoadmapItem* pRefRoadmapHyperLabel, sal_uInt16 nFlags )
{
if (pRefRoadmapHyperLabel == NULL)
mpDescription->SetZOrder( NULL, nFlags); //WINDOW_ZORDER_FIRST );
@@ -893,14 +893,14 @@ namespace svt
}
//---------------------------------------------------------------------
- void RoadmapItem::Enable( BOOL _bEnable)
+ void RoadmapItem::Enable( sal_Bool _bEnable)
{
mpID->Enable(_bEnable);
mpDescription->Enable(_bEnable);
}
//---------------------------------------------------------------------
- BOOL RoadmapItem::IsEnabled() const
+ sal_Bool RoadmapItem::IsEnabled() const
{
return mpID->IsEnabled();
}
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index bdbcd253c198..1c5b95460232 100755
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -103,15 +103,15 @@ private:
long nNullOff;
long nMargin1;
long nMargin2;
- USHORT nLines;
- USHORT nArrows;
- USHORT nBorders;
- USHORT nIndents;
- USHORT nTabs;
- USHORT nMargin1Style;
- USHORT nMargin2Style;
- BOOL bAutoPageWidth;
- BOOL bTextRTL;
+ sal_uInt16 nLines;
+ sal_uInt16 nArrows;
+ sal_uInt16 nBorders;
+ sal_uInt16 nIndents;
+ sal_uInt16 nTabs;
+ sal_uInt16 nMargin1Style;
+ sal_uInt16 nMargin2Style;
+ sal_Bool bAutoPageWidth;
+ sal_Bool bTextRTL;
#ifdef _SV_RULER_CXX
public:
@@ -130,7 +130,7 @@ struct ImplRulerUnitData
long nTick2; // Tick fuer halbe Werte
long nTick3; // Tick fuer Zahlenausgabe
long n100THMM; // Teiler fuer Einheit
- USHORT nUnitDigits; // Anzahl Nachkommastellen
+ sal_uInt16 nUnitDigits; // Anzahl Nachkommastellen
sal_Char aUnitStr[8]; // Einheiten-String
};
@@ -153,13 +153,13 @@ struct ImplRulerHitTest
{
long nPos;
RulerType eType;
- USHORT nAryPos;
- USHORT mnDragSize;
- BOOL bSize;
- BOOL bSizeBar;
- BOOL bExpandTest;
+ sal_uInt16 nAryPos;
+ sal_uInt16 mnDragSize;
+ sal_Bool bSize;
+ sal_Bool bSizeBar;
+ sal_Bool bExpandTest;
ImplRulerHitTest() :
- bExpandTest( FALSE ) {}
+ bExpandTest( sal_False ) {}
};
// =======================================================================
@@ -169,7 +169,7 @@ ImplRulerData::ImplRulerData()
memset( this, 0, sizeof( ImplRulerData ) );
// PageBreite == EditWinBreite
- bAutoPageWidth = TRUE;
+ bAutoPageWidth = sal_True;
}
// -----------------------------------------------------------------------
@@ -241,7 +241,7 @@ void Ruler::ImplInit( WinBits nWinBits )
// --- RTL --- no UI mirroring for horizontal rulers, because
// the document is also not mirrored
- EnableRTL( FALSE );
+ EnableRTL( sal_False );
}
// Variablen initialisieren
@@ -263,13 +263,13 @@ void Ruler::ImplInit( WinBits nWinBits )
mnExtraStyle = 0; // Style des Extra-Feldes
mnExtraClicks = 0; // Click-Anzahl fuer Extra-Feld
mnExtraModifier = 0; // Modifier-Tasten beim Click im Extrafeld
- mbCalc = TRUE; // Muessen Pagebreiten neu berechnet werden
- mbFormat = TRUE; // Muss neu ausgegeben werden
- mbDrag = FALSE; // Sind wir im Drag-Modus
- mbDragDelete = FALSE; // Wird Maus beim Draggen unten rausgezogen
- mbDragCanceled = FALSE; // Wurde Dragging abgebrochen
- mbAutoWinWidth = TRUE; // EditWinBreite == RulerBreite
- mbActive = TRUE; // Ist Lineal aktiv
+ mbCalc = sal_True; // Muessen Pagebreiten neu berechnet werden
+ mbFormat = sal_True; // Muss neu ausgegeben werden
+ mbDrag = sal_False; // Sind wir im Drag-Modus
+ mbDragDelete = sal_False; // Wird Maus beim Draggen unten rausgezogen
+ mbDragCanceled = sal_False; // Wurde Dragging abgebrochen
+ mbAutoWinWidth = sal_True; // EditWinBreite == RulerBreite
+ mbActive = sal_True; // Ist Lineal aktiv
mnUpdateFlags = 0; // Was soll im Update-Handler upgedatet werden
mpData = mpSaveData; // Wir zeigen auf die normalen Daten
meExtraType = RULER_EXTRA_DONTKNOW; // Was im ExtraFeld dargestellt wird
@@ -293,7 +293,7 @@ void Ruler::ImplInit( WinBits nWinBits )
mnBorderWidth = 0;
// Einstellungen setzen
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
// Default-Groesse setzen
long nDefHeight = GetTextHeight() + RULER_OFF*2 + RULER_TEXTOFF*2 + mnBorderWidth;
@@ -303,6 +303,7 @@ void Ruler::ImplInit( WinBits nWinBits )
else
aDefSize.Width() = nDefHeight;
SetOutputSizePixel( aDefSize );
+ SetType(WINDOW_RULER);
}
// -----------------------------------------------------------------------
@@ -391,7 +392,7 @@ void Ruler::ImplVDrawText( long nX, long nY, const String& rText )
// -----------------------------------------------------------------------
-void Ruler::ImplInvertLines( BOOL bErase )
+void Ruler::ImplInvertLines( sal_Bool bErase )
{
// Positionslinien
if ( mpData->nLines && mbActive && !mbDrag && !mbFormat &&
@@ -411,7 +412,7 @@ void Ruler::ImplInvertLines( BOOL bErase )
aRect.Right() = nY;
// Linien ausgeben
- for ( USHORT i = 0; i < mpData->nLines; i++ )
+ for ( sal_uInt16 i = 0; i < mpData->nLines; i++ )
{
n = mpData->pLines[i].nPos+nNullWinOff;
if ( (n >= nRulX1) && (n < nRulX2) )
@@ -464,11 +465,11 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter )
long nTickWidth;
long nX;
long nY;
- BOOL bNoTicks = FALSE;
+ sal_Bool bNoTicks = sal_False;
// Groessenvorberechnung
// Sizes calculation
- BOOL bVertRight = FALSE;
+ sal_Bool bVertRight = sal_False;
if ( mnWinStyle & WB_HORZ )
nTickWidth = aPixSize.Width();
else
@@ -477,7 +478,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter )
if ( mnWinStyle & WB_RIGHT_ALIGNED )
{
aFont.SetOrientation( 2700 );
- bVertRight = TRUE;
+ bVertRight = sal_True;
}
else
aFont.SetOrientation( 900 );
@@ -515,7 +516,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter )
// koennen
if ( nMulti < nOldMulti )
{
- bNoTicks = TRUE;
+ bNoTicks = sal_True;
break;
}
@@ -614,7 +615,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter )
}
}
// #i49017# with some zoom factors the value nTick can overflow
- if( ((ULONG)nTick + (ULONG)nTickCount) > (ULONG)LONG_MAX)
+ if( ((sal_uLong)nTick + (sal_uLong)nTickCount) > (sal_uLong)LONG_MAX)
break;
nTick += nTickCount;
}
@@ -625,7 +626,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter )
void Ruler::ImplDrawArrows( long nCenter )
{
- USHORT i;
+ sal_uInt16 i;
long n1;
long n2;
long n3;
@@ -633,7 +634,7 @@ void Ruler::ImplDrawArrows( long nCenter )
long nLogWidth;
String aStr;
String aStr2;
- BOOL bDrawUnit;
+ sal_Bool bDrawUnit;
long nTxtWidth;
long nTxtHeight2 = GetTextHeight()/2;
@@ -658,14 +659,14 @@ void Ruler::ImplDrawArrows( long nCenter )
nLogWidth = (nLogWidth / aImplRulerUnitTab[mnUnitIndex].n100THMM) * 1000;
else
nLogWidth = (nLogWidth*1000) / aImplRulerUnitTab[mnUnitIndex].n100THMM;
- aStr = rI18nHelper.GetNum( nLogWidth, aImplRulerUnitTab[mnUnitIndex].nUnitDigits, TRUE, FALSE );
+ aStr = rI18nHelper.GetNum( nLogWidth, aImplRulerUnitTab[mnUnitIndex].nUnitDigits, sal_True, sal_False );
// Einheit an den String haengen
aStr2 = aStr;
aStr2.AppendAscii( aImplRulerUnitTab[mnUnitIndex].aUnitStr );
// Textbreite ermitteln
- bDrawUnit = TRUE;
+ bDrawUnit = sal_True;
nTxtWidth = GetTextWidth( aStr2 );
if ( nTxtWidth < mpData->pArrows[i].nWidth-10 )
aStr = aStr2;
@@ -673,7 +674,7 @@ void Ruler::ImplDrawArrows( long nCenter )
{
nTxtWidth = GetTextWidth( aStr );
if ( nTxtWidth > mpData->pArrows[i].nWidth-10 )
- bDrawUnit = FALSE;
+ bDrawUnit = sal_False;
}
// Ist genuegen Platz fuer Einheiten-String vorhanden
@@ -717,7 +718,7 @@ void Ruler::ImplDrawBorders( long nMin, long nMax, long nVirTop, long nVirBottom
long n2;
long nTemp1;
long nTemp2;
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < mpData->nBorders; i++ )
{
@@ -835,12 +836,12 @@ void Ruler::ImplDrawBorders( long nMin, long nMax, long nVirTop, long nVirBottom
// -----------------------------------------------------------------------
-void Ruler::ImplDrawIndent( const Polygon& rPoly, USHORT nStyle )
+void Ruler::ImplDrawIndent( const Polygon& rPoly, sal_uInt16 nStyle )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
Point aPos1;
Point aPos2;
- USHORT nIndentStyle = nStyle & RULER_INDENT_STYLE;
+ sal_uInt16 nIndentStyle = nStyle & RULER_INDENT_STYLE;
if ( nStyle & RULER_STYLE_INVISIBLE )
return;
@@ -924,7 +925,7 @@ void Ruler::ImplDrawIndent( const Polygon& rPoly, USHORT nStyle )
void Ruler::ImplDrawIndents( long nMin, long nMax, long nVirTop, long nVirBottom )
{
- USHORT j;
+ sal_uInt16 j;
long n;
long nIndentHeight = (mnVirHeight/2) - 1;
long nIndentWidth2 = nIndentHeight-3;
@@ -935,8 +936,8 @@ void Ruler::ImplDrawIndents( long nMin, long nMax, long nVirTop, long nVirBottom
if ( mpData->pIndents[j].nStyle & RULER_STYLE_INVISIBLE )
continue;
- USHORT nStyle = mpData->pIndents[j].nStyle;
- USHORT nIndentStyle = nStyle & RULER_INDENT_STYLE;
+ sal_uInt16 nStyle = mpData->pIndents[j].nStyle;
+ sal_uInt16 nIndentStyle = nStyle & RULER_INDENT_STYLE;
n = mpData->pIndents[j].nPos+mpData->nNullVirOff;
@@ -968,7 +969,7 @@ void Ruler::ImplDrawIndents( long nMin, long nMax, long nVirTop, long nVirBottom
if(0 == (mnWinStyle & WB_HORZ))
{
Point aTmp;
- for(USHORT i = 0; i < 5; i++)
+ for(sal_uInt16 i = 0; i < 5; i++)
{
aTmp = aPoly[i];
Point aSet(nVirBottom - aTmp.Y(), aTmp.X());
@@ -983,9 +984,9 @@ void Ruler::ImplDrawIndents( long nMin, long nMax, long nVirTop, long nVirBottom
// -----------------------------------------------------------------------
-static void ImplCenterTabPos( Point& rPos, USHORT nTabStyle )
+static void ImplCenterTabPos( Point& rPos, sal_uInt16 nTabStyle )
{
- BOOL bRTL = 0 != (nTabStyle & RULER_TAB_RTL);
+ sal_Bool bRTL = 0 != (nTabStyle & RULER_TAB_RTL);
nTabStyle &= RULER_TAB_STYLE;
rPos.Y() += RULER_TAB_HEIGHT/2;
if ( (!bRTL && nTabStyle == RULER_TAB_LEFT) ||( bRTL && nTabStyle == RULER_TAB_RIGHT))
@@ -995,7 +996,7 @@ static void ImplCenterTabPos( Point& rPos, USHORT nTabStyle )
}
// -----------------------------------------------------------------------
-void lcl_RotateRect_Impl(Rectangle& rRect, const long nReference, BOOL bRightAligned)
+void lcl_RotateRect_Impl(Rectangle& rRect, const long nReference, sal_Bool bRightAligned)
{
if(!rRect.IsEmpty())
{
@@ -1015,13 +1016,13 @@ void lcl_RotateRect_Impl(Rectangle& rRect, const long nReference, BOOL bRightAli
// -----------------------------------------------------------------------
static void ImplDrawRulerTab( OutputDevice* pDevice,
- const Point& rPos, USHORT nStyle, WinBits nWinBits )
+ const Point& rPos, sal_uInt16 nStyle, WinBits nWinBits )
{
if ( nStyle & RULER_STYLE_INVISIBLE )
return;
- USHORT nTabStyle = nStyle & RULER_TAB_STYLE;
- BOOL bRTL = 0 != (nStyle & RULER_TAB_RTL);
+ sal_uInt16 nTabStyle = nStyle & RULER_TAB_STYLE;
+ sal_Bool bRTL = 0 != (nStyle & RULER_TAB_RTL);
Rectangle aRect1, aRect2, aRect3;
aRect3.SetEmpty();
if ( nTabStyle == RULER_TAB_DEFAULT )
@@ -1079,7 +1080,7 @@ static void ImplDrawRulerTab( OutputDevice* pDevice,
}
if( 0 == (nWinBits&WB_HORZ) )
{
- BOOL bRightAligned = 0 != (nWinBits&WB_RIGHT_ALIGNED);
+ sal_Bool bRightAligned = 0 != (nWinBits&WB_RIGHT_ALIGNED);
lcl_RotateRect_Impl(aRect1, rPos.Y(), bRightAligned);
lcl_RotateRect_Impl(aRect2, rPos.Y(), bRightAligned);
lcl_RotateRect_Impl(aRect3, rPos.Y(), bRightAligned);
@@ -1093,7 +1094,7 @@ static void ImplDrawRulerTab( OutputDevice* pDevice,
// -----------------------------------------------------------------------
-void Ruler::ImplDrawTab( OutputDevice* pDevice, const Point& rPos, USHORT nStyle )
+void Ruler::ImplDrawTab( OutputDevice* pDevice, const Point& rPos, sal_uInt16 nStyle )
{
if ( nStyle & RULER_STYLE_INVISIBLE )
return;
@@ -1113,7 +1114,7 @@ void Ruler::ImplDrawTab( OutputDevice* pDevice, const Point& rPos, USHORT nStyle
void Ruler::ImplDrawTabs( long nMin, long nMax, long nVirTop, long nVirBottom )
{
- for ( USHORT i = 0; i < mpData->nTabs; i++ )
+ for ( sal_uInt16 i = 0; i < mpData->nTabs; i++ )
{
if ( mpData->pTabs[i].nStyle & RULER_STYLE_INVISIBLE )
continue;
@@ -1129,8 +1130,8 @@ void Ruler::ImplDrawTabs( long nMin, long nMax, long nVirTop, long nVirBottom )
// -----------------------------------------------------------------------
-void Ruler::ImplInitSettings( BOOL bFont,
- BOOL bForeground, BOOL bBackground )
+void Ruler::ImplInitSettings( sal_Bool bFont,
+ sal_Bool bForeground, sal_Bool bBackground )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -1219,7 +1220,7 @@ void Ruler::ImplCalc()
mpData->nRulWidth = mnHeight-nRulWinOff;
}
- mbCalc = FALSE;
+ mbCalc = sal_False;
}
// -----------------------------------------------------------------------
@@ -1259,7 +1260,7 @@ void Ruler::ImplFormat()
return;
Size aVirDevSize;
- BOOL b3DLook = !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO);
+ sal_Bool b3DLook = !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO);
// VirtualDevice initialize
if ( mnWinStyle & WB_HORZ )
@@ -1273,7 +1274,7 @@ void Ruler::ImplFormat()
aVirDevSize.Width() = mnVirHeight;
}
if ( aVirDevSize != maVirDev.GetOutputSizePixel() )
- maVirDev.SetOutputSizePixel( aVirDevSize, TRUE );
+ maVirDev.SetOutputSizePixel( aVirDevSize, sal_True );
else
maVirDev.Erase();
@@ -1413,12 +1414,12 @@ void Ruler::ImplFormat()
ImplDrawArrows( nVirTop+((nVirBottom-nVirTop)/2) );
// Wir haben formatiert
- mbFormat = FALSE;
+ mbFormat = sal_False;
}
// -----------------------------------------------------------------------
-void Ruler::ImplInitExtraField( BOOL bUpdate )
+void Ruler::ImplInitExtraField( sal_Bool bUpdate )
{
// Extra-Field beruecksichtigen
if ( mnWinStyle & WB_EXTRAFIELD )
@@ -1448,8 +1449,8 @@ void Ruler::ImplInitExtraField( BOOL bUpdate )
if ( bUpdate )
{
- mbCalc = TRUE;
- mbFormat = TRUE;
+ mbCalc = sal_True;
+ mbFormat = sal_True;
Invalidate();
}
}
@@ -1487,17 +1488,17 @@ void Ruler::ImplDraw()
DrawOutDev( aOffPos, aVirDevSize, Point(), aVirDevSize, maVirDev );
// Positionslinien neu malen
- ImplInvertLines( TRUE );
+ ImplInvertLines( sal_True );
}
}
// -----------------------------------------------------------------------
-void Ruler::ImplDrawExtra( BOOL bPaint )
+void Ruler::ImplDrawExtra( sal_Bool bPaint )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
Rectangle aRect = maExtraRect;
- BOOL bEraseRect = FALSE;
+ sal_Bool bEraseRect = sal_False;
if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
{
@@ -1520,14 +1521,14 @@ void Ruler::ImplDrawExtra( BOOL bPaint )
SetFillColor( rStyleSettings.GetFaceColor() );
else
SetFillColor( rStyleSettings.GetWindowColor() );
- bEraseRect = TRUE;
+ bEraseRect = sal_True;
}
else
{
if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) && (mnExtraStyle & RULER_STYLE_HIGHLIGHT) )
{
SetFillColor( rStyleSettings.GetCheckedColor() );
- bEraseRect = TRUE;
+ bEraseRect = sal_True;
}
}
@@ -1551,7 +1552,7 @@ void Ruler::ImplDrawExtra( BOOL bPaint )
}
else if ( meExtraType == RULER_EXTRA_TAB )
{
- USHORT nTabStyle = mnExtraStyle & RULER_TAB_STYLE;
+ sal_uInt16 nTabStyle = mnExtraStyle & RULER_TAB_STYLE;
if(mpData->bTextRTL)
nTabStyle |= RULER_TAB_RTL;
Point aCenter = aRect.Center();
@@ -1578,7 +1579,7 @@ void Ruler::ImplDrawExtra( BOOL bPaint )
// -----------------------------------------------------------------------
-void Ruler::ImplUpdate( BOOL bMustCalc )
+void Ruler::ImplUpdate( sal_Bool bMustCalc )
{
// Hier schon Linien loeschen, damit Sie vor dem Neuberechnen schon
// geloscht sind, da danach die alten Positionen nicht mehr bestimmt
@@ -1588,8 +1589,8 @@ void Ruler::ImplUpdate( BOOL bMustCalc )
// Flags setzen
if ( bMustCalc )
- mbCalc = TRUE;
- mbFormat = TRUE;
+ mbCalc = sal_True;
+ mbFormat = sal_True;
// Wenn wir am Draggen sind, wird nach dem Drag-Handler automatisch
// das Lineal neu upgedatet
@@ -1607,11 +1608,11 @@ void Ruler::ImplUpdate( BOOL bMustCalc )
// -----------------------------------------------------------------------
-BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
- BOOL bRequireStyle, USHORT nRequiredStyle ) const
+sal_Bool Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
+ sal_Bool bRequireStyle, sal_uInt16 nRequiredStyle ) const
{
- USHORT i;
- USHORT nStyle;
+ sal_uInt16 i;
+ sal_uInt16 nStyle;
long nHitBottom;
long nX;
long nY;
@@ -1619,10 +1620,10 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
long n2;
if ( !mbActive )
- return FALSE;
+ return sal_False;
// Position ermitteln
- BOOL bIsHori = 0 != (mnWinStyle & WB_HORZ);
+ sal_Bool bIsHori = 0 != (mnWinStyle & WB_HORZ);
if ( bIsHori )
{
nX = rPos.X();
@@ -1638,8 +1639,8 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
// --> FME 2004-08-05 #i32608#
pHitTest->nAryPos = 0;
pHitTest->mnDragSize = 0;
- pHitTest->bSize = FALSE;
- pHitTest->bSizeBar = FALSE;
+ pHitTest->bSize = sal_False;
+ pHitTest->bSizeBar = sal_False;
// <--
// Damit ueberstehende Tabs und Einzuege mit beruecksichtigt werden
@@ -1657,7 +1658,7 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
{
pHitTest->nPos = 0;
pHitTest->eType = RULER_TYPE_OUTSIDE;
- return FALSE;
+ return sal_False;
}
nX -= mpData->nNullVirOff;
@@ -1703,7 +1704,7 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
{
pHitTest->eType = RULER_TYPE_TAB;
pHitTest->nAryPos = i-1;
- return TRUE;
+ return sal_True;
}
}
}
@@ -1744,7 +1745,7 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
{
pHitTest->eType = RULER_TYPE_INDENT;
pHitTest->nAryPos = i-1;
- return TRUE;
+ return sal_True;
}
}
}
@@ -1755,7 +1756,7 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
{
pHitTest->nPos = 0;
pHitTest->eType = RULER_TYPE_OUTSIDE;
- return FALSE;
+ return sal_False;
}
// Danach die Spalten testen
@@ -1790,7 +1791,7 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
{
if ( nStyle & RULER_BORDER_MOVEABLE )
{
- pHitTest->bSizeBar = TRUE;
+ pHitTest->bSizeBar = sal_True;
pHitTest->mnDragSize = RULER_DRAGSIZE_MOVE;
}
}
@@ -1810,25 +1811,25 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
if ( nX <= n1+nMOff )
{
- pHitTest->bSize = TRUE;
+ pHitTest->bSize = sal_True;
pHitTest->mnDragSize = RULER_DRAGSIZE_1;
}
else if ( nX >= n2-nMOff )
{
- pHitTest->bSize = TRUE;
+ pHitTest->bSize = sal_True;
pHitTest->mnDragSize = RULER_DRAGSIZE_2;
}
else
{
if ( nStyle & RULER_BORDER_MOVEABLE )
{
- pHitTest->bSizeBar = TRUE;
+ pHitTest->bSizeBar = sal_True;
pHitTest->mnDragSize = RULER_DRAGSIZE_MOVE;
}
}
}
- return TRUE;
+ return sal_True;
}
}
}
@@ -1842,8 +1843,8 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
if ( (nX >= n1 - nMarginTolerance) && (nX <= n1 + nMarginTolerance) )
{
pHitTest->eType = RULER_TYPE_MARGIN1;
- pHitTest->bSize = TRUE;
- return TRUE;
+ pHitTest->bSize = sal_True;
+ return sal_True;
}
}
if ( (mpData->nMargin2Style & (RULER_MARGIN_SIZEABLE | RULER_STYLE_INVISIBLE)) == RULER_MARGIN_SIZEABLE )
@@ -1852,8 +1853,8 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
if ( (nX >= n1 - nMarginTolerance) && (nX <= n1 + nMarginTolerance) )
{
pHitTest->eType = RULER_TYPE_MARGIN2;
- pHitTest->bSize = TRUE;
- return TRUE;
+ pHitTest->bSize = sal_True;
+ return sal_True;
}
}
@@ -1898,28 +1899,28 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
{
pHitTest->eType = RULER_TYPE_TAB;
pHitTest->nAryPos = i-1;
- return TRUE;
+ return sal_True;
}
}
}
}
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL Ruler::ImplDocHitTest( const Point& rPos, RulerType eDragType,
+sal_Bool Ruler::ImplDocHitTest( const Point& rPos, RulerType eDragType,
ImplRulerHitTest* pHitTest ) const
{
Point aPos = rPos;
- BOOL bRequiredStyle = FALSE;
- USHORT nRequiredStyle = 0;
+ sal_Bool bRequiredStyle = sal_False;
+ sal_uInt16 nRequiredStyle = 0;
if (eDragType == RULER_TYPE_INDENT)
{
- bRequiredStyle = TRUE;
+ bRequiredStyle = sal_True;
nRequiredStyle = RULER_INDENT_BOTTOM;
}
@@ -1939,7 +1940,7 @@ BOOL Ruler::ImplDocHitTest( const Point& rPos, RulerType eDragType,
if ( ImplHitTest( aPos, pHitTest, bRequiredStyle, nRequiredStyle ) )
{
if ( (pHitTest->eType == eDragType) || (eDragType == RULER_TYPE_DONTKNOW) )
- return TRUE;
+ return sal_True;
}
}
@@ -1955,7 +1956,7 @@ BOOL Ruler::ImplDocHitTest( const Point& rPos, RulerType eDragType,
if ( ImplHitTest( aPos, pHitTest, bRequiredStyle, nRequiredStyle ) )
{
if ( (pHitTest->eType == eDragType) || (eDragType == RULER_TYPE_DONTKNOW) )
- return TRUE;
+ return sal_True;
}
}
@@ -1971,25 +1972,25 @@ BOOL Ruler::ImplDocHitTest( const Point& rPos, RulerType eDragType,
if ( ImplHitTest( aPos, pHitTest ) )
{
if ( (pHitTest->eType == eDragType) || (eDragType == RULER_TYPE_DONTKNOW) )
- return TRUE;
+ return sal_True;
}
}
// Auf DontKnow setzen
pHitTest->eType = RULER_TYPE_DONTKNOW;
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL Ruler::ImplStartDrag( ImplRulerHitTest* pHitTest, USHORT nModifier )
+sal_Bool Ruler::ImplStartDrag( ImplRulerHitTest* pHitTest, sal_uInt16 nModifier )
{
// Wenn eine Spalte angeklick wurde, die weder verschiebar noch
// in der Groesse aenderbar ist, brauchen wir auch kein Drag ausloesen
if ( (pHitTest->eType == RULER_TYPE_BORDER) &&
!pHitTest->bSize && !pHitTest->bSizeBar )
- return FALSE;
+ return sal_False;
// Dragdaten setzen
meDragType = pHitTest->eType;
@@ -2006,10 +2007,10 @@ BOOL Ruler::ImplStartDrag( ImplRulerHitTest* pHitTest, USHORT nModifier )
// Wenn der Handler das Draggen erlaubt, dann das Draggen
// initialisieren
ImplInvertLines();
- mbDrag = TRUE;
+ mbDrag = sal_True;
mnStartDragPos = mnDragPos;
StartTracking();
- return TRUE;
+ return sal_True;
}
else
{
@@ -2022,7 +2023,7 @@ BOOL Ruler::ImplStartDrag( ImplRulerHitTest* pHitTest, USHORT nModifier )
mpData = mpSaveData;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -2061,18 +2062,18 @@ void Ruler::ImplDrag( const Point& rPos )
nX -= mpData->nNullVirOff;
// Wenn oberhalb oder links vom Lineal, dann alte Werte
- mbDragDelete = FALSE;
+ mbDragDelete = sal_False;
if ( nY < 0 )
{
if ( !mbDragCanceled )
{
// Daten wiederherstellen
- mbDragCanceled = TRUE;
+ mbDragCanceled = sal_True;
ImplRulerData aTempData;
aTempData = *mpDragData;
*mpDragData = *mpSaveData;
- mbCalc = TRUE;
- mbFormat = TRUE;
+ mbCalc = sal_True;
+ mbFormat = sal_True;
// Handler rufen
mnDragPos = mnStartDragPos;
@@ -2093,11 +2094,11 @@ void Ruler::ImplDrag( const Point& rPos )
}
else
{
- mbDragCanceled = FALSE;
+ mbDragCanceled = sal_False;
// +2, damit nicht so schnell die Tabs geloescht werden
if ( nY > nOutHeight+2 )
- mbDragDelete = TRUE;
+ mbDragDelete = sal_True;
mnDragPos = nX;
@@ -2122,7 +2123,7 @@ void Ruler::ImplEndDrag()
else
*mpSaveData = *mpDragData;
mpData = mpSaveData;
- mbDrag = FALSE;
+ mbDrag = sal_False;
// Handler rufen
EndDrag();
@@ -2132,8 +2133,8 @@ void Ruler::ImplEndDrag()
mnDragPos = 0;
mnDragAryPos = 0;
mnDragSize = 0;
- mbDragCanceled = FALSE;
- mbDragDelete = FALSE;
+ mbDragCanceled = sal_False;
+ mbDragDelete = sal_False;
mnDragModifier = 0;
mnDragScroll = 0;
mnStartDragPos = 0;
@@ -2170,8 +2171,8 @@ void Ruler::MouseButtonDown( const MouseEvent& rMEvt )
if ( rMEvt.IsLeft() && !IsTracking() )
{
Point aMousePos = rMEvt.GetPosPixel();
- USHORT nMouseClicks = rMEvt.GetClicks();
- USHORT nMouseModifier = rMEvt.GetModifier();
+ sal_uInt16 nMouseClicks = rMEvt.GetClicks();
+ sal_uInt16 nMouseModifier = rMEvt.GetModifier();
// Gegebenenfalls Lineal updaten (damit mit den richtigen Daten
// gearbeitet wird und die Anzeige auch zur Bearbeitung passt)
@@ -2277,8 +2278,8 @@ void Ruler::Tracking( const TrackingEvent& rTEvt )
// Bei Abbruch, den alten Status wieder herstellen
if ( rTEvt.IsTrackingCanceled() )
{
- mbDragCanceled = TRUE;
- mbFormat = TRUE;
+ mbDragCanceled = sal_True;
+ mbFormat = sal_True;
}
ImplEndDrag();
@@ -2327,7 +2328,7 @@ void Ruler::Paint( const Rectangle& )
}
// Imhalt vom Extrafeld ausgeben
- ImplDrawExtra( TRUE );
+ ImplDrawExtra( sal_True );
}
if ( mnWinStyle & WB_BORDER )
@@ -2392,7 +2393,7 @@ void Ruler::Resize()
}
// Hier schon Linien loeschen
- BOOL bVisible = IsReallyVisible();
+ sal_Bool bVisible = IsReallyVisible();
if ( bVisible && mpData->nLines )
{
ImplInvertLines();
@@ -2400,7 +2401,7 @@ void Ruler::Resize()
if ( !mnUpdateEvtId )
mnUpdateEvtId = Application::PostUserEvent( LINK( this, Ruler, ImplUpdateHdl ), NULL );
}
- mbFormat = TRUE;
+ mbFormat = sal_True;
// Wenn sich die Hoehe bzw. Breite aendert, dann muessen besimmte Werte
// neu berechnet werden
@@ -2408,15 +2409,15 @@ void Ruler::Resize()
ImplInitExtraField( mpData->bTextRTL );
if ( nNewHeight )
{
- mbCalc = TRUE;
+ mbCalc = sal_True;
mnVirHeight = nNewHeight - mnBorderWidth - (RULER_OFF*2);
}
else
{
if ( mpData->bAutoPageWidth )
- ImplUpdate( TRUE );
+ ImplUpdate( sal_True );
else if ( mbAutoWinWidth )
- mbCalc = TRUE;
+ mbCalc = sal_True;
}
// Wenn Ruler eine Groesse hat, dann Groesse vom VirtualDevice setzen
@@ -2490,17 +2491,17 @@ void Ruler::StateChanged( StateChangedType nType )
else if ( (nType == STATE_CHANGE_ZOOM) ||
(nType == STATE_CHANGE_CONTROLFONT) )
{
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
{
- ImplInitSettings( FALSE, TRUE, FALSE );
+ ImplInitSettings( sal_False, sal_True, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
{
- ImplInitSettings( FALSE, FALSE, TRUE );
+ ImplInitSettings( sal_False, sal_False, sal_True );
Invalidate();
}
}
@@ -2517,8 +2518,8 @@ void Ruler::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE)) )
{
- mbFormat = TRUE;
- ImplInitSettings( TRUE, TRUE, TRUE );
+ mbFormat = sal_True;
+ ImplInitSettings( sal_True, sal_True, sal_True );
Invalidate();
}
}
@@ -2530,7 +2531,7 @@ long Ruler::StartDrag()
if ( maStartDragHdl.IsSet() )
return maStartDragHdl.Call( this );
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -2572,9 +2573,9 @@ void Ruler::ExtraDown()
void Ruler::Activate()
{
- mbActive = TRUE;
+ mbActive = sal_True;
- // Positionslinien wieder anzeigen (erst hinter mbActive=TRUE rufen, da
+ // Positionslinien wieder anzeigen (erst hinter mbActive=sal_True rufen, da
// von ImplInvertLines() ausgewertet wird). Das Zeichnen der Linien
// wird verzoegert, damit im vermutlich noch nicht gepainteten Zustand
// Linien gezeichnet werden.
@@ -2587,25 +2588,25 @@ void Ruler::Activate()
void Ruler::Deactivate()
{
- // Positionslinien loeschen (schon vor mbActive=FALSE rufen, da
+ // Positionslinien loeschen (schon vor mbActive=sal_False rufen, da
// von ImplInvertLines() ausgewertet wird)
ImplInvertLines();
- mbActive = FALSE;
+ mbActive = sal_False;
}
// -----------------------------------------------------------------------
-BOOL Ruler::StartDocDrag( const MouseEvent& rMEvt, RulerType eDragType )
+sal_Bool Ruler::StartDocDrag( const MouseEvent& rMEvt, RulerType eDragType )
{
if ( !mbDrag )
{
Point aMousePos = rMEvt.GetPosPixel();
- USHORT nMouseClicks = rMEvt.GetClicks();
- USHORT nMouseModifier = rMEvt.GetModifier();
+ sal_uInt16 nMouseClicks = rMEvt.GetClicks();
+ sal_uInt16 nMouseModifier = rMEvt.GetModifier();
ImplRulerHitTest aHitTest;
if(eDragType != RULER_TYPE_DONTKNOW)
- aHitTest.bExpandTest = TRUE;
+ aHitTest.bExpandTest = sal_True;
// Gegebenenfalls Lineal updaten (damit mit den richtigen Daten
// gearbeitet wird und die Anzeige auch zur Bearbeitung passt)
@@ -2654,17 +2655,17 @@ BOOL Ruler::StartDocDrag( const MouseEvent& rMEvt, RulerType eDragType )
mnDragPos = 0;
mnDragAryPos = 0;
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
RulerType Ruler::GetDocType( const Point& rPos, RulerType eDragType,
- USHORT* pAryPos ) const
+ sal_uInt16* pAryPos ) const
{
ImplRulerHitTest aHitTest;
@@ -2698,7 +2699,7 @@ void Ruler::CancelDrag()
// -----------------------------------------------------------------------
-RulerType Ruler::GetType( const Point& rPos, USHORT* pAryPos ) const
+RulerType Ruler::GetType( const Point& rPos, sal_uInt16* pAryPos ) const
{
ImplRulerHitTest aHitTest;
@@ -2725,14 +2726,14 @@ void Ruler::SetWinPos( long nNewOff, long nNewWidth )
{
// Gegebenenfalls werden die Breiten automatisch berechnet
if ( !nNewWidth )
- mbAutoWinWidth = TRUE;
+ mbAutoWinWidth = sal_True;
else
- mbAutoWinWidth = FALSE;
+ mbAutoWinWidth = sal_False;
// Werte setzen (werden in ImplFormat gegebenenfalls mitberechnet)
mnWinOff = nNewOff;
mnWinWidth = nNewWidth;
- ImplUpdate( TRUE );
+ ImplUpdate( sal_True );
}
// -----------------------------------------------------------------------
@@ -2745,14 +2746,14 @@ void Ruler::SetPagePos( long nNewOff, long nNewWidth )
// Gegebenenfalls werden die Breiten automatisch berechnet
if ( !nNewWidth )
- mpData->bAutoPageWidth = TRUE;
+ mpData->bAutoPageWidth = sal_True;
else
- mpData->bAutoPageWidth = FALSE;
+ mpData->bAutoPageWidth = sal_False;
// Werte setzen (werden in ImplFormat gegebenenfalls mitberechnet)
mpData->nPageOff = nNewOff;
mpData->nPageWidth = nNewWidth;
- ImplUpdate( TRUE );
+ ImplUpdate( sal_True );
}
// -----------------------------------------------------------------------
@@ -2836,14 +2837,14 @@ void Ruler::SetZoom( const Fraction& rNewZoom )
// -----------------------------------------------------------------------
-void Ruler::SetExtraType( RulerExtra eNewExtraType, USHORT nStyle )
+void Ruler::SetExtraType( RulerExtra eNewExtraType, sal_uInt16 nStyle )
{
if ( mnWinStyle & WB_EXTRAFIELD )
{
meExtraType = eNewExtraType;
mnExtraStyle = nStyle;
if ( IsReallyVisible() && IsUpdateMode() )
- ImplDrawExtra( FALSE );
+ ImplDrawExtra( sal_False );
}
}
@@ -2860,7 +2861,7 @@ void Ruler::SetNullOffset( long nPos )
// -----------------------------------------------------------------------
-void Ruler::SetMargin1( long nPos, USHORT nMarginStyle )
+void Ruler::SetMargin1( long nPos, sal_uInt16 nMarginStyle )
{
if ( (mpData->nMargin1 != nPos) || (mpData->nMargin1Style != nMarginStyle) )
{
@@ -2872,7 +2873,7 @@ void Ruler::SetMargin1( long nPos, USHORT nMarginStyle )
// -----------------------------------------------------------------------
-void Ruler::SetMargin2( long nPos, USHORT nMarginStyle )
+void Ruler::SetMargin2( long nPos, sal_uInt16 nMarginStyle )
{
DBG_ASSERT( (nPos >= mpData->nMargin1) ||
(mpData->nMargin1Style & RULER_STYLE_INVISIBLE) ||
@@ -2889,12 +2890,12 @@ void Ruler::SetMargin2( long nPos, USHORT nMarginStyle )
// -----------------------------------------------------------------------
-void Ruler::SetLines( USHORT n, const RulerLine* pLineAry )
+void Ruler::SetLines( sal_uInt16 n, const RulerLine* pLineAry )
{
// To determine if what has changed
if ( mpData->nLines == n )
{
- USHORT i = n;
+ sal_uInt16 i = n;
const RulerLine* pAry1 = mpData->pLines;
const RulerLine* pAry2 = pLineAry;
while ( i )
@@ -2911,11 +2912,11 @@ void Ruler::SetLines( USHORT n, const RulerLine* pLineAry )
}
// New values and new share issue
- BOOL bMustUpdate;
+ sal_Bool bMustUpdate;
if ( IsReallyVisible() && IsUpdateMode() )
- bMustUpdate = TRUE;
+ bMustUpdate = sal_True;
else
- bMustUpdate = FALSE;
+ bMustUpdate = sal_False;
// Delete old lines
if ( bMustUpdate )
@@ -2949,7 +2950,7 @@ void Ruler::SetLines( USHORT n, const RulerLine* pLineAry )
// -----------------------------------------------------------------------
-void Ruler::SetArrows( USHORT n, const RulerArrow* pArrowAry )
+void Ruler::SetArrows( sal_uInt16 n, const RulerArrow* pArrowAry )
{
if ( !n || !pArrowAry )
{
@@ -2969,7 +2970,7 @@ void Ruler::SetArrows( USHORT n, const RulerArrow* pArrowAry )
}
else
{
- USHORT i = n;
+ sal_uInt16 i = n;
const RulerArrow* pAry1 = mpData->pArrows;
const RulerArrow* pAry2 = pArrowAry;
while ( i )
@@ -2995,7 +2996,7 @@ void Ruler::SetArrows( USHORT n, const RulerArrow* pArrowAry )
// -----------------------------------------------------------------------
-void Ruler::SetBorders( USHORT n, const RulerBorder* pBrdAry )
+void Ruler::SetBorders( sal_uInt16 n, const RulerBorder* pBrdAry )
{
if ( !n || !pBrdAry )
{
@@ -3015,7 +3016,7 @@ void Ruler::SetBorders( USHORT n, const RulerBorder* pBrdAry )
}
else
{
- USHORT i = n;
+ sal_uInt16 i = n;
const RulerBorder* pAry1 = mpData->pBorders;
const RulerBorder* pAry2 = pBrdAry;
while ( i )
@@ -3040,7 +3041,7 @@ void Ruler::SetBorders( USHORT n, const RulerBorder* pBrdAry )
// -----------------------------------------------------------------------
-void Ruler::SetIndents( USHORT n, const RulerIndent* pIndentAry )
+void Ruler::SetIndents( sal_uInt16 n, const RulerIndent* pIndentAry )
{
if ( !n || !pIndentAry )
@@ -3061,7 +3062,7 @@ void Ruler::SetIndents( USHORT n, const RulerIndent* pIndentAry )
}
else
{
- USHORT i = n;
+ sal_uInt16 i = n;
const RulerIndent* pAry1 = mpData->pIndents;
const RulerIndent* pAry2 = pIndentAry;
while ( i )
@@ -3085,7 +3086,7 @@ void Ruler::SetIndents( USHORT n, const RulerIndent* pIndentAry )
// -----------------------------------------------------------------------
-void Ruler::SetTabs( USHORT n, const RulerTab* pTabAry )
+void Ruler::SetTabs( sal_uInt16 n, const RulerTab* pTabAry )
{
if ( !n || !pTabAry )
{
@@ -3105,7 +3106,7 @@ void Ruler::SetTabs( USHORT n, const RulerTab* pTabAry )
}
else
{
- USHORT i = n;
+ sal_uInt16 i = n;
const RulerTab* pAry1 = mpData->pTabs;
const RulerTab* pAry2 = pTabAry;
while ( i )
@@ -3134,17 +3135,17 @@ void Ruler::SetStyle( WinBits nStyle )
if ( mnWinStyle != nStyle )
{
mnWinStyle = nStyle;
- ImplInitExtraField( TRUE );
+ ImplInitExtraField( sal_True );
}
}
// -----------------------------------------------------------------------
-void Ruler::DrawTab( OutputDevice* pDevice, const Point& rPos, USHORT nStyle )
+void Ruler::DrawTab( OutputDevice* pDevice, const Point& rPos, sal_uInt16 nStyle )
{
/*const StyleSettings& rStyleSettings =*/ pDevice->GetSettings().GetStyleSettings();
Point aPos( rPos );
- USHORT nTabStyle = nStyle & (RULER_TAB_STYLE | RULER_TAB_RTL);
+ sal_uInt16 nTabStyle = nStyle & (RULER_TAB_STYLE | RULER_TAB_RTL);
pDevice->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
pDevice->SetLineColor();
@@ -3156,13 +3157,13 @@ void Ruler::DrawTab( OutputDevice* pDevice, const Point& rPos, USHORT nStyle )
/* -----------------16.10.2002 15:17-----------------
*
* --------------------------------------------------*/
-void Ruler::SetTextRTL(BOOL bRTL)
+void Ruler::SetTextRTL(sal_Bool bRTL)
{
if(mpData->bTextRTL != bRTL)
{
mpData->bTextRTL = bRTL;
if ( IsReallyVisible() && IsUpdateMode() )
- ImplInitExtraField( TRUE );
+ ImplInitExtraField( sal_True );
}
}
@@ -3170,15 +3171,15 @@ long Ruler::GetPageOffset() const { return mpData->nPageOff; }
long Ruler::GetPageWidth() const { return mpData->nPageWidth; }
long Ruler::GetNullOffset() const { return mpData->nNullOff; }
long Ruler::GetMargin1() const { return mpData->nMargin1; }
-USHORT Ruler::GetMargin1Style() const { return mpData->nMargin1Style; }
+sal_uInt16 Ruler::GetMargin1Style() const { return mpData->nMargin1Style; }
long Ruler::GetMargin2() const { return mpData->nMargin2; }
-USHORT Ruler::GetMargin2Style() const { return mpData->nMargin2Style; }
-USHORT Ruler::GetLineCount() const { return mpData->nLines; }
+sal_uInt16 Ruler::GetMargin2Style() const { return mpData->nMargin2Style; }
+sal_uInt16 Ruler::GetLineCount() const { return mpData->nLines; }
const RulerLine* Ruler::GetLines() const { return mpData->pLines; }
-USHORT Ruler::GetArrowCount() const { return mpData->nArrows; }
+sal_uInt16 Ruler::GetArrowCount() const { return mpData->nArrows; }
const RulerArrow* Ruler::GetArrows() const { return mpData->pArrows; }
-USHORT Ruler::GetBorderCount() const { return mpData->nBorders; }
+sal_uInt16 Ruler::GetBorderCount() const { return mpData->nBorders; }
const RulerBorder* Ruler::GetBorders() const { return mpData->pBorders; }
-USHORT Ruler::GetIndentCount() const { return mpData->nIndents; }
+sal_uInt16 Ruler::GetIndentCount() const { return mpData->nIndents; }
const RulerIndent* Ruler::GetIndents() const { return mpData->pIndents; }
diff --git a/svtools/source/control/scriptedtext.cxx b/svtools/source/control/scriptedtext.cxx
index 191dedfabe98..7e657ba56ce8 100755
--- a/svtools/source/control/scriptedtext.cxx
+++ b/svtools/source/control/scriptedtext.cxx
@@ -233,7 +233,7 @@ void SvtScriptedTextHelper_Impl::CalculateBreaks( const uno::Reference< i18n::XB
nScript = i18n::ScriptType::LATIN;
while( (nScript != i18n::ScriptType::WEAK) && (nCharIx == nNextCharIx) )
{
- nNextCharIx = mrOutDevice.HasGlyphs( GetFont( nScript ), maText, sal::static_int_cast< USHORT >(nCharIx), sal::static_int_cast< USHORT >(nNextPos - nCharIx) );
+ nNextCharIx = mrOutDevice.HasGlyphs( GetFont( nScript ), maText, sal::static_int_cast< sal_uInt16 >(nCharIx), sal::static_int_cast< sal_uInt16 >(nNextPos - nCharIx) );
if( nCharIx == nNextCharIx )
++nScript;
}
diff --git a/svtools/source/control/scrwin.cxx b/svtools/source/control/scrwin.cxx
index 364c938f3f65..ab4946a8400b 100755
--- a/svtools/source/control/scrwin.cxx
+++ b/svtools/source/control/scrwin.cxx
@@ -35,10 +35,10 @@
void ScrollableWindow::ImpInitialize( ScrollableWindowFlags nFlags )
{
- bHandleDragging = (BOOL) ( nFlags & SCRWIN_THUMBDRAGGING );
+ bHandleDragging = (sal_Bool) ( nFlags & SCRWIN_THUMBDRAGGING );
bVCenter = (nFlags & SCRWIN_VCENTER) == SCRWIN_VCENTER;
bHCenter = (nFlags & SCRWIN_HCENTER) == SCRWIN_HCENTER;
- bScrolling = FALSE;
+ bScrolling = sal_False;
// set the handlers for the scrollbars
aVScroll.SetScrollHdl( LINK(this, ScrollableWindow, ScrollHdl) );
@@ -139,7 +139,7 @@ IMPL_LINK( ScrollableWindow, EndScrollHdl, ScrollBar *, pScroll )
{
// notify the start of scrolling, if not already scrolling
if ( !bScrolling )
- StartScroll(), bScrolling = TRUE;
+ StartScroll(), bScrolling = sal_True;
// get the delta in logic coordinates
Size aDelta( PixelToLogic( Size( aHScroll.GetDelta(), aVScroll.GetDelta() ) ) );
@@ -154,7 +154,7 @@ IMPL_LINK( ScrollableWindow, EndScrollHdl, ScrollBar *, pScroll )
}
// notify the end of scrolling
- bScrolling = FALSE;
+ bScrolling = sal_False;
EndScroll( aDelta.Width(), aDelta.Height() );
return 0;
}
@@ -165,7 +165,7 @@ IMPL_LINK( ScrollableWindow, ScrollHdl, ScrollBar *, pScroll )
{
// notify the start of scrolling, if not already scrolling
if ( !bScrolling )
- StartScroll(), bScrolling = TRUE;
+ StartScroll(), bScrolling = sal_True;
if ( bHandleDragging )
{
@@ -189,25 +189,25 @@ void __EXPORT ScrollableWindow::Resize()
// determine the size of the output-area and if we need scrollbars
const long nScrSize = GetSettings().GetStyleSettings().GetScrollBarSize();
- BOOL bVVisible = FALSE; // by default no vertical-ScrollBar
- BOOL bHVisible = FALSE; // by default no horizontal-ScrollBar
- BOOL bChanged; // determines if a visiblility was changed
+ sal_Bool bVVisible = sal_False; // by default no vertical-ScrollBar
+ sal_Bool bHVisible = sal_False; // by default no horizontal-ScrollBar
+ sal_Bool bChanged; // determines if a visiblility was changed
do
{
- bChanged = FALSE;
+ bChanged = sal_False;
// does we need a vertical ScrollBar
if ( aOutPixSz.Width() < aTotPixSz.Width() && !bHVisible )
- { bHVisible = TRUE;
+ { bHVisible = sal_True;
aOutPixSz.Height() -= nScrSize;
- bChanged = TRUE;
+ bChanged = sal_True;
}
// does we need a horizontal ScrollBar
if ( aOutPixSz.Height() < aTotPixSz.Height() && !bVVisible )
- { bVVisible = TRUE;
+ { bVVisible = sal_True;
aOutPixSz.Width() -= nScrSize;
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
@@ -355,10 +355,10 @@ void ScrollableWindow::SetVisibleSize( const Size& rNewSize )
Window::GetOutputSizePixel().Height());
Size aWill( aWish.GetIntersection(aMax).GetSize() );
- BOOL bHScroll = FALSE;
+ sal_Bool bHScroll = sal_False;
const long nScrSize = GetSettings().GetStyleSettings().GetScrollBarSize();
if ( aWill.Width() < aWish.GetSize().Width() )
- { bHScroll = TRUE;
+ { bHScroll = sal_True;
aWill.Height() =
Min( aWill.Height()+nScrSize, aMax.GetSize().Height() );
}
@@ -373,7 +373,7 @@ void ScrollableWindow::SetVisibleSize( const Size& rNewSize )
//-------------------------------------------------------------------
-BOOL ScrollableWindow::MakeVisible( const Rectangle& rTarget, BOOL bSloppy )
+sal_Bool ScrollableWindow::MakeVisible( const Rectangle& rTarget, sal_Bool bSloppy )
{
Rectangle aTarget;
Rectangle aTotRect( Point(0, 0), PixelToLogic( aTotPixSz ) );
@@ -436,7 +436,7 @@ BOOL ScrollableWindow::MakeVisible( const Rectangle& rTarget, BOOL bSloppy )
// is the area already visible?
Rectangle aVisArea( GetVisibleArea() );
if ( aVisArea.IsInside(rTarget) )
- return TRUE;
+ return sal_True;
// is there somewhat to scroll?
if ( aVisArea.TopLeft() != aTarget.TopLeft() )
@@ -465,7 +465,7 @@ Rectangle ScrollableWindow::GetVisibleArea() const
//-------------------------------------------------------------------
-void ScrollableWindow::SetLineSize( ULONG nHorz, ULONG nVert )
+void ScrollableWindow::SetLineSize( sal_uLong nHorz, sal_uLong nVert )
{
Size aPixSz( LogicToPixel( Size(nHorz, nVert) ) );
nColumnPixW = aPixSz.Width();
@@ -476,7 +476,7 @@ void ScrollableWindow::SetLineSize( ULONG nHorz, ULONG nVert )
//-------------------------------------------------------------------
-void ScrollableWindow::Scroll( long nDeltaX, long nDeltaY, USHORT )
+void ScrollableWindow::Scroll( long nDeltaX, long nDeltaY, sal_uInt16 )
{
if ( !bScrolling )
StartScroll();
@@ -561,8 +561,8 @@ void ScrollableWindow::ScrollLines( long nLinesX, long nLinesY )
//-------------------------------------------------------------------
-void ScrollableWindow::ScrollPages( long nPagesX, ULONG nOverlapX,
- long nPagesY, ULONG nOverlapY )
+void ScrollableWindow::ScrollPages( long nPagesX, sal_uLong nOverlapX,
+ long nPagesY, sal_uLong nOverlapY )
{
Size aOutSz( GetVisibleArea().GetSize() );
Scroll( nPagesX * aOutSz.Width() + (nPagesX>0 ? 1 : -1) * nOverlapX,
diff --git a/svtools/source/control/stdctrl.cxx b/svtools/source/control/stdctrl.cxx
index 14c8cade3092..fb42b42dc7f3 100644..100755
--- a/svtools/source/control/stdctrl.cxx
+++ b/svtools/source/control/stdctrl.cxx
@@ -80,7 +80,7 @@ namespace svt
// make it transparent
SetControlBackground();
SetBackground();
- SetPaintTransparent( TRUE );
+ SetPaintTransparent( sal_True );
}
// -----------------------------------------------------------------------
diff --git a/svtools/source/control/stdmenu.cxx b/svtools/source/control/stdmenu.cxx
index 9df32d74fc59..94c15a8604d2 100755
--- a/svtools/source/control/stdmenu.cxx
+++ b/svtools/source/control/stdmenu.cxx
@@ -76,13 +76,13 @@ void FontNameMenu::Fill( const FontList* pList )
const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper();
// more than 100 fonts reduces the speed of opening the menu.
// So only the first 100 fonts will be displayed.
- USHORT nFontCount = ::std::min( pList->GetFontNameCount(), static_cast< USHORT >(100) );
- for ( USHORT i = 0; i < nFontCount; i++ )
+ sal_uInt16 nFontCount = ::std::min( pList->GetFontNameCount(), static_cast< sal_uInt16 >(100) );
+ for ( sal_uInt16 i = 0; i < nFontCount; i++ )
{
const XubString& rName = pList->GetFontName( i ).GetName();
// sort with the I18nHelper
- USHORT j = GetItemCount();
+ sal_uInt16 j = GetItemCount();
while ( j )
{
XubString aText = GetItemText( GetItemId( j-1 ) );
@@ -103,11 +103,11 @@ void FontNameMenu::SetCurName( const XubString& rName )
maCurName = rName;
// Menueintrag checken
- USHORT nChecked = 0;
- USHORT nItemCount = GetItemCount();
- for( USHORT i = 0; i < nItemCount; i++ )
+ sal_uInt16 nChecked = 0;
+ sal_uInt16 nItemCount = GetItemCount();
+ for( sal_uInt16 i = 0; i < nItemCount; i++ )
{
- USHORT nItemId = GetItemId( i );
+ sal_uInt16 nItemId = GetItemId( i );
if ( IsItemChecked( nItemId ) )
nChecked = nItemId;
@@ -115,13 +115,13 @@ void FontNameMenu::SetCurName( const XubString& rName )
XubString aText = GetItemText( nItemId );
if ( aText == maCurName )
{
- CheckItem( nItemId, TRUE );
+ CheckItem( nItemId, sal_True );
return;
}
}
if ( nChecked )
- CheckItem( nChecked, FALSE );
+ CheckItem( nChecked, sal_False );
}
// ========================================================================
@@ -141,7 +141,7 @@ FontStyleMenu::~FontStyleMenu()
void FontStyleMenu::Select()
{
- USHORT nCurId = GetCurItemId();
+ sal_uInt16 nCurId = GetCurItemId();
if ( (nCurId >= FONTSTYLEMENU_FIRSTID) && (nCurId <= FONTSTYLEMENU_LASTID) )
{
@@ -156,7 +156,7 @@ void FontStyleMenu::Select()
void FontStyleMenu::Highlight()
{
- USHORT nCurId = GetCurItemId();
+ sal_uInt16 nCurId = GetCurItemId();
if ( (nCurId >= FONTSTYLEMENU_FIRSTID) && (nCurId <= FONTSTYLEMENU_LASTID) )
{
@@ -171,22 +171,22 @@ void FontStyleMenu::Highlight()
// -----------------------------------------------------------------------
-BOOL FontStyleMenu::ImplIsAlreadyInserted( const XubString& rStyleName, USHORT nCount )
+sal_Bool FontStyleMenu::ImplIsAlreadyInserted( const XubString& rStyleName, sal_uInt16 nCount )
{
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
if ( GetItemText( i+FONTSTYLEMENU_FIRSTID ) == rStyleName )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
void FontStyleMenu::Fill( const XubString& rName, const FontList* pList )
{
- USHORT nItemId = GetItemId( 0 );
+ sal_uInt16 nItemId = GetItemId( 0 );
while ( (nItemId >= FONTSTYLEMENU_FIRSTID) &&
(nItemId <= FONTSTYLEMENU_LASTID) )
{
@@ -199,16 +199,16 @@ void FontStyleMenu::Fill( const XubString& rName, const FontList* pList )
if ( hFontInfo )
{
XubString aStyleText;
- USHORT nPos = 0;
- USHORT nId = FONTSTYLEMENU_FIRSTID;
+ sal_uInt16 nPos = 0;
+ sal_uInt16 nId = FONTSTYLEMENU_FIRSTID;
FontWeight eLastWeight = WEIGHT_DONTKNOW;
FontItalic eLastItalic = ITALIC_NONE;
FontWidth eLastWidth = WIDTH_DONTKNOW;
- BOOL bNormal = FALSE;
- BOOL bItalic = FALSE;
- BOOL bBold = FALSE;
- BOOL bBoldItalic = FALSE;
- BOOL bInsert = FALSE;
+ sal_Bool bNormal = sal_False;
+ sal_Bool bItalic = sal_False;
+ sal_Bool bBold = sal_False;
+ sal_Bool bBoldItalic = sal_False;
+ sal_Bool bInsert = sal_False;
FontInfo aInfo;
while ( hFontInfo )
{
@@ -233,16 +233,16 @@ void FontStyleMenu::Fill( const XubString& rName, const FontList* pList )
if ( eWeight <= WEIGHT_NORMAL )
{
if ( eItalic != ITALIC_NONE )
- bItalic = TRUE;
+ bItalic = sal_True;
else
- bNormal = TRUE;
+ bNormal = sal_True;
}
else
{
if ( eItalic != ITALIC_NONE )
- bBoldItalic = TRUE;
+ bBoldItalic = sal_True;
else
- bBold = TRUE;
+ bBold = sal_True;
}
// For wrong StyleNames we replace this with the correct once
@@ -276,11 +276,11 @@ void FontStyleMenu::Fill( const XubString& rName, const FontList* pList )
}
if ( !bItalic && (aStyleText == pList->GetItalicStr()) )
- bItalic = TRUE;
+ bItalic = sal_True;
else if ( !bBold && (aStyleText == pList->GetBoldStr()) )
- bBold = TRUE;
+ bBold = sal_True;
else if ( !bBoldItalic && (aStyleText == pList->GetBoldItalicStr()) )
- bBoldItalic = TRUE;
+ bBoldItalic = sal_True;
hFontInfo = pList->GetNextFontInfo( hFontInfo );
}
@@ -345,11 +345,11 @@ void FontStyleMenu::SetCurStyle( const XubString& rStyle )
maCurStyle = rStyle;
// Menueintrag checken
- USHORT nChecked = 0;
- USHORT nItemCount = GetItemCount();
- for( USHORT i = 0; i < nItemCount; i++ )
+ sal_uInt16 nChecked = 0;
+ sal_uInt16 nItemCount = GetItemCount();
+ for( sal_uInt16 i = 0; i < nItemCount; i++ )
{
- USHORT nItemId = GetItemId( i );
+ sal_uInt16 nItemId = GetItemId( i );
if ( (nItemId < FONTSTYLEMENU_FIRSTID) ||
(nItemId > FONTSTYLEMENU_LASTID) )
@@ -361,13 +361,13 @@ void FontStyleMenu::SetCurStyle( const XubString& rStyle )
XubString aText = GetItemText( nItemId );
if ( aText == maCurStyle )
{
- CheckItem( nItemId, TRUE );
+ CheckItem( nItemId, sal_True );
return;
}
}
if ( nChecked )
- CheckItem( nChecked, FALSE );
+ CheckItem( nChecked, sal_False );
}
// ========================================================================
@@ -391,7 +391,7 @@ FontSizeMenu::~FontSizeMenu()
void FontSizeMenu::Select()
{
- const USHORT nCurItemId = GetCurItemId();
+ const sal_uInt16 nCurItemId = GetCurItemId();
mnCurHeight = mpHeightAry[ nCurItemId - 1 ];
maSelectHdl.Call( this );
}
@@ -401,7 +401,7 @@ void FontSizeMenu::Select()
void FontSizeMenu::Highlight()
{
const long nTempHeight = mnCurHeight;
- const USHORT nCurItemId = GetCurItemId();
+ const sal_uInt16 nCurItemId = GetCurItemId();
if ( !nCurItemId )
mnCurHeight = 0;
else
@@ -425,11 +425,11 @@ void FontSizeMenu::Fill( const FontInfo& rInfo, const FontList* pList )
const long* pTempAry;
const long* pAry = pList->GetSizeAry( rInfo );
- USHORT nSizeCount = 0;
+ sal_uInt16 nSizeCount = 0;
while ( pAry[nSizeCount] )
nSizeCount++;
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
// first insert font size names (for simplified/traditional chinese)
FontSizeNames aFontSizeNames( Application::GetSettings().GetUILanguage() );
@@ -439,8 +439,8 @@ void FontSizeMenu::Fill( const FontInfo& rInfo, const FontList* pList )
if ( pAry == pList->GetStdSizeAry() )
{
// for scalable fonts all font size names
- ULONG nCount = aFontSizeNames.Count();
- for( ULONG i = 0; i < nCount; i++ )
+ sal_uLong nCount = aFontSizeNames.Count();
+ for( sal_uLong i = 0; i < nCount; i++ )
{
String aSizeName = aFontSizeNames.GetIndexName( i );
long nSize = aFontSizeNames.GetIndexSize( i );
@@ -474,7 +474,7 @@ void FontSizeMenu::Fill( const FontInfo& rInfo, const FontList* pList )
{
mpHeightAry[nPos] = *pTempAry;
nPos++; // Id is nPos+1
- InsertItem( nPos, rI18nHelper.GetNum( *pTempAry, 1, TRUE, FALSE ), MIB_RADIOCHECK | MIB_AUTOCHECK );
+ InsertItem( nPos, rI18nHelper.GetNum( *pTempAry, 1, sal_True, sal_False ), MIB_RADIOCHECK | MIB_AUTOCHECK );
pTempAry++;
}
@@ -488,16 +488,16 @@ void FontSizeMenu::SetCurHeight( long nHeight )
mnCurHeight = nHeight;
// check menue item
- XubString aHeight = Application::GetSettings().GetUILocaleI18nHelper().GetNum( nHeight, 1, TRUE, FALSE );
- USHORT nChecked = 0;
- USHORT nItemCount = GetItemCount();
- for( USHORT i = 0; i < nItemCount; i++ )
+ XubString aHeight = Application::GetSettings().GetUILocaleI18nHelper().GetNum( nHeight, 1, sal_True, sal_False );
+ sal_uInt16 nChecked = 0;
+ sal_uInt16 nItemCount = GetItemCount();
+ for( sal_uInt16 i = 0; i < nItemCount; i++ )
{
- USHORT nItemId = GetItemId( i );
+ sal_uInt16 nItemId = GetItemId( i );
if ( mpHeightAry[i] == nHeight )
{
- CheckItem( nItemId, TRUE );
+ CheckItem( nItemId, sal_True );
return;
}
@@ -506,5 +506,5 @@ void FontSizeMenu::SetCurHeight( long nHeight )
}
if ( nChecked )
- CheckItem( nChecked, FALSE );
+ CheckItem( nChecked, sal_False );
}
diff --git a/svtools/source/control/svxbox.cxx b/svtools/source/control/svxbox.cxx
index d1ea47d110cd..451837026dbe 100644..100755
--- a/svtools/source/control/svxbox.cxx
+++ b/svtools/source/control/svxbox.cxx
@@ -42,17 +42,17 @@ SV_IMPL_PTRARR(SvxEntryLst, SvxBoxEntry*)
SvxBoxEntry::SvxBoxEntry() :
nId(LISTBOX_ENTRY_NOTFOUND),
- bModified(FALSE),
- bNew(FALSE)
+ bModified(sal_False),
+ bNew(sal_False)
{
}
-SvxBoxEntry::SvxBoxEntry(const String& aNam, USHORT nIdx) :
+SvxBoxEntry::SvxBoxEntry(const String& aNam, sal_uInt16 nIdx) :
aName(aNam),
nId(nIdx),
- bModified(FALSE),
- bNew(FALSE)
+ bModified(sal_False),
+ bNew(sal_False)
{
}
@@ -99,8 +99,8 @@ __EXPORT SvxListBox::~SvxListBox()
void SvxListBox::InitListBox()
{
// Verwaltung fuer die Stringlist aus der Resource aufbauen
- USHORT nSize = GetEntryCount();
- for(USHORT i=0; i < nSize; ++i)
+ sal_uInt16 nSize = GetEntryCount();
+ for(sal_uInt16 i=0; i < nSize; ++i)
{ const SvxBoxEntry* pTmp = new SvxBoxEntry(ListBox::GetEntry(i), i);
const SvxBoxEntry* &rpTmp = pTmp;
aEntryLst.Insert(rpTmp, aEntryLst.Count());
@@ -114,7 +114,7 @@ void SvxListBox::InitListBox()
void SvxListBox::InsertNewEntry(const SvxBoxEntry& rEntry)
{
SvxBoxEntry* pNew = new SvxBoxEntry(rEntry);
- pNew->bNew = TRUE;
+ pNew->bNew = sal_True;
InsertSorted(pNew);
}
@@ -122,7 +122,7 @@ void SvxListBox::InsertNewEntry(const SvxBoxEntry& rEntry)
Beschreibung: Eintrag in die ListBox aufnehmen
--------------------------------------------------------------------*/
-void SvxListBox::InsertEntry(const SvxBoxEntry& rEntry, USHORT nPos)
+void SvxListBox::InsertEntry(const SvxBoxEntry& rEntry, sal_uInt16 nPos)
{
if(nPos != LISTBOX_ENTRY_NOTFOUND)
{
@@ -139,7 +139,7 @@ void SvxListBox::InsertEntry(const SvxBoxEntry& rEntry, USHORT nPos)
Beschreibung: Eintrag aus der Liste loeschen
--------------------------------------------------------------------*/
-void SvxListBox::RemoveEntry(USHORT nPos)
+void SvxListBox::RemoveEntry(sal_uInt16 nPos)
{
if(nPos >= aEntryLst.Count())
return;
@@ -163,7 +163,7 @@ void SvxListBox::RemoveEntry(USHORT nPos)
void SvxListBox::RemoveEntry(const SvxBoxEntry& rEntry)
{
- USHORT nPos = ListBox::GetEntryPos(rEntry.aName);
+ sal_uInt16 nPos = ListBox::GetEntryPos(rEntry.aName);
RemoveEntry(nPos);
}
@@ -182,7 +182,7 @@ void SvxListBox::Clear()
Beschreibung: Position by Name
--------------------------------------------------------------------*/
-USHORT SvxListBox::GetEntryPos(const SvxBoxEntry& rEntry) const
+sal_uInt16 SvxListBox::GetEntryPos(const SvxBoxEntry& rEntry) const
{
return ListBox::GetEntryPos(rEntry.aName);
}
@@ -191,7 +191,7 @@ USHORT SvxListBox::GetEntryPos(const SvxBoxEntry& rEntry) const
Beschreibung: Rund um die Entries
--------------------------------------------------------------------*/
-const SvxBoxEntry& SvxListBox::GetSvxBoxEntry(USHORT nPos) const
+const SvxBoxEntry& SvxListBox::GetSvxBoxEntry(sal_uInt16 nPos) const
{
if(nPos < aEntryLst.Count())
return *aEntryLst[nPos];
@@ -203,13 +203,13 @@ const SvxBoxEntry& SvxListBox::GetSvxBoxEntry(USHORT nPos) const
Beschreibung: aktullen Eintrag zurueckgeben
--------------------------------------------------------------------*/
-const SvxBoxEntry& SvxListBox::GetSelectSvxBoxEntry(USHORT nSelId) const
+const SvxBoxEntry& SvxListBox::GetSelectSvxBoxEntry(sal_uInt16 nSelId) const
{
String aName(ListBox::GetSelectEntry(nSelId));
if(aName.Len() > 0)
{
- for (USHORT i=0; i < aEntryLst.Count(); i++)
+ for (sal_uInt16 i=0; i < aEntryLst.Count(); i++)
{
if(aEntryLst[i]->aName == aName )
return *aEntryLst[i];
@@ -222,11 +222,11 @@ const SvxBoxEntry& SvxListBox::GetSelectSvxBoxEntry(USHORT nSelId) const
Beschreibung: modifizierte Eintraege
--------------------------------------------------------------------*/
-USHORT SvxListBox::GetModifiedCount() const
+sal_uInt16 SvxListBox::GetModifiedCount() const
{
- USHORT nMod = 0;
- USHORT nSize = aEntryLst.Count();
- for(USHORT i=0; i < nSize; ++i)
+ sal_uInt16 nMod = 0;
+ sal_uInt16 nSize = aEntryLst.Count();
+ for(sal_uInt16 i=0; i < nSize; ++i)
{ if(aEntryLst[i]->bModified)
nMod++;
}
@@ -237,7 +237,7 @@ USHORT SvxListBox::GetModifiedCount() const
Beschreibung: Modifizierte Eintraege behandeln
--------------------------------------------------------------------*/
-void SvxListBox::ModifyEntry(USHORT nPos, const String& rName)
+void SvxListBox::ModifyEntry(sal_uInt16 nPos, const String& rName)
{
if(nPos >= aEntryLst.Count())
return;
@@ -245,7 +245,7 @@ void SvxListBox::ModifyEntry(USHORT nPos, const String& rName)
SvxBoxEntry* pEntry = aEntryLst[nPos];
aEntryLst.Remove(nPos, 1);
aEntryLst[nPos]->aName = rName;
- aEntryLst[nPos]->bModified = TRUE;
+ aEntryLst[nPos]->bModified = sal_True;
ListBox::RemoveEntry(nPos);
InsertSorted(pEntry);
@@ -255,11 +255,11 @@ void SvxListBox::ModifyEntry(USHORT nPos, const String& rName)
Beschreibung: alle modifizierten Eintraege bahandeln
--------------------------------------------------------------------*/
-const SvxBoxEntry& SvxListBox::GetModifiedEntry(USHORT nPos) const
+const SvxBoxEntry& SvxListBox::GetModifiedEntry(sal_uInt16 nPos) const
{
- USHORT nSize = aEntryLst.Count();
- USHORT nMod = 0;
- for(USHORT i=0; i < nSize; ++i)
+ sal_uInt16 nSize = aEntryLst.Count();
+ sal_uInt16 nMod = 0;
+ for(sal_uInt16 i=0; i < nSize; ++i)
{ if(aEntryLst[i]->bModified)
{ if(nMod == nPos)
return *aEntryLst[i];
@@ -273,13 +273,13 @@ const SvxBoxEntry& SvxListBox::GetModifiedEntry(USHORT nPos) const
Beschreibung: geloeschte Eintraege
--------------------------------------------------------------------*/
-USHORT SvxListBox::GetRemovedCount() const
+sal_uInt16 SvxListBox::GetRemovedCount() const
{
return aDelEntryLst.Count();
}
-const SvxBoxEntry& SvxListBox::GetRemovedEntry(USHORT nPos) const
+const SvxBoxEntry& SvxListBox::GetRemovedEntry(sal_uInt16 nPos) const
{
if(nPos < aDelEntryLst.Count())
return *aDelEntryLst[nPos];
@@ -291,11 +291,11 @@ const SvxBoxEntry& SvxListBox::GetRemovedEntry(USHORT nPos) const
Beschreibung: Neue Entries begutachten
--------------------------------------------------------------------*/
-USHORT SvxListBox::GetNewCount() const
+sal_uInt16 SvxListBox::GetNewCount() const
{
- USHORT nNew = 0;
- USHORT nSize = aEntryLst.Count();
- for(USHORT i=0; i < nSize; ++i)
+ sal_uInt16 nNew = 0;
+ sal_uInt16 nSize = aEntryLst.Count();
+ for(sal_uInt16 i=0; i < nSize; ++i)
{ if(aEntryLst[i]->bNew)
nNew++;
}
@@ -306,11 +306,11 @@ USHORT SvxListBox::GetNewCount() const
Beschreibung: Alle neuen Eintraege ueberpruefen
--------------------------------------------------------------------*/
-const SvxBoxEntry& SvxListBox::GetNewEntry(USHORT nPos) const
+const SvxBoxEntry& SvxListBox::GetNewEntry(sal_uInt16 nPos) const
{
- USHORT nSize = aEntryLst.Count();
- USHORT nNew = 0;
- for(USHORT i=0; i < nSize; ++i)
+ sal_uInt16 nSize = aEntryLst.Count();
+ sal_uInt16 nNew = 0;
+ for(sal_uInt16 i=0; i < nSize; ++i)
{ if(aEntryLst[i]->bNew)
{ if(nNew == nPos)
return *aEntryLst[i];
@@ -327,7 +327,7 @@ const SvxBoxEntry& SvxListBox::GetNewEntry(USHORT nPos) const
void SvxListBox::InsertSorted(SvxBoxEntry* pEntry)
{
ListBox::InsertEntry(pEntry->aName);
- USHORT nPos = ListBox::GetEntryPos(pEntry->aName);
+ sal_uInt16 nPos = ListBox::GetEntryPos(pEntry->aName);
aEntryLst.C40_INSERT(SvxBoxEntry, pEntry, nPos);
}
@@ -335,7 +335,7 @@ void SvxListBox::InsertSorted(SvxBoxEntry* pEntry)
Beschreibung: ComboBoxen mit Verwaltungseinheit
--------------------------------------------------------------------*/
-SvxComboBox::SvxComboBox(Window* pParent, WinBits nBits, USHORT nStyleBits) :
+SvxComboBox::SvxComboBox(Window* pParent, WinBits nBits, sal_uInt16 nStyleBits) :
ComboBox(pParent, nBits),
nStyle(nStyleBits)
{
@@ -343,7 +343,7 @@ SvxComboBox::SvxComboBox(Window* pParent, WinBits nBits, USHORT nStyleBits) :
}
-SvxComboBox::SvxComboBox(Window* pParent, const ResId& rId, USHORT nStyleBits ):
+SvxComboBox::SvxComboBox(Window* pParent, const ResId& rId, sal_uInt16 nStyleBits ):
ComboBox(pParent, rId),
nStyle(nStyleBits)
{
@@ -367,8 +367,8 @@ __EXPORT SvxComboBox::~SvxComboBox()
void SvxComboBox::InitComboBox()
{
// Verwaltung fuer die Stringlist aus der Resource aufbauen
- USHORT nSize = GetEntryCount();
- for(USHORT i=0; i < nSize; ++i)
+ sal_uInt16 nSize = GetEntryCount();
+ for(sal_uInt16 i=0; i < nSize; ++i)
{ const SvxBoxEntry* pTmp = new SvxBoxEntry(ComboBox::GetEntry(i), i);
const SvxBoxEntry* &rpTmp = pTmp;
aEntryLst.Insert(rpTmp, aEntryLst.Count());
@@ -382,7 +382,7 @@ void SvxComboBox::InitComboBox()
void SvxComboBox::InsertNewEntry(const SvxBoxEntry& rEntry)
{
SvxBoxEntry* pNew = new SvxBoxEntry(rEntry);
- pNew->bNew = TRUE;
+ pNew->bNew = sal_True;
InsertSorted(pNew);
}
@@ -399,7 +399,7 @@ void SvxComboBox::InsertEntry(const SvxBoxEntry& rEntry)
Beschreibung: Eintrag aus der Liste loeschen
--------------------------------------------------------------------*/
-void SvxComboBox::RemoveEntry(USHORT nPos)
+void SvxComboBox::RemoveEntry(sal_uInt16 nPos)
{
if(nPos >= aEntryLst.Count())
return;
@@ -423,7 +423,7 @@ void SvxComboBox::RemoveEntry(USHORT nPos)
void SvxComboBox::RemoveEntry(const SvxBoxEntry& rEntry)
{
- USHORT nPos = ComboBox::GetEntryPos(rEntry.aName);
+ sal_uInt16 nPos = ComboBox::GetEntryPos(rEntry.aName);
RemoveEntry(nPos);
}
@@ -443,7 +443,7 @@ void SvxComboBox::Clear()
Beschreibung: Position by Name
--------------------------------------------------------------------*/
-USHORT SvxComboBox::GetEntryPos(const SvxBoxEntry& rEntry) const
+sal_uInt16 SvxComboBox::GetEntryPos(const SvxBoxEntry& rEntry) const
{
return ComboBox::GetEntryPos(rEntry.aName);
}
@@ -452,7 +452,7 @@ USHORT SvxComboBox::GetEntryPos(const SvxBoxEntry& rEntry) const
Beschreibung: Rund um die Entries
--------------------------------------------------------------------*/
-const SvxBoxEntry& SvxComboBox::GetEntry(USHORT nPos) const
+const SvxBoxEntry& SvxComboBox::GetEntry(sal_uInt16 nPos) const
{
if(nPos < aEntryLst.Count())
return *aEntryLst[nPos];
@@ -464,11 +464,11 @@ const SvxBoxEntry& SvxComboBox::GetEntry(USHORT nPos) const
Beschreibung: modifizierte Eintraege
--------------------------------------------------------------------*/
-USHORT SvxComboBox::GetModifiedCount() const
+sal_uInt16 SvxComboBox::GetModifiedCount() const
{
- USHORT nMod = 0;
- USHORT nSize = aEntryLst.Count();
- for(USHORT i=0; i < nSize; ++i)
+ sal_uInt16 nMod = 0;
+ sal_uInt16 nSize = aEntryLst.Count();
+ for(sal_uInt16 i=0; i < nSize; ++i)
{ if(aEntryLst[i]->bModified)
nMod++;
}
@@ -479,7 +479,7 @@ USHORT SvxComboBox::GetModifiedCount() const
Beschreibung: Modifizierte Eintraege behandeln
--------------------------------------------------------------------*/
-void SvxComboBox::ModifyEntry(USHORT nPos, const String& rName)
+void SvxComboBox::ModifyEntry(sal_uInt16 nPos, const String& rName)
{
if(nPos >= aEntryLst.Count())
return;
@@ -487,7 +487,7 @@ void SvxComboBox::ModifyEntry(USHORT nPos, const String& rName)
SvxBoxEntry* pEntry = aEntryLst[nPos];
aEntryLst.Remove(nPos, 1);
aEntryLst[nPos]->aName = rName;
- aEntryLst[nPos]->bModified = TRUE;
+ aEntryLst[nPos]->bModified = sal_True;
ComboBox::RemoveEntry(nPos);
InsertSorted(pEntry);
@@ -497,11 +497,11 @@ void SvxComboBox::ModifyEntry(USHORT nPos, const String& rName)
Beschreibung: alle modifizierten Eintraege bahandeln
--------------------------------------------------------------------*/
-const SvxBoxEntry& SvxComboBox::GetModifiedEntry(USHORT nPos) const
+const SvxBoxEntry& SvxComboBox::GetModifiedEntry(sal_uInt16 nPos) const
{
- USHORT nSize = aEntryLst.Count();
- USHORT nMod = 0;
- for(USHORT i=0; i < nSize; ++i)
+ sal_uInt16 nSize = aEntryLst.Count();
+ sal_uInt16 nMod = 0;
+ for(sal_uInt16 i=0; i < nSize; ++i)
{ if(aEntryLst[i]->bModified)
{ if(nMod == nPos)
return *aEntryLst[i];
@@ -515,13 +515,13 @@ const SvxBoxEntry& SvxComboBox::GetModifiedEntry(USHORT nPos) const
Beschreibung: geloeschte Eintraege
--------------------------------------------------------------------*/
-USHORT SvxComboBox::GetRemovedCount() const
+sal_uInt16 SvxComboBox::GetRemovedCount() const
{
return aDelEntryLst.Count();
}
-const SvxBoxEntry& SvxComboBox::GetRemovedEntry(USHORT nPos) const
+const SvxBoxEntry& SvxComboBox::GetRemovedEntry(sal_uInt16 nPos) const
{
if(nPos < aDelEntryLst.Count())
return *aDelEntryLst[nPos];
@@ -533,11 +533,11 @@ const SvxBoxEntry& SvxComboBox::GetRemovedEntry(USHORT nPos) const
Beschreibung: Neue Entries begutachten
--------------------------------------------------------------------*/
-USHORT SvxComboBox::GetNewCount() const
+sal_uInt16 SvxComboBox::GetNewCount() const
{
- USHORT nNew = 0;
- USHORT nSize = aEntryLst.Count();
- for(USHORT i=0; i < nSize; ++i)
+ sal_uInt16 nNew = 0;
+ sal_uInt16 nSize = aEntryLst.Count();
+ for(sal_uInt16 i=0; i < nSize; ++i)
{ if(aEntryLst[i]->bNew)
nNew++;
}
@@ -548,11 +548,11 @@ USHORT SvxComboBox::GetNewCount() const
Beschreibung: Alle neuen Eintraege ueberpruefen
--------------------------------------------------------------------*/
-const SvxBoxEntry& SvxComboBox::GetNewEntry(USHORT nPos) const
+const SvxBoxEntry& SvxComboBox::GetNewEntry(sal_uInt16 nPos) const
{
- USHORT nSize = aEntryLst.Count();
- USHORT nNew = 0;
- for(USHORT i=0; i < nSize; ++i)
+ sal_uInt16 nSize = aEntryLst.Count();
+ sal_uInt16 nNew = 0;
+ for(sal_uInt16 i=0; i < nSize; ++i)
{ if(aEntryLst[i]->bNew)
{ if(nNew == nPos)
return *aEntryLst[i];
@@ -569,7 +569,7 @@ const SvxBoxEntry& SvxComboBox::GetNewEntry(USHORT nPos) const
void SvxComboBox::InsertSorted(SvxBoxEntry* pEntry)
{
ComboBox::InsertEntry(pEntry->aName);
- USHORT nPos = ComboBox::GetEntryPos(pEntry->aName);
+ sal_uInt16 nPos = ComboBox::GetEntryPos(pEntry->aName);
aEntryLst.C40_INSERT(SvxBoxEntry, pEntry, nPos);
}
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 0c2800246061..b7511d24b5c8 100755
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -38,7 +38,8 @@
#include <vcl/button.hxx>
#include <vcl/edit.hxx>
#include "svtaccessiblefactory.hxx"
-
+#include <filectrl.hrc>
+#include <svtools/svtdata.hxx>
#include <limits>
// =======================================================================
@@ -48,37 +49,37 @@
#define TABBAR_DRAG_SCROLLOFF 5
#define TABBAR_MINSIZE 5
-const USHORT ADDNEWPAGE_AREAWIDTH = 10;
+const sal_uInt16 ADDNEWPAGE_AREAWIDTH = 10;
// =======================================================================
struct ImplTabBarItem
{
- USHORT mnId;
+ sal_uInt16 mnId;
TabBarPageBits mnBits;
XubString maText;
XubString maHelpText;
Rectangle maRect;
long mnWidth;
rtl::OString maHelpId;
- BOOL mbShort;
- BOOL mbSelect;
- BOOL mbEnable;
+ sal_Bool mbShort;
+ sal_Bool mbSelect;
+ sal_Bool mbEnable;
Color maTabBgColor;
- bool IsDefaultTabBgColor() const { return maTabBgColor == Color(COL_AUTO) ? TRUE : FALSE; };
+ bool IsDefaultTabBgColor() const { return maTabBgColor == Color(COL_AUTO) ? sal_True : sal_False; };
Color maTabTextColor;
- bool IsDefaultTabTextColor() const { return maTabTextColor == Color(COL_AUTO) ? TRUE : FALSE; };
+ bool IsDefaultTabTextColor() const { return maTabTextColor == Color(COL_AUTO) ? sal_True : sal_False; };
- ImplTabBarItem( USHORT nItemId, const XubString& rText,
+ ImplTabBarItem( sal_uInt16 nItemId, const XubString& rText,
TabBarPageBits nPageBits ) :
maText( rText )
{
mnId = nItemId;
mnBits = nPageBits;
mnWidth = 0;
- mbShort = FALSE;
- mbSelect = FALSE;
- mbEnable = TRUE;
+ mbShort = sal_False;
+ mbSelect = sal_False;
+ mbEnable = sal_True;
maTabBgColor = Color( COL_AUTO );
maTabTextColor = Color( COL_AUTO );
}
@@ -112,7 +113,7 @@ long ImplTabButton::PreNotify( NotifyEvent& rNEvt )
if ( GetParent()->IsInEditMode() )
{
GetParent()->EndEditMode();
- return TRUE;
+ return sal_True;
}
}
@@ -228,7 +229,7 @@ class TabBarEdit : public Edit
{
private:
Timer maLoseFocusTimer;
- BOOL mbPostEvt;
+ sal_Bool mbPostEvt;
DECL_LINK( ImplEndEditHdl, void* );
DECL_LINK( ImplEndTimerHdl, void* );
@@ -238,8 +239,8 @@ public:
TabBar* GetParent() const { return (TabBar*)Window::GetParent(); }
- void SetPostEvent() { mbPostEvt = TRUE; }
- void ResetPostEvent() { mbPostEvt = FALSE; }
+ void SetPostEvent() { mbPostEvt = sal_True; }
+ void ResetPostEvent() { mbPostEvt = sal_False; }
virtual long PreNotify( NotifyEvent& rNEvt );
virtual void LoseFocus();
@@ -250,7 +251,7 @@ public:
TabBarEdit::TabBarEdit( TabBar* pParent, WinBits nWinStyle ) :
Edit( pParent, nWinStyle )
{
- mbPostEvt = FALSE;
+ mbPostEvt = sal_False;
}
// -----------------------------------------------------------------------
@@ -266,19 +267,19 @@ long TabBarEdit::PreNotify( NotifyEvent& rNEvt )
{
if ( !mbPostEvt )
{
- if ( PostUserEvent( LINK( this, TabBarEdit, ImplEndEditHdl ), (void*)FALSE ) )
- mbPostEvt = TRUE;
+ if ( PostUserEvent( LINK( this, TabBarEdit, ImplEndEditHdl ), (void*)sal_False ) )
+ mbPostEvt = sal_True;
}
- return TRUE;
+ return sal_True;
}
else if ( pKEvt->GetKeyCode().GetCode() == KEY_ESCAPE )
{
if ( !mbPostEvt )
{
- if ( PostUserEvent( LINK( this, TabBarEdit, ImplEndEditHdl ), (void*)TRUE ) )
- mbPostEvt = TRUE;
+ if ( PostUserEvent( LINK( this, TabBarEdit, ImplEndEditHdl ), (void*)sal_True ) )
+ mbPostEvt = sal_True;
}
- return TRUE;
+ return sal_True;
}
}
}
@@ -292,8 +293,8 @@ void TabBarEdit::LoseFocus()
{
if ( !mbPostEvt )
{
- if ( PostUserEvent( LINK( this, TabBarEdit, ImplEndEditHdl ), (void*)FALSE ) )
- mbPostEvt = TRUE;
+ if ( PostUserEvent( LINK( this, TabBarEdit, ImplEndEditHdl ), (void*)sal_False ) )
+ mbPostEvt = sal_True;
}
Edit::LoseFocus();
@@ -308,7 +309,7 @@ IMPL_LINK( TabBarEdit, ImplEndEditHdl, void*, pCancel )
// We need this query, because the edit get a losefous event,
// when it shows the context menu or the insert symbol dialog
- if ( !HasFocus() && HasChildPathFocus( TRUE ) )
+ if ( !HasFocus() && HasChildPathFocus( sal_True ) )
{
maLoseFocusTimer.SetTimeout( 30 );
maLoseFocusTimer.SetTimeoutHdl( LINK( this, TabBarEdit, ImplEndTimerHdl ) );
@@ -329,10 +330,10 @@ IMPL_LINK( TabBarEdit, ImplEndTimerHdl, void*, EMPTYARG )
// We need this query, because the edit get a losefous event,
// when it shows the context menu or the insert symbol dialog
- if ( HasChildPathFocus( TRUE ) )
+ if ( HasChildPathFocus( sal_True ) )
maLoseFocusTimer.Start();
else
- GetParent()->EndEditMode( TRUE );
+ GetParent()->EndEditMode( sal_True );
return 0;
}
@@ -380,25 +381,35 @@ void TabBar::ImplInit( WinBits nWinStyle )
mnDropPos = 0;
mnSwitchId = 0;
mnEditId = 0;
- mbFormat = TRUE;
- mbFirstFormat = TRUE;
- mbSizeFormat = TRUE;
- mbAutoMaxWidth = TRUE;
- mbInSwitching = FALSE;
- mbAutoEditMode = FALSE;
- mbEditCanceled = FALSE;
- mbDropPos = FALSE;
- mbInSelect = FALSE;
- mbSelColor = FALSE;
- mbSelTextColor = FALSE;
- mbMirrored = FALSE;
+ mbFormat = sal_True;
+ mbFirstFormat = sal_True;
+ mbSizeFormat = sal_True;
+ mbAutoMaxWidth = sal_True;
+ mbInSwitching = sal_False;
+ mbAutoEditMode = sal_False;
+ mbEditCanceled = sal_False;
+ mbDropPos = sal_False;
+ mbInSelect = sal_False;
+ mbSelColor = sal_False;
+ mbSelTextColor = sal_False;
+ mbMirrored = sal_False;
if ( nWinStyle & WB_3DTAB )
mnOffY++;
ImplInitControls();
+
+ if(mpFirstBtn)
+ mpFirstBtn->SetAccessibleName(String(SvtResId(STR_TABBAR_PUSHBUTTON_MOVET0HOME)));
+ if(mpPrevBtn)
+ mpPrevBtn->SetAccessibleName( String(SvtResId(STR_TABBAR_PUSHBUTTON_MOVELEFT)));
+ if(mpNextBtn)
+ mpNextBtn->SetAccessibleName(String(SvtResId(STR_TABBAR_PUSHBUTTON_MOVERIGHT)));
+ if(mpLastBtn)
+ mpLastBtn->SetAccessibleName( String(SvtResId(STR_TABBAR_PUSHBUTTON_MOVETOEND)));
+
SetSizePixel( Size( 100, CalcWindowSizePixel().Height() ) );
- ImplInitSettings( TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True );
}
// -----------------------------------------------------------------------
@@ -413,7 +424,7 @@ TabBar::TabBar( Window* pParent, WinBits nWinStyle ) :
TabBar::~TabBar()
{
- EndEditMode( TRUE );
+ EndEditMode( sal_True );
// Controls loeschen
if ( mpPrevBtn )
@@ -440,7 +451,7 @@ TabBar::~TabBar()
// -----------------------------------------------------------------------
-void TabBar::ImplInitSettings( BOOL bFont, BOOL bBackground )
+void TabBar::ImplInitSettings( sal_Bool bFont, sal_Bool bBackground )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -514,12 +525,12 @@ void TabBar::ImplGetColors( Color& rFaceColor, Color& rFaceTextColor,
// -----------------------------------------------------------------------
-BOOL TabBar::ImplCalcWidth()
+sal_Bool TabBar::ImplCalcWidth()
{
// Groessen muessen nur ermittelt werden, wenn sich Text aendert oder
// wenn der Font geaendert wurde
if ( !mbSizeFormat )
- return FALSE;
+ return sal_False;
// Breiten der Tabs mit dem fetten Font ermitteln
Font aFont = GetFont();
@@ -542,29 +553,29 @@ BOOL TabBar::ImplCalcWidth()
else
mnCurMaxWidth = 0;
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
ImplTabBarItem* pItem = mpItemList->First();
while ( pItem )
{
long nNewWidth = GetTextWidth( pItem->maText );
if ( mnCurMaxWidth && (nNewWidth > mnCurMaxWidth) )
{
- pItem->mbShort = TRUE;
+ pItem->mbShort = sal_True;
nNewWidth = mnCurMaxWidth;
}
else
- pItem->mbShort = FALSE;
+ pItem->mbShort = sal_False;
nNewWidth += TABBAR_OFFSET_X+TABBAR_OFFSET_X2;
if ( pItem->mnWidth != nNewWidth )
{
pItem->mnWidth = nNewWidth;
if ( !pItem->maRect.IsEmpty() )
- bChanged = TRUE;
+ bChanged = sal_True;
}
pItem = mpItemList->Next();
}
- mbSizeFormat = FALSE;
- mbFormat = TRUE;
+ mbSizeFormat = sal_False;
+ mbFormat = sal_True;
return bChanged;
}
@@ -577,7 +588,7 @@ void TabBar::ImplFormat()
if ( !mbFormat )
return;
- USHORT n = 0;
+ sal_uInt16 n = 0;
long x = mnOffX;
ImplTabBarItem* pItem = mpItemList->First();
while ( pItem )
@@ -612,7 +623,7 @@ void TabBar::ImplFormat()
pItem = mpItemList->Next();
}
- mbFormat = FALSE;
+ mbFormat = sal_False;
// Button enablen/disablen
ImplEnableControls();
@@ -620,13 +631,13 @@ void TabBar::ImplFormat()
// -----------------------------------------------------------------------
-USHORT TabBar::ImplGetLastFirstPos()
+sal_uInt16 TabBar::ImplGetLastFirstPos()
{
- USHORT nCount = (USHORT)(mpItemList->Count());
+ sal_uInt16 nCount = (sal_uInt16)(mpItemList->Count());
if ( !nCount || mbSizeFormat || mbFormat )
return 0;
- USHORT nLastFirstPos = nCount-1;
+ sal_uInt16 nLastFirstPos = nCount-1;
long nWinWidth = mnLastOffX-mnOffX-TABBAR_OFFSET_X-ADDNEWPAGE_AREAWIDTH;
long nWidth = mpItemList->GetObject( nLastFirstPos )->mnWidth;
while ( nLastFirstPos && (nWidth < nWinWidth) )
@@ -634,7 +645,7 @@ USHORT TabBar::ImplGetLastFirstPos()
nLastFirstPos--;
nWidth += mpItemList->GetObject( nLastFirstPos )->mnWidth;
}
- if ( (nLastFirstPos != (USHORT)(mpItemList->Count()-1)) &&
+ if ( (nLastFirstPos != (sal_uInt16)(mpItemList->Count()-1)) &&
(nWidth > nWinWidth) )
nLastFirstPos++;
return nLastFirstPos;
@@ -714,7 +725,7 @@ void TabBar::ImplEnableControls()
return;
// Buttons enablen/disblen
- BOOL bEnableBtn = mnFirstPos > 0;
+ sal_Bool bEnableBtn = mnFirstPos > 0;
if ( mpFirstBtn )
mpFirstBtn->Enable( bEnableBtn );
if ( mpPrevBtn )
@@ -729,7 +740,7 @@ void TabBar::ImplEnableControls()
// -----------------------------------------------------------------------
-void TabBar::ImplShowPage( USHORT nPos )
+void TabBar::ImplShowPage( sal_uInt16 nPos )
{
// Breite berechnen
long nWidth = GetOutputSizePixel().Width();
@@ -742,7 +753,7 @@ void TabBar::ImplShowPage( USHORT nPos )
{
while ( pItem->maRect.Right() > nWidth )
{
- USHORT nNewPos = mnFirstPos+1;
+ sal_uInt16 nNewPos = mnFirstPos+1;
SetFirstPageId( GetPageId( nNewPos ) );
ImplFormat();
if ( nNewPos != mnFirstPos )
@@ -757,7 +768,7 @@ IMPL_LINK( TabBar, ImplClickHdl, ImplTabButton*, pBtn )
{
EndEditMode();
- USHORT nNewPos = mnFirstPos;
+ sal_uInt16 nNewPos = mnFirstPos;
if ( pBtn == mpFirstBtn )
nNewPos = 0;
@@ -768,13 +779,13 @@ IMPL_LINK( TabBar, ImplClickHdl, ImplTabButton*, pBtn )
}
else if ( pBtn == mpNextBtn )
{
- USHORT nCount = GetPageCount();
+ sal_uInt16 nCount = GetPageCount();
if ( mnFirstPos < nCount )
nNewPos = mnFirstPos+1;
}
else
{
- USHORT nCount = GetPageCount();
+ sal_uInt16 nCount = GetPageCount();
if ( nCount )
nNewPos = nCount-1;
}
@@ -789,7 +800,7 @@ IMPL_LINK( TabBar, ImplClickHdl, ImplTabButton*, pBtn )
void TabBar::MouseMove( const MouseEvent& rMEvt )
{
if ( rMEvt.IsLeaveWindow() )
- mbInSelect = FALSE;
+ mbInSelect = sal_False;
Window::MouseMove( rMEvt );
}
@@ -807,14 +818,14 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt )
}
ImplTabBarItem* pItem;
- USHORT nSelId = GetPageId( rMEvt.GetPosPixel() );
+ sal_uInt16 nSelId = GetPageId( rMEvt.GetPosPixel() );
if ( !rMEvt.IsLeft() )
{
Window::MouseButtonDown( rMEvt );
if ( (nSelId > 0) && (nSelId != mnCurPageId) )
{
- USHORT nPos = GetPagePos( nSelId );
+ sal_uInt16 nPos = GetPagePos( nSelId );
pItem = mpItemList->GetObject( nPos );
if ( pItem->mbEnable )
@@ -826,7 +837,7 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt )
ImplActivatePage();
ImplSelect();
}
- mbInSelect = TRUE;
+ mbInSelect = sal_True;
}
}
return;
@@ -842,8 +853,8 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt )
{
if ( nSelId )
{
- USHORT nPos = GetPagePos( nSelId );
- BOOL bSelectTab = FALSE;
+ sal_uInt16 nPos = GetPagePos( nSelId );
+ sal_Bool bSelectTab = sal_False;
pItem = mpItemList->GetObject( nPos );
if ( pItem->mbEnable )
@@ -853,15 +864,15 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt )
if ( nSelId != mnCurPageId )
{
SelectPage( nSelId, !IsPageSelected( nSelId ) );
- bSelectTab = TRUE;
+ bSelectTab = sal_True;
}
}
else if ( mnWinStyle & (WB_MULTISELECT | WB_RANGESELECT) )
{
- bSelectTab = TRUE;
- USHORT n;
- BOOL bSelect;
- USHORT nCurPos = GetPagePos( mnCurPageId );
+ bSelectTab = sal_True;
+ sal_uInt16 n;
+ sal_Bool bSelect;
+ sal_uInt16 nCurPos = GetPagePos( mnCurPageId );
if ( nPos <= nCurPos )
{
// Alle Tabs bis zur angeklickten Tab deselektieren
@@ -872,9 +883,9 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt )
{
pItem = mpItemList->GetObject( n );
if ( n < nPos )
- bSelect = FALSE;
+ bSelect = sal_False;
else
- bSelect = TRUE;
+ bSelect = sal_True;
if ( pItem->mbSelect != bSelect )
{
@@ -892,16 +903,16 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt )
// Alle Tabs von der aktuellen bis zur angeklickten
// Tab selektieren und alle Tabs von der angeklickten
// Tab bis zur letzten Tab deselektieren
- USHORT nCount = (USHORT)mpItemList->Count();
+ sal_uInt16 nCount = (sal_uInt16)mpItemList->Count();
n = nCurPos;
while ( n < nCount )
{
pItem = mpItemList->GetObject( n );
if ( n <= nPos )
- bSelect = TRUE;
+ bSelect = sal_True;
else
- bSelect = FALSE;
+ bSelect = sal_False;
if ( pItem->mbSelect != bSelect )
{
@@ -925,7 +936,7 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt )
}
else
ImplShowPage( nPos );
- mbInSelect = TRUE;
+ mbInSelect = sal_True;
return;
}
@@ -935,7 +946,7 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt )
// Gegebenenfalls den Double-Click-Handler rufen
if ( !rMEvt.GetModifier() && (!nSelId || (nSelId == mnCurPageId)) )
{
- USHORT nOldCurId = mnCurPageId;
+ sal_uInt16 nOldCurId = mnCurPageId;
mnCurPageId = nSelId;
DoubleClick();
// Abfrage, da im DoubleClick-Handler die aktuelle Seite
@@ -953,7 +964,7 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt )
// Nur Select ausfuehren, wenn noch nicht aktuelle Page
if ( nSelId != mnCurPageId )
{
- USHORT nPos = GetPagePos( nSelId );
+ sal_uInt16 nPos = GetPagePos( nSelId );
pItem = mpItemList->GetObject( nPos );
if ( pItem->mbEnable )
@@ -961,9 +972,9 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt )
if ( !pItem->mbSelect )
{
// Muss invalidiert werden
- BOOL bUpdate = FALSE;
+ sal_Bool bUpdate = sal_False;
if ( IsReallyVisible() && IsUpdateMode() )
- bUpdate = TRUE;
+ bUpdate = sal_True;
// Alle selektierten Items deselektieren
pItem = mpItemList->First();
@@ -971,7 +982,7 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt )
{
if ( pItem->mbSelect || (pItem->mnId == mnCurPageId) )
{
- pItem->mbSelect = FALSE;
+ pItem->mbSelect = sal_False;
if ( bUpdate )
Invalidate( pItem->maRect );
}
@@ -990,7 +1001,7 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt )
}
else
ImplShowPage( nPos );
- mbInSelect = TRUE;
+ mbInSelect = sal_True;
}
return;
@@ -1004,7 +1015,7 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt )
void TabBar::MouseButtonUp( const MouseEvent& rMEvt )
{
- mbInSelect = FALSE;
+ mbInSelect = sal_False;
Window::MouseButtonUp( rMEvt );
}
@@ -1013,7 +1024,7 @@ void TabBar::MouseButtonUp( const MouseEvent& rMEvt )
void TabBar::Paint( const Rectangle& )
{
// Items berechnen und ausgeben
- USHORT nItemCount = (USHORT)mpItemList->Count();
+ sal_uInt16 nItemCount = (sal_uInt16)mpItemList->Count();
ImplTabBarItem* pItem;
// kein Item, dann auch nichts zu tun
@@ -1026,7 +1037,7 @@ void TabBar::Paint( const Rectangle& )
// sichtbar wird
if ( mbFirstFormat )
{
- mbFirstFormat = FALSE;
+ mbFirstFormat = sal_False;
if ( mnCurPageId && (mnFirstPos == 0) && !mbDropPos )
{
@@ -1035,9 +1046,9 @@ void TabBar::Paint( const Rectangle& )
{
// mbDropPos setzen (bzw. misbrauchen) um Invalidate()
// zu unterbinden
- mbDropPos = TRUE;
+ mbDropPos = sal_True;
SetFirstPageId( mnCurPageId );
- mbDropPos = FALSE;
+ mbDropPos = sal_False;
if ( mnFirstPos != 0 )
ImplFormat();
}
@@ -1086,7 +1097,7 @@ void TabBar::Paint( const Rectangle& )
if ( nItemCount )
{
// letzten sichtbaren Eintrag suchen
- USHORT n = mnFirstPos+1;
+ sal_uInt16 n = mnFirstPos+1;
if ( n >= nItemCount )
n = nItemCount-1;
pItem = mpItemList->Seek( n );
@@ -1310,7 +1321,7 @@ void TabBar::Resize()
// Scroll-Buttons anordnen
long nHeight = aNewSize.Height();
// Font in der groesse Anpassen?
- ImplInitSettings( TRUE, FALSE );
+ ImplInitSettings( sal_True, sal_False );
long nX = mbMirrored ? (aNewSize.Width()-nHeight) : 0;
long nXDiff = mbMirrored ? -nHeight : nHeight;
@@ -1356,7 +1367,7 @@ void TabBar::Resize()
}
// Neu formatieren
- mbSizeFormat = TRUE;
+ mbSizeFormat = sal_True;
if ( IsReallyVisible() )
{
if ( ImplCalcWidth() )
@@ -1372,7 +1383,7 @@ void TabBar::Resize()
void TabBar::RequestHelp( const HelpEvent& rHEvt )
{
- USHORT nItemId = GetPageId( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) );
+ sal_uInt16 nItemId = GetPageId( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) );
if ( nItemId )
{
if ( rHEvt.GetMode() & HELPMODE_BALLOON )
@@ -1408,7 +1419,7 @@ void TabBar::RequestHelp( const HelpEvent& rHEvt )
// wenn dieser abgeschnitten oder nicht voll sichtbar ist
if ( rHEvt.GetMode() & (HELPMODE_QUICK | HELPMODE_BALLOON) )
{
- USHORT nPos = GetPagePos( nItemId );
+ sal_uInt16 nPos = GetPagePos( nItemId );
ImplTabBarItem* pItem = mpItemList->GetObject( nPos );
if ( pItem->mbShort ||
(pItem->maRect.Right()-TABBAR_OFFSET_X-5 > mnLastOffX) )
@@ -1450,14 +1461,14 @@ void TabBar::StateChanged( StateChangedType nType )
else if ( (nType == STATE_CHANGE_ZOOM) ||
(nType == STATE_CHANGE_CONTROLFONT) )
{
- ImplInitSettings( TRUE, FALSE );
+ ImplInitSettings( sal_True, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
Invalidate();
else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
{
- ImplInitSettings( FALSE, TRUE );
+ ImplInitSettings( sal_False, sal_True );
Invalidate();
}
else if ( nType == STATE_CHANGE_MIRRORING )
@@ -1483,7 +1494,7 @@ void TabBar::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE)) )
{
- ImplInitSettings( TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True );
Invalidate();
}
}
@@ -1552,7 +1563,7 @@ long TabBar::DeactivatePage()
if ( maDeactivatePageHdl.IsSet() )
return maDeactivatePageHdl.Call( this );
else
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -1562,7 +1573,7 @@ long TabBar::StartRenaming()
if ( maStartRenamingHdl.IsSet() )
return maStartRenamingHdl.Call( this );
else
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -1572,7 +1583,7 @@ long TabBar::AllowRenaming()
if ( maAllowRenamingHdl.IsSet() )
return maAllowRenamingHdl.Call( this );
else
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -1591,8 +1602,8 @@ void TabBar::Mirror()
// -----------------------------------------------------------------------
-void TabBar::InsertPage( USHORT nPageId, const XubString& rText,
- TabBarPageBits nBits, USHORT nPos )
+void TabBar::InsertPage( sal_uInt16 nPageId, const XubString& rText,
+ TabBarPageBits nBits, sal_uInt16 nPos )
{
DBG_ASSERT( nPageId, "TabBar::InsertPage(): PageId == 0" );
DBG_ASSERT( GetPagePos( nPageId ) == PAGE_NOT_FOUND,
@@ -1602,7 +1613,7 @@ void TabBar::InsertPage( USHORT nPageId, const XubString& rText,
// PageItem anlegen und in die Item-Liste eintragen
ImplTabBarItem* pItem = new ImplTabBarItem( nPageId, rText, nBits );
mpItemList->Insert( pItem, nPos );
- mbSizeFormat = TRUE;
+ mbSizeFormat = sal_True;
// CurPageId gegebenenfalls setzen
if ( !mnCurPageId )
@@ -1617,9 +1628,9 @@ void TabBar::InsertPage( USHORT nPageId, const XubString& rText,
// -----------------------------------------------------------------------
-Color TabBar::GetTabBgColor( USHORT nPageId ) const
+Color TabBar::GetTabBgColor( sal_uInt16 nPageId ) const
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
if ( nPos != PAGE_NOT_FOUND )
return mpItemList->GetObject( nPos )->maTabBgColor;
@@ -1627,9 +1638,9 @@ Color TabBar::GetTabBgColor( USHORT nPageId ) const
return Color( COL_AUTO );
}
-void TabBar::SetTabBgColor( USHORT nPageId, const Color& aTabBgColor )
+void TabBar::SetTabBgColor( sal_uInt16 nPageId, const Color& aTabBgColor )
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
ImplTabBarItem* pItem;
if ( nPos != PAGE_NOT_FOUND )
{
@@ -1652,9 +1663,9 @@ void TabBar::SetTabBgColor( USHORT nPageId, const Color& aTabBgColor )
// -----------------------------------------------------------------------
-void TabBar::RemovePage( USHORT nPageId )
+void TabBar::RemovePage( sal_uInt16 nPageId )
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
// Existiert Item
if ( nPos != PAGE_NOT_FOUND )
@@ -1668,7 +1679,7 @@ void TabBar::RemovePage( USHORT nPageId )
// Item-Daten loeschen
delete mpItemList->Remove( nPos );
- mbFormat = TRUE;
+ mbFormat = sal_True;
// Leiste neu ausgeben
if ( IsReallyVisible() && IsUpdateMode() )
@@ -1680,9 +1691,9 @@ void TabBar::RemovePage( USHORT nPageId )
// -----------------------------------------------------------------------
-void TabBar::MovePage( USHORT nPageId, USHORT nNewPos )
+void TabBar::MovePage( sal_uInt16 nPageId, sal_uInt16 nNewPos )
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
Pair aPair( nPos, nNewPos );
if ( nPos < nNewPos )
@@ -1697,7 +1708,7 @@ void TabBar::MovePage( USHORT nPageId, USHORT nNewPos )
// TabBar-Item in der Liste verschieben
ImplTabBarItem* pItem = mpItemList->Remove( nPos );
mpItemList->Insert( pItem, nNewPos );
- mbFormat = TRUE;
+ mbFormat = sal_True;
// Leiste neu ausgeben
if ( IsReallyVisible() && IsUpdateMode() )
@@ -1722,7 +1733,7 @@ void TabBar::Clear()
// Items aus der Liste loeschen
mpItemList->Clear();
- mbSizeFormat = TRUE;
+ mbSizeFormat = sal_True;
mnCurPageId = 0;
mnFirstPos = 0;
@@ -1735,9 +1746,9 @@ void TabBar::Clear()
// -----------------------------------------------------------------------
-void TabBar::EnablePage( USHORT nPageId, BOOL bEnable )
+void TabBar::EnablePage( sal_uInt16 nPageId, sal_Bool bEnable )
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
if ( nPos != PAGE_NOT_FOUND )
{
@@ -1758,21 +1769,21 @@ void TabBar::EnablePage( USHORT nPageId, BOOL bEnable )
// -----------------------------------------------------------------------
-BOOL TabBar::IsPageEnabled( USHORT nPageId ) const
+sal_Bool TabBar::IsPageEnabled( sal_uInt16 nPageId ) const
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
if ( nPos != PAGE_NOT_FOUND )
return mpItemList->GetObject( nPos )->mbEnable;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-void TabBar::SetPageBits( USHORT nPageId, TabBarPageBits nBits )
+void TabBar::SetPageBits( sal_uInt16 nPageId, TabBarPageBits nBits )
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
if ( nPos != PAGE_NOT_FOUND )
{
@@ -1791,26 +1802,26 @@ void TabBar::SetPageBits( USHORT nPageId, TabBarPageBits nBits )
// -----------------------------------------------------------------------
-TabBarPageBits TabBar::GetPageBits( USHORT nPageId ) const
+TabBarPageBits TabBar::GetPageBits( sal_uInt16 nPageId ) const
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
if ( nPos != PAGE_NOT_FOUND )
return mpItemList->GetObject( nPos )->mnBits;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-USHORT TabBar::GetPageCount() const
+sal_uInt16 TabBar::GetPageCount() const
{
- return (USHORT)mpItemList->Count();
+ return (sal_uInt16)mpItemList->Count();
}
// -----------------------------------------------------------------------
-USHORT TabBar::GetPageId( USHORT nPos ) const
+sal_uInt16 TabBar::GetPageId( sal_uInt16 nPos ) const
{
ImplTabBarItem* pItem = mpItemList->GetObject( nPos );
if ( pItem )
@@ -1821,13 +1832,13 @@ USHORT TabBar::GetPageId( USHORT nPos ) const
// -----------------------------------------------------------------------
-USHORT TabBar::GetPagePos( USHORT nPageId ) const
+sal_uInt16 TabBar::GetPagePos( sal_uInt16 nPageId ) const
{
ImplTabBarItem* pItem = mpItemList->First();
while ( pItem )
{
if ( pItem->mnId == nPageId )
- return (USHORT)mpItemList->GetCurPos();
+ return (sal_uInt16)mpItemList->GetCurPos();
pItem = mpItemList->Next();
}
@@ -1837,7 +1848,7 @@ USHORT TabBar::GetPagePos( USHORT nPageId ) const
// -----------------------------------------------------------------------
-USHORT TabBar::GetPageId( const Point& rPos ) const
+sal_uInt16 TabBar::GetPageId( const Point& rPos ) const
{
ImplTabBarItem* pItem = mpItemList->First();
while ( pItem )
@@ -1853,9 +1864,9 @@ USHORT TabBar::GetPageId( const Point& rPos ) const
// -----------------------------------------------------------------------
-Rectangle TabBar::GetPageRect( USHORT nPageId ) const
+Rectangle TabBar::GetPageRect( sal_uInt16 nPageId ) const
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
if ( nPos != PAGE_NOT_FOUND )
return mpItemList->GetObject( nPos )->maRect;
@@ -1865,9 +1876,9 @@ Rectangle TabBar::GetPageRect( USHORT nPageId ) const
// -----------------------------------------------------------------------
-void TabBar::SetCurPageId( USHORT nPageId )
+void TabBar::SetCurPageId( sal_uInt16 nPageId )
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
// Wenn Item nicht existiert, dann nichts machen
if ( nPos != PAGE_NOT_FOUND )
@@ -1878,9 +1889,9 @@ void TabBar::SetCurPageId( USHORT nPageId )
return;
// Muss invalidiert werden
- BOOL bUpdate = FALSE;
+ sal_Bool bUpdate = sal_False;
if ( IsReallyVisible() && IsUpdateMode() )
- bUpdate = TRUE;
+ bUpdate = sal_True;
ImplTabBarItem* pItem = mpItemList->GetObject( nPos );
ImplTabBarItem* pOldItem;
@@ -1894,14 +1905,14 @@ void TabBar::SetCurPageId( USHORT nPageId )
// deselktieren, wenn dies die einzige selektierte Seite ist
if ( !pItem->mbSelect && pOldItem )
{
- USHORT nSelPageCount = GetSelectPageCount();
+ sal_uInt16 nSelPageCount = GetSelectPageCount();
if ( nSelPageCount == 1 )
- pOldItem->mbSelect = FALSE;
- pItem->mbSelect = TRUE;
+ pOldItem->mbSelect = sal_False;
+ pItem->mbSelect = sal_True;
}
mnCurPageId = nPageId;
- mbFormat = TRUE;
+ mbFormat = sal_True;
// Dafuer sorgen, das aktuelle Page sichtbar wird
if ( IsReallyVisible() )
@@ -1923,7 +1934,7 @@ void TabBar::SetCurPageId( USHORT nPageId )
while ( (mbMirrored ? (pItem->maRect.Left() < mnOffX) : (pItem->maRect.Right() > nWidth)) ||
pItem->maRect.IsEmpty() )
{
- USHORT nNewPos = mnFirstPos+1;
+ sal_uInt16 nNewPos = mnFirstPos+1;
// Dafuer sorgen, das min. die aktuelle TabPages als
// erste TabPage sichtbar ist
if ( nNewPos >= nPos )
@@ -1954,12 +1965,12 @@ void TabBar::SetCurPageId( USHORT nPageId )
// -----------------------------------------------------------------------
-void TabBar::MakeVisible( USHORT nPageId )
+void TabBar::MakeVisible( sal_uInt16 nPageId )
{
if ( !IsReallyVisible() )
return;
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
// Wenn Item nicht existiert, dann nichts machen
if ( nPos != PAGE_NOT_FOUND )
@@ -1977,14 +1988,14 @@ void TabBar::MakeVisible( USHORT nPageId )
if ( mbFormat || pItem->maRect.IsEmpty() )
{
- mbFormat = TRUE;
+ mbFormat = sal_True;
ImplFormat();
}
while ( (pItem->maRect.Right() > nWidth) ||
pItem->maRect.IsEmpty() )
{
- USHORT nNewPos = mnFirstPos+1;
+ sal_uInt16 nNewPos = mnFirstPos+1;
// Dafuer sorgen, das min. die aktuelle TabPages als
// erste TabPage sichtbar ist
if ( nNewPos >= nPos )
@@ -2006,11 +2017,11 @@ void TabBar::MakeVisible( USHORT nPageId )
// -----------------------------------------------------------------------
-void TabBar::SetFirstPageId( USHORT nPageId )
+void TabBar::SetFirstPageId( sal_uInt16 nPageId )
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
- // Wenn Item nicht existiert, dann FALSE zurueckgeben
+ // Wenn Item nicht existiert, dann sal_False zurueckgeben
if ( nPos != PAGE_NOT_FOUND )
{
if ( nPos != mnFirstPos )
@@ -2018,8 +2029,8 @@ void TabBar::SetFirstPageId( USHORT nPageId )
// Dafuer sorgen, das nach Moeglichkteit soviele Pages wie
// moeglich sichtbar sind
ImplFormat();
- USHORT nLastFirstPos = ImplGetLastFirstPos();
- USHORT nNewPos;
+ sal_uInt16 nLastFirstPos = ImplGetLastFirstPos();
+ sal_uInt16 nNewPos;
if ( nPos > nLastFirstPos )
nNewPos = nLastFirstPos;
else
@@ -2028,7 +2039,7 @@ void TabBar::SetFirstPageId( USHORT nPageId )
if ( nNewPos != mnFirstPos )
{
mnFirstPos = nNewPos;
- mbFormat = TRUE;
+ mbFormat = sal_True;
// Leiste neu ausgeben (Achtung: mbDropPos beachten, da wenn
// dieses Flag gesetzt ist, wird direkt gepaintet)
@@ -2041,9 +2052,9 @@ void TabBar::SetFirstPageId( USHORT nPageId )
// -----------------------------------------------------------------------
-void TabBar::SelectPage( USHORT nPageId, BOOL bSelect )
+void TabBar::SelectPage( sal_uInt16 nPageId, sal_Bool bSelect )
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
if ( nPos != PAGE_NOT_FOUND )
{
@@ -2062,10 +2073,10 @@ void TabBar::SelectPage( USHORT nPageId, BOOL bSelect )
// -----------------------------------------------------------------------
-void TabBar::SelectPageRange( BOOL bSelect, USHORT nStartPos, USHORT nEndPos )
+void TabBar::SelectPageRange( sal_Bool bSelect, sal_uInt16 nStartPos, sal_uInt16 nEndPos )
{
Rectangle aPaintRect;
- USHORT nPos = nStartPos;
+ sal_uInt16 nPos = nStartPos;
ImplTabBarItem* pItem = mpItemList->Seek( nPos );
while ( pItem && (nPos <= nEndPos) )
{
@@ -2086,9 +2097,9 @@ void TabBar::SelectPageRange( BOOL bSelect, USHORT nStartPos, USHORT nEndPos )
// -----------------------------------------------------------------------
-USHORT TabBar::GetSelectPage( USHORT nSelIndex ) const
+sal_uInt16 TabBar::GetSelectPage( sal_uInt16 nSelIndex ) const
{
- USHORT nSelected = 0;
+ sal_uInt16 nSelected = 0;
ImplTabBarItem* pItem = mpItemList->First();
while ( pItem )
{
@@ -2106,9 +2117,9 @@ USHORT TabBar::GetSelectPage( USHORT nSelIndex ) const
// -----------------------------------------------------------------------
-USHORT TabBar::GetSelectPageCount() const
+sal_uInt16 TabBar::GetSelectPageCount() const
{
- USHORT nSelected = 0;
+ sal_uInt16 nSelected = 0;
ImplTabBarItem* pItem = mpItemList->First();
while ( pItem )
{
@@ -2123,22 +2134,22 @@ USHORT TabBar::GetSelectPageCount() const
// -----------------------------------------------------------------------
-BOOL TabBar::IsPageSelected( USHORT nPageId ) const
+sal_Bool TabBar::IsPageSelected( sal_uInt16 nPageId ) const
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
if ( nPos != PAGE_NOT_FOUND )
return mpItemList->GetObject( nPos )->mbSelect;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL TabBar::StartEditMode( USHORT nPageId )
+sal_Bool TabBar::StartEditMode( sal_uInt16 nPageId )
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
if ( mpEdit || (nPos == PAGE_NOT_FOUND) || (mnLastOffX < 8) )
- return FALSE;
+ return sal_False;
mnEditId = nPageId;
if ( StartRenaming() )
@@ -2190,23 +2201,23 @@ BOOL TabBar::StartEditMode( USHORT nPageId )
mpEdit->GrabFocus();
mpEdit->SetSelection( Selection( 0, mpEdit->GetText().Len() ) );
mpEdit->Show();
- return TRUE;
+ return sal_True;
}
else
{
mnEditId = 0;
- return FALSE;
+ return sal_False;
}
}
// -----------------------------------------------------------------------
-void TabBar::EndEditMode( BOOL bCancel )
+void TabBar::EndEditMode( sal_Bool bCancel )
{
if ( mpEdit )
{
// call hdl
- BOOL bEnd = TRUE;
+ sal_Bool bEnd = sal_True;
mbEditCanceled = bCancel;
maEditText = mpEdit->GetText();
mpEdit->SetPostEvent();
@@ -2216,9 +2227,9 @@ void TabBar::EndEditMode( BOOL bCancel )
if ( nAllowRenaming == TABBAR_RENAMING_YES )
SetPageText( mnEditId, maEditText );
else if ( nAllowRenaming == TABBAR_RENAMING_NO )
- bEnd = FALSE;
+ bEnd = sal_False;
else // nAllowRenaming == TABBAR_RENAMING_CANCEL
- mbEditCanceled = TRUE;
+ mbEditCanceled = sal_True;
}
// renaming not allowed, than reset edit data
@@ -2238,30 +2249,30 @@ void TabBar::EndEditMode( BOOL bCancel )
// reset
maEditText.Erase();
- mbEditCanceled = FALSE;
+ mbEditCanceled = sal_False;
}
}
// -----------------------------------------------------------------------
-void TabBar::SetMirrored( BOOL bMirrored )
+void TabBar::SetMirrored( sal_Bool bMirrored )
{
if( mbMirrored != bMirrored )
{
mbMirrored = bMirrored;
- mbSizeFormat = TRUE;
+ mbSizeFormat = sal_True;
ImplInitControls(); // for button images
Resize(); // recalculates control positions
Mirror();
}
}
-void TabBar::SetEffectiveRTL( BOOL bRTL )
+void TabBar::SetEffectiveRTL( sal_Bool bRTL )
{
SetMirrored( bRTL != Application::GetSettings().GetLayoutRTL() );
}
-BOOL TabBar::IsEffectiveRTL() const
+sal_Bool TabBar::IsEffectiveRTL() const
{
return IsMirrored() != Application::GetSettings().GetLayoutRTL();
}
@@ -2273,7 +2284,7 @@ void TabBar::SetMaxPageWidth( long nMaxWidth )
if ( mnMaxPageWidth != nMaxWidth )
{
mnMaxPageWidth = nMaxWidth;
- mbSizeFormat = TRUE;
+ mbSizeFormat = sal_True;
// Leiste neu ausgeben
if ( IsReallyVisible() && IsUpdateMode() )
@@ -2288,7 +2299,7 @@ void TabBar::SetSelectColor()
if ( mbSelColor )
{
maSelColor = Color( COL_TRANSPARENT );
- mbSelColor = FALSE;
+ mbSelColor = sal_False;
Invalidate();
}
}
@@ -2302,7 +2313,7 @@ void TabBar::SetSelectColor( const Color& rColor )
if ( mbSelColor )
{
maSelColor = Color( COL_TRANSPARENT );
- mbSelColor = FALSE;
+ mbSelColor = sal_False;
Invalidate();
}
}
@@ -2311,7 +2322,7 @@ void TabBar::SetSelectColor( const Color& rColor )
if ( maSelColor != rColor )
{
maSelColor = rColor;
- mbSelColor = TRUE;
+ mbSelColor = sal_True;
Invalidate();
}
}
@@ -2324,7 +2335,7 @@ void TabBar::SetSelectTextColor()
if ( mbSelTextColor )
{
maSelTextColor = Color( COL_TRANSPARENT );
- mbSelTextColor = FALSE;
+ mbSelTextColor = sal_False;
Invalidate();
}
}
@@ -2338,7 +2349,7 @@ void TabBar::SetSelectTextColor( const Color& rColor )
if ( mbSelTextColor )
{
maSelTextColor = Color( COL_TRANSPARENT );
- mbSelTextColor = FALSE;
+ mbSelTextColor = sal_False;
Invalidate();
}
}
@@ -2347,7 +2358,7 @@ void TabBar::SetSelectTextColor( const Color& rColor )
if ( maSelTextColor != rColor )
{
maSelTextColor = rColor;
- mbSelTextColor = TRUE;
+ mbSelTextColor = sal_True;
Invalidate();
}
}
@@ -2355,13 +2366,13 @@ void TabBar::SetSelectTextColor( const Color& rColor )
// -----------------------------------------------------------------------
-void TabBar::SetPageText( USHORT nPageId, const XubString& rText )
+void TabBar::SetPageText( sal_uInt16 nPageId, const XubString& rText )
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
if ( nPos != PAGE_NOT_FOUND )
{
mpItemList->GetObject( nPos )->maText = rText;
- mbSizeFormat = TRUE;
+ mbSizeFormat = sal_True;
// Leiste neu ausgeben
if ( IsReallyVisible() && IsUpdateMode() )
@@ -2373,9 +2384,9 @@ void TabBar::SetPageText( USHORT nPageId, const XubString& rText )
// -----------------------------------------------------------------------
-XubString TabBar::GetPageText( USHORT nPageId ) const
+XubString TabBar::GetPageText( sal_uInt16 nPageId ) const
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
if ( nPos != PAGE_NOT_FOUND )
return mpItemList->GetObject( nPos )->maText;
else
@@ -2384,18 +2395,18 @@ XubString TabBar::GetPageText( USHORT nPageId ) const
// -----------------------------------------------------------------------
-void TabBar::SetHelpText( USHORT nPageId, const XubString& rText )
+void TabBar::SetHelpText( sal_uInt16 nPageId, const XubString& rText )
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
if ( nPos != PAGE_NOT_FOUND )
mpItemList->GetObject( nPos )->maHelpText = rText;
}
// -----------------------------------------------------------------------
-XubString TabBar::GetHelpText( USHORT nPageId ) const
+XubString TabBar::GetHelpText( sal_uInt16 nPageId ) const
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
if ( nPos != PAGE_NOT_FOUND )
{
ImplTabBarItem* pItem = mpItemList->GetObject( nPos );
@@ -2414,18 +2425,18 @@ XubString TabBar::GetHelpText( USHORT nPageId ) const
// -----------------------------------------------------------------------
-void TabBar::SetHelpId( USHORT nPageId, const rtl::OString& rHelpId )
+void TabBar::SetHelpId( sal_uInt16 nPageId, const rtl::OString& rHelpId )
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
if ( nPos != PAGE_NOT_FOUND )
mpItemList->GetObject( nPos )->maHelpId = rHelpId;
}
// -----------------------------------------------------------------------
-rtl::OString TabBar::GetHelpId( USHORT nPageId ) const
+rtl::OString TabBar::GetHelpId( sal_uInt16 nPageId ) const
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
rtl::OString aRet;
if ( nPos != PAGE_NOT_FOUND )
aRet = mpItemList->GetObject( nPos )->maHelpId;
@@ -2446,10 +2457,10 @@ long TabBar::GetMinSize() const
// -----------------------------------------------------------------------
-BOOL TabBar::StartDrag( const CommandEvent& rCEvt, Region& rRegion )
+sal_Bool TabBar::StartDrag( const CommandEvent& rCEvt, Region& rRegion )
{
if ( !(mnWinStyle & WB_DRAG) || (rCEvt.GetCommand() != COMMAND_STARTDRAG) )
- return FALSE;
+ return sal_False;
// Testen, ob angeklickte Seite selektiert ist. Falls dies nicht
// der Fall ist, setzen wir ihn als aktuellen Eintrag. Falls Drag and
@@ -2459,11 +2470,11 @@ BOOL TabBar::StartDrag( const CommandEvent& rCEvt, Region& rRegion )
// da der Select schon den Bereich gescrollt haben kann
if ( rCEvt.IsMouseEvent() && !mbInSelect )
{
- USHORT nSelId = GetPageId( rCEvt.GetMousePosPixel() );
+ sal_uInt16 nSelId = GetPageId( rCEvt.GetMousePosPixel() );
// Falls kein Eintrag angeklickt wurde, starten wir kein Dragging
if ( !nSelId )
- return FALSE;
+ return sal_False;
// Testen, ob Seite selektiertiert ist. Falls nicht, als aktuelle
// Seite setzen und Select rufen.
@@ -2477,34 +2488,34 @@ BOOL TabBar::StartDrag( const CommandEvent& rCEvt, Region& rRegion )
ImplSelect();
}
else
- return FALSE;
+ return sal_False;
}
}
- mbInSelect = FALSE;
+ mbInSelect = sal_False;
Region aRegion;
// Region zuweisen
rRegion = aRegion;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-USHORT TabBar::ShowDropPos( const Point& rPos )
+sal_uInt16 TabBar::ShowDropPos( const Point& rPos )
{
ImplTabBarItem* pItem;
- USHORT nDropId;
- USHORT nNewDropPos;
- USHORT nItemCount = (USHORT)mpItemList->Count();
+ sal_uInt16 nDropId;
+ sal_uInt16 nNewDropPos;
+ sal_uInt16 nItemCount = (sal_uInt16)mpItemList->Count();
short nScroll = 0;
if ( rPos.X() > mnLastOffX-TABBAR_DRAG_SCROLLOFF )
{
pItem = mpItemList->GetObject( mpItemList->Count()-1 );
if ( !pItem->maRect.IsEmpty() && (rPos.X() > pItem->maRect.Right()) )
- nNewDropPos = (USHORT)mpItemList->Count();
+ nNewDropPos = (sal_uInt16)mpItemList->Count();
else
{
nNewDropPos = mnFirstPos+1;
@@ -2540,12 +2551,12 @@ USHORT TabBar::ShowDropPos( const Point& rPos )
if ( mbDropPos )
HideDropPos();
- mbDropPos = TRUE;
+ mbDropPos = sal_True;
mnDropPos = nNewDropPos;
if ( nScroll )
{
- USHORT nOldFirstPos = mnFirstPos;
+ sal_uInt16 nOldFirstPos = mnFirstPos;
SetFirstPageId( GetPageId( mnFirstPos+nScroll ) );
// Direkt ausgeben, da kein Paint bei Drag and Drop moeglich
@@ -2562,7 +2573,7 @@ USHORT TabBar::ShowDropPos( const Point& rPos )
Color aBlackColor( COL_BLACK );
long nX;
long nY = (maWinSize.Height()/2)-1;
- USHORT nCurPos = GetPagePos( mnCurPageId );
+ sal_uInt16 nCurPos = GetPagePos( mnCurPageId );
SetLineColor( aBlackColor );
if ( mnDropPos < nItemCount )
@@ -2606,7 +2617,7 @@ void TabBar::HideDropPos()
long nX;
long nY1 = (maWinSize.Height()/2)-3;
long nY2 = nY1 + 5;
- USHORT nItemCount = (USHORT)mpItemList->Count();
+ sal_uInt16 nItemCount = (sal_uInt16)mpItemList->Count();
if ( mnDropPos < nItemCount )
{
@@ -2633,17 +2644,17 @@ void TabBar::HideDropPos()
SetClipRegion();
}
- mbDropPos = FALSE;
+ mbDropPos = sal_False;
mnDropPos = 0;
}
}
// -----------------------------------------------------------------------
-BOOL TabBar::SwitchPage( const Point& rPos )
+sal_Bool TabBar::SwitchPage( const Point& rPos )
{
- BOOL bSwitch = FALSE;
- USHORT nSwitchId = GetPageId( rPos );
+ sal_Bool bSwitch = sal_False;
+ sal_uInt16 nSwitchId = GetPageId( rPos );
if ( !nSwitchId )
EndSwitchPage();
else
@@ -2660,16 +2671,16 @@ BOOL TabBar::SwitchPage( const Point& rPos )
{
if ( Time::GetSystemTicks() > mnSwitchTime+500 )
{
- mbInSwitching = TRUE;
+ mbInSwitching = sal_True;
if ( ImplDeactivatePage() )
{
SetCurPageId( mnSwitchId );
Update();
ImplActivatePage();
ImplSelect();
- bSwitch = TRUE;
+ bSwitch = sal_True;
}
- mbInSwitching = FALSE;
+ mbInSwitching = sal_False;
}
}
}
diff --git a/svtools/source/control/taskbar.cxx b/svtools/source/control/taskbar.cxx
index 232727951281..06c90818b13e 100755
--- a/svtools/source/control/taskbar.cxx
+++ b/svtools/source/control/taskbar.cxx
@@ -76,9 +76,9 @@ TaskBar::TaskBar( Window* pParent, WinBits nWinStyle ) :
mnOldStatusWidth = 0;
mnLines = 1;
mnWinBits = nWinStyle;
- mbStatusText = FALSE;
- mbShowItems = FALSE;
- mbAutoHide = FALSE;
+ mbStatusText = sal_False;
+ mbShowItems = sal_False;
+ mbAutoHide = sal_False;
ImplInitSettings();
}
@@ -309,13 +309,13 @@ void TaskBar::Resize()
if ( pTempButtonBar )
{
- USHORT i = 0;
- BOOL bVisibleItems = FALSE;
+ sal_uInt16 i = 0;
+ sal_Bool bVisibleItems = sal_False;
while ( i < pTempButtonBar->GetItemCount() )
{
if ( pTempButtonBar->IsItemVisible( pTempButtonBar->GetItemId( i ) ) )
{
- bVisibleItems = TRUE;
+ bVisibleItems = sal_True;
break;
}
i++;
@@ -464,14 +464,14 @@ void TaskBar::Format()
// -----------------------------------------------------------------------
-void TaskBar::SetLines( USHORT nLines )
+void TaskBar::SetLines( sal_uInt16 nLines )
{
mnLines = nLines;
}
// -----------------------------------------------------------------------
-void TaskBar::EnableAutoHide( BOOL bAutoHide )
+void TaskBar::EnableAutoHide( sal_Bool bAutoHide )
{
mbAutoHide = bAutoHide;
@@ -493,14 +493,14 @@ void TaskBar::ShowStatusText( const String& rText )
{
if ( !mbStatusText )
{
- mbStatusText = TRUE;
+ mbStatusText = sal_True;
if ( mpStatusBar->AreItemsVisible() )
{
- mbShowItems = TRUE;
+ mbShowItems = sal_True;
mpStatusBar->HideItems();
}
else
- mbShowItems = TRUE;
+ mbShowItems = sal_True;
maOldText = mpStatusBar->GetText();
Resize();
mpStatusBar->SetText( rText );
@@ -518,7 +518,7 @@ void TaskBar::HideStatusText()
{
if ( mbStatusText && mpStatusBar )
{
- mbStatusText = FALSE;
+ mbStatusText = sal_False;
mpStatusBar->SetText( maOldText );
Resize();
if ( mbShowItems )
diff --git a/svtools/source/control/taskbox.cxx b/svtools/source/control/taskbox.cxx
index 3f05d077b7c5..798126ae37af 100755
--- a/svtools/source/control/taskbox.cxx
+++ b/svtools/source/control/taskbox.cxx
@@ -60,7 +60,7 @@ TaskToolBox::TaskToolBox( Window* pParent, WinBits nWinStyle ) :
mnActiveItemId = 0;
mnTaskItem = 0;
mnSmallItem = TOOLBOX_ITEM_NOTFOUND;
- mbMinActivate = FALSE;
+ mbMinActivate = sal_False;
SetAlign( WINDOWALIGN_BOTTOM );
SetButtonType( BUTTON_SYMBOLTEXT );
@@ -82,14 +82,14 @@ TaskToolBox::~TaskToolBox()
// -----------------------------------------------------------------------
-void TaskToolBox::ActivateTaskItem( USHORT nItemId, BOOL bMinActivate )
+void TaskToolBox::ActivateTaskItem( sal_uInt16 nItemId, sal_Bool bMinActivate )
{
if ( nItemId )
{
if ( nItemId != mnActiveItemId )
{
if ( mnActiveItemId )
- CheckItem( mnActiveItemId, FALSE );
+ CheckItem( mnActiveItemId, sal_False );
CheckItem( nItemId );
mnActiveItemId = nItemId;
}
@@ -98,13 +98,13 @@ void TaskToolBox::ActivateTaskItem( USHORT nItemId, BOOL bMinActivate )
if ( !bMinActivate )
return;
- mbMinActivate = TRUE;
+ mbMinActivate = sal_True;
}
mnTaskItem = nItemId-1;
ActivateTask();
mnTaskItem = 0;
- mbMinActivate = FALSE;
+ mbMinActivate = sal_False;
}
}
@@ -135,7 +135,7 @@ void TaskToolBox::MouseButtonDown( const MouseEvent& rMEvt )
void TaskToolBox::Resize()
{
mnOldItemCount = mpItemList->Count();
- mnUpdatePos = (USHORT)mnOldItemCount;
+ mnUpdatePos = (sal_uInt16)mnOldItemCount;
mnUpdateNewPos = TOOLBOX_ITEM_NOTFOUND;
ImplFormatTaskToolBox();
ToolBox::Resize();
@@ -147,7 +147,7 @@ void TaskToolBox::Command( const CommandEvent& rCEvt )
{
if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU )
{
- USHORT nItemId = GetItemId( rCEvt.GetMousePosPixel() );
+ sal_uInt16 nItemId = GetItemId( rCEvt.GetMousePosPixel() );
// Dies machen wir nicht mehr, da es von zu vielen als stoerend empfunden wurde
// ActivateTaskItem( nItemId );
mnTaskItem = nItemId-1;
@@ -167,7 +167,7 @@ void TaskToolBox::RequestHelp( const HelpEvent& rHEvt )
{
if ( rHEvt.GetMode() & (HELPMODE_BALLOON | HELPMODE_QUICK) )
{
- USHORT nItemId = GetItemId( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) );
+ sal_uInt16 nItemId = GetItemId( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) );
if ( nItemId )
{
@@ -196,8 +196,8 @@ void TaskToolBox::RequestHelp( const HelpEvent& rHEvt )
void TaskToolBox::Select()
{
- USHORT nItemId = GetCurItemId();
- ActivateTaskItem( nItemId, TRUE );
+ sal_uInt16 nItemId = GetCurItemId();
+ ActivateTaskItem( nItemId, sal_True );
}
// -----------------------------------------------------------------------
@@ -208,7 +208,7 @@ void TaskToolBox::ImplFormatTaskToolBox()
{
// Eintraege aus der Liste entfernen
while ( mpItemList->Count() > mnUpdatePos )
- delete mpItemList->Remove( (ULONG)mnUpdatePos );
+ delete mpItemList->Remove( (sal_uLong)mnUpdatePos );
mnUpdateNewPos = mnUpdatePos;
}
@@ -236,14 +236,14 @@ void TaskToolBox::ImplFormatTaskToolBox()
}
// Eintraege aus der ToolBox entfernen, die ersetzt werden
- USHORT nBtnPos = (mnUpdateNewPos*2);
+ sal_uInt16 nBtnPos = (mnUpdateNewPos*2);
while ( nBtnPos < GetItemCount() )
RemoveItem( nBtnPos );
if ( mnUpdateNewPos <= (mnActiveItemId-1) )
mnActiveItemId = 0;
// Neue Eintrage einfuegen
- USHORT i = mnUpdateNewPos;
+ sal_uInt16 i = mnUpdateNewPos;
while ( i < mpItemList->Count() )
{
ImplTaskItem* pItem = mpItemList->GetObject( i );
@@ -267,7 +267,7 @@ void TaskToolBox::ImplFormatTaskToolBox()
while ( (nTxtWidth > mnMaxTextWidth) && (aText.Len() > 3) );
}
- USHORT nItemId = i+1;
+ sal_uInt16 nItemId = i+1;
if ( aText.EqualsAscii( "..." ) )
InsertItem( nItemId, pItem->maImage, TIB_LEFT );
else
@@ -282,7 +282,7 @@ void TaskToolBox::ImplFormatTaskToolBox()
if ( mnNewActivePos+1 != mnActiveItemId )
{
if ( mnActiveItemId )
- CheckItem( mnActiveItemId, FALSE );
+ CheckItem( mnActiveItemId, sal_False );
mnActiveItemId = mnNewActivePos+1;
CheckItem( mnActiveItemId );
}
@@ -301,7 +301,7 @@ void TaskToolBox::StartUpdateTask()
// -----------------------------------------------------------------------
void TaskToolBox::UpdateTask( const Image& rImage, const String& rText,
- BOOL bActive )
+ sal_Bool bActive )
{
ImplTaskItem* pItem = mpItemList->GetObject( mnUpdatePos );
if ( pItem )
@@ -310,7 +310,7 @@ void TaskToolBox::UpdateTask( const Image& rImage, const String& rText,
{
// Eintraege aus der Liste entfernen
while ( mpItemList->Count() > mnUpdatePos )
- delete mpItemList->Remove( (ULONG)mnUpdatePos );
+ delete mpItemList->Remove( (sal_uLong)mnUpdatePos );
pItem = NULL;
}
}
@@ -340,7 +340,7 @@ void TaskToolBox::EndUpdateTask()
{
// Eintraege aus der Liste entfernen
while ( mpItemList->Count() > mnUpdatePos )
- delete mpItemList->Remove( (ULONG)mnUpdatePos );
+ delete mpItemList->Remove( (sal_uLong)mnUpdatePos );
mnUpdateNewPos = mnUpdatePos;
}
diff --git a/svtools/source/control/taskmisc.cxx b/svtools/source/control/taskmisc.cxx
index 62eaf020c8f0..35d5d8997624 100755
--- a/svtools/source/control/taskmisc.cxx
+++ b/svtools/source/control/taskmisc.cxx
@@ -73,9 +73,9 @@ WindowArrange::~WindowArrange()
// -----------------------------------------------------------------------
-static USHORT ImplCeilSqareRoot( USHORT nVal )
+static sal_uInt16 ImplCeilSqareRoot( sal_uInt16 nVal )
{
- USHORT i;
+ sal_uInt16 i;
// Ueberlauf verhindern
if ( nVal > 0xFE * 0xFE )
@@ -103,19 +103,19 @@ static void ImplPosSizeWindow( Window* pWindow,
void WindowArrange::ImplTile( const Rectangle& rRect )
{
- USHORT nCount = (USHORT)mpWinList->Count();
+ sal_uInt16 nCount = (sal_uInt16)mpWinList->Count();
if ( nCount < 3 )
{
ImplVert( rRect );
return;
}
- USHORT i;
- USHORT j;
- USHORT nCols;
- USHORT nRows;
- USHORT nActRows;
- USHORT nOffset;
+ sal_uInt16 i;
+ sal_uInt16 j;
+ sal_uInt16 nCols;
+ sal_uInt16 nRows;
+ sal_uInt16 nActRows;
+ sal_uInt16 nOffset;
long nOverWidth;
long nOverHeight;
Window* pWindow;
@@ -353,7 +353,7 @@ void WindowArrange::ImplCascade( const Rectangle& rRect )
// -----------------------------------------------------------------------
-void WindowArrange::Arrange( USHORT nType, const Rectangle& rRect )
+void WindowArrange::Arrange( sal_uInt16 nType, const Rectangle& rRect )
{
if ( !mpWinList->Count() )
return;
diff --git a/svtools/source/control/taskstat.cxx b/svtools/source/control/taskstat.cxx
index 2e1cffcaac10..7792fe32bff8 100755
--- a/svtools/source/control/taskstat.cxx
+++ b/svtools/source/control/taskstat.cxx
@@ -50,7 +50,7 @@
struct ImplTaskSBFldItem
{
TaskStatusFieldItem maItem;
- USHORT mnId;
+ sal_uInt16 mnId;
long mnOffX;
};
@@ -58,37 +58,37 @@ DECLARE_LIST( ImplTaskSBItemList, ImplTaskSBFldItem* )
// =======================================================================
-BOOL ITaskStatusNotify::MouseButtonDown( USHORT, const MouseEvent& )
+sal_Bool ITaskStatusNotify::MouseButtonDown( sal_uInt16, const MouseEvent& )
{
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL ITaskStatusNotify::MouseButtonUp( USHORT, const MouseEvent& )
+sal_Bool ITaskStatusNotify::MouseButtonUp( sal_uInt16, const MouseEvent& )
{
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL ITaskStatusNotify::MouseMove( USHORT, const MouseEvent& )
+sal_Bool ITaskStatusNotify::MouseMove( sal_uInt16, const MouseEvent& )
{
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL ITaskStatusNotify::Command( USHORT, const CommandEvent& )
+sal_Bool ITaskStatusNotify::Command( sal_uInt16, const CommandEvent& )
{
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL ITaskStatusNotify::UpdateHelp( USHORT )
+sal_Bool ITaskStatusNotify::UpdateHelp( sal_uInt16 )
{
- return FALSE;
+ return sal_False;
}
// =======================================================================
@@ -116,7 +116,7 @@ TaskStatusFieldItem::TaskStatusFieldItem( ITaskStatusNotify* pNotify,
const Image& rImage,
const XubString& rQuickHelpText,
const XubString& rHelpText,
- USHORT nFlags ) :
+ sal_uInt16 nFlags ) :
mpNotify( pNotify ),
maImage( rImage ),
maQuickHelpText( rQuickHelpText ),
@@ -156,8 +156,8 @@ TaskStatusBar::TaskStatusBar( Window* pParent, WinBits nWinStyle ) :
mnItemWidth = 0;
mnFieldWidth = 0;
mnFieldFlags = 0;
- mbFlashItems = FALSE;
- mbOutInterval = FALSE;
+ mbFlashItems = sal_False;
+ mbOutInterval = sal_False;
maTimer.SetTimeoutHdl( LINK( this, TaskStatusBar, ImplTimerHdl ) );
}
@@ -183,9 +183,9 @@ TaskStatusBar::~TaskStatusBar()
IMPL_LINK( TaskStatusBar, ImplTimerHdl, Timer*, EMPTYARG )
{
- BOOL bUpdate = ImplUpdateClock();
+ sal_Bool bUpdate = ImplUpdateClock();
if ( ImplUpdateFlashItems() )
- bUpdate = TRUE;
+ bUpdate = sal_True;
if ( bUpdate )
SetItemData( TASKSTATUSBAR_STATUSFIELDID, NULL );
@@ -194,7 +194,7 @@ IMPL_LINK( TaskStatusBar, ImplTimerHdl, Timer*, EMPTYARG )
// -----------------------------------------------------------------------
-ImplTaskSBFldItem* TaskStatusBar::ImplGetFieldItem( USHORT nItemId ) const
+ImplTaskSBFldItem* TaskStatusBar::ImplGetFieldItem( sal_uInt16 nItemId ) const
{
if ( !mpFieldItemList )
return NULL;
@@ -213,11 +213,11 @@ ImplTaskSBFldItem* TaskStatusBar::ImplGetFieldItem( USHORT nItemId ) const
// -----------------------------------------------------------------------
-ImplTaskSBFldItem* TaskStatusBar::ImplGetFieldItem( const Point& rPos, BOOL& rFieldRect ) const
+ImplTaskSBFldItem* TaskStatusBar::ImplGetFieldItem( const Point& rPos, sal_Bool& rFieldRect ) const
{
if ( GetItemId( rPos ) == TASKSTATUSBAR_STATUSFIELDID )
{
- rFieldRect = TRUE;
+ rFieldRect = sal_True;
if ( mpFieldItemList )
{
@@ -233,14 +233,14 @@ ImplTaskSBFldItem* TaskStatusBar::ImplGetFieldItem( const Point& rPos, BOOL& rFi
}
}
else
- rFieldRect = FALSE;
+ rFieldRect = sal_False;
return NULL;
}
// -----------------------------------------------------------------------
-BOOL TaskStatusBar::ImplUpdateClock()
+sal_Bool TaskStatusBar::ImplUpdateClock()
{
if ( mnFieldFlags & TASKSTATUSFIELD_CLOCK )
{
@@ -250,40 +250,40 @@ BOOL TaskStatusBar::ImplUpdateClock()
(aTime.GetHour() != maTime.GetHour()) )
{
maTime = aTime;
- maTimeText = SvtSysLocale().GetLocaleData().getTime( aTime, FALSE, FALSE );
- return TRUE;
+ maTimeText = SvtSysLocale().GetLocaleData().getTime( aTime, sal_False, sal_False );
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL TaskStatusBar::ImplUpdateFlashItems()
+sal_Bool TaskStatusBar::ImplUpdateFlashItems()
{
if ( mbFlashItems )
{
if ( mbOutInterval )
{
maTimer.SetTimeout( 900 );
- mbOutInterval = FALSE;
+ mbOutInterval = sal_False;
}
else
{
maTimer.SetTimeout( 700 );
- mbOutInterval = TRUE;
+ mbOutInterval = sal_True;
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-void TaskStatusBar::ImplUpdateField( BOOL bItems )
+void TaskStatusBar::ImplUpdateField( sal_Bool bItems )
{
maTimer.Stop();
@@ -291,15 +291,15 @@ void TaskStatusBar::ImplUpdateField( BOOL bItems )
{
ImplTaskSBFldItem* pItem = mpFieldItemList->First();
mnItemWidth = 0;
- mbFlashItems = FALSE;
- mbOutInterval = FALSE;
+ mbFlashItems = sal_False;
+ mbOutInterval = sal_False;
while ( pItem )
{
mnItemWidth += TASKSTATUSBAR_IMAGEOFFX;
pItem->mnOffX = mnItemWidth;
mnItemWidth += pItem->maItem.GetImage().GetSizePixel().Width();
if ( pItem->maItem.GetFlags() & TASKSTATUSFIELDITEM_FLASH )
- mbFlashItems = TRUE;
+ mbFlashItems = sal_True;
pItem = mpFieldItemList->Next();
}
@@ -308,7 +308,7 @@ void TaskStatusBar::ImplUpdateField( BOOL bItems )
{
if ( mnFieldFlags & TASKSTATUSFIELD_CLOCK )
{
- XubString aStr = SvtSysLocale().GetLocaleData().getTime( Time( 23, 59, 59 ), FALSE, FALSE );
+ XubString aStr = SvtSysLocale().GetLocaleData().getTime( Time( 23, 59, 59 ), sal_False, sal_False );
mnClockWidth = GetTextWidth( aStr )+(TASKSTATUSBAR_CLOCXOFFX*2);
}
else
@@ -326,7 +326,7 @@ void TaskStatusBar::ImplUpdateField( BOOL bItems )
{
mnFieldWidth = nNewWidth;
long nOffset = GetItemOffset( TASKSTATUSBAR_STATUSFIELDID );
- USHORT nItemPos = GetItemPos( TASKSTATUSBAR_STATUSFIELDID );
+ sal_uInt16 nItemPos = GetItemPos( TASKSTATUSBAR_STATUSFIELDID );
InsertItem( TASKSTATUSBAR_STATUSFIELDID, nNewWidth, SIB_RIGHT | SIB_IN | SIB_USERDRAW, nOffset, nItemPos );
}
else
@@ -341,7 +341,7 @@ void TaskStatusBar::ImplUpdateField( BOOL bItems )
if ( mbFlashItems || (mnFieldFlags & TASKSTATUSFIELD_CLOCK) )
{
ImplUpdateClock();
- mbOutInterval = TRUE;
+ mbOutInterval = sal_True;
ImplUpdateFlashItems();
maTimer.Start();
}
@@ -351,12 +351,12 @@ void TaskStatusBar::ImplUpdateField( BOOL bItems )
void TaskStatusBar::MouseButtonDown( const MouseEvent& rMEvt )
{
- BOOL bFieldRect;
- BOOL bBaseClass = FALSE;
+ sal_Bool bFieldRect;
+ sal_Bool bBaseClass = sal_False;
ImplTaskSBFldItem* pItem = ImplGetFieldItem( rMEvt.GetPosPixel(), bFieldRect );
ITaskStatusNotify* pNotify = mpNotify;
- USHORT nItemId = 0;
+ sal_uInt16 nItemId = 0;
if ( bFieldRect )
nItemId = TASKSTATUSBAR_CLOCKID;
@@ -378,12 +378,12 @@ void TaskStatusBar::MouseButtonDown( const MouseEvent& rMEvt )
void TaskStatusBar::MouseButtonUp( const MouseEvent& rMEvt )
{
- BOOL bFieldRect;
- BOOL bBaseClass = FALSE;
+ sal_Bool bFieldRect;
+ sal_Bool bBaseClass = sal_False;
ImplTaskSBFldItem* pItem = ImplGetFieldItem( rMEvt.GetPosPixel(), bFieldRect );
ITaskStatusNotify* pNotify = mpNotify;
- USHORT nItemId = 0;
+ sal_uInt16 nItemId = 0;
if ( bFieldRect )
nItemId = TASKSTATUSBAR_CLOCKID;
@@ -405,12 +405,12 @@ void TaskStatusBar::MouseButtonUp( const MouseEvent& rMEvt )
void TaskStatusBar::MouseMove( const MouseEvent& rMEvt )
{
- BOOL bFieldRect;
- BOOL bBaseClass = FALSE;
+ sal_Bool bFieldRect;
+ sal_Bool bBaseClass = sal_False;
ImplTaskSBFldItem* pItem = ImplGetFieldItem( rMEvt.GetPosPixel(), bFieldRect );
ITaskStatusNotify* pNotify = mpNotify;
- USHORT nItemId = 0;
+ sal_uInt16 nItemId = 0;
if ( bFieldRect )
nItemId = TASKSTATUSBAR_CLOCKID;
@@ -432,12 +432,12 @@ void TaskStatusBar::MouseMove( const MouseEvent& rMEvt )
void TaskStatusBar::Command( const CommandEvent& rCEvt )
{
- BOOL bFieldRect;
- BOOL bBaseClass = FALSE;
+ sal_Bool bFieldRect;
+ sal_Bool bBaseClass = sal_False;
ImplTaskSBFldItem* pItem = ImplGetFieldItem( rCEvt.GetMousePosPixel(), bFieldRect );
ITaskStatusNotify* pNotify = mpNotify;
- USHORT nItemId = 0;
+ sal_uInt16 nItemId = 0;
if ( bFieldRect )
nItemId = TASKSTATUSBAR_CLOCKID;
@@ -459,12 +459,12 @@ void TaskStatusBar::Command( const CommandEvent& rCEvt )
void TaskStatusBar::RequestHelp( const HelpEvent& rHEvt )
{
- BOOL bFieldRect;
+ sal_Bool bFieldRect;
ImplTaskSBFldItem* pItem = ImplGetFieldItem( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ), bFieldRect );
if ( bFieldRect )
{
ITaskStatusNotify* pNotify = mpNotify;
- USHORT nItemId = 0;
+ sal_uInt16 nItemId = 0;
if ( pItem )
{
@@ -571,28 +571,28 @@ void TaskStatusBar::UserDraw( const UserDrawEvent& rUDEvt )
// -----------------------------------------------------------------------
-void TaskStatusBar::InsertStatusField( long, USHORT,
- USHORT nFlags )
+void TaskStatusBar::InsertStatusField( long, sal_uInt16,
+ sal_uInt16 nFlags )
{
mnFieldFlags = nFlags;
- ImplUpdateField( FALSE );
+ ImplUpdateField( sal_False );
}
// -----------------------------------------------------------------------
-void TaskStatusBar::SetFieldFlags( USHORT nFlags )
+void TaskStatusBar::SetFieldFlags( sal_uInt16 nFlags )
{
if ( mnFieldFlags != nFlags )
{
mnFieldFlags = nFlags;
- ImplUpdateField( FALSE );
+ ImplUpdateField( sal_False );
}
}
// -----------------------------------------------------------------------
-void TaskStatusBar::AddStatusFieldItem( USHORT nItemId, const TaskStatusFieldItem& rItem,
- USHORT nPos )
+void TaskStatusBar::AddStatusFieldItem( sal_uInt16 nItemId, const TaskStatusFieldItem& rItem,
+ sal_uInt16 nPos )
{
DBG_ASSERT( nItemId, "TaskStatusBar::AddStatusFieldItem() - Item is 0" );
DBG_ASSERT( !ImplGetFieldItem( nItemId ), "TaskStatusBar::AddStatusFieldItem() - Item-Id already exist" );
@@ -604,50 +604,50 @@ void TaskStatusBar::AddStatusFieldItem( USHORT nItemId, const TaskStatusFieldIte
pItem->maItem = rItem;
pItem->mnId = nItemId;
pItem->mnOffX = 0;
- mpFieldItemList->Insert( pItem, (ULONG)nPos );
+ mpFieldItemList->Insert( pItem, (sal_uLong)nPos );
- ImplUpdateField( TRUE );
+ ImplUpdateField( sal_True );
}
// -----------------------------------------------------------------------
-void TaskStatusBar::ModifyStatusFieldItem( USHORT nItemId, const TaskStatusFieldItem& rItem )
+void TaskStatusBar::ModifyStatusFieldItem( sal_uInt16 nItemId, const TaskStatusFieldItem& rItem )
{
ImplTaskSBFldItem* pItem = ImplGetFieldItem( nItemId );
if ( pItem )
{
- BOOL bUpdate = (pItem->maItem.GetImage() != rItem.GetImage()) ||
+ sal_Bool bUpdate = (pItem->maItem.GetImage() != rItem.GetImage()) ||
(pItem->maItem.GetFlags() != rItem.GetFlags());
pItem->maItem = rItem;
if ( bUpdate )
- ImplUpdateField( TRUE );
+ ImplUpdateField( sal_True );
}
}
// -----------------------------------------------------------------------
-void TaskStatusBar::RemoveStatusFieldItem( USHORT nItemId )
+void TaskStatusBar::RemoveStatusFieldItem( sal_uInt16 nItemId )
{
ImplTaskSBFldItem* pItem = ImplGetFieldItem( nItemId );
if ( pItem )
{
mpFieldItemList->Remove( pItem );
delete pItem;
- ImplUpdateField( TRUE );
+ ImplUpdateField( sal_True );
}
}
// -----------------------------------------------------------------------
-BOOL TaskStatusBar::GetStatusFieldItem( USHORT nItemId, TaskStatusFieldItem& rItem ) const
+sal_Bool TaskStatusBar::GetStatusFieldItem( sal_uInt16 nItemId, TaskStatusFieldItem& rItem ) const
{
ImplTaskSBFldItem* pItem = ImplGetFieldItem( nItemId );
if ( pItem )
{
rItem = pItem->maItem;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index f0bd192fc02c..c84eb17afecc 100644
--- a/svtools/source/control/toolbarmenu.cxx
+++ b/svtools/source/control/toolbarmenu.cxx
@@ -163,7 +163,7 @@ const Reference< XAccessibleContext >& ToolbarMenuEntry::GetAccessible( bool bCr
{
if( mpControl )
{
- mxAccContext = Reference< XAccessibleContext >( mpControl->GetAccessible( TRUE ), UNO_QUERY );
+ mxAccContext = Reference< XAccessibleContext >( mpControl->GetAccessible( sal_True ), UNO_QUERY );
}
else
{
@@ -843,7 +843,7 @@ void ToolbarMenu::appendSeparator()
ValueSet* ToolbarMenu::createEmptyValueSetControl()
{
ValueSet* pSet = new ValueSet( this, WB_TABSTOP | WB_MENUSTYLEVALUESET | WB_FLATVALUESET | WB_NOBORDER | WB_NO_DIRECTSELECT );
- pSet->EnableFullItemMode( FALSE );
+ pSet->EnableFullItemMode( sal_False );
pSet->SetColor( GetControlBackground() );
pSet->SetHighlightHdl( LINK( this, ToolbarMenu, HighlightHdl ) );
return pSet;
@@ -927,7 +927,7 @@ void ToolbarMenu::implHighlightEntry( int nHighlightEntry, bool bHighlight )
if( bHighlight && IsNativeControlSupported( CTRL_MENU_POPUP, PART_MENU_ITEM ) )
{
bDrawItemRect = false;
- if( FALSE == DrawNativeControl( CTRL_MENU_POPUP, PART_MENU_ITEM,
+ if( sal_False == DrawNativeControl( CTRL_MENU_POPUP, PART_MENU_ITEM,
aItemRect,
CTRL_STATE_SELECTED | ( pEntry->mbEnabled? CTRL_STATE_ENABLED: 0 ),
ImplControlValue(),
@@ -1017,7 +1017,7 @@ void ToolbarMenu::implHighlightEntry( const MouseEvent& rMEvt, bool bMBDown )
Size aOutSz = GetOutputSizePixel();
if ( ( nMouseY >= 0 ) && ( nMouseY < aOutSz.Height() ) )
{
- bool bHighlighted = FALSE;
+ bool bHighlighted = sal_False;
const int nEntryCount = mpImpl->maEntryVector.size();
int nEntry;
@@ -1092,11 +1092,11 @@ static bool implCheckSubControlCursorMove( Control* pControl, bool bUp, int& nLa
ValueSet* pValueSet = dynamic_cast< ValueSet* >( pControl );
if( pValueSet )
{
- USHORT nItemPos = pValueSet->GetItemPos( pValueSet->GetSelectItemId() );
+ sal_uInt16 nItemPos = pValueSet->GetItemPos( pValueSet->GetSelectItemId() );
if( nItemPos != VALUESET_ITEM_NOTFOUND )
{
- const USHORT nColCount = pValueSet->GetColCount();
- const USHORT nLine = nItemPos / nColCount;
+ const sal_uInt16 nColCount = pValueSet->GetColCount();
+ const sal_uInt16 nLine = nItemPos / nColCount;
nLastColumn = nItemPos - (nLine * nColCount);
@@ -1106,7 +1106,7 @@ static bool implCheckSubControlCursorMove( Control* pControl, bool bUp, int& nLa
}
else
{
- const USHORT nLineCount = (pValueSet->GetItemCount() + nColCount - 1) / nColCount;
+ const sal_uInt16 nLineCount = (pValueSet->GetItemCount() + nColCount - 1) / nColCount;
return (nLine+1) < nLineCount;
}
}
@@ -1195,19 +1195,19 @@ ToolbarMenuEntry* ToolbarMenu::implCursorUpDown( bool bUp, bool bHomeEnd )
// --------------------------------------------------------------------
-void ToolbarMenu_Impl::implHighlightControl( USHORT nCode, Control* pControl )
+void ToolbarMenu_Impl::implHighlightControl( sal_uInt16 nCode, Control* pControl )
{
ValueSet* pValueSet = dynamic_cast< ValueSet* >( pControl );
if( pValueSet )
{
- const USHORT nItemCount = pValueSet->GetItemCount();
- USHORT nItemPos = VALUESET_ITEM_NOTFOUND;
+ const sal_uInt16 nItemCount = pValueSet->GetItemCount();
+ sal_uInt16 nItemPos = VALUESET_ITEM_NOTFOUND;
switch( nCode )
{
case KEY_UP:
{
- const USHORT nColCount = pValueSet->GetColCount();
- const USHORT nLastLine = nItemCount / nColCount;
+ const sal_uInt16 nColCount = pValueSet->GetColCount();
+ const sal_uInt16 nLastLine = nItemCount / nColCount;
nItemPos = std::min( ((nLastLine-1) * nColCount) + mnLastColumn, nItemCount-1 );
break;
}
@@ -1231,7 +1231,7 @@ void ToolbarMenu_Impl::implHighlightControl( USHORT nCode, Control* pControl )
void ToolbarMenu::KeyInput( const KeyEvent& rKEvent )
{
Control* pForwardControl = 0;
- USHORT nCode = rKEvent.GetKeyCode().GetCode();
+ sal_uInt16 nCode = rKEvent.GetKeyCode().GetCode();
switch ( nCode )
{
case KEY_UP:
@@ -1308,7 +1308,7 @@ void ToolbarMenu::KeyInput( const KeyEvent& rKEvent )
// --------------------------------------------------------------------
static void ImplPaintCheckBackground( Window* i_pWindow, const Rectangle& i_rRect, bool i_bHighlight )
{
- BOOL bNativeOk = FALSE;
+ sal_Bool bNativeOk = sal_False;
if( i_pWindow->IsNativeControlSupported( CTRL_TOOLBAR, PART_BUTTON ) )
{
ImplControlValue aControlValue;
@@ -1325,7 +1325,7 @@ static void ImplPaintCheckBackground( Window* i_pWindow, const Rectangle& i_rRec
{
const StyleSettings& rSettings = i_pWindow->GetSettings().GetStyleSettings();
Color aColor( i_bHighlight ? rSettings.GetMenuHighlightTextColor() : rSettings.GetHighlightColor() );
- i_pWindow->DrawSelectionBackground( i_rRect, 0, i_bHighlight, TRUE, FALSE, 2, NULL, &aColor );
+ i_pWindow->DrawSelectionBackground( i_rRect, 0, i_bHighlight, sal_True, sal_False, 2, NULL, &aColor );
}
}
@@ -1375,7 +1375,7 @@ static long ImplGetNativeCheckAndRadioSize( Window* pWin, long& rCheckHeight, lo
void ToolbarMenu::implPaint( ToolbarMenuEntry* pThisOnly, bool bHighlighted )
{
- USHORT nBorder = 0; long nStartY = 0; // from Menu implementations, needed when we support native menu background & scrollable menu
+ sal_uInt16 nBorder = 0; long nStartY = 0; // from Menu implementations, needed when we support native menu background & scrollable menu
long nFontHeight = GetTextHeight();
// long nExtra = nFontHeight/4;
@@ -1425,9 +1425,9 @@ void ToolbarMenu::implPaint( ToolbarMenuEntry* pThisOnly, bool bHighlighted )
{
long nTextOffsetY = ((pEntry->maSize.Height()-nFontHeight)/2);
- USHORT nTextStyle = 0;
- USHORT nSymbolStyle = 0;
- USHORT nImageStyle = 0;
+ sal_uInt16 nTextStyle = 0;
+ sal_uInt16 nSymbolStyle = 0;
+ sal_uInt16 nImageStyle = 0;
if( !pEntry->mbEnabled )
{
@@ -1538,7 +1538,7 @@ void ToolbarMenu::implPaint( ToolbarMenuEntry* pThisOnly, bool bHighlighted )
aTmpPos.X() = aPos.X() + (bTitle ? 4 : mpImpl->mnTextPos);
aTmpPos.Y() = aPos.Y();
aTmpPos.Y() += nTextOffsetY;
- USHORT nStyle = nTextStyle|TEXT_DRAW_MNEMONIC;
+ sal_uInt16 nStyle = nTextStyle|TEXT_DRAW_MNEMONIC;
DrawCtrlText( aTmpPos, pEntry->maText, 0, pEntry->maText.Len(), nStyle, NULL, NULL ); // pVector, pDisplayText );
}
diff --git a/svtools/source/control/toolbarmenuacc.cxx b/svtools/source/control/toolbarmenuacc.cxx
index 020467084748..620002017e6c 100644
--- a/svtools/source/control/toolbarmenuacc.cxx
+++ b/svtools/source/control/toolbarmenuacc.cxx
@@ -213,7 +213,7 @@ sal_Int32 SAL_CALL ToolbarMenuAcc::getAccessibleIndexInParent() throw (RuntimeEx
Window* pParent = mpParent->mrMenu.GetParent();
if( pParent )
{
- for( USHORT i = 0, nCount = pParent->GetChildCount(); i < nCount ; i++ )
+ for( sal_uInt16 i = 0, nCount = pParent->GetChildCount(); i < nCount ; i++ )
{
if( pParent->GetChild( i ) == &mpParent->mrMenu )
return i;
@@ -252,7 +252,7 @@ OUString SAL_CALL ToolbarMenuAcc::getAccessibleName() throw (RuntimeException)
if( !aRet.getLength() )
{
- Window* pLabel = mpParent->mrMenu.GetLabeledBy();
+ Window* pLabel = mpParent->mrMenu.GetAccessibleRelationLabeledBy();
if( pLabel && pLabel != &mpParent->mrMenu )
aRet = OutputDevice::GetNonMnemonicString( pLabel->GetText() );
}
@@ -473,7 +473,7 @@ Any SAL_CALL ToolbarMenuAcc::getAccessibleKeyBinding() throw (RuntimeException)
sal_Int32 SAL_CALL ToolbarMenuAcc::getForeground() throw (RuntimeException)
{
ThrowIfDisposed();
- UINT32 nColor = Application::GetSettings().GetStyleSettings().GetMenuTextColor().GetColor();
+ sal_uInt32 nColor = Application::GetSettings().GetStyleSettings().GetMenuTextColor().GetColor();
return static_cast<sal_Int32>(nColor);
}
@@ -482,7 +482,7 @@ sal_Int32 SAL_CALL ToolbarMenuAcc::getForeground() throw (RuntimeException)
sal_Int32 SAL_CALL ToolbarMenuAcc::getBackground() throw (RuntimeException)
{
ThrowIfDisposed();
- UINT32 nColor = Application::GetSettings().GetStyleSettings().GetMenuColor().GetColor();
+ sal_uInt32 nColor = Application::GetSettings().GetStyleSettings().GetMenuColor().GetColor();
return static_cast<sal_Int32>(nColor);
}
diff --git a/svtools/source/control/toolbarmenuimp.hxx b/svtools/source/control/toolbarmenuimp.hxx
index d1de4f704b76..a190fd9f205d 100644
--- a/svtools/source/control/toolbarmenuimp.hxx
+++ b/svtools/source/control/toolbarmenuimp.hxx
@@ -308,7 +308,7 @@ struct ToolbarMenu_Impl
ToolbarMenuEntry* implGetEntry( int nEntry ) const;
void notifyHighlightedEntry();
- void implHighlightControl( USHORT nCode, Control* pControl );
+ void implHighlightControl( sal_uInt16 nCode, Control* pControl );
};
}
diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx
index 66da5636d89c..1b98e3197bd3 100644
--- a/svtools/source/control/valueacc.cxx
+++ b/svtools/source/control/valueacc.cxx
@@ -225,7 +225,7 @@ uno::Reference< accessibility::XAccessible > SAL_CALL ValueSetAcc::getAccessible
ThrowIfDisposed();
const vos::OGuard aSolarGuard( Application::GetSolarMutex() );
uno::Reference< accessibility::XAccessible > xRet;
- ValueSetItem* pItem = getItem (sal::static_int_cast< USHORT >(i));
+ ValueSetItem* pItem = getItem (sal::static_int_cast< sal_uInt16 >(i));
if( pItem )
xRet = pItem->GetAccessible( mbIsTransientChildrenDisabled );
@@ -265,7 +265,7 @@ sal_Int32 SAL_CALL ValueSetAcc::getAccessibleIndexInParent()
{
sal_Bool bFound = sal_False;
- for( USHORT i = 0, nCount = pParent->GetChildCount(); ( i < nCount ) && !bFound; i++ )
+ for( sal_uInt16 i = 0, nCount = pParent->GetChildCount(); ( i < nCount ) && !bFound; i++ )
{
if( pParent->GetChild( i ) == mpParent )
{
@@ -317,7 +317,7 @@ sal_Int16 SAL_CALL ValueSetAcc::getAccessibleRole()
if ( !aRet.Len() )
{
- Window* pLabel = mpParent->GetLabeledBy();
+ Window* pLabel = mpParent->GetAccessibleRelationLabeledBy();
if ( pLabel && pLabel != mpParent )
aRet = OutputDevice::GetNonMnemonicString( pLabel->GetText() );
}
@@ -450,12 +450,12 @@ uno::Reference< accessibility::XAccessible > SAL_CALL ValueSetAcc::getAccessible
{
ThrowIfDisposed();
const vos::OGuard aSolarGuard( Application::GetSolarMutex() );
- const USHORT nItemId = mpParent->GetItemId( Point( aPoint.X, aPoint.Y ) );
+ const sal_uInt16 nItemId = mpParent->GetItemId( Point( aPoint.X, aPoint.Y ) );
uno::Reference< accessibility::XAccessible > xRet;
if( VALUESET_ITEM_NOTFOUND != nItemId )
{
- const USHORT nItemPos = mpParent->GetItemPos( nItemId );
+ const sal_uInt16 nItemPos = mpParent->GetItemPos( nItemId );
if( VALUESET_ITEM_NONEITEM != nItemPos )
{
@@ -559,7 +559,7 @@ sal_Int32 SAL_CALL ValueSetAcc::getForeground( )
throw (uno::RuntimeException)
{
ThrowIfDisposed();
- UINT32 nColor = Application::GetSettings().GetStyleSettings().GetWindowTextColor().GetColor();
+ sal_uInt32 nColor = Application::GetSettings().GetStyleSettings().GetWindowTextColor().GetColor();
return static_cast<sal_Int32>(nColor);
}
@@ -569,7 +569,7 @@ sal_Int32 SAL_CALL ValueSetAcc::getBackground( )
throw (uno::RuntimeException)
{
ThrowIfDisposed();
- UINT32 nColor = Application::GetSettings().GetStyleSettings().GetWindowColor().GetColor();
+ sal_uInt32 nColor = Application::GetSettings().GetStyleSettings().GetWindowColor().GetColor();
return static_cast<sal_Int32>(nColor);
}
@@ -580,7 +580,7 @@ void SAL_CALL ValueSetAcc::selectAccessibleChild( sal_Int32 nChildIndex )
{
ThrowIfDisposed();
const vos::OGuard aSolarGuard( Application::GetSolarMutex() );
- ValueSetItem* pItem = getItem (sal::static_int_cast< USHORT >(nChildIndex));
+ ValueSetItem* pItem = getItem (sal::static_int_cast< sal_uInt16 >(nChildIndex));
if(pItem != NULL)
{
@@ -598,7 +598,7 @@ sal_Bool SAL_CALL ValueSetAcc::isAccessibleChildSelected( sal_Int32 nChildIndex
{
ThrowIfDisposed();
const vos::OGuard aSolarGuard( Application::GetSolarMutex() );
- ValueSetItem* pItem = getItem (sal::static_int_cast< USHORT >(nChildIndex));
+ ValueSetItem* pItem = getItem (sal::static_int_cast< sal_uInt16 >(nChildIndex));
sal_Bool bRet = sal_False;
if (pItem != NULL)
@@ -637,7 +637,7 @@ sal_Int32 SAL_CALL ValueSetAcc::getSelectedAccessibleChildCount()
const vos::OGuard aSolarGuard( Application::GetSolarMutex() );
sal_Int32 nRet = 0;
- for( USHORT i = 0, nCount = getItemCount(); i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = getItemCount(); i < nCount; i++ )
{
ValueSetItem* pItem = getItem (i);
@@ -657,7 +657,7 @@ uno::Reference< accessibility::XAccessible > SAL_CALL ValueSetAcc::getSelectedAc
const vos::OGuard aSolarGuard( Application::GetSolarMutex() );
uno::Reference< accessibility::XAccessible > xRet;
- for( USHORT i = 0, nCount = getItemCount(), nSel = 0; ( i < nCount ) && !xRet.is(); i++ )
+ for( sal_uInt16 i = 0, nCount = getItemCount(), nSel = 0; ( i < nCount ) && !xRet.is(); i++ )
{
ValueSetItem* pItem = getItem(i);
@@ -734,9 +734,9 @@ void SAL_CALL ValueSetAcc::disposing (void)
}
-USHORT ValueSetAcc::getItemCount (void) const
+sal_uInt16 ValueSetAcc::getItemCount (void) const
{
- USHORT nCount = mpParent->ImplGetVisibleItemCount();
+ sal_uInt16 nCount = mpParent->ImplGetVisibleItemCount();
// When the None-Item is visible then increase the number of items by
// one.
if (HasNoneField())
@@ -745,7 +745,7 @@ USHORT ValueSetAcc::getItemCount (void) const
}
-ValueSetItem* ValueSetAcc::getItem (USHORT nIndex) const
+ValueSetItem* ValueSetAcc::getItem (sal_uInt16 nIndex) const
{
ValueSetItem* pItem = NULL;
@@ -759,7 +759,7 @@ ValueSetItem* ValueSetAcc::getItem (USHORT nIndex) const
nIndex -= 1;
}
if (pItem == NULL)
- pItem = mpParent->ImplGetVisibleItem (static_cast<USHORT>(nIndex));
+ pItem = mpParent->ImplGetVisibleItem (static_cast<sal_uInt16>(nIndex));
return pItem;
}
@@ -935,9 +935,9 @@ sal_Int32 SAL_CALL ValueItemAcc::getAccessibleIndexInParent()
{
bool bDone = false;
- USHORT nCount = mpParent->mrParent.ImplGetVisibleItemCount();
+ sal_uInt16 nCount = mpParent->mrParent.ImplGetVisibleItemCount();
ValueSetItem* pItem;
- for (USHORT i=0; i<nCount && !bDone; i++)
+ for (sal_uInt16 i=0; i<nCount && !bDone; i++)
{
// Guard the retrieval of the i-th child with a try/catch block
// just in case the number of children changes in the mean time.
@@ -1226,7 +1226,7 @@ uno::Any SAL_CALL ValueItemAcc::getAccessibleKeyBinding()
sal_Int32 SAL_CALL ValueItemAcc::getForeground( )
throw (uno::RuntimeException)
{
- UINT32 nColor = Application::GetSettings().GetStyleSettings().GetWindowTextColor().GetColor();
+ sal_uInt32 nColor = Application::GetSettings().GetStyleSettings().GetWindowTextColor().GetColor();
return static_cast<sal_Int32>(nColor);
}
@@ -1235,7 +1235,7 @@ sal_Int32 SAL_CALL ValueItemAcc::getForeground( )
sal_Int32 SAL_CALL ValueItemAcc::getBackground( )
throw (uno::RuntimeException)
{
- UINT32 nColor;
+ sal_uInt32 nColor;
if (mpParent && mpParent->meType == VALUESETITEM_COLOR)
nColor = mpParent->maColor.GetColor();
else
diff --git a/svtools/source/control/valueimp.hxx b/svtools/source/control/valueimp.hxx
index abde4a015ab8..bc5252372be9 100755
--- a/svtools/source/control/valueimp.hxx
+++ b/svtools/source/control/valueimp.hxx
@@ -83,8 +83,8 @@ class ValueSet;
struct ValueSetItem
{
ValueSet& mrParent;
- USHORT mnId;
- USHORT mnBits;
+ sal_uInt16 mnId;
+ sal_uInt16 mnBits;
ValueSetItemType meType;
Image maImage;
Color maColor;
@@ -142,7 +142,7 @@ public:
~ValueSetAcc();
void FireAccessibleEvent( short nEventId, const ::com::sun::star::uno::Any& rOldValue, const ::com::sun::star::uno::Any& rNewValue );
- BOOL HasAccessibleListeners() const { return( mxEventListeners.size() > 0 ); }
+ sal_Bool HasAccessibleListeners() const { return( mxEventListeners.size() > 0 ); }
static ValueSetAcc* getImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rxData ) throw();
@@ -222,7 +222,7 @@ private:
/** Return the number of items. This takes the None-Item into account.
*/
- USHORT getItemCount (void) const;
+ sal_uInt16 getItemCount (void) const;
/** Return the item associated with the given index. The None-Item is
taken into account which, when present, is taken to be the first
@@ -233,7 +233,7 @@ private:
@return
Returns NULL when the given index is out of range.
*/
- ValueSetItem* getItem (USHORT nIndex) const;
+ ValueSetItem* getItem (sal_uInt16 nIndex) const;
/** Check whether or not the object has been disposed (or is in the
state of beeing disposed). If that is the case then
@@ -288,7 +288,7 @@ public:
void ParentDestroyed();
void FireAccessibleEvent( short nEventId, const ::com::sun::star::uno::Any& rOldValue, const ::com::sun::star::uno::Any& rNewValue );
- BOOL HasAccessibleListeners() const { return( mxEventListeners.size() > 0 ); }
+ sal_Bool HasAccessibleListeners() const { return( mxEventListeners.size() > 0 ); }
static ValueItemAcc* getImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rxData ) throw();
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index 62193eadf735..8875ce66354c 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -74,21 +74,21 @@ void ValueSet::ImplInit()
mnUserVisLines = 0;
mnSpacing = 0;
mnFrameStyle = 0;
- mbFormat = TRUE;
- mbHighlight = FALSE ;
- mbSelection = FALSE;
- mbNoSelection = TRUE;
- mbDrawSelection = TRUE;
- mbBlackSel = FALSE;
- mbDoubleSel = FALSE;
- mbScroll = FALSE;
- mbDropPos = FALSE;
- mbFullMode = TRUE;
+ mbFormat = sal_True;
+ mbHighlight = sal_False ;
+ mbSelection = sal_False;
+ mbNoSelection = sal_True;
+ mbDrawSelection = sal_True;
+ mbBlackSel = sal_False;
+ mbDoubleSel = sal_False;
+ mbScroll = sal_False;
+ mbDropPos = sal_False;
+ mbFullMode = sal_True;
// #106446#, #106601# force mirroring of virtual device
maVirDev.EnableRTL( GetParent()->IsRTLEnabled() );
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
}
// -----------------------------------------------------------------------
@@ -120,7 +120,7 @@ ValueSet::ValueSet( Window* pParent, const ResId& rResId, bool bDisableTransient
ValueSet::~ValueSet()
{
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent>
- xComponent (GetAccessible(FALSE), ::com::sun::star::uno::UNO_QUERY);
+ xComponent (GetAccessible(sal_False), ::com::sun::star::uno::UNO_QUERY);
if (xComponent.is())
xComponent->dispose ();
@@ -156,8 +156,8 @@ void ValueSet::ImplDeleteItems()
// -----------------------------------------------------------------------
-void ValueSet::ImplInitSettings( BOOL bFont,
- BOOL bForeground, BOOL bBackground )
+void ValueSet::ImplInitSettings( sal_Bool bFont,
+ sal_Bool bForeground, sal_Bool bBackground )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -315,7 +315,7 @@ void ValueSet::ImplFormatItem( ValueSetItem* pItem )
aPos.X() += (aRectSize.Width()-aImageSize.Width())/2;
aPos.Y() += (aRectSize.Height()-aImageSize.Height())/2;
- USHORT nImageStyle = 0;
+ sal_uInt16 nImageStyle = 0;
if( !IsEnabled() )
nImageStyle |= IMAGE_DRAW_DISABLE;
@@ -345,7 +345,7 @@ void ValueSet::ImplFormatItem( ValueSetItem* pItem )
void ValueSet::Format()
{
Size aWinSize = GetOutputSizePixel();
- ULONG nItemCount = mpImpl->mpItemList->Count();
+ sal_uLong nItemCount = mpImpl->mpItemList->Count();
WinBits nStyle = GetStyle();
long nTxtHeight = GetTextHeight();
long nOff;
@@ -425,7 +425,7 @@ void ValueSet::Format()
{
if ( mnUserItemWidth )
{
- mnCols = (USHORT)((aWinSize.Width()-nScrBarWidth+nSpace) / (mnUserItemWidth+nSpace));
+ mnCols = (sal_uInt16)((aWinSize.Width()-nScrBarWidth+nSpace) / (mnUserItemWidth+nSpace));
if ( !mnCols )
mnCols = 1;
}
@@ -436,7 +436,7 @@ void ValueSet::Format()
mnCols = mnUserCols;
// Zeilenanzahl berechnen
- mbScroll = FALSE;
+ mbScroll = sal_False;
mnLines = (long)mpImpl->mpItemList->Count() / mnCols;
if ( mpImpl->mpItemList->Count() % mnCols )
mnLines++;
@@ -455,13 +455,13 @@ void ValueSet::Format()
else
mnVisLines = mnLines;
if ( mnLines > mnVisLines )
- mbScroll = TRUE;
+ mbScroll = sal_True;
if ( mnLines <= mnVisLines )
mnFirstLine = 0;
else
{
- if ( mnFirstLine > (USHORT)(mnLines-mnVisLines) )
- mnFirstLine = (USHORT)(mnLines-mnVisLines);
+ if ( mnFirstLine > (sal_uInt16)(mnLines-mnVisLines) )
+ mnFirstLine = (sal_uInt16)(mnLines-mnVisLines);
}
// Itemgroessen berechnen
@@ -492,7 +492,7 @@ void ValueSet::Format()
// Init VirDev
maVirDev.SetSettings( GetSettings() );
maVirDev.SetBackground( GetBackground() );
- maVirDev.SetOutputSizePixel( aWinSize, TRUE );
+ maVirDev.SetOutputSizePixel( aWinSize, sal_True );
// Bei zu kleinen Items machen wir nichts
long nMinHeight = 2;
@@ -509,7 +509,7 @@ void ValueSet::Format()
}
}
- for ( ULONG i = 0; i < nItemCount; i++ )
+ for ( sal_uLong i = 0; i < nItemCount; i++ )
{
ValueSetItem* pItem = mpImpl->mpItemList->GetObject( i );
pItem->maRect.SetEmpty();
@@ -535,17 +535,17 @@ void ValueSet::Format()
(aHighColor.GetBlue() > 0x80)) ||
((aHighColor.GetRed() == 0x80) && (aHighColor.GetGreen() == 0x80) &&
(aHighColor.GetBlue() == 0x80)) )
- mbBlackSel = TRUE;
+ mbBlackSel = sal_True;
else
- mbBlackSel = FALSE;
+ mbBlackSel = sal_False;
// Wenn die Items groesser sind, dann die Selektion doppelt so breit
// zeichnen
if ( (nStyle & WB_DOUBLEBORDER) &&
((nItemWidth >= 25) && (nItemHeight >= 20)) )
- mbDoubleSel = TRUE;
+ mbDoubleSel = sal_True;
else
- mbDoubleSel = FALSE;
+ mbDoubleSel = sal_False;
// Calculate offsets
long nStartX;
@@ -587,8 +587,8 @@ void ValueSet::Format()
}
// draw items
- ULONG nFirstItem = mnFirstLine * mnCols;
- ULONG nLastItem = nFirstItem + (mnVisLines * mnCols);
+ sal_uLong nFirstItem = mnFirstLine * mnCols;
+ sal_uLong nLastItem = nFirstItem + (mnVisLines * mnCols);
if ( !mbFullMode )
{
@@ -598,13 +598,13 @@ void ValueSet::Format()
if ( y+(mnVisLines*(nItemHeight+nSpace)) < aWinSize.Height() )
nLastItem += mnCols;
}
- for ( ULONG i = 0; i < nItemCount; i++ )
+ for ( sal_uLong i = 0; i < nItemCount; i++ )
{
ValueSetItem* pItem = mpImpl->mpItemList->GetObject( i );
if ( (i >= nFirstItem) && (i < nLastItem) )
{
- const BOOL bWasEmpty = pItem->maRect.IsEmpty();
+ const sal_Bool bWasEmpty = pItem->maRect.IsEmpty();
pItem->maRect.Left() = x;
pItem->maRect.Top() = y;
@@ -667,7 +667,7 @@ void ValueSet::Format()
}
// Jetzt haben wir formatiert und warten auf das naechste
- mbFormat = FALSE;
+ mbFormat = sal_False;
// ScrollBar loeschen
if ( pDelScrBar )
@@ -709,13 +709,13 @@ void ValueSet::ImplDrawSelect()
if ( !IsReallyVisible() )
return;
- BOOL bFocus = HasFocus();
- BOOL bDrawSel;
+ sal_Bool bFocus = HasFocus();
+ sal_Bool bDrawSel;
if ( (mbNoSelection && !mbHighlight) || (!mbDrawSelection && mbHighlight) )
- bDrawSel = FALSE;
+ bDrawSel = sal_False;
else
- bDrawSel = TRUE;
+ bDrawSel = sal_True;
if ( !bFocus &&
((mbNoSelection && !mbHighlight) || (!mbDrawSelection && mbHighlight)) )
@@ -725,7 +725,7 @@ void ValueSet::ImplDrawSelect()
return;
}
- USHORT nItemId = mnSelItemId;
+ sal_uInt16 nItemId = mnSelItemId;
for( int stage = 0; stage < 2; stage++ )
{
@@ -898,12 +898,12 @@ void ValueSet::ImplDrawSelect()
// -----------------------------------------------------------------------
-void ValueSet::ImplHideSelect( USHORT nItemId )
+void ValueSet::ImplHideSelect( sal_uInt16 nItemId )
{
Rectangle aRect;
- USHORT nItemPos = GetItemPos( nItemId );
- if ( nItemPos != sal::static_int_cast<USHORT>(LIST_ENTRY_NOTFOUND) )
+ sal_uInt16 nItemPos = GetItemPos( nItemId );
+ if ( nItemPos != sal::static_int_cast<sal_uInt16>(LIST_ENTRY_NOTFOUND) )
aRect = mpImpl->mpItemList->GetObject( nItemPos )->maRect;
else
{
@@ -922,42 +922,42 @@ void ValueSet::ImplHideSelect( USHORT nItemId )
// -----------------------------------------------------------------------
-void ValueSet::ImplHighlightItem( USHORT nItemId, BOOL bIsSelection )
+void ValueSet::ImplHighlightItem( sal_uInt16 nItemId, sal_Bool bIsSelection )
{
if ( mnHighItemId != nItemId )
{
// Alten merken, um vorherige Selektion zu entfernen
- USHORT nOldItem = mnHighItemId;
+ sal_uInt16 nOldItem = mnHighItemId;
mnHighItemId = nItemId;
// Wenn keiner selektiert ist, dann Selektion nicht malen
if ( !bIsSelection && mbNoSelection )
- mbDrawSelection = FALSE;
+ mbDrawSelection = sal_False;
// Neu ausgeben und alte Selection wegnehmen
ImplHideSelect( nOldItem );
ImplDrawSelect();
- mbDrawSelection = TRUE;
+ mbDrawSelection = sal_True;
}
}
// -----------------------------------------------------------------------
-void ValueSet::ImplDrawDropPos( BOOL bShow )
+void ValueSet::ImplDrawDropPos( sal_Bool bShow )
{
if ( (mnDropPos != VALUESET_ITEM_NOTFOUND) && mpImpl->mpItemList->Count() )
{
- USHORT nItemPos = mnDropPos;
- USHORT nItemId1;
- USHORT nItemId2 = 0;
- BOOL bRight;
+ sal_uInt16 nItemPos = mnDropPos;
+ sal_uInt16 nItemId1;
+ sal_uInt16 nItemId2 = 0;
+ sal_Bool bRight;
if ( nItemPos >= mpImpl->mpItemList->Count() )
{
- nItemPos = (USHORT)(mpImpl->mpItemList->Count()-1);
- bRight = TRUE;
+ nItemPos = (sal_uInt16)(mpImpl->mpItemList->Count()-1);
+ bRight = sal_True;
}
else
- bRight = FALSE;
+ bRight = sal_False;
nItemId1 = GetItemId( nItemPos );
if ( (nItemId1 != mnSelItemId) && (nItemId1 != mnHighItemId) )
@@ -996,7 +996,7 @@ void ValueSet::ImplDrawDropPos( BOOL bShow )
Point aPos = aRect1.RightCenter();
nX = aPos.X()-2;
nY = aPos.Y();
- for ( USHORT i = 0; i < 4; i++ )
+ for ( sal_uInt16 i = 0; i < 4; i++ )
DrawLine( Point( nX-i, nY-i ), Point( nX-i, nY+i ) );
}
if ( !aRect2.IsEmpty() )
@@ -1004,7 +1004,7 @@ void ValueSet::ImplDrawDropPos( BOOL bShow )
Point aPos = aRect2.LeftCenter();
nX = aPos.X()+2;
nY = aPos.Y();
- for ( USHORT i = 0; i < 4; i++ )
+ for ( sal_uInt16 i = 0; i < 4; i++ )
DrawLine( Point( nX+i, nY-i ), Point( nX+i, nY+i ) );
}
}
@@ -1089,7 +1089,7 @@ void ValueSet::ImplDraw()
// -----------------------------------------------------------------------
-BOOL ValueSet::ImplScroll( const Point& rPos )
+sal_Bool ValueSet::ImplScroll( const Point& rPos )
{
Size aOutSize = GetOutputSizePixel();
long nScrBarWidth;
@@ -1100,10 +1100,10 @@ BOOL ValueSet::ImplScroll( const Point& rPos )
nScrBarWidth = 0;
if ( !mbScroll || (rPos.X() < 0) || (rPos.X() > aOutSize.Width()-nScrBarWidth) )
- return FALSE;
+ return sal_False;
long nScrollOffset;
- USHORT nOldLine = mnFirstLine;
+ sal_uInt16 nOldLine = mnFirstLine;
const Rectangle& rTopRect = mpImpl->mpItemList->GetObject( mnFirstLine*mnCols )->maRect;
if ( rTopRect.GetHeight() <= 16 )
nScrollOffset = VALUESET_SCROLL_OFFSET/2;
@@ -1116,7 +1116,7 @@ BOOL ValueSet::ImplScroll( const Point& rPos )
mnFirstLine--;
}
if ( (mnFirstLine == nOldLine) &&
- (mnFirstLine < (USHORT)(mnLines-mnVisLines)) && (rPos.Y() < aOutSize.Height()) )
+ (mnFirstLine < (sal_uInt16)(mnLines-mnVisLines)) && (rPos.Y() < aOutSize.Height()) )
{
long nBottomPos = mpImpl->mpItemList->GetObject( (mnFirstLine+mnVisLines-1)*mnCols )->maRect.Bottom();
if ( (rPos.Y() >= nBottomPos-nScrollOffset) && (rPos.Y() <= nBottomPos) )
@@ -1125,17 +1125,17 @@ BOOL ValueSet::ImplScroll( const Point& rPos )
if ( mnFirstLine != nOldLine )
{
- mbFormat = TRUE;
+ mbFormat = sal_True;
ImplDraw();
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-USHORT ValueSet::ImplGetItem( const Point& rPos, BOOL bMove ) const
+sal_uInt16 ValueSet::ImplGetItem( const Point& rPos, sal_Bool bMove ) const
{
if ( mpNoneItem )
{
@@ -1146,14 +1146,14 @@ USHORT ValueSet::ImplGetItem( const Point& rPos, BOOL bMove ) const
Point aDefPos;
Rectangle aWinRect( aDefPos, maVirDev.GetOutputSizePixel() );
- ULONG nItemCount = mpImpl->mpItemList->Count();
- for ( ULONG i = 0; i < nItemCount; i++ )
+ sal_uLong nItemCount = mpImpl->mpItemList->Count();
+ for ( sal_uLong i = 0; i < nItemCount; i++ )
{
ValueSetItem* pItem = mpImpl->mpItemList->GetObject( i );
if ( pItem->maRect.IsInside( rPos ) )
{
if ( aWinRect.IsInside( rPos ) )
- return (USHORT)i;
+ return (sal_uInt16)i;
else
return VALUESET_ITEM_NOTFOUND;
}
@@ -1173,7 +1173,7 @@ USHORT ValueSet::ImplGetItem( const Point& rPos, BOOL bMove ) const
// -----------------------------------------------------------------------
-ValueSetItem* ValueSet::ImplGetItem( USHORT nPos )
+ValueSetItem* ValueSet::ImplGetItem( sal_uInt16 nPos )
{
if ( nPos == VALUESET_ITEM_NONEITEM )
return mpNoneItem;
@@ -1185,8 +1185,8 @@ ValueSetItem* ValueSet::ImplGetItem( USHORT nPos )
ValueSetItem* ValueSet::ImplGetFirstItem()
{
- USHORT nItemCount = (USHORT)mpImpl->mpItemList->Count();
- USHORT i = 0;
+ sal_uInt16 nItemCount = (sal_uInt16)mpImpl->mpItemList->Count();
+ sal_uInt16 i = 0;
while ( i < nItemCount )
{
@@ -1201,9 +1201,9 @@ ValueSetItem* ValueSet::ImplGetFirstItem()
// -----------------------------------------------------------------------
-USHORT ValueSet::ImplGetVisibleItemCount() const
+sal_uInt16 ValueSet::ImplGetVisibleItemCount() const
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
for( sal_Int32 n = 0, nItemCount = mpImpl->mpItemList->Count(); n < nItemCount; n++ )
{
@@ -1218,10 +1218,10 @@ USHORT ValueSet::ImplGetVisibleItemCount() const
// -----------------------------------------------------------------------
-ValueSetItem* ValueSet::ImplGetVisibleItem( USHORT nVisiblePos )
+ValueSetItem* ValueSet::ImplGetVisibleItem( sal_uInt16 nVisiblePos )
{
ValueSetItem* pRet = NULL;
- USHORT nFoundPos = 0;
+ sal_uInt16 nFoundPos = 0;
for( sal_Int32 n = 0, nItemCount = mpImpl->mpItemList->Count(); ( n < nItemCount ) && !pRet; n++ )
{
@@ -1238,7 +1238,7 @@ ValueSetItem* ValueSet::ImplGetVisibleItem( USHORT nVisiblePos )
void ValueSet::ImplFireAccessibleEvent( short nEventId, const ::com::sun::star::uno::Any& rOldValue, const ::com::sun::star::uno::Any& rNewValue )
{
- ValueSetAcc* pAcc = ValueSetAcc::getImplementation( GetAccessible( FALSE ) );
+ ValueSetAcc* pAcc = ValueSetAcc::getImplementation( GetAccessible( sal_False ) );
if( pAcc )
pAcc->FireAccessibleEvent( nEventId, rOldValue, rNewValue );
@@ -1246,9 +1246,9 @@ void ValueSet::ImplFireAccessibleEvent( short nEventId, const ::com::sun::star::
// -----------------------------------------------------------------------
-BOOL ValueSet::ImplHasAccessibleListeners()
+sal_Bool ValueSet::ImplHasAccessibleListeners()
{
- ValueSetAcc* pAcc = ValueSetAcc::getImplementation( GetAccessible( FALSE ) );
+ ValueSetAcc* pAcc = ValueSetAcc::getImplementation( GetAccessible( sal_False ) );
return( pAcc && pAcc->HasAccessibleListeners() );
}
@@ -1256,11 +1256,11 @@ BOOL ValueSet::ImplHasAccessibleListeners()
IMPL_LINK( ValueSet,ImplScrollHdl, ScrollBar*, pScrollBar )
{
- USHORT nNewFirstLine = (USHORT)pScrollBar->GetThumbPos();
+ sal_uInt16 nNewFirstLine = (sal_uInt16)pScrollBar->GetThumbPos();
if ( nNewFirstLine != mnFirstLine )
{
mnFirstLine = nNewFirstLine;
- mbFormat = TRUE;
+ mbFormat = sal_True;
ImplDraw();
}
return 0;
@@ -1270,13 +1270,13 @@ IMPL_LINK( ValueSet,ImplScrollHdl, ScrollBar*, pScrollBar )
IMPL_LINK( ValueSet,ImplTimerHdl, Timer*, EMPTYARG )
{
- ImplTracking( GetPointerPosPixel(), TRUE );
+ ImplTracking( GetPointerPosPixel(), sal_True );
return 0;
}
// -----------------------------------------------------------------------
-void ValueSet::ImplTracking( const Point& rPos, BOOL bRepeat )
+void ValueSet::ImplTracking( const Point& rPos, sal_Bool bRepeat )
{
if ( bRepeat || mbSelection )
{
@@ -1295,22 +1295,22 @@ void ValueSet::ImplTracking( const Point& rPos, BOOL bRepeat )
if ( pItem && (pItem->meType != VALUESETITEM_SPACE) )
{
if( GetStyle() & WB_MENUSTYLEVALUESET )
- mbHighlight = TRUE;
+ mbHighlight = sal_True;
ImplHighlightItem( pItem->mnId );
}
else
{
if( GetStyle() & WB_MENUSTYLEVALUESET )
- mbHighlight = TRUE;
+ mbHighlight = sal_True;
- ImplHighlightItem( mnSelItemId, FALSE );
+ ImplHighlightItem( mnSelItemId, sal_False );
}
}
// -----------------------------------------------------------------------
-void ValueSet::ImplEndTracking( const Point& rPos, BOOL bCancel )
+void ValueSet::ImplEndTracking( const Point& rPos, sal_Bool bCancel )
{
ValueSetItem* pItem;
@@ -1325,15 +1325,15 @@ void ValueSet::ImplEndTracking( const Point& rPos, BOOL bCancel )
SelectItem( pItem->mnId );
if ( !mbSelection && !(GetStyle() & WB_NOPOINTERFOCUS) )
GrabFocus();
- mbHighlight = FALSE;
- mbSelection = FALSE;
+ mbHighlight = sal_False;
+ mbSelection = sal_False;
Select();
}
else
{
- ImplHighlightItem( mnSelItemId, FALSE );
- mbHighlight = FALSE;
- mbSelection = FALSE;
+ ImplHighlightItem( mnSelItemId, sal_False );
+ mbHighlight = sal_False;
+ mbSelection = sal_False;
}
}
@@ -1346,7 +1346,7 @@ void ValueSet::MouseButtonDown( const MouseEvent& rMEvt )
ValueSetItem* pItem = ImplGetItem( ImplGetItem( rMEvt.GetPosPixel() ) );
if ( mbSelection )
{
- mbHighlight = TRUE;
+ mbHighlight = sal_True;
if ( pItem && (pItem->meType != VALUESETITEM_SPACE) )
{
mnOldItemId = mnSelItemId;
@@ -1363,7 +1363,7 @@ void ValueSet::MouseButtonDown( const MouseEvent& rMEvt )
if ( (pItem->mnBits & VIB_NODOUBLECLICK) || (rMEvt.GetClicks() == 1) )
{
mnOldItemId = mnSelItemId;
- mbHighlight = TRUE;
+ mbHighlight = sal_True;
mnHighItemId = mnSelItemId;
ImplHighlightItem( pItem->mnId );
StartTracking( STARTTRACK_SCROLLREPEAT );
@@ -1385,7 +1385,7 @@ void ValueSet::MouseButtonUp( const MouseEvent& rMEvt )
{
// Wegen SelectionMode
if ( rMEvt.IsLeft() && mbSelection )
- ImplEndTracking( rMEvt.GetPosPixel(), FALSE );
+ ImplEndTracking( rMEvt.GetPosPixel(), sal_False );
else
Control::MouseButtonUp( rMEvt );
}
@@ -1396,7 +1396,7 @@ void ValueSet::MouseMove( const MouseEvent& rMEvt )
{
// Wegen SelectionMode
if ( mbSelection || (GetStyle() & WB_MENUSTYLEVALUESET) )
- ImplTracking( rMEvt.GetPosPixel(), FALSE );
+ ImplTracking( rMEvt.GetPosPixel(), sal_False );
Control::MouseMove( rMEvt );
}
@@ -1416,10 +1416,10 @@ void ValueSet::Tracking( const TrackingEvent& rTEvt )
void ValueSet::KeyInput( const KeyEvent& rKEvt )
{
- USHORT nLastItem = (USHORT)mpImpl->mpItemList->Count();
- USHORT nItemPos = VALUESET_ITEM_NOTFOUND;
- USHORT nCurPos = VALUESET_ITEM_NONEITEM;
- USHORT nCalcPos;
+ sal_uInt16 nLastItem = (sal_uInt16)mpImpl->mpItemList->Count();
+ sal_uInt16 nItemPos = VALUESET_ITEM_NOTFOUND;
+ sal_uInt16 nCurPos = VALUESET_ITEM_NONEITEM;
+ sal_uInt16 nCalcPos;
if ( !nLastItem || !ImplGetFirstItem() )
{
@@ -1434,7 +1434,7 @@ void ValueSet::KeyInput( const KeyEvent& rKEvt )
nCalcPos = nCurPos;
//switch off selection mode if key travelling is used
- BOOL bDefault = FALSE;
+ sal_Bool bDefault = sal_False;
switch ( rKEvt.GetKeyCode().GetCode() )
{
case KEY_HOME:
@@ -1522,7 +1522,7 @@ void ValueSet::KeyInput( const KeyEvent& rKEvt )
}
}
else if ( nCalcPos >= ( nLineCount * mnCols ) )
- nItemPos = sal::static_int_cast< USHORT >(
+ nItemPos = sal::static_int_cast< sal_uInt16 >(
nCalcPos - ( nLineCount * mnCols ));
else
{
@@ -1564,7 +1564,7 @@ void ValueSet::KeyInput( const KeyEvent& rKEvt )
if ( nCalcPos == VALUESET_ITEM_NONEITEM )
nItemPos = mnCurCol;
else if ( nCalcPos + ( nLineCount * mnCols ) <= nLastItem )
- nItemPos = sal::static_int_cast< USHORT >(
+ nItemPos = sal::static_int_cast< sal_uInt16 >(
nCalcPos + ( nLineCount * mnCols ));
else
{
@@ -1607,14 +1607,14 @@ void ValueSet::KeyInput( const KeyEvent& rKEvt )
//no break;
default:
Control::KeyInput( rKEvt );
- bDefault = TRUE;
+ bDefault = sal_True;
break;
}
if(!bDefault)
EndSelection();
if ( nItemPos != VALUESET_ITEM_NOTFOUND )
{
- USHORT nItemId;
+ sal_uInt16 nItemId;
if ( nItemPos != VALUESET_ITEM_NONEITEM )
nItemId = GetItemId( nItemPos );
else
@@ -1671,7 +1671,7 @@ void ValueSet::GetFocus()
Control::GetFocus();
// Tell the accessible object that we got the focus.
- ValueSetAcc* pAcc = ValueSetAcc::getImplementation( GetAccessible( FALSE ) );
+ ValueSetAcc* pAcc = ValueSetAcc::getImplementation( GetAccessible( sal_False ) );
if( pAcc )
pAcc->GetFocus();
}
@@ -1688,7 +1688,7 @@ void ValueSet::LoseFocus()
Control::LoseFocus();
// Tell the accessible object that we lost the focus.
- ValueSetAcc* pAcc = ValueSetAcc::getImplementation( GetAccessible( FALSE ) );
+ ValueSetAcc* pAcc = ValueSetAcc::getImplementation( GetAccessible( sal_False ) );
if( pAcc )
pAcc->LoseFocus();
}
@@ -1697,7 +1697,7 @@ void ValueSet::LoseFocus()
void ValueSet::Resize()
{
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
Control::Resize();
@@ -1710,7 +1710,7 @@ void ValueSet::RequestHelp( const HelpEvent& rHEvt )
if ( (rHEvt.GetMode() & (HELPMODE_QUICK | HELPMODE_BALLOON)) == HELPMODE_QUICK )
{
Point aPos = ScreenToOutputPixel( rHEvt.GetMousePosPixel() );
- USHORT nItemPos = ImplGetItem( aPos );
+ sal_uInt16 nItemPos = ImplGetItem( aPos );
if ( nItemPos != VALUESET_ITEM_NOTFOUND )
{
ValueSetItem* pItem = ImplGetItem( nItemPos );
@@ -1756,23 +1756,23 @@ void ValueSet::StateChanged( StateChangedType nType )
else if ( (nType == STATE_CHANGE_ZOOM) ||
(nType == STATE_CHANGE_CONTROLFONT) )
{
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
{
- ImplInitSettings( FALSE, TRUE, FALSE );
+ ImplInitSettings( sal_False, sal_True, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
{
- ImplInitSettings( FALSE, FALSE, TRUE );
+ ImplInitSettings( sal_False, sal_False, sal_True );
Invalidate();
}
else if ( (nType == STATE_CHANGE_STYLE) || (nType == STATE_CHANGE_ENABLE) )
{
- mbFormat = TRUE;
- ImplInitSettings( FALSE, FALSE, TRUE );
+ mbFormat = sal_True;
+ ImplInitSettings( sal_False, sal_False, sal_True );
Invalidate();
}
}
@@ -1789,8 +1789,8 @@ void ValueSet::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE)) )
{
- mbFormat = TRUE;
- ImplInitSettings( TRUE, TRUE, TRUE );
+ mbFormat = sal_True;
+ ImplInitSettings( sal_True, sal_True, sal_True );
Invalidate();
}
}
@@ -1817,7 +1817,7 @@ void ValueSet::UserDraw( const UserDrawEvent& )
// -----------------------------------------------------------------------
-void ValueSet::InsertItem( USHORT nItemId, const Image& rImage, USHORT nPos )
+void ValueSet::InsertItem( sal_uInt16 nItemId, const Image& rImage, sal_uInt16 nPos )
{
DBG_ASSERT( nItemId, "ValueSet::InsertItem(): ItemId == 0" );
DBG_ASSERT( GetItemPos( nItemId ) == VALUESET_ITEM_NOTFOUND,
@@ -1827,16 +1827,16 @@ void ValueSet::InsertItem( USHORT nItemId, const Image& rImage, USHORT nPos )
pItem->mnId = nItemId;
pItem->meType = VALUESETITEM_IMAGE;
pItem->maImage = rImage;
- mpImpl->mpItemList->Insert( pItem, (ULONG)nPos );
+ mpImpl->mpItemList->Insert( pItem, (sal_uLong)nPos );
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
// -----------------------------------------------------------------------
-void ValueSet::InsertItem( USHORT nItemId, const Color& rColor, USHORT nPos )
+void ValueSet::InsertItem( sal_uInt16 nItemId, const Color& rColor, sal_uInt16 nPos )
{
DBG_ASSERT( nItemId, "ValueSet::InsertItem(): ItemId == 0" );
DBG_ASSERT( GetItemPos( nItemId ) == VALUESET_ITEM_NOTFOUND,
@@ -1846,17 +1846,17 @@ void ValueSet::InsertItem( USHORT nItemId, const Color& rColor, USHORT nPos )
pItem->mnId = nItemId;
pItem->meType = VALUESETITEM_COLOR;
pItem->maColor = rColor;
- mpImpl->mpItemList->Insert( pItem, (ULONG)nPos );
+ mpImpl->mpItemList->Insert( pItem, (sal_uLong)nPos );
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
// -----------------------------------------------------------------------
-void ValueSet::InsertItem( USHORT nItemId, const Image& rImage,
- const XubString& rText, USHORT nPos )
+void ValueSet::InsertItem( sal_uInt16 nItemId, const Image& rImage,
+ const XubString& rText, sal_uInt16 nPos )
{
DBG_ASSERT( nItemId, "ValueSet::InsertItem(): ItemId == 0" );
DBG_ASSERT( GetItemPos( nItemId ) == VALUESET_ITEM_NOTFOUND,
@@ -1867,17 +1867,17 @@ void ValueSet::InsertItem( USHORT nItemId, const Image& rImage,
pItem->meType = VALUESETITEM_IMAGE;
pItem->maImage = rImage;
pItem->maText = rText;
- mpImpl->mpItemList->Insert( pItem, (ULONG)nPos );
+ mpImpl->mpItemList->Insert( pItem, (sal_uLong)nPos );
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
// -----------------------------------------------------------------------
-void ValueSet::InsertItem( USHORT nItemId, const Color& rColor,
- const XubString& rText, USHORT nPos )
+void ValueSet::InsertItem( sal_uInt16 nItemId, const Color& rColor,
+ const XubString& rText, sal_uInt16 nPos )
{
DBG_ASSERT( nItemId, "ValueSet::InsertItem(): ItemId == 0" );
DBG_ASSERT( GetItemPos( nItemId ) == VALUESET_ITEM_NOTFOUND,
@@ -1888,16 +1888,16 @@ void ValueSet::InsertItem( USHORT nItemId, const Color& rColor,
pItem->meType = VALUESETITEM_COLOR;
pItem->maColor = rColor;
pItem->maText = rText;
- mpImpl->mpItemList->Insert( pItem, (ULONG)nPos );
+ mpImpl->mpItemList->Insert( pItem, (sal_uLong)nPos );
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
// -----------------------------------------------------------------------
-void ValueSet::InsertItem( USHORT nItemId, USHORT nPos )
+void ValueSet::InsertItem( sal_uInt16 nItemId, sal_uInt16 nPos )
{
DBG_ASSERT( nItemId, "ValueSet::InsertItem(): ItemId == 0" );
DBG_ASSERT( GetItemPos( nItemId ) == VALUESET_ITEM_NOTFOUND,
@@ -1906,16 +1906,16 @@ void ValueSet::InsertItem( USHORT nItemId, USHORT nPos )
ValueSetItem* pItem = new ValueSetItem( *this );
pItem->mnId = nItemId;
pItem->meType = VALUESETITEM_USERDRAW;
- mpImpl->mpItemList->Insert( pItem, (ULONG)nPos );
+ mpImpl->mpItemList->Insert( pItem, (sal_uLong)nPos );
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
// -----------------------------------------------------------------------
-void ValueSet::InsertSpace( USHORT nItemId, USHORT nPos )
+void ValueSet::InsertSpace( sal_uInt16 nItemId, sal_uInt16 nPos )
{
DBG_ASSERT( nItemId, "ValueSet::InsertSpace(): ItemId == 0" );
DBG_ASSERT( GetItemPos( nItemId ) == VALUESET_ITEM_NOTFOUND,
@@ -1924,18 +1924,18 @@ void ValueSet::InsertSpace( USHORT nItemId, USHORT nPos )
ValueSetItem* pItem = new ValueSetItem( *this );
pItem->mnId = nItemId;
pItem->meType = VALUESETITEM_SPACE;
- mpImpl->mpItemList->Insert( pItem, (ULONG)nPos );
+ mpImpl->mpItemList->Insert( pItem, (sal_uLong)nPos );
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
// -----------------------------------------------------------------------
-void ValueSet::RemoveItem( USHORT nItemId )
+void ValueSet::RemoveItem( sal_uInt16 nItemId )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos == VALUESET_ITEM_NOTFOUND )
return;
@@ -1949,10 +1949,10 @@ void ValueSet::RemoveItem( USHORT nItemId )
mnOldItemId = 0;
mnHighItemId = 0;
mnSelItemId = 0;
- mbNoSelection = TRUE;
+ mbNoSelection = sal_True;
}
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
@@ -1988,9 +1988,9 @@ void ValueSet::CopyItems( const ValueSet& rValueSet )
mnOldItemId = 0;
mnHighItemId = 0;
mnSelItemId = 0;
- mbNoSelection = TRUE;
+ mbNoSelection = sal_True;
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
@@ -2007,29 +2007,29 @@ void ValueSet::Clear()
mnOldItemId = 0;
mnHighItemId = 0;
mnSelItemId = 0;
- mbNoSelection = TRUE;
+ mbNoSelection = sal_True;
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
// -----------------------------------------------------------------------
-USHORT ValueSet::GetItemCount() const
+sal_uInt16 ValueSet::GetItemCount() const
{
- return (USHORT)mpImpl->mpItemList->Count();
+ return (sal_uInt16)mpImpl->mpItemList->Count();
}
// -----------------------------------------------------------------------
-USHORT ValueSet::GetItemPos( USHORT nItemId ) const
+sal_uInt16 ValueSet::GetItemPos( sal_uInt16 nItemId ) const
{
ValueSetItem* pItem = mpImpl->mpItemList->First();
while ( pItem )
{
if ( pItem->mnId == nItemId )
- return (USHORT)mpImpl->mpItemList->GetCurPos();
+ return (sal_uInt16)mpImpl->mpItemList->GetCurPos();
pItem = mpImpl->mpItemList->Next();
}
@@ -2038,7 +2038,7 @@ USHORT ValueSet::GetItemPos( USHORT nItemId ) const
// -----------------------------------------------------------------------
-USHORT ValueSet::GetItemId( USHORT nPos ) const
+sal_uInt16 ValueSet::GetItemId( sal_uInt16 nPos ) const
{
ValueSetItem* pItem = mpImpl->mpItemList->GetObject( nPos );
@@ -2050,9 +2050,9 @@ USHORT ValueSet::GetItemId( USHORT nPos ) const
// -----------------------------------------------------------------------
-USHORT ValueSet::GetItemId( const Point& rPos ) const
+sal_uInt16 ValueSet::GetItemId( const Point& rPos ) const
{
- USHORT nItemPos = ImplGetItem( rPos );
+ sal_uInt16 nItemPos = ImplGetItem( rPos );
if ( nItemPos != VALUESET_ITEM_NOTFOUND )
return GetItemId( nItemPos );
@@ -2061,9 +2061,9 @@ USHORT ValueSet::GetItemId( const Point& rPos ) const
// -----------------------------------------------------------------------
-Rectangle ValueSet::GetItemRect( USHORT nItemId ) const
+Rectangle ValueSet::GetItemRect( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != VALUESET_ITEM_NOTFOUND )
return mpImpl->mpItemList->GetObject( nPos )->maRect;
@@ -2073,19 +2073,19 @@ Rectangle ValueSet::GetItemRect( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void ValueSet::EnableFullItemMode( BOOL bFullMode )
+void ValueSet::EnableFullItemMode( sal_Bool bFullMode )
{
mbFullMode = bFullMode;
}
// -----------------------------------------------------------------------
-void ValueSet::SetColCount( USHORT nNewCols )
+void ValueSet::SetColCount( sal_uInt16 nNewCols )
{
if ( mnUserCols != nNewCols )
{
mnUserCols = nNewCols;
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
@@ -2093,12 +2093,12 @@ void ValueSet::SetColCount( USHORT nNewCols )
// -----------------------------------------------------------------------
-void ValueSet::SetLineCount( USHORT nNewLines )
+void ValueSet::SetLineCount( sal_uInt16 nNewLines )
{
if ( mnUserVisLines != nNewLines )
{
mnUserVisLines = nNewLines;
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
@@ -2111,7 +2111,7 @@ void ValueSet::SetItemWidth( long nNewItemWidth )
if ( mnUserItemWidth != nNewItemWidth )
{
mnUserItemWidth = nNewItemWidth;
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
@@ -2124,7 +2124,7 @@ void ValueSet::SetItemHeight( long nNewItemHeight )
if ( mnUserItemHeight != nNewItemHeight )
{
mnUserItemHeight = nNewItemHeight;
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
@@ -2132,12 +2132,12 @@ void ValueSet::SetItemHeight( long nNewItemHeight )
// -----------------------------------------------------------------------
-void ValueSet::SetFirstLine( USHORT nNewLine )
+void ValueSet::SetFirstLine( sal_uInt16 nNewLine )
{
if ( mnFirstLine != nNewLine )
{
mnFirstLine = nNewLine;
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
@@ -2145,9 +2145,9 @@ void ValueSet::SetFirstLine( USHORT nNewLine )
// -----------------------------------------------------------------------
-void ValueSet::SelectItem( USHORT nItemId )
+void ValueSet::SelectItem( sal_uInt16 nItemId )
{
- USHORT nItemPos = 0;
+ sal_uInt16 nItemPos = 0;
if ( nItemId )
{
@@ -2160,31 +2160,31 @@ void ValueSet::SelectItem( USHORT nItemId )
if ( (mnSelItemId != nItemId) || mbNoSelection )
{
- USHORT nOldItem = mnSelItemId ? mnSelItemId : 1;
+ sal_uInt16 nOldItem = mnSelItemId ? mnSelItemId : 1;
mnSelItemId = nItemId;
- mbNoSelection = FALSE;
+ mbNoSelection = sal_False;
- BOOL bNewOut;
- BOOL bNewLine;
+ sal_Bool bNewOut;
+ sal_Bool bNewLine;
if ( !mbFormat && IsReallyVisible() && IsUpdateMode() )
- bNewOut = TRUE;
+ bNewOut = sal_True;
else
- bNewOut = FALSE;
- bNewLine = FALSE;
+ bNewOut = sal_False;
+ bNewLine = sal_False;
// Gegebenenfalls in den sichtbaren Bereich scrollen
if ( mbScroll && nItemId )
{
- USHORT nNewLine = (USHORT)(nItemPos / mnCols);
+ sal_uInt16 nNewLine = (sal_uInt16)(nItemPos / mnCols);
if ( nNewLine < mnFirstLine )
{
mnFirstLine = nNewLine;
- bNewLine = TRUE;
+ bNewLine = sal_True;
}
- else if ( nNewLine > (USHORT)(mnFirstLine+mnVisLines-1) )
+ else if ( nNewLine > (sal_uInt16)(mnFirstLine+mnVisLines-1) )
{
- mnFirstLine = (USHORT)(nNewLine-mnVisLines+1);
- bNewLine = TRUE;
+ mnFirstLine = (sal_uInt16)(nNewLine-mnVisLines+1);
+ bNewLine = sal_True;
}
}
@@ -2194,7 +2194,7 @@ void ValueSet::SelectItem( USHORT nItemId )
{
// Falls sich der sichtbare Bereich geaendert hat,
// alles neu ausgeben
- mbFormat = TRUE;
+ mbFormat = sal_True;
ImplDraw();
}
else
@@ -2210,7 +2210,7 @@ void ValueSet::SelectItem( USHORT nItemId )
// focus event (deselect)
if( nOldItem )
{
- const USHORT nPos = GetItemPos( nItemId );
+ const sal_uInt16 nPos = GetItemPos( nItemId );
if( nPos != VALUESET_ITEM_NOTFOUND )
{
@@ -2236,7 +2236,7 @@ void ValueSet::SelectItem( USHORT nItemId )
}
// focus event (select)
- const USHORT nPos = GetItemPos( mnSelItemId );
+ const sal_uInt16 nPos = GetItemPos( mnSelItemId );
ValueSetItem* pItem;
if( nPos != VALUESET_ITEM_NOTFOUND )
@@ -2276,9 +2276,9 @@ void ValueSet::SelectItem( USHORT nItemId )
void ValueSet::SetNoSelection()
{
- mbNoSelection = TRUE;
- mbHighlight = FALSE;
- mbSelection = FALSE;
+ mbNoSelection = sal_True;
+ mbHighlight = sal_False;
+ mbSelection = sal_False;
if ( IsReallyVisible() && IsUpdateMode() )
ImplDraw();
@@ -2286,9 +2286,9 @@ void ValueSet::SetNoSelection()
// -----------------------------------------------------------------------
-void ValueSet::SetItemBits( USHORT nItemId, USHORT nItemBits )
+void ValueSet::SetItemBits( sal_uInt16 nItemId, sal_uInt16 nItemBits )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != VALUESET_ITEM_NOTFOUND )
mpImpl->mpItemList->GetObject( nPos )->mnBits = nItemBits;
@@ -2296,9 +2296,9 @@ void ValueSet::SetItemBits( USHORT nItemId, USHORT nItemBits )
// -----------------------------------------------------------------------
-USHORT ValueSet::GetItemBits( USHORT nItemId ) const
+sal_uInt16 ValueSet::GetItemBits( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != VALUESET_ITEM_NOTFOUND )
return mpImpl->mpItemList->GetObject( nPos )->mnBits;
@@ -2308,9 +2308,9 @@ USHORT ValueSet::GetItemBits( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void ValueSet::SetItemImage( USHORT nItemId, const Image& rImage )
+void ValueSet::SetItemImage( sal_uInt16 nItemId, const Image& rImage )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos == VALUESET_ITEM_NOTFOUND )
return;
@@ -2325,14 +2325,14 @@ void ValueSet::SetItemImage( USHORT nItemId, const Image& rImage )
Invalidate( pItem->maRect );
}
else
- mbFormat = TRUE;
+ mbFormat = sal_True;
}
// -----------------------------------------------------------------------
-Image ValueSet::GetItemImage( USHORT nItemId ) const
+Image ValueSet::GetItemImage( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != VALUESET_ITEM_NOTFOUND )
return mpImpl->mpItemList->GetObject( nPos )->maImage;
@@ -2342,9 +2342,9 @@ Image ValueSet::GetItemImage( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void ValueSet::SetItemColor( USHORT nItemId, const Color& rColor )
+void ValueSet::SetItemColor( sal_uInt16 nItemId, const Color& rColor )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos == VALUESET_ITEM_NOTFOUND )
return;
@@ -2359,14 +2359,14 @@ void ValueSet::SetItemColor( USHORT nItemId, const Color& rColor )
Invalidate( pItem->maRect );
}
else
- mbFormat = TRUE;
+ mbFormat = sal_True;
}
// -----------------------------------------------------------------------
-Color ValueSet::GetItemColor( USHORT nItemId ) const
+Color ValueSet::GetItemColor( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != VALUESET_ITEM_NOTFOUND )
return mpImpl->mpItemList->GetObject( nPos )->maColor;
@@ -2376,9 +2376,9 @@ Color ValueSet::GetItemColor( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void ValueSet::SetItemData( USHORT nItemId, void* pData )
+void ValueSet::SetItemData( sal_uInt16 nItemId, void* pData )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos == VALUESET_ITEM_NOTFOUND )
return;
@@ -2394,15 +2394,15 @@ void ValueSet::SetItemData( USHORT nItemId, void* pData )
Invalidate( pItem->maRect );
}
else
- mbFormat = TRUE;
+ mbFormat = sal_True;
}
}
// -----------------------------------------------------------------------
-void* ValueSet::GetItemData( USHORT nItemId ) const
+void* ValueSet::GetItemData( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != VALUESET_ITEM_NOTFOUND )
return mpImpl->mpItemList->GetObject( nPos )->mpData;
@@ -2412,9 +2412,9 @@ void* ValueSet::GetItemData( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void ValueSet::SetItemText( USHORT nItemId, const XubString& rText )
+void ValueSet::SetItemText( sal_uInt16 nItemId, const XubString& rText )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos == VALUESET_ITEM_NOTFOUND )
return;
@@ -2433,7 +2433,7 @@ void ValueSet::SetItemText( USHORT nItemId, const XubString& rText )
if ( !mbFormat && IsReallyVisible() && IsUpdateMode() )
{
- USHORT nTempId = mnSelItemId;
+ sal_uInt16 nTempId = mnSelItemId;
if ( mbHighlight )
nTempId = mnHighItemId;
@@ -2455,9 +2455,9 @@ void ValueSet::SetItemText( USHORT nItemId, const XubString& rText )
// -----------------------------------------------------------------------
-XubString ValueSet::GetItemText( USHORT nItemId ) const
+XubString ValueSet::GetItemText( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != VALUESET_ITEM_NOTFOUND )
return mpImpl->mpItemList->GetObject( nPos )->maText;
@@ -2470,20 +2470,20 @@ XubString ValueSet::GetItemText( USHORT nItemId ) const
void ValueSet::SetColor( const Color& rColor )
{
maColor = rColor;
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
ImplDraw();
}
// -----------------------------------------------------------------------
-void ValueSet::SetExtraSpacing( USHORT nNewSpacing )
+void ValueSet::SetExtraSpacing( sal_uInt16 nNewSpacing )
{
if ( GetStyle() & WB_ITEMBORDER )
{
mnSpacing = nNewSpacing;
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
@@ -2494,8 +2494,8 @@ void ValueSet::SetExtraSpacing( USHORT nNewSpacing )
void ValueSet::StartSelection()
{
mnOldItemId = mnSelItemId;
- mbHighlight = TRUE;
- mbSelection = TRUE;
+ mbHighlight = sal_True;
+ mbSelection = sal_True;
mnHighItemId = mnSelItemId;
}
@@ -2509,17 +2509,17 @@ void ValueSet::EndSelection()
EndTracking( ENDTRACK_CANCEL );
ImplHighlightItem( mnSelItemId );
- mbHighlight = FALSE;
+ mbHighlight = sal_False;
}
- mbSelection = FALSE;
+ mbSelection = sal_False;
}
// -----------------------------------------------------------------------
-BOOL ValueSet::StartDrag( const CommandEvent& rCEvt, Region& rRegion )
+sal_Bool ValueSet::StartDrag( const CommandEvent& rCEvt, Region& rRegion )
{
if ( rCEvt.GetCommand() != COMMAND_STARTDRAG )
- return FALSE;
+ return sal_False;
// Gegebenenfalls eine vorhandene Aktion abbrechen
EndSelection();
@@ -2528,7 +2528,7 @@ BOOL ValueSet::StartDrag( const CommandEvent& rCEvt, Region& rRegion )
// der Fall ist, setzen wir ihn als aktuellen Eintrag. Falls Drag and
// Drop auch mal ueber Tastatur ausgeloest werden kann, testen wir
// dies nur bei einer Mausaktion.
- USHORT nSelId;
+ sal_uInt16 nSelId;
if ( rCEvt.IsMouseEvent() )
nSelId = GetItemId( rCEvt.GetMousePosPixel() );
else
@@ -2536,7 +2536,7 @@ BOOL ValueSet::StartDrag( const CommandEvent& rCEvt, Region& rRegion )
// Falls kein Eintrag angeklickt wurde, starten wir kein Dragging
if ( !nSelId )
- return FALSE;
+ return sal_False;
// Testen, ob Seite selektiertiert ist. Falls nicht, als aktuelle
// Seite setzen und Select rufen.
@@ -2552,13 +2552,13 @@ BOOL ValueSet::StartDrag( const CommandEvent& rCEvt, Region& rRegion )
// Region zuweisen
rRegion = aRegion;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-Size ValueSet::CalcWindowSizePixel( const Size& rItemSize, USHORT nDesireCols,
- USHORT nDesireLines )
+Size ValueSet::CalcWindowSizePixel( const Size& rItemSize, sal_uInt16 nDesireCols,
+ sal_uInt16 nDesireLines )
{
long nCalcCols = (long)nDesireCols;
long nCalcLines = (long)nDesireLines;
@@ -2640,7 +2640,7 @@ Size ValueSet::CalcWindowSizePixel( const Size& rItemSize, USHORT nDesireCols,
// -----------------------------------------------------------------------
-Size ValueSet::CalcItemSizePixel( const Size& rItemSize, BOOL bOut ) const
+Size ValueSet::CalcItemSizePixel( const Size& rItemSize, sal_Bool bOut ) const
{
Size aSize = rItemSize;
@@ -2684,15 +2684,15 @@ long ValueSet::GetScrollWidth() const
// -----------------------------------------------------------------------
-USHORT ValueSet::ShowDropPos( const Point& rPos )
+sal_uInt16 ValueSet::ShowDropPos( const Point& rPos )
{
- mbDropPos = TRUE;
+ mbDropPos = sal_True;
// Gegebenenfalls scrollen
ImplScroll( rPos );
// DropPosition ermitteln
- USHORT nPos = ImplGetItem( rPos, TRUE );
+ sal_uInt16 nPos = ImplGetItem( rPos, sal_True );
if ( nPos == VALUESET_ITEM_NONEITEM )
nPos = 0;
else if ( nPos == VALUESET_ITEM_NOTFOUND )
@@ -2702,7 +2702,7 @@ USHORT ValueSet::ShowDropPos( const Point& rPos )
aOutSize.Height() = mnTextOffset;
if ( (rPos.X() >= 0) && (rPos.X() < aOutSize.Width()) &&
(rPos.Y() >= 0) && (rPos.Y() < aOutSize.Height()) )
- nPos = (USHORT)mpImpl->mpItemList->Count();
+ nPos = (sal_uInt16)mpImpl->mpItemList->Count();
}
else
{
@@ -2714,9 +2714,9 @@ USHORT ValueSet::ShowDropPos( const Point& rPos )
if ( nPos != mnDropPos )
{
- ImplDrawDropPos( FALSE );
+ ImplDrawDropPos( sal_False );
mnDropPos = nPos;
- ImplDrawDropPos( TRUE );
+ ImplDrawDropPos( sal_True );
}
return mnDropPos;
@@ -2728,8 +2728,8 @@ void ValueSet::HideDropPos()
{
if ( mbDropPos )
{
- ImplDrawDropPos( FALSE );
- mbDropPos = FALSE;
+ ImplDrawDropPos( sal_False );
+ mbDropPos = sal_False;
}
}
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index bfcdfe98ea5a..27d1d1a6b239 100644
--- a/svtools/source/dialogs/addresstemplate.cxx
+++ b/svtools/source/dialogs/addresstemplate.cxx
@@ -41,7 +41,7 @@
#include <vcl/waitobj.hxx>
#include <vcl/msgbox.hxx>
#include <toolkit/helper/vclunohelper.hxx>
-#include <cppuhelper/extract.hxx>
+#include <comphelper/extract.hxx>
#include <comphelper/interaction.hxx>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <com/sun/star/awt/XWindow.hpp>
@@ -590,9 +590,9 @@ void AssignmentPersistentData::Commit()
for (sal_Int32 column=0; column<2; ++column)
{
// the label
- m_pImpl->pFieldLabels[row * 2 + column] = new FixedText(&m_aFieldsFrame, SvtResId((USHORT)(FT_FIELD_BASE + row * 2 + column)));
+ m_pImpl->pFieldLabels[row * 2 + column] = new FixedText(&m_aFieldsFrame, SvtResId((sal_uInt16)(FT_FIELD_BASE + row * 2 + column)));
// the listbox
- m_pImpl->pFields[row * 2 + column] = new ListBox(&m_aFieldsFrame, SvtResId((USHORT)(LB_FIELD_BASE + row * 2 + column)));
+ m_pImpl->pFields[row * 2 + column] = new ListBox(&m_aFieldsFrame, SvtResId((sal_uInt16)(LB_FIELD_BASE + row * 2 + column)));
m_pImpl->pFields[row * 2 + column]->SetDropDownLineCount(15);
m_pImpl->pFields[row * 2 + column]->SetSelectHdl(LINK(this, AddressBookSourceDialog, OnFieldSelect));
diff --git a/svtools/source/dialogs/colctrl.cxx b/svtools/source/dialogs/colctrl.cxx
index 4456fe2f1268..2aa1b5b10675 100644
--- a/svtools/source/dialogs/colctrl.cxx
+++ b/svtools/source/dialogs/colctrl.cxx
@@ -85,19 +85,19 @@ void SvColorControl::CreateBitmap()
if( pWriteAccess )
{
- USHORT nX = (USHORT) aSize.Width();
- USHORT nY = (USHORT) aSize.Height();
+ sal_uInt16 nX = (sal_uInt16) aSize.Width();
+ sal_uInt16 nY = (sal_uInt16) aSize.Height();
- UINT16 nHue, nSat;
+ sal_uInt16 nHue, nSat;
ColorHSB aColHSB( 0, 0, mnLuminance );
- for( USHORT i = 0; i < nY; i++ )
+ for( sal_uInt16 i = 0; i < nY; i++ )
{
- nSat = (UINT16) FRound( 100 - ( 100.0 * i + 0.5 ) / nY );
+ nSat = (sal_uInt16) FRound( 100 - ( 100.0 * i + 0.5 ) / nY );
- for( USHORT j = 0; j < nX; j++ )
+ for( sal_uInt16 j = 0; j < nX; j++ )
{
- nHue = (UINT16) FRound( ( 360.0 * j + 0.5 ) / nX );
+ nHue = (sal_uInt16) FRound( ( 360.0 * j + 0.5 ) / nX );
aColHSB.SetHue( nHue );
aColHSB.SetSat( nSat );
@@ -161,7 +161,7 @@ void SvColorControl::MouseButtonDown( const MouseEvent& rMEvt )
{
if( rMEvt.IsLeft() && !rMEvt.IsShift() )
{
- //ShowPointer( FALSE );
+ //ShowPointer( sal_False );
CaptureMouse();
ShowPosition( rMEvt.GetPosPixel() );
Modify();
@@ -171,7 +171,7 @@ void SvColorControl::MouseButtonDown( const MouseEvent& rMEvt )
// -----------------------------------------------------------------------
void SvColorControl::MouseButtonUp( const MouseEvent& )
{
- //ShowPointer( TRUE );
+ //ShowPointer( sal_True );
if( IsMouseCaptured() )
ReleaseMouse();
}
@@ -219,16 +219,16 @@ void SvColorControl::Modify()
}
// -----------------------------------------------------------------------
-void SvColorControl::SetColor( const ColorHSB& rCol, BOOL bSetColor )
+void SvColorControl::SetColor( const ColorHSB& rCol, sal_Bool bSetColor )
{
if( bSetColor )
maColor = rCol.GetRGB();
if( mpBitmap )
{
- USHORT nX = (USHORT) mpBitmap->GetSizePixel().Width();
- USHORT nY = (USHORT) mpBitmap->GetSizePixel().Height();
- INT16 nZ = rCol.GetBri();
+ sal_uInt16 nX = (sal_uInt16) mpBitmap->GetSizePixel().Width();
+ sal_uInt16 nY = (sal_uInt16) mpBitmap->GetSizePixel().Height();
+ sal_Int16 nZ = rCol.GetBri();
SetLuminance( nZ );
nX = rCol.GetHue() * nX / 360; // Farbe
@@ -245,7 +245,7 @@ void SvColorControl::SetColor( const Color& rCol )
if( mpBitmap )
{
ColorHSB aColHsb( rCol );
- SetColor( aColHsb, FALSE );
+ SetColor( aColHsb, sal_False );
}
}
@@ -332,7 +332,7 @@ void ColorPreviewControl::SetColor( const Color& rCol )
// -----------------------------------------------------------------------
ColorMixingControl::ColorMixingControl( Window* pParent, WinBits nStyle,
- USHORT nRows, USHORT nColumns ) :
+ sal_uInt16 nRows, sal_uInt16 nColumns ) :
ValueSet ( pParent, nStyle ),
mnRows ( nRows ),
mnColumns ( nColumns )
@@ -342,7 +342,7 @@ ColorMixingControl::ColorMixingControl( Window* pParent, WinBits nStyle,
// -----------------------------------------------------------------------
ColorMixingControl::ColorMixingControl( Window* pParent, const ResId& rResId,
- USHORT nRows, USHORT nColumns ) :
+ sal_uInt16 nRows, sal_uInt16 nColumns ) :
ValueSet ( pParent, rResId ),
mnRows ( nRows ),
mnColumns ( nColumns )
@@ -363,7 +363,7 @@ void ColorMixingControl::Initialize()
Color aColor;
String aStr;
- for( USHORT i = 1; i <= mnRows * mnColumns; i++ )
+ for( sal_uInt16 i = 1; i <= mnRows * mnColumns; i++ )
{
InsertItem( i, aColor, aStr );
}
@@ -386,30 +386,30 @@ void ColorMixingControl::Initialize()
}
// -----------------------------------------------------------------------
-Color ColorMixingControl::CalcDifferenceColor( USHORT nCol1, USHORT nCol2,
- USHORT nSteps )
+Color ColorMixingControl::CalcDifferenceColor( sal_uInt16 nCol1, sal_uInt16 nCol2,
+ sal_uInt16 nSteps )
{
// Die Berechnung ist noch etwas ungenau, daher sollte besser mit floats
// gearbeitet werden... (muss !!!)
Color aColor( GetItemColor( nCol1 ) );
Color aColor2( GetItemColor( nCol2 ) );
- aColor.SetRed( (UINT8) ( ( aColor2.GetRed() - aColor.GetRed() ) / nSteps ) );
- aColor.SetGreen( (UINT8) ( ( aColor2.GetGreen() - aColor.GetGreen() ) / nSteps ) );
- aColor.SetBlue( (UINT8) ( ( aColor2.GetBlue() - aColor.GetBlue() ) / nSteps ) );
+ aColor.SetRed( (sal_uInt8) ( ( aColor2.GetRed() - aColor.GetRed() ) / nSteps ) );
+ aColor.SetGreen( (sal_uInt8) ( ( aColor2.GetGreen() - aColor.GetGreen() ) / nSteps ) );
+ aColor.SetBlue( (sal_uInt8) ( ( aColor2.GetBlue() - aColor.GetBlue() ) / nSteps ) );
return( aColor );
}
// -----------------------------------------------------------------------
-void ColorMixingControl::FillRow( USHORT nRow )
+void ColorMixingControl::FillRow( sal_uInt16 nRow )
{
- USHORT nCol1 = nRow * mnColumns + 1;
- USHORT nCol2 = ( nRow + 1 ) * mnColumns;
+ sal_uInt16 nCol1 = nRow * mnColumns + 1;
+ sal_uInt16 nCol2 = ( nRow + 1 ) * mnColumns;
Color aColor( GetItemColor( nCol1 ) );
Color aDiffColor( CalcDifferenceColor( nCol1, nCol2, mnColumns - 1 ) );
- for( USHORT i = nCol1 + 1; i < nCol2; i++ )
+ for( sal_uInt16 i = nCol1 + 1; i < nCol2; i++ )
{
aColor.SetRed( aColor.GetRed() + aDiffColor.GetRed() );
aColor.SetGreen( aColor.GetGreen() + aDiffColor.GetGreen() );
@@ -421,14 +421,14 @@ void ColorMixingControl::FillRow( USHORT nRow )
}
// -----------------------------------------------------------------------
-void ColorMixingControl::FillColumn( USHORT nColumn )
+void ColorMixingControl::FillColumn( sal_uInt16 nColumn )
{
- USHORT nCol1 = nColumn + 1;
- USHORT nCol2 = nColumn + ( mnRows - 1 ) * mnColumns + 1;
+ sal_uInt16 nCol1 = nColumn + 1;
+ sal_uInt16 nCol2 = nColumn + ( mnRows - 1 ) * mnColumns + 1;
Color aColor( GetItemColor( nCol1 ) );
Color aDiffColor( CalcDifferenceColor( nCol1, nCol2, mnRows - 1 ) );
- for( USHORT i = nCol1 + mnColumns; i < nCol2; i = i + mnColumns )
+ for( sal_uInt16 i = nCol1 + mnColumns; i < nCol2; i = i + mnColumns )
{
aColor.SetRed( aColor.GetRed() + aDiffColor.GetRed() );
aColor.SetGreen( aColor.GetGreen() + aDiffColor.GetGreen() );
@@ -440,13 +440,13 @@ void ColorMixingControl::FillColumn( USHORT nColumn )
}
// -----------------------------------------------------------------------
-void ColorMixingControl::SetRows( USHORT nRows )
+void ColorMixingControl::SetRows( sal_uInt16 nRows )
{
mnRows = nRows;
}
// -----------------------------------------------------------------------
-void ColorMixingControl::SetColumns( USHORT nColumns )
+void ColorMixingControl::SetColumns( sal_uInt16 nColumns )
{
mnColumns = nColumns;
}
@@ -457,8 +457,8 @@ void ColorMixingControl::SetColor( CMCPosition ePos, const Color& rCol )
if( rCol != maColor[ ePos ] )
{
maColor[ ePos ] = rCol;
- USHORT nPos = 0;
- USHORT nColumn = 0;
+ sal_uInt16 nPos = 0;
+ sal_uInt16 nColumn = 0;
String aStr( GetRGBString( rCol ) );
switch( ePos )
@@ -489,7 +489,7 @@ void ColorMixingControl::SetColor( CMCPosition ePos, const Color& rCol )
SetItemText( nPos, aStr );
FillColumn( nColumn );
- for( USHORT i = 0; i < mnRows; i++ )
+ for( sal_uInt16 i = 0; i < mnRows; i++ )
FillRow( i );
}
}
@@ -509,7 +509,7 @@ String ColorMixingControl::GetRGBString( const Color& rColor )
CMCPosition ColorMixingControl::GetCMCPosition() const
{
CMCPosition ePos = CMC_OTHER;
- USHORT nPos = GetSelectItemId();
+ sal_uInt16 nPos = GetSelectItemId();
if( nPos == 1 )
ePos = CMC_TOPLEFT;
@@ -543,8 +543,8 @@ CMCPosition ColorMixingControl::GetCMCPosition() const
ColorHSB::ColorHSB( const Color& rColor )
{
- UINT8 c[3];
- UINT8 cMax, cMin;
+ sal_uInt8 c[3];
+ sal_uInt8 cMax, cMin;
c[0] = rColor.GetRed();
c[1] = rColor.GetGreen();
@@ -565,7 +565,7 @@ ColorHSB::ColorHSB( const Color& rColor )
if( c[2] < cMin )
cMin = c[2];
- UINT8 cDelta = cMax - cMin;
+ sal_uInt8 cDelta = cMax - cMin;
// Saturation = max - min / max
if( mnBri > 0 )
@@ -597,7 +597,7 @@ ColorHSB::ColorHSB( const Color& rColor )
if( dHue < 0.0 )
dHue += 360.0;
- mnHue = (UINT16) dHue;
+ mnHue = (sal_uInt16) dHue;
}
}
@@ -612,8 +612,8 @@ ColorHSB::ColorHSB( const Color& rColor )
Color ColorHSB::GetRGB() const
{
- UINT8 cR,cG,cB;
- UINT8 nB = (UINT8) ( mnBri * 255 / 100 );
+ sal_uInt8 cR,cG,cB;
+ sal_uInt8 nB = (sal_uInt8) ( mnBri * 255 / 100 );
if( mnSat == 0 )
{
@@ -625,20 +625,20 @@ Color ColorHSB::GetRGB() const
{
double dH = mnHue;
double f;
- UINT16 n;
+ sal_uInt16 n;
if( dH == 360.0 )
dH = 0.0;
dH /= 60.0;
- n = (UINT16) dH;
+ n = (sal_uInt16) dH;
f = dH - n;
// #107375# Doing the calculation completely in floating
// point, the former optimization gave sometimes negative
// results for c and was pointless anyway
- UINT8 a = static_cast<UINT8>( nB * ( 100.0 - mnSat ) / 100.0 );
- UINT8 b = static_cast<UINT8>( nB * ( 100.0 - mnSat * f ) / 100.0 );
- UINT8 c = static_cast<UINT8>( nB * ( 100.0 - mnSat * ( 1.0 - f ) ) / 100.0 );
+ sal_uInt8 a = static_cast<sal_uInt8>( nB * ( 100.0 - mnSat ) / 100.0 );
+ sal_uInt8 b = static_cast<sal_uInt8>( nB * ( 100.0 - mnSat * f ) / 100.0 );
+ sal_uInt8 c = static_cast<sal_uInt8>( nB * ( 100.0 - mnSat * ( 1.0 - f ) ) / 100.0 );
switch( n )
{
@@ -678,11 +678,11 @@ ColorCMYK::ColorCMYK( const Color& rColor )
Color ColorCMYK::GetRGB() const
{
int nTmp = Max( 0, 255 - ( mnCyan + mnKey ) );
- UINT8 cR = (UINT8) nTmp;
+ sal_uInt8 cR = (sal_uInt8) nTmp;
nTmp = Max( 0, 255 - ( mnMagenta + mnKey ) );
- UINT8 cG = (UINT8) nTmp;
+ sal_uInt8 cG = (sal_uInt8) nTmp;
nTmp = Max( 0, 255 - ( mnYellow + mnKey ) );
- UINT8 cB = (UINT8) nTmp;
+ sal_uInt8 cB = (sal_uInt8) nTmp;
return( Color( cR, cG, cB ) );
}
diff --git a/svtools/source/dialogs/colrdlg.cxx b/svtools/source/dialogs/colrdlg.cxx
index a52cc4b0834c..fa494b05b2ab 100644
--- a/svtools/source/dialogs/colrdlg.cxx
+++ b/svtools/source/dialogs/colrdlg.cxx
@@ -160,7 +160,7 @@ const Color& SvColorDialog::GetColor() const
// -----------------------------------------------------------------------
IMPL_LINK( SvColorDialog, ColorModifyHdl, void *, p )
{
- UINT16 n = 0x00; // 1 == RGB, 2 == CMYK, 4 == HSB
+ sal_uInt16 n = 0x00; // 1 == RGB, 2 == CMYK, 4 == HSB
if( p == &maCtlColor )
{
@@ -173,19 +173,19 @@ IMPL_LINK( SvColorDialog, ColorModifyHdl, void *, p )
}
else if( p == &maNumRed )
{
- maColor.SetRed( (UINT8)maNumRed.GetValue() );
+ maColor.SetRed( (sal_uInt8)maNumRed.GetValue() );
maCtlColor.SetColor( maColor );
n = 6;
}
else if( p == &maNumGreen )
{
- maColor.SetGreen( (UINT8)maNumGreen.GetValue() );
+ maColor.SetGreen( (sal_uInt8)maNumGreen.GetValue() );
maCtlColor.SetColor( maColor );
n = 6;
}
else if( p == &maNumBlue )
{
- maColor.SetBlue( (UINT8)maNumBlue.GetValue() );
+ maColor.SetBlue( (sal_uInt8)maNumBlue.GetValue() );
maCtlColor.SetColor( maColor );
n = 6;
}
@@ -194,9 +194,9 @@ IMPL_LINK( SvColorDialog, ColorModifyHdl, void *, p )
p == &maNumLuminance )
{
- ColorHSB aColorHSB( (UINT16) maNumHue.GetValue(),
- (UINT16) maNumSaturation.GetValue(),
- (UINT16) maNumLuminance.GetValue() );
+ ColorHSB aColorHSB( (sal_uInt16) maNumHue.GetValue(),
+ (sal_uInt16) maNumSaturation.GetValue(),
+ (sal_uInt16) maNumLuminance.GetValue() );
maCtlColor.SetColor( aColorHSB );
maColor = maCtlColor.GetColor();
n = 3;
@@ -211,10 +211,10 @@ IMPL_LINK( SvColorDialog, ColorModifyHdl, void *, p )
long aYellow = (long) ( (double)maNumYellow.GetValue() * 255.0 / 100.0 + 0.5 );
long aKey = (long) ( (double)maNumKey.GetValue() * 255.0 / 100.0 + 0.5 );
- ColorCMYK aColorCMYK( (UINT16) aCyan,
- (UINT16) aMagenta,
- (UINT16) aYellow,
- (UINT16) aKey );
+ ColorCMYK aColorCMYK( (sal_uInt16) aCyan,
+ (sal_uInt16) aMagenta,
+ (sal_uInt16) aYellow,
+ (sal_uInt16) aKey );
maColor = aColorCMYK.GetRGB();
maCtlColor.SetColor( maColor );
n = 5;
@@ -274,7 +274,7 @@ IMPL_LINK( SvColorDialog, ClickBtnHdl, void *, p )
}
else if( p == &maBtn2 )
{
- USHORT nPos = maColMixCtrl.GetSelectItemId();
+ sal_uInt16 nPos = maColMixCtrl.GetSelectItemId();
maColor = maColMixCtrl.GetItemColor( nPos );
maCtlColor.SetColor( maColor );
ColorModifyHdl( &maCtlColor );
@@ -286,7 +286,7 @@ IMPL_LINK( SvColorDialog, ClickBtnHdl, void *, p )
// -----------------------------------------------------------------------
IMPL_LINK( SvColorDialog, ClickMixCtrlHdl, void *, EMPTYARG )
{
- USHORT nPos = maColMixCtrl.GetSelectItemId();
+ sal_uInt16 nPos = maColMixCtrl.GetSelectItemId();
CMCPosition ePos = maColMixCtrl.GetCMCPosition();
if( ePos != CMC_OTHER )
@@ -304,12 +304,12 @@ IMPL_LINK( SvColorDialog, ClickMixCtrlHdl, void *, EMPTYARG )
// -----------------------------------------------------------------------
IMPL_LINK( SvColorDialog, SelectMixCtrlHdl, void *, EMPTYARG )
{
- //USHORT nPos = maColMixCtrl.GetSelectItemId();
+ //sal_uInt16 nPos = maColMixCtrl.GetSelectItemId();
//maFtRGB.SetText( maColMixCtrl.GetItemText( nPos ) );
CMCPosition ePos = maColMixCtrl.GetCMCPosition();
if( ePos == CMC_OTHER )
- maBtn1.Enable( FALSE );
+ maBtn1.Enable( sal_False );
else
maBtn1.Enable();
diff --git a/svtools/source/dialogs/colrdlg.hrc b/svtools/source/dialogs/colrdlg.hrc
index 41329df6e366..b1e785bd2f17 100644
--- a/svtools/source/dialogs/colrdlg.hrc
+++ b/svtools/source/dialogs/colrdlg.hrc
@@ -65,3 +65,5 @@
#define BTN_CANCEL 1
#define BTN_HELP 1
+//IAccessibility2 Implementation 2009-----
+#define STR_COLORDES 3001
diff --git a/svtools/source/dialogs/colrdlg.src b/svtools/source/dialogs/colrdlg.src
index a93642b0bd05..fee6314b28cc 100644
--- a/svtools/source/dialogs/colrdlg.src
+++ b/svtools/source/dialogs/colrdlg.src
@@ -277,45 +277,19 @@ ModalDialog DLG_COLOR
Border = TRUE ;
Pos = MAP_APPFONT ( 200 , 109 ) ;
Size = MAP_APPFONT ( 26 , 51 + DIFF ) ;
- TabStop = TRUE ;
+ TabStop = FALSE ;
};
Control CTL_PREVIEW
{
Border = TRUE ;
Pos = MAP_APPFONT ( 229 , 109 ) ;
Size = MAP_APPFONT ( 26 , 51 + DIFF ) ;
- TabStop = TRUE ;
+ TabStop = FALSE ;
};
};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+String STR_COLORDES
+{
+ Text [ en-US ] = "RGB(%1, %2, %3) Hue:%4 Saturation:%5 Brightness:%6";
+};
diff --git a/svtools/source/dialogs/filedlg.cxx b/svtools/source/dialogs/filedlg.cxx
index de465b34e1c6..d0f86867686a 100644
--- a/svtools/source/dialogs/filedlg.cxx
+++ b/svtools/source/dialogs/filedlg.cxx
@@ -31,7 +31,7 @@
#include <svtools/filedlg.hxx>
#include <filedlg2.hxx>
-PathDialog::PathDialog( Window* _pParent, WinBits nStyle, BOOL bCreateDir ) :
+PathDialog::PathDialog( Window* _pParent, WinBits nStyle, sal_Bool bCreateDir ) :
ModalDialog( _pParent, WB_STDMODAL | nStyle )
{
pImpFileDlg = new ImpSvFileDlg;
@@ -70,7 +70,7 @@ long PathDialog::OK()
if( aOKHdlLink.IsSet() )
return aOKHdlLink.Call( this );
else
- return TRUE;
+ return sal_True;
}
@@ -80,7 +80,7 @@ FileDialog::FileDialog( Window* _pParent, WinBits nStyle ) :
// Dadurch dass hier bei VCL nicht der CTOR mit ResType verwendet wird,
// wurde im PathDialog-CTOR leider ein ImpPathDialog angelegt...
// So zwar scheisse, aber der Dialog ist eh' nur ein Hack:
- pImpFileDlg->CreateDialog( this, nStyle, WINDOW_FILEDIALOG, FALSE );
+ pImpFileDlg->CreateDialog( this, nStyle, WINDOW_FILEDIALOG, sal_False );
}
FileDialog::~FileDialog()
@@ -122,17 +122,17 @@ void FileDialog::FilterSelect()
aFilterHdlLink.Call( this );
}
-USHORT FileDialog::GetFilterCount() const
+sal_uInt16 FileDialog::GetFilterCount() const
{
return ((ImpFileDialog*)pImpFileDlg->GetDialog())->GetFilterCount();
}
-UniString FileDialog::GetFilterName( USHORT nPos ) const
+UniString FileDialog::GetFilterName( sal_uInt16 nPos ) const
{
return ((ImpFileDialog*)pImpFileDlg->GetDialog())->GetFilterName( nPos );
}
-UniString FileDialog::GetFilterType( USHORT nPos ) const
+UniString FileDialog::GetFilterType( sal_uInt16 nPos ) const
{
return ((ImpFileDialog*)pImpFileDlg->GetDialog())->GetFilterType( nPos );
}
diff --git a/svtools/source/dialogs/filedlg2.cxx b/svtools/source/dialogs/filedlg2.cxx
index a2c68270ed81..6e6fd4fd2e84 100644
--- a/svtools/source/dialogs/filedlg2.cxx
+++ b/svtools/source/dialogs/filedlg2.cxx
@@ -73,9 +73,9 @@ DECLARE_LIST( UniStringList, UniString* )
p->Show();
-inline BOOL IsPrintable( sal_Unicode c )
+inline sal_Bool IsPrintable( sal_Unicode c )
{
- return c >= 32 && c != 127 ? TRUE : FALSE;
+ return c >= 32 && c != 127 ? sal_True : sal_False;
}
long
@@ -88,10 +88,10 @@ KbdListBox::PreNotify( NotifyEvent& rNEvt )
if ( IsPrintable ( cCharCode ) )
{
- USHORT nCurrentPos = GetSelectEntryPos();
- USHORT nEntries = GetEntryCount();
+ sal_uInt16 nCurrentPos = GetSelectEntryPos();
+ sal_uInt16 nEntries = GetEntryCount();
- for ( USHORT i = 1; i < nEntries; i++ )
+ for ( sal_uInt16 i = 1; i < nEntries; i++ )
{
UniString aEntry = GetEntry ( (i + nCurrentPos) % nEntries );
aEntry.EraseLeadingChars( ' ' );
@@ -116,7 +116,7 @@ KbdListBox::PreNotify( NotifyEvent& rNEvt )
return ListBox::PreNotify ( rNEvt );
}
-ImpPathDialog::ImpPathDialog( PathDialog* pDlg, RESOURCE_TYPE nType, BOOL bCreateDir )
+ImpPathDialog::ImpPathDialog( PathDialog* pDlg, RESOURCE_TYPE nType, sal_Bool bCreateDir )
{
pSvPathDialog = pDlg;
nDirCount = 0;
@@ -287,14 +287,14 @@ IMPL_LINK( ImpPathDialog, SelectHdl, ListBox *, p )
UniString aEntry( pDirList->GetSelectEntry() );
aEntry.EraseLeadingChars( ' ' );
- USHORT nPos = aEntry.Search( '/' );
+ sal_uInt16 nPos = aEntry.Search( '/' );
aEntry.Erase( nPos );
// build the absolute path to the selected item
DirEntry aNewPath;
aNewPath.ToAbs();
- USHORT nCurPos = pDirList->GetSelectEntryPos();
+ sal_uInt16 nCurPos = pDirList->GetSelectEntryPos();
// Wird nach oben gewechselt
if( nCurPos < nDirCount )
@@ -321,7 +321,7 @@ IMPL_LINK( ImpPathDialog, ClickHdl, Button*, pBtn )
// Ja, dann kompletten Pfad mit Filenamen merken und Dialog beenden
aPath = aFile;
aPath.ToAbs();
- GetPathDialog()->EndDialog( TRUE );
+ GetPathDialog()->EndDialog( sal_True );
}
else
{
@@ -338,7 +338,7 @@ IMPL_LINK( ImpPathDialog, ClickHdl, Button*, pBtn )
else
if ( pBtn == pCancelBtn )
{
- GetPathDialog()->EndDialog( FALSE );
+ GetPathDialog()->EndDialog( sal_False );
}
else
if ( pBtn == pHomeBtn )
@@ -380,7 +380,7 @@ IMPL_LINK( ImpPathDialog, DblClickHdl, ListBox*, pBox )
UniString aEntry( pBox->GetSelectEntry() );
aEntry.EraseLeadingChars( ' ' );
- USHORT nPos = aEntry.Search( '/' );
+ sal_uInt16 nPos = aEntry.Search( '/' );
aEntry.Erase( nPos );
// build the absolute path to the selected item
@@ -388,7 +388,7 @@ IMPL_LINK( ImpPathDialog, DblClickHdl, ListBox*, pBox )
aNewPath.ToAbs();
if( pBox == pDirList )
{
- USHORT nCurPos = pDirList->GetSelectEntryPos();
+ sal_uInt16 nCurPos = pDirList->GetSelectEntryPos();
// Wenn es schon das aktuelle ist, dann mache nichts
if( nCurPos == nDirCount-1 )
@@ -409,22 +409,22 @@ IMPL_LINK( ImpPathDialog, DblClickHdl, ListBox*, pBox )
{
// Neuen Pfad setzen und Listboxen updaten
aPath = aNewPath;
- if( !aPath.SetCWD( TRUE ) )
+ if( !aPath.SetCWD( sal_True ) )
{
ErrorBox aBox( GetPathDialog(),
WB_OK_CANCEL | WB_DEF_OK,
UniString( SvtResId( STR_FILEDLG_CANTCHDIR ) ) );
if( aBox.Execute() == RET_CANCEL )
- GetPathDialog()->EndDialog( FALSE );
+ GetPathDialog()->EndDialog( sal_False );
}
- UpdateEntries( TRUE );
+ UpdateEntries( sal_True );
}
pSvPathDialog->LeaveWait();
return 0;
}
-void ImpPathDialog::UpdateEntries( const BOOL )
+void ImpPathDialog::UpdateEntries( const sal_Bool )
{
UniString aTabString;
DirEntry aTmpPath;
@@ -432,10 +432,10 @@ void ImpPathDialog::UpdateEntries( const BOOL )
nDirCount = aTmpPath.Level();
- pDirList->SetUpdateMode( FALSE );
+ pDirList->SetUpdateMode( sal_False );
pDirList->Clear();
- for( USHORT i = nDirCount; i > 0; i-- )
+ for( sal_uInt16 i = nDirCount; i > 0; i-- )
{
UniString aName( aTabString );
aName += aTmpPath[i-1].GetName();
@@ -449,11 +449,11 @@ void ImpPathDialog::UpdateEntries( const BOOL )
Dir aDir( aCurrent, FSYS_KIND_DIR|FSYS_KIND_FILE );
- USHORT nEntries = aDir.Count();
+ sal_uInt16 nEntries = aDir.Count();
if( nEntries )
{
UniStringList aSortDirList;
- for ( USHORT n = 0; n < nEntries; n++ )
+ for ( sal_uInt16 n = 0; n < nEntries; n++ )
{
DirEntry& rEntry = aDir[n];
UniString aName( rEntry.GetName() );
@@ -461,7 +461,7 @@ void ImpPathDialog::UpdateEntries( const BOOL )
{
if( FileStat( rEntry ).GetKind() & FSYS_KIND_DIR )
{
- ULONG l = 0;
+ sal_uLong l = 0;
if( xCollator.is() )
{
for( l = 0; l < aSortDirList.Count(); l++ )
@@ -473,7 +473,7 @@ void ImpPathDialog::UpdateEntries( const BOOL )
}
}
- for( ULONG l = 0; l < aSortDirList.Count(); l++ )
+ for( sal_uLong l = 0; l < aSortDirList.Count(); l++ )
{
UniString aEntryStr( aTabString );
aEntryStr += *aSortDirList.GetObject(l);
@@ -491,7 +491,7 @@ void ImpPathDialog::UpdateDirs( const DirEntry& rTmpPath )
pDirList->SetTopEntry( nDirCount > 1
? nDirCount - 2
: nDirCount - 1 );
- pDirList->SetUpdateMode( TRUE );
+ pDirList->SetUpdateMode( sal_True );
pDirList->Invalidate();
pDirList->Update();
@@ -502,10 +502,10 @@ void ImpPathDialog::UpdateDirs( const DirEntry& rTmpPath )
pEdit->SetText( aDirName );
}
-BOOL ImpPathDialog::IsFileOk( const DirEntry& rDirEntry )
+sal_Bool ImpPathDialog::IsFileOk( const DirEntry& rDirEntry )
{
if( FileStat( rDirEntry ).GetKind() & (FSYS_KIND_WILD | FSYS_KIND_DEV) )
- return FALSE;
+ return sal_False;
else
{
// Datei vorhanden ?
@@ -519,7 +519,7 @@ BOOL ImpPathDialog::IsFileOk( const DirEntry& rDirEntry )
if( aQuery.Execute() == RET_YES )
rDirEntry.MakeDir();
else
- return FALSE;
+ return sal_False;
}
if( !FileStat( rDirEntry ).IsKind( FSYS_KIND_DIR ) )
{
@@ -529,7 +529,7 @@ BOOL ImpPathDialog::IsFileOk( const DirEntry& rDirEntry )
aBoxText.AppendAscii( "]" );
InfoBox aBox( GetPathDialog(), aBoxText );
aBox.Execute();
- return FALSE;
+ return sal_False;
}
}
return GetPathDialog()->OK() != 0;
@@ -539,8 +539,8 @@ BOOL ImpPathDialog::IsFileOk( const DirEntry& rDirEntry )
void ImpPathDialog::PreExecute()
{
// Neues Verzeichnis setzen und Listboxen updaten
- aPath.SetCWD( TRUE );
- UpdateEntries( TRUE );
+ aPath.SetCWD( sal_True );
+ UpdateEntries( sal_True );
// Zusaetzliche Buttons anordnen
Point aPos;
@@ -563,8 +563,8 @@ void ImpPathDialog::PreExecute()
long nMaxWidth = 0;
// Maximale Breite ermitteln
- USHORT nChilds = GetPathDialog()->GetChildCount();
- USHORT n;
+ sal_uInt16 nChilds = GetPathDialog()->GetChildCount();
+ sal_uInt16 n;
for ( n = nOwnChilds; n < nChilds; n++ )
{
Window* pChild = GetPathDialog()->GetChild( n );
@@ -624,11 +624,11 @@ void ImpPathDialog::PreExecute()
DirEntry aTmpDirEntry;
Dir aDir( aTmpDirEntry, FSYS_KIND_BLOCK );
- USHORT nCount = aDir.Count(), i;
+ sal_uInt16 nCount = aDir.Count(), i;
for( i = 0; i < nCount; ++i )
{
DirEntry& rEntry = aDir[i];
- UniString aStr = rEntry.GetFull( FSYS_STYLE_HOST, FALSE );
+ UniString aStr = rEntry.GetFull( FSYS_STYLE_HOST, sal_False );
UniString aVolume = rEntry.GetVolume() ;
aStr.ToUpperAscii();
@@ -674,8 +674,8 @@ void ImpPathDialog::SetPath( UniString const & rPath )
// Neue Maske und neues Verzeichnis setzen, und Listboxen updaten
pEdit->SetText( rPath );
- aFile.SetCWD( TRUE );
- UpdateEntries( TRUE );
+ aFile.SetCWD( sal_True );
+ UpdateEntries( sal_True );
pSvPathDialog->LeaveWait();
}
@@ -697,7 +697,7 @@ UniString ImpPathDialog::GetPath() const
ImpFileDialog::ImpFileDialog( PathDialog* pDlg, WinBits nWinBits, RESOURCE_TYPE nType ) :
- ImpPathDialog( pDlg, nType, FALSE )
+ ImpPathDialog( pDlg, nType, sal_False )
{
bOpen = (nWinBits & WB_SAVEAS) == 0;
@@ -838,7 +838,7 @@ IMPL_LINK( ImpFileDialog, DblClickHdl, ListBox *, pBox )
UniString aEntry( pBox->GetSelectEntry() );
aEntry.EraseLeadingChars( ' ' );
- USHORT nPos = aEntry.Search( '/' );
+ sal_uInt16 nPos = aEntry.Search( '/' );
aEntry.Erase( nPos );
// build the absolute path to the selected item
@@ -848,7 +848,7 @@ IMPL_LINK( ImpFileDialog, DblClickHdl, ListBox *, pBox )
if( ( pDirList != pFileList ) && ( pBox == pDirList ) )
{
// SVLOOK
- USHORT nCurPos = pDirList->GetSelectEntryPos();
+ sal_uInt16 nCurPos = pDirList->GetSelectEntryPos();
// Wenn es schon das aktuelle ist, dann mache nichts
if( nCurPos == nDirCount-1 )
@@ -877,7 +877,7 @@ IMPL_LINK( ImpFileDialog, DblClickHdl, ListBox *, pBox )
{
// dann kompletten Pfad mit Filenamen merken und Dialog beenden
aPath = aNewPath;
- GetFileDialog()->EndDialog( TRUE );
+ GetFileDialog()->EndDialog( sal_True );
}
}
@@ -890,23 +890,23 @@ IMPL_LINK( ImpFileDialog, DblClickHdl, ListBox *, pBox )
{
// Neuen Pfad setzen und Listboxen updaten
aPath = aNewPath;
- if( !aPath.SetCWD( TRUE ) )
+ if( !aPath.SetCWD( sal_True ) )
{
if( ErrorBox( GetFileDialog(), WB_OK_CANCEL|WB_DEF_OK,
UniString( SvtResId( STR_FILEDLG_CANTCHDIR ) ) ).Execute() == RET_CANCEL )
{
- GetFileDialog()->EndDialog( FALSE );
+ GetFileDialog()->EndDialog( sal_False );
}
}
- UpdateEntries( TRUE );
+ UpdateEntries( sal_True );
GetFileDialog()->FileSelect();
}
if( pBox == pTypeList )
{
// Neue Maske setzen, und Listboxen updaten
- USHORT nCurPos = pTypeList->GetSelectEntryPos();
- if( nCurPos+1 > (USHORT)aFilterList.Count() )
+ sal_uInt16 nCurPos = pTypeList->GetSelectEntryPos();
+ if( nCurPos+1 > (sal_uInt16)aFilterList.Count() )
aMask = UniString::CreateFromAscii( ALLFILES );
else
{
@@ -918,7 +918,7 @@ IMPL_LINK( ImpFileDialog, DblClickHdl, ListBox *, pBox )
}
pEdit->SetText( aMask() );
- UpdateEntries( FALSE );
+ UpdateEntries( sal_False );
GetFileDialog()->FilterSelect();
}
@@ -939,7 +939,7 @@ IMPL_LINK( ImpFileDialog, ClickHdl, Button*, pBtn )
// Ja, dann kompletten Pfad mit Filenamen merken und Dialog beenden
aPath = aFile;
aPath.ToAbs();
- GetFileDialog()->EndDialog( TRUE );
+ GetFileDialog()->EndDialog( sal_True );
}
else
{
@@ -954,19 +954,19 @@ IMPL_LINK( ImpFileDialog, ClickHdl, Button*, pBtn )
// Neue Maske und neues Verzeichnis setzen, und Listboxen updaten
pEdit->SetText( aMask() );
- aFile.SetCWD( TRUE );
- UpdateEntries( TRUE );
+ aFile.SetCWD( sal_True );
+ UpdateEntries( sal_True );
GetFileDialog()->LeaveWait();
}
}
else if( pBtn == pCancelBtn )
- GetFileDialog()->EndDialog( FALSE );
+ GetFileDialog()->EndDialog( sal_False );
return 0;
}
-void ImpFileDialog::UpdateEntries( const BOOL bWithDirs )
+void ImpFileDialog::UpdateEntries( const sal_Bool bWithDirs )
{
GetFileDialog()->EnterWait();
@@ -977,16 +977,16 @@ void ImpFileDialog::UpdateEntries( const BOOL bWithDirs )
if( pFileList )
{
- pFileList->SetUpdateMode( FALSE );
+ pFileList->SetUpdateMode( sal_False );
pFileList->Clear();
}
if( bWithDirs && (pDirList != pFileList) )
{
- pDirList->SetUpdateMode( FALSE );
+ pDirList->SetUpdateMode( sal_False );
pDirList->Clear();
- for( USHORT i = nDirCount; i > 0; i-- )
+ for( sal_uInt16 i = nDirCount; i > 0; i-- )
{
UniString aEntryStr( aTabString );
aEntryStr += aTmpPath[i-1].GetName();
@@ -1005,10 +1005,10 @@ void ImpFileDialog::UpdateEntries( const BOOL bWithDirs )
DirEntry aCurrent;
aCurrent.ToAbs();
Dir aDir( aCurrent, FSYS_KIND_DIR|FSYS_KIND_FILE );
- USHORT nEntries = aDir.Count();
+ sal_uInt16 nEntries = aDir.Count();
// TempMask, weil Vergleich case-sensitiv
- BOOL bMatchCase = FALSE; //aCurrent.IsCaseSensitive();
+ sal_Bool bMatchCase = sal_False; //aCurrent.IsCaseSensitive();
UniString aWildCard( aMask.GetWildCard() );
if ( !bMatchCase )
aWildCard.ToLowerAscii();
@@ -1016,7 +1016,7 @@ void ImpFileDialog::UpdateEntries( const BOOL bWithDirs )
if ( nEntries )
{
UniStringList aSortDirList;
- for ( USHORT n = 0; n < nEntries; n++ )
+ for ( sal_uInt16 n = 0; n < nEntries; n++ )
{
DirEntry& rEntry = aDir[n];
UniString aName( rEntry.GetName() );
@@ -1045,7 +1045,7 @@ void ImpFileDialog::UpdateEntries( const BOOL bWithDirs )
}
else
{
- ULONG l = 0;
+ sal_uLong l = 0;
if( xCollator.is() )
{
for( l = 0; l < aSortDirList.Count(); l++ )
@@ -1057,7 +1057,7 @@ void ImpFileDialog::UpdateEntries( const BOOL bWithDirs )
}
}
}
- for( ULONG l = 0; l < aSortDirList.Count(); l++ )
+ for( sal_uLong l = 0; l < aSortDirList.Count(); l++ )
{
UniString aEntryStr( aTabString );
aEntryStr += *aSortDirList.GetObject(l);
@@ -1075,7 +1075,7 @@ void ImpFileDialog::UpdateEntries( const BOOL bWithDirs )
pFileList->SelectEntryPos( 1 );
else
pFileList->SetNoSelection();
- pFileList->SetUpdateMode( TRUE );
+ pFileList->SetUpdateMode( sal_True );
pFileList->Invalidate();
pFileList->Update();
}
@@ -1094,14 +1094,14 @@ void ImpFileDialog::UpdateEntries( const BOOL bWithDirs )
GetFileDialog()->LeaveWait();
}
-BOOL ImpFileDialog::IsFileOk( const DirEntry& rDirEntry )
+sal_Bool ImpFileDialog::IsFileOk( const DirEntry& rDirEntry )
{
if( FileStat( rDirEntry ).GetKind() & (FSYS_KIND_WILD | FSYS_KIND_DEV) )
- return FALSE;
+ return sal_False;
if( FileStat( rDirEntry ).GetKind() & FSYS_KIND_DIR )
{
if( pFileList )
- return FALSE;
+ return sal_False;
}
else if( bOpen )
{
@@ -1115,7 +1115,7 @@ BOOL ImpFileDialog::IsFileOk( const DirEntry& rDirEntry )
InfoBox aBox( GetFileDialog(),
aErrorString );
aBox.Execute();
- return FALSE;
+ return sal_False;
}
}
else
@@ -1131,7 +1131,7 @@ BOOL ImpFileDialog::IsFileOk( const DirEntry& rDirEntry )
WinBits( WB_YES_NO | WB_DEF_NO ),
aQueryString );
if( aBox.Execute() != RET_YES )
- return FALSE;
+ return sal_False;
}
}
return GetFileDialog()->OK() != 0;
@@ -1160,9 +1160,9 @@ void ImpFileDialog::SetPath( UniString const & rPath )
pEdit->SetText( rPath );
}
- aFile.SetCWD( TRUE );
+ aFile.SetCWD( sal_True );
- UpdateEntries( TRUE );
+ UpdateEntries( sal_True );
GetFileDialog()->LeaveWait();
}
@@ -1223,7 +1223,7 @@ void ImpFileDialog::SetCurFilter( const UniString& rFilter )
pItem = aFilterList.Next();
if( pItem )
- pTypeList->SelectEntryPos( (USHORT)aFilterList.GetCurPos() );
+ pTypeList->SelectEntryPos( (sal_uInt16)aFilterList.GetCurPos() );
else
pTypeList->SetNoSelection();
}
@@ -1254,7 +1254,7 @@ void ImpFileDialog::PreExecute()
if( pTypeList )
{
- USHORT nCurType = pTypeList->GetSelectEntryPos();
+ sal_uInt16 nCurType = pTypeList->GetSelectEntryPos();
if( nCurType < aFilterList.Count() )
{
UniString aFilterListMask = aFilterList.GetObject( nCurType )->aMask;
@@ -1294,7 +1294,7 @@ UniString ImpFileDialog::ExtendFileName( DirEntry aEntry ) const
UniString aPostfix; // hier kommt die ausgesuchte Extension herein
// ist ein Filter mit Extension gesetzt?
- USHORT nChosenFilterPos = pTypeList->GetSelectEntryPos();
+ sal_uInt16 nChosenFilterPos = pTypeList->GetSelectEntryPos();
if( nChosenFilterPos != LISTBOX_ENTRY_NOTFOUND )
{
UniString aExtensionMask = GetFileDialog()->GetFilterType( nChosenFilterPos );
@@ -1347,7 +1347,7 @@ UniString ImpFileDialog::ExtendFileName( DirEntry aEntry ) const
}
-void ImpSvFileDlg::CreateDialog( PathDialog* pSvDlg, WinBits nStyle, RESOURCE_TYPE nType, BOOL bCreate )
+void ImpSvFileDlg::CreateDialog( PathDialog* pSvDlg, WinBits nStyle, RESOURCE_TYPE nType, sal_Bool bCreate )
{
delete pDlg;
if ( nType == WINDOW_PATHDIALOG )
diff --git a/svtools/source/dialogs/filedlg2.hxx b/svtools/source/dialogs/filedlg2.hxx
index 4d32565a2775..36214db27d33 100644
--- a/svtools/source/dialogs/filedlg2.hxx
+++ b/svtools/source/dialogs/filedlg2.hxx
@@ -91,10 +91,10 @@ private:
PushButton* pHomeBtn;
PushButton* pNewDirBtn;
- USHORT nOwnChilds;
+ sal_uInt16 nOwnChilds;
DirEntry aPath; // aktuell angewaehlter Pfad
- USHORT nDirCount; // Anzahl der Verzeichnis-
+ sal_uInt16 nDirCount; // Anzahl der Verzeichnis-
// Verschachtelungen
::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCollator >
@@ -102,10 +102,10 @@ private:
protected:
- virtual void UpdateEntries( const BOOL bWithDirs );
+ virtual void UpdateEntries( const sal_Bool bWithDirs );
void UpdateDirs( const DirEntry& rTmpPath );
- BOOL IsFileOk( const DirEntry& rDirEntry );
+ sal_Bool IsFileOk( const DirEntry& rDirEntry );
void InitControls();
DECL_LINK( SelectHdl, ListBox * );
@@ -113,7 +113,7 @@ protected:
DECL_LINK( ClickHdl, Button * );
public:
- ImpPathDialog( PathDialog* pDlg, RESOURCE_TYPE nType, BOOL bCreateDir );
+ ImpPathDialog( PathDialog* pDlg, RESOURCE_TYPE nType, sal_Bool bCreateDir );
virtual ~ImpPathDialog();
virtual void SetPath( const String& rPath );
@@ -142,9 +142,9 @@ private:
WildCard aMask; // aktuelle Maske
ImpFilterList aFilterList; // Filterliste
- USHORT nCurFilter; // aktueller Filter
+ sal_uInt16 nCurFilter; // aktueller Filter
- BOOL bOpen; // TRUE = Open; FALSE = SAVEAS
+ sal_Bool bOpen; // sal_True = Open; sal_False = SAVEAS
protected:
void InitControls();
@@ -155,8 +155,8 @@ protected:
DECL_LINK( DblClickHdl, ListBox * );
DECL_LINK( ClickHdl, Button * );
- virtual void UpdateEntries( const BOOL bWithDirs );
- BOOL IsFileOk( const DirEntry& rDirEntry );
+ virtual void UpdateEntries( const sal_Bool bWithDirs );
+ sal_Bool IsFileOk( const DirEntry& rDirEntry );
public:
ImpFileDialog( PathDialog* pDlg, WinBits nStyle, RESOURCE_TYPE nType );
@@ -168,9 +168,9 @@ public:
void SetCurFilter( const String& rFilter );
String GetCurFilter() const;
- USHORT GetFilterCount() const { return (USHORT)aFilterList.Count(); }
- inline String GetFilterName( USHORT nPos ) const;
- inline String GetFilterType( USHORT nPos ) const;
+ sal_uInt16 GetFilterCount() const { return (sal_uInt16)aFilterList.Count(); }
+ inline String GetFilterName( sal_uInt16 nPos ) const;
+ inline String GetFilterType( sal_uInt16 nPos ) const;
virtual void SetPath( const String& rPath );
virtual void SetPath( const Edit& rEdit );
@@ -181,7 +181,7 @@ public:
FileDialog* GetFileDialog() const { return (FileDialog*)GetPathDialog(); }
};
-inline String ImpFileDialog::GetFilterName( USHORT nPos ) const
+inline String ImpFileDialog::GetFilterName( sal_uInt16 nPos ) const
{
String aName;
ImpFilterItem* pItem = aFilterList.GetObject( nPos );
@@ -190,7 +190,7 @@ inline String ImpFileDialog::GetFilterName( USHORT nPos ) const
return aName;
}
-inline String ImpFileDialog::GetFilterType( USHORT nPos ) const
+inline String ImpFileDialog::GetFilterType( sal_uInt16 nPos ) const
{
String aFilterMask;
ImpFilterItem* pItem = aFilterList.GetObject( nPos );
@@ -209,7 +209,7 @@ public:
~ImpSvFileDlg() { delete pDlg; }
ImpPathDialog* GetDialog() const { return pDlg; }
- void CreateDialog( PathDialog* pCreateFrom, WinBits nStyle, RESOURCE_TYPE nType, BOOL bCreate );
+ void CreateDialog( PathDialog* pCreateFrom, WinBits nStyle, RESOURCE_TYPE nType, sal_Bool bCreate );
void SetOkButtonText( const String& rText ) { pDlg->SetOkButtonText( rText ); } // ihr habts ja nicht anders gewollt
void SetCancelButtonText( const String& rText ) { pDlg->SetCancelButtonText( rText ); }
diff --git a/svtools/source/dialogs/insdlg.cxx b/svtools/source/dialogs/insdlg.cxx
index 0dd30ebdab89..605f9ed5db07 100644
--- a/svtools/source/dialogs/insdlg.cxx
+++ b/svtools/source/dialogs/insdlg.cxx
@@ -77,7 +77,7 @@ PRV_SV_IMPL_OWNER_LIST( SvObjectServerList, SvObjectServer )
*************************************************************************/
const SvObjectServer * SvObjectServerList::Get( const String & rHumanName ) const
{
- for( ULONG i = 0; i < Count(); i++ )
+ for( sal_uLong i = 0; i < Count(); i++ )
{
if( rHumanName == GetObject( i ).GetHumanName() )
return &GetObject( i );
@@ -92,7 +92,7 @@ const SvObjectServer * SvObjectServerList::Get( const String & rHumanName ) cons
*************************************************************************/
const SvObjectServer * SvObjectServerList::Get( const SvGlobalName & rName ) const
{
- for( ULONG i = 0; i < Count(); i++ )
+ for( sal_uLong i = 0; i < Count(); i++ )
{
if( rName == GetObject( i ).GetClassName() )
return &GetObject( i );
@@ -238,7 +238,7 @@ String SvPasteObjectHelper::GetSotFormatUIName( SotFormatStringId nId )
struct SotResourcePair
{
SotFormatStringId mnSotId;
- USHORT mnResId;
+ sal_uInt16 mnResId;
};
static const SotResourcePair aSotResourcePairs[] =
@@ -312,7 +312,7 @@ String SvPasteObjectHelper::GetSotFormatUIName( SotFormatStringId nId )
};
String aUIName;
- USHORT nResId = 0;
+ sal_uInt16 nResId = 0;
for( sal_uInt32 i = 0, nCount = sizeof( aSotResourcePairs ) / sizeof( aSotResourcePairs[ 0 ] ); ( i < nCount ) && !nResId; i++ )
{
diff --git a/svtools/source/dialogs/mcvmath.cxx b/svtools/source/dialogs/mcvmath.cxx
index d07c41acba04..d98493114fd3 100644
--- a/svtools/source/dialogs/mcvmath.cxx
+++ b/svtools/source/dialogs/mcvmath.cxx
@@ -99,11 +99,11 @@ FixCpx ImpMultBig2( const FixCpx& ra, const FixCpx& rb )
|*
**************************************************************************/
-USHORT ImpSqrt( ULONG nRadi )
+sal_uInt16 ImpSqrt( sal_uLong nRadi )
{
- register ULONG inf = 1;
- register ULONG sup = nRadi;
- register ULONG sqr;
+ register sal_uLong inf = 1;
+ register sal_uLong sup = nRadi;
+ register sal_uLong sqr;
if ( !nRadi )
return 0;
@@ -118,7 +118,7 @@ USHORT ImpSqrt( ULONG nRadi )
sqr = (nRadi/sqr + sqr) >> 1; // 2 Newton-Iterationen reichen fuer
sqr = (nRadi/sqr + sqr) >> 1; // +- 1 Digit
- return sal::static_int_cast< USHORT >(sqr);
+ return sal::static_int_cast< sal_uInt16 >(sqr);
}
/**************************************************************************
@@ -133,7 +133,7 @@ USHORT ImpSqrt( ULONG nRadi )
// e**(i*nPhi), Einheit nPhi: 2**16 == 360 Grad
-FixCpx ImpExPI( USHORT nPhi )
+FixCpx ImpExPI( sal_uInt16 nPhi )
{
short i;
FixCpx aIter(1L); // e**(0*i)
@@ -165,10 +165,10 @@ FixCpx ImpExPI( USHORT nPhi )
// use for x*x+y*y==1 only
-static USHORT ImpATanx2( const Fix& rX, const Fix& rY )
+static sal_uInt16 ImpATanx2( const Fix& rX, const Fix& rY )
{
- USHORT phi0 = 0; // result angel higher part
- USHORT phi = 0; // dito lower part
+ sal_uInt16 phi0 = 0; // result angel higher part
+ sal_uInt16 phi = 0; // dito lower part
long x = rX.x;
long y = rY.x;
long z;
@@ -177,7 +177,7 @@ static USHORT ImpATanx2( const Fix& rX, const Fix& rY )
FixCpx aTry;
FixCpx aInc;
FixCpx aIter(1L);
- BOOL Small = FALSE;
+ sal_Bool Small = sal_False;
if ( (x==0) && (y==0) )
return 0;
@@ -225,7 +225,7 @@ static USHORT ImpATanx2( const Fix& rX, const Fix& rY )
phi += (1<<i);
if ( i > 11 )
- Small=TRUE;
+ Small=sal_True;
}
}
}
@@ -243,9 +243,9 @@ static USHORT ImpATanx2( const Fix& rX, const Fix& rY )
|*
**************************************************************************/
-USHORT ImpATan2( const short x, const short y )
+sal_uInt16 ImpATan2( const short x, const short y )
{
- Fix rRad = ImpSqrt(ULONG(long(x)*x+long(y)*y));
+ Fix rRad = ImpSqrt(sal_uLong(long(x)*x+long(y)*y));
if ( !rRad.x )
return 0;
@@ -267,9 +267,9 @@ USHORT ImpATan2( const short x, const short y )
|*
**************************************************************************/
-void ImpCartToPolar( const short x, const short y, Fix& rRad, USHORT& rPhi )
+void ImpCartToPolar( const short x, const short y, Fix& rRad, sal_uInt16& rPhi )
{
- rRad = Fix( ImpSqrt( ULONG( long(x)*x+long(y)*y ) ) );
+ rRad = Fix( ImpSqrt( sal_uLong( long(x)*x+long(y)*y ) ) );
if ( !rRad.x )
rPhi=0;
@@ -294,7 +294,7 @@ void ImpCartToPolar( const short x, const short y, Fix& rRad, USHORT& rPhi )
|*
**************************************************************************/
-void ImpPolarToCart( const Fix& rR, const USHORT Phi, short& rX, short& rY )
+void ImpPolarToCart( const Fix& rR, const sal_uInt16 Phi, short& rX, short& rY )
{
FixCpx fc = ImpExPI( Phi ); // calculate sin() & cos()
fc.GetReal().MultBig( rR );
diff --git a/svtools/source/dialogs/mcvmath.hxx b/svtools/source/dialogs/mcvmath.hxx
index 67d54fd80cf0..7708a8f1c89a 100644
--- a/svtools/source/dialogs/mcvmath.hxx
+++ b/svtools/source/dialogs/mcvmath.hxx
@@ -83,7 +83,7 @@ public:
Fix() { x=0; }
Fix( int i ) { x=(long(i)<<FIX_POST); }
Fix( short l ) { x=(long(l)<<FIX_POST); }
- Fix( USHORT l ) { x=(long(l)<<FIX_POST); }
+ Fix( sal_uInt16 l ) { x=(long(l)<<FIX_POST); }
Fix( long l ) { x=(l<<FIX_POST); }
Fix( long Z, long N ) { x=(Z<<FIX_POST)/N; }
@@ -101,8 +101,8 @@ public:
void DivBig( const Fix& a )
{ x=((x<<FIX_P3)/a.x)<<FIX_P2; }
- friend BOOL operator> ( const Fix& a, const Fix& b ) { return a.x > b.x; }
- friend BOOL operator< ( const Fix& a, const Fix& b ) { return a.x < b.x; }
+ friend sal_Bool operator> ( const Fix& a, const Fix& b ) { return a.x > b.x; }
+ friend sal_Bool operator< ( const Fix& a, const Fix& b ) { return a.x < b.x; }
operator long() const { return (x+FIX_ADD) >> FIX_POST; }
operator double() const { return double(x)/(1<<FIX_POST); }
@@ -218,11 +218,11 @@ inline FixCpx operator/ ( const FixCpx& a, const FixCpx& b )
Fix ImpMultBig2( const Fix& a, const Fix& b );
FixCpx ImpMultBig2( const FixCpx& ra, const FixCpx& rb );
-void ImpCartToPolar( const short x, const short y, Fix& rRad, USHORT& rPhi );
-void ImpPolarToCart( const Fix& rR, const USHORT Phi, short& rX, short& rY );
+void ImpCartToPolar( const short x, const short y, Fix& rRad, sal_uInt16& rPhi );
+void ImpPolarToCart( const Fix& rR, const sal_uInt16 Phi, short& rX, short& rY );
-USHORT ImpSqrt( ULONG nRadi );
-USHORT ImpATan2( const short x, const short y );
-FixCpx ImpExPI( USHORT nPhi );
+sal_uInt16 ImpSqrt( sal_uLong nRadi );
+sal_uInt16 ImpATan2( const short x, const short y );
+FixCpx ImpExPI( sal_uInt16 nPhi );
#endif // _MCVMATH_HXX
diff --git a/svtools/source/dialogs/prnsetup.cxx b/svtools/source/dialogs/prnsetup.cxx
index ceef2a88642b..12a71a706b60 100644
--- a/svtools/source/dialogs/prnsetup.cxx
+++ b/svtools/source/dialogs/prnsetup.cxx
@@ -61,7 +61,7 @@ void ImplFillPrnDlgListBox( const Printer* pPrinter,
// -----------------------------------------------------------------------
-void ImplFreePrnDlgListBox( ListBox* pBox, BOOL bClear )
+void ImplFreePrnDlgListBox( ListBox* pBox, sal_Bool bClear )
{
if ( bClear )
pBox->Clear();
@@ -149,7 +149,7 @@ static void ImplPrnDlgAddString( XubString& rStr, const XubString& rAddStr )
// -----------------------------------------------------------------------
-static void ImplPrnDlgAddResString( XubString& rStr, USHORT nResId )
+static void ImplPrnDlgAddResString( XubString& rStr, sal_uInt16 nResId )
{
SvtResId aResId( nResId );
XubString aAddStr( aResId );
@@ -161,7 +161,7 @@ static void ImplPrnDlgAddResString( XubString& rStr, USHORT nResId )
XubString ImplPrnDlgGetStatusText( const QueueInfo& rInfo )
{
XubString aStr;
- ULONG nStatus = rInfo.GetStatus();
+ sal_uLong nStatus = rInfo.GetStatus();
// Default-Printer
if ( rInfo.GetPrinterName().Len() &&
@@ -221,7 +221,7 @@ XubString ImplPrnDlgGetStatusText( const QueueInfo& rInfo )
ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_POWER_SAVE );
// Anzahl Jobs
- ULONG nJobs = rInfo.GetJobs();
+ sal_uLong nJobs = rInfo.GetJobs();
if ( nJobs && (nJobs != QUEUE_JOBS_DONTKNOW) )
{
XubString aJobStr( SvtResId( STR_SVT_PRNDLG_JOBCOUNT ) );
@@ -273,7 +273,7 @@ PrinterSetupDialog::PrinterSetupDialog( Window* pWindow ) :
PrinterSetupDialog::~PrinterSetupDialog()
{
- ImplFreePrnDlgListBox( &maLbName, FALSE );
+ ImplFreePrnDlgListBox( &maLbName, sal_False );
delete mpTempPrinter;
}
@@ -378,7 +378,7 @@ short PrinterSetupDialog::Execute()
if ( !mpPrinter || mpPrinter->IsPrinting() || mpPrinter->IsJobActive() )
{
DBG_ERRORFILE( "PrinterSetupDialog::Execute() - No Printer or printer is printing" );
- return FALSE;
+ return sal_False;
}
Printer::updatePrinters();
@@ -391,7 +391,7 @@ short PrinterSetupDialog::Execute()
short nRet = ModalDialog::Execute();
// Wenn Dialog mit OK beendet wurde, dann die Daten updaten
- if ( nRet == TRUE )
+ if ( nRet == sal_True )
{
if ( mpTempPrinter )
mpPrinter->SetPrinterProps( mpTempPrinter );
diff --git a/svtools/source/dialogs/property.cxx b/svtools/source/dialogs/property.cxx
index 3b081ce2f520..140d00d39bb1 100644
--- a/svtools/source/dialogs/property.cxx
+++ b/svtools/source/dialogs/property.cxx
@@ -108,7 +108,7 @@ void SvXPropertyEdit::SetCtrSize(const Size& rSize)
aEdit.SetSizePixel(aSize);
}
-void SvXPropertyEdit::SetLocked(BOOL bLocked)
+void SvXPropertyEdit::SetLocked(sal_Bool bLocked)
{
if(bLocked)
Disable();
@@ -126,9 +126,9 @@ String SvXPropertyEdit::GetProperty() const
return aEdit.GetText();
}
-BOOL SvXPropertyEdit::HasList()
+sal_Bool SvXPropertyEdit::HasList()
{
- return FALSE;
+ return sal_False;
};
@@ -136,7 +136,7 @@ void SvXPropertyEdit::ClearList()
{
return;
}
-void SvXPropertyEdit::InsertEntry( const String&,USHORT )
+void SvXPropertyEdit::InsertEntry( const String&,sal_uInt16 )
{
return;
}
@@ -236,7 +236,7 @@ void SvXPropertyListBox::SetCtrSize(const Size& rSize)
aListBox.SetSizePixel(aSize);
}
-void SvXPropertyListBox::SetLocked(BOOL bLocked)
+void SvXPropertyListBox::SetLocked(sal_Bool bLocked)
{
if(bLocked)
Disable();
@@ -254,9 +254,9 @@ String SvXPropertyListBox::GetProperty()const
return aListBox.GetSelectEntry();
}
-BOOL SvXPropertyListBox::HasList()
+sal_Bool SvXPropertyListBox::HasList()
{
- return TRUE;
+ return sal_True;
}
@@ -265,7 +265,7 @@ void SvXPropertyListBox::ClearList()
aListBox.Clear();
}
-void SvXPropertyListBox::InsertEntry( const String& rString,USHORT nPos)
+void SvXPropertyListBox::InsertEntry( const String& rString,sal_uInt16 nPos)
{
aListBox.InsertEntry(rString,nPos);
}
@@ -345,7 +345,7 @@ SvXPropertyComboBox::SvXPropertyComboBox( Window* pParent, const ResId& rResId)
aComboBox.Show();
}
-void SvXPropertyComboBox::SetLocked(BOOL bLocked)
+void SvXPropertyComboBox::SetLocked(sal_Bool bLocked)
{
if(bLocked)
Disable();
@@ -384,9 +384,9 @@ String SvXPropertyComboBox::GetProperty() const
return aComboBox.GetText();
}
-BOOL SvXPropertyComboBox::HasList()
+sal_Bool SvXPropertyComboBox::HasList()
{
- return TRUE;
+ return sal_True;
}
void SvXPropertyComboBox::ClearList()
@@ -394,7 +394,7 @@ void SvXPropertyComboBox::ClearList()
aComboBox.Clear();
}
-void SvXPropertyComboBox::InsertEntry( const String& rString,USHORT nPos)
+void SvXPropertyComboBox::InsertEntry( const String& rString,sal_uInt16 nPos)
{
aComboBox.InsertEntry(rString,nPos);
}
@@ -446,11 +446,11 @@ SvPropertyLine::SvPropertyLine( Window* pParent,WinBits nWinStyle)
aName(this,WB_BORDER),
pSvXPropertyControl(NULL),
aXButton(this,WB_BORDER),
- bIsLocked(FALSE),
- bIsHyperlink(FALSE)
+ bIsLocked(sal_False),
+ bIsHyperlink(sal_False)
{
- bNeedsRepaint = TRUE;
- bHasXButton = FALSE;
+ bNeedsRepaint = sal_True;
+ bHasXButton = sal_False;
aXButton.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "..." ) ) );
aName.Show();
aXButton.Show();
@@ -465,11 +465,11 @@ SvPropertyLine::SvPropertyLine( Window* pParent,const ResId& rResId )
aName (this,WB_BORDER),
pSvXPropertyControl(NULL),
aXButton (this,WB_BORDER),
- bIsLocked(FALSE),
- bIsHyperlink(FALSE)
+ bIsLocked(sal_False),
+ bIsHyperlink(sal_False)
{
- bNeedsRepaint = TRUE;
- bHasXButton = FALSE;
+ bNeedsRepaint = sal_True;
+ bHasXButton = sal_False;
eKindOfCtr = KOC_UNDEFINED;
aXButton.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "..." ) ) );
aName.Show();
@@ -504,11 +504,11 @@ void SvPropertyLine::Resize()
aName.SetPosPixel(aPos);
aName.SetSizePixel(aSize);
- USHORT nXButtonWidth=0;
+ sal_uInt16 nXButtonWidth=0;
if(bHasXButton)
{
- nXButtonWidth=(USHORT)aSize.Height();
+ nXButtonWidth=(sal_uInt16)aSize.Height();
}
a2Size.Width()=a2Size.Width()-nXButtonWidth;
@@ -530,12 +530,12 @@ void SvPropertyLine::Resize()
}
}
-void SvPropertyLine::SetNeedsRepaint(BOOL bFlag)
+void SvPropertyLine::SetNeedsRepaint(sal_Bool bFlag)
{
bNeedsRepaint=bFlag;
}
-BOOL SvPropertyLine::NeedsRepaint()
+sal_Bool SvPropertyLine::NeedsRepaint()
{
return bNeedsRepaint;
}
@@ -563,22 +563,22 @@ eKindOfControl SvPropertyLine::GetKindOfControl()
void SvPropertyLine::ShowXButton()
{
- bHasXButton=TRUE;
+ bHasXButton=sal_True;
aXButton.Show();
Resize();
}
void SvPropertyLine::HideXButton()
{
- bHasXButton=FALSE;
+ bHasXButton=sal_False;
aXButton.Hide();
Resize();
}
-BOOL SvPropertyLine::IsVisibleXButton()
+sal_Bool SvPropertyLine::IsVisibleXButton()
{
return bHasXButton;
}
-void SvPropertyLine::ShowAsHyperLink(BOOL nFlag)
+void SvPropertyLine::ShowAsHyperLink(sal_Bool nFlag)
{
bIsHyperlink=nFlag;
if(nFlag)
@@ -595,24 +595,24 @@ void SvPropertyLine::ShowAsHyperLink(BOOL nFlag)
}
}
-BOOL SvPropertyLine::IsShownAsHyperlink()
+sal_Bool SvPropertyLine::IsShownAsHyperlink()
{
return bIsHyperlink;
}
-void SvPropertyLine::Locked(BOOL nFlag)
+void SvPropertyLine::Locked(sal_Bool nFlag)
{
bIsLocked=nFlag;
if(pSvXPropertyControl!=NULL)
pSvXPropertyControl->SetLocked(nFlag);
}
-BOOL SvPropertyLine::IsLineLocked()
+sal_Bool SvPropertyLine::IsLineLocked()
{
return bIsLocked;
}
-void SvPropertyLine::SetNameWidth(USHORT nWidth)
+void SvPropertyLine::SetNameWidth(sal_uInt16 nWidth)
{
nNameWidth=nWidth;
Resize();
@@ -687,7 +687,7 @@ SvListBoxForProperties::SvListBoxForProperties( Window* pParent, WinBits nWinSty
nTheNameSize=0;
ListBox aListBox(this,WB_DROPDOWN);
aListBox.SetPosSizePixel(Point(0,0),Size(100,100));
- nRowHeight=(USHORT)aListBox.GetSizePixel().Height();
+ nRowHeight=(sal_uInt16)aListBox.GetSizePixel().Height();
Wallpaper aWall = aPlayGround.GetBackground();
aWall.SetColor( Color( COL_TRANSPARENT ) );
aPlayGround.SetBackground( aWall );
@@ -709,7 +709,7 @@ SvListBoxForProperties::SvListBoxForProperties( Window* pParent, const ResId& rR
nYOffset=0;
ListBox aListBox(this,WB_DROPDOWN);
aListBox.SetPosSizePixel(Point(0,0),Size(100,100));
- nRowHeight=(USHORT)aListBox.GetSizePixel().Height();
+ nRowHeight=(sal_uInt16)aListBox.GetSizePixel().Height();
Wallpaper aWall = aPlayGround.GetBackground();
aWall.SetColor( Color( COL_TRANSPARENT ) );
aPlayGround.SetBackground( aWall );
@@ -727,7 +727,7 @@ SvListBoxForProperties::~SvListBoxForProperties()
void SvListBoxForProperties::Clear()
{
- for(USHORT i=0;i<PLineArray.Count();i++)
+ for(sal_uInt16 i=0;i<PLineArray.Count();i++)
{
SvPropertyLine* pPropLine=PLineArray[i];
@@ -773,19 +773,19 @@ void SvListBoxForProperties::SetController( SvPropertyDataControl *pPDC)
pPropDataControl=pPDC;
}
-USHORT SvListBoxForProperties::CalcVisibleLines()
+sal_uInt16 SvListBoxForProperties::CalcVisibleLines()
{
Size aSize=aPlayGround.GetOutputSizePixel();
- USHORT nResult=0;
+ sal_uInt16 nResult=0;
if(nRowHeight!=0)
- nResult=(USHORT) aSize.Height()/nRowHeight;
+ nResult=(sal_uInt16) aSize.Height()/nRowHeight;
return nResult;
}
void SvListBoxForProperties::UpdateVScroll()
{
- USHORT nLines=CalcVisibleLines();
+ sal_uInt16 nLines=CalcVisibleLines();
aVScroll.SetPageSize(nLines-1);
aVScroll.SetVisibleSize(nLines-1);
aVScroll.SetRange(Range(0,PLineArray.Count()-1));
@@ -795,7 +795,7 @@ void SvListBoxForProperties::UpdateVScroll()
}
else
{
- BOOL bFlag=aVScroll.IsVisible();
+ sal_Bool bFlag=aVScroll.IsVisible();
aVScroll.Show();
if(!bFlag)Resize();
}
@@ -807,7 +807,7 @@ void SvListBoxForProperties::UpdatePosNSize()
{
Point aPos(0,nYOffset);
- for(USHORT i=0; i<PLineArray.Count();i++)
+ for(sal_uInt16 i=0; i<PLineArray.Count();i++)
{
if((PLineArray[i])->NeedsRepaint())
{
@@ -819,7 +819,7 @@ void SvListBoxForProperties::UpdatePosNSize()
(PLineArray[i])->Invalidate();
(PLineArray[i])->Update();
(PLineArray[i])->Show();
- (PLineArray[i])->SetNeedsRepaint(FALSE);
+ (PLineArray[i])->SetNeedsRepaint(sal_False);
}
else
{
@@ -846,21 +846,21 @@ void SvListBoxForProperties::UpdatePlayGround()
long nLines=aVScroll.GetPageSize();
long nDelta=aVScroll.GetDelta();
- USHORT nStart,nEnd;
+ sal_uInt16 nStart,nEnd;
Size aSize=aPlayGround.GetOutputSizePixel();
Point aPEnd;
aPEnd.X()=aSize.Width();
if(nDelta>0)
{
- nStart=(USHORT)(nThumbPos+nLines+1-nDelta);
- nEnd=(USHORT)(nThumbPos+nLines);
+ nStart=(sal_uInt16)(nThumbPos+nLines+1-nDelta);
+ nEnd=(sal_uInt16)(nThumbPos+nLines);
aPos.Y()=(nLines+1-nDelta)*nRowHeight;
}
else
{
- nStart=(USHORT)nThumbPos;
- nEnd=(USHORT)(nThumbPos-nDelta);
+ nStart=(sal_uInt16)nThumbPos;
+ nEnd=(sal_uInt16)(nThumbPos-nDelta);
aPEnd.Y()=(nThumbPos-nDelta)*nRowHeight;;
}
@@ -870,7 +870,7 @@ void SvListBoxForProperties::UpdatePlayGround()
aPlayGround.Scroll(0,nDelta,SCROLL_CHILDREN);
- for(USHORT i=nStart; i<=nEnd;i++)
+ for(sal_uInt16 i=nStart; i<=nEnd;i++)
{
(PLineArray[i])->SetPosSizePixel(aPos,aSize);
(PLineArray[i])->SetNameWidth(nTheNameSize+2*FRAME_OFFSET);
@@ -889,18 +889,18 @@ void SvListBoxForProperties::UpdateAll()
void SvListBoxForProperties::DisableUpdate()
{
- bUpdate=FALSE;
+ bUpdate=sal_False;
}
void SvListBoxForProperties::EnableUpdate()
{
- bUpdate=TRUE;
+ bUpdate=sal_True;
UpdateAll();
}
void SvListBoxForProperties::SetPropertyValue( const String & rEntryName, const String & rValue )
{
- USHORT i, iEnd = PLineArray.Count();
+ sal_uInt16 i, iEnd = PLineArray.Count();
for( i = 0 ; i < iEnd ; i++ )
{
SvPropertyLine* pPropLine = PLineArray[ i ];
@@ -912,14 +912,14 @@ void SvListBoxForProperties::SetPropertyValue( const String & rEntryName, const
}
}
-USHORT SvListBoxForProperties::AppendEntry( const SvPropertyData& aPropData)
+sal_uInt16 SvListBoxForProperties::AppendEntry( const SvPropertyData& aPropData)
{
return InsertEntry(aPropData);
}
-USHORT SvListBoxForProperties::InsertEntry( const SvPropertyData& aPropData, USHORT nPos)
+sal_uInt16 SvListBoxForProperties::InsertEntry( const SvPropertyData& aPropData, sal_uInt16 nPos)
{
- USHORT nInsPos=nPos;
+ sal_uInt16 nInsPos=nPos;
SvPropertyLine* pPropLine=new SvPropertyLine(&aPlayGround,WB_TABSTOP | WB_DIALOGCONTROL);
if(nPos==LISTBOX_APPEND)
@@ -938,7 +938,7 @@ USHORT SvListBoxForProperties::InsertEntry( const SvPropertyData& aPropData, USH
return nInsPos;
}
-void SvListBoxForProperties::ChangeEntry( const SvPropertyData& aPropData, USHORT nPos)
+void SvListBoxForProperties::ChangeEntry( const SvPropertyData& aPropData, sal_uInt16 nPos)
{
if(nPos<PLineArray.Count())
{
@@ -993,7 +993,7 @@ void SvListBoxForProperties::ChangeEntry( const SvPropertyData& aPropData, USHOR
if(pSvXPCtr->HasList())
{
- for(USHORT i=0;i<aPropData.theValues.Count();i++)
+ for(sal_uInt16 i=0;i<aPropData.theValues.Count();i++)
{
pSvXPCtr->InsertEntry(*(aPropData.theValues[i]));
}
@@ -1002,7 +1002,7 @@ void SvListBoxForProperties::ChangeEntry( const SvPropertyData& aPropData, USHOR
pPropLine->SetName(aPropData.aName);
- USHORT nTextWidth=(USHORT)aPlayGround.GetTextWidth(aPropData.aName);
+ sal_uInt16 nTextWidth=(sal_uInt16)aPlayGround.GetTextWidth(aPropData.aName);
if ( nTheNameSize < nTextWidth )
nTheNameSize = nTextWidth;
@@ -1022,21 +1022,21 @@ void SvListBoxForProperties::ChangeEntry( const SvPropertyData& aPropData, USHOR
}
}
-USHORT SvListBoxForProperties::GetFirstVisibleEntry()
+sal_uInt16 SvListBoxForProperties::GetFirstVisibleEntry()
{
return 0;
}
-void SvListBoxForProperties::SetFirstVisibleEntry(USHORT)
+void SvListBoxForProperties::SetFirstVisibleEntry(sal_uInt16)
{
return;
}
-void SvListBoxForProperties::SetSelectedEntry(USHORT)
+void SvListBoxForProperties::SetSelectedEntry(sal_uInt16)
{
return;
}
-USHORT SvListBoxForProperties::GetSelectedEntry()
+sal_uInt16 SvListBoxForProperties::GetSelectedEntry()
{
return 0;
}
@@ -1047,7 +1047,7 @@ IMPL_LINK( SvListBoxForProperties, ScrollHdl, ScrollBar*, pSB )
{
long nDelta=aVScroll.GetDelta();
nYOffset=-aVScroll.GetThumbPos()*nRowHeight;
- //aPlayGround.SetUpdateMode(FALSE);
+ //aPlayGround.SetUpdateMode(sal_False);
long nThumbPos=aVScroll.GetThumbPos();
long nLines=aVScroll.GetPageSize();
@@ -1058,14 +1058,14 @@ IMPL_LINK( SvListBoxForProperties, ScrollHdl, ScrollBar*, pSB )
{
if(i>=nThumbPos && i<=nThumbPos+nLines)
{
- (PLineArray[sal::static_int_cast< USHORT >(i)])->
- SetNeedsRepaint(TRUE);
+ (PLineArray[sal::static_int_cast< sal_uInt16 >(i)])->
+ SetNeedsRepaint(sal_True);
}
else
{
- (PLineArray[sal::static_int_cast< USHORT >(i)])->Hide();
- (PLineArray[sal::static_int_cast< USHORT >(i)])->
- SetNeedsRepaint(FALSE);
+ (PLineArray[sal::static_int_cast< sal_uInt16 >(i)])->Hide();
+ (PLineArray[sal::static_int_cast< sal_uInt16 >(i)])->
+ SetNeedsRepaint(sal_False);
}
}
}
@@ -1186,9 +1186,9 @@ SvPropertyBox::~SvPropertyBox()
void SvPropertyBox::ClearAll()
{
- USHORT nCount=aTabControl.GetPageCount();
+ sal_uInt16 nCount=aTabControl.GetPageCount();
- for(USHORT i=nCount;i>=1;i--)
+ for(sal_uInt16 i=nCount;i>=1;i--)
{
SvTabPageForProperties* pPage=(SvTabPageForProperties*)
aTabControl.GetTabPage(i);
@@ -1207,10 +1207,10 @@ void SvPropertyBox::Resize()
aTabControl.SetPosSizePixel(aPos,aSize);
- USHORT nCount=aTabControl.GetPageCount();
+ sal_uInt16 nCount=aTabControl.GetPageCount();
aSize=aTabControl.GetTabPageSizePixel();
- for(USHORT i=1;i<=nCount;i++)
+ for(sal_uInt16 i=1;i<=nCount;i++)
{
SvTabPageForProperties* pPage=(SvTabPageForProperties*)
aTabControl.GetTabPage(i);
@@ -1220,9 +1220,9 @@ void SvPropertyBox::Resize()
}
-USHORT SvPropertyBox::AppendPage( const String & rText )
+sal_uInt16 SvPropertyBox::AppendPage( const String & rText )
{
- USHORT nId=aTabControl.GetPageCount()+1;
+ sal_uInt16 nId=aTabControl.GetPageCount()+1;
aTabControl.InsertPage( nId,rText);
SvTabPageForProperties* pPage=new SvTabPageForProperties(&aTabControl);
pPage->SetSizePixel(aTabControl.GetTabPageSizePixel());
@@ -1232,17 +1232,17 @@ USHORT SvPropertyBox::AppendPage( const String & rText )
return nId;
}
-void SvPropertyBox::SetPage( USHORT nId)
+void SvPropertyBox::SetPage( sal_uInt16 nId)
{
aTabControl.SetCurPageId(nId);
}
-USHORT SvPropertyBox::GetCurPage()
+sal_uInt16 SvPropertyBox::GetCurPage()
{
return aTabControl.GetCurPageId();
}
-USHORT SvPropertyBox::CalcVisibleLines()
+sal_uInt16 SvPropertyBox::CalcVisibleLines()
{
SvTabPageForProperties* pPage=(SvTabPageForProperties*)
aTabControl.GetTabPage(aTabControl.GetCurPageId());
@@ -1265,9 +1265,9 @@ void SvPropertyBox::DisableUpdate()
void SvPropertyBox::SetController(SvPropertyDataControl *pDataCtr)
{
pThePropDataCtr=pDataCtr;
- USHORT nCount=aTabControl.GetPageCount();
+ sal_uInt16 nCount=aTabControl.GetPageCount();
- for(USHORT i=1;i<=nCount;i++)
+ for(sal_uInt16 i=1;i<=nCount;i++)
{
SvTabPageForProperties* pPage=(SvTabPageForProperties*)
aTabControl.GetTabPage(i);
@@ -1277,21 +1277,21 @@ void SvPropertyBox::SetController(SvPropertyDataControl *pDataCtr)
}
-USHORT SvPropertyBox::InsertEntry( const SvPropertyData& rData, USHORT nPos)
+sal_uInt16 SvPropertyBox::InsertEntry( const SvPropertyData& rData, sal_uInt16 nPos)
{
SvTabPageForProperties* pPage=(SvTabPageForProperties*)
aTabControl.GetTabPage(aTabControl.GetCurPageId());
return pPage->GetTheListBox()->InsertEntry(rData,nPos);
}
-void SvPropertyBox::ChangeEntry( const SvPropertyData& rData, USHORT nPos)
+void SvPropertyBox::ChangeEntry( const SvPropertyData& rData, sal_uInt16 nPos)
{
SvTabPageForProperties* pPage=(SvTabPageForProperties*)
aTabControl.GetTabPage(aTabControl.GetCurPageId());
pPage->GetTheListBox()->ChangeEntry(rData,nPos);
}
-USHORT SvPropertyBox::AppendEntry( const SvPropertyData& rData)
+sal_uInt16 SvPropertyBox::AppendEntry( const SvPropertyData& rData)
{
SvTabPageForProperties* pPage=(SvTabPageForProperties*)
aTabControl.GetTabPage(aTabControl.GetCurPageId());
@@ -1305,26 +1305,26 @@ void SvPropertyBox::SetPropertyValue( const String & rEntryName, const String &
pPage->GetTheListBox()->SetPropertyValue( rEntryName, rValue );
}
-void SvPropertyBox::SetFirstVisibleEntry(USHORT nPos)
+void SvPropertyBox::SetFirstVisibleEntry(sal_uInt16 nPos)
{
SvTabPageForProperties* pPage=(SvTabPageForProperties*)
aTabControl.GetTabPage(aTabControl.GetCurPageId());
pPage->GetTheListBox()->SetFirstVisibleEntry(nPos);
}
-USHORT SvPropertyBox::GetFirstVisibleEntry()
+sal_uInt16 SvPropertyBox::GetFirstVisibleEntry()
{
SvTabPageForProperties* pPage=(SvTabPageForProperties*)
aTabControl.GetTabPage(aTabControl.GetCurPageId());
return pPage->GetTheListBox()->GetFirstVisibleEntry();
}
-void SvPropertyBox::SetSelectedEntry(USHORT nPos)
+void SvPropertyBox::SetSelectedEntry(sal_uInt16 nPos)
{
SvTabPageForProperties* pPage=(SvTabPageForProperties*)
aTabControl.GetTabPage(aTabControl.GetCurPageId());
pPage->GetTheListBox()->SetSelectedEntry(nPos);
}
-USHORT SvPropertyBox::GetSelectedEntry()
+sal_uInt16 SvPropertyBox::GetSelectedEntry()
{
SvTabPageForProperties* pPage=(SvTabPageForProperties*)
aTabControl.GetTabPage(aTabControl.GetCurPageId());
@@ -1411,7 +1411,7 @@ void SvBasicPropertyDataControl::SetTheCorrectProperty(const String& aString)
aCorrectProperty=aString;
}
-void SvBasicPropertyDataControl::SetIsCorrect(BOOL nFlag)
+void SvBasicPropertyDataControl::SetIsCorrect(sal_Bool nFlag)
{
bCorrectness=nFlag;
}
@@ -1451,15 +1451,15 @@ ScPropertyDlg::ScPropertyDlg( Window* pParent) :
aPropListBox.SetController(&aBaProDatCtr);
- USHORT nPageId=aPropListBox.AppendPage("YabbaDabbaDo");
+ sal_uInt16 nPageId=aPropListBox.AppendPage("YabbaDabbaDo");
aPropListBox.SetPage(nPageId);
aProperty.eKind=KOC_EDIT;
aProperty.aName=aString;
- aProperty.aName+=String((USHORT)++nCount);
+ aProperty.aName+=String((sal_uInt16)++nCount);
aProperty.aValue=sizeof ComboBox;
- aProperty.bHasVisibleXButton=FALSE;
- aProperty.bIsHyperLink=FALSE;
- aProperty.bIsLocked=FALSE;
+ aProperty.bHasVisibleXButton=sal_False;
+ aProperty.bIsHyperLink=sal_False;
+ aProperty.bIsLocked=sal_False;
aProperty.pDataPtr=NULL;
aProperty.pControl=NULL;
aProperty.theValues.Insert(new String("1"),aProperty.theValues.Count());
@@ -1467,16 +1467,16 @@ ScPropertyDlg::ScPropertyDlg( Window* pParent) :
aProperty.theValues.Insert(new String("3"),aProperty.theValues.Count());
aProperty.theValues.Insert(new String("4"),aProperty.theValues.Count());
aPropListBox.InsertEntry(aProperty);
- aProperty.bHasVisibleXButton=TRUE;
+ aProperty.bHasVisibleXButton=sal_True;
aProperty.aName=aString;
- aProperty.aName+=String((USHORT)++nCount);
+ aProperty.aName+=String((sal_uInt16)++nCount);
aProperty.aValue="42";
aProperty.eKind=KOC_LISTBOX;
aPropListBox.InsertEntry(aProperty);
aProperty.aName=aString;
- aProperty.aName+=String((USHORT)++nCount);
+ aProperty.aName+=String((sal_uInt16)++nCount);
aProperty.eKind=KOC_COMBOBOX;
- aProperty.bHasVisibleXButton=FALSE;
+ aProperty.bHasVisibleXButton=sal_False;
aPropListBox.InsertEntry(aProperty);
}
@@ -1494,19 +1494,19 @@ IMPL_LINK( ScPropertyDlg, ModifiedHdl, ListBox*, pLB )
{
String aString("Don't know ");
aProperty.aName=aString;
- aProperty.aName+=String((USHORT)++nCount);
+ aProperty.aName+=String((sal_uInt16)++nCount);
if(nCount>20)
{
String aStr("Yabba ");
aStr+=aPropListBox.GetCurPage();
- USHORT nPageId=aPropListBox.AppendPage(aStr);
+ sal_uInt16 nPageId=aPropListBox.AppendPage(aStr);
aPropListBox.SetPage(nPageId);
nCount=0;
}
aProperty.eKind=(eKindOfControl)(aKindOfListBox.GetSelectEntryPos()+1);
- aProperty.bHasVisibleXButton=FALSE;
- if((nCount % 5)==0) aProperty.bHasVisibleXButton=TRUE;
+ aProperty.bHasVisibleXButton=sal_False;
+ if((nCount % 5)==0) aProperty.bHasVisibleXButton=sal_True;
aPropListBox.InsertEntry(aProperty);
}
return 0;
@@ -1518,7 +1518,7 @@ IMPL_LINK( ScPropertyDlg, RowModifiedHdl, SvBasicPropertyDataControl* ,pProCtr)
{
aModAnswer.SetText(aBaProDatCtr.GetProperty());
aModAnswer.Invalidate();
- aBaProDatCtr.SetIsCorrect(TRUE);
+ aBaProDatCtr.SetIsCorrect(sal_True);
}
return 0;
}
@@ -1529,7 +1529,7 @@ IMPL_LINK( ScPropertyDlg, CommitHdl, SvBasicPropertyDataControl*,pProCtr)
{
aCommitAnswer.SetText(aBaProDatCtr.GetProperty());
aCommitAnswer.Invalidate();
- aBaProDatCtr.SetIsCorrect(TRUE);
+ aBaProDatCtr.SetIsCorrect(sal_True);
}
return 0;
}
@@ -1540,7 +1540,7 @@ IMPL_LINK( ScPropertyDlg, ClickHdl, SvBasicPropertyDataControl*,pProCtr)
{
aClickAnswer.SetText(aBaProDatCtr.GetName());
aClickAnswer.Invalidate();
- aBaProDatCtr.SetIsCorrect(TRUE);
+ aBaProDatCtr.SetIsCorrect(sal_True);
}
return 0;
}
@@ -1551,7 +1551,7 @@ IMPL_LINK( ScPropertyDlg, SelectHdl, SvBasicPropertyDataControl*,pProCtr)
{
aSelectAnswer.SetText(aBaProDatCtr.GetName());
aSelectAnswer.Invalidate();
- aBaProDatCtr.SetIsCorrect(TRUE);
+ aBaProDatCtr.SetIsCorrect(sal_True);
}
return 0;
}
diff --git a/svtools/source/dialogs/wizdlg.cxx b/svtools/source/dialogs/wizdlg.cxx
index f06b4f53ce7c..8787e39b1284 100644
--- a/svtools/source/dialogs/wizdlg.cxx
+++ b/svtools/source/dialogs/wizdlg.cxx
@@ -203,7 +203,7 @@ void WizardDialog::ImplPosCtrls()
long nViewWidth = 0;
long nViewHeight = 0;
long nDlgHeight = nOffY;
- USHORT nViewPosFlags = WINDOW_POSSIZE_POS;
+ sal_uInt16 nViewPosFlags = WINDOW_POSSIZE_POS;
if ( meViewAlign == WINDOWALIGN_TOP )
{
nViewOffX = WIZARDDIALOG_VIEW_DLGOFFSET_X;
@@ -338,9 +338,9 @@ void WizardDialog::ImplShowTabPage( TabPage* pTabPage )
// -----------------------------------------------------------------------
-TabPage* WizardDialog::ImplGetPage( USHORT nLevel ) const
+TabPage* WizardDialog::ImplGetPage( sal_uInt16 nLevel ) const
{
- USHORT nTempLevel = 0;
+ sal_uInt16 nTempLevel = 0;
ImplWizPageData* pPageData = mpFirstPage;
while ( pPageData )
{
@@ -447,7 +447,7 @@ long WizardDialog::Notify( NotifyEvent& rNEvt )
{
const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
KeyCode aKeyCode = pKEvt->GetKeyCode();
- USHORT nKeyCode = aKeyCode.GetCode();
+ sal_uInt16 nKeyCode = aKeyCode.GetCode();
if ( aKeyCode.IsMod1() )
{
@@ -458,11 +458,11 @@ long WizardDialog::Notify( NotifyEvent& rNEvt )
if ( mpPrevBtn->IsVisible() &&
mpPrevBtn->IsEnabled() && mpPrevBtn->IsInputEnabled() )
{
- mpPrevBtn->SetPressed( TRUE );
- mpPrevBtn->SetPressed( FALSE );
+ mpPrevBtn->SetPressed( sal_True );
+ mpPrevBtn->SetPressed( sal_False );
mpPrevBtn->Click();
}
- return TRUE;
+ return sal_True;
}
}
else
@@ -472,11 +472,11 @@ long WizardDialog::Notify( NotifyEvent& rNEvt )
if ( mpNextBtn->IsVisible() &&
mpNextBtn->IsEnabled() && mpNextBtn->IsInputEnabled() )
{
- mpNextBtn->SetPressed( TRUE );
- mpNextBtn->SetPressed( FALSE );
+ mpNextBtn->SetPressed( sal_True );
+ mpNextBtn->SetPressed( sal_False );
mpNextBtn->Click();
}
- return TRUE;
+ return sal_True;
}
}
}
@@ -499,43 +499,43 @@ long WizardDialog::DeactivatePage()
if ( maDeactivateHdl.IsSet() )
return maDeactivateHdl.Call( this );
else
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL WizardDialog::ShowNextPage()
+sal_Bool WizardDialog::ShowNextPage()
{
return ShowPage( mnCurLevel+1 );
}
// -----------------------------------------------------------------------
-BOOL WizardDialog::ShowPrevPage()
+sal_Bool WizardDialog::ShowPrevPage()
{
if ( !mnCurLevel )
- return FALSE;
+ return sal_False;
return ShowPage( mnCurLevel-1 );
}
// -----------------------------------------------------------------------
-BOOL WizardDialog::ShowPage( USHORT nLevel )
+sal_Bool WizardDialog::ShowPage( sal_uInt16 nLevel )
{
if ( DeactivatePage() )
{
mnCurLevel = nLevel;
ActivatePage();
ImplShowTabPage( ImplGetPage( mnCurLevel ) );
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL WizardDialog::Finnish( long nResult )
+sal_Bool WizardDialog::Finnish( long nResult )
{
if ( DeactivatePage() )
{
@@ -546,10 +546,10 @@ BOOL WizardDialog::Finnish( long nResult )
EndDialog( nResult );
else if ( GetStyle() & WB_CLOSEABLE )
Close();
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -600,9 +600,9 @@ void WizardDialog::RemovePage( TabPage* pPage )
// -----------------------------------------------------------------------
-void WizardDialog::SetPage( USHORT nLevel, TabPage* pPage )
+void WizardDialog::SetPage( sal_uInt16 nLevel, TabPage* pPage )
{
- USHORT nTempLevel = 0;
+ sal_uInt16 nTempLevel = 0;
ImplWizPageData* pPageData = mpFirstPage;
while ( pPageData )
{
@@ -623,9 +623,9 @@ void WizardDialog::SetPage( USHORT nLevel, TabPage* pPage )
// -----------------------------------------------------------------------
-TabPage* WizardDialog::GetPage( USHORT nLevel ) const
+TabPage* WizardDialog::GetPage( sal_uInt16 nLevel ) const
{
- USHORT nTempLevel = 0;
+ sal_uInt16 nTempLevel = 0;
ImplWizPageData* pPageData = mpFirstPage;
while ( pPageData )
{
@@ -686,7 +686,7 @@ void WizardDialog::RemoveButton( Button* pButton )
// -----------------------------------------------------------------------
-void WizardDialog::ShowButtonFixedLine( BOOL bVisible )
+void WizardDialog::ShowButtonFixedLine( sal_Bool bVisible )
{
if ( !mpFixedLine )
{
@@ -701,7 +701,7 @@ void WizardDialog::ShowButtonFixedLine( BOOL bVisible )
// -----------------------------------------------------------------------
-BOOL WizardDialog::IsButtonFixedLineVisible()
+sal_Bool WizardDialog::IsButtonFixedLineVisible()
{
return (mpFixedLine && mpFixedLine->IsVisible());
}
diff --git a/svtools/source/edit/editsyntaxhighlighter.cxx b/svtools/source/edit/editsyntaxhighlighter.cxx
index c211413af925..a62df6d64700 100644
--- a/svtools/source/edit/editsyntaxhighlighter.cxx
+++ b/svtools/source/edit/editsyntaxhighlighter.cxx
@@ -68,12 +68,12 @@ void MultiLineEditSyntaxHighlight::SetText(const String& rNewText)
UpdateData();
}
-void MultiLineEditSyntaxHighlight::DoBracketHilight(USHORT aKey)
+void MultiLineEditSyntaxHighlight::DoBracketHilight(sal_uInt16 aKey)
{
TextSelection aCurrentPos = GetTextView()->GetSelection();
xub_StrLen aStartPos = aCurrentPos.GetStart().GetIndex();
- ULONG nStartPara = aCurrentPos.GetStart().GetPara();
- USHORT aCount = 0;
+ sal_uLong nStartPara = aCurrentPos.GetStart().GetPara();
+ sal_uInt16 aCount = 0;
int aChar = -1;
switch (aKey)
@@ -109,16 +109,16 @@ void MultiLineEditSyntaxHighlight::DoBracketHilight(USHORT aKey)
continue;
String aLine( GetTextEngine()->GetText( aPara ) );
- for (USHORT i = ((unsigned long)aPara==nStartPara) ? aStartPos-1 : (USHORT)(aLine.Len()-1); i>0; --i)
+ for (sal_uInt16 i = ((unsigned long)aPara==nStartPara) ? aStartPos-1 : (sal_uInt16)(aLine.Len()-1); i>0; --i)
{
if (aLine.GetChar(i)==aChar)
{
if (!aCount)
{
- GetTextEngine()->SetAttrib( TextAttribFontWeight( WEIGHT_ULTRABOLD ), aPara, i, i+1, TRUE );
- GetTextEngine()->SetAttrib( TextAttribFontColor( Color(0,0,0) ), aPara, i, i+1, TRUE );
- GetTextEngine()->SetAttrib( TextAttribFontWeight( WEIGHT_ULTRABOLD ), nStartPara, aStartPos, aStartPos, TRUE );
- GetTextEngine()->SetAttrib( TextAttribFontColor( Color(0,0,0) ), nStartPara, aStartPos, aStartPos, TRUE );
+ GetTextEngine()->SetAttrib( TextAttribFontWeight( WEIGHT_ULTRABOLD ), aPara, i, i+1, sal_True );
+ GetTextEngine()->SetAttrib( TextAttribFontColor( Color(0,0,0) ), aPara, i, i+1, sal_True );
+ GetTextEngine()->SetAttrib( TextAttribFontWeight( WEIGHT_ULTRABOLD ), nStartPara, aStartPos, aStartPos, sal_True );
+ GetTextEngine()->SetAttrib( TextAttribFontColor( Color(0,0,0) ), nStartPara, aStartPos, aStartPos, sal_True );
return;
}
else
@@ -184,19 +184,19 @@ void MultiLineEditSyntaxHighlight::UpdateData()
{
// syntax highlighting
// this must be possible improved by using notifychange correctly
- BOOL bTempModified = GetTextEngine()->IsModified();
+ sal_Bool bTempModified = GetTextEngine()->IsModified();
for (unsigned int nLine=0; nLine < GetTextEngine()->GetParagraphCount(); nLine++)
{
String aLine( GetTextEngine()->GetText( nLine ) );
Range aChanges = aHighlighter.notifyChange( nLine, 0, &aLine, 1 );
- GetTextEngine()->RemoveAttribs( nLine, TRUE );
+ GetTextEngine()->RemoveAttribs( nLine, sal_True );
HighlightPortions aPortions;
aHighlighter.getHighlightPortions( nLine, aLine, aPortions );
for ( size_t i = 0; i < aPortions.size(); i++ )
{
HighlightPortion& r = aPortions[i];
- GetTextEngine()->SetAttrib( TextAttribFontColor( GetColorValue(r.tokenType) ), nLine, r.nBegin, r.nEnd, TRUE );
+ GetTextEngine()->SetAttrib( TextAttribFontColor( GetColorValue(r.tokenType) ), nLine, r.nBegin, r.nEnd, sal_True );
}
}
GetTextView()->ShowCursor( false, true );
diff --git a/svtools/source/edit/svmedit.cxx b/svtools/source/edit/svmedit.cxx
index daaff472d1cc..1e9e7b7cd48b 100644
--- a/svtools/source/edit/svmedit.cxx
+++ b/svtools/source/edit/svmedit.cxx
@@ -65,11 +65,11 @@ private:
ExtTextEngine* mpExtTextEngine;
ExtTextView* mpExtTextView;
- BOOL mbInMBDown;
- BOOL mbFocusSelectionHide;
- BOOL mbIgnoreTab;
- BOOL mbActivePopup;
- BOOL mbSelectOnTab;
+ sal_Bool mbInMBDown;
+ sal_Bool mbFocusSelectionHide;
+ sal_Bool mbIgnoreTab;
+ sal_Bool mbActivePopup;
+ sal_Bool mbSelectOnTab;
public:
TextWindow( Window* pParent );
@@ -91,17 +91,17 @@ public:
virtual void GetFocus();
virtual void LoseFocus();
- BOOL IsAutoFocusHide() const { return mbFocusSelectionHide; }
- void SetAutoFocusHide( BOOL bAutoHide ) { mbFocusSelectionHide = bAutoHide; }
+ sal_Bool IsAutoFocusHide() const { return mbFocusSelectionHide; }
+ void SetAutoFocusHide( sal_Bool bAutoHide ) { mbFocusSelectionHide = bAutoHide; }
- BOOL IsIgnoreTab() const { return mbIgnoreTab; }
- void SetIgnoreTab( BOOL bIgnore ) { mbIgnoreTab = bIgnore; }
+ sal_Bool IsIgnoreTab() const { return mbIgnoreTab; }
+ void SetIgnoreTab( sal_Bool bIgnore ) { mbIgnoreTab = bIgnore; }
void DisableSelectionOnFocus() {mbSelectOnTab = sal_False;}
virtual
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >
- GetComponentInterface(BOOL bCreate = TRUE);
+ GetComponentInterface(sal_Bool bCreate = sal_True);
};
@@ -131,17 +131,17 @@ public:
ImpSvMEdit( MultiLineEdit* pSvMultiLineEdit, WinBits nWinStyle );
~ImpSvMEdit();
- void SetModified( BOOL bMod );
- BOOL IsModified() const;
+ void SetModified( sal_Bool bMod );
+ sal_Bool IsModified() const;
- void SetReadOnly( BOOL bRdOnly );
- BOOL IsReadOnly() const;
+ void SetReadOnly( sal_Bool bRdOnly );
+ sal_Bool IsReadOnly() const;
void SetMaxTextLen( xub_StrLen nLen );
xub_StrLen GetMaxTextLen() const;
- void SetInsertMode( BOOL bInsert );
- BOOL IsInsertMode() const;
+ void SetInsertMode( sal_Bool bInsert );
+ sal_Bool IsInsertMode() const;
void InsertText( const String& rStr );
String GetSelected() const;
@@ -163,13 +163,13 @@ public:
void Resize();
void GetFocus();
- BOOL HandleCommand( const CommandEvent& rCEvt );
+ sal_Bool HandleCommand( const CommandEvent& rCEvt );
- void Enable( BOOL bEnable );
+ void Enable( sal_Bool bEnable );
Size CalcMinimumSize() const;
- Size CalcSize( USHORT nColumns, USHORT nLines ) const;
- void GetMaxVisColumnsAndLines( USHORT& rnCols, USHORT& rnLines ) const;
+ Size CalcSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const;
+ void GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const;
void SetAlign( WinBits nWinStyle );
@@ -197,27 +197,27 @@ ImpSvMEdit::ImpSvMEdit( MultiLineEdit* pEdt, WinBits nWinStyle )
void ImpSvMEdit::ImpUpdateSrollBarVis( WinBits nWinStyle )
{
- const BOOL bHaveVScroll = (NULL != mpVScrollBar);
- const BOOL bHaveHScroll = (NULL != mpHScrollBar);
- const BOOL bHaveScrollBox = (NULL != mpScrollBox);
+ const sal_Bool bHaveVScroll = (NULL != mpVScrollBar);
+ const sal_Bool bHaveHScroll = (NULL != mpHScrollBar);
+ const sal_Bool bHaveScrollBox = (NULL != mpScrollBox);
- BOOL bNeedVScroll = ( nWinStyle & WB_VSCROLL ) == WB_VSCROLL;
- const BOOL bNeedHScroll = ( nWinStyle & WB_HSCROLL ) == WB_HSCROLL;
+ sal_Bool bNeedVScroll = ( nWinStyle & WB_VSCROLL ) == WB_VSCROLL;
+ const sal_Bool bNeedHScroll = ( nWinStyle & WB_HSCROLL ) == WB_HSCROLL;
- const BOOL bAutoVScroll = ( nWinStyle & WB_AUTOVSCROLL ) == WB_AUTOVSCROLL;
+ const sal_Bool bAutoVScroll = ( nWinStyle & WB_AUTOVSCROLL ) == WB_AUTOVSCROLL;
if ( !bNeedVScroll && bAutoVScroll )
{
TextEngine& rEngine( *mpTextWindow->GetTextEngine() );
- ULONG nOverallTextHeight(0);
- for ( ULONG i=0; i<rEngine.GetParagraphCount(); ++i )
+ sal_uLong nOverallTextHeight(0);
+ for ( sal_uLong i=0; i<rEngine.GetParagraphCount(); ++i )
nOverallTextHeight += rEngine.GetTextHeight( i );
- if ( nOverallTextHeight > (ULONG)mpTextWindow->GetOutputSizePixel().Height() )
+ if ( nOverallTextHeight > (sal_uLong)mpTextWindow->GetOutputSizePixel().Height() )
bNeedVScroll = true;
}
- const BOOL bNeedScrollBox = bNeedVScroll && bNeedHScroll;
+ const sal_Bool bNeedScrollBox = bNeedVScroll && bNeedHScroll;
- BOOL bScrollbarsChanged = false;
+ sal_Bool bScrollbarsChanged = false;
if ( bHaveVScroll != bNeedVScroll )
{
delete mpVScrollBar;
@@ -268,22 +268,22 @@ void ImpSvMEdit::InitFromStyle( WinBits nWinStyle )
SetAlign( nWinStyle );
if ( nWinStyle & WB_NOHIDESELECTION )
- mpTextWindow->SetAutoFocusHide( FALSE );
+ mpTextWindow->SetAutoFocusHide( sal_False );
else
- mpTextWindow->SetAutoFocusHide( TRUE );
+ mpTextWindow->SetAutoFocusHide( sal_True );
if ( nWinStyle & WB_READONLY )
- mpTextWindow->GetTextView()->SetReadOnly( TRUE );
+ mpTextWindow->GetTextView()->SetReadOnly( sal_True );
else
- mpTextWindow->GetTextView()->SetReadOnly( FALSE );
+ mpTextWindow->GetTextView()->SetReadOnly( sal_False );
if ( nWinStyle & WB_IGNORETAB )
{
- mpTextWindow->SetIgnoreTab( TRUE );
+ mpTextWindow->SetIgnoreTab( sal_True );
}
else
{
- mpTextWindow->SetIgnoreTab( FALSE );
+ mpTextWindow->SetIgnoreTab( sal_False );
// #103667# MultiLineEdit has the flag, but focusable window also needs this flag
WinBits nStyle = mpTextWindow->GetStyle();
nStyle |= WINDOW_DLGCTRL_MOD1TAB;
@@ -304,14 +304,14 @@ void ImpSvMEdit::ImpSetScrollBarRanges()
{
if ( mpVScrollBar )
{
- ULONG nTextHeight = mpTextWindow->GetTextEngine()->GetTextHeight();
+ sal_uLong nTextHeight = mpTextWindow->GetTextEngine()->GetTextHeight();
mpVScrollBar->SetRange( Range( 0, (long)nTextHeight-1 ) );
}
if ( mpHScrollBar )
{
-// ULONG nTextWidth = mpTextWindow->GetTextEngine()->CalcTextWidth();
+// sal_uLong nTextWidth = mpTextWindow->GetTextEngine()->CalcTextWidth();
// Es gibt kein Notify bei Breiten-Aenderung...
-// ULONG nW = Max( (ULONG)mpTextWindow->GetOutputSizePixel().Width()*5, (ULONG)nTextWidth );
+// sal_uLong nW = Max( (sal_uLong)mpTextWindow->GetOutputSizePixel().Width()*5, (sal_uLong)nTextWidth );
// mpHScrollBar->SetRange( Range( 0, (long)nW ) );
mpHScrollBar->SetRange( Range( 0, (long)mnTextWidth-1 ) );
}
@@ -364,7 +364,7 @@ IMPL_LINK( ImpSvMEdit, ScrollHdl, ScrollBar*, pCurScrollBar )
nDiffX = mpTextWindow->GetTextView()->GetStartDocPos().X() - pCurScrollBar->GetThumbPos();
mpTextWindow->GetTextView()->Scroll( nDiffX, nDiffY );
- // mpTextWindow->GetTextView()->ShowCursor( FALSE, TRUE );
+ // mpTextWindow->GetTextView()->ShowCursor( sal_False, sal_True );
return 0;
}
@@ -378,7 +378,7 @@ IMPL_LINK( ImpSvMEdit, ScrollHdl, ScrollBar*, pCurScrollBar )
void ImpSvMEdit::SetAlign( WinBits nWinStyle )
{
- BOOL bRTL = Application::GetSettings().GetLayoutRTL();
+ sal_Bool bRTL = Application::GetSettings().GetLayoutRTL();
mpTextWindow->GetTextEngine()->SetRightToLeft( bRTL );
if ( nWinStyle & WB_CENTER )
@@ -395,28 +395,28 @@ void ImpSvMEdit::SetTextWindowOffset( const Point& rOffset )
Resize();
}
-void ImpSvMEdit::SetModified( BOOL bMod )
+void ImpSvMEdit::SetModified( sal_Bool bMod )
{
mpTextWindow->GetTextEngine()->SetModified( bMod );
}
-BOOL ImpSvMEdit::IsModified() const
+sal_Bool ImpSvMEdit::IsModified() const
{
return mpTextWindow->GetTextEngine()->IsModified();
}
-void ImpSvMEdit::SetInsertMode( BOOL bInsert )
+void ImpSvMEdit::SetInsertMode( sal_Bool bInsert )
{
mpTextWindow->GetTextView()->SetInsertMode( bInsert );
}
-void ImpSvMEdit::SetReadOnly( BOOL bRdOnly )
+void ImpSvMEdit::SetReadOnly( sal_Bool bRdOnly )
{
mpTextWindow->GetTextView()->SetReadOnly( bRdOnly );
// Farbe anpassen ???????????????????????????
}
-BOOL ImpSvMEdit::IsReadOnly() const
+sal_Bool ImpSvMEdit::IsReadOnly() const
{
return mpTextWindow->GetTextView()->IsReadOnly();
}
@@ -533,10 +533,10 @@ void ImpSvMEdit::Paste()
void ImpSvMEdit::SetText( const String& rStr )
{
- BOOL bWasModified = mpTextWindow->GetTextEngine()->IsModified();
+ sal_Bool bWasModified = mpTextWindow->GetTextEngine()->IsModified();
mpTextWindow->GetTextEngine()->SetText( rStr );
if ( !bWasModified )
- mpTextWindow->GetTextEngine()->SetModified( FALSE );
+ mpTextWindow->GetTextEngine()->SetModified( sal_False );
mpTextWindow->GetTextView()->SetSelection( TextSelection() );
@@ -593,7 +593,7 @@ void ImpSvMEdit::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
if ( mpHScrollBar )
{
- ULONG nWidth = mpTextWindow->GetTextEngine()->CalcTextWidth();
+ sal_uLong nWidth = mpTextWindow->GetTextEngine()->CalcTextWidth();
if ( nWidth != mnTextWidth )
{
mnTextWidth = sal::static_int_cast< xub_StrLen >(nWidth);
@@ -625,9 +625,9 @@ void ImpSvMEdit::SetSelection( const Selection& rSelection )
long nEnd = Max( aNewSelection.Min(), aNewSelection.Max() );
TextSelection aTextSel;
- ULONG nPara = 0;
- USHORT nChar = 0;
- USHORT x = 0;
+ sal_uLong nPara = 0;
+ sal_uInt16 nChar = 0;
+ sal_uInt16 x = 0;
while ( x <= nEnd )
{
if ( x == aNewSelection.Min() )
@@ -656,7 +656,7 @@ const Selection& ImpSvMEdit::GetSelection() const
ExtTextEngine* pExtTextEngine = mpTextWindow->GetTextEngine();
// Absaetze davor:
- ULONG n;
+ sal_uLong n;
for ( n = 0; n < aTextSel.GetStart().GetPara(); n++ )
{
maSelection.Min() += pExtTextEngine->GetTextLen( n );
@@ -691,7 +691,7 @@ Size ImpSvMEdit::CalcMinimumSize() const
return aSz;
}
-Size ImpSvMEdit::CalcSize( USHORT nColumns, USHORT nLines ) const
+Size ImpSvMEdit::CalcSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const
{
static const sal_Unicode sampleText[] = { 'X', '\0' };
@@ -718,16 +718,16 @@ Size ImpSvMEdit::CalcSize( USHORT nColumns, USHORT nLines ) const
return aSz;
}
-void ImpSvMEdit::GetMaxVisColumnsAndLines( USHORT& rnCols, USHORT& rnLines ) const
+void ImpSvMEdit::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const
{
static const sal_Unicode sampleText[] = { 'x', '\0' };
Size aOutSz = mpTextWindow->GetOutputSizePixel();
Size aCharSz( mpTextWindow->GetTextWidth( sampleText ), mpTextWindow->GetTextHeight() );
- rnCols = (USHORT) (aOutSz.Width()/aCharSz.Width());
- rnLines = (USHORT) (aOutSz.Height()/aCharSz.Height());
+ rnCols = (sal_uInt16) (aOutSz.Width()/aCharSz.Width());
+ rnLines = (sal_uInt16) (aOutSz.Height()/aCharSz.Height());
}
-void ImpSvMEdit::Enable( BOOL bEnable )
+void ImpSvMEdit::Enable( sal_Bool bEnable )
{
mpTextWindow->Enable( bEnable );
if ( mpHScrollBar )
@@ -736,15 +736,15 @@ void ImpSvMEdit::Enable( BOOL bEnable )
mpVScrollBar->Enable( bEnable );
}
-BOOL ImpSvMEdit::HandleCommand( const CommandEvent& rCEvt )
+sal_Bool ImpSvMEdit::HandleCommand( const CommandEvent& rCEvt )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
if ( ( rCEvt.GetCommand() == COMMAND_WHEEL ) ||
( rCEvt.GetCommand() == COMMAND_STARTAUTOSCROLL ) ||
( rCEvt.GetCommand() == COMMAND_AUTOSCROLL ) )
{
mpTextWindow->HandleScrollCommand( rCEvt, mpHScrollBar, mpVScrollBar );
- bDone = TRUE;
+ bDone = sal_True;
}
return bDone;
}
@@ -752,12 +752,12 @@ BOOL ImpSvMEdit::HandleCommand( const CommandEvent& rCEvt )
TextWindow::TextWindow( Window* pParent ) : Window( pParent )
{
- mbInMBDown = FALSE;
- mbSelectOnTab = TRUE;
- mbFocusSelectionHide = FALSE;
- mbIgnoreTab = FALSE;
- mbActivePopup = FALSE;
- mbSelectOnTab = TRUE;
+ mbInMBDown = sal_False;
+ mbSelectOnTab = sal_True;
+ mbFocusSelectionHide = sal_False;
+ mbIgnoreTab = sal_False;
+ mbActivePopup = sal_False;
+ mbSelectOnTab = sal_True;
SetPointer( Pointer( POINTER_TEXT ) );
@@ -768,7 +768,7 @@ TextWindow::TextWindow( Window* pParent ) : Window( pParent )
mpExtTextEngine->SetLocale( GetSettings().GetLocale() );
mpExtTextView = new ExtTextView( mpExtTextEngine, this );
mpExtTextEngine->InsertView( mpExtTextView );
- mpExtTextEngine->EnableUndo( TRUE );
+ mpExtTextEngine->EnableUndo( sal_True );
mpExtTextView->ShowCursor();
Color aBackgroundColor = GetSettings().GetStyleSettings().GetWorkspaceColor();
@@ -790,11 +790,11 @@ void TextWindow::MouseMove( const MouseEvent& rMEvt )
void TextWindow::MouseButtonDown( const MouseEvent& rMEvt )
{
- mbInMBDown = TRUE; // Dann im GetFocus nicht alles selektieren wird
+ mbInMBDown = sal_True; // Dann im GetFocus nicht alles selektieren wird
mpExtTextView->MouseButtonDown( rMEvt );
Window::MouseButtonDown( rMEvt );
GrabFocus();
- mbInMBDown = FALSE;
+ mbInMBDown = sal_False;
}
void TextWindow::MouseButtonUp( const MouseEvent& rMEvt )
@@ -805,29 +805,29 @@ void TextWindow::MouseButtonUp( const MouseEvent& rMEvt )
void TextWindow::KeyInput( const KeyEvent& rKEvent )
{
- BOOL bDone = FALSE;
- USHORT nCode = rKEvent.GetKeyCode().GetCode();
+ sal_Bool bDone = sal_False;
+ sal_uInt16 nCode = rKEvent.GetKeyCode().GetCode();
if ( nCode == com::sun::star::awt::Key::SELECT_ALL ||
( (nCode == KEY_A) && rKEvent.GetKeyCode().IsMod1() && !rKEvent.GetKeyCode().IsMod2() )
)
{
mpExtTextView->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( 0xFFFF, 0xFFFF ) ) );
- bDone = TRUE;
+ bDone = sal_True;
}
else if ( (nCode == KEY_S) && rKEvent.GetKeyCode().IsShift() && rKEvent.GetKeyCode().IsMod1() )
{
if ( Edit::GetGetSpecialCharsFunction() )
{
// Damit die Selektion erhalten bleibt
- mbActivePopup = TRUE;
+ mbActivePopup = sal_True;
XubString aChars = Edit::GetGetSpecialCharsFunction()( this, GetFont() );
if ( aChars.Len() )
{
mpExtTextView->InsertText( aChars );
- mpExtTextView->GetTextEngine()->SetModified( TRUE );
+ mpExtTextView->GetTextEngine()->SetModified( sal_True );
}
- mbActivePopup = FALSE;
- bDone = TRUE;
+ mbActivePopup = sal_False;
+ bDone = sal_True;
}
}
else if ( nCode == KEY_TAB )
@@ -863,33 +863,33 @@ void TextWindow::Command( const CommandEvent& rCEvt )
pPopup->SetMenuFlags( MENU_FLAG_HIDEDISABLEDENTRIES );
if ( !mpExtTextView->HasSelection() )
{
- pPopup->EnableItem( SV_MENU_EDIT_CUT, FALSE );
- pPopup->EnableItem( SV_MENU_EDIT_COPY, FALSE );
- pPopup->EnableItem( SV_MENU_EDIT_DELETE, FALSE );
+ pPopup->EnableItem( SV_MENU_EDIT_CUT, sal_False );
+ pPopup->EnableItem( SV_MENU_EDIT_COPY, sal_False );
+ pPopup->EnableItem( SV_MENU_EDIT_DELETE, sal_False );
}
if ( mpExtTextView->IsReadOnly() )
{
- pPopup->EnableItem( SV_MENU_EDIT_CUT, FALSE );
- pPopup->EnableItem( SV_MENU_EDIT_PASTE, FALSE );
- pPopup->EnableItem( SV_MENU_EDIT_DELETE, FALSE );
- pPopup->EnableItem( SV_MENU_EDIT_INSERTSYMBOL, FALSE );
+ pPopup->EnableItem( SV_MENU_EDIT_CUT, sal_False );
+ pPopup->EnableItem( SV_MENU_EDIT_PASTE, sal_False );
+ pPopup->EnableItem( SV_MENU_EDIT_DELETE, sal_False );
+ pPopup->EnableItem( SV_MENU_EDIT_INSERTSYMBOL, sal_False );
}
if ( !mpExtTextView->GetTextEngine()->HasUndoManager() || !mpExtTextView->GetTextEngine()->GetUndoManager().GetUndoActionCount() )
{
- pPopup->EnableItem( SV_MENU_EDIT_UNDO, FALSE );
+ pPopup->EnableItem( SV_MENU_EDIT_UNDO, sal_False );
}
// if ( ( maSelection.Min() == 0 ) && ( maSelection.Max() == maText.Len() ) )
// {
-// pPopup->EnableItem( SV_MENU_EDIT_SELECTALL, FALSE );
+// pPopup->EnableItem( SV_MENU_EDIT_SELECTALL, sal_False );
// }
if ( !Edit::GetGetSpecialCharsFunction() )
{
- USHORT nPos = pPopup->GetItemPos( SV_MENU_EDIT_INSERTSYMBOL );
+ sal_uInt16 nPos = pPopup->GetItemPos( SV_MENU_EDIT_INSERTSYMBOL );
pPopup->RemoveItem( nPos );
pPopup->RemoveItem( nPos-1 );
}
- mbActivePopup = TRUE;
+ mbActivePopup = sal_True;
Point aPos = rCEvt.GetMousePosPixel();
if ( !rCEvt.IsMouseEvent() )
{
@@ -898,26 +898,26 @@ void TextWindow::Command( const CommandEvent& rCEvt )
aPos = Point( aSize.Width()/2, aSize.Height()/2 );
}
// pPopup->RemoveDisabledEntries();
- USHORT n = pPopup->Execute( this, aPos );
+ sal_uInt16 n = pPopup->Execute( this, aPos );
Edit::DeletePopupMenu( pPopup );
switch ( n )
{
case SV_MENU_EDIT_UNDO: mpExtTextView->Undo();
- mpExtTextEngine->SetModified( TRUE );
+ mpExtTextEngine->SetModified( sal_True );
mpExtTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
break;
case SV_MENU_EDIT_CUT: mpExtTextView->Cut();
- mpExtTextEngine->SetModified( TRUE );
+ mpExtTextEngine->SetModified( sal_True );
mpExtTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
break;
case SV_MENU_EDIT_COPY: mpExtTextView->Copy();
break;
case SV_MENU_EDIT_PASTE: mpExtTextView->Paste();
- mpExtTextEngine->SetModified( TRUE );
+ mpExtTextEngine->SetModified( sal_True );
mpExtTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
break;
case SV_MENU_EDIT_DELETE: mpExtTextView->DeleteSelected();
- mpExtTextEngine->SetModified( TRUE );
+ mpExtTextEngine->SetModified( sal_True );
mpExtTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
break;
case SV_MENU_EDIT_SELECTALL: mpExtTextView->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( 0xFFFFFFFF, 0xFFFF ) ) );
@@ -928,13 +928,13 @@ void TextWindow::Command( const CommandEvent& rCEvt )
if ( aChars.Len() )
{
mpExtTextView->InsertText( aChars );
- mpExtTextEngine->SetModified( TRUE );
+ mpExtTextEngine->SetModified( sal_True );
mpExtTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
}
}
break;
}
- mbActivePopup = FALSE;
+ mbActivePopup = sal_False;
}
else
{
@@ -948,19 +948,19 @@ void TextWindow::GetFocus()
Window::GetFocus();
if ( !mbActivePopup )
{
- BOOL bGotoCursor = !mpExtTextView->IsReadOnly();
+ sal_Bool bGotoCursor = !mpExtTextView->IsReadOnly();
if ( mbFocusSelectionHide && IsReallyVisible() && !mpExtTextView->IsReadOnly()
&& ( mbSelectOnTab &&
(!mbInMBDown || ( GetSettings().GetStyleSettings().GetSelectionOptions() & SELECTION_OPTION_FOCUS ) )) )
{
// Alles selektieren, aber nicht scrollen
- BOOL bAutoScroll = mpExtTextView->IsAutoScroll();
- mpExtTextView->SetAutoScroll( FALSE );
+ sal_Bool bAutoScroll = mpExtTextView->IsAutoScroll();
+ mpExtTextView->SetAutoScroll( sal_False );
mpExtTextView->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( 0xFFFF, 0xFFFF ) ) );
mpExtTextView->SetAutoScroll( bAutoScroll );
- bGotoCursor = FALSE;
+ bGotoCursor = sal_False;
}
- mpExtTextView->SetPaintSelection( TRUE );
+ mpExtTextView->SetPaintSelection( sal_True );
mpExtTextView->ShowCursor( bGotoCursor );
}
}
@@ -970,12 +970,12 @@ void TextWindow::LoseFocus()
Window::LoseFocus();
if ( mbFocusSelectionHide && !mbActivePopup )
- mpExtTextView->SetPaintSelection( FALSE );
+ mpExtTextView->SetPaintSelection( sal_False );
}
// virtual
::css::uno::Reference< ::css::awt::XWindowPeer >
-TextWindow::GetComponentInterface(BOOL bCreate)
+TextWindow::GetComponentInterface(sal_Bool bCreate)
{
::css::uno::Reference< ::css::awt::XWindowPeer > xPeer(
Window::GetComponentInterface(false));
@@ -992,10 +992,10 @@ MultiLineEdit::MultiLineEdit( Window* pParent, WinBits nWinStyle )
{
SetType( WINDOW_MULTILINEEDIT );
pImpSvMEdit = new ImpSvMEdit( this, nWinStyle );
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
pUpdateDataTimer = 0;
- SetCompoundControl( TRUE );
+ SetCompoundControl( sal_True );
SetStyle( ImplInitStyle( nWinStyle ) );
}
@@ -1005,10 +1005,10 @@ MultiLineEdit::MultiLineEdit( Window* pParent, const ResId& rResId )
SetType( WINDOW_MULTILINEEDIT );
WinBits nWinStyle = rResId.GetWinBits();
pImpSvMEdit = new ImpSvMEdit( this, nWinStyle );
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
pUpdateDataTimer = 0;
- USHORT nMaxLen = Edit::GetMaxTextLen();
+ sal_uInt16 nMaxLen = Edit::GetMaxTextLen();
if ( nMaxLen )
SetMaxTextLen( nMaxLen );
@@ -1017,7 +1017,7 @@ MultiLineEdit::MultiLineEdit( Window* pParent, const ResId& rResId )
if ( IsVisible() )
pImpSvMEdit->Resize();
- SetCompoundControl( TRUE );
+ SetCompoundControl( sal_True );
SetStyle( ImplInitStyle( nWinStyle ) );
// Base Edit ctor could call Show already, but that would cause problems
@@ -1052,7 +1052,7 @@ WinBits MultiLineEdit::ImplInitStyle( WinBits nStyle )
}
-void MultiLineEdit::ImplInitSettings( BOOL /*bFont*/, BOOL /*bForeground*/, BOOL bBackground )
+void MultiLineEdit::ImplInitSettings( sal_Bool /*bFont*/, sal_Bool /*bForeground*/, sal_Bool bBackground )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -1084,7 +1084,7 @@ void MultiLineEdit::ImplInitSettings( BOOL /*bFont*/, BOOL /*bForeground*/, BOOL
{
if( IsPaintTransparent() )
{
- pImpSvMEdit->GetTextWindow()->SetPaintTransparent( TRUE );
+ pImpSvMEdit->GetTextWindow()->SetPaintTransparent( sal_True );
pImpSvMEdit->GetTextWindow()->SetBackground();
pImpSvMEdit->GetTextWindow()->SetControlBackground();
SetBackground();
@@ -1126,20 +1126,20 @@ void MultiLineEdit::UpdateData()
void MultiLineEdit::SetModifyFlag()
{
- pImpSvMEdit->SetModified( TRUE );
+ pImpSvMEdit->SetModified( sal_True );
}
void MultiLineEdit::ClearModifyFlag()
{
- pImpSvMEdit->SetModified( FALSE );
+ pImpSvMEdit->SetModified( sal_False );
}
-BOOL MultiLineEdit::IsModified() const
+sal_Bool MultiLineEdit::IsModified() const
{
return pImpSvMEdit->IsModified();
}
-void MultiLineEdit::EnableUpdateData( ULONG nTimeout )
+void MultiLineEdit::EnableUpdateData( sal_uLong nTimeout )
{
if ( !nTimeout )
DisableUpdateData();
@@ -1154,7 +1154,7 @@ void MultiLineEdit::EnableUpdateData( ULONG nTimeout )
}
}
-void MultiLineEdit::SetReadOnly( BOOL bReadOnly )
+void MultiLineEdit::SetReadOnly( sal_Bool bReadOnly )
{
pImpSvMEdit->SetReadOnly( bReadOnly );
Edit::SetReadOnly( bReadOnly );
@@ -1168,7 +1168,7 @@ void MultiLineEdit::SetReadOnly( BOOL bReadOnly )
SetStyle( nStyle );
}
-BOOL MultiLineEdit::IsReadOnly() const
+sal_Bool MultiLineEdit::IsReadOnly() const
{
return pImpSvMEdit->IsReadOnly();
}
@@ -1299,7 +1299,7 @@ Size MultiLineEdit::CalcAdjustedSize( const Size& rPrefSize ) const
return aSz;
}
-Size MultiLineEdit::CalcSize( USHORT nColumns, USHORT nLines ) const
+Size MultiLineEdit::CalcSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const
{
Size aSz = pImpSvMEdit->CalcSize( nColumns, nLines );
@@ -1310,7 +1310,7 @@ Size MultiLineEdit::CalcSize( USHORT nColumns, USHORT nLines ) const
return aSz;
}
-void MultiLineEdit::GetMaxVisColumnsAndLines( USHORT& rnCols, USHORT& rnLines ) const
+void MultiLineEdit::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const
{
pImpSvMEdit->GetMaxVisColumnsAndLines( rnCols, rnLines );
}
@@ -1320,7 +1320,7 @@ void MultiLineEdit::StateChanged( StateChangedType nType )
if( nType == STATE_CHANGE_ENABLE )
{
pImpSvMEdit->Enable( IsEnabled() );
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
}
else if( nType == STATE_CHANGE_READONLY )
{
@@ -1329,23 +1329,23 @@ void MultiLineEdit::StateChanged( StateChangedType nType )
else if ( nType == STATE_CHANGE_ZOOM )
{
pImpSvMEdit->GetTextWindow()->SetZoom( GetZoom() );
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
Resize();
}
else if ( nType == STATE_CHANGE_CONTROLFONT )
{
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
Resize();
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
{
- ImplInitSettings( FALSE, TRUE, FALSE );
+ ImplInitSettings( sal_False, sal_True, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
{
- ImplInitSettings( FALSE, FALSE, TRUE );
+ ImplInitSettings( sal_False, sal_False, sal_True );
Invalidate();
}
else if ( nType == STATE_CHANGE_STYLE )
@@ -1357,7 +1357,7 @@ void MultiLineEdit::StateChanged( StateChangedType nType )
{
if( IsPaintTransparent() )
{
- pImpSvMEdit->GetTextWindow()->SetPaintTransparent( TRUE );
+ pImpSvMEdit->GetTextWindow()->SetPaintTransparent( sal_True );
pImpSvMEdit->GetTextWindow()->SetBackground();
pImpSvMEdit->GetTextWindow()->SetControlBackground();
SetBackground();
@@ -1373,7 +1373,7 @@ void MultiLineEdit::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
Resize();
Invalidate();
}
@@ -1381,14 +1381,14 @@ void MultiLineEdit::DataChanged( const DataChangedEvent& rDCEvt )
Control::DataChanged( rDCEvt );
}
-void MultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags )
+void MultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags )
{
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
Font aFont = pImpSvMEdit->GetTextWindow()->GetDrawPixelFont( pDev );
- aFont.SetTransparent( TRUE );
+ aFont.SetTransparent( sal_True );
OutDevType eOutDevType = pDev->GetOutDevType();
pDev->Push();
@@ -1399,8 +1399,8 @@ void MultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSi
// Border/Background
pDev->SetLineColor();
pDev->SetFillColor();
- BOOL bBorder = !(nFlags & WINDOW_DRAW_NOBORDER ) && (GetStyle() & WB_BORDER);
- BOOL bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && IsControlBackground();
+ sal_Bool bBorder = !(nFlags & WINDOW_DRAW_NOBORDER ) && (GetStyle() & WB_BORDER);
+ sal_Bool bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && IsControlBackground();
if ( bBorder || bBackground )
{
Rectangle aRect( aPos, aSize );
@@ -1434,7 +1434,7 @@ void MultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSi
XubString aText = GetText();
Size aTextSz( pDev->GetTextWidth( aText ), pDev->GetTextHeight() );
- ULONG nLines = (ULONG) (aSize.Height() / aTextSz.Height());
+ sal_uLong nLines = (sal_uLong) (aSize.Height() / aTextSz.Height());
if ( !nLines )
nLines = 1;
aTextSz.Height() = nLines*aTextSz.Height();
@@ -1588,24 +1588,24 @@ ScrollBar* MultiLineEdit::GetVScrollBar() const
return pImpSvMEdit->GetVScrollBar();
}
-void MultiLineEdit::EnableFocusSelectionHide( BOOL bHide )
+void MultiLineEdit::EnableFocusSelectionHide( sal_Bool bHide )
{
pImpSvMEdit->GetTextWindow()->SetAutoFocusHide( bHide );
}
-BOOL MultiLineEdit::IsFocusSelectionHideEnabled() const
+sal_Bool MultiLineEdit::IsFocusSelectionHideEnabled() const
{
return pImpSvMEdit->GetTextWindow()->IsAutoFocusHide();
}
-void MultiLineEdit::SetLeftMargin( USHORT n )
+void MultiLineEdit::SetLeftMargin( sal_uInt16 n )
{
if ( GetTextEngine() )
GetTextEngine()->SetLeftMargin( n );
}
-USHORT MultiLineEdit::GetLeftMargin() const
+sal_uInt16 MultiLineEdit::GetLeftMargin() const
{
if ( GetTextEngine() )
return GetTextEngine()->GetLeftMargin();
@@ -1613,7 +1613,7 @@ USHORT MultiLineEdit::GetLeftMargin() const
return 0;
}
-void MultiLineEdit::SetRightToLeft( BOOL bRightToLeft )
+void MultiLineEdit::SetRightToLeft( sal_Bool bRightToLeft )
{
if ( GetTextEngine() )
{
@@ -1622,9 +1622,9 @@ void MultiLineEdit::SetRightToLeft( BOOL bRightToLeft )
}
}
-BOOL MultiLineEdit::IsRightToLeft() const
+sal_Bool MultiLineEdit::IsRightToLeft() const
{
- BOOL bRightToLeft = FALSE;
+ sal_Bool bRightToLeft = sal_False;
if ( GetTextEngine() )
bRightToLeft = GetTextEngine()->IsRightToLeft();
@@ -1634,7 +1634,7 @@ BOOL MultiLineEdit::IsRightToLeft() const
// virtual
::css::uno::Reference< ::css::awt::XWindowPeer >
-MultiLineEdit::GetComponentInterface(BOOL bCreate)
+MultiLineEdit::GetComponentInterface(sal_Bool bCreate)
{
::css::uno::Reference< ::css::awt::XWindowPeer > xPeer(
Edit::GetComponentInterface(false));
diff --git a/svtools/source/edit/svmedit2.cxx b/svtools/source/edit/svmedit2.cxx
index 19eba618a828..2a4c0134005a 100644
--- a/svtools/source/edit/svmedit2.cxx
+++ b/svtools/source/edit/svmedit2.cxx
@@ -49,32 +49,32 @@ ExtMultiLineEdit::~ExtMultiLineEdit()
{
}
-void ExtMultiLineEdit::InsertText( const String& rNew, BOOL )
+void ExtMultiLineEdit::InsertText( const String& rNew, sal_Bool )
{
- GetTextView()->InsertText( rNew, FALSE );
+ GetTextView()->InsertText( rNew, sal_False );
}
-void ExtMultiLineEdit::SetAutoScroll( BOOL bAutoScroll )
+void ExtMultiLineEdit::SetAutoScroll( sal_Bool bAutoScroll )
{
GetTextView()->SetAutoScroll( bAutoScroll );
}
-void ExtMultiLineEdit::EnableCursor( BOOL bEnable )
+void ExtMultiLineEdit::EnableCursor( sal_Bool bEnable )
{
GetTextView()->EnableCursor( bEnable );
}
-void ExtMultiLineEdit::SetAttrib( const TextAttrib& rAttr, ULONG nPara, USHORT nStart, USHORT nEnd )
+void ExtMultiLineEdit::SetAttrib( const TextAttrib& rAttr, sal_uLong nPara, sal_uInt16 nStart, sal_uInt16 nEnd )
{
GetTextEngine()->SetAttrib( rAttr, nPara, nStart, nEnd );
}
-void ExtMultiLineEdit::SetLeftMargin( USHORT nLeftMargin )
+void ExtMultiLineEdit::SetLeftMargin( sal_uInt16 nLeftMargin )
{
GetTextEngine()->SetLeftMargin( nLeftMargin );
}
-ULONG ExtMultiLineEdit::GetParagraphCount() const
+sal_uLong ExtMultiLineEdit::GetParagraphCount() const
{
return GetTextEngine()->GetParagraphCount();
}
diff --git a/svtools/source/edit/sychconv.cxx b/svtools/source/edit/sychconv.cxx
index d72200ac9c42..5e723815eb37 100644
--- a/svtools/source/edit/sychconv.cxx
+++ b/svtools/source/edit/sychconv.cxx
@@ -30,14 +30,14 @@
#include <svtools/sychconv.hxx>
#include <vcl/outdev.hxx>
-BOOL SymCharConverter::Convert( Font& rFont, UniString& rString, OutputDevice* pDev )
+sal_Bool SymCharConverter::Convert( Font& rFont, UniString& rString, OutputDevice* pDev )
{
// hibyte 0 = exact matching
// 1 = little differences,
// 2 = the converted character does not look like the original but got the same meaning
// 3 = the destination does not match looking and meaning of the original
- static USHORT __READONLY_DATA aWingdingsToStarBatsTable[ 256 - 32 ] =
+ static sal_uInt16 __READONLY_DATA aWingdingsToStarBatsTable[ 256 - 32 ] =
{
0x0020, 0x0238, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0174, 0x02BA, 0x017B, 0x017C, 0x037C, 0x037C, 0x037C, 0x037C,
0x0000, 0x0000, 0x0372, 0x0272, 0x0372, 0x0000, 0x0000, 0x0374, 0x0279, 0x0000, 0x027A, 0x0000, 0x0178, 0x0278, 0x0000, 0x0137,
@@ -55,7 +55,7 @@ BOOL SymCharConverter::Convert( Font& rFont, UniString& rString, OutputDevice* p
0x01AF, 0x01B2, 0x01B0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0150, 0x0032, 0x0033, 0x0034, 0x01C8
};
- static USHORT __READONLY_DATA aMonotypeSortsToStarBatsTable[ 256 - 32 ]=
+ static sal_uInt16 __READONLY_DATA aMonotypeSortsToStarBatsTable[ 256 - 32 ]=
{
0x0020, 0x00cb, 0x00cb, 0x00cb, 0x00cb, 0x0074, 0x00ba, 0x0021, 0x00cc, 0x007b, 0x0036, 0x007d, 0x007e, 0x0037, 0x0038, 0x0038,
0x0039, 0x0038, 0x0038, 0x0039, 0x003a, 0x004f, 0x0050, 0x004f, 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0086, 0x0086, 0x0086,
@@ -73,9 +73,9 @@ BOOL SymCharConverter::Convert( Font& rFont, UniString& rString, OutputDevice* p
0x0000, 0x00af, 0x0035, 0x00dc, 0x00da, 0x00dc, 0x00db, 0x00da, 0x00dc, 0x00db, 0x00dc, 0x00dc, 0x00dc, 0x00dc, 0x00af, 0x0000
};
- const USHORT* pTransTable = NULL;
+ const sal_uInt16* pTransTable = NULL;
- BOOL bIsAvailable = ( pDev ) ? pDev->IsFontAvailable( rFont.GetName() ) : FALSE;
+ sal_Bool bIsAvailable = ( pDev ) ? pDev->IsFontAvailable( rFont.GetName() ) : sal_False;
if ( !bIsAvailable )
{
if ( rFont.GetName().CompareToAscii( RTL_CONSTASCII_STRINGPARAM( "Wingdings" ) ) == COMPARE_EQUAL )
@@ -86,18 +86,18 @@ BOOL SymCharConverter::Convert( Font& rFont, UniString& rString, OutputDevice* p
if ( pTransTable )
{
sal_Unicode c;
- for ( UINT16 i = rString.Len(); i--; )
+ for ( sal_uInt16 i = rString.Len(); i--; )
{
c = rString.GetChar( i );
c -= 32;
- c = ( ((UINT16)c) >= 224 ) ? 0 : (sal_Unicode) pTransTable[ c ];
+ c = ( ((sal_uInt16)c) >= 224 ) ? 0 : (sal_Unicode) pTransTable[ c ];
if ( !c ) // if character is out of range or not matching
c = 0xA5; // we will default a StarBats-Bullet
rString.SetChar( i, c );
}
rFont.SetCharSet( RTL_TEXTENCODING_SYMBOL );
rFont.SetName( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "StarBats" ) ) );
- return TRUE;
+ return sal_True;
}
- else return FALSE;
+ else return sal_False;
};
diff --git a/svtools/source/edit/syntaxhighlight.cxx b/svtools/source/edit/syntaxhighlight.cxx
index 6ea9f05d78a1..8e26c58d57ae 100644
--- a/svtools/source/edit/syntaxhighlight.cxx
+++ b/svtools/source/edit/syntaxhighlight.cxx
@@ -256,22 +256,22 @@ class BasicSimpleCharClass
static LetterTable aLetterTable;
public:
- static BOOL isAlpha( sal_Unicode c, bool bCompatible )
+ static sal_Bool isAlpha( sal_Unicode c, bool bCompatible )
{
- BOOL bRet = (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')
+ sal_Bool bRet = (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')
|| (bCompatible && aLetterTable.isLetter( c ));
return bRet;
}
- static BOOL isDigit( sal_Unicode c )
+ static sal_Bool isDigit( sal_Unicode c )
{
- BOOL bRet = (c >= '0' && c <= '9');
+ sal_Bool bRet = (c >= '0' && c <= '9');
return bRet;
}
- static BOOL isAlphaNumeric( sal_Unicode c, bool bCompatible )
+ static sal_Bool isAlphaNumeric( sal_Unicode c, bool bCompatible )
{
- BOOL bRet = isDigit( c ) || isAlpha( c, bCompatible );
+ sal_Bool bRet = isDigit( c ) || isAlpha( c, bCompatible );
return bRet;
}
};
@@ -283,68 +283,68 @@ LetterTable::LetterTable( void )
for( int i = 0 ; i < 256 ; ++i )
IsLetterTab[i] = false;
- IsLetterTab[0xC0] = true; // À , CAPITAL LETTER A WITH GRAVE ACCENT
- IsLetterTab[0xC1] = true; // Á , CAPITAL LETTER A WITH ACUTE ACCENT
- IsLetterTab[0xC2] = true; // Â , CAPITAL LETTER A WITH CIRCUMFLEX ACCENT
- IsLetterTab[0xC3] = true; // Ã , CAPITAL LETTER A WITH TILDE
- IsLetterTab[0xC4] = true; // Ä , CAPITAL LETTER A WITH DIAERESIS
- IsLetterTab[0xC5] = true; // Å , CAPITAL LETTER A WITH RING ABOVE
- IsLetterTab[0xC6] = true; // Æ , CAPITAL LIGATURE AE
- IsLetterTab[0xC7] = true; // Ç , CAPITAL LETTER C WITH CEDILLA
- IsLetterTab[0xC8] = true; // È , CAPITAL LETTER E WITH GRAVE ACCENT
- IsLetterTab[0xC9] = true; // É , CAPITAL LETTER E WITH ACUTE ACCENT
- IsLetterTab[0xCA] = true; // Ê , CAPITAL LETTER E WITH CIRCUMFLEX ACCENT
- IsLetterTab[0xCB] = true; // Ë , CAPITAL LETTER E WITH DIAERESIS
- IsLetterTab[0xCC] = true; // Ì , CAPITAL LETTER I WITH GRAVE ACCENT
- IsLetterTab[0xCD] = true; // Í , CAPITAL LETTER I WITH ACUTE ACCENT
- IsLetterTab[0xCE] = true; // Î , CAPITAL LETTER I WITH CIRCUMFLEX ACCENT
- IsLetterTab[0xCF] = true; // Ï , CAPITAL LETTER I WITH DIAERESIS
- IsLetterTab[0xD0] = true; // Ð , CAPITAL LETTER ETH
- IsLetterTab[0xD1] = true; // Ñ , CAPITAL LETTER N WITH TILDE
- IsLetterTab[0xD2] = true; // Ò , CAPITAL LETTER O WITH GRAVE ACCENT
- IsLetterTab[0xD3] = true; // Ó , CAPITAL LETTER O WITH ACUTE ACCENT
- IsLetterTab[0xD4] = true; // Ô , CAPITAL LETTER O WITH CIRCUMFLEX ACCENT
- IsLetterTab[0xD5] = true; // Õ , CAPITAL LETTER O WITH TILDE
- IsLetterTab[0xD6] = true; // Ö , CAPITAL LETTER O WITH DIAERESIS
- IsLetterTab[0xD8] = true; // Ø , CAPITAL LETTER O WITH STROKE
- IsLetterTab[0xD9] = true; // Ù , CAPITAL LETTER U WITH GRAVE ACCENT
- IsLetterTab[0xDA] = true; // Ú , CAPITAL LETTER U WITH ACUTE ACCENT
- IsLetterTab[0xDB] = true; // Û , CAPITAL LETTER U WITH CIRCUMFLEX ACCENT
- IsLetterTab[0xDC] = true; // Ü , CAPITAL LETTER U WITH DIAERESIS
- IsLetterTab[0xDD] = true; // Ý , CAPITAL LETTER Y WITH ACUTE ACCENT
- IsLetterTab[0xDE] = true; // Þ , CAPITAL LETTER THORN
- IsLetterTab[0xDF] = true; // ß , SMALL LETTER SHARP S
- IsLetterTab[0xE0] = true; // à , SMALL LETTER A WITH GRAVE ACCENT
- IsLetterTab[0xE1] = true; // á , SMALL LETTER A WITH ACUTE ACCENT
- IsLetterTab[0xE2] = true; // â , SMALL LETTER A WITH CIRCUMFLEX ACCENT
- IsLetterTab[0xE3] = true; // ã , SMALL LETTER A WITH TILDE
- IsLetterTab[0xE4] = true; // ä , SMALL LETTER A WITH DIAERESIS
- IsLetterTab[0xE5] = true; // å , SMALL LETTER A WITH RING ABOVE
- IsLetterTab[0xE6] = true; // æ , SMALL LIGATURE AE
- IsLetterTab[0xE7] = true; // ç , SMALL LETTER C WITH CEDILLA
- IsLetterTab[0xE8] = true; // è , SMALL LETTER E WITH GRAVE ACCENT
- IsLetterTab[0xE9] = true; // é , SMALL LETTER E WITH ACUTE ACCENT
- IsLetterTab[0xEA] = true; // ê , SMALL LETTER E WITH CIRCUMFLEX ACCENT
- IsLetterTab[0xEB] = true; // ë , SMALL LETTER E WITH DIAERESIS
- IsLetterTab[0xEC] = true; // ì , SMALL LETTER I WITH GRAVE ACCENT
- IsLetterTab[0xED] = true; // í , SMALL LETTER I WITH ACUTE ACCENT
- IsLetterTab[0xEE] = true; // î , SMALL LETTER I WITH CIRCUMFLEX ACCENT
- IsLetterTab[0xEF] = true; // ï , SMALL LETTER I WITH DIAERESIS
- IsLetterTab[0xF0] = true; // ð , SMALL LETTER ETH
- IsLetterTab[0xF1] = true; // ñ , SMALL LETTER N WITH TILDE
- IsLetterTab[0xF2] = true; // ò , SMALL LETTER O WITH GRAVE ACCENT
- IsLetterTab[0xF3] = true; // ó , SMALL LETTER O WITH ACUTE ACCENT
- IsLetterTab[0xF4] = true; // ô , SMALL LETTER O WITH CIRCUMFLEX ACCENT
- IsLetterTab[0xF5] = true; // õ , SMALL LETTER O WITH TILDE
- IsLetterTab[0xF6] = true; // ö , SMALL LETTER O WITH DIAERESIS
- IsLetterTab[0xF8] = true; // ø , SMALL LETTER O WITH OBLIQUE BAR
- IsLetterTab[0xF9] = true; // ù , SMALL LETTER U WITH GRAVE ACCENT
- IsLetterTab[0xFA] = true; // ú , SMALL LETTER U WITH ACUTE ACCENT
- IsLetterTab[0xFB] = true; // û , SMALL LETTER U WITH CIRCUMFLEX ACCENT
- IsLetterTab[0xFC] = true; // ü , SMALL LETTER U WITH DIAERESIS
- IsLetterTab[0xFD] = true; // ý , SMALL LETTER Y WITH ACUTE ACCENT
- IsLetterTab[0xFE] = true; // þ , SMALL LETTER THORN
- IsLetterTab[0xFF] = true; // ÿ , SMALL LETTER Y WITH DIAERESIS
+ IsLetterTab[0xC0] = true; // ?, CAPITAL LETTER A WITH GRAVE ACCENT
+ IsLetterTab[0xC1] = true; // ?, CAPITAL LETTER A WITH ACUTE ACCENT
+ IsLetterTab[0xC2] = true; // ?, CAPITAL LETTER A WITH CIRCUMFLEX ACCENT
+ IsLetterTab[0xC3] = true; // ?, CAPITAL LETTER A WITH TILDE
+ IsLetterTab[0xC4] = true; // ?, CAPITAL LETTER A WITH DIAERESIS
+ IsLetterTab[0xC5] = true; // ?, CAPITAL LETTER A WITH RING ABOVE
+ IsLetterTab[0xC6] = true; // ?, CAPITAL LIGATURE AE
+ IsLetterTab[0xC7] = true; // ?, CAPITAL LETTER C WITH CEDILLA
+ IsLetterTab[0xC8] = true; // ?, CAPITAL LETTER E WITH GRAVE ACCENT
+ IsLetterTab[0xC9] = true; // ?, CAPITAL LETTER E WITH ACUTE ACCENT
+ IsLetterTab[0xCA] = true; // ?, CAPITAL LETTER E WITH CIRCUMFLEX ACCENT
+ IsLetterTab[0xCB] = true; // ?, CAPITAL LETTER E WITH DIAERESIS
+ IsLetterTab[0xCC] = true; // ?, CAPITAL LETTER I WITH GRAVE ACCENT
+ IsLetterTab[0xCD] = true; // ?, CAPITAL LETTER I WITH ACUTE ACCENT
+ IsLetterTab[0xCE] = true; // ?, CAPITAL LETTER I WITH CIRCUMFLEX ACCENT
+ IsLetterTab[0xCF] = true; // ?, CAPITAL LETTER I WITH DIAERESIS
+ IsLetterTab[0xD0] = true; // ?, CAPITAL LETTER ETH
+ IsLetterTab[0xD1] = true; // ?, CAPITAL LETTER N WITH TILDE
+ IsLetterTab[0xD2] = true; // ?, CAPITAL LETTER O WITH GRAVE ACCENT
+ IsLetterTab[0xD3] = true; // ?, CAPITAL LETTER O WITH ACUTE ACCENT
+ IsLetterTab[0xD4] = true; // ?, CAPITAL LETTER O WITH CIRCUMFLEX ACCENT
+ IsLetterTab[0xD5] = true; // ?, CAPITAL LETTER O WITH TILDE
+ IsLetterTab[0xD6] = true; // ?, CAPITAL LETTER O WITH DIAERESIS
+ IsLetterTab[0xD8] = true; // ?, CAPITAL LETTER O WITH STROKE
+ IsLetterTab[0xD9] = true; // ?, CAPITAL LETTER U WITH GRAVE ACCENT
+ IsLetterTab[0xDA] = true; // ?, CAPITAL LETTER U WITH ACUTE ACCENT
+ IsLetterTab[0xDB] = true; // ?, CAPITAL LETTER U WITH CIRCUMFLEX ACCENT
+ IsLetterTab[0xDC] = true; // ?, CAPITAL LETTER U WITH DIAERESIS
+ IsLetterTab[0xDD] = true; // ?, CAPITAL LETTER Y WITH ACUTE ACCENT
+ IsLetterTab[0xDE] = true; // ?, CAPITAL LETTER THORN
+ IsLetterTab[0xDF] = true; // ?, SMALL LETTER SHARP S
+ IsLetterTab[0xE0] = true; // ?, SMALL LETTER A WITH GRAVE ACCENT
+ IsLetterTab[0xE1] = true; // ?, SMALL LETTER A WITH ACUTE ACCENT
+ IsLetterTab[0xE2] = true; // ?, SMALL LETTER A WITH CIRCUMFLEX ACCENT
+ IsLetterTab[0xE3] = true; // ?, SMALL LETTER A WITH TILDE
+ IsLetterTab[0xE4] = true; // ?, SMALL LETTER A WITH DIAERESIS
+ IsLetterTab[0xE5] = true; // ?, SMALL LETTER A WITH RING ABOVE
+ IsLetterTab[0xE6] = true; // ?, SMALL LIGATURE AE
+ IsLetterTab[0xE7] = true; // ?, SMALL LETTER C WITH CEDILLA
+ IsLetterTab[0xE8] = true; // ?, SMALL LETTER E WITH GRAVE ACCENT
+ IsLetterTab[0xE9] = true; // ?, SMALL LETTER E WITH ACUTE ACCENT
+ IsLetterTab[0xEA] = true; // ?, SMALL LETTER E WITH CIRCUMFLEX ACCENT
+ IsLetterTab[0xEB] = true; // ?, SMALL LETTER E WITH DIAERESIS
+ IsLetterTab[0xEC] = true; // ?, SMALL LETTER I WITH GRAVE ACCENT
+ IsLetterTab[0xED] = true; // ?, SMALL LETTER I WITH ACUTE ACCENT
+ IsLetterTab[0xEE] = true; // ?, SMALL LETTER I WITH CIRCUMFLEX ACCENT
+ IsLetterTab[0xEF] = true; // ?, SMALL LETTER I WITH DIAERESIS
+ IsLetterTab[0xF0] = true; // ?, SMALL LETTER ETH
+ IsLetterTab[0xF1] = true; // ?, SMALL LETTER N WITH TILDE
+ IsLetterTab[0xF2] = true; // ?, SMALL LETTER O WITH GRAVE ACCENT
+ IsLetterTab[0xF3] = true; // ?, SMALL LETTER O WITH ACUTE ACCENT
+ IsLetterTab[0xF4] = true; // ?, SMALL LETTER O WITH CIRCUMFLEX ACCENT
+ IsLetterTab[0xF5] = true; // ?, SMALL LETTER O WITH TILDE
+ IsLetterTab[0xF6] = true; // ?, SMALL LETTER O WITH DIAERESIS
+ IsLetterTab[0xF8] = true; // ?, SMALL LETTER O WITH OBLIQUE BAR
+ IsLetterTab[0xF9] = true; // ?, SMALL LETTER U WITH GRAVE ACCENT
+ IsLetterTab[0xFA] = true; // ?, SMALL LETTER U WITH ACUTE ACCENT
+ IsLetterTab[0xFB] = true; // ?, SMALL LETTER U WITH CIRCUMFLEX ACCENT
+ IsLetterTab[0xFC] = true; // ?, SMALL LETTER U WITH DIAERESIS
+ IsLetterTab[0xFD] = true; // ?, SMALL LETTER Y WITH ACUTE ACCENT
+ IsLetterTab[0xFE] = true; // ?, SMALL LETTER THORN
+ IsLetterTab[0xFF] = true; // � , SMALL LETTER Y WITH DIAERESIS
}
bool LetterTable::isLetterUnicode( sal_Unicode c )
@@ -358,7 +358,7 @@ bool LetterTable::isLetterUnicode( sal_Unicode c )
}
// Hilfsfunktion: Zeichen-Flag Testen
-BOOL SimpleTokenizer_Impl::testCharFlags( sal_Unicode c, USHORT nTestFlags )
+sal_Bool SimpleTokenizer_Impl::testCharFlags( sal_Unicode c, sal_uInt16 nTestFlags )
{
bool bRet = false;
if( c != 0 && c <= 255 )
@@ -373,14 +373,14 @@ BOOL SimpleTokenizer_Impl::testCharFlags( sal_Unicode c, USHORT nTestFlags )
return bRet;
}
-void SimpleTokenizer_Impl::setKeyWords( const char** ppKeyWords, UINT16 nCount )
+void SimpleTokenizer_Impl::setKeyWords( const char** ppKeyWords, sal_uInt16 nCount )
{
ppListKeyWords = ppKeyWords;
nKeyWordCount = nCount;
}
// Neues Token holen
-BOOL SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
+sal_Bool SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
/*out*/const sal_Unicode*& rpStartPos, /*out*/const sal_Unicode*& rpEndPos )
{
reType = TT_UNKNOWN;
@@ -391,25 +391,25 @@ BOOL SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
// Zeichen untersuchen
sal_Unicode c = peekChar();
if( c == CHAR_EOF )
- return FALSE;
+ return sal_False;
// Zeichen lesen
getChar();
//*** Alle Moeglichkeiten durchgehen ***
// Space?
- if ( (testCharFlags( c, CHAR_SPACE ) == TRUE) )
+ if ( (testCharFlags( c, CHAR_SPACE ) == sal_True) )
{
- while( testCharFlags( peekChar(), CHAR_SPACE ) == TRUE )
+ while( testCharFlags( peekChar(), CHAR_SPACE ) == sal_True )
getChar();
reType = TT_WHITESPACE;
}
// Identifier?
- else if ( (testCharFlags( c, CHAR_START_IDENTIFIER ) == TRUE) )
+ else if ( (testCharFlags( c, CHAR_START_IDENTIFIER ) == sal_True) )
{
- BOOL bIdentifierChar;
+ sal_Bool bIdentifierChar;
do
{
// Naechstes Zeichen holen
@@ -452,7 +452,7 @@ BOOL SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
{
// Alle Zeichen bis Zeilen-Ende oder EOF entfernen
sal_Unicode cPeek = peekChar();
- while( cPeek != CHAR_EOF && testCharFlags( cPeek, CHAR_EOL ) == FALSE )
+ while( cPeek != CHAR_EOF && testCharFlags( cPeek, CHAR_EOL ) == sal_False )
{
c = getChar();
cPeek = peekChar();
@@ -467,14 +467,14 @@ BOOL SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
// Operator?
// only for BASIC '\'' should be a comment, otherwise it is a normal string and handled there
- else if ( ( testCharFlags( c, CHAR_OPERATOR ) == TRUE ) || ( (c == '\'') && (aLanguage==HIGHLIGHT_BASIC)) )
+ else if ( ( testCharFlags( c, CHAR_OPERATOR ) == sal_True ) || ( (c == '\'') && (aLanguage==HIGHLIGHT_BASIC)) )
{
// paramters for SQL view
if ( (c==':') || (c=='?'))
{
if (c!='?')
{
- BOOL bIdentifierChar;
+ sal_Bool bIdentifierChar;
do
{
// Naechstes Zeichen holen
@@ -493,7 +493,7 @@ BOOL SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
if (cPeekNext=='-')
{
// Alle Zeichen bis Zeilen-Ende oder EOF entfernen
- while( cPeekNext != CHAR_EOF && testCharFlags( cPeekNext, CHAR_EOL ) == FALSE )
+ while( cPeekNext != CHAR_EOF && testCharFlags( cPeekNext, CHAR_EOL ) == sal_False )
{
getChar();
cPeekNext = peekChar();
@@ -507,7 +507,7 @@ BOOL SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
if (cPeekNext=='/')
{
// Alle Zeichen bis Zeilen-Ende oder EOF entfernen
- while( cPeekNext != CHAR_EOF && testCharFlags( cPeekNext, CHAR_EOL ) == FALSE )
+ while( cPeekNext != CHAR_EOF && testCharFlags( cPeekNext, CHAR_EOL ) == sal_False )
{
getChar();
cPeekNext = peekChar();
@@ -524,7 +524,7 @@ BOOL SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
// Alle Zeichen bis Zeilen-Ende oder EOF entfernen
sal_Unicode cPeek = c;
- while( cPeek != CHAR_EOF && testCharFlags( cPeek, CHAR_EOL ) == FALSE )
+ while( cPeek != CHAR_EOF && testCharFlags( cPeek, CHAR_EOL ) == sal_False )
{
getChar();
cPeek = peekChar();
@@ -551,7 +551,7 @@ BOOL SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
}
// Zahl?
- else if( testCharFlags( c, CHAR_START_NUMBER ) == TRUE )
+ else if( testCharFlags( c, CHAR_START_NUMBER ) == sal_True )
{
reType = TT_NUMBER;
@@ -593,7 +593,7 @@ BOOL SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
if( reType == TT_NUMBER && nRadix == 10 )
{
// Flag, ob das letzte Zeichen ein Exponent war
- BOOL bAfterExpChar = FALSE;
+ sal_Bool bAfterExpChar = sal_False;
// Alle Ziffern einlesen
while( testCharFlags( peekChar(), CHAR_IN_NUMBER ) ||
@@ -610,7 +610,7 @@ BOOL SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
}
// String?
- else if( testCharFlags( c, CHAR_START_STRING ) == TRUE )
+ else if( testCharFlags( c, CHAR_START_STRING ) == sal_True )
{
// Merken, welches Zeichen den String eroeffnet hat
sal_Unicode cEndString = c;
@@ -628,7 +628,7 @@ BOOL SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
break;
}
c = getChar();
- if( testCharFlags( c, CHAR_EOL ) == TRUE )
+ if( testCharFlags( c, CHAR_EOL ) == sal_True )
{
// ERROR: unterminated string literal
reType = TT_ERROR;
@@ -648,11 +648,11 @@ BOOL SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
}
// Zeilenende?
- else if( testCharFlags( c, CHAR_EOL ) == TRUE )
+ else if( testCharFlags( c, CHAR_EOL ) == sal_True )
{
// Falls ein weiteres anderes EOL-Char folgt, weg damit
sal_Unicode cNext = peekChar();
- if( cNext != c && testCharFlags( cNext, CHAR_EOL ) == TRUE )
+ if( cNext != c && testCharFlags( cNext, CHAR_EOL ) == sal_True )
getChar();
// Positions-Daten auf Zeilen-Beginn setzen
@@ -667,13 +667,13 @@ BOOL SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
// End-Position eintragen
rpEndPos = mpActualPos;
- return TRUE;
+ return sal_True;
}
String SimpleTokenizer_Impl::getTokStr
( /*out*/const sal_Unicode* pStartPos, /*out*/const sal_Unicode* pEndPos )
{
- return String( pStartPos, (USHORT)( pEndPos - pStartPos ) );
+ return String( pStartPos, (sal_uInt16)( pEndPos - pStartPos ) );
}
#ifdef DBG_UTIL
@@ -698,7 +698,7 @@ String SimpleTokenizer_Impl::getFullTokenStr( /*out*/TokenTypes eType,
}
if( eType != TT_EOL )
{
- aOut += String( pStartPos, (USHORT)( pEndPos - pStartPos ) );
+ aOut += String( pStartPos, (sal_uInt16)( pEndPos - pStartPos ) );
}
aOut += String( RTL_CONSTASCII_USTRINGPARAM("\n") );
return aOut;
@@ -710,10 +710,10 @@ SimpleTokenizer_Impl::SimpleTokenizer_Impl( HighlighterLanguage aLang ): aLangua
memset( aCharTypeTab, 0, sizeof( aCharTypeTab ) );
// Zeichen-Tabelle fuellen
- USHORT i;
+ sal_uInt16 i;
// Zulaessige Zeichen fuer Identifier
- USHORT nHelpMask = (USHORT)( CHAR_START_IDENTIFIER | CHAR_IN_IDENTIFIER );
+ sal_uInt16 nHelpMask = (sal_uInt16)( CHAR_START_IDENTIFIER | CHAR_IN_IDENTIFIER );
for( i = 'a' ; i <= 'z' ; i++ )
aCharTypeTab[i] |= nHelpMask;
for( i = 'A' ; i <= 'Z' ; i++ )
@@ -724,7 +724,7 @@ SimpleTokenizer_Impl::SimpleTokenizer_Impl( HighlighterLanguage aLang ): aLangua
aCharTypeTab[(int)'$'] |= nHelpMask;
// Ziffern (Identifier und Number ist moeglich)
- nHelpMask = (USHORT)( CHAR_IN_IDENTIFIER | CHAR_START_NUMBER |
+ nHelpMask = (sal_uInt16)( CHAR_IN_IDENTIFIER | CHAR_START_NUMBER |
CHAR_IN_NUMBER | CHAR_IN_HEX_NUMBER );
for( i = '0' ; i <= '9' ; i++ )
aCharTypeTab[i] |= nHelpMask;
@@ -732,7 +732,7 @@ SimpleTokenizer_Impl::SimpleTokenizer_Impl( HighlighterLanguage aLang ): aLangua
// e und E sowie . von Hand ergaenzen
aCharTypeTab[(int)'e'] |= CHAR_IN_NUMBER;
aCharTypeTab[(int)'E'] |= CHAR_IN_NUMBER;
- aCharTypeTab[(int)'.'] |= (USHORT)( CHAR_IN_NUMBER | CHAR_START_NUMBER );
+ aCharTypeTab[(int)'.'] |= (sal_uInt16)( CHAR_IN_NUMBER | CHAR_START_NUMBER );
aCharTypeTab[(int)'&'] |= CHAR_START_NUMBER;
// Hex-Ziffern
@@ -800,7 +800,7 @@ SimpleTokenizer_Impl* getSimpleTokenizer( void )
}
// Heraussuchen der jeweils naechsten Funktion aus einem JavaScript-Modul
-UINT16 SimpleTokenizer_Impl::parseLine( UINT32 nParseLine, const String* aSource )
+sal_uInt16 SimpleTokenizer_Impl::parseLine( sal_uInt32 nParseLine, const String* aSource )
{
// Position auf den Anfang des Source-Strings setzen
mpStringBegin = mpActualPos = aSource->GetBuffer();
@@ -815,14 +815,14 @@ UINT16 SimpleTokenizer_Impl::parseLine( UINT32 nParseLine, const String* aSource
const sal_Unicode* pEndPos;
// Schleife ueber alle Tokens
- UINT16 nTokenCount = 0;
+ sal_uInt16 nTokenCount = 0;
while( getNextToken( eType, pStartPos, pEndPos ) )
nTokenCount++;
return nTokenCount;
}
-void SimpleTokenizer_Impl::getHighlightPortions( UINT32 nParseLine, const String& rLine,
+void SimpleTokenizer_Impl::getHighlightPortions( sal_uInt32 nParseLine, const String& rLine,
/*out*/HighlightPortions& portions )
{
// Position auf den Anfang des Source-Strings setzen
@@ -842,8 +842,8 @@ void SimpleTokenizer_Impl::getHighlightPortions( UINT32 nParseLine, const String
{
HighlightPortion portion;
- portion.nBegin = (UINT16)(pStartPos - mpStringBegin);
- portion.nEnd = (UINT16)(pEndPos - mpStringBegin);
+ portion.nBegin = (sal_uInt16)(pStartPos - mpStringBegin);
+ portion.nEnd = (sal_uInt16)(pEndPos - mpStringBegin);
portion.tokenType = eType;
portions.push_back(portion);
@@ -888,18 +888,18 @@ void SyntaxHighlighter::initialize( HighlighterLanguage eLanguage_ )
}
}
-const Range SyntaxHighlighter::notifyChange( UINT32 nLine, INT32 nLineCountDifference,
- const String* pChangedLines, UINT32 nArrayLength)
+const Range SyntaxHighlighter::notifyChange( sal_uInt32 nLine, sal_Int32 nLineCountDifference,
+ const String* pChangedLines, sal_uInt32 nArrayLength)
{
(void)nLineCountDifference;
- for( UINT32 i=0 ; i < nArrayLength ; i++ )
+ for( sal_uInt32 i=0 ; i < nArrayLength ; i++ )
m_pSimpleTokenizer->parseLine(nLine+i, &pChangedLines[i]);
return Range( nLine, nLine + nArrayLength-1 );
}
-void SyntaxHighlighter::getHighlightPortions( UINT32 nLine, const String& rLine,
+void SyntaxHighlighter::getHighlightPortions( sal_uInt32 nLine, const String& rLine,
/*out*/HighlightPortions& portions )
{
m_pSimpleTokenizer->getHighlightPortions( nLine, rLine, portions );
diff --git a/svtools/source/edit/textdat2.hxx b/svtools/source/edit/textdat2.hxx
index 222e8abee5a4..17b4454a109f 100644
--- a/svtools/source/edit/textdat2.hxx
+++ b/svtools/source/edit/textdat2.hxx
@@ -56,35 +56,35 @@ class TextView;
class TETextPortion
{
private:
- USHORT nLen;
+ sal_uInt16 nLen;
long nWidth;
- BYTE nKind;
- BYTE nRightToLeft;
+ sal_uInt8 nKind;
+ sal_uInt8 nRightToLeft;
TETextPortion() { nLen = 0; nKind = PORTIONKIND_TEXT; nWidth = -1; nRightToLeft = 0;}
public:
- TETextPortion( USHORT nL ) {
+ TETextPortion( sal_uInt16 nL ) {
nLen = nL;
nKind = PORTIONKIND_TEXT;
nWidth= -1;
nRightToLeft = 0;
}
- USHORT GetLen() const { return nLen; }
- USHORT& GetLen() { return nLen; }
+ sal_uInt16 GetLen() const { return nLen; }
+ sal_uInt16& GetLen() { return nLen; }
long GetWidth()const { return nWidth; }
long& GetWidth() { return nWidth; }
- BYTE GetKind() const { return nKind; }
- BYTE& GetKind() { return nKind; }
+ sal_uInt8 GetKind() const { return nKind; }
+ sal_uInt8& GetKind() { return nKind; }
- BYTE GetRightToLeft() const { return nRightToLeft; }
- BYTE& GetRightToLeft() { return nRightToLeft; }
- BOOL IsRightToLeft() const { return (nRightToLeft&1); }
+ sal_uInt8 GetRightToLeft() const { return nRightToLeft; }
+ sal_uInt8& GetRightToLeft() { return nRightToLeft; }
+ sal_Bool IsRightToLeft() const { return (nRightToLeft&1); }
- BOOL HasValidSize() const { return nWidth != (-1); }
+ sal_Bool HasValidSize() const { return nWidth != (-1); }
};
@@ -99,17 +99,17 @@ public:
~TETextPortionList();
void Reset();
- USHORT FindPortion( USHORT nCharPos, USHORT& rPortionStart, BOOL bPreferStartingPortion = FALSE );
- USHORT GetPortionStartIndex( USHORT nPortion );
- void DeleteFromPortion( USHORT nDelFrom );
+ sal_uInt16 FindPortion( sal_uInt16 nCharPos, sal_uInt16& rPortionStart, sal_Bool bPreferStartingPortion = sal_False );
+ sal_uInt16 GetPortionStartIndex( sal_uInt16 nPortion );
+ void DeleteFromPortion( sal_uInt16 nDelFrom );
};
struct TEWritingDirectionInfo
{
- BYTE nType;
- USHORT nStartPos;
- USHORT nEndPos;
- TEWritingDirectionInfo( BYTE _Type, USHORT _Start, USHORT _End )
+ sal_uInt8 nType;
+ sal_uInt16 nStartPos;
+ sal_uInt16 nEndPos;
+ TEWritingDirectionInfo( sal_uInt8 _Type, sal_uInt16 _Start, sal_uInt16 _End )
{
nType = _Type;
nStartPos = _Start;
@@ -122,65 +122,65 @@ SV_DECL_VARARR( TEWritingDirectionInfos, TEWritingDirectionInfo, 0, 4 )
class TextLine
{
private:
- USHORT mnStart;
- USHORT mnEnd;
- USHORT mnStartPortion;
- USHORT mnEndPortion;
+ sal_uInt16 mnStart;
+ sal_uInt16 mnEnd;
+ sal_uInt16 mnStartPortion;
+ sal_uInt16 mnEndPortion;
short mnStartX;
- BOOL mbInvalid; // fuer geschickte Formatierung/Ausgabe
+ sal_Bool mbInvalid; // fuer geschickte Formatierung/Ausgabe
public:
TextLine() {
mnStart = mnEnd = 0;
mnStartPortion = mnEndPortion = 0;
mnStartX = 0;
- mbInvalid = TRUE;
+ mbInvalid = sal_True;
}
- BOOL IsIn( USHORT nIndex ) const
+ sal_Bool IsIn( sal_uInt16 nIndex ) const
{ return ( (nIndex >= mnStart ) && ( nIndex < mnEnd ) ); }
- BOOL IsIn( USHORT nIndex, BOOL bInclEnd ) const
+ sal_Bool IsIn( sal_uInt16 nIndex, sal_Bool bInclEnd ) const
{ return ( ( nIndex >= mnStart ) && ( bInclEnd ? ( nIndex <= mnEnd ) : ( nIndex < mnEnd ) ) ); }
- void SetStart( USHORT n ) { mnStart = n; }
- USHORT GetStart() const { return mnStart; }
- USHORT& GetStart() { return mnStart; }
+ void SetStart( sal_uInt16 n ) { mnStart = n; }
+ sal_uInt16 GetStart() const { return mnStart; }
+ sal_uInt16& GetStart() { return mnStart; }
- void SetEnd( USHORT n ) { mnEnd = n; }
- USHORT GetEnd() const { return mnEnd; }
- USHORT& GetEnd() { return mnEnd; }
+ void SetEnd( sal_uInt16 n ) { mnEnd = n; }
+ sal_uInt16 GetEnd() const { return mnEnd; }
+ sal_uInt16& GetEnd() { return mnEnd; }
- void SetStartPortion( USHORT n ) { mnStartPortion = n; }
- USHORT GetStartPortion() const { return mnStartPortion; }
- USHORT& GetStartPortion() { return mnStartPortion; }
+ void SetStartPortion( sal_uInt16 n ) { mnStartPortion = n; }
+ sal_uInt16 GetStartPortion() const { return mnStartPortion; }
+ sal_uInt16& GetStartPortion() { return mnStartPortion; }
- void SetEndPortion( USHORT n ) { mnEndPortion = n; }
- USHORT GetEndPortion() const { return mnEndPortion; }
- USHORT& GetEndPortion() { return mnEndPortion; }
+ void SetEndPortion( sal_uInt16 n ) { mnEndPortion = n; }
+ sal_uInt16 GetEndPortion() const { return mnEndPortion; }
+ sal_uInt16& GetEndPortion() { return mnEndPortion; }
- USHORT GetLen() const { return mnEnd - mnStart; }
+ sal_uInt16 GetLen() const { return mnEnd - mnStart; }
- BOOL IsInvalid() const { return mbInvalid; }
- BOOL IsValid() const { return !mbInvalid; }
- void SetInvalid() { mbInvalid = TRUE; }
- void SetValid() { mbInvalid = FALSE; }
+ sal_Bool IsInvalid() const { return mbInvalid; }
+ sal_Bool IsValid() const { return !mbInvalid; }
+ void SetInvalid() { mbInvalid = sal_True; }
+ void SetValid() { mbInvalid = sal_False; }
- BOOL IsEmpty() const { return (mnEnd > mnStart) ? FALSE : TRUE; }
+ sal_Bool IsEmpty() const { return (mnEnd > mnStart) ? sal_False : sal_True; }
short GetStartX() const { return mnStartX; }
void SetStartX( short n ) { mnStartX = n; }
- inline BOOL operator == ( const TextLine& rLine ) const;
- inline BOOL operator != ( const TextLine& rLine ) const;
+ inline sal_Bool operator == ( const TextLine& rLine ) const;
+ inline sal_Bool operator != ( const TextLine& rLine ) const;
};
typedef TextLine* TextLinePtr;
SV_DECL_PTRARR_DEL( TextLines, TextLinePtr, 1, 4 )
-inline BOOL TextLine::operator == ( const TextLine& rLine ) const
+inline sal_Bool TextLine::operator == ( const TextLine& rLine ) const
{
return ( ( mnStart == rLine.mnStart ) &&
( mnEnd == rLine.mnEnd ) &&
@@ -188,7 +188,7 @@ inline BOOL TextLine::operator == ( const TextLine& rLine ) const
( mnEndPortion == rLine.mnEndPortion ) );
}
-inline BOOL TextLine::operator != ( const TextLine& rLine ) const
+inline sal_Bool TextLine::operator != ( const TextLine& rLine ) const
{
return !( *this == rLine );
}
@@ -205,11 +205,11 @@ private:
TEWritingDirectionInfos maWritingDirectionInfos;
- USHORT mnInvalidPosStart;
+ sal_uInt16 mnInvalidPosStart;
short mnInvalidDiff;
- BOOL mbInvalid;
- BOOL mbSimple; // nur lineares Tippen
+ sal_Bool mbInvalid;
+ sal_Bool mbSimple; // nur lineares Tippen
TEParaPortion( const TEParaPortion& ) {;}
@@ -219,15 +219,15 @@ public:
~TEParaPortion();
- BOOL IsInvalid() const { return mbInvalid; }
- BOOL IsSimpleInvalid() const { return mbSimple; }
- void SetNotSimpleInvalid() { mbSimple = FALSE; }
- void SetValid() { mbInvalid = FALSE; mbSimple = TRUE;}
+ sal_Bool IsInvalid() const { return mbInvalid; }
+ sal_Bool IsSimpleInvalid() const { return mbSimple; }
+ void SetNotSimpleInvalid() { mbSimple = sal_False; }
+ void SetValid() { mbInvalid = sal_False; mbSimple = sal_True;}
- void MarkInvalid( USHORT nStart, short nDiff);
- void MarkSelectionInvalid( USHORT nStart, USHORT nEnd );
+ void MarkInvalid( sal_uInt16 nStart, short nDiff);
+ void MarkSelectionInvalid( sal_uInt16 nStart, sal_uInt16 nEnd );
- USHORT GetInvalidPosStart() const { return mnInvalidPosStart; }
+ sal_uInt16 GetInvalidPosStart() const { return mnInvalidPosStart; }
short GetInvalidDiff() const { return mnInvalidDiff; }
TextNode* GetNode() const { return mpNode; }
@@ -236,8 +236,8 @@ public:
TEWritingDirectionInfos& GetWritingDirectionInfos() { return maWritingDirectionInfos; }
- USHORT GetLineNumber( USHORT nIndex, BOOL bInclEnd );
- void CorrectValuesBehindLastFormattedLine( USHORT nLastFormattedLine );
+ sal_uInt16 GetLineNumber( sal_uInt16 nIndex, sal_Bool bInclEnd );
+ void CorrectValuesBehindLastFormattedLine( sal_uInt16 nLastFormattedLine );
};
@@ -262,9 +262,9 @@ public:
virtual void CreateAnchor();
- virtual BOOL SetCursorAtPoint( const Point& rPointPixel, BOOL bDontSelectAtCursor = FALSE );
+ virtual sal_Bool SetCursorAtPoint( const Point& rPointPixel, sal_Bool bDontSelectAtCursor = sal_False );
- virtual BOOL IsSelectionAtPoint( const Point& rPointPixel );
+ virtual sal_Bool IsSelectionAtPoint( const Point& rPointPixel );
virtual void DeselectAll();
virtual void DeselectAtPoint( const Point& );
@@ -276,13 +276,13 @@ class IdleFormatter : public Timer
{
private:
TextView* mpView;
- USHORT mnRestarts;
+ sal_uInt16 mnRestarts;
public:
IdleFormatter();
~IdleFormatter();
- void DoIdleFormat( TextView* pV, USHORT nMaxRestarts );
+ void DoIdleFormat( TextView* pV, sal_uInt16 nMaxRestarts );
void ForceTimeout();
TextView* GetView() { return mpView; }
};
@@ -292,14 +292,14 @@ struct TextDDInfo
Cursor maCursor;
TextPaM maDropPos;
- BOOL mbStarterOfDD;
- BOOL mbVisCursor;
+ sal_Bool mbStarterOfDD;
+ sal_Bool mbVisCursor;
TextDDInfo()
{
maCursor.SetStyle( CURSOR_SHADOW );
- mbStarterOfDD = FALSE;
- mbVisCursor = FALSE;
+ mbStarterOfDD = sal_False;
+ mbVisCursor = sal_False;
}
};
diff --git a/svtools/source/edit/textdata.cxx b/svtools/source/edit/textdata.cxx
index cb33ea7d50e6..1cefb30700df 100644
--- a/svtools/source/edit/textdata.cxx
+++ b/svtools/source/edit/textdata.cxx
@@ -80,24 +80,24 @@ TETextPortionList::~TETextPortionList()
void TETextPortionList::Reset()
{
- for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ )
+ for ( sal_uInt16 nPortion = 0; nPortion < Count(); nPortion++ )
delete GetObject( nPortion );
Remove( 0, Count() );
}
-void TETextPortionList::DeleteFromPortion( USHORT nDelFrom )
+void TETextPortionList::DeleteFromPortion( sal_uInt16 nDelFrom )
{
DBG_ASSERT( ( nDelFrom < Count() ) || ( (nDelFrom == 0) && (Count() == 0) ), "DeleteFromPortion: Out of range" );
- for ( USHORT nP = nDelFrom; nP < Count(); nP++ )
+ for ( sal_uInt16 nP = nDelFrom; nP < Count(); nP++ )
delete GetObject( nP );
Remove( nDelFrom, Count()-nDelFrom );
}
-USHORT TETextPortionList::FindPortion( USHORT nCharPos, USHORT& nPortionStart, BOOL bPreferStartingPortion )
+sal_uInt16 TETextPortionList::FindPortion( sal_uInt16 nCharPos, sal_uInt16& nPortionStart, sal_Bool bPreferStartingPortion )
{
// Bei nCharPos an Portion-Grenze wird die linke Portion gefunden
- USHORT nTmpPos = 0;
- for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ )
+ sal_uInt16 nTmpPos = 0;
+ for ( sal_uInt16 nPortion = 0; nPortion < Count(); nPortion++ )
{
TETextPortion* pPortion = GetObject( nPortion );
nTmpPos = nTmpPos + pPortion->GetLen();
@@ -116,10 +116,10 @@ USHORT TETextPortionList::FindPortion( USHORT nCharPos, USHORT& nPortionStart, B
}
/*
-USHORT TETextPortionList::GetPortionStartIndex( USHORT nPortion )
+sal_uInt16 TETextPortionList::GetPortionStartIndex( sal_uInt16 nPortion )
{
- USHORT nPos = 0;
- for ( USHORT nP = 0; nP < nPortion; nP++ )
+ sal_uInt16 nPos = 0;
+ for ( sal_uInt16 nP = 0; nP < nPortion; nP++ )
{
TETextPortion* pPortion = GetObject( nP );
nPos += pPortion->GetLen();
@@ -136,17 +136,17 @@ TEParaPortion::TEParaPortion( TextNode* pN )
{
mpNode = pN;
mnInvalidPosStart = mnInvalidDiff = 0;
- mbInvalid = TRUE;
- mbSimple = FALSE;
+ mbInvalid = sal_True;
+ mbSimple = sal_False;
}
TEParaPortion::~TEParaPortion()
{
}
-void TEParaPortion::MarkInvalid( USHORT nStart, short nDiff )
+void TEParaPortion::MarkInvalid( sal_uInt16 nStart, short nDiff )
{
- if ( mbInvalid == FALSE )
+ if ( mbInvalid == sal_False )
{
mnInvalidPosStart = ( nDiff >= 0 ) ? nStart : ( nStart + nDiff );
mnInvalidDiff = nDiff;
@@ -168,20 +168,20 @@ void TEParaPortion::MarkInvalid( USHORT nStart, short nDiff )
else
{
DBG_ASSERT( ( nDiff >= 0 ) || ( (nStart+nDiff) >= 0 ), "MarkInvalid: Diff out of Range" );
- mnInvalidPosStart = Min( mnInvalidPosStart, (USHORT) ( (nDiff < 0) ? nStart+nDiff : nDiff ) );
+ mnInvalidPosStart = Min( mnInvalidPosStart, (sal_uInt16) ( (nDiff < 0) ? nStart+nDiff : nDiff ) );
mnInvalidDiff = 0;
- mbSimple = FALSE;
+ mbSimple = sal_False;
}
}
maWritingDirectionInfos.Remove( 0, maWritingDirectionInfos.Count() );
- mbInvalid = TRUE;
+ mbInvalid = sal_True;
}
-void TEParaPortion::MarkSelectionInvalid( USHORT nStart, USHORT /*nEnd*/ )
+void TEParaPortion::MarkSelectionInvalid( sal_uInt16 nStart, sal_uInt16 /*nEnd*/ )
{
- if ( mbInvalid == FALSE )
+ if ( mbInvalid == sal_False )
{
mnInvalidPosStart = nStart;
// nInvalidPosEnd = nEnd;
@@ -195,13 +195,13 @@ void TEParaPortion::MarkSelectionInvalid( USHORT nStart, USHORT /*nEnd*/ )
maWritingDirectionInfos.Remove( 0, maWritingDirectionInfos.Count() );
mnInvalidDiff = 0;
- mbInvalid = TRUE;
- mbSimple = FALSE;
+ mbInvalid = sal_True;
+ mbSimple = sal_False;
}
-USHORT TEParaPortion::GetLineNumber( USHORT nChar, BOOL bInclEnd )
+sal_uInt16 TEParaPortion::GetLineNumber( sal_uInt16 nChar, sal_Bool bInclEnd )
{
- for ( USHORT nLine = 0; nLine < maLines.Count(); nLine++ )
+ for ( sal_uInt16 nLine = 0; nLine < maLines.Count(); nLine++ )
{
TextLine* pLine = maLines.GetObject( nLine );
if ( ( bInclEnd && ( pLine->GetEnd() >= nChar ) ) ||
@@ -218,9 +218,9 @@ USHORT TEParaPortion::GetLineNumber( USHORT nChar, BOOL bInclEnd )
}
-void TEParaPortion::CorrectValuesBehindLastFormattedLine( USHORT nLastFormattedLine )
+void TEParaPortion::CorrectValuesBehindLastFormattedLine( sal_uInt16 nLastFormattedLine )
{
- USHORT nLines = maLines.Count();
+ sal_uInt16 nLines = maLines.Count();
DBG_ASSERT( nLines, "CorrectPortionNumbersFromLine: Leere Portion?" );
if ( nLastFormattedLine < ( nLines - 1 ) )
{
@@ -238,7 +238,7 @@ void TEParaPortion::CorrectValuesBehindLastFormattedLine( USHORT nLastFormattedL
short nTDiff = sal::static_int_cast< short >(-( nTextDiff-1 ));
if ( nPDiff || nTDiff )
{
- for ( USHORT nL = nLastFormattedLine+1; nL < nLines; nL++ )
+ for ( sal_uInt16 nL = nLastFormattedLine+1; nL < nLines; nL++ )
{
TextLine* pLine = maLines[ nL ];
@@ -288,7 +288,7 @@ IdleFormatter::~IdleFormatter()
mpView = 0;
}
-void IdleFormatter::DoIdleFormat( TextView* pV, USHORT nMaxRestarts )
+void IdleFormatter::DoIdleFormat( TextView* pV, sal_uInt16 nMaxRestarts )
{
mpView = pV;
@@ -318,12 +318,12 @@ void IdleFormatter::ForceTimeout()
TYPEINIT1( TextHint, SfxSimpleHint );
-TextHint::TextHint( ULONG Id ) : SfxSimpleHint( Id )
+TextHint::TextHint( sal_uLong Id ) : SfxSimpleHint( Id )
{
mnValue = 0;
}
-TextHint::TextHint( ULONG Id, ULONG nValue ) : SfxSimpleHint( Id )
+TextHint::TextHint( sal_uLong Id, sal_uLong nValue ) : SfxSimpleHint( Id )
{
mnValue = nValue;
}
@@ -333,9 +333,9 @@ TEIMEInfos::TEIMEInfos( const TextPaM& rPos, const String& rOldTextAfterStartPos
{
aPos = rPos;
nLen = 0;
- bCursor = TRUE;
+ bCursor = sal_True;
pAttribs = NULL;
- bWasCursorOverwrite = FALSE;
+ bWasCursorOverwrite = sal_False;
}
TEIMEInfos::~TEIMEInfos()
@@ -343,12 +343,12 @@ TEIMEInfos::~TEIMEInfos()
delete[] pAttribs;
}
-void TEIMEInfos::CopyAttribs( const USHORT* pA, USHORT nL )
+void TEIMEInfos::CopyAttribs( const sal_uInt16* pA, sal_uInt16 nL )
{
nLen = nL;
delete pAttribs;
- pAttribs = new USHORT[ nL ];
- memcpy( pAttribs, pA, nL*sizeof(USHORT) );
+ pAttribs = new sal_uInt16[ nL ];
+ memcpy( pAttribs, pA, nL*sizeof(sal_uInt16) );
}
void TEIMEInfos::DestroyAttribs()
diff --git a/svtools/source/edit/textdoc.cxx b/svtools/source/edit/textdoc.cxx
index 1f7fa9745c8c..2dfb014117b1 100644
--- a/svtools/source/edit/textdoc.cxx
+++ b/svtools/source/edit/textdoc.cxx
@@ -65,7 +65,7 @@ CompareStart( const void* pFirst, const void* pSecond )
// -------------------------------------------------------------------------
// (+) class TextCharAttrib
// -------------------------------------------------------------------------
-TextCharAttrib::TextCharAttrib( const TextAttrib& rAttr, USHORT nStart, USHORT nEnd )
+TextCharAttrib::TextCharAttrib( const TextAttrib& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd )
{
mpAttr = rAttr.Clone();
mnStart = nStart,
@@ -90,7 +90,7 @@ TextCharAttrib::~TextCharAttrib()
TextCharAttribList::TextCharAttribList()
{
- mbHasEmptyAttribs = FALSE;
+ mbHasEmptyAttribs = sal_False;
}
TextCharAttribList::~TextCharAttribList()
@@ -98,7 +98,7 @@ TextCharAttribList::~TextCharAttribList()
// PTRARR_DEL
}
-void TextCharAttribList::Clear( BOOL bDestroyAttribs )
+void TextCharAttribList::Clear( sal_Bool bDestroyAttribs )
{
if ( bDestroyAttribs )
TextCharAttribs::DeleteAndDestroy( 0, Count() );
@@ -110,18 +110,18 @@ void TextCharAttribList::Clear( BOOL bDestroyAttribs )
void TextCharAttribList::InsertAttrib( TextCharAttrib* pAttrib )
{
if ( pAttrib->IsEmpty() )
- mbHasEmptyAttribs = TRUE;
+ mbHasEmptyAttribs = sal_True;
- const USHORT nCount = Count();
- const USHORT nStart = pAttrib->GetStart(); // vielleicht besser fuer Comp.Opt.
- BOOL bInserted = FALSE;
- for ( USHORT x = 0; x < nCount; x++ )
+ const sal_uInt16 nCount = Count();
+ const sal_uInt16 nStart = pAttrib->GetStart(); // vielleicht besser fuer Comp.Opt.
+ sal_Bool bInserted = sal_False;
+ for ( sal_uInt16 x = 0; x < nCount; x++ )
{
TextCharAttrib* pCurAttrib = GetObject( x );
if ( pCurAttrib->GetStart() > nStart )
{
Insert( pAttrib, x );
- bInserted = TRUE;
+ bInserted = sal_True;
break;
}
}
@@ -135,12 +135,12 @@ void TextCharAttribList::ResortAttribs()
qsort( (void*)GetData(), Count(), sizeof( TextCharAttrib* ), CompareStart );
}
-TextCharAttrib* TextCharAttribList::FindAttrib( USHORT nWhich, USHORT nPos )
+TextCharAttrib* TextCharAttribList::FindAttrib( sal_uInt16 nWhich, sal_uInt16 nPos )
{
// Rueckwaerts, falls eins dort endet, das naechste startet.
// => Das startende gilt...
- for ( USHORT nAttr = Count(); nAttr; )
+ for ( sal_uInt16 nAttr = Count(); nAttr; )
{
TextCharAttrib* pAttr = GetObject( --nAttr );
@@ -153,11 +153,11 @@ TextCharAttrib* TextCharAttribList::FindAttrib( USHORT nWhich, USHORT nPos )
return NULL;
}
-TextCharAttrib* TextCharAttribList::FindNextAttrib( USHORT nWhich, USHORT nFromPos, USHORT nMaxPos ) const
+TextCharAttrib* TextCharAttribList::FindNextAttrib( sal_uInt16 nWhich, sal_uInt16 nFromPos, sal_uInt16 nMaxPos ) const
{
DBG_ASSERT( nWhich, "FindNextAttrib: Which?" );
- const USHORT nAttribs = Count();
- for ( USHORT nAttr = 0; nAttr < nAttribs; nAttr++ )
+ const sal_uInt16 nAttribs = Count();
+ for ( sal_uInt16 nAttr = 0; nAttr < nAttribs; nAttr++ )
{
TextCharAttrib* pAttr = GetObject( nAttr );
if ( ( pAttr->GetStart() >= nFromPos ) &&
@@ -168,41 +168,41 @@ TextCharAttrib* TextCharAttribList::FindNextAttrib( USHORT nWhich, USHORT nFromP
return NULL;
}
-BOOL TextCharAttribList::HasAttrib( USHORT nWhich ) const
+sal_Bool TextCharAttribList::HasAttrib( sal_uInt16 nWhich ) const
{
- for ( USHORT nAttr = Count(); nAttr; )
+ for ( sal_uInt16 nAttr = Count(); nAttr; )
{
const TextCharAttrib* pAttr = GetObject( --nAttr );
if ( pAttr->Which() == nWhich )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL TextCharAttribList::HasBoundingAttrib( USHORT nBound )
+sal_Bool TextCharAttribList::HasBoundingAttrib( sal_uInt16 nBound )
{
// Rueckwaerts, falls eins dort endet, das naechste startet.
// => Das startende gilt...
- for ( USHORT nAttr = Count(); nAttr; )
+ for ( sal_uInt16 nAttr = Count(); nAttr; )
{
TextCharAttrib* pAttr = GetObject( --nAttr );
if ( pAttr->GetEnd() < nBound )
- return FALSE;
+ return sal_False;
if ( ( pAttr->GetStart() == nBound ) || ( pAttr->GetEnd() == nBound ) )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-TextCharAttrib* TextCharAttribList::FindEmptyAttrib( USHORT nWhich, USHORT nPos )
+TextCharAttrib* TextCharAttribList::FindEmptyAttrib( sal_uInt16 nWhich, sal_uInt16 nPos )
{
if ( !mbHasEmptyAttribs )
return 0;
- const USHORT nAttribs = Count();
- for ( USHORT nAttr = 0; nAttr < nAttribs; nAttr++ )
+ const sal_uInt16 nAttribs = Count();
+ for ( sal_uInt16 nAttr = 0; nAttr < nAttribs; nAttr++ )
{
TextCharAttrib* pAttr = GetObject( nAttr );
if ( pAttr->GetStart() > nPos )
@@ -216,7 +216,7 @@ TextCharAttrib* TextCharAttribList::FindEmptyAttrib( USHORT nWhich, USHORT nPos
void TextCharAttribList::DeleteEmptyAttribs()
{
- for ( USHORT nAttr = 0; nAttr < Count(); nAttr++ )
+ for ( sal_uInt16 nAttr = 0; nAttr < Count(); nAttr++ )
{
TextCharAttrib* pAttr = GetObject( nAttr );
if ( pAttr->IsEmpty() )
@@ -226,19 +226,19 @@ void TextCharAttribList::DeleteEmptyAttribs()
nAttr--;
}
}
- mbHasEmptyAttribs = FALSE;
+ mbHasEmptyAttribs = sal_False;
}
#ifdef DBG_UTIL
-BOOL TextCharAttribList::DbgCheckAttribs()
+sal_Bool TextCharAttribList::DbgCheckAttribs()
{
- BOOL bOK = TRUE;
- for ( USHORT nAttr = 0; nAttr < Count(); nAttr++ )
+ sal_Bool bOK = sal_True;
+ for ( sal_uInt16 nAttr = 0; nAttr < Count(); nAttr++ )
{
TextCharAttrib* pAttr = GetObject( nAttr );
if ( pAttr->GetStart() > pAttr->GetEnd() )
{
- bOK = FALSE;
+ bOK = sal_False;
DBG_ERROR( "Attr verdreht" );
}
}
@@ -255,14 +255,14 @@ TextNode::TextNode( const String& rText ) :
{
}
-void TextNode::ExpandAttribs( USHORT nIndex, USHORT nNew )
+void TextNode::ExpandAttribs( sal_uInt16 nIndex, sal_uInt16 nNew )
{
if ( !nNew )
return;
- BOOL bResort = FALSE;
- USHORT nAttribs = maCharAttribs.Count();
- for ( USHORT nAttr = 0; nAttr < nAttribs; nAttr++ )
+ sal_Bool bResort = sal_False;
+ sal_uInt16 nAttribs = maCharAttribs.Count();
+ for ( sal_uInt16 nAttr = 0; nAttr < nAttribs; nAttr++ )
{
TextCharAttrib* pAttrib = maCharAttribs.GetAttrib( nAttr );
if ( pAttrib->GetEnd() >= nIndex )
@@ -293,7 +293,7 @@ void TextNode::ExpandAttribs( USHORT nIndex, USHORT nNew )
pAttrib->Expand( nNew );
}
else
- bResort = TRUE;
+ bResort = sal_True;
}
// 2: Attribut startet davor, geht hinter Index...
else if ( ( pAttrib->GetStart() < nIndex ) && ( pAttrib->GetEnd() > nIndex ) )
@@ -306,7 +306,7 @@ void TextNode::ExpandAttribs( USHORT nIndex, USHORT nNew )
if ( nIndex == 0 )
{
pAttrib->Expand( nNew );
-// bResort = TRUE; // es gibt ja keine Features mehr...
+// bResort = sal_True; // es gibt ja keine Features mehr...
}
else
pAttrib->MoveForward( nNew );
@@ -326,18 +326,18 @@ void TextNode::ExpandAttribs( USHORT nIndex, USHORT nNew )
#endif
}
-void TextNode::CollapsAttribs( USHORT nIndex, USHORT nDeleted )
+void TextNode::CollapsAttribs( sal_uInt16 nIndex, sal_uInt16 nDeleted )
{
if ( !nDeleted )
return;
- BOOL bResort = FALSE;
- USHORT nEndChanges = nIndex+nDeleted;
+ sal_Bool bResort = sal_False;
+ sal_uInt16 nEndChanges = nIndex+nDeleted;
- for ( USHORT nAttr = 0; nAttr < maCharAttribs.Count(); nAttr++ )
+ for ( sal_uInt16 nAttr = 0; nAttr < maCharAttribs.Count(); nAttr++ )
{
TextCharAttrib* pAttrib = maCharAttribs.GetAttrib( nAttr );
- BOOL bDelAttr = FALSE;
+ sal_Bool bDelAttr = sal_False;
if ( pAttrib->GetEnd() >= nIndex )
{
// Alles Attribute hinter der Einfuegeposition verschieben...
@@ -353,7 +353,7 @@ void TextNode::CollapsAttribs( USHORT nIndex, USHORT nDeleted )
if ( ( pAttrib->GetStart() == nIndex ) && ( pAttrib->GetEnd() == nEndChanges ) )
pAttrib->GetEnd() = nIndex; // leer
else
- bDelAttr = TRUE;
+ bDelAttr = sal_True;
}
// 2. Attribut beginnt davor, endet drinnen oder dahinter...
else if ( ( pAttrib->GetStart() <= nIndex ) && ( pAttrib->GetEnd() > nIndex ) )
@@ -376,13 +376,13 @@ void TextNode::CollapsAttribs( USHORT nIndex, USHORT nDeleted )
DBG_ASSERT( ( pAttrib->GetEnd() <= maText.Len()) || bDelAttr, "Collaps: Attrib groesser als Absatz!" );
if ( bDelAttr /* || pAttrib->IsEmpty() */ )
{
- bResort = TRUE;
+ bResort = sal_True;
maCharAttribs.RemoveAttrib( nAttr );
delete pAttrib;
nAttr--;
}
else if ( pAttrib->IsEmpty() )
- maCharAttribs.HasEmptyAttribs() = TRUE;
+ maCharAttribs.HasEmptyAttribs() = sal_True;
}
if ( bResort )
@@ -393,25 +393,25 @@ void TextNode::CollapsAttribs( USHORT nIndex, USHORT nDeleted )
#endif
}
-void TextNode::InsertText( USHORT nPos, const String& rText )
+void TextNode::InsertText( sal_uInt16 nPos, const String& rText )
{
maText.Insert( rText, nPos );
ExpandAttribs( nPos, rText.Len() );
}
-void TextNode::InsertText( USHORT nPos, sal_Unicode c )
+void TextNode::InsertText( sal_uInt16 nPos, sal_Unicode c )
{
maText.Insert( c, nPos );
ExpandAttribs( nPos, 1 );
}
-void TextNode::RemoveText( USHORT nPos, USHORT nChars )
+void TextNode::RemoveText( sal_uInt16 nPos, sal_uInt16 nChars )
{
maText.Erase( nPos, nChars );
CollapsAttribs( nPos, nChars );
}
-TextNode* TextNode::Split( USHORT nPos, BOOL bKeepEndingAttribs )
+TextNode* TextNode::Split( sal_uInt16 nPos, sal_Bool bKeepEndingAttribs )
{
String aNewText;
if ( nPos < maText.Len() )
@@ -421,7 +421,7 @@ TextNode* TextNode::Split( USHORT nPos, BOOL bKeepEndingAttribs )
}
TextNode* pNew = new TextNode( aNewText );
- for ( USHORT nAttr = 0; nAttr < maCharAttribs.Count(); nAttr++ )
+ for ( sal_uInt16 nAttr = 0; nAttr < maCharAttribs.Count(); nAttr++ )
{
TextCharAttrib* pAttrib = maCharAttribs.GetAttrib( nAttr );
if ( pAttrib->GetEnd() < nPos )
@@ -469,7 +469,7 @@ TextNode* TextNode::Split( USHORT nPos, BOOL bKeepEndingAttribs )
void TextNode::Append( const TextNode& rNode )
{
- USHORT nOldLen = maText.Len();
+ sal_uInt16 nOldLen = maText.Len();
maText += rNode.GetText();
@@ -477,16 +477,16 @@ void TextNode::Append( const TextNode& rNode )
DBG_ASSERT( maCharAttribs.DbgCheckAttribs(), "Attribute VOR AppendAttribs kaputt" );
#endif
- const USHORT nAttribs = rNode.GetCharAttribs().Count();
- for ( USHORT nAttr = 0; nAttr < nAttribs; nAttr++ )
+ const sal_uInt16 nAttribs = rNode.GetCharAttribs().Count();
+ for ( sal_uInt16 nAttr = 0; nAttr < nAttribs; nAttr++ )
{
TextCharAttrib* pAttrib = rNode.GetCharAttribs().GetAttrib( nAttr );
- BOOL bMelted = FALSE;
+ sal_Bool bMelted = sal_False;
if ( pAttrib->GetStart() == 0 )
{
// Evtl koennen Attribute zusammengefasst werden:
- USHORT nTmpAttribs = maCharAttribs.Count();
- for ( USHORT nTmpAttr = 0; nTmpAttr < nTmpAttribs; nTmpAttr++ )
+ sal_uInt16 nTmpAttribs = maCharAttribs.Count();
+ for ( sal_uInt16 nTmpAttr = 0; nTmpAttr < nTmpAttribs; nTmpAttr++ )
{
TextCharAttrib* pTmpAttrib = maCharAttribs.GetAttrib( nTmpAttr );
@@ -497,7 +497,7 @@ void TextNode::Append( const TextNode& rNode )
{
pTmpAttrib->GetEnd() =
pTmpAttrib->GetEnd() + pAttrib->GetLen();
- bMelted = TRUE;
+ bMelted = sal_True;
break; // es kann nur eins von der Sorte an der Stelle geben
}
}
@@ -539,15 +539,15 @@ void TextDoc::Clear()
void TextDoc::DestroyTextNodes()
{
- for ( ULONG nNode = 0; nNode < maTextNodes.Count(); nNode++ )
+ for ( sal_uLong nNode = 0; nNode < maTextNodes.Count(); nNode++ )
delete maTextNodes.GetObject( nNode );
maTextNodes.clear();
}
String TextDoc::GetText( const sal_Unicode* pSep ) const
{
- ULONG nLen = GetTextLen( pSep );
- ULONG nNodes = maTextNodes.Count();
+ sal_uLong nLen = GetTextLen( pSep );
+ sal_uLong nNodes = maTextNodes.Count();
if ( nLen > STRING_MAXLEN )
{
@@ -556,8 +556,8 @@ String TextDoc::GetText( const sal_Unicode* pSep ) const
}
String aASCIIText;
- ULONG nLastNode = nNodes-1;
- for ( ULONG nNode = 0; nNode < nNodes; nNode++ )
+ sal_uLong nLastNode = nNodes-1;
+ for ( sal_uLong nNode = 0; nNode < nNodes; nNode++ )
{
TextNode* pNode = maTextNodes.GetObject( nNode );
String aTmp( pNode->GetText() );
@@ -569,7 +569,7 @@ String TextDoc::GetText( const sal_Unicode* pSep ) const
return aASCIIText;
}
-XubString TextDoc::GetText( ULONG nPara ) const
+XubString TextDoc::GetText( sal_uLong nPara ) const
{
XubString aText;
TextNode* pNode = ( nPara < maTextNodes.Count() ) ? maTextNodes.GetObject( nPara ) : 0;
@@ -580,26 +580,26 @@ XubString TextDoc::GetText( ULONG nPara ) const
}
-ULONG TextDoc::GetTextLen( const xub_Unicode* pSep, const TextSelection* pSel ) const
+sal_uLong TextDoc::GetTextLen( const xub_Unicode* pSep, const TextSelection* pSel ) const
{
- ULONG nLen = 0;
- ULONG nNodes = maTextNodes.Count();
+ sal_uLong nLen = 0;
+ sal_uLong nNodes = maTextNodes.Count();
if ( nNodes )
{
- ULONG nStartNode = 0;
- ULONG nEndNode = nNodes-1;
+ sal_uLong nStartNode = 0;
+ sal_uLong nEndNode = nNodes-1;
if ( pSel )
{
nStartNode = pSel->GetStart().GetPara();
nEndNode = pSel->GetEnd().GetPara();
}
- for ( ULONG nNode = nStartNode; nNode <= nEndNode; nNode++ )
+ for ( sal_uLong nNode = nStartNode; nNode <= nEndNode; nNode++ )
{
TextNode* pNode = maTextNodes.GetObject( nNode );
- USHORT nS = 0;
- ULONG nE = pNode->GetText().Len();
+ sal_uInt16 nS = 0;
+ sal_uLong nE = pNode->GetText().Len();
if ( pSel && ( nNode == pSel->GetStart().GetPara() ) )
nS = pSel->GetStart().GetIndex();
if ( pSel && ( nNode == pSel->GetEnd().GetPara() ) )
@@ -639,7 +639,7 @@ TextPaM TextDoc::InsertText( const TextPaM& rPaM, const XubString& rStr )
return aPaM;
}
-TextPaM TextDoc::InsertParaBreak( const TextPaM& rPaM, BOOL bKeepEndingAttribs )
+TextPaM TextDoc::InsertParaBreak( const TextPaM& rPaM, sal_Bool bKeepEndingAttribs )
{
TextNode* pNode = maTextNodes.GetObject( rPaM.GetPara() );
TextNode* pNew = pNode->Split( rPaM.GetIndex(), bKeepEndingAttribs );
@@ -652,20 +652,20 @@ TextPaM TextDoc::InsertParaBreak( const TextPaM& rPaM, BOOL bKeepEndingAttribs )
TextPaM TextDoc::ConnectParagraphs( TextNode* pLeft, TextNode* pRight )
{
- USHORT nPrevLen = pLeft->GetText().Len();
+ sal_uInt16 nPrevLen = pLeft->GetText().Len();
pLeft->Append( *pRight );
// der rechte verschwindet.
- ULONG nRight = maTextNodes.GetPos( pRight );
+ sal_uLong nRight = maTextNodes.GetPos( pRight );
maTextNodes.Remove( nRight );
delete pRight;
- ULONG nLeft = maTextNodes.GetPos( pLeft );
+ sal_uLong nLeft = maTextNodes.GetPos( pLeft );
TextPaM aPaM( nLeft, nPrevLen );
return aPaM;
}
-TextPaM TextDoc::RemoveChars( const TextPaM& rPaM, USHORT nChars )
+TextPaM TextDoc::RemoveChars( const TextPaM& rPaM, sal_uInt16 nChars )
{
TextNode* pNode = maTextNodes.GetObject( rPaM.GetPara() );
pNode->RemoveText( rPaM.GetIndex(), nChars );
@@ -673,25 +673,25 @@ TextPaM TextDoc::RemoveChars( const TextPaM& rPaM, USHORT nChars )
return rPaM;
}
-BOOL TextDoc::IsValidPaM( const TextPaM& rPaM )
+sal_Bool TextDoc::IsValidPaM( const TextPaM& rPaM )
{
if ( rPaM.GetPara() >= maTextNodes.Count() )
{
DBG_ERROR( "PaM: Para out of range" );
- return FALSE;
+ return sal_False;
}
TextNode * pNode = maTextNodes.GetObject( rPaM.GetPara() );
if ( rPaM.GetIndex() > pNode->GetText().Len() )
{
DBG_ERROR( "PaM: Index out of range" );
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
/*
-void TextDoc::InsertAttribInSelection( TextNode* pNode, USHORT nStart, USHORT nEnd, const SfxPoolItem& rPoolItem )
+void TextDoc::InsertAttribInSelection( TextNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, const SfxPoolItem& rPoolItem )
{
DBG_ASSERT( pNode, "Wohin mit dem Attribut?" );
DBG_ASSERT( nEnd <= pNode->Len(), "InsertAttrib: Attribut zu gross!" );
@@ -727,14 +727,14 @@ void TextDoc::InsertAttribInSelection( TextNode* pNode, USHORT nStart, USHORT nE
pNode->GetCharAttribs().ResortAttribs();
}
-BOOL TextDoc::RemoveAttribs( TextNode* pNode, USHORT nStart, USHORT nEnd, USHORT nWhich )
+sal_Bool TextDoc::RemoveAttribs( TextNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, sal_uInt16 nWhich )
{
TextCharAttrib* pStarting;
TextCharAttrib* pEnding;
return RemoveAttribs( pNode, nStart, nEnd, pStarting, pEnding, nWhich );
}
-BOOL TextDoc::RemoveAttribs( TextNode* pNode, USHORT nStart, USHORT nEnd, TextCharAttrib*& rpStarting, TextCharAttrib*& rpEnding, USHORT nWhich )
+sal_Bool TextDoc::RemoveAttribs( TextNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, TextCharAttrib*& rpStarting, TextCharAttrib*& rpEnding, sal_uInt16 nWhich )
{
DBG_ASSERT( pNode, "Wohin mit dem Attribut?" );
DBG_ASSERT( nEnd <= pNode->Len(), "InsertAttrib: Attribut zu gross!" );
@@ -744,22 +744,22 @@ BOOL TextDoc::RemoveAttribs( TextNode* pNode, USHORT nStart, USHORT nEnd, TextCh
// dieses startet am Ende der Selektion => kann erweitert werden
rpStarting = 0;
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
DBG_ASSERT( nStart <= nEnd, "Kleiner Rechenfehler in InsertAttribInSelection" );
// ueber die Attribute iterieren...
- USHORT nAttr = 0;
+ sal_uInt16 nAttr = 0;
TextCharAttrib* pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
while ( pAttr )
{
- BOOL bRemoveAttrib = FALSE;
+ sal_Bool bRemoveAttrib = sal_False;
if ( !nWhich || ( pAttr->Which() == nWhich ) )
{
// Attribut beginnt in Selection
if ( ( pAttr->GetStart() >= nStart ) && ( pAttr->GetStart() <= nEnd ) )
{
- bChanged = TRUE;
+ bChanged = sal_True;
if ( pAttr->GetEnd() > nEnd )
{
pAttr->GetStart() = nEnd; // dann faengt es dahinter an
@@ -769,14 +769,14 @@ BOOL TextDoc::RemoveAttribs( TextNode* pNode, USHORT nStart, USHORT nEnd, TextCh
else if ( !pAttr->IsFeature() || ( pAttr->GetStart() == nStart ) )
{
// Feature nur loeschen, wenn genau an der Stelle
- bRemoveAttrib = TRUE;
+ bRemoveAttrib = sal_True;
}
}
// Attribut endet in Selection
else if ( ( pAttr->GetEnd() >= nStart ) && ( pAttr->GetEnd() <= nEnd ) )
{
- bChanged = TRUE;
+ bChanged = sal_True;
if ( ( pAttr->GetStart() < nStart ) && !pAttr->IsFeature() )
{
pAttr->GetEnd() = nStart; // dann hoert es hier auf
@@ -785,13 +785,13 @@ BOOL TextDoc::RemoveAttribs( TextNode* pNode, USHORT nStart, USHORT nEnd, TextCh
else if ( !pAttr->IsFeature() || ( pAttr->GetStart() == nStart ) )
{
// Feature nur loeschen, wenn genau an der Stelle
- bRemoveAttrib = TRUE;
+ bRemoveAttrib = sal_True;
}
}
// Attribut ueberlappt die Selektion
else if ( ( pAttr->GetStart() <= nStart ) && ( pAttr->GetEnd() >= nEnd ) )
{
- bChanged = TRUE;
+ bChanged = sal_True;
if ( pAttr->GetStart() == nStart )
{
pAttr->GetStart() = nEnd;
@@ -806,10 +806,10 @@ BOOL TextDoc::RemoveAttribs( TextNode* pNode, USHORT nStart, USHORT nEnd, TextCh
}
else // Attribut muss gesplittet werden...
{
- USHORT nOldEnd = pAttr->GetEnd();
+ sal_uInt16 nOldEnd = pAttr->GetEnd();
pAttr->GetEnd() = nStart;
rpEnding = pAttr;
-// ULONG nSavePos = pNode->GetCharAttribs().GetStartList().GetCurPos();
+// sal_uLong nSavePos = pNode->GetCharAttribs().GetStartList().GetCurPos();
InsertAttrib( *pAttr->GetItem(), pNode, nEnd, nOldEnd );
// pNode->GetCharAttribs().GetStartList().Seek( nSavePos );
break; // es kann weitere Attribute geben!
@@ -832,14 +832,14 @@ BOOL TextDoc::RemoveAttribs( TextNode* pNode, USHORT nStart, USHORT nEnd, TextCh
#pragma SEG_FUNCDEF(editdoc_3f)
-void TextDoc::InsertAttrib( const SfxPoolItem& rPoolItem, TextNode* pNode, USHORT nStart, USHORT nEnd )
+void TextDoc::InsertAttrib( const SfxPoolItem& rPoolItem, TextNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd )
{
// Diese Methode prueft nicht mehr, ob ein entspr. Attribut
// schon an der Stelle existiert!
// pruefen, ob neues Attrib oder einfach nur Ende eines Attribs...
// const SfxPoolItem& rDefItem = pNode->GetContentAttribs().GetItem( rPoolItem.Which() );
-// BOOL bCreateAttrib = ( rDefItem != rPoolItem );
+// sal_Bool bCreateAttrib = ( rDefItem != rPoolItem );
// Durch den Verlust der Exclude-Liste geht es nicht mehr, dass ich
// kein neues Attribut benoetige und nur das alte nicht expandiere...
@@ -848,7 +848,7 @@ void TextDoc::InsertAttrib( const SfxPoolItem& rPoolItem, TextNode* pNode, USHOR
// => Wenn schon Default-Item, dann wenigstens nur dann einstellen,
// wenn davor wirklich ein entsprechendes Attribut.
// if ( pNode->GetCharAttribs().FindAttrib( rPoolItem.Which(), nStart ) )
-// bCreateAttrib = TRUE;
+// bCreateAttrib = sal_True;
// Aber kleiner Trost:
// Die wenigsten schreiben, aendern das Attr, schreiben, und
// stellen dann wieder das Default-Attr ein.
@@ -877,7 +877,7 @@ void TextDoc::InsertAttrib( const SfxPoolItem& rPoolItem, TextNode* pNode, USHOR
#pragma SEG_FUNCDEF(editdoc_40)
-void TextDoc::InsertAttrib( TextNode* pNode, USHORT nStart, USHORT nEnd, const SfxPoolItem& rPoolItem )
+void TextDoc::InsertAttrib( TextNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, const SfxPoolItem& rPoolItem )
{
if ( nStart != nEnd )
{
@@ -903,7 +903,7 @@ void TextDoc::InsertAttrib( TextNode* pNode, USHORT nStart, USHORT nEnd, const S
// ???????????????????????????????
// eigentlich noch pruefen, ob wirklich splittet, oder return !
// ???????????????????????????????
- USHORT nOldEnd = pAttr->GetEnd();
+ sal_uInt16 nOldEnd = pAttr->GetEnd();
pAttr->GetEnd() = nStart;
pAttr = MakeCharAttrib( *pCurPool, *(pAttr->GetItem()), nStart, nOldEnd );
pNode->GetCharAttribs().InsertAttrib( pAttr );
@@ -922,12 +922,12 @@ void TextDoc::InsertAttrib( TextNode* pNode, USHORT nStart, USHORT nEnd, const S
#pragma SEG_FUNCDEF(editdoc_41)
-void TextDoc::FindAttribs( TextNode* pNode, USHORT nStartPos, USHORT nEndPos, SfxItemSet& rCurSet )
+void TextDoc::FindAttribs( TextNode* pNode, sal_uInt16 nStartPos, sal_uInt16 nEndPos, SfxItemSet& rCurSet )
{
DBG_ASSERT( pNode, "Wo soll ich suchen ?" );
DBG_ASSERT( nStartPos <= nEndPos, "Ungueltiger Bereich!" );
- USHORT nAttr = 0;
+ sal_uInt16 nAttr = 0;
TextCharAttrib* pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
// keine Selection...
if ( nStartPos == nEndPos )
@@ -961,7 +961,7 @@ void TextDoc::FindAttribs( TextNode* pNode, USHORT nStartPos, USHORT nEndPos, Sf
if ( pItem )
{
- USHORT nWhich = pItem->Which();
+ sal_uInt16 nWhich = pItem->Which();
if ( rCurSet.GetItemState( nWhich ) == SFX_ITEM_OFF )
{
rCurSet.Put( *pItem );
@@ -1020,7 +1020,7 @@ void TextDoc::FindAttribs( TextNode* pNode, USHORT nStartPos, USHORT nEndPos, Sf
if ( pItem )
{
- USHORT nWhich = pItem->Which();
+ sal_uInt16 nWhich = pItem->Which();
if ( rCurSet.GetItemState( nWhich ) == SFX_ITEM_OFF )
{
rCurSet.Put( *pItem );
diff --git a/svtools/source/edit/textdoc.hxx b/svtools/source/edit/textdoc.hxx
index 258f821beb19..44ae2371a181 100644
--- a/svtools/source/edit/textdoc.hxx
+++ b/svtools/source/edit/textdoc.hxx
@@ -42,7 +42,7 @@ SV_DECL_PTRARR_DEL( TextCharAttribs, TextCharAttribPtr, 0, 4 )
class TextCharAttribList : private TextCharAttribs
{
private:
- BOOL mbHasEmptyAttribs;
+ sal_Bool mbHasEmptyAttribs;
TextCharAttribList( const TextCharAttribList& ) : TextCharAttribs() {}
@@ -50,28 +50,28 @@ public:
TextCharAttribList();
~TextCharAttribList();
- void Clear( BOOL bDestroyAttribs );
- USHORT Count() const { return TextCharAttribs::Count(); }
+ void Clear( sal_Bool bDestroyAttribs );
+ sal_uInt16 Count() const { return TextCharAttribs::Count(); }
- TextCharAttrib* GetAttrib( USHORT n ) const { return TextCharAttribs::GetObject( n ); }
- void RemoveAttrib( USHORT n ) { TextCharAttribs::Remove( n, 1 ); }
+ TextCharAttrib* GetAttrib( sal_uInt16 n ) const { return TextCharAttribs::GetObject( n ); }
+ void RemoveAttrib( sal_uInt16 n ) { TextCharAttribs::Remove( n, 1 ); }
void InsertAttrib( TextCharAttrib* pAttrib );
void DeleteEmptyAttribs();
void ResortAttribs();
- BOOL HasEmptyAttribs() const { return mbHasEmptyAttribs; }
- BOOL& HasEmptyAttribs() { return mbHasEmptyAttribs; }
+ sal_Bool HasEmptyAttribs() const { return mbHasEmptyAttribs; }
+ sal_Bool& HasEmptyAttribs() { return mbHasEmptyAttribs; }
- TextCharAttrib* FindAttrib( USHORT nWhich, USHORT nPos );
- TextCharAttrib* FindNextAttrib( USHORT nWhich, USHORT nFromPos, USHORT nMaxPos = 0xFFFF ) const;
- TextCharAttrib* FindEmptyAttrib( USHORT nWhich, USHORT nPos );
- BOOL HasAttrib( USHORT nWhich ) const;
- BOOL HasBoundingAttrib( USHORT nBound );
+ TextCharAttrib* FindAttrib( sal_uInt16 nWhich, sal_uInt16 nPos );
+ TextCharAttrib* FindNextAttrib( sal_uInt16 nWhich, sal_uInt16 nFromPos, sal_uInt16 nMaxPos = 0xFFFF ) const;
+ TextCharAttrib* FindEmptyAttrib( sal_uInt16 nWhich, sal_uInt16 nPos );
+ sal_Bool HasAttrib( sal_uInt16 nWhich ) const;
+ sal_Bool HasBoundingAttrib( sal_uInt16 nBound );
#ifdef DBG_UTIL
- BOOL DbgCheckAttribs();
+ sal_Bool DbgCheckAttribs();
#endif
};
@@ -84,8 +84,8 @@ private:
TextNode( const TextNode& ) {;}
protected:
- void ExpandAttribs( USHORT nIndex, USHORT nNewChars );
- void CollapsAttribs( USHORT nIndex, USHORT nDelChars );
+ void ExpandAttribs( sal_uInt16 nIndex, sal_uInt16 nNewChars );
+ void CollapsAttribs( sal_uInt16 nIndex, sal_uInt16 nDelChars );
public:
TextNode( const String& rText );
@@ -96,11 +96,11 @@ public:
const TextCharAttribList& GetCharAttribs() const { return maCharAttribs; }
TextCharAttribList& GetCharAttribs() { return maCharAttribs; }
- void InsertText( USHORT nPos, const String& rText );
- void InsertText( USHORT nPos, sal_Unicode c );
- void RemoveText( USHORT nPos, USHORT nChars );
+ void InsertText( sal_uInt16 nPos, const String& rText );
+ void InsertText( sal_uInt16 nPos, sal_Unicode c );
+ void RemoveText( sal_uInt16 nPos, sal_uInt16 nChars );
- TextNode* Split( USHORT nPos, BOOL bKeepEndigAttribs );
+ TextNode* Split( sal_uInt16 nPos, sal_Bool bKeepEndigAttribs );
void Append( const TextNode& rNode );
};
@@ -108,7 +108,7 @@ class TextDoc
{
private:
ToolsList<TextNode*> maTextNodes;
- USHORT mnLeftMargin;
+ sal_uInt16 mnLeftMargin;
protected:
void DestroyTextNodes();
@@ -122,27 +122,27 @@ public:
ToolsList<TextNode*>& GetNodes() { return maTextNodes; }
const ToolsList<TextNode*>& GetNodes() const { return maTextNodes; }
- TextPaM RemoveChars( const TextPaM& rPaM, USHORT nChars );
+ TextPaM RemoveChars( const TextPaM& rPaM, sal_uInt16 nChars );
TextPaM InsertText( const TextPaM& rPaM, sal_Unicode c );
TextPaM InsertText( const TextPaM& rPaM, const String& rStr );
- TextPaM InsertParaBreak( const TextPaM& rPaM, BOOL bKeepEndingAttribs );
+ TextPaM InsertParaBreak( const TextPaM& rPaM, sal_Bool bKeepEndingAttribs );
TextPaM ConnectParagraphs( TextNode* pLeft, TextNode* pRight );
- ULONG GetTextLen( const sal_Unicode* pSep, const TextSelection* pSel = NULL ) const;
+ sal_uLong GetTextLen( const sal_Unicode* pSep, const TextSelection* pSel = NULL ) const;
String GetText( const sal_Unicode* pSep ) const;
- String GetText( ULONG nPara ) const;
+ String GetText( sal_uLong nPara ) const;
- void SetLeftMargin( USHORT n ) { mnLeftMargin = n; }
- USHORT GetLeftMargin() const { return mnLeftMargin; }
+ void SetLeftMargin( sal_uInt16 n ) { mnLeftMargin = n; }
+ sal_uInt16 GetLeftMargin() const { return mnLeftMargin; }
-// BOOL RemoveAttribs( TextNode* pNode, USHORT nStart, USHORT nEnd ), USHORT nWhich = 0 );
-// BOOL RemoveAttribs( TextNode* pNode, USHORT nStart, USHORT nEnd, TextCharAttrib*& rpStarting, TextCharAttrib*& rpEnding, USHORT nWhich = 0 );
+// sal_Bool RemoveAttribs( TextNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd ), sal_uInt16 nWhich = 0 );
+// sal_Bool RemoveAttribs( TextNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, TextCharAttrib*& rpStarting, TextCharAttrib*& rpEnding, sal_uInt16 nWhich = 0 );
// void InsertAttrib( const EditCharAttrib* pAttr );
// void InsertAttribInSelection( const EditCharAttrib* pAttr );
-// void FindAttribs( TextNode* pNode, USHORT nStartPos, USHORT nEndPos, SfxItemSet& rCurSet );
+// void FindAttribs( TextNode* pNode, sal_uInt16 nStartPos, sal_uInt16 nEndPos, SfxItemSet& rCurSet );
- BOOL IsValidPaM( const TextPaM& rPaM );
+ sal_Bool IsValidPaM( const TextPaM& rPaM );
};
#endif // _TEXTDOC_HXX
diff --git a/svtools/source/edit/texteng.cxx b/svtools/source/edit/texteng.cxx
index e0e136089d78..38ff8852c777 100644
--- a/svtools/source/edit/texteng.cxx
+++ b/svtools/source/edit/texteng.cxx
@@ -81,8 +81,8 @@ typedef TextView* TextViewPtr;
SV_DECL_PTRARR( TextViews, TextViewPtr, 0, 1 )
// SV_IMPL_PTRARR( TextViews, TextViewPtr );
-SV_DECL_VARARR_SORT( TESortedPositions, ULONG, 16, 8 )
-SV_IMPL_VARARR_SORT( TESortedPositions, ULONG )
+SV_DECL_VARARR_SORT( TESortedPositions, sal_uLong, 16, 8 )
+SV_IMPL_VARARR_SORT( TESortedPositions, sal_uLong )
#define RESDIFF 10
#define SCRLRANGE 20 // 1/20 der Breite/Hoehe scrollen, wenn im QueryDrop
@@ -99,15 +99,15 @@ TextEngine::TextEngine()
mpViews = new TextViews;
mpActiveView = NULL;
- mbIsFormatting = FALSE;
- mbFormatted = FALSE;
- mbUpdate = TRUE;
- mbModified = FALSE;
- mbUndoEnabled = FALSE;
- mbIsInUndo = FALSE;
- mbDowning = FALSE;
- mbRightToLeft = FALSE;
- mbHasMultiLineParas = FALSE;
+ mbIsFormatting = sal_False;
+ mbFormatted = sal_False;
+ mbUpdate = sal_True;
+ mbModified = sal_False;
+ mbUndoEnabled = sal_False;
+ mbIsInUndo = sal_False;
+ mbDowning = sal_False;
+ mbRightToLeft = sal_False;
+ mbHasMultiLineParas = sal_False;
meAlign = TXTALIGN_LEFT;
@@ -131,7 +131,7 @@ TextEngine::TextEngine()
maTextColor = COL_BLACK;
Font aFont;
- aFont.SetTransparent( FALSE );
+ aFont.SetTransparent( sal_False );
Color aFillColor( aFont.GetFillColor() );
aFillColor.SetTransparency( 0 );
aFont.SetFillColor( aFillColor );
@@ -140,7 +140,7 @@ TextEngine::TextEngine()
TextEngine::~TextEngine()
{
- mbDowning = TRUE;
+ mbDowning = sal_True;
delete mpIdleFormatter;
delete mpDoc;
@@ -163,7 +163,7 @@ void TextEngine::InsertView( TextView* pTextView )
void TextEngine::RemoveView( TextView* pTextView )
{
- USHORT nPos = mpViews->GetPos( pTextView );
+ sal_uInt16 nPos = mpViews->GetPos( pTextView );
if( nPos != USHRT_MAX )
{
pTextView->HideCursor();
@@ -173,12 +173,12 @@ void TextEngine::RemoveView( TextView* pTextView )
}
}
-USHORT TextEngine::GetViewCount() const
+sal_uInt16 TextEngine::GetViewCount() const
{
return mpViews->Count();
}
-TextView* TextEngine::GetView( USHORT nView ) const
+TextView* TextEngine::GetView( sal_uInt16 nView ) const
{
return mpViews->GetObject( nView );
}
@@ -217,7 +217,7 @@ void TextEngine::SetFont( const Font& rFont )
// Wegen Selektion keinen Transparenten Font zulassen...
// (Sonst spaeter in ImplPaint den Hintergrund anders loeschen...)
- maFont.SetTransparent( FALSE );
+ maFont.SetTransparent( sal_False );
// Tell VCL not to use the font color, use text color from OutputDevice
maFont.SetColor( COL_TRANSPARENT );
Color aFillColor( maFont.GetFillColor() );
@@ -232,10 +232,10 @@ void TextEngine::SetFont( const Font& rFont )
if ( !aTextSize.Width() )
aTextSize.Width() = mpRefDev->GetTextWidth( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "XXXX" ) ) );
- mnDefTab = (USHORT)aTextSize.Width();
+ mnDefTab = (sal_uInt16)aTextSize.Width();
if ( !mnDefTab )
mnDefTab = 1;
- mnCharHeight = (USHORT)aTextSize.Height();
+ mnCharHeight = (sal_uInt16)aTextSize.Height();
/*
// #93746# Doesn't work with CJK HalfWidth/FullWidth
FontMetric aRealFont( mpRefDev->GetFontMetric() );
@@ -243,7 +243,7 @@ void TextEngine::SetFont( const Font& rFont )
{
String aX100;
aX100.Fill( 100, 'X' );
- mnFixCharWidth100 = (USHORT)mpRefDev->GetTextWidth( aX100 );
+ mnFixCharWidth100 = (sal_uInt16)mpRefDev->GetTextWidth( aX100 );
}
else
*/
@@ -252,7 +252,7 @@ void TextEngine::SetFont( const Font& rFont )
FormatFullDoc();
UpdateViews();
- for ( USHORT nView = mpViews->Count(); nView; )
+ for ( sal_uInt16 nView = mpViews->Count(); nView; )
{
TextView* pView = mpViews->GetObject( --nView );
pView->GetWindow()->SetInputContext( InputContext( GetFont(), !pView->IsReadOnly() ? INPUTCONTEXT_TEXT|INPUTCONTEXT_EXTTEXTINPUT : 0 ) );
@@ -260,22 +260,22 @@ void TextEngine::SetFont( const Font& rFont )
}
}
-void TextEngine::SetDefTab( USHORT nDefTab )
+void TextEngine::SetDefTab( sal_uInt16 nDefTab )
{
mnDefTab = nDefTab;
// evtl neu setzen?
}
-void TextEngine::SetMaxTextLen( ULONG nLen )
+void TextEngine::SetMaxTextLen( sal_uLong nLen )
{
mnMaxTextLen = nLen;
}
-void TextEngine::SetMaxTextWidth( ULONG nMaxWidth )
+void TextEngine::SetMaxTextWidth( sal_uLong nMaxWidth )
{
if ( nMaxWidth != mnMaxTextWidth )
{
- mnMaxTextWidth = Min( nMaxWidth, (ULONG)0x7FFFFFFF );
+ mnMaxTextWidth = Min( nMaxWidth, (sal_uLong)0x7FFFFFFF );
FormatFullDoc();
UpdateViews();
}
@@ -311,14 +311,14 @@ String TextEngine::GetText( LineEnd aSeparator ) const
String TextEngine::GetTextLines( LineEnd aSeparator ) const
{
String aText;
- ULONG nParas = mpTEParaPortions->Count();
+ sal_uLong nParas = mpTEParaPortions->Count();
const sal_Unicode* pSep = static_getLineEndText( aSeparator );
- for ( ULONG nP = 0; nP < nParas; nP++ )
+ for ( sal_uLong nP = 0; nP < nParas; nP++ )
{
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nP );
- USHORT nLines = pTEParaPortion->GetLines().Count();
- for ( USHORT nL = 0; nL < nLines; nL++ )
+ sal_uInt16 nLines = pTEParaPortion->GetLines().Count();
+ for ( sal_uInt16 nL = 0; nL < nLines; nL++ )
{
TextLine* pLine = pTEParaPortion->GetLines()[nL];
aText += pTEParaPortion->GetNode()->GetText().Copy( pLine->GetStart(), pLine->GetEnd() - pLine->GetStart() );
@@ -329,17 +329,17 @@ String TextEngine::GetTextLines( LineEnd aSeparator ) const
return aText;
}
-String TextEngine::GetText( ULONG nPara ) const
+String TextEngine::GetText( sal_uLong nPara ) const
{
return mpDoc->GetText( nPara );
}
-ULONG TextEngine::GetTextLen( LineEnd aSeparator ) const
+sal_uLong TextEngine::GetTextLen( LineEnd aSeparator ) const
{
return mpDoc->GetTextLen( static_getLineEndText( aSeparator ) );
}
-ULONG TextEngine::GetTextLen( const TextSelection& rSel, LineEnd aSeparator ) const
+sal_uLong TextEngine::GetTextLen( const TextSelection& rSel, LineEnd aSeparator ) const
{
TextSelection aSel( rSel );
aSel.Justify();
@@ -347,12 +347,12 @@ ULONG TextEngine::GetTextLen( const TextSelection& rSel, LineEnd aSeparator ) co
return mpDoc->GetTextLen( static_getLineEndText( aSeparator ), &aSel );
}
-USHORT TextEngine::GetTextLen( ULONG nPara ) const
+sal_uInt16 TextEngine::GetTextLen( sal_uLong nPara ) const
{
return mpDoc->GetNodes().GetObject( nPara )->GetText().Len();
}
-void TextEngine::SetUpdateMode( BOOL bUpdate )
+void TextEngine::SetUpdateMode( sal_Bool bUpdate )
{
if ( bUpdate != mbUpdate )
{
@@ -366,9 +366,9 @@ void TextEngine::SetUpdateMode( BOOL bUpdate )
}
}
-BOOL TextEngine::DoesKeyMoveCursor( const KeyEvent& rKeyEvent )
+sal_Bool TextEngine::DoesKeyMoveCursor( const KeyEvent& rKeyEvent )
{
- BOOL bDoesMove = FALSE;
+ sal_Bool bDoesMove = sal_False;
switch ( rKeyEvent.GetKeyCode().GetCode() )
{
@@ -382,16 +382,16 @@ BOOL TextEngine::DoesKeyMoveCursor( const KeyEvent& rKeyEvent )
case KEY_PAGEDOWN:
{
if ( !rKeyEvent.GetKeyCode().IsMod2() )
- bDoesMove = TRUE;
+ bDoesMove = sal_True;
}
break;
}
return bDoesMove;
}
-BOOL TextEngine::DoesKeyChangeText( const KeyEvent& rKeyEvent )
+sal_Bool TextEngine::DoesKeyChangeText( const KeyEvent& rKeyEvent )
{
- BOOL bDoesChange = FALSE;
+ sal_Bool bDoesChange = sal_False;
KeyFuncType eFunc = rKeyEvent.GetKeyCode().GetFunction();
if ( eFunc != KEYFUNC_DONTKNOW )
@@ -401,7 +401,7 @@ BOOL TextEngine::DoesKeyChangeText( const KeyEvent& rKeyEvent )
case KEYFUNC_UNDO:
case KEYFUNC_REDO:
case KEYFUNC_CUT:
- case KEYFUNC_PASTE: bDoesChange = TRUE;
+ case KEYFUNC_PASTE: bDoesChange = sal_True;
break;
default: // wird dann evtl. unten bearbeitet.
eFunc = KEYFUNC_DONTKNOW;
@@ -415,14 +415,14 @@ BOOL TextEngine::DoesKeyChangeText( const KeyEvent& rKeyEvent )
case KEY_BACKSPACE:
{
if ( !rKeyEvent.GetKeyCode().IsMod2() )
- bDoesChange = TRUE;
+ bDoesChange = sal_True;
}
break;
case KEY_RETURN:
case KEY_TAB:
{
if ( !rKeyEvent.GetKeyCode().IsMod1() && !rKeyEvent.GetKeyCode().IsMod2() )
- bDoesChange = TRUE;
+ bDoesChange = sal_True;
}
break;
default:
@@ -434,15 +434,15 @@ BOOL TextEngine::DoesKeyChangeText( const KeyEvent& rKeyEvent )
return bDoesChange;
}
-BOOL TextEngine::IsSimpleCharInput( const KeyEvent& rKeyEvent )
+sal_Bool TextEngine::IsSimpleCharInput( const KeyEvent& rKeyEvent )
{
if( rKeyEvent.GetCharCode() >= 32 && rKeyEvent.GetCharCode() != 127 &&
KEY_MOD1 != (rKeyEvent.GetKeyCode().GetModifier() & ~KEY_SHIFT) && // (ssa) #i45714#:
KEY_MOD2 != (rKeyEvent.GetKeyCode().GetModifier() & ~KEY_SHIFT) ) // check for Ctrl and Alt separately
{
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
void TextEngine::ImpInitDoc()
@@ -459,9 +459,9 @@ void TextEngine::ImpInitDoc()
mpDoc->GetNodes().Insert( pNode, 0 );
TEParaPortion* pIniPortion = new TEParaPortion( pNode );
- mpTEParaPortions->Insert( pIniPortion, (ULONG)0 );
+ mpTEParaPortions->Insert( pIniPortion, (sal_uLong)0 );
- mbFormatted = FALSE;
+ mbFormatted = sal_False;
ImpParagraphRemoved( TEXT_PARA_ALL );
ImpParagraphInserted( 0 );
@@ -477,15 +477,15 @@ String TextEngine::GetText( const TextSelection& rSel, LineEnd aSeparator ) cons
TextSelection aSel( rSel );
aSel.Justify();
- ULONG nStartPara = aSel.GetStart().GetPara();
- ULONG nEndPara = aSel.GetEnd().GetPara();
+ sal_uLong nStartPara = aSel.GetStart().GetPara();
+ sal_uLong nEndPara = aSel.GetEnd().GetPara();
const sal_Unicode* pSep = static_getLineEndText( aSeparator );
- for ( ULONG nNode = aSel.GetStart().GetPara(); nNode <= nEndPara; nNode++ )
+ for ( sal_uLong nNode = aSel.GetStart().GetPara(); nNode <= nEndPara; nNode++ )
{
TextNode* pNode = mpDoc->GetNodes().GetObject( nNode );
- USHORT nStartPos = 0;
- USHORT nEndPos = pNode->GetText().Len();
+ sal_uInt16 nStartPos = 0;
+ sal_uInt16 nEndPos = pNode->GetText().Len();
if ( nNode == nStartPara )
nStartPos = aSel.GetStart().GetIndex();
if ( nNode == nEndPara ) // kann auch == nStart sein!
@@ -504,7 +504,7 @@ void TextEngine::ImpRemoveText()
TextPaM aStartPaM( 0, 0 );
TextSelection aEmptySel( aStartPaM, aStartPaM );
- for ( USHORT nView = 0; nView < mpViews->Count(); nView++ )
+ for ( sal_uInt16 nView = 0; nView < mpViews->Count(); nView++ )
{
TextView* pView = mpViews->GetObject( nView );
pView->ImpSetSelection( aEmptySel );
@@ -516,9 +516,9 @@ void TextEngine::SetText( const XubString& rText )
{
ImpRemoveText();
- BOOL bUndoCurrentlyEnabled = IsUndoEnabled();
+ sal_Bool bUndoCurrentlyEnabled = IsUndoEnabled();
// Der von Hand reingesteckte Text kann nicht vom Anwender rueckgaengig gemacht werden.
- EnableUndo( FALSE );
+ EnableUndo( sal_False );
TextPaM aStartPaM( 0, 0 );
TextSelection aEmptySel( aStartPaM, aStartPaM );
@@ -527,7 +527,7 @@ void TextEngine::SetText( const XubString& rText )
if ( rText.Len() )
aPaM = ImpInsertText( aEmptySel, rText );
- for ( USHORT nView = 0; nView < mpViews->Count(); nView++ )
+ for ( sal_uInt16 nView = 0; nView < mpViews->Count(); nView++ )
{
TextView* pView = mpViews->GetObject( nView );
pView->ImpSetSelection( aEmptySel );
@@ -548,7 +548,7 @@ void TextEngine::SetText( const XubString& rText )
}
-void TextEngine::CursorMoved( ULONG nNode )
+void TextEngine::CursorMoved( sal_uLong nNode )
{
// Leere Attribute loeschen, aber nur, wenn Absatz nicht leer!
TextNode* pNode = mpDoc->GetNodes().GetObject( nNode );
@@ -556,7 +556,7 @@ void TextEngine::CursorMoved( ULONG nNode )
pNode->GetCharAttribs().DeleteEmptyAttribs();
}
-void TextEngine::ImpRemoveChars( const TextPaM& rPaM, USHORT nChars, SfxUndoAction* )
+void TextEngine::ImpRemoveChars( const TextPaM& rPaM, sal_uInt16 nChars, SfxUndoAction* )
{
DBG_ASSERT( nChars, "ImpRemoveChars - 0 Chars?!" );
if ( IsUndoEnabled() && !IsInUndo() )
@@ -566,9 +566,9 @@ void TextEngine::ImpRemoveChars( const TextPaM& rPaM, USHORT nChars, SfxUndoActi
XubString aStr( pNode->GetText().Copy( rPaM.GetIndex(), nChars ) );
// Pruefen, ob Attribute geloescht oder geaendert werden:
- USHORT nStart = rPaM.GetIndex();
- USHORT nEnd = nStart + nChars;
- for ( USHORT nAttr = pNode->GetCharAttribs().Count(); nAttr; )
+ sal_uInt16 nStart = rPaM.GetIndex();
+ sal_uInt16 nEnd = nStart + nChars;
+ for ( sal_uInt16 nAttr = pNode->GetCharAttribs().Count(); nAttr; )
{
TextCharAttrib* pAttr = pNode->GetCharAttribs().GetAttrib( --nAttr );
if ( ( pAttr->GetEnd() >= nStart ) && ( pAttr->GetStart() < nEnd ) )
@@ -590,7 +590,7 @@ void TextEngine::ImpRemoveChars( const TextPaM& rPaM, USHORT nChars, SfxUndoActi
ImpCharsRemoved( rPaM.GetPara(), rPaM.GetIndex(), nChars );
}
-TextPaM TextEngine::ImpConnectParagraphs( ULONG nLeft, ULONG nRight )
+TextPaM TextEngine::ImpConnectParagraphs( sal_uLong nLeft, sal_uLong nRight )
{
DBG_ASSERT( nLeft != nRight, "Den gleichen Absatz zusammenfuegen ?" );
@@ -634,11 +634,11 @@ TextPaM TextEngine::ImpDeleteText( const TextSelection& rSel )
DBG_ASSERT( mpDoc->IsValidPaM( aStartPaM ), "Index im Wald in ImpDeleteText" );
DBG_ASSERT( mpDoc->IsValidPaM( aEndPaM ), "Index im Wald in ImpDeleteText" );
- ULONG nStartNode = aStartPaM.GetPara();
- ULONG nEndNode = aEndPaM.GetPara();
+ sal_uLong nStartNode = aStartPaM.GetPara();
+ sal_uLong nEndNode = aEndPaM.GetPara();
// Alle Nodes dazwischen entfernen....
- for ( ULONG z = nStartNode+1; z < nEndNode; z++ )
+ for ( sal_uLong z = nStartNode+1; z < nEndNode; z++ )
{
// Immer nStartNode+1, wegen Remove()!
ImpRemoveParagraph( nStartNode+1 );
@@ -648,7 +648,7 @@ TextPaM TextEngine::ImpDeleteText( const TextSelection& rSel )
{
// Den Rest des StartNodes...
TextNode* pLeft = mpDoc->GetNodes().GetObject( nStartNode );
- USHORT nChars = pLeft->GetText().Len() - aStartPaM.GetIndex();
+ sal_uInt16 nChars = pLeft->GetText().Len() - aStartPaM.GetIndex();
if ( nChars )
{
ImpRemoveChars( aStartPaM, nChars );
@@ -675,7 +675,7 @@ TextPaM TextEngine::ImpDeleteText( const TextSelection& rSel )
}
else
{
- USHORT nChars;
+ sal_uInt16 nChars;
nChars = aEndPaM.GetIndex() - aStartPaM.GetIndex();
ImpRemoveChars( aStartPaM, nChars );
TEParaPortion* pPortion = mpTEParaPortions->GetObject( nStartNode );
@@ -688,7 +688,7 @@ TextPaM TextEngine::ImpDeleteText( const TextSelection& rSel )
return aStartPaM;
}
-void TextEngine::ImpRemoveParagraph( ULONG nPara )
+void TextEngine::ImpRemoveParagraph( sal_uLong nPara )
{
TextNode* pNode = mpDoc->GetNodes().GetObject( nPara );
TEParaPortion* pPortion = mpTEParaPortions->GetObject( nPara );
@@ -722,14 +722,14 @@ uno::Reference < i18n::XExtendedInputSequenceChecker > TextEngine::GetInputSeque
return xISC;
}
-BOOL TextEngine::IsInputSequenceCheckingRequired( sal_Unicode c, const TextSelection& rCurSel ) const
+sal_Bool TextEngine::IsInputSequenceCheckingRequired( sal_Unicode c, const TextSelection& rCurSel ) const
{
uno::Reference< i18n::XBreakIterator > xBI = ((TextEngine *) this)->GetBreakIterator();
SvtCTLOptions aCTLOptions;
// get the index that really is first
- USHORT nFirstPos = rCurSel.GetStart().GetIndex();
- USHORT nMaxPos = rCurSel.GetEnd().GetIndex();
+ sal_uInt16 nFirstPos = rCurSel.GetStart().GetIndex();
+ sal_uInt16 nMaxPos = rCurSel.GetEnd().GetIndex();
if (nMaxPos < nFirstPos)
nFirstPos = nMaxPos;
@@ -742,12 +742,12 @@ BOOL TextEngine::IsInputSequenceCheckingRequired( sal_Unicode c, const TextSelec
return bIsSequenceChecking;
}
-TextPaM TextEngine::ImpInsertText( const TextSelection& rCurSel, sal_Unicode c, BOOL bOverwrite )
+TextPaM TextEngine::ImpInsertText( const TextSelection& rCurSel, sal_Unicode c, sal_Bool bOverwrite )
{
return ImpInsertText( c, rCurSel, bOverwrite, sal_False );
}
-TextPaM TextEngine::ImpInsertText( sal_Unicode c, const TextSelection& rCurSel, BOOL bOverwrite, BOOL bIsUserInput )
+TextPaM TextEngine::ImpInsertText( sal_Unicode c, const TextSelection& rCurSel, sal_Bool bOverwrite, sal_Bool bIsUserInput )
{
DBG_ASSERT( c != '\n', "Zeilenumbruch bei InsertText ?" );
DBG_ASSERT( c != '\r', "Zeilenumbruch bei InsertText ?" );
@@ -757,13 +757,13 @@ TextPaM TextEngine::ImpInsertText( sal_Unicode c, const TextSelection& rCurSel,
if ( pNode->GetText().Len() < STRING_MAXLEN )
{
- BOOL bDoOverwrite = ( bOverwrite &&
- ( aPaM.GetIndex() < pNode->GetText().Len() ) ) ? TRUE : FALSE;
+ sal_Bool bDoOverwrite = ( bOverwrite &&
+ ( aPaM.GetIndex() < pNode->GetText().Len() ) ) ? sal_True : sal_False;
- BOOL bUndoAction = ( rCurSel.HasRange() || bDoOverwrite );
+ sal_Bool bUndoAction = ( rCurSel.HasRange() || bDoOverwrite );
if ( bUndoAction )
- UndoActionStart( TEXTUNDO_INSERT );
+ UndoActionStart();
if ( rCurSel.HasRange() )
{
@@ -810,7 +810,7 @@ TextPaM TextEngine::ImpInsertText( sal_Unicode c, const TextSelection& rCurSel,
String aChgText( aNewText.copy( nChgPos ), nChgLen );
// select text from first pos to be changed to current pos
- TextSelection aSel( TextPaM( aPaM.GetPara(), (USHORT) nChgPos ), aPaM );
+ TextSelection aSel( TextPaM( aPaM.GetPara(), (sal_uInt16) nChgPos ), aPaM );
if (aChgText.Len())
// ImpInsertText implicitly handles undo...
@@ -833,7 +833,7 @@ TextPaM TextEngine::ImpInsertText( sal_Unicode c, const TextSelection& rCurSel,
if ( IsUndoEnabled() && !IsInUndo() )
{
TextUndoInsertChars* pNewUndo = new TextUndoInsertChars( this, aPaM, c );
- BOOL bTryMerge = ( !bDoOverwrite && ( c != ' ' ) ) ? TRUE : FALSE;
+ sal_Bool bTryMerge = ( !bDoOverwrite && ( c != ' ' ) ) ? sal_True : sal_False;
InsertUndo( pNewUndo, bTryMerge );
}
@@ -847,7 +847,7 @@ TextPaM TextEngine::ImpInsertText( sal_Unicode c, const TextSelection& rCurSel,
TextModified();
if ( bUndoAction )
- UndoActionEnd( TEXTUNDO_INSERT );
+ UndoActionEnd();
}
return aPaM;
@@ -856,7 +856,7 @@ TextPaM TextEngine::ImpInsertText( sal_Unicode c, const TextSelection& rCurSel,
TextPaM TextEngine::ImpInsertText( const TextSelection& rCurSel, const XubString& rStr )
{
- UndoActionStart( TEXTUNDO_INSERT );
+ UndoActionStart();
TextPaM aPaM;
@@ -868,21 +868,21 @@ TextPaM TextEngine::ImpInsertText( const TextSelection& rCurSel, const XubString
XubString aText( rStr );
aText.ConvertLineEnd( LINEEND_LF );
- USHORT nStart = 0;
+ sal_uInt16 nStart = 0;
while ( nStart < aText.Len() )
{
- USHORT nEnd = aText.Search( LINE_SEP, nStart );
+ sal_uInt16 nEnd = aText.Search( LINE_SEP, nStart );
if ( nEnd == STRING_NOTFOUND )
nEnd = aText.Len(); // nicht dereferenzieren!
// Start == End => Leerzeile
if ( nEnd > nStart )
{
- ULONG nL = aPaM.GetIndex();
+ sal_uLong nL = aPaM.GetIndex();
nL += ( nEnd-nStart );
if ( nL > STRING_MAXLEN )
{
- USHORT nDiff = (USHORT) (nL-STRING_MAXLEN);
+ sal_uInt16 nDiff = (sal_uInt16) (nL-STRING_MAXLEN);
nEnd = nEnd - nDiff;
}
@@ -908,13 +908,13 @@ TextPaM TextEngine::ImpInsertText( const TextSelection& rCurSel, const XubString
break;
}
- UndoActionEnd( TEXTUNDO_INSERT );
+ UndoActionEnd();
TextModified();
return aPaM;
}
-TextPaM TextEngine::ImpInsertParaBreak( const TextSelection& rCurSel, BOOL bKeepEndingAttribs )
+TextPaM TextEngine::ImpInsertParaBreak( const TextSelection& rCurSel, sal_Bool bKeepEndingAttribs )
{
TextPaM aPaM;
if ( rCurSel.HasRange() )
@@ -925,13 +925,13 @@ TextPaM TextEngine::ImpInsertParaBreak( const TextSelection& rCurSel, BOOL bKeep
return ImpInsertParaBreak( aPaM, bKeepEndingAttribs );
}
-TextPaM TextEngine::ImpInsertParaBreak( const TextPaM& rPaM, BOOL bKeepEndingAttribs )
+TextPaM TextEngine::ImpInsertParaBreak( const TextPaM& rPaM, sal_Bool bKeepEndingAttribs )
{
if ( IsUndoEnabled() && !IsInUndo() )
InsertUndo( new TextUndoSplitPara( this, rPaM.GetPara(), rPaM.GetIndex() ) );
TextNode* pNode = mpDoc->GetNodes().GetObject( rPaM.GetPara() );
- BOOL bFirstParaContentChanged = rPaM.GetIndex() < pNode->GetText().Len();
+ sal_Bool bFirstParaContentChanged = rPaM.GetIndex() < pNode->GetText().Len();
TextPaM aPaM( mpDoc->InsertParaBreak( rPaM, bKeepEndingAttribs ) );
@@ -953,9 +953,9 @@ TextPaM TextEngine::ImpInsertParaBreak( const TextPaM& rPaM, BOOL bKeepEndingAtt
return aPaM;
}
-Rectangle TextEngine::PaMtoEditCursor( const TextPaM& rPaM, BOOL bSpecial )
+Rectangle TextEngine::PaMtoEditCursor( const TextPaM& rPaM, sal_Bool bSpecial )
{
- DBG_ASSERT( GetUpdateMode(), "Darf bei Update=FALSE nicht erreicht werden: PaMtoEditCursor" );
+ DBG_ASSERT( GetUpdateMode(), "Darf bei Update=sal_False nicht erreicht werden: PaMtoEditCursor" );
Rectangle aEditCursor;
long nY = 0;
@@ -966,7 +966,7 @@ Rectangle TextEngine::PaMtoEditCursor( const TextPaM& rPaM, BOOL bSpecial )
}
else
{
- for ( ULONG nPortion = 0; nPortion < rPaM.GetPara(); nPortion++ )
+ for ( sal_uLong nPortion = 0; nPortion < rPaM.GetPara(); nPortion++ )
{
TEParaPortion* pPortion = mpTEParaPortions->GetObject(nPortion);
nY += pPortion->GetLines().Count() * mnCharHeight;
@@ -979,7 +979,7 @@ Rectangle TextEngine::PaMtoEditCursor( const TextPaM& rPaM, BOOL bSpecial )
return aEditCursor;
}
-Rectangle TextEngine::GetEditCursor( const TextPaM& rPaM, BOOL bSpecial, BOOL bPreferPortionStart )
+Rectangle TextEngine::GetEditCursor( const TextPaM& rPaM, sal_Bool bSpecial, sal_Bool bPreferPortionStart )
{
if ( !IsFormatted() && !IsFormatting() )
FormatAndUpdate();
@@ -1000,9 +1000,9 @@ Rectangle TextEngine::GetEditCursor( const TextPaM& rPaM, BOOL bSpecial, BOOL bP
*/
long nY = 0;
- USHORT nCurIndex = 0;
+ sal_uInt16 nCurIndex = 0;
TextLine* pLine = 0;
- for ( USHORT nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ )
+ for ( sal_uInt16 nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ )
{
TextLine* pTmpLine = pPortion->GetLines().GetObject( nLine );
if ( ( pTmpLine->GetStart() == rPaM.GetIndex() ) || ( pTmpLine->IsIn( rPaM.GetIndex(), bSpecial ) ) )
@@ -1036,21 +1036,21 @@ Rectangle TextEngine::GetEditCursor( const TextPaM& rPaM, BOOL bSpecial, BOOL bP
return aEditCursor;
}
-long TextEngine::ImpGetXPos( ULONG nPara, TextLine* pLine, USHORT nIndex, BOOL bPreferPortionStart )
+long TextEngine::ImpGetXPos( sal_uLong nPara, TextLine* pLine, sal_uInt16 nIndex, sal_Bool bPreferPortionStart )
{
DBG_ASSERT( ( nIndex >= pLine->GetStart() ) && ( nIndex <= pLine->GetEnd() ) , "ImpGetXPos muss richtig gerufen werden!" );
- BOOL bDoPreferPortionStart = bPreferPortionStart;
+ sal_Bool bDoPreferPortionStart = bPreferPortionStart;
// Assure that the portion belongs to this line:
if ( nIndex == pLine->GetStart() )
- bDoPreferPortionStart = TRUE;
+ bDoPreferPortionStart = sal_True;
else if ( nIndex == pLine->GetEnd() )
- bDoPreferPortionStart = FALSE;
+ bDoPreferPortionStart = sal_False;
TEParaPortion* pParaPortion = mpTEParaPortions->GetObject( nPara );
- USHORT nTextPortionStart = 0;
- USHORT nTextPortion = pParaPortion->GetTextPortions().FindPortion( nIndex, nTextPortionStart, bDoPreferPortionStart );
+ sal_uInt16 nTextPortionStart = 0;
+ sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( nIndex, nTextPortionStart, bDoPreferPortionStart );
DBG_ASSERT( ( nTextPortion >= pLine->GetStartPortion() ) && ( nTextPortion <= pLine->GetEndPortion() ), "GetXPos: Portion not in current line! " );
@@ -1081,7 +1081,7 @@ long TextEngine::ImpGetXPos( ULONG nPara, TextLine* pLine, USHORT nIndex, BOOL b
// nX += pNextPortion->GetWidth();
// End of the tab portion, use start of next for cursor pos
DBG_ASSERT( !bPreferPortionStart, "ImpGetXPos - How can we this tab portion here???" );
- nX = ImpGetXPos( nPara, pLine, nIndex, TRUE );
+ nX = ImpGetXPos( nPara, pLine, nIndex, sal_True );
}
}
@@ -1117,7 +1117,7 @@ long TextEngine::ImpGetXPos( ULONG nPara, TextLine* pLine, USHORT nIndex, BOOL b
return nX;
}
-const TextAttrib* TextEngine::FindAttrib( const TextPaM& rPaM, USHORT nWhich ) const
+const TextAttrib* TextEngine::FindAttrib( const TextPaM& rPaM, sal_uInt16 nWhich ) const
{
const TextAttrib* pAttr = NULL;
const TextCharAttrib* pCharAttr = FindCharAttrib( rPaM, nWhich );
@@ -1126,7 +1126,7 @@ const TextAttrib* TextEngine::FindAttrib( const TextPaM& rPaM, USHORT nWhich ) c
return pAttr;
}
-const TextCharAttrib* TextEngine::FindCharAttrib( const TextPaM& rPaM, USHORT nWhich ) const
+const TextCharAttrib* TextEngine::FindCharAttrib( const TextPaM& rPaM, sal_uInt16 nWhich ) const
{
const TextCharAttrib* pAttr = NULL;
TextNode* pNode = mpDoc->GetNodes().GetObject( rPaM.GetPara() );
@@ -1135,10 +1135,10 @@ const TextCharAttrib* TextEngine::FindCharAttrib( const TextPaM& rPaM, USHORT nW
return pAttr;
}
-BOOL TextEngine::HasAttrib( USHORT nWhich ) const
+sal_Bool TextEngine::HasAttrib( sal_uInt16 nWhich ) const
{
- BOOL bAttr = FALSE;
- for ( ULONG n = mpDoc->GetNodes().Count(); --n && !bAttr; )
+ sal_Bool bAttr = sal_False;
+ for ( sal_uLong n = mpDoc->GetNodes().Count(); --n && !bAttr; )
{
TextNode* pNode = mpDoc->GetNodes().GetObject( n );
bAttr = pNode->GetCharAttribs().HasAttrib( nWhich );
@@ -1146,12 +1146,12 @@ BOOL TextEngine::HasAttrib( USHORT nWhich ) const
return bAttr;
}
-TextPaM TextEngine::GetPaM( const Point& rDocPos, BOOL bSmart )
+TextPaM TextEngine::GetPaM( const Point& rDocPos, sal_Bool bSmart )
{
- DBG_ASSERT( GetUpdateMode(), "Darf bei Update=FALSE nicht erreicht werden: GetPaM" );
+ DBG_ASSERT( GetUpdateMode(), "Darf bei Update=sal_False nicht erreicht werden: GetPaM" );
long nY = 0;
- for ( ULONG nPortion = 0; nPortion < mpTEParaPortions->Count(); nPortion++ )
+ for ( sal_uLong nPortion = 0; nPortion < mpTEParaPortions->Count(); nPortion++ )
{
TEParaPortion* pPortion = mpTEParaPortions->GetObject( nPortion );
long nTmpHeight = pPortion->GetLines().Count() * mnCharHeight;
@@ -1169,21 +1169,21 @@ TextPaM TextEngine::GetPaM( const Point& rDocPos, BOOL bSmart )
}
// Nicht gefunden - Dann den letzten sichtbare...
- ULONG nLastNode = mpDoc->GetNodes().Count() - 1;
+ sal_uLong nLastNode = mpDoc->GetNodes().Count() - 1;
TextNode* pLast = mpDoc->GetNodes().GetObject( nLastNode );
return TextPaM( nLastNode, pLast->GetText().Len() );
}
-USHORT TextEngine::ImpFindIndex( ULONG nPortion, const Point& rPosInPara, BOOL bSmart )
+sal_uInt16 TextEngine::ImpFindIndex( sal_uLong nPortion, const Point& rPosInPara, sal_Bool bSmart )
{
DBG_ASSERT( IsFormatted(), "GetPaM: Nicht formatiert" );
TEParaPortion* pPortion = mpTEParaPortions->GetObject( nPortion );
- USHORT nCurIndex = 0;
+ sal_uInt16 nCurIndex = 0;
long nY = 0;
TextLine* pLine = 0;
- USHORT nLine;
+ sal_uInt16 nLine;
for ( nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ )
{
TextLine* pTmpLine = pPortion->GetLines().GetObject( nLine );
@@ -1203,24 +1203,24 @@ USHORT TextEngine::ImpFindIndex( ULONG nPortion, const Point& rPosInPara, BOOL b
{
uno::Reference < i18n::XBreakIterator > xBI = GetBreakIterator();
sal_Int32 nCount = 1;
- nCurIndex = (USHORT)xBI->previousCharacters( pPortion->GetNode()->GetText(), nCurIndex, GetLocale(), i18n::CharacterIteratorMode::SKIPCELL, nCount, nCount );
+ nCurIndex = (sal_uInt16)xBI->previousCharacters( pPortion->GetNode()->GetText(), nCurIndex, GetLocale(), i18n::CharacterIteratorMode::SKIPCELL, nCount, nCount );
}
return nCurIndex;
}
-USHORT TextEngine::GetCharPos( ULONG nPortion, USHORT nLine, long nXPos, BOOL )
+sal_uInt16 TextEngine::GetCharPos( sal_uLong nPortion, sal_uInt16 nLine, long nXPos, sal_Bool )
{
TEParaPortion* pPortion = mpTEParaPortions->GetObject( nPortion );
TextLine* pLine = pPortion->GetLines().GetObject( nLine );
- USHORT nCurIndex = pLine->GetStart();
+ sal_uInt16 nCurIndex = pLine->GetStart();
long nTmpX = pLine->GetStartX();
if ( nXPos <= nTmpX )
return nCurIndex;
- for ( USHORT i = pLine->GetStartPortion(); i <= pLine->GetEndPortion(); i++ )
+ for ( sal_uInt16 i = pLine->GetStartPortion(); i <= pLine->GetEndPortion(); i++ )
{
TETextPortion* pTextPortion = pPortion->GetTextPortions().GetObject( i );
nTmpX += pTextPortion->GetWidth();
@@ -1248,9 +1248,9 @@ USHORT TextEngine::GetCharPos( ULONG nPortion, USHORT nLine, long nXPos, BOOL )
}
-ULONG TextEngine::GetTextHeight() const
+sal_uLong TextEngine::GetTextHeight() const
{
- DBG_ASSERT( GetUpdateMode(), "Sollte bei Update=FALSE nicht verwendet werden: GetTextHeight" );
+ DBG_ASSERT( GetUpdateMode(), "Sollte bei Update=sal_False nicht verwendet werden: GetTextHeight" );
if ( !IsFormatted() && !IsFormatting() )
((TextEngine*)this)->FormatAndUpdate();
@@ -1258,9 +1258,9 @@ ULONG TextEngine::GetTextHeight() const
return mnCurTextHeight;
}
-ULONG TextEngine::GetTextHeight( ULONG nParagraph ) const
+sal_uLong TextEngine::GetTextHeight( sal_uLong nParagraph ) const
{
- DBG_ASSERT( GetUpdateMode(), "Sollte bei Update=FALSE nicht verwendet werden: GetTextHeight" );
+ DBG_ASSERT( GetUpdateMode(), "Sollte bei Update=sal_False nicht verwendet werden: GetTextHeight" );
if ( !IsFormatted() && !IsFormatting() )
((TextEngine*)this)->FormatAndUpdate();
@@ -1268,15 +1268,15 @@ ULONG TextEngine::GetTextHeight( ULONG nParagraph ) const
return CalcParaHeight( nParagraph );
}
-ULONG TextEngine::CalcTextWidth( ULONG nPara )
+sal_uLong TextEngine::CalcTextWidth( sal_uLong nPara )
{
- ULONG nParaWidth = 0;
+ sal_uLong nParaWidth = 0;
TEParaPortion* pPortion = mpTEParaPortions->GetObject( nPara );
- for ( USHORT nLine = pPortion->GetLines().Count(); nLine; )
+ for ( sal_uInt16 nLine = pPortion->GetLines().Count(); nLine; )
{
- ULONG nLineWidth = 0;
+ sal_uLong nLineWidth = 0;
TextLine* pLine = pPortion->GetLines().GetObject( --nLine );
- for ( USHORT nTP = pLine->GetStartPortion(); nTP <= pLine->GetEndPortion(); nTP++ )
+ for ( sal_uInt16 nTP = pLine->GetStartPortion(); nTP <= pLine->GetEndPortion(); nTP++ )
{
TETextPortion* pTextPortion = pPortion->GetTextPortions().GetObject( nTP );
nLineWidth += pTextPortion->GetWidth();
@@ -1287,7 +1287,7 @@ ULONG TextEngine::CalcTextWidth( ULONG nPara )
return nParaWidth;
}
-ULONG TextEngine::CalcTextWidth()
+sal_uLong TextEngine::CalcTextWidth()
{
if ( !IsFormatted() && !IsFormatting() )
FormatAndUpdate();
@@ -1295,9 +1295,9 @@ ULONG TextEngine::CalcTextWidth()
if ( mnCurTextWidth == 0xFFFFFFFF )
{
mnCurTextWidth = 0;
- for ( ULONG nPara = mpTEParaPortions->Count(); nPara; )
+ for ( sal_uLong nPara = mpTEParaPortions->Count(); nPara; )
{
- ULONG nParaWidth = CalcTextWidth( --nPara );
+ sal_uLong nParaWidth = CalcTextWidth( --nPara );
if ( nParaWidth > mnCurTextWidth )
mnCurTextWidth = nParaWidth;
}
@@ -1305,25 +1305,25 @@ ULONG TextEngine::CalcTextWidth()
return mnCurTextWidth+1;// Ein breiter, da in CreateLines bei >= umgebrochen wird.
}
-ULONG TextEngine::CalcTextHeight()
+sal_uLong TextEngine::CalcTextHeight()
{
- DBG_ASSERT( GetUpdateMode(), "Sollte bei Update=FALSE nicht verwendet werden: CalcTextHeight" );
+ DBG_ASSERT( GetUpdateMode(), "Sollte bei Update=sal_False nicht verwendet werden: CalcTextHeight" );
- ULONG nY = 0;
- for ( ULONG nPortion = mpTEParaPortions->Count(); nPortion; )
+ sal_uLong nY = 0;
+ for ( sal_uLong nPortion = mpTEParaPortions->Count(); nPortion; )
nY += CalcParaHeight( --nPortion );
return nY;
}
-ULONG TextEngine::CalcTextWidth( ULONG nPara, USHORT nPortionStart, USHORT nLen, const Font* pFont )
+sal_uLong TextEngine::CalcTextWidth( sal_uLong nPara, sal_uInt16 nPortionStart, sal_uInt16 nLen, const Font* pFont )
{
// Innerhalb des Textes darf es keinen Portionwechsel (Attribut/Tab) geben!
DBG_ASSERT( mpDoc->GetNodes().GetObject( nPara )->GetText().Search( '\t', nPortionStart ) >= (nPortionStart+nLen), "CalcTextWidth: Tab!" );
- ULONG nWidth;
+ sal_uLong nWidth;
if ( mnFixCharWidth100 )
{
- nWidth = (ULONG)nLen*mnFixCharWidth100/100;
+ nWidth = (sal_uLong)nLen*mnFixCharWidth100/100;
}
else
{
@@ -1339,14 +1339,14 @@ ULONG TextEngine::CalcTextWidth( ULONG nPara, USHORT nPortionStart, USHORT nLen,
mpRefDev->SetFont( aFont );
}
TextNode* pNode = mpDoc->GetNodes().GetObject( nPara );
- nWidth = (ULONG)mpRefDev->GetTextWidth( pNode->GetText(), nPortionStart, nLen );
+ nWidth = (sal_uLong)mpRefDev->GetTextWidth( pNode->GetText(), nPortionStart, nLen );
}
return nWidth;
}
-USHORT TextEngine::GetLineCount( ULONG nParagraph ) const
+sal_uInt16 TextEngine::GetLineCount( sal_uLong nParagraph ) const
{
DBG_ASSERT( nParagraph < mpTEParaPortions->Count(), "GetLineCount: Out of range" );
@@ -1357,7 +1357,7 @@ USHORT TextEngine::GetLineCount( ULONG nParagraph ) const
return 0xFFFF;
}
-USHORT TextEngine::GetLineLen( ULONG nParagraph, USHORT nLine ) const
+sal_uInt16 TextEngine::GetLineLen( sal_uLong nParagraph, sal_uInt16 nLine ) const
{
DBG_ASSERT( nParagraph < mpTEParaPortions->Count(), "GetLineCount: Out of range" );
@@ -1371,9 +1371,9 @@ USHORT TextEngine::GetLineLen( ULONG nParagraph, USHORT nLine ) const
return 0xFFFF;
}
-ULONG TextEngine::CalcParaHeight( ULONG nParagraph ) const
+sal_uLong TextEngine::CalcParaHeight( sal_uLong nParagraph ) const
{
- ULONG nHeight = 0;
+ sal_uLong nHeight = 0;
TEParaPortion* pPPortion = mpTEParaPortions->GetObject( nParagraph );
DBG_ASSERT( pPPortion, "Absatz nicht gefunden: GetParaHeight" );
@@ -1387,12 +1387,12 @@ void TextEngine::UpdateSelections()
{
}
-Range TextEngine::GetInvalidYOffsets( ULONG nPortion )
+Range TextEngine::GetInvalidYOffsets( sal_uLong nPortion )
{
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPortion );
- USHORT nLines = pTEParaPortion->GetLines().Count();
- USHORT nLastInvalid, nFirstInvalid = 0;
- USHORT nLine;
+ sal_uInt16 nLines = pTEParaPortion->GetLines().Count();
+ sal_uInt16 nLastInvalid, nFirstInvalid = 0;
+ sal_uInt16 nLine;
for ( nLine = 0; nLine < nLines; nLine++ )
{
TextLine* pL = pTEParaPortion->GetLines().GetObject( nLine );
@@ -1416,12 +1416,12 @@ Range TextEngine::GetInvalidYOffsets( ULONG nPortion )
return Range( nFirstInvalid*mnCharHeight, ((nLastInvalid+1)*mnCharHeight)-1 );
}
-ULONG TextEngine::GetParagraphCount() const
+sal_uLong TextEngine::GetParagraphCount() const
{
return mpDoc->GetNodes().Count();
}
-void TextEngine::EnableUndo( BOOL bEnable )
+void TextEngine::EnableUndo( sal_Bool bEnable )
{
// Beim Umschalten des Modus Liste loeschen:
if ( bEnable != IsUndoEnabled() )
@@ -1430,14 +1430,14 @@ void TextEngine::EnableUndo( BOOL bEnable )
mbUndoEnabled = bEnable;
}
-SfxUndoManager& TextEngine::GetUndoManager()
+::svl::IUndoManager& TextEngine::GetUndoManager()
{
if ( !mpUndoManager )
mpUndoManager = new TextUndoManager( this );
return *mpUndoManager;
}
-void TextEngine::UndoActionStart( USHORT nId )
+void TextEngine::UndoActionStart( sal_uInt16 nId )
{
if ( IsUndoEnabled() && !IsInUndo() )
{
@@ -1447,13 +1447,13 @@ void TextEngine::UndoActionStart( USHORT nId )
}
}
-void TextEngine::UndoActionEnd( USHORT )
+void TextEngine::UndoActionEnd()
{
if ( IsUndoEnabled() && !IsInUndo() )
GetUndoManager().LeaveListAction();
}
-void TextEngine::InsertUndo( TextUndo* pUndo, BOOL bTryMerge )
+void TextEngine::InsertUndo( TextUndo* pUndo, sal_Bool bTryMerge )
{
DBG_ASSERT( !IsInUndo(), "InsertUndo im Undomodus!" );
GetUndoManager().AddUndoAction( pUndo, bTryMerge );
@@ -1465,7 +1465,7 @@ void TextEngine::ResetUndo()
mpUndoManager->Clear();
}
-void TextEngine::InsertContent( TextNode* pNode, ULONG nPara )
+void TextEngine::InsertContent( TextNode* pNode, sal_uLong nPara )
{
DBG_ASSERT( pNode, "NULL-Pointer in InsertContent! " );
DBG_ASSERT( IsInUndo(), "InsertContent nur fuer Undo()!" );
@@ -1475,7 +1475,7 @@ void TextEngine::InsertContent( TextNode* pNode, ULONG nPara )
ImpParagraphInserted( nPara );
}
-TextPaM TextEngine::SplitContent( ULONG nNode, USHORT nSepPos )
+TextPaM TextEngine::SplitContent( sal_uLong nNode, sal_uInt16 nSepPos )
{
#ifdef DBG_UTIL
TextNode* pNode = mpDoc->GetNodes().GetObject( nNode );
@@ -1487,21 +1487,21 @@ TextPaM TextEngine::SplitContent( ULONG nNode, USHORT nSepPos )
return ImpInsertParaBreak( aPaM );
}
-TextPaM TextEngine::ConnectContents( ULONG nLeftNode )
+TextPaM TextEngine::ConnectContents( sal_uLong nLeftNode )
{
DBG_ASSERT( IsInUndo(), "ConnectContent nur fuer Undo()!" );
return ImpConnectParagraphs( nLeftNode, nLeftNode+1 );
}
-void TextEngine::SeekCursor( ULONG nPara, USHORT nPos, Font& rFont, OutputDevice* pOutDev )
+void TextEngine::SeekCursor( sal_uLong nPara, sal_uInt16 nPos, Font& rFont, OutputDevice* pOutDev )
{
rFont = maFont;
if ( pOutDev )
pOutDev->SetTextColor( maTextColor );
TextNode* pNode = mpDoc->GetNodes().GetObject( nPara );
- USHORT nAttribs = pNode->GetCharAttribs().Count();
- for ( USHORT nAttr = 0; nAttr < nAttribs; nAttr++ )
+ sal_uInt16 nAttribs = pNode->GetCharAttribs().Count();
+ for ( sal_uInt16 nAttr = 0; nAttr < nAttribs; nAttr++ )
{
TextCharAttrib* pAttrib = pNode->GetCharAttribs().GetAttrib( nAttr );
if ( pAttrib->GetStart() > nPos )
@@ -1549,7 +1549,7 @@ void TextEngine::SeekCursor( ULONG nPara, USHORT nPos, Font& rFont, OutputDevice
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
rFont.SetColor( rStyleSettings.GetHighlightTextColor() );
rFont.SetFillColor( rStyleSettings.GetHighlightColor() );
- rFont.SetTransparent( FALSE );
+ rFont.SetTransparent( sal_False );
}
else if ( nAttr & EXTTEXTINPUT_ATTR_GRAYWAVELINE )
{
@@ -1560,9 +1560,9 @@ void TextEngine::SeekCursor( ULONG nPara, USHORT nPos, Font& rFont, OutputDevice
}
}
-void TextEngine::SetUpdateMode( BOOL bUp, TextView* pCurView, BOOL bForceUpdate )
+void TextEngine::SetUpdateMode( sal_Bool bUp, TextView* pCurView, sal_Bool bForceUpdate )
{
- BOOL bChanged = ( GetUpdateMode() != bUp );
+ sal_Bool bChanged = ( GetUpdateMode() != bUp );
mbUpdate = bUp;
if ( mbUpdate && ( bChanged || bForceUpdate ) )
@@ -1584,15 +1584,15 @@ void TextEngine::FormatAndUpdate( TextView* pCurView )
}
-void TextEngine::IdleFormatAndUpdate( TextView* pCurView, USHORT nMaxTimerRestarts )
+void TextEngine::IdleFormatAndUpdate( TextView* pCurView, sal_uInt16 nMaxTimerRestarts )
{
mpIdleFormatter->DoIdleFormat( pCurView, nMaxTimerRestarts );
}
void TextEngine::TextModified()
{
- mbFormatted = FALSE;
- mbModified = TRUE;
+ mbFormatted = sal_False;
+ mbModified = sal_True;
}
void TextEngine::UpdateViews( TextView* pCurView )
@@ -1602,7 +1602,7 @@ void TextEngine::UpdateViews( TextView* pCurView )
DBG_ASSERT( IsFormatted(), "UpdateViews: Doc nicht formatiert!" );
- for ( USHORT nView = 0; nView < mpViews->Count(); nView++ )
+ for ( sal_uInt16 nView = 0; nView < mpViews->Count(); nView++ )
{
TextView* pView = mpViews->GetObject( nView );
pView->HideCursor();
@@ -1647,12 +1647,12 @@ void TextEngine::CheckIdleFormatter()
void TextEngine::FormatFullDoc()
{
- for ( ULONG nPortion = 0; nPortion < mpTEParaPortions->Count(); nPortion++ )
+ for ( sal_uLong nPortion = 0; nPortion < mpTEParaPortions->Count(); nPortion++ )
{
- TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPortion ); USHORT nLen = pTEParaPortion->GetNode()->GetText().Len();
+ TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPortion ); sal_uInt16 nLen = pTEParaPortion->GetNode()->GetText().Len();
pTEParaPortion->MarkSelectionInvalid( 0, nLen );
}
- mbFormatted = FALSE;
+ mbFormatted = sal_False;
FormatDoc();
}
@@ -1661,26 +1661,26 @@ void TextEngine::FormatDoc()
if ( IsFormatted() || !GetUpdateMode() || IsFormatting() )
return;
- mbIsFormatting = TRUE;
- mbHasMultiLineParas = FALSE;
+ mbIsFormatting = sal_True;
+ mbHasMultiLineParas = sal_False;
long nY = 0;
- BOOL bGrow = FALSE;
+ sal_Bool bGrow = sal_False;
maInvalidRec = Rectangle(); // leermachen
- for ( ULONG nPara = 0; nPara < mpTEParaPortions->Count(); nPara++ )
+ for ( sal_uLong nPara = 0; nPara < mpTEParaPortions->Count(); nPara++ )
{
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara );
if ( pTEParaPortion->IsInvalid() )
{
- ULONG nOldParaWidth = 0xFFFFFFFF;
+ sal_uLong nOldParaWidth = 0xFFFFFFFF;
if ( mnCurTextWidth != 0xFFFFFFFF )
nOldParaWidth = CalcTextWidth( nPara );
ImpFormattingParagraph( nPara );
if ( CreateLines( nPara ) )
- bGrow = TRUE;
+ bGrow = sal_True;
// InvalidRec nur einmal setzen...
if ( maInvalidRec.IsEmpty() )
@@ -1700,7 +1700,7 @@ void TextEngine::FormatDoc()
if ( mnCurTextWidth != 0xFFFFFFFF )
{
- ULONG nNewParaWidth = CalcTextWidth( nPara );
+ sal_uLong nNewParaWidth = CalcTextWidth( nPara );
if ( nNewParaWidth >= mnCurTextWidth )
mnCurTextWidth = nNewParaWidth;
else if ( ( nOldParaWidth != 0xFFFFFFFF ) && ( nOldParaWidth >= mnCurTextWidth ) )
@@ -1713,12 +1713,12 @@ void TextEngine::FormatDoc()
}
nY += CalcParaHeight( nPara );
if ( !mbHasMultiLineParas && pTEParaPortion->GetLines().Count() > 1 )
- mbHasMultiLineParas = TRUE;
+ mbHasMultiLineParas = sal_True;
}
if ( !maInvalidRec.IsEmpty() )
{
- ULONG nNewHeight = CalcTextHeight();
+ sal_uLong nNewHeight = CalcTextHeight();
long nDiff = nNewHeight - mnCurTextHeight;
if ( nNewHeight < mnCurTextHeight )
{
@@ -1735,18 +1735,18 @@ void TextEngine::FormatDoc()
mnCurTextHeight = nNewHeight;
if ( nDiff )
{
- mbFormatted = TRUE;
+ mbFormatted = sal_True;
ImpTextHeightChanged();
}
}
- mbIsFormatting = FALSE;
- mbFormatted = TRUE;
+ mbIsFormatting = sal_False;
+ mbFormatted = sal_True;
ImpTextFormatted();
}
-void TextEngine::CreateAndInsertEmptyLine( ULONG nPara )
+void TextEngine::CreateAndInsertEmptyLine( sal_uLong nPara )
{
TextNode* pNode = mpDoc->GetNodes().GetObject( nPara );
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara );
@@ -1763,31 +1763,31 @@ void TextEngine::CreateAndInsertEmptyLine( ULONG nPara )
else
pTmpLine->SetStartX( mpDoc->GetLeftMargin() );
- BOOL bLineBreak = pNode->GetText().Len() ? TRUE : FALSE;
+ sal_Bool bLineBreak = pNode->GetText().Len() ? sal_True : sal_False;
TETextPortion* pDummyPortion = new TETextPortion( 0 );
pDummyPortion->GetWidth() = 0;
pTEParaPortion->GetTextPortions().Insert( pDummyPortion, pTEParaPortion->GetTextPortions().Count() );
- if ( bLineBreak == TRUE )
+ if ( bLineBreak == sal_True )
{
// -2: Die neue ist bereits eingefuegt.
#ifdef DBG_UTIL
TextLine* pLastLine = pTEParaPortion->GetLines().GetObject( pTEParaPortion->GetLines().Count()-2 );
DBG_ASSERT( pLastLine, "Weicher Umbruch, keine Zeile ?!" );
#endif
- USHORT nPos = (USHORT) pTEParaPortion->GetTextPortions().Count() - 1 ;
+ sal_uInt16 nPos = (sal_uInt16) pTEParaPortion->GetTextPortions().Count() - 1 ;
pTmpLine->SetStartPortion( nPos );
pTmpLine->SetEndPortion( nPos );
}
}
-void TextEngine::ImpBreakLine( ULONG nPara, TextLine* pLine, TETextPortion*, USHORT nPortionStart, long nRemainingWidth )
+void TextEngine::ImpBreakLine( sal_uLong nPara, TextLine* pLine, TETextPortion*, sal_uInt16 nPortionStart, long nRemainingWidth )
{
TextNode* pNode = mpDoc->GetNodes().GetObject( nPara );
// Font sollte noch eingestellt sein.
- USHORT nMaxBreakPos = mpRefDev->GetTextBreak( pNode->GetText(), nRemainingWidth, nPortionStart );
+ sal_uInt16 nMaxBreakPos = mpRefDev->GetTextBreak( pNode->GetText(), nRemainingWidth, nPortionStart );
DBG_ASSERT( nMaxBreakPos < pNode->GetText().Len(), "Break?!" );
@@ -1806,7 +1806,7 @@ void TextEngine::ImpBreakLine( ULONG nPara, TextLine* pLine, TETextPortion*, USH
static const com::sun::star::lang::Locale aDefLocale;
i18n::LineBreakResults aLBR = xBI->getLineBreak( pNode->GetText(), nMaxBreakPos, aDefLocale, pLine->GetStart(), aHyphOptions, aUserOptions );
- USHORT nBreakPos = (USHORT)aLBR.breakIndex;
+ sal_uInt16 nBreakPos = (sal_uInt16)aLBR.breakIndex;
if ( nBreakPos <= pLine->GetStart() )
{
nBreakPos = nMaxBreakPos;
@@ -1817,7 +1817,7 @@ void TextEngine::ImpBreakLine( ULONG nPara, TextLine* pLine, TETextPortion*, USH
// die angeknackste Portion ist die End-Portion
pLine->SetEnd( nBreakPos );
- USHORT nEndPortion = SplitTextPortion( nPara, nBreakPos );
+ sal_uInt16 nEndPortion = SplitTextPortion( nPara, nBreakPos );
sal_Bool bBlankSeparator = ( ( nBreakPos >= pLine->GetStart() ) &&
( pNode->GetText().GetChar( nBreakPos ) == ' ' ) ) ? sal_True : sal_False;
@@ -1832,7 +1832,7 @@ void TextEngine::ImpBreakLine( ULONG nPara, TextLine* pLine, TETextPortion*, USH
pLine->SetEndPortion( nEndPortion );
}
-USHORT TextEngine::SplitTextPortion( ULONG nPara, USHORT nPos )
+sal_uInt16 TextEngine::SplitTextPortion( sal_uLong nPara, sal_uInt16 nPos )
{
// Die Portion bei nPos wird geplittet, wenn bei nPos nicht
@@ -1840,11 +1840,11 @@ USHORT TextEngine::SplitTextPortion( ULONG nPara, USHORT nPos )
if ( nPos == 0 )
return 0;
- USHORT nSplitPortion;
- USHORT nTmpPos = 0;
+ sal_uInt16 nSplitPortion;
+ sal_uInt16 nTmpPos = 0;
TETextPortion* pTextPortion = 0;
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara );
- USHORT nPortions = pTEParaPortion->GetTextPortions().Count();
+ sal_uInt16 nPortions = pTEParaPortion->GetTextPortions().Count();
for ( nSplitPortion = 0; nSplitPortion < nPortions; nSplitPortion++ )
{
TETextPortion* pTP = pTEParaPortion->GetTextPortions().GetObject(nSplitPortion);
@@ -1860,7 +1860,7 @@ USHORT TextEngine::SplitTextPortion( ULONG nPara, USHORT nPos )
DBG_ASSERT( pTextPortion, "Position ausserhalb des Bereichs!" );
- USHORT nOverlapp = nTmpPos - nPos;
+ sal_uInt16 nOverlapp = nTmpPos - nPos;
pTextPortion->GetLen() = pTextPortion->GetLen() - nOverlapp;
TETextPortion* pNewPortion = new TETextPortion( nOverlapp );
pTEParaPortion->GetTextPortions().Insert( pNewPortion, nSplitPortion+1 );
@@ -1869,18 +1869,18 @@ USHORT TextEngine::SplitTextPortion( ULONG nPara, USHORT nPos )
return nSplitPortion;
}
-void TextEngine::CreateTextPortions( ULONG nPara, USHORT nStartPos )
+void TextEngine::CreateTextPortions( sal_uLong nPara, sal_uInt16 nStartPos )
{
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara );
TextNode* pNode = pTEParaPortion->GetNode();
DBG_ASSERT( pNode->GetText().Len(), "CreateTextPortions sollte nicht fuer leere Absaetze verwendet werden!" );
TESortedPositions aPositions;
- ULONG nZero = 0;
+ sal_uLong nZero = 0;
aPositions.Insert( nZero );
- USHORT nAttribs = pNode->GetCharAttribs().Count();
- for ( USHORT nAttr = 0; nAttr < nAttribs; nAttr++ )
+ sal_uInt16 nAttribs = pNode->GetCharAttribs().Count();
+ for ( sal_uInt16 nAttr = 0; nAttr < nAttribs; nAttr++ )
{
TextCharAttrib* pAttrib = pNode->GetCharAttribs().GetAttrib( nAttr );
@@ -1892,7 +1892,7 @@ void TextEngine::CreateTextPortions( ULONG nPara, USHORT nStartPos )
aPositions.Insert( pNode->GetText().Len() );
const TEWritingDirectionInfos& rWritingDirections = pTEParaPortion->GetWritingDirectionInfos();
- for ( USHORT nD = 0; nD < rWritingDirections.Count(); nD++ )
+ for ( sal_uInt16 nD = 0; nD < rWritingDirections.Count(); nD++ )
aPositions.Insert( rWritingDirections[nD].nStartPos );
if ( mpIMEInfos && mpIMEInfos->pAttribs && ( mpIMEInfos->aPos.GetPara() == nPara ) )
@@ -1908,7 +1908,7 @@ void TextEngine::CreateTextPortions( ULONG nPara, USHORT nStartPos )
}
}
- USHORT nTabPos = pNode->GetText().Search( '\t', 0 );
+ sal_uInt16 nTabPos = pNode->GetText().Search( '\t', 0 );
while ( nTabPos != STRING_NOTFOUND )
{
aPositions.Insert( nTabPos );
@@ -1919,9 +1919,9 @@ void TextEngine::CreateTextPortions( ULONG nPara, USHORT nStartPos )
// Ab ... loeschen:
// Leider muss die Anzahl der TextPortions mit aPositions.Count()
// nicht uebereinstimmen, da evtl. Zeilenumbrueche...
- USHORT nPortionStart = 0;
- USHORT nInvPortion = 0;
- USHORT nP;
+ sal_uInt16 nPortionStart = 0;
+ sal_uInt16 nInvPortion = 0;
+ sal_uInt16 nP;
for ( nP = 0; nP < pTEParaPortion->GetTextPortions().Count(); nP++ )
{
TETextPortion* pTmpPortion = pTEParaPortion->GetTextPortions().GetObject(nP);
@@ -1947,15 +1947,15 @@ void TextEngine::CreateTextPortions( ULONG nPara, USHORT nStartPos )
// Eine Portion kann auch durch einen Zeilenumbruch entstanden sein:
aPositions.Insert( nPortionStart );
- USHORT nInvPos;
+ sal_uInt16 nInvPos;
#ifdef DBG_UTIL
- BOOL bFound =
+ sal_Bool bFound =
#endif
aPositions.Seek_Entry( nPortionStart, &nInvPos );
DBG_ASSERT( bFound && ( nInvPos < (aPositions.Count()-1) ), "InvPos ?!" );
- for ( USHORT i = nInvPos+1; i < aPositions.Count(); i++ )
+ for ( sal_uInt16 i = nInvPos+1; i < aPositions.Count(); i++ )
{
- TETextPortion* pNew = new TETextPortion( (USHORT)aPositions[i] - (USHORT)aPositions[i-1] );
+ TETextPortion* pNew = new TETextPortion( (sal_uInt16)aPositions[i] - (sal_uInt16)aPositions[i-1] );
pTEParaPortion->GetTextPortions().Insert( pNew, pTEParaPortion->GetTextPortions().Count());
}
@@ -1965,7 +1965,7 @@ void TextEngine::CreateTextPortions( ULONG nPara, USHORT nStartPos )
#endif
}
-void TextEngine::RecalcTextPortion( ULONG nPara, USHORT nStartPos, short nNewChars )
+void TextEngine::RecalcTextPortion( sal_uLong nPara, sal_uInt16 nStartPos, short nNewChars )
{
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara );
DBG_ASSERT( pTEParaPortion->GetTextPortions().Count(), "Keine Portions!" );
@@ -1983,7 +1983,7 @@ void TextEngine::RecalcTextPortion( ULONG nPara, USHORT nStartPos, short nNewCha
( nStartPos && ( pNode->GetText().GetChar( nStartPos - 1 ) == '\t' ) ) ||
( ( !nStartPos && ( nNewChars < pNode->GetText().Len() ) && pNode->GetText().GetChar( nNewChars ) == '\t' ) ) )
{
- USHORT nNewPortionPos = 0;
+ sal_uInt16 nNewPortionPos = 0;
if ( nStartPos )
nNewPortionPos = SplitTextPortion( nPara, nStartPos ) + 1;
// else if ( ( pTEParaPortion->GetTextPortions().Count() == 1 ) &&
@@ -1996,7 +1996,7 @@ void TextEngine::RecalcTextPortion( ULONG nPara, USHORT nStartPos, short nNewCha
!pTEParaPortion->GetTextPortions()[nNewPortionPos]->GetLen() )
{
// Dann die leere Portion verwenden.
- USHORT & r =
+ sal_uInt16 & r =
pTEParaPortion->GetTextPortions()[nNewPortionPos]->GetLen();
r = r + nNewChars;
}
@@ -2008,8 +2008,8 @@ void TextEngine::RecalcTextPortion( ULONG nPara, USHORT nStartPos, short nNewCha
}
else
{
- USHORT nPortionStart;
- const USHORT nTP = pTEParaPortion->GetTextPortions().
+ sal_uInt16 nPortionStart;
+ const sal_uInt16 nTP = pTEParaPortion->GetTextPortions().
FindPortion( nStartPos, nPortionStart );
TETextPortion* const pTP = pTEParaPortion->GetTextPortions()[ nTP ];
DBG_ASSERT( pTP, "RecalcTextPortion: Portion nicht gefunden" );
@@ -2025,10 +2025,10 @@ void TextEngine::RecalcTextPortion( ULONG nPara, USHORT nStartPos, short nNewCha
// Es darf keine reinragende oder im Bereich startende Portion geben,
// also muss nStartPos <= nPos <= nStartPos - nNewChars(neg.) sein
- USHORT nPortion = 0;
- USHORT nPos = 0;
- USHORT nEnd = nStartPos-nNewChars;
- USHORT nPortions = pTEParaPortion->GetTextPortions().Count();
+ sal_uInt16 nPortion = 0;
+ sal_uInt16 nPos = 0;
+ sal_uInt16 nEnd = nStartPos-nNewChars;
+ sal_uInt16 nPortions = pTEParaPortion->GetTextPortions().Count();
TETextPortion* pTP = 0;
for ( nPortion = 0; nPortion < nPortions; nPortion++ )
{
@@ -2079,7 +2079,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan
TextPaM const* pSelEnd = 0;
if ( pSelection && pSelection->HasRange() )
{
- BOOL bInvers = pSelection->GetEnd() < pSelection->GetStart();
+ sal_Bool bInvers = pSelection->GetEnd() < pSelection->GetStart();
pSelStart = !bInvers ? &pSelection->GetStart() : &pSelection->GetEnd();
pSelEnd = bInvers ? &pSelection->GetStart() : &pSelection->GetEnd();
}
@@ -2090,23 +2090,23 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan
// --------------------------------------------------
// Ueber alle Absaetze...
// --------------------------------------------------
- for ( ULONG nPara = 0; nPara < mpTEParaPortions->Count(); nPara++ )
+ for ( sal_uLong nPara = 0; nPara < mpTEParaPortions->Count(); nPara++ )
{
TEParaPortion* pPortion = mpTEParaPortions->GetObject( nPara );
// falls beim Tippen Idle-Formatierung, asynchrones Paint.
if ( pPortion->IsInvalid() )
return;
- ULONG nParaHeight = CalcParaHeight( nPara );
- USHORT nIndex = 0;
+ sal_uLong nParaHeight = CalcParaHeight( nPara );
+ sal_uInt16 nIndex = 0;
if ( ( !pPaintArea || ( ( nY + (long)nParaHeight ) > pPaintArea->Top() ) )
&& ( !pPaintRange || ( ( nPara >= pPaintRange->GetStart().GetPara() ) && ( nPara <= pPaintRange->GetEnd().GetPara() ) ) ) )
{
// --------------------------------------------------
// Ueber die Zeilen des Absatzes...
// --------------------------------------------------
- USHORT nLines = pPortion->GetLines().Count();
- for ( USHORT nLine = 0; nLine < nLines; nLine++ )
+ sal_uInt16 nLines = pPortion->GetLines().Count();
+ for ( sal_uInt16 nLine = 0; nLine < nLines; nLine++ )
{
TextLine* pLine = pPortion->GetLines().GetObject(nLine);
Point aTmpPos( rStartPos.X() + pLine->GetStartX(), nY );
@@ -2120,7 +2120,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan
// Ueber die Portions der Zeile...
// --------------------------------------------------
nIndex = pLine->GetStart();
- for ( USHORT y = pLine->GetStartPortion(); y <= pLine->GetEndPortion(); y++ )
+ for ( sal_uInt16 y = pLine->GetStartPortion(); y <= pLine->GetEndPortion(); y++ )
{
DBG_ASSERT( pPortion->GetTextPortions().Count(), "Zeile ohne Textportion im Paint!" );
TETextPortion* pTextPortion = pPortion->GetTextPortions().GetObject( y );
@@ -2145,13 +2145,13 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan
Font aFont;
SeekCursor( nPara, nIndex+1, aFont, pOutDev );
if( bTransparent )
- aFont.SetTransparent( TRUE );
+ aFont.SetTransparent( sal_True );
else if ( pSelection )
- aFont.SetTransparent( FALSE );
+ aFont.SetTransparent( sal_False );
pOutDev->SetFont( aFont );
- USHORT nTmpIndex = nIndex;
- USHORT nEnd = nTmpIndex + pTextPortion->GetLen();
+ sal_uInt16 nTmpIndex = nIndex;
+ sal_uInt16 nEnd = nTmpIndex + pTextPortion->GetLen();
Point aPos = aTmpPos;
if ( pPaintRange )
{
@@ -2168,7 +2168,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan
}
}
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
if ( pSelStart )
{
// liegt ein Teil in der Selektion???
@@ -2176,7 +2176,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan
TextPaM aTextEnd( nPara, nEnd );
if ( ( aTextStart < *pSelEnd ) && ( aTextEnd > *pSelStart ) )
{
- USHORT nL;
+ sal_uInt16 nL;
// 1) Bereich vor Selektion
if ( aTextStart < *pSelStart )
@@ -2211,7 +2211,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan
aPos.X() = rStartPos.X() + ImpGetOutputOffset( nPara, pLine, nTmpIndex, nTmpIndex+nL );
pOutDev->DrawText( aPos, pPortion->GetNode()->GetText(), nTmpIndex, nEnd-nTmpIndex );
}
- bDone = TRUE;
+ bDone = sal_True;
}
}
if ( !bDone )
@@ -2229,7 +2229,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan
if ( pSelStart || pPaintRange )
{
Rectangle aTabArea( aTmpPos, Point( aTmpPos.X()+nTxtWidth, aTmpPos.Y()+mnCharHeight-1 ) );
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
if ( pSelStart )
{
// liegt der Tab in der Selektion???
@@ -2241,7 +2241,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan
pOutDev->SetFillColor( rStyleSettings.GetHighlightColor() );
pOutDev->DrawRect( aTabArea );
pOutDev->SetFillColor( aOldColor );
- bDone = TRUE;
+ bDone = sal_True;
}
}
if ( !bDone )
@@ -2282,15 +2282,15 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan
}
}
-BOOL TextEngine::CreateLines( ULONG nPara )
+sal_Bool TextEngine::CreateLines( sal_uLong nPara )
{
- // BOOL: Aenderung der Hoehe des Absatzes Ja/Nein - TRUE/FALSE
+ // sal_Bool: Aenderung der Hoehe des Absatzes Ja/Nein - sal_True/sal_False
TextNode* pNode = mpDoc->GetNodes().GetObject( nPara );
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara );
DBG_ASSERT( pTEParaPortion->IsInvalid(), "CreateLines: Portion nicht invalid!" );
- USHORT nOldLineCount = pTEParaPortion->GetLines().Count();
+ sal_uInt16 nOldLineCount = pTEParaPortion->GetLines().Count();
// ---------------------------------------------------------------
// Schnelle Sonderbehandlung fuer leere Absaetze...
@@ -2318,9 +2318,9 @@ BOOL TextEngine::CreateLines( ULONG nPara )
}
const short nInvalidDiff = pTEParaPortion->GetInvalidDiff();
- const USHORT nInvalidStart = pTEParaPortion->GetInvalidPosStart();
- const USHORT nInvalidEnd = nInvalidStart + Abs( nInvalidDiff );
- BOOL bQuickFormat = FALSE;
+ const sal_uInt16 nInvalidStart = pTEParaPortion->GetInvalidPosStart();
+ const sal_uInt16 nInvalidEnd = nInvalidStart + Abs( nInvalidDiff );
+ sal_Bool bQuickFormat = sal_False;
if ( !pTEParaPortion->GetWritingDirectionInfos().Count() )
ImpInitWritingDirections( nPara );
@@ -2329,24 +2329,24 @@ BOOL TextEngine::CreateLines( ULONG nPara )
{
if ( pTEParaPortion->IsSimpleInvalid() && ( nInvalidDiff > 0 ) )
{
- bQuickFormat = TRUE;
+ bQuickFormat = sal_True;
}
else if ( ( pTEParaPortion->IsSimpleInvalid() ) && ( nInvalidDiff < 0 ) )
{
// pruefen, ob loeschen ueber Portiongrenzen erfolgte...
- USHORT nStart = nInvalidStart; // DOPPELT !!!!!!!!!!!!!!!
- USHORT nEnd = nStart - nInvalidDiff; // neg.
- bQuickFormat = TRUE;
- USHORT nPos = 0;
- USHORT nPortions = pTEParaPortion->GetTextPortions().Count();
- for ( USHORT nTP = 0; nTP < nPortions; nTP++ )
+ sal_uInt16 nStart = nInvalidStart; // DOPPELT !!!!!!!!!!!!!!!
+ sal_uInt16 nEnd = nStart - nInvalidDiff; // neg.
+ bQuickFormat = sal_True;
+ sal_uInt16 nPos = 0;
+ sal_uInt16 nPortions = pTEParaPortion->GetTextPortions().Count();
+ for ( sal_uInt16 nTP = 0; nTP < nPortions; nTP++ )
{
// Es darf kein Start/Ende im geloeschten Bereich liegen.
TETextPortion* const pTP = pTEParaPortion->GetTextPortions().GetObject( nTP );
nPos = nPos + pTP->GetLen();
if ( ( nPos > nStart ) && ( nPos < nEnd ) )
{
- bQuickFormat = FALSE;
+ bQuickFormat = sal_False;
break;
}
}
@@ -2363,8 +2363,8 @@ BOOL TextEngine::CreateLines( ULONG nPara )
// Zeilen flaggen => nicht removen !
// ---------------------------------------------------------------
- USHORT nLine = pTEParaPortion->GetLines().Count()-1;
- for ( USHORT nL = 0; nL <= nLine; nL++ )
+ sal_uInt16 nLine = pTEParaPortion->GetLines().Count()-1;
+ for ( sal_uInt16 nL = 0; nL <= nLine; nL++ )
{
TextLine* pLine = pTEParaPortion->GetLines().GetObject( nL );
if ( pLine->GetEnd() > nInvalidStart )
@@ -2384,25 +2384,25 @@ BOOL TextEngine::CreateLines( ULONG nPara )
// ---------------------------------------------------------------
// Ab hier alle Zeilen durchformatieren...
// ---------------------------------------------------------------
- USHORT nDelFromLine = 0xFFFF;
- BOOL bLineBreak = FALSE;
+ sal_uInt16 nDelFromLine = 0xFFFF;
+ sal_Bool bLineBreak = sal_False;
- USHORT nIndex = pLine->GetStart();
+ sal_uInt16 nIndex = pLine->GetStart();
TextLine aSaveLine( *pLine );
Font aFont;
- BOOL bCalcPortion = TRUE;
+ sal_Bool bCalcPortion = sal_True;
while ( nIndex < pNode->GetText().Len() )
{
- BOOL bEOL = FALSE;
- BOOL bEOC = FALSE;
- USHORT nPortionStart = 0;
- USHORT nPortionEnd = 0;
+ sal_Bool bEOL = sal_False;
+ sal_Bool bEOC = sal_False;
+ sal_uInt16 nPortionStart = 0;
+ sal_uInt16 nPortionEnd = 0;
- USHORT nTmpPos = nIndex;
- USHORT nTmpPortion = pLine->GetStartPortion();
+ sal_uInt16 nTmpPos = nIndex;
+ sal_uInt16 nTmpPortion = pLine->GetStartPortion();
long nTmpWidth = mpDoc->GetLeftMargin();
// long nXWidth = mnMaxTextWidth ? ( mnMaxTextWidth - mpDoc->GetLeftMargin() ) : 0x7FFFFFFF;
// Margin nicht abziehen, ist schon in TmpWidth enthalten.
@@ -2412,8 +2412,8 @@ BOOL TextEngine::CreateLines( ULONG nPara )
// Portion suchen, die nicht mehr in Zeile passt....
TETextPortion* pPortion = 0;
- BOOL bBrokenLine = FALSE;
- bLineBreak = FALSE;
+ sal_Bool bBrokenLine = sal_False;
+ bLineBreak = sal_False;
while ( ( nTmpWidth <= nXWidth ) && !bEOL && ( nTmpPortion < pTEParaPortion->GetTextPortions().Count() ) )
{
@@ -2432,8 +2432,8 @@ BOOL TextEngine::CreateLines( ULONG nPara )
// Aber was jetzt ? Tab passend machen!
pPortion->GetWidth() = nXWidth-1;
nTmpWidth = pPortion->GetWidth();
- bEOL = TRUE;
- bBrokenLine = TRUE;
+ bEOL = sal_True;
+ bBrokenLine = sal_True;
}
pPortion->GetKind() = PORTIONKIND_TAB;
}
@@ -2454,30 +2454,30 @@ BOOL TextEngine::CreateLines( ULONG nPara )
}
// das war evtl. eine Portion zu weit:
- BOOL bFixedEnd = FALSE;
+ sal_Bool bFixedEnd = sal_False;
if ( nTmpWidth > nXWidth )
{
nPortionEnd = nTmpPos;
nTmpPos = nTmpPos - pPortion->GetLen();
nPortionStart = nTmpPos;
nTmpPortion--;
- bEOL = FALSE;
- bEOC = FALSE;
+ bEOL = sal_False;
+ bEOC = sal_False;
nTmpWidth -= pPortion->GetWidth();
if ( pPortion->GetKind() == PORTIONKIND_TAB )
{
- bEOL = TRUE;
- bFixedEnd = TRUE;
+ bEOL = sal_True;
+ bFixedEnd = sal_True;
}
}
else
{
- bEOL = TRUE;
- bEOC = TRUE;
+ bEOL = sal_True;
+ bEOC = sal_True;
pLine->SetEnd( nPortionEnd );
DBG_ASSERT( pTEParaPortion->GetTextPortions().Count(), "Keine TextPortions?" );
- pLine->SetEndPortion( (USHORT)pTEParaPortion->GetTextPortions().Count() - 1 );
+ pLine->SetEndPortion( (sal_uInt16)pTEParaPortion->GetTextPortions().Count() - 1 );
}
if ( bFixedEnd )
@@ -2489,7 +2489,7 @@ BOOL TextEngine::CreateLines( ULONG nPara )
{
pLine->SetEnd( nPortionStart+1 );
pLine->SetEndPortion( nTmpPortion-1 );
- bEOC = FALSE; // wurde oben gesetzt, vielleich mal die if's umstellen?
+ bEOC = sal_False; // wurde oben gesetzt, vielleich mal die if's umstellen?
}
else if ( !bEOL )
{
@@ -2502,7 +2502,7 @@ BOOL TextEngine::CreateLines( ULONG nPara )
{
// Ausrichten...
long nTextWidth = 0;
- for ( USHORT nTP = pLine->GetStartPortion(); nTP <= pLine->GetEndPortion(); nTP++ )
+ for ( sal_uInt16 nTP = pLine->GetStartPortion(); nTP <= pLine->GetEndPortion(); nTP++ )
{
TETextPortion* pTextPortion = pTEParaPortion->GetTextPortions().GetObject( nTP );
nTextWidth += pTextPortion->GetWidth();
@@ -2511,9 +2511,9 @@ BOOL TextEngine::CreateLines( ULONG nPara )
if ( nSpace > 0 )
{
if ( ImpGetAlign() == TXTALIGN_CENTER )
- pLine->SetStartX( (USHORT)(nSpace / 2) );
+ pLine->SetStartX( (sal_uInt16)(nSpace / 2) );
else // TXTALIGN_RIGHT
- pLine->SetStartX( (USHORT)nSpace );
+ pLine->SetStartX( (sal_uInt16)nSpace );
}
}
else
@@ -2542,8 +2542,8 @@ BOOL TextEngine::CreateLines( ULONG nPara )
}
else
{
- USHORT nStart = pLine->GetStart();
- USHORT nEnd = pLine->GetEnd();
+ sal_uInt16 nStart = pLine->GetStart();
+ sal_uInt16 nEnd = pLine->GetEnd();
if ( nStart > nInvalidEnd )
{
@@ -2553,7 +2553,7 @@ BOOL TextEngine::CreateLines( ULONG nPara )
pLine->SetValid();
if ( bCalcPortion && bQuickFormat )
{
- bCalcPortion = FALSE;
+ bCalcPortion = sal_False;
pTEParaPortion->CorrectValuesBehindLastFormattedLine( nLine );
break;
}
@@ -2567,7 +2567,7 @@ BOOL TextEngine::CreateLines( ULONG nPara )
// textbreiten neu bestimmen:
if ( nEnd == ( aSaveLine.GetEnd() + nInvalidDiff ) )
{
- bCalcPortion = FALSE;
+ bCalcPortion = sal_False;
pTEParaPortion->CorrectValuesBehindLastFormattedLine( nLine );
break;
}
@@ -2578,7 +2578,7 @@ BOOL TextEngine::CreateLines( ULONG nPara )
nIndex = pLine->GetEnd(); // naechste Zeile Start = letzte Zeile Ende
// weil nEnd hinter das letzte Zeichen zeigt!
- USHORT nEndPortion = pLine->GetEndPortion();
+ sal_uInt16 nEndPortion = pLine->GetEndPortion();
// Naechste Zeile oder ggf. neue Zeile....
pLine = 0;
@@ -2609,7 +2609,7 @@ BOOL TextEngine::CreateLines( ULONG nPara )
DBG_ASSERT( pTEParaPortion->GetLines().Count(), "Keine Zeile nach CreateLines!" );
- if ( bLineBreak == TRUE )
+ if ( bLineBreak == sal_True )
CreateAndInsertEmptyLine( nPara );
pTEParaPortion->SetValid();
@@ -2626,8 +2626,8 @@ String TextEngine::GetWord( const TextPaM& rCursorPos, TextPaM* pStartOfWord )
TextNode* pNode = mpDoc->GetNodes().GetObject( rCursorPos.GetPara() );
uno::Reference < i18n::XBreakIterator > xBI = GetBreakIterator();
i18n::Boundary aBoundary = xBI->getWordBoundary( pNode->GetText(), rCursorPos.GetIndex(), GetLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES, sal_True );
- aSel.GetStart().GetIndex() = (USHORT)aBoundary.startPos;
- aSel.GetEnd().GetIndex() = (USHORT)aBoundary.endPos;
+ aSel.GetStart().GetIndex() = (sal_uInt16)aBoundary.startPos;
+ aSel.GetEnd().GetIndex() = (sal_uInt16)aBoundary.endPos;
aWord = pNode->GetText().Copy( aSel.GetStart().GetIndex(), aSel.GetEnd().GetIndex() - aSel.GetStart().GetIndex() );
if ( pStartOfWord )
*pStartOfWord = aSel.GetStart();
@@ -2635,18 +2635,18 @@ String TextEngine::GetWord( const TextPaM& rCursorPos, TextPaM* pStartOfWord )
return aWord;
}
-BOOL TextEngine::Read( SvStream& rInput, const TextSelection* pSel )
+sal_Bool TextEngine::Read( SvStream& rInput, const TextSelection* pSel )
{
- BOOL bUpdate = GetUpdateMode();
- SetUpdateMode( FALSE );
+ sal_Bool bUpdate = GetUpdateMode();
+ SetUpdateMode( sal_False );
- UndoActionStart( TEXTUNDO_READ );
+ UndoActionStart();
TextSelection aSel;
if ( pSel )
aSel = *pSel;
else
{
- ULONG nParas = mpDoc->GetNodes().Count();
+ sal_uLong nParas = mpDoc->GetNodes().Count();
TextNode* pNode = mpDoc->GetNodes().GetObject( nParas - 1 );
aSel = TextPaM( nParas-1 , pNode->GetText().Len() );
}
@@ -2655,7 +2655,7 @@ BOOL TextEngine::Read( SvStream& rInput, const TextSelection* pSel )
aSel = ImpDeleteText( aSel );
ByteString aLine;
- BOOL bDone = rInput.ReadLine( aLine );
+ sal_Bool bDone = rInput.ReadLine( aLine );
String aTmpStr( aLine, rInput.GetStreamCharSet() ), aStr;
while ( bDone )
{
@@ -2666,7 +2666,7 @@ BOOL TextEngine::Read( SvStream& rInput, const TextSelection* pSel )
aSel = ImpInsertParaBreak( aSel.GetEnd() );
}
- UndoActionEnd( TEXTUNDO_READ );
+ UndoActionEnd();
TextSelection aNewSel( aSel.GetEnd(), aSel.GetEnd() );
@@ -2677,17 +2677,17 @@ BOOL TextEngine::Read( SvStream& rInput, const TextSelection* pSel )
SetUpdateMode( bUpdate );
FormatAndUpdate( GetActiveView() );
- return rInput.GetError() ? FALSE : TRUE;
+ return rInput.GetError() ? sal_False : sal_True;
}
-BOOL TextEngine::Write( SvStream& rOutput, const TextSelection* pSel, BOOL bHTML )
+sal_Bool TextEngine::Write( SvStream& rOutput, const TextSelection* pSel, sal_Bool bHTML )
{
TextSelection aSel;
if ( pSel )
aSel = *pSel;
else
{
- ULONG nParas = mpDoc->GetNodes().Count();
+ sal_uLong nParas = mpDoc->GetNodes().Count();
TextNode* pNode = mpDoc->GetNodes().GetObject( nParas - 1 );
aSel.GetStart() = TextPaM( 0, 0 );
aSel.GetEnd() = TextPaM( nParas-1, pNode->GetText().Len() );
@@ -2699,12 +2699,12 @@ BOOL TextEngine::Write( SvStream& rOutput, const TextSelection* pSel, BOOL bHTML
rOutput.WriteLine( "<BODY>" );
}
- for ( ULONG nPara = aSel.GetStart().GetPara(); nPara <= aSel.GetEnd().GetPara(); nPara++ )
+ for ( sal_uLong nPara = aSel.GetStart().GetPara(); nPara <= aSel.GetEnd().GetPara(); nPara++ )
{
TextNode* pNode = mpDoc->GetNodes().GetObject( nPara );
- USHORT nStartPos = 0;
- USHORT nEndPos = pNode->GetText().Len();
+ sal_uInt16 nStartPos = 0;
+ sal_uInt16 nEndPos = pNode->GetText().Len();
if ( nPara == aSel.GetStart().GetPara() )
nStartPos = aSel.GetStart().GetIndex();
if ( nPara == aSel.GetEnd().GetPara() )
@@ -2726,8 +2726,8 @@ BOOL TextEngine::Write( SvStream& rOutput, const TextSelection* pSel, BOOL bHTML
}
else
{
- USHORT nTmpStart = nStartPos;
- USHORT nTmpEnd = nEndPos;
+ sal_uInt16 nTmpStart = nStartPos;
+ sal_uInt16 nTmpEnd = nEndPos;
do
{
TextCharAttrib* pAttr = pNode->GetCharAttribs().FindNextAttrib( TEXTATTR_HYPERLINK, nTmpStart, nEndPos );
@@ -2764,22 +2764,22 @@ BOOL TextEngine::Write( SvStream& rOutput, const TextSelection* pSel, BOOL bHTML
rOutput.WriteLine( "</HTML>" );
}
- return rOutput.GetError() ? FALSE : TRUE;
+ return rOutput.GetError() ? sal_False : sal_True;
}
-void TextEngine::RemoveAttribs( ULONG nPara, BOOL bIdleFormatAndUpdate )
+void TextEngine::RemoveAttribs( sal_uLong nPara, sal_Bool bIdleFormatAndUpdate )
{
if ( nPara < mpDoc->GetNodes().Count() )
{
TextNode* pNode = mpDoc->GetNodes().GetObject( nPara );
if ( pNode->GetCharAttribs().Count() )
{
- pNode->GetCharAttribs().Clear( TRUE );
+ pNode->GetCharAttribs().Clear( sal_True );
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara );
pTEParaPortion->MarkSelectionInvalid( 0, pNode->GetText().Len() );
- mbFormatted = FALSE;
+ mbFormatted = sal_False;
if ( bIdleFormatAndUpdate )
IdleFormatAndUpdate( NULL, 0xFFFF );
@@ -2788,7 +2788,7 @@ void TextEngine::RemoveAttribs( ULONG nPara, BOOL bIdleFormatAndUpdate )
}
}
}
-void TextEngine::RemoveAttribs( ULONG nPara, USHORT nWhich, BOOL bIdleFormatAndUpdate )
+void TextEngine::RemoveAttribs( sal_uLong nPara, sal_uInt16 nWhich, sal_Bool bIdleFormatAndUpdate )
{
if ( nPara < mpDoc->GetNodes().Count() )
{
@@ -2796,15 +2796,15 @@ void TextEngine::RemoveAttribs( ULONG nPara, USHORT nWhich, BOOL bIdleFormatAndU
if ( pNode->GetCharAttribs().Count() )
{
TextCharAttribList& rAttribs = pNode->GetCharAttribs();
- USHORT nAttrCount = rAttribs.Count();
- for(USHORT nAttr = nAttrCount; nAttr; --nAttr)
+ sal_uInt16 nAttrCount = rAttribs.Count();
+ for(sal_uInt16 nAttr = nAttrCount; nAttr; --nAttr)
{
if(rAttribs.GetAttrib( nAttr - 1 )->Which() == nWhich)
rAttribs.RemoveAttrib( nAttr -1 );
}
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara );
pTEParaPortion->MarkSelectionInvalid( 0, pNode->GetText().Len() );
- mbFormatted = FALSE;
+ mbFormatted = sal_False;
if(bIdleFormatAndUpdate)
IdleFormatAndUpdate( NULL, 0xFFFF );
else
@@ -2812,7 +2812,7 @@ void TextEngine::RemoveAttribs( ULONG nPara, USHORT nWhich, BOOL bIdleFormatAndU
}
}
}
-void TextEngine::RemoveAttrib( ULONG nPara, const TextCharAttrib& rAttrib )
+void TextEngine::RemoveAttrib( sal_uLong nPara, const TextCharAttrib& rAttrib )
{
if ( nPara < mpDoc->GetNodes().Count() )
{
@@ -2820,8 +2820,8 @@ void TextEngine::RemoveAttrib( ULONG nPara, const TextCharAttrib& rAttrib )
if ( pNode->GetCharAttribs().Count() )
{
TextCharAttribList& rAttribs = pNode->GetCharAttribs();
- USHORT nAttrCount = rAttribs.Count();
- for(USHORT nAttr = nAttrCount; nAttr; --nAttr)
+ sal_uInt16 nAttrCount = rAttribs.Count();
+ for(sal_uInt16 nAttr = nAttrCount; nAttr; --nAttr)
{
if(rAttribs.GetAttrib( nAttr - 1 ) == &rAttrib)
{
@@ -2831,13 +2831,13 @@ void TextEngine::RemoveAttrib( ULONG nPara, const TextCharAttrib& rAttrib )
}
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara );
pTEParaPortion->MarkSelectionInvalid( 0, pNode->GetText().Len() );
- mbFormatted = FALSE;
+ mbFormatted = sal_False;
FormatAndUpdate( NULL );
}
}
}
-void TextEngine::SetAttrib( const TextAttrib& rAttr, ULONG nPara, USHORT nStart, USHORT nEnd, BOOL bIdleFormatAndUpdate )
+void TextEngine::SetAttrib( const TextAttrib& rAttr, sal_uLong nPara, sal_uInt16 nStart, sal_uInt16 nEnd, sal_Bool bIdleFormatAndUpdate )
{
// Es wird hier erstmal nicht geprueft, ob sich Attribute ueberlappen!
// Diese Methode ist erstmal nur fuer einen Editor, der fuer eine Zeile
@@ -2851,7 +2851,7 @@ void TextEngine::SetAttrib( const TextAttrib& rAttr, ULONG nPara, USHORT nStart,
TextNode* pNode = mpDoc->GetNodes().GetObject( nPara );
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara );
- USHORT nMax = pNode->GetText().Len();
+ sal_uInt16 nMax = pNode->GetText().Len();
if ( nStart > nMax )
nStart = nMax;
if ( nEnd > nMax )
@@ -2860,7 +2860,7 @@ void TextEngine::SetAttrib( const TextAttrib& rAttr, ULONG nPara, USHORT nStart,
pNode->GetCharAttribs().InsertAttrib( new TextCharAttrib( rAttr, nStart, nEnd ) );
pTEParaPortion->MarkSelectionInvalid( nStart, nEnd );
- mbFormatted = FALSE;
+ mbFormatted = sal_False;
if ( bIdleFormatAndUpdate )
IdleFormatAndUpdate( NULL, 0xFFFF );
else
@@ -2887,14 +2887,14 @@ void TextEngine::ValidateSelection( TextSelection& rSel ) const
void TextEngine::ValidatePaM( TextPaM& rPaM ) const
{
- ULONG nMaxPara = mpDoc->GetNodes().Count() - 1;
+ sal_uLong nMaxPara = mpDoc->GetNodes().Count() - 1;
if ( rPaM.GetPara() > nMaxPara )
{
rPaM.GetPara() = nMaxPara;
rPaM.GetIndex() = 0xFFFF;
}
- USHORT nMaxIndex = GetTextLen( rPaM.GetPara() );
+ sal_uInt16 nMaxIndex = GetTextLen( rPaM.GetPara() );
if ( rPaM.GetIndex() > nMaxIndex )
rPaM.GetIndex() = nMaxIndex;
}
@@ -2902,18 +2902,18 @@ void TextEngine::ValidatePaM( TextPaM& rPaM ) const
// Status & Selektionsanpassung
-void TextEngine::ImpParagraphInserted( ULONG nPara )
+void TextEngine::ImpParagraphInserted( sal_uLong nPara )
{
// Die aktive View braucht nicht angepasst werden, aber bei allen
// passiven muss die Selektion angepasst werden:
if ( mpViews->Count() > 1 )
{
- for ( USHORT nView = mpViews->Count(); nView; )
+ for ( sal_uInt16 nView = mpViews->Count(); nView; )
{
TextView* pView = mpViews->GetObject( --nView );
if ( pView != GetActiveView() )
{
-// BOOL bInvers = pView->maSelection.GetEnd() < pView->maSelection.GetStart();
+// sal_Bool bInvers = pView->maSelection.GetEnd() < pView->maSelection.GetStart();
// TextPaM& rMin = !bInvers ? pView->maSelection.GetStart(): pView->maSelection.GetEnd();
// TextPaM& rMax = bInvers ? pView->maSelection.GetStart() : pView->maSelection.GetEnd();
//
@@ -2933,16 +2933,16 @@ void TextEngine::ImpParagraphInserted( ULONG nPara )
Broadcast( TextHint( TEXT_HINT_PARAINSERTED, nPara ) );
}
-void TextEngine::ImpParagraphRemoved( ULONG nPara )
+void TextEngine::ImpParagraphRemoved( sal_uLong nPara )
{
if ( mpViews->Count() > 1 )
{
- for ( USHORT nView = mpViews->Count(); nView; )
+ for ( sal_uInt16 nView = mpViews->Count(); nView; )
{
TextView* pView = mpViews->GetObject( --nView );
if ( pView != GetActiveView() )
{
- ULONG nParas = mpDoc->GetNodes().Count();
+ sal_uLong nParas = mpDoc->GetNodes().Count();
for ( int n = 0; n <= 1; n++ )
{
TextPaM& rPaM = n ? pView->GetSelection().GetStart(): pView->GetSelection().GetEnd();
@@ -2961,16 +2961,16 @@ void TextEngine::ImpParagraphRemoved( ULONG nPara )
Broadcast( TextHint( TEXT_HINT_PARAREMOVED, nPara ) );
}
-void TextEngine::ImpCharsRemoved( ULONG nPara, USHORT nPos, USHORT nChars )
+void TextEngine::ImpCharsRemoved( sal_uLong nPara, sal_uInt16 nPos, sal_uInt16 nChars )
{
if ( mpViews->Count() > 1 )
{
- for ( USHORT nView = mpViews->Count(); nView; )
+ for ( sal_uInt16 nView = mpViews->Count(); nView; )
{
TextView* pView = mpViews->GetObject( --nView );
if ( pView != GetActiveView() )
{
- USHORT nEnd = nPos+nChars;
+ sal_uInt16 nEnd = nPos+nChars;
for ( int n = 0; n <= 1; n++ )
{
TextPaM& rPaM = n ? pView->GetSelection().GetStart(): pView->GetSelection().GetEnd();
@@ -2988,11 +2988,11 @@ void TextEngine::ImpCharsRemoved( ULONG nPara, USHORT nPos, USHORT nChars )
Broadcast( TextHint( TEXT_HINT_PARACONTENTCHANGED, nPara ) );
}
-void TextEngine::ImpCharsInserted( ULONG nPara, USHORT nPos, USHORT nChars )
+void TextEngine::ImpCharsInserted( sal_uLong nPara, sal_uInt16 nPos, sal_uInt16 nChars )
{
if ( mpViews->Count() > 1 )
{
- for ( USHORT nView = mpViews->Count(); nView; )
+ for ( sal_uInt16 nView = mpViews->Count(); nView; )
{
TextView* pView = mpViews->GetObject( --nView );
if ( pView != GetActiveView() )
@@ -3012,7 +3012,7 @@ void TextEngine::ImpCharsInserted( ULONG nPara, USHORT nPos, USHORT nChars )
Broadcast( TextHint( TEXT_HINT_PARACONTENTCHANGED, nPara ) );
}
-void TextEngine::ImpFormattingParagraph( ULONG nPara )
+void TextEngine::ImpFormattingParagraph( sal_uLong nPara )
{
Broadcast( TextHint( TEXT_HINT_FORMATPARA, nPara ) );
}
@@ -3032,12 +3032,12 @@ void TextEngine::Draw( OutputDevice* pDev, const Point& rPos )
ImpPaint( pDev, rPos, NULL );
}
-void TextEngine::SetLeftMargin( USHORT n )
+void TextEngine::SetLeftMargin( sal_uInt16 n )
{
mpDoc->SetLeftMargin( n );
}
-USHORT TextEngine::GetLeftMargin() const
+sal_uInt16 TextEngine::GetLeftMargin() const
{
return mpDoc->GetLeftMargin();
}
@@ -3074,7 +3074,7 @@ LocaleDataWrapper* TextEngine::ImpGetLocaleDataWrapper()
return mpLocaleDataWrapper;
}
-void TextEngine::SetRightToLeft( BOOL bR2L )
+void TextEngine::SetRightToLeft( sal_Bool bR2L )
{
if ( mbRightToLeft != bR2L )
{
@@ -3085,7 +3085,7 @@ void TextEngine::SetRightToLeft( BOOL bR2L )
}
}
-void TextEngine::ImpInitWritingDirections( ULONG nPara )
+void TextEngine::ImpInitWritingDirections( sal_uLong nPara )
{
TEParaPortion* pParaPortion = mpTEParaPortions->GetObject( nPara );
TEWritingDirectionInfos& rInfos = pParaPortion->GetWritingDirectionInfos();
@@ -3112,10 +3112,10 @@ void TextEngine::ImpInitWritingDirections( ULONG nPara )
int32_t nEnd;
UBiDiLevel nCurrDir;
- for ( USHORT nIdx = 0; nIdx < nCount; ++nIdx )
+ for ( sal_uInt16 nIdx = 0; nIdx < nCount; ++nIdx )
{
ubidi_getLogicalRun( pBidi, nStart, &nEnd, &nCurrDir );
- rInfos.Insert( TEWritingDirectionInfo( nCurrDir, (USHORT)nStart, (USHORT)nEnd ), rInfos.Count() );
+ rInfos.Insert( TEWritingDirectionInfo( nCurrDir, (sal_uInt16)nStart, (sal_uInt16)nEnd ), rInfos.Count() );
nStart = nEnd;
}
@@ -3124,13 +3124,13 @@ void TextEngine::ImpInitWritingDirections( ULONG nPara )
// No infos mean no CTL and default dir is L2R...
if ( !rInfos.Count() )
- rInfos.Insert( TEWritingDirectionInfo( 0, 0, (USHORT)pParaPortion->GetNode()->GetText().Len() ), rInfos.Count() );
+ rInfos.Insert( TEWritingDirectionInfo( 0, 0, (sal_uInt16)pParaPortion->GetNode()->GetText().Len() ), rInfos.Count() );
}
-BYTE TextEngine::ImpGetRightToLeft( ULONG nPara, USHORT nPos, USHORT* pStart, USHORT* pEnd )
+sal_uInt8 TextEngine::ImpGetRightToLeft( sal_uLong nPara, sal_uInt16 nPos, sal_uInt16* pStart, sal_uInt16* pEnd )
{
- BYTE nRightToLeft = 0;
+ sal_uInt8 nRightToLeft = 0;
TextNode* pNode = mpDoc->GetNodes().GetObject( nPara );
if ( pNode && pNode->GetText().Len() )
@@ -3140,7 +3140,7 @@ BYTE TextEngine::ImpGetRightToLeft( ULONG nPara, USHORT nPos, USHORT* pStart, US
ImpInitWritingDirections( nPara );
TEWritingDirectionInfos& rDirInfos = pParaPortion->GetWritingDirectionInfos();
- for ( USHORT n = 0; n < rDirInfos.Count(); n++ )
+ for ( sal_uInt16 n = 0; n < rDirInfos.Count(); n++ )
{
if ( ( rDirInfos[n].nStartPos <= nPos ) && ( rDirInfos[n].nEndPos >= nPos ) )
{
@@ -3156,13 +3156,13 @@ BYTE TextEngine::ImpGetRightToLeft( ULONG nPara, USHORT nPos, USHORT* pStart, US
return nRightToLeft;
}
-long TextEngine::ImpGetPortionXOffset( ULONG nPara, TextLine* pLine, USHORT nTextPortion )
+long TextEngine::ImpGetPortionXOffset( sal_uLong nPara, TextLine* pLine, sal_uInt16 nTextPortion )
{
long nX = pLine->GetStartX();
TEParaPortion* pParaPortion = mpTEParaPortions->GetObject( nPara );
- for ( USHORT i = pLine->GetStartPortion(); i < nTextPortion; i++ )
+ for ( sal_uInt16 i = pLine->GetStartPortion(); i < nTextPortion; i++ )
{
TETextPortion* pPortion = pParaPortion->GetTextPortions().GetObject( i );
nX += pPortion->GetWidth();
@@ -3236,9 +3236,9 @@ long TextEngine::ImpGetPortionXOffset( ULONG nPara, TextLine* pLine, USHORT nTex
return nX;
}
-void TextEngine::ImpInitLayoutMode( OutputDevice* pOutDev, BOOL bDrawingR2LPortion )
+void TextEngine::ImpInitLayoutMode( OutputDevice* pOutDev, sal_Bool bDrawingR2LPortion )
{
- ULONG nLayoutMode = pOutDev->GetLayoutMode();
+ sal_uLong nLayoutMode = pOutDev->GetLayoutMode();
nLayoutMode &= ~(TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_COMPLEX_DISABLED | TEXT_LAYOUT_BIDI_STRONG );
if ( bDrawingR2LPortion )
@@ -3260,12 +3260,12 @@ TxtAlign TextEngine::ImpGetAlign() const
return eAlign;
}
-long TextEngine::ImpGetOutputOffset( ULONG nPara, TextLine* pLine, USHORT nIndex, USHORT nIndex2 )
+long TextEngine::ImpGetOutputOffset( sal_uLong nPara, TextLine* pLine, sal_uInt16 nIndex, sal_uInt16 nIndex2 )
{
TEParaPortion* pPortion = mpTEParaPortions->GetObject( nPara );
- USHORT nPortionStart;
- USHORT nPortion = pPortion->GetTextPortions().FindPortion( nIndex, nPortionStart, TRUE );
+ sal_uInt16 nPortionStart;
+ sal_uInt16 nPortion = pPortion->GetTextPortions().FindPortion( nIndex, nPortionStart, sal_True );
TETextPortion* pTextPortion = pPortion->GetTextPortions().GetObject( nPortion );
@@ -3286,7 +3286,7 @@ long TextEngine::ImpGetOutputOffset( ULONG nPara, TextLine* pLine, USHORT nIndex
nX = ImpGetXPos( nPara, pLine, nIndex, nIndex == nPortionStart );
if ( nIndex2 != nIndex )
{
- long nX2 = ImpGetXPos( nPara, pLine, nIndex2, FALSE );
+ long nX2 = ImpGetXPos( nPara, pLine, nIndex2, sal_False );
if ( ( !IsRightToLeft() && ( nX2 < nX ) ) ||
( IsRightToLeft() && ( nX2 > nX ) ) )
{
diff --git a/svtools/source/edit/textund2.hxx b/svtools/source/edit/textund2.hxx
index 18cf9331328e..ba559c3dc98c 100644
--- a/svtools/source/edit/textund2.hxx
+++ b/svtools/source/edit/textund2.hxx
@@ -33,13 +33,13 @@
class TextUndoDelPara : public TextUndo
{
private:
- BOOL mbDelObject;
- ULONG mnPara;
+ sal_Bool mbDelObject;
+ sal_uLong mnPara;
TextNode* mpNode; // Zeigt auf das gueltige, nicht zerstoerte Objekt!
public:
TYPEINFO();
- TextUndoDelPara( TextEngine* pTextEngine, TextNode* pNode, ULONG nPara );
+ TextUndoDelPara( TextEngine* pTextEngine, TextNode* pNode, sal_uLong nPara );
~TextUndoDelPara();
virtual void Undo();
@@ -50,12 +50,12 @@ public:
class TextUndoConnectParas : public TextUndo
{
private:
- ULONG mnPara;
- USHORT mnSepPos;
+ sal_uLong mnPara;
+ sal_uInt16 mnSepPos;
public:
TYPEINFO();
- TextUndoConnectParas( TextEngine* pTextEngine, ULONG nPara, USHORT nSepPos );
+ TextUndoConnectParas( TextEngine* pTextEngine, sal_uLong nPara, sal_uInt16 nSepPos );
~TextUndoConnectParas();
virtual void Undo();
@@ -66,12 +66,12 @@ public:
class TextUndoSplitPara : public TextUndo
{
private:
- ULONG mnPara;
- USHORT mnSepPos;
+ sal_uLong mnPara;
+ sal_uInt16 mnSepPos;
public:
TYPEINFO();
- TextUndoSplitPara( TextEngine* pTextEngine, ULONG nPara, USHORT nSepPos );
+ TextUndoSplitPara( TextEngine* pTextEngine, sal_uLong nPara, sal_uInt16 nSepPos );
~TextUndoSplitPara();
virtual void Undo();
@@ -95,7 +95,7 @@ public:
virtual void Undo();
virtual void Redo();
- virtual BOOL Merge( SfxUndoAction *pNextAction );
+ virtual sal_Bool Merge( SfxUndoAction *pNextAction );
};
@@ -123,9 +123,9 @@ private:
TextSelection maSelection;
// SfxItemSet aNewAttribs;
// TextInfoArray aPrevAttribs;
-// BYTE nSpecial;
-// BOOL bSetIsRemove;
-// USHORT nRemoveWhich;
+// sal_uInt8 nSpecial;
+// sal_Bool bSetIsRemove;
+// sal_uInt16 nRemoveWhich;
//
// void ImpSetSelection( TextView* pView );
@@ -137,9 +137,9 @@ public:
// TextInfoArray& GetTextInfos() { return aPrevAttribs; }
// SfxItemSet& GetNewAttribs() { return aNewAttribs; }
-// void SetSpecial( BYTE n ) { nSpecial = n; }
-// void SetRemoveAttribs( BOOL b ) { bSetIsRemove = b; }
-// void SetRemoveWhich( USHORT n ) { nRemoveWhich = n; }
+// void SetSpecial( sal_uInt8 n ) { nSpecial = n; }
+// void SetRemoveAttribs( sal_Bool b ) { bSetIsRemove = b; }
+// void SetRemoveWhich( sal_uInt16 n ) { nRemoveWhich = n; }
virtual void Undo();
virtual void Redo();
diff --git a/svtools/source/edit/textundo.cxx b/svtools/source/edit/textundo.cxx
index 4c243de16c31..742c3ed4c707 100644
--- a/svtools/source/edit/textundo.cxx
+++ b/svtools/source/edit/textundo.cxx
@@ -54,33 +54,33 @@ TextUndoManager::~TextUndoManager()
{
}
-BOOL __EXPORT TextUndoManager::Undo( USHORT nCount )
+sal_Bool __EXPORT TextUndoManager::Undo()
{
if ( GetUndoActionCount() == 0 )
- return FALSE;
+ return sal_False;
UndoRedoStart();
- mpTextEngine->SetIsInUndo( TRUE );
- BOOL bDone = SfxUndoManager::Undo( nCount );
- mpTextEngine->SetIsInUndo( FALSE );
+ mpTextEngine->SetIsInUndo( sal_True );
+ sal_Bool bDone = SfxUndoManager::Undo();
+ mpTextEngine->SetIsInUndo( sal_False );
UndoRedoEnd();
return bDone;
}
-BOOL __EXPORT TextUndoManager::Redo( USHORT nCount )
+sal_Bool __EXPORT TextUndoManager::Redo()
{
if ( GetRedoActionCount() == 0 )
- return FALSE;
+ return sal_False;
UndoRedoStart();
- mpTextEngine->SetIsInUndo( TRUE );
- BOOL bDone = SfxUndoManager::Redo( nCount );
- mpTextEngine->SetIsInUndo( FALSE );
+ mpTextEngine->SetIsInUndo( sal_True );
+ sal_Bool bDone = SfxUndoManager::Redo();
+ mpTextEngine->SetIsInUndo( sal_False );
UndoRedoEnd();
@@ -110,9 +110,8 @@ void TextUndoManager::UndoRedoEnd()
}
-TextUndo::TextUndo( USHORT nI, TextEngine* p )
+TextUndo::TextUndo( TextEngine* p )
{
- mnId = nI;
mpTextEngine = p;
}
@@ -120,12 +119,6 @@ TextUndo::~TextUndo()
{
}
-USHORT __EXPORT TextUndo::GetId() const
-{
- //nId sollte mal entfallen => GetId ueberall ueberladen...
- return mnId;
-}
-
XubString __EXPORT TextUndo::GetComment() const
{
// return mpTextEngine->GetUndoComment( this );
@@ -139,12 +132,12 @@ void TextUndo::SetSelection( const TextSelection& rSel )
}
-TextUndoDelPara::TextUndoDelPara( TextEngine* pTextEngine, TextNode* pNode, ULONG nPara )
- : TextUndo( TEXTUNDO_DELCONTENT, pTextEngine )
+TextUndoDelPara::TextUndoDelPara( TextEngine* pTextEngine, TextNode* pNode, sal_uLong nPara )
+ : TextUndo( pTextEngine )
{
mpNode = pNode;
mnPara = nPara;
- mbDelObject = TRUE;
+ mbDelObject = sal_True;
}
TextUndoDelPara::~TextUndoDelPara()
@@ -156,7 +149,7 @@ TextUndoDelPara::~TextUndoDelPara()
void __EXPORT TextUndoDelPara::Undo()
{
GetTextEngine()->InsertContent( mpNode, mnPara );
- mbDelObject = FALSE; // gehoert wieder der Engine
+ mbDelObject = sal_False; // gehoert wieder der Engine
if ( GetView() )
{
@@ -178,10 +171,10 @@ void __EXPORT TextUndoDelPara::Redo()
GetDoc()->GetNodes().Remove( mnPara );
GetTextEngine()->ImpParagraphRemoved( mnPara );
- mbDelObject = TRUE; // gehoert wieder dem Undo
+ mbDelObject = sal_True; // gehoert wieder dem Undo
- ULONG nParas = GetDoc()->GetNodes().Count();
- ULONG n = mnPara < nParas ? mnPara : (nParas-1);
+ sal_uLong nParas = GetDoc()->GetNodes().Count();
+ sal_uLong n = mnPara < nParas ? mnPara : (nParas-1);
TextNode* pN = GetDoc()->GetNodes().GetObject( n );
TextPaM aPaM( n, pN->GetText().Len() );
SetSelection( aPaM );
@@ -190,8 +183,8 @@ void __EXPORT TextUndoDelPara::Redo()
// -----------------------------------------------------------------------
// TextUndoConnectParas
// ------------------------------------------------------------------------
-TextUndoConnectParas::TextUndoConnectParas( TextEngine* pTextEngine, ULONG nPara, USHORT nPos )
- : TextUndo( TEXTUNDO_CONNECTPARAS, pTextEngine )
+TextUndoConnectParas::TextUndoConnectParas( TextEngine* pTextEngine, sal_uLong nPara, sal_uInt16 nPos )
+ : TextUndo( pTextEngine )
{
mnPara = nPara;
mnSepPos = nPos;
@@ -214,8 +207,8 @@ void __EXPORT TextUndoConnectParas::Redo()
}
-TextUndoSplitPara::TextUndoSplitPara( TextEngine* pTextEngine, ULONG nPara, USHORT nPos )
- : TextUndo( TEXTUNDO_SPLITPARA, pTextEngine )
+TextUndoSplitPara::TextUndoSplitPara( TextEngine* pTextEngine, sal_uLong nPara, sal_uInt16 nPos )
+ : TextUndo( pTextEngine )
{
mnPara = nPara;
mnSepPos = nPos;
@@ -239,7 +232,7 @@ void __EXPORT TextUndoSplitPara::Redo()
TextUndoInsertChars::TextUndoInsertChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const XubString& rStr )
- : TextUndo( TEXTUNDO_INSERTCHARS, pTextEngine ),
+ : TextUndo( pTextEngine ),
maTextPaM( rTextPaM ), maText( rStr )
{
}
@@ -261,27 +254,27 @@ void __EXPORT TextUndoInsertChars::Redo()
SetSelection( TextSelection( aSel.GetStart(), aNewPaM ) );
}
-BOOL __EXPORT TextUndoInsertChars::Merge( SfxUndoAction* pNextAction )
+sal_Bool __EXPORT TextUndoInsertChars::Merge( SfxUndoAction* pNextAction )
{
if ( !pNextAction->ISA( TextUndoInsertChars ) )
- return FALSE;
+ return sal_False;
TextUndoInsertChars* pNext = (TextUndoInsertChars*)pNextAction;
if ( maTextPaM.GetPara() != pNext->maTextPaM.GetPara() )
- return FALSE;
+ return sal_False;
if ( ( maTextPaM.GetIndex() + maText.Len() ) == pNext->maTextPaM.GetIndex() )
{
maText += pNext->maText;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
TextUndoRemoveChars::TextUndoRemoveChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const XubString& rStr )
- : TextUndo( TEXTUNDO_REMOVECHARS, pTextEngine ),
+ : TextUndo( pTextEngine ),
maTextPaM( rTextPaM ), maText( rStr )
{
}
@@ -304,11 +297,11 @@ void __EXPORT TextUndoRemoveChars::Redo()
TextUndoSetAttribs::TextUndoSetAttribs( TextEngine* pTextEngine, const TextSelection& rSel )
- : TextUndo( TEXTUNDO_ATTRIBS, pTextEngine ), maSelection( rSel )
+ : TextUndo( pTextEngine ), maSelection( rSel )
{
maSelection.Justify();
// aNewAttribs.Set( rNewItems );
-// mbSetIsRemove = FALSE;
+// mbSetIsRemove = sal_False;
// mnRemoveWhich = 0;
// mnSpecial = 0;
}
@@ -320,12 +313,12 @@ TextUndoSetAttribs::~TextUndoSetAttribs()
void __EXPORT TextUndoSetAttribs::Undo()
{
- for ( ULONG nPara = maSelection.GetStart().GetPara(); nPara <= maSelection.GetEnd().GetPara(); nPara++ )
+ for ( sal_uLong nPara = maSelection.GetStart().GetPara(); nPara <= maSelection.GetEnd().GetPara(); nPara++ )
{
-// ContentAttribsInfo* pInf = aPrevAttribs[ (USHORT)(nPara-aESel.nStartPara) ];
+// ContentAttribsInfo* pInf = aPrevAttribs[ (sal_uInt16)(nPara-aESel.nStartPara) ];
// GetTextEngine()->RemoveCharAttribs( nPara );
// TextNode* pNode = GetTextEngine()->GetTextDoc().GetObject( nPara );
-// for ( USHORT nAttr = 0; nAttr < pInf->GetPrevCharAttribs().Count(); nAttr++ )
+// for ( sal_uInt16 nAttr = 0; nAttr < pInf->GetPrevCharAttribs().Count(); nAttr++ )
// {
// GetTextEngine()->GetTextDoc().InsertAttrib( pNode, pX->GetStart(), pX->GetEnd(), *pX->GetItem() );
// }
diff --git a/svtools/source/edit/textundo.hxx b/svtools/source/edit/textundo.hxx
index cc26c0b51ef6..357331057aeb 100644
--- a/svtools/source/edit/textundo.hxx
+++ b/svtools/source/edit/textundo.hxx
@@ -47,16 +47,15 @@ public:
~TextUndoManager();
using SfxUndoManager::Undo;
- virtual BOOL Undo( USHORT nCount=1 );
+ virtual sal_Bool Undo();
using SfxUndoManager::Redo;
- virtual BOOL Redo( USHORT nCount=1 );
+ virtual sal_Bool Redo();
};
class TextUndo : public SfxUndoAction
{
private:
- USHORT mnId;
TextEngine* mpTextEngine;
protected:
@@ -69,7 +68,7 @@ protected:
public:
TYPEINFO();
- TextUndo( USHORT nId, TextEngine* pTextEngine );
+ TextUndo( TextEngine* pTextEngine );
virtual ~TextUndo();
TextEngine* GetTextEngine() const { return mpTextEngine; }
@@ -78,7 +77,6 @@ public:
virtual void Redo() = 0;
virtual XubString GetComment() const;
- virtual USHORT GetId() const;
};
#endif // _TEXTUNDO_HXX
diff --git a/svtools/source/edit/textview.cxx b/svtools/source/edit/textview.cxx
index 48cd23bdcc6f..0b4fb6ee2ca5 100644
--- a/svtools/source/edit/textview.cxx
+++ b/svtools/source/edit/textview.cxx
@@ -124,7 +124,7 @@ uno::Any TETextDataObject::getTransferData( const datatransfer::DataFlavor& rFla
{
uno::Any aAny;
- ULONG nT = SotExchange::GetFormat( rFlavor );
+ sal_uLong nT = SotExchange::GetFormat( rFlavor );
if ( nT == SOT_FORMAT_STRING )
{
aAny <<= (::rtl::OUString)GetText();
@@ -132,7 +132,7 @@ uno::Any TETextDataObject::getTransferData( const datatransfer::DataFlavor& rFla
else if ( nT == SOT_FORMATSTR_ID_HTML )
{
GetHTMLStream().Seek( STREAM_SEEK_TO_END );
- ULONG nLen = GetHTMLStream().Tell();
+ sal_uLong nLen = GetHTMLStream().Tell();
GetHTMLStream().Seek(0);
uno::Sequence< sal_Int8 > aSeq( nLen );
@@ -149,7 +149,7 @@ uno::Any TETextDataObject::getTransferData( const datatransfer::DataFlavor& rFla
uno::Sequence< datatransfer::DataFlavor > TETextDataObject::getTransferDataFlavors( ) throw(uno::RuntimeException)
{
GetHTMLStream().Seek( STREAM_SEEK_TO_END );
- BOOL bHTML = GetHTMLStream().Tell() > 0;
+ sal_Bool bHTML = GetHTMLStream().Tell() > 0;
uno::Sequence< datatransfer::DataFlavor > aDataFlavors( bHTML ? 2 : 1 );
SotExchange::GetFormatDataFlavor( SOT_FORMAT_STRING, aDataFlavors.getArray()[0] );
if ( bHTML )
@@ -159,7 +159,7 @@ uno::Sequence< datatransfer::DataFlavor > TETextDataObject::getTransferDataFlavo
sal_Bool TETextDataObject::isDataFlavorSupported( const datatransfer::DataFlavor& rFlavor ) throw(uno::RuntimeException)
{
- ULONG nT = SotExchange::GetFormat( rFlavor );
+ sal_uLong nT = SotExchange::GetFormat( rFlavor );
return ( nT == SOT_FORMAT_STRING );
}
@@ -186,17 +186,17 @@ struct ImpTextView
::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener > mxDnDListener;
- USHORT mnTravelXPos;
-
- BOOL mbAutoScroll : 1;
- BOOL mbInsertMode : 1;
- BOOL mbReadOnly : 1;
- BOOL mbPaintSelection : 1;
- BOOL mbAutoIndent : 1;
- BOOL mbHighlightSelection : 1;
- BOOL mbCursorEnabled : 1;
- BOOL mbClickedInSelection : 1;
- BOOL mbSupportProtectAttribute : 1;
+ sal_uInt16 mnTravelXPos;
+
+ sal_Bool mbAutoScroll : 1;
+ sal_Bool mbInsertMode : 1;
+ sal_Bool mbReadOnly : 1;
+ sal_Bool mbPaintSelection : 1;
+ sal_Bool mbAutoIndent : 1;
+ sal_Bool mbHighlightSelection : 1;
+ sal_Bool mbCursorEnabled : 1;
+ sal_Bool mbClickedInSelection : 1;
+ sal_Bool mbSupportProtectAttribute : 1;
bool mbCursorAtEndOfLine;
};
@@ -206,30 +206,30 @@ struct ImpTextView
TextView::TextView( TextEngine* pEng, Window* pWindow ) :
mpImpl(new ImpTextView)
{
- pWindow->EnableRTL( FALSE );
+ pWindow->EnableRTL( sal_False );
mpImpl->mpWindow = pWindow;
mpImpl->mpTextEngine = pEng;
mpImpl->mpVirtDev = NULL;
- mpImpl->mbPaintSelection = TRUE;
- mpImpl->mbAutoScroll = TRUE;
- mpImpl->mbInsertMode = TRUE;
- mpImpl->mbReadOnly = FALSE;
- mpImpl->mbHighlightSelection = FALSE;
- mpImpl->mbAutoIndent = FALSE;
- mpImpl->mbCursorEnabled = TRUE;
- mpImpl->mbClickedInSelection = FALSE;
- mpImpl->mbSupportProtectAttribute = FALSE;
+ mpImpl->mbPaintSelection = sal_True;
+ mpImpl->mbAutoScroll = sal_True;
+ mpImpl->mbInsertMode = sal_True;
+ mpImpl->mbReadOnly = sal_False;
+ mpImpl->mbHighlightSelection = sal_False;
+ mpImpl->mbAutoIndent = sal_False;
+ mpImpl->mbCursorEnabled = sal_True;
+ mpImpl->mbClickedInSelection = sal_False;
+ mpImpl->mbSupportProtectAttribute = sal_False;
mpImpl->mbCursorAtEndOfLine = false;
-// mbInSelection = FALSE;
+// mbInSelection = sal_False;
mpImpl->mnTravelXPos = TRAVEL_X_DONTKNOW;
mpImpl->mpSelFuncSet = new TextSelFunctionSet( this );
mpImpl->mpSelEngine = new SelectionEngine( mpImpl->mpWindow, mpImpl->mpSelFuncSet );
mpImpl->mpSelEngine->SetSelectionMode( RANGE_SELECTION );
- mpImpl->mpSelEngine->EnableDrag( TRUE );
+ mpImpl->mpSelEngine->EnableDrag( sal_True );
mpImpl->mpCursor = new Cursor;
mpImpl->mpCursor->Show();
@@ -237,7 +237,7 @@ TextView::TextView( TextEngine* pEng, Window* pWindow ) :
pWindow->SetInputContext( InputContext( pEng->GetFont(), INPUTCONTEXT_TEXT|INPUTCONTEXT_EXTTEXTINPUT ) );
if ( pWindow->GetSettings().GetStyleSettings().GetSelectionOptions() & SELECTION_OPTION_INVERT )
- mpImpl->mbHighlightSelection = TRUE;
+ mpImpl->mbHighlightSelection = sal_True;
pWindow->SetLineColor();
@@ -275,7 +275,7 @@ void TextView::Invalidate()
mpImpl->mpWindow->Invalidate();
}
-void TextView::SetSelection( const TextSelection& rTextSel, BOOL bGotoCursor )
+void TextView::SetSelection( const TextSelection& rTextSel, sal_Bool bGotoCursor )
{
// Falls jemand gerade ein leeres Attribut hinterlassen hat,
// und dann der Outliner die Selektion manipulitert:
@@ -311,9 +311,9 @@ void TextView::DeleteSelected()
{
// HideSelection();
- mpImpl->mpTextEngine->UndoActionStart( TEXTUNDO_DELETE );
+ mpImpl->mpTextEngine->UndoActionStart();
TextPaM aPaM = mpImpl->mpTextEngine->ImpDeleteText( mpImpl->maSelection );
- mpImpl->mpTextEngine->UndoActionEnd( TEXTUNDO_DELETE );
+ mpImpl->mpTextEngine->UndoActionEnd();
ImpSetSelection( aPaM );
mpImpl->mpTextEngine->FormatAndUpdate( this );
@@ -345,10 +345,10 @@ void TextView::ImpPaint( OutputDevice* pOut, const Point& rStartPos, Rectangle c
void TextView::Paint( const Rectangle& rRect )
{
- ImpPaint( rRect, FALSE );
+ ImpPaint( rRect, sal_False );
}
-void TextView::ImpPaint( const Rectangle& rRect, BOOL bUseVirtDev )
+void TextView::ImpPaint( const Rectangle& rRect, sal_Bool bUseVirtDev )
{
if ( !mpImpl->mpTextEngine->GetUpdateMode() || mpImpl->mpTextEngine->IsInUndo() )
return;
@@ -367,7 +367,7 @@ void TextView::ImpPaint( const Rectangle& rRect, BOOL bUseVirtDev )
if ( pVDev->GetBackground().GetColor() != rBackgroundColor )
pVDev->SetBackground( rBackgroundColor );
- BOOL bVDevValid = TRUE;
+ sal_Bool bVDevValid = sal_True;
Size aOutSz( pVDev->GetOutputSizePixel() );
if ( ( aOutSz.Width() < rRect.GetWidth() ) ||
( aOutSz.Height() < rRect.GetHeight() ) )
@@ -390,7 +390,7 @@ void TextView::ImpPaint( const Rectangle& rRect, BOOL bUseVirtDev )
}
if ( !bVDevValid )
{
- ImpPaint( rRect, FALSE /* ohne VDev */ );
+ ImpPaint( rRect, sal_False /* ohne VDev */ );
return;
}
@@ -428,27 +428,27 @@ void TextView::ImpHighlight( const TextSelection& rSel )
Rectangle aVisArea( mpImpl->maStartDocPos, mpImpl->mpWindow->GetOutputSizePixel() );
long nY = 0;
- ULONG nStartPara = aSel.GetStart().GetPara();
- ULONG nEndPara = aSel.GetEnd().GetPara();
- for ( ULONG nPara = 0; nPara <= nEndPara; nPara++ )
+ sal_uLong nStartPara = aSel.GetStart().GetPara();
+ sal_uLong nEndPara = aSel.GetEnd().GetPara();
+ for ( sal_uLong nPara = 0; nPara <= nEndPara; nPara++ )
{
long nParaHeight = (long)mpImpl->mpTextEngine->CalcParaHeight( nPara );
if ( ( nPara >= nStartPara ) && ( ( nY + nParaHeight ) > aVisArea.Top() ) )
{
TEParaPortion* pTEParaPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( nPara );
- USHORT nStartLine = 0;
- USHORT nEndLine = pTEParaPortion->GetLines().Count() -1;
+ sal_uInt16 nStartLine = 0;
+ sal_uInt16 nEndLine = pTEParaPortion->GetLines().Count() -1;
if ( nPara == nStartPara )
- nStartLine = pTEParaPortion->GetLineNumber( aSel.GetStart().GetIndex(), FALSE );
+ nStartLine = pTEParaPortion->GetLineNumber( aSel.GetStart().GetIndex(), sal_False );
if ( nPara == nEndPara )
- nEndLine = pTEParaPortion->GetLineNumber( aSel.GetEnd().GetIndex(), TRUE );
+ nEndLine = pTEParaPortion->GetLineNumber( aSel.GetEnd().GetIndex(), sal_True );
// ueber die Zeilen iterieren....
- for ( USHORT nLine = nStartLine; nLine <= nEndLine; nLine++ )
+ for ( sal_uInt16 nLine = nStartLine; nLine <= nEndLine; nLine++ )
{
TextLine* pLine = pTEParaPortion->GetLines().GetObject( nLine );
- USHORT nStartIndex = pLine->GetStart();
- USHORT nEndIndex = pLine->GetEnd();
+ sal_uInt16 nStartIndex = pLine->GetStart();
+ sal_uInt16 nEndIndex = pLine->GetEnd();
if ( ( nPara == nStartPara ) && ( nLine == nStartLine ) )
nStartIndex = aSel.GetStart().GetIndex();
if ( ( nPara == nEndPara ) && ( nLine == nEndLine ) )
@@ -458,12 +458,12 @@ void TextView::ImpHighlight( const TextSelection& rSel )
if ( nEndIndex < nStartIndex )
nEndIndex = nStartIndex;
- Rectangle aTmpRec( mpImpl->mpTextEngine->GetEditCursor( TextPaM( nPara, nStartIndex ), FALSE ) );
+ Rectangle aTmpRec( mpImpl->mpTextEngine->GetEditCursor( TextPaM( nPara, nStartIndex ), sal_False ) );
aTmpRec.Top() += nY;
aTmpRec.Bottom() += nY;
Point aTopLeft( aTmpRec.TopLeft() );
- aTmpRec = mpImpl->mpTextEngine->GetEditCursor( TextPaM( nPara, nEndIndex ), TRUE );
+ aTmpRec = mpImpl->mpTextEngine->GetEditCursor( TextPaM( nPara, nEndIndex ), sal_True );
aTmpRec.Top() += nY;
aTmpRec.Bottom() += nY;
Point aBottomRight( aTmpRec.BottomRight() );
@@ -499,20 +499,20 @@ void TextView::ImpSetSelection( const TextSelection& rSelection )
void TextView::ShowSelection()
{
- ImpShowHideSelection( TRUE );
+ ImpShowHideSelection( sal_True );
}
void TextView::HideSelection()
{
- ImpShowHideSelection( FALSE );
+ ImpShowHideSelection( sal_False );
}
void TextView::ShowSelection( const TextSelection& rRange )
{
- ImpShowHideSelection( TRUE, &rRange );
+ ImpShowHideSelection( sal_True, &rRange );
}
-void TextView::ImpShowHideSelection( BOOL bShow, const TextSelection* pRange )
+void TextView::ImpShowHideSelection( sal_Bool bShow, const TextSelection* pRange )
{
const TextSelection* pRangeOrSelection = pRange ? pRange : &mpImpl->maSelection;
@@ -532,7 +532,7 @@ void TextView::ImpShowHideSelection( BOOL bShow, const TextSelection* pRange )
Point aStartPos( ImpGetOutputStartPos( mpImpl->maStartDocPos ) );
TextSelection aRange( *pRangeOrSelection );
aRange.Justify();
- BOOL bVisCursor = mpImpl->mpCursor->IsVisible();
+ sal_Bool bVisCursor = mpImpl->mpCursor->IsVisible();
mpImpl->mpCursor->Hide();
ImpPaint( mpImpl->mpWindow, aStartPos, &aOutArea, &aRange, bShow ? &mpImpl->maSelection : NULL );
if ( bVisCursor )
@@ -558,24 +558,24 @@ void TextView::EraseVirtualDevice()
mpImpl->mpVirtDev = 0;
}
-BOOL TextView::KeyInput( const KeyEvent& rKeyEvent )
+sal_Bool TextView::KeyInput( const KeyEvent& rKeyEvent )
{
- BOOL bDone = TRUE;
- BOOL bModified = FALSE;
- BOOL bMoved = FALSE;
- BOOL bEndKey = FALSE; // spezielle CursorPosition
- BOOL bAllowIdle = TRUE;
+ sal_Bool bDone = sal_True;
+ sal_Bool bModified = sal_False;
+ sal_Bool bMoved = sal_False;
+ sal_Bool bEndKey = sal_False; // spezielle CursorPosition
+ sal_Bool bAllowIdle = sal_True;
// Um zu pruefen ob durch irgendeine Aktion mModified, das lokale
// bModified wird z.B. bei Cut/Paste nicht gesetzt, weil dort an anderen
// Stellen das updaten erfolgt.
- BOOL bWasModified = mpImpl->mpTextEngine->IsModified();
- mpImpl->mpTextEngine->SetModified( FALSE );
+ sal_Bool bWasModified = mpImpl->mpTextEngine->IsModified();
+ mpImpl->mpTextEngine->SetModified( sal_False );
TextSelection aCurSel( mpImpl->maSelection );
TextSelection aOldSel( aCurSel );
- USHORT nCode = rKeyEvent.GetKeyCode().GetCode();
+ sal_uInt16 nCode = rKeyEvent.GetKeyCode().GetCode();
KeyFuncType eFunc = rKeyEvent.GetKeyCode().GetFunction();
if ( eFunc != KEYFUNC_DONTKNOW )
{
@@ -652,12 +652,12 @@ BOOL TextView::KeyInput( const KeyEvent& rKeyEvent )
uno::Reference<datatransfer::clipboard::XClipboard> aSelection(GetWindow()->GetPrimarySelection());
Copy( aSelection );
}
- bMoved = TRUE;
+ bMoved = sal_True;
if ( nCode == KEY_END )
- bEndKey = TRUE;
+ bEndKey = sal_True;
}
else
- bDone = FALSE;
+ bDone = sal_False;
}
break;
case KEY_BACKSPACE:
@@ -669,8 +669,8 @@ BOOL TextView::KeyInput( const KeyEvent& rKeyEvent )
{
if ( !mpImpl->mbReadOnly && !rKeyEvent.GetKeyCode().IsMod2() )
{
- BYTE nDel = ( nCode == KEY_DELETE ) ? DEL_RIGHT : DEL_LEFT;
- BYTE nMode = rKeyEvent.GetKeyCode().IsMod1() ? DELMODE_RESTOFWORD : DELMODE_SIMPLE;
+ sal_uInt8 nDel = ( nCode == KEY_DELETE ) ? DEL_RIGHT : DEL_LEFT;
+ sal_uInt8 nMode = rKeyEvent.GetKeyCode().IsMod1() ? DELMODE_RESTOFWORD : DELMODE_SIMPLE;
if ( ( nMode == DELMODE_RESTOFWORD ) && rKeyEvent.GetKeyCode().IsShift() )
nMode = DELMODE_RESTOFCONTENT;
@@ -695,7 +695,7 @@ BOOL TextView::KeyInput( const KeyEvent& rKeyEvent )
default: break;
}
- mpImpl->mpTextEngine->UndoActionStart( TEXTUNDO_DELETE );
+ mpImpl->mpTextEngine->UndoActionStart();
if(mpImpl->mbSupportProtectAttribute)
{
//expand selection to include all protected content - if there is any
@@ -717,12 +717,12 @@ BOOL TextView::KeyInput( const KeyEvent& rKeyEvent )
}
}
aCurSel = ImpDelete( nDel, nMode );
- mpImpl->mpTextEngine->UndoActionEnd( TEXTUNDO_DELETE );
- bModified = TRUE;
- bAllowIdle = FALSE;
+ mpImpl->mpTextEngine->UndoActionEnd();
+ bModified = sal_True;
+ bAllowIdle = sal_False;
}
else
- bDone = FALSE;
+ bDone = sal_False;
}
break;
case KEY_TAB:
@@ -732,10 +732,10 @@ BOOL TextView::KeyInput( const KeyEvent& rKeyEvent )
ImplCheckTextLen( 'x' ) )
{
aCurSel = mpImpl->mpTextEngine->ImpInsertText( aCurSel, '\t', !IsInsertMode() );
- bModified = TRUE;
+ bModified = sal_True;
}
else
- bDone = FALSE;
+ bDone = sal_False;
}
break;
case KEY_RETURN:
@@ -745,12 +745,12 @@ BOOL TextView::KeyInput( const KeyEvent& rKeyEvent )
if ( !mpImpl->mbReadOnly && !rKeyEvent.GetKeyCode().IsMod1() &&
!rKeyEvent.GetKeyCode().IsMod2() && ImplCheckTextLen( 'x' ) )
{
- mpImpl->mpTextEngine->UndoActionStart( TEXTUNDO_INSERT );
+ mpImpl->mpTextEngine->UndoActionStart();
aCurSel = mpImpl->mpTextEngine->ImpInsertParaBreak( aCurSel );
if ( mpImpl->mbAutoIndent )
{
TextNode* pPrev = mpImpl->mpTextEngine->mpDoc->GetNodes().GetObject( aCurSel.GetEnd().GetPara() - 1 );
- USHORT n = 0;
+ sal_uInt16 n = 0;
while ( ( n < pPrev->GetText().Len() ) && (
( pPrev->GetText().GetChar( n ) == ' ' ) ||
( pPrev->GetText().GetChar( n ) == '\t' ) ) )
@@ -760,11 +760,11 @@ BOOL TextView::KeyInput( const KeyEvent& rKeyEvent )
if ( n )
aCurSel = mpImpl->mpTextEngine->ImpInsertText( aCurSel, pPrev->GetText().Copy( 0, n ) );
}
- mpImpl->mpTextEngine->UndoActionEnd( TEXTUNDO_INSERT );
- bModified = TRUE;
+ mpImpl->mpTextEngine->UndoActionEnd();
+ bModified = sal_True;
}
else
- bDone = FALSE;
+ bDone = sal_False;
}
break;
case KEY_INSERT:
@@ -781,11 +781,11 @@ BOOL TextView::KeyInput( const KeyEvent& rKeyEvent )
if ( !mpImpl->mbReadOnly && ImplCheckTextLen( nCharCode ) ) // sonst trotzdem das Zeichen schlucken...
{
aCurSel = mpImpl->mpTextEngine->ImpInsertText( nCharCode, aCurSel, !IsInsertMode(), sal_True );
- bModified = TRUE;
+ bModified = sal_True;
}
}
else
- bDone = FALSE;
+ bDone = sal_False;
}
}
}
@@ -809,20 +809,20 @@ BOOL TextView::KeyInput( const KeyEvent& rKeyEvent )
else if ( bMoved )
{
// Selection wird jetzt gezielt in ImpMoveCursor gemalt.
- ImpShowCursor( mpImpl->mbAutoScroll, TRUE, bEndKey );
+ ImpShowCursor( mpImpl->mbAutoScroll, sal_True, bEndKey );
}
if ( mpImpl->mpTextEngine->IsModified() )
mpImpl->mpTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
else if ( bWasModified )
- mpImpl->mpTextEngine->SetModified( TRUE );
+ mpImpl->mpTextEngine->SetModified( sal_True );
return bDone;
}
void TextView::MouseButtonUp( const MouseEvent& rMouseEvent )
{
- mpImpl->mbClickedInSelection = FALSE;
+ mpImpl->mbClickedInSelection = sal_False;
mpImpl->mnTravelXPos = TRAVEL_X_DONTKNOW;
mpImpl->mpSelEngine->SelMouseButtonUp( rMouseEvent );
if ( rMouseEvent.IsMiddle() && !IsReadOnly() &&
@@ -876,18 +876,18 @@ void TextView::MouseButtonDown( const MouseEvent& rMouseEvent )
uno::Reference < i18n::XBreakIterator > xBI = mpImpl->mpTextEngine->GetBreakIterator();
i18n::Boundary aBoundary = xBI->getWordBoundary( pNode->GetText(), mpImpl->maSelection.GetEnd().GetIndex(), mpImpl->mpTextEngine->GetLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES, sal_True );
TextSelection aNewSel( mpImpl->maSelection );
- aNewSel.GetStart().GetIndex() = (USHORT)aBoundary.startPos;
- aNewSel.GetEnd().GetIndex() = (USHORT)aBoundary.endPos;
+ aNewSel.GetStart().GetIndex() = (sal_uInt16)aBoundary.startPos;
+ aNewSel.GetEnd().GetIndex() = (sal_uInt16)aBoundary.endPos;
if(mpImpl->mbSupportProtectAttribute)
{
//expand selection to include all protected content - if there is any
const TextCharAttrib* pStartAttr = mpImpl->mpTextEngine->FindCharAttrib(
TextPaM(aNewSel.GetStart().GetPara(),
- (USHORT)aBoundary.startPos),
+ (sal_uInt16)aBoundary.startPos),
TEXTATTR_PROTECTED );
const TextCharAttrib* pEndAttr = mpImpl->mpTextEngine->FindCharAttrib(
TextPaM(aNewSel.GetEnd().GetPara(),
- (USHORT)aBoundary.endPos),
+ (sal_uInt16)aBoundary.endPos),
TEXTATTR_PROTECTED );
if(pStartAttr && pStartAttr->GetStart() < aNewSel.GetStart().GetIndex())
{
@@ -900,7 +900,7 @@ void TextView::MouseButtonDown( const MouseEvent& rMouseEvent )
}
ImpSetSelection( aNewSel );
ShowSelection();
- ShowCursor( TRUE, TRUE );
+ ShowCursor( sal_True, sal_True );
}
}
else if ( rMouseEvent.GetClicks() == 3 )
@@ -914,7 +914,7 @@ void TextView::MouseButtonDown( const MouseEvent& rMouseEvent )
aNewSel.GetEnd().GetIndex() = mpImpl->mpTextEngine->mpDoc->GetNodes().GetObject( mpImpl->maSelection.GetEnd().GetPara() )->GetText().Len();
ImpSetSelection( aNewSel );
ShowSelection();
- ShowCursor( TRUE, TRUE );
+ ShowCursor( sal_True, sal_True );
}
}
}
@@ -948,7 +948,7 @@ void TextView::Command( const CommandEvent& rCEvt )
TEParaPortion* pPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( mpImpl->mpTextEngine->mpIMEInfos->aPos.GetPara() );
pPortion->MarkSelectionInvalid( mpImpl->mpTextEngine->mpIMEInfos->aPos.GetIndex(), 0 );
- BOOL bInsertMode = !mpImpl->mpTextEngine->mpIMEInfos->bWasCursorOverwrite;
+ sal_Bool bInsertMode = !mpImpl->mpTextEngine->mpIMEInfos->bWasCursorOverwrite;
delete mpImpl->mpTextEngine->mpIMEInfos;
mpImpl->mpTextEngine->mpIMEInfos = NULL;
@@ -977,14 +977,14 @@ void TextView::Command( const CommandEvent& rCEvt )
if ( mpImpl->mpTextEngine->mpIMEInfos->bWasCursorOverwrite )
{
- USHORT nOldIMETextLen = mpImpl->mpTextEngine->mpIMEInfos->nLen;
- USHORT nNewIMETextLen = pData->GetText().Len();
+ sal_uInt16 nOldIMETextLen = mpImpl->mpTextEngine->mpIMEInfos->nLen;
+ sal_uInt16 nNewIMETextLen = pData->GetText().Len();
if ( ( nOldIMETextLen > nNewIMETextLen ) &&
( nNewIMETextLen < mpImpl->mpTextEngine->mpIMEInfos->aOldTextAfterStartPos.Len() ) )
{
// restore old characters
- USHORT nRestore = nOldIMETextLen - nNewIMETextLen;
+ sal_uInt16 nRestore = nOldIMETextLen - nNewIMETextLen;
TextPaM aPaM( mpImpl->mpTextEngine->mpIMEInfos->aPos );
aPaM.GetIndex() = aPaM.GetIndex() + nNewIMETextLen;
mpImpl->mpTextEngine->ImpInsertText( aPaM, mpImpl->mpTextEngine->mpIMEInfos->aOldTextAfterStartPos.Copy( nNewIMETextLen, nRestore ) );
@@ -993,7 +993,7 @@ void TextView::Command( const CommandEvent& rCEvt )
( nOldIMETextLen < mpImpl->mpTextEngine->mpIMEInfos->aOldTextAfterStartPos.Len() ) )
{
// overwrite
- USHORT nOverwrite = nNewIMETextLen - nOldIMETextLen;
+ sal_uInt16 nOverwrite = nNewIMETextLen - nOldIMETextLen;
if ( ( nOldIMETextLen + nOverwrite ) > mpImpl->mpTextEngine->mpIMEInfos->aOldTextAfterStartPos.Len() )
nOverwrite = mpImpl->mpTextEngine->mpIMEInfos->aOldTextAfterStartPos.Len() - nOldIMETextLen;
DBG_ASSERT( nOverwrite && (nOverwrite < 0xFF00), "IME Overwrite?!" );
@@ -1038,13 +1038,13 @@ void TextView::Command( const CommandEvent& rCEvt )
TextPaM aPaM( GetSelection().GetEnd() );
Rectangle aR1 = mpImpl->mpTextEngine->PaMtoEditCursor( aPaM );
- USHORT nInputEnd = mpImpl->mpTextEngine->mpIMEInfos->aPos.GetIndex() + mpImpl->mpTextEngine->mpIMEInfos->nLen;
+ sal_uInt16 nInputEnd = mpImpl->mpTextEngine->mpIMEInfos->aPos.GetIndex() + mpImpl->mpTextEngine->mpIMEInfos->nLen;
if ( !mpImpl->mpTextEngine->IsFormatted() )
mpImpl->mpTextEngine->FormatDoc();
TEParaPortion* pParaPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( aPaM.GetPara() );
- USHORT nLine = pParaPortion->GetLineNumber( aPaM.GetIndex(), sal_True );
+ sal_uInt16 nLine = pParaPortion->GetLineNumber( aPaM.GetIndex(), sal_True );
TextLine* pLine = pParaPortion->GetLines().GetObject( nLine );
if ( pLine && ( nInputEnd > pLine->GetEnd() ) )
nInputEnd = pLine->GetEnd();
@@ -1065,12 +1065,12 @@ void TextView::Command( const CommandEvent& rCEvt )
}
}
-void TextView::ShowCursor( BOOL bGotoCursor, BOOL bForceVisCursor )
+void TextView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor )
{
// Die Einstellung hat mehr Gewicht:
if ( !mpImpl->mbAutoScroll )
- bGotoCursor = FALSE;
- ImpShowCursor( bGotoCursor, bForceVisCursor, FALSE );
+ bGotoCursor = sal_False;
+ ImpShowCursor( bGotoCursor, bForceVisCursor, sal_False );
}
void TextView::HideCursor()
@@ -1102,7 +1102,7 @@ void TextView::Scroll( long ndX, long ndY )
if ( nDiffX || nDiffY )
{
- BOOL bVisCursor = mpImpl->mpCursor->IsVisible();
+ sal_Bool bVisCursor = mpImpl->mpCursor->IsVisible();
mpImpl->mpCursor->Hide();
mpImpl->mpWindow->Update();
mpImpl->maStartDocPos = aNewStartPos;
@@ -1122,21 +1122,21 @@ void TextView::Scroll( long ndX, long ndY )
void TextView::Undo()
{
mpImpl->mpTextEngine->SetActiveView( this );
- mpImpl->mpTextEngine->GetUndoManager().Undo( 1 );
+ mpImpl->mpTextEngine->GetUndoManager().Undo();
}
void TextView::Redo()
{
mpImpl->mpTextEngine->SetActiveView( this );
- mpImpl->mpTextEngine->GetUndoManager().Redo( 0 );
+ mpImpl->mpTextEngine->GetUndoManager().Redo();
}
void TextView::Cut()
{
- mpImpl->mpTextEngine->UndoActionStart( TEXTUNDO_CUT );
+ mpImpl->mpTextEngine->UndoActionStart();
Copy();
DeleteSelected();
- mpImpl->mpTextEngine->UndoActionEnd( TEXTUNDO_CUT );
+ mpImpl->mpTextEngine->UndoActionEnd();
}
void TextView::Copy( uno::Reference< datatransfer::clipboard::XClipboard >& rxClipboard )
@@ -1146,7 +1146,7 @@ void TextView::Copy( uno::Reference< datatransfer::clipboard::XClipboard >& rxCl
TETextDataObject* pDataObj = new TETextDataObject( GetSelected() );
if ( mpImpl->mpTextEngine->HasAttrib( TEXTATTR_HYPERLINK ) ) // Dann auch als HTML
- mpImpl->mpTextEngine->Write( pDataObj->GetHTMLStream(), &mpImpl->maSelection, TRUE );
+ mpImpl->mpTextEngine->Write( pDataObj->GetHTMLStream(), &mpImpl->maSelection, sal_True );
const sal_uInt32 nRef = Application::ReleaseSolarMutex();
@@ -1204,7 +1204,7 @@ void TextView::Paste( uno::Reference< datatransfer::clipboard::XClipboard >& rxC
bool bWasTruncated = false;
if( mpImpl->mpTextEngine->GetMaxTextLen() != 0 )
bWasTruncated = ImplTruncateNewText( aText );
- InsertNewText( aText, FALSE );
+ InsertNewText( aText, sal_False );
mpImpl->mpTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
if( bWasTruncated )
@@ -1234,22 +1234,22 @@ String TextView::GetSelected( LineEnd aSeparator )
return mpImpl->mpTextEngine->GetText( mpImpl->maSelection, aSeparator );
}
-void TextView::SetInsertMode( BOOL bInsert )
+void TextView::SetInsertMode( sal_Bool bInsert )
{
if ( mpImpl->mbInsertMode != bInsert )
{
mpImpl->mbInsertMode = bInsert;
- ShowCursor( mpImpl->mbAutoScroll, FALSE );
+ ShowCursor( mpImpl->mbAutoScroll, sal_False );
}
}
-void TextView::SetReadOnly( BOOL bReadOnly )
+void TextView::SetReadOnly( sal_Bool bReadOnly )
{
if ( mpImpl->mbReadOnly != bReadOnly )
{
mpImpl->mbReadOnly = bReadOnly;
if ( !mpImpl->mbReadOnly )
- ShowCursor( mpImpl->mbAutoScroll, FALSE );
+ ShowCursor( mpImpl->mbAutoScroll, sal_False );
else
HideCursor();
@@ -1271,8 +1271,8 @@ TextSelection TextView::ImpMoveCursor( const KeyEvent& rKeyEvent )
KeyEvent aTranslatedKeyEvent = rKeyEvent.LogicalTextDirectionality( eTextDirection );
- BOOL bCtrl = aTranslatedKeyEvent.GetKeyCode().IsMod1() ? TRUE : FALSE;
- USHORT nCode = aTranslatedKeyEvent.GetKeyCode().GetCode();
+ sal_Bool bCtrl = aTranslatedKeyEvent.GetKeyCode().IsMod1() ? sal_True : sal_False;
+ sal_uInt16 nCode = aTranslatedKeyEvent.GetKeyCode().GetCode();
bool bSelect = aTranslatedKeyEvent.GetKeyCode().IsShift();
switch ( nCode )
@@ -1289,9 +1289,9 @@ TextSelection TextView::ImpMoveCursor( const KeyEvent& rKeyEvent )
break;
case KEY_PAGEDOWN: aPaM = bCtrl ? CursorEndOfDoc() : PageDown( aPaM );
break;
- case KEY_LEFT: aPaM = bCtrl ? CursorWordLeft( aPaM ) : CursorLeft( aPaM, aTranslatedKeyEvent.GetKeyCode().IsMod2() ? (USHORT)i18n::CharacterIteratorMode::SKIPCHARACTER : (USHORT)i18n::CharacterIteratorMode::SKIPCELL );
+ case KEY_LEFT: aPaM = bCtrl ? CursorWordLeft( aPaM ) : CursorLeft( aPaM, aTranslatedKeyEvent.GetKeyCode().IsMod2() ? (sal_uInt16)i18n::CharacterIteratorMode::SKIPCHARACTER : (sal_uInt16)i18n::CharacterIteratorMode::SKIPCELL );
break;
- case KEY_RIGHT: aPaM = bCtrl ? CursorWordRight( aPaM ) : CursorRight( aPaM, aTranslatedKeyEvent.GetKeyCode().IsMod2() ? (USHORT)i18n::CharacterIteratorMode::SKIPCHARACTER : (USHORT)i18n::CharacterIteratorMode::SKIPCELL );
+ case KEY_RIGHT: aPaM = bCtrl ? CursorWordRight( aPaM ) : CursorRight( aPaM, aTranslatedKeyEvent.GetKeyCode().IsMod2() ? (sal_uInt16)i18n::CharacterIteratorMode::SKIPCHARACTER : (sal_uInt16)i18n::CharacterIteratorMode::SKIPCELL );
break;
case com::sun::star::awt::Key::SELECT_WORD_FORWARD:
bSelect = true; // fallthrough intentional
@@ -1362,15 +1362,15 @@ TextSelection TextView::ImpMoveCursor( const KeyEvent& rKeyEvent )
return mpImpl->maSelection;
}
-void TextView::InsertText( const XubString& rStr, BOOL bSelect )
+void TextView::InsertText( const XubString& rStr, sal_Bool bSelect )
{
InsertNewText( rStr, bSelect );
}
-void TextView::InsertNewText( const rtl::OUString& rStr, BOOL bSelect )
+void TextView::InsertNewText( const rtl::OUString& rStr, sal_Bool bSelect )
{
// HideSelection();
- mpImpl->mpTextEngine->UndoActionStart( TEXTUNDO_INSERT );
+ mpImpl->mpTextEngine->UndoActionStart();
/* #i87633#
break inserted text into chunks that fit into the underlying String
@@ -1405,21 +1405,21 @@ void TextView::InsertNewText( const rtl::OUString& rStr, BOOL bSelect )
nLen -= nChunkLen;
nPos += nChunkLen;
}
- mpImpl->mpTextEngine->UndoActionEnd( TEXTUNDO_INSERT );
+ mpImpl->mpTextEngine->UndoActionEnd();
mpImpl->mpTextEngine->FormatAndUpdate( this );
}
/*
-void TextView::InsertText( const XubString& rStr, BOOL bSelect )
+void TextView::InsertText( const XubString& rStr, sal_Bool bSelect )
{
// HideSelection();
TextSelection aNewSel( mpImpl->maSelection );
- mpImpl->mpTextEngine->UndoActionStart( TEXTUNDO_INSERT );
+ mpImpl->mpTextEngine->UndoActionStart();
TextPaM aPaM = mpImpl->mpTextEngine->ImpInsertText( mpImpl->maSelection, rStr );
- mpImpl->mpTextEngine->UndoActionEnd( TEXTUNDO_INSERT );
+ mpImpl->mpTextEngine->UndoActionEnd();
if ( bSelect )
{
@@ -1438,22 +1438,22 @@ void TextView::InsertText( const XubString& rStr, BOOL bSelect )
*/
// OLD
-TextPaM TextView::CursorLeft( const TextPaM& rPaM, BOOL bWordMode )
+TextPaM TextView::CursorLeft( const TextPaM& rPaM, sal_Bool bWordMode )
{
- return bWordMode ? CursorWordLeft( rPaM ) : CursorLeft( rPaM, (USHORT)i18n::CharacterIteratorMode::SKIPCELL );
+ return bWordMode ? CursorWordLeft( rPaM ) : CursorLeft( rPaM, (sal_uInt16)i18n::CharacterIteratorMode::SKIPCELL );
- // Remove (USHORT) typecasts in this file when removing this method!
+ // Remove (sal_uInt16) typecasts in this file when removing this method!
}
// OLD
-TextPaM TextView::CursorRight( const TextPaM& rPaM, BOOL bWordMode )
+TextPaM TextView::CursorRight( const TextPaM& rPaM, sal_Bool bWordMode )
{
- return bWordMode ? CursorWordRight( rPaM ) : CursorRight( rPaM, (USHORT)i18n::CharacterIteratorMode::SKIPCELL );
+ return bWordMode ? CursorWordRight( rPaM ) : CursorRight( rPaM, (sal_uInt16)i18n::CharacterIteratorMode::SKIPCELL );
- // Remove (USHORT) typecasts in this file when removing this method!
+ // Remove (sal_uInt16) typecasts in this file when removing this method!
}
-TextPaM TextView::CursorLeft( const TextPaM& rPaM, USHORT nCharacterIteratorMode )
+TextPaM TextView::CursorLeft( const TextPaM& rPaM, sal_uInt16 nCharacterIteratorMode )
{
TextPaM aPaM( rPaM );
@@ -1462,7 +1462,7 @@ TextPaM TextView::CursorLeft( const TextPaM& rPaM, USHORT nCharacterIteratorMode
TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNodes().GetObject( aPaM.GetPara() );
uno::Reference < i18n::XBreakIterator > xBI = mpImpl->mpTextEngine->GetBreakIterator();
sal_Int32 nCount = 1;
- aPaM.GetIndex() = (USHORT)xBI->previousCharacters( pNode->GetText(), aPaM.GetIndex(), mpImpl->mpTextEngine->GetLocale(), nCharacterIteratorMode, nCount, nCount );
+ aPaM.GetIndex() = (sal_uInt16)xBI->previousCharacters( pNode->GetText(), aPaM.GetIndex(), mpImpl->mpTextEngine->GetLocale(), nCharacterIteratorMode, nCount, nCount );
}
else if ( aPaM.GetPara() )
{
@@ -1473,7 +1473,7 @@ TextPaM TextView::CursorLeft( const TextPaM& rPaM, USHORT nCharacterIteratorMode
return aPaM;
}
-TextPaM TextView::CursorRight( const TextPaM& rPaM, USHORT nCharacterIteratorMode )
+TextPaM TextView::CursorRight( const TextPaM& rPaM, sal_uInt16 nCharacterIteratorMode )
{
TextPaM aPaM( rPaM );
@@ -1482,7 +1482,7 @@ TextPaM TextView::CursorRight( const TextPaM& rPaM, USHORT nCharacterIteratorMod
{
uno::Reference < i18n::XBreakIterator > xBI = mpImpl->mpTextEngine->GetBreakIterator();
sal_Int32 nCount = 1;
- aPaM.GetIndex() = (USHORT)xBI->nextCharacters( pNode->GetText(), aPaM.GetIndex(), mpImpl->mpTextEngine->GetLocale(), nCharacterIteratorMode, nCount, nCount );
+ aPaM.GetIndex() = (sal_uInt16)xBI->nextCharacters( pNode->GetText(), aPaM.GetIndex(), mpImpl->mpTextEngine->GetLocale(), nCharacterIteratorMode, nCount, nCount );
}
else if ( aPaM.GetPara() < ( mpImpl->mpTextEngine->mpDoc->GetNodes().Count()-1) )
{
@@ -1505,7 +1505,7 @@ TextPaM TextView::CursorWordLeft( const TextPaM& rPaM )
i18n::Boundary aBoundary = xBI->getWordBoundary( pNode->GetText(), rPaM.GetIndex(), mpImpl->mpTextEngine->GetLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES, sal_True );
if ( aBoundary.startPos >= rPaM.GetIndex() )
aBoundary = xBI->previousWord( pNode->GetText(), rPaM.GetIndex(), mpImpl->mpTextEngine->GetLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES );
- aPaM.GetIndex() = ( aBoundary.startPos != -1 ) ? (USHORT)aBoundary.startPos : 0;
+ aPaM.GetIndex() = ( aBoundary.startPos != -1 ) ? (sal_uInt16)aBoundary.startPos : 0;
}
else if ( aPaM.GetPara() )
{
@@ -1526,7 +1526,7 @@ TextPaM TextView::CursorWordRight( const TextPaM& rPaM )
{
uno::Reference < i18n::XBreakIterator > xBI = mpImpl->mpTextEngine->GetBreakIterator();
i18n::Boundary aBoundary = xBI->nextWord( pNode->GetText(), aPaM.GetIndex(), mpImpl->mpTextEngine->GetLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES );
- aPaM.GetIndex() = (USHORT)aBoundary.startPos;
+ aPaM.GetIndex() = (sal_uInt16)aBoundary.startPos;
}
else if ( aPaM.GetPara() < ( mpImpl->mpTextEngine->mpDoc->GetNodes().Count()-1) )
{
@@ -1537,7 +1537,7 @@ TextPaM TextView::CursorWordRight( const TextPaM& rPaM )
return aPaM;
}
-TextPaM TextView::ImpDelete( BYTE nMode, BYTE nDelMode )
+TextPaM TextView::ImpDelete( sal_uInt8 nMode, sal_uInt8 nDelMode )
{
if ( mpImpl->maSelection.HasRange() ) // dann nur Sel. loeschen
return mpImpl->mpTextEngine->ImpDeleteText( mpImpl->maSelection );
@@ -1548,7 +1548,7 @@ TextPaM TextView::ImpDelete( BYTE nMode, BYTE nDelMode )
{
if ( nDelMode == DELMODE_SIMPLE )
{
- aEndPaM = CursorLeft( aEndPaM, (USHORT)i18n::CharacterIteratorMode::SKIPCHARACTER );
+ aEndPaM = CursorLeft( aEndPaM, (sal_uInt16)i18n::CharacterIteratorMode::SKIPCHARACTER );
}
else if ( nDelMode == DELMODE_RESTOFWORD )
{
@@ -1558,7 +1558,7 @@ TextPaM TextView::ImpDelete( BYTE nMode, BYTE nDelMode )
if ( aBoundary.startPos == mpImpl->maSelection.GetEnd().GetIndex() )
aBoundary = xBI->previousWord( pNode->GetText(), mpImpl->maSelection.GetEnd().GetIndex(), mpImpl->mpTextEngine->GetLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES );
// #i63506# startPos is -1 when the paragraph starts with a tab
- aEndPaM.GetIndex() = (aBoundary.startPos >= 0) ? (USHORT)aBoundary.startPos : 0;
+ aEndPaM.GetIndex() = (aBoundary.startPos >= 0) ? (sal_uInt16)aBoundary.startPos : 0;
}
else // DELMODE_RESTOFCONTENT
{
@@ -1576,14 +1576,14 @@ TextPaM TextView::ImpDelete( BYTE nMode, BYTE nDelMode )
{
if ( nDelMode == DELMODE_SIMPLE )
{
- aEndPaM = CursorRight( aEndPaM, (USHORT)i18n::CharacterIteratorMode::SKIPCELL );
+ aEndPaM = CursorRight( aEndPaM, (sal_uInt16)i18n::CharacterIteratorMode::SKIPCELL );
}
else if ( nDelMode == DELMODE_RESTOFWORD )
{
TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNodes().GetObject( aEndPaM.GetPara() );
uno::Reference < i18n::XBreakIterator > xBI = mpImpl->mpTextEngine->GetBreakIterator();
i18n::Boundary aBoundary = xBI->nextWord( pNode->GetText(), mpImpl->maSelection.GetEnd().GetIndex(), mpImpl->mpTextEngine->GetLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES );
- aEndPaM.GetIndex() = (USHORT)aBoundary.startPos;
+ aEndPaM.GetIndex() = (sal_uInt16)aBoundary.startPos;
}
else // DELMODE_RESTOFCONTENT
{
@@ -1612,17 +1612,17 @@ TextPaM TextView::CursorUp( const TextPaM& rPaM )
long nX;
if ( mpImpl->mnTravelXPos == TRAVEL_X_DONTKNOW )
{
- nX = mpImpl->mpTextEngine->GetEditCursor( rPaM, FALSE ).Left();
- mpImpl->mnTravelXPos = (USHORT)nX+1;
+ nX = mpImpl->mpTextEngine->GetEditCursor( rPaM, sal_False ).Left();
+ mpImpl->mnTravelXPos = (sal_uInt16)nX+1;
}
else
nX = mpImpl->mnTravelXPos;
TEParaPortion* pPPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( rPaM.GetPara() );
- USHORT nLine = pPPortion->GetLineNumber( rPaM.GetIndex(), FALSE );
+ sal_uInt16 nLine = pPPortion->GetLineNumber( rPaM.GetIndex(), sal_False );
if ( nLine ) // gleicher Absatz
{
- USHORT nCharPos = mpImpl->mpTextEngine->GetCharPos( rPaM.GetPara(), nLine-1, nX );
+ sal_uInt16 nCharPos = mpImpl->mpTextEngine->GetCharPos( rPaM.GetPara(), nLine-1, nX );
aPaM.GetIndex() = nCharPos;
// Wenn davor eine autom.Umgebrochene Zeile, und ich muss genau an das
// Ende dieser Zeile, landet der Cursor in der aktuellen Zeile am Anfang
@@ -1635,8 +1635,8 @@ TextPaM TextView::CursorUp( const TextPaM& rPaM )
{
aPaM.GetPara()--;
pPPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( aPaM.GetPara() );
- USHORT nL = pPPortion->GetLines().Count() - 1;
- USHORT nCharPos = mpImpl->mpTextEngine->GetCharPos( aPaM.GetPara(), nL, nX+1 );
+ sal_uInt16 nL = pPPortion->GetLines().Count() - 1;
+ sal_uInt16 nCharPos = mpImpl->mpTextEngine->GetCharPos( aPaM.GetPara(), nL, nX+1 );
aPaM.GetIndex() = nCharPos;
}
@@ -1650,17 +1650,17 @@ TextPaM TextView::CursorDown( const TextPaM& rPaM )
long nX;
if ( mpImpl->mnTravelXPos == TRAVEL_X_DONTKNOW )
{
- nX = mpImpl->mpTextEngine->GetEditCursor( rPaM, FALSE ).Left();
- mpImpl->mnTravelXPos = (USHORT)nX+1;
+ nX = mpImpl->mpTextEngine->GetEditCursor( rPaM, sal_False ).Left();
+ mpImpl->mnTravelXPos = (sal_uInt16)nX+1;
}
else
nX = mpImpl->mnTravelXPos;
TEParaPortion* pPPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( rPaM.GetPara() );
- USHORT nLine = pPPortion->GetLineNumber( rPaM.GetIndex(), FALSE );
+ sal_uInt16 nLine = pPPortion->GetLineNumber( rPaM.GetIndex(), sal_False );
if ( nLine < ( pPPortion->GetLines().Count() - 1 ) )
{
- USHORT nCharPos = mpImpl->mpTextEngine->GetCharPos( rPaM.GetPara(), nLine+1, nX );
+ sal_uInt16 nCharPos = mpImpl->mpTextEngine->GetCharPos( rPaM.GetPara(), nLine+1, nX );
aPaM.GetIndex() = nCharPos;
// Sonderbehandlung siehe CursorUp...
@@ -1672,7 +1672,7 @@ TextPaM TextView::CursorDown( const TextPaM& rPaM )
{
aPaM.GetPara()++;
pPPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( aPaM.GetPara() );
- USHORT nCharPos = mpImpl->mpTextEngine->GetCharPos( aPaM.GetPara(), 0, nX+1 );
+ sal_uInt16 nCharPos = mpImpl->mpTextEngine->GetCharPos( aPaM.GetPara(), 0, nX+1 );
aPaM.GetIndex() = nCharPos;
TextLine* pLine = pPPortion->GetLines().GetObject( 0 );
if ( ( aPaM.GetIndex() == pLine->GetEnd() ) && ( aPaM.GetIndex() > pLine->GetStart() ) && ( pPPortion->GetLines().Count() > 1 ) )
@@ -1687,7 +1687,7 @@ TextPaM TextView::CursorStartOfLine( const TextPaM& rPaM )
TextPaM aPaM( rPaM );
TEParaPortion* pPPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( rPaM.GetPara() );
- USHORT nLine = pPPortion->GetLineNumber( aPaM.GetIndex(), FALSE );
+ sal_uInt16 nLine = pPPortion->GetLineNumber( aPaM.GetIndex(), sal_False );
TextLine* pLine = pPPortion->GetLines().GetObject( nLine );
aPaM.GetIndex() = pLine->GetStart();
@@ -1699,13 +1699,13 @@ TextPaM TextView::CursorEndOfLine( const TextPaM& rPaM )
TextPaM aPaM( rPaM );
TEParaPortion* pPPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( rPaM.GetPara() );
- USHORT nLine = pPPortion->GetLineNumber( aPaM.GetIndex(), FALSE );
+ sal_uInt16 nLine = pPPortion->GetLineNumber( aPaM.GetIndex(), sal_False );
TextLine* pLine = pPPortion->GetLines().GetObject( nLine );
aPaM.GetIndex() = pLine->GetEnd();
if ( pLine->GetEnd() > pLine->GetStart() ) // Leerzeile
{
- xub_Unicode cLastChar = pPPortion->GetNode()->GetText().GetChar((USHORT)(aPaM.GetIndex()-1) );
+ xub_Unicode cLastChar = pPPortion->GetNode()->GetText().GetChar((sal_uInt16)(aPaM.GetIndex()-1) );
if ( ( cLastChar == ' ' ) && ( aPaM.GetIndex() != pPPortion->GetNode()->GetText().Len() ) )
{
// Bei einem Blank in einer autom. umgebrochenen Zeile macht es Sinn,
@@ -1740,7 +1740,7 @@ TextPaM TextView::CursorStartOfDoc()
TextPaM TextView::CursorEndOfDoc()
{
- ULONG nNode = mpImpl->mpTextEngine->mpDoc->GetNodes().Count() - 1;
+ sal_uLong nNode = mpImpl->mpTextEngine->mpDoc->GetNodes().Count() - 1;
TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNodes().GetObject( nNode );
TextPaM aPaM( nNode, pNode->GetText().Len() );
return aPaM;
@@ -1773,11 +1773,11 @@ TextPaM TextView::PageDown( const TextPaM& rPaM )
return aPaM;
}
-void TextView::ImpShowCursor( BOOL bGotoCursor, BOOL bForceVisCursor, BOOL bSpecial )
+void TextView::ImpShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, sal_Bool bSpecial )
{
if ( mpImpl->mpTextEngine->IsFormatting() )
return;
- if ( mpImpl->mpTextEngine->GetUpdateMode() == FALSE )
+ if ( mpImpl->mpTextEngine->GetUpdateMode() == sal_False )
return;
if ( mpImpl->mpTextEngine->IsInUndo() )
return;
@@ -1796,7 +1796,7 @@ void TextView::ImpShowCursor( BOOL bGotoCursor, BOOL bForceVisCursor, BOOL bSpec
{
TEParaPortion* pParaPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( aPaM.GetPara() );
mpImpl->mbCursorAtEndOfLine =
- pParaPortion->GetLineNumber( aPaM.GetIndex(), TRUE ) != pParaPortion->GetLineNumber( aPaM.GetIndex(), FALSE );
+ pParaPortion->GetLineNumber( aPaM.GetIndex(), sal_True ) != pParaPortion->GetLineNumber( aPaM.GetIndex(), sal_False );
}
if ( !IsInsertMode() && !mpImpl->maSelection.HasRange() )
@@ -1805,12 +1805,12 @@ void TextView::ImpShowCursor( BOOL bGotoCursor, BOOL bForceVisCursor, BOOL bSpec
if ( pNode->GetText().Len() && ( aPaM.GetIndex() < pNode->GetText().Len() ) )
{
// If we are behind a portion, and the next portion has other direction, we must change position...
- aEditCursor.Left() = aEditCursor.Right() = mpImpl->mpTextEngine->GetEditCursor( aPaM, FALSE, TRUE ).Left();
+ aEditCursor.Left() = aEditCursor.Right() = mpImpl->mpTextEngine->GetEditCursor( aPaM, sal_False, sal_True ).Left();
TEParaPortion* pParaPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( aPaM.GetPara() );
- USHORT nTextPortionStart = 0;
- USHORT nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTextPortionStart, TRUE );
+ sal_uInt16 nTextPortionStart = 0;
+ sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTextPortionStart, sal_True );
TETextPortion* pTextPortion = pParaPortion->GetTextPortions().GetObject( nTextPortion );
if ( pTextPortion->GetKind() == PORTIONKIND_TAB )
{
@@ -1822,8 +1822,8 @@ void TextView::ImpShowCursor( BOOL bGotoCursor, BOOL bForceVisCursor, BOOL bSpec
}
else
{
- TextPaM aNext = CursorRight( TextPaM( aPaM.GetPara(), aPaM.GetIndex() ), (USHORT)i18n::CharacterIteratorMode::SKIPCELL );
- aEditCursor.Right() = mpImpl->mpTextEngine->GetEditCursor( aNext, TRUE ).Left();
+ TextPaM aNext = CursorRight( TextPaM( aPaM.GetPara(), aPaM.GetIndex() ), (sal_uInt16)i18n::CharacterIteratorMode::SKIPCELL );
+ aEditCursor.Right() = mpImpl->mpTextEngine->GetEditCursor( aNext, sal_True ).Left();
}
}
}
@@ -1872,7 +1872,7 @@ void TextView::ImpShowCursor( BOOL bGotoCursor, BOOL bForceVisCursor, BOOL bSpec
}
// X kann durch das 'bischen mehr' falsch sein:
-// ULONG nMaxTextWidth = mpImpl->mpTextEngine->GetMaxTextWidth();
+// sal_uLong nMaxTextWidth = mpImpl->mpTextEngine->GetMaxTextWidth();
// if ( !nMaxTextWidth || ( nMaxTextWidth > 0x7FFFFFFF ) )
// nMaxTextWidth = 0x7FFFFFFF;
// long nMaxX = (long)nMaxTextWidth - aOutSz.Width();
@@ -1910,7 +1910,7 @@ void TextView::ImpShowCursor( BOOL bGotoCursor, BOOL bForceVisCursor, BOOL bSpec
mpImpl->mpCursor->Show();
}
-BOOL TextView::SetCursorAtPoint( const Point& rPosPixel )
+sal_Bool TextView::SetCursorAtPoint( const Point& rPosPixel )
{
mpImpl->mpTextEngine->CheckIdleFormatter();
@@ -1936,50 +1936,50 @@ BOOL TextView::SetCursorAtPoint( const Point& rPosPixel )
ShowSelection( aTmpNewSel );
}
- BOOL bForceCursor = mpImpl->mpDDInfo ? FALSE : TRUE; // && !mbInSelection
- ImpShowCursor( mpImpl->mbAutoScroll, bForceCursor, FALSE );
- return TRUE;
+ sal_Bool bForceCursor = mpImpl->mpDDInfo ? sal_False : sal_True; // && !mbInSelection
+ ImpShowCursor( mpImpl->mbAutoScroll, bForceCursor, sal_False );
+ return sal_True;
}
-BOOL TextView::IsSelectionAtPoint( const Point& rPosPixel )
+sal_Bool TextView::IsSelectionAtPoint( const Point& rPosPixel )
{
// if ( !Rectangle( Point(), mpImpl->mpWindow->GetOutputSizePixel() ).IsInside( rPosPixel ) && !mbInSelection )
-// return FALSE;
+// return sal_False;
Point aDocPos = GetDocPos( rPosPixel );
- TextPaM aPaM = mpImpl->mpTextEngine->GetPaM( aDocPos, FALSE );
+ TextPaM aPaM = mpImpl->mpTextEngine->GetPaM( aDocPos, sal_False );
// Bei Hyperlinks D&D auch ohne Selektion starten.
// BeginDrag wird aber nur gerufen, wenn IsSelectionAtPoint()
// Problem: IsSelectionAtPoint wird bei Command() nicht gerufen,
- // wenn vorher im MBDown schon FALSE returnt wurde.
+ // wenn vorher im MBDown schon sal_False returnt wurde.
return ( IsInSelection( aPaM ) ||
( /* mpImpl->mpSelEngine->IsInCommand() && */ mpImpl->mpTextEngine->FindAttrib( aPaM, TEXTATTR_HYPERLINK ) ) );
}
-BOOL TextView::IsInSelection( const TextPaM& rPaM )
+sal_Bool TextView::IsInSelection( const TextPaM& rPaM )
{
TextSelection aSel = mpImpl->maSelection;
aSel.Justify();
- ULONG nStartNode = aSel.GetStart().GetPara();
- ULONG nEndNode = aSel.GetEnd().GetPara();
- ULONG nCurNode = rPaM.GetPara();
+ sal_uLong nStartNode = aSel.GetStart().GetPara();
+ sal_uLong nEndNode = aSel.GetEnd().GetPara();
+ sal_uLong nCurNode = rPaM.GetPara();
if ( ( nCurNode > nStartNode ) && ( nCurNode < nEndNode ) )
- return TRUE;
+ return sal_True;
if ( nStartNode == nEndNode )
{
if ( nCurNode == nStartNode )
if ( ( rPaM.GetIndex() >= aSel.GetStart().GetIndex() ) && ( rPaM.GetIndex() < aSel.GetEnd().GetIndex() ) )
- return TRUE;
+ return sal_True;
}
else if ( ( nCurNode == nStartNode ) && ( rPaM.GetIndex() >= aSel.GetStart().GetIndex() ) )
- return TRUE;
+ return sal_True;
else if ( ( nCurNode == nEndNode ) && ( rPaM.GetIndex() < aSel.GetEnd().GetIndex() ) )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
void TextView::ImpHideDDCursor()
@@ -1987,7 +1987,7 @@ void TextView::ImpHideDDCursor()
if ( mpImpl->mpDDInfo && mpImpl->mpDDInfo->mbVisCursor )
{
mpImpl->mpDDInfo->maCursor.Hide();
- mpImpl->mpDDInfo->mbVisCursor = FALSE;
+ mpImpl->mpDDInfo->mbVisCursor = sal_False;
}
}
@@ -1995,7 +1995,7 @@ void TextView::ImpShowDDCursor()
{
if ( !mpImpl->mpDDInfo->mbVisCursor )
{
- Rectangle aCursor = mpImpl->mpTextEngine->PaMtoEditCursor( mpImpl->mpDDInfo->maDropPos, TRUE );
+ Rectangle aCursor = mpImpl->mpTextEngine->PaMtoEditCursor( mpImpl->mpDDInfo->maDropPos, sal_True );
aCursor.Right()++;
aCursor.SetPos( GetWindowPos( aCursor.TopLeft() ) );
@@ -2003,11 +2003,11 @@ void TextView::ImpShowDDCursor()
mpImpl->mpDDInfo->maCursor.SetPos( aCursor.TopLeft() );
mpImpl->mpDDInfo->maCursor.SetSize( aCursor.GetSize() );
mpImpl->mpDDInfo->maCursor.Show();
- mpImpl->mpDDInfo->mbVisCursor = TRUE;
+ mpImpl->mpDDInfo->mbVisCursor = sal_True;
}
}
-void TextView::SetPaintSelection( BOOL bPaint )
+void TextView::SetPaintSelection( sal_Bool bPaint )
{
if ( bPaint != mpImpl->mbPaintSelection )
{
@@ -2016,7 +2016,7 @@ void TextView::SetPaintSelection( BOOL bPaint )
}
}
-void TextView::SetHighlightSelection( BOOL bSelectByHighlight )
+void TextView::SetHighlightSelection( sal_Bool bSelectByHighlight )
{
if ( bSelectByHighlight != mpImpl->mbHighlightSelection )
{
@@ -2025,14 +2025,14 @@ void TextView::SetHighlightSelection( BOOL bSelectByHighlight )
}
}
-BOOL TextView::Read( SvStream& rInput )
+sal_Bool TextView::Read( SvStream& rInput )
{
- BOOL bDone = mpImpl->mpTextEngine->Read( rInput, &mpImpl->maSelection );
+ sal_Bool bDone = mpImpl->mpTextEngine->Read( rInput, &mpImpl->maSelection );
ShowCursor();
return bDone;
}
-BOOL TextView::Write( SvStream& rOutput )
+sal_Bool TextView::Write( SvStream& rOutput )
{
return mpImpl->mpTextEngine->Read( rOutput, &mpImpl->maSelection );
}
@@ -2047,17 +2047,17 @@ bool TextView::ImplTruncateNewText( rtl::OUString& rNewText ) const
bTruncated = true;
}
- ULONG nMaxLen = mpImpl->mpTextEngine->GetMaxTextLen();
+ sal_uLong nMaxLen = mpImpl->mpTextEngine->GetMaxTextLen();
// 0 means unlimited, there is just the String API limit handled above
if( nMaxLen != 0 )
{
- ULONG nCurLen = mpImpl->mpTextEngine->GetTextLen();
+ sal_uLong nCurLen = mpImpl->mpTextEngine->GetTextLen();
sal_uInt32 nNewLen = rNewText.getLength();
if ( nCurLen + nNewLen > nMaxLen )
{
// see how much text will be replaced
- ULONG nSelLen = mpImpl->mpTextEngine->GetTextLen( mpImpl->maSelection );
+ sal_uLong nSelLen = mpImpl->mpTextEngine->GetTextLen( mpImpl->maSelection );
if ( nCurLen + nNewLen - nSelLen > nMaxLen )
{
sal_uInt32 nTruncatedLen = static_cast<sal_uInt32>(nMaxLen - (nCurLen - nSelLen));
@@ -2069,12 +2069,12 @@ bool TextView::ImplTruncateNewText( rtl::OUString& rNewText ) const
return bTruncated;
}
-BOOL TextView::ImplCheckTextLen( const String& rNewText )
+sal_Bool TextView::ImplCheckTextLen( const String& rNewText )
{
- BOOL bOK = TRUE;
+ sal_Bool bOK = sal_True;
if ( mpImpl->mpTextEngine->GetMaxTextLen() )
{
- ULONG n = mpImpl->mpTextEngine->GetTextLen();
+ sal_uLong n = mpImpl->mpTextEngine->GetTextLen();
n += rNewText.Len();
if ( n > mpImpl->mpTextEngine->GetMaxTextLen() )
{
@@ -2085,7 +2085,7 @@ BOOL TextView::ImplCheckTextLen( const String& rNewText )
// Beep hat hier eigentlich nichts verloren, sondern lieber ein Hdl,
// aber so funktioniert es wenigstens in ME, BasicIDE, SourceView
Sound::Beep();
- bOK = FALSE;
+ bOK = sal_False;
}
}
}
@@ -2102,12 +2102,12 @@ void TextView::dragGestureRecognized( const ::com::sun::star::datatransfer::dnd:
delete mpImpl->mpDDInfo;
mpImpl->mpDDInfo = new TextDDInfo;
- mpImpl->mpDDInfo->mbStarterOfDD = TRUE;
+ mpImpl->mpDDInfo->mbStarterOfDD = sal_True;
TETextDataObject* pDataObj = new TETextDataObject( GetSelected() );
if ( mpImpl->mpTextEngine->HasAttrib( TEXTATTR_HYPERLINK ) ) // Dann auch als HTML
- mpImpl->mpTextEngine->Write( pDataObj->GetHTMLStream(), &mpImpl->maSelection, TRUE );
+ mpImpl->mpTextEngine->Write( pDataObj->GetHTMLStream(), &mpImpl->maSelection, sal_True );
/*
@@ -2151,7 +2151,7 @@ void TextView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEv
{
vos::OGuard aVclGuard( Application::GetSolarMutex() );
- BOOL bChanges = FALSE;
+ sal_Bool bChanges = sal_False;
if ( !mpImpl->mbReadOnly && mpImpl->mpDDInfo )
{
ImpHideDDCursor();
@@ -2159,17 +2159,17 @@ void TextView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEv
// Daten fuer das loeschen nach einem DROP_MOVE:
TextSelection aPrevSel( mpImpl->maSelection );
aPrevSel.Justify();
- ULONG nPrevParaCount = mpImpl->mpTextEngine->GetParagraphCount();
- USHORT nPrevStartParaLen = mpImpl->mpTextEngine->GetTextLen( aPrevSel.GetStart().GetPara() );
+ sal_uLong nPrevParaCount = mpImpl->mpTextEngine->GetParagraphCount();
+ sal_uInt16 nPrevStartParaLen = mpImpl->mpTextEngine->GetTextLen( aPrevSel.GetStart().GetPara() );
- BOOL bStarterOfDD = FALSE;
- for ( USHORT nView = mpImpl->mpTextEngine->GetViewCount(); nView && !bStarterOfDD; )
- bStarterOfDD = mpImpl->mpTextEngine->GetView( --nView )->mpImpl->mpDDInfo ? mpImpl->mpTextEngine->GetView( nView )->mpImpl->mpDDInfo->mbStarterOfDD : FALSE;
+ sal_Bool bStarterOfDD = sal_False;
+ for ( sal_uInt16 nView = mpImpl->mpTextEngine->GetViewCount(); nView && !bStarterOfDD; )
+ bStarterOfDD = mpImpl->mpTextEngine->GetView( --nView )->mpImpl->mpDDInfo ? mpImpl->mpTextEngine->GetView( nView )->mpImpl->mpDDInfo->mbStarterOfDD : sal_False;
HideSelection();
ImpSetSelection( mpImpl->mpDDInfo->maDropPos );
- mpImpl->mpTextEngine->UndoActionStart( TEXTUNDO_DRAGANDDROP );
+ mpImpl->mpTextEngine->UndoActionStart();
String aText;
uno::Reference< datatransfer::XTransferable > xDataObj = rDTDE.Transferable;
@@ -2198,7 +2198,7 @@ void TextView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEv
mpImpl->mpTextEngine->SetAttrib( TextAttribProtect(),
aTempStart.GetPara(),
aTempStart.GetIndex(),
- mpImpl->maSelection.GetEnd().GetIndex(), FALSE );
+ mpImpl->maSelection.GetEnd().GetIndex(), sal_False );
}
if ( aPrevSel.HasRange() &&
@@ -2210,7 +2210,7 @@ void TextView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEv
( ( mpImpl->mpDDInfo->maDropPos.GetPara() == aPrevSel.GetStart().GetPara() )
&& ( mpImpl->mpDDInfo->maDropPos.GetIndex() < aPrevSel.GetStart().GetIndex() ) ) )
{
- ULONG nNewParasBeforeSelection =
+ sal_uLong nNewParasBeforeSelection =
mpImpl->mpTextEngine->GetParagraphCount() - nPrevParaCount;
aPrevSel.GetStart().GetPara() += nNewParasBeforeSelection;
@@ -2218,7 +2218,7 @@ void TextView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEv
if ( mpImpl->mpDDInfo->maDropPos.GetPara() == aPrevSel.GetStart().GetPara() )
{
- USHORT nNewChars =
+ sal_uInt16 nNewChars =
mpImpl->mpTextEngine->GetTextLen( aPrevSel.GetStart().GetPara() ) - nPrevStartParaLen;
aPrevSel.GetStart().GetIndex() =
@@ -2247,7 +2247,7 @@ void TextView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEv
mpImpl->mpTextEngine->ImpDeleteText( aPrevSel );
}
- mpImpl->mpTextEngine->UndoActionEnd( TEXTUNDO_DRAGANDDROP );
+ mpImpl->mpTextEngine->UndoActionEnd();
delete mpImpl->mpDDInfo;
mpImpl->mpDDInfo = 0;
@@ -2380,7 +2380,7 @@ sal_Int32 TextView::GetLineNumberOfCursorInSelection() const
{
TextPaM aPaM = GetSelection().GetEnd();
TEParaPortion* pPPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( aPaM.GetPara() );
- nLineNo = pPPortion->GetLineNumber( aPaM.GetIndex(), FALSE );
+ nLineNo = pPPortion->GetLineNumber( aPaM.GetIndex(), sal_False );
if( mpImpl->mbCursorAtEndOfLine )
--nLineNo;
}
@@ -2411,12 +2411,12 @@ void __EXPORT TextSelFunctionSet::CreateAnchor()
mpView->ImpSetSelection( mpView->mpImpl->maSelection.GetEnd() );
}
-BOOL __EXPORT TextSelFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL )
+sal_Bool __EXPORT TextSelFunctionSet::SetCursorAtPoint( const Point& rPointPixel, sal_Bool )
{
return mpView->SetCursorAtPoint( rPointPixel );
}
-BOOL __EXPORT TextSelFunctionSet::IsSelectionAtPoint( const Point& rPointPixel )
+sal_Bool __EXPORT TextSelFunctionSet::IsSelectionAtPoint( const Point& rPointPixel )
{
return mpView->IsSelectionAtPoint( rPointPixel );
}
@@ -2439,31 +2439,31 @@ TextEngine* TextView::GetTextEngine() const
{ return mpImpl->mpTextEngine; }
Window* TextView::GetWindow() const
{ return mpImpl->mpWindow; }
-void TextView::EnableCursor( BOOL bEnable )
+void TextView::EnableCursor( sal_Bool bEnable )
{ mpImpl->mbCursorEnabled = bEnable; }
-BOOL TextView::IsCursorEnabled() const
+sal_Bool TextView::IsCursorEnabled() const
{ return mpImpl->mbCursorEnabled; }
void TextView::SetStartDocPos( const Point& rPos )
{ mpImpl->maStartDocPos = rPos; }
const Point& TextView::GetStartDocPos() const
{ return mpImpl->maStartDocPos; }
-void TextView::SetAutoIndentMode( BOOL bAutoIndent )
+void TextView::SetAutoIndentMode( sal_Bool bAutoIndent )
{ mpImpl->mbAutoIndent = bAutoIndent; }
-BOOL TextView::IsAutoIndentMode() const
+sal_Bool TextView::IsAutoIndentMode() const
{ return mpImpl->mbAutoIndent; }
-BOOL TextView::IsReadOnly() const
+sal_Bool TextView::IsReadOnly() const
{ return mpImpl->mbReadOnly; }
-void TextView::SetAutoScroll( BOOL bAutoScroll )
+void TextView::SetAutoScroll( sal_Bool bAutoScroll )
{ mpImpl->mbAutoScroll = bAutoScroll; }
-BOOL TextView::IsAutoScroll() const
+sal_Bool TextView::IsAutoScroll() const
{ return mpImpl->mbAutoScroll; }
-BOOL TextView::IsPaintSelection() const
+sal_Bool TextView::IsPaintSelection() const
{ return mpImpl->mbPaintSelection; }
-BOOL TextView::IsHighlightSelection() const
+sal_Bool TextView::IsHighlightSelection() const
{ return mpImpl->mbHighlightSelection; }
-BOOL TextView::HasSelection() const
+sal_Bool TextView::HasSelection() const
{ return mpImpl->maSelection.HasRange(); }
-BOOL TextView::IsInsertMode() const
+sal_Bool TextView::IsInsertMode() const
{ return mpImpl->mbInsertMode; }
void TextView::SupportProtectAttribute(sal_Bool bSupport)
{ mpImpl->mbSupportProtectAttribute = bSupport;}
diff --git a/svtools/source/edit/xtextedt.cxx b/svtools/source/edit/xtextedt.cxx
index 0a4907edcadd..0241c7c3cbbc 100644
--- a/svtools/source/edit/xtextedt.cxx
+++ b/svtools/source/edit/xtextedt.cxx
@@ -52,12 +52,12 @@ ExtTextEngine::~ExtTextEngine()
TextSelection ExtTextEngine::MatchGroup( const TextPaM& rCursor ) const
{
TextSelection aSel( rCursor );
- USHORT nPos = rCursor.GetIndex();
- ULONG nPara = rCursor.GetPara();
- ULONG nParas = GetParagraphCount();
+ sal_uInt16 nPos = rCursor.GetIndex();
+ sal_uLong nPara = rCursor.GetPara();
+ sal_uLong nParas = GetParagraphCount();
if ( ( nPara < nParas ) && ( nPos < GetTextLen( nPara ) ) )
{
- USHORT nMatchChar = maGroupChars.Search( GetText( rCursor.GetPara() ).GetChar( nPos ) );
+ sal_uInt16 nMatchChar = maGroupChars.Search( GetText( rCursor.GetPara() ).GetChar( nPos ) );
if ( nMatchChar != STRING_NOTFOUND )
{
if ( ( nMatchChar % 2 ) == 0 )
@@ -66,8 +66,8 @@ TextSelection ExtTextEngine::MatchGroup( const TextPaM& rCursor ) const
sal_Unicode nSC = maGroupChars.GetChar( nMatchChar );
sal_Unicode nEC = maGroupChars.GetChar( nMatchChar+1 );
- USHORT nCur = nPos+1;
- USHORT nLevel = 1;
+ sal_uInt16 nCur = nPos+1;
+ sal_uInt16 nLevel = 1;
while ( nLevel && ( nPara < nParas ) )
{
XubString aStr = GetText( nPara );
@@ -102,8 +102,8 @@ TextSelection ExtTextEngine::MatchGroup( const TextPaM& rCursor ) const
xub_Unicode nEC = maGroupChars.GetChar( nMatchChar );
xub_Unicode nSC = maGroupChars.GetChar( nMatchChar-1 );
- USHORT nCur = rCursor.GetIndex()-1;
- USHORT nLevel = 1;
+ sal_uInt16 nCur = rCursor.GetIndex()-1;
+ sal_uInt16 nLevel = 1;
while ( nLevel )
{
if ( GetTextLen( nPara ) )
@@ -148,12 +148,12 @@ TextSelection ExtTextEngine::MatchGroup( const TextPaM& rCursor ) const
return aSel;
}
-BOOL ExtTextEngine::Search( TextSelection& rSel, const util::SearchOptions& rSearchOptions, BOOL bForward )
+sal_Bool ExtTextEngine::Search( TextSelection& rSel, const util::SearchOptions& rSearchOptions, sal_Bool bForward )
{
TextSelection aSel( rSel );
aSel.Justify();
- BOOL bSearchInSelection = (0 != (rSearchOptions.searchFlag & util::SearchFlags::REG_NOT_BEGINOFLINE) );
+ sal_Bool bSearchInSelection = (0 != (rSearchOptions.searchFlag & util::SearchFlags::REG_NOT_BEGINOFLINE) );
TextPaM aStartPaM( aSel.GetEnd() );
if ( aSel.HasRange() && ( ( bSearchInSelection && bForward ) || ( !bSearchInSelection && !bForward ) ) )
@@ -162,7 +162,7 @@ BOOL ExtTextEngine::Search( TextSelection& rSel, const util::SearchOptions& rSea
}
bool bFound = false;
- ULONG nStartNode, nEndNode;
+ sal_uLong nStartNode, nEndNode;
if ( bSearchInSelection )
nEndNode = bForward ? aSel.GetEnd().GetPara() : aSel.GetStart().GetPara();
@@ -176,13 +176,13 @@ BOOL ExtTextEngine::Search( TextSelection& rSel, const util::SearchOptions& rSea
utl::TextSearch aSearcher( rSearchOptions );
// ueber die Absaetze iterieren...
- for ( ULONG nNode = nStartNode;
+ for ( sal_uLong nNode = nStartNode;
bForward ? ( nNode <= nEndNode) : ( nNode >= nEndNode );
bForward ? nNode++ : nNode-- )
{
String aText = GetText( nNode );
- USHORT nStartPos = 0;
- USHORT nEndPos = aText.Len();
+ sal_uInt16 nStartPos = 0;
+ sal_uInt16 nEndPos = aText.Len();
if ( nNode == nStartNode )
{
if ( bForward )
@@ -212,7 +212,7 @@ BOOL ExtTextEngine::Search( TextSelection& rSel, const util::SearchOptions& rSea
// Ueber den Absatz selektieren?
// Select over the paragraph?
// FIXME This should be max long...
- if( nEndPos == sal::static_int_cast<USHORT>(-1) ) // USHORT for 0 and -1 !
+ if( nEndPos == sal::static_int_cast<sal_uInt16>(-1) ) // sal_uInt16 for 0 and -1 !
{
if ( (rSel.GetEnd().GetPara()+1) < GetParagraphCount() )
{
@@ -249,34 +249,34 @@ ExtTextView::~ExtTextView()
{
}
-BOOL ExtTextView::MatchGroup()
+sal_Bool ExtTextView::MatchGroup()
{
TextSelection aTmpSel( GetSelection() );
aTmpSel.Justify();
if ( ( aTmpSel.GetStart().GetPara() != aTmpSel.GetEnd().GetPara() ) ||
( ( aTmpSel.GetEnd().GetIndex() - aTmpSel.GetStart().GetIndex() ) > 1 ) )
{
- return FALSE;
+ return sal_False;
}
TextSelection aMatchSel = ((ExtTextEngine*)GetTextEngine())->MatchGroup( aTmpSel.GetStart() );
if ( aMatchSel.HasRange() )
SetSelection( aMatchSel );
- return aMatchSel.HasRange() ? TRUE : FALSE;
+ return aMatchSel.HasRange() ? sal_True : sal_False;
}
-BOOL ExtTextView::Search( const util::SearchOptions& rSearchOptions, BOOL bForward )
+sal_Bool ExtTextView::Search( const util::SearchOptions& rSearchOptions, sal_Bool bForward )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
TextSelection aSel( GetSelection() );
if ( ((ExtTextEngine*)GetTextEngine())->Search( aSel, rSearchOptions, bForward ) )
{
- bFound = TRUE;
+ bFound = sal_True;
// Erstmal den Anfang des Wortes als Selektion einstellen,
// damit das ganze Wort in den sichtbaren Bereich kommt.
SetSelection( aSel.GetStart() );
- ShowCursor( TRUE, FALSE );
+ ShowCursor( sal_True, sal_False );
}
else
{
@@ -289,9 +289,9 @@ BOOL ExtTextView::Search( const util::SearchOptions& rSearchOptions, BOOL bForwa
return bFound;
}
-USHORT ExtTextView::Replace( const util::SearchOptions& rSearchOptions, BOOL bAll, BOOL bForward )
+sal_uInt16 ExtTextView::Replace( const util::SearchOptions& rSearchOptions, sal_Bool bAll, sal_Bool bForward )
{
- USHORT nFound = 0;
+ sal_uInt16 nFound = 0;
if ( !bAll )
{
@@ -316,7 +316,7 @@ USHORT ExtTextView::Replace( const util::SearchOptions& rSearchOptions, BOOL bAl
// HideSelection();
TextSelection aSel;
- BOOL bSearchInSelection = (0 != (rSearchOptions.searchFlag & util::SearchFlags::REG_NOT_BEGINOFLINE) );
+ sal_Bool bSearchInSelection = (0 != (rSearchOptions.searchFlag & util::SearchFlags::REG_NOT_BEGINOFLINE) );
if ( bSearchInSelection )
{
aSel = GetSelection();
@@ -325,9 +325,9 @@ USHORT ExtTextView::Replace( const util::SearchOptions& rSearchOptions, BOOL bAl
TextSelection aSearchSel( aSel );
- BOOL bFound = pTextEngine->Search( aSel, rSearchOptions, TRUE );
+ sal_Bool bFound = pTextEngine->Search( aSel, rSearchOptions, sal_True );
if ( bFound )
- pTextEngine->UndoActionStart( XTEXTUNDO_REPLACEALL );
+ pTextEngine->UndoActionStart();
while ( bFound )
{
nFound++;
@@ -335,42 +335,42 @@ USHORT ExtTextView::Replace( const util::SearchOptions& rSearchOptions, BOOL bAl
TextPaM aNewStart = pTextEngine->ImpInsertText( aSel, rSearchOptions.replaceString );
aSel = aSearchSel;
aSel.GetStart() = aNewStart;
- bFound = pTextEngine->Search( aSel, rSearchOptions, TRUE );
+ bFound = pTextEngine->Search( aSel, rSearchOptions, sal_True );
}
if ( nFound )
{
SetSelection( aSel.GetStart() );
pTextEngine->FormatAndUpdate( this );
- pTextEngine->UndoActionEnd( XTEXTUNDO_REPLACEALL );
+ pTextEngine->UndoActionEnd();
}
}
return nFound;
}
-BOOL ExtTextView::ImpIndentBlock( BOOL bRight )
+sal_Bool ExtTextView::ImpIndentBlock( sal_Bool bRight )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
TextSelection aSel = GetSelection();
aSel.Justify();
HideSelection();
- GetTextEngine()->UndoActionStart( bRight ? XTEXTUNDO_INDENTBLOCK : XTEXTUNDO_UNINDENTBLOCK );
+ GetTextEngine()->UndoActionStart();
- ULONG nStartPara = aSel.GetStart().GetPara();
- ULONG nEndPara = aSel.GetEnd().GetPara();
+ sal_uLong nStartPara = aSel.GetStart().GetPara();
+ sal_uLong nEndPara = aSel.GetEnd().GetPara();
if ( aSel.HasRange() && !aSel.GetEnd().GetIndex() )
{
nEndPara--; // den dann nicht einruecken...
}
- for ( ULONG nPara = nStartPara; nPara <= nEndPara; nPara++ )
+ for ( sal_uLong nPara = nStartPara; nPara <= nEndPara; nPara++ )
{
if ( bRight )
{
// Tabs hinzufuegen
GetTextEngine()->ImpInsertText( TextPaM( nPara, 0 ), '\t' );
- bDone = TRUE;
+ bDone = sal_True;
}
else
{
@@ -381,14 +381,14 @@ BOOL ExtTextView::ImpIndentBlock( BOOL bRight )
( aText.GetChar( 0 ) == ' ' ) ) )
{
GetTextEngine()->ImpDeleteText( TextSelection( TextPaM( nPara, 0 ), TextPaM( nPara, 1 ) ) );
- bDone = TRUE;
+ bDone = sal_True;
}
}
}
- GetTextEngine()->UndoActionEnd( bRight ? XTEXTUNDO_INDENTBLOCK : XTEXTUNDO_UNINDENTBLOCK );
+ GetTextEngine()->UndoActionEnd();
- BOOL bRange = aSel.HasRange();
+ sal_Bool bRange = aSel.HasRange();
if ( bRight )
{
aSel.GetStart().GetIndex()++;
@@ -409,13 +409,13 @@ BOOL ExtTextView::ImpIndentBlock( BOOL bRight )
return bDone;
}
-BOOL ExtTextView::IndentBlock()
+sal_Bool ExtTextView::IndentBlock()
{
- return ImpIndentBlock( TRUE );
+ return ImpIndentBlock( sal_True );
}
-BOOL ExtTextView::UnindentBlock()
+sal_Bool ExtTextView::UnindentBlock()
{
- return ImpIndentBlock( FALSE );
+ return ImpIndentBlock( sal_False );
}
diff --git a/svtools/source/filter.vcl/filter/FilterConfigItem.cxx b/svtools/source/filter.vcl/filter/FilterConfigItem.cxx
index 312f62af9d84..8d7752ddd7df 100644
--- a/svtools/source/filter.vcl/filter/FilterConfigItem.cxx
+++ b/svtools/source/filter.vcl/filter/FilterConfigItem.cxx
@@ -428,7 +428,7 @@ void FilterConfigItem::WriteBool( const OUString& rKey, sal_Bool bNewValue )
Any aAny;
if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) )
{
- sal_Bool bOldValue;
+ sal_Bool bOldValue(sal_True);
if ( aAny >>= bOldValue )
{
if ( bOldValue != bNewValue )
@@ -462,7 +462,7 @@ void FilterConfigItem::WriteInt32( const OUString& rKey, sal_Int32 nNewValue )
if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) )
{
- sal_Int32 nOldValue;
+ sal_Int32 nOldValue = 0;
if ( aAny >>= nOldValue )
{
if ( nOldValue != nNewValue )
diff --git a/svtools/source/filter.vcl/filter/exportdialog.cxx b/svtools/source/filter.vcl/filter/exportdialog.cxx
index 20cc46a30ab5..701619d31f6c 100644
--- a/svtools/source/filter.vcl/filter/exportdialog.cxx
+++ b/svtools/source/filter.vcl/filter/exportdialog.cxx
@@ -794,7 +794,7 @@ void ExportDialog::createSizeControls( vcl::RowOrColumn& rLayout )
nUnit = UNIT_PIXEL;
if ( nUnit < 0 )
nUnit = UNIT_CM;
- maLbSizeX.SelectEntryPos( static_cast< USHORT >( nUnit ) );
+ maLbSizeX.SelectEntryPos( static_cast< sal_uInt16 >( nUnit ) );
if ( mbIsPixelFormat ) // TODO: (metafileresolutionsupport) should be supported for vector formats also... this makes
{ // sense eg for bitmap fillings in metafiles, to preserve high dpi output
@@ -807,7 +807,7 @@ void ExportDialog::createSizeControls( vcl::RowOrColumn& rLayout )
sal_Int32 nResolutionUnit = mpOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportResolutionUnit" ) ), 1 );
if ( ( nResolutionUnit < 0 ) || ( nResolutionUnit > 2 ) )
nResolutionUnit = 1;
- maLbResolution.SelectEntryPos( static_cast< USHORT >( nResolutionUnit ) );
+ maLbResolution.SelectEntryPos( static_cast< sal_uInt16 >( nResolutionUnit ) );
}
boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) );
diff --git a/svtools/source/filter.vcl/filter/filter.cxx b/svtools/source/filter.vcl/filter/filter.cxx
index 7e0729082841..9c2c28dfbe3b 100644
--- a/svtools/source/filter.vcl/filter/filter.cxx
+++ b/svtools/source/filter.vcl/filter/filter.cxx
@@ -133,9 +133,9 @@ public:
~ImpFilterOutputStream() {}
};
-BOOL ImplDirEntryHelper::Exists( const INetURLObject& rObj )
+sal_Bool ImplDirEntryHelper::Exists( const INetURLObject& rObj )
{
- BOOL bExists = FALSE;
+ sal_Bool bExists = sal_False;
try
{
@@ -188,11 +188,11 @@ void ImplDirEntryHelper::Kill( const String& rMainUrl )
//--------------------------------------------------------------------------
-BYTE* ImplSearchEntry( BYTE* pSource, BYTE* pDest, ULONG nComp, ULONG nSize )
+sal_uInt8* ImplSearchEntry( sal_uInt8* pSource, sal_uInt8* pDest, sal_uLong nComp, sal_uLong nSize )
{
while ( nComp-- >= nSize )
{
- ULONG i;
+ sal_uLong i;
for ( i = 0; i < nSize; i++ )
{
if ( ( pSource[i]&~0x20 ) != ( pDest[i]&~0x20 ) )
@@ -225,9 +225,9 @@ inline String ImpGetExtension( const String &rPath )
|* Eingabe-prarameter:
|* rPath - Dateipfad
|* rFormatExtension - Inhalt egal
-|* bTest - setze FALSE
+|* bTest - setze sal_False
|* Ausgabe-parameter:
-|* Funkionswert - TRUE wenn Erfolg
+|* Funkionswert - sal_True wenn Erfolg
|* rFormatExtension - Bei Erfolg: uebliche Dateiendung
|* des Formats (Grossbuchstaben)
|* 2.) Datei anlesen, Dateiformat ueberpruefen
@@ -235,11 +235,11 @@ inline String ImpGetExtension( const String &rPath )
|* rPath - Dateipfad
|* rFormatExtension - uebliche Dateiendung des Formats
|* (Grossbuchstaben)
-|* bTest - setze TRUE
+|* bTest - setze sal_True
|* Ausgabe-parameter:
-|* Funkionswert - FALSE, wenn die Datei bestimmt nicht
+|* Funkionswert - sal_False, wenn die Datei bestimmt nicht
|* vom uebgebenen Format ist.
-|* TRUE, wenn die Datei WAHRSCHEINLICH von
+|* sal_True, wenn die Datei WAHRSCHEINLICH von
|* dem Format ist, ODER WENN DAS FORMAT
|* DIESER FUNKTION NICHT BEKANNT IST!
|*
@@ -248,22 +248,22 @@ inline String ImpGetExtension( const String &rPath )
|*
*************************************************************************/
-static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, BOOL bTest )
+static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, sal_Bool bTest )
{
- USHORT i;
- BYTE sFirstBytes[ 256 ];
- ULONG nFirstLong,nSecondLong;
- ULONG nStreamPos = rStream.Tell();
+ sal_uInt16 i;
+ sal_uInt8 sFirstBytes[ 256 ];
+ sal_uLong nFirstLong,nSecondLong;
+ sal_uLong nStreamPos = rStream.Tell();
rStream.Seek( STREAM_SEEK_TO_END );
- ULONG nStreamLen = rStream.Tell() - nStreamPos;
+ sal_uLong nStreamLen = rStream.Tell() - nStreamPos;
rStream.Seek( nStreamPos );
if ( !nStreamLen )
{
SvLockBytes* pLockBytes = rStream.GetLockBytes();
if ( pLockBytes )
- pLockBytes->SetSynchronMode( TRUE );
+ pLockBytes->SetSynchronMode( sal_True );
rStream.Seek( STREAM_SEEK_TO_END );
nStreamLen = rStream.Tell() - nStreamPos;
@@ -276,25 +276,25 @@ static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, B
{
rStream.Read( sFirstBytes, nStreamLen );
- for( i = (USHORT) nStreamLen; i < 256; i++ )
+ for( i = (sal_uInt16) nStreamLen; i < 256; i++ )
sFirstBytes[ i ]=0;
}
if( rStream.GetError() )
- return FALSE;
+ return sal_False;
// Die ersten 8 Bytes in nFirstLong, nSecondLong unterbringen,
// Big-Endian:
for( i = 0, nFirstLong = 0L, nSecondLong = 0L; i < 4; i++ )
{
- nFirstLong=(nFirstLong<<8)|(ULONG)sFirstBytes[i];
- nSecondLong=(nSecondLong<<8)|(ULONG)sFirstBytes[i+4];
+ nFirstLong=(nFirstLong<<8)|(sal_uLong)sFirstBytes[i];
+ nSecondLong=(nSecondLong<<8)|(sal_uLong)sFirstBytes[i+4];
}
- // Folgende Variable ist nur bei bTest==TRUE interessant. Sie
- // bleibt FALSE, wenn das Format (rFormatExtension) hier noch nicht
+ // Folgende Variable ist nur bei bTest==sal_True interessant. Sie
+ // bleibt sal_False, wenn das Format (rFormatExtension) hier noch nicht
// einprogrammiert wurde.
- BOOL bSomethingTested = FALSE;
+ sal_Bool bSomethingTested = sal_False;
// Nun werden die verschieden Formate ueberprueft. Dabei ist die
// Reihenfolge nicht egal. Z.b. koennte eine MET-Datei auch durch
@@ -303,7 +303,7 @@ static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, B
// Theoretisch waere aber vielleicht auch eine BMP-Datei denkbar,
// die durch den MET-Test geht.
// Diese Probleme gibt es natuerlich nicht nur bei MET und BMP.
- // Deshalb wird im Falle der Uberpruefung eines Formats (bTest==TRUE)
+ // Deshalb wird im Falle der Uberpruefung eines Formats (bTest==sal_True)
// nur genau dieses eine Format getestet. Alles andere koennte fatale
// Folgen haben, z.B. wenn der Benutzer sagt, es sei BMP-Datei (und es
// ist BMP-Datei), und hier wuerde die Datei durch den MET-Test gehen...
@@ -311,26 +311,26 @@ static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, B
//--------------------------- MET ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "MET", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested=TRUE;
+ bSomethingTested=sal_True;
if( sFirstBytes[2] == 0xd3 )
{
rStream.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
rStream.Seek( nStreamPos );
- USHORT nFieldSize;
- BYTE nMagic;
- BOOL bOK=TRUE;
+ sal_uInt16 nFieldSize;
+ sal_uInt8 nMagic;
+ sal_Bool bOK=sal_True;
rStream >> nFieldSize >> nMagic;
for (i=0; i<3; i++) {
- if (nFieldSize<6) { bOK=FALSE; break; }
- if (nStreamLen < rStream.Tell() + nFieldSize ) { bOK=FALSE; break; }
+ if (nFieldSize<6) { bOK=sal_False; break; }
+ if (nStreamLen < rStream.Tell() + nFieldSize ) { bOK=sal_False; break; }
rStream.SeekRel(nFieldSize-3);
rStream >> nFieldSize >> nMagic;
- if (nMagic!=0xd3) { bOK=FALSE; break; }
+ if (nMagic!=0xd3) { bOK=sal_False; break; }
}
rStream.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
if (bOK && !rStream.GetError()) {
rFormatExtension= UniString::CreateFromAscii( "MET", 3 );
- return TRUE;
+ return sal_True;
}
}
}
@@ -338,9 +338,9 @@ static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, B
//--------------------------- BMP ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "BMP", 3 ) == COMPARE_EQUAL ) )
{
- BYTE nOffs;
+ sal_uInt8 nOffs;
- bSomethingTested=TRUE;
+ bSomethingTested=sal_True;
// OS/2-Bitmaparray ('BA') koennen wir evtl. auch lesen,
// dementspr. muessen wir den Offset anpassen,
@@ -364,7 +364,7 @@ static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, B
sFirstBytes[14+nOffs] == 0x0c )
{
rFormatExtension = UniString::CreateFromAscii( "BMP", 3 );
- return TRUE;
+ return sal_True;
}
}
}
@@ -375,33 +375,33 @@ static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, B
( rFormatExtension.CompareToAscii( "WMF", 3 ) == COMPARE_EQUAL ) ||
( rFormatExtension.CompareToAscii( "EMF", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested = TRUE;
+ bSomethingTested = sal_True;
if ( nFirstLong==0xd7cdc69a || nFirstLong==0x01000900 )
{
rFormatExtension = UniString::CreateFromAscii( "WMF", 3 );
- return TRUE;
+ return sal_True;
}
else if( nFirstLong == 0x01000000 && sFirstBytes[ 40 ] == 0x20 && sFirstBytes[ 41 ] == 0x45 &&
sFirstBytes[ 42 ] == 0x4d && sFirstBytes[ 43 ] == 0x46 )
{
rFormatExtension = UniString::CreateFromAscii( "EMF", 3 );
- return TRUE;
+ return sal_True;
}
}
//--------------------------- PCX ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "PCX", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested=TRUE;
+ bSomethingTested=sal_True;
if (sFirstBytes[0]==0x0a)
{
- BYTE nVersion=sFirstBytes[1];
- BYTE nEncoding=sFirstBytes[2];
+ sal_uInt8 nVersion=sFirstBytes[1];
+ sal_uInt8 nEncoding=sFirstBytes[2];
if( ( nVersion==0 || nVersion==2 || nVersion==3 || nVersion==5 ) && nEncoding<=1 )
{
rFormatExtension = UniString::CreateFromAscii( "PCX", 3 );
- return TRUE;
+ return sal_True;
}
}
}
@@ -409,69 +409,69 @@ static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, B
//--------------------------- TIF ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "TIF", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested=TRUE;
+ bSomethingTested=sal_True;
if ( nFirstLong==0x49492a00 || nFirstLong==0x4d4d002a )
{
rFormatExtension=UniString::CreateFromAscii( "TIF", 3 );
- return TRUE;
+ return sal_True;
}
}
//--------------------------- GIF ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "GIF", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested=TRUE;
+ bSomethingTested=sal_True;
if ( nFirstLong==0x47494638 && (sFirstBytes[4]==0x37 || sFirstBytes[4]==0x39) && sFirstBytes[5]==0x61 )
{
rFormatExtension = UniString::CreateFromAscii( "GIF", 3 );
- return TRUE;
+ return sal_True;
}
}
//--------------------------- PNG ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "PNG", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested=TRUE;
+ bSomethingTested=sal_True;
if (nFirstLong==0x89504e47 && nSecondLong==0x0d0a1a0a)
{
rFormatExtension = UniString::CreateFromAscii( "PNG", 3 );
- return TRUE;
+ return sal_True;
}
}
//--------------------------- JPG ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "JPG", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested=TRUE;
+ bSomethingTested=sal_True;
if ( ( nFirstLong==0xffd8ffe0 && sFirstBytes[6]==0x4a && sFirstBytes[7]==0x46 && sFirstBytes[8]==0x49 && sFirstBytes[9]==0x46 ) ||
( nFirstLong==0xffd8fffe ) || ( 0xffd8ff00 == ( nFirstLong & 0xffffff00 ) ) )
{
rFormatExtension = UniString::CreateFromAscii( "JPG", 3 );
- return TRUE;
+ return sal_True;
}
}
//--------------------------- SVM ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "SVM", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested=TRUE;
+ bSomethingTested=sal_True;
if( nFirstLong==0x53564744 && sFirstBytes[4]==0x49 )
{
rFormatExtension = UniString::CreateFromAscii( "SVM", 3 );
- return TRUE;
+ return sal_True;
}
else if( sFirstBytes[0]==0x56 && sFirstBytes[1]==0x43 && sFirstBytes[2]==0x4C &&
sFirstBytes[3]==0x4D && sFirstBytes[4]==0x54 && sFirstBytes[5]==0x46 )
{
rFormatExtension = UniString::CreateFromAscii( "SVM", 3 );
- return TRUE;
+ return sal_True;
}
}
//--------------------------- PCD ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "PCD", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested = TRUE;
+ bSomethingTested = sal_True;
if( nStreamLen >= 2055 )
{
char sBuf[8];
@@ -481,7 +481,7 @@ static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, B
if( strncmp( sBuf, "PCD_IPI", 7 ) == 0 )
{
rFormatExtension = UniString::CreateFromAscii( "PCD", 3 );
- return TRUE;
+ return sal_True;
}
}
}
@@ -489,30 +489,30 @@ static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, B
//--------------------------- PSD ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "PSD", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested = TRUE;
+ bSomethingTested = sal_True;
if ( ( nFirstLong == 0x38425053 ) && ( (nSecondLong >> 16 ) == 1 ) )
{
rFormatExtension = UniString::CreateFromAscii( "PSD", 3 );
- return TRUE;
+ return sal_True;
}
}
//--------------------------- EPS ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "EPS", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested = TRUE;
- if ( ( nFirstLong == 0xC5D0D3C6 ) || ( ImplSearchEntry( sFirstBytes, (BYTE*)"%!PS-Adobe", 10, 10 ) &&
- ImplSearchEntry( &sFirstBytes[15], (BYTE*)"EPS", 3, 3 ) ) )
+ bSomethingTested = sal_True;
+ if ( ( nFirstLong == 0xC5D0D3C6 ) || ( ImplSearchEntry( sFirstBytes, (sal_uInt8*)"%!PS-Adobe", 10, 10 ) &&
+ ImplSearchEntry( &sFirstBytes[15], (sal_uInt8*)"EPS", 3, 3 ) ) )
{
rFormatExtension = UniString::CreateFromAscii( "EPS", 3 );
- return TRUE;
+ return sal_True;
}
}
//--------------------------- DXF ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "DXF", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested=TRUE;
+ bSomethingTested=sal_True;
i=0;
while (i<256 && sFirstBytes[i]<=32)
@@ -533,22 +533,22 @@ static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, B
if (strncmp((char*)(sFirstBytes+i),"SECTION",7)==0)
{
rFormatExtension = UniString::CreateFromAscii( "DXF", 3 );
- return TRUE;
+ return sal_True;
}
}
if( strncmp( (char*) sFirstBytes, "AutoCAD Binary DXF", 18 ) == 0 )
{
rFormatExtension = UniString::CreateFromAscii( "DXF", 3 );
- return TRUE;
+ return sal_True;
}
}
//--------------------------- PCT ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "PCT", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested = TRUE;
- BYTE sBuf[3];
+ bSomethingTested = sal_True;
+ sal_uInt8 sBuf[3];
// store number format
sal_uInt16 oldNumberFormat = rStream.GetNumberFormatInt();
sal_uInt32 nOffset; // in ms documents the pict format is used without the first 512 bytes
@@ -577,19 +577,19 @@ static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, B
if ( sBuf[ 0 ] == 0x00 && sBuf[ 1 ] == 0x11 && sBuf[ 2 ] == 0x02)
{
rFormatExtension = UniString::CreateFromAscii( "PCT", 3 );
- return TRUE;
+ return sal_True;
}
// normal version 1 - page A25
else if (sBuf[ 0 ] == 0x11 && sBuf[ 1 ] == 0x01 && bdBoxOk) {
rFormatExtension = UniString::CreateFromAscii( "PCT", 3 );
- return TRUE;
+ return sal_True;
}
// previous code kept in order to do not break any compatibility
// probably eroneous
else if ( sBuf[ 0 ] == 0x00 && sBuf[ 1 ] == 0x11 && sBuf[ 2 ] == 0x01 && bdBoxOk)
{
rFormatExtension = UniString::CreateFromAscii( "PCT", 3 );
- return TRUE;
+ return sal_True;
}
}
}
@@ -600,7 +600,7 @@ static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, B
( rFormatExtension.CompareToAscii( "PGM", 3 ) == COMPARE_EQUAL ) ||
( rFormatExtension.CompareToAscii( "PPM", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested=TRUE;
+ bSomethingTested=sal_True;
if ( sFirstBytes[ 0 ] == 'P' )
{
switch( sFirstBytes[ 1 ] )
@@ -608,17 +608,17 @@ static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, B
case '1' :
case '4' :
rFormatExtension = UniString::CreateFromAscii( "PBM", 3 );
- return TRUE;
+ return sal_True;
case '2' :
case '5' :
rFormatExtension = UniString::CreateFromAscii( "PGM", 3 );
- return TRUE;
+ return sal_True;
case '3' :
case '6' :
rFormatExtension = UniString::CreateFromAscii( "PPM", 3 );
- return TRUE;
+ return sal_True;
}
}
}
@@ -626,81 +626,81 @@ static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, B
//--------------------------- RAS( SUN RasterFile )------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "RAS", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested=TRUE;
+ bSomethingTested=sal_True;
if( nFirstLong == 0x59a66a95 )
{
rFormatExtension = UniString::CreateFromAscii( "RAS", 3 );
- return TRUE;
+ return sal_True;
}
}
//--------------------------- XPM ------------------------------------
if( !bTest )
{
- bSomethingTested = TRUE;
- if( ImplSearchEntry( sFirstBytes, (BYTE*)"/* XPM */", 256, 9 ) )
+ bSomethingTested = sal_True;
+ if( ImplSearchEntry( sFirstBytes, (sal_uInt8*)"/* XPM */", 256, 9 ) )
{
rFormatExtension = UniString::CreateFromAscii( "XPM", 3 );
- return TRUE;
+ return sal_True;
}
}
else if( rFormatExtension.CompareToAscii( "XPM", 3 ) == COMPARE_EQUAL )
{
- bSomethingTested = TRUE;
- return TRUE;
+ bSomethingTested = sal_True;
+ return sal_True;
}
//--------------------------- XBM ------------------------------------
if( !bTest )
{
- ULONG nSize = ( nStreamLen > 2048 ) ? 2048 : nStreamLen;
- BYTE* pBuf = new BYTE [ nSize ];
+ sal_uLong nSize = ( nStreamLen > 2048 ) ? 2048 : nStreamLen;
+ sal_uInt8* pBuf = new sal_uInt8 [ nSize ];
rStream.Seek( nStreamPos );
rStream.Read( pBuf, nSize );
- BYTE* pPtr = ImplSearchEntry( pBuf, (BYTE*)"#define", nSize, 7 );
+ sal_uInt8* pPtr = ImplSearchEntry( pBuf, (sal_uInt8*)"#define", nSize, 7 );
if( pPtr )
{
- if( ImplSearchEntry( pPtr, (BYTE*)"_width", pBuf + nSize - pPtr, 6 ) )
+ if( ImplSearchEntry( pPtr, (sal_uInt8*)"_width", pBuf + nSize - pPtr, 6 ) )
{
rFormatExtension = UniString::CreateFromAscii( "XBM", 3 );
delete[] pBuf;
- return TRUE;
+ return sal_True;
}
}
delete[] pBuf;
}
else if( rFormatExtension.CompareToAscii( "XBM", 3 ) == COMPARE_EQUAL )
{
- bSomethingTested = TRUE;
- return TRUE;
+ bSomethingTested = sal_True;
+ return sal_True;
}
//--------------------------- TGA ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "TGA", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested = TRUE;
+ bSomethingTested = sal_True;
if( rFormatExtension.CompareToAscii( "TGA", 3 ) == COMPARE_EQUAL )
- return TRUE;
+ return sal_True;
}
//--------------------------- SGV ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "SGV", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested = TRUE;
+ bSomethingTested = sal_True;
if( rFormatExtension.CompareToAscii( "SGV", 3 ) == COMPARE_EQUAL )
- return TRUE;
+ return sal_True;
}
//--------------------------- SGF ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "SGF", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested=TRUE;
+ bSomethingTested=sal_True;
if( sFirstBytes[ 0 ] == 'J' && sFirstBytes[ 1 ] == 'J' )
{
rFormatExtension = UniString::CreateFromAscii( "SGF", 3 );
- return TRUE;
+ return sal_True;
}
}
@@ -718,7 +718,7 @@ sal_uInt16 GraphicFilter::ImpTestOrFindFormat( const String& rPath, SvStream& rS
if( rFormat == GRFILTER_FORMAT_DONTKNOW )
{
String aFormatExt;
- if( ImpPeekGraphicFormat( rStream, aFormatExt, FALSE ) )
+ if( ImpPeekGraphicFormat( rStream, aFormatExt, sal_False ) )
{
for( sal_uInt16 i = 0; i < n; i++ )
{
@@ -747,7 +747,7 @@ sal_uInt16 GraphicFilter::ImpTestOrFindFormat( const String& rPath, SvStream& rS
else
{
String aTmpStr( pConfig->GetImportFormatExtension( rFormat ) );
- if( !ImpPeekGraphicFormat( rStream, aTmpStr, TRUE ) )
+ if( !ImpPeekGraphicFormat( rStream, aTmpStr, sal_True ) )
return GRFILTER_FORMATERROR;
if ( pConfig->GetImportFormatExtension( rFormat ).EqualsIgnoreCaseAscii( "pcd" ) )
{
@@ -1079,7 +1079,7 @@ void GraphicFilter::ImplInit()
// ------------------------------------------------------------------------
-ULONG GraphicFilter::ImplSetError( ULONG nError, const SvStream* pStm )
+sal_uLong GraphicFilter::ImplSetError( sal_uLong nError, const SvStream* pStm )
{
pErrorEx->nFilterError = nError;
pErrorEx->nStreamError = pStm ? pStm->GetError() : ERRCODE_NONE;
@@ -1087,28 +1087,28 @@ ULONG GraphicFilter::ImplSetError( ULONG nError, const SvStream* pStm )
}
// ------------------------------------------------------------------------
-USHORT GraphicFilter::GetImportFormatCount()
+sal_uInt16 GraphicFilter::GetImportFormatCount()
{
return pConfig->GetImportFormatCount();
}
// ------------------------------------------------------------------------
-USHORT GraphicFilter::GetImportFormatNumber( const String& rFormatName )
+sal_uInt16 GraphicFilter::GetImportFormatNumber( const String& rFormatName )
{
return pConfig->GetImportFormatNumber( rFormatName );
}
// ------------------------------------------------------------------------
-USHORT GraphicFilter::GetImportFormatNumberForMediaType( const String& rMediaType )
+sal_uInt16 GraphicFilter::GetImportFormatNumberForMediaType( const String& rMediaType )
{
return pConfig->GetImportFormatNumberForMediaType( rMediaType );
}
// ------------------------------------------------------------------------
-USHORT GraphicFilter::GetImportFormatNumberForShortName( const String& rShortName )
+sal_uInt16 GraphicFilter::GetImportFormatNumberForShortName( const String& rShortName )
{
return pConfig->GetImportFormatNumberForShortName( rShortName );
}
@@ -1122,35 +1122,35 @@ sal_uInt16 GraphicFilter::GetImportFormatNumberForTypeName( const String& rType
// ------------------------------------------------------------------------
-String GraphicFilter::GetImportFormatName( USHORT nFormat )
+String GraphicFilter::GetImportFormatName( sal_uInt16 nFormat )
{
return pConfig->GetImportFormatName( nFormat );
}
// ------------------------------------------------------------------------
-String GraphicFilter::GetImportFormatTypeName( USHORT nFormat )
+String GraphicFilter::GetImportFormatTypeName( sal_uInt16 nFormat )
{
return pConfig->GetImportFilterTypeName( nFormat );
}
// ------------------------------------------------------------------------
-String GraphicFilter::GetImportFormatMediaType( USHORT nFormat )
+String GraphicFilter::GetImportFormatMediaType( sal_uInt16 nFormat )
{
return pConfig->GetImportFormatMediaType( nFormat );
}
// ------------------------------------------------------------------------
-String GraphicFilter::GetImportFormatShortName( USHORT nFormat )
+String GraphicFilter::GetImportFormatShortName( sal_uInt16 nFormat )
{
return pConfig->GetImportFormatShortName( nFormat );
}
// ------------------------------------------------------------------------
-String GraphicFilter::GetImportOSFileType( USHORT )
+String GraphicFilter::GetImportOSFileType( sal_uInt16 )
{
String aOSFileType;
return aOSFileType;
@@ -1158,42 +1158,42 @@ String GraphicFilter::GetImportOSFileType( USHORT )
// ------------------------------------------------------------------------
-String GraphicFilter::GetImportWildcard( USHORT nFormat, sal_Int32 nEntry )
+String GraphicFilter::GetImportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry )
{
return pConfig->GetImportWildcard( nFormat, nEntry );
}
// ------------------------------------------------------------------------
-BOOL GraphicFilter::IsImportPixelFormat( USHORT nFormat )
+sal_Bool GraphicFilter::IsImportPixelFormat( sal_uInt16 nFormat )
{
return pConfig->IsImportPixelFormat( nFormat );
}
// ------------------------------------------------------------------------
-USHORT GraphicFilter::GetExportFormatCount()
+sal_uInt16 GraphicFilter::GetExportFormatCount()
{
return pConfig->GetExportFormatCount();
}
// ------------------------------------------------------------------------
-USHORT GraphicFilter::GetExportFormatNumber( const String& rFormatName )
+sal_uInt16 GraphicFilter::GetExportFormatNumber( const String& rFormatName )
{
return pConfig->GetExportFormatNumber( rFormatName );
}
// ------------------------------------------------------------------------
-USHORT GraphicFilter::GetExportFormatNumberForMediaType( const String& rMediaType )
+sal_uInt16 GraphicFilter::GetExportFormatNumberForMediaType( const String& rMediaType )
{
return pConfig->GetExportFormatNumberForMediaType( rMediaType );
}
// ------------------------------------------------------------------------
-USHORT GraphicFilter::GetExportFormatNumberForShortName( const String& rShortName )
+sal_uInt16 GraphicFilter::GetExportFormatNumberForShortName( const String& rShortName )
{
return pConfig->GetExportFormatNumberForShortName( rShortName );
}
@@ -1207,35 +1207,35 @@ sal_uInt16 GraphicFilter::GetExportFormatNumberForTypeName( const String& rType
// ------------------------------------------------------------------------
-String GraphicFilter::GetExportFormatName( USHORT nFormat )
+String GraphicFilter::GetExportFormatName( sal_uInt16 nFormat )
{
return pConfig->GetExportFormatName( nFormat );
}
// ------------------------------------------------------------------------
-String GraphicFilter::GetExportFormatTypeName( USHORT nFormat )
+String GraphicFilter::GetExportFormatTypeName( sal_uInt16 nFormat )
{
return pConfig->GetExportFilterTypeName( nFormat );
}
// ------------------------------------------------------------------------
-String GraphicFilter::GetExportFormatMediaType( USHORT nFormat )
+String GraphicFilter::GetExportFormatMediaType( sal_uInt16 nFormat )
{
return pConfig->GetExportFormatMediaType( nFormat );
}
// ------------------------------------------------------------------------
-String GraphicFilter::GetExportFormatShortName( USHORT nFormat )
+String GraphicFilter::GetExportFormatShortName( sal_uInt16 nFormat )
{
return pConfig->GetExportFormatShortName( nFormat );
}
// ------------------------------------------------------------------------
-String GraphicFilter::GetExportOSFileType( USHORT )
+String GraphicFilter::GetExportOSFileType( sal_uInt16 )
{
String aOSFileType;
return aOSFileType;
@@ -1243,22 +1243,22 @@ String GraphicFilter::GetExportOSFileType( USHORT )
// ------------------------------------------------------------------------
-String GraphicFilter::GetExportWildcard( USHORT nFormat, sal_Int32 nEntry )
+String GraphicFilter::GetExportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry )
{
return pConfig->GetExportWildcard( nFormat, nEntry );
}
// ------------------------------------------------------------------------
-BOOL GraphicFilter::IsExportPixelFormat( USHORT nFormat )
+sal_Bool GraphicFilter::IsExportPixelFormat( sal_uInt16 nFormat )
{
return pConfig->IsExportPixelFormat( nFormat );
}
// ------------------------------------------------------------------------
-USHORT GraphicFilter::CanImportGraphic( const INetURLObject& rPath,
- USHORT nFormat, USHORT* pDeterminedFormat )
+sal_uInt16 GraphicFilter::CanImportGraphic( const INetURLObject& rPath,
+ sal_uInt16 nFormat, sal_uInt16* pDeterminedFormat )
{
sal_uInt16 nRetValue = GRFILTER_FORMATERROR;
DBG_ASSERT( rPath.GetProtocol() != INET_PROT_NOT_VALID, "GraphicFilter::CanImportGraphic() : ProtType == INET_PROT_NOT_VALID" );
@@ -1275,10 +1275,10 @@ USHORT GraphicFilter::CanImportGraphic( const INetURLObject& rPath,
// ------------------------------------------------------------------------
-USHORT GraphicFilter::CanImportGraphic( const String& rMainUrl, SvStream& rIStream,
- USHORT nFormat, USHORT* pDeterminedFormat )
+sal_uInt16 GraphicFilter::CanImportGraphic( const String& rMainUrl, SvStream& rIStream,
+ sal_uInt16 nFormat, sal_uInt16* pDeterminedFormat )
{
- ULONG nStreamPos = rIStream.Tell();
+ sal_uLong nStreamPos = rIStream.Tell();
sal_uInt16 nRes = ImpTestOrFindFormat( rMainUrl, rIStream, nFormat );
rIStream.Seek(nStreamPos);
@@ -1286,13 +1286,13 @@ USHORT GraphicFilter::CanImportGraphic( const String& rMainUrl, SvStream& rIStre
if( nRes==GRFILTER_OK && pDeterminedFormat!=NULL )
*pDeterminedFormat = nFormat;
- return (USHORT) ImplSetError( nRes, &rIStream );
+ return (sal_uInt16) ImplSetError( nRes, &rIStream );
}
// ------------------------------------------------------------------------
//SJ: TODO, we need to create a GraphicImporter component
-USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const INetURLObject& rPath,
- USHORT nFormat, USHORT * pDeterminedFormat, sal_uInt32 nImportFlags )
+sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const INetURLObject& rPath,
+ sal_uInt16 nFormat, sal_uInt16 * pDeterminedFormat, sal_uInt32 nImportFlags )
{
sal_uInt16 nRetValue = GRFILTER_FORMATERROR;
DBG_ASSERT( rPath.GetProtocol() != INET_PROT_NOT_VALID, "GraphicFilter::ImportGraphic() : ProtType == INET_PROT_NOT_VALID" );
@@ -1307,25 +1307,25 @@ USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const INetURLObject& rPa
return nRetValue;
}
-USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, SvStream& rIStream,
- USHORT nFormat, USHORT* pDeterminedFormat, sal_uInt32 nImportFlags )
+sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, SvStream& rIStream,
+ sal_uInt16 nFormat, sal_uInt16* pDeterminedFormat, sal_uInt32 nImportFlags )
{
return ImportGraphic( rGraphic, rPath, rIStream, nFormat, pDeterminedFormat, nImportFlags, NULL );
}
//-------------------------------------------------------------------------
-USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, SvStream& rIStream,
- USHORT nFormat, USHORT* pDeterminedFormat, sal_uInt32 nImportFlags,
+sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, SvStream& rIStream,
+ sal_uInt16 nFormat, sal_uInt16* pDeterminedFormat, sal_uInt32 nImportFlags,
com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >* pFilterData )
{
String aFilterName;
- ULONG nStmBegin;
- USHORT nStatus;
+ sal_uLong nStmBegin;
+ sal_uInt16 nStatus;
GraphicReader* pContext = rGraphic.GetContext();
GfxLinkType eLinkType = GFX_LINK_TYPE_NONE;
- BOOL bDummyContext = ( pContext == (GraphicReader*) 1 );
- const BOOL bLinkSet = rGraphic.IsLink();
+ sal_Bool bDummyContext = ( pContext == (GraphicReader*) 1 );
+ const sal_Bool bLinkSet = rGraphic.IsLink();
FilterConfigItem* pFilterConfigItem = NULL;
Size aPreviewSizeHint( 0, 0 );
@@ -1376,7 +1376,7 @@ USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, SvS
else
nStmBegin = rIStream.Tell();
- bAbort = FALSE;
+ bAbort = sal_False;
nStatus = ImpTestOrFindFormat( rPath, rIStream, nFormat );
// Falls Pending, geben wir GRFILTER_OK zurueck,
// um mehr Bytes anzufordern
@@ -1385,13 +1385,13 @@ USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, SvS
rGraphic.SetContext( (GraphicReader*) 1 );
rIStream.ResetError();
rIStream.Seek( nStmBegin );
- return (USHORT) ImplSetError( GRFILTER_OK );
+ return (sal_uInt16) ImplSetError( GRFILTER_OK );
}
rIStream.Seek( nStmBegin );
if( ( nStatus != GRFILTER_OK ) || rIStream.GetError() )
- return (USHORT) ImplSetError( ( nStatus != GRFILTER_OK ) ? nStatus : GRFILTER_OPENERROR, &rIStream );
+ return (sal_uInt16) ImplSetError( ( nStatus != GRFILTER_OK ) ? nStatus : GRFILTER_OPENERROR, &rIStream );
if( pDeterminedFormat )
*pDeterminedFormat = nFormat;
@@ -1525,7 +1525,7 @@ USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, SvS
else if( aFilterName.EqualsIgnoreCaseAscii( IMP_SVSGF )
|| aFilterName.EqualsIgnoreCaseAscii( IMP_SVSGV ) )
{
- USHORT nVersion;
+ sal_uInt16 nVersion;
unsigned char nTyp = CheckSgfTyp( rIStream, nVersion );
switch( nTyp )
@@ -1637,15 +1637,15 @@ USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, SvS
if( nStatus == GRFILTER_OK && bCreateNativeLink && ( eLinkType != GFX_LINK_TYPE_NONE ) && !rGraphic.GetContext() && !bLinkSet )
{
- const ULONG nStmEnd = rIStream.Tell();
- const ULONG nBufSize = nStmEnd - nStmBegin;
+ const sal_uLong nStmEnd = rIStream.Tell();
+ const sal_uLong nBufSize = nStmEnd - nStmBegin;
if( nBufSize )
{
- BYTE* pBuf=0;
+ sal_uInt8* pBuf=0;
try
{
- pBuf = new BYTE[ nBufSize ];
+ pBuf = new sal_uInt8[ nBufSize ];
}
catch (std::bad_alloc)
{
@@ -1656,7 +1656,7 @@ USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, SvS
{
rIStream.Seek( nStmBegin );
rIStream.Read( pBuf, nBufSize );
- rGraphic.SetLink( GfxLink( pBuf, nBufSize, eLinkType, TRUE ) );
+ rGraphic.SetLink( GfxLink( pBuf, nBufSize, eLinkType, sal_True ) );
}
}
}
@@ -1679,12 +1679,12 @@ USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, SvS
// ------------------------------------------------------------------------
-USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const INetURLObject& rPath,
+sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const INetURLObject& rPath,
sal_uInt16 nFormat, const uno::Sequence< beans::PropertyValue >* pFilterData )
{
sal_uInt16 nRetValue = GRFILTER_FORMATERROR;
DBG_ASSERT( rPath.GetProtocol() != INET_PROT_NOT_VALID, "GraphicFilter::ExportGraphic() : ProtType == INET_PROT_NOT_VALID" );
- BOOL bAlreadyExists = ImplDirEntryHelper::Exists( rPath );
+ sal_Bool bAlreadyExists = ImplDirEntryHelper::Exists( rPath );
String aMainUrl( rPath.GetMainURL( INetURLObject::NO_DECODE ) );
SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( aMainUrl, STREAM_WRITE | STREAM_TRUNC );
@@ -1701,10 +1701,10 @@ USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const INetURLObjec
// ------------------------------------------------------------------------
-USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPath,
+sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPath,
SvStream& rOStm, sal_uInt16 nFormat, const uno::Sequence< beans::PropertyValue >* pFilterData )
{
- USHORT nFormatCount = GetExportFormatCount();
+ sal_uInt16 nFormatCount = GetExportFormatCount();
ResetLastError();
nExpGraphHint = 0;
@@ -1715,7 +1715,7 @@ USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPat
String aExt( aURL.GetFileExtension().toAsciiUpperCase() );
- for( USHORT i = 0; i < nFormatCount; i++ )
+ for( sal_uInt16 i = 0; i < nFormatCount; i++ )
{
if ( pConfig->GetExportFormatExtension( i ).EqualsIgnoreCaseAscii( aExt ) )
{
@@ -1725,13 +1725,13 @@ USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPat
}
}
if( nFormat >= nFormatCount )
- return (USHORT) ImplSetError( GRFILTER_FORMATERROR );
+ return (sal_uInt16) ImplSetError( GRFILTER_FORMATERROR );
FilterConfigItem aConfigItem( (uno::Sequence< beans::PropertyValue >*)pFilterData );
String aFilterName( pConfig->GetExportFilterName( nFormat ) );
- bAbort = FALSE;
- USHORT nStatus = GRFILTER_OK;
+ bAbort = sal_False;
+ sal_uInt16 nStatus = GRFILTER_OK;
GraphicType eType;
Graphic aGraphic( rGraphic );
@@ -1743,12 +1743,12 @@ USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPat
if( eType != GRAPHIC_BITMAP )
{
Size aSizePixel;
- ULONG nColorCount,nBitsPerPixel,nNeededMem,nMaxMem;
+ sal_uLong nColorCount,nBitsPerPixel,nNeededMem,nMaxMem;
VirtualDevice aVirDev;
// Maximalen Speicherbedarf fuer das Bildes holen:
// if( GetOptionsConfig() )
-// nMaxMem = (UINT32)GetOptionsConfig()->ReadKey( "VEC-TO-PIX-MAX-KB", "1024" ).ToInt32();
+// nMaxMem = (sal_uInt32)GetOptionsConfig()->ReadKey( "VEC-TO-PIX-MAX-KB", "1024" ).ToInt32();
// else
nMaxMem = 1024;
@@ -1765,14 +1765,14 @@ USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPat
else if (nColorCount<=256) nBitsPerPixel=8;
else if (nColorCount<=65536) nBitsPerPixel=16;
else nBitsPerPixel=24;
- nNeededMem=((ULONG)aSizePixel.Width()*(ULONG)aSizePixel.Height()*nBitsPerPixel+7)/8;
+ nNeededMem=((sal_uLong)aSizePixel.Width()*(sal_uLong)aSizePixel.Height()*nBitsPerPixel+7)/8;
// ggf. Groesse des Bildes einschraenken:
if (nMaxMem<nNeededMem)
{
double fFak=sqrt(((double)nMaxMem)/((double)nNeededMem));
- aSizePixel.Width()=(ULONG)(((double)aSizePixel.Width())*fFak);
- aSizePixel.Height()=(ULONG)(((double)aSizePixel.Height())*fFak);
+ aSizePixel.Width()=(sal_uLong)(((double)aSizePixel.Width())*fFak);
+ aSizePixel.Height()=(sal_uLong)(((double)aSizePixel.Height())*fFak);
}
aVirDev.SetMapMode(MapMode(MAP_PIXEL));
@@ -1793,7 +1793,7 @@ USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPat
{
Bitmap aBmp( aGraphic.GetBitmap() );
sal_Int32 nColorRes = aConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Colors" ) ), 0 );
- if ( nColorRes && ( nColorRes <= (USHORT)BMP_CONVERSION_24BIT) )
+ if ( nColorRes && ( nColorRes <= (sal_uInt16)BMP_CONVERSION_24BIT) )
{
if( !aBmp.Convert( (BmpConversion) nColorRes ) )
aBmp = aGraphic.GetBitmap();
@@ -2019,16 +2019,16 @@ USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPat
// ------------------------------------------------------------------------
-BOOL GraphicFilter::Setup( USHORT )
+sal_Bool GraphicFilter::Setup( sal_uInt16 )
{
- return FALSE;
+ return sal_False;
}
/* ------------------------------------------------------------------------
No Import filter has a dialog, so
the following two methods are obsolete */
-BOOL GraphicFilter::HasImportDialog( USHORT )
+sal_Bool GraphicFilter::HasImportDialog( sal_uInt16 )
{
return sal_True;
// return pConfig->IsImportDialog( nFormat );
@@ -2036,26 +2036,26 @@ BOOL GraphicFilter::HasImportDialog( USHORT )
// ------------------------------------------------------------------------
-BOOL GraphicFilter::DoImportDialog( Window*, USHORT )
+sal_Bool GraphicFilter::DoImportDialog( Window*, sal_uInt16 )
{
return sal_True;
}
// ------------------------------------------------------------------------
-BOOL GraphicFilter::HasExportDialog( USHORT nFormat )
+sal_Bool GraphicFilter::HasExportDialog( sal_uInt16 nFormat )
{
return pConfig->IsExportDialog( nFormat );
}
// ------------------------------------------------------------------------
-BOOL GraphicFilter::DoExportDialog( Window* pWindow, USHORT nFormat )
+sal_Bool GraphicFilter::DoExportDialog( Window* pWindow, sal_uInt16 nFormat )
{
return DoExportDialog( pWindow, nFormat, FUNIT_MM );
}
-BOOL GraphicFilter::DoExportDialog( Window*, USHORT nFormat, FieldUnit )
+sal_Bool GraphicFilter::DoExportDialog( Window*, sal_uInt16 nFormat, FieldUnit )
{
sal_Bool bRet = sal_False;
com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >
@@ -2113,7 +2113,7 @@ IMPL_LINK( GraphicFilter, FilterCallback, ConvertData*, pData )
if( pData )
{
- USHORT nFormat = GRFILTER_FORMAT_DONTKNOW;
+ sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW;
ByteString aShortName;
switch( pData->mnFormat )
{
@@ -2161,12 +2161,12 @@ GraphicFilter* GraphicFilter::GetGraphicFilter()
int GraphicFilter::LoadGraphic( const String &rPath, const String &rFilterName,
Graphic& rGraphic, GraphicFilter* pFilter,
- USHORT* pDeterminedFormat )
+ sal_uInt16* pDeterminedFormat )
{
if ( !pFilter )
pFilter = GetGraphicFilter();
- const USHORT nFilter = rFilterName.Len() && pFilter->GetImportFormatCount()
+ const sal_uInt16 nFilter = rFilterName.Len() && pFilter->GetImportFormatCount()
? pFilter->GetImportFormatNumber( rFilterName )
: GRFILTER_FORMAT_DONTKNOW;
diff --git a/svtools/source/filter.vcl/filter/filter2.cxx b/svtools/source/filter.vcl/filter/filter2.cxx
index d91ec1a19772..9b655c732036 100644
--- a/svtools/source/filter.vcl/filter/filter2.cxx
+++ b/svtools/source/filter.vcl/filter/filter2.cxx
@@ -40,7 +40,7 @@
#define DATA_SIZE 640
-BYTE* ImplSearchEntry( BYTE* , BYTE* , ULONG , ULONG );
+sal_uInt8* ImplSearchEntry( sal_uInt8* , sal_uInt8* , sal_uLong , sal_uLong );
/*************************************************************************
|*
@@ -51,7 +51,7 @@ BYTE* ImplSearchEntry( BYTE* , BYTE* , ULONG , ULONG );
GraphicDescriptor::GraphicDescriptor( const INetURLObject& rPath ) :
pFileStm( ::utl::UcbStreamHelper::CreateStream( rPath.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ ) ),
aPathExt( rPath.GetFileExtension().toAsciiLowerCase() ),
- bOwnStream( TRUE )
+ bOwnStream( sal_True )
{
ImpConstruct();
}
@@ -64,7 +64,7 @@ GraphicDescriptor::GraphicDescriptor( const INetURLObject& rPath ) :
GraphicDescriptor::GraphicDescriptor( SvStream& rInStream, const String* pPath) :
pFileStm ( &rInStream ),
- bOwnStream ( FALSE )
+ bOwnStream ( sal_False )
{
ImpConstruct();
@@ -93,38 +93,38 @@ GraphicDescriptor::~GraphicDescriptor()
|*
\************************************************************************/
-BOOL GraphicDescriptor::Detect( BOOL bExtendedInfo )
+sal_Bool GraphicDescriptor::Detect( sal_Bool bExtendedInfo )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( pFileStm && !pFileStm->GetError() )
{
SvStream& rStm = *pFileStm;
- UINT16 nOldFormat = rStm.GetNumberFormatInt();
-
- if ( ImpDetectGIF( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectJPG( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectBMP( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectPNG( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectTIF( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectPCX( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectDXF( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectMET( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectSGF( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectSGV( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectSVM( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectWMF( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectEMF( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectPCT( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectXBM( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectXPM( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectPBM( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectPGM( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectPPM( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectRAS( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectTGA( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectPSD( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectEPS( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectPCD( rStm, bExtendedInfo ) ) bRet = TRUE;
+ sal_uInt16 nOldFormat = rStm.GetNumberFormatInt();
+
+ if ( ImpDetectGIF( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectJPG( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectBMP( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectPNG( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectTIF( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectPCX( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectDXF( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectMET( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectSGF( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectSGV( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectSVM( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectWMF( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectEMF( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectPCT( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectXBM( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectXPM( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectPBM( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectPGM( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectPPM( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectRAS( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectTGA( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectPSD( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectEPS( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectPCD( rStm, bExtendedInfo ) ) bRet = sal_True;
rStm.SetNumberFormatInt( nOldFormat );
}
@@ -142,7 +142,7 @@ void GraphicDescriptor::ImpConstruct()
nFormat = GFF_NOT;
nBitsPerPixel = 0;
nPlanes = 0;
- bCompressed = FALSE;
+ bCompressed = sal_False;
}
@@ -152,10 +152,10 @@ void GraphicDescriptor::ImpConstruct()
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectBMP( SvStream& rStm, BOOL bExtendedInfo )
+sal_Bool GraphicDescriptor::ImpDetectBMP( SvStream& rStm, sal_Bool bExtendedInfo )
{
- UINT16 nTemp16;
- BOOL bRet = FALSE;
+ sal_uInt16 nTemp16;
+ sal_Bool bRet = sal_False;
sal_Int32 nStmPos = rStm.Tell();
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -172,12 +172,12 @@ BOOL GraphicDescriptor::ImpDetectBMP( SvStream& rStm, BOOL bExtendedInfo )
if ( nTemp16 == 0x4d42 )
{
nFormat = GFF_BMP;
- bRet = TRUE;
+ bRet = sal_True;
if ( bExtendedInfo )
{
- UINT32 nTemp32;
- UINT32 nCompression;
+ sal_uInt32 nTemp32;
+ sal_uInt32 nCompression;
// bis zur ersten Information
rStm.SeekRel( 0x10 );
@@ -218,7 +218,7 @@ BOOL GraphicDescriptor::ImpDetectBMP( SvStream& rStm, BOOL bExtendedInfo )
if ( ( nBitsPerPixel > 24 ) || ( nCompression > 3 ) )
{
nFormat = GFF_NOT;
- bRet = FALSE;
+ bRet = sal_False;
}
}
}
@@ -233,12 +233,12 @@ BOOL GraphicDescriptor::ImpDetectBMP( SvStream& rStm, BOOL bExtendedInfo )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectGIF( SvStream& rStm, BOOL bExtendedInfo )
+sal_Bool GraphicDescriptor::ImpDetectGIF( SvStream& rStm, sal_Bool bExtendedInfo )
{
- UINT32 n32;
- UINT16 n16;
- BOOL bRet = FALSE;
- BYTE cByte;
+ sal_uInt32 n32;
+ sal_uInt16 n16;
+ sal_Bool bRet = sal_False;
+ sal_uInt8 cByte;
sal_Int32 nStmPos = rStm.Tell();
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -250,11 +250,11 @@ BOOL GraphicDescriptor::ImpDetectGIF( SvStream& rStm, BOOL bExtendedInfo )
if ( ( n16 == 0x6137 ) || ( n16 == 0x6139 ) )
{
nFormat = GFF_GIF;
- bRet = TRUE;
+ bRet = sal_True;
if ( bExtendedInfo )
{
- UINT16 nTemp16;
+ sal_uInt16 nTemp16;
// PixelBreite auslesen
rStm >> nTemp16;
@@ -307,10 +307,10 @@ sal_uInt8 ImpDetectJPG_GetNextMarker( SvStream& rStm )
return nByte;
}
-BOOL GraphicDescriptor::ImpDetectJPG( SvStream& rStm, BOOL bExtendedInfo )
+sal_Bool GraphicDescriptor::ImpDetectJPG( SvStream& rStm, sal_Bool bExtendedInfo )
{
- UINT32 nTemp32;
- BOOL bRet = FALSE;
+ sal_uInt32 nTemp32;
+ sal_Bool bRet = sal_False;
sal_Int32 nStmPos = rStm.Tell();
@@ -321,7 +321,7 @@ BOOL GraphicDescriptor::ImpDetectJPG( SvStream& rStm, BOOL bExtendedInfo )
if( 0xffd8ff00 == ( nTemp32 & 0xffffff00 ) )
{
nFormat = GFF_JPG;
- bRet = TRUE;
+ bRet = sal_True;
if ( bExtendedInfo )
{
@@ -473,16 +473,16 @@ BOOL GraphicDescriptor::ImpDetectJPG( SvStream& rStm, BOOL bExtendedInfo )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectPCD( SvStream& rStm, BOOL )
+sal_Bool GraphicDescriptor::ImpDetectPCD( SvStream& rStm, sal_Bool )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
sal_Int32 nStmPos = rStm.Tell();
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
- UINT32 nTemp32;
- UINT16 nTemp16;
- BYTE cByte;
+ sal_uInt32 nTemp32;
+ sal_uInt16 nTemp16;
+ sal_uInt8 cByte;
rStm.SeekRel( 2048 );
rStm >> nTemp32;
@@ -494,7 +494,7 @@ BOOL GraphicDescriptor::ImpDetectPCD( SvStream& rStm, BOOL )
( cByte == 0x49 ) )
{
nFormat = GFF_PCD;
- bRet = TRUE;
+ bRet = sal_True;
}
rStm.Seek( nStmPos );
return bRet;
@@ -507,16 +507,16 @@ BOOL GraphicDescriptor::ImpDetectPCD( SvStream& rStm, BOOL )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectPCX( SvStream& rStm, BOOL bExtendedInfo )
+sal_Bool GraphicDescriptor::ImpDetectPCX( SvStream& rStm, sal_Bool bExtendedInfo )
{
// ! Because 0x0a can be interpreted as LF too ...
// we cant be shure that this special sign represent a PCX file only.
// Every Ascii file is possible here :-(
// We must detect the whole header.
- bExtendedInfo = TRUE;
+ bExtendedInfo = sal_True;
- BOOL bRet = FALSE;
- BYTE cByte;
+ sal_Bool bRet = sal_False;
+ sal_uInt8 cByte;
sal_Int32 nStmPos = rStm.Tell();
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -525,17 +525,17 @@ BOOL GraphicDescriptor::ImpDetectPCX( SvStream& rStm, BOOL bExtendedInfo )
if ( cByte == 0x0a )
{
nFormat = GFF_PCX;
- bRet = TRUE;
+ bRet = sal_True;
if ( bExtendedInfo )
{
- UINT16 nTemp16;
- USHORT nXmin;
- USHORT nXmax;
- USHORT nYmin;
- USHORT nYmax;
- USHORT nDPIx;
- USHORT nDPIy;
+ sal_uInt16 nTemp16;
+ sal_uInt16 nXmin;
+ sal_uInt16 nXmax;
+ sal_uInt16 nYmin;
+ sal_uInt16 nYmax;
+ sal_uInt16 nDPIx;
+ sal_uInt16 nDPIy;
rStm.SeekRel( 1 );
@@ -596,10 +596,10 @@ BOOL GraphicDescriptor::ImpDetectPCX( SvStream& rStm, BOOL bExtendedInfo )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectPNG( SvStream& rStm, BOOL bExtendedInfo )
+sal_Bool GraphicDescriptor::ImpDetectPNG( SvStream& rStm, sal_Bool bExtendedInfo )
{
- UINT32 nTemp32;
- BOOL bRet = FALSE;
+ sal_uInt32 nTemp32;
+ sal_Bool bRet = sal_False;
sal_Int32 nStmPos = rStm.Tell();
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
@@ -611,11 +611,11 @@ BOOL GraphicDescriptor::ImpDetectPNG( SvStream& rStm, BOOL bExtendedInfo )
if ( nTemp32 == 0x0d0a1a0a )
{
nFormat = GFF_PNG;
- bRet = TRUE;
+ bRet = sal_True;
if ( bExtendedInfo )
{
- BYTE cByte;
+ sal_uInt8 cByte;
// IHDR-Chunk
rStm.SeekRel( 8 );
@@ -635,9 +635,9 @@ BOOL GraphicDescriptor::ImpDetectPNG( SvStream& rStm, BOOL bExtendedInfo )
// Planes immer 1;
// Kompression immer
nPlanes = 1;
- bCompressed = TRUE;
+ bCompressed = sal_True;
- UINT32 nLen32;
+ sal_uInt32 nLen32;
rStm.SeekRel( 8 );
@@ -654,8 +654,8 @@ BOOL GraphicDescriptor::ImpDetectPNG( SvStream& rStm, BOOL bExtendedInfo )
if ( nTemp32 == 0x70485973 )
{
- ULONG nXRes;
- ULONG nYRes;
+ sal_uLong nXRes;
+ sal_uLong nYRes;
// horizontale Aufloesung
rStm >> nTemp32;
@@ -693,12 +693,12 @@ BOOL GraphicDescriptor::ImpDetectPNG( SvStream& rStm, BOOL bExtendedInfo )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectTIF( SvStream& rStm, BOOL bExtendedInfo )
+sal_Bool GraphicDescriptor::ImpDetectTIF( SvStream& rStm, sal_Bool bExtendedInfo )
{
- BOOL bDetectOk = FALSE;
- BOOL bRet = FALSE;
- BYTE cByte1;
- BYTE cByte2;
+ sal_Bool bDetectOk = sal_False;
+ sal_Bool bRet = sal_False;
+ sal_uInt8 cByte1;
+ sal_uInt8 cByte2;
sal_Int32 nStmPos = rStm.Tell();
rStm >> cByte1;
@@ -708,30 +708,30 @@ BOOL GraphicDescriptor::ImpDetectTIF( SvStream& rStm, BOOL bExtendedInfo )
if ( cByte1 == 0x49 )
{
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
- bDetectOk = TRUE;
+ bDetectOk = sal_True;
}
else if ( cByte1 == 0x4d )
{
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
- bDetectOk = TRUE;
+ bDetectOk = sal_True;
}
if ( bDetectOk )
{
- UINT16 nTemp16;
+ sal_uInt16 nTemp16;
rStm >> nTemp16;
if ( nTemp16 == 0x2a )
{
nFormat = GFF_TIF;
- bRet = TRUE;
+ bRet = sal_True;
if ( bExtendedInfo )
{
- ULONG nCount;
- ULONG nMax = DATA_SIZE - 48;
- UINT32 nTemp32;
- BOOL bOk = FALSE;
+ sal_uLong nCount;
+ sal_uLong nMax = DATA_SIZE - 48;
+ sal_uInt32 nTemp32;
+ sal_Bool bOk = sal_False;
// Offset des ersten IFD einlesen
rStm >> nTemp32;
@@ -831,9 +831,9 @@ BOOL GraphicDescriptor::ImpDetectTIF( SvStream& rStm, BOOL bExtendedInfo )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectXBM( SvStream&, BOOL )
+sal_Bool GraphicDescriptor::ImpDetectXBM( SvStream&, sal_Bool )
{
- BOOL bRet = aPathExt.CompareToAscii( "xbm", 3 ) == COMPARE_EQUAL;
+ sal_Bool bRet = aPathExt.CompareToAscii( "xbm", 3 ) == COMPARE_EQUAL;
if (bRet)
nFormat = GFF_XBM;
@@ -847,9 +847,9 @@ BOOL GraphicDescriptor::ImpDetectXBM( SvStream&, BOOL )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectXPM( SvStream&, BOOL )
+sal_Bool GraphicDescriptor::ImpDetectXPM( SvStream&, sal_Bool )
{
- BOOL bRet = aPathExt.CompareToAscii( "xpm", 3 ) == COMPARE_EQUAL;
+ sal_Bool bRet = aPathExt.CompareToAscii( "xpm", 3 ) == COMPARE_EQUAL;
if (bRet)
nFormat = GFF_XPM;
@@ -862,22 +862,22 @@ BOOL GraphicDescriptor::ImpDetectXPM( SvStream&, BOOL )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectPBM( SvStream& rStm, BOOL )
+sal_Bool GraphicDescriptor::ImpDetectPBM( SvStream& rStm, sal_Bool )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
// erst auf Datei Extension pruefen, da diese aussagekraeftiger ist
// als die 2 ID Bytes
if ( aPathExt.CompareToAscii( "pbm", 3 ) == COMPARE_EQUAL )
- bRet = TRUE;
+ bRet = sal_True;
else
{
sal_Int32 nStmPos = rStm.Tell();
- BYTE nFirst, nSecond;
+ sal_uInt8 nFirst, nSecond;
rStm >> nFirst >> nSecond;
if ( nFirst == 'P' && ( ( nSecond == '1' ) || ( nSecond == '4' ) ) )
- bRet = TRUE;
+ bRet = sal_True;
rStm.Seek( nStmPos );
}
@@ -893,19 +893,19 @@ BOOL GraphicDescriptor::ImpDetectPBM( SvStream& rStm, BOOL )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectPGM( SvStream& rStm, BOOL )
+sal_Bool GraphicDescriptor::ImpDetectPGM( SvStream& rStm, sal_Bool )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( aPathExt.CompareToAscii( "pgm", 3 ) == COMPARE_EQUAL )
- bRet = TRUE;
+ bRet = sal_True;
else
{
- BYTE nFirst, nSecond;
+ sal_uInt8 nFirst, nSecond;
sal_Int32 nStmPos = rStm.Tell();
rStm >> nFirst >> nSecond;
if ( nFirst == 'P' && ( ( nSecond == '2' ) || ( nSecond == '5' ) ) )
- bRet = TRUE;
+ bRet = sal_True;
rStm.Seek( nStmPos );
}
@@ -921,19 +921,19 @@ BOOL GraphicDescriptor::ImpDetectPGM( SvStream& rStm, BOOL )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectPPM( SvStream& rStm, BOOL )
+sal_Bool GraphicDescriptor::ImpDetectPPM( SvStream& rStm, sal_Bool )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( aPathExt.CompareToAscii( "ppm", 3 ) == COMPARE_EQUAL )
- bRet = TRUE;
+ bRet = sal_True;
else
{
- BYTE nFirst, nSecond;
+ sal_uInt8 nFirst, nSecond;
sal_Int32 nStmPos = rStm.Tell();
rStm >> nFirst >> nSecond;
if ( nFirst == 'P' && ( ( nSecond == '3' ) || ( nSecond == '6' ) ) )
- bRet = TRUE;
+ bRet = sal_True;
rStm.Seek( nStmPos );
}
@@ -949,17 +949,17 @@ BOOL GraphicDescriptor::ImpDetectPPM( SvStream& rStm, BOOL )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectRAS( SvStream& rStm, BOOL )
+sal_Bool GraphicDescriptor::ImpDetectRAS( SvStream& rStm, sal_Bool )
{
- UINT32 nMagicNumber;
- BOOL bRet = FALSE;
+ sal_uInt32 nMagicNumber;
+ sal_Bool bRet = sal_False;
sal_Int32 nStmPos = rStm.Tell();
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
rStm >> nMagicNumber;
if ( nMagicNumber == 0x59a66a95 )
{
nFormat = GFF_RAS;
- bRet = TRUE;
+ bRet = sal_True;
}
rStm.Seek( nStmPos );
return bRet;
@@ -971,9 +971,9 @@ BOOL GraphicDescriptor::ImpDetectRAS( SvStream& rStm, BOOL )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectTGA( SvStream&, BOOL )
+sal_Bool GraphicDescriptor::ImpDetectTGA( SvStream&, sal_Bool )
{
- BOOL bRet = aPathExt.CompareToAscii( "tga", 3 ) == COMPARE_EQUAL;
+ sal_Bool bRet = aPathExt.CompareToAscii( "tga", 3 ) == COMPARE_EQUAL;
if (bRet)
nFormat = GFF_TGA;
@@ -986,28 +986,28 @@ BOOL GraphicDescriptor::ImpDetectTGA( SvStream&, BOOL )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectPSD( SvStream& rStm, BOOL bExtendedInfo )
+sal_Bool GraphicDescriptor::ImpDetectPSD( SvStream& rStm, sal_Bool bExtendedInfo )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
- UINT32 nMagicNumber;
+ sal_uInt32 nMagicNumber;
sal_Int32 nStmPos = rStm.Tell();
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
rStm >> nMagicNumber;
if ( nMagicNumber == 0x38425053 )
{
- UINT16 nVersion;
+ sal_uInt16 nVersion;
rStm >> nVersion;
if ( nVersion == 1 )
{
- bRet = TRUE;
+ bRet = sal_True;
if ( bExtendedInfo )
{
- UINT16 nChannels;
- UINT32 nRows;
- UINT32 nColumns;
- UINT16 nDepth;
- UINT16 nMode;
+ sal_uInt16 nChannels;
+ sal_uInt32 nRows;
+ sal_uInt32 nColumns;
+ sal_uInt16 nDepth;
+ sal_uInt16 nMode;
rStm.SeekRel( 6 ); // Pad
rStm >> nChannels >> nRows >> nColumns >> nDepth >> nMode;
if ( ( nDepth == 1 ) || ( nDepth == 8 ) || ( nDepth == 16 ) )
@@ -1024,11 +1024,11 @@ BOOL GraphicDescriptor::ImpDetectPSD( SvStream& rStm, BOOL bExtendedInfo )
aPixSize.Height() = nRows;
break;
default:
- bRet = FALSE;
+ bRet = sal_False;
}
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
}
}
@@ -1045,14 +1045,14 @@ BOOL GraphicDescriptor::ImpDetectPSD( SvStream& rStm, BOOL bExtendedInfo )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectEPS( SvStream& rStm, BOOL )
+sal_Bool GraphicDescriptor::ImpDetectEPS( SvStream& rStm, sal_Bool )
{
// es wird die EPS mit Vorschaubild Variante und die Extensionuebereinstimmung
// geprueft
sal_uInt32 nFirstLong;
sal_uInt8 nFirstBytes[20];
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
sal_Int32 nStmPos = rStm.Tell();
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
@@ -1065,7 +1065,7 @@ BOOL GraphicDescriptor::ImpDetectEPS( SvStream& rStm, BOOL )
&& ImplSearchEntry( &nFirstBytes[15], (sal_uInt8*)"EPS", 3, 3 ) ) )
{
nFormat = GFF_EPS;
- bRet = TRUE;
+ bRet = sal_True;
}
rStm.Seek( nStmPos );
return bRet;
@@ -1077,9 +1077,9 @@ BOOL GraphicDescriptor::ImpDetectEPS( SvStream& rStm, BOOL )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectDXF( SvStream&, BOOL )
+sal_Bool GraphicDescriptor::ImpDetectDXF( SvStream&, sal_Bool )
{
- BOOL bRet = aPathExt.CompareToAscii( "dxf", 3 ) == COMPARE_EQUAL;
+ sal_Bool bRet = aPathExt.CompareToAscii( "dxf", 3 ) == COMPARE_EQUAL;
if (bRet)
nFormat = GFF_DXF;
@@ -1092,9 +1092,9 @@ BOOL GraphicDescriptor::ImpDetectDXF( SvStream&, BOOL )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectMET( SvStream&, BOOL )
+sal_Bool GraphicDescriptor::ImpDetectMET( SvStream&, sal_Bool )
{
- BOOL bRet = aPathExt.CompareToAscii( "met", 3 ) == COMPARE_EQUAL;
+ sal_Bool bRet = aPathExt.CompareToAscii( "met", 3 ) == COMPARE_EQUAL;
if (bRet)
nFormat = GFF_MET;
@@ -1108,16 +1108,16 @@ BOOL GraphicDescriptor::ImpDetectMET( SvStream&, BOOL )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectPCT( SvStream& rStm, BOOL )
+sal_Bool GraphicDescriptor::ImpDetectPCT( SvStream& rStm, sal_Bool )
{
- BOOL bRet = aPathExt.CompareToAscii( "pct", 3 ) == COMPARE_EQUAL;
+ sal_Bool bRet = aPathExt.CompareToAscii( "pct", 3 ) == COMPARE_EQUAL;
if (bRet)
nFormat = GFF_PCT;
else
{
sal_Int32 nStmPos = rStm.Tell();
- BYTE sBuf[4];
+ sal_uInt8 sBuf[4];
rStm.SeekRel( 522 );
rStm.Read( sBuf, 3 );
@@ -1127,7 +1127,7 @@ BOOL GraphicDescriptor::ImpDetectPCT( SvStream& rStm, BOOL )
if ( ( sBuf[0] == 0x00 ) && ( sBuf[1] == 0x11 ) &&
( ( sBuf[2] == 0x01 ) || ( sBuf[2] == 0x02 ) ) )
{
- bRet = TRUE;
+ bRet = sal_True;
nFormat = GFF_PCT;
}
}
@@ -1144,21 +1144,21 @@ BOOL GraphicDescriptor::ImpDetectPCT( SvStream& rStm, BOOL )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectSGF( SvStream& rStm, BOOL )
+sal_Bool GraphicDescriptor::ImpDetectSGF( SvStream& rStm, sal_Bool )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( aPathExt.CompareToAscii( "sgf", 3 ) == COMPARE_EQUAL )
- bRet = TRUE;
+ bRet = sal_True;
else
{
sal_Int32 nStmPos = rStm.Tell();
- BYTE nFirst, nSecond;
+ sal_uInt8 nFirst, nSecond;
rStm >> nFirst >> nSecond;
if( nFirst == 'J' && nSecond == 'J' )
- bRet = TRUE;
+ bRet = sal_True;
rStm.Seek( nStmPos );
}
@@ -1176,9 +1176,9 @@ BOOL GraphicDescriptor::ImpDetectSGF( SvStream& rStm, BOOL )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectSGV( SvStream&, BOOL )
+sal_Bool GraphicDescriptor::ImpDetectSGV( SvStream&, sal_Bool )
{
- BOOL bRet = aPathExt.CompareToAscii( "sgv", 3 ) == COMPARE_EQUAL;
+ sal_Bool bRet = aPathExt.CompareToAscii( "sgv", 3 ) == COMPARE_EQUAL;
if (bRet)
nFormat = GFF_SGV;
@@ -1192,11 +1192,11 @@ BOOL GraphicDescriptor::ImpDetectSGV( SvStream&, BOOL )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectSVM( SvStream& rStm, BOOL bExtendedInfo )
+sal_Bool GraphicDescriptor::ImpDetectSVM( SvStream& rStm, sal_Bool bExtendedInfo )
{
- UINT32 n32;
- BOOL bRet = FALSE;
- BYTE cByte;
+ sal_uInt32 n32;
+ sal_Bool bRet = sal_False;
+ sal_uInt8 cByte;
sal_Int32 nStmPos = rStm.Tell();
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -1207,12 +1207,12 @@ BOOL GraphicDescriptor::ImpDetectSVM( SvStream& rStm, BOOL bExtendedInfo )
if ( cByte == 0x49 )
{
nFormat = GFF_SVM;
- bRet = TRUE;
+ bRet = sal_True;
if ( bExtendedInfo )
{
- UINT32 nTemp32;
- UINT16 nTemp16;
+ sal_uInt32 nTemp32;
+ sal_uInt16 nTemp16;
rStm.SeekRel( 0x04 );
@@ -1239,14 +1239,14 @@ BOOL GraphicDescriptor::ImpDetectSVM( SvStream& rStm, BOOL bExtendedInfo )
if( n32 == 0x4D4C4356 )
{
- UINT16 nTmp16;
+ sal_uInt16 nTmp16;
rStm >> nTmp16;
if( nTmp16 == 0x4654 )
{
nFormat = GFF_SVM;
- bRet = TRUE;
+ bRet = sal_True;
if( bExtendedInfo )
{
@@ -1271,9 +1271,9 @@ BOOL GraphicDescriptor::ImpDetectSVM( SvStream& rStm, BOOL bExtendedInfo )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectWMF( SvStream&, BOOL )
+sal_Bool GraphicDescriptor::ImpDetectWMF( SvStream&, sal_Bool )
{
- BOOL bRet = aPathExt.CompareToAscii( "wmf",3 ) == COMPARE_EQUAL;
+ sal_Bool bRet = aPathExt.CompareToAscii( "wmf",3 ) == COMPARE_EQUAL;
if (bRet)
nFormat = GFF_WMF;
@@ -1286,9 +1286,9 @@ BOOL GraphicDescriptor::ImpDetectWMF( SvStream&, BOOL )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectEMF( SvStream&, BOOL )
+sal_Bool GraphicDescriptor::ImpDetectEMF( SvStream&, sal_Bool )
{
- BOOL bRet = aPathExt.CompareToAscii( "emf", 3 ) == COMPARE_EQUAL;
+ sal_Bool bRet = aPathExt.CompareToAscii( "emf", 3 ) == COMPARE_EQUAL;
if (bRet)
nFormat = GFF_EMF;
diff --git a/svtools/source/filter.vcl/filter/sgfbram.cxx b/svtools/source/filter.vcl/filter/sgfbram.cxx
index 3d1a71f5a2db..9b981f8c0d94 100644
--- a/svtools/source/filter.vcl/filter/sgfbram.cxx
+++ b/svtools/source/filter.vcl/filter/sgfbram.cxx
@@ -75,11 +75,11 @@ SvStream& operator>>(SvStream& rIStream, SgfHeader& rHead)
|* Letzte Aenderung JOE 23.06.93
|*
*************************************************************************/
-BOOL SgfHeader::ChkMagic()
+sal_Bool SgfHeader::ChkMagic()
{ return Magic=='J'*256+'J'; }
-UINT32 SgfHeader::GetOffset()
-{ return UINT32(OfsLo)+0x00010000*UINT32(OfsHi); }
+sal_uInt32 SgfHeader::GetOffset()
+{ return sal_uInt32(OfsLo)+0x00010000*sal_uInt32(OfsHi); }
/*************************************************************************
@@ -105,8 +105,8 @@ SvStream& operator>>(SvStream& rIStream, SgfEntry& rEntr)
return rIStream;
}
-UINT32 SgfEntry::GetOffset()
-{ return UINT32(OfsLo)+0x00010000*UINT32(OfsHi); }
+sal_uInt32 SgfEntry::GetOffset()
+{ return sal_uInt32(OfsLo)+0x00010000*sal_uInt32(OfsHi); }
/*************************************************************************
@@ -165,21 +165,21 @@ SvStream& operator<<(SvStream& rOStream, BmpFileHeader& rHead)
return rOStream;
}
-void BmpFileHeader::SetSize(UINT32 Size)
+void BmpFileHeader::SetSize(sal_uInt32 Size)
{
- SizeLo=UINT16(Size & 0x0000FFFF);
- SizeHi=UINT16((Size & 0xFFFF0000)>>16);
+ SizeLo=sal_uInt16(Size & 0x0000FFFF);
+ SizeHi=sal_uInt16((Size & 0xFFFF0000)>>16);
}
-void BmpFileHeader::SetOfs(UINT32 Ofs)
+void BmpFileHeader::SetOfs(sal_uInt32 Ofs)
{
- OfsLo=UINT16(Ofs & 0x0000FFFF);
- OfsHi=UINT16((Ofs & 0xFFFF0000)>>16);
+ OfsLo=sal_uInt16(Ofs & 0x0000FFFF);
+ OfsHi=sal_uInt16((Ofs & 0xFFFF0000)>>16);
}
-UINT32 BmpFileHeader::GetOfs()
+sal_uInt32 BmpFileHeader::GetOfs()
{
- return UINT32(OfsLo)+0x00010000*UINT32(OfsHi);
+ return sal_uInt32(OfsLo)+0x00010000*sal_uInt32(OfsHi);
}
/*************************************************************************
@@ -247,14 +247,14 @@ SvStream& operator<<(SvStream& rOStream, const RGBQuad& rQuad)
class PcxExpand
{
private:
- USHORT Count;
- BYTE Data;
+ sal_uInt16 Count;
+ sal_uInt8 Data;
public:
PcxExpand() { Count=0; }
- BYTE GetByte(SvStream& rInp);
+ sal_uInt8 GetByte(SvStream& rInp);
};
-BYTE PcxExpand::GetByte(SvStream& rInp)
+sal_uInt8 PcxExpand::GetByte(SvStream& rInp)
{
if (Count>0) {
Count--;
@@ -282,21 +282,21 @@ BYTE PcxExpand::GetByte(SvStream& rInp)
|* Letzte Aenderung JOE 23.06.93
|*
*************************************************************************/
-BOOL SgfFilterBMap(SvStream& rInp, SvStream& rOut, SgfHeader& rHead, SgfEntry&)
+sal_Bool SgfFilterBMap(SvStream& rInp, SvStream& rOut, SgfHeader& rHead, SgfEntry&)
{
BmpFileHeader aBmpHead;
BmpInfoHeader aBmpInfo;
- USHORT nWdtInp=(rHead.Xsize+7)/8; // Breite der Input-Bitmap in Bytes
- USHORT nWdtOut; // Breite der Output-Bitmap in Bytes
- USHORT nColors; // Anzahl der Farben (1,16,256)
- USHORT nColBits; // Anzahl der Bits/Pixel (2, 4, 8)
- USHORT i,j,k; // Spaltenzaehler, Zeilenzaehler, Planezaehler
- USHORT a,b; // Hilfsvariable
- BYTE pl1 = 0,pl2= 0; // Masken fuer die Planes
- BYTE* pBuf=NULL; // Buffer fuer eine Pixelzeile
+ sal_uInt16 nWdtInp=(rHead.Xsize+7)/8; // Breite der Input-Bitmap in Bytes
+ sal_uInt16 nWdtOut; // Breite der Output-Bitmap in Bytes
+ sal_uInt16 nColors; // Anzahl der Farben (1,16,256)
+ sal_uInt16 nColBits; // Anzahl der Bits/Pixel (2, 4, 8)
+ sal_uInt16 i,j,k; // Spaltenzaehler, Zeilenzaehler, Planezaehler
+ sal_uInt16 a,b; // Hilfsvariable
+ sal_uInt8 pl1 = 0,pl2= 0; // Masken fuer die Planes
+ sal_uInt8* pBuf=NULL; // Buffer fuer eine Pixelzeile
PcxExpand aPcx;
- ULONG nOfs;
- BYTE cRGB[4];
+ sal_uLong nOfs;
+ sal_uInt8 cRGB[4];
if (rHead.Planes<=1) nColBits=1; else nColBits=4; if (rHead.Typ==4) nColBits=8;
nColors=1<<nColBits;
@@ -317,8 +317,8 @@ BOOL SgfFilterBMap(SvStream& rInp, SvStream& rOut, SgfHeader& rHead, SgfEntry&)
aBmpInfo.yDpmm=0;
aBmpInfo.ColUsed=0;
aBmpInfo.ColMust=0;
- pBuf=new BYTE[nWdtOut];
- if (!pBuf) return FALSE; // Fehler: kein Speichel da
+ pBuf=new sal_uInt8[nWdtOut];
+ if (!pBuf) return sal_False; // Fehler: kein Speichel da
rOut<<aBmpHead<<aBmpInfo;
memset(pBuf,0,nWdtOut); // Buffer mit Nullen fuellen
@@ -335,7 +335,7 @@ BOOL SgfFilterBMap(SvStream& rInp, SvStream& rOut, SgfHeader& rHead, SgfEntry&)
pBuf[i]=aPcx.GetByte(rInp);
}
for(i=nWdtInp;i<nWdtOut;i++) pBuf[i]=0; // noch bis zu 3 Bytes
- rOut.Seek(nOfs+((ULONG)rHead.Ysize-j-1L)*(ULONG)nWdtOut); // rueckwaerts schreiben!
+ rOut.Seek(nOfs+((sal_uLong)rHead.Ysize-j-1L)*(sal_uLong)nWdtOut); // rueckwaerts schreiben!
rOut.Write((char*)pBuf,nWdtOut);
}
} else if (nColors==16) {
@@ -381,7 +381,7 @@ BOOL SgfFilterBMap(SvStream& rInp, SvStream& rOut, SgfHeader& rHead, SgfEntry&)
}
}
for(i=nWdtInp*4;i<nWdtOut;i++) pBuf[i]=0; // noch bis zu 3 Bytes
- rOut.Seek(nOfs+((ULONG)rHead.Ysize-j-1L)*(ULONG)nWdtOut); // rueckwaerts schreiben!
+ rOut.Seek(nOfs+((sal_uLong)rHead.Ysize-j-1L)*(sal_uLong)nWdtOut); // rueckwaerts schreiben!
rOut.Write((char*)pBuf,nWdtOut);
}
} else if (nColors==256) {
@@ -401,12 +401,12 @@ BOOL SgfFilterBMap(SvStream& rInp, SvStream& rOut, SgfHeader& rHead, SgfEntry&)
for(i=0;i<rHead.Xsize;i++)
pBuf[i]=aPcx.GetByte(rInp);
for(i=rHead.Xsize;i<nWdtOut;i++) pBuf[i]=0; // noch bis zu 3 Bytes
- rOut.Seek(nOfs+((ULONG)rHead.Ysize-j-1L)*(ULONG)nWdtOut); // rueckwaerts schreiben!
+ rOut.Seek(nOfs+((sal_uLong)rHead.Ysize-j-1L)*(sal_uLong)nWdtOut); // rueckwaerts schreiben!
rOut.Write((char*)pBuf,nWdtOut);
}
}
delete[] pBuf;
- return TRUE;
+ return sal_True;
}
@@ -419,14 +419,14 @@ BOOL SgfFilterBMap(SvStream& rInp, SvStream& rOut, SgfHeader& rHead, SgfEntry&)
|* Letzte Aenderung JOE 23.06.93
|*
*************************************************************************/
-BOOL SgfBMapFilter(SvStream& rInp, SvStream& rOut)
+sal_Bool SgfBMapFilter(SvStream& rInp, SvStream& rOut)
{
- ULONG nFileStart; // Offset des SgfHeaders. Im allgemeinen 0.
+ sal_uLong nFileStart; // Offset des SgfHeaders. Im allgemeinen 0.
SgfHeader aHead;
SgfEntry aEntr;
- ULONG nNext;
- BOOL bRdFlag=FALSE; // Grafikentry gelesen ?
- BOOL bRet=FALSE; // Returncode
+ sal_uLong nNext;
+ sal_Bool bRdFlag=sal_False; // Grafikentry gelesen ?
+ sal_Bool bRet=sal_False; // Returncode
nFileStart=rInp.Tell();
rInp>>aHead;
@@ -438,7 +438,7 @@ BOOL SgfBMapFilter(SvStream& rInp, SvStream& rOut)
rInp>>aEntr;
nNext=aEntr.GetOffset();
if (aEntr.Typ==aHead.Typ) {
- bRdFlag=TRUE;
+ bRdFlag=sal_True;
switch(aEntr.Typ) {
case SgfBitImag0:
case SgfBitImag1:
@@ -448,7 +448,7 @@ BOOL SgfBMapFilter(SvStream& rInp, SvStream& rOut)
}
} // while(nNext)
}
- if (rInp.GetError()) bRet=FALSE;
+ if (rInp.GetError()) bRet=sal_False;
return(bRet);
}
@@ -464,15 +464,15 @@ long SgfVectXmul=0;
long SgfVectYmul=0;
long SgfVectXdiv=0;
long SgfVectYdiv=0;
-BOOL SgfVectScal=FALSE;
+sal_Bool SgfVectScal=sal_False;
////////////////////////////////////////////////////////////
// Hpgl2SvFarbe ////////////////////////////////////////////
////////////////////////////////////////////////////////////
-Color Hpgl2SvFarbe( BYTE nFarb )
+Color Hpgl2SvFarbe( sal_uInt8 nFarb )
{
- ULONG nColor = COL_BLACK;
+ sal_uLong nColor = COL_BLACK;
switch (nFarb & 0x07) {
case 0: nColor=COL_WHITE; break;
@@ -497,20 +497,20 @@ Color Hpgl2SvFarbe( BYTE nFarb )
|* Letzte Aenderung JOE 23.06.93
|*
*************************************************************************/
-BOOL SgfFilterVect(SvStream& rInp, SgfHeader& rHead, SgfEntry&, GDIMetaFile& rMtf)
+sal_Bool SgfFilterVect(SvStream& rInp, SgfHeader& rHead, SgfEntry&, GDIMetaFile& rMtf)
{
VirtualDevice aOutDev;
SgfVector aVect;
- BYTE nFarb;
- BYTE nFrb0=7;
- BYTE nLTyp;
- BYTE nOTyp;
- BOOL bEoDt=FALSE;
- BOOL bPDwn=FALSE;
+ sal_uInt8 nFarb;
+ sal_uInt8 nFrb0=7;
+ sal_uInt8 nLTyp;
+ sal_uInt8 nOTyp;
+ sal_Bool bEoDt=sal_False;
+ sal_Bool bPDwn=sal_False;
Point aP0(0,0);
Point aP1(0,0);
String Msg;
- USHORT RecNr=0;
+ sal_uInt16 RecNr=0;
rMtf.Record(&aOutDev);
aOutDev.SetLineColor(Color(COL_BLACK));
@@ -518,9 +518,9 @@ BOOL SgfFilterVect(SvStream& rInp, SgfHeader& rHead, SgfEntry&, GDIMetaFile& rMt
while (!bEoDt && !rInp.GetError()) {
rInp>>aVect; RecNr++;
- nFarb=(BYTE) (aVect.Flag & 0x000F);
- nLTyp=(BYTE)((aVect.Flag & 0x00F0) >>4);
- nOTyp=(BYTE)((aVect.Flag & 0x0F00) >>8);
+ nFarb=(sal_uInt8) (aVect.Flag & 0x000F);
+ nLTyp=(sal_uInt8)((aVect.Flag & 0x00F0) >>4);
+ nOTyp=(sal_uInt8)((aVect.Flag & 0x0F00) >>8);
bEoDt=(aVect.Flag & 0x4000) !=0;
bPDwn=(aVect.Flag & 0x8000) !=0;
@@ -561,7 +561,7 @@ BOOL SgfFilterVect(SvStream& rInp, SgfHeader& rHead, SgfEntry&, GDIMetaFile& rMt
Fraction( 1, 4 ), Fraction( 1, 4 ) );
rMtf.SetPrefMapMode( aMap );
rMtf.SetPrefSize( Size( (short)rHead.Xsize, (short)rHead.Ysize ) );
- return TRUE;
+ return sal_True;
}
@@ -574,14 +574,14 @@ BOOL SgfFilterVect(SvStream& rInp, SgfHeader& rHead, SgfEntry&, GDIMetaFile& rMt
|* Letzte Aenderung JOE 23.06.93
|*
*************************************************************************/
-BOOL SgfVectFilter(SvStream& rInp, GDIMetaFile& rMtf)
+sal_Bool SgfVectFilter(SvStream& rInp, GDIMetaFile& rMtf)
{
- ULONG nFileStart; // Offset des SgfHeaders. Im allgemeinen 0.
+ sal_uLong nFileStart; // Offset des SgfHeaders. Im allgemeinen 0.
SgfHeader aHead;
SgfEntry aEntr;
- ULONG nNext;
- BOOL bRdFlag=FALSE; // Grafikentry gelesen ?
- BOOL bRet=FALSE; // Returncode
+ sal_uLong nNext;
+ sal_Bool bRdFlag=sal_False; // Grafikentry gelesen ?
+ sal_Bool bRet=sal_False; // Returncode
nFileStart=rInp.Tell();
rInp>>aHead;
@@ -596,7 +596,7 @@ BOOL SgfVectFilter(SvStream& rInp, GDIMetaFile& rMtf)
}
} // while(nNext)
if (bRdFlag) {
- if (!rInp.GetError()) bRet=TRUE; // Scheinbar Ok
+ if (!rInp.GetError()) bRet=sal_True; // Scheinbar Ok
}
}
return(bRet);
@@ -612,9 +612,9 @@ BOOL SgfVectFilter(SvStream& rInp, GDIMetaFile& rMtf)
|* Letzte Aenderung JOE 23.06.93
|*
*************************************************************************/
-BOOL SgfFilterPScr(SvStream&, SgfHeader&, SgfEntry&)
+sal_Bool SgfFilterPScr(SvStream&, SgfHeader&, SgfEntry&)
{
- return FALSE; // PostSrcipt wird noch nicht unterstuetzt !
+ return sal_False; // PostSrcipt wird noch nicht unterstuetzt !
}
@@ -627,7 +627,7 @@ BOOL SgfFilterPScr(SvStream&, SgfHeader&, SgfEntry&)
|* Letzte Aenderung JOE 23.06.93
|*
*************************************************************************/
-BYTE CheckSgfTyp(SvStream& rInp, USHORT& nVersion)
+sal_uInt8 CheckSgfTyp(SvStream& rInp, sal_uInt16& nVersion)
{
#if OSL_DEBUG_LEVEL > 1 // Recordgroessen checken. Neuer Compiler hat vielleichte anderes Allignment!
if (sizeof(SgfHeader)!=SgfHeaderSize ||
@@ -638,7 +638,7 @@ BYTE CheckSgfTyp(SvStream& rInp, USHORT& nVersion)
sizeof(RGBQuad )!=RGBQuadSize ) return SGF_DONTKNOW;
#endif
- ULONG nPos;
+ sal_uLong nPos;
SgfHeader aHead;
nVersion=0;
nPos=rInp.Tell();
diff --git a/svtools/source/filter.vcl/filter/sgvmain.cxx b/svtools/source/filter.vcl/filter/sgvmain.cxx
index 293c6dab7964..3b0f3ebd2912 100644
--- a/svtools/source/filter.vcl/filter/sgvmain.cxx
+++ b/svtools/source/filter.vcl/filter/sgvmain.cxx
@@ -58,7 +58,7 @@
p.Paper.RandO =SWAPSHORT(p.Paper.RandO ); \
p.Paper.RandU =SWAPSHORT(p.Paper.RandU ); \
SWAPPOINT(p.U); \
- UINT16 iTemp; \
+ sal_uInt16 iTemp; \
for (iTemp=0;iTemp<20;iTemp++) { \
rPage.HlpLnH[iTemp]=SWAPSHORT(rPage.HlpLnH[iTemp]); \
rPage.HlpLnV[iTemp]=SWAPSHORT(rPage.HlpLnV[iTemp]); }}
@@ -118,41 +118,41 @@ SgfFontLst* pSgfFonts = 0;
////////////////////////////////////////////////////////////////////////////////////////////////////
// Fuer Kreisunterarten, Text und gedrehte Rechtecke ///////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
-void RotatePoint(PointType& P, INT16 cx, INT16 cy, double sn, double cs)
+void RotatePoint(PointType& P, sal_Int16 cx, sal_Int16 cy, double sn, double cs)
{
- INT16 dx,dy;
+ sal_Int16 dx,dy;
double x1,y1;
dx=P.x-cx;
dy=P.y-cy;
x1=dx*cs-dy*sn;
y1=dy*cs+dx*sn;
- P.x=cx+INT16(x1);
- P.y=cy+INT16(y1);
+ P.x=cx+sal_Int16(x1);
+ P.y=cy+sal_Int16(y1);
}
-void RotatePoint(Point& P, INT16 cx, INT16 cy, double sn, double cs)
+void RotatePoint(Point& P, sal_Int16 cx, sal_Int16 cy, double sn, double cs)
{
- INT16 dx,dy;
+ sal_Int16 dx,dy;
double x1,y1;
- dx=(INT16)(P.X()-cx);
- dy=(INT16)(P.Y()-cy);
+ dx=(sal_Int16)(P.X()-cx);
+ dy=(sal_Int16)(P.Y()-cy);
x1=dx*cs-dy*sn;
y1=dy*cs+dx*sn;
- P=Point(cx+INT16(x1),cy+INT16(y1));
+ P=Point(cx+sal_Int16(x1),cy+sal_Int16(y1));
}
-INT16 iMulDiv(INT16 a, INT16 Mul, INT16 Div)
+sal_Int16 iMulDiv(sal_Int16 a, sal_Int16 Mul, sal_Int16 Div)
{
- INT32 Temp;
- Temp=INT32(a)*INT32(Mul)/INT32(Div);
- return INT16(Temp);
+ sal_Int32 Temp;
+ Temp=sal_Int32(a)*sal_Int32(Mul)/sal_Int32(Div);
+ return sal_Int16(Temp);
}
-UINT16 MulDiv(UINT16 a, UINT16 Mul, UINT16 Div)
+sal_uInt16 MulDiv(sal_uInt16 a, sal_uInt16 Mul, sal_uInt16 Div)
{
- UINT32 Temp;
- Temp=UINT32(a)*UINT32(Mul)/UINT32(Div);
- return UINT16(Temp);
+ sal_uInt32 Temp;
+ Temp=sal_uInt32(a)*sal_uInt32(Mul)/sal_uInt32(Div);
+ return sal_uInt16(Temp);
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -167,10 +167,10 @@ SvStream& operator>>(SvStream& rIStream, DtHdType& rDtHd)
void DtHdOverSeek(SvStream& rInp)
{
- ULONG FPos=rInp.Tell();
- FPos+=(ULONG)DtHdSize;
+ sal_uLong FPos=rInp.Tell();
+ FPos+=(sal_uLong)DtHdSize;
rInp.Seek(FPos);
-// rInp.seekg(rInp.tellg()+(ULONG)DtHdSize);
+// rInp.seekg(rInp.tellg()+(sal_uLong)DtHdSize);
}
@@ -185,21 +185,21 @@ SvStream& operator>>(SvStream& rIStream, PageType& rPage)
void ObjkOverSeek(SvStream& rInp, ObjkType& rObjk)
{
- ULONG Siz;
- Siz=(ULONG)rObjk.MemSize+rObjk.Last; // ObjSize+ObjAnhSize
+ sal_uLong Siz;
+ Siz=(sal_uLong)rObjk.MemSize+rObjk.Last; // ObjSize+ObjAnhSize
rInp.Seek(rInp.Tell()+Siz);
}
SvStream& operator>>(SvStream& rInp, ObjkType& rObjk)
{ // Die Fileposition im Stream bleibt unveraendert!
- ULONG nPos;
+ sal_uLong nPos;
nPos=rInp.Tell();
rInp.Read((char*)&rObjk.Last,ObjkSize);
#if defined OSL_BIGENDIAN
SWAPOBJK(rObjk);
#endif
#ifdef InArbeit
- ULONG nPos1=rInp.Tell();
+ sal_uLong nPos1=rInp.Tell();
if(nPos == nPos1) InfoBox( NULL, "tellg funkt nich" ).Execute();
#endif
rInp.Seek(nPos);
@@ -331,10 +331,10 @@ SvStream& operator>>(SvStream& rInp, GrupType& rGrup)
|* Letzte Aenderung JOE 23.06.93
|*
*************************************************************************/
-Color Sgv2SvFarbe(BYTE nFrb1, BYTE nFrb2, BYTE nInts)
+Color Sgv2SvFarbe(sal_uInt8 nFrb1, sal_uInt8 nFrb2, sal_uInt8 nInts)
{
- UINT16 r1=0,g1=0,b1=0,r2=0,g2=0,b2=0;
- BYTE nInt2=100-nInts;
+ sal_uInt16 r1=0,g1=0,b1=0,r2=0,g2=0,b2=0;
+ sal_uInt8 nInt2=100-nInts;
switch(nFrb1 & 0x07) {
case 0: r1=0xFF; g1=0xFF; b1=0xFF; break;
case 1: r1=0xFF; g1=0xFF; break;
@@ -355,9 +355,9 @@ Color Sgv2SvFarbe(BYTE nFrb1, BYTE nFrb2, BYTE nInts)
case 6: b2=0xFF; break;
case 7: break;
}
- r1=(UINT16)((UINT32)r1*nInts/100+(UINT32)r2*nInt2/100);
- g1=(UINT16)((UINT32)g1*nInts/100+(UINT32)g2*nInt2/100);
- b1=(UINT16)((UINT32)b1*nInts/100+(UINT32)b2*nInt2/100);
+ r1=(sal_uInt16)((sal_uInt32)r1*nInts/100+(sal_uInt32)r2*nInt2/100);
+ g1=(sal_uInt16)((sal_uInt32)g1*nInts/100+(sal_uInt32)g2*nInt2/100);
+ b1=(sal_uInt16)((sal_uInt32)b1*nInts/100+(sal_uInt32)b2*nInt2/100);
Color aColor( (sal_uInt8)r1, (sal_uInt8)g1, (sal_uInt8)b1 );
return aColor;
}
@@ -458,7 +458,7 @@ void StrkType::Draw(OutputDevice& rOut)
|* Letzte Aenderung JOE 23.06.93
|*
*************************************************************************/
-void SgfAreaColorIntens(UINT16 Muster, BYTE Col1, BYTE Col2, BYTE Int, OutputDevice& rOut)
+void SgfAreaColorIntens(sal_uInt16 Muster, sal_uInt8 Col1, sal_uInt8 Col2, sal_uInt8 Int, OutputDevice& rOut)
{
ObjAreaType F;
F.FMuster=Muster;
@@ -468,15 +468,15 @@ void SgfAreaColorIntens(UINT16 Muster, BYTE Col1, BYTE Col2, BYTE Int, OutputDev
SetArea(F,rOut);
}
-void DrawSlideRect(INT16 x1, INT16 y1, INT16 x2, INT16 y2, ObjAreaType& F, OutputDevice& rOut)
+void DrawSlideRect(sal_Int16 x1, sal_Int16 y1, sal_Int16 x2, sal_Int16 y2, ObjAreaType& F, OutputDevice& rOut)
{
- INT16 i,i0,b,b0;
- INT16 Int1,Int2;
- INT16 Col1,Col2;
+ sal_Int16 i,i0,b,b0;
+ sal_Int16 Int1,Int2;
+ sal_Int16 Col1,Col2;
// ClipMerk: HgdClipRec;
- INT16 cx,cy;
- INT16 MaxR;
- INT32 dx,dy;
+ sal_Int16 cx,cy;
+ sal_Int16 MaxR;
+ sal_Int32 dx,dy;
rOut.SetLineColor();
if (x1>x2) { i=x1; x1=x2; x2=i; }
@@ -484,7 +484,7 @@ void DrawSlideRect(INT16 x1, INT16 y1, INT16 x2, INT16 y2, ObjAreaType& F, Outpu
Col1=F.FBFarbe & 0x87; Col2=F.FFarbe & 0x87;
Int1=100-F.FIntens; Int2=F.FIntens;
if (Int1==Int2) {
- SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int2,rOut);
+ SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int2,rOut);
rOut.DrawRect(Rectangle(x1,y1,x2,y2));
} else {
b0=Int1;
@@ -493,30 +493,30 @@ void DrawSlideRect(INT16 x1, INT16 y1, INT16 x2, INT16 y2, ObjAreaType& F, Outpu
i0=y1;
i=y1;
while (i<=y2) {
- b=Int1+INT16((INT32)(Int2-Int1)*(INT32)(i-y1) /(INT32)(y2-y1+1));
+ b=Int1+sal_Int16((sal_Int32)(Int2-Int1)*(sal_Int32)(i-y1) /(sal_Int32)(y2-y1+1));
if (b!=b0) {
- SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)b0,rOut);
+ SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)b0,rOut);
rOut.DrawRect(Rectangle(x1,i0,x2,i-1));
i0=i; b0=b;
}
i++;
}
- SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int2,rOut);
+ SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int2,rOut);
rOut.DrawRect(Rectangle(x1,i0,x2,y2));
} break;
case 0x28: { // horizontal
i0=x1;
i=x1;
while (i<=x2) {
- b=Int1+INT16((INT32)(Int2-Int1)*(INT32)(i-x1) /(INT32)(x2-x1+1));
+ b=Int1+sal_Int16((sal_Int32)(Int2-Int1)*(sal_Int32)(i-x1) /(sal_Int32)(x2-x1+1));
if (b!=b0) {
- SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)b0,rOut);
+ SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)b0,rOut);
rOut.DrawRect(Rectangle(i0,y1,i-1,y2));
i0=i; b0=b;
}
i++;
}
- SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int2,rOut);
+ SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int2,rOut);
rOut.DrawRect(Rectangle(i0,y1,x2,y2));
} break;
@@ -530,14 +530,14 @@ void DrawSlideRect(INT16 x1, INT16 y1, INT16 x2, INT16 y2, ObjAreaType& F, Outpu
dx=x2-x1+1;
dy=y2-y1+1;
a=sqrt((double)(dx*dx+dy*dy));
- MaxR=INT16(a) /2 +1;
+ MaxR=sal_Int16(a) /2 +1;
b0=Int2;
i0=MaxR; if (MaxR<1) MaxR=1;
i=MaxR;
while (i>=0) {
- b=Int1+INT16((INT32(Int2-Int1)*INT32(i)) /INT32(MaxR));
+ b=Int1+sal_Int16((sal_Int32(Int2-Int1)*sal_Int32(i)) /sal_Int32(MaxR));
if (b!=b0) {
- SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)b0,rOut);
+ SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)b0,rOut);
//if (i0>200 || (Col1 & $80)!=0 || (Col2 & $80)!=0) {
// then begin { Fallunterscheidung fuer etwas bessere Performance }
// s2:=i0-i+2;
@@ -550,7 +550,7 @@ void DrawSlideRect(INT16 x1, INT16 y1, INT16 x2, INT16 y2, ObjAreaType& F, Outpu
}
i--;
}
- SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int1,rOut);
+ SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int1,rOut);
rOut.DrawEllipse(Rectangle(cx-i0,cy-i0,cx+i0,cy+i0));
rOut.SetClipRegion(ClipMerk);
} break; // Kreis
@@ -577,7 +577,7 @@ void RectType::Draw(OutputDevice& rOut)
}
} else {
Point aPts[4];
- USHORT i;
+ sal_uInt16 i;
double sn,cs;
sn=sin(double(DrehWink)*3.14159265359/18000);
cs=cos(double(DrehWink)*3.14159265359/18000);
@@ -608,7 +608,7 @@ void PolyType::Draw(OutputDevice& rOut)
if ((Flags & PolyClosBit) !=0) SetArea(F,rOut);
SetLine(L,rOut);
Polygon aPoly(nPoints);
- USHORT i;
+ sal_uInt16 i;
for(i=0;i<nPoints;i++) aPoly.SetPoint(Point(EckP[i].x,EckP[i].y),i);
if ((Flags & PolyClosBit) !=0) {
rOut.DrawPolygon(aPoly);
@@ -632,13 +632,13 @@ void SplnType::Draw(OutputDevice& rOut)
SetLine(L,rOut);
Polygon aPoly(0);
Polygon aSpln(nPoints);
- USHORT i;
+ sal_uInt16 i;
for(i=0;i<nPoints;i++) aSpln.SetPoint(Point(EckP[i].x,EckP[i].y),i);
if ((Flags & PolyClosBit) !=0) {
- Spline2Poly(aSpln,TRUE,aPoly);
+ Spline2Poly(aSpln,sal_True,aPoly);
if (aPoly.GetSize()>0) rOut.DrawPolygon(aPoly);
} else {
- Spline2Poly(aSpln,FALSE,aPoly);
+ Spline2Poly(aSpln,sal_False,aPoly);
if (aPoly.GetSize()>0) rOut.DrawPolyLine(aPoly);
}
}
@@ -652,22 +652,22 @@ void SplnType::Draw(OutputDevice& rOut)
|* Letzte Aenderung JOE 23.06.93
|*
*************************************************************************/
-void DrawSlideCirc(INT16 cx, INT16 cy, INT16 rx, INT16 ry, ObjAreaType& F, OutputDevice& rOut)
+void DrawSlideCirc(sal_Int16 cx, sal_Int16 cy, sal_Int16 rx, sal_Int16 ry, ObjAreaType& F, OutputDevice& rOut)
{
- INT16 x1=cx-rx;
- INT16 y1=cy-ry;
- INT16 x2=cx+rx;
- INT16 y2=cy+ry;
+ sal_Int16 x1=cx-rx;
+ sal_Int16 y1=cy-ry;
+ sal_Int16 x2=cx+rx;
+ sal_Int16 y2=cy+ry;
- INT16 i,i0,b,b0;
- INT16 Int1,Int2;
- INT16 Col1,Col2;
+ sal_Int16 i,i0,b,b0;
+ sal_Int16 Int1,Int2;
+ sal_Int16 Col1,Col2;
rOut.SetLineColor();
Col1=F.FBFarbe & 0x87; Col2=F.FFarbe & 0x87;
Int1=100-F.FIntens; Int2=F.FIntens;
if (Int1==Int2) {
- SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int2,rOut);
+ SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int2,rOut);
rOut.DrawEllipse(Rectangle(x1,y1,x2,y2));
} else {
b0=Int1;
@@ -677,16 +677,16 @@ void DrawSlideCirc(INT16 cx, INT16 cy, INT16 rx, INT16 ry, ObjAreaType& F, Outpu
i0=y1;
i=y1;
while (i<=y2) {
- b=Int1+INT16((INT32)(Int2-Int1)*(INT32)(i-y1) /(INT32)(y2-y1+1));
+ b=Int1+sal_Int16((sal_Int32)(Int2-Int1)*(sal_Int32)(i-y1) /(sal_Int32)(y2-y1+1));
if (b!=b0) {
- SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)b0,rOut);
+ SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)b0,rOut);
rOut.SetClipRegion(Rectangle(x1,i0,x2,i-1));
rOut.DrawEllipse(Rectangle(x1,y1,x2,y2));
i0=i; b0=b;
}
i++;
}
- SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int2,rOut);
+ SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int2,rOut);
rOut.SetClipRegion(Rectangle(x1,i0,x2,y2));
rOut.DrawEllipse(Rectangle(x1,y1,x2,y2));
rOut.SetClipRegion(ClipMerk);
@@ -696,23 +696,23 @@ void DrawSlideCirc(INT16 cx, INT16 cy, INT16 rx, INT16 ry, ObjAreaType& F, Outpu
i0=x1;
i=x1;
while (i<=x2) {
- b=Int1+INT16((INT32)(Int2-Int1)*(INT32)(i-x1) /(INT32)(x2-x1+1));
+ b=Int1+sal_Int16((sal_Int32)(Int2-Int1)*(sal_Int32)(i-x1) /(sal_Int32)(x2-x1+1));
if (b!=b0) {
- SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)b0,rOut);
+ SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)b0,rOut);
rOut.SetClipRegion(Rectangle(i0,y1,i-1,y2));
rOut.DrawEllipse(Rectangle(x1,y1,x2,y2));
i0=i; b0=b;
}
i++;
}
- SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int2,rOut);
+ SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int2,rOut);
rOut.SetClipRegion(Rectangle(i0,y1,x2,y2));
rOut.DrawEllipse(Rectangle(x1,y1,x2,y2));
rOut.SetClipRegion(ClipMerk);
} break;
case 0x18: case 0x38: { // Kreis
- INT16 MaxR;
+ sal_Int16 MaxR;
if (rx<1) rx=1;
if (ry<1) ry=1;
@@ -721,17 +721,17 @@ void DrawSlideCirc(INT16 cx, INT16 cy, INT16 rx, INT16 ry, ObjAreaType& F, Outpu
i0=MaxR; if (MaxR<1) MaxR=1;
i=MaxR;
while (i>=0) {
- b=Int1+INT16((INT32(Int2-Int1)*INT32(i)) /INT32(MaxR));
+ b=Int1+sal_Int16((sal_Int32(Int2-Int1)*sal_Int32(i)) /sal_Int32(MaxR));
if (b!=b0) {
- INT32 temp=INT32(i0)*INT32(ry)/INT32(rx);
- INT16 j0=INT16(temp);
- SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)b0,rOut);
+ sal_Int32 temp=sal_Int32(i0)*sal_Int32(ry)/sal_Int32(rx);
+ sal_Int16 j0=sal_Int16(temp);
+ SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)b0,rOut);
rOut.DrawEllipse(Rectangle(cx-i0,cy-j0,cx+i0,cy+j0));
i0=i; b0=b;
}
i--;
}
- SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int1,rOut);
+ SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int1,rOut);
rOut.DrawEllipse(Rectangle(cx-i0,cy-i0,cx+i0,cy+i0));
} break; // Kreis
}
@@ -804,7 +804,7 @@ void BmapType::Draw(OutputDevice& rOut)
{
//ifstream aInp;
unsigned char nSgfTyp;
- USHORT nVersion;
+ sal_uInt16 nVersion;
String aStr(
reinterpret_cast< char const * >(&Filename[ 1 ]),
(xub_StrLen)Filename[ 0 ], RTL_TEXTENCODING_UTF8 );
@@ -818,7 +818,7 @@ void BmapType::Draw(OutputDevice& rOut)
case SGF_BITIMAGE: {
GraphicFilter aFlt;
Graphic aGrf;
- USHORT nRet;
+ sal_uInt16 nRet;
nRet=aFlt.ImportGraphic(aGrf,aFNam);
aGrf.Draw(&rOut,Point(Pos1.x,Pos1.y),Size(Pos2.x-Pos1.x,Pos2.y-Pos1.y));
} break;
@@ -830,7 +830,7 @@ void BmapType::Draw(OutputDevice& rOut)
SgfVectYmul=Pos2.y-Pos1.y;
SgfVectXdiv=0;
SgfVectYdiv=0;
- SgfVectScal=TRUE;
+ SgfVectScal=sal_True;
SgfVectFilter(*pInp,aMtf);
SgfVectXofs=0;
SgfVectYofs=0;
@@ -838,7 +838,7 @@ void BmapType::Draw(OutputDevice& rOut)
SgfVectYmul=0;
SgfVectXdiv=0;
SgfVectYdiv=0;
- SgfVectScal=FALSE;
+ SgfVectScal=sal_False;
aMtf.Play(&rOut);
} break;
}
@@ -856,9 +856,9 @@ void BmapType::Draw(OutputDevice& rOut)
|* Letzte Aenderung JOE 23.06.93
|*
*************************************************************************/
-UINT32 GrupType::GetSubPtr()
+sal_uInt32 GrupType::GetSubPtr()
{
- return UINT32(SbLo)+0x00010000*UINT32(SbHi);
+ return sal_uInt32(SbLo)+0x00010000*sal_uInt32(SbHi);
}
/*************************************************************************
@@ -873,8 +873,8 @@ UINT32 GrupType::GetSubPtr()
void DrawObjkList( SvStream& rInp, OutputDevice& rOut )
{
ObjkType aObjk;
- USHORT nGrpCnt=0;
- BOOL bEnde=FALSE;
+ sal_uInt16 nGrpCnt=0;
+ sal_Bool bEnde=sal_False;
do {
rInp>>aObjk;
if (!rInp.GetError()) {
@@ -941,11 +941,11 @@ void DrawObjkList( SvStream& rInp, OutputDevice& rOut )
} // if rInp
if (!rInp.GetError()) {
if (aObjk.Next==0L) {
- if (nGrpCnt==0) bEnde=TRUE;
+ if (nGrpCnt==0) bEnde=sal_True;
else nGrpCnt--;
}
} else {
- bEnde=TRUE; // Lesefehler
+ bEnde=sal_True; // Lesefehler
}
} while (!bEnde);
}
@@ -985,15 +985,15 @@ void SkipObjkList(SvStream& rInp)
|* Letzte Aenderung JOE 23.06.93
|*
*************************************************************************/
-BOOL SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf )
+sal_Bool SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
PageType aPage;
VirtualDevice aOutDev;
OutputDevice* pOutDev;
- ULONG nStdPos;
- ULONG nZchPos;
- USHORT Num;
+ sal_uLong nStdPos;
+ sal_uLong nZchPos;
+ sal_uInt16 Num;
pOutDev=&aOutDev;
DtHdOverSeek(rInp); // DataHeader weglesen
@@ -1029,8 +1029,8 @@ BOOL SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf )
rMtf.WindStart();
MapMode aMap(MAP_10TH_MM,Point(),Fraction(1,4),Fraction(1,4));
rMtf.SetPrefMapMode(aMap);
- rMtf.SetPrefSize(Size((INT16)aPage.Paper.Size.x,(INT16)aPage.Paper.Size.y));
- bRet=TRUE;
+ rMtf.SetPrefSize(Size((sal_Int16)aPage.Paper.Size.x,(sal_Int16)aPage.Paper.Size.y));
+ bRet=sal_True;
return bRet;
}
@@ -1045,18 +1045,18 @@ BOOL SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf )
|* Letzte Aenderung JOE 23.06.93
|*
*************************************************************************/
-BOOL SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath )
+sal_Bool SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath )
{
#if OSL_DEBUG_LEVEL > 1 // Recordgroessen checken. Neuer Compiler hat vielleichte anderes Alignment!
- if (sizeof(ObjTextType)!=ObjTextTypeSize) return FALSE;
+ if (sizeof(ObjTextType)!=ObjTextTypeSize) return sal_False;
#endif
- ULONG nFileStart; // Offset des SgfHeaders. Im allgemeinen 0.
+ sal_uLong nFileStart; // Offset des SgfHeaders. Im allgemeinen 0.
SgfHeader aHead;
SgfEntry aEntr;
- ULONG nNext;
- BOOL bRdFlag=FALSE; // Grafikentry gelesen ?
- BOOL bRet=FALSE; // Returncode
+ sal_uLong nNext;
+ sal_Bool bRdFlag=sal_False; // Grafikentry gelesen ?
+ sal_Bool bRet=sal_False; // Returncode
aIniPath.Append( String::CreateFromAscii( "sgf.ini", 7 ) );
// aIniPath.ToAbs();
@@ -1077,7 +1077,7 @@ BOOL SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath )
}
} // while(nNext)
if (bRdFlag) {
- if (!rInp.GetError()) bRet=TRUE; // Scheinbar Ok
+ if (!rInp.GetError()) bRet=sal_True; // Scheinbar Ok
}
}
delete pSgfFonts;
@@ -1085,7 +1085,7 @@ BOOL SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath )
}
/*
-Bitmap Dither(BYTE Intens)
+Bitmap Dither(sal_uInt8 Intens)
{
Bitmap aBmp;
BmpInfoHeader Info;
diff --git a/svtools/source/filter.vcl/filter/sgvspln.cxx b/svtools/source/filter.vcl/filter/sgvspln.cxx
index d695e171a194..aac7e1f04e0a 100644
--- a/svtools/source/filter.vcl/filter/sgvspln.cxx
+++ b/svtools/source/filter.vcl/filter/sgvspln.cxx
@@ -140,10 +140,6 @@ short basis() /* BASIS maschinenunabhaengig bestimmen */
#define NEGMAX -POSMIN /* groesste negative Zahl */
#define NEGMIN -POSMAX /* kleinste negative Zahl */
-#define TRUE 1
-#define FALSE 0
-
-
/* Definition von Funktionsmakros:
*/
@@ -170,7 +166,7 @@ short basis() /* BASIS maschinenunabhaengig bestimmen */
/*---------------------- MODUL TRIDIAGONAL ------------------------*/
-USHORT TriDiagGS(BOOL rep, USHORT n, double* lower,
+sal_uInt16 TriDiagGS(sal_Bool rep, sal_uInt16 n, double* lower,
double* diag, double* upper, double* b)
/************************/
/* GAUSS-Verfahren fuer */
@@ -207,7 +203,7 @@ USHORT TriDiagGS(BOOL rep, USHORT n, double* lower,
/* */
/* Eingabeparameter: */
/* ================ */
-/* n Dimension der Matrix ( > 1 ) USHORT n */
+/* n Dimension der Matrix ( > 1 ) sal_uInt16 n */
/* */
/* lower untere Nebendiagonale double lower[n] */
/* diag Hauptdiagonale double diag[n] */
@@ -217,7 +213,7 @@ USHORT TriDiagGS(BOOL rep, USHORT n, double* lower,
/* Dreieckzerlegung der Ausgangsmatrix. */
/* */
/* b rechte Seite des Systems double b[n] */
-/* rep = 0 erstmaliger Aufruf BOOL rep */
+/* rep = 0 erstmaliger Aufruf sal_Bool rep */
/* !=0 wiederholter Aufruf */
/* fuer gleiche Matrix, */
/* aber verschiedenes b. */
@@ -251,7 +247,7 @@ USHORT TriDiagGS(BOOL rep, USHORT n, double* lower,
/*.cp 5 */
{
- USHORT i;
+ sal_uInt16 i;
short j;
// double fabs(double);
@@ -302,7 +298,7 @@ USHORT TriDiagGS(BOOL rep, USHORT n, double* lower,
/*---------------- MODUL ZYKLISCH TRIDIAGONAL ----------------------*/
-USHORT ZyklTriDiagGS(BOOL rep, USHORT n, double* lower, double* diag,
+sal_uInt16 ZyklTriDiagGS(sal_Bool rep, sal_uInt16 n, double* lower, double* diag,
double* upper, double* lowrow, double* ricol, double* b)
/******************************/
/* Systeme mit zyklisch tri- */
@@ -343,12 +339,12 @@ USHORT ZyklTriDiagGS(BOOL rep, USHORT n, double* lower, double* diag,
/* */
/* Eingabeparameter: */
/* ================ */
-/* n Dimension der Matrix ( > 2 ) USHORT n */
+/* n Dimension der Matrix ( > 2 ) sal_uInt16 n */
/* lower untere Nebendiagonale double lower[n] */
/* diag Hauptdiagonale double diag[n] */
/* upper obere Nebendiagonale double upper[n] */
/* b rechte Seite des Systems double b[n] */
-/* rep = 0 erstmaliger Aufruf BOOL rep */
+/* rep = 0 erstmaliger Aufruf sal_Bool rep */
/* !=0 wiederholter Aufruf */
/* fuer gleiche Matrix, */
/* aber verschiedenes b. */
@@ -385,7 +381,7 @@ USHORT ZyklTriDiagGS(BOOL rep, USHORT n, double* lower, double* diag,
/*.cp 5 */
{
double temp; // fabs(double);
- USHORT i;
+ sal_uInt16 i;
short j;
if ( n < 3 ) return(1);
@@ -458,15 +454,15 @@ USHORT ZyklTriDiagGS(BOOL rep, USHORT n, double* lower, double* diag,
|*
*************************************************************************/
-USHORT NaturalSpline(USHORT n, double* x, double* y,
+sal_uInt16 NaturalSpline(sal_uInt16 n, double* x, double* y,
double Marg0, double MargN,
- BYTE MargCond,
+ sal_uInt8 MargCond,
double* b, double* c, double* d)
{
- USHORT i;
+ sal_uInt16 i;
double* a;
double* h;
- USHORT error;
+ sal_uInt16 error;
if (n<2) return 1;
if ( (MargCond & ~3) ) return 2;
@@ -516,7 +512,7 @@ USHORT NaturalSpline(USHORT n, double* x, double* y,
if (n==2) {
c[1]=a[0]/d[0];
} else {
- error=TriDiagGS(FALSE,n-1,b,d,c,a);
+ error=TriDiagGS(sal_False,n-1,b,d,c,a);
if (error!=0) { delete[] a; delete[] h; return error+2; }
for (i=0;i<n-1;i++) c[i+1]=a[i];
}
@@ -567,11 +563,11 @@ USHORT NaturalSpline(USHORT n, double* x, double* y,
*************************************************************************/
-USHORT PeriodicSpline(USHORT n, double* x, double* y,
+sal_uInt16 PeriodicSpline(sal_uInt16 n, double* x, double* y,
double* b, double* c, double* d)
{ // Arrays muessen von [0..n] dimensioniert sein!
- USHORT Error;
- USHORT i,im1,nm1; //integer
+ sal_uInt16 Error;
+ sal_uInt16 i,im1,nm1; //integer
double hr,hl;
double* a;
double* lowrow;
@@ -608,7 +604,7 @@ USHORT PeriodicSpline(USHORT n, double* x, double* y,
lowrow[0]=hr;
ricol[0]=hr;
a[nm1]=3.0*((y[1]-y[0])/hr-(y[n]-y[nm1])/hl);
- Error=ZyklTriDiagGS(FALSE,n,b,d,c,lowrow,ricol,a);
+ Error=ZyklTriDiagGS(sal_False,n,b,d,c,lowrow,ricol,a);
if ( Error != 0 )
{
delete[] a;
@@ -645,22 +641,22 @@ USHORT PeriodicSpline(USHORT n, double* x, double* y,
|*
*************************************************************************/
-USHORT ParaSpline(USHORT n, double* x, double* y, BYTE MargCond,
+sal_uInt16 ParaSpline(sal_uInt16 n, double* x, double* y, sal_uInt8 MargCond,
double Marg01, double Marg02,
double MargN1, double MargN2,
- BOOL CondT, double* T,
+ sal_Bool CondT, double* T,
double* bx, double* cx, double* dx,
double* by, double* cy, double* dy)
{
- USHORT Error,Marg;
- USHORT i;
+ sal_uInt16 Error,Marg;
+ sal_uInt16 i;
double deltX,deltY,delt,
alphX = 0,alphY = 0,
betX = 0,betY = 0;
if (n<2) return 1;
if ((MargCond & ~3) && (MargCond != 4)) return 2; // ungueltige Randbedingung
- if (CondT==FALSE) {
+ if (CondT==sal_False) {
T[0]=0.0;
for (i=0;i<n;i++) {
deltX=x[i+1]-x[i]; deltY=y[i+1]-y[i];
@@ -724,7 +720,7 @@ USHORT ParaSpline(USHORT n, double* x, double* y, BYTE MargCond,
|* Polygons werden als Stuetzstellen angenommen.
|* n liefert die Anzahl der Teilpolynome.
|* Ist die Berechnung fehlerfrei verlaufen, so
-|* liefert die Funktion TRUE. Nur in diesem Fall
+|* liefert die Funktion sal_True. Nur in diesem Fall
|* ist Speicher fuer die Koeffizientenarrays
|* allokiert, der dann spaeter vom Aufrufer mittels
|* delete freizugeben ist.
@@ -733,14 +729,14 @@ USHORT ParaSpline(USHORT n, double* x, double* y, BYTE MargCond,
|*
*************************************************************************/
-BOOL CalcSpline(Polygon& rPoly, BOOL Periodic, USHORT& n,
+sal_Bool CalcSpline(Polygon& rPoly, sal_Bool Periodic, sal_uInt16& n,
double*& ax, double*& ay, double*& bx, double*& by,
double*& cx, double*& cy, double*& dx, double*& dy, double*& T)
{
- BYTE Marg;
+ sal_uInt8 Marg;
double Marg01,Marg02;
double MargN1,MargN2;
- USHORT i;
+ sal_uInt16 i;
Point P0(-32768,-32768);
Point Pt;
@@ -782,12 +778,12 @@ BOOL CalcSpline(Polygon& rPoly, BOOL Periodic, USHORT& n,
MargN2=0.0;
if (n>0) n--; // n Korregieren (Anzahl der Teilpolynome)
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( ( Marg == 3 && n >= 3 ) || ( Marg == 2 && n >= 2 ) )
{
- bRet = ParaSpline(n,ax,ay,Marg,Marg01,Marg01,MargN1,MargN2,FALSE,T,bx,cx,dx,by,cy,dy) == 0;
+ bRet = ParaSpline(n,ax,ay,Marg,Marg01,Marg01,MargN1,MargN2,sal_False,T,bx,cx,dx,by,cy,dy) == 0;
}
- if ( bRet == FALSE )
+ if ( bRet == sal_False )
{
delete[] ax;
delete[] ay;
@@ -811,7 +807,7 @@ BOOL CalcSpline(Polygon& rPoly, BOOL Periodic, USHORT& n,
|* Beschreibung Konvertiert einen parametrichen kubischen
|* Polynomspline Spline (natuerlich oder periodisch)
|* in ein angenaehertes Polygon.
-|* Die Funktion liefert FALSE, wenn ein Fehler bei
+|* Die Funktion liefert sal_False, wenn ein Fehler bei
|* der Koeffizientenberechnung aufgetreten ist oder
|* das Polygon zu gross wird (>PolyMax=16380). Im 1.
|* Fall hat das Polygon 0, im 2. Fall PolyMax Punkte.
@@ -821,7 +817,7 @@ BOOL CalcSpline(Polygon& rPoly, BOOL Periodic, USHORT& n,
|* Letzte Aenderung JOE 23.06.93
|*
*************************************************************************/
-BOOL Spline2Poly(Polygon& rSpln, BOOL Periodic, Polygon& rPoly)
+sal_Bool Spline2Poly(Polygon& rSpln, sal_Bool Periodic, Polygon& rPoly)
{
short MinKoord=-32000; // zur Vermeidung
short MaxKoord=32000; // von Ueberlaeufen
@@ -839,11 +835,11 @@ BOOL Spline2Poly(Polygon& rSpln, BOOL Periodic, Polygon& rPoly)
double Step; // Schrittweite fuer t
double dt1,dt2,dt3; // Delta t, y, ^3
double t;
- BOOL bEnde; // Teilpolynom zu Ende?
- USHORT n; // Anzahl der zu zeichnenden Teilpolynome
- USHORT i; // aktuelles Teilpolynom
- BOOL bOk; // noch alles ok?
- USHORT PolyMax=16380;// Maximale Anzahl von Polygonpunkten
+ sal_Bool bEnde; // Teilpolynom zu Ende?
+ sal_uInt16 n; // Anzahl der zu zeichnenden Teilpolynome
+ sal_uInt16 i; // aktuelles Teilpolynom
+ sal_Bool bOk; // noch alles ok?
+ sal_uInt16 PolyMax=16380;// Maximale Anzahl von Polygonpunkten
long x,y;
bOk=CalcSpline(rSpln,Periodic,n,ax,ay,bx,by,cx,cy,dx,dy,tv);
@@ -855,7 +851,7 @@ BOOL Spline2Poly(Polygon& rSpln, BOOL Periodic, Polygon& rPoly)
i=0;
while (i<n) { // n Teilpolynome malen
t=tv[i]+Step;
- bEnde=FALSE;
+ bEnde=sal_False;
while (!bEnde) { // ein Teilpolynom interpolieren
bEnde=t>=tv[i+1];
if (bEnde) t=tv[i+1];
@@ -868,7 +864,7 @@ BOOL Spline2Poly(Polygon& rSpln, BOOL Periodic, Polygon& rPoly)
rPoly.SetSize(rPoly.GetSize()+1);
rPoly.SetPoint(Point(short(x),short(y)),rPoly.GetSize()-1);
} else {
- bOk=FALSE; // Fehler: Polygon wird zu gross
+ bOk=sal_False; // Fehler: Polygon wird zu gross
}
t=t+Step;
} // Ende von Teilpolynom
@@ -886,5 +882,5 @@ BOOL Spline2Poly(Polygon& rSpln, BOOL Periodic, Polygon& rPoly)
return bOk;
} // Ende von if (bOk)
rPoly.SetSize(0);
- return FALSE;
+ return sal_False;
}
diff --git a/svtools/source/filter.vcl/filter/sgvtext.cxx b/svtools/source/filter.vcl/filter/sgvtext.cxx
index 9a82cd486599..f0130b21c9d6 100644
--- a/svtools/source/filter.vcl/filter/sgvtext.cxx
+++ b/svtools/source/filter.vcl/filter/sgvtext.cxx
@@ -213,9 +213,9 @@ extern SgfFontLst* pSgfFonts;
/////////////////////////////////////////////////////////////////////////////////
-BOOL CheckTextOutl(ObjAreaType& F, ObjLineType& L);
+sal_Bool CheckTextOutl(ObjAreaType& F, ObjLineType& L);
-BOOL CheckTextOutl(ObjAreaType& F, ObjLineType& L)
+sal_Bool CheckTextOutl(ObjAreaType& F, ObjLineType& L)
{
return (F.FIntens!=L.LIntens) ||
((F.FFarbe!=L.LFarbe) && (F.FIntens>0)) ||
@@ -261,11 +261,11 @@ short Sgf2hPoint(short a)
// Unterkante berechnen. Alles in SGF-Units.
// ======================================================================
-USHORT GetTopToBaseLine(USHORT MaxGrad)
+sal_uInt16 GetTopToBaseLine(sal_uInt16 MaxGrad)
{
long ret;
ret=long(MaxGrad)*long(CharTopToBase) /long(100);
- return USHORT(ret);
+ return sal_uInt16(ret);
}
// ======================================================================
@@ -306,9 +306,9 @@ UCHAR ConvertTextChar(UCHAR c)
-USHORT GetSchnittBit(UCHAR c)
+sal_uInt16 GetSchnittBit(UCHAR c)
{
- USHORT r=0;
+ sal_uInt16 r=0;
switch (c) {
case EscBold : r=TextBoldBit; break;
case EscRSlnt: r=TextRSlnBit; break;
@@ -349,10 +349,10 @@ long ChgValue(long Def, long Min, long Max, UCHAR FlgVal, long NumVal)
-void ChgSchnittBit(USHORT Bit, USHORT Radio1, USHORT Radio2, USHORT Radio3,
- UCHAR FlgVal, USHORT Schnitt0, USHORT& Schnitt)
+void ChgSchnittBit(sal_uInt16 Bit, sal_uInt16 Radio1, sal_uInt16 Radio2, sal_uInt16 Radio3,
+ UCHAR FlgVal, sal_uInt16 Schnitt0, sal_uInt16& Schnitt)
{
- USHORT All,Rad;
+ sal_uInt16 All,Rad;
Rad=Radio1 | Radio2 | Radio3;
All=Bit | Rad;
@@ -367,9 +367,9 @@ void ChgSchnittBit(USHORT Bit, USHORT Radio1, USHORT Radio2, USHORT Radio3,
-UCHAR GetNextChar(UCHAR* TBuf, USHORT Index)
+UCHAR GetNextChar(UCHAR* TBuf, sal_uInt16 Index)
{
- USHORT Cnt;
+ sal_uInt16 Cnt;
while (TBuf[Index]==Escape) {
Index++;
Cnt=0;
@@ -382,24 +382,24 @@ UCHAR GetNextChar(UCHAR* TBuf, USHORT Index)
-UCHAR ProcessOne(UCHAR* TBuf, USHORT& Index,
+UCHAR ProcessOne(UCHAR* TBuf, sal_uInt16& Index,
ObjTextType& Atr0, ObjTextType& AktAtr,
- BOOL ScanEsc)
+ sal_Bool ScanEsc)
{
UCHAR c;
UCHAR Ident;
- BOOL Ende;
- BOOL q;
+ sal_Bool Ende;
+ sal_Bool q;
UCHAR FlgVal;
long NumVal;
long Sgn;
short i;
- BOOL EoVal;
+ sal_Bool EoVal;
do {
c=TBuf[Index]; Index++;
Ende=(c!=Escape);
- if (Ende==FALSE) {
+ if (Ende==sal_False) {
c=TBuf[Index]; Index++;
Ident=c; // Identifer merken
FlgVal=EscNoFlg;
@@ -413,36 +413,36 @@ UCHAR ProcessOne(UCHAR* TBuf, USHORT& Index,
do {
NumVal=10*NumVal+c-'0';
EoVal=(TBuf[Index]<'0' || TBuf[Index]>'9');
- if (EoVal==FALSE) { c=TBuf[Index]; Index++; }
+ if (EoVal==sal_False) { c=TBuf[Index]; Index++; }
i--;
- } while (i>0 && EoVal==FALSE);
+ } while (i>0 && EoVal==sal_False);
NumVal=Sgn*NumVal;
}
q=!CheckTextOutl(AktAtr.F,AktAtr.L);
switch (Ident) {
- case EscFont : AktAtr.SetFont(ULONG (ChgValue(Atr0.GetFont(),0,0 ,FlgVal,NumVal)));break;
- case EscGrad : AktAtr.Grad =USHORT(ChgValue(Atr0.Grad, 2,2000 ,FlgVal,NumVal)); break;
- case EscBreit: AktAtr.Breite =USHORT(ChgValue(Atr0.Breite, 1,1000 ,FlgVal,NumVal)); break;
- case EscKaptS: AktAtr.Kapit =(BYTE)(ChgValue(Atr0.Kapit, 1,255 ,FlgVal,NumVal)); break;
- case EscLFeed: AktAtr.LnFeed =USHORT(ChgValue(Atr0.LnFeed, 1,65535 ,FlgVal,NumVal)); break;
- case EscSlant: AktAtr.Slant =USHORT(ChgValue(Atr0.Slant, 1,MaxCharSlant ,FlgVal,NumVal)); break;
+ case EscFont : AktAtr.SetFont(sal_uLong (ChgValue(Atr0.GetFont(),0,0 ,FlgVal,NumVal)));break;
+ case EscGrad : AktAtr.Grad =sal_uInt16(ChgValue(Atr0.Grad, 2,2000 ,FlgVal,NumVal)); break;
+ case EscBreit: AktAtr.Breite =sal_uInt16(ChgValue(Atr0.Breite, 1,1000 ,FlgVal,NumVal)); break;
+ case EscKaptS: AktAtr.Kapit =(sal_uInt8)(ChgValue(Atr0.Kapit, 1,255 ,FlgVal,NumVal)); break;
+ case EscLFeed: AktAtr.LnFeed =sal_uInt16(ChgValue(Atr0.LnFeed, 1,65535 ,FlgVal,NumVal)); break;
+ case EscSlant: AktAtr.Slant =sal_uInt16(ChgValue(Atr0.Slant, 1,MaxCharSlant ,FlgVal,NumVal)); break;
case EscVPos : AktAtr.ChrVPos=char (ChgValue(Atr0.ChrVPos,-128,127 ,FlgVal,NumVal)); break;
- case EscZAbst: AktAtr.ZAbst =(BYTE)(ChgValue(Atr0.ZAbst, 1,255 ,FlgVal,NumVal)); break;
- case EscHJust: AktAtr.Justify=(BYTE)(ChgValue(Atr0.Justify & 0x0F,0,5 ,FlgVal,NumVal)); break;
- case EscFarbe: { AktAtr.L.LFarbe =(BYTE)(ChgValue(Atr0.L.LFarbe,0,7 ,FlgVal,NumVal)); if (q) AktAtr.F.FFarbe =AktAtr.L.LFarbe; } break;
- case EscBFarb: { AktAtr.L.LBFarbe=(BYTE)(ChgValue(Atr0.L.LBFarbe,0,255,FlgVal,NumVal)); if (q) AktAtr.F.FBFarbe=AktAtr.L.LBFarbe; } break;
- case EscInts : { AktAtr.L.LIntens=(BYTE)(ChgValue(Atr0.L.LIntens,0,100,FlgVal,NumVal)); if (q) AktAtr.F.FIntens=AktAtr.L.LIntens; } break;
-
- case EscMustr: { AktAtr.F.FMuster=USHORT(ChgValue(Atr0.F.FMuster,0,65535,FlgVal,NumVal)); } break;
- case EscMFarb: { AktAtr.F.FFarbe =(BYTE)(ChgValue(Atr0.F.FFarbe,0,7 ,FlgVal,NumVal)); } break;
- case EscMBFrb: { AktAtr.F.FBFarbe=(BYTE)(ChgValue(Atr0.F.FBFarbe,0,255,FlgVal,NumVal)); } break;
- case EscMInts: { AktAtr.F.FIntens=(BYTE)(ChgValue(Atr0.F.FIntens,0,100,FlgVal,NumVal)); } break;
-
- case EscSMstr: { AktAtr.ShdF.FMuster=USHORT(ChgValue(Atr0.ShdF.FMuster,0,65535,FlgVal,NumVal)); } break;
- case EscSFarb: { AktAtr.ShdL.LFarbe =(BYTE)(ChgValue(Atr0.ShdL.LFarbe,0,7 ,FlgVal,NumVal)); AktAtr.ShdF.FFarbe =AktAtr.ShdL.LFarbe; } break;
- case EscSBFrb: { AktAtr.ShdL.LBFarbe=(BYTE)(ChgValue(Atr0.ShdL.LBFarbe,0,255,FlgVal,NumVal)); AktAtr.ShdF.FBFarbe=AktAtr.ShdL.LBFarbe; } break;
- case EscSInts: { AktAtr.ShdL.LIntens=(BYTE)(ChgValue(Atr0.ShdL.LIntens,0,100,FlgVal,NumVal)); AktAtr.ShdF.FIntens=AktAtr.ShdL.LIntens; } break;
+ case EscZAbst: AktAtr.ZAbst =(sal_uInt8)(ChgValue(Atr0.ZAbst, 1,255 ,FlgVal,NumVal)); break;
+ case EscHJust: AktAtr.Justify=(sal_uInt8)(ChgValue(Atr0.Justify & 0x0F,0,5 ,FlgVal,NumVal)); break;
+ case EscFarbe: { AktAtr.L.LFarbe =(sal_uInt8)(ChgValue(Atr0.L.LFarbe,0,7 ,FlgVal,NumVal)); if (q) AktAtr.F.FFarbe =AktAtr.L.LFarbe; } break;
+ case EscBFarb: { AktAtr.L.LBFarbe=(sal_uInt8)(ChgValue(Atr0.L.LBFarbe,0,255,FlgVal,NumVal)); if (q) AktAtr.F.FBFarbe=AktAtr.L.LBFarbe; } break;
+ case EscInts : { AktAtr.L.LIntens=(sal_uInt8)(ChgValue(Atr0.L.LIntens,0,100,FlgVal,NumVal)); if (q) AktAtr.F.FIntens=AktAtr.L.LIntens; } break;
+
+ case EscMustr: { AktAtr.F.FMuster=sal_uInt16(ChgValue(Atr0.F.FMuster,0,65535,FlgVal,NumVal)); } break;
+ case EscMFarb: { AktAtr.F.FFarbe =(sal_uInt8)(ChgValue(Atr0.F.FFarbe,0,7 ,FlgVal,NumVal)); } break;
+ case EscMBFrb: { AktAtr.F.FBFarbe=(sal_uInt8)(ChgValue(Atr0.F.FBFarbe,0,255,FlgVal,NumVal)); } break;
+ case EscMInts: { AktAtr.F.FIntens=(sal_uInt8)(ChgValue(Atr0.F.FIntens,0,100,FlgVal,NumVal)); } break;
+
+ case EscSMstr: { AktAtr.ShdF.FMuster=sal_uInt16(ChgValue(Atr0.ShdF.FMuster,0,65535,FlgVal,NumVal)); } break;
+ case EscSFarb: { AktAtr.ShdL.LFarbe =(sal_uInt8)(ChgValue(Atr0.ShdL.LFarbe,0,7 ,FlgVal,NumVal)); AktAtr.ShdF.FFarbe =AktAtr.ShdL.LFarbe; } break;
+ case EscSBFrb: { AktAtr.ShdL.LBFarbe=(sal_uInt8)(ChgValue(Atr0.ShdL.LBFarbe,0,255,FlgVal,NumVal)); AktAtr.ShdF.FBFarbe=AktAtr.ShdL.LBFarbe; } break;
+ case EscSInts: { AktAtr.ShdL.LIntens=(sal_uInt8)(ChgValue(Atr0.ShdL.LIntens,0,100,FlgVal,NumVal)); AktAtr.ShdF.FIntens=AktAtr.ShdL.LIntens; } break;
case EscSDist: { AktAtr.ShdVers.x=(short)ChgValue(Atr0.ShdVers.x,0,30000,FlgVal,NumVal); AktAtr.ShdVers.y=AktAtr.ShdVers.x; } break;
case EscSXDst: { AktAtr.ShdVers.x=(short)ChgValue(Atr0.ShdVers.x,0,30000,FlgVal,NumVal); } break;
case EscSYDst: { AktAtr.ShdVers.y=(short)ChgValue(Atr0.ShdVers.y,0,30000,FlgVal,NumVal); } break;
@@ -463,21 +463,21 @@ UCHAR ProcessOne(UCHAR* TBuf, USHORT& Index,
case EscEbShd: ChgSchnittBit(TextShEbBit,TextSh2DBit,TextSh3DBit,TextSh4DBit,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break;
} //endcase
if (TBuf[Index]==Escape) Index++; // zweites Esc weglesen }
- } // if Ende==FALSE
- } while (Ende==FALSE && ScanEsc==FALSE);
- if (Ende==FALSE) c=Escape;
+ } // if Ende==sal_False
+ } while (Ende==sal_False && ScanEsc==sal_False);
+ if (Ende==sal_False) c=Escape;
return c;
} // end of ProcessOne
-UCHAR GetTextChar(UCHAR* TBuf, USHORT& Index,
+UCHAR GetTextChar(UCHAR* TBuf, sal_uInt16& Index,
ObjTextType& Atr0, ObjTextType& AktAtr,
- USHORT Rest, BOOL ScanEsc)
+ sal_uInt16 Rest, sal_Bool ScanEsc)
{
UCHAR c,c0,nc;
c=ProcessOne(TBuf,Index,Atr0,AktAtr,ScanEsc);
- if (ScanEsc==FALSE) {
+ if (ScanEsc==sal_False) {
if (c==SoftTrennAdd || c==SoftTrennK || c==SoftTrenn) {
nc=GetNextChar(TBuf,Index);
c0=c;
@@ -507,9 +507,9 @@ UCHAR GetTextChar(UCHAR* TBuf, USHORT& Index,
-UCHAR GetTextCharConv(UCHAR* TBuf, USHORT& Index,
+UCHAR GetTextCharConv(UCHAR* TBuf, sal_uInt16& Index,
ObjTextType& Atr0, ObjTextType& AktAtr,
- USHORT Rest, BOOL ScanEsc)
+ sal_uInt16 Rest, sal_Bool ScanEsc)
{
UCHAR c;
@@ -530,23 +530,23 @@ UCHAR GetTextCharConv(UCHAR* TBuf, USHORT& Index,
//
// Benoetigter Zeilenabstand in SGF-Units. ChrVPos wird beruecksichtigt.
// ======================================================================
-USHORT GetLineFeed(UCHAR* TBuf, USHORT Index, ObjTextType Atr0, ObjTextType AktAtr,
- USHORT nChar, USHORT& LF, USHORT& MaxGrad)
+sal_uInt16 GetLineFeed(UCHAR* TBuf, sal_uInt16 Index, ObjTextType Atr0, ObjTextType AktAtr,
+ sal_uInt16 nChar, sal_uInt16& LF, sal_uInt16& MaxGrad)
{
UCHAR c=0;
- BOOL AbsEnd=FALSE;
- ULONG LF100=0;
- ULONG MaxLF100=0;
- BOOL LFauto=0;
- BOOL First=TRUE;
- USHORT Grad;
- USHORT i=0;
- USHORT r=1;
+ sal_Bool AbsEnd=sal_False;
+ sal_uLong LF100=0;
+ sal_uLong MaxLF100=0;
+ sal_Bool LFauto=0;
+ sal_Bool First=sal_True;
+ sal_uInt16 Grad;
+ sal_uInt16 i=0;
+ sal_uInt16 r=1;
MaxGrad=0;
while (!AbsEnd && nChar>0) {
nChar--;
- c=GetTextChar(TBuf,Index,Atr0,AktAtr,nChar,FALSE);
+ c=GetTextChar(TBuf,Index,Atr0,AktAtr,nChar,sal_False);
i++;
AbsEnd=(c==TextEnd || c==AbsatzEnd);
if (First || (!AbsEnd && c!=' ' && c!=HardTrenn)) {
@@ -558,15 +558,15 @@ USHORT GetLineFeed(UCHAR* TBuf, USHORT Index, ObjTextType Atr0, ObjTextType AktA
Grad=AktAtr.Grad;
if (AktAtr.ChrVPos>0) Grad=Grad-AktAtr.ChrVPos;
if (Grad>MaxGrad) MaxGrad=Grad;
- First=FALSE;
+ First=sal_False;
}
if (!AbsEnd && c!=' ') r=i;
}
MaxGrad=hPoint2Sgf(MaxGrad);
if (MaxLF100<=4000) { // sonst Overflowgefahr
- LF=USHORT(hPoint2Sgf(short(MaxLF100)) /100);
+ LF=sal_uInt16(hPoint2Sgf(short(MaxLF100)) /100);
} else {
- LF=USHORT(hPoint2Sgf(short(MaxLF100) /100));
+ LF=sal_uInt16(hPoint2Sgf(short(MaxLF100) /100));
}
return r;
@@ -588,17 +588,17 @@ USHORT GetLineFeed(UCHAR* TBuf, USHORT Index, ObjTextType Atr0, ObjTextType AktA
#define SuperSubFact 60 /* SuperScript/SubScript: 60% vom Schriftgrad */
#define DefaultSpace 40 /* Default: Space ist 40% vom SchriftGrad */
-USHORT SetTextContext(OutputDevice& rOut, ObjTextType& Atr, BOOL Kapt, USHORT Dreh,
- USHORT FitXMul, USHORT FitXDiv, USHORT FitYMul, USHORT FitYDiv)
+sal_uInt16 SetTextContext(OutputDevice& rOut, ObjTextType& Atr, sal_Bool Kapt, sal_uInt16 Dreh,
+ sal_uInt16 FitXMul, sal_uInt16 FitXDiv, sal_uInt16 FitYMul, sal_uInt16 FitYDiv)
{
SgfFontOne* pSgfFont; // Font aus dem IniFile
Font aFont;
Color aColor;
- ULONG Grad;
- ULONG Brei;
+ sal_uLong Grad;
+ sal_uLong Brei;
String FNam;
- USHORT StdBrei=50; // Durchschnittliche Zeichenbreite in % von Schriftgrad
- BOOL bFit=(FitXMul!=1 || FitXDiv!=1 || FitYMul!=1 || FitYDiv!=1);
+ sal_uInt16 StdBrei=50; // Durchschnittliche Zeichenbreite in % von Schriftgrad
+ sal_Bool bFit=(FitXMul!=1 || FitXDiv!=1 || FitYMul!=1 || FitYDiv!=1);
pSgfFont = pSgfFonts->GetFontDesc(Atr.GetFont());
@@ -649,25 +649,25 @@ USHORT SetTextContext(OutputDevice& rOut, ObjTextType& Atr, BOOL Kapt, USHORT Dr
//aFont.SetCharSet(CHARSET_SYSTEM);
}
- Grad=ULONG(Atr.Grad);
- if ((Atr.Schnitt & TextKaptBit) !=0 && Kapt) Grad=Grad*ULONG(Atr.Kapit)/100;
+ Grad=sal_uLong(Atr.Grad);
+ if ((Atr.Schnitt & TextKaptBit) !=0 && Kapt) Grad=Grad*sal_uLong(Atr.Kapit)/100;
if ((Atr.Schnitt & TextSupSBit) !=0 || (Atr.Schnitt & TextSubSBit) !=0) Grad=Grad*SuperSubFact/100;
Brei=Grad;
if (Atr.Breite!=100 || bFit) {
if (bFit) {
- Grad=Grad*ULONG(FitYMul)/ULONG(FitYDiv);
- Brei=Brei*ULONG(FitXMul)/ULONG(FitXDiv);
+ Grad=Grad*sal_uLong(FitYMul)/sal_uLong(FitYDiv);
+ Brei=Brei*sal_uLong(FitXMul)/sal_uLong(FitXDiv);
}
- Brei=Brei*ULONG(Atr.Breite)/100;
- Brei=Brei*ULONG(StdBrei)/100;
- aFont.SetSize(Size(hPoint2Sgf(USHORT(Brei)),hPoint2Sgf(USHORT(Grad))));
+ Brei=Brei*sal_uLong(Atr.Breite)/100;
+ Brei=Brei*sal_uLong(StdBrei)/100;
+ aFont.SetSize(Size(hPoint2Sgf(sal_uInt16(Brei)),hPoint2Sgf(sal_uInt16(Grad))));
} else {
- aFont.SetSize(Size(0,hPoint2Sgf(USHORT(Grad))));
+ aFont.SetSize(Size(0,hPoint2Sgf(sal_uInt16(Grad))));
}
aColor=Sgv2SvFarbe(Atr.L.LFarbe,Atr.L.LBFarbe,Atr.L.LIntens); aFont.SetColor(aColor);
aColor=Sgv2SvFarbe(Atr.F.FFarbe,Atr.F.FBFarbe,Atr.F.FIntens); aFont.SetFillColor(aColor);
- aFont.SetTransparent(TRUE);
+ aFont.SetTransparent(sal_True);
aFont.SetAlign(ALIGN_BASELINE);
Dreh/=10; Dreh=3600-Dreh; if (Dreh==3600) Dreh=0;
@@ -679,11 +679,11 @@ USHORT SetTextContext(OutputDevice& rOut, ObjTextType& Atr, BOOL Kapt, USHORT Dr
if ((Atr.Schnitt & TextDbUnBit) !=0) aFont.SetUnderline(UNDERLINE_DOUBLE);
if ((Atr.Schnitt & TextStrkBit) !=0) aFont.SetStrikeout(STRIKEOUT_SINGLE);
if ((Atr.Schnitt & TextDbStBit) !=0) aFont.SetStrikeout(STRIKEOUT_DOUBLE);
- if ((Atr.Schnitt & TextSh2DBit) !=0) aFont.SetShadow(TRUE);
- if ((Atr.Schnitt & TextSh3DBit) !=0) aFont.SetShadow(TRUE);
- if ((Atr.Schnitt & TextSh4DBit) !=0) aFont.SetShadow(TRUE);
- if ((Atr.Schnitt & TextShEbBit) !=0) aFont.SetShadow(TRUE);
- if (CheckTextOutl(Atr.F,Atr.L)) aFont.SetOutline(TRUE);
+ if ((Atr.Schnitt & TextSh2DBit) !=0) aFont.SetShadow(sal_True);
+ if ((Atr.Schnitt & TextSh3DBit) !=0) aFont.SetShadow(sal_True);
+ if ((Atr.Schnitt & TextSh4DBit) !=0) aFont.SetShadow(sal_True);
+ if ((Atr.Schnitt & TextShEbBit) !=0) aFont.SetShadow(sal_True);
+ if (CheckTextOutl(Atr.F,Atr.L)) aFont.SetOutline(sal_True);
if (aFont!=rOut.GetFont()) rOut.SetFont(aFont);
@@ -702,26 +702,26 @@ USHORT SetTextContext(OutputDevice& rOut, ObjTextType& Atr, BOOL Kapt, USHORT Dr
// Absatz.Pas
struct ProcChrSta {
- USHORT Index;
- USHORT ChrXP;
+ sal_uInt16 Index;
+ sal_uInt16 ChrXP;
UCHAR OutCh;
- BOOL Kapt;
+ sal_Bool Kapt;
ObjTextType Attrib;
};
-void InitProcessCharState(ProcChrSta& State, ObjTextType& AktAtr, USHORT IndexA)
+void InitProcessCharState(ProcChrSta& State, ObjTextType& AktAtr, sal_uInt16 IndexA)
{
State.Attrib=AktAtr;
State.OutCh=0;
State.Index=IndexA;
State.ChrXP=0;
- State.Kapt=FALSE;
+ State.Kapt=sal_False;
}
-BOOL UpcasePossible(UCHAR c)
+sal_Bool UpcasePossible(UCHAR c)
{
- if ((c>='a' && c<='z') || c == 0xe4 || c == 0xf6 || c == 0xfc ) return TRUE;
- else return FALSE;
+ if ((c>='a' && c<='z') || c == 0xe4 || c == 0xf6 || c == 0xfc ) return sal_True;
+ else return sal_False;
}
UCHAR Upcase(UCHAR c)
@@ -733,15 +733,15 @@ UCHAR Upcase(UCHAR c)
return c;
}
-USHORT GetCharWidth(OutputDevice& rOut, UCHAR c)
+sal_uInt16 GetCharWidth(OutputDevice& rOut, UCHAR c)
{
UCHAR c1;
- USHORT ChrWidth;
+ sal_uInt16 ChrWidth;
c1 = ByteString::Convert((char)c,RTL_TEXTENCODING_IBM_437, gsl_getSystemTextEncoding() );
if (c==' ')
{
- ChrWidth=(USHORT)rOut.GetTextWidth( String('A') );
+ ChrWidth=(sal_uInt16)rOut.GetTextWidth( String('A') );
if (rOut.GetFont().GetPitch()!=PITCH_FIXED) {
ChrWidth=MulDiv(ChrWidth,DefaultSpace,100);
}
@@ -751,30 +751,30 @@ USHORT GetCharWidth(OutputDevice& rOut, UCHAR c)
OSL_ENSURE( MaxChar == 255, "MaxChar not 255" );
if (c>=MinChar /*&& c<=MaxChar*/)
{
- ChrWidth=(USHORT)rOut.GetTextWidth(String((char)c1));
+ ChrWidth=(sal_uInt16)rOut.GetTextWidth(String((char)c1));
}
else
{
- ChrWidth=(USHORT)rOut.GetTextWidth(String('A'));
+ ChrWidth=(sal_uInt16)rOut.GetTextWidth(String('A'));
}
}
return ChrWidth;
}
UCHAR ProcessChar(OutputDevice& rOut, UCHAR* TBuf, ProcChrSta& R, ObjTextType& Atr0,
- USHORT& nChars, USHORT Rest,
+ sal_uInt16& nChars, sal_uInt16 Rest,
short* Line, UCHAR* cLine)
{
- USHORT KernDist=0; // Wert fuer Kerning
- USHORT ChrWidth;
+ sal_uInt16 KernDist=0; // Wert fuer Kerning
+ sal_uInt16 ChrWidth;
UCHAR c;
UCHAR c1;
- BOOL AbsEnd;
+ sal_Bool AbsEnd;
- c=GetTextChar(TBuf,R.Index,Atr0,R.Attrib,Rest,FALSE); // versucht evtl. zu trennen, wenn Rest entsprechenden Wert besitzt
+ c=GetTextChar(TBuf,R.Index,Atr0,R.Attrib,Rest,sal_False); // versucht evtl. zu trennen, wenn Rest entsprechenden Wert besitzt
AbsEnd=(c==AbsatzEnd || c==TextEnd);
- if (AbsEnd==FALSE) {
+ if (AbsEnd==sal_False) {
R.OutCh=ConvertTextChar(c); // von HardTrenn nach '-', ...
R.Kapt=(R.Attrib.Schnitt & TextKaptBit) !=0 && UpcasePossible(R.OutCh);
if (R.Kapt) R.OutCh=Upcase(R.OutCh);
@@ -784,9 +784,9 @@ UCHAR ProcessChar(OutputDevice& rOut, UCHAR* TBuf, ProcChrSta& R, ObjTextType& A
ChrWidth=GetCharWidth(rOut,c1);
if (R.Attrib.ZAbst!=100) { // Spezial-Zeichenabstand ?
- ULONG Temp;
- Temp=ULONG(ChrWidth)*ULONG(R.Attrib.ZAbst)/100;
- ChrWidth=USHORT(Temp);
+ sal_uLong Temp;
+ Temp=sal_uLong(ChrWidth)*sal_uLong(R.Attrib.ZAbst)/100;
+ ChrWidth=sal_uInt16(Temp);
}
nChars++;
if (R.ChrXP>32000) R.ChrXP=32000;
@@ -797,44 +797,44 @@ UCHAR ProcessChar(OutputDevice& rOut, UCHAR* TBuf, ProcChrSta& R, ObjTextType& A
return c;
}
-void FormatLine(UCHAR* TBuf, USHORT& Index, ObjTextType& Atr0, ObjTextType& AktAtr,
- USHORT UmbWdt, USHORT AdjWdt,
- short* Line, USHORT& nChars,
+void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType& AktAtr,
+ sal_uInt16 UmbWdt, sal_uInt16 AdjWdt,
+ short* Line, sal_uInt16& nChars,
double, double,
- UCHAR* cLine, BOOL TextFit)
+ UCHAR* cLine, sal_Bool TextFit)
{
VirtualDevice vOut;
UCHAR c,c0;
UCHAR ct;
- BOOL First; // erster Char ?
- BYTE Just = 0; // Absatzformatierung
- BOOL Border; // Rand der Box erreicht ?
- BOOL Border0;
- BOOL AbsEnd; // Ende des Absatzes erreicht ?
+ sal_Bool First; // erster Char ?
+ sal_uInt8 Just = 0; // Absatzformatierung
+ sal_Bool Border; // Rand der Box erreicht ?
+ sal_Bool Border0;
+ sal_Bool AbsEnd; // Ende des Absatzes erreicht ?
ProcChrSta* R=new ProcChrSta;
ProcChrSta* R0=new ProcChrSta;
ProcChrSta* WErec=new ProcChrSta;
- USHORT WEnChar;
+ sal_uInt16 WEnChar;
ProcChrSta* WErec0=new ProcChrSta;
- USHORT WEnChar0;
+ sal_uInt16 WEnChar0;
ProcChrSta* TRrec=new ProcChrSta;
- USHORT TRnChar;
+ sal_uInt16 TRnChar;
- USHORT WordEndCnt; // Justieren und Trennen
- BOOL WordEnd;
- BOOL Trenn;
+ sal_uInt16 WordEndCnt; // Justieren und Trennen
+ sal_Bool WordEnd;
+ sal_Bool Trenn;
short BoxRest; // zum Quetschen und formatieren
- USHORT i,j,k,h;
- USHORT re,li;
+ sal_uInt16 i,j,k,h;
+ sal_uInt16 re,li;
vOut.SetMapMode(MapMode(MAP_10TH_MM,Point(),Fraction(1,4),Fraction(1,4)));
nChars=0;
- SetTextContext(vOut,AktAtr,FALSE,0,1,1,1,1);
+ SetTextContext(vOut,AktAtr,sal_False,0,1,1,1,1);
InitProcessCharState(*R,AktAtr,Index);
- (*R0)=(*R); (*WErec)=(*R); WEnChar=0; c0=0; Border0=FALSE;
- Border=FALSE; First=TRUE;
+ (*R0)=(*R); (*WErec)=(*R); WEnChar=0; c0=0; Border0=sal_False;
+ Border=sal_False; First=sal_True;
WordEndCnt=0;
do { // mal schauen, wieviele Worte so in die Zeile passen
@@ -862,16 +862,16 @@ void FormatLine(UCHAR* TBuf, USHORT& Index, ObjTextType& Atr0, ObjTextType& AktA
}
(*R0)=(*R); c0=c;
Border0=Border;
- First=FALSE;
+ First=sal_False;
AbsEnd=AbsEnd || (nChars>=MaxLineChars);
} while (!(AbsEnd || (Border && ((WordEndCnt>0) || WordEnd || Trenn))));
if (Border) { // Trennen und Quetschen
(*WErec0)=(*WErec); WEnChar0=WEnChar;
- AbsEnd=FALSE; c0=0;
+ AbsEnd=sal_False; c0=0;
(*R)=(*WErec); nChars=WEnChar;
(*TRrec)=(*R); TRnChar=nChars;
- Border0=FALSE; Border=FALSE;
+ Border0=sal_False; Border=sal_False;
do { // erst mal gucken wieviele Silben noch reinpassen
ct=ProcessChar(vOut,TBuf,*TRrec,Atr0,TRnChar,DoTrenn,Line,cLine);
c=ProcessChar(vOut,TBuf,*R,Atr0,nChars,NoTrenn,Line,cLine);
@@ -918,7 +918,7 @@ void FormatLine(UCHAR* TBuf, USHORT& Index, ObjTextType& Atr0, ObjTextType& AktA
if (!AbsEnd) {
do { // Leerzeichen weglesen
(*WErec)=(*R);
- c=GetTextChar(TBuf,R->Index,Atr0,R->Attrib,NoTrenn,FALSE);
+ c=GetTextChar(TBuf,R->Index,Atr0,R->Attrib,NoTrenn,sal_False);
nChars++;
Line[nChars]=R->ChrXP;
cLine[nChars]=c;
@@ -934,7 +934,7 @@ void FormatLine(UCHAR* TBuf, USHORT& Index, ObjTextType& Atr0, ObjTextType& AktA
nChars++; Line[nChars]=R->ChrXP; // Damit AbsatzEnde auch weggelesen wird
Line[nChars+1]=R->ChrXP; // denn die Breite von CR oder #0 ist nun mal sehr klein
if (TBuf[R->Index-1]!=AbsatzEnd && TBuf[R->Index-1]!=TextEnd) {
- c=GetTextChar(TBuf,R->Index,Atr0,R->Attrib,NoTrenn,FALSE); // Kleine Korrektur. Notig, wenn nur 1 Wort in
+ c=GetTextChar(TBuf,R->Index,Atr0,R->Attrib,NoTrenn,sal_False); // Kleine Korrektur. Notig, wenn nur 1 Wort in
}
}
@@ -1018,8 +1018,8 @@ void FormatLine(UCHAR* TBuf, USHORT& Index, ObjTextType& Atr0, ObjTextType& AktA
/////////////////////////////////////////////////////////////////////////////////
// DrawText.Pas
-void DrawChar(OutputDevice& rOut, UCHAR c, ObjTextType T, PointType Pos, USHORT DrehWink,
- USHORT FitXMul, USHORT FitXDiv, USHORT FitYMul, USHORT FitYDiv)
+void DrawChar(OutputDevice& rOut, UCHAR c, ObjTextType T, PointType Pos, sal_uInt16 DrehWink,
+ sal_uInt16 FitXMul, sal_uInt16 FitXDiv, sal_uInt16 FitYMul, sal_uInt16 FitYDiv)
{
SetTextContext(rOut,T,UpcasePossible(c),DrehWink,FitXMul,FitXDiv,FitYMul,FitYDiv);
if ((T.Schnitt & TextKaptBit)!=0 && UpcasePossible(c)) c=Upcase(c);
@@ -1041,32 +1041,32 @@ void TextType::Draw(OutputDevice& rOut)
if ((Flags & TextOutlBit)!=0) return; // Sourcetext fuer Outliner !!
ObjTextType T1,T2;
- USHORT Index1;
- USHORT Index2;
+ sal_uInt16 Index1;
+ sal_uInt16 Index2;
UCHAR c = TextEnd;
- USHORT l; // Anzahl der Zeichen in der Zeile
- USHORT i;
+ sal_uInt16 l; // Anzahl der Zeichen in der Zeile
+ sal_uInt16 i;
short yPos0;
short xPos;
short yPos;
- USHORT LF;
- USHORT MaxGrad;
+ sal_uInt16 LF;
+ sal_uInt16 MaxGrad;
short xSize;
short xSAdj;
short ySize;
double sn,cs;
- USHORT TopToBase;
- BOOL Ende = 0;
- USHORT lc;
- BOOL LineFit; // FitSize.x=0? oder Flags -> jede Zeile stretchen
- BOOL TextFit;
+ sal_uInt16 TopToBase;
+ sal_Bool Ende = 0;
+ sal_uInt16 lc;
+ sal_Bool LineFit; // FitSize.x=0? oder Flags -> jede Zeile stretchen
+ sal_Bool TextFit;
short* xLine;
UCHAR* cLine; // Buffer fuer FormatLine
- USHORT FitXMul;
- USHORT FitXDiv;
- USHORT FitYMul;
- USHORT FitYDiv;
- BOOL Fehler;
+ sal_uInt16 FitXMul;
+ sal_uInt16 FitXDiv;
+ sal_uInt16 FitYMul;
+ sal_uInt16 FitYDiv;
+ sal_Bool Fehler;
UCHAR* Buf=Buffer; // Zeiger auf die Buchstaben
pSgfFonts->ReadList();
@@ -1074,9 +1074,9 @@ void TextType::Draw(OutputDevice& rOut)
cLine=new UCHAR[CharLineSize];
TextFit=(Flags & TextFitBits)!=0;
- LineFit=FALSE;
+ LineFit=sal_False;
LineFit=((Flags & TextFitZBit)!=0);
- if (TextFit && FitSize.x==0) LineFit=TRUE;
+ if (TextFit && FitSize.x==0) LineFit=sal_True;
if (DrehWink==0) {
sn=0.0;
@@ -1091,9 +1091,9 @@ void TextType::Draw(OutputDevice& rOut)
ySize=Pos2.y-Pos1.y;
xSize=32000 /2; // Umbruch
xSAdj=Pos2.x-Pos1.x; // zum Ausrichten bei Zentriert/Blocksatz
- //if (xSize<=0) { xSize=32000 /2; LineFit=TRUE; }
- FitXMul=sal::static_int_cast< USHORT >(abs(Pos2.x-Pos1.x)); FitXDiv=FitSize.x; if (FitXDiv==0) FitXDiv=1;
- FitYMul=sal::static_int_cast< USHORT >(abs(Pos2.y-Pos1.y)); FitYDiv=FitSize.y; if (FitYDiv==0) FitYDiv=1;
+ //if (xSize<=0) { xSize=32000 /2; LineFit=sal_True; }
+ FitXMul=sal::static_int_cast< sal_uInt16 >(abs(Pos2.x-Pos1.x)); FitXDiv=FitSize.x; if (FitXDiv==0) FitXDiv=1;
+ FitYMul=sal::static_int_cast< sal_uInt16 >(abs(Pos2.y-Pos1.y)); FitYDiv=FitSize.y; if (FitYDiv==0) FitYDiv=1;
} else {
xSize=Pos2.x-Pos1.x;
xSAdj=xSize;
@@ -1132,7 +1132,7 @@ void TextType::Draw(OutputDevice& rOut)
T2=T1; Index2=Index1;
i=1;
while (i<=l) {
- c=GetTextCharConv(Buf,Index2,T,T2,l-i,FALSE);
+ c=GetTextCharConv(Buf,Index2,T,T2,l-i,sal_False);
long xp1,yp1; // wegen Overflowgefahr
PointType Pos;
xp1=long(Pos1.x)+xPos+long(xLine[i]);
@@ -1164,27 +1164,27 @@ void TextType::Draw(OutputDevice& rOut)
// (DEC Alpha hat naemlich 64Bit-Pointer!)
//UCHAR* TextType::GetBufPtr()
//{
-// ULONG Temp;
-// Temp=ULONG(BufLo)+0x00010000*ULONG(BufHi);
+// sal_uLong Temp;
+// Temp=sal_uLong(BufLo)+0x00010000*sal_uLong(BufHi);
// return (UCHAR*)Temp;
//}
//
//void TextType::SetBufPtr(UCHAR* Ptr)
//{
-// ULONG Temp=(ULONG)Ptr;
-// BufLo=USHORT(Temp & 0x0000FFFF);
-// BufHi=USHORT((Temp & 0xFFFF0000)>>16);
+// sal_uLong Temp=(sal_uLong)Ptr;
+// BufLo=sal_uInt16(Temp & 0x0000FFFF);
+// BufHi=sal_uInt16((Temp & 0xFFFF0000)>>16);
//}
-UINT32 ObjTextType::GetFont()
+sal_uInt32 ObjTextType::GetFont()
{
- return ULONG(FontLo)+0x00010000*ULONG(FontHi);
+ return sal_uLong(FontLo)+0x00010000*sal_uLong(FontHi);
}
-void ObjTextType::SetFont(UINT32 FontID)
+void ObjTextType::SetFont(sal_uInt32 FontID)
{
- FontLo=USHORT(FontID & 0x0000FFFF);
- FontHi=USHORT((FontID & 0xFFFF0000)>>16);
+ FontLo=sal_uInt16(FontID & 0x0000FFFF);
+ FontHi=sal_uInt16((FontID & 0xFFFF0000)>>16);
}
@@ -1195,11 +1195,11 @@ SgfFontOne::SgfFontOne()
{
Next=NULL;
IFID=0;
- Bold=FALSE;
- Ital=FALSE;
- Sans=FALSE;
- Serf=FALSE;
- Fixd=FALSE;
+ Bold=sal_False;
+ Ital=sal_False;
+ Sans=sal_False;
+ Serf=sal_False;
+ Fixd=sal_False;
SVFamil=FAMILY_DONTKNOW;
SVChSet=RTL_TEXTENCODING_DONTKNOW;
SVWidth=40;
@@ -1207,7 +1207,7 @@ SgfFontOne::SgfFontOne()
void SgfFontOne::ReadOne( ByteString& ID, ByteString& Dsc )
{
- USHORT i,j,n;
+ sal_uInt16 i,j,n;
ByteString s;
if ( Dsc.Len() < 4 || ( Dsc.GetChar( 0 ) != '(' ) )
@@ -1229,7 +1229,7 @@ void SgfFontOne::ReadOne( ByteString& ID, ByteString& Dsc )
SVFName=String(Dsc,i+1,j); // SV-Fontname rausholen
Dsc.Erase(i,j);
- IFID = (UINT32)ID.ToInt32();
+ IFID = (sal_uInt32)ID.ToInt32();
n=Dsc.GetTokenCount(' ');
for (i=0;i<n;i++)
{
@@ -1237,11 +1237,11 @@ void SgfFontOne::ReadOne( ByteString& ID, ByteString& Dsc )
if ( s.Len() )
{
s.ToUpperAscii();
- if ( s.CompareTo( "BOLD", 4 ) == COMPARE_EQUAL ) Bold=TRUE;
- else if ( s.CompareTo( "ITAL", 4 ) == COMPARE_EQUAL ) Ital=TRUE;
- else if ( s.CompareTo( "SERF", 4 ) == COMPARE_EQUAL ) Serf=TRUE;
- else if ( s.CompareTo( "SANS", 4 ) == COMPARE_EQUAL ) Sans=TRUE;
- else if ( s.CompareTo( "FIXD", 4 ) == COMPARE_EQUAL ) Fixd=TRUE;
+ if ( s.CompareTo( "BOLD", 4 ) == COMPARE_EQUAL ) Bold=sal_True;
+ else if ( s.CompareTo( "ITAL", 4 ) == COMPARE_EQUAL ) Ital=sal_True;
+ else if ( s.CompareTo( "SERF", 4 ) == COMPARE_EQUAL ) Serf=sal_True;
+ else if ( s.CompareTo( "SANS", 4 ) == COMPARE_EQUAL ) Sans=sal_True;
+ else if ( s.CompareTo( "FIXD", 4 ) == COMPARE_EQUAL ) Fixd=sal_True;
else if ( s.CompareTo( "ROMAN", 5 ) == COMPARE_EQUAL ) SVFamil=FAMILY_ROMAN;
else if ( s.CompareTo( "SWISS", 5 ) == COMPARE_EQUAL ) SVFamil=FAMILY_SWISS;
else if ( s.CompareTo( "MODERN", 6 ) == COMPARE_EQUAL ) SVFamil=FAMILY_MODERN;
@@ -1252,7 +1252,7 @@ void SgfFontOne::ReadOne( ByteString& ID, ByteString& Dsc )
else if ( s.CompareTo( "MAC", 3 ) == COMPARE_EQUAL ) SVChSet=RTL_TEXTENCODING_APPLE_ROMAN;
else if ( s.CompareTo( "SYMBOL", 6 ) == COMPARE_EQUAL ) SVChSet=RTL_TEXTENCODING_SYMBOL;
else if ( s.CompareTo( "SYSTEM", 6 ) == COMPARE_EQUAL ) SVChSet = gsl_getSystemTextEncoding();
- else if ( s.IsNumericAscii() ) SVWidth=sal::static_int_cast< USHORT >(s.ToInt32());
+ else if ( s.IsNumericAscii() ) SVWidth=sal::static_int_cast< sal_uInt16 >(s.ToInt32());
}
}
}
@@ -1265,7 +1265,7 @@ SgfFontLst::SgfFontLst()
Last=NULL;
LastID=0;
LastLn=NULL;
- Tried=FALSE;
+ Tried=sal_False;
}
SgfFontLst::~SgfFontLst()
@@ -1285,7 +1285,7 @@ void SgfFontLst::RausList()
}
pList=NULL;
Last=NULL;
- Tried=FALSE;
+ Tried=sal_False;
LastID=0;
LastLn=NULL;
}
@@ -1296,14 +1296,14 @@ void SgfFontLst::AssignFN(const String& rFName)
void SgfFontLst::ReadList()
{
if (!Tried) {
- Tried=TRUE;
+ Tried=sal_True;
LastID=0;
LastLn=NULL;
SgfFontOne* P,P1;
Config aCfg(FNam);
aCfg.SetGroup("SGV Fonts fuer StarView");
- USHORT Anz=aCfg.GetKeyCount();
- USHORT i;
+ sal_uInt16 Anz=aCfg.GetKeyCount();
+ sal_uInt16 i;
ByteString FID,Dsc;
for (i=0;i<Anz;i++)
@@ -1321,7 +1321,7 @@ void SgfFontLst::ReadList()
}
}
-SgfFontOne* SgfFontLst::GetFontDesc(UINT32 ID)
+SgfFontOne* SgfFontLst::GetFontDesc(sal_uInt32 ID)
{
if (ID!=LastID) {
SgfFontOne* P;
diff --git a/svtools/source/filter.vcl/igif/decode.cxx b/svtools/source/filter.vcl/igif/decode.cxx
index bfe77319b81a..ddea94a5555e 100644
--- a/svtools/source/filter.vcl/igif/decode.cxx
+++ b/svtools/source/filter.vcl/igif/decode.cxx
@@ -36,19 +36,19 @@ struct GIFLZWTableEntry
{
GIFLZWTableEntry* pPrev;
GIFLZWTableEntry* pFirst;
- BYTE nData;
+ sal_uInt8 nData;
};
// ------------------------------------------------------------------------
-GIFLZWDecompressor::GIFLZWDecompressor( BYTE cDataSize ) :
+GIFLZWDecompressor::GIFLZWDecompressor( sal_uInt8 cDataSize ) :
nInputBitsBuf ( 0 ),
nOutBufDataLen ( 0 ),
nInputBitsBufSize ( 0 ),
- bEOIFound ( FALSE ),
+ bEOIFound ( sal_False ),
nDataSize ( cDataSize )
{
- pOutBuf = new BYTE[ 4096 ];
+ pOutBuf = new sal_uInt8[ 4096 ];
nClearCode = 1 << nDataSize;
nEOICode = nClearCode + 1;
@@ -59,11 +59,11 @@ GIFLZWDecompressor::GIFLZWDecompressor( BYTE cDataSize ) :
pTable = new GIFLZWTableEntry[ 4098 ];
- for( USHORT i = 0; i < nTableSize; i++ )
+ for( sal_uInt16 i = 0; i < nTableSize; i++ )
{
pTable[i].pPrev = NULL;
pTable[i].pFirst = pTable + i;
- pTable[i].nData = (BYTE) i;
+ pTable[i].nData = (sal_uInt8) i;
}
}
@@ -77,11 +77,11 @@ GIFLZWDecompressor::~GIFLZWDecompressor()
// ------------------------------------------------------------------------
-HPBYTE GIFLZWDecompressor::DecompressBlock( HPBYTE pSrc, BYTE cBufSize,
- ULONG& rCount, BOOL& rEOI )
+HPBYTE GIFLZWDecompressor::DecompressBlock( HPBYTE pSrc, sal_uInt8 cBufSize,
+ sal_uLong& rCount, sal_Bool& rEOI )
{
- ULONG nTargetSize = 4096;
- ULONG nCount = 0;
+ sal_uLong nTargetSize = 4096;
+ sal_uLong nCount = 0;
HPBYTE pTarget = (HPBYTE) rtl_allocateMemory( nTargetSize );
HPBYTE pTmpTarget = pTarget;
@@ -95,8 +95,8 @@ HPBYTE GIFLZWDecompressor::DecompressBlock( HPBYTE pSrc, BYTE cBufSize,
if( nCount > nTargetSize )
{
- ULONG nNewSize = nTargetSize << 1;
- ULONG nOffset = pTmpTarget - pTarget;
+ sal_uLong nNewSize = nTargetSize << 1;
+ sal_uLong nOffset = pTmpTarget - pTarget;
HPBYTE pTmp = (HPBYTE) rtl_allocateMemory( nNewSize );
memcpy( pTmp, pTarget, nTargetSize );
@@ -123,7 +123,7 @@ HPBYTE GIFLZWDecompressor::DecompressBlock( HPBYTE pSrc, BYTE cBufSize,
// ------------------------------------------------------------------------
-void GIFLZWDecompressor::AddToTable( USHORT nPrevCode, USHORT nCodeFirstData )
+void GIFLZWDecompressor::AddToTable( sal_uInt16 nPrevCode, sal_uInt16 nCodeFirstData )
{
GIFLZWTableEntry* pE;
@@ -135,37 +135,37 @@ void GIFLZWDecompressor::AddToTable( USHORT nPrevCode, USHORT nCodeFirstData )
pE->nData = pTable[ nCodeFirstData ].pFirst->nData;
nTableSize++;
- if ( ( nTableSize == (USHORT) (1 << nCodeSize) ) && ( nTableSize < 4096 ) )
+ if ( ( nTableSize == (sal_uInt16) (1 << nCodeSize) ) && ( nTableSize < 4096 ) )
nCodeSize++;
}
}
// ------------------------------------------------------------------------
-BOOL GIFLZWDecompressor::ProcessOneCode()
+sal_Bool GIFLZWDecompressor::ProcessOneCode()
{
GIFLZWTableEntry* pE;
- USHORT nCode;
- BOOL bRet = FALSE;
- BOOL bEndOfBlock = FALSE;
+ sal_uInt16 nCode;
+ sal_Bool bRet = sal_False;
+ sal_Bool bEndOfBlock = sal_False;
while( nInputBitsBufSize < nCodeSize )
{
if( nBlockBufPos >= nBlockBufSize )
{
- bEndOfBlock = TRUE;
+ bEndOfBlock = sal_True;
break;
}
- nInputBitsBuf |= ( (ULONG) pBlockBuf[ nBlockBufPos++ ] ) << nInputBitsBufSize;
+ nInputBitsBuf |= ( (sal_uLong) pBlockBuf[ nBlockBufPos++ ] ) << nInputBitsBufSize;
nInputBitsBufSize += 8;
}
if ( !bEndOfBlock )
{
// Einen Code aus dem Eingabe-Buffer holen:
- nCode = sal::static_int_cast< USHORT >(
- ( (USHORT) nInputBitsBuf ) & ( ~( 0xffff << nCodeSize ) ));
+ nCode = sal::static_int_cast< sal_uInt16 >(
+ ( (sal_uInt16) nInputBitsBuf ) & ( ~( 0xffff << nCodeSize ) ));
nInputBitsBuf >>= nCodeSize;
nInputBitsBufSize = nInputBitsBufSize - nCodeSize;
@@ -191,9 +191,9 @@ BOOL GIFLZWDecompressor::ProcessOneCode()
nOutBufDataLen = 0;
}
else
- bEOIFound = TRUE;
+ bEOIFound = sal_True;
- return TRUE;
+ return sal_True;
}
nOldCode = nCode;
@@ -208,7 +208,7 @@ BOOL GIFLZWDecompressor::ProcessOneCode()
}
while( pE );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
diff --git a/svtools/source/filter.vcl/igif/decode.hxx b/svtools/source/filter.vcl/igif/decode.hxx
index 3c6a61e7508d..e85cc30eaf9e 100644
--- a/svtools/source/filter.vcl/igif/decode.hxx
+++ b/svtools/source/filter.vcl/igif/decode.hxx
@@ -40,29 +40,29 @@ class GIFLZWDecompressor
HPBYTE pOutBuf;
HPBYTE pOutBufData;
HPBYTE pBlockBuf;
- ULONG nInputBitsBuf;
- USHORT nTableSize;
- USHORT nClearCode;
- USHORT nEOICode;
- USHORT nCodeSize;
- USHORT nOldCode;
- USHORT nOutBufDataLen;
- USHORT nInputBitsBufSize;
- BOOL bEOIFound;
- BYTE nDataSize;
- BYTE nBlockBufSize;
- BYTE nBlockBufPos;
+ sal_uLong nInputBitsBuf;
+ sal_uInt16 nTableSize;
+ sal_uInt16 nClearCode;
+ sal_uInt16 nEOICode;
+ sal_uInt16 nCodeSize;
+ sal_uInt16 nOldCode;
+ sal_uInt16 nOutBufDataLen;
+ sal_uInt16 nInputBitsBufSize;
+ sal_Bool bEOIFound;
+ sal_uInt8 nDataSize;
+ sal_uInt8 nBlockBufSize;
+ sal_uInt8 nBlockBufPos;
- void AddToTable(USHORT nPrevCode, USHORT nCodeFirstData);
- BOOL ProcessOneCode();
+ void AddToTable(sal_uInt16 nPrevCode, sal_uInt16 nCodeFirstData);
+ sal_Bool ProcessOneCode();
public:
- GIFLZWDecompressor( BYTE cDataSize );
+ GIFLZWDecompressor( sal_uInt8 cDataSize );
~GIFLZWDecompressor();
- HPBYTE DecompressBlock( HPBYTE pSrc, BYTE cBufSize, ULONG& rCount, BOOL& rEOI );
+ HPBYTE DecompressBlock( HPBYTE pSrc, sal_uInt8 cBufSize, sal_uLong& rCount, sal_Bool& rEOI );
};
#endif
diff --git a/svtools/source/filter.vcl/igif/gifread.cxx b/svtools/source/filter.vcl/igif/gifread.cxx
index e4020c727ff4..16318e5b143e 100644
--- a/svtools/source/filter.vcl/igif/gifread.cxx
+++ b/svtools/source/filter.vcl/igif/gifread.cxx
@@ -54,11 +54,11 @@ GIFReader::GIFReader( SvStream& rStm ) :
nLogHeight100 ( 0UL ),
nLoops ( 1 ),
eActAction ( GLOBAL_HEADER_READING ),
- bGCTransparent ( FALSE ),
- bImGraphicReady ( FALSE )
+ bGCTransparent ( sal_False ),
+ bImGraphicReady ( sal_False )
{
maUpperName = UniString::CreateFromAscii( "SVIGIF", 6 );
- pSrcBuf = new BYTE[ 256 ];
+ pSrcBuf = new sal_uInt8[ 256 ];
ClearImageExtensions();
}
@@ -82,14 +82,14 @@ GIFReader::~GIFReader()
void GIFReader::ClearImageExtensions()
{
nGCDisposalMethod = 0;
- bGCTransparent = FALSE;
+ bGCTransparent = sal_False;
nTimer = 0;
}
// ------------------------------------------------------------------------
-BOOL GIFReader::CreateBitmaps( long nWidth, long nHeight, BitmapPalette* pPal,
- BOOL bWatchForBackgroundColor )
+sal_Bool GIFReader::CreateBitmaps( long nWidth, long nHeight, BitmapPalette* pPal,
+ sal_Bool bWatchForBackgroundColor )
{
const Size aSize( nWidth, nHeight );
@@ -106,11 +106,11 @@ BOOL GIFReader::CreateBitmaps( long nWidth, long nHeight, BitmapPalette* pPal,
if( pAcc1 )
{
- cTransIndex1 = (BYTE) pAcc1->GetBestPaletteIndex( aWhite );
+ cTransIndex1 = (sal_uInt8) pAcc1->GetBestPaletteIndex( aWhite );
cNonTransIndex1 = cTransIndex1 ? 0 : 1;
}
else
- bStatus = FALSE;
+ bStatus = sal_False;
}
if( bStatus )
@@ -131,12 +131,12 @@ BOOL GIFReader::CreateBitmaps( long nWidth, long nHeight, BitmapPalette* pPal,
// ------------------------------------------------------------------------
-BOOL GIFReader::ReadGlobalHeader()
+sal_Bool GIFReader::ReadGlobalHeader()
{
char pBuf[ 7 ];
- BYTE nRF;
- BYTE nAspect;
- BOOL bRet = FALSE;
+ sal_uInt8 nRF;
+ sal_uInt8 nAspect;
+ sal_Bool bRet = sal_False;
rIStm.Read( pBuf, 6 );
if( NO_PENDING( rIStm ) )
@@ -149,14 +149,14 @@ BOOL GIFReader::ReadGlobalHeader()
{
SvMemoryStream aMemStm;
- aMemStm.SetBuffer( pBuf, 7, FALSE, 7 );
+ aMemStm.SetBuffer( pBuf, 7, sal_False, 7 );
aMemStm >> nGlobalWidth;
aMemStm >> nGlobalHeight;
aMemStm >> nRF;
aMemStm >> nBackgroundColor;
aMemStm >> nAspect;
- bGlobalPalette = (BOOL) ( nRF & 0x80 );
+ bGlobalPalette = (sal_Bool) ( nRF & 0x80 );
if( bGlobalPalette )
ReadPaletteEntries( &aGPalette, 1 << ( ( nRF & 7 ) + 1 ) );
@@ -164,11 +164,11 @@ BOOL GIFReader::ReadGlobalHeader()
nBackgroundColor = 0;
if( NO_PENDING( rIStm ) )
- bRet = TRUE;
+ bRet = sal_True;
}
}
else
- bStatus = FALSE;
+ bStatus = sal_False;
}
return bRet;
@@ -176,19 +176,19 @@ BOOL GIFReader::ReadGlobalHeader()
// ------------------------------------------------------------------------
-void GIFReader::ReadPaletteEntries( BitmapPalette* pPal, ULONG nCount )
+void GIFReader::ReadPaletteEntries( BitmapPalette* pPal, sal_uLong nCount )
{
- const ULONG nLen = 3UL * nCount;
- BYTE* pBuf = new BYTE[ nLen ];
+ const sal_uLong nLen = 3UL * nCount;
+ sal_uInt8* pBuf = new sal_uInt8[ nLen ];
rIStm.Read( pBuf, nLen );
if( NO_PENDING( rIStm ) )
{
- BYTE* pTmp = pBuf;
+ sal_uInt8* pTmp = pBuf;
- for( ULONG i = 0UL; i < nCount; )
+ for( sal_uLong i = 0UL; i < nCount; )
{
- BitmapColor& rColor = (*pPal)[ (USHORT) i++ ];
+ BitmapColor& rColor = (*pPal)[ (sal_uInt16) i++ ];
rColor.SetRed( *pTmp++ );
rColor.SetGreen( *pTmp++ );
@@ -210,13 +210,13 @@ void GIFReader::ReadPaletteEntries( BitmapPalette* pPal, ULONG nCount )
// ------------------------------------------------------------------------
-BOOL GIFReader::ReadExtension()
+sal_Bool GIFReader::ReadExtension()
{
- BYTE cFunction;
- BYTE cSize;
- BYTE cByte;
- BOOL bRet = FALSE;
- BOOL bOverreadDataBlocks = FALSE;
+ sal_uInt8 cFunction;
+ sal_uInt8 cSize;
+ sal_uInt8 cByte;
+ sal_Bool bRet = sal_False;
+ sal_Bool bOverreadDataBlocks = sal_False;
// Extension-Label
rIStm >> cFunction;
@@ -230,7 +230,7 @@ BOOL GIFReader::ReadExtension()
// 'Graphic Control Extension'
case( 0xf9 ) :
{
- BYTE cFlags;
+ sal_uInt8 cFlags;
rIStm >> cFlags;
rIStm >> nTimer;
@@ -240,9 +240,9 @@ BOOL GIFReader::ReadExtension()
if ( NO_PENDING( rIStm ) )
{
nGCDisposalMethod = ( cFlags >> 2) & 7;
- bGCTransparent = ( cFlags & 1 ) ? TRUE : FALSE;
+ bGCTransparent = ( cFlags & 1 ) ? sal_True : sal_False;
bStatus = ( cSize == 4 ) && ( cByte == 0 );
- bRet = TRUE;
+ bRet = sal_True;
}
}
break;
@@ -253,7 +253,7 @@ BOOL GIFReader::ReadExtension()
if ( NO_PENDING( rIStm ) )
{
// default diese Extension ueberlesen
- bOverreadDataBlocks = TRUE;
+ bOverreadDataBlocks = sal_True;
// Appl.-Extension hat Laenge 11
if ( cSize == 0x0b )
@@ -276,12 +276,12 @@ BOOL GIFReader::ReadExtension()
rIStm >> cByte;
nLoops = cByte;
rIStm >> cByte;
- nLoops |= ( (USHORT) cByte << 8 );
+ nLoops |= ( (sal_uInt16) cByte << 8 );
rIStm >> cByte;
bStatus = ( cByte == 0 );
bRet = NO_PENDING( rIStm );
- bOverreadDataBlocks = FALSE;
+ bOverreadDataBlocks = sal_False;
// Netscape interpretiert den LoopCount
// als reine Anzahl der _Wiederholungen_;
@@ -304,7 +304,7 @@ BOOL GIFReader::ReadExtension()
rIStm >> cByte;
bStatus = ( cByte == 0 );
bRet = NO_PENDING( rIStm );
- bOverreadDataBlocks = FALSE;
+ bOverreadDataBlocks = sal_False;
}
else
rIStm.SeekRel( -1 );
@@ -317,25 +317,25 @@ BOOL GIFReader::ReadExtension()
// alles andere ueberlesen
default:
- bOverreadDataBlocks = TRUE;
+ bOverreadDataBlocks = sal_True;
break;
}
// Sub-Blocks ueberlesen
if ( bOverreadDataBlocks )
{
- bRet = TRUE;
+ bRet = sal_True;
while( cSize && bStatus && !rIStm.IsEof() )
{
- USHORT nCount = (USHORT) cSize + 1;
+ sal_uInt16 nCount = (sal_uInt16) cSize + 1;
char* pBuffer = new char[ nCount ];
- bRet = FALSE;
+ bRet = sal_False;
rIStm.Read( pBuffer, nCount );
if( NO_PENDING( rIStm ) )
{
- cSize = (BYTE) pBuffer[ cSize ];
- bRet = TRUE;
+ cSize = (sal_uInt8) pBuffer[ cSize ];
+ bRet = sal_True;
}
else
cSize = 0;
@@ -350,19 +350,19 @@ BOOL GIFReader::ReadExtension()
// ------------------------------------------------------------------------
-BOOL GIFReader::ReadLocalHeader()
+sal_Bool GIFReader::ReadLocalHeader()
{
- BYTE pBuf[ 9 ];
- BOOL bRet = FALSE;
+ sal_uInt8 pBuf[ 9 ];
+ sal_Bool bRet = sal_False;
rIStm.Read( pBuf, 9 );
if( NO_PENDING( rIStm ) )
{
SvMemoryStream aMemStm;
BitmapPalette* pPal;
- BYTE nFlags;
+ sal_uInt8 nFlags;
- aMemStm.SetBuffer( (char*) pBuf, 9, FALSE, 9 );
+ aMemStm.SetBuffer( (char*) pBuf, 9, sal_False, 9 );
aMemStm >> nImagePosX;
aMemStm >> nImagePosY;
aMemStm >> nImageWidth;
@@ -390,7 +390,7 @@ BOOL GIFReader::ReadLocalHeader()
if( NO_PENDING( rIStm ) )
{
CreateBitmaps( nImageWidth, nImageHeight, pPal, bGlobalPalette && ( pPal == &aGPalette ) );
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -399,11 +399,11 @@ BOOL GIFReader::ReadLocalHeader()
// ------------------------------------------------------------------------
-ULONG GIFReader::ReadNextBlock()
+sal_uLong GIFReader::ReadNextBlock()
{
- ULONG nRet = 0UL;
- ULONG nRead;
- BYTE cBlockSize;
+ sal_uLong nRet = 0UL;
+ sal_uLong nRead;
+ sal_uInt8 cBlockSize;
rIStm >> cBlockSize;
@@ -423,7 +423,7 @@ ULONG GIFReader::ReadNextBlock()
nRet = 3UL;
else
{
- BOOL bEOI;
+ sal_Bool bEOI;
HPBYTE pTarget = pDecomp->DecompressBlock( pSrcBuf, cBlockSize, nRead, bEOI );
nRet = ( bEOI ? 3 : 1 );
@@ -442,9 +442,9 @@ ULONG GIFReader::ReadNextBlock()
// ------------------------------------------------------------------------
-void GIFReader::FillImages( HPBYTE pBytes, ULONG nCount )
+void GIFReader::FillImages( HPBYTE pBytes, sal_uLong nCount )
{
- for( ULONG i = 0UL; i < nCount; i++ )
+ for( sal_uLong i = 0UL; i < nCount; i++ )
{
if( nImageX >= nImageWidth )
{
@@ -463,9 +463,9 @@ void GIFReader::FillImages( HPBYTE pBytes, ULONG nCount )
if( ( nMinY > nLastImageY ) && ( nLastImageY < ( nImageHeight - 1 ) ) )
{
HPBYTE pScanline8 = pAcc8->GetScanline( nYAcc );
- ULONG nSize8 = pAcc8->GetScanlineSize();
+ sal_uLong nSize8 = pAcc8->GetScanlineSize();
HPBYTE pScanline1 = 0;
- ULONG nSize1 = 0;
+ sal_uLong nSize1 = 0;
if( bGCTransparent )
{
@@ -507,7 +507,7 @@ void GIFReader::FillImages( HPBYTE pBytes, ULONG nCount )
}
}
- nLastImageY = (USHORT) nT1;
+ nLastImageY = (sal_uInt16) nT1;
nYAcc = nT1;
}
else
@@ -522,7 +522,7 @@ void GIFReader::FillImages( HPBYTE pBytes, ULONG nCount )
if( nImageY < nImageHeight )
{
- const BYTE cTmp = pBytes[ i ];
+ const sal_uInt8 cTmp = pBytes[ i ];
if( bGCTransparent )
{
@@ -539,7 +539,7 @@ void GIFReader::FillImages( HPBYTE pBytes, ULONG nCount )
}
else
{
- bOverreadBlock = TRUE;
+ bOverreadBlock = sal_True;
break;
}
}
@@ -566,7 +566,7 @@ void GIFReader::CreateNewBitmaps()
aAnimBmp.aPosPix = Point( nImagePosX, nImagePosY );
aAnimBmp.aSizePix = Size( nImageWidth, nImageHeight );
aAnimBmp.nWait = ( nTimer != 65535 ) ? nTimer : ANIMATION_TIMEOUT_ON_CLICK;
- aAnimBmp.bUserInput = FALSE;
+ aAnimBmp.bUserInput = sal_False;
if( nGCDisposalMethod == 2 )
aAnimBmp.eDisposal = DISPOSE_BACK;
@@ -617,10 +617,10 @@ const Graphic& GIFReader::GetIntermediateGraphic()
// ------------------------------------------------------------------------
-BOOL GIFReader::ProcessGIF()
+sal_Bool GIFReader::ProcessGIF()
{
- BOOL bRead = FALSE;
- BOOL bEnd = FALSE;
+ sal_Bool bRead = sal_False;
+ sal_Bool bEnd = sal_False;
if ( !bStatus )
eActAction = ABORT_READING;
@@ -633,7 +633,7 @@ BOOL GIFReader::ProcessGIF()
// naechsten Marker lesen
case( MARKER_READING ):
{
- BYTE cByte;
+ sal_uInt8 cByte;
rIStm >> cByte;
@@ -641,7 +641,7 @@ BOOL GIFReader::ProcessGIF()
eActAction = END_READING;
else if( NO_PENDING( rIStm ) )
{
- bRead = TRUE;
+ bRead = sal_True;
if( cByte == '!' )
eActAction = EXTENSION_READING;
@@ -658,7 +658,7 @@ BOOL GIFReader::ProcessGIF()
// ScreenDescriptor lesen
case( GLOBAL_HEADER_READING ):
{
- if( ( bRead = ReadGlobalHeader() ) == TRUE )
+ if( ( bRead = ReadGlobalHeader() ) == sal_True )
{
ClearImageExtensions();
eActAction = MARKER_READING;
@@ -670,7 +670,7 @@ BOOL GIFReader::ProcessGIF()
// Extension lesen
case( EXTENSION_READING ):
{
- if( ( bRead = ReadExtension() ) == TRUE )
+ if( ( bRead = ReadExtension() ) == sal_True )
eActAction = MARKER_READING;
}
break;
@@ -679,7 +679,7 @@ BOOL GIFReader::ProcessGIF()
// Image-Descriptor lesen
case( LOCAL_HEADER_READING ):
{
- if( ( bRead = ReadLocalHeader() ) == TRUE )
+ if( ( bRead = ReadLocalHeader() ) == sal_True )
{
nYAcc = nImageX = nImageY = 0;
eActAction = FIRST_BLOCK_READING;
@@ -691,20 +691,20 @@ BOOL GIFReader::ProcessGIF()
// ersten Datenblock lesen
case( FIRST_BLOCK_READING ):
{
- BYTE cDataSize;
+ sal_uInt8 cDataSize;
rIStm >> cDataSize;
if( rIStm.IsEof() )
eActAction = ABORT_READING;
else if( cDataSize > 12 )
- bStatus = FALSE;
+ bStatus = sal_False;
else if( NO_PENDING( rIStm ) )
{
- bRead = TRUE;
+ bRead = sal_True;
pDecomp = new GIFLZWDecompressor( cDataSize );
eActAction = NEXT_BLOCK_READING;
- bOverreadBlock = FALSE;
+ bOverreadBlock = sal_False;
}
else
eActAction = FIRST_BLOCK_READING;
@@ -714,20 +714,20 @@ BOOL GIFReader::ProcessGIF()
// naechsten Datenblock lesen
case( NEXT_BLOCK_READING ):
{
- USHORT nLastX = nImageX;
- USHORT nLastY = nImageY;
- ULONG nRet = ReadNextBlock();
+ sal_uInt16 nLastX = nImageX;
+ sal_uInt16 nLastY = nImageY;
+ sal_uLong nRet = ReadNextBlock();
// Return: 0:Pending / 1:OK; / 2:OK und letzter Block: / 3:EOI / 4:HardAbort
if( nRet )
{
- bRead = TRUE;
+ bRead = sal_True;
if ( nRet == 1UL )
{
- bImGraphicReady = TRUE;
+ bImGraphicReady = sal_True;
eActAction = NEXT_BLOCK_READING;
- bOverreadBlock = FALSE;
+ bOverreadBlock = sal_False;
}
else
{
@@ -741,7 +741,7 @@ BOOL GIFReader::ProcessGIF()
else if( nRet == 3UL )
{
eActAction = NEXT_BLOCK_READING;
- bOverreadBlock = TRUE;
+ bOverreadBlock = sal_True;
}
else
{
@@ -763,7 +763,7 @@ BOOL GIFReader::ProcessGIF()
// ein Fehler trat auf
case( ABORT_READING ):
{
- bEnd = TRUE;
+ bEnd = sal_True;
eActAction = END_READING;
}
break;
@@ -787,7 +787,7 @@ ReadState GIFReader::ReadGIF( Graphic& rGraphic )
{
ReadState eReadState;
- bStatus = TRUE;
+ bStatus = sal_True;
while( ProcessGIF() && ( eActAction != END_READING ) ) {}
@@ -824,12 +824,12 @@ ReadState GIFReader::ReadGIF( Graphic& rGraphic )
// - ImportGIF -
// -------------
-BOOL ImportGIF( SvStream & rStm, Graphic& rGraphic )
+sal_Bool ImportGIF( SvStream & rStm, Graphic& rGraphic )
{
GIFReader* pGIFReader = (GIFReader*) rGraphic.GetContext();
- USHORT nOldFormat = rStm.GetNumberFormatInt();
+ sal_uInt16 nOldFormat = rStm.GetNumberFormatInt();
ReadState eReadState;
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -841,7 +841,7 @@ BOOL ImportGIF( SvStream & rStm, Graphic& rGraphic )
if( eReadState == GIFREAD_ERROR )
{
- bRet = FALSE;
+ bRet = sal_False;
delete pGIFReader;
}
else if( eReadState == GIFREAD_OK )
diff --git a/svtools/source/filter.vcl/ixbm/xbmread.cxx b/svtools/source/filter.vcl/ixbm/xbmread.cxx
index 9c7faaafa88c..5084f7267e46 100644
--- a/svtools/source/filter.vcl/ixbm/xbmread.cxx
+++ b/svtools/source/filter.vcl/ixbm/xbmread.cxx
@@ -44,7 +44,7 @@ XBMReader::XBMReader( SvStream& rStm ) :
nLastPos ( rStm.Tell() ),
nWidth ( 0 ),
nHeight ( 0 ),
- bStatus ( TRUE )
+ bStatus ( sal_True )
{
pHexTable = new short[ 256 ];
maUpperName = String::CreateFromAscii( "SVIXBM", 6 );
@@ -109,7 +109,7 @@ ByteString XBMReader::FindTokenLine( SvStream* pInStm, const char* pTok1,
long nPos2;
long nPos3;
- bStatus = FALSE;
+ bStatus = sal_False;
do
{
@@ -120,23 +120,23 @@ ByteString XBMReader::FindTokenLine( SvStream* pInStm, const char* pTok1,
{
if( ( nPos1 = aRet.Search( pTok1 ) ) != STRING_NOTFOUND )
{
- bStatus = TRUE;
+ bStatus = sal_True;
if( pTok2 )
{
- bStatus = FALSE;
+ bStatus = sal_False;
if( ( ( nPos2 = aRet.Search( pTok2 ) ) != STRING_NOTFOUND ) &&
( nPos2 > nPos1 ) )
{
- bStatus = TRUE;
+ bStatus = sal_True;
if( pTok3 )
{
- bStatus = FALSE;
+ bStatus = sal_False;
if( ( ( nPos3 = aRet.Search( pTok3 ) ) != STRING_NOTFOUND ) && ( nPos3 > nPos2 ) )
- bStatus = TRUE;
+ bStatus = sal_True;
}
}
}
@@ -199,16 +199,16 @@ long XBMReader::ParseDefine( const sal_Char* pDefine )
// ------------------------------------------------------------------------
-BOOL XBMReader::ParseData( SvStream* pInStm, const ByteString& aLastLine, XBMFormat eFormat )
+sal_Bool XBMReader::ParseData( SvStream* pInStm, const ByteString& aLastLine, XBMFormat eFormat )
{
ByteString aLine;
long nRow = 0;
long nCol = 0;
long nBits = ( eFormat == XBM10 ) ? 16 : 8;
long nBit;
- USHORT nValue;
- USHORT nDigits;
- BOOL bFirstLine = TRUE;
+ sal_uInt16 nValue;
+ sal_uInt16 nDigits;
+ sal_Bool bFirstLine = sal_True;
while( nRow < nHeight )
{
@@ -220,20 +220,20 @@ BOOL XBMReader::ParseData( SvStream* pInStm, const ByteString& aLastLine, XBMFor
if( (nPos = ( aLine = aLastLine ).Search( '{' ) ) != STRING_NOTFOUND )
aLine.Erase( 0, nPos + 1 );
- bFirstLine = FALSE;
+ bFirstLine = sal_False;
}
else if( !pInStm->ReadLine( aLine ) )
break;
if( aLine.Len() )
{
- const USHORT nCount = aLine.GetTokenCount( ',' );
+ const sal_uInt16 nCount = aLine.GetTokenCount( ',' );
- for( USHORT i = 0; ( i < nCount ) && ( nRow < nHeight ); i++ )
+ for( sal_uInt16 i = 0; ( i < nCount ) && ( nRow < nHeight ); i++ )
{
const ByteString aToken( aLine.GetToken( i, ',' ) );
const xub_StrLen nLen = aToken.Len();
- BOOL bProcessed = FALSE;
+ sal_Bool bProcessed = sal_False;
nBit = nDigits = nValue = 0;
@@ -246,11 +246,11 @@ BOOL XBMReader::ParseData( SvStream* pInStm, const ByteString& aLastLine, XBMFor
{
nValue = ( nValue << 4 ) + nTable;
nDigits++;
- bProcessed = TRUE;
+ bProcessed = sal_True;
}
else if( ( nTable < 0 ) && nDigits )
{
- bProcessed = TRUE;
+ bProcessed = sal_True;
break;
}
}
@@ -267,7 +267,7 @@ BOOL XBMReader::ParseData( SvStream* pInStm, const ByteString& aLastLine, XBMFor
}
}
- return TRUE;
+ return sal_True;
}
// ------------------------------------------------------------------------
@@ -275,7 +275,7 @@ BOOL XBMReader::ParseData( SvStream* pInStm, const ByteString& aLastLine, XBMFor
ReadState XBMReader::ReadXBM( Graphic& rGraphic )
{
ReadState eReadState;
- BYTE cDummy;
+ sal_uInt8 cDummy;
// sehen, ob wir _alles_ lesen koennen
rIStm.Seek( STREAM_SEEK_TO_END );
@@ -289,7 +289,7 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic )
int nValue;
rIStm.Seek( nLastPos );
- bStatus = FALSE;
+ bStatus = sal_False;
aLine = FindTokenLine( &rIStm, "#define", "_width" );
if ( bStatus )
@@ -308,7 +308,7 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic )
}
}
else
- bStatus = FALSE;
+ bStatus = sal_False;
if ( bStatus )
{
@@ -326,7 +326,7 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic )
else if ( aLine.Search( "char" ) != STRING_NOTFOUND )
eFormat = XBM11;
else
- bStatus = FALSE;
+ bStatus = sal_False;
if ( bStatus && nWidth && nHeight )
{
@@ -340,7 +340,7 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic )
bStatus = ParseData( &rIStm, aLine, eFormat );
}
else
- bStatus = FALSE;
+ bStatus = sal_False;
}
}
}
@@ -372,11 +372,11 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic )
// - ImportXBM -
// -------------
-BOOL ImportXBM( SvStream& rStm, Graphic& rGraphic )
+sal_Bool ImportXBM( SvStream& rStm, Graphic& rGraphic )
{
XBMReader* pXBMReader = (XBMReader*) rGraphic.GetContext();
ReadState eReadState;
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( !pXBMReader )
pXBMReader = new XBMReader( rStm );
@@ -386,7 +386,7 @@ BOOL ImportXBM( SvStream& rStm, Graphic& rGraphic )
if( eReadState == XBMREAD_ERROR )
{
- bRet = FALSE;
+ bRet = sal_False;
delete pXBMReader;
}
else if( eReadState == XBMREAD_OK )
diff --git a/svtools/source/filter.vcl/ixpm/rgbtable.hxx b/svtools/source/filter.vcl/ixpm/rgbtable.hxx
index afdab883b369..054e1e86b064 100644
--- a/svtools/source/filter.vcl/ixpm/rgbtable.hxx
+++ b/svtools/source/filter.vcl/ixpm/rgbtable.hxx
@@ -28,9 +28,9 @@
struct XPMRGBTab
{
const char* name;
- BYTE red;
- BYTE green;
- BYTE blue;
+ sal_uInt8 red;
+ sal_uInt8 green;
+ sal_uInt8 blue;
};
static XPMRGBTab pRGBTable[] = {
diff --git a/svtools/source/filter.vcl/ixpm/xpmread.cxx b/svtools/source/filter.vcl/ixpm/xpmread.cxx
index 7575c94e3ed9..425ed6323bcc 100644
--- a/svtools/source/filter.vcl/ixpm/xpmread.cxx
+++ b/svtools/source/filter.vcl/ixpm/xpmread.cxx
@@ -51,8 +51,8 @@ XPMReader::XPMReader( SvStream& rStm ) :
mnHeight ( 0 ),
mnColors ( 0 ),
mnCpp ( 0 ),
- mbTransparent ( FALSE ),
- mbStatus ( TRUE ),
+ mbTransparent ( sal_False ),
+ mbStatus ( sal_True ),
mnStatus ( 0 ),
mnIdentifier ( XPMIDENTIFIER ),
mcThisByte ( 0 ),
@@ -80,7 +80,7 @@ XPMReader::~XPMReader()
ReadState XPMReader::ReadXPM( Graphic& rGraphic )
{
ReadState eReadState;
- BYTE cDummy;
+ sal_uInt8 cDummy;
// sehen, ob wir _alles_ lesen koennen
mrIStm.Seek( STREAM_SEEK_TO_END );
@@ -91,14 +91,14 @@ ReadState XPMReader::ReadXPM( Graphic& rGraphic )
if ( mrIStm.GetError() != ERRCODE_IO_PENDING )
{
mrIStm.Seek( mnLastPos );
- mbStatus = TRUE;
+ mbStatus = sal_True;
if ( mbStatus )
{
- mpStringBuf = new BYTE [ XPMSTRINGBUF ];
- mpTempBuf = new BYTE [ XPMTEMPBUFSIZE ];
+ mpStringBuf = new sal_uInt8 [ XPMSTRINGBUF ];
+ mpTempBuf = new sal_uInt8 [ XPMTEMPBUFSIZE ];
- if ( ( mbStatus = ImplGetString() ) == TRUE )
+ if ( ( mbStatus = ImplGetString() ) == sal_True )
{
mnIdentifier = XPMVALUES; // Bitmap informationen einholen
mnWidth = ImplGetULONG( 0 );
@@ -118,14 +118,14 @@ ReadState XPMReader::ReadXPM( Graphic& rGraphic )
// Farbe: ( mnCpp )Byte(s)-> ASCII Eintrag der der Farbe zugeordnet ist
// 1 Byte -> 0xff wenn Farbe transparent ist
// 3 Bytes -> RGB Wert der Farbe
- mpColMap = new BYTE[ mnColors * ( 4 + mnCpp ) ];
+ mpColMap = new sal_uInt8[ mnColors * ( 4 + mnCpp ) ];
if ( mpColMap )
{
- for ( ULONG i = 0; i < mnColors; i++ )
+ for ( sal_uLong i = 0; i < mnColors; i++ )
{
- if ( ImplGetColor( i ) == FALSE )
+ if ( ImplGetColor( i ) == sal_False )
{
- mbStatus = FALSE;
+ mbStatus = sal_False;
break;
}
}
@@ -149,35 +149,35 @@ ReadState XPMReader::ReadXPM( Graphic& rGraphic )
maBmp = Bitmap( Size( mnWidth, mnHeight ), nBits );
mpAcc = maBmp.AcquireWriteAccess();
- // mbTransparent ist TRUE wenn mindestens eine Farbe Transparent ist
+ // mbTransparent ist sal_True wenn mindestens eine Farbe Transparent ist
if ( mbTransparent )
{
maMaskBmp = Bitmap( Size( mnWidth, mnHeight ), 1 );
if ( ( mpMaskAcc = maMaskBmp.AcquireWriteAccess() ) == NULL )
- mbStatus = FALSE;
+ mbStatus = sal_False;
}
if( mpAcc && mbStatus )
{
- ULONG i;
+ sal_uLong i;
if ( mnColors <=256 ) // palette is only needed by using less than 257
{ // colors
- BYTE* pPtr = &mpColMap[mnCpp];
+ sal_uInt8* pPtr = &mpColMap[mnCpp];
for ( i = 0; i < mnColors; i++ )
{
- mpAcc->SetPaletteColor( (BYTE)i, Color( pPtr[1], pPtr[2], pPtr[3] ) );
+ mpAcc->SetPaletteColor( (sal_uInt8)i, Color( pPtr[1], pPtr[2], pPtr[3] ) );
pPtr += ( mnCpp + 4 );
}
// using 2 charakters per pixel and less than 257 Colors we speed up
if ( mnCpp == 2 ) // by using a 64kb indexing table
{
- mpFastColorTable = new BYTE[ 256 * 256 ];
+ mpFastColorTable = new sal_uInt8[ 256 * 256 ];
for ( pPtr = mpColMap, i = 0; i < mnColors; i++, pPtr += mnCpp + 4 )
{
- ULONG j = pPtr[ 0 ] << 8;
+ sal_uLong j = pPtr[ 0 ] << 8;
j += pPtr[ 1 ];
- mpFastColorTable[ j ] = (BYTE)i;
+ mpFastColorTable[ j ] = (sal_uInt8)i;
}
}
}
@@ -185,9 +185,9 @@ ReadState XPMReader::ReadXPM( Graphic& rGraphic )
mnIdentifier = XPMPIXELS;
for ( i = 0; i < mnHeight; i++ )
{
- if ( ImplGetScanLine( i ) == FALSE )
+ if ( ImplGetScanLine( i ) == sal_False )
{
- mbStatus = FALSE;
+ mbStatus = sal_False;
break;
}
}
@@ -238,17 +238,17 @@ ReadState XPMReader::ReadXPM( Graphic& rGraphic )
// ------------------------------------------------------------------------
// ImplGetColor ermittelt saemtliche Farbwerte,
-// die Rueckgabe ist TRUE wenn saemtliche Farben zugeordnet werden konnten
+// die Rueckgabe ist sal_True wenn saemtliche Farben zugeordnet werden konnten
-BOOL XPMReader::ImplGetColor( ULONG nNumb )
+sal_Bool XPMReader::ImplGetColor( sal_uLong nNumb )
{
- BYTE* pString = mpStringBuf;
- BYTE* pPtr = ( mpColMap + nNumb * ( 4 + mnCpp ) );
- BOOL bStatus = ImplGetString();
+ sal_uInt8* pString = mpStringBuf;
+ sal_uInt8* pPtr = ( mpColMap + nNumb * ( 4 + mnCpp ) );
+ sal_Bool bStatus = ImplGetString();
if ( bStatus )
{
- for ( ULONG i = 0; i < mnCpp; i++ )
+ for ( sal_uLong i = 0; i < mnCpp; i++ )
*pPtr++ = *pString++;
bStatus = ImplGetColSub ( pPtr );
}
@@ -259,11 +259,11 @@ BOOL XPMReader::ImplGetColor( ULONG nNumb )
// ImpGetScanLine liest den String mpBufSize aus und schreibt die Pixel in die
// Bitmap. Der Parameter nY gibt die horizontale Position an.
-BOOL XPMReader::ImplGetScanLine( ULONG nY )
+sal_Bool XPMReader::ImplGetScanLine( sal_uLong nY )
{
- BOOL bStatus = ImplGetString();
- BYTE* pString = mpStringBuf;
- BYTE* pColor;
+ sal_Bool bStatus = ImplGetString();
+ sal_uInt8* pString = mpStringBuf;
+ sal_uInt8* pColor;
BitmapColor aWhite;
BitmapColor aBlack;
@@ -275,18 +275,18 @@ BOOL XPMReader::ImplGetScanLine( ULONG nY )
aBlack = mpMaskAcc->GetBestMatchingColor( Color( COL_BLACK ) );
}
if ( mnStringSize != ( mnWidth * mnCpp ))
- bStatus = FALSE;
+ bStatus = sal_False;
else
{
- ULONG i, j;
+ sal_uLong i, j;
if ( mpFastColorTable )
{
for ( i = 0; i < mnWidth; i++ )
{
j = (*pString++) << 8;
j += *pString++;
- BYTE k = (BYTE)mpFastColorTable[ j ];
- mpAcc->SetPixel( nY, i, BitmapColor( (BYTE)k ) );
+ sal_uInt8 k = (sal_uInt8)mpFastColorTable[ j ];
+ mpAcc->SetPixel( nY, i, BitmapColor( (sal_uInt8)k ) );
if ( mpMaskAcc )
mpMaskAcc->SetPixel( nY, i,
@@ -298,12 +298,12 @@ BOOL XPMReader::ImplGetScanLine( ULONG nY )
pColor = mpColMap;
for ( j = 0; j < mnColors; j++ )
{
- if ( ImplCompare( pString, pColor, mnCpp, XPMCASESENSITIVE ) == TRUE )
+ if ( ImplCompare( pString, pColor, mnCpp, XPMCASESENSITIVE ) == sal_True )
{
if ( mnColors > 256 )
mpAcc->SetPixel( nY, i, Color ( pColor[3], pColor[4], pColor[5] ) );
else
- mpAcc->SetPixel( nY, i, BitmapColor( (BYTE) j ) );
+ mpAcc->SetPixel( nY, i, BitmapColor( (sal_uInt8) j ) );
if ( mpMaskAcc )
mpMaskAcc->SetPixel( nY, i, (
@@ -326,11 +326,11 @@ BOOL XPMReader::ImplGetScanLine( ULONG nY )
// wurde eine Farbe gefunden wird an pDest[1]..pDest[2] der RGB wert geschrieben
// pDest[0] enthaelt 0xff wenn die Farbe transparent ist sonst 0
-BOOL XPMReader::ImplGetColSub( BYTE* pDest )
+sal_Bool XPMReader::ImplGetColSub( sal_uInt8* pDest )
{
unsigned char cTransparent[] = "None";
- BOOL bColStatus = FALSE;
+ sal_Bool bColStatus = sal_False;
if ( ImplGetColKey( 'c' ) || ImplGetColKey( 'm' ) || ImplGetColKey( 'g' ) )
{
@@ -338,7 +338,7 @@ BOOL XPMReader::ImplGetColSub( BYTE* pDest )
if ( *mpPara == '#' )
{
*pDest++ = 0;
- bColStatus = TRUE;
+ bColStatus = sal_True;
switch ( mnParaSize )
{
case 25 :
@@ -351,7 +351,7 @@ BOOL XPMReader::ImplGetColSub( BYTE* pDest )
ImplGetRGBHex ( pDest, 0 );
break;
default:
- bColStatus = FALSE;
+ bColStatus = sal_False;
break;
}
}
@@ -359,14 +359,14 @@ BOOL XPMReader::ImplGetColSub( BYTE* pDest )
else if ( ImplCompare( &cTransparent[0], mpPara, 4 ))
{
*pDest++ = 0xff;
- bColStatus = TRUE;
- mbTransparent = TRUE;
+ bColStatus = sal_True;
+ mbTransparent = sal_True;
}
// last we will try to get the colorname
else if ( mnParaSize > 2 ) // name must enlarge the minimum size
{
- ULONG i = 0;
- while ( TRUE )
+ sal_uLong i = 0;
+ while ( sal_True )
{
if ( pRGBTable[ i ].name == NULL )
break;
@@ -375,7 +375,7 @@ BOOL XPMReader::ImplGetColSub( BYTE* pDest )
if ( ImplCompare ( (unsigned char*)pRGBTable[ i ].name,
mpPara, mnParaSize, XPMCASENONSENSITIVE ) )
{
- bColStatus = TRUE;
+ bColStatus = sal_True;
*pDest++ = 0;
*pDest++ = pRGBTable[ i ].red;
*pDest++ = pRGBTable[ i ].green;
@@ -391,11 +391,11 @@ BOOL XPMReader::ImplGetColSub( BYTE* pDest )
// ------------------------------------------------------------------------
// ImplGetColKey durchsuch den String mpStringBuf nach einem Parameter 'nKey'
-// und gibt einen BOOL zurueck. ( wenn TRUE werden mpPara und mnParaSize gesetzt )
+// und gibt einen sal_Bool zurueck. ( wenn sal_True werden mpPara und mnParaSize gesetzt )
-BOOL XPMReader::ImplGetColKey( BYTE nKey )
+sal_Bool XPMReader::ImplGetColKey( sal_uInt8 nKey )
{
- BYTE nTemp, nPrev = ' ';
+ sal_uInt8 nTemp, nPrev = ' ';
mpPara = mpStringBuf + mnCpp + 1;
mnParaSize = 0;
@@ -430,7 +430,7 @@ BOOL XPMReader::ImplGetColKey( BYTE nKey )
}
}
}
- return ( mnParaSize ) ? TRUE : FALSE;
+ return ( mnParaSize ) ? sal_True : sal_False;
}
// ------------------------------------------------------------------------
@@ -442,12 +442,12 @@ BOOL XPMReader::ImplGetColKey( BYTE nKey )
// 6 : '#12345678abcdefab12345678' " " " "
-void XPMReader::ImplGetRGBHex( BYTE* pDest,ULONG nAdd )
+void XPMReader::ImplGetRGBHex( sal_uInt8* pDest,sal_uLong nAdd )
{
- BYTE* pPtr = mpPara+1;
- BYTE nHex, nTemp;
+ sal_uInt8* pPtr = mpPara+1;
+ sal_uInt8 nHex, nTemp;
- for ( ULONG i = 0; i < 3; i++ )
+ for ( sal_uLong i = 0; i < 3; i++ )
{
nHex = (*pPtr++) - '0';
if ( nHex > 9 )
@@ -459,24 +459,24 @@ void XPMReader::ImplGetRGBHex( BYTE* pDest,ULONG nAdd )
nHex = ( nHex << 4 ) + nTemp;
pPtr += nAdd;
- *pDest++ = (BYTE)nHex;
+ *pDest++ = (sal_uInt8)nHex;
}
}
// ------------------------------------------------------------------------
// ImplGetUlong gibt den wert einer bis zu 6stelligen ASCII-Dezimalzahl zurueck.
-ULONG XPMReader::ImplGetULONG( ULONG nPara )
+sal_uLong XPMReader::ImplGetULONG( sal_uLong nPara )
{
if ( ImplGetPara ( nPara ) )
{
- ULONG nRetValue = 0;
- BYTE* pPtr = mpPara;
+ sal_uLong nRetValue = 0;
+ sal_uInt8* pPtr = mpPara;
if ( ( mnParaSize > 6 ) || ( mnParaSize == 0 ) ) return 0;
- for ( ULONG i = 0; i < mnParaSize; i++ )
+ for ( sal_uLong i = 0; i < mnParaSize; i++ )
{
- BYTE j = (*pPtr++) - 48;
+ sal_uInt8 j = (*pPtr++) - 48;
if ( j > 9 ) return 0; // ascii is invalid
nRetValue*=10;
nRetValue+=j;
@@ -488,28 +488,28 @@ ULONG XPMReader::ImplGetULONG( ULONG nPara )
// ------------------------------------------------------------------------
-BOOL XPMReader::ImplCompare( BYTE* pSource, BYTE* pDest, ULONG nSize, ULONG nMode )
+sal_Bool XPMReader::ImplCompare( sal_uInt8* pSource, sal_uInt8* pDest, sal_uLong nSize, sal_uLong nMode )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if ( nMode == XPMCASENONSENSITIVE )
{
- for ( ULONG i = 0; i < nSize; i++ )
+ for ( sal_uLong i = 0; i < nSize; i++ )
{
if ( ( pSource[i]&~0x20 ) != ( pDest[i]&~0x20 ) )
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
}
else
{
- for ( ULONG i = 0; i < nSize; i++ )
+ for ( sal_uLong i = 0; i < nSize; i++ )
{
if ( pSource[i] != pDest[i] )
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -520,15 +520,15 @@ BOOL XPMReader::ImplCompare( BYTE* pSource, BYTE* pDest, ULONG nSize, ULONG nMod
// ------------------------------------------------------------------------
// ImplGetPara versucht den nNumb ( 0...x ) Parameter aus mpStringBuf zu ermitteln.
// Ein Parameter ist durch Spaces oder Tabs von den anderen getrennt.
-// Konnte der Parameter gefunden werden ist der Rueckgabewert TRUE und mpPara + mnParaSize
+// Konnte der Parameter gefunden werden ist der Rueckgabewert sal_True und mpPara + mnParaSize
// werden gesetzt.
-BOOL XPMReader::ImplGetPara ( ULONG nNumb )
+sal_Bool XPMReader::ImplGetPara ( sal_uLong nNumb )
{
- BYTE nByte;
- ULONG pSize = 0;
- BYTE* pPtr = mpStringBuf;
- ULONG nCount = 0;
+ sal_uInt8 nByte;
+ sal_uLong pSize = 0;
+ sal_uInt8* pPtr = mpStringBuf;
+ sal_uLong nCount = 0;
if ( ( *pPtr != ' ' ) && ( *pPtr != 0x09 ) )
{
@@ -570,7 +570,7 @@ BOOL XPMReader::ImplGetPara ( ULONG nNumb )
pSize++;
pPtr++;
}
- return ( ( nCount == nNumb ) && ( mpPara ) ) ? TRUE : FALSE;
+ return ( ( nCount == nNumb ) && ( mpPara ) ) ? sal_True : sal_False;
}
// ------------------------------------------------------------------------
@@ -578,10 +578,10 @@ BOOL XPMReader::ImplGetPara ( ULONG nNumb )
// mnStringSize enthaelt die Groesse des gelesenen Strings.
// Bemerkungen wie '//' und '/*.....*/' werden uebersprungen.
-BOOL XPMReader::ImplGetString( void )
+sal_Bool XPMReader::ImplGetString( void )
{
- BYTE sID[] = "/* XPM */";
- BYTE* pString = mpStringBuf;
+ sal_uInt8 sID[] = "/* XPM */";
+ sal_uInt8* pString = mpStringBuf;
mnStringSize = 0;
mpStringBuf[0] = 0;
@@ -600,13 +600,13 @@ BOOL XPMReader::ImplGetString( void )
{
if ( mnTempAvail <= 50 )
{
- mbStatus = FALSE; // file is too short to be a correct XPM format
+ mbStatus = sal_False; // file is too short to be a correct XPM format
break;
}
for ( int i = 0; i < 9; i++ ) // searching for "/* XPM */"
if ( *mpTempPtr++ != sID[i] )
{
- mbStatus = FALSE;
+ mbStatus = sal_False;
break;
}
mnTempAvail-=9;
@@ -638,7 +638,7 @@ BOOL XPMReader::ImplGetString( void )
}
if ( mnStringSize >= ( XPMSTRINGBUF - 1 ) )
{
- mbStatus = FALSE;
+ mbStatus = sal_False;
break;
}
*pString++ = mcThisByte;
@@ -676,11 +676,11 @@ BOOL XPMReader::ImplGetString( void )
// - ImportXPM -
// -------------
-BOOL ImportXPM( SvStream& rStm, Graphic& rGraphic )
+sal_Bool ImportXPM( SvStream& rStm, Graphic& rGraphic )
{
XPMReader* pXPMReader = (XPMReader*) rGraphic.GetContext();
ReadState eReadState;
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( !pXPMReader )
pXPMReader = new XPMReader( rStm );
@@ -690,7 +690,7 @@ BOOL ImportXPM( SvStream& rStm, Graphic& rGraphic )
if( eReadState == XPMREAD_ERROR )
{
- bRet = FALSE;
+ bRet = sal_False;
delete pXPMReader;
}
else if( eReadState == XPMREAD_OK )
diff --git a/svtools/source/filter.vcl/jpeg/jpeg.cxx b/svtools/source/filter.vcl/jpeg/jpeg.cxx
index a2de92171af3..dff6ec8ff51f 100644
--- a/svtools/source/filter.vcl/jpeg/jpeg.cxx
+++ b/svtools/source/filter.vcl/jpeg/jpeg.cxx
@@ -32,12 +32,10 @@
extern "C"
{
- #define INT32 JPEG_INT32
#include "stdio.h"
#include "jpeg.h"
#include "jpeglib.h"
#include "jerror.h"
- #undef INT32
}
#define _JPEGPRIVATE
@@ -125,7 +123,7 @@ extern "C" int empty_output_buffer (j_compress_ptr cinfo)
dest->pub.next_output_byte = dest->buffer;
dest->pub.free_in_buffer = BUF_SIZE;
- return TRUE;
+ return sal_True;
}
extern "C" void term_destination (j_compress_ptr cinfo)
@@ -189,7 +187,7 @@ extern "C" void init_source (j_decompress_ptr cinfo)
* but we don't clear the input buffer.
* This is correct behavior for reading a series of images from one source.
*/
- src->start_of_file = TRUE;
+ src->start_of_file = sal_True;
}
long StreamRead( SvStream* pSvStm, void* pBuffer, long nBufferSize )
@@ -238,9 +236,9 @@ extern "C" int fill_input_buffer (j_decompress_ptr cinfo)
src->pub.next_input_byte = src->buffer;
src->pub.bytes_in_buffer = nbytes;
- src->start_of_file = FALSE;
+ src->start_of_file = sal_False;
- return TRUE;
+ return sal_True;
}
extern "C" void skip_input_data (j_decompress_ptr cinfo, long num_bytes)
@@ -255,7 +253,7 @@ extern "C" void skip_input_data (j_decompress_ptr cinfo, long num_bytes)
while (num_bytes > (long) src->pub.bytes_in_buffer) {
num_bytes -= (long) src->pub.bytes_in_buffer;
(void) fill_input_buffer(cinfo);
- /* note we assume that fill_input_buffer will never return FALSE,
+ /* note we assume that fill_input_buffer will never return sal_False,
* so suspension need not be handled.
*/
}
@@ -350,9 +348,9 @@ void* JPEGReader::CreateBitmap( void* pParam )
{
BitmapPalette aGrayPal( 256 );
- for( USHORT n = 0; n < 256; n++ )
+ for( sal_uInt16 n = 0; n < 256; n++ )
{
- const BYTE cGray = (BYTE) n;
+ const sal_uInt8 cGray = (sal_uInt8) n;
aGrayPal[ n ] = BitmapColor( cGray, cGray, cGray );
}
@@ -386,7 +384,7 @@ void* JPEGReader::CreateBitmap( void* pParam )
{
long nAlignedWidth;
- const ULONG nFormat = pAcc->GetScanlineFormat();
+ const sal_uLong nFormat = pAcc->GetScanlineFormat();
if(
( bGray && ( BMP_FORMAT_8BIT_PAL == nFormat ) ) ||
@@ -400,7 +398,7 @@ void* JPEGReader::CreateBitmap( void* pParam )
else
{
nAlignedWidth = AlignedWidth4Bytes( aSize.Width() * ( bGray ? 8 : 24 ) );
- ((JPEGCreateBitmapParam*)pParam)->bTopDown = TRUE;
+ ((JPEGCreateBitmapParam*)pParam)->bTopDown = sal_True;
pBmpBuf = pBuffer = rtl_allocateMemory( nAlignedWidth * aSize.Height() );
}
((JPEGCreateBitmapParam*)pParam)->nAlignedWidth = nAlignedWidth;
@@ -425,9 +423,9 @@ void JPEGReader::FillBitmap()
{
BitmapColor* pCols = new BitmapColor[ 256 ];
- for( USHORT n = 0; n < 256; n++ )
+ for( sal_uInt16 n = 0; n < 256; n++ )
{
- const BYTE cGray = (BYTE) n;
+ const sal_uInt8 cGray = (sal_uInt8) n;
pCols[ n ] = pAcc->GetBestMatchingColor( BitmapColor( cGray, cGray, cGray ) );
}
@@ -435,7 +433,7 @@ void JPEGReader::FillBitmap()
for( long nY = 0L; nY < nHeight; nY++ )
{
- pTmp = (BYTE*) pBuffer + nY * nAlignedWidth;
+ pTmp = (sal_uInt8*) pBuffer + nY * nAlignedWidth;
for( long nX = 0L; nX < nWidth; nX++ )
pAcc->SetPixel( nY, nX, pCols[ *pTmp++ ] );
@@ -449,7 +447,7 @@ void JPEGReader::FillBitmap()
for( long nY = 0L; nY < nHeight; nY++ )
{
- pTmp = (BYTE*) pBuffer + nY * nAlignedWidth;
+ pTmp = (sal_uInt8*) pBuffer + nY * nAlignedWidth;
for( long nX = 0L; nX < nWidth; nX++ )
{
@@ -515,8 +513,8 @@ ReadState JPEGReader::Read( Graphic& rGraphic )
long nEndPos;
long nLines;
ReadState eReadState;
- BOOL bRet = FALSE;
- BYTE cDummy;
+ sal_Bool bRet = sal_False;
+ sal_uInt8 cDummy;
#if 1 // TODO: is it possible to get rid of this seek to the end?
// check if the stream's end is already available
@@ -562,10 +560,10 @@ ReadState JPEGReader::Read( Graphic& rGraphic )
else
rGraphic = aBmp;
- bRet = TRUE;
+ bRet = sal_True;
}
else if( rIStm.GetError() == ERRCODE_IO_PENDING )
- bRet = TRUE;
+ bRet = sal_True;
// Status setzen ( Pending hat immer Vorrang )
if( rIStm.GetError() == ERRCODE_IO_PENDING )
@@ -629,13 +627,13 @@ void* JPEGWriter::GetScanline( long nY )
{
BitmapColor aColor;
long nWidth = pAcc->Width();
- BYTE* pTmp = pBuffer;
+ sal_uInt8* pTmp = pBuffer;
if( pAcc->HasPalette() )
{
for( long nX = 0L; nX < nWidth; nX++ )
{
- aColor = pAcc->GetPaletteColor( (BYTE) pAcc->GetPixel( nY, nX ) );
+ aColor = pAcc->GetPaletteColor( (sal_uInt8) pAcc->GetPixel( nY, nX ) );
*pTmp++ = aColor.GetRed();
if ( bGreys )
continue;
@@ -665,9 +663,9 @@ void* JPEGWriter::GetScanline( long nY )
// ------------------------------------------------------------------------
-BOOL JPEGWriter::Write( const Graphic& rGraphic )
+sal_Bool JPEGWriter::Write( const Graphic& rGraphic )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( xStatusIndicator.is() )
{
@@ -696,7 +694,7 @@ BOOL JPEGWriter::Write( const Graphic& rGraphic )
BitmapColor aColor;
for( long nX = 0L; bIsGrey && ( nX < nWidth ); nX++ )
{
- aColor = pAcc->HasPalette() ? pAcc->GetPaletteColor( (BYTE) pAcc->GetPixel( nY, nX ) )
+ aColor = pAcc->HasPalette() ? pAcc->GetPaletteColor( (sal_uInt8) pAcc->GetPixel( nY, nX ) )
: pAcc->GetPixel( nY, nX );
bIsGrey = ( aColor.GetRed() == aColor.GetGreen() ) && ( aColor.GetRed() == aColor.GetBlue() );
}
@@ -713,11 +711,11 @@ BOOL JPEGWriter::Write( const Graphic& rGraphic )
bNative = ( pAcc->GetScanlineFormat() == BMP_FORMAT_24BIT_TC_RGB );
if( !bNative )
- pBuffer = new BYTE[ AlignedWidth4Bytes( bGreys ? pAcc->Width() * 8L : pAcc->Width() * 24L ) ];
+ pBuffer = new sal_uInt8[ AlignedWidth4Bytes( bGreys ? pAcc->Width() * 8L : pAcc->Width() * 24L ) ];
JPEGCallbackStruct aCallbackData;
aCallbackData.xStatusIndicator = xStatusIndicator;
- bRet = (BOOL) WriteJPEG( this, &rOStm, pAcc->Width(), pAcc->Height(), bGreys, nQuality, &aCallbackData );
+ bRet = (sal_Bool) WriteJPEG( this, &rOStm, pAcc->Width(), pAcc->Height(), bGreys, nQuality, &aCallbackData );
delete[] pBuffer;
pBuffer = NULL;
@@ -735,11 +733,11 @@ BOOL JPEGWriter::Write( const Graphic& rGraphic )
// - ImportJPEG -
// --------------
-BOOL ImportJPEG( SvStream& rStm, Graphic& rGraphic, void* pCallerData, sal_Int32 nImportFlags )
+sal_Bool ImportJPEG( SvStream& rStm, Graphic& rGraphic, void* pCallerData, sal_Int32 nImportFlags )
{
JPEGReader* pJPEGReader = (JPEGReader*) rGraphic.GetContext();
ReadState eReadState;
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( !pJPEGReader )
pJPEGReader = new JPEGReader( rStm, pCallerData, ( nImportFlags & GRFILTER_I_FLAGS_SET_LOGSIZE_FOR_JPEG ) != 0 );
@@ -754,7 +752,7 @@ BOOL ImportJPEG( SvStream& rStm, Graphic& rGraphic, void* pCallerData, sal_Int32
if( eReadState == JPEGREAD_ERROR )
{
- bRet = FALSE;
+ bRet = sal_False;
delete pJPEGReader;
}
else if( eReadState == JPEGREAD_OK )
@@ -769,7 +767,7 @@ BOOL ImportJPEG( SvStream& rStm, Graphic& rGraphic, void* pCallerData, sal_Int32
// - ExportJPEG -
// --------------
-BOOL ExportJPEG( SvStream& rOStm, const Graphic& rGraphic,
+sal_Bool ExportJPEG( SvStream& rOStm, const Graphic& rGraphic,
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData,
bool* pExportWasGrey
)
diff --git a/svtools/source/filter.vcl/jpeg/jpeg.h b/svtools/source/filter.vcl/jpeg/jpeg.h
index 82a2f80a838c..ca9b294d2f9d 100644
--- a/svtools/source/filter.vcl/jpeg/jpeg.h
+++ b/svtools/source/filter.vcl/jpeg/jpeg.h
@@ -50,7 +50,6 @@ struct JPEGCreateBitmapParam
};
typedef struct my_error_mgr* my_error_ptr;
-typedef unsigned char BYTE;
typedef unsigned char* HPBYTE;
void* JPEGMalloc( size_t size );
diff --git a/svtools/source/filter.vcl/jpeg/jpegc.c b/svtools/source/filter.vcl/jpeg/jpegc.c
index 29b4749a7b51..8d3a82a86ef3 100644
--- a/svtools/source/filter.vcl/jpeg/jpegc.c
+++ b/svtools/source/filter.vcl/jpeg/jpegc.c
@@ -100,13 +100,13 @@ void ReadJPEG( void* pJPEGReader, void* pIStm, long* pLines )
jpeg_create_decompress( &cinfo );
bDecompCreated = 1;
jpeg_svstream_src( &cinfo, pIStm );
- jpeg_read_header( &cinfo, TRUE );
+ jpeg_read_header( &cinfo, sal_True );
cinfo.scale_num = 1;
cinfo.scale_denom = 1;
cinfo.output_gamma = 1.0;
- cinfo.raw_data_out = FALSE;
- cinfo.quantize_colors = FALSE;
+ cinfo.raw_data_out = sal_False;
+ cinfo.quantize_colors = sal_False;
if ( cinfo.jpeg_color_space == JCS_YCbCr )
cinfo.out_color_space = JCS_RGB;
else if ( cinfo.jpeg_color_space == JCS_YCCK )
@@ -138,8 +138,8 @@ void ReadJPEG( void* pJPEGReader, void* pIStm, long* pLines )
if( cinfo.scale_denom > 1 )
{
cinfo.dct_method = JDCT_FASTEST;
- cinfo.do_fancy_upsampling = FALSE;
- cinfo.do_block_smoothing = FALSE;
+ cinfo.do_fancy_upsampling = sal_False;
+ cinfo.do_block_smoothing = sal_False;
}
}
@@ -253,12 +253,12 @@ long WriteJPEG( void* pJPEGWriter, void* pOStm,
}
jpeg_set_defaults( &cinfo );
- jpeg_set_quality( &cinfo, (int) nQualityPercent, FALSE );
+ jpeg_set_quality( &cinfo, (int) nQualityPercent, sal_False );
if ( ( nWidth > 128 ) || ( nHeight > 128 ) )
jpeg_simple_progression( &cinfo );
- jpeg_start_compress( &cinfo, TRUE );
+ jpeg_start_compress( &cinfo, sal_True );
for( nY = 0; nY < nHeight; nY++ )
{
diff --git a/svtools/source/filter.vcl/wmf/emfwr.cxx b/svtools/source/filter.vcl/wmf/emfwr.cxx
index f31fd4439e9f..d82f11cdce5a 100644
--- a/svtools/source/filter.vcl/wmf/emfwr.cxx
+++ b/svtools/source/filter.vcl/wmf/emfwr.cxx
@@ -168,18 +168,18 @@
// - EMFWriter -
// -------------
-BOOL EMFWriter::WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterConfigItem* pFilterConfigItem )
+sal_Bool EMFWriter::WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterConfigItem* pFilterConfigItem )
{
- const ULONG nHeaderPos = rOStm.Tell();
+ const sal_uLong nHeaderPos = rOStm.Tell();
- mpHandlesUsed = new BOOL[ MAXHANDLES ];
- memset( mpHandlesUsed, 0, MAXHANDLES * sizeof( BOOL ) );
+ mpHandlesUsed = new sal_Bool[ MAXHANDLES ];
+ memset( mpHandlesUsed, 0, MAXHANDLES * sizeof( sal_Bool ) );
mnHorTextAlign = mnHandleCount = mnLastPercent = mnRecordPos = mnRecordCount = 0;
mnLineHandle = mnFillHandle = mnTextHandle = HANDLE_INVALID;
- mbRecordOpen = FALSE;
+ mbRecordOpen = sal_False;
mpStm = &rOStm;
- maVDev.EnableOutput( FALSE );
+ maVDev.EnableOutput( sal_False );
maVDev.SetMapMode( rMtf.GetPrefMapMode() );
mpFilterConfigItem = pFilterConfigItem;
@@ -197,29 +197,29 @@ BOOL EMFWriter::WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterConfig
// set 100th mm map mode in EMF
ImplBeginRecord( WIN_EMR_SETMAPMODE );
- (*mpStm) << (INT32) MM_ANISOTROPIC;
+ (*mpStm) << (sal_Int32) MM_ANISOTROPIC;
ImplEndRecord();
ImplBeginRecord( WIN_EMR_SETVIEWPORTEXTEX );
- (*mpStm) << (INT32) maVDev.ImplGetDPIX() << (INT32) maVDev.ImplGetDPIY();
+ (*mpStm) << (sal_Int32) maVDev.ImplGetDPIX() << (sal_Int32) maVDev.ImplGetDPIY();
ImplEndRecord();
ImplBeginRecord( WIN_EMR_SETWINDOWEXTEX );
- (*mpStm) << (INT32) 2540 << (INT32) 2540;
+ (*mpStm) << (sal_Int32) 2540 << (sal_Int32) 2540;
ImplEndRecord();
ImplBeginRecord( WIN_EMR_SETVIEWPORTORGEX );
- (*mpStm) << (INT32) 0 << (INT32) 0;
+ (*mpStm) << (sal_Int32) 0 << (sal_Int32) 0;
ImplEndRecord();
ImplBeginRecord( WIN_EMR_SETWINDOWORGEX );
- (*mpStm) << (INT32) 0 << (INT32) 0;
+ (*mpStm) << (sal_Int32) 0 << (sal_Int32) 0;
ImplEndRecord();
ImplWriteRasterOp( ROP_OVERPAINT );
ImplBeginRecord( WIN_EMR_SETBKMODE );
- (*mpStm) << (UINT32) 1; // TRANSPARENT
+ (*mpStm) << (sal_uInt32) 1; // TRANSPARENT
ImplEndRecord();
// write emf data
@@ -233,17 +233,17 @@ BOOL EMFWriter::WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterConfig
// write header
- const ULONG nEndPos = mpStm->Tell(); mpStm->Seek( nHeaderPos );
-
- (*mpStm) << (UINT32) 0x00000001 << (UINT32) 108 //use [MS-EMF 2.2.11] HeaderExtension2 Object
- << (INT32) 0 << (INT32) 0 << (INT32) ( aMtfSizePix.Width() - 1 ) << (INT32) ( aMtfSizePix.Height() - 1 )
- << (INT32) 0 << (INT32) 0 << (INT32) ( aMtfSizeLog.Width() - 1 ) << (INT32) ( aMtfSizeLog.Height() - 1 )
- << (UINT32) 0x464d4520 << (UINT32) 0x10000 << (UINT32) ( nEndPos - nHeaderPos )
- << (UINT32) mnRecordCount << (UINT16) ( mnHandleCount + 1 ) << (UINT16) 0 << (UINT32) 0 << (UINT32) 0 << (UINT32) 0
- << (INT32) aMtfSizePix.Width() << (INT32) aMtfSizePix.Height()
- << (INT32) ( aMtfSizeLog.Width() / 100 ) << (INT32) ( aMtfSizeLog.Height() / 100 )
- << (UINT32) 0 << (UINT32) 0 << (UINT32) 0
- << (INT32) ( aMtfSizeLog.Width() * 10 ) << (INT32) ( aMtfSizeLog.Height() * 10 ); //use [MS-EMF 2.2.11] HeaderExtension2 Object
+ const sal_uLong nEndPos = mpStm->Tell(); mpStm->Seek( nHeaderPos );
+
+ (*mpStm) << (sal_uInt32) 0x00000001 << (sal_uInt32) 108 //use [MS-EMF 2.2.11] HeaderExtension2 Object
+ << (sal_Int32) 0 << (sal_Int32) 0 << (sal_Int32) ( aMtfSizePix.Width() - 1 ) << (sal_Int32) ( aMtfSizePix.Height() - 1 )
+ << (sal_Int32) 0 << (sal_Int32) 0 << (sal_Int32) ( aMtfSizeLog.Width() - 1 ) << (sal_Int32) ( aMtfSizeLog.Height() - 1 )
+ << (sal_uInt32) 0x464d4520 << (sal_uInt32) 0x10000 << (sal_uInt32) ( nEndPos - nHeaderPos )
+ << (sal_uInt32) mnRecordCount << (sal_uInt16) ( mnHandleCount + 1 ) << (sal_uInt16) 0 << (sal_uInt32) 0 << (sal_uInt32) 0 << (sal_uInt32) 0
+ << (sal_Int32) aMtfSizePix.Width() << (sal_Int32) aMtfSizePix.Height()
+ << (sal_Int32) ( aMtfSizeLog.Width() / 100 ) << (sal_Int32) ( aMtfSizeLog.Height() / 100 )
+ << (sal_uInt32) 0 << (sal_uInt32) 0 << (sal_uInt32) 0
+ << (sal_Int32) ( aMtfSizeLog.Width() * 10 ) << (sal_Int32) ( aMtfSizeLog.Height() * 10 ); //use [MS-EMF 2.2.11] HeaderExtension2 Object
mpStm->Seek( nEndPos );
delete[] mpHandlesUsed;
@@ -253,15 +253,15 @@ BOOL EMFWriter::WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterConfig
// -----------------------------------------------------------------------------
-ULONG EMFWriter::ImplAcquireHandle()
+sal_uLong EMFWriter::ImplAcquireHandle()
{
- ULONG nHandle = HANDLE_INVALID;
+ sal_uLong nHandle = HANDLE_INVALID;
- for( ULONG i = 0; i < MAXHANDLES && ( HANDLE_INVALID == nHandle ); i++ )
+ for( sal_uLong i = 0; i < MAXHANDLES && ( HANDLE_INVALID == nHandle ); i++ )
{
if( !mpHandlesUsed[ i ] )
{
- mpHandlesUsed[ i ] = TRUE;
+ mpHandlesUsed[ i ] = sal_True;
if( ( nHandle = i ) == mnHandleCount )
mnHandleCount++;
@@ -274,10 +274,10 @@ ULONG EMFWriter::ImplAcquireHandle()
// -----------------------------------------------------------------------------
-void EMFWriter::ImplReleaseHandle( ULONG nHandle )
+void EMFWriter::ImplReleaseHandle( sal_uLong nHandle )
{
DBG_ASSERT( nHandle && ( nHandle < MAXHANDLES ), "Handle out of range" );
- mpHandlesUsed[ nHandle - 1 ] = FALSE;
+ mpHandlesUsed[ nHandle - 1 ] = sal_False;
}
// -----------------------------------------------------------------------------
@@ -288,7 +288,7 @@ void EMFWriter::ImplBeginRecord( sal_uInt32 nType )
if( !mbRecordOpen )
{
- mbRecordOpen = TRUE;
+ mbRecordOpen = sal_True;
mnRecordPos = mpStm->Tell();
(*mpStm) << nType;
@@ -315,17 +315,17 @@ void EMFWriter::ImplEndRecord()
while( nFillBytes-- )
*mpStm << (sal_uInt8)0;
mnRecordCount++;
- mbRecordOpen = FALSE;
+ mbRecordOpen = sal_False;
}
}
// -----------------------------------------------------------------------------
-BOOL EMFWriter::ImplPrepareHandleSelect( sal_uInt32& rHandle, ULONG nSelectType )
+sal_Bool EMFWriter::ImplPrepareHandleSelect( sal_uInt32& rHandle, sal_uLong nSelectType )
{
if( rHandle != HANDLE_INVALID )
{
- UINT32 nStockObject = 0x80000000;
+ sal_uInt32 nStockObject = 0x80000000;
if( LINE_SELECT == nSelectType )
nStockObject |= 0x00000007;
@@ -410,7 +410,7 @@ void EMFWriter::ImplCheckTextAttr()
(*mpStm) << mnTextHandle;
ImplWriteExtent( -rFont.GetSize().Height() );
ImplWriteExtent( rFont.GetSize().Width() );
- (*mpStm) << (INT32) rFont.GetOrientation() << (INT32) rFont.GetOrientation();
+ (*mpStm) << (sal_Int32) rFont.GetOrientation() << (sal_Int32) rFont.GetOrientation();
switch( rFont.GetWeight() )
{
@@ -428,11 +428,11 @@ void EMFWriter::ImplCheckTextAttr()
}
(*mpStm) << nWeight;
- (*mpStm) << (BYTE) ( ( ITALIC_NONE == rFont.GetItalic() ) ? 0 : 1 );
- (*mpStm) << (BYTE) ( ( UNDERLINE_NONE == rFont.GetUnderline() ) ? 0 : 1 );
- (*mpStm) << (BYTE) ( ( STRIKEOUT_NONE == rFont.GetStrikeout() ) ? 0 : 1 );
- (*mpStm) << (BYTE) ( ( RTL_TEXTENCODING_SYMBOL == rFont.GetCharSet() ) ? 2 : 0 );
- (*mpStm) << (BYTE) 0 << (BYTE) 0 << (BYTE) 0;
+ (*mpStm) << (sal_uInt8) ( ( ITALIC_NONE == rFont.GetItalic() ) ? 0 : 1 );
+ (*mpStm) << (sal_uInt8) ( ( UNDERLINE_NONE == rFont.GetUnderline() ) ? 0 : 1 );
+ (*mpStm) << (sal_uInt8) ( ( STRIKEOUT_NONE == rFont.GetStrikeout() ) ? 0 : 1 );
+ (*mpStm) << (sal_uInt8) ( ( RTL_TEXTENCODING_SYMBOL == rFont.GetCharSet() ) ? 2 : 0 );
+ (*mpStm) << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0;
switch( rFont.GetPitch() )
{
@@ -465,24 +465,24 @@ void EMFWriter::ImplCheckTextAttr()
(*mpStm) << (sal_Unicode) 0;
// dummy elfVersion, elfStyleSize, elfMatch, elfReserved
- (*mpStm) << (UINT32) 0 << (UINT32) 0 << (UINT32) 0 << (UINT32) 0 ;
+ (*mpStm) << (sal_uInt32) 0 << (sal_uInt32) 0 << (sal_uInt32) 0 << (sal_uInt32) 0 ;
// dummy elfVendorId
- (*mpStm) << (UINT32) 0;
+ (*mpStm) << (sal_uInt32) 0;
// dummy elfCulture
- (*mpStm) << (UINT32) 0;
+ (*mpStm) << (sal_uInt32) 0;
// dummy elfPanose
- (*mpStm) << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0;
+ (*mpStm) << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0;
// fill record to get a record size divideable by 4
- (*mpStm) << (UINT16) 0;
+ (*mpStm) << (sal_uInt16) 0;
ImplEndRecord();
// TextAlign
- UINT32 nTextAlign;
+ sal_uInt32 nTextAlign;
switch( rFont.GetAlign() )
{
@@ -511,10 +511,10 @@ void EMFWriter::ImplCheckTextAttr()
void EMFWriter::ImplWriteColor( const Color& rColor )
{
- UINT32 nCol = rColor.GetRed();
+ sal_uInt32 nCol = rColor.GetRed();
- nCol |= ( (UINT32) rColor.GetGreen() ) << 8;
- nCol |= ( (UINT32) rColor.GetBlue() ) << 16;
+ nCol |= ( (sal_uInt32) rColor.GetGreen() ) << 8;
+ nCol |= ( (sal_uInt32) rColor.GetBlue() ) << 16;
(*mpStm) << nCol;
}
@@ -523,7 +523,7 @@ void EMFWriter::ImplWriteColor( const Color& rColor )
void EMFWriter::ImplWriteRasterOp( RasterOp eRop )
{
- UINT32 nROP2;
+ sal_uInt32 nROP2;
switch( eRop )
{
@@ -542,7 +542,7 @@ void EMFWriter::ImplWriteRasterOp( RasterOp eRop )
void EMFWriter::ImplWriteExtent( long nExtent )
{
nExtent = maVDev.LogicToLogic( Size( nExtent, 0 ), maVDev.GetMapMode(), maDestMapMode ).Width();
- (*mpStm) << (INT32) nExtent;
+ (*mpStm) << (sal_Int32) nExtent;
}
// -----------------------------------------------------------------------------
@@ -550,7 +550,7 @@ void EMFWriter::ImplWriteExtent( long nExtent )
void EMFWriter::ImplWritePoint( const Point& rPoint )
{
const Point aPoint( maVDev.LogicToLogic( rPoint, maVDev.GetMapMode(), maDestMapMode ));
- (*mpStm) << (INT32) aPoint.X() << (INT32) aPoint.Y();
+ (*mpStm) << (sal_Int32) aPoint.X() << (sal_Int32) aPoint.Y();
}
// -----------------------------------------------------------------------------
@@ -558,7 +558,7 @@ void EMFWriter::ImplWritePoint( const Point& rPoint )
void EMFWriter::ImplWriteSize( const Size& rSize)
{
const Size aSize( maVDev.LogicToLogic( rSize, maVDev.GetMapMode(), maDestMapMode ));
- (*mpStm) << (INT32) aSize.Width() << (INT32) aSize.Height();
+ (*mpStm) << (sal_Int32) aSize.Width() << (sal_Int32) aSize.Height();
}
// -----------------------------------------------------------------------------
@@ -571,7 +571,7 @@ void EMFWriter::ImplWriteRect( const Rectangle& rRect )
// -----------------------------------------------------------------------------
-void EMFWriter::ImplWritePolygonRecord( const Polygon& rPoly, BOOL bClose )
+void EMFWriter::ImplWritePolygonRecord( const Polygon& rPoly, sal_Bool bClose )
{
if( rPoly.GetSize() )
{
@@ -586,9 +586,9 @@ void EMFWriter::ImplWritePolygonRecord( const Polygon& rPoly, BOOL bClose )
ImplBeginRecord( bClose ? WIN_EMR_POLYGON : WIN_EMR_POLYLINE );
ImplWriteRect( rPoly.GetBoundRect() );
- (*mpStm) << (UINT32) rPoly.GetSize();
+ (*mpStm) << (sal_uInt32) rPoly.GetSize();
- for( USHORT i = 0; i < rPoly.GetSize(); i++ )
+ for( sal_uInt16 i = 0; i < rPoly.GetSize(); i++ )
ImplWritePoint( rPoly[ i ] );
ImplEndRecord();
@@ -605,7 +605,7 @@ void EMFWriter::ImplWritePolyPolygonRecord( const PolyPolygon& rPolyPoly )
if( nPolyCount )
{
if( 1 == nPolyCount )
- ImplWritePolygonRecord( rPolyPoly[ 0 ], TRUE );
+ ImplWritePolygonRecord( rPolyPoly[ 0 ], sal_True );
else
{
sal_Bool bHasFlags = sal_False;
@@ -737,7 +737,7 @@ void EMFWriter::ImplWritePath( const PolyPolygon& rPolyPoly, sal_Bool bClosed )
// -----------------------------------------------------------------------------
void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt,
- const Size& rSz, UINT32 nROP )
+ const Size& rSz, sal_uInt32 nROP )
{
if( !!rBmp )
{
@@ -747,19 +747,19 @@ void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt,
ImplBeginRecord( WIN_EMR_STRETCHDIBITS );
ImplWriteRect( Rectangle( rPt, rSz ) );
ImplWritePoint( rPt );
- (*mpStm) << (INT32) 0 << (INT32) 0 << (INT32) aBmpSizePixel.Width() << (INT32) aBmpSizePixel.Height();
+ (*mpStm) << (sal_Int32) 0 << (sal_Int32) 0 << (sal_Int32) aBmpSizePixel.Width() << (sal_Int32) aBmpSizePixel.Height();
// write offset positions and sizes later
- const ULONG nOffPos = mpStm->Tell();
+ const sal_uLong nOffPos = mpStm->Tell();
mpStm->SeekRel( 16 );
- (*mpStm) << (UINT32) 0 << ( ( ROP_XOR == maVDev.GetRasterOp() && WIN_SRCCOPY == nROP ) ? WIN_SRCINVERT : nROP );
+ (*mpStm) << (sal_uInt32) 0 << ( ( ROP_XOR == maVDev.GetRasterOp() && WIN_SRCCOPY == nROP ) ? WIN_SRCINVERT : nROP );
ImplWriteSize( rSz );
- rBmp.Write( aMemStm, TRUE, FALSE );
+ rBmp.Write( aMemStm, sal_True, sal_False );
- UINT32 nDIBSize = aMemStm.Tell(), nHeaderSize, nCompression, nColsUsed, nPalCount, nImageSize;
- UINT16 nBitCount;
+ sal_uInt32 nDIBSize = aMemStm.Tell(), nHeaderSize, nCompression, nColsUsed, nPalCount, nImageSize;
+ sal_uInt16 nBitCount;
// get DIB parameters
aMemStm.Seek( 0 );
@@ -769,15 +769,15 @@ void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt,
aMemStm.SeekRel( 8 );
aMemStm >> nColsUsed;
- nPalCount = ( nBitCount <= 8 ) ? ( nColsUsed ? nColsUsed : ( 1 << (UINT32) nBitCount ) ) :
+ nPalCount = ( nBitCount <= 8 ) ? ( nColsUsed ? nColsUsed : ( 1 << (sal_uInt32) nBitCount ) ) :
( ( 3 == nCompression ) ? 12 : 0 );
mpStm->Write( aMemStm.GetData(), nDIBSize );
- const ULONG nEndPos = mpStm->Tell();
+ const sal_uLong nEndPos = mpStm->Tell();
mpStm->Seek( nOffPos );
- (*mpStm) << (UINT32) 80 << (UINT32)( nHeaderSize + ( nPalCount << 2 ) );
- (*mpStm) << (UINT32)( 80 + ( nHeaderSize + ( nPalCount << 2 ) ) ) << nImageSize;
+ (*mpStm) << (sal_uInt32) 80 << (sal_uInt32)( nHeaderSize + ( nPalCount << 2 ) );
+ (*mpStm) << (sal_uInt32)( 80 + ( nHeaderSize + ( nPalCount << 2 ) ) ) << nImageSize;
mpStm->Seek( nEndPos );
ImplEndRecord();
@@ -827,12 +827,12 @@ void EMFWriter::ImplWriteTextRecord( const Point& rPos, const String rText, cons
ImplBeginRecord( WIN_EMR_EXTTEXTOUTW );
ImplWriteRect( Rectangle( rPos, Size( nNormWidth, maVDev.GetTextHeight() ) ) );
- (*mpStm) << (UINT32)1;
- (*mpStm) << (INT32) 0 << (INT32) 0;
+ (*mpStm) << (sal_uInt32)1;
+ (*mpStm) << (sal_Int32) 0 << (sal_Int32) 0;
ImplWritePoint( rPos );
- (*mpStm) << (UINT32) nLen << (UINT32) 76 << (UINT32) 2;
- (*mpStm) << (INT32) 0 << (INT32) 0 << (INT32) 0 << (INT32) 0;
- (*mpStm) << (UINT32) ( 76 + ( nLen << 1 ) + ( (nLen & 1 ) ? 2 : 0 ) );
+ (*mpStm) << (sal_uInt32) nLen << (sal_uInt32) 76 << (sal_uInt32) 2;
+ (*mpStm) << (sal_Int32) 0 << (sal_Int32) 0 << (sal_Int32) 0 << (sal_Int32) 0;
+ (*mpStm) << (sal_uInt32) ( 76 + ( nLen << 1 ) + ( (nLen & 1 ) ? 2 : 0 ) );
// write text
for( i = 0; i < nLen; i++ )
@@ -840,7 +840,7 @@ void EMFWriter::ImplWriteTextRecord( const Point& rPos, const String rText, cons
// padding word
if( nLen & 1 )
- (*mpStm) << (UINT16) 0;
+ (*mpStm) << (sal_uInt16) 0;
// write DX array
ImplWriteExtent( pDX[ 0 ] );
@@ -874,7 +874,7 @@ void EMFWriter::Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const bas
for(sal_uInt32 a(0); a < aLinePolyPolygon.count(); a++)
{
const basegfx::B2DPolygon aCandidate(aLinePolyPolygon.getB2DPolygon(a));
- ImplWritePolygonRecord( Polygon(aCandidate), FALSE );
+ ImplWritePolygonRecord( Polygon(aCandidate), sal_False );
}
}
@@ -902,10 +902,10 @@ void EMFWriter::Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const bas
void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
{
- for( ULONG j = 0, nActionCount = rMtf.GetActionCount(); j < nActionCount; j++ )
+ for( sal_uLong j = 0, nActionCount = rMtf.GetActionCount(); j < nActionCount; j++ )
{
const MetaAction* pAction = rMtf.GetAction( j );
- const USHORT nType = pAction->GetType();
+ const sal_uInt16 nType = pAction->GetType();
switch( nType )
{
@@ -1073,7 +1073,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
{
if(pA->GetLineInfo().IsDefault())
{
- ImplWritePolygonRecord( rPoly, FALSE );
+ ImplWritePolygonRecord( rPoly, sal_False );
}
else
{
@@ -1156,7 +1156,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
const MetaEPSAction* pA = (const MetaEPSAction*) pAction;
const GDIMetaFile aSubstitute( pA->GetSubstitute() );
- for( ULONG i = 0, nCount = aSubstitute.GetActionCount(); i < nCount; i++ )
+ for( sal_uLong i = 0, nCount = aSubstitute.GetActionCount(); i < nCount; i++ )
{
const MetaAction* pSubstAct = aSubstitute.GetAction( i );
if( pSubstAct->GetType() == META_BMPSCALE_ACTION )
@@ -1175,7 +1175,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
maVDev.Pop();
ImplBeginRecord( WIN_EMR_RESTOREDC );
- (*mpStm) << (INT32) -1;
+ (*mpStm) << (sal_Int32) -1;
ImplEndRecord();
break;
}
@@ -1306,14 +1306,14 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case( META_LINECOLOR_ACTION ):
{
( (MetaAction*) pAction )->Execute( &maVDev );
- mbLineChanged = TRUE;
+ mbLineChanged = sal_True;
}
break;
case( META_FILLCOLOR_ACTION ):
{
( (MetaAction*) pAction )->Execute( &maVDev );
- mbFillChanged = TRUE;
+ mbFillChanged = sal_True;
}
break;
@@ -1324,7 +1324,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case( META_FONT_ACTION ):
{
( (MetaAction*) pAction )->Execute( &maVDev );
- mbTextChanged = TRUE;
+ mbTextChanged = sal_True;
}
break;
@@ -1365,11 +1365,11 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
( (MetaAction*) pAction )->Execute( &maVDev );
ImplBeginRecord( WIN_EMR_RESTOREDC );
- (*mpStm) << (INT32) -1;
+ (*mpStm) << (sal_Int32) -1;
ImplEndRecord();
ImplWriteRasterOp( maVDev.GetRasterOp() );
- mbLineChanged = mbFillChanged = mbTextChanged = TRUE;
+ mbLineChanged = mbFillChanged = mbTextChanged = sal_True;
}
break;
diff --git a/svtools/source/filter.vcl/wmf/emfwr.hxx b/svtools/source/filter.vcl/wmf/emfwr.hxx
index 6334b5dfe16f..8c65e91e5f73 100644
--- a/svtools/source/filter.vcl/wmf/emfwr.hxx
+++ b/svtools/source/filter.vcl/wmf/emfwr.hxx
@@ -50,27 +50,27 @@ private:
MapMode maDestMapMode;
FilterConfigItem* mpFilterConfigItem;
SvStream* mpStm;
- BOOL* mpHandlesUsed;
- ULONG mnHandleCount;
- ULONG mnLastPercent;
- ULONG mnRecordCount;
- ULONG mnRecordPos;
- BOOL mbRecordOpen;
- BOOL mbLineChanged;
+ sal_Bool* mpHandlesUsed;
+ sal_uLong mnHandleCount;
+ sal_uLong mnLastPercent;
+ sal_uLong mnRecordCount;
+ sal_uLong mnRecordPos;
+ sal_Bool mbRecordOpen;
+ sal_Bool mbLineChanged;
sal_uInt32 mnLineHandle;
- BOOL mbFillChanged;
+ sal_Bool mbFillChanged;
sal_uInt32 mnFillHandle;
- BOOL mbTextChanged;
+ sal_Bool mbTextChanged;
sal_uInt32 mnTextHandle;
sal_uInt32 mnHorTextAlign;
void ImplBeginRecord( sal_uInt32 nType );
void ImplEndRecord();
- ULONG ImplAcquireHandle();
- void ImplReleaseHandle( ULONG nHandle );
+ sal_uLong ImplAcquireHandle();
+ void ImplReleaseHandle( sal_uLong nHandle );
- BOOL ImplPrepareHandleSelect( sal_uInt32& rHandle, ULONG nSelectType );
+ sal_Bool ImplPrepareHandleSelect( sal_uInt32& rHandle, sal_uLong nSelectType );
void ImplCheckLineAttr();
void ImplCheckFillAttr();
void ImplCheckTextAttr();
@@ -82,9 +82,9 @@ private:
void ImplWriteSize( const Size& rSize);
void ImplWriteRect( const Rectangle& rRect );
void ImplWritePath( const PolyPolygon& rPolyPoly, sal_Bool bClose );
- void ImplWritePolygonRecord( const Polygon& rPoly, BOOL bClose );
+ void ImplWritePolygonRecord( const Polygon& rPoly, sal_Bool bClose );
void ImplWritePolyPolygonRecord( const PolyPolygon& rPolyPoly );
- void ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, const Size& rSz, UINT32 nROP );
+ void ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, const Size& rSz, sal_uInt32 nROP );
void ImplWriteTextRecord( const Point& rPos, const String rText, const sal_Int32* pDXArray, sal_uInt32 nWidth );
void Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon);
@@ -94,7 +94,7 @@ public:
EMFWriter() {}
- BOOL WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterConfigItem* pConfigItem = NULL );
+ sal_Bool WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterConfigItem* pConfigItem = NULL );
};
#endif // _EMFWR_HXX
diff --git a/svtools/source/filter.vcl/wmf/enhwmf.cxx b/svtools/source/filter.vcl/wmf/enhwmf.cxx
index 1e49e0d61446..29128ffd7904 100644
--- a/svtools/source/filter.vcl/wmf/enhwmf.cxx
+++ b/svtools/source/filter.vcl/wmf/enhwmf.cxx
@@ -229,7 +229,7 @@ static sal_Bool ImplReadRegion( PolyPolygon& rPolyPoly, SvStream& rSt, sal_uInt3
return bOk;
}
-BOOL EnhWMFReader::ReadEnhWMF()
+sal_Bool EnhWMFReader::ReadEnhWMF()
{
sal_uInt32 nStretchBltMode = 0;
sal_uInt32 nRecType, nRecSize, nNextPos,
@@ -246,7 +246,7 @@ BOOL EnhWMFReader::ReadEnhWMF()
if ( ( nRecSize < 8 ) || ( nRecSize & 3 ) ) // Parameter sind immer durch 4 teilbar
{
- bStatus = FALSE;
+ bStatus = sal_False;
break;
}
@@ -254,7 +254,7 @@ BOOL EnhWMFReader::ReadEnhWMF()
if ( nNextPos > nEndPos )
{
- bStatus = FALSE;
+ bStatus = sal_False;
break;
}
@@ -291,8 +291,8 @@ BOOL EnhWMFReader::ReadEnhWMF()
{
pWMF->SeekRel( 16 );
*pWMF >> nPoints;
- Polygon aPoly( (UINT16)nPoints );
- for( UINT16 k = 0; k < (UINT16)nPoints; k++ )
+ Polygon aPoly( (sal_uInt16)nPoints );
+ for( sal_uInt16 k = 0; k < (sal_uInt16)nPoints; k++ )
{
*pWMF >> nX32 >> nY32;
aPoly[ k ] = Point( nX32, nY32 );
@@ -307,14 +307,14 @@ BOOL EnhWMFReader::ReadEnhWMF()
{
pWMF->SeekRel( 0x10 );
*pWMF >> nPoints;
- UINT16 i = 0;
+ sal_uInt16 i = 0;
if ( bFlag )
{
i++;
nPoints++;
}
- Polygon aPolygon( (UINT16)nPoints );
- for ( ; i < (UINT16)nPoints; i++ )
+ Polygon aPolygon( (sal_uInt16)nPoints );
+ for ( ; i < (sal_uInt16)nPoints; i++ )
{
*pWMF >> nX32 >> nY32;
aPolygon[ i ] = Point( nX32, nY32 );
@@ -325,25 +325,25 @@ BOOL EnhWMFReader::ReadEnhWMF()
case EMR_POLYPOLYLINE :
{
- UINT16* pnPoints;
+ sal_uInt16* pnPoints;
- INT32 i, nPoly;
+ sal_Int32 i, nPoly;
pWMF->SeekRel( 0x10 );
// Anzahl der Polygone:
*pWMF >> nPoly >> i;
// taking the amount of points of each polygon, retrieving the total number of points
- if ( static_cast< sal_uInt32 >(nPoly) < SAL_MAX_UINT32 / sizeof(UINT16) )
+ if ( static_cast< sal_uInt32 >(nPoly) < SAL_MAX_UINT32 / sizeof(sal_uInt16) )
{
- if ( ( static_cast< sal_uInt32 >( nPoly ) * sizeof(UINT16) ) <= ( nEndPos - pWMF->Tell() ) )
+ if ( ( static_cast< sal_uInt32 >( nPoly ) * sizeof(sal_uInt16) ) <= ( nEndPos - pWMF->Tell() ) )
{
- pnPoints = new UINT16[ nPoly ];
+ pnPoints = new sal_uInt16[ nPoly ];
for ( i = 0; i < nPoly; i++ )
{
*pWMF >> nPoints;
- pnPoints[ i ] = (UINT16)nPoints;
+ pnPoints[ i ] = (sal_uInt16)nPoints;
}
// Polygonpunkte holen:
@@ -351,7 +351,7 @@ BOOL EnhWMFReader::ReadEnhWMF()
for ( i = 0; ( i < nPoly ) && !pWMF->IsEof(); i++ )
{
Polygon aPoly( pnPoints[ i ] );
- for( UINT16 k = 0; k < pnPoints[ i ]; k++ )
+ for( sal_uInt16 k = 0; k < pnPoints[ i ]; k++ )
{
*pWMF >> nX32 >> nY32;
aPoly[ k ] = Point( nX32, nY32 );
@@ -366,25 +366,25 @@ BOOL EnhWMFReader::ReadEnhWMF()
case EMR_POLYPOLYGON :
{
- UINT16* pnPoints;
+ sal_uInt16* pnPoints;
Point* pPtAry;
- UINT32 i, nPoly, nGesPoints;
+ sal_uInt32 i, nPoly, nGesPoints;
pWMF->SeekRel( 0x10 );
// Anzahl der Polygone:
*pWMF >> nPoly >> nGesPoints;
- if ( ( nGesPoints < SAL_MAX_UINT32 / sizeof(Point) ) && ( nPoly < SAL_MAX_UINT32 / sizeof(UINT16) ) )
+ if ( ( nGesPoints < SAL_MAX_UINT32 / sizeof(Point) ) && ( nPoly < SAL_MAX_UINT32 / sizeof(sal_uInt16) ) )
{
- if ( ( nPoly * sizeof(UINT16) ) <= ( nEndPos - pWMF->Tell() ) )
+ if ( ( nPoly * sizeof(sal_uInt16) ) <= ( nEndPos - pWMF->Tell() ) )
{
- pnPoints = new UINT16[ nPoly ];
+ pnPoints = new sal_uInt16[ nPoly ];
for ( i = 0; i < nPoly; i++ )
{
*pWMF >> nPoints;
- pnPoints[ i ] = (UINT16)nPoints;
+ pnPoints[ i ] = (sal_uInt16)nPoints;
}
if ( ( nGesPoints * (sizeof(sal_uInt32)+sizeof(sal_uInt32)) ) <= ( nEndPos - pWMF->Tell() ) )
@@ -398,7 +398,7 @@ BOOL EnhWMFReader::ReadEnhWMF()
pPtAry[ i ] = Point( nX32, nY32 );
}
// PolyPolygon Actions erzeugen
- PolyPolygon aPolyPoly( (UINT16)nPoly, pnPoints, pPtAry );
+ PolyPolygon aPolyPoly( (sal_uInt16)nPoly, pnPoints, pPtAry );
pOut->DrawPolyPolygon( aPolyPoly, bRecordPath );
delete[] pPtAry;
}
@@ -554,7 +554,7 @@ BOOL EnhWMFReader::ReadEnhWMF()
case EMR_MODIFYWORLDTRANSFORM :
{
- UINT32 nMode;
+ sal_uInt32 nMode;
XForm aTempXForm;
*pWMF >> aTempXForm >> nMode;
pOut->ModifyWorldTransform( aTempXForm, nMode );
@@ -575,7 +575,7 @@ BOOL EnhWMFReader::ReadEnhWMF()
{
LineInfo aLineInfo;
- UINT32 nStyle;
+ sal_uInt32 nStyle;
Size aSize;
*pWMF >> nStyle >> aSize.Width() >> aSize.Height();
@@ -583,9 +583,9 @@ BOOL EnhWMFReader::ReadEnhWMF()
if ( aSize.Width() )
aLineInfo.SetWidth( aSize.Width() );
- BOOL bTransparent = FALSE;
- UINT16 nDashCount = 0;
- UINT16 nDotCount = 0;
+ sal_Bool bTransparent = sal_False;
+ sal_uInt16 nDashCount = 0;
+ sal_uInt16 nDotCount = 0;
switch( nStyle )
{
case PS_DASHDOTDOT :
@@ -599,7 +599,7 @@ BOOL EnhWMFReader::ReadEnhWMF()
nDashCount++;
break;
case PS_NULL :
- bTransparent = TRUE;
+ bTransparent = sal_True;
aLineInfo.SetStyle( LINE_NONE );
break;
default :
@@ -674,12 +674,12 @@ BOOL EnhWMFReader::ReadEnhWMF()
case EMR_CREATEBRUSHINDIRECT :
{
- UINT32 nStyle;
+ sal_uInt32 nStyle;
*pWMF >> nIndex;
if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 )
{
*pWMF >> nStyle;
- pOut->CreateObject( nIndex, GDI_BRUSH, new WinMtfFillStyle( ReadColor(), ( nStyle == BS_HOLLOW ) ? TRUE : FALSE ) );
+ pOut->CreateObject( nIndex, GDI_BRUSH, new WinMtfFillStyle( ReadColor(), ( nStyle == BS_HOLLOW ) ? sal_True : sal_False ) );
}
}
break;
@@ -716,7 +716,7 @@ BOOL EnhWMFReader::ReadEnhWMF()
case EMR_ARC :
{
- UINT32 nStartX, nStartY, nEndX, nEndY;
+ sal_uInt32 nStartX, nStartY, nEndX, nEndY;
*pWMF >> nX32 >> nY32 >> nx32 >> ny32 >> nStartX >> nStartY >> nEndX >> nEndY;
pOut->DrawArc( ReadRectangle( nX32, nY32, nx32, ny32 ), Point( nStartX, nStartY ), Point( nEndX, nEndY ) );
}
@@ -724,7 +724,7 @@ BOOL EnhWMFReader::ReadEnhWMF()
case EMR_CHORD :
{
- UINT32 nStartX, nStartY, nEndX, nEndY;
+ sal_uInt32 nStartX, nStartY, nEndX, nEndY;
*pWMF >> nX32 >> nY32 >> nx32 >> ny32 >> nStartX >> nStartY >> nEndX >> nEndY;
pOut->DrawChord( ReadRectangle( nX32, nY32, nx32, ny32 ), Point( nStartX, nStartY ), Point( nEndX, nEndY ) );
}
@@ -732,7 +732,7 @@ BOOL EnhWMFReader::ReadEnhWMF()
case EMR_PIE :
{
- UINT32 nStartX, nStartY, nEndX, nEndY;
+ sal_uInt32 nStartX, nStartY, nEndX, nEndY;
*pWMF >> nX32 >> nY32 >> nx32 >> ny32 >> nStartX >> nStartY >> nEndX >> nEndY;
const Rectangle aRect( ReadRectangle( nX32, nY32, nx32, ny32 ));
@@ -754,9 +754,9 @@ BOOL EnhWMFReader::ReadEnhWMF()
case EMR_ARCTO :
{
- UINT32 nStartX, nStartY, nEndX, nEndY;
+ sal_uInt32 nStartX, nStartY, nEndX, nEndY;
*pWMF >> nX32 >> nY32 >> nx32 >> ny32 >> nStartX >> nStartY >> nEndX >> nEndY;
- pOut->DrawArc( ReadRectangle( nX32, nY32, nx32, ny32 ), Point( nStartX, nStartY ), Point( nEndX, nEndY ), TRUE );
+ pOut->DrawArc( ReadRectangle( nX32, nY32, nx32, ny32 ), Point( nStartX, nStartY ), Point( nEndX, nEndY ), sal_True );
}
break;
@@ -813,11 +813,11 @@ BOOL EnhWMFReader::ReadEnhWMF()
case EMR_BITBLT : // PASSTHROUGH INTENDED
case EMR_STRETCHBLT :
{
- INT32 xDest, yDest, cxDest, cyDest, xSrc, ySrc, cxSrc, cySrc;
- UINT32 dwRop, iUsageSrc, offBmiSrc, cbBmiSrc, offBitsSrc, cbBitsSrc;
+ sal_Int32 xDest, yDest, cxDest, cyDest, xSrc, ySrc, cxSrc, cySrc;
+ sal_uInt32 dwRop, iUsageSrc, offBmiSrc, cbBmiSrc, offBitsSrc, cbBitsSrc;
XForm xformSrc;
- UINT32 nStart = pWMF->Tell() - 8;
+ sal_uInt32 nStart = pWMF->Tell() - 8;
pWMF->SeekRel( 0x10 );
*pWMF >> xDest >> yDest >> cxDest >> cyDest >> dwRop >> xSrc >> ySrc
@@ -836,27 +836,27 @@ BOOL EnhWMFReader::ReadEnhWMF()
cyDest = abs( (int)cyDest ); // and also 122889
if ( (cbBitsSrc > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc) )
- bStatus = FALSE;
+ bStatus = sal_False;
else
{
- UINT32 nSize = cbBmiSrc + cbBitsSrc + 14;
+ sal_uInt32 nSize = cbBmiSrc + cbBitsSrc + 14;
if ( nSize <= ( nEndPos - nStartPos ) )
{
char* pBuf = new char[ nSize ];
SvMemoryStream aTmp( pBuf, nSize, STREAM_READ | STREAM_WRITE );
- aTmp.ObjectOwnsMemory( TRUE );
- aTmp << (BYTE)'B'
- << (BYTE)'M'
- << (UINT32)cbBitsSrc
- << (UINT16)0
- << (UINT16)0
- << (UINT32)cbBmiSrc + 14;
+ aTmp.ObjectOwnsMemory( sal_True );
+ aTmp << (sal_uInt8)'B'
+ << (sal_uInt8)'M'
+ << (sal_uInt32)cbBitsSrc
+ << (sal_uInt16)0
+ << (sal_uInt16)0
+ << (sal_uInt32)cbBmiSrc + 14;
pWMF->Seek( nStart + offBmiSrc );
pWMF->Read( pBuf + 14, cbBmiSrc );
pWMF->Seek( nStart + offBitsSrc );
pWMF->Read( pBuf + 14 + cbBmiSrc, cbBitsSrc );
aTmp.Seek( 0 );
- aBitmap.Read( aTmp, TRUE );
+ aBitmap.Read( aTmp, sal_True );
// test if it is sensible to crop
if ( ( cxSrc > 0 ) && ( cySrc > 0 ) &&
@@ -875,9 +875,9 @@ BOOL EnhWMFReader::ReadEnhWMF()
case EMR_STRETCHDIBITS :
{
- INT32 xDest, yDest, xSrc, ySrc, cxSrc, cySrc, cxDest, cyDest;
- UINT32 offBmiSrc, cbBmiSrc, offBitsSrc, cbBitsSrc, iUsageSrc, dwRop;
- UINT32 nStart = pWMF->Tell() - 8;
+ sal_Int32 xDest, yDest, xSrc, ySrc, cxSrc, cySrc, cxDest, cyDest;
+ sal_uInt32 offBmiSrc, cbBmiSrc, offBitsSrc, cbBitsSrc, iUsageSrc, dwRop;
+ sal_uInt32 nStart = pWMF->Tell() - 8;
pWMF->SeekRel( 0x10 );
*pWMF >> xDest >> yDest >> xSrc >> ySrc >> cxSrc >> cySrc >> offBmiSrc >> cbBmiSrc >> offBitsSrc
@@ -890,27 +890,27 @@ BOOL EnhWMFReader::ReadEnhWMF()
cyDest = abs( (int)cyDest ); // and also 122889
if ( (cbBitsSrc > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc) )
- bStatus = FALSE;
+ bStatus = sal_False;
else
{
- UINT32 nSize = cbBmiSrc + cbBitsSrc + 14;
+ sal_uInt32 nSize = cbBmiSrc + cbBitsSrc + 14;
if ( nSize <= ( nEndPos - nStartPos ) )
{
char* pBuf = new char[ nSize ];
SvMemoryStream aTmp( pBuf, nSize, STREAM_READ | STREAM_WRITE );
- aTmp.ObjectOwnsMemory( TRUE );
- aTmp << (BYTE)'B'
- << (BYTE)'M'
- << (UINT32)cbBitsSrc
- << (UINT16)0
- << (UINT16)0
- << (UINT32)cbBmiSrc + 14;
+ aTmp.ObjectOwnsMemory( sal_True );
+ aTmp << (sal_uInt8)'B'
+ << (sal_uInt8)'M'
+ << (sal_uInt32)cbBitsSrc
+ << (sal_uInt16)0
+ << (sal_uInt16)0
+ << (sal_uInt32)cbBmiSrc + 14;
pWMF->Seek( nStart + offBmiSrc );
pWMF->Read( pBuf + 14, cbBmiSrc );
pWMF->Seek( nStart + offBitsSrc );
pWMF->Read( pBuf + 14 + cbBmiSrc, cbBitsSrc );
aTmp.Seek( 0 );
- aBitmap.Read( aTmp, TRUE );
+ aBitmap.Read( aTmp, sal_True );
// test if it is sensible to crop
if ( ( cxSrc > 0 ) && ( cySrc > 0 ) &&
@@ -941,7 +941,7 @@ BOOL EnhWMFReader::ReadEnhWMF()
for ( int i = 0; i < LF_FACESIZE; i++ )
{
- UINT16 nChar;
+ sal_uInt16 nChar;
*pWMF >> nChar;
lfFaceName[ i ] = nChar;
}
@@ -1045,14 +1045,14 @@ BOOL EnhWMFReader::ReadEnhWMF()
{
pWMF->SeekRel( 16 );
*pWMF >> nPoints;
- UINT16 i = 0;
+ sal_uInt16 i = 0;
if ( bFlag )
{
i++;
nPoints++;
}
- Polygon aPoly( (UINT16)nPoints );
- for( ; i < (UINT16)nPoints; i++ )
+ Polygon aPoly( (sal_uInt16)nPoints );
+ for( ; i < (sal_uInt16)nPoints; i++ )
{
*pWMF >> nX16 >> nY16;
aPoly[ i ] = Point( nX16, nY16 );
@@ -1065,8 +1065,8 @@ BOOL EnhWMFReader::ReadEnhWMF()
{
pWMF->SeekRel( 16 );
*pWMF >> nPoints;
- Polygon aPoly( (UINT16)nPoints );
- for( UINT16 k = 0; k < (UINT16)nPoints; k++ )
+ Polygon aPoly( (sal_uInt16)nPoints );
+ for( sal_uInt16 k = 0; k < (sal_uInt16)nPoints; k++ )
{
*pWMF >> nX16 >> nY16;
aPoly[ k ] = Point( nX16, nY16 );
@@ -1081,15 +1081,15 @@ BOOL EnhWMFReader::ReadEnhWMF()
{
pWMF->SeekRel( 16 );
*pWMF >> nPoints;
- UINT16 i = 0;
+ sal_uInt16 i = 0;
if ( bFlag )
{
i++;
nPoints++;
}
- Polygon aPoly( (UINT16)nPoints );
- for( ; i < (UINT16)nPoints; i++ )
+ Polygon aPoly( (sal_uInt16)nPoints );
+ for( ; i < (sal_uInt16)nPoints; i++ )
{
*pWMF >> nX16 >> nY16;
aPoly[ i ] = Point( nX16, nY16 );
@@ -1100,29 +1100,29 @@ BOOL EnhWMFReader::ReadEnhWMF()
case EMR_POLYPOLYLINE16 :
{
- UINT16* pnPoints;
+ sal_uInt16* pnPoints;
- INT32 i, nPoly, nGesPoints;
+ sal_Int32 i, nPoly, nGesPoints;
pWMF->SeekRel( 0x10 );
// Anzahl der Polygone:
*pWMF >> nPoly >> nGesPoints;
// taking the amount of points of each polygon, retrieving the total number of points
- if ( static_cast< sal_uInt32 >(nPoly) < SAL_MAX_UINT32 / sizeof(UINT16) )
+ if ( static_cast< sal_uInt32 >(nPoly) < SAL_MAX_UINT32 / sizeof(sal_uInt16) )
{
- if ( ( static_cast< sal_uInt32 >( nPoly ) * sizeof(UINT16) ) <= ( nEndPos - pWMF->Tell() ) )
+ if ( ( static_cast< sal_uInt32 >( nPoly ) * sizeof(sal_uInt16) ) <= ( nEndPos - pWMF->Tell() ) )
{
- pnPoints = new UINT16[ nPoly ];
+ pnPoints = new sal_uInt16[ nPoly ];
for ( i = 0; i < nPoly; i++ )
{
*pWMF >> nPoints;
- pnPoints[ i ] = (UINT16)nPoints;
+ pnPoints[ i ] = (sal_uInt16)nPoints;
}
// Polygonpunkte holen:
for ( i = 0; ( i < nPoly ) && !pWMF->IsEof(); i++ )
{
Polygon aPolygon( pnPoints[ i ] );
- for ( UINT16 k = 0; k < pnPoints[ i ]; k++ )
+ for ( sal_uInt16 k = 0; k < pnPoints[ i ]; k++ )
{
*pWMF >> nX16 >> nY16;
aPolygon[ k ] = Point( nX16, nY16 );
@@ -1137,22 +1137,22 @@ BOOL EnhWMFReader::ReadEnhWMF()
case EMR_POLYPOLYGON16 :
{
- UINT16* pnPoints;
+ sal_uInt16* pnPoints;
Point* pPtAry;
- UINT32 i, nPoly, nGesPoints;
+ sal_uInt32 i, nPoly, nGesPoints;
pWMF->SeekRel( 0x10 );
// Anzahl der Polygone:
*pWMF >> nPoly >> nGesPoints;
- if ( ( nGesPoints < SAL_MAX_UINT32 / sizeof(Point) ) && ( nPoly < SAL_MAX_UINT32 / sizeof(UINT16) ) )
+ if ( ( nGesPoints < SAL_MAX_UINT32 / sizeof(Point) ) && ( nPoly < SAL_MAX_UINT32 / sizeof(sal_uInt16) ) )
{
- if ( ( static_cast< sal_uInt32 >( nPoly ) * sizeof( UINT16 ) ) <= ( nEndPos - pWMF->Tell() ) )
+ if ( ( static_cast< sal_uInt32 >( nPoly ) * sizeof( sal_uInt16 ) ) <= ( nEndPos - pWMF->Tell() ) )
{
- pnPoints = new UINT16[ nPoly ];
+ pnPoints = new sal_uInt16[ nPoly ];
for ( i = 0; i < nPoly; i++ )
{
*pWMF >> nPoints;
- pnPoints[ i ] = (UINT16)nPoints;
+ pnPoints[ i ] = (sal_uInt16)nPoints;
}
if ( ( nGesPoints * (sizeof(sal_uInt16)+sizeof(sal_uInt16)) ) <= ( nEndPos - pWMF->Tell() ) )
{
@@ -1165,7 +1165,7 @@ BOOL EnhWMFReader::ReadEnhWMF()
}
// PolyPolygon Actions erzeugen
- PolyPolygon aPolyPoly( (UINT16)nPoly, pnPoints, pPtAry );
+ PolyPolygon aPolyPoly( (sal_uInt16)nPoly, pnPoints, pPtAry );
pOut->DrawPolyPolygon( aPolyPoly, bRecordPath );
delete[] pPtAry;
}
@@ -1266,16 +1266,16 @@ BOOL EnhWMFReader::ReadEnhWMF()
//-----------------------------------------------------------------------------------
-BOOL EnhWMFReader::ReadHeader()
+sal_Bool EnhWMFReader::ReadHeader()
{
- UINT32 nUINT32, nHeaderSize, nPalEntries;
- INT32 nLeft, nTop, nRight, nBottom;
+ sal_uInt32 nUINT32, nHeaderSize, nPalEntries;
+ sal_Int32 nLeft, nTop, nRight, nBottom;
// METAFILEHEADER SPARE ICH MIR HIER
// Einlesen des METAHEADER
*pWMF >> nUINT32 >> nHeaderSize;
if ( nUINT32 != 1 ) // Typ
- return FALSE;
+ return sal_False;
// bound size
Rectangle rclBounds; // rectangle in logical units 1/100th mm
@@ -1296,7 +1296,7 @@ BOOL EnhWMFReader::ReadHeader()
*pWMF >> nUINT32; // signature
if ( nUINT32 != 0x464d4520 )
- return FALSE;
+ return sal_False;
*pWMF >> nUINT32; // nVersion
*pWMF >> nEndPos; // size of metafile
@@ -1311,7 +1311,7 @@ BOOL EnhWMFReader::ReadHeader()
*pWMF >> nRecordCount;
if ( !nRecordCount )
- return FALSE;
+ return sal_False;
pWMF->SeekRel( 0xc );
@@ -1324,12 +1324,12 @@ BOOL EnhWMFReader::ReadHeader()
pOut->SetRefMill( Size( nMillX, nMillY ) );
pWMF->Seek( nStartPos + nHeaderSize );
- return TRUE;
+ return sal_True;
}
//-----------------------------------------------------------------------------------
-Rectangle EnhWMFReader::ReadRectangle( INT32 x1, INT32 y1, INT32 x2, INT32 y2 )
+Rectangle EnhWMFReader::ReadRectangle( sal_Int32 x1, sal_Int32 y1, sal_Int32 x2, sal_Int32 y2 )
{
Point aTL ( Point( x1, y1 ) );
Point aBR( Point( --x2, --y2 ) );
diff --git a/svtools/source/filter.vcl/wmf/winmtf.cxx b/svtools/source/filter.vcl/wmf/winmtf.cxx
index 787e6522b890..feff21933ab6 100644
--- a/svtools/source/filter.vcl/wmf/winmtf.cxx
+++ b/svtools/source/filter.vcl/wmf/winmtf.cxx
@@ -355,7 +355,7 @@ WinMtf::WinMtf( WinMtfOutput* pWinMtfOutput, SvStream& rStreamWMF, FilterConfigI
SvLockBytes *pLB = pWMF->GetLockBytes();
if ( pLB )
- pLB->SetSynchronMode( TRUE );
+ pLB->SetSynchronMode( sal_True );
nStartPos = pWMF->Tell();
@@ -383,7 +383,7 @@ WinMtf::~WinMtf()
// ------------------------------------------------------------------------
-void WinMtf::Callback( USHORT nPercent )
+void WinMtf::Callback( sal_uInt16 nPercent )
{
if ( xStatusIndicator.is() )
xStatusIndicator->setValue( nPercent );
@@ -393,9 +393,9 @@ void WinMtf::Callback( USHORT nPercent )
Color WinMtf::ReadColor()
{
- UINT32 nColor;
+ sal_uInt32 nColor;
*pWMF >> nColor;
- return Color( (BYTE)nColor, (BYTE)( nColor >> 8 ), (BYTE)( nColor >> 16 ) );
+ return Color( (sal_uInt8)nColor, (sal_uInt8)( nColor >> 8 ), (sal_uInt8)( nColor >> 16 ) );
};
//-----------------------------------------------------------------------------------
@@ -561,8 +561,8 @@ void WinMtfOutput::ImplMap( Font& rFont )
Polygon& WinMtfOutput::ImplMap( Polygon& rPolygon )
{
- UINT16 nPoints = rPolygon.GetSize();
- for ( UINT16 i = 0; i < nPoints; i++ )
+ sal_uInt16 nPoints = rPolygon.GetSize();
+ for ( sal_uInt16 i = 0; i < nPoints; i++ )
{
rPolygon[ i ] = ImplMap( rPolygon[ i ] );
}
@@ -573,14 +573,14 @@ Polygon& WinMtfOutput::ImplMap( Polygon& rPolygon )
PolyPolygon& WinMtfOutput::ImplMap( PolyPolygon& rPolyPolygon )
{
- UINT16 nPolys = rPolyPolygon.Count();
- for ( UINT16 i = 0; i < nPolys; ImplMap( rPolyPolygon[ i++ ] ) ) ;
+ sal_uInt16 nPolys = rPolyPolygon.Count();
+ for ( sal_uInt16 i = 0; i < nPolys; ImplMap( rPolyPolygon[ i++ ] ) ) ;
return rPolyPolygon;
}
//-----------------------------------------------------------------------------------
-void WinMtfOutput::SelectObject( INT32 nIndex )
+void WinMtfOutput::SelectObject( sal_Int32 nIndex )
{
GDIObj* pGDIObj = NULL;
@@ -590,7 +590,7 @@ void WinMtfOutput::SelectObject( INT32 nIndex )
{
nIndex &= 0xffff; // zur Sicherheit: mehr als 65535 nicht zulassen
- if ( (UINT32)nIndex < vGDIObj.size() )
+ if ( (sal_uInt32)nIndex < vGDIObj.size() )
pGDIObj = vGDIObj[ nIndex ];
}
@@ -599,7 +599,7 @@ void WinMtfOutput::SelectObject( INT32 nIndex )
if ( nIndex & ENHMETA_STOCK_OBJECT )
{
- UINT16 nStockId = (BYTE)nIndex;
+ sal_uInt16 nStockId = (sal_uInt8)nIndex;
switch( nStockId )
{
case WHITE_BRUSH :
@@ -625,7 +625,7 @@ void WinMtfOutput::SelectObject( INT32 nIndex )
break;
case NULL_BRUSH :
{
- pGDIObj->Set( GDI_BRUSH, new WinMtfFillStyle( Color( COL_TRANSPARENT ), TRUE ) );
+ pGDIObj->Set( GDI_BRUSH, new WinMtfFillStyle( Color( COL_TRANSPARENT ), sal_True ) );
}
break;
case WHITE_PEN :
@@ -640,7 +640,7 @@ void WinMtfOutput::SelectObject( INT32 nIndex )
break;
case NULL_PEN :
{
- pGDIObj->Set( GDI_PEN, new WinMtfLineStyle( Color( COL_TRANSPARENT ), TRUE ) );
+ pGDIObj->Set( GDI_PEN, new WinMtfLineStyle( Color( COL_TRANSPARENT ), sal_True ) );
}
break;
default:
@@ -701,7 +701,7 @@ sal_uInt32 WinMtfOutput::GetTextLayoutMode() const
//-----------------------------------------------------------------------------------
-void WinMtfOutput::SetBkMode( UINT32 nMode )
+void WinMtfOutput::SetBkMode( sal_uInt32 nMode )
{
mnBkMode = nMode;
}
@@ -722,14 +722,14 @@ void WinMtfOutput::SetTextColor( const Color& rColor )
//-----------------------------------------------------------------------------------
-void WinMtfOutput::SetTextAlign( UINT32 nAlign )
+void WinMtfOutput::SetTextAlign( sal_uInt32 nAlign )
{
mnTextAlign = nAlign;
}
//-----------------------------------------------------------------------------------
-void WinMtfOutput::ImplResizeObjectArry( UINT32 nNewEntrys )
+void WinMtfOutput::ImplResizeObjectArry( sal_uInt32 nNewEntrys )
{
sal_uInt32 i = vGDIObj.size();
vGDIObj.resize( nNewEntrys );
@@ -795,7 +795,7 @@ void WinMtfOutput::CreateObject( GDIObjectType eType, void* pStyle )
}
}
}
- UINT32 nIndex;
+ sal_uInt32 nIndex;
for ( nIndex = 0; nIndex < vGDIObj.size(); nIndex++ )
{
if ( vGDIObj[ nIndex ] == NULL )
@@ -809,7 +809,7 @@ void WinMtfOutput::CreateObject( GDIObjectType eType, void* pStyle )
//-----------------------------------------------------------------------------------
-void WinMtfOutput::CreateObject( INT32 nIndex, GDIObjectType eType, void* pStyle )
+void WinMtfOutput::CreateObject( sal_Int32 nIndex, GDIObjectType eType, void* pStyle )
{
if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 )
{
@@ -832,7 +832,7 @@ void WinMtfOutput::CreateObject( INT32 nIndex, GDIObjectType eType, void* pStyle
}
}
}
- if ( (UINT32)nIndex >= vGDIObj.size() )
+ if ( (sal_uInt32)nIndex >= vGDIObj.size() )
ImplResizeObjectArry( nIndex + 16 );
if ( vGDIObj[ nIndex ] != NULL )
@@ -968,7 +968,7 @@ WinMtfOutput::~WinMtfOutput()
else
mpGDIMetaFile->SetPrefSize( mrclFrame.GetSize() );
- for ( UINT32 i = 0; i < vGDIObj.size(); i++ )
+ for ( sal_uInt32 i = 0; i < vGDIObj.size(); i++ )
delete vGDIObj[ i ];
};
@@ -1010,7 +1010,7 @@ void WinMtfOutput::UpdateClipRegion()
void WinMtfOutput::ImplSetNonPersistentLineColorTransparenz()
{
Color aColor( COL_TRANSPARENT);
- WinMtfLineStyle aTransparentLine( aColor, TRUE );
+ WinMtfLineStyle aTransparentLine( aColor, sal_True );
if ( ! ( maLatestLineStyle == aTransparentLine ) )
{
maLatestLineStyle = aTransparentLine;
@@ -1044,7 +1044,7 @@ void WinMtfOutput::UpdateFillStyle()
//-----------------------------------------------------------------------------------
-sal_uInt32 WinMtfOutput::SetRasterOp( UINT32 nRasterOp )
+sal_uInt32 WinMtfOutput::SetRasterOp( sal_uInt32 nRasterOp )
{
sal_uInt32 nRetROP = mnRop;
if ( nRasterOp != mnRop )
@@ -1077,8 +1077,8 @@ sal_uInt32 WinMtfOutput::SetRasterOp( UINT32 nRasterOp )
{
aNopFillStyle = maFillStyle;
aNopLineStyle = maLineStyle;
- maFillStyle = WinMtfFillStyle( Color( COL_TRANSPARENT ), TRUE );
- maLineStyle = WinMtfLineStyle( Color( COL_TRANSPARENT ), TRUE );
+ maFillStyle = WinMtfFillStyle( Color( COL_TRANSPARENT ), sal_True );
+ maLineStyle = WinMtfLineStyle( Color( COL_TRANSPARENT ), sal_True );
mbNopMode = sal_True;
}
}
@@ -1108,7 +1108,7 @@ void WinMtfOutput::StrokeAndFillPath( sal_Bool bStroke, sal_Bool bFill )
if ( !bStroke )
{
mpGDIMetaFile->AddAction( new MetaPushAction( PUSH_LINECOLOR ) );
- mpGDIMetaFile->AddAction( new MetaLineColorAction( Color(), FALSE ) );
+ mpGDIMetaFile->AddAction( new MetaLineColorAction( Color(), sal_False ) );
}
if ( aPathObj.Count() == 1 )
mpGDIMetaFile->AddAction( new MetaPolygonAction( aPathObj.GetObject( 0 ) ) );
@@ -1173,7 +1173,7 @@ void WinMtfOutput::DrawLine( const Point& rSource, const Point& rDest )
//-----------------------------------------------------------------------------------
-void WinMtfOutput::DrawRect( const Rectangle& rRect, BOOL bEdge )
+void WinMtfOutput::DrawRect( const Rectangle& rRect, sal_Bool bEdge )
{
UpdateClipRegion();
UpdateFillStyle();
@@ -1247,7 +1247,7 @@ void WinMtfOutput::DrawEllipse( const Rectangle& rRect )
//-----------------------------------------------------------------------------------
-void WinMtfOutput::DrawArc( const Rectangle& rRect, const Point& rStart, const Point& rEnd, BOOL bTo )
+void WinMtfOutput::DrawArc( const Rectangle& rRect, const Point& rStart, const Point& rEnd, sal_Bool bTo )
{
UpdateClipRegion();
UpdateLineStyle();
@@ -1349,7 +1349,7 @@ void WinMtfOutput::DrawPolygon( Polygon& rPolygon, sal_Bool bRecordPath )
{
if ( maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LINE_DASH ) )
{
- USHORT nCount = rPolygon.GetSize();
+ sal_uInt16 nCount = rPolygon.GetSize();
if ( nCount )
{
if ( rPolygon[ nCount - 1 ] != rPolygon[ 0 ] )
@@ -1564,7 +1564,7 @@ void WinMtfOutput::DrawText( Point& rPosition, String& rText, sal_Int32* pDXArry
pVDev->SetFont( maFont );
if( pDXArry )
{
- UINT32 nLen = rText.Len();
+ sal_uInt32 nLen = rText.Len();
nTextWidth = pVDev->GetTextWidth( rText.GetChar( (sal_uInt16)( nLen - 1 ) ) );
if( nLen > 1 )
nTextWidth += pDXArry[ nLen - 2 ];
@@ -1644,7 +1644,7 @@ void WinMtfOutput::ImplDrawBitmap( const Point& rPos, const Size& rSize, const B
const Point aEmptyPoint;
// #i50672# Extract whole VDev content (to match size of rBitmap)
- aVDev.EnableMapMode( FALSE );
+ aVDev.EnableMapMode( sal_False );
Bitmap aMask( aVDev.GetBitmap( aEmptyPoint, aSizePixel ).CreateMask( Color( COL_WHITE ) ) );
if ( aBmpEx.IsTransparent() )
@@ -1713,7 +1713,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList )
{ // patterns aren't well supported yet
sal_uInt32 nOldRop = SetRasterOp( ROP_OVERPAINT ); // in this case nRasterOperation is either 0 or 0xff
UpdateFillStyle();
- DrawRect( aRect, FALSE );
+ DrawRect( aRect, sal_False );
SetRasterOp( nOldRop );
}
else
@@ -1778,7 +1778,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList )
if ( nOperation == 0x1 )
{
SetRasterOp( R2_NOT );
- DrawRect( aRect, FALSE );
+ DrawRect( aRect, sal_False );
}
}
break;
@@ -1796,7 +1796,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList )
if ( nOperation == 0x7 )
{
SetRasterOp( R2_NOT );
- DrawRect( aRect, FALSE );
+ DrawRect( aRect, sal_False );
}
}
break;
@@ -1805,7 +1805,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList )
case 0xb :
{
SetRasterOp( R2_NOT );
- DrawRect( aRect, FALSE );
+ DrawRect( aRect, sal_False );
SetRasterOp( R2_COPYPEN );
Bitmap aMask( aBitmap );
aBitmap.Invert();
@@ -1816,7 +1816,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList )
if ( nOperation == 0xb )
{
SetRasterOp( R2_NOT );
- DrawRect( aRect, FALSE );
+ DrawRect( aRect, sal_False );
}
}
break;
@@ -1833,7 +1833,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList )
if ( nOperation == 0xd )
{
SetRasterOp( R2_NOT );
- DrawRect( aRect, FALSE );
+ DrawRect( aRect, sal_False );
}
}
break;
@@ -1845,7 +1845,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList )
if ( nOperation == 0x9 )
{
SetRasterOp( R2_NOT );
- DrawRect( aRect, FALSE );
+ DrawRect( aRect, sal_False );
}
}
break;
@@ -1855,7 +1855,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList )
{ // in this case nRasterOperation is either 0 or 0xff
maFillStyle = WinMtfFillStyle( Color( nRasterOperation, nRasterOperation, nRasterOperation ) );
UpdateFillStyle();
- DrawRect( aRect, FALSE );
+ DrawRect( aRect, sal_False );
}
break;
@@ -1871,7 +1871,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList )
case 0x5 : // only destination is used
{
SetRasterOp( R2_NOT );
- DrawRect( aRect, FALSE );
+ DrawRect( aRect, sal_False );
}
case 0xa : // no operation
break;
@@ -1900,7 +1900,7 @@ void WinMtfOutput::SetDevOrg( const Point& rPoint )
//-----------------------------------------------------------------------------------
-void WinMtfOutput::SetDevOrgOffset( INT32 nXAdd, INT32 nYAdd )
+void WinMtfOutput::SetDevOrgOffset( sal_Int32 nXAdd, sal_Int32 nYAdd )
{
mnDevOrgX += nXAdd;
mnDevOrgY += nYAdd;
@@ -1942,7 +1942,7 @@ void WinMtfOutput::SetWinOrg( const Point& rPoint )
//-----------------------------------------------------------------------------------
-void WinMtfOutput::SetWinOrgOffset( INT32 nXAdd, INT32 nYAdd )
+void WinMtfOutput::SetWinOrgOffset( sal_Int32 nXAdd, sal_Int32 nYAdd )
{
mnWinOrgX += nXAdd;
mnWinOrgY += nYAdd;
@@ -2036,7 +2036,7 @@ void WinMtfOutput::SetWorldTransform( const XForm& rXForm )
//-----------------------------------------------------------------------------------
-void WinMtfOutput::ModifyWorldTransform( const XForm& rXForm, UINT32 nMode )
+void WinMtfOutput::ModifyWorldTransform( const XForm& rXForm, sal_uInt32 nMode )
{
switch( nMode )
{
diff --git a/svtools/source/filter.vcl/wmf/winmtf.hxx b/svtools/source/filter.vcl/wmf/winmtf.hxx
index fb4fd2fe0c57..299d297c90bc 100644
--- a/svtools/source/filter.vcl/wmf/winmtf.hxx
+++ b/svtools/source/filter.vcl/wmf/winmtf.hxx
@@ -144,19 +144,19 @@
struct LOGFONTW
{
- INT32 lfHeight;
- INT32 lfWidth;
- INT32 lfEscapement;
- INT32 lfOrientation;
- INT32 lfWeight;
- BYTE lfItalic;
- BYTE lfUnderline;
- BYTE lfStrikeOut;
- BYTE lfCharSet;
- BYTE lfOutPrecision;
- BYTE lfClipPrecision;
- BYTE lfQuality;
- BYTE lfPitchAndFamily;
+ sal_Int32 lfHeight;
+ sal_Int32 lfWidth;
+ sal_Int32 lfEscapement;
+ sal_Int32 lfOrientation;
+ sal_Int32 lfWeight;
+ sal_uInt8 lfItalic;
+ sal_uInt8 lfUnderline;
+ sal_uInt8 lfStrikeOut;
+ sal_uInt8 lfCharSet;
+ sal_uInt8 lfOutPrecision;
+ sal_uInt8 lfClipPrecision;
+ sal_uInt8 lfQuality;
+ sal_uInt8 lfPitchAndFamily;
String alfFaceName;
};
@@ -367,23 +367,23 @@ struct WinMtfFontStyle
struct WinMtfFillStyle
{
Color aFillColor;
- BOOL bTransparent;
+ sal_Bool bTransparent;
WinMtfFillStyle() :
aFillColor ( Color( COL_BLACK ) ),
- bTransparent( FALSE )
+ bTransparent( sal_False )
{
};
- WinMtfFillStyle( const Color& rColor, BOOL bTrans = FALSE ) :
+ WinMtfFillStyle( const Color& rColor, sal_Bool bTrans = sal_False ) :
aFillColor ( rColor ),
bTransparent( bTrans )
{
};
- BOOL operator==( const WinMtfFillStyle& rStyle )
+ sal_Bool operator==( const WinMtfFillStyle& rStyle )
{ return ( ( aFillColor == rStyle.aFillColor ) && ( bTransparent == rStyle.bTransparent ) ); };
- BOOL operator==( WinMtfFillStyle* pStyle )
+ sal_Bool operator==( WinMtfFillStyle* pStyle )
{ return ( ( aFillColor == pStyle->aFillColor ) && ( bTransparent == pStyle->bTransparent ) ); };
void operator=( const WinMtfFillStyle& rStyle ) { aFillColor = rStyle.aFillColor; bTransparent = rStyle.bTransparent; };
void operator=( WinMtfFillStyle* pStyle ) { aFillColor = pStyle->aFillColor; bTransparent = pStyle->bTransparent; };
@@ -395,23 +395,23 @@ struct WinMtfLineStyle
{
Color aLineColor;
LineInfo aLineInfo;
- BOOL bTransparent;
+ sal_Bool bTransparent;
WinMtfLineStyle() :
aLineColor ( COL_BLACK ),
- bTransparent( FALSE ) {};
+ bTransparent( sal_False ) {};
- WinMtfLineStyle( const Color& rColor, BOOL bTrans = FALSE ) :
+ WinMtfLineStyle( const Color& rColor, sal_Bool bTrans = sal_False ) :
aLineColor ( rColor ),
bTransparent( bTrans ) {};
- WinMtfLineStyle( const Color& rColor, const LineInfo rStyle, BOOL bTrans = FALSE ) :
+ WinMtfLineStyle( const Color& rColor, const LineInfo rStyle, sal_Bool bTrans = sal_False ) :
aLineColor ( rColor ),
aLineInfo ( rStyle ),
bTransparent( bTrans ) {};
- BOOL operator==( const WinMtfLineStyle& rStyle ) { return ( ( aLineColor == rStyle.aLineColor ) && ( bTransparent == rStyle.bTransparent ) && ( aLineInfo == rStyle.aLineInfo ) ); };
- BOOL operator==( WinMtfLineStyle* pStyle ) { return ( ( aLineColor == pStyle->aLineColor ) && ( bTransparent == pStyle->bTransparent ) && ( aLineInfo == pStyle->aLineInfo ) ); };
+ sal_Bool operator==( const WinMtfLineStyle& rStyle ) { return ( ( aLineColor == rStyle.aLineColor ) && ( bTransparent == rStyle.bTransparent ) && ( aLineInfo == rStyle.aLineInfo ) ); };
+ sal_Bool operator==( WinMtfLineStyle* pStyle ) { return ( ( aLineColor == pStyle->aLineColor ) && ( bTransparent == pStyle->bTransparent ) && ( aLineInfo == pStyle->aLineInfo ) ); };
void operator=( const WinMtfLineStyle& rStyle )
{
aLineColor = rStyle.aLineColor;
@@ -480,9 +480,9 @@ struct BSaveStruct
{
Bitmap aBmp;
Rectangle aOutRect;
- UINT32 nWinRop;
+ sal_uInt32 nWinRop;
- BSaveStruct( const Bitmap& rBmp, const Rectangle& rOutRect, UINT32 nRop ) :
+ BSaveStruct( const Bitmap& rBmp, const Rectangle& rOutRect, sal_uInt32 nRop ) :
aBmp( rBmp ), aOutRect( rOutRect ), nWinRop( nRop ){};
};
@@ -594,7 +594,7 @@ class WinMtfOutput
void ImplMap( Font& rFont );
Polygon& ImplMap( Polygon& rPolygon );
PolyPolygon& ImplMap( PolyPolygon& rPolyPolygon );
- void ImplResizeObjectArry( UINT32 nNewEntry );
+ void ImplResizeObjectArry( sal_uInt32 nNewEntry );
void ImplSetNonPersistentLineColorTransparenz();
void ImplDrawClippedPolyPolygon( const PolyPolygon& rPolyPoly );
void ImplDrawBitmap( const Point& rPos, const Size& rSize, const BitmapEx rBitmap );
@@ -602,12 +602,12 @@ class WinMtfOutput
public:
void SetDevOrg( const Point& rPoint );
- void SetDevOrgOffset( INT32 nXAdd, INT32 nYAdd );
+ void SetDevOrgOffset( sal_Int32 nXAdd, sal_Int32 nYAdd );
void SetDevExt( const Size& rSize );
void ScaleDevExt( double fX, double fY );
void SetWinOrg( const Point& rPoint );
- void SetWinOrgOffset( INT32 nX, INT32 nY );
+ void SetWinOrgOffset( sal_Int32 nX, sal_Int32 nY );
void SetWinExt( const Size& rSize );
void ScaleWinExt( double fX, double fY );
@@ -619,24 +619,24 @@ class WinMtfOutput
sal_uInt32 GetMapMode() const { return mnMapMode; };
void SetMapMode( sal_uInt32 mnMapMode );
void SetWorldTransform( const XForm& rXForm );
- void ModifyWorldTransform( const XForm& rXForm, UINT32 nMode );
+ void ModifyWorldTransform( const XForm& rXForm, sal_uInt32 nMode );
void Push();
void Pop();
- UINT32 SetRasterOp( UINT32 nRasterOp );
+ sal_uInt32 SetRasterOp( sal_uInt32 nRasterOp );
void StrokeAndFillPath( sal_Bool bStroke, sal_Bool bFill );
void SetGfxMode( sal_Int32 nGfxMode ){ mnGfxMode = nGfxMode; };
sal_Int32 GetGfxMode() const { return mnGfxMode; };
- void SetBkMode( UINT32 nMode );
+ void SetBkMode( sal_uInt32 nMode );
void SetBkColor( const Color& rColor );
void SetTextColor( const Color& rColor );
- void SetTextAlign( UINT32 nAlign );
+ void SetTextAlign( sal_uInt32 nAlign );
void CreateObject( GDIObjectType, void* pStyle = NULL );
- void CreateObject( INT32 nIndex, GDIObjectType, void* pStyle = NULL );
- void DeleteObject( INT32 nIndex );
- void SelectObject( INT32 nIndex );
+ void CreateObject( sal_Int32 nIndex, GDIObjectType, void* pStyle = NULL );
+ void DeleteObject( sal_Int32 nIndex );
+ void SelectObject( sal_Int32 nIndex );
CharSet GetCharSet(){ return maFont.GetCharSet(); };
void SetFont( const Font& rFont );
const Font& GetFont() const;
@@ -651,10 +651,10 @@ class WinMtfOutput
void LineTo( const Point& rPoint, sal_Bool bRecordPath = sal_False );
void DrawPixel( const Point& rSource, const Color& rColor );
void DrawLine( const Point& rSource, const Point& rDest );
- void DrawRect( const Rectangle& rRect, BOOL bEdge = TRUE );
+ void DrawRect( const Rectangle& rRect, sal_Bool bEdge = sal_True );
void DrawRoundRect( const Rectangle& rRect, const Size& rSize );
void DrawEllipse( const Rectangle& rRect );
- void DrawArc( const Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle, BOOL bDrawTo = FALSE );
+ void DrawArc( const Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle, sal_Bool bDrawTo = sal_False );
void DrawPie( const Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle );
void DrawChord( const Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle );
void DrawPolygon( Polygon& rPolygon, sal_Bool bRecordPath = sal_False );
@@ -685,7 +685,7 @@ class WinMtf
WinMtfOutput* pOut; //
SvStream* pWMF; // Die einzulesende WMF/EMF-Datei
- UINT32 nStartPos, nEndPos;
+ sal_uInt32 nStartPos, nEndPos;
List aBmpSaveList;
FilterConfigItem* pFilterConfigItem;
@@ -695,7 +695,7 @@ class WinMtf
// Sorgt dafuer, das aSampledBrush der aktuelle Brush des GDIMetaFiles ist.
Color ReadColor();
- void Callback( USHORT nPercent );
+ void Callback( sal_uInt16 nPercent );
WinMtf( WinMtfOutput* pOut, SvStream& rStreamWMF, FilterConfigItem* pConfigItem = NULL );
~WinMtf();
@@ -711,16 +711,16 @@ class EnhWMFReader : public WinMtf
sal_Bool bRecordPath;
sal_Int32 nRecordCount;
- BOOL ReadHeader();
- Rectangle ReadRectangle( INT32, INT32, INT32, INT32 ); // Liesst und konvertiert ein Rechteck
- void ImplExtTextOut( BOOL bWideCharakter );
+ sal_Bool ReadHeader();
+ Rectangle ReadRectangle( sal_Int32, sal_Int32, sal_Int32, sal_Int32 ); // Liesst und konvertiert ein Rechteck
+ void ImplExtTextOut( sal_Bool bWideCharakter );
public:
EnhWMFReader( SvStream& rStreamWMF, GDIMetaFile& rGDIMetaFile, FilterConfigItem* pConfigItem = NULL )
: WinMtf( new WinMtfOutput( rGDIMetaFile ), rStreamWMF, pConfigItem ), bRecordPath( sal_False ) {};
~EnhWMFReader();
- BOOL ReadEnhWMF();
+ sal_Bool ReadEnhWMF();
};
//============================ WMFReader ==================================
@@ -730,7 +730,7 @@ class WMFReader : public WinMtf
private:
VirtualDevice aVDev; // just for the purpose of "IsFontAvailable"
- UINT16 nUnitsPerInch;
+ sal_uInt16 nUnitsPerInch;
sal_uInt32 nRecSize;
// embedded EMF data
@@ -750,10 +750,10 @@ private:
sal_uInt32 nUnicodeEscapeAction;
// Liesst den Kopf der WMF-Datei
- BOOL ReadHeader();
+ sal_Bool ReadHeader();
// Liesst die Parameter des Rocords mit der Funktionsnummer nFunction.
- void ReadRecordParams( USHORT nFunction );
+ void ReadRecordParams( sal_uInt16 nFunction );
Point ReadPoint(); // Liesst und konvertiert einen Punkt (erst X dann Y)
Point ReadYX(); // Liesst und konvertiert einen Punkt (erst Y dann X)
diff --git a/svtools/source/filter.vcl/wmf/winwmf.cxx b/svtools/source/filter.vcl/wmf/winwmf.cxx
index cea1ab490b04..880841cd36f8 100644
--- a/svtools/source/filter.vcl/wmf/winwmf.cxx
+++ b/svtools/source/filter.vcl/wmf/winwmf.cxx
@@ -156,7 +156,7 @@ Size WMFReader::ReadYXExt()
// ------------------------------------------------------------------------
-void WMFReader::ReadRecordParams( USHORT nFunc )
+void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
{
switch( nFunc )
{
@@ -168,7 +168,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
case W_META_SETBKMODE:
{
- USHORT nDat;
+ sal_uInt16 nDat;
*pWMF >> nDat;
pOut->SetBkMode( nDat );
}
@@ -185,7 +185,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
case W_META_SETROP2:
{
- UINT16 nROP2;
+ sal_uInt16 nROP2;
*pWMF >> nROP2;
pOut->SetRasterOp( nROP2 );
}
@@ -322,7 +322,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
case W_META_POLYGON:
{
- USHORT i,nPoints;
+ sal_uInt16 i,nPoints;
*pWMF >> nPoints;
Polygon aPoly( nPoints );
for( i = 0; i < nPoints; i++ )
@@ -333,13 +333,13 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
case W_META_POLYPOLYGON:
{
- USHORT i, nPoly, nPoints;
- USHORT* pnPoints;
+ sal_uInt16 i, nPoly, nPoints;
+ sal_uInt16* pnPoints;
Point* pPtAry;
// Anzahl der Polygone:
*pWMF >> nPoly;
// Anzahl der Punkte eines jeden Polygons holen, Gesammtzahl der Punkte ermitteln:
- pnPoints = new USHORT[ nPoly ];
+ pnPoints = new sal_uInt16[ nPoly ];
nPoints = 0;
for( i = 0; i < nPoly; i++ )
{
@@ -360,7 +360,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
case W_META_POLYLINE:
{
- USHORT i,nPoints;
+ sal_uInt16 i,nPoints;
*pWMF >> nPoints;
Polygon aPoly( nPoints );
for( i = 0; i < nPoints; i++ )
@@ -396,7 +396,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
case W_META_TEXTOUT:
{
- USHORT nLength;
+ sal_uInt16 nLength;
*pWMF >> nLength;
if ( nLength )
{
@@ -453,7 +453,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
sal_uInt32 nMaxStreamPos = nRecordPos + ( nRecordSize << 1 );
sal_Int32 nDxArySize = nMaxStreamPos - pWMF->Tell();
sal_Int32 nDxAryEntries = nDxArySize >> 1;
- sal_Bool bUseDXAry = FALSE;
+ sal_Bool bUseDXAry = sal_False;
if ( ( ( nDxAryEntries % nOriginalTextLen ) == 0 ) && ( nNewTextLen <= nOriginalTextLen ) )
{
@@ -481,7 +481,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
pDXAry[ i ] = nDx;
}
if ( i == nNewTextLen )
- bUseDXAry = TRUE;
+ bUseDXAry = sal_True;
}
if ( pDXAry && bUseDXAry )
pOut->DrawText( aPosition, aText, pDXAry );
@@ -496,7 +496,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
case W_META_SELECTOBJECT:
{
- INT16 nObjIndex;
+ sal_Int16 nObjIndex;
*pWMF >> nObjIndex;
pOut->SelectObject( nObjIndex );
}
@@ -504,7 +504,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
case W_META_SETTEXTALIGN:
{
- UINT16 nAlign;
+ sal_uInt16 nAlign;
*pWMF >> nAlign;
pOut->SetTextAlign( nAlign );
}
@@ -602,14 +602,14 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
{
if ( nWinROP == PATCOPY )
*pWMF >> nUsage; // i don't know anything of this parameter, so its called nUsage
- // pOut->DrawRect( Rectangle( ReadYX(), aDestSize ), FALSE );
+ // pOut->DrawRect( Rectangle( ReadYX(), aDestSize ), sal_False );
Size aDestSize( ReadYXExt() );
if ( aDestSize.Width() && aDestSize.Height() ) // #92623# do not try to read buggy bitmaps
{
Rectangle aDestRect( ReadYX(), aDestSize );
if ( nWinROP != PATCOPY )
- aBmp.Read( *pWMF, FALSE );
+ aBmp.Read( *pWMF, sal_False );
// test if it is sensible to crop
if ( nSye && nSxe &&
@@ -629,18 +629,18 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
{
Bitmap aBmp;
BitmapReadAccess* pBmp;
- UINT32 nRed = 0, nGreen = 0, nBlue = 0, nCount = 1;
- UINT16 nFunction;
+ sal_uInt32 nRed = 0, nGreen = 0, nBlue = 0, nCount = 1;
+ sal_uInt16 nFunction;
*pWMF >> nFunction >> nFunction;
- aBmp.Read( *pWMF, FALSE );
+ aBmp.Read( *pWMF, sal_False );
pBmp = aBmp.AcquireReadAccess();
if ( pBmp )
{
- for ( INT32 y = 0; y < pBmp->Height(); y++ )
+ for ( sal_Int32 y = 0; y < pBmp->Height(); y++ )
{
- for ( INT32 x = 0; x < pBmp->Width(); x++ )
+ for ( sal_Int32 x = 0; x < pBmp->Width(); x++ )
{
const BitmapColor aColor( pBmp->GetColor( y, x ) );
@@ -654,14 +654,14 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
nCount++;
aBmp.ReleaseAccess( pBmp );
}
- Color aColor( (BYTE)( nRed / nCount ), (BYTE)( nGreen / nCount ), (BYTE)( nBlue / nCount ) );
- pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( aColor, FALSE ) );
+ Color aColor( (sal_uInt8)( nRed / nCount ), (sal_uInt8)( nGreen / nCount ), (sal_uInt8)( nBlue / nCount ) );
+ pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( aColor, sal_False ) );
}
break;
case W_META_DELETEOBJECT:
{
- INT16 nIndex;
+ sal_Int16 nIndex;
*pWMF >> nIndex;
pOut->DeleteObject( nIndex );
}
@@ -675,29 +675,29 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
case W_META_CREATEBRUSH:
{
- pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( Color( COL_WHITE ), FALSE ) );
+ pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( Color( COL_WHITE ), sal_False ) );
}
break;
case W_META_CREATEPATTERNBRUSH:
{
- pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( Color( COL_WHITE ), FALSE ) );
+ pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( Color( COL_WHITE ), sal_False ) );
}
break;
case W_META_CREATEPENINDIRECT:
{
LineInfo aLineInfo;
- USHORT nStyle, nWidth, nHeight;
+ sal_uInt16 nStyle, nWidth, nHeight;
*pWMF >> nStyle >> nWidth >> nHeight;
if ( nWidth )
aLineInfo.SetWidth( nWidth );
- BOOL bTransparent = FALSE;
- UINT16 nDashCount = 0;
- UINT16 nDotCount = 0;
+ sal_Bool bTransparent = sal_False;
+ sal_uInt16 nDashCount = 0;
+ sal_uInt16 nDotCount = 0;
switch( nStyle )
{
case PS_DASHDOTDOT :
@@ -711,7 +711,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
nDashCount++;
break;
case PS_NULL :
- bTransparent = TRUE;
+ bTransparent = sal_True;
aLineInfo.SetStyle( LINE_NONE );
break;
default :
@@ -731,9 +731,9 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
case W_META_CREATEBRUSHINDIRECT:
{
- USHORT nStyle;
+ sal_uInt16 nStyle;
*pWMF >> nStyle;
- pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( ReadColor(), ( nStyle == BS_HOLLOW ) ? TRUE : FALSE ) );
+ pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( ReadColor(), ( nStyle == BS_HOLLOW ) ? sal_True : sal_False ) );
}
break;
@@ -741,7 +741,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
{
Size aFontSize;
char lfFaceName[ LF_FACESIZE ];
- INT16 lfEscapement, lfOrientation, lfWeight; // ( ehemals USHORT )
+ sal_Int16 lfEscapement, lfOrientation, lfWeight; // ( ehemals sal_uInt16 )
LOGFONTW aLogFont;
aFontSize = ReadYXExt();
@@ -796,11 +796,11 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
case W_META_PATBLT:
{
- UINT32 nROP, nOldROP;
+ sal_uInt32 nROP, nOldROP;
*pWMF >> nROP;
Size aSize = ReadYXExt();
nOldROP = pOut->SetRasterOp( nROP );
- pOut->DrawRect( Rectangle( ReadYX(), aSize ), FALSE );
+ pOut->DrawRect( Rectangle( ReadYX(), aSize ), sal_False );
pOut->SetRasterOp( nOldROP );
}
break;
@@ -996,7 +996,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
// ------------------------------------------------------------------------
-BOOL WMFReader::ReadHeader()
+sal_Bool WMFReader::ReadHeader()
{
Rectangle aPlaceableBound;
sal_uInt32 nl, nStrmPos = pWMF->Tell();
@@ -1007,7 +1007,7 @@ BOOL WMFReader::ReadHeader()
Size aWMFSize;
if ( nl == 0x9ac6cdd7L )
{
- INT16 nVal;
+ sal_Int16 nVal;
// hmf (Unused) ueberlesen wir
pWMF->SeekRel(2);
@@ -1055,7 +1055,7 @@ BOOL WMFReader::ReadHeader()
if( nl != 0x00090001 )
{
pWMF->SetError( SVSTREAM_FILEFORMAT_ERROR );
- return FALSE;
+ return sal_False;
}
pWMF->SeekRel( 2 ); // Version (von Windows)
@@ -1064,13 +1064,13 @@ BOOL WMFReader::ReadHeader()
pWMF->SeekRel( 4 ); // MaxRecord (Groesse des groessten Records in Words)
pWMF->SeekRel( 2 ); // NoParameters (Unused
- return TRUE;
+ return sal_True;
}
void WMFReader::ReadWMF()
{
- USHORT nFunction;
- ULONG nPos, nPercent, nLastPercent;
+ sal_uInt16 nFunction;
+ sal_uLong nPos, nPercent, nLastPercent;
nSkipActions = 0;
nCurrentAction = 0;
@@ -1090,7 +1090,7 @@ void WMFReader::ReadWMF()
nEndPos=pWMF->Seek( STREAM_SEEK_TO_END );
pWMF->Seek( nStartPos );
- Callback( (USHORT) ( nLastPercent = 0 ) );
+ Callback( (sal_uInt16) ( nLastPercent = 0 ) );
if ( ReadHeader() )
{
@@ -1099,14 +1099,14 @@ void WMFReader::ReadWMF()
if( nEndPos - nStartPos )
{
- while( TRUE )
+ while( sal_True )
{
nCurrentAction++;
nPercent = ( nPos - nStartPos ) * 100 / ( nEndPos - nStartPos );
if( nLastPercent + 4 <= nPercent )
{
- Callback( (USHORT) nPercent );
+ Callback( (sal_uInt16) nPercent );
nLastPercent = nPercent;
}
*pWMF >> nRecSize >> nFunction;
@@ -1288,7 +1288,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt
case W_META_POLYGON:
{
- USHORT i,nPoints;
+ sal_uInt16 i,nPoints;
*pStm >> nPoints;
for( i = 0; i < nPoints; i++ )
GetWinExtMax( ReadPoint(), rPlaceableBound, nMapMode );
@@ -1297,7 +1297,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt
case W_META_POLYPOLYGON:
{
- USHORT i, nPoly, nPoints = 0;
+ sal_uInt16 i, nPoly, nPoints = 0;
*pStm >> nPoly;
for( i = 0; i < nPoly; i++ )
{
@@ -1312,7 +1312,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt
case W_META_POLYLINE:
{
- USHORT i,nPoints;
+ sal_uInt16 i,nPoints;
*pStm >> nPoints;
for( i = 0; i < nPoints; i++ )
GetWinExtMax( ReadPoint(), rPlaceableBound, nMapMode );
@@ -1328,7 +1328,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt
case W_META_TEXTOUT:
{
- USHORT nLength;
+ sal_uInt16 nLength;
*pStm >> nLength;
// todo: we also have to take care of the text width
if ( nLength )
@@ -1383,7 +1383,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt
{
if ( nWinROP == PATCOPY )
*pStm >> nUsage; // i don't know anything of this parameter, so its called nUsage
- // pOut->DrawRect( Rectangle( ReadYX(), aDestSize ), FALSE );
+ // pOut->DrawRect( Rectangle( ReadYX(), aDestSize ), sal_False );
Size aDestSize( ReadYXExt() );
if ( aDestSize.Width() && aDestSize.Height() ) // #92623# do not try to read buggy bitmaps
@@ -1397,7 +1397,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt
case W_META_PATBLT:
{
- UINT32 nROP;
+ sal_uInt32 nROP;
*pStm >> nROP;
Size aSize = ReadYXExt();
GetWinExtMax( Rectangle( ReadYX(), aSize ), rPlaceableBound, nMapMode );
diff --git a/svtools/source/filter.vcl/wmf/wmf.cxx b/svtools/source/filter.vcl/wmf/wmf.cxx
index 25ca9f721b33..4e84cd920b56 100644
--- a/svtools/source/filter.vcl/wmf/wmf.cxx
+++ b/svtools/source/filter.vcl/wmf/wmf.cxx
@@ -35,18 +35,18 @@
// -----------------------------------------------------------------------------
-BOOL ConvertWMFToGDIMetaFile( SvStream & rStreamWMF, GDIMetaFile & rGDIMetaFile, FilterConfigItem* pConfigItem )
+sal_Bool ConvertWMFToGDIMetaFile( SvStream & rStreamWMF, GDIMetaFile & rGDIMetaFile, FilterConfigItem* pConfigItem )
{
- UINT32 nMetaType;
- UINT32 nOrgPos = rStreamWMF.Tell();
- UINT16 nOrigNumberFormat = rStreamWMF.GetNumberFormatInt();
+ sal_uInt32 nMetaType;
+ sal_uInt32 nOrgPos = rStreamWMF.Tell();
+ sal_uInt16 nOrigNumberFormat = rStreamWMF.GetNumberFormatInt();
rStreamWMF.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
rStreamWMF.Seek( 0x28 );
rStreamWMF >> nMetaType;
rStreamWMF.Seek( nOrgPos );
if ( nMetaType == 0x464d4520 )
{
- if ( EnhWMFReader( rStreamWMF, rGDIMetaFile, pConfigItem ).ReadEnhWMF() == FALSE )
+ if ( EnhWMFReader( rStreamWMF, rGDIMetaFile, pConfigItem ).ReadEnhWMF() == sal_False )
rStreamWMF.SetError( SVSTREAM_FILEFORMAT_ERROR );
}
else
@@ -59,18 +59,18 @@ BOOL ConvertWMFToGDIMetaFile( SvStream & rStreamWMF, GDIMetaFile & rGDIMetaFile,
// -----------------------------------------------------------------------------
-BOOL ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigItem* pFilterConfigItem )
+sal_Bool ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigItem* pFilterConfigItem )
{
- UINT32 nMetaType;
- UINT32 nOrgPos = rStream.Tell();
- UINT16 nOrigNumberFormat = rStream.GetNumberFormatInt();
+ sal_uInt32 nMetaType;
+ sal_uInt32 nOrgPos = rStream.Tell();
+ sal_uInt16 nOrigNumberFormat = rStream.GetNumberFormatInt();
rStream.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
rStream.Seek( 0x28 );
rStream >> nMetaType;
rStream.Seek( nOrgPos );
if ( nMetaType == 0x464d4520 )
{
- if ( EnhWMFReader( rStream, rMTF, NULL ).ReadEnhWMF() == FALSE )
+ if ( EnhWMFReader( rStream, rMTF, NULL ).ReadEnhWMF() == sal_False )
rStream.SetError( SVSTREAM_FILEFORMAT_ERROR );
}
else
@@ -83,8 +83,8 @@ BOOL ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigItem*
// -----------------------------------------------------------------------------
-BOOL ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetStream,
- FilterConfigItem* pConfigItem, BOOL bPlaceable)
+sal_Bool ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetStream,
+ FilterConfigItem* pConfigItem, sal_Bool bPlaceable)
{
WMFWriter aWMFWriter;
return aWMFWriter.WriteWMF( rMTF, rTargetStream, pConfigItem, bPlaceable );
@@ -92,7 +92,7 @@ BOOL ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetStream
// -----------------------------------------------------------------------------
-BOOL ConvertGDIMetaFileToEMF( const GDIMetaFile & rMTF, SvStream & rTargetStream,
+sal_Bool ConvertGDIMetaFileToEMF( const GDIMetaFile & rMTF, SvStream & rTargetStream,
FilterConfigItem* pConfigItem )
{
EMFWriter aEMFWriter;
@@ -101,14 +101,14 @@ BOOL ConvertGDIMetaFileToEMF( const GDIMetaFile & rMTF, SvStream & rTargetStream
// -----------------------------------------------------------------------------
-BOOL WriteWindowMetafile( SvStream& rStream, const GDIMetaFile& rMTF )
+sal_Bool WriteWindowMetafile( SvStream& rStream, const GDIMetaFile& rMTF )
{
return WMFWriter().WriteWMF( rMTF, rStream, NULL );
}
// -----------------------------------------------------------------------------
-BOOL WriteWindowMetafileBits( SvStream& rStream, const GDIMetaFile& rMTF )
+sal_Bool WriteWindowMetafileBits( SvStream& rStream, const GDIMetaFile& rMTF )
{
- return WMFWriter().WriteWMF( rMTF, rStream, NULL, FALSE );
+ return WMFWriter().WriteWMF( rMTF, rStream, NULL, sal_False );
}
diff --git a/svtools/source/filter.vcl/wmf/wmfwr.cxx b/svtools/source/filter.vcl/wmf/wmfwr.cxx
index 4dff9732c7d0..36b84316271b 100644
--- a/svtools/source/filter.vcl/wmf/wmfwr.cxx
+++ b/svtools/source/filter.vcl/wmf/wmfwr.cxx
@@ -281,7 +281,7 @@ void WMFWriter::MayCallback()
{
if ( xStatusIndicator.is() )
{
- ULONG nPercent;
+ sal_uLong nPercent;
// Wir gehen mal einfach so davon aus, dass 16386 Actions einer Bitmap entsprechen
// (in der Regel wird ein Metafile entweder nur Actions oder einige Bitmaps und fast
@@ -302,7 +302,7 @@ void WMFWriter::MayCallback()
void WMFWriter::CountActionsAndBitmaps( const GDIMetaFile & rMTF )
{
- ULONG nAction, nActionCount;
+ sal_uLong nAction, nActionCount;
nActionCount = rMTF.GetActionCount();
@@ -370,7 +370,7 @@ void WMFWriter::WriteRectangle(const Rectangle & rRect)
void WMFWriter::WriteColor(const Color & rColor)
{
- *pWMF << (BYTE) rColor.GetRed() << (BYTE) rColor.GetGreen() << (BYTE) rColor.GetBlue() << (BYTE) 0;
+ *pWMF << (sal_uInt8) rColor.GetRed() << (sal_uInt8) rColor.GetGreen() << (sal_uInt8) rColor.GetBlue() << (sal_uInt8) 0;
}
@@ -384,12 +384,12 @@ void WMFWriter::WriteRecordHeader(sal_uInt32 nSizeWords, sal_uInt16 nType)
void WMFWriter::UpdateRecordHeader()
{
- ULONG nPos;
+ sal_uLong nPos;
sal_uInt32 nSize;
nPos=pWMF->Tell(); nSize=nPos-nActRecordPos;
if ((nSize & 1)!=0) {
- *pWMF << (BYTE)0;
+ *pWMF << (sal_uInt8)0;
nPos++; nSize++;
}
nSize/=2;
@@ -422,19 +422,19 @@ void WMFWriter::WMFRecord_CreateBrushIndirect(const Color& rColor)
WriteRecordHeader(0x00000007,W_META_CREATEBRUSHINDIRECT);
if( rColor==Color(COL_TRANSPARENT) )
- *pWMF << (UINT16) W_BS_HOLLOW;
+ *pWMF << (sal_uInt16) W_BS_HOLLOW;
else
- *pWMF << (UINT16) W_BS_SOLID;
+ *pWMF << (sal_uInt16) W_BS_SOLID;
WriteColor( rColor );
- *pWMF << (UINT16) 0;
+ *pWMF << (sal_uInt16) 0;
}
void WMFWriter::WMFRecord_CreateFontIndirect(const Font & rFont)
{
- USHORT nWeight,i;
- BYTE nPitchFamily;
+ sal_uInt16 nWeight,i;
+ sal_uInt8 nPitchFamily;
WriteRecordHeader(0x00000000,W_META_CREATEFONTINDIRECT);
WriteHeightWidth(Size(rFont.GetSize().Width(),-rFont.GetSize().Height()));
@@ -455,9 +455,9 @@ void WMFWriter::WMFRecord_CreateFontIndirect(const Font & rFont)
}
*pWMF << nWeight;
- if (rFont.GetItalic()==ITALIC_NONE) *pWMF << (BYTE)0; else *pWMF << (BYTE)1;
- if (rFont.GetUnderline()==UNDERLINE_NONE) *pWMF << (BYTE)0; else *pWMF << (BYTE)1;
- if (rFont.GetStrikeout()==STRIKEOUT_NONE) *pWMF << (BYTE)0; else *pWMF << (BYTE)1;
+ if (rFont.GetItalic()==ITALIC_NONE) *pWMF << (sal_uInt8)0; else *pWMF << (sal_uInt8)1;
+ if (rFont.GetUnderline()==UNDERLINE_NONE) *pWMF << (sal_uInt8)0; else *pWMF << (sal_uInt8)1;
+ if (rFont.GetStrikeout()==STRIKEOUT_NONE) *pWMF << (sal_uInt8)0; else *pWMF << (sal_uInt8)1;
CharSet eFontNameEncoding = rFont.GetCharSet();
sal_uInt8 nCharSet = rtl_getBestWindowsCharsetFromTextEncoding( eFontNameEncoding );
@@ -467,7 +467,7 @@ void WMFWriter::WMFRecord_CreateFontIndirect(const Font & rFont)
nCharSet = W_ANSI_CHARSET;
*pWMF << nCharSet;
- *pWMF << (BYTE)0 << (BYTE)0 << (BYTE)0;
+ *pWMF << (sal_uInt8)0 << (sal_uInt8)0 << (sal_uInt8)0;
switch (rFont.GetPitch()) {
case PITCH_FIXED: nPitchFamily=W_FIXED_PITCH; break;
@@ -496,7 +496,7 @@ void WMFWriter::WMFRecord_CreateFontIndirect(const Font & rFont)
void WMFWriter::WMFRecord_CreatePenIndirect(const Color& rColor, const LineInfo& rLineInfo )
{
WriteRecordHeader(0x00000008,W_META_CREATEPENINDIRECT);
- USHORT nStyle = rColor == Color( COL_TRANSPARENT ) ? W_PS_NULL : W_PS_SOLID;
+ sal_uInt16 nStyle = rColor == Color( COL_TRANSPARENT ) ? W_PS_NULL : W_PS_SOLID;
switch( rLineInfo.GetStyle() )
{
case LINE_DASH :
@@ -529,7 +529,7 @@ void WMFWriter::WMFRecord_CreatePenIndirect(const Color& rColor, const LineInfo&
WriteColor( rColor );
}
-void WMFWriter::WMFRecord_DeleteObject(USHORT nObjectHandle)
+void WMFWriter::WMFRecord_DeleteObject(sal_uInt16 nObjectHandle)
{
WriteRecordHeader(0x00000004,W_META_DELETEOBJECT);
*pWMF << nObjectHandle;
@@ -750,7 +750,7 @@ void WMFWriter::WMFRecord_Pie(const Rectangle & rRect, const Point & rStartPt, c
void WMFWriter::WMFRecord_Polygon(const Polygon & rPoly)
{
- USHORT nSize,i;
+ sal_uInt16 nSize,i;
Polygon aSimplePoly;
if ( rPoly.HasFlags() )
@@ -758,7 +758,7 @@ void WMFWriter::WMFRecord_Polygon(const Polygon & rPoly)
else
aSimplePoly = rPoly;
nSize = aSimplePoly.GetSize();
- WriteRecordHeader(((ULONG)nSize)*2+4,W_META_POLYGON);
+ WriteRecordHeader(((sal_uLong)nSize)*2+4,W_META_POLYGON);
*pWMF << nSize;
for (i=0; i<nSize; i++) WritePointXY(aSimplePoly.GetPoint(i));
}
@@ -766,14 +766,14 @@ void WMFWriter::WMFRecord_Polygon(const Polygon & rPoly)
void WMFWriter::WMFRecord_PolyLine(const Polygon & rPoly)
{
- USHORT nSize,i;
+ sal_uInt16 nSize,i;
Polygon aSimplePoly;
if ( rPoly.HasFlags() )
rPoly.AdaptiveSubdivide( aSimplePoly );
else
aSimplePoly = rPoly;
nSize=aSimplePoly.GetSize();
- WriteRecordHeader(((ULONG)nSize)*2+4,W_META_POLYLINE);
+ WriteRecordHeader(((sal_uLong)nSize)*2+4,W_META_POLYLINE);
*pWMF << nSize;
for (i=0; i<nSize; i++) WritePointXY(aSimplePoly.GetPoint(i));
}
@@ -782,7 +782,7 @@ void WMFWriter::WMFRecord_PolyLine(const Polygon & rPoly)
void WMFWriter::WMFRecord_PolyPolygon(const PolyPolygon & rPolyPoly)
{
const Polygon * pPoly;
- USHORT nCount,nSize,i,j;
+ sal_uInt16 nCount,nSize,i,j;
nCount=rPolyPoly.Count();
PolyPolygon aSimplePolyPoly( rPolyPoly );
@@ -797,7 +797,7 @@ void WMFWriter::WMFRecord_PolyPolygon(const PolyPolygon & rPolyPoly)
}
WriteRecordHeader(0,W_META_POLYPOLYGON);
*pWMF << nCount;
- for (i=0; i<nCount; i++) *pWMF << ((USHORT)(aSimplePolyPoly.GetObject(i).GetSize()));
+ for (i=0; i<nCount; i++) *pWMF << ((sal_uInt16)(aSimplePolyPoly.GetObject(i).GetSize()));
for (i=0; i<nCount; i++) {
pPoly=&(aSimplePolyPoly.GetObject(i));
nSize=pPoly->GetSize();
@@ -835,7 +835,7 @@ void WMFWriter::WMFRecord_SaveDC()
}
-void WMFWriter::WMFRecord_SelectObject(USHORT nObjectHandle)
+void WMFWriter::WMFRecord_SelectObject(sal_uInt16 nObjectHandle)
{
WriteRecordHeader(0x00000004,W_META_SELECTOBJECT);
*pWMF << nObjectHandle;
@@ -849,17 +849,17 @@ void WMFWriter::WMFRecord_SetBkColor(const Color & rColor)
}
-void WMFWriter::WMFRecord_SetBkMode(BOOL bTransparent)
+void WMFWriter::WMFRecord_SetBkMode(sal_Bool bTransparent)
{
WriteRecordHeader(0x00000004,W_META_SETBKMODE);
- if (bTransparent==TRUE) *pWMF << (USHORT)W_TRANSPARENT;
- else *pWMF << (USHORT)W_OPAQUE;
+ if (bTransparent==sal_True) *pWMF << (sal_uInt16)W_TRANSPARENT;
+ else *pWMF << (sal_uInt16)W_OPAQUE;
}
void WMFWriter::WMFRecord_SetStretchBltMode()
{
WriteRecordHeader( 0x00000004, W_META_SETSTRETCHBLTMODE );
- *pWMF << (USHORT) 3; // STRETCH_DELETESCANS
+ *pWMF << (sal_uInt16) 3; // STRETCH_DELETESCANS
}
void WMFWriter::WMFRecord_SetPixel(const Point & rPoint, const Color & rColor)
@@ -872,7 +872,7 @@ void WMFWriter::WMFRecord_SetPixel(const Point & rPoint, const Color & rColor)
void WMFWriter::WMFRecord_SetROP2(RasterOp eROP)
{
- USHORT nROP2;
+ sal_uInt16 nROP2;
switch (eROP) {
case ROP_INVERT: nROP2=W_R2_NOT; break;
@@ -884,9 +884,9 @@ void WMFWriter::WMFRecord_SetROP2(RasterOp eROP)
}
-void WMFWriter::WMFRecord_SetTextAlign(FontAlign eFontAlign, UINT32 eHorTextAlign)
+void WMFWriter::WMFRecord_SetTextAlign(FontAlign eFontAlign, sal_uInt32 eHorTextAlign)
{
- USHORT nAlign;
+ sal_uInt16 nAlign;
switch (eFontAlign) {
case ALIGN_TOP: nAlign=W_TA_TOP; break;
@@ -925,7 +925,7 @@ void WMFWriter::WMFRecord_SetWindowOrg(const Point & rPoint)
void WMFWriter::WMFRecord_StretchDIB( const Point & rPoint, const Size & rSize,
const Bitmap & rBitmap, sal_uInt32 nROP )
{
- ULONG nPosAnf,nPosEnd;
+ sal_uLong nPosAnf,nPosEnd;
nActBitmapPercent=50;
MayCallback();
@@ -985,14 +985,14 @@ void WMFWriter::WMFRecord_TextOut(const Point & rPoint, const String & rStr)
void WMFWriter::TrueTextOut(const Point & rPoint, const ByteString& rString)
{
- USHORT nLen,i;
+ sal_uInt16 nLen,i;
WriteRecordHeader(0,W_META_TEXTOUT);
nLen=rString.Len();
*pWMF << nLen;
for ( i = 0; i < nLen; i++ )
- *pWMF << (BYTE)rString.GetChar( i );
- if ((nLen&1)!=0) *pWMF << (BYTE)0;
+ *pWMF << (sal_uInt8)rString.GetChar( i );
+ if ((nLen&1)!=0) *pWMF << (sal_uInt8)0;
WritePointYX(rPoint);
UpdateRecordHeader();
}
@@ -1010,30 +1010,30 @@ void WMFWriter::WMFRecord_IntersectClipRect( const Rectangle& rRect )
}
-USHORT WMFWriter::AllocHandle()
+sal_uInt16 WMFWriter::AllocHandle()
{
- USHORT i;
+ sal_uInt16 i;
for (i=0; i<MAXOBJECTHANDLES; i++) {
- if (bHandleAllocated[i]==FALSE) {
- bHandleAllocated[i]=TRUE;
+ if (bHandleAllocated[i]==sal_False) {
+ bHandleAllocated[i]=sal_True;
return i;
}
}
- bStatus=FALSE;
+ bStatus=sal_False;
return 0xffff;
}
-void WMFWriter::FreeHandle(USHORT nObjectHandle)
+void WMFWriter::FreeHandle(sal_uInt16 nObjectHandle)
{
- if (nObjectHandle<MAXOBJECTHANDLES) bHandleAllocated[nObjectHandle]=FALSE;
+ if (nObjectHandle<MAXOBJECTHANDLES) bHandleAllocated[nObjectHandle]=sal_False;
}
void WMFWriter::CreateSelectDeletePen( const Color& rColor, const LineInfo& rLineInfo )
{
- USHORT nOldHandle;
+ sal_uInt16 nOldHandle;
nOldHandle=nDstPenHandle;
nDstPenHandle=AllocHandle();
@@ -1048,7 +1048,7 @@ void WMFWriter::CreateSelectDeletePen( const Color& rColor, const LineInfo& rLin
void WMFWriter::CreateSelectDeleteFont(const Font & rFont)
{
- USHORT nOldHandle;
+ sal_uInt16 nOldHandle;
nOldHandle=nDstFontHandle;
nDstFontHandle=AllocHandle();
@@ -1063,7 +1063,7 @@ void WMFWriter::CreateSelectDeleteFont(const Font & rFont)
void WMFWriter::CreateSelectDeleteBrush(const Color& rColor)
{
- USHORT nOldHandle;
+ sal_uInt16 nOldHandle;
nOldHandle=nDstBrushHandle;
nDstBrushHandle=AllocHandle();
@@ -1095,7 +1095,7 @@ void WMFWriter::SetLineAndFillAttr()
CreateSelectDeleteBrush( aDstFillColor );
}
if ( bDstIsClipping != bSrcIsClipping ||
- (bSrcIsClipping==TRUE && aDstClipRegion!=aSrcClipRegion)) {
+ (bSrcIsClipping==sal_True && aDstClipRegion!=aSrcClipRegion)) {
bDstIsClipping=bSrcIsClipping;
aDstClipRegion=aSrcClipRegion;
}
@@ -1180,7 +1180,7 @@ void WMFWriter::HandleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx:
void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
{
- ULONG nA, nACount;
+ sal_uLong nA, nACount;
MetaAction* pMA;
if( bStatus )
@@ -1698,8 +1698,8 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
const MetaEPSAction* pA = (const MetaEPSAction*)pMA;
const GDIMetaFile aGDIMetaFile( pA->GetSubstitute() );
- INT32 nCount = aGDIMetaFile.GetActionCount();
- for ( INT32 i = 0; i < nCount; i++ )
+ sal_Int32 nCount = aGDIMetaFile.GetActionCount();
+ for ( sal_Int32 i = 0; i < nCount; i++ )
{
const MetaAction* pMetaAct = aGDIMetaFile.GetAction( i );
if ( pMetaAct->GetType() == META_BMPSCALE_ACTION )
@@ -1802,9 +1802,9 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
MayCallback();
if (pWMF->GetError())
- bStatus=FALSE;
+ bStatus=sal_False;
- if(bStatus==FALSE)
+ if(bStatus==sal_False)
break;
}
}
@@ -1812,13 +1812,13 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
// ------------------------------------------------------------------------
-void WMFWriter::WriteHeader( const GDIMetaFile &, BOOL bPlaceable )
+void WMFWriter::WriteHeader( const GDIMetaFile &, sal_Bool bPlaceable )
{
if( bPlaceable )
{
- USHORT nCheckSum, nValue;
+ sal_uInt16 nCheckSum, nValue;
Size aSize( pVirDev->LogicToLogic(Size(1,1),MapMode(MAP_INCH), aTargetMapMode) );
- USHORT nUnitsPerInch = (USHORT) ( ( aSize.Width() + aSize.Height() ) >> 1 );
+ sal_uInt16 nUnitsPerInch = (sal_uInt16) ( ( aSize.Width() + aSize.Height() ) >> 1 );
nCheckSum=0;
nValue=0xcdd7; nCheckSum^=nValue; *pWMF << nValue;
@@ -1826,8 +1826,8 @@ void WMFWriter::WriteHeader( const GDIMetaFile &, BOOL bPlaceable )
nValue=0x0000; nCheckSum^=nValue; *pWMF << nValue;
nValue=0x0000; nCheckSum^=nValue; *pWMF << nValue;
nValue=0x0000; nCheckSum^=nValue; *pWMF << nValue;
- nValue=(USHORT) aTargetSize.Width(); nCheckSum^=nValue; *pWMF << nValue;
- nValue=(USHORT) aTargetSize.Height(); nCheckSum^=nValue; *pWMF << nValue;
+ nValue=(sal_uInt16) aTargetSize.Width(); nCheckSum^=nValue; *pWMF << nValue;
+ nValue=(sal_uInt16) aTargetSize.Height(); nCheckSum^=nValue; *pWMF << nValue;
nValue=nUnitsPerInch; nCheckSum^=nValue; *pWMF << nValue;
nValue=0x0000; nCheckSum^=nValue; *pWMF << nValue;
nValue=0x0000; nCheckSum^=nValue; *pWMF << nValue;
@@ -1848,13 +1848,13 @@ void WMFWriter::WriteHeader( const GDIMetaFile &, BOOL bPlaceable )
void WMFWriter::UpdateHeader()
{
- ULONG nPos;
+ sal_uLong nPos;
sal_uInt32 nFileSize;
nPos=pWMF->Tell(); // Endposition = Gesammtgroesse der Datei
nFileSize=nPos-nMetafileHeaderPos; // Groesse des 1. Headers abziehen
if ((nFileSize&1)!=0) { // ggf. auf ganze Worte aufrunden
- *pWMF << (BYTE)0;
+ *pWMF << (sal_uInt8)0;
nPos++;
nFileSize++;
}
@@ -1868,13 +1868,13 @@ void WMFWriter::UpdateHeader()
// ------------------------------------------------------------------------
-BOOL WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream,
- FilterConfigItem* pFConfigItem, BOOL bPlaceable )
+sal_Bool WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream,
+ FilterConfigItem* pFConfigItem, sal_Bool bPlaceable )
{
WMFWriterAttrStackMember * pAt;
- bEmbedEMF = TRUE;
- bStatus=TRUE;
+ bEmbedEMF = sal_True;
+ bStatus=sal_True;
pConvert = 0;
pVirDev = new VirtualDevice;
@@ -1921,8 +1921,8 @@ BOOL WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream,
pAttrStack=NULL;
- for (USHORT i=0; i<MAXOBJECTHANDLES; i++)
- bHandleAllocated[i]=FALSE;
+ for (sal_uInt16 i=0; i<MAXOBJECTHANDLES; i++)
+ bHandleAllocated[i]=sal_False;
nDstPenHandle=0xffff;
nDstFontHandle=0xffff;
@@ -1941,7 +1941,7 @@ BOOL WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream,
WriteEmbeddedEMF( rMTF );
WMFRecord_SetWindowOrg(Point(0,0));
WMFRecord_SetWindowExt(rMTF.GetPrefSize());
- WMFRecord_SetBkMode( TRUE );
+ WMFRecord_SetBkMode( sal_True );
eDstROP2 = eSrcRasterOp = ROP_OVERPAINT;
WMFRecord_SetROP2(eDstROP2);
@@ -1954,7 +1954,7 @@ BOOL WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream,
CreateSelectDeleteBrush( aDstFillColor );
aDstClipRegion = aSrcClipRegion = Region();
- bDstIsClipping = bSrcIsClipping = FALSE;
+ bDstIsClipping = bSrcIsClipping = sal_False;
Font aFont;
aFont.SetCharSet( GetExtendedTextEncoding( gsl_getSystemTextEncoding() ) );
@@ -1994,11 +1994,11 @@ BOOL WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream,
// ------------------------------------------------------------------------
-USHORT WMFWriter::CalcSaveTargetMapMode(MapMode& rMapMode,
+sal_uInt16 WMFWriter::CalcSaveTargetMapMode(MapMode& rMapMode,
const Size& rPrefSize)
{
Fraction aDivFrac(2, 1);
- USHORT nDivisor = 1;
+ sal_uInt16 nDivisor = 1;
Size aSize = pVirDev->LogicToLogic( rPrefSize, aSrcMapMode, rMapMode );
diff --git a/svtools/source/filter.vcl/wmf/wmfwr.hxx b/svtools/source/filter.vcl/wmf/wmfwr.hxx
index 9fe698b22c2e..c5830b3bab8f 100644
--- a/svtools/source/filter.vcl/wmf/wmfwr.hxx
+++ b/svtools/source/filter.vcl/wmf/wmfwr.hxx
@@ -69,9 +69,9 @@ class WMFWriter
{
private:
- BOOL bStatus;
+ sal_Bool bStatus;
- ULONG nLastPercent; // Mit welcher Zahl pCallback zuletzt aufgerufen wurde.
+ sal_uLong nLastPercent; // Mit welcher Zahl pCallback zuletzt aufgerufen wurde.
FilterConfigItem* pFilterConfigItem;
com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator;
@@ -81,11 +81,11 @@ private:
StarSymbolToMSMultiFont *pConvert;
MapMode aTargetMapMode;
Size aTargetSize;
- USHORT nTargetDivisor;
+ sal_uInt16 nTargetDivisor;
- ULONG nMetafileHeaderPos;
+ sal_uLong nMetafileHeaderPos;
sal_uInt32 nMaxRecordSize; // in Worten
- ULONG nActRecordPos;
+ sal_uLong nActRecordPos;
// Aktuelle Attribute im Quell-Metafile:
Color aSrcLineColor;
@@ -96,11 +96,11 @@ private:
FontAlign eSrcTextAlign;
Font aSrcFont;
MapMode aSrcMapMode;
- BOOL bSrcIsClipping;
+ sal_Bool bSrcIsClipping;
Region aSrcClipRegion;
WMFWriterAttrStackMember * pAttrStack;
- UINT32 eSrcHorTextAlign;
+ sal_uInt32 eSrcHorTextAlign;
// Aktuelle Attribute im Ziel-Metafile:
Color aDstLineColor;
@@ -111,28 +111,28 @@ private:
FontAlign eDstTextAlign;
Font aDstFont;
- UINT32 eDstHorTextAlign;
+ sal_uInt32 eDstHorTextAlign;
- BOOL bDstIsClipping; // ???: derzeit unberuecksichtigt
+ sal_Bool bDstIsClipping; // ???: derzeit unberuecksichtigt
Region aDstClipRegion; // ???: derzeit unberuecksichtigt
- BOOL bHandleAllocated[MAXOBJECTHANDLES]; // Welche Handles vergeben sind
- USHORT nDstPenHandle,nDstFontHandle,nDstBrushHandle; // Welche Handles die jeweiligen
+ sal_Bool bHandleAllocated[MAXOBJECTHANDLES]; // Welche Handles vergeben sind
+ sal_uInt16 nDstPenHandle,nDstFontHandle,nDstBrushHandle; // Welche Handles die jeweiligen
// Selected-Objects besitzen
// 0xffff = keines:
// Damit nicht bei jeder Operation alle Attribute verglichen werden muessen:
- ULONG nNumberOfActions; // Anzahl der Actions im GDIMetafile
- ULONG nNumberOfBitmaps; // Anzahl der Bitmaps
- ULONG nWrittenActions; // Anzahl der bereits verarbeiteten Actions beim Schreiben der Orders
- ULONG nWrittenBitmaps; // Anzahl der bereits geschriebenen Bitmaps
- ULONG nActBitmapPercent; // Wieviel Prozent die naechste Bitmap schon geschrieben ist.
+ sal_uLong nNumberOfActions; // Anzahl der Actions im GDIMetafile
+ sal_uLong nNumberOfBitmaps; // Anzahl der Bitmaps
+ sal_uLong nWrittenActions; // Anzahl der bereits verarbeiteten Actions beim Schreiben der Orders
+ sal_uLong nWrittenBitmaps; // Anzahl der bereits geschriebenen Bitmaps
+ sal_uLong nActBitmapPercent; // Wieviel Prozent die naechste Bitmap schon geschrieben ist.
- BOOL bEmbedEMF; // optionally embedd EMF data into WMF
+ sal_Bool bEmbedEMF; // optionally embedd EMF data into WMF
void MayCallback();
// Berechnet anhand der obigen 5 Parameter eine Prozentzahl
- // und macht dann ggf. einen Callback. Setzt bStatus auf FALSE wenn User abbrechen
+ // und macht dann ggf. einen Callback. Setzt bStatus auf sal_False wenn User abbrechen
// moechte.
void CountActionsAndBitmaps(const GDIMetaFile & rMTF);
@@ -154,14 +154,14 @@ private:
void UpdateRecordHeader();
// berichtig die Groesse des Records nach dem Schreiben der Parameter, wenn
// nSizeWords bei Aufruf von WriteRecordHeader(..) unbekannt war.
- // fuegt ggf. noch ein BYTE 0 ein damit Anzahl Bytes immer gerade.
+ // fuegt ggf. noch ein sal_uInt8 0 ein damit Anzahl Bytes immer gerade.
void WMFRecord_Arc(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt);
void WMFRecord_Chord(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt);
void WMFRecord_CreateBrushIndirect(const Color& rColor);
void WMFRecord_CreateFontIndirect(const Font & rFont);
void WMFRecord_CreatePenIndirect(const Color& rColor, const LineInfo& rLineInfo );
- void WMFRecord_DeleteObject(USHORT nObjectHandle);
+ void WMFRecord_DeleteObject(sal_uInt16 nObjectHandle);
void WMFRecord_Ellipse(const Rectangle & rRect);
void WMFRecord_Escape( sal_uInt32 nEsc, sal_uInt32 nLen, const sal_Int8* pData );
sal_Bool WMFRecord_Escape_Unicode( const Point& rPoint, const String& rStr, const sal_Int32 * pDXAry );
@@ -180,13 +180,13 @@ private:
void WMFRecord_RestoreDC();
void WMFRecord_RoundRect(const Rectangle & rRect, long nHorzRound, long nVertRound);
void WMFRecord_SaveDC();
- void WMFRecord_SelectObject(USHORT nObjectHandle);
+ void WMFRecord_SelectObject(sal_uInt16 nObjectHandle);
void WMFRecord_SetBkColor(const Color & rColor);
- void WMFRecord_SetBkMode(BOOL bTransparent);
+ void WMFRecord_SetBkMode(sal_Bool bTransparent);
void WMFRecord_SetStretchBltMode();
void WMFRecord_SetPixel(const Point & rPoint, const Color & rColor);
void WMFRecord_SetROP2(RasterOp eROP);
- void WMFRecord_SetTextAlign(FontAlign eFontAlign, UINT32 eHorTextAlign);
+ void WMFRecord_SetTextAlign(FontAlign eFontAlign, sal_uInt32 eHorTextAlign);
void WMFRecord_SetTextColor(const Color & rColor);
void WMFRecord_SetWindowExt(const Size & rSize);
void WMFRecord_SetWindowOrg(const Point & rPoint);
@@ -195,8 +195,8 @@ private:
void WMFRecord_EndOfFile();
void WMFRecord_IntersectClipRect( const Rectangle& rRect);
- USHORT AllocHandle();
- void FreeHandle(USHORT nObjectHandle);
+ sal_uInt16 AllocHandle();
+ void FreeHandle(sal_uInt16 nObjectHandle);
void CreateSelectDeletePen( const Color& rColor, const LineInfo& rLineInfo );
void CreateSelectDeleteFont(const Font & rFont);
void CreateSelectDeleteBrush(const Color& rColor);
@@ -207,7 +207,7 @@ private:
void HandleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon);
void WriteRecords(const GDIMetaFile & rMTF);
- void WriteHeader(const GDIMetaFile & rMTF, BOOL bPlaceable);
+ void WriteHeader(const GDIMetaFile & rMTF, sal_Bool bPlaceable);
void UpdateHeader();
void WriteEmbeddedEMF( const GDIMetaFile& rMTF );
@@ -217,13 +217,13 @@ private:
sal_uInt32 nRecCounts,
sal_uInt16 nCheckSum );
- USHORT CalcSaveTargetMapMode(MapMode& rMapMode, const Size& rPrefSize);
+ sal_uInt16 CalcSaveTargetMapMode(MapMode& rMapMode, const Size& rPrefSize);
public:
WMFWriter() {}
- BOOL WriteWMF(const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pFilterConfigItem, BOOL bPlaceable=TRUE);
+ sal_Bool WriteWMF(const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pFilterConfigItem, sal_Bool bPlaceable=sal_True);
};
#endif
diff --git a/svtools/source/graphic/descriptor.cxx b/svtools/source/graphic/descriptor.cxx
index 5db73e6cc2f3..6c808baa169d 100644
--- a/svtools/source/graphic/descriptor.cxx
+++ b/svtools/source/graphic/descriptor.cxx
@@ -457,7 +457,7 @@ void GraphicDescriptor::_getPropertyValues( const comphelper::PropertyMapEntry**
case( UNOGRAPHIC_BITSPERPIXEL ):
{
- USHORT nBitsPerPixel = 0;
+ sal_uInt16 nBitsPerPixel = 0;
if( mpGraphic )
{
diff --git a/svtools/source/graphic/descriptor.hxx b/svtools/source/graphic/descriptor.hxx
index bed7c64c0411..2a8c06723eb6 100644
--- a/svtools/source/graphic/descriptor.hxx
+++ b/svtools/source/graphic/descriptor.hxx
@@ -123,7 +123,7 @@ private:
::rtl::OUString maMimeType;
Size maSizePixel;
Size maSize100thMM;
- USHORT mnBitsPerPixel;
+ sal_uInt16 mnBitsPerPixel;
bool mbTransparent;
bool mbAlpha;
bool mbAnimated;
diff --git a/svtools/source/graphic/grfattr.cxx b/svtools/source/graphic/grfattr.cxx
index 757be42a104c..68c0ea9ae4a7 100644
--- a/svtools/source/graphic/grfattr.cxx
+++ b/svtools/source/graphic/grfattr.cxx
@@ -48,7 +48,7 @@ GraphicAttr::GraphicAttr() :
mnRPercent ( 0 ),
mnGPercent ( 0 ),
mnBPercent ( 0 ),
- mbInvert ( FALSE ),
+ mbInvert ( sal_False ),
mcTransparency ( 0 ),
meDrawMode ( GRAPHICDRAWMODE_STANDARD )
{
@@ -62,7 +62,7 @@ GraphicAttr::~GraphicAttr()
// ------------------------------------------------------------------------
-BOOL GraphicAttr::operator==( const GraphicAttr& rAttr ) const
+sal_Bool GraphicAttr::operator==( const GraphicAttr& rAttr ) const
{
return( ( mfGamma == rAttr.mfGamma ) &&
( mnMirrFlags == rAttr.mnMirrFlags ) &&
@@ -87,7 +87,7 @@ SvStream& operator>>( SvStream& rIStm, GraphicAttr& rAttr )
{
VersionCompat aCompat( rIStm, STREAM_READ );
sal_uInt32 nTmp32;
- UINT16 nTmp16;
+ sal_uInt16 nTmp16;
rIStm >> nTmp32 >> nTmp32 >> rAttr.mfGamma >> rAttr.mnMirrFlags >> rAttr.mnRotate10;
rIStm >> rAttr.mnContPercent >> rAttr.mnLumPercent >> rAttr.mnRPercent >> rAttr.mnGPercent >> rAttr.mnBPercent;
@@ -111,7 +111,7 @@ SvStream& operator<<( SvStream& rOStm, const GraphicAttr& rAttr )
rOStm << nTmp32 << nTmp32 << rAttr.mfGamma << rAttr.mnMirrFlags << rAttr.mnRotate10;
rOStm << rAttr.mnContPercent << rAttr.mnLumPercent << rAttr.mnRPercent << rAttr.mnGPercent << rAttr.mnBPercent;
- rOStm << rAttr.mbInvert << rAttr.mcTransparency << (UINT16) rAttr.meDrawMode;
+ rOStm << rAttr.mbInvert << rAttr.mcTransparency << (sal_uInt16) rAttr.meDrawMode;
rOStm << rAttr.mnLeftCrop << rAttr.mnTopCrop << rAttr.mnRightCrop << rAttr.mnBottomCrop;
return rOStm;
diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx
index 41240c95d113..cd8125a6cc79 100644
--- a/svtools/source/graphic/grfcache.cxx
+++ b/svtools/source/graphic/grfcache.cxx
@@ -70,14 +70,14 @@ public:
GraphicID( const GraphicObject& rObj );
~GraphicID() {}
- BOOL operator==( const GraphicID& rID ) const
+ sal_Bool operator==( const GraphicID& rID ) const
{
return( rID.mnID1 == mnID1 && rID.mnID2 == mnID2 &&
rID.mnID3 == mnID3 && rID.mnID4 == mnID4 );
}
ByteString GetIDString() const;
- BOOL IsEmpty() const { return( 0 == mnID4 ); }
+ sal_Bool IsEmpty() const { return( 0 == mnID4 ); }
};
// -----------------------------------------------------------------------------
@@ -86,7 +86,7 @@ GraphicID::GraphicID( const GraphicObject& rObj )
{
const Graphic& rGraphic = rObj.GetGraphic();
- mnID1 = ( (ULONG) rGraphic.GetType() ) << 28;
+ mnID1 = ( (sal_uLong) rGraphic.GetType() ) << 28;
switch( rGraphic.GetType() )
{
@@ -105,7 +105,7 @@ GraphicID::GraphicID( const GraphicObject& rObj )
{
const BitmapEx aBmpEx( rGraphic.GetBitmapEx() );
- mnID1 |= ( ( ( (ULONG) aBmpEx.GetTransparentType() << 8 ) | ( aBmpEx.IsAlpha() ? 1 : 0 ) ) & 0x0fffffff );
+ mnID1 |= ( ( ( (sal_uLong) aBmpEx.GetTransparentType() << 8 ) | ( aBmpEx.IsAlpha() ? 1 : 0 ) ) & 0x0fffffff );
mnID2 = aBmpEx.GetSizePixel().Width();
mnID3 = aBmpEx.GetSizePixel().Height();
mnID4 = rGraphic.GetChecksum();
@@ -167,10 +167,10 @@ private:
BitmapEx* mpBmpEx;
GDIMetaFile* mpMtf;
Animation* mpAnimation;
- BOOL mbSwappedAll;
+ sal_Bool mbSwappedAll;
- BOOL ImplInit( const GraphicObject& rObj );
- BOOL ImplMatches( const GraphicObject& rObj ) const { return( GraphicID( rObj ) == maID ); }
+ sal_Bool ImplInit( const GraphicObject& rObj );
+ sal_Bool ImplMatches( const GraphicObject& rObj ) const { return( GraphicID( rObj ) == maID ); }
void ImplFillSubstitute( Graphic& rSubstitute );
public:
@@ -181,13 +181,13 @@ public:
const GraphicID& GetID() const { return maID; }
void AddGraphicObjectReference( const GraphicObject& rObj, Graphic& rSubstitute );
- BOOL ReleaseGraphicObjectReference( const GraphicObject& rObj );
- ULONG GetGraphicObjectReferenceCount() { return maGraphicObjectList.Count(); }
- BOOL HasGraphicObjectReference( const GraphicObject& rObj );
+ sal_Bool ReleaseGraphicObjectReference( const GraphicObject& rObj );
+ sal_uLong GetGraphicObjectReferenceCount() { return maGraphicObjectList.Count(); }
+ sal_Bool HasGraphicObjectReference( const GraphicObject& rObj );
void TryToSwapIn();
void GraphicObjectWasSwappedOut( const GraphicObject& rObj );
- BOOL FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute );
+ sal_Bool FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute );
void GraphicObjectWasSwappedIn( const GraphicObject& rObj );
};
@@ -216,9 +216,9 @@ GraphicCacheEntry::~GraphicCacheEntry()
// -----------------------------------------------------------------------------
-BOOL GraphicCacheEntry::ImplInit( const GraphicObject& rObj )
+sal_Bool GraphicCacheEntry::ImplInit( const GraphicObject& rObj )
{
- BOOL bRet;
+ sal_Bool bRet;
if( !rObj.IsSwappedOut() )
{
@@ -260,10 +260,10 @@ BOOL GraphicCacheEntry::ImplInit( const GraphicObject& rObj )
else
maGfxLink = GfxLink();
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
@@ -277,9 +277,9 @@ void GraphicCacheEntry::ImplFillSubstitute( Graphic& rSubstitute )
const MapMode aPrefMapMode( rSubstitute.GetPrefMapMode() );
const Link aAnimationNotifyHdl( rSubstitute.GetAnimationNotifyHdl() );
const String aDocFileName( rSubstitute.GetDocFileName() );
- const ULONG nDocFilePos = rSubstitute.GetDocFilePos();
+ const sal_uLong nDocFilePos = rSubstitute.GetDocFilePos();
const GraphicType eOldType = rSubstitute.GetType();
- const BOOL bDefaultType = ( rSubstitute.GetType() == GRAPHIC_DEFAULT );
+ const sal_Bool bDefaultType = ( rSubstitute.GetType() == GRAPHIC_DEFAULT );
if( rSubstitute.IsLink() && ( GFX_LINK_TYPE_NONE == maGfxLink.GetType() ) )
maGfxLink = rSubstitute.GetLink();
@@ -321,16 +321,16 @@ void GraphicCacheEntry::AddGraphicObjectReference( const GraphicObject& rObj, Gr
// -----------------------------------------------------------------------------
-BOOL GraphicCacheEntry::ReleaseGraphicObjectReference( const GraphicObject& rObj )
+sal_Bool GraphicCacheEntry::ReleaseGraphicObjectReference( const GraphicObject& rObj )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
for( void* pObj = maGraphicObjectList.First(); !bRet && pObj; pObj = maGraphicObjectList.Next() )
{
if( &rObj == (GraphicObject*) pObj )
{
maGraphicObjectList.Remove( pObj );
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -339,13 +339,13 @@ BOOL GraphicCacheEntry::ReleaseGraphicObjectReference( const GraphicObject& rObj
// -----------------------------------------------------------------------------
-BOOL GraphicCacheEntry::HasGraphicObjectReference( const GraphicObject& rObj )
+sal_Bool GraphicCacheEntry::HasGraphicObjectReference( const GraphicObject& rObj )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
for( void* pObj = maGraphicObjectList.First(); !bRet && pObj; pObj = maGraphicObjectList.Next() )
if( &rObj == (GraphicObject*) pObj )
- bRet = TRUE;
+ bRet = sal_True;
return bRet;
}
@@ -362,11 +362,11 @@ void GraphicCacheEntry::TryToSwapIn()
void GraphicCacheEntry::GraphicObjectWasSwappedOut( const GraphicObject& /*rObj*/ )
{
- mbSwappedAll = TRUE;
+ mbSwappedAll = sal_True;
for( void* pObj = maGraphicObjectList.First(); mbSwappedAll && pObj; pObj = maGraphicObjectList.Next() )
if( !( (GraphicObject*) pObj )->IsSwappedOut() )
- mbSwappedAll = FALSE;
+ mbSwappedAll = sal_False;
if( mbSwappedAll )
{
@@ -378,17 +378,17 @@ void GraphicCacheEntry::GraphicObjectWasSwappedOut( const GraphicObject& /*rObj*
// -----------------------------------------------------------------------------
-BOOL GraphicCacheEntry::FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute )
+sal_Bool GraphicCacheEntry::FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute )
{
- BOOL bRet;
+ sal_Bool bRet;
if( !mbSwappedAll && rObj.IsSwappedOut() )
{
ImplFillSubstitute( rSubstitute );
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
@@ -415,13 +415,13 @@ private:
BitmapEx* mpBmpEx;
GraphicAttr maAttr;
Size maOutSizePix;
- ULONG mnCacheSize;
- ULONG mnOutDevDrawMode;
- USHORT mnOutDevBitCount;
+ sal_uLong mnCacheSize;
+ sal_uLong mnOutDevDrawMode;
+ sal_uInt16 mnOutDevBitCount;
public:
- static ULONG GetNeededSize( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+ static sal_uLong GetNeededSize( OutputDevice* pOut, const Point& rPt, const Size& rSz,
const GraphicObject& rObj, const GraphicAttr& rAttr );
public:
@@ -457,15 +457,15 @@ public:
const GraphicAttr& GetAttr() const { return maAttr; }
const Size& GetOutputSizePixel() const { return maOutSizePix; }
- ULONG GetCacheSize() const { return mnCacheSize; }
+ sal_uLong GetCacheSize() const { return mnCacheSize; }
const GraphicCacheEntry* GetReferencedCacheEntry() const { return mpRefCacheEntry; }
- ULONG GetOutDevDrawMode() const { return mnOutDevDrawMode; }
- USHORT GetOutDevBitCount() const { return mnOutDevBitCount; }
+ sal_uLong GetOutDevDrawMode() const { return mnOutDevDrawMode; }
+ sal_uInt16 GetOutDevBitCount() const { return mnOutDevBitCount; }
void SetReleaseTime( const ::vos::TTimeValue& rReleaseTime ) { maReleaseTime = rReleaseTime; }
const ::vos::TTimeValue& GetReleaseTime() const { return maReleaseTime; }
- BOOL Matches( OutputDevice* pOut, const Point& /*rPtPixel*/, const Size& rSzPixel,
+ sal_Bool Matches( OutputDevice* pOut, const Point& /*rPtPixel*/, const Size& rSzPixel,
const GraphicCacheEntry* pCacheEntry, const GraphicAttr& rAttr ) const
{
// #i46805# Additional match
@@ -486,12 +486,12 @@ public:
// -----------------------------------------------------------------------------
-ULONG GraphicDisplayCacheEntry::GetNeededSize( OutputDevice* pOut, const Point& /*rPt*/, const Size& rSz,
+sal_uLong GraphicDisplayCacheEntry::GetNeededSize( OutputDevice* pOut, const Point& /*rPt*/, const Size& rSz,
const GraphicObject& rObj, const GraphicAttr& rAttr )
{
const Graphic& rGraphic = rObj.GetGraphic();
const GraphicType eType = rGraphic.GetType();
- ULONG nNeededSize;
+ sal_uLong nNeededSize;
if( GRAPHIC_BITMAP == eType )
{
@@ -560,7 +560,7 @@ void GraphicDisplayCacheEntry::Draw( OutputDevice* pOut, const Point& rPt, const
// - GraphicCache -
// -----------------------
-GraphicCache::GraphicCache( GraphicManager& rMgr, ULONG nDisplayCacheSize, ULONG nMaxObjDisplayCacheSize ) :
+GraphicCache::GraphicCache( GraphicManager& rMgr, sal_uLong nDisplayCacheSize, sal_uLong nMaxObjDisplayCacheSize ) :
mrMgr ( rMgr ),
mnReleaseTimeoutSeconds ( 0UL ),
mnMaxDisplaySize ( nDisplayCacheSize ),
@@ -585,7 +585,7 @@ GraphicCache::~GraphicCache()
void GraphicCache::AddGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute,
const ByteString* pID, const GraphicObject* pCopyObj )
{
- BOOL bInserted = FALSE;
+ sal_Bool bInserted = sal_False;
if( !rObj.IsSwappedOut() &&
( pID || ( pCopyObj && ( pCopyObj->GetType() != GRAPHIC_NONE ) ) || ( rObj.GetType() != GRAPHIC_NONE ) ) )
@@ -599,7 +599,7 @@ void GraphicCache::AddGraphicObject( const GraphicObject& rObj, Graphic& rSubsti
if( pEntry->HasGraphicObjectReference( *pCopyObj ) )
{
pEntry->AddGraphicObjectReference( rObj, rSubstitute );
- bInserted = TRUE;
+ bInserted = sal_True;
}
else
{
@@ -640,14 +640,14 @@ void GraphicCache::AddGraphicObject( const GraphicObject& rObj, Graphic& rSubsti
if( rID.GetIDString() == *pID )
{
pEntry->AddGraphicObjectReference( rObj, rSubstitute );
- bInserted = TRUE;
+ bInserted = sal_True;
}
}
if( !bInserted )
{
maGraphicCache.Insert( new GraphicCacheEntry( rObj ), LIST_APPEND );
- bInserted = TRUE;
+ bInserted = sal_True;
}
}
}
@@ -656,7 +656,7 @@ void GraphicCache::AddGraphicObject( const GraphicObject& rObj, Graphic& rSubsti
if( rEntryID == *apID )
{
pEntry->AddGraphicObjectReference( rObj, rSubstitute );
- bInserted = TRUE;
+ bInserted = sal_True;
}
}
@@ -676,7 +676,7 @@ void GraphicCache::ReleaseGraphicObject( const GraphicObject& rObj )
{
// Release cached object
GraphicCacheEntry* pEntry = (GraphicCacheEntry*) maGraphicCache.First();
- BOOL bRemoved = FALSE;
+ sal_Bool bRemoved = sal_False;
while( !bRemoved && pEntry )
{
@@ -729,12 +729,12 @@ void GraphicCache::GraphicObjectWasSwappedOut( const GraphicObject& rObj )
// -----------------------------------------------------------------------------
-BOOL GraphicCache::FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute )
+sal_Bool GraphicCache::FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute )
{
GraphicCacheEntry* pEntry = ImplGetCacheEntry( rObj );
if( !pEntry )
- return FALSE;
+ return sal_False;
return pEntry->FillSwappedGraphicObject( rObj, rSubstitute );
}
@@ -759,7 +759,7 @@ void GraphicCache::GraphicObjectWasSwappedIn( const GraphicObject& rObj )
// -----------------------------------------------------------------------------
-void GraphicCache::SetMaxDisplayCacheSize( ULONG nNewCacheSize )
+void GraphicCache::SetMaxDisplayCacheSize( sal_uLong nNewCacheSize )
{
mnMaxDisplaySize = nNewCacheSize;
@@ -769,9 +769,9 @@ void GraphicCache::SetMaxDisplayCacheSize( ULONG nNewCacheSize )
// -----------------------------------------------------------------------------
-void GraphicCache::SetMaxObjDisplayCacheSize( ULONG nNewMaxObjSize, BOOL bDestroyGreaterCached )
+void GraphicCache::SetMaxObjDisplayCacheSize( sal_uLong nNewMaxObjSize, sal_Bool bDestroyGreaterCached )
{
- const BOOL bDestroy = ( bDestroyGreaterCached && ( nNewMaxObjSize < mnMaxObjDisplaySize ) );
+ const sal_Bool bDestroy = ( bDestroyGreaterCached && ( nNewMaxObjSize < mnMaxObjDisplaySize ) );
mnMaxObjDisplaySize = Min( nNewMaxObjSize, mnMaxDisplaySize );
@@ -796,7 +796,7 @@ void GraphicCache::SetMaxObjDisplayCacheSize( ULONG nNewMaxObjSize, BOOL bDestro
// -----------------------------------------------------------------------------
-void GraphicCache::SetCacheTimeout( ULONG nTimeoutSeconds )
+void GraphicCache::SetCacheTimeout( sal_uLong nTimeoutSeconds )
{
if( mnReleaseTimeoutSeconds != nTimeoutSeconds )
{
@@ -830,7 +830,7 @@ void GraphicCache::ClearDisplayCache()
// -----------------------------------------------------------------------------
-BOOL GraphicCache::IsDisplayCacheable( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+sal_Bool GraphicCache::IsDisplayCacheable( OutputDevice* pOut, const Point& rPt, const Size& rSz,
const GraphicObject& rObj, const GraphicAttr& rAttr ) const
{
return( GraphicDisplayCacheEntry::GetNeededSize( pOut, rPt, rSz, rObj, rAttr ) <=
@@ -839,20 +839,20 @@ BOOL GraphicCache::IsDisplayCacheable( OutputDevice* pOut, const Point& rPt, con
// -----------------------------------------------------------------------------
-BOOL GraphicCache::IsInDisplayCache( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+sal_Bool GraphicCache::IsInDisplayCache( OutputDevice* pOut, const Point& rPt, const Size& rSz,
const GraphicObject& rObj, const GraphicAttr& rAttr ) const
{
const Point aPtPixel( pOut->LogicToPixel( rPt ) );
const Size aSzPixel( pOut->LogicToPixel( rSz ) );
const GraphicCacheEntry* pCacheEntry = ( (GraphicCache*) this )->ImplGetCacheEntry( rObj );
//GraphicDisplayCacheEntry* pDisplayEntry = (GraphicDisplayCacheEntry*) ( (GraphicCache*) this )->maDisplayCache.First(); // -Wall removed ....
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
if( pCacheEntry )
{
for( long i = 0, nCount = maDisplayCache.Count(); !bFound && ( i < nCount ); i++ )
if( ( (GraphicDisplayCacheEntry*) maDisplayCache.GetObject( i ) )->Matches( pOut, aPtPixel, aSzPixel, pCacheEntry, rAttr ) )
- bFound = TRUE;
+ bFound = sal_True;
}
return bFound;
@@ -880,12 +880,12 @@ ByteString GraphicCache::GetUniqueID( const GraphicObject& rObj ) const
// -----------------------------------------------------------------------------
-BOOL GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+sal_Bool GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
const GraphicObject& rObj, const GraphicAttr& rAttr,
const BitmapEx& rBmpEx )
{
- const ULONG nNeededSize = GraphicDisplayCacheEntry::GetNeededSize( pOut, rPt, rSz, rObj, rAttr );
- BOOL bRet = FALSE;
+ const sal_uLong nNeededSize = GraphicDisplayCacheEntry::GetNeededSize( pOut, rPt, rSz, rObj, rAttr );
+ sal_Bool bRet = sal_False;
if( nNeededSize <= GetMaxObjDisplayCacheSize() )
{
@@ -906,7 +906,7 @@ BOOL GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt,
maDisplayCache.Insert( pNewEntry, LIST_APPEND );
mnUsedDisplaySize += pNewEntry->GetCacheSize();
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -914,12 +914,12 @@ BOOL GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt,
// -----------------------------------------------------------------------------
-BOOL GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+sal_Bool GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
const GraphicObject& rObj, const GraphicAttr& rAttr,
const GDIMetaFile& rMtf )
{
- const ULONG nNeededSize = GraphicDisplayCacheEntry::GetNeededSize( pOut, rPt, rSz, rObj, rAttr );
- BOOL bRet = FALSE;
+ const sal_uLong nNeededSize = GraphicDisplayCacheEntry::GetNeededSize( pOut, rPt, rSz, rObj, rAttr );
+ sal_Bool bRet = sal_False;
if( nNeededSize <= GetMaxObjDisplayCacheSize() )
{
@@ -940,7 +940,7 @@ BOOL GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt,
maDisplayCache.Insert( pNewEntry, LIST_APPEND );
mnUsedDisplaySize += pNewEntry->GetCacheSize();
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -948,14 +948,14 @@ BOOL GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt,
// -----------------------------------------------------------------------------
-BOOL GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+sal_Bool GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
const GraphicObject& rObj, const GraphicAttr& rAttr )
{
const Point aPtPixel( pOut->LogicToPixel( rPt ) );
const Size aSzPixel( pOut->LogicToPixel( rSz ) );
const GraphicCacheEntry* pCacheEntry = ImplGetCacheEntry( rObj );
GraphicDisplayCacheEntry* pDisplayCacheEntry = (GraphicDisplayCacheEntry*) maDisplayCache.First();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
while( !bRet && pDisplayCacheEntry )
{
@@ -973,7 +973,7 @@ BOOL GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, co
}
pDisplayCacheEntry->SetReleaseTime( aReleaseTime );
- bRet = TRUE;
+ bRet = sal_True;
}
else
pDisplayCacheEntry = (GraphicDisplayCacheEntry*) maDisplayCache.Next();
@@ -987,9 +987,9 @@ BOOL GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, co
// -----------------------------------------------------------------------------
-BOOL GraphicCache::ImplFreeDisplayCacheSpace( ULONG nSizeToFree )
+sal_Bool GraphicCache::ImplFreeDisplayCacheSpace( sal_uLong nSizeToFree )
{
- ULONG nFreedSize = 0UL;
+ sal_uLong nFreedSize = 0UL;
if( nSizeToFree )
{
diff --git a/svtools/source/graphic/grfcache.hxx b/svtools/source/graphic/grfcache.hxx
index 55309a00827d..0885667aa2b7 100644
--- a/svtools/source/graphic/grfcache.hxx
+++ b/svtools/source/graphic/grfcache.hxx
@@ -47,12 +47,12 @@ private:
Timer maReleaseTimer;
List maGraphicCache;
List maDisplayCache;
- ULONG mnReleaseTimeoutSeconds;
- ULONG mnMaxDisplaySize;
- ULONG mnMaxObjDisplaySize;
- ULONG mnUsedDisplaySize;
+ sal_uLong mnReleaseTimeoutSeconds;
+ sal_uLong mnMaxDisplaySize;
+ sal_uLong mnMaxObjDisplaySize;
+ sal_uLong mnUsedDisplaySize;
- BOOL ImplFreeDisplayCacheSpace( ULONG nSizeToFree );
+ sal_Bool ImplFreeDisplayCacheSpace( sal_uLong nSizeToFree );
GraphicCacheEntry* ImplGetCacheEntry( const GraphicObject& rObj );
@@ -61,8 +61,8 @@ private:
public:
GraphicCache( GraphicManager& rMgr,
- ULONG nDisplayCacheSize = 10000000UL,
- ULONG nMaxObjDisplayCacheSize = 2400000UL );
+ sal_uLong nDisplayCacheSize = 10000000UL,
+ sal_uLong nMaxObjDisplayCacheSize = 2400000UL );
~GraphicCache();
public:
@@ -72,37 +72,37 @@ public:
void ReleaseGraphicObject( const GraphicObject& rObj );
void GraphicObjectWasSwappedOut( const GraphicObject& rObj );
- BOOL FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute );
+ sal_Bool FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute );
void GraphicObjectWasSwappedIn( const GraphicObject& rObj );
ByteString GetUniqueID( const GraphicObject& rObj ) const;
public:
- void SetMaxDisplayCacheSize( ULONG nNewCacheSize );
- ULONG GetMaxDisplayCacheSize() const { return mnMaxDisplaySize; };
+ void SetMaxDisplayCacheSize( sal_uLong nNewCacheSize );
+ sal_uLong GetMaxDisplayCacheSize() const { return mnMaxDisplaySize; };
- void SetMaxObjDisplayCacheSize( ULONG nNewMaxObjSize, BOOL bDestroyGreaterCached = FALSE );
- ULONG GetMaxObjDisplayCacheSize() const { return mnMaxObjDisplaySize; }
+ void SetMaxObjDisplayCacheSize( sal_uLong nNewMaxObjSize, sal_Bool bDestroyGreaterCached = sal_False );
+ sal_uLong GetMaxObjDisplayCacheSize() const { return mnMaxObjDisplaySize; }
- ULONG GetUsedDisplayCacheSize() const { return mnUsedDisplaySize; }
- ULONG GetFreeDisplayCacheSize() const { return( mnMaxDisplaySize - mnUsedDisplaySize ); }
+ sal_uLong GetUsedDisplayCacheSize() const { return mnUsedDisplaySize; }
+ sal_uLong GetFreeDisplayCacheSize() const { return( mnMaxDisplaySize - mnUsedDisplaySize ); }
- void SetCacheTimeout( ULONG nTimeoutSeconds );
- ULONG GetCacheTimeout() const { return mnReleaseTimeoutSeconds; }
+ void SetCacheTimeout( sal_uLong nTimeoutSeconds );
+ sal_uLong GetCacheTimeout() const { return mnReleaseTimeoutSeconds; }
void ClearDisplayCache();
- BOOL IsDisplayCacheable( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+ sal_Bool IsDisplayCacheable( OutputDevice* pOut, const Point& rPt, const Size& rSz,
const GraphicObject& rObj, const GraphicAttr& rAttr ) const;
- BOOL IsInDisplayCache( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+ sal_Bool IsInDisplayCache( OutputDevice* pOut, const Point& rPt, const Size& rSz,
const GraphicObject& rObj, const GraphicAttr& rAttr ) const;
- BOOL CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+ sal_Bool CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
const GraphicObject& rObj, const GraphicAttr& rAttr,
const BitmapEx& rBmpEx );
- BOOL CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+ sal_Bool CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
const GraphicObject& rObj, const GraphicAttr& rAttr,
const GDIMetaFile& rMtf );
- BOOL DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+ sal_Bool DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
const GraphicObject& rObj, const GraphicAttr& rAttr );
};
diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index 221354cc6665..77a582e5ae20 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -174,9 +174,9 @@ void GraphicObject::ImplConstruct()
mpSwapOutTimer = NULL;
mpSimpleCache = NULL;
mnAnimationLoopCount = 0;
- mbAutoSwapped = FALSE;
- mbIsInSwapIn = FALSE;
- mbIsInSwapOut = FALSE;
+ mbAutoSwapped = sal_False;
+ mbIsInSwapIn = sal_False;
+ mbIsInSwapOut = sal_False;
}
// -----------------------------------------------------------------------------
@@ -198,7 +198,7 @@ void GraphicObject::ImplAssignGraphicData()
mbEPS = ( rMtf.GetActionCount() >= 1 ) && ( META_EPS_ACTION == rMtf.GetAction( 0 )->GetType() );
}
else
- mbEPS = FALSE;
+ mbEPS = sal_False;
}
// -----------------------------------------------------------------------------
@@ -247,13 +247,13 @@ void GraphicObject::ImplAutoSwapIn()
if( IsSwappedOut() )
{
if( mpMgr && mpMgr->ImplFillSwappedGraphicObject( *this, maGraphic ) )
- mbAutoSwapped = FALSE;
+ mbAutoSwapped = sal_False;
else
{
- mbIsInSwapIn = TRUE;
+ mbIsInSwapIn = sal_True;
if( maGraphic.SwapIn() )
- mbAutoSwapped = FALSE;
+ mbAutoSwapped = sal_False;
else
{
SvStream* pStream = GetSwapStream();
@@ -296,7 +296,7 @@ void GraphicObject::ImplAutoSwapIn()
}
}
- mbIsInSwapIn = FALSE;
+ mbIsInSwapIn = sal_False;
if( !mbAutoSwapped && mpMgr )
mpMgr->ImplGraphicObjectWasSwappedIn( *this );
@@ -305,15 +305,15 @@ void GraphicObject::ImplAutoSwapIn()
}
// -----------------------------------------------------------------------------
-BOOL GraphicObject::ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& rSz, const GraphicAttr* pAttr,
- PolyPolygon& rClipPolyPoly, BOOL& bRectClipRegion ) const
+sal_Bool GraphicObject::ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& rSz, const GraphicAttr* pAttr,
+ PolyPolygon& rClipPolyPoly, sal_Bool& bRectClipRegion ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( GetType() != GRAPHIC_NONE )
{
Polygon aClipPoly( Rectangle( rPt, rSz ) );
- const USHORT nRot10 = pAttr->GetRotation() % 3600;
+ const sal_uInt16 nRot10 = pAttr->GetRotation() % 3600;
const Point aOldOrigin( rPt );
// --> OD 2005-09-30 #i54875# - It's not needed to get the graphic again.
// const Graphic& rGraphic = GetGraphic();
@@ -327,10 +327,10 @@ BOOL GraphicObject::ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& rSz
if( nRot10 )
{
aClipPoly.Rotate( rPt, nRot10 );
- bRectClipRegion = FALSE;
+ bRectClipRegion = sal_False;
}
else
- bRectClipRegion = TRUE;
+ bRectClipRegion = sal_True;
rClipPolyPoly = aClipPoly;
@@ -379,7 +379,7 @@ BOOL GraphicObject::ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& rSz
rPt = aOriginPoly[ 0 ];
}
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -404,7 +404,7 @@ GraphicObject& GraphicObject::operator=( const GraphicObject& rGraphicObj )
mpLink = rGraphicObj.mpLink ? new String( *rGraphicObj.mpLink ) : NULL;
mpUserData = rGraphicObj.mpUserData ? new String( *rGraphicObj.mpUserData ) : NULL;
ImplAssignGraphicData();
- mbAutoSwapped = FALSE;
+ mbAutoSwapped = sal_False;
mpMgr = rGraphicObj.mpMgr;
mpMgr->ImplRegisterObj( *this, maGraphic, NULL, &rGraphicObj );
@@ -415,7 +415,7 @@ GraphicObject& GraphicObject::operator=( const GraphicObject& rGraphicObj )
// -----------------------------------------------------------------------------
-BOOL GraphicObject::operator==( const GraphicObject& rGraphicObj ) const
+sal_Bool GraphicObject::operator==( const GraphicObject& rGraphicObj ) const
{
return( ( rGraphicObj.maGraphic == maGraphic ) &&
( rGraphicObj.maAttr == maAttr ) &&
@@ -460,7 +460,7 @@ ByteString GraphicObject::GetUniqueID() const
// -----------------------------------------------------------------------------
-ULONG GraphicObject::GetChecksum() const
+sal_uLong GraphicObject::GetChecksum() const
{
return( ( maGraphic.IsSupportedGraphic() && !maGraphic.IsSwapOut() ) ? maGraphic.GetChecksum() : 0 );
}
@@ -475,7 +475,7 @@ SvStream* GraphicObject::GetSwapStream() const
// -----------------------------------------------------------------------------
// !!! to be removed
-ULONG GraphicObject::GetReleaseFromCache() const
+sal_uLong GraphicObject::GetReleaseFromCache() const
{
return 0;
}
@@ -553,7 +553,7 @@ void GraphicObject::SetSwapStreamHdl()
// -----------------------------------------------------------------------------
-void GraphicObject::SetSwapStreamHdl( const Link& rHdl, const ULONG nSwapOutTimeout )
+void GraphicObject::SetSwapStreamHdl( const Link& rHdl, const sal_uLong nSwapOutTimeout )
{
delete mpSwapStreamHdl, mpSwapStreamHdl = new Link( rHdl );
@@ -614,10 +614,10 @@ void GraphicObject::SetGraphicManager( const GraphicManager& rMgr )
// -----------------------------------------------------------------------------
-BOOL GraphicObject::IsCached( OutputDevice* pOut, const Point& rPt, const Size& rSz,
- const GraphicAttr* pAttr, ULONG nFlags ) const
+sal_Bool GraphicObject::IsCached( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+ const GraphicAttr* pAttr, sal_uLong nFlags ) const
{
- BOOL bRet;
+ sal_Bool bRet;
if( nFlags & GRFMGR_DRAW_CACHED )
{
@@ -630,13 +630,13 @@ BOOL GraphicObject::IsCached( OutputDevice* pOut, const Point& rPt, const Size&
if ( pAttr->IsCropped() )
{
PolyPolygon aClipPolyPoly;
- BOOL bRectClip;
+ sal_Bool bRectClip;
ImplGetCropParams( pOut, aPt, aSz, pAttr, aClipPolyPoly, bRectClip );
}
bRet = mpMgr->IsInCache( pOut, aPt, aSz, *this, ( pAttr ? *pAttr : GetAttr() ) );
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
@@ -665,16 +665,16 @@ List* GraphicObject::GetAnimationInfoList() const
// -----------------------------------------------------------------------------
-BOOL GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
- const GraphicAttr* pAttr, ULONG nFlags )
+sal_Bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+ const GraphicAttr* pAttr, sal_uLong nFlags )
{
GraphicAttr aAttr( pAttr ? *pAttr : GetAttr() );
Point aPt( rPt );
Size aSz( rSz );
const sal_uInt32 nOldDrawMode = pOut->GetDrawMode();
- BOOL bCropped = aAttr.IsCropped();
- BOOL bCached = FALSE;
- BOOL bRet;
+ sal_Bool bCropped = aAttr.IsCropped();
+ sal_Bool bCached = sal_False;
+ sal_Bool bRet;
// #i29534# Provide output rects for PDF writer
Rectangle aCropRect;
@@ -701,8 +701,8 @@ BOOL GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
if( bCropped )
{
PolyPolygon aClipPolyPoly;
- BOOL bRectClip;
- const BOOL bCrop = ImplGetCropParams( pOut, aPt, aSz, &aAttr, aClipPolyPoly, bRectClip );
+ sal_Bool bRectClip;
+ const sal_Bool bCrop = ImplGetCropParams( pOut, aPt, aSz, &aAttr, aClipPolyPoly, bRectClip );
pOut->Push( PUSH_CLIPREGION );
@@ -743,10 +743,10 @@ BOOL GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
}
// --> OD 2010-01-04 #i105243#
-BOOL GraphicObject::DrawWithPDFHandling( OutputDevice& rOutDev,
+sal_Bool GraphicObject::DrawWithPDFHandling( OutputDevice& rOutDev,
const Point& rPt, const Size& rSz,
const GraphicAttr* pGrfAttr,
- const ULONG nFlags )
+ const sal_uLong nFlags )
{
const GraphicAttr aGrfAttr( pGrfAttr ? *pGrfAttr : GetAttr() );
@@ -773,8 +773,8 @@ BOOL GraphicObject::DrawWithPDFHandling( OutputDevice& rOutDev,
if( aGrfAttr.IsCropped() )
{
PolyPolygon aClipPolyPoly;
- BOOL bRectClip;
- const BOOL bCrop = ImplGetCropParams( &rOutDev,
+ sal_Bool bRectClip;
+ const sal_Bool bCrop = ImplGetCropParams( &rOutDev,
aPt, aSz,
&aGrfAttr,
aClipPolyPoly,
@@ -789,7 +789,7 @@ BOOL GraphicObject::DrawWithPDFHandling( OutputDevice& rOutDev,
}
}
- BOOL bRet = Draw( &rOutDev, rPt, rSz, &aGrfAttr, nFlags );
+ sal_Bool bRet = Draw( &rOutDev, rPt, rSz, &aGrfAttr, nFlags );
// Notify PDF writer about linked graphic (if any)
if( bWritingPdfLinkedGraphic )
@@ -806,11 +806,11 @@ BOOL GraphicObject::DrawWithPDFHandling( OutputDevice& rOutDev,
// -----------------------------------------------------------------------------
-BOOL GraphicObject::DrawTiled( OutputDevice* pOut, const Rectangle& rArea, const Size& rSize,
- const Size& rOffset, const GraphicAttr* pAttr, ULONG nFlags, int nTileCacheSize1D )
+sal_Bool GraphicObject::DrawTiled( OutputDevice* pOut, const Rectangle& rArea, const Size& rSize,
+ const Size& rOffset, const GraphicAttr* pAttr, sal_uLong nFlags, int nTileCacheSize1D )
{
if( pOut == NULL || rSize.Width() == 0 || rSize.Height() == 0 )
- return FALSE;
+ return sal_False;
const MapMode aOutMapMode( pOut->GetMapMode() );
const MapMode aMapMode( aOutMapMode.GetMapUnit(), Point(), aOutMapMode.GetScaleX(), aOutMapMode.GetScaleY() );
@@ -830,11 +830,11 @@ BOOL GraphicObject::DrawTiled( OutputDevice* pOut, const Rectangle& rArea, const
// -----------------------------------------------------------------------------
-BOOL GraphicObject::StartAnimation( OutputDevice* pOut, const Point& rPt, const Size& rSz,
- long nExtraData, const GraphicAttr* pAttr, ULONG /*nFlags*/,
+sal_Bool GraphicObject::StartAnimation( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+ long nExtraData, const GraphicAttr* pAttr, sal_uLong /*nFlags*/,
OutputDevice* pFirstFrameOutDev )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
GetGraphic();
@@ -846,13 +846,13 @@ BOOL GraphicObject::StartAnimation( OutputDevice* pOut, const Point& rPt, const
{
Point aPt( rPt );
Size aSz( rSz );
- BOOL bCropped = aAttr.IsCropped();
+ sal_Bool bCropped = aAttr.IsCropped();
if( bCropped )
{
PolyPolygon aClipPolyPoly;
- BOOL bRectClip;
- const BOOL bCrop = ImplGetCropParams( pOut, aPt, aSz, &aAttr, aClipPolyPoly, bRectClip );
+ sal_Bool bRectClip;
+ const sal_Bool bCrop = ImplGetCropParams( pOut, aPt, aSz, &aAttr, aClipPolyPoly, bRectClip );
pOut->Push( PUSH_CLIPREGION );
@@ -879,7 +879,7 @@ BOOL GraphicObject::StartAnimation( OutputDevice* pOut, const Point& rPt, const
if( bCropped )
pOut->Pop();
- bRet = TRUE;
+ bRet = sal_True;
}
else
bRet = Draw( pOut, rPt, rSz, &aAttr, GRFMGR_DRAW_STANDARD );
@@ -916,7 +916,7 @@ void GraphicObject::SetGraphic( const Graphic& rGraphic, const GraphicObject* pC
mpSwapOutTimer->Stop();
maGraphic = rGraphic;
- mbAutoSwapped = FALSE;
+ mbAutoSwapped = sal_False;
ImplAssignGraphicData();
delete mpLink, mpLink = NULL;
delete mpSimpleCache, mpSimpleCache = NULL;
@@ -1042,7 +1042,7 @@ Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMo
// #105641# Also crop animations
if( aTransGraphic.IsAnimated() )
{
- USHORT nFrame;
+ sal_uInt16 nFrame;
Animation aAnim( aTransGraphic.GetAnimation() );
for( nFrame=0; nFrame<aAnim.Count(); ++nFrame )
@@ -1059,7 +1059,7 @@ Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMo
// cropping affects this frame, apply it then
// do _not_ apply enlargement, this is done below
ImplTransformBitmap( aAnimBmp.aBmpEx, rAttr, Size(), Size(),
- aCropRectRel, rDestSize, FALSE );
+ aCropRectRel, rDestSize, sal_False );
aAnim.Replace( aAnimBmp, nFrame );
}
@@ -1106,7 +1106,7 @@ Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMo
BitmapEx aBmpEx( aTransGraphic.GetBitmapEx() );
ImplTransformBitmap( aBmpEx, rAttr, aCropLeftTop, aCropRightBottom,
- aCropRect, rDestSize, TRUE );
+ aCropRect, rDestSize, sal_True );
aTransGraphic = aBmpEx;
}
@@ -1188,9 +1188,9 @@ void GraphicObject::ResetAnimationLoopCount()
// -----------------------------------------------------------------------------
-BOOL GraphicObject::SwapOut()
+sal_Bool GraphicObject::SwapOut()
{
- BOOL bRet = ( !mbAutoSwapped ? maGraphic.SwapOut() : FALSE );
+ sal_Bool bRet = ( !mbAutoSwapped ? maGraphic.SwapOut() : sal_False );
if( bRet && mpMgr )
mpMgr->ImplGraphicObjectWasSwappedOut( *this );
@@ -1200,9 +1200,9 @@ BOOL GraphicObject::SwapOut()
// -----------------------------------------------------------------------------
-BOOL GraphicObject::SwapOut( SvStream* pOStm )
+sal_Bool GraphicObject::SwapOut( SvStream* pOStm )
{
- BOOL bRet = ( !mbAutoSwapped ? maGraphic.SwapOut( pOStm ) : FALSE );
+ sal_Bool bRet = ( !mbAutoSwapped ? maGraphic.SwapOut( pOStm ) : sal_False );
if( bRet && mpMgr )
mpMgr->ImplGraphicObjectWasSwappedOut( *this );
@@ -1212,17 +1212,17 @@ BOOL GraphicObject::SwapOut( SvStream* pOStm )
// -----------------------------------------------------------------------------
-BOOL GraphicObject::SwapIn()
+sal_Bool GraphicObject::SwapIn()
{
- BOOL bRet;
+ sal_Bool bRet;
if( mbAutoSwapped )
{
ImplAutoSwapIn();
- bRet = TRUE;
+ bRet = sal_True;
}
else if( mpMgr && mpMgr->ImplFillSwappedGraphicObject( *this, maGraphic ) )
- bRet = TRUE;
+ bRet = sal_True;
else
{
bRet = maGraphic.SwapIn();
@@ -1239,17 +1239,17 @@ BOOL GraphicObject::SwapIn()
// -----------------------------------------------------------------------------
-BOOL GraphicObject::SwapIn( SvStream* pIStm )
+sal_Bool GraphicObject::SwapIn( SvStream* pIStm )
{
- BOOL bRet;
+ sal_Bool bRet;
if( mbAutoSwapped )
{
ImplAutoSwapIn();
- bRet = TRUE;
+ bRet = sal_True;
}
else if( mpMgr && mpMgr->ImplFillSwappedGraphicObject( *this, maGraphic ) )
- bRet = TRUE;
+ bRet = sal_True;
else
{
bRet = maGraphic.SwapIn( pIStm );
@@ -1270,7 +1270,7 @@ void GraphicObject::SetSwapState()
{
if( !IsSwappedOut() )
{
- mbAutoSwapped = TRUE;
+ mbAutoSwapped = sal_True;
if( mpMgr )
mpMgr->ImplGraphicObjectWasSwappedOut( *this );
@@ -1283,7 +1283,7 @@ IMPL_LINK( GraphicObject, ImplAutoSwapOutHdl, void*, EMPTYARG )
{
if( !IsSwappedOut() )
{
- mbIsInSwapOut = TRUE;
+ mbIsInSwapOut = sal_True;
SvStream* pStream = GetSwapStream();
@@ -1303,7 +1303,7 @@ IMPL_LINK( GraphicObject, ImplAutoSwapOutHdl, void*, EMPTYARG )
}
}
- mbIsInSwapOut = FALSE;
+ mbIsInSwapOut = sal_False;
}
if( mpSwapOutTimer )
@@ -1320,7 +1320,7 @@ SvStream& operator>>( SvStream& rIStm, GraphicObject& rGraphicObj )
Graphic aGraphic;
GraphicAttr aAttr;
ByteString aLink;
- BOOL bLink;
+ sal_Bool bLink;
rIStm >> aGraphic >> aAttr >> bLink;
@@ -1345,7 +1345,7 @@ SvStream& operator>>( SvStream& rIStm, GraphicObject& rGraphicObj )
SvStream& operator<<( SvStream& rOStm, const GraphicObject& rGraphicObj )
{
VersionCompat aCompat( rOStm, STREAM_WRITE, 1 );
- const BOOL bLink = rGraphicObj.HasLink();
+ const sal_Bool bLink = rGraphicObj.HasLink();
rOStm << rGraphicObj.GetGraphic() << rGraphicObj.GetAttr() << bLink;
diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx
index 7e1255aabc56..9c86c7e44130 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -47,7 +47,7 @@
// -----------
#define MAX_PRINTER_EXT 1024
-#define MAP( cVal0, cVal1, nFrac ) ((BYTE)((((long)(cVal0)<<20L)+nFrac*((long)(cVal1)-(cVal0)))>>20L))
+#define MAP( cVal0, cVal1, nFrac ) ((sal_uInt8)((((long)(cVal0)<<20L)+nFrac*((long)(cVal1)-(cVal0)))>>20L))
#define WATERMARK_LUM_OFFSET 50
#define WATERMARK_CON_OFFSET -70
@@ -113,7 +113,7 @@ BitmapEx muckWithBitmap( const BitmapEx& rBmpEx,
// - GraphicManager -
// ------------------
-GraphicManager::GraphicManager( ULONG nCacheSize, ULONG nMaxObjCacheSize ) :
+GraphicManager::GraphicManager( sal_uLong nCacheSize, sal_uLong nMaxObjCacheSize ) :
mpCache( new GraphicCache( *this, nCacheSize, nMaxObjCacheSize ) )
{
}
@@ -130,56 +130,56 @@ GraphicManager::~GraphicManager()
// -----------------------------------------------------------------------------
-void GraphicManager::SetMaxCacheSize( ULONG nNewCacheSize )
+void GraphicManager::SetMaxCacheSize( sal_uLong nNewCacheSize )
{
mpCache->SetMaxDisplayCacheSize( nNewCacheSize );
}
// -----------------------------------------------------------------------------
-ULONG GraphicManager::GetMaxCacheSize() const
+sal_uLong GraphicManager::GetMaxCacheSize() const
{
return mpCache->GetMaxDisplayCacheSize();
}
// -----------------------------------------------------------------------------
-void GraphicManager::SetMaxObjCacheSize( ULONG nNewMaxObjSize, BOOL bDestroyGreaterCached )
+void GraphicManager::SetMaxObjCacheSize( sal_uLong nNewMaxObjSize, sal_Bool bDestroyGreaterCached )
{
mpCache->SetMaxObjDisplayCacheSize( nNewMaxObjSize, bDestroyGreaterCached );
}
// -----------------------------------------------------------------------------
-ULONG GraphicManager::GetMaxObjCacheSize() const
+sal_uLong GraphicManager::GetMaxObjCacheSize() const
{
return mpCache->GetMaxObjDisplayCacheSize();
}
// -----------------------------------------------------------------------------
-ULONG GraphicManager::GetUsedCacheSize() const
+sal_uLong GraphicManager::GetUsedCacheSize() const
{
return mpCache->GetUsedDisplayCacheSize();
}
// -----------------------------------------------------------------------------
-ULONG GraphicManager::GetFreeCacheSize() const
+sal_uLong GraphicManager::GetFreeCacheSize() const
{
return mpCache->GetFreeDisplayCacheSize();
}
// -----------------------------------------------------------------------------
-void GraphicManager::SetCacheTimeout( ULONG nTimeoutSeconds )
+void GraphicManager::SetCacheTimeout( sal_uLong nTimeoutSeconds )
{
mpCache->SetCacheTimeout( nTimeoutSeconds );
}
// -----------------------------------------------------------------------------
-ULONG GraphicManager::GetCacheTimeout() const
+sal_uLong GraphicManager::GetCacheTimeout() const
{
return mpCache->GetCacheTimeout();
}
@@ -200,7 +200,7 @@ void GraphicManager::ReleaseFromCache( const GraphicObject& /*rObj*/ )
// -----------------------------------------------------------------------------
-BOOL GraphicManager::IsInCache( OutputDevice* pOut, const Point& rPt,
+sal_Bool GraphicManager::IsInCache( OutputDevice* pOut, const Point& rPt,
const Size& rSz, const GraphicObject& rObj,
const GraphicAttr& rAttr ) const
{
@@ -209,15 +209,15 @@ BOOL GraphicManager::IsInCache( OutputDevice* pOut, const Point& rPt,
// -----------------------------------------------------------------------------
-BOOL GraphicManager::DrawObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+sal_Bool GraphicManager::DrawObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
GraphicObject& rObj, const GraphicAttr& rAttr,
- const ULONG nFlags, BOOL& rCached )
+ const sal_uLong nFlags, sal_Bool& rCached )
{
Point aPt( rPt );
Size aSz( rSz );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
- rCached = FALSE;
+ rCached = sal_False;
if( ( rObj.GetType() == GRAPHIC_BITMAP ) || ( rObj.GetType() == GRAPHIC_GDIMETAFILE ) )
{
@@ -235,7 +235,7 @@ BOOL GraphicManager::DrawObj( OutputDevice* pOut, const Point& rPt, const Size&
if( aGraphic.IsSupportedGraphic() )
{
- const USHORT nRot10 = rAttr.GetRotation() % 3600;
+ const sal_uInt16 nRot10 = rAttr.GetRotation() % 3600;
if( nRot10 )
{
@@ -250,7 +250,7 @@ BOOL GraphicManager::DrawObj( OutputDevice* pOut, const Point& rPt, const Size&
aGraphic.Draw( pOut, aPt, aSz );
}
- bRet = TRUE;
+ bRet = sal_True;
}
if( !bRet )
@@ -259,7 +259,7 @@ BOOL GraphicManager::DrawObj( OutputDevice* pOut, const Point& rPt, const Size&
if( !mpCache->DrawDisplayCacheObj( pOut, aPt, aSz, rObj, rAttr ) )
bRet = ImplDraw( pOut, aPt, aSz, rObj, rAttr, nFlags, rCached );
else
- bRet = rCached = TRUE;
+ bRet = rCached = sal_True;
}
}
@@ -299,7 +299,7 @@ ByteString GraphicManager::ImplGetUniqueID( const GraphicObject& rObj ) const
// -----------------------------------------------------------------------------
-BOOL GraphicManager::ImplFillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute )
+sal_Bool GraphicManager::ImplFillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute )
{
return( mpCache->FillSwappedGraphicObject( rObj, rSubstitute ) );
}
@@ -313,13 +313,13 @@ void GraphicManager::ImplGraphicObjectWasSwappedIn( const GraphicObject& rObj )
// -----------------------------------------------------------------------------
-BOOL GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt,
+sal_Bool GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt,
const Size& rSz, GraphicObject& rObj,
const GraphicAttr& rAttr,
- const ULONG nFlags, BOOL& rCached )
+ const sal_uLong nFlags, sal_Bool& rCached )
{
const Graphic& rGraphic = rObj.GetGraphic();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( rGraphic.IsSupportedGraphic() && !rGraphic.IsSwapOut() )
{
@@ -337,7 +337,7 @@ BOOL GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt,
if( ImplCreateOutput( pOut, rPt, rSz, aSrcBmpEx, rAttr, nFlags, &aDstBmpEx ) )
{
rCached = mpCache->CreateDisplayCacheObj( pOut, rPt, rSz, rObj, rAttr, aDstBmpEx );
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -365,13 +365,13 @@ BOOL GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt,
if( ImplCreateOutput( pOut, rPt, rSz, aContainedBmpEx, rAttr, nFlags, &aDstBmpEx ) )
{
rCached = mpCache->CreateDisplayCacheObj( pOut, rPt, rSz, rObj, rAttr, aDstBmpEx );
- bRet = TRUE;
+ bRet = sal_True;
}
}
else
{
rCached = mpCache->CreateDisplayCacheObj( pOut, rPt, rSz, rObj, rAttr, aDstMtf );
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -383,7 +383,7 @@ BOOL GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt,
if( aGraphic.IsSupportedGraphic() )
{
aGraphic.Draw( pOut, rPt, rSz );
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -394,16 +394,16 @@ BOOL GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt,
// -----------------------------------------------------------------------------
-BOOL GraphicManager::ImplCreateOutput( OutputDevice* pOut,
+sal_Bool GraphicManager::ImplCreateOutput( OutputDevice* pOut,
const Point& rPt, const Size& rSz,
const BitmapEx& rBmpEx, const GraphicAttr& rAttr,
- const ULONG nFlags, BitmapEx* pBmpEx )
+ const sal_uLong nFlags, BitmapEx* pBmpEx )
{
- USHORT nRot10 = rAttr.GetRotation() % 3600;
+ sal_uInt16 nRot10 = rAttr.GetRotation() % 3600;
Point aOutPtPix;
Size aOutSzPix;
Size aUnrotatedSzPix( pOut->LogicToPixel( rSz ) );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( nRot10 )
{
@@ -438,8 +438,8 @@ BOOL GraphicManager::ImplCreateOutput( OutputDevice* pOut,
long* pMapFY = new long[ nNewH ];
long nStartX = -1, nStartY = -1, nEndX = -1, nEndY = -1;
long nX, nY, nTmp, nTmpX, nTmpY;
- BOOL bHMirr = ( rAttr.GetMirrorFlags() & BMP_MIRROR_HORZ ) != 0;
- BOOL bVMirr = ( rAttr.GetMirrorFlags() & BMP_MIRROR_VERT ) != 0;
+ sal_Bool bHMirr = ( rAttr.GetMirrorFlags() & BMP_MIRROR_HORZ ) != 0;
+ sal_Bool bVMirr = ( rAttr.GetMirrorFlags() & BMP_MIRROR_VERT ) != 0;
if( nFlags & GRFMGR_DRAW_BILINEAR )
{
@@ -541,7 +541,7 @@ BOOL GraphicManager::ImplCreateOutput( OutputDevice* pOut,
// do transformation
if( nStartX >= 0L )
{
- const BOOL bSimple = ( 1 == nW || 1 == nH );
+ const sal_Bool bSimple = ( 1 == nW || 1 == nH );
if( nRot10 )
{
@@ -570,7 +570,7 @@ BOOL GraphicManager::ImplCreateOutput( OutputDevice* pOut,
aOutPt = pOut->PixelToLogic( aOutPtPix );
aOutSz = pOut->PixelToLogic( aOutSzPix );
aOutBmpEx = aBmpEx;
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
@@ -624,10 +624,10 @@ BOOL GraphicManager::ImplCreateOutput( OutputDevice* pOut,
// -----------------------------------------------------------------------------
-BOOL GraphicManager::ImplCreateOutput( OutputDevice* pOut,
+sal_Bool GraphicManager::ImplCreateOutput( OutputDevice* pOut,
const Point& rPt, const Size& rSz,
const GDIMetaFile& rMtf, const GraphicAttr& rAttr,
- const ULONG /*nFlags*/, GDIMetaFile& rOutMtf, BitmapEx& rOutBmpEx )
+ const sal_uLong /*nFlags*/, GDIMetaFile& rOutMtf, BitmapEx& rOutBmpEx )
{
const Size aNewSize( rMtf.GetPrefSize() );
@@ -919,12 +919,12 @@ BOOL GraphicManager::ImplCreateOutput( OutputDevice* pOut,
rOutBmpEx = BitmapEx();
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------------
-BOOL GraphicManager::ImplCreateScaled( const BitmapEx& rBmpEx,
+sal_Bool GraphicManager::ImplCreateScaled( const BitmapEx& rBmpEx,
long* pMapIX, long* pMapFX, long* pMapIY, long* pMapFY,
long nStartX, long nEndX, long nStartY, long nEndY,
BitmapEx& rOutBmpEx )
@@ -938,8 +938,8 @@ BOOL GraphicManager::ImplCreateScaled( const BitmapEx& rBmpEx,
const long nDstH = nEndY - nStartY + 1L;
long nX, nY, nTmpX, nTmpY, nTmpFX, nTmpFY;
long nXDst, nYDst;
- BYTE cR0, cG0, cB0, cR1, cG1, cB1;
- BOOL bRet = FALSE;
+ sal_uInt8 cR0, cG0, cB0, cR1, cG1, cB1;
+ sal_Bool bRet = sal_False;
DBG_ASSERT( aBmp.GetSizePixel() == rBmpEx.GetSizePixel(),
"GraphicManager::ImplCreateScaled(): bmp size inconsistent" );
@@ -1117,7 +1117,7 @@ BOOL GraphicManager::ImplCreateScaled( const BitmapEx& rBmpEx,
}
aOutBmp.ReleaseAccess( pWAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
aBmp.ReleaseAccess( pAcc );
@@ -1125,7 +1125,7 @@ BOOL GraphicManager::ImplCreateScaled( const BitmapEx& rBmpEx,
if( bRet && rBmpEx.IsTransparent() )
{
- bRet = FALSE;
+ bRet = sal_False;
if( rBmpEx.IsAlpha() )
{
@@ -1198,7 +1198,7 @@ BOOL GraphicManager::ImplCreateScaled( const BitmapEx& rBmpEx,
}
aOutAlpha.ReleaseAccess( pWAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
aAlpha.ReleaseAccess( pAcc );
@@ -1277,7 +1277,7 @@ BOOL GraphicManager::ImplCreateScaled( const BitmapEx& rBmpEx,
{
for( nX = 0L; nX < nDstW; nX++ )
{
- if( pAcc->GetPaletteColor( (BYTE) pAcc->GetPixel( pMapLY[ nY ], pMapLX[ nX ] ) ) == aB )
+ if( pAcc->GetPaletteColor( (sal_uInt8) pAcc->GetPixel( pMapLY[ nY ], pMapLX[ nX ] ) ) == aB )
pWAcc->SetPixel( nY, nX, aWB );
else
pWAcc->SetPixel( nY, nX, aWW );
@@ -1302,7 +1302,7 @@ BOOL GraphicManager::ImplCreateScaled( const BitmapEx& rBmpEx,
delete[] pMapLX;
delete[] pMapLY;
aOutMsk.ReleaseAccess( pWAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
aMsk.ReleaseAccess( pAcc );
@@ -1323,8 +1323,8 @@ BOOL GraphicManager::ImplCreateScaled( const BitmapEx& rBmpEx,
// -----------------------------------------------------------------------------
-BOOL GraphicManager::ImplCreateRotatedScaled( const BitmapEx& rBmpEx,
- USHORT nRot10, const Size& /*rOutSzPix*/, const Size& rUnrotatedSzPix,
+sal_Bool GraphicManager::ImplCreateRotatedScaled( const BitmapEx& rBmpEx,
+ sal_uInt16 nRot10, const Size& /*rOutSzPix*/, const Size& rUnrotatedSzPix,
long* pMapIX, long* pMapFX, long* pMapIY, long* pMapFY,
long nStartX, long nEndX, long nStartY, long nEndY,
BitmapEx& rOutBmpEx )
@@ -1347,8 +1347,8 @@ BOOL GraphicManager::ImplCreateRotatedScaled( const BitmapEx& rBmpEx,
long* pCosY = new long[ nDstH ];
long* pSinY = new long[ nDstH ];
long nX, nY, nTmpX, nTmpY, nTmpFX, nTmpFY, nUnRotX, nUnRotY, nSinY, nCosY;
- BYTE cR0, cG0, cB0, cR1, cG1, cB1;
- BOOL bRet = FALSE;
+ sal_uInt8 cR0, cG0, cB0, cR1, cG1, cB1;
+ sal_Bool bRet = sal_False;
// create horizontal mapping table
for( nX = 0L, nTmpX = aNewBound.Left() + nStartX; nX < nDstW; nX++ )
@@ -1453,7 +1453,7 @@ BOOL GraphicManager::ImplCreateRotatedScaled( const BitmapEx& rBmpEx,
}
aOutBmp.ReleaseAccess( pWAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
aBmp.ReleaseAccess( pAcc );
@@ -1462,7 +1462,7 @@ BOOL GraphicManager::ImplCreateRotatedScaled( const BitmapEx& rBmpEx,
// mask processing
if( bRet && ( rBmpEx.IsTransparent() || ( nRot10 != 900 && nRot10 != 1800 && nRot10 != 2700 ) ) )
{
- bRet = FALSE;
+ bRet = sal_False;
if( rBmpEx.IsAlpha() )
{
@@ -1553,7 +1553,7 @@ BOOL GraphicManager::ImplCreateRotatedScaled( const BitmapEx& rBmpEx,
}
aOutAlpha.ReleaseAccess( pWAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
aAlpha.ReleaseAccess( pAcc );
@@ -1626,7 +1626,7 @@ BOOL GraphicManager::ImplCreateRotatedScaled( const BitmapEx& rBmpEx,
if( pMAcc )
aMsk.ReleaseAccess( pMAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
aOutMsk.ReleaseAccess( pWAcc );
@@ -1652,7 +1652,7 @@ BOOL GraphicManager::ImplCreateRotatedScaled( const BitmapEx& rBmpEx,
// -----------------------------------------------------------------------------
-void GraphicManager::ImplAdjust( BitmapEx& rBmpEx, const GraphicAttr& rAttr, ULONG nAdjustmentFlags )
+void GraphicManager::ImplAdjust( BitmapEx& rBmpEx, const GraphicAttr& rAttr, sal_uLong nAdjustmentFlags )
{
GraphicAttr aAttr( rAttr );
@@ -1700,7 +1700,7 @@ void GraphicManager::ImplAdjust( BitmapEx& rBmpEx, const GraphicAttr& rAttr, ULO
if( ( nAdjustmentFlags & ADJUSTMENT_TRANSPARENCY ) && aAttr.IsTransparent() )
{
AlphaMask aAlpha;
- BYTE cTrans = aAttr.GetTransparency();
+ sal_uInt8 cTrans = aAttr.GetTransparency();
if( !rBmpEx.IsTransparent() )
aAlpha = AlphaMask( rBmpEx.GetSizePixel(), &cTrans );
@@ -1716,7 +1716,7 @@ void GraphicManager::ImplAdjust( BitmapEx& rBmpEx, const GraphicAttr& rAttr, ULO
if( pA )
{
- ULONG nTrans = cTrans, nNewTrans;
+ sal_uLong nTrans = cTrans, nNewTrans;
const long nWidth = pA->Width(), nHeight = pA->Height();
if( pA->GetScanlineFormat() == BMP_FORMAT_8BIT_PAL )
@@ -1728,7 +1728,7 @@ void GraphicManager::ImplAdjust( BitmapEx& rBmpEx, const GraphicAttr& rAttr, ULO
for( long nX = 0; nX < nWidth; nX++ )
{
nNewTrans = nTrans + *pAScan;
- *pAScan++ = (BYTE) ( ( nNewTrans & 0xffffff00 ) ? 255 : nNewTrans );
+ *pAScan++ = (sal_uInt8) ( ( nNewTrans & 0xffffff00 ) ? 255 : nNewTrans );
}
}
}
@@ -1741,7 +1741,7 @@ void GraphicManager::ImplAdjust( BitmapEx& rBmpEx, const GraphicAttr& rAttr, ULO
for( long nX = 0; nX < nWidth; nX++ )
{
nNewTrans = nTrans + pA->GetPixel( nY, nX ).GetIndex();
- aAlphaValue.SetIndex( (BYTE) ( ( nNewTrans & 0xffffff00 ) ? 255 : nNewTrans ) );
+ aAlphaValue.SetIndex( (sal_uInt8) ( ( nNewTrans & 0xffffff00 ) ? 255 : nNewTrans ) );
pA->SetPixel( nY, nX, aAlphaValue );
}
}
@@ -1757,7 +1757,7 @@ void GraphicManager::ImplAdjust( BitmapEx& rBmpEx, const GraphicAttr& rAttr, ULO
// -----------------------------------------------------------------------------
-void GraphicManager::ImplAdjust( GDIMetaFile& rMtf, const GraphicAttr& rAttr, ULONG nAdjustmentFlags )
+void GraphicManager::ImplAdjust( GDIMetaFile& rMtf, const GraphicAttr& rAttr, sal_uLong nAdjustmentFlags )
{
GraphicAttr aAttr( rAttr );
@@ -1810,7 +1810,7 @@ void GraphicManager::ImplAdjust( GDIMetaFile& rMtf, const GraphicAttr& rAttr, UL
// -----------------------------------------------------------------------------
-void GraphicManager::ImplAdjust( Animation& rAnimation, const GraphicAttr& rAttr, ULONG nAdjustmentFlags )
+void GraphicManager::ImplAdjust( Animation& rAnimation, const GraphicAttr& rAttr, sal_uLong nAdjustmentFlags )
{
GraphicAttr aAttr( rAttr );
@@ -1866,7 +1866,7 @@ void GraphicManager::ImplAdjust( Animation& rAnimation, const GraphicAttr& rAttr
void GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
const GDIMetaFile& rMtf, const GraphicAttr& rAttr )
{
- USHORT nRot10 = rAttr.GetRotation() % 3600;
+ sal_uInt16 nRot10 = rAttr.GetRotation() % 3600;
Point aOutPt( rPt );
Size aOutSz( rSz );
@@ -1924,7 +1924,7 @@ struct ImplTileInfo
bool GraphicObject::ImplRenderTempTile( VirtualDevice& rVDev, int nExponent,
int nNumTilesX, int nNumTilesY,
const Size& rTileSizePixel,
- const GraphicAttr* pAttr, ULONG nFlags )
+ const GraphicAttr* pAttr, sal_uLong nFlags )
{
if( nExponent <= 1 )
return false;
@@ -1944,8 +1944,8 @@ bool GraphicObject::ImplRenderTempTile( VirtualDevice& rVDev, int nExponent,
// #105229# Switch off mapping (converting to logic and back to
// pixel might cause roundoff errors)
- BOOL bOldMap( rVDev.IsMapModeEnabled() );
- rVDev.EnableMapMode( FALSE );
+ sal_Bool bOldMap( rVDev.IsMapModeEnabled() );
+ rVDev.EnableMapMode( sal_False );
bool bRet( ImplRenderTileRecursive( rVDev, nExponent, nMSBFactor, nNumTilesX, nNumTilesY,
nNumTilesX, nNumTilesY, rTileSizePixel, pAttr, nFlags, aTileInfo ) );
@@ -1968,7 +1968,7 @@ bool GraphicObject::ImplRenderTileRecursive( VirtualDevice& rVDev, int nExponent
int nNumOrigTilesX, int nNumOrigTilesY,
int nRemainderTilesX, int nRemainderTilesY,
const Size& rTileSizePixel, const GraphicAttr* pAttr,
- ULONG nFlags, ImplTileInfo& rTileInfo )
+ sal_uLong nFlags, ImplTileInfo& rTileInfo )
{
// gets loaded with our tile bitmap
GraphicObject aTmpGraphic;
@@ -2143,7 +2143,7 @@ bool GraphicObject::ImplRenderTileRecursive( VirtualDevice& rVDev, int nExponent
// -----------------------------------------------------------------------------
bool GraphicObject::ImplDrawTiled( OutputDevice* pOut, const Rectangle& rArea, const Size& rSizePixel,
- const Size& rOffset, const GraphicAttr* pAttr, ULONG nFlags, int nTileCacheSize1D )
+ const Size& rOffset, const GraphicAttr* pAttr, sal_uLong nFlags, int nTileCacheSize1D )
{
// how many tiles to generate per recursion step
enum{ SubdivisionExponent=2 };
@@ -2254,7 +2254,7 @@ bool GraphicObject::ImplDrawTiled( OutputDevice* pOut, const Rectangle& rArea, c
bool GraphicObject::ImplDrawTiled( OutputDevice& rOut, const Point& rPosPixel,
int nNumTilesX, int nNumTilesY,
- const Size& rTileSizePixel, const GraphicAttr* pAttr, ULONG nFlags )
+ const Size& rTileSizePixel, const GraphicAttr* pAttr, sal_uLong nFlags )
{
Point aCurrPos( rPosPixel );
Size aTileSizeLogic( rOut.PixelToLogic( rTileSizePixel ) );
@@ -2262,14 +2262,14 @@ bool GraphicObject::ImplDrawTiled( OutputDevice& rOut, const Point& rPosPixel,
// #107607# Use logical coordinates for metafile playing, too
bool bDrawInPixel( rOut.GetConnectMetaFile() == NULL && GRAPHIC_BITMAP == GetType() );
- BOOL bRet( FALSE );
+ sal_Bool bRet( sal_False );
// #105229# Switch off mapping (converting to logic and back to
// pixel might cause roundoff errors)
- BOOL bOldMap( rOut.IsMapModeEnabled() );
+ sal_Bool bOldMap( rOut.IsMapModeEnabled() );
if( bDrawInPixel )
- rOut.EnableMapMode( FALSE );
+ rOut.EnableMapMode( sal_False );
for( nY=0; nY < nNumTilesY; ++nY )
{
@@ -2308,7 +2308,7 @@ void GraphicObject::ImplTransformBitmap( BitmapEx& rBmpEx,
const Size& rCropRightBottom,
const Rectangle& rCropRect,
const Size& rDstSize,
- BOOL bEnlarge ) const
+ sal_Bool bEnlarge ) const
{
// #107947# Extracted from svdograf.cxx
diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx
index f1674dcd7d4a..5645f7ee9ddf 100644
--- a/svtools/source/graphic/provider.cxx
+++ b/svtools/source/graphic/provider.cxx
@@ -337,7 +337,7 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadResource( const :
if( 0 < nImageId )
{
- const Image aImage( aImageList.GetImage( sal::static_int_cast< USHORT >(nImageId) ) );
+ const Image aImage( aImageList.GetImage( sal::static_int_cast< sal_uInt16 >(nImageId) ) );
aBmpEx = aImage.GetBitmapEx();
}
else
diff --git a/svtools/source/hatchwindow/ipwin.cxx b/svtools/source/hatchwindow/ipwin.cxx
index 1beae4a54355..65db0f444faa 100644
--- a/svtools/source/hatchwindow/ipwin.cxx
+++ b/svtools/source/hatchwindow/ipwin.cxx
@@ -43,7 +43,7 @@
SvResizeHelper::SvResizeHelper()
: aBorder( 5, 5 )
, nGrab( -1 )
- , bResizeable( TRUE )
+ , bResizeable( sal_True )
{
}
@@ -127,7 +127,7 @@ void SvResizeHelper::Draw( OutputDevice * pDev )
Rectangle aMoveRects[ 4 ];
FillMoveRectsPixel( aMoveRects );
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < 4; i++ )
pDev->DrawRect( aMoveRects[ i ] );
if( bResizeable )
@@ -151,7 +151,7 @@ void SvResizeHelper::InvalidateBorder( Window * pWin )
{
Rectangle aMoveRects[ 4 ];
FillMoveRectsPixel( aMoveRects );
- for( USHORT i = 0; i < 4; i++ )
+ for( sal_uInt16 i = 0; i < 4; i++ )
pWin->Invalidate( aMoveRects[ i ] );
}
@@ -160,7 +160,7 @@ void SvResizeHelper::InvalidateBorder( Window * pWin )
|*
|* Beschreibung
*************************************************************************/
-BOOL SvResizeHelper::SelectBegin( Window * pWin, const Point & rPos )
+sal_Bool SvResizeHelper::SelectBegin( Window * pWin, const Point & rPos )
{
if( -1 == nGrab )
{
@@ -169,10 +169,10 @@ BOOL SvResizeHelper::SelectBegin( Window * pWin, const Point & rPos )
{
aSelPos = rPos; // Start-Position merken
pWin->CaptureMouse();
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -188,14 +188,14 @@ short SvResizeHelper::SelectMove( Window * pWin, const Point & rPos )
{
Rectangle aRects[ 8 ];
FillHandleRectsPixel( aRects );
- for( USHORT i = 0; i < 8; i++ )
+ for( sal_uInt16 i = 0; i < 8; i++ )
if( aRects[ i ].IsInside( rPos ) )
return i;
}
// Move-Rect ueberlappen Handles
Rectangle aMoveRects[ 4 ];
FillMoveRectsPixel( aMoveRects );
- for( USHORT i = 0; i < 4; i++ )
+ for( sal_uInt16 i = 0; i < 4; i++ )
if( aMoveRects[ i ].IsInside( rPos ) )
return 8;
}
@@ -420,7 +420,7 @@ void SvResizeHelper::ValidateRect( Rectangle & rValidate ) const
|*
|* Beschreibung
*************************************************************************/
-BOOL SvResizeHelper::SelectRelease( Window * pWin, const Point & rPos,
+sal_Bool SvResizeHelper::SelectRelease( Window * pWin, const Point & rPos,
Rectangle & rOutPosSize )
{
if( -1 != nGrab )
@@ -430,9 +430,9 @@ BOOL SvResizeHelper::SelectRelease( Window * pWin, const Point & rPos,
nGrab = -1;
pWin->ReleaseMouse();
pWin->HideTracking();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -631,7 +631,7 @@ long SvResizeWindow::Notify( NotifyEvent& rEvt )
{
if ( rEvt.GetType() == EVENT_LOSEFOCUS && m_bActive )
{
- BOOL bHasFocus = HasChildPathFocus(TRUE);
+ sal_Bool bHasFocus = HasChildPathFocus(sal_True);
if ( !bHasFocus )
{
m_bActive = sal_False;
diff --git a/svtools/source/hatchwindow/ipwin.hxx b/svtools/source/hatchwindow/ipwin.hxx
index 4c7cb6d88d36..1c58bc5b7178 100644
--- a/svtools/source/hatchwindow/ipwin.hxx
+++ b/svtools/source/hatchwindow/ipwin.hxx
@@ -40,11 +40,11 @@ class SvResizeHelper
Rectangle aOuter;
short nGrab; // -1 kein Grab, 0 - 7, 8 = Move, siehe FillHandle...
Point aSelPos;
- BOOL bResizeable;
+ sal_Bool bResizeable;
public:
SvResizeHelper();
- void SetResizeable( BOOL b ) { bResizeable = b; }
+ void SetResizeable( sal_Bool b ) { bResizeable = b; }
short GetGrab() const { return nGrab; }
void SetBorderPixel( const Size & rBorderP )
{ aBorder = rBorderP; }
@@ -67,12 +67,12 @@ public:
void FillMoveRectsPixel( Rectangle aRects[ 4 ] ) const;
void Draw( OutputDevice * );
void InvalidateBorder( Window * );
- BOOL SelectBegin( Window *, const Point & rPos );
+ sal_Bool SelectBegin( Window *, const Point & rPos );
short SelectMove( Window * pWin, const Point & rPos );
Point GetTrackPosPixel( const Rectangle & rRect ) const;
Rectangle GetTrackRectPixel( const Point & rTrackPos ) const;
void ValidateRect( Rectangle & rValidate ) const;
- BOOL SelectRelease( Window *, const Point & rPos, Rectangle & rOutPosSize );
+ sal_Bool SelectRelease( Window *, const Point & rPos, Rectangle & rOutPosSize );
void Release( Window * pWin );
};
diff --git a/svtools/source/inc/filectrl.hrc b/svtools/source/inc/filectrl.hrc
index 1707e306e1b0..150bbba4ac68 100644
--- a/svtools/source/inc/filectrl.hrc
+++ b/svtools/source/inc/filectrl.hrc
@@ -30,5 +30,12 @@
#define STR_FILECTRL_BUTTONTEXT 333 // ID-Range?!
+//IAccessibility2 Implementation 2009-----
+#define STR_TABBAR_PUSHBUTTON_MOVET0HOME ( STR_FILECTRL_BUTTONTEXT+ 1)
+#define STR_TABBAR_PUSHBUTTON_MOVELEFT ( STR_FILECTRL_BUTTONTEXT+ 2)
+#define STR_TABBAR_PUSHBUTTON_MOVERIGHT ( STR_FILECTRL_BUTTONTEXT+ 3)
+#define STR_TABBAR_PUSHBUTTON_MOVETOEND ( STR_FILECTRL_BUTTONTEXT+ 4)
+//-----IAccessibility2 Implementation 2009
+
#endif
diff --git a/svtools/source/inc/gifread.hxx b/svtools/source/inc/gifread.hxx
index de4c6935ef67..89e6c8e0df4b 100644
--- a/svtools/source/inc/gifread.hxx
+++ b/svtools/source/inc/gifread.hxx
@@ -88,41 +88,41 @@ class GIFReader : public GraphicReader
long nLastPos;
sal_uInt32 nLogWidth100;
sal_uInt32 nLogHeight100;
- USHORT nTimer;
- USHORT nGlobalWidth; // maximale Bildbreite aus Header
- USHORT nGlobalHeight; // maximale Bildhoehe aus Header
- USHORT nImageWidth; // maximale Bildbreite aus Header
- USHORT nImageHeight; // maximale Bildhoehe aus Header
- USHORT nImagePosX;
- USHORT nImagePosY;
- USHORT nImageX; // maximale Bildbreite aus Header
- USHORT nImageY; // maximale Bildhoehe aus Header
- USHORT nLastImageY;
- USHORT nLastInterCount;
- USHORT nLoops;
+ sal_uInt16 nTimer;
+ sal_uInt16 nGlobalWidth; // maximale Bildbreite aus Header
+ sal_uInt16 nGlobalHeight; // maximale Bildhoehe aus Header
+ sal_uInt16 nImageWidth; // maximale Bildbreite aus Header
+ sal_uInt16 nImageHeight; // maximale Bildhoehe aus Header
+ sal_uInt16 nImagePosX;
+ sal_uInt16 nImagePosY;
+ sal_uInt16 nImageX; // maximale Bildbreite aus Header
+ sal_uInt16 nImageY; // maximale Bildhoehe aus Header
+ sal_uInt16 nLastImageY;
+ sal_uInt16 nLastInterCount;
+ sal_uInt16 nLoops;
GIFAction eActAction;
- BOOL bStatus;
- BOOL bGCTransparent; // Ob das Bild Transparent ist, wenn ja:
- BOOL bInterlaced;
- BOOL bOverreadBlock;
- BOOL bImGraphicReady;
- BOOL bGlobalPalette;
- BYTE nBackgroundColor; // Hintergrundfarbe
- BYTE nGCTransparentIndex; // Pixel von diesem Index sind durchsichtig
- BYTE nGCDisposalMethod; // 'Disposal Method' (siehe GIF-Doku)
- BYTE cTransIndex1;
- BYTE cNonTransIndex1;
-
- void ReadPaletteEntries( BitmapPalette* pPal, ULONG nCount );
+ sal_Bool bStatus;
+ sal_Bool bGCTransparent; // Ob das Bild Transparent ist, wenn ja:
+ sal_Bool bInterlaced;
+ sal_Bool bOverreadBlock;
+ sal_Bool bImGraphicReady;
+ sal_Bool bGlobalPalette;
+ sal_uInt8 nBackgroundColor; // Hintergrundfarbe
+ sal_uInt8 nGCTransparentIndex; // Pixel von diesem Index sind durchsichtig
+ sal_uInt8 nGCDisposalMethod; // 'Disposal Method' (siehe GIF-Doku)
+ sal_uInt8 cTransIndex1;
+ sal_uInt8 cNonTransIndex1;
+
+ void ReadPaletteEntries( BitmapPalette* pPal, sal_uLong nCount );
void ClearImageExtensions();
- BOOL CreateBitmaps( long nWidth, long nHeight, BitmapPalette* pPal, BOOL bWatchForBackgroundColor );
- BOOL ReadGlobalHeader();
- BOOL ReadExtension();
- BOOL ReadLocalHeader();
- ULONG ReadNextBlock();
- void FillImages( HPBYTE pBytes, ULONG nCount );
+ sal_Bool CreateBitmaps( long nWidth, long nHeight, BitmapPalette* pPal, sal_Bool bWatchForBackgroundColor );
+ sal_Bool ReadGlobalHeader();
+ sal_Bool ReadExtension();
+ sal_Bool ReadLocalHeader();
+ sal_uLong ReadNextBlock();
+ void FillImages( HPBYTE pBytes, sal_uLong nCount );
void CreateNewBitmaps();
- BOOL ProcessGIF();
+ sal_Bool ProcessGIF();
public:
@@ -139,6 +139,6 @@ public:
// - ImportGIF -
// -------------
- BOOL ImportGIF( SvStream& rStream, Graphic& rGraphic );
+ sal_Bool ImportGIF( SvStream& rStream, Graphic& rGraphic );
#endif // _GIFREAD_HXX
diff --git a/svtools/source/inc/jpeg.hxx b/svtools/source/inc/jpeg.hxx
index 9923190c5e21..0d8db406132a 100644
--- a/svtools/source/inc/jpeg.hxx
+++ b/svtools/source/inc/jpeg.hxx
@@ -93,8 +93,8 @@ class JPEGWriter
SvStream& rOStm;
Bitmap aBmp;
BitmapReadAccess* pAcc;
- BYTE* pBuffer;
- BOOL bNative;
+ sal_uInt8* pBuffer;
+ sal_Bool bNative;
sal_Bool bGreys;
sal_Int32 nQuality;
@@ -111,7 +111,7 @@ public:
bool* pExportWasGrey = NULL );
~JPEGWriter() {};
- BOOL Write( const Graphic& rGraphic );
+ sal_Bool Write( const Graphic& rGraphic );
};
#endif // _JPEGPRIVATE
@@ -120,9 +120,9 @@ public:
// - Import/ExportJPEG -
// ---------------------
-BOOL ImportJPEG( SvStream& rStream, Graphic& rGraphic, void* pCallerData, sal_Int32 nImportFlags );
+sal_Bool ImportJPEG( SvStream& rStream, Graphic& rGraphic, void* pCallerData, sal_Int32 nImportFlags );
-BOOL ExportJPEG( SvStream& rStream,
+sal_Bool ExportJPEG( SvStream& rStream,
const Graphic& rGraphic,
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData,
bool* pExportWasGrey = NULL
diff --git a/svtools/source/inc/msgrd.hxx b/svtools/source/inc/msgrd.hxx
index 2d3dcccb1244..21c0460a1c0b 100644
--- a/svtools/source/inc/msgrd.hxx
+++ b/svtools/source/inc/msgrd.hxx
@@ -29,9 +29,9 @@
#define _MSGRD_HXX
-BOOL ConvertMSGToGDIMetaFile( SvStream & rMSG, GDIMetaFile & rGDIMetaFile,
- BOOL(*pCallback)(void *, USHORT), void * pCallerData,
- ULONG nMinPercent, ULONG nMaxPercent);
+sal_Bool ConvertMSGToGDIMetaFile( SvStream & rMSG, GDIMetaFile & rGDIMetaFile,
+ sal_Bool(*pCallback)(void *, sal_uInt16), void * pCallerData,
+ sal_uLong nMinPercent, sal_uLong nMaxPercent);
#endif // _MSGRD_HXX
diff --git a/svtools/source/inc/msgwr.hxx b/svtools/source/inc/msgwr.hxx
index 7e72e98c124c..d133031673e7 100644
--- a/svtools/source/inc/msgwr.hxx
+++ b/svtools/source/inc/msgwr.hxx
@@ -29,9 +29,9 @@
#define _MSGWR_HXX
-BOOL ConvertGraphicToMSG(const Graphic & rGraphic, SvStream & rTargetStream,
- BOOL(*pCallback)(void *, USHORT), void * pCallerData,
- ULONG nMinPercent, ULONG nMaxPercent);
+sal_Bool ConvertGraphicToMSG(const Graphic & rGraphic, SvStream & rTargetStream,
+ sal_Bool(*pCallback)(void *, sal_uInt16), void * pCallerData,
+ sal_uLong nMinPercent, sal_uLong nMaxPercent);
#endif // _MSGWR_HXX
diff --git a/svtools/source/inc/property.hxx b/svtools/source/inc/property.hxx
index 689da1faf140..aa9a721fa292 100644
--- a/svtools/source/inc/property.hxx
+++ b/svtools/source/inc/property.hxx
@@ -85,13 +85,13 @@ public:
virtual SvXPropertyCtrListener* GetSvXPropertyCtrListener()=0;
virtual void SetProperty(const String &rString)=0;
virtual String GetProperty()const=0;
- virtual BOOL HasList()=0;
+ virtual sal_Bool HasList()=0;
virtual void ClearList()=0;
virtual void InsertEntry( const String& rString,
- USHORT nPos = LISTBOX_APPEND )=0;
+ sal_uInt16 nPos = LISTBOX_APPEND )=0;
virtual void SetCtrSize(const Size& rSize)=0;
- virtual void SetLocked(BOOL bLocked=TRUE)=0;
+ virtual void SetLocked(sal_Bool bLocked=sal_True)=0;
virtual void SetMyName(const String &rString)=0;
virtual String GetMyName()const=0;
@@ -135,13 +135,13 @@ public:
virtual void SetProperty(const String &rString);
virtual String GetProperty()const;
- virtual BOOL HasList();
+ virtual sal_Bool HasList();
virtual void ClearList();
virtual void InsertEntry( const String& rString,
- USHORT nPos = LISTBOX_APPEND );
+ sal_uInt16 nPos = LISTBOX_APPEND );
virtual void SetCtrSize(const Size& rSize);
- virtual void SetLocked(BOOL bLocked=TRUE);
+ virtual void SetLocked(sal_Bool bLocked=sal_True);
virtual void SetMyName(const String &rString);
virtual String GetMyName()const;
@@ -178,13 +178,13 @@ public:
virtual void SetProperty(const String &rString);
virtual String GetProperty()const;
- virtual BOOL HasList();
+ virtual sal_Bool HasList();
virtual void ClearList();
virtual void InsertEntry( const String& rString,
- USHORT nPos = LISTBOX_APPEND );
+ sal_uInt16 nPos = LISTBOX_APPEND );
virtual void SetCtrSize(const Size& rSize);
- virtual void SetLocked(BOOL bLocked=TRUE);
+ virtual void SetLocked(sal_Bool bLocked=sal_True);
virtual void SetMyName(const String &rString);
virtual String GetMyName()const;
@@ -220,13 +220,13 @@ public:
virtual void SetProperty(const String &rString);
virtual String GetProperty()const;
- virtual BOOL HasList();
+ virtual sal_Bool HasList();
virtual void ClearList();
virtual void InsertEntry( const String& rString,
- USHORT nPos = LISTBOX_APPEND );
+ sal_uInt16 nPos = LISTBOX_APPEND );
virtual void SetCtrSize(const Size& rSize);
- virtual void SetLocked(BOOL bLocked=TRUE);
+ virtual void SetLocked(sal_Bool bLocked=sal_True);
virtual void SetMyName(const String &rString);
virtual String GetMyName()const;
@@ -241,14 +241,14 @@ class SvPropertyLine : public Control
{
private:
FixedText aName;
- USHORT nNameWidth;
- BOOL bNeedsRepaint;
+ sal_uInt16 nNameWidth;
+ sal_Bool bNeedsRepaint;
SvXPropertyControl* pSvXPropertyControl;
PushButton aXButton;
- BOOL bIsLocked;
- BOOL bHasXButton;
- BOOL bIsHyperlink;
+ sal_Bool bIsLocked;
+ sal_Bool bHasXButton;
+ sal_Bool bIsHyperlink;
eKindOfControl eKindOfCtr;
protected:
@@ -260,8 +260,8 @@ public:
SvPropertyLine( Window* pParent,
const ResId& rResId );
- BOOL NeedsRepaint();
- void SetNeedsRepaint(BOOL bFlag);
+ sal_Bool NeedsRepaint();
+ void SetNeedsRepaint(sal_Bool bFlag);
void SetSvXPropertyControl(SvXPropertyControl*);
SvXPropertyControl* GetSvXPropertyControl();
@@ -270,16 +270,16 @@ public:
void SetName(const String& rString );
String GetName() const;
- void SetNameWidth(USHORT);
+ void SetNameWidth(sal_uInt16);
void ShowXButton();
void HideXButton();
- BOOL IsVisibleXButton();
- void ShowAsHyperLink(BOOL nFlag=TRUE);
- BOOL IsShownAsHyperlink();
+ sal_Bool IsVisibleXButton();
+ void ShowAsHyperLink(sal_Bool nFlag=sal_True);
+ sal_Bool IsShownAsHyperlink();
- void Locked(BOOL nFlag=TRUE);
- BOOL IsLineLocked();
+ void Locked(sal_Bool nFlag=sal_True);
+ sal_Bool IsLineLocked();
void SetClickHdl(const Link&);
@@ -294,9 +294,9 @@ public:
String aValue;
SvStrings theValues; // ???
- BOOL bHasVisibleXButton;
- BOOL bIsHyperLink;
- BOOL bIsLocked;
+ sal_Bool bHasVisibleXButton;
+ sal_Bool bIsHyperLink;
+ sal_Bool bIsLocked;
void* pDataPtr;
SvXPropertyControl* pControl;
};
@@ -378,9 +378,9 @@ private:
ScrollBar aVScroll;
SvPropLineArray PLineArray;
SvPropertyDataControl* pPropDataControl;
- USHORT nRowHeight;
- BOOL bUpdate;
- USHORT nTheNameSize;
+ sal_uInt16 nRowHeight;
+ sal_Bool bUpdate;
+ sal_uInt16 nTheNameSize;
long nYOffset;
DECL_LINK( ScrollHdl,ScrollBar*);
@@ -405,7 +405,7 @@ public:
~SvListBoxForProperties();
- virtual USHORT CalcVisibleLines();
+ virtual sal_uInt16 CalcVisibleLines();
virtual void EnableUpdate();
virtual void DisableUpdate();
@@ -413,19 +413,19 @@ public:
virtual void Clear();
- virtual USHORT InsertEntry( const SvPropertyData&, USHORT nPos = LISTBOX_APPEND );
+ virtual sal_uInt16 InsertEntry( const SvPropertyData&, sal_uInt16 nPos = LISTBOX_APPEND );
- virtual void ChangeEntry( const SvPropertyData&, USHORT nPos);
+ virtual void ChangeEntry( const SvPropertyData&, sal_uInt16 nPos);
- virtual USHORT AppendEntry( const SvPropertyData&);
+ virtual sal_uInt16 AppendEntry( const SvPropertyData&);
virtual void SetPropertyValue( const String & rEntryName, const String & rValue );
- virtual void SetFirstVisibleEntry(USHORT nPos);
- virtual USHORT GetFirstVisibleEntry();
+ virtual void SetFirstVisibleEntry(sal_uInt16 nPos);
+ virtual sal_uInt16 GetFirstVisibleEntry();
- virtual void SetSelectedEntry(USHORT nPos);
- virtual USHORT GetSelectedEntry();
+ virtual void SetSelectedEntry(sal_uInt16 nPos);
+ virtual sal_uInt16 GetSelectedEntry();
};
class SvTabPageForProperties: public TabPage
@@ -450,7 +450,7 @@ class SvBasicPropertyDataControl: public SvPropertyDataControl
{
private:
- BOOL bCorrectness;
+ sal_Bool bCorrectness;
String aEntryName;
String aEntryProperty;
String aCorrectProperty;
@@ -481,7 +481,7 @@ public:
virtual void LinkClicked(const String& aName,
void* pData);
- virtual void SetIsCorrect(BOOL nFlag);
+ virtual void SetIsCorrect(sal_Bool nFlag);
//virtual String GetTheCorrectProperty()const;
virtual void SetTheCorrectProperty(const String& aName);
@@ -521,30 +521,30 @@ public:
~SvPropertyBox();
- virtual USHORT CalcVisibleLines();
+ virtual sal_uInt16 CalcVisibleLines();
virtual void EnableUpdate(); // auch IDL?
virtual void DisableUpdate(); // auch IDL?
// AB: Hier beginnt das 'offizielle' Interface, das in IDL uebernommen werden soll
virtual void SetController(SvPropertyDataControl *);
- virtual USHORT AppendPage( const String & r );
- virtual void SetPage( USHORT );
- virtual USHORT GetCurPage();
+ virtual sal_uInt16 AppendPage( const String & r );
+ virtual void SetPage( sal_uInt16 );
+ virtual sal_uInt16 GetCurPage();
virtual void ClearAll();
virtual void ClearTable();
virtual void SetPropertyValue( const String & rEntryName, const String & rValue );
- virtual USHORT InsertEntry( const SvPropertyData&, USHORT nPos = LISTBOX_APPEND );
- virtual void ChangeEntry( const SvPropertyData&, USHORT nPos);
- virtual USHORT AppendEntry( const SvPropertyData&);
+ virtual sal_uInt16 InsertEntry( const SvPropertyData&, sal_uInt16 nPos = LISTBOX_APPEND );
+ virtual void ChangeEntry( const SvPropertyData&, sal_uInt16 nPos);
+ virtual sal_uInt16 AppendEntry( const SvPropertyData&);
- virtual void SetFirstVisibleEntry(USHORT nPos);
- virtual USHORT GetFirstVisibleEntry();
+ virtual void SetFirstVisibleEntry(sal_uInt16 nPos);
+ virtual sal_uInt16 GetFirstVisibleEntry();
- virtual void SetSelectedEntry(USHORT nPos);
- virtual USHORT GetSelectedEntry();
+ virtual void SetSelectedEntry(sal_uInt16 nPos);
+ virtual sal_uInt16 GetSelectedEntry();
};
@@ -556,8 +556,8 @@ private:
SvBasicPropertyDataControl aBaProDatCtr;
OKButton anOk;
CancelButton aCancel;
- USHORT nCount;
- USHORT nClickCount;
+ sal_uInt16 nCount;
+ sal_uInt16 nClickCount;
SvPropertyData aProperty;
SvPropertyBox aPropListBox;
diff --git a/svtools/source/inc/sgfbram.hxx b/svtools/source/inc/sgfbram.hxx
index 2acab5445a8c..aa4ed5836606 100644
--- a/svtools/source/inc/sgfbram.hxx
+++ b/svtools/source/inc/sgfbram.hxx
@@ -40,11 +40,11 @@
#define SgfDontKnow 255 /* Unbekannt oder kein SGF/SGV */
// Konstanten fr SgfHeader.SwGrCol
-#define SgfBlckWhit 1 /* Schwarz/Weiá Bild Ä¿ SimpVector, */
-#define SgfGrayscal 2 /* Bild mit Graustufen ³ StarDraw und */
+#define SgfBlckWhit 1 /* Schwarz/Wei?Bild Ä¿ SimpVector, */
+#define SgfGrayscal 2 /* Bild mit Graustufen ?StarDraw und */
#define Sgf16Colors 3 /* Farbbild (16 Farben) ÄÙ Bit Image */
#define SgfVectFarb 4 /* Farben fr Linien verwenden Ä¿ */
-#define SgfVectGray 5 /* Graustufen fr Linien verwenden ³ Nur fr */
+#define SgfVectGray 5 /* Graustufen fr Linien verwenden ?Nur fr */
#define SgfVectWdth 6 /* Strichst„rken fr Linien verwenden ÄÙ SimpVector */
@@ -52,35 +52,35 @@
class SgfHeader
{
public:
- UINT16 Magic;
- UINT16 Version;
- UINT16 Typ;
- UINT16 Xsize;
- UINT16 Ysize;
- INT16 Xoffs;
- INT16 Yoffs;
- UINT16 Planes; // Layer
- UINT16 SwGrCol;
+ sal_uInt16 Magic;
+ sal_uInt16 Version;
+ sal_uInt16 Typ;
+ sal_uInt16 Xsize;
+ sal_uInt16 Ysize;
+ sal_Int16 Xoffs;
+ sal_Int16 Yoffs;
+ sal_uInt16 Planes; // Layer
+ sal_uInt16 SwGrCol;
char Autor[10];
char Programm[10];
- UINT16 OfsLo,OfsHi; // DWord-Allignment ist notwendig (38 mod 4 =2) !
+ sal_uInt16 OfsLo,OfsHi; // DWord-Allignment ist notwendig (38 mod 4 =2) !
- UINT32 GetOffset();
+ sal_uInt32 GetOffset();
friend SvStream& operator>>(SvStream& rIStream, SgfHeader& rHead);
- BOOL ChkMagic();
+ sal_Bool ChkMagic();
};
#define SgfEntrySize 22
class SgfEntry
{
public:
- UINT16 Typ;
- UINT16 iFrei;
- UINT16 lFreiLo,lFreiHi;
+ sal_uInt16 Typ;
+ sal_uInt16 iFrei;
+ sal_uInt16 lFreiLo,lFreiHi;
char cFrei[10];
- UINT16 OfsLo,OfsHi; // DWord-Allignment ist notwendig (18 mod 4 =2) !
+ sal_uInt16 OfsLo,OfsHi; // DWord-Allignment ist notwendig (18 mod 4 =2) !
- UINT32 GetOffset();
+ sal_uInt32 GetOffset();
friend SvStream& operator>>(SvStream& rIStream, SgfEntry& rEntr);
};
@@ -88,10 +88,10 @@ public:
class SgfVector
{
public:
- UINT16 Flag;
- INT16 x;
- INT16 y;
- UINT16 OfsLo,OfsHi; // DWord-Allignment ist notwendig (6 mod 4 =2) !
+ sal_uInt16 Flag;
+ sal_Int16 x;
+ sal_Int16 y;
+ sal_uInt16 OfsLo,OfsHi; // DWord-Allignment ist notwendig (6 mod 4 =2) !
friend SvStream& operator>>(SvStream& rIStream, SgfVector& rEntr);
};
@@ -102,7 +102,7 @@ extern long SgfVectXmul;
extern long SgfVectYmul;
extern long SgfVectXdiv;
extern long SgfVectYdiv;
-extern BOOL SgfVectScal;
+extern sal_Bool SgfVectScal;
////////////////////////////////////////////////////////////////////////////////////////////////////
// Windows BMP /////////////////////////////////////////////////////////////////////////////////////
@@ -112,15 +112,15 @@ extern BOOL SgfVectScal;
class BmpFileHeader
{
public:
- UINT16 Typ; // = "BM"
- UINT16 SizeLo,SizeHi; // Filesize in Bytes
- UINT16 Reserve1; // Reserviert
- UINT16 Reserve2; // Reserviert
- UINT16 OfsLo,OfsHi; // Offset?
-
- void SetSize(UINT32 Size);
- void SetOfs(UINT32 Size);
- UINT32 GetOfs();
+ sal_uInt16 Typ; // = "BM"
+ sal_uInt16 SizeLo,SizeHi; // Filesize in Bytes
+ sal_uInt16 Reserve1; // Reserviert
+ sal_uInt16 Reserve2; // Reserviert
+ sal_uInt16 OfsLo,OfsHi; // Offset?
+
+ void SetSize(sal_uInt32 Size);
+ void SetOfs(sal_uInt32 Size);
+ sal_uInt32 GetOfs();
friend SvStream& operator<<(SvStream& rOStream, BmpFileHeader& rHead);
};
@@ -128,17 +128,17 @@ public:
class BmpInfoHeader
{
public:
- UINT32 Size; // GrӇe des BmpInfoHeaders
- INT32 Width; // Breite in Pixel
- INT32 Hight; // H”he in Pixel
- UINT16 Planes; // Anzahl der Planes (immer 1)
- UINT16 PixBits; // Anzahl der Bit je Pixel (1,4,8,oder 24)
- UINT32 Compress; // Datenkompression
- UINT32 ImgSize; // GrӇe der Images in Bytes. Ohne Kompression ist auch 0 erlaubt.
- INT32 xDpmm; // Dot per Meter (0 ist erlaubt)
- INT32 yDpmm; // Dot per Meter (0 ist erlaubt)
- UINT32 ColUsed; // Anzahl der verwendeten Farben (0=alle)
- UINT32 ColMust; // Anzahl der wichtigen Farben (0=alle)
+ sal_uInt32 Size; // GrӇe des BmpInfoHeaders
+ sal_Int32 Width; // Breite in Pixel
+ sal_Int32 Hight; // H”he in Pixel
+ sal_uInt16 Planes; // Anzahl der Planes (immer 1)
+ sal_uInt16 PixBits; // Anzahl der Bit je Pixel (1,4,8,oder 24)
+ sal_uInt32 Compress; // Datenkompression
+ sal_uInt32 ImgSize; // GrӇe der Images in Bytes. Ohne Kompression ist auch 0 erlaubt.
+ sal_Int32 xDpmm; // Dot per Meter (0 ist erlaubt)
+ sal_Int32 yDpmm; // Dot per Meter (0 ist erlaubt)
+ sal_uInt32 ColUsed; // Anzahl der verwendeten Farben (0=alle)
+ sal_uInt32 ColMust; // Anzahl der wichtigen Farben (0=alle)
friend SvStream& operator<<(SvStream& rOStream, BmpInfoHeader& rHead);
};
@@ -146,12 +146,12 @@ public:
#define RGBQuadSize 4
class RGBQuad {
private:
- BYTE Red;
- BYTE Grn;
- BYTE Blu;
- BYTE Fil;
+ sal_uInt8 Red;
+ sal_uInt8 Grn;
+ sal_uInt8 Blu;
+ sal_uInt8 Fil;
public:
- RGBQuad(BYTE R, BYTE G, BYTE B) { Red=R; Grn=G; Blu=B; Fil=0; }
+ RGBQuad(sal_uInt8 R, sal_uInt8 G, sal_uInt8 B) { Red=R; Grn=G; Blu=B; Fil=0; }
};
#endif //_SGFBRAM_HXX
diff --git a/svtools/source/inc/sgffilt.hxx b/svtools/source/inc/sgffilt.hxx
index 1c75917b8f73..28d48fe13820 100644
--- a/svtools/source/inc/sgffilt.hxx
+++ b/svtools/source/inc/sgffilt.hxx
@@ -29,10 +29,10 @@
#define _SGFFILT_HXX
#include <tools/urlobj.hxx>
-BYTE CheckSgfTyp(SvStream& rInp, USHORT& nVersion);
-BOOL SgfBMapFilter(SvStream& rInp, SvStream& rOut);
-BOOL SgfVectFilter(SvStream& rInp, GDIMetaFile& rMtf);
-BOOL SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath );
+sal_uInt8 CheckSgfTyp(SvStream& rInp, sal_uInt16& nVersion);
+sal_Bool SgfBMapFilter(SvStream& rInp, SvStream& rOut);
+sal_Bool SgfVectFilter(SvStream& rInp, GDIMetaFile& rMtf);
+sal_Bool SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath );
// Konstanten fr CheckSgfTyp()
#define SGF_BITIMAGE 1 /* Bitmap */
diff --git a/svtools/source/inc/sgvmain.hxx b/svtools/source/inc/sgvmain.hxx
index 6f69908865c5..3006a23f5f10 100644
--- a/svtools/source/inc/sgvmain.hxx
+++ b/svtools/source/inc/sgvmain.hxx
@@ -36,8 +36,8 @@
#define UCHAR unsigned char
struct PointType {
- INT16 x;
- INT16 y;
+ sal_Int16 x;
+ sal_Int16 y;
};
#define SgfDpmm 40
@@ -45,7 +45,7 @@ struct PointType {
#define DtHdSize 256
class DtHdType {
public:
- BYTE Reserved[256];
+ sal_uInt8 Reserved[256];
friend SvStream& operator>>(SvStream& rIStream, DtHdType& rDtHd);
friend void DtHdOverSeek(SvStream& rInp);
};
@@ -53,30 +53,30 @@ public:
struct Seitenformat {
PointType Size; // 0.00mm...819.175mm (Papiergr��e)
- INT16 RandL; // links Rand auf
- INT16 RandR; // rechts dem Papier
- INT16 RandO; // oben Rand auf
- INT16 RandU; // unten dem Papier
- BYTE PColor; // Future Use
- BYTE PIntens; // erst recht Future use
-// BOOL BorderClip; // Objekte am Rand abschneiden (Schummel wg. Allignment unter NT)
+ sal_Int16 RandL; // links Rand auf
+ sal_Int16 RandR; // rechts dem Papier
+ sal_Int16 RandO; // oben Rand auf
+ sal_Int16 RandU; // unten dem Papier
+ sal_uInt8 PColor; // Future Use
+ sal_uInt8 PIntens; // erst recht Future use
+// sal_Bool BorderClip; // Objekte am Rand abschneiden (Schummel wg. Allignment unter NT)
};
#define PageSize 146
class PageType {
public:
- UINT32 Next; // N�chste Seite
- UINT32 nList; // Objektdaten, erster Record
- UINT32 ListEnd; // Objektdaten, letzter Record
+ sal_uInt32 Next; // N�chste Seite
+ sal_uInt32 nList; // Objektdaten, erster Record
+ sal_uInt32 ListEnd; // Objektdaten, letzter Record
Seitenformat Paper; // Papierdaten
- BOOL BorderClip; // Objekte am Rand abschneiden (Schummel wg. Allignment unter NT)
- BYTE StdPg; // welche Standardseite einblenden ?
+ sal_Bool BorderClip; // Objekte am Rand abschneiden (Schummel wg. Allignment unter NT)
+ sal_uInt8 StdPg; // welche Standardseite einblenden ?
PointType U; // Nullpunkt
- INT16 HlpLnH[20]; // Hilfslinien
- INT16 HlpLnV[20];
- BYTE LnAnzH;
- BYTE LnAnzV;
+ sal_Int16 HlpLnH[20]; // Hilfslinien
+ sal_Int16 HlpLnV[20];
+ sal_uInt8 LnAnzH;
+ sal_uInt8 LnAnzV;
UCHAR PgName[32]; // Seitenname
friend SvStream& operator>>(SvStream& rIStream, PageType& rPage);
};
@@ -86,21 +86,21 @@ enum ObjArtType {ObjStrk,ObjRect,ObjPoly,ObjCirc,ObjSpln,
ObjText,ObjGrup,ObjBmap,ObjVirt,ObjTxtX,ObjMaxi};
struct ObjLineType {
- BYTE LFarbe; // [Index]
- BYTE LBFarbe; // [Index]
- BYTE LIntens; // [%]
- BYTE LMuster; // [Index] inkl. Transparenz
- INT16 LMSize; // [Koeffizient/100]
- INT16 LDicke; // Strichst�rke
+ sal_uInt8 LFarbe; // [Index]
+ sal_uInt8 LBFarbe; // [Index]
+ sal_uInt8 LIntens; // [%]
+ sal_uInt8 LMuster; // [Index] inkl. Transparenz
+ sal_Int16 LMSize; // [Koeffizient/100]
+ sal_Int16 LDicke; // Strichst�rke
};
struct ObjAreaType {
- BYTE FFarbe; // [Index]
- BYTE FBFarbe; // [Index]
- BYTE FIntens; // [%]
- BYTE FDummy1; //
- INT16 FDummy2; //
- UINT16 FMuster; // [Index] inkl. Invers, Transparenz
+ sal_uInt8 FFarbe; // [Index]
+ sal_uInt8 FBFarbe; // [Index]
+ sal_uInt8 FIntens; // [%]
+ sal_uInt8 FDummy1; //
+ sal_Int16 FDummy2; //
+ sal_uInt16 FMuster; // [Index] inkl. Invers, Transparenz
};
#define ObjTextTypeSize 64
@@ -108,24 +108,24 @@ class ObjTextType {
public:
ObjLineType L; // Text-Outline (future)
ObjAreaType F; // Text innen
- UINT16 FontLo,FontHi;// z.B. 92500 (CG Times), zweigeteilt wegen DWordAllign in TextType.
- UINT16 Grad; // 0.5..32767.5 Pt - bei 1000 Pt sollte aber schlu� sein
- UINT16 Breite; // 1..65535% bitte nicht mehr als 500%
- BYTE Justify; // 2 Bit Vert (Hi), 3 Bit Hor (Lo)
- BYTE Kapit; // 1..255%
- UINT16 Schnitt; // 8 Flags
- UINT16 LnFeed; // 1..32767% vom max. Schriftgrad der Zeile
- UINT16 Slant; // Kursivwinkel 0.00..89.99� default 15.00� doppelt Breit angesehen)
- BYTE ZAbst; // Zeichenabstand 0..255% (0=auf der Stelle; 100=normal; 200=Zeichen wird als
- INT8 ChrVPos; // Zeichen V-Position default 0= on Baseline, 10= 5Pt drunter (-64..63�)
+ sal_uInt16 FontLo,FontHi;// z.B. 92500 (CG Times), zweigeteilt wegen DWordAllign in TextType.
+ sal_uInt16 Grad; // 0.5..32767.5 Pt - bei 1000 Pt sollte aber schlu� sein
+ sal_uInt16 Breite; // 1..65535% bitte nicht mehr als 500%
+ sal_uInt8 Justify; // 2 Bit Vert (Hi), 3 Bit Hor (Lo)
+ sal_uInt8 Kapit; // 1..255%
+ sal_uInt16 Schnitt; // 8 Flags
+ sal_uInt16 LnFeed; // 1..32767% vom max. Schriftgrad der Zeile
+ sal_uInt16 Slant; // Kursivwinkel 0.00..89.99� default 15.00� doppelt Breit angesehen)
+ sal_uInt8 ZAbst; // Zeichenabstand 0..255% (0=auf der Stelle; 100=normal; 200=Zeichen wird als
+ sal_sChar ChrVPos; // Zeichen V-Position default 0= on Baseline, 10= 5Pt drunter (-64..63�)
ObjLineType ShdL; // Schatten-Outline (neu 2.0)
ObjAreaType ShdF; // Schatten-innen (neu 2.0)
PointType ShdVers; // Schattenversatz Max.300.00%
- BOOL ShdAbs; // True-> Schattenversatz ist absolut statt relativ zum Schriftgrad
- BOOL NoSpc; // True-> kein Zwischenraum (f�r BackArea)
+ sal_Bool ShdAbs; // True-> Schattenversatz ist absolut statt relativ zum Schriftgrad
+ sal_Bool NoSpc; // True-> kein Zwischenraum (f�r BackArea)
ObjAreaType BackF; // Hintergrundfl�che
- UINT32 GetFont();
- void SetFont(UINT32 FontID);
+ sal_uInt32 GetFont();
+ void SetFont(sal_uInt32 FontID);
};
class Obj0Type { // SuperClass f�r Apple-VMT
@@ -137,16 +137,16 @@ public:
#define ObjkSize 20 /* eigentlich 21. Wg. Allignment ist Flags jedoch verschoben worden*/
class ObjkType: public Obj0Type { // Grundkomponenten aller Stardraw-Objekte
public:
- UINT32 Last;
- UINT32 Next;
- UINT16 MemSize; // in Bytes
+ sal_uInt32 Last;
+ sal_uInt32 Next;
+ sal_uInt16 MemSize; // in Bytes
PointType ObjMin; // XY-Minimum des Objekts
PointType ObjMax; // XY-Maximum des Objekts
- BYTE Art;
- BYTE Layer;
-// BYTE Flags; // (Schummel f�r Allignment unter NT)
+ sal_uInt8 Art;
+ sal_uInt8 Layer;
+// sal_uInt8 Flags; // (Schummel f�r Allignment unter NT)
friend SvStream& operator>>(SvStream& rIStream, ObjkType& rObjk);
- friend BOOL ObjOverSeek(SvStream& rInp, ObjkType& rObjk);
+ friend sal_Bool ObjOverSeek(SvStream& rInp, ObjkType& rObjk);
virtual void Draw(OutputDevice& rOut);
};
@@ -154,8 +154,8 @@ public:
#define StrkSize 38
class StrkType: public ObjkType {
public:
- BYTE Flags; // (Schummel f�r Allignment unter NT)
- BYTE LEnden; // Linienenden
+ sal_uInt8 Flags; // (Schummel f�r Allignment unter NT)
+ sal_uInt8 LEnden; // Linienenden
ObjLineType L;
PointType Pos1; // Anfangspunkt
PointType Pos2; // Endpunkt
@@ -167,15 +167,15 @@ public:
#define RectSize 52
class RectType: public ObjkType {
public:
- BYTE Flags; // (Schummel f�r Allignment unter NT)
- BYTE Reserve;
+ sal_uInt8 Flags; // (Schummel f�r Allignment unter NT)
+ sal_uInt8 Reserve;
ObjLineType L;
ObjAreaType F;
PointType Pos1; // LO-Ecke = Bezugspunkt
PointType Pos2; // R-Ecke
- INT16 Radius; // Eckenradius
- UINT16 DrehWink; // 315...<45
- UINT16 Slant; // >270...<90
+ sal_Int16 Radius; // Eckenradius
+ sal_uInt16 DrehWink; // 315...<45
+ sal_uInt16 Slant; // >270...<90
friend SvStream& operator>>(SvStream& rIStream, RectType& rRect);
virtual void Draw(OutputDevice& rOut);
};
@@ -184,13 +184,13 @@ public:
#define PolySize 44
class PolyType: public ObjkType { // identisch mit Spline !
public:
- BYTE Flags; // (Schummel f�r Allignment unter NT)
- BYTE LEnden; // nur f�r Polyline
+ sal_uInt8 Flags; // (Schummel f�r Allignment unter NT)
+ sal_uInt8 LEnden; // nur f�r Polyline
ObjLineType L;
ObjAreaType F; // nicht f�r Polyline
- BYTE nPoints;
- BYTE Reserve;
- UINT32 SD_EckP; // Zeiger auf die Eckpunkte (StarDraw)
+ sal_uInt8 nPoints;
+ sal_uInt8 Reserve;
+ sal_uInt32 SD_EckP; // Zeiger auf die Eckpunkte (StarDraw)
PointType* EckP; // Zeiger auf die Eckpunkte (StarView (wird nicht von Disk gelesen!))
friend SvStream& operator>>(SvStream& rIStream, PolyType& rPoly);
virtual void Draw(OutputDevice& rOut);
@@ -201,13 +201,13 @@ public:
#define SplnSize 44
class SplnType: public ObjkType { // identisch mit Poly !
public:
- BYTE Flags; // (Schummel f�r Allignment unter NT)
- BYTE LEnden; // nur f�r nSpline
+ sal_uInt8 Flags; // (Schummel f�r Allignment unter NT)
+ sal_uInt8 LEnden; // nur f�r nSpline
ObjLineType L;
ObjAreaType F; // nicht f�r nSpline
- BYTE nPoints;
- BYTE Reserve;
- UINT32 SD_EckP; // Zeiger auf die Eckpunkte (StarDraw)
+ sal_uInt8 nPoints;
+ sal_uInt8 Reserve;
+ sal_uInt32 SD_EckP; // Zeiger auf die Eckpunkte (StarDraw)
PointType* EckP; // Zeiger auf die Eckpunkte (StarView (wird nicht von Disk gelesen!))
friend SvStream& operator>>(SvStream& rIStream, SplnType& rSpln);
virtual void Draw(OutputDevice& rOut);
@@ -218,15 +218,15 @@ public:
#define CircSize 52
class CircType: public ObjkType {
public:
- BYTE Flags; // (Schummel f�r Allignment unter NT)
- BYTE LEnden; // nur Bogen (Kr & El)
+ sal_uInt8 Flags; // (Schummel f�r Allignment unter NT)
+ sal_uInt8 LEnden; // nur Bogen (Kr & El)
ObjLineType L;
ObjAreaType F; // nicht f�r Bogen (Kr & El)
PointType Center; // Mittelpunkt
PointType Radius; // Radius
- UINT16 DrehWink; // nur Ellipse
- UINT16 StartWink; // � nicht f�r Vollkreis
- UINT16 RelWink; // � und Vollellipse
+ sal_uInt16 DrehWink; // nur Ellipse
+ sal_uInt16 StartWink; // � nicht f�r Vollkreis
+ sal_uInt16 RelWink; // � und Vollellipse
friend SvStream& operator>>(SvStream& rIStream, CircType& rCirc);
virtual void Draw(OutputDevice& rOut);
};
@@ -239,19 +239,19 @@ public:
#define TextSize 116
class TextType: public ObjkType {
public:
- BYTE Flags; // (Schummel f�r Allignment unter NT)
- BYTE Reserve; // f�r Word Allign
+ sal_uInt8 Flags; // (Schummel f�r Allignment unter NT)
+ sal_uInt8 Reserve; // f�r Word Allign
ObjTextType T; // 64 Bytes << DWord-Allign bei FontID erforderlich
PointType Pos1; // Bezugspunkt (ObenLinks)
PointType Pos2; // (untenRechts)
- INT16 TopOfs; // Von Oberkante bis Textbegin (future f�r vJustify)
- UINT16 DrehWink; // 0...<360
- UINT16 BoxSlant; // >270...<90 (nur Box)
- UINT16 BufSize; // Gr��e von Buf f�r Load, Save, Copy und so
- UINT16 BufLo,BufHi;// (UCHAR*) Zeiger auf den Textbuffer << ShortArr, weil sonst DWord-Allign erforderlich
- UINT16 ExtLo,ExtHi;// (Ptr) Text �ber mehrere Rahmen << ShortArr, weil sonst DWord-Allign erforderlich
+ sal_Int16 TopOfs; // Von Oberkante bis Textbegin (future f�r vJustify)
+ sal_uInt16 DrehWink; // 0...<360
+ sal_uInt16 BoxSlant; // >270...<90 (nur Box)
+ sal_uInt16 BufSize; // Gr��e von Buf f�r Load, Save, Copy und so
+ sal_uInt16 BufLo,BufHi;// (UCHAR*) Zeiger auf den Textbuffer << ShortArr, weil sonst DWord-Allign erforderlich
+ sal_uInt16 ExtLo,ExtHi;// (Ptr) Text �ber mehrere Rahmen << ShortArr, weil sonst DWord-Allign erforderlich
PointType FitSize; // Ursprungsgr��e f�r Fit2Size
- INT16 FitBreit; // Breite zum formatieren bei Fit2Size
+ sal_Int16 FitBreit; // Breite zum formatieren bei Fit2Size
UCHAR* Buffer; // Diese Variable wird nicht durch Lesen von Disk gef�llt, sondern explizit!
friend SvStream& operator>>(SvStream& rIStream, TextType& rText);
virtual void Draw(OutputDevice& rOut);
@@ -268,21 +268,21 @@ enum GrafStat {NoGraf,Pic,Pcx,Hpgl,Img,Msp,Tiff,Dxf,Lot,Usr,Sgf};
#define BmapSize 132
class BmapType: public ObjkType {
public:
- BYTE Flags; // (Schummel f�r Allignment unter NT)
- BYTE Reserve;
+ sal_uInt8 Flags; // (Schummel f�r Allignment unter NT)
+ sal_uInt8 Reserve;
ObjAreaType F; // Farbe und Muster der 1-Plane Bitmap
PointType Pos1;
PointType Pos2;
- UINT16 DrehWink; // 315...<45 (Future)
- UINT16 Slant; // >270...<90 (Future)
+ sal_uInt16 DrehWink; // 315...<45 (Future)
+ sal_uInt16 Slant; // >270...<90 (Future)
UCHAR Filename[80]; // Pfad
PointType PixSize; // Gr��e in Pixel (0 bei Vektor)
GrafStat Format; // siehe GpmDef.Pas
- BYTE nPlanes; // Anzahl der Bitplanes (0 bei Vektor)
- BOOL RawOut; // als Raw ausgeben ?
- BOOL InvOut; // invertiert ausgeben ?
- BOOL LightOut; // aufhellen? (SD20)
- BYTE GrfFlg; // (SD20) 0=nSGF 1=Pcx 2=Hpgl 4=Raw $FF=Undef(f�r Fix in DrawBmp)
+ sal_uInt8 nPlanes; // Anzahl der Bitplanes (0 bei Vektor)
+ sal_Bool RawOut; // als Raw ausgeben ?
+ sal_Bool InvOut; // invertiert ausgeben ?
+ sal_Bool LightOut; // aufhellen? (SD20)
+ sal_uInt8 GrfFlg; // (SD20) 0=nSGF 1=Pcx 2=Hpgl 4=Raw $FF=Undef(f�r Fix in DrawBmp)
INetURLObject aFltPath; // F�r GraphicFilter
friend SvStream& operator>>(SvStream& rIStream, BmapType& rBmap);
@@ -294,13 +294,13 @@ public:
#define GrupSize 48
class GrupType: public ObjkType {
public:
- BYTE Flags; // (Schummel f�r Allignment unter NT)
+ sal_uInt8 Flags; // (Schummel f�r Allignment unter NT)
UCHAR Name[13]; // Name der Gruppe
- UINT16 SbLo,SbHi; // (Ptr) Gruppenliste << ShortArr, weil sonst DWord Allign erforderlich
- UINT16 UpLo,UpHi; // (Ptr) Vaterliste << ShortArr, weil sonst DWord Allign erforderlich
- UINT16 ChartSize; // Speicherbedarf der Diagrammstruktur Struktur
- UINT32 ChartPtr; // Diagrammstruktur
- UINT32 GetSubPtr(); // hier nur zum Checken, ob Sublist evtl. leer ist.
+ sal_uInt16 SbLo,SbHi; // (Ptr) Gruppenliste << ShortArr, weil sonst DWord Allign erforderlich
+ sal_uInt16 UpLo,UpHi; // (Ptr) Vaterliste << ShortArr, weil sonst DWord Allign erforderlich
+ sal_uInt16 ChartSize; // Speicherbedarf der Diagrammstruktur Struktur
+ sal_uInt32 ChartPtr; // Diagrammstruktur
+ sal_uInt32 GetSubPtr(); // hier nur zum Checken, ob Sublist evtl. leer ist.
friend SvStream& operator>>(SvStream& rIStream, GrupType& rGrup);
// virtual void Draw(OutputDevice& rOut);
};
@@ -308,26 +308,26 @@ public:
void SetLine(ObjLineType& rLine, OutputDevice& rOut);
void SetArea(ObjAreaType& rArea, OutputDevice& rOut);
-Color Sgv2SvFarbe(BYTE nFrb1, BYTE nFrb2, BYTE nInts);
-void RotatePoint(PointType& P, INT16 cx, INT16 cy, double sn, double cs);
-void RotatePoint(Point& P, INT16 cx, INT16 cy, double sn, double cs);
-INT16 iMulDiv(INT16 a, INT16 Mul, INT16 Div);
-UINT16 MulDiv(UINT16 a, UINT16 Mul, UINT16 Div);
+Color Sgv2SvFarbe(sal_uInt8 nFrb1, sal_uInt8 nFrb2, sal_uInt8 nInts);
+void RotatePoint(PointType& P, sal_Int16 cx, sal_Int16 cy, double sn, double cs);
+void RotatePoint(Point& P, sal_Int16 cx, sal_Int16 cy, double sn, double cs);
+sal_Int16 iMulDiv(sal_Int16 a, sal_Int16 Mul, sal_Int16 Div);
+sal_uInt16 MulDiv(sal_uInt16 a, sal_uInt16 Mul, sal_uInt16 Div);
class SgfFontOne {
public:
SgfFontOne* Next; // Zeiger f�r Listenverkettung
- UINT32 IFID;
- BOOL Bold;
- BOOL Ital;
- BOOL Sans;
- BOOL Serf;
- BOOL Fixd;
+ sal_uInt32 IFID;
+ sal_Bool Bold;
+ sal_Bool Ital;
+ sal_Bool Sans;
+ sal_Bool Serf;
+ sal_Bool Fixd;
FontFamily SVFamil;
CharSet SVChSet;
String SVFName; // z.B. "Times New Roman" = 15 Chars
- USHORT SVWidth; // Durchschnittliche Zeichenbreite in %
+ sal_uInt16 SVWidth; // Durchschnittliche Zeichenbreite in %
SgfFontOne();
void ReadOne( ByteString& ID, ByteString& Dsc);
};
@@ -337,15 +337,15 @@ public:
String FNam; // vollst�ndiger Filename des Inifiles
SgfFontOne* pList; // Listenanfang
SgfFontOne* Last; // Listenende
- UINT32 LastID; // f�r schnelleren Zugriff bei Wiederholungen
+ sal_uInt32 LastID; // f�r schnelleren Zugriff bei Wiederholungen
SgfFontOne* LastLn; // f�r schnelleren Zugriff bei Wiederholungen
- BOOL Tried;
+ sal_Bool Tried;
SgfFontLst();
~SgfFontLst();
void AssignFN(const String& rFName);
void ReadList();
void RausList();
- SgfFontOne* GetFontDesc(UINT32 ID);
+ SgfFontOne* GetFontDesc(sal_uInt32 ID);
};
#endif //_SGVMAIN_HXX
diff --git a/svtools/source/inc/sgvspln.hxx b/svtools/source/inc/sgvspln.hxx
index 29df09247f22..3bb7ea85374b 100644
--- a/svtools/source/inc/sgvspln.hxx
+++ b/svtools/source/inc/sgvspln.hxx
@@ -38,7 +38,7 @@
|* Polygons werden als Sttzstellen angenommen.
|* n liefert die Anzahl der Teilpolynome.
|* Ist die Berechnung fehlerfrei verlaufen, so
-|* liefert die Funktion TRUE. Nur in diesem Fall
+|* liefert die Funktion sal_True. Nur in diesem Fall
|* ist Speicher fr die Koeffizientenarrays
|* allokiert, der dann sp„ter vom Aufrufer mittels
|* delete freizugeben ist.
@@ -47,7 +47,7 @@
|*
*************************************************************************/
-BOOL CalcSpline(Polygon& rPoly, BOOL Periodic, USHORT& n,
+sal_Bool CalcSpline(Polygon& rPoly, sal_Bool Periodic, sal_uInt16& n,
double*& ax, double*& ay, double*& bx, double*& by,
double*& cx, double*& cy, double*& dx, double*& dy, double*& T);
@@ -58,9 +58,9 @@ BOOL CalcSpline(Polygon& rPoly, BOOL Periodic, USHORT& n,
|* Beschreibung Konvertiert einen parametrichen kubischen
|* Polynomspline Spline (natrlich oder periodisch)
|* in ein angen„hertes Polygon.
-|* Die Funktion liefert FALSE, wenn ein Fehler bei
+|* Die Funktion liefert sal_False, wenn ein Fehler bei
|* der Koeffizientenberechnung aufgetreten ist oder
-|* das Polygon zu groá wird (>PolyMax=16380). Im 1.
+|* das Polygon zu gro?wird (>PolyMax=16380). Im 1.
|* Fall hat das Polygon 0, im 2. Fall PolyMax Punkte.
|* Um Koordinatenberl„ufe zu vermeiden werden diese
|* auf +/-32000 begrenzt.
@@ -68,6 +68,6 @@ BOOL CalcSpline(Polygon& rPoly, BOOL Periodic, USHORT& n,
|* Letzte Aenderung JOE 23.06.93
|*
*************************************************************************/
-BOOL Spline2Poly(Polygon& rSpln, BOOL Periodic, Polygon& rPoly);
+sal_Bool Spline2Poly(Polygon& rSpln, sal_Bool Periodic, Polygon& rPoly);
#endif //_SGVSPLN_HXX
diff --git a/svtools/source/inc/svimpbox.hxx b/svtools/source/inc/svimpbox.hxx
index f9e4ee6951fb..d90329afb28d 100644
--- a/svtools/source/inc/svimpbox.hxx
+++ b/svtools/source/inc/svimpbox.hxx
@@ -64,9 +64,9 @@ public:
void BeginDrag();
void CreateAnchor();
void DestroyAnchor();
- BOOL SetCursorAtPoint( const Point& rPoint,
- BOOL bDontSelectAtCursor=FALSE );
- BOOL IsSelectionAtPoint( const Point& rPoint );
+ sal_Bool SetCursorAtPoint( const Point& rPoint,
+ sal_Bool bDontSelectAtCursor=sal_False );
+ sal_Bool IsSelectionAtPoint( const Point& rPoint );
void DeselectAtPoint( const Point& rPoint );
void DeselectAll();
};
@@ -147,22 +147,22 @@ private:
long nNodeBmpWidth;
long nNextVerVisSize;
long nMostRight;
- ULONG nVisibleCount; // Anzahl Zeilen im Control
- ULONG nCurUserEvent; //-1 == kein Userevent amn Laufen
+ sal_uLong nVisibleCount; // Anzahl Zeilen im Control
+ sal_uLong nCurUserEvent; //-1 == kein Userevent amn Laufen
short nHorSBarHeight, nVerSBarWidth;
- USHORT nFlags;
- USHORT nCurTabPos;
+ sal_uInt16 nFlags;
+ sal_uInt16 nCurTabPos;
WinBits m_nStyle;
ExtendedWinBits nExtendedWinBits;
- BOOL bSimpleTravel : 1; // ist TRUE bei SINGLE_SELECTION
- BOOL bUpdateMode : 1;
- BOOL bInVScrollHdl : 1;
- BOOL bAsyncBeginDrag : 1;
- BOOL bSubLstOpRet : 1; // open/close sublist with return/enter, defaulted with FALSE
- BOOL bSubLstOpLR : 1; // open/close sublist with cursor left/right, defaulted with FALSE
- BOOL bContextMenuHandling : 1;
- BOOL bIsCellFocusEnabled : 1;
+ sal_Bool bSimpleTravel : 1; // ist sal_True bei SINGLE_SELECTION
+ sal_Bool bUpdateMode : 1;
+ sal_Bool bInVScrollHdl : 1;
+ sal_Bool bAsyncBeginDrag : 1;
+ sal_Bool bSubLstOpRet : 1; // open/close sublist with return/enter, defaulted with sal_False
+ sal_Bool bSubLstOpLR : 1; // open/close sublist with cursor left/right, defaulted with sal_False
+ sal_Bool bContextMenuHandling : 1;
+ sal_Bool bIsCellFocusEnabled : 1;
sal_Bool bAreChildrenTransient;
@@ -186,16 +186,16 @@ private:
void ShowVerSBar();
// setzt Thumb auf FirstEntryToDraw
void SyncVerThumb();
- BOOL IsLineVisible( long nY ) const;
+ sal_Bool IsLineVisible( long nY ) const;
long GetEntryLine( SvLBoxEntry* pEntry ) const;
void FillView();
void CursorDown();
void CursorUp();
void KeyLeftRight( long nDiff );
- void PageDown( USHORT nDelta );
- void PageUp( USHORT nDelta );
+ void PageDown( sal_uInt16 nDelta );
+ void PageUp( sal_uInt16 nDelta );
- void SetCursor( SvLBoxEntry* pEntry, BOOL bForceNoSelect = FALSE );
+ void SetCursor( SvLBoxEntry* pEntry, sal_Bool bForceNoSelect = sal_False );
void DrawNet();
@@ -209,39 +209,39 @@ private:
// Selection-Engine
SvLBoxEntry* MakePointVisible( const Point& rPoint,
- BOOL bNotifyScroll=TRUE );
+ sal_Bool bNotifyScroll=sal_True );
void SetAnchorSelection( SvLBoxEntry* pOld,
SvLBoxEntry* pNewCursor );
void BeginDrag();
- BOOL ButtonDownCheckCtrl( const MouseEvent& rMEvt,
+ sal_Bool ButtonDownCheckCtrl( const MouseEvent& rMEvt,
SvLBoxEntry* pEntry, long nY );
- BOOL MouseMoveCheckCtrl( const MouseEvent& rMEvt,
+ sal_Bool MouseMoveCheckCtrl( const MouseEvent& rMEvt,
SvLBoxEntry* pEntry );
- BOOL ButtonUpCheckCtrl( const MouseEvent& rMEvt );
- BOOL ButtonDownCheckExpand( const MouseEvent&,
+ sal_Bool ButtonUpCheckCtrl( const MouseEvent& rMEvt );
+ sal_Bool ButtonDownCheckExpand( const MouseEvent&,
SvLBoxEntry*,long nY );
- void PositionScrollBars( Size& rOSize, USHORT nMask );
- USHORT AdjustScrollBars( Size& rSize );
+ void PositionScrollBars( Size& rOSize, sal_uInt16 nMask );
+ sal_uInt16 AdjustScrollBars( Size& rSize );
void BeginScroll();
void EndScroll();
- BOOL InScroll() const { return (BOOL)(nFlags & F_IN_SCROLLING)!=0;}
+ sal_Bool InScroll() const { return (sal_Bool)(nFlags & F_IN_SCROLLING)!=0;}
Rectangle GetVisibleArea() const;
- BOOL EntryReallyHit(SvLBoxEntry* pEntry,const Point& rPos,long nLine);
+ sal_Bool EntryReallyHit(SvLBoxEntry* pEntry,const Point& rPos,long nLine);
void InitScrollBarBox();
SvLBoxTab* NextTab( SvLBoxTab* );
- BOOL SetMostRight( SvLBoxEntry* pEntry );
+ sal_Bool SetMostRight( SvLBoxEntry* pEntry );
void FindMostRight( SvLBoxEntry* EntryToIgnore );
void FindMostRight( SvLBoxEntry* pParent, SvLBoxEntry* EntryToIgnore );
void FindMostRight_Impl( SvLBoxEntry* pParent,SvLBoxEntry* EntryToIgnore );
void NotifyTabsChanged();
- inline BOOL IsExpandable() const // if element at cursor can be expanded in general
+ inline sal_Bool IsExpandable() const // if element at cursor can be expanded in general
{ return pCursor->HasChilds() || pCursor->HasChildsOnDemand(); }
- inline BOOL IsNowExpandable() const // if element at cursor can be expanded at this moment
+ inline sal_Bool IsNowExpandable() const // if element at cursor can be expanded at this moment
{ return IsExpandable() && !pView->IsExpanded( pCursor ); }
static void implInitDefaultNodeImages();
@@ -280,40 +280,40 @@ public:
void EntryExpanded( SvLBoxEntry* pEntry );
void EntryCollapsed( SvLBoxEntry* pEntry );
void CollapsingEntry( SvLBoxEntry* pEntry );
- void EntrySelected( SvLBoxEntry*, BOOL bSelect );
+ void EntrySelected( SvLBoxEntry*, sal_Bool bSelect );
void Paint( const Rectangle& rRect );
void RepaintSelectionItems();
void MouseButtonDown( const MouseEvent& );
void MouseButtonUp( const MouseEvent& );
void MouseMove( const MouseEvent&);
- BOOL KeyInput( const KeyEvent& );
+ sal_Bool KeyInput( const KeyEvent& );
void Resize();
void GetFocus();
void LoseFocus();
void UpdateAll(
- BOOL bInvalidateCompleteView= TRUE,
- BOOL bUpdateVerSBar = TRUE );
+ sal_Bool bInvalidateCompleteView= sal_True,
+ sal_Bool bUpdateVerSBar = sal_True );
void SetEntryHeight( short nHeight );
void PaintEntry( SvLBoxEntry* pEntry );
void InvalidateEntry( SvLBoxEntry* );
void RecalcFocusRect();
- inline void SelectEntry( SvLBoxEntry* pEntry, BOOL bSelect );
+ inline void SelectEntry( SvLBoxEntry* pEntry, sal_Bool bSelect );
void SetDragDropMode( DragDropMode eDDMode );
void SetSelectionMode( SelectionMode eSelMode );
- void SetAddMode( BOOL ) { aSelEng.AddAlways(FALSE); }
- BOOL IsAddMode() const { return aSelEng.IsAlwaysAdding(); }
+ void SetAddMode( sal_Bool ) { aSelEng.AddAlways(sal_False); }
+ sal_Bool IsAddMode() const { return aSelEng.IsAlwaysAdding(); }
SvLBoxEntry* GetCurrentEntry() const { return pCursor; }
- BOOL IsEntryInView( SvLBoxEntry* ) const;
+ sal_Bool IsEntryInView( SvLBoxEntry* ) const;
SvLBoxEntry* GetEntry( const Point& rPos ) const;
// gibt letzten Eintrag zurueck, falls Pos unter letztem Eintrag
SvLBoxEntry* GetClickedEntry( const Point& ) const;
SvLBoxEntry* GetCurEntry() const { return pCursor; }
void SetCurEntry( SvLBoxEntry* );
Point GetEntryPosition( SvLBoxEntry* ) const;
- void MakeVisible( SvLBoxEntry* pEntry, BOOL bMoveToTop=FALSE );
+ void MakeVisible( SvLBoxEntry* pEntry, sal_Bool bMoveToTop=sal_False );
void PaintDDCursor( SvLBoxEntry* );
@@ -338,38 +338,38 @@ public:
static const Image& GetDefaultCollapsedNodeImage( BmpColorMode _eMode = BMP_COLOR_NORMAL );
const Size& GetOutputSize() const { return aOutputSize;}
- void KeyUp( BOOL bPageUp, BOOL bNotifyScroll = TRUE );
- void KeyDown( BOOL bPageDown, BOOL bNotifyScroll = TRUE );
+ void KeyUp( sal_Bool bPageUp, sal_Bool bNotifyScroll = sal_True );
+ void KeyDown( sal_Bool bPageDown, sal_Bool bNotifyScroll = sal_True );
void Command( const CommandEvent& rCEvt );
void Invalidate();
void DestroyAnchor() { pAnchor=0; aSelEng.Reset(); }
- void SelAllDestrAnch( BOOL bSelect,
- BOOL bDestroyAnchor = TRUE,
- BOOL bSingleSelToo = FALSE );
- void ShowCursor( BOOL bShow );
+ void SelAllDestrAnch( sal_Bool bSelect,
+ sal_Bool bDestroyAnchor = sal_True,
+ sal_Bool bSingleSelToo = sal_False );
+ void ShowCursor( sal_Bool bShow );
- BOOL RequestHelp( const HelpEvent& rHEvt );
+ sal_Bool RequestHelp( const HelpEvent& rHEvt );
void EndSelection();
- BOOL IsNodeButton( const Point& rPosPixel, SvLBoxEntry* pEntry ) const;
+ sal_Bool IsNodeButton( const Point& rPosPixel, SvLBoxEntry* pEntry ) const;
void RepaintScrollBars();
- void EnableAsyncDrag( BOOL b) { bAsyncBeginDrag = b; }
- void SetUpdateMode( BOOL );
- void SetUpdateModeFast( BOOL );
- BOOL GetUpdateMode() const { return bUpdateMode; }
+ void EnableAsyncDrag( sal_Bool b) { bAsyncBeginDrag = b; }
+ void SetUpdateMode( sal_Bool );
+ void SetUpdateModeFast( sal_Bool );
+ sal_Bool GetUpdateMode() const { return bUpdateMode; }
Rectangle GetClipRegionRect() const;
- BOOL HasHorScrollBar() const { return aHorSBar.IsVisible(); }
+ sal_Bool HasHorScrollBar() const { return aHorSBar.IsVisible(); }
void ShowFocusRect( const SvLBoxEntry* pEntry );
void SetTabBar( TabBar* pTabBar );
void CancelPendingEdit();
- void CallEventListeners( ULONG nEvent, void* pData = NULL );
+ void CallEventListeners( sal_uLong nEvent, void* pData = NULL );
/** Enables, that one cell of a tablistbox entry can be focused */
- inline BOOL IsCellFocusEnabled() const { return bIsCellFocusEnabled; }
- inline void EnableCellFocus() { bIsCellFocusEnabled = TRUE; }
- bool SetCurrentTabPos( USHORT _nNewPos );
- inline USHORT GetCurrentTabPos() const { return nCurTabPos; }
+ inline sal_Bool IsCellFocusEnabled() const { return bIsCellFocusEnabled; }
+ inline void EnableCellFocus() { bIsCellFocusEnabled = sal_True; }
+ bool SetCurrentTabPos( sal_uInt16 _nNewPos );
+ inline sal_uInt16 GetCurrentTabPos() const { return nCurTabPos; }
bool IsSelectable( const SvLBoxEntry* pEntry );
};
@@ -457,11 +457,11 @@ inline void SvImpLBox::PaintEntry( SvLBoxEntry* pEntry )
pView->PaintEntry( pEntry, nY );
}
-inline BOOL SvImpLBox::IsLineVisible( long nY ) const
+inline sal_Bool SvImpLBox::IsLineVisible( long nY ) const
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if ( nY < 0 || nY >= aOutputSize.Height() )
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
diff --git a/svtools/source/inc/svimpicn.hxx b/svtools/source/inc/svimpicn.hxx
index 7d5c2b1b41e3..b516ca9bfe25 100644
--- a/svtools/source/inc/svimpicn.hxx
+++ b/svtools/source/inc/svimpicn.hxx
@@ -103,8 +103,8 @@ class SvImpIconView
long nMaxBmpHeight;
long nMaxTextWidth;
long nMaxBoundHeight; // Hoehe des hoechsten BoundRects
- ULONG nFlags;
- ULONG nCurUserEvent;
+ sal_uLong nFlags;
+ sal_uLong nCurUserEvent;
SvLBoxEntry* pCurParent;
SvLBoxEntry* pCursor;
SvLBoxEntry* pNextCursor; // wird in MovingEntry gesetzt und ist
@@ -115,12 +115,12 @@ class SvImpIconView
VirtualDevice* pDDTempDev;
SvIconViewTextMode eTextMode;
- BOOL bMustRecalcBoundingRects;
+ sal_Bool bMustRecalcBoundingRects;
void CheckAllSizes();
void CheckSizes( SvLBoxEntry* pEntry,
const SvIcnVwDataEntry* pViewData = 0 );
- void ShowCursor( BOOL bShow );
+ void ShowCursor( sal_Bool bShow );
void SetNextEntryPos(const Point& rPos);
Point FindNextEntryPos( const Size& rBoundSize );
@@ -137,7 +137,7 @@ class SvImpIconView
void AdjustScrollBars();
void PositionScrollBars( long nRealWidth, long nRealHeight );
void CalcDocPos( Point& aMousePos );
- BOOL GetResizeRect( Rectangle& );
+ sal_Bool GetResizeRect( Rectangle& );
void PaintResizeRect( const Rectangle& );
SvLBoxEntry* GetNewCursor();
void ToggleSelection( SvLBoxEntry* );
@@ -160,8 +160,8 @@ class SvImpIconView
SvIconViewTextMode GetEntryTextModeSmart( const SvLBoxEntry* pEntry,
const SvIcnVwDataEntry* pViewData ) const;
- BOOL CheckVerScrollBar();
- BOOL CheckHorScrollBar();
+ sal_Bool CheckVerScrollBar();
+ sal_Bool CheckHorScrollBar();
void CancelUserEvent();
public:
@@ -169,7 +169,7 @@ public:
SvImpIconView( SvIconView* pView, SvLBoxTreeList*, WinBits nWinStyle );
~SvImpIconView();
- void Clear( BOOL bInCtor = FALSE );
+ void Clear( sal_Bool bInCtor = sal_False );
void SetStyle( const WinBits i_nWinStyle );
void SetModel( SvLBoxTreeList* pTree, SvLBoxEntry* pParent )
{ pModel = pTree; SetCurParent(pParent); }
@@ -184,14 +184,14 @@ public:
void EntryExpanded( SvLBoxEntry* pEntry );
void EntryCollapsed( SvLBoxEntry* pEntry );
void CollapsingEntry( SvLBoxEntry* pEntry );
- void EntrySelected( SvLBoxEntry*, BOOL bSelect );
+ void EntrySelected( SvLBoxEntry*, sal_Bool bSelect );
void Paint( const Rectangle& rRect );
void RepaintSelectionItems();
void MouseButtonDown( const MouseEvent& );
void MouseButtonUp( const MouseEvent& );
void MouseMove( const MouseEvent&);
- BOOL KeyInput( const KeyEvent& );
+ sal_Bool KeyInput( const KeyEvent& );
void Resize();
void GetFocus();
void LoseFocus();
@@ -201,8 +201,8 @@ public:
void PaintEntry( SvLBoxEntry*, const Point&,
SvIcnVwDataEntry* pViewData = 0, OutputDevice* pOut = 0);
void SetEntryPosition( SvLBoxEntry* pEntry, const Point& rPos,
- BOOL bAdjustRow = FALSE,
- BOOL bCheckScrollBars = FALSE );
+ sal_Bool bAdjustRow = sal_False,
+ sal_Bool bCheckScrollBars = sal_False );
void InvalidateEntry( SvLBoxEntry* );
void ViewDataInitialized( SvLBoxEntry* pEntry );
SvLBoxItem* GetItem( SvLBoxEntry*, const Point& rAbsPos );
@@ -217,7 +217,7 @@ public:
SvLBoxEntry* GetCurEntry() const { return pCursor; }
void SetCursor( SvLBoxEntry* );
- BOOL IsEntryInView( SvLBoxEntry* );
+ sal_Bool IsEntryInView( SvLBoxEntry* );
SvLBoxEntry* GetEntry( const Point& rDocPos );
SvLBoxEntry* GetNextEntry( const Point& rDocPos, SvLBoxEntry* pCurEntry );
SvLBoxEntry* GetPrevEntry( const Point& rDocPos, SvLBoxEntry* pCurEntry );
@@ -237,7 +237,7 @@ public:
SvIcnVwDataEntry* pViewData=0 );
Rectangle CalcTextRect( SvLBoxEntry*, SvLBoxString* pItem = 0,
const Point* pPos = 0,
- BOOL bForInplaceEdit = FALSE,
+ sal_Bool bForInplaceEdit = sal_False,
SvIcnVwDataEntry* pViewData = 0 );
long CalcBoundingWidth( SvLBoxEntry*, const SvIcnVwDataEntry* pViewData = 0) const;
@@ -254,22 +254,22 @@ public:
SvIcnVwDataEntry* pViewData=0);
void InvalidateBoundingRect( SvLBoxEntry* );
void InvalidateBoundingRect( Rectangle& rRect ) { rRect.Right() = LONG_MAX; }
- BOOL IsBoundingRectValid( const Rectangle& rRect ) const { return (BOOL)( rRect.Right() != LONG_MAX ); }
+ sal_Bool IsBoundingRectValid( const Rectangle& rRect ) const { return (sal_Bool)( rRect.Right() != LONG_MAX ); }
- void PaintEmphasis( const Rectangle&, BOOL bSelected,
- BOOL bCursored, OutputDevice* pOut = 0 );
+ void PaintEmphasis( const Rectangle&, sal_Bool bSelected,
+ sal_Bool bCursored, OutputDevice* pOut = 0 );
void PaintItem( const Rectangle& rRect, SvLBoxItem* pItem,
- SvLBoxEntry* pEntry, USHORT nPaintFlags, OutputDevice* pOut = 0 );
- // berechnet alle BoundingRects neu, wenn bMustRecalcBoundingRects == TRUE
+ SvLBoxEntry* pEntry, sal_uInt16 nPaintFlags, OutputDevice* pOut = 0 );
+ // berechnet alle BoundingRects neu, wenn bMustRecalcBoundingRects == sal_True
void CheckBoundingRects() { if (bMustRecalcBoundingRects) RecalcAllBoundingRects(); }
// berechnet alle invalidierten BoundingRects neu
void UpdateBoundingRects();
- void ShowTargetEmphasis( SvLBoxEntry* pEntry, BOOL bShow );
+ void ShowTargetEmphasis( SvLBoxEntry* pEntry, sal_Bool bShow );
SvLBoxEntry* GetDropTarget( const Point& rPosPixel );
- BOOL NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos );
- BOOL NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos );
+ sal_Bool NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+ SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos );
+ sal_Bool NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+ SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos );
void WriteDragServerInfo( const Point&, SvLBoxDDInfo* );
void ReadDragServerInfo( const Point&, SvLBoxDDInfo* );
@@ -277,9 +277,9 @@ public:
void SetCurParent( SvLBoxEntry* pNewParent );
SvLBoxEntry* GetCurParent() const { return pCurParent; }
- USHORT GetSelectionCount() const;
+ sal_uInt16 GetSelectionCount() const;
void SetGrid( long nDX, long nDY );
- void Scroll( long nDeltaX, long nDeltaY, BOOL bScrollBar = FALSE );
+ void Scroll( long nDeltaX, long nDeltaY, sal_Bool bScrollBar = sal_False );
const Size& GetItemSize( SvIconView* pView, SvLBoxEntry*, SvLBoxItem*,
const SvIcnVwDataEntry* pViewData = 0 ) const;
void PrepareCommandEvent( const Point& rPt );
@@ -290,18 +290,18 @@ public:
SvLBoxEntry* mpViewData;
- BOOL IsOver( SvPtrarr* pSelectedRectList, const Rectangle& rEntryBoundRect ) const;
- void SelectRect( const Rectangle&, BOOL bAdd = TRUE,
+ sal_Bool IsOver( SvPtrarr* pSelectedRectList, const Rectangle& rEntryBoundRect ) const;
+ void SelectRect( const Rectangle&, sal_Bool bAdd = sal_True,
SvPtrarr* pOtherRects = 0,
short nOffs = SELRECT_BORDER_OFFS );
void DrawSelectionRect( const Rectangle& );
void HideSelectionRect();
void CalcScrollOffsets( const Point& rRefPosPixel,
- long& rX, long& rY, BOOL bDragDrop = FALSE,
- USHORT nBorderWidth = 10 );
+ long& rX, long& rY, sal_Bool bDragDrop = sal_False,
+ sal_uInt16 nBorderWidth = 10 );
void EndTracking();
- BOOL IsTextHit( SvLBoxEntry* pEntry, const Point& rDocPos );
- void MakeVisible( const Rectangle& rDocPos,BOOL bInScrollBarEvent=FALSE);
+ sal_Bool IsTextHit( SvLBoxEntry* pEntry, const Point& rDocPos );
+ void MakeVisible( const Rectangle& rDocPos,sal_Bool bInScrollBarEvent=sal_False);
void AdjustAtGrid( SvLBoxEntry* pStart = 0 );
void SetTextMode( SvIconViewTextMode, SvLBoxEntry* pEntry = 0 );
SvIconViewTextMode GetTextMode( const SvLBoxEntry* pEntry = 0,
diff --git a/svtools/source/inc/xbmread.hxx b/svtools/source/inc/xbmread.hxx
index aab52eeffa63..5d6db03f73a7 100644
--- a/svtools/source/inc/xbmread.hxx
+++ b/svtools/source/inc/xbmread.hxx
@@ -69,13 +69,13 @@ class XBMReader : public GraphicReader
long nLastPos;
long nWidth;
long nHeight;
- BOOL bStatus;
+ sal_Bool bStatus;
void InitTable();
ByteString FindTokenLine( SvStream* pInStm, const char* pTok1,
const char* pTok2 = NULL, const char* pTok3 = NULL );
long ParseDefine( const sal_Char* pDefine );
- BOOL ParseData( SvStream* pInStm, const ByteString& aLastLine, XBMFormat eFormat );
+ sal_Bool ParseData( SvStream* pInStm, const ByteString& aLastLine, XBMFormat eFormat );
public:
@@ -92,6 +92,6 @@ public:
// - ImportXBM -
// -------------
-BOOL ImportXBM( SvStream& rStream, Graphic& rGraphic );
+sal_Bool ImportXBM( SvStream& rStream, Graphic& rGraphic );
#endif // _XBMREAD_HXX
diff --git a/svtools/source/inc/xpmread.hxx b/svtools/source/inc/xpmread.hxx
index 29edd15a3b1c..aea09db7596e 100644
--- a/svtools/source/inc/xpmread.hxx
+++ b/svtools/source/inc/xpmread.hxx
@@ -83,35 +83,35 @@ private:
BitmapWriteAccess* mpMaskAcc;
long mnLastPos;
- ULONG mnWidth;
- ULONG mnHeight;
- ULONG mnColors;
- ULONG mnCpp; // characters per pix
- BOOL mbTransparent;
- BOOL mbStatus;
- ULONG mnStatus;
- ULONG mnIdentifier;
- BYTE mcThisByte;
- BYTE mcLastByte;
- ULONG mnTempAvail;
- BYTE* mpTempBuf;
- BYTE* mpTempPtr;
- BYTE* mpFastColorTable;
- BYTE* mpColMap;
- ULONG mnStringSize;
- BYTE* mpStringBuf;
- ULONG mnParaSize;
- BYTE* mpPara;
-
- BOOL ImplGetString( void );
- BOOL ImplGetColor( ULONG );
- BOOL ImplGetScanLine( ULONG );
- BOOL ImplGetColSub( BYTE* );
- BOOL ImplGetColKey( BYTE );
- void ImplGetRGBHex( BYTE*, ULONG );
- BOOL ImplGetPara( ULONG numb );
- BOOL ImplCompare( BYTE*, BYTE*, ULONG, ULONG nmode = XPMCASENONSENSITIVE );
- ULONG ImplGetULONG( ULONG nPara );
+ sal_uLong mnWidth;
+ sal_uLong mnHeight;
+ sal_uLong mnColors;
+ sal_uLong mnCpp; // characters per pix
+ sal_Bool mbTransparent;
+ sal_Bool mbStatus;
+ sal_uLong mnStatus;
+ sal_uLong mnIdentifier;
+ sal_uInt8 mcThisByte;
+ sal_uInt8 mcLastByte;
+ sal_uLong mnTempAvail;
+ sal_uInt8* mpTempBuf;
+ sal_uInt8* mpTempPtr;
+ sal_uInt8* mpFastColorTable;
+ sal_uInt8* mpColMap;
+ sal_uLong mnStringSize;
+ sal_uInt8* mpStringBuf;
+ sal_uLong mnParaSize;
+ sal_uInt8* mpPara;
+
+ sal_Bool ImplGetString( void );
+ sal_Bool ImplGetColor( sal_uLong );
+ sal_Bool ImplGetScanLine( sal_uLong );
+ sal_Bool ImplGetColSub( sal_uInt8* );
+ sal_Bool ImplGetColKey( sal_uInt8 );
+ void ImplGetRGBHex( sal_uInt8*, sal_uLong );
+ sal_Bool ImplGetPara( sal_uLong numb );
+ sal_Bool ImplCompare( sal_uInt8*, sal_uInt8*, sal_uLong, sal_uLong nmode = XPMCASENONSENSITIVE );
+ sal_uLong ImplGetULONG( sal_uLong nPara );
public:
XPMReader( SvStream& rStm );
@@ -126,6 +126,6 @@ public:
// - ImportXPM -
// -------------
-BOOL ImportXPM( SvStream& rStream, Graphic& rGraphic );
+sal_Bool ImportXPM( SvStream& rStream, Graphic& rGraphic );
#endif // _XPMREAD_HXX
diff --git a/svtools/source/java/javainteractionhandler.cxx b/svtools/source/java/javainteractionhandler.cxx
index a7420dbc388f..1b236a1e4bee 100644
--- a/svtools/source/java/javainteractionhandler.cxx
+++ b/svtools/source/java/javainteractionhandler.cxx
@@ -137,7 +137,7 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque
com::sun::star::java::RestartRequiredException e5;
// Try to recover the Exception type in the any and
// react accordingly.
- USHORT nResult = RET_CANCEL;
+ sal_uInt16 nResult = RET_CANCEL;
::rtl::OUString aParameter;
if ( anyExc >>= e1 )
diff --git a/svtools/source/misc/acceleratorexecute.cxx b/svtools/source/misc/acceleratorexecute.cxx
index b89f30997950..59df22b580c6 100644
--- a/svtools/source/misc/acceleratorexecute.cxx
+++ b/svtools/source/misc/acceleratorexecute.cxx
@@ -286,7 +286,7 @@ KeyCode AcceleratorExecute::st_AWTKey2VCLKey(const css::awt::KeyEvent& aAWTKey)
sal_Bool bMod1 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD1 ) == css::awt::KeyModifier::MOD1 );
sal_Bool bMod2 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD2 ) == css::awt::KeyModifier::MOD2 );
sal_Bool bMod3 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD3 ) == css::awt::KeyModifier::MOD3 );
- USHORT nKey = (USHORT)aAWTKey.KeyCode;
+ sal_uInt16 nKey = (sal_uInt16)aAWTKey.KeyCode;
return KeyCode(nKey, bShift, bMod1, bMod2, bMod3);
}
diff --git a/svtools/source/misc/cliplistener.cxx b/svtools/source/misc/cliplistener.cxx
index a4e13be1d884..266950f10697 100644
--- a/svtools/source/misc/cliplistener.cxx
+++ b/svtools/source/misc/cliplistener.cxx
@@ -68,7 +68,7 @@ void SAL_CALL TransferableClipboardListener::changedContents(
}
}
-void TransferableClipboardListener::AddRemoveListener( Window* pWin, BOOL bAdd )
+void TransferableClipboardListener::AddRemoveListener( Window* pWin, sal_Bool bAdd )
{
try
{
diff --git a/svtools/source/misc/ehdl.cxx b/svtools/source/misc/ehdl.cxx
index 5e20e2197fb7..a8af73419271 100644
--- a/svtools/source/misc/ehdl.cxx
+++ b/svtools/source/misc/ehdl.cxx
@@ -47,9 +47,9 @@
//=========================================================================
-static USHORT aWndFunc(
+static sal_uInt16 aWndFunc(
Window *pWin, // Parent des Dialoges
- USHORT nFlags,
+ sal_uInt16 nFlags,
const String &rErr, // Fehlertext
const String &rAction) // Actiontext
@@ -132,7 +132,7 @@ static USHORT aWndFunc(
}
}
- USHORT nRet = RET_CANCEL;
+ sal_uInt16 nRet = RET_CANCEL;
switch ( pBox->Execute() )
{
case RET_OK:
@@ -160,7 +160,7 @@ static USHORT aWndFunc(
//-------------------------------------------------------------------------
-SfxErrorHandler::SfxErrorHandler(USHORT nIdP, ULONG lStartP, ULONG lEndP, ResMgr *pMgrP) :
+SfxErrorHandler::SfxErrorHandler(sal_uInt16 nIdP, sal_uLong lStartP, sal_uLong lEndP, ResMgr *pMgrP) :
lStart(lStartP), lEnd(lEndP), nId(nIdP), pMgr(pMgrP), pFreeMgr( NULL )
@@ -183,8 +183,8 @@ SfxErrorHandler::~SfxErrorHandler()
//-------------------------------------------------------------------------
-BOOL SfxErrorHandler::CreateString(
- const ErrorInfo *pErr, String &rStr, USHORT& nFlags) const
+sal_Bool SfxErrorHandler::CreateString(
+ const ErrorInfo *pErr, String &rStr, sal_uInt16& nFlags) const
/* [Beschreibung]
@@ -193,9 +193,9 @@ BOOL SfxErrorHandler::CreateString(
*/
{
- ULONG nErrCode = pErr->GetErrorCode() & ERRCODE_ERROR_MASK;
+ sal_uLong nErrCode = pErr->GetErrorCode() & ERRCODE_ERROR_MASK;
if( nErrCode>=lEnd || nErrCode<=lStart )
- return FALSE;
+ return sal_False;
MessageInfo *pMsgInfo=PTR_CAST(MessageInfo,pErr);
if(pMsgInfo)
{
@@ -209,7 +209,7 @@ BOOL SfxErrorHandler::CreateString(
break;
i = i + pMsgInfo->GetMessageArg().Len();
}
- return TRUE;
+ return sal_True;
}
}
else if(GetErrorString(nErrCode, rStr, nFlags))
@@ -229,10 +229,10 @@ BOOL SfxErrorHandler::CreateString(
TwoStringErrorInfo * pTwoStringInfo = PTR_CAST(TwoStringErrorInfo,
pErr);
if (pTwoStringInfo)
- for (USHORT i = 0; i < rStr.Len();)
+ for (sal_uInt16 i = 0; i < rStr.Len();)
{
- USHORT nArg1Pos = rStr.Search(String::CreateFromAscii( "$(ARG1)" ), i);
- USHORT nArg2Pos = rStr.Search(String::CreateFromAscii( "$(ARG2)" ), i);
+ sal_uInt16 nArg1Pos = rStr.Search(String::CreateFromAscii( "$(ARG1)" ), i);
+ sal_uInt16 nArg2Pos = rStr.Search(String::CreateFromAscii( "$(ARG2)" ), i);
if (nArg1Pos < nArg2Pos)
{
rStr.Replace(nArg1Pos, 7, pTwoStringInfo->GetArg1());
@@ -246,9 +246,9 @@ BOOL SfxErrorHandler::CreateString(
else break;
}
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//-------------------------------------------------------------------------
@@ -263,9 +263,9 @@ class ResString: public String
*/
{
- USHORT nFlags;
+ sal_uInt16 nFlags;
public:
- USHORT GetFlags() const {return nFlags;}
+ sal_uInt16 GetFlags() const {return nFlags;}
const String & GetString() const {return *this;}
ResString( ResId &rId);
};
@@ -273,14 +273,14 @@ class ResString: public String
//-------------------------------------------------------------------------
ResString::ResString(ResId & rId):
- String(rId.SetAutoRelease(FALSE)),
+ String(rId.SetAutoRelease(sal_False)),
nFlags(0)
{
ResMgr * pResMgr = rId.GetResMgr();
// String ctor temporarily sets global ResManager
if (pResMgr->GetRemainSize())
- nFlags = USHORT(pResMgr->ReadShort());
- rId.SetAutoRelease(TRUE);
+ nFlags = sal_uInt16(pResMgr->ReadShort());
+ rId.SetAutoRelease(sal_True);
pResMgr->PopContext();
}
@@ -297,18 +297,18 @@ struct ErrorResource_Impl : private Resource
ResId aResId;
- ErrorResource_Impl(ResId& rErrIdP, USHORT nId)
+ ErrorResource_Impl(ResId& rErrIdP, sal_uInt16 nId)
: Resource(rErrIdP),aResId(nId,*rErrIdP.GetResMgr()){}
~ErrorResource_Impl() { FreeResource(); }
operator ResString(){ return ResString( aResId ); }
- operator BOOL(){return IsAvailableRes(aResId.SetRT(RSC_STRING));}
+ operator sal_Bool(){return IsAvailableRes(aResId.SetRT(RSC_STRING));}
};
-BOOL SfxErrorHandler::GetClassString(ULONG lClassId, String &rStr) const
+sal_Bool SfxErrorHandler::GetClassString(sal_uLong lClassId, String &rStr) const
/* [Beschreibung]
@@ -318,17 +318,17 @@ BOOL SfxErrorHandler::GetClassString(ULONG lClassId, String &rStr) const
*/
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
com::sun::star::lang::Locale aLocale( Application::GetSettings().GetUILocale() );
ResMgr* pResMgr = ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(ofa), aLocale );
if( pResMgr )
{
ResId aId(RID_ERRHDL, *pResMgr );
- ErrorResource_Impl aEr(aId, (USHORT)lClassId);
+ ErrorResource_Impl aEr(aId, (sal_uInt16)lClassId);
if(aEr)
{
rStr=((ResString)aEr).GetString();
- bRet = TRUE;
+ bRet = sal_True;
}
}
delete pResMgr;
@@ -337,8 +337,8 @@ BOOL SfxErrorHandler::GetClassString(ULONG lClassId, String &rStr) const
//-------------------------------------------------------------------------
-BOOL SfxErrorHandler::GetMessageString(
- ULONG lErrId, String &rStr, USHORT &nFlags) const
+sal_Bool SfxErrorHandler::GetMessageString(
+ sal_uLong lErrId, String &rStr, sal_uInt16 &nFlags) const
/* [Beschreibung]
@@ -347,18 +347,18 @@ BOOL SfxErrorHandler::GetMessageString(
*/
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
ResId *pResId= new ResId(nId, *pMgr);
- ErrorResource_Impl aEr(*pResId, (USHORT)lErrId);
+ ErrorResource_Impl aEr(*pResId, (sal_uInt16)lErrId);
if(aEr)
{
ResString aErrorString(aEr);
- USHORT nResFlags = aErrorString.GetFlags();
+ sal_uInt16 nResFlags = aErrorString.GetFlags();
if( nResFlags )
nFlags=aErrorString.GetFlags();
rStr = aErrorString.GetString();
- bRet = TRUE;
+ bRet = sal_True;
}
delete pResId;
@@ -367,8 +367,8 @@ BOOL SfxErrorHandler::GetMessageString(
//-------------------------------------------------------------------------
-BOOL SfxErrorHandler::GetErrorString(
- ULONG lErrId, String &rStr, USHORT &nFlags) const
+sal_Bool SfxErrorHandler::GetErrorString(
+ sal_uLong lErrId, String &rStr, sal_uInt16 &nFlags) const
/* [Beschreibung]
Erzeugt den Fehlerstring fuer den eigentlichen Fehler ohne
@@ -379,25 +379,25 @@ BOOL SfxErrorHandler::GetErrorString(
{
vos:: OGuard aGuard( Application::GetSolarMutex() );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
rStr=String(SvtResId(RID_ERRHDL_CLASS));
ResId aResId(nId, *pMgr);
{
- ErrorResource_Impl aEr(aResId, (USHORT)lErrId);
+ ErrorResource_Impl aEr(aResId, (sal_uInt16)lErrId);
if(aEr)
{
ResString aErrorString(aEr);
- USHORT nResFlags = aErrorString.GetFlags();
+ sal_uInt16 nResFlags = aErrorString.GetFlags();
if ( nResFlags )
nFlags = nResFlags;
rStr.SearchAndReplace(
String::CreateFromAscii("$(ERROR)"), aErrorString.GetString());
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
if( bRet )
@@ -416,7 +416,7 @@ BOOL SfxErrorHandler::GetErrorString(
//-------------------------------------------------------------------------
SfxErrorContext::SfxErrorContext(
- USHORT nCtxIdP, Window *pWindow, USHORT nResIdP, ResMgr *pMgrP)
+ sal_uInt16 nCtxIdP, Window *pWindow, sal_uInt16 nResIdP, ResMgr *pMgrP)
: ErrorContext(pWindow), nCtxId(nCtxIdP), nResId(nResIdP), pMgr(pMgrP)
{
if( nResId==USHRT_MAX )
@@ -426,8 +426,8 @@ SfxErrorContext::SfxErrorContext(
//-------------------------------------------------------------------------
SfxErrorContext::SfxErrorContext(
- USHORT nCtxIdP, const String &aArg1P, Window *pWindow,
- USHORT nResIdP, ResMgr *pMgrP)
+ sal_uInt16 nCtxIdP, const String &aArg1P, Window *pWindow,
+ sal_uInt16 nResIdP, ResMgr *pMgrP)
: ErrorContext(pWindow), nCtxId(nCtxIdP), nResId(nResIdP), pMgr(pMgrP),
aArg1(aArg1P)
{
@@ -437,7 +437,7 @@ SfxErrorContext::SfxErrorContext(
//-------------------------------------------------------------------------
-BOOL SfxErrorContext::GetString(ULONG nErrId, String &rStr)
+sal_Bool SfxErrorContext::GetString(sal_uLong nErrId, String &rStr)
/* [Beschreibung]
@@ -473,7 +473,7 @@ BOOL SfxErrorContext::GetString(ULONG nErrId, String &rStr)
if ( bRet )
{
- USHORT nId = ( nErrId & ERRCODE_WARNING_MASK ) ? ERRCTX_WARNING : ERRCTX_ERROR;
+ sal_uInt16 nId = ( nErrId & ERRCODE_WARNING_MASK ) ? ERRCTX_WARNING : ERRCTX_ERROR;
ResId aSfxResId( RID_ERRCTX, *pMgr );
ErrorResource_Impl aEr( aSfxResId, nId );
rStr.SearchAndReplace( String::CreateFromAscii( "$(ERR)" ), ( (ResString)aEr ).GetString() );
diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index a96067f95186..239e9dcfa665 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -245,7 +245,7 @@ struct EmbeddedObjectRef_Impl
Graphic* pGraphic;
Graphic* pHCGraphic;
sal_Int64 nViewAspect;
- BOOL bIsLocked;
+ sal_Bool bIsLocked;
sal_Bool bNeedUpdate;
// #i104867#
@@ -260,7 +260,7 @@ void EmbeddedObjectRef::Construct_Impl()
mpImp->pGraphic = 0;
mpImp->pHCGraphic = 0;
mpImp->nViewAspect = embed::Aspects::MSOLE_CONTENT;
- mpImp->bIsLocked = FALSE;
+ mpImp->bIsLocked = sal_False;
mpImp->bNeedUpdate = sal_False;
mpImp->mnGraphicVersion = 0;
mpImp->aDefaultSizeForChart_In_100TH_MM = awt::Size(8000,7000);
@@ -398,7 +398,7 @@ void EmbeddedObjectRef::Clear()
}
mpImp->pContainer = 0;
- mpImp->bIsLocked = FALSE;
+ mpImp->bIsLocked = sal_False;
mpImp->bNeedUpdate = sal_False;
}
@@ -440,17 +440,17 @@ void EmbeddedObjectRef::SetViewAspect( sal_Int64 nAspect )
mpImp->nViewAspect = nAspect;
}
-void EmbeddedObjectRef::Lock( BOOL bLock )
+void EmbeddedObjectRef::Lock( sal_Bool bLock )
{
mpImp->bIsLocked = bLock;
}
-BOOL EmbeddedObjectRef::IsLocked() const
+sal_Bool EmbeddedObjectRef::IsLocked() const
{
return mpImp->bIsLocked;
}
-void EmbeddedObjectRef::GetReplacement( BOOL bUpdate )
+void EmbeddedObjectRef::GetReplacement( sal_Bool bUpdate )
{
if ( bUpdate )
{
@@ -489,7 +489,7 @@ Graphic* EmbeddedObjectRef::GetGraphic( ::rtl::OUString* pMediaType ) const
// bNeedUpdate will be set to false while retrieving new replacement
const_cast < EmbeddedObjectRef* >(this)->GetReplacement( sal_True );
else if ( !mpImp->pGraphic )
- const_cast < EmbeddedObjectRef* >(this)->GetReplacement( FALSE );
+ const_cast < EmbeddedObjectRef* >(this)->GetReplacement( sal_False );
if ( mpImp->pGraphic && pMediaType )
*pMediaType = mpImp->aMediaType;
@@ -669,7 +669,7 @@ void EmbeddedObjectRef::SetGraphic( const Graphic& rGraphic, const ::rtl::OUStri
mpImp->bNeedUpdate = sal_False;
}
-SvStream* EmbeddedObjectRef::GetGraphicStream( BOOL bUpdate ) const
+SvStream* EmbeddedObjectRef::GetGraphicStream( sal_Bool bUpdate ) const
{
RTL_LOGFILE_CONTEXT( aLog, "svtools (mv76033) svt::EmbeddedObjectRef::GetGraphicStream" );
DBG_ASSERT( bUpdate || mpImp->pContainer, "Can't retrieve current graphic!" );
@@ -723,7 +723,7 @@ void EmbeddedObjectRef::DrawPaintReplacement( const Rectangle &rRect, const Stri
MapMode aMM( MAP_APPFONT );
Size aAppFontSz = pOut->LogicToLogic( Size( 0, 8 ), &aMM, NULL );
Font aFnt( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "Helvetica" ) ), aAppFontSz );
- aFnt.SetTransparent( TRUE );
+ aFnt.SetTransparent( sal_True );
aFnt.SetColor( Color( COL_LIGHTRED ) );
aFnt.SetWeight( WEIGHT_BOLD );
aFnt.SetFamily( FAMILY_SWISS );
@@ -735,14 +735,14 @@ void EmbeddedObjectRef::DrawPaintReplacement( const Rectangle &rRect, const Stri
Point aPt;
// Nun den Text so skalieren, dass er in das Rect passt.
// Wir fangen mit der Defaultsize an und gehen 1-AppFont runter
- for( USHORT i = 8; i > 2; i-- )
+ for( sal_uInt16 i = 8; i > 2; i-- )
{
aPt.X() = (rRect.GetWidth() - pOut->GetTextWidth( rText )) / 2;
aPt.Y() = (rRect.GetHeight() - pOut->GetTextHeight()) / 2;
- BOOL bTiny = FALSE;
- if( aPt.X() < 0 ) bTiny = TRUE, aPt.X() = 0;
- if( aPt.Y() < 0 ) bTiny = TRUE, aPt.Y() = 0;
+ sal_Bool bTiny = sal_False;
+ if( aPt.X() < 0 ) bTiny = sal_True, aPt.X() = 0;
+ if( aPt.Y() < 0 ) bTiny = sal_True, aPt.Y() = 0;
if( bTiny )
{
// heruntergehen bei kleinen Bildern
@@ -804,8 +804,8 @@ void EmbeddedObjectRef::DrawShading( const Rectangle &rRect, OutputDevice *pOut
aPixSize.Width() -= 1;
aPixSize.Height() -= 1;
Point aPixViewPos = pOut->LogicToPixel( rRect.TopLeft() );
- INT32 nMax = aPixSize.Width() + aPixSize.Height();
- for( INT32 i = 5; i < nMax; i += 5 )
+ sal_Int32 nMax = aPixSize.Width() + aPixSize.Height();
+ for( sal_Int32 i = 5; i < nMax; i += 5 )
{
Point a1( aPixViewPos ), a2( aPixViewPos );
if( i > aPixSize.Width() )
@@ -824,15 +824,15 @@ void EmbeddedObjectRef::DrawShading( const Rectangle &rRect, OutputDevice *pOut
}
-BOOL EmbeddedObjectRef::TryRunningState()
+sal_Bool EmbeddedObjectRef::TryRunningState()
{
return TryRunningState( mxObj );
}
-BOOL EmbeddedObjectRef::TryRunningState( const uno::Reference < embed::XEmbeddedObject >& xEmbObj )
+sal_Bool EmbeddedObjectRef::TryRunningState( const uno::Reference < embed::XEmbeddedObject >& xEmbObj )
{
if ( !xEmbObj.is() )
- return FALSE;
+ return sal_False;
try
{
@@ -841,10 +841,10 @@ BOOL EmbeddedObjectRef::TryRunningState( const uno::Reference < embed::XEmbedded
}
catch ( uno::Exception& )
{
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
void EmbeddedObjectRef::SetGraphicToContainer( const Graphic& rGraphic,
@@ -907,7 +907,7 @@ void EmbeddedObjectRef::UpdateReplacementOnDemand()
}
}
-BOOL EmbeddedObjectRef::IsChart() const
+sal_Bool EmbeddedObjectRef::IsChart() const
{
//todo maybe for 3.0:
//if the changes work good for chart
diff --git a/svtools/source/misc/embedtransfer.cxx b/svtools/source/misc/embedtransfer.cxx
index e49cf0ab62cf..451eee04d814 100644
--- a/svtools/source/misc/embedtransfer.cxx
+++ b/svtools/source/misc/embedtransfer.cxx
@@ -110,21 +110,21 @@ sal_Bool SvEmbedTransferHelper::GetData( const ::com::sun::star::datatransfer::D
// TODO/LATER: Propbably the graphic should be copied here as well
// currently it is handled by the applications
utl::TempFile aTmp;
- aTmp.EnableKillingFile( TRUE );
+ aTmp.EnableKillingFile( sal_True );
uno::Reference < embed::XEmbedPersist > xPers( m_xObj, uno::UNO_QUERY );
if ( xPers.is() )
{
uno::Reference < embed::XStorage > xStg = comphelper::OStorageHelper::GetTemporaryStorage();
::rtl::OUString aName = ::rtl::OUString::createFromAscii("Dummy");
SvStream* pStream = NULL;
- BOOL bDeleteStream = FALSE;
+ sal_Bool bDeleteStream = sal_False;
uno::Sequence < beans::PropertyValue > aEmpty;
xPers->storeToEntry( xStg, aName, aEmpty, aEmpty );
if ( xStg->isStreamElement( aName ) )
{
uno::Reference < io::XStream > xStm = xStg->cloneStreamElement( aName );
pStream = utl::UcbStreamHelper::CreateStream( xStm );
- bDeleteStream = TRUE;
+ bDeleteStream = sal_True;
}
else
{
@@ -251,6 +251,6 @@ void SvEmbedTransferHelper::FillTransferableObjectDescriptor( TransferableObject
rDesc.maSize = OutputDevice::LogicToLogic( aSize, aMapMode, MapMode( MAP_100TH_MM ) );
rDesc.maDragStartPos = Point();
rDesc.maDisplayName = String();
- rDesc.mbCanLink = FALSE;
+ rDesc.mbCanLink = sal_False;
}
diff --git a/svtools/source/misc/helpagentwindow.cxx b/svtools/source/misc/helpagentwindow.cxx
index a909c2f77ca9..a270e8b68bf9 100644
--- a/svtools/source/misc/helpagentwindow.cxx
+++ b/svtools/source/misc/helpagentwindow.cxx
@@ -99,7 +99,7 @@ namespace svt
m_aPreferredSize.Height() += aSize.Height() - aOutputSize.Height();
SetPointer(Pointer(POINTER_REFHAND));
- AlwaysEnableInput( TRUE, TRUE );
+ AlwaysEnableInput( sal_True, sal_True );
// unique id for the testtool
SetUniqueId( HID_HELPAGENT_WINDOW );
diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx
index 4dbd132b9dc8..0fa861281196 100644
--- a/svtools/source/misc/imagemgr.cxx
+++ b/svtools/source/misc/imagemgr.cxx
@@ -56,160 +56,160 @@
// globals *******************************************************************
-#define NO_INDEX ((USHORT)0xFFFF)
+#define NO_INDEX ((sal_uInt16)0xFFFF)
#define CONTENT_HELPER ::utl::UCBContentHelper
#define ASCII_STRING(s) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(s) )
struct SvtExtensionResIdMapping_Impl
{
const char* _pExt;
- BOOL _bExt;
- USHORT _nStrId;
- USHORT _nImgId;
+ sal_Bool _bExt;
+ sal_uInt16 _nStrId;
+ sal_uInt16 _nImgId;
};
static SvtExtensionResIdMapping_Impl __READONLY_DATA ExtensionMap_Impl[] =
{
- { "awk", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
- { "bas", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
- { "bat", TRUE, STR_DESCRIPTION_BATCHFILE, 0 },
- { "bmk", FALSE, STR_DESCRIPTION_BOOKMARKFILE, 0 },
- { "bmp", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_BITMAP },
- { "c", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
- { "cfg", FALSE, STR_DESCRIPTION_CFGFILE, 0 },
- { "cmd", TRUE, STR_DESCRIPTION_BATCHFILE, 0 },
- { "cob", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
- { "com", TRUE, STR_DESCRIPTION_APPLICATION, 0 },
- { "cxx", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
- { "dbf", TRUE, STR_DESCRIPTION_DATABASE_TABLE, IMG_TABLE },
- { "def", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
- { "dll", TRUE, STR_DESCRIPTION_SYSFILE, 0 },
- { "doc", FALSE, STR_DESCRIPTION_WORD_DOC, IMG_WRITER },
- { "dot", FALSE, STR_DESCRIPTION_WORD_DOC, IMG_WRITERTEMPLATE },
- { "docx", FALSE, STR_DESCRIPTION_WORD_DOC, IMG_WRITER },
- { "dxf", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_DXF },
- { "exe", TRUE, STR_DESCRIPTION_APPLICATION, 0 },
- { "gif", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_GIF },
- { "h", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
- { "hlp", FALSE, STR_DESCRIPTION_HELP_DOC, 0 },
- { "hrc", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
- { "htm", FALSE, STR_DESCRIPTION_HTMLFILE, IMG_HTML },
- { "html", FALSE, STR_DESCRIPTION_HTMLFILE, IMG_HTML },
- { "asp", FALSE, STR_DESCRIPTION_HTMLFILE, IMG_HTML },
- { "hxx", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
- { "ini", FALSE, STR_DESCRIPTION_CFGFILE, 0 },
- { "java", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
- { "jpeg", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_JPG },
- { "jpg", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_JPG },
- { "lha", TRUE, STR_DESCRIPTION_ARCHIVFILE, 0 },
+ { "awk", sal_True, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "bas", sal_True, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "bat", sal_True, STR_DESCRIPTION_BATCHFILE, 0 },
+ { "bmk", sal_False, STR_DESCRIPTION_BOOKMARKFILE, 0 },
+ { "bmp", sal_True, STR_DESCRIPTION_GRAPHIC_DOC, IMG_BITMAP },
+ { "c", sal_True, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "cfg", sal_False, STR_DESCRIPTION_CFGFILE, 0 },
+ { "cmd", sal_True, STR_DESCRIPTION_BATCHFILE, 0 },
+ { "cob", sal_True, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "com", sal_True, STR_DESCRIPTION_APPLICATION, 0 },
+ { "cxx", sal_True, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "dbf", sal_True, STR_DESCRIPTION_DATABASE_TABLE, IMG_TABLE },
+ { "def", sal_True, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "dll", sal_True, STR_DESCRIPTION_SYSFILE, 0 },
+ { "doc", sal_False, STR_DESCRIPTION_WORD_DOC, IMG_WRITER },
+ { "dot", sal_False, STR_DESCRIPTION_WORD_DOC, IMG_WRITERTEMPLATE },
+ { "docx", sal_False, STR_DESCRIPTION_WORD_DOC, IMG_WRITER },
+ { "dxf", sal_True, STR_DESCRIPTION_GRAPHIC_DOC, IMG_DXF },
+ { "exe", sal_True, STR_DESCRIPTION_APPLICATION, 0 },
+ { "gif", sal_True, STR_DESCRIPTION_GRAPHIC_DOC, IMG_GIF },
+ { "h", sal_True, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "hlp", sal_False, STR_DESCRIPTION_HELP_DOC, 0 },
+ { "hrc", sal_True, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "htm", sal_False, STR_DESCRIPTION_HTMLFILE, IMG_HTML },
+ { "html", sal_False, STR_DESCRIPTION_HTMLFILE, IMG_HTML },
+ { "asp", sal_False, STR_DESCRIPTION_HTMLFILE, IMG_HTML },
+ { "hxx", sal_True, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "ini", sal_False, STR_DESCRIPTION_CFGFILE, 0 },
+ { "java", sal_True, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "jpeg", sal_True, STR_DESCRIPTION_GRAPHIC_DOC, IMG_JPG },
+ { "jpg", sal_True, STR_DESCRIPTION_GRAPHIC_DOC, IMG_JPG },
+ { "lha", sal_True, STR_DESCRIPTION_ARCHIVFILE, 0 },
#ifdef WNT
- { "lnk", FALSE, 0, 0 },
+ { "lnk", sal_False, 0, 0 },
#endif
- { "log", TRUE, STR_DESCRIPTION_LOGFILE, 0 },
- { "lst", TRUE, STR_DESCRIPTION_LOGFILE, 0 },
- { "met", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_MET },
- { "mml", FALSE, STR_DESCRIPTION_MATHML_DOC, IMG_MATH },
- { "mod", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
- { "odb", FALSE, STR_DESCRIPTION_OO_DATABASE_DOC, IMG_OO_DATABASE_DOC },
- { "odg", FALSE, STR_DESCRIPTION_OO_DRAW_DOC, IMG_OO_DRAW_DOC },
- { "odf", FALSE, STR_DESCRIPTION_OO_MATH_DOC, IMG_OO_MATH_DOC },
- { "odm", FALSE, STR_DESCRIPTION_OO_GLOBAL_DOC, IMG_OO_GLOBAL_DOC },
- { "odp", FALSE, STR_DESCRIPTION_OO_IMPRESS_DOC, IMG_OO_IMPRESS_DOC },
- { "ods", FALSE, STR_DESCRIPTION_OO_CALC_DOC, IMG_OO_CALC_DOC },
- { "odt", FALSE, STR_DESCRIPTION_OO_WRITER_DOC, IMG_OO_WRITER_DOC },
- { "otg", FALSE, STR_DESCRIPTION_OO_DRAW_TEMPLATE, IMG_OO_DRAW_TEMPLATE },
- { "otp", FALSE, STR_DESCRIPTION_OO_IMPRESS_TEMPLATE, IMG_OO_IMPRESS_TEMPLATE },
- { "ots", FALSE, STR_DESCRIPTION_OO_CALC_TEMPLATE, IMG_OO_CALC_TEMPLATE },
- { "ott", FALSE, STR_DESCRIPTION_OO_WRITER_TEMPLATE, IMG_OO_WRITER_TEMPLATE },
- { "pas", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
- { "pcd", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_PCD },
- { "pct", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_PCT },
- { "pcx", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_PCX },
- { "pl", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
- { "png", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_PNG },
- { "rar", TRUE, STR_DESCRIPTION_ARCHIVFILE, 0 },
- { "rtf", FALSE, STR_DESCRIPTION_WORD_DOC, IMG_WRITER },
- { "sbl", FALSE, 0, 0 },
- { "sch", FALSE, 0, 0 },
- { "sda", FALSE, STR_DESCRIPTION_SDRAW_DOC, IMG_DRAW },
- { "sdb", FALSE, STR_DESCRIPTION_SDATABASE_DOC, IMG_DATABASE },
- { "sdc", FALSE, STR_DESCRIPTION_SCALC_DOC, IMG_CALC },
- { "sdd", FALSE, STR_DESCRIPTION_SIMPRESS_DOC, IMG_IMPRESS },
- { "sdp", FALSE, STR_DESCRIPTION_SIMPRESS_DOC, 0 },
- { "sds", FALSE, STR_DESCRIPTION_SCHART_DOC, 0 },
- { "sdw", FALSE, STR_DESCRIPTION_SWRITER_DOC, IMG_WRITER },
- { "sga", FALSE, 0, 0 },
- { "sgf", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_SGF },
- { "sgl", FALSE, STR_DESCRIPTION_GLOBALDOC, IMG_GLOBAL_DOC },
- { "sgv", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_SGV },
- { "shtml", FALSE, STR_DESCRIPTION_HTMLFILE, IMG_HTML },
- { "sim", FALSE, STR_DESCRIPTION_SIMAGE_DOC, IMG_SIM },
- { "smf", FALSE, STR_DESCRIPTION_SMATH_DOC, IMG_MATH },
- { "src", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
- { "svh", FALSE, STR_DESCRIPTION_HELP_DOC, 0 },
- { "svm", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_SVM },
- { "stc", FALSE, STR_DESCRIPTION_CALC_TEMPLATE, IMG_CALCTEMPLATE },
- { "std", FALSE, STR_DESCRIPTION_DRAW_TEMPLATE, IMG_DRAWTEMPLATE },
- { "sti", FALSE, STR_DESCRIPTION_IMPRESS_TEMPLATE, IMG_IMPRESSTEMPLATE },
- { "stw", FALSE, STR_DESCRIPTION_WRITER_TEMPLATE, IMG_WRITERTEMPLATE },
- { "sxc", FALSE, STR_DESCRIPTION_SXCALC_DOC, IMG_CALC },
- { "sxd", FALSE, STR_DESCRIPTION_SXDRAW_DOC, IMG_DRAW },
- { "sxg", FALSE, STR_DESCRIPTION_SXGLOBAL_DOC, IMG_GLOBAL_DOC },
- { "sxi", FALSE, STR_DESCRIPTION_SXIMPRESS_DOC, IMG_IMPRESS },
- { "sxm", FALSE, STR_DESCRIPTION_SXMATH_DOC, IMG_MATH },
- { "sxs", FALSE, STR_DESCRIPTION_SXCHART_DOC, 0 },
- { "sxw", FALSE, STR_DESCRIPTION_SXWRITER_DOC, IMG_WRITER },
- { "sys", TRUE, STR_DESCRIPTION_SYSFILE, 0 },
- { "tif", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_TIFF },
- { "tiff", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_TIFF },
- { "txt", FALSE, STR_DESCRIPTION_TEXTFILE, IMG_TEXTFILE },
- { "url", FALSE, STR_DESCRIPTION_LINK, 0 },
- { "vor", FALSE, STR_DESCRIPTION_SOFFICE_TEMPLATE_DOC, IMG_WRITERTEMPLATE },
- { "vxd", TRUE, STR_DESCRIPTION_SYSFILE, 0 },
- { "wmf", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_WMF },
- { "xls", FALSE, STR_DESCRIPTION_EXCEL_DOC, IMG_CALC },
- { "xlt", FALSE, STR_DESCRIPTION_EXCEL_TEMPLATE_DOC, IMG_CALCTEMPLATE },
- { "xlsx", FALSE, STR_DESCRIPTION_EXCEL_DOC, IMG_CALC },
- { "uu", TRUE, STR_DESCRIPTION_ARCHIVFILE, 0 },
- { "uue", TRUE, STR_DESCRIPTION_ARCHIVFILE, 0 },
- { "z", TRUE, STR_DESCRIPTION_ARCHIVFILE, 0 },
- { "zip", TRUE, STR_DESCRIPTION_ARCHIVFILE, 0 },
- { "zoo", TRUE, STR_DESCRIPTION_ARCHIVFILE, 0 },
- { "gz", TRUE, STR_DESCRIPTION_ARCHIVFILE, 0 },
- { "ppt", FALSE, STR_DESCRIPTION_POWERPOINT, IMG_IMPRESS },
- { "pot", FALSE, STR_DESCRIPTION_POWERPOINT_TEMPLATE, IMG_IMPRESSTEMPLATE },
- { "pps", FALSE, STR_DESCRIPTION_POWERPOINT_SHOW, IMG_IMPRESS },
- { "pptx", FALSE, STR_DESCRIPTION_POWERPOINT, IMG_IMPRESS },
- { "oxt", FALSE, STR_DESCRIPTION_EXTENSION, IMG_EXTENSION },
- { 0, FALSE, 0, 0 }
+ { "log", sal_True, STR_DESCRIPTION_LOGFILE, 0 },
+ { "lst", sal_True, STR_DESCRIPTION_LOGFILE, 0 },
+ { "met", sal_True, STR_DESCRIPTION_GRAPHIC_DOC, IMG_MET },
+ { "mml", sal_False, STR_DESCRIPTION_MATHML_DOC, IMG_MATH },
+ { "mod", sal_True, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "odb", sal_False, STR_DESCRIPTION_OO_DATABASE_DOC, IMG_OO_DATABASE_DOC },
+ { "odg", sal_False, STR_DESCRIPTION_OO_DRAW_DOC, IMG_OO_DRAW_DOC },
+ { "odf", sal_False, STR_DESCRIPTION_OO_MATH_DOC, IMG_OO_MATH_DOC },
+ { "odm", sal_False, STR_DESCRIPTION_OO_GLOBAL_DOC, IMG_OO_GLOBAL_DOC },
+ { "odp", sal_False, STR_DESCRIPTION_OO_IMPRESS_DOC, IMG_OO_IMPRESS_DOC },
+ { "ods", sal_False, STR_DESCRIPTION_OO_CALC_DOC, IMG_OO_CALC_DOC },
+ { "odt", sal_False, STR_DESCRIPTION_OO_WRITER_DOC, IMG_OO_WRITER_DOC },
+ { "otg", sal_False, STR_DESCRIPTION_OO_DRAW_TEMPLATE, IMG_OO_DRAW_TEMPLATE },
+ { "otp", sal_False, STR_DESCRIPTION_OO_IMPRESS_TEMPLATE, IMG_OO_IMPRESS_TEMPLATE },
+ { "ots", sal_False, STR_DESCRIPTION_OO_CALC_TEMPLATE, IMG_OO_CALC_TEMPLATE },
+ { "ott", sal_False, STR_DESCRIPTION_OO_WRITER_TEMPLATE, IMG_OO_WRITER_TEMPLATE },
+ { "pas", sal_True, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "pcd", sal_True, STR_DESCRIPTION_GRAPHIC_DOC, IMG_PCD },
+ { "pct", sal_True, STR_DESCRIPTION_GRAPHIC_DOC, IMG_PCT },
+ { "pcx", sal_True, STR_DESCRIPTION_GRAPHIC_DOC, IMG_PCX },
+ { "pl", sal_True, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "png", sal_True, STR_DESCRIPTION_GRAPHIC_DOC, IMG_PNG },
+ { "rar", sal_True, STR_DESCRIPTION_ARCHIVFILE, 0 },
+ { "rtf", sal_False, STR_DESCRIPTION_WORD_DOC, IMG_WRITER },
+ { "sbl", sal_False, 0, 0 },
+ { "sch", sal_False, 0, 0 },
+ { "sda", sal_False, STR_DESCRIPTION_SDRAW_DOC, IMG_DRAW },
+ { "sdb", sal_False, STR_DESCRIPTION_SDATABASE_DOC, IMG_DATABASE },
+ { "sdc", sal_False, STR_DESCRIPTION_SCALC_DOC, IMG_CALC },
+ { "sdd", sal_False, STR_DESCRIPTION_SIMPRESS_DOC, IMG_IMPRESS },
+ { "sdp", sal_False, STR_DESCRIPTION_SIMPRESS_DOC, 0 },
+ { "sds", sal_False, STR_DESCRIPTION_SCHART_DOC, 0 },
+ { "sdw", sal_False, STR_DESCRIPTION_SWRITER_DOC, IMG_WRITER },
+ { "sga", sal_False, 0, 0 },
+ { "sgf", sal_True, STR_DESCRIPTION_GRAPHIC_DOC, IMG_SGF },
+ { "sgl", sal_False, STR_DESCRIPTION_GLOBALDOC, IMG_GLOBAL_DOC },
+ { "sgv", sal_True, STR_DESCRIPTION_GRAPHIC_DOC, IMG_SGV },
+ { "shtml", sal_False, STR_DESCRIPTION_HTMLFILE, IMG_HTML },
+ { "sim", sal_False, STR_DESCRIPTION_SIMAGE_DOC, IMG_SIM },
+ { "smf", sal_False, STR_DESCRIPTION_SMATH_DOC, IMG_MATH },
+ { "src", sal_True, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "svh", sal_False, STR_DESCRIPTION_HELP_DOC, 0 },
+ { "svm", sal_True, STR_DESCRIPTION_GRAPHIC_DOC, IMG_SVM },
+ { "stc", sal_False, STR_DESCRIPTION_CALC_TEMPLATE, IMG_CALCTEMPLATE },
+ { "std", sal_False, STR_DESCRIPTION_DRAW_TEMPLATE, IMG_DRAWTEMPLATE },
+ { "sti", sal_False, STR_DESCRIPTION_IMPRESS_TEMPLATE, IMG_IMPRESSTEMPLATE },
+ { "stw", sal_False, STR_DESCRIPTION_WRITER_TEMPLATE, IMG_WRITERTEMPLATE },
+ { "sxc", sal_False, STR_DESCRIPTION_SXCALC_DOC, IMG_CALC },
+ { "sxd", sal_False, STR_DESCRIPTION_SXDRAW_DOC, IMG_DRAW },
+ { "sxg", sal_False, STR_DESCRIPTION_SXGLOBAL_DOC, IMG_GLOBAL_DOC },
+ { "sxi", sal_False, STR_DESCRIPTION_SXIMPRESS_DOC, IMG_IMPRESS },
+ { "sxm", sal_False, STR_DESCRIPTION_SXMATH_DOC, IMG_MATH },
+ { "sxs", sal_False, STR_DESCRIPTION_SXCHART_DOC, 0 },
+ { "sxw", sal_False, STR_DESCRIPTION_SXWRITER_DOC, IMG_WRITER },
+ { "sys", sal_True, STR_DESCRIPTION_SYSFILE, 0 },
+ { "tif", sal_True, STR_DESCRIPTION_GRAPHIC_DOC, IMG_TIFF },
+ { "tiff", sal_True, STR_DESCRIPTION_GRAPHIC_DOC, IMG_TIFF },
+ { "txt", sal_False, STR_DESCRIPTION_TEXTFILE, IMG_TEXTFILE },
+ { "url", sal_False, STR_DESCRIPTION_LINK, 0 },
+ { "vor", sal_False, STR_DESCRIPTION_SOFFICE_TEMPLATE_DOC, IMG_WRITERTEMPLATE },
+ { "vxd", sal_True, STR_DESCRIPTION_SYSFILE, 0 },
+ { "wmf", sal_True, STR_DESCRIPTION_GRAPHIC_DOC, IMG_WMF },
+ { "xls", sal_False, STR_DESCRIPTION_EXCEL_DOC, IMG_CALC },
+ { "xlt", sal_False, STR_DESCRIPTION_EXCEL_TEMPLATE_DOC, IMG_CALCTEMPLATE },
+ { "xlsx", sal_False, STR_DESCRIPTION_EXCEL_DOC, IMG_CALC },
+ { "uu", sal_True, STR_DESCRIPTION_ARCHIVFILE, 0 },
+ { "uue", sal_True, STR_DESCRIPTION_ARCHIVFILE, 0 },
+ { "z", sal_True, STR_DESCRIPTION_ARCHIVFILE, 0 },
+ { "zip", sal_True, STR_DESCRIPTION_ARCHIVFILE, 0 },
+ { "zoo", sal_True, STR_DESCRIPTION_ARCHIVFILE, 0 },
+ { "gz", sal_True, STR_DESCRIPTION_ARCHIVFILE, 0 },
+ { "ppt", sal_False, STR_DESCRIPTION_POWERPOINT, IMG_IMPRESS },
+ { "pot", sal_False, STR_DESCRIPTION_POWERPOINT_TEMPLATE, IMG_IMPRESSTEMPLATE },
+ { "pps", sal_False, STR_DESCRIPTION_POWERPOINT_SHOW, IMG_IMPRESS },
+ { "pptx", sal_False, STR_DESCRIPTION_POWERPOINT, IMG_IMPRESS },
+ { "oxt", sal_False, STR_DESCRIPTION_EXTENSION, IMG_EXTENSION },
+ { 0, sal_False, 0, 0 }
};
#ifdef OS2
SvtExtensionResIdMapping_Impl Mappings[] =
{
- {"StarWriter 4.0", FALSE,STR_DESCRIPTION_SWRITER_DOC, IMG_WRITER},
- {"StarWriter 3.0", FALSE,STR_DESCRIPTION_SWRITER_DOC, IMG_WRITER},
- {"StarCalc 4.0", FALSE,STR_DESCRIPTION_SCALC_DOC, IMG_CALC},
- {"StarCalc 3.0", FALSE,STR_DESCRIPTION_SCALC_DOC, IMG_CALC},
- {"StarImpress 4.0", FALSE,STR_DESCRIPTION_SIMPRESS_DOC,IMG_IMPRESS},
- {"StarDraw 4.0", FALSE,STR_DESCRIPTION_SDRAW_DOC, IMG_DRAW},
- {"StarDraw 3.0", FALSE,STR_DESCRIPTION_SDRAW_DOC, IMG_DRAW},
- {"StarChart 3.0", FALSE,STR_DESCRIPTION_SCHART_DOC, IMG_CHART},
- {"StarChart 4.0", FALSE,STR_DESCRIPTION_SCHART_DOC, IMG_CHART},
- {"Bitmap", FALSE,STR_DESCRIPTION_GRAPHIC_DOC, IMG_BITMAP},
- {"AutoCAD", FALSE,STR_DESCRIPTION_GRAPHIC_DOC, IMG_SIM},
- {"Gif-File", FALSE,STR_DESCRIPTION_GRAPHIC_DOC, IMG_GIF},
- {"JPEG-File", FALSE,STR_DESCRIPTION_GRAPHIC_DOC, IMG_JPG},
- {"Metafile ", FALSE,STR_DESCRIPTION_GRAPHIC_DOC, IMG_SIM},
- {"Photo-CD ", FALSE,STR_DESCRIPTION_GRAPHIC_DOC, IMG_PCD},
- {"Mac Pict", FALSE,STR_DESCRIPTION_GRAPHIC_DOC, IMG_PCT},
- {"PCX-File ", FALSE,STR_DESCRIPTION_GRAPHIC_DOC, IMG_PCX},
- {"PNG-File", FALSE,STR_DESCRIPTION_GRAPHIC_DOC, IMG_SIM},
- {"SV-Metafile", FALSE,STR_DESCRIPTION_GRAPHIC_DOC, IMG_SIM},
- {"TIFF-File", FALSE,STR_DESCRIPTION_GRAPHIC_DOC, IMG_TIFF},
- {"MS-Metafile", FALSE,STR_DESCRIPTION_GRAPHIC_DOC, IMG_WMF},
- {"XBM-File", FALSE,STR_DESCRIPTION_GRAPHIC_DOC, IMG_BITMAP},
- {"UniformResourceLocator", FALSE,STR_DESCRIPTION_LINK, IMG_URL},
+ {"StarWriter 4.0", sal_False,STR_DESCRIPTION_SWRITER_DOC, IMG_WRITER},
+ {"StarWriter 3.0", sal_False,STR_DESCRIPTION_SWRITER_DOC, IMG_WRITER},
+ {"StarCalc 4.0", sal_False,STR_DESCRIPTION_SCALC_DOC, IMG_CALC},
+ {"StarCalc 3.0", sal_False,STR_DESCRIPTION_SCALC_DOC, IMG_CALC},
+ {"StarImpress 4.0", sal_False,STR_DESCRIPTION_SIMPRESS_DOC,IMG_IMPRESS},
+ {"StarDraw 4.0", sal_False,STR_DESCRIPTION_SDRAW_DOC, IMG_DRAW},
+ {"StarDraw 3.0", sal_False,STR_DESCRIPTION_SDRAW_DOC, IMG_DRAW},
+ {"StarChart 3.0", sal_False,STR_DESCRIPTION_SCHART_DOC, IMG_CHART},
+ {"StarChart 4.0", sal_False,STR_DESCRIPTION_SCHART_DOC, IMG_CHART},
+ {"Bitmap", sal_False,STR_DESCRIPTION_GRAPHIC_DOC, IMG_BITMAP},
+ {"AutoCAD", sal_False,STR_DESCRIPTION_GRAPHIC_DOC, IMG_SIM},
+ {"Gif-File", sal_False,STR_DESCRIPTION_GRAPHIC_DOC, IMG_GIF},
+ {"JPEG-File", sal_False,STR_DESCRIPTION_GRAPHIC_DOC, IMG_JPG},
+ {"Metafile ", sal_False,STR_DESCRIPTION_GRAPHIC_DOC, IMG_SIM},
+ {"Photo-CD ", sal_False,STR_DESCRIPTION_GRAPHIC_DOC, IMG_PCD},
+ {"Mac Pict", sal_False,STR_DESCRIPTION_GRAPHIC_DOC, IMG_PCT},
+ {"PCX-File ", sal_False,STR_DESCRIPTION_GRAPHIC_DOC, IMG_PCX},
+ {"PNG-File", sal_False,STR_DESCRIPTION_GRAPHIC_DOC, IMG_SIM},
+ {"SV-Metafile", sal_False,STR_DESCRIPTION_GRAPHIC_DOC, IMG_SIM},
+ {"TIFF-File", sal_False,STR_DESCRIPTION_GRAPHIC_DOC, IMG_TIFF},
+ {"MS-Metafile", sal_False,STR_DESCRIPTION_GRAPHIC_DOC, IMG_WMF},
+ {"XBM-File", sal_False,STR_DESCRIPTION_GRAPHIC_DOC, IMG_BITMAP},
+ {"UniformResourceLocator", sal_False,STR_DESCRIPTION_LINK, IMG_URL},
{NULL, 0}
};
#endif
@@ -245,7 +245,7 @@ static String GetImageExtensionByFactory_Impl( const String& rURL )
if ( aPath.Len() )
{
- USHORT nIndex = 0;
+ sal_uInt16 nIndex = 0;
while ( Fac2ExtMap_Impl[ nIndex ]._pFactory )
{
if ( aPath.EqualsAscii( Fac2ExtMap_Impl[ nIndex ]._pFactory ) )
@@ -303,12 +303,12 @@ static String GetImageExtensionByFactory_Impl( const String& rURL )
return aExtension;
}
-static USHORT GetIndexOfExtension_Impl( const String& rExtension )
+static sal_uInt16 GetIndexOfExtension_Impl( const String& rExtension )
{
- USHORT nRet = NO_INDEX;
+ sal_uInt16 nRet = NO_INDEX;
if ( rExtension.Len() )
{
- USHORT nIndex = 0;
+ sal_uInt16 nIndex = 0;
String aExt = rExtension;
aExt.ToLowerAscii();
while ( ExtensionMap_Impl[ nIndex ]._pExt )
@@ -325,12 +325,12 @@ static USHORT GetIndexOfExtension_Impl( const String& rExtension )
return nRet;
}
-static USHORT GetImageId_Impl( const String& rExtension )
+static sal_uInt16 GetImageId_Impl( const String& rExtension )
{
- USHORT nImage = IMG_FILE;
+ sal_uInt16 nImage = IMG_FILE;
if ( rExtension.Len() != NO_INDEX )
{
- USHORT nIndex = GetIndexOfExtension_Impl( rExtension );
+ sal_uInt16 nIndex = GetIndexOfExtension_Impl( rExtension );
if ( nIndex != NO_INDEX )
{
nImage = ExtensionMap_Impl[ nIndex ]._nImgId;
@@ -366,9 +366,9 @@ static sal_Bool GetVolumeProperties_Impl( ::ucbhelper::Content& rContent, svtool
return bRet;
}
-static USHORT GetFolderImageId_Impl( const String& rURL )
+static sal_uInt16 GetFolderImageId_Impl( const String& rURL )
{
- USHORT nRet = IMG_FOLDER;
+ sal_uInt16 nRet = IMG_FOLDER;
::svtools::VolumeInfo aVolumeInfo;
try
{
@@ -396,12 +396,12 @@ static USHORT GetFolderImageId_Impl( const String& rURL )
return nRet;
}
-static USHORT GetImageId_Impl( const INetURLObject& rObject, sal_Bool bDetectFolder )
+static sal_uInt16 GetImageId_Impl( const INetURLObject& rObject, sal_Bool bDetectFolder )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aTimeLog, "svtools", "hb93813", "SvFileInformationManager::GetImageId_Impl()" );
String aExt, sURL = rObject.GetMainURL( INetURLObject::NO_DECODE );
- USHORT nImage = IMG_FILE;
+ sal_uInt16 nImage = IMG_FILE;
if ( rObject.GetProtocol() == INET_PROT_PRIVATE )
{
@@ -416,7 +416,7 @@ static USHORT GetImageId_Impl( const INetURLObject& rObject, sal_Bool bDetectFol
return nImage;
}
else if ( aType == String( RTL_CONSTASCII_STRINGPARAM("image") ) )
- nImage = (USHORT)aURLPath.GetToken( 1, INET_PATH_TOKEN ).ToInt32();
+ nImage = (sal_uInt16)aURLPath.GetToken( 1, INET_PATH_TOKEN ).ToInt32();
}
else
{
@@ -424,7 +424,7 @@ static USHORT GetImageId_Impl( const INetURLObject& rObject, sal_Bool bDetectFol
if ( aExt.EqualsAscii( "vor" ) )
{
SotStorageRef aStorage = new SotStorage( sURL, STREAM_STD_READ );
- USHORT nId = IMG_WRITERTEMPLATE;
+ sal_uInt16 nId = IMG_WRITERTEMPLATE;
if ( !aStorage->GetError() )
{
SvGlobalName aGlobalName = aStorage->GetClassName();
@@ -453,13 +453,13 @@ static USHORT GetImageId_Impl( const INetURLObject& rObject, sal_Bool bDetectFol
return nImage;
}
-static USHORT GetDescriptionId_Impl( const String& rExtension, sal_Bool& rbShowExt )
+static sal_uInt16 GetDescriptionId_Impl( const String& rExtension, sal_Bool& rbShowExt )
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
if ( rExtension.Len() != NO_INDEX )
{
- USHORT nIndex = GetIndexOfExtension_Impl( rExtension );
+ sal_uInt16 nIndex = GetIndexOfExtension_Impl( rExtension );
if ( nIndex != NO_INDEX )
{
nId = ExtensionMap_Impl[ nIndex ]._nStrId;
@@ -472,7 +472,7 @@ static USHORT GetDescriptionId_Impl( const String& rExtension, sal_Bool& rbShowE
static String GetDescriptionByFactory_Impl( const String& rFactory )
{
- USHORT nResId = 0;
+ sal_uInt16 nResId = 0;
if ( rFactory.EqualsIgnoreCaseAscii( "swriter", 0, 7 ) )
nResId = STR_DESCRIPTION_FACTORY_WRITER;
else if ( rFactory.EqualsIgnoreCaseAscii( "scalc", 0, 5 ) )
@@ -499,9 +499,9 @@ static String GetDescriptionByFactory_Impl( const String& rFactory )
return aRet;
}
-static USHORT GetFolderDescriptionId_Impl( const String& rURL )
+static sal_uInt16 GetFolderDescriptionId_Impl( const String& rURL )
{
- USHORT nRet = STR_DESCRIPTION_FOLDER;
+ sal_uInt16 nRet = STR_DESCRIPTION_FOLDER;
svtools::VolumeInfo aVolumeInfo;
try
{
@@ -529,6 +529,7 @@ static USHORT GetFolderDescriptionId_Impl( const String& rURL )
return nRet;
}
+/*
static ResMgr* GetIsoResMgr_Impl()
{
static ResMgr* pIsoResMgr = NULL;
@@ -550,7 +551,7 @@ static ResMgr* GetIsoResMgr_Impl()
return pIsoResMgr;
}
-static ImageList* CreateImageList_Impl( USHORT nResId )
+static ImageList* CreateImageList_Impl( sal_uInt16 nResId )
{
ImageList* pList = NULL;
ResMgr* pResMgr = GetIsoResMgr_Impl();
@@ -564,7 +565,7 @@ static ImageList* CreateImageList_Impl( USHORT nResId )
return pList;
}
-static Image GetOfficeImageFromList_Impl( USHORT nImageId, BOOL bBig, BOOL bHighContrast )
+static Image GetOfficeImageFromList_Impl( sal_uInt16 nImageId, sal_Bool bBig, sal_Bool bHighContrast )
{
ImageList* pList = NULL;
@@ -572,7 +573,7 @@ static Image GetOfficeImageFromList_Impl( USHORT nImageId, BOOL bBig, BOOL bHigh
static ImageList* _pBigOfficeImgList = NULL;
static ImageList* _pSmallHCOfficeImgList = NULL;
static ImageList* _pBigHCOfficeImgList = NULL;
- static ULONG nStyle = Application::GetSettings().GetStyleSettings().GetSymbolsStyle();
+ static sal_uLong nStyle = Application::GetSettings().GetStyleSettings().GetSymbolsStyle();
// If the style has been changed, throw away our cache of the older images
if ( nStyle != Application::GetSettings().GetStyleSettings().GetSymbolsStyle() )
@@ -585,11 +586,11 @@ static Image GetOfficeImageFromList_Impl( USHORT nImageId, BOOL bBig, BOOL bHigh
}
// #i21242# MT: For B&W we need the HC Image and must transform.
- // bHiContrast is TRUE for all dark backgrounds, but we need HC Images for HC White also,
+ // bHiContrast is sal_True for all dark backgrounds, but we need HC Images for HC White also,
// so we can't rely on bHighContrast.
- BOOL bBlackAndWhite = Application::GetSettings().GetStyleSettings().IsHighContrastBlackAndWhite();
+ sal_Bool bBlackAndWhite = Application::GetSettings().GetStyleSettings().IsHighContrastBlackAndWhite();
if ( bBlackAndWhite )
- bHighContrast = TRUE;
+ bHighContrast = sal_True;
if ( bBig )
@@ -638,8 +639,9 @@ static Image GetOfficeImageFromList_Impl( USHORT nImageId, BOOL bBig, BOOL bHigh
return aImage;
}
+*/
-static Image GetImageFromList_Impl( USHORT nImageId, BOOL bBig, BOOL bHighContrast )
+static Image GetImageFromList_Impl( sal_uInt16 nImageId, sal_Bool bBig, sal_Bool bHighContrast )
{
if ( !bBig && IMG_FOLDER == nImageId && !bHighContrast )
// return our new small folder image (256 colors)
@@ -651,7 +653,7 @@ static Image GetImageFromList_Impl( USHORT nImageId, BOOL bBig, BOOL bHighContra
static ImageList* _pBigImageList = NULL;
static ImageList* _pSmallHCImageList = NULL;
static ImageList* _pBigHCImageList = NULL;
- static ULONG nStyle = Application::GetSettings().GetStyleSettings().GetSymbolsStyle();
+ static sal_uLong nStyle = Application::GetSettings().GetStyleSettings().GetSymbolsStyle();
// If the style has been changed, throw away our cache of the older images
if ( nStyle != Application::GetSettings().GetStyleSettings().GetSymbolsStyle() )
@@ -697,7 +699,8 @@ static Image GetImageFromList_Impl( USHORT nImageId, BOOL bBig, BOOL bHighContra
if ( pList->HasImageAtPos( nImageId ) )
return pList->GetImage( nImageId );
else
- return GetOfficeImageFromList_Impl( nImageId, bBig, bHighContrast );
+ return Image();
+ //return GetOfficeImageFromList_Impl( nImageId, bBig, bHighContrast );
}
//****************************************************************************
@@ -724,7 +727,7 @@ String SvFileInformationManager::GetDescription_Impl( const INetURLObject& rObje
String sDescription;
String sExtension( rObject.getExtension() ), sURL( rObject.GetMainURL( INetURLObject::NO_DECODE ) );
- USHORT nResId = 0;
+ sal_uInt16 nResId = 0;
sal_Bool bShowExt = sal_False, bDetected = sal_False, bOnlyFile = sal_False;
sal_Bool bFolder = bDetectFolder ? CONTENT_HELPER::IsFolder( sURL ) : sal_False;
if ( !bFolder )
@@ -790,41 +793,41 @@ String SvFileInformationManager::GetDescription_Impl( const INetURLObject& rObje
Image SvFileInformationManager::GetImage( const INetURLObject& rObject, sal_Bool bBig )
{
- return GetImage( rObject, bBig, FALSE );
+ return GetImage( rObject, bBig, sal_False );
}
Image SvFileInformationManager::GetFileImage( const INetURLObject& rObject, sal_Bool bBig )
{
- return GetFileImage( rObject, bBig, FALSE );
+ return GetFileImage( rObject, bBig, sal_False );
}
Image SvFileInformationManager::GetImageNoDefault( const INetURLObject& rObject, sal_Bool bBig )
{
- return GetImageNoDefault( rObject, bBig, FALSE );
+ return GetImageNoDefault( rObject, bBig, sal_False );
}
Image SvFileInformationManager::GetFolderImage( const svtools::VolumeInfo& rInfo, sal_Bool bBig )
{
- return GetFolderImage( rInfo, bBig, FALSE );
+ return GetFolderImage( rInfo, bBig, sal_False );
}
Image SvFileInformationManager::GetImage( const INetURLObject& rObject, sal_Bool bBig, sal_Bool bHighContrast )
{
- USHORT nImage = GetImageId_Impl( rObject, sal_True );
+ sal_uInt16 nImage = GetImageId_Impl( rObject, sal_True );
DBG_ASSERT( nImage, "invalid ImageId" );
return GetImageFromList_Impl( nImage, bBig, bHighContrast );
}
Image SvFileInformationManager::GetFileImage( const INetURLObject& rObject, sal_Bool bBig, sal_Bool bHighContrast )
{
- USHORT nImage = GetImageId_Impl( rObject, sal_False );
+ sal_uInt16 nImage = GetImageId_Impl( rObject, sal_False );
DBG_ASSERT( nImage, "invalid ImageId" );
return GetImageFromList_Impl( nImage, bBig, bHighContrast );
}
Image SvFileInformationManager::GetImageNoDefault( const INetURLObject& rObject, sal_Bool bBig, sal_Bool bHighContrast )
{
- USHORT nImage = GetImageId_Impl( rObject, sal_True );
+ sal_uInt16 nImage = GetImageId_Impl( rObject, sal_True );
DBG_ASSERT( nImage, "invalid ImageId" );
if ( nImage == IMG_FILE )
@@ -835,7 +838,7 @@ Image SvFileInformationManager::GetImageNoDefault( const INetURLObject& rObject,
Image SvFileInformationManager::GetFolderImage( const svtools::VolumeInfo& rInfo, sal_Bool bBig, sal_Bool bHighContrast )
{
- USHORT nImage = IMG_FOLDER;
+ sal_uInt16 nImage = IMG_FOLDER;
DBG_ASSERT( nImage, "invalid ImageId" );
if ( rInfo.m_bIsRemote )
@@ -862,7 +865,7 @@ String SvFileInformationManager::GetFileDescription( const INetURLObject& rObjec
String SvFileInformationManager::GetFolderDescription( const svtools::VolumeInfo& rInfo )
{
- USHORT nResId = STR_DESCRIPTION_FOLDER;
+ sal_uInt16 nResId = STR_DESCRIPTION_FOLDER;
if ( rInfo.m_bIsRemote )
nResId = STR_DESCRIPTION_REMOTE_VOLUME;
else if ( rInfo.m_bIsFloppy )
diff --git a/svtools/source/misc/imagemgr.src b/svtools/source/misc/imagemgr.src
index 03e68b3b30b7..d00a8717f709 100644
--- a/svtools/source/misc/imagemgr.src
+++ b/svtools/source/misc/imagemgr.src
@@ -32,6 +32,21 @@
// images ********************************************************************
#define X_IMAGE_LIST \
+ IMG_IMPRESS ; \
+ IMG_CALC ; \
+ IMG_CALCTEMPLATE ; \
+ IMG_CHART ; \
+ IMG_IMPRESSTEMPLATE ; \
+ IMG_HTML ; \
+ IMG_MATH ; \
+ IMG_WRITER ; \
+ IMG_WRITERTEMPLATE ; \
+ IMG_MACROLIB ; \
+ IMG_GLOBAL_DOC ; \
+ IMG_DRAW ; \
+ IMG_DRAWTEMPLATE ; \
+ IMG_NEWFROMTEMPLATE ; \
+ IMG_DATABASE; \
IMG_WORKPLACE ; \
IMG_BITMAP ; \
IMG_EXCEL ; \
@@ -111,7 +126,7 @@ ImageList RID_SVTOOLS_IMAGELIST_BIG
};
IdCount =
{
- 68 ;
+ 83 ;
};
};
@@ -125,7 +140,7 @@ ImageList RID_SVTOOLS_IMAGELIST_SMALL
};
IdCount =
{
- 68;
+ 83;
};
};
@@ -139,7 +154,7 @@ ImageList RID_SVTOOLS_IMAGELIST_BIG_HIGHCONTRAST
};
IdCount =
{
- 68 ;
+ 83 ;
};
};
@@ -153,7 +168,7 @@ ImageList RID_SVTOOLS_IMAGELIST_SMALL_HIGHCONTRAST
};
IdCount =
{
- 68;
+ 83;
};
};
diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx
index 4378e0acd234..425eb0ac8481 100644
--- a/svtools/source/misc/imap.cxx
+++ b/svtools/source/misc/imap.cxx
@@ -52,7 +52,7 @@ DBG_NAME( ImageMap )
/******************************************************************************/
-UINT16 IMapObject::nActualTextEncoding = (UINT16) RTL_TEXTENCODING_DONTKNOW;
+sal_uInt16 IMapObject::nActualTextEncoding = (sal_uInt16) RTL_TEXTENCODING_DONTKNOW;
/******************************************************************************/
@@ -64,7 +64,7 @@ IMapObject::IMapObject()
}
IMapObject::IMapObject( const String& rURL, const String& rAltText, const String& rDesc,
- const String& rTarget, const String& rName, BOOL bURLActive )
+ const String& rTarget, const String& rName, sal_Bool bURLActive )
: aURL( rURL )
, aAltText( rAltText )
, aDesc( rDesc )
@@ -82,7 +82,7 @@ IMapObject::IMapObject( const String& rURL, const String& rAltText, const String
|*
\******************************************************************************/
-UINT16 IMapObject::GetVersion() const
+sal_uInt16 IMapObject::GetVersion() const
{
return IMAP_OBJ_VERSION;
}
@@ -101,7 +101,7 @@ void IMapObject::Write( SvStream& rOStm, const String& rBaseURL ) const
rOStm << GetType();
rOStm << GetVersion();
- rOStm << ( (UINT16) eEncoding );
+ rOStm << ( (sal_uInt16) eEncoding );
const ByteString aRelURL = ByteString( String(URIHelper::simpleNormalizedMakeRelative( rBaseURL, aURL )), eEncoding );
rOStm.WriteByteString( aRelURL );
@@ -192,7 +192,7 @@ Point IMapObject::GetLogPoint( const Point& rPixelPoint )
|*
\******************************************************************************/
-BOOL IMapObject::IsEqual( const IMapObject& rEqObj )
+sal_Bool IMapObject::IsEqual( const IMapObject& rEqObj )
{
return ( ( aURL == rEqObj.aURL ) &&
( aAltText == rEqObj.aAltText ) &&
@@ -213,8 +213,8 @@ IMapRectangleObject::IMapRectangleObject( const Rectangle& rRect,
const String& rDesc,
const String& rTarget,
const String& rName,
- BOOL bURLActive,
- BOOL bPixelCoords ) :
+ sal_Bool bURLActive,
+ sal_Bool bPixelCoords ) :
IMapObject ( rURL, rAltText, rDesc, rTarget, rName, bURLActive )
{
ImpConstruct( rRect, bPixelCoords );
@@ -227,7 +227,7 @@ IMapRectangleObject::IMapRectangleObject( const Rectangle& rRect,
|*
\******************************************************************************/
-void IMapRectangleObject::ImpConstruct( const Rectangle& rRect, BOOL bPixel )
+void IMapRectangleObject::ImpConstruct( const Rectangle& rRect, sal_Bool bPixel )
{
if ( bPixel )
aRect = Application::GetDefaultDevice()->PixelToLogic( rRect, MapMode( MAP_100TH_MM ) );
@@ -266,7 +266,7 @@ void IMapRectangleObject::ReadIMapObject( SvStream& rIStm )
|*
\******************************************************************************/
-UINT16 IMapRectangleObject::GetType() const
+sal_uInt16 IMapRectangleObject::GetType() const
{
return IMAP_OBJ_RECTANGLE;
}
@@ -278,7 +278,7 @@ UINT16 IMapRectangleObject::GetType() const
|*
\******************************************************************************/
-BOOL IMapRectangleObject::IsHit( const Point& rPoint ) const
+sal_Bool IMapRectangleObject::IsHit( const Point& rPoint ) const
{
return aRect.IsInside( rPoint );
}
@@ -290,7 +290,7 @@ BOOL IMapRectangleObject::IsHit( const Point& rPoint ) const
|*
\******************************************************************************/
-Rectangle IMapRectangleObject::GetRectangle( BOOL bPixelCoords ) const
+Rectangle IMapRectangleObject::GetRectangle( sal_Bool bPixelCoords ) const
{
Rectangle aNewRect;
@@ -330,7 +330,7 @@ void IMapRectangleObject::Scale( const Fraction& rFracX, const Fraction& rFracY
|*
\******************************************************************************/
-BOOL IMapRectangleObject::IsEqual( const IMapRectangleObject& rEqObj )
+sal_Bool IMapRectangleObject::IsEqual( const IMapRectangleObject& rEqObj )
{
return ( IMapObject::IsEqual( rEqObj ) && ( aRect == rEqObj.aRect ) );
}
@@ -340,14 +340,14 @@ BOOL IMapRectangleObject::IsEqual( const IMapRectangleObject& rEqObj )
/******************************************************************************/
/******************************************************************************/
-IMapCircleObject::IMapCircleObject( const Point& rCenter, ULONG nCircleRadius,
+IMapCircleObject::IMapCircleObject( const Point& rCenter, sal_uLong nCircleRadius,
const String& rURL,
const String& rAltText,
const String& rDesc,
const String& rTarget,
const String& rName,
- BOOL bURLActive,
- BOOL bPixelCoords ) :
+ sal_Bool bURLActive,
+ sal_Bool bPixelCoords ) :
IMapObject ( rURL, rAltText, rDesc, rTarget, rName, bURLActive )
{
ImpConstruct( rCenter, nCircleRadius, bPixelCoords );
@@ -360,7 +360,7 @@ IMapCircleObject::IMapCircleObject( const Point& rCenter, ULONG nCircleRadius,
|*
\******************************************************************************/
-void IMapCircleObject::ImpConstruct( const Point& rCenter, ULONG nRad, BOOL bPixel )
+void IMapCircleObject::ImpConstruct( const Point& rCenter, sal_uLong nRad, sal_Bool bPixel )
{
if ( bPixel )
{
@@ -385,7 +385,7 @@ void IMapCircleObject::ImpConstruct( const Point& rCenter, ULONG nRad, BOOL bPix
void IMapCircleObject::WriteIMapObject( SvStream& rOStm ) const
{
- UINT32 nTmp = nRadius;
+ sal_uInt32 nTmp = nRadius;
rOStm << aCenter;
rOStm << nTmp;
@@ -400,7 +400,7 @@ void IMapCircleObject::WriteIMapObject( SvStream& rOStm ) const
void IMapCircleObject::ReadIMapObject( SvStream& rIStm )
{
- UINT32 nTmp;
+ sal_uInt32 nTmp;
rIStm >> aCenter;
rIStm >> nTmp;
@@ -415,7 +415,7 @@ void IMapCircleObject::ReadIMapObject( SvStream& rIStm )
|*
\******************************************************************************/
-UINT16 IMapCircleObject::GetType() const
+sal_uInt16 IMapCircleObject::GetType() const
{
return IMAP_OBJ_CIRCLE;
}
@@ -427,15 +427,15 @@ UINT16 IMapCircleObject::GetType() const
|*
\******************************************************************************/
-BOOL IMapCircleObject::IsHit( const Point& rPoint ) const
+sal_Bool IMapCircleObject::IsHit( const Point& rPoint ) const
{
const Point aPoint( aCenter - rPoint );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
- if ( (ULONG) sqrt( (double) aPoint.X() * aPoint.X() +
+ if ( (sal_uLong) sqrt( (double) aPoint.X() * aPoint.X() +
aPoint.Y() * aPoint.Y() ) <= nRadius )
{
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -448,7 +448,7 @@ BOOL IMapCircleObject::IsHit( const Point& rPoint ) const
|*
\******************************************************************************/
-Point IMapCircleObject::GetCenter( BOOL bPixelCoords ) const
+Point IMapCircleObject::GetCenter( sal_Bool bPixelCoords ) const
{
Point aNewPoint;
@@ -467,9 +467,9 @@ Point IMapCircleObject::GetCenter( BOOL bPixelCoords ) const
|*
\******************************************************************************/
-ULONG IMapCircleObject::GetRadius( BOOL bPixelCoords ) const
+sal_uLong IMapCircleObject::GetRadius( sal_Bool bPixelCoords ) const
{
- ULONG nNewRadius;
+ sal_uLong nNewRadius;
if ( bPixelCoords )
nNewRadius = Application::GetDefaultDevice()->LogicToPixel( Size( nRadius, 0 ), MapMode( MAP_100TH_MM ) ).Width();
@@ -523,7 +523,7 @@ void IMapCircleObject::Scale( const Fraction& rFracX, const Fraction& rFracY )
|*
\******************************************************************************/
-BOOL IMapCircleObject::IsEqual( const IMapCircleObject& rEqObj )
+sal_Bool IMapCircleObject::IsEqual( const IMapCircleObject& rEqObj )
{
return ( IMapObject::IsEqual( rEqObj ) &&
( aCenter == rEqObj.aCenter ) &&
@@ -540,10 +540,10 @@ IMapPolygonObject::IMapPolygonObject( const Polygon& rPoly,
const String& rDesc,
const String& rTarget,
const String& rName,
- BOOL bURLActive,
- BOOL bPixelCoords ) :
+ sal_Bool bURLActive,
+ sal_Bool bPixelCoords ) :
IMapObject ( rURL, rAltText, rDesc, rTarget, rName, bURLActive ),
- bEllipse ( FALSE )
+ bEllipse ( sal_False )
{
ImpConstruct( rPoly, bPixelCoords );
}
@@ -555,7 +555,7 @@ IMapPolygonObject::IMapPolygonObject( const Polygon& rPoly,
|*
\******************************************************************************/
-void IMapPolygonObject::ImpConstruct( const Polygon& rPoly, BOOL bPixel )
+void IMapPolygonObject::ImpConstruct( const Polygon& rPoly, sal_Bool bPixel )
{
if ( bPixel )
aPoly = Application::GetDefaultDevice()->PixelToLogic( rPoly, MapMode( MAP_100TH_MM ) );
@@ -603,7 +603,7 @@ void IMapPolygonObject::ReadIMapObject( SvStream& rIStm )
|*
\******************************************************************************/
-UINT16 IMapPolygonObject::GetType() const
+sal_uInt16 IMapPolygonObject::GetType() const
{
return IMAP_OBJ_POLYGON;
}
@@ -615,7 +615,7 @@ UINT16 IMapPolygonObject::GetType() const
|*
\******************************************************************************/
-BOOL IMapPolygonObject::IsHit( const Point& rPoint ) const
+sal_Bool IMapPolygonObject::IsHit( const Point& rPoint ) const
{
return aPoly.IsInside( rPoint );
}
@@ -627,7 +627,7 @@ BOOL IMapPolygonObject::IsHit( const Point& rPoint ) const
|*
\******************************************************************************/
-Polygon IMapPolygonObject::GetPolygon( BOOL bPixelCoords ) const
+Polygon IMapPolygonObject::GetPolygon( sal_Bool bPixelCoords ) const
{
Polygon aNewPoly;
@@ -650,7 +650,7 @@ void IMapPolygonObject::SetExtraEllipse( const Rectangle& rEllipse )
{
if ( aPoly.GetSize() )
{
- bEllipse = TRUE;
+ bEllipse = sal_True;
aEllipse = rEllipse;
}
}
@@ -664,9 +664,9 @@ void IMapPolygonObject::SetExtraEllipse( const Rectangle& rEllipse )
void IMapPolygonObject::Scale( const Fraction& rFracX, const Fraction& rFracY )
{
- USHORT nCount = aPoly.GetSize();
+ sal_uInt16 nCount = aPoly.GetSize();
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
Point aScaledPt( aPoly[ i ] );
@@ -700,30 +700,30 @@ void IMapPolygonObject::Scale( const Fraction& rFracX, const Fraction& rFracY )
|*
\******************************************************************************/
-BOOL IMapPolygonObject::IsEqual( const IMapPolygonObject& rEqObj )
+sal_Bool IMapPolygonObject::IsEqual( const IMapPolygonObject& rEqObj )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( IMapObject::IsEqual( rEqObj ) )
{
const Polygon& rEqPoly = rEqObj.aPoly;
- const USHORT nCount = aPoly.GetSize();
- const USHORT nEqCount = rEqPoly.GetSize();
- BOOL bDifferent = FALSE;
+ const sal_uInt16 nCount = aPoly.GetSize();
+ const sal_uInt16 nEqCount = rEqPoly.GetSize();
+ sal_Bool bDifferent = sal_False;
if ( nCount == nEqCount )
{
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
if ( aPoly[ i ] != rEqPoly[ i ] )
{
- bDifferent = TRUE;
+ bDifferent = sal_True;
break;
}
}
if ( !bDifferent )
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -758,9 +758,9 @@ ImageMap::ImageMap( const ImageMap& rImageMap )
{
DBG_CTOR( ImageMap, NULL );
- USHORT nCount = rImageMap.GetIMapObjectCount();
+ sal_uInt16 nCount = rImageMap.GetIMapObjectCount();
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
IMapObject* pCopyObj = rImageMap.GetIMapObject( i );
@@ -831,11 +831,11 @@ void ImageMap::ClearImageMap()
ImageMap& ImageMap::operator=( const ImageMap& rImageMap )
{
- USHORT nCount = rImageMap.GetIMapObjectCount();
+ sal_uInt16 nCount = rImageMap.GetIMapObjectCount();
ClearImageMap();
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
IMapObject* pCopyObj = rImageMap.GetIMapObject( i );
@@ -870,17 +870,17 @@ ImageMap& ImageMap::operator=( const ImageMap& rImageMap )
|*
\******************************************************************************/
-BOOL ImageMap::operator==( const ImageMap& rImageMap )
+sal_Bool ImageMap::operator==( const ImageMap& rImageMap )
{
- const USHORT nCount = (USHORT) maList.Count();
- const USHORT nEqCount = rImageMap.GetIMapObjectCount();
- BOOL bRet = FALSE;
+ const sal_uInt16 nCount = (sal_uInt16) maList.Count();
+ const sal_uInt16 nEqCount = rImageMap.GetIMapObjectCount();
+ sal_Bool bRet = sal_False;
if ( nCount == nEqCount )
{
- BOOL bDifferent = ( aName != rImageMap.aName );
+ sal_Bool bDifferent = ( aName != rImageMap.aName );
- for ( USHORT i = 0; ( i < nCount ) && !bDifferent; i++ )
+ for ( sal_uInt16 i = 0; ( i < nCount ) && !bDifferent; i++ )
{
IMapObject* pObj = (IMapObject*) maList.GetObject( i );
IMapObject* pEqObj = rImageMap.GetIMapObject( i );
@@ -892,21 +892,21 @@ BOOL ImageMap::operator==( const ImageMap& rImageMap )
case( IMAP_OBJ_RECTANGLE ):
{
if ( !( (IMapRectangleObject*) pObj )->IsEqual( *(IMapRectangleObject*) pEqObj ) )
- bDifferent = TRUE;
+ bDifferent = sal_True;
}
break;
case( IMAP_OBJ_CIRCLE ):
{
if ( !( (IMapCircleObject*) pObj )->IsEqual( *(IMapCircleObject*) pEqObj ) )
- bDifferent = TRUE;
+ bDifferent = sal_True;
}
break;
case( IMAP_OBJ_POLYGON ):
{
if ( !( (IMapPolygonObject*) pObj )->IsEqual( *(IMapPolygonObject*) pEqObj ) )
- bDifferent = TRUE;
+ bDifferent = sal_True;
}
break;
@@ -915,11 +915,11 @@ BOOL ImageMap::operator==( const ImageMap& rImageMap )
}
}
else
- bDifferent = TRUE;
+ bDifferent = sal_True;
}
if ( !bDifferent )
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -932,7 +932,7 @@ BOOL ImageMap::operator==( const ImageMap& rImageMap )
|*
\******************************************************************************/
-BOOL ImageMap::operator!=( const ImageMap& rImageMap )
+sal_Bool ImageMap::operator!=( const ImageMap& rImageMap )
{
return !( *this == rImageMap );
}
@@ -944,7 +944,7 @@ BOOL ImageMap::operator!=( const ImageMap& rImageMap )
|*
\******************************************************************************/
-UINT16 ImageMap::GetVersion() const
+sal_uInt16 ImageMap::GetVersion() const
{
return IMAGE_MAP_VERSION;
}
@@ -987,7 +987,7 @@ void ImageMap::InsertIMapObject( const IMapObject& rIMapObject )
IMapObject* ImageMap::GetHitIMapObject( const Size& rTotalSize,
const Size& rDisplaySize,
const Point& rRelHitPoint,
- ULONG nFlags )
+ sal_uLong nFlags )
{
Point aRelPoint( rTotalSize.Width() * rRelHitPoint.X() / rDisplaySize.Width(),
rTotalSize.Height() * rRelHitPoint.Y() / rDisplaySize.Height() );
@@ -1026,9 +1026,9 @@ IMapObject* ImageMap::GetHitIMapObject( const Size& rTotalSize,
Rectangle ImageMap::GetBoundRect() const
{
Rectangle aBoundRect;
- ULONG nCount = maList.Count();
+ sal_uLong nCount = maList.Count();
- for ( ULONG i = 0; i < nCount; i++ )
+ for ( sal_uLong i = 0; i < nCount; i++ )
aBoundRect.Union( ( (IMapObject*) maList.GetObject( i ) )->GetBoundRect() );
return aBoundRect;
@@ -1043,9 +1043,9 @@ Rectangle ImageMap::GetBoundRect() const
void ImageMap::Scale( const Fraction& rFracX, const Fraction& rFracY )
{
- USHORT nCount = (USHORT) maList.Count();
+ sal_uInt16 nCount = (sal_uInt16) maList.Count();
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
IMapObject* pObj = GetIMapObject( i );
@@ -1079,9 +1079,9 @@ void ImageMap::Scale( const Fraction& rFracX, const Fraction& rFracY )
void ImageMap::ImpWriteImageMap( SvStream& rOStm, const String& rBaseURL ) const
{
IMapObject* pObj;
- USHORT nCount = (USHORT) maList.Count();
+ sal_uInt16 nCount = (sal_uInt16) maList.Count();
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
pObj = (IMapObject*) maList.GetObject( i );
pObj->Write( rOStm, rBaseURL );
@@ -1095,12 +1095,12 @@ void ImageMap::ImpWriteImageMap( SvStream& rOStm, const String& rBaseURL ) const
|*
\******************************************************************************/
-void ImageMap::ImpReadImageMap( SvStream& rIStm, USHORT nCount, const String& rBaseURL )
+void ImageMap::ImpReadImageMap( SvStream& rIStm, sal_uInt16 nCount, const String& rBaseURL )
{
// neue Objekte einlesen
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
- UINT16 nType;
+ sal_uInt16 nType;
rIStm >> nType;
rIStm.SeekRel( -2 );
@@ -1149,8 +1149,8 @@ void ImageMap::Write( SvStream& rOStm, const String& rBaseURL ) const
IMapCompat* pCompat;
String aImageName( GetName() );
String aDummy;
- USHORT nOldFormat = rOStm.GetNumberFormatInt();
- UINT16 nCount = (UINT16) GetIMapObjectCount();
+ sal_uInt16 nOldFormat = rOStm.GetNumberFormatInt();
+ sal_uInt16 nCount = (sal_uInt16) GetIMapObjectCount();
const rtl_TextEncoding eEncoding = gsl_getSystemTextEncoding();
rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -1185,8 +1185,8 @@ void ImageMap::Read( SvStream& rIStm, const String& rBaseURL )
{
ByteString aString;
char cMagic[6];
- USHORT nOldFormat = rIStm.GetNumberFormatInt();
- UINT16 nCount;
+ sal_uInt16 nOldFormat = rIStm.GetNumberFormatInt();
+ sal_uInt16 nCount;
rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
rIStm.Read( cMagic, sizeof( cMagic ) );
diff --git a/svtools/source/misc/imap2.cxx b/svtools/source/misc/imap2.cxx
index 587a31d4f098..dedfb22532cb 100644
--- a/svtools/source/misc/imap2.cxx
+++ b/svtools/source/misc/imap2.cxx
@@ -212,9 +212,9 @@ void IMapCircleObject::WriteNCSA( SvStream& rOStm, const String& rBaseURL ) cons
void IMapPolygonObject::WriteCERN( SvStream& rOStm, const String& rBaseURL ) const
{
ByteString aStr( "polygon " );
- const USHORT nCount = aPoly.GetSize();
+ const sal_uInt16 nCount = aPoly.GetSize();
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
AppendCERNCoords( aPoly[ i ], aStr );
AppendCERNURL( aStr, rBaseURL );
@@ -232,11 +232,11 @@ void IMapPolygonObject::WriteCERN( SvStream& rOStm, const String& rBaseURL ) co
void IMapPolygonObject::WriteNCSA( SvStream& rOStm, const String& rBaseURL ) const
{
ByteString aStr( "poly " );
- const USHORT nCount = Min( aPoly.GetSize(), (USHORT) 100 );
+ const sal_uInt16 nCount = Min( aPoly.GetSize(), (sal_uInt16) 100 );
AppendNCSAURL( aStr, rBaseURL );
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
AppendNCSACoords( aPoly[ i ], aStr );
rOStm.WriteLine( aStr );
@@ -253,7 +253,7 @@ void IMapPolygonObject::WriteNCSA( SvStream& rOStm, const String& rBaseURL ) co
|*
\******************************************************************************/
-void ImageMap::Write( SvStream& rOStm, ULONG nFormat, const String& rBaseURL ) const
+void ImageMap::Write( SvStream& rOStm, sal_uLong nFormat, const String& rBaseURL ) const
{
switch( nFormat )
{
@@ -276,9 +276,9 @@ void ImageMap::Write( SvStream& rOStm, ULONG nFormat, const String& rBaseURL ) c
void ImageMap::ImpWriteCERN( SvStream& rOStm, const String& rBaseURL ) const
{
IMapObject* pObj;
- USHORT nCount = (USHORT) maList.Count();
+ sal_uInt16 nCount = (sal_uInt16) maList.Count();
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
pObj = GetIMapObject( i );
@@ -312,9 +312,9 @@ void ImageMap::ImpWriteCERN( SvStream& rOStm, const String& rBaseURL ) const
void ImageMap::ImpWriteNCSA( SvStream& rOStm, const String& rBaseURL ) const
{
IMapObject* pObj;
- USHORT nCount = (USHORT) maList.Count();
+ sal_uInt16 nCount = (sal_uInt16) maList.Count();
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
pObj = GetIMapObject( i );
@@ -345,9 +345,9 @@ void ImageMap::ImpWriteNCSA( SvStream& rOStm, const String& rBaseURL ) const
|*
\******************************************************************************/
-ULONG ImageMap::Read( SvStream& rIStm, ULONG nFormat, const String& rBaseURL )
+sal_uLong ImageMap::Read( SvStream& rIStm, sal_uLong nFormat, const String& rBaseURL )
{
- ULONG nRet = IMAP_ERR_FORMAT;
+ sal_uLong nRet = IMAP_ERR_FORMAT;
if ( nFormat == IMAP_FORMAT_DETECT )
nFormat = ImpDetectFormat( rIStm );
@@ -375,7 +375,7 @@ ULONG ImageMap::Read( SvStream& rIStm, ULONG nFormat, const String& rBaseURL )
|*
\******************************************************************************/
-ULONG ImageMap::ImpReadCERN( SvStream& rIStm, const String& rBaseURL )
+sal_uLong ImageMap::ImpReadCERN( SvStream& rIStm, const String& rBaseURL )
{
ByteString aStr;
@@ -438,11 +438,11 @@ void ImageMap::ImpReadCERNLine( const ByteString& rLine, const String& rBaseURL
}
else if ( ( aToken == "polygon" ) || ( aToken == "poly" ) )
{
- const USHORT nCount = aStr.GetTokenCount( '(' ) - 1;
+ const sal_uInt16 nCount = aStr.GetTokenCount( '(' ) - 1;
Polygon aPoly( nCount );
String aURL;
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
aPoly[ i ] = ImpReadCERNCoords( &pStr );
aURL = ImpReadCERNURL( &pStr, rBaseURL );
@@ -553,7 +553,7 @@ String ImageMap::ImpReadCERNURL( const char** ppStr, const String& rBaseURL )
|*
\******************************************************************************/
-ULONG ImageMap::ImpReadNCSA( SvStream& rIStm, const String& rBaseURL )
+sal_uLong ImageMap::ImpReadNCSA( SvStream& rIStm, const String& rBaseURL )
{
ByteString aStr;
@@ -618,11 +618,11 @@ void ImageMap::ImpReadNCSALine( const ByteString& rLine, const String& rBaseURL
}
else if ( aToken == "poly" )
{
- const USHORT nCount = aStr.GetTokenCount( ',' ) - 1;
+ const sal_uInt16 nCount = aStr.GetTokenCount( ',' ) - 1;
const String aURL( ImpReadNCSAURL( &pStr, rBaseURL ) );
Polygon aPoly( nCount );
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
aPoly[ i ] = ImpReadNCSACoords( &pStr );
IMapPolygonObject* pObj = new IMapPolygonObject( aPoly, aURL, String(), String(), String(), String() );
@@ -708,10 +708,10 @@ Point ImageMap::ImpReadNCSACoords( const char** ppStr )
|*
\******************************************************************************/
-ULONG ImageMap::ImpDetectFormat( SvStream& rIStm )
+sal_uLong ImageMap::ImpDetectFormat( SvStream& rIStm )
{
- ULONG nPos = rIStm.Tell();
- ULONG nRet = IMAP_FORMAT_BIN;
+ sal_uLong nPos = rIStm.Tell();
+ sal_uLong nRet = IMAP_FORMAT_BIN;
char cMagic[6];
rIStm.Read( cMagic, sizeof( cMagic ) );
diff --git a/svtools/source/misc/imap3.cxx b/svtools/source/misc/imap3.cxx
index 76763ae422f2..49d5f4c5984e 100644
--- a/svtools/source/misc/imap3.cxx
+++ b/svtools/source/misc/imap3.cxx
@@ -40,7 +40,7 @@
|*
\******************************************************************************/
-IMapCompat::IMapCompat( SvStream& rStm, const USHORT nStreamMode ) :
+IMapCompat::IMapCompat( SvStream& rStm, const sal_uInt16 nStreamMode ) :
pRWStm ( &rStm ),
nStmMode ( nStreamMode )
{
@@ -56,7 +56,7 @@ IMapCompat::IMapCompat( SvStream& rStm, const USHORT nStreamMode ) :
}
else
{
- UINT32 nTotalSizeTmp;
+ sal_uInt32 nTotalSizeTmp;
*pRWStm >> nTotalSizeTmp;
nTotalSize = nTotalSizeTmp;
nCompatPos = pRWStm->Tell();
@@ -77,15 +77,15 @@ IMapCompat::~IMapCompat()
{
if ( nStmMode == STREAM_WRITE )
{
- const ULONG nEndPos = pRWStm->Tell();
+ const sal_uLong nEndPos = pRWStm->Tell();
pRWStm->Seek( nCompatPos );
- *pRWStm << (UINT32) ( nEndPos - nTotalSize );
+ *pRWStm << (sal_uInt32) ( nEndPos - nTotalSize );
pRWStm->Seek( nEndPos );
}
else
{
- const ULONG nReadSize = pRWStm->Tell() - nCompatPos;
+ const sal_uLong nReadSize = pRWStm->Tell() - nCompatPos;
if ( nTotalSize > nReadSize )
pRWStm->SeekRel( nTotalSize - nReadSize );
diff --git a/svtools/source/misc/itemdel.cxx b/svtools/source/misc/itemdel.cxx
index a161571daae7..676ae5383e63 100644
--- a/svtools/source/misc/itemdel.cxx
+++ b/svtools/source/misc/itemdel.cxx
@@ -124,7 +124,7 @@ void DeleteOnIdleItems()
= ImpSvtData::GetSvtData().pItemDesruptList;
if ( rpList )
{
- USHORT n;
+ sal_uInt16 n;
while ( 0 != ( n = rpList->Count() ) )
// Remove ist implizit im Dtor
delete rpList->GetObject( n-1 );
diff --git a/svtools/source/misc/langtab.cxx b/svtools/source/misc/langtab.cxx
index d1ff94572a99..61d397afbec9 100644..100755
--- a/svtools/source/misc/langtab.cxx
+++ b/svtools/source/misc/langtab.cxx
@@ -51,7 +51,7 @@ using namespace ::com::sun::star;
SVT_DLLPUBLIC const String ApplyLreOrRleEmbedding( const String &rText )
{
- const USHORT nLen = rText.Len();
+ const sal_uInt16 nLen = rText.Len();
if (nLen == 0)
return String();
@@ -77,7 +77,7 @@ SVT_DLLPUBLIC const String ApplyLreOrRleEmbedding( const String &rText )
// Thus we can avoid to check every character of the text.
bool bFound = false;
bool bIsRtlText = false;
- for (USHORT i = 0; i < nLen && !bFound; ++i)
+ for (sal_uInt16 i = 0; i < nLen && !bFound; ++i)
{
sal_Int16 nDirection = rCharClass.getCharacterDirection( rText, i );
switch (nDirection)
diff --git a/svtools/source/misc/langtab.src b/svtools/source/misc/langtab.src
index 067eb601a5af..bb5fa2dfd363 100644
--- a/svtools/source/misc/langtab.src
+++ b/svtools/source/misc/langtab.src
@@ -301,7 +301,7 @@ StringArray STR_ARR_SVT_LANGUAGE_TABLE
< "Shuswap" ; LANGUAGE_USER_SHUSWAP ; > ;
< "Oromo" ; LANGUAGE_OROMO ; > ;
< "Greek, Ancient" ; LANGUAGE_USER_ANCIENT_GREEK ; > ;
- < "Yiddish" ; LANGUAGE_YIDDISH ; > ;
+ < "Yiddish (Israel)" ; LANGUAGE_YIDDISH ; > ;
< "Quechua (Ecuador)" ; LANGUAGE_QUECHUA_ECUADOR ; > ;
< "Uyghur" ; LANGUAGE_UIGHUR_CHINA ; > ;
< "Asturian" ; LANGUAGE_USER_ASTURIAN ; > ;
@@ -323,6 +323,12 @@ StringArray STR_ARR_SVT_LANGUAGE_TABLE
< "Yoruba" ; LANGUAGE_YORUBA ; > ;
< "Rusyn (Ukraine)" ; LANGUAGE_USER_RUSYN_UKRAINE ; > ;
< "Rusyn (Slovakia)" ; LANGUAGE_USER_RUSYN_SLOVAKIA ; > ;
+ < "Yiddish (USA)" ; LANGUAGE_USER_YIDDISH_US ; > ;
+ < "Hawaiian" ; LANGUAGE_HAWAIIAN_UNITED_STATES ; > ;
+ < "Limbu" ; LANGUAGE_USER_LIMBU ; > ;
+ < "Lojban" ; LANGUAGE_USER_LOJBAN ; > ;
+ < "Kabyle" ; LANGUAGE_USER_KABYLE ; > ;
+ < "Haitian" ; LANGUAGE_USER_HAITIAN ; > ;
};
};
diff --git a/svtools/source/misc/svtdata.cxx b/svtools/source/misc/svtdata.cxx
index 495929bd89dc..f4d959ec8793 100644
--- a/svtools/source/misc/svtdata.cxx
+++ b/svtools/source/misc/svtdata.cxx
@@ -71,8 +71,8 @@ ImpSvtData & ImpSvtData::GetSvtData()
return *static_cast<ImpSvtData *>(*pAppData);
}
-SvtResId::SvtResId(USHORT nId, const ::com::sun::star::lang::Locale aLocale):
+SvtResId::SvtResId(sal_uInt16 nId, const ::com::sun::star::lang::Locale aLocale):
ResId(nId, *ImpSvtData::GetSvtData().GetResMgr(aLocale)) {}
-SvtResId::SvtResId(USHORT nId): ResId(nId, *ImpSvtData::GetSvtData().GetResMgr()) {}
+SvtResId::SvtResId(sal_uInt16 nId): ResId(nId, *ImpSvtData::GetSvtData().GetResMgr()) {}
diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx
index a6c3617b50a7..3c118445c6f4 100644
--- a/svtools/source/misc/templatefoldercache.cxx
+++ b/svtools/source/misc/templatefoldercache.cxx
@@ -116,8 +116,8 @@ namespace svt
//=====================================================================
struct TemplateContent;
typedef ::std::vector< ::vos::ORef< TemplateContent > > TemplateFolderContent;
- typedef TemplateFolderContent::const_iterator ConstFolderIterator;
- typedef TemplateFolderContent::iterator FolderIterator;
+ typedef TemplateFolderContent::const_iterator ConstFolderIterator;
+ typedef TemplateFolderContent::iterator FolderIterator;
/** a struct describing one content in one of the template dirs (or at least it's relevant aspects)
*/
@@ -706,15 +706,18 @@ namespace svt
m_aCurrentState.swap( aTemplateFolderContent );
// the template directories from the config
- String aDirs = SvtPathOptions().GetTemplatePath();
+ const SvtPathOptions aPathOptions;
+ String aDirs = aPathOptions.GetTemplatePath();
sal_uInt16 nDirs = aDirs.GetTokenCount( ';' );
m_aCurrentState.reserve( nDirs );
// loop through all the root-level template folders
for ( sal_uInt16 i=0; i<nDirs; ++i)
{
+ String sTemplatePath( aDirs.GetToken( i, ';' ) );
+ sTemplatePath = aPathOptions.ExpandMacros( sTemplatePath );
// create a new entry
- m_aCurrentState.push_back( new TemplateContent( INetURLObject( aDirs.GetToken( i, ';' ) ) ) );
+ m_aCurrentState.push_back( new TemplateContent( INetURLObject( sTemplatePath ) ) );
TemplateFolderContent::iterator aCurrentRoot = m_aCurrentState.end();
--aCurrentRoot;
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx
index 4e245ca50520..fcd519398c8e 100644
--- a/svtools/source/misc/transfer.cxx
+++ b/svtools/source/misc/transfer.cxx
@@ -432,7 +432,7 @@ Any SAL_CALL TransferableHelper::getTransferData( const DataFlavor& rFlavor ) th
SvMemoryStream aDstStm( 65535, 65535 );
// taking wmf without file header
- if ( ConvertGDIMetaFileToWMF( aMtf, aDstStm, NULL, FALSE ) )
+ if ( ConvertGDIMetaFileToWMF( aMtf, aDstStm, NULL, sal_False ) )
{
maAny <<= ( aSeq = Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( aDstStm.GetData() ),
aDstStm.Seek( STREAM_SEEK_TO_END ) ) );
@@ -936,7 +936,7 @@ sal_Bool TransferableHelper::SetINetBookmark( const INetBookmark& rBmk,
rFDesc1.dwFlags = FD_LINKUI;
ByteString aStr( rBmk.GetDescription(), eSysCSet );
- for( USHORT nChar = 0; nChar < aStr.Len(); ++nChar )
+ for( sal_uInt16 nChar = 0; nChar < aStr.Len(); ++nChar )
if( strchr( "\\/:*?\"<>|", aStr.GetChar( nChar ) ) )
aStr.Erase( nChar--, 1 );
@@ -1844,7 +1844,7 @@ sal_Bool TransferableDataHelper::GetGDIMetaFile( const DataFlavor& rFlavor, GDIM
if( GraphicConverter::Import( *xStm, aGraphic ) == ERRCODE_NONE )
{
rMtf = aGraphic.GetGDIMetaFile();
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -1858,7 +1858,7 @@ sal_Bool TransferableDataHelper::GetGDIMetaFile( const DataFlavor& rFlavor, GDIM
if( GraphicConverter::Import( *xStm, aGraphic ) == ERRCODE_NONE )
{
rMtf = aGraphic.GetGDIMetaFile();
- bRet = TRUE;
+ bRet = sal_True;
}
}
diff --git a/svtools/source/misc/transfer2.cxx b/svtools/source/misc/transfer2.cxx
index ea1b0174465e..841ac4d38135 100644
--- a/svtools/source/misc/transfer2.cxx
+++ b/svtools/source/misc/transfer2.cxx
@@ -434,7 +434,7 @@ sal_Bool TransferDataContainer::GetData( const
TDataCntnrEntryList::iterator aIter( pImpl->aFmtList.begin() ),
aEnd( pImpl->aFmtList.end() );
sal_Bool bFnd = sal_False;
- ULONG nFmtId = SotExchange::GetFormat( rFlavor );
+ sal_uLong nFmtId = SotExchange::GetFormat( rFlavor );
// test first the list
for( ; aIter != aEnd; ++aIter )
@@ -500,8 +500,8 @@ void TransferDataContainer::CopyINetBookmark( const INetBookmark& rBkmk )
// -----------------------------------------------------------------------------
-void TransferDataContainer::CopyAnyData( ULONG nFormatId,
- const sal_Char* pData, ULONG nLen )
+void TransferDataContainer::CopyAnyData( sal_uLong nFormatId,
+ const sal_Char* pData, sal_uLong nLen )
{
if( nLen )
{
@@ -518,7 +518,7 @@ void TransferDataContainer::CopyAnyData( ULONG nFormatId,
// -----------------------------------------------------------------------------
-void TransferDataContainer::CopyByteString( ULONG nFormatId,
+void TransferDataContainer::CopyByteString( sal_uLong nFormatId,
const ByteString& rStr )
{
CopyAnyData( nFormatId, rStr.GetBuffer(), rStr.Len() );
@@ -568,7 +568,7 @@ void TransferDataContainer::CopyGraphic( const Graphic& rGrf )
// -----------------------------------------------------------------------------
-void TransferDataContainer::CopyString( USHORT nFmt, const String& rStr )
+void TransferDataContainer::CopyString( sal_uInt16 nFmt, const String& rStr )
{
if( rStr.Len() )
{
@@ -590,7 +590,7 @@ void TransferDataContainer::CopyString( const String& rStr )
// -----------------------------------------------------------------------------
-void TransferDataContainer::CopyAny( USHORT nFmt,
+void TransferDataContainer::CopyAny( sal_uInt16 nFmt,
const ::com::sun::star::uno::Any& rAny )
{
TDataCntnrEntry_Impl aEntry;
diff --git a/svtools/source/misc/unitconv.cxx b/svtools/source/misc/unitconv.cxx
index 612bcb4f0221..fa92a6ecb0be 100644
--- a/svtools/source/misc/unitconv.cxx
+++ b/svtools/source/misc/unitconv.cxx
@@ -37,7 +37,7 @@
// -----------------------------------------------------------------------
-void SetFieldUnit( MetricField& rField, FieldUnit eUnit, BOOL bAll )
+void SetFieldUnit( MetricField& rField, FieldUnit eUnit, sal_Bool bAll )
{
sal_Int64 nFirst = rField.Denormalize( rField.GetFirst( FUNIT_TWIP ) );
sal_Int64 nLast = rField.Denormalize( rField.GetLast( FUNIT_TWIP ) );
@@ -94,7 +94,7 @@ void SetFieldUnit( MetricField& rField, FieldUnit eUnit, BOOL bAll )
// -----------------------------------------------------------------------
-void SetFieldUnit( MetricBox& rBox, FieldUnit eUnit, BOOL bAll )
+void SetFieldUnit( MetricBox& rBox, FieldUnit eUnit, sal_Bool bAll )
{
sal_Int64 nMin = rBox.Denormalize( rBox.GetMin( FUNIT_TWIP ) );
sal_Int64 nMax = rBox.Denormalize( rBox.GetMax( FUNIT_TWIP ) );
@@ -350,7 +350,7 @@ long ConvertValueToUnit( long nVal, SfxMapUnit eUnit )
// -----------------------------------------------------------------------
-long CalcToPoint( long nIn, SfxMapUnit eUnit, USHORT nFaktor )
+long CalcToPoint( long nIn, SfxMapUnit eUnit, sal_uInt16 nFaktor )
{
DBG_ASSERT( eUnit == SFX_MAPUNIT_TWIP ||
eUnit == SFX_MAPUNIT_100TH_MM ||
@@ -722,8 +722,8 @@ long TransformMetric( long nVal, FieldUnit aOld, FieldUnit aNew )
return nVal;
}
- USHORT nOld = 0;
- USHORT nNew = 0;
+ sal_uInt16 nOld = 0;
+ sal_uInt16 nNew = 0;
switch ( aOld )
{
diff --git a/svtools/source/misc/xwindowitem.cxx b/svtools/source/misc/xwindowitem.cxx
index a382d8293617..3f499dca0a96 100644
--- a/svtools/source/misc/xwindowitem.cxx
+++ b/svtools/source/misc/xwindowitem.cxx
@@ -46,7 +46,7 @@ XWindowItem::XWindowItem() :
}
-XWindowItem::XWindowItem( USHORT nWhichId, Window * pWin ) :
+XWindowItem::XWindowItem( sal_uInt16 nWhichId, Window * pWin ) :
SfxPoolItem( nWhichId )
{
if (pWin)
@@ -58,7 +58,7 @@ XWindowItem::XWindowItem( USHORT nWhichId, Window * pWin ) :
}
-XWindowItem::XWindowItem( USHORT nWhichId, uno::Reference< awt::XWindow > & rxWin ) :
+XWindowItem::XWindowItem( sal_uInt16 nWhichId, uno::Reference< awt::XWindow > & rxWin ) :
SfxPoolItem( nWhichId ),
m_xWin( rxWin )
{
diff --git a/svtools/source/plugapp/ttprops.cxx b/svtools/source/plugapp/ttprops.cxx
index 2ae41a4c50c1..d80f643cff71 100644
--- a/svtools/source/plugapp/ttprops.cxx
+++ b/svtools/source/plugapp/ttprops.cxx
@@ -34,7 +34,7 @@
TYPEINIT1( TTProperties, ApplicationProperty )
-BOOL TTProperties::RequestProperty( USHORT nRequest )
+sal_Bool TTProperties::RequestProperty( sal_uInt16 nRequest )
{
if ( (( nRequest & TT_PR_ONCE ) == 0) || (nDonePRs & (nRequest & 0x0ff)) == 0 )
{
@@ -43,17 +43,17 @@ BOOL TTProperties::RequestProperty( USHORT nRequest )
GetpApp()->Property( *this );
return nActualPR == 0;
}
- return TRUE;
+ return sal_True;
}
-BOOL TTProperties::GetSlots()
+sal_Bool TTProperties::GetSlots()
{
RequestProperty( TT_PR_SLOTS );
return HasSlots();
}
-USHORT TTProperties::ExecuteFunction( USHORT nSID, SfxPoolItem** ppArgs, USHORT nMode )
+sal_uInt16 TTProperties::ExecuteFunction( sal_uInt16 nSID, SfxPoolItem** ppArgs, sal_uInt16 nMode )
{
mnSID = nSID;
mppArgs = ppArgs;
@@ -63,16 +63,16 @@ USHORT TTProperties::ExecuteFunction( USHORT nSID, SfxPoolItem** ppArgs, USHORT
return nActualPR;
}
-BOOL TTProperties::Img( Bitmap *pBmp )
+sal_Bool TTProperties::Img( Bitmap *pBmp )
{
- BOOL bRet;
+ sal_Bool bRet;
mpBmp = pBmp;
bRet = RequestProperty( TT_PR_IMG );
mpBmp = NULL;
return bRet;
}
-SvtResId TTProperties::GetSvtResId( USHORT nId )
+SvtResId TTProperties::GetSvtResId( sal_uInt16 nId )
{
return SvtResId( nId );
}
diff --git a/svtools/source/productregistration/registrationdlg.cxx b/svtools/source/productregistration/registrationdlg.cxx
index 460cedb060d1..7cface187915 100644
--- a/svtools/source/productregistration/registrationdlg.cxx
+++ b/svtools/source/productregistration/registrationdlg.cxx
@@ -117,7 +117,7 @@ namespace svt
FreeResource();
- m_aNow.Check( TRUE );
+ m_aNow.Check( sal_True );
}
//--------------------------------------------------------------------
diff --git a/svtools/source/svhtml/htmlkywd.cxx b/svtools/source/svhtml/htmlkywd.cxx
index e966ccb2b5f6..2c949c1a6c4e 100644
--- a/svtools/source/svhtml/htmlkywd.cxx
+++ b/svtools/source/svhtml/htmlkywd.cxx
@@ -49,7 +49,7 @@ struct HTML_TokenEntry
};
// Flag: RTF-Token Tabelle wurde schon sortiert
-static int __FAR_DATA bSortKeyWords = FALSE;
+static int __FAR_DATA bSortKeyWords = sal_False;
static HTML_TokenEntry __FAR_DATA aHTMLTokenTab[] = {
{{OOO_STRING_SVTOOLS_HTML_area}, HTML_AREA}, // Netscape 2.0
@@ -244,7 +244,7 @@ int GetHTMLToken( const String& rName )
sizeof( aHTMLTokenTab ) / sizeof( HTML_TokenEntry ),
sizeof( HTML_TokenEntry ),
HTMLKeyCompare );
- bSortKeyWords = TRUE;
+ bSortKeyWords = sal_True;
}
int nRet = 0;
@@ -279,7 +279,7 @@ struct HTML_CharEntry
};
// Flag: RTF-Token Tabelle wurde schon sortiert
-static int __FAR_DATA bSortCharKeyWords = FALSE;
+static int __FAR_DATA bSortCharKeyWords = sal_False;
static HTML_CharEntry __FAR_DATA aHTMLCharNameTab[] = {
{{OOO_STRING_SVTOOLS_HTML_C_lt}, 60},
@@ -599,7 +599,7 @@ sal_Unicode GetHTMLCharName( const String& rName )
sizeof( aHTMLCharNameTab ) / sizeof( HTML_CharEntry ),
sizeof( HTML_CharEntry ),
HTMLCharNameCompare );
- bSortCharKeyWords = TRUE;
+ bSortCharKeyWords = sal_True;
}
sal_Unicode cRet = 0;
@@ -620,7 +620,7 @@ sal_Unicode GetHTMLCharName( const String& rName )
/* */
// Flag: Optionen-Tabelle wurde schon sortiert
-static int __FAR_DATA bSortOptionKeyWords = FALSE;
+static int __FAR_DATA bSortOptionKeyWords = sal_False;
static HTML_TokenEntry __FAR_DATA aHTMLOptionTab[] = {
@@ -832,7 +832,7 @@ int GetHTMLOption( const String& rName )
sizeof( aHTMLOptionTab ) / sizeof( HTML_TokenEntry ),
sizeof( HTML_TokenEntry ),
HTMLKeyCompare );
- bSortOptionKeyWords = TRUE;
+ bSortOptionKeyWords = sal_True;
}
int nRet = HTML_O_UNKNOWN;
@@ -860,10 +860,10 @@ struct HTML_ColorEntry
const sal_Char* sName;
const String *pUName;
};
- ULONG nColor;
+ sal_uLong nColor;
};
-static int __FAR_DATA bSortColorKeyWords = FALSE;
+static int __FAR_DATA bSortColorKeyWords = sal_False;
#define HTML_NO_COLOR 0xffffffffUL
@@ -1052,7 +1052,7 @@ static int
}
-ULONG GetHTMLColor( const String& rName )
+sal_uLong GetHTMLColor( const String& rName )
{
if( !bSortColorKeyWords )
{
@@ -1060,10 +1060,10 @@ ULONG GetHTMLColor( const String& rName )
sizeof( aHTMLColorNameTab ) / sizeof( HTML_ColorEntry ),
sizeof( HTML_ColorEntry ),
HTMLColorNameCompare );
- bSortColorKeyWords = TRUE;
+ bSortColorKeyWords = sal_True;
}
- ULONG nRet = ULONG_MAX;
+ sal_uLong nRet = ULONG_MAX;
void* pFound;
HTML_ColorEntry aSrch;
aSrch.pUName = &rName;
diff --git a/svtools/source/svhtml/htmlout.cxx b/svtools/source/svhtml/htmlout.cxx
index 33b8fd91a29f..6fa096937e7b 100644
--- a/svtools/source/svhtml/htmlout.cxx
+++ b/svtools/source/svhtml/htmlout.cxx
@@ -528,7 +528,7 @@ void HTMLOutFuncs::ConvertStringToHTML( const String& rSrc,
}
SvStream& HTMLOutFuncs::Out_AsciiTag( SvStream& rStream, const sal_Char *pStr,
- BOOL bOn, rtl_TextEncoding )
+ sal_Bool bOn, rtl_TextEncoding )
{
sal_Char sStt[3] = "</";
if( bOn )
@@ -569,7 +569,7 @@ SvStream& HTMLOutFuncs::FlushToAscii( SvStream& rStream,
return rStream;
}
-SvStream& HTMLOutFuncs::Out_Hex( SvStream& rStream, ULONG nHex, BYTE nLen,
+SvStream& HTMLOutFuncs::Out_Hex( SvStream& rStream, sal_uLong nHex, sal_uInt8 nLen,
rtl_TextEncoding )
{ // in einen Stream aus
sal_Char aNToABuf[] = "0000000000000000";
@@ -580,7 +580,7 @@ SvStream& HTMLOutFuncs::Out_Hex( SvStream& rStream, ULONG nHex, BYTE nLen,
// Pointer an das Bufferende setzen
sal_Char *pStr = aNToABuf + (sizeof(aNToABuf)-1);
- for( BYTE n = 0; n < nLen; ++n )
+ for( sal_uInt8 n = 0; n < nLen; ++n )
{
*(--pStr) = (sal_Char)(nHex & 0xf ) + 48;
if( *pStr > '9' )
@@ -615,7 +615,7 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream,
const ImageMap& rIMap,
const String& rName,
const HTMLOutEvent *pEventTable,
- BOOL bOutStarBasic,
+ sal_Bool bOutStarBasic,
const sal_Char *pDelim,
const sal_Char *pIndentArea,
const sal_Char *pIndentMap,
@@ -640,7 +640,7 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream,
Out_String( rStream, rOutName, eDestEnc, pNonConvertableChars );
rStream << "\">";
- for( USHORT i=0U; i<rIMap.GetIMapObjectCount(); i++ )
+ for( sal_uInt16 i=0U; i<rIMap.GetIMapObjectCount(); i++ )
{
const IMapObject* pObj = rIMap.GetIMapObject( i );
DBG_ASSERT( pObj, "Wo ist das ImageMap-Object?" );
@@ -683,7 +683,7 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream,
(const IMapPolygonObject *)pObj;
pShape= OOO_STRING_SVTOOLS_HTML_SH_poly;
Polygon aPoly( pPolyObj->GetPolygon() );
- USHORT nCount = aPoly.GetSize();
+ sal_uInt16 nCount = aPoly.GetSize();
if( nCount>0 )
{
const Point& rPoint = aPoly[0];
@@ -691,7 +691,7 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream,
ByteString::CreateFromInt32(rPoint.X())) += ',')
+= ByteString::CreateFromInt32(rPoint.Y());
}
- for( USHORT j=1; j<nCount; j++ )
+ for( sal_uInt16 j=1; j<nCount; j++ )
{
const Point& rPoint = aPoly[j];
(((aCoords += ',')
@@ -771,7 +771,7 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream,
rStream << pDelim;
if( pIndentMap )
rStream << pIndentMap;
- Out_AsciiTag( rStream, OOO_STRING_SVTOOLS_HTML_map, FALSE );
+ Out_AsciiTag( rStream, OOO_STRING_SVTOOLS_HTML_map, sal_False );
return rStream;
}
@@ -885,7 +885,7 @@ SvStream& HTMLOutFuncs::OutScript( SvStream& rStrm,
}
}
- HTMLOutFuncs::Out_AsciiTag( rStrm, OOO_STRING_SVTOOLS_HTML_script, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rStrm, OOO_STRING_SVTOOLS_HTML_script, sal_False );
return rStrm;
}
@@ -894,11 +894,11 @@ SvStream& HTMLOutFuncs::OutScript( SvStream& rStrm,
SvStream& HTMLOutFuncs::Out_Events( SvStream& rStrm,
const SvxMacroTableDtor& rMacroTable,
const HTMLOutEvent *pEventTable,
- BOOL bOutStarBasic,
+ sal_Bool bOutStarBasic,
rtl_TextEncoding eDestEnc,
String *pNonConvertableChars )
{
- USHORT i=0;
+ sal_uInt16 i=0;
while( pEventTable[i].pBasicName || pEventTable[i].pJavaName )
{
const SvxMacro *pMacro =
@@ -927,8 +927,8 @@ SvStream& HTMLOutFuncs::Out_Events( SvStream& rStrm,
}
ByteString& HTMLOutFuncs::CreateTableDataOptionsValNum( ByteString& aStrTD,
- BOOL bValue,
- double fVal, ULONG nFormat, SvNumberFormatter& rFormatter,
+ sal_Bool bValue,
+ double fVal, sal_uLong nFormat, SvNumberFormatter& rFormatter,
rtl_TextEncoding eDestEnc, String* pNonConvertableChars )
{
if ( bValue )
@@ -965,16 +965,16 @@ ByteString& HTMLOutFuncs::CreateTableDataOptionsValNum( ByteString& aStrTD,
return aStrTD;
}
-BOOL HTMLOutFuncs::PrivateURLToInternalImg( String& rURL )
+sal_Bool HTMLOutFuncs::PrivateURLToInternalImg( String& rURL )
{
if( rURL.Len() > 14UL &&
rURL.CompareToAscii( OOO_STRING_SVTOOLS_HTML_private_image, 14UL ) == COMPARE_EQUAL )
{
rURL.Erase( 0UL, 14UL );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
diff --git a/svtools/source/svhtml/htmlsupp.cxx b/svtools/source/svhtml/htmlsupp.cxx
index 9227690c2995..4b92214d7827 100644
--- a/svtools/source/svhtml/htmlsupp.cxx
+++ b/svtools/source/svhtml/htmlsupp.cxx
@@ -56,7 +56,7 @@ static HTMLOptionEnum __READONLY_DATA aScriptLangOptEnums[] =
{ 0, 0 }
};
-BOOL HTMLParser::ParseScriptOptions( String& rLangString, const String& rBaseURL,
+sal_Bool HTMLParser::ParseScriptOptions( String& rLangString, const String& rBaseURL,
HTMLScriptLanguage& rLang,
String& rSrc,
String& rLibrary,
@@ -70,7 +70,7 @@ BOOL HTMLParser::ParseScriptOptions( String& rLangString, const String& rBaseURL
rLibrary.Erase();
rModule.Erase();
- for( USHORT i = pScriptOptions->Count(); i; )
+ for( sal_uInt16 i = pScriptOptions->Count(); i; )
{
const HTMLOption *pOption = (*pScriptOptions)[ --i ];
switch( pOption->GetToken() )
@@ -78,7 +78,7 @@ BOOL HTMLParser::ParseScriptOptions( String& rLangString, const String& rBaseURL
case HTML_O_LANGUAGE:
{
rLangString = pOption->GetString();
- USHORT nLang;
+ sal_uInt16 nLang;
if( pOption->GetEnum( nLang, aScriptLangOptEnums ) )
rLang = (HTMLScriptLanguage)nLang;
else
@@ -99,10 +99,10 @@ BOOL HTMLParser::ParseScriptOptions( String& rLangString, const String& rBaseURL
}
}
- return TRUE;
+ return sal_True;
}
-void HTMLParser::RemoveSGMLComment( String &rString, BOOL bFull )
+void HTMLParser::RemoveSGMLComment( String &rString, sal_Bool bFull )
{
sal_Unicode c = 0;
while( rString.Len() &&
diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx
index 28df35a4bb2a..b31f7285b15c 100644
--- a/svtools/source/svhtml/parhtml.cxx
+++ b/svtools/source/svhtml/parhtml.cxx
@@ -114,9 +114,9 @@ SV_IMPL_PTRARR(HTMLOptions,HTMLOptionPtr)
/* */
-USHORT HTMLOption::GetEnum( const HTMLOptionEnum *pOptEnums, USHORT nDflt ) const
+sal_uInt16 HTMLOption::GetEnum( const HTMLOptionEnum *pOptEnums, sal_uInt16 nDflt ) const
{
- USHORT nValue = nDflt;
+ sal_uInt16 nValue = nDflt;
while( pOptEnums->pName )
if( aValue.EqualsIgnoreCaseAscii( pOptEnums->pName ) )
@@ -130,7 +130,7 @@ USHORT HTMLOption::GetEnum( const HTMLOptionEnum *pOptEnums, USHORT nDflt ) cons
return nValue;
}
-BOOL HTMLOption::GetEnum( USHORT &rEnum, const HTMLOptionEnum *pOptEnums ) const
+sal_Bool HTMLOption::GetEnum( sal_uInt16 &rEnum, const HTMLOptionEnum *pOptEnums ) const
{
while( pOptEnums->pName )
{
@@ -147,7 +147,7 @@ BOOL HTMLOption::GetEnum( USHORT &rEnum, const HTMLOptionEnum *pOptEnums ) const
return (pName != 0);
}
-HTMLOption::HTMLOption( USHORT nTok, const String& rToken,
+HTMLOption::HTMLOption( sal_uInt16 nTok, const String& rToken,
const String& rValue )
: aValue(rValue)
, aToken(rToken)
@@ -171,7 +171,7 @@ sal_uInt32 HTMLOption::GetNumber() const
return nTmp >= 0 ? (sal_uInt32)nTmp : 0;
}
-INT32 HTMLOption::GetSNumber() const
+sal_Int32 HTMLOption::GetSNumber() const
{
DBG_ASSERT( (nToken>=HTML_OPTION_NUMBER_START && nToken<HTML_OPTION_NUMBER_END) ||
(nToken>=HTML_OPTION_CONTEXT_START && nToken<HTML_OPTION_CONTEXT_END),
@@ -181,7 +181,7 @@ INT32 HTMLOption::GetSNumber() const
return aTmp.ToInt32();
}
-void HTMLOption::GetNumbers( SvULongs &rLongs, BOOL bSpaceDelim ) const
+void HTMLOption::GetNumbers( SvULongs &rLongs, sal_Bool bSpaceDelim ) const
{
if( rLongs.Count() )
rLongs.Remove( 0, rLongs.Count() );
@@ -190,8 +190,8 @@ void HTMLOption::GetNumbers( SvULongs &rLongs, BOOL bSpaceDelim ) const
{
// das ist ein sehr stark vereinfachter Scanner. Er sucht einfach
// alle Tiffern aus dem String
- BOOL bInNum = FALSE;
- ULONG nNum = 0;
+ sal_Bool bInNum = sal_False;
+ sal_uLong nNum = 0;
for( xub_StrLen i=0; i<aValue.Len(); i++ )
{
register sal_Unicode c = aValue.GetChar( i );
@@ -199,12 +199,12 @@ void HTMLOption::GetNumbers( SvULongs &rLongs, BOOL bSpaceDelim ) const
{
nNum *= 10;
nNum += (c - '0');
- bInNum = TRUE;
+ bInNum = sal_True;
}
else if( bInNum )
{
rLongs.Insert( nNum, rLongs.Count() );
- bInNum = FALSE;
+ bInNum = sal_False;
nNum = 0;
}
}
@@ -227,7 +227,7 @@ void HTMLOption::GetNumbers( SvULongs &rLongs, BOOL bSpaceDelim ) const
nPos++;
if( nPos==aValue.Len() )
- rLongs.Insert( ULONG(0), rLongs.Count() );
+ rLongs.Insert( sal_uLong(0), rLongs.Count() );
else
{
xub_StrLen nEnd = aValue.Search( (sal_Unicode)',', nPos );
@@ -258,7 +258,7 @@ void HTMLOption::GetColor( Color& rColor ) const
String aTmp( aValue );
aTmp.ToUpperAscii();
- ULONG nColor = ULONG_MAX;
+ sal_uLong nColor = ULONG_MAX;
if( '#'!=aTmp.GetChar( 0 ) )
nColor = GetHTMLColor( aTmp );
@@ -288,9 +288,9 @@ void HTMLOption::GetColor( Color& rColor ) const
}
}
- rColor.SetRed( (BYTE)((nColor & 0x00ff0000) >> 16) );
- rColor.SetGreen( (BYTE)((nColor & 0x0000ff00) >> 8));
- rColor.SetBlue( (BYTE)(nColor & 0x000000ff) );
+ rColor.SetRed( (sal_uInt8)((nColor & 0x00ff0000) >> 16) );
+ rColor.SetGreen( (sal_uInt8)((nColor & 0x0000ff00) >> 8));
+ rColor.SetBlue( (sal_uInt8)(nColor & 0x000000ff) );
}
HTMLInputType HTMLOption::GetInputType() const
@@ -320,8 +320,8 @@ HTMLParser::HTMLParser( SvStream& rIn, int bReadNewDoc )
bReadListing = bReadXMP = bReadPRE = bReadTextArea =
bReadScript = bReadStyle =
bEndTokenFound = bIsInBody = bReadNextChar =
- bReadComment = FALSE;
- bIsInHeader = TRUE;
+ bReadComment = sal_False;
+ bIsInHeader = sal_True;
pOptions = new HTMLOptions;
}
@@ -339,7 +339,7 @@ SvParserState __EXPORT HTMLParser::CallParser()
SaveState( 0 );
nPre_LinePos = 0;
- bPre_IgnoreNewPara = FALSE;
+ bPre_IgnoreNewPara = sal_False;
AddRef();
Continue( 0 );
@@ -378,24 +378,24 @@ int HTMLParser::FilterToken( int nToken )
break; // nicht verschicken
case HTML_HEAD_OFF:
- bIsInBody = TRUE;
+ bIsInBody = sal_True;
case HTML_HEAD_ON:
bIsInHeader = HTML_HEAD_ON == nToken;
break;
case HTML_BODY_ON:
case HTML_FRAMESET_ON:
- bIsInHeader = FALSE;
+ bIsInHeader = sal_False;
bIsInBody = HTML_BODY_ON == nToken;
break;
case HTML_BODY_OFF:
- bIsInBody = bReadPRE = bReadListing = bReadXMP = FALSE;
+ bIsInBody = bReadPRE = bReadListing = bReadXMP = sal_False;
break;
case HTML_HTML_OFF:
nToken = 0;
- bReadPRE = bReadListing = bReadXMP = FALSE;
+ bReadPRE = bReadListing = bReadXMP = sal_False;
break; // HTML_ON wurde auch nicht verschickt !
case HTML_PREFORMTXT_ON:
@@ -448,23 +448,23 @@ int HTMLParser::FilterToken( int nToken )
int HTMLParser::ScanText( const sal_Unicode cBreak )
{
::rtl::OUStringBuffer sTmpBuffer( MAX_LEN );
- int bWeiter = TRUE;
- int bEqSignFound = FALSE;
+ int bWeiter = sal_True;
+ int bEqSignFound = sal_False;
sal_Unicode cQuote = 0U;
while( bWeiter && IsParserWorking() )
{
- int bNextCh = TRUE;
+ int bNextCh = sal_True;
switch( nNextCh )
{
case '&':
- bEqSignFound = FALSE;
+ bEqSignFound = sal_False;
if( bReadXMP )
sTmpBuffer.append( (sal_Unicode)'&' );
else
{
- ULONG nStreamPos = rInput.Tell();
- ULONG nLinePos = GetLinePos();
+ sal_uLong nStreamPos = rInput.Tell();
+ sal_uLong nLinePos = GetLinePos();
sal_Unicode cChar = 0U;
if( '#' == (nNextCh = GetNextChar()) )
@@ -545,7 +545,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
if( 0U == cChar && ';' != nNextCh )
{
DBG_ASSERT( rInput.Tell() - nStreamPos ==
- (ULONG)(nPos+1L)*GetCharSize(),
+ (sal_uLong)(nPos+1L)*GetCharSize(),
"UTF-8 geht hier schief" );
for( xub_StrLen i=nPos-1L; i>1L; i-- )
{
@@ -575,10 +575,10 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
// rInput.SeekRel( -(long)(++nPos*GetCharSize()) );
// nlLinePos -= nPos;
DBG_ASSERT( rInput.Tell()-nStreamPos ==
- (ULONG)(nPos+1)*GetCharSize(),
+ (sal_uLong)(nPos+1)*GetCharSize(),
"Falsche Stream-Position" );
DBG_ASSERT( nlLinePos-nLinePos ==
- (ULONG)(nPos+1),
+ (sal_uLong)(nPos+1),
"Falsche Zeilen-Position" );
rInput.Seek( nStreamPos );
nlLinePos = nLinePos;
@@ -620,10 +620,10 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
// rInput.SeekRel( -(long)(++nPos*GetCharSize()) );
// nlLinePos -= nPos;
DBG_ASSERT( rInput.Tell()-nStreamPos ==
- (ULONG)(nPos+1)*GetCharSize(),
+ (sal_uLong)(nPos+1)*GetCharSize(),
"Falsche Stream-Position" );
DBG_ASSERT( nlLinePos-nLinePos ==
- (ULONG)(nPos+1),
+ (sal_uLong)(nPos+1),
"Falsche Zeilen-Position" );
rInput.Seek( nStreamPos );
nlLinePos = nLinePos;
@@ -655,7 +655,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
else if( IsParserWorking() )
{
sTmpBuffer.append( (sal_Unicode)'&' );
- bNextCh = FALSE;
+ bNextCh = sal_False;
break;
}
@@ -692,15 +692,15 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
rInput.Seek( nStreamPos-(sal_uInt32)GetCharSize() );
nlLinePos = nLinePos-1;
ClearTxtConvContext();
- bReadNextChar = TRUE;
+ bReadNextChar = sal_True;
}
- bNextCh = FALSE;
+ bNextCh = sal_False;
}
}
break;
case '=':
if( '>'==cBreak && !cQuote )
- bEqSignFound = TRUE;
+ bEqSignFound = sal_True;
sTmpBuffer.append( nNextCh );
break;
@@ -725,7 +725,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
cQuote = 0U;
}
sTmpBuffer.append( nNextCh );
- bEqSignFound = FALSE;
+ bEqSignFound = sal_False;
break;
case sal_Unicode(EOF):
@@ -735,7 +735,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
// abc&auml;<EOF> nicht angezeigt, also lassen wir das in Zukunft.
// if( '>' != cBreak )
// eState = SVPAR_ACCEPTED;
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
else
{
@@ -744,11 +744,11 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
break;
case '<':
- bEqSignFound = FALSE;
+ bEqSignFound = sal_False;
if( '>'==cBreak )
sTmpBuffer.append( nNextCh );
else
- bWeiter = FALSE; // Abbrechen, String zusammen
+ bWeiter = sal_False; // Abbrechen, String zusammen
break;
case '\f':
@@ -760,7 +760,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
else
{
// sonst wird es ein eigenes Token
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
break;
@@ -774,7 +774,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
}
else if( bReadListing || bReadXMP || bReadPRE || bReadTextArea )
{
- bWeiter = FALSE;
+ bWeiter = sal_False;
break;
}
// Bug 18984: CR-LF -> Blank
@@ -784,7 +784,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
if( '\t'==nNextCh && bReadPRE && '>'!=cBreak )
{
// In <PRE>: Tabs nach oben durchreichen
- bWeiter = FALSE;
+ bWeiter = sal_False;
break;
}
// kein break
@@ -821,15 +821,15 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
} while ( ' ' == nNextCh || '\t' == nNextCh ||
'\r' == nNextCh || '\n' == nNextCh ||
'\x0b' == nNextCh );
- bNextCh = FALSE;
+ bNextCh = sal_False;
}
break;
default:
- bEqSignFound = FALSE;
+ bEqSignFound = sal_False;
if( (nNextCh==cBreak && !cQuote) ||
- (ULONG(aToken.Len()) + MAX_LEN) > ULONG(STRING_MAXLEN & ~1 ))
- bWeiter = FALSE;
+ (sal_uLong(aToken.Len()) + MAX_LEN) > sal_uLong(STRING_MAXLEN & ~1 ))
+ bWeiter = sal_False;
else
{
do {
@@ -838,8 +838,8 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
if( MAX_LEN == sTmpBuffer.getLength() )
{
aToken += String(sTmpBuffer.makeStringAndClear());
- if( (ULONG(aToken.Len()) + MAX_LEN) >
- ULONG(STRING_MAXLEN & ~1 ) )
+ if( (sal_uLong(aToken.Len()) + MAX_LEN) >
+ sal_uLong(STRING_MAXLEN & ~1 ) )
{
nNextCh = GetNextChar();
return HTML_TEXTTOKEN;
@@ -854,7 +854,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
return HTML_TEXTTOKEN;
}
} while( HTML_ISALPHA( nNextCh ) || HTML_ISDIGIT( nNextCh ) );
- bNextCh = FALSE;
+ bNextCh = sal_False;
}
}
@@ -879,21 +879,21 @@ int HTMLParser::_GetNextRawToken()
{
// beim letzten Aufruf haben wir das End-Token bereits gefunden,
// deshalb muessen wir es nicht noch einmal suchen
- bReadScript = FALSE;
- bReadStyle = FALSE;
+ bReadScript = sal_False;
+ bReadStyle = sal_False;
aEndToken.Erase();
- bEndTokenFound = FALSE;
+ bEndTokenFound = sal_False;
return 0;
}
// per default geben wir HTML_RAWDATA zurueck
- int bWeiter = TRUE;
+ int bWeiter = sal_True;
int nToken = HTML_RAWDATA;
SaveState( 0 );
while( bWeiter && IsParserWorking() )
{
- int bNextCh = TRUE;
+ int bNextCh = sal_True;
switch( nNextCh )
{
case '<':
@@ -904,15 +904,15 @@ int HTMLParser::_GetNextRawToken()
aToken += String(sTmpBuffer.makeStringAndClear());
// und die Position im Stream merken
- ULONG nStreamPos = rInput.Tell();
- ULONG nLineNr = GetLineNr();
- ULONG nLinePos = GetLinePos();
+ sal_uLong nStreamPos = rInput.Tell();
+ sal_uLong nLineNr = GetLineNr();
+ sal_uLong nLinePos = GetLinePos();
// Start eines End-Token?
- int bOffState = FALSE;
+ int bOffState = sal_False;
if( '/' == (nNextCh = GetNextChar()) )
{
- bOffState = TRUE;
+ bOffState = sal_True;
nNextCh = GetNextChar();
}
else if( '!' == nNextCh )
@@ -933,7 +933,7 @@ int HTMLParser::_GetNextRawToken()
sal::static_int_cast< xub_StrLen >(
sTmpBuffer.getLength()) );
aTok.ToUpperAscii();
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
if( bReadScript || aEndToken.Len() )
{
if( !bReadComment )
@@ -941,7 +941,7 @@ int HTMLParser::_GetNextRawToken()
if( aTok.CompareToAscii( OOO_STRING_SVTOOLS_HTML_comment, 3 )
== COMPARE_EQUAL )
{
- bReadComment = TRUE;
+ bReadComment = sal_True;
}
else
{
@@ -958,7 +958,7 @@ int HTMLParser::_GetNextRawToken()
aTok.Copy( aTok.Len()-2 ).EqualsAscii( "--" ) )
{
// hier ist ein Kommentar der Art <!-----> zuende
- bReadComment = FALSE;
+ bReadComment = sal_False;
}
}
else
@@ -981,15 +981,15 @@ int HTMLParser::_GetNextRawToken()
// bisher gelesenen String zurueckgeben und dnach normal
// weitermachen
- bWeiter = FALSE;
+ bWeiter = sal_False;
// nToken==0 heisst, dass _GetNextToken gleich weiterliest
if( !aToken.Len() && (bReadStyle || bReadScript) )
{
// wir koennen sofort die Umgebung beeden und
// das End-Token parsen
- bReadScript = FALSE;
- bReadStyle = FALSE;
+ bReadScript = sal_False;
+ bReadStyle = sal_False;
aEndToken.Erase();
nToken = 0;
}
@@ -998,7 +998,7 @@ int HTMLParser::_GetNextRawToken()
// wir muessen bReadScript/bReadStyle noch am
// Leben lassen und koennen erst beim naechsten
// mal das End-Token Parsen
- bEndTokenFound = TRUE;
+ bEndTokenFound = sal_True;
}
// jetzt fahren wir im Stream auf das '<' zurueck
@@ -1018,7 +1018,7 @@ int HTMLParser::_GetNextRawToken()
if( bOffState )
aToken += (sal_Unicode)'/';
- bNextCh = FALSE;
+ bNextCh = sal_False;
}
}
break;
@@ -1026,11 +1026,11 @@ int HTMLParser::_GetNextRawToken()
sTmpBuffer.append( nNextCh );
if( bReadComment )
{
- BOOL bTwoMinus = FALSE;
+ sal_Bool bTwoMinus = sal_False;
nNextCh = GetNextChar();
while( '-' == nNextCh && IsParserWorking() )
{
- bTwoMinus = TRUE;
+ bTwoMinus = sal_True;
if( MAX_LEN == sTmpBuffer.getLength() )
aToken += String(sTmpBuffer.makeStringAndClear());
@@ -1039,9 +1039,9 @@ int HTMLParser::_GetNextRawToken()
}
if( '>' == nNextCh && IsParserWorking() && bTwoMinus )
- bReadComment = FALSE;
+ bReadComment = sal_False;
- bNextCh = FALSE;
+ bNextCh = sal_False;
}
break;
@@ -1050,27 +1050,27 @@ int HTMLParser::_GetNextRawToken()
nNextCh = GetNextChar();
if( nNextCh=='\n' )
nNextCh = GetNextChar();
- bWeiter = FALSE;
+ bWeiter = sal_False;
break;
case '\n':
// \n beendet das aktuelle Text-Token (auch wenn es leer ist)
nNextCh = GetNextChar();
- bWeiter = FALSE;
+ bWeiter = sal_False;
break;
case sal_Unicode(EOF):
// eof beendet das aktuelle Text-Token und tut so, als ob
// ein End-Token gelesen wurde
if( rInput.IsEof() )
{
- bWeiter = FALSE;
+ bWeiter = sal_False;
if( aToken.Len() || sTmpBuffer.getLength() )
{
- bEndTokenFound = TRUE;
+ bEndTokenFound = sal_True;
}
else
{
- bReadScript = FALSE;
- bReadStyle = FALSE;
+ bReadScript = sal_False;
+ bReadStyle = sal_False;
aEndToken.Erase();
nToken = 0;
}
@@ -1112,7 +1112,7 @@ int __EXPORT HTMLParser::_GetNextToken()
if( !IsParserWorking() ) // wenn schon Fehler, dann nicht weiter!
return 0;
- BOOL bReadNextCharSave = bReadNextChar;
+ sal_Bool bReadNextCharSave = bReadNextChar;
if( bReadNextChar )
{
DBG_ASSERT( !bEndTokenFound,
@@ -1120,7 +1120,7 @@ int __EXPORT HTMLParser::_GetNextToken()
nNextCh = GetNextChar();
if( !IsParserWorking() ) // wenn schon Fehler, dann nicht weiter!
return 0;
- bReadNextChar = FALSE;
+ bReadNextChar = sal_False;
}
if( bReadScript || bReadStyle || aEndToken.Len() )
@@ -1131,19 +1131,19 @@ int __EXPORT HTMLParser::_GetNextToken()
}
do {
- int bNextCh = TRUE;
+ int bNextCh = sal_True;
switch( nNextCh )
{
case '<':
{
- ULONG nStreamPos = rInput.Tell();
- ULONG nLineNr = GetLineNr();
- ULONG nLinePos = GetLinePos();
+ sal_uLong nStreamPos = rInput.Tell();
+ sal_uLong nLineNr = GetLineNr();
+ sal_uLong nLinePos = GetLinePos();
- int bOffState = FALSE;
+ int bOffState = sal_False;
if( '/' == (nNextCh = GetNextChar()) )
{
- bOffState = TRUE;
+ bOffState = sal_True;
nNextCh = GetNextChar();
}
if( HTML_ISALPHA( nNextCh ) || '!'==nNextCh ) // fix #26984#
@@ -1203,12 +1203,12 @@ int __EXPORT HTMLParser::_GetNextToken()
aToken = sSaveToken;
if( '>'!=nNextCh )
aToken += (sal_Unicode)' ';
- ULONG nCStreamPos = 0;
- ULONG nCLineNr = 0;
- ULONG nCLinePos = 0;
+ sal_uLong nCStreamPos = 0;
+ sal_uLong nCLineNr = 0;
+ sal_uLong nCLinePos = 0;
xub_StrLen nCStrLen = 0;
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
// bis zum schliessenden --> lesen. wenn keins gefunden
// wurde beim der ersten > wieder aufsetzen
while( !bDone && !rInput.IsEof() && IsParserWorking() )
@@ -1265,7 +1265,7 @@ int __EXPORT HTMLParser::_GetNextToken()
aToken = '<';
nRet = HTML_TEXTTOKEN;
nNextCh = GetNextChar();
- bNextCh = FALSE;
+ bNextCh = sal_False;
break;
}
}
@@ -1290,7 +1290,7 @@ int __EXPORT HTMLParser::_GetNextToken()
aToken = '<';
nRet = HTML_TEXTTOKEN;
nNextCh = GetNextChar();
- bNextCh = FALSE;
+ bNextCh = sal_False;
break;
}
if( SVPAR_PENDING == eState )
@@ -1301,10 +1301,10 @@ int __EXPORT HTMLParser::_GetNextToken()
{
nRet = HTML_UNKNOWNCONTROL_ON;
- ULONG nCStreamPos = rInput.Tell();
- ULONG nCLineNr = GetLineNr(), nCLinePos = GetLinePos();
+ sal_uLong nCStreamPos = rInput.Tell();
+ sal_uLong nCLineNr = GetLineNr(), nCLinePos = GetLinePos();
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
// bis zum schliessenden %> lesen. wenn keins gefunden
// wurde beim der ersten > wieder aufsetzen
while( !bDone && !rInput.IsEof() && IsParserWorking() )
@@ -1337,7 +1337,7 @@ int __EXPORT HTMLParser::_GetNextToken()
{
aToken = '<';
nRet = HTML_TEXTTOKEN;
- bNextCh = FALSE;
+ bNextCh = sal_False;
break;
}
}
@@ -1348,32 +1348,32 @@ int __EXPORT HTMLParser::_GetNextToken()
switch( nRet )
{
case HTML_TEXTAREA_ON:
- bReadTextArea = TRUE;
+ bReadTextArea = sal_True;
break;
case HTML_TEXTAREA_OFF:
- bReadTextArea = FALSE;
+ bReadTextArea = sal_False;
break;
case HTML_SCRIPT_ON:
if( !bReadTextArea )
- bReadScript = TRUE;
+ bReadScript = sal_True;
break;
case HTML_SCRIPT_OFF:
if( !bReadTextArea )
{
- bReadScript = FALSE;
+ bReadScript = sal_False;
// JavaScript kann den Stream veraendern
// also muss das letzte Zeichen nochmals
// gelesen werden
- bReadNextChar = TRUE;
- bNextCh = FALSE;
+ bReadNextChar = sal_True;
+ bNextCh = sal_False;
}
break;
case HTML_STYLE_ON:
- bReadStyle = TRUE;
+ bReadStyle = sal_True;
break;
case HTML_STYLE_OFF:
- bReadStyle = FALSE;
+ bReadStyle = sal_False;
break;
}
@@ -1407,7 +1407,7 @@ int __EXPORT HTMLParser::_GetNextToken()
if( ( '\n' != nNextCh || '\r' != c ) &&
( '\r' != nNextCh || '\n' != c ) )
{
- bNextCh = FALSE;
+ bNextCh = sal_False;
nNextCh = c;
}
nRet = HTML_NEWPARA;
@@ -1434,7 +1434,7 @@ scan_text:
if( !bNextCh && eState == SVPAR_PENDING )
{
eState = SVPAR_WORKING;
- bReadNextChar = TRUE;
+ bReadNextChar = sal_True;
}
break;
@@ -1445,7 +1445,7 @@ scan_text:
nNextCh = GetNextChar();
if( SVPAR_PENDING == eState && nRet && HTML_TEXTTOKEN != nRet )
{
- bReadNextChar = TRUE;
+ bReadNextChar = sal_True;
eState = SVPAR_WORKING;
}
}
@@ -1462,15 +1462,15 @@ void HTMLParser::UnescapeToken()
{
xub_StrLen nPos=0;
- BOOL bEscape = FALSE;
+ sal_Bool bEscape = sal_False;
while( nPos < aToken.Len() )
{
- BOOL bOldEscape = bEscape;
- bEscape = FALSE;
+ sal_Bool bOldEscape = bEscape;
+ bEscape = sal_False;
if( '\\'==aToken.GetChar(nPos) && !bOldEscape )
{
aToken.Erase( nPos, 1 );
- bEscape = TRUE;
+ bEscape = sal_True;
}
else
{
@@ -1480,7 +1480,7 @@ void HTMLParser::UnescapeToken()
}
// hole die Optionen
-const HTMLOptions *HTMLParser::GetOptions( USHORT *pNoConvertToken ) const
+const HTMLOptions *HTMLParser::GetOptions( sal_uInt16 *pNoConvertToken ) const
{
// wenn die Option fuer das aktuelle Token schon einmal
// geholt wurden, geben wir sie noch einmal zurueck
@@ -1518,7 +1518,7 @@ const HTMLOptions *HTMLParser::GetOptions( USHORT *pNoConvertToken ) const
nToken = GetHTMLOption( sNameUpperCase ); // der Name ist fertig
DBG_ASSERTWARNING( nToken!=HTML_O_UNKNOWN,
"GetOption: unbekannte HTML-Option" );
- BOOL bStripCRLF = (nToken < HTML_OPTION_SCRIPT_START ||
+ sal_Bool bStripCRLF = (nToken < HTML_OPTION_SCRIPT_START ||
nToken >= HTML_OPTION_SCRIPT_END) &&
(!pNoConvertToken || nToken != *pNoConvertToken);
@@ -1545,12 +1545,12 @@ const HTMLOptions *HTMLParser::GetOptions( USHORT *pNoConvertToken ) const
{
sal_Unicode cEnd = cChar;
nPos++; nStt++;
- BOOL bDone = FALSE;
- BOOL bEscape = FALSE;
+ sal_Bool bDone = sal_False;
+ sal_Bool bEscape = sal_False;
while( nPos < aToken.Len() && !bDone )
{
- BOOL bOldEscape = bEscape;
- bEscape = FALSE;
+ sal_Bool bOldEscape = bEscape;
+ bEscape = sal_False;
cChar = aToken.GetChar(nPos);
switch( cChar )
{
@@ -1569,7 +1569,7 @@ const HTMLOptions *HTMLParser::GetOptions( USHORT *pNoConvertToken ) const
else
{
((String &)aToken).Erase( nPos, 1 );
- bEscape = TRUE;
+ bEscape = sal_True;
}
break;
case '"':
@@ -1590,12 +1590,12 @@ const HTMLOptions *HTMLParser::GetOptions( USHORT *pNoConvertToken ) const
{
// hier sind wir etwas laxer als der
// Standard und erlauben alles druckbare
- BOOL bEscape = FALSE;
- BOOL bDone = FALSE;
+ sal_Bool bEscape = sal_False;
+ sal_Bool bDone = sal_False;
while( nPos < aToken.Len() && !bDone )
{
- BOOL bOldEscape = bEscape;
- bEscape = FALSE;
+ sal_Bool bOldEscape = bEscape;
+ bEscape = sal_False;
sal_Unicode c = aToken.GetChar(nPos);
switch( c )
{
@@ -1608,7 +1608,7 @@ const HTMLOptions *HTMLParser::GetOptions( USHORT *pNoConvertToken ) const
case '\t':
case '\r':
case '\n':
- bDone = TRUE;
+ bDone = sal_True;
break;
case '\\':
@@ -1619,7 +1619,7 @@ const HTMLOptions *HTMLParser::GetOptions( USHORT *pNoConvertToken ) const
else
{
((String &)aToken).Erase( nPos, 1 );
- bEscape = TRUE;
+ bEscape = sal_True;
}
break;
@@ -1627,7 +1627,7 @@ const HTMLOptions *HTMLParser::GetOptions( USHORT *pNoConvertToken ) const
if( HTML_ISPRINTABLE( c ) )
nPos++, nLen++;
else
- bDone = TRUE;
+ bDone = sal_True;
break;
}
}
@@ -1832,7 +1832,7 @@ int HTMLParser::FilterPRE( int nToken )
break;
}
- bPre_IgnoreNewPara = FALSE;
+ bPre_IgnoreNewPara = sal_False;
return nToken;
}
@@ -1873,7 +1873,7 @@ int HTMLParser::FilterXMP( int nToken )
break;
}
- bPre_IgnoreNewPara = FALSE;
+ bPre_IgnoreNewPara = sal_False;
return nToken;
}
@@ -1901,13 +1901,13 @@ int HTMLParser::FilterListing( int nToken )
break;
}
- bPre_IgnoreNewPara = FALSE;
+ bPre_IgnoreNewPara = sal_False;
return nToken;
}
FASTBOOL HTMLParser::IsHTMLFormat( const sal_Char* pHeader,
- BOOL bSwitchToUCS2,
+ sal_Bool bSwitchToUCS2,
rtl_TextEncoding eEnc )
{
// Einer der folgenden regulaeren Ausdrucke muss sich auf den String
@@ -1921,14 +1921,14 @@ FASTBOOL HTMLParser::IsHTMLFormat( const sal_Char* pHeader,
// ensprechen muss
ByteString sCmp;
- BOOL bUCS2B = FALSE;
+ sal_Bool bUCS2B = sal_False;
if( bSwitchToUCS2 )
{
if( 0xfeU == (sal_uChar)pHeader[0] &&
0xffU == (sal_uChar)pHeader[1] )
{
eEnc = RTL_TEXTENCODING_UCS2;
- bUCS2B = TRUE;
+ bUCS2B = sal_True;
}
else if( 0xffU == (sal_uChar)pHeader[0] &&
0xfeU == (sal_uChar)pHeader[1] )
@@ -1946,7 +1946,7 @@ FASTBOOL HTMLParser::IsHTMLFormat( const sal_Char* pHeader,
)
{
if( 0xfe == (sal_uChar)pHeader[0] )
- bUCS2B = TRUE;
+ bUCS2B = sal_True;
xub_StrLen nLen;
for( nLen = 2;
@@ -1979,7 +1979,7 @@ FASTBOOL HTMLParser::IsHTMLFormat( const sal_Char* pHeader,
// Ein HTML-Dokument muss in der ersten Zeile ein '<' besitzen
xub_StrLen nStart = sCmp.Search( '<' );
if( STRING_NOTFOUND == nStart )
- return FALSE;
+ return sal_False;
nStart++;
// danach duerfen beliebige andere Zeichen bis zu einem blank oder
@@ -1994,7 +1994,7 @@ FASTBOOL HTMLParser::IsHTMLFormat( const sal_Char* pHeader,
// wenn das Dokeument hinter dem < aufhoert ist es wohl kein HTML
if( nPos==nStart )
- return FALSE;
+ return sal_False;
// die Zeichenkette nach dem '<' muss ausserdem ein bekanntes
// HTML Token sein. Damit die Ausgabe eines DOS-dir-Befehls nicht
@@ -2003,30 +2003,30 @@ FASTBOOL HTMLParser::IsHTMLFormat( const sal_Char* pHeader,
String sTest( sCmp.Copy( nStart, nPos-nStart ), RTL_TEXTENCODING_ASCII_US );
int nTok = GetHTMLToken( sTest );
if( 0 != nTok && HTML_DIRLIST_ON != nTok )
- return TRUE;
+ return sal_True;
// oder es handelt sich um ein "<!" ganz am Anfang der Datei (fix #27092#)
if( nStart == 1 && '!' == sCmp.GetChar( 1 ) )
- return TRUE;
+ return sal_True;
// oder wir finden irgendwo ein <HTML> in den ersten 80 Zeichen
nStart = sCmp.Search( OOO_STRING_SVTOOLS_HTML_html );
if( nStart!=STRING_NOTFOUND &&
nStart>0 && '<'==sCmp.GetChar(nStart-1) &&
nStart+4 < sCmp.Len() && '>'==sCmp.GetChar(nStart+4) )
- return TRUE;
+ return sal_True;
// sonst ist es wohl doch eher kein HTML-Dokument
- return FALSE;
+ return sal_False;
}
-BOOL HTMLParser::InternalImgToPrivateURL( String& rURL )
+sal_Bool HTMLParser::InternalImgToPrivateURL( String& rURL )
{
if( rURL.Len() < 19 || 'i' != rURL.GetChar(0) ||
rURL.CompareToAscii( OOO_STRING_SVTOOLS_HTML_internal_gopher, 9 ) != COMPARE_EQUAL )
- return FALSE;
+ return sal_False;
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
if( rURL.CompareToAscii( OOO_STRING_SVTOOLS_HTML_internal_gopher,16) == COMPARE_EQUAL )
{
@@ -2147,10 +2147,10 @@ bool HTMLParser::ParseMetaOptionsImpl(
rtl_TextEncoding& o_rEnc )
{
String aName, aContent;
- USHORT nAction = HTML_META_NONE;
+ sal_uInt16 nAction = HTML_META_NONE;
bool bHTTPEquiv = false, bChanged = false;
- for ( USHORT i = i_pOptions->Count(); i; )
+ for ( sal_uInt16 i = i_pOptions->Count(); i; )
{
const HTMLOption *pOption = (*i_pOptions)[ --i ];
switch ( pOption->GetToken() )
@@ -2236,8 +2236,8 @@ bool HTMLParser::ParseMetaOptionsImpl(
if ( i_xDocProps.is() && aContent.Len() &&
aContent.GetTokenCount() == 2 )
{
- Date aDate( (ULONG)aContent.GetToken(0).ToInt32() );
- Time aTime( (ULONG)aContent.GetToken(1).ToInt32() );
+ Date aDate( (sal_uLong)aContent.GetToken(0).ToInt32() );
+ Time aTime( (sal_uLong)aContent.GetToken(1).ToInt32() );
DateTime aDateTime( aDate, aTime );
::util::DateTime uDT(aDateTime.Get100Sec(),
aDateTime.GetSec(), aDateTime.GetMin(),
@@ -2293,7 +2293,7 @@ bool HTMLParser::ParseMetaOptions(
const uno::Reference<document::XDocumentProperties> & i_xDocProps,
SvKeyValueIterator *i_pHeader )
{
- USHORT nContentOption = HTML_O_CONTENT;
+ sal_uInt16 nContentOption = HTML_O_CONTENT;
rtl_TextEncoding eEnc = RTL_TEXTENCODING_DONTKNOW;
bool bRet = ParseMetaOptionsImpl( i_xDocProps, i_pHeader,
@@ -2301,7 +2301,7 @@ bool HTMLParser::ParseMetaOptions(
eEnc );
// If the encoding is set by a META tag, it may only overwrite the
- // current encoding if both, the current and the new encoding, are 1-BYTE
+ // current encoding if both, the current and the new encoding, are 1-sal_uInt8
// encodings. Everything else cannot lead to reasonable results.
if (RTL_TEXTENCODING_DONTKNOW != eEnc &&
rtl_isOctetTextEncoding( eEnc ) &&
@@ -2340,7 +2340,7 @@ rtl_TextEncoding HTMLParser::GetEncodingByHttpHeader( SvKeyValueIterator *pHTTPH
if( pHTTPHeader )
{
SvKeyValue aKV;
- for( BOOL bCont = pHTTPHeader->GetFirst( aKV ); bCont;
+ for( sal_Bool bCont = pHTTPHeader->GetFirst( aKV ); bCont;
bCont = pHTTPHeader->GetNext( aKV ) )
{
if( aKV.GetKey().EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_META_content_type ) )
@@ -2355,15 +2355,15 @@ rtl_TextEncoding HTMLParser::GetEncodingByHttpHeader( SvKeyValueIterator *pHTTPH
return eRet;
}
-BOOL HTMLParser::SetEncodingByHTTPHeader(
+sal_Bool HTMLParser::SetEncodingByHTTPHeader(
SvKeyValueIterator *pHTTPHeader )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
rtl_TextEncoding eEnc = HTMLParser::GetEncodingByHttpHeader( pHTTPHeader );
if(RTL_TEXTENCODING_DONTKNOW != eEnc)
{
SetSrcEncoding( eEnc );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
diff --git a/svtools/source/svrtf/parrtf.cxx b/svtools/source/svrtf/parrtf.cxx
index 7e29dbc4598f..bd08a32942bf 100644
--- a/svtools/source/svrtf/parrtf.cxx
+++ b/svtools/source/svrtf/parrtf.cxx
@@ -44,7 +44,7 @@ const int MAX_TOKEN_LEN = 128;
#define RTF_ISDIGIT( c ) (c >= '0' && c <= '9')
#define RTF_ISALPHA( c ) ( (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') )
-SvRTFParser::SvRTFParser( SvStream& rIn, BYTE nStackSize )
+SvRTFParser::SvRTFParser( SvStream& rIn, sal_uInt8 nStackSize )
: SvParser( rIn, nStackSize ),
eUNICodeSet( RTL_TEXTENCODING_MS_1252 ), // default ist ANSI-CodeSet
nUCharOverread( 1 )
@@ -170,7 +170,7 @@ int SvRTFParser::_GetNextToken()
case RTF_UC:
if( 0 <= nTokenValue )
{
- nUCharOverread = (BYTE)nTokenValue;
+ nUCharOverread = (sal_uInt8)nTokenValue;
#if 1
//cmc: other ifdef breaks #i3584
aParserStates.top().
@@ -208,7 +208,7 @@ int SvRTFParser::_GetNextToken()
// overread the next n "RTF" characters. This
// can be also \{, \}, \'88
- for( BYTE m = 0; m < nUCharOverread; ++m )
+ for( sal_uInt8 m = 0; m < nUCharOverread; ++m )
{
sal_Unicode cAnsi = nNextCh;
while( 0xD == cAnsi )
@@ -437,7 +437,7 @@ void SvRTFParser::ScanText( const sal_Unicode cBreak )
// overread the next n "RTF" characters. This
// can be also \{, \}, \'88
- for( BYTE m = 0; m < nUCharOverread; ++m )
+ for( sal_uInt8 m = 0; m < nUCharOverread; ++m )
{
sal_Unicode cAnsi = nNextCh;
while( 0xD == cAnsi )
diff --git a/svtools/source/svrtf/rtfkeywd.cxx b/svtools/source/svrtf/rtfkeywd.cxx
index 7422961c6881..ac10c3982b6e 100644
--- a/svtools/source/svrtf/rtfkeywd.cxx
+++ b/svtools/source/svrtf/rtfkeywd.cxx
@@ -49,7 +49,7 @@ struct RTF_TokenEntry
};
// Flag: RTF-Token Tabelle wurde schon sortiert
-static int __FAR_DATA bSortKeyWords = FALSE;
+static int __FAR_DATA bSortKeyWords = sal_False;
static RTF_TokenEntry __FAR_DATA aRTFTokenTab[] = {
{{OOO_STRING_SVTOOLS_RTF_IGNORE}, RTF_IGNOREFLAG},
@@ -1228,7 +1228,7 @@ int GetRTFToken( const String& rSearch )
sizeof( aRTFTokenTab ) / sizeof( RTF_TokenEntry ),
sizeof( RTF_TokenEntry ),
RTFKeyCompare );
- bSortKeyWords = TRUE;
+ bSortKeyWords = sal_True;
}
int nRet = 0;
diff --git a/svtools/source/svrtf/rtfout.cxx b/svtools/source/svrtf/rtfout.cxx
index 670abfaf4b0c..2f00fd896168 100644
--- a/svtools/source/svrtf/rtfout.cxx
+++ b/svtools/source/svrtf/rtfout.cxx
@@ -45,7 +45,7 @@ const sal_Char __FAR_DATA RTFOutFuncs::sNewLine[] = "\015\012";
SvStream& RTFOutFuncs::Out_Char(SvStream& rStream, sal_Unicode c,
- int *pUCMode, rtl_TextEncoding eDestEnc, BOOL bWriteHelpFile)
+ int *pUCMode, rtl_TextEncoding eDestEnc, sal_Bool bWriteHelpFile)
{
const sal_Char* pStr = 0;
switch (c)
@@ -164,7 +164,7 @@ SvStream& RTFOutFuncs::Out_Char(SvStream& rStream, sal_Unicode c,
}
SvStream& RTFOutFuncs::Out_String( SvStream& rStream, const String& rStr,
- rtl_TextEncoding eDestEnc, BOOL bWriteHelpFile)
+ rtl_TextEncoding eDestEnc, sal_Bool bWriteHelpFile)
{
int nUCMode = 1;
for (xub_StrLen n = 0; n < rStr.Len(); ++n)
@@ -175,7 +175,7 @@ SvStream& RTFOutFuncs::Out_String( SvStream& rStream, const String& rStr,
}
SvStream& RTFOutFuncs::Out_Fontname(SvStream& rStream, const String& rStr,
- rtl_TextEncoding eDestEnc, BOOL bWriteHelpFile)
+ rtl_TextEncoding eDestEnc, sal_Bool bWriteHelpFile)
{
//Fontnames in word have a quirk in that \uc and usage of ansi replacement
//chars after a \u don't work and in wordpad \u doesn't work, so we are
@@ -185,7 +185,7 @@ SvStream& RTFOutFuncs::Out_Fontname(SvStream& rStream, const String& rStr,
return rStream;
}
-SvStream& RTFOutFuncs::Out_Hex( SvStream& rStream, ULONG nHex, BYTE nLen )
+SvStream& RTFOutFuncs::Out_Hex( SvStream& rStream, sal_uLong nHex, sal_uInt8 nLen )
{
sal_Char aNToABuf[] = "0000000000000000";
@@ -195,7 +195,7 @@ SvStream& RTFOutFuncs::Out_Hex( SvStream& rStream, ULONG nHex, BYTE nLen )
// Pointer an das Bufferende setzen
sal_Char* pStr = aNToABuf + (sizeof(aNToABuf)-1);
- for( BYTE n = 0; n < nLen; ++n )
+ for( sal_uInt8 n = 0; n < nLen; ++n )
{
*(--pStr) = (sal_Char)(nHex & 0xf ) + 48;
if( *pStr > '9' )
diff --git a/svtools/source/svrtf/svparser.cxx b/svtools/source/svrtf/svparser.cxx
index 53b7ee497754..fee520714493 100644
--- a/svtools/source/svrtf/svparser.cxx
+++ b/svtools/source/svrtf/svparser.cxx
@@ -50,11 +50,11 @@
struct SvParser_Impl
{
String aToken; // gescanntes Token
- ULONG nFilePos; // akt. Position im Stream
- ULONG nlLineNr; // akt. Zeilen Nummer
- ULONG nlLinePos; // akt. Spalten Nummer
+ sal_uLong nFilePos; // akt. Position im Stream
+ sal_uLong nlLineNr; // akt. Zeilen Nummer
+ sal_uLong nlLinePos; // akt. Spalten Nummer
long nTokenValue; // zusaetzlicher Wert (RTF)
- BOOL bTokenHasValue; // indicates whether nTokenValue is valid
+ sal_Bool bTokenHasValue; // indicates whether nTokenValue is valid
int nToken; // akt. Token
sal_Unicode nNextCh; // akt. Zeichen
@@ -77,7 +77,7 @@ struct SvParser_Impl
// Konstruktor
-SvParser::SvParser( SvStream& rIn, BYTE nStackSize )
+SvParser::SvParser( SvStream& rIn, sal_uInt8 nStackSize )
: rInput( rIn )
, nlLineNr( 1 )
, nlLinePos( 1 )
@@ -86,11 +86,11 @@ SvParser::SvParser( SvStream& rIn, BYTE nStackSize )
, bTokenHasValue( false )
, eState( SVPAR_NOTSTARTED )
, eSrcEnc( RTL_TEXTENCODING_DONTKNOW )
- , bDownloadingFile( FALSE )
+ , bDownloadingFile( sal_False )
, nTokenStackSize( nStackSize )
, nTokenStackPos( 0 )
{
- bUCS2BSrcEnc = bSwitchToUCS2 = FALSE;
+ bUCS2BSrcEnc = bSwitchToUCS2 = sal_False;
eState = SVPAR_NOTSTARTED;
if( nTokenStackSize < 3 )
nTokenStackSize = 3;
@@ -191,11 +191,11 @@ sal_Unicode SvParser::GetNextChar()
// When reading muliple bytes, we don't have to care about the file
// position when we run inti the pending state. The file position is
// maintained by SaveState/RestoreState.
- BOOL bErr;
+ sal_Bool bErr;
if( bSwitchToUCS2 && 0 == rInput.Tell() )
{
sal_uChar c1, c2;
- BOOL bSeekBack = TRUE;
+ sal_Bool bSeekBack = sal_True;
rInput >> c1;
bErr = rInput.IsEof() || rInput.GetError();
@@ -210,14 +210,14 @@ sal_Unicode SvParser::GetNextChar()
if( 0xfe == c1 && 0xff == c2 )
{
eSrcEnc = RTL_TEXTENCODING_UCS2;
- bUCS2BSrcEnc = TRUE;
- bSeekBack = FALSE;
+ bUCS2BSrcEnc = sal_True;
+ bSeekBack = sal_False;
}
else if( 0xff == c1 && 0xfe == c2 )
{
eSrcEnc = RTL_TEXTENCODING_UCS2;
- bUCS2BSrcEnc = FALSE;
- bSeekBack = FALSE;
+ bUCS2BSrcEnc = sal_False;
+ bSeekBack = sal_False;
}
}
}
@@ -225,7 +225,7 @@ sal_Unicode SvParser::GetNextChar()
if( bSeekBack )
rInput.Seek( 0 );
- bSwitchToUCS2 = FALSE;
+ bSwitchToUCS2 = sal_False;
}
nNextChPos = rInput.Tell();
@@ -480,7 +480,7 @@ int SvParser::SkipToken( short nCnt ) // n Tokens zurueck "skippen"
nTmp = 0;
else if( nTmp > nTokenStackSize )
nTmp = nTokenStackSize;
- nTokenStackPos = BYTE(nTmp);
+ nTokenStackPos = sal_uInt8(nTmp);
// und die Werte zurueck
aToken = pTokenStackPos->sToken;
@@ -492,15 +492,15 @@ int SvParser::SkipToken( short nCnt ) // n Tokens zurueck "skippen"
SvParser::TokenStackType* SvParser::GetStackPtr( short nCnt )
{
- BYTE nAktPos = BYTE(pTokenStackPos - pTokenStack );
+ sal_uInt8 nAktPos = sal_uInt8(pTokenStackPos - pTokenStack );
if( nCnt > 0 )
{
if( nCnt >= nTokenStackSize )
nCnt = (nTokenStackSize-1);
if( nAktPos + nCnt < nTokenStackSize )
- nAktPos = sal::static_int_cast< BYTE >(nAktPos + nCnt);
+ nAktPos = sal::static_int_cast< sal_uInt8 >(nAktPos + nCnt);
else
- nAktPos = sal::static_int_cast< BYTE >(
+ nAktPos = sal::static_int_cast< sal_uInt8 >(
nAktPos + (nCnt - nTokenStackSize));
}
else if( nCnt < 0 )
@@ -508,9 +508,9 @@ SvParser::TokenStackType* SvParser::GetStackPtr( short nCnt )
if( -nCnt >= nTokenStackSize )
nCnt = -nTokenStackSize+1;
if( -nCnt <= nAktPos )
- nAktPos = sal::static_int_cast< BYTE >(nAktPos + nCnt);
+ nAktPos = sal::static_int_cast< sal_uInt8 >(nAktPos + nCnt);
else
- nAktPos = sal::static_int_cast< BYTE >(
+ nAktPos = sal::static_int_cast< sal_uInt8 >(
nAktPos + (nCnt + nTokenStackSize));
}
return pTokenStack + nAktPos;
@@ -574,32 +574,32 @@ void SvParser::Continue( int )
}
void SvParser::BuildWhichTbl( SvUShorts &rWhichMap,
- USHORT *pWhichIds,
- USHORT nWhichIds )
+ sal_uInt16 *pWhichIds,
+ sal_uInt16 nWhichIds )
{
- USHORT aNewRange[2];
+ sal_uInt16 aNewRange[2];
- for( USHORT nCnt = 0; nCnt < nWhichIds; ++nCnt, ++pWhichIds )
+ for( sal_uInt16 nCnt = 0; nCnt < nWhichIds; ++nCnt, ++pWhichIds )
if( *pWhichIds )
{
aNewRange[0] = aNewRange[1] = *pWhichIds;
- BOOL bIns = TRUE;
+ sal_Bool bIns = sal_True;
// Position suchen
- for ( USHORT nOfs = 0; rWhichMap[nOfs]; nOfs += 2 )
+ for ( sal_uInt16 nOfs = 0; rWhichMap[nOfs]; nOfs += 2 )
{
if( *pWhichIds < rWhichMap[nOfs] - 1 )
{
// neuen Range davor
rWhichMap.Insert( aNewRange, 2, nOfs );
- bIns = FALSE;
+ bIns = sal_False;
break;
}
else if( *pWhichIds == rWhichMap[nOfs] - 1 )
{
// diesen Range nach unten erweitern
rWhichMap[nOfs] = *pWhichIds;
- bIns = FALSE;
+ bIns = sal_False;
break;
}
else if( *pWhichIds == rWhichMap[nOfs+1] + 1 )
@@ -613,7 +613,7 @@ void SvParser::BuildWhichTbl( SvUShorts &rWhichMap,
else
// diesen Range nach oben erweitern
rWhichMap[nOfs+1] = *pWhichIds;
- bIns = FALSE;
+ bIns = sal_False;
break;
}
}
@@ -691,7 +691,7 @@ SvKeyValueIterator::~SvKeyValueIterator (void)
/*
* GetFirst.
*/
-BOOL SvKeyValueIterator::GetFirst (SvKeyValue &rKeyVal)
+sal_Bool SvKeyValueIterator::GetFirst (SvKeyValue &rKeyVal)
{
m_nPos = m_pList->Count();
return GetNext (rKeyVal);
@@ -700,17 +700,17 @@ BOOL SvKeyValueIterator::GetFirst (SvKeyValue &rKeyVal)
/*
* GetNext.
*/
-BOOL SvKeyValueIterator::GetNext (SvKeyValue &rKeyVal)
+sal_Bool SvKeyValueIterator::GetNext (SvKeyValue &rKeyVal)
{
if (m_nPos > 0)
{
rKeyVal = *m_pList->GetObject(--m_nPos);
- return TRUE;
+ return sal_True;
}
else
{
// Nothing to do.
- return FALSE;
+ return sal_False;
}
}
diff --git a/svtools/source/table/cellvalueconversion.cxx b/svtools/source/table/cellvalueconversion.cxx
new file mode 100755
index 000000000000..286ca505bb30
--- /dev/null
+++ b/svtools/source/table/cellvalueconversion.cxx
@@ -0,0 +1,77 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_svtools.hxx"
+
+#include "cellvalueconversion.hxx"
+
+/** === begin UNO includes === **/
+/** === end UNO includes === **/
+
+//......................................................................................................................
+namespace svt
+{
+//......................................................................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Any;
+ /** === end UNO using === **/
+
+ //==================================================================================================================
+ //= CellValueConversion
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString CellValueConversion::convertToString( const Any& i_value )
+ {
+ ::rtl::OUString sConvertString;
+ if ( !i_value.hasValue() )
+ return sConvertString;
+
+
+ // TODO: use css.script.XTypeConverter?
+
+ sal_Int32 nInt = 0;
+ sal_Bool bBool = false;
+ double fDouble = 0;
+
+ ::rtl::OUString sStringValue;
+ if ( i_value >>= sConvertString )
+ sStringValue = sConvertString;
+ else if ( i_value >>= nInt )
+ sStringValue = sConvertString.valueOf( nInt );
+ else if ( i_value >>= bBool )
+ sStringValue = sConvertString.valueOf( bBool );
+ else if ( i_value >>= fDouble )
+ sStringValue = sConvertString.valueOf( fDouble );
+ else
+ OSL_ENSURE( !i_value.hasValue(), "CellValueConversion::convertToString: cannot handle the given cell content type!" );
+
+ return sStringValue;
+ }
+
+//......................................................................................................................
+} // namespace svt
+//......................................................................................................................
diff --git a/svtools/source/inc/accessibletableimp.hxx b/svtools/source/table/cellvalueconversion.hxx
index 3a01c01567d3..4d6b8c8d6aac 100644..100755
--- a/svtools/source/inc/accessibletableimp.hxx
+++ b/svtools/source/table/cellvalueconversion.hxx
@@ -22,41 +22,31 @@
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
-************************************************************************/
+ ************************************************************************/
-#ifndef SVTOOLS_SOURCE_INC_ACCESSIBLETABLEIMP_HXX
-#define SVTOOLS_SOURCE_INC_ACCESSIBLETABLEIMP_HXX
+#ifndef SVTOOLS_CELLVALUECONVERSION_HXX
+#define SVTOOLS_CELLVALUECONVERSION_HXX
-#include "svtaccessiblefactory.hxx"
+/** === begin UNO includes === **/
+#include <com/sun/star/uno/Any.hxx>
+/** === end UNO includes === **/
-namespace svt { namespace table
+//......................................................................................................................
+namespace svt
{
-//........................................................................
+//......................................................................................................................
-
- class AccessibleTableControl_Impl
+ //==================================================================================================================
+ //= CellValueConversion
+ //==================================================================================================================
+ class CellValueConversion
{
- public:
- AccessibleFactoryAccess m_aFactoryAccess;
- IAccessibleTableControl* m_pAccessible;
-
- public:
- AccessibleTableControl_Impl() : m_pAccessible(NULL)
- {
- }
-
-
- /// @see AccessibleTableControl::getTableRowHeader
- ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
- getAccessibleTableHeader( AccessibleTableControlObjType _eObjType );
- /// @see AccessibleTableControl::getTable
- ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
- getAccessibleTable( );
-
+ public:
+ static ::rtl::OUString convertToString( const ::com::sun::star::uno::Any& i_cellValue );
};
-//........................................................................
-} } // namespace svt::table
-//........................................................................
+//......................................................................................................................
+} // namespace svt
+//......................................................................................................................
-#endif // SVTOOLS_SOURCE_INC_ACCESSIBLETABLEIMP_HXX
+#endif // SVTOOLS_CELLVALUECONVERSION_HXX
diff --git a/svtools/source/table/defaultinputhandler.cxx b/svtools/source/table/defaultinputhandler.cxx
index f6a58ad17efe..733366d16904 100644
--- a/svtools/source/table/defaultinputhandler.cxx
+++ b/svtools/source/table/defaultinputhandler.cxx
@@ -28,121 +28,133 @@
#include "precompiled_svtools.hxx"
#include "svtools/table/defaultinputhandler.hxx"
-#include "svtools/table/abstracttablecontrol.hxx"
+#include "svtools/table/tablecontrolinterface.hxx"
+
+#include "tabledatawindow.hxx"
+#include "mousefunction.hxx"
#include <tools/debug.hxx>
#include <vcl/event.hxx>
#include <vcl/cursor.hxx>
-#include "svtools/table/tabledatawindow.hxx"
-//........................................................................
+//......................................................................................................................
namespace svt { namespace table
{
-//.......................................................................
+//......................................................................................................................
+ typedef ::rtl::Reference< IMouseFunction > PMouseFunction;
+ typedef ::std::vector< PMouseFunction > MouseFunctions;
struct DefaultInputHandler_Impl
{
+ PMouseFunction pActiveFunction;
+ MouseFunctions aMouseFunctions;
};
- //====================================================================
+ //==================================================================================================================
//= DefaultInputHandler
- //====================================================================
- //--------------------------------------------------------------------
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
DefaultInputHandler::DefaultInputHandler()
:m_pImpl( new DefaultInputHandler_Impl )
- ,m_bResize(false)
{
+ m_pImpl->aMouseFunctions.push_back( new ColumnResize );
+ m_pImpl->aMouseFunctions.push_back( new RowSelection );
+ m_pImpl->aMouseFunctions.push_back( new ColumnSortHandler );
}
- //--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
DefaultInputHandler::~DefaultInputHandler()
{
- DELETEZ( m_pImpl );
}
- //--------------------------------------------------------------------
- bool DefaultInputHandler::MouseMove( IAbstractTableControl& _rControl, const MouseEvent& _rMEvt )
+ //------------------------------------------------------------------------------------------------------------------
+ namespace
{
- Point aPoint = _rMEvt.GetPosPixel();
- if(m_bResize)
+ bool lcl_delegateMouseEvent( DefaultInputHandler_Impl& i_impl, ITableControl& i_control, const MouseEvent& i_event,
+ FunctionResult ( IMouseFunction::*i_handlerMethod )( ITableControl&, const MouseEvent& ) )
{
- _rControl.resizeColumn(aPoint);
- return true;
- }
- return false;
- }
-
- //--------------------------------------------------------------------
- bool DefaultInputHandler::MouseButtonDown( IAbstractTableControl& _rControl, const MouseEvent& _rMEvt )
- {
- bool bHandled = false;
- Point aPoint = _rMEvt.GetPosPixel();
- RowPos nRow = _rControl.getCurrentRow(aPoint);
- if(nRow == -1)
- {
- m_bResize = _rControl.startResizeColumn(aPoint);
- bHandled = true;
- }
- else if(nRow >= 0)
- {
- if(_rControl.getSelEngine()->GetSelectionMode() == NO_SELECTION)
+ if ( i_impl.pActiveFunction.is() )
{
- _rControl.setCursorAtCurrentCell(aPoint);
- bHandled = true;
+ bool furtherHandler = false;
+ switch ( (i_impl.pActiveFunction.get()->*i_handlerMethod)( i_control, i_event ) )
+ {
+ case ActivateFunction:
+ OSL_ENSURE( false, "lcl_delegateMouseEvent: unexpected - function already *is* active!" );
+ break;
+ case ContinueFunction:
+ break;
+ case DeactivateFunction:
+ i_impl.pActiveFunction.clear();
+ break;
+ case SkipFunction:
+ furtherHandler = true;
+ break;
+ }
+ if ( !furtherHandler )
+ // handled the event
+ return true;
}
- else
+
+ // ask all other handlers
+ bool handled = false;
+ for ( MouseFunctions::iterator handler = i_impl.aMouseFunctions.begin();
+ ( handler != i_impl.aMouseFunctions.end() ) && !handled;
+ ++handler
+ )
{
- if(!_rControl.isRowSelected(nRow))
- bHandled = _rControl.getSelEngine()->SelMouseButtonDown(_rMEvt);
- else
- bHandled = true;
+ if ( *handler == i_impl.pActiveFunction )
+ // we already invoked this function
+ continue;
+
+ switch ( (handler->get()->*i_handlerMethod)( i_control, i_event ) )
+ {
+ case ActivateFunction:
+ i_impl.pActiveFunction = *handler;
+ handled = true;
+ break;
+ case ContinueFunction:
+ case DeactivateFunction:
+ OSL_ENSURE( false, "lcl_delegateMouseEvent: unexpected: inactivate handler cannot be continued or deactivated!" );
+ break;
+ case SkipFunction:
+ handled = false;
+ break;
+ }
}
+ return handled;
}
- return bHandled;
}
- //--------------------------------------------------------------------
- bool DefaultInputHandler::MouseButtonUp( IAbstractTableControl& _rControl, const MouseEvent& _rMEvt )
+
+ //------------------------------------------------------------------------------------------------------------------
+ bool DefaultInputHandler::MouseMove( ITableControl& i_tableControl, const MouseEvent& i_event )
{
- bool bHandled = false;
- Point aPoint = _rMEvt.GetPosPixel();
- if(_rControl.getCurrentRow(aPoint) >= 0)
- {
- if(m_bResize)
- {
- m_bResize = _rControl.endResizeColumn(aPoint);
- bHandled = true;
- }
- else if(_rControl.getSelEngine()->GetSelectionMode() == NO_SELECTION)
- {
- bHandled = true;
- }
- else
- {
- bHandled = _rControl.getSelEngine()->SelMouseButtonUp(_rMEvt);
- }
- }
- else
- {
- if(m_bResize)
- {
- m_bResize = _rControl.endResizeColumn(aPoint);
- bHandled = true;
- }
- }
- return bHandled;
+ return lcl_delegateMouseEvent( *m_pImpl, i_tableControl, i_event, &IMouseFunction::handleMouseMove );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ bool DefaultInputHandler::MouseButtonDown( ITableControl& i_tableControl, const MouseEvent& i_event )
+ {
+ return lcl_delegateMouseEvent( *m_pImpl, i_tableControl, i_event, &IMouseFunction::handleMouseDown );
}
- //--------------------------------------------------------------------
- bool DefaultInputHandler::KeyInput( IAbstractTableControl& _rControl, const KeyEvent& rKEvt )
+
+ //------------------------------------------------------------------------------------------------------------------
+ bool DefaultInputHandler::MouseButtonUp( ITableControl& i_tableControl, const MouseEvent& i_event )
+ {
+ return lcl_delegateMouseEvent( *m_pImpl, i_tableControl, i_event, &IMouseFunction::handleMouseUp );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ bool DefaultInputHandler::KeyInput( ITableControl& _rControl, const KeyEvent& rKEvt )
{
bool bHandled = false;
const KeyCode& rKeyCode = rKEvt.GetKeyCode();
- USHORT nKeyCode = rKeyCode.GetCode();
+ sal_uInt16 nKeyCode = rKeyCode.GetCode();
struct _ActionMapEntry
{
- USHORT nKeyCode;
- USHORT nKeyModifier;
+ sal_uInt16 nKeyCode;
+ sal_uInt16 nKeyModifier;
TableControlAction eAction;
}
static aKnownActions[] = {
@@ -158,11 +170,11 @@ namespace svt { namespace table
{ KEY_PAGEDOWN, KEY_MOD1, cursorToLastLine },
{ KEY_HOME, KEY_MOD1, cursorTopLeft },
{ KEY_END, KEY_MOD1, cursorBottomRight },
- { KEY_SPACE, KEY_MOD1, cursorSelectRow },
- { KEY_UP, KEY_SHIFT, cursorSelectRowUp },
- { KEY_DOWN, KEY_SHIFT, cursorSelectRowDown },
- { KEY_END, KEY_SHIFT, cursorSelectRowAreaBottom },
- { KEY_HOME, KEY_SHIFT, cursorSelectRowAreaTop },
+ { KEY_SPACE, KEY_MOD1, cursorSelectRow },
+ { KEY_UP, KEY_SHIFT, cursorSelectRowUp },
+ { KEY_DOWN, KEY_SHIFT, cursorSelectRowDown },
+ { KEY_END, KEY_SHIFT, cursorSelectRowAreaBottom },
+ { KEY_HOME, KEY_SHIFT, cursorSelectRowAreaTop },
{ 0, 0, invalidTableControlAction }
};
@@ -173,7 +185,6 @@ namespace svt { namespace table
if ( ( pActions->nKeyCode == nKeyCode ) && ( pActions->nKeyModifier == rKeyCode.GetAllModifier() ) )
{
bHandled = _rControl.dispatchAction( pActions->eAction );
- bHandled = true; // always handled issue #i114340
break;
}
}
@@ -181,22 +192,22 @@ namespace svt { namespace table
return bHandled;
}
- //--------------------------------------------------------------------
- bool DefaultInputHandler::GetFocus( IAbstractTableControl& _rControl )
+ //------------------------------------------------------------------------------------------------------------------
+ bool DefaultInputHandler::GetFocus( ITableControl& _rControl )
{
_rControl.showCursor();
return false; // continue processing
}
- //--------------------------------------------------------------------
- bool DefaultInputHandler::LoseFocus( IAbstractTableControl& _rControl )
+ //------------------------------------------------------------------------------------------------------------------
+ bool DefaultInputHandler::LoseFocus( ITableControl& _rControl )
{
_rControl.hideCursor();
return false; // continue processing
}
- //--------------------------------------------------------------------
- bool DefaultInputHandler::RequestHelp( IAbstractTableControl& _rControl, const HelpEvent& _rHEvt )
+ //------------------------------------------------------------------------------------------------------------------
+ bool DefaultInputHandler::RequestHelp( ITableControl& _rControl, const HelpEvent& _rHEvt )
{
(void)_rControl;
(void)_rHEvt;
@@ -204,8 +215,8 @@ namespace svt { namespace table
return false;
}
- //--------------------------------------------------------------------
- bool DefaultInputHandler::Command( IAbstractTableControl& _rControl, const CommandEvent& _rCEvt )
+ //------------------------------------------------------------------------------------------------------------------
+ bool DefaultInputHandler::Command( ITableControl& _rControl, const CommandEvent& _rCEvt )
{
(void)_rControl;
(void)_rCEvt;
@@ -213,8 +224,8 @@ namespace svt { namespace table
return false;
}
- //--------------------------------------------------------------------
- bool DefaultInputHandler::PreNotify( IAbstractTableControl& _rControl, NotifyEvent& _rNEvt )
+ //------------------------------------------------------------------------------------------------------------------
+ bool DefaultInputHandler::PreNotify( ITableControl& _rControl, NotifyEvent& _rNEvt )
{
(void)_rControl;
(void)_rNEvt;
@@ -222,14 +233,14 @@ namespace svt { namespace table
return false;
}
- //--------------------------------------------------------------------
- bool DefaultInputHandler::Notify( IAbstractTableControl& _rControl, NotifyEvent& _rNEvt )
+ //------------------------------------------------------------------------------------------------------------------
+ bool DefaultInputHandler::Notify( ITableControl& _rControl, NotifyEvent& _rNEvt )
{
(void)_rControl;
(void)_rNEvt;
// TODO
return false;
}
-//........................................................................
+//......................................................................................................................
} } // namespace svt::table
-//........................................................................
+//......................................................................................................................
diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx
index 8e5bd181a583..1e230d372c24 100644
--- a/svtools/source/table/gridtablerenderer.cxx
+++ b/svtools/source/table/gridtablerenderer.cxx
@@ -27,51 +27,209 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svtools.hxx"
+#include "cellvalueconversion.hxx"
#include "svtools/table/gridtablerenderer.hxx"
+#include "svtools/colorcfg.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/graphic/XGraphic.hpp>
+/** === end UNO includes === **/
#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
#include <vcl/window.hxx>
#include <vcl/image.hxx>
+#include <vcl/virdev.hxx>
+#include <vcl/decoview.hxx>
-//........................................................................
+//......................................................................................................................
namespace svt { namespace table
{
-//........................................................................
+//......................................................................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::TypeClass_INTERFACE;
+ using ::com::sun::star::graphic::XGraphic;
+ using ::com::sun::star::style::HorizontalAlignment;
+ using ::com::sun::star::style::HorizontalAlignment_LEFT;
+ using ::com::sun::star::style::HorizontalAlignment_CENTER;
+ using ::com::sun::star::style::HorizontalAlignment_RIGHT;
+ using ::com::sun::star::style::VerticalAlignment;
+ using ::com::sun::star::style::VerticalAlignment_TOP;
+ using ::com::sun::star::style::VerticalAlignment_MIDDLE;
+ using ::com::sun::star::style::VerticalAlignment_BOTTOM;
+ /** === end UNO using === **/
+
+ //==================================================================================================================
+ //= CachedSortIndicator
+ //==================================================================================================================
+ class CachedSortIndicator
+ {
+ public:
+ CachedSortIndicator()
+ :m_lastHeaderHeight( 0 )
+ ,m_lastArrowColor( COL_TRANSPARENT )
+ {
+ }
+
+ BitmapEx const & getBitmapFor( OutputDevice const & i_device, long const i_headerHeight, StyleSettings const & i_style, bool const i_sortAscending );
+
+ private:
+ long m_lastHeaderHeight;
+ Color m_lastArrowColor;
+ BitmapEx m_sortAscending;
+ BitmapEx m_sortDescending;
+ };
+
+ //------------------------------------------------------------------------------------------------------------------
+ BitmapEx const & CachedSortIndicator::getBitmapFor( OutputDevice const & i_device, long const i_headerHeight,
+ StyleSettings const & i_style, bool const i_sortAscending )
+ {
+ BitmapEx & rBitmap( i_sortAscending ? m_sortAscending : m_sortDescending );
+ if ( !rBitmap || ( i_headerHeight != m_lastHeaderHeight ) || ( i_style.GetActiveColor() != m_lastArrowColor ) )
+ {
+ long const nSortIndicatorWidth = 2 * i_headerHeight / 3;
+ long const nSortIndicatorHeight = 2 * nSortIndicatorWidth / 3;
+
+ Point const aBitmapPos( 0, 0 );
+ Size const aBitmapSize( nSortIndicatorWidth, nSortIndicatorHeight );
+ VirtualDevice aDevice( i_device, 0, 0 );
+ aDevice.SetOutputSizePixel( aBitmapSize );
+
+ DecorationView aDecoView( &aDevice );
+ aDecoView.DrawSymbol(
+ Rectangle( aBitmapPos, aBitmapSize ),
+ i_sortAscending ? SYMBOL_SPIN_UP : SYMBOL_SPIN_DOWN,
+ i_style.GetActiveColor()
+ );
+
+ rBitmap = aDevice.GetBitmapEx( aBitmapPos, aBitmapSize );
+ m_lastHeaderHeight = i_headerHeight;
+ m_lastArrowColor = i_style.GetActiveColor();
+ }
+ return rBitmap;
+ }
+ //==================================================================================================================
+ //= GridTableRenderer_Impl
+ //==================================================================================================================
struct GridTableRenderer_Impl
{
- ITableModel& rModel;
- RowPos nCurrentRow;
+ ITableModel& rModel;
+ RowPos nCurrentRow;
+ bool bUseGridLines;
+ CachedSortIndicator aSortIndicator;
GridTableRenderer_Impl( ITableModel& _rModel )
:rModel( _rModel )
,nCurrentRow( ROW_INVALID )
+ ,bUseGridLines( true )
{
}
};
- //====================================================================
+ //==================================================================================================================
+ //= helper
+ //==================================================================================================================
+ namespace
+ {
+ static Rectangle lcl_getContentArea( GridTableRenderer_Impl const & i_impl, Rectangle const & i_cellArea )
+ {
+ Rectangle aContentArea( i_cellArea );
+ if ( i_impl.bUseGridLines )
+ {
+ --aContentArea.Right();
+ --aContentArea.Bottom();
+ }
+ return aContentArea;
+ }
+ static Rectangle lcl_getTextRenderingArea( Rectangle const & i_contentArea )
+ {
+ Rectangle aTextArea( i_contentArea );
+ aTextArea.Left() += 2; aTextArea.Right() -= 2;
+ ++aTextArea.Top(); --aTextArea.Bottom();
+ return aTextArea;
+ }
+
+ static sal_uLong lcl_getAlignmentTextDrawFlags( GridTableRenderer_Impl const & i_impl, ColPos const i_columnPos )
+ {
+ sal_uLong nVertFlag = TEXT_DRAW_TOP;
+ VerticalAlignment const eVertAlign = i_impl.rModel.getVerticalAlign();
+ switch ( eVertAlign )
+ {
+ case VerticalAlignment_MIDDLE: nVertFlag = TEXT_DRAW_VCENTER; break;
+ case VerticalAlignment_BOTTOM: nVertFlag = TEXT_DRAW_BOTTOM; break;
+ default:
+ break;
+ }
+
+ sal_uLong nHorzFlag = TEXT_DRAW_LEFT;
+ HorizontalAlignment const eHorzAlign = i_impl.rModel.getColumnModel( i_columnPos )->getHorizontalAlign();
+ switch ( eHorzAlign )
+ {
+ case HorizontalAlignment_CENTER: nHorzFlag = TEXT_DRAW_CENTER; break;
+ case HorizontalAlignment_RIGHT: nHorzFlag = TEXT_DRAW_RIGHT; break;
+ default:
+ break;
+ }
+
+ return nVertFlag | nHorzFlag;
+ }
+
+ }
+
+ //==================================================================================================================
//= GridTableRenderer
- //====================================================================
- //--------------------------------------------------------------------
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
GridTableRenderer::GridTableRenderer( ITableModel& _rModel )
:m_pImpl( new GridTableRenderer_Impl( _rModel ) )
{
}
- //--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
GridTableRenderer::~GridTableRenderer()
{
- DELETEZ( m_pImpl );
}
- //--------------------------------------------------------------------
- RowPos GridTableRenderer::getCurrentRow()
+ //------------------------------------------------------------------------------------------------------------------
+ RowPos GridTableRenderer::getCurrentRow() const
{
return m_pImpl->nCurrentRow;
}
- //--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ bool GridTableRenderer::useGridLines() const
+ {
+ return m_pImpl->bUseGridLines;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void GridTableRenderer::useGridLines( bool const i_use )
+ {
+ m_pImpl->bUseGridLines = i_use;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ namespace
+ {
+ Color lcl_getEffectiveColor(
+ ::boost::optional< ::Color > const & i_modelColor,
+ StyleSettings const & i_styleSettings,
+ ::Color const & ( StyleSettings::*i_getDefaultColor ) () const
+ )
+ {
+ if ( !!i_modelColor )
+ return *i_modelColor;
+ return ( i_styleSettings.*i_getDefaultColor )();
+ }
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
void GridTableRenderer::PaintHeaderArea(
OutputDevice& _rDevice, const Rectangle& _rArea, bool _bIsColHeaderArea, bool _bIsRowHeaderArea,
const StyleSettings& _rStyle )
@@ -79,15 +237,18 @@ namespace svt { namespace table
OSL_PRECOND( _bIsColHeaderArea || _bIsRowHeaderArea,
"GridTableRenderer::PaintHeaderArea: invalid area flags!" );
- _rDevice.Push( PUSH_FILLCOLOR | PUSH_LINECOLOR);
- Color background = m_pImpl->rModel.getHeaderBackgroundColor();
- if( background != 0xFFFFFF)
- _rDevice.SetFillColor(background);
- else
- _rDevice.SetFillColor(_rStyle.GetDialogColor());
- _rDevice.SetLineColor(_rStyle.GetSeparatorColor());
+ _rDevice.Push( PUSH_FILLCOLOR | PUSH_LINECOLOR );
+
+ Color const background = lcl_getEffectiveColor( m_pImpl->rModel.getHeaderBackgroundColor(), _rStyle, &StyleSettings::GetDialogColor );
+ _rDevice.SetFillColor( background );
+
+ _rDevice.SetLineColor();
_rDevice.DrawRect( _rArea );
+
// delimiter lines at bottom/right
+ ::boost::optional< ::Color > aLineColor( m_pImpl->rModel.getLineColor() );
+ ::Color const lineColor = !aLineColor ? _rStyle.GetSeparatorColor() : *aLineColor;
+ _rDevice.SetLineColor( lineColor );
_rDevice.DrawLine( _rArea.BottomLeft(), _rArea.BottomRight() );
_rDevice.DrawLine( _rArea.BottomRight(), _rArea.TopRight() );
@@ -96,48 +257,73 @@ namespace svt { namespace table
(void)_bIsRowHeaderArea;
}
- //--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
void GridTableRenderer::PaintColumnHeader( ColPos _nCol, bool _bActive, bool _bSelected,
OutputDevice& _rDevice, const Rectangle& _rArea, const StyleSettings& _rStyle )
{
_rDevice.Push( PUSH_LINECOLOR);
- _rDevice.SetLineColor(_rStyle.GetSeparatorColor());
- _rDevice.DrawLine( _rArea.BottomRight(), _rArea.TopRight());
String sHeaderText;
- PColumnModel pColumn = m_pImpl->rModel.getColumnModel( _nCol );
+ PColumnModel const pColumn = m_pImpl->rModel.getColumnModel( _nCol );
DBG_ASSERT( !!pColumn, "GridTableRenderer::PaintColumnHeader: invalid column model object!" );
if ( !!pColumn )
sHeaderText = pColumn->getName();
- if(m_pImpl->rModel.getTextColor() != 0x000000)
- _rDevice.SetTextColor(m_pImpl->rModel.getTextColor());
- else
- _rDevice.SetTextColor(_rStyle.GetFieldTextColor());
- ULONG nHorFlag = TEXT_DRAW_LEFT;
- ULONG nVerFlag = TEXT_DRAW_TOP;
- if(m_pImpl->rModel.getVerticalAlign() == 1)
- nVerFlag = TEXT_DRAW_VCENTER;
- else if(m_pImpl->rModel.getVerticalAlign() == 2)
- nVerFlag = TEXT_DRAW_BOTTOM;
- if(m_pImpl->rModel.getColumnModel(_nCol)->getHorizontalAlign() == 1)
- nHorFlag = TEXT_DRAW_CENTER;
- else if(m_pImpl->rModel.getColumnModel(_nCol)->getHorizontalAlign() == 2)
- nHorFlag = TEXT_DRAW_RIGHT;
- Rectangle aRect(_rArea);
- aRect.Left()+=4; aRect.Right()-=4;
- aRect.Bottom()-=2;
- _rDevice.DrawText( aRect, sHeaderText, nHorFlag | nVerFlag | TEXT_DRAW_CLIP);
+
+ ::Color const textColor = lcl_getEffectiveColor( m_pImpl->rModel.getTextColor(), _rStyle, &StyleSettings::GetFieldTextColor );
+ _rDevice.SetTextColor( textColor );
+
+ Rectangle const aTextRect( lcl_getTextRenderingArea( lcl_getContentArea( *m_pImpl, _rArea ) ) );
+ sal_uLong const nDrawTextFlags = lcl_getAlignmentTextDrawFlags( *m_pImpl, _nCol ) | TEXT_DRAW_CLIP;
+ _rDevice.DrawText( aTextRect, sHeaderText, nDrawTextFlags );
+
+ ::boost::optional< ::Color > const aLineColor( m_pImpl->rModel.getLineColor() );
+ ::Color const lineColor = !aLineColor ? _rStyle.GetSeparatorColor() : *aLineColor;
+ _rDevice.SetLineColor( lineColor );
+ _rDevice.DrawLine( _rArea.BottomRight(), _rArea.TopRight());
_rDevice.DrawLine( _rArea.BottomLeft(), _rArea.BottomRight() );
+
+ // draw sort indicator if the model data is sorted by the given column
+ ITableDataSort const * pSortAdapter = m_pImpl->rModel.getSortAdapter();
+ ColumnSort aCurrentSortOrder;
+ if ( pSortAdapter != NULL )
+ aCurrentSortOrder = pSortAdapter->getCurrentSortOrder();
+ if ( aCurrentSortOrder.nColumnPos == _nCol )
+ {
+ long const nHeaderHeight( _rArea.GetHeight() );
+ BitmapEx const aIndicatorBitmap = m_pImpl->aSortIndicator.getBitmapFor( _rDevice, nHeaderHeight, _rStyle,
+ aCurrentSortOrder.eSortDirection == ColumnSortAscending );
+ Size const aBitmapSize( aIndicatorBitmap.GetSizePixel() );
+ long const nSortIndicatorPaddingX = 2;
+ long const nSortIndicatorPaddingY = ( nHeaderHeight - aBitmapSize.Height() ) / 2;
+
+ if ( ( nDrawTextFlags & TEXT_DRAW_RIGHT ) != 0 )
+ {
+ // text is right aligned => draw the sort indicator at the left hand side
+ _rDevice.DrawBitmapEx(
+ Point( _rArea.Left() + nSortIndicatorPaddingX, _rArea.Top() + nSortIndicatorPaddingY ),
+ aIndicatorBitmap
+ );
+ }
+ else
+ {
+ // text is left-aligned or centered => draw the sort indicator at the right hand side
+ _rDevice.DrawBitmapEx(
+ Point( _rArea.Right() - nSortIndicatorPaddingX - aBitmapSize.Width(), nSortIndicatorPaddingY ),
+ aIndicatorBitmap
+ );
+ }
+ }
+
_rDevice.Pop();
(void)_bActive;
// no special painting for the active column at the moment
(void)_bSelected;
- //selection for column header not yet implemented
+ // selection for column header not yet implemented
}
- //--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
void GridTableRenderer::PrepareRow( RowPos _nRow, bool _bActive, bool _bSelected,
OutputDevice& _rDevice, const Rectangle& _rRowArea, const StyleSettings& _rStyle )
{
@@ -146,237 +332,288 @@ namespace svt { namespace table
_rDevice.Push( PUSH_FILLCOLOR | PUSH_LINECOLOR);
- Color aRowBackground = m_pImpl->rModel.getOddRowBackgroundColor();
- Color line = m_pImpl->rModel.getLineColor();
- Color aRowBackground2 = m_pImpl->rModel.getEvenRowBackgroundColor();
- Color fieldColor = _rStyle.GetFieldColor();
- if(aRowBackground == 0xFFFFFF)
- aRowBackground = fieldColor;
- if(aRowBackground2 == 0xFFFFFF)
- aRowBackground2 = fieldColor;
- //if row is selected background color becomes blue, and lines should be also blue
- //if they aren't user defined
- if(_bSelected)
+ ::Color backgroundColor = _rStyle.GetFieldColor();
+
+ ::boost::optional< ::Color > aLineColor( m_pImpl->rModel.getLineColor() );
+ ::Color lineColor = !aLineColor ? _rStyle.GetSeparatorColor() : *aLineColor;
+
+ if ( _bSelected )
{
- Color aSelected(_rStyle.GetHighlightColor());
- aRowBackground = aSelected;
- if(line == 0xFFFFFF)
- _rDevice.SetLineColor(aRowBackground);
- else
- _rDevice.SetLineColor(line);
+ // selected rows use the background color from the style
+ backgroundColor = _rStyle.GetHighlightColor();
+ if ( !aLineColor )
+ lineColor = backgroundColor;
}
- //if row not selected, check the cases whether user defined backgrounds are set
- //and set line color to be the same
else
{
- if(aRowBackground2 != fieldColor && _nRow%2)
+ ::boost::optional< ::std::vector< ::Color > > aRowColors = m_pImpl->rModel.getRowBackgroundColors();
+ if ( !aRowColors )
{
- aRowBackground = aRowBackground2;
- if(line == 0xFFFFFF)
- _rDevice.SetLineColor(aRowBackground);
+ // use alternating default colors
+ Color const fieldColor = _rStyle.GetFieldColor();
+ if ( _rStyle.GetHighContrastMode() || ( ( m_pImpl->nCurrentRow % 2 ) == 0 ) )
+ {
+ backgroundColor = fieldColor;
+ }
else
- _rDevice.SetLineColor(line);
+ {
+ Color hilightColor = _rStyle.GetHighlightColor();
+ hilightColor.SetRed( 9 * ( fieldColor.GetRed() - hilightColor.GetRed() ) / 10 + hilightColor.GetRed() );
+ hilightColor.SetGreen( 9 * ( fieldColor.GetGreen() - hilightColor.GetGreen() ) / 10 + hilightColor.GetGreen() );
+ hilightColor.SetBlue( 9 * ( fieldColor.GetBlue() - hilightColor.GetBlue() ) / 10 + hilightColor.GetBlue() );
+ backgroundColor = hilightColor;
+ }
}
- //fill the rows with alternating background colors if second background color is specified
- else if(aRowBackground != fieldColor && line == 0xFFFFFF)
- _rDevice.SetLineColor(aRowBackground);
else
{
- //if Line color is set, then it was user defined and should be visible
- //if it wasn't set, it'll be the same as the default background color, so lines still won't be visible
- _rDevice.SetLineColor(line);
+ if ( aRowColors->empty() )
+ {
+ // all colors have the same background color
+ backgroundColor = _rStyle.GetFieldColor();
+ }
+ else
+ {
+ backgroundColor = aRowColors->at( m_pImpl->nCurrentRow % aRowColors->size() );
+ }
}
}
- _rDevice.SetFillColor( aRowBackground );
- _rDevice.DrawRect( _rRowArea );
- // TODO: active?
+ //m_pImpl->bUseGridLines ? _rDevice.SetLineColor( lineColor ) : _rDevice.SetLineColor();
+ _rDevice.SetLineColor();
+ _rDevice.SetFillColor( backgroundColor );
+ _rDevice.DrawRect( _rRowArea );
_rDevice.Pop();
+
(void)_bActive;
+ // row containing the active cell not rendered any special at the moment
}
- //--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
void GridTableRenderer::PaintRowHeader( bool _bActive, bool _bSelected, OutputDevice& _rDevice, const Rectangle& _rArea,
- const StyleSettings& _rStyle, rtl::OUString& _rText )
+ const StyleSettings& _rStyle )
{
- _rDevice.Push( PUSH_LINECOLOR);
- _rDevice.SetLineColor(_rStyle.GetSeparatorColor());
+ _rDevice.Push( PUSH_LINECOLOR | PUSH_TEXTCOLOR );
+
+ ::boost::optional< ::Color > const aLineColor( m_pImpl->rModel.getLineColor() );
+ ::Color const lineColor = !aLineColor ? _rStyle.GetSeparatorColor() : *aLineColor;
+ _rDevice.SetLineColor( lineColor );
_rDevice.DrawLine( _rArea.BottomLeft(), _rArea.BottomRight() );
- if(m_pImpl->rModel.getTextColor() != 0x000000)
- _rDevice.SetTextColor(m_pImpl->rModel.getTextColor());
- else
- _rDevice.SetTextColor(_rStyle.GetFieldTextColor());
- ULONG nHorFlag = TEXT_DRAW_LEFT;
- ULONG nVerFlag = TEXT_DRAW_TOP;
- if(m_pImpl->rModel.getVerticalAlign() == 1)
- nVerFlag = TEXT_DRAW_VCENTER;
- else if(m_pImpl->rModel.getVerticalAlign() == 2)
- nVerFlag = TEXT_DRAW_BOTTOM;
- if(m_pImpl->rModel.getColumnModel(0)->getHorizontalAlign() == 1)
- nHorFlag = TEXT_DRAW_CENTER;
- else if(m_pImpl->rModel.getColumnModel(0)->getHorizontalAlign() == 2)
- nHorFlag = TEXT_DRAW_RIGHT;
- Rectangle aRect(_rArea);
- aRect.Left()+=4; aRect.Right()-=4;
- aRect.Bottom()-=2;
- _rDevice.DrawText( aRect, _rText, nHorFlag | nVerFlag | TEXT_DRAW_CLIP);
+
+ Any const rowHeading( m_pImpl->rModel.getRowHeading( m_pImpl->nCurrentRow ) );
+ ::rtl::OUString const rowTitle( CellValueConversion::convertToString( rowHeading ) );
+ if ( rowTitle.getLength() )
+ {
+ ::Color const textColor = lcl_getEffectiveColor( m_pImpl->rModel.getHeaderTextColor(), _rStyle, &StyleSettings::GetFieldTextColor );
+ _rDevice.SetTextColor( textColor );
+
+ Rectangle const aTextRect( lcl_getTextRenderingArea( lcl_getContentArea( *m_pImpl, _rArea ) ) );
+ sal_uLong const nDrawTextFlags = lcl_getAlignmentTextDrawFlags( *m_pImpl, 0 ) | TEXT_DRAW_CLIP;
+ // TODO: is using the horizontal alignment of the 0'th column a good idea here? This is pretty ... arbitray ..
+ _rDevice.DrawText( aTextRect, rowTitle, nDrawTextFlags );
+ }
+
// TODO: active? selected?
(void)_bActive;
(void)_bSelected;
- //at the moment no special paint for selected row header
_rDevice.Pop();
}
- //--------------------------------------------------------------------
- void GridTableRenderer::PaintCellImage( ColPos _nColumn, bool _bSelected, bool _bActive,
- OutputDevice& _rDevice, const Rectangle& _rArea, const StyleSettings& _rStyle, Image* _pCellData )
- {
- _rDevice.Push( PUSH_LINECOLOR | PUSH_FILLCOLOR);
- Color background1 = m_pImpl->rModel.getOddRowBackgroundColor();
- Color background2 = m_pImpl->rModel.getEvenRowBackgroundColor();
- Color line = m_pImpl->rModel.getLineColor();
- //if row is selected and line color isn't user specified, set it blue
- if(_bSelected)
+ //------------------------------------------------------------------------------------------------------------------
+ struct GridTableRenderer::CellRenderContext
+ {
+ OutputDevice& rDevice;
+ Rectangle const aContentArea;
+ StyleSettings const & rStyle;
+ ColPos const nColumn;
+ bool const bSelected;
+
+ CellRenderContext( OutputDevice& i_device, Rectangle const & i_contentArea,
+ StyleSettings const & i_style, ColPos const i_column, bool const i_selected )
+ :rDevice( i_device )
+ ,aContentArea( i_contentArea )
+ ,rStyle( i_style )
+ ,nColumn( i_column )
+ ,bSelected( i_selected )
{
- if(line == 0xFFFFFF)
- _rDevice.SetLineColor(_rStyle.GetHighlightColor());
- else
- _rDevice.SetLineColor(line);
}
- //else set line color to the color of row background
- else
+ };
+
+ //------------------------------------------------------------------------------------------------------------------
+ void GridTableRenderer::PaintCell( ColPos const i_column, bool _bSelected, bool _bActive,
+ OutputDevice& _rDevice, const Rectangle& _rArea, const StyleSettings& _rStyle )
+ {
+ _rDevice.Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
+
+ Rectangle const aContentArea( lcl_getContentArea( *m_pImpl, _rArea ) );
+ CellRenderContext const aRenderContext( _rDevice, aContentArea, _rStyle, i_column, _bSelected );
+ impl_paintCellContent( aRenderContext );
+
+ if ( m_pImpl->bUseGridLines )
{
- if(background2 != 0xFFFFFF && m_pImpl->nCurrentRow%2)
- {
- if(line == 0xFFFFFF)
- _rDevice.SetLineColor(background2);
- else
- _rDevice.SetLineColor(line);
- }
- else if(background1 != 0xFFFFFF && line == 0xFFFFFF)
- _rDevice.SetLineColor(background1);
- else
+ ::boost::optional< ::Color > aLineColor( m_pImpl->rModel.getLineColor() );
+ ::Color lineColor = !aLineColor ? _rStyle.GetSeparatorColor() : *aLineColor;
+
+ if ( _bSelected && !aLineColor )
{
- //if line color is set, then it was user defined and should be visible
- //if it wasn't set, it'll be the same as the default background color, so lines still won't be visible
- _rDevice.SetLineColor(line);
+ // if no line color is specified by the model, use the usual selection color for lines in selected cells
+ lineColor = _rStyle.GetHighlightColor();
}
- }
- _rDevice.DrawLine( _rArea.BottomRight(), _rArea.TopRight() );
- Rectangle aRect( _rArea );
- ++aRect.Left(); --aRect.Right();
- aRect.Top(); aRect.Bottom();
- Point imagePos(Point(aRect.Left(), aRect.Top()));
- Size imageSize = _pCellData->GetSizePixel();
- if(aRect.GetWidth() > imageSize.Width())
- {
- if(m_pImpl->rModel.getColumnModel(_nColumn)->getHorizontalAlign() == 1)
- imagePos.X() = aRect.Left()+((double)(aRect.GetWidth() - imageSize.Width()))/2;
- else if(m_pImpl->rModel.getColumnModel(_nColumn)->getHorizontalAlign() == 2)
- imagePos.X() = aRect.Right() - imageSize.Width();
- }
- else
- imageSize.Width() = aRect.GetWidth();
- if(aRect.GetHeight() > imageSize.Height())
- {
- if(m_pImpl->rModel.getVerticalAlign() == 1)
- imagePos.Y() = aRect.Top()+((double)(aRect.GetHeight() - imageSize.Height()))/2;
- else if(m_pImpl->rModel.getVerticalAlign() == 2)
- imagePos.Y() = aRect.Bottom() - imageSize.Height();
+ _rDevice.SetLineColor( lineColor );
+ _rDevice.DrawLine( _rArea.BottomLeft(), _rArea.BottomRight() );
+ _rDevice.DrawLine( _rArea.BottomRight(), _rArea.TopRight() );
}
- else
- imageSize.Height() = aRect.GetHeight()-1;
- Image& image (*_pCellData);
- _rDevice.DrawImage(imagePos, imageSize, image, 0);
+
_rDevice.Pop();
(void)_bActive;
// no special painting for the active cell at the moment
}
- //--------------------------------------------------------------------
- void GridTableRenderer::PaintCellString( ColPos _nColumn, bool _bSelected, bool _bActive,
- OutputDevice& _rDevice, const Rectangle& _rArea, const StyleSettings& _rStyle, rtl::OUString& _rText )
- {
- _rDevice.Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
- Color background1 = m_pImpl->rModel.getOddRowBackgroundColor();
- Color background2 = m_pImpl->rModel.getEvenRowBackgroundColor();
- Color line = m_pImpl->rModel.getLineColor();
- //if row is selected and line color isn't user specified, set it blue
- if(_bSelected)
+ //------------------------------------------------------------------------------------------------------------------
+ void GridTableRenderer::impl_paintCellImage( CellRenderContext const & i_context, Image const & i_image )
+ {
+ Point imagePos( Point( i_context.aContentArea.Left(), i_context.aContentArea.Top() ) );
+ Size imageSize = i_image.GetSizePixel();
+ if ( i_context.aContentArea.GetWidth() > imageSize.Width() )
{
- if(line == 0xFFFFFF)
- _rDevice.SetLineColor(_rStyle.GetHighlightColor());
- else
- _rDevice.SetLineColor(line);
+ const HorizontalAlignment eHorzAlign = m_pImpl->rModel.getColumnModel( i_context.nColumn )->getHorizontalAlign();
+ switch ( eHorzAlign )
+ {
+ case HorizontalAlignment_CENTER:
+ imagePos.X() += ( i_context.aContentArea.GetWidth() - imageSize.Width() ) / 2;
+ break;
+ case HorizontalAlignment_RIGHT:
+ imagePos.X() = i_context.aContentArea.Right() - imageSize.Width();
+ break;
+ default:
+ break;
+ }
+
}
- //else set line color to the color of row background
else
+ imageSize.Width() = i_context.aContentArea.GetWidth();
+
+ if ( i_context.aContentArea.GetHeight() > imageSize.Height() )
{
- if(background2 != 0xFFFFFF && m_pImpl->nCurrentRow%2)
+ const VerticalAlignment eVertAlign = m_pImpl->rModel.getVerticalAlign();
+ switch ( eVertAlign )
{
- if(line == 0xFFFFFF)
- _rDevice.SetLineColor(background2);
- else
- _rDevice.SetLineColor(line);
- }
- else if(background1 != 0xFFFFFF && line == 0xFFFFFF)
- _rDevice.SetLineColor(background1);
- else
- {
- //if Line color is set, then it was user defined and should be visible
- //if it wasn't set, it'll be the same as the default background color, so lines still won't be visible
- _rDevice.SetLineColor(line);
+ case VerticalAlignment_MIDDLE:
+ imagePos.Y() += ( i_context.aContentArea.GetHeight() - imageSize.Height() ) / 2;
+ break;
+ case VerticalAlignment_BOTTOM:
+ imagePos.Y() = i_context.aContentArea.Bottom() - imageSize.Height();
+ break;
+ default:
+ break;
}
}
- _rDevice.DrawLine( _rArea.BottomRight(), _rArea.TopRight() );
+ else
+ imageSize.Height() = i_context.aContentArea.GetHeight() - 1;
+
+ i_context.rDevice.DrawImage( imagePos, imageSize, i_image, 0 );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void GridTableRenderer::impl_paintCellContent( CellRenderContext const & i_context )
+ {
+ Any aCellContent;
+ m_pImpl->rModel.getCellContent( i_context.nColumn, m_pImpl->nCurrentRow, aCellContent );
+
+ if ( aCellContent.getValueTypeClass() == TypeClass_INTERFACE )
+ {
+ Reference< XInterface > const xContentInterface( aCellContent, UNO_QUERY );
+ if ( !xContentInterface.is() )
+ // allowed. kind of.
+ return;
- Rectangle aRect( _rArea );
- ++aRect.Left(); --aRect.Right();
- aRect.Top(); aRect.Bottom();
- if(_bSelected)
- _rDevice.SetTextColor(_rStyle.GetHighlightTextColor());
- else if(m_pImpl->rModel.getTextColor() != 0x000000)
- _rDevice.SetTextColor(m_pImpl->rModel.getTextColor());
+ Reference< XGraphic > const xGraphic( aCellContent, UNO_QUERY );
+ ENSURE_OR_RETURN_VOID( xGraphic.is(), "GridTableRenderer::impl_paintCellContent: only XGraphic interfaces (or NULL) are supported for painting." );
+
+ const Image aImage( xGraphic );
+ impl_paintCellImage( i_context, aImage );
+ return;
+ }
+
+ const ::rtl::OUString sText( CellValueConversion::convertToString( aCellContent ) );
+ impl_paintCellText( i_context, sText );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void GridTableRenderer::impl_paintCellText( CellRenderContext const & i_context, ::rtl::OUString const & i_text )
+ {
+ if ( i_context.bSelected )
+ i_context.rDevice.SetTextColor( i_context.rStyle.GetHighlightTextColor() );
else
- _rDevice.SetTextColor(_rStyle.GetFieldTextColor());
- ULONG nHorFlag = TEXT_DRAW_LEFT;
- ULONG nVerFlag = TEXT_DRAW_TOP;
- if(m_pImpl->rModel.getVerticalAlign() == 1)
- nVerFlag = TEXT_DRAW_VCENTER;
- else if(m_pImpl->rModel.getVerticalAlign() == 2)
- nVerFlag = TEXT_DRAW_BOTTOM;
- if(m_pImpl->rModel.getColumnModel(_nColumn)->getHorizontalAlign() == 1)
- nHorFlag = TEXT_DRAW_CENTER;
- else if(m_pImpl->rModel.getColumnModel(_nColumn)->getHorizontalAlign() == 2)
- nHorFlag = TEXT_DRAW_RIGHT;
- Rectangle textRect(_rArea);
- textRect.Left()+=4; textRect.Right()-=4;
- textRect.Bottom()-=2;
- _rDevice.DrawText( textRect, _rText, nHorFlag | nVerFlag | TEXT_DRAW_CLIP);
+ {
+ ::Color const textColor = lcl_getEffectiveColor( m_pImpl->rModel.getTextColor(), i_context.rStyle, &StyleSettings::GetFieldTextColor );
+ i_context.rDevice.SetTextColor( textColor );
+ }
- _rDevice.Pop();
- (void)_bActive;
- // no special painting for the active cell at the moment
+ Rectangle const textRect( lcl_getTextRenderingArea( i_context.aContentArea ) );
+ sal_uLong const nDrawTextFlags = lcl_getAlignmentTextDrawFlags( *m_pImpl, i_context.nColumn ) | TEXT_DRAW_CLIP;
+ i_context.rDevice.DrawText( textRect, i_text, nDrawTextFlags );
}
- //--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
void GridTableRenderer::ShowCellCursor( Window& _rView, const Rectangle& _rCursorRect)
{
_rView.ShowFocus( _rCursorRect );
}
- //--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
void GridTableRenderer::HideCellCursor( Window& _rView, const Rectangle& _rCursorRect)
{
- (void)_rCursorRect;
+ (void)_rCursorRect;
_rView.HideFocus();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ bool GridTableRenderer::FitsIntoCell( Any const & i_cellContent, ColPos const i_colPos, RowPos const i_rowPos,
+ bool const i_active, bool const i_selected, OutputDevice& i_targetDevice, Rectangle const & i_targetArea )
+ {
+ if ( !i_cellContent.hasValue() )
+ return true;
+
+ if ( i_cellContent.getValueTypeClass() == TypeClass_INTERFACE )
+ {
+ Reference< XInterface > const xContentInterface( i_cellContent, UNO_QUERY );
+ if ( !xContentInterface.is() )
+ return true;
+
+ Reference< XGraphic > const xGraphic( i_cellContent, UNO_QUERY );
+ if ( xGraphic.is() )
+ // for the moment, assume it fits. We can always scale it down during painting ...
+ return true;
+
+ OSL_ENSURE( false, "GridTableRenderer::FitsIntoCell: only XGraphic interfaces (or NULL) are supported for painting." );
+ return true;
+ }
+
+ ::rtl::OUString const sText( CellValueConversion::convertToString( i_cellContent ) );
+ if ( sText.getLength() == 0 )
+ return true;
+
+ Rectangle const aTargetArea( lcl_getTextRenderingArea( lcl_getContentArea( *m_pImpl, i_targetArea ) ) );
+
+ long const nTextHeight = i_targetDevice.GetTextHeight();
+ if ( nTextHeight > aTargetArea.GetHeight() )
+ return false;
+
+ long const nTextWidth = i_targetDevice.GetTextWidth( sText );
+ if ( nTextWidth > aTargetArea.GetWidth() )
+ return false;
+ OSL_UNUSED( i_active );
+ OSL_UNUSED( i_selected );
+ OSL_UNUSED( i_rowPos );
+ OSL_UNUSED( i_colPos );
+ return true;
}
-//........................................................................
+//......................................................................................................................
} } // namespace svt::table
-//........................................................................
+//......................................................................................................................
diff --git a/svtools/source/table/mousefunction.cxx b/svtools/source/table/mousefunction.cxx
new file mode 100755
index 000000000000..20d505e911e9
--- /dev/null
+++ b/svtools/source/table/mousefunction.cxx
@@ -0,0 +1,320 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_svtools.hxx"
+
+#include "mousefunction.hxx"
+#include "svtools/table/tablecontrolinterface.hxx"
+
+#include <tools/diagnose_ex.h>
+#include <vcl/window.hxx>
+
+//......................................................................................................................
+namespace svt { namespace table
+{
+//......................................................................................................................
+
+ //==================================================================================================================
+ //= MouseFunction
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ oslInterlockedCount MouseFunction::acquire()
+ {
+ return osl_incrementInterlockedCount( &m_refCount );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ oslInterlockedCount MouseFunction::release()
+ {
+ oslInterlockedCount newCount = osl_decrementInterlockedCount( &m_refCount );
+ if ( newCount == 0 )
+ {
+ delete this;
+ return 0;
+ }
+ return newCount;
+ }
+
+ //==================================================================================================================
+ //= ColumnResize
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ FunctionResult ColumnResize::handleMouseMove( ITableControl& i_tableControl, MouseEvent const & i_event )
+ {
+ Point const aPoint = i_event.GetPosPixel();
+
+ if ( m_nResizingColumn == COL_INVALID )
+ {
+ // if we hit a column divider, change the mosue pointer accordingly
+ Pointer aNewPointer( POINTER_ARROW );
+ TableCell const tableCell = i_tableControl.hitTest( aPoint );
+ if ( ( tableCell.nRow == ROW_COL_HEADERS ) && ( tableCell.eArea == ColumnDivider ) )
+ {
+ aNewPointer = Pointer( POINTER_HSPLIT );
+ }
+ i_tableControl.setPointer( aNewPointer );
+
+ return SkipFunction; // TODO: is this correct?
+ }
+
+ ::Size const tableSize = i_tableControl.getTableSizePixel();
+
+ // set proper pointer
+ Pointer aNewPointer( POINTER_ARROW );
+ ColumnMetrics const & columnMetrics( i_tableControl.getColumnMetrics( m_nResizingColumn ) );
+ if ( ( aPoint.X() > tableSize.Width() )
+ || ( aPoint.X() < columnMetrics.nStartPixel )
+ )
+ {
+ aNewPointer = Pointer( POINTER_NOTALLOWED );
+ }
+ else
+ {
+ aNewPointer = Pointer( POINTER_HSPLIT );
+ }
+ i_tableControl.setPointer( aNewPointer );
+
+ // show tracking line
+ i_tableControl.hideTracking();
+ i_tableControl.showTracking(
+ Rectangle(
+ Point( aPoint.X(), 0 ),
+ Size( 1, tableSize.Height() )
+ ),
+ SHOWTRACK_SPLIT | SHOWTRACK_WINDOW
+ );
+
+ (void)i_event;
+ return ContinueFunction;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ FunctionResult ColumnResize::handleMouseDown( ITableControl& i_tableControl, MouseEvent const & i_event )
+ {
+ if ( m_nResizingColumn != COL_INVALID )
+ {
+ OSL_ENSURE( false, "ColumnResize::handleMouseDown: suspicious: MouseButtonDown while still tracking?" );
+ return ContinueFunction;
+ }
+
+ TableCell const tableCell( i_tableControl.hitTest( i_event.GetPosPixel() ) );
+ if ( tableCell.nRow == ROW_COL_HEADERS )
+ {
+ if ( ( tableCell.nColumn != COL_INVALID )
+ && ( tableCell.eArea == ColumnDivider )
+ )
+ {
+ m_nResizingColumn = tableCell.nColumn;
+ i_tableControl.captureMouse();
+ return ActivateFunction;
+ }
+ }
+
+ return SkipFunction;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ FunctionResult ColumnResize::handleMouseUp( ITableControl& i_tableControl, MouseEvent const & i_event )
+ {
+ if ( m_nResizingColumn == COL_INVALID )
+ return SkipFunction;
+
+ Point const aPoint = i_event.GetPosPixel();
+
+ i_tableControl.hideTracking();
+ PColumnModel const pColumn = i_tableControl.getModel()->getColumnModel( m_nResizingColumn );
+ long const maxWidthLogical = pColumn->getMaxWidth();
+ long const minWidthLogical = pColumn->getMinWidth();
+
+ // new position of mouse
+ long const requestedEnd = aPoint.X();
+
+ // old position of right border
+ long const oldEnd = i_tableControl.getColumnMetrics( m_nResizingColumn ).nEndPixel;
+
+ // position of left border if cursor in the to-be-resized column
+ long const columnStart = i_tableControl.getColumnMetrics( m_nResizingColumn ).nStartPixel;
+ long const requestedWidth = requestedEnd - columnStart;
+ // TODO: this is not correct, strictly: It assumes that the mouse was pressed exactly on the "end" pos,
+ // but for a while now, we have relaxed this, and allow clicking a few pixels aside, too
+
+ if ( requestedEnd >= columnStart )
+ {
+ long requestedWidthLogical = i_tableControl.pixelWidthToAppFont( requestedWidth );
+ // respect column width limits
+ if ( oldEnd > requestedEnd )
+ {
+ // column has become smaller, check against minimum width
+ if ( ( minWidthLogical != 0 ) && ( requestedWidthLogical < minWidthLogical ) )
+ requestedWidthLogical = minWidthLogical;
+ }
+ else if ( oldEnd < requestedEnd )
+ {
+ // column has become larger, check against max width
+ if ( ( maxWidthLogical != 0 ) && ( requestedWidthLogical >= maxWidthLogical ) )
+ requestedWidthLogical = maxWidthLogical;
+ }
+ pColumn->setWidth( requestedWidthLogical );
+ i_tableControl.invalidate( TableAreaAll );
+ }
+
+ i_tableControl.setPointer( Pointer() );
+ i_tableControl.releaseMouse();
+
+ m_nResizingColumn = COL_INVALID;
+ return DeactivateFunction;
+ }
+
+ //==================================================================================================================
+ //= RowSelection
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ FunctionResult RowSelection::handleMouseMove( ITableControl& i_tableControl, MouseEvent const & i_event )
+ {
+ OSL_UNUSED( i_tableControl );
+ OSL_UNUSED( i_event );
+ return SkipFunction;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ FunctionResult RowSelection::handleMouseDown( ITableControl& i_tableControl, MouseEvent const & i_event )
+ {
+ bool handled = false;
+
+ TableCell const tableCell( i_tableControl.hitTest( i_event.GetPosPixel() ) );
+ if ( tableCell.nRow >= 0 )
+ {
+ bool bSetCursor = false;
+ if ( i_tableControl.getSelEngine()->GetSelectionMode() == NO_SELECTION )
+ {
+ bSetCursor = true;
+ }
+ else
+ {
+ if ( !i_tableControl.isRowSelected( tableCell.nRow ) )
+ {
+ handled = i_tableControl.getSelEngine()->SelMouseButtonDown( i_event );
+ }
+ else
+ {
+ bSetCursor = true;
+ }
+ }
+
+ if ( bSetCursor )
+ {
+ i_tableControl.activateCell( tableCell.nColumn, tableCell.nRow );
+ handled = true;
+ }
+ }
+
+ if ( handled )
+ m_bActive = true;
+ return handled ? ActivateFunction : SkipFunction;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ FunctionResult RowSelection::handleMouseUp( ITableControl& i_tableControl, MouseEvent const & i_event )
+ {
+ TableCell const tableCell = i_tableControl.hitTest( i_event.GetPosPixel() );
+ if ( tableCell.nRow >= 0 )
+ {
+ if ( i_tableControl.getSelEngine()->GetSelectionMode() != NO_SELECTION )
+ {
+ i_tableControl.getSelEngine()->SelMouseButtonUp( i_event );
+ }
+ }
+ if ( m_bActive )
+ {
+ m_bActive = false;
+ return DeactivateFunction;
+ }
+ return SkipFunction;
+ }
+
+ //==================================================================================================================
+ //= ColumnSortHandler
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ FunctionResult ColumnSortHandler::handleMouseMove( ITableControl& i_tableControl, MouseEvent const & i_event )
+ {
+ OSL_UNUSED( i_tableControl );
+ OSL_UNUSED( i_event );
+ return SkipFunction;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ FunctionResult ColumnSortHandler::handleMouseDown( ITableControl& i_tableControl, MouseEvent const & i_event )
+ {
+ if ( m_nActiveColumn != COL_INVALID )
+ {
+ OSL_ENSURE( false, "ColumnSortHandler::handleMouseDown: called while already active - suspicious!" );
+ return ContinueFunction;
+ }
+
+ if ( i_tableControl.getModel()->getSortAdapter() == NULL )
+ // no sorting support at the model
+ return SkipFunction;
+
+ TableCell const tableCell( i_tableControl.hitTest( i_event.GetPosPixel() ) );
+ if ( ( tableCell.nRow != ROW_COL_HEADERS ) || ( tableCell.nColumn < 0 ) )
+ return SkipFunction;
+
+ // TODO: ensure the column header is rendered in some special way, indicating its current state
+
+ m_nActiveColumn = tableCell.nColumn;
+ return ActivateFunction;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ FunctionResult ColumnSortHandler::handleMouseUp( ITableControl& i_tableControl, MouseEvent const & i_event )
+ {
+ if ( m_nActiveColumn == COL_INVALID )
+ return SkipFunction;
+
+ TableCell const tableCell( i_tableControl.hitTest( i_event.GetPosPixel() ) );
+ if ( ( tableCell.nRow == ROW_COL_HEADERS ) && ( tableCell.nColumn == m_nActiveColumn ) )
+ {
+ ITableDataSort* pSort = i_tableControl.getModel()->getSortAdapter();
+ ENSURE_OR_RETURN( pSort != NULL, "ColumnSortHandler::handleMouseUp: somebody is mocking with us!", DeactivateFunction );
+ // in handleMousButtonDown, the model claimed to have sort support ...
+
+ ColumnSortDirection eSortDirection = ColumnSortAscending;
+ ColumnSort const aCurrentSort = pSort->getCurrentSortOrder();
+ if ( aCurrentSort.nColumnPos == m_nActiveColumn )
+ // invert existing sort order
+ eSortDirection = ( aCurrentSort.eSortDirection == ColumnSortAscending ) ? ColumnSortDescending : ColumnSortAscending;
+
+ pSort->sortByColumn( m_nActiveColumn, eSortDirection );
+ }
+
+ m_nActiveColumn = COL_INVALID;
+ return DeactivateFunction;
+ }
+
+//......................................................................................................................
+} } // namespace svt::table
+//......................................................................................................................
diff --git a/svtools/source/table/mousefunction.hxx b/svtools/source/table/mousefunction.hxx
new file mode 100755
index 000000000000..2149026a0923
--- /dev/null
+++ b/svtools/source/table/mousefunction.hxx
@@ -0,0 +1,161 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SVTOOLS_MOUSEFUNCTION_HXX
+#define SVTOOLS_MOUSEFUNCTION_HXX
+
+#include "svtools/table/tabletypes.hxx"
+
+#include <rtl/ref.hxx>
+
+#include <boost/noncopyable.hpp>
+
+class MouseEvent;
+
+//......................................................................................................................
+namespace svt { namespace table
+{
+//......................................................................................................................
+
+ class ITableControl;
+
+ //==================================================================================================================
+ //= FunctionResult
+ //==================================================================================================================
+ enum FunctionResult
+ {
+ ActivateFunction,
+ ContinueFunction,
+ DeactivateFunction,
+
+ SkipFunction
+ };
+
+ //==================================================================================================================
+ //= IMouseFunction
+ //==================================================================================================================
+ class IMouseFunction : public ::rtl::IReference, public ::boost::noncopyable
+ {
+ public:
+ virtual FunctionResult handleMouseMove( ITableControl& i_tableControl, MouseEvent const & i_event ) = 0;
+ virtual FunctionResult handleMouseDown( ITableControl& i_tableControl, MouseEvent const & i_event ) = 0;
+ virtual FunctionResult handleMouseUp( ITableControl& i_tableControl, MouseEvent const & i_event ) = 0;
+
+ protected:
+ virtual ~IMouseFunction() { }
+ };
+
+ //==================================================================================================================
+ //= MouseFunction
+ //==================================================================================================================
+ class MouseFunction : public IMouseFunction
+ {
+ public:
+ MouseFunction()
+ :m_refCount( 0 )
+ {
+ }
+ protected:
+ ~MouseFunction()
+ {
+ }
+
+ public:
+ virtual oslInterlockedCount SAL_CALL acquire();
+ virtual oslInterlockedCount SAL_CALL release();
+
+ private:
+ oslInterlockedCount m_refCount;
+ };
+
+ //==================================================================================================================
+ //= ColumnResize
+ //==================================================================================================================
+ class ColumnResize : public MouseFunction
+ {
+ public:
+ ColumnResize()
+ :m_nResizingColumn( COL_INVALID )
+ {
+ }
+
+ public:
+ // IMouseFunction
+ virtual FunctionResult handleMouseMove( ITableControl& i_tableControl, MouseEvent const & i_event );
+ virtual FunctionResult handleMouseDown( ITableControl& i_tableControl, MouseEvent const & i_event );
+ virtual FunctionResult handleMouseUp( ITableControl& i_tableControl, MouseEvent const & i_event );
+
+ private:
+ ColPos m_nResizingColumn;
+ };
+
+ //==================================================================================================================
+ //= RowSelection
+ //==================================================================================================================
+ class RowSelection : public MouseFunction
+ {
+ public:
+ RowSelection()
+ :m_bActive( false )
+ {
+ }
+
+ public:
+ // IMouseFunction
+ virtual FunctionResult handleMouseMove( ITableControl& i_tableControl, MouseEvent const & i_event );
+ virtual FunctionResult handleMouseDown( ITableControl& i_tableControl, MouseEvent const & i_event );
+ virtual FunctionResult handleMouseUp( ITableControl& i_tableControl, MouseEvent const & i_event );
+
+ private:
+ bool m_bActive;
+ };
+
+ //==================================================================================================================
+ //= ColumnSortHandler
+ //==================================================================================================================
+ class ColumnSortHandler : public MouseFunction
+ {
+ public:
+ ColumnSortHandler()
+ :m_nActiveColumn( COL_INVALID )
+ {
+ }
+
+ public:
+ // IMouseFunction
+ virtual FunctionResult handleMouseMove( ITableControl& i_tableControl, MouseEvent const & i_event );
+ virtual FunctionResult handleMouseDown( ITableControl& i_tableControl, MouseEvent const & i_event );
+ virtual FunctionResult handleMouseUp( ITableControl& i_tableControl, MouseEvent const & i_event );
+
+ private:
+ ColPos m_nActiveColumn;
+ };
+
+//......................................................................................................................
+} } // namespace svt::table
+//......................................................................................................................
+
+#endif // SVTOOLS_MOUSEFUNCTION_HXX
diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx
index 33c80e642118..01a9b667a8f7 100644
--- a/svtools/source/table/tablecontrol.cxx
+++ b/svtools/source/table/tablecontrol.cxx
@@ -28,55 +28,39 @@
#include "precompiled_svtools.hxx"
#include "svtools/table/tablecontrol.hxx"
+
#include "tablegeometry.hxx"
#include "tablecontrol_impl.hxx"
-#include "accessibletableimp.hxx"
-#include "svtools/table/tabledatawindow.hxx"
+#include "tabledatawindow.hxx"
+
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <tools/diagnose_ex.h>
+
using namespace ::com::sun::star::uno;
using ::com::sun::star::accessibility::XAccessible;
using namespace ::com::sun::star::accessibility;
using namespace ::com::sun::star::lang;
using namespace utl;
-//using namespace rtl;
-//........................................................................
+
+//......................................................................................................................
namespace svt { namespace table
{
- //====================================================================
- //= AccessibleTableControl_Impl
- //====================================================================
- // ----------------------------------------------------------------------------
- Reference< XAccessible > AccessibleTableControl_Impl::getAccessibleTableHeader( AccessibleTableControlObjType _eObjType )
- {
- if ( m_pAccessible && m_pAccessible->isAlive() )
- return m_pAccessible->getTableHeader( _eObjType );
- return NULL;
- }
- // ----------------------------------------------------------------------------
- Reference< XAccessible > AccessibleTableControl_Impl::getAccessibleTable( )
- {
- if ( m_pAccessible && m_pAccessible->isAlive() )
- return m_pAccessible->getTable( );
- return NULL;
- }
+//......................................................................................................................
- //====================================================================
+ //==================================================================================================================
//= TableControl
- //====================================================================
- //--------------------------------------------------------------------
+ //==================================================================================================================
+ // -----------------------------------------------------------------------------------------------------------------
TableControl::TableControl( Window* _pParent, WinBits _nStyle )
:Control( _pParent, _nStyle )
,m_pImpl( new TableControl_Impl( *this ) )
- ,m_bSelectionChanged(false)
- ,m_bTooltip(false)
{
- TableDataWindow* aTableData = m_pImpl->getDataWindow();
- aTableData->SetMouseButtonDownHdl( LINK( this, TableControl, ImplMouseButtonDownHdl ) );
- aTableData->SetMouseButtonUpHdl( LINK( this, TableControl, ImplMouseButtonUpHdl ) );
- aTableData->SetSelectHdl( LINK( this, TableControl, ImplSelectHdl ) );
- m_pAccessTable.reset(new ::svt::table::AccessibleTableControl_Impl());
+ TableDataWindow& rDataWindow = m_pImpl->getDataWindow();
+ rDataWindow.SetMouseButtonDownHdl( LINK( this, TableControl, ImplMouseButtonDownHdl ) );
+ rDataWindow.SetMouseButtonUpHdl( LINK( this, TableControl, ImplMouseButtonUpHdl ) );
+ rDataWindow.SetSelectHdl( LINK( this, TableControl, ImplSelectHdl ) );
// by default, use the background as determined by the style settings
const Color aWindowColor( GetSettings().GetStyleSettings().GetFieldColor() );
@@ -84,51 +68,39 @@ namespace svt { namespace table
SetFillColor( aWindowColor );
}
- //--------------------------------------------------------------------
+ // -----------------------------------------------------------------------------------------------------------------
TableControl::~TableControl()
{
ImplCallEventListeners( VCLEVENT_OBJECT_DYING );
- DELETEZ( m_pImpl );
- if ( m_pAccessTable->m_pAccessible )
- {
- m_pAccessTable->m_pAccessible->dispose();
- }
+
+ m_pImpl->setModel( PTableModel() );
+ m_pImpl->disposeAccessible();
+ m_pImpl.reset();
}
- //--------------------------------------------------------------------
+ // -----------------------------------------------------------------------------------------------------------------
void TableControl::GetFocus()
{
if ( !m_pImpl->getInputHandler()->GetFocus( *m_pImpl ) )
- {
Control::GetFocus();
- Control::GrabFocus();
- }
}
- //--------------------------------------------------------------------
+ // -----------------------------------------------------------------------------------------------------------------
void TableControl::LoseFocus()
{
if ( !m_pImpl->getInputHandler()->LoseFocus( *m_pImpl ) )
Control::LoseFocus();
}
- //--------------------------------------------------------------------
+ // -----------------------------------------------------------------------------------------------------------------
void TableControl::KeyInput( const KeyEvent& rKEvt )
{
if ( !m_pImpl->getInputHandler()->KeyInput( *m_pImpl, rKEvt ) )
Control::KeyInput( rKEvt );
- else
- {
- if(m_bSelectionChanged)
- {
- Select();
- m_bSelectionChanged = false;
- }
- }
}
- //--------------------------------------------------------------------
+ // -----------------------------------------------------------------------------------------------------------------
void TableControl::StateChanged( StateChangedType i_nStateChange )
{
Control::StateChanged( i_nStateChange );
@@ -138,156 +110,180 @@ namespace svt { namespace table
{
case STATE_CHANGE_CONTROLBACKGROUND:
if ( IsControlBackground() )
- getDataWindow()->SetControlBackground( GetControlBackground() );
+ getDataWindow().SetControlBackground( GetControlBackground() );
else
- getDataWindow()->SetControlBackground();
+ getDataWindow().SetControlBackground();
break;
case STATE_CHANGE_CONTROLFOREGROUND:
if ( IsControlForeground() )
- getDataWindow()->SetControlForeground( GetControlForeground() );
+ getDataWindow().SetControlForeground( GetControlForeground() );
else
- getDataWindow()->SetControlForeground();
+ getDataWindow().SetControlForeground();
break;
case STATE_CHANGE_CONTROLFONT:
if ( IsControlFont() )
- getDataWindow()->SetControlFont( GetControlFont() );
+ getDataWindow().SetControlFont( GetControlFont() );
else
- getDataWindow()->SetControlFont();
+ getDataWindow().SetControlFont();
break;
}
}
- //--------------------------------------------------------------------
+ // -----------------------------------------------------------------------------------------------------------------
void TableControl::Resize()
{
Control::Resize();
m_pImpl->onResize();
}
- //--------------------------------------------------------------------
+ // -----------------------------------------------------------------------------------------------------------------
void TableControl::SetModel( PTableModel _pModel )
{
m_pImpl->setModel( _pModel );
}
- //--------------------------------------------------------------------
+ // -----------------------------------------------------------------------------------------------------------------
PTableModel TableControl::GetModel() const
{
return m_pImpl->getModel();
}
- //--------------------------------------------------------------------
+ // -----------------------------------------------------------------------------------------------------------------
RowPos TableControl::GetTopRow() const
{
return m_pImpl->getTopRow();
}
- //--------------------------------------------------------------------
+ // -----------------------------------------------------------------------------------------------------------------
void TableControl::SetTopRow( RowPos _nRow )
{
- // TODO
- (void)_nRow;
+ OSL_ENSURE( false, "TableControl::SetTopRow: not implemented!" );
+ OSL_UNUSED( _nRow );
}
- //--------------------------------------------------------------------
+ // -----------------------------------------------------------------------------------------------------------------
sal_Int32 TableControl::GetCurrentRow() const
{
- return m_pImpl->getCurRow();
+ return m_pImpl->getCurrentRow();
}
- //--------------------------------------------------------------------
+ // -----------------------------------------------------------------------------------------------------------------
sal_Int32 TableControl::GetCurrentColumn() const
{
- return m_pImpl->getCurColumn();
+ return m_pImpl->getCurrentColumn();
}
- //--------------------------------------------------------------------
+ // -----------------------------------------------------------------------------------------------------------------
bool TableControl::GoTo( ColPos _nColumn, RowPos _nRow )
{
return m_pImpl->goTo( _nColumn, _nRow );
}
- //--------------------------------------------------------------------
+
+ // -----------------------------------------------------------------------------------------------------------------
sal_Bool TableControl::GoToCell(sal_Int32 _nColPos, sal_Int32 _nRowPos)
{
return m_pImpl->goTo( _nColPos, _nRowPos );
}
- //--------------------------------------------------------------------
- void TableControl::clearSelection()
+
+ //------------------------------------------------------------------------------------------------------------------
+ sal_Int32 TableControl::GetSelectedRowCount() const
+ {
+ return sal_Int32( m_pImpl->getSelectedRowCount() );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ sal_Int32 TableControl::GetSelectedRowIndex( sal_Int32 const i_selectionIndex ) const
{
- m_pImpl->clearSelection();
+ return sal_Int32( m_pImpl->getSelectedRowIndex( i_selectionIndex ) );
}
- //--------------------------------------------------------------------
- void TableControl::InvalidateDataWindow(RowPos _nRowStart, RowPos _nRowEnd, bool _bRemoved)
+
+ //------------------------------------------------------------------------------------------------------------------
+ bool TableControl::IsRowSelected( sal_Int32 const i_rowIndex ) const
{
- Rectangle _rRect;
- if(_bRemoved)
- m_pImpl->invalidateRows();
+ return m_pImpl->isRowSelected( i_rowIndex );
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ void TableControl::SelectRow( RowPos const i_rowIndex, bool const i_select )
+ {
+ ENSURE_OR_RETURN_VOID( ( i_rowIndex >= 0 ) && ( i_rowIndex < m_pImpl->getModel()->getRowCount() ),
+ "TableControl::SelectRow: no control (anymore)!" );
+
+ if ( i_select )
+ {
+ if ( !m_pImpl->markRowAsSelected( i_rowIndex ) )
+ // nothing to do
+ return;
+ }
else
{
- if(m_bSelectionChanged)
- {
- m_pImpl->invalidateSelectedRegion(_nRowStart, _nRowEnd, _rRect);
- m_bSelectionChanged = false;
- }
- else
- m_pImpl->invalidateRow(_nRowStart, _rRect);
+ m_pImpl->markRowAsDeselected( i_rowIndex );
}
+
+ m_pImpl->invalidateRowRange( i_rowIndex, i_rowIndex );
+ Select();
}
- //--------------------------------------------------------------------
- std::vector<sal_Int32>& TableControl::GetSelectedRows()
- {
- return m_pImpl->getSelectedRows();
- }
- //--------------------------------------------------------------------
- void TableControl::RemoveSelectedRow(RowPos _nRowPos)
+
+ // -----------------------------------------------------------------------------------------------------------------
+ void TableControl::SelectAllRows( bool const i_select )
{
- m_pImpl->removeSelectedRow(_nRowPos);
+ if ( i_select )
+ {
+ if ( !m_pImpl->markAllRowsAsSelected() )
+ // nothing to do
+ return;
+ }
+ else
+ {
+ if ( !m_pImpl->markAllRowsAsDeselected() )
+ // nothing to do
+ return;
+ }
+
+
+ Invalidate();
+ // TODO: can't we do better than this, and invalidate only the rows which changed?
+ Select();
}
- //--------------------------------------------------------------------
- RowPos TableControl::GetCurrentRow(const Point& rPoint)
+ // -----------------------------------------------------------------------------------------------------------------
+ ITableControl& TableControl::getTableControlInterface()
{
- return m_pImpl->getCurrentRow( rPoint );
+ return *m_pImpl;
}
+ // -----------------------------------------------------------------------------------------------------------------
SelectionEngine* TableControl::getSelEngine()
{
return m_pImpl->getSelEngine();
}
- TableDataWindow* TableControl::getDataWindow()
+ // -----------------------------------------------------------------------------------------------------------------
+ Window& TableControl::getDataWindow()
{
return m_pImpl->getDataWindow();
}
+ // -----------------------------------------------------------------------------------------------------------------
Reference< XAccessible > TableControl::CreateAccessible()
{
Window* pParent = GetAccessibleParentWindow();
- DBG_ASSERT( pParent, "TableControl::CreateAccessible - parent not found" );
+ ENSURE_OR_RETURN( pParent, "TableControl::CreateAccessible - parent not found", NULL );
- if( pParent && !m_pAccessTable->m_pAccessible)
- {
- Reference< XAccessible > xAccParent = pParent->GetAccessible();
- if( xAccParent.is() )
- {
- m_pAccessTable->m_pAccessible = getAccessibleFactory().createAccessibleTableControl(
- xAccParent, *this
- );
- }
- }
- Reference< XAccessible > xAccessible;
- if ( m_pAccessTable->m_pAccessible )
- xAccessible = m_pAccessTable->m_pAccessible->getMyself();
- return xAccessible;
+ return m_pImpl->getAccessible( *pParent );
}
+
+ // -----------------------------------------------------------------------------------------------------------------
Reference<XAccessible> TableControl::CreateAccessibleControl( sal_Int32 _nIndex )
{
(void)_nIndex;
- DBG_ASSERT( FALSE, "TableControl::CreateAccessibleControl: to be overwritten!" );
+ DBG_ASSERT( sal_False, "TableControl::CreateAccessibleControl: to be overwritten!" );
return NULL;
}
+
+ // -----------------------------------------------------------------------------------------------------------------
::rtl::OUString TableControl::GetAccessibleObjectName( AccessibleTableControlObjType eObjType, sal_Int32 _nRow, sal_Int32 _nCol) const
{
::rtl::OUString aRetText;
@@ -320,309 +316,297 @@ namespace svt { namespace table
}
return aRetText;
}
-// -----------------------------------------------------------------------------
-::rtl::OUString TableControl::GetAccessibleObjectDescription( AccessibleTableControlObjType eObjType, sal_Int32 ) const
-{
- ::rtl::OUString aRetText;
- switch( eObjType )
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString TableControl::GetAccessibleObjectDescription( AccessibleTableControlObjType eObjType, sal_Int32 ) const
{
- case TCTYPE_GRIDCONTROL:
- aRetText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "GridControl description" ) );
- break;
- case TCTYPE_TABLE:
- aRetText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TABLE description" ) );
- break;
- case TCTYPE_ROWHEADERBAR:
- aRetText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ROWHEADERBAR description" ) );
- break;
- case TCTYPE_COLUMNHEADERBAR:
- aRetText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "COLUMNHEADERBAR description" ) );
- break;
- case TCTYPE_TABLECELL:
- aRetText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TABLECELL description" ) );
- break;
- case TCTYPE_ROWHEADERCELL:
- aRetText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ROWHEADERCELL description" ) );
- break;
- case TCTYPE_COLUMNHEADERCELL:
- aRetText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "COLUMNHEADERCELL description" ) );
- break;
+ ::rtl::OUString aRetText;
+ switch( eObjType )
+ {
+ case TCTYPE_GRIDCONTROL:
+ aRetText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "GridControl description" ) );
+ break;
+ case TCTYPE_TABLE:
+ aRetText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TABLE description" ) );
+ break;
+ case TCTYPE_ROWHEADERBAR:
+ aRetText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ROWHEADERBAR description" ) );
+ break;
+ case TCTYPE_COLUMNHEADERBAR:
+ aRetText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "COLUMNHEADERBAR description" ) );
+ break;
+ case TCTYPE_TABLECELL:
+ aRetText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TABLECELL description" ) );
+ break;
+ case TCTYPE_ROWHEADERCELL:
+ aRetText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ROWHEADERCELL description" ) );
+ break;
+ case TCTYPE_COLUMNHEADERCELL:
+ aRetText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "COLUMNHEADERCELL description" ) );
+ break;
+ }
+ return aRetText;
}
- return aRetText;
-}
-// -----------------------------------------------------------------------------
-::rtl::OUString TableControl::GetRowDescription( sal_Int32 _nRow) const
-{
- (void)_nRow;
- return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "row description" ) );
-}
-// -----------------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString TableControl::GetRowDescription( sal_Int32 _nRow) const
+ {
+ (void)_nRow;
+ return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "row description" ) );
+ }
-::rtl::OUString TableControl::GetRowName( sal_Int32 _nIndex) const
-{
- return GetModel()->getRowHeaderName()[_nIndex];
-}
-// -----------------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString TableControl::GetRowName( sal_Int32 _nIndex) const
+ {
+ ::rtl::OUString sRowName;
+ GetModel()->getRowHeading( _nIndex ) >>= sRowName;
+ return sRowName;
+ }
-::rtl::OUString TableControl::GetColumnDescription( sal_uInt16 _nColumn) const
-{
- (void)_nColumn;
- return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "col description" ) );
-}
-// -----------------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString TableControl::GetColumnDescription( sal_uInt16 _nColumn) const
+ {
+ (void)_nColumn;
+ return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "col description" ) );
+ }
-::rtl::OUString TableControl::GetColumnName( sal_Int32 _nIndex) const
-{
- return GetModel()->getColumnModel(_nIndex)->getName();
-}
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString TableControl::GetColumnName( sal_Int32 _nIndex) const
+ {
+ return GetModel()->getColumnModel(_nIndex)->getName();
+ }
-// -----------------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ ::com::sun::star::uno::Any TableControl::GetCellContent( sal_Int32 _nRowPos, sal_Int32 _nColPos ) const
+ {
+ Any aCellContent;
+ GetModel()->getCellContent( _nColPos, _nRowPos, aCellContent );
+ return aCellContent;
+ }
-::com::sun::star::uno::Any TableControl::GetCellContent( sal_Int32 _nRowPos, sal_Int32 _nColPos) const
-{
- ::com::sun::star::uno::Any cellContent(::com::sun::star::uno::Any(::rtl::OUString::createFromAscii("")));
- std::vector<std::vector< ::com::sun::star::uno::Any > >& aTableContent = GetModel()->getCellContent();
- if(&aTableContent)
- cellContent = aTableContent[_nRowPos][_nColPos];
- return cellContent;
-}
-// -----------------------------------------------------------------------------
-
-::rtl::OUString TableControl::GetAccessibleCellText( sal_Int32 _nRowPos, sal_Int32 _nColPos) const
-{
- const ::com::sun::star::uno::Any cellContent = GetCellContent(_nRowPos, _nColPos);
- return m_pImpl->convertToString(cellContent);
-}
-// -----------------------------------------------------------------------------
-
-void TableControl::FillAccessibleStateSet(
- ::utl::AccessibleStateSetHelper& rStateSet,
- AccessibleTableControlObjType eObjType ) const
-{
- switch( eObjType )
- {
- case TCTYPE_GRIDCONTROL:
- case TCTYPE_TABLE:
-
- rStateSet.AddState( AccessibleStateType::FOCUSABLE );
- rStateSet.AddState( AccessibleStateType::MULTI_SELECTABLE);
- if ( HasFocus() )
- rStateSet.AddState( AccessibleStateType::FOCUSED );
- if ( IsActive() )
- rStateSet.AddState( AccessibleStateType::ACTIVE );
- if ( IsEnabled() )
- rStateSet.AddState( AccessibleStateType::ENABLED );
- if ( IsReallyVisible() )
- rStateSet.AddState( AccessibleStateType::VISIBLE );
- rStateSet.AddState( AccessibleStateType::MANAGES_DESCENDANTS );
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString TableControl::GetAccessibleCellText( sal_Int32 _nRowPos, sal_Int32 _nColPos) const
+ {
+ return m_pImpl->getCellContentAsString( _nRowPos, _nColPos );
+ }
- break;
- case TCTYPE_ROWHEADERBAR:
- rStateSet.AddState( AccessibleStateType::VISIBLE );
- rStateSet.AddState( AccessibleStateType::MANAGES_DESCENDANTS );
- break;
- case TCTYPE_COLUMNHEADERBAR:
- rStateSet.AddState( AccessibleStateType::VISIBLE );
- rStateSet.AddState( AccessibleStateType::MANAGES_DESCENDANTS );
- break;
- case TCTYPE_TABLECELL:
- {
+ //------------------------------------------------------------------------------------------------------------------
+ void TableControl::FillAccessibleStateSet(
+ ::utl::AccessibleStateSetHelper& rStateSet,
+ AccessibleTableControlObjType eObjType ) const
+ {
+ switch( eObjType )
+ {
+ case TCTYPE_GRIDCONTROL:
+ case TCTYPE_TABLE:
+
+ rStateSet.AddState( AccessibleStateType::FOCUSABLE );
+ rStateSet.AddState( AccessibleStateType::MULTI_SELECTABLE);
+ if ( HasFocus() )
+ rStateSet.AddState( AccessibleStateType::FOCUSED );
+ if ( IsActive() )
+ rStateSet.AddState( AccessibleStateType::ACTIVE );
+ if ( IsEnabled() )
+ rStateSet.AddState( AccessibleStateType::ENABLED );
+ if ( IsReallyVisible() )
+ rStateSet.AddState( AccessibleStateType::VISIBLE );
+ rStateSet.AddState( AccessibleStateType::MANAGES_DESCENDANTS );
+
+ break;
+ case TCTYPE_ROWHEADERBAR:
+ rStateSet.AddState( AccessibleStateType::VISIBLE );
+ rStateSet.AddState( AccessibleStateType::MANAGES_DESCENDANTS );
+ break;
+ case TCTYPE_COLUMNHEADERBAR:
+ rStateSet.AddState( AccessibleStateType::VISIBLE );
+ rStateSet.AddState( AccessibleStateType::MANAGES_DESCENDANTS );
+ break;
+ case TCTYPE_TABLECELL:
+ {
+ rStateSet.AddState( AccessibleStateType::TRANSIENT );
+ rStateSet.AddState( AccessibleStateType::SELECTABLE);
+ if( GetSelectedRowCount()>0)
+ rStateSet.AddState( AccessibleStateType::SELECTED);
+ }
+ break;
+ case TCTYPE_ROWHEADERCELL:
+ rStateSet.AddState( AccessibleStateType::VISIBLE );
rStateSet.AddState( AccessibleStateType::TRANSIENT );
- rStateSet.AddState( AccessibleStateType::SELECTABLE);
- if( GetSelectedRowCount()>0)
- rStateSet.AddState( AccessibleStateType::SELECTED);
- }
- break;
- case TCTYPE_ROWHEADERCELL:
- rStateSet.AddState( AccessibleStateType::VISIBLE );
- rStateSet.AddState( AccessibleStateType::TRANSIENT );
- break;
- case TCTYPE_COLUMNHEADERCELL:
- rStateSet.AddState( AccessibleStateType::VISIBLE );
- break;
+ break;
+ case TCTYPE_COLUMNHEADERCELL:
+ rStateSet.AddState( AccessibleStateType::VISIBLE );
+ break;
+ }
}
-}
-Rectangle TableControl::GetWindowExtentsRelative( Window *pRelativeWindow ) const
-{
- return Control::GetWindowExtentsRelative( pRelativeWindow );
-}
-//-----------------------------------------------------------------------------
-void TableControl::GrabFocus()
-{
- Control::GrabFocus();
-}
-// -----------------------------------------------------------------------------
-Reference< XAccessible > TableControl::GetAccessible( BOOL bCreate )
-{
- return Control::GetAccessible( bCreate );
-}
-// -----------------------------------------------------------------------------
-Window* TableControl::GetAccessibleParentWindow() const
-{
- return Control::GetAccessibleParentWindow();
-}
-// -----------------------------------------------------------------------------
-Window* TableControl::GetWindowInstance()
-{
- return this;
-}
+ //------------------------------------------------------------------------------------------------------------------
+ Rectangle TableControl::GetWindowExtentsRelative( Window *pRelativeWindow ) const
+ {
+ return Control::GetWindowExtentsRelative( pRelativeWindow );
+ }
-sal_Bool TableControl::HasRowHeader()
-{
- return GetModel()->hasRowHeaders();
-}
-//--------------------------------------------------------------------------------
-sal_Bool TableControl::HasColHeader()
-{
- return GetModel()->hasColumnHeaders();
-}
-//--------------------------------------------------------------------------------
-sal_Int32 TableControl::GetAccessibleControlCount() const
-{
- sal_Int32 count = 0;
- if(GetRowCount()>0)
- count+=1;
- if(GetModel()->hasRowHeaders())
- count+=1;
- if(GetModel()->hasColumnHeaders())
- count+=1;
- return count;
-}
-sal_Bool TableControl::ConvertPointToControlIndex( sal_Int32& _rnIndex, const Point& _rPoint )
-{
- sal_Int32 nRow = m_pImpl->getCurrentRow(_rPoint);
- sal_Int32 nCol = GetCurrentColumn();
- _rnIndex = nRow * GetColumnCount() + nCol;
- return nRow>=0 ? sal_True : sal_False;
-}
+ //------------------------------------------------------------------------------------------------------------------
+ void TableControl::GrabFocus()
+ {
+ Control::GrabFocus();
+ }
-long TableControl::GetRowCount() const
-{
- return m_pImpl->getRowCount();
-}
-long TableControl::GetColumnCount() const
-{
- return m_pImpl->getColumnCount();
-}
-sal_Bool TableControl::HasRowHeader() const
-{
- PTableModel pModel = GetModel();
- return pModel->hasRowHeaders();
-}
-sal_Int32 TableControl::GetSelectedRowCount() const
-{
- return m_pImpl->getSelectedRows().size();
-}
-bool TableControl::IsRowSelected( long _nRow ) const
-{
- return m_pImpl->isRowSelected(m_pImpl->getSelectedRows(), _nRow);
-}
-sal_Bool TableControl::ConvertPointToCellAddress( sal_Int32& _rnRow, sal_Int32& _rnColPos, const Point& _rPoint )
-{
- _rnRow = m_pImpl->getCurrentRow(_rPoint);
- _rnColPos = GetCurrentColumn();
- return _rnRow>=0 ? sal_True : sal_False;
-}
-void TableControl::FillAccessibleStateSetForCell( ::utl::AccessibleStateSetHelper& _rStateSet, sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const
-{
- if ( GetCurrentRow() == _nRow && GetCurrentColumn() == _nColumnPos )
- _rStateSet.AddState( AccessibleStateType::FOCUSED );
- else // only transient when column is not focused
- _rStateSet.AddState( AccessibleStateType::TRANSIENT );
-}
-Rectangle TableControl::GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex)
-{
- (void)_nRow;
- (void)_nColumnPos;
- return GetCharacterBounds(nIndex);
-}
-sal_Int32 TableControl::GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint)
-{
- (void)_nRow;
- (void)_nColumnPos;
- return GetIndexForPoint(_rPoint);
-;
-}
- // -----------------------------------------------------------------------------
-sal_Bool TableControl::isAccessibleAlive( ) const
-{
- return ( NULL != m_pAccessTable->m_pAccessible ) && m_pAccessTable->m_pAccessible->isAlive();
-}
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XAccessible > TableControl::GetAccessible( sal_Bool bCreate )
+ {
+ return Control::GetAccessible( bCreate );
+ }
-// -----------------------------------------------------------------------------
-::svt::IAccessibleFactory& TableControl::getAccessibleFactory()
-{
- return m_pAccessTable->m_aFactoryAccess.getFactory();
-}
-// -----------------------------------------------------------------------------
-void TableControl::commitGridControlEvent( sal_Int16 _nEventId, const Any& _rNewValue, const Any& _rOldValue )
-{
- if ( isAccessibleAlive() )
- m_pAccessTable->m_pAccessible->commitEvent( _nEventId, _rNewValue, _rOldValue);
-}
-// -----------------------------------------------------------------------------
-Rectangle TableControl::calcHeaderRect(sal_Bool _bIsColumnBar,BOOL _bOnScreen)
-{
- (void)_bOnScreen;
- return m_pImpl->calcHeaderRect(_bIsColumnBar);
-}
-// -----------------------------------------------------------------------------
-Rectangle TableControl::calcTableRect(BOOL _bOnScreen)
-{
- (void)_bOnScreen;
- return m_pImpl->calcTableRect();
-}
-//--------------------------------------------------------------------
-::com::sun::star::uno::Sequence< sal_Int32 >& TableControl::getColumnsForTooltip()
-{
- return m_nCols;
-}
-//--------------------------------------------------------------------
-::com::sun::star::uno::Sequence< ::rtl::OUString >& TableControl::getTextForTooltip()
-{
- return m_aText;
-}
-//--------------------------------------------------------------------
-void TableControl::setTooltip(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aText, const ::com::sun::star::uno::Sequence< sal_Int32 >& nCols )
-{
- m_aText = aText;
- m_nCols = nCols;
- m_bTooltip = true;
-}
-// -----------------------------------------------------------------------
-void TableControl::selectionChanged(bool _bChanged)
-{
- m_bSelectionChanged = _bChanged;
-}
-// -----------------------------------------------------------------------
-bool TableControl::isTooltip()
-{
- return m_bTooltip;
-}
-// -----------------------------------------------------------------------
-IMPL_LINK( TableControl, ImplSelectHdl, void*, EMPTYARG )
-{
- Select();
- return 1;
-}
-IMPL_LINK( TableControl, ImplMouseButtonDownHdl, MouseEvent*, pData )
-{
- CallEventListeners( VCLEVENT_WINDOW_MOUSEBUTTONDOWN, pData );
- return 1;
-}
-IMPL_LINK( TableControl, ImplMouseButtonUpHdl, MouseEvent*, pData )
-{
- CallEventListeners( VCLEVENT_WINDOW_MOUSEBUTTONUP, pData );
- return 1;
-}
-// -----------------------------------------------------------------------
-void TableControl::Select()
-{
- ImplCallEventListenersAndHandler( VCLEVENT_TABLEROW_SELECT, m_aSelectHdl, this );
-}
-//........................................................................
+ //------------------------------------------------------------------------------------------------------------------
+ Window* TableControl::GetAccessibleParentWindow() const
+ {
+ return Control::GetAccessibleParentWindow();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Window* TableControl::GetWindowInstance()
+ {
+ return this;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ sal_Bool TableControl::HasRowHeader()
+ {
+ return GetModel()->hasRowHeaders();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ sal_Bool TableControl::HasColHeader()
+ {
+ return GetModel()->hasColumnHeaders();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ sal_Int32 TableControl::GetAccessibleControlCount() const
+ {
+ sal_Int32 count = 0;
+ if(GetRowCount()>0)
+ count+=1;
+ if(GetModel()->hasRowHeaders())
+ count+=1;
+ if(GetModel()->hasColumnHeaders())
+ count+=1;
+ return count;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ sal_Bool TableControl::ConvertPointToControlIndex( sal_Int32& _rnIndex, const Point& _rPoint )
+ {
+ sal_Int32 nRow = m_pImpl->getRowAtPoint( _rPoint );
+ sal_Int32 nCol = m_pImpl->getColAtPoint( _rPoint );
+ _rnIndex = nRow * GetColumnCount() + nCol;
+ return nRow >= 0 ? sal_True : sal_False;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ long TableControl::GetRowCount() const
+ {
+ return GetModel()->getRowCount();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ long TableControl::GetColumnCount() const
+ {
+ return GetModel()->getColumnCount();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ sal_Bool TableControl::HasRowHeader() const
+ {
+ return GetModel()->hasRowHeaders();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ sal_Bool TableControl::ConvertPointToCellAddress( sal_Int32& _rnRow, sal_Int32& _rnColPos, const Point& _rPoint )
+ {
+ _rnRow = m_pImpl->getRowAtPoint( _rPoint );
+ _rnColPos = m_pImpl->getColAtPoint( _rPoint );
+ return _rnRow >= 0 ? sal_True : sal_False;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TableControl::FillAccessibleStateSetForCell( ::utl::AccessibleStateSetHelper& _rStateSet, sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const
+ {
+ if ( GetCurrentRow() == _nRow && GetCurrentColumn() == _nColumnPos )
+ _rStateSet.AddState( AccessibleStateType::FOCUSED );
+ else // only transient when column is not focused
+ _rStateSet.AddState( AccessibleStateType::TRANSIENT );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Rectangle TableControl::GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex)
+ {
+ (void)_nRow;
+ (void)_nColumnPos;
+ return GetCharacterBounds(nIndex);
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ sal_Int32 TableControl::GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint)
+ {
+ (void)_nRow;
+ (void)_nColumnPos;
+ return GetIndexForPoint(_rPoint);
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Rectangle TableControl::calcHeaderRect(sal_Bool _bIsColumnBar,sal_Bool _bOnScreen)
+ {
+ (void)_bOnScreen;
+ return m_pImpl->calcHeaderRect( _bIsColumnBar ? false : true );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Rectangle TableControl::calcTableRect(sal_Bool _bOnScreen)
+ {
+ (void)_bOnScreen;
+ return m_pImpl->calcTableRect();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ IMPL_LINK( TableControl, ImplSelectHdl, void*, EMPTYARG )
+ {
+ Select();
+ return 1;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ IMPL_LINK( TableControl, ImplMouseButtonDownHdl, MouseEvent*, pData )
+ {
+ CallEventListeners( VCLEVENT_WINDOW_MOUSEBUTTONDOWN, pData );
+ return 1;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ IMPL_LINK( TableControl, ImplMouseButtonUpHdl, MouseEvent*, pData )
+ {
+ CallEventListeners( VCLEVENT_WINDOW_MOUSEBUTTONUP, pData );
+ return 1;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TableControl::Select()
+ {
+ ImplCallEventListenersAndHandler( VCLEVENT_TABLEROW_SELECT, m_pImpl->getSelectHandler(), this );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TableControl::SetSelectHdl( const Link& i_selectHandler )
+ {
+ m_pImpl->setSelectHandler( i_selectHandler );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ const Link& TableControl::GetSelectHdl() const
+ {
+ return m_pImpl->getSelectHandler();
+ }
+
+//......................................................................................................................
}} // namespace svt::table
-//........................................................................
+//......................................................................................................................
diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx
index 6c58cb530330..8e481d27d993 100644..100755
--- a/svtools/source/table/tablecontrol_impl.cxx
+++ b/svtools/source/table/tablecontrol_impl.cxx
@@ -30,40 +30,60 @@
#include "svtools/table/tablecontrol.hxx"
#include "svtools/table/defaultinputhandler.hxx"
#include "svtools/table/tablemodel.hxx"
+
+#include "tabledatawindow.hxx"
#include "tablecontrol_impl.hxx"
#include "tablegeometry.hxx"
-#include "svtools/table/tabledatawindow.hxx"
-#include <com/sun/star/awt/XControl.hpp>
+#include "cellvalueconversion.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/AccessibleTableModelChange.hpp>
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#include <com/sun/star/accessibility/AccessibleTableModelChangeType.hpp>
+/** === end UNO includes === **/
+
+#include <comphelper/flagguard.hxx>
#include <vcl/scrbar.hxx>
#include <vcl/seleng.hxx>
#include <rtl/ref.hxx>
-#include <toolkit/awt/vclxwindow.hxx>
#include <vcl/image.hxx>
-#include <com/sun/star/graphic/XGraphic.hpp>
+#include <tools/diagnose_ex.h>
#include <functional>
-#include <stdlib.h>
-//........................................................................
+#define MIN_COLUMN_WIDTH_PIXEL 4
+
+//......................................................................................................................
namespace svt { namespace table
{
-//........................................................................
-
- //====================================================================
- //= TempHideCursor
- //====================================================================
- class TempHideCursor
+//......................................................................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::accessibility::AccessibleTableModelChange;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::accessibility::XAccessible;
+ using ::com::sun::star::uno::Reference;
+ /** === end UNO using === **/
+ namespace AccessibleEventId = ::com::sun::star::accessibility::AccessibleEventId;
+ namespace AccessibleTableModelChangeType = ::com::sun::star::accessibility::AccessibleTableModelChangeType;
+
+ //==================================================================================================================
+ //= SuppressCursor
+ //==================================================================================================================
+ class SuppressCursor
{
private:
- IAbstractTableControl& m_rTable;
+ ITableControl& m_rTable;
public:
- TempHideCursor( IAbstractTableControl& _rTable )
+ SuppressCursor( ITableControl& _rTable )
:m_rTable( _rTable )
{
m_rTable.hideCursor();
}
- ~TempHideCursor()
+ ~SuppressCursor()
{
m_rTable.showCursor();
}
@@ -102,50 +122,18 @@ namespace svt { namespace table
{
return false;
}
- virtual void setRowHeaders(bool _bRowHeaders)
- {
- (void)_bRowHeaders;
- }
- virtual void setColumnHeaders(bool _bColumnHeaders)
- {
- (void)_bColumnHeaders;
- }
- void setColumnCount(TableSize _nColCount)
- {
- (void) _nColCount;
- }
- void setRowCount(TableSize _nRowCount)
- {
- (void)_nRowCount;
- }
virtual bool isCellEditable( ColPos col, RowPos row ) const
{
(void)col;
(void)row;
return false;
}
- virtual void addTableModelListener( const PTableModelListener& listener )
- {
- (void)listener;
- // ignore
- }
- virtual void removeTableModelListener( const PTableModelListener& listener )
- {
- (void)listener;
- // ignore
- }
virtual PColumnModel getColumnModel( ColPos column )
{
DBG_ERROR( "EmptyTableModel::getColumnModel: invalid call!" );
(void)column;
return PColumnModel();
}
- virtual PColumnModel getColumnModelByID( ColumnID id )
- {
- DBG_ERROR( "EmptyTableModel::getColumnModel: invalid call!" );
- (void)id;
- return PColumnModel();
- }
virtual PTableRenderer getRenderer() const
{
return PTableRenderer();
@@ -170,83 +158,68 @@ namespace svt { namespace table
{
return 0;
}
- virtual ScrollbarVisibility getVerticalScrollbarVisibility(int , int ) const
+ virtual ScrollbarVisibility getVerticalScrollbarVisibility() const
{
- return ScrollbarShowNever;
+ return ScrollbarShowNever;
}
- virtual ScrollbarVisibility getHorizontalScrollbarVisibility(int , int ) const
+ virtual ScrollbarVisibility getHorizontalScrollbarVisibility() const
{
- return ScrollbarShowNever;
+ return ScrollbarShowNever;
+ }
+ virtual void addTableModelListener( const PTableModelListener& i_listener )
+ {
+ (void)i_listener;
+ }
+ virtual void removeTableModelListener( const PTableModelListener& i_listener )
+ {
+ (void)i_listener;
+ }
+ virtual ::boost::optional< ::Color > getLineColor() const
+ {
+ return ::boost::optional< ::Color >();
+ }
+ virtual ::boost::optional< ::Color > getHeaderBackgroundColor() const
+ {
+ return ::boost::optional< ::Color >();
+ }
+ virtual ::boost::optional< ::Color > getHeaderTextColor() const
+ {
+ return ::boost::optional< ::Color >();
+ }
+ virtual ::boost::optional< ::Color > getTextColor() const
+ {
+ return ::boost::optional< ::Color >();
+ }
+ virtual ::boost::optional< ::Color > getTextLineColor() const
+ {
+ return ::boost::optional< ::Color >();
+ }
+ virtual ::boost::optional< ::std::vector< ::Color > > getRowBackgroundColors() const
+ {
+ return ::boost::optional< ::std::vector< ::Color > >();
+ }
+ virtual ::com::sun::star::style::VerticalAlignment getVerticalAlign() const
+ {
+ return com::sun::star::style::VerticalAlignment(0);
+ }
+ virtual ITableDataSort* getSortAdapter()
+ {
+ return NULL;
+ }
+ virtual void getCellContent( ColPos const i_col, RowPos const i_row, ::com::sun::star::uno::Any& o_cellContent )
+ {
+ (void)i_row;
+ (void)i_col;
+ o_cellContent.clear();
+ }
+ virtual void getCellToolTip( ColPos const, RowPos const, ::com::sun::star::uno::Any& )
+ {
+ }
+ virtual Any getRowHeading( RowPos const i_rowPos ) const
+ {
+ (void)i_rowPos;
+ return Any();
}
- virtual bool hasVerticalScrollbar()
- {
- return false;
- }
- virtual bool hasHorizontalScrollbar()
- {
- return false;
- }
- virtual void setCellContent(const std::vector<std::vector< ::com::sun::star::uno::Any > >& )
- {
- }
- virtual ::com::sun::star::util::Color getLineColor()
- {
- return 0;
- }
- virtual void setLineColor(::com::sun::star::util::Color )
- {
- }
- virtual ::com::sun::star::util::Color getHeaderBackgroundColor()
- {
- return -1;
- }
- virtual void setHeaderBackgroundColor(::com::sun::star::util::Color )
- {
- }
- virtual ::com::sun::star::util::Color getTextColor()
- {
- return 0;
- }
- virtual void setTextColor(::com::sun::star::util::Color )
- {
- }
- virtual ::com::sun::star::util::Color getOddRowBackgroundColor()
- {
- return -1;
- }
- virtual void setOddRowBackgroundColor(::com::sun::star::util::Color )
- {
- }
- virtual ::com::sun::star::style::VerticalAlignment getVerticalAlign()
- {
- return com::sun::star::style::VerticalAlignment(0);
- }
- virtual void setVerticalAlign(com::sun::star::style::VerticalAlignment )
- {
- }
- virtual ::com::sun::star::util::Color getEvenRowBackgroundColor()
- {
- return -1;
- }
- virtual void setEvenRowBackgroundColor(::com::sun::star::util::Color )
- {
- }
- virtual std::vector<std::vector< ::com::sun::star::uno::Any > >& getCellContent()
- {
- return m_aCellContent;
- }
- virtual void setRowHeaderName(const std::vector<rtl::OUString>& )
- {
- }
- virtual std::vector<rtl::OUString>& getRowHeaderName()
- {
- aRowHeaderNames.clear();
- aRowHeaderNames.push_back(rtl::OUString::createFromAscii(""));
- return aRowHeaderNames;
- }
- private:
- std::vector<rtl::OUString> aRowHeaderNames;
- std::vector<std::vector< ::com::sun::star::uno::Any > > m_aCellContent;
};
@@ -312,7 +285,7 @@ namespace svt { namespace table
}
}
- //--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
const sal_Char* TableControl_Impl::impl_checkInvariants() const
{
if ( !m_pModel )
@@ -327,12 +300,9 @@ namespace svt { namespace table
if ( m_pModel->getRowCount() != m_nRowCount )
return "row counts are inconsistent!";
- if ( ( m_nCurColumn != COL_INVALID ) && !m_aColumnWidthsPixel.empty() && ( m_nCurColumn < 0 ) || ( m_nCurColumn >= (ColPos)m_aColumnWidthsPixel.size() ) )
+ if ( ( m_nCurColumn != COL_INVALID ) && !m_aColumnWidths.empty() && ( m_nCurColumn < 0 ) || ( m_nCurColumn >= (ColPos)m_aColumnWidths.size() ) )
return "current column is invalid!";
- if ( m_aColumnWidthsPixel.size() != m_aAccColumnWidthsPixel.size() )
- return "columnd width caches are inconsistent!";
-
if ( !lcl_checkLimitsExclusive_OrDefault_OrFallback( m_nTopRow, (RowPos)-1, m_nRowCount, getModel(), (RowPos)0 ) )
return "invalid top row value!";
@@ -348,6 +318,20 @@ namespace svt { namespace table
if ( m_pInputHandler != m_pModel->getInputHandler() )
return "input handler is not the model-provided one!";
+ // m_aSelectedRows should have reasonable content
+ {
+ if ( m_aSelectedRows.size() > size_t( m_pModel->getRowCount() ) )
+ return "there are more rows selected than actually exist";
+ for ( ::std::vector< RowPos >::const_iterator selRow = m_aSelectedRows.begin();
+ selRow != m_aSelectedRows.end();
+ ++selRow
+ )
+ {
+ if ( ( *selRow < 0 ) || ( *selRow >= m_pModel->getRowCount() ) )
+ return "a non-existent row is selected";
+ }
+ }
+
// m_nColHeaderHeightPixel consistent with the model's value?
{
TableMetrics nHeaderHeight = m_pModel->hasColumnHeaders() ? m_pModel->getColumnHeaderHeight() : 0;
@@ -373,7 +357,28 @@ namespace svt { namespace table
return "row header widths are inconsistent!";
}
- // TODO: check m_aColumnWidthsPixel and m_aAccColumnWidthsPixel
+ // m_aColumnWidths consistency
+ if ( size_t( m_nColumnCount ) != m_aColumnWidths.size() )
+ return "wrong number of cached column widths";
+
+ for ( ColumnPositions::const_iterator col = m_aColumnWidths.begin();
+ col != m_aColumnWidths.end();
+ )
+ {
+ if ( col->getEnd() < col->getStart() )
+ return "column widths: 'end' is expected to not be smaller than start";
+
+ ColumnPositions::const_iterator nextCol = col + 1;
+ if ( nextCol != m_aColumnWidths.end() )
+ if ( col->getEnd() != nextCol->getStart() )
+ return "column widths: one column's end should be the next column's start";
+ col = nextCol;
+ }
+
+ if ( m_nLeftColumn < m_nColumnCount )
+ if ( m_aColumnWidths[ m_nLeftColumn ].getStart() != m_nRowHeaderWidthPixel )
+ return "the left-most column should start immediately after the row header";
+
if ( m_nCursorHidden < 0 )
return "invalid hidden count for the cursor!";
@@ -382,6 +387,8 @@ namespace svt { namespace table
DBG_SUSPEND_INV( INV_SCROLL_POSITION );
// prevent infinite recursion
+ if ( m_nLeftColumn < 0 )
+ return "invalid left-most column index";
if ( m_pVScroll->GetThumbPos() != m_nTopRow )
return "vertical scroll bar |position| is incorrect!";
if ( m_pVScroll->GetRange().Max() != m_nRowCount )
@@ -410,44 +417,44 @@ namespace svt { namespace table
#define DBG_CHECK_ME() \
DBG_CHKTHIS( TableControl_Impl, TableControl_Impl_checkInvariants )
- //--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
TableControl_Impl::TableControl_Impl( TableControl& _rAntiImpl )
:m_rAntiImpl ( _rAntiImpl )
,m_pModel ( new EmptyTableModel )
,m_pInputHandler ( )
,m_nRowHeightPixel ( 15 )
- ,m_nColHeaderHeightPixel( 0 )
+ ,m_nColHeaderHeightPixel( 0 )
,m_nRowHeaderWidthPixel ( 0 )
,m_nColumnCount ( 0 )
,m_nRowCount ( 0 )
+ ,m_bColumnsFit ( true )
,m_nCurColumn ( COL_INVALID )
,m_nCurRow ( ROW_INVALID )
,m_nLeftColumn ( 0 )
- ,m_nTopRow ( 0 )
+ ,m_nTopRow ( 0 )
,m_nCursorHidden ( 1 )
,m_pDataWindow ( new TableDataWindow( *this ) )
- ,m_pVScroll ( NULL )
+ ,m_pVScroll ( NULL )
,m_pHScroll ( NULL )
,m_pScrollCorner ( NULL )
- ,m_pSelEngine ( )
- ,m_nRowSelected ( )
- ,m_pTableFunctionSet ( new TableFunctionSet(this ) )
- ,m_nAnchor (-1 )
- ,m_bResizing ( false )
- ,m_nResizingColumn ( 0 )
- ,m_bResizingGrid ( false )
+ ,m_pSelEngine ( )
+ ,m_aSelectedRows ( )
+ ,m_pTableFunctionSet ( new TableFunctionSet( this ) )
+ ,m_nAnchor ( -1 )
+ ,m_bUpdatingColWidths ( false )
+ ,m_pAccessibleTable ( NULL )
#if DBG_UTIL
,m_nRequiredInvariants ( INV_SCROLL_POSITION )
#endif
{
DBG_CTOR( TableControl_Impl, TableControl_Impl_checkInvariants );
- m_pSelEngine = new SelectionEngine(m_pDataWindow, m_pTableFunctionSet);
- m_pSelEngine->SetSelectionMode(SINGLE_SELECTION);
+ m_pSelEngine = new SelectionEngine( m_pDataWindow.get(), m_pTableFunctionSet );
+ m_pSelEngine->SetSelectionMode(SINGLE_SELECTION);
m_pDataWindow->SetPosPixel( Point( 0, 0 ) );
m_pDataWindow->Show();
}
- //--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
TableControl_Impl::~TableControl_Impl()
{
DBG_DTOR( TableControl_Impl, TableControl_Impl_checkInvariants );
@@ -457,35 +464,30 @@ namespace svt { namespace table
DELETEZ( m_pScrollCorner );
DELETEZ( m_pTableFunctionSet );
DELETEZ( m_pSelEngine );
- DELETEZ( m_pDataWindow );
}
- //--------------------------------------------------------------------
- PTableModel TableControl_Impl::getModel() const
- {
- if ( dynamic_cast< const EmptyTableModel* >( m_pModel.get() ) != NULL )
- // if it's an EmptyTableModel, pretend that there is no model
- return PTableModel();
-
- return m_pModel;
- }
-
- //--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
void TableControl_Impl::setModel( PTableModel _pModel )
{
DBG_CHECK_ME();
- TempHideCursor aHideCursor( *this );
+ SuppressCursor aHideCursor( *this );
+
+ if ( !!m_pModel )
+ m_pModel->removeTableModelListener( shared_from_this() );
m_pModel = _pModel;
if ( !m_pModel)
m_pModel.reset( new EmptyTableModel );
+ m_pModel->addTableModelListener( shared_from_this() );
+
m_nCurRow = ROW_INVALID;
m_nCurColumn = COL_INVALID;
// recalc some model-dependent cached info
impl_ni_updateCachedModelValues();
+ impl_ni_updateScrollbars();
// completely invalidate
m_rAntiImpl.Invalidate();
@@ -495,67 +497,308 @@ namespace svt { namespace table
if ( m_nColumnCount ) m_nCurColumn = 0;
}
- //--------------------------------------------------------------------
- void TableControl_Impl::impl_getAllVisibleCellsArea( Rectangle& _rCellArea ) const
+ //------------------------------------------------------------------------------------------------------------------
+ namespace
+ {
+ bool lcl_adjustSelectedRows( ::std::vector< RowPos >& io_selectionIndexes, RowPos const i_firstAffectedRowIndex, TableSize const i_offset )
+ {
+ bool didChanges = false;
+ for ( ::std::vector< RowPos >::iterator selPos = io_selectionIndexes.begin();
+ selPos != io_selectionIndexes.end();
+ ++selPos
+ )
+ {
+ if ( *selPos < i_firstAffectedRowIndex )
+ continue;
+ *selPos += i_offset;
+ didChanges = true;
+ }
+ return didChanges;
+ }
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TableControl_Impl::rowsInserted( RowPos i_first, RowPos i_last )
{
DBG_CHECK_ME();
+ OSL_PRECOND( i_last >= i_first, "TableControl_Impl::rowsInserted: invalid row indexes!" );
+
+ TableSize const insertedRows = i_last - i_first + 1;
+
+ // adjust selection, if necessary
+ bool const selectionChanged = lcl_adjustSelectedRows( m_aSelectedRows, i_first, insertedRows );
+
+ // adjust our cached row count
+ m_nRowCount = m_pModel->getRowCount();
+
+ // if the rows have been inserted before the current row, adjust this
+ if ( i_first <= m_nCurRow )
+ goTo( m_nCurColumn, m_nCurRow + insertedRows );
+
+ // adjust scrollbars
+ impl_ni_updateScrollbars();
+
+ // notify A1YY events
+ if ( impl_isAccessibleAlive() )
+ {
+ impl_commitAccessibleEvent( AccessibleEventId::TABLE_MODEL_CHANGED,
+ makeAny( AccessibleTableModelChange( AccessibleTableModelChangeType::INSERT, i_first, i_last, 0, m_pModel->getColumnCount() ) ),
+ Any()
+ );
+ impl_commitAccessibleEvent( AccessibleEventId::CHILD,
+ makeAny( m_pAccessibleTable->getTableHeader( TCTYPE_ROWHEADERBAR ) ),
+ Any()
+ );
- _rCellArea.Left() = 0;
- _rCellArea.Top() = 0;
+// for ( sal_Int32 i = 0 ; i <= m_pModel->getColumnCount(); ++i )
+// {
+// impl_commitAccessibleEvent(
+// CHILD,
+// makeAny( m_pAccessibleTable->getTable() ),
+// Any());
+// }
+ // Huh? What's that? We're notifying |columnCount| CHILD events here, claiming the *table* itself
+ // has been inserted. Doesn't make much sense, does it?
+ }
+
+ // schedule repaint
+ invalidateRowRange( i_first, ROW_INVALID );
+
+ // call selection handlers, if necessary
+ if ( selectionChanged )
+ m_rAntiImpl.Select();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TableControl_Impl::rowsRemoved( RowPos i_first, RowPos i_last )
+ {
+ sal_Int32 firstRemovedRow = i_first;
+ sal_Int32 lastRemovedRow = i_last;
+
+ // adjust selection, if necessary
+ bool selectionChanged = false;
+ if ( i_first == -1 )
+ {
+ selectionChanged = markAllRowsAsDeselected();
+
+ firstRemovedRow = 0;
+ lastRemovedRow = m_nRowCount - 1;
+ }
+ else
+ {
+ ENSURE_OR_RETURN_VOID( i_last >= i_first, "TableControl_Impl::rowsRemoved: illegal indexes!" );
+
+ for ( sal_Int32 row = i_first; row <= i_last; ++row )
+ {
+ if ( markRowAsDeselected( row ) )
+ selectionChanged = true;
+ }
+
+ if ( lcl_adjustSelectedRows( m_aSelectedRows, i_last + 1, i_first - i_last - 1 ) )
+ selectionChanged = true;
+ }
+
+ // adjust cached row count
+ m_nRowCount = m_pModel->getRowCount();
+
+ // adjust the current row, if it is larger than the row count now
+ if ( m_nCurRow >= m_nRowCount )
+ {
+ if ( m_nRowCount > 0 )
+ goTo( m_nCurColumn, m_nRowCount - 1 );
+ else
+ m_nCurRow = ROW_INVALID;
+ }
+
+ // adjust scrollbars
+ impl_ni_updateScrollbars();
+
+ // notify A11Y events
+ if ( impl_isAccessibleAlive() )
+ {
+ impl_commitAccessibleEvent(
+ AccessibleEventId::TABLE_MODEL_CHANGED,
+ makeAny( AccessibleTableModelChange(
+ AccessibleTableModelChangeType::DELETE,
+ firstRemovedRow,
+ lastRemovedRow,
+ 0,
+ m_pModel->getColumnCount()
+ ) ),
+ Any()
+ );
+ }
+
+ // schedule a repaint
+ invalidateRowRange( firstRemovedRow, ROW_INVALID );
+
+ // call selection handlers, if necessary
+ if ( selectionChanged )
+ m_rAntiImpl.Select();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TableControl_Impl::columnInserted( ColPos const i_colIndex )
+ {
+ m_nColumnCount = m_pModel->getColumnCount();
+ impl_ni_updateColumnWidths();
+ impl_ni_updateScrollbars();
+
+ m_rAntiImpl.Invalidate();
+
+ OSL_UNUSED( i_colIndex );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TableControl_Impl::columnRemoved( ColPos const i_colIndex )
+ {
+ m_nColumnCount = m_pModel->getColumnCount();
+ impl_ni_updateColumnWidths();
+ impl_ni_updateScrollbars();
+
+ m_rAntiImpl.Invalidate();
+
+ OSL_UNUSED( i_colIndex );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TableControl_Impl::allColumnsRemoved()
+ {
+ m_nColumnCount = m_pModel->getColumnCount();
+ impl_ni_updateColumnWidths();
+ impl_ni_updateScrollbars();
+
+ m_rAntiImpl.Invalidate();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TableControl_Impl::cellsUpdated( ColPos const i_firstCol, ColPos i_lastCol, RowPos const i_firstRow, RowPos const i_lastRow )
+ {
+ invalidateRowRange( i_firstRow, i_lastRow );
+
+ OSL_UNUSED( i_firstCol );
+ OSL_UNUSED( i_lastCol );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TableControl_Impl::tableMetricsChanged()
+ {
+ long const oldRowHeaderWidthPixel = m_nRowHeaderWidthPixel;
+ impl_ni_updateCachedTableMetrics();
+ if ( oldRowHeaderWidthPixel != m_nRowHeaderWidthPixel )
+ impl_ni_updateColumnWidths();
+ impl_ni_updateScrollbars();
+ m_rAntiImpl.Invalidate();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TableControl_Impl::impl_invalidateColumn( ColPos const i_column )
+ {
+ DBG_CHECK_ME();
+
+ Rectangle const aAllCellsArea( impl_getAllVisibleCellsArea() );
+
+ const TableColumnGeometry aColumn( *this, aAllCellsArea, i_column );
+ if ( aColumn.isValid() )
+ m_rAntiImpl.Invalidate( aColumn.getRect() );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TableControl_Impl::columnChanged( ColPos const i_column, ColumnAttributeGroup const i_attributeGroup )
+ {
+ ColumnAttributeGroup nGroup( i_attributeGroup );
+ if ( nGroup & COL_ATTRS_APPEARANCE )
+ {
+ impl_invalidateColumn( i_column );
+ nGroup &= ~COL_ATTRS_APPEARANCE;
+ }
+
+ if ( nGroup & COL_ATTRS_WIDTH )
+ {
+ if ( !m_bUpdatingColWidths )
+ {
+ impl_ni_updateColumnWidths( i_column );
+ invalidate( TableAreaAll );
+ impl_ni_updateScrollbars();
+ }
+
+ nGroup &= ~COL_ATTRS_WIDTH;
+ }
+
+ OSL_ENSURE( ( nGroup == COL_ATTRS_NONE ) || ( i_attributeGroup == COL_ATTRS_ALL ),
+ "TableControl_Impl::columnChanged: don't know how to handle this change!" );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Rectangle TableControl_Impl::impl_getAllVisibleCellsArea() const
+ {
+ DBG_CHECK_ME();
+
+ Rectangle aArea( Point( 0, 0 ), Size( 0, 0 ) );
// determine the right-most border of the last column which is
// at least partially visible
- _rCellArea.Right() = m_nRowHeaderWidthPixel;
- if ( !m_aAccColumnWidthsPixel.empty() )
+ aArea.Right() = m_nRowHeaderWidthPixel;
+ if ( !m_aColumnWidths.empty() )
{
- // the number of pixels which are scroll out of the left hand
+ // the number of pixels which are scrolled out of the left hand
// side of the window
- long nScrolledOutLeft = m_nLeftColumn == 0 ? 0 : m_aAccColumnWidthsPixel[ m_nLeftColumn - 1 ];
+ const long nScrolledOutLeft = m_nLeftColumn == 0 ? 0 : m_aColumnWidths[ m_nLeftColumn - 1 ].getEnd();
- ArrayOfLong::const_reverse_iterator loop = m_aAccColumnWidthsPixel.rbegin();
+ ColumnPositions::const_reverse_iterator loop = m_aColumnWidths.rbegin();
do
{
- _rCellArea.Right() = *loop++ - nScrolledOutLeft + m_nRowHeaderWidthPixel;
+ aArea.Right() = loop->getEnd() - nScrolledOutLeft + m_nRowHeaderWidthPixel;
+ ++loop;
}
- while ( ( loop != m_aAccColumnWidthsPixel.rend() )
- && ( *loop - nScrolledOutLeft >= _rCellArea.Right() )
+ while ( ( loop != m_aColumnWidths.rend() )
+ && ( loop->getEnd() - nScrolledOutLeft >= aArea.Right() )
);
}
- // so far, _rCellArea.Right() denotes the first pixel *after* the cell area
- --_rCellArea.Right();
+ // so far, aArea.Right() denotes the first pixel *after* the cell area
+ --aArea.Right();
// determine the last row which is at least partially visible
- _rCellArea.Bottom() =
+ aArea.Bottom() =
m_nColHeaderHeightPixel
+ impl_getVisibleRows( true ) * m_nRowHeightPixel
- 1;
+
+ return aArea;
}
- //--------------------------------------------------------------------
- void TableControl_Impl::impl_getAllVisibleDataCellArea( Rectangle& _rCellArea ) const
+ //------------------------------------------------------------------------------------------------------------------
+ Rectangle TableControl_Impl::impl_getAllVisibleDataCellArea() const
{
DBG_CHECK_ME();
- impl_getAllVisibleCellsArea( _rCellArea );
- _rCellArea.Left() = m_nRowHeaderWidthPixel;
- _rCellArea.Top() = m_nColHeaderHeightPixel;
+ Rectangle aArea( impl_getAllVisibleCellsArea() );
+ aArea.Left() = m_nRowHeaderWidthPixel;
+ aArea.Top() = m_nColHeaderHeightPixel;
+ return aArea;
}
- //--------------------------------------------------------------------
- void TableControl_Impl::impl_ni_updateCachedModelValues()
+ //------------------------------------------------------------------------------------------------------------------
+ void TableControl_Impl::impl_ni_updateCachedTableMetrics()
{
- m_nRowHeightPixel = 15;
- m_nColHeaderHeightPixel = 0;
- m_nRowHeaderWidthPixel = 0;
- m_pInputHandler.reset();
- m_nColumnCount = m_nRowCount = 0;
+ m_nRowHeightPixel = m_rAntiImpl.LogicToPixel( Size( 0, m_pModel->getRowHeight() ), MAP_APPFONT ).Height();
- m_nRowHeightPixel = m_rAntiImpl.LogicToPixel( Size( 0, m_pModel->getRowHeight() ), MAP_APPFONT ).Height();
- if ( m_pModel->hasColumnHeaders() )
+ m_nColHeaderHeightPixel = 0;
+ if ( m_pModel->hasColumnHeaders() )
m_nColHeaderHeightPixel = m_rAntiImpl.LogicToPixel( Size( 0, m_pModel->getColumnHeaderHeight() ), MAP_APPFONT ).Height();
+
+ m_nRowHeaderWidthPixel = 0;
if ( m_pModel->hasRowHeaders() )
m_nRowHeaderWidthPixel = m_rAntiImpl.LogicToPixel( Size( m_pModel->getRowHeaderWidth(), 0 ), MAP_APPFONT).Width();
+ }
+ //------------------------------------------------------------------------------------------------------------------
+ void TableControl_Impl::impl_ni_updateCachedModelValues()
+ {
+ m_pInputHandler.reset();
+ m_nColumnCount = m_nRowCount = 0;
+
+ impl_ni_updateCachedTableMetrics();
impl_ni_updateColumnWidths();
m_pInputHandler = m_pModel->getInputHandler();
@@ -566,145 +809,280 @@ namespace svt { namespace table
m_nRowCount = m_pModel->getRowCount();
}
- //--------------------------------------------------------------------
- void TableControl_Impl::impl_ni_updateColumnWidths()
+ //------------------------------------------------------------------------------------------------------------------
+ void TableControl_Impl::impl_ni_updateColumnWidths( ColPos const i_assumeInflexibleColumnsUpToIncluding )
{
- m_aColumnWidthsPixel.resize( 0 );
- m_aAccColumnWidthsPixel.resize( 0 );
+ ENSURE_OR_RETURN_VOID( !m_bUpdatingColWidths, "TableControl_Impl::impl_ni_updateColumnWidths: recursive call detected!" );
+
+ m_aColumnWidths.resize( 0 );
if ( !m_pModel )
return;
- TableSize colCount = m_pModel->getColumnCount();
+ const TableSize colCount = m_pModel->getColumnCount();
+ if ( colCount == 0 )
+ return;
- m_aColumnWidthsPixel.reserve( colCount );
- m_aAccColumnWidthsPixel.reserve( colCount );
- if(colCount>0)
+ m_bUpdatingColWidths = true;
+ const ::comphelper::FlagGuard aWidthUpdateFlag( m_bUpdatingColWidths );
+
+ m_aColumnWidths.reserve( colCount );
+
+ // the available horizontal space
+ long gridWidthPixel = m_rAntiImpl.GetOutputSizePixel().Width();
+ if ( m_pModel->hasRowHeaders() && ( gridWidthPixel != 0 ) )
{
- std::vector<sal_Int32> aPrePixelWidths(0);
- long accumulatedPixelWidth = 0;
- int lastResizableCol = -1;
- double gridWidth = m_rAntiImpl.GetOutputSizePixel().Width();
- if(m_pModel->hasRowHeaders())
- {
- TableMetrics rowHeaderWidth = m_pModel->getRowHeaderWidth();
- gridWidth-= m_rAntiImpl.LogicToPixel( Size( rowHeaderWidth, 0 ), MAP_APPFONT ).Width();
- }
- if(m_pModel->hasVerticalScrollbar())
+ gridWidthPixel -= m_nRowHeaderWidthPixel;
+ }
+ if ( m_pModel->getVerticalScrollbarVisibility() != ScrollbarShowNever )
+ {
+ long nScrollbarMetrics = m_rAntiImpl.GetSettings().GetStyleSettings().GetScrollBarSize();
+ gridWidthPixel -= nScrollbarMetrics;
+ }
+
+ // TODO: shouldn't we take the visibility of the vertical scroll bar into account here, too?
+ long const gridWidthAppFont = m_rAntiImpl.PixelToLogic( Size( gridWidthPixel, 0 ), MAP_APPFONT ).Width();
+
+ // determine the accumulated current width of all columns
+ for ( ColPos col = 0; col < colCount; ++col )
+ {
+ const PColumnModel pColumn = m_pModel->getColumnModel( col );
+ ENSURE_OR_THROW( !!pColumn, "invalid column returned by the model!" );
+
+ }
+
+ // collect some meta data for our columns:
+ // - their current (appt-font) metrics
+ long accumulatedCurrentWidth = 0;
+ ::std::vector< long > currentColWidths;
+ currentColWidths.reserve( colCount );
+ // - their effective minimal and maximal width (app-font!)
+ typedef ::std::vector< ::std::pair< long, long > > ColumnLimits;
+ ColumnLimits effectiveColumnLimits;
+ effectiveColumnLimits.reserve( colCount );
+ long accumulatedMinWidth = 0;
+ long accumulatedMaxWidth = 0;
+ // - their relative flexibility
+ ::std::vector< ::sal_Int32 > columnFlexibilities;
+ columnFlexibilities.reserve( colCount );
+ long flexibilityDenominator = 0;
+ for ( ColPos col = 0; col < colCount; ++col )
+ {
+ PColumnModel const pColumn = m_pModel->getColumnModel( col );
+ ENSURE_OR_THROW( !!pColumn, "invalid column returned by the model!" );
+
+ // current width
+ TableMetrics const currentWidth = pColumn->getWidth();
+ currentColWidths.push_back( currentWidth );
+
+ // accumulated width
+ accumulatedCurrentWidth += currentWidth;
+
+ // flexibility
+ ::sal_Int32 flexibility = pColumn->getFlexibility();
+ OSL_ENSURE( flexibility >= 0, "TableControl_Impl::impl_ni_updateColumnWidths: a column's flexibility should be non-negative." );
+ if ( ( flexibility < 0 ) // normalization
+ || ( !pColumn->isResizable() ) // column not resizeable => no auto-resize
+ || ( col <= i_assumeInflexibleColumnsUpToIncluding ) // column shall be treated as inflexible => respec this
+ )
+ flexibility = 0;
+
+ // min/max width
+ long effectiveMin = currentWidth, effectiveMax = currentWidth;
+ // if the column is not flexible, it will not be asked for min/max, but we assume the current width as limit then
+ if ( flexibility > 0 )
{
- sal_Int32 scrollbarWidth = m_rAntiImpl.GetSettings().GetStyleSettings().GetScrollBarSize();
- gridWidth-=scrollbarWidth;
+ long const minWidth = pColumn->getMinWidth();
+ if ( minWidth > 0 )
+ effectiveMin = minWidth;
+ else
+ effectiveMin = MIN_COLUMN_WIDTH_PIXEL;
+
+ long const maxWidth = pColumn->getMaxWidth();
+ OSL_ENSURE( minWidth <= maxWidth, "TableControl_Impl::impl_ni_updateColumnWidths: pretty undecided 'bout its width limits, this column!" );
+ if ( ( maxWidth > 0 ) && ( maxWidth >= minWidth ) )
+ effectiveMax = maxWidth;
+ else
+ effectiveMax = gridWidthAppFont; // TODO: any better guess here?
+
+ if ( effectiveMin == effectiveMax )
+ // if the min and the max are identical, this implies no flexibility at all
+ flexibility = 0;
}
- double colWidthsSum = 0.0;
- double colWithoutFixedWidthsSum = 0.0;
- double minColWithoutFixedSum = 0.0;
- for ( ColPos col = 0; col < colCount; ++col )
+
+ columnFlexibilities.push_back( flexibility );
+ flexibilityDenominator += flexibility;
+
+ effectiveColumnLimits.push_back( ::std::pair< long, long >( effectiveMin, effectiveMax ) );
+ accumulatedMinWidth += effectiveMin;
+ accumulatedMaxWidth += effectiveMax;
+ }
+
+ ::std::vector< long > newWidths( currentColWidths );
+ if ( flexibilityDenominator == 0 )
+ {
+ // no column is flexible => don't adjust anything
+ }
+ else if ( gridWidthAppFont > accumulatedCurrentWidth )
+ { // we have space to give away ...
+ long distributeAppFontUnits = gridWidthAppFont - accumulatedCurrentWidth;
+ if ( gridWidthAppFont > accumulatedMaxWidth )
{
- PColumnModel pColumn = m_pModel->getColumnModel( col );
- DBG_ASSERT( !!pColumn, "TableControl_Impl::impl_ni_updateColumnWidths: invalid column returned by the model!" );
- if ( !pColumn )
- continue;
- TableMetrics colWidth = 0;
- TableMetrics colPrefWidth = pColumn->getPreferredWidth();
- bool bResizable = pColumn->isResizable();
- if(pColumn->getMinWidth() == 0 && bResizable)
- {
- pColumn->setMinWidth(1);
- minColWithoutFixedSum+=m_rAntiImpl.PixelToLogic( Size( 1, 0 ), MAP_APPFONT ).Width();
- }
- if(pColumn->getMaxWidth() == 0 && bResizable)
- pColumn->setMaxWidth(m_rAntiImpl.PixelToLogic( Size( (int)gridWidth, 0 ), MAP_APPFONT ).Width());
- if( colPrefWidth != 0)
- {
- if(m_bResizingGrid)
- {
- colWidth = pColumn->getWidth();
- pColumn->setPreferredWidth(0);
- }
- else
- {
- colWidth = colPrefWidth;
- pColumn->setWidth(colPrefWidth);
- }
- }
- else
- colWidth = pColumn->getWidth();
- long pixelWidth = m_rAntiImpl.LogicToPixel( Size( colWidth, 0 ), MAP_APPFONT ).Width();
- if(bResizable && colPrefWidth == 0)
+ // ... but the column's maximal widths are still less than we have
+ // => set them all to max
+ for ( size_t i = 0; i < size_t( colCount ); ++i )
{
- colWithoutFixedWidthsSum+=pixelWidth;
- lastResizableCol = col;
+ newWidths[i] = effectiveColumnLimits[i].second;
}
- colWidthsSum+=pixelWidth;
- aPrePixelWidths.push_back(pixelWidth);
- }
- double gridWidthWithoutFixed = gridWidth - colWidthsSum + colWithoutFixedWidthsSum;
- double scalingFactor = 1.0;
- if(m_bResizingGrid)
- {
- if(gridWidthWithoutFixed > (minColWithoutFixedSum+colWidthsSum - colWithoutFixedWidthsSum))
- scalingFactor = gridWidthWithoutFixed/colWithoutFixedWidthsSum;
}
else
{
- if(colWidthsSum < gridWidthWithoutFixed)
+ bool startOver = false;
+ do
{
- if(colWithoutFixedWidthsSum>0)
- scalingFactor = gridWidthWithoutFixed/colWithoutFixedWidthsSum;
+ startOver = false;
+ // distribute the remaining space amongst all columns with a positive flexibility
+ for ( size_t i=0; i<newWidths.size() && !startOver; ++i )
+ {
+ long const columnFlexibility = columnFlexibilities[i];
+ if ( columnFlexibility == 0 )
+ continue;
+
+ long newColWidth = currentColWidths[i] + columnFlexibility * distributeAppFontUnits / flexibilityDenominator;
+
+ if ( newColWidth > effectiveColumnLimits[i].second )
+ { // that was too much, we hit the col's maximum
+ // set the new width to exactly this maximum
+ newColWidth = effectiveColumnLimits[i].second;
+ // adjust the flexibility denominator ...
+ flexibilityDenominator -= columnFlexibility;
+ columnFlexibilities[i] = 0;
+ // ... and the remaining width ...
+ long const difference = newColWidth - currentColWidths[i];
+ distributeAppFontUnits -= difference;
+ // ... this way, we ensure that the width not taken up by this column is consumed by the other
+ // flexible ones (if there are some)
+
+ // and start over with the first column, since there might be earlier columns which need
+ // to be recalculated now
+ startOver = true;
+ }
+
+ newWidths[i] = newColWidth;
+ }
}
+ while ( startOver );
}
- for ( ColPos i = 0; i < colCount; ++i )
+ }
+ else if ( gridWidthAppFont < accumulatedCurrentWidth )
+ { // we need to take away some space from the columns which allow it ...
+ long takeAwayAppFontUnits = accumulatedCurrentWidth - gridWidthAppFont;
+ if ( gridWidthAppFont < accumulatedMinWidth )
{
- PColumnModel pColumn = m_pModel->getColumnModel( i );
- DBG_ASSERT( !!pColumn, "TableControl_Impl::impl_ni_updateColumnWidths: invalid column returned by the model!" );
- if ( !pColumn )
- continue;
- if(pColumn->isResizable() && pColumn->getPreferredWidth() == 0)
+ // ... but the column's minimal widths are still more than we have
+ // => set them all to min
+ for ( size_t i = 0; i < size_t( colCount ); ++i )
{
- aPrePixelWidths[i]*=scalingFactor;
- TableMetrics logicColWidth = m_rAntiImpl.PixelToLogic( Size( aPrePixelWidths[i], 0 ), MAP_APPFONT ).Width();
- pColumn->setWidth(logicColWidth);
+ newWidths[i] = effectiveColumnLimits[i].first;
}
- m_aColumnWidthsPixel.push_back( aPrePixelWidths[i] );
- m_aAccColumnWidthsPixel.push_back( accumulatedPixelWidth += aPrePixelWidths[i] );
}
- if(gridWidth > m_aAccColumnWidthsPixel[colCount-1])
+ else
{
- if(lastResizableCol >= 0)
+ bool startOver = false;
+ do
{
- PColumnModel pColumn = m_pModel->getColumnModel(lastResizableCol);
- m_aColumnWidthsPixel[lastResizableCol]+=gridWidth-m_aAccColumnWidthsPixel[colCount-1];
- TableMetrics logicColWidth1 = m_rAntiImpl.PixelToLogic( Size( m_aColumnWidthsPixel[lastResizableCol], 0 ), MAP_APPFONT ).Width();
- pColumn->setWidth(logicColWidth1);
- while(lastResizableCol < colCount)
+ startOver = false;
+ // take away the space we need from the columns with a positive flexibility
+ for ( size_t i=0; i<newWidths.size() && !startOver; ++i )
{
- if(lastResizableCol == 0)
- m_aAccColumnWidthsPixel[0] = m_aColumnWidthsPixel[lastResizableCol];
- else
- m_aAccColumnWidthsPixel[lastResizableCol]=m_aAccColumnWidthsPixel[lastResizableCol-1]+m_aColumnWidthsPixel[lastResizableCol];
- ++lastResizableCol;
+ long const columnFlexibility = columnFlexibilities[i];
+ if ( columnFlexibility == 0 )
+ continue;
+
+ long newColWidth = currentColWidths[i] - columnFlexibility * takeAwayAppFontUnits / flexibilityDenominator;
+
+ if ( newColWidth < effectiveColumnLimits[i].first )
+ { // that was too much, we hit the col's minimum
+ // set the new width to exactly this minimum
+ newColWidth = effectiveColumnLimits[i].first;
+ // adjust the flexibility denominator ...
+ flexibilityDenominator -= columnFlexibility;
+ columnFlexibilities[i] = 0;
+ // ... and the remaining width ...
+ long const difference = currentColWidths[i] - newColWidth;
+ takeAwayAppFontUnits -= difference;
+
+ // and start over with the first column, since there might be earlier columns which need
+ // to be recalculated now
+ startOver = true;
+ }
+
+ newWidths[i] = newColWidth;
}
}
+ while ( startOver );
+ }
+ }
+
+ // now that we have calculated the app-font widths, get the actual pixels
+ long accumulatedWidthPixel = m_nRowHeaderWidthPixel;
+ for ( ColPos col = 0; col < colCount; ++col )
+ {
+ long const colWidth = m_rAntiImpl.LogicToPixel( Size( newWidths[col], 0 ), MAP_APPFONT ).Width();
+ const long columnStart = accumulatedWidthPixel;
+ const long columnEnd = columnStart + colWidth;
+ m_aColumnWidths.push_back( MutableColumnMetrics( columnStart, columnEnd ) );
+ accumulatedWidthPixel = columnEnd;
+
+ // and don't forget to forward this to the column models
+ PColumnModel const pColumn = m_pModel->getColumnModel( col );
+ ENSURE_OR_THROW( !!pColumn, "invalid column returned by the model!" );
+ pColumn->setWidth( newWidths[col] );
+ }
+
+ // if the column resizing happened to leave some space at the right, but there are columns
+ // scrolled out to the left, scroll them in
+ while ( ( m_nLeftColumn > 0 )
+ && ( accumulatedWidthPixel - m_aColumnWidths[ m_nLeftColumn - 1 ].getStart() <= gridWidthPixel )
+ )
+ {
+ --m_nLeftColumn;
+ }
+
+ // now adjust the column metrics, since they currently ignore the horizontal scroll position
+ if ( m_nLeftColumn > 0 )
+ {
+ const long offsetPixel = m_aColumnWidths[ 0 ].getStart() - m_aColumnWidths[ m_nLeftColumn ].getStart();
+ for ( ColumnPositions::iterator colPos = m_aColumnWidths.begin();
+ colPos != m_aColumnWidths.end();
+ ++colPos
+ )
+ {
+ colPos->move( offsetPixel );
}
}
}
- //--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
namespace
{
- //................................................................
+ //..............................................................................................................
/// determines whether a scrollbar is needed for the given values
- bool lcl_determineScrollbarNeed( ScrollbarVisibility _eVisibility,
- long _nVisibleUnits, long _nRange )
+ bool lcl_determineScrollbarNeed( long const i_position, ScrollbarVisibility const i_visibility,
+ long const i_availableSpace, long const i_neededSpace )
{
- if ( _eVisibility == ScrollbarShowNever )
+ if ( i_visibility == ScrollbarShowNever )
return false;
- if ( _eVisibility == ScrollbarShowAlways )
+ if ( i_visibility == ScrollbarShowAlways )
return true;
- return _nVisibleUnits > _nRange;
+ if ( i_position > 0 )
+ return true;
+ if ( i_availableSpace >= i_neededSpace )
+ return false;
+ return true;
}
- //................................................................
- void lcl_setButtonRepeat( Window& _rWindow, ULONG _nDelay )
+ //..............................................................................................................
+ void lcl_setButtonRepeat( Window& _rWindow, sal_uLong _nDelay )
{
AllSettings aSettings = _rWindow.GetSettings();
MouseSettings aMouseSettings = aSettings.GetMouseSettings();
@@ -712,27 +1090,26 @@ namespace svt { namespace table
aMouseSettings.SetButtonRepeat( _nDelay );
aSettings.SetMouseSettings( aMouseSettings );
- _rWindow.SetSettings( aSettings, TRUE );
+ _rWindow.SetSettings( aSettings, sal_True );
}
- //................................................................
+ //..............................................................................................................
void lcl_updateScrollbar( Window& _rParent, ScrollBar*& _rpBar,
- ScrollbarVisibility _eVisibility, long _nVisibleUnits,
+ bool const i_needBar, long _nVisibleUnits,
long _nPosition, long _nLineSize, long _nRange,
bool _bHorizontal, const Link& _rScrollHandler )
{
- // do we need the scrollbar?
- bool bNeedBar = lcl_determineScrollbarNeed( _eVisibility, _nVisibleUnits, _nRange );
-
// do we currently have the scrollbar?
bool bHaveBar = _rpBar != NULL;
// do we need to correct the scrollbar visibility?
- if ( bHaveBar && !bNeedBar )
+ if ( bHaveBar && !i_needBar )
{
+ if ( _rpBar->IsTracking() )
+ _rpBar->EndTracking();
DELETEZ( _rpBar );
}
- else if ( !bHaveBar && bNeedBar )
+ else if ( !bHaveBar && i_needBar )
{
_rpBar = new ScrollBar(
&_rParent,
@@ -754,7 +1131,7 @@ namespace svt { namespace table
}
}
- //................................................................
+ //..............................................................................................................
/** returns the number of rows fitting into the given range,
for the given row height. Partially fitting rows are counted, too, if the
respective parameter says so.
@@ -766,7 +1143,7 @@ namespace svt { namespace table
: _nOverallHeight / _nRowHeightPixel;
}
- //................................................................
+ //..............................................................................................................
/** returns the number of columns fitting into the given area,
with the first visible column as given. Partially fitting columns are counted, too,
if the respective parameter says so.
@@ -791,15 +1168,13 @@ namespace svt { namespace table
}
- //--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
void TableControl_Impl::impl_ni_updateScrollbars()
{
- TempHideCursor aHideCursor( *this );
+ SuppressCursor aHideCursor( *this );
// the width/height of a scrollbar, needed several times below
- long nScrollbarMetrics = m_rAntiImpl.GetSettings().GetStyleSettings().GetScrollBarSize();
- if ( m_rAntiImpl.IsZoom() )
- nScrollbarMetrics = (long)( nScrollbarMetrics * (double)m_rAntiImpl.GetZoom() );
+ long const nScrollbarMetrics = m_rAntiImpl.GetSettings().GetStyleSettings().GetScrollBarSize();
// determine the playground for the data cells (excluding headers)
// TODO: what if the control is smaller than needed for the headers/scrollbars?
@@ -809,26 +1184,28 @@ namespace svt { namespace table
m_nRowCount = m_pModel->getRowCount();
m_nColumnCount = m_pModel->getColumnCount();
- if(m_aAccColumnWidthsPixel.empty())
- {
+ if ( m_aColumnWidths.empty() )
impl_ni_updateColumnWidths();
- }
+ OSL_ENSURE( m_aColumnWidths.size() == size_t( m_nColumnCount ), "TableControl_Impl::impl_ni_updateScrollbars: inconsistency!" );
+ const long nAllColumnsWidth = m_aColumnWidths.empty()
+ ? 0
+ : m_aColumnWidths[ m_nColumnCount - 1 ].getEnd() - m_aColumnWidths[ 0 ].getStart();
+
+ const ScrollbarVisibility eVertScrollbar = m_pModel->getVerticalScrollbarVisibility();
+ const ScrollbarVisibility eHorzScrollbar = m_pModel->getHorizontalScrollbarVisibility();
// do we need a vertical scrollbar?
+ bool bNeedVerticalScrollbar = lcl_determineScrollbarNeed(
+ m_nTopRow, eVertScrollbar, aDataCellPlayground.GetHeight(), m_nRowHeightPixel * m_nRowCount );
bool bFirstRoundVScrollNeed = false;
- if ( lcl_determineScrollbarNeed(
- m_pModel->getVerticalScrollbarVisibility(aDataCellPlayground.GetHeight(), m_nRowHeightPixel*m_nRowCount),
- lcl_getRowsFittingInto( aDataCellPlayground.GetHeight(), m_nRowHeightPixel ),
- m_nRowCount ) )
+ if ( bNeedVerticalScrollbar )
{
aDataCellPlayground.Right() -= nScrollbarMetrics;
bFirstRoundVScrollNeed = true;
}
// do we need a horizontal scrollbar?
- if ( lcl_determineScrollbarNeed(
- m_pModel->getHorizontalScrollbarVisibility(aDataCellPlayground.GetWidth(), m_aAccColumnWidthsPixel[m_nColumnCount-1]),
- lcl_getColumnsVisibleWithin( aDataCellPlayground, m_nLeftColumn, *this, false ),
- m_nColumnCount ) )
+ const bool bNeedHorizontalScrollbar = lcl_determineScrollbarNeed( m_nLeftColumn, eHorzScrollbar, aDataCellPlayground.GetWidth(), nAllColumnsWidth );
+ if ( bNeedHorizontalScrollbar )
{
aDataCellPlayground.Bottom() -= nScrollbarMetrics;
@@ -836,19 +1213,21 @@ namespace svt { namespace table
// the need for a vertical one may have changed, since the horizontal
// SB might just occupy enough space so that not all rows do fit
// anymore
- if ( !bFirstRoundVScrollNeed && lcl_determineScrollbarNeed(
- m_pModel->getVerticalScrollbarVisibility(aDataCellPlayground.GetHeight(),m_nRowHeightPixel*m_nRowCount),
- lcl_getRowsFittingInto( aDataCellPlayground.GetHeight(), m_nRowHeightPixel ),
- m_nRowCount ) )
+ if ( !bFirstRoundVScrollNeed )
{
- aDataCellPlayground.Right() -= nScrollbarMetrics;
+ bNeedVerticalScrollbar = lcl_determineScrollbarNeed(
+ m_nTopRow, eVertScrollbar, aDataCellPlayground.GetHeight(), m_nRowHeightPixel * m_nRowCount );
+ if ( bNeedVerticalScrollbar )
+ {
+ aDataCellPlayground.Right() -= nScrollbarMetrics;
+ }
}
}
// create or destroy the vertical scrollbar, as needed
lcl_updateScrollbar(
m_rAntiImpl,
m_pVScroll,
- m_pModel->getVerticalScrollbarVisibility(aDataCellPlayground.GetHeight(),m_nRowHeightPixel*m_nRowCount),
+ bNeedVerticalScrollbar,
lcl_getRowsFittingInto( aDataCellPlayground.GetHeight(), m_nRowHeightPixel ),
// visible units
m_nTopRow, // current position
@@ -872,7 +1251,7 @@ namespace svt { namespace table
lcl_updateScrollbar(
m_rAntiImpl,
m_pHScroll,
- m_pModel->getHorizontalScrollbarVisibility(aDataCellPlayground.GetWidth(), m_aAccColumnWidthsPixel[m_nColumnCount-1]),
+ bNeedHorizontalScrollbar,
lcl_getColumnsVisibleWithin( aDataCellPlayground, m_nLeftColumn, *this, false ),
// visible units
m_nLeftColumn, // current position
@@ -884,14 +1263,14 @@ namespace svt { namespace table
// position it
if ( m_pHScroll )
{
- TableSize nVisibleUnits = lcl_getColumnsVisibleWithin( aDataCellPlayground, m_nLeftColumn, *this, false );
- int nRange = m_nColumnCount;
- if( m_nLeftColumn + nVisibleUnits == nRange-1)
+ TableSize const nVisibleUnits = lcl_getColumnsVisibleWithin( aDataCellPlayground, m_nLeftColumn, *this, false );
+ TableMetrics const nRange = m_nColumnCount;
+ if( m_nLeftColumn + nVisibleUnits == nRange - 1 )
{
- if(m_aAccColumnWidthsPixel[nRange-2] - m_aAccColumnWidthsPixel[m_nLeftColumn] + m_aColumnWidthsPixel[nRange-1]>aDataCellPlayground.GetWidth())
+ if ( m_aColumnWidths[ nRange - 1 ].getStart() - m_aColumnWidths[ m_nLeftColumn ].getEnd() + m_aColumnWidths[ nRange-1 ].getWidth() > aDataCellPlayground.GetWidth() )
{
m_pHScroll->SetVisibleSize( nVisibleUnits -1 );
- m_pHScroll->SetPageSize(nVisibleUnits -1);
+ m_pHScroll->SetPageSize( nVisibleUnits - 1 );
}
}
Rectangle aScrollbarArea(
@@ -929,41 +1308,17 @@ namespace svt { namespace table
) );
}
- //--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
void TableControl_Impl::onResize()
{
DBG_CHECK_ME();
- if(m_nRowCount != 0)
- {
- if(m_nColumnCount != 0)
- {
- if(m_bResizingGrid)
- impl_ni_updateColumnWidths();
- invalidateRows();
- m_bResizingGrid = true;
- }
- }
- else
- {
- //In the case that column headers are defined but data hasn't yet been set,
- //only column headers will be shown
- if(m_pModel->hasColumnHeaders())
- {
- if(m_nColHeaderHeightPixel>1)
- {
- m_pDataWindow->SetSizePixel( m_rAntiImpl.GetOutputSizePixel());
- if(m_bResizingGrid)
- //update column widths to fit in grid
- impl_ni_updateColumnWidths();
- m_bResizingGrid = true;
- }
- }
- if(m_nColumnCount != 0)
- impl_ni_updateScrollbars();
- }
+
+ impl_ni_updateColumnWidths();
+ impl_ni_updateScrollbars();
+ checkCursorPosition();
}
- //--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
void TableControl_Impl::doPaintContent( const Rectangle& _rUpdateRect )
{
DBG_CHECK_ME();
@@ -971,32 +1326,24 @@ namespace svt { namespace table
if ( !getModel() )
return;
PTableRenderer pRenderer = getModel()->getRenderer();
- DBG_ASSERT( !!pRenderer, "TableDataWindow::Paint: invalid renderer!" );
+ DBG_ASSERT( !!pRenderer, "TableDataWindow::doPaintContent: invalid renderer!" );
if ( !pRenderer )
return;
// our current style settings, to be passed to the renderer
const StyleSettings& rStyle = m_rAntiImpl.GetSettings().GetStyleSettings();
m_nRowCount = m_pModel->getRowCount();
- TableSize nVisibleRows = impl_getVisibleRows(true);
- TableSize nActualRows = m_nRowCount;
- if(m_nRowCount>nVisibleRows)
- nActualRows = nVisibleRows;
// the area occupied by all (at least partially) visible cells, including
// headers
- Rectangle aAllCellsWithHeaders;
- impl_getAllVisibleCellsArea( aAllCellsWithHeaders );
+ Rectangle const aAllCellsWithHeaders( impl_getAllVisibleCellsArea() );
// ............................
// draw the header column area
if ( m_pModel->hasColumnHeaders() )
{
- TableRowGeometry aHeaderRow( *this, Rectangle( Point( 0, 0 ),
+ TableRowGeometry const aHeaderRow( *this, Rectangle( Point( 0, 0 ),
aAllCellsWithHeaders.BottomRight() ), ROW_COL_HEADERS );
- Rectangle aColRect(aHeaderRow.getRect());
- //to avoid double lines when scrolling horizontally
- if(m_nLeftColumn != 0)
- --aColRect.Left();
+ Rectangle const aColRect(aHeaderRow.getRect());
pRenderer->PaintHeaderArea(
*m_pDataWindow, aColRect, true, false, rStyle
);
@@ -1012,7 +1359,7 @@ namespace svt { namespace table
if ( _rUpdateRect.GetIntersection( aCell.getRect() ).IsEmpty() )
continue;
- bool isActiveColumn = ( aCell.getColumn() == getCurColumn() );
+ bool isActiveColumn = ( aCell.getColumn() == getCurrentColumn() );
bool isSelectedColumn = false;
pRenderer->PaintColumnHeader( aCell.getColumn(), isActiveColumn, isSelectedColumn,
*m_pDataWindow, aCell.getRect(), rStyle );
@@ -1024,31 +1371,23 @@ namespace svt { namespace table
{
aRowHeaderArea = aAllCellsWithHeaders;
aRowHeaderArea.Right() = m_nRowHeaderWidthPixel - 1;
- if(m_nTopRow+nActualRows>m_nRowCount)
- aRowHeaderArea.Bottom() = m_nRowHeightPixel * (nActualRows -1)+ m_nColHeaderHeightPixel - 1;
- else
- aRowHeaderArea.Bottom() = m_nRowHeightPixel * nActualRows + m_nColHeaderHeightPixel - 1;
- //to avoid double lines when scrolling vertically
- if(m_nTopRow != 0)
- --aRowHeaderArea.Top();
- --aRowHeaderArea.Right();
- pRenderer->PaintHeaderArea(*m_pDataWindow, aRowHeaderArea, false, true, rStyle);
+
+ TableSize const nVisibleRows = impl_getVisibleRows( true );
+ TableSize nActualRows = nVisibleRows;
+ if ( m_nTopRow + nActualRows > m_nRowCount )
+ nActualRows = m_nRowCount - m_nTopRow;
+ aRowHeaderArea.Bottom() = m_nColHeaderHeightPixel + m_nRowHeightPixel * nActualRows - 1;
+
+ pRenderer->PaintHeaderArea( *m_pDataWindow, aRowHeaderArea, false, true, rStyle );
// Note that strictly, aRowHeaderArea also contains the intersection between column
// and row header area. However, below we go to paint this intersection, again,
// so this hopefully doesn't hurt if we already paint it here.
if ( m_pModel->hasColumnHeaders() )
{
- TableCellGeometry aIntersection( *this, Rectangle( Point( 0, 0 ),
+ TableCellGeometry const aIntersection( *this, Rectangle( Point( 0, 0 ),
aAllCellsWithHeaders.BottomRight() ), COL_ROW_HEADERS, ROW_COL_HEADERS );
- Rectangle aInters(aIntersection.getRect());
- //to avoid double line when scrolling vertically
- if( m_nTopRow != 0 )
- {
- --aInters.Top();
- --aInters.Bottom();
- }
- --aInters.Right();
+ Rectangle const aInters( aIntersection.getRect() );
pRenderer->PaintHeaderArea(
*m_pDataWindow, aInters, true, true, rStyle
);
@@ -1061,51 +1400,36 @@ namespace svt { namespace table
TableSize colCount = getModel()->getColumnCount();
// paint all rows
- Rectangle aAllDataCellsArea;
- impl_getAllVisibleDataCellArea( aAllDataCellsArea );
- ::std::vector< std::vector< ::com::sun::star::uno::Any > >& aCellContent = m_pModel->getCellContent();
+ Rectangle const aAllDataCellsArea( impl_getAllVisibleDataCellArea() );
for ( TableRowGeometry aRowIterator( *this, aAllCellsWithHeaders, getTopRow() );
aRowIterator.isValid();
aRowIterator.moveDown() )
{
if ( _rUpdateRect.GetIntersection( aRowIterator.getRect() ).IsEmpty() )
continue;
- bool isActiveRow = ( aRowIterator.getRow() == getCurRow() );
- bool isSelectedRow = false;
- if(!m_nRowSelected.empty())
- {
- for(std::vector<RowPos>::iterator itSel=m_nRowSelected.begin();
- itSel!=m_nRowSelected.end();++itSel)
- {
- if(*itSel == aRowIterator.getRow())
- isSelectedRow = true;
- }
- }
- Rectangle aRect = aRowIterator.getRect().GetIntersection( aAllDataCellsArea );
- //to avoid double lines
- if( aRowIterator.getRow() != 0 )
- --aRect.Top();
- if(m_nLeftColumn != 0)
- --aRect.Left();
- else
- {
- if(m_pModel->hasRowHeaders())
- --aRect.Left();
- }
+
+ bool const isActiveRow = ( aRowIterator.getRow() == getCurrentRow() );
+ bool const isSelectedRow = isRowSelected( aRowIterator.getRow() );
+
+ Rectangle const aRect = aRowIterator.getRect().GetIntersection( aAllDataCellsArea );
+
// give the redenderer a chance to prepare the row
- pRenderer->PrepareRow( aRowIterator.getRow(), isActiveRow, isSelectedRow,
- *m_pDataWindow, aRect, rStyle );
+ pRenderer->PrepareRow(
+ aRowIterator.getRow(), isActiveRow, isSelectedRow,
+ *m_pDataWindow, aRect, rStyle
+ );
// paint the row header
if ( m_pModel->hasRowHeaders() )
{
- Rectangle aCurrentRowHeader( aRowHeaderArea.GetIntersection( aRowIterator.getRect() ) );
- rtl::OUString rowHeaderName = m_pModel->getRowHeaderName()[aRowIterator.getRow()];
+ const Rectangle aCurrentRowHeader( aRowHeaderArea.GetIntersection( aRowIterator.getRect() ) );
pRenderer->PaintRowHeader( isActiveRow, isSelectedRow, *m_pDataWindow, aCurrentRowHeader,
- rStyle, rowHeaderName );
+ rStyle );
}
+
if ( !colCount )
continue;
+
// paint all cells in this row
for ( TableCellGeometry aCell( aRowIterator, m_nLeftColumn );
aCell.isValid();
@@ -1113,25 +1437,12 @@ namespace svt { namespace table
)
{
bool isSelectedColumn = false;
- ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic >xGraphic;
- ::com::sun::star::uno::Any rCellData = aCellContent[aRowIterator.getRow()][aCell.getColumn()];
- if(rCellData>>=xGraphic)
- {
- Image* pImage = new Image(xGraphic);
- if(pImage!=NULL)
- pRenderer->PaintCellImage( aCell.getColumn(), isSelectedRow || isSelectedColumn, isActiveRow,
- *m_pDataWindow, aCell.getRect(), rStyle, pImage );
- }
- else
- {
- ::rtl::OUString sContent = convertToString(rCellData);
- pRenderer->PaintCellString( aCell.getColumn(), isSelectedRow || isSelectedColumn, isActiveRow,
- *m_pDataWindow, aCell.getRect(), rStyle, sContent );
- }
+ pRenderer->PaintCell( aCell.getColumn(), isSelectedRow || isSelectedColumn, isActiveRow,
+ *m_pDataWindow, aCell.getRect(), rStyle );
}
}
}
- //--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
void TableControl_Impl::hideCursor()
{
DBG_CHECK_ME();
@@ -1140,7 +1451,7 @@ namespace svt { namespace table
impl_ni_doSwitchCursor( false );
}
- //--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
void TableControl_Impl::showCursor()
{
DBG_CHECK_ME();
@@ -1150,12 +1461,14 @@ namespace svt { namespace table
impl_ni_doSwitchCursor( true );
}
- //--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
bool TableControl_Impl::dispatchAction( TableControlAction _eAction )
{
DBG_CHECK_ME();
bool bSuccess = false;
+ bool selectionChanged = false;
+
Rectangle rCells;
switch ( _eAction )
{
@@ -1163,25 +1476,25 @@ namespace svt { namespace table
if(m_pSelEngine->GetSelectionMode() == SINGLE_SELECTION)
{
//if other rows already selected, deselect them
- if(m_nRowSelected.size()>0)
+ if(m_aSelectedRows.size()>0)
{
- for(std::vector<RowPos>::iterator it=m_nRowSelected.begin();
- it!=m_nRowSelected.end();++it)
+ for(std::vector<RowPos>::iterator it=m_aSelectedRows.begin();
+ it!=m_aSelectedRows.end();++it)
{
invalidateSelectedRegion(*it, *it, rCells);
}
- m_nRowSelected.clear();
+ m_aSelectedRows.clear();
}
if(m_nCurRow < m_nRowCount-1)
{
++m_nCurRow;
- m_nRowSelected.push_back(m_nCurRow);
+ m_aSelectedRows.push_back(m_nCurRow);
}
else
- m_nRowSelected.push_back(m_nCurRow);
+ m_aSelectedRows.push_back(m_nCurRow);
invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells);
ensureVisible(m_nCurColumn,m_nCurRow,false);
- m_rAntiImpl.selectionChanged(true);
+ selectionChanged = true;
bSuccess = true;
}
else
@@ -1194,28 +1507,28 @@ namespace svt { namespace table
case cursorUp:
if(m_pSelEngine->GetSelectionMode() == SINGLE_SELECTION)
{
- if(m_nRowSelected.size()>0)
+ if(m_aSelectedRows.size()>0)
{
- for(std::vector<RowPos>::iterator it=m_nRowSelected.begin();
- it!=m_nRowSelected.end();++it)
+ for(std::vector<RowPos>::iterator it=m_aSelectedRows.begin();
+ it!=m_aSelectedRows.end();++it)
{
invalidateSelectedRegion(*it, *it, rCells);
}
- m_nRowSelected.clear();
+ m_aSelectedRows.clear();
}
if(m_nCurRow>0)
{
--m_nCurRow;
- m_nRowSelected.push_back(m_nCurRow);
+ m_aSelectedRows.push_back(m_nCurRow);
invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells);
}
else
{
- m_nRowSelected.push_back(m_nCurRow);
+ m_aSelectedRows.push_back(m_nCurRow);
invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells);
}
ensureVisible(m_nCurColumn,m_nCurRow,false);
- m_rAntiImpl.selectionChanged(true);
+ selectionChanged = true;
bSuccess = true;
}
else
@@ -1277,259 +1590,269 @@ namespace svt { namespace table
case cursorBottomRight:
bSuccess = goTo( m_nColumnCount - 1, m_nRowCount - 1 );
break;
- case cursorSelectRow:
- {
- if(m_pSelEngine->GetSelectionMode() == NO_SELECTION)
- return bSuccess = false;
- //pos is the position of the current row in the vector of selected rows, if current row is selected
- int pos = getRowSelectedNumber(m_nRowSelected, m_nCurRow);
- //if current row is selected, it should be deselected, when ALT+SPACE are pressed
- if(pos>-1)
- {
- m_nRowSelected.erase(m_nRowSelected.begin()+pos);
- if(m_nRowSelected.empty() && m_nAnchor != -1)
- m_nAnchor = -1;
- }
- //else select the row->put it in the vector
- else
- m_nRowSelected.push_back(m_nCurRow);
- invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells);
- m_rAntiImpl.selectionChanged(true);
- bSuccess = true;
- }
- break;
- case cursorSelectRowUp:
- {
- if(m_pSelEngine->GetSelectionMode() == NO_SELECTION)
- return bSuccess = false;
- else if(m_pSelEngine->GetSelectionMode() == SINGLE_SELECTION)
+
+ case cursorSelectRow:
{
- //if there are other selected rows, deselect them
- return false;
+ if(m_pSelEngine->GetSelectionMode() == NO_SELECTION)
+ return bSuccess = false;
+ //pos is the position of the current row in the vector of selected rows, if current row is selected
+ int pos = getRowSelectedNumber(m_aSelectedRows, m_nCurRow);
+ //if current row is selected, it should be deselected, when ALT+SPACE are pressed
+ if(pos>-1)
+ {
+ m_aSelectedRows.erase(m_aSelectedRows.begin()+pos);
+ if(m_aSelectedRows.empty() && m_nAnchor != -1)
+ m_nAnchor = -1;
+ }
+ //else select the row->put it in the vector
+ else
+ m_aSelectedRows.push_back(m_nCurRow);
+ invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells);
+ selectionChanged = true;
+ bSuccess = true;
}
- else
+ break;
+ case cursorSelectRowUp:
{
- //there are other selected rows
- if(m_nRowSelected.size()>0)
+ if(m_pSelEngine->GetSelectionMode() == NO_SELECTION)
+ return bSuccess = false;
+ else if(m_pSelEngine->GetSelectionMode() == SINGLE_SELECTION)
+ {
+ //if there are other selected rows, deselect them
+ return false;
+ }
+ else
{
- //the anchor wasn't set -> a region is not selected, that's why clear all selection
- //and select the current row
- if(m_nAnchor==-1)
+ //there are other selected rows
+ if(m_aSelectedRows.size()>0)
{
- for(std::vector<RowPos>::iterator it=m_nRowSelected.begin();
- it!=m_nRowSelected.end();++it)
+ //the anchor wasn't set -> a region is not selected, that's why clear all selection
+ //and select the current row
+ if(m_nAnchor==-1)
{
- invalidateSelectedRegion(*it, *it, rCells);
- }
- m_nRowSelected.clear();
- m_nRowSelected.push_back(m_nCurRow);
- invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells);
- }
- else
- {
- //a region is already selected, prevRow is last selected row and the row above - nextRow - should be selected
- int prevRow = getRowSelectedNumber(m_nRowSelected, m_nCurRow);
- int nextRow = getRowSelectedNumber(m_nRowSelected, m_nCurRow-1);
- if(prevRow>-1)
- {
- //if m_nCurRow isn't the upper one, can move up, otherwise not
- if(m_nCurRow>0)
- m_nCurRow--;
- else
- return bSuccess = true;
- //if nextRow already selected, deselect it, otherwise select it
- if(nextRow>-1 && m_nRowSelected[nextRow] == m_nCurRow)
- {
- m_nRowSelected.erase(m_nRowSelected.begin()+prevRow);
- invalidateSelectedRegion(m_nCurRow+1, m_nCurRow+1, rCells);
- }
- else
+ for(std::vector<RowPos>::iterator it=m_aSelectedRows.begin();
+ it!=m_aSelectedRows.end();++it)
{
- m_nRowSelected.push_back(m_nCurRow);
- invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells);
- }
- }
+ invalidateSelectedRegion(*it, *it, rCells);
+ }
+ m_aSelectedRows.clear();
+ m_aSelectedRows.push_back(m_nCurRow);
+ invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells);
+ }
else
{
- if(m_nCurRow>0)
+ //a region is already selected, prevRow is last selected row and the row above - nextRow - should be selected
+ int prevRow = getRowSelectedNumber(m_aSelectedRows, m_nCurRow);
+ int nextRow = getRowSelectedNumber(m_aSelectedRows, m_nCurRow-1);
+ if(prevRow>-1)
+ {
+ //if m_nCurRow isn't the upper one, can move up, otherwise not
+ if(m_nCurRow>0)
+ m_nCurRow--;
+ else
+ return bSuccess = true;
+ //if nextRow already selected, deselect it, otherwise select it
+ if(nextRow>-1 && m_aSelectedRows[nextRow] == m_nCurRow)
+ {
+ m_aSelectedRows.erase(m_aSelectedRows.begin()+prevRow);
+ invalidateSelectedRegion(m_nCurRow+1, m_nCurRow+1, rCells);
+ }
+ else
+ {
+ m_aSelectedRows.push_back(m_nCurRow);
+ invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells);
+ }
+ }
+ else
{
- m_nRowSelected.push_back(m_nCurRow);
- m_nCurRow--;
- m_nRowSelected.push_back(m_nCurRow);
- invalidateSelectedRegion(m_nCurRow+1, m_nCurRow, rCells);
+ if(m_nCurRow>0)
+ {
+ m_aSelectedRows.push_back(m_nCurRow);
+ m_nCurRow--;
+ m_aSelectedRows.push_back(m_nCurRow);
+ invalidateSelectedRegion(m_nCurRow+1, m_nCurRow, rCells);
+ }
}
}
}
- }
- else
- {
- //if nothing is selected and the current row isn't the upper one
- //select the current and one row above
- //otherwise select only the upper row
- if(m_nCurRow>0)
- {
- m_nRowSelected.push_back(m_nCurRow);
- m_nCurRow--;
- m_nRowSelected.push_back(m_nCurRow);
- invalidateSelectedRegion(m_nCurRow+1, m_nCurRow, rCells);
- }
else
{
- m_nRowSelected.push_back(m_nCurRow);
- invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells);
+ //if nothing is selected and the current row isn't the upper one
+ //select the current and one row above
+ //otherwise select only the upper row
+ if(m_nCurRow>0)
+ {
+ m_aSelectedRows.push_back(m_nCurRow);
+ m_nCurRow--;
+ m_aSelectedRows.push_back(m_nCurRow);
+ invalidateSelectedRegion(m_nCurRow+1, m_nCurRow, rCells);
+ }
+ else
+ {
+ m_aSelectedRows.push_back(m_nCurRow);
+ invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells);
+ }
}
+ m_pSelEngine->SetAnchor(sal_True);
+ m_nAnchor = m_nCurRow;
+ ensureVisible(m_nCurColumn, m_nCurRow, false);
+ selectionChanged = true;
+ bSuccess = true;
}
- m_pSelEngine->SetAnchor(TRUE);
- m_nAnchor = m_nCurRow;
- ensureVisible(m_nCurColumn, m_nCurRow, false);
- m_rAntiImpl.selectionChanged(true);
- bSuccess = true;
}
- }
- break;
- case cursorSelectRowDown:
- {
- if(m_pSelEngine->GetSelectionMode() == NO_SELECTION)
- bSuccess = false;
- else if(m_pSelEngine->GetSelectionMode() == SINGLE_SELECTION)
- {
- bSuccess = false;
- }
- else
+ break;
+ case cursorSelectRowDown:
{
- if(m_nRowSelected.size()>0)
+ if(m_pSelEngine->GetSelectionMode() == NO_SELECTION)
+ bSuccess = false;
+ else if(m_pSelEngine->GetSelectionMode() == SINGLE_SELECTION)
+ {
+ bSuccess = false;
+ }
+ else
{
- //the anchor wasn't set -> a region is not selected, that's why clear all selection
- //and select the current row
- if(m_nAnchor==-1)
+ if(m_aSelectedRows.size()>0)
{
- for(std::vector<RowPos>::iterator it=m_nRowSelected.begin();
- it!=m_nRowSelected.end();++it)
+ //the anchor wasn't set -> a region is not selected, that's why clear all selection
+ //and select the current row
+ if(m_nAnchor==-1)
{
- invalidateSelectedRegion(*it, *it, rCells);
- }
- m_nRowSelected.clear();
- m_nRowSelected.push_back(m_nCurRow);
- invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells);
+ for(std::vector<RowPos>::iterator it=m_aSelectedRows.begin();
+ it!=m_aSelectedRows.end();++it)
+ {
+ invalidateSelectedRegion(*it, *it, rCells);
+ }
+ m_aSelectedRows.clear();
+ m_aSelectedRows.push_back(m_nCurRow);
+ invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells);
+ }
+ else
+ {
+ //a region is already selected, prevRow is last selected row and the row beneath - nextRow - should be selected
+ int prevRow = getRowSelectedNumber(m_aSelectedRows, m_nCurRow);
+ int nextRow = getRowSelectedNumber(m_aSelectedRows, m_nCurRow+1);
+ if(prevRow>-1)
+ {
+ //if m_nCurRow isn't the last one, can move down, otherwise not
+ if(m_nCurRow<m_nRowCount-1)
+ m_nCurRow++;
+ else
+ return bSuccess = true;
+ //if next row already selected, deselect it, otherwise select it
+ if(nextRow>-1 && m_aSelectedRows[nextRow] == m_nCurRow)
+ {
+ m_aSelectedRows.erase(m_aSelectedRows.begin()+prevRow);
+ invalidateSelectedRegion(m_nCurRow-1, m_nCurRow-1, rCells);
+ }
+ else
+ {
+ m_aSelectedRows.push_back(m_nCurRow);
+ invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells);
+ }
+ }
+ else
+ {
+ if(m_nCurRow<m_nRowCount-1)
+ {
+ m_aSelectedRows.push_back(m_nCurRow);
+ m_nCurRow++;
+ m_aSelectedRows.push_back(m_nCurRow);
+ invalidateSelectedRegion(m_nCurRow-1, m_nCurRow, rCells);
+ }
+ }
}
+ }
else
{
- //a region is already selected, prevRow is last selected row and the row beneath - nextRow - should be selected
- int prevRow = getRowSelectedNumber(m_nRowSelected, m_nCurRow);
- int nextRow = getRowSelectedNumber(m_nRowSelected, m_nCurRow+1);
- if(prevRow>-1)
- {
- //if m_nCurRow isn't the last one, can move down, otherwise not
- if(m_nCurRow<m_nRowCount-1)
- m_nCurRow++;
- else
- return bSuccess = true;
- //if next row already selected, deselect it, otherwise select it
- if(nextRow>-1 && m_nRowSelected[nextRow] == m_nCurRow)
- {
- m_nRowSelected.erase(m_nRowSelected.begin()+prevRow);
- invalidateSelectedRegion(m_nCurRow-1, m_nCurRow-1, rCells);
- }
- else
- {
- m_nRowSelected.push_back(m_nCurRow);
- invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells);
- }
+ //there wasn't any selection, select current and row beneath, otherwise only row beneath
+ if(m_nCurRow<m_nRowCount-1)
+ {
+ m_aSelectedRows.push_back(m_nCurRow);
+ m_nCurRow++;
+ m_aSelectedRows.push_back(m_nCurRow);
+ invalidateSelectedRegion(m_nCurRow-1, m_nCurRow, rCells);
}
else
{
- if(m_nCurRow<m_nRowCount-1)
- {
- m_nRowSelected.push_back(m_nCurRow);
- m_nCurRow++;
- m_nRowSelected.push_back(m_nCurRow);
- invalidateSelectedRegion(m_nCurRow-1, m_nCurRow, rCells);
- }
+ m_aSelectedRows.push_back(m_nCurRow);
+ invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells);
}
}
+ m_pSelEngine->SetAnchor(sal_True);
+ m_nAnchor = m_nCurRow;
+ ensureVisible(m_nCurColumn, m_nCurRow, false);
+ selectionChanged = true;
+ bSuccess = true;
}
+ }
+ break;
+
+ case cursorSelectRowAreaTop:
+ {
+ if(m_pSelEngine->GetSelectionMode() == NO_SELECTION)
+ bSuccess = false;
+ else if(m_pSelEngine->GetSelectionMode() == SINGLE_SELECTION)
+ bSuccess = false;
else
{
- //there wasn't any selection, select current and row beneath, otherwise only row beneath
- if(m_nCurRow<m_nRowCount-1)
+ //select the region between the current and the upper row
+ RowPos iter = m_nCurRow;
+ invalidateSelectedRegion(m_nCurRow, 0, rCells);
+ //put the rows in vector
+ while(iter>=0)
{
- m_nRowSelected.push_back(m_nCurRow);
- m_nCurRow++;
- m_nRowSelected.push_back(m_nCurRow);
- invalidateSelectedRegion(m_nCurRow-1, m_nCurRow, rCells);
- }
- else
- {
- m_nRowSelected.push_back(m_nCurRow);
- invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells);
+ if ( !isRowSelected( iter ) )
+ m_aSelectedRows.push_back(iter);
+ --iter;
}
+ m_nCurRow = 0;
+ m_nAnchor = m_nCurRow;
+ m_pSelEngine->SetAnchor(sal_True);
+ ensureVisible(m_nCurColumn, 0, false);
+ selectionChanged = true;
+ bSuccess = true;
}
- m_pSelEngine->SetAnchor(TRUE);
- m_nAnchor = m_nCurRow;
- ensureVisible(m_nCurColumn, m_nCurRow, false);
- m_rAntiImpl.selectionChanged(true);
- bSuccess = true;
}
- }
break;
- case cursorSelectRowAreaTop:
- {
- if(m_pSelEngine->GetSelectionMode() == NO_SELECTION)
- bSuccess = false;
- else if(m_pSelEngine->GetSelectionMode() == SINGLE_SELECTION)
- bSuccess = false;
- else
+
+ case cursorSelectRowAreaBottom:
{
- //select the region between the current and the upper row
+ if(m_pSelEngine->GetSelectionMode() == NO_SELECTION)
+ return bSuccess = false;
+ else if(m_pSelEngine->GetSelectionMode() == SINGLE_SELECTION)
+ return bSuccess = false;
+ //select the region between the current and the last row
RowPos iter = m_nCurRow;
- invalidateSelectedRegion(m_nCurRow, 0, rCells);
- //put the rows in vector
- while(iter>=0)
+ invalidateSelectedRegion(m_nCurRow, m_nRowCount-1, rCells);
+ //put the rows in the vector
+ while(iter<=m_nRowCount)
{
- if(!isRowSelected(m_nRowSelected, iter))
- m_nRowSelected.push_back(iter);
- --iter;
+ if ( !isRowSelected( iter ) )
+ m_aSelectedRows.push_back(iter);
+ ++iter;
}
- m_nCurRow = 0;
+ m_nCurRow = m_nRowCount-1;
m_nAnchor = m_nCurRow;
- m_pSelEngine->SetAnchor(TRUE);
- ensureVisible(m_nCurColumn, 0, false);
- m_rAntiImpl.selectionChanged(true);
+ m_pSelEngine->SetAnchor(sal_True);
+ ensureVisible(m_nCurColumn, m_nRowCount-1, false);
+ selectionChanged = true;
bSuccess = true;
}
- }
- break;
- case cursorSelectRowAreaBottom:
- {
- if(m_pSelEngine->GetSelectionMode() == NO_SELECTION)
- return bSuccess = false;
- else if(m_pSelEngine->GetSelectionMode() == SINGLE_SELECTION)
- return bSuccess = false;
- //select the region between the current and the last row
- RowPos iter = m_nCurRow;
- invalidateSelectedRegion(m_nCurRow, m_nRowCount-1, rCells);
- //put the rows in the vector
- while(iter<=m_nRowCount)
- {
- if(!isRowSelected(m_nRowSelected, iter))
- m_nRowSelected.push_back(iter);
- ++iter;
- }
- m_nCurRow = m_nRowCount-1;
- m_nAnchor = m_nCurRow;
- m_pSelEngine->SetAnchor(TRUE);
- ensureVisible(m_nCurColumn, m_nRowCount-1, false);
- m_rAntiImpl.selectionChanged(true);
- bSuccess = true;
- }
break;
default:
DBG_ERROR( "TableControl_Impl::dispatchAction: unsupported action!" );
+ break;
}
+
+ if ( bSuccess && selectionChanged )
+ {
+ m_rAntiImpl.Select();
+ }
+
return bSuccess;
}
- //--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
void TableControl_Impl::impl_ni_doSwitchCursor( bool _bShow )
{
PTableRenderer pRenderer = !!m_pModel ? m_pModel->getRenderer() : PTableRenderer();
@@ -1537,16 +1860,14 @@ namespace svt { namespace table
{
Rectangle aCellRect;
impl_getCellRect( m_nCurColumn, m_nCurRow, aCellRect );
- if(!m_pModel->hasRowHeaders() && m_nCurColumn == 0)
- aCellRect.Left()++;
if ( _bShow )
- pRenderer->ShowCellCursor( *m_pDataWindow, aCellRect);
+ pRenderer->ShowCellCursor( *m_pDataWindow, aCellRect );
else
- pRenderer->HideCellCursor( *m_pDataWindow, aCellRect);
+ pRenderer->HideCellCursor( *m_pDataWindow, aCellRect );
}
}
- //--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
void TableControl_Impl::impl_getCellRect( ColPos _nColumn, RowPos _nRow, Rectangle& _rCellRect ) const
{
DBG_CHECK_ME();
@@ -1560,164 +1881,236 @@ namespace svt { namespace table
return;
}
- Rectangle aAllCells;
- impl_getAllVisibleCellsArea( aAllCells );
-
- TableCellGeometry aCell( *this, aAllCells, _nColumn, _nRow );
+ TableCellGeometry aCell( *this, impl_getAllVisibleCellsArea(), _nColumn, _nRow );
_rCellRect = aCell.getRect();
- _rCellRect.Top()--;_rCellRect.Left()--;
}
- //-------------------------------------------------------------------------------
- RowPos TableControl_Impl::getCurrentRow(const Point& rPoint)
+
+ //------------------------------------------------------------------------------------------------------------------
+ RowPos TableControl_Impl::getRowAtPoint( const Point& rPoint ) const
+ {
+ DBG_CHECK_ME();
+ return impl_getRowForAbscissa( rPoint.Y() );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ColPos TableControl_Impl::getColAtPoint( const Point& rPoint ) const
{
DBG_CHECK_ME();
- Rectangle rCellRect;
- RowPos newRowPos = -2;//-1 is HeaderRow
- ColPos newColPos = 0;
- for(int i=-1;i<m_nRowCount;i++)
+ return impl_getColumnForOrdinate( rPoint.X() );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ TableCell TableControl_Impl::hitTest( Point const & i_point ) const
+ {
+ TableCell aCell( getColAtPoint( i_point ), getRowAtPoint( i_point ) );
+ if ( aCell.nColumn > COL_ROW_HEADERS )
{
- for(int j=-1;j<m_nColumnCount;j++)
+ PColumnModel const pColumn = m_pModel->getColumnModel( aCell.nColumn );
+ MutableColumnMetrics const & rColInfo( m_aColumnWidths[ aCell.nColumn ] );
+ if ( ( rColInfo.getEnd() - 3 <= i_point.X() )
+ && ( rColInfo.getEnd() >= i_point.X() )
+ && pColumn->isResizable()
+ )
{
- impl_getCellRect(j,i,rCellRect);
- if((rPoint.X() >= rCellRect.Left() && rPoint.X() <= rCellRect.Right()) && rPoint.Y() >= rCellRect.Top() && rPoint.Y() <= rCellRect.Bottom())
- {
- newRowPos = i;
- newColPos = j;
- if(newColPos != -1)
- m_nCurColumn = newColPos;
- return newRowPos;
- }
+ aCell.eArea = ColumnDivider;
}
}
- return newRowPos;
+ return aCell;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ColumnMetrics TableControl_Impl::getColumnMetrics( ColPos const i_column ) const
+ {
+ DBG_CHECK_ME();
+
+ ENSURE_OR_RETURN( ( i_column >= 0 ) && ( i_column < m_pModel->getColumnCount() ),
+ "TableControl_Impl::getColumnMetrics: illegal column index!", ColumnMetrics() );
+ return (ColumnMetrics const &)m_aColumnWidths[ i_column ];
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ PTableModel TableControl_Impl::getModel() const
+ {
+ return m_pModel;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ RowPos TableControl_Impl::getCurrentColumn() const
+ {
+ return m_nCurColumn;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ RowPos TableControl_Impl::getCurrentRow() const
+ {
+ return m_nCurRow;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::Size TableControl_Impl::getTableSizePixel() const
+ {
+ return m_pDataWindow->GetOutputSizePixel();
}
- //-------------------------------------------------------------------------------
- void TableControl_Impl::setCursorAtCurrentCell(const Point& rPoint)
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TableControl_Impl::setPointer( Pointer const & i_pointer )
{
DBG_CHECK_ME();
- hideCursor();
- Rectangle rCellRect;
- RowPos newRowPos = -2;//-1 is HeaderRow
- ColPos newColPos = 0;
- for(int i=0;i<m_nRowCount;i++)
+ m_pDataWindow->SetPointer( i_pointer );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TableControl_Impl::captureMouse()
+ {
+ m_pDataWindow->CaptureMouse();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TableControl_Impl::releaseMouse()
+ {
+ m_pDataWindow->ReleaseMouse();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TableControl_Impl::invalidate( TableArea const i_what )
+ {
+ switch ( i_what )
{
- for(int j=-1;j<m_nColumnCount;j++)
- {
- impl_getCellRect(j,i,rCellRect);
- if((rPoint.X() >= rCellRect.Left() && rPoint.X() <= rCellRect.Right()) && rPoint.Y() >= rCellRect.Top() && rPoint.Y() <= rCellRect.Bottom())
- {
- newRowPos = i;
- m_nCurRow = newRowPos;
- newColPos = j;
- if(newColPos == -1)
- m_nCurColumn = 0;
- else
- m_nCurColumn = newColPos;
- }
- }
+ case TableAreaColumnHeaders:
+ m_pDataWindow->Invalidate( calcHeaderRect( true ) );
+ break;
+
+ case TableAreaRowHeaders:
+ m_pDataWindow->Invalidate( calcHeaderRect( false ) );
+ break;
+
+ case TableAreaDataArea:
+ m_pDataWindow->Invalidate( impl_getAllVisibleDataCellArea() );
+ break;
+
+ case TableAreaAll:
+ m_pDataWindow->Invalidate();
+ break;
}
- showCursor();
}
- //-------------------------------------------------------------------------------
+
+ //------------------------------------------------------------------------------------------------------------------
+ long TableControl_Impl::pixelWidthToAppFont( long const i_pixels ) const
+ {
+ return m_pDataWindow->PixelToLogic( Size( i_pixels, 0 ), MAP_APPFONT ).Width();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TableControl_Impl::hideTracking()
+ {
+ m_pDataWindow->HideTracking();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TableControl_Impl::showTracking( Rectangle const & i_location, sal_uInt16 const i_flags )
+ {
+ m_pDataWindow->ShowTracking( i_location, i_flags );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ bool TableControl_Impl::activateCell( ColPos const i_col, RowPos const i_row )
+ {
+ DBG_CHECK_ME();
+ return goTo( i_col, i_row );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
void TableControl_Impl::invalidateSelectedRegion(RowPos _nPrevRow, RowPos _nCurRow, Rectangle& _rCellRect)
{
DBG_CHECK_ME();
- Rectangle aAllCells;
//get the visible area of the table control and set the Left and right border of the region to be repainted
- impl_getAllVisibleCellsArea( aAllCells );
+ Rectangle const aAllCells( impl_getAllVisibleCellsArea() );
_rCellRect.Left() = aAllCells.Left();
_rCellRect.Right() = aAllCells.Right();
- Rectangle rCells;
//if only one row is selected
if(_nPrevRow == _nCurRow)
{
- impl_getCellRect(m_nCurColumn,_nCurRow,rCells);
- _rCellRect.Top()=--rCells.Top();
- _rCellRect.Bottom()=rCells.Bottom();
+ Rectangle aCellRect;
+ impl_getCellRect( m_nCurColumn, _nCurRow, aCellRect );
+ _rCellRect.Top() = aCellRect.Top();
+ _rCellRect.Bottom() = aCellRect.Bottom();
}
//if the region is above the current row
else if(_nPrevRow < _nCurRow )
{
- impl_getCellRect(m_nCurColumn,_nPrevRow,rCells);
- _rCellRect.Top()= --rCells.Top();
- impl_getCellRect(m_nCurColumn,_nCurRow,rCells);
- _rCellRect.Bottom()=rCells.Bottom();
+ Rectangle aCellRect;
+ impl_getCellRect( m_nCurColumn, _nPrevRow, aCellRect );
+ _rCellRect.Top() = aCellRect.Top();
+ impl_getCellRect( m_nCurColumn, _nCurRow, aCellRect );
+ _rCellRect.Bottom() = aCellRect.Bottom();
}
//if the region is beneath the current row
else
{
- impl_getCellRect(m_nCurColumn,_nCurRow,rCells);
- _rCellRect.Top()= --rCells.Top();
- impl_getCellRect(m_nCurColumn,_nPrevRow,rCells);
- _rCellRect.Bottom()=rCells.Bottom();
+ Rectangle aCellRect;
+ impl_getCellRect( m_nCurColumn, _nCurRow, aCellRect );
+ _rCellRect.Top() = aCellRect.Top();
+ impl_getCellRect( m_nCurColumn, _nPrevRow, aCellRect );
+ _rCellRect.Bottom() = aCellRect.Bottom();
}
m_pDataWindow->Invalidate(_rCellRect);
}
- //-------------------------------------------------------------------------------
- //this method is to be called, when a new row is added
- void TableControl_Impl::invalidateRow(RowPos _nRowPos, Rectangle& _rCellRect)
+ //------------------------------------------------------------------------------------------------------------------
+ void TableControl_Impl::invalidateRowRange( RowPos const i_firstRow, RowPos const i_lastRow )
{
- if(m_nCurRow < 0)
- m_nCurRow = 0;
- if(m_nCursorHidden == 2)
+ if ( m_nCursorHidden == 2 )
+ // WTF? what kind of hack is this?
--m_nCursorHidden;
- impl_getAllVisibleCellsArea( _rCellRect );
- TableRowGeometry _rRow( *this, _rCellRect, _nRowPos);
- impl_ni_updateScrollbars();
- m_pDataWindow->Invalidate(_rRow.getRect());
- }
- //-------------------------------------------------------------------------------
- std::vector<RowPos>& TableControl_Impl::getSelectedRows()
- {
- return m_nRowSelected;
- }
- //--------------------------------------------------------------------
- void TableControl_Impl::clearSelection()
- {
- m_nRowSelected.clear();
- }
- //--------------------------------------------------------------------
- //-------------------------------------------------------------------------------
- void TableControl_Impl::removeSelectedRow(RowPos _nRowPos)
- {
- int i =0;
- //if the row is selected, remove it from the selection vector
- if(isRowSelected(m_nRowSelected, _nRowPos))
- {
- if(m_nRowSelected.size()>1)
- m_nRowSelected.erase(m_nRowSelected.begin()+_nRowPos);
- else
- m_nRowSelected.clear();
- }
- //after removing a row, row positions must be updated, so selected rows could stay selected
- if(m_nRowSelected.size()>1)
+
+ RowPos const firstRow = i_firstRow < m_nTopRow ? m_nTopRow : i_firstRow;
+ RowPos const lastVisibleRow = m_nTopRow + impl_getVisibleRows( true ) - 1;
+ RowPos const lastRow = ( ( i_lastRow == ROW_INVALID ) || ( i_lastRow > lastVisibleRow ) ) ? lastVisibleRow : i_lastRow;
+
+ Rectangle aInvalidateRect;
+
+ Rectangle const aVisibleCellsArea( impl_getAllVisibleCellsArea() );
+ TableRowGeometry aRow( *this, aVisibleCellsArea, firstRow, true );
+ while ( aRow.isValid() && ( aRow.getRow() <= lastRow ) )
{
- for(std::vector<RowPos>::iterator it=m_nRowSelected.begin();it!=m_nRowSelected.end();++it)
- {
- if(*it > _nRowPos)
- m_nRowSelected[i]=*it-1;
- ++i;
- }
+ aInvalidateRect.Union( aRow.getRect() );
+ aRow.moveDown();
}
- if(_nRowPos == 0)
- m_nCurRow = 0;
- else
- m_nCurRow = _nRowPos-1;
+
+ if ( i_lastRow == ROW_INVALID )
+ aInvalidateRect.Bottom() = m_pDataWindow->GetOutputSizePixel().Height();
+
+ m_pDataWindow->Invalidate( aInvalidateRect );
}
+
//------------------------------------------------------------------------------
- void TableControl_Impl::invalidateRows()
+ void TableControl_Impl::checkCursorPosition()
{
- impl_ni_updateScrollbars();
+ DBG_CHECK_ME();
+
TableSize nVisibleRows = impl_getVisibleRows(true);
TableSize nVisibleCols = impl_getVisibleColumns(true);
- if(m_nTopRow+nVisibleRows>m_nRowCount && m_nRowCount>=nVisibleRows)
- m_nTopRow--;
+ if ( ( m_nTopRow + nVisibleRows > m_nRowCount )
+ && ( m_nRowCount >= nVisibleRows )
+ )
+ {
+ --m_nTopRow;
+ }
else
+ {
m_nTopRow = 0;
- if(m_nLeftColumn+nVisibleCols>m_nColumnCount && m_nColumnCount>=nVisibleCols)
- m_nLeftColumn--;
+ }
+
+ if ( ( m_nLeftColumn + nVisibleCols > m_nColumnCount )
+ && ( m_nColumnCount >= nVisibleCols )
+ )
+ {
+ --m_nLeftColumn;
+ }
else
+ {
m_nLeftColumn = 0;
+ }
+
m_pDataWindow->Invalidate();
}
@@ -1736,7 +2129,7 @@ namespace svt { namespace table
}
//--------------------------------------------------------------------
- TableSize TableControl_Impl::impl_getVisibleColumns( bool _bAcceptPartialRow ) const
+ TableSize TableControl_Impl::impl_getVisibleColumns( bool _bAcceptPartialCol ) const
{
DBG_CHECK_ME();
@@ -1746,7 +2139,7 @@ namespace svt { namespace table
Rectangle( Point( 0, 0 ), m_pDataWindow->GetOutputSizePixel() ),
m_nLeftColumn,
*this,
- _bAcceptPartialRow
+ _bAcceptPartialCol
);
}
@@ -1757,12 +2150,15 @@ namespace svt { namespace table
// TODO: give veto listeners a chance
- if ( ( _nColumn < -1 ) || ( _nColumn >= m_nColumnCount )
- || ( _nRow < -1 ) || ( _nRow >= m_nRowCount )
+ if ( ( _nColumn < 0 ) || ( _nColumn >= m_nColumnCount )
+ || ( _nRow < 0 ) || ( _nRow >= m_nRowCount )
)
+ {
+ OSL_ENSURE( false, "TableControl_Impl::goTo: invalid row or column index!" );
return false;
+ }
- TempHideCursor aHideCursor( *this );
+ SuppressCursor aHideCursor( *this );
m_nCurColumn = _nColumn;
m_nCurRow = _nRow;
@@ -1779,32 +2175,40 @@ namespace svt { namespace table
&& ( _nRow >= 0 ) && ( _nRow < m_nRowCount ),
"TableControl_Impl::ensureVisible: invalid coordinates!" );
- TempHideCursor aHideCursor( *this );
+ SuppressCursor aHideCursor( *this );
if ( _nColumn < m_nLeftColumn )
- impl_ni_ScrollColumns( _nColumn - m_nLeftColumn );
+ impl_scrollColumns( _nColumn - m_nLeftColumn );
else
{
TableSize nVisibleColumns = impl_getVisibleColumns( _bAcceptPartialVisibility );
if ( _nColumn > m_nLeftColumn + nVisibleColumns - 1 )
{
- impl_ni_ScrollColumns( _nColumn - ( m_nLeftColumn + nVisibleColumns - 1 ) );
+ impl_scrollColumns( _nColumn - ( m_nLeftColumn + nVisibleColumns - 1 ) );
// TODO: since not all columns have the same width, this might in theory result
// in the column still not being visible.
}
}
if ( _nRow < m_nTopRow )
- impl_ni_ScrollRows( _nRow - m_nTopRow );
+ impl_scrollRows( _nRow - m_nTopRow );
else
{
TableSize nVisibleRows = impl_getVisibleRows( _bAcceptPartialVisibility );
if ( _nRow > m_nTopRow + nVisibleRows - 1 )
- impl_ni_ScrollRows( _nRow - ( m_nTopRow + nVisibleRows - 1 ) );
+ impl_scrollRows( _nRow - ( m_nTopRow + nVisibleRows - 1 ) );
}
}
//--------------------------------------------------------------------
+ ::rtl::OUString TableControl_Impl::getCellContentAsString( RowPos const i_row, ColPos const i_col )
+ {
+ ::com::sun::star::uno::Any content;
+ m_pModel->getCellContent( i_col, i_row, content );
+ return CellValueConversion::convertToString( content );
+ }
+
+ //--------------------------------------------------------------------
TableSize TableControl_Impl::impl_ni_ScrollRows( TableSize _nRowDelta )
{
// compute new top row
@@ -1818,10 +2222,10 @@ namespace svt { namespace table
m_nTopRow = nNewTopRow;
// if updates are enabled currently, scroll the viewport
- if ( m_rAntiImpl.IsUpdateMode() && ( m_nTopRow != nOldTopRow ) )
+ if ( m_nTopRow != nOldTopRow )
{
DBG_SUSPEND_INV( INV_SCROLL_POSITION );
- TempHideCursor aHideCursor( *this );
+ SuppressCursor aHideCursor( *this );
// TODO: call a onStartScroll at our listener (or better an own onStartScroll,
// which hides the cursor and then calls the listener)
// Same for onEndScroll
@@ -1844,43 +2248,68 @@ namespace svt { namespace table
m_pVScroll->SetThumbPos( m_nTopRow );
}
+ // The scroll bar availaility might change when we scrolled. This is because we do not hide
+ // the scrollbar when it is, in theory, unnecessary, but currently at a position > 0. In this case, it will
+ // be auto-hidden when it's scrolled back to pos 0.
+ if ( m_nTopRow == 0 )
+ m_rAntiImpl.PostUserEvent( LINK( this, TableControl_Impl, OnUpdateScrollbars ) );
+
return (TableSize)( m_nTopRow - nOldTopRow );
}
//--------------------------------------------------------------------
+ TableSize TableControl_Impl::impl_scrollRows( TableSize const i_rowDelta )
+ {
+ DBG_CHECK_ME();
+ return impl_ni_ScrollRows( i_rowDelta );
+ }
+
+ //--------------------------------------------------------------------
TableSize TableControl_Impl::impl_ni_ScrollColumns( TableSize _nColumnDelta )
{
// compute new left column
- ColPos nNewLeftColumn =
+ const ColPos nNewLeftColumn =
::std::max(
::std::min( (ColPos)( m_nLeftColumn + _nColumnDelta ), (ColPos)( m_nColumnCount - 1 ) ),
(ColPos)0
);
- ColPos nOldLeftColumn = m_nLeftColumn;
+ const ColPos nOldLeftColumn = m_nLeftColumn;
m_nLeftColumn = nNewLeftColumn;
// if updates are enabled currently, scroll the viewport
- if ( m_rAntiImpl.IsUpdateMode() && ( m_nLeftColumn != nOldLeftColumn ) )
+ if ( m_nLeftColumn != nOldLeftColumn )
{
DBG_SUSPEND_INV( INV_SCROLL_POSITION );
- TempHideCursor aHideCursor( *this );
+ SuppressCursor aHideCursor( *this );
// TODO: call a onStartScroll at our listener (or better an own onStartScroll,
// which hides the cursor and then calls the listener)
// Same for onEndScroll
// scroll the view port, if possible
- Rectangle aDataArea( Point( m_nRowHeaderWidthPixel, 0 ), m_pDataWindow->GetOutputSizePixel() );
+ const Rectangle aDataArea( Point( m_nRowHeaderWidthPixel, 0 ), m_pDataWindow->GetOutputSizePixel() );
long nPixelDelta =
- ( m_nLeftColumn > 0 ? m_aAccColumnWidthsPixel[ m_nLeftColumn - 1 ] : 0 )
- - ( nOldLeftColumn > 0 ? m_aAccColumnWidthsPixel[ nOldLeftColumn - 1 ] : 0 );
+ m_aColumnWidths[ nOldLeftColumn ].getStart()
+ - m_aColumnWidths[ m_nLeftColumn ].getStart();
+
+ // update our column positions
+ // Do this *before* scrolling, as SCROLL_UPDATE will trigger a paint, which already needs the correct
+ // information in m_aColumnWidths
+ for ( ColumnPositions::iterator colPos = m_aColumnWidths.begin();
+ colPos != m_aColumnWidths.end();
+ ++colPos
+ )
+ {
+ colPos->move( nPixelDelta );
+ }
+ // scroll the window content (if supported and possible), or invalidate the complete window
if ( m_pDataWindow->GetBackground().IsScrollable()
&& abs( nPixelDelta ) < aDataArea.GetWidth()
)
{
- m_pDataWindow->Scroll( (long)-nPixelDelta, 0, aDataArea, SCROLL_CLIP | SCROLL_UPDATE );
+ m_pDataWindow->Scroll( nPixelDelta, 0, aDataArea, SCROLL_CLIP | SCROLL_UPDATE );
}
else
m_pDataWindow->Invalidate( INVALIDATE_UPDATE );
@@ -1889,39 +2318,55 @@ namespace svt { namespace table
m_pHScroll->SetThumbPos( m_nLeftColumn );
}
+ // The scroll bar availaility might change when we scrolled. This is because we do not hide
+ // the scrollbar when it is, in theory, unnecessary, but currently at a position > 0. In this case, it will
+ // be auto-hidden when it's scrolled back to pos 0.
+ if ( m_nLeftColumn == 0 )
+ m_rAntiImpl.PostUserEvent( LINK( this, TableControl_Impl, OnUpdateScrollbars ) );
+
return (TableSize)( m_nLeftColumn - nOldLeftColumn );
}
- //-------------------------------------------------------------------------------
- SelectionEngine* TableControl_Impl::getSelEngine()
+
+ //------------------------------------------------------------------------------------------------------------------
+ TableSize TableControl_Impl::impl_scrollColumns( TableSize const i_columnDelta )
{
- return m_pSelEngine;
+ DBG_CHECK_ME();
+ return impl_ni_ScrollColumns( i_columnDelta );
}
- //-------------------------------------------------------------------------------
- TableDataWindow* TableControl_Impl::getDataWindow()
+
+ //------------------------------------------------------------------------------------------------------------------
+ SelectionEngine* TableControl_Impl::getSelEngine()
{
- return m_pDataWindow;
+ return m_pSelEngine;
}
- //-------------------------------------------------------------------------------
+
+ //------------------------------------------------------------------------------------------------------------------
ScrollBar* TableControl_Impl::getHorzScrollbar()
{
return m_pHScroll;
}
- //-------------------------------------------------------------------------------
+
+ //------------------------------------------------------------------------------------------------------------------
ScrollBar* TableControl_Impl::getVertScrollbar()
{
return m_pVScroll;
}
- //-------------------------------------------------------------------------------
- BOOL TableControl_Impl::isRowSelected(const ::std::vector<RowPos>& selectedRows, RowPos current)
+
+ //------------------------------------------------------------------------------------------------------------------
+ bool TableControl_Impl::isRowSelected( RowPos i_row ) const
{
- return ::std::find(selectedRows.begin(),selectedRows.end(),current) != selectedRows.end();
+ return ::std::find( m_aSelectedRows.begin(), m_aSelectedRows.end(), i_row ) != m_aSelectedRows.end();
}
- //-------------------------------------------------------------------------------
- bool TableControl_Impl::isRowSelected(RowPos current)
+
+ //------------------------------------------------------------------------------------------------------------------
+ RowPos TableControl_Impl::getSelectedRowIndex( size_t const i_selectionIndex ) const
{
- return ::std::find(m_nRowSelected.begin(),m_nRowSelected.end(),current) != m_nRowSelected.end();
+ if ( i_selectionIndex < m_aSelectedRows.size() )
+ return m_aSelectedRows[ i_selectionIndex ];
+ return ROW_INVALID;
}
- //-------------------------------------------------------------------------------
+
+ //------------------------------------------------------------------------------------------------------------------
int TableControl_Impl::getRowSelectedNumber(const ::std::vector<RowPos>& selectedRows, RowPos current)
{
std::vector<RowPos>::const_iterator it = ::std::find(selectedRows.begin(),selectedRows.end(),current);
@@ -1931,281 +2376,158 @@ namespace svt { namespace table
}
return -1;
}
- //-------------------------------------------------------------------------------
- bool TableControl_Impl::isTooltipActive()
- {
- return m_rAntiImpl.isTooltip();
- }
- //-------------------------------------------------------------------------------
- ::rtl::OUString& TableControl_Impl::setTooltip(const Point& rPoint )
+
+ //--------------------------------------------------------------------
+ ColPos TableControl_Impl::impl_getColumnForOrdinate( long const i_ordinate ) const
{
- ::rtl::OUString aTooltipText;
- RowPos current = getCurrentRow(rPoint);
- com::sun::star::uno::Sequence< sal_Int32 > cols = m_rAntiImpl.getColumnsForTooltip();
- com::sun::star::uno::Sequence< ::rtl::OUString > text = m_rAntiImpl.getTextForTooltip();
- if(text.getLength()==0 && cols.getLength()==0)
- {
- ::com::sun::star::uno::Any content = m_pModel->getCellContent()[current][m_nCurColumn];
- aTooltipText = convertToString(content);
- }
- else if(text.getLength() == 0)
- {
- for(int i=0; i<cols.getLength(); i++)
- {
- if(i==0)
- {
- ::com::sun::star::uno::Any content = m_pModel->getCellContent()[current][cols[i]];
- aTooltipText = convertToString(content);
- }
- else
- {
- aTooltipText+= ::rtl::OUString::createFromAscii("\n");
- ::com::sun::star::uno::Any content = m_pModel->getCellContent()[current][cols[i]];
- aTooltipText += convertToString(content);
- }
- }
- }
- else if(cols.getLength() == 0)
- {
- for(int i=0; i<text.getLength(); i++)
- {
- if(i==0)
- aTooltipText = text[i];
- else
- {
- aTooltipText+= ::rtl::OUString::createFromAscii("\n");
- aTooltipText+= text[i];
- }
- }
- }
- else
+ DBG_CHECK_ME();
+
+ if ( ( m_aColumnWidths.empty() ) || ( i_ordinate < 0 ) )
+ return COL_INVALID;
+
+ if ( i_ordinate < m_nRowHeaderWidthPixel )
+ return COL_ROW_HEADERS;
+
+ long const ordinate = i_ordinate - m_nRowHeaderWidthPixel;
+
+ ColumnPositions::const_iterator lowerBound = ::std::lower_bound(
+ m_aColumnWidths.begin(),
+ m_aColumnWidths.end(),
+ ordinate + 1,
+ ColumnInfoPositionLess()
+ );
+ if ( lowerBound == m_aColumnWidths.end() )
{
- int nCols = cols.getLength();
- int mText = text.getLength();
- if(nCols < mText )
- cols.realloc(mText);
- else if(mText < nCols)
- text.realloc(nCols);
- for(int i=0; i<cols.getLength(); i++)
- {
- if(i==0)
- {
- ::com::sun::star::uno::Any content = m_pModel->getCellContent()[current][cols[i]];
- aTooltipText = text[i] + convertToString(content);
- }
- else
- {
- aTooltipText+= ::rtl::OUString::createFromAscii("\n");
- aTooltipText+= text[i];
- if(nCols > i)
- {
- ::com::sun::star::uno::Any content = m_pModel->getCellContent()[current][cols[i]];
- ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic >xGraphic;
- aTooltipText += convertToString(content);
- }
- }
- }
+ // point is *behind* the start of the last column ...
+ if ( ordinate < m_aColumnWidths.rbegin()->getEnd() )
+ // ... but still before its end
+ return m_nColumnCount - 1;
+ return COL_INVALID;
}
- return m_aTooltipText = aTooltipText;
+ return lowerBound - m_aColumnWidths.begin();
}
+
//--------------------------------------------------------------------
- void TableControl_Impl::resizeColumn(const Point& rPoint)
- {
- Pointer aNewPointer(POINTER_ARROW);
- int headerRowWidth = 0;
- if(m_pModel->hasRowHeaders())
- headerRowWidth = m_rAntiImpl.LogicToPixel( Size(m_pModel->getRowHeaderWidth(), 0 ), MAP_APPFONT ).Width();
- int resizingColumn=m_nCurColumn-m_nLeftColumn;
- PColumnModel pColumn = m_pModel->getColumnModel(m_nCurColumn);
- impl_ni_getAccVisibleColWidths();
- int newColWidth = m_aColumnWidthsPixel[m_nCurColumn];
- //make resize area for the separator wider
- int nLeft = m_aVisibleColumnWidthsPixel[resizingColumn]-4;
- //subtract 1 from m_aAccColumnWidthPixel because right border should be part of the current cell
- int nRight = m_aVisibleColumnWidthsPixel[resizingColumn]-1;
- if( rPoint.X()> nLeft && rPoint.X()<nRight && pColumn->isResizable())
- aNewPointer = Pointer( POINTER_HSPLIT );
- //MouseButton was pressed but not yet released, mouse is moving
- if(m_bResizing)
- {
- if(rPoint.X() > m_pDataWindow->GetOutputSizePixel().Width() || rPoint.X() < m_aVisibleColumnWidthsPixel[resizingColumn]-newColWidth)
- aNewPointer = Pointer( POINTER_NOTALLOWED);
- else
- aNewPointer = Pointer( POINTER_HSPLIT );
- m_pDataWindow->HideTracking();
- int lineHeight = 0;
- if(m_pModel->hasColumnHeaders())
- lineHeight+= m_nColHeaderHeightPixel;
- lineHeight+=m_nRowHeightPixel*m_nRowCount;
- int gridHeight = m_pDataWindow->GetOutputSizePixel().Height();
- if(lineHeight >= gridHeight)
- lineHeight = gridHeight;
- m_pDataWindow->ShowTracking(Rectangle(Point(rPoint.X(),0), Size(1, lineHeight )),
- SHOWTRACK_SPLIT | SHOWTRACK_WINDOW);
- }
- m_pDataWindow->SetPointer(aNewPointer);
+ RowPos TableControl_Impl::impl_getRowForAbscissa( long const i_abscissa ) const
+ {
+ DBG_CHECK_ME();
+
+ if ( i_abscissa < 0 )
+ return ROW_INVALID;
+
+ if ( i_abscissa < m_nColHeaderHeightPixel )
+ return ROW_COL_HEADERS;
+
+ long const abscissa = i_abscissa - m_nColHeaderHeightPixel;
+ long const row = m_nTopRow + abscissa / m_nRowHeightPixel;
+ return row < m_pModel->getRowCount() ? row : ROW_INVALID;
}
+
//--------------------------------------------------------------------
- bool TableControl_Impl::startResizeColumn(const Point& rPoint)
+ bool TableControl_Impl::markRowAsDeselected( RowPos const i_rowIndex )
{
- m_bResizingGrid = false;
- m_nResizingColumn = m_nCurColumn;
- PColumnModel pColumn = m_pModel->getColumnModel(m_nResizingColumn);
- //make resize area for the separator wider
- int nLeft = m_aVisibleColumnWidthsPixel[m_nResizingColumn-m_nLeftColumn]-4;
- int nRight = m_aVisibleColumnWidthsPixel[m_nResizingColumn-m_nLeftColumn]-1;
- if(rPoint.X()> nLeft && rPoint.X()<nRight && pColumn->isResizable())
- {
- m_pDataWindow->CaptureMouse();
- m_bResizing = true;
- }
- return m_bResizing;
+ DBG_CHECK_ME();
+
+ ::std::vector< RowPos >::iterator selPos = ::std::find( m_aSelectedRows.begin(), m_aSelectedRows.end(), i_rowIndex );
+ if ( selPos == m_aSelectedRows.end() )
+ return false;
+
+ m_aSelectedRows.erase( selPos );
+ return true;
}
+
//--------------------------------------------------------------------
- bool TableControl_Impl::endResizeColumn(const Point& rPoint)
- {
- if(m_bResizing)
- {
- m_pDataWindow->HideTracking();
- PColumnModel pColumn = m_pModel->getColumnModel(m_nResizingColumn);
- int maxWidth = m_rAntiImpl.LogicToPixel( Size( pColumn->getMaxWidth(), 0 ), MAP_APPFONT ).Width();
- int minWidth = m_rAntiImpl.LogicToPixel( Size( pColumn->getMinWidth(), 0 ), MAP_APPFONT ).Width();
- int resizeCol = m_nResizingColumn-m_nLeftColumn;
- //new position of mouse
- int actX = rPoint.X();
- //old position of right border
- int oldX = m_aVisibleColumnWidthsPixel[resizeCol];
- //position of left border if cursor in the first cell
- int leftX = 0;
- if(m_nResizingColumn > m_nLeftColumn)
- leftX = m_aVisibleColumnWidthsPixel[resizeCol-1];
- else if(m_nResizingColumn == m_nLeftColumn && m_pModel->hasRowHeaders())
- leftX = m_rAntiImpl.LogicToPixel( Size( m_pModel->getRowHeaderWidth(), 0 ), MAP_APPFONT ).Width();
- int actWidth = actX - leftX;
- int newActWidth = 0;
- //minimize the column width
- if(oldX > actX && actX >= leftX)
+ bool TableControl_Impl::markRowAsSelected( RowPos const i_rowIndex )
+ {
+ DBG_CHECK_ME();
+
+ if ( isRowSelected( i_rowIndex ) )
+ return false;
+
+ SelectionMode const eSelMode = getSelEngine()->GetSelectionMode();
+ switch ( eSelMode )
+ {
+ case SINGLE_SELECTION:
+ if ( !m_aSelectedRows.empty() )
{
- if(minWidth < actWidth)
- {
- newActWidth = m_rAntiImpl.PixelToLogic( Size( actWidth, 0 ), MAP_APPFONT ).Width();
- pColumn->setPreferredWidth(newActWidth);
- }
- else
- pColumn->setPreferredWidth(pColumn->getMinWidth());
- if(m_nLeftColumn != 0)
- impl_updateLeftColumn();
+ OSL_ENSURE( m_aSelectedRows.size() == 1, "TableControl::markRowAsSelected: SingleSelection with more than one selected element?" );
+ m_aSelectedRows[0] = i_rowIndex;
+ break;
+ }
+ // fall through
+
+ case MULTIPLE_SELECTION:
+ m_aSelectedRows.push_back( i_rowIndex );
+ break;
+
+ default:
+ OSL_ENSURE( false, "TableControl_Impl::markRowAsSelected: unsupported selection mode!" );
+ return false;
}
- else if(oldX < actX)
+
+ return true;
+ }
+
+ //--------------------------------------------------------------------
+ bool TableControl_Impl::markAllRowsAsDeselected()
+ {
+ if ( m_aSelectedRows.empty() )
+ return false;
+
+ m_aSelectedRows.clear();
+ return true;
+ }
+
+ //--------------------------------------------------------------------
+ bool TableControl_Impl::markAllRowsAsSelected()
+ {
+ DBG_CHECK_ME();
+
+ SelectionMode const eSelMode = getSelEngine()->GetSelectionMode();
+ ENSURE_OR_RETURN_FALSE( eSelMode == MULTIPLE_SELECTION, "TableControl_Impl::markAllRowsAsSelected: unsupported selection mode!" );
+
+ if ( m_aSelectedRows.size() == size_t( m_pModel->getRowCount() ) )
{
- if(actWidth < maxWidth)
+ #if OSL_DEBUG_LEVEL > 0
+ for ( TableSize row = 0; row < m_pModel->getRowCount(); ++row )
{
- newActWidth = m_rAntiImpl.PixelToLogic( Size( actWidth, 0 ), MAP_APPFONT ).Width();
- pColumn->setPreferredWidth(newActWidth);
+ OSL_ENSURE( isRowSelected( row ), "TableControl_Impl::markAllRowsAsSelected: inconsistency in the selected rows!" );
}
- else
- pColumn->setPreferredWidth(pColumn->getMaxWidth());
+ #endif
+ // already all rows marked as selected
+ return false;
}
- m_nCurColumn = m_nResizingColumn;
- impl_ni_updateColumnWidths();
- impl_ni_updateScrollbars();
- m_pDataWindow->Invalidate(INVALIDATE_UPDATE);
- m_pDataWindow->SetPointer(Pointer());
- m_bResizing = false;
- m_bResizingGrid = true;
- }
- m_pDataWindow->ReleaseMouse();
- return m_bResizing;
- }
- //-------------------------------------------------------------------------------
- void TableControl_Impl::impl_ni_getAccVisibleColWidths()
- {
- TableSize nVisCols = impl_getVisibleColumns(true);
- int widthsPixel = 0;
- m_aVisibleColumnWidthsPixel.resize(0);
- m_aVisibleColumnWidthsPixel.reserve(nVisCols);
- int headerRowWidth = 0;
- if(m_pModel->hasRowHeaders())
- {
- headerRowWidth = m_rAntiImpl.LogicToPixel( Size(m_pModel->getRowHeaderWidth(), 0 ), MAP_APPFONT ).Width();
- widthsPixel+=headerRowWidth;
- }
- int col = m_nLeftColumn;
- while(nVisCols)
- {
- m_aVisibleColumnWidthsPixel.push_back(widthsPixel+=m_aColumnWidthsPixel[col]);
- col++;
- nVisCols--;
- }
- }
- //-------------------------------------------------------------------------------
- void TableControl_Impl::impl_updateLeftColumn()
- {
- int nVisCols = m_aVisibleColumnWidthsPixel.size();
- int headerRowWidth = 0;
- //sum of currently visible columns
- int widthsPixel = 0;
- //header pixel should be added, because header doesn't vanish when scrolling
- if(m_pModel->hasRowHeaders())
- {
- headerRowWidth = m_rAntiImpl.LogicToPixel( Size(m_pModel->getRowHeaderWidth(), 0 ), MAP_APPFONT ).Width();
- widthsPixel+=headerRowWidth;
- }
- int col = m_nLeftColumn;
- //add column width of the neighbour of the left column
- widthsPixel+=m_aColumnWidthsPixel[col-1];
- //compute the sum of the new column widths
- while(nVisCols)
- {
- PColumnModel pColumn = m_pModel->getColumnModel(col);
- int colWidth = pColumn->getWidth();
- int colPrefWidth = pColumn->getPreferredWidth();
- if(colPrefWidth!=0)
- colWidth = colPrefWidth;
- widthsPixel += m_rAntiImpl.LogicToPixel( Size( colWidth, 0 ), MAP_APPFONT ).Width();
- col++;
- nVisCols--;
- }
- //when the sum of all visible columns and the next to the left column is smaller than
- //window width, then update m_nLeftColumn
- if(widthsPixel<m_pDataWindow->GetOutputSizePixel().Width())
- m_nLeftColumn--;
+
+ m_aSelectedRows.clear();
+ for ( RowPos i=0; i < m_pModel->getRowCount(); ++i )
+ m_aSelectedRows.push_back(i);
+
+ return true;
}
+
//--------------------------------------------------------------------
- rtl::OUString TableControl_Impl::convertToString(const ::com::sun::star::uno::Any& value)
- {
- sal_Int32 nInt = 0;
- sal_Bool bBool = false;
- double fDouble = 0;
- ::rtl::OUString sNewString;
- ::rtl::OUString sConvertString;
- if(value >>= sConvertString)
- sNewString = sConvertString;
- else if(value >>= nInt)
- sNewString = sConvertString.valueOf(nInt);
- else if(value >>= bBool)
- sNewString = sConvertString.valueOf(bBool);
- else if(value >>= fDouble)
- sNewString = sConvertString.valueOf(fDouble);
- return sNewString;
- }
Rectangle TableControl_Impl::calcHeaderRect(bool bColHeader)
{
- Rectangle aRectTable, aRectTableWithHeaders;
- impl_getAllVisibleDataCellArea(aRectTable);
- impl_getAllVisibleCellsArea(aRectTableWithHeaders);
- Size aSizeTable(aRectTable.GetSize());
- Size aSizeTableWithHeaders(aRectTableWithHeaders.GetSize());
- if(bColHeader)
- return Rectangle(aRectTableWithHeaders.TopLeft(),Size(aSizeTableWithHeaders.Width()-aSizeTable.Width(), aSizeTableWithHeaders.Height()));
+ Rectangle const aRectTableWithHeaders( impl_getAllVisibleCellsArea() );
+ Size const aSizeTableWithHeaders( aRectTableWithHeaders.GetSize() );
+ if ( bColHeader )
+ return Rectangle( aRectTableWithHeaders.TopLeft(), Size( aSizeTableWithHeaders.Width(), m_nColHeaderHeightPixel ) );
else
- return Rectangle(aRectTableWithHeaders.TopLeft(),Size(aSizeTableWithHeaders.Width(), aSizeTableWithHeaders.Height()-aSizeTable.Height()));
+ return Rectangle( aRectTableWithHeaders.TopLeft(), Size( m_nRowHeaderWidthPixel, aSizeTableWithHeaders.Height() ) );
}
+
+ //--------------------------------------------------------------------
Rectangle TableControl_Impl::calcTableRect()
{
- Rectangle aRect;
- impl_getAllVisibleDataCellArea(aRect);
- return aRect;
+ return impl_getAllVisibleDataCellArea();
+ }
+
+ //--------------------------------------------------------------------
+ IMPL_LINK( TableControl_Impl, OnUpdateScrollbars, void*, /**/ )
+ {
+ DBG_CHECK_ME();
+ impl_ni_updateScrollbars();
+ return 1L;
}
//--------------------------------------------------------------------
@@ -2221,157 +2543,200 @@ namespace svt { namespace table
return 0L;
}
- //---------------------------------------------------------------------------------------
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XAccessible > TableControl_Impl::getAccessible( Window& i_parentWindow )
+ {
+ DBG_TESTSOLARMUTEX();
+ if ( m_pAccessibleTable == NULL )
+ {
+ Reference< XAccessible > const xAccParent = i_parentWindow.GetAccessible();
+ if ( xAccParent.is() )
+ {
+ m_pAccessibleTable = m_aFactoryAccess.getFactory().createAccessibleTableControl(
+ xAccParent, m_rAntiImpl
+ );
+ }
+ }
+
+ Reference< XAccessible > xAccessible;
+ if ( m_pAccessibleTable )
+ xAccessible = m_pAccessibleTable->getMyself();
+ return xAccessible;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TableControl_Impl::disposeAccessible()
+ {
+ if ( m_pAccessibleTable )
+ m_pAccessibleTable->dispose();
+ m_pAccessibleTable = NULL;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ bool TableControl_Impl::impl_isAccessibleAlive() const
+ {
+ DBG_CHECK_ME();
+ return ( NULL != m_pAccessibleTable ) && m_pAccessibleTable->isAlive();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TableControl_Impl::impl_commitAccessibleEvent( sal_Int16 const i_eventID, Any const & i_newValue, Any const & i_oldValue )
+ {
+ DBG_CHECK_ME();
+ if ( impl_isAccessibleAlive() )
+ m_pAccessibleTable->commitEvent( i_eventID, i_newValue, i_oldValue );
+ }
+
+ //==================================================================================================================
+ //= TableFunctionSet
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
TableFunctionSet::TableFunctionSet(TableControl_Impl* _pTableControl)
:m_pTableControl( _pTableControl)
- ,m_nCurrentRow (-2)
+ ,m_nCurrentRow( ROW_INVALID )
{
}
- //-------------------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
TableFunctionSet::~TableFunctionSet()
{
}
- //-------------------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
void TableFunctionSet::BeginDrag()
{
}
- //-------------------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
void TableFunctionSet::CreateAnchor()
{
- m_pTableControl->m_nAnchor = m_pTableControl->m_nCurRow;
+ m_pTableControl->setAnchor( m_pTableControl->getCurRow() );
}
- //-------------------------------------------------------------------------------
+
+ //------------------------------------------------------------------------------------------------------------------
void TableFunctionSet::DestroyAnchor()
{
- m_pTableControl->m_nAnchor = -1;
+ m_pTableControl->setAnchor( ROW_INVALID );
}
- //-------------------------------------------------------------------------------
- BOOL TableFunctionSet::SetCursorAtPoint(const Point& rPoint, BOOL bDontSelectAtCursor)
+
+ //------------------------------------------------------------------------------------------------------------------
+ sal_Bool TableFunctionSet::SetCursorAtPoint(const Point& rPoint, sal_Bool bDontSelectAtCursor)
{
- BOOL bHandled = FALSE;
- Rectangle rCells;
- //curRow is the row where the mouse click happened, m_nCurRow is the last selected row, before the mouse click
- RowPos curRow = m_pTableControl->getCurrentRow(rPoint);
- if(curRow == -2)
- return FALSE;
- if( bDontSelectAtCursor )
+ sal_Bool bHandled = sal_False;
+ // newRow is the row which includes the point, getCurRow() is the last selected row, before the mouse click
+ RowPos newRow = m_pTableControl->getRowAtPoint( rPoint );
+ if ( newRow == ROW_COL_HEADERS )
+ newRow = m_pTableControl->getTopRow();
+
+ ColPos newCol = m_pTableControl->getColAtPoint( rPoint );
+ if ( newCol == COL_ROW_HEADERS )
+ newCol = m_pTableControl->getLeftColumn();
+
+ if ( ( newRow == ROW_INVALID ) || ( newCol == COL_INVALID ) )
+ return sal_False;
+
+ if ( bDontSelectAtCursor )
{
- if(m_pTableControl->m_nRowSelected.size()>1)
- m_pTableControl->m_pSelEngine->AddAlways(TRUE);
- bHandled = TRUE;
+ if ( m_pTableControl->getSelectedRowCount() > 1 )
+ m_pTableControl->getSelEngine()->AddAlways(sal_True);
+ bHandled = sal_True;
}
- else if(m_pTableControl->m_nAnchor == m_pTableControl->m_nCurRow)
+ else if ( m_pTableControl->getAnchor() == m_pTableControl->getCurRow() )
{
//selecting region,
- int diff = m_pTableControl->m_nCurRow - curRow;
+ int diff = m_pTableControl->getCurRow() - newRow;
//selected region lies above the last selection
if( diff >= 0)
{
//put selected rows in vector
- while(m_pTableControl->m_nAnchor>=curRow)
+ while ( m_pTableControl->getAnchor() >= newRow )
{
- bool isAlreadySelected = m_pTableControl->isRowSelected(m_pTableControl->m_nRowSelected, m_pTableControl->m_nAnchor);
- //if row isn't selected, put it in vector, otherwise don't put it there, because it will be twice there
- if(!isAlreadySelected)
- m_pTableControl->m_nRowSelected.push_back(m_pTableControl->m_nAnchor);
- m_pTableControl->m_nAnchor--;
+ m_pTableControl->markRowAsSelected( m_pTableControl->getAnchor() );
+ m_pTableControl->setAnchor( m_pTableControl->getAnchor() - 1 );
diff--;
}
- m_pTableControl->m_nAnchor++;
+ m_pTableControl->setAnchor( m_pTableControl->getAnchor() + 1 );
}
//selected region lies beneath the last selected row
else
{
- while(m_pTableControl->m_nAnchor<=curRow)
+ while ( m_pTableControl->getAnchor() <= newRow )
{
- bool isAlreadySelected = m_pTableControl->isRowSelected(m_pTableControl->m_nRowSelected, m_pTableControl->m_nAnchor);
- if(!isAlreadySelected)
- m_pTableControl->m_nRowSelected.push_back(m_pTableControl->m_nAnchor);
- m_pTableControl->m_nAnchor++;
+ m_pTableControl->markRowAsSelected( m_pTableControl->getAnchor() );
+ m_pTableControl->setAnchor( m_pTableControl->getAnchor() + 1 );
diff++;
}
- m_pTableControl->m_nAnchor--;
+ m_pTableControl->setAnchor( m_pTableControl->getAnchor() - 1 );
}
- m_pTableControl->invalidateSelectedRegion(m_pTableControl->m_nCurRow, curRow, rCells);
- bHandled = TRUE;
+ Rectangle aCellRect;
+ m_pTableControl->invalidateSelectedRegion( m_pTableControl->getCurRow(), newRow, aCellRect );
+ bHandled = sal_True;
}
//no region selected
else
{
- if(m_pTableControl->m_nRowSelected.empty())
- m_pTableControl->m_nRowSelected.push_back(curRow);
+ if ( !m_pTableControl->hasRowSelection() )
+ m_pTableControl->markRowAsSelected( newRow );
else
{
- if(m_pTableControl->m_pSelEngine->GetSelectionMode()==SINGLE_SELECTION)
+ if ( m_pTableControl->getSelEngine()->GetSelectionMode() == SINGLE_SELECTION )
{
DeselectAll();
- m_pTableControl->m_nRowSelected.push_back(curRow);
+ m_pTableControl->markRowAsSelected( newRow );
}
else
{
- bool isAlreadySelected = m_pTableControl->isRowSelected(m_pTableControl->m_nRowSelected, curRow);
- if(!isAlreadySelected)
- m_pTableControl->m_nRowSelected.push_back(curRow);
+ m_pTableControl->markRowAsSelected( newRow );
}
}
- if(m_pTableControl->m_nRowSelected.size()>1 && m_pTableControl->m_pSelEngine->GetSelectionMode()!=SINGLE_SELECTION)
- m_pTableControl->m_pSelEngine->AddAlways(TRUE);
- m_pTableControl->invalidateSelectedRegion(curRow, curRow, rCells);
- bHandled = TRUE;
+ if ( m_pTableControl->getSelectedRowCount() > 1 && m_pTableControl->getSelEngine()->GetSelectionMode() != SINGLE_SELECTION )
+ m_pTableControl->getSelEngine()->AddAlways(sal_True);
+
+ Rectangle aCellRect;
+ m_pTableControl->invalidateSelectedRegion( newRow, newRow, aCellRect );
+ bHandled = sal_True;
}
- m_pTableControl->m_nCurRow = curRow;
- m_pTableControl->ensureVisible(m_pTableControl->m_nCurColumn,m_pTableControl->m_nCurRow,false);
+ m_pTableControl->goTo( newCol, newRow );
return bHandled;
}
- //-------------------------------------------------------------------------------
- BOOL TableFunctionSet::IsSelectionAtPoint( const Point& rPoint )
+ //------------------------------------------------------------------------------------------------------------------
+ sal_Bool TableFunctionSet::IsSelectionAtPoint( const Point& rPoint )
{
- m_pTableControl->m_pSelEngine->AddAlways(FALSE);
- if(m_pTableControl->m_nRowSelected.empty())
- return FALSE;
+ m_pTableControl->getSelEngine()->AddAlways(sal_False);
+ if ( !m_pTableControl->hasRowSelection() )
+ return sal_False;
else
{
- RowPos curRow = m_pTableControl->getCurrentRow(rPoint);
- m_pTableControl->m_nAnchor = -1;
- bool selected = m_pTableControl->isRowSelected(m_pTableControl->m_nRowSelected, curRow);
+ RowPos curRow = m_pTableControl->getRowAtPoint( rPoint );
+ m_pTableControl->setAnchor( ROW_INVALID );
+ bool selected = m_pTableControl->isRowSelected( curRow );
m_nCurrentRow = curRow;
return selected;
}
}
- //-------------------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
void TableFunctionSet::DeselectAtPoint( const Point& rPoint )
{
(void)rPoint;
- long pos = 0;
- long i = 0;
- Rectangle rCells;
- for(std::vector<RowPos>::iterator it=m_pTableControl->m_nRowSelected.begin();
- it!=m_pTableControl->m_nRowSelected.end();++it)
- {
- if(*it == m_nCurrentRow)
- {
- pos = i;
- m_pTableControl->invalidateSelectedRegion(*it, *it, rCells);
- }
- ++i;
- }
- m_pTableControl->m_nRowSelected.erase(m_pTableControl->m_nRowSelected.begin()+pos);
+ Rectangle aCellRange;
+ m_pTableControl->invalidateSelectedRegion( m_nCurrentRow, m_nCurrentRow, aCellRange );
+ m_pTableControl->markRowAsDeselected( m_nCurrentRow );
}
- //-------------------------------------------------------------------------------
+
+ //------------------------------------------------------------------------------------------------------------------
void TableFunctionSet::DeselectAll()
{
- if(!m_pTableControl->m_nRowSelected.empty())
+ if ( m_pTableControl->hasRowSelection() )
{
- Rectangle rCells;
- for(std::vector<RowPos>::iterator it=m_pTableControl->m_nRowSelected.begin();
- it!=m_pTableControl->m_nRowSelected.end();++it)
+ Rectangle aCellRange;
+ for ( size_t i=0; i<m_pTableControl->getSelectedRowCount(); ++i )
{
- m_pTableControl->invalidateSelectedRegion(*it, *it, rCells);
+ RowPos const rowIndex = m_pTableControl->getSelectedRowIndex(i);
+ m_pTableControl->invalidateSelectedRegion( rowIndex, rowIndex, aCellRange );
}
- m_pTableControl->m_nRowSelected.clear();
+
+ m_pTableControl->markAllRowsAsDeselected();
}
}
-//........................................................................
+//......................................................................................................................
} } // namespace svt::table
-//........................................................................
+//......................................................................................................................
diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx
index 053766d92841..bc1ac55fbe51 100644..100755
--- a/svtools/source/table/tablecontrol_impl.hxx
+++ b/svtools/source/table/tablecontrol_impl.hxx
@@ -27,18 +27,16 @@
#ifndef SVTOOLS_TABLECONTROL_IMPL_HXX
#define SVTOOLS_TABLECONTROL_IMPL_HXX
-#ifndef SVTOOLS_INC_TABLE_TABLEMODEL_HXX
-#include <svtools/table/tablemodel.hxx>
-#endif
+#include "svtools/table/tablemodel.hxx"
+#include "svtools/table/tablecontrolinterface.hxx"
-#ifndef SVTOOLS_INC_TABLE_ABSTRACTTABLECONTROL_HXX
-#include <svtools/table/abstracttablecontrol.hxx>
-#endif
+#include "svtaccessiblefactory.hxx"
-#include <svtools/table/tablemodel.hxx>
-#include <vector>
#include <vcl/seleng.hxx>
+#include <vector>
+
+#include <boost/scoped_ptr.hpp>
class ScrollBar;
class ScrollBarBox;
@@ -48,7 +46,42 @@ namespace svt { namespace table
{
//........................................................................
- typedef ::std::vector< long > ArrayOfLong;
+ struct MutableColumnMetrics : protected ColumnMetrics
+ {
+ MutableColumnMetrics()
+ :ColumnMetrics()
+ {
+ }
+
+ MutableColumnMetrics( long const i_startPixel, long const i_endPixel )
+ :ColumnMetrics( i_startPixel, i_endPixel )
+ {
+ }
+
+ long getStart() const { return nStartPixel; }
+ long getEnd() const { return nEndPixel; }
+
+ void setEnd( long const i_end ) { nEndPixel = i_end; }
+ void move( long const i_offset ) { nStartPixel += i_offset; nEndPixel += i_offset; }
+
+ long getWidth() const { return nEndPixel - nStartPixel; }
+
+ ColumnMetrics const & operator()() { return *this; }
+ };
+
+ struct ColumnInfoPositionLess
+ {
+ bool operator()( MutableColumnMetrics const& i_colInfo, long const i_position )
+ {
+ return i_colInfo.getEnd() < i_position;
+ }
+ bool operator()( long const i_position, MutableColumnMetrics const& i_colInfo )
+ {
+ return i_position < i_colInfo.getStart();
+ }
+ };
+
+ typedef ::std::vector< MutableColumnMetrics > ColumnPositions;
class TableControl;
class TableDataWindow;
@@ -57,13 +90,14 @@ namespace svt { namespace table
//====================================================================
//= TableControl_Impl
//====================================================================
- class TableControl_Impl : public IAbstractTableControl
+ class TableControl_Impl :public ITableControl
+ ,public ITableModelListener
{
friend class TableGeometry;
friend class TableRowGeometry;
friend class TableColumnGeometry;
friend class SuspendInvariants;
- friend class TableFunctionSet;
+
private:
/// the control whose impl-instance we implemnt
TableControl& m_rAntiImpl;
@@ -71,14 +105,9 @@ namespace svt { namespace table
PTableModel m_pModel;
/// the input handler to use, usually the input handler as provided by ->m_pModel
PTableInputHandler m_pInputHandler;
- /// the widths of the single columns, measured in pixel
- ArrayOfLong m_aColumnWidthsPixel;
- /** the accumulated widths of the single columns, i.e. their exclusive right borders,
- <strong<not</strong> counting the space for a possible row header column
- */
- ArrayOfLong m_aAccColumnWidthsPixel;
+ /// info about the widths of our columns
+ ColumnPositions m_aColumnWidths;
- ArrayOfLong m_aVisibleColumnWidthsPixel;
/// the height of a single row in the table, measured in pixels
long m_nRowHeightPixel;
/// the height of the column header row in the table, measured in pixels
@@ -88,9 +117,13 @@ namespace svt { namespace table
/// the number of columns in the table control. Cached model value.
TableSize m_nColumnCount;
+
/// the number of rows in the table control. Cached model value.
TableSize m_nRowCount;
+ /// denotes whether or not the columns fitted into the available width, last time we checked
+ long m_bColumnsFit;
+
ColPos m_nCurColumn;
RowPos m_nCurRow;
ColPos m_nLeftColumn;
@@ -103,24 +136,27 @@ namespace svt { namespace table
The window's upper left corner is at position (0,0), relative to the
table control, which is the direct parent of the data window.
*/
- TableDataWindow* m_pDataWindow;
+ ::boost::scoped_ptr< TableDataWindow >
+ m_pDataWindow;
/// the vertical scrollbar, if any
ScrollBar* m_pVScroll;
/// the horizontal scrollbar, if any
- ScrollBar* m_pHScroll;
+ ScrollBar* m_pHScroll;
ScrollBarBox* m_pScrollCorner;
- //selection engine - for determining selection range, e.g. single, multiple
- SelectionEngine* m_pSelEngine;
- //vector which contains the selected rows
- std::vector<RowPos> m_nRowSelected;
- //part of selection engine
- TableFunctionSet* m_pTableFunctionSet;
- //part of selection engine
- RowPos m_nAnchor;
- bool m_bResizing;
- ColPos m_nResizingColumn;
- bool m_bResizingGrid;
- rtl::OUString m_aTooltipText;
+ //selection engine - for determining selection range, e.g. single, multiple
+ SelectionEngine* m_pSelEngine;
+ //vector which contains the selected rows
+ std::vector<RowPos> m_aSelectedRows;
+ //part of selection engine
+ TableFunctionSet* m_pTableFunctionSet;
+ //part of selection engine
+ RowPos m_nAnchor;
+ bool m_bUpdatingColWidths;
+
+ Link m_aSelectHdl;
+
+ AccessibleFactoryAccess m_aFactoryAccess;
+ IAccessibleTableControl* m_pAccessibleTable;
#if DBG_UTIL
#define INV_SCROLL_POSITION 1
@@ -133,21 +169,18 @@ namespace svt { namespace table
#endif
public:
-
-
- PTableModel getModel() const;
void setModel( PTableModel _pModel );
inline const PTableInputHandler& getInputHandler() const { return m_pInputHandler; }
- inline ColPos getCurColumn() const { return m_nCurColumn; }
- inline RowPos getCurRow() const { return m_nCurRow; }
- inline void setCurRow(RowPos curRow){ m_nCurRow = curRow; }
- inline RowPos getTopRow() const { return m_nTopRow; }
- inline long getRowCount() const { return m_nRowCount; }
- inline long getColumnCount() const { return m_nColumnCount; }
+ inline RowPos getCurRow() const { return m_nCurRow; }
+ inline void setCurRow( RowPos i_curRow ){ m_nCurRow = i_curRow; }
- inline long getColHeaderHightPixel() const { return m_nColHeaderHeightPixel; }
+ RowPos getAnchor() const { return m_nAnchor; }
+ void setAnchor( RowPos const i_anchor ) { m_nAnchor = i_anchor; }
+
+ inline RowPos getTopRow() const { return m_nTopRow; }
+ inline ColPos getLeftColumn() const { return m_nLeftColumn; }
inline const TableControl& getAntiImpl() const { return m_rAntiImpl; }
inline TableControl& getAntiImpl() { return m_rAntiImpl; }
@@ -185,45 +218,115 @@ namespace svt { namespace table
<TRUE/> if it's okay that the given cooordinate is only partially visible
*/
void ensureVisible( ColPos _nColumn, RowPos _nRow, bool _bAcceptPartialVisibility );
- /** returns the row, which contains the input point*/
- virtual RowPos getCurrentRow (const Point& rPoint);
-
- void setCursorAtCurrentCell(const Point& rPoint);
- /** checks whether the vector with the selected rows contains the current row*/
- BOOL isRowSelected(const ::std::vector<RowPos>& selectedRows, RowPos current);
-
- bool isRowSelected(RowPos current);
- /** returns the position of the current row in the selection vector */
- int getRowSelectedNumber(const ::std::vector<RowPos>& selectedRows, RowPos current);
- /** _rCellRect contains the region, which should be invalidate after some action e.g. selecting row*/
- void invalidateSelectedRegion(RowPos _nPrevRow, RowPos _nCurRow, Rectangle& _rCellRect );
- /** to be called when a new row is added to the control*/
- void invalidateRow(RowPos _nRowPos, Rectangle& _rCellRect );
- /** returns the vector, which contains the selected rows*/
- std::vector<RowPos>& getSelectedRows();
- /** updates the vector, which contains the selected rows after removing the row nRowPos*/
- void removeSelectedRow(RowPos _nRowPos);
- void invalidateRows();
- void clearSelection();
- // IAbstractTableControl
- virtual void hideCursor();
- virtual void showCursor();
- virtual bool dispatchAction( TableControlAction _eAction );
- virtual SelectionEngine* getSelEngine();
- virtual bool isTooltipActive();
- virtual rtl::OUString& setTooltip(const Point& rPoint );
- virtual void resizeColumn(const Point& rPoint);
- virtual bool startResizeColumn(const Point& rPoint);
- virtual bool endResizeColumn(const Point& rPoint);
-
- TableDataWindow* getDataWindow();
- ScrollBar* getHorzScrollbar();
- ScrollBar* getVertScrollbar();
-
- ::rtl::OUString convertToString(const ::com::sun::star::uno::Any& _value);
- Rectangle calcHeaderRect(bool bColHeader);
- Rectangle calcTableRect();
+
+ /** retrieves the content of the given cell, converted to a string
+ */
+ ::rtl::OUString getCellContentAsString( RowPos const i_row, ColPos const i_col );
+
+ /** returns the position of the current row in the selection vector */
+ int getRowSelectedNumber(const ::std::vector<RowPos>& selectedRows, RowPos current);
+
+ /** _rCellRect contains the region, which should be invalidate after some action e.g. selecting row*/
+ void invalidateSelectedRegion(RowPos _nPrevRow, RowPos _nCurRow, Rectangle& _rCellRect );
+
+ /** invalidates the part of the data window which is covered by the given row
+ @param i_firstRow
+ the index of the first row to include in the invalidation
+ @param i_lastRow
+ the index of the last row to include in the invalidation, or ROW_INVALID if the invalidation
+ should happen down to the bottom of the data window.
+ */
+ void invalidateRowRange( RowPos const i_firstRow, RowPos const i_lastRow );
+
+ void checkCursorPosition();
+
+ bool hasRowSelection() const { return !m_aSelectedRows.empty(); }
+ size_t getSelectedRowCount() const { return m_aSelectedRows.size(); }
+ RowPos getSelectedRowIndex( size_t const i_selectionIndex ) const;
+
+ /** removes the given row index from m_aSelectedRows
+
+ @return
+ <TRUE/> if and only if the row was previously marked as selected
+ */
+ bool markRowAsDeselected( RowPos const i_rowIndex );
+
+ /** marks the given row as selectged, by putting it into m_aSelectedRows
+ @return
+ <TRUE/> if and only if the row was previously <em>not</em> marked as selected
+ */
+ bool markRowAsSelected( RowPos const i_rowIndex );
+
+ /** marks all rows as deselected
+ @return
+ <TRUE/> if and only if the selection actually changed by this operation
+ */
+ bool markAllRowsAsDeselected();
+
+ /** marks all rows as selected
+ @return
+ <FALSE/> if and only if all rows were selected already.
+ */
+ bool markAllRowsAsSelected();
+
+ void setSelectHandler( Link const & i_selectHandler ) { m_aSelectHdl = i_selectHandler; }
+ Link const& getSelectHandler() const { return m_aSelectHdl; }
+
+ // ITableControl
+ virtual void hideCursor();
+ virtual void showCursor();
+ virtual bool dispatchAction( TableControlAction _eAction );
+ virtual SelectionEngine* getSelEngine();
+ virtual PTableModel getModel() const;
+ virtual ColPos getCurrentColumn() const;
+ virtual RowPos getCurrentRow() const;
+ virtual bool activateCell( ColPos const i_col, RowPos const i_row );
+ virtual ::Size getTableSizePixel() const;
+ virtual void setPointer( Pointer const & i_pointer );
+ virtual void captureMouse();
+ virtual void releaseMouse();
+ virtual void invalidate( TableArea const i_what );
+ virtual long pixelWidthToAppFont( long const i_pixels ) const;
+ virtual void hideTracking();
+ virtual void showTracking( Rectangle const & i_location, sal_uInt16 const i_flags );
+ virtual RowPos getRowAtPoint( const Point& rPoint ) const;
+ virtual ColPos getColAtPoint( const Point& rPoint ) const;
+ virtual TableCell hitTest( const Point& rPoint ) const;
+ virtual ColumnMetrics getColumnMetrics( ColPos const i_column ) const;
+ virtual bool isRowSelected( RowPos i_row ) const;
+
+
+ TableDataWindow& getDataWindow() { return *m_pDataWindow; }
+ const TableDataWindow& getDataWindow() const { return *m_pDataWindow; }
+ ScrollBar* getHorzScrollbar();
+ ScrollBar* getVertScrollbar();
+
+ Rectangle calcHeaderRect(bool bColHeader);
+ Rectangle calcTableRect();
+
+ // A11Y
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
+ getAccessible( Window& i_parentWindow );
+ void disposeAccessible();
+
+ // ITableModelListener
+ virtual void rowsInserted( RowPos first, RowPos last );
+ virtual void rowsRemoved( RowPos first, RowPos last );
+ virtual void columnInserted( ColPos const i_colIndex );
+ virtual void columnRemoved( ColPos const i_colIndex );
+ virtual void allColumnsRemoved();
+ virtual void cellsUpdated( ColPos const i_firstCol, ColPos i_lastCol, RowPos const i_firstRow, RowPos const i_lastRow );
+ virtual void columnChanged( ColPos const i_column, ColumnAttributeGroup const i_attributeGroup );
+ virtual void tableMetricsChanged();
+
private:
+ bool impl_isAccessibleAlive() const;
+ void impl_commitAccessibleEvent(
+ sal_Int16 const i_eventID,
+ ::com::sun::star::uno::Any const & i_newValue,
+ ::com::sun::star::uno::Any const & i_oldValue
+ );
+
/** toggles the cursor visibility
The method is not bound to the classes public invariants, as it's used in
@@ -251,7 +354,7 @@ namespace svt { namespace table
specifies whether a possible only partially visible last row is
counted, too.
*/
- TableSize impl_getVisibleColumns( bool _bAcceptPartialRow ) const;
+ TableSize impl_getVisibleColumns( bool _bAcceptPartialCol ) const;
/** determines the rectangle occupied by the given cell
*/
@@ -264,15 +367,20 @@ namespace svt { namespace table
*/
void impl_ni_updateCachedModelValues();
- /** updates ->m_aColumnWidthsPixel with the current pixel widths of all model columns
+ /** updates the cached table metrics (row height etc.)
+ */
+ void impl_ni_updateCachedTableMetrics();
- The method takes into account the current zoom factor and map mode of the table
- control, plus any possible COLWIDTH_FIT_TO_VIEW widths in the model columns.
+ /** updates ->m_aColumnWidthsPixel with the current pixel widths of all model columns
The method is not bound to the classes public invariants, as it's used in
situations where the they must not necessarily be fullfilled.
+
+ @param i_assumeInflexibleColumnsUpToIncluding
+ the index of a column up to which all columns should be considered as inflexible, or
+ <code>COL_INVALID</code>.
*/
- void impl_ni_updateColumnWidths();
+ void impl_ni_updateColumnWidths( ColPos const i_assumeInflexibleColumnsUpToIncluding = COL_INVALID );
/** updates the scrollbars of the control
@@ -296,6 +404,10 @@ namespace svt { namespace table
*/
TableSize impl_ni_ScrollRows( TableSize _nRowDelta );
+ /** equivalent to impl_ni_ScrollRows, but checks the instances invariants beforehand (in a non-product build only)
+ */
+ TableSize impl_scrollRows( TableSize const i_rowDelta );
+
/** scrolls the view by the given number of columns
The method is not bound to the classes public invariants, as it's used in
@@ -306,8 +418,13 @@ namespace svt { namespace table
from the given numbers to scroll in case the begin or the end of the
column range were reached.
*/
- TableSize impl_ni_ScrollColumns( TableSize _nRowDelta );
- /** retrieves the area occupied by the totality of (at least partially) visible cells
+ TableSize impl_ni_ScrollColumns( TableSize _nColumnDelta );
+
+ /** equivalent to impl_ni_ScrollColumns, but checks the instances invariants beforehand (in a non-product build only)
+ */
+ TableSize impl_scrollColumns( TableSize const i_columnDelta );
+
+ /** retrieves the area occupied by the totality of (at least partially) visible cells
The returned area includes row and column headers. Also, it takes into
account the the fact that there might be less columns than would normally
@@ -316,27 +433,37 @@ namespace svt { namespace table
As a result of respecting the partial visibility of rows and columns,
the returned area might be larger than the data window's output size.
*/
- void impl_getAllVisibleCellsArea( Rectangle& _rCellArea ) const;
+ Rectangle impl_getAllVisibleCellsArea() const;
/** retrieves the area occupied by all (at least partially) visible data cells.
Effectively, the returned area is the same as returned by ->impl_getAllVisibleCellsArea,
minus the row and column header areas.
*/
- void impl_getAllVisibleDataCellArea( Rectangle& _rCellArea ) const;
+ Rectangle impl_getAllVisibleDataCellArea() const;
+
+ /** retrieves the column which covers the given ordinate
+ */
+ ColPos impl_getColumnForOrdinate( long const i_ordinate ) const;
- void impl_ni_getAccVisibleColWidths();
- void impl_updateLeftColumn();
+ /** retrieves the row which covers the given abscissa
+ */
+ RowPos impl_getRowForAbscissa( long const i_abscissa ) const;
+
+ /// invalidates the window area occupied by the given column
+ void impl_invalidateColumn( ColPos const i_column );
DECL_LINK( OnScroll, ScrollBar* );
+ DECL_LINK( OnUpdateScrollbars, void* );
};
+
//see seleng.hxx, seleng.cxx, FunctionSet overridables, part of selection engine
class TableFunctionSet : public FunctionSet
{
- friend class TableDataWindow;
private:
- TableControl_Impl* m_pTableControl;
- RowPos m_nCurrentRow;
+ TableControl_Impl* m_pTableControl;
+ RowPos m_nCurrentRow;
+
public:
TableFunctionSet(TableControl_Impl* _pTableControl);
virtual ~TableFunctionSet();
@@ -344,8 +471,8 @@ namespace svt { namespace table
virtual void BeginDrag();
virtual void CreateAnchor();
virtual void DestroyAnchor();
- virtual BOOL SetCursorAtPoint(const Point& rPoint, BOOL bDontSelectAtCursor);
- virtual BOOL IsSelectionAtPoint( const Point& rPoint );
+ virtual sal_Bool SetCursorAtPoint(const Point& rPoint, sal_Bool bDontSelectAtCursor);
+ virtual sal_Bool IsSelectionAtPoint( const Point& rPoint );
virtual void DeselectAtPoint( const Point& rPoint );
virtual void DeselectAll();
};
diff --git a/svtools/source/table/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx
index bbd7f6829369..11605e36c8b2 100644
--- a/svtools/source/table/tabledatawindow.cxx
+++ b/svtools/source/table/tabledatawindow.cxx
@@ -28,23 +28,31 @@
#include "precompiled_svtools.hxx"
#include "svtools/table/tablecontrol.hxx"
-#include "svtools/table/tabledatawindow.hxx"
+
+#include "tabledatawindow.hxx"
#include "tablecontrol_impl.hxx"
+#include "tablegeometry.hxx"
+#include "cellvalueconversion.hxx"
+
#include <vcl/help.hxx>
-//........................................................................
+//......................................................................................................................
namespace svt { namespace table
{
- class TableControl_Impl;
-//........................................................................
+//......................................................................................................................
- //====================================================================
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Any;
+ /** === end UNO using === **/
+
+ //==================================================================================================================
//= TableDataWindow
- //====================================================================
- //--------------------------------------------------------------------
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
TableDataWindow::TableDataWindow( TableControl_Impl& _rTableControl )
:Window( &_rTableControl.getAntiImpl() )
- ,m_rTableControl ( _rTableControl )
+ ,m_rTableControl( _rTableControl )
+ ,m_nTipWindowHandle( 0 )
{
// by default, use the background as determined by the style settings
const Color aWindowColor( GetSettings().GetStyleSettings().GetFieldColor() );
@@ -52,105 +60,164 @@ namespace svt { namespace table
SetFillColor( aWindowColor );
}
- //--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ TableDataWindow::~TableDataWindow()
+ {
+ impl_hideTipWindow();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
void TableDataWindow::Paint( const Rectangle& rUpdateRect )
{
m_rTableControl.doPaintContent( rUpdateRect );
}
- //--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
void TableDataWindow::SetBackground( const Wallpaper& rColor )
{
Window::SetBackground( rColor );
}
- //--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
void TableDataWindow::SetControlBackground( const Color& rColor )
{
Window::SetControlBackground( rColor );
}
- //--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
void TableDataWindow::SetBackground()
{
Window::SetBackground();
}
- //--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
void TableDataWindow::SetControlBackground()
{
Window::SetControlBackground();
}
- //--------------------------------------------------------------------
- void TableDataWindow::MouseMove( const MouseEvent& rMEvt )
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TableDataWindow::RequestHelp( const HelpEvent& rHEvt )
{
- Point aPoint = rMEvt.GetPosPixel();
- if ( !m_rTableControl.getInputHandler()->MouseMove( m_rTableControl, rMEvt ) )
+ sal_uInt16 const nHelpMode = rHEvt.GetMode();
+ if ( ( IsMouseCaptured() )
+ || ( ( nHelpMode & HELPMODE_QUICK ) == 0 )
+ )
+ {
+ Window::RequestHelp( rHEvt );
+ return;
+ }
+
+ ::rtl::OUString sHelpText;
+ sal_uInt16 nHelpStyle = 0;
+
+ Point const aMousePos( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) );
+ RowPos const hitRow = m_rTableControl.getRowAtPoint( aMousePos );
+ ColPos const hitCol = m_rTableControl.getColAtPoint( aMousePos );
+
+ PTableModel const pTableModel( m_rTableControl.getModel() );
+ if ( ( hitCol >= 0 ) && ( hitCol < pTableModel->getColumnCount() ) )
{
- if(m_rTableControl.getCurrentRow(aPoint)>=0 && m_rTableControl.isTooltipActive() )
+ if ( hitRow == ROW_COL_HEADERS )
{
- SetPointer(POINTER_ARROW);
- rtl::OUString& rHelpText = m_rTableControl.setTooltip(aPoint);
- Help::EnableBalloonHelp();
- Window::SetHelpText( rHelpText.getStr());
+ sHelpText = pTableModel->getColumnModel( hitCol )->getHelpText();
}
- else if(m_rTableControl.getCurrentRow(aPoint) == -1)
+ else if ( ( hitRow >= 0 ) && ( hitRow < pTableModel->getRowCount() ) )
{
- if(Help::IsBalloonHelpEnabled())
- Help::DisableBalloonHelp();
- m_rTableControl.resizeColumn(aPoint);
+ Any aCellToolTip;
+ pTableModel->getCellToolTip( hitCol, hitRow, aCellToolTip );
+ if ( !aCellToolTip.hasValue() )
+ {
+ // use the cell content
+ pTableModel->getCellContent( hitCol, hitRow, aCellToolTip );
+
+ // use the cell content as tool tip only if it doesn't fit into the cell.
+ bool const activeCell = ( hitRow == m_rTableControl.getCurrentRow() ) && ( hitCol == m_rTableControl.getCurrentColumn() );
+ bool const selectedCell = m_rTableControl.isRowSelected( hitRow );
+
+ Rectangle const aWindowRect( Point( 0, 0 ), GetOutputSizePixel() );
+ TableCellGeometry const aCell( m_rTableControl, aWindowRect, hitCol, hitRow );
+ Rectangle const aCellRect( aCell.getRect() );
+
+ PTableRenderer const pRenderer = pTableModel->getRenderer();
+ if ( pRenderer->FitsIntoCell( aCellToolTip, hitCol, hitRow, activeCell, selectedCell, *this, aCellRect ) )
+ aCellToolTip.clear();
+ }
+
+ sHelpText = CellValueConversion::convertToString( aCellToolTip );
+
+ if ( sHelpText.indexOf( '\n' ) >= 0 )
+ nHelpStyle = QUICKHELP_TIP_STYLE_BALLOON;
}
+ }
+
+ if ( sHelpText.getLength() )
+ {
+ Rectangle const aControlScreenRect(
+ OutputToScreenPixel( Point( 0, 0 ) ),
+ GetOutputSizePixel()
+ );
+
+ if ( m_nTipWindowHandle )
+ Help::UpdateTip( m_nTipWindowHandle, this, aControlScreenRect, sHelpText );
else
- {
- if(Help::IsBalloonHelpEnabled())
- Help::DisableBalloonHelp();
- Window::MouseMove( rMEvt );
- }
+ m_nTipWindowHandle = Help::ShowTip( this, aControlScreenRect, sHelpText, nHelpStyle );
}
+ else
+ impl_hideTipWindow();
}
- //--------------------------------------------------------------------
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TableDataWindow::impl_hideTipWindow()
+ {
+ if ( m_nTipWindowHandle != 0 )
+ {
+ Help::HideTip( m_nTipWindowHandle );
+ m_nTipWindowHandle = 0;
+ }
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void TableDataWindow::MouseMove( const MouseEvent& rMEvt )
+ {
+ if ( rMEvt.IsLeaveWindow() )
+ impl_hideTipWindow();
+
+ if ( !m_rTableControl.getInputHandler()->MouseMove( m_rTableControl, rMEvt ) )
+ {
+ Window::MouseMove( rMEvt );
+ }
+ }
+ //------------------------------------------------------------------------------------------------------------------
void TableDataWindow::MouseButtonDown( const MouseEvent& rMEvt )
{
- Point aPoint = rMEvt.GetPosPixel();
- RowPos nCurRow = m_rTableControl.getCurrentRow(aPoint);
- std::vector<RowPos> selectedRows(m_rTableControl.getSelectedRows());
+ impl_hideTipWindow();
+
+ Point const aPoint = rMEvt.GetPosPixel();
+ RowPos const hitRow = m_rTableControl.getRowAtPoint( aPoint );
+ bool const wasRowSelected = m_rTableControl.isRowSelected( hitRow );
+
if ( !m_rTableControl.getInputHandler()->MouseButtonDown( m_rTableControl, rMEvt ) )
- Window::MouseButtonDown( rMEvt );
- else
{
- if(nCurRow >= 0 && m_rTableControl.getSelEngine()->GetSelectionMode() != NO_SELECTION)
- {
- bool found = std::find(selectedRows.begin(),selectedRows.end(), nCurRow) != selectedRows.end();
+ Window::MouseButtonDown( rMEvt );
+ return;
+ }
- if( !found )
- {
- m_aSelectHdl.Call( NULL );
- }
- }
+ bool const isRowSelected = m_rTableControl.isRowSelected( hitRow );
+ if ( isRowSelected != wasRowSelected )
+ {
+ m_aSelectHdl.Call( NULL );
}
m_aMouseButtonDownHdl.Call((MouseEvent*) &rMEvt);
- m_rTableControl.getAntiImpl().LoseFocus();
}
- //--------------------------------------------------------------------
+
+ //------------------------------------------------------------------------------------------------------------------
void TableDataWindow::MouseButtonUp( const MouseEvent& rMEvt )
{
if ( !m_rTableControl.getInputHandler()->MouseButtonUp( m_rTableControl, rMEvt ) )
Window::MouseButtonUp( rMEvt );
+
m_aMouseButtonUpHdl.Call((MouseEvent*) &rMEvt);
- m_rTableControl.getAntiImpl().GetFocus();
+ m_rTableControl.getAntiImpl().GrabFocus();
}
- //--------------------------------------------------------------------
- void TableDataWindow::SetPointer( const Pointer& rPointer )
- {
- Window::SetPointer(rPointer);
- }
- //--------------------------------------------------------------------
- void TableDataWindow::CaptureMouse()
- {
- Window::CaptureMouse();
- }
- //--------------------------------------------------------------------
- void TableDataWindow::ReleaseMouse( )
- {
- Window::ReleaseMouse();
- }
- // -----------------------------------------------------------------------
+
+ //------------------------------------------------------------------------------------------------------------------
long TableDataWindow::Notify(NotifyEvent& rNEvt )
{
long nDone = 0;
@@ -168,6 +235,6 @@ namespace svt { namespace table
}
return nDone ? nDone : Window::Notify( rNEvt );
}
-//........................................................................
+//......................................................................................................................
} } // namespace svt::table
-//........................................................................
+//......................................................................................................................
diff --git a/svtools/inc/svtools/table/tabledatawindow.hxx b/svtools/source/table/tabledatawindow.hxx
index 829feecd5836..6f78ac49c44d 100644
--- a/svtools/inc/svtools/table/tabledatawindow.hxx
+++ b/svtools/source/table/tabledatawindow.hxx
@@ -55,8 +55,12 @@ namespace svt { namespace table
Link m_aMouseButtonDownHdl;
Link m_aMouseButtonUpHdl;
Link m_aSelectHdl;
+ sal_uLong m_nTipWindowHandle;
+
public:
TableDataWindow( TableControl_Impl& _rTableControl );
+ ~TableDataWindow();
+
inline void SetMouseButtonDownHdl( const Link& rLink ) { m_aMouseButtonDownHdl = rLink; }
inline const Link& GetMouseButtonDownHdl() const { return m_aMouseButtonDownHdl; }
inline void SetMouseButtonUpHdl( const Link& rLink ) { m_aMouseButtonUpHdl = rLink; }
@@ -69,15 +73,16 @@ namespace svt { namespace table
virtual void MouseMove( const MouseEvent& rMEvt);
virtual void MouseButtonDown( const MouseEvent& rMEvt);
virtual void MouseButtonUp( const MouseEvent& rMEvt);
- virtual void SetPointer( const Pointer& rPointer );
- virtual void CaptureMouse();
- virtual void ReleaseMouse();
virtual long Notify(NotifyEvent& rNEvt);
virtual void SetControlBackground(const Color& rColor);
virtual void SetControlBackground();
+ virtual void RequestHelp( const HelpEvent& rHEvt );
void SetBackground(const Wallpaper& rColor);
void SetBackground();
+
+ private:
+ void impl_hideTipWindow();
};
//........................................................................
} } // namespace svt::table
diff --git a/svtools/source/table/tablegeometry.cxx b/svtools/source/table/tablegeometry.cxx
index d60de9e6438f..661079775daa 100644
--- a/svtools/source/table/tablegeometry.cxx
+++ b/svtools/source/table/tablegeometry.cxx
@@ -27,105 +27,139 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svtools.hxx"
-
#include "tablegeometry.hxx"
#include "tablecontrol_impl.hxx"
#include <tools/debug.hxx>
-//........................................................................
+//......................................................................................................................
namespace svt { namespace table
{
-//........................................................................
+//......................................................................................................................
- //====================================================================
+ //==================================================================================================================
//= TableRowGeometry
- //====================================================================
- //--------------------------------------------------------------------
- TableRowGeometry::TableRowGeometry( const TableControl_Impl& _rControl, const Rectangle& _rBoundaries,
- RowPos _nRow )
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ TableRowGeometry::TableRowGeometry( TableControl_Impl const & _rControl, Rectangle const & _rBoundaries,
+ RowPos const _nRow, bool const i_allowVirtualRows )
:TableGeometry( _rControl, _rBoundaries )
,m_nRowPos( _nRow )
+ ,m_bAllowVirtualRows( i_allowVirtualRows )
{
if ( m_nRowPos == ROW_COL_HEADERS )
{
- //DBG_ASSERT( m_rControl.m_pModel->hasColumnHeaders(),
- // "TableRowGeometry::TableRowGeometry: why asking for the geoemtry of the non-existent column header row?" );
m_aRect.Top() = 0;
m_aRect.Bottom() = m_rControl.m_nColHeaderHeightPixel - 1;
}
else
{
- if ( ( m_nRowPos >= m_rControl.m_nTopRow ) && ( m_nRowPos < m_rControl.m_pModel->getRowCount() ) )
- {
- m_aRect.Top() = m_rControl.m_nColHeaderHeightPixel + ( m_nRowPos - m_rControl.m_nTopRow ) * m_rControl.m_nRowHeightPixel;
- m_aRect.Bottom() = m_aRect.Top() + m_rControl.m_nRowHeightPixel - 1;
- }
- else
- m_aRect.SetEmpty();
+ impl_initRect();
}
}
- //--------------------------------------------------------------------
- bool TableRowGeometry::moveDown()
+ //------------------------------------------------------------------------------------------------------------------
+ void TableRowGeometry::impl_initRect()
{
- if ( ++m_nRowPos < m_rControl.m_pModel->getRowCount() )
- m_aRect.Move( 0, m_rControl.m_nRowHeightPixel );
+ if ( ( m_nRowPos >= m_rControl.m_nTopRow ) && impl_isValidRow( m_nRowPos ) )
+ {
+ m_aRect.Top() = m_rControl.m_nColHeaderHeightPixel + ( m_nRowPos - m_rControl.m_nTopRow ) * m_rControl.m_nRowHeightPixel;
+ m_aRect.Bottom() = m_aRect.Top() + m_rControl.m_nRowHeightPixel - 1;
+ }
else
m_aRect.SetEmpty();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ bool TableRowGeometry::impl_isValidRow( RowPos const i_row ) const
+ {
+ return m_bAllowVirtualRows || ( i_row < m_rControl.m_pModel->getRowCount() );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ bool TableRowGeometry::moveDown()
+ {
+ if ( m_nRowPos == ROW_COL_HEADERS )
+ {
+ m_nRowPos = m_rControl.m_nTopRow;
+ impl_initRect();
+ }
+ else
+ {
+ if ( impl_isValidRow( ++m_nRowPos ) )
+ m_aRect.Move( 0, m_rControl.m_nRowHeightPixel );
+ else
+ m_aRect.SetEmpty();
+ }
return isValid();
}
- //====================================================================
+ //==================================================================================================================
//= TableColumnGeometry
- //====================================================================
- //--------------------------------------------------------------------
- TableColumnGeometry::TableColumnGeometry( const TableControl_Impl& _rControl, const Rectangle& _rBoundaries,
- ColPos _nCol )
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ TableColumnGeometry::TableColumnGeometry( TableControl_Impl const & _rControl, Rectangle const & _rBoundaries,
+ ColPos const _nCol, bool const i_allowVirtualColumns )
:TableGeometry( _rControl, _rBoundaries )
,m_nColPos( _nCol )
+ ,m_bAllowVirtualColumns( i_allowVirtualColumns )
{
if ( m_nColPos == COL_ROW_HEADERS )
{
-/* DBG_ASSERT( m_rControl.m_pModel->hasRowHeaders(),
- "TableColumnGeometry::TableColumnGeometry: why asking for the geoemtry of the non-existent row header column?" )*/;
m_aRect.Left() = 0;
m_aRect.Right() = m_rControl.m_nRowHeaderWidthPixel - 1;
}
else
{
- ColPos nLeftColumn = m_rControl.m_nLeftColumn;
- if ( ( m_nColPos >= nLeftColumn ) && ( m_nColPos < (ColPos)m_rControl.m_aColumnWidthsPixel.size() ) )
- {
- m_aRect.Left() = m_rControl.m_nRowHeaderWidthPixel;
- // TODO: take into account any possibly frozen columns
+ impl_initRect();
+ }
+ }
- for ( ColPos col = nLeftColumn; col < m_nColPos; ++col )
- m_aRect.Left() += m_rControl.m_aColumnWidthsPixel[ col ];
- m_aRect.Right() = m_aRect.Left() + m_rControl.m_aColumnWidthsPixel[ m_nColPos ] - 1;
- }
- else
- m_aRect.SetEmpty();
+ //------------------------------------------------------------------------------------------------------------------
+ void TableColumnGeometry::impl_initRect()
+ {
+ ColPos nLeftColumn = m_rControl.m_nLeftColumn;
+ if ( ( m_nColPos >= nLeftColumn ) && impl_isValidColumn( m_nColPos ) )
+ {
+ m_aRect.Left() = m_rControl.m_nRowHeaderWidthPixel;
+ // TODO: take into account any possibly frozen columns
+
+ for ( ColPos col = nLeftColumn; col < m_nColPos; ++col )
+ m_aRect.Left() += m_rControl.m_aColumnWidths[ col ].getWidth();
+ m_aRect.Right() = m_aRect.Left() + m_rControl.m_aColumnWidths[ m_nColPos ].getWidth() - 1;
}
+ else
+ m_aRect.SetEmpty();
}
- //--------------------------------------------------------------------
- bool TableColumnGeometry::moveRight()
+ //------------------------------------------------------------------------------------------------------------------
+ bool TableColumnGeometry::impl_isValidColumn( ColPos const i_column ) const
{
- DBG_ASSERT( m_nColPos != COL_ROW_HEADERS, "TableColumnGeometry::moveRight: cannot move the row header column!" );
- // what would be COL_ROW_HEADERS + 1?
+ return m_bAllowVirtualColumns || ( i_column < ColPos( m_rControl.m_aColumnWidths.size() ) );
+ }
- if ( ++m_nColPos < (ColPos)m_rControl.m_aColumnWidthsPixel.size() )
+ //------------------------------------------------------------------------------------------------------------------
+ bool TableColumnGeometry::moveRight()
+ {
+ if ( m_nColPos == COL_ROW_HEADERS )
{
- m_aRect.Left() = m_aRect.Right() + 1;
- m_aRect.Right() += m_rControl.m_aColumnWidthsPixel[ m_nColPos ];
+ m_nColPos = m_rControl.m_nLeftColumn;
+ impl_initRect();
}
else
- m_aRect.SetEmpty();
+ {
+ if ( impl_isValidColumn( ++m_nColPos ) )
+ {
+ m_aRect.Left() = m_aRect.Right() + 1;
+ m_aRect.Right() += m_rControl.m_aColumnWidths[ m_nColPos ].getWidth();
+ }
+ else
+ m_aRect.SetEmpty();
+ }
return isValid();
}
-//........................................................................
+//......................................................................................................................
} } // namespace svt::table
-//........................................................................
+//......................................................................................................................
diff --git a/svtools/source/table/tablegeometry.hxx b/svtools/source/table/tablegeometry.hxx
index 3ddde0c98c64..fedc7cb2f24f 100644
--- a/svtools/source/table/tablegeometry.hxx
+++ b/svtools/source/table/tablegeometry.hxx
@@ -27,13 +27,9 @@
#ifndef SVTOOLS_TABLEGEOMETRY_HXX
#define SVTOOLS_TABLEGEOMETRY_HXX
-#ifndef SVTOOLS_INC_TABLE_TABLETYPES_HXX
-#include <svtools/table/tabletypes.hxx>
-#endif
+#include "svtools/table/tabletypes.hxx"
-#ifndef _SV_GEN_HXX
#include <tools/gen.hxx>
-#endif
//........................................................................
namespace svt { namespace table
@@ -79,18 +75,25 @@ namespace svt { namespace table
{
protected:
RowPos m_nRowPos;
+ bool m_bAllowVirtualRows;
public:
TableRowGeometry(
- const TableControl_Impl& _rControl,
- const Rectangle& _rBoundaries,
- RowPos _nRow
+ TableControl_Impl const & _rControl,
+ Rectangle const & _rBoundaries,
+ RowPos const _nRow,
+ bool const i_allowVirtualRows = false
+ // allow rows >= getRowCount()?
);
// status
RowPos getRow() const { return m_nRowPos; }
// operations
bool moveDown();
+
+ private:
+ void impl_initRect();
+ bool impl_isValidRow( RowPos const i_row ) const;
};
//====================================================================
@@ -100,18 +103,24 @@ namespace svt { namespace table
{
protected:
ColPos m_nColPos;
+ bool m_bAllowVirtualColumns;
public:
TableColumnGeometry(
- const TableControl_Impl& _rControl,
- const Rectangle& _rBoundaries,
- ColPos _nCol
+ TableControl_Impl const & _rControl,
+ Rectangle const & _rBoundaries,
+ ColPos const _nCol,
+ bool const i_allowVirtualColumns = false
);
// status
ColPos getCol() const { return m_nColPos; }
// operations
bool moveRight();
+
+ private:
+ void impl_initRect();
+ bool impl_isValidColumn( ColPos const i_column ) const;
};
//====================================================================
@@ -127,13 +136,14 @@ namespace svt { namespace table
public:
TableCellGeometry(
- const TableControl_Impl& _rControl,
- const Rectangle& _rBoundaries,
- ColPos _nCol,
- RowPos _nRow
+ TableControl_Impl const & _rControl,
+ Rectangle const & _rBoundaries,
+ ColPos const _nCol,
+ RowPos const _nRow,
+ bool const i_alllowVirtualCells = false
)
- :m_aRow( _rControl, _rBoundaries, _nRow )
- ,m_aCol( _rControl, _rBoundaries, _nCol )
+ :m_aRow( _rControl, _rBoundaries, _nRow, i_alllowVirtualCells )
+ ,m_aCol( _rControl, _rBoundaries, _nCol, i_alllowVirtualCells )
{
}
diff --git a/svtools/source/toolpanel/drawerlayouter.cxx b/svtools/source/toolpanel/drawerlayouter.cxx
index 7fc7d05ea0c9..4de76107fd20 100644
--- a/svtools/source/toolpanel/drawerlayouter.cxx
+++ b/svtools/source/toolpanel/drawerlayouter.cxx
@@ -147,10 +147,10 @@ namespace svt
const PToolPanelDrawer pDrawer( m_aDrawers[ i_nChildIndex ] );
- Reference< XAccessible > xItemAccessible = pDrawer->GetAccessible( FALSE );
+ Reference< XAccessible > xItemAccessible = pDrawer->GetAccessible( sal_False );
if ( !xItemAccessible.is() )
{
- xItemAccessible = pDrawer->GetAccessible( TRUE );
+ xItemAccessible = pDrawer->GetAccessible( sal_True );
ENSURE_OR_RETURN( xItemAccessible.is(), "illegal accessible provided by the drawer implementation!", NULL );
OSL_VERIFY( ::comphelper::OAccessibleImplementationAccess::setAccessibleParent( xItemAccessible->getAccessibleContext(),
i_rParentAccessible ) );
diff --git a/svtools/source/toolpanel/paneltabbar.cxx b/svtools/source/toolpanel/paneltabbar.cxx
index 23067d3ee5d0..7888039d8c57 100755
--- a/svtools/source/toolpanel/paneltabbar.cxx
+++ b/svtools/source/toolpanel/paneltabbar.cxx
@@ -168,8 +168,8 @@ namespace svt
aSelectionRect,
( bHovered || bFocused ) ? ( bActive ? 1 : 2 ) : 0 /* hilight */,
bActive /* check */,
- TRUE /* border */,
- FALSE /* ext border only */,
+ sal_True /* border */,
+ sal_False /* ext border only */,
0 /* corner radius */,
NULL,
NULL
@@ -685,7 +685,7 @@ namespace svt
Font aFont( m_rTabBar.GetFont() );
aFont.SetOrientation( 2700 );
- aFont.SetVertical( TRUE );
+ aFont.SetVertical( sal_True );
m_rTabBar.SetFont( aFont );
aTextPos.X() += aTextSize.Height();
@@ -787,7 +787,7 @@ namespace svt
return;
}
- m_rTabBar.SetUpdateMode( FALSE );
+ m_rTabBar.SetUpdateMode( sal_False );
// the aligned bounding and content rect
const Rectangle aActualBounds = m_aNormalizer.getTransformed( aNormalizedBounds, m_eTabAlignment );
@@ -805,7 +805,7 @@ namespace svt
// render item "foreground" layer
m_pRenderer->postRenderItem( m_rTabBar, aActualBounds, nItemFlags );
- m_rTabBar.SetUpdateMode( TRUE );
+ m_rTabBar.SetUpdateMode( sal_True );
}
//------------------------------------------------------------------------------------------------------------------
@@ -1338,9 +1338,9 @@ namespace svt
}
//------------------------------------------------------------------------------------------------------------------
- Reference< XWindowPeer > PanelTabBar::GetComponentInterface( BOOL i_bCreate )
+ Reference< XWindowPeer > PanelTabBar::GetComponentInterface( sal_Bool i_bCreate )
{
- Reference< XWindowPeer > xWindowPeer( Control::GetComponentInterface( FALSE ) );
+ Reference< XWindowPeer > xWindowPeer( Control::GetComponentInterface( sal_False ) );
if ( !xWindowPeer.is() && i_bCreate )
{
xWindowPeer.set( new PanelTabBarPeer( *this ) );
diff --git a/svtools/source/toolpanel/tablayouter.cxx b/svtools/source/toolpanel/tablayouter.cxx
index f68bbc1bbd0f..e93fc9fc1357 100755
--- a/svtools/source/toolpanel/tablayouter.cxx
+++ b/svtools/source/toolpanel/tablayouter.cxx
@@ -254,7 +254,7 @@ namespace svt
if ( lcl_checkDisposed( *m_pData ) )
return NULL;
- return m_pData->pTabBar->GetAccessible( TRUE );
+ return m_pData->pTabBar->GetAccessible( sal_True );
}
//........................................................................
diff --git a/svtools/source/toolpanel/toolpaneldeck.cxx b/svtools/source/toolpanel/toolpaneldeck.cxx
index e157090bbf0e..ae69b85dfecd 100755
--- a/svtools/source/toolpanel/toolpaneldeck.cxx
+++ b/svtools/source/toolpanel/toolpaneldeck.cxx
@@ -544,9 +544,9 @@ namespace svt
}
//--------------------------------------------------------------------
- Reference< XWindowPeer > ToolPanelDeck::GetComponentInterface( BOOL i_bCreate )
+ Reference< XWindowPeer > ToolPanelDeck::GetComponentInterface( sal_Bool i_bCreate )
{
- Reference< XWindowPeer > xWindowPeer( Control::GetComponentInterface( FALSE ) );
+ Reference< XWindowPeer > xWindowPeer( Control::GetComponentInterface( sal_False ) );
if ( !xWindowPeer.is() && i_bCreate )
{
xWindowPeer.set( new ToolPanelDeckPeer( *this ) );
diff --git a/svtools/source/toolpanel/toolpaneldrawer.cxx b/svtools/source/toolpanel/toolpaneldrawer.cxx
index 851556bc7874..1e7f2358a125 100644
--- a/svtools/source/toolpanel/toolpaneldrawer.cxx
+++ b/svtools/source/toolpanel/toolpaneldrawer.cxx
@@ -57,7 +57,7 @@ namespace svt
:Window( &i_rParent )
,m_rDrawer( i_rParent )
{
- SetMouseTransparent( TRUE );
+ SetMouseTransparent( sal_True );
Show();
SetAccessibleRole( AccessibleRole::LABEL );
}
@@ -85,7 +85,7 @@ namespace svt
,m_bFocused( false )
,m_bExpanded( false )
{
- EnableMapMode( FALSE );
+ EnableMapMode( sal_False );
SetBackground( Wallpaper() );
SetPointer( POINTER_REFHAND );
@@ -162,7 +162,7 @@ namespace svt
Image ToolPanelDrawer::impl_getExpansionIndicator() const
{
const bool bHighContrastMode( GetSettings().GetStyleSettings().GetHighContrastMode() != 0 );
- USHORT nResourceId = 0;
+ sal_uInt16 nResourceId = 0;
if ( m_bExpanded )
if ( bHighContrastMode )
nResourceId = IMG_TRIANGLE_DOWN_HC;
@@ -177,9 +177,9 @@ namespace svt
}
//------------------------------------------------------------------------------------------------------------------
- USHORT ToolPanelDrawer::impl_getTextStyle() const
+ sal_uInt16 ToolPanelDrawer::impl_getTextStyle() const
{
- const USHORT nBasicStyle = TEXT_DRAW_LEFT
+ const sal_uInt16 nBasicStyle = TEXT_DRAW_LEFT
| TEXT_DRAW_TOP
| TEXT_DRAW_WORDBREAK;
@@ -212,7 +212,7 @@ namespace svt
{
const Rectangle aTextPixelBox( m_pPaintDevice->LogicToPixel( i_rTextBox ) );
- m_pPaintDevice->EnableMapMode( FALSE );
+ m_pPaintDevice->EnableMapMode( sal_False );
m_pPaintDevice->SetFillColor();
Rectangle aBox( i_rTextBox );
@@ -229,7 +229,7 @@ namespace svt
m_pPaintDevice->SetLineColor( COL_BLACK );
m_pPaintDevice->DrawPolyLine( Polygon( aTextPixelBox ), aDottedStyle );
- m_pPaintDevice->EnableMapMode( FALSE );
+ m_pPaintDevice->EnableMapMode( sal_False );
}
else
HideFocus();
@@ -306,9 +306,9 @@ namespace svt
}
//------------------------------------------------------------------------------------------------------------------
- Reference< XWindowPeer > ToolPanelDrawer::GetComponentInterface( BOOL i_bCreate )
+ Reference< XWindowPeer > ToolPanelDrawer::GetComponentInterface( sal_Bool i_bCreate )
{
- Reference< XWindowPeer > xWindowPeer( Window::GetComponentInterface( FALSE ) );
+ Reference< XWindowPeer > xWindowPeer( Window::GetComponentInterface( sal_False ) );
if ( !xWindowPeer.is() && i_bCreate )
{
xWindowPeer.set( new ToolPanelDrawerPeer() );
diff --git a/svtools/source/toolpanel/toolpaneldrawer.hxx b/svtools/source/toolpanel/toolpaneldrawer.hxx
index a465a0a6c9e1..4baf49dd17c9 100644
--- a/svtools/source/toolpanel/toolpaneldrawer.hxx
+++ b/svtools/source/toolpanel/toolpaneldrawer.hxx
@@ -86,13 +86,13 @@ namespace svt
virtual void MouseButtonDown( const MouseEvent& i_rMouseEvent );
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >
- GetComponentInterface( BOOL i_bCreate );
+ GetComponentInterface( sal_Bool i_bCreate );
private:
Rectangle impl_calcTextBoundingBox() const;
Rectangle impl_calcTitleBarBox( const Rectangle& i_rTextBox ) const;
void impl_paintBackground( const Rectangle& i_rTitleBarBox );
- USHORT impl_getTextStyle() const;
+ sal_uInt16 impl_getTextStyle() const;
void impl_paintFocusIndicator( const Rectangle& i_rTextBox );
Rectangle impl_paintExpansionIndicator( const Rectangle& i_rTextBox );
Image impl_getExpansionIndicator() const;
diff --git a/svtools/source/uno/addrtempuno.cxx b/svtools/source/uno/addrtempuno.cxx
index 3ccf83a224f8..706afe09202f 100644
--- a/svtools/source/uno/addrtempuno.cxx
+++ b/svtools/source/uno/addrtempuno.cxx
@@ -29,7 +29,7 @@
#include "precompiled_svtools.hxx"
#include "svtools/genericunodialog.hxx"
#include <svtools/addresstemplate.hxx>
-#include <cppuhelper/extract.hxx>
+#include <comphelper/extract.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <comphelper/property.hxx>
#include <com/sun/star/sdbc/XDataSource.hpp>
diff --git a/svtools/source/uno/generictoolboxcontroller.cxx b/svtools/source/uno/generictoolboxcontroller.cxx
index a58d9b784cca..33ec21a189f8 100644
--- a/svtools/source/uno/generictoolboxcontroller.cxx
+++ b/svtools/source/uno/generictoolboxcontroller.cxx
@@ -70,7 +70,7 @@ struct ExecuteInfo
GenericToolboxController::GenericToolboxController( const Reference< XMultiServiceFactory >& rServiceManager,
const Reference< XFrame >& rFrame,
ToolBox* pToolbox,
- USHORT nID,
+ sal_uInt16 nID,
const ::rtl::OUString& aCommand ) :
svt::ToolboxController( rServiceManager, rFrame, aCommand )
, m_pToolbox( pToolbox )
@@ -157,7 +157,7 @@ throw ( RuntimeException )
{
m_pToolbox->EnableItem( m_nID, Event.IsEnabled );
- USHORT nItemBits = m_pToolbox->GetItemBits( m_nID );
+ sal_uInt16 nItemBits = m_pToolbox->GetItemBits( m_nID );
nItemBits &= ~TIB_CHECKABLE;
TriState eTri = STATE_NOCHECK;
diff --git a/svtools/source/uno/genericunodialog.cxx b/svtools/source/uno/genericunodialog.cxx
index a7ece1acc369..a1fdc7840a55 100644
--- a/svtools/source/uno/genericunodialog.cxx
+++ b/svtools/source/uno/genericunodialog.cxx
@@ -34,7 +34,7 @@
#include <com/sun/star/ucb/AlreadyInitializedException.hpp>
#include <toolkit/awt/vclxwindow.hxx>
-#include <cppuhelper/extract.hxx>
+#include <comphelper/extract.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <comphelper/property.hxx>
#include <osl/diagnose.h>
diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx
index f5bc837f60b0..0e826ef6bff3 100644
--- a/svtools/source/uno/svtxgridcontrol.cxx
+++ b/svtools/source/uno/svtxgridcontrol.cxx
@@ -28,115 +28,193 @@
#include "precompiled_svtools.hxx"
#include "svtxgridcontrol.hxx"
-#include "accessibletableimp.hxx"
#include <com/sun/star/view/SelectionType.hpp>
+#include "svtools/table/tablecontrolinterface.hxx"
#include "svtools/table/gridtablerenderer.hxx"
-#include "svtools/table/defaultinputhandler.hxx"
#include "svtools/table/tablecontrol.hxx"
#include "unocontroltablemodel.hxx"
#include <comphelper/sequence.hxx>
#include <rtl/ref.hxx>
-#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
#include <toolkit/helper/property.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/awt/grid/XGridColumn.hpp>
-#include <com/sun/star/accessibility/AccessibleTableModelChange.hpp>
-#include <com/sun/star/accessibility/AccessibleTableModelChangeType.hpp>
-#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <com/sun/star/awt/XControl.hpp>
#include <com/sun/star/awt/grid/GridInvalidDataException.hpp>
#include <com/sun/star/awt/grid/GridInvalidModelException.hpp>
#include <com/sun/star/util/Color.hpp>
#include <com/sun/star/awt/FontDescriptor.hpp>
-using ::rtl::OUString;
using namespace ::svt::table;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::awt::grid;
using namespace ::com::sun::star::view;
-using namespace ::toolkit;
+using namespace ::com::sun::star::style;
+using namespace ::com::sun::star::container;
using namespace ::com::sun::star::accessibility;
-using namespace ::com::sun::star::accessibility::AccessibleEventId;
-using namespace ::com::sun::star::accessibility::AccessibleTableModelChangeType;
-using ::com::sun::star::accessibility::AccessibleTableModelChange;
SVTXGridControl::SVTXGridControl()
- :m_pTableModel (new UnoControlTableModel()),
- m_xDataModel(0),
- m_xColumnModel(0),
- m_bHasColumnHeaders(false),
- m_bHasRowHeaders(false),
- m_bVScroll(false),
- m_bHScroll(false),
- m_bUpdate(false),
- m_nSelectedRowCount(0),
- m_aSelectionListeners( *this )
+ :m_pTableModel( new UnoControlTableModel() )
+ ,m_bHasColumnHeaders( false )
+ ,m_bHasRowHeaders( false )
+ ,m_bTableModelInitCompleted( false )
+ ,m_nSelectedRowCount( 0 )
+ ,m_aSelectionListeners( *this )
{
}
-//--------------------------------------------------------------------
+// ---------------------------------------------------------------------------------------------------------------------
SVTXGridControl::~SVTXGridControl()
{
}
-::com::sun::star::uno::Any SVTXGridControl::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException)
+// ---------------------------------------------------------------------------------------------------------------------
+void SVTXGridControl::SetWindow( Window* pWindow )
{
- ::com::sun::star::uno::Any aRet = ::cppu::queryInterface( rType,
- SAL_STATIC_CAST( ::com::sun::star::awt::grid::XGridControl*, this ),
- SAL_STATIC_CAST( ::com::sun::star::awt::grid::XGridDataListener*, this ),
- SAL_STATIC_CAST( ::com::sun::star::awt::grid::XGridColumnListener*, this ),
- SAL_STATIC_CAST( ::com::sun::star::lang::XTypeProvider*, this ) );
- return (aRet.hasValue() ? aRet : VCLXWindow::queryInterface( rType ));
+ SVTXGridControl_Base::SetWindow( pWindow );
+ impl_checkTableModelInit();
}
-// ::com::sun::star::lang::XTypeProvider
-IMPL_XTYPEPROVIDER_START( SVTXGridControl )
- getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridControl>* ) NULL ),
- getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataModel>* ) NULL ),
- getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener>* ) NULL ),
- VCLXWindow::getTypes()
-IMPL_XTYPEPROVIDER_END
+// ---------------------------------------------------------------------------------------------------------------------
+sal_Int32 SAL_CALL SVTXGridControl::getRowAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException)
+{
+ ::vos::OGuard aGuard( GetMutex() );
+
+ TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() );
+ ENSURE_OR_RETURN( pTable != NULL, "SVTXGridControl::getRowAtPoint: no control (anymore)!", -1 );
+
+ TableCell const tableCell = pTable->getTableControlInterface().hitTest( Point( x, y ) );
+ return ( tableCell.nRow >= 0 ) ? tableCell.nRow : -1;
+}
-sal_Int32 SAL_CALL SVTXGridControl::getItemIndexAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException)
+// ---------------------------------------------------------------------------------------------------------------------
+sal_Int32 SAL_CALL SVTXGridControl::getColumnAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException)
{
- TableControl* pTable = (TableControl*)GetWindow();
- return pTable->GetCurrentRow( Point(x,y) );
+ ::vos::OGuard aGuard( GetMutex() );
+
+ TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() );
+ ENSURE_OR_RETURN( pTable != NULL, "SVTXGridControl::getColumnAtPoint: no control (anymore)!", -1 );
+
+ TableCell const tableCell = pTable->getTableControlInterface().hitTest( Point( x, y ) );
+ return ( tableCell.nColumn >= 0 ) ? tableCell.nColumn : -1;
}
-void SAL_CALL SVTXGridControl::setToolTip(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& text, const com::sun::star::uno::Sequence< sal_Int32 >& columns) throw (::com::sun::star::uno::RuntimeException)
+// ---------------------------------------------------------------------------------------------------------------------
+sal_Int32 SAL_CALL SVTXGridControl::getCurrentColumn( ) throw (RuntimeException)
{
- TableControl* pTable = (TableControl*)GetWindow();
- pTable->setTooltip(text, columns);
+ ::vos::OGuard aGuard( GetMutex() );
+
+ TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() );
+ ENSURE_OR_RETURN( pTable != NULL, "SVTXGridControl::getCurrentColumn: no control (anymore)!", -1 );
+
+ sal_Int32 const nColumn = pTable->GetCurrentColumn();
+ return ( nColumn >= 0 ) ? nColumn : -1;
}
+// ---------------------------------------------------------------------------------------------------------------------
+sal_Int32 SAL_CALL SVTXGridControl::getCurrentRow( ) throw (RuntimeException)
+{
+ ::vos::OGuard aGuard( GetMutex() );
+
+ TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() );
+ ENSURE_OR_RETURN( pTable != NULL, "SVTXGridControl::getCurrentRow: no control (anymore)!", -1 );
+
+ sal_Int32 const nRow = pTable->GetCurrentRow();
+ return ( nRow >= 0 ) ? nRow : -1;
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
void SAL_CALL SVTXGridControl::addSelectionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridSelectionListener > & listener) throw (::com::sun::star::uno::RuntimeException)
{
m_aSelectionListeners.addInterface(listener);
}
+// ---------------------------------------------------------------------------------------------------------------------
void SAL_CALL SVTXGridControl::removeSelectionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridSelectionListener > & listener) throw (::com::sun::star::uno::RuntimeException)
{
m_aSelectionListeners.removeInterface(listener);
}
+// ---------------------------------------------------------------------------------------------------------------------
void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const Any& aValue) throw(RuntimeException)
{
::vos::OGuard aGuard( GetMutex() );
- TableControl* pTable = (TableControl*)GetWindow();
+ TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() );
+ ENSURE_OR_RETURN_VOID( pTable != NULL, "SVTXGridControl::setProperty: no control (anymore)!" );
+
switch( GetPropertyId( PropertyName ) )
{
+ case BASEPROPERTY_ROW_HEADER_WIDTH:
+ {
+ sal_Int32 rowHeaderWidth( -1 );
+ aValue >>= rowHeaderWidth;
+ ENSURE_OR_BREAK( rowHeaderWidth > 0, "SVTXGridControl::setProperty: illegal row header width!" );
+ m_pTableModel->setRowHeaderWidth( rowHeaderWidth );
+ // TODO: the model should broadcast this change itself, and the table should invalidate itself as needed
+ pTable->Invalidate();
+ }
+ break;
+
+ case BASEPROPERTY_COLUMN_HEADER_HEIGHT:
+ {
+ sal_Int32 columnHeaderHeight = 0;
+ if ( !aValue.hasValue() )
+ {
+ columnHeaderHeight = pTable->PixelToLogic( Size( 0, pTable->GetTextHeight() + 3 ), MAP_APPFONT ).Height();
+ }
+ else
+ {
+ aValue >>= columnHeaderHeight;
+ }
+ ENSURE_OR_BREAK( columnHeaderHeight > 0, "SVTXGridControl::setProperty: illegal column header height!" );
+ m_pTableModel->setColumnHeaderHeight( columnHeaderHeight );
+ // TODO: the model should broadcast this change itself, and the table should invalidate itself as needed
+ pTable->Invalidate();
+ }
+ break;
+
+ case BASEPROPERTY_USE_GRID_LINES:
+ {
+ GridTableRenderer* pGridRenderer = dynamic_cast< GridTableRenderer* >(
+ m_pTableModel->getRenderer().get() );
+ ENSURE_OR_BREAK( pGridRenderer != NULL, "SVTXGridControl::setProperty(UseGridLines): invalid renderer!" );
+ sal_Bool bUseGridLines = sal_False;
+ OSL_VERIFY( aValue >>= bUseGridLines );
+ pGridRenderer->useGridLines( bUseGridLines );
+ pTable->Invalidate();
+ }
+ break;
+
+ case BASEPROPERTY_ROW_HEIGHT:
+ {
+ sal_Int32 rowHeight = 0;
+ if ( !aValue.hasValue() )
+ {
+ rowHeight = pTable->PixelToLogic( Size( 0, pTable->GetTextHeight() + 3 ), MAP_APPFONT ).Height();
+ }
+ else
+ {
+ aValue >>= rowHeight;
+ }
+ m_pTableModel->setRowHeight( rowHeight );
+ ENSURE_OR_BREAK( rowHeight > 0, "SVTXGridControl::setProperty: illegal row height!" );
+ // TODO: the model should broadcast this change itself, and the table should invalidate itself as needed
+ pTable->Invalidate();
+ }
+ break;
+
case BASEPROPERTY_BACKGROUNDCOLOR:
{
// let the base class handle this for the TableControl
VCLXWindow::setProperty( PropertyName, aValue );
// and forward to the grid control's data window
if ( pTable->IsBackground() )
- pTable->getDataWindow()->SetBackground( pTable->GetBackground() );
+ pTable->getDataWindow().SetBackground( pTable->GetBackground() );
else
- pTable->getDataWindow()->SetBackground();
+ pTable->getDataWindow().SetBackground();
}
break;
@@ -151,7 +229,6 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An
case SelectionType_SINGLE: eSelMode = SINGLE_SELECTION; break;
case SelectionType_RANGE: eSelMode = RANGE_SELECTION; break;
case SelectionType_MULTI: eSelMode = MULTIPLE_SELECTION; break;
- // case SelectionType_NONE:
default: eSelMode = NO_SELECTION; break;
}
if( pTable->getSelEngine()->GetSelectionMode() != eSelMode )
@@ -163,19 +240,16 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An
{
sal_Bool bHScroll = true;
if( aValue >>= bHScroll )
- {
- m_bHScroll = bHScroll;
- m_pTableModel->setHorizontalScrollbarVisibility(bHScroll);
- }
+ m_pTableModel->setHorizontalScrollbarVisibility( bHScroll ? ScrollbarShowAlways : ScrollbarShowSmart );
break;
}
+
case BASEPROPERTY_VSCROLL:
{
sal_Bool bVScroll = true;
if( aValue >>= bVScroll )
{
- m_bVScroll = bVScroll;
- m_pTableModel->setVerticalScrollbarVisibility(bVScroll);
+ m_pTableModel->setVerticalScrollbarVisibility( bVScroll ? ScrollbarShowAlways : ScrollbarShowSmart );
}
break;
}
@@ -189,64 +263,42 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An
}
break;
}
- case BASEPROPERTY_GRID_HEADER_BACKGROUND:
- {
- sal_Int32 colorHeader = 0xFFFFFF;
- if( aValue >>= colorHeader )
- {
- m_pTableModel->setHeaderBackgroundColor(colorHeader);
- }
+
+ case BASEPROPERTY_GRID_ROW_BACKGROUND_COLORS:
+ m_pTableModel->setRowBackgroundColors( aValue );
+ pTable->Invalidate();
break;
- }
+
case BASEPROPERTY_GRID_LINE_COLOR:
- {
- sal_Int32 colorLine = 0xFFFFFF;
- if( aValue >>= colorLine )
- {
- m_pTableModel->setLineColor(colorLine);
- }
+ m_pTableModel->setLineColor( aValue );
+ pTable->Invalidate();
break;
- }
- case BASEPROPERTY_GRID_EVEN_ROW_BACKGROUND:
- {
- sal_Int32 colorEvenRow = 0xFFFFFF;
- if( aValue >>= colorEvenRow )
- {
- m_pTableModel->setEvenRowBackgroundColor(colorEvenRow);
- }
+
+ case BASEPROPERTY_GRID_HEADER_BACKGROUND:
+ m_pTableModel->setHeaderBackgroundColor( aValue );
+ pTable->Invalidate();
break;
- }
- case BASEPROPERTY_GRID_ROW_BACKGROUND:
- {
- sal_Int32 colorBackground = 0xFFFFFF;
- if( aValue >>= colorBackground )
- {
- m_pTableModel->setOddRowBackgroundColor(colorBackground);
- }
+
+ case BASEPROPERTY_GRID_HEADER_TEXT_COLOR:
+ m_pTableModel->setHeaderTextColor( aValue );
+ pTable->Invalidate();
break;
- }
+
case BASEPROPERTY_TEXTCOLOR:
- {
- sal_Int32 colorText = 0x000000;
- if( aValue >>= colorText )
- {
- m_pTableModel->setTextColor(colorText);
- }
+ m_pTableModel->setTextColor( aValue );
+ pTable->Invalidate();
break;
- }
+
+ case BASEPROPERTY_TEXTLINECOLOR:
+ m_pTableModel->setTextLineColor( aValue );
+ pTable->Invalidate();
+ break;
+
case BASEPROPERTY_VERTICALALIGN:
{
- com::sun::star::style::VerticalAlignment vAlign(com::sun::star::style::VerticalAlignment(0));
- if( aValue >>= vAlign )
- {
- switch( vAlign )
- {
- case com::sun::star::style::VerticalAlignment_TOP: m_pTableModel->setVerticalAlign(com::sun::star::style::VerticalAlignment(0)); break;
- case com::sun::star::style::VerticalAlignment_MIDDLE: m_pTableModel->setVerticalAlign(com::sun::star::style::VerticalAlignment(1)); break;
- case com::sun::star::style::VerticalAlignment_BOTTOM: m_pTableModel->setVerticalAlign(com::sun::star::style::VerticalAlignment(2)); break;
- default: m_pTableModel->setVerticalAlign(com::sun::star::style::VerticalAlignment(0)); break;
- }
- }
+ VerticalAlignment eAlign( VerticalAlignment_TOP );
+ if ( aValue >>= eAlign )
+ m_pTableModel->setVerticalAlign( eAlign );
break;
}
@@ -261,97 +313,31 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An
}
case BASEPROPERTY_GRID_DATAMODEL:
{
- {
- m_xDataModel = Reference< XGridDataModel >( aValue, UNO_QUERY );
- if(m_xDataModel != NULL)
- {
- Sequence<Sequence< Any > > cellData = m_xDataModel->getData();
- if(cellData.getLength()!= 0)
- {
- for (int i = 0; i < cellData.getLength(); i++)
- {
- std::vector< Any > newRow;
- Sequence< Any > rawRowData = cellData[i];
- //check whether the data row vector length matches with the column count
- if(m_xColumnModel->getColumnCount() == 0)
- {
- for ( ::svt::table::ColPos col = 0; col < rawRowData.getLength(); ++col )
- {
- UnoControlTableColumn* tableColumn = new UnoControlTableColumn();
- m_pTableModel->getColumnModel().push_back((PColumnModel)tableColumn);
- }
- m_xColumnModel->setDefaultColumns(rawRowData.getLength());
- }
- else
- if((unsigned int)rawRowData.getLength()!=(unsigned)m_pTableModel->getColumnCount())
- throw GridInvalidDataException(rtl::OUString::createFromAscii("The column count doesn't match with the length of row data"), m_xDataModel);
-
- for ( int k = 0; k < rawRowData.getLength(); k++)
- {
- newRow.push_back(rawRowData[k]);
- }
- m_pTableModel->getCellContent().push_back(newRow);
- }
-
- Sequence< ::rtl::OUString > rowHeaders = m_xDataModel->getRowHeaders();
- std::vector< rtl::OUString > newRow(
- comphelper::sequenceToContainer< std::vector<rtl::OUString > >(rowHeaders));
- m_pTableModel->setRowCount(m_xDataModel->getRowCount());
- m_pTableModel->setRowHeaderName(newRow);
- }
- }
- else
- throw GridInvalidDataException(rtl::OUString::createFromAscii("The data model isn't set!"), m_xDataModel);
- sal_Int32 fontHeight = pTable->PixelToLogic( Size( 0, pTable->GetTextHeight()+3 ), MAP_APPFONT ).Height();
- if(m_xDataModel->getRowHeight() == 0)
- {
- m_pTableModel->setRowHeight(fontHeight);
- m_xDataModel->setRowHeight(fontHeight);
- }
- else
- m_pTableModel->setRowHeight(m_xDataModel->getRowHeight());
- m_pTableModel->setRowHeaderWidth(m_xDataModel->getRowHeaderWidth());
- }
- break;
+ Reference< XGridDataModel > const xDataModel( aValue, UNO_QUERY );
+ if ( !xDataModel.is() )
+ throw GridInvalidDataException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Invalid data model." ) ), *this );
+
+ m_pTableModel->setDataModel( xDataModel );
+ impl_checkTableModelInit();
}
+ break;
+
case BASEPROPERTY_GRID_COLUMNMODEL:
{
- m_xColumnModel = Reference< XGridColumnModel >( aValue, UNO_QUERY );
- if(m_xColumnModel != NULL)
- {
- if(m_xColumnModel->getColumnCount() != 0)
- {
- Sequence<Reference< XGridColumn > > columns = m_xColumnModel->getColumns();
- std::vector<Reference< XGridColumn > > aNewColumns(
- comphelper::sequenceToContainer<std::vector<Reference< XGridColumn > > >(columns));
- sal_Int32 fontHeight = pTable->PixelToLogic( Size( 0, pTable->GetTextHeight()+3 ), MAP_APPFONT ).Height();
- if(m_xColumnModel->getColumnHeaderHeight() == 0)
- {
- m_pTableModel->setColumnHeaderHeight(fontHeight);
- m_xColumnModel->setColumnHeaderHeight(fontHeight);
- }
- else
- m_pTableModel->setColumnHeaderHeight(m_xColumnModel->getColumnHeaderHeight());
- for ( ::svt::table::ColPos col = 0; col < m_xColumnModel->getColumnCount(); ++col )
- {
- UnoControlTableColumn* tableColumn = new UnoControlTableColumn(aNewColumns[col]);
- Reference< XGridColumn > xGridColumn = m_xColumnModel->getColumn(col);
- m_pTableModel->getColumnModel().push_back((PColumnModel)tableColumn);
- tableColumn->setHorizontalAlign(xGridColumn->getHorizontalAlign());
- tableColumn->setWidth(xGridColumn->getColumnWidth());
- if(xGridColumn->getPreferredWidth() != 0)
- tableColumn->setPreferredWidth(xGridColumn->getPreferredWidth());
- if(xGridColumn->getMaxWidth() != 0)
- tableColumn->setMaxWidth(xGridColumn->getMaxWidth());
- if(xGridColumn->getMinWidth() != 0)
- tableColumn->setMinWidth(xGridColumn->getMinWidth());
- tableColumn->setResizable(xGridColumn->getResizeable());
- }
- }
- }
- else
- throw GridInvalidModelException(rtl::OUString::createFromAscii("The column model isn't set!"), m_xColumnModel);
+ // obtain new col model
+ Reference< XGridColumnModel > const xColumnModel( aValue, UNO_QUERY );
+ if ( !xColumnModel.is() )
+ throw GridInvalidModelException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Invalid column model." ) ), *this );
+
+ // remove all old columns
+ m_pTableModel->removeAllColumns();
+
+ // announce to the TableModel
+ m_pTableModel->setColumnModel( xColumnModel );
+ impl_checkTableModelInit();
+ // add new columns
+ impl_updateColumnsFromModel_nothrow();
break;
}
default:
@@ -360,489 +346,354 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An
}
}
+
+void SVTXGridControl::impl_checkTableModelInit()
+{
+ if ( !m_bTableModelInitCompleted && m_pTableModel->hasColumnModel() && m_pTableModel->hasDataModel() )
+ {
+ TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() );
+ if ( pTable )
+ {
+ pTable->SetModel( PTableModel( m_pTableModel ) );
+
+ m_bTableModelInitCompleted = true;
+
+ // ensure default columns exist, if they have not previously been added
+ Reference< XGridDataModel > const xDataModel( m_pTableModel->getDataModel(), UNO_QUERY_THROW );
+ Reference< XGridColumnModel > const xColumnModel( m_pTableModel->getColumnModel(), UNO_QUERY_THROW );
+
+ sal_Int32 const nDataColumnCount = xDataModel->getColumnCount();
+ if ( ( nDataColumnCount > 0 ) && ( xColumnModel->getColumnCount() == 0 ) )
+ xColumnModel->setDefaultColumns( nDataColumnCount );
+ // this will trigger notifications, which in turn will let us update our m_pTableModel
+ }
+ }
+}
+
+namespace
+{
+ void lcl_convertColor( ::boost::optional< ::Color > const & i_color, Any & o_colorValue )
+ {
+ if ( !i_color )
+ o_colorValue.clear();
+ else
+ o_colorValue <<= i_color->GetColor();
+ }
+}
+
Any SVTXGridControl::getProperty( const ::rtl::OUString& PropertyName ) throw(RuntimeException)
{
::vos::OGuard aGuard( GetMutex() );
+ TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() );
+ ENSURE_OR_RETURN( pTable != NULL, "SVTXGridControl::getProperty: no control (anymore)!", Any() );
+
+ Any aPropertyValue;
+
const sal_uInt16 nPropId = GetPropertyId( PropertyName );
- TableControl* pTable = (TableControl*)GetWindow();
- if(pTable)
+ switch(nPropId)
+ {
+ case BASEPROPERTY_GRID_SELECTIONMODE:
{
- switch(nPropId)
+ SelectionType eSelectionType;
+
+ SelectionMode eSelMode = pTable->getSelEngine()->GetSelectionMode();
+ switch( eSelMode )
{
- case BASEPROPERTY_GRID_SELECTIONMODE:
+ case SINGLE_SELECTION: eSelectionType = SelectionType_SINGLE; break;
+ case RANGE_SELECTION: eSelectionType = SelectionType_RANGE; break;
+ case MULTIPLE_SELECTION:eSelectionType = SelectionType_MULTI; break;
+ default: eSelectionType = SelectionType_NONE; break;
+ }
+ aPropertyValue <<= eSelectionType;
+ break;
+ }
+
+ case BASEPROPERTY_GRID_SHOWROWHEADER:
+ aPropertyValue <<= sal_Bool( m_pTableModel->hasRowHeaders() );
+ break;
+
+ case BASEPROPERTY_GRID_SHOWCOLUMNHEADER:
+ aPropertyValue <<= sal_Bool( m_pTableModel->hasColumnHeaders() );
+ break;
+
+ case BASEPROPERTY_GRID_DATAMODEL:
+ aPropertyValue <<= m_pTableModel->getDataModel();
+ break;
+
+ case BASEPROPERTY_GRID_COLUMNMODEL:
+ aPropertyValue <<= m_pTableModel->getColumnModel();
+ break;
+
+ case BASEPROPERTY_HSCROLL:
{
- SelectionType eSelectionType;
+ sal_Bool const bHasScrollbar = ( m_pTableModel->getHorizontalScrollbarVisibility() != ScrollbarShowNever );
+ aPropertyValue <<= bHasScrollbar;
+ break;
+ }
- SelectionMode eSelMode = pTable->getSelEngine()->GetSelectionMode();
- switch( eSelMode )
- {
- case SINGLE_SELECTION: eSelectionType = SelectionType_SINGLE; break;
- case RANGE_SELECTION: eSelectionType = SelectionType_RANGE; break;
- case MULTIPLE_SELECTION:eSelectionType = SelectionType_MULTI; break;
-// case NO_SELECTION:
- default: eSelectionType = SelectionType_NONE; break;
- }
- return Any( eSelectionType );
+ case BASEPROPERTY_VSCROLL:
+ {
+ sal_Bool const bHasScrollbar = ( m_pTableModel->getVerticalScrollbarVisibility() != ScrollbarShowNever );
+ aPropertyValue <<= bHasScrollbar;
+ break;
}
- case BASEPROPERTY_GRID_SHOWROWHEADER:
+
+ case BASEPROPERTY_USE_GRID_LINES:
+ {
+ GridTableRenderer* pGridRenderer = dynamic_cast< GridTableRenderer* >(
+ m_pTableModel->getRenderer().get() );
+ ENSURE_OR_BREAK( pGridRenderer != NULL, "SVTXGridControl::getProperty(UseGridLines): invalid renderer!" );
+ aPropertyValue <<= pGridRenderer->useGridLines();
+ }
+ break;
+
+ case BASEPROPERTY_GRID_ROW_BACKGROUND_COLORS:
+ {
+ ::boost::optional< ::std::vector< ::Color > > aColors( m_pTableModel->getRowBackgroundColors() );
+ if ( !aColors )
+ aPropertyValue.clear();
+ else
+ {
+ Sequence< ::com::sun::star::util::Color > aAPIColors( aColors->size() );
+ for ( size_t i=0; i<aColors->size(); ++i )
{
- return Any ((sal_Bool) m_pTableModel->hasRowHeaders());
+ aAPIColors[i] = aColors->at(i).GetColor();
}
- case BASEPROPERTY_GRID_SHOWCOLUMNHEADER:
- return Any ((sal_Bool) m_pTableModel->hasColumnHeaders());
- case BASEPROPERTY_GRID_DATAMODEL:
- return Any ( m_xDataModel );
- case BASEPROPERTY_GRID_COLUMNMODEL:
- return Any ( m_xColumnModel);
- case BASEPROPERTY_HSCROLL:
- return Any ( m_bHScroll);
- case BASEPROPERTY_VSCROLL:
- return Any ( m_bVScroll);
+ aPropertyValue <<= aAPIColors;
}
}
- return VCLXWindow::getProperty( PropertyName );
+ break;
+
+ case BASEPROPERTY_GRID_LINE_COLOR:
+ lcl_convertColor( m_pTableModel->getLineColor(), aPropertyValue );
+ break;
+
+ case BASEPROPERTY_GRID_HEADER_BACKGROUND:
+ lcl_convertColor( m_pTableModel->getHeaderBackgroundColor(), aPropertyValue );
+ break;
+
+ case BASEPROPERTY_GRID_HEADER_TEXT_COLOR:
+ lcl_convertColor( m_pTableModel->getHeaderTextColor(), aPropertyValue );
+ break;
+
+ case BASEPROPERTY_TEXTCOLOR:
+ lcl_convertColor( m_pTableModel->getTextColor(), aPropertyValue );
+ break;
+
+ case BASEPROPERTY_TEXTLINECOLOR:
+ lcl_convertColor( m_pTableModel->getTextLineColor(), aPropertyValue );
+ break;
+
+ default:
+ aPropertyValue = VCLXWindow::getProperty( PropertyName );
+ break;
+ }
+
+ return aPropertyValue;
}
void SVTXGridControl::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
{
PushPropertyIds( rIds,
- BASEPROPERTY_GRID_SHOWROWHEADER,
- BASEPROPERTY_GRID_SHOWCOLUMNHEADER,
- BASEPROPERTY_GRID_DATAMODEL,
- BASEPROPERTY_GRID_COLUMNMODEL,
- BASEPROPERTY_GRID_SELECTIONMODE,
- BASEPROPERTY_GRID_EVEN_ROW_BACKGROUND,
- BASEPROPERTY_GRID_HEADER_BACKGROUND,
- BASEPROPERTY_GRID_LINE_COLOR,
- BASEPROPERTY_GRID_ROW_BACKGROUND,
- 0);
+ BASEPROPERTY_GRID_SHOWROWHEADER,
+ BASEPROPERTY_GRID_SHOWCOLUMNHEADER,
+ BASEPROPERTY_GRID_DATAMODEL,
+ BASEPROPERTY_GRID_COLUMNMODEL,
+ BASEPROPERTY_GRID_SELECTIONMODE,
+ BASEPROPERTY_GRID_HEADER_BACKGROUND,
+ BASEPROPERTY_GRID_HEADER_TEXT_COLOR,
+ BASEPROPERTY_GRID_LINE_COLOR,
+ BASEPROPERTY_GRID_ROW_BACKGROUND_COLORS,
+ 0
+ );
VCLXWindow::ImplGetPropertyIds( rIds, true );
}
-void SAL_CALL SVTXGridControl::setVisible( sal_Bool bVisible ) throw(::com::sun::star::uno::RuntimeException)
+
+//----------------------------------------------------------------------------------------------------------------------
+void SAL_CALL SVTXGridControl::rowsInserted( const GridDataEvent& i_event ) throw (RuntimeException)
{
::vos::OGuard aGuard( GetMutex() );
- TableControl* pTable = (TableControl*)GetWindow();
- if ( pTable )
- {
- pTable->SetModel(PTableModel(m_pTableModel));
- pTable->Show( bVisible );
- }
+ m_pTableModel->notifyRowsInserted( i_event );
}
-void SAL_CALL SVTXGridControl::setFocus() throw(::com::sun::star::uno::RuntimeException)
+
+//----------------------------------------------------------------------------------------------------------------------
+void SAL_CALL//----------------------------------------------------------------------------------------------------------------------
+ SVTXGridControl::rowsRemoved( const GridDataEvent& i_event ) throw (RuntimeException)
{
::vos::OGuard aGuard( GetMutex() );
- if ( GetWindow())
- GetWindow()->GrabFocus();
+ m_pTableModel->notifyRowsRemoved( i_event );
}
-void SAL_CALL SVTXGridControl::rowAdded(const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException)
+
+//----------------------------------------------------------------------------------------------------------------------
+void SAL_CALL SVTXGridControl::dataChanged( const GridDataEvent& i_event ) throw (RuntimeException)
{
::vos::OGuard aGuard( GetMutex() );
- std::vector< Any > newRow;
- Sequence< Any > rawRowData = Event.rowData;
- int colCount = m_xColumnModel->getColumnCount();
- if(colCount == 0)
- {
- Reference<XGridColumnListener> listener(*this,UNO_QUERY_THROW);
- m_xColumnModel->setDefaultColumns(rawRowData.getLength());
- for ( ::svt::table::ColPos col = 0; col < rawRowData.getLength(); ++col )
- {
- UnoControlTableColumn* tableColumn = new UnoControlTableColumn();
- m_pTableModel->getColumnModel().push_back((PColumnModel)tableColumn);
- m_xColumnModel->getColumn(col)->addColumnListener(listener);
- }
+ m_pTableModel->notifyDataChanged( i_event );
- }
- else if((unsigned int)rawRowData.getLength()!=(unsigned)colCount)
- throw GridInvalidDataException(rtl::OUString::createFromAscii("The column count doesn't match with the length of row data"), m_xDataModel);
-
- for ( int k = 0; k < rawRowData.getLength(); k++)
- newRow.push_back(rawRowData[k]);
- m_pTableModel->getCellContent().push_back(newRow);
- if(m_pTableModel->hasRowHeaders())
- m_pTableModel->getRowHeaderName().push_back(Event.headerName);
- m_pTableModel->setRowCount(m_pTableModel->getCellContent().size());
- TableControl* pTable = (TableControl*)GetWindow();
- pTable->InvalidateDataWindow(m_pTableModel->getCellContent().size()-1, 0, false);
- if(pTable->isAccessibleAlive())
- {
- pTable->commitGridControlEvent(TABLE_MODEL_CHANGED,
- makeAny( AccessibleTableModelChange(INSERT, m_pTableModel->getRowCount()-1, m_pTableModel->getRowCount(), 0, m_pTableModel->getColumnCount())),
- Any());
- pTable->commitGridControlEvent(CHILD,
- makeAny( pTable->m_pAccessTable->m_pAccessible->getTableHeader(TCTYPE_ROWHEADERBAR)),
- Any());
- for (sal_Int32 i = 0 ; i <= m_pTableModel->getColumnCount() ; ++i)
- {
- pTable->commitGridControlEvent(
- CHILD,
- makeAny( pTable->m_pAccessTable->m_pAccessible->getTable() ),
- Any());
- }
- }
+ // if the data model is sortable, a dataChanged event is also fired in case the sort order changed.
+ // So, just in case, invalidate the column header area, too.
+ TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() );
+ ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::dataChanged: no control (anymore)!" );
+ pTable->getTableControlInterface().invalidate( TableAreaColumnHeaders );
}
-void SAL_CALL SVTXGridControl::rowRemoved(const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException)
+//----------------------------------------------------------------------------------------------------------------------
+void SAL_CALL SVTXGridControl::rowHeadingChanged( const GridDataEvent& i_event ) throw (RuntimeException)
{
::vos::OGuard aGuard( GetMutex() );
+ OSL_UNUSED( i_event );
- TableControl* pTable = (TableControl*)GetWindow();
- if(Event.index == -1)
- {
- if(!isSelectionEmpty())
- deselectAllRows();
- if(m_pTableModel->hasRowHeaders())
- m_pTableModel->getRowHeaderName().clear();
- pTable->clearSelection();
- m_pTableModel->getCellContent().clear();
- if(pTable->isAccessibleAlive())
- {
- pTable->commitGridControlEvent(TABLE_MODEL_CHANGED,
- makeAny( AccessibleTableModelChange(DELETE, 0, m_pTableModel->getColumnCount(), 0, m_pTableModel->getColumnCount())),
- Any());
- }
- }
- else if(Event.index >= 0 && Event.index < m_pTableModel->getRowCount())
- {
- if(isSelectedIndex(Event.index))
- {
- Sequence<sal_Int32> selected(1);
- selected[0]=Event.index;
- deselectRows(selected);
- }
- if(m_pTableModel->hasRowHeaders())
- m_pTableModel->getRowHeaderName().erase(m_pTableModel->getRowHeaderName().begin()+Event.index);
- std::vector<std::vector<Any> >::iterator rowPos =m_pTableModel->getCellContent().begin() + Event.index;
- m_pTableModel->getCellContent().erase( rowPos );
- }
- m_pTableModel->setRowCount(m_pTableModel->getCellContent().size());
- pTable->InvalidateDataWindow(Event.index, Event.index, true);
- if(pTable->isAccessibleAlive())
- {
- pTable->commitGridControlEvent(TABLE_MODEL_CHANGED,
- makeAny( AccessibleTableModelChange(DELETE, Event.index, Event.index+1, 0, m_pTableModel->getColumnCount())),
- Any());
- }
+ TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() );
+ ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::rowHeadingChanged: no control (anymore)!" );
+
+ // TODO: we could do better than this - invalidate the header area only
+ pTable->getTableControlInterface().invalidate( TableAreaRowHeaders );
}
-void SAL_CALL SVTXGridControl::columnChanged(const ::com::sun::star::awt::grid::GridColumnEvent& Event ) throw (::com::sun::star::uno::RuntimeException)
+//----------------------------------------------------------------------------------------------------------------------
+void SAL_CALL SVTXGridControl::elementInserted( const ContainerEvent& i_event ) throw (RuntimeException)
{
::vos::OGuard aGuard( GetMutex() );
- TableControl* pTable = (TableControl*)GetWindow();
- if(Event.valueName == rtl::OUString::createFromAscii("ColumnResize"))
- {
- bool resizable = m_pTableModel->getColumnModel()[Event.index]->isResizable();
- Event.newValue>>=resizable;
- m_pTableModel->getColumnModel()[Event.index]->setResizable(resizable);
- }
- else if(Event.valueName == rtl::OUString::createFromAscii("ColWidth"))
- {
- sal_Int32 colWidth = m_pTableModel->getColumnModel()[Event.index]->getWidth();
- Event.newValue>>=colWidth;
- m_pTableModel->getColumnModel()[Event.index]->setWidth(colWidth);
- }
- else if(Event.valueName == rtl::OUString::createFromAscii("MaxWidth"))
- {
- sal_Int32 maxWidth = m_pTableModel->getColumnModel()[Event.index]->getMaxWidth();
- Event.newValue>>=maxWidth;
- m_pTableModel->getColumnModel()[Event.index]->setMaxWidth(maxWidth);
- }
- else if(Event.valueName == rtl::OUString::createFromAscii("MinWidth"))
- {
- sal_Int32 minWidth = m_pTableModel->getColumnModel()[Event.index]->getMinWidth();
- Event.newValue>>=minWidth;
- m_pTableModel->getColumnModel()[Event.index]->setMinWidth(minWidth);
- }
- else if(Event.valueName == rtl::OUString::createFromAscii("PrefWidth"))
- {
- sal_Int32 prefWidth = m_pTableModel->getColumnModel()[Event.index]->getPreferredWidth();
- Event.newValue>>=prefWidth;
- m_pTableModel->getColumnModel()[Event.index]->setPreferredWidth(prefWidth);
- }
- else if(Event.valueName == rtl::OUString::createFromAscii("HAlign"))
- {
- ::com::sun::star::style::HorizontalAlignment hAlign = m_pTableModel->getColumnModel()[Event.index]->getHorizontalAlign();
- Event.newValue>>=hAlign;
- m_pTableModel->getColumnModel()[Event.index]->setHorizontalAlign(hAlign);
- }
- else if(Event.valueName == rtl::OUString::createFromAscii("UpdateWidth"))
- {
- if(m_pTableModel->getColumnModel()[Event.index]->getPreferredWidth() != 0)
- m_xColumnModel->getColumn(Event.index)->updateColumn(rtl::OUString::createFromAscii("PrefWidth"), m_pTableModel->getColumnModel()[Event.index]->getPreferredWidth());
- m_xColumnModel->getColumn(Event.index)->updateColumn(rtl::OUString::createFromAscii("ColWidth"), m_pTableModel->getColumnModel()[Event.index]->getWidth());
- }
- pTable->Invalidate();
+ Reference< XGridColumn > const xGridColumn( i_event.Element, UNO_QUERY_THROW );
+
+ sal_Int32 nIndex( m_pTableModel->getColumnCount() );
+ OSL_VERIFY( i_event.Accessor >>= nIndex );
+ m_pTableModel->insertColumn( nIndex, xGridColumn );
}
-void SAL_CALL SVTXGridControl::dataChanged(const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException)
+
+//----------------------------------------------------------------------------------------------------------------------
+void SAL_CALL SVTXGridControl::elementRemoved( const ContainerEvent& i_event ) throw (RuntimeException)
{
::vos::OGuard aGuard( GetMutex() );
- TableControl* pTable = (TableControl*)GetWindow();
- if(Event.valueName == rtl::OUString::createFromAscii("RowHeight"))
- {
- sal_Int32 rowHeight = m_pTableModel->getRowHeight();
- Event.newValue>>=rowHeight;
- m_pTableModel->setRowHeight(rowHeight);
- pTable->Invalidate();
- }
- else if(Event.valueName == rtl::OUString::createFromAscii("RowHeaderWidth"))
- {
- sal_Int32 rowHeaderWidth = m_pTableModel->getRowHeaderWidth();
- Event.newValue>>=rowHeaderWidth;
- m_pTableModel->setRowHeaderWidth(rowHeaderWidth);
- pTable->Invalidate();
- }
- else if(Event.valueName == rtl::OUString::createFromAscii("RowHeaders"))
- {
- Sequence< rtl::OUString > headers(0);
- Event.newValue>>=headers;
- std::vector< rtl::OUString > headerNames( comphelper::sequenceToContainer <std::vector< rtl::OUString > >(headers) );
- m_pTableModel->setRowHeaderName(headerNames);
- pTable->Invalidate();
- }
- else if(Event.valueName == rtl::OUString::createFromAscii("CellUpdated"))
- {
- std::vector< std::vector< Any > >& rowContent = m_pTableModel->getCellContent();
- sal_Int32 col = -1;
- Event.oldValue>>=col;
- rowContent[Event.index][col] = Event.newValue;
- pTable->InvalidateDataWindow(Event.index, Event.index, false);
- }
- else if(Event.valueName == rtl::OUString::createFromAscii("RowUpdated"))
- {
- std::vector<std::vector< Any > >& rowContent = m_pTableModel->getCellContent();
- Sequence< sal_Int32 > cols(0);
- Sequence< Any > values(0);
- Event.oldValue>>=cols;
- Event.newValue>>=values;
- for(int i = 0; i< cols.getLength(); i++)
- {
- if(cols[i]>=0 && cols[i]<m_pTableModel->getColumnCount())
- rowContent[Event.index][cols[i]]=values[i];
- else
- break;
- }
- pTable->InvalidateDataWindow(Event.index, Event.index, false);
- }
+ sal_Int32 nIndex( -1 );
+ OSL_VERIFY( i_event.Accessor >>= nIndex );
+ m_pTableModel->removeColumn( nIndex );
}
-void SAL_CALL SVTXGridControl::disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException)
+//----------------------------------------------------------------------------------------------------------------------
+void SAL_CALL SVTXGridControl::elementReplaced( const ContainerEvent& i_event ) throw (RuntimeException)
{
- VCLXWindow::disposing( Source );
+ OSL_ENSURE( false, "SVTXGridControl::elementReplaced: not implemented!" );
+ // at the moment, the XGridColumnModel API does not allow replacing columns
+ OSL_UNUSED( i_event );
+ // TODO: replace the respective column in our table model
}
-::sal_Int32 SAL_CALL SVTXGridControl::getMinSelectionIndex() throw (::com::sun::star::uno::RuntimeException)
-{
- TableControl* pTable = (TableControl*)GetWindow();
- std::vector<RowPos>& selectedRows = pTable->GetSelectedRows();
- if(selectedRows.empty())
- return -1;
- else
- {
- std::vector<RowPos>::iterator itStart = selectedRows.begin();
- std::vector<RowPos>::iterator itEnd = selectedRows.end();
- return *(std::min_element(itStart, itEnd));
- }
-}
-::sal_Int32 SAL_CALL SVTXGridControl::getMaxSelectionIndex() throw (::com::sun::star::uno::RuntimeException)
+//----------------------------------------------------------------------------------------------------------------------
+void SAL_CALL SVTXGridControl::disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException)
{
- TableControl* pTable = (TableControl*)GetWindow();
- std::vector<RowPos>& selectedRows = pTable->GetSelectedRows();
- if(selectedRows.empty())
- return -1;
- else
- {
- std::vector<RowPos>::iterator itStart = selectedRows.begin();
- std::vector<RowPos>::iterator itEnd = selectedRows.end();
- return *(std::max_element(itStart, itEnd));
- }
+ VCLXWindow::disposing( Source );
}
-void SAL_CALL SVTXGridControl::selectRows(const ::com::sun::star::uno::Sequence< ::sal_Int32 >& rangeOfRows) throw (::com::sun::star::uno::RuntimeException)
+//----------------------------------------------------------------------------------------------------------------------
+void SAL_CALL SVTXGridControl::selectRow( ::sal_Int32 i_rowIndex ) throw (::com::sun::star::uno::RuntimeException)
{
- TableControl* pTable = (TableControl*)GetWindow();
- SelectionMode eSelMode = pTable->getSelEngine()->GetSelectionMode();
- if(eSelMode != NO_SELECTION)
- {
- sal_Int32 start = rangeOfRows[0];
- int seqSize = rangeOfRows.getLength();
- sal_Int32 end = rangeOfRows[seqSize-1];
- if((start >= 0 && start < m_pTableModel->getRowCount()) && (end >= 0 && end < m_pTableModel->getRowCount()))
- {
- std::vector<RowPos>& selectedRows = pTable->GetSelectedRows();
- if(eSelMode == SINGLE_SELECTION)
- {
- if(!selectedRows.empty())
- selectedRows.clear();
- if(rangeOfRows.getLength() == 1)
- selectedRows.push_back(start);
- else
- return;
- }
- else
- {
- for(int i=0;i<seqSize;i++)
- {
- if(!isSelectedIndex(rangeOfRows[i]))
- selectedRows.push_back(rangeOfRows[i]);
- }
- }
- pTable->selectionChanged(true);
- pTable->InvalidateDataWindow(start, end, false);
- SetSynthesizingVCLEvent( sal_True );
- pTable->Select();
- SetSynthesizingVCLEvent( sal_False );
- }
- }
+ ::vos::OGuard aGuard( GetMutex() );
+
+ TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() );
+ ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::selectRow: no control (anymore)!" );
+
+ pTable->SelectRow( i_rowIndex, true );
}
+//----------------------------------------------------------------------------------------------------------------------
void SAL_CALL SVTXGridControl::selectAllRows() throw (::com::sun::star::uno::RuntimeException)
{
- TableControl* pTable = (TableControl*)GetWindow();
- SelectionMode eSelMode = pTable->getSelEngine()->GetSelectionMode();
- if(eSelMode != NO_SELECTION)
- {
- std::vector<RowPos>& selectedRows = pTable->GetSelectedRows();
- if(!selectedRows.empty())
- selectedRows.clear();
- for(int i=0;i<m_pTableModel->getRowCount();i++)
- selectedRows.push_back(i);
- pTable->Invalidate();
- SetSynthesizingVCLEvent( sal_True );
- pTable->Select();
- SetSynthesizingVCLEvent( sal_False );
- }
+ ::vos::OGuard aGuard( GetMutex() );
+
+ TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() );
+ ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::selectAllRows: no control (anymore)!" );
+
+ pTable->SelectAllRows( true );
}
-void SAL_CALL SVTXGridControl::deselectRows(const ::com::sun::star::uno::Sequence< ::sal_Int32 >& rangeOfRows) throw (::com::sun::star::uno::RuntimeException)
+//----------------------------------------------------------------------------------------------------------------------
+void SAL_CALL SVTXGridControl::deselectRow( ::sal_Int32 i_rowIndex ) throw (::com::sun::star::uno::RuntimeException)
{
- TableControl* pTable = (TableControl*)GetWindow();
- std::vector<RowPos>& selectedRows = pTable->GetSelectedRows();
- std::vector<RowPos>::iterator itStart = selectedRows.begin();
- std::vector<RowPos>::iterator itEnd = selectedRows.end();
- for(int i = 0; i < rangeOfRows.getLength(); i++ )
- {
- std::vector<RowPos>::iterator iter = std::find(itStart, itEnd, rangeOfRows[i]);
- selectedRows.erase(iter);
- }
- pTable->selectionChanged(true);
- pTable->Invalidate();
- SetSynthesizingVCLEvent( sal_True );
- pTable->Select();
- SetSynthesizingVCLEvent( sal_False );
+ ::vos::OGuard aGuard( GetMutex() );
+
+ TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() );
+ ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::deselectRow: no control (anymore)!" );
+
+ pTable->SelectRow( i_rowIndex, false );
}
+//----------------------------------------------------------------------------------------------------------------------
void SAL_CALL SVTXGridControl::deselectAllRows() throw (::com::sun::star::uno::RuntimeException)
{
- TableControl* pTable = (TableControl*)GetWindow();
- std::vector<RowPos>& selectedRows = pTable->GetSelectedRows();
- if(!selectedRows.empty())
- selectedRows.clear();
- pTable->Invalidate();
- SetSynthesizingVCLEvent( sal_True );
- pTable->Select();
- SetSynthesizingVCLEvent( sal_False );
+ ::vos::OGuard aGuard( GetMutex() );
+
+ TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() );
+ ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::deselectAllRows: no control (anymore)!" );
+
+ pTable->SelectAllRows( false );
}
+//----------------------------------------------------------------------------------------------------------------------
::com::sun::star::uno::Sequence< ::sal_Int32 > SAL_CALL SVTXGridControl::getSelection() throw (::com::sun::star::uno::RuntimeException)
{
- TableControl* pTable = (TableControl*)GetWindow();
- std::vector<RowPos>& selectedRows = pTable->GetSelectedRows();
- Sequence<sal_Int32> selectedRowsToSequence(comphelper::containerToSequence(selectedRows));
- return selectedRowsToSequence;
-}
+ ::vos::OGuard aGuard( GetMutex() );
-::sal_Bool SAL_CALL SVTXGridControl::isCellEditable() throw (::com::sun::star::uno::RuntimeException)
-{
- return sal_False;
+ TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() );
+ ENSURE_OR_RETURN( pTable, "SVTXGridControl::getSelection: no control (anymore)!", Sequence< sal_Int32 >() );
+
+ sal_Int32 selectionCount = pTable->GetSelectedRowCount();
+ Sequence< sal_Int32 > selectedRows( selectionCount );
+ for ( sal_Int32 i=0; i<selectionCount; ++i )
+ selectedRows[i] = pTable->GetSelectedRowIndex(i);
+ return selectedRows;
}
+//----------------------------------------------------------------------------------------------------------------------
::sal_Bool SAL_CALL SVTXGridControl::isSelectionEmpty() throw (::com::sun::star::uno::RuntimeException)
{
- TableControl* pTable = (TableControl*)GetWindow();
- std::vector<RowPos>& selectedRows = pTable->GetSelectedRows();
- if(selectedRows.empty())
- return sal_True;
- else
- return sal_False;
-}
+ ::vos::OGuard aGuard( GetMutex() );
-::sal_Bool SAL_CALL SVTXGridControl::isSelectedIndex(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException)
-{
- TableControl* pTable = (TableControl*)GetWindow();
- std::vector<RowPos>& selectedRows = pTable->GetSelectedRows();
- return std::find(selectedRows.begin(),selectedRows.end(), index) != selectedRows.end();
-}
+ TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() );
+ ENSURE_OR_RETURN( pTable, "SVTXGridControl::getSelection: no control (anymore)!", sal_True );
-void SAL_CALL SVTXGridControl::selectRow(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException)
-{
- if(index<0 || index>=m_pTableModel->getRowCount())
- return;
- TableControl* pTable = (TableControl*)GetWindow();
- SelectionMode eSelMode = pTable->getSelEngine()->GetSelectionMode();
- if(eSelMode != NO_SELECTION)
- {
- std::vector<RowPos>& selectedRows = pTable->GetSelectedRows();
- if(eSelMode == MULTIPLE_SELECTION)
- {
- if(!isSelectedIndex(index))
- selectedRows.push_back(index);
- else
- return;
- }
- else if(eSelMode == SINGLE_SELECTION)
- {
- if(!selectedRows.empty())
- {
- if(!isSelectedIndex(index))
- deselectRows(getSelection());
- else
- return;
- }
- selectedRows.push_back(index);
- }
- pTable->selectionChanged(true);
- pTable->InvalidateDataWindow(index, index, false);
- SetSynthesizingVCLEvent( sal_True );
- pTable->Select();
- SetSynthesizingVCLEvent( sal_False );
- }
+ return pTable->GetSelectedRowCount() > 0;
}
-void SAL_CALL SVTXGridControl::selectColumn(::sal_Int32 x) throw (::com::sun::star::uno::RuntimeException)
+//----------------------------------------------------------------------------------------------------------------------
+::sal_Bool SAL_CALL SVTXGridControl::isSelectedIndex( ::sal_Int32 index ) throw (::com::sun::star::uno::RuntimeException)
{
- (void)x;
+ ::vos::OGuard aGuard( GetMutex() );
+
+ TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() );
+ ENSURE_OR_RETURN( pTable, "SVTXGridControl::isSelectedIndex: no control (anymore)!", sal_False );
+
+ return pTable->IsRowSelected( index );
}
+
+//----------------------------------------------------------------------------------------------------------------------
void SVTXGridControl::dispose() throw(::com::sun::star::uno::RuntimeException)
{
- ::vos::OGuard aGuard( GetMutex() );
-
::com::sun::star::lang::EventObject aObj;
aObj.Source = (::cppu::OWeakObject*)this;
m_aSelectionListeners.disposeAndClear( aObj );
VCLXWindow::dispose();
}
+//----------------------------------------------------------------------------------------------------------------------
void SVTXGridControl::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
{
- ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xKeepAlive( this );
+ ::vos::OGuard aGuard( GetMutex() );
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xKeepAlive( this );
switch ( rVclWindowEvent.GetId() )
{
case VCLEVENT_TABLEROW_SELECT:
{
- TableControl* pTable = (TableControl*)GetWindow();
-
- if( pTable )
- {
- if ( m_aSelectionListeners.getLength() )
- {
- ImplCallItemListeners();
- }
- }
+ TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() );
+ ENSURE_OR_BREAK( pTable, "SVTXGridControl::ProcessWindowEvent: no control (anymore)!" );
+ if ( m_aSelectionListeners.getLength() )
+ ImplCallItemListeners();
}
break;
@@ -852,28 +703,30 @@ void SVTXGridControl::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent
}
}
+//----------------------------------------------------------------------------------------------------------------------
void SVTXGridControl::ImplCallItemListeners()
{
- TableControl* pTable = (TableControl*) GetWindow();
- if ( pTable && m_aSelectionListeners.getLength() )
+ TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() );
+ ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::ImplCallItemListeners: no control (anymore)!" );
+
+ if ( m_aSelectionListeners.getLength() )
{
- ::std::vector<sal_Int32> selRows = pTable->GetSelectedRows();
+ sal_Int32 const actSelRowCount = pTable->GetSelectedRowCount();
::com::sun::star::awt::grid::GridSelectionEvent aEvent;
aEvent.Source = (::cppu::OWeakObject*)this;
aEvent.Column = 0;
- sal_Int32 actSelRowCount = selRows.size();
sal_Int32 diff = actSelRowCount - m_nSelectedRowCount;
//row added to selection
if(diff >= 1)
{
aEvent.Action = com::sun::star::awt::grid::SelectionEventType(0);
- aEvent.Row = selRows[actSelRowCount-1];
+ aEvent.Row = pTable->GetSelectedRowIndex( actSelRowCount - 1 );
aEvent.Range = diff;
}
//selected row changed
else if(diff == 0 && actSelRowCount != 0)
{
- aEvent.Row = selRows[actSelRowCount-1];
+ aEvent.Row = pTable->GetSelectedRowIndex( actSelRowCount - 1 );
aEvent.Action = com::sun::star::awt::grid::SelectionEventType(2);
aEvent.Range = 0;
}
@@ -882,7 +735,7 @@ void SVTXGridControl::ImplCallItemListeners()
//selection changed: multiple row deselected, only 1 row is selected
if(actSelRowCount == 1)
{
- aEvent.Row = selRows[actSelRowCount-1];
+ aEvent.Row = pTable->GetSelectedRowIndex( actSelRowCount - 1 );
aEvent.Action = com::sun::star::awt::grid::SelectionEventType(2);
}
//row is deselected
@@ -897,3 +750,31 @@ void SVTXGridControl::ImplCallItemListeners()
m_aSelectionListeners.selectionChanged( aEvent );
}
}
+
+//----------------------------------------------------------------------------------------------------------------------
+void SVTXGridControl::impl_updateColumnsFromModel_nothrow()
+{
+ Reference< XGridColumnModel > const xColumnModel( m_pTableModel->getColumnModel() );
+ ENSURE_OR_RETURN_VOID( xColumnModel.is(), "no model!" );
+ TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() );
+ ENSURE_OR_RETURN_VOID( pTable != NULL, "no table!" );
+
+ try
+ {
+ const Sequence< Reference< XGridColumn > > columns = xColumnModel->getColumns();
+ for ( const Reference< XGridColumn >* colRef = columns.getConstArray();
+ colRef != columns.getConstArray() + columns.getLength();
+ ++colRef
+ )
+ {
+ ENSURE_OR_CONTINUE( colRef->is(), "illegal column!" );
+
+ m_pTableModel->appendColumn( *colRef );
+ }
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+}
+
diff --git a/svtools/source/uno/svtxgridcontrol.hxx b/svtools/source/uno/svtxgridcontrol.hxx
index b15507e4614f..525327b3c760 100755
--- a/svtools/source/uno/svtxgridcontrol.hxx
+++ b/svtools/source/uno/svtxgridcontrol.hxx
@@ -32,86 +32,88 @@
#include <svtools/table/tablecontrol.hxx>
#include <com/sun/star/awt/grid/XGridControl.hpp>
#include <com/sun/star/awt/grid/XGridDataListener.hpp>
-#include <com/sun/star/awt/grid/XGridColumnListener.hpp>
#include <com/sun/star/awt/grid/GridDataEvent.hpp>
#include <com/sun/star/awt/grid/GridColumnEvent.hpp>
#include <com/sun/star/awt/grid/XGridColumnModel.hpp>
#include <com/sun/star/awt/grid/XGridDataModel.hpp>
#include <com/sun/star/awt/grid/XGridSelectionListener.hpp>
+#include <com/sun/star/container/XContainerListener.hpp>
#include <toolkit/awt/vclxwindow.hxx>
#include <toolkit/awt/vclxwindows.hxx>
#include <cppuhelper/typeprovider.hxx>
-#include <cppuhelper/implbase3.hxx>
+#include <cppuhelper/implbase4.hxx>
#include <toolkit/helper/listenermultiplexer.hxx>
using namespace ::svt::table;
-class SVTXGridControl : public ::cppu::ImplInheritanceHelper3< VCLXWindow, ::com::sun::star::awt::grid::XGridControl,
- ::com::sun::star::awt::grid::XGridDataListener, ::com::sun::star::awt::grid::XGridColumnListener>
+typedef ::cppu::ImplInheritanceHelper3 < VCLXWindow
+ , ::com::sun::star::awt::grid::XGridControl
+ , ::com::sun::star::awt::grid::XGridDataListener
+ , ::com::sun::star::container::XContainerListener
+ > SVTXGridControl_Base;
+class SVTXGridControl : public SVTXGridControl_Base
{
private:
- ::boost::shared_ptr< UnoControlTableModel > m_pTableModel;
- ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataModel >m_xDataModel;
- ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnModel >m_xColumnModel;
- bool m_bHasColumnHeaders;
- bool m_bHasRowHeaders;
- bool m_bVScroll;
- bool m_bHScroll;
- bool m_bUpdate;
- sal_Int32 m_nSelectedRowCount;
- SelectionListenerMultiplexer m_aSelectionListeners;
+ ::boost::shared_ptr< UnoControlTableModel > m_pTableModel;
+ bool m_bHasColumnHeaders;
+ bool m_bHasRowHeaders;
+ bool m_bTableModelInitCompleted;
+ sal_Int32 m_nSelectedRowCount;
+ SelectionListenerMultiplexer m_aSelectionListeners;
protected:
virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent );
void ImplCallItemListeners();
public:
- SVTXGridControl();
+ SVTXGridControl();
~SVTXGridControl();
- //XGridDataListener overridables
- virtual void SAL_CALL rowAdded(const ::com::sun::star::awt::grid::GridDataEvent& Event) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL rowRemoved(const ::com::sun::star::awt::grid::GridDataEvent & Event) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL dataChanged(const ::com::sun::star::awt::grid::GridDataEvent & Event) throw (::com::sun::star::uno::RuntimeException);
- //XGridColumnListener overridables
- virtual void SAL_CALL columnChanged(const ::com::sun::star::awt::grid::GridColumnEvent & Event) throw (::com::sun::star::uno::RuntimeException);
+ // XGridDataListener
+ virtual void SAL_CALL rowsInserted( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL rowsRemoved( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL dataChanged( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL rowHeadingChanged( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
-
- ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
- void SAL_CALL acquire() throw() { VCLXWindow::acquire(); }
- void SAL_CALL release() throw() { VCLXWindow::release(); }
+ // XContainerListener
+ virtual void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
- // ::com::sun::star::lang::XTypeProvider
- ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
- ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
- //::com::sun::star::awt::grid::XGridControl
- virtual ::sal_Int32 SAL_CALL getMinSelectionIndex() throw (::com::sun::star::uno::RuntimeException);
- virtual ::sal_Int32 SAL_CALL getMaxSelectionIndex() throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL selectRows(const ::com::sun::star::uno::Sequence< ::sal_Int32 >& rangeOfRows) throw (::com::sun::star::uno::RuntimeException);
+ // XGridSelection
+ virtual void SAL_CALL selectRow( ::sal_Int32 i_rowIndex ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL selectAllRows() throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL deselectRows(const ::com::sun::star::uno::Sequence< ::sal_Int32 >& rangeOfRows) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL deselectRow( ::sal_Int32 i_rowIndex ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL deselectAllRows() throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::sal_Int32 > SAL_CALL getSelection() throw (::com::sun::star::uno::RuntimeException);
- virtual ::sal_Bool SAL_CALL isCellEditable() throw (::com::sun::star::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL isSelectionEmpty() throw (::com::sun::star::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL isSelectedIndex(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL selectRow(::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL selectColumn(::sal_Int32 x) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL addSelectionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridSelectionListener > & listener) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL removeSelectionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridSelectionListener > & listener) throw (::com::sun::star::uno::RuntimeException);
- virtual ::sal_Int32 SAL_CALL getItemIndexAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setToolTip(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& text, const ::com::sun::star::uno::Sequence< sal_Int32 >& columns) throw (::com::sun::star::uno::RuntimeException);
+
+ // XGridControl
+ virtual ::sal_Int32 SAL_CALL getRowAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getColumnAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getCurrentColumn( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getCurrentRow( ) throw (::com::sun::star::uno::RuntimeException);
void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException);
::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException);
static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds );
- void SAL_CALL setVisible(sal_Bool bVisible) throw(::com::sun::star::uno::RuntimeException);
- void SAL_CALL setFocus() throw(::com::sun::star::uno::RuntimeException);
// ::com::sun::star::lang::XComponent
void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
- };
- #endif // _SVT_GRIDCONTROL_HXX_
+
+protected:
+ // VCLXWindow
+ virtual void SetWindow( Window* pWindow );
+
+private:
+ void impl_updateColumnsFromModel_nothrow();
+ void impl_checkTableModelInit();
+};
+#endif // _SVT_GRIDCONTROL_HXX_
diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx
index 9e4c522dc8c4..254dbae12f68 100644
--- a/svtools/source/uno/toolboxcontroller.cxx
+++ b/svtools/source/uno/toolboxcontroller.cxx
@@ -846,7 +846,7 @@ void ToolboxController::enable( bool bEnable )
sal_uInt16 nItemId = 0;
if( getToolboxId( nItemId, &pToolBox ) )
{
- pToolBox->EnableItem( nItemId, bEnable ? TRUE : FALSE );
+ pToolBox->EnableItem( nItemId, bEnable ? sal_True : sal_False );
}
}
diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx
index f37d5f80ed68..c36368023a22 100644
--- a/svtools/source/uno/treecontrolpeer.cxx
+++ b/svtools/source/uno/treecontrolpeer.cxx
@@ -81,7 +81,7 @@ public:
class ImplGraphicItem : public SvLBoxBmp
{
public:
- ImplGraphicItem( SvLBoxEntry* pEntry, USHORT nFlags, Image& aImage ) : SvLBoxBmp( pEntry, nFlags, aImage ) {}
+ ImplGraphicItem( SvLBoxEntry* pEntry, sal_uInt16 nFlags, Image& aImage ) : SvLBoxBmp( pEntry, nFlags, aImage ) {}
OUString msGraphicURL;
};
@@ -91,7 +91,7 @@ public:
class ImplContextGraphicItem : public SvLBoxContextBmp
{
public:
- ImplContextGraphicItem( SvLBoxEntry* pEntry,USHORT nFlags,Image& rI1,Image& rI2, USHORT nEntryFlagsBmp1)
+ ImplContextGraphicItem( SvLBoxEntry* pEntry,sal_uInt16 nFlags,Image& rI1,Image& rI2, sal_uInt16 nEntryFlagsBmp1)
: SvLBoxContextBmp( pEntry, nFlags, rI1, rI2, nEntryFlagsBmp1 ) {}
OUString msExpandedGraphicURL;
@@ -106,12 +106,12 @@ public:
UnoTreeListBoxImpl( TreeControlPeer* pPeer, Window* pParent, WinBits nWinStyle );
~UnoTreeListBoxImpl();
- sal_uInt32 insert( SvLBoxEntry* pEntry,SvLBoxEntry* pParent,ULONG nPos=LIST_APPEND );
+ sal_uInt32 insert( SvLBoxEntry* pEntry,SvLBoxEntry* pParent,sal_uLong nPos=LIST_APPEND );
virtual void RequestingChilds( SvLBoxEntry* pParent );
- virtual BOOL EditingEntry( SvLBoxEntry* pEntry, Selection& );
- virtual BOOL EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText );
+ virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& );
+ virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText );
DECL_LINK( OnSelectionChangeHdl, UnoTreeListBoxImpl* );
DECL_LINK( OnExpandingHdl, UnoTreeListBoxImpl* );
@@ -129,7 +129,7 @@ public:
UnoTreeListItem( SvLBoxEntry* );
UnoTreeListItem();
virtual ~UnoTreeListItem();
- virtual USHORT IsA();
+ virtual sal_uInt16 IsA();
void InitViewData( SvLBox*,SvLBoxEntry*,SvViewDataItem* );
OUString GetText() const;
void SetText( const OUString& rText );
@@ -137,7 +137,7 @@ public:
void SetImage( const Image& rImage );
OUString GetGraphicURL() const;
void SetGraphicURL( const OUString& rGraphicURL );
- void Paint( const Point&, SvLBox& rDev, USHORT nFlags,SvLBoxEntry* );
+ void Paint( const Point&, SvLBox& rDev, sal_uInt16 nFlags,SvLBoxEntry* );
SvLBoxItem* Create() const;
void Clone( SvLBoxItem* pSource );
@@ -259,7 +259,7 @@ void TreeControlPeer::SetWindow( Window* pWindow )
// --------------------------------------------------------------------
-UnoTreeListEntry* TreeControlPeer::createEntry( const Reference< XTreeNode >& xNode, UnoTreeListEntry* pParent, ULONG nPos /* = LIST_APPEND */ )
+UnoTreeListEntry* TreeControlPeer::createEntry( const Reference< XTreeNode >& xNode, UnoTreeListEntry* pParent, sal_uLong nPos /* = LIST_APPEND */ )
{
UnoTreeListEntry* pEntry = 0;
if( mpTreeImpl )
@@ -326,9 +326,9 @@ bool TreeControlPeer::updateEntry( UnoTreeListEntry* pEntry )
}
}
- if( (pEntry->mxNode->hasChildrenOnDemand() == sal_True) != (pEntry->HasChildsOnDemand() == TRUE) )
+ if( (pEntry->mxNode->hasChildrenOnDemand() == sal_True) != (pEntry->HasChildsOnDemand() == sal_True) )
{
- pEntry->EnableChildsOnDemand( pEntry->mxNode->hasChildrenOnDemand() ? TRUE : FALSE );
+ pEntry->EnableChildsOnDemand( pEntry->mxNode->hasChildrenOnDemand() ? sal_True : sal_False );
bChanged = true;
}
@@ -530,14 +530,14 @@ void TreeControlPeer::ChangeNodesSelection( const Any& rSelection, bool bSelect,
}
if( bSetSelection )
- rTree.SelectAll( FALSE );
+ rTree.SelectAll( sal_False );
if( pNodes && nCount )
{
while( nCount-- )
{
UnoTreeListEntry* pEntry = getEntry( *pNodes++ );
- rTree.Select( pEntry, bSelect ? TRUE : FALSE );
+ rTree.Select( pEntry, bSelect ? sal_True : sal_False );
}
}
}
@@ -563,7 +563,7 @@ Any SAL_CALL TreeControlPeer::getSelection() throw (RuntimeException)
Any aRet;
- ULONG nSelectionCount = rTree.GetSelectionCount();
+ sal_uLong nSelectionCount = rTree.GetSelectionCount();
if( nSelectionCount == 1 )
{
UnoTreeListEntry* pEntry = dynamic_cast< UnoTreeListEntry* >( rTree.FirstSelected() );
@@ -625,7 +625,7 @@ void SAL_CALL TreeControlPeer::removeSelection( const Any& rSelection ) throw (I
void SAL_CALL TreeControlPeer::clearSelection() throw (RuntimeException)
{
::vos::OGuard aGuard( GetMutex() );
- getTreeListBoxOrThrow().SelectAll( FALSE );
+ getTreeListBoxOrThrow().SelectAll( sal_False );
}
// -------------------------------------------------------------------
@@ -891,7 +891,7 @@ Reference< XTreeNode > SAL_CALL TreeControlPeer::getNodeForLocation( sal_Int32 x
Reference< XTreeNode > xNode;
const Point aPos( x, y );
- UnoTreeListEntry* pEntry = dynamic_cast< UnoTreeListEntry* >( rTree.GetEntry( aPos, TRUE ) );
+ UnoTreeListEntry* pEntry = dynamic_cast< UnoTreeListEntry* >( rTree.GetEntry( aPos, sal_True ) );
if( pEntry )
xNode = pEntry->mxNode;
@@ -909,7 +909,7 @@ Reference< XTreeNode > SAL_CALL TreeControlPeer::getClosestNodeForLocation( sal_
Reference< XTreeNode > xNode;
const Point aPos( x, y );
- UnoTreeListEntry* pEntry = dynamic_cast< UnoTreeListEntry* >( rTree.GetEntry( aPos, TRUE ) );
+ UnoTreeListEntry* pEntry = dynamic_cast< UnoTreeListEntry* >( rTree.GetEntry( aPos, sal_True ) );
if( pEntry )
xNode = pEntry->mxNode;
@@ -948,7 +948,7 @@ sal_Bool SAL_CALL TreeControlPeer::stopEditing() throw (RuntimeException)
UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow();
if( rTree.IsEditingActive() )
{
- rTree.EndEditing(FALSE);
+ rTree.EndEditing(sal_False);
return sal_True;
}
else
@@ -964,7 +964,7 @@ void SAL_CALL TreeControlPeer::cancelEditing( ) throw (RuntimeException)
::vos::OGuard aGuard( GetMutex() );
UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow();
- rTree.EndEditing(FALSE);
+ rTree.EndEditing(sal_False);
}
// -------------------------------------------------------------------
@@ -1104,7 +1104,7 @@ void TreeControlPeer::updateNode( UnoTreeListBoxImpl& rTree, const Reference< XT
{
Reference< XTreeNode > xParentNode( xNode->getParent() );
UnoTreeListEntry* pParentEntry = 0;
- ULONG nChild = LIST_APPEND;
+ sal_uLong nChild = LIST_APPEND;
if( xParentNode.is() )
{
@@ -1360,7 +1360,7 @@ void TreeControlPeer::setProperty( const ::rtl::OUString& PropertyName, const An
case BASEPROPERTY_TREE_DATAMODEL:
onChangeDataModel( rTree, Reference< XTreeDataModel >( aValue, UNO_QUERY ) );
break;
- case BASEPROPERTY_TREE_ROWHEIGHT:
+ case BASEPROPERTY_ROW_HEIGHT:
{
sal_Int32 nHeight = 0;
if( aValue >>= nHeight )
@@ -1371,7 +1371,7 @@ void TreeControlPeer::setProperty( const ::rtl::OUString& PropertyName, const An
{
sal_Bool bEnabled = false;
if( aValue >>= bEnabled )
- rTree.EnableInplaceEditing( bEnabled ? TRUE : FALSE );
+ rTree.EnableInplaceEditing( bEnabled ? sal_True : sal_False );
break;
}
case BASEPROPERTY_TREE_INVOKESSTOPNODEEDITING:
@@ -1445,7 +1445,7 @@ Any TreeControlPeer::getProperty( const ::rtl::OUString& PropertyName ) throw(Ru
}
return Any( eSelectionType );
}
- case BASEPROPERTY_TREE_ROWHEIGHT:
+ case BASEPROPERTY_ROW_HEIGHT:
return Any( (sal_Int32)rTree.GetEntryHeight() );
case BASEPROPERTY_TREE_DATAMODEL:
return Any( mxDataModel );
@@ -1581,7 +1581,7 @@ IMPL_LINK(UnoTreeListBoxImpl, OnExpandedHdl, UnoTreeListBoxImpl*, EMPTYARG )
// --------------------------------------------------------------------
-sal_uInt32 UnoTreeListBoxImpl::insert( SvLBoxEntry* pEntry,SvLBoxEntry* pParent,ULONG nPos )
+sal_uInt32 UnoTreeListBoxImpl::insert( SvLBoxEntry* pEntry,SvLBoxEntry* pParent,sal_uLong nPos )
{
if( pParent )
return SvTreeListBox::Insert( pEntry, pParent, nPos );
@@ -1600,14 +1600,14 @@ void UnoTreeListBoxImpl::RequestingChilds( SvLBoxEntry* pParent )
// --------------------------------------------------------------------
-BOOL UnoTreeListBoxImpl::EditingEntry( SvLBoxEntry* pEntry, Selection& )
+sal_Bool UnoTreeListBoxImpl::EditingEntry( SvLBoxEntry* pEntry, Selection& )
{
return mxPeer.is() ? mxPeer->onEditingEntry( dynamic_cast< UnoTreeListEntry* >( pEntry ) ) : false;
}
// --------------------------------------------------------------------
-BOOL UnoTreeListBoxImpl::EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText )
+sal_Bool UnoTreeListBoxImpl::EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText )
{
return mxPeer.is() ? mxPeer->onEditedEntry( dynamic_cast< UnoTreeListEntry* >( pEntry ), rNewText ) : false;
}
@@ -1636,14 +1636,14 @@ UnoTreeListItem::~UnoTreeListItem()
// --------------------------------------------------------------------
-USHORT UnoTreeListItem::IsA()
+sal_uInt16 UnoTreeListItem::IsA()
{
return 0;
}
// --------------------------------------------------------------------
-void UnoTreeListItem::Paint( const Point& rPos, SvLBox& rDev, USHORT /* nFlags */, SvLBoxEntry* _pEntry)
+void UnoTreeListItem::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 /* nFlags */, SvLBoxEntry* _pEntry)
{
Point aPos( rPos );
if( _pEntry )
diff --git a/svtools/source/uno/treecontrolpeer.hxx b/svtools/source/uno/treecontrolpeer.hxx
index 336830804a6f..66ab96c60ff1 100644
--- a/svtools/source/uno/treecontrolpeer.hxx
+++ b/svtools/source/uno/treecontrolpeer.hxx
@@ -129,7 +129,7 @@ private:
void fillTree( UnoTreeListBoxImpl& rTree, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeDataModel >& xDataModel );
void addNode( UnoTreeListBoxImpl& rTree, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode >& xNode, UnoTreeListEntry* pParentEntry );
- UnoTreeListEntry* createEntry( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode >& xNode, UnoTreeListEntry* pParent, ULONG nPos = LIST_APPEND );
+ UnoTreeListEntry* createEntry( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode >& xNode, UnoTreeListEntry* pParent, sal_uLong nPos = LIST_APPEND );
bool updateEntry( UnoTreeListEntry* pEntry );
void updateTree( const ::com::sun::star::awt::tree::TreeDataModelEvent& rEvent, bool bRecursive );
diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx
index d239ee3c740d..933363115810 100644
--- a/svtools/source/uno/unocontroltablemodel.cxx
+++ b/svtools/source/uno/unocontroltablemodel.cxx
@@ -28,486 +28,866 @@
#include "precompiled_svtools.hxx"
#include "unocontroltablemodel.hxx"
-#include <com/sun/star/view/SelectionType.hpp>
-#include "svtools/table/gridtablerenderer.hxx"
+#include "unogridcolumnfacade.hxx"
+
#include "svtools/table/defaultinputhandler.hxx"
+#include "svtools/table/gridtablerenderer.hxx"
#include "svtools/table/tablecontrol.hxx"
-#include <comphelper/sequence.hxx>
-#include <rtl/ref.hxx>
-#include <tools/debug.hxx>
-#include <toolkit/helper/property.hxx>
-#include <comphelper/processfactory.hxx>
+
+/** === begin UNO includes === **/
#include <com/sun/star/awt/grid/XGridColumn.hpp>
+#include <com/sun/star/view/SelectionType.hpp>
+#include <com/sun/star/awt/grid/XGridColumnListener.hpp>
+#include <com/sun/star/awt/grid/XSortableGridData.hpp>
+/** === end UNO includes === **/
-using ::rtl::OUString;
-using namespace ::svt::table;
-using namespace ::com::sun::star::uno;
+#include <comphelper/stlunosequence.hxx>
+#include <cppuhelper/weakref.hxx>
+#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
+#include <vcl/svapp.hxx>
+#include <vos/mutex.hxx>
+
+// .....................................................................................................................
+namespace svt { namespace table
+{
+// .....................................................................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::awt::grid::XGridColumn;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::awt::grid::XGridColumnListener;
+ using ::com::sun::star::lang::EventObject;
+ using ::com::sun::star::awt::grid::GridColumnEvent;
+ using ::com::sun::star::awt::grid::XGridDataModel;
+ using ::com::sun::star::awt::grid::XGridColumnModel;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::style::HorizontalAlignment_LEFT;
+ using ::com::sun::star::style::HorizontalAlignment;
+ using ::com::sun::star::style::VerticalAlignment_TOP;
+ using ::com::sun::star::style::VerticalAlignment;
+ using ::com::sun::star::uno::WeakReference;
+ using ::com::sun::star::awt::grid::GridDataEvent;
+ using ::com::sun::star::awt::grid::XSortableGridData;
+ using ::com::sun::star::beans::Pair;
+ /** === end UNO using === **/
+
+ //==================================================================================================================
+ //= UnoControlTableModel_Impl
+ //==================================================================================================================
+ typedef ::std::vector< PTableModelListener > ModellListeners;
+ typedef ::std::vector< PColumnModel > ColumnModels;
+ struct UnoControlTableModel_Impl
+ {
+ ColumnModels aColumns;
+ bool bHasColumnHeaders;
+ bool bHasRowHeaders;
+ ScrollbarVisibility eVScrollMode;
+ ScrollbarVisibility eHScrollMode;
+ PTableRenderer pRenderer;
+ PTableInputHandler pInputHandler;
+ TableMetrics nRowHeight;
+ TableMetrics nColumnHeaderHeight;
+ TableMetrics nRowHeaderWidth;
+ ::boost::optional< ::Color > m_aGridLineColor;
+ ::boost::optional< ::Color > m_aHeaderBackgroundColor;
+ ::boost::optional< ::Color > m_aHeaderTextColor;
+ ::boost::optional< ::Color > m_aTextColor;
+ ::boost::optional< ::Color > m_aTextLineColor;
+ ::boost::optional< ::std::vector< ::Color > > m_aRowColors;
+ VerticalAlignment m_eVerticalAlign;
+ ModellListeners m_aListeners;
+ WeakReference< XGridDataModel > m_aDataModel;
+ WeakReference< XGridColumnModel > m_aColumnModel;
+ UnoControlTableModel_Impl()
+ :aColumns ( )
+ ,bHasColumnHeaders ( true )
+ ,bHasRowHeaders ( false )
+ ,eVScrollMode ( ScrollbarShowNever )
+ ,eHScrollMode ( ScrollbarShowNever )
+ ,pRenderer ( )
+ ,pInputHandler ( )
+ ,nRowHeight ( 10 )
+ ,nColumnHeaderHeight ( 10 )
+ ,nRowHeaderWidth ( 10 )
+ ,m_aGridLineColor ( )
+ ,m_aHeaderBackgroundColor ( )
+ ,m_aHeaderTextColor ( )
+ ,m_aTextColor ( )
+ ,m_aTextLineColor ( )
+ ,m_aRowColors ( )
+ ,m_eVerticalAlign ( VerticalAlignment_TOP )
+ {
+ }
+ };
- //--------------------------------------------------------------------
- UnoControlTableColumn::UnoControlTableColumn(Reference<XGridColumn> m_xGridColumn)
- :m_nID( 0 )
- ,m_sName()
- ,m_bIsResizable( true )
- ,m_nWidth( 4 )
- ,m_nMinWidth( 0 )
- ,m_nMaxWidth( 0 )
- ,m_nPrefWidth ( 0 )
- ,m_xHorizontalAlign(com::sun::star::style::HorizontalAlignment(0))
- {
- m_sName = m_xGridColumn->getTitle();
- }
- //--------------------------------------------------------------------
- UnoControlTableColumn::UnoControlTableColumn()
- :m_nID( 0 )
- ,m_sName()
- ,m_bIsResizable( true )
- ,m_nWidth( 4 )
- ,m_nMinWidth( 0 )
- ,m_nMaxWidth( 0 )
- ,m_nPrefWidth ( 0 )
- ,m_xHorizontalAlign(com::sun::star::style::HorizontalAlignment(0))
+ //==================================================================================================================
+ //= UnoControlTableModel
+ //==================================================================================================================
+#ifdef DBG_UTIL
+ const char* UnoControlTableModel_checkInvariants( const void* _pInstance )
{
+ return static_cast< const UnoControlTableModel* >( _pInstance )->checkInvariants();
}
- //--------------------------------------------------------------------
- ColumnID UnoControlTableColumn::getID() const
+ //------------------------------------------------------------------------------------------------------------------
+ const char* UnoControlTableModel::checkInvariants() const
{
- return m_nID;
- }
+ Reference< XGridDataModel > const xDataModel( m_pImpl->m_aDataModel );
+ if ( !xDataModel.is() )
+ return "data model anymore";
- //--------------------------------------------------------------------
- bool UnoControlTableColumn::setID( const ColumnID _nID )
- {
- m_nID = _nID;
- return true;
- }
+ // TODO: more?
- //--------------------------------------------------------------------
- String UnoControlTableColumn::getName() const
- {
- return m_sName;
+ return NULL;
}
+#endif
- //--------------------------------------------------------------------
- void UnoControlTableColumn::setName( const String& _rName )
+#define DBG_CHECK_ME() \
+ DBG_TESTSOLARMUTEX(); \
+ DBG_CHKTHIS( UnoControlTableModel, UnoControlTableModel_checkInvariants )
+
+ //------------------------------------------------------------------------------------------------------------------
+ DBG_NAME( UnoControlTableModel )
+ UnoControlTableModel::UnoControlTableModel()
+ :m_pImpl( new UnoControlTableModel_Impl )
{
- m_sName = _rName;
+ DBG_CTOR( UnoControlTableModel, UnoControlTableModel_checkInvariants );
+ m_pImpl->bHasColumnHeaders = true;
+ m_pImpl->bHasRowHeaders = false;
+ m_pImpl->pRenderer.reset( new GridTableRenderer( *this ) );
+ m_pImpl->pInputHandler.reset( new DefaultInputHandler );
}
- //--------------------------------------------------------------------
- bool UnoControlTableColumn::isResizable() const
+
+ //------------------------------------------------------------------------------------------------------------------
+ UnoControlTableModel::~UnoControlTableModel()
{
- return m_bIsResizable;
+ DBG_DTOR( UnoControlTableModel, UnoControlTableModel_checkInvariants );
+ DELETEZ( m_pImpl );
}
- //--------------------------------------------------------------------
- void UnoControlTableColumn::setResizable( bool _bResizable )
+ //------------------------------------------------------------------------------------------------------------------
+ TableSize UnoControlTableModel::getColumnCount() const
{
- m_bIsResizable = _bResizable;
+ DBG_CHECK_ME();
+ return (TableSize)m_pImpl->aColumns.size();
}
- //--------------------------------------------------------------------
- TableMetrics UnoControlTableColumn::getWidth() const
+ //------------------------------------------------------------------------------------------------------------------
+ TableSize UnoControlTableModel::getRowCount() const
{
- return m_nWidth;
+ DBG_CHECK_ME();
+
+ TableSize nRowCount = 0;
+ try
+ {
+ Reference< XGridDataModel > const xDataModel( m_pImpl->m_aDataModel );
+ ENSURE_OR_THROW( xDataModel.is(), "no data model anymore!" );
+ nRowCount = xDataModel->getRowCount();
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return nRowCount;
}
- //--------------------------------------------------------------------
- void UnoControlTableColumn::setWidth( TableMetrics _nWidth )
+ //------------------------------------------------------------------------------------------------------------------
+ bool UnoControlTableModel::hasColumnHeaders() const
{
- m_nWidth = _nWidth;
+ DBG_CHECK_ME();
+ return m_pImpl->bHasColumnHeaders;
}
- //--------------------------------------------------------------------
- TableMetrics UnoControlTableColumn::getMinWidth() const
+ //------------------------------------------------------------------------------------------------------------------
+ bool UnoControlTableModel::hasRowHeaders() const
{
- return m_nMinWidth;
+ DBG_CHECK_ME();
+ return m_pImpl->bHasRowHeaders;
}
- //--------------------------------------------------------------------
- void UnoControlTableColumn::setMinWidth( TableMetrics _nMinWidth )
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoControlTableModel::setRowHeaders(bool _bRowHeaders)
{
- m_nMinWidth = _nMinWidth;
+ DBG_CHECK_ME();
+ if ( m_pImpl->bHasRowHeaders == _bRowHeaders )
+ return;
+
+ m_pImpl->bHasRowHeaders = _bRowHeaders;
+ impl_notifyTableMetricsChanged();
}
- //--------------------------------------------------------------------
- TableMetrics UnoControlTableColumn::getMaxWidth() const
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoControlTableModel::setColumnHeaders(bool _bColumnHeaders)
{
- return m_nMaxWidth;
+ DBG_CHECK_ME();
+ if ( m_pImpl->bHasColumnHeaders == _bColumnHeaders )
+ return;
+
+ m_pImpl->bHasColumnHeaders = _bColumnHeaders;
+ impl_notifyTableMetricsChanged();
}
- //--------------------------------------------------------------------
- void UnoControlTableColumn::setMaxWidth( TableMetrics _nMaxWidth )
+ //------------------------------------------------------------------------------------------------------------------
+ bool UnoControlTableModel::isCellEditable( ColPos col, RowPos row ) const
{
- m_nMaxWidth = _nMaxWidth;
+ DBG_CHECK_ME();
+ (void)col;
+ (void)row;
+ return false;
}
- //--------------------------------------------------------------------
- TableMetrics UnoControlTableColumn::getPreferredWidth() const
+
+ //------------------------------------------------------------------------------------------------------------------
+ PColumnModel UnoControlTableModel::getColumnModel( ColPos column )
{
- return m_nPrefWidth;
+ DBG_CHECK_ME();
+ ENSURE_OR_RETURN( ( column >= 0 ) && ( column < getColumnCount() ),
+ "DefaultTableModel::getColumnModel: invalid index!", PColumnModel() );
+ return m_pImpl->aColumns[ column ];
}
- //--------------------------------------------------------------------
- void UnoControlTableColumn::setPreferredWidth( TableMetrics _nPrefWidth )
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoControlTableModel::appendColumn( Reference< XGridColumn > const & i_column )
{
- m_nPrefWidth = _nPrefWidth;
+ DBG_CHECK_ME();
+ insertColumn( m_pImpl->aColumns.size(), i_column );
}
- //--------------------------------------------------------------------
- ::com::sun::star::style::HorizontalAlignment UnoControlTableColumn::getHorizontalAlign()
+
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoControlTableModel::insertColumn( ColPos const i_position, Reference< XGridColumn > const & i_column )
{
- return m_xHorizontalAlign;
+ DBG_CHECK_ME();
+ ENSURE_OR_RETURN_VOID( ( i_position >= 0 ) && ( size_t( i_position ) <= m_pImpl->aColumns.size() ),
+ "UnoControlTableModel::insertColumn: illegal position!" );
+
+ const PColumnModel pColumn( new UnoGridColumnFacade( *this, i_column ) );
+ m_pImpl->aColumns.insert( m_pImpl->aColumns.begin() + i_position, pColumn );
+
+ // notify listeners
+ ModellListeners aListeners( m_pImpl->m_aListeners );
+ for ( ModellListeners::const_iterator loop = aListeners.begin();
+ loop != aListeners.end();
+ ++loop
+ )
+ {
+ (*loop)->columnInserted( i_position );
+ }
}
- //--------------------------------------------------------------------
- void UnoControlTableColumn::setHorizontalAlign( com::sun::star::style::HorizontalAlignment _align )
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoControlTableModel::removeColumn( ColPos const i_position )
{
- m_xHorizontalAlign = _align;
+ DBG_CHECK_ME();
+ ENSURE_OR_RETURN_VOID( ( i_position >= 0 ) && ( size_t( i_position ) <= m_pImpl->aColumns.size() ),
+ "UnoControlTableModel::removeColumn: illegal position!" );
+
+ // remove the column
+ ColumnModels::iterator pos = m_pImpl->aColumns.begin() + i_position;
+ const PColumnModel pColumn = *pos;
+ m_pImpl->aColumns.erase( pos );
+
+ // notify listeners
+ ModellListeners aListeners( m_pImpl->m_aListeners );
+ for ( ModellListeners::const_iterator loop = aListeners.begin();
+ loop != aListeners.end();
+ ++loop
+ )
+ {
+ (*loop)->columnRemoved( i_position );
+ }
+
+ // dispose the column
+ UnoGridColumnFacade* pColumnImpl = dynamic_cast< UnoGridColumnFacade* >( pColumn.get() );
+ OSL_ENSURE( pColumnImpl != NULL, "UnoControlTableModel::removeColumn: illegal column implementation!" );
+ if ( pColumnImpl )
+ pColumnImpl->dispose();
}
- //====================================================================
- //= DefaultTableModel_Impl
- //====================================================================
- struct UnoControlTableModel_Impl
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoControlTableModel::removeAllColumns()
{
- ::std::vector< PColumnModel > aColumns;
- TableSize nRowCount;
- bool bHasColumnHeaders;
- bool bHasRowHeaders;
- bool bVScroll;
- bool bHScroll;
- PTableRenderer pRenderer;
- PTableInputHandler pInputHandler;
- TableMetrics nRowHeight;
- TableMetrics nColumnHeaderHeight;
- TableMetrics nRowHeaderWidth;
- std::vector<rtl::OUString> aRowHeadersTitle;
- std::vector<std::vector< Any > > aCellContent;
- ::com::sun::star::util::Color m_xLineColor;
- ::com::sun::star::util::Color m_xHeaderColor;
- ::com::sun::star::util::Color m_xTextColor;
- ::com::sun::star::util::Color m_xRowColor1;
- ::com::sun::star::util::Color m_xRowColor2;
- ::com::sun::star::style::VerticalAlignment m_xVerticalAlign;
+ DBG_CHECK_ME();
+ if ( m_pImpl->aColumns.empty() )
+ return;
- UnoControlTableModel_Impl()
- :aColumns ( )
- ,nRowCount ( 0 )
- ,bHasColumnHeaders ( false )
- ,bHasRowHeaders ( false )
- ,bVScroll ( false )
- ,bHScroll ( false )
- ,pRenderer ( )
- ,pInputHandler ( )
- ,nRowHeight ( 0 )
- ,nColumnHeaderHeight( 0 )
- ,nRowHeaderWidth ( 10 )
- ,aRowHeadersTitle ( )
- ,aCellContent ( )
- ,m_xLineColor ( 0xFFFFFF )
- ,m_xHeaderColor ( 0xFFFFFF )
- ,m_xTextColor ( 0 )//black as default
- ,m_xRowColor1 ( 0xFFFFFF )
- ,m_xRowColor2 ( 0xFFFFFF )
- ,m_xVerticalAlign (com::sun::star::style::VerticalAlignment(0))
+ // dispose the column instances
+ for ( ColumnModels::const_iterator col = m_pImpl->aColumns.begin();
+ col != m_pImpl->aColumns.end();
+ ++col
+ )
{
+ UnoGridColumnFacade* pColumn = dynamic_cast< UnoGridColumnFacade* >( col->get() );
+ ENSURE_OR_CONTINUE( pColumn != NULL, "UnoControlTableModel::removeAllColumns: illegal column implementation!" );
+ pColumn->dispose();
}
- };
+ m_pImpl->aColumns.clear();
+
+ // notify listeners
+ ModellListeners aListeners( m_pImpl->m_aListeners );
+ for ( ModellListeners::const_iterator loop = aListeners.begin();
+ loop != aListeners.end();
+ ++loop
+ )
+ {
+ (*loop)->allColumnsRemoved();
+ }
+ }
- //====================================================================
- //= UnoControlTableModel
- //====================================================================
- //--------------------------------------------------------------------
- UnoControlTableModel::UnoControlTableModel()
- :m_pImpl( new UnoControlTableModel_Impl )
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoControlTableModel::impl_notifyTableMetricsChanged() const
{
- m_pImpl->bHasColumnHeaders = false;
- m_pImpl->bHasRowHeaders = false;
- m_pImpl->pRenderer.reset( new GridTableRenderer( *this ) );
- m_pImpl->pInputHandler.reset( new DefaultInputHandler );
+ ModellListeners aListeners( m_pImpl->m_aListeners );
+ for ( ModellListeners::const_iterator loop = aListeners.begin();
+ loop != aListeners.end();
+ ++loop
+ )
+ {
+ (*loop)->tableMetricsChanged();
+ }
}
- //--------------------------------------------------------------------
- UnoControlTableModel::~UnoControlTableModel()
+ //------------------------------------------------------------------------------------------------------------------
+ PTableRenderer UnoControlTableModel::getRenderer() const
{
- DELETEZ( m_pImpl );
+ DBG_CHECK_ME();
+ return m_pImpl->pRenderer;
}
- //--------------------------------------------------------------------
- TableSize UnoControlTableModel::getColumnCount() const
+ //------------------------------------------------------------------------------------------------------------------
+ PTableInputHandler UnoControlTableModel::getInputHandler() const
{
- return (TableSize)m_pImpl->aColumns.size();
+ DBG_CHECK_ME();
+ return m_pImpl->pInputHandler;
}
- //--------------------------------------------------------------------
- TableSize UnoControlTableModel::getRowCount() const
+ //------------------------------------------------------------------------------------------------------------------
+ TableMetrics UnoControlTableModel::getRowHeight() const
{
- return m_pImpl->nRowCount;
+ DBG_CHECK_ME();
+ return m_pImpl->nRowHeight;
}
- //--------------------------------------------------------------------
- bool UnoControlTableModel::hasColumnHeaders() const
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoControlTableModel::setRowHeight(TableMetrics _nRowHeight)
{
- return m_pImpl->bHasColumnHeaders;
+ DBG_CHECK_ME();
+ if ( m_pImpl->nRowHeight == _nRowHeight )
+ return;
+
+ m_pImpl->nRowHeight = _nRowHeight;
+ impl_notifyTableMetricsChanged();
}
- //--------------------------------------------------------------------
- bool UnoControlTableModel::hasRowHeaders() const
+ //------------------------------------------------------------------------------------------------------------------
+ TableMetrics UnoControlTableModel::getColumnHeaderHeight() const
{
- return m_pImpl->bHasRowHeaders;
+ DBG_CHECK_ME();
+ DBG_ASSERT( hasColumnHeaders(), "DefaultTableModel::getColumnHeaderHeight: invalid call!" );
+ return m_pImpl->nColumnHeaderHeight;
}
- //--------------------------------------------------------------------
- void UnoControlTableModel::setRowHeaders(bool _bRowHeaders)
+ //------------------------------------------------------------------------------------------------------------------
+ TableMetrics UnoControlTableModel::getRowHeaderWidth() const
{
- m_pImpl->bHasRowHeaders = _bRowHeaders;
+ DBG_CHECK_ME();
+ DBG_ASSERT( hasRowHeaders(), "DefaultTableModel::getRowHeaderWidth: invalid call!" );
+ return m_pImpl->nRowHeaderWidth;
}
- //--------------------------------------------------------------------
- void UnoControlTableModel::setColumnHeaders(bool _bColumnHeaders)
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoControlTableModel::setColumnHeaderHeight(TableMetrics _nHeight)
{
- m_pImpl->bHasColumnHeaders = _bColumnHeaders;
+ DBG_CHECK_ME();
+ if ( m_pImpl->nColumnHeaderHeight == _nHeight )
+ return;
+
+ m_pImpl->nColumnHeaderHeight = _nHeight;
+ impl_notifyTableMetricsChanged();
}
- void UnoControlTableModel::setColumnCount(TableSize _nColCount)
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoControlTableModel::setRowHeaderWidth(TableMetrics _nWidth)
{
- m_pImpl->aColumns.resize( _nColCount);
+ DBG_CHECK_ME();
+ if ( m_pImpl->nRowHeaderWidth == _nWidth )
+ return;
+
+ m_pImpl->nRowHeaderWidth = _nWidth;
+ impl_notifyTableMetricsChanged();
}
- //--------------------------------------------------------------------
- void UnoControlTableModel::setRowCount(TableSize _nRowCount)
+
+ //------------------------------------------------------------------------------------------------------------------
+ ScrollbarVisibility UnoControlTableModel::getVerticalScrollbarVisibility() const
{
- m_pImpl->nRowCount = _nRowCount;
+ DBG_CHECK_ME();
+ return m_pImpl->eVScrollMode;
}
- //--------------------------------------------------------------------
- bool UnoControlTableModel::isCellEditable( ColPos col, RowPos row ) const
+
+ //------------------------------------------------------------------------------------------------------------------
+ ScrollbarVisibility UnoControlTableModel::getHorizontalScrollbarVisibility() const
{
- (void)col;
- (void)row;
- return false;
+ DBG_CHECK_ME();
+ return m_pImpl->eHScrollMode;
}
- //--------------------------------------------------------------------
- void UnoControlTableModel::addTableModelListener( const PTableModelListener& listener )
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoControlTableModel::addTableModelListener( const PTableModelListener& i_listener )
{
- (void) listener;
- // TODO
- DBG_ERROR( "DefaultTableModel::addTableModelListener: not yet implemented!" );
+ DBG_CHECK_ME();
+ ENSURE_OR_RETURN_VOID( !!i_listener, "illegal NULL listener" );
+ m_pImpl->m_aListeners.push_back( i_listener );
}
- //--------------------------------------------------------------------
- void UnoControlTableModel::removeTableModelListener( const PTableModelListener& listener )
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoControlTableModel::removeTableModelListener( const PTableModelListener& i_listener )
{
- (void)listener;
- // TODO
- DBG_ERROR( "DefaultTableModel::removeTableModelListener: not yet implemented!" );
+ DBG_CHECK_ME();
+ for ( ModellListeners::iterator lookup = m_pImpl->m_aListeners.begin();
+ lookup != m_pImpl->m_aListeners.end();
+ ++lookup
+ )
+ {
+ if ( *lookup == i_listener )
+ {
+ m_pImpl->m_aListeners.erase( lookup );
+ return;
+ }
+ }
+ OSL_ENSURE( false, "UnoControlTableModel::removeTableModelListener: listener is not registered - sure you're doing the right thing here?" );
}
- //--------------------------------------------------------------------
- PColumnModel UnoControlTableModel::getColumnModel( ColPos column )
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoControlTableModel::setVerticalScrollbarVisibility( ScrollbarVisibility const i_visibility ) const
{
- DBG_ASSERT( ( column >= 0 ) && ( column < getColumnCount() ),
- "DefaultTableModel::getColumnModel: invalid index!" );
- return m_pImpl->aColumns[ column ];
+ DBG_CHECK_ME();
+ m_pImpl->eVScrollMode = i_visibility;
}
- //--------------------------------------------------------------------
- std::vector<PColumnModel>& UnoControlTableModel::getColumnModel()
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoControlTableModel::setHorizontalScrollbarVisibility( ScrollbarVisibility const i_visibility ) const
{
- return m_pImpl->aColumns;
+ DBG_CHECK_ME();
+ m_pImpl->eHScrollMode = i_visibility;
}
- //--------------------------------------------------------------------
- PColumnModel UnoControlTableModel::getColumnModelByID( ColumnID id )
+
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoControlTableModel::setDataModel( Reference< XGridDataModel > const & i_gridDataModel )
{
- (void)id;
- // TODO
- DBG_ERROR( "DefaultTableModel::getColumnModelByID: not yet implemented!" );
- return PColumnModel();
+ DBG_CHECK_ME();
+ m_pImpl->m_aDataModel = i_gridDataModel;
+ // TODO: register as listener, so we're notified of row/data changes, and can multiplex them to our
+ // own listeners
}
- //--------------------------------------------------------------------
- PTableRenderer UnoControlTableModel::getRenderer() const
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XGridDataModel > UnoControlTableModel::getDataModel() const
{
- return m_pImpl->pRenderer;
+ Reference< XGridDataModel > const xDataModel( m_pImpl->m_aDataModel );
+ return xDataModel;
}
- //--------------------------------------------------------------------
- PTableInputHandler UnoControlTableModel::getInputHandler() const
+ //------------------------------------------------------------------------------------------------------------------
+ bool UnoControlTableModel::hasDataModel() const
{
- return m_pImpl->pInputHandler;
+ return getDataModel().is();
}
- //--------------------------------------------------------------------
- TableMetrics UnoControlTableModel::getRowHeight() const
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoControlTableModel::setColumnModel( Reference< XGridColumnModel > const & i_gridColumnModel )
{
- return m_pImpl->nRowHeight;
+ DBG_CHECK_ME();
+ m_pImpl->m_aColumnModel = i_gridColumnModel;
}
- //--------------------------------------------------------------------
- void UnoControlTableModel::setRowHeight(TableMetrics _nRowHeight)
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XGridColumnModel > UnoControlTableModel::getColumnModel() const
{
- m_pImpl->nRowHeight = _nRowHeight;
+ Reference< XGridColumnModel > const xColumnModel( m_pImpl->m_aColumnModel );
+ return xColumnModel;
}
- //--------------------------------------------------------------------
- TableMetrics UnoControlTableModel::getColumnHeaderHeight() const
+ //------------------------------------------------------------------------------------------------------------------
+ bool UnoControlTableModel::hasColumnModel() const
{
- DBG_ASSERT( hasColumnHeaders(), "DefaultTableModel::getColumnHeaderHeight: invalid call!" );
- return m_pImpl->nColumnHeaderHeight;
+ return getColumnModel().is();
}
- //--------------------------------------------------------------------
- TableMetrics UnoControlTableModel::getRowHeaderWidth() const
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoControlTableModel::getCellContent( ColPos const i_col, RowPos const i_row, Any& o_cellContent )
{
- DBG_ASSERT( hasRowHeaders(), "DefaultTableModel::getRowHeaderWidth: invalid call!" );
- return m_pImpl->nRowHeaderWidth;
+ DBG_CHECK_ME();
+
+ o_cellContent.clear();
+ try
+ {
+ Reference< XGridDataModel > const xDataModel( m_pImpl->m_aDataModel );
+ ENSURE_OR_RETURN_VOID( xDataModel.is(), "UnoControlTableModel::getCellContent: no data model anymore!" );
+
+ PColumnModel const pColumn = getColumnModel( i_col );
+ UnoGridColumnFacade* pColumnImpl = dynamic_cast< UnoGridColumnFacade* >( pColumn.get() );
+ ENSURE_OR_RETURN_VOID( pColumnImpl != NULL, "UnoControlTableModel::getCellContent: no (valid) column at this position!" );
+ sal_Int32 const nDataColumnIndex = pColumnImpl->getDataColumnIndex() >= 0 ? pColumnImpl->getDataColumnIndex() : i_col;
+
+ if ( nDataColumnIndex >= xDataModel->getColumnCount() )
+ {
+ // this is allowed, in case the column model has been dynamically extended, but the data model does
+ // not (yet?) know about it.
+ // So, handle it gracefully.
+ #if OSL_DEBUG_LEVEL > 0
+ {
+ Reference< XGridColumnModel > const xColumnModel( m_pImpl->m_aColumnModel );
+ OSL_ENSURE( xColumnModel.is() && i_col < xColumnModel->getColumnCount(),
+ "UnoControlTableModel::getCellContent: request a column's value which the ColumnModel doesn't know about!" );
+ }
+ #endif
+ }
+ else
+ {
+ o_cellContent = xDataModel->getCellData( nDataColumnIndex, i_row );
+ }
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
}
- //--------------------------------------------------------------------
- void UnoControlTableModel::setColumnHeaderHeight(TableMetrics _nHeight)
+
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoControlTableModel::getCellToolTip( ColPos const i_col, RowPos const i_row, Any& o_cellToolTip )
{
- m_pImpl->nColumnHeaderHeight = _nHeight;
+ DBG_CHECK_ME();
+ try
+ {
+ Reference< XGridDataModel > const xDataModel( m_pImpl->m_aDataModel );
+ ENSURE_OR_THROW( xDataModel.is(), "no data model anymore!" );
+
+ o_cellToolTip = xDataModel->getCellToolTip( i_col, i_row );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
}
- //--------------------------------------------------------------------
- void UnoControlTableModel::setRowHeaderWidth(TableMetrics _nWidth)
+ //------------------------------------------------------------------------------------------------------------------
+ Any UnoControlTableModel::getRowHeading( RowPos const i_rowPos ) const
{
- m_pImpl->nRowHeaderWidth = _nWidth;
+ DBG_CHECK_ME();
+
+ Any aRowHeading;
+
+ Reference< XGridDataModel > const xDataModel( m_pImpl->m_aDataModel );
+ ENSURE_OR_RETURN( xDataModel.is(), "UnoControlTableModel::getRowHeading: no data model anymore!", aRowHeading );
+
+ try
+ {
+ aRowHeading = xDataModel->getRowHeading( i_rowPos );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return aRowHeading;
}
- //--------------------------------------------------------------------
- void UnoControlTableModel::SetTitleHeight( TableMetrics _nHeight )
+ //------------------------------------------------------------------------------------------------------------------
+ namespace
{
- DBG_ASSERT( _nHeight > 0, "DefaultTableModel::SetTitleHeight: invalid height value!" );
- m_pImpl->nColumnHeaderHeight = _nHeight;
- // TODO: notification
+ void lcl_setColor( Any const & i_color, ::boost::optional< ::Color > & o_convertedColor )
+ {
+ if ( !i_color.hasValue() )
+ o_convertedColor.reset();
+ else
+ {
+ sal_Int32 nColor = COL_TRANSPARENT;
+ if ( i_color >>= nColor )
+ {
+ o_convertedColor.reset( ::Color( nColor ) );
+ }
+ else
+ {
+ OSL_ENSURE( false, "lcl_setColor: could not extract color value!" );
+ }
+ }
+ }
}
- //--------------------------------------------------------------------
- void UnoControlTableModel::SetHandleWidth( TableMetrics _nWidth )
+ //------------------------------------------------------------------------------------------------------------------
+ ::boost::optional< ::Color > UnoControlTableModel::getLineColor() const
{
- DBG_ASSERT( _nWidth > 0, "DefaultTableModel::SetHandleWidth: invalid width value!" );
- m_pImpl->nRowHeaderWidth = _nWidth;
- // TODO: notification
+ DBG_CHECK_ME();
+ return m_pImpl->m_aGridLineColor;
}
- //--------------------------------------------------------------------
- ScrollbarVisibility UnoControlTableModel::getVerticalScrollbarVisibility(int overAllHeight, int actHeight) const
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoControlTableModel::setLineColor( Any const & i_color )
{
- if(overAllHeight>=actHeight && !m_pImpl->bVScroll)
- return ScrollbarShowNever;
- else
- return ScrollbarShowAlways;
+ DBG_CHECK_ME();
+ lcl_setColor( i_color, m_pImpl->m_aGridLineColor );
}
- //--------------------------------------------------------------------
- ScrollbarVisibility UnoControlTableModel::getHorizontalScrollbarVisibility(int overAllWidth, int actWidth) const
+ //------------------------------------------------------------------------------------------------------------------
+ ::boost::optional< ::Color > UnoControlTableModel::getHeaderBackgroundColor() const
{
- if(overAllWidth>=actWidth && !m_pImpl->bHScroll)
- return ScrollbarShowNever;
- else
- return ScrollbarShowAlways;
+ DBG_CHECK_ME();
+ return m_pImpl->m_aHeaderBackgroundColor;
}
- //--------------------------------------------------------------------
- void UnoControlTableModel::setVerticalScrollbarVisibility(bool _bVScroll) const
+
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoControlTableModel::setHeaderBackgroundColor( Any const & i_color )
{
- m_pImpl->bVScroll = _bVScroll;
+ DBG_CHECK_ME();
+ lcl_setColor( i_color, m_pImpl->m_aHeaderBackgroundColor );
}
- //--------------------------------------------------------------------
- void UnoControlTableModel::setHorizontalScrollbarVisibility(bool _bHScroll) const
+ //------------------------------------------------------------------------------------------------------------------
+ ::boost::optional< ::Color > UnoControlTableModel::getHeaderTextColor() const
{
- m_pImpl->bHScroll = _bHScroll;
+ DBG_CHECK_ME();
+ return m_pImpl->m_aHeaderTextColor;
}
- //--------------------------------------------------------------------
- bool UnoControlTableModel::hasVerticalScrollbar()
+
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoControlTableModel::setHeaderTextColor( Any const & i_color )
{
- return m_pImpl->bVScroll;
+ DBG_CHECK_ME();
+ lcl_setColor( i_color, m_pImpl->m_aHeaderTextColor );
}
- //--------------------------------------------------------------------
- bool UnoControlTableModel::hasHorizontalScrollbar()
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::boost::optional< ::Color > UnoControlTableModel::getTextColor() const
{
- return m_pImpl->bHScroll;
+ DBG_CHECK_ME();
+ return m_pImpl->m_aTextColor;
}
- //--------------------------------------------------------------------
- void UnoControlTableModel::setCellContent(const std::vector<std::vector< Any > >& cellContent)
+
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoControlTableModel::setTextColor( Any const & i_color )
{
- m_pImpl->aCellContent = cellContent;
+ DBG_CHECK_ME();
+ lcl_setColor( i_color, m_pImpl->m_aTextColor );
}
- std::vector<std::vector< Any > >& UnoControlTableModel::getCellContent()
+ //------------------------------------------------------------------------------------------------------------------
+ ::boost::optional< ::Color > UnoControlTableModel::getTextLineColor() const
{
- return m_pImpl->aCellContent;
+ DBG_CHECK_ME();
+ return m_pImpl->m_aTextColor;
}
- //--------------------------------------------------------------------
- void UnoControlTableModel::setRowHeaderName(const std::vector<rtl::OUString>& cellColumnContent)
+
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoControlTableModel::setTextLineColor( Any const & i_color )
{
- m_pImpl->aRowHeadersTitle = cellColumnContent;
+ DBG_CHECK_ME();
+ lcl_setColor( i_color, m_pImpl->m_aTextLineColor );
}
- std::vector<rtl::OUString>& UnoControlTableModel::getRowHeaderName()
+ //------------------------------------------------------------------------------------------------------------------
+ ::boost::optional< ::std::vector< ::Color > > UnoControlTableModel::getRowBackgroundColors() const
{
- return m_pImpl->aRowHeadersTitle;
+ DBG_CHECK_ME();
+ return m_pImpl->m_aRowColors;
}
- //--------------------------------------------------------------------
- ::com::sun::star::util::Color UnoControlTableModel::getLineColor()
+
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoControlTableModel::setRowBackgroundColors( ::com::sun::star::uno::Any const & i_APIValue )
{
- return m_pImpl->m_xLineColor;
+ DBG_CHECK_ME();
+ Sequence< ::com::sun::star::util::Color > aAPIColors;
+ if ( !( i_APIValue >>= aAPIColors ) )
+ m_pImpl->m_aRowColors.reset();
+ else
+ {
+ ::std::vector< ::Color > aColors( aAPIColors.getLength() );
+ for ( sal_Int32 i=0; i<aAPIColors.getLength(); ++i )
+ {
+ aColors[i] = ::Color( aAPIColors[i] );
+ }
+ m_pImpl->m_aRowColors.reset( aColors );
+ }
}
- //--------------------------------------------------------------------
- void UnoControlTableModel::setLineColor( ::com::sun::star::util::Color _rColor )
+ //------------------------------------------------------------------------------------------------------------------
+ VerticalAlignment UnoControlTableModel::getVerticalAlign() const
{
- m_pImpl->m_xLineColor = _rColor;
+ DBG_CHECK_ME();
+ return m_pImpl->m_eVerticalAlign;
}
- //--------------------------------------------------------------------
- ::com::sun::star::util::Color UnoControlTableModel::getHeaderBackgroundColor()
+
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoControlTableModel::setVerticalAlign( VerticalAlignment _xAlign )
{
- return m_pImpl->m_xHeaderColor;
+ DBG_CHECK_ME();
+ m_pImpl->m_eVerticalAlign = _xAlign;
}
- //--------------------------------------------------------------------
- void UnoControlTableModel::setHeaderBackgroundColor( ::com::sun::star::util::Color _rColor )
+ //------------------------------------------------------------------------------------------------------------------
+ ColPos UnoControlTableModel::getColumnPos( UnoGridColumnFacade const & i_column ) const
{
- m_pImpl->m_xHeaderColor = _rColor;
+ DBG_CHECK_ME();
+ for ( ColumnModels::const_iterator col = m_pImpl->aColumns.begin();
+ col != m_pImpl->aColumns.end();
+ ++col
+ )
+ {
+ if ( &i_column == col->get() )
+ return col - m_pImpl->aColumns.begin();
+ }
+ OSL_ENSURE( false, "UnoControlTableModel::getColumnPos: column not found!" );
+ return COL_INVALID;
}
- //--------------------------------------------------------------------
- ::com::sun::star::util::Color UnoControlTableModel::getTextColor()
+
+ //------------------------------------------------------------------------------------------------------------------
+ ITableDataSort* UnoControlTableModel::getSortAdapter()
{
- return m_pImpl->m_xTextColor;
+ DBG_CHECK_ME();
+
+ Reference< XSortableGridData > const xSortAccess( getDataModel(), UNO_QUERY );
+ if ( xSortAccess.is() )
+ return this;
+ return NULL;
}
- //--------------------------------------------------------------------
- void UnoControlTableModel::setTextColor( ::com::sun::star::util::Color _rColor )
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoControlTableModel::sortByColumn( ColPos const i_column, ColumnSortDirection const i_sortDirection )
{
- m_pImpl->m_xTextColor = _rColor;
+ DBG_CHECK_ME();
+
+ try
+ {
+ Reference< XSortableGridData > const xSortAccess( getDataModel(), UNO_QUERY_THROW );
+ xSortAccess->sortByColumn( i_column, i_sortDirection == ColumnSortAscending );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
}
- //--------------------------------------------------------------------
- ::com::sun::star::util::Color UnoControlTableModel::getOddRowBackgroundColor()
+
+ //------------------------------------------------------------------------------------------------------------------
+ ColumnSort UnoControlTableModel::getCurrentSortOrder() const
{
- return m_pImpl->m_xRowColor1;
+ DBG_CHECK_ME();
+
+ ColumnSort currentSort;
+ try
+ {
+ Reference< XSortableGridData > const xSortAccess( getDataModel(), UNO_QUERY_THROW );
+ Pair< ::sal_Int32, ::sal_Bool > const aCurrentSortOrder( xSortAccess->getCurrentSortOrder() );
+ currentSort.nColumnPos = aCurrentSortOrder.First;
+ currentSort.eSortDirection = aCurrentSortOrder.Second ? ColumnSortAscending : ColumnSortDescending;
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return currentSort;
}
//--------------------------------------------------------------------
- void UnoControlTableModel::setOddRowBackgroundColor( ::com::sun::star::util::Color _rColor )
+ void UnoControlTableModel::notifyColumnChange( ColPos const i_columnPos, ColumnAttributeGroup const i_attributeGroup ) const
{
- m_pImpl->m_xRowColor1 = _rColor;
+ DBG_CHECK_ME();
+ ENSURE_OR_RETURN_VOID( ( i_columnPos >= 0 ) && ( i_columnPos < getColumnCount() ),
+ "UnoControlTableModel::notifyColumnChange: invalid column index!" );
+
+ ModellListeners aListeners( m_pImpl->m_aListeners );
+ for ( ModellListeners::const_iterator loop = aListeners.begin();
+ loop != aListeners.end();
+ ++loop
+ )
+ {
+ (*loop)->columnChanged( i_columnPos, i_attributeGroup );
+ }
}
- //--------------------------------------------------------------------
- ::com::sun::star::util::Color UnoControlTableModel::getEvenRowBackgroundColor()
+
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoControlTableModel::notifyRowsInserted( GridDataEvent const & i_event ) const
{
- return m_pImpl->m_xRowColor2;
+ // check sanity of the event
+ ENSURE_OR_RETURN_VOID( i_event.FirstRow >= 0, "UnoControlTableModel::notifyRowsInserted: invalid first row!" );
+ ENSURE_OR_RETURN_VOID( i_event.LastRow >= i_event.FirstRow, "UnoControlTableModel::notifyRowsInserted: invalid row indexes!" );
+
+ // check own sanity
+ Reference< XGridColumnModel > const xColumnModel( m_pImpl->m_aColumnModel );
+ ENSURE_OR_RETURN_VOID( xColumnModel.is(), "UnoControlTableModel::notifyRowsInserted: no column model anymore!" );
+
+ Reference< XGridDataModel > const xDataModel( m_pImpl->m_aDataModel );
+ ENSURE_OR_RETURN_VOID( xDataModel.is(), "UnoControlTableModel::notifyRowsInserted: no data model anymore!" );
+
+ // implicitly add columns to the column model
+ // TODO: is this really a good idea?
+ sal_Int32 const dataColumnCount = xDataModel->getColumnCount();
+ OSL_ENSURE( dataColumnCount > 0, "UnoControlTableModel::notifyRowsInserted: no columns at all?" );
+
+ sal_Int32 const modelColumnCount = xColumnModel->getColumnCount();
+ if ( ( modelColumnCount == 0 ) && ( dataColumnCount > 0 ) )
+ {
+ // TODO: shouldn't we clear the mutexes guard for this call?
+ xColumnModel->setDefaultColumns( dataColumnCount );
+ }
+
+ // multiplex the event to our own listeners
+ ModellListeners aListeners( m_pImpl->m_aListeners );
+ for ( ModellListeners::const_iterator loop = aListeners.begin();
+ loop != aListeners.end();
+ ++loop
+ )
+ {
+ (*loop)->rowsInserted( i_event.FirstRow, i_event.LastRow );
+ }
}
- //--------------------------------------------------------------------
- void UnoControlTableModel::setEvenRowBackgroundColor( ::com::sun::star::util::Color _rColor )
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoControlTableModel::notifyRowsRemoved( GridDataEvent const & i_event ) const
{
- m_pImpl->m_xRowColor2 = _rColor;
+ ModellListeners aListeners( m_pImpl->m_aListeners );
+ for ( ModellListeners::const_iterator loop = aListeners.begin();
+ loop != aListeners.end();
+ ++loop
+ )
+ {
+ (*loop)->rowsRemoved( i_event.FirstRow, i_event.LastRow );
+ }
}
- //--------------------------------------------------------------------
- ::com::sun::star::style::VerticalAlignment UnoControlTableModel::getVerticalAlign()
+
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoControlTableModel::notifyDataChanged( ::com::sun::star::awt::grid::GridDataEvent const & i_event ) const
{
- return m_pImpl->m_xVerticalAlign;
+ ColPos const firstCol = i_event.FirstColumn == -1 ? 0 : i_event.FirstColumn;
+ ColPos const lastCol = i_event.FirstColumn == -1 ? getColumnCount() - 1 : i_event.LastColumn;
+ RowPos const firstRow = i_event.FirstRow == -1 ? 0 : i_event.FirstRow;
+ RowPos const lastRow = i_event.FirstRow == -1 ? getRowCount() - 1 : i_event.LastRow;
+
+ ModellListeners aListeners( m_pImpl->m_aListeners );
+ for ( ModellListeners::const_iterator loop = aListeners.begin();
+ loop != aListeners.end();
+ ++loop
+ )
+ {
+ (*loop)->cellsUpdated( firstCol, lastCol, firstRow, lastRow );
+ }
}
- //--------------------------------------------------------------------
- void UnoControlTableModel::setVerticalAlign( com::sun::star::style::VerticalAlignment _xAlign )
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoControlTableModel::notifyAllDataChanged() const
{
- m_pImpl->m_xVerticalAlign = _xAlign;
+ ModellListeners aListeners( m_pImpl->m_aListeners );
+ for ( ModellListeners::const_iterator loop = aListeners.begin();
+ loop != aListeners.end();
+ ++loop
+ )
+ {
+ (*loop)->cellsUpdated( 0, getColumnCount() - 1, 0, getRowCount() - 1 );
+ }
}
+// .....................................................................................................................
+} } // svt::table
+// .....................................................................................................................
diff --git a/svtools/source/uno/unocontroltablemodel.hxx b/svtools/source/uno/unocontroltablemodel.hxx
index c00642448f79..537c3d9a5249 100644
--- a/svtools/source/uno/unocontroltablemodel.hxx
+++ b/svtools/source/uno/unocontroltablemodel.hxx
@@ -28,67 +28,37 @@
#ifndef _UNOCONTROL_TABLEMODEL_HXX_
#define _UNOCONTROL_TABLEMODEL_HXX_
-#include <svtools/table/tablemodel.hxx>
-#include <svtools/table/tablecontrol.hxx>
+#include "svtools/table/tablemodel.hxx"
+#include "svtools/table/tablecontrol.hxx"
+
+/** === begin UNO includes === **/
#include <com/sun/star/awt/grid/XGridControl.hpp>
-#include <com/sun/star/awt/grid/XGridDataListener.hpp>
#include <com/sun/star/awt/grid/GridDataEvent.hpp>
#include <com/sun/star/awt/grid/XGridColumnModel.hpp>
#include <com/sun/star/awt/grid/XGridDataModel.hpp>
#include <com/sun/star/awt/grid/XGridSelectionListener.hpp>
-#include <toolkit/awt/vclxwindow.hxx>
-#include <toolkit/awt/vclxwindows.hxx>
-#include <cppuhelper/typeprovider.hxx>
-#include <cppuhelper/implbase2.hxx>
#include <com/sun/star/awt/grid/XGridColumn.hpp>
#include <com/sun/star/util/Color.hpp>
#include <com/sun/star/style/VerticalAlignment.hpp>
-#include <com/sun/star/style/HorizontalAlignment.hpp>
+/** === end UNO includes === **/
+#include <cppuhelper/implbase2.hxx>
+#include <rtl/ref.hxx>
-using namespace ::svt::table;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::awt::grid;
+#include <boost/noncopyable.hpp>
-class UnoControlTableColumn : public IColumnModel
-{
- private:
- ColumnID m_nID;
- String m_sName;
- bool m_bIsResizable;
- TableMetrics m_nWidth;
- TableMetrics m_nMinWidth;
- TableMetrics m_nMaxWidth;
- TableMetrics m_nPrefWidth;
- ::com::sun::star::style::HorizontalAlignment m_xHorizontalAlign;
-
- public:
- UnoControlTableColumn(Reference<XGridColumn>);
- UnoControlTableColumn();
-
- // IColumnModel overridables
- virtual ColumnID getID() const;
- virtual bool setID( const ColumnID _nID );
- virtual String getName() const;
- virtual void setName( const String& _rName );
- virtual bool isResizable() const;
- virtual void setResizable( bool _bResizable );
- virtual TableMetrics getWidth() const;
- virtual void setWidth( TableMetrics _nWidth );
- virtual TableMetrics getMinWidth() const;
- virtual void setMinWidth( TableMetrics _nMinWidth );
- virtual TableMetrics getMaxWidth() const;
- virtual void setMaxWidth( TableMetrics _nMaxWidth );
- virtual TableMetrics getPreferredWidth() const;
- virtual void setPreferredWidth( TableMetrics _nPrefWidth );
- virtual ::com::sun::star::style::HorizontalAlignment getHorizontalAlign();
- virtual void setHorizontalAlign(::com::sun::star::style::HorizontalAlignment _xAlign);
-};
-
-struct UnoControlTableModel_Impl;
-
-class UnoControlTableModel : public ITableModel
+// .....................................................................................................................
+namespace svt { namespace table
{
+// .....................................................................................................................
+
+ //==================================================================================================================
+ //= UnoControlTableModel
+ //==================================================================================================================
+ class UnoGridColumnFacade;
+ struct UnoControlTableModel_Impl;
+ class UnoControlTableModel : public ITableModel, public ITableDataSort
+ {
private:
UnoControlTableModel_Impl* m_pImpl;
@@ -96,82 +66,102 @@ class UnoControlTableModel : public ITableModel
UnoControlTableModel();
~UnoControlTableModel();
- /// returns the current row height, in 1/100 millimeters
- inline TableMetrics GetRowHeight() const { return getRowHeight(); }
- /// sets a new row height.
- void setRowHeight( TableMetrics _nHeight );
- /// sets a new row header width.
- void setRowHeaderWidth( TableMetrics _nWidth );
- /// sets a new column header height.
- void setColumnHeaderHeight( TableMetrics _nHeight );
-
- /// returns the height of the title row (containing the column headers)
- inline TableMetrics GetTitleHeight() const { return getColumnHeaderHeight(); }
- /// sets a new height for the title row (containing the column headers)
- void SetTitleHeight( TableMetrics _nHeight );
-
- /// returns the width of the handle column (containing the row headers)
- inline TableMetrics GetHandleWidth() const { return getRowHeaderWidth(); }
- /// sets a new width for the handle column (containing the row headers)
- void SetHandleWidth( TableMetrics _nWidth );
-
- /// sets the width of a column
- inline void SetColumnWidth( ColPos _nColumn, TableMetrics _nWidth100thMM );
- /// retrieves the width of a column, in 1/100th millimeters
- inline TableMetrics GetColumnWidth( ColPos _nColumn );
-
public:
// ITableModel overridables
- virtual TableSize getColumnCount() const;
- virtual TableSize getRowCount() const;
- virtual void setColumnCount(TableSize _nColCount);
- virtual void setRowCount(TableSize _nRowCount);
- virtual bool hasColumnHeaders() const;
- virtual bool hasRowHeaders() const;
- virtual void setRowHeaders(bool _bRowHeaders);
- virtual void setColumnHeaders(bool _bColumnHeaders);
- virtual bool isCellEditable( ColPos col, RowPos row ) const;
- virtual void addTableModelListener( const PTableModelListener& listener );
- virtual void removeTableModelListener( const PTableModelListener& listener );
- virtual PColumnModel getColumnModel( ColPos column );
- virtual std::vector<PColumnModel>& getColumnModel();
- virtual PColumnModel getColumnModelByID( ColumnID id );
- virtual PTableRenderer getRenderer() const;
- virtual PTableInputHandler getInputHandler() const;
- virtual TableMetrics getRowHeight() const;
- virtual TableMetrics getColumnHeaderHeight() const;
- virtual TableMetrics getRowHeaderWidth() const;
- virtual ScrollbarVisibility getVerticalScrollbarVisibility(int overAllHeight, int actHeight) const;
- virtual ScrollbarVisibility getHorizontalScrollbarVisibility(int overAllWidth, int actWidth) const;
- virtual void setVerticalScrollbarVisibility(bool _bVScroll) const;
- virtual void setHorizontalScrollbarVisibility(bool _bHScroll) const;
- virtual void setCellContent(const std::vector<std::vector< Any > >& cellContent);
- virtual std::vector<std::vector< Any > >& getCellContent();
- virtual void setRowHeaderName(const std::vector<rtl::OUString>& cellColumnContent);
- virtual std::vector<rtl::OUString>& getRowHeaderName();
- virtual ::com::sun::star::util::Color getLineColor();
- virtual void setLineColor(::com::sun::star::util::Color _rColor);
- virtual ::com::sun::star::util::Color getHeaderBackgroundColor();
- virtual void setHeaderBackgroundColor(::com::sun::star::util::Color _rColor);
- virtual ::com::sun::star::util::Color getTextColor();
- virtual void setTextColor(::com::sun::star::util::Color _rColor);
- virtual ::com::sun::star::util::Color getOddRowBackgroundColor();
- virtual void setOddRowBackgroundColor(::com::sun::star::util::Color _rColor);
- virtual ::com::sun::star::util::Color getEvenRowBackgroundColor();
- virtual void setEvenRowBackgroundColor(::com::sun::star::util::Color _rColor);
- virtual ::com::sun::star::style::VerticalAlignment getVerticalAlign();
- virtual void setVerticalAlign(::com::sun::star::style::VerticalAlignment _rAlign);
- virtual bool hasVerticalScrollbar();
- virtual bool hasHorizontalScrollbar();
-};
-
-inline void UnoControlTableModel::SetColumnWidth( ColPos _nColumn, TableMetrics _nWidth100thMM )
-{
- getColumnModel( _nColumn )->setWidth( _nWidth100thMM );
-}
+ virtual TableSize getColumnCount() const;
+ virtual TableSize getRowCount() const;
+ virtual bool hasColumnHeaders() const;
+ virtual bool hasRowHeaders() const;
+ virtual bool isCellEditable( ColPos col, RowPos row ) const;
+ virtual PColumnModel getColumnModel( ColPos column );
+ virtual PTableRenderer getRenderer() const;
+ virtual PTableInputHandler getInputHandler() const;
+ virtual TableMetrics getRowHeight() const;
+ virtual TableMetrics getColumnHeaderHeight() const;
+ virtual TableMetrics getRowHeaderWidth() const;
+ virtual ScrollbarVisibility getVerticalScrollbarVisibility() const;
+ virtual ScrollbarVisibility getHorizontalScrollbarVisibility() const;
+ virtual void addTableModelListener( const PTableModelListener& i_listener );
+ virtual void removeTableModelListener( const PTableModelListener& i_listener );
+ virtual void getCellContent( ColPos const i_col, RowPos const i_row, ::com::sun::star::uno::Any& o_cellContent );
+ virtual void getCellToolTip( ColPos const i_col, RowPos const i_row, ::com::sun::star::uno::Any & o_cellToolTip );
+ virtual ::com::sun::star::uno::Any getRowHeading( RowPos const i_rowPos ) const;
+ virtual ::boost::optional< ::Color > getLineColor() const;
+ virtual ::boost::optional< ::Color > getHeaderBackgroundColor() const;
+ virtual ::boost::optional< ::Color > getHeaderTextColor() const;
+ virtual ::boost::optional< ::Color > getTextColor() const;
+ virtual ::boost::optional< ::Color > getTextLineColor() const;
+ virtual ::boost::optional< ::std::vector< ::Color > >
+ getRowBackgroundColors() const;
+ virtual ::com::sun::star::style::VerticalAlignment
+ getVerticalAlign() const;
+ virtual ITableDataSort* getSortAdapter();
+
+ // ITableDataSort overridables
+ virtual void sortByColumn( ColPos const i_column, ColumnSortDirection const i_sortDirection );
+ virtual ColumnSort getCurrentSortOrder() const;
+
+ // column write access
+ void appendColumn( ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > const & i_column );
+ void insertColumn( ColPos const i_position, ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > const & i_column );
+ void removeColumn( ColPos const i_position );
+ void removeAllColumns();
+
+ // other operations
+ void setVerticalScrollbarVisibility( ScrollbarVisibility const i_visibility ) const;
+ void setHorizontalScrollbarVisibility( ScrollbarVisibility const i_visibility ) const;
+
+ void setDataModel( ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataModel > const & i_gridDataModel );
+ bool hasDataModel() const;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataModel >
+ getDataModel() const;
+ void setColumnModel( ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnModel > const & i_gridColumnModel );
+ bool hasColumnModel() const;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnModel >
+ getColumnModel() const;
+
+ void setRowHeaders(bool _bRowHeaders);
+ void setColumnHeaders(bool _bColumnHeaders);
+
+ void setRowHeight( TableMetrics _nHeight );
+ void setRowHeaderWidth( TableMetrics _nWidth );
+ void setColumnHeaderHeight( TableMetrics _nHeight );
+
+ void setLineColor( ::com::sun::star::uno::Any const & i_color );
+ void setHeaderBackgroundColor( ::com::sun::star::uno::Any const & i_color );
+ void setHeaderTextColor( ::com::sun::star::uno::Any const & i_color );
+ void setTextColor( ::com::sun::star::uno::Any const & i_color );
+ void setTextLineColor( ::com::sun::star::uno::Any const & i_color );
+ void setRowBackgroundColors( ::com::sun::star::uno::Any const & i_APIValue );
+
+ void setVerticalAlign(::com::sun::star::style::VerticalAlignment _rAlign);
+
+ // multiplexing of XGridDataListener events
+ void notifyRowsInserted( ::com::sun::star::awt::grid::GridDataEvent const & i_event ) const;
+ void notifyRowsRemoved( ::com::sun::star::awt::grid::GridDataEvent const & i_event ) const;
+ void notifyDataChanged( ::com::sun::star::awt::grid::GridDataEvent const & i_event ) const;
+
+ /// retrieves the index of a column within the model
+ ColPos getColumnPos( UnoGridColumnFacade const & i_column ) const;
+
+ /// notifies a change in a column belonging to the model
+ void notifyColumnChange( ColPos const i_columnPos, ColumnAttributeGroup const i_attributeGroup ) const;
+
+ /** notifies a change in all data represented by the model. To be used if you cannot specified the changed data
+ in more detail.
+ */
+ void notifyAllDataChanged() const;
+
+#ifdef DBG_UTIL
+ const char* checkInvariants() const;
+#endif
-inline TableMetrics UnoControlTableModel::GetColumnWidth( ColPos _nColumn )
-{
- return getColumnModel( _nColumn )->getWidth();
-}
- #endif // _UNOCONTROL_TABLEMODEL_HXX_
+ private:
+ void impl_notifyTableMetricsChanged() const;
+ };
+
+// .....................................................................................................................
+} } // svt::table
+// .....................................................................................................................
+
+#endif // _UNOCONTROL_TABLEMODEL_HXX_
diff --git a/svtools/source/uno/unogridcolumnfacade.cxx b/svtools/source/uno/unogridcolumnfacade.cxx
new file mode 100755
index 000000000000..d2f5e7b565fd
--- /dev/null
+++ b/svtools/source/uno/unogridcolumnfacade.cxx
@@ -0,0 +1,427 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_svtools.hxx"
+
+#include "unogridcolumnfacade.hxx"
+#include "unocontroltablemodel.hxx"
+
+#include "svtools/table/defaultinputhandler.hxx"
+#include "svtools/table/gridtablerenderer.hxx"
+#include "svtools/table/tablecontrol.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/awt/grid/XGridColumn.hpp>
+#include <com/sun/star/view/SelectionType.hpp>
+#include <com/sun/star/awt/grid/XGridColumnListener.hpp>
+/** === end UNO includes === **/
+
+#include <comphelper/stlunosequence.hxx>
+#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
+#include <vcl/svapp.hxx>
+#include <vos/mutex.hxx>
+
+// .....................................................................................................................
+namespace svt { namespace table
+{
+// .....................................................................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::awt::grid::XGridColumn;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::awt::grid::XGridColumnListener;
+ using ::com::sun::star::lang::EventObject;
+ using ::com::sun::star::awt::grid::GridColumnEvent;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::style::HorizontalAlignment_LEFT;
+ using ::com::sun::star::style::HorizontalAlignment;
+ /** === end UNO using === **/
+
+ //------------------------------------------------------------------------------------------------------------------
+ namespace
+ {
+ template< class ATTRIBUTE_TYPE >
+ void lcl_set( Reference< XGridColumn > const & i_column, void ( SAL_CALL XGridColumn::*i_setter )( ATTRIBUTE_TYPE ),
+ ATTRIBUTE_TYPE i_value )
+ {
+ try
+ {
+ (i_column.get()->*i_setter) ( i_value );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
+ template< class ATTRIBUTE_TYPE >
+ ATTRIBUTE_TYPE lcl_get( Reference< XGridColumn > const & i_column, ATTRIBUTE_TYPE ( SAL_CALL XGridColumn::*i_getter )() )
+ {
+ ATTRIBUTE_TYPE value = ATTRIBUTE_TYPE();
+ try
+ {
+ value = (i_column.get()->*i_getter)();
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return value;
+ }
+ }
+
+ //==================================================================================================================
+ //= ColumnChangeMultiplexer
+ //==================================================================================================================
+ typedef ::cppu::WeakImplHelper1 < XGridColumnListener
+ > ColumnChangeMultiplexer_Base;
+ class ColumnChangeMultiplexer :public ColumnChangeMultiplexer_Base
+ ,public ::boost::noncopyable
+ {
+ public:
+ ColumnChangeMultiplexer( UnoGridColumnFacade& i_colImpl );
+
+ void dispose();
+
+ protected:
+ ~ColumnChangeMultiplexer();
+
+ // XGridColumnListener
+ virtual void SAL_CALL columnChanged( const GridColumnEvent& i_event ) throw (RuntimeException);
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const EventObject& i_event ) throw (RuntimeException);
+
+ private:
+ UnoGridColumnFacade* m_pColumnImplementation;
+ };
+
+ //------------------------------------------------------------------------------------------------------------------
+ ColumnChangeMultiplexer::ColumnChangeMultiplexer( UnoGridColumnFacade& i_colImpl )
+ :m_pColumnImplementation( &i_colImpl )
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ColumnChangeMultiplexer::~ColumnChangeMultiplexer()
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void ColumnChangeMultiplexer::dispose()
+ {
+ DBG_TESTSOLARMUTEX();
+ m_pColumnImplementation = NULL;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL ColumnChangeMultiplexer::columnChanged( const GridColumnEvent& i_event ) throw (RuntimeException)
+ {
+ if ( i_event.AttributeName.equalsAscii( "DataColumnIndex" ) )
+ {
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ if ( m_pColumnImplementation != NULL )
+ m_pColumnImplementation->dataColumnIndexChanged();
+ return;
+ }
+
+ ColumnAttributeGroup nChangedAttributes( COL_ATTRS_NONE );
+
+ if ( i_event.AttributeName.equalsAscii( "HorizontalAlign" ) )
+ nChangedAttributes |= COL_ATTRS_APPEARANCE;
+
+ if ( i_event.AttributeName.equalsAscii( "ColumnWidth" )
+ || i_event.AttributeName.equalsAscii( "MaxWidth" )
+ || i_event.AttributeName.equalsAscii( "MinWidth" )
+ || i_event.AttributeName.equalsAscii( "PreferredWidth" )
+ || i_event.AttributeName.equalsAscii( "Resizeable" )
+ || i_event.AttributeName.equalsAscii( "Flexibility" )
+ )
+ nChangedAttributes |= COL_ATTRS_WIDTH;
+
+ OSL_ENSURE( nChangedAttributes != COL_ATTRS_NONE,
+ "ColumnChangeMultiplexer::columnChanged: unknown column attributed changed!" );
+
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ if ( m_pColumnImplementation != NULL )
+ m_pColumnImplementation->columnChanged( nChangedAttributes );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL ColumnChangeMultiplexer::disposing( const EventObject& i_event ) throw (RuntimeException)
+ {
+ OSL_UNUSED( i_event );
+ }
+
+ //==================================================================================================================
+ //= UnoGridColumnFacade
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ UnoGridColumnFacade::UnoGridColumnFacade( UnoControlTableModel const & i_owner, Reference< XGridColumn > const & i_gridColumn )
+ :m_pOwner( &i_owner )
+ ,m_nDataColumnIndex( -1 )
+ ,m_xGridColumn( i_gridColumn, UNO_QUERY_THROW )
+ ,m_pChangeMultiplexer( new ColumnChangeMultiplexer( *this ) )
+ {
+ m_xGridColumn->addGridColumnListener( m_pChangeMultiplexer.get() );
+ impl_updateDataColumnIndex_nothrow();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ UnoGridColumnFacade::~UnoGridColumnFacade()
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoGridColumnFacade::dispose()
+ {
+ DBG_TESTSOLARMUTEX();
+ ENSURE_OR_RETURN_VOID( m_pOwner != NULL, "UnoGridColumnFacade::dispose: already disposed!" );
+
+ m_xGridColumn->removeGridColumnListener( m_pChangeMultiplexer.get() );
+ m_pChangeMultiplexer->dispose();
+ m_pChangeMultiplexer.clear();
+ m_xGridColumn.clear();
+ m_pOwner = NULL;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoGridColumnFacade::impl_updateDataColumnIndex_nothrow()
+ {
+ m_nDataColumnIndex = -1;
+ ENSURE_OR_RETURN_VOID( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!" );
+ try
+ {
+ m_nDataColumnIndex = m_xGridColumn->getDataColumnIndex();
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoGridColumnFacade::dataColumnIndexChanged()
+ {
+ DBG_TESTSOLARMUTEX();
+ impl_updateDataColumnIndex_nothrow();
+ if ( m_pOwner != NULL )
+ m_pOwner->notifyAllDataChanged();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoGridColumnFacade::columnChanged( ColumnAttributeGroup const i_attributeGroup )
+ {
+ DBG_TESTSOLARMUTEX();
+ if ( m_pOwner != NULL )
+ m_pOwner->notifyColumnChange( m_pOwner->getColumnPos( *this ), i_attributeGroup );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Any UnoGridColumnFacade::getID() const
+ {
+ Any aID;
+ ENSURE_OR_RETURN( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!", aID );
+ try
+ {
+ aID = m_xGridColumn->getIdentifier();
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return aID;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoGridColumnFacade::setID( const Any& i_ID )
+ {
+ ENSURE_OR_RETURN_VOID( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!" );
+ try
+ {
+ m_xGridColumn->setIdentifier( i_ID );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ String UnoGridColumnFacade::getName() const
+ {
+ ::rtl::OUString sName;
+ ENSURE_OR_RETURN( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!", sName );
+ try
+ {
+ sName = m_xGridColumn->getTitle();
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return sName;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoGridColumnFacade::setName( const String& _rName )
+ {
+ ENSURE_OR_RETURN_VOID( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!" );
+ try
+ {
+ m_xGridColumn->setTitle( _rName );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ String UnoGridColumnFacade::getHelpText() const
+ {
+ ::rtl::OUString sHelpText;
+ ENSURE_OR_RETURN( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!", sHelpText );
+ try
+ {
+ sHelpText = m_xGridColumn->getHelpText();
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return sHelpText;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoGridColumnFacade::setHelpText( const String& i_helpText )
+ {
+ ENSURE_OR_RETURN_VOID( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!" );
+ try
+ {
+ m_xGridColumn->setHelpText( i_helpText );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ bool UnoGridColumnFacade::isResizable() const
+ {
+ ENSURE_OR_RETURN( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!", false );
+ return lcl_get( m_xGridColumn, &XGridColumn::getResizeable );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoGridColumnFacade::setResizable( bool i_resizable )
+ {
+ ENSURE_OR_RETURN_VOID( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!" );
+ lcl_set( m_xGridColumn, &XGridColumn::setResizeable, sal_Bool( i_resizable ) );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ sal_Int32 UnoGridColumnFacade::getFlexibility() const
+ {
+ ENSURE_OR_RETURN( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!", 1 );
+ return lcl_get( m_xGridColumn, &XGridColumn::getFlexibility );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoGridColumnFacade::setFlexibility( sal_Int32 const i_flexibility )
+ {
+ ENSURE_OR_RETURN_VOID( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!" );
+ lcl_set( m_xGridColumn, &XGridColumn::setFlexibility, i_flexibility );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ TableMetrics UnoGridColumnFacade::getWidth() const
+ {
+ ENSURE_OR_RETURN( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!", 0 );
+ return lcl_get( m_xGridColumn, &XGridColumn::getColumnWidth );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoGridColumnFacade::setWidth( TableMetrics _nWidth )
+ {
+ ENSURE_OR_RETURN_VOID( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!" );
+ lcl_set( m_xGridColumn, &XGridColumn::setColumnWidth, _nWidth );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ TableMetrics UnoGridColumnFacade::getMinWidth() const
+ {
+ ENSURE_OR_RETURN( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!", 0 );
+ return lcl_get( m_xGridColumn, &XGridColumn::getMinWidth );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoGridColumnFacade::setMinWidth( TableMetrics _nMinWidth )
+ {
+ ENSURE_OR_RETURN_VOID( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!" );
+ lcl_set( m_xGridColumn, &XGridColumn::setMinWidth, _nMinWidth );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ TableMetrics UnoGridColumnFacade::getMaxWidth() const
+ {
+ ENSURE_OR_RETURN( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!", 0 );
+ return lcl_get( m_xGridColumn, &XGridColumn::getMaxWidth );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoGridColumnFacade::setMaxWidth( TableMetrics _nMaxWidth )
+ {
+ ENSURE_OR_RETURN_VOID( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!" );
+ lcl_set( m_xGridColumn, &XGridColumn::setMinWidth, _nMaxWidth );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::com::sun::star::style::HorizontalAlignment UnoGridColumnFacade::getHorizontalAlign()
+ {
+ ENSURE_OR_RETURN( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!", HorizontalAlignment_LEFT );
+ return lcl_get( m_xGridColumn, &XGridColumn::getHorizontalAlign );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void UnoGridColumnFacade::setHorizontalAlign( com::sun::star::style::HorizontalAlignment _align )
+ {
+ ENSURE_OR_RETURN_VOID( m_xGridColumn.is(), "UnoGridColumnFacade: already disposed!" );
+ lcl_set( m_xGridColumn, &XGridColumn::setHorizontalAlign, _align );
+ }
+
+// .....................................................................................................................
+} } // svt::table
+// .....................................................................................................................
diff --git a/svtools/source/uno/unogridcolumnfacade.hxx b/svtools/source/uno/unogridcolumnfacade.hxx
new file mode 100755
index 000000000000..7499621ba8af
--- /dev/null
+++ b/svtools/source/uno/unogridcolumnfacade.hxx
@@ -0,0 +1,114 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SVTOOLS_GRIDCOLUMNFACADE_HXX
+#define SVTOOLS_GRIDCOLUMNFACADE_HXX
+
+#include "svtools/table/tablemodel.hxx"
+#include "svtools/table/tablecontrol.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/awt/grid/XGridColumn.hpp>
+#include <com/sun/star/style/VerticalAlignment.hpp>
+#include <com/sun/star/style/HorizontalAlignment.hpp>
+/** === end UNO includes === **/
+
+#include <cppuhelper/implbase2.hxx>
+#include <rtl/ref.hxx>
+
+#include <boost/noncopyable.hpp>
+
+// .....................................................................................................................
+namespace svt { namespace table
+{
+// .....................................................................................................................
+
+ //==================================================================================================================
+ //= UnoGridColumnFacade
+ //==================================================================================================================
+ class ColumnChangeMultiplexer;
+ class UnoControlTableModel;
+ class UnoGridColumnFacade :public IColumnModel
+ ,public ::boost::noncopyable
+ {
+ public:
+ UnoGridColumnFacade(
+ UnoControlTableModel const & i_owner,
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > const & i_gridColumn
+ );
+ ~UnoGridColumnFacade();
+
+ // IColumnModel overridables
+ virtual ::com::sun::star::uno::Any
+ getID() const;
+ virtual void setID( const ::com::sun::star::uno::Any& i_ID );
+ virtual String getName() const;
+ virtual void setName( const String& _rName );
+ virtual String getHelpText() const;
+ virtual void setHelpText( const String& i_helpText );
+ virtual bool isResizable() const;
+ virtual void setResizable( bool _bResizable );
+ virtual sal_Int32 getFlexibility() const;
+ virtual void setFlexibility( sal_Int32 const i_flexibility );
+ virtual TableMetrics getWidth() const;
+ virtual void setWidth( TableMetrics _nWidth );
+ virtual TableMetrics getMinWidth() const;
+ virtual void setMinWidth( TableMetrics _nMinWidth );
+ virtual TableMetrics getMaxWidth() const;
+ virtual void setMaxWidth( TableMetrics _nMaxWidth );
+ virtual ::com::sun::star::style::HorizontalAlignment getHorizontalAlign();
+ virtual void setHorizontalAlign(::com::sun::star::style::HorizontalAlignment _xAlign);
+
+ /** disposes the column wrapper
+
+ Note that the XGridColumn which is wrapped by the instance is <strong>not</strong> disposed, as we
+ do not own it.
+ */
+ void dispose();
+
+ sal_Int32
+ getDataColumnIndex() const { return m_nDataColumnIndex; }
+
+ // callbacks for the XGridColumnListener
+ void columnChanged( ColumnAttributeGroup const i_attributeGroup );
+ void dataColumnIndexChanged();
+
+ private:
+ void impl_updateDataColumnIndex_nothrow();
+
+ private:
+ UnoControlTableModel const * m_pOwner;
+ sal_Int32 m_nDataColumnIndex;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > m_xGridColumn;
+ ::rtl::Reference< ColumnChangeMultiplexer > m_pChangeMultiplexer;
+ };
+
+// .....................................................................................................................
+} } // svt::table
+// .....................................................................................................................
+
+#endif // SVTOOLS_GRIDCOLUMNFACADE_HXX
diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx
index 9ff37fbc2af4..a60a210e8fa7 100644
--- a/svtools/source/uno/unoiface.cxx
+++ b/svtools/source/uno/unoiface.cxx
@@ -121,7 +121,7 @@ SAL_DLLPUBLIC_EXPORT Window* CreateWindow( VCLXWindow** ppNewComp, const ::com::
pWindow = new CalendarField( pParent, nWinBits);
static_cast<CalendarField*>(pWindow)->EnableToday();
static_cast<CalendarField*>(pWindow)->EnableNone();
- static_cast<CalendarField*>(pWindow)->EnableEmptyFieldValue( TRUE );
+ static_cast<CalendarField*>(pWindow)->EnableEmptyFieldValue( sal_True );
*ppNewComp = new SVTXDateField;
((VCLXFormattedSpinField*)*ppNewComp)->SetFormatter( (FormatterBase*)(DateField*)pWindow );
}
@@ -838,7 +838,7 @@ void SVTXFormattedField::SetWindow( Window* _pWindow )
{
VCLXSpinField::SetWindow(_pWindow);
if (GetFormattedField())
- GetFormattedField()->SetAutoColor(TRUE);
+ GetFormattedField()->SetAutoColor(sal_True);
}
// --------------------------------------------------------------------------------------
@@ -1650,7 +1650,7 @@ void SVTXRoadmap::ImplSetNewImage()
{
OSL_PRECOND( GetWindow(), "SVTXRoadmap::ImplSetNewImage: window is required to be not-NULL!" );
::svt::ORoadmap* pButton = static_cast< ::svt::ORoadmap* >( GetWindow() );
- pButton->SetRoadmapBitmap( GetBitmap() );
+ pButton->SetRoadmapBitmap( GetImage().GetBitmapEx() );
}
void SVTXRoadmap::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
@@ -2134,7 +2134,7 @@ void VCLXProgressBar::ImplUpdateValue()
}
// set progressbar value
- pProgressBar->SetValue( (USHORT) nPercent );
+ pProgressBar->SetValue( (sal_uInt16) nPercent );
}
}
diff --git a/svtools/source/uno/unoimap.cxx b/svtools/source/uno/unoimap.cxx
index 97482ed9d540..e6a7626b8f4a 100644
--- a/svtools/source/uno/unoimap.cxx
+++ b/svtools/source/uno/unoimap.cxx
@@ -92,7 +92,7 @@ class SvUnoImageMapObject : public OWeakAggObject,
public XUnoTunnel
{
public:
- SvUnoImageMapObject( UINT16 nType, const SvEventDescription* pSupportedMacroItems );
+ SvUnoImageMapObject( sal_uInt16 nType, const SvEventDescription* pSupportedMacroItems );
SvUnoImageMapObject( const IMapObject& rMapObject, const SvEventDescription* pSupportedMacroItems );
virtual ~SvUnoImageMapObject() throw();
@@ -125,10 +125,10 @@ public:
virtual Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw( RuntimeException );
private:
- static PropertySetInfo* createPropertySetInfo( UINT16 nType );
+ static PropertySetInfo* createPropertySetInfo( sal_uInt16 nType );
- UINT16 mnType;
+ sal_uInt16 mnType;
::rtl::OUString maURL;
::rtl::OUString maAltText;
@@ -144,7 +144,7 @@ private:
UNO3_GETIMPLEMENTATION_IMPL( SvUnoImageMapObject );
-PropertySetInfo* SvUnoImageMapObject::createPropertySetInfo( UINT16 nType )
+PropertySetInfo* SvUnoImageMapObject::createPropertySetInfo( sal_uInt16 nType )
{
switch( nType )
{
@@ -201,7 +201,7 @@ PropertySetInfo* SvUnoImageMapObject::createPropertySetInfo( UINT16 nType )
}
}
-SvUnoImageMapObject::SvUnoImageMapObject( UINT16 nType, const SvEventDescription* pSupportedMacroItems )
+SvUnoImageMapObject::SvUnoImageMapObject( sal_uInt16 nType, const SvEventDescription* pSupportedMacroItems )
: PropertySetHelper( createPropertySetInfo( nType ) ),
mnType( nType )
, mbIsActive( true )
@@ -249,11 +249,11 @@ SvUnoImageMapObject::SvUnoImageMapObject( const IMapObject& rMapObject, const Sv
{
const Polygon aPoly( ((IMapPolygonObject*)&rMapObject)->GetPolygon(sal_False) );
- const USHORT nCount = aPoly.GetSize();
+ const sal_uInt16 nCount = aPoly.GetSize();
maPolygon.realloc( nCount );
awt::Point* pPoints = maPolygon.getArray();
- for( USHORT nPoint = 0; nPoint < nCount; nPoint++ )
+ for( sal_uInt16 nPoint = 0; nPoint < nCount; nPoint++ )
{
const Point& rPoint = aPoly.GetPoint( nPoint );
pPoints->X = rPoint.X();
@@ -605,8 +605,8 @@ SvUnoImageMap::SvUnoImageMap( const ImageMap& rMap, const SvEventDescription* pS
{
maName = rMap.GetName();
- const UINT16 nCount = rMap.GetIMapObjectCount();
- for( UINT16 nPos = 0; nPos < nCount; nPos++ )
+ const sal_uInt16 nCount = rMap.GetIMapObjectCount();
+ for( sal_uInt16 nPos = 0; nPos < nCount; nPos++ )
{
IMapObject* pMapObject = rMap.GetIMapObject( nPos );
SvUnoImageMapObject* pUnoObj = new SvUnoImageMapObject( *pMapObject, pSupportedMacroItems );
diff --git a/svtools/source/uno/wizard/wizardpagecontroller.cxx b/svtools/source/uno/wizard/wizardpagecontroller.cxx
index d6f7029b477c..6bc01c76da4a 100644
--- a/svtools/source/uno/wizard/wizardpagecontroller.cxx
+++ b/svtools/source/uno/wizard/wizardpagecontroller.cxx
@@ -75,7 +75,7 @@ namespace svt { namespace uno
try
{
m_xWizardPage.set( m_xController->createPage(
- Reference< XWindow >( i_rParent.GetComponentInterface( TRUE ), UNO_QUERY_THROW ),
+ Reference< XWindow >( i_rParent.GetComponentInterface( sal_True ), UNO_QUERY_THROW ),
m_nPageId
), UNO_SET_THROW );
diff --git a/svtools/source/urlobj/inetimg.cxx b/svtools/source/urlobj/inetimg.cxx
index 695f3993d8b8..87ff86afa7fc 100644
--- a/svtools/source/urlobj/inetimg.cxx
+++ b/svtools/source/urlobj/inetimg.cxx
@@ -35,7 +35,7 @@
#define TOKEN_SEPARATOR '\001'
-sal_Bool INetImage::Write( SvStream& rOStm, ULONG nFormat ) const
+sal_Bool INetImage::Write( SvStream& rOStm, sal_uLong nFormat ) const
{
sal_Bool bRet = sal_False;
switch( nFormat )
@@ -65,7 +65,7 @@ sal_Bool INetImage::Write( SvStream& rOStm, ULONG nFormat ) const
return bRet;
}
-sal_Bool INetImage::Read( SvStream& rIStm, ULONG nFormat )
+sal_Bool INetImage::Read( SvStream& rIStm, sal_uLong nFormat )
{
sal_Bool bRet = sal_False;
switch( nFormat )
@@ -92,12 +92,12 @@ sal_Bool INetImage::Read( SvStream& rIStm, ULONG nFormat )
/*
--> structure size MUST - alignment of 4!
int iSize; // size of all data, including variable length strings
- BOOL bIsMap; // For server side maps
- INT32 iWidth; // Fixed size data correspond to fields in LO_ImageDataStruct
- INT32 iHeight; // and EDT_ImageData
- INT32 iHSpace;
- INT32 iVSpace;
- INT32 iBorder;
+ sal_Bool bIsMap; // For server side maps
+ sal_Int32 iWidth; // Fixed size data correspond to fields in LO_ImageDataStruct
+ sal_Int32 iHeight; // and EDT_ImageData
+ sal_Int32 iHSpace;
+ sal_Int32 iVSpace;
+ sal_Int32 iBorder;
int iLowResOffset; // Offsets into string_data. If 0, string is NULL (not used)
int iAltOffset; // (alternate text?)
int iAnchorOffset; // HREF in image
@@ -109,12 +109,12 @@ sal_Bool INetImage::Read( SvStream& rIStm, ULONG nFormat )
ByteString sData;
nFilePos = rIStm.Tell();
- // skip over iSize (int), bIsMao ( BOOL ) alignment of 4 !!!!
+ // skip over iSize (int), bIsMao ( sal_Bool ) alignment of 4 !!!!
rIStm.SeekRel( 8 );
rIStm >> nVal; aSizePixel.Width() = nVal;
rIStm >> nVal; aSizePixel.Height() = nVal;
// skip over iHSpace, iVSpace, iBorder, iLowResOffset
- rIStm.SeekRel( 3 * sizeof( INT32 ) + sizeof( int ) );
+ rIStm.SeekRel( 3 * sizeof( sal_Int32 ) + sizeof( int ) );
rIStm >> nAltOffset;
rIStm >> nAnchorOffset;
// skip over iExtraHTML_Offset
diff --git a/svtools/workben/browser.cxx b/svtools/workben/browser.cxx
index 2f4f120a276b..f69eaa76e401 100644
--- a/svtools/workben/browser.cxx
+++ b/svtools/workben/browser.cxx
@@ -112,14 +112,14 @@ class Browser: public BrowseBox
friend class AppWindow;
DataList aRows;
- BOOL bInverse;
+ sal_Bool bInverse;
Edit* pEdit;
protected:
virtual long GetRowCount() const;
- virtual BOOL SeekRow( long nRow );
+ virtual sal_Bool SeekRow( long nRow );
virtual void PaintField( OutputDevice& rDev, const Rectangle& rRect,
- USHORT nColumnId ) const;
+ sal_uInt16 nColumnId ) const;
virtual void Select();
virtual void DoubleClick();
@@ -128,7 +128,7 @@ protected:
virtual void EndScroll();
virtual void Command( const CommandEvent &eEvt );
- virtual BOOL StartDragging( Pointer& rMovePtr,
+ virtual sal_Bool StartDragging( Pointer& rMovePtr,
Pointer& rCopyPtr );
virtual void EndDragging( const DropAction &rAction );
virtual void MouseButtonDown( const BrowserMouseEvent &rEvt );
@@ -137,7 +137,7 @@ public:
Browser( AppWindow* pParent, BrowserMode eMode );
~Browser();
- void SetInverseSelection( BOOL bInverseSel )
+ void SetInverseSelection( sal_Bool bInverseSel )
{ bInverse = bInverseSel; }
};
@@ -151,7 +151,7 @@ class AppWindow: public WorkWindow
Browser aBrowser;
BrowserMode eCurMode;
FloatingWindow *pEventView;
- ULONG nNewRowNo;
+ sal_uLong nNewRowNo;
private:
DECL_LINK( Modify, void * );
@@ -341,7 +341,7 @@ BrowserMode BrowseModeDialog::GetMode() const
Browser::Browser( AppWindow* pParent, BrowserMode eMode ):
BrowseBox( pParent, WinBits(WB_DRAG), eMode ),
- bInverse(FALSE),
+ bInverse(sal_False),
pEdit( 0 )
{
for ( long n = 0; n < 100; ++n )
@@ -369,11 +369,11 @@ Browser::~Browser()
//------------------------------------------------------------------
-BOOL Browser::StartDragging( Pointer& rMovePtr, Pointer& rCopyPtr )
+sal_Bool Browser::StartDragging( Pointer& rMovePtr, Pointer& rCopyPtr )
{
rMovePtr = Pointer( POINTER_MOVEDATA );
rCopyPtr = Pointer( POINTER_COPYDATA );
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------
@@ -469,9 +469,9 @@ void Browser::CursorMoved()
aEvent += String( ":", RTL_TEXTENCODING_IBM_850 );
aEvent += String( GetCurColumnId() );
( (AppWindow*) GetParent() )->Event( aEvent );
- if ( IsFieldVisible( GetCurRow(), GetCurColumnId(), TRUE ) )
+ if ( IsFieldVisible( GetCurRow(), GetCurColumnId(), sal_True ) )
( (AppWindow*) GetParent() )->Event( String( "completely visible", RTL_TEXTENCODING_IBM_850 ) );
- else if ( IsFieldVisible( 1, GetCurColumnId(), FALSE) )
+ else if ( IsFieldVisible( 1, GetCurColumnId(), sal_False) )
( (AppWindow*) GetParent() )->Event( String( "partly visible", RTL_TEXTENCODING_IBM_850 ) );
else
( (AppWindow*) GetParent() )->Event( String( "not visible", RTL_TEXTENCODING_IBM_850 ) );
@@ -488,20 +488,20 @@ long Browser::GetRowCount() const
//------------------------------------------------------------------
-BOOL Browser::SeekRow( long nRow )
+sal_Bool Browser::SeekRow( long nRow )
{
if ( nRow >= 0 && nRow < (long) aRows.Count() )
{
aRows.Seek(nRow);
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//------------------------------------------------------------------
void Browser::PaintField( OutputDevice& rDev, const Rectangle& rRect,
- USHORT nColumnId ) const
+ sal_uInt16 nColumnId ) const
{
rDev.SetClipRegion( rRect );
String aText( aRows.GetCurObject() );
@@ -583,7 +583,7 @@ IMPL_LINK_INLINE_START( AppWindow, Modify, void *, pCaller )
aBrowser.GoToRow( pEdit->GetText().ToInt32() );
aBrowser.GrabFocus();
- return TRUE;
+ return sal_True;
}
IMPL_LINK_INLINE_END( AppWindow, Modify, void *, pCaller )
@@ -591,7 +591,7 @@ IMPL_LINK_INLINE_END( AppWindow, Modify, void *, pCaller )
IMPL_LINK( AppWindow, MenuSelect, Menu *, pMenu )
{
- ULONG nPos;
+ sal_uLong nPos;
switch ( pMenu->GetCurItemId() )
{
@@ -726,7 +726,7 @@ IMPL_LINK( AppWindow, MenuSelect, Menu *, pMenu )
case MID_INVERSE:
{
- BOOL bChecked = pMenu->IsItemChecked( MID_INVERSE );
+ sal_Bool bChecked = pMenu->IsItemChecked( MID_INVERSE );
pMenu->CheckItem( MID_INVERSE, !bChecked );
aBrowser.SetInverseSelection( !bChecked );
break;
@@ -739,14 +739,14 @@ IMPL_LINK( AppWindow, MenuSelect, Menu *, pMenu )
case MID_STARMONEY_1:
{
nPos = aBrowser.GetCurRow();
- aBrowser.SelectRow( nPos + 1, TRUE );
+ aBrowser.SelectRow( nPos + 1, sal_True );
aBrowser.aRows.Remove( nPos );
aBrowser.RowRemoved( nPos );
break;
}
}
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------
diff --git a/svtools/workben/stest.cxx b/svtools/workben/stest.cxx
index 85b7013663da..ca6c8a757734 100644
--- a/svtools/workben/stest.cxx
+++ b/svtools/workben/stest.cxx
@@ -124,15 +124,15 @@ IMPL_LINK( SearchWindow, ClickHdl, Button *, pButton )
/* InfoBox( this, String( "T: " ) + sText +
String( "\nS: " ) + sSrch ).Execute();
*/
- BOOL bRet = FALSE;
- USHORT nStt = 0, nEnd = sText.Len();
+ sal_Bool bRet = sal_False;
+ sal_uInt16 nStt = 0, nEnd = sText.Len();
{
aParam.SetSrchStr( sSrch );
SearchText aSrchText( aParam, GetpApp()->GetAppInternational() );
bRet = aSrchText.SearchFrwrd( sText, &nStt, &nEnd );
-// BOOL SearchBkwrd( const String &rStr, USHORT* pStart, USHORT* pEnde );
+// sal_Bool SearchBkwrd( const String &rStr, sal_uInt16* pStart, sal_uInt16* pEnde );
}
String sFound( "gefunden" );
diff --git a/svtools/workben/svdem.cxx b/svtools/workben/svdem.cxx
index fd40d3d645fa..fe3afcc20ea5 100644
--- a/svtools/workben/svdem.cxx
+++ b/svtools/workben/svdem.cxx
@@ -78,7 +78,7 @@ public:
ShowBitmap( Window* pParent, const Bitmap& rBmp );
virtual void Paint( const Rectangle& );
- virtual BOOL Close();
+ virtual sal_Bool Close();
};
// -----------------------------------------------------------------------
@@ -282,11 +282,11 @@ void ShowBitmap::Paint( const Rectangle& )
// -----------------------------------------------------------------------
-BOOL ShowBitmap::Close()
+sal_Bool ShowBitmap::Close()
{
Hide();
delete this;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -352,8 +352,8 @@ MyFontDialog::MyFontDialog( Window* pParent ) :
{
pList = NULL;
- aFontBox.EnableWYSIWYG( TRUE );
- aFontBox.EnableSymbols( TRUE );
+ aFontBox.EnableWYSIWYG( sal_True );
+ aFontBox.EnableSymbols( sal_True );
aFontBox.SetPosSizePixel( Point( 10, 10 ), Size( 140, 140 ) );
aFontBox.SetSelectHdl( LINK( this, MyFontDialog, SelectFont ) );
aFontBox.SetLoseFocusHdl( LINK( this, MyFontDialog, SelectFont ) );
@@ -421,7 +421,7 @@ MyFontDialog::MyFontDialog( Window* pParent ) :
{
aColorBox.SetPosSizePixel( Point( 15, 305 ), Size( 130, 100 ) );
aColorBox.SetSelectHdl( LINK( this, MyFontDialog, AttrHdl ) );
- aColorBox.SetUpdateMode( FALSE );
+ aColorBox.SetUpdateMode( sal_False );
aColorBox.InsertEntry( Color( COL_BLACK ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Black" ) ) );
aColorBox.InsertEntry( Color( COL_BLUE ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Blue" ) ) );
aColorBox.InsertEntry( Color( COL_GREEN ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Green" ) ) );
@@ -438,7 +438,7 @@ MyFontDialog::MyFontDialog( Window* pParent ) :
aColorBox.InsertEntry( Color( COL_LIGHTMAGENTA ), XubString( RTL_CONSTASCII_USTRINGPARAM( "LightMagenta" ) ) );
aColorBox.InsertEntry( Color( COL_YELLOW ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Yellow" ) ) );
aColorBox.InsertEntry( Color( COL_WHITE ), XubString( RTL_CONSTASCII_USTRINGPARAM( "White" ) ) );
- aColorBox.SetUpdateMode( TRUE );
+ aColorBox.SetUpdateMode( sal_True );
aColorBox.Show();
}
@@ -515,7 +515,7 @@ void MyFontDialog::SetAttr()
aFont.SetShadow( aShadowBox.IsChecked() );
aFont.SetOutline( aOutlineBox.IsChecked() );
aFont.SetOrientation( aLineOrientSlider.GetOrientation() );
- aFont.SetTransparent( TRUE );
+ aFont.SetTransparent( sal_True );
aMapText.SetText( pList->GetFontMapText( aFont ) );
aShowFont.SetFont( aFont );
}
@@ -545,12 +545,12 @@ long MyTabBar::DeactivatePage()
QueryBox aQueryBox( this, WB_YES_NO | WB_DEF_YES,
XubString( RTL_CONSTASCII_USTRINGPARAM( "Deactivate" ) ) );
if ( aQueryBox.Execute() == RET_YES )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
else
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -601,8 +601,8 @@ MyCalendar::MyCalendar( Window* pParent ) :
uno::Sequence< i18n::CalendarItem> xItems = rCal.getDays();
const i18n::CalendarItem* pArr = xItems.getArray();
for ( sal_Int16 i = 0; i < nDays; i++ )
- aWeekStartMenu.InsertItem( 10+(USHORT)i, pArr[i].FullName, MIB_AUTOCHECK | MIB_RADIOCHECK );
- aWeekStartMenu.CheckItem( 10+(USHORT)rCal.getFirstDayOfWeek() );
+ aWeekStartMenu.InsertItem( 10+(sal_uInt16)i, pArr[i].FullName, MIB_AUTOCHECK | MIB_RADIOCHECK );
+ aWeekStartMenu.CheckItem( 10+(sal_uInt16)rCal.getFirstDayOfWeek() );
aWeekCountMenu.InsertItem( 20, XubString( RTL_CONSTASCII_USTRINGPARAM( "~1. Januar" ) ), MIB_AUTOCHECK | MIB_RADIOCHECK );
aWeekCountMenu.InsertItem( 21, XubString( RTL_CONSTASCII_USTRINGPARAM( "~2 days" ) ), MIB_AUTOCHECK | MIB_RADIOCHECK );
aWeekCountMenu.InsertItem( 22, XubString( RTL_CONSTASCII_USTRINGPARAM( "~3 days" ) ), MIB_AUTOCHECK | MIB_RADIOCHECK );
@@ -610,8 +610,8 @@ MyCalendar::MyCalendar( Window* pParent ) :
aWeekCountMenu.InsertItem( 24, XubString( RTL_CONSTASCII_USTRINGPARAM( "~5 days" ) ), MIB_AUTOCHECK | MIB_RADIOCHECK );
aWeekCountMenu.InsertItem( 25, XubString( RTL_CONSTASCII_USTRINGPARAM( "~6 days" ) ), MIB_AUTOCHECK | MIB_RADIOCHECK );
aWeekCountMenu.InsertItem( 26, XubString( RTL_CONSTASCII_USTRINGPARAM( "Erste ~volle Woche" ) ), MIB_AUTOCHECK | MIB_RADIOCHECK );
- //was: one of 0, 1, 2; aWeekCountMenu.CheckItem( 20+(USHORT)rIntn.GetWeekCountStart() );
- aWeekCountMenu.CheckItem( 20+(USHORT)rCal.getMinimumNumberOfDaysForFirstWeek() );
+ //was: one of 0, 1, 2; aWeekCountMenu.CheckItem( 20+(sal_uInt16)rIntn.GetWeekCountStart() );
+ aWeekCountMenu.CheckItem( 20+(sal_uInt16)rCal.getMinimumNumberOfDaysForFirstWeek() );
aMenuBar.SetSelectHdl( LINK( this, MyCalendar, MenuSelectHdl ) );
SetMenuBar( &aMenuBar );
@@ -646,7 +646,7 @@ MyCalendar::~MyCalendar()
IMPL_LINK( MyCalendar, RequestDateInfoHdl, Calendar*, EMPTYARG )
{
- USHORT nRequestYear = aCalendar.GetRequestYear();
+ sal_uInt16 nRequestYear = aCalendar.GetRequestYear();
if ( (nRequestYear >= 1954) && (nRequestYear <= 1989) )
aCalendar.AddDateInfo( Date( 17, 6, nRequestYear ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Tag der deutschen Einheit" ) ), &aHolidayColor, NULL );
else if ( nRequestYear >= 1990 )
@@ -669,7 +669,7 @@ IMPL_LINK( MyCalendar, DoubleClickHdl, Calendar*, EMPTYARG )
IMPL_LINK( MyCalendar, MenuSelectHdl, Menu*, pMenu )
{
- USHORT nItemId = pMenu->GetCurItemId();
+ sal_uInt16 nItemId = pMenu->GetCurItemId();
if ( (nItemId >= 10) && (nItemId <= 19) )
aCalendar.SetWeekStart( nItemId-10 );
@@ -750,7 +750,7 @@ MyWin::MyWin( Window* pParent, WinBits aWinStyle ) :
{
aColorList.SetPosSizePixel( Point( 10, nY ), Size( 130, 180 ) );
- aColorList.SetUpdateMode( FALSE );
+ aColorList.SetUpdateMode( sal_False );
aColorList.InsertEntry( Color( COL_BLACK ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Black" ) ) );
aColorList.InsertEntry( Color( COL_BLUE ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Blue" ) ) );
aColorList.InsertEntry( Color( COL_GREEN ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Green" ) ) );
@@ -767,7 +767,7 @@ MyWin::MyWin( Window* pParent, WinBits aWinStyle ) :
aColorList.InsertEntry( Color( COL_LIGHTMAGENTA ), XubString( RTL_CONSTASCII_USTRINGPARAM( "LightMagenta" ) ) );
aColorList.InsertEntry( Color( COL_YELLOW ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Yellow" ) ) );
aColorList.InsertEntry( Color( COL_WHITE ), XubString( RTL_CONSTASCII_USTRINGPARAM( "White" ) ) );
- aColorList.SetUpdateMode( TRUE );
+ aColorList.SetUpdateMode( sal_True );
aColorList.SetSelectHdl( LINK( this, MyWin, SelectHdl ) );
aColorList.Show();
}
@@ -818,7 +818,7 @@ MyWin::MyWin( Window* pParent, WinBits aWinStyle ) :
}
{
- aCalendarField.EnableEmptyFieldValue( TRUE );
+ aCalendarField.EnableEmptyFieldValue( sal_True );
aCalendarField.SetCalendarStyle( aCalendarField.GetCalendarStyle() | WB_RANGESELECT );
aCalendarField.SetSelectHdl( LINK( this, MyWin, CalSelectHdl ) );
// aCalendarField.SetDate( Date() );
@@ -968,7 +968,7 @@ IMPL_LINK( MyWin, SelectHdl, Window*, pCtrl )
}
else if ( pCtrl == &aValueSet )
{
- USHORT nId = aValueSet.GetSelectItemId();
+ sal_uInt16 nId = aValueSet.GetSelectItemId();
if ( nId > 8 )
{
Color aColor = aValueSet.GetItemColor( nId );
@@ -977,10 +977,10 @@ IMPL_LINK( MyWin, SelectHdl, Window*, pCtrl )
}
else if ( pCtrl == &aHeadBar )
{
- USHORT nCurItemId = aHeadBar.GetCurItemId();
- for ( USHORT i = 0; i < aHeadBar.GetItemCount(); i++ )
+ sal_uInt16 nCurItemId = aHeadBar.GetCurItemId();
+ for ( sal_uInt16 i = 0; i < aHeadBar.GetItemCount(); i++ )
{
- USHORT nItemId = aHeadBar.GetItemId( i );
+ sal_uInt16 nItemId = aHeadBar.GetItemId( i );
HeaderBarItemBits nBits = aHeadBar.GetItemBits( nItemId );
if ( nItemId == nCurItemId )
{
@@ -1072,9 +1072,9 @@ void MyWin::KeyInput( const KeyEvent& rKEvt )
{
if ( rKEvt.GetKeyCode().GetCode() == KEY_P )
{
- for ( USHORT i = 0; i <= 130; i += 2 )
+ for ( sal_uInt16 i = 0; i <= 130; i += 2 )
{
- for ( USHORT j = 0; j < 6000; j++ )
+ for ( sal_uInt16 j = 0; j < 6000; j++ )
{
aPrgsBar.SetValue( i );
Application::Reschedule();
diff --git a/svtools/workben/toolpanel/toolpaneltest.cxx b/svtools/workben/toolpanel/toolpaneltest.cxx
index 6542fe826587..d7656b105fc9 100755
--- a/svtools/workben/toolpanel/toolpaneltest.cxx
+++ b/svtools/workben/toolpanel/toolpaneltest.cxx
@@ -605,13 +605,13 @@ void OptionsWindow::Resize()
//-----------------------------------------------------------------------------
void OptionsWindow::PanelInserted( const PToolPanel& i_pPanel, const size_t i_nPosition )
{
- m_aPanelList.InsertEntry( i_pPanel->GetDisplayName(), i_pPanel->GetImage(), USHORT( i_nPosition ) );
+ m_aPanelList.InsertEntry( i_pPanel->GetDisplayName(), i_pPanel->GetImage(), sal_uInt16( i_nPosition ) );
}
//-----------------------------------------------------------------------------
void OptionsWindow::PanelRemoved( const size_t i_nPosition )
{
- m_aPanelList.RemoveEntry( USHORT( i_nPosition ) );
+ m_aPanelList.RemoveEntry( sal_uInt16( i_nPosition ) );
impl_updateRemoveButton();
}
@@ -623,7 +623,7 @@ void OptionsWindow::ActivePanelChanged( const ::boost::optional< size_t >& i_rOl
if ( !i_rNewActive )
m_aPanelList.SetNoSelection();
else
- m_aPanelList.SelectEntryPos( USHORT( *i_rNewActive ) );
+ m_aPanelList.SelectEntryPos( sal_uInt16( *i_rNewActive ) );
}
//-----------------------------------------------------------------------------
diff --git a/svtools/workben/urange.cxx b/svtools/workben/urange.cxx
index aa5eba3d5543..089724966f48 100644
--- a/svtools/workben/urange.cxx
+++ b/svtools/workben/urange.cxx
@@ -34,7 +34,7 @@
#include <sfxitems.hxx>
#endif
-USHORT nValues1[] = {340,472,482,4288,4374,4890,5026,5356,5724,6130,6186,6666,9222,9764,9908,
+sal_uInt16 nValues1[] = {340,472,482,4288,4374,4890,5026,5356,5724,6130,6186,6666,9222,9764,9908,
10110,11302,11748,11946,12298,12344,12642,12958,13076,13410,13496,14462,
14480,14592,16292,16788,17102,17792,17844,18182,18396,18522,18974,19292,
19630,20336,21808,21972,22382,23568,25156,26978,27158,27730,28014,28280,
@@ -44,7 +44,7 @@ USHORT nValues1[] = {340,472,482,4288,4374,4890,5026,5356,5724,6130,6186,6666,92
57045,59243,59833,59859,59951,60361,61387,62453,62703,63155,63517,63621,
63895,0};
-USHORT nValues2[] = {2362,3100,3286,3548,4056,4224,5058,5198,5398,5990,6910,7034,7046,8574,8762,
+sal_uInt16 nValues2[] = {2362,3100,3286,3548,4056,4224,5058,5198,5398,5990,6910,7034,7046,8574,8762,
9360,9494,9720,11432,12900,12946,13626,13844,14344,15028,16306,16494,16972,
17340,17504,17610,18270,18506,19832,19962,20356,20792,21146,21270,21722,
22486,22752,23554,24148,24210,24910,25006,25500,26464,26952,27216,28394,
@@ -70,8 +70,8 @@ static String MakeString_Impl( SfxUShortRanges& aRanges )
{
String aStr;
- USHORT nPos = 0;
- const USHORT* pRanges = ( const USHORT*)aRanges;
+ sal_uInt16 nPos = 0;
+ const sal_uInt16* pRanges = ( const sal_uInt16*)aRanges;
while( pRanges[ nPos ] != 0 )
{
diff --git a/toolkit/AllLangResTarget_tk.mk b/toolkit/AllLangResTarget_tk.mk
index 784063934112..e127bef851c6 100644
--- a/toolkit/AllLangResTarget_tk.mk
+++ b/toolkit/AllLangResTarget_tk.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2009 by Sun Microsystems, Inc.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -14,12 +14,12 @@
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
+# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
diff --git a/comphelper/source/container/makefile.mk b/toolkit/JunitTest_toolkit_unoapi.mk
index 97a066f9802a..27dc89e13478 100644..100755
--- a/comphelper/source/container/makefile.mk
+++ b/toolkit/JunitTest_toolkit_unoapi.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -25,31 +25,29 @@
#
#*************************************************************************
-PRJ=..$/..
-PRJINC=..$/..$/inc
-PRJNAME=comphelper
-TARGET=container
+$(eval $(call gb_JunitTest_JunitTest,toolkit_unoapi))
-ENABLE_EXCEPTIONS=TRUE
+$(eval $(call gb_JunitTest_set_defs,toolkit_unoapi,\
+ $$(DEFS) \
+ -Dorg.openoffice.test.arg.sce=$(SRCDIR)/toolkit/qa/unoapi/toolkit.sce \
+ -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/toolkit/qa/unoapi/knownissues.xcl \
+ -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/toolkit/qa/unoapi/testdocuments \
+))
-# --- Settings ----------------------------------
+$(eval $(call gb_JunitTest_add_jars,toolkit_unoapi,\
+ $(OUTDIR)/bin/OOoRunner.jar \
+ $(OUTDIR)/bin/ridl.jar \
+ $(OUTDIR)/bin/test.jar \
+ $(OUTDIR)/bin/unoil.jar \
+ $(OUTDIR)/bin/jurt.jar \
+))
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
+$(eval $(call gb_JunitTest_add_sourcefiles,toolkit_unoapi,\
+ toolkit/qa/unoapi/Test \
+))
-# --- Files -------------------------------------
-
-SLOFILES=\
- $(SLO)$/namecontainer.obj \
- $(SLO)$/enumhelper.obj \
- $(SLO)$/container.obj \
- $(SLO)$/containermultiplexer.obj \
- $(SLO)$/IndexedPropertyValuesContainer.obj \
- $(SLO)$/embeddedobjectcontainer.obj \
- $(SLO)$/NamedPropertyValuesContainer.obj \
- $(SLO)$/enumerablemap.obj
-
-# --- Targets ----------------------------------
-
-.INCLUDE : target.mk
+$(eval $(call gb_JunitTest_add_classes,toolkit_unoapi,\
+ org.openoffice.toolkit.qa.unoapi.Test \
+))
+# vim: set noet sw=4 ts=4:
diff --git a/toolkit/Library_tk.mk b/toolkit/Library_tk.mk
index ab51c1e282bb..caf1c045be03 100644
--- a/toolkit/Library_tk.mk
+++ b/toolkit/Library_tk.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2009 by Sun Microsystems, Inc.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -14,12 +14,12 @@
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
+# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
@@ -35,11 +35,9 @@ $(eval $(call gb_Library_add_package_headers,tk,toolkit_inc))
$(eval $(call gb_Library_set_include,tk,\
$$(INCLUDE) \
- -I$(WORKDIR)/inc/toolkit/ \
-I$(SRCDIR)/toolkit/inc \
-I$(SRCDIR)/toolkit/inc/pch \
-I$(SRCDIR)/toolkit/source \
- -I$(OUTDIR)/inc/toolkit \
-I$(OUTDIR)/inc/offuh \
))
@@ -57,6 +55,7 @@ $(eval $(call gb_Library_add_linked_libs,tk,\
tl \
utl \
vcl \
+ $(gb_STDLIBS) \
))
$(eval $(call gb_Library_add_exception_objects,tk,\
@@ -82,6 +81,8 @@ $(eval $(call gb_Library_add_exception_objects,tk,\
toolkit/source/awt/vclxsystemdependentwindow \
toolkit/source/awt/vclxtabcontrol \
toolkit/source/awt/vclxtabpage \
+ toolkit/source/awt/vclxtabpagecontainer \
+ toolkit/source/awt/animatedimagespeer \
toolkit/source/awt/vclxtoolkit \
toolkit/source/awt/vclxtopwindow \
toolkit/source/awt/vclxwindow \
@@ -90,6 +91,7 @@ $(eval $(call gb_Library_add_exception_objects,tk,\
toolkit/source/awt/xsimpleanimation \
toolkit/source/awt/xthrobber \
toolkit/source/controls/accessiblecontrolcontext \
+ toolkit/source/controls/controlmodelcontainerbase \
toolkit/source/controls/dialogcontrol \
toolkit/source/controls/eventcontainer \
toolkit/source/controls/formattedcontrol \
@@ -97,15 +99,21 @@ $(eval $(call gb_Library_add_exception_objects,tk,\
toolkit/source/controls/grid/defaultgridcolumnmodel \
toolkit/source/controls/grid/defaultgriddatamodel \
toolkit/source/controls/grid/gridcolumn \
+ toolkit/source/controls/grid/grideventforwarder \
+ toolkit/source/controls/grid/sortablegriddatamodel \
toolkit/source/controls/grid/gridcontrol \
toolkit/source/controls/roadmapcontrol \
toolkit/source/controls/roadmapentry \
+ toolkit/source/controls/tabpagecontainer \
+ toolkit/source/controls/tabpagemodel \
toolkit/source/controls/stdtabcontroller \
toolkit/source/controls/stdtabcontrollermodel \
toolkit/source/controls/tkscrollbar \
toolkit/source/controls/tksimpleanimation \
toolkit/source/controls/tkspinbutton \
toolkit/source/controls/tkthrobber \
+ toolkit/source/controls/animatedimages \
+ toolkit/source/controls/spinningprogress \
toolkit/source/controls/tree/treecontrol \
toolkit/source/controls/tree/treedatamodel \
toolkit/source/controls/unocontrol \
@@ -123,7 +131,6 @@ $(eval $(call gb_Library_add_exception_objects,tk,\
toolkit/source/helper/property \
toolkit/source/helper/registerservices \
toolkit/source/helper/servicenames \
- toolkit/source/helper/throbberimpl \
toolkit/source/helper/tkresmgr \
toolkit/source/helper/unomemorystream \
toolkit/source/helper/unopropertyarrayhelper \
@@ -160,29 +167,7 @@ endif
ifeq ($(OS),LINUX)
$(eval $(call gb_Library_add_linked_libs,tk,\
X11 \
- dl \
- m \
- pthread \
))
endif
-ifeq ($(OS),WNT)
-ifneq ($(USE_MINGW),)
-$(eval $(call gb_Library_add_linked_libs,tk,\
- mingwthrd \
- $(gb_MINGW_LIBSTDCPP) \
- mingw32 \
- $(gb_MINGW_LIBGCC) \
- uwinapi \
- mingwex \
- kernel32 \
- msvcrt \
-))
-else
-$(eval $(call gb_Library_add_linked_libs,tk,\
- kernel32 \
- msvcrt \
- uwinapi \
-))
-endif
-endif
+
# vim: set noet sw=4 ts=4:
diff --git a/toolkit/Module_toolkit.mk b/toolkit/Module_toolkit.mk
index 666fd44a6db3..858aecd1c13d 100644
--- a/toolkit/Module_toolkit.mk
+++ b/toolkit/Module_toolkit.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2009 by Sun Microsystems, Inc.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -14,12 +14,12 @@
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
+# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
@@ -35,4 +35,8 @@ $(eval $(call gb_Module_add_targets,toolkit,\
Package_util \
))
+$(eval $(call gb_Module_add_subsequentcheck_targets,toolkit,\
+ JunitTest_toolkit_unoapi \
+))
+
# vim: set noet sw=4 ts=4:
diff --git a/toolkit/Package_inc.mk b/toolkit/Package_inc.mk
index 3fc23a5b9f1f..88832533490c 100644
--- a/toolkit/Package_inc.mk
+++ b/toolkit/Package_inc.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2009 by Sun Microsystems, Inc.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -14,12 +14,12 @@
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
+# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
@@ -59,7 +59,6 @@ $(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/mutexhelper.hxx
$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/property.hxx,toolkit/helper/property.hxx))
$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/servicenames.hxx,toolkit/helper/servicenames.hxx))
$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/solarrelease.hxx,toolkit/helper/solarrelease.hxx))
-$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/throbberimpl.hxx,toolkit/helper/throbberimpl.hxx))
$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/tkresmgr.hxx,toolkit/helper/tkresmgr.hxx))
$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/unomemorystream.hxx,toolkit/helper/unomemorystream.hxx))
$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/unopropertyarrayhelper.hxx,toolkit/helper/unopropertyarrayhelper.hxx))
diff --git a/toolkit/Package_source.mk b/toolkit/Package_source.mk
index 41f46138df2b..6dd69fda6098 100644
--- a/toolkit/Package_source.mk
+++ b/toolkit/Package_source.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2009 by Sun Microsystems, Inc.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -14,12 +14,12 @@
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
+# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
diff --git a/toolkit/Package_util.mk b/toolkit/Package_util.mk
index 990248eb142d..b8580d0205c8 100644
--- a/toolkit/Package_util.mk
+++ b/toolkit/Package_util.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2009 by Sun Microsystems, Inc.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -14,12 +14,12 @@
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
+# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
diff --git a/toolkit/inc/layout/layout.hxx b/toolkit/inc/layout/layout.hxx
index b4b219b850e2..c434347b38e2 100644
--- a/toolkit/inc/layout/layout.hxx
+++ b/toolkit/inc/layout/layout.hxx
@@ -795,7 +795,7 @@ public:
operator String();
String getString ();
rtl::OUString getOUString ();
- String GetToken (USHORT i, sal_Char c);
+ String GetToken (sal_uInt16 i, sal_Char c);
};
class InPlugImpl;
diff --git a/toolkit/inc/toolkit/awt/animatedimagespeer.hxx b/toolkit/inc/toolkit/awt/animatedimagespeer.hxx
new file mode 100755
index 000000000000..b9bdecdf0e47
--- /dev/null
+++ b/toolkit/inc/toolkit/awt/animatedimagespeer.hxx
@@ -0,0 +1,106 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef TOOLKIT_ANIMATEDIMAGEPEER_HXX
+#define TOOLKIT_ANIMATEDIMAGEPEER_HXX
+
+#include "toolkit/awt/vclxwindow.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/awt/XAnimation.hpp>
+#include <com/sun/star/util/XModifyListener.hpp>
+/** === end UNO includes === **/
+
+#include <cppuhelper/implbase3.hxx>
+
+#include <boost/scoped_ptr.hpp>
+#include <boost/noncopyable.hpp>
+
+//......................................................................................................................
+namespace toolkit
+{
+//......................................................................................................................
+
+ //==================================================================================================================
+ //= AnimatedImagesPeer
+ //==================================================================================================================
+ struct AnimatedImagesPeer_Data;
+ typedef ::cppu::ImplInheritanceHelper3 < VCLXWindow
+ , ::com::sun::star::awt::XAnimation
+ , ::com::sun::star::container::XContainerListener
+ , ::com::sun::star::util::XModifyListener
+ > AnimatedImagesPeer_Base;
+
+ class AnimatedImagesPeer :public AnimatedImagesPeer_Base
+ ,public ::boost::noncopyable
+ {
+ public:
+ AnimatedImagesPeer();
+
+ protected:
+ ~AnimatedImagesPeer();
+
+ public:
+ // XAnimation
+ virtual void SAL_CALL startAnimation( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL stopAnimation( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL isAnimationRunning( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // VclWindowPeer
+ virtual void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XContainerListener
+ virtual void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& i_event ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XModifyListener
+ virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& i_event ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XComponent
+ void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
+
+ protected:
+ void ProcessWindowEvent( const VclWindowEvent& i_windowEvent );
+
+ private:
+ /** updates our images with the ones from the givem XAnimatedImages component
+ */
+ void impl_updateImages_nolck( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& i_animatedImages );
+
+ private:
+ ::boost::scoped_ptr< AnimatedImagesPeer_Data > m_pData;
+ };
+
+//......................................................................................................................
+} // namespace toolkit
+//......................................................................................................................
+
+#endif // TOOLKIT_ANIMATEDIMAGEPEER_HXX
diff --git a/toolkit/inc/toolkit/awt/vclxaccessiblecomponent.hxx b/toolkit/inc/toolkit/awt/vclxaccessiblecomponent.hxx
index 12e7b10d8330..2c3744a2eefe 100644
--- a/toolkit/inc/toolkit/awt/vclxaccessiblecomponent.hxx
+++ b/toolkit/inc/toolkit/awt/vclxaccessiblecomponent.hxx
@@ -74,8 +74,8 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow> mxWindow;
VCLXWindow* mpVCLXindow;
- ULONG nDummy1;
- ULONG nDummy2;
+ sal_uLong nDummy1;
+ sal_uLong nDummy2;
void* pDummy1;
VCLExternalSolarLock* m_pSolarLock;
diff --git a/toolkit/inc/toolkit/awt/vclxcontainer.hxx b/toolkit/inc/toolkit/awt/vclxcontainer.hxx
index b854844ae7f1..dbf8c62f4580 100644
--- a/toolkit/inc/toolkit/awt/vclxcontainer.hxx
+++ b/toolkit/inc/toolkit/awt/vclxcontainer.hxx
@@ -42,7 +42,7 @@
// class VCLXContainer
// ----------------------------------------------------
-class VCLXContainer : public ::com::sun::star::awt::XVclContainer,
+class TOOLKIT_DLLPUBLIC VCLXContainer : public ::com::sun::star::awt::XVclContainer,
public ::com::sun::star::awt::XVclContainerPeer,
public VCLXWindow
{
diff --git a/toolkit/inc/toolkit/awt/vclxdevice.hxx b/toolkit/inc/toolkit/awt/vclxdevice.hxx
index bb1c35078055..ca0b20a3f4bc 100644
--- a/toolkit/inc/toolkit/awt/vclxdevice.hxx
+++ b/toolkit/inc/toolkit/awt/vclxdevice.hxx
@@ -45,7 +45,7 @@ class VirtualDevice;
// class VCLXDevice
// ----------------------------------------------------
-// For using nDummy, no incompatible update, add a BOOL bCreatedWithToolkitMember later...
+// For using nDummy, no incompatible update, add a sal_Bool bCreatedWithToolkitMember later...
#define FLAGS_CREATEDWITHTOOLKIT 0x00000001
class TOOLKIT_DLLPUBLIC VCLXDevice : public ::com::sun::star::awt::XDevice,
diff --git a/toolkit/inc/toolkit/awt/vclxfont.hxx b/toolkit/inc/toolkit/awt/vclxfont.hxx
index e912f2d13114..352dae82c853 100644
--- a/toolkit/inc/toolkit/awt/vclxfont.hxx
+++ b/toolkit/inc/toolkit/awt/vclxfont.hxx
@@ -53,7 +53,7 @@ private:
FontMetric* mpFontMetric;
protected:
- BOOL ImplAssertValidFontMetric();
+ sal_Bool ImplAssertValidFontMetric();
::osl::Mutex& GetMutex() { return maMutex; }
public:
diff --git a/toolkit/inc/toolkit/awt/vclxmenu.hxx b/toolkit/inc/toolkit/awt/vclxmenu.hxx
index c675ad1d4bd9..7eee1bfea7c4 100644
--- a/toolkit/inc/toolkit/awt/vclxmenu.hxx
+++ b/toolkit/inc/toolkit/awt/vclxmenu.hxx
@@ -70,7 +70,7 @@ protected:
DECL_LINK( MenuEventListener, VclSimpleEvent* );
- void ImplCreateMenu( BOOL bPopup );
+ void ImplCreateMenu( sal_Bool bPopup );
public:
VCLXMenu();
@@ -79,7 +79,7 @@ public:
Menu* GetMenu() const { return mpMenu; }
- BOOL IsPopupMenu() const;
+ sal_Bool IsPopupMenu() const;
// ::com::sun::star::uno::XInterface
::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
diff --git a/toolkit/inc/toolkit/awt/vclxtabpagecontainer.hxx b/toolkit/inc/toolkit/awt/vclxtabpagecontainer.hxx
new file mode 100644
index 000000000000..d4fe2a727b43
--- /dev/null
+++ b/toolkit/inc/toolkit/awt/vclxtabpagecontainer.hxx
@@ -0,0 +1,90 @@
+// ----------------------------------------------------
+// class VCLXDialog
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _TOOLKIT_AWT_VCLXTABPAGECONTAINER_HXX_
+#define _TOOLKIT_AWT_VCLXTABPAGECONTAINER_HXX_
+
+#include <toolkit/dllapi.h>
+#include <com/sun/star/beans/PropertyValues.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/beans/PropertyState.hpp>
+#include <com/sun/star/beans/XPropertySetInfo.hpp>
+#include <com/sun/star/container/XContainerListener.hpp>
+#include "toolkit/awt/vclxwindow.hxx"
+//#include <com/sun/star/awt/tab/XTabPageModel.hpp>
+#include <com/sun/star/awt/tab/XTabPageContainer.hpp>
+#include <toolkit/helper/listenermultiplexer.hxx>
+#include <cppuhelper/implbase2.hxx>
+#include <toolkit/awt/vclxcontainer.hxx>
+
+// ----------------------------------------------------
+typedef ::cppu::ImplInheritanceHelper2 < VCLXContainer
+ , ::com::sun::star::awt::tab::XTabPageContainer
+ , ::com::sun::star::container::XContainerListener
+ > VCLXTabPageContainer_Base;
+class VCLXTabPageContainer : public VCLXTabPageContainer_Base
+{
+public:
+ VCLXTabPageContainer();
+ ~VCLXTabPageContainer();
+
+ // ::com::sun::star::awt::XView
+ void SAL_CALL draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XDevice,
+ ::com::sun::star::awt::DeviceInfo SAL_CALL getInfo() throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::grid::XTabPageContainer
+ virtual ::sal_Int16 SAL_CALL getActiveTabPageID() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setActiveTabPageID( ::sal_Int16 _activetabpageid ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getTabPageCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL isTabPageActive( ::sal_Int16 tabPageIndex ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPage > SAL_CALL getTabPage( ::sal_Int16 tabPageIndex ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPage > SAL_CALL getTabPageByID( ::sal_Int16 tabPageID ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addTabPageListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeTabPageListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (::com::sun::star::uno::RuntimeException);
+
+ static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds );
+ virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); }
+
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XVclWindowPeer
+ void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException);
+protected:
+ virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent );
+private:
+ sal_Int16 m_nActiveTabPageId;
+ TabPageListenerMultiplexer m_aTabPageListeners;
+ ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPage > > m_aTabPages;
+};
+#endif // _TOOLKIT_AWT_VCLXTABPAGEMODEL_HXX_
diff --git a/toolkit/inc/toolkit/awt/vclxtabpagemodel.hxx b/toolkit/inc/toolkit/awt/vclxtabpagemodel.hxx
new file mode 100644
index 000000000000..670ed25c0f2d
--- /dev/null
+++ b/toolkit/inc/toolkit/awt/vclxtabpagemodel.hxx
@@ -0,0 +1,82 @@
+// ----------------------------------------------------
+// class VCLXDialog
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _TOOLKIT_AWT_VCLXTABPAGEMODEL_HXX_
+#define _TOOLKIT_AWT_VCLXTABPAGEMODEL_HXX_
+
+#include <toolkit/dllapi.h>
+#include <com/sun/star/beans/PropertyValues.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/beans/PropertyState.hpp>
+#include <com/sun/star/beans/XPropertySetInfo.hpp>
+#include "toolkit/awt/vclxwindow.hxx"
+#include <toolkit/controls/unocontrolmodel.hxx>
+#include <com/sun/star/awt/tab/XTabPageModel.hpp>
+#include <com/sun/star/awt/tab/XTabPage.hpp>
+#include "forward.hxx"
+#include <cppuhelper/implbase1.hxx>
+// ----------------------------------------------------
+typedef ::cppu::AggImplInheritanceHelper1 < UnoControlModel,
+ ::com::sun::star::awt::tab::XTabPageModel
+ > VCLXTabPageModel_Base;
+class VCLXTabPageModel : public VCLXTabPageModel_Base
+{
+public:
+ VCLXTabPageModel();
+ VCLXTabPageModel( const VCLXTabPageModel& rModel ) : VCLXTabPageModel_Base( rModel ) {;}
+ ~VCLXTabPageModel();
+
+ // ::com::sun::star::awt::XView
+ void SAL_CALL draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XDevice,
+ ::com::sun::star::awt::DeviceInfo SAL_CALL getInfo() throw(::com::sun::star::uno::RuntimeException);
+
+ // virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); }
+ UnoControlModel* Clone() const { return new VCLXTabPageModel( *this ); }
+
+ // ::com::sun::star::beans::XMultiPropertySet
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ // ::com::sun::star::awt::XVclWindowPeer
+ void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::tab::XTabPageModel
+ virtual ::sal_Int16 SAL_CALL getTabPageID() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getEnabled() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setEnabled( ::sal_Bool _enabled ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getTitle() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setTitle( const ::rtl::OUString& _title ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getImageURL() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setImageURL( const ::rtl::OUString& _imageurl ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getTooltip() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setTooltip( const ::rtl::OUString& _tooltip ) throw (::com::sun::star::uno::RuntimeException);
+protected:
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+};
+#endif // _TOOLKIT_AWT_VCLXTABPAGEMODEL_HXX_
diff --git a/toolkit/inc/toolkit/awt/vclxtopwindow.hxx b/toolkit/inc/toolkit/awt/vclxtopwindow.hxx
index d8e467b01499..d3b130cc8202 100644
--- a/toolkit/inc/toolkit/awt/vclxtopwindow.hxx
+++ b/toolkit/inc/toolkit/awt/vclxtopwindow.hxx
@@ -91,7 +91,7 @@ public:
// class VCLXTopWindow
// ----------------------------------------------------
-class VCLXTopWindow: public VCLXTopWindow_Base,
+class TOOLKIT_DLLPUBLIC VCLXTopWindow: public VCLXTopWindow_Base,
public VCLXContainer
{
protected:
diff --git a/toolkit/inc/toolkit/awt/vclxwindow.hxx b/toolkit/inc/toolkit/awt/vclxwindow.hxx
index 565691b97f09..81419fcafa0f 100644
--- a/toolkit/inc/toolkit/awt/vclxwindow.hxx
+++ b/toolkit/inc/toolkit/awt/vclxwindow.hxx
@@ -100,7 +100,7 @@ protected:
CreateAccessibleContext();
void SetSynthesizingVCLEvent( sal_Bool b );
- BOOL IsSynthesizingVCLEvent() const;
+ sal_Bool IsSynthesizingVCLEvent() const;
void SetSystemParent_Impl( const com::sun::star::uno::Any& rHandle );
diff --git a/toolkit/inc/toolkit/awt/vclxwindows.hxx b/toolkit/inc/toolkit/awt/vclxwindows.hxx
index 36ac2fa51337..8dcf05c9f8db 100644
--- a/toolkit/inc/toolkit/awt/vclxwindows.hxx
+++ b/toolkit/inc/toolkit/awt/vclxwindows.hxx
@@ -121,7 +121,7 @@ private:
Image maImage;
protected:
- BitmapEx GetBitmap() const { return maImage.GetBitmapEx(); }
+ const Image& GetImage() const { return maImage; }
protected:
// ::com::sun::star::awt::XWindow
@@ -292,7 +292,7 @@ private:
::rtl::OUString maActionCommand;
protected:
- void ImplClickedOrToggled( BOOL bToggled );
+ void ImplClickedOrToggled( sal_Bool bToggled );
void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent );
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > CreateAccessibleContext();
@@ -377,7 +377,7 @@ public:
// ----------------------------------------------------
// class VCLXDialog
// ----------------------------------------------------
-class VCLXDialog : public ::com::sun::star::awt::XDialog2,
+class TOOLKIT_DLLPUBLIC VCLXDialog : public ::com::sun::star::awt::XDialog2,
public VCLXTopWindow
{
public:
diff --git a/toolkit/inc/toolkit/awt/xsimpleanimation.hxx b/toolkit/inc/toolkit/awt/xsimpleanimation.hxx
index dc8fbe4506ed..9e6043b7d9ef 100644
--- a/toolkit/inc/toolkit/awt/xsimpleanimation.hxx
+++ b/toolkit/inc/toolkit/awt/xsimpleanimation.hxx
@@ -33,40 +33,28 @@
#include <comphelper/uno3.hxx>
#include <com/sun/star/awt/XSimpleAnimation.hpp>
+#include <boost/scoped_ptr.hpp>
+
//........................................................................
namespace toolkit
{
- class Throbber_Impl;
//........................................................................
//====================================================================
//= XSimpleAnimation
//====================================================================
- typedef ::cppu::ImplHelper1 < ::com::sun::star::awt::XSimpleAnimation
- > XSimpleAnimation_Base;
+ typedef ::cppu::ImplInheritanceHelper1 < VCLXWindow
+ , ::com::sun::star::awt::XSimpleAnimation
+ > XSimpleAnimation_Base;
- class XSimpleAnimation :public VCLXWindow
- ,public XSimpleAnimation_Base
+ class XSimpleAnimation : public XSimpleAnimation_Base
{
- private:
- //::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > > maImageList;
- sal_Bool mbRepeat;
- sal_Int32 mnStepTime;
-
- Throbber_Impl *mpThrobber;
-
public:
XSimpleAnimation();
protected:
~XSimpleAnimation();
- // XInterface
- DECLARE_XINTERFACE()
-
- // XTypeProvider
- DECLARE_XTYPEPROVIDER()
-
// XSimpleAnimation
virtual void SAL_CALL start() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL stop() throw (::com::sun::star::uno::RuntimeException);
@@ -76,9 +64,6 @@ namespace toolkit
virtual void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException);
- // VCLXWindow
- void ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent );
-
private:
XSimpleAnimation( const XSimpleAnimation& ); // never implemented
XSimpleAnimation& operator=( const XSimpleAnimation& ); // never implemented
diff --git a/toolkit/inc/toolkit/awt/xthrobber.hxx b/toolkit/inc/toolkit/awt/xthrobber.hxx
index 511f3f76ecf6..67015e049a48 100644
--- a/toolkit/inc/toolkit/awt/xthrobber.hxx
+++ b/toolkit/inc/toolkit/awt/xthrobber.hxx
@@ -33,23 +33,25 @@
#include <comphelper/uno3.hxx>
#include <com/sun/star/awt/XThrobber.hpp>
+#include <boost/scoped_ptr.hpp>
+#include <boost/noncopyable.hpp>
+
//........................................................................
namespace toolkit
{
//........................................................................
- class Throbber_Impl;
//====================================================================
//= XThrobber
//====================================================================
- typedef ::cppu::ImplHelper1 < ::com::sun::star::awt::XThrobber
- > XThrobber_Base;
+ typedef ::cppu::ImplInheritanceHelper1 < VCLXWindow
+ , ::com::sun::star::awt::XThrobber
+ > XThrobber_Base;
- class XThrobber :public VCLXWindow
- ,public XThrobber_Base
+ class XThrobber :public XThrobber_Base
+ ,public ::boost::noncopyable
{
private:
- Throbber_Impl *mpThrobber;
void SAL_CALL InitImageList() throw(::com::sun::star::uno::RuntimeException);
public:
@@ -58,22 +60,12 @@ namespace toolkit
protected:
~XThrobber();
- // XInterface
- DECLARE_XINTERFACE()
-
- // XTypeProvider
- DECLARE_XTYPEPROVIDER()
-
// XThrobber
virtual void SAL_CALL start() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL stop() throw (::com::sun::star::uno::RuntimeException);
- // VclWindowPeer
- virtual void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException);
-
// VCLXWindow
- void ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent );
+ virtual void SetWindow( Window* pWindow );
private:
XThrobber( const XThrobber& ); // never implemented
diff --git a/toolkit/inc/toolkit/controls/animatedimages.hxx b/toolkit/inc/toolkit/controls/animatedimages.hxx
new file mode 100755
index 000000000000..c19ed5e5451c
--- /dev/null
+++ b/toolkit/inc/toolkit/controls/animatedimages.hxx
@@ -0,0 +1,144 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef TOOLKIT_ANIMATEDIMAGES_HXX
+#define TOOLKIT_ANIMATEDIMAGES_HXX
+
+#include "toolkit/controls/unocontrolbase.hxx"
+#include "toolkit/controls/unocontrolmodel.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/awt/XAnimation.hpp>
+#include <com/sun/star/awt/XAnimatedImages.hpp>
+#include <com/sun/star/container/XContainerListener.hpp>
+/** === end UNO includes === **/
+
+#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/implbase2.hxx>
+
+#include <boost/scoped_ptr.hpp>
+
+//......................................................................................................................
+namespace toolkit
+{
+//......................................................................................................................
+
+ //==================================================================================================================
+ //=
+ //==================================================================================================================
+ typedef ::cppu::AggImplInheritanceHelper2 < UnoControlBase
+ , ::com::sun::star::awt::XAnimation
+ , ::com::sun::star::container::XContainerListener
+ > AnimatedImagesControl_Base;
+
+ class AnimatedImagesControl : public AnimatedImagesControl_Base
+ {
+ public:
+ AnimatedImagesControl( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > const & i_factory );
+ ::rtl::OUString GetComponentServiceName();
+
+ // XAnimation
+ virtual void SAL_CALL startAnimation( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL stopAnimation( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL isAnimationRunning( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
+
+ // XControl
+ sal_Bool SAL_CALL setModel( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& i_rModel ) throw ( ::com::sun::star::uno::RuntimeException );
+ void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& i_toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& i_parentPeer ) throw(::com::sun::star::uno::RuntimeException);
+
+
+ // XContainerListener
+ virtual void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& i_event ) throw (::com::sun::star::uno::RuntimeException);
+ };
+
+ //==================================================================================================================
+ //= AnimatedImagesControlModel
+ //==================================================================================================================
+ struct AnimatedImagesControlModel_Data;
+ typedef ::cppu::AggImplInheritanceHelper1 < UnoControlModel
+ , ::com::sun::star::awt::XAnimatedImages
+ > AnimatedImagesControlModel_Base;
+ class AnimatedImagesControlModel : public AnimatedImagesControlModel_Base
+ {
+ public:
+ AnimatedImagesControlModel( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > const & i_factory );
+ AnimatedImagesControlModel( const AnimatedImagesControlModel& i_copySource );
+
+ virtual UnoControlModel* Clone() const;
+
+ // XPropertySet
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XPersistObject
+ ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
+
+ // XAnimatedImages
+ virtual ::sal_Int32 SAL_CALL getStepTime() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setStepTime( ::sal_Int32 _steptime ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getAutoRepeat() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setAutoRepeat( ::sal_Bool _autorepeat ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int16 SAL_CALL getScaleMode() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setScaleMode( ::sal_Int16 _scalemode ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getImageSetCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getImageSet( ::sal_Int32 i_index ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL insertImageSet( ::sal_Int32 i_index, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& i_imageURLs ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL replaceImageSet( ::sal_Int32 i_index, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& i_imageURLs ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeImageSet( ::sal_Int32 i_index ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ // XAnimatedImages::XContainer
+ virtual void SAL_CALL addContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& i_listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& i_listener ) throw (::com::sun::star::uno::RuntimeException);
+
+ protected:
+ ~AnimatedImagesControlModel();
+
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+ void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception);
+
+ private:
+ ::boost::scoped_ptr< AnimatedImagesControlModel_Data >
+ m_pData;
+ };
+
+//......................................................................................................................
+} // namespace toolkit
+//......................................................................................................................
+
+#endif // TOOLKIT_ANIMATEDIMAGES_HXX
diff --git a/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx b/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx
new file mode 100644
index 000000000000..3090eba68749
--- /dev/null
+++ b/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx
@@ -0,0 +1,265 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef TOOLKIT_CONTROL_MODEL_CONTAINERBASE_HXX
+#define TOOLKIT_CONTROL_MODEL_CONTAINERBASE_HXX
+
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/container/XContainer.hpp>
+#include <com/sun/star/awt/XTabControllerModel.hpp>
+#include <com/sun/star/util/XChangesNotifier.hpp>
+#include <com/sun/star/util/XChangesListener.hpp>
+#include <com/sun/star/util/XModifyListener.hpp>
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#include <com/sun/star/resource/XStringResourceResolver.hpp>
+#include <cppuhelper/implbase8.hxx>
+#include <cppuhelper/implbase2.hxx>
+#include <toolkit/helper/listenermultiplexer.hxx>
+#include <toolkit/controls/unocontrolmodel.hxx>
+#include <toolkit/controls/unocontrolcontainer.hxx>
+#include <cppuhelper/propshlp.hxx>
+#include <cppuhelper/basemutex.hxx>
+#include <com/sun/star/graphic/XGraphic.hpp>
+#include <com/sun/star/awt/tab/XTabPageModel.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/lang/XInitialization.hpp>
+// ----------------------------------------------------
+// class ControlModelContainerBase
+// ----------------------------------------------------
+typedef UnoControlModel ControlModel_Base;
+typedef ::cppu::AggImplInheritanceHelper8 < ControlModel_Base
+ , ::com::sun::star::lang::XMultiServiceFactory
+ , ::com::sun::star::container::XContainer
+ , ::com::sun::star::container::XNameContainer
+ , ::com::sun::star::awt::XTabControllerModel
+ , ::com::sun::star::util::XChangesNotifier
+ , ::com::sun::star::beans::XPropertyChangeListener
+ , ::com::sun::star::awt::tab::XTabPageModel
+ , ::com::sun::star::lang::XInitialization
+ > ControlModelContainer_IBase;
+
+class ControlModelContainerBase : public ControlModelContainer_IBase
+{
+public:
+ // would like to make this typedef private, too, but the Forte 7 compiler does have
+ // problems with this .....
+ typedef ::std::pair< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >, ::rtl::OUString >
+ UnoControlModelHolder;
+private:
+ typedef ::std::list< UnoControlModelHolder > UnoControlModelHolderList;
+
+ // for grouping control models (XTabControllerModel::getGroupXXX)
+ typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >
+ ModelGroup;
+ typedef ::std::vector< ModelGroup > AllGroups;
+
+ friend struct CloneControlModel;
+ friend struct FindControlModel;
+ friend struct CompareControlModel;
+
+protected:
+ ContainerListenerMultiplexer maContainerListeners;
+ ::cppu::OInterfaceContainerHelper maChangeListeners;
+ UnoControlModelHolderList maModels;
+
+ AllGroups maGroups;
+ sal_Bool mbGroupsUpToDate;
+
+ bool m_bEnabled;
+ ::rtl::OUString m_sTitle;
+ ::rtl::OUString m_sImageURL;
+ ::rtl::OUString m_sTooltip;
+ sal_Int16 m_nTabPageId;
+
+ void Clone_Impl(ControlModelContainerBase& _rClone) const;
+
+protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+ UnoControlModelHolderList::iterator ImplFindElement( const ::rtl::OUString& rName );
+
+public:
+ ControlModelContainerBase( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ControlModelContainerBase( const ControlModelContainerBase& rModel );
+ ~ControlModelContainerBase();
+
+ UnoControlModel* Clone() const;
+
+ // ::com::sun::star::container::XContainer
+ void SAL_CALL addContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removeContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::container::XElementAcces
+ ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::container::XNameContainer, XNameReplace, XNameAccess
+ void SAL_CALL replaceByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL insertByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removeByName( const ::rtl::OUString& Name ) throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::beans::XMultiPropertySet
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XMultiServiceFactory
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstance( const ::rtl::OUString& aServiceSpecifier ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArguments( const ::rtl::OUString& ServiceSpecifier, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Arguments ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAvailableServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XComponent
+ void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XTabControllerModel
+ virtual sal_Bool SAL_CALL getGroupControl( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setGroupControl( sal_Bool GroupControl ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setControlModels( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& Controls ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > > SAL_CALL getControlModels( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setGroup( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& Group, const ::rtl::OUString& GroupName ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getGroupCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL getGroup( sal_Int32 nGroup, ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& Group, ::rtl::OUString& Name ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL getGroupByName( const ::rtl::OUString& Name, ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& Group ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XChangesNotifier
+ virtual void SAL_CALL addChangesListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XChangesListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeChangesListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XChangesListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XPropertyChangeListener
+ virtual void SAL_CALL propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& evt ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XEventListener
+ using cppu::OPropertySetHelper::disposing;
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& evt ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ DECLIMPL_SERVICEINFO_DERIVED(ControlModelContainerBase, ControlModel_Base, "toolkit.ControlModelContainerBase" )
+
+ // XInitialization
+ virtual void SAL_CALL initialize (const com::sun::star::uno::Sequence<com::sun::star::uno::Any>& rArguments)
+ throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::tab::XTabPageModel
+ virtual ::sal_Int16 SAL_CALL getTabPageID() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getEnabled() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setEnabled( ::sal_Bool _enabled ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getTitle() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setTitle( const ::rtl::OUString& _title ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getImageURL() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setImageURL( const ::rtl::OUString& _imageurl ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getTooltip() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setTooltip( const ::rtl::OUString& _tooltip ) throw (::com::sun::star::uno::RuntimeException);
+
+protected:
+ void startControlListening( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& _rxChildModel );
+ void stopControlListening( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& _rxChildModel );
+
+ void implNotifyTabModelChange( const ::rtl::OUString& _rAccessor );
+
+ void implUpdateGroupStructure();
+};
+
+class ResourceListener :public ::com::sun::star::util::XModifyListener,
+ public ::cppu::OWeakObject,
+ public ::cppu::BaseMutex
+{
+ public:
+ ResourceListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& xListener );
+ virtual ~ResourceListener();
+
+ void startListening( const ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceResolver >& rResource );
+ void stopListening();
+
+ // XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire() throw ();
+ virtual void SAL_CALL release() throw ();
+
+ // XModifyListener
+ virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
+
+ private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceResolver > m_xResource;
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xListener;
+ bool m_bListening;
+};
+
+typedef ::cppu::AggImplInheritanceHelper2 < UnoControlContainer
+ , ::com::sun::star::container::XContainerListener
+ , ::com::sun::star::util::XChangesListener
+ > ContainerControl_IBase;
+
+class ControlContainerBase : public ContainerControl_IBase
+{
+protected:
+ bool mbSizeModified;
+ bool mbPosModified;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabController > mxTabController;
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > mxListener;
+
+ void ImplInsertControl( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& rxModel, const ::rtl::OUString& rName );
+ void ImplRemoveControl( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& rxModel );
+ virtual void ImplSetPosSize( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& rxCtrl );
+ void ImplUpdateResourceResolver();
+ void ImplStartListingForResourceEvents();
+ ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > Impl_getGraphicFromURL_nothrow( const ::rtl::OUString& _rURL );
+
+ ControlContainerBase();
+
+public:
+ ControlContainerBase( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ~ControlContainerBase();
+
+ DECLIMPL_SERVICEINFO_DERIVED( ControlContainerBase, UnoControlBase, "toolkit.ControlContainerBase" )
+
+ void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
+
+ void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::container::XContainerListener
+ void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XChangesListener
+ virtual void SAL_CALL changesOccurred( const ::com::sun::star::util::ChangesEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XControl
+ sal_Bool SAL_CALL setModel( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& Model ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL setDesignMode( sal_Bool bOn ) throw(::com::sun::star::uno::RuntimeException);
+protected:
+ virtual void ImplModelPropertiesChanged( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyChangeEvent >& rEvents ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void removingControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl );
+ virtual void addingControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl );
+};
+#endif
diff --git a/toolkit/inc/toolkit/controls/dialogcontrol.hxx b/toolkit/inc/toolkit/controls/dialogcontrol.hxx
index f6a0f768bc10..17b958aeace9 100644
--- a/toolkit/inc/toolkit/controls/dialogcontrol.hxx
+++ b/toolkit/inc/toolkit/controls/dialogcontrol.hxx
@@ -28,221 +28,56 @@
#ifndef TOOLKIT_DIALOG_CONTROL_HXX
#define TOOLKIT_DIALOG_CONTROL_HXX
-#include <com/sun/star/container/XNameContainer.hpp>
-#include <com/sun/star/container/XContainer.hpp>
-#include <com/sun/star/awt/XTabControllerModel.hpp>
+#include <toolkit/controls/controlmodelcontainerbase.hxx>
#include <com/sun/star/awt/XTopWindow.hpp>
-#include <com/sun/star/util/XChangesNotifier.hpp>
-#include <com/sun/star/util/XChangesListener.hpp>
-#include <com/sun/star/util/XModifyListener.hpp>
-#include <com/sun/star/beans/XPropertyChangeListener.hpp>
-#include <com/sun/star/awt/XDialog2.hpp>
+#include <com/sun/star/awt/XDialog.hpp>
#include <com/sun/star/resource/XStringResourceResolver.hpp>
-#include <cppuhelper/implbase6.hxx>
-#include <cppuhelper/implbase5.hxx>
-#include <toolkit/helper/listenermultiplexer.hxx>
-#include <toolkit/controls/unocontrolmodel.hxx>
#include "toolkit/helper/servicenames.hxx"
#include "toolkit/helper/macros.hxx"
#include <toolkit/controls/unocontrolcontainer.hxx>
-#include <cppuhelper/propshlp.hxx>
#include <cppuhelper/basemutex.hxx>
#include <list>
// ----------------------------------------------------
// class UnoControlDialogModel
// ----------------------------------------------------
-typedef UnoControlModel UnoControlDialogModel_Base;
-typedef ::cppu::ImplHelper6 < ::com::sun::star::lang::XMultiServiceFactory
- , ::com::sun::star::container::XContainer
- , ::com::sun::star::container::XNameContainer
- , ::com::sun::star::awt::XTabControllerModel
- , ::com::sun::star::util::XChangesNotifier
- , ::com::sun::star::beans::XPropertyChangeListener
- > UnoControlDialogModel_IBase;
-class UnoControlDialogModel : public UnoControlDialogModel_IBase
- , public UnoControlDialogModel_Base
+class UnoControlDialogModel : public ControlModelContainerBase
{
-public:
- // would like to make this typedef private, too, but the Forte 7 compiler does have
- // problems with this .....
- typedef ::std::pair< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >, ::rtl::OUString >
- UnoControlModelHolder;
-private:
- typedef ::std::list< UnoControlModelHolder > UnoControlModelHolderList;
-
- // for grouping control models (XTabControllerModel::getGroupXXX)
- typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >
- ModelGroup;
- typedef ::std::vector< ModelGroup > AllGroups;
-
- friend struct CloneControlModel;
- friend struct FindControlModel;
- friend struct CompareControlModel;
-
-private:
- ContainerListenerMultiplexer maContainerListeners;
- ::cppu::OInterfaceContainerHelper maChangeListeners;
- UnoControlModelHolderList maModels;
-
- AllGroups maGroups;
- sal_Bool mbGroupsUpToDate;
-
protected:
::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
-
- UnoControlModelHolderList::iterator ImplFindElement( const ::rtl::OUString& rName );
-
public:
- UnoControlDialogModel();
+ UnoControlDialogModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
UnoControlDialogModel( const UnoControlDialogModel& rModel );
~UnoControlDialogModel();
UnoControlModel* Clone() const;
-
- ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoControlModel::queryInterface(rType); }
- ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
- void SAL_CALL acquire() throw() { OWeakAggObject::acquire(); }
- void SAL_CALL release() throw() { OWeakAggObject::release(); }
-
- // ::com::sun::star::lang::XTypeProvider
- ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
- ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
-
- // ::com::sun::star::container::XContainer
- void SAL_CALL addContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
- void SAL_CALL removeContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
-
- // ::com::sun::star::container::XElementAcces
- ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
- sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
-
- // ::com::sun::star::container::XIndexContainer, XIndexReplace, XIndexAcces
- // void SAL_CALL replaceByIndex( sal_Int32 Index, const ::com::sun::star::uno::Any& Element ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) = 0;
- // sal_Int32 SAL_CALL getCount( ) throw(::com::sun::star::uno::RuntimeException) = 0;
- // ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) = 0;
- // void SAL_CALL insertByIndex( sal_Int32 Index, const ::com::sun::star::uno::Any& Element ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) = 0;
- // void SAL_CALL removeByIndex( sal_Int32 Index ) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) = 0;
-
- // ::com::sun::star::container::XNameContainer, XNameReplace, XNameAccess
- void SAL_CALL replaceByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw(::com::sun::star::uno::RuntimeException);
- sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw(::com::sun::star::uno::RuntimeException);
- void SAL_CALL insertByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- void SAL_CALL removeByName( const ::rtl::OUString& Name ) throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
// ::com::sun::star::beans::XMultiPropertySet
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
- // ::com::sun::star::lang::XMultiServiceFactory
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstance( const ::rtl::OUString& aServiceSpecifier ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArguments( const ::rtl::OUString& ServiceSpecifier, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Arguments ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
- ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAvailableServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
-
// ::com::sun::star::io::XPersistObject
::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
- // XComponent
- void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
-
- // XTabControllerModel
- virtual sal_Bool SAL_CALL getGroupControl( ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setGroupControl( sal_Bool GroupControl ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setControlModels( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& Controls ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > > SAL_CALL getControlModels( ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setGroup( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& Group, const ::rtl::OUString& GroupName ) throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getGroupCount( ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL getGroup( sal_Int32 nGroup, ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& Group, ::rtl::OUString& Name ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL getGroupByName( const ::rtl::OUString& Name, ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& Group ) throw (::com::sun::star::uno::RuntimeException);
-
- // XChangesNotifier
- virtual void SAL_CALL addChangesListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XChangesListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeChangesListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XChangesListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
-
- // XPropertyChangeListener
- virtual void SAL_CALL propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& evt ) throw (::com::sun::star::uno::RuntimeException);
-
- // XEventListener
- using cppu::OPropertySetHelper::disposing;
- virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& evt ) throw (::com::sun::star::uno::RuntimeException);
-
// XServiceInfo
- DECLIMPL_SERVICEINFO_DERIVED( UnoControlDialogModel,UnoControlDialogModel_Base, szServiceName2_UnoControlDialogModel )
-
-protected:
- void startControlListening( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& _rxChildModel );
- void stopControlListening( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& _rxChildModel );
-
- void implNotifyTabModelChange( const ::rtl::OUString& _rAccessor );
-
- void implUpdateGroupStructure();
-};
-
-// ----------------------------------------------------
-// class UnoDialogControl
-// ----------------------------------------------------
-typedef ::cppu::ImplHelper6 < ::com::sun::star::container::XContainerListener
- , ::com::sun::star::awt::XTopWindow
- , ::com::sun::star::awt::XDialog2
- , ::com::sun::star::util::XChangesListener
- , ::com::sun::star::util::XModifyListener
- , ::com::sun::star::awt::XWindowListener
- > UnoDialogControl_IBase;
-
-class ResourceListener :public ::com::sun::star::util::XModifyListener,
- public ::cppu::OWeakObject,
- public ::cppu::BaseMutex
-{
- public:
- ResourceListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& xListener );
- virtual ~ResourceListener();
-
- void startListening( const ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceResolver >& rResource );
- void stopListening();
+ DECLIMPL_SERVICEINFO_DERIVED( UnoControlDialogModel, ControlModelContainerBase, szServiceName2_UnoControlDialogModel )
- // XInterface
- virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL acquire() throw ();
- virtual void SAL_CALL release() throw ();
-
- // XModifyListener
- virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException);
-
- // XEventListener
- virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
-
- private:
- ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceResolver > m_xResource;
- ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xListener;
- bool m_bListening;
};
-class UnoDialogControl :public UnoControlContainer
- ,public UnoDialogControl_IBase
+class UnoDialogControl :public ControlContainerBase,
+ public ::com::sun::star::awt::XTopWindow,
+ public ::com::sun::star::awt::XDialog,
+ public ::com::sun::star::awt::XWindowListener
{
private:
::com::sun::star::uno::Reference< ::com::sun::star::awt::XMenuBar > mxMenuBar;
- ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabController > mxTabController;
- ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > mxListener;
TopWindowListenerMultiplexer maTopWindowListeners;
bool mbWindowListener;
- bool mbSizeModified;
- bool mbPosModified;
-
-protected:
-
- void ImplInsertControl( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& rxModel, const ::rtl::OUString& rName );
- void ImplRemoveControl( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& rxModel );
- void ImplSetPosSize( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& rxCtrl );
- void ImplUpdateResourceResolver();
- void ImplStartListingForResourceEvents();
public:
- UnoDialogControl();
+ UnoDialogControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ~UnoDialogControl();
::rtl::OUString GetComponentServiceName();
::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoControlContainer::queryInterface(rType); }
@@ -267,15 +102,6 @@ public:
virtual void SAL_CALL windowShown( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL windowHidden( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException);
- // ::com::sun::star::container::XContainerListener
- void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
- void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
- void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
-
- // ::com::sun::star::awt::XDialog2
- virtual void SAL_CALL endDialog( ::sal_Int32 Result ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setHelpId( const rtl::OUString& Id ) throw (::com::sun::star::uno::RuntimeException);
-
// ::com::sun::star::awt::XDialog
void SAL_CALL setTitle( const ::rtl::OUString& Title ) throw(::com::sun::star::uno::RuntimeException);
::rtl::OUString SAL_CALL getTitle() throw(::com::sun::star::uno::RuntimeException);
@@ -288,10 +114,6 @@ public:
// ::com::sun::star::awt::XControl
sal_Bool SAL_CALL setModel( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& Model ) throw(::com::sun::star::uno::RuntimeException);
- void SAL_CALL setDesignMode( sal_Bool bOn ) throw(::com::sun::star::uno::RuntimeException);
-
- // XChangesListener
- virtual void SAL_CALL changesOccurred( const ::com::sun::star::util::ChangesEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
// XModifyListener
virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException);
@@ -300,13 +122,10 @@ public:
DECLIMPL_SERVICEINFO( UnoDialogControl, szServiceName2_UnoControlDialog )
protected:
- virtual void ImplModelPropertiesChanged( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyChangeEvent >& rEvents ) throw(::com::sun::star::uno::RuntimeException);
+ // virtual void ImplModelPropertiesChanged( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyChangeEvent >& rEvents ) throw(::com::sun::star::uno::RuntimeException);
virtual void PrepareWindowDescriptor( ::com::sun::star::awt::WindowDescriptor& rDesc );
-
+ virtual void ImplModelPropertiesChanged( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyChangeEvent >& rEvents ) throw(::com::sun::star::uno::RuntimeException);
protected:
- virtual void removingControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl );
- virtual void addingControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl );
};
-
#endif // TOOLKIT_DIALOG_CONTROL_HXX
diff --git a/toolkit/inc/toolkit/controls/formattedcontrol.hxx b/toolkit/inc/toolkit/controls/formattedcontrol.hxx
index f589dabd47aa..93f675dae03f 100644
--- a/toolkit/inc/toolkit/controls/formattedcontrol.hxx
+++ b/toolkit/inc/toolkit/controls/formattedcontrol.hxx
@@ -67,8 +67,11 @@ namespace toolkit
) throw (::com::sun::star::uno::Exception);
public:
- UnoControlFormattedFieldModel();
- UnoControlFormattedFieldModel( const UnoControlFormattedFieldModel& rModel ) : UnoControlModel( rModel ) {;}
+ UnoControlFormattedFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ UnoControlFormattedFieldModel( const UnoControlFormattedFieldModel& rModel )
+ :UnoControlModel( rModel )
+ {
+ }
UnoControlModel* Clone() const { return new UnoControlFormattedFieldModel( *this ); }
@@ -110,7 +113,7 @@ namespace toolkit
class UnoFormattedFieldControl : public UnoSpinFieldControl
{
public:
- UnoFormattedFieldControl();
+ UnoFormattedFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
::rtl::OUString GetComponentServiceName();
// ::com::sun::star::awt::XTextListener
diff --git a/toolkit/inc/toolkit/controls/geometrycontrolmodel.hxx b/toolkit/inc/toolkit/controls/geometrycontrolmodel.hxx
index 05b3016e690a..ef86ec8eb5b8 100644
--- a/toolkit/inc/toolkit/controls/geometrycontrolmodel.hxx
+++ b/toolkit/inc/toolkit/controls/geometrycontrolmodel.hxx
@@ -185,7 +185,7 @@ FORWARD_DECLARE_INTERFACE( script, XNameContainer )
,public ::comphelper::OAggregationArrayUsageHelper< OTemplateInstanceDisambiguation< CONTROLMODEL > >
{
public:
- OGeometryControlModel();
+ OGeometryControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
private:
OGeometryControlModel(::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable >& _rxAggregateInstance);
diff --git a/toolkit/inc/toolkit/controls/geometrycontrolmodel_impl.hxx b/toolkit/inc/toolkit/controls/geometrycontrolmodel_impl.hxx
index d6491877c7ad..0b2362656433 100644
--- a/toolkit/inc/toolkit/controls/geometrycontrolmodel_impl.hxx
+++ b/toolkit/inc/toolkit/controls/geometrycontrolmodel_impl.hxx
@@ -32,11 +32,17 @@
//====================================================================
//--------------------------------------------------------------------
template <class CONTROLMODEL>
-OGeometryControlModel<CONTROLMODEL>::OGeometryControlModel()
- :OGeometryControlModel_Base(new CONTROLMODEL)
+OGeometryControlModel<CONTROLMODEL>::OGeometryControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory )
+ :OGeometryControlModel_Base(new CONTROLMODEL( i_factory ) )
{
}
+//template <class CONTROLMODEL>
+//OGeometryControlModel<CONTROLMODEL>::OGeometryControlModel(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & i_xCompContext)
+// :OGeometryControlModel_Base(new CONTROLMODEL(i_xCompContext))
+//{
+//}
+//
//--------------------------------------------------------------------
template <class CONTROLMODEL>
OGeometryControlModel<CONTROLMODEL>::OGeometryControlModel(::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable >& _rxAggregateInstance)
diff --git a/toolkit/inc/toolkit/controls/roadmapcontrol.hxx b/toolkit/inc/toolkit/controls/roadmapcontrol.hxx
index 1b86d277fde2..0848fb21b8b5 100644
--- a/toolkit/inc/toolkit/controls/roadmapcontrol.hxx
+++ b/toolkit/inc/toolkit/controls/roadmapcontrol.hxx
@@ -45,37 +45,37 @@
#include <cppuhelper/implbase4.hxx>
-
#include <comphelper/uno3.hxx>
-typedef GraphicControlModel UnoControlRoadmapModel_Base;
+//........................................................................
+namespace toolkit
+{
+//........................................................................
+ typedef GraphicControlModel UnoControlRoadmapModel_Base;
-typedef ::cppu::ImplHelper3 < ::com::sun::star::lang::XSingleServiceFactory
- , ::com::sun::star::container::XContainer
- , ::com::sun::star::container::XIndexContainer
- > UnoControlRoadmapModel_IBase;
+ typedef ::cppu::ImplHelper3 < ::com::sun::star::lang::XSingleServiceFactory
+ , ::com::sun::star::container::XContainer
+ , ::com::sun::star::container::XIndexContainer
+ > UnoControlRoadmapModel_IBase;
-typedef UnoControlBase UnoControlRoadmap_Base;
-typedef ::cppu::ImplHelper4 < ::com::sun::star::awt::XItemEventBroadcaster
- , ::com::sun::star::container::XContainerListener
- , ::com::sun::star::awt::XItemListener
- , ::com::sun::star::beans::XPropertyChangeListener
- > UnoControlRoadmap_IBase;
+ typedef UnoControlBase UnoControlRoadmap_Base;
+ typedef ::cppu::ImplHelper4 < ::com::sun::star::awt::XItemEventBroadcaster
+ , ::com::sun::star::container::XContainerListener
+ , ::com::sun::star::awt::XItemListener
+ , ::com::sun::star::beans::XPropertyChangeListener
+ > UnoControlRoadmap_IBase;
-typedef ::cppu::ImplHelper2< ::com::sun::star::container::XContainerListener,
- ::com::sun::star::awt::XItemEventBroadcaster> SVTXRoadmap_Base;
+ typedef ::cppu::ImplHelper2< ::com::sun::star::container::XContainerListener,
+ ::com::sun::star::awt::XItemEventBroadcaster> SVTXRoadmap_Base;
-//........................................................................
-namespace toolkit{
-//........................................................................
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::awt;
using namespace ::com::sun::star::lang;
@@ -110,7 +110,7 @@ namespace toolkit{
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
public:
- UnoControlRoadmapModel();
+ UnoControlRoadmapModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
UnoControlRoadmapModel( const UnoControlRoadmapModel& rModel ) :
UnoControlRoadmapModel_Base( rModel ),
UnoControlRoadmapModel_IBase( rModel ),
@@ -167,7 +167,7 @@ namespace toolkit{
private:
ItemListenerMultiplexer maItemListeners;
public:
- UnoRoadmapControl();
+ UnoRoadmapControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
::rtl::OUString GetComponentServiceName();
void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { UnoControlBase::disposing( Source ); }
diff --git a/toolkit/inc/toolkit/controls/spinningprogress.hxx b/toolkit/inc/toolkit/controls/spinningprogress.hxx
new file mode 100755
index 000000000000..e0a676b2aa86
--- /dev/null
+++ b/toolkit/inc/toolkit/controls/spinningprogress.hxx
@@ -0,0 +1,70 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef TOOLKIT_SPINNINGPROGRESS_HXX
+#define TOOLKIT_SPINNINGPROGRESS_HXX
+
+#include "toolkit/controls/animatedimages.hxx"
+
+/** === begin UNO includes === **/
+/** === end UNO includes === **/
+
+//......................................................................................................................
+namespace toolkit
+{
+//......................................................................................................................
+
+ //==================================================================================================================
+ //= SpinningProgressControlModel
+ //==================================================================================================================
+ typedef AnimatedImagesControlModel SpinningProgressControlModel_Base;
+ class SpinningProgressControlModel : public SpinningProgressControlModel_Base
+ {
+ public:
+ SpinningProgressControlModel( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > const & i_factory );
+ SpinningProgressControlModel( const SpinningProgressControlModel& i_copySource );
+
+ virtual UnoControlModel* Clone() const;
+
+ // XPropertySet
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XPersistObject
+ ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
+
+ protected:
+ ~SpinningProgressControlModel();
+ };
+
+//......................................................................................................................
+} // namespace toolkit
+//......................................................................................................................
+
+#endif // TOOLKIT_SPINNINGPROGRESS_HXX
diff --git a/toolkit/inc/toolkit/controls/tabpagecontainer.hxx b/toolkit/inc/toolkit/controls/tabpagecontainer.hxx
new file mode 100644
index 000000000000..c7a2e3b8ef90
--- /dev/null
+++ b/toolkit/inc/toolkit/controls/tabpagecontainer.hxx
@@ -0,0 +1,147 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef TOOLKIT_TABPAGE_CONTAINER_HXX
+#define TOOLKIT_TABPAGE_CONTAINER_HXX
+
+#include <com/sun/star/awt/tab/XTabPageContainer.hpp>
+#include <com/sun/star/awt/tab/XTabPageContainerModel.hpp>
+#include <com/sun/star/awt/tab/XTabPageContainerListener.hpp>
+#include <com/sun/star/awt/tab/XTabPage.hpp>
+#include <com/sun/star/awt/tab/XTabPageModel.hpp>
+#include <toolkit/controls/unocontrolbase.hxx>
+#include <toolkit/controls/unocontrolmodel.hxx>
+#include <toolkit/helper/servicenames.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <comphelper/sequence.hxx>
+#include <toolkit/controls/controlmodelcontainerbase.hxx>
+#include <toolkit/controls/unocontrolmodel.hxx>
+#include <toolkit/helper/listenermultiplexer.hxx>
+
+using namespace ::com::sun::star::uno;
+//using namespace ::com::sun::star::awt;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::container;
+
+// ------------------------------------------------------------------
+// class ::com::sun::star::awt::tab::UnoControlTabPageContainerModel
+// ------------------------------------------------------------------
+typedef ::cppu::AggImplInheritanceHelper1 < UnoControlModel
+ , ::com::sun::star::awt::tab::XTabPageContainerModel
+ > UnoControlTabPageContainerModel_Base;
+class UnoControlTabPageContainerModel : public UnoControlTabPageContainerModel_Base
+{
+private:
+ std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPageModel > > m_aTabPageVector;
+ ContainerListenerMultiplexer maContainerListeners;
+protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+ // ::com::sun::star::beans::XMultiPropertySet
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+
+public:
+ UnoControlTabPageContainerModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ UnoControlTabPageContainerModel( const UnoControlTabPageContainerModel& rModel ) : UnoControlTabPageContainerModel_Base( rModel ),maContainerListeners( *this ) {;}
+
+ UnoControlModel* Clone() const { return new UnoControlTabPageContainerModel( *this ); }
+
+ // ::com::sun::star::io::XPersistObject
+ ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XServiceInfo
+ DECLIMPL_SERVICEINFO_DERIVED( UnoControlTabPageContainerModel, UnoControlModel, szServiceName_UnoControlTabPageContainerModel )
+ // XIndexContainer
+ virtual void SAL_CALL insertByIndex( sal_Int32 Index, const ::com::sun::star::uno::Any& Element )
+ throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeByIndex( sal_Int32 Index )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ // XIndexReplace
+ virtual void SAL_CALL replaceByIndex( sal_Int32 Index, const ::com::sun::star::uno::Any& Element )
+ throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ // XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount() throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ // XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw (::com::sun::star::uno::RuntimeException);
+ //{
+ //return ::getCppuType((com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >*)0);
+ //}
+
+ virtual sal_Bool SAL_CALL hasElements() throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::container::XContainer
+ void SAL_CALL addContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL removeContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+};
+// ===================================================================
+// = UnoControlTabPageContainer
+// ===================================================================
+typedef ::cppu::AggImplInheritanceHelper1 < ControlContainerBase
+ , ::com::sun::star::awt::tab::XTabPageContainer
+ > UnoControlTabPageContainer_Base;
+class UnoControlTabPageContainer : public UnoControlTabPageContainer_Base
+{
+public:
+ UnoControlTabPageContainer( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ::rtl::OUString GetComponentServiceName();
+
+ // ::com::sun::star::lang::XComponent
+ void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XControl
+ void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::tab::XTabPageContainer
+ virtual ::sal_Int16 SAL_CALL getActiveTabPageID() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setActiveTabPageID( ::sal_Int16 _activetabpageid ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getTabPageCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL isTabPageActive( ::sal_Int16 tabPageIndex ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPage > SAL_CALL getTabPage( ::sal_Int16 tabPageIndex ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPage > SAL_CALL getTabPageByID( ::sal_Int16 tabPageID ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addTabPageListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeTabPageListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL addControl( const ::rtl::OUString& Name, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& Control ) throw (::com::sun::star::uno::RuntimeException);
+ // ::com::sun::star::lang::XServiceInfo
+ DECLIMPL_SERVICEINFO_DERIVED( UnoControlTabPageContainer, UnoControlBase, szServiceName_UnoControlTabPageContainer )
+
+// using UnoControl::getPeer;
+protected:
+ virtual void updateFromModel();
+private:
+ TabPageListenerMultiplexer m_aTabPageListeners;
+ sal_Int16 m_nActiveTabPageId;
+};
+
+#endif // _TOOLKIT_TABPAGE_CONTAINER_HXX
diff --git a/toolkit/inc/toolkit/controls/tabpagemodel.hxx b/toolkit/inc/toolkit/controls/tabpagemodel.hxx
new file mode 100644
index 000000000000..08938669fa58
--- /dev/null
+++ b/toolkit/inc/toolkit/controls/tabpagemodel.hxx
@@ -0,0 +1,146 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef TOOLKIT_TABPAGE_MODEL_HXX
+#define TOOLKIT_TABPAGE_MODEL_HXX
+
+#include <toolkit/controls/controlmodelcontainerbase.hxx>
+#include <com/sun/star/awt/tab/XTabPageModel.hpp>
+#include <com/sun/star/awt/tab/XTabPage.hpp>
+#include <com/sun/star/resource/XStringResourceResolver.hpp>
+#include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include "toolkit/helper/servicenames.hxx"
+#include "toolkit/helper/macros.hxx"
+#include <toolkit/controls/unocontrolcontainer.hxx>
+#include <cppuhelper/basemutex.hxx>
+#include <list>
+#include <cppuhelper/implbase2.hxx>
+
+// ----------------------------------------------------
+// class TabPageModel
+// ----------------------------------------------------
+//typedef ::cppu::ImplHelper2< ::com::sun::star::awt::tab::XTabPageModel,
+// ::com::sun::star::lang::XInitialization
+// > TabPageAccess_BASE;
+//
+//class TabPageModel : public TabPageAccess_BASE
+//{
+//
+//private:
+// bool m_bEnabled;
+// ::rtl::OUString m_sTitle;
+// ::rtl::OUString m_sImageURL;
+// ::rtl::OUString m_sTooltip;
+// sal_Int16 m_nTabPageId;
+//
+//public:
+// TabPageModel();
+// explicit TabPageModel( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xCompContext);
+// ~TabPageModel();
+//
+// // XInitialization
+// virtual void SAL_CALL initialize (const com::sun::star::uno::Sequence<com::sun::star::uno::Any>& rArguments)
+// throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException);
+//
+// ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
+// void SAL_CALL acquire() throw() { OWeakAggObject::acquire(); }
+// void SAL_CALL release() throw() { OWeakAggObject::release(); }
+//
+// // ::com::sun::star::lang::XTypeProvider
+// //::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
+// //::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
+//
+// // ::com::sun::star::awt::tab::XTabPageModel
+// virtual ::sal_Int16 SAL_CALL getTabPageID() throw (::com::sun::star::uno::RuntimeException);
+// virtual ::sal_Bool SAL_CALL getEnabled() throw (::com::sun::star::uno::RuntimeException);
+// virtual void SAL_CALL setEnabled( ::sal_Bool _enabled ) throw (::com::sun::star::uno::RuntimeException);
+// virtual ::rtl::OUString SAL_CALL getTitle() throw (::com::sun::star::uno::RuntimeException);
+// virtual void SAL_CALL setTitle( const ::rtl::OUString& _title ) throw (::com::sun::star::uno::RuntimeException);
+// virtual ::rtl::OUString SAL_CALL getImageURL() throw (::com::sun::star::uno::RuntimeException);
+// virtual void SAL_CALL setImageURL( const ::rtl::OUString& _imageurl ) throw (::com::sun::star::uno::RuntimeException);
+// virtual ::rtl::OUString SAL_CALL getTooltip() throw (::com::sun::star::uno::RuntimeException);
+// virtual void SAL_CALL setTooltip( const ::rtl::OUString& _tooltip ) throw (::com::sun::star::uno::RuntimeException);
+//};
+// ----------------------------------------------------
+// class UnoControlTabPageModel
+// ----------------------------------------------------
+
+class UnoControlTabPageModel : public ControlModelContainerBase
+ //public TabPageModel
+{
+protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+public:
+ UnoControlTabPageModel( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > const & i_factory);
+
+ // ::com::sun::star::io::XPersistObject
+ ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::beans::XMultiPropertySet
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ // XInitialization
+ virtual void SAL_CALL initialize (const com::sun::star::uno::Sequence<com::sun::star::uno::Any>& rArguments)
+ throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ DECLIMPL_SERVICEINFO_DERIVED( UnoControlTabPageModel, ControlModelContainerBase, szServiceName_UnoControlTabPageModel )
+
+};
+
+// ----------------------------------------------------
+// class UnoTabPageControl
+// ----------------------------------------------------
+typedef ::cppu::AggImplInheritanceHelper2 < ControlContainerBase
+ , ::com::sun::star::awt::tab::XTabPage
+ , ::com::sun::star::awt::XWindowListener
+ > UnoControlTabPage_Base;
+class UnoControlTabPage : public UnoControlTabPage_Base
+{
+private:
+ bool m_bWindowListener;
+public:
+
+ UnoControlTabPage( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ ~UnoControlTabPage();
+ ::rtl::OUString GetComponentServiceName();
+
+ void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
+ void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XWindowListener
+ virtual void SAL_CALL windowResized( const ::com::sun::star::awt::WindowEvent& e ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL windowMoved( const ::com::sun::star::awt::WindowEvent& e ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL windowShown( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL windowHidden( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException);
+ // ::com::sun::star::lang::XServiceInfo
+ DECLIMPL_SERVICEINFO( UnoControlTabPage, szServiceName_UnoControlTabPage)
+};
+
+#endif // TOOLKIT_TABPAGE_MODEL_HXX
diff --git a/toolkit/inc/toolkit/controls/tkscrollbar.hxx b/toolkit/inc/toolkit/controls/tkscrollbar.hxx
index 78795aa240c2..da3d97ab1bc2 100644
--- a/toolkit/inc/toolkit/controls/tkscrollbar.hxx
+++ b/toolkit/inc/toolkit/controls/tkscrollbar.hxx
@@ -50,7 +50,7 @@ namespace toolkit
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
public:
- UnoControlScrollBarModel();
+ UnoControlScrollBarModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
UnoControlScrollBarModel( const UnoControlScrollBarModel& rModel ) : UnoControlModel( rModel ) {;}
UnoControlModel* Clone() const { return new UnoControlScrollBarModel( *this ); }
@@ -76,7 +76,7 @@ namespace toolkit
AdjustmentListenerMultiplexer maAdjustmentListeners;
public:
- UnoScrollBarControl();
+ UnoScrollBarControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
::rtl::OUString GetComponentServiceName();
::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoControlBase::queryInterface(rType); }
diff --git a/toolkit/inc/toolkit/controls/tksimpleanimation.hxx b/toolkit/inc/toolkit/controls/tksimpleanimation.hxx
index 697d1679af45..a0ddfc0dbf8d 100644
--- a/toolkit/inc/toolkit/controls/tksimpleanimation.hxx
+++ b/toolkit/inc/toolkit/controls/tksimpleanimation.hxx
@@ -51,7 +51,7 @@ namespace toolkit
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
public:
- UnoSimpleAnimationControlModel();
+ UnoSimpleAnimationControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
UnoSimpleAnimationControlModel( const UnoSimpleAnimationControlModel& rModel ) : UnoControlModel( rModel ) {;}
UnoControlModel* Clone() const { return new UnoSimpleAnimationControlModel( *this ); }
@@ -71,28 +71,18 @@ namespace toolkit
//= UnoSimpleAnimationControl
//====================================================================
- typedef ::cppu::ImplHelper1 < ::com::sun::star::awt::XSimpleAnimation
- > UnoSimpleAnimationControl_Base;
+ typedef ::cppu::AggImplInheritanceHelper1 < UnoControlBase
+ , ::com::sun::star::awt::XSimpleAnimation
+ > UnoSimpleAnimationControl_Base;
- class UnoSimpleAnimationControl :public UnoControlBase
- ,public UnoSimpleAnimationControl_Base
+ class UnoSimpleAnimationControl : public UnoSimpleAnimationControl_Base
{
private:
public:
- UnoSimpleAnimationControl();
+ UnoSimpleAnimationControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
::rtl::OUString GetComponentServiceName();
- DECLARE_UNO3_AGG_DEFAULTS( UnoSimpleAnimationControl, UnoControlBase );
- ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
-
- void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
- void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { UnoControlBase::disposing( Source ); }
- void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
-
- // XTypeProvider
- DECLARE_XTYPEPROVIDER()
-
// XSimpleAnimation
virtual void SAL_CALL start() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL stop() throw (::com::sun::star::uno::RuntimeException);
diff --git a/toolkit/inc/toolkit/controls/tkspinbutton.hxx b/toolkit/inc/toolkit/controls/tkspinbutton.hxx
index 48c602f76cfc..7600c3e6f9e7 100644
--- a/toolkit/inc/toolkit/controls/tkspinbutton.hxx
+++ b/toolkit/inc/toolkit/controls/tkspinbutton.hxx
@@ -51,7 +51,7 @@ namespace toolkit
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
public:
- UnoSpinButtonModel();
+ UnoSpinButtonModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
UnoSpinButtonModel( const UnoSpinButtonModel& rModel ) : UnoControlModel( rModel ) {;}
UnoControlModel* Clone() const { return new UnoSpinButtonModel( *this ); }
@@ -82,7 +82,7 @@ namespace toolkit
AdjustmentListenerMultiplexer maAdjustmentListeners;
public:
- UnoSpinButtonControl();
+ UnoSpinButtonControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
::rtl::OUString GetComponentServiceName();
DECLARE_UNO3_AGG_DEFAULTS( UnoSpinButtonControl, UnoControlBase );
diff --git a/toolkit/inc/toolkit/controls/tkthrobber.hxx b/toolkit/inc/toolkit/controls/tkthrobber.hxx
index d6c3a3d8a511..1c149639fc47 100644
--- a/toolkit/inc/toolkit/controls/tkthrobber.hxx
+++ b/toolkit/inc/toolkit/controls/tkthrobber.hxx
@@ -51,7 +51,7 @@ namespace toolkit
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
public:
- UnoThrobberControlModel();
+ UnoThrobberControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
UnoThrobberControlModel( const UnoThrobberControlModel& rModel ) : UnoControlModel( rModel ) {;}
UnoControlModel* Clone() const { return new UnoThrobberControlModel( *this ); }
@@ -80,7 +80,7 @@ namespace toolkit
private:
public:
- UnoThrobberControl();
+ UnoThrobberControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
::rtl::OUString GetComponentServiceName();
DECLARE_UNO3_AGG_DEFAULTS( UnoThrobberControl, UnoControlBase );
diff --git a/toolkit/inc/toolkit/controls/unocontrol.hxx b/toolkit/inc/toolkit/controls/unocontrol.hxx
index 6bcfa519ed3d..44836ec28dd6 100644
--- a/toolkit/inc/toolkit/controls/unocontrol.hxx
+++ b/toolkit/inc/toolkit/controls/unocontrol.hxx
@@ -49,6 +49,7 @@
#include <cppuhelper/interfacecontainer.hxx>
#include <cppuhelper/weakref.hxx>
#include <cppuhelper/implbase9.hxx>
+#include <comphelper/componentcontext.hxx>
#include <com/sun/star/util/XModeChangeBroadcaster.hpp>
#include <com/sun/star/awt/XVclWindowPeer.hpp>
@@ -95,6 +96,7 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::awt::XVclWindowPeer > mxVclWindowPeer; // just to avoid the query_interface thing
protected:
+ const ::comphelper::ComponentContext maContext;
EventListenerMultiplexer maDisposeListeners;
WindowListenerMultiplexer maWindowListeners;
FocusListenerMultiplexer maFocusListeners;
@@ -144,8 +146,11 @@ protected:
virtual sal_Bool requiresNewPeer( const ::rtl::OUString& _rPropertyName ) const;
-public:
+protected:
UnoControl();
+
+public:
+ UnoControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
~UnoControl();
UnoControlComponentInfos& GetComponentInfos() { return maComponentInfos; }
diff --git a/toolkit/inc/toolkit/controls/unocontrolbase.hxx b/toolkit/inc/toolkit/controls/unocontrolbase.hxx
index f12dd23a5c67..1ce56c11cec1 100644
--- a/toolkit/inc/toolkit/controls/unocontrolbase.hxx
+++ b/toolkit/inc/toolkit/controls/unocontrolbase.hxx
@@ -39,6 +39,14 @@
class TOOLKIT_DLLPUBLIC UnoControlBase : public UnoControl
{
protected:
+ UnoControlBase();
+
+protected:
+ UnoControlBase( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory )
+ :UnoControl( i_factory )
+ {
+ }
+
sal_Bool ImplHasProperty( sal_uInt16 nProp );
sal_Bool ImplHasProperty( const ::rtl::OUString& aPropertyName );
void ImplSetPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue, sal_Bool bUpdateThis );
diff --git a/toolkit/inc/toolkit/controls/unocontrolcontainer.hxx b/toolkit/inc/toolkit/controls/unocontrolcontainer.hxx
index 1175d0e85abb..dcba4fdcbf9a 100644
--- a/toolkit/inc/toolkit/controls/unocontrolcontainer.hxx
+++ b/toolkit/inc/toolkit/controls/unocontrolcontainer.hxx
@@ -64,8 +64,9 @@ protected:
void ImplActivateTabControllers();
public:
- UnoControlContainer();
- UnoControlContainer( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > xPeer );
+ UnoControlContainer( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
+ UnoControlContainer( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& xPeer );
~UnoControlContainer();
diff --git a/toolkit/inc/toolkit/controls/unocontrolcontainermodel.hxx b/toolkit/inc/toolkit/controls/unocontrolcontainermodel.hxx
index ef0d9a4068ee..cdc908718988 100644
--- a/toolkit/inc/toolkit/controls/unocontrolcontainermodel.hxx
+++ b/toolkit/inc/toolkit/controls/unocontrolcontainermodel.hxx
@@ -45,7 +45,7 @@ protected:
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
public:
- UnoControlContainerModel();
+ UnoControlContainerModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
UnoControlContainerModel( const UnoControlContainerModel& rModel ) : UnoControlModel( rModel ) {;}
UnoControlModel* Clone() const { return new UnoControlContainerModel( *this ); }
diff --git a/toolkit/inc/toolkit/controls/unocontrolmodel.hxx b/toolkit/inc/toolkit/controls/unocontrolmodel.hxx
index 5ac3c33aa1c9..bdb6e5d4bc68 100644
--- a/toolkit/inc/toolkit/controls/unocontrolmodel.hxx
+++ b/toolkit/inc/toolkit/controls/unocontrolmodel.hxx
@@ -44,6 +44,9 @@
#include <cppuhelper/propshlp.hxx>
#include <cppuhelper/interfacecontainer.hxx>
+#include <cppuhelper/implbase7.hxx>
+#include <comphelper/componentcontext.hxx>
+#include <comphelper/uno3.hxx>
#include <list>
@@ -53,21 +56,25 @@ class ImplPropertyTable;
// class UnoControlModel
// ----------------------------------------------------
-class TOOLKIT_DLLPUBLIC UnoControlModel : public ::com::sun::star::awt::XControlModel,
- public ::com::sun::star::beans::XPropertyState,
- public ::com::sun::star::io::XPersistObject,
- public ::com::sun::star::lang::XComponent,
- public ::com::sun::star::lang::XServiceInfo,
- public ::com::sun::star::lang::XTypeProvider,
- public ::com::sun::star::lang::XUnoTunnel,
- public ::com::sun::star::util::XCloneable,
- public MutexAndBroadcastHelper,
- public ::cppu::OPropertySetHelper,
- public ::cppu::OWeakAggObject
+typedef ::cppu::WeakAggImplHelper7 < ::com::sun::star::awt::XControlModel
+ , ::com::sun::star::beans::XPropertyState
+ , ::com::sun::star::io::XPersistObject
+ , ::com::sun::star::lang::XComponent
+ , ::com::sun::star::lang::XServiceInfo
+ , ::com::sun::star::lang::XUnoTunnel
+ , ::com::sun::star::util::XCloneable
+ > UnoControlModel_Base;
+
+class TOOLKIT_DLLPUBLIC UnoControlModel :public UnoControlModel_Base
+ ,public MutexAndBroadcastHelper
+ ,public ::cppu::OPropertySetHelper
{
private:
- ImplPropertyTable* mpData;
- EventListenerMultiplexer maDisposeListeners;
+ ImplPropertyTable* mpData;
+ EventListenerMultiplexer maDisposeListeners;
+
+protected:
+ const ::comphelper::ComponentContext maContext;
protected:
void ImplRegisterProperty( sal_uInt16 nPropType );
@@ -99,18 +106,21 @@ protected:
sal_Int32 _nSecondHandle /// second handle, which should supersede _nFirstHandle in the sequence
) const;
-public:
+protected:
UnoControlModel();
+public:
+ UnoControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
UnoControlModel( const UnoControlModel& rModel );
~UnoControlModel();
virtual UnoControlModel* Clone() const = 0;
- // ::com::sun::star::uno::XAggregation
+ // ::com::sun::star::uno::XInterface
::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return OWeakAggObject::queryInterface(rType); }
- void SAL_CALL acquire() throw() { OWeakAggObject::acquire(); }
- void SAL_CALL release() throw() { OWeakAggObject::release(); }
+ void SAL_CALL acquire() throw();
+ void SAL_CALL release() throw();
+ // ::com::sun::star::uno::XAggregation
::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
// ::com::sun::star::lang::XUnoTunnel
@@ -122,10 +132,7 @@ public:
::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone() throw(::com::sun::star::uno::RuntimeException);
// ::com::sun::star::lang::XTypeProvider
- ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
- ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
-
- // ::com::sun::star::awt::XControlModel
+ DECLARE_XTYPEPROVIDER()
// ::com::sun::star::lang::XComponent
void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
diff --git a/toolkit/inc/toolkit/controls/unocontrols.hxx b/toolkit/inc/toolkit/controls/unocontrols.hxx
index 01ff047ee3de..09622d2c8ef8 100644
--- a/toolkit/inc/toolkit/controls/unocontrols.hxx
+++ b/toolkit/inc/toolkit/controls/unocontrols.hxx
@@ -82,7 +82,7 @@ protected:
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
public:
- UnoControlEditModel();
+ UnoControlEditModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
UnoControlEditModel( const UnoControlEditModel& rModel ) : UnoControlModel( rModel ) {;}
UnoControlModel* Clone() const { return new UnoControlEditModel( *this ); }
@@ -116,7 +116,7 @@ private:
// They only support XTextComponent, so keep the text
// here, maybe there is no Peer when calling setText()...
::rtl::OUString maText;
- USHORT mnMaxTextLen;
+ sal_uInt16 mnMaxTextLen;
sal_Bool mbSetTextInPeer;
sal_Bool mbSetMaxTextLenInPeer;
@@ -124,7 +124,7 @@ private:
public:
- UnoEditControl();
+ UnoEditControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
::rtl::OUString GetComponentServiceName();
TextListenerMultiplexer& GetTextListeners() { return maTextListeners; }
@@ -185,7 +185,7 @@ protected:
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
public:
- UnoControlFileControlModel();
+ UnoControlFileControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
UnoControlFileControlModel( const UnoControlFileControlModel& rModel ) : UnoControlModel( rModel ) {;}
UnoControlModel* Clone() const { return new UnoControlFileControlModel( *this ); }
@@ -206,7 +206,7 @@ public:
class UnoFileControl : public UnoEditControl
{
public:
- UnoFileControl();
+ UnoFileControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
::rtl::OUString GetComponentServiceName();
// ::com::sun::star::lang::XServiceInfo
@@ -226,7 +226,12 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > getGraphicFromURL_nothrow( const ::rtl::OUString& _rURL );
protected:
- GraphicControlModel() : mbAdjustingImagePosition( false ), mbAdjustingGraphic( false ) { }
+ GraphicControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory )
+ :UnoControlModel( i_factory )
+ ,mbAdjustingImagePosition( false )
+ ,mbAdjustingGraphic( false )
+ {
+ }
GraphicControlModel( const GraphicControlModel& _rSource ) : UnoControlModel( _rSource ), mbAdjustingImagePosition( false ), mbAdjustingGraphic( false ) { }
// ::cppu::OPropertySetHelper
@@ -242,14 +247,14 @@ private:
// ----------------------------------------------------
// class UnoControlButtonModel
// ----------------------------------------------------
-class UnoControlButtonModel : public GraphicControlModel
+class UnoControlButtonModel : public GraphicControlModel
{
protected:
::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
public:
- UnoControlButtonModel();
+ UnoControlButtonModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
UnoControlButtonModel( const UnoControlButtonModel& rModel ) : GraphicControlModel( rModel ) {;}
UnoControlModel* Clone() const { return new UnoControlButtonModel( *this ); }
@@ -282,7 +287,7 @@ private:
public:
- UnoButtonControl();
+ UnoButtonControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
::rtl::OUString GetComponentServiceName();
void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
@@ -327,7 +332,7 @@ protected:
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
public:
- UnoControlImageControlModel();
+ UnoControlImageControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
UnoControlImageControlModel( const UnoControlImageControlModel& rModel ) : GraphicControlModel( rModel ), mbAdjustingImageScaleMode( false ) { }
UnoControlModel* Clone() const { return new UnoControlImageControlModel( *this ); }
@@ -359,7 +364,7 @@ private:
public:
- UnoImageControlControl();
+ UnoImageControlControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
::rtl::OUString GetComponentServiceName();
void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
@@ -387,7 +392,7 @@ protected:
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
public:
- UnoControlRadioButtonModel();
+ UnoControlRadioButtonModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
UnoControlRadioButtonModel( const UnoControlRadioButtonModel& rModel ) : GraphicControlModel( rModel ) {;}
UnoControlModel* Clone() const { return new UnoControlRadioButtonModel( *this ); }
@@ -421,7 +426,7 @@ private:
public:
- UnoRadioButtonControl();
+ UnoRadioButtonControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
::rtl::OUString GetComponentServiceName();
void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
@@ -466,7 +471,7 @@ protected:
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
public:
- UnoControlCheckBoxModel();
+ UnoControlCheckBoxModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
UnoControlCheckBoxModel( const UnoControlCheckBoxModel& rModel ) : GraphicControlModel( rModel ) {;}
UnoControlModel* Clone() const { return new UnoControlCheckBoxModel( *this ); }
@@ -499,7 +504,7 @@ private:
public:
- UnoCheckBoxControl();
+ UnoCheckBoxControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
~UnoCheckBoxControl(){;}
::rtl::OUString GetComponentServiceName();
@@ -547,7 +552,7 @@ protected:
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
public:
- UnoControlFixedHyperlinkModel();
+ UnoControlFixedHyperlinkModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
UnoControlFixedHyperlinkModel( const UnoControlFixedHyperlinkModel& rModel ) : UnoControlModel( rModel ) {;}
UnoControlModel* Clone() const { return new UnoControlFixedHyperlinkModel( *this ); }
@@ -573,7 +578,7 @@ private:
ActionListenerMultiplexer maActionListeners;
public:
- UnoFixedHyperlinkControl();
+ UnoFixedHyperlinkControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
::rtl::OUString GetComponentServiceName();
@@ -621,7 +626,7 @@ protected:
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
public:
- UnoControlFixedTextModel();
+ UnoControlFixedTextModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
UnoControlFixedTextModel( const UnoControlFixedTextModel& rModel ) : UnoControlModel( rModel ) {;}
UnoControlModel* Clone() const { return new UnoControlFixedTextModel( *this ); }
@@ -645,7 +650,7 @@ class UnoFixedTextControl : public UnoControlBase,
public ::com::sun::star::awt::XLayoutConstrains
{
public:
- UnoFixedTextControl();
+ UnoFixedTextControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
::rtl::OUString GetComponentServiceName();
::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoControlBase::queryInterface(rType); }
@@ -686,7 +691,7 @@ protected:
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
public:
- UnoControlGroupBoxModel();
+ UnoControlGroupBoxModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
UnoControlGroupBoxModel( const UnoControlGroupBoxModel& rModel ) : UnoControlModel( rModel ) {;}
UnoControlModel* Clone() const { return new UnoControlGroupBoxModel( *this ); }
@@ -708,7 +713,7 @@ public:
class UnoGroupBoxControl : public UnoControlBase
{
public:
- UnoGroupBoxControl();
+ UnoGroupBoxControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
::rtl::OUString GetComponentServiceName();
sal_Bool SAL_CALL isTransparent( ) throw(::com::sun::star::uno::RuntimeException);
@@ -725,12 +730,20 @@ struct UnoControlListBoxModel_Data;
typedef ::cppu::AggImplInheritanceHelper1 < UnoControlModel
, ::com::sun::star::awt::XItemList
> UnoControlListBoxModel_Base;
-class TOOLKIT_DLLPUBLIC UnoControlListBoxModel :public UnoControlListBoxModel_Base
+class TOOLKIT_DLLPUBLIC UnoControlListBoxModel : public UnoControlListBoxModel_Base
{
protected:
- UnoControlListBoxModel(bool asComboBox);
+ enum ConstructorMode
+ {
+ ConstructDefault,
+ ConstructWithoutProperties
+ };
+
public:
- UnoControlListBoxModel();
+ UnoControlListBoxModel(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory,
+ ConstructorMode const i_mode = ConstructDefault
+ );
UnoControlListBoxModel( const UnoControlListBoxModel& i_rSource );
~UnoControlListBoxModel();
@@ -828,7 +841,7 @@ typedef ::cppu::AggImplInheritanceHelper5 < UnoControlBase
class TOOLKIT_DLLPUBLIC UnoListBoxControl : public UnoListBoxControl_Base
{
public:
- UnoListBoxControl();
+ UnoListBoxControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
::rtl::OUString GetComponentServiceName();
void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
@@ -908,7 +921,7 @@ protected:
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
public:
- UnoControlComboBoxModel();
+ UnoControlComboBoxModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
UnoControlComboBoxModel( const UnoControlComboBoxModel& rModel ) : UnoControlListBoxModel( rModel ) {;}
UnoControlModel* Clone() const { return new UnoControlComboBoxModel( *this ); }
@@ -942,7 +955,7 @@ private:
public:
- UnoComboBoxControl();
+ UnoComboBoxControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
::rtl::OUString GetComponentServiceName();
void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
@@ -1006,10 +1019,10 @@ class UnoSpinFieldControl : public UnoEditControl,
{
private:
SpinListenerMultiplexer maSpinListeners;
- BOOL mbRepeat;
+ sal_Bool mbRepeat;
public:
- UnoSpinFieldControl();
+ UnoSpinFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoEditControl::queryInterface(rType); }
::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
@@ -1047,7 +1060,7 @@ protected:
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
public:
- UnoControlDateFieldModel();
+ UnoControlDateFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
UnoControlDateFieldModel( const UnoControlDateFieldModel& rModel ) : UnoControlModel( rModel ) {;}
UnoControlModel* Clone() const { return new UnoControlDateFieldModel( *this ); }
@@ -1074,7 +1087,7 @@ private:
sal_Int32 mnLast;
sal_Bool mbLongFormat;
public:
- UnoDateFieldControl();
+ UnoDateFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
::rtl::OUString GetComponentServiceName();
::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoSpinFieldControl::queryInterface(rType); }
@@ -1123,7 +1136,7 @@ protected:
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
public:
- UnoControlTimeFieldModel();
+ UnoControlTimeFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
UnoControlTimeFieldModel( const UnoControlTimeFieldModel& rModel ) : UnoControlModel( rModel ) {;}
UnoControlModel* Clone() const { return new UnoControlTimeFieldModel( *this ); }
@@ -1150,7 +1163,7 @@ private:
sal_Int32 mnLast;
public:
- UnoTimeFieldControl();
+ UnoTimeFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
::rtl::OUString GetComponentServiceName();
::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoSpinFieldControl::queryInterface(rType); }
@@ -1198,7 +1211,7 @@ protected:
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
public:
- UnoControlNumericFieldModel();
+ UnoControlNumericFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
UnoControlNumericFieldModel( const UnoControlNumericFieldModel& rModel ) : UnoControlModel( rModel ) {;}
UnoControlModel* Clone() const { return new UnoControlNumericFieldModel( *this ); }
@@ -1225,7 +1238,7 @@ private:
double mnLast;
public:
- UnoNumericFieldControl();
+ UnoNumericFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
::rtl::OUString GetComponentServiceName();
::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoSpinFieldControl::queryInterface(rType); }
@@ -1275,7 +1288,7 @@ protected:
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
public:
- UnoControlCurrencyFieldModel();
+ UnoControlCurrencyFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
UnoControlCurrencyFieldModel( const UnoControlCurrencyFieldModel& rModel ) : UnoControlModel( rModel ) {;}
UnoControlModel* Clone() const { return new UnoControlCurrencyFieldModel( *this ); }
@@ -1302,7 +1315,7 @@ private:
double mnLast;
public:
- UnoCurrencyFieldControl();
+ UnoCurrencyFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
::rtl::OUString GetComponentServiceName();
::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoSpinFieldControl::queryInterface(rType); }
@@ -1351,7 +1364,7 @@ protected:
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
public:
- UnoControlPatternFieldModel();
+ UnoControlPatternFieldModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
UnoControlPatternFieldModel( const UnoControlPatternFieldModel& rModel ) : UnoControlModel( rModel ) {;}
UnoControlModel* Clone() const { return new UnoControlPatternFieldModel( *this ); }
@@ -1377,7 +1390,7 @@ protected:
void ImplSetPeerProperty( const ::rtl::OUString& rPropName, const ::com::sun::star::uno::Any& rVal );
public:
- UnoPatternFieldControl();
+ UnoPatternFieldControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
::rtl::OUString GetComponentServiceName();
::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoSpinFieldControl::queryInterface(rType); }
@@ -1412,7 +1425,7 @@ protected:
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
public:
- UnoControlProgressBarModel();
+ UnoControlProgressBarModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
UnoControlProgressBarModel( const UnoControlProgressBarModel& rModel ) : UnoControlModel( rModel ) {;}
UnoControlModel* Clone() const { return new UnoControlProgressBarModel( *this ); }
@@ -1434,7 +1447,7 @@ class UnoProgressBarControl : public UnoControlBase,
public ::com::sun::star::awt::XProgressBar
{
public:
- UnoProgressBarControl();
+ UnoProgressBarControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
::rtl::OUString GetComponentServiceName();
::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoControlBase::queryInterface(rType); }
@@ -1468,7 +1481,7 @@ protected:
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
public:
- UnoControlFixedLineModel();
+ UnoControlFixedLineModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
UnoControlFixedLineModel( const UnoControlFixedLineModel& rModel ) : UnoControlModel( rModel ) {;}
UnoControlModel* Clone() const { return new UnoControlFixedLineModel( *this ); }
@@ -1490,7 +1503,7 @@ public:
class UnoFixedLineControl : public UnoControlBase
{
public:
- UnoFixedLineControl();
+ UnoFixedLineControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
::rtl::OUString GetComponentServiceName();
sal_Bool SAL_CALL isTransparent( ) throw(::com::sun::star::uno::RuntimeException);
@@ -1501,5 +1514,6 @@ public:
};
+
#endif // _TOOLKIT_HELPER_UNOCONTROLS_HXX_
diff --git a/toolkit/inc/toolkit/helper/listenermultiplexer.hxx b/toolkit/inc/toolkit/helper/listenermultiplexer.hxx
index b4151fe0f35e..408dd4cbe385 100644
--- a/toolkit/inc/toolkit/helper/listenermultiplexer.hxx
+++ b/toolkit/inc/toolkit/helper/listenermultiplexer.hxx
@@ -55,6 +55,7 @@
#include <toolkit/helper/mutexhelper.hxx>
#include <toolkit/helper/macros.hxx>
#include <com/sun/star/awt/grid/XGridSelectionListener.hpp>
+#include <com/sun/star/awt/tab/XTabPageContainerListener.hpp>
// ----------------------------------------------------
// class ListenerMultiplexerBase
// ----------------------------------------------------
@@ -251,5 +252,12 @@ DECL_LISTENERMULTIPLEXER_START_DLLPUB( SelectionListenerMultiplexer, ::com::sun:
void SAL_CALL selectionChanged( const ::com::sun::star::awt::grid::GridSelectionEvent& aEvent ) throw (::com::sun::star::uno::RuntimeException);
DECL_LISTENERMULTIPLEXER_END
+// ----------------------------------------------------
+// class TabPageListenerMultiplexer
+// ----------------------------------------------------
+DECL_LISTENERMULTIPLEXER_START_DLLPUB( TabPageListenerMultiplexer, ::com::sun::star::awt::tab::XTabPageContainerListener )
+ void SAL_CALL tabPageActivated( const ::com::sun::star::awt::tab::TabPageActivatedEvent& aEvent ) throw (::com::sun::star::uno::RuntimeException);
+DECL_LISTENERMULTIPLEXER_END
+
#endif // _TOOLKIT_HELPER_LISTENERMULTIPLEXER_HXX_
diff --git a/toolkit/inc/toolkit/helper/mutexandbroadcasthelper.hxx b/toolkit/inc/toolkit/helper/mutexandbroadcasthelper.hxx
index c84a6e54d73b..4ae1dd17c62f 100644
--- a/toolkit/inc/toolkit/helper/mutexandbroadcasthelper.hxx
+++ b/toolkit/inc/toolkit/helper/mutexandbroadcasthelper.hxx
@@ -39,19 +39,13 @@ class MutexAndBroadcastHelper
public:
MutexAndBroadcastHelper() : BrdcstHelper( Mutex ) {}
-
::osl::Mutex Mutex;
::cppu::OBroadcastHelper BrdcstHelper;
::osl::Mutex& GetMutex() { return Mutex; }
-
+ ::cppu::OBroadcastHelper& GetBroadcastHelper() { return BrdcstHelper; }
};
-
-
-
-
-
#endif // _TOOLKIT_HELPER_MUTEXANDBROADCASTHELPER_HXX
diff --git a/toolkit/inc/toolkit/helper/property.hxx b/toolkit/inc/toolkit/helper/property.hxx
index 837d283f4e8c..c2d6380dcb65 100644
--- a/toolkit/inc/toolkit/helper/property.hxx
+++ b/toolkit/inc/toolkit/helper/property.hxx
@@ -177,7 +177,7 @@ namespace rtl {
#define BASEPROPERTY_TREE_ROOTDISPLAYED 127
#define BASEPROPERTY_TREE_SHOWSHANDLES 128
#define BASEPROPERTY_TREE_SHOWSROOTHANDLES 129
-#define BASEPROPERTY_TREE_ROWHEIGHT 130
+#define BASEPROPERTY_ROW_HEIGHT 130
#define BASEPROPERTY_TREE_INVOKESSTOPNODEEDITING 131
#define BASEPROPERTY_TREE_END 131
#define BASEPROPERTY_DIALOGSOURCEURL 132
@@ -196,12 +196,16 @@ namespace rtl {
#define BASEPROPERTY_ENABLEVISIBLE 145 // sal_Bool
#define BASEPROPERTY_REFERENCE_DEVICE 146
#define BASEPROPERTY_HIGHCONTRASTMODE 147
-#define BASEPROPERTY_GRID_EVEN_ROW_BACKGROUND 148
-#define BASEPROPERTY_GRID_HEADER_BACKGROUND 149
-#define BASEPROPERTY_GRID_LINE_COLOR 150
-#define BASEPROPERTY_GRID_ROW_BACKGROUND 151
+#define BASEPROPERTY_GRID_HEADER_BACKGROUND 148
+#define BASEPROPERTY_GRID_HEADER_TEXT_COLOR 149
+#define BASEPROPERTY_GRID_ROW_BACKGROUND_COLORS 150
+#define BASEPROPERTY_GRID_LINE_COLOR 151
#define BASEPROPERTY_MULTISELECTION_SIMPLEMODE 152
#define BASEPROPERTY_ITEM_SEPARATOR_POS 153
+#define BASEPROPERTY_AUTO_REPEAT 154
+#define BASEPROPERTY_ROW_HEADER_WIDTH 155
+#define BASEPROPERTY_COLUMN_HEADER_HEIGHT 156
+#define BASEPROPERTY_USE_GRID_LINES 157
// Keine gebundenen Properties, werden immer aus der Property BASEPROPERTY_FONTDESCRIPTOR entnommen.
diff --git a/toolkit/inc/toolkit/helper/servicenames.hxx b/toolkit/inc/toolkit/helper/servicenames.hxx
index 2d1df79b733b..27949e9de791 100644
--- a/toolkit/inc/toolkit/helper/servicenames.hxx
+++ b/toolkit/inc/toolkit/helper/servicenames.hxx
@@ -97,12 +97,23 @@ extern const sal_Char __FAR_DATA szServiceName_GridControlModel[];
extern const sal_Char __FAR_DATA szServiceName_DefaultGridDataModel[];
extern const sal_Char __FAR_DATA szServiceName_DefaultGridColumnModel[];
extern const sal_Char __FAR_DATA szServiceName_GridColumn[];
+extern const sal_Char __FAR_DATA szServiceName_SortableGridDataModel[];
extern const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControl[], szServiceName2_UnoSimpleAnimationControl[];
extern const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControlModel[], szServiceName2_UnoSimpleAnimationControlModel[];
extern const sal_Char __FAR_DATA szServiceName_UnoThrobberControl[], szServiceName2_UnoThrobberControl[];
extern const sal_Char __FAR_DATA szServiceName_UnoThrobberControlModel[], szServiceName2_UnoThrobberControlModel[];
+extern const sal_Char __FAR_DATA szServiceName_AnimatedImagesControl[];
+extern const sal_Char __FAR_DATA szServiceName_AnimatedImagesControlModel[];
+extern const sal_Char __FAR_DATA szServiceName_SpinningProgressControlModel[];
extern const sal_Char __FAR_DATA szServiceName_UnoControlFixedHyperlink[], szServiceName_UnoControlFixedHyperlinkModel[];
+extern const sal_Char __FAR_DATA szServiceName_UnoControlTabPageModel[], szServiceName2_UnoControlTabPageModel[];
+extern const sal_Char __FAR_DATA szServiceName_UnoControlTabPage[];
+extern const sal_Char __FAR_DATA szServiceName_UnoControlTabPageContainerModel[];
+extern const sal_Char __FAR_DATA szServiceName_UnoControlTabPageContainer[];
+
+// ExtUnoWrapper:
+extern const char __FAR_DATA szServiceName_ImageProducer[], szServiceName2_ImageProducer[];
#endif // _TOOLKIT_HELPER_SERVICENAMES_HXX_
diff --git a/toolkit/inc/toolkit/helper/throbberimpl.hxx b/toolkit/inc/toolkit/helper/throbberimpl.hxx
deleted file mode 100644
index b944a74b65d2..000000000000
--- a/toolkit/inc/toolkit/helper/throbberimpl.hxx
+++ /dev/null
@@ -1,84 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _TOOLKIT_HELPER_THROBBERIMPL_HXX_
-#define _TOOLKIT_HELPER_THROBBERIMPL_HXX_
-
-#include <toolkit/awt/vclxwindow.hxx>
-#include <com/sun/star/uno/Reference.hxx>
-
-#include <com/sun/star/graphic/XGraphic.hpp>
-#include <vcl/timer.hxx>
-#include <vos/mutex.hxx>
-
-//........................................................................
-namespace toolkit
-//........................................................................
-{
-
- class Throbber_Impl
- {
- private:
- vos::IMutex& mrMutex; // Reference to SolarMutex
- ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > > maImageList;
- ::com::sun::star::uno::Reference< VCLXWindow > mxParent;
-
- sal_Bool mbRepeat;
- sal_Int32 mnStepTime;
- sal_Int32 mnCurStep;
- sal_Int32 mnStepCount;
- AutoTimer maWaitTimer;
-
- DECL_LINK( TimeOutHdl, Throbber_Impl* );
-
- vos::IMutex& GetMutex() { return mrMutex; }
-
- public:
- Throbber_Impl( ::com::sun::star::uno::Reference< VCLXWindow > xParent,
- sal_Int32 nStepTime,
- sal_Bool bRepeat );
- ~Throbber_Impl();
-
- // Properties
- void setStepTime( sal_Int32 nStepTime ) { mnStepTime = nStepTime; }
- void setRepeat( sal_Bool bRepeat ) { mbRepeat = bRepeat; }
-
- // XSimpleAnimation
- void start() throw ( ::com::sun::star::uno::RuntimeException );
- void stop() throw ( ::com::sun::star::uno::RuntimeException );
- void setImageList( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > >& ImageList )
- throw ( ::com::sun::star::uno::RuntimeException );
- // Helpers
- void initImage() throw ( ::com::sun::star::uno::RuntimeException );
- sal_Bool isHCMode() throw ( ::com::sun::star::uno::RuntimeException );
- };
-//........................................................................
-} // namespacetoolkit
-//........................................................................
-
-#endif //_TOOLKIT_HELPER_THROBBERIMPL_HXX_
-
diff --git a/toolkit/inc/toolkit/helper/tkresmgr.hxx b/toolkit/inc/toolkit/helper/tkresmgr.hxx
index d7a1c42ea13c..ea62cd3db361 100644
--- a/toolkit/inc/toolkit/helper/tkresmgr.hxx
+++ b/toolkit/inc/toolkit/helper/tkresmgr.hxx
@@ -70,6 +70,7 @@ public:
// loads the image with the specified resource id
static Image loadImage( sal_uInt16 nResId );
+ static Image getImageFromURL( const ::rtl::OUString& i_rImageURL );
};
diff --git a/toolkit/inc/toolkit/helper/unowrapper.hxx b/toolkit/inc/toolkit/helper/unowrapper.hxx
index 31cc259b7fd0..562d78f34c83 100644
--- a/toolkit/inc/toolkit/helper/unowrapper.hxx
+++ b/toolkit/inc/toolkit/helper/unowrapper.hxx
@@ -60,17 +60,17 @@ public:
virtual void ReleaseAllGraphics( OutputDevice* pOutDev );
// Window
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer> GetWindowInterface( Window* pWindow, BOOL bCreate );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer> GetWindowInterface( Window* pWindow, sal_Bool bCreate );
virtual void SetWindowInterface( Window* pWindow, ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer> xIFace );
void WindowDestroyed( Window* pWindow );
void WindowEvent_Move( Window* pWindow );
void WindowEvent_Resize( Window* pWindow );
- void WindowEvent_Show( Window* pWindow, BOOL bShow );
+ void WindowEvent_Show( Window* pWindow, sal_Bool bShow );
void WindowEvent_Close( Window* pWindow );
void WindowEvent_Minimize( Window* pWindow );
void WindowEvent_Normalize( Window* pWindow );
- void WindowEvent_Activate( Window* pWindow, BOOL bActivated );
+ void WindowEvent_Activate( Window* pWindow, sal_Bool bActivated );
void WindowEvent_MouseButtonUp( Window* pWindow, const MouseEvent& rEvt );
void WindowEvent_MouseButtonDown( Window* pWindow, const MouseEvent& rEvt );
void WindowEvent_MouseMove( Window* pWindow, const MouseEvent& rEvt );
diff --git a/toolkit/prj/build.lst b/toolkit/prj/build.lst
index b851421c6f8e..e11d32c435bf 100644
--- a/toolkit/prj/build.lst
+++ b/toolkit/prj/build.lst
@@ -1,3 +1,3 @@
-ti toolkit : LIBXSLT:libxslt vcl NULL
-ti toolkit\prj nmake - all ti_prj NULL
-ti toolkit\qa\unoapi nmake - all ti_qa_unoapi NULL
+ti toolkit : LIBXSLT:libxslt vcl qadevOOo test NULL
+ti toolkit\prj nmake - all ti_prj NULL
+ti toolkit\qa\complex\toolkit nmake - all ti_complex_toolkit NULL
diff --git a/toolkit/prj/makefile.mk b/toolkit/prj/makefile.mk
index c73a3d944bbf..e312a7ccab65 100644
--- a/toolkit/prj/makefile.mk
+++ b/toolkit/prj/makefile.mk
@@ -37,4 +37,4 @@ VERBOSEFLAG := -s
.ENDIF
all:
- cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET)
+ cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog
diff --git a/toolkit/qa/complex/toolkit/CheckAccessibleStatusBar.java b/toolkit/qa/complex/toolkit/AccessibleStatusBar.java
index cfb40614beab..d4f2329d8f31 100755
--- a/toolkit/qa/complex/toolkit/CheckAccessibleStatusBar.java
+++ b/toolkit/qa/complex/toolkit/AccessibleStatusBar.java
@@ -27,12 +27,15 @@
package complex.toolkit;
-// import complexlib.ComplexTestCase;
-import lib.TestParameters;
+import complex.toolkit.accessibility._XAccessibleEventBroadcaster;
+import complex.toolkit.accessibility._XAccessibleExtendedComponent;
+import complex.toolkit.accessibility._XAccessibleComponent;
+import complex.toolkit.accessibility._XAccessibleContext;
+import java.util.logging.Logger;
+import java.util.logging.Level;
import util.SOfficeFactory;
import util.AccessibilityTools;
import com.sun.star.awt.XWindow;
-// import com.sun.star.chart.XChartDocument;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.lang.XComponent;
import com.sun.star.lang.XServiceInfo;
@@ -45,11 +48,8 @@ import com.sun.star.accessibility.AccessibleRole;
import com.sun.star.accessibility.XAccessible;
import com.sun.star.accessibility.XAccessibleContext;
import com.sun.star.awt.XExtendedToolkit;
-// import java.io.PrintWriter;
-// import org.junit.After;
import org.junit.AfterClass;
-// import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.openoffice.test.OfficeConnection;
@@ -58,26 +58,12 @@ import static org.junit.Assert.*;
/**
*
*/
-public class CheckAccessibleStatusBar {
+public class AccessibleStatusBar {
XInterface testObject = null;
XMultiServiceFactory xMSF = null;
XWindow xWindow = null;
- /**
- * The test parameters
- */
- private static TestParameters param = null;
-
-// public String[] getTestMethodNames() {
-// return new String[]{"checkDocs"};//WriterDoc", "checkDrawDoc",
-//// "checkMathDoc", "checkImpressDoc", "checkCalcDoc"};
-// }
-
-/* public String getTestObjectName() {
- return "com.sun.star.awt.AccessibleStatusBar";
- }
-*/
private XMultiServiceFactory getMSF()
{
final XMultiServiceFactory xMSF1 = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager());
@@ -100,41 +86,13 @@ public class CheckAccessibleStatusBar {
/**
* Check document types
*/
- @Test public void checkDocs() {
- Object doc = param.get("DocType");
- String testDocType;
- if (doc == null)
- {
- testDocType = "all";
- }
- else
- {
- testDocType = (String)doc;
- }
-
- System.out.println("Param was " + doc);
- System.out.println("DocType " + testDocType);
- if (testDocType.equalsIgnoreCase("writer") || testDocType.equalsIgnoreCase("all"))
- {
- checkWriterDoc();
- }
- if (testDocType.equalsIgnoreCase("math") || testDocType.equalsIgnoreCase("all"))
- {
- checkMathDoc();
- }
- if (testDocType.equalsIgnoreCase("draw") || testDocType.equalsIgnoreCase("all"))
- {
- checkDrawDoc();
- }
- if (testDocType.equalsIgnoreCase("impress") || testDocType.equalsIgnoreCase("all"))
- {
- checkImpressDoc();
- }
- if (testDocType.equalsIgnoreCase("calc") || testDocType.equalsIgnoreCase("all"))
- {
- checkCalcDoc();
- }
-
+ @Test
+ public void checkDocs() {
+ checkWriterDoc();
+ checkMathDoc();
+ checkDrawDoc();
+ checkImpressDoc();
+ checkCalcDoc();
}
/**
@@ -150,7 +108,7 @@ public class CheckAccessibleStatusBar {
getTestObject();
}
catch(com.sun.star.uno.Exception e) {
- e.printStackTrace();
+ Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e );
}
runAllInterfaceTests();
@@ -160,7 +118,7 @@ public class CheckAccessibleStatusBar {
xClose.close(false);
}
catch(com.sun.star.util.CloseVetoException e) {
- e.printStackTrace();
+ Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e );
}
}
}
@@ -178,7 +136,7 @@ public class CheckAccessibleStatusBar {
getTestObject();
}
catch(com.sun.star.uno.Exception e) {
- e.printStackTrace();
+ Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e );
}
runAllInterfaceTests();
@@ -188,7 +146,7 @@ public class CheckAccessibleStatusBar {
xClose.close(false);
}
catch(com.sun.star.util.CloseVetoException e) {
- e.printStackTrace();
+ Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e );
}
}
}
@@ -206,7 +164,7 @@ public class CheckAccessibleStatusBar {
getTestObject();
}
catch(com.sun.star.uno.Exception e) {
- e.printStackTrace();
+ Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e );
}
runAllInterfaceTests();
@@ -216,7 +174,7 @@ public class CheckAccessibleStatusBar {
xClose.close(false);
}
catch(com.sun.star.util.CloseVetoException e) {
- e.printStackTrace();
+ Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e );
}
}
}
@@ -234,7 +192,7 @@ public class CheckAccessibleStatusBar {
getTestObject();
}
catch(com.sun.star.uno.Exception e) {
- e.printStackTrace();
+ Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e );
}
runAllInterfaceTests();
@@ -244,7 +202,7 @@ public class CheckAccessibleStatusBar {
xClose.close(false);
}
catch(com.sun.star.util.CloseVetoException e) {
- e.printStackTrace();
+ Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e );
}
}
}
@@ -262,7 +220,7 @@ public class CheckAccessibleStatusBar {
getTestObject();
}
catch(com.sun.star.uno.Exception e) {
- e.printStackTrace();
+ Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e );
}
runAllInterfaceTests();
@@ -272,7 +230,7 @@ public class CheckAccessibleStatusBar {
xClose.close(false);
}
catch(com.sun.star.util.CloseVetoException e) {
- e.printStackTrace();
+ Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e );
}
}
}
@@ -287,12 +245,11 @@ public class CheckAccessibleStatusBar {
xWindow = UnoRuntime.queryInterface(XWindow.class, tk.getActiveTopWindow());
shortWait();
- AccessibilityTools at = new AccessibilityTools();
- XAccessible xRoot = at.getAccessibleObject(xWindow);
+ XAccessible xRoot = AccessibilityTools.getAccessibleObject(xWindow);
XAccessibleContext parentContext = null;
System.out.println("Get the accessible status bar.");
- parentContext = at.getAccessibleObjectForRole(
+ parentContext = AccessibilityTools.getAccessibleObjectForRole(
xRoot, AccessibleRole.STATUS_BAR, "");
shortWait();
System.out.println("...OK.");
@@ -309,11 +266,11 @@ public class CheckAccessibleStatusBar {
testObject=parentContext;
}
catch(com.sun.star.uno.Exception e) {
- e.printStackTrace();
+ Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e );
}
catch(Throwable t) {
System.out.println("Got throwable:");
- t.printStackTrace();
+ Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", t );
}
}
@@ -354,7 +311,7 @@ public class CheckAccessibleStatusBar {
System.out.println("*** Now testing XAccessibleEventBroadcaster ***");
_XAccessibleEventBroadcaster _xAccEvBcast =
- new _XAccessibleEventBroadcaster(testObject, "Pfff", xWindow);
+ new _XAccessibleEventBroadcaster(testObject, xWindow);
assertTrue("failed: XAccessibleEventBroadcaster::addEventListener", _xAccEvBcast._addEventListener());
assertTrue("failed: XAccessibleEventBroadcaster::removeEventListener", _xAccEvBcast._removeEventListener());
}
@@ -362,12 +319,14 @@ public class CheckAccessibleStatusBar {
- @BeforeClass public static void setUpConnection() throws Exception {
+ @BeforeClass
+ public static void setUpConnection() throws Exception {
System.out.println("setUpConnection()");
connection.setUp();
}
- @AfterClass public static void tearDownConnection()
+ @AfterClass
+ public static void tearDownConnection()
throws InterruptedException, com.sun.star.uno.Exception
{
System.out.println("tearDownConnection()");
diff --git a/toolkit/qa/complex/toolkit/CheckAccessibleStatusBarItem.java b/toolkit/qa/complex/toolkit/AccessibleStatusBarItem.java
index 537654c6aacc..edd84651d45e 100755
--- a/toolkit/qa/complex/toolkit/CheckAccessibleStatusBarItem.java
+++ b/toolkit/qa/complex/toolkit/AccessibleStatusBarItem.java
@@ -27,14 +27,16 @@
package complex.toolkit;
-// import complexlib.ComplexTestCase;
-import lib.TestParameters;
-// import util.SOfficeFactory;
-// import complexlib.ComplexTestCase;
+import java.util.logging.Logger;
+import java.util.logging.Level;
+import complex.toolkit.accessibility._XAccessibleEventBroadcaster;
+import complex.toolkit.accessibility._XAccessibleExtendedComponent;
+import complex.toolkit.accessibility._XAccessibleText;
+import complex.toolkit.accessibility._XAccessibleComponent;
+import complex.toolkit.accessibility._XAccessibleContext;
import util.SOfficeFactory;
import util.AccessibilityTools;
import com.sun.star.awt.XWindow;
-// import com.sun.star.chart.XChartDocument;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.lang.XComponent;
import com.sun.star.lang.XServiceInfo;
@@ -47,12 +49,9 @@ import com.sun.star.accessibility.AccessibleRole;
import com.sun.star.accessibility.XAccessible;
import com.sun.star.accessibility.XAccessibleContext;
import com.sun.star.awt.XExtendedToolkit;
-// import java.io.PrintWriter;
-// import org.junit.After;
import org.junit.AfterClass;
-// import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.openoffice.test.OfficeConnection;
@@ -61,35 +60,17 @@ import static org.junit.Assert.*;
/**
*
*/
-public class CheckAccessibleStatusBarItem {
+public class AccessibleStatusBarItem {
XMultiServiceFactory xMSF = null;
XAccessibleContext testObject = null;
XWindow xWindow = null;
- /**
- * The test parameters
- */
- private static TestParameters param = null;
-
-// public String[] getTestMethodNames() {
-// return new String[]{"checkDocs"};//{"checkWriterDoc", "checkDrawDoc",
-//// "checkMathDoc", "checkImpressDoc", "checkCalcDoc"};
-// }
-
- /**
- * Sleeps for 0.5 sec. to allow StarOffice to react on <code>
- * reset</code> call.
- */
- private void shortWait() {
- shortWait(500) ;
- }
-
/**
* Sleeps for a certain time.
* @param Thread is sleeping for this time in milliseconds.
*/
- private void shortWait(int time) {
+ private void shortWait() {
try {
Thread.sleep(500);
} catch (InterruptedException e) {
@@ -100,43 +81,14 @@ public class CheckAccessibleStatusBarItem {
/**
* Check document types
*/
- @Test public void checkDocs()
+ @Test
+ public void checkDocs()
{
- param = new TestParameters();
- Object doc = param.get("DocType");
- String testDocType;
- if (doc == null)
- {
- testDocType = "all";
- }
- else
- {
- testDocType = (String)doc;
- }
-
- System.out.println("Param was " + doc);
- System.out.println("DocType " + testDocType);
- if (testDocType.equalsIgnoreCase("writer") || testDocType.equalsIgnoreCase("all"))
- {
- checkWriterDoc();
- }
- if (testDocType.equalsIgnoreCase("math") || testDocType.equalsIgnoreCase("all"))
- {
- checkMathDoc();
- }
- if (testDocType.equalsIgnoreCase("draw") || testDocType.equalsIgnoreCase("all"))
- {
- checkDrawDoc();
- }
- if (testDocType.equalsIgnoreCase("impress") || testDocType.equalsIgnoreCase("all"))
- {
- checkImpressDoc();
- }
- if (testDocType.equalsIgnoreCase("calc") || testDocType.equalsIgnoreCase("all"))
- {
- checkCalcDoc();
- }
-
+ checkWriterDoc();
+ checkMathDoc();
+ checkDrawDoc();
+ checkImpressDoc();
+ checkCalcDoc();
}
private XMultiServiceFactory getMSF()
@@ -158,7 +110,7 @@ public class CheckAccessibleStatusBarItem {
getTestObject();
}
catch(com.sun.star.uno.Exception e) {
- e.printStackTrace();
+ Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e );
}
runAllInterfaceTests();
@@ -168,7 +120,7 @@ public class CheckAccessibleStatusBarItem {
xClose.close(false);
}
catch(com.sun.star.util.CloseVetoException e) {
- e.printStackTrace();
+ Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e );
}
}
}
@@ -186,7 +138,7 @@ public class CheckAccessibleStatusBarItem {
getTestObject();
}
catch(com.sun.star.uno.Exception e) {
- e.printStackTrace();
+ Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e );
}
runAllInterfaceTests();
@@ -196,7 +148,7 @@ public class CheckAccessibleStatusBarItem {
xClose.close(false);
}
catch(com.sun.star.util.CloseVetoException e) {
- e.printStackTrace();
+ Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e );
}
}
}
@@ -214,7 +166,7 @@ public class CheckAccessibleStatusBarItem {
getTestObject();
}
catch(com.sun.star.uno.Exception e) {
- e.printStackTrace();
+ Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e );
}
runAllInterfaceTests();
@@ -224,7 +176,7 @@ public class CheckAccessibleStatusBarItem {
xClose.close(false);
}
catch(com.sun.star.util.CloseVetoException e) {
- e.printStackTrace();
+ Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e );
}
}
}
@@ -242,7 +194,7 @@ public class CheckAccessibleStatusBarItem {
getTestObject();
}
catch(com.sun.star.uno.Exception e) {
- e.printStackTrace();
+ Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e );
}
runAllInterfaceTests();
@@ -252,7 +204,7 @@ public class CheckAccessibleStatusBarItem {
xClose.close(false);
}
catch(com.sun.star.util.CloseVetoException e) {
- e.printStackTrace();
+ Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e );
}
}
}
@@ -270,7 +222,7 @@ public class CheckAccessibleStatusBarItem {
getTestObject();
}
catch(com.sun.star.uno.Exception e) {
- e.printStackTrace();
+ Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e );
}
runAllInterfaceTests();
@@ -280,7 +232,7 @@ public class CheckAccessibleStatusBarItem {
xClose.close(false);
}
catch(com.sun.star.util.CloseVetoException e) {
- e.printStackTrace();
+ Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e );
}
}
}
@@ -297,35 +249,25 @@ public class CheckAccessibleStatusBarItem {
XWindow.class,tk.getActiveTopWindow());
shortWait();
- AccessibilityTools at = new AccessibilityTools();
- XAccessible xRoot = at.getAccessibleObject(xWindow);
+ XAccessible xRoot = AccessibilityTools.getAccessibleObject(xWindow);
XAccessibleContext parentContext = null;
System.out.println("Get the accessible status bar.");
- parentContext = at.getAccessibleObjectForRole(
+ parentContext = AccessibilityTools.getAccessibleObjectForRole(
xRoot, AccessibleRole.STATUS_BAR, "");
shortWait();
if ( parentContext == null ) {
- System.out.println("Could not get the test object: set the correct focus in the next 30 seconds.");
- shortWait(30000);
- parentContext = at.getAccessibleObjectForRole(
- xRoot, AccessibleRole.STATUS_BAR, "");
-
- if ( parentContext == null )
- {
- fail("Could not create a test object.");
- }
+ fail("Could not create a test object.");
}
System.out.println("...OK.");
testObject=parentContext;
}
catch(com.sun.star.uno.Exception e) {
- e.printStackTrace();
+ Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", e );
}
catch(Throwable t) {
- System.out.println("Got throwable:");
- t.printStackTrace();
+ Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, "caught an exception", t );
}
}
@@ -391,7 +333,7 @@ public class CheckAccessibleStatusBarItem {
System.out.println("*** Now testing XAccessibleEventBroadcaster ***");
_XAccessibleEventBroadcaster _xAccEvBcast =
- new _XAccessibleEventBroadcaster(object, "Pfff", xWindow);
+ new _XAccessibleEventBroadcaster(object, xWindow);
assertTrue("failed: "+accName+" - XAccessibleEventBroadcaster::addEventListener", _xAccEvBcast._addEventListener());
assertTrue("failed: "+accName+" - XAccessibleEventBroadcaster::removeEventListener", _xAccEvBcast._removeEventListener());
diff --git a/toolkit/qa/complex/toolkit/Assert.java b/toolkit/qa/complex/toolkit/Assert.java
new file mode 100755
index 000000000000..93b1a2c490e1
--- /dev/null
+++ b/toolkit/qa/complex/toolkit/Assert.java
@@ -0,0 +1,234 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ *************************************************************************/
+
+package complex.toolkit;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import com.sun.star.uno.UnoRuntime;
+import static org.junit.Assert.*;
+
+/**
+ * provides assertion capabilities not found in {@link org.junit.Assert}
+ * @author frank.schoenheit@oracle.com
+ */
+public class Assert
+{
+ // --------------------------------------------------------------------------------------------------------
+ /** invokes a given method on a given object, and assures a certain exception is caught
+ * @param i_message
+ * is the message to print when the check fails
+ * @param i_object
+ * is the object to invoke the method on
+ * @param i_methodName
+ * is the name of the method to invoke
+ * @param i_methodArgs
+ * are the arguments to pass to the method.
+ * @param i_argClasses
+ * are the classes to assume for the arguments of the methods
+ * @param i_expectedExceptionClass
+ * is the class of the exception to be caught. If this is null,
+ * it means that <em>no</em> exception must be throw by invoking the method.
+ */
+ public static void assertException( final String i_message, final Object i_object, final String i_methodName,
+ final Class[] i_argClasses, final Object[] i_methodArgs, final Class i_expectedExceptionClass )
+ {
+ Class objectClass = i_object.getClass();
+
+ boolean noExceptionAllowed = ( i_expectedExceptionClass == null );
+
+ boolean caughtExpected = noExceptionAllowed ? true : false;
+ try
+ {
+ Method method = impl_getMethod( objectClass, i_methodName, i_argClasses );
+ method.invoke(i_object, i_methodArgs );
+ }
+ catch ( NoSuchMethodException e )
+ {
+ StringBuilder message = new StringBuilder();
+ message.append( "no such method: " ).append( objectClass.getName() ).append( "." ).append( i_methodName ).append( "( " );
+ for ( int i=0; i<i_argClasses.length; ++i )
+ {
+ message.append( i_argClasses[i].getName() );
+ if ( i<i_argClasses.length - 1 )
+ message.append( ", " );
+ }
+ message.append( " )" );
+ fail( message.toString() );
+ }
+ catch ( InvocationTargetException e )
+ {
+ caughtExpected = noExceptionAllowed
+ ? false
+ : ( e.getTargetException().getClass().equals( i_expectedExceptionClass ) );
+ }
+ catch( Exception e )
+ {
+ caughtExpected = false;
+ }
+
+ assertTrue( i_message, caughtExpected );
+ }
+
+ /**
+ * retrieves a method, given by name and parameter signature, from the given class
+ *
+ * The method does somewhat more than simply calling {@link Class.getMethod}. In particular, it recognizes
+ * primitiive parameter types, and attempts to find a method taking the given primitive type, instead of the
+ * type represented by the parameter class.
+ *
+ * For instance, if you have a method <code>foo( int )</code>, {@link Class.getMethod} would not return this
+ * method when you pass <code>Integer.class</code>. <code>impl_getMethod</code> will recognize this, and
+ * properly retrieve the method.
+ *
+ * Note: <code>impl_getMethod</code> is limited in that it will not try all possible combinations of primitive
+ * and non-primitive types. That is, a method like <code>foo( int, Integer, int )</code> is likely to not be
+ * found.
+ *
+ * @param i_obbjectClass
+ * @param i_methodName
+ * @param i_argClasses
+ * @return
+ */
+ private static Method impl_getMethod( final Class i_objectClass, final String i_methodName, final Class[] i_argClasses ) throws NoSuchMethodException
+ {
+ try
+ {
+ return i_objectClass.getMethod( i_methodName, i_argClasses );
+ }
+ catch ( NoSuchMethodException ex )
+ {
+ }
+
+ int substitutedTypes = 0;
+ int substitutedTypesLastRound = 0;
+ final Class[][] substitutionTable = new Class[][] {
+ new Class[] { Long.class, long.class },
+ new Class[] { Integer.class, int.class },
+ new Class[] { Short.class, short.class },
+ new Class[] { Byte.class, byte.class },
+ new Class[] { Double.class, double.class },
+ new Class[] { Float.class, float.class },
+ new Class[] { Character.class, char.class }
+ };
+ do
+ {
+ substitutedTypes = 0;
+ final Class[] argClasses = new Class[ i_argClasses.length ];
+ for ( int i=0; i < argClasses.length; ++i )
+ {
+ argClasses[i] = i_argClasses[i];
+ if ( substitutedTypes > substitutedTypesLastRound )
+ continue;
+
+ for ( int c=0; c<substitutionTable.length; ++c )
+ {
+ if ( i_argClasses[i].equals( substitutionTable[c][0] ) )
+ {
+ argClasses[i] = substitutionTable[c][1];
+ ++substitutedTypes;
+ break;
+ }
+ }
+ }
+ if ( substitutedTypes == substitutedTypesLastRound )
+ throw new NoSuchMethodException();
+ substitutedTypesLastRound = substitutedTypes;
+
+ try
+ {
+ return i_objectClass.getMethod( i_methodName, argClasses );
+ }
+ catch ( NoSuchMethodException e )
+ {
+ }
+ }
+ while ( substitutedTypes > 0 );
+ throw new NoSuchMethodException();
+ }
+
+ /** invokes a given method on a given object, and assures a certain exception is caught
+ * @param i_message is the message to print when the check fails
+ * @param i_object is the object to invoke the method on
+ * @param i_methodName is the name of the method to invoke
+ * @param i_methodArgs are the arguments to pass to the method. Those implicitly define
+ * the classes of the arguments of the method which is called.
+ * @param i_expectedExceptionClass is the class of the exception to be caught. If this is null,
+ * it means that <em>no</em> exception must be throw by invoking the method.
+ */
+ public static void assertException( final String i_message, final Object i_object, final String i_methodName,
+ final Object[] i_methodArgs, final Class i_expectedExceptionClass )
+ {
+ Class[] argClasses = new Class[ i_methodArgs.length ];
+ for ( int i=0; i<i_methodArgs.length; ++i )
+ argClasses[i] = i_methodArgs[i].getClass();
+ assertException( i_message, i_object, i_methodName, argClasses, i_methodArgs, i_expectedExceptionClass );
+ }
+
+ /** invokes a given method on a given object, and assures a certain exception is caught
+ * @param i_object is the object to invoke the method on
+ * @param i_methodName is the name of the method to invoke
+ * @param i_methodArgs are the arguments to pass to the method. Those implicitly define
+ * the classes of the arguments of the method which is called.
+ * @param i_expectedExceptionClass is the class of the exception to be caught. If this is null,
+ * it means that <em>no</em> exception must be throw by invoking the method.
+ */
+ public static void assertException( final Object i_object, final String i_methodName, final Object[] i_methodArgs,
+ final Class i_expectedExceptionClass )
+ {
+ assertException(
+ "did not catch the expected exception (" +
+ ( ( i_expectedExceptionClass == null ) ? "none" : i_expectedExceptionClass.getName() ) +
+ ") while calling " + i_object.getClass().getName() + "." + i_methodName,
+ i_object, i_methodName, i_methodArgs, i_expectedExceptionClass );
+ }
+
+ /** invokes a given method on a given object, and assures a certain exception is caught
+ * @param i_object is the object to invoke the method on
+ * @param i_methodName is the name of the method to invoke
+ * @param i_methodArgs are the arguments to pass to the method
+ * @param i_argClasses are the classes to assume for the arguments of the methods
+ * @param i_expectedExceptionClass is the class of the exception to be caught. If this is null,
+ * it means that <em>no</em> exception must be throw by invoking the method.
+ */
+ public static void assertException( final Object i_object, final String i_methodName, final Class[] i_argClasses,
+ final Object[] i_methodArgs, final Class i_expectedExceptionClass )
+ {
+ assertException(
+ "did not catch the expected exception (" +
+ ( ( i_expectedExceptionClass == null ) ? "none" : i_expectedExceptionClass.getName() ) +
+ ") while calling " + i_object.getClass().getName() + "." + i_methodName,
+ i_object, i_methodName, i_argClasses, i_methodArgs, i_expectedExceptionClass );
+ }
+
+ // --------------------------------------------------------------------------------------------------------
+ public static void assertException( Object i_object, Class _unoInterfaceClass, String i_methodName, Object[] i_methodArgs,
+ Class i_expectedExceptionClass )
+ {
+ assertException( UnoRuntime.queryInterface( _unoInterfaceClass, i_object ), i_methodName,
+ i_methodArgs, i_expectedExceptionClass );
+ }
+}
diff --git a/toolkit/qa/complex/toolkit/CallbackClass.java b/toolkit/qa/complex/toolkit/CallbackClass.java
deleted file mode 100644
index 1c9eb68a6d34..000000000000
--- a/toolkit/qa/complex/toolkit/CallbackClass.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-package complex.toolkit;
-
-import com.sun.star.awt.XCallback;
-// import lib.MultiMethodTest;
-import com.sun.star.lang.XMultiServiceFactory;
-// import com.sun.star.uno.XInterface;
-// import com.sun.star.uno.UnoRuntime;
-// import share.LogWriter;
-
-/**
- * Testing <code>com.sun.star.awt.XRequestCallback</code>
- * interface methods :
- * <ul>
- * <li><code> addCallback()</code></li>
- * </ul> <p>
- * @see com.sun.star.awt.XRequestCallback
- */
-public class CallbackClass implements XCallback{
-
- // private LogWriter log;
-
- private XMultiServiceFactory xMSF;
-
-
- public CallbackClass(XMultiServiceFactory xMSF ) {
-
- this.xMSF = xMSF;
- // this.log = log;
- }
-
-
- /**
- * Callback method which will be called by the asynchronous
- * service where we have added our request before.
- */
- public void notify( Object aData ) {
-
- System.out.println("callback called successfully" );
- }
-}
diff --git a/toolkit/qa/complex/toolkit/CheckAsyncCallback.java b/toolkit/qa/complex/toolkit/CheckAsyncCallback.java
deleted file mode 100644
index 3a1e51729f11..000000000000
--- a/toolkit/qa/complex/toolkit/CheckAsyncCallback.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-package complex.toolkit;
-
-// import complexlib.ComplexTestCase;
-import util.SOfficeFactory;
-// import complex.toolkit.CallbackClass;
-import com.sun.star.awt.XRequestCallback;
-import com.sun.star.lang.XMultiServiceFactory;
-// import com.sun.star.lang.XComponent;
-// import com.sun.star.lang.XServiceInfo;
-import com.sun.star.uno.XInterface;
-import com.sun.star.uno.UnoRuntime;
-// import com.sun.star.awt.XExtendedToolkit;
-// import java.io.PrintWriter;
-
-// import org.junit.After;
-import org.junit.AfterClass;
-// import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.openoffice.test.OfficeConnection;
-import static org.junit.Assert.*;
-
-/**
- *
- */
-public class CheckAsyncCallback /* extends ComplexTestCase*/ {
-
-
- XInterface testObject = null;
- XMultiServiceFactory xMSF = null;
-
-// public String[] getTestMethodNames() {
-// return new String[]{"checkService"};
-// }
-
-/* public String getTestObjectName() {
- return "com.sun.star.awt.AccessibleStatusBar";
- }
-*/
- private XMultiServiceFactory getMSF()
- {
- final XMultiServiceFactory xMSF1 = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager());
- return xMSF1;
- }
-
- /**
- * Sleeps for 0.5 sec. to allow StarOffice to react on <code>
- * reset</code> call.
- */
- private void shortWait() {
- try {
- Thread.sleep(500) ;
- } catch (InterruptedException e) {
- System.out.println("While waiting :" + e) ;
- }
- }
-
- /**
- * Check services
- */
- @Test public void checkService() {
- checkAsyncCallbackService();
-
- }
-
- /**
- * Test the interfaces
- */
- public void checkAsyncCallbackService() {
- runAllInterfaceTests();
- }
-
- public void getTestObject() {
- try {
- xMSF = getMSF();
- SOfficeFactory xSOF = SOfficeFactory.getFactory(xMSF);
-
- XRequestCallback xAsyncCallback = null;
-
- XInterface xIfc = (XInterface)xMSF.createInstance(
- "com.sun.star.awt.AsyncCallback" );
- xAsyncCallback = UnoRuntime.queryInterface(XRequestCallback.class, xIfc);
-
- testObject=xAsyncCallback;
- }
- catch(com.sun.star.uno.Exception e) {
- e.printStackTrace();
- }
- catch(Throwable t) {
- System.out.println("Got throwable:");
- t.printStackTrace();
- }
- }
-
- public void runAllInterfaceTests() {
- getTestObject();
- System.out.println("*** Now testing XRequestCallback ***");
- _XRequestCallback _xRequestCallback =
- new _XRequestCallback(testObject, xMSF );
- assertTrue("failed: XRequestCallback::addCallback", _xRequestCallback._addCallback());
- }
-
- public void checkCallback() {
- getTestObject();
- System.out.println("*** Now testing asynchronous callback service ***");
- XRequestCallback xAsyncCallback = null;
- xAsyncCallback = UnoRuntime.queryInterface(XRequestCallback.class, testObject);
- CallbackClass aCallbackClass = new CallbackClass( xMSF );
- xAsyncCallback.addCallback( aCallbackClass, null );
- }
-
-
-
- @BeforeClass public static void setUpConnection() throws Exception {
- System.out.println("setUpConnection()");
- connection.setUp();
- }
-
- @AfterClass public static void tearDownConnection()
- throws InterruptedException, com.sun.star.uno.Exception
- {
- System.out.println("tearDownConnection()");
- connection.tearDown();
- }
-
- private static final OfficeConnection connection = new OfficeConnection();
-
-
-}
diff --git a/toolkit/qa/complex/toolkit/GridControl.java b/toolkit/qa/complex/toolkit/GridControl.java
new file mode 100755
index 000000000000..a06a52342417
--- /dev/null
+++ b/toolkit/qa/complex/toolkit/GridControl.java
@@ -0,0 +1,687 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2011 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ *************************************************************************/
+
+package complex.toolkit;
+
+import com.sun.star.awt.XControl;
+import com.sun.star.awt.XControlContainer;
+import com.sun.star.awt.XControlModel;
+import com.sun.star.awt.XToolkit;
+import com.sun.star.awt.grid.DefaultGridDataModel;
+import com.sun.star.awt.grid.XGridColumn;
+import com.sun.star.awt.grid.XGridColumnModel;
+import com.sun.star.awt.grid.XGridDataModel;
+import com.sun.star.awt.grid.XMutableGridDataModel;
+import com.sun.star.awt.grid.XSortableMutableGridDataModel;
+import com.sun.star.beans.Pair;
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.container.ContainerEvent;
+import com.sun.star.container.XContainerListener;
+import com.sun.star.container.XNameContainer;
+import com.sun.star.lang.EventObject;
+import com.sun.star.lang.IndexOutOfBoundsException;
+import com.sun.star.lang.XComponent;
+import com.sun.star.lang.XEventListener;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.Exception;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.XComponentContext;
+import com.sun.star.uno.XInterface;
+import com.sun.star.util.XCloneable;
+import complex.toolkit.awtgrid.DummyColumn;
+import complex.toolkit.awtgrid.TMutableGridDataModel;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Random;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import static org.junit.Assert.*;
+import org.openoffice.test.OfficeConnection;
+
+/** is a unit test for the grid control related implementations
+ * @author frank.schoenheit@sun.com
+ */
+public class GridControl
+{
+ // -----------------------------------------------------------------------------------------------------------------
+ public GridControl()
+ {
+ m_context = m_connection.getComponentContext();
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private static void impl_dispose( final Object... i_components )
+ {
+ for ( int i=0; i<i_components.length; ++i )
+ {
+ if ( i_components[i] != null )
+ {
+ final XComponent component = UnoRuntime.queryInterface( XComponent.class, i_components[i] );
+ component.dispose();
+ }
+ }
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private void impl_recreateGridModel() throws Exception
+ {
+ impl_dispose( m_gridControlModel, m_columnModel, m_dataModel );
+
+ // create a grid control model, and ensure it has a proper data and column model already
+ m_gridControlModel = UnoRuntime.queryInterface( XPropertySet.class,
+ createInstance( "com.sun.star.awt.grid.UnoControlGridModel" ) );
+ assertNotNull( "grid control model does not provide XPropertySet interface", m_gridControlModel );
+
+ // ensure that the model has default column/data models
+ m_columnModel = UnoRuntime.queryInterface( XGridColumnModel.class, m_gridControlModel.getPropertyValue( "ColumnModel" ) );
+ assertNotNull( "the control model is expected to have an initial column model", m_columnModel );
+ final XGridDataModel dataModel = UnoRuntime.queryInterface( XGridDataModel.class, m_gridControlModel.getPropertyValue( "GridDataModel" ) );
+ assertNotNull( "the control model is expected to have an initial data model", dataModel );
+ m_dataModel = UnoRuntime.queryInterface( XSortableMutableGridDataModel.class,
+ dataModel );
+ assertNotNull( "the out-of-the-box data model should be mutable and sortable", m_dataModel );
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ @Test
+ public void testGridControlCloning() throws Exception
+ {
+ impl_recreateGridModel();
+
+ // give the test something to compare, actually
+ XGridColumnModel columnModel = UnoRuntime.queryInterface( XGridColumnModel.class,
+ m_gridControlModel.getPropertyValue( "ColumnModel" ) );
+ columnModel.setDefaultColumns( 10 );
+
+ // clone the grid model
+ final XCloneable cloneable = UnoRuntime.queryInterface( XCloneable.class, m_gridControlModel );
+ assertNotNull( "all UnoControlModel's are expected to be cloneable", cloneable );
+
+ final XInterface clone = cloneable.createClone();
+ final XPropertySet clonedProps = UnoRuntime.queryInterface( XPropertySet.class, clone );
+
+ // TODO: check all those generic properties for equality
+
+ // the data model and the column model should have been cloned, too
+ // in particular, the clone should not share the sub models with the orignal
+ final XMutableGridDataModel originalDataModel = UnoRuntime.queryInterface( XMutableGridDataModel.class,
+ m_gridControlModel.getPropertyValue( "GridDataModel" ) );
+ final XMutableGridDataModel clonedDataModel = UnoRuntime.queryInterface( XMutableGridDataModel.class,
+ clonedProps.getPropertyValue( "GridDataModel" ) );
+ assertFalse( "data model should not be shared after cloning", UnoRuntime.areSame( originalDataModel, clonedDataModel ) );
+ impl_assertEquality( originalDataModel, clonedDataModel );
+
+ final XGridColumnModel originalColumnModel = columnModel;
+ final XGridColumnModel clonedColumnModel = UnoRuntime.queryInterface( XGridColumnModel.class,
+ clonedProps.getPropertyValue( "ColumnModel" ) );
+ assertFalse( "column model should not be shared after cloning", UnoRuntime.areSame( originalColumnModel, clonedColumnModel ) );
+ impl_assertEquality( originalColumnModel, clonedColumnModel );
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ @Test
+ public void testDisposal() throws Exception
+ {
+ impl_recreateGridModel();
+
+ final int columnCount = 3;
+ m_columnModel.setDefaultColumns( columnCount );
+
+ // add disposal listeners to all columns so far
+ final XGridColumn[] columns = m_columnModel.getColumns();
+ assertEquals( "creating default columns resulted in unexpected column count", columnCount, columns.length );
+ final DisposeListener[] columnListeners = new DisposeListener[columnCount];
+ for ( int i=0; i<columnCount; ++i )
+ columnListeners[i] = new DisposeListener( columns[i] );
+
+ // add another column, and check that upon removal, it is disposed
+ final int newColumnIndex = m_columnModel.addColumn( m_columnModel.createColumn() );
+ final DisposeListener columnListener = new DisposeListener( m_columnModel.getColumn( newColumnIndex ) );
+ m_columnModel.removeColumn( newColumnIndex );
+ assertTrue( "explicit column removal is expected to dispose the column", columnListener.isDisposed() );
+
+ // by definition, the grid control model is the owner of both the column and the data model. So, setting
+ // a new column/data model should implicitly dispose the old models
+ final DisposeListener oldDataModelListener = new DisposeListener( m_dataModel );
+ final DisposeListener oldColumnModelListener = new DisposeListener( m_columnModel );
+
+ final Object newDataModel = createInstance( "com.sun.star.awt.grid.DefaultGridDataModel" );
+ final Object newColumnModel = createInstance( "com.sun.star.awt.grid.DefaultGridColumnModel" );
+ final DisposeListener newDataModelListener = new DisposeListener( newDataModel );
+ final DisposeListener newColumnModelListener = new DisposeListener( newColumnModel );
+
+ m_gridControlModel.setPropertyValue( "GridDataModel", newDataModel );
+ assertTrue( "setting a new data model failed", impl_areSameInterface( newDataModel, m_gridControlModel.getPropertyValue( "GridDataModel" ) ) );
+ m_gridControlModel.setPropertyValue( "ColumnModel", newColumnModel );
+ assertTrue( "setting a new column model failed", impl_areSameInterface( newColumnModel, m_gridControlModel.getPropertyValue( "ColumnModel" ) ) );
+
+ assertTrue( "old data model has not been disposed", oldDataModelListener.isDisposed() );
+ assertTrue( "old column model has not been disposed", oldColumnModelListener.isDisposed() );
+ for ( int i=0; i<columnCount; ++i )
+ assertTrue( "column no. " + i + " has not been disposed", columnListeners[i].isDisposed() );
+
+ // the same holds if the grid control model itself is disposed - it should dispose the depending models, too
+ assertFalse( "new data model is already disposed - this is unexpected", newDataModelListener.isDisposed() );
+ assertFalse( "new column model is already disposed - this is unexpected", newColumnModelListener.isDisposed() );
+ impl_dispose( m_gridControlModel );
+ assertTrue( "new data model is not disposed after disposing the grid column model", newDataModelListener.isDisposed() );
+ assertTrue( "new column model is not disposed after disposing the grid column model", newColumnModelListener.isDisposed() );
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ /**
+ * tests various aspects of the <code>XMutableGridDataModel</code> interface
+ */
+ @Test
+ public void testMutableGridDataModel() throws Exception
+ {
+ impl_recreateGridModel();
+
+ TMutableGridDataModel test = new TMutableGridDataModel( m_dataModel );
+ test.testAddRow();
+ test.testAddRows();
+ test.testRemoveRow();
+ test.testRemoveAllRows();
+ test.testUpdateCellData();
+ test.testUpdateRowData();
+ test.testUpdateRowHeading();
+ test.cleanup();
+
+ // a somehwat less straight-forward test: the data model is expected to implicitly increase its column count
+ // when you add a row which has more columns than currently known
+ final XMutableGridDataModel dataModel = DefaultGridDataModel.create( m_context );
+ dataModel.addRow( 0, new Object[] { 1 } );
+ assertEquals( "unexpected column count after adding the most simple row", 1, dataModel.getColumnCount() );
+ dataModel.addRow( 1, new Object[] { 1, 2 } );
+ assertEquals( "implicit extension of the column count doesn't work", 2, dataModel.getColumnCount() );
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ @Test
+ public void testGridColumnModel() throws Exception
+ {
+ impl_recreateGridModel();
+
+ ColumnModelListener listener = new ColumnModelListener();
+ m_columnModel.addContainerListener( listener );
+
+ // insert default columns into the previously empty model, ensure we get the right notifications
+ final int defaultColumnsCount = 3;
+ m_columnModel.setDefaultColumns( defaultColumnsCount );
+ impl_assertColumnModelConsistency();
+ List< ContainerEvent > events = listener.assertExclusiveInsertionEvents();
+ listener.reset();
+ assertEquals( "wrong number of events fired by setDefaulColumns", defaultColumnsCount, events.size() );
+ for ( int i=0; i<defaultColumnsCount; ++i )
+ {
+ final ContainerEvent event = events.get(i);
+ final int index = impl_assertInteger( event.Accessor );
+ assertEquals( "unexpected Accessor value in insert notification", i, index );
+ assertTrue( "wrong column object notified in insert notification",
+ impl_areSameInterface( event.Element, m_columnModel.getColumn(i) ) );
+ }
+
+ // insert some more default columns, ensure that all previously existing columns are removed
+ final int moreDefaultColumnsCount = 5;
+ m_columnModel.setDefaultColumns( moreDefaultColumnsCount );
+ impl_assertColumnModelConsistency();
+ assertEquals( "setting default columns is expected to remove all previously existing columns",
+ moreDefaultColumnsCount, m_columnModel.getColumnCount() );
+
+ // in this situation, both removal and insertion events have been notified
+ final List< ContainerEvent > removalEvents = listener.getRemovalEvents();
+ final List< ContainerEvent > insertionEvents = listener.getInsertionEvents();
+ listener.reset();
+
+ // for the removal events, check the indexes
+ assertEquals( "wrong number of columns removed (or notified) upon setting default columns",
+ defaultColumnsCount, removalEvents.size() );
+ for ( int i=0; i<removalEvents.size(); ++i )
+ {
+ final ContainerEvent event = removalEvents.get(i);
+ final int removedIndex = impl_assertInteger( event.Accessor );
+
+ // The implementation is allowed to remove the columns from the beginning, in which case the
+ // index of the removed column must always be 0, since e.g. the second column has index 0
+ // after the first column (which previously had index 0) had been removed.
+ // Alternatively, the implementation is allowed to remove columns from the end, which means
+ // that the column index given in the event is steadily increasing.
+ assertTrue( "unexpected column removal event column index",
+ ( removedIndex == 0 ) || ( removedIndex == removalEvents.size() - 1 - i ) );
+ }
+
+ // for the insertion events, check the indexes as well
+ assertEquals( "wrong number of insertion events when setting default columns over existing columns",
+ moreDefaultColumnsCount, insertionEvents.size() );
+ for ( int i=0; i<insertionEvents.size(); ++i )
+ {
+ final ContainerEvent event = insertionEvents.get(i);
+ final int index = impl_assertInteger( event.Accessor );
+ assertEquals( i, index );
+ }
+
+ // okay, remove all those columns
+ while ( m_columnModel.getColumnCount() != 0 )
+ {
+ final int columnCount = m_columnModel.getColumnCount();
+ final int removeColumnIndex = m_randomGenerator.nextInt( columnCount );
+ m_columnModel.removeColumn( removeColumnIndex );
+ events = listener.assertExclusiveRemovalEvents();
+ listener.reset();
+ assertEquals( "removing a single column should notify a single event", 1, events.size() );
+ final ContainerEvent event = events.get(0);
+ final int removalIndex = impl_assertInteger( event.Accessor );
+ assertEquals( "removing an arbitrary column does not notify the proper accessor",
+ removeColumnIndex, removalIndex );
+ }
+
+ // calling addColumn with a column not created by the given model/implementatoion should not succeed
+ boolean caughtExpected = false;
+ try
+ {
+ m_columnModel.addColumn( new DummyColumn() );
+ }
+ catch( final com.sun.star.lang.IllegalArgumentException e )
+ {
+ assertTrue( impl_areSameInterface( e.Context, m_columnModel ) );
+ caughtExpected = true;
+ }
+ assertTrue( "adding a dummy (self-implemented) grid column to the model should not succeed", caughtExpected );
+
+ // adding a single column to the end should succeed, properly notify, and still be consistent
+ final XGridColumn newColumn = m_columnModel.createColumn();
+ m_columnModel.addColumn( newColumn );
+ impl_assertColumnModelConsistency();
+ events = listener.assertExclusiveInsertionEvents();
+ listener.reset();
+ assertEquals( "addColumn notifies the wrong number of insertion events", 1, events.size() );
+ final int insertionIndex = impl_assertInteger( events.get(0).Accessor );
+ assertEquals( insertionIndex, newColumn.getIndex() );
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ @Test
+ public void testSortableDataModel() throws Exception
+ {
+ impl_recreateGridModel();
+
+ final int colCount = 3;
+ final int rowCount = 10;
+ // initialize with some data
+ final Object[][] data = new Object[][] {
+ new Object[] { 15, 17, 0 },
+ new Object[] { 9, 8, 14 },
+ new Object[] { 17, 2, 16 },
+ new Object[] { 0, 7, 14 },
+ new Object[] { 10, 16, 16 },
+ new Object[] { 2, 8, 10 },
+ new Object[] { 4, 8, 3 },
+ new Object[] { 7, 9, 0 },
+ new Object[] { 15, 6, 19 },
+ new Object[] { 2, 14, 19 }
+ };
+ final Object[] rowHeadings = new Object[] {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
+ };
+ // ensure consistency of the test data
+ assertEquals( rowHeadings.length, rowCount );
+ assertEquals( data.length, rowCount );
+ for ( Object[] rowData : data )
+ assertEquals( rowData.length, colCount );
+
+ // add the test data
+ m_dataModel.addRows( rowHeadings, data );
+ assertEquals( rowCount, m_dataModel.getRowCount() );
+ assertEquals( colCount, m_dataModel.getColumnCount() );
+
+ // sort by each column
+ for ( int colIndex = 0; colIndex < colCount; ++colIndex )
+ {
+ for ( boolean ascending : new boolean[] { true, false } )
+ {
+ m_dataModel.sortByColumn( colIndex, ascending );
+ Pair currentSortOrder = m_dataModel.getCurrentSortOrder();
+ assertEquals( "invalid current sort column (column " + colIndex + ")", ((Integer)currentSortOrder.First).intValue(), colIndex );
+ assertEquals( "invalid current sort direction", ((Boolean)currentSortOrder.Second).booleanValue(), ascending );
+
+ /*for ( int i=0; i<rowCount; ++i )
+ {
+ for ( int j=0; j<colCount; ++j )
+ System.out.print( m_dataModel.getCellData( j, i ).toString() + ", " );
+ System.out.println();
+ }*/
+
+ // verify the data is actually sorted by this column
+ for ( int rowIndex = 0; rowIndex < rowCount - 1; ++rowIndex )
+ {
+ final Object currentValue = m_dataModel.getCellData( colIndex, rowIndex );
+ final int currentIntValue = impl_assertInteger( currentValue );
+ final Object nextValue = m_dataModel.getCellData( colIndex, rowIndex + 1 );
+ final int nextIntValue = impl_assertInteger( nextValue );
+ assertTrue( "data in row " + rowIndex + " is actually not sorted " + ( ascending ? "ascending" : "descending" ),
+ ascending ? currentIntValue <= nextIntValue
+ : currentIntValue >= nextIntValue );
+
+ // ensure the data in the other columns, and the row headings, are sorted as well
+ final Object rowHeading = m_dataModel.getRowHeading( rowIndex );
+ final int unsortedRowIndex = impl_assertInteger( rowHeading );
+ for ( int innerColIndex = 0; innerColIndex < colCount; ++innerColIndex )
+ {
+ assertEquals( "sorted row " + rowIndex + ", unsorted row " + unsortedRowIndex + ", col " + innerColIndex +
+ ": wrong data",
+ data[unsortedRowIndex][innerColIndex], m_dataModel.getCellData( innerColIndex, rowIndex ) );
+ }
+ }
+ }
+ }
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ @Test
+ public void testModelViewInteraction() throws Exception
+ {
+ final List< Object > disposables = new ArrayList< Object >();
+ try
+ {
+ // create a siple dialog model/control/peer trinity
+ final XControlModel dialogModel = createInstance( XControlModel.class, "com.sun.star.awt.UnoControlDialogModel" );
+ disposables.add( dialogModel );
+ final XPropertySet dialogProps = UnoRuntime.queryInterface( XPropertySet.class, dialogModel );
+ dialogProps.setPropertyValue( "Width", 200 );
+ dialogProps.setPropertyValue( "Height", 100 );
+ dialogProps.setPropertyValue( "Title", "Grid Control Unit Test" );
+ final XControl dialogControl = createInstance( XControl.class, "com.sun.star.awt.UnoControlDialog" );
+ disposables.add( dialogControl );
+ dialogControl.setModel( dialogModel );
+ dialogControl.createPeer( createInstance( XToolkit.class, "com.sun.star.awt.Toolkit" ), null );
+
+ // insert a grid control model
+ final XMultiServiceFactory controlModelFactory = UnoRuntime.queryInterface( XMultiServiceFactory.class,
+ dialogModel );
+ XPropertySet gridModelProps = UnoRuntime.queryInterface( XPropertySet.class,
+ controlModelFactory.createInstance( "com.sun.star.awt.grid.UnoControlGridModel" ) );
+ disposables.add( gridModelProps );
+ gridModelProps.setPropertyValue( "PositionX", 6 );
+ gridModelProps.setPropertyValue( "PositionY", 6 );
+ gridModelProps.setPropertyValue( "Width", 188 );
+ gridModelProps.setPropertyValue( "Height", 88 );
+ final XNameContainer modelContainer = UnoRuntime.queryInterface( XNameContainer.class, dialogModel );
+ modelContainer.insertByName( "grid", gridModelProps );
+
+ // check the respective control has been created
+ final XControlContainer controlContainer = UnoRuntime.queryInterface( XControlContainer.class, dialogControl );
+ final XControl gridControl = controlContainer.getControl( "grid" );
+ assertNotNull( "no grid control created in the dialog", gridControl );
+
+ // in the current implementation (not sure this is a good idea at all), the control (more precise: the peer)
+ // ensures that if there are no columns in the column model, but in the data model, then the column model
+ // will implicitly have the needed columns added.
+ // To ensure that clients which rely on this do not break in the future, check this here.
+ final XMutableGridDataModel dataModel = UnoRuntime.queryInterface( XMutableGridDataModel.class,
+ gridModelProps.getPropertyValue( "GridDataModel" ) );
+ assertNotNull( dataModel );
+ assertEquals( 0, dataModel.getColumnCount() );
+
+ final XGridColumnModel columnModel = UnoRuntime.queryInterface( XGridColumnModel.class,
+ gridModelProps.getPropertyValue( "ColumnModel" ) );
+ assertNotNull( columnModel );
+ assertEquals( 0, columnModel.getColumnCount() );
+
+ dataModel.addRow( null, new Object[] { 1, 2, 3 } );
+ assertEquals( 3, dataModel.getColumnCount() );
+ assertEquals( 3, columnModel.getColumnCount() );
+ }
+ finally
+ {
+ impl_dispose( disposables.toArray());
+ }
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private int impl_assertInteger( final Object i_object )
+ {
+ assertTrue( i_object instanceof Integer );
+ return ((Integer)i_object).intValue();
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private void impl_assertColumnModelConsistency() throws IndexOutOfBoundsException
+ {
+ for ( int col = 0; col < m_columnModel.getColumnCount(); ++col )
+ {
+ final XGridColumn column = m_columnModel.getColumn( col );
+ assertNotNull( column );
+ assertEquals( "column/model inconsistency: column " + col + " has a wrong index!", col, column.getIndex() );
+ }
+
+ final XGridColumn[] allColumns = m_columnModel.getColumns();
+ assertEquals( "getColumns returns the wrong number of column objects",
+ m_columnModel.getColumnCount(), allColumns.length );
+ for ( int col = 0; col < m_columnModel.getColumnCount(); ++col )
+ {
+ assertTrue( "getColumns inconsistency", impl_areSameInterface( allColumns[col], m_columnModel.getColumn(col) ) );
+ }
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private void impl_assertEquality( final XGridDataModel i_reference, final XGridDataModel i_compare ) throws IndexOutOfBoundsException
+ {
+ assertNotNull( i_reference );
+ assertNotNull( i_compare );
+
+ assertEquals( "data model comparison: wrong column counts", i_reference.getColumnCount(), i_compare.getColumnCount() );
+ assertEquals( "data model comparison: wrong row counts", i_reference.getRowCount(), i_compare.getRowCount() );
+
+ for ( int row = 0; row < i_reference.getRowCount(); ++row )
+ {
+ assertEquals( "data model comparison: wrong row heading content in row " + row,
+ i_reference.getRowHeading( row ) );
+ for ( int col = 0; col < i_reference.getRowCount(); ++col )
+ {
+ assertEquals( "data model comparison: wrong cell content in cell (" + col + ", " + row + ")",
+ i_reference.getCellData( col, row ) );
+ assertEquals( "data model comparison: wrong tooltip content in cell (" + col + ", " + row + ")",
+ i_reference.getCellToolTip( col, row ) );
+ }
+ }
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private void impl_assertEquality( final XGridColumnModel i_reference, final XGridColumnModel i_compare ) throws IndexOutOfBoundsException
+ {
+ assertEquals( "column model comparison: wrong column counts", i_reference.getColumnCount(), i_compare.getColumnCount() );
+ for ( int col = 0; col < i_reference.getColumnCount(); ++col )
+ {
+ final XGridColumn referenceColumn = i_reference.getColumn( col );
+ final XGridColumn compareColumn = i_compare.getColumn( col );
+ impl_assertEquality( referenceColumn, compareColumn );
+ }
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private void impl_assertEquality( final XGridColumn i_reference, final XGridColumn i_compare )
+ {
+ final Method[] methods = XGridColumn.class.getMethods();
+ for ( int m=0; m<methods.length; ++m )
+ {
+ if ( !methods[m].getName().startsWith( "get" ) )
+ continue;
+ try
+ {
+ final Object referenceValue = methods[m].invoke( i_reference );
+ final Object compareValue = methods[m].invoke( i_compare );
+ assertEquals( "grid column comparison: column attribute '" + methods[m].getName().substring(3) + "' does not match",
+ referenceValue, compareValue );
+ }
+ catch ( java.lang.Exception ex )
+ {
+ fail( " could not retrieve object attributes: " + ex.toString() );
+ }
+ }
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private boolean impl_areSameInterface( final Object i_lhs, final Object i_rhs )
+ {
+ final XInterface lhs = UnoRuntime.queryInterface( XInterface.class, i_lhs );
+ final XInterface rhs = UnoRuntime.queryInterface( XInterface.class, i_rhs );
+ return UnoRuntime.areSame( lhs, rhs );
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ @BeforeClass
+ public static void setUpConnection() throws java.lang.Exception
+ {
+ System.out.println( "--------------------------------------------------------------------------------" );
+ System.out.println( "starting class: " + GridControl.class.getName() );
+ System.out.print( "connecting ... " );
+ m_connection.setUp();
+ System.out.println( "done.");
+
+ final long seed = m_randomGenerator.nextLong();
+ m_randomGenerator.setSeed( seed );
+ System.out.println( "seeding random number generator with " + seed );
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ @AfterClass
+ public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ System.out.println();
+ System.out.println( "tearing down connection" );
+ m_connection.tearDown();
+ System.out.println( "finished class: " + GridControl.class.getName() );
+ System.out.println( "--------------------------------------------------------------------------------" );
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ public <T> T createInstance( Class<T> i_interfaceClass, final String i_serviceIndentifer ) throws Exception
+ {
+ return UnoRuntime.queryInterface( i_interfaceClass, createInstance( i_serviceIndentifer ) );
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private Object createInstance( final String i_serviceName ) throws Exception
+ {
+ Object instance = m_context.getServiceManager().createInstanceWithContext( i_serviceName, m_context );
+ assertNotNull( "could not create an instance of '" + i_serviceName + "'", instance );
+ return instance;
+ }
+ // -----------------------------------------------------------------------------------------------------------------
+ private static final class DisposeListener implements XEventListener
+ {
+ DisposeListener( final Object i_component )
+ {
+ m_component = UnoRuntime.queryInterface( XComponent.class, i_component );
+ assertNotNull( m_component );
+ m_component.addEventListener( this );
+ }
+
+ public void disposing( EventObject i_event )
+ {
+ assertTrue( UnoRuntime.areSame( i_event.Source, m_component ) );
+ m_isDisposed = true;
+ }
+
+ final boolean isDisposed() { return m_isDisposed; }
+
+ private final XComponent m_component;
+ private boolean m_isDisposed;
+ };
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private static final class ColumnModelListener implements XContainerListener
+ {
+ ColumnModelListener()
+ {
+ }
+
+ public void elementInserted( ContainerEvent i_event )
+ {
+ m_insertionEvents.add( i_event );
+ }
+
+ public void elementRemoved( ContainerEvent i_event )
+ {
+ m_removalEvents.add( i_event );
+ }
+
+ public void elementReplaced( ContainerEvent i_event )
+ {
+ m_replacementEvents.add( i_event );
+ }
+
+ public void disposing( EventObject eo )
+ {
+ m_isDisposed = true;
+ }
+
+ private List< ContainerEvent > assertExclusiveInsertionEvents()
+ {
+ assertFalse( m_insertionEvents.isEmpty() );
+ assertTrue( m_removalEvents.isEmpty() );
+ assertTrue( m_replacementEvents.isEmpty() );
+ return m_insertionEvents;
+ }
+
+ private List< ContainerEvent > assertExclusiveRemovalEvents()
+ {
+ assertTrue( m_insertionEvents.isEmpty() );
+ assertFalse( m_removalEvents.isEmpty() );
+ assertTrue( m_replacementEvents.isEmpty() );
+ return m_removalEvents;
+ }
+
+ private void reset()
+ {
+ m_insertionEvents = new ArrayList< ContainerEvent >();
+ m_removalEvents = new ArrayList< ContainerEvent >();
+ m_replacementEvents = new ArrayList< ContainerEvent >();
+ }
+
+ private List< ContainerEvent > getInsertionEvents() { return m_insertionEvents; }
+ private List< ContainerEvent > getRemovalEvents() { return m_removalEvents; }
+
+ final boolean isDisposed() { return m_isDisposed; }
+
+ private List< ContainerEvent > m_insertionEvents = new ArrayList< ContainerEvent >();
+ private List< ContainerEvent > m_removalEvents = new ArrayList< ContainerEvent >();
+ private List< ContainerEvent > m_replacementEvents = new ArrayList< ContainerEvent >();
+ private boolean m_isDisposed = false;
+ };
+
+ // -----------------------------------------------------------------------------------------------------------------
+ private static final OfficeConnection m_connection = new OfficeConnection();
+ private static Random m_randomGenerator = new Random();
+ private final XComponentContext m_context;
+
+ private XPropertySet m_gridControlModel;
+ private XGridColumnModel m_columnModel;
+ private XSortableMutableGridDataModel m_dataModel;
+}
diff --git a/toolkit/qa/complex/toolkit/UnitConversion.java b/toolkit/qa/complex/toolkit/UnitConversion.java
new file mode 100644
index 000000000000..b4cf8a8e1490
--- /dev/null
+++ b/toolkit/qa/complex/toolkit/UnitConversion.java
@@ -0,0 +1,247 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+package complex.toolkit;
+
+import com.sun.star.awt.XUnitConversion;
+import com.sun.star.uno.UnoRuntime;
+
+import com.sun.star.awt.XWindow;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.awt.XWindowPeer;
+
+import util.DesktopTools;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
+
+/**
+ * This complex test is only for testing the com.sun.star.awt.XUnitConversion methods
+ * These are converter methods to get the size of a well known awt component
+ * in a com.sun.star.util.MeasureUnit you want.
+ * You don't need to know the factors to calculate by hand.
+ *
+ * @author ll93751
+ */
+public class UnitConversion
+{
+ /**
+ * returns the delta value between a and b
+ * @param a
+ * @param b
+ * @return
+ */
+ private int delta(int a, int b)
+ {
+ final int n = Math.abs(a - b);
+ return n;
+ }
+
+ private XUnitConversion m_xConversion = null;
+
+ /**
+ * Not really a check,
+ * only a simple test call to convertSizeToLogic(...) with different parameters
+ * @param _aSize
+ * @param _aMeasureUnit
+ * @param _sEinheit
+ */
+ private void checkSize(com.sun.star.awt.Size _aSize, short _aMeasureUnit, String _sEinheit)
+ {
+ try
+ {
+ com.sun.star.awt.Size aSizeIn = m_xConversion.convertSizeToLogic(_aSize, _aMeasureUnit);
+ System.out.println("Window size:");
+ System.out.println("Width:" + aSizeIn.Width + " " + _sEinheit);
+ System.out.println("Height:" + aSizeIn.Height + " " + _sEinheit);
+ System.out.println("");
+ }
+ catch (com.sun.star.lang.IllegalArgumentException e)
+ {
+ System.out.println("Caught IllegalArgumentException in convertSizeToLogic with '" + _sEinheit + "' " + e.getMessage());
+ }
+ }
+
+ /**
+ * The real test function
+ * 1. try to get the XMultiServiceFactory of an already running office. Therefore make sure an (open|star)office is running with
+ * parameters like -accept="socket,host=localhost,port=8100;urp;"
+ * 2. try to create an empty window
+ * 3. try to convert the WindowPeer to an XWindow
+ * 4. try to resize and move the window to an other position, so we get a well knowing position and size.
+ * 5. run some more tests
+ *
+ * If no test fails, the test is well done and returns with 'PASSED, OK'
+ *
+ */
+ @Test
+ public void testXUnitConversion()
+ {
+ final XMultiServiceFactory xMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager());
+
+ assertNotNull("failed: There is no office.", xMSF);
+
+ // create a window
+ XWindowPeer xWindowPeer = DesktopTools.createFloatingWindow(xMSF);
+ assertNotNull("failed: there is no window peer", xWindowPeer);
+
+
+ // resize and move the window to a well known position and size
+ XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, xWindowPeer);
+ assertNotNull("failed: there is no window, cast wrong?", xWindow);
+
+ xWindow.setVisible(Boolean.TRUE);
+
+ int x = 100;
+ int y = 100;
+ int width = 640;
+ int height = 480;
+ xWindow.setPosSize(x, y, width, height, com.sun.star.awt.PosSize.POSSIZE);
+
+ com.sun.star.awt.Rectangle aRect = xWindow.getPosSize();
+ com.sun.star.awt.Point aPoint = new com.sun.star.awt.Point(aRect.X, aRect.Y);
+ com.sun.star.awt.Size aSize = new com.sun.star.awt.Size(aRect.Width, aRect.Height);
+
+ System.out.println("Window position and size in pixel:");
+ System.out.println("X:" + aPoint.X);
+ System.out.println("Y:" + aPoint.Y);
+ System.out.println("Width:" + aSize.Width);
+ System.out.println("Height:" + aSize.Height);
+ System.out.println("");
+
+ assertTrue("Window pos size wrong", aSize.Width == width && aSize.Height == height && aPoint.X == x && aPoint.Y == y);
+
+ m_xConversion = UnoRuntime.queryInterface(XUnitConversion.class, xWindowPeer);
+
+ // try to get the position of the window in 1/100mm with the XUnitConversion method
+ try
+ {
+ com.sun.star.awt.Point aPointInMM_100TH = m_xConversion.convertPointToLogic(aPoint, com.sun.star.util.MeasureUnit.MM_100TH);
+ System.out.println("Window position:");
+ System.out.println("X:" + aPointInMM_100TH.X + " 1/100mm");
+ System.out.println("Y:" + aPointInMM_100TH.Y + " 1/100mm");
+ System.out.println("");
+ }
+ catch (com.sun.star.lang.IllegalArgumentException e)
+ {
+ fail("failed: IllegalArgumentException caught in convertPointToLogic " + e.getMessage());
+ }
+
+ // try to get the size of the window in 1/100mm with the XUnitConversion method
+ com.sun.star.awt.Size aSizeInMM_100TH = null;
+ com.sun.star.awt.Size aSizeInMM_10TH = null;
+ try
+ {
+ aSizeInMM_100TH = m_xConversion.convertSizeToLogic(aSize, com.sun.star.util.MeasureUnit.MM_100TH);
+ System.out.println("Window size:");
+ System.out.println("Width:" + aSizeInMM_100TH.Width + " 1/100mm");
+ System.out.println("Height:" + aSizeInMM_100TH.Height + " 1/100mm");
+ System.out.println("");
+
+ // try to get the size of the window in 1/10mm with the XUnitConversion method
+
+ aSizeInMM_10TH = m_xConversion.convertSizeToLogic(aSize, com.sun.star.util.MeasureUnit.MM_10TH);
+ System.out.println("Window size:");
+ System.out.println("Width:" + aSizeInMM_10TH.Width + " 1/10mm");
+ System.out.println("Height:" + aSizeInMM_10TH.Height + " 1/10mm");
+ System.out.println("");
+
+ // check the size with a delta which must be smaller a given difference
+ assertTrue("Size.Width not correct", delta(aSizeInMM_100TH.Width, aSizeInMM_10TH.Width * 10) < 10);
+ assertTrue("Size.Height not correct", delta(aSizeInMM_100TH.Height, aSizeInMM_10TH.Height * 10) < 10);
+
+ // new
+ checkSize(aSize, com.sun.star.util.MeasureUnit.PIXEL, "pixel");
+ checkSize(aSize, com.sun.star.util.MeasureUnit.APPFONT, "appfont");
+ checkSize(aSize, com.sun.star.util.MeasureUnit.SYSFONT, "sysfont");
+
+ // simply check some more parameters
+ checkSize(aSize, com.sun.star.util.MeasureUnit.MM, "mm");
+ checkSize(aSize, com.sun.star.util.MeasureUnit.CM, "cm");
+ checkSize(aSize, com.sun.star.util.MeasureUnit.INCH_1000TH, "1/1000inch");
+ checkSize(aSize, com.sun.star.util.MeasureUnit.INCH_100TH, "1/100inch");
+ checkSize(aSize, com.sun.star.util.MeasureUnit.INCH_10TH, "1/10inch");
+ checkSize(aSize, com.sun.star.util.MeasureUnit.INCH, "inch");
+ // checkSize(aSize, com.sun.star.util.MeasureUnit.M, "m");
+ checkSize(aSize, com.sun.star.util.MeasureUnit.POINT, "point");
+ checkSize(aSize, com.sun.star.util.MeasureUnit.TWIP, "twip");
+ // checkSize(aSize, com.sun.star.util.MeasureUnit.KM, "km");
+ // checkSize(aSize, com.sun.star.util.MeasureUnit.PICA, "pica");
+ // checkSize(aSize, com.sun.star.util.MeasureUnit.FOOT, "foot");
+ // checkSize(aSize, com.sun.star.util.MeasureUnit.MILE, "mile");
+ }
+ catch (com.sun.star.lang.IllegalArgumentException e)
+ {
+ fail("failed: IllegalArgumentException caught in convertSizeToLogic " + e.getMessage());
+ }
+
+ // convert the 1/100mm window size back to pixel
+ try
+ {
+ com.sun.star.awt.Size aNewSize = m_xConversion.convertSizeToPixel(aSizeInMM_100TH, com.sun.star.util.MeasureUnit.MM_100TH);
+ System.out.println("Window size:");
+ System.out.println("Width:" + aNewSize.Width + " pixel");
+ System.out.println("Height:" + aNewSize.Height + " pixel");
+
+ // assure the pixels are the same as we already know
+ assertTrue("failed: Size from pixel to 1/100mm to pixel", aSize.Width == aNewSize.Width && aSize.Height == aNewSize.Height);
+ }
+ catch (com.sun.star.lang.IllegalArgumentException e)
+ {
+ fail("failed: IllegalArgumentException caught in convertSizeToPixel " + e.getMessage());
+ }
+
+ // close the window.
+ // IMHO a little bit stupid, but the XWindow doesn't support a XCloseable interface
+ xWindow.dispose();
+ }
+
+ @BeforeClass
+ public static void setUpConnection() throws Exception
+ {
+ System.out.println( "--------------------------------------------------------------------------------" );
+ System.out.println( "starting class: " + UnitConversion.class.getName() );
+ System.out.println( "connecting ..." );
+ connection.setUp();
+ }
+
+ @AfterClass
+ public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ System.out.println();
+ System.out.println( "tearing down connection" );
+ connection.tearDown();
+ System.out.println( "finished class: " + UnitConversion.class.getName() );
+ System.out.println( "--------------------------------------------------------------------------------" );
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
+}
diff --git a/toolkit/qa/complex/toolkit/_XRequestCallback.java b/toolkit/qa/complex/toolkit/_XRequestCallback.java
deleted file mode 100644
index b9486c04c80a..000000000000
--- a/toolkit/qa/complex/toolkit/_XRequestCallback.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-package complex.toolkit;
-
-import com.sun.star.awt.XRequestCallback;
-// import lib.MultiMethodTest;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.uno.XInterface;
-import com.sun.star.uno.UnoRuntime;
-// import share.LogWriter;
-
-/**
- * Testing <code>com.sun.star.awt.XRequestCallback</code>
- * interface methods :
- * <ul>
- * <li><code> addCallback()</code></li>
- * </ul> <p>
- * @see com.sun.star.awt.XRequestCallback
- */
-public class _XRequestCallback {
-
- // private LogWriter log;
-
- private static final String className =
- "com.sun.star.awt.XRequestCallback" ;
-
- public XRequestCallback oObj = null;
- private XMultiServiceFactory xMSF;
-
- String text = null;
-
-
- public _XRequestCallback(XInterface object, XMultiServiceFactory xMSF ) {
- oObj = UnoRuntime.queryInterface(XRequestCallback.class, object);
- this.xMSF = xMSF;
- // this.log = log;
- }
-
-
- /**
- * Calls the method and checks returned value.
- * Has OK status if returned value is equal to <code>chCount - 1</code>.
- * The following method tests are to be executed before:
- * <ul>
- * <li> <code>addCallback()</code> </li>
- * </ul>
- * @return
- */
- public boolean _addCallback() {
-
- boolean res = true;
- try {
- Object a = new Object();
- oObj.addCallback( null, a );
- } catch (com.sun.star.uno.RuntimeException ie) {
- res = false;
- }
- System.out.println("addCallback called" );
-
- return res;
- }
-
-}
diff --git a/toolkit/qa/complex/toolkit/_XAccessibleComponent.java b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleComponent.java
index ae3e293e50fc..7dca37ce18b7 100644..100755
--- a/toolkit/qa/complex/toolkit/_XAccessibleComponent.java
+++ b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleComponent.java
@@ -25,9 +25,8 @@
*
************************************************************************/
-package complex.toolkit;
+package complex.toolkit.accessibility;
-// import share.LogWriter;
import com.sun.star.awt.Point;
import com.sun.star.awt.Rectangle;
import com.sun.star.awt.Size;
diff --git a/toolkit/qa/complex/toolkit/_XAccessibleContext.java b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleContext.java
index de2928fdabe3..14debda92cd8 100644..100755
--- a/toolkit/qa/complex/toolkit/_XAccessibleContext.java
+++ b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleContext.java
@@ -25,7 +25,7 @@
*
************************************************************************/
-package complex.toolkit;
+package complex.toolkit.accessibility;
import com.sun.star.lang.Locale;
import com.sun.star.uno.XInterface;
diff --git a/toolkit/qa/complex/toolkit/_XAccessibleEventBroadcaster.java b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleEventBroadcaster.java
index 899028daec87..535c7ce36c68 100644..100755
--- a/toolkit/qa/complex/toolkit/_XAccessibleEventBroadcaster.java
+++ b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleEventBroadcaster.java
@@ -25,7 +25,7 @@
*
************************************************************************/
-package complex.toolkit;
+package complex.toolkit.accessibility;
import com.sun.star.lang.EventObject;
import com.sun.star.awt.Rectangle;
@@ -33,13 +33,11 @@ import com.sun.star.awt.PosSize;
import com.sun.star.awt.XWindow;
import com.sun.star.accessibility.AccessibleEventObject;
import com.sun.star.accessibility.XAccessible;
-// import com.sun.star.accessibility.XAccessibleComponent;
import com.sun.star.accessibility.XAccessibleEventBroadcaster;
import com.sun.star.accessibility.XAccessibleEventListener;
import com.sun.star.accessibility.XAccessibleContext;
import com.sun.star.uno.XInterface;
import com.sun.star.uno.UnoRuntime;
-// import share.LogWriter;
/**
* Testing <code>
@@ -62,12 +60,7 @@ import com.sun.star.uno.UnoRuntime;
*/
public class _XAccessibleEventBroadcaster {
- // private LogWriter log;
- private static final String className =
- "com.sun.star.accessibility.XAccessibleEventBroadcaster" ;
-
public XAccessibleEventBroadcaster oObj = null;
- public String EventMsg = "";
EventProducer prod = null ;
EvListener list = new EvListener();
@@ -120,11 +113,9 @@ public class _XAccessibleEventBroadcaster {
* @param eventMessage
* @param window
*/
- public _XAccessibleEventBroadcaster(XInterface object, String eventMessage, XWindow window) {
+ public _XAccessibleEventBroadcaster(XInterface object, XWindow window) {
oObj = UnoRuntime.queryInterface(XAccessibleEventBroadcaster.class, object);
- // this.log = log;
prod = new EventProducer(window);
- EventMsg = eventMessage;
}
/**
@@ -157,7 +148,6 @@ public class _XAccessibleEventBroadcaster {
oObj.removeEventListener(list);
}
-// System.out.println(EventMsg);
return works;
}
diff --git a/toolkit/qa/complex/toolkit/_XAccessibleExtendedComponent.java b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleExtendedComponent.java
index 2ba5c190cf31..551b00acada7 100644..100755
--- a/toolkit/qa/complex/toolkit/_XAccessibleExtendedComponent.java
+++ b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleExtendedComponent.java
@@ -25,7 +25,7 @@
*
************************************************************************/
-package complex.toolkit;
+package complex.toolkit.accessibility;
// import lib.MultiMethodTest;
import com.sun.star.accessibility.XAccessibleExtendedComponent;
diff --git a/toolkit/qa/complex/toolkit/_XAccessibleText.java b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleText.java
index 151e6b3f7d0b..a12d93a2d9e2 100644..100755
--- a/toolkit/qa/complex/toolkit/_XAccessibleText.java
+++ b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleText.java
@@ -25,7 +25,7 @@
*
************************************************************************/
-package complex.toolkit;
+package complex.toolkit.accessibility;
import com.sun.star.accessibility.XAccessibleText;
// import lib.MultiMethodTest;
diff --git a/toolkit/qa/complex/toolkit/awtgrid/DummyColumn.java b/toolkit/qa/complex/toolkit/awtgrid/DummyColumn.java
new file mode 100755
index 000000000000..11e4a4b19f80
--- /dev/null
+++ b/toolkit/qa/complex/toolkit/awtgrid/DummyColumn.java
@@ -0,0 +1,180 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ *************************************************************************/
+
+package complex.toolkit.awtgrid;
+
+import com.sun.star.awt.grid.XGridColumn;
+import com.sun.star.awt.grid.XGridColumnListener;
+import com.sun.star.lang.IllegalArgumentException;
+import com.sun.star.lang.XEventListener;
+import com.sun.star.style.HorizontalAlignment;
+import com.sun.star.util.XCloneable;
+
+/**
+ * a dummy implementation of css.awt.grid.XGridColumn
+ * @author frank.schoenheit@oracle.com
+ */
+public class DummyColumn implements XGridColumn
+{
+ public DummyColumn()
+ {
+ }
+
+ public Object getIdentifier()
+ {
+ throw new UnsupportedOperationException( "Not supported yet." );
+ }
+
+ public void setIdentifier( Object o )
+ {
+ throw new UnsupportedOperationException( "Not supported yet." );
+ }
+
+ public int getColumnWidth()
+ {
+ throw new UnsupportedOperationException( "Not supported yet." );
+ }
+
+ public void setColumnWidth( int i )
+ {
+ throw new UnsupportedOperationException( "Not supported yet." );
+ }
+
+ public int getMinWidth()
+ {
+ throw new UnsupportedOperationException( "Not supported yet." );
+ }
+
+ public void setMinWidth( int i )
+ {
+ throw new UnsupportedOperationException( "Not supported yet." );
+ }
+
+ public int getMaxWidth()
+ {
+ throw new UnsupportedOperationException( "Not supported yet." );
+ }
+
+ public void setMaxWidth( int i )
+ {
+ throw new UnsupportedOperationException( "Not supported yet." );
+ }
+
+ public boolean getResizeable()
+ {
+ throw new UnsupportedOperationException( "Not supported yet." );
+ }
+
+ public void setResizeable( boolean bln )
+ {
+ throw new UnsupportedOperationException( "Not supported yet." );
+ }
+
+ public int getFlexibility()
+ {
+ throw new UnsupportedOperationException( "Not supported yet." );
+ }
+
+ public void setFlexibility( int i ) throws IllegalArgumentException
+ {
+ throw new UnsupportedOperationException( "Not supported yet." );
+ }
+
+ public HorizontalAlignment getHorizontalAlign()
+ {
+ throw new UnsupportedOperationException( "Not supported yet." );
+ }
+
+ public void setHorizontalAlign( HorizontalAlignment ha )
+ {
+ throw new UnsupportedOperationException( "Not supported yet." );
+ }
+
+ public String getTitle()
+ {
+ throw new UnsupportedOperationException( "Not supported yet." );
+ }
+
+ public void setTitle( String string )
+ {
+ throw new UnsupportedOperationException( "Not supported yet." );
+ }
+
+ public String getHelpText()
+ {
+ throw new UnsupportedOperationException( "Not supported yet." );
+ }
+
+ public void setHelpText( String string )
+ {
+ throw new UnsupportedOperationException( "Not supported yet." );
+ }
+
+ public int getIndex()
+ {
+ throw new UnsupportedOperationException( "Not supported yet." );
+ }
+
+ public int getDataColumnIndex()
+ {
+ throw new UnsupportedOperationException( "Not supported yet." );
+ }
+
+ public void setDataColumnIndex( int i )
+ {
+ throw new UnsupportedOperationException( "Not supported yet." );
+ }
+
+ public void addGridColumnListener( XGridColumnListener xl )
+ {
+ throw new UnsupportedOperationException( "Not supported yet." );
+ }
+
+ public void removeGridColumnListener( XGridColumnListener xl )
+ {
+ throw new UnsupportedOperationException( "Not supported yet." );
+ }
+
+ public void dispose()
+ {
+ throw new UnsupportedOperationException( "Not supported yet." );
+ }
+
+ public void addEventListener( XEventListener xl )
+ {
+ throw new UnsupportedOperationException( "Not supported yet." );
+ }
+
+ public void removeEventListener( XEventListener xl )
+ {
+ throw new UnsupportedOperationException( "Not supported yet." );
+ }
+
+ public XCloneable createClone()
+ {
+ throw new UnsupportedOperationException( "Not supported yet." );
+ }
+}
diff --git a/toolkit/qa/complex/toolkit/awtgrid/GridDataListener.java b/toolkit/qa/complex/toolkit/awtgrid/GridDataListener.java
new file mode 100755
index 000000000000..c31f27796cf1
--- /dev/null
+++ b/toolkit/qa/complex/toolkit/awtgrid/GridDataListener.java
@@ -0,0 +1,98 @@
+package complex.toolkit.awtgrid;
+
+import com.sun.star.awt.grid.GridDataEvent;
+import com.sun.star.awt.grid.XGridDataListener;
+import com.sun.star.lang.EventObject;
+import static org.junit.Assert.*;
+
+final public class GridDataListener implements XGridDataListener
+{
+ public GridDataListener()
+ {
+ }
+
+ public void rowsInserted( GridDataEvent i_event )
+ {
+ assertNull( m_rowInsertionEvent );
+ m_rowInsertionEvent = i_event;
+ }
+
+ public void rowsRemoved( GridDataEvent i_event )
+ {
+ assertNull( m_rowRemovalEvent );
+ m_rowRemovalEvent = i_event;
+ }
+
+ public void dataChanged( GridDataEvent i_event )
+ {
+ assertNull( m_dataChangeEvent );
+ m_dataChangeEvent = i_event;
+ }
+
+ public void rowHeadingChanged( GridDataEvent i_event )
+ {
+ assertNull( m_rowHeadingChangeEvent );
+ m_rowHeadingChangeEvent = i_event;
+ }
+
+ public void disposing( EventObject eo )
+ {
+ m_disposed = true;
+ }
+
+ public final GridDataEvent assertSingleRowInsertionEvent()
+ {
+ assertNotNull( m_rowInsertionEvent );
+ assertNull( m_rowRemovalEvent );
+ assertNull( m_dataChangeEvent );
+ assertNull( m_rowHeadingChangeEvent );
+ assertFalse( m_disposed );
+ return m_rowInsertionEvent;
+ }
+
+ public final GridDataEvent assertSingleRowRemovalEvent()
+ {
+ assertNull( m_rowInsertionEvent );
+ assertNotNull( m_rowRemovalEvent );
+ assertNull( m_dataChangeEvent );
+ assertNull( m_rowHeadingChangeEvent );
+ assertFalse( m_disposed );
+ return m_rowRemovalEvent;
+ }
+
+ public final GridDataEvent assertSingleDataChangeEvent()
+ {
+ assertNull( m_rowInsertionEvent );
+ assertNull( m_rowRemovalEvent );
+ assertNotNull( m_dataChangeEvent );
+ assertNull( m_rowHeadingChangeEvent );
+ assertFalse( m_disposed );
+ return m_dataChangeEvent;
+ }
+
+ public final GridDataEvent assertSingleRowHeadingChangeEvent()
+ {
+ assertNull( m_rowInsertionEvent );
+ assertNull( m_rowRemovalEvent );
+ assertNull( m_dataChangeEvent );
+ assertNotNull( m_rowHeadingChangeEvent );
+ assertFalse( m_disposed );
+ return m_rowHeadingChangeEvent;
+ }
+
+ public final boolean isDisposed()
+ {
+ return m_disposed;
+ }
+
+ public final void reset()
+ {
+ m_rowInsertionEvent = m_rowRemovalEvent = m_dataChangeEvent = m_rowHeadingChangeEvent = null;
+ // m_disposed is not reset intentionally
+ }
+ private GridDataEvent m_rowInsertionEvent = null;
+ private GridDataEvent m_rowRemovalEvent = null;
+ private GridDataEvent m_dataChangeEvent = null;
+ private GridDataEvent m_rowHeadingChangeEvent = null;
+ private boolean m_disposed = false;
+}
diff --git a/toolkit/qa/complex/toolkit/awtgrid/TMutableGridDataModel.java b/toolkit/qa/complex/toolkit/awtgrid/TMutableGridDataModel.java
new file mode 100755
index 000000000000..c550dd9a047d
--- /dev/null
+++ b/toolkit/qa/complex/toolkit/awtgrid/TMutableGridDataModel.java
@@ -0,0 +1,314 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ *************************************************************************/
+
+package complex.toolkit.awtgrid;
+
+import java.lang.reflect.Method;
+import com.sun.star.awt.grid.GridDataEvent;
+import com.sun.star.awt.grid.XMutableGridDataModel;
+import com.sun.star.lang.IllegalArgumentException;
+import com.sun.star.lang.IndexOutOfBoundsException;
+import static org.junit.Assert.*;
+import static complex.toolkit.Assert.*;
+
+/** test for the <code>css.awt.grid.XMutableGridData</code> interface
+ *
+ * @author frank.schoenheit@oracle.com
+ */
+public class TMutableGridDataModel
+{
+ public TMutableGridDataModel( final XMutableGridDataModel i_dataModel )
+ {
+ m_dataModel = i_dataModel;
+
+ m_listener = new GridDataListener();
+ m_dataModel.addGridDataListener( m_listener );
+ }
+
+ /*
+ * tests the XMutableGridDataModel.addRow method
+ */
+ public void testAddRow() throws IndexOutOfBoundsException
+ {
+ m_dataModel.addRow( 1, m_rowValues[0] );
+ GridDataEvent event = m_listener.assertSingleRowInsertionEvent();
+ m_listener.reset();
+ assertEquals( "row insertion: wrong FirstRow (1)", 0, event.FirstRow );
+ assertEquals( "row insertion: wrong LastRow (1)", 0, event.LastRow );
+ impl_assertRowData( 0 );
+
+ m_dataModel.addRow( 2, m_rowValues[1] );
+ event = m_listener.assertSingleRowInsertionEvent();
+ m_listener.reset();
+ assertEquals( "row insertion: wrong FirstRow (2)", 1, event.FirstRow );
+ assertEquals( "row insertion: wrong LastRow (2)", 1, event.LastRow );
+ impl_assertRowData( 1 );
+ }
+
+ /**
+ * tests the XMutableGridDataModel.addRows method
+ */
+ public void testAddRows() throws IndexOutOfBoundsException, IllegalArgumentException
+ {
+ assertEquals( "precondition not met: call this directly after testAddRow, please!", 2, m_dataModel.getRowCount() );
+
+ m_dataModel.addRows( new Object[] { "3", 4.0, "5" }, new Object[][] { m_rowValues[2], m_rowValues[3], m_rowValues[4] } );
+ GridDataEvent event = m_listener.assertSingleRowInsertionEvent();
+ assertEquals( "row insertion: wrong FirstRow (1)", 2, event.FirstRow );
+ assertEquals( "row insertion: wrong LastRow (1)", 4, event.LastRow );
+ m_listener.reset();
+
+ assertEquals( "data model's row count is not adjusted when adding rows", m_rowValues.length, m_dataModel.getRowCount() );
+ assertEquals( "data model's column count is not adjusted when adding rows", m_rowValues[0].length, m_dataModel.getColumnCount() );
+ for ( int row=0; row<m_rowValues.length; ++row )
+ {
+ for ( int col=0; col<m_rowValues[row].length; ++col )
+ {
+ assertEquals( "added row values are not preserved",
+ m_rowValues[row][col], m_dataModel.getCellData( col, row ) );
+ }
+ }
+
+ assertException( "addRows is expected to throw when invoked with different-sized arrays",
+ m_dataModel, "addRows", new Object[] { new Object[0], new Object[1][2] }, IllegalArgumentException.class );
+ }
+
+ /**
+ * tests the XMutableGridDataModel.removeRow method
+ */
+ public void testRemoveRow() throws IndexOutOfBoundsException
+ {
+ assertEquals( "precondition not met: call this directly after testAddRows, please!", m_rowValues.length, m_dataModel.getRowCount() );
+
+ final int rowToRemove = 2;
+ m_dataModel.removeRow( rowToRemove );
+ GridDataEvent event = m_listener.assertSingleRowRemovalEvent();
+ assertEquals( "incorrect notification of row removal (FirstRow)", rowToRemove, event.FirstRow );
+ assertEquals( "incorrect notification of row removal (LastRow)", rowToRemove, event.LastRow );
+ m_listener.reset();
+
+ assertEquals( "data model's row count does not reflect the removed row", m_rowValues.length - 1, m_dataModel.getRowCount() );
+ for ( int row = rowToRemove; row<m_rowValues.length-1; ++row )
+ {
+ for ( int col=0; col<m_rowValues[row].length; ++col )
+ {
+ assertEquals( "unexpected row values after removing a row (col: " + col + ", row: " + row + ")",
+ m_rowValues[row+1][col], m_dataModel.getCellData( col, row ) );
+ }
+ }
+
+ assertException( "removeRow silently ignores an invalid index (1)",
+ m_dataModel, "removeRow", new Object[] { -1 }, IndexOutOfBoundsException.class );
+ assertException( "removeRow silently ignores an invalid index (2)",
+ m_dataModel, "removeRow", new Object[] { m_dataModel.getRowCount() }, IndexOutOfBoundsException.class );
+ }
+
+ /**
+ * tests the XMutableGridDataModel.removeAllRows method
+ */
+ public void testRemoveAllRows()
+ {
+ assertEquals( "precondition not met: call this directly after testRemoveRow, please!", m_rowValues.length - 1, m_dataModel.getRowCount() );
+
+ m_dataModel.removeAllRows();
+ final GridDataEvent event = m_listener.assertSingleRowRemovalEvent();
+ if ( event.FirstRow != -1 )
+ { // notifying "-1" is allowed, this means "all rows affected", by definition
+ assertEquals( "removeAllRows is not notifying properly (1)", 0, event.FirstRow );
+ assertEquals( "removeAllRows is not notifying properly (2)", m_rowValues.length - 1, event.LastRow );
+ }
+ m_listener.reset();
+ }
+
+ /**
+ * tests the XMutableGridDataModel.updateCellData method
+ */
+ public void testUpdateCellData() throws IndexOutOfBoundsException, IllegalArgumentException
+ {
+ assertEquals( "precondition not met: call this directly after testRemoveAllRows, please!", 0, m_dataModel.getRowCount() );
+
+ m_dataModel.addRows( new Object[] { 1, 2, 3, 4, 5 }, m_rowValues );
+ m_listener.assertSingleRowInsertionEvent();
+ m_listener.reset();
+
+ final Object[][] modifyValues = new Object[][] {
+ new Object[] { 2, 1, "text" },
+ new Object[] { 3, 0, null },
+ new Object[] { 0, 4, new Double( 33.0 ) }
+ };
+ for ( int i = 0; i < modifyValues.length; ++i )
+ {
+ final int row = ((Integer)modifyValues[i][0]).intValue();
+ final int col = ((Integer)modifyValues[i][1]).intValue();
+ final Object value = modifyValues[i][2];
+ m_dataModel.updateCellData( col, row, value );
+
+ final GridDataEvent event = m_listener.assertSingleDataChangeEvent();
+ assertEquals( "data change notification: FirstRow is invalid", row, event.FirstRow );
+ assertEquals( "data change notification: LastRow is invalid", row, event.LastRow );
+ assertEquals( "data change notification: FirstColumn is invalid", col, event.FirstColumn );
+ assertEquals( "data change notification: LastColumn is invalid", col, event.LastColumn );
+ m_listener.reset();
+
+ assertEquals( "data change at (" + col + ", " + row + ") not successful", value, m_dataModel.getCellData( col, row ) );
+ }
+
+ assertException( "updateCellData silently ignores an invalid index (1)",
+ m_dataModel, "updateCellData", new Class[] { int.class, int.class, Object.class },
+ new Object[] { -1, -1, "text" }, IndexOutOfBoundsException.class );
+ assertException( "updateCellData silently ignores an invalid index (2)",
+ m_dataModel, "updateCellData", new Class[] { int.class, int.class, Object.class },
+ new Object[] { 0, m_dataModel.getRowCount(), "text" }, IndexOutOfBoundsException.class );
+ assertException( "updateCellData silently ignores an invalid index (3)",
+ m_dataModel, "updateCellData", new Class[] { int.class, int.class, Object.class },
+ new Object[] { m_dataModel.getColumnCount(), 0, "text" }, IndexOutOfBoundsException.class );
+ }
+
+ /**
+ * tests the XMutableGridDataModel.updateRowData method
+ */
+ public void testUpdateRowData() throws IndexOutOfBoundsException, IllegalArgumentException
+ {
+ assertEquals( "precondition not met: call this directly after testRemoveAllRows, please!", m_rowValues.length, m_dataModel.getRowCount() );
+
+ // get data from before the update
+ final Object[][] preUpdateValues = impl_getCurrentData();
+
+ // do the update
+ final int[] colIndexes = new int[] {
+ 0, 3, 4
+ };
+ final Object[] values = new Object[] {
+ 13, null, 42.0
+ };
+ final int rowToUpdate = 2;
+ m_dataModel.updateRowData( colIndexes, rowToUpdate, values );
+ final GridDataEvent event = m_listener.assertSingleDataChangeEvent();
+ assertEquals( "row update notification: FirstRow is invalid", rowToUpdate, event.FirstRow );
+ assertEquals( "row update notification: LastRow is invalid", rowToUpdate, event.LastRow );
+ assertEquals( "row update notification: FirstColumn is invalid", 0, event.FirstColumn );
+ assertEquals( "row update notification: LastColumn is invalid", 4, event.LastColumn );
+ m_listener.reset();
+
+ // reflect the changes made in the pre-update data
+ for ( int i=0; i<colIndexes.length; ++i )
+ {
+ preUpdateValues[rowToUpdate][colIndexes[i]] = values[i];
+ }
+
+ // get data from after the update
+ final Object[][] postUpdateValues = impl_getCurrentData();
+
+ // ensure both the manually updated pre-update data and the post-update data are identical
+ assertArrayEquals( preUpdateValues, postUpdateValues );
+
+
+ assertException( "updateRowData silently ignores an invalid index (1)",
+ m_dataModel, "updateRowData", new Class[] { int[].class, int.class, Object[].class },
+ new Object[] { new int[] { -1 }, 0, new Object[] { "text" } }, IndexOutOfBoundsException.class );
+ assertException( "updateRowData silently ignores an invalid index (2)",
+ m_dataModel, "updateRowData", new Class[] { int[].class, int.class, Object[].class },
+ new Object[] { new int[] { 0 }, -1, new Object[] { "" } }, IndexOutOfBoundsException.class );
+ assertException( "updateRowData silently ignores different-sized arrays",
+ m_dataModel, "updateRowData", new Class[] { int[].class, int.class, Object[].class },
+ new Object[] { new int[] { 0, 0 }, 0, new Object[] { "" } }, IllegalArgumentException.class );
+ }
+
+ /**
+ * tests the XMutableGridDataModel.updateRowHeading method
+ */
+ public void testUpdateRowHeading() throws IndexOutOfBoundsException
+ {
+ assertEquals( "precondition not met: call this directly after testUpdateRowData, please!", m_rowValues.length, m_dataModel.getRowCount() );
+
+ final Object[] preUpdateHeadings = impl_getCurrentRowHeadings();
+
+ final int rowToUpdate = 2;
+ final String valueToUpdate = "some text";
+ m_dataModel.updateRowHeading( rowToUpdate, valueToUpdate );
+ final GridDataEvent event = m_listener.assertSingleRowHeadingChangeEvent();
+ assertEquals( "row heading update notification: FirstRow is invalid", rowToUpdate, event.FirstRow );
+ assertEquals( "row heading update notification: FirstRow is invalid", rowToUpdate, event.LastRow );
+ m_listener.reset();
+
+ preUpdateHeadings[rowToUpdate] = valueToUpdate;
+
+ final Object[] postUpdateHeadings = impl_getCurrentRowHeadings();
+ assertArrayEquals( preUpdateHeadings, postUpdateHeadings );
+
+ assertException( "updateRowHeading silently ignores an invalid index",
+ m_dataModel, "updateRowHeading", new Class[] { int.class, Object.class },
+ new Object[] { -1, "" }, IndexOutOfBoundsException.class );
+ }
+
+ public void cleanup()
+ {
+ m_dataModel.removeGridDataListener( m_listener );
+ }
+
+ private Object[][] impl_getCurrentData() throws IndexOutOfBoundsException
+ {
+ final int rowCount = m_dataModel.getRowCount();
+ final int colCount = m_dataModel.getColumnCount();
+ final Object[][] data = new Object[rowCount][colCount];
+ for ( int row=0; row<rowCount; ++row )
+ {
+ for ( int col=0; col<colCount; ++col )
+ {
+ data[row][col] = m_dataModel.getCellData( col, row );
+ }
+ }
+ return data;
+ }
+
+ private Object[] impl_getCurrentRowHeadings() throws IndexOutOfBoundsException
+ {
+ final int rowCount = m_dataModel.getRowCount();
+ final Object[] headings = new Object[rowCount];
+ for ( int row=0; row<rowCount; ++row )
+ headings[row] = m_dataModel.getRowHeading( row );
+ return headings;
+ }
+
+ private void impl_assertRowData( final int i_rowIndex ) throws IndexOutOfBoundsException
+ {
+ for ( int i=0; i<m_rowValues[i_rowIndex].length; ++i )
+ {
+ assertEquals( m_rowValues[i_rowIndex][i], m_dataModel.getCellData( i, i_rowIndex ) );
+ }
+ }
+
+ private final XMutableGridDataModel m_dataModel;
+ private final GridDataListener m_listener;
+
+ private final static Object[][] m_rowValues = new Object[][] {
+ new Object[] { 1, 2, "3", 4, 5 },
+ new Object[] { 2, 3, 4, "5", 6 },
+ new Object[] { "3", 4, 5, 6, 7 },
+ new Object[] { 4, 5, 6, 7, "8" },
+ new Object[] { 5, "6", 7, 8, 9 },
+ };
+}
diff --git a/toolkit/qa/complex/toolkit/makefile.mk b/toolkit/qa/complex/toolkit/makefile.mk
new file mode 100755
index 000000000000..ecb173f9bdac
--- /dev/null
+++ b/toolkit/qa/complex/toolkit/makefile.mk
@@ -0,0 +1,97 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+.IF "$(OOO_JUNIT_JAR)" == ""
+nothing .PHONY:
+ @echo -----------------------------------------------------
+ @echo - JUnit not available, not building anything
+ @echo -----------------------------------------------------
+.ELSE # IF "$(OOO_JUNIT_JAR)" != ""
+
+PRJ = ../../..
+PRJNAME = toolkit
+TARGET = qa_complex_toolkit
+PACKAGE = complex/toolkit
+
+# --- Settings -----------------------------------------------------
+.INCLUDE: settings.mk
+
+#----- compile .java files -----------------------------------------
+
+JARFILES = OOoRunnerLight.jar ridl.jar test.jar unoil.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
+
+JAVAFILES = \
+ $(JAVATESTFILES) \
+ accessibility/_XAccessibleComponent.java \
+ accessibility/_XAccessibleContext.java \
+ accessibility/_XAccessibleEventBroadcaster.java \
+ accessibility/_XAccessibleExtendedComponent.java \
+ accessibility/_XAccessibleText.java \
+ Assert.java \
+ awtgrid/GridDataListener.java \
+ awtgrid/TMutableGridDataModel.java \
+ awtgrid/DummyColumn.java \
+
+#----- create a jar from compiled files ----------------------------
+
+JARTARGET = $(TARGET).jar
+
+#----- JUnit tests class -------------------------------------------
+
+JAVATESTFILES = \
+ GridControl.java \
+ UnitConversion.java \
+
+
+# disabled for now - the tests fail on at least one platform
+# no issue, yet (not sure this is worth it. Don't know who to give the issue to, and don't know whether the test really makes sense)
+DISABLED_JAVA_TEST_FILES=\
+ AccessibleStatusBar.java\
+ AccessibleStatusBarItem.java
+
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE: target.mk
+
+ALL : ALLTAR
+
+# --- subsequent tests ---------------------------------------------
+
+.IF "$(OOO_SUBSEQUENT_TESTS)" != ""
+
+.INCLUDE: installationtest.mk
+
+ALLTAR : javatest
+
+ # Sample how to debug
+ # JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y
+
+.END # "$(OOO_SUBSEQUENT_TESTS)" == ""
+
+.END # ELSE "$(OOO_JUNIT_JAR)" != ""
diff --git a/toolkit/qa/complex/xunitconversion/XUnitConversionTest.java b/toolkit/qa/complex/xunitconversion/XUnitConversionTest.java
deleted file mode 100644
index f9840e4bde6f..000000000000
--- a/toolkit/qa/complex/xunitconversion/XUnitConversionTest.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-package complex.xunitconversion;
-
-import com.sun.star.awt.XUnitConversion;
-import com.sun.star.uno.UnoRuntime;
-
-import com.sun.star.awt.XWindow;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.awt.XWindowPeer;
-
-import util.DesktopTools;
-
-// import org.junit.After;
-import org.junit.AfterClass;
-// import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.openoffice.test.OfficeConnection;
-import static org.junit.Assert.*;
-
-/**
- * This complex test is only for testing the com.sun.star.awt.XUnitConversion methods
- * These are converter methods to get the size of a well known awt component
- * in a com.sun.star.util.MeasureUnit you want.
- * You don't need to know the factors to calculate by hand.
- *
- * @author ll93751
- */
-public class XUnitConversionTest
-{
-// public String[] getTestMethodNames()
-// {
-// return new String[]{"testXUnitConversion"}; // function name of the test method
-// }
-
- /**
- * returns the delta value between a and b
- * @param a
- * @param b
- * @return
- */
- private int delta(int a, int b)
- {
- final int n = Math.abs(a - b);
- return n;
- }
-
- private XUnitConversion m_xConversion = null;
-
- /**
- * Not really a check,
- * only a simple test call to convertSizeToLogic(...) with different parameters
- * @param _aSize
- * @param _aMeasureUnit
- * @param _sEinheit
- */
- private void checkSize(com.sun.star.awt.Size _aSize, short _aMeasureUnit, String _sEinheit)
- {
- try
- {
- com.sun.star.awt.Size aSizeIn = m_xConversion.convertSizeToLogic(_aSize, _aMeasureUnit);
- System.out.println("Window size:");
- System.out.println("Width:" + aSizeIn.Width + " " + _sEinheit);
- System.out.println("Height:" + aSizeIn.Height + " " + _sEinheit);
- System.out.println("");
- }
- catch (com.sun.star.lang.IllegalArgumentException e)
- {
- System.out.println("Caught IllegalArgumentException in convertSizeToLogic with '" + _sEinheit + "' " + e.getMessage());
- }
- }
-
-/**
- * The real test function
- * 1. try to get the XMultiServiceFactory of an already running office. Therefore make sure an (open|star)office is running with
- * parameters like -accept="socket,host=localhost,port=8100;urp;"
- * 2. try to create an empty window
- * 3. try to convert the WindowPeer to an XWindow
- * 4. try to resize and move the window to an other position, so we get a well knowing position and size.
- * 5. run some more tests
- *
- * If no test fails, the test is well done and returns with 'PASSED, OK'
- *
- */
- @Test public void testXUnitConversion()
- {
- // XMultiServiceFactory xMSF = (XMultiServiceFactory) param.getMSF();
- final XMultiServiceFactory xMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager());
-
- assertNotNull("failed: There is no office.", xMSF);
-
- // create a window
- XWindowPeer xWindowPeer = DesktopTools.createFloatingWindow(xMSF);
- assertNotNull("failed: there is no window peer", xWindowPeer);
-
-
- // resize and move the window to a well known position and size
- XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, xWindowPeer);
- assertNotNull("failed: there is no window, cast wrong?", xWindow);
-
- xWindow.setVisible(Boolean.TRUE);
-
- int x = 100;
- int y = 100;
- int width = 640;
- int height = 480;
- xWindow.setPosSize(x, y, width, height, com.sun.star.awt.PosSize.POSSIZE);
-
- com.sun.star.awt.Rectangle aRect = xWindow.getPosSize();
- com.sun.star.awt.Point aPoint = new com.sun.star.awt.Point(aRect.X, aRect.Y);
- com.sun.star.awt.Size aSize = new com.sun.star.awt.Size(aRect.Width, aRect.Height);
-
- System.out.println("Window position and size in pixel:");
- System.out.println("X:" + aPoint.X);
- System.out.println("Y:" + aPoint.Y);
- System.out.println("Width:" + aSize.Width);
- System.out.println("Height:" + aSize.Height);
- System.out.println("");
-
- assertTrue("Window pos size wrong", aSize.Width == width && aSize.Height == height && aPoint.X == x && aPoint.Y == y);
-
- // XToolkit aToolkit = xWindowPeer.getToolkit();
- m_xConversion = UnoRuntime.queryInterface(XUnitConversion.class, xWindowPeer);
-
- // try to get the position of the window in 1/100mm with the XUnitConversion method
- try
- {
- com.sun.star.awt.Point aPointInMM_100TH = m_xConversion.convertPointToLogic(aPoint, com.sun.star.util.MeasureUnit.MM_100TH);
- System.out.println("Window position:");
- System.out.println("X:" + aPointInMM_100TH.X + " 1/100mm");
- System.out.println("Y:" + aPointInMM_100TH.Y + " 1/100mm");
- System.out.println("");
- }
- catch (com.sun.star.lang.IllegalArgumentException e)
- {
- fail("failed: IllegalArgumentException caught in convertPointToLogic " + e.getMessage());
- }
-
- // try to get the size of the window in 1/100mm with the XUnitConversion method
- com.sun.star.awt.Size aSizeInMM_100TH = null;
- com.sun.star.awt.Size aSizeInMM_10TH = null;
- try
- {
- aSizeInMM_100TH = m_xConversion.convertSizeToLogic(aSize, com.sun.star.util.MeasureUnit.MM_100TH);
- System.out.println("Window size:");
- System.out.println("Width:" + aSizeInMM_100TH.Width + " 1/100mm");
- System.out.println("Height:" + aSizeInMM_100TH.Height + " 1/100mm");
- System.out.println("");
-
- // try to get the size of the window in 1/10mm with the XUnitConversion method
-
- aSizeInMM_10TH = m_xConversion.convertSizeToLogic(aSize, com.sun.star.util.MeasureUnit.MM_10TH);
- System.out.println("Window size:");
- System.out.println("Width:" + aSizeInMM_10TH.Width + " 1/10mm");
- System.out.println("Height:" + aSizeInMM_10TH.Height + " 1/10mm");
- System.out.println("");
-
- // check the size with a delta which must be smaller a given difference
- assertTrue("Size.Width not correct", delta(aSizeInMM_100TH.Width, aSizeInMM_10TH.Width * 10) < 10);
- assertTrue("Size.Height not correct", delta(aSizeInMM_100TH.Height, aSizeInMM_10TH.Height * 10) < 10);
-
- // new
- checkSize(aSize, com.sun.star.util.MeasureUnit.PIXEL, "pixel");
- checkSize(aSize, com.sun.star.util.MeasureUnit.APPFONT, "appfont");
- checkSize(aSize, com.sun.star.util.MeasureUnit.SYSFONT, "sysfont");
-
- // simply check some more parameters
- checkSize(aSize, com.sun.star.util.MeasureUnit.MM, "mm");
- checkSize(aSize, com.sun.star.util.MeasureUnit.CM, "cm");
- checkSize(aSize, com.sun.star.util.MeasureUnit.INCH_1000TH, "1/1000inch");
- checkSize(aSize, com.sun.star.util.MeasureUnit.INCH_100TH, "1/100inch");
- checkSize(aSize, com.sun.star.util.MeasureUnit.INCH_10TH, "1/10inch");
- checkSize(aSize, com.sun.star.util.MeasureUnit.INCH, "inch");
- // checkSize(aSize, com.sun.star.util.MeasureUnit.M, "m");
- checkSize(aSize, com.sun.star.util.MeasureUnit.POINT, "point");
- checkSize(aSize, com.sun.star.util.MeasureUnit.TWIP, "twip");
- // checkSize(aSize, com.sun.star.util.MeasureUnit.KM, "km");
- // checkSize(aSize, com.sun.star.util.MeasureUnit.PICA, "pica");
- // checkSize(aSize, com.sun.star.util.MeasureUnit.FOOT, "foot");
- // checkSize(aSize, com.sun.star.util.MeasureUnit.MILE, "mile");
- }
- catch (com.sun.star.lang.IllegalArgumentException e)
- {
- fail("failed: IllegalArgumentException caught in convertSizeToLogic " + e.getMessage());
- }
-
- // convert the 1/100mm window size back to pixel
- try
- {
- com.sun.star.awt.Size aNewSize = m_xConversion.convertSizeToPixel(aSizeInMM_100TH, com.sun.star.util.MeasureUnit.MM_100TH);
- System.out.println("Window size:");
- System.out.println("Width:" + aNewSize.Width + " pixel");
- System.out.println("Height:" + aNewSize.Height + " pixel");
-
- // assure the pixels are the same as we already know
- assertTrue("failed: Size from pixel to 1/100mm to pixel", aSize.Width == aNewSize.Width && aSize.Height == aNewSize.Height);
- }
- catch (com.sun.star.lang.IllegalArgumentException e)
- {
- fail("failed: IllegalArgumentException caught in convertSizeToPixel " + e.getMessage());
- }
-
- // close the window.
- // IMHO a little bit stupid, but the XWindow doesn't support a XCloseable interface
- xWindow.dispose();
- }
-
-
-
- @BeforeClass public static void setUpConnection() throws Exception {
- System.out.println("setUpConnection()");
- connection.setUp();
- }
-
- @AfterClass public static void tearDownConnection()
- throws InterruptedException, com.sun.star.uno.Exception
- {
- System.out.println("tearDownConnection()");
- connection.tearDown();
- }
-
- private static final OfficeConnection connection = new OfficeConnection();
-
-}
diff --git a/toolkit/qa/unoapi/Test.java b/toolkit/qa/unoapi/Test.java
index f27d882314d2..0543fee83f9f 100644
--- a/toolkit/qa/unoapi/Test.java
+++ b/toolkit/qa/unoapi/Test.java
@@ -27,6 +27,7 @@ package org.openoffice.toolkit.qa.unoapi;
import org.openoffice.Runner;
import org.openoffice.test.OfficeConnection;
+import org.openoffice.test.Argument;
import static org.junit.Assert.*;
public final class Test {
@@ -43,8 +44,8 @@ public final class Test {
@org.junit.Test public void test() {
assertTrue(
Runner.run(
- "-sce", "toolkit.sce", "-xcl", "knownissues.xcl", "-tdoc",
- "testdocuments", "-cs", connection.getDescription()));
+ "-sce", Argument.get("sce"), "-xcl", Argument.get("xcl"), "-tdoc",
+ Argument.get("tdoc"), "-cs", connection.getDescription()));
}
private final OfficeConnection connection = new OfficeConnection();
diff --git a/toolkit/qa/unoapi/makefile.mk b/toolkit/qa/unoapi/makefile.mk
deleted file mode 100644
index 9517601c3917..000000000000
--- a/toolkit/qa/unoapi/makefile.mk
+++ /dev/null
@@ -1,48 +0,0 @@
-#*************************************************************************
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#***********************************************************************/
-
-.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
-nothing .PHONY:
-.ELSE
-
-PRJ = ../..
-PRJNAME = toolkit
-TARGET = qa_unoapi
-
-.IF "$(OOO_JUNIT_JAR)" != ""
-PACKAGE = org/openoffice/toolkit/qa/unoapi
-JAVATESTFILES = Test.java
-JAVAFILES = $(JAVATESTFILES)
-JARFILES = OOoRunner.jar ridl.jar test.jar
-EXTRAJARFILES = $(OOO_JUNIT_JAR)
-.END
-
-.INCLUDE: settings.mk
-.INCLUDE: target.mk
-.INCLUDE: installationtest.mk
-
-ALLTAR : javatest
-
-.END
diff --git a/toolkit/source/awt/animatedimagespeer.cxx b/toolkit/source/awt/animatedimagespeer.cxx
new file mode 100755
index 000000000000..c9c640d51c60
--- /dev/null
+++ b/toolkit/source/awt/animatedimagespeer.cxx
@@ -0,0 +1,538 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_toolkit.hxx"
+
+#include "toolkit/awt/animatedimagespeer.hxx"
+#include "toolkit/helper/property.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/awt/XAnimatedImages.hpp>
+#include <com/sun/star/awt/Size.hpp>
+#include <com/sun/star/graphic/XGraphicProvider.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/graphic/XGraphic.hpp>
+#include <com/sun/star/awt/ImageScaleMode.hpp>
+/** === end UNO includes === **/
+
+#include <comphelper/componentcontext.hxx>
+#include <comphelper/namedvaluecollection.hxx>
+#include <comphelper/processfactory.hxx>
+#include <rtl/ustrbuf.hxx>
+#include <tools/diagnose_ex.h>
+#include <tools/urlobj.hxx>
+#include <vcl/throbber.hxx>
+
+#include <limits>
+
+//......................................................................................................................
+namespace toolkit
+{
+//......................................................................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::lang::EventObject;
+ using ::com::sun::star::container::ContainerEvent;
+ using ::com::sun::star::awt::XAnimatedImages;
+ using ::com::sun::star::awt::Size;
+ using ::com::sun::star::lang::XMultiServiceFactory;
+ using ::com::sun::star::graphic::XGraphicProvider;
+ using ::com::sun::star::beans::XPropertySet;
+ using ::com::sun::star::graphic::XGraphic;
+ /** === end UNO using === **/
+ namespace ImageScaleMode = ::com::sun::star::awt::ImageScaleMode;
+
+ //==================================================================================================================
+ //= AnimatedImagesPeer_Data
+ //==================================================================================================================
+ struct CachedImage
+ {
+ ::rtl::OUString sImageURL;
+ mutable Reference< XGraphic > xGraphic;
+
+ CachedImage()
+ :sImageURL()
+ ,xGraphic()
+ {
+ }
+
+ CachedImage( ::rtl::OUString const& i_imageURL )
+ :sImageURL( i_imageURL )
+ ,xGraphic()
+ {
+ }
+ };
+
+ struct AnimatedImagesPeer_Data
+ {
+ AnimatedImagesPeer& rAntiImpl;
+ ::std::vector< ::std::vector< CachedImage > > aCachedImageSets;
+
+ AnimatedImagesPeer_Data( AnimatedImagesPeer& i_antiImpl )
+ :rAntiImpl( i_antiImpl )
+ ,aCachedImageSets()
+ {
+ }
+ };
+
+ //==================================================================================================================
+ //= helper
+ //==================================================================================================================
+ namespace
+ {
+ //--------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString lcl_getHighContrastURL( ::rtl::OUString const& i_imageURL )
+ {
+ INetURLObject aURL( i_imageURL );
+ if ( aURL.GetProtocol() != INET_PROT_PRIV_SOFFICE )
+ {
+ OSL_VERIFY( aURL.insertName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "hicontrast" ) ), false, 0 ) );
+ return aURL.GetMainURL( INetURLObject::NO_DECODE );
+ }
+ // the private: scheme is not considered to be hierarchical by INetURLObject, so manually insert the
+ // segment
+ const sal_Int32 separatorPos = i_imageURL.indexOf( '/' );
+ ENSURE_OR_RETURN( separatorPos != -1, "lcl_getHighContrastURL: unsipported URL scheme - cannot automatically determine HC version!", i_imageURL );
+
+ ::rtl::OUStringBuffer composer;
+ composer.append( i_imageURL.copy( 0, separatorPos ) );
+ composer.appendAscii( "/hicontrast" );
+ composer.append( i_imageURL.copy( separatorPos ) );
+ return composer.makeStringAndClear();
+ }
+
+ //--------------------------------------------------------------------------------------------------------------
+ bool lcl_ensureImage_throw( Reference< XGraphicProvider > const& i_graphicProvider, const bool i_isHighContrast, const CachedImage& i_cachedImage )
+ {
+ if ( !i_cachedImage.xGraphic.is() )
+ {
+ ::comphelper::NamedValueCollection aMediaProperties;
+ if ( i_isHighContrast )
+ {
+ // try (to find) the high-contrast version of the graphic first
+ aMediaProperties.put( "URL", lcl_getHighContrastURL( i_cachedImage.sImageURL ) );
+ i_cachedImage.xGraphic.set( i_graphicProvider->queryGraphic( aMediaProperties.getPropertyValues() ), UNO_QUERY );
+ }
+ if ( !i_cachedImage.xGraphic.is() )
+ {
+ aMediaProperties.put( "URL", i_cachedImage.sImageURL );
+ i_cachedImage.xGraphic.set( i_graphicProvider->queryGraphic( aMediaProperties.getPropertyValues() ), UNO_QUERY );
+ }
+ }
+ return i_cachedImage.xGraphic.is();
+ }
+
+ //--------------------------------------------------------------------------------------------------------------
+ Size lcl_getGraphicSizePixel( Reference< XGraphic > const& i_graphic )
+ {
+ Size aSizePixel;
+ try
+ {
+ if ( i_graphic.is() )
+ {
+ const Reference< XPropertySet > xGraphicProps( i_graphic, UNO_QUERY_THROW );
+ OSL_VERIFY( xGraphicProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SizePixel" ) ) ) >>= aSizePixel );
+ }
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return aSizePixel;
+ }
+
+ //--------------------------------------------------------------------------------------------------------------
+ void lcl_init( Sequence< ::rtl::OUString > const& i_imageURLs, ::std::vector< CachedImage >& o_images )
+ {
+ o_images.resize(0);
+ size_t count = size_t( i_imageURLs.getLength() );
+ o_images.reserve( count );
+ for ( size_t i = 0; i < count; ++i )
+ {
+ o_images.push_back( CachedImage( i_imageURLs[i] ) );
+ }
+ }
+
+ //--------------------------------------------------------------------------------------------------------------
+ void lcl_updateImageList_nothrow( AnimatedImagesPeer_Data& i_data )
+ {
+ Throbber* pThrobber = dynamic_cast< Throbber* >( i_data.rAntiImpl.GetWindow() );
+ if ( pThrobber == NULL )
+ return;
+
+ try
+ {
+ // collect the image sizes of the different image sets
+ const ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
+ const Reference< XGraphicProvider > xGraphicProvider( aContext.createComponent( "com.sun.star.graphic.GraphicProvider" ), UNO_QUERY_THROW );
+
+ const bool isHighContrast = pThrobber->GetSettings().GetStyleSettings().GetHighContrastMode();
+
+ sal_Int32 nPreferredSet = -1;
+ const size_t nImageSetCount = i_data.aCachedImageSets.size();
+ if ( nImageSetCount < 2 )
+ {
+ nPreferredSet = sal_Int32( nImageSetCount ) - 1;
+ }
+ else
+ {
+ ::std::vector< Size > aImageSizes( nImageSetCount );
+ for ( sal_Int32 nImageSet = 0; size_t( nImageSet ) < nImageSetCount; ++nImageSet )
+ {
+ ::std::vector< CachedImage > const& rImageSet( i_data.aCachedImageSets[ nImageSet ] );
+ if ( ( rImageSet.empty() )
+ || ( !lcl_ensureImage_throw( xGraphicProvider, isHighContrast, rImageSet[0] ) )
+ )
+ {
+ aImageSizes[ nImageSet ] = Size( ::std::numeric_limits< long >::max(), ::std::numeric_limits< long >::max() );
+ }
+ else
+ {
+ aImageSizes[ nImageSet ] = lcl_getGraphicSizePixel( rImageSet[0].xGraphic );
+ }
+ }
+
+ // find the set with the smallest difference between window size and image size
+ const ::Size aWindowSizePixel = pThrobber->GetSizePixel();
+ long nMinimalDistance = ::std::numeric_limits< long >::max();
+ for ( ::std::vector< Size >::const_iterator check = aImageSizes.begin();
+ check != aImageSizes.end();
+ ++check
+ )
+ {
+ if ( ( check->Width > aWindowSizePixel.Width() )
+ || ( check->Height > aWindowSizePixel.Height() )
+ )
+ // do not use an image set which doesn't fit into the window
+ continue;
+
+ const sal_Int64 distance =
+ ( aWindowSizePixel.Width() - check->Width ) * ( aWindowSizePixel.Width() - check->Width )
+ + ( aWindowSizePixel.Height() - check->Height ) * ( aWindowSizePixel.Height() - check->Height );
+ if ( distance < nMinimalDistance )
+ {
+ nMinimalDistance = distance;
+ nPreferredSet = check - aImageSizes.begin();
+ }
+ }
+ }
+
+ // found a set?
+ Sequence< Reference< XGraphic > > aImages;
+ if ( ( nPreferredSet >= 0 ) && ( size_t( nPreferredSet ) < nImageSetCount ) )
+ {
+ // => set the images
+ ::std::vector< CachedImage > const& rImageSet( i_data.aCachedImageSets[ nPreferredSet ] );
+ aImages.realloc( rImageSet.size() );
+ sal_Int32 imageIndex = 0;
+ for ( ::std::vector< CachedImage >::const_iterator cachedImage = rImageSet.begin();
+ cachedImage != rImageSet.end();
+ ++cachedImage, ++imageIndex
+ )
+ {
+ lcl_ensureImage_throw( xGraphicProvider, isHighContrast, *cachedImage );
+ aImages[ imageIndex ] = cachedImage->xGraphic;
+ }
+ }
+ pThrobber->setImageList( aImages );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
+ //--------------------------------------------------------------------------------------------------------------
+ void lcl_updateImageList_nothrow( AnimatedImagesPeer_Data& i_data, const Reference< XAnimatedImages >& i_images )
+ {
+ try
+ {
+ const sal_Int32 nImageSetCount = i_images->getImageSetCount();
+ i_data.aCachedImageSets.resize(0);
+ for ( sal_Int32 set = 0; set < nImageSetCount; ++set )
+ {
+ const Sequence< ::rtl::OUString > aImageURLs( i_images->getImageSet( set ) );
+ ::std::vector< CachedImage > aImages;
+ lcl_init( aImageURLs, aImages );
+ i_data.aCachedImageSets.push_back( aImages );
+ }
+
+ lcl_updateImageList_nothrow( i_data );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+ }
+
+ //==================================================================================================================
+ //= AnimatedImagesPeer
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ AnimatedImagesPeer::AnimatedImagesPeer()
+ :AnimatedImagesPeer_Base()
+ ,m_pData( new AnimatedImagesPeer_Data( *this ) )
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ AnimatedImagesPeer::~AnimatedImagesPeer()
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesPeer::startAnimation( ) throw (RuntimeException)
+ {
+ ::vos::OGuard aGuard( GetMutex() );
+ Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
+ if ( pThrobber != NULL)
+ pThrobber->start();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesPeer::stopAnimation( ) throw (RuntimeException)
+ {
+ ::vos::OGuard aGuard( GetMutex() );
+ Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
+ if ( pThrobber != NULL)
+ pThrobber->stop();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Bool SAL_CALL AnimatedImagesPeer::isAnimationRunning( ) throw (RuntimeException)
+ {
+ ::vos::OGuard aGuard( GetMutex() );
+ Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
+ if ( pThrobber != NULL)
+ return pThrobber->isRunning();
+ return sal_False;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesPeer::setProperty( const ::rtl::OUString& i_propertyName, const Any& i_value ) throw(RuntimeException)
+ {
+ ::vos::OGuard aGuard( GetMutex() );
+
+ Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
+ if ( pThrobber == NULL )
+ {
+ VCLXWindow::setProperty( i_propertyName, i_value );
+ return;
+ }
+
+ const sal_uInt16 nPropertyId = GetPropertyId( i_propertyName );
+ switch ( nPropertyId )
+ {
+ case BASEPROPERTY_STEP_TIME:
+ {
+ sal_Int32 nStepTime( 0 );
+ if ( i_value >>= nStepTime )
+ pThrobber->setStepTime( nStepTime );
+ break;
+ }
+ case BASEPROPERTY_AUTO_REPEAT:
+ {
+ sal_Bool bRepeat( sal_True );
+ if ( i_value >>= bRepeat )
+ pThrobber->setRepeat( bRepeat );
+ break;
+ }
+
+ case BASEPROPERTY_IMAGE_SCALE_MODE:
+ {
+ sal_Int16 nScaleMode( ImageScaleMode::Anisotropic );
+ ImageControl* pImageControl = dynamic_cast< ImageControl* >( GetWindow() );
+ if ( pImageControl && ( i_value >>= nScaleMode ) )
+ {
+ pImageControl->SetScaleMode( nScaleMode );
+ }
+ }
+ break;
+
+ default:
+ AnimatedImagesPeer_Base::setProperty( i_propertyName, i_value );
+ break;
+ }
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Any SAL_CALL AnimatedImagesPeer::getProperty( const ::rtl::OUString& i_propertyName ) throw(RuntimeException)
+ {
+ ::vos::OGuard aGuard( GetMutex() );
+
+ Any aReturn;
+
+ Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
+ if ( pThrobber == NULL )
+ return VCLXWindow::getProperty( i_propertyName );
+
+ const sal_uInt16 nPropertyId = GetPropertyId( i_propertyName );
+ switch ( nPropertyId )
+ {
+ case BASEPROPERTY_STEP_TIME:
+ aReturn <<= pThrobber->getStepTime();
+ break;
+
+ case BASEPROPERTY_AUTO_REPEAT:
+ aReturn <<= pThrobber->getRepeat();
+ break;
+
+ case BASEPROPERTY_IMAGE_SCALE_MODE:
+ {
+ ImageControl const* pImageControl = dynamic_cast< ImageControl* >( GetWindow() );
+ aReturn <<= ( pImageControl ? pImageControl->GetScaleMode() : ImageScaleMode::Anisotropic );
+ }
+ break;
+
+ default:
+ aReturn = AnimatedImagesPeer_Base::getProperty( i_propertyName );
+ break;
+ }
+
+ return aReturn;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void AnimatedImagesPeer::ProcessWindowEvent( const VclWindowEvent& i_windowEvent )
+ {
+ switch ( i_windowEvent.GetId() )
+ {
+ case VCLEVENT_WINDOW_RESIZE:
+ lcl_updateImageList_nothrow( *m_pData );
+ break;
+ }
+
+ AnimatedImagesPeer_Base::ProcessWindowEvent( i_windowEvent );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void AnimatedImagesPeer::impl_updateImages_nolck( const Reference< XInterface >& i_animatedImages )
+ {
+ ::vos::OGuard aGuard( GetMutex() );
+
+ lcl_updateImageList_nothrow( *m_pData, Reference< XAnimatedImages >( i_animatedImages, UNO_QUERY_THROW ) );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesPeer::elementInserted( const ContainerEvent& i_event ) throw (RuntimeException)
+ {
+ ::vos::OGuard aGuard( GetMutex() );
+ Reference< XAnimatedImages > xAnimatedImages( i_event.Source, UNO_QUERY_THROW );
+
+ sal_Int32 nPosition(0);
+ OSL_VERIFY( i_event.Accessor >>= nPosition );
+ size_t position = size_t( nPosition );
+ if ( position > m_pData->aCachedImageSets.size() )
+ {
+ OSL_ENSURE( false, "AnimatedImagesPeer::elementInserted: illegal accessor/index!" );
+ lcl_updateImageList_nothrow( *m_pData, xAnimatedImages );
+ }
+
+ Sequence< ::rtl::OUString > aImageURLs;
+ OSL_VERIFY( i_event.Element >>= aImageURLs );
+ ::std::vector< CachedImage > aImages;
+ lcl_init( aImageURLs, aImages );
+ m_pData->aCachedImageSets.insert( m_pData->aCachedImageSets.begin() + position, aImages );
+ lcl_updateImageList_nothrow( *m_pData );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesPeer::elementRemoved( const ContainerEvent& i_event ) throw (RuntimeException)
+ {
+ ::vos::OGuard aGuard( GetMutex() );
+ Reference< XAnimatedImages > xAnimatedImages( i_event.Source, UNO_QUERY_THROW );
+
+ sal_Int32 nPosition(0);
+ OSL_VERIFY( i_event.Accessor >>= nPosition );
+ size_t position = size_t( nPosition );
+ if ( position >= m_pData->aCachedImageSets.size() )
+ {
+ OSL_ENSURE( false, "AnimatedImagesPeer::elementRemoved: illegal accessor/index!" );
+ lcl_updateImageList_nothrow( *m_pData, xAnimatedImages );
+ }
+
+ m_pData->aCachedImageSets.erase( m_pData->aCachedImageSets.begin() + position );
+ lcl_updateImageList_nothrow( *m_pData );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesPeer::elementReplaced( const ContainerEvent& i_event ) throw (RuntimeException)
+ {
+ ::vos::OGuard aGuard( GetMutex() );
+ Reference< XAnimatedImages > xAnimatedImages( i_event.Source, UNO_QUERY_THROW );
+
+ sal_Int32 nPosition(0);
+ OSL_VERIFY( i_event.Accessor >>= nPosition );
+ size_t position = size_t( nPosition );
+ if ( position >= m_pData->aCachedImageSets.size() )
+ {
+ OSL_ENSURE( false, "AnimatedImagesPeer::elementReplaced: illegal accessor/index!" );
+ lcl_updateImageList_nothrow( *m_pData, xAnimatedImages );
+ }
+
+ Sequence< ::rtl::OUString > aImageURLs;
+ OSL_VERIFY( i_event.Element >>= aImageURLs );
+ ::std::vector< CachedImage > aImages;
+ lcl_init( aImageURLs, aImages );
+ m_pData->aCachedImageSets[ position ] = aImages;
+ lcl_updateImageList_nothrow( *m_pData );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesPeer::disposing( const EventObject& i_event ) throw (RuntimeException)
+ {
+ VCLXWindow::disposing( i_event );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesPeer::modified( const EventObject& i_event ) throw (RuntimeException)
+ {
+ impl_updateImages_nolck( i_event.Source );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesPeer::dispose( ) throw(RuntimeException)
+ {
+ AnimatedImagesPeer_Base::dispose();
+ ::vos::OGuard aGuard( GetMutex() );
+ m_pData->aCachedImageSets.resize(0);
+ }
+
+//......................................................................................................................
+} // namespace toolkit
+//......................................................................................................................
diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx
index 175289d1ac84..de5ebab36b2a 100644
--- a/toolkit/source/awt/vclxaccessiblecomponent.cxx
+++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx
@@ -248,9 +248,9 @@ void VCLXAccessibleComponent::ProcessWindowEvent( const VclWindowEvent& rVclWind
{
Window* pWindow = (Window*) rVclWindowEvent.GetData();
DBG_ASSERT( pWindow, "VCLEVENT_WINDOW_CHILDDESTROYED - Window=?" );
- if ( pWindow->GetAccessible( FALSE ).is() )
+ if ( pWindow->GetAccessible( sal_False ).is() )
{
- aOldValue <<= pWindow->GetAccessible( FALSE );
+ aOldValue <<= pWindow->GetAccessible( sal_False );
NotifyAccessibleEvent( accessibility::AccessibleEventId::CHILD, aOldValue, aNewValue );
}
}
@@ -445,7 +445,7 @@ void VCLXAccessibleComponent::FillAccessibleRelationSet( utl::AccessibleRelation
Window* pWindow = GetWindow();
if ( pWindow )
{
- Window *pLabeledBy = pWindow->GetLabeledBy();
+ Window *pLabeledBy = pWindow->GetAccessibleRelationLabeledBy();
if ( pLabeledBy && pLabeledBy != pWindow )
{
uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
@@ -453,7 +453,7 @@ void VCLXAccessibleComponent::FillAccessibleRelationSet( utl::AccessibleRelation
rRelationSet.AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::LABELED_BY, aSequence ) );
}
- Window* pLabelFor = pWindow->GetLabelFor();
+ Window* pLabelFor = pWindow->GetAccessibleRelationLabelFor();
if ( pLabelFor && pLabelFor != pWindow )
{
uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
@@ -568,7 +568,7 @@ uno::Reference< accessibility::XAccessible > VCLXAccessibleComponent::getAccessi
uno::Reference< accessibility::XAccessible > xAcc;
if ( GetWindow() )
{
- Window* pChild = GetWindow()->GetAccessibleChildWindow( (USHORT)i );
+ Window* pChild = GetWindow()->GetAccessibleChildWindow( (sal_uInt16)i );
if ( pChild )
xAcc = pChild->GetAccessible();
}
@@ -620,7 +620,7 @@ sal_Int32 VCLXAccessibleComponent::getAccessibleIndexInParent( ) throw (uno::Ru
if ( pParent )
{
/*
- for ( USHORT n = pParent->GetAccessibleChildWindowCount(); n; )
+ for ( sal_uInt16 n = pParent->GetAccessibleChildWindowCount(); n; )
{
Window* pChild = pParent->GetAccessibleChildWindow( --n );
if ( pChild == GetWindow() )
diff --git a/toolkit/source/awt/vclxfont.cxx b/toolkit/source/awt/vclxfont.cxx
index 53175ec79d24..9d46107d8522 100644
--- a/toolkit/source/awt/vclxfont.cxx
+++ b/toolkit/source/awt/vclxfont.cxx
@@ -62,7 +62,7 @@ void VCLXFont::Init( ::com::sun::star::awt::XDevice& rxDev, const Font& rFont )
maFont = rFont;
}
-BOOL VCLXFont::ImplAssertValidFontMetric()
+sal_Bool VCLXFont::ImplAssertValidFontMetric()
{
if ( !mpFontMetric && mxDevice.is() )
{
@@ -75,7 +75,7 @@ BOOL VCLXFont::ImplAssertValidFontMetric()
pOutDev->SetFont( aOldFont );
}
}
- return mpFontMetric ? TRUE : FALSE;
+ return mpFontMetric ? sal_True : sal_False;
}
@@ -149,7 +149,7 @@ sal_Int16 VCLXFont::getCharWidth( sal_Unicode c ) throw(::com::sun::star::uno::R
sal_Int16 nCount = nLast-nFirst + 1;
aSeq = ::com::sun::star::uno::Sequence<sal_Int16>( nCount );
- for ( USHORT n = 0; n < nCount; n++ )
+ for ( sal_uInt16 n = 0; n < nCount; n++ )
{
aSeq.getArray()[n] = sal::static_int_cast< sal_Int16 >(
pOutDev->GetTextWidth(
@@ -204,7 +204,7 @@ void VCLXFont::getKernPairs( ::com::sun::star::uno::Sequence< sal_Unicode >& rnC
Font aOldFont = pOutDev->GetFont();
pOutDev->SetFont( maFont );
- ULONG nPairs = pOutDev->GetKerningPairCount();
+ sal_uLong nPairs = pOutDev->GetKerningPairCount();
if ( nPairs )
{
KerningPair* pData = new KerningPair[ nPairs ];
@@ -218,7 +218,7 @@ void VCLXFont::getKernPairs( ::com::sun::star::uno::Sequence< sal_Unicode >& rnC
sal_Unicode* pChars2 = rnChars2.getArray();
sal_Int16* pKerns = rnKerns.getArray();
- for ( ULONG n = 0; n < nPairs; n++ )
+ for ( sal_uLong n = 0; n < nPairs; n++ )
{
pChars1[n] = pData[n].nChar1;
pChars2[n] = pData[n].nChar2;
diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx
index 5e44df58318e..817899cdcd35 100644
--- a/toolkit/source/awt/vclxmenu.cxx
+++ b/toolkit/source/awt/vclxmenu.cxx
@@ -109,7 +109,7 @@ VCLXMenu::~VCLXMenu()
}
}
-BOOL VCLXMenu::IsPopupMenu() const
+sal_Bool VCLXMenu::IsPopupMenu() const
{
return (mpMenu && ! mpMenu->IsMenuBar());
}
@@ -714,7 +714,7 @@ namespace
sal_Bool bMod1 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD1 ) == css::awt::KeyModifier::MOD1 );
sal_Bool bMod2 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD2 ) == css::awt::KeyModifier::MOD2 );
sal_Bool bMod3 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD3 ) == css::awt::KeyModifier::MOD3 );
- USHORT nKey = (USHORT)aAWTKey.KeyCode;
+ sal_uInt16 nKey = (sal_uInt16)aAWTKey.KeyCode;
return KeyCode(nKey, bShift, bMod1, bMod2, bMod3);
}
@@ -1082,7 +1082,7 @@ DBG_NAME(VCLXMenuBar);
VCLXMenuBar::VCLXMenuBar()
{
DBG_CTOR( VCLXMenuBar, 0 );
- ImplCreateMenu( FALSE );
+ ImplCreateMenu( sal_False );
}
VCLXMenuBar::VCLXMenuBar( MenuBar* pMenuBar ) : VCLXMenu( (Menu *)pMenuBar )
@@ -1099,5 +1099,5 @@ DBG_NAME(VCLXPopupMenu);
VCLXPopupMenu::VCLXPopupMenu()
{
DBG_CTOR( VCLXPopupMenu, 0 );
- ImplCreateMenu( TRUE );
+ ImplCreateMenu( sal_True );
}
diff --git a/toolkit/source/awt/vclxregion.cxx b/toolkit/source/awt/vclxregion.cxx
index 3c4bbcad2d79..2a7d56554dd8 100644
--- a/toolkit/source/awt/vclxregion.cxx
+++ b/toolkit/source/awt/vclxregion.cxx
@@ -154,7 +154,7 @@ void VCLXRegion::xOrRegion( const ::com::sun::star::uno::Reference< ::com::sun::
{
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
- ULONG nRects = maRegion.GetRectCount();
+ sal_uLong nRects = maRegion.GetRectCount();
::com::sun::star::uno::Sequence< ::com::sun::star::awt::Rectangle > aRects( nRects );
Rectangle aRect;
diff --git a/toolkit/source/awt/vclxtabcontrol.cxx b/toolkit/source/awt/vclxtabcontrol.cxx
index 1dfd52678957..773b9922ea56 100644
--- a/toolkit/source/awt/vclxtabcontrol.cxx
+++ b/toolkit/source/awt/vclxtabcontrol.cxx
@@ -134,7 +134,7 @@ TabControl *VCLXTabControl::getTabControl() const throw (uno::RuntimeException)
sal_Int32 SAL_CALL VCLXTabControl::insertTab() throw (uno::RuntimeException)
{
TabControl *pTabControl = getTabControl();
- USHORT id = sal::static_int_cast< USHORT >( mTabId++ );
+ sal_uInt16 id = sal::static_int_cast< sal_uInt16 >( mTabId++ );
rtl::OUString title (RTL_CONSTASCII_USTRINGPARAM( "" ) );
pTabControl->InsertPage( id, title.getStr(), TAB_APPEND );
pTabControl->SetTabPage( id, new TabPage( pTabControl ) );
@@ -144,17 +144,17 @@ sal_Int32 SAL_CALL VCLXTabControl::insertTab() throw (uno::RuntimeException)
void SAL_CALL VCLXTabControl::removeTab( sal_Int32 ID ) throw (uno::RuntimeException, IndexOutOfBoundsException)
{
TabControl *pTabControl = getTabControl();
- if ( pTabControl->GetTabPage( sal::static_int_cast< USHORT >( ID ) ) == NULL )
+ if ( pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( ID ) ) == NULL )
throw IndexOutOfBoundsException();
- pTabControl->RemovePage( sal::static_int_cast< USHORT >( ID ) );
+ pTabControl->RemovePage( sal::static_int_cast< sal_uInt16 >( ID ) );
}
void SAL_CALL VCLXTabControl::activateTab( sal_Int32 ID ) throw (uno::RuntimeException, IndexOutOfBoundsException)
{
TabControl *pTabControl = getTabControl();
- if ( pTabControl->GetTabPage( sal::static_int_cast< USHORT >( ID ) ) == NULL )
+ if ( pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( ID ) ) == NULL )
throw IndexOutOfBoundsException();
- pTabControl->SelectTabPage( sal::static_int_cast< USHORT >( ID ) );
+ pTabControl->SelectTabPage( sal::static_int_cast< sal_uInt16 >( ID ) );
}
sal_Int32 SAL_CALL VCLXTabControl::getActiveTabID() throw (uno::RuntimeException)
@@ -192,7 +192,7 @@ void SAL_CALL VCLXTabControl::removeTabListener( const uno::Reference< awt::XTab
void SAL_CALL VCLXTabControl::setTabProps( sal_Int32 ID, const uno::Sequence< NamedValue >& Properties ) throw (uno::RuntimeException, IndexOutOfBoundsException)
{
TabControl *pTabControl = getTabControl();
- if ( pTabControl->GetTabPage( sal::static_int_cast< USHORT >( ID ) ) == NULL )
+ if ( pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( ID ) ) == NULL )
throw IndexOutOfBoundsException();
for ( int i = 0; i < Properties.getLength(); i++ )
@@ -203,7 +203,7 @@ void SAL_CALL VCLXTabControl::setTabProps( sal_Int32 ID, const uno::Sequence< Na
if ( name == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ) )
{
rtl::OUString title = value.get<rtl::OUString>();
- pTabControl->SetPageText( sal::static_int_cast< USHORT >( ID ), title.getStr() );
+ pTabControl->SetPageText( sal::static_int_cast< sal_uInt16 >( ID ), title.getStr() );
}
}
}
@@ -212,7 +212,7 @@ uno::Sequence< NamedValue > SAL_CALL VCLXTabControl::getTabProps( sal_Int32 ID )
throw (IndexOutOfBoundsException, uno::RuntimeException)
{
TabControl *pTabControl = getTabControl();
- if ( pTabControl->GetTabPage( sal::static_int_cast< USHORT >( ID ) ) == NULL )
+ if ( pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( ID ) ) == NULL )
throw IndexOutOfBoundsException();
#define ADD_PROP( seq, i, name, val ) { \
@@ -223,8 +223,8 @@ uno::Sequence< NamedValue > SAL_CALL VCLXTabControl::getTabProps( sal_Int32 ID )
}
uno::Sequence< NamedValue > props( 2 );
- ADD_PROP( props, 0, "Title", rtl::OUString( pTabControl->GetPageText( sal::static_int_cast< USHORT >( ID ) ) ) );
- ADD_PROP( props, 1, "Position", pTabControl->GetPagePos( sal::static_int_cast< USHORT >( ID ) ) );
+ ADD_PROP( props, 0, "Title", rtl::OUString( pTabControl->GetPageText( sal::static_int_cast< sal_uInt16 >( ID ) ) ) );
+ ADD_PROP( props, 1, "Position", pTabControl->GetPagePos( sal::static_int_cast< sal_uInt16 >( ID ) ) );
#undef ADD_PROP
return props;
}
@@ -235,7 +235,7 @@ void SAL_CALL VCLXTabControl::draw( sal_Int32 nX, sal_Int32 nY ) throw(uno::Runt
::vos::OGuard aGuard( GetMutex() );
TabControl *pTabControl = getTabControl();
- TabPage *pTabPage = pTabControl->GetTabPage( sal::static_int_cast< USHORT >( getActiveTabID() ) );
+ TabPage *pTabPage = pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( getActiveTabID() ) );
if ( pTabPage )
{
::Point aPos( nX, nY );
@@ -409,8 +409,8 @@ void SAL_CALL VCLXTabControl::allocateArea (awt::Rectangle const &area)
if ( active )
{
- ::Rectangle label_rect = pTabControl->GetTabBounds( sal::static_int_cast< USHORT >( i+1 ) );
- ::Rectangle page_rect = pTabControl->GetTabPageBounds( sal::static_int_cast< USHORT >( i+1 ) );
+ ::Rectangle label_rect = pTabControl->GetTabBounds( sal::static_int_cast< sal_uInt16 >( i+1 ) );
+ ::Rectangle page_rect = pTabControl->GetTabPageBounds( sal::static_int_cast< sal_uInt16 >( i+1 ) );
awt::Rectangle childRect;
childRect.X = page_rect.Left();
@@ -443,7 +443,7 @@ awt::Size SAL_CALL VCLXTabControl::getMinimumSize()
if ( child->mxChild.is() )
{
// set the title prop here...
- pTabControl->SetPageText( sal::static_int_cast< USHORT >( i+1 ), child->maTitle.getStr() );
+ pTabControl->SetPageText( sal::static_int_cast< sal_uInt16 >( i+1 ), child->maTitle.getStr() );
awt::Size childSize( child->mxChild->getMinimumSize() );
childrenSize.Width = SAL_MAX( childSize.Width, childrenSize.Width );
@@ -483,7 +483,7 @@ void VCLXTabControl::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent
case VCLEVENT_TABPAGE_REMOVEDALL:
case VCLEVENT_TABPAGE_PAGETEXTCHANGED:
{
- ULONG page = (ULONG) _rVclWindowEvent.GetData();
+ sal_uLong page = (sal_uLong) _rVclWindowEvent.GetData();
for ( std::list< uno::Reference
< awt::XTabListener > >::iterator it
= mxTabListeners.begin(); it != mxTabListeners.end(); it++)
@@ -509,7 +509,7 @@ void VCLXTabControl::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent
case VCLEVENT_TABPAGE_REMOVEDALL:
for ( int i = 1; i < mTabId; i++)
{
- if ( pTabControl->GetTabPage( sal::static_int_cast< USHORT >( i ) ) )
+ if ( pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( i ) ) )
listener->removed( i );
}
break;
diff --git a/toolkit/source/awt/vclxtabpagecontainer.cxx b/toolkit/source/awt/vclxtabpagecontainer.cxx
new file mode 100644
index 000000000000..d4f7a5048701
--- /dev/null
+++ b/toolkit/source/awt/vclxtabpagecontainer.cxx
@@ -0,0 +1,233 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "precompiled_toolkit.hxx"
+
+#include <toolkit/awt/vclxtabpagecontainer.hxx>
+#include <com/sun/star/awt/tab/XTabPageModel.hpp>
+#include <com/sun/star/awt/XControl.hpp>
+#include <vcl/tabpage.hxx>
+#include <vcl/tabctrl.hxx>
+#include <toolkit/helper/property.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
+#include <toolkit/helper/tkresmgr.hxx>
+#include <cppuhelper/typeprovider.hxx>
+
+using ::rtl::OUString;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::view;
+// ----------------------------------------------------
+// class VCLXTabPageContainer
+// ----------------------------------------------------
+void VCLXTabPageContainer::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
+{
+ VCLXWindow::ImplGetPropertyIds( rIds );
+}
+
+VCLXTabPageContainer::VCLXTabPageContainer() :
+ m_aTabPageListeners( *this )
+{
+}
+
+VCLXTabPageContainer::~VCLXTabPageContainer()
+{
+#ifndef __SUNPRO_CC
+ OSL_TRACE ("%s", __FUNCTION__);
+#endif
+}
+
+void SAL_CALL VCLXTabPageContainer::draw( sal_Int32 nX, sal_Int32 nY ) throw(RuntimeException)
+{
+ ::vos::OGuard aGuard( GetMutex() );
+ TabControl* pTabControl = (TabControl*)GetWindow();
+ if ( pTabControl )
+ {
+ TabPage *pTabPage = pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( pTabControl->GetCurPageId( ) ) );
+ if ( pTabPage )
+ {
+ ::Point aPos( nX, nY );
+ ::Size aSize = pTabPage->GetSizePixel();
+
+ OutputDevice* pDev = VCLUnoHelper::GetOutputDevice( getGraphics() );
+ aPos = pDev->PixelToLogic( aPos );
+ aSize = pDev->PixelToLogic( aSize );
+
+ pTabPage->Draw( pDev, aPos, aSize, 0 );
+ }
+ }
+
+ VCLXWindow::draw( nX, nY );
+/*
+ if ( pWindow )
+ {
+ OutputDevice* pDev = VCLUnoHelper::GetOutputDevice( getGraphics() );
+ if ( !pDev )
+ pDev = pWindow->GetParent();
+
+ Size aSize = pDev->PixelToLogic( pWindow->GetSizePixel() );
+ Point aPos = pDev->PixelToLogic( Point( nX, nY ) );
+
+ pWindow->Draw( pDev, aPos, aSize, WINDOW_DRAW_NOCONTROLS );
+ }
+*/
+}
+
+::com::sun::star::awt::DeviceInfo VCLXTabPageContainer::getInfo() throw(RuntimeException)
+{
+ ::com::sun::star::awt::DeviceInfo aInfo = VCLXDevice::getInfo();
+ return aInfo;
+}
+
+void SAL_CALL VCLXTabPageContainer::setProperty(const ::rtl::OUString& PropertyName, const Any& Value ) throw(RuntimeException)
+{
+ ::vos::OGuard aGuard( GetMutex() );
+
+ TabControl* pTabPage = (TabControl*)GetWindow();
+ if ( pTabPage )
+ {
+ VCLXWindow::setProperty( PropertyName, Value );
+ }
+}
+::sal_Int16 SAL_CALL VCLXTabPageContainer::getActiveTabPageID() throw (RuntimeException)
+{
+ TabControl* pTabCtrl = (TabControl*)GetWindow();
+ return pTabCtrl != NULL ? pTabCtrl->GetCurPageId( ) : 0;
+}
+void SAL_CALL VCLXTabPageContainer::setActiveTabPageID( ::sal_Int16 _activetabpageid ) throw (RuntimeException)
+{
+ TabControl* pTabCtrl = (TabControl*)GetWindow();
+ if ( pTabCtrl )
+ pTabCtrl->SelectTabPage(_activetabpageid);
+}
+::sal_Int32 SAL_CALL VCLXTabPageContainer::getTabPageCount( ) throw (RuntimeException)
+{
+ TabControl* pTabCtrl = (TabControl*)GetWindow();
+ return pTabCtrl != NULL ? pTabCtrl->GetPageCount() : 0;
+}
+::sal_Bool SAL_CALL VCLXTabPageContainer::isTabPageActive( ::sal_Int16 tabPageIndex ) throw (RuntimeException)
+{
+ return (getActiveTabPageID() == tabPageIndex);
+}
+Reference< ::com::sun::star::awt::tab::XTabPage > SAL_CALL VCLXTabPageContainer::getTabPage( ::sal_Int16 tabPageIndex ) throw (RuntimeException)
+{
+ return (tabPageIndex >= 0 && tabPageIndex < static_cast<sal_Int16>(m_aTabPages.size())) ? m_aTabPages[tabPageIndex] : NULL;
+}
+Reference< ::com::sun::star::awt::tab::XTabPage > SAL_CALL VCLXTabPageContainer::getTabPageByID( ::sal_Int16 tabPageID ) throw (RuntimeException)
+{
+ ::vos::OClearableGuard aGuard( GetMutex() );
+ Reference< ::com::sun::star::awt::tab::XTabPage > xTabPage;
+ ::std::vector< Reference< ::com::sun::star::awt::tab::XTabPage > >::iterator aIter = m_aTabPages.begin();
+ ::std::vector< Reference< ::com::sun::star::awt::tab::XTabPage > >::iterator aEnd = m_aTabPages.end();
+ for(;aIter != aEnd;++aIter)
+ {
+ Reference< awt::XControl > xControl(*aIter,UNO_QUERY );
+ Reference< awt::tab::XTabPageModel > xP( xControl->getModel(), UNO_QUERY );
+ if ( tabPageID == xP->getTabPageID() )
+ {
+ xTabPage = *aIter;
+ break;
+ }
+ }
+ return xTabPage;
+}
+void SAL_CALL VCLXTabPageContainer::addTabPageListener( const Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (RuntimeException)
+{
+ m_aTabPageListeners.addInterface( listener );
+}
+void SAL_CALL VCLXTabPageContainer::removeTabPageListener( const Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (RuntimeException)
+{
+ m_aTabPageListeners.removeInterface( listener );
+}
+
+void VCLXTabPageContainer::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent )
+{
+ ::vos::OClearableGuard aGuard( GetMutex() );
+ TabControl* pTabControl = static_cast< TabControl* >( GetWindow() );
+ if ( pTabControl )
+ {
+ switch ( _rVclWindowEvent.GetId() )
+ {
+ case VCLEVENT_TABPAGE_ACTIVATE:
+ {
+// allocateArea( maAllocation );
+ sal_uLong page = (sal_uLong)_rVclWindowEvent.GetData();
+ awt::tab::TabPageActivatedEvent aEvent(NULL,page);
+ m_aTabPageListeners.tabPageActivated(aEvent);
+ break;
+ }
+ default:
+ aGuard.clear();
+ VCLXWindow::ProcessWindowEvent( _rVclWindowEvent );
+ break;
+ }
+ }
+}
+void SAL_CALL VCLXTabPageContainer::disposing( const ::com::sun::star::lang::EventObject& /*Source*/ ) throw (::com::sun::star::uno::RuntimeException)
+{
+}
+void SAL_CALL VCLXTabPageContainer::elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException)
+{
+ ::vos::OGuard aGuard( GetMutex() );
+ TabControl* pTabCtrl = (TabControl*)GetWindow();
+ Reference< ::com::sun::star::awt::tab::XTabPage > xTabPage(Event.Element,uno::UNO_QUERY);
+ if ( pTabCtrl && xTabPage.is() )
+ {
+ Reference< awt::XControl > xControl(xTabPage,UNO_QUERY );
+ Reference< awt::tab::XTabPageModel > xP( xControl->getModel(), UNO_QUERY );
+ sal_Int16 nPageID = xP->getTabPageID();
+
+ Window* pWindow = VCLUnoHelper::GetWindow(xControl->getPeer());
+ TabPage* pPage = (TabPage*)pWindow;
+ pTabCtrl->InsertPage(nPageID,pPage->GetText());
+
+ pPage->Hide();
+ pTabCtrl->SetTabPage(nPageID,pPage);
+ pTabCtrl->SetHelpText(nPageID,xP->getTooltip());
+ pTabCtrl->SetPageImage(nPageID,TkResMgr::getImageFromURL(xP->getImageURL()));
+ pTabCtrl->SelectTabPage(nPageID);
+ m_aTabPages.push_back(xTabPage);
+ }
+}
+void SAL_CALL VCLXTabPageContainer::elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException)
+{
+ ::vos::OGuard aGuard( GetMutex() );
+ TabControl* pTabCtrl = (TabControl*)GetWindow();
+ Reference< ::com::sun::star::awt::tab::XTabPage > xTabPage(Event.Element,uno::UNO_QUERY);
+ if ( pTabCtrl && xTabPage.is() )
+ {
+ Reference< awt::XControl > xControl(xTabPage,UNO_QUERY );
+ Reference< awt::tab::XTabPageModel > xP( xControl->getModel(), UNO_QUERY );
+ pTabCtrl->RemovePage(xP->getTabPageID());
+ m_aTabPages.erase(::std::remove(m_aTabPages.begin(),m_aTabPages.end(),xTabPage));
+ }
+}
+void SAL_CALL VCLXTabPageContainer::elementReplaced( const ::com::sun::star::container::ContainerEvent& /*Event*/ ) throw (::com::sun::star::uno::RuntimeException)
+{
+}
diff --git a/toolkit/source/awt/vclxtabpagemodel.cxx b/toolkit/source/awt/vclxtabpagemodel.cxx
new file mode 100644
index 000000000000..c7145992bd7f
--- /dev/null
+++ b/toolkit/source/awt/vclxtabpagemodel.cxx
@@ -0,0 +1,150 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "precompiled_toolkit.hxx"
+
+#include <toolkit/awt/vclxtabpagemodel.hxx>
+#include <vcl/tabpage.hxx>
+#include <vcl/tabctrl.hxx>
+#include <toolkit/helper/property.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
+#include <toolkit/helper/unopropertyarrayhelper.hxx>
+#include <cppuhelper/typeprovider.hxx>
+// ----------------------------------------------------
+// class VCLXDialog
+// ----------------------------------------------------
+
+VCLXTabPageModel::VCLXTabPageModel()
+{
+}
+
+VCLXTabPageModel::~VCLXTabPageModel()
+{
+#ifndef __SUNPRO_CC
+ OSL_TRACE ("%s", __FUNCTION__);
+#endif
+}
+
+void SAL_CALL VCLXTabPageModel::draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::star::uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard( GetMutex() );
+ Window* pWindow = GetWindow();
+
+ if ( pWindow )
+ {
+ OutputDevice* pDev = VCLUnoHelper::GetOutputDevice( getGraphics() );
+ if ( !pDev )
+ pDev = pWindow->GetParent();
+
+ Size aSize = pDev->PixelToLogic( pWindow->GetSizePixel() );
+ Point aPos = pDev->PixelToLogic( Point( nX, nY ) );
+
+ pWindow->Draw( pDev, aPos, aSize, WINDOW_DRAW_NOCONTROLS );
+ }
+}
+
+::com::sun::star::awt::DeviceInfo VCLXTabPageModel::getInfo() throw(::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::awt::DeviceInfo aInfo;// = VCLXDevice::getInfo();
+ return aInfo;
+}
+
+
+void SAL_CALL VCLXTabPageModel::setProperty(
+ const ::rtl::OUString& /*PropertyName*/,
+ const ::com::sun::star::uno::Any& /*Value*/ )
+throw(::com::sun::star::uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard( GetMutex() );
+
+ /*TabPage* pTabPage = (TabPage*)GetWindow();
+ if ( pTabPage )
+ {
+ VCLXWindow::setProperty( PropertyName, Value );
+ }*/
+}
+//XTabPageModel
+::sal_Int16 SAL_CALL VCLXTabPageModel::getTabPageID() throw (::com::sun::star::uno::RuntimeException)
+{
+ return 0;
+}
+::sal_Bool SAL_CALL VCLXTabPageModel::getEnabled() throw (::com::sun::star::uno::RuntimeException)
+{
+ return false;
+}
+void SAL_CALL VCLXTabPageModel::setEnabled( ::sal_Bool _enabled ) throw (::com::sun::star::uno::RuntimeException)
+{
+ //TabControl* pTabControl = (TabControl*)GetWindow();
+ //if ( pTabControl )
+ // pTabControl->EnablePage(0, true);
+}
+::rtl::OUString SAL_CALL VCLXTabPageModel::getTitle() throw (::com::sun::star::uno::RuntimeException)
+{
+ //TabControl* pTabControl = (TabControl*)GetWindow();
+ //if ( pTabControl )
+ // return pTabControl->GetPageText(0);
+ //else
+ return ::rtl::OUString::createFromAscii("");
+}
+void SAL_CALL VCLXTabPageModel::setTitle( const ::rtl::OUString& _title ) throw (::com::sun::star::uno::RuntimeException)
+{
+ //TabControl* pTabControl = (TabControl*)GetWindow();
+ //if ( pTabControl )
+ // pTabControl->SetPageText(0, _title);
+
+}
+::rtl::OUString SAL_CALL VCLXTabPageModel::getImageURL() throw (::com::sun::star::uno::RuntimeException)
+{
+ return ::rtl::OUString::createFromAscii("");
+}
+void SAL_CALL VCLXTabPageModel::setImageURL( const ::rtl::OUString& /*_imageurl*/ ) throw (::com::sun::star::uno::RuntimeException)
+{
+ //m_sImageURL = _imageurl;
+}
+::rtl::OUString SAL_CALL VCLXTabPageModel::getTooltip() throw (::com::sun::star::uno::RuntimeException)
+{
+ //return m_sTooltip;
+ return ::rtl::OUString::createFromAscii("");
+}
+void SAL_CALL VCLXTabPageModel::setTooltip( const ::rtl::OUString& _tooltip ) throw (::com::sun::star::uno::RuntimeException)
+{
+ (void)_tooltip;
+}
+::cppu::IPropertyArrayHelper& VCLXTabPageModel::getInfoHelper()
+{
+ static UnoPropertyArrayHelper* pHelper = NULL;
+ if ( !pHelper )
+ {
+ com::sun::star::uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
+ pHelper = new UnoPropertyArrayHelper( aIDs );
+ }
+ return *pHelper;
+}
+::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > VCLXTabPageModel::getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException)
+{
+ static ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
+ return xInfo;
+}
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index 1af422bf7f00..dd6e28807bc6 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -33,6 +33,7 @@
#include <tools/svwin.h>
#endif
#include <stdio.h>
+#include <com/sun/star/awt/ImageScaleMode.hpp>
#include <com/sun/star/awt/WindowAttribute.hpp>
#include <com/sun/star/awt/VclWindowPeerAttribute.hpp>
#include <com/sun/star/awt/WindowClass.hpp>
@@ -68,9 +69,12 @@
#include <toolkit/awt/vclxsystemdependentwindow.hxx>
#include <toolkit/awt/vclxregion.hxx>
#include <toolkit/awt/vclxtoolkit.hxx>
+#include <toolkit/awt/vclxtabpagecontainer.hxx>
+#include <toolkit/awt/vclxtabpagemodel.hxx>
#include <toolkit/awt/xsimpleanimation.hxx>
#include <toolkit/awt/xthrobber.hxx>
+#include <toolkit/awt/animatedimagespeer.hxx>
#include <toolkit/awt/vclxtopwindow.hxx>
#include <toolkit/awt/vclxwindow.hxx>
#include <toolkit/helper/vclunohelper.hxx>
@@ -115,6 +119,7 @@
#include <vcl/virdev.hxx>
#include <vcl/window.hxx>
#include <vcl/wrkwin.hxx>
+#include <vcl/throbber.hxx>
#include "toolkit/awt/vclxspinbutton.hxx"
#include <tools/debug.hxx>
@@ -313,6 +318,7 @@ static ComponentInfo __FAR_DATA aComponentInfos [] =
{ "scrollbar", WINDOW_SCROLLBAR },
{ "scrollbarbox", WINDOW_SCROLLBARBOX },
{ "simpleanimation", WINDOW_CONTROL },
+ { "animatedimages", WINDOW_CONTROL },
{ "spinbutton", WINDOW_SPINBUTTON },
{ "spinfield", WINDOW_SPINFIELD },
{ "throbber", WINDOW_CONTROL },
@@ -329,7 +335,9 @@ static ComponentInfo __FAR_DATA aComponentInfos [] =
{ "tristatebox", WINDOW_TRISTATEBOX },
{ "warningbox", WINDOW_WARNINGBOX },
{ "window", WINDOW_WINDOW },
- { "workwindow", WINDOW_WORKWINDOW }
+ { "workwindow", WINDOW_WORKWINDOW },
+ { "tabpagecontainer", WINDOW_CONTROL },
+ { "tabpagemodel", WINDOW_TABPAGE }
};
extern "C"
@@ -384,7 +392,7 @@ sal_uInt16 ImplGetComponentType( const String& rServiceName )
// ----------------------------------------------------
static sal_Int32 nVCLToolkitInstanceCount = 0;
-static BOOL bInitedByVCLToolkit = sal_False;
+static sal_Bool bInitedByVCLToolkit = sal_False;
//static cppu::OInterfaceContainerHelper * pToolkits = 0;
static osl::Mutex & getInitMutex()
@@ -680,7 +688,7 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
break;
case WINDOW_CURRENCYFIELD:
pNewWindow = new CurrencyField( pParent, nWinBits );
- static_cast<CurrencyField*>(pNewWindow)->EnableEmptyFieldValue( TRUE );
+ static_cast<CurrencyField*>(pNewWindow)->EnableEmptyFieldValue( sal_True );
*ppNewComp = new VCLXNumericField;
((VCLXFormattedSpinField*)*ppNewComp)->SetFormatter( (FormatterBase*)(CurrencyField*)pNewWindow );
break;
@@ -689,7 +697,7 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
break;
case WINDOW_DATEFIELD:
pNewWindow = new DateField( pParent, nWinBits );
- static_cast<DateField*>(pNewWindow)->EnableEmptyFieldValue( TRUE );
+ static_cast<DateField*>(pNewWindow)->EnableEmptyFieldValue( sal_True );
*ppNewComp = new VCLXDateField;
((VCLXFormattedSpinField*)*ppNewComp)->SetFormatter( (FormatterBase*)(DateField*)pNewWindow );
break;
@@ -794,7 +802,7 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
break;
case WINDOW_NUMERICFIELD:
pNewWindow = new NumericField( pParent, nWinBits );
- static_cast<NumericField*>(pNewWindow)->EnableEmptyFieldValue( TRUE );
+ static_cast<NumericField*>(pNewWindow)->EnableEmptyFieldValue( sal_True );
*ppNewComp = new VCLXNumericField;
((VCLXFormattedSpinField*)*ppNewComp)->SetFormatter( (FormatterBase*)(NumericField*)pNewWindow );
break;
@@ -826,12 +834,12 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
// Since the VCLXRadioButton really cares for it's RadioCheck settings, this is important:
// if we enable it, the VCLXRadioButton will use RadioButton::Check instead of RadioButton::SetState
// This leads to a strange behaviour if the control is newly created: when settings the initial
- // state to "checked", the RadioButton::Check (called because RadioCheck=TRUE) will uncheck
+ // state to "checked", the RadioButton::Check (called because RadioCheck=sal_True) will uncheck
// _all_other_ radio buttons in the same group. However, at this moment the grouping of the controls
// is not really valid: the controls are grouped after they have been created, but we're still in
// the creation process, so the RadioButton::Check relies on invalid grouping information.
// 07.08.2001 - #87254# - frank.schoenheit@sun.com
- static_cast<RadioButton*>(pNewWindow)->EnableRadioCheck( FALSE );
+ static_cast<RadioButton*>(pNewWindow)->EnableRadioCheck( sal_False );
break;
case WINDOW_SCROLLBAR:
pNewWindow = new ScrollBar( pParent, nWinBits );
@@ -863,20 +871,32 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
break;
case WINDOW_TABCONTROL:
pNewWindow = new TabControl( pParent, nWinBits );
+ *ppNewComp = new VCLXTabPageContainer;
break;
case WINDOW_TABDIALOG:
pNewWindow = new TabDialog( pParent, nWinBits );
break;
case WINDOW_TABPAGE:
- pNewWindow = new TabPage( pParent, nWinBits );
- *ppNewComp = new VCLXTabPage;
+ /*
+ if ( rDescriptor.WindowServiceName.equalsIgnoreAsciiCase(
+ ::rtl::OUString::createFromAscii("tabpagemodel") ) )
+ {
+ pNewWindow = new TabControl( pParent, nWinBits );
+ *ppNewComp = new VCLXTabPageContainer;
+ }
+ else
+ */
+ {
+ pNewWindow = new TabPage( pParent, nWinBits );
+ *ppNewComp = new VCLXTabPage;
+ }
break;
case WINDOW_TIMEBOX:
pNewWindow = new TimeBox( pParent, nWinBits );
break;
case WINDOW_TIMEFIELD:
pNewWindow = new TimeField( pParent, nWinBits );
- static_cast<TimeField*>(pNewWindow)->EnableEmptyFieldValue( TRUE );
+ static_cast<TimeField*>(pNewWindow)->EnableEmptyFieldValue( sal_True );
*ppNewComp = new VCLXTimeField;
((VCLXFormattedSpinField*)*ppNewComp)->SetFormatter( (FormatterBase*)(TimeField*)pNewWindow );
break;
@@ -984,22 +1004,35 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
}
break;
case WINDOW_CONTROL:
- if ( rDescriptor.WindowServiceName.equalsIgnoreAsciiCase(
- ::rtl::OUString::createFromAscii("simpleanimation") ) )
+ if ( aServiceName.EqualsAscii( "simpleanimation" ) )
{
- nWinBits |= WB_SCALE;
- pNewWindow = new FixedImage( pParent, nWinBits );
+ pNewWindow = new Throbber( pParent, nWinBits, Throbber::IMAGES_NONE );
+ ((Throbber*)pNewWindow)->SetScaleMode( css::awt::ImageScaleMode::Anisotropic );
+ // (compatibility)
*ppNewComp = new ::toolkit::XSimpleAnimation;
}
- else if ( rDescriptor.WindowServiceName.equalsIgnoreAsciiCase(
- ::rtl::OUString::createFromAscii("throbber") ) )
+ else if ( aServiceName.EqualsAscii( "throbber" ) )
{
- nWinBits |= WB_SCALE;
- pNewWindow = new FixedImage( pParent, nWinBits );
+ pNewWindow = new Throbber( pParent, nWinBits, Throbber::IMAGES_NONE );
+ ((Throbber*)pNewWindow)->SetScaleMode( css::awt::ImageScaleMode::Anisotropic );
+ // (compatibility)
*ppNewComp = new ::toolkit::XThrobber;
}
+ else if ( rDescriptor.WindowServiceName.equalsIgnoreAsciiCase(
+ ::rtl::OUString::createFromAscii("tabpagecontainer") ) )
+ {
+ pNewWindow = new TabControl( pParent, nWinBits );
+ *ppNewComp = new VCLXTabPageContainer;
+ }
+ else if ( aServiceName.EqualsAscii( "animatedimages" ) )
+ {
+ pNewWindow = new Throbber( pParent, nWinBits );
+ *ppNewComp = new ::toolkit::AnimatedImagesPeer;
+ }
break;
- default: DBG_ERRORFILE( "UNO3!" );
+ default:
+ OSL_ENSURE( false, "VCLXToolkit::ImplCreateWindow: unknown window type!" );
+ break;
}
}
@@ -1043,7 +1076,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow(
// try to load the lib
if ( !fnSvtCreateWindow && !hSvToolsLib )
{
- ::rtl::OUString aLibName = ::vcl::unohelper::CreateLibraryName( "svt", TRUE );
+ ::rtl::OUString aLibName = ::vcl::unohelper::CreateLibraryName( "svt", sal_True );
hSvToolsLib = osl_loadModuleRelative(
&thisModule, aLibName.pData, SAL_LOADMODULE_DEFAULT );
if ( hSvToolsLib )
@@ -1090,11 +1123,11 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow(
}
else
{
- pNewComp->SetCreatedWithToolkit( TRUE );
+ pNewComp->SetCreatedWithToolkit( sal_True );
xRef = pNewComp;
pNewWindow->SetComponentInterface( xRef );
}
- DBG_ASSERT( pNewWindow->GetComponentInterface( FALSE ) == xRef,
+ DBG_ASSERT( pNewWindow->GetComponentInterface( sal_False ) == xRef,
"VCLXToolkit::createWindow: did #133706# resurge?" );
if ( rDescriptor.WindowAttributes & ::com::sun::star::awt::WindowAttribute::SHOW )
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 808f3578ef97..669b49e29313 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -65,6 +65,7 @@
#include <vcl/tabpage.hxx>
#include <vcl/button.hxx>
#include <comphelper/asyncnotification.hxx>
+#include <comphelper/flagguard.hxx>
#include <toolkit/helper/solarrelease.hxx>
#include "stylesettings.hxx"
#include <tools/urlobj.hxx>
@@ -95,32 +96,6 @@ namespace MouseWheelBehavior = ::com::sun::star::awt::MouseWheelBehavior;
using ::toolkit::ReleaseSolarMutex;
//====================================================================
-//= misc helpers
-//====================================================================
-namespace
-{
- //................................................................
- //. FlagGuard
- //................................................................
- class FlagGuard
- {
- private:
- bool& m_rFlag;
-
- public:
- FlagGuard( bool& _rFlag )
- :m_rFlag( _rFlag )
- {
- m_rFlag = true;
- }
- ~FlagGuard()
- {
- m_rFlag = false;
- }
- };
-}
-
-//====================================================================
//= VCLXWindowImpl
//====================================================================
class SAL_DLLPRIVATE VCLXWindowImpl
@@ -151,7 +126,7 @@ private:
TopWindowListenerMultiplexer maTopWindowListeners;
CallbackArray maCallbackEvents;
- ULONG mnCallbackEventId;
+ sal_uLong mnCallbackEventId;
public:
bool mbDisposing : 1;
@@ -159,7 +134,7 @@ public:
bool mbSynthesizingVCLEvent : 1;
bool mbWithDefaultProps : 1;
- ULONG mnListenerLockLevel;
+ sal_uLong mnListenerLockLevel;
sal_Int16 mnWritingMode;
sal_Int16 mnContextWritingMode;
@@ -895,7 +870,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
{
if ( mpImpl->getDockableWindowListeners().getLength() )
{
- BOOL *p_bFloating = (BOOL*)rVclWindowEvent.GetData();
+ sal_Bool *p_bFloating = (sal_Bool*)rVclWindowEvent.GetData();
::com::sun::star::lang::EventObject aEvent;
aEvent.Source = (::cppu::OWeakObject*)this;
@@ -954,7 +929,7 @@ void VCLXWindow::SetSynthesizingVCLEvent( sal_Bool _b )
mpImpl->mbSynthesizingVCLEvent = _b;
}
-BOOL VCLXWindow::IsSynthesizingVCLEvent() const
+sal_Bool VCLXWindow::IsSynthesizingVCLEvent() const
{
return mpImpl->mbSynthesizingVCLEvent;
}
@@ -1095,7 +1070,7 @@ void VCLXWindow::setEnable( sal_Bool bEnable ) throw(::com::sun::star::uno::Runt
Window* pWindow = GetWindow();
if ( pWindow )
{
- pWindow->Enable( bEnable, FALSE ); // #95824# without children!
+ pWindow->Enable( bEnable, sal_False ); // #95824# without children!
pWindow->EnableInput( bEnable );
}
}
@@ -1120,7 +1095,7 @@ void VCLXWindow::addWindowListener( const ::com::sun::star::uno::Reference< ::co
// #100119# Get all resize events, even if height or width 0, or invisible
if ( GetWindow() )
- GetWindow()->EnableAllResize( TRUE );
+ GetWindow()->EnableAllResize( sal_True );
}
void VCLXWindow::removeWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener >& rxListener ) throw(::com::sun::star::uno::RuntimeException)
@@ -1353,7 +1328,7 @@ namespace toolkit
(aStyleSettings.*pSetter)( Color( nColor ) );
aSettings.SetStyleSettings( aStyleSettings );
- _pWindow->SetSettings( aSettings, TRUE );
+ _pWindow->SetSettings( aSettings, sal_True );
}
}
@@ -1429,11 +1404,11 @@ namespace
{
void lcl_updateWritingMode( Window& _rWindow, const sal_Int16 _nWritingMode, const sal_Int16 _nContextWritingMode )
{
- BOOL bEnableRTL = FALSE;
+ sal_Bool bEnableRTL = sal_False;
switch ( _nWritingMode )
{
- case WritingMode2::LR_TB: bEnableRTL = FALSE; break;
- case WritingMode2::RL_TB: bEnableRTL = TRUE; break;
+ case WritingMode2::LR_TB: bEnableRTL = sal_False; break;
+ case WritingMode2::RL_TB: bEnableRTL = sal_True; break;
case WritingMode2::CONTEXT:
{
// consult our ContextWritingMode. If it has an explicit RTL/LTR value, then use
@@ -1441,8 +1416,8 @@ namespace
// own window for its RTL mode
switch ( _nContextWritingMode )
{
- case WritingMode2::LR_TB: bEnableRTL = FALSE; break;
- case WritingMode2::RL_TB: bEnableRTL = TRUE; break;
+ case WritingMode2::LR_TB: bEnableRTL = sal_False; break;
+ case WritingMode2::RL_TB: bEnableRTL = sal_True; break;
case WritingMode2::CONTEXT:
{
const Window* pParent = _rWindow.GetParent();
@@ -1513,7 +1488,7 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com::
AllSettings aSettings = pWindow->GetSettings();
MouseSettings aMouseSettings = aSettings.GetMouseSettings();
- USHORT nVclBehavior( MOUSE_WHEEL_FOCUS_ONLY );
+ sal_uInt16 nVclBehavior( MOUSE_WHEEL_FOCUS_ONLY );
switch ( nWheelBehavior )
{
case MouseWheelBehavior::SCROLL_DISABLED: nVclBehavior = MOUSE_WHEEL_DISABLE; break;
@@ -1525,7 +1500,7 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com::
aMouseSettings.SetWheelBehavior( nWheelBehavior );
aSettings.SetMouseSettings( aMouseSettings );
- pWindow->SetSettings( aSettings, TRUE );
+ pWindow->SetSettings( aSettings, sal_True );
}
break;
@@ -1680,7 +1655,7 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com::
// support transparency only for special controls
pWindow->SetBackground();
pWindow->SetControlBackground();
- pWindow->SetPaintTransparent( TRUE );
+ pWindow->SetPaintTransparent( sal_True );
break;
}
@@ -1713,7 +1688,7 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com::
case WINDOW_RADIOBUTTON:
case WINDOW_GROUPBOX:
case WINDOW_FIXEDLINE:
- pWindow->SetPaintTransparent( FALSE );
+ pWindow->SetPaintTransparent( sal_False );
default: ;
}
pWindow->Invalidate(); // Falls das Control nicht drauf reagiert
@@ -1945,7 +1920,7 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com::
case BASEPROPERTY_REPEAT:
{
- sal_Bool bRepeat( FALSE );
+ sal_Bool bRepeat( sal_False );
Value >>= bRepeat;
WinBits nStyle = pWindow->GetStyle();
@@ -1968,7 +1943,7 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com::
aMouseSettings.SetButtonRepeat( nRepeatDelay );
aSettings.SetMouseSettings( aMouseSettings );
- pWindow->SetSettings( aSettings, TRUE );
+ pWindow->SetSettings( aSettings, sal_True );
}
}
break;
@@ -2023,7 +1998,7 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com::
case BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR:
{
- USHORT nVclBehavior = GetWindow()->GetSettings().GetMouseSettings().GetWheelBehavior();
+ sal_uInt16 nVclBehavior = GetWindow()->GetSettings().GetMouseSettings().GetWheelBehavior();
sal_Int16 nBehavior = MouseWheelBehavior::SCROLL_FOCUS_ONLY;
switch ( nVclBehavior )
{
@@ -2347,9 +2322,9 @@ void VCLXWindow::draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::star::uno:
// #i40647# / 2005-01-18 / frank.schoenheit@sun.com
if ( !mpImpl->getDrawingOntoParent_ref() )
{
- FlagGuard aDrawingflagGuard( mpImpl->getDrawingOntoParent_ref() );
+ ::comphelper::FlagGuard aDrawingflagGuard( mpImpl->getDrawingOntoParent_ref() );
- BOOL bWasVisible = pWindow->IsVisible();
+ sal_Bool bWasVisible = pWindow->IsVisible();
Point aOldPos( pWindow->GetPosPixel() );
if ( bWasVisible && aOldPos == aPos )
@@ -2374,7 +2349,7 @@ void VCLXWindow::draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::star::uno:
pWindow->SetPosPixel( aOldPos );
if ( bWasVisible )
- pWindow->Show( TRUE );
+ pWindow->Show( sal_True );
}
}
else if ( pDev )
@@ -2393,12 +2368,12 @@ void VCLXWindow::draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::star::uno:
}
else
{
- BOOL bOldNW =pWindow->IsNativeWidgetEnabled();
+ sal_Bool bOldNW =pWindow->IsNativeWidgetEnabled();
if( bOldNW )
- pWindow->EnableNativeWidget(FALSE);
+ pWindow->EnableNativeWidget(sal_False);
pWindow->PaintToDevice( pDev, aP, aSz );
if( bOldNW )
- pWindow->EnableNativeWidget(TRUE);
+ pWindow->EnableNativeWidget(sal_True);
}
}
}
@@ -2494,7 +2469,7 @@ sal_Bool SAL_CALL VCLXWindow::isFloating( ) throw (::com::sun::star::uno::Runti
if( pWindow )
return Window::GetDockingManager()->IsFloating( pWindow );
else
- return FALSE;
+ return sal_False;
}
void SAL_CALL VCLXWindow::setFloatingMode( sal_Bool bFloating ) throw (::com::sun::star::uno::RuntimeException)
@@ -2514,7 +2489,7 @@ sal_Bool SAL_CALL VCLXWindow::isLocked( ) throw (::com::sun::star::uno::Runtime
if( pWindow )
return Window::GetDockingManager()->IsLocked( pWindow );
else
- return FALSE;
+ return sal_False;
}
void SAL_CALL VCLXWindow::lock( ) throw (::com::sun::star::uno::RuntimeException)
@@ -2545,7 +2520,7 @@ sal_Bool SAL_CALL VCLXWindow::isInPopupMode( ) throw (::com::sun::star::uno::Ru
{
// TODO: remove interface in the next incompatible build
::vos::OGuard aGuard( GetMutex() );
- return FALSE;
+ return sal_False;
}
@@ -2587,7 +2562,7 @@ sal_Bool SAL_CALL VCLXWindow::isVisible( ) throw (::com::sun::star::uno::Runtim
if( GetWindow() )
return GetWindow()->IsVisible();
else
- return FALSE;
+ return sal_False;
}
sal_Bool SAL_CALL VCLXWindow::isActive( ) throw (::com::sun::star::uno::RuntimeException)
@@ -2596,7 +2571,7 @@ sal_Bool SAL_CALL VCLXWindow::isActive( ) throw (::com::sun::star::uno::Runtime
if( GetWindow() )
return GetWindow()->IsActive();
else
- return FALSE;
+ return sal_False;
}
@@ -2606,7 +2581,7 @@ sal_Bool SAL_CALL VCLXWindow::isEnabled( ) throw (::com::sun::star::uno::Runtim
if( GetWindow() )
return GetWindow()->IsEnabled();
else
- return FALSE;
+ return sal_False;
}
sal_Bool SAL_CALL VCLXWindow::hasFocus( ) throw (::com::sun::star::uno::RuntimeException)
@@ -2615,7 +2590,7 @@ sal_Bool SAL_CALL VCLXWindow::hasFocus( ) throw (::com::sun::star::uno::Runtime
if( GetWindow() )
return GetWindow()->HasFocus();
else
- return FALSE;
+ return sal_False;
}
// ::com::sun::star::beans::XPropertySetInfo
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index 6c6b9dc4b2c8..2b3bc2b2c01b 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -37,6 +37,7 @@
#include <toolkit/helper/imagealign.hxx>
#include <toolkit/helper/accessibilityclient.hxx>
#include <toolkit/helper/fixedhyperbase.hxx>
+#include <toolkit/helper/tkresmgr.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <com/sun/star/awt/VisualEffect.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -62,6 +63,7 @@
#include <vcl/scrbar.hxx>
#include <vcl/svapp.hxx>
#include <vcl/tabpage.hxx>
+#include <vcl/tabctrl.hxx>
#include <tools/diagnose_ex.h>
#include <boost/bind.hpp>
@@ -135,24 +137,24 @@ namespace toolkit
sal_Int32 nWhiteLuminance = Color( COL_WHITE ).GetLuminance();
Color aLightShadow( nBackgroundColor );
- aLightShadow.IncreaseLuminance( (UINT8)( ( nWhiteLuminance - nBackgroundLuminance ) * 2 / 3 ) );
+ aLightShadow.IncreaseLuminance( (sal_uInt8)( ( nWhiteLuminance - nBackgroundLuminance ) * 2 / 3 ) );
aStyleSettings.SetLightBorderColor( aLightShadow );
Color aLight( nBackgroundColor );
- aLight.IncreaseLuminance( (UINT8)( ( nWhiteLuminance - nBackgroundLuminance ) * 1 / 3 ) );
+ aLight.IncreaseLuminance( (sal_uInt8)( ( nWhiteLuminance - nBackgroundLuminance ) * 1 / 3 ) );
aStyleSettings.SetLightColor( aLight );
Color aShadow( nBackgroundColor );
- aShadow.DecreaseLuminance( (UINT8)( nBackgroundLuminance * 1 / 3 ) );
+ aShadow.DecreaseLuminance( (sal_uInt8)( nBackgroundLuminance * 1 / 3 ) );
aStyleSettings.SetShadowColor( aShadow );
Color aDarkShadow( nBackgroundColor );
- aDarkShadow.DecreaseLuminance( (UINT8)( nBackgroundLuminance * 2 / 3 ) );
+ aDarkShadow.DecreaseLuminance( (sal_uInt8)( nBackgroundLuminance * 2 / 3 ) );
aStyleSettings.SetDarkShadowColor( aDarkShadow );
}
aSettings.SetStyleSettings( aStyleSettings );
- _pWindow->SetSettings( aSettings, TRUE );
+ _pWindow->SetSettings( aSettings, sal_True );
}
Any getButtonLikeFaceColor( const Window* _pWindow )
@@ -219,7 +221,7 @@ void VCLXGraphicControl::ImplSetNewImage()
{
OSL_PRECOND( GetWindow(), "VCLXGraphicControl::ImplSetNewImage: window is required to be not-NULL!" );
Button* pButton = static_cast< Button* >( GetWindow() );
- pButton->SetModeBitmap( GetBitmap() );
+ pButton->SetModeImage( GetImage() );
}
void VCLXGraphicControl::setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height, short Flags ) throw(::com::sun::star::uno::RuntimeException)
@@ -660,14 +662,14 @@ void VCLXImageControl::ImplSetNewImage()
{
OSL_PRECOND( GetWindow(), "VCLXImageControl::ImplSetNewImage: window is required to be not-NULL!" );
ImageControl* pControl = static_cast< ImageControl* >( GetWindow() );
- pControl->SetBitmap( GetBitmap() );
+ pControl->SetImage( GetImage() );
}
::com::sun::star::awt::Size VCLXImageControl::getMinimumSize( ) throw(::com::sun::star::uno::RuntimeException)
{
::vos::OGuard aGuard( GetMutex() );
- Size aSz = GetBitmap().GetSizePixel();
+ Size aSz = GetImage().GetSizePixel();
aSz = ImplCalcWindowSize( aSz );
return AWTSize(aSz);
@@ -1141,7 +1143,7 @@ void VCLXRadioButton::setProperty( const ::rtl::OUString& PropertyName, const ::
sal_Int16 n = sal_Int16();
if ( Value >>= n )
{
- BOOL b = n ? sal_True : sal_False;
+ sal_Bool b = n ? sal_True : sal_False;
if ( pButton->IsRadioCheckEnabled() )
pButton->Check( b );
else
@@ -1310,11 +1312,11 @@ void VCLXRadioButton::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent
aEvent.ActionCommand = maActionCommand;
maActionListeners.actionPerformed( aEvent );
}
- ImplClickedOrToggled( FALSE );
+ ImplClickedOrToggled( sal_False );
break;
case VCLEVENT_RADIOBUTTON_TOGGLE:
- ImplClickedOrToggled( TRUE );
+ ImplClickedOrToggled( sal_True );
break;
default:
@@ -1323,7 +1325,7 @@ void VCLXRadioButton::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent
}
}
-void VCLXRadioButton::ImplClickedOrToggled( BOOL bToggled )
+void VCLXRadioButton::ImplClickedOrToggled( sal_Bool bToggled )
{
// In the formulars, RadioChecked is not enabled, call itemStateChanged only for click
// In the dialog editor, RadioChecked is enabled, call itemStateChanged only for bToggled
@@ -1716,14 +1718,14 @@ void VCLXListBox::selectItemsPos( const ::com::sun::star::uno::Sequence<sal_Int1
ListBox* pBox = (ListBox*) GetWindow();
if ( pBox )
{
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
for ( sal_uInt16 n = (sal_uInt16)aPositions.getLength(); n; )
{
- USHORT nPos = (USHORT) aPositions.getConstArray()[--n];
+ sal_uInt16 nPos = (sal_uInt16) aPositions.getConstArray()[--n];
if ( pBox->IsEntryPosSelected( nPos ) != bSelect )
{
pBox->SelectEntryPos( nPos, bSelect );
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
@@ -2068,34 +2070,32 @@ void VCLXListBox::ImplCallItemListeners()
maItemListeners.itemStateChanged( aEvent );
}
}
-
namespace
{
- Image lcl_getImageFromURL( const ::rtl::OUString& i_rImageURL )
- {
- if ( !i_rImageURL.getLength() )
- return Image();
+ Image lcl_getImageFromURL( const ::rtl::OUString& i_rImageURL )
+ {
+ if ( !i_rImageURL.getLength() )
+ return Image();
try
{
- ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
- Reference< XGraphicProvider > xProvider;
- if ( aContext.createComponent( "com.sun.star.graphic.GraphicProvider", xProvider ) )
- {
- ::comphelper::NamedValueCollection aMediaProperties;
- aMediaProperties.put( "URL", i_rImageURL );
- Reference< XGraphic > xGraphic = xProvider->queryGraphic( aMediaProperties.getPropertyValues() );
+ ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
+ Reference< XGraphicProvider > xProvider;
+ if ( aContext.createComponent( "com.sun.star.graphic.GraphicProvider", xProvider ) )
+ {
+ ::comphelper::NamedValueCollection aMediaProperties;
+ aMediaProperties.put( "URL", i_rImageURL );
+ Reference< XGraphic > xGraphic = xProvider->queryGraphic( aMediaProperties.getPropertyValues() );
return Image( xGraphic );
- }
- }
- catch( const uno::Exception& )
- {
- DBG_UNHANDLED_EXCEPTION();
- }
- return Image();
- }
+ }
+ }
+ catch( const uno::Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return Image();
+ }
}
-
void SAL_CALL VCLXListBox::listItemInserted( const ItemListEvent& i_rEvent ) throw (RuntimeException)
{
::vos::OGuard aGuard( GetMutex() );
@@ -2107,7 +2107,7 @@ void SAL_CALL VCLXListBox::listItemInserted( const ItemListEvent& i_rEvent ) thr
"VCLXListBox::listItemInserted: illegal (inconsistent) item position!" );
pListBox->InsertEntry(
i_rEvent.ItemText.IsPresent ? i_rEvent.ItemText.Value : ::rtl::OUString(),
- i_rEvent.ItemImageURL.IsPresent ? lcl_getImageFromURL( i_rEvent.ItemImageURL.Value ) : Image(),
+ i_rEvent.ItemImageURL.IsPresent ? TkResMgr::getImageFromURL( i_rEvent.ItemImageURL.Value ) : Image(),
i_rEvent.ItemPosition );
}
@@ -2137,7 +2137,7 @@ void SAL_CALL VCLXListBox::listItemModified( const ItemListEvent& i_rEvent ) thr
// VCL's ListBox does not support changing an entry's text or image, so remove and re-insert
const ::rtl::OUString sNewText = i_rEvent.ItemText.IsPresent ? i_rEvent.ItemText.Value : ::rtl::OUString( pListBox->GetEntry( i_rEvent.ItemPosition ) );
- const Image aNewImage( i_rEvent.ItemImageURL.IsPresent ? lcl_getImageFromURL( i_rEvent.ItemImageURL.Value ) : pListBox->GetEntryImage( i_rEvent.ItemPosition ) );
+ const Image aNewImage( i_rEvent.ItemImageURL.IsPresent ? TkResMgr::getImageFromURL( i_rEvent.ItemImageURL.Value ) : pListBox->GetEntryImage( i_rEvent.ItemPosition ) );
pListBox->RemoveEntry( i_rEvent.ItemPosition );
pListBox->InsertEntry( sNewText, aNewImage, i_rEvent.ItemPosition );
@@ -2554,6 +2554,15 @@ throw(::com::sun::star::uno::RuntimeException)
}
}
break;
+ case BASEPROPERTY_TITLE:
+ {
+ ::rtl::OUString sTitle;
+ if ( Value >>= sTitle )
+ {
+ pTabPage->SetText(sTitle);
+ }
+ }
+ break;
default:
{
@@ -3251,7 +3260,7 @@ void VCLXScrollBar::setProperty( const ::rtl::OUString& PropertyName, const ::co
}
AllSettings aSettings( pScrollBar->GetSettings() );
StyleSettings aStyle( aSettings.GetStyleSettings() );
- ULONG nDragOptions = aStyle.GetDragFullOptions();
+ sal_uLong nDragOptions = aStyle.GetDragFullOptions();
if ( bDo )
nDragOptions |= DRAGFULL_OPTION_SCROLL;
else
diff --git a/toolkit/source/awt/xsimpleanimation.cxx b/toolkit/source/awt/xsimpleanimation.cxx
index c7ccbde118f4..75701cb94b46 100644
--- a/toolkit/source/awt/xsimpleanimation.cxx
+++ b/toolkit/source/awt/xsimpleanimation.cxx
@@ -29,8 +29,8 @@
#include "precompiled_toolkit.hxx"
#include "toolkit/awt/xsimpleanimation.hxx"
#include "toolkit/helper/property.hxx"
-#include "toolkit/helper/throbberimpl.hxx"
#include <tools/debug.hxx>
+#include <vcl/throbber.hxx>
//........................................................................
namespace toolkit
@@ -48,54 +48,40 @@ namespace toolkit
XSimpleAnimation::XSimpleAnimation()
{
DBG_CTOR( XSimpleAnimation, NULL );
- mbRepeat = sal_True;
- mnStepTime = 100;
- mpThrobber = new Throbber_Impl( this, mnStepTime, mbRepeat );
}
//--------------------------------------------------------------------
XSimpleAnimation::~XSimpleAnimation()
{
DBG_DTOR( XSimpleAnimation, NULL );
- delete mpThrobber;
}
//--------------------------------------------------------------------
- IMPLEMENT_FORWARD_XINTERFACE2( XSimpleAnimation, VCLXWindow, XSimpleAnimation_Base )
-
- //--------------------------------------------------------------------
- IMPLEMENT_FORWARD_XTYPEPROVIDER2( XSimpleAnimation, VCLXWindow, XSimpleAnimation_Base )
-
- //--------------------------------------------------------------------
void SAL_CALL XSimpleAnimation::start() throw ( uno::RuntimeException )
{
- mpThrobber->start();
+ ::vos::OGuard aGuard( GetMutex() );
+ Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
+ if ( pThrobber != NULL)
+ pThrobber->start();
}
//--------------------------------------------------------------------
void SAL_CALL XSimpleAnimation::stop() throw ( uno::RuntimeException )
{
- mpThrobber->stop();
+ ::vos::OGuard aGuard( GetMutex() );
+ Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
+ if ( pThrobber != NULL)
+ pThrobber->stop();
}
//--------------------------------------------------------------------
void SAL_CALL XSimpleAnimation::setImageList( const uno::Sequence< uno::Reference< graphic::XGraphic > >& rImageList )
throw ( uno::RuntimeException )
{
- mpThrobber->setImageList( rImageList );
- }
-
- //--------------------------------------------------------------------
- void XSimpleAnimation::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent )
- {
- // TODO: XSimpleAnimation::ProcessWindowEvent
- //::vos::OClearableGuard aGuard( GetMutex() );
- //Reference< XSimpleAnimation > xKeepAlive( this );
- //SpinButton* pSpinButton = static_cast< SpinButton* >( GetWindow() );
- //if ( !pSpinButton )
- // return;
-
- VCLXWindow::ProcessWindowEvent( _rVclWindowEvent );
+ ::vos::OGuard aGuard( GetMutex() );
+ Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
+ if ( pThrobber != NULL)
+ pThrobber->setImageList( rImageList );
}
//--------------------------------------------------------------------
@@ -104,33 +90,31 @@ namespace toolkit
{
::vos::OGuard aGuard( GetMutex() );
- if ( GetWindow() )
+ Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
+ if ( pThrobber == NULL )
{
- sal_uInt16 nPropertyId = GetPropertyId( PropertyName );
- switch ( nPropertyId )
- {
- case BASEPROPERTY_STEP_TIME: {
- sal_Int32 nStepTime( 0 );
- if ( Value >>= nStepTime )
- {
- mnStepTime = nStepTime;
- mpThrobber->setStepTime( mnStepTime );
- }
-
- break;
- }
- case BASEPROPERTY_REPEAT: {
- sal_Bool bRepeat( sal_True );
- if ( Value >>= bRepeat )
- {
- mbRepeat = bRepeat;
- mpThrobber->setRepeat( mbRepeat );
- }
- break;
- }
- default:
- VCLXWindow::setProperty( PropertyName, Value );
+ VCLXWindow::setProperty( PropertyName, Value );
+ return;
+ }
+
+ sal_uInt16 nPropertyId = GetPropertyId( PropertyName );
+ switch ( nPropertyId )
+ {
+ case BASEPROPERTY_STEP_TIME: {
+ sal_Int32 nStepTime( 0 );
+ if ( Value >>= nStepTime )
+ pThrobber->setStepTime( nStepTime );
+
+ break;
}
+ case BASEPROPERTY_REPEAT: {
+ sal_Bool bRepeat( sal_True );
+ if ( Value >>= bRepeat )
+ pThrobber->setRepeat( bRepeat );
+ break;
+ }
+ default:
+ VCLXWindow::setProperty( PropertyName, Value );
}
}
@@ -140,22 +124,22 @@ namespace toolkit
{
::vos::OGuard aGuard( GetMutex() );
- uno::Any aReturn;
+ Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
+ if ( pThrobber == NULL )
+ return VCLXWindow::getProperty( PropertyName );
- if ( GetWindow() )
+ uno::Any aReturn;
+ sal_uInt16 nPropertyId = GetPropertyId( PropertyName );
+ switch ( nPropertyId )
{
- sal_uInt16 nPropertyId = GetPropertyId( PropertyName );
- switch ( nPropertyId )
- {
- case BASEPROPERTY_STEP_TIME:
- aReturn <<= mnStepTime;
- break;
- case BASEPROPERTY_REPEAT:
- aReturn <<= mbRepeat;
- break;
- default:
- aReturn = VCLXWindow::getProperty( PropertyName );
- }
+ case BASEPROPERTY_STEP_TIME:
+ aReturn <<= pThrobber->getStepTime();
+ break;
+ case BASEPROPERTY_REPEAT:
+ aReturn <<= pThrobber->getRepeat();
+ break;
+ default:
+ aReturn = VCLXWindow::getProperty( PropertyName );
}
return aReturn;
}
diff --git a/toolkit/source/awt/xthrobber.cxx b/toolkit/source/awt/xthrobber.cxx
index 439fb49c1cbe..3b9b361202e9 100644
--- a/toolkit/source/awt/xthrobber.cxx
+++ b/toolkit/source/awt/xthrobber.cxx
@@ -30,7 +30,6 @@
#include "toolkit/awt/xthrobber.hxx"
#include "toolkit/helper/property.hxx"
#include <toolkit/helper/tkresmgr.hxx>
-#include <toolkit/helper/throbberimpl.hxx>
#ifndef _TOOLKIT_AWT_XTHROBBER_HRC_
#include "xthrobber.hrc"
@@ -38,6 +37,7 @@
#include <tools/debug.hxx>
#include <vcl/fixed.hxx>
#include <vcl/timer.hxx>
+#include <vcl/throbber.hxx>
//........................................................................
namespace toolkit
@@ -55,82 +55,37 @@ namespace toolkit
XThrobber::XThrobber()
{
DBG_CTOR( XThrobber, NULL );
-
- mpThrobber = new Throbber_Impl( this, 100, sal_True );
-
- InitImageList();
}
//--------------------------------------------------------------------
XThrobber::~XThrobber()
{
DBG_DTOR( XThrobber, NULL );
- delete mpThrobber;
}
//--------------------------------------------------------------------
- IMPLEMENT_FORWARD_XINTERFACE2( XThrobber, VCLXWindow, XThrobber_Base )
-
- //--------------------------------------------------------------------
- IMPLEMENT_FORWARD_XTYPEPROVIDER2( XThrobber, VCLXWindow, XThrobber_Base )
-
- //--------------------------------------------------------------------
void SAL_CALL XThrobber::start() throw ( uno::RuntimeException )
{
- mpThrobber->start();
+ ::vos::OGuard aGuard( GetMutex() );
+ Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
+ if ( pThrobber != NULL)
+ pThrobber->start();
}
//--------------------------------------------------------------------
void SAL_CALL XThrobber::stop() throw ( uno::RuntimeException )
{
- mpThrobber->stop();
- }
-
- //--------------------------------------------------------------------
- void XThrobber::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent )
- {
- static bool bInit = false;
- if ( !bInit )
- {
- // Images won't be shown if set too early
- mpThrobber->initImage();
- bInit = true;
- }
- // TODO: XSimpleAnimation::ProcessWindowEvent
- //::vos::OClearableGuard aGuard( GetMutex() );
- //Reference< XSimpleAnimation > xKeepAlive( this );
- //SpinButton* pSpinButton = static_cast< SpinButton* >( GetWindow() );
- //if ( !pSpinButton )
- // return;
-
- VCLXWindow::ProcessWindowEvent( _rVclWindowEvent );
- }
-
- //--------------------------------------------------------------------
- void SAL_CALL XThrobber::setProperty( const ::rtl::OUString& PropertyName, const uno::Any& Value )
- throw( uno::RuntimeException )
- {
::vos::OGuard aGuard( GetMutex() );
-
- if ( GetWindow() )
- {
- VCLXWindow::setProperty( PropertyName, Value );
- }
+ Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
+ if ( pThrobber != NULL)
+ pThrobber->stop();
}
//--------------------------------------------------------------------
- uno::Any SAL_CALL XThrobber::getProperty( const ::rtl::OUString& PropertyName )
- throw( uno::RuntimeException )
+ void XThrobber::SetWindow( Window* pWindow )
{
- ::vos::OGuard aGuard( GetMutex() );
-
- uno::Any aReturn;
-
- if ( GetWindow() )
- {
- aReturn = VCLXWindow::getProperty( PropertyName );
- }
- return aReturn;
+ XThrobber_Base::SetWindow( pWindow );
+ InitImageList();
}
//--------------------------------------------------------------------
@@ -138,10 +93,15 @@ namespace toolkit
throw( uno::RuntimeException )
{
::vos::OGuard aGuard( GetMutex() );
+
+ Throbber* pThrobber( dynamic_cast< Throbber* >( GetWindow() ) );
+ if ( pThrobber == NULL)
+ return;
+
uno::Sequence< uno::Reference< graphic::XGraphic > > aImageList(12);
sal_uInt16 nIconIdStart = RID_TK_ICON_THROBBER_START;
- if ( mpThrobber->isHCMode() )
+ if ( pThrobber->GetSettings().GetStyleSettings().GetHighContrastMode() )
nIconIdStart = RID_TK_HC_ICON_THROBBER_START;
for ( sal_uInt16 i=0; i<12; i++ )
@@ -150,7 +110,7 @@ namespace toolkit
aImageList[i] = aImage.GetXGraphic();
}
- mpThrobber->setImageList( aImageList );
+ pThrobber->setImageList( aImageList );
}
//........................................................................
diff --git a/toolkit/source/controls/animatedimages.cxx b/toolkit/source/controls/animatedimages.cxx
new file mode 100755
index 000000000000..c2fd91f1ea46
--- /dev/null
+++ b/toolkit/source/controls/animatedimages.cxx
@@ -0,0 +1,493 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_toolkit.hxx"
+
+#include "toolkit/controls/animatedimages.hxx"
+#include "toolkit/helper/servicenames.hxx"
+#include "toolkit/helper/property.hxx"
+#include "toolkit/helper/unopropertyarrayhelper.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/lang/DisposedException.hpp>
+#include <com/sun/star/awt/VisualEffect.hpp>
+#include <com/sun/star/awt/ImageScaleMode.hpp>
+#include <com/sun/star/util/XModifyListener.hpp>
+/** === end UNO includes === **/
+
+//......................................................................................................................
+namespace toolkit
+{
+//......................................................................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::container::ContainerEvent;
+ using ::com::sun::star::container::XContainerListener;
+ using ::com::sun::star::beans::XPropertySetInfo;
+ using ::com::sun::star::lang::DisposedException;
+ using ::com::sun::star::lang::IndexOutOfBoundsException;
+ using ::com::sun::star::lang::EventObject;
+ using ::com::sun::star::awt::XControlModel;
+ using ::com::sun::star::awt::XAnimatedImages;
+ using ::com::sun::star::lang::IllegalArgumentException;
+ using ::com::sun::star::awt::XWindowPeer;
+ using ::com::sun::star::util::XModifyListener;
+ using ::com::sun::star::awt::XToolkit;
+ using ::com::sun::star::lang::XMultiServiceFactory;
+ /** === end UNO using === **/
+ namespace VisualEffect = ::com::sun::star::awt::VisualEffect;
+ namespace ImageScaleMode = ::com::sun::star::awt::ImageScaleMode;
+
+ //==================================================================================================================
+ //= AnimatedImagesControl
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ AnimatedImagesControl::AnimatedImagesControl( Reference< XMultiServiceFactory > const & i_factory )
+ :AnimatedImagesControl_Base( i_factory )
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString AnimatedImagesControl::GetComponentServiceName()
+ {
+ return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "AnimatedImages" ) );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesControl::startAnimation( ) throw (RuntimeException)
+ {
+ Reference< XAnimation > xAnimation( getPeer(), UNO_QUERY );
+ if ( xAnimation.is() )
+ xAnimation->startAnimation();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesControl::stopAnimation( ) throw (RuntimeException)
+ {
+ Reference< XAnimation > xAnimation( getPeer(), UNO_QUERY );
+ if ( xAnimation.is() )
+ xAnimation->stopAnimation();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Bool SAL_CALL AnimatedImagesControl::isAnimationRunning( ) throw (RuntimeException)
+ {
+ Reference< XAnimation > xAnimation( getPeer(), UNO_QUERY );
+ if ( xAnimation.is() )
+ return xAnimation->isAnimationRunning();
+ return sal_False;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString SAL_CALL AnimatedImagesControl::getImplementationName( ) throw(RuntimeException)
+ {
+ return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.comp.toolkit.AnimatedImagesControl" ) );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Sequence< ::rtl::OUString > SAL_CALL AnimatedImagesControl::getSupportedServiceNames() throw(RuntimeException)
+ {
+ Sequence< ::rtl::OUString > aServices( AnimatedImagesControl_Base::getSupportedServiceNames() );
+ aServices.realloc( aServices.getLength() + 1 );
+ aServices[ aServices.getLength() - 1 ] = ::rtl::OUString::createFromAscii( szServiceName_AnimatedImagesControl );
+ return aServices;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ namespace
+ {
+ void lcl_updatePeer( Reference< XWindowPeer > const& i_peer, Reference< XControlModel > const& i_model )
+ {
+ const Reference< XModifyListener > xPeerModify( i_peer, UNO_QUERY );
+ if ( xPeerModify.is() )
+ {
+ EventObject aEvent;
+ aEvent.Source = i_model;
+ xPeerModify->modified( aEvent );
+ }
+ }
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ sal_Bool SAL_CALL AnimatedImagesControl::setModel( const Reference< XControlModel >& i_rModel ) throw ( RuntimeException )
+ {
+ const Reference< XAnimatedImages > xOldContainer( getModel(), UNO_QUERY );
+ const Reference< XAnimatedImages > xNewContainer( i_rModel, UNO_QUERY );
+
+ if ( !AnimatedImagesControl_Base::setModel( i_rModel ) )
+ return sal_False;
+
+ if ( xOldContainer.is() )
+ xOldContainer->removeContainerListener( this );
+
+ if ( xNewContainer.is() )
+ xNewContainer->addContainerListener( this );
+
+ lcl_updatePeer( getPeer(), getModel() );
+
+ return sal_True;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesControl::createPeer( const Reference< XToolkit >& i_toolkit, const Reference< XWindowPeer >& i_parentPeer ) throw(RuntimeException)
+ {
+ AnimatedImagesControl_Base::createPeer( i_toolkit, i_parentPeer );
+
+ lcl_updatePeer( getPeer(), getModel() );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesControl::elementInserted( const ContainerEvent& i_event ) throw (RuntimeException)
+ {
+ const Reference< XContainerListener > xPeerListener( getPeer(), UNO_QUERY );
+ if ( xPeerListener.is() )
+ xPeerListener->elementInserted( i_event );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesControl::elementRemoved( const ContainerEvent& i_event ) throw (RuntimeException)
+ {
+ const Reference< XContainerListener > xPeerListener( getPeer(), UNO_QUERY );
+ if ( xPeerListener.is() )
+ xPeerListener->elementRemoved( i_event );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesControl::elementReplaced( const ContainerEvent& i_event ) throw (RuntimeException)
+ {
+ const Reference< XContainerListener > xPeerListener( getPeer(), UNO_QUERY );
+ if ( xPeerListener.is() )
+ xPeerListener->elementReplaced( i_event );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesControl::disposing( const EventObject& i_event ) throw (RuntimeException)
+ {
+ UnoControlBase::disposing( i_event );
+ }
+
+ //==================================================================================================================
+ //= AnimatedImagesControlModel_Data
+ //==================================================================================================================
+ struct AnimatedImagesControlModel_Data
+ {
+ ::std::vector< Sequence< ::rtl::OUString > > aImageSets;
+ };
+
+ namespace
+ {
+ void lcl_checkIndex( const AnimatedImagesControlModel_Data& i_data, const sal_Int32 i_index, const Reference< XInterface >& i_context,
+ const bool i_forInsert = false )
+ {
+ if ( ( i_index < 0 ) || ( size_t( i_index ) > i_data.aImageSets.size() + ( i_forInsert ? 1 : 0 ) ) )
+ throw IndexOutOfBoundsException( ::rtl::OUString(), i_context );
+ }
+
+ void lcl_notify( ::osl::ClearableMutexGuard& i_guard, ::cppu::OBroadcastHelper& i_broadcaseHelper,
+ void ( SAL_CALL XContainerListener::*i_notificationMethod )( const ContainerEvent& ),
+ const sal_Int32 i_accessor, const Sequence< ::rtl::OUString >& i_imageURLs, const Reference< XInterface >& i_context )
+ {
+ ::cppu::OInterfaceContainerHelper* pContainerListeners = i_broadcaseHelper.getContainer( XContainerListener::static_type() );
+ if ( pContainerListeners == NULL )
+ return;
+
+ ContainerEvent aEvent;
+ aEvent.Source = i_context;
+ aEvent.Accessor <<= i_accessor;
+ aEvent.Element <<= i_imageURLs;
+
+ i_guard.clear();
+ pContainerListeners->notifyEach( i_notificationMethod, aEvent );
+ }
+ }
+
+ //==================================================================================================================
+ //= AnimatedImagesControlModel
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ AnimatedImagesControlModel::AnimatedImagesControlModel( Reference< XMultiServiceFactory > const & i_factory )
+ :AnimatedImagesControlModel_Base( i_factory )
+ ,m_pData( new AnimatedImagesControlModel_Data )
+ {
+ ImplRegisterProperty( BASEPROPERTY_AUTO_REPEAT );
+ ImplRegisterProperty( BASEPROPERTY_BORDER );
+ ImplRegisterProperty( BASEPROPERTY_BORDERCOLOR );
+ ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR );
+ ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL );
+ ImplRegisterProperty( BASEPROPERTY_ENABLEVISIBLE );
+ ImplRegisterProperty( BASEPROPERTY_HELPTEXT );
+ ImplRegisterProperty( BASEPROPERTY_HELPURL );
+ ImplRegisterProperty( BASEPROPERTY_IMAGE_SCALE_MODE );
+ ImplRegisterProperty( BASEPROPERTY_STEP_TIME );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ AnimatedImagesControlModel::AnimatedImagesControlModel( const AnimatedImagesControlModel& i_copySource )
+ :AnimatedImagesControlModel_Base( i_copySource )
+ ,m_pData( new AnimatedImagesControlModel_Data( *i_copySource.m_pData ) )
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ AnimatedImagesControlModel::~AnimatedImagesControlModel()
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ UnoControlModel* AnimatedImagesControlModel::Clone() const
+ {
+ return new AnimatedImagesControlModel( *this );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XPropertySetInfo > SAL_CALL AnimatedImagesControlModel::getPropertySetInfo( ) throw(RuntimeException)
+ {
+ static Reference< XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
+ return xInfo;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString SAL_CALL AnimatedImagesControlModel::getServiceName() throw(RuntimeException)
+ {
+ return ::rtl::OUString::createFromAscii( szServiceName_AnimatedImagesControlModel );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString SAL_CALL AnimatedImagesControlModel::getImplementationName( ) throw(RuntimeException)
+ {
+ return ::rtl::OUString::createFromAscii( "org.openoffice.comp.toolkit.AnimatedImagesControlModel" );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Sequence< ::rtl::OUString > SAL_CALL AnimatedImagesControlModel::getSupportedServiceNames() throw(RuntimeException)
+ {
+ Sequence< ::rtl::OUString > aServiceNames(2);
+ aServiceNames[0] = ::rtl::OUString::createFromAscii( szServiceName_AnimatedImagesControlModel );
+ aServiceNames[1] = ::rtl::OUString::createFromAscii( "com.sun.star.awt.UnoControlModel" );
+ return aServiceNames;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 i_handle, const Any& i_value ) throw (Exception)
+ {
+ switch ( i_handle )
+ {
+ case BASEPROPERTY_IMAGE_SCALE_MODE:
+ {
+ sal_Int16 nImageScaleMode( ImageScaleMode::Anisotropic );
+ OSL_VERIFY( i_value >>= nImageScaleMode ); // convertFastPropertyValue ensures that this has the proper type
+ if ( ( nImageScaleMode != ImageScaleMode::None )
+ && ( nImageScaleMode != ImageScaleMode::Isotropic )
+ && ( nImageScaleMode != ImageScaleMode::Anisotropic )
+ )
+ throw IllegalArgumentException( ::rtl::OUString(), *this, 1 );
+ }
+ break;
+ }
+
+ AnimatedImagesControlModel_Base::setFastPropertyValue_NoBroadcast( i_handle, i_value );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Any AnimatedImagesControlModel::ImplGetDefaultValue( sal_uInt16 i_propertyId ) const
+ {
+ switch ( i_propertyId )
+ {
+ case BASEPROPERTY_DEFAULTCONTROL:
+ return makeAny( ::rtl::OUString::createFromAscii( szServiceName_AnimatedImagesControl ) );
+
+ case BASEPROPERTY_BORDER:
+ return makeAny( VisualEffect::NONE );
+
+ case BASEPROPERTY_STEP_TIME:
+ return makeAny( (sal_Int32) 100 );
+
+ case BASEPROPERTY_AUTO_REPEAT:
+ return makeAny( (sal_Bool)sal_True );
+
+ case BASEPROPERTY_IMAGE_SCALE_MODE:
+ return makeAny( ImageScaleMode::None );
+
+ default:
+ return UnoControlModel::ImplGetDefaultValue( i_propertyId );
+ }
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::cppu::IPropertyArrayHelper& SAL_CALL AnimatedImagesControlModel::getInfoHelper()
+ {
+ static UnoPropertyArrayHelper* pHelper = NULL;
+ if ( !pHelper )
+ {
+ Sequence< sal_Int32 > aIDs = ImplGetPropertyIds();
+ pHelper = new UnoPropertyArrayHelper( aIDs );
+ }
+ return *pHelper;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL AnimatedImagesControlModel::getStepTime() throw (RuntimeException)
+ {
+ sal_Int32 nStepTime( 100 );
+ OSL_VERIFY( getPropertyValue( GetPropertyName( BASEPROPERTY_STEP_TIME ) ) >>= nStepTime );
+ return nStepTime;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesControlModel::setStepTime( ::sal_Int32 i_stepTime ) throw (RuntimeException)
+ {
+ setPropertyValue( GetPropertyName( BASEPROPERTY_STEP_TIME ), makeAny( i_stepTime ) );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Bool SAL_CALL AnimatedImagesControlModel::getAutoRepeat() throw (RuntimeException)
+ {
+ sal_Bool bAutoRepeat( sal_True );
+ OSL_VERIFY( getPropertyValue( GetPropertyName( BASEPROPERTY_AUTO_REPEAT ) ) >>= bAutoRepeat );
+ return bAutoRepeat;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesControlModel::setAutoRepeat( ::sal_Bool i_autoRepeat ) throw (RuntimeException)
+ {
+ setPropertyValue( GetPropertyName( BASEPROPERTY_AUTO_REPEAT ), makeAny( i_autoRepeat ) );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int16 SAL_CALL AnimatedImagesControlModel::getScaleMode() throw (RuntimeException)
+ {
+ sal_Int16 nImageScaleMode( ImageScaleMode::Anisotropic );
+ OSL_VERIFY( getPropertyValue( GetPropertyName( BASEPROPERTY_IMAGE_SCALE_MODE ) ) >>= nImageScaleMode );
+ return nImageScaleMode;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesControlModel::setScaleMode( ::sal_Int16 i_scaleMode ) throw (IllegalArgumentException, RuntimeException)
+ {
+ setPropertyValue( GetPropertyName( BASEPROPERTY_IMAGE_SCALE_MODE ), makeAny( i_scaleMode ) );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL AnimatedImagesControlModel::getImageSetCount( ) throw (RuntimeException)
+ {
+ ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+ if ( GetBroadcastHelper().bDisposed || GetBroadcastHelper().bInDispose )
+ throw DisposedException();
+
+ return m_pData->aImageSets.size();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Sequence< ::rtl::OUString > SAL_CALL AnimatedImagesControlModel::getImageSet( ::sal_Int32 i_index ) throw (IndexOutOfBoundsException, RuntimeException)
+ {
+ ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+ if ( GetBroadcastHelper().bDisposed || GetBroadcastHelper().bInDispose )
+ throw DisposedException();
+
+ lcl_checkIndex( *m_pData, i_index, *this );
+
+ return m_pData->aImageSets[ i_index ];
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesControlModel::insertImageSet( ::sal_Int32 i_index, const Sequence< ::rtl::OUString >& i_imageURLs ) throw (IndexOutOfBoundsException, RuntimeException)
+ {
+ ::osl::ClearableMutexGuard aGuard( GetMutex() );
+ // sanity checks
+ if ( GetBroadcastHelper().bDisposed || GetBroadcastHelper().bInDispose )
+ throw DisposedException();
+
+ lcl_checkIndex( *m_pData, i_index, *this, true );
+
+ // actaul insertion
+ m_pData->aImageSets.insert( m_pData->aImageSets.begin() + i_index, i_imageURLs );
+
+ // listener notification
+ lcl_notify( aGuard, BrdcstHelper, &XContainerListener::elementInserted, i_index, i_imageURLs, *this );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesControlModel::replaceImageSet( ::sal_Int32 i_index, const Sequence< ::rtl::OUString >& i_imageURLs ) throw (IndexOutOfBoundsException, RuntimeException)
+ {
+ ::osl::ClearableMutexGuard aGuard( GetMutex() );
+ // sanity checks
+ if ( GetBroadcastHelper().bDisposed || GetBroadcastHelper().bInDispose )
+ throw DisposedException();
+
+ lcl_checkIndex( *m_pData, i_index, *this );
+
+ // actaul insertion
+ m_pData->aImageSets[ i_index ] = i_imageURLs;
+
+ // listener notification
+ lcl_notify( aGuard, BrdcstHelper, &XContainerListener::elementReplaced, i_index, i_imageURLs, *this );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesControlModel::removeImageSet( ::sal_Int32 i_index ) throw (IndexOutOfBoundsException, RuntimeException)
+ {
+ ::osl::ClearableMutexGuard aGuard( GetMutex() );
+ // sanity checks
+ if ( GetBroadcastHelper().bDisposed || GetBroadcastHelper().bInDispose )
+ throw DisposedException();
+
+ lcl_checkIndex( *m_pData, i_index, *this );
+
+ // actual removal
+ ::std::vector< Sequence< ::rtl::OUString > >::iterator removalPos = m_pData->aImageSets.begin() + i_index;
+ Sequence< ::rtl::OUString > aRemovedElement( *removalPos );
+ m_pData->aImageSets.erase( removalPos );
+
+ // listener notification
+ lcl_notify( aGuard, BrdcstHelper, &XContainerListener::elementRemoved, i_index, aRemovedElement, *this );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesControlModel::addContainerListener( const Reference< XContainerListener >& i_listener ) throw (RuntimeException)
+ {
+ BrdcstHelper.addListener( XContainerListener::static_type(), i_listener );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL AnimatedImagesControlModel::removeContainerListener( const Reference< XContainerListener >& i_listener ) throw (RuntimeException)
+ {
+ BrdcstHelper.removeListener( XContainerListener::static_type(), i_listener );
+ }
+
+//......................................................................................................................
+} // namespace toolkit
+//......................................................................................................................
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx
new file mode 100644
index 000000000000..f037f10bbe31
--- /dev/null
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -0,0 +1,1860 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_toolkit.hxx"
+
+#include <toolkit/controls/controlmodelcontainerbase.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/window.hxx>
+#include <vcl/wall.hxx>
+#include <vos/mutex.hxx>
+#include <toolkit/helper/property.hxx>
+#include <toolkit/helper/unopropertyarrayhelper.hxx>
+#include <toolkit/controls/geometrycontrolmodel.hxx>
+#include <toolkit/controls/unocontrols.hxx>
+#include "toolkit/controls/formattedcontrol.hxx"
+#include "toolkit/controls/roadmapcontrol.hxx"
+#ifndef TOOLKIT_INC_TOOLKIT_CONTROLS_TKSCROLLBAR_HXX
+#include "toolkit/controls/tkscrollbar.hxx"
+#endif
+#include <toolkit/controls/stdtabcontroller.hxx>
+#include <com/sun/star/awt/PosSize.hpp>
+#include <com/sun/star/awt/WindowAttribute.hpp>
+#include <com/sun/star/resource/XStringResourceResolver.hpp>
+#include <com/sun/star/graphic/XGraphicProvider.hpp>
+#include <tools/list.hxx>
+#include <cppuhelper/typeprovider.hxx>
+#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
+#include <comphelper/processfactory.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/outdev.hxx>
+#include <comphelper/types.hxx>
+
+#include <comphelper/componentcontext.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
+#include <toolkit/helper/tkresmgr.hxx>
+#include <unotools/ucbstreamhelper.hxx>
+#include <vcl/graph.hxx>
+#include <vcl/image.hxx>
+
+#include "tree/treecontrol.hxx"
+#include "grid/gridcontrol.hxx"
+#include <toolkit/controls/tabpagecontainer.hxx>
+
+#include <map>
+#include <algorithm>
+#include <functional>
+#include "tools/urlobj.hxx"
+#include "osl/file.hxx"
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::awt;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::util;
+using namespace toolkit;
+
+#define PROPERTY_RESOURCERESOLVER ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ResourceResolver" ))
+
+//HELPER
+::rtl::OUString getPhysicalLocation( const ::com::sun::star::uno::Any& rbase, const ::com::sun::star::uno::Any& rUrl );
+
+struct LanguageDependentProp
+{
+ const char* pPropName;
+ sal_Int32 nPropNameLength;
+};
+
+// ----------------------------------------------------------------------------
+namespace
+{
+ static const Sequence< ::rtl::OUString >& lcl_getLanguageDependentProperties()
+ {
+ static Sequence< ::rtl::OUString > s_aLanguageDependentProperties;
+ if ( s_aLanguageDependentProperties.getLength() == 0 )
+ {
+ ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
+ if ( s_aLanguageDependentProperties.getLength() == 0 )
+ {
+ s_aLanguageDependentProperties.realloc( 2 );
+ s_aLanguageDependentProperties[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HelpText" ) );
+ s_aLanguageDependentProperties[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) );
+ // note: properties must be sorted
+ }
+ }
+ return s_aLanguageDependentProperties;
+ }
+}
+
+// ----------------------------------------------------------------------------
+// functor for disposing a control model
+struct DisposeControlModel : public ::std::unary_function< Reference< XControlModel >, void >
+{
+ void operator()( Reference< XControlModel >& _rxModel )
+ {
+ try
+ {
+ ::comphelper::disposeComponent( _rxModel );
+ }
+ catch( const Exception& )
+ {
+ DBG_ERROR( "DisposeControlModel::(): caught an exception while disposing a component!" );
+ }
+ }
+};
+
+// ----------------------------------------------------------------------------
+// functor for searching control model by name
+struct FindControlModel : public ::std::unary_function< ControlModelContainerBase::UnoControlModelHolder, bool >
+{
+private:
+ const ::rtl::OUString& m_rName;
+
+public:
+ FindControlModel( const ::rtl::OUString& _rName ) : m_rName( _rName ) { }
+
+ bool operator()( const ControlModelContainerBase::UnoControlModelHolder& _rCompare )
+ {
+ return ( _rCompare.second == m_rName ) ? true : false;
+ }
+};
+
+// ----------------------------------------------------------------------------
+// functor for cloning a control model, and insertion into a target list
+struct CloneControlModel : public ::std::unary_function< ControlModelContainerBase::UnoControlModelHolder, void >
+{
+private:
+ ControlModelContainerBase::UnoControlModelHolderList& m_rTargetList;
+
+public:
+ CloneControlModel( ControlModelContainerBase::UnoControlModelHolderList& _rTargetList )
+ :m_rTargetList( _rTargetList )
+ {
+ }
+
+ void operator()( const ControlModelContainerBase::UnoControlModelHolder& _rSource )
+ {
+ // clone the source object
+ Reference< XCloneable > xCloneSource( _rSource.first, UNO_QUERY );
+ Reference< XControlModel > xClone( xCloneSource->createClone(), UNO_QUERY );
+ // add to target list
+ m_rTargetList.push_back( ControlModelContainerBase::UnoControlModelHolder( xClone, _rSource.second ) );
+ }
+};
+
+// ----------------------------------------------------------------------------
+// functor for comparing a XControlModel with a given reference
+struct CompareControlModel : public ::std::unary_function< ControlModelContainerBase::UnoControlModelHolder, bool >
+{
+private:
+ Reference< XControlModel > m_xReference;
+public:
+ CompareControlModel( const Reference< XControlModel >& _rxReference ) : m_xReference( _rxReference ) { }
+
+ bool operator()( const ControlModelContainerBase::UnoControlModelHolder& _rCompare )
+ {
+ return ( _rCompare.first.get() == m_xReference.get() ) ? true : false;
+ }
+};
+
+// ----------------------------------------------------------------------------
+static void lcl_throwIllegalArgumentException( )
+{ // throwing is expensive (in terms of code size), thus we hope the compiler does not inline this ....
+ throw IllegalArgumentException();
+}
+
+// ----------------------------------------------------------------------------
+static void lcl_throwNoSuchElementException( )
+{ // throwing is expensive (in terms of code size), thus we hope the compiler does not inline this ....
+ throw NoSuchElementException();
+}
+
+// ----------------------------------------------------------------------------
+static void lcl_throwElementExistException( )
+{ // throwing is expensive (in terms of code size), thus we hope the compiler does not inline this ....
+ throw ElementExistException();
+}
+
+// ----------------------------------------------------------------------------
+static const ::rtl::OUString& getTabIndexPropertyName( )
+{
+ static const ::rtl::OUString s_sTabIndexProperty( RTL_CONSTASCII_USTRINGPARAM( "TabIndex" ) );
+ return s_sTabIndexProperty;
+}
+
+// ----------------------------------------------------------------------------
+static const ::rtl::OUString& getStepPropertyName( )
+{
+ static const ::rtl::OUString s_sStepProperty( RTL_CONSTASCII_USTRINGPARAM( "Step" ) );
+ return s_sStepProperty;
+}
+
+// ----------------------------------------------------
+// class ControlModelContainerBase
+// ----------------------------------------------------
+ControlModelContainerBase::ControlModelContainerBase( const Reference< XMultiServiceFactory >& i_factory )
+ :ControlModelContainer_IBase( i_factory )
+ ,maContainerListeners( *this )
+ ,maChangeListeners ( GetMutex() )
+ ,mbGroupsUpToDate( sal_False )
+{
+}
+
+ControlModelContainerBase::ControlModelContainerBase( const ControlModelContainerBase& rModel )
+ : ControlModelContainer_IBase( rModel )
+ , maContainerListeners( *this )
+ , maChangeListeners ( GetMutex() )
+ , mbGroupsUpToDate( sal_False )
+{
+}
+
+ControlModelContainerBase::~ControlModelContainerBase()
+{
+ maModels.clear();
+ mbGroupsUpToDate = sal_False;
+}
+
+Any ControlModelContainerBase::ImplGetDefaultValue( sal_uInt16 nPropId ) const
+{
+ Any aAny;
+
+ switch ( nPropId )
+ {
+ case BASEPROPERTY_DEFAULTCONTROL:
+ aAny <<= ::rtl::OUString::createFromAscii( szServiceName_UnoControlDialog );
+ break;
+ default:
+ aAny = UnoControlModel::ImplGetDefaultValue( nPropId );
+ }
+
+ return aAny;
+}
+
+::cppu::IPropertyArrayHelper& ControlModelContainerBase::getInfoHelper()
+{
+ static UnoPropertyArrayHelper* pHelper = NULL;
+ if ( !pHelper )
+ {
+ Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
+ pHelper = new UnoPropertyArrayHelper( aIDs );
+ }
+ return *pHelper;
+}
+
+void SAL_CALL ControlModelContainerBase::dispose( ) throw(RuntimeException)
+{
+ // ====================================================================
+ // tell our listeners
+ {
+ ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+
+ EventObject aDisposeEvent;
+ aDisposeEvent.Source = static_cast< XAggregation* >( static_cast< ::cppu::OWeakAggObject* >( this ) );
+
+ maContainerListeners.disposeAndClear( aDisposeEvent );
+ maChangeListeners.disposeAndClear( aDisposeEvent );
+ }
+
+ // ====================================================================
+ // call the base class
+ UnoControlModel::dispose();
+
+ // ====================================================================
+ // dispose our child models
+ // for this, collect the models (we collect them from maModels, and this is modified when disposing children)
+ ::std::vector< Reference< XControlModel > > aChildModels( maModels.size() );
+
+ ::std::transform(
+ maModels.begin(), maModels.end(), // source range
+ aChildModels.begin(), // target location
+ ::std::select1st< UnoControlModelHolder >( ) // operation to apply -> select the XControlModel part
+ );
+
+ // now dispose
+ ::std::for_each( aChildModels.begin(), aChildModels.end(), DisposeControlModel() );
+ aChildModels.clear();
+
+ mbGroupsUpToDate = sal_False;
+}
+
+// XMultiPropertySet
+Reference< XPropertySetInfo > ControlModelContainerBase::getPropertySetInfo( ) throw(RuntimeException)
+{
+ static Reference< XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
+ return xInfo;
+}
+void ControlModelContainerBase::Clone_Impl(ControlModelContainerBase& _rClone) const
+{
+ // clone all children
+ ::std::for_each(
+ maModels.begin(), maModels.end(),
+ CloneControlModel( _rClone.maModels )
+ );
+}
+UnoControlModel* ControlModelContainerBase::Clone() const
+{
+ // clone the container itself
+ ControlModelContainerBase* pClone = new ControlModelContainerBase( *this );
+ Clone_Impl(*pClone);
+
+ return pClone;
+}
+
+ControlModelContainerBase::UnoControlModelHolderList::iterator ControlModelContainerBase::ImplFindElement( const ::rtl::OUString& rName )
+{
+ return ::std::find_if( maModels.begin(), maModels.end(), FindControlModel( rName ) );
+}
+
+// ::XMultiServiceFactory
+Reference< XInterface > ControlModelContainerBase::createInstance( const ::rtl::OUString& aServiceSpecifier ) throw(Exception, RuntimeException)
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+
+ OGeometryControlModel_Base* pNewModel = NULL;
+
+ const Reference< XMultiServiceFactory > xFactory( maContext.getLegacyServiceFactory() );
+ if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlEditModel ) == 0 )
+ pNewModel = new OGeometryControlModel< UnoControlEditModel >( xFactory );
+ else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlFormattedFieldModel ) == 0 )
+ pNewModel = new OGeometryControlModel< UnoControlFormattedFieldModel >( xFactory );
+ else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlFileControlModel ) == 0 )
+ pNewModel = new OGeometryControlModel< UnoControlFileControlModel >( xFactory );
+ else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlButtonModel ) == 0 )
+ pNewModel = new OGeometryControlModel< UnoControlButtonModel >( xFactory );
+ else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlImageControlModel ) == 0 )
+ pNewModel = new OGeometryControlModel< UnoControlImageControlModel >( xFactory );
+ else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlRadioButtonModel ) == 0 )
+ pNewModel = new OGeometryControlModel< UnoControlRadioButtonModel >( xFactory );
+ else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlCheckBoxModel ) == 0 )
+ pNewModel = new OGeometryControlModel< UnoControlCheckBoxModel >( xFactory );
+ else if ( aServiceSpecifier.compareToAscii( szServiceName_UnoControlFixedHyperlinkModel ) == 0 )
+ pNewModel = new OGeometryControlModel< UnoControlFixedHyperlinkModel >( xFactory );
+ else if ( aServiceSpecifier.compareToAscii( szServiceName_UnoControlFixedTextModel ) == 0 )
+ pNewModel = new OGeometryControlModel< UnoControlFixedTextModel >( xFactory );
+ else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlGroupBoxModel ) == 0 )
+ pNewModel = new OGeometryControlModel< UnoControlGroupBoxModel >( xFactory );
+ else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlListBoxModel ) == 0 )
+ pNewModel = new OGeometryControlModel< UnoControlListBoxModel >( xFactory );
+ else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlComboBoxModel ) == 0 )
+ pNewModel = new OGeometryControlModel< UnoControlComboBoxModel >( xFactory );
+ else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlDateFieldModel ) == 0 )
+ pNewModel = new OGeometryControlModel< UnoControlDateFieldModel >( xFactory );
+ else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlTimeFieldModel ) == 0 )
+ pNewModel = new OGeometryControlModel< UnoControlTimeFieldModel >( xFactory );
+ else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlNumericFieldModel ) == 0 )
+ pNewModel = new OGeometryControlModel< UnoControlNumericFieldModel >( xFactory );
+ else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlCurrencyFieldModel ) == 0 )
+ pNewModel = new OGeometryControlModel< UnoControlCurrencyFieldModel >( xFactory );
+ else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlPatternFieldModel ) == 0 )
+ pNewModel = new OGeometryControlModel< UnoControlPatternFieldModel >( xFactory );
+ else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlProgressBarModel ) == 0 )
+ pNewModel = new OGeometryControlModel< UnoControlProgressBarModel >( xFactory );
+ else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlScrollBarModel ) == 0 )
+ pNewModel = new OGeometryControlModel< UnoControlScrollBarModel >( xFactory );
+ else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlFixedLineModel ) == 0 )
+ pNewModel = new OGeometryControlModel< UnoControlFixedLineModel >( xFactory );
+ else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlRoadmapModel ) == 0 )
+ pNewModel = new OGeometryControlModel< UnoControlRoadmapModel >( xFactory );
+ else if ( aServiceSpecifier.compareToAscii( szServiceName_TreeControlModel ) == 0 )
+ pNewModel = new OGeometryControlModel< UnoTreeModel >( xFactory );
+ else if ( aServiceSpecifier.compareToAscii( szServiceName_GridControlModel ) == 0 )
+ pNewModel = new OGeometryControlModel< UnoGridModel >( xFactory );
+ else if ( aServiceSpecifier.compareToAscii( szServiceName_UnoControlTabPageContainerModel ) == 0 )
+ pNewModel = new OGeometryControlModel< UnoControlTabPageContainerModel >( xFactory );
+
+ if ( !pNewModel )
+ {
+ if ( xFactory.is() )
+ {
+ Reference< XInterface > xObject = xFactory->createInstance( aServiceSpecifier );
+ Reference< XServiceInfo > xSI( xObject, UNO_QUERY );
+ Reference< XCloneable > xCloneAccess( xSI, UNO_QUERY );
+ Reference< XAggregation > xAgg( xCloneAccess, UNO_QUERY );
+ if ( xAgg.is() )
+ {
+ if ( xSI->supportsService( ::rtl::OUString::createFromAscii( "com.sun.star.awt.UnoControlModel" ) ) )
+ {
+ // release 3 of the 4 references we have to the object
+ xAgg.clear();
+ xSI.clear();
+ xObject.clear();
+
+ pNewModel = new OCommonGeometryControlModel( xCloneAccess, aServiceSpecifier );
+ }
+ }
+ }
+ }
+
+ Reference< XInterface > xNewModel = (::cppu::OWeakObject*)pNewModel;
+ return xNewModel;
+}
+
+Reference< XInterface > ControlModelContainerBase::createInstanceWithArguments( const ::rtl::OUString& ServiceSpecifier, const Sequence< Any >& /* Arguments */ ) throw(Exception, RuntimeException)
+{
+ return createInstance( ServiceSpecifier );
+}
+
+Sequence< ::rtl::OUString > ControlModelContainerBase::getAvailableServiceNames() throw(RuntimeException)
+{
+ static Sequence< ::rtl::OUString >* pNamesSeq = NULL;
+ if ( !pNamesSeq )
+ {
+ pNamesSeq = new Sequence< ::rtl::OUString >( 23 );
+ ::rtl::OUString* pNames = pNamesSeq->getArray();
+ pNames[0] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlEditModel );
+ pNames[1] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlFormattedFieldModel );
+ pNames[2] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlFileControlModel );
+ pNames[3] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlButtonModel );
+ pNames[4] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlImageControlModel );
+ pNames[5] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlRadioButtonModel );
+ pNames[6] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlCheckBoxModel );
+ pNames[7] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlFixedTextModel );
+ pNames[8] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlGroupBoxModel );
+ pNames[9] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlListBoxModel );
+ pNames[10] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlComboBoxModel );
+ pNames[11] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlDateFieldModel );
+ pNames[12] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlTimeFieldModel );
+ pNames[13] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlNumericFieldModel );
+ pNames[14] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlCurrencyFieldModel );
+ pNames[15] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlPatternFieldModel );
+ pNames[16] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlProgressBarModel );
+ pNames[17] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlScrollBarModel );
+ pNames[18] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlFixedLineModel );
+ pNames[19] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlRoadmapModel );
+ pNames[20] = ::rtl::OUString::createFromAscii( szServiceName_TreeControlModel );
+ pNames[21] = ::rtl::OUString::createFromAscii( szServiceName_GridControlModel );
+ pNames[22] = ::rtl::OUString::createFromAscii( szServiceName_UnoControlTabPageContainerModel );
+
+ }
+ return *pNamesSeq;
+}
+
+// XContainer
+void ControlModelContainerBase::addContainerListener( const Reference< XContainerListener >& l ) throw(RuntimeException)
+{
+ maContainerListeners.addInterface( l );
+}
+
+void ControlModelContainerBase::removeContainerListener( const Reference< XContainerListener >& l ) throw(RuntimeException)
+{
+ maContainerListeners.removeInterface( l );
+}
+
+// XElementAcces
+Type ControlModelContainerBase::getElementType() throw(RuntimeException)
+{
+ Type aType = getCppuType( ( Reference< XControlModel>* ) NULL );
+ return aType;
+}
+
+sal_Bool ControlModelContainerBase::hasElements() throw(RuntimeException)
+{
+ return !maModels.empty();
+}
+
+// XNameContainer, XNameReplace, XNameAccess
+void ControlModelContainerBase::replaceByName( const ::rtl::OUString& aName, const Any& aElement ) throw(IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException)
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+
+ Reference< XControlModel > xNewModel;
+ aElement >>= xNewModel;
+ if ( !xNewModel.is() )
+ lcl_throwIllegalArgumentException();
+
+ UnoControlModelHolderList::iterator aElementPos = ImplFindElement( aName );
+ if ( maModels.end() == aElementPos )
+ lcl_throwNoSuchElementException();
+
+ // stop listening at the old model
+ stopControlListening( aElementPos->first );
+ Reference< XControlModel > xReplaced( aElementPos->first );
+ // remember the new model, and start listening
+ aElementPos->first = xNewModel;
+ startControlListening( xNewModel );
+
+ ContainerEvent aEvent;
+ aEvent.Source = *this;
+ aEvent.Element = aElement;
+ aEvent.ReplacedElement <<= xReplaced;
+ aEvent.Accessor <<= aName;
+
+ // notify the container listener
+ maContainerListeners.elementReplaced( aEvent );
+
+ // our "tab controller model" has potentially changed -> notify this
+ implNotifyTabModelChange( aName );
+}
+
+Any ControlModelContainerBase::getByName( const ::rtl::OUString& aName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException)
+{
+ UnoControlModelHolderList::iterator aElementPos = ImplFindElement( aName );
+ if ( maModels.end() == aElementPos )
+ lcl_throwNoSuchElementException();
+
+ return makeAny( aElementPos->first );
+}
+
+Sequence< ::rtl::OUString > ControlModelContainerBase::getElementNames() throw(RuntimeException)
+{
+ Sequence< ::rtl::OUString > aNames( maModels.size() );
+
+ ::std::transform(
+ maModels.begin(), maModels.end(), // source range
+ aNames.getArray(), // target range
+ ::std::select2nd< UnoControlModelHolder >() // operator to apply: select the second element (the name)
+ );
+
+ return aNames;
+}
+
+sal_Bool ControlModelContainerBase::hasByName( const ::rtl::OUString& aName ) throw(RuntimeException)
+{
+ return maModels.end() != ImplFindElement( aName );
+}
+
+void ControlModelContainerBase::insertByName( const ::rtl::OUString& aName, const Any& aElement ) throw(IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException)
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+
+ Reference< XControlModel > xM;
+ aElement >>= xM;
+
+ if ( xM.is() )
+ {
+ Reference< beans::XPropertySet > xProps( xM, UNO_QUERY );
+ if ( xProps.is() )
+ {
+
+ Reference< beans::XPropertySetInfo > xPropInfo = xProps.get()->getPropertySetInfo();
+
+ ::rtl::OUString sImageSourceProperty = GetPropertyName( BASEPROPERTY_IMAGEURL );
+ if ( xPropInfo.get()->hasPropertyByName( sImageSourceProperty ) && ImplHasProperty(BASEPROPERTY_DIALOGSOURCEURL) )
+ {
+ Any aUrl = xProps.get()->getPropertyValue( sImageSourceProperty );
+
+ ::rtl::OUString absoluteUrl =
+ getPhysicalLocation( getPropertyValue( GetPropertyName( BASEPROPERTY_DIALOGSOURCEURL ) ), aUrl );
+
+ aUrl <<= absoluteUrl;
+
+ xProps.get()->setPropertyValue( sImageSourceProperty , aUrl );
+ }
+ }
+ }
+
+
+
+ if ( !aName.getLength() || !xM.is() )
+ lcl_throwIllegalArgumentException();
+
+ UnoControlModelHolderList::iterator aElementPos = ImplFindElement( aName );
+ if ( maModels.end() != aElementPos )
+ lcl_throwElementExistException();
+
+ maModels.push_back( UnoControlModelHolder( xM, aName ) );
+ mbGroupsUpToDate = sal_False;
+ startControlListening( xM );
+
+ ContainerEvent aEvent;
+ aEvent.Source = *this;
+ aEvent.Element <<= aElement;
+ aEvent.Accessor <<= aName;
+ maContainerListeners.elementInserted( aEvent );
+
+ // our "tab controller model" has potentially changed -> notify this
+ implNotifyTabModelChange( aName );
+}
+
+void ControlModelContainerBase::removeByName( const ::rtl::OUString& aName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException)
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+
+ UnoControlModelHolderList::iterator aElementPos = ImplFindElement( aName );
+ if ( maModels.end() == aElementPos )
+ lcl_throwNoSuchElementException();
+
+ ContainerEvent aEvent;
+ aEvent.Source = *this;
+ aEvent.Element <<= aElementPos->first;
+ aEvent.Accessor <<= aName;
+ maContainerListeners.elementRemoved( aEvent );
+
+ stopControlListening( aElementPos->first );
+ Reference< XPropertySet > xPS( aElementPos->first, UNO_QUERY );
+ maModels.erase( aElementPos );
+ mbGroupsUpToDate = sal_False;
+
+ if ( xPS.is() )
+ try
+ {
+ xPS->setPropertyValue( PROPERTY_RESOURCERESOLVER, makeAny( Reference< resource::XStringResourceResolver >() ) );
+ }
+ catch( const Exception& ) { DBG_UNHANDLED_EXCEPTION(); }
+
+ // our "tab controller model" has potentially changed -> notify this
+ implNotifyTabModelChange( aName );
+}
+
+// ----------------------------------------------------------------------------
+sal_Bool SAL_CALL ControlModelContainerBase::getGroupControl( ) throw (RuntimeException)
+{
+ return sal_True;
+}
+
+// ----------------------------------------------------------------------------
+void SAL_CALL ControlModelContainerBase::setGroupControl( sal_Bool ) throw (RuntimeException)
+{
+ DBG_ERROR( "UnoControlDialogModel::setGroupControl: explicit grouping not supported" );
+}
+
+// ----------------------------------------------------------------------------
+void SAL_CALL ControlModelContainerBase::setControlModels( const Sequence< Reference< XControlModel > >& _rControls ) throw (RuntimeException)
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+
+ // set the tab indexes according to the order of models in the sequence
+ const Reference< XControlModel >* pControls = _rControls.getConstArray( );
+ const Reference< XControlModel >* pControlsEnd = _rControls.getConstArray( ) + _rControls.getLength();
+
+ sal_Int16 nTabIndex = 1;
+
+ for ( ; pControls != pControlsEnd; ++pControls )
+ {
+ // look up the control in our own structure. This is to prevent invalid arguments
+ UnoControlModelHolderList::const_iterator aPos =
+ ::std::find_if(
+ maModels.begin(), maModels.end(),
+ CompareControlModel( *pControls )
+ );
+ if ( maModels.end() != aPos )
+ {
+ // okay, this is an existent model
+ // now set the TabIndex property (if applicable)
+ Reference< XPropertySet > xProps( aPos->first, UNO_QUERY );
+ Reference< XPropertySetInfo > xPSI;
+ if ( xProps.is() )
+ xPSI = xProps->getPropertySetInfo();
+ if ( xPSI.is() && xPSI->hasPropertyByName( getTabIndexPropertyName() ) )
+ xProps->setPropertyValue( getTabIndexPropertyName(), makeAny( nTabIndex++ ) );
+ }
+ mbGroupsUpToDate = sal_False;
+ }
+}
+
+
+typedef ::std::multimap< sal_Int32, Reference< XControlModel >, ::std::less< sal_Int32 > > MapIndexToModel;
+
+// ----------------------------------------------------------------------------
+Sequence< Reference< XControlModel > > SAL_CALL ControlModelContainerBase::getControlModels( ) throw (RuntimeException)
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+
+ MapIndexToModel aSortedModels;
+ // will be the sorted container of all models which have a tab index property
+ ::std::vector< Reference< XControlModel > > aUnindexedModels;
+ // will be the container of all models which do not have a tab index property
+
+ UnoControlModelHolderList::const_iterator aLoop = maModels.begin();
+ for ( ; aLoop != maModels.end(); ++aLoop )
+ {
+ Reference< XControlModel > xModel( aLoop->first );
+
+ // see if the model has a TabIndex property
+ Reference< XPropertySet > xControlProps( xModel, UNO_QUERY );
+ Reference< XPropertySetInfo > xPSI;
+ if ( xControlProps.is() )
+ xPSI = xControlProps->getPropertySetInfo( );
+ DBG_ASSERT( xPSI.is(), "UnoControlDialogModel::getControlModels: invalid child model!" );
+
+ // has it?
+ if ( xPSI.is() && xPSI->hasPropertyByName( getTabIndexPropertyName() ) )
+ { // yes
+ sal_Int32 nTabIndex = -1;
+ xControlProps->getPropertyValue( getTabIndexPropertyName() ) >>= nTabIndex;
+
+ aSortedModels.insert( MapIndexToModel::value_type( nTabIndex, xModel ) );
+ }
+ else if ( xModel.is() )
+ // no, it hasn't, but we have to include it, anyway
+ aUnindexedModels.push_back( xModel );
+ }
+
+ // okay, here we have a container of all our models, sorted by tab index,
+ // plus a container of "unindexed" models
+ // -> merge them
+ Sequence< Reference< XControlModel > > aReturn( aUnindexedModels.size() + aSortedModels.size() );
+ ::std::transform(
+ aSortedModels.begin(), aSortedModels.end(),
+ ::std::copy( aUnindexedModels.begin(), aUnindexedModels.end(), aReturn.getArray() ),
+ ::std::select2nd< MapIndexToModel::value_type >( )
+ );
+
+ return aReturn;
+}
+
+// ----------------------------------------------------------------------------
+void SAL_CALL ControlModelContainerBase::setGroup( const Sequence< Reference< XControlModel > >&, const ::rtl::OUString& ) throw (RuntimeException)
+{
+ // not supported. We have only implicit grouping:
+ // We only have a sequence of control models, and we _know_ (yes, that's a HACK relying on
+ // implementation details) that VCL does grouping according to the order of controls automatically
+ // At least VCL does this for all we're interested in: Radio buttons.
+ DBG_ERROR( "UnoControlDialogModel::setGroup: grouping not supported" );
+}
+
+////----- XInitialization -------------------------------------------------------------------
+void SAL_CALL ControlModelContainerBase::initialize (const Sequence<Any>& rArguments) throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException)
+{
+ sal_Int16 nPageId = -1;
+ if ( rArguments.getLength() == 1 )
+ {
+ if ( !( rArguments[ 0 ] >>= nPageId ))
+ throw lang::IllegalArgumentException();
+ m_nTabPageId = nPageId;
+ }
+ else
+ m_nTabPageId = -1;
+}
+::sal_Int16 SAL_CALL ControlModelContainerBase::getTabPageID() throw (::com::sun::star::uno::RuntimeException)
+{
+ return m_nTabPageId;
+}
+::sal_Bool SAL_CALL ControlModelContainerBase::getEnabled() throw (::com::sun::star::uno::RuntimeException)
+{
+ return m_bEnabled;
+}
+void SAL_CALL ControlModelContainerBase::setEnabled( ::sal_Bool _enabled ) throw (::com::sun::star::uno::RuntimeException)
+{
+ m_bEnabled = _enabled;
+}
+::rtl::OUString SAL_CALL ControlModelContainerBase::getTitle() throw (::com::sun::star::uno::RuntimeException)
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ Reference<XPropertySet> xThis(*this,UNO_QUERY);
+ ::rtl::OUString sTitle;
+ xThis->getPropertyValue(GetPropertyName(BASEPROPERTY_TITLE)) >>= sTitle;
+ return sTitle;
+ //return m_sTitle;
+}
+void SAL_CALL ControlModelContainerBase::setTitle( const ::rtl::OUString& _title ) throw (::com::sun::star::uno::RuntimeException)
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ Reference<XPropertySet> xThis(*this,UNO_QUERY);
+ xThis->setPropertyValue(GetPropertyName(BASEPROPERTY_TITLE),makeAny(_title));
+}
+::rtl::OUString SAL_CALL ControlModelContainerBase::getImageURL() throw (::com::sun::star::uno::RuntimeException)
+{
+ return m_sImageURL;
+}
+void SAL_CALL ControlModelContainerBase::setImageURL( const ::rtl::OUString& _imageurl ) throw (::com::sun::star::uno::RuntimeException)
+{
+ m_sImageURL = _imageurl;
+}
+::rtl::OUString SAL_CALL ControlModelContainerBase::getTooltip() throw (::com::sun::star::uno::RuntimeException)
+{
+ return m_sTooltip;
+}
+void SAL_CALL ControlModelContainerBase::setTooltip( const ::rtl::OUString& _tooltip ) throw (::com::sun::star::uno::RuntimeException)
+{
+ m_sTooltip = _tooltip;
+}
+
+// ----------------------------------------------------------------------------
+namespace
+{
+ enum GroupingMachineState
+ {
+ eLookingForGroup,
+ eExpandingGroup
+ };
+
+ // ........................................................................
+ static sal_Int32 lcl_getDialogStep( const Reference< XControlModel >& _rxModel )
+ {
+ sal_Int32 nStep = 0;
+ try
+ {
+ Reference< XPropertySet > xModelProps( _rxModel, UNO_QUERY );
+ xModelProps->getPropertyValue( getStepPropertyName() ) >>= nStep;
+ }
+ catch( const Exception& )
+ {
+ DBG_ERROR( "lcl_getDialogStep: caught an exception while determining the dialog page!" );
+ }
+ return nStep;
+ }
+}
+
+// ----------------------------------------------------------------------------
+sal_Int32 SAL_CALL ControlModelContainerBase::getGroupCount( ) throw (RuntimeException)
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+
+ implUpdateGroupStructure();
+
+ return maGroups.size();
+}
+
+// ----------------------------------------------------------------------------
+void SAL_CALL ControlModelContainerBase::getGroup( sal_Int32 _nGroup, Sequence< Reference< XControlModel > >& _rGroup, ::rtl::OUString& _rName ) throw (RuntimeException)
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+
+ implUpdateGroupStructure();
+
+ if ( ( _nGroup < 0 ) || ( _nGroup >= (sal_Int32)maGroups.size() ) )
+ {
+ DBG_ERROR( "UnoControlDialogModel::getGroup: invalid argument and I am not allowed to throw an exception!" );
+ _rGroup.realloc( 0 );
+ _rName = ::rtl::OUString();
+ }
+ else
+ {
+ AllGroups::const_iterator aGroupPos = maGroups.begin() + _nGroup;
+ _rGroup.realloc( aGroupPos->size() );
+ // copy the models
+ ::std::copy( aGroupPos->begin(), aGroupPos->end(), _rGroup.getArray() );
+ // give the group a name
+ _rName = ::rtl::OUString::valueOf( _nGroup );
+ }
+}
+
+// ----------------------------------------------------------------------------
+void SAL_CALL ControlModelContainerBase::getGroupByName( const ::rtl::OUString& _rName, Sequence< Reference< XControlModel > >& _rGroup ) throw (RuntimeException)
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+
+ ::rtl::OUString sDummyName;
+ getGroup( _rName.toInt32( ), _rGroup, sDummyName );
+}
+
+// ----------------------------------------------------------------------------
+void SAL_CALL ControlModelContainerBase::addChangesListener( const Reference< XChangesListener >& _rxListener ) throw (RuntimeException)
+{
+ maChangeListeners.addInterface( _rxListener );
+}
+
+// ----------------------------------------------------------------------------
+void SAL_CALL ControlModelContainerBase::removeChangesListener( const Reference< XChangesListener >& _rxListener ) throw (RuntimeException)
+{
+ maChangeListeners.removeInterface( _rxListener );
+}
+
+// ----------------------------------------------------------------------------
+void ControlModelContainerBase::implNotifyTabModelChange( const ::rtl::OUString& _rAccessor )
+{
+ // multiplex to our change listeners:
+ // the changes event
+ ChangesEvent aEvent;
+ aEvent.Source = *this;
+ aEvent.Base <<= aEvent.Source; // the "base of the changes root" is also ourself
+ aEvent.Changes.realloc( 1 ); // exactly one change
+ aEvent.Changes[ 0 ].Accessor <<= _rAccessor;
+
+
+ Sequence< Reference< XInterface > > aChangeListeners( maChangeListeners.getElements() );
+ const Reference< XInterface >* pListener = aChangeListeners.getConstArray();
+ const Reference< XInterface >* pListenerEnd = aChangeListeners.getConstArray() + aChangeListeners.getLength();
+ for ( ; pListener != pListenerEnd; ++pListener )
+ {
+ if ( pListener->is() )
+ static_cast< XChangesListener* >( pListener->get() )->changesOccurred( aEvent );
+ }
+}
+
+
+// ----------------------------------------------------------------------------
+void ControlModelContainerBase::implUpdateGroupStructure()
+{
+ if ( mbGroupsUpToDate )
+ // nothing to do
+ return;
+
+ // conditions for a group:
+ // * all elements of the group are radio buttons
+ // * all elements of the group are on the same dialog page
+ // * in the overall control order (determined by the tab index), all elements are subsequent
+
+ maGroups.clear();
+
+ Sequence< Reference< XControlModel > > aControlModels = getControlModels();
+ const Reference< XControlModel >* pControlModels = aControlModels.getConstArray();
+ const Reference< XControlModel >* pControlModelsEnd = pControlModels + aControlModels.getLength();
+
+ // in extreme we have as much groups as controls
+ maGroups.reserve( aControlModels.getLength() );
+
+ GroupingMachineState eState = eLookingForGroup; // the current state of our machine
+ Reference< XServiceInfo > xModelSI; // for checking for a radion button
+ AllGroups::iterator aCurrentGroup = maGroups.end(); // the group which we're currently building
+ sal_Int32 nCurrentGroupStep = -1; // the step which all controls of the current group belong to
+ sal_Bool bIsRadioButton; // is it a radio button?
+
+#if OSL_DEBUG_LEVEL > 1
+ ::std::vector< ::rtl::OUString > aCurrentGroupLabels;
+#endif
+
+ for ( ; pControlModels != pControlModelsEnd; ++pControlModels )
+ {
+ // we'll need this in every state
+ xModelSI = xModelSI.query( *pControlModels );
+ bIsRadioButton = xModelSI.is() && xModelSI->supportsService( ::rtl::OUString::createFromAscii( szServiceName2_UnoControlRadioButtonModel ) );
+
+ switch ( eState )
+ {
+ case eLookingForGroup:
+ {
+ if ( !bIsRadioButton )
+ // this is no radio button -> still looking for the beginning of a group
+ continue;
+ // the current model is a radio button
+ // -> we found the beginning of a new group
+ // create the place for this group
+ size_t nGroups = maGroups.size();
+ maGroups.resize( nGroups + 1 );
+ aCurrentGroup = maGroups.begin() + nGroups;
+ // and add the (only, til now) member
+ aCurrentGroup->push_back( *pControlModels );
+
+ // get the step which all controls of this group now have to belong to
+ nCurrentGroupStep = lcl_getDialogStep( *pControlModels );
+ // new state: looking for further members
+ eState = eExpandingGroup;
+
+#if OSL_DEBUG_LEVEL > 1
+ Reference< XPropertySet > xModelProps( *pControlModels, UNO_QUERY );
+ ::rtl::OUString sLabel;
+ if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName( ::rtl::OUString::createFromAscii( "Label" ) ) )
+ xModelProps->getPropertyValue( ::rtl::OUString::createFromAscii( "Label" ) ) >>= sLabel;
+ aCurrentGroupLabels.push_back( sLabel );
+#endif
+ }
+ break;
+
+ case eExpandingGroup:
+ {
+ if ( !bIsRadioButton )
+ { // no radio button -> the group is done
+ aCurrentGroup = maGroups.end();
+ eState = eLookingForGroup;
+#if OSL_DEBUG_LEVEL > 1
+ aCurrentGroupLabels.clear();
+#endif
+ continue;
+ }
+
+ // it is a radio button - is it on the proper page?
+ const sal_Int32 nThisModelStep = lcl_getDialogStep( *pControlModels );
+ if ( ( nThisModelStep == nCurrentGroupStep ) // the current button is on the same dialog page
+ || ( 0 == nThisModelStep ) // the current button appears on all pages
+ )
+ {
+ // -> it belongs to the same group
+ aCurrentGroup->push_back( *pControlModels );
+ // state still is eExpandingGroup - we're looking for further elements
+ eState = eExpandingGroup;
+
+#if OSL_DEBUG_LEVEL > 1
+ Reference< XPropertySet > xModelProps( *pControlModels, UNO_QUERY );
+ ::rtl::OUString sLabel;
+ if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName( ::rtl::OUString::createFromAscii( "Label" ) ) )
+ xModelProps->getPropertyValue( ::rtl::OUString::createFromAscii( "Label" ) ) >>= sLabel;
+ aCurrentGroupLabels.push_back( sLabel );
+#endif
+ continue;
+ }
+
+ // it's a radio button, but on a different page
+ // -> we open a new group for it
+
+ // close the old group
+ aCurrentGroup = maGroups.end();
+#if OSL_DEBUG_LEVEL > 1
+ aCurrentGroupLabels.clear();
+#endif
+
+ // open a new group
+ size_t nGroups = maGroups.size();
+ maGroups.resize( nGroups + 1 );
+ aCurrentGroup = maGroups.begin() + nGroups;
+ // and add the (only, til now) member
+ aCurrentGroup->push_back( *pControlModels );
+
+ nCurrentGroupStep = nThisModelStep;
+
+ // state is the same: we still are looking for further elements of the current group
+ eState = eExpandingGroup;
+#if OSL_DEBUG_LEVEL > 1
+ Reference< XPropertySet > xModelProps( *pControlModels, UNO_QUERY );
+ ::rtl::OUString sLabel;
+ if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName( ::rtl::OUString::createFromAscii( "Label" ) ) )
+ xModelProps->getPropertyValue( ::rtl::OUString::createFromAscii( "Label" ) ) >>= sLabel;
+ aCurrentGroupLabels.push_back( sLabel );
+#endif
+ }
+ break;
+ }
+ }
+
+ mbGroupsUpToDate = sal_True;
+}
+
+// ----------------------------------------------------------------------------
+void SAL_CALL ControlModelContainerBase::propertyChange( const PropertyChangeEvent& _rEvent ) throw (RuntimeException)
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+
+ DBG_ASSERT( 0 == _rEvent.PropertyName.compareToAscii( "TabIndex" ),
+ "UnoControlDialogModel::propertyChange: not listening for this property!" );
+
+ // the accessor for the changed element
+ ::rtl::OUString sAccessor;
+ UnoControlModelHolderList::const_iterator aPos =
+ ::std::find_if(
+ maModels.begin(), maModels.end(),
+ CompareControlModel( Reference< XControlModel >( _rEvent.Source, UNO_QUERY ) )
+ );
+ OSL_ENSURE( maModels.end() != aPos, "UnoControlDialogModel::propertyChange: don't know this model!" );
+ if ( maModels.end() != aPos )
+ sAccessor = aPos->second;
+
+ // our groups are not up-to-date
+ mbGroupsUpToDate = sal_False;
+
+ // notify
+ implNotifyTabModelChange( sAccessor );
+}
+
+// ----------------------------------------------------------------------------
+void SAL_CALL ControlModelContainerBase::disposing( const EventObject& /*rEvent*/ ) throw (RuntimeException)
+{
+}
+
+// ----------------------------------------------------------------------------
+void ControlModelContainerBase::startControlListening( const Reference< XControlModel >& _rxChildModel )
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+
+ Reference< XPropertySet > xModelProps( _rxChildModel, UNO_QUERY );
+ Reference< XPropertySetInfo > xPSI;
+ if ( xModelProps.is() )
+ xPSI = xModelProps->getPropertySetInfo();
+
+ if ( xPSI.is() && xPSI->hasPropertyByName( getTabIndexPropertyName() ) )
+ xModelProps->addPropertyChangeListener( getTabIndexPropertyName(), this );
+}
+
+// ----------------------------------------------------------------------------
+void ControlModelContainerBase::stopControlListening( const Reference< XControlModel >& _rxChildModel )
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+
+ Reference< XPropertySet > xModelProps( _rxChildModel, UNO_QUERY );
+ Reference< XPropertySetInfo > xPSI;
+ if ( xModelProps.is() )
+ xPSI = xModelProps->getPropertySetInfo();
+
+ if ( xPSI.is() && xPSI->hasPropertyByName( getTabIndexPropertyName() ) )
+ xModelProps->removePropertyChangeListener( getTabIndexPropertyName(), this );
+}
+
+// ============================================================================
+// = class ResourceListener
+// ============================================================================
+
+ResourceListener::ResourceListener(
+ const Reference< util::XModifyListener >& rListener ) :
+ OWeakObject(),
+ m_xListener( rListener ),
+ m_bListening( false )
+{
+}
+
+ResourceListener::~ResourceListener()
+{
+}
+
+// XInterface
+Any SAL_CALL ResourceListener::queryInterface( const Type& rType )
+throw ( RuntimeException )
+{
+ Any a = ::cppu::queryInterface(
+ rType ,
+ static_cast< XModifyListener* >( this ),
+ static_cast< XEventListener* >( this ));
+
+ if ( a.hasValue() )
+ return a;
+
+ return OWeakObject::queryInterface( rType );
+}
+
+void SAL_CALL ResourceListener::acquire() throw ()
+{
+ OWeakObject::acquire();
+}
+
+void SAL_CALL ResourceListener::release() throw ()
+{
+ OWeakObject::release();
+}
+
+void ResourceListener::startListening(
+ const Reference< resource::XStringResourceResolver >& rResource )
+{
+ Reference< util::XModifyBroadcaster > xModifyBroadcaster( rResource, UNO_QUERY );
+
+ {
+ // --- SAFE ---
+ ::osl::ResettableGuard < ::osl::Mutex > aGuard( m_aMutex );
+ bool bListening( m_bListening );
+ bool bResourceSet( m_xResource.is() );
+ aGuard.clear();
+ // --- SAFE ---
+
+ if ( bListening && bResourceSet )
+ stopListening();
+
+ // --- SAFE ---
+ aGuard.reset();
+ m_xResource = rResource;
+ aGuard.clear();
+ // --- SAFE ---
+ }
+
+ Reference< util::XModifyListener > xThis( static_cast<OWeakObject*>( this ), UNO_QUERY );
+ if ( xModifyBroadcaster.is() )
+ {
+ try
+ {
+ xModifyBroadcaster->addModifyListener( xThis );
+
+ // --- SAFE ---
+ ::osl::ResettableGuard < ::osl::Mutex > aGuard( m_aMutex );
+ m_bListening = true;
+ // --- SAFE ---
+ }
+ catch ( RuntimeException& )
+ {
+ throw;
+ }
+ catch ( Exception& )
+ {
+ }
+ }
+}
+
+void ResourceListener::stopListening()
+{
+ Reference< util::XModifyBroadcaster > xModifyBroadcaster;
+
+ // --- SAFE ---
+ ::osl::ResettableGuard < ::osl::Mutex > aGuard( m_aMutex );
+ if ( m_bListening && m_xResource.is() )
+ xModifyBroadcaster = Reference< util::XModifyBroadcaster >( m_xResource, UNO_QUERY );
+ aGuard.clear();
+ // --- SAFE ---
+
+ Reference< util::XModifyListener > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY );
+ if ( xModifyBroadcaster.is() )
+ {
+ try
+ {
+ // --- SAFE ---
+ aGuard.reset();
+ m_bListening = false;
+ m_xResource.clear();
+ aGuard.clear();
+ // --- SAFE ---
+
+ xModifyBroadcaster->removeModifyListener( xThis );
+ }
+ catch ( RuntimeException& )
+ {
+ throw;
+ }
+ catch ( Exception& )
+ {
+ }
+ }
+}
+
+// XModifyListener
+void SAL_CALL ResourceListener::modified(
+ const lang::EventObject& aEvent )
+throw ( RuntimeException )
+{
+ Reference< util::XModifyListener > xListener;
+
+ // --- SAFE ---
+ ::osl::ResettableGuard < ::osl::Mutex > aGuard( m_aMutex );
+ xListener = m_xListener;
+ aGuard.clear();
+ // --- SAFE ---
+
+ if ( xListener.is() )
+ {
+ try
+ {
+ xListener->modified( aEvent );
+ }
+ catch ( RuntimeException& )
+ {
+ throw;
+ }
+ catch ( Exception& )
+ {
+ }
+ }
+}
+
+// XEventListener
+void SAL_CALL ResourceListener::disposing(
+ const EventObject& Source )
+throw ( RuntimeException )
+{
+ Reference< lang::XEventListener > xListener;
+ Reference< resource::XStringResourceResolver > xResource;
+
+ // --- SAFE ---
+ ::osl::ResettableGuard < ::osl::Mutex > aGuard( m_aMutex );
+ Reference< XInterface > xIfacRes( m_xResource, UNO_QUERY );
+ Reference< XInterface > xIfacList( m_xListener, UNO_QUERY );
+ aGuard.clear();
+ // --- SAFE ---
+
+ if ( Source.Source == xIfacRes )
+ {
+ // --- SAFE ---
+ aGuard.reset();
+ m_bListening = false;
+ xResource = m_xResource;
+ xListener = Reference< lang::XEventListener >( m_xListener, UNO_QUERY );
+ m_xResource.clear();
+ aGuard.clear();
+ // --- SAFE ---
+
+ if ( xListener.is() )
+ {
+ try
+ {
+ xListener->disposing( Source );
+ }
+ catch ( RuntimeException& )
+ {
+ throw;
+ }
+ catch ( Exception& )
+ {
+ }
+ }
+ }
+ else if ( Source.Source == xIfacList )
+ {
+ // --- SAFE ---
+ aGuard.reset();
+ m_bListening = false;
+ xListener = Reference< lang::XEventListener >( m_xListener, UNO_QUERY );
+ xResource = m_xResource;
+ m_xResource.clear();
+ m_xListener.clear();
+ aGuard.clear();
+ // --- SAFE ---
+
+ // Remove ourself as listener from resource resolver
+ Reference< util::XModifyBroadcaster > xModifyBroadcaster( xResource, UNO_QUERY );
+ Reference< util::XModifyListener > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY );
+ if ( xModifyBroadcaster.is() )
+ {
+ try
+ {
+ xModifyBroadcaster->removeModifyListener( xThis );
+ }
+ catch ( RuntimeException& )
+ {
+ throw;
+ }
+ catch ( Exception& )
+ {
+ }
+ }
+ }
+}
+
+//===============================================================
+// ----------------------------------------------------
+// class DialogContainerControl
+// ----------------------------------------------------
+ControlContainerBase::ControlContainerBase( const Reference< XMultiServiceFactory >& i_factory )
+ :ContainerControl_IBase( i_factory )
+ ,mbSizeModified(false)
+ ,mbPosModified(false)
+{
+ maComponentInfos.nWidth = 280;
+ maComponentInfos.nHeight = 400;
+ mxListener = new ResourceListener( Reference< util::XModifyListener >(
+ static_cast< OWeakObject* >( this ), UNO_QUERY ));
+}
+
+ControlContainerBase::~ControlContainerBase()
+{
+}
+
+void ControlContainerBase::createPeer( const Reference< XToolkit > & rxToolkit, const Reference< XWindowPeer > & rParentPeer ) throw(RuntimeException)
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ UnoControlContainer::createPeer( rxToolkit, rParentPeer );
+}
+
+void ControlContainerBase::ImplInsertControl( Reference< XControlModel >& rxModel, const ::rtl::OUString& rName )
+{
+ Reference< XPropertySet > xP( rxModel, UNO_QUERY );
+
+ ::rtl::OUString aDefCtrl;
+ xP->getPropertyValue( GetPropertyName( BASEPROPERTY_DEFAULTCONTROL ) ) >>= aDefCtrl;
+ Reference < XControl > xCtrl;
+ maContext.createComponent( aDefCtrl, xCtrl );
+
+ DBG_ASSERT( xCtrl.is(), "UnoDialogControl::ImplInsertControl: could not create the control!" );
+ if ( xCtrl.is() )
+ {
+ xCtrl->setModel( rxModel );
+ addControl( rName, xCtrl );
+ // will implicitly call addingControl, where we can add the PropertiesChangeListener to the model
+ // (which we formerly did herein)
+ // 08.01.2001 - 96008 - fs@openoffice.org
+
+ ImplSetPosSize( xCtrl );
+ }
+}
+
+void ControlContainerBase::ImplRemoveControl( Reference< XControlModel >& rxModel )
+{
+ Sequence< Reference< XControl > > aControls = getControls();
+ Reference< XControl > xCtrl = StdTabController::FindControl( aControls, rxModel );
+ if ( xCtrl.is() )
+ {
+ removeControl( xCtrl );
+ try
+ {
+ Reference< XComponent > const xControlComp( xCtrl, UNO_QUERY_THROW );
+ xControlComp->dispose();
+ }
+ catch( Exception const & )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+}
+
+void ControlContainerBase::ImplSetPosSize( Reference< XControl >& rxCtrl )
+{
+ Reference< XPropertySet > xP( rxCtrl->getModel(), UNO_QUERY );
+
+ sal_Int32 nX = 0, nY = 0, nWidth = 0, nHeight = 0;
+ xP->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PositionX" ) ) ) >>= nX;
+ xP->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PositionY" ) ) ) >>= nY;
+ xP->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Width" ) ) ) >>= nWidth;
+ xP->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Height" ) ) ) >>= nHeight;
+ MapMode aMode( MAP_APPFONT );
+ OutputDevice*pOutDev = Application::GetDefaultDevice();
+ if ( pOutDev )
+ {
+ ::Size aTmp( nX, nY );
+ aTmp = pOutDev->LogicToPixel( aTmp, aMode );
+ nX = aTmp.Width();
+ nY = aTmp.Height();
+ aTmp = ::Size( nWidth, nHeight );
+ aTmp = pOutDev->LogicToPixel( aTmp, aMode );
+ nWidth = aTmp.Width();
+ nHeight = aTmp.Height();
+ }
+ else
+ {
+ Reference< XWindowPeer > xPeer = ImplGetCompatiblePeer( sal_True );
+ Reference< XDevice > xD( xPeer, UNO_QUERY );
+
+ SimpleFontMetric aFM;
+ FontDescriptor aFD;
+ Any aVal = ImplGetPropertyValue( GetPropertyName( BASEPROPERTY_FONTDESCRIPTOR ) );
+ aVal >>= aFD;
+ if ( aFD.StyleName.getLength() )
+ {
+ Reference< XFont > xFont = xD->getFont( aFD );
+ aFM = xFont->getFontMetric();
+ }
+ else
+ {
+ Reference< XGraphics > xG = xD->createGraphics();
+ aFM = xG->getFontMetric();
+ }
+
+ sal_Int16 nH = aFM.Ascent + aFM.Descent;
+ sal_Int16 nW = nH/2; // calculate avarage width?!
+
+ nX *= nW;
+ nX /= 4;
+ nWidth *= nW;
+ nWidth /= 4;
+ nY *= nH;
+ nY /= 8;
+ nHeight *= nH;
+ nHeight /= 8;
+ }
+ Reference < XWindow > xW( rxCtrl, UNO_QUERY );
+ xW->setPosSize( nX, nY, nWidth, nHeight, PosSize::POSSIZE );
+}
+
+void ControlContainerBase::dispose() throw(RuntimeException)
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+
+ EventObject aEvt;
+ aEvt.Source = static_cast< ::cppu::OWeakObject* >( this );
+ // Notify our listener helper about dispose
+ // --- SAFE ---
+ ::osl::ResettableGuard< ::osl::Mutex > aGuard( GetMutex() );
+ Reference< XEventListener > xListener( mxListener, UNO_QUERY );
+ mxListener.clear();
+ aGuard.clear();
+ // --- SAFE ---
+
+ if ( xListener.is() )
+ xListener->disposing( aEvt );
+ UnoControlContainer::dispose();
+}
+
+void SAL_CALL ControlContainerBase::disposing(
+ const EventObject& Source )
+throw(RuntimeException)
+{
+ UnoControlContainer::disposing( Source );
+}
+
+sal_Bool ControlContainerBase::setModel( const Reference< XControlModel >& rxModel ) throw(RuntimeException)
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+
+ // destroy the old tab controller, if existent
+ if ( mxTabController.is() )
+ {
+ mxTabController->setModel( NULL ); // just to be sure, should not be necessary
+ removeTabController( mxTabController );
+ ::comphelper::disposeComponent( mxTabController ); // just to be sure, should not be necessary
+ mxTabController.clear();
+ }
+
+ if ( getModel().is() )
+ {
+ Sequence< Reference< XControl > > aControls = getControls();
+ const Reference< XControl >* pCtrls = aControls.getConstArray();
+ const Reference< XControl >* pCtrlsEnd = pCtrls + aControls.getLength();
+
+ for ( ; pCtrls < pCtrlsEnd; ++pCtrls )
+ removeControl( *pCtrls );
+ // will implicitly call removingControl, which will remove the PropertyChangeListener
+ // (which we formerly did herein)
+ // 08.01.2001 - 96008 - fs@openoffice.org
+
+ Reference< XContainer > xC( getModel(), UNO_QUERY );
+ if ( xC.is() )
+ xC->removeContainerListener( this );
+
+ Reference< XChangesNotifier > xChangeNotifier( getModel(), UNO_QUERY );
+ if ( xChangeNotifier.is() )
+ xChangeNotifier->removeChangesListener( this );
+ }
+
+ sal_Bool bRet = UnoControl::setModel( rxModel );
+
+ if ( getModel().is() )
+ {
+ Reference< XNameAccess > xNA( getModel(), UNO_QUERY );
+ if ( xNA.is() )
+ {
+ Sequence< ::rtl::OUString > aNames = xNA->getElementNames();
+ const ::rtl::OUString* pNames = aNames.getConstArray();
+ sal_uInt32 nCtrls = aNames.getLength();
+
+ Reference< XControlModel > xCtrlModel;
+ for( sal_uInt32 n = 0; n < nCtrls; ++n, ++pNames )
+ {
+ xNA->getByName( *pNames ) >>= xCtrlModel;
+ ImplInsertControl( xCtrlModel, *pNames );
+ }
+ }
+
+ Reference< XContainer > xC( getModel(), UNO_QUERY );
+ if ( xC.is() )
+ xC->addContainerListener( this );
+
+ Reference< XChangesNotifier > xChangeNotifier( getModel(), UNO_QUERY );
+ if ( xChangeNotifier.is() )
+ xChangeNotifier->addChangesListener( this );
+ }
+
+ Reference< XTabControllerModel > xTabbing( getModel(), UNO_QUERY );
+ if ( xTabbing.is() )
+ {
+ mxTabController = new StdTabController;
+ mxTabController->setModel( xTabbing );
+ addTabController( mxTabController );
+ }
+ ImplStartListingForResourceEvents();
+
+ return bRet;
+}
+void ControlContainerBase::setDesignMode( sal_Bool bOn ) throw(RuntimeException)
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+
+ UnoControl::setDesignMode( bOn );
+
+ Sequence< Reference< XControl > > xCtrls = getControls();
+ sal_Int32 nControls = xCtrls.getLength();
+ Reference< XControl >* pControls = xCtrls.getArray();
+ for ( sal_Int32 n = 0; n < nControls; n++ )
+ pControls[n]->setDesignMode( bOn );
+
+ // #109067# in design mode the tab controller is not notified about
+ // tab index changes, therefore the tab order must be activated
+ // when switching from design mode to live mode
+ if ( mxTabController.is() && !bOn )
+ mxTabController->activateTabOrder();
+}
+
+void ControlContainerBase::elementInserted( const ContainerEvent& Event ) throw(RuntimeException)
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+
+ Reference< XControlModel > xModel;
+ ::rtl::OUString aName;
+
+ Event.Accessor >>= aName;
+ Event.Element >>= xModel;
+ ENSURE_OR_RETURN_VOID( xModel.is(), "UnoDialogControl::elementInserted: illegal element!" );
+ try
+ {
+ ImplInsertControl( xModel, aName );
+ }
+ catch ( const RuntimeException& e ) { throw; }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+}
+
+void ControlContainerBase::elementRemoved( const ContainerEvent& Event ) throw(RuntimeException)
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+
+ Reference< XControlModel > xModel;
+ Event.Element >>= xModel;
+ ENSURE_OR_RETURN_VOID( xModel.is(), "UnoDialogControl::elementRemoved: illegal element!" );
+ try
+ {
+ ImplRemoveControl( xModel );
+ }
+ catch ( const RuntimeException& e ) { throw; }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+}
+
+void ControlContainerBase::elementReplaced( const ContainerEvent& Event ) throw(RuntimeException)
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+
+ Reference< XControlModel > xModel;
+ Event.ReplacedElement >>= xModel;
+ try
+ {
+ OSL_ENSURE( xModel.is(), "UnoDialogControl::elementReplaced: invalid ReplacedElement!" );
+ if ( xModel.is() )
+ ImplRemoveControl( xModel );
+ }
+ catch ( const RuntimeException& e ) { throw; }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+
+ ::rtl::OUString aName;
+ Event.Accessor >>= aName;
+ Event.Element >>= xModel;
+ ENSURE_OR_RETURN_VOID( xModel.is(), "UnoDialogControl::elementReplaced: invalid new element!" );
+ try
+ {
+ ImplInsertControl( xModel, aName );
+ }
+ catch ( const RuntimeException& e ) { throw; }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+}
+
+// XPropertiesChangeListener
+void ControlContainerBase::ImplModelPropertiesChanged( const Sequence< PropertyChangeEvent >& rEvents ) throw(RuntimeException)
+{
+ if( !isDesignMode() && !mbCreatingCompatiblePeer )
+ {
+ ::rtl::OUString s1( RTL_CONSTASCII_USTRINGPARAM( "PositionX" ) );
+ ::rtl::OUString s2( RTL_CONSTASCII_USTRINGPARAM( "PositionY" ) );
+ ::rtl::OUString s3( RTL_CONSTASCII_USTRINGPARAM( "Width" ) );
+ ::rtl::OUString s4( RTL_CONSTASCII_USTRINGPARAM( "Height" ) );
+
+ sal_Int32 nLen = rEvents.getLength();
+ for( sal_Int32 i = 0; i < nLen; i++ )
+ {
+ const PropertyChangeEvent& rEvt = rEvents.getConstArray()[i];
+ Reference< XControlModel > xModel( rEvt.Source, UNO_QUERY );
+ sal_Bool bOwnModel = (XControlModel*)xModel.get() == (XControlModel*)getModel().get();
+ if ( ( rEvt.PropertyName == s1 ) ||
+ ( rEvt.PropertyName == s2 ) ||
+ ( rEvt.PropertyName == s3 ) ||
+ ( rEvt.PropertyName == s4 ) )
+ {
+ if ( bOwnModel )
+ {
+ if ( !mbPosModified && !mbSizeModified )
+ {
+ // Don't set new pos/size if we get new values from window listener
+ Reference< XControl > xThis( (XAggregation*)(::cppu::OWeakAggObject*)this, UNO_QUERY );
+ ImplSetPosSize( xThis );
+ }
+ }
+ else
+ {
+ Sequence<Reference<XControl> > aControlSequence(getControls());
+ Reference<XControl> aControlRef( StdTabController::FindControl( aControlSequence, xModel ) );
+ ImplSetPosSize( aControlRef );
+ }
+ break;
+ }
+ }
+ }
+
+ UnoControlContainer::ImplModelPropertiesChanged( rEvents );
+}
+
+void ControlContainerBase::addingControl( const Reference< XControl >& _rxControl )
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ UnoControlContainer::addingControl( _rxControl );
+
+ if ( _rxControl.is() )
+ {
+ Reference< XMultiPropertySet > xProps( _rxControl->getModel(), UNO_QUERY );
+ if ( xProps.is() )
+ {
+ Sequence< ::rtl::OUString > aNames( 4 );
+ ::rtl::OUString* pNames = aNames.getArray();
+ *pNames++ = ::rtl::OUString::createFromAscii( "PositionX" );
+ *pNames++ = ::rtl::OUString::createFromAscii( "PositionY" );
+ *pNames++ = ::rtl::OUString::createFromAscii( "Width" );
+ *pNames++ = ::rtl::OUString::createFromAscii( "Height" );
+
+ xProps->addPropertiesChangeListener( aNames, this );
+ }
+ }
+}
+
+void ControlContainerBase::removingControl( const Reference< XControl >& _rxControl )
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ UnoControlContainer::removingControl( _rxControl );
+
+ if ( _rxControl.is() )
+ {
+ Reference< XMultiPropertySet > xProps( _rxControl->getModel(), UNO_QUERY );
+ if ( xProps.is() )
+ xProps->removePropertiesChangeListener( this );
+ }
+
+}
+
+void SAL_CALL ControlContainerBase::changesOccurred( const ChangesEvent& ) throw (RuntimeException)
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ // a tab controller model may have changed
+
+ // #109067# in design mode don't notify the tab controller
+ // about tab index changes
+ if ( mxTabController.is() && !mbDesignMode )
+ mxTabController->activateTabOrder();
+}
+void lcl_ApplyResolverToNestedContainees( const Reference< resource::XStringResourceResolver >& xStringResourceResolver, const Reference< XControlContainer >& xContainer )
+{
+ rtl::OUString aPropName( PROPERTY_RESOURCERESOLVER );
+
+ Any xNewStringResourceResolver; xNewStringResourceResolver <<= xStringResourceResolver;
+
+ Sequence< rtl::OUString > aPropNames(1);
+ aPropNames[0] = aPropName;
+
+ const Sequence< Reference< awt::XControl > > aSeq = xContainer->getControls();
+ for ( sal_Int32 i = 0; i < aSeq.getLength(); i++ )
+ {
+ Reference< XControl > xControl( aSeq[i] );
+ Reference< XPropertySet > xPropertySet;
+
+ if ( xControl.is() )
+ xPropertySet = Reference< XPropertySet >( xControl->getModel(), UNO_QUERY );
+
+ if ( !xPropertySet.is() )
+ continue;
+
+ try
+ {
+ Reference< resource::XStringResourceResolver > xCurrStringResourceResolver;
+ Any aOldValue = xPropertySet->getPropertyValue( aPropName );
+ if ( ( aOldValue >>= xCurrStringResourceResolver )
+ && ( xStringResourceResolver == xCurrStringResourceResolver )
+ )
+ {
+ Reference< XMultiPropertySet > xMultiPropSet( xPropertySet, UNO_QUERY );
+ Reference< XPropertiesChangeListener > xListener( xPropertySet, UNO_QUERY );
+ xMultiPropSet->firePropertiesChangeEvent( aPropNames, xListener );
+ }
+ else
+ xPropertySet->setPropertyValue( aPropName, xNewStringResourceResolver );
+ }
+ /*catch ( NoSuchElementException& )*/ // that's nonsense, this is never thrown above ...
+ catch ( const Exception& )
+ {
+ }
+
+ uno::Reference< XControlContainer > xNestedContainer( xControl, uno::UNO_QUERY );
+ if ( xNestedContainer.is() )
+ lcl_ApplyResolverToNestedContainees( xStringResourceResolver, xNestedContainer );
+
+ }
+
+}
+void ControlContainerBase::ImplStartListingForResourceEvents()
+{
+ Reference< resource::XStringResourceResolver > xStringResourceResolver;
+
+ ImplGetPropertyValue( PROPERTY_RESOURCERESOLVER ) >>= xStringResourceResolver;
+
+ // Add our helper as listener to retrieve notifications about changes
+ Reference< util::XModifyListener > rListener( mxListener );
+ ResourceListener* pResourceListener = static_cast< ResourceListener* >( rListener.get() );
+
+ // resource listener will stop listening if resolver reference is empty
+ if ( pResourceListener )
+ pResourceListener->startListening( xStringResourceResolver );
+ ImplUpdateResourceResolver();
+}
+
+void ControlContainerBase::ImplUpdateResourceResolver()
+{
+ rtl::OUString aPropName( PROPERTY_RESOURCERESOLVER );
+ Reference< resource::XStringResourceResolver > xStringResourceResolver;
+
+ ImplGetPropertyValue( aPropName ) >>= xStringResourceResolver;
+ if ( !xStringResourceResolver.is() )
+ return;
+
+ lcl_ApplyResolverToNestedContainees( xStringResourceResolver, this );
+
+ // propagate resource resolver changes to language dependent props of the dialog
+ Reference< XPropertySet > xPropertySet( getModel(), UNO_QUERY );
+ if ( xPropertySet.is() )
+ {
+ Reference< XMultiPropertySet > xMultiPropSet( xPropertySet, UNO_QUERY );
+ Reference< XPropertiesChangeListener > xListener( xPropertySet, UNO_QUERY );
+ xMultiPropSet->firePropertiesChangeEvent( lcl_getLanguageDependentProperties(), xListener );
+ }
+}
+
+
+uno::Reference< graphic::XGraphic > ControlContainerBase::Impl_getGraphicFromURL_nothrow( const ::rtl::OUString& _rURL )
+{
+ uno::Reference< graphic::XGraphic > xGraphic;
+ if ( !_rURL.getLength() )
+ return xGraphic;
+
+ try
+ {
+ uno::Reference< graphic::XGraphicProvider > xProvider;
+ if ( maContext.createComponent( "com.sun.star.graphic.GraphicProvider", xProvider ) )
+ {
+ uno::Sequence< beans::PropertyValue > aMediaProperties(1);
+ aMediaProperties[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) );
+ aMediaProperties[0].Value <<= _rURL;
+ xGraphic = xProvider->queryGraphic( aMediaProperties );
+ }
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+
+ return xGraphic;
+}
+//// ----------------------------------------------------
+//// Helper Method to convert relative url to physical location
+//// ----------------------------------------------------
+
+::rtl::OUString getPhysicalLocation( const ::com::sun::star::uno::Any& rbase, const ::com::sun::star::uno::Any& rUrl )
+{
+
+ ::rtl::OUString baseLocation;
+ ::rtl::OUString url;
+
+ rbase >>= baseLocation;
+ rUrl >>= url;
+
+ ::rtl::OUString absoluteURL( url );
+ if ( url.getLength() > 0 )
+ {
+ INetURLObject urlObj(baseLocation);
+ urlObj.removeSegment();
+ baseLocation = urlObj.GetMainURL( INetURLObject::NO_DECODE );
+
+ const INetURLObject protocolCheck( url );
+ const INetProtocol protocol = protocolCheck.GetProtocol();
+ if ( protocol == INET_PROT_NOT_VALID )
+ {
+ ::rtl::OUString testAbsoluteURL;
+ if ( ::osl::FileBase::E_None == ::osl::FileBase::getAbsoluteFileURL( baseLocation, url, testAbsoluteURL ) )
+ absoluteURL = testAbsoluteURL;
+ }
+ }
+
+ return absoluteURL;
+}
+
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx
index ecb4d7765723..8f400ff1945c 100644
--- a/toolkit/source/controls/dialogcontrol.cxx
+++ b/toolkit/source/controls/dialogcontrol.cxx
@@ -35,17 +35,7 @@
#include <toolkit/controls/dialogcontrol.hxx>
#include <toolkit/helper/property.hxx>
#include <toolkit/helper/unopropertyarrayhelper.hxx>
-#include <toolkit/controls/geometrycontrolmodel.hxx>
-#include <toolkit/controls/unocontrols.hxx>
-#include "toolkit/controls/formattedcontrol.hxx"
-#include "toolkit/controls/roadmapcontrol.hxx"
-#ifndef TOOLKIT_INC_TOOLKIT_CONTROLS_TKSCROLLBAR_HXX
-#include "toolkit/controls/tkscrollbar.hxx"
-#endif
#include <toolkit/controls/stdtabcontroller.hxx>
-#include <toolkit/controls/tksimpleanimation.hxx>
-#include <toolkit/controls/tkthrobber.hxx>
-
#include <com/sun/star/awt/PosSize.hpp>
#include <com/sun/star/awt/WindowAttribute.hpp>
#include <com/sun/star/resource/XStringResourceResolver.hpp>
@@ -54,20 +44,14 @@
#include <cppuhelper/typeprovider.hxx>
#include <tools/debug.hxx>
#include <tools/diagnose_ex.h>
-#include <comphelper/processfactory.hxx>
+#include <comphelper/sequence.hxx>
#include <vcl/svapp.hxx>
#include <vcl/outdev.hxx>
-#include <comphelper/types.hxx>
-#include <comphelper/componentcontext.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <vcl/graph.hxx>
#include <vcl/image.hxx>
-
-#include "tree/treecontrol.hxx"
-#include "grid/gridcontrol.hxx"
-
#include <map>
#include <algorithm>
#include <functional>
@@ -81,180 +65,19 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::util;
-using namespace toolkit;
-#define PROPERTY_RESOURCERESOLVER ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ResourceResolver" ))
#define PROPERTY_DIALOGSOURCEURL ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DialogSourceURL" ))
#define PROPERTY_IMAGEURL ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ImageURL" ))
#define PROPERTY_GRAPHIC ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Graphic" ))
-
-//HELPER
+//
+////HELPER
::rtl::OUString getPhysicalLocation( const ::com::sun::star::uno::Any& rbase, const ::com::sun::star::uno::Any& rUrl );
-struct LanguageDependentProp
-{
- const char* pPropName;
- sal_Int32 nPropNameLength;
-};
-
-// ----------------------------------------------------------------------------
-namespace
-{
- static const Sequence< ::rtl::OUString >& lcl_getLanguageDependentProperties()
- {
- static Sequence< ::rtl::OUString > s_aLanguageDependentProperties;
- if ( s_aLanguageDependentProperties.getLength() == 0 )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( s_aLanguageDependentProperties.getLength() == 0 )
- {
- s_aLanguageDependentProperties.realloc( 2 );
- s_aLanguageDependentProperties[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HelpText" ) );
- s_aLanguageDependentProperties[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) );
- // note: properties must be sorted
- }
- }
- return s_aLanguageDependentProperties;
- }
-
- static uno::Reference< graphic::XGraphic > lcl_getGraphicFromURL_nothrow( const ::rtl::OUString& _rURL )
- {
- uno::Reference< graphic::XGraphic > xGraphic;
- if ( !_rURL.getLength() )
- return xGraphic;
-
- try
- {
- ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
- uno::Reference< graphic::XGraphicProvider > xProvider;
- if ( aContext.createComponent( "com.sun.star.graphic.GraphicProvider", xProvider ) )
- {
- uno::Sequence< beans::PropertyValue > aMediaProperties(1);
- aMediaProperties[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) );
- aMediaProperties[0].Value <<= _rURL;
- xGraphic = xProvider->queryGraphic( aMediaProperties );
- }
- }
- catch( const Exception& )
- {
- DBG_UNHANDLED_EXCEPTION();
- }
-
- return xGraphic;
- }
-
-}
-
-// ----------------------------------------------------------------------------
-// functor for disposing a control model
-struct DisposeControlModel : public ::std::unary_function< Reference< XControlModel >, void >
-{
- void operator()( Reference< XControlModel >& _rxModel )
- {
- try
- {
- ::comphelper::disposeComponent( _rxModel );
- }
- catch( const Exception& )
- {
- DBG_ERROR( "DisposeControlModel::(): caught an exception while disposing a component!" );
- }
- }
-};
-
-// ----------------------------------------------------------------------------
-// functor for searching control model by name
-struct FindControlModel : public ::std::unary_function< UnoControlDialogModel::UnoControlModelHolder, bool >
-{
-private:
- const ::rtl::OUString& m_rName;
-
-public:
- FindControlModel( const ::rtl::OUString& _rName ) : m_rName( _rName ) { }
-
- bool operator()( const UnoControlDialogModel::UnoControlModelHolder& _rCompare )
- {
- return ( _rCompare.second == m_rName ) ? true : false;
- }
-};
-
-// ----------------------------------------------------------------------------
-// functor for cloning a control model, and insertion into a target list
-struct CloneControlModel : public ::std::unary_function< UnoControlDialogModel::UnoControlModelHolder, void >
-{
-private:
- UnoControlDialogModel::UnoControlModelHolderList& m_rTargetList;
-
-public:
- CloneControlModel( UnoControlDialogModel::UnoControlModelHolderList& _rTargetList )
- :m_rTargetList( _rTargetList )
- {
- }
-
- void operator()( const UnoControlDialogModel::UnoControlModelHolder& _rSource )
- {
- // clone the source object
- Reference< XCloneable > xCloneSource( _rSource.first, UNO_QUERY );
- Reference< XControlModel > xClone( xCloneSource->createClone(), UNO_QUERY );
- // add to target list
- m_rTargetList.push_back( UnoControlDialogModel::UnoControlModelHolder( xClone, _rSource.second ) );
- }
-};
-
-// ----------------------------------------------------------------------------
-// functor for comparing a XControlModel with a given reference
-struct CompareControlModel : public ::std::unary_function< UnoControlDialogModel::UnoControlModelHolder, bool >
-{
-private:
- Reference< XControlModel > m_xReference;
-public:
- CompareControlModel( const Reference< XControlModel >& _rxReference ) : m_xReference( _rxReference ) { }
-
- bool operator()( const UnoControlDialogModel::UnoControlModelHolder& _rCompare )
- {
- return ( _rCompare.first.get() == m_xReference.get() ) ? true : false;
- }
-};
-
-// ----------------------------------------------------------------------------
-static void lcl_throwIllegalArgumentException( )
-{ // throwing is expensive (in terms of code size), thus we hope the compiler does not inline this ....
- throw IllegalArgumentException();
-}
-
-// ----------------------------------------------------------------------------
-static void lcl_throwNoSuchElementException( )
-{ // throwing is expensive (in terms of code size), thus we hope the compiler does not inline this ....
- throw NoSuchElementException();
-}
-
-// ----------------------------------------------------------------------------
-static void lcl_throwElementExistException( )
-{ // throwing is expensive (in terms of code size), thus we hope the compiler does not inline this ....
- throw ElementExistException();
-}
-
-// ----------------------------------------------------------------------------
-static const ::rtl::OUString& getTabIndexPropertyName( )
-{
- static const ::rtl::OUString s_sTabIndexProperty( RTL_CONSTASCII_USTRINGPARAM( "TabIndex" ) );
- return s_sTabIndexProperty;
-}
-
-// ----------------------------------------------------------------------------
-static const ::rtl::OUString& getStepPropertyName( )
-{
- static const ::rtl::OUString s_sStepProperty( RTL_CONSTASCII_USTRINGPARAM( "Step" ) );
- return s_sStepProperty;
-}
-
// ----------------------------------------------------
// class UnoControlDialogModel
// ----------------------------------------------------
-UnoControlDialogModel::UnoControlDialogModel()
- :maContainerListeners( *this )
- ,maChangeListeners ( GetMutex() )
- ,mbGroupsUpToDate( sal_False )
+UnoControlDialogModel::UnoControlDialogModel( const Reference< XMultiServiceFactory >& i_factory )
+ :ControlModelContainerBase( i_factory )
{
ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR );
// ImplRegisterProperty( BASEPROPERTY_BORDER );
@@ -279,36 +102,25 @@ UnoControlDialogModel::UnoControlDialogModel()
}
UnoControlDialogModel::UnoControlDialogModel( const UnoControlDialogModel& rModel )
- : UnoControlDialogModel_IBase( rModel )
- , UnoControlDialogModel_Base( rModel )
- , maContainerListeners( *this )
- , maChangeListeners ( GetMutex() )
- , mbGroupsUpToDate( sal_False )
+ : ControlModelContainerBase( rModel )
{
}
UnoControlDialogModel::~UnoControlDialogModel()
{
- maModels.clear();
- mbGroupsUpToDate = sal_False;
}
-Any UnoControlDialogModel::queryAggregation( const Type & rType ) throw(RuntimeException)
+UnoControlModel* UnoControlDialogModel::Clone() const
{
- Any aRet( UnoControlDialogModel_IBase::queryInterface( rType ) );
- return (aRet.hasValue() ? aRet : UnoControlDialogModel_Base::queryAggregation( rType ));
-}
+ // clone the container itself
+ UnoControlDialogModel* pClone = new UnoControlDialogModel( *this );
-// XTypeProvider
-IMPL_IMPLEMENTATION_ID( UnoControlDialogModel )
-Sequence< Type > UnoControlDialogModel::getTypes() throw(RuntimeException)
-{
- return ::comphelper::concatSequences(
- UnoControlDialogModel_IBase::getTypes(),
- UnoControlDialogModel_Base::getTypes()
- );
+ Clone_Impl(*pClone);
+
+ return pClone;
}
+
::rtl::OUString UnoControlDialogModel::getServiceName( ) throw(RuntimeException)
{
return ::rtl::OUString::createFromAscii( szServiceName_UnoControlDialogModel );
@@ -341,42 +153,6 @@ Any UnoControlDialogModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
return *pHelper;
}
-void SAL_CALL UnoControlDialogModel::dispose( ) throw(RuntimeException)
-{
- // ====================================================================
- // tell our listeners
- {
- ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
-
- EventObject aDisposeEvent;
- aDisposeEvent.Source = static_cast< XAggregation* >( static_cast< ::cppu::OWeakAggObject* >( this ) );
-
- maContainerListeners.disposeAndClear( aDisposeEvent );
- maChangeListeners.disposeAndClear( aDisposeEvent );
- }
-
- // ====================================================================
- // call the base class
- UnoControlModel::dispose();
-
- // ====================================================================
- // dispose our child models
- // for this, collect the models (we collect them from maModels, and this is modified when disposing children)
- ::std::vector< Reference< XControlModel > > aChildModels( maModels.size() );
-
- ::std::transform(
- maModels.begin(), maModels.end(), // source range
- aChildModels.begin(), // target location
- ::std::select1st< UnoControlModelHolder >( ) // operation to apply -> select the XControlModel part
- );
-
- // now dispose
- ::std::for_each( aChildModels.begin(), aChildModels.end(), DisposeControlModel() );
- aChildModels.clear();
-
- mbGroupsUpToDate = sal_False;
-}
-
// XMultiPropertySet
Reference< XPropertySetInfo > UnoControlDialogModel::getPropertySetInfo( ) throw(RuntimeException)
{
@@ -384,961 +160,21 @@ Reference< XPropertySetInfo > UnoControlDialogModel::getPropertySetInfo( ) thro
return xInfo;
}
-UnoControlModel* UnoControlDialogModel::Clone() const
-{
- // clone the container itself
- UnoControlDialogModel* pClone = new UnoControlDialogModel( *this );
-
- // clone all children
- ::std::for_each(
- maModels.begin(), maModels.end(),
- CloneControlModel( pClone->maModels )
- );
-
- return pClone;
-}
-
-UnoControlDialogModel::UnoControlModelHolderList::iterator UnoControlDialogModel::ImplFindElement( const ::rtl::OUString& rName )
-{
- return ::std::find_if( maModels.begin(), maModels.end(), FindControlModel( rName ) );
-}
-
-// ::XMultiServiceFactory
-Reference< XInterface > UnoControlDialogModel::createInstance( const ::rtl::OUString& aServiceSpecifier ) throw(Exception, RuntimeException)
-{
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-
- OGeometryControlModel_Base* pNewModel = NULL;
-
- if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlEditModel ) == 0 )
- pNewModel = new OGeometryControlModel< UnoControlEditModel >;
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlFormattedFieldModel ) == 0 )
- pNewModel = new OGeometryControlModel< UnoControlFormattedFieldModel >;
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlFileControlModel ) == 0 )
- pNewModel = new OGeometryControlModel< UnoControlFileControlModel >;
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlButtonModel ) == 0 )
- pNewModel = new OGeometryControlModel< UnoControlButtonModel >;
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlImageControlModel ) == 0 )
- pNewModel = new OGeometryControlModel< UnoControlImageControlModel >;
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlRadioButtonModel ) == 0 )
- pNewModel = new OGeometryControlModel< UnoControlRadioButtonModel >;
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlCheckBoxModel ) == 0 )
- pNewModel = new OGeometryControlModel< UnoControlCheckBoxModel >;
- else if ( aServiceSpecifier.compareToAscii( szServiceName_UnoControlFixedHyperlinkModel ) == 0 )
- pNewModel = new OGeometryControlModel< UnoControlFixedHyperlinkModel >;
- else if ( aServiceSpecifier.compareToAscii( szServiceName_UnoControlFixedTextModel ) == 0 )
- pNewModel = new OGeometryControlModel< UnoControlFixedTextModel >;
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlGroupBoxModel ) == 0 )
- pNewModel = new OGeometryControlModel< UnoControlGroupBoxModel >;
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlListBoxModel ) == 0 )
- pNewModel = new OGeometryControlModel< UnoControlListBoxModel >;
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlComboBoxModel ) == 0 )
- pNewModel = new OGeometryControlModel< UnoControlComboBoxModel >;
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlDateFieldModel ) == 0 )
- pNewModel = new OGeometryControlModel< UnoControlDateFieldModel >;
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlTimeFieldModel ) == 0 )
- pNewModel = new OGeometryControlModel< UnoControlTimeFieldModel >;
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlNumericFieldModel ) == 0 )
- pNewModel = new OGeometryControlModel< UnoControlNumericFieldModel >;
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlCurrencyFieldModel ) == 0 )
- pNewModel = new OGeometryControlModel< UnoControlCurrencyFieldModel >;
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlPatternFieldModel ) == 0 )
- pNewModel = new OGeometryControlModel< UnoControlPatternFieldModel >;
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlProgressBarModel ) == 0 )
- pNewModel = new OGeometryControlModel< UnoControlProgressBarModel >;
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlScrollBarModel ) == 0 )
- pNewModel = new OGeometryControlModel< UnoControlScrollBarModel >;
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlFixedLineModel ) == 0 )
- pNewModel = new OGeometryControlModel< UnoControlFixedLineModel >;
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlRoadmapModel ) == 0 )
- pNewModel = new OGeometryControlModel< UnoControlRoadmapModel >;
- else if ( aServiceSpecifier.compareToAscii( szServiceName_TreeControlModel ) == 0 )
- pNewModel = new OGeometryControlModel< UnoTreeModel >;
- else if ( aServiceSpecifier.compareToAscii( szServiceName_GridControlModel ) == 0 )
- pNewModel = new OGeometryControlModel< UnoGridModel >;
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoSimpleAnimationControlModel ) == 0 )
- pNewModel = new OGeometryControlModel< UnoSimpleAnimationControlModel >;
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoThrobberControlModel ) == 0 )
- pNewModel = new OGeometryControlModel< UnoThrobberControlModel >;
-
- if ( !pNewModel )
- {
- Reference< XMultiServiceFactory > xORB( ::comphelper::getProcessServiceFactory() );
- if ( xORB.is() )
- {
- Reference< XInterface > xObject = xORB->createInstance( aServiceSpecifier );
- Reference< XServiceInfo > xSI( xObject, UNO_QUERY );
- Reference< XCloneable > xCloneAccess( xSI, UNO_QUERY );
- Reference< XAggregation > xAgg( xCloneAccess, UNO_QUERY );
- if ( xAgg.is() )
- {
- if ( xSI->supportsService( ::rtl::OUString::createFromAscii( "com.sun.star.awt.UnoControlModel" ) ) )
- {
- // release 3 of the 4 references we have to the object
- xAgg.clear();
- xSI.clear();
- xObject.clear();
-
- pNewModel = new OCommonGeometryControlModel( xCloneAccess, aServiceSpecifier );
- }
- }
- }
- }
-
- Reference< XInterface > xNewModel = (::cppu::OWeakObject*)pNewModel;
- return xNewModel;
-}
-
-Reference< XInterface > UnoControlDialogModel::createInstanceWithArguments( const ::rtl::OUString& ServiceSpecifier, const Sequence< Any >& /* Arguments */ ) throw(Exception, RuntimeException)
-{
- return createInstance( ServiceSpecifier );
-}
-
-Sequence< ::rtl::OUString > UnoControlDialogModel::getAvailableServiceNames() throw(RuntimeException)
-{
- static Sequence< ::rtl::OUString >* pNamesSeq = NULL;
- if ( !pNamesSeq )
- {
- pNamesSeq = new Sequence< ::rtl::OUString >( 24 );
- ::rtl::OUString* pNames = pNamesSeq->getArray();
- pNames[0] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlEditModel );
- pNames[1] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlFormattedFieldModel );
- pNames[2] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlFileControlModel );
- pNames[3] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlButtonModel );
- pNames[4] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlImageControlModel );
- pNames[5] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlRadioButtonModel );
- pNames[6] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlCheckBoxModel );
- pNames[7] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlFixedTextModel );
- pNames[8] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlGroupBoxModel );
- pNames[9] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlListBoxModel );
- pNames[10] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlComboBoxModel );
- pNames[11] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlDateFieldModel );
- pNames[12] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlTimeFieldModel );
- pNames[13] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlNumericFieldModel );
- pNames[14] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlCurrencyFieldModel );
- pNames[15] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlPatternFieldModel );
- pNames[16] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlProgressBarModel );
- pNames[17] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlScrollBarModel );
- pNames[18] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlFixedLineModel );
- pNames[19] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlRoadmapModel );
- pNames[20] = ::rtl::OUString::createFromAscii( szServiceName_TreeControlModel );
- pNames[21] = ::rtl::OUString::createFromAscii( szServiceName_GridControlModel );
- pNames[22] = ::rtl::OUString::createFromAscii( szServiceName2_UnoSimpleAnimationControlModel );
- pNames[23] = ::rtl::OUString::createFromAscii( szServiceName2_UnoThrobberControlModel );
- }
- return *pNamesSeq;
-}
-
-// XContainer
-void UnoControlDialogModel::addContainerListener( const Reference< XContainerListener >& l ) throw(RuntimeException)
-{
- maContainerListeners.addInterface( l );
-}
-
-void UnoControlDialogModel::removeContainerListener( const Reference< XContainerListener >& l ) throw(RuntimeException)
-{
- maContainerListeners.removeInterface( l );
-}
-
-// XElementAcces
-Type UnoControlDialogModel::getElementType() throw(RuntimeException)
-{
- Type aType = getCppuType( ( Reference< XControlModel>* ) NULL );
- return aType;
-}
-
-sal_Bool UnoControlDialogModel::hasElements() throw(RuntimeException)
-{
- return !maModels.empty();
-}
-
-// XNameContainer, XNameReplace, XNameAccess
-void UnoControlDialogModel::replaceByName( const ::rtl::OUString& aName, const Any& aElement ) throw(IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException)
-{
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-
- Reference< XControlModel > xNewModel;
- aElement >>= xNewModel;
- if ( !xNewModel.is() )
- lcl_throwIllegalArgumentException();
-
- UnoControlModelHolderList::iterator aElementPos = ImplFindElement( aName );
- if ( maModels.end() == aElementPos )
- lcl_throwNoSuchElementException();
-
- // stop listening at the old model
- stopControlListening( aElementPos->first );
- Reference< XControlModel > xReplaced( aElementPos->first );
- // remember the new model, and start listening
- aElementPos->first = xNewModel;
- startControlListening( xNewModel );
-
- ContainerEvent aEvent;
- aEvent.Source = *this;
- aEvent.Element = aElement;
- aEvent.ReplacedElement <<= xReplaced;
- aEvent.Accessor <<= aName;
-
- // notify the container listener
- maContainerListeners.elementReplaced( aEvent );
-
- // our "tab controller model" has potentially changed -> notify this
- implNotifyTabModelChange( aName );
-}
-
-Any UnoControlDialogModel::getByName( const ::rtl::OUString& aName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException)
-{
- UnoControlModelHolderList::iterator aElementPos = ImplFindElement( aName );
- if ( maModels.end() == aElementPos )
- lcl_throwNoSuchElementException();
-
- return makeAny( aElementPos->first );
-}
-
-Sequence< ::rtl::OUString > UnoControlDialogModel::getElementNames() throw(RuntimeException)
-{
- Sequence< ::rtl::OUString > aNames( maModels.size() );
-
- ::std::transform(
- maModels.begin(), maModels.end(), // source range
- aNames.getArray(), // target range
- ::std::select2nd< UnoControlModelHolder >() // operator to apply: select the second element (the name)
- );
-
- return aNames;
-}
-
-sal_Bool UnoControlDialogModel::hasByName( const ::rtl::OUString& aName ) throw(RuntimeException)
-{
- return maModels.end() != ImplFindElement( aName );
-}
-
-void UnoControlDialogModel::insertByName( const ::rtl::OUString& aName, const Any& aElement ) throw(IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException)
-{
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-
- Reference< XControlModel > xM;
- aElement >>= xM;
-
- if ( xM.is() )
- {
- Reference< beans::XPropertySet > xProps( xM, UNO_QUERY );
- if ( xProps.is() )
- {
-
- Reference< beans::XPropertySetInfo > xPropInfo = xProps.get()->getPropertySetInfo();
-
- ::rtl::OUString sImageSourceProperty = GetPropertyName( BASEPROPERTY_IMAGEURL );
- if ( xPropInfo.get()->hasPropertyByName( sImageSourceProperty ))
- {
- Any aUrl = xProps.get()->getPropertyValue( sImageSourceProperty );
-
- ::rtl::OUString absoluteUrl =
- getPhysicalLocation( getPropertyValue( GetPropertyName( BASEPROPERTY_DIALOGSOURCEURL ) ), aUrl );
-
- aUrl <<= absoluteUrl;
-
- xProps.get()->setPropertyValue( sImageSourceProperty , aUrl );
- }
- }
- }
-
-
-
- if ( !aName.getLength() || !xM.is() )
- lcl_throwIllegalArgumentException();
-
- UnoControlModelHolderList::iterator aElementPos = ImplFindElement( aName );
- if ( maModels.end() != aElementPos )
- lcl_throwElementExistException();
-
- maModels.push_back( UnoControlModelHolder( xM, aName ) );
- mbGroupsUpToDate = sal_False;
- startControlListening( xM );
-
- ContainerEvent aEvent;
- aEvent.Source = *this;
- aEvent.Element <<= aElement;
- aEvent.Accessor <<= aName;
- maContainerListeners.elementInserted( aEvent );
-
- // our "tab controller model" has potentially changed -> notify this
- implNotifyTabModelChange( aName );
-}
-
-void UnoControlDialogModel::removeByName( const ::rtl::OUString& aName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException)
-{
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-
- UnoControlModelHolderList::iterator aElementPos = ImplFindElement( aName );
- if ( maModels.end() == aElementPos )
- lcl_throwNoSuchElementException();
-
- ContainerEvent aEvent;
- aEvent.Source = *this;
- aEvent.Element <<= aElementPos->first;
- aEvent.Accessor <<= aName;
- maContainerListeners.elementRemoved( aEvent );
-
- stopControlListening( aElementPos->first );
- Reference< XPropertySet > xPS( aElementPos->first, UNO_QUERY );
- maModels.erase( aElementPos );
- mbGroupsUpToDate = sal_False;
-
- if ( xPS.is() )
- try
- {
- xPS->setPropertyValue( PROPERTY_RESOURCERESOLVER, makeAny( Reference< resource::XStringResourceResolver >() ) );
- }
- catch( const Exception& ) { DBG_UNHANDLED_EXCEPTION(); }
-
- // our "tab controller model" has potentially changed -> notify this
- implNotifyTabModelChange( aName );
-}
-
-// ----------------------------------------------------------------------------
-sal_Bool SAL_CALL UnoControlDialogModel::getGroupControl( ) throw (RuntimeException)
-{
- return sal_True;
-}
-
-// ----------------------------------------------------------------------------
-void SAL_CALL UnoControlDialogModel::setGroupControl( sal_Bool ) throw (RuntimeException)
-{
- DBG_ERROR( "UnoControlDialogModel::setGroupControl: explicit grouping not supported" );
-}
-
-// ----------------------------------------------------------------------------
-void SAL_CALL UnoControlDialogModel::setControlModels( const Sequence< Reference< XControlModel > >& _rControls ) throw (RuntimeException)
-{
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-
- // set the tab indexes according to the order of models in the sequence
- const Reference< XControlModel >* pControls = _rControls.getConstArray( );
- const Reference< XControlModel >* pControlsEnd = _rControls.getConstArray( ) + _rControls.getLength();
-
- sal_Int16 nTabIndex = 1;
-
- for ( ; pControls != pControlsEnd; ++pControls )
- {
- // look up the control in our own structure. This is to prevent invalid arguments
- UnoControlModelHolderList::const_iterator aPos =
- ::std::find_if(
- maModels.begin(), maModels.end(),
- CompareControlModel( *pControls )
- );
- if ( maModels.end() != aPos )
- {
- // okay, this is an existent model
- // now set the TabIndex property (if applicable)
- Reference< XPropertySet > xProps( aPos->first, UNO_QUERY );
- Reference< XPropertySetInfo > xPSI;
- if ( xProps.is() )
- xPSI = xProps->getPropertySetInfo();
- if ( xPSI.is() && xPSI->hasPropertyByName( getTabIndexPropertyName() ) )
- xProps->setPropertyValue( getTabIndexPropertyName(), makeAny( nTabIndex++ ) );
- }
- mbGroupsUpToDate = sal_False;
- }
-}
-
-
-typedef ::std::multimap< sal_Int32, Reference< XControlModel >, ::std::less< sal_Int32 > > MapIndexToModel;
-
-// ----------------------------------------------------------------------------
-Sequence< Reference< XControlModel > > SAL_CALL UnoControlDialogModel::getControlModels( ) throw (RuntimeException)
-{
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-
- MapIndexToModel aSortedModels;
- // will be the sorted container of all models which have a tab index property
- ::std::vector< Reference< XControlModel > > aUnindexedModels;
- // will be the container of all models which do not have a tab index property
-
- UnoControlModelHolderList::const_iterator aLoop = maModels.begin();
- for ( ; aLoop != maModels.end(); ++aLoop )
- {
- Reference< XControlModel > xModel( aLoop->first );
-
- // see if the model has a TabIndex property
- Reference< XPropertySet > xControlProps( xModel, UNO_QUERY );
- Reference< XPropertySetInfo > xPSI;
- if ( xControlProps.is() )
- xPSI = xControlProps->getPropertySetInfo( );
- DBG_ASSERT( xPSI.is(), "UnoControlDialogModel::getControlModels: invalid child model!" );
-
- // has it?
- if ( xPSI.is() && xPSI->hasPropertyByName( getTabIndexPropertyName() ) )
- { // yes
- sal_Int32 nTabIndex = -1;
- xControlProps->getPropertyValue( getTabIndexPropertyName() ) >>= nTabIndex;
-
- aSortedModels.insert( MapIndexToModel::value_type( nTabIndex, xModel ) );
- }
- else if ( xModel.is() )
- // no, it hasn't, but we have to include it, anyway
- aUnindexedModels.push_back( xModel );
- }
-
- // okay, here we have a container of all our models, sorted by tab index,
- // plus a container of "unindexed" models
- // -> merge them
- Sequence< Reference< XControlModel > > aReturn( aUnindexedModels.size() + aSortedModels.size() );
- ::std::transform(
- aSortedModels.begin(), aSortedModels.end(),
- ::std::copy( aUnindexedModels.begin(), aUnindexedModels.end(), aReturn.getArray() ),
- ::std::select2nd< MapIndexToModel::value_type >( )
- );
-
- return aReturn;
-}
-
-// ----------------------------------------------------------------------------
-void SAL_CALL UnoControlDialogModel::setGroup( const Sequence< Reference< XControlModel > >&, const ::rtl::OUString& ) throw (RuntimeException)
-{
- // not supported. We have only implicit grouping:
- // We only have a sequence of control models, and we _know_ (yes, that's a HACK relying on
- // implementation details) that VCL does grouping according to the order of controls automatically
- // At least VCL does this for all we're interested in: Radio buttons.
- DBG_ERROR( "UnoControlDialogModel::setGroup: grouping not supported" );
-}
-
-// ----------------------------------------------------------------------------
-namespace
-{
- enum GroupingMachineState
- {
- eLookingForGroup,
- eExpandingGroup
- };
-
- // ........................................................................
- static sal_Int32 lcl_getDialogStep( const Reference< XControlModel >& _rxModel )
- {
- sal_Int32 nStep = 0;
- try
- {
- Reference< XPropertySet > xModelProps( _rxModel, UNO_QUERY );
- xModelProps->getPropertyValue( getStepPropertyName() ) >>= nStep;
- }
- catch( const Exception& )
- {
- DBG_ERROR( "lcl_getDialogStep: caught an exception while determining the dialog page!" );
- }
- return nStep;
- }
-}
-
-// ----------------------------------------------------------------------------
-sal_Int32 SAL_CALL UnoControlDialogModel::getGroupCount( ) throw (RuntimeException)
-{
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-
- implUpdateGroupStructure();
-
- return maGroups.size();
-}
-
-// ----------------------------------------------------------------------------
-void SAL_CALL UnoControlDialogModel::getGroup( sal_Int32 _nGroup, Sequence< Reference< XControlModel > >& _rGroup, ::rtl::OUString& _rName ) throw (RuntimeException)
-{
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-
- implUpdateGroupStructure();
-
- if ( ( _nGroup < 0 ) || ( _nGroup >= (sal_Int32)maGroups.size() ) )
- {
- DBG_ERROR( "UnoControlDialogModel::getGroup: invalid argument and I am not allowed to throw an exception!" );
- _rGroup.realloc( 0 );
- _rName = ::rtl::OUString();
- }
- else
- {
- AllGroups::const_iterator aGroupPos = maGroups.begin() + _nGroup;
- _rGroup.realloc( aGroupPos->size() );
- // copy the models
- ::std::copy( aGroupPos->begin(), aGroupPos->end(), _rGroup.getArray() );
- // give the group a name
- _rName = ::rtl::OUString::valueOf( _nGroup );
- }
-}
-
-// ----------------------------------------------------------------------------
-void SAL_CALL UnoControlDialogModel::getGroupByName( const ::rtl::OUString& _rName, Sequence< Reference< XControlModel > >& _rGroup ) throw (RuntimeException)
-{
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-
- ::rtl::OUString sDummyName;
- getGroup( _rName.toInt32( ), _rGroup, sDummyName );
-}
-
-// ----------------------------------------------------------------------------
-void SAL_CALL UnoControlDialogModel::addChangesListener( const Reference< XChangesListener >& _rxListener ) throw (RuntimeException)
-{
- maChangeListeners.addInterface( _rxListener );
-}
-
-// ----------------------------------------------------------------------------
-void SAL_CALL UnoControlDialogModel::removeChangesListener( const Reference< XChangesListener >& _rxListener ) throw (RuntimeException)
-{
- maChangeListeners.removeInterface( _rxListener );
-}
-
-// ----------------------------------------------------------------------------
-void UnoControlDialogModel::implNotifyTabModelChange( const ::rtl::OUString& _rAccessor )
-{
- // multiplex to our change listeners:
- // the changes event
- ChangesEvent aEvent;
- aEvent.Source = *this;
- aEvent.Base <<= aEvent.Source; // the "base of the changes root" is also ourself
- aEvent.Changes.realloc( 1 ); // exactly one change
- aEvent.Changes[ 0 ].Accessor <<= _rAccessor;
-
-
- Sequence< Reference< XInterface > > aChangeListeners( maChangeListeners.getElements() );
- const Reference< XInterface >* pListener = aChangeListeners.getConstArray();
- const Reference< XInterface >* pListenerEnd = aChangeListeners.getConstArray() + aChangeListeners.getLength();
- for ( ; pListener != pListenerEnd; ++pListener )
- {
- if ( pListener->is() )
- static_cast< XChangesListener* >( pListener->get() )->changesOccurred( aEvent );
- }
-}
-
-
-// ----------------------------------------------------------------------------
-void UnoControlDialogModel::implUpdateGroupStructure()
-{
- if ( mbGroupsUpToDate )
- // nothing to do
- return;
-
- // conditions for a group:
- // * all elements of the group are radio buttons
- // * all elements of the group are on the same dialog page
- // * in the overall control order (determined by the tab index), all elements are subsequent
-
- maGroups.clear();
-
- Sequence< Reference< XControlModel > > aControlModels = getControlModels();
- const Reference< XControlModel >* pControlModels = aControlModels.getConstArray();
- const Reference< XControlModel >* pControlModelsEnd = pControlModels + aControlModels.getLength();
-
- // in extreme we have as much groups as controls
- maGroups.reserve( aControlModels.getLength() );
-
- GroupingMachineState eState = eLookingForGroup; // the current state of our machine
- Reference< XServiceInfo > xModelSI; // for checking for a radion button
- AllGroups::iterator aCurrentGroup = maGroups.end(); // the group which we're currently building
- sal_Int32 nCurrentGroupStep = -1; // the step which all controls of the current group belong to
- sal_Bool bIsRadioButton; // is it a radio button?
-
-#if OSL_DEBUG_LEVEL > 1
- ::std::vector< ::rtl::OUString > aCurrentGroupLabels;
-#endif
-
- for ( ; pControlModels != pControlModelsEnd; ++pControlModels )
- {
- // we'll need this in every state
- xModelSI = xModelSI.query( *pControlModels );
- bIsRadioButton = xModelSI.is() && xModelSI->supportsService( ::rtl::OUString::createFromAscii( szServiceName2_UnoControlRadioButtonModel ) );
-
- switch ( eState )
- {
- case eLookingForGroup:
- {
- if ( !bIsRadioButton )
- // this is no radio button -> still looking for the beginning of a group
- continue;
- // the current model is a radio button
- // -> we found the beginning of a new group
- // create the place for this group
- size_t nGroups = maGroups.size();
- maGroups.resize( nGroups + 1 );
- aCurrentGroup = maGroups.begin() + nGroups;
- // and add the (only, til now) member
- aCurrentGroup->push_back( *pControlModels );
-
- // get the step which all controls of this group now have to belong to
- nCurrentGroupStep = lcl_getDialogStep( *pControlModels );
- // new state: looking for further members
- eState = eExpandingGroup;
-
-#if OSL_DEBUG_LEVEL > 1
- Reference< XPropertySet > xModelProps( *pControlModels, UNO_QUERY );
- ::rtl::OUString sLabel;
- if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName( ::rtl::OUString::createFromAscii( "Label" ) ) )
- xModelProps->getPropertyValue( ::rtl::OUString::createFromAscii( "Label" ) ) >>= sLabel;
- aCurrentGroupLabels.push_back( sLabel );
-#endif
- }
- break;
-
- case eExpandingGroup:
- {
- if ( !bIsRadioButton )
- { // no radio button -> the group is done
- aCurrentGroup = maGroups.end();
- eState = eLookingForGroup;
-#if OSL_DEBUG_LEVEL > 1
- aCurrentGroupLabels.clear();
-#endif
- continue;
- }
-
- // it is a radio button - is it on the proper page?
- const sal_Int32 nThisModelStep = lcl_getDialogStep( *pControlModels );
- if ( ( nThisModelStep == nCurrentGroupStep ) // the current button is on the same dialog page
- || ( 0 == nThisModelStep ) // the current button appears on all pages
- )
- {
- // -> it belongs to the same group
- aCurrentGroup->push_back( *pControlModels );
- // state still is eExpandingGroup - we're looking for further elements
- eState = eExpandingGroup;
-
-#if OSL_DEBUG_LEVEL > 1
- Reference< XPropertySet > xModelProps( *pControlModels, UNO_QUERY );
- ::rtl::OUString sLabel;
- if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName( ::rtl::OUString::createFromAscii( "Label" ) ) )
- xModelProps->getPropertyValue( ::rtl::OUString::createFromAscii( "Label" ) ) >>= sLabel;
- aCurrentGroupLabels.push_back( sLabel );
-#endif
- continue;
- }
-
- // it's a radio button, but on a different page
- // -> we open a new group for it
-
- // close the old group
- aCurrentGroup = maGroups.end();
-#if OSL_DEBUG_LEVEL > 1
- aCurrentGroupLabels.clear();
-#endif
-
- // open a new group
- size_t nGroups = maGroups.size();
- maGroups.resize( nGroups + 1 );
- aCurrentGroup = maGroups.begin() + nGroups;
- // and add the (only, til now) member
- aCurrentGroup->push_back( *pControlModels );
-
- nCurrentGroupStep = nThisModelStep;
-
- // state is the same: we still are looking for further elements of the current group
- eState = eExpandingGroup;
-#if OSL_DEBUG_LEVEL > 1
- Reference< XPropertySet > xModelProps( *pControlModels, UNO_QUERY );
- ::rtl::OUString sLabel;
- if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName( ::rtl::OUString::createFromAscii( "Label" ) ) )
- xModelProps->getPropertyValue( ::rtl::OUString::createFromAscii( "Label" ) ) >>= sLabel;
- aCurrentGroupLabels.push_back( sLabel );
-#endif
- }
- break;
- }
- }
-
- mbGroupsUpToDate = sal_True;
-}
-
-// ----------------------------------------------------------------------------
-void SAL_CALL UnoControlDialogModel::propertyChange( const PropertyChangeEvent& _rEvent ) throw (RuntimeException)
-{
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-
- DBG_ASSERT( 0 == _rEvent.PropertyName.compareToAscii( "TabIndex" ),
- "UnoControlDialogModel::propertyChange: not listening for this property!" );
-
- // the accessor for the changed element
- ::rtl::OUString sAccessor;
- UnoControlModelHolderList::const_iterator aPos =
- ::std::find_if(
- maModels.begin(), maModels.end(),
- CompareControlModel( Reference< XControlModel >( _rEvent.Source, UNO_QUERY ) )
- );
- OSL_ENSURE( maModels.end() != aPos, "UnoControlDialogModel::propertyChange: don't know this model!" );
- if ( maModels.end() != aPos )
- sAccessor = aPos->second;
-
- // our groups are not up-to-date
- mbGroupsUpToDate = sal_False;
-
- // notify
- implNotifyTabModelChange( sAccessor );
-}
-
-// ----------------------------------------------------------------------------
-void SAL_CALL UnoControlDialogModel::disposing( const EventObject& /*rEvent*/ ) throw (RuntimeException)
-{
-}
-
-// ----------------------------------------------------------------------------
-void UnoControlDialogModel::startControlListening( const Reference< XControlModel >& _rxChildModel )
-{
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-
- Reference< XPropertySet > xModelProps( _rxChildModel, UNO_QUERY );
- Reference< XPropertySetInfo > xPSI;
- if ( xModelProps.is() )
- xPSI = xModelProps->getPropertySetInfo();
-
- if ( xPSI.is() && xPSI->hasPropertyByName( getTabIndexPropertyName() ) )
- xModelProps->addPropertyChangeListener( getTabIndexPropertyName(), this );
-}
-
-// ----------------------------------------------------------------------------
-void UnoControlDialogModel::stopControlListening( const Reference< XControlModel >& _rxChildModel )
-{
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-
- Reference< XPropertySet > xModelProps( _rxChildModel, UNO_QUERY );
- Reference< XPropertySetInfo > xPSI;
- if ( xModelProps.is() )
- xPSI = xModelProps->getPropertySetInfo();
-
- if ( xPSI.is() && xPSI->hasPropertyByName( getTabIndexPropertyName() ) )
- xModelProps->removePropertyChangeListener( getTabIndexPropertyName(), this );
-}
-
-// ============================================================================
-// = class ResourceListener
-// ============================================================================
-
-ResourceListener::ResourceListener(
- const Reference< util::XModifyListener >& rListener ) :
- OWeakObject(),
- m_xListener( rListener ),
- m_bListening( false )
-{
-}
-
-ResourceListener::~ResourceListener()
-{
-}
-
-// XInterface
-Any SAL_CALL ResourceListener::queryInterface( const Type& rType )
-throw ( RuntimeException )
-{
- Any a = ::cppu::queryInterface(
- rType ,
- static_cast< XModifyListener* >( this ),
- static_cast< XEventListener* >( this ));
-
- if ( a.hasValue() )
- return a;
-
- return OWeakObject::queryInterface( rType );
-}
-
-void SAL_CALL ResourceListener::acquire() throw ()
-{
- OWeakObject::acquire();
-}
-
-void SAL_CALL ResourceListener::release() throw ()
-{
- OWeakObject::release();
-}
-
-void ResourceListener::startListening(
- const Reference< resource::XStringResourceResolver >& rResource )
-{
- Reference< util::XModifyBroadcaster > xModifyBroadcaster( rResource, UNO_QUERY );
-
- {
- // --- SAFE ---
- ::osl::ResettableGuard < ::osl::Mutex > aGuard( m_aMutex );
- bool bListening( m_bListening );
- bool bResourceSet( m_xResource.is() );
- aGuard.clear();
- // --- SAFE ---
-
- if ( bListening && bResourceSet )
- stopListening();
-
- // --- SAFE ---
- aGuard.reset();
- m_xResource = rResource;
- aGuard.clear();
- // --- SAFE ---
- }
-
- Reference< util::XModifyListener > xThis( static_cast<OWeakObject*>( this ), UNO_QUERY );
- if ( xModifyBroadcaster.is() )
- {
- try
- {
- xModifyBroadcaster->addModifyListener( xThis );
-
- // --- SAFE ---
- ::osl::ResettableGuard < ::osl::Mutex > aGuard( m_aMutex );
- m_bListening = true;
- // --- SAFE ---
- }
- catch ( RuntimeException& )
- {
- throw;
- }
- catch ( Exception& )
- {
- }
- }
-}
-
-void ResourceListener::stopListening()
-{
- Reference< util::XModifyBroadcaster > xModifyBroadcaster;
-
- // --- SAFE ---
- ::osl::ResettableGuard < ::osl::Mutex > aGuard( m_aMutex );
- if ( m_bListening && m_xResource.is() )
- xModifyBroadcaster = Reference< util::XModifyBroadcaster >( m_xResource, UNO_QUERY );
- aGuard.clear();
- // --- SAFE ---
-
- Reference< util::XModifyListener > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY );
- if ( xModifyBroadcaster.is() )
- {
- try
- {
- // --- SAFE ---
- aGuard.reset();
- m_bListening = false;
- m_xResource.clear();
- aGuard.clear();
- // --- SAFE ---
-
- xModifyBroadcaster->removeModifyListener( xThis );
- }
- catch ( RuntimeException& )
- {
- throw;
- }
- catch ( Exception& )
- {
- }
- }
-}
-
-// XModifyListener
-void SAL_CALL ResourceListener::modified(
- const lang::EventObject& aEvent )
-throw ( RuntimeException )
-{
- Reference< util::XModifyListener > xListener;
-
- // --- SAFE ---
- ::osl::ResettableGuard < ::osl::Mutex > aGuard( m_aMutex );
- xListener = m_xListener;
- aGuard.clear();
- // --- SAFE ---
-
- if ( xListener.is() )
- {
- try
- {
- xListener->modified( aEvent );
- }
- catch ( RuntimeException& )
- {
- throw;
- }
- catch ( Exception& )
- {
- }
- }
-}
-
-// XEventListener
-void SAL_CALL ResourceListener::disposing(
- const EventObject& Source )
-throw ( RuntimeException )
-{
- Reference< lang::XEventListener > xListener;
- Reference< resource::XStringResourceResolver > xResource;
-
- // --- SAFE ---
- ::osl::ResettableGuard < ::osl::Mutex > aGuard( m_aMutex );
- Reference< XInterface > xIfacRes( m_xResource, UNO_QUERY );
- Reference< XInterface > xIfacList( m_xListener, UNO_QUERY );
- aGuard.clear();
- // --- SAFE ---
-
- if ( Source.Source == xIfacRes )
- {
- // --- SAFE ---
- aGuard.reset();
- m_bListening = false;
- xResource = m_xResource;
- xListener = Reference< lang::XEventListener >( m_xListener, UNO_QUERY );
- m_xResource.clear();
- aGuard.clear();
- // --- SAFE ---
-
- if ( xListener.is() )
- {
- try
- {
- xListener->disposing( Source );
- }
- catch ( RuntimeException& )
- {
- throw;
- }
- catch ( Exception& )
- {
- }
- }
- }
- else if ( Source.Source == xIfacList )
- {
- // --- SAFE ---
- aGuard.reset();
- m_bListening = false;
- xListener = Reference< lang::XEventListener >( m_xListener, UNO_QUERY );
- xResource = m_xResource;
- m_xResource.clear();
- m_xListener.clear();
- aGuard.clear();
- // --- SAFE ---
-
- // Remove ourself as listener from resource resolver
- Reference< util::XModifyBroadcaster > xModifyBroadcaster( xResource, UNO_QUERY );
- Reference< util::XModifyListener > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY );
- if ( xModifyBroadcaster.is() )
- {
- try
- {
- xModifyBroadcaster->removeModifyListener( xThis );
- }
- catch ( RuntimeException& )
- {
- throw;
- }
- catch ( Exception& )
- {
- }
- }
- }
-}
-
// ============================================================================
// = class UnoDialogControl
// ============================================================================
-UnoDialogControl::UnoDialogControl() :
- maTopWindowListeners( *this ),
- mbWindowListener(false),
- mbSizeModified(false),
- mbPosModified(false)
+UnoDialogControl::UnoDialogControl( const uno::Reference< lang::XMultiServiceFactory >& i_factory )
+ :ControlContainerBase( i_factory )
+ ,maTopWindowListeners( *this )
+ ,mbWindowListener(false)
{
maComponentInfos.nWidth = 300;
maComponentInfos.nHeight = 450;
- mxListener = new ResourceListener( Reference< util::XModifyListener >(
- static_cast< OWeakObject* >( this ), UNO_QUERY ));
+ }
+
+UnoDialogControl::~UnoDialogControl()
+{
}
::rtl::OUString UnoDialogControl::GetComponentServiceName()
@@ -1355,120 +191,21 @@ UnoDialogControl::UnoDialogControl() :
// XInterface
Any UnoDialogControl::queryAggregation( const Type & rType ) throw(RuntimeException)
{
- Any aRet( UnoDialogControl_IBase::queryInterface( rType ) );
- return (aRet.hasValue() ? aRet : UnoControlContainer::queryAggregation( rType ));
+ uno::Any aRet = ::cppu::queryInterface( rType, SAL_STATIC_CAST( awt::XTopWindow*, this ) );
+ if ( !aRet.hasValue() )
+ aRet = ::cppu::queryInterface( rType, SAL_STATIC_CAST( awt::XDialog*, this ) );
+ if ( !aRet.hasValue() )
+ aRet = ::cppu::queryInterface( rType, SAL_STATIC_CAST( awt::XWindowListener*, this ) );
+ return (aRet.hasValue() ? aRet : ControlContainerBase::queryAggregation( rType ));
}
-// XTypeProvider
-IMPL_IMPLEMENTATION_ID( UnoDialogControl )
-Sequence< Type > UnoDialogControl::getTypes() throw(RuntimeException)
-{
- return ::comphelper::concatSequences(
- UnoDialogControl_IBase::getTypes(),
- UnoControlContainer::getTypes()
- );
-}
-
-void UnoDialogControl::ImplInsertControl( Reference< XControlModel >& rxModel, const ::rtl::OUString& rName )
-{
- Reference< XPropertySet > xP( rxModel, UNO_QUERY );
-
- ::rtl::OUString aDefCtrl;
- xP->getPropertyValue( GetPropertyName( BASEPROPERTY_DEFAULTCONTROL ) ) >>= aDefCtrl;
-
- // Add our own resource resolver to a newly created control
- Reference< resource::XStringResourceResolver > xStringResourceResolver;
- rtl::OUString aPropName( PROPERTY_RESOURCERESOLVER );
-
- Any aAny;
- ImplGetPropertyValue( aPropName ) >>= xStringResourceResolver;
-
- aAny <<= xStringResourceResolver;
- xP->setPropertyValue( aPropName, aAny );
-
- Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
- Reference < XControl > xCtrl( xMSF->createInstance( aDefCtrl ), UNO_QUERY );
-
- DBG_ASSERT( xCtrl.is(), "UnoDialogControl::ImplInsertControl: could not create the control!" );
- if ( xCtrl.is() )
- {
- xCtrl->setModel( rxModel );
- addControl( rName, xCtrl );
- // will implicitly call addingControl, where we can add the PropertiesChangeListener to the model
- // (which we formerly did herein)
- // 08.01.2001 - 96008 - fs@openoffice.org
-
- ImplSetPosSize( xCtrl );
- }
-}
-
-void UnoDialogControl::ImplRemoveControl( Reference< XControlModel >& rxModel )
-{
- Sequence< Reference< XControl > > aControls = getControls();
- Reference< XControl > xCtrl = StdTabController::FindControl( aControls, rxModel );
- if ( xCtrl.is() )
- removeControl( xCtrl );
-}
-
-void UnoDialogControl::ImplSetPosSize( Reference< XControl >& rxCtrl )
-{
- Reference< XPropertySet > xP( rxCtrl->getModel(), UNO_QUERY );
-
- sal_Int32 nX = 0, nY = 0, nWidth = 0, nHeight = 0;
- xP->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PositionX" ) ) ) >>= nX;
- xP->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PositionY" ) ) ) >>= nY;
- xP->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Width" ) ) ) >>= nWidth;
- xP->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Height" ) ) ) >>= nHeight;
-
- // Currentley we are simply using MAP_APPFONT
- OutputDevice*pOutDev = Application::GetDefaultDevice();
- DBG_ASSERT( pOutDev, "Missing Default Device!" );
- if ( pOutDev )
- {
- ::Size aTmp( nX, nY );
- aTmp = pOutDev->LogicToPixel( aTmp, MAP_APPFONT );
- nX = aTmp.Width();
- nY = aTmp.Height();
- aTmp = ::Size( nWidth, nHeight );
- aTmp = pOutDev->LogicToPixel( aTmp, MAP_APPFONT );
- nWidth = aTmp.Width();
- nHeight = aTmp.Height();
- }
- else
- {
- Reference< XWindowPeer > xPeer = ImplGetCompatiblePeer( sal_True );
- Reference< XDevice > xD( xPeer, UNO_QUERY );
-
- SimpleFontMetric aFM;
- FontDescriptor aFD;
- Any aVal = ImplGetPropertyValue( GetPropertyName( BASEPROPERTY_FONTDESCRIPTOR ) );
- aVal >>= aFD;
- if ( aFD.StyleName.getLength() )
- {
- Reference< XFont > xFont = xD->getFont( aFD );
- aFM = xFont->getFontMetric();
- }
- else
- {
- Reference< XGraphics > xG = xD->createGraphics();
- aFM = xG->getFontMetric();
- }
-
- sal_Int16 nH = aFM.Ascent + aFM.Descent;
- sal_Int16 nW = nH/2; // calculate avarage width?!
-
- nX *= nW;
- nX /= 4;
- nWidth *= nW;
- nWidth /= 4;
- nY *= nH;
- nY /= 8;
- nHeight *= nH;
- nHeight /= 8;
- }
- Reference < XWindow > xW( rxCtrl, UNO_QUERY );
- xW->setPosSize( nX, nY, nWidth, nHeight, PosSize::POSSIZE );
-}
+ //lang::XTypeProvider
+IMPL_XTYPEPROVIDER_START( UnoDialogControl)
+ getCppuType( ( uno::Reference< awt::XTopWindow>* ) NULL ),
+ getCppuType( ( uno::Reference< awt::XDialog>* ) NULL ),
+ getCppuType( ( uno::Reference< awt::XWindowListener>* ) NULL ),
+ ControlContainerBase::getTypes()
+IMPL_XTYPEPROVIDER_END
void UnoDialogControl::dispose() throw(RuntimeException)
{
@@ -1477,139 +214,25 @@ void UnoDialogControl::dispose() throw(RuntimeException)
EventObject aEvt;
aEvt.Source = static_cast< ::cppu::OWeakObject* >( this );
maTopWindowListeners.disposeAndClear( aEvt );
-
- // Notify our listener helper about dispose
- // --- SAFE ---
- ::osl::ResettableGuard< ::osl::Mutex > aGuard( GetMutex() );
- Reference< XEventListener > xListener( mxListener, UNO_QUERY );
- mxListener.clear();
- aGuard.clear();
- // --- SAFE ---
-
- if ( xListener.is() )
- xListener->disposing( aEvt );
-
- UnoControlContainer::dispose();
+ ControlContainerBase::dispose();
}
void SAL_CALL UnoDialogControl::disposing(
const EventObject& Source )
throw(RuntimeException)
{
- rtl::OUString aPropName( PROPERTY_RESOURCERESOLVER );
- Reference< resource::XStringResourceResolver > xStringResourceResolver;
-
- ImplGetPropertyValue( aPropName ) >>= xStringResourceResolver;
- Reference< XInterface > xIfac( xStringResourceResolver, UNO_QUERY );
-
- if ( Source.Source == xIfac )
- {
- Any aAny;
-
- // Reset resource resolver reference
- ImplSetPropertyValue( aPropName, aAny, sal_True );
- ImplUpdateResourceResolver();
- }
- else
- {
- UnoControlContainer::disposing( Source );
- }
+ ControlContainerBase::disposing( Source );
}
sal_Bool UnoDialogControl::setModel( const Reference< XControlModel >& rxModel ) throw(RuntimeException)
{
+ // #Can we move all the Resource stuff to the ControlContainerBase ?
vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-
- // destroy the old tab controller, if existent
- if ( mxTabController.is() )
- {
- mxTabController->setModel( NULL ); // just to be sure, should not be necessary
- removeTabController( mxTabController );
- ::comphelper::disposeComponent( mxTabController ); // just to be sure, should not be necessary
- mxTabController.clear();
- }
-
- if ( getModel().is() )
- {
- Sequence< Reference< XControl > > aControls = getControls();
- const Reference< XControl >* pCtrls = aControls.getConstArray();
- const Reference< XControl >* pCtrlsEnd = pCtrls + aControls.getLength();
-
- for ( ; pCtrls < pCtrlsEnd; ++pCtrls )
- removeControl( *pCtrls );
- // will implicitly call removingControl, which will remove the PropertyChangeListener
- // (which we formerly did herein)
- // 08.01.2001 - 96008 - fs@openoffice.org
-
- Reference< XContainer > xC( getModel(), UNO_QUERY );
- if ( xC.is() )
- xC->removeContainerListener( this );
-
- Reference< XChangesNotifier > xChangeNotifier( getModel(), UNO_QUERY );
- if ( xChangeNotifier.is() )
- xChangeNotifier->removeChangesListener( this );
- }
-
- sal_Bool bRet = UnoControl::setModel( rxModel );
-
- if ( getModel().is() )
- {
- Reference< XNameAccess > xNA( getModel(), UNO_QUERY );
- if ( xNA.is() )
- {
- Sequence< ::rtl::OUString > aNames = xNA->getElementNames();
- const ::rtl::OUString* pNames = aNames.getConstArray();
- sal_uInt32 nCtrls = aNames.getLength();
-
- Reference< XControlModel > xCtrlModel;
- for( sal_uInt32 n = 0; n < nCtrls; ++n, ++pNames )
- {
- xNA->getByName( *pNames ) >>= xCtrlModel;
- ImplInsertControl( xCtrlModel, *pNames );
- }
- }
-
- Reference< XContainer > xC( getModel(), UNO_QUERY );
- if ( xC.is() )
- xC->addContainerListener( this );
-
- Reference< XChangesNotifier > xChangeNotifier( getModel(), UNO_QUERY );
- if ( xChangeNotifier.is() )
- xChangeNotifier->addChangesListener( this );
- }
-
- Reference< XTabControllerModel > xTabbing( getModel(), UNO_QUERY );
- if ( xTabbing.is() )
- {
- mxTabController = new StdTabController;
- mxTabController->setModel( xTabbing );
- addTabController( mxTabController );
- }
+ sal_Bool bRet = ControlContainerBase::setModel( rxModel );
ImplStartListingForResourceEvents();
-
return bRet;
}
-void UnoDialogControl::setDesignMode( sal_Bool bOn ) throw(RuntimeException)
-{
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
- ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
-
- UnoControl::setDesignMode( bOn );
-
- Sequence< Reference< XControl > > xCtrls = getControls();
- sal_Int32 nControls = xCtrls.getLength();
- Reference< XControl >* pControls = xCtrls.getArray();
- for ( sal_Int32 n = 0; n < nControls; n++ )
- pControls[n]->setDesignMode( bOn );
-
- // #109067# in design mode the tab controller is not notified about
- // tab index changes, therefore the tab order must be activated
- // when switching from design mode to live mode
- if ( mxTabController.is() && !bOn )
- mxTabController->activateTabOrder();
-}
-
void UnoDialogControl::createPeer( const Reference< XToolkit > & rxToolkit, const Reference< XWindowPeer > & rParentPeer ) throw(RuntimeException)
{
vos::OGuard aSolarGuard( Application::GetSolarMutex() );
@@ -1657,48 +280,11 @@ void UnoDialogControl::PrepareWindowDescriptor( ::com::sun::star::awt::WindowDes
getPhysicalLocation( ImplGetPropertyValue( PROPERTY_DIALOGSOURCEURL ),
ImplGetPropertyValue( PROPERTY_IMAGEURL ));
- xGraphic = lcl_getGraphicFromURL_nothrow( absoluteUrl );
+ xGraphic = ControlContainerBase::Impl_getGraphicFromURL_nothrow( absoluteUrl );
ImplSetPropertyValue( PROPERTY_GRAPHIC, uno::makeAny( xGraphic ), sal_True );
}
}
-void UnoDialogControl::elementInserted( const ContainerEvent& Event ) throw(RuntimeException)
-{
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-
- Reference< XControlModel > xModel;
- ::rtl::OUString aName;
-
- Event.Accessor >>= aName;
- Event.Element >>= xModel;
- ImplInsertControl( xModel, aName );
-}
-
-void UnoDialogControl::elementRemoved( const ContainerEvent& Event ) throw(RuntimeException)
-{
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-
- Reference< XControlModel > xModel;
- Event.Element >>= xModel;
- if ( xModel.is() )
- ImplRemoveControl( xModel );
-}
-
-void UnoDialogControl::elementReplaced( const ContainerEvent& Event ) throw(RuntimeException)
-{
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-
- Reference< XControlModel > xModel;
- Event.ReplacedElement >>= xModel;
- if ( xModel.is() )
- ImplRemoveControl( xModel );
-
- ::rtl::OUString aName;
- Event.Accessor >>= aName;
- Event.Element >>= xModel;
- ImplInsertControl( xModel, aName );
-}
-
void UnoDialogControl::addTopWindowListener( const Reference< XTopWindowListener >& rxListener ) throw (RuntimeException)
{
maTopWindowListeners.addInterface( rxListener );
@@ -1752,13 +338,11 @@ void UnoDialogControl::setMenuBar( const Reference< XMenuBar >& rxMenuBar ) thro
xTW->setMenuBar( mxMenuBar );
}
}
-
static ::Size ImplMapPixelToAppFont( OutputDevice* pOutDev, const ::Size& aSize )
{
::Size aTmp = pOutDev->PixelToLogic( aSize, MAP_APPFONT );
return aTmp;
}
-
// ::com::sun::star::awt::XWindowListener
void SAL_CALL UnoDialogControl::windowResized( const ::com::sun::star::awt::WindowEvent& e )
throw (::com::sun::star::uno::RuntimeException)
@@ -1837,166 +421,6 @@ throw (::com::sun::star::uno::RuntimeException)
(void)e;
}
-// XPropertiesChangeListener
-void UnoDialogControl::ImplModelPropertiesChanged( const Sequence< PropertyChangeEvent >& rEvents ) throw(RuntimeException)
-{
- if( !isDesignMode() && !mbCreatingCompatiblePeer )
- {
- ::rtl::OUString s1( RTL_CONSTASCII_USTRINGPARAM( "PositionX" ) );
- ::rtl::OUString s2( RTL_CONSTASCII_USTRINGPARAM( "PositionY" ) );
- ::rtl::OUString s3( RTL_CONSTASCII_USTRINGPARAM( "Width" ) );
- ::rtl::OUString s4( RTL_CONSTASCII_USTRINGPARAM( "Height" ) );
-
- sal_Int32 nLen = rEvents.getLength();
- for( sal_Int32 i = 0; i < nLen; i++ )
- {
- const PropertyChangeEvent& rEvt = rEvents.getConstArray()[i];
- Reference< XControlModel > xModel( rEvt.Source, UNO_QUERY );
- sal_Bool bOwnModel = (XControlModel*)xModel.get() == (XControlModel*)getModel().get();
- if ( ( rEvt.PropertyName == s1 ) ||
- ( rEvt.PropertyName == s2 ) ||
- ( rEvt.PropertyName == s3 ) ||
- ( rEvt.PropertyName == s4 ) )
- {
- if ( bOwnModel )
- {
- if ( !mbPosModified && !mbSizeModified )
- {
- // Don't set new pos/size if we get new values from window listener
- Reference< XControl > xThis( (XAggregation*)(::cppu::OWeakAggObject*)this, UNO_QUERY );
- ImplSetPosSize( xThis );
- }
- }
- else
- {
- Sequence<Reference<XControl> > aControlSequence(getControls());
- Reference<XControl> aControlRef( StdTabController::FindControl( aControlSequence, xModel ) );
- ImplSetPosSize( aControlRef );
- }
- break;
- }
- else if ( bOwnModel && rEvt.PropertyName.equalsAsciiL( "ResourceResolver", 16 ))
- {
- ImplStartListingForResourceEvents();
- }
- }
- }
-
- sal_Int32 nLen = rEvents.getLength();
- for( sal_Int32 i = 0; i < nLen; i++ )
- {
- const PropertyChangeEvent& rEvt = rEvents.getConstArray()[i];
- Reference< XControlModel > xModel( rEvt.Source, UNO_QUERY );
- sal_Bool bOwnModel = (XControlModel*)xModel.get() == (XControlModel*)getModel().get();
- if ( bOwnModel && rEvt.PropertyName.equalsAsciiL( "ImageURL", 8 ))
- {
- ::rtl::OUString aImageURL;
- Reference< graphic::XGraphic > xGraphic;
- if (( ImplGetPropertyValue( PROPERTY_IMAGEURL ) >>= aImageURL ) &&
- ( aImageURL.getLength() > 0 ))
- {
- ::rtl::OUString absoluteUrl =
- getPhysicalLocation( ImplGetPropertyValue( PROPERTY_DIALOGSOURCEURL ),
- ImplGetPropertyValue( PROPERTY_IMAGEURL ));
-
- xGraphic = lcl_getGraphicFromURL_nothrow( absoluteUrl );
- }
-
- ImplSetPropertyValue( PROPERTY_GRAPHIC, uno::makeAny( xGraphic ), sal_True );
- break;
- }
- }
-
- UnoControlContainer::ImplModelPropertiesChanged( rEvents );
-}
-
-void UnoDialogControl::ImplStartListingForResourceEvents()
-{
- Reference< resource::XStringResourceResolver > xStringResourceResolver;
-
- ImplGetPropertyValue( PROPERTY_RESOURCERESOLVER ) >>= xStringResourceResolver;
-
- // Add our helper as listener to retrieve notifications about changes
- Reference< util::XModifyListener > rListener( mxListener );
- ResourceListener* pResourceListener = static_cast< ResourceListener* >( rListener.get() );
-
- // resource listener will stop listening if resolver reference is empty
- if ( pResourceListener )
- pResourceListener->startListening( xStringResourceResolver );
- ImplUpdateResourceResolver();
-}
-
-void UnoDialogControl::ImplUpdateResourceResolver()
-{
- rtl::OUString aPropName( PROPERTY_RESOURCERESOLVER );
- Reference< resource::XStringResourceResolver > xStringResourceResolver;
-
- ImplGetPropertyValue( aPropName ) >>= xStringResourceResolver;
- if ( !xStringResourceResolver.is() )
- return;
-
- Any xNewStringResourceResolver; xNewStringResourceResolver <<= xStringResourceResolver;
-
- Sequence< rtl::OUString > aPropNames(1);
- aPropNames[0] = aPropName;
-
- const Sequence< Reference< awt::XControl > > aSeq = getControls();
- for ( sal_Int32 i = 0; i < aSeq.getLength(); i++ )
- {
- Reference< XControl > xControl( aSeq[i] );
- Reference< XPropertySet > xPropertySet;
-
- if ( xControl.is() )
- xPropertySet = Reference< XPropertySet >( xControl->getModel(), UNO_QUERY );
-
- if ( !xPropertySet.is() )
- continue;
-
- try
- {
- Reference< resource::XStringResourceResolver > xCurrStringResourceResolver;
- Any aOldValue = xPropertySet->getPropertyValue( aPropName );
- if ( ( aOldValue >>= xCurrStringResourceResolver )
- && ( xStringResourceResolver == xCurrStringResourceResolver )
- )
- {
- Reference< XMultiPropertySet > xMultiPropSet( xPropertySet, UNO_QUERY );
- Reference< XPropertiesChangeListener > xListener( xPropertySet, UNO_QUERY );
- xMultiPropSet->firePropertiesChangeEvent( aPropNames, xListener );
- }
- else
- xPropertySet->setPropertyValue( aPropName, xNewStringResourceResolver );
- }
- /*catch ( NoSuchElementException& )*/ // that's nonsense, this is never thrown above ...
- catch ( const Exception& )
- {
- }
- }
-
- // propagate resource resolver changes to language dependent props of the dialog
- Reference< XPropertySet > xPropertySet( getModel(), UNO_QUERY );
- if ( xPropertySet.is() )
- {
- Reference< XMultiPropertySet > xMultiPropSet( xPropertySet, UNO_QUERY );
- Reference< XPropertiesChangeListener > xListener( xPropertySet, UNO_QUERY );
- xMultiPropSet->firePropertiesChangeEvent( lcl_getLanguageDependentProperties(), xListener );
- }
-}
-
-void SAL_CALL UnoDialogControl::endDialog( ::sal_Int32 i_result ) throw (RuntimeException)
-{
- Reference< XDialog2 > xPeerDialog( getPeer(), UNO_QUERY );
- if ( xPeerDialog.is() )
- xPeerDialog->endDialog( i_result );
-}
-
-void SAL_CALL UnoDialogControl::setHelpId( const rtl::OUString& i_id ) throw (RuntimeException)
-{
- Reference< XDialog2 > xPeerDialog( getPeer(), UNO_QUERY );
- if ( xPeerDialog.is() )
- xPeerDialog->setHelpId( i_id );
-}
-
void UnoDialogControl::setTitle( const ::rtl::OUString& Title ) throw(RuntimeException)
{
vos::OGuard aSolarGuard( Application::GetSolarMutex() );
@@ -2042,53 +466,6 @@ void UnoDialogControl::endExecute() throw(RuntimeException)
}
}
-void UnoDialogControl::addingControl( const Reference< XControl >& _rxControl )
-{
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
- UnoControlContainer::addingControl( _rxControl );
-
- if ( _rxControl.is() )
- {
- Reference< XMultiPropertySet > xProps( _rxControl->getModel(), UNO_QUERY );
- if ( xProps.is() )
- {
- Sequence< ::rtl::OUString > aNames( 4 );
- ::rtl::OUString* pNames = aNames.getArray();
- *pNames++ = ::rtl::OUString::createFromAscii( "PositionX" );
- *pNames++ = ::rtl::OUString::createFromAscii( "PositionY" );
- *pNames++ = ::rtl::OUString::createFromAscii( "Width" );
- *pNames++ = ::rtl::OUString::createFromAscii( "Height" );
-
- xProps->addPropertiesChangeListener( aNames, this );
- }
- }
-}
-
-void UnoDialogControl::removingControl( const Reference< XControl >& _rxControl )
-{
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
- UnoControlContainer::removingControl( _rxControl );
-
- if ( _rxControl.is() )
- {
- Reference< XMultiPropertySet > xProps( _rxControl->getModel(), UNO_QUERY );
- if ( xProps.is() )
- xProps->removePropertiesChangeListener( this );
- }
-
-}
-
-void SAL_CALL UnoDialogControl::changesOccurred( const ChangesEvent& ) throw (RuntimeException)
-{
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
- // a tab controller model may have changed
-
- // #109067# in design mode don't notify the tab controller
- // about tab index changes
- if ( mxTabController.is() && !mbDesignMode )
- mxTabController->activateTabOrder();
-}
-
// XModifyListener
void SAL_CALL UnoDialogControl::modified(
const lang::EventObject& /*rEvent*/ )
@@ -2097,35 +474,30 @@ throw (RuntimeException)
ImplUpdateResourceResolver();
}
-// ----------------------------------------------------
-// Helper Method to convert relative url to physical location
-// ----------------------------------------------------
-
-::rtl::OUString getPhysicalLocation( const ::com::sun::star::uno::Any& rbase, const ::com::sun::star::uno::Any& rUrl )
+void UnoDialogControl::ImplModelPropertiesChanged( const Sequence< PropertyChangeEvent >& rEvents ) throw(RuntimeException)
{
- ::rtl::OUString baseLocation;
- ::rtl::OUString url;
-
- rbase >>= baseLocation;
- rUrl >>= url;
-
- ::rtl::OUString absoluteURL( url );
- if ( url.getLength() > 0 )
+ sal_Int32 nLen = rEvents.getLength();
+ for( sal_Int32 i = 0; i < nLen; i++ )
{
- INetURLObject urlObj(baseLocation);
- urlObj.removeSegment();
- baseLocation = urlObj.GetMainURL( INetURLObject::NO_DECODE );
-
- const INetURLObject protocolCheck( url );
- const INetProtocol protocol = protocolCheck.GetProtocol();
- if ( protocol == INET_PROT_NOT_VALID )
+ const PropertyChangeEvent& rEvt = rEvents.getConstArray()[i];
+ Reference< XControlModel > xModel( rEvt.Source, UNO_QUERY );
+ sal_Bool bOwnModel = (XControlModel*)xModel.get() == (XControlModel*)getModel().get();
+ if ( bOwnModel && rEvt.PropertyName.equalsAsciiL( "ImageURL", 8 ))
{
- ::rtl::OUString testAbsoluteURL;
- if ( ::osl::FileBase::E_None == ::osl::FileBase::getAbsoluteFileURL( baseLocation, url, testAbsoluteURL ) )
- absoluteURL = testAbsoluteURL;
+ ::rtl::OUString aImageURL;
+ Reference< graphic::XGraphic > xGraphic;
+ if (( ImplGetPropertyValue( GetPropertyName( BASEPROPERTY_IMAGEURL ) ) >>= aImageURL ) &&
+ ( aImageURL.getLength() > 0 ))
+ {
+ ::rtl::OUString absoluteUrl =
+ getPhysicalLocation( ImplGetPropertyValue( GetPropertyName( BASEPROPERTY_DIALOGSOURCEURL )),
+ uno::makeAny(aImageURL));
+
+ xGraphic = Impl_getGraphicFromURL_nothrow( absoluteUrl );
+ }
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_GRAPHIC), uno::makeAny( xGraphic ), sal_True );
+ break;
}
}
-
- return absoluteURL;
+ ControlContainerBase::ImplModelPropertiesChanged(rEvents);
}
-
diff --git a/toolkit/source/controls/formattedcontrol.cxx b/toolkit/source/controls/formattedcontrol.cxx
index 67c9c40ebd38..fb2d0f720c2e 100644
--- a/toolkit/source/controls/formattedcontrol.cxx
+++ b/toolkit/source/controls/formattedcontrol.cxx
@@ -125,8 +125,9 @@ namespace toolkit
// = UnoControlFormattedFieldModel
// ===================================================================
// -------------------------------------------------------------------
- UnoControlFormattedFieldModel::UnoControlFormattedFieldModel()
- :m_bRevokedAsClient( false )
+ UnoControlFormattedFieldModel::UnoControlFormattedFieldModel( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoControlModel( i_factory )
+ ,m_bRevokedAsClient( false )
,m_bSettingValueAndText( false )
{
ImplRegisterProperty( BASEPROPERTY_ALIGN );
@@ -433,7 +434,8 @@ namespace toolkit
// = UnoFormattedFieldControl
// ===================================================================
// -------------------------------------------------------------------
- UnoFormattedFieldControl::UnoFormattedFieldControl()
+ UnoFormattedFieldControl::UnoFormattedFieldControl( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoSpinFieldControl( i_factory )
{
}
@@ -457,7 +459,7 @@ namespace toolkit
aValues[0] = xPeer->getProperty( aNames[0] );
aValues[1] = xPeer->getProperty( aNames[1] );
- ImplSetPropertyValues( aNames, aValues, FALSE );
+ ImplSetPropertyValues( aNames, aValues, sal_False );
if ( GetTextListeners().getLength() )
GetTextListeners().textChanged( e );
diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx
index 011f3502cdd8..0195ddff09a2 100644
--- a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx
+++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx
@@ -27,174 +27,366 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_toolkit.hxx"
+
#include "defaultgridcolumnmodel.hxx"
-#include <comphelper/sequence.hxx>
-#include <toolkit/helper/servicenames.hxx>
+#include "gridcolumn.hxx"
+
+/** === begin UNO includes === **/
#include <com/sun/star/awt/XVclWindowPeer.hpp>
-#include <rtl/ref.hxx>
+/** === end UNO includes === **/
-using ::rtl::OUString;
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::awt;
-using namespace ::com::sun::star::awt::grid;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::style;
+#include <comphelper/sequence.hxx>
+#include <comphelper/componentguard.hxx>
+#include <toolkit/helper/servicenames.hxx>
+#include <rtl/ustrbuf.hxx>
+#include <tools/diagnose_ex.h>
+//......................................................................................................................
namespace toolkit
+//......................................................................................................................
{
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::lang::XMultiServiceFactory;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::awt::grid::XGridColumn;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::lang::XMultiServiceFactory;
+ using ::com::sun::star::lang::XComponent;
+ using ::com::sun::star::lang::EventObject;
+ using ::com::sun::star::container::XContainerListener;
+ using ::com::sun::star::container::ContainerEvent;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::lang::IndexOutOfBoundsException;
+ using ::com::sun::star::util::XCloneable;
+ using ::com::sun::star::lang::IllegalArgumentException;
+ /** === end UNO using === **/
+
+ //==================================================================================================================
+ //= DefaultGridColumnModel
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ DefaultGridColumnModel::DefaultGridColumnModel( const Reference< XMultiServiceFactory >& i_factory )
+ :DefaultGridColumnModel_Base( m_aMutex )
+ ,m_aContext( i_factory )
+ ,m_aContainerListeners( m_aMutex )
+ ,m_aColumns()
+ {
+ }
-///////////////////////////////////////////////////////////////////////
-// class DefaultGridColumnModel
-///////////////////////////////////////////////////////////////////////
-
-DefaultGridColumnModel::DefaultGridColumnModel(const Reference< XMultiServiceFactory >& xFactory)
-: columns(std::vector< Reference< XGridColumn > >())
- ,m_nColumnHeaderHeight(0)
- ,m_xFactory(xFactory)
-{
-}
+ //------------------------------------------------------------------------------------------------------------------
+ DefaultGridColumnModel::DefaultGridColumnModel( DefaultGridColumnModel const & i_copySource )
+ :cppu::BaseMutex()
+ ,DefaultGridColumnModel_Base( m_aMutex )
+ ,m_aContext( i_copySource.m_aContext )
+ ,m_aContainerListeners( m_aMutex )
+ ,m_aColumns()
+ {
+ Columns aColumns;
+ aColumns.reserve( i_copySource.m_aColumns.size() );
+ try
+ {
+ for ( Columns::const_iterator col = i_copySource.m_aColumns.begin();
+ col != i_copySource.m_aColumns.end();
+ ++col
+ )
+ {
+ Reference< XCloneable > const xCloneable( *col, UNO_QUERY_THROW );
+ Reference< XGridColumn > const xClone( xCloneable->createClone(), UNO_QUERY_THROW );
+
+ GridColumn* const pGridColumn = GridColumn::getImplementation( xClone );
+ if ( pGridColumn == NULL )
+ throw RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "invalid clone source implementation" ) ), *this );
+ // that's indeed a RuntimeException, not an IllegalArgumentException or some such:
+ // a DefaultGridColumnModel implementation whose columns are not GridColumn implementations
+ // is borked.
+ pGridColumn->setIndex( col - i_copySource.m_aColumns.begin() );
+
+ aColumns.push_back( xClone );
+ }
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ if ( aColumns.size() == i_copySource.m_aColumns.size() )
+ m_aColumns.swap( aColumns );
+ }
-//---------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ DefaultGridColumnModel::~DefaultGridColumnModel()
+ {
+ }
-DefaultGridColumnModel::~DefaultGridColumnModel()
-{
-}
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL DefaultGridColumnModel::getColumnCount() throw (RuntimeException)
+ {
+ return m_aColumns.size();
+ }
-//---------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XGridColumn > SAL_CALL DefaultGridColumnModel::createColumn( ) throw (RuntimeException)
+ {
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
+ return new GridColumn();
+ }
-::sal_Int32 SAL_CALL DefaultGridColumnModel::getColumnCount() throw (::com::sun::star::uno::RuntimeException)
-{
- return columns.size();
-}
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL DefaultGridColumnModel::addColumn( const Reference< XGridColumn > & i_column ) throw (RuntimeException, IllegalArgumentException)
+ {
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
-//---------------------------------------------------------------------
+ GridColumn* const pGridColumn = GridColumn::getImplementation( i_column );
+ if ( pGridColumn == NULL )
+ throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "invalid column implementation" ) ), *this, 1 );
-::sal_Int32 SAL_CALL DefaultGridColumnModel::addColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > & column) throw (::com::sun::star::uno::RuntimeException)
-{
- ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
- Reference<XGridColumn> xColumn(column);
- columns.push_back(xColumn);
- sal_Int32 index = columns.size() - 1;
- xColumn->setIndex(index);
- return index;
-}
+ m_aColumns.push_back( i_column );
+ sal_Int32 index = m_aColumns.size() - 1;
+ pGridColumn->setIndex( index );
-//---------------------------------------------------------------------
+ // fire insertion notifications
+ ContainerEvent aEvent;
+ aEvent.Source = *this;
+ aEvent.Accessor <<= index;
+ aEvent.Element <<= i_column;
-::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > > SAL_CALL DefaultGridColumnModel::getColumns() throw (::com::sun::star::uno::RuntimeException)
-{
- return comphelper::containerToSequence(columns);
-}
+ aGuard.clear();
+ m_aContainerListeners.notifyEach( &XContainerListener::elementInserted, aEvent );
-//---------------------------------------------------------------------
+ return index;
+ }
-::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > SAL_CALL DefaultGridColumnModel::getColumn(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException)
-{
- if ( index >=0 && index < ((sal_Int32)columns.size()))
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DefaultGridColumnModel::removeColumn( ::sal_Int32 i_columnIndex ) throw (RuntimeException, IndexOutOfBoundsException)
{
- return columns[index];
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
+
+ if ( ( i_columnIndex < 0 ) || ( size_t( i_columnIndex ) >= m_aColumns.size() ) )
+ throw IndexOutOfBoundsException( ::rtl::OUString(), *this );
+
+ Columns::iterator const pos = m_aColumns.begin() + i_columnIndex;
+ Reference< XGridColumn > const xColumn( *pos );
+ m_aColumns.erase( pos );
+
+ // update indexes of all subsequent columns
+ sal_Int32 columnIndex( i_columnIndex );
+ for ( Columns::iterator updatePos = m_aColumns.begin() + columnIndex;
+ updatePos != m_aColumns.end();
+ ++updatePos, ++columnIndex
+ )
+ {
+ GridColumn* pColumnImpl = GridColumn::getImplementation( *updatePos );
+ ENSURE_OR_CONTINUE( pColumnImpl, "DefaultGridColumnModel::removeColumn: invalid column implementation!" );
+ pColumnImpl->setIndex( columnIndex );
+ }
+
+ // fire removal notifications
+ ContainerEvent aEvent;
+ aEvent.Source = *this;
+ aEvent.Accessor <<= i_columnIndex;
+ aEvent.Element <<= xColumn;
+
+ aGuard.clear();
+ m_aContainerListeners.notifyEach( &XContainerListener::elementRemoved, aEvent );
+
+ // dispose the removed column
+ try
+ {
+ Reference< XComponent > const xColComp( xColumn, UNO_QUERY_THROW );
+ xColComp->dispose();
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
}
- else
- return Reference< XGridColumn >();
-}
-//---------------------------------------------------------------------
-void SAL_CALL DefaultGridColumnModel::setColumnHeaderHeight(sal_Int32 _value) throw (::com::sun::star::uno::RuntimeException)
-{
- m_nColumnHeaderHeight = _value;
-}
-//---------------------------------------------------------------------
-sal_Int32 SAL_CALL DefaultGridColumnModel::getColumnHeaderHeight() throw (::com::sun::star::uno::RuntimeException)
-{
- return m_nColumnHeaderHeight;
-}
-
-//---------------------------------------------------------------------
-void SAL_CALL DefaultGridColumnModel::setDefaultColumns(sal_Int32 rowElements) throw (::com::sun::star::uno::RuntimeException)
-{
- ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
- for(sal_Int32 i=0;i<rowElements;i++)
+ //------------------------------------------------------------------------------------------------------------------
+ Sequence< Reference< XGridColumn > > SAL_CALL DefaultGridColumnModel::getColumns() throw (RuntimeException)
{
- Reference<XGridColumn> xColumn( m_xFactory->createInstance ( OUString::createFromAscii( "com.sun.star.awt.grid.GridColumn" ) ), UNO_QUERY );
- columns.push_back(xColumn);
- xColumn->setIndex(i);
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
+ return ::comphelper::containerToSequence( m_aColumns );
}
-}
-::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > SAL_CALL DefaultGridColumnModel::copyColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > & column) throw (::com::sun::star::uno::RuntimeException)
-{
- Reference<XGridColumn> xColumn( m_xFactory->createInstance ( OUString::createFromAscii( "com.sun.star.awt.grid.GridColumn" ) ), UNO_QUERY );
- xColumn->setColumnWidth(column->getColumnWidth());
- xColumn->setPreferredWidth(column->getPreferredWidth());
- xColumn->setMaxWidth(column->getMaxWidth());
- xColumn->setMinWidth(column->getMinWidth());
- xColumn->setPreferredWidth(column->getPreferredWidth());
- xColumn->setResizeable(column->getResizeable());
- xColumn->setTitle(column->getTitle());
- xColumn->setHorizontalAlign(column->getHorizontalAlign());
- return xColumn;
-}
-//---------------------------------------------------------------------
-// XComponent
-//---------------------------------------------------------------------
-
-void SAL_CALL DefaultGridColumnModel::dispose() throw (RuntimeException)
-{
- ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
- ::com::sun::star::lang::EventObject aEvent;
- aEvent.Source.set( static_cast< ::cppu::OWeakObject* >( this ) );
- BrdcstHelper.aLC.disposeAndClear( aEvent );
-
-}
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XGridColumn > SAL_CALL DefaultGridColumnModel::getColumn(::sal_Int32 index) throw (IndexOutOfBoundsException, RuntimeException)
+ {
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
-//---------------------------------------------------------------------
+ if ( index >=0 && index < ((sal_Int32)m_aColumns.size()))
+ return m_aColumns[index];
-void SAL_CALL DefaultGridColumnModel::addEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException)
-{
- BrdcstHelper.addListener( XEventListener::static_type(), xListener );
-}
+ throw IndexOutOfBoundsException();
+ }
-//---------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DefaultGridColumnModel::setDefaultColumns(sal_Int32 rowElements) throw (RuntimeException)
+ {
+ ::std::vector< ContainerEvent > aRemovedColumns;
+ ::std::vector< ContainerEvent > aInsertedColumns;
+
+ {
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
+
+ // remove existing columns
+ while ( !m_aColumns.empty() )
+ {
+ const size_t lastColIndex = m_aColumns.size() - 1;
+
+ ContainerEvent aEvent;
+ aEvent.Source = *this;
+ aEvent.Accessor <<= sal_Int32( lastColIndex );
+ aEvent.Element <<= m_aColumns[ lastColIndex ];
+ aRemovedColumns.push_back( aEvent );
+
+ m_aColumns.erase( m_aColumns.begin() + lastColIndex );
+ }
+
+ // add new columns
+ for ( sal_Int32 i=0; i<rowElements; ++i )
+ {
+ ::rtl::Reference< GridColumn > const pGridColumn = new GridColumn();
+ Reference< XGridColumn > const xColumn( pGridColumn.get() );
+ ::rtl::OUStringBuffer colTitle;
+ colTitle.appendAscii( "Column " );
+ colTitle.append( i + 1 );
+ pGridColumn->setTitle( colTitle.makeStringAndClear() );
+ pGridColumn->setColumnWidth( 80 /* APPFONT */ );
+ pGridColumn->setFlexibility( 1 );
+ pGridColumn->setResizeable( sal_True );
+ pGridColumn->setDataColumnIndex( i );
+
+ ContainerEvent aEvent;
+ aEvent.Source = *this;
+ aEvent.Accessor <<= i;
+ aEvent.Element <<= xColumn;
+ aInsertedColumns.push_back( aEvent );
+
+ m_aColumns.push_back( xColumn );
+ pGridColumn->setIndex( i );
+ }
+ }
+
+ // fire removal notifications
+ for ( ::std::vector< ContainerEvent >::const_iterator event = aRemovedColumns.begin();
+ event != aRemovedColumns.end();
+ ++event
+ )
+ {
+ m_aContainerListeners.notifyEach( &XContainerListener::elementRemoved, *event );
+ }
+
+ // fire insertion notifications
+ for ( ::std::vector< ContainerEvent >::const_iterator event = aInsertedColumns.begin();
+ event != aInsertedColumns.end();
+ ++event
+ )
+ {
+ m_aContainerListeners.notifyEach( &XContainerListener::elementInserted, *event );
+ }
+
+ // dispose removed columns
+ for ( ::std::vector< ContainerEvent >::const_iterator event = aRemovedColumns.begin();
+ event != aRemovedColumns.end();
+ ++event
+ )
+ {
+ try
+ {
+ const Reference< XComponent > xColComp( event->Element, UNO_QUERY_THROW );
+ xColComp->dispose();
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+ }
-void SAL_CALL DefaultGridColumnModel::removeEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException)
-{
- BrdcstHelper.removeListener( XEventListener::static_type(), xListener );
-}
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString SAL_CALL DefaultGridColumnModel::getImplementationName( ) throw (RuntimeException)
+ {
+ return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.comp.toolkit.DefaultGridColumnModel" ) );
+ }
-//---------------------------------------------------------------------
-// XServiceInfo
-//---------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ sal_Bool SAL_CALL DefaultGridColumnModel::supportsService( const ::rtl::OUString& i_serviceName ) throw (RuntimeException)
+ {
+ const Sequence< ::rtl::OUString > aServiceNames( getSupportedServiceNames() );
+ for ( sal_Int32 i=0; i<aServiceNames.getLength(); ++i )
+ if ( aServiceNames[i] == i_serviceName )
+ return sal_True;
+ return sal_False;
+ }
-::rtl::OUString SAL_CALL DefaultGridColumnModel::getImplementationName( ) throw (RuntimeException)
-{
- ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
- static const OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "toolkit.DefaultGridColumnModel" ) );
- return aImplName;
-}
+ //------------------------------------------------------------------------------------------------------------------
+ Sequence< ::rtl::OUString > SAL_CALL DefaultGridColumnModel::getSupportedServiceNames( ) throw (RuntimeException)
+ {
+ const ::rtl::OUString aServiceName( ::rtl::OUString::createFromAscii( szServiceName_DefaultGridColumnModel ) );
+ const Sequence< ::rtl::OUString > aSeq( &aServiceName, 1 );
+ return aSeq;
+ }
-//---------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DefaultGridColumnModel::addContainerListener( const Reference< XContainerListener >& i_listener ) throw (RuntimeException)
+ {
+ if ( i_listener.is() )
+ m_aContainerListeners.addInterface( i_listener );
+ }
-sal_Bool SAL_CALL DefaultGridColumnModel::supportsService( const ::rtl::OUString& ServiceName ) throw (RuntimeException)
-{
- ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
- return ServiceName.equalsAscii( szServiceName_DefaultGridColumnModel );
-}
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DefaultGridColumnModel::removeContainerListener( const Reference< XContainerListener >& i_listener ) throw (RuntimeException)
+ {
+ if ( i_listener.is() )
+ m_aContainerListeners.removeInterface( i_listener );
+ }
-//---------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DefaultGridColumnModel::disposing()
+ {
+ DefaultGridColumnModel_Base::disposing();
+
+ EventObject aEvent( *this );
+ m_aContainerListeners.disposeAndClear( aEvent );
+
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ // remove, dispose and clear columns
+ while ( !m_aColumns.empty() )
+ {
+ try
+ {
+ const Reference< XComponent > xColComponent( m_aColumns[ 0 ], UNO_QUERY_THROW );
+ xColComponent->dispose();
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+
+ m_aColumns.erase( m_aColumns.begin() );
+ }
+
+ Columns aEmpty;
+ m_aColumns.swap( aEmpty );
+ }
-::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL DefaultGridColumnModel::getSupportedServiceNames( ) throw (RuntimeException)
-{
- ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
- static const OUString aServiceName( OUString::createFromAscii( szServiceName_DefaultGridColumnModel ) );
- static const Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
-}
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XCloneable > SAL_CALL DefaultGridColumnModel::createClone( ) throw (RuntimeException)
+ {
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
+ return new DefaultGridColumnModel( *this );
+ }
-}
+//......................................................................................................................
+} // namespace toolkit
+//......................................................................................................................
-Reference< XInterface > SAL_CALL DefaultGridColumnModel_CreateInstance( const Reference< XMultiServiceFactory >& _rFactory)
+//----------------------------------------------------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL DefaultGridColumnModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rFactory)
{
- return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::DefaultGridColumnModel( _rFactory ) );
+ return ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::DefaultGridColumnModel( _rFactory ) );
}
-
diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx
index 8b8c8bfc795c..da0ef20e3287 100644
--- a/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx
+++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.hxx
@@ -25,76 +25,73 @@
*
************************************************************************/
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_toolkit.hxx"
+/** === begin UNO includes === **/
#include <com/sun/star/awt/grid/XGridColumnModel.hpp>
#include <com/sun/star/awt/grid/XGridColumn.hpp>
-//#include <com/sun/star/awt/grid/GridColumnEvent.hpp>
#include <com/sun/star/lang/XEventListener.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
-#include <cppuhelper/implbase2.hxx>
-#include <cppuhelper/implbase3.hxx>
-#include <rtl/ref.hxx>
-#include <vector>
-#include <toolkit/helper/mutexandbroadcasthelper.hxx>
-#include <com/sun/star/util/Color.hpp>
#include <com/sun/star/style/VerticalAlignment.hpp>
-#include <com/sun/star/awt/grid/XGridColumnListener.hpp>
+#include <com/sun/star/util/Color.hpp>
+/** === end UNO includes === **/
-using ::rtl::OUString;
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::awt;
-using namespace ::com::sun::star::awt::grid;
-using namespace ::com::sun::star::lang;
+#include <cppuhelper/basemutex.hxx>
+#include <cppuhelper/compbase2.hxx>
+#include <comphelper/componentcontext.hxx>
+#include <vector>
+
+namespace comphelper
+{
+ class ComponentGuard;
+}
namespace toolkit
{
//enum broadcast_type { column_added, column_removed, column_changed};
-class DefaultGridColumnModel : public ::cppu::WeakImplHelper2< XGridColumnModel, XServiceInfo >,
- public MutexAndBroadcastHelper
+typedef ::cppu::WeakComponentImplHelper2 < ::com::sun::star::awt::grid::XGridColumnModel
+ , ::com::sun::star::lang::XServiceInfo
+ > DefaultGridColumnModel_Base;
+
+class DefaultGridColumnModel :public ::cppu::BaseMutex
+ ,public DefaultGridColumnModel_Base
{
public:
- DefaultGridColumnModel(const Reference< XMultiServiceFactory >& xFactory);
+ DefaultGridColumnModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory );
+ DefaultGridColumnModel( DefaultGridColumnModel const & i_copySource );
virtual ~DefaultGridColumnModel();
// XGridColumnModel
-
- //virtual ::sal_Bool SAL_CALL getColumnSelectionAllowed() throw (::com::sun::star::uno::RuntimeException);
- //virtual void SAL_CALL setColumnSelectionAllowed(::sal_Bool the_value) throw (::com::sun::star::uno::RuntimeException);
virtual ::sal_Int32 SAL_CALL getColumnCount() throw (::com::sun::star::uno::RuntimeException);
- virtual ::sal_Int32 SAL_CALL addColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > & column) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > SAL_CALL createColumn( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL addColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > & column) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException);
+ virtual void SAL_CALL removeColumn( ::sal_Int32 i_columnIndex ) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IndexOutOfBoundsException);
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > > SAL_CALL getColumns() throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > SAL_CALL getColumn(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException);
- //virtual void SAL_CALL addColumnListener( const Reference< XGridColumnListener >& xListener ) throw (RuntimeException);
- //virtual void SAL_CALL removeColumnListener( const Reference< XGridColumnListener >& xListener ) throw (RuntimeException);
- virtual void SAL_CALL setColumnHeaderHeight( sal_Int32 _value) throw (com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getColumnHeaderHeight() throw (com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > SAL_CALL getColumn(::sal_Int32 index) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setDefaultColumns(sal_Int32 rowElements) throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > SAL_CALL copyColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > & column) throw (::com::sun::star::uno::RuntimeException);
- // XComponent
- virtual void SAL_CALL dispose( ) throw (RuntimeException);
- virtual void SAL_CALL addEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException);
- virtual void SAL_CALL removeEventListener( const Reference< XEventListener >& aListener ) throw (RuntimeException);
// XServiceInfo
virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
-private:
- /*void broadcast( broadcast_type eType, const GridColumnEvent& aEvent );
- void broadcast_changed( ::rtl::OUString name, Any oldValue, Any newValue, sal_Int32 index,const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > & rColumn );
- void broadcast_add( sal_Int32 index,const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > & rColumn );
- void broadcast_remove( sal_Int32 index, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > & rColumn );*/
+ // XContainer
+ virtual void SAL_CALL addContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XCloneable
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // OComponentHelper
+ virtual void SAL_CALL disposing();
+
+private:
+ typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > > Columns;
- std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > > columns;
- sal_Bool selectionAllowed;
- sal_Int32 m_nColumnHeaderHeight;
- Reference< XMultiServiceFactory > m_xFactory;
+ ::comphelper::ComponentContext m_aContext;
+ ::cppu::OInterfaceContainerHelper m_aContainerListeners;
+ Columns m_aColumns;
};
}
diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.cxx b/toolkit/source/controls/grid/defaultgriddatamodel.cxx
index adc40b0426d7..4ef99d749ba1 100644
--- a/toolkit/source/controls/grid/defaultgriddatamodel.cxx
+++ b/toolkit/source/controls/grid/defaultgriddatamodel.cxx
@@ -27,318 +27,411 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_toolkit.hxx"
+
#include "defaultgriddatamodel.hxx"
-#include <comphelper/sequence.hxx>
+
+#include <comphelper/stlunosequence.hxx>
+#include <comphelper/componentguard.hxx>
#include <toolkit/helper/servicenames.hxx>
+#include <tools/diagnose_ex.h>
#include <rtl/ref.hxx>
-using ::rtl::OUString;
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::awt;
-using namespace ::com::sun::star::awt::grid;
-using namespace ::com::sun::star::lang;
-
-#define ROWHEIGHT ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RowHeight" ))
-#define ROWHEADERS ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RowHeaders" ))
-#define CELLUPDATED ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "CellUpdated" ))
-#define ROWUPDATED ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RowUpdated" ))
-#define ROWHEADERWIDTH ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RowHeaderWidth" ))
+#include <algorithm>
+//......................................................................................................................
namespace toolkit
+//......................................................................................................................
{
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::lang::XComponent;
+ using ::com::sun::star::lang::EventObject;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::util::XCloneable;
+ /** === end UNO using === **/
+
+ using ::comphelper::stl_begin;
+ using ::comphelper::stl_end;
+
+ //==================================================================================================================
+ //= DefaultGridDataModel
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ DefaultGridDataModel::DefaultGridDataModel()
+ :DefaultGridDataModel_Base( m_aMutex )
+ ,m_aRowHeaders()
+ ,m_nColumnCount(0)
+ {
+ }
-///////////////////////////////////////////////////////////////////////
-// class DefaultGridDataModel
-///////////////////////////////////////////////////////////////////////
+ //------------------------------------------------------------------------------------------------------------------
+ DefaultGridDataModel::DefaultGridDataModel( DefaultGridDataModel const & i_copySource )
+ :cppu::BaseMutex()
+ ,DefaultGridDataModel_Base( m_aMutex )
+ ,m_aData( i_copySource.m_aData )
+ ,m_aRowHeaders( i_copySource.m_aRowHeaders )
+ ,m_nColumnCount( i_copySource.m_nColumnCount )
+ {
+ }
-DefaultGridDataModel::DefaultGridDataModel()
-: rowHeight(0),
- rowHeaders(std::vector< ::rtl::OUString >()),
- m_nRowHeaderWidth(10)
-{
-}
+ //------------------------------------------------------------------------------------------------------------------
+ DefaultGridDataModel::~DefaultGridDataModel()
+ {
+ }
-//---------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ void DefaultGridDataModel::broadcast( GridDataEvent const & i_event,
+ void ( SAL_CALL XGridDataListener::*i_listenerMethod )( GridDataEvent const & ), ::comphelper::ComponentGuard & i_instanceLock )
+ {
+ ::cppu::OInterfaceContainerHelper* pListeners = rBHelper.getContainer( XGridDataListener::static_type() );
+ if ( !pListeners )
+ return;
-DefaultGridDataModel::~DefaultGridDataModel()
-{
-}
+ i_instanceLock.clear();
+ pListeners->notifyEach( i_listenerMethod, i_event );
+ }
-void DefaultGridDataModel::broadcast( broadcast_type eType, const GridDataEvent& aEvent ) throw (::com::sun::star::uno::RuntimeException)
-{
- ::cppu::OInterfaceContainerHelper* pIter = BrdcstHelper.getContainer( XGridDataListener::static_type() );
- if( pIter )
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL DefaultGridDataModel::getRowCount() throw (::com::sun::star::uno::RuntimeException)
{
- ::cppu::OInterfaceIteratorHelper aListIter(*pIter);
- while(aListIter.hasMoreElements())
- {
- XGridDataListener* pListener = static_cast<XGridDataListener*>(aListIter.next());
- switch( eType )
- {
- case row_added: pListener->rowAdded(aEvent); break;
- case row_removed: pListener->rowRemoved(aEvent); break;
- case data_changed: pListener->dataChanged(aEvent); break;
- }
- }
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
+ return m_aData.size();
}
-}
-//---------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL DefaultGridDataModel::getColumnCount() throw (::com::sun::star::uno::RuntimeException)
+ {
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
+ return m_nColumnCount;
+ }
-void DefaultGridDataModel::broadcast_changed( ::rtl::OUString name, sal_Int32 index, Any oldValue, Any newValue) throw (::com::sun::star::uno::RuntimeException)
-{
- Reference< XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) );
- GridDataEvent aEvent( xSource, name, oldValue, newValue, index, ::rtl::OUString(), Sequence< Any >());
- broadcast( data_changed, aEvent);
-}
+ //------------------------------------------------------------------------------------------------------------------
+ DefaultGridDataModel::CellData const & DefaultGridDataModel::impl_getCellData_throw( sal_Int32 const i_column, sal_Int32 const i_row ) const
+ {
+ if ( ( i_row < 0 ) || ( size_t( i_row ) > m_aData.size() )
+ || ( i_column < 0 ) || ( i_column > m_nColumnCount )
+ )
+ throw IndexOutOfBoundsException( ::rtl::OUString(), *const_cast< DefaultGridDataModel* >( this ) );
-//---------------------------------------------------------------------
+ RowData const & rRow( m_aData[ i_row ] );
+ if ( size_t( i_column ) < rRow.size() )
+ return rRow[ i_column ];
-void DefaultGridDataModel::broadcast_add( sal_Int32 index, const ::rtl::OUString & headerName,
- ::com::sun::star::uno::Sequence< Any > rowData ) throw (::com::sun::star::uno::RuntimeException)
-{
- Reference< XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) );
- GridDataEvent aEvent( xSource, ::rtl::OUString(), Any(), Any(), index, headerName, (const ::com::sun::star::uno::Sequence< Any >&)rowData );
- broadcast( row_added, aEvent);
-}
+ static CellData s_aEmpty;
+ return s_aEmpty;
+ }
-//---------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ DefaultGridDataModel::RowData& DefaultGridDataModel::impl_getRowDataAccess_throw( sal_Int32 const i_rowIndex, size_t const i_requiredColumnCount )
+ {
+ OSL_ENSURE( i_requiredColumnCount <= size_t( m_nColumnCount ), "DefaultGridDataModel::impl_getRowDataAccess_throw: invalid column count!" );
+ if ( ( i_rowIndex < 0 ) || ( size_t( i_rowIndex ) >= m_aData.size() ) )
+ throw IndexOutOfBoundsException( ::rtl::OUString(), *this );
+
+ RowData& rRowData( m_aData[ i_rowIndex ] );
+ if ( rRowData.size() < i_requiredColumnCount )
+ rRowData.resize( i_requiredColumnCount );
+ return rRowData;
+ }
-void DefaultGridDataModel::broadcast_remove( sal_Int32 index, const ::rtl::OUString & headerName,
- ::com::sun::star::uno::Sequence< Any > rowData ) throw (::com::sun::star::uno::RuntimeException)
-{
- Reference< XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) );
- GridDataEvent aEvent( xSource, ::rtl::OUString(), Any(), Any(), index, headerName, rowData );
- broadcast( row_removed, aEvent);
-}
+ //------------------------------------------------------------------------------------------------------------------
+ DefaultGridDataModel::CellData& DefaultGridDataModel::impl_getCellDataAccess_throw( sal_Int32 const i_columnIndex, sal_Int32 const i_rowIndex )
+ {
+ if ( ( i_columnIndex < 0 ) || ( i_columnIndex >= m_nColumnCount ) )
+ throw IndexOutOfBoundsException( ::rtl::OUString(), *this );
-//---------------------------------------------------------------------
+ RowData& rRowData( impl_getRowDataAccess_throw( i_rowIndex, size_t( i_columnIndex + 1 ) ) );
+ return rRowData[ i_columnIndex ];
+ }
-//---------------------------------------------------------------------
-// XDefaultGridDataModel
-//---------------------------------------------------------------------
-::sal_Int32 SAL_CALL DefaultGridDataModel::getRowHeight() throw (::com::sun::star::uno::RuntimeException)
-{
- return rowHeight;
-}
+ //------------------------------------------------------------------------------------------------------------------
+ Any SAL_CALL DefaultGridDataModel::getCellData( ::sal_Int32 i_column, ::sal_Int32 i_row ) throw (RuntimeException, IndexOutOfBoundsException)
+ {
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
+ return impl_getCellData_throw( i_column, i_row ).first;
+ }
-//---------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ Any SAL_CALL DefaultGridDataModel::getCellToolTip( ::sal_Int32 i_column, ::sal_Int32 i_row ) throw (RuntimeException, IndexOutOfBoundsException)
+ {
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
+ return impl_getCellData_throw( i_column, i_row ).second;
+ }
-void SAL_CALL DefaultGridDataModel::setRowHeight(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException)
-{
- sal_Int32 oldValue = rowHeight;
- rowHeight = value;
+ //------------------------------------------------------------------------------------------------------------------
+ Any SAL_CALL DefaultGridDataModel::getRowHeading( ::sal_Int32 i_row ) throw (RuntimeException, IndexOutOfBoundsException)
+ {
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
- broadcast_changed( ROWHEIGHT, 0, Any(oldValue), Any(value));
-}
+ if ( ( i_row < 0 ) || ( size_t( i_row ) >= m_aRowHeaders.size() ) )
+ throw IndexOutOfBoundsException( ::rtl::OUString(), *this );
-//---------------------------------------------------------------------
+ return m_aRowHeaders[ i_row ];
+ }
-::sal_Int32 SAL_CALL DefaultGridDataModel::getRowCount() throw (::com::sun::star::uno::RuntimeException)
-{
- return data.size();
-}
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DefaultGridDataModel::addRow( const Any& i_heading, const Sequence< Any >& i_data ) throw (RuntimeException)
+ {
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
-//---------------------------------------------------------------------
+ sal_Int32 const columnCount = i_data.getLength();
-::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL DefaultGridDataModel::getRowHeaders() throw (::com::sun::star::uno::RuntimeException)
-{
- return comphelper::containerToSequence(rowHeaders);
-}
+ // store header name
+ m_aRowHeaders.push_back( i_heading );
-//---------------------------------------------------------------------
+ // store row m_aData
+ impl_addRow( i_data );
-void SAL_CALL DefaultGridDataModel::setRowHeaders(const ::com::sun::star::uno::Sequence< ::rtl::OUString > & value) throw (::com::sun::star::uno::RuntimeException)
-{
- ::com::sun::star::uno::Sequence< ::rtl::OUString > oldValue( comphelper::containerToSequence(rowHeaders) );
+ // update column count
+ if ( columnCount > m_nColumnCount )
+ m_nColumnCount = columnCount;
- std::vector< rtl::OUString>::iterator iterator;
- int i = 0;
- int sequenceSize = value.getLength();
+ sal_Int32 const rowIndex = sal_Int32( m_aData.size() - 1 );
+ broadcast(
+ GridDataEvent( *this, -1, -1, rowIndex, rowIndex ),
+ &XGridDataListener::rowsInserted,
+ aGuard
+ );
+ }
- for(iterator = rowHeaders.begin(); iterator != rowHeaders.end(); iterator++)
+ //------------------------------------------------------------------------------------------------------------------
+ void DefaultGridDataModel::impl_addRow( Sequence< Any > const & i_rowData, sal_Int32 const i_assumedColCount )
{
- if ( sequenceSize > i )
- *iterator = value[i];
- else
- *iterator = ::rtl::OUString();
- i++;
+ OSL_PRECOND( ( i_assumedColCount <= 0 ) || ( i_assumedColCount >= i_rowData.getLength() ),
+ "DefaultGridDataModel::impl_addRow: invalid column count!" );
+
+ RowData newRow( i_assumedColCount > 0 ? i_assumedColCount : i_rowData.getLength() );
+ RowData::iterator cellData = newRow.begin();
+ for ( const Any* pData = stl_begin( i_rowData ); pData != stl_end( i_rowData ); ++pData, ++cellData )
+ cellData->first = *pData;
+
+ m_aData.push_back( newRow );
}
- broadcast_changed( ROWHEADERS, 0, Any(oldValue), Any(comphelper::containerToSequence(rowHeaders)) );
-}
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DefaultGridDataModel::addRows( const Sequence< Any >& i_headings, const Sequence< Sequence< Any > >& i_data ) throw (IllegalArgumentException, RuntimeException)
+ {
+ if ( i_headings.getLength() != i_data.getLength() )
+ throw IllegalArgumentException( ::rtl::OUString(), *this, -1 );
-//---------------------------------------------------------------------
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
-void SAL_CALL DefaultGridDataModel::addRow(const ::rtl::OUString & headername, const ::com::sun::star::uno::Sequence< Any > & rRowdata) throw (::com::sun::star::uno::RuntimeException)
-{
- // store header name
- rowHeaders.push_back(headername);
+ sal_Int32 const rowCount = i_headings.getLength();
+ if ( rowCount == 0 )
+ return;
- // store row data
- std::vector< Any > newRow;
- for ( int i = 0; i < rRowdata.getLength();i++)
- {
- newRow.push_back(rRowdata[i]);
- }
+ // determine max col count in the new data
+ sal_Int32 maxColCount = 0;
+ for ( sal_Int32 row=0; row<rowCount; ++row )
+ if ( i_data[row].getLength() > maxColCount )
+ maxColCount = i_data[row].getLength();
- data.push_back( newRow );
+ if ( maxColCount < m_nColumnCount )
+ maxColCount = m_nColumnCount;
- broadcast_add( data.size()-1, headername, comphelper::containerToSequence(newRow));
+ for ( sal_Int32 row=0; row<rowCount; ++row )
+ {
+ m_aRowHeaders.push_back( i_headings[row] );
+ impl_addRow( i_data[row], maxColCount );
+ }
-}
+ if ( maxColCount > m_nColumnCount )
+ m_nColumnCount = maxColCount;
-//---------------------------------------------------------------------
+ sal_Int32 const firstRow = sal_Int32( m_aData.size() - rowCount );
+ sal_Int32 const lastRow = sal_Int32( m_aData.size() - 1 );
+ broadcast(
+ GridDataEvent( *this, -1, -1, firstRow, lastRow ),
+ &XGridDataListener::rowsInserted,
+ aGuard
+ );
+ }
-void SAL_CALL DefaultGridDataModel::removeRow(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException)
-{
- if ( index >= 0 && index <= getRowCount()-1)
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DefaultGridDataModel::removeRow( ::sal_Int32 i_rowIndex ) throw (IndexOutOfBoundsException, RuntimeException)
{
- ::rtl::OUString headerName( (::rtl::OUString) rowHeaders[index] );
- rowHeaders.erase(rowHeaders.begin() + index);
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
- Sequence< Any > rowData ( (Sequence< Any >&)data[index] );
- data.erase(data.begin() + index);
- broadcast_remove( index, headerName, rowData);
+ if ( ( i_rowIndex < 0 ) || ( size_t( i_rowIndex ) >= m_aData.size() ) )
+ throw IndexOutOfBoundsException( ::rtl::OUString(), *this );
+
+ m_aRowHeaders.erase( m_aRowHeaders.begin() + i_rowIndex );
+ m_aData.erase( m_aData.begin() + i_rowIndex );
+
+ broadcast(
+ GridDataEvent( *this, -1, -1, i_rowIndex, i_rowIndex ),
+ &XGridDataListener::rowsRemoved,
+ aGuard
+ );
}
- else
- return;
-}
-//---------------------------------------------------------------------
-::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< Any > > SAL_CALL DefaultGridDataModel::getData() throw (::com::sun::star::uno::RuntimeException)
-{
- std::vector< std::vector< Any > >::iterator iterator;
- std::vector< Sequence< Any > > dummyContainer(0);
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DefaultGridDataModel::removeAllRows( ) throw (RuntimeException)
+ {
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
+
+ m_aRowHeaders.clear();
+ m_aData.clear();
+ broadcast(
+ GridDataEvent( *this, -1, -1, -1, -1 ),
+ &XGridDataListener::rowsRemoved,
+ aGuard
+ );
+ }
- for(iterator = data.begin(); iterator != data.end(); iterator++)
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DefaultGridDataModel::updateCellData( ::sal_Int32 i_columnIndex, ::sal_Int32 i_rowIndex, const Any& i_value ) throw (IndexOutOfBoundsException, RuntimeException)
{
- Sequence< Any > cols(comphelper::containerToSequence(*iterator));
- dummyContainer.push_back( cols );
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
+
+ impl_getCellDataAccess_throw( i_columnIndex, i_rowIndex ).first = i_value;
+
+ broadcast(
+ GridDataEvent( *this, i_columnIndex, i_columnIndex, i_rowIndex, i_rowIndex ),
+ &XGridDataListener::dataChanged,
+ aGuard
+ );
}
- Sequence< Sequence< Any > > dataSequence(comphelper::containerToSequence(dummyContainer));
- return dataSequence;
-}
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DefaultGridDataModel::updateRowData( const Sequence< ::sal_Int32 >& i_columnIndexes, ::sal_Int32 i_rowIndex, const Sequence< Any >& i_values ) throw (IndexOutOfBoundsException, IllegalArgumentException, RuntimeException)
+ {
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
-//---------------------------------------------------------------------
+ if ( ( i_rowIndex < 0 ) || ( size_t( i_rowIndex ) >= m_aData.size() ) )
+ throw IndexOutOfBoundsException( ::rtl::OUString(), *this );
-void SAL_CALL DefaultGridDataModel::addDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException)
-{
- BrdcstHelper.addListener( XGridDataListener::static_type(), xListener );
-}
+ if ( i_columnIndexes.getLength() != i_values.getLength() )
+ throw IllegalArgumentException( ::rtl::OUString(), *this, 1 );
-//---------------------------------------------------------------------
+ sal_Int32 const columnCount = i_columnIndexes.getLength();
+ if ( columnCount == 0 )
+ return;
-void SAL_CALL DefaultGridDataModel::removeDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException)
-{
- BrdcstHelper.removeListener( XGridDataListener::static_type(), xListener );
-}
-//---------------------------------------------------------------------
-void SAL_CALL DefaultGridDataModel::removeAll() throw (RuntimeException)
-{
- rowHeaders.clear();
- data.clear();
- broadcast_remove( -1, ::rtl::OUString(), Sequence< Any >());
-}
-//---------------------------------------------------------------------
-void SAL_CALL DefaultGridDataModel::setRowHeaderWidth(sal_Int32 _value) throw (::com::sun::star::uno::RuntimeException)
-{
- sal_Int32 oldValue = m_nRowHeaderWidth;
- m_nRowHeaderWidth = _value;
- broadcast_changed( ROWHEADERWIDTH, 0, Any(oldValue), Any(_value) );
-}
-//---------------------------------------------------------------------
-sal_Int32 SAL_CALL DefaultGridDataModel::getRowHeaderWidth() throw (::com::sun::star::uno::RuntimeException)
-{
- return m_nRowHeaderWidth;
-}
-//---------------------------------------------------------------------
-void SAL_CALL DefaultGridDataModel::updateCell(::sal_Int32 row, ::sal_Int32 column, const Any& value) throw (::com::sun::star::uno::RuntimeException)
-{
- if(row >= 0 && row < (signed)data.size())
- {
- if(column >= 0 && column < (signed)data[0].size())
+ for ( sal_Int32 col = 0; col < columnCount; ++col )
{
- data[row][column] = value;
- Sequence< Any >dataSeq(comphelper::containerToSequence(data[row]));
- broadcast_changed( CELLUPDATED, row, Any(column), value );
+ if ( ( i_columnIndexes[col] < 0 ) || ( i_columnIndexes[col] > m_nColumnCount ) )
+ throw IndexOutOfBoundsException( ::rtl::OUString(), *this );
}
- }
-}
-//---------------------------------------------------------------------
-void SAL_CALL DefaultGridDataModel::updateRow(::sal_Int32 row, const ::com::sun::star::uno::Sequence< ::sal_Int32 > & columns, const ::com::sun::star::uno::Sequence< Any > & values) throw (::com::sun::star::uno::RuntimeException)
-{
- if(row >= 0 && row < (signed)data.size())
- {
- if(columns.getLength() == values.getLength())
+
+ RowData& rDataRow = m_aData[ i_rowIndex ];
+ for ( sal_Int32 col = 0; col < columnCount; ++col )
{
- for(int i = 0; i < columns.getLength(); i++)
- data[row][i] = values[i];
- Sequence< Any >dataSeq(comphelper::containerToSequence(data[row]));
- broadcast_changed( ROWUPDATED, row, Any(columns), Any(values) );
+ sal_Int32 const columnIndex = i_columnIndexes[ col ];
+ if ( size_t( columnIndex ) >= rDataRow.size() )
+ rDataRow.resize( columnIndex + 1 );
+
+ rDataRow[ columnIndex ].first = i_values[ col ];
}
+
+ sal_Int32 const firstAffectedColumn = *::std::min_element( stl_begin( i_columnIndexes ), stl_end( i_columnIndexes ) );
+ sal_Int32 const lastAffectedColumn = *::std::max_element( stl_begin( i_columnIndexes ), stl_end( i_columnIndexes ) );
+ broadcast(
+ GridDataEvent( *this, firstAffectedColumn, lastAffectedColumn, i_rowIndex, i_rowIndex ),
+ &XGridDataListener::dataChanged,
+ aGuard
+ );
}
-}
-//---------------------------------------------------------------------
-// XComponent
-//---------------------------------------------------------------------
-void SAL_CALL DefaultGridDataModel::dispose() throw (RuntimeException)
-{
- ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DefaultGridDataModel::updateRowHeading( ::sal_Int32 i_rowIndex, const Any& i_heading ) throw (IndexOutOfBoundsException, RuntimeException)
+ {
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
- ::com::sun::star::lang::EventObject aEvent;
- aEvent.Source.set( static_cast< ::cppu::OWeakObject* >( this ) );
- BrdcstHelper.aLC.disposeAndClear( aEvent );
+ if ( ( i_rowIndex < 0 ) || ( size_t( i_rowIndex ) >= m_aRowHeaders.size() ) )
+ throw IndexOutOfBoundsException( ::rtl::OUString(), *this );
-}
+ m_aRowHeaders[ i_rowIndex ] = i_heading;
-//---------------------------------------------------------------------
+ broadcast(
+ GridDataEvent( *this, -1, -1, i_rowIndex, i_rowIndex ),
+ &XGridDataListener::rowHeadingChanged,
+ aGuard
+ );
+ }
-void SAL_CALL DefaultGridDataModel::addEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException)
-{
- BrdcstHelper.addListener( XEventListener::static_type(), xListener );
-}
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DefaultGridDataModel::updateCellToolTip( ::sal_Int32 i_columnIndex, ::sal_Int32 i_rowIndex, const Any& i_value ) throw (IndexOutOfBoundsException, RuntimeException)
+ {
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
+ impl_getCellDataAccess_throw( i_columnIndex, i_rowIndex ).second = i_value;
+ }
-//---------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DefaultGridDataModel::updateRowToolTip( ::sal_Int32 i_rowIndex, const Any& i_value ) throw (IndexOutOfBoundsException, RuntimeException)
+ {
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
-void SAL_CALL DefaultGridDataModel::removeEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException)
-{
- BrdcstHelper.removeListener( XEventListener::static_type(), xListener );
-}
-//---------------------------------------------------------------------
-// XServiceInfo
-//---------------------------------------------------------------------
+ RowData& rRowData = impl_getRowDataAccess_throw( i_rowIndex, m_nColumnCount );
+ for ( RowData::iterator cell = rRowData.begin(); cell != rRowData.end(); ++cell )
+ cell->second = i_value;
+ }
-::rtl::OUString SAL_CALL DefaultGridDataModel::getImplementationName( ) throw (RuntimeException)
-{
- ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
- static const OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "toolkit.DefaultGridDataModel" ) );
- return aImplName;
-}
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DefaultGridDataModel::addGridDataListener( const Reference< grid::XGridDataListener >& i_listener ) throw (RuntimeException)
+ {
+ rBHelper.addListener( XGridDataListener::static_type(), i_listener );
+ }
-//---------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DefaultGridDataModel::removeGridDataListener( const Reference< grid::XGridDataListener >& i_listener ) throw (RuntimeException)
+ {
+ rBHelper.removeListener( XGridDataListener::static_type(), i_listener );
+ }
-sal_Bool SAL_CALL DefaultGridDataModel::supportsService( const ::rtl::OUString& ServiceName ) throw (RuntimeException)
-{
- ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
- return ServiceName.equalsAscii( szServiceName_DefaultGridDataModel );
-}
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL DefaultGridDataModel::disposing()
+ {
+ ::com::sun::star::lang::EventObject aEvent;
+ aEvent.Source.set( *this );
+ rBHelper.aLC.disposeAndClear( aEvent );
-//---------------------------------------------------------------------
+ ::osl::MutexGuard aGuard( m_aMutex );
+ GridData aEmptyData;
+ m_aData.swap( aEmptyData );
-::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL DefaultGridDataModel::getSupportedServiceNames( ) throw (RuntimeException)
-{
- ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
- static const OUString aServiceName( OUString::createFromAscii( szServiceName_DefaultGridDataModel ) );
- static const Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
-}
+ ::std::vector< Any > aEmptyRowHeaders;
+ m_aRowHeaders.swap( aEmptyRowHeaders );
-}
+ m_nColumnCount = 0;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString SAL_CALL DefaultGridDataModel::getImplementationName( ) throw (RuntimeException)
+ {
+ static const ::rtl::OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "toolkit.DefaultGridDataModel" ) );
+ return aImplName;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ sal_Bool SAL_CALL DefaultGridDataModel::supportsService( const ::rtl::OUString& ServiceName ) throw (RuntimeException)
+ {
+ return ServiceName.equalsAscii( szServiceName_DefaultGridDataModel );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Sequence< ::rtl::OUString > SAL_CALL DefaultGridDataModel::getSupportedServiceNames( ) throw (RuntimeException)
+ {
+ static const ::rtl::OUString aServiceName( ::rtl::OUString::createFromAscii( szServiceName_DefaultGridDataModel ) );
+ static const Sequence< ::rtl::OUString > aSeq( &aServiceName, 1 );
+ return aSeq;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XCloneable > SAL_CALL DefaultGridDataModel::createClone( ) throw (RuntimeException)
+ {
+ return new DefaultGridDataModel( *this );
+ }
+
+//......................................................................................................................
+} // namespace toolkit
+//......................................................................................................................
Reference< XInterface > SAL_CALL DefaultGridDataModel_CreateInstance( const Reference< XMultiServiceFactory >& )
{
diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.hxx b/toolkit/source/controls/grid/defaultgriddatamodel.hxx
index ea11a8a9a00a..bf4b6cc3355e 100644
--- a/toolkit/source/controls/grid/defaultgriddatamodel.hxx
+++ b/toolkit/source/controls/grid/defaultgriddatamodel.hxx
@@ -25,60 +25,68 @@
*
************************************************************************/
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_toolkit.hxx"
-#include <com/sun/star/awt/grid/XGridDataModel.hpp>
-#include <com/sun/star/awt/grid/GridDataEvent.hpp>
-#include <com/sun/star/awt/grid/XGridDataListener.hpp>
-#include <com/sun/star/awt/XControl.hpp>
-#include <com/sun/star/lang/XEventListener.hpp>
+#include <com/sun/star/awt/grid/XMutableGridDataModel.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
-#include <cppuhelper/implbase2.hxx>
-#include <cppuhelper/implbase3.hxx>
-#include <rtl/ref.hxx>
-#include <vector>
+
+#include <cppuhelper/basemutex.hxx>
+#include <cppuhelper/compbase2.hxx>
#include <toolkit/helper/mutexandbroadcasthelper.hxx>
-using ::rtl::OUString;
+#include <vector>
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::awt;
using namespace ::com::sun::star::awt::grid;
using namespace ::com::sun::star::lang;
+namespace comphelper
+{
+ class ComponentGuard;
+}
+
namespace toolkit
{
enum broadcast_type { row_added, row_removed, data_changed};
-class DefaultGridDataModel : public ::cppu::WeakImplHelper2< XGridDataModel, XServiceInfo >,
- public MutexAndBroadcastHelper
+typedef ::cppu::WeakComponentImplHelper2 < XMutableGridDataModel
+ , XServiceInfo
+ > DefaultGridDataModel_Base;
+
+class DefaultGridDataModel :public ::cppu::BaseMutex
+ ,public DefaultGridDataModel_Base
{
public:
DefaultGridDataModel();
+ DefaultGridDataModel( DefaultGridDataModel const & i_copySource );
virtual ~DefaultGridDataModel();
+ // XMutableGridDataModel
+ virtual void SAL_CALL addRow( const Any& i_heading, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Data ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addRows( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any>& Headings, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > >& Data ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeRow( ::sal_Int32 RowIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeAllRows( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateCellData( ::sal_Int32 ColumnIndex, ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateRowData( const ::com::sun::star::uno::Sequence< ::sal_Int32 >& ColumnIndexes, ::sal_Int32 RowIndex, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Values ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateRowHeading( ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Heading ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateCellToolTip( ::sal_Int32 ColumnIndex, ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateRowToolTip( ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addGridDataListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeGridDataListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
+
// XGridDataModel
- virtual ::sal_Int32 SAL_CALL getRowHeight() throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setRowHeight(::sal_Int32 the_value) throw (::com::sun::star::uno::RuntimeException);
virtual ::sal_Int32 SAL_CALL getRowCount() throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getRowHeaders() throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setRowHeaders(const ::com::sun::star::uno::Sequence< ::rtl::OUString > & value) throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< Any > > SAL_CALL getData() throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addRow(const ::rtl::OUString & headername, const ::com::sun::star::uno::Sequence< Any > & data) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeRow(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException);
- virtual void SAL_CALL removeDataListener( const Reference< XGridDataListener >& xListener ) throw (RuntimeException);
- virtual void SAL_CALL removeAll() throw (RuntimeException);
- virtual void SAL_CALL setRowHeaderWidth(sal_Int32 _value) throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getRowHeaderWidth() throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateCell( ::sal_Int32 row, ::sal_Int32 column, const ::com::sun::star::uno::Any& value ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateRow( ::sal_Int32 row, const ::com::sun::star::uno::Sequence< ::sal_Int32 >& columns, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& values ) throw (::com::sun::star::uno::RuntimeException);
- // XComponent
- virtual void SAL_CALL dispose( ) throw (RuntimeException);
- virtual void SAL_CALL addEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException);
- virtual void SAL_CALL removeEventListener( const Reference< XEventListener >& aListener ) throw (RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getColumnCount() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getCellData( ::sal_Int32 Column, ::sal_Int32 Row ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getCellToolTip( ::sal_Int32 Column, ::sal_Int32 Row ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getRowHeading( ::sal_Int32 RowIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ // OComponentHelper
+ virtual void SAL_CALL disposing();
+
+ // XCloneable
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone( ) throw (::com::sun::star::uno::RuntimeException);
// XServiceInfo
virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (RuntimeException);
@@ -86,16 +94,25 @@ public:
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (RuntimeException);
private:
+ typedef ::std::pair< Any, Any > CellData;
+ typedef ::std::vector< CellData > RowData;
+ typedef ::std::vector< RowData > GridData;
+
+ void broadcast(
+ GridDataEvent const & i_event,
+ void ( SAL_CALL ::com::sun::star::awt::grid::XGridDataListener::*i_listenerMethod )( ::com::sun::star::awt::grid::GridDataEvent const & ),
+ ::comphelper::ComponentGuard & i_instanceLock
+ );
+
+ void impl_addRow( Sequence< Any > const & i_rowData, sal_Int32 const i_assumedColCount = -1 );
- void broadcast( broadcast_type eType, const GridDataEvent& aEvent ) throw (::com::sun::star::uno::RuntimeException);
- void broadcast_changed( ::rtl::OUString name, sal_Int32 index, Any oldValue, Any newValue ) throw (::com::sun::star::uno::RuntimeException);
- void broadcast_add( sal_Int32 index, const ::rtl::OUString & headerName, const ::com::sun::star::uno::Sequence< Any > rowData ) throw (::com::sun::star::uno::RuntimeException);
- void broadcast_remove( sal_Int32 index, const ::rtl::OUString & headerName, const ::com::sun::star::uno::Sequence< Any > rowData ) throw (::com::sun::star::uno::RuntimeException);
+ CellData const & impl_getCellData_throw( sal_Int32 const i_columnIndex, sal_Int32 const i_rowIndex ) const;
+ CellData& impl_getCellDataAccess_throw( sal_Int32 const i_columnIndex, sal_Int32 const i_rowIndex );
+ RowData& impl_getRowDataAccess_throw( sal_Int32 const i_rowIndex, size_t const i_requiredColumnCount );
- sal_Int32 rowHeight;
- std::vector< std::vector < Any > > data;
- std::vector< ::rtl::OUString > rowHeaders;
- sal_Int32 m_nRowHeaderWidth;
+ GridData m_aData;
+ ::std::vector< ::com::sun::star::uno::Any > m_aRowHeaders;
+ sal_Int32 m_nColumnCount;
};
}
diff --git a/toolkit/source/controls/grid/gridcolumn.cxx b/toolkit/source/controls/grid/gridcolumn.cxx
index 6720d639f5c1..c1216d53f328 100644
--- a/toolkit/source/controls/grid/gridcolumn.cxx
+++ b/toolkit/source/controls/grid/gridcolumn.cxx
@@ -25,281 +25,305 @@
*
************************************************************************/
-// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_toolkit.hxx"
#include "gridcolumn.hxx"
+
#include <comphelper/sequence.hxx>
+#include <cppuhelper/typeprovider.hxx>
#include <toolkit/helper/servicenames.hxx>
-#include <rtl/ref.hxx>
-
-using ::rtl::OUString;
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::awt;
-using namespace ::com::sun::star::awt::grid;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::style;
-
-#define COLWIDTH ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ColWidth" ))
-#define MAXWIDTH ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MaxWidth" ))
-#define MINWIDTH ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MinWidth" ))
-#define PREFWIDTH ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "PrefWidth" ))
-#define HALIGN ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HAlign" ))
-#define TITLE ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Title" ))
-#define COLRESIZE ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ColumnResize" ))
-#define UPDATE ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "UpdateWidth" ))
namespace toolkit
{
-
-///////////////////////////////////////////////////////////////////////
-// class GridColumn
-///////////////////////////////////////////////////////////////////////
-
-GridColumn::GridColumn()
-: identifier(Any())
-,index(0)
-,columnWidth(4)
-,preferredWidth(0)
-,maxWidth(0)
-,minWidth(0)
-,bResizeable(true)
-,horizontalAlign(HorizontalAlignment(0))
-{
-}
-
-//---------------------------------------------------------------------
-
-GridColumn::~GridColumn()
-{
-}
-
-//---------------------------------------------------------------------
-
-void GridColumn::broadcast( broadcast_column_type eType, const GridColumnEvent& aEvent )
-{
- ::cppu::OInterfaceContainerHelper* pIter = BrdcstHelper.getContainer( XGridColumnListener::static_type() );
- if( pIter )
- {
- ::cppu::OInterfaceIteratorHelper aListIter(*pIter);
- while(aListIter.hasMoreElements())
- {
- XGridColumnListener* pListener = static_cast<XGridColumnListener*>(aListIter.next());
- switch( eType )
- {
- case column_attribute_changed: pListener->columnChanged(aEvent); break;
- }
- }
+ using namespace ::com::sun::star;
+ using namespace ::com::sun::star::uno;
+ using namespace ::com::sun::star::awt;
+ using namespace ::com::sun::star::awt::grid;
+ using namespace ::com::sun::star::lang;
+ using namespace ::com::sun::star::util;
+ using namespace ::com::sun::star::style;
+
+ //==================================================================================================================
+ //= DefaultGridColumnModel
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ GridColumn::GridColumn()
+ :GridColumn_Base( m_aMutex )
+ ,m_aIdentifier()
+ ,m_nIndex(-1)
+ ,m_nDataColumnIndex(-1)
+ ,m_nColumnWidth(4)
+ ,m_nMaxWidth(0)
+ ,m_nMinWidth(0)
+ ,m_nFlexibility(1)
+ ,m_bResizeable(true)
+ ,m_eHorizontalAlign( HorizontalAlignment_LEFT )
+ {
}
-}
-
-//---------------------------------------------------------------------
-
-void GridColumn::broadcast_changed(::rtl::OUString name, Any oldValue, Any newValue)
-{
- Reference< XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) );
- GridColumnEvent aEvent( xSource, name, oldValue, newValue, index);
- broadcast( column_attribute_changed, aEvent);
-}
-
-void SAL_CALL GridColumn::updateColumn(const ::rtl::OUString& name, sal_Int32 width) throw (::com::sun::star::uno::RuntimeException)
-{
- if(PREFWIDTH == name)
- preferredWidth = width;
- else if (COLWIDTH == name)
- columnWidth = width;
-}
-//---------------------------------------------------------------------
-// XGridColumn
-//---------------------------------------------------------------------
-
-::com::sun::star::uno::Any SAL_CALL GridColumn::getIdentifier() throw (::com::sun::star::uno::RuntimeException)
-{
- return identifier;
-}
-//---------------------------------------------------------------------
-
-void SAL_CALL GridColumn::setIdentifier(const ::com::sun::star::uno::Any & value) throw (::com::sun::star::uno::RuntimeException)
-{
- value >>= identifier;
-}
+ //------------------------------------------------------------------------------------------------------------------
+ GridColumn::GridColumn( GridColumn const & i_copySource )
+ :cppu::BaseMutex()
+ ,GridColumn_Base( m_aMutex )
+ ,m_aIdentifier( i_copySource.m_aIdentifier )
+ ,m_nIndex( -1 )
+ ,m_nDataColumnIndex( i_copySource.m_nDataColumnIndex )
+ ,m_nColumnWidth( i_copySource.m_nColumnWidth )
+ ,m_nMaxWidth( i_copySource.m_nMaxWidth )
+ ,m_nMinWidth( i_copySource.m_nMinWidth )
+ ,m_nFlexibility( i_copySource.m_nFlexibility )
+ ,m_bResizeable( i_copySource.m_bResizeable )
+ ,m_sTitle( i_copySource.m_sTitle )
+ ,m_sHelpText( i_copySource.m_sHelpText )
+ ,m_eHorizontalAlign( i_copySource.m_eHorizontalAlign )
+ {
+ }
-//--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ GridColumn::~GridColumn()
+ {
+ }
-::sal_Int32 SAL_CALL GridColumn::getColumnWidth() throw (::com::sun::star::uno::RuntimeException)
-{
- broadcast_changed(UPDATE, Any(columnWidth), Any());
- return columnWidth;
-}
+ //------------------------------------------------------------------------------------------------------------------
+ void GridColumn::broadcast_changed( sal_Char const * const i_asciiAttributeName, Any i_oldValue, Any i_newValue,
+ ::comphelper::ComponentGuard& i_Guard )
+ {
+ Reference< XInterface > const xSource( static_cast< ::cppu::OWeakObject* >( this ) );
+ GridColumnEvent const aEvent(
+ xSource, ::rtl::OUString::createFromAscii( i_asciiAttributeName ),
+ i_oldValue, i_newValue, m_nIndex
+ );
-//--------------------------------------------------------------------
+ ::cppu::OInterfaceContainerHelper* pIter = rBHelper.getContainer( XGridColumnListener::static_type() );
-void SAL_CALL GridColumn::setColumnWidth(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException)
-{
- columnWidth = value;
- broadcast_changed(COLWIDTH, Any(columnWidth),Any(value));
-}
-//--------------------------------------------------------------------
+ i_Guard.clear();
+ if( pIter )
+ pIter->notifyEach( &XGridColumnListener::columnChanged, aEvent );
+ }
-::sal_Int32 SAL_CALL GridColumn::getPreferredWidth() throw (::com::sun::star::uno::RuntimeException)
-{
- broadcast_changed(UPDATE, Any(preferredWidth), Any());
- return preferredWidth;
-}
+ //------------------------------------------------------------------------------------------------------------------
+ ::com::sun::star::uno::Any SAL_CALL GridColumn::getIdentifier() throw (::com::sun::star::uno::RuntimeException)
+ {
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
+ return m_aIdentifier;
+ }
-//--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL GridColumn::setIdentifier(const ::com::sun::star::uno::Any & value) throw (::com::sun::star::uno::RuntimeException)
+ {
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
+ m_aIdentifier = value;
+ }
-void SAL_CALL GridColumn::setPreferredWidth(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException)
-{
- preferredWidth = value;
- broadcast_changed(PREFWIDTH, Any(preferredWidth),Any(value));
-}
-//--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL GridColumn::getColumnWidth() throw (::com::sun::star::uno::RuntimeException)
+ {
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
+ return m_nColumnWidth;
+ }
-::sal_Int32 SAL_CALL GridColumn::getMaxWidth() throw (::com::sun::star::uno::RuntimeException)
-{
- return maxWidth;
-}
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL GridColumn::setColumnWidth(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException)
+ {
+ impl_set( m_nColumnWidth, value, "ColumnWidth" );
+ }
-//--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL GridColumn::getMaxWidth() throw (::com::sun::star::uno::RuntimeException)
+ {
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
+ return m_nMaxWidth;
+ }
-void SAL_CALL GridColumn::setMaxWidth(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException)
-{
- maxWidth = value;
- broadcast_changed(MAXWIDTH, Any(maxWidth),Any(value));
-}
-//--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL GridColumn::setMaxWidth(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException)
+ {
+ impl_set( m_nMaxWidth, value, "MaxWidth" );
+ }
-::sal_Int32 SAL_CALL GridColumn::getMinWidth() throw (::com::sun::star::uno::RuntimeException)
-{
- return minWidth;
-}
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL GridColumn::getMinWidth() throw (::com::sun::star::uno::RuntimeException)
+ {
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
+ return m_nMinWidth;
+ }
-//--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL GridColumn::setMinWidth(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException)
+ {
+ impl_set( m_nMinWidth, value, "MinWidth" );
+ }
-void SAL_CALL GridColumn::setMinWidth(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException)
-{
- minWidth = value;
- broadcast_changed(MINWIDTH, Any(minWidth),Any(value));
-}
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString SAL_CALL GridColumn::getTitle() throw (::com::sun::star::uno::RuntimeException)
+ {
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
+ return m_sTitle;
+ }
-//--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL GridColumn::setTitle(const ::rtl::OUString & value) throw (::com::sun::star::uno::RuntimeException)
+ {
+ impl_set( m_sTitle, value, "Title" );
+ }
-::rtl::OUString SAL_CALL GridColumn::getTitle() throw (::com::sun::star::uno::RuntimeException)
-{
- return title;
-}
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString SAL_CALL GridColumn::getHelpText() throw (RuntimeException)
+ {
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
+ return m_sHelpText;
+ }
-//--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL GridColumn::setHelpText( const ::rtl::OUString & value ) throw (RuntimeException)
+ {
+ impl_set( m_sHelpText, value, "HelpText" );
+ }
-void SAL_CALL GridColumn::setTitle(const ::rtl::OUString & value) throw (::com::sun::star::uno::RuntimeException)
-{
- title = value;
- broadcast_changed(TITLE, Any(title),Any(value));
-}
-//--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ sal_Bool SAL_CALL GridColumn::getResizeable() throw (::com::sun::star::uno::RuntimeException)
+ {
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
+ return m_bResizeable;
+ }
-sal_Bool SAL_CALL GridColumn::getResizeable() throw (::com::sun::star::uno::RuntimeException)
-{
- return bResizeable;
-}
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL GridColumn::setResizeable(sal_Bool value) throw (::com::sun::star::uno::RuntimeException)
+ {
+ impl_set( m_bResizeable, value, "Resizeable" );
+ }
-//--------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL GridColumn::getFlexibility() throw (RuntimeException)
+ {
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
+ return m_nFlexibility;
+ }
-void SAL_CALL GridColumn::setResizeable(sal_Bool value) throw (::com::sun::star::uno::RuntimeException)
-{
- bResizeable = value;
- broadcast_changed(COLRESIZE, Any(bResizeable),Any(value));
-}
-//---------------------------------------------------------------------
-HorizontalAlignment SAL_CALL GridColumn::getHorizontalAlign() throw (::com::sun::star::uno::RuntimeException)
-{
- return horizontalAlign;
-}
-//---------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL GridColumn::setFlexibility( ::sal_Int32 i_value ) throw (IllegalArgumentException, RuntimeException)
+ {
+ if ( i_value < 0 )
+ throw IllegalArgumentException( ::rtl::OUString(), *this, 1 );
+ impl_set( m_nFlexibility, i_value, "Flexibility" );
+ }
-void SAL_CALL GridColumn::setHorizontalAlign(HorizontalAlignment align) throw (::com::sun::star::uno::RuntimeException)
-{
- horizontalAlign = align;
- broadcast_changed(HALIGN, Any(horizontalAlign),Any(align));
-}
-//---------------------------------------------------------------------
-void SAL_CALL GridColumn::addColumnListener( const Reference< XGridColumnListener >& xListener ) throw (RuntimeException)
-{
- BrdcstHelper.addListener( XGridColumnListener::static_type(), xListener );
-}
+ //------------------------------------------------------------------------------------------------------------------
+ HorizontalAlignment SAL_CALL GridColumn::getHorizontalAlign() throw (::com::sun::star::uno::RuntimeException)
+ {
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
+ return m_eHorizontalAlign;
+ }
-//---------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL GridColumn::setHorizontalAlign(HorizontalAlignment align) throw (::com::sun::star::uno::RuntimeException)
+ {
+ impl_set( m_eHorizontalAlign, align, "HorizontalAlign" );
+ }
-void SAL_CALL GridColumn::removeColumnListener( const Reference< XGridColumnListener >& xListener ) throw (RuntimeException)
-{
- BrdcstHelper.removeListener( XGridColumnListener::static_type(), xListener );
-}
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL GridColumn::addGridColumnListener( const Reference< XGridColumnListener >& xListener ) throw (RuntimeException)
+ {
+ rBHelper.addListener( XGridColumnListener::static_type(), xListener );
+ }
-//---------------------------------------------------------------------
-// XComponent
-//---------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL GridColumn::removeGridColumnListener( const Reference< XGridColumnListener >& xListener ) throw (RuntimeException)
+ {
+ rBHelper.removeListener( XGridColumnListener::static_type(), xListener );
+ }
-void SAL_CALL GridColumn::dispose() throw (RuntimeException)
-{
- ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL GridColumn::disposing()
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+ m_aIdentifier.clear();
+ m_sTitle = m_sHelpText = ::rtl::OUString();
+ }
- ::com::sun::star::lang::EventObject aEvent;
- aEvent.Source.set( static_cast< ::cppu::OWeakObject* >( this ) );
- BrdcstHelper.aLC.disposeAndClear( aEvent );
-}
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL GridColumn::getIndex() throw (RuntimeException)
+ {
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
+ return m_nIndex;
+ }
-//---------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ void GridColumn::setIndex( sal_Int32 const i_index )
+ {
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
+ m_nIndex = i_index;
+ }
-void SAL_CALL GridColumn::addEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException)
-{
- BrdcstHelper.addListener( XEventListener::static_type(), xListener );
-}
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL GridColumn::getDataColumnIndex() throw(RuntimeException)
+ {
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
+ return m_nDataColumnIndex;
+ }
-//---------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL GridColumn::setDataColumnIndex( ::sal_Int32 i_dataColumnIndex ) throw(RuntimeException)
+ {
+ impl_set( m_nDataColumnIndex, i_dataColumnIndex, "DataColumnIndex" );
+ }
-void SAL_CALL GridColumn::removeEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException)
-{
- BrdcstHelper.removeListener( XEventListener::static_type(), xListener );
-}
-void SAL_CALL GridColumn::setIndex(sal_Int32 _nIndex) throw (::com::sun::star::uno::RuntimeException)
-{
- index = _nIndex;
-}
-//---------------------------------------------------------------------
-// XServiceInfo
-//---------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString SAL_CALL GridColumn::getImplementationName( ) throw (RuntimeException)
+ {
+ return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.comp.toolkit.GridColumn" ) );
+ }
-::rtl::OUString SAL_CALL GridColumn::getImplementationName( ) throw (RuntimeException)
-{
- ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
- static const OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "toolkit.GridColumn" ) );
- return aImplName;
-}
+ //------------------------------------------------------------------------------------------------------------------
+ sal_Bool SAL_CALL GridColumn::supportsService( const ::rtl::OUString& i_serviceName ) throw (RuntimeException)
+ {
+ const Sequence< ::rtl::OUString > aServiceNames( getSupportedServiceNames() );
+ for ( sal_Int32 i=0; i<aServiceNames.getLength(); ++i )
+ if ( aServiceNames[i] == i_serviceName )
+ return sal_True;
+ return sal_False;
+ }
-//---------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL GridColumn::getSupportedServiceNames( ) throw (RuntimeException)
+ {
+ const ::rtl::OUString aServiceName( ::rtl::OUString::createFromAscii( szServiceName_GridColumn ) );
+ const Sequence< ::rtl::OUString > aSeq( &aServiceName, 1 );
+ return aSeq;
+ }
-sal_Bool SAL_CALL GridColumn::supportsService( const ::rtl::OUString& ServiceName ) throw (RuntimeException)
-{
- ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
- return ServiceName.equalsAscii( szServiceName_GridColumn );
-}
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XCloneable > SAL_CALL GridColumn::createClone( ) throw (RuntimeException)
+ {
+ return new GridColumn( *this );
+ }
-//---------------------------------------------------------------------
+ //------------------------------------------------------------------------------------------------------------------
+ sal_Int64 SAL_CALL GridColumn::getSomething( const Sequence< sal_Int8 >& i_identifier ) throw(RuntimeException)
+ {
+ if ( ( i_identifier.getLength() == 16 ) && ( i_identifier == getUnoTunnelId() ) )
+ return ::sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this ) );
+ return 0;
+ }
-::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL GridColumn::getSupportedServiceNames( ) throw (RuntimeException)
-{
- ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
- static const OUString aServiceName( OUString::createFromAscii( szServiceName_GridColumn ) );
- static const Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
-}
+ //------------------------------------------------------------------------------------------------------------------
+ Sequence< sal_Int8 > GridColumn::getUnoTunnelId() throw()
+ {
+ static ::cppu::OImplementationId const aId;
+ return aId.getImplementationId();
+ }
+ //------------------------------------------------------------------------------------------------------------------
+ GridColumn* GridColumn::getImplementation( const Reference< XInterface >& i_component )
+ {
+ Reference< XUnoTunnel > const xTunnel( i_component, UNO_QUERY );
+ if ( xTunnel.is() )
+ return reinterpret_cast< GridColumn* >( ::sal::static_int_cast< sal_IntPtr >( xTunnel->getSomething( getUnoTunnelId() ) ) );
+ return NULL;
+ }
}
-Reference< XInterface > SAL_CALL GridColumn_CreateInstance( const Reference< XMultiServiceFactory >& )
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL GridColumn_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& )
{
- return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::GridColumn );
+ return *( new ::toolkit::GridColumn );
}
diff --git a/toolkit/source/controls/grid/gridcolumn.hxx b/toolkit/source/controls/grid/gridcolumn.hxx
index 38d43d55a07b..b1be836a3862 100644
--- a/toolkit/source/controls/grid/gridcolumn.hxx
+++ b/toolkit/source/controls/grid/gridcolumn.hxx
@@ -25,83 +25,111 @@
*
************************************************************************/
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_toolkit.hxx"
+
#include <com/sun/star/awt/grid/XGridColumn.hpp>
-#include <com/sun/star/awt/grid/XGridColumnListener.hpp>
-#include <com/sun/star/awt/grid/GridColumnEvent.hpp>
#include <com/sun/star/lang/XEventListener.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
-#include <cppuhelper/implbase2.hxx>
-#include <cppuhelper/implbase3.hxx>
+#include <com/sun/star/style/HorizontalAlignment.hpp>
+
+#include <cppuhelper/basemutex.hxx>
+#include <cppuhelper/compbase3.hxx>
+#include <comphelper/componentguard.hxx>
#include <rtl/ref.hxx>
-#include <vector>
#include <toolkit/helper/mutexandbroadcasthelper.hxx>
-#include <com/sun/star/style/HorizontalAlignment.hpp>
-using ::rtl::OUString;
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::awt;
-using namespace ::com::sun::star::awt::grid;
-using namespace ::com::sun::star::lang;
+#include <vector>
namespace toolkit
{
-enum broadcast_column_type { column_attribute_changed};
-class GridColumn : public ::cppu::WeakImplHelper2< XGridColumn, XServiceInfo >,
- public MutexAndBroadcastHelper
+typedef ::cppu::WeakComponentImplHelper3 < ::com::sun::star::awt::grid::XGridColumn
+ , ::com::sun::star::lang::XServiceInfo
+ , ::com::sun::star::lang::XUnoTunnel
+ > GridColumn_Base;
+class GridColumn :public ::cppu::BaseMutex
+ ,public GridColumn_Base
{
public:
GridColumn();
+ GridColumn( GridColumn const & i_copySource );
virtual ~GridColumn();
- // XGridColumn
+ // ::com::sun::star::awt::grid::XGridColumn
virtual ::com::sun::star::uno::Any SAL_CALL getIdentifier() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setIdentifier(const ::com::sun::star::uno::Any & value) throw (::com::sun::star::uno::RuntimeException);
virtual ::sal_Int32 SAL_CALL getColumnWidth() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setColumnWidth(::sal_Int32 the_value) throw (::com::sun::star::uno::RuntimeException);
- virtual ::sal_Int32 SAL_CALL getPreferredWidth() throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setPreferredWidth(::sal_Int32 the_value) throw (::com::sun::star::uno::RuntimeException);
virtual ::sal_Int32 SAL_CALL getMaxWidth() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setMaxWidth(::sal_Int32 the_value) throw (::com::sun::star::uno::RuntimeException);
virtual ::sal_Int32 SAL_CALL getMinWidth() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setMinWidth(::sal_Int32 the_value) throw (::com::sun::star::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL getResizeable() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setResizeable(::sal_Bool the_value) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getFlexibility() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setFlexibility( ::sal_Int32 _flexibility ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
virtual ::rtl::OUString SAL_CALL getTitle() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setTitle(const ::rtl::OUString & value) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getHelpText() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setHelpText(const ::rtl::OUString & value) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getIndex() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getDataColumnIndex() throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setDataColumnIndex( ::sal_Int32 i_dataColumnIndex ) throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::style::HorizontalAlignment SAL_CALL getHorizontalAlign() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setHorizontalAlign(::com::sun::star::style::HorizontalAlignment align) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addColumnListener( const Reference< XGridColumnListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeColumnListener( const Reference< XGridColumnListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updateColumn( const ::rtl::OUString& name, ::sal_Int32 width ) throw (::com::sun::star::uno::RuntimeException);
- // XComponent
- virtual void SAL_CALL dispose( ) throw (RuntimeException);
- virtual void SAL_CALL addEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException);
- virtual void SAL_CALL removeEventListener( const Reference< XEventListener >& aListener ) throw (RuntimeException);
+ virtual void SAL_CALL addGridColumnListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeGridColumnListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+
+ // OComponentHelper
+ virtual void SAL_CALL disposing();
+
+ // XCloneable (base of XGridColumn)
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone( ) throw (::com::sun::star::uno::RuntimeException);
// XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (RuntimeException);
- virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XUnoTunnel and friends
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& i_identifier ) throw(::com::sun::star::uno::RuntimeException);
+ static ::com::sun::star::uno::Sequence< sal_Int8 > getUnoTunnelId() throw();
+ static GridColumn* getImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& i_component );
+
+ // attribute access
+ void setIndex( sal_Int32 const i_index );
- virtual void SAL_CALL setIndex(sal_Int32 _nIndex)throw (::com::sun::star::uno::RuntimeException);
private:
- void broadcast( broadcast_column_type eType, const GridColumnEvent& aEvent );
- void broadcast_changed( ::rtl::OUString name, Any oldValue, Any newValue);
-
- Any identifier;
- sal_Int32 index;
- sal_Int32 columnWidth;
- sal_Int32 preferredWidth;
- sal_Int32 maxWidth;
- sal_Int32 minWidth;
- sal_Bool bResizeable;
- ::rtl::OUString title;
- ::com::sun::star::style::HorizontalAlignment horizontalAlign;
+ void broadcast_changed(
+ sal_Char const * const i_asciiAttributeName,
+ ::com::sun::star::uno::Any i_oldValue,
+ ::com::sun::star::uno::Any i_newValue,
+ ::comphelper::ComponentGuard& i_Guard
+ );
+
+ template< class TYPE >
+ void impl_set( TYPE & io_attribute, TYPE const & i_newValue, sal_Char const * i_attributeName )
+ {
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
+ if ( io_attribute == i_newValue )
+ return;
+
+ TYPE const aOldValue( io_attribute );
+ io_attribute = i_newValue;
+ broadcast_changed( i_attributeName, ::com::sun::star::uno::makeAny( aOldValue ), ::com::sun::star::uno::makeAny( io_attribute ), aGuard );
+ }
+
+ ::com::sun::star::uno::Any m_aIdentifier;
+ sal_Int32 m_nIndex;
+ sal_Int32 m_nDataColumnIndex;
+ sal_Int32 m_nColumnWidth;
+ sal_Int32 m_nMaxWidth;
+ sal_Int32 m_nMinWidth;
+ sal_Int32 m_nFlexibility;
+ sal_Bool m_bResizeable;
+ ::rtl::OUString m_sTitle;
+ ::rtl::OUString m_sHelpText;
+ ::com::sun::star::style::HorizontalAlignment m_eHorizontalAlign;
};
}
diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx
index 5125c1349ade..acda52753a60 100644
--- a/toolkit/source/controls/grid/gridcontrol.cxx
+++ b/toolkit/source/controls/grid/gridcontrol.cxx
@@ -28,22 +28,27 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_toolkit.hxx"
-#include <gridcontrol.hxx>
+#include "gridcontrol.hxx"
+#include "grideventforwarder.hxx"
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/view/SelectionType.hpp>
#include <com/sun/star/awt/grid/XGridDataModel.hpp>
+#include <com/sun/star/awt/grid/XMutableGridDataModel.hpp>
+#include <com/sun/star/awt/grid/DefaultGridDataModel.hpp>
+#include <com/sun/star/awt/grid/SortableGridDataModel.hpp>
#include <com/sun/star/awt/grid/XGridColumnModel.hpp>
-#include <com/sun/star/awt/grid/ScrollBarMode.hpp>
#include <toolkit/helper/unopropertyarrayhelper.hxx>
#include <toolkit/helper/property.hxx>
#include <com/sun/star/awt/XVclWindowPeer.hpp>
#include <comphelper/processfactory.hxx>
-#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
+#include <tools/color.hxx>
using ::rtl::OUString;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::awt;
using namespace ::com::sun::star::awt::grid;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::beans;
@@ -52,10 +57,28 @@ using namespace ::com::sun::star::view;
namespace toolkit
{
-// ----------------------------------------------------
-// class UnoGridModel
-// ----------------------------------------------------
-UnoGridModel::UnoGridModel()
+//======================================================================================================================
+//= UnoGridModel
+//======================================================================================================================
+namespace
+{
+ Reference< XGridDataModel > lcl_getDefaultDataModel_throw( ::comphelper::ComponentContext const & i_context )
+ {
+ Reference< XMutableGridDataModel > const xDelegatorModel( DefaultGridDataModel::create( i_context.getUNOContext() ), UNO_QUERY_THROW );
+ Reference< XGridDataModel > const xDataModel( SortableGridDataModel::create( i_context.getUNOContext(), xDelegatorModel ), UNO_QUERY_THROW );
+ return xDataModel;
+ }
+
+ Reference< XGridColumnModel > lcl_getDefaultColumnModel_throw( ::comphelper::ComponentContext const & i_context )
+ {
+ Reference< XGridColumnModel > const xColumnModel( i_context.createComponent( "com.sun.star.awt.grid.DefaultGridColumnModel" ), UNO_QUERY_THROW );
+ return xColumnModel;
+ }
+}
+
+//----------------------------------------------------------------------------------------------------------------------
+UnoGridModel::UnoGridModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory )
+ :UnoControlModel( i_factory )
{
ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR );
ImplRegisterProperty( BASEPROPERTY_BORDER );
@@ -71,36 +94,131 @@ UnoGridModel::UnoGridModel()
ImplRegisterProperty( BASEPROPERTY_VSCROLL );
ImplRegisterProperty( BASEPROPERTY_TABSTOP );
ImplRegisterProperty( BASEPROPERTY_GRID_SHOWROWHEADER );
+ ImplRegisterProperty( BASEPROPERTY_ROW_HEADER_WIDTH );
ImplRegisterProperty( BASEPROPERTY_GRID_SHOWCOLUMNHEADER );
- ImplRegisterProperty( BASEPROPERTY_GRID_DATAMODEL );
- ImplRegisterProperty( BASEPROPERTY_GRID_COLUMNMODEL );
+ ImplRegisterProperty( BASEPROPERTY_COLUMN_HEADER_HEIGHT );
+ ImplRegisterProperty( BASEPROPERTY_ROW_HEIGHT );
+ ImplRegisterProperty( BASEPROPERTY_GRID_DATAMODEL, makeAny( lcl_getDefaultDataModel_throw( maContext ) ) );
+ ImplRegisterProperty( BASEPROPERTY_GRID_COLUMNMODEL, makeAny( lcl_getDefaultColumnModel_throw( maContext ) ) );
ImplRegisterProperty( BASEPROPERTY_GRID_SELECTIONMODE );
ImplRegisterProperty( BASEPROPERTY_FONTRELIEF );
ImplRegisterProperty( BASEPROPERTY_FONTEMPHASISMARK );
ImplRegisterProperty( BASEPROPERTY_FONTDESCRIPTOR );
ImplRegisterProperty( BASEPROPERTY_TEXTCOLOR );
- ImplRegisterProperty( BASEPROPERTY_VERTICALALIGN );
- ImplRegisterProperty( BASEPROPERTY_GRID_EVEN_ROW_BACKGROUND );
- ImplRegisterProperty( BASEPROPERTY_GRID_HEADER_BACKGROUND );
+ ImplRegisterProperty( BASEPROPERTY_TEXTLINECOLOR );
+ ImplRegisterProperty( BASEPROPERTY_USE_GRID_LINES );
ImplRegisterProperty( BASEPROPERTY_GRID_LINE_COLOR );
- ImplRegisterProperty( BASEPROPERTY_GRID_ROW_BACKGROUND );
+ ImplRegisterProperty( BASEPROPERTY_GRID_HEADER_BACKGROUND );
+ ImplRegisterProperty( BASEPROPERTY_GRID_HEADER_TEXT_COLOR );
+ ImplRegisterProperty( BASEPROPERTY_GRID_ROW_BACKGROUND_COLORS );
+ ImplRegisterProperty( BASEPROPERTY_VERTICALALIGN );
}
+//----------------------------------------------------------------------------------------------------------------------
UnoGridModel::UnoGridModel( const UnoGridModel& rModel )
-: UnoControlModel( rModel )
+ :UnoControlModel( rModel )
{
+ osl_incrementInterlockedCount( &m_refCount );
+ {
+ Reference< XGridDataModel > xDataModel;
+ // clone the data model
+ const Reference< XFastPropertySet > xCloneSource( &const_cast< UnoGridModel& >( rModel ) );
+ try
+ {
+ const Reference< XCloneable > xCloneable( xCloneSource->getFastPropertyValue( BASEPROPERTY_GRID_DATAMODEL ), UNO_QUERY_THROW );
+ xDataModel.set( xCloneable->createClone(), UNO_QUERY_THROW );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ if ( !xDataModel.is() )
+ xDataModel = lcl_getDefaultDataModel_throw( maContext );
+ UnoControlModel::setFastPropertyValue_NoBroadcast( BASEPROPERTY_GRID_DATAMODEL, makeAny( xDataModel ) );
+ // do *not* use setFastPropertyValue here: The UnoControlModel ctor did a simple copy of all property values,
+ // so before this call here, we share our data model with the own of the clone source. setFastPropertyValue,
+ // then, disposes the old data model - which means the data model which in fact belongs to the clone source.
+ // so, call the UnoControlModel's impl-method for setting the value.
+
+ // clone the column model
+ Reference< XGridColumnModel > xColumnModel;
+ try
+ {
+ const Reference< XCloneable > xCloneable( xCloneSource->getFastPropertyValue( BASEPROPERTY_GRID_COLUMNMODEL ), UNO_QUERY_THROW );
+ xColumnModel.set( xCloneable->createClone(), UNO_QUERY_THROW );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ if ( !xColumnModel.is() )
+ xColumnModel = lcl_getDefaultColumnModel_throw( maContext );
+ UnoControlModel::setFastPropertyValue_NoBroadcast( BASEPROPERTY_GRID_COLUMNMODEL, makeAny( xColumnModel ) );
+ // same comment as above: do not use our own setPropertyValue here.
+ }
+ osl_decrementInterlockedCount( &m_refCount );
}
+//----------------------------------------------------------------------------------------------------------------------
UnoControlModel* UnoGridModel::Clone() const
{
return new UnoGridModel( *this );
}
+//----------------------------------------------------------------------------------------------------------------------
+namespace
+{
+ void lcl_dispose_nothrow( const Any& i_component )
+ {
+ try
+ {
+ const Reference< XComponent > xComponent( i_component, UNO_QUERY_THROW );
+ xComponent->dispose();
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+}
+
+//----------------------------------------------------------------------------------------------------------------------
+void SAL_CALL UnoGridModel::dispose( ) throw(RuntimeException)
+{
+ lcl_dispose_nothrow( getFastPropertyValue( BASEPROPERTY_GRID_COLUMNMODEL ) );
+ lcl_dispose_nothrow( getFastPropertyValue( BASEPROPERTY_GRID_DATAMODEL ) );
+
+ UnoControlModel::dispose();
+}
+
+//----------------------------------------------------------------------------------------------------------------------
+void SAL_CALL UnoGridModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue ) throw (Exception)
+{
+ Any aOldSubModel;
+ if ( ( nHandle == BASEPROPERTY_GRID_COLUMNMODEL ) || ( nHandle == BASEPROPERTY_GRID_DATAMODEL ) )
+ {
+ aOldSubModel = getFastPropertyValue( nHandle );
+ if ( aOldSubModel == rValue )
+ {
+ OSL_ENSURE( false, "UnoGridModel::setFastPropertyValue_NoBroadcast: setting the same value, again!" );
+ // shouldn't this have been caught by convertFastPropertyValue?
+ aOldSubModel.clear();
+ }
+ }
+
+ UnoControlModel::setFastPropertyValue_NoBroadcast( nHandle, rValue );
+
+ if ( aOldSubModel.hasValue() )
+ lcl_dispose_nothrow( aOldSubModel );
+}
+
+//----------------------------------------------------------------------------------------------------------------------
OUString UnoGridModel::getServiceName() throw(RuntimeException)
{
return OUString::createFromAscii( szServiceName_GridControlModel );
}
+//----------------------------------------------------------------------------------------------------------------------
Any UnoGridModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
{
switch( nPropId )
@@ -110,27 +228,26 @@ Any UnoGridModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
case BASEPROPERTY_GRID_SELECTIONMODE:
return uno::makeAny( SelectionType(1) );
case BASEPROPERTY_GRID_SHOWROWHEADER:
+ case BASEPROPERTY_USE_GRID_LINES:
return uno::makeAny( (sal_Bool)sal_False );
+ case BASEPROPERTY_ROW_HEADER_WIDTH:
+ return uno::makeAny( sal_Int32( 10 ) );
case BASEPROPERTY_GRID_SHOWCOLUMNHEADER:
- return uno::makeAny( (sal_Bool)sal_False );
- case BASEPROPERTY_GRID_DATAMODEL:
- return uno::makeAny( Reference<XGridDataModel> ());
- case BASEPROPERTY_GRID_COLUMNMODEL:
- return uno::makeAny(Reference<XGridColumnModel>() );
- case BASEPROPERTY_GRID_EVEN_ROW_BACKGROUND:
- return uno::makeAny( com::sun::star::util::Color(0xFFFFFF) );
+ return uno::makeAny( (sal_Bool)sal_True );
+ case BASEPROPERTY_COLUMN_HEADER_HEIGHT:
+ case BASEPROPERTY_ROW_HEIGHT:
case BASEPROPERTY_GRID_HEADER_BACKGROUND:
- return uno::makeAny( com::sun::star::util::Color(0xFFFFFF) );
+ case BASEPROPERTY_GRID_HEADER_TEXT_COLOR:
case BASEPROPERTY_GRID_LINE_COLOR:
- return uno::makeAny( com::sun::star::util::Color(0xFFFFFF) );
- case BASEPROPERTY_GRID_ROW_BACKGROUND:
- return uno::makeAny(com::sun::star::util::Color(0xFFFFFF) );
+ case BASEPROPERTY_GRID_ROW_BACKGROUND_COLORS:
+ return Any();
default:
return UnoControlModel::ImplGetDefaultValue( nPropId );
}
}
+//----------------------------------------------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& UnoGridModel::getInfoHelper()
{
static UnoPropertyArrayHelper* pHelper = NULL;
@@ -142,6 +259,7 @@ Any UnoGridModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
return *pHelper;
}
+//----------------------------------------------------------------------------------------------------------------------
// XMultiPropertySet
Reference< XPropertySetInfo > UnoGridModel::getPropertySetInfo( ) throw(RuntimeException)
{
@@ -150,20 +268,29 @@ Reference< XPropertySetInfo > UnoGridModel::getPropertySetInfo( ) throw(Runtime
}
-// ----------------------------------------------------
-// class UnoGridControl
-// ----------------------------------------------------
-UnoGridControl::UnoGridControl()
-: mSelectionMode(SelectionType(1)),
- m_aSelectionListeners( *this )
+//======================================================================================================================
+//= UnoGridControl
+//======================================================================================================================
+UnoGridControl::UnoGridControl( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoGridControl_Base( i_factory )
+ ,mSelectionMode(SelectionType(1))
+ ,m_aSelectionListeners( *this )
+ ,m_pEventForwarder( new GridEventForwarder( *this ) )
+{
+}
+
+//----------------------------------------------------------------------------------------------------------------------
+UnoGridControl::~UnoGridControl()
{
}
+//----------------------------------------------------------------------------------------------------------------------
OUString UnoGridControl::GetComponentServiceName()
{
return OUString::createFromAscii( "Grid" );
}
+//----------------------------------------------------------------------------------------------------------------------
void SAL_CALL UnoGridControl::dispose( ) throw(RuntimeException)
{
lang::EventObject aEvt;
@@ -172,113 +299,155 @@ void SAL_CALL UnoGridControl::dispose( ) throw(RuntimeException)
UnoControl::dispose();
}
-void UnoGridControl::createPeer( const uno::Reference< awt::XToolkit > & rxToolkit, const uno::Reference< awt::XWindowPeer > & rParentPeer ) throw(uno::RuntimeException)
+//----------------------------------------------------------------------------------------------------------------------
+void SAL_CALL UnoGridControl::createPeer( const uno::Reference< awt::XToolkit > & rxToolkit, const uno::Reference< awt::XWindowPeer > & rParentPeer ) throw(uno::RuntimeException)
{
UnoControlBase::createPeer( rxToolkit, rParentPeer );
- Reference< XGridControl > xGrid( getPeer(), UNO_QUERY_THROW );
+ const Reference< XGridControl > xGrid( getPeer(), UNO_QUERY_THROW );
xGrid->addSelectionListener(&m_aSelectionListeners);
+}
- Reference<XGridDataListener> xListener ( getPeer(), UNO_QUERY_THROW );
- Reference<XGridColumnListener> xColListener ( getPeer(), UNO_QUERY_THROW );
- Reference<XPropertySet> xPropSet ( getModel(), UNO_QUERY_THROW );
-
- Reference<XGridDataModel> xGridDataModel ( xPropSet->getPropertyValue(OUString::createFromAscii( "GridDataModel" )), UNO_QUERY_THROW );
- if(xGridDataModel != NULL)
- xGridDataModel->addDataListener(xListener);
- Reference<XGridColumnModel> xGridColumnModel ( xPropSet->getPropertyValue(OUString::createFromAscii( "ColumnModel" )), UNO_QUERY_THROW );
- if(xGridColumnModel != NULL)
+//----------------------------------------------------------------------------------------------------------------------
+namespace
+{
+ void lcl_setEventForwarding( const Reference< XControlModel >& i_gridControlModel, const ::boost::scoped_ptr< GridEventForwarder >& i_listener,
+ bool const i_add )
{
- for(int i = 0;i<xGridColumnModel->getColumnCount();i++)
+ const Reference< XPropertySet > xModelProps( i_gridControlModel, UNO_QUERY );
+ if ( !xModelProps.is() )
+ return;
+
+ try
{
- xGridColumnModel->getColumn(i)->addColumnListener(xColListener);
+ Reference< XContainer > const xColModel(
+ xModelProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ColumnModel" ) ) ),
+ UNO_QUERY_THROW );
+ if ( i_add )
+ xColModel->addContainerListener( i_listener.get() );
+ else
+ xColModel->removeContainerListener( i_listener.get() );
+
+ Reference< XGridDataModel > const xDataModel(
+ xModelProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "GridDataModel" ) ) ),
+ UNO_QUERY_THROW
+ );
+ Reference< XMutableGridDataModel > const xMutableDataModel( xDataModel, UNO_QUERY );
+ if ( xMutableDataModel.is() )
+ {
+ if ( i_add )
+ xMutableDataModel->addGridDataListener( i_listener.get() );
+ else
+ xMutableDataModel->removeGridDataListener( i_listener.get() );
+ }
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
}
}
}
+//----------------------------------------------------------------------------------------------------------------------
+sal_Bool SAL_CALL UnoGridControl::setModel( const Reference< XControlModel >& i_model ) throw(RuntimeException)
+{
+ lcl_setEventForwarding( getModel(), m_pEventForwarder, false );
+ if ( !UnoGridControl_Base::setModel( i_model ) )
+ return sal_False;
+ lcl_setEventForwarding( getModel(), m_pEventForwarder, true );
+ return sal_True;
+}
-// -------------------------------------------------------------------
-// XGridControl
-
-::sal_Int32 UnoGridControl::getItemIndexAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException)
+//----------------------------------------------------------------------------------------------------------------------
+::sal_Int32 UnoGridControl::getRowAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException)
{
- Reference< XGridControl > xGrid ( getPeer(), UNO_QUERY_THROW );
- return xGrid->getItemIndexAtPoint( x, y );
+ Reference< XGridControl > const xGrid ( getPeer(), UNO_QUERY_THROW );
+ return xGrid->getRowAtPoint( x, y );
}
-void SAL_CALL UnoGridControl::setToolTip(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& text, const ::com::sun::star::uno::Sequence< ::sal_Int32 >& columns) throw (::com::sun::star::uno::RuntimeException)
+//----------------------------------------------------------------------------------------------------------------------
+::sal_Int32 UnoGridControl::getColumnAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException)
{
- Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->setToolTip( text, columns );
+ Reference< XGridControl > const xGrid ( getPeer(), UNO_QUERY_THROW );
+ return xGrid->getColumnAtPoint( x, y );
}
-// -------------------------------------------------------------------
-// XGridSelection
-// -------------------------------------------------------------------
-::sal_Int32 SAL_CALL UnoGridControl::getMinSelectionIndex() throw (::com::sun::star::uno::RuntimeException)
+//----------------------------------------------------------------------------------------------------------------------
+::sal_Int32 SAL_CALL UnoGridControl::getCurrentColumn( ) throw (RuntimeException)
{
- return Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->getMinSelectionIndex();
+ Reference< XGridControl > const xGrid ( getPeer(), UNO_QUERY_THROW );
+ return xGrid->getCurrentColumn();
}
-::sal_Int32 SAL_CALL UnoGridControl::getMaxSelectionIndex() throw (::com::sun::star::uno::RuntimeException)
+//----------------------------------------------------------------------------------------------------------------------
+::sal_Int32 SAL_CALL UnoGridControl::getCurrentRow( ) throw (RuntimeException)
{
- return Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->getMaxSelectionIndex();
+ Reference< XGridControl > const xGrid ( getPeer(), UNO_QUERY_THROW );
+ return xGrid->getCurrentRow();
}
-void SAL_CALL UnoGridControl::selectRows(const ::com::sun::star::uno::Sequence< ::sal_Int32 >& rangeOfRows) throw (::com::sun::star::uno::RuntimeException)
+//----------------------------------------------------------------------------------------------------------------------
+void SAL_CALL UnoGridControl::selectRow( ::sal_Int32 i_rowIndex ) throw (::com::sun::star::uno::RuntimeException)
{
- Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->selectRows( rangeOfRows);
+ Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->selectRow( i_rowIndex );
}
+//----------------------------------------------------------------------------------------------------------------------
void SAL_CALL UnoGridControl::selectAllRows() throw (::com::sun::star::uno::RuntimeException)
{
Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->selectAllRows();
}
-void SAL_CALL UnoGridControl::deselectRows(const ::com::sun::star::uno::Sequence< ::sal_Int32 >& rangeOfRows) throw (::com::sun::star::uno::RuntimeException)
+
+//----------------------------------------------------------------------------------------------------------------------
+void SAL_CALL UnoGridControl::deselectRow( ::sal_Int32 i_rowIndex ) throw (::com::sun::star::uno::RuntimeException)
{
- Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->deselectRows( rangeOfRows);
+ Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->deselectRow( i_rowIndex );
}
+//----------------------------------------------------------------------------------------------------------------------
void SAL_CALL UnoGridControl::deselectAllRows() throw (::com::sun::star::uno::RuntimeException)
{
Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->deselectAllRows();
}
+
+//----------------------------------------------------------------------------------------------------------------------
::com::sun::star::uno::Sequence< ::sal_Int32 > SAL_CALL UnoGridControl::getSelection() throw (::com::sun::star::uno::RuntimeException)
{
return Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->getSelection();
}
+//----------------------------------------------------------------------------------------------------------------------
::sal_Bool SAL_CALL UnoGridControl::isSelectionEmpty() throw (::com::sun::star::uno::RuntimeException)
{
return Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->isSelectionEmpty();
}
+//----------------------------------------------------------------------------------------------------------------------
::sal_Bool SAL_CALL UnoGridControl::isSelectedIndex(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException)
{
return Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->isSelectedIndex( index );
}
-void SAL_CALL UnoGridControl::selectRow(::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException)
-{
- Reference< XGridControl >( getPeer(), UNO_QUERY_THROW )->selectRow( y );
-}
-
+//----------------------------------------------------------------------------------------------------------------------
void SAL_CALL UnoGridControl::addSelectionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridSelectionListener > & listener) throw (::com::sun::star::uno::RuntimeException)
{
m_aSelectionListeners.addInterface( listener );
}
+//----------------------------------------------------------------------------------------------------------------------
void SAL_CALL UnoGridControl::removeSelectionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridSelectionListener > & listener) throw (::com::sun::star::uno::RuntimeException)
{
m_aSelectionListeners.removeInterface( listener );
}
+
}//namespace toolkit
-Reference< XInterface > SAL_CALL GridControl_CreateInstance( const Reference< XMultiServiceFactory >& )
+Reference< XInterface > SAL_CALL GridControl_CreateInstance( const Reference< XMultiServiceFactory >& i_factory )
{
- return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::UnoGridControl );
+ return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::UnoGridControl( i_factory ) );
}
-Reference< XInterface > SAL_CALL GridControlModel_CreateInstance( const Reference< XMultiServiceFactory >& )
+Reference< XInterface > SAL_CALL GridControlModel_CreateInstance( const Reference< XMultiServiceFactory >& i_factory )
{
- return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::UnoGridModel );
+ return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::UnoGridModel( i_factory ) );
}
diff --git a/toolkit/source/controls/grid/gridcontrol.hxx b/toolkit/source/controls/grid/gridcontrol.hxx
index 0c8ddb1c02b6..61d9f8fc0232 100644
--- a/toolkit/source/controls/grid/gridcontrol.hxx
+++ b/toolkit/source/controls/grid/gridcontrol.hxx
@@ -30,21 +30,20 @@
#include <com/sun/star/awt/grid/XGridControl.hpp>
#include <com/sun/star/view/SelectionType.hpp>
+
#include <toolkit/controls/unocontrolbase.hxx>
#include <toolkit/controls/unocontrolmodel.hxx>
#include <toolkit/helper/servicenames.hxx>
#include <cppuhelper/implbase1.hxx>
#include <comphelper/sequence.hxx>
-
#include <toolkit/helper/listenermultiplexer.hxx>
-namespace toolkit {
+#include <boost/scoped_ptr.hpp>
+
+namespace toolkit
+{
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::awt;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::container;
+class GridEventForwarder;
// ===================================================================
// = UnoGridModel
@@ -52,21 +51,27 @@ using namespace ::com::sun::star::container;
class UnoGridModel : public UnoControlModel
{
protected:
- Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
public:
- UnoGridModel();
+ UnoGridModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
UnoGridModel( const UnoGridModel& rModel );
UnoControlModel* Clone() const;
+ // ::com::sun::star::lang::XComponent
+ void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
+
// ::com::sun::star::beans::XMultiPropertySet
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
// ::com::sun::star::io::XPersistObject
::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
+ // OPropertySetHelper
+ void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception);
+
// XServiceInfo
DECLIMPL_SERVICEINFO_DERIVED( UnoGridModel, UnoControlModel, szServiceName_GridControlModel )
};
@@ -75,10 +80,13 @@ public:
// ===================================================================
// = UnoGridControl
// ===================================================================
-class UnoGridControl : public ::cppu::ImplInheritanceHelper1< UnoControlBase, ::com::sun::star::awt::grid::XGridControl >
+typedef ::cppu::ImplInheritanceHelper1 < UnoControlBase
+ , ::com::sun::star::awt::grid::XGridControl
+ > UnoGridControl_Base;
+class UnoGridControl : public UnoGridControl_Base
{
public:
- UnoGridControl();
+ UnoGridControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
::rtl::OUString GetComponentServiceName();
// ::com::sun::star::lang::XComponent
@@ -86,24 +94,22 @@ public:
// ::com::sun::star::awt::XControl
void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
+ sal_Bool SAL_CALL setModel( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& rxModel ) throw(::com::sun::star::uno::RuntimeException);
// ::com::sun::star::awt::grid::XGridControl
-
- virtual ::sal_Int32 SAL_CALL getItemIndexAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setToolTip(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& text, const ::com::sun::star::uno::Sequence< ::sal_Int32 >& columns) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getColumnAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getRowAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getCurrentColumn( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getCurrentRow( ) throw (::com::sun::star::uno::RuntimeException);
// ::com::sun::star::awt::grid::XGridSelection
-
- virtual ::sal_Int32 SAL_CALL getMinSelectionIndex() throw (::com::sun::star::uno::RuntimeException);
- virtual ::sal_Int32 SAL_CALL getMaxSelectionIndex() throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL selectRows(const ::com::sun::star::uno::Sequence< ::sal_Int32 >& rangeOfRows) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL selectRow( ::sal_Int32 i_rowIndex ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL selectAllRows() throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL deselectRows(const ::com::sun::star::uno::Sequence< ::sal_Int32 >& rangeOfRows) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL deselectRow( ::sal_Int32 i_rowIndex ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL deselectAllRows() throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::sal_Int32 > SAL_CALL getSelection() throw (::com::sun::star::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL isSelectionEmpty() throw (::com::sun::star::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL isSelectedIndex(::sal_Int32 index) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL selectRow(::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL addSelectionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridSelectionListener > & listener) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL removeSelectionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridSelectionListener > & listener) throw (::com::sun::star::uno::RuntimeException);
@@ -111,9 +117,14 @@ public:
DECLIMPL_SERVICEINFO_DERIVED( UnoGridControl, UnoControlBase, szServiceName_GridControl )
using UnoControl::getPeer;
+
+protected:
+ ~UnoGridControl();
+
private:
- ::com::sun::star::view::SelectionType mSelectionMode;
- SelectionListenerMultiplexer m_aSelectionListeners;
+ ::com::sun::star::view::SelectionType mSelectionMode;
+ SelectionListenerMultiplexer m_aSelectionListeners;
+ ::boost::scoped_ptr< GridEventForwarder > m_pEventForwarder;
};
} // toolkit
diff --git a/toolkit/source/controls/grid/grideventforwarder.cxx b/toolkit/source/controls/grid/grideventforwarder.cxx
new file mode 100755
index 000000000000..c3760b8315a3
--- /dev/null
+++ b/toolkit/source/controls/grid/grideventforwarder.cxx
@@ -0,0 +1,149 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_toolkit.hxx"
+
+#include "grideventforwarder.hxx"
+#include "gridcontrol.hxx"
+
+/** === begin UNO includes === **/
+/** === end UNO includes === **/
+
+//......................................................................................................................
+namespace toolkit
+{
+//......................................................................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::awt::grid::GridDataEvent;
+ using ::com::sun::star::container::ContainerEvent;
+ using ::com::sun::star::lang::EventObject;
+ /** === end UNO using === **/
+
+ //==================================================================================================================
+ //= GridEventForwarder
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ GridEventForwarder::GridEventForwarder( UnoGridControl& i_parent )
+ :m_parent( i_parent )
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ GridEventForwarder::~GridEventForwarder()
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL GridEventForwarder::acquire() throw()
+ {
+ m_parent.acquire();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL GridEventForwarder::release() throw()
+ {
+ m_parent.release();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL GridEventForwarder::rowsInserted( const GridDataEvent& i_event ) throw (RuntimeException)
+ {
+ Reference< XGridDataListener > xPeer( m_parent.getPeer(), UNO_QUERY );
+ if ( xPeer.is() )
+ xPeer->rowsInserted( i_event );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL GridEventForwarder::rowsRemoved( const GridDataEvent& i_event ) throw (RuntimeException)
+ {
+ Reference< XGridDataListener > xPeer( m_parent.getPeer(), UNO_QUERY );
+ if ( xPeer.is() )
+ xPeer->rowsRemoved( i_event );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL GridEventForwarder::dataChanged( const GridDataEvent& i_event ) throw (RuntimeException)
+ {
+ Reference< XGridDataListener > xPeer( m_parent.getPeer(), UNO_QUERY );
+ if ( xPeer.is() )
+ xPeer->dataChanged( i_event );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL GridEventForwarder::rowHeadingChanged( const GridDataEvent& i_event ) throw (RuntimeException)
+ {
+ Reference< XGridDataListener > xPeer( m_parent.getPeer(), UNO_QUERY );
+ if ( xPeer.is() )
+ xPeer->rowHeadingChanged( i_event );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL GridEventForwarder::elementInserted( const ContainerEvent& i_event ) throw (RuntimeException)
+ {
+ Reference< XContainerListener > xPeer( m_parent.getPeer(), UNO_QUERY );
+ if ( xPeer.is() )
+ xPeer->elementInserted( i_event );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL GridEventForwarder::elementRemoved( const ContainerEvent& i_event ) throw (RuntimeException)
+ {
+ Reference< XContainerListener > xPeer( m_parent.getPeer(), UNO_QUERY );
+ if ( xPeer.is() )
+ xPeer->elementRemoved( i_event );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL GridEventForwarder::elementReplaced( const ContainerEvent& i_event ) throw (RuntimeException)
+ {
+ Reference< XContainerListener > xPeer( m_parent.getPeer(), UNO_QUERY );
+ if ( xPeer.is() )
+ xPeer->elementReplaced( i_event );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL GridEventForwarder::disposing( const EventObject& i_event ) throw (RuntimeException)
+ {
+ Reference< XEventListener > xPeer( m_parent.getPeer(), UNO_QUERY );
+ if ( xPeer.is() )
+ xPeer->disposing( i_event );
+ }
+
+//......................................................................................................................
+} // namespace toolkit
+//......................................................................................................................
diff --git a/toolkit/source/controls/grid/grideventforwarder.hxx b/toolkit/source/controls/grid/grideventforwarder.hxx
new file mode 100755
index 000000000000..5a8b03f57037
--- /dev/null
+++ b/toolkit/source/controls/grid/grideventforwarder.hxx
@@ -0,0 +1,85 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef TOOLKIT_GRIDEVENTFORWARDER_HXX
+#define TOOLKIT_GRIDEVENTFORWARDER_HXX
+
+/** === begin UNO includes === **/
+#include <com/sun/star/awt/grid/XGridDataListener.hpp>
+#include <com/sun/star/awt/grid/XGridColumnListener.hpp>
+#include <com/sun/star/container/XContainerListener.hpp>
+/** === end UNO includes === **/
+
+#include <cppuhelper/implbase2.hxx>
+
+//......................................................................................................................
+namespace toolkit
+{
+//......................................................................................................................
+
+ class UnoGridControl;
+
+ //==================================================================================================================
+ //= GridEventForwarder
+ //==================================================================================================================
+ typedef ::cppu::ImplHelper2 < ::com::sun::star::awt::grid::XGridDataListener
+ , ::com::sun::star::container::XContainerListener
+ > GridEventForwarder_Base;
+
+ class GridEventForwarder : public GridEventForwarder_Base
+ {
+ public:
+ GridEventForwarder( UnoGridControl& i_parent );
+ virtual ~GridEventForwarder();
+
+ public:
+ // XInterface
+ virtual void SAL_CALL acquire() throw();
+ virtual void SAL_CALL release() throw();
+
+ // XGridDataListener
+ virtual void SAL_CALL rowsInserted( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL rowsRemoved( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL dataChanged( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL rowHeadingChanged( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XContainerListener
+ virtual void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& i_event ) throw (::com::sun::star::uno::RuntimeException);
+
+ private:
+ UnoGridControl& m_parent;
+ };
+
+//......................................................................................................................
+} // namespace toolkit
+//......................................................................................................................
+
+#endif // TOOLKIT_GRIDEVENTFORWARDER_HXX
diff --git a/toolkit/source/controls/grid/initguard.hxx b/toolkit/source/controls/grid/initguard.hxx
new file mode 100755
index 000000000000..b2dddd2e5987
--- /dev/null
+++ b/toolkit/source/controls/grid/initguard.hxx
@@ -0,0 +1,64 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SVTOOLS_INITGUARD_HXX
+#define SVTOOLS_INITGUARD_HXX
+
+/** === begin UNO includes === **/
+#include <com/sun/star/lang/NotInitializedException.hpp>
+/** === end UNO includes === **/
+
+#include <comphelper/componentguard.hxx>
+
+//......................................................................................................................
+namespace toolkit
+{
+//......................................................................................................................
+
+ //==================================================================================================================
+ //= InitGuard
+ //==================================================================================================================
+ template < class IMPL >
+ class InitGuard : public ::comphelper::ComponentGuard
+ {
+ public:
+ InitGuard( IMPL& i_component, ::cppu::OBroadcastHelper & i_broadcastHelper )
+ :comphelper::ComponentGuard( i_component, i_broadcastHelper )
+ {
+ if ( !i_component.isInitialized() )
+ throw ::com::sun::star::lang::NotInitializedException( ::rtl::OUString(), *&i_component );
+ }
+
+ ~InitGuard()
+ {
+ }
+ };
+
+//......................................................................................................................
+} // namespace toolkit
+//......................................................................................................................
+
+#endif // SVTOOLS_INITGUARD_HXX
diff --git a/toolkit/source/controls/grid/sortablegriddatamodel.cxx b/toolkit/source/controls/grid/sortablegriddatamodel.cxx
new file mode 100755
index 000000000000..77a2ffa1637b
--- /dev/null
+++ b/toolkit/source/controls/grid/sortablegriddatamodel.cxx
@@ -0,0 +1,877 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_toolkit.hxx"
+
+#include "sortablegriddatamodel.hxx"
+#include "toolkit/helper/servicenames.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/i18n/XCollator.hpp>
+#include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <com/sun/star/ucb/AlreadyInitializedException.hpp>
+/** === end UNO includes === **/
+
+#include <comphelper/anycompare.hxx>
+#include <cppuhelper/typeprovider.hxx>
+#include <tools/diagnose_ex.h>
+#include <tools/debug.hxx>
+#include <vcl/svapp.hxx>
+
+#include <set>
+
+//......................................................................................................................
+namespace toolkit
+{
+//......................................................................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::TypeClass;
+ using ::com::sun::star::uno::TypeClass_VOID;
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::lang::IndexOutOfBoundsException;
+ using ::com::sun::star::lang::IllegalArgumentException;
+ using ::com::sun::star::awt::grid::XGridDataListener;
+ using ::com::sun::star::beans::Pair;
+ using ::com::sun::star::util::XCloneable;
+ using ::com::sun::star::i18n::XCollator;
+ using ::com::sun::star::lang::IllegalArgumentException;
+ using ::com::sun::star::lang::XMultiServiceFactory;
+ using ::com::sun::star::awt::grid::GridDataEvent;
+ using ::com::sun::star::lang::EventObject;
+ using ::com::sun::star::ucb::AlreadyInitializedException;
+ /** === end UNO using === **/
+
+#ifdef DBG_UTIL
+ const char* SortableGridDataModel_checkInvariants( const void* _pInstance )
+ {
+ return static_cast< const SortableGridDataModel* >( _pInstance )->checkInvariants();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ const char* SortableGridDataModel::checkInvariants() const
+ {
+ if ( m_publicToPrivateRowIndex.size() != m_privateToPublicRowIndex.size() )
+ return "inconsistent index maps";
+
+ if ( m_delegator.is() )
+ {
+ if ( m_publicToPrivateRowIndex.size() != size_t( m_delegator->getRowCount() ) )
+ return "wrong cached row count";
+ }
+ else
+ {
+ if ( !m_publicToPrivateRowIndex.empty() )
+ return "disposed or not initialized, but having a non-empty map";
+ }
+
+ for ( size_t publicIndex=0; publicIndex<m_publicToPrivateRowIndex.size(); ++publicIndex )
+ {
+ ::sal_Int32 const privateIndex = m_publicToPrivateRowIndex[ publicIndex ];
+ if ( ( privateIndex < 0 ) || ( size_t( privateIndex ) >= m_privateToPublicRowIndex.size() ) )
+ return "invalid cached private index";
+
+ if ( m_privateToPublicRowIndex[ privateIndex ] != sal_Int32( publicIndex ) )
+ return "index map traversal not commutavive";
+ }
+
+ if ( impl_isSorted_nothrow() && m_publicToPrivateRowIndex.empty() )
+ return "sorted, but no row index translation tables";
+
+ if ( !impl_isSorted_nothrow() && !m_publicToPrivateRowIndex.empty() )
+ return "unsorted, but have index translation tables";
+
+ return NULL;
+ }
+#endif
+
+#define DBG_CHECK_ME() \
+ DBG_CHKTHIS( SortableGridDataModel, SortableGridDataModel_checkInvariants )
+
+ //------------------------------------------------------------------------------------------------------------------
+ namespace
+ {
+ template< class STLCONTAINER >
+ static void lcl_clear( STLCONTAINER& i_container )
+ {
+ STLCONTAINER empty;
+ empty.swap( i_container );
+ }
+ }
+
+ //==================================================================================================================
+ //= SortableGridDataModel
+ //==================================================================================================================
+ DBG_NAME( SortableGridDataModel )
+ //------------------------------------------------------------------------------------------------------------------
+ SortableGridDataModel::SortableGridDataModel( Reference< XMultiServiceFactory > const & i_factory )
+ :SortableGridDataModel_Base( m_aMutex )
+ ,SortableGridDataModel_PrivateBase()
+ ,m_context( i_factory )
+ ,m_isInitialized( false )
+ ,m_delegator()
+ ,m_collator()
+ ,m_currentSortColumn( -1 )
+ ,m_sortAscending( true )
+ ,m_publicToPrivateRowIndex()
+ ,m_privateToPublicRowIndex()
+ {
+ DBG_CTOR( SortableGridDataModel, SortableGridDataModel_checkInvariants );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ SortableGridDataModel::SortableGridDataModel( SortableGridDataModel const & i_copySource )
+ :cppu::BaseMutex()
+ ,SortableGridDataModel_Base( m_aMutex )
+ ,SortableGridDataModel_PrivateBase()
+ ,m_context( i_copySource.m_context )
+ ,m_isInitialized( true )
+ ,m_delegator()
+ ,m_collator( i_copySource.m_collator )
+ ,m_currentSortColumn( i_copySource.m_currentSortColumn )
+ ,m_sortAscending( i_copySource.m_sortAscending )
+ ,m_publicToPrivateRowIndex( i_copySource.m_publicToPrivateRowIndex )
+ ,m_privateToPublicRowIndex( i_copySource.m_privateToPublicRowIndex )
+ {
+ DBG_CTOR( SortableGridDataModel, SortableGridDataModel_checkInvariants );
+
+ ENSURE_OR_THROW( i_copySource.m_delegator.is(),
+ "not expected to be called for a disposed copy source!" );
+ m_delegator.set( i_copySource.m_delegator->createClone(), UNO_QUERY_THROW );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ SortableGridDataModel::~SortableGridDataModel()
+ {
+ if ( !rBHelper.bDisposed )
+ {
+ acquire();
+ dispose();
+ }
+
+ DBG_DTOR( SortableGridDataModel, SortableGridDataModel_checkInvariants );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Any SAL_CALL SortableGridDataModel::queryInterface( const Type& aType ) throw (RuntimeException)
+ {
+ Any aReturn( SortableGridDataModel_Base::queryInterface( aType ) );
+ if ( !aReturn.hasValue() )
+ aReturn = SortableGridDataModel_PrivateBase::queryInterface( aType );
+ return aReturn;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL SortableGridDataModel::acquire( ) throw ()
+ {
+ SortableGridDataModel_Base::acquire();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL SortableGridDataModel::release( ) throw ()
+ {
+ SortableGridDataModel_Base::release();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Sequence< Type > SAL_CALL SortableGridDataModel::getTypes( ) throw (RuntimeException)
+ {
+ return SortableGridDataModel_Base::getTypes();
+ // don't expose the types got via SortableGridDataModel_PrivateBase - they're private, after all
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Sequence< ::sal_Int8 > SAL_CALL SortableGridDataModel::getImplementationId( ) throw (RuntimeException)
+ {
+ static ::cppu::OImplementationId aId;
+ return aId.getImplementationId();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ namespace
+ {
+ Reference< XCollator > lcl_loadDefaultCollator_throw( ::comphelper::ComponentContext const & i_context )
+ {
+ Reference< XCollator > const xCollator( i_context.createComponent( "com.sun.star.i18n.Collator" ), UNO_QUERY_THROW );
+ xCollator->loadDefaultCollator( Application::GetSettings().GetLocale(), 0 );
+ return xCollator;
+ }
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL SortableGridDataModel::initialize( const Sequence< Any >& i_arguments ) throw (Exception, RuntimeException)
+ {
+ ::comphelper::ComponentGuard aGuard( *this, rBHelper );
+ DBG_CHECK_ME();
+
+ if ( m_delegator.is() )
+ throw AlreadyInitializedException( ::rtl::OUString(), *this );
+
+ Reference< XMutableGridDataModel > xDelegator;
+ Reference< XCollator > xCollator;
+ switch ( i_arguments.getLength() )
+ {
+ case 1: // SortableGridDataModel.create( XMutableGridDataModel )
+ xDelegator.set( i_arguments[0], UNO_QUERY );
+ xCollator = lcl_loadDefaultCollator_throw( m_context );
+ break;
+
+ case 2: // SortableGridDataModel.createWithCollator( XMutableGridDataModel, XCollator )
+ xDelegator.set( i_arguments[0], UNO_QUERY );
+ xCollator.set( i_arguments[1], UNO_QUERY );
+ if ( !xCollator.is() )
+ throw IllegalArgumentException( ::rtl::OUString(), *this, 2 );
+ break;
+ }
+ if ( !xDelegator.is() )
+ throw IllegalArgumentException( ::rtl::OUString(), *this, 1 );
+
+ m_delegator = xDelegator;
+ m_collator = xCollator;
+
+ m_delegator->addGridDataListener( this );
+
+ m_isInitialized = true;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ GridDataEvent SortableGridDataModel::impl_createPublicEvent( GridDataEvent const & i_originalEvent ) const
+ {
+ GridDataEvent aEvent( i_originalEvent );
+ aEvent.Source = *const_cast< SortableGridDataModel* >( this );
+ aEvent.FirstRow = impl_getPublicRowIndex_nothrow( aEvent.FirstRow );
+ aEvent.LastRow = impl_getPublicRowIndex_nothrow( aEvent.LastRow );
+ return aEvent;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SortableGridDataModel::impl_broadcast( void ( SAL_CALL XGridDataListener::*i_listenerMethod )( const GridDataEvent & ),
+ GridDataEvent const & i_publicEvent, MethodGuard& i_instanceLock )
+ {
+ ::cppu::OInterfaceContainerHelper* pListeners = rBHelper.getContainer( XGridDataListener::static_type() );
+ if ( pListeners == NULL )
+ return;
+
+ i_instanceLock.clear();
+ pListeners->notifyEach( i_listenerMethod, i_publicEvent );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL SortableGridDataModel::rowsInserted( const GridDataEvent& i_event ) throw (RuntimeException)
+ {
+ MethodGuard aGuard( *this, rBHelper );
+ DBG_CHECK_ME();
+
+ // if the data is not sorted, broadcast the event unchanged
+ if ( !impl_isSorted_nothrow() )
+ {
+ GridDataEvent const aEvent( impl_createPublicEvent( i_event ) );
+ impl_broadcast( &XGridDataListener::rowsInserted, aEvent, aGuard );
+ return;
+ }
+
+ bool needReIndex = false;
+ if ( i_event.FirstRow > i_event.LastRow )
+ {
+ OSL_ENSURE( false, "SortableGridDataModel::rowsInserted: invalid event - invalid row indexes!" );
+ needReIndex = true;
+ }
+ else if ( size_t( i_event.FirstRow ) > m_privateToPublicRowIndex.size() )
+ {
+ OSL_ENSURE( false, "SortableGridDataModel::rowsInserted: invalid event - too large row index!" );
+ needReIndex = true;
+ }
+
+ if ( needReIndex )
+ {
+ impl_rebuildIndexesAndNotify( aGuard );
+ return;
+ }
+
+ // we do not insert the new rows into the sort order - if somebody adds rows while we're sorted, s/he has
+ // to resort. Instead, we simply append the rows, no matter where they were inserted in the delegator data
+ // model.
+ sal_Int32 const nPublicFirstRow = sal_Int32( m_privateToPublicRowIndex.size() );
+ sal_Int32 nPublicLastRow = nPublicFirstRow;
+ for ( sal_Int32 newRow = i_event.FirstRow; newRow <= i_event.LastRow; ++newRow, ++nPublicLastRow )
+ {
+ m_privateToPublicRowIndex.push_back( nPublicLastRow );
+ m_publicToPrivateRowIndex.push_back( nPublicLastRow );
+ }
+
+ // broadcast the event
+ GridDataEvent const aEvent( *this, -1, -1, nPublicFirstRow, nPublicLastRow );
+ impl_broadcast( &XGridDataListener::rowsInserted, aEvent, aGuard );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ namespace
+ {
+ void lcl_decrementValuesGreaterThan( ::std::vector< ::sal_Int32 > & io_indexMap, sal_Int32 const i_threshold )
+ {
+ for ( ::std::vector< ::sal_Int32 >::iterator loop = io_indexMap.begin();
+ loop != io_indexMap.end();
+ ++loop
+ )
+ {
+ if ( *loop >= i_threshold )
+ --*loop;
+ }
+ }
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SortableGridDataModel::impl_rebuildIndexesAndNotify( MethodGuard& i_instanceLock )
+ {
+ OSL_PRECOND( impl_isSorted_nothrow(), "SortableGridDataModel::impl_rebuildIndexesAndNotify: illegal call!" );
+
+ // clear the indexes
+ lcl_clear( m_publicToPrivateRowIndex );
+ lcl_clear( m_privateToPublicRowIndex );
+
+ // broadcast an artificial event, saying that all rows have been removed
+ GridDataEvent const aRemovalEvent( *this, -1, -1, -1, -1 );
+ impl_broadcast( &XGridDataListener::rowsRemoved, aRemovalEvent, i_instanceLock );
+ i_instanceLock.reset();
+
+ // rebuild the index
+ impl_reIndex_nothrow( m_currentSortColumn, m_sortAscending );
+
+ // broadcast an artificial event, saying that n rows have been added
+ GridDataEvent const aAdditionEvent( *this, -1, -1, 0, m_delegator->getRowCount() - 1 );
+ impl_broadcast( &XGridDataListener::rowsInserted, aAdditionEvent, i_instanceLock );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL SortableGridDataModel::rowsRemoved( const GridDataEvent& i_event ) throw (RuntimeException)
+ {
+ MethodGuard aGuard( *this, rBHelper );
+ DBG_CHECK_ME();
+
+ // if the data is not sorted, broadcast the event unchanged
+ if ( !impl_isSorted_nothrow() )
+ {
+ GridDataEvent const aEvent( impl_createPublicEvent( i_event ) );
+ impl_broadcast( &XGridDataListener::rowsRemoved, aEvent, aGuard );
+ return;
+ }
+
+ // if all rows have been removed, also simply multiplex to own listeners
+ if ( i_event.FirstRow < 0 )
+ {
+ lcl_clear( m_publicToPrivateRowIndex );
+ lcl_clear( m_privateToPublicRowIndex );
+ GridDataEvent aEvent( i_event );
+ aEvent.Source = *this;
+ impl_broadcast( &XGridDataListener::rowsRemoved, aEvent, aGuard );
+ return;
+ }
+
+ bool needReIndex = false;
+ if ( i_event.FirstRow != i_event.LastRow )
+ {
+ OSL_ENSURE( false, "SortableGridDataModel::rowsRemoved: missing implementation - removal of multiple rows!" );
+ needReIndex = true;
+ }
+ else if ( size_t( i_event.FirstRow ) >= m_privateToPublicRowIndex.size() )
+ {
+ OSL_ENSURE( false, "SortableGridDataModel::rowsRemoved: inconsistent/wrong data!" );
+ needReIndex = true;
+ }
+
+ if ( needReIndex )
+ {
+ impl_rebuildIndexesAndNotify( aGuard );
+ return;
+ }
+
+ // build public event version
+ GridDataEvent const aEvent( impl_createPublicEvent( i_event ) );
+
+ // remove the entries from the index maps
+ sal_Int32 const privateIndex = i_event.FirstRow;
+ sal_Int32 const publicIndex = aEvent.FirstRow;
+
+ m_publicToPrivateRowIndex.erase( m_publicToPrivateRowIndex.begin() + publicIndex );
+ m_privateToPublicRowIndex.erase( m_privateToPublicRowIndex.begin() + privateIndex );
+
+ // adjust remaining entries in the index maps
+ lcl_decrementValuesGreaterThan( m_publicToPrivateRowIndex, privateIndex );
+ lcl_decrementValuesGreaterThan( m_privateToPublicRowIndex, publicIndex );
+
+ // broadcast the event
+ impl_broadcast( &XGridDataListener::rowsRemoved, aEvent, aGuard );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL SortableGridDataModel::dataChanged( const GridDataEvent& i_event ) throw (RuntimeException)
+ {
+ MethodGuard aGuard( *this, rBHelper );
+ DBG_CHECK_ME();
+
+ GridDataEvent const aEvent( impl_createPublicEvent( i_event ) );
+ impl_broadcast( &XGridDataListener::dataChanged, aEvent, aGuard );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL SortableGridDataModel::rowHeadingChanged( const GridDataEvent& i_event ) throw (RuntimeException)
+ {
+ MethodGuard aGuard( *this, rBHelper );
+ DBG_CHECK_ME();
+
+ GridDataEvent const aEvent( impl_createPublicEvent( i_event ) );
+ impl_broadcast( &XGridDataListener::rowHeadingChanged, aEvent, aGuard );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL SortableGridDataModel::disposing( const EventObject& i_event ) throw (RuntimeException)
+ {
+ // not interested in
+ OSL_UNUSED( i_event );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ namespace
+ {
+ class CellDataLessComparison : public ::std::binary_function< sal_Int32, sal_Int32, bool >
+ {
+ public:
+ CellDataLessComparison(
+ ::std::vector< Any > const & i_data,
+ ::comphelper::IKeyPredicateLess& i_predicate,
+ sal_Bool const i_sortAscending
+ )
+ :m_data( i_data )
+ ,m_predicate( i_predicate )
+ ,m_sortAscending( i_sortAscending )
+ {
+ }
+
+ bool operator()( sal_Int32 const i_lhs, sal_Int32 const i_rhs ) const
+ {
+ Any const & lhs = m_data[ i_lhs ];
+ Any const & rhs = m_data[ i_rhs ];
+ // <VOID/> is less than everything else
+ if ( !lhs.hasValue() )
+ return m_sortAscending;
+ if ( !rhs.hasValue() )
+ return !m_sortAscending;
+
+ // actually compare
+ if ( m_sortAscending )
+ return m_predicate.isLess( lhs, rhs );
+ else
+ return m_predicate.isLess( rhs, lhs );
+ }
+
+ private:
+ ::std::vector< Any > const & m_data;
+ ::comphelper::IKeyPredicateLess const & m_predicate;
+ sal_Bool const m_sortAscending;
+ };
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SortableGridDataModel::impl_reIndex_nothrow( ::sal_Int32 const i_columnIndex, sal_Bool const i_sortAscending )
+ {
+ ::sal_Int32 const rowCount( getRowCount() );
+ ::std::vector< ::sal_Int32 > aPublicToPrivate( rowCount );
+
+ try
+ {
+ // build an unsorted translation table, and retrieve the unsorted data
+ ::std::vector< Any > aColumnData( rowCount );
+ Type dataType;
+ for ( ::sal_Int32 rowIndex = 0; rowIndex < rowCount; ++rowIndex )
+ {
+ aColumnData[ rowIndex ] = m_delegator->getCellData( i_columnIndex, rowIndex );
+ aPublicToPrivate[ rowIndex ] = rowIndex;
+
+ // determine the data types we assume for the complete column
+ if ( ( dataType.getTypeClass() == TypeClass_VOID ) && aColumnData[ rowIndex ].hasValue() )
+ dataType = aColumnData[ rowIndex ].getValueType();
+ }
+
+ // get predicate object
+ ::std::auto_ptr< ::comphelper::IKeyPredicateLess > const pPredicate( ::comphelper::getStandardLessPredicate( dataType, m_collator ) );
+ ENSURE_OR_RETURN_VOID( pPredicate.get(), "SortableGridDataModel::impl_reIndex_nothrow: no sortable data found!" );
+
+ // then sort
+ CellDataLessComparison const aComparator( aColumnData, *pPredicate, i_sortAscending );
+ ::std::sort( aPublicToPrivate.begin(), aPublicToPrivate.end(), aComparator );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ return;
+ }
+
+ // also build the "private to public" mapping
+ ::std::vector< sal_Int32 > aPrivateToPublic( aPublicToPrivate.size() );
+ for ( size_t i=0; i<aPublicToPrivate.size(); ++i )
+ aPrivateToPublic[ aPublicToPrivate[i] ] = i;
+
+ m_publicToPrivateRowIndex.swap( aPublicToPrivate );
+ m_privateToPublicRowIndex.swap( aPrivateToPublic );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL SortableGridDataModel::sortByColumn( ::sal_Int32 i_columnIndex, ::sal_Bool i_sortAscending ) throw (IndexOutOfBoundsException, RuntimeException)
+ {
+ MethodGuard aGuard( *this, rBHelper );
+ DBG_CHECK_ME();
+
+ if ( ( i_columnIndex < 0 ) || ( i_columnIndex >= getColumnCount() ) )
+ throw IndexOutOfBoundsException( ::rtl::OUString(), *this );
+
+ impl_reIndex_nothrow( i_columnIndex, i_sortAscending );
+
+ m_currentSortColumn = i_columnIndex;
+ m_sortAscending = i_sortAscending;
+
+ impl_broadcast(
+ &XGridDataListener::dataChanged,
+ GridDataEvent( *this, -1, -1, -1, -1 ),
+ aGuard
+ );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL SortableGridDataModel::removeColumnSort( ) throw (RuntimeException)
+ {
+ MethodGuard aGuard( *this, rBHelper );
+ DBG_CHECK_ME();
+
+ lcl_clear( m_publicToPrivateRowIndex );
+ lcl_clear( m_privateToPublicRowIndex );
+
+ m_currentSortColumn = -1;
+ m_sortAscending = sal_True;
+
+ impl_broadcast(
+ &XGridDataListener::dataChanged,
+ GridDataEvent( *this, -1, -1, -1, -1 ),
+ aGuard
+ );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Pair< ::sal_Int32, ::sal_Bool > SAL_CALL SortableGridDataModel::getCurrentSortOrder( ) throw (RuntimeException)
+ {
+ MethodGuard aGuard( *this, rBHelper );
+ DBG_CHECK_ME();
+
+ return Pair< ::sal_Int32, ::sal_Bool >( m_currentSortColumn, m_sortAscending );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL SortableGridDataModel::addRow( const Any& i_heading, const Sequence< Any >& i_data ) throw (RuntimeException)
+ {
+ MethodGuard aGuard( *this, rBHelper );
+ DBG_CHECK_ME();
+
+ Reference< XMutableGridDataModel > const delegator( m_delegator );
+ aGuard.clear();
+ delegator->addRow( i_heading, i_data );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL SortableGridDataModel::addRows( const Sequence< Any >& i_headings, const Sequence< Sequence< Any > >& i_data ) throw (IllegalArgumentException, RuntimeException)
+ {
+ MethodGuard aGuard( *this, rBHelper );
+ DBG_CHECK_ME();
+
+ Reference< XMutableGridDataModel > const delegator( m_delegator );
+ aGuard.clear();
+ delegator->addRows( i_headings, i_data );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL SortableGridDataModel::removeRow( ::sal_Int32 i_rowIndex ) throw (IndexOutOfBoundsException, RuntimeException)
+ {
+ MethodGuard aGuard( *this, rBHelper );
+ DBG_CHECK_ME();
+
+ ::sal_Int32 const rowIndex = impl_getPrivateRowIndex_throw( i_rowIndex );
+
+ Reference< XMutableGridDataModel > const delegator( m_delegator );
+ aGuard.clear();
+ delegator->removeRow( rowIndex );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL SortableGridDataModel::removeAllRows( ) throw (RuntimeException)
+ {
+ MethodGuard aGuard( *this, rBHelper );
+ DBG_CHECK_ME();
+
+ Reference< XMutableGridDataModel > const delegator( m_delegator );
+ aGuard.clear();
+ delegator->removeAllRows();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL SortableGridDataModel::updateCellData( ::sal_Int32 i_columnIndex, ::sal_Int32 i_rowIndex, const Any& i_value ) throw (IndexOutOfBoundsException, RuntimeException)
+ {
+ MethodGuard aGuard( *this, rBHelper );
+ DBG_CHECK_ME();
+
+ ::sal_Int32 const rowIndex = impl_getPrivateRowIndex_throw( i_rowIndex );
+
+ Reference< XMutableGridDataModel > const delegator( m_delegator );
+ aGuard.clear();
+ delegator->updateCellData( i_columnIndex, rowIndex, i_value );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL SortableGridDataModel::updateRowData( const Sequence< ::sal_Int32 >& i_columnIndexes, ::sal_Int32 i_rowIndex, const Sequence< Any >& i_values ) throw (IndexOutOfBoundsException, IllegalArgumentException, RuntimeException)
+ {
+ MethodGuard aGuard( *this, rBHelper );
+ DBG_CHECK_ME();
+
+ ::sal_Int32 const rowIndex = impl_getPrivateRowIndex_throw( i_rowIndex );
+
+ Reference< XMutableGridDataModel > const delegator( m_delegator );
+ aGuard.clear();
+ delegator->updateRowData( i_columnIndexes, rowIndex, i_values );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL SortableGridDataModel::updateRowHeading( ::sal_Int32 i_rowIndex, const Any& i_heading ) throw (IndexOutOfBoundsException, RuntimeException)
+ {
+ MethodGuard aGuard( *this, rBHelper );
+ DBG_CHECK_ME();
+
+ ::sal_Int32 const rowIndex = impl_getPrivateRowIndex_throw( i_rowIndex );
+
+ Reference< XMutableGridDataModel > const delegator( m_delegator );
+ aGuard.clear();
+ delegator->updateRowHeading( rowIndex, i_heading );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL SortableGridDataModel::updateCellToolTip( ::sal_Int32 i_columnIndex, ::sal_Int32 i_rowIndex, const Any& i_value ) throw (IndexOutOfBoundsException, RuntimeException)
+ {
+ MethodGuard aGuard( *this, rBHelper );
+ DBG_CHECK_ME();
+
+ ::sal_Int32 const rowIndex = impl_getPrivateRowIndex_throw( i_rowIndex );
+
+ Reference< XMutableGridDataModel > const delegator( m_delegator );
+ aGuard.clear();
+ delegator->updateCellToolTip( i_columnIndex, rowIndex, i_value );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL SortableGridDataModel::updateRowToolTip( ::sal_Int32 i_rowIndex, const Any& i_value ) throw (IndexOutOfBoundsException, RuntimeException)
+ {
+ MethodGuard aGuard( *this, rBHelper );
+ DBG_CHECK_ME();
+
+ ::sal_Int32 const rowIndex = impl_getPrivateRowIndex_throw( i_rowIndex );
+
+ Reference< XMutableGridDataModel > const delegator( m_delegator );
+ aGuard.clear();
+ delegator->updateRowToolTip( rowIndex, i_value );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL SortableGridDataModel::addGridDataListener( const Reference< XGridDataListener >& i_listener ) throw (RuntimeException)
+ {
+ rBHelper.addListener( XGridDataListener::static_type(), i_listener );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL SortableGridDataModel::removeGridDataListener( const Reference< XGridDataListener >& i_listener ) throw (RuntimeException)
+ {
+ rBHelper.removeListener( XGridDataListener::static_type(), i_listener );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL SortableGridDataModel::getRowCount() throw (RuntimeException)
+ {
+ MethodGuard aGuard( *this, rBHelper );
+ DBG_CHECK_ME();
+
+ Reference< XMutableGridDataModel > const delegator( m_delegator );
+ aGuard.clear();
+ return delegator->getRowCount();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SAL_CALL SortableGridDataModel::getColumnCount() throw (RuntimeException)
+ {
+ MethodGuard aGuard( *this, rBHelper );
+ DBG_CHECK_ME();
+
+ Reference< XMutableGridDataModel > const delegator( m_delegator );
+ aGuard.clear();
+ return delegator->getColumnCount();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Any SAL_CALL SortableGridDataModel::getCellData( ::sal_Int32 i_columnIndex, ::sal_Int32 i_rowIndex ) throw (IndexOutOfBoundsException, RuntimeException)
+ {
+ MethodGuard aGuard( *this, rBHelper );
+ DBG_CHECK_ME();
+
+ ::sal_Int32 const rowIndex = impl_getPrivateRowIndex_throw( i_rowIndex );
+
+ Reference< XMutableGridDataModel > const delegator( m_delegator );
+ aGuard.clear();
+ return delegator->getCellData( i_columnIndex, rowIndex );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Any SAL_CALL SortableGridDataModel::getCellToolTip( ::sal_Int32 i_columnIndex, ::sal_Int32 i_rowIndex ) throw (IndexOutOfBoundsException, RuntimeException)
+ {
+ MethodGuard aGuard( *this, rBHelper );
+ DBG_CHECK_ME();
+
+ ::sal_Int32 const rowIndex = impl_getPrivateRowIndex_throw( i_rowIndex );
+
+ Reference< XMutableGridDataModel > const delegator( m_delegator );
+ aGuard.clear();
+ return delegator->getCellToolTip( i_columnIndex, rowIndex );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Any SAL_CALL SortableGridDataModel::getRowHeading( ::sal_Int32 i_rowIndex ) throw (IndexOutOfBoundsException, RuntimeException)
+ {
+ MethodGuard aGuard( *this, rBHelper );
+ DBG_CHECK_ME();
+
+ ::sal_Int32 const rowIndex = impl_getPrivateRowIndex_throw( i_rowIndex );
+
+ Reference< XMutableGridDataModel > const delegator( m_delegator );
+ aGuard.clear();
+ return delegator->getRowHeading( rowIndex );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL SortableGridDataModel::disposing()
+ {
+ m_currentSortColumn = -1;
+
+ Reference< XComponent > const delegatorComponent( m_delegator.get() );
+ m_delegator->removeGridDataListener( this );
+ m_delegator.clear();
+ delegatorComponent->dispose();
+
+ Reference< XComponent > const collatorComponent( m_collator, UNO_QUERY );
+ m_collator.clear();
+ if ( collatorComponent.is() )
+ collatorComponent->dispose();
+
+ lcl_clear( m_publicToPrivateRowIndex );
+ lcl_clear( m_privateToPublicRowIndex );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XCloneable > SAL_CALL SortableGridDataModel::createClone( ) throw (RuntimeException)
+ {
+ MethodGuard aGuard( *this, rBHelper );
+ DBG_CHECK_ME();
+
+ return new SortableGridDataModel( *this );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString SAL_CALL SortableGridDataModel::getImplementationName( ) throw (RuntimeException)
+ {
+ return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.comp.toolkit.SortableGridDataModel" ) );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Bool SAL_CALL SortableGridDataModel::supportsService( const ::rtl::OUString& i_serviceName ) throw (RuntimeException)
+ {
+ Sequence< ::rtl::OUString > const aServiceNames( getSupportedServiceNames() );
+ for ( sal_Int32 i=0; i<aServiceNames.getLength(); ++i )
+ if ( aServiceNames[i] == i_serviceName )
+ return sal_True;
+ return sal_False;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Sequence< ::rtl::OUString > SAL_CALL SortableGridDataModel::getSupportedServiceNames( ) throw (RuntimeException)
+ {
+ Sequence< ::rtl::OUString > aServiceNames(1);
+ aServiceNames[0] = ::rtl::OUString::createFromAscii( szServiceName_SortableGridDataModel );
+ return aServiceNames;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SortableGridDataModel::impl_getPrivateRowIndex_throw( ::sal_Int32 const i_publicRowIndex ) const
+ {
+ if ( ( i_publicRowIndex < 0 ) || ( i_publicRowIndex >= m_delegator->getRowCount() ) )
+ throw IndexOutOfBoundsException( ::rtl::OUString(), *const_cast< SortableGridDataModel* >( this ) );
+
+ if ( !impl_isSorted_nothrow() )
+ // no need to translate anything
+ return i_publicRowIndex;
+
+ ENSURE_OR_RETURN( size_t( i_publicRowIndex ) < m_publicToPrivateRowIndex.size(),
+ "SortableGridDataModel::impl_getPrivateRowIndex_throw: inconsistency!", i_publicRowIndex );
+ // obviously the translation table contains too few elements - it should have exactly |getRowCount()|
+ // elements
+
+ return m_publicToPrivateRowIndex[ i_publicRowIndex ];
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int32 SortableGridDataModel::impl_getPublicRowIndex_nothrow( ::sal_Int32 const i_privateRowIndex ) const
+ {
+ if ( !impl_isSorted_nothrow() )
+ // no need to translate anything
+ return i_privateRowIndex;
+
+ if ( i_privateRowIndex < 0 )
+ return i_privateRowIndex;
+
+ ENSURE_OR_RETURN( size_t( i_privateRowIndex ) < m_privateToPublicRowIndex.size(),
+ "SortableGridDataModel::impl_getPublicRowIndex_nothrow: invalid index!", i_privateRowIndex );
+
+ return m_privateToPublicRowIndex[ i_privateRowIndex ];
+ }
+
+//......................................................................................................................
+} // namespace toolkit
+//......................................................................................................................
+
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SortableGridDataModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory )
+{
+ return *( new ::toolkit::SortableGridDataModel( i_factory ) );
+}
diff --git a/toolkit/source/controls/grid/sortablegriddatamodel.hxx b/toolkit/source/controls/grid/sortablegriddatamodel.hxx
new file mode 100755
index 000000000000..50f08d3a7113
--- /dev/null
+++ b/toolkit/source/controls/grid/sortablegriddatamodel.hxx
@@ -0,0 +1,198 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef TOOLKIT_SORTABLEGRIDDATAMODEL_HXX
+#define TOOLKIT_SORTABLEGRIDDATAMODEL_HXX
+
+#include "initguard.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/awt/grid/XSortableMutableGridDataModel.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/i18n/XCollator.hpp>
+#include <com/sun/star/awt/grid/XGridDataListener.hpp>
+/** === end UNO includes === **/
+
+#include <comphelper/componentcontext.hxx>
+#include <cppuhelper/basemutex.hxx>
+#include <cppuhelper/compbase3.hxx>
+#include <cppuhelper/implbase1.hxx>
+
+//......................................................................................................................
+namespace toolkit
+{
+//......................................................................................................................
+
+ class SortableGridDataModel;
+ typedef InitGuard< SortableGridDataModel > MethodGuard;
+
+ //==================================================================================================================
+ //= SortableGridDataModel
+ //==================================================================================================================
+ typedef ::cppu::WeakComponentImplHelper3 < ::com::sun::star::awt::grid::XSortableMutableGridDataModel
+ , ::com::sun::star::lang::XServiceInfo
+ , ::com::sun::star::lang::XInitialization
+ > SortableGridDataModel_Base;
+ typedef ::cppu::ImplHelper1 < ::com::sun::star::awt::grid::XGridDataListener
+ > SortableGridDataModel_PrivateBase;
+ class SortableGridDataModel :public ::cppu::BaseMutex
+ ,public SortableGridDataModel_Base
+ ,public SortableGridDataModel_PrivateBase
+ {
+ public:
+ SortableGridDataModel( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > const & i_factory );
+ SortableGridDataModel( SortableGridDataModel const & i_copySource );
+
+ bool isInitialized() const { return m_isInitialized; }
+
+#ifdef DBG_UTIL
+ const char* checkInvariants() const;
+#endif
+
+ protected:
+ ~SortableGridDataModel();
+
+ public:
+ // XSortableGridData
+ virtual void SAL_CALL sortByColumn( ::sal_Int32 ColumnIndex, ::sal_Bool SortAscending ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeColumnSort( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::beans::Pair< ::sal_Int32, ::sal_Bool > SAL_CALL getCurrentSortOrder( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XMutableGridDataModel
+ virtual void SAL_CALL addRow( const ::com::sun::star::uno::Any& Heading, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Data ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addRows( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Headings, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > >& Data ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeRow( ::sal_Int32 RowIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeAllRows( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateCellData( ::sal_Int32 ColumnIndex, ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateRowData( const ::com::sun::star::uno::Sequence< ::sal_Int32 >& ColumnIndexes, ::sal_Int32 RowIndex, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Values ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateRowHeading( ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Heading ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateCellToolTip( ::sal_Int32 ColumnIndex, ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateRowToolTip( ::sal_Int32 RowIndex, const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addGridDataListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeGridDataListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XGridDataModel
+ virtual ::sal_Int32 SAL_CALL getRowCount() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getColumnCount() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getCellData( ::sal_Int32 Column, ::sal_Int32 Row ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getCellToolTip( ::sal_Int32 Column, ::sal_Int32 Row ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getRowHeading( ::sal_Int32 RowIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ // OComponentHelper
+ virtual void SAL_CALL disposing();
+
+ // XCloneable
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XInitialization
+ virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+
+ // XGridDataListener
+ virtual void SAL_CALL rowsInserted( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL rowsRemoved( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL dataChanged( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL rowHeadingChanged( const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& i_event ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire( ) throw ();
+ virtual void SAL_CALL release( ) throw ();
+
+ // XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::sal_Int8 > SAL_CALL getImplementationId( ) throw (::com::sun::star::uno::RuntimeException);
+
+ private:
+ /** translates the given public index into one to be passed to our delegator
+ @throws ::com::sun::star::lang::IndexOutOfBoundsException
+ if the given index does not denote a valid row
+ */
+ ::sal_Int32 impl_getPrivateRowIndex_throw( ::sal_Int32 const i_publicRowIndex ) const;
+
+ /** translates the given private row index to a public one
+ */
+ ::sal_Int32 impl_getPublicRowIndex_nothrow( ::sal_Int32 const i_privateRowIndex ) const;
+
+ inline bool impl_isSorted_nothrow() const
+ {
+ return m_currentSortColumn >= 0;
+ }
+
+ /** rebuilds the index translation structure.
+
+ Neither <member>m_currentSortColumn</member> nor <member>m_sortAscending</member> are touched by this method.
+ Also, the given column index is not checked, this is the responsibility of the caller.
+ */
+ void impl_reIndex_nothrow( ::sal_Int32 const i_columnIndex, sal_Bool const i_sortAscending );
+
+ /** translates the given event, obtained from our delegator, to a version which can be broadcasted to our own
+ clients.
+ */
+ ::com::sun::star::awt::grid::GridDataEvent
+ impl_createPublicEvent( ::com::sun::star::awt::grid::GridDataEvent const & i_originalEvent ) const;
+
+ /** broadcasts the given event to our registered XGridDataListeners
+ */
+ void impl_broadcast(
+ void ( SAL_CALL ::com::sun::star::awt::grid::XGridDataListener::*i_listenerMethod )( const ::com::sun::star::awt::grid::GridDataEvent & ),
+ ::com::sun::star::awt::grid::GridDataEvent const & i_publicEvent,
+ MethodGuard& i_instanceLock
+ );
+
+ /** rebuilds our indexes, notifying row removal and row addition events
+
+ First, a rowsRemoved event is notified to our registered listeners. Then, the index translation tables are
+ rebuilt, and a rowsInserted event is notified.
+
+ Only to be called when we're sorted.
+ */
+ void impl_rebuildIndexesAndNotify( MethodGuard& i_instanceLock );
+
+ private:
+ ::comphelper::ComponentContext m_context;
+ bool m_isInitialized;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XMutableGridDataModel > m_delegator;
+ ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCollator > m_collator;
+ ::sal_Int32 m_currentSortColumn;
+ ::sal_Bool m_sortAscending;
+ ::std::vector< ::sal_Int32 > m_publicToPrivateRowIndex;
+ ::std::vector< ::sal_Int32 > m_privateToPublicRowIndex;
+ };
+
+//......................................................................................................................
+} // namespace toolkit
+//......................................................................................................................
+
+#endif // TOOLKIT_SORTABLEGRIDDATAMODEL_HXX
diff --git a/toolkit/source/controls/roadmapcontrol.cxx b/toolkit/source/controls/roadmapcontrol.cxx
index 96f51b39dc72..875f05e2f80d 100644
--- a/toolkit/source/controls/roadmapcontrol.cxx
+++ b/toolkit/source/controls/roadmapcontrol.cxx
@@ -66,7 +66,9 @@ static void lcl_throwIndexOutOfBoundsException( )
// = UnoControlRoadmapModel
// ===================================================================
// -------------------------------------------------------------------
- UnoControlRoadmapModel::UnoControlRoadmapModel() : maContainerListeners( *this )
+ UnoControlRoadmapModel::UnoControlRoadmapModel( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoControlRoadmapModel_Base( i_factory )
+ ,maContainerListeners( *this )
{
ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR );
ImplRegisterProperty( BASEPROPERTY_BORDER );
@@ -368,7 +370,9 @@ static void lcl_throwIndexOutOfBoundsException( )
// = UnoRoadmapControl
// ===================================================================
// -------------------------------------------------------------------
- UnoRoadmapControl::UnoRoadmapControl(): maItemListeners( *this )
+ UnoRoadmapControl::UnoRoadmapControl( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoControlRoadmap_Base( i_factory )
+ ,maItemListeners( *this )
{
}
diff --git a/toolkit/source/controls/spinningprogress.cxx b/toolkit/source/controls/spinningprogress.cxx
new file mode 100755
index 000000000000..cb02274e3997
--- /dev/null
+++ b/toolkit/source/controls/spinningprogress.cxx
@@ -0,0 +1,140 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_toolkit.hxx"
+
+#include "toolkit/controls/spinningprogress.hxx"
+#include "toolkit/helper/servicenames.hxx"
+#include "toolkit/helper/unopropertyarrayhelper.hxx"
+
+/** === begin UNO includes === **/
+/** === end UNO includes === **/
+
+#include <rtl/ustrbuf.hxx>
+#include <tools/diagnose_ex.h>
+#include <vcl/throbber.hxx>
+
+//......................................................................................................................
+namespace toolkit
+{
+//......................................................................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::beans::XPropertySetInfo;
+ using ::com::sun::star::lang::XMultiServiceFactory;
+ /** === end UNO using === **/
+
+ //==================================================================================================================
+ //= SpinningProgressControlModel
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ SpinningProgressControlModel::SpinningProgressControlModel( Reference< XMultiServiceFactory > const & i_factory )
+ :SpinningProgressControlModel_Base( i_factory )
+ {
+ // default image sets
+ osl_incrementInterlockedCount( &m_refCount );
+ {
+ try
+ {
+ Throbber::ImageSet aImageSets[] =
+ {
+ Throbber::IMAGES_16_PX, Throbber::IMAGES_32_PX, Throbber::IMAGES_64_PX
+ };
+ for ( size_t i=0; i < sizeof( aImageSets ) / sizeof( aImageSets[0] ); ++i )
+ {
+ const ::std::vector< ::rtl::OUString > aDefaultURLs( Throbber::getDefaultImageURLs( aImageSets[i] ) );
+ const Sequence< ::rtl::OUString > aImageURLs( &aDefaultURLs[0], aDefaultURLs.size() );
+ insertImageSet( i, aImageURLs );
+ }
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+ osl_decrementInterlockedCount( &m_refCount );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ SpinningProgressControlModel::SpinningProgressControlModel( const SpinningProgressControlModel& i_copySource )
+ :SpinningProgressControlModel_Base( i_copySource )
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ SpinningProgressControlModel::~SpinningProgressControlModel()
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ UnoControlModel* SpinningProgressControlModel::Clone() const
+ {
+ return new SpinningProgressControlModel( *this );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XPropertySetInfo > SAL_CALL SpinningProgressControlModel::getPropertySetInfo( ) throw(RuntimeException)
+ {
+ static Reference< XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
+ return xInfo;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString SAL_CALL SpinningProgressControlModel::getServiceName() throw(RuntimeException)
+ {
+ return ::rtl::OUString::createFromAscii( szServiceName_SpinningProgressControlModel );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString SAL_CALL SpinningProgressControlModel::getImplementationName( ) throw(RuntimeException)
+ {
+ return ::rtl::OUString::createFromAscii( "org.openoffice.comp.toolkit.SpinningProgressControlModel" );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Sequence< ::rtl::OUString > SAL_CALL SpinningProgressControlModel::getSupportedServiceNames() throw(RuntimeException)
+ {
+ Sequence< ::rtl::OUString > aServiceNames(3);
+ aServiceNames[0] = ::rtl::OUString::createFromAscii( szServiceName_SpinningProgressControlModel );
+ aServiceNames[1] = ::rtl::OUString::createFromAscii( szServiceName_AnimatedImagesControlModel );
+ aServiceNames[2] = ::rtl::OUString::createFromAscii( "com.sun.star.awt.UnoControlModel" );
+ return aServiceNames;
+ }
+
+//......................................................................................................................
+} // namespace toolkit
+//......................................................................................................................
diff --git a/toolkit/source/controls/tabpagecontainer.cxx b/toolkit/source/controls/tabpagecontainer.cxx
new file mode 100644
index 000000000000..808feca02e8a
--- /dev/null
+++ b/toolkit/source/controls/tabpagecontainer.cxx
@@ -0,0 +1,295 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_toolkit.hxx"
+
+#include <toolkit/controls/tabpagecontainer.hxx>
+
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <toolkit/helper/unopropertyarrayhelper.hxx>
+#include <toolkit/helper/property.hxx>
+#include <toolkit/controls/geometrycontrolmodel.hxx>
+#include <com/sun/star/awt/XVclWindowPeer.hpp>
+#include <comphelper/processfactory.hxx>
+#include <osl/diagnose.h>
+#include <vcl/svapp.hxx>
+#include <vos/mutex.hxx>
+#include <com/sun/star/awt/XControlModel.hpp>
+#include <tools/diagnose_ex.h>
+
+using ::rtl::OUString;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::view;
+
+#define WRONG_TYPE_EXCEPTION "Type must be ::com::sun::star::awt::tab::XTabPageModel!"
+// ----------------------------------------------------
+// class UnoControlTabPageContainerModel
+// ----------------------------------------------------
+UnoControlTabPageContainerModel::UnoControlTabPageContainerModel( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoControlTabPageContainerModel_Base( i_factory )
+ ,maContainerListeners( *this )
+{
+ ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR );
+ ImplRegisterProperty( BASEPROPERTY_BORDER );
+ ImplRegisterProperty( BASEPROPERTY_BORDERCOLOR );
+ ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL );
+ ImplRegisterProperty( BASEPROPERTY_ENABLED );
+ ImplRegisterProperty( BASEPROPERTY_HELPTEXT );
+ ImplRegisterProperty( BASEPROPERTY_HELPURL );
+ ImplRegisterProperty( BASEPROPERTY_PRINTABLE );
+ ImplRegisterProperty( BASEPROPERTY_TEXT );
+}
+
+::rtl::OUString UnoControlTabPageContainerModel::getServiceName() throw(RuntimeException)
+{
+ return ::rtl::OUString::createFromAscii( szServiceName_UnoControlTabPageContainerModel );
+}
+
+uno::Any UnoControlTabPageContainerModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
+{
+ switch(nPropId)
+ {
+ case BASEPROPERTY_DEFAULTCONTROL:
+ return uno::makeAny( ::rtl::OUString::createFromAscii( szServiceName_UnoControlTabPageContainer ) );
+ case BASEPROPERTY_BORDER:
+ return uno::makeAny((sal_Int16) 0); // No Border
+ default:
+ return UnoControlModel::ImplGetDefaultValue( nPropId );
+ }
+}
+
+::cppu::IPropertyArrayHelper& UnoControlTabPageContainerModel::getInfoHelper()
+{
+ static UnoPropertyArrayHelper* pHelper = NULL;
+ if ( !pHelper )
+ {
+ com::sun::star::uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
+ pHelper = new UnoPropertyArrayHelper( aIDs );
+ }
+ return *pHelper;
+}
+Reference< ::com::sun::star::beans::XPropertySetInfo > UnoControlTabPageContainerModel::getPropertySetInfo( ) throw(RuntimeException)
+{
+ static Reference< ::com::sun::star::beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
+ return xInfo;
+}
+
+void SAL_CALL UnoControlTabPageContainerModel::insertByIndex( ::sal_Int32 nIndex, const com::sun::star::uno::Any& aElement) throw (IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetException, uno::RuntimeException)
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ uno::Reference < ::awt::tab::XTabPageModel > xTabPageModel;
+ if(aElement >>= xTabPageModel)
+ {
+ if ( sal_Int32( m_aTabPageVector.size()) ==nIndex )
+ m_aTabPageVector.push_back( xTabPageModel );
+ else if ( sal_Int32( m_aTabPageVector.size()) > nIndex )
+ {
+ std::vector< uno::Reference< ::awt::tab::XTabPageModel > >::iterator aIter = m_aTabPageVector.begin();
+ aIter += nIndex;
+ m_aTabPageVector.insert( aIter, xTabPageModel );
+ }
+ else
+ throw IndexOutOfBoundsException( ::rtl::OUString(), (OWeakObject *)this );
+ ContainerEvent aEvent;
+ aEvent.Source = *this;
+ aEvent.Element <<= aElement;
+ aEvent.Accessor <<= ::rtl::OUString::valueOf(nIndex);
+ maContainerListeners.elementInserted( aEvent );
+ }
+ else
+ throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( WRONG_TYPE_EXCEPTION )),
+ (OWeakObject *)this, 2 );
+}
+// -----------------------------------------------------------------------------
+void SAL_CALL UnoControlTabPageContainerModel::removeByIndex( ::sal_Int32 /*Index*/ ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
+{
+}
+// XIndexReplace
+void SAL_CALL UnoControlTabPageContainerModel::replaceByIndex( ::sal_Int32 /*Index*/, const uno::Any& /*Element*/ ) throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
+{
+}
+// -----------------------------------------------------------------------------
+// XIndexAccess
+::sal_Int32 SAL_CALL UnoControlTabPageContainerModel::getCount( ) throw (uno::RuntimeException)
+{
+ ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+ return sal_Int32( m_aTabPageVector.size());
+}
+// -----------------------------------------------------------------------------
+uno::Any SAL_CALL UnoControlTabPageContainerModel::getByIndex( ::sal_Int32 nIndex ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+ if ( nIndex < 0 || nIndex > sal_Int32(m_aTabPageVector.size()) )
+ throw lang::IndexOutOfBoundsException();
+ return uno::makeAny(m_aTabPageVector[nIndex]);
+}
+// -----------------------------------------------------------------------------
+// XElementAccess
+uno::Type SAL_CALL UnoControlTabPageContainerModel::getElementType( ) throw (uno::RuntimeException)
+{
+ return ::getCppuType(static_cast< Reference< com::sun::star::awt::XControlModel>* >(NULL));
+}
+// -----------------------------------------------------------------------------
+::sal_Bool SAL_CALL UnoControlTabPageContainerModel::hasElements( ) throw (uno::RuntimeException)
+{
+ ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+ return !m_aTabPageVector.empty();
+}
+// XContainer
+void UnoControlTabPageContainerModel::addContainerListener( const Reference< XContainerListener >& l ) throw(RuntimeException)
+{
+ maContainerListeners.addInterface( l );
+}
+
+void UnoControlTabPageContainerModel::removeContainerListener( const Reference< XContainerListener >& l ) throw(RuntimeException)
+{
+ maContainerListeners.removeInterface( l );
+}
+
+// ----------------------------------------------------
+// class UnoControlTabPageContainer
+// ----------------------------------------------------
+UnoControlTabPageContainer::UnoControlTabPageContainer( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoControlTabPageContainer_Base( i_factory )
+ ,m_aTabPageListeners( *this )
+{
+}
+
+OUString UnoControlTabPageContainer::GetComponentServiceName()
+{
+ return OUString::createFromAscii( "TabPageContainer" );
+}
+
+void SAL_CALL UnoControlTabPageContainer::dispose( ) throw(RuntimeException)
+{
+ lang::EventObject aEvt;
+ aEvt.Source = (::cppu::OWeakObject*)this;
+ m_aTabPageListeners.disposeAndClear( aEvt );
+ UnoControl::dispose();
+}
+
+void UnoControlTabPageContainer::createPeer( const uno::Reference< awt::XToolkit > & rxToolkit, const uno::Reference< awt::XWindowPeer > & rParentPeer ) throw(uno::RuntimeException)
+{
+ UnoControlBase::createPeer( rxToolkit, rParentPeer );
+
+ Reference< XTabPageContainer > xTPContainer( getPeer(), UNO_QUERY_THROW );
+ if ( m_aTabPageListeners.getLength() )
+ xTPContainer->addTabPageListener(&m_aTabPageListeners);
+}
+
+// -------------------------------------------------------------------
+// XTabPageContainer
+
+::sal_Int16 SAL_CALL UnoControlTabPageContainer::getActiveTabPageID() throw (RuntimeException)
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ Reference< XTabPageContainer > xTPContainer( getPeer(), UNO_QUERY_THROW );
+ return xTPContainer->getActiveTabPageID();
+}
+void SAL_CALL UnoControlTabPageContainer::setActiveTabPageID( ::sal_Int16 _activetabpageid ) throw (RuntimeException)
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ Reference< XTabPageContainer > xTPContainer( getPeer(), UNO_QUERY_THROW );
+ xTPContainer->setActiveTabPageID(_activetabpageid);
+}
+::sal_Int32 SAL_CALL UnoControlTabPageContainer::getTabPageCount( ) throw (RuntimeException)
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ Reference< XTabPageContainer > xTPContainer( getPeer(), UNO_QUERY_THROW );
+ return xTPContainer->getTabPageCount();
+}
+::sal_Bool SAL_CALL UnoControlTabPageContainer::isTabPageActive( ::sal_Int16 tabPageIndex ) throw (RuntimeException)
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ Reference< XTabPageContainer > xTPContainer( getPeer(), UNO_QUERY_THROW );
+ return xTPContainer->isTabPageActive(tabPageIndex);
+}
+Reference< ::com::sun::star::awt::tab::XTabPage > SAL_CALL UnoControlTabPageContainer::getTabPage( ::sal_Int16 tabPageIndex ) throw (RuntimeException)
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ Reference< XTabPageContainer > xTPContainer( getPeer(), UNO_QUERY_THROW );
+ return xTPContainer->getTabPage(tabPageIndex);
+}
+Reference< ::com::sun::star::awt::tab::XTabPage > SAL_CALL UnoControlTabPageContainer::getTabPageByID( ::sal_Int16 tabPageID ) throw (RuntimeException)
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ Reference< XTabPageContainer > xTPContainer( getPeer(), UNO_QUERY_THROW );
+ return xTPContainer->getTabPageByID(tabPageID);
+}
+void SAL_CALL UnoControlTabPageContainer::addTabPageListener( const Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (RuntimeException)
+{
+ m_aTabPageListeners.addInterface( listener );
+ if( getPeer().is() && m_aTabPageListeners.getLength() == 1 )
+ {
+ uno::Reference < awt::tab::XTabPageContainer > xTabPageContainer( getPeer(), uno::UNO_QUERY );
+ xTabPageContainer->addTabPageListener( &m_aTabPageListeners );
+ }
+}
+void SAL_CALL UnoControlTabPageContainer::removeTabPageListener( const Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (RuntimeException)
+{
+ if( getPeer().is() && m_aTabPageListeners.getLength() == 1 )
+ {
+ uno::Reference < awt::tab::XTabPageContainer > xTabPageContainer( getPeer(), uno::UNO_QUERY );
+ xTabPageContainer->addTabPageListener( &m_aTabPageListeners );
+ }
+ m_aTabPageListeners.removeInterface( listener );
+}
+
+void UnoControlTabPageContainer::updateFromModel()
+{
+ UnoControlTabPageContainer_Base::updateFromModel();
+ Reference< XContainerListener > xContainerListener( getPeer(), UNO_QUERY );
+ ENSURE_OR_RETURN_VOID( xContainerListener.is(), "UnoListBoxControl::updateFromModel: a peer which is no ItemListListener?!" );
+
+ ContainerEvent aEvent;
+ aEvent.Source = getModel();
+ Sequence< Reference< XControl > > aControls = getControls();
+ const Reference< XControl >* pCtrls = aControls.getConstArray();
+ const Reference< XControl >* pCtrlsEnd = pCtrls + aControls.getLength();
+
+ for ( ; pCtrls < pCtrlsEnd; ++pCtrls )
+ {
+ aEvent.Element <<= *pCtrls;
+ xContainerListener->elementInserted( aEvent );
+ }
+}
+void SAL_CALL UnoControlTabPageContainer::addControl( const ::rtl::OUString& Name, const Reference< ::com::sun::star::awt::XControl >& Control ) throw (RuntimeException)
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ ControlContainerBase::addControl(Name,Control);
+ Reference< XContainerListener > xContainerListener( getPeer(), UNO_QUERY );
+ ContainerEvent aEvent;
+ aEvent.Source = getModel();
+ aEvent.Element <<= Control;
+ xContainerListener->elementInserted( aEvent );
+}
+
diff --git a/toolkit/source/controls/tabpagemodel.cxx b/toolkit/source/controls/tabpagemodel.cxx
new file mode 100644
index 000000000000..f498fefd761b
--- /dev/null
+++ b/toolkit/source/controls/tabpagemodel.cxx
@@ -0,0 +1,396 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_toolkit.hxx"
+
+#include <vcl/svapp.hxx>
+#include <vcl/window.hxx>
+#include <vcl/wall.hxx>
+#include <vos/mutex.hxx>
+#include <toolkit/controls/tabpagemodel.hxx>
+#include <toolkit/helper/property.hxx>
+#include <toolkit/helper/unopropertyarrayhelper.hxx>
+#include <toolkit/controls/stdtabcontroller.hxx>
+#include <com/sun/star/awt/PosSize.hpp>
+#include <com/sun/star/awt/WindowAttribute.hpp>
+#include <com/sun/star/awt/UnoControlDialogModelProvider.hpp>
+#include <com/sun/star/resource/XStringResourceResolver.hpp>
+#include <com/sun/star/graphic/XGraphicProvider.hpp>
+#include <tools/list.hxx>
+#include <cppuhelper/typeprovider.hxx>
+#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
+#include <comphelper/sequence.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/outdev.hxx>
+
+#include <toolkit/helper/vclunohelper.hxx>
+#include <unotools/ucbstreamhelper.hxx>
+#include <vcl/graph.hxx>
+#include <vcl/image.hxx>
+#include <toolkit/controls/geometrycontrolmodel.hxx>
+
+#include <map>
+#include <algorithm>
+#include <functional>
+#include "tools/urlobj.hxx"
+#include "osl/file.hxx"
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::awt;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::util;
+
+////HELPER
+::rtl::OUString getPhysicalLocation( const ::com::sun::star::uno::Any& rbase, const ::com::sun::star::uno::Any& rUrl );
+
+// ----------------------------------------------------
+// class TabPageModel
+// ----------------------------------------------------
+
+//TabPageModel::TabPageModel()
+//{
+//}
+//TabPageModel::TabPageModel( uno::Reference< uno::XComponentContext > const & xCompContext)
+//{
+// (void) xCompContext;
+//}
+//
+//TabPageModel::~TabPageModel()
+//{
+//}
+//
+//////----- XInitialization -------------------------------------------------------------------
+//void SAL_CALL TabPageModel::initialize (const Sequence<Any>& rArguments)
+//{
+// sal_Int16 nPageId;
+// if ( rArguments.getLength() == 1 )
+// {
+// if ( !( rArguments[ 0 ] >>= nPageId ))
+// throw lang::IllegalArgumentException();
+// m_nTabPageId = nPageId;
+// }
+// else
+// m_nTabPageId = -1;
+//}
+//::sal_Int16 SAL_CALL TabPageModel::getTabPageID() throw (::com::sun::star::uno::RuntimeException)
+//{
+// return m_nTabPageId;
+//}
+//::sal_Bool SAL_CALL TabPageModel::getEnabled() throw (::com::sun::star::uno::RuntimeException)
+//{
+// return m_bEnabled;
+//}
+//void SAL_CALL TabPageModel::setEnabled( ::sal_Bool _enabled ) throw (::com::sun::star::uno::RuntimeException)
+//{
+// m_bEnabled = _enabled;
+//}
+//::rtl::OUString SAL_CALL TabPageModel::getTitle() throw (::com::sun::star::uno::RuntimeException)
+//{
+// return m_sTitle;
+//}
+//void SAL_CALL TabPageModel::setTitle( const ::rtl::OUString& _title ) throw (::com::sun::star::uno::RuntimeException)
+//{
+// m_sTitle = _title;
+//}
+//::rtl::OUString SAL_CALL TabPageModel::getImageURL() throw (::com::sun::star::uno::RuntimeException)
+//{
+// return m_sImageURL;
+//}
+//void SAL_CALL TabPageModel::setImageURL( const ::rtl::OUString& _imageurl ) throw (::com::sun::star::uno::RuntimeException)
+//{
+// m_sImageURL = _imageurl;
+//}
+//::rtl::OUString SAL_CALL TabPageModel::getTooltip() throw (::com::sun::star::uno::RuntimeException)
+//{
+// return m_sTooltip;
+//}
+//void SAL_CALL TabPageModel::setTooltip( const ::rtl::OUString& _tooltip ) throw (::com::sun::star::uno::RuntimeException)
+//{
+// m_sTooltip = _tooltip;
+//}
+
+// ----------------------------------------------------
+// class UnoControlTabPageModel
+// ----------------------------------------------------
+UnoControlTabPageModel::UnoControlTabPageModel( Reference< XMultiServiceFactory > const & i_factory )
+ :ControlModelContainerBase( i_factory )
+{
+ ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL );
+ ImplRegisterProperty( BASEPROPERTY_TITLE );
+ ImplRegisterProperty( BASEPROPERTY_HELPTEXT );
+ ImplRegisterProperty( BASEPROPERTY_HELPURL );
+ ImplRegisterProperty( BASEPROPERTY_IMAGEURL );
+ ImplRegisterProperty( BASEPROPERTY_ENABLED );
+}
+
+::rtl::OUString UnoControlTabPageModel::getServiceName( ) throw(RuntimeException)
+{
+ return ::rtl::OUString::createFromAscii( szServiceName_UnoControlTabPageModel );
+}
+
+Any UnoControlTabPageModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
+{
+ Any aAny;
+
+ switch ( nPropId )
+ {
+ case BASEPROPERTY_DEFAULTCONTROL:
+ aAny <<= ::rtl::OUString::createFromAscii( szServiceName_UnoControlTabPage );
+ break;
+ default:
+ aAny = UnoControlModel::ImplGetDefaultValue( nPropId );
+ }
+
+ return aAny;
+}
+
+::cppu::IPropertyArrayHelper& UnoControlTabPageModel::getInfoHelper()
+{
+ static UnoPropertyArrayHelper* pHelper = NULL;
+ if ( !pHelper )
+ {
+ Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
+ pHelper = new UnoPropertyArrayHelper( aIDs );
+ }
+ return *pHelper;
+}
+// beans::XMultiPropertySet
+uno::Reference< beans::XPropertySetInfo > UnoControlTabPageModel::getPropertySetInfo( ) throw(uno::RuntimeException)
+{
+ static uno::Reference< beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
+ return xInfo;
+}
+////----- XInitialization -------------------------------------------------------------------
+void SAL_CALL UnoControlTabPageModel::initialize (const Sequence<Any>& rArguments)
+ throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException)
+{
+ sal_Int16 nPageId = -1;
+ if ( rArguments.getLength() == 1 )
+ {
+ if ( !( rArguments[ 0 ] >>= nPageId ))
+ throw lang::IllegalArgumentException();
+ m_nTabPageId = nPageId;
+ }
+ else if ( rArguments.getLength() == 2 )
+ {
+ if ( !( rArguments[ 0 ] >>= nPageId ))
+ throw lang::IllegalArgumentException();
+ m_nTabPageId = nPageId;
+ ::rtl::OUString sURL;
+ if ( !( rArguments[ 1 ] >>= sURL ))
+ throw lang::IllegalArgumentException();
+ Reference<container::XNameContainer > xDialogModel = awt::UnoControlDialogModelProvider::create( maContext.getUNOContext(),sURL);
+ if ( xDialogModel.is() )
+ {
+ Sequence< ::rtl::OUString> aNames = xDialogModel->getElementNames();
+ const ::rtl::OUString* pIter = aNames.getConstArray();
+ const ::rtl::OUString* pEnd = pIter + aNames.getLength();
+ for(;pIter != pEnd;++pIter)
+ {
+ try
+ {
+ Any aElement(xDialogModel->getByName(*pIter));
+ xDialogModel->removeByName(*pIter);
+ insertByName(*pIter,aElement);
+ }
+ catch(const Exception& ex)
+ {
+ (void)ex;
+ }
+ }
+ Reference<XPropertySet> xDialogProp(xDialogModel,UNO_QUERY);
+ if ( xDialogProp.is() )
+ {
+ static const ::rtl::OUString s_sResourceResolver(RTL_CONSTASCII_USTRINGPARAM("ResourceResolver"));
+ Reference<XPropertySet> xThis(*this,UNO_QUERY);
+ xThis->setPropertyValue(s_sResourceResolver,xDialogProp->getPropertyValue(s_sResourceResolver));
+ xThis->setPropertyValue(GetPropertyName(BASEPROPERTY_TITLE),xDialogProp->getPropertyValue(GetPropertyName(BASEPROPERTY_TITLE)));
+ xThis->setPropertyValue(GetPropertyName(BASEPROPERTY_IMAGEURL),xDialogProp->getPropertyValue(GetPropertyName(BASEPROPERTY_IMAGEURL)));
+ xThis->setPropertyValue(GetPropertyName(BASEPROPERTY_HELPTEXT),xDialogProp->getPropertyValue(GetPropertyName(BASEPROPERTY_HELPTEXT)));
+ xThis->setPropertyValue(GetPropertyName(BASEPROPERTY_ENABLED),xDialogProp->getPropertyValue(GetPropertyName(BASEPROPERTY_ENABLED)));
+ xThis->setPropertyValue(GetPropertyName(BASEPROPERTY_HELPURL),xDialogProp->getPropertyValue(GetPropertyName(BASEPROPERTY_HELPURL)));
+ }
+ }
+ }
+ else
+ m_nTabPageId = -1;
+}
+//===== Service ===============================================================
+::rtl::OUString UnoControlTabPageModel_getImplementationName (void) throw(RuntimeException)
+{
+ return rtl::OUString::createFromAscii("com.sun.star.awt.tab.UnoControlTabPageModel");
+}
+
+Sequence<rtl::OUString> SAL_CALL UnoControlTabPageModel_getSupportedServiceNames (void)
+ throw (RuntimeException)
+{
+ static const ::rtl::OUString sServiceName(
+ ::rtl::OUString::createFromAscii("com.sun.star.awt.tab.UnoControlTabPageModel"));
+ return Sequence<rtl::OUString>(&sServiceName, 1);
+}
+//=============================================================================
+// = class UnoControlTabPage
+// ============================================================================
+
+UnoControlTabPage::UnoControlTabPage( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoControlTabPage_Base( i_factory )
+ ,m_bWindowListener(false)
+{
+ maComponentInfos.nWidth = 280;
+ maComponentInfos.nHeight = 400;
+}
+UnoControlTabPage::~UnoControlTabPage()
+{
+}
+
+::rtl::OUString UnoControlTabPage::GetComponentServiceName()
+{
+ return ::rtl::OUString::createFromAscii( "TabPageModel" );
+}
+
+void UnoControlTabPage::dispose() throw(RuntimeException)
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+
+ EventObject aEvt;
+ aEvt.Source = static_cast< ::cppu::OWeakObject* >( this );
+ ControlContainerBase::dispose();
+}
+
+void SAL_CALL UnoControlTabPage::disposing( const EventObject& Source )throw(RuntimeException)
+{
+ ControlContainerBase::disposing( Source );
+}
+
+void UnoControlTabPage::createPeer( const Reference< XToolkit > & rxToolkit, const Reference< XWindowPeer > & rParentPeer ) throw(RuntimeException)
+{
+ vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ ImplUpdateResourceResolver();
+
+ UnoControlContainer::createPeer( rxToolkit, rParentPeer );
+
+ Reference < tab::XTabPage > xTabPage( getPeer(), UNO_QUERY );
+ if ( xTabPage.is() )
+ {
+ if ( !m_bWindowListener )
+ {
+ Reference< XWindowListener > xWL( static_cast< cppu::OWeakObject*>( this ), UNO_QUERY );
+ addWindowListener( xWL );
+ m_bWindowListener = true;
+ }
+ }
+}
+
+static ::Size ImplMapPixelToAppFont( OutputDevice* pOutDev, const ::Size& aSize )
+{
+ ::Size aTmp = pOutDev->PixelToLogic( aSize, MAP_APPFONT );
+ return aTmp;
+}
+// ::com::sun::star::awt::XWindowListener
+void SAL_CALL UnoControlTabPage::windowResized( const ::com::sun::star::awt::WindowEvent& e )
+throw (::com::sun::star::uno::RuntimeException)
+{
+ OutputDevice*pOutDev = Application::GetDefaultDevice();
+ DBG_ASSERT( pOutDev, "Missing Default Device!" );
+ if ( pOutDev && !mbSizeModified )
+ {
+ // Currentley we are simply using MAP_APPFONT
+ ::Size aAppFontSize( e.Width, e.Height );
+
+ Reference< XControl > xDialogControl( *this, UNO_QUERY_THROW );
+ Reference< XDevice > xDialogDevice( xDialogControl->getPeer(), UNO_QUERY );
+ OSL_ENSURE( xDialogDevice.is(), "UnoDialogControl::windowResized: no peer, but a windowResized event?" );
+ if ( xDialogDevice.is() )
+ {
+ DeviceInfo aDeviceInfo( xDialogDevice->getInfo() );
+ aAppFontSize.Width() -= aDeviceInfo.LeftInset + aDeviceInfo.RightInset;
+ aAppFontSize.Height() -= aDeviceInfo.TopInset + aDeviceInfo.BottomInset;
+ }
+
+ aAppFontSize = ImplMapPixelToAppFont( pOutDev, aAppFontSize );
+
+ // Remember that changes have been done by listener. No need to
+ // update the position because of property change event.
+ mbSizeModified = true;
+ Sequence< rtl::OUString > aProps( 2 );
+ Sequence< Any > aValues( 2 );
+ // Properties in a sequence must be sorted!
+ aProps[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Height" ));
+ aProps[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Width" ));
+ aValues[0] <<= aAppFontSize.Height();
+ aValues[1] <<= aAppFontSize.Width();
+
+ ImplSetPropertyValues( aProps, aValues, true );
+ mbSizeModified = false;
+ }
+}
+
+void SAL_CALL UnoControlTabPage::windowMoved( const ::com::sun::star::awt::WindowEvent& e )
+throw (::com::sun::star::uno::RuntimeException)
+{
+ OutputDevice*pOutDev = Application::GetDefaultDevice();
+ DBG_ASSERT( pOutDev, "Missing Default Device!" );
+ if ( pOutDev && !mbPosModified )
+ {
+ // Currentley we are simply using MAP_APPFONT
+ Any aAny;
+ ::Size aTmp( e.X, e.Y );
+ aTmp = ImplMapPixelToAppFont( pOutDev, aTmp );
+
+ // Remember that changes have been done by listener. No need to
+ // update the position because of property change event.
+ mbPosModified = true;
+ Sequence< rtl::OUString > aProps( 2 );
+ Sequence< Any > aValues( 2 );
+ aProps[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PositionX" ));
+ aProps[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PositionY" ));
+ aValues[0] <<= aTmp.Width();
+ aValues[1] <<= aTmp.Height();
+
+ ImplSetPropertyValues( aProps, aValues, true );
+ mbPosModified = false;
+ }
+}
+
+void SAL_CALL UnoControlTabPage::windowShown( const ::com::sun::star::lang::EventObject& e )
+throw (::com::sun::star::uno::RuntimeException)
+{
+ (void)e;
+}
+
+void SAL_CALL UnoControlTabPage::windowHidden( const ::com::sun::star::lang::EventObject& e )
+throw (::com::sun::star::uno::RuntimeException)
+{
+ (void)e;
+}
diff --git a/toolkit/source/controls/tkscrollbar.cxx b/toolkit/source/controls/tkscrollbar.cxx
index 2de8b56131c8..f75183186610 100644
--- a/toolkit/source/controls/tkscrollbar.cxx
+++ b/toolkit/source/controls/tkscrollbar.cxx
@@ -47,7 +47,8 @@ namespace toolkit
//= UnoControlScrollBarModel
//====================================================================
//--------------------------------------------------------------------
- UnoControlScrollBarModel::UnoControlScrollBarModel()
+ UnoControlScrollBarModel::UnoControlScrollBarModel( const uno::Reference< lang::XMultiServiceFactory >& i_factory )
+ :UnoControlModel( i_factory )
{
UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXScrollBar );
}
@@ -96,8 +97,9 @@ namespace toolkit
//====================================================================
//= UnoControlScrollBarModel
//====================================================================
- UnoScrollBarControl::UnoScrollBarControl()
- : maAdjustmentListeners( *this )
+ UnoScrollBarControl::UnoScrollBarControl( const uno::Reference< lang::XMultiServiceFactory >& i_factory )
+ :UnoControlBase( i_factory )
+ ,maAdjustmentListeners( *this )
{
}
diff --git a/toolkit/source/controls/tksimpleanimation.cxx b/toolkit/source/controls/tksimpleanimation.cxx
index 3d89bf59af82..90f56d5ad4bd 100644
--- a/toolkit/source/controls/tksimpleanimation.cxx
+++ b/toolkit/source/controls/tksimpleanimation.cxx
@@ -44,7 +44,8 @@ namespace toolkit
//= UnoSimpleAnimationControlModel
//====================================================================
//--------------------------------------------------------------------
- UnoSimpleAnimationControlModel::UnoSimpleAnimationControlModel()
+ UnoSimpleAnimationControlModel::UnoSimpleAnimationControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory )
+ :UnoControlModel( i_factory )
{
ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL );
ImplRegisterProperty( BASEPROPERTY_REPEAT );
@@ -119,7 +120,8 @@ namespace toolkit
//= UnoSimpleAnimationControl
//====================================================================
//--------------------------------------------------------------------
- UnoSimpleAnimationControl::UnoSimpleAnimationControl()
+ UnoSimpleAnimationControl::UnoSimpleAnimationControl( const uno::Reference< lang::XMultiServiceFactory >& i_factory )
+ :UnoSimpleAnimationControl_Base( i_factory )
{
}
@@ -130,27 +132,6 @@ namespace toolkit
}
//--------------------------------------------------------------------
- uno::Any UnoSimpleAnimationControl::queryAggregation( const uno::Type & rType )
- throw( uno::RuntimeException )
- {
- uno::Any aRet = UnoControlBase::queryAggregation( rType );
- if ( !aRet.hasValue() )
- aRet = UnoSimpleAnimationControl_Base::queryInterface( rType );
- return aRet;
- }
-
- //--------------------------------------------------------------------
- IMPLEMENT_FORWARD_XTYPEPROVIDER2( UnoSimpleAnimationControl, UnoControlBase, UnoSimpleAnimationControl_Base )
-
- //--------------------------------------------------------------------
- void UnoSimpleAnimationControl::dispose() throw( uno::RuntimeException )
- {
- ::osl::ClearableMutexGuard aGuard( GetMutex() );
-
- UnoControl::dispose();
- }
-
- //--------------------------------------------------------------------
::rtl::OUString SAL_CALL UnoSimpleAnimationControl::getImplementationName()
throw( uno::RuntimeException )
{
@@ -161,26 +142,20 @@ namespace toolkit
uno::Sequence< ::rtl::OUString > SAL_CALL UnoSimpleAnimationControl::getSupportedServiceNames()
throw( uno::RuntimeException )
{
- uno::Sequence< ::rtl::OUString > aServices( UnoControlBase::getSupportedServiceNames() );
+ uno::Sequence< ::rtl::OUString > aServices( UnoSimpleAnimationControl_Base::getSupportedServiceNames() );
aServices.realloc( aServices.getLength() + 1 );
aServices[ aServices.getLength() - 1 ] = ::rtl::OUString::createFromAscii( szServiceName_UnoSimpleAnimationControl );
return aServices;
}
//--------------------------------------------------------------------
- void UnoSimpleAnimationControl::createPeer( const uno::Reference< awt::XToolkit > &rxToolkit,
- const uno::Reference< awt::XWindowPeer > &rParentPeer )
- throw( uno::RuntimeException )
- {
- UnoControl::createPeer( rxToolkit, rParentPeer );
- }
-
- //--------------------------------------------------------------------
void SAL_CALL UnoSimpleAnimationControl::start() throw ( uno::RuntimeException )
{
- ::osl::MutexGuard aGuard( GetMutex() );
-
- uno::Reference< XSimpleAnimation > xAnimation( getPeer(), uno::UNO_QUERY );
+ uno::Reference< XSimpleAnimation > xAnimation;
+ {
+ ::osl::MutexGuard aGuard( GetMutex() );
+ xAnimation.set( getPeer(), uno::UNO_QUERY );
+ }
if ( xAnimation.is() )
xAnimation->start();
}
@@ -188,9 +163,11 @@ namespace toolkit
//--------------------------------------------------------------------
void SAL_CALL UnoSimpleAnimationControl::stop() throw ( uno::RuntimeException )
{
- ::osl::MutexGuard aGuard( GetMutex() );
-
- uno::Reference< XSimpleAnimation > xAnimation( getPeer(), uno::UNO_QUERY );
+ uno::Reference< XSimpleAnimation > xAnimation;
+ {
+ ::osl::MutexGuard aGuard( GetMutex() );
+ xAnimation.set( getPeer(), uno::UNO_QUERY );
+ }
if ( xAnimation.is() )
xAnimation->stop();
}
@@ -199,9 +176,11 @@ namespace toolkit
void SAL_CALL UnoSimpleAnimationControl::setImageList( const uno::Sequence< uno::Reference< graphic::XGraphic > >& ImageList )
throw ( uno::RuntimeException )
{
- ::osl::MutexGuard aGuard( GetMutex() );
-
- uno::Reference< XSimpleAnimation > xAnimation( getPeer(), uno::UNO_QUERY );
+ uno::Reference< XSimpleAnimation > xAnimation;
+ {
+ ::osl::MutexGuard aGuard( GetMutex() );
+ xAnimation.set( getPeer(), uno::UNO_QUERY );
+ }
if ( xAnimation.is() )
xAnimation->setImageList( ImageList );
}
diff --git a/toolkit/source/controls/tkspinbutton.cxx b/toolkit/source/controls/tkspinbutton.cxx
index 5929dc7a4635..9396aea43290 100644
--- a/toolkit/source/controls/tkspinbutton.cxx
+++ b/toolkit/source/controls/tkspinbutton.cxx
@@ -50,7 +50,8 @@ namespace toolkit
//= UnoSpinButtonModel
//====================================================================
//--------------------------------------------------------------------
- UnoSpinButtonModel::UnoSpinButtonModel()
+ UnoSpinButtonModel::UnoSpinButtonModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory )
+ :UnoControlModel( i_factory )
{
ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR );
ImplRegisterProperty( BASEPROPERTY_BORDER );
@@ -137,8 +138,9 @@ namespace toolkit
//= UnoSpinButtonControl
//====================================================================
//--------------------------------------------------------------------
- UnoSpinButtonControl::UnoSpinButtonControl()
- :maAdjustmentListeners( *this )
+ UnoSpinButtonControl::UnoSpinButtonControl( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoControlBase( i_factory )
+ ,maAdjustmentListeners( *this )
{
}
diff --git a/toolkit/source/controls/tkthrobber.cxx b/toolkit/source/controls/tkthrobber.cxx
index 1dc83f860e34..8a1927a732cb 100644
--- a/toolkit/source/controls/tkthrobber.cxx
+++ b/toolkit/source/controls/tkthrobber.cxx
@@ -44,7 +44,8 @@ namespace toolkit
//= UnoThrobberControlModel
//====================================================================
//--------------------------------------------------------------------
- UnoThrobberControlModel::UnoThrobberControlModel()
+ UnoThrobberControlModel::UnoThrobberControlModel( const uno::Reference< lang::XMultiServiceFactory >& i_factory )
+ :UnoControlModel( i_factory )
{
ImplRegisterProperty( BASEPROPERTY_BORDER );
ImplRegisterProperty( BASEPROPERTY_BORDERCOLOR );
@@ -117,7 +118,8 @@ namespace toolkit
//= UnoThrobberControl
//====================================================================
//--------------------------------------------------------------------
- UnoThrobberControl::UnoThrobberControl()
+ UnoThrobberControl::UnoThrobberControl( const uno::Reference< lang::XMultiServiceFactory >& i_factory )
+ :UnoControlBase( i_factory )
{
}
diff --git a/toolkit/source/controls/tree/treecontrol.cxx b/toolkit/source/controls/tree/treecontrol.cxx
index d56ca82bb845..d2c66c64b41a 100644
--- a/toolkit/source/controls/tree/treecontrol.cxx
+++ b/toolkit/source/controls/tree/treecontrol.cxx
@@ -55,7 +55,8 @@ namespace toolkit
// ----------------------------------------------------
// class UnoTreeModel
// ----------------------------------------------------
-UnoTreeModel::UnoTreeModel()
+UnoTreeModel::UnoTreeModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory )
+ :UnoControlModel( i_factory )
{
ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR );
ImplRegisterProperty( BASEPROPERTY_BORDER );
@@ -74,7 +75,7 @@ UnoTreeModel::UnoTreeModel()
ImplRegisterProperty( BASEPROPERTY_TREE_ROOTDISPLAYED );
ImplRegisterProperty( BASEPROPERTY_TREE_SHOWSHANDLES );
ImplRegisterProperty( BASEPROPERTY_TREE_SHOWSROOTHANDLES );
- ImplRegisterProperty( BASEPROPERTY_TREE_ROWHEIGHT );
+ ImplRegisterProperty( BASEPROPERTY_ROW_HEIGHT );
ImplRegisterProperty( BASEPROPERTY_TREE_INVOKESSTOPNODEEDITING );
ImplRegisterProperty( BASEPROPERTY_HIDEINACTIVESELECTION );
}
@@ -100,7 +101,7 @@ Any UnoTreeModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
{
case BASEPROPERTY_TREE_SELECTIONTYPE:
return Any( SelectionType_NONE );
- case BASEPROPERTY_TREE_ROWHEIGHT:
+ case BASEPROPERTY_ROW_HEIGHT:
return Any( sal_Int32( 0 ) );
case BASEPROPERTY_TREE_DATAMODEL:
return Any( Reference< XTreeDataModel >( 0 ) );
@@ -140,8 +141,9 @@ Reference< XPropertySetInfo > UnoTreeModel::getPropertySetInfo( ) throw(Runtime
// ----------------------------------------------------
// class UnoTreeControl
// ----------------------------------------------------
-UnoTreeControl::UnoTreeControl()
-: maSelectionListeners( *this )
+UnoTreeControl::UnoTreeControl( const Reference< XMultiServiceFactory >& i_factory )
+: UnoTreeControl_Base( i_factory )
+, maSelectionListeners( *this )
, maTreeExpansionListeners( *this )
, maTreeEditListeners( *this )
{
@@ -452,14 +454,14 @@ void UnoTreeControl::createPeer( const uno::Reference< awt::XToolkit > & rxToolk
}
-Reference< XInterface > SAL_CALL TreeControl_CreateInstance( const Reference< XMultiServiceFactory >& )
+Reference< XInterface > SAL_CALL TreeControl_CreateInstance( const Reference< XMultiServiceFactory >& i_factory )
{
- return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::UnoTreeControl );
+ return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::UnoTreeControl( i_factory ) );
}
-Reference< XInterface > SAL_CALL TreeControlModel_CreateInstance( const Reference< XMultiServiceFactory >& )
+Reference< XInterface > SAL_CALL TreeControlModel_CreateInstance( const Reference< XMultiServiceFactory >& i_factory )
{
- return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::UnoTreeModel );
+ return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::UnoTreeModel( i_factory ) );
}
void SAL_CALL TreeEditListenerMultiplexer::nodeEditing( const Reference< XTreeNode >& Node ) throw (RuntimeException, ::com::sun::star::util::VetoException)
diff --git a/toolkit/source/controls/tree/treecontrol.hxx b/toolkit/source/controls/tree/treecontrol.hxx
index e646664c4a64..ff5ddb4e348c 100644
--- a/toolkit/source/controls/tree/treecontrol.hxx
+++ b/toolkit/source/controls/tree/treecontrol.hxx
@@ -54,7 +54,7 @@ protected:
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
public:
- UnoTreeModel();
+ UnoTreeModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
UnoTreeModel( const UnoTreeModel& rModel );
UnoControlModel* Clone() const;
@@ -73,10 +73,11 @@ public:
// ===================================================================
// = UnoTreeControl
// ===================================================================
-class UnoTreeControl : public ::cppu::ImplInheritanceHelper1< UnoControlBase, ::com::sun::star::awt::tree::XTreeControl >
+typedef ::cppu::ImplInheritanceHelper1< UnoControlBase, ::com::sun::star::awt::tree::XTreeControl > UnoTreeControl_Base;
+class UnoTreeControl : public UnoTreeControl_Base
{
public:
- UnoTreeControl();
+ UnoTreeControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory );
::rtl::OUString GetComponentServiceName();
// ::com::sun::star::lang::XComponent
diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx
index 075080906900..7fbac44035c6 100644
--- a/toolkit/source/controls/unocontrol.cxx
+++ b/toolkit/source/controls/unocontrol.cxx
@@ -52,6 +52,7 @@
#include <vcl/svapp.hxx>
#include <vcl/wrkwin.hxx>
#include <comphelper/stl_types.hxx>
+#include <comphelper/processfactory.hxx>
#include <toolkit/helper/property.hxx>
#include <toolkit/helper/servicenames.hxx>
#include <toolkit/helper/vclunohelper.hxx>
@@ -164,7 +165,26 @@ struct UnoControl_Data
// ----------------------------------------------------
DBG_NAME( UnoControl )
UnoControl::UnoControl()
- : maDisposeListeners( *this )
+ :maContext( ::comphelper::getProcessServiceFactory() )
+ ,maDisposeListeners( *this )
+ ,maWindowListeners( *this )
+ ,maFocusListeners( *this )
+ ,maKeyListeners( *this )
+ ,maMouseListeners( *this )
+ ,maMouseMotionListeners( *this )
+ ,maPaintListeners( *this )
+ ,maModeChangeListeners( GetMutex() )
+ ,mpData( new UnoControl_Data )
+{
+ DBG_CTOR( UnoControl, NULL );
+ OSL_ENSURE( false, "UnoControl::UnoControl: not implemented. Well, not really." );
+ // just implemented to let the various FooImplInheritanceHelper compile, you should use the
+ // version taking a service factory
+}
+
+UnoControl::UnoControl( const Reference< XMultiServiceFactory >& i_factory )
+ : maContext( i_factory )
+ , maDisposeListeners( *this )
, maWindowListeners( *this )
, maFocusListeners( *this )
, maKeyListeners( *this )
diff --git a/toolkit/source/controls/unocontrolbase.cxx b/toolkit/source/controls/unocontrolbase.cxx
index bbd0fc507e80..4dc1412ba661 100644
--- a/toolkit/source/controls/unocontrolbase.cxx
+++ b/toolkit/source/controls/unocontrolbase.cxx
@@ -32,6 +32,7 @@
#include <toolkit/controls/unocontrolbase.hxx>
#include <toolkit/helper/property.hxx>
+#include <comphelper/processfactory.hxx>
#include <tools/debug.hxx>
@@ -39,6 +40,14 @@
// class UnoControlBase
// ----------------------------------------------------
+UnoControlBase::UnoControlBase()
+ :UnoControl( ::comphelper::getProcessServiceFactory() )
+{
+ OSL_ENSURE( false, "UnoControlBase::UnoControlBase: not implemented. Well, not really." );
+ // just implemented to let the various FooImplInheritanceHelper compile, you should use the
+ // version taking a service factory
+}
+
sal_Bool UnoControlBase::ImplHasProperty( sal_uInt16 nPropId )
{
::rtl::OUString aPropName( GetPropertyName( nPropId ) );
diff --git a/toolkit/source/controls/unocontrolcontainer.cxx b/toolkit/source/controls/unocontrolcontainer.cxx
index c3149a8cc869..bdbdc9aae7f1 100644
--- a/toolkit/source/controls/unocontrolcontainer.cxx
+++ b/toolkit/source/controls/unocontrolcontainer.cxx
@@ -412,13 +412,16 @@ void SAL_CALL DialogStepChangedListener::propertyChange( const beans::PropertyC
// ----------------------------------------------------
// class UnoControlContainer
// ----------------------------------------------------
-UnoControlContainer::UnoControlContainer() : maCListeners( *this )
+UnoControlContainer::UnoControlContainer( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory )
+ :UnoControlContainer_Base( i_factory )
+ ,maCListeners( *this )
{
mpControls = new UnoControlHolderList;
}
-UnoControlContainer::UnoControlContainer( uno::Reference< awt::XWindowPeer > xP )
- : maCListeners( *this )
+UnoControlContainer::UnoControlContainer( const uno::Reference< lang::XMultiServiceFactory >& i_factory, const uno::Reference< awt::XWindowPeer >& xP )
+ :UnoControlContainer_Base( i_factory )
+ ,maCListeners( *this )
{
setPeer( xP );
mbDisposePeer = sal_False;
@@ -808,6 +811,7 @@ void UnoControlContainer::createPeer( const uno::Reference< awt::XToolkit >& rxT
aCtrls.getArray()[n]->createPeer( rxToolkit, getPeer() );
uno::Reference< awt::XVclContainerPeer > xC( getPeer(), uno::UNO_QUERY );
+ OSL_ENSURE(xC.is(),"Peer isn't valid. Please check!");
xC->enableDialogControl( sal_True );
ImplActivateTabControllers();
diff --git a/toolkit/source/controls/unocontrolcontainermodel.cxx b/toolkit/source/controls/unocontrolcontainermodel.cxx
index 7630971d8a57..66948ce095d1 100644
--- a/toolkit/source/controls/unocontrolcontainermodel.cxx
+++ b/toolkit/source/controls/unocontrolcontainermodel.cxx
@@ -36,7 +36,8 @@
// ----------------------------------------------------
// class UnoControlContainerModel
// ----------------------------------------------------
-UnoControlContainerModel::UnoControlContainerModel()
+UnoControlContainerModel::UnoControlContainerModel( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory )
+ :UnoControlModel( i_factory )
{
ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR );
ImplRegisterProperty( BASEPROPERTY_BORDER );
diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx
index 91d202409e86..7a2742abae57 100644
--- a/toolkit/source/controls/unocontrolmodel.cxx
+++ b/toolkit/source/controls/unocontrolmodel.cxx
@@ -41,7 +41,6 @@
#include <toolkit/controls/unocontrolmodel.hxx>
#include <toolkit/helper/macros.hxx>
#include <cppuhelper/typeprovider.hxx>
-#include <cppuhelper/extract.hxx>
#include <rtl/memory.h>
#include <rtl/uuid.h>
#include <tools/diagnose_ex.h>
@@ -59,6 +58,7 @@
#include <unotools/configmgr.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/sequence.hxx>
+#include <comphelper/extract.hxx>
#include <vcl/svapp.hxx>
#include <uno/data.h>
@@ -154,7 +154,24 @@ static void lcl_ImplMergeFontProperty( FontDescriptor& rFD, sal_uInt16 nPropId,
// class UnoControlModel
// ----------------------------------------------------
UnoControlModel::UnoControlModel()
- : OPropertySetHelper( BrdcstHelper ), maDisposeListeners( *this )
+ :UnoControlModel_Base()
+ ,MutexAndBroadcastHelper()
+ ,OPropertySetHelper( BrdcstHelper )
+ ,maDisposeListeners( *this )
+ ,maContext( ::comphelper::getProcessServiceFactory() )
+{
+ OSL_ENSURE( false, "UnoControlModel::UnoControlModel: not implemented. Well, not really." );
+ // just implemented to let the various FooImplInheritanceHelper compile, you should use the
+ // version taking a service factory
+ mpData = new ImplPropertyTable;
+}
+
+UnoControlModel::UnoControlModel( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoControlModel_Base()
+ ,MutexAndBroadcastHelper()
+ ,OPropertySetHelper( BrdcstHelper )
+ ,maDisposeListeners( *this )
+ ,maContext( i_factory )
{
// Die Properties muessen vom Model in die Tabelle gestopft werden,
// nur vorhandene Properties sind gueltige Properties, auch wenn VOID.
@@ -162,18 +179,11 @@ UnoControlModel::UnoControlModel()
}
UnoControlModel::UnoControlModel( const UnoControlModel& rModel )
- : XControlModel()
- , XPropertyState()
- , XPersistObject()
- , XComponent()
- , XServiceInfo()
- , XTypeProvider()
- , XUnoTunnel()
- , XCloneable()
+ : UnoControlModel_Base()
, MutexAndBroadcastHelper()
, OPropertySetHelper( BrdcstHelper )
- , OWeakAggObject()
, maDisposeListeners( *this )
+ , maContext( rModel.maContext )
{
mpData = new ImplPropertyTable;
@@ -403,7 +413,7 @@ sal_Bool UnoControlModel::ImplHasProperty( sal_uInt16 nPropId ) const
aLocale.Country = sDefaultCurrency.copy( nSepPos + 1 );
}
- LocaleDataWrapper aLocaleInfo( ::comphelper::getProcessServiceFactory(), aLocale );
+ LocaleDataWrapper aLocaleInfo( maContext.getLegacyServiceFactory(), aLocale );
if ( !sBankSymbol.getLength() )
sBankSymbol = aLocaleInfo.getCurrBankSymbol();
@@ -484,36 +494,20 @@ void UnoControlModel::ImplRegisterProperties( const std::list< sal_uInt16 > &rId
// ::com::sun::star::uno::XInterface
::com::sun::star::uno::Any UnoControlModel::queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException)
{
- ::com::sun::star::uno::Any aRet = ::cppu::queryInterface( rType,
- SAL_STATIC_CAST( ::com::sun::star::awt::XControlModel*, this ),
- SAL_STATIC_CAST( ::com::sun::star::io::XPersistObject*, this ),
- SAL_STATIC_CAST( ::com::sun::star::lang::XComponent*, this ),
- SAL_STATIC_CAST( ::com::sun::star::lang::XServiceInfo*, this ),
- SAL_STATIC_CAST( ::com::sun::star::util::XCloneable*, this ),
- SAL_STATIC_CAST( ::com::sun::star::beans::XPropertyState*, this ),
- SAL_STATIC_CAST( ::com::sun::star::beans::XMultiPropertySet*, this ),
- SAL_STATIC_CAST( ::com::sun::star::beans::XFastPropertySet*, this ),
- SAL_STATIC_CAST( ::com::sun::star::beans::XPropertySet*, this ),
- SAL_STATIC_CAST( ::com::sun::star::lang::XTypeProvider*, this ),
- SAL_STATIC_CAST( ::com::sun::star::lang::XUnoTunnel*, this ) );
- return (aRet.hasValue() ? aRet : OWeakAggObject::queryAggregation( rType ));
+ Any aRet = UnoControlModel_Base::queryAggregation( rType );
+ if ( !aRet.hasValue() )
+ aRet = ::cppu::OPropertySetHelper::queryInterface( rType );
+ return aRet;
}
// ::com::sun::star::lang::XUnoTunnel
IMPL_XUNOTUNNEL( UnoControlModel )
+// XInterface
+IMPLEMENT_FORWARD_REFCOUNT( UnoControlModel, UnoControlModel_Base )
+
// ::com::sun::star::lang::XTypeProvider
-IMPL_XTYPEPROVIDER_START( UnoControlModel )
- getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel>* ) NULL ),
- getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::io::XPersistObject>* ) NULL ),
- getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent>* ) NULL ),
- getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XServiceInfo>* ) NULL ),
- getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable>* ) NULL ),
- getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState>* ) NULL ),
- getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XMultiPropertySet>* ) NULL ),
- getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XFastPropertySet>* ) NULL ),
- getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>* ) NULL )
-IMPL_XTYPEPROVIDER_END
+IMPLEMENT_FORWARD_XTYPEPROVIDER2( UnoControlModel, UnoControlModel_Base, ::cppu::OPropertySetHelper )
uno::Reference< util::XCloneable > UnoControlModel::createClone() throw(::com::sun::star::uno::RuntimeException)
@@ -532,6 +526,8 @@ void UnoControlModel::dispose( ) throw(::com::sun::star::uno::RuntimeException)
aEvt.Source = (::com::sun::star::uno::XAggregation*)(::cppu::OWeakAggObject*)this;
maDisposeListeners.disposeAndClear( aEvt );
+ BrdcstHelper.aLC.disposeAndClear( aEvt );
+
// let the property set helper notify our property listeners
OPropertySetHelper::disposing();
}
@@ -1153,7 +1149,7 @@ sal_Bool UnoControlModel::convertFastPropertyValue( Any & rConvertedValue, Any &
}
else
{
- BOOL bConverted = FALSE;
+ sal_Bool bConverted = sal_False;
// 13.03.2001 - 84923 - frank.schoenheit@germany.sun.com
switch (pDestType->getTypeClass())
diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx
index d3838a7421a4..210fc08a2680 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -42,7 +42,6 @@
#include <toolkit/controls/formattedcontrol.hxx>
#include <toolkit/controls/roadmapcontrol.hxx>
#include <toolkit/controls/unocontrols.hxx>
-#include <toolkit/controls/geometrycontrolmodel.hxx>
#include <toolkit/controls/stdtabcontroller.hxx>
#include <toolkit/helper/property.hxx>
#include <toolkit/helper/unopropertyarrayhelper.hxx>
@@ -95,7 +94,8 @@ using namespace ::toolkit;
// ----------------------------------------------------
// class UnoControlEditModel
// ----------------------------------------------------
-UnoControlEditModel::UnoControlEditModel()
+UnoControlEditModel::UnoControlEditModel( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoControlModel( i_factory )
{
UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXEdit );
}
@@ -146,8 +146,9 @@ uno::Reference< beans::XPropertySetInfo > UnoControlEditModel::getPropertySetInf
// ----------------------------------------------------
// class UnoEditControl
// ----------------------------------------------------
-UnoEditControl::UnoEditControl()
- :maTextListeners( *this )
+UnoEditControl::UnoEditControl( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoControlBase( i_factory )
+ ,maTextListeners( *this )
,mnMaxTextLen( 0 )
,mbSetTextInPeer( sal_False )
,mbSetMaxTextLenInPeer( sal_False )
@@ -156,7 +157,7 @@ UnoEditControl::UnoEditControl()
maComponentInfos.nWidth = 100;
maComponentInfos.nHeight = 12;
mnMaxTextLen = 0;
- mbSetMaxTextLenInPeer = FALSE;
+ mbSetMaxTextLenInPeer = sal_False;
}
uno::Any SAL_CALL UnoEditControl::queryAggregation( const uno::Type & rType ) throw(uno::RuntimeException)
@@ -460,7 +461,8 @@ void UnoEditControl::getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ) t
// ----------------------------------------------------
// class UnoControlFileControlModel
// ----------------------------------------------------
-UnoControlFileControlModel::UnoControlFileControlModel()
+UnoControlFileControlModel::UnoControlFileControlModel( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoControlModel( i_factory )
{
ImplRegisterProperty( BASEPROPERTY_ALIGN );
ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR );
@@ -519,7 +521,8 @@ uno::Reference< beans::XPropertySetInfo > UnoControlFileControlModel::getPropert
// ----------------------------------------------------
// class UnoFileControl
// ----------------------------------------------------
-UnoFileControl::UnoFileControl()
+UnoFileControl::UnoFileControl( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoEditControl( i_factory )
{
}
@@ -547,8 +550,7 @@ uno::Any GraphicControlModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
// graphic manager uniqueid
rtl::OUString sID = _rURL.copy( sizeof( UNO_NAME_GRAPHOBJ_URLPREFIX ) - 1 );
// get the DefaultContext
- ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
- mxGrfObj = graphic::GraphicObject::createWithId( aContext.getUNOContext(), sID );
+ mxGrfObj = graphic::GraphicObject::createWithId( maContext.getUNOContext(), sID );
}
else // linked
mxGrfObj = NULL; // release the GraphicObject
@@ -558,9 +560,8 @@ uno::Any GraphicControlModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
try
{
- ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
uno::Reference< graphic::XGraphicProvider > xProvider;
- if ( aContext.createComponent( "com.sun.star.graphic.GraphicProvider", xProvider ) )
+ if ( maContext.createComponent( "com.sun.star.graphic.GraphicProvider", xProvider ) )
{
uno::Sequence< beans::PropertyValue > aMediaProperties(1);
aMediaProperties[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) );
@@ -638,7 +639,8 @@ void SAL_CALL GraphicControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 n
// ----------------------------------------------------
// class UnoControlButtonModel
// ----------------------------------------------------
-UnoControlButtonModel::UnoControlButtonModel()
+UnoControlButtonModel::UnoControlButtonModel( const Reference< XMultiServiceFactory >& i_factory )
+ :GraphicControlModel( i_factory )
{
UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXButton );
@@ -694,9 +696,10 @@ uno::Reference< beans::XPropertySetInfo > UnoControlButtonModel::getPropertySetI
// ----------------------------------------------------
// class UnoButtonControl
// ----------------------------------------------------
-UnoButtonControl::UnoButtonControl()
- : maActionListeners( *this )
- , maItemListeners( *this )
+UnoButtonControl::UnoButtonControl( const uno::Reference< lang::XMultiServiceFactory >& i_factory )
+ :UnoButtonControl_Base( i_factory )
+ ,maActionListeners( *this )
+ ,maItemListeners( *this )
{
maComponentInfos.nWidth = 50;
maComponentInfos.nHeight = 14;
@@ -833,8 +836,9 @@ awt::Size UnoButtonControl::calcAdjustedSize( const awt::Size& rNewSize ) throw(
// ----------------------------------------------------
// class UnoControlImageControlModel
// ----------------------------------------------------
-UnoControlImageControlModel::UnoControlImageControlModel()
- :mbAdjustingImageScaleMode( false )
+UnoControlImageControlModel::UnoControlImageControlModel( const Reference< XMultiServiceFactory >& i_factory )
+ :GraphicControlModel( i_factory )
+ ,mbAdjustingImageScaleMode( false )
{
UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXImageControl );
}
@@ -914,8 +918,9 @@ void SAL_CALL UnoControlImageControlModel::setFastPropertyValue_NoBroadcast( sal
// ----------------------------------------------------
// class UnoImageControlControl
// ----------------------------------------------------
-UnoImageControlControl::UnoImageControlControl()
- : maActionListeners( *this )
+UnoImageControlControl::UnoImageControlControl( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoImageControlControl_Base( i_factory )
+ ,maActionListeners( *this )
{
// Woher die Defaults nehmen?
maComponentInfos.nWidth = 100;
@@ -958,7 +963,8 @@ awt::Size UnoImageControlControl::calcAdjustedSize( const awt::Size& rNewSize )
// ----------------------------------------------------
// class UnoControlRadioButtonModel
// ----------------------------------------------------
-UnoControlRadioButtonModel::UnoControlRadioButtonModel()
+UnoControlRadioButtonModel::UnoControlRadioButtonModel( const Reference< XMultiServiceFactory >& i_factory )
+ :GraphicControlModel( i_factory )
{
UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXRadioButton );
}
@@ -1005,8 +1011,10 @@ uno::Reference< beans::XPropertySetInfo > UnoControlRadioButtonModel::getPropert
// ----------------------------------------------------
// class UnoRadioButtonControl
// ----------------------------------------------------
-UnoRadioButtonControl::UnoRadioButtonControl()
- : maItemListeners( *this ), maActionListeners( *this )
+UnoRadioButtonControl::UnoRadioButtonControl( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoRadioButtonControl_Base( i_factory )
+ ,maItemListeners( *this )
+ ,maActionListeners( *this )
{
maComponentInfos.nWidth = 100;
maComponentInfos.nHeight = 12;
@@ -1165,7 +1173,8 @@ awt::Size UnoRadioButtonControl::calcAdjustedSize( const awt::Size& rNewSize ) t
// ----------------------------------------------------
// class UnoControlCheckBoxModel
// ----------------------------------------------------
-UnoControlCheckBoxModel::UnoControlCheckBoxModel()
+UnoControlCheckBoxModel::UnoControlCheckBoxModel( const Reference< XMultiServiceFactory >& i_factory )
+ :GraphicControlModel( i_factory )
{
UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXCheckBox );
}
@@ -1212,8 +1221,9 @@ uno::Reference< beans::XPropertySetInfo > UnoControlCheckBoxModel::getPropertySe
// ----------------------------------------------------
// class UnoCheckBoxControl
// ----------------------------------------------------
-UnoCheckBoxControl::UnoCheckBoxControl()
- : maItemListeners( *this ), maActionListeners( *this )
+UnoCheckBoxControl::UnoCheckBoxControl( const uno::Reference< lang::XMultiServiceFactory >& i_factory )
+ :UnoCheckBoxControl_Base( i_factory )
+ ,maItemListeners( *this ), maActionListeners( *this )
{
maComponentInfos.nWidth = 100;
maComponentInfos.nHeight = 12;
@@ -1348,7 +1358,8 @@ awt::Size UnoCheckBoxControl::calcAdjustedSize( const awt::Size& rNewSize ) thro
// ----------------------------------------------------
// class UnoControlFixedHyperlinkModel
// ----------------------------------------------------
-UnoControlFixedHyperlinkModel::UnoControlFixedHyperlinkModel()
+UnoControlFixedHyperlinkModel::UnoControlFixedHyperlinkModel( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoControlModel( i_factory )
{
UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXFixedHyperlink );
}
@@ -1403,8 +1414,9 @@ uno::Reference< beans::XPropertySetInfo > UnoControlFixedHyperlinkModel::getProp
// ----------------------------------------------------
// class UnoFixedHyperlinkControl
// ----------------------------------------------------
-UnoFixedHyperlinkControl::UnoFixedHyperlinkControl()
- : maActionListeners( *this )
+UnoFixedHyperlinkControl::UnoFixedHyperlinkControl( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoControlBase( i_factory )
+ ,maActionListeners( *this )
{
maComponentInfos.nWidth = 100;
maComponentInfos.nHeight = 12;
@@ -1533,7 +1545,8 @@ void UnoFixedHyperlinkControl::removeActionListener(const uno::Reference< awt::X
// ----------------------------------------------------
// class UnoControlFixedTextModel
// ----------------------------------------------------
-UnoControlFixedTextModel::UnoControlFixedTextModel()
+UnoControlFixedTextModel::UnoControlFixedTextModel( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoControlModel( i_factory )
{
UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXFixedText );
}
@@ -1583,7 +1596,8 @@ uno::Reference< beans::XPropertySetInfo > UnoControlFixedTextModel::getPropertyS
// ----------------------------------------------------
// class UnoFixedTextControl
// ----------------------------------------------------
-UnoFixedTextControl::UnoFixedTextControl()
+UnoFixedTextControl::UnoFixedTextControl( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoControlBase( i_factory )
{
maComponentInfos.nWidth = 100;
maComponentInfos.nHeight = 12;
@@ -1663,7 +1677,8 @@ awt::Size UnoFixedTextControl::calcAdjustedSize( const awt::Size& rNewSize ) thr
// ----------------------------------------------------
// class UnoControlGroupBoxModel
// ----------------------------------------------------
-UnoControlGroupBoxModel::UnoControlGroupBoxModel()
+UnoControlGroupBoxModel::UnoControlGroupBoxModel( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoControlModel( i_factory )
{
ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL );
ImplRegisterProperty( BASEPROPERTY_ENABLED );
@@ -1714,7 +1729,8 @@ uno::Reference< beans::XPropertySetInfo > UnoControlGroupBoxModel::getPropertySe
// ----------------------------------------------------
// class UnoGroupBoxControl
// ----------------------------------------------------
-UnoGroupBoxControl::UnoGroupBoxControl()
+UnoGroupBoxControl::UnoGroupBoxControl( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoControlBase( i_factory )
{
maComponentInfos.nWidth = 100;
maComponentInfos.nHeight = 100;
@@ -1801,6 +1817,11 @@ struct UnoControlListBoxModel_Data
return aItems;
}
+ void copyItems( const UnoControlListBoxModel_Data& i_copySource )
+ {
+ m_aListItems = i_copySource.m_aListItems;
+ }
+
void setAllItems( const ::std::vector< ListItem >& i_rItems )
{
m_aListItems = i_rItems;
@@ -1831,27 +1852,23 @@ private:
// = UnoControlListBoxModel
// =====================================================================================================================
// ---------------------------------------------------------------------------------------------------------------------
-UnoControlListBoxModel::UnoControlListBoxModel()
- :UnoControlListBoxModel_Base()
- ,m_pData( new UnoControlListBoxModel_Data( *this ) )
- ,m_aItemListListeners( GetMutex() )
-{
- UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXListBox );
-}
-// ---------------------------------------------------------------------------------------------------------------------
-UnoControlListBoxModel::UnoControlListBoxModel(bool)
- :UnoControlListBoxModel_Base()
+UnoControlListBoxModel::UnoControlListBoxModel( const Reference< XMultiServiceFactory >& i_factory, ConstructorMode const i_mode )
+ :UnoControlListBoxModel_Base( i_factory )
,m_pData( new UnoControlListBoxModel_Data( *this ) )
,m_aItemListListeners( GetMutex() )
{
+ if ( i_mode == ConstructDefault )
+ {
+ UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXListBox );
+ }
}
-
// ---------------------------------------------------------------------------------------------------------------------
UnoControlListBoxModel::UnoControlListBoxModel( const UnoControlListBoxModel& i_rSource )
:UnoControlListBoxModel_Base( i_rSource )
,m_pData( new UnoControlListBoxModel_Data( *this ) )
,m_aItemListListeners( GetMutex() )
{
+ m_pData->copyItems( *i_rSource.m_pData );
}
UnoControlListBoxModel::~UnoControlListBoxModel()
{
@@ -1862,6 +1879,7 @@ IMPL_SERVICEINFO_DERIVED( UnoControlListBoxModel, UnoControlModel, szServiceName
{
return ::rtl::OUString::createFromAscii( szServiceName_UnoControlListBoxModel );
}
+
// ---------------------------------------------------------------------------------------------------------------------
uno::Any UnoControlListBoxModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
{
@@ -2277,8 +2295,9 @@ void UnoControlListBoxModel::impl_notifyItemListEvent_nolck( const sal_Int32 i_n
// ----------------------------------------------------
// class UnoListBoxControl
// ----------------------------------------------------
-UnoListBoxControl::UnoListBoxControl()
- :maActionListeners( *this )
+UnoListBoxControl::UnoListBoxControl( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoListBoxControl_Base( i_factory )
+ ,maActionListeners( *this )
,maItemListeners( *this )
{
maComponentInfos.nWidth = 100;
@@ -2707,7 +2726,8 @@ ItemListenerMultiplexer& UnoListBoxControl::getItemListeners()
// ----------------------------------------------------
// class UnoControlComboBoxModel
// ----------------------------------------------------
-UnoControlComboBoxModel::UnoControlComboBoxModel() : UnoControlListBoxModel(true)
+UnoControlComboBoxModel::UnoControlComboBoxModel( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoControlListBoxModel( i_factory, ConstructWithoutProperties )
{
UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXComboBox );
}
@@ -2782,9 +2802,10 @@ uno::Any UnoControlComboBoxModel::ImplGetDefaultValue( sal_uInt16 nPropId ) cons
// ----------------------------------------------------
// class UnoComboBoxControl
// ----------------------------------------------------
-UnoComboBoxControl::UnoComboBoxControl()
- : maActionListeners( *this ),
- maItemListeners( *this )
+UnoComboBoxControl::UnoComboBoxControl( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoEditControl( i_factory )
+ ,maActionListeners( *this )
+ ,maItemListeners( *this )
{
maComponentInfos.nWidth = 100;
maComponentInfos.nHeight = 12;
@@ -3102,7 +3123,9 @@ sal_Int16 UnoComboBoxControl::getDropDownLineCount() throw(uno::RuntimeException
// ----------------------------------------------------
// UnoSpinFieldControl
// ----------------------------------------------------
-UnoSpinFieldControl::UnoSpinFieldControl() : maSpinListeners( *this )
+UnoSpinFieldControl::UnoSpinFieldControl( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoEditControl( i_factory )
+ ,maSpinListeners( *this )
{
mbRepeat = sal_False;
}
@@ -3192,7 +3215,8 @@ void UnoSpinFieldControl::enableRepeat( sal_Bool bRepeat ) throw(::com::sun::sta
// ----------------------------------------------------
// class UnoControlDateFieldModel
// ----------------------------------------------------
-UnoControlDateFieldModel::UnoControlDateFieldModel()
+UnoControlDateFieldModel::UnoControlDateFieldModel( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoControlModel( i_factory )
{
UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXDateField );
}
@@ -3237,7 +3261,8 @@ uno::Reference< beans::XPropertySetInfo > UnoControlDateFieldModel::getPropertyS
// ----------------------------------------------------
// class UnoDateFieldControl
// ----------------------------------------------------
-UnoDateFieldControl::UnoDateFieldControl()
+UnoDateFieldControl::UnoDateFieldControl( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoSpinFieldControl( i_factory )
{
mnFirst = Date( 1, 1, 1900 ).GetDate();
mnLast = Date( 31, 12, 2200 ).GetDate();
@@ -3432,7 +3457,8 @@ sal_Bool UnoDateFieldControl::isStrictFormat() throw(uno::RuntimeException)
// ----------------------------------------------------
// class UnoControlTimeFieldModel
// ----------------------------------------------------
-UnoControlTimeFieldModel::UnoControlTimeFieldModel()
+UnoControlTimeFieldModel::UnoControlTimeFieldModel( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoControlModel( i_factory )
{
UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXTimeField );
}
@@ -3477,7 +3503,8 @@ uno::Reference< beans::XPropertySetInfo > UnoControlTimeFieldModel::getPropertyS
// ----------------------------------------------------
// class UnoTimeFieldControl
// ----------------------------------------------------
-UnoTimeFieldControl::UnoTimeFieldControl()
+UnoTimeFieldControl::UnoTimeFieldControl( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoSpinFieldControl( i_factory )
{
mnFirst = Time( 0, 0 ).GetTime();
mnLast = Time( 23, 59, 59, 99 ).GetTime();
@@ -3631,7 +3658,8 @@ sal_Bool UnoTimeFieldControl::isStrictFormat() throw(uno::RuntimeException)
// ----------------------------------------------------
// class UnoControlNumericFieldModel
// ----------------------------------------------------
-UnoControlNumericFieldModel::UnoControlNumericFieldModel()
+UnoControlNumericFieldModel::UnoControlNumericFieldModel( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoControlModel( i_factory )
{
UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXNumericField );
}
@@ -3676,7 +3704,8 @@ uno::Reference< beans::XPropertySetInfo > UnoControlNumericFieldModel::getProper
// ----------------------------------------------------
// class UnoNumericFieldControl
// ----------------------------------------------------
-UnoNumericFieldControl::UnoNumericFieldControl()
+UnoNumericFieldControl::UnoNumericFieldControl( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoSpinFieldControl( i_factory )
{
mnFirst = 0;
mnLast = 0x7FFFFFFF;
@@ -3827,7 +3856,8 @@ sal_Int16 UnoNumericFieldControl::getDecimalDigits() throw(uno::RuntimeException
// ----------------------------------------------------
// class UnoControlCurrencyFieldModel
// ----------------------------------------------------
-UnoControlCurrencyFieldModel::UnoControlCurrencyFieldModel()
+UnoControlCurrencyFieldModel::UnoControlCurrencyFieldModel( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoControlModel( i_factory )
{
UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXCurrencyField );
}
@@ -3876,7 +3906,8 @@ uno::Reference< beans::XPropertySetInfo > UnoControlCurrencyFieldModel::getPrope
// ----------------------------------------------------
// class UnoCurrencyFieldControl
// ----------------------------------------------------
-UnoCurrencyFieldControl::UnoCurrencyFieldControl()
+UnoCurrencyFieldControl::UnoCurrencyFieldControl( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoSpinFieldControl( i_factory )
{
mnFirst = 0;
mnLast = 0x7FFFFFFF;
@@ -4026,7 +4057,8 @@ sal_Int16 UnoCurrencyFieldControl::getDecimalDigits() throw(uno::RuntimeExceptio
// ----------------------------------------------------
// class UnoControlPatternFieldModel
// ----------------------------------------------------
-UnoControlPatternFieldModel::UnoControlPatternFieldModel()
+UnoControlPatternFieldModel::UnoControlPatternFieldModel( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoControlModel( i_factory )
{
UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXPatternField );
}
@@ -4069,7 +4101,8 @@ uno::Reference< beans::XPropertySetInfo > UnoControlPatternFieldModel::getProper
// ----------------------------------------------------
// class UnoPatternFieldControl
// ----------------------------------------------------
-UnoPatternFieldControl::UnoPatternFieldControl()
+UnoPatternFieldControl::UnoPatternFieldControl( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoSpinFieldControl( i_factory )
{
}
@@ -4158,7 +4191,8 @@ sal_Bool UnoPatternFieldControl::isStrictFormat() throw(uno::RuntimeException)
// ----------------------------------------------------
// class UnoControlProgressBarModel
// ----------------------------------------------------
-UnoControlProgressBarModel::UnoControlProgressBarModel()
+UnoControlProgressBarModel::UnoControlProgressBarModel( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoControlModel( i_factory )
{
ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR );
ImplRegisterProperty( BASEPROPERTY_BORDER );
@@ -4214,7 +4248,8 @@ uno::Reference< beans::XPropertySetInfo > UnoControlProgressBarModel::getPropert
// ----------------------------------------------------
// class UnoProgressBarControl
// ----------------------------------------------------
-UnoProgressBarControl::UnoProgressBarControl()
+UnoProgressBarControl::UnoProgressBarControl( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoControlBase( i_factory )
{
}
@@ -4290,7 +4325,8 @@ sal_Int32 UnoProgressBarControl::getValue() throw(::com::sun::star::uno::Runtime
// ----------------------------------------------------
// class UnoControlFixedLineModel
// ----------------------------------------------------
-UnoControlFixedLineModel::UnoControlFixedLineModel()
+UnoControlFixedLineModel::UnoControlFixedLineModel( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoControlModel( i_factory )
{
ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR );
ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL );
@@ -4341,7 +4377,8 @@ uno::Reference< beans::XPropertySetInfo > UnoControlFixedLineModel::getPropertyS
// ----------------------------------------------------
// class UnoFixedLineControl
// ----------------------------------------------------
-UnoFixedLineControl::UnoFixedLineControl()
+UnoFixedLineControl::UnoFixedLineControl( const Reference< XMultiServiceFactory >& i_factory )
+ :UnoControlBase( i_factory )
{
maComponentInfos.nWidth = 100; // ??
maComponentInfos.nHeight = 100; // ??
@@ -4356,3 +4393,4 @@ sal_Bool UnoFixedLineControl::isTransparent() throw(uno::RuntimeException)
{
return sal_True;
}
+
diff --git a/toolkit/source/helper/listenermultiplexer.cxx b/toolkit/source/helper/listenermultiplexer.cxx
index 9b8df60521ae..ed2fe978b169 100644
--- a/toolkit/source/helper/listenermultiplexer.cxx
+++ b/toolkit/source/helper/listenermultiplexer.cxx
@@ -211,3 +211,9 @@ IMPL_LISTENERMULTIPLEXER_BASEMETHODS( TreeEditListenerMultiplexer, ::com::sun::s
// ----------------------------------------------------
IMPL_LISTENERMULTIPLEXER_BASEMETHODS( SelectionListenerMultiplexer, ::com::sun::star::awt::grid::XGridSelectionListener )
IMPL_LISTENERMULTIPLEXER_LISTENERMETHOD( SelectionListenerMultiplexer, ::com::sun::star::awt::grid::XGridSelectionListener, selectionChanged, ::com::sun::star::awt::grid::GridSelectionEvent )
+
+// ----------------------------------------------------
+// class SelectionListenerMultiplexer
+// ----------------------------------------------------
+IMPL_LISTENERMULTIPLEXER_BASEMETHODS( TabPageListenerMultiplexer, ::com::sun::star::awt::tab::XTabPageContainerListener )
+IMPL_LISTENERMULTIPLEXER_LISTENERMETHOD( TabPageListenerMultiplexer, ::com::sun::star::awt::tab::XTabPageContainerListener, tabPageActivated, ::com::sun::star::awt::tab::TabPageActivatedEvent )
diff --git a/toolkit/source/helper/property.cxx b/toolkit/source/helper/property.cxx
index 3a83465a3218..a418b4a00b7b 100644
--- a/toolkit/source/helper/property.cxx
+++ b/toolkit/source/helper/property.cxx
@@ -48,7 +48,6 @@
#include <com/sun/star/awt/tree/XTreeDataModel.hpp>
#include <com/sun/star/awt/grid/XGridDataModel.hpp>
#include <com/sun/star/awt/grid/XGridColumnModel.hpp>
-#include <com/sun/star/awt/grid/ScrollBarMode.hpp>
#include <com/sun/star/view/SelectionType.hpp>
#include <com/sun/star/style/VerticalAlignment.hpp>
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
@@ -66,6 +65,7 @@ using ::com::sun::star::uno::Reference;
using ::com::sun::star::awt::XDevice;
using ::com::sun::star::awt::FontDescriptor;
using ::com::sun::star::style::VerticalAlignment;
+using ::com::sun::star::graphic::XGraphic;
struct ImplPropertyInfo
{
@@ -181,7 +181,7 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount )
DECL_PROP_3 ( "FormatKey", FORMATKEY, sal_Int32, BOUND, MAYBEVOID, TRANSIENT ),
DECL_PROP_3 ( "FormatsSupplier", FORMATSSUPPLIER, Reference< ::com::sun::star::util::XNumberFormatsSupplier >, BOUND, MAYBEVOID, TRANSIENT ),
- DECL_PROP_2 ( "Graphic", GRAPHIC, Reference< ::com::sun::star::graphic::XGraphic >, BOUND, TRANSIENT ),
+ DECL_PROP_2 ( "Graphic", GRAPHIC, Reference< XGraphic >, BOUND, TRANSIENT ),
DECL_PROP_2 ( "HelpText", HELPTEXT, ::rtl::OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "HelpURL", HELPURL, ::rtl::OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "HideInactiveSelection", HIDEINACTIVESELECTION, bool, BOUND, MAYBEDEFAULT ),
@@ -218,6 +218,7 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount )
DECL_PROP_2 ( "PushButtonType", PUSHBUTTONTYPE, sal_Int16, BOUND, MAYBEDEFAULT),
DECL_PROP_2 ( "ReadOnly", READONLY, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "Repeat", REPEAT, bool, BOUND, MAYBEDEFAULT ),
+ DECL_PROP_2 ( "AutoRepeat", AUTO_REPEAT, sal_Bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "RepeatDelay", REPEAT_DELAY, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ScaleImage", SCALEIMAGE, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ScaleMode", IMAGE_SCALE_MODE, sal_Int16, BOUND, MAYBEDEFAULT ),
@@ -271,23 +272,26 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount )
DECL_PROP_2 ( "RootDisplayed", TREE_ROOTDISPLAYED, sal_Bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ShowsHandles", TREE_SHOWSHANDLES, sal_Bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ShowsRootHandles", TREE_SHOWSROOTHANDLES, sal_Bool, BOUND, MAYBEDEFAULT ),
- DECL_PROP_3 ( "RowHeight", TREE_ROWHEIGHT, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
+ DECL_PROP_3 ( "RowHeight", ROW_HEIGHT, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "InvokesStopNodeEditing", TREE_INVOKESSTOPNODEEDITING, sal_Bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "DialogSourceURL", DIALOGSOURCEURL, ::rtl::OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "URL", URL, ::rtl::OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "WritingMode", WRITING_MODE, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "ContextWritingMode", CONTEXT_WRITING_MODE, sal_Int16, BOUND, MAYBEDEFAULT, TRANSIENT ),
- DECL_PROP_2 ( "ShowRowHeader", GRID_SHOWROWHEADER, sal_Bool, BOUND, MAYBEDEFAULT ),
- DECL_PROP_2 ( "ShowColumnHeader", GRID_SHOWCOLUMNHEADER, sal_Bool, BOUND, MAYBEDEFAULT ),
- DECL_PROP_3 ( "GridDataModel", GRID_DATAMODEL, Reference< ::com::sun::star::awt::grid::XGridDataModel >, BOUND, MAYBEDEFAULT, MAYBEVOID ),
- DECL_PROP_3 ( "ColumnModel", GRID_COLUMNMODEL, Reference< ::com::sun::star::awt::grid::XGridColumnModel >, BOUND, MAYBEDEFAULT, MAYBEVOID ),
+ DECL_PROP_2 ( "ShowRowHeader", GRID_SHOWROWHEADER, sal_Bool, BOUND, MAYBEDEFAULT ),
+ DECL_PROP_2 ( "RowHeaderWidth", ROW_HEADER_WIDTH, sal_Int32, BOUND, MAYBEDEFAULT ),
+ DECL_PROP_2 ( "ShowColumnHeader", GRID_SHOWCOLUMNHEADER, sal_Bool, BOUND, MAYBEDEFAULT ),
+ DECL_PROP_3 ( "ColumnHeaderHeight", COLUMN_HEADER_HEIGHT, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
+ DECL_PROP_1 ( "GridDataModel", GRID_DATAMODEL, Reference< ::com::sun::star::awt::grid::XGridDataModel >, BOUND ),
+ DECL_PROP_1 ( "ColumnModel", GRID_COLUMNMODEL, Reference< ::com::sun::star::awt::grid::XGridColumnModel >, BOUND ),
DECL_PROP_3 ( "SelectionModel", GRID_SELECTIONMODE, ::com::sun::star::view::SelectionType, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "EnableVisible", ENABLEVISIBLE, sal_Bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "ReferenceDevice", REFERENCE_DEVICE, Reference< XDevice >,BOUND, MAYBEDEFAULT, TRANSIENT ),
- DECL_PROP_3 ( "EvenRowBackgroundColor", GRID_EVEN_ROW_BACKGROUND, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
- DECL_PROP_3 ( "HeaderBackgroundColor", GRID_HEADER_BACKGROUND, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
- DECL_PROP_3 ( "GridLineColor", GRID_LINE_COLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
- DECL_PROP_3 ( "RowBackgroundColor", GRID_ROW_BACKGROUND, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID )
+ DECL_PROP_3 ( "HeaderBackgroundColor", GRID_HEADER_BACKGROUND, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
+ DECL_PROP_3 ( "HeaderTextColor", GRID_HEADER_TEXT_COLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
+ DECL_PROP_3 ( "GridLineColor", GRID_LINE_COLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
+ DECL_PROP_3 ( "RowBackgroundColors", GRID_ROW_BACKGROUND_COLORS, Sequence< sal_Int32 >, BOUND, MAYBEDEFAULT, MAYBEVOID ),
+ DECL_PROP_2 ( "UseGridLines", USE_GRID_LINES, sal_Bool, BOUND, MAYBEDEFAULT ),
};
pPropertyInfos = aImplPropertyInfos;
nElements = sizeof( aImplPropertyInfos ) / sizeof( ImplPropertyInfo );
diff --git a/toolkit/source/helper/registerservices.cxx b/toolkit/source/helper/registerservices.cxx
index 477032538af8..8a6b1d8de4b9 100644
--- a/toolkit/source/helper/registerservices.cxx
+++ b/toolkit/source/helper/registerservices.cxx
@@ -51,8 +51,14 @@
#include "toolkit/controls/tkspinbutton.hxx"
#include <toolkit/controls/tksimpleanimation.hxx>
#include <toolkit/controls/tkthrobber.hxx>
+#include <toolkit/controls/animatedimages.hxx>
+#include <toolkit/controls/spinningprogress.hxx>
#include <toolkit/controls/dialogcontrol.hxx>
+#include <toolkit/controls/tabpagemodel.hxx>
+#include <toolkit/controls/tabpagecontainer.hxx>
#include "toolkit/dllapi.h"
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
namespace toolkit
{
@@ -119,82 +125,92 @@ namespace toolkit
{ return ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface >( ( ::cppu::OWeakObject* ) new ImplName ); }
#define IMPL_CREATEINSTANCE2( ImplName ) \
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL ImplName##_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rSMgr) \
- { return ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface >( ( ::cppu::OWeakObject* ) new ImplName( rSMgr ) ); }
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL ImplName##_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ) \
+ { return ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface >( ( ::cppu::OWeakObject* ) new ImplName( i_factory ) ); }
-::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL UnoControlDialogModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& )
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL UnoControlDialogModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory )
{
- return ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface >( ( ::cppu::OWeakObject* ) new OGeometryControlModel<UnoControlDialogModel> );
+ return ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface >( ( ::cppu::OWeakObject* ) new OGeometryControlModel<UnoControlDialogModel>( i_factory ) );
}
-#define CHECKANDCREATEFACTORY( ImplName, ServiceName1, ServiceName2 ) \
- pRet = tryCreateFactory( sImplementationName, "stardiv.Toolkit." #ImplName, \
+#define GET_FACTORY_WITH_IMPL_PREFIX( ClassName, ImplNamePrefix, ServiceName1, ServiceName2 ) \
+ pRet = tryCreateFactory( sImplementationName, ImplNamePrefix "." #ClassName, \
ServiceName1, ServiceName2, \
- ImplName##_CreateInstance, xServiceFactory \
+ ClassName##_CreateInstance, xServiceFactory \
); \
if ( pRet ) \
return pRet; \
+#define GET_FACTORY( ImplName, ServiceName1, ServiceName2 ) \
+ GET_FACTORY_WITH_IMPL_PREFIX( ImplName, "stardiv.Toolkit", ServiceName1, ServiceName2 )
+
using namespace toolkit;
IMPL_CREATEINSTANCE2( VCLXToolkit )
IMPL_CREATEINSTANCE( StdTabController )
IMPL_CREATEINSTANCE( StdTabControllerModel )
-IMPL_CREATEINSTANCE( UnoButtonControl )
-IMPL_CREATEINSTANCE( UnoCheckBoxControl )
-IMPL_CREATEINSTANCE( UnoComboBoxControl )
-IMPL_CREATEINSTANCE( UnoControlButtonModel )
-IMPL_CREATEINSTANCE( UnoControlCheckBoxModel )
-IMPL_CREATEINSTANCE( UnoControlComboBoxModel )
-IMPL_CREATEINSTANCE( UnoControlContainer )
-IMPL_CREATEINSTANCE( UnoControlContainerModel )
-IMPL_CREATEINSTANCE( UnoControlCurrencyFieldModel )
-IMPL_CREATEINSTANCE( UnoControlDateFieldModel )
-IMPL_CREATEINSTANCE( UnoControlEditModel )
-IMPL_CREATEINSTANCE( UnoControlFileControlModel )
-IMPL_CREATEINSTANCE( UnoControlFixedHyperlinkModel )
-IMPL_CREATEINSTANCE( UnoControlFixedTextModel )
-IMPL_CREATEINSTANCE( UnoControlFormattedFieldModel )
-IMPL_CREATEINSTANCE( UnoControlGroupBoxModel )
-IMPL_CREATEINSTANCE( UnoControlImageControlModel )
-IMPL_CREATEINSTANCE( UnoControlListBoxModel )
-IMPL_CREATEINSTANCE( UnoControlNumericFieldModel )
-IMPL_CREATEINSTANCE( UnoControlPatternFieldModel )
-IMPL_CREATEINSTANCE( UnoControlRadioButtonModel )
-IMPL_CREATEINSTANCE( UnoControlTimeFieldModel )
-IMPL_CREATEINSTANCE( UnoControlProgressBarModel )
-IMPL_CREATEINSTANCE( UnoControlScrollBarModel )
-IMPL_CREATEINSTANCE( UnoSpinButtonModel )
-IMPL_CREATEINSTANCE( UnoControlFixedLineModel )
-IMPL_CREATEINSTANCE( UnoCurrencyFieldControl )
-IMPL_CREATEINSTANCE( UnoDateFieldControl )
-IMPL_CREATEINSTANCE( UnoDialogControl )
-IMPL_CREATEINSTANCE( UnoEditControl )
-IMPL_CREATEINSTANCE( UnoFileControl )
-IMPL_CREATEINSTANCE( UnoFixedHyperlinkControl )
-IMPL_CREATEINSTANCE( UnoFixedTextControl )
-IMPL_CREATEINSTANCE( UnoFormattedFieldControl )
-IMPL_CREATEINSTANCE( UnoGroupBoxControl )
-IMPL_CREATEINSTANCE( UnoImageControlControl )
-IMPL_CREATEINSTANCE( UnoListBoxControl )
-IMPL_CREATEINSTANCE( UnoNumericFieldControl )
-IMPL_CREATEINSTANCE( UnoPatternFieldControl )
-IMPL_CREATEINSTANCE( UnoRadioButtonControl )
-IMPL_CREATEINSTANCE( UnoTimeFieldControl )
-IMPL_CREATEINSTANCE( UnoProgressBarControl )
-IMPL_CREATEINSTANCE( UnoScrollBarControl )
-IMPL_CREATEINSTANCE( UnoSpinButtonControl )
-IMPL_CREATEINSTANCE( UnoFixedLineControl )
+IMPL_CREATEINSTANCE2( UnoButtonControl )
+IMPL_CREATEINSTANCE2( UnoCheckBoxControl )
+IMPL_CREATEINSTANCE2( UnoComboBoxControl )
+IMPL_CREATEINSTANCE2( UnoControlButtonModel )
+IMPL_CREATEINSTANCE2( UnoControlCheckBoxModel )
+IMPL_CREATEINSTANCE2( UnoControlComboBoxModel )
+IMPL_CREATEINSTANCE2( UnoControlContainer )
+IMPL_CREATEINSTANCE2( UnoControlContainerModel )
+IMPL_CREATEINSTANCE2( UnoControlCurrencyFieldModel )
+IMPL_CREATEINSTANCE2( UnoControlDateFieldModel )
+IMPL_CREATEINSTANCE2( UnoControlEditModel )
+IMPL_CREATEINSTANCE2( UnoControlFileControlModel )
+IMPL_CREATEINSTANCE2( UnoControlFixedHyperlinkModel )
+IMPL_CREATEINSTANCE2( UnoControlFixedTextModel )
+IMPL_CREATEINSTANCE2( UnoControlFormattedFieldModel )
+IMPL_CREATEINSTANCE2( UnoControlGroupBoxModel )
+IMPL_CREATEINSTANCE2( UnoControlImageControlModel )
+IMPL_CREATEINSTANCE2( UnoControlListBoxModel )
+IMPL_CREATEINSTANCE2( UnoControlNumericFieldModel )
+IMPL_CREATEINSTANCE2( UnoControlPatternFieldModel )
+IMPL_CREATEINSTANCE2( UnoControlRadioButtonModel )
+IMPL_CREATEINSTANCE2( UnoControlTimeFieldModel )
+IMPL_CREATEINSTANCE2( UnoControlProgressBarModel )
+IMPL_CREATEINSTANCE2( UnoControlScrollBarModel )
+IMPL_CREATEINSTANCE2( UnoSpinButtonModel )
+IMPL_CREATEINSTANCE2( UnoControlFixedLineModel )
+IMPL_CREATEINSTANCE2( UnoCurrencyFieldControl )
+IMPL_CREATEINSTANCE2( UnoDateFieldControl )
+IMPL_CREATEINSTANCE2( UnoDialogControl )
+IMPL_CREATEINSTANCE2( UnoEditControl )
+IMPL_CREATEINSTANCE2( UnoFileControl )
+IMPL_CREATEINSTANCE2( UnoFixedHyperlinkControl )
+IMPL_CREATEINSTANCE2( UnoFixedTextControl )
+IMPL_CREATEINSTANCE2( UnoFormattedFieldControl )
+IMPL_CREATEINSTANCE2( UnoGroupBoxControl )
+IMPL_CREATEINSTANCE2( UnoImageControlControl )
+IMPL_CREATEINSTANCE2( UnoListBoxControl )
+IMPL_CREATEINSTANCE2( UnoNumericFieldControl )
+IMPL_CREATEINSTANCE2( UnoPatternFieldControl )
+IMPL_CREATEINSTANCE2( UnoRadioButtonControl )
+IMPL_CREATEINSTANCE2( UnoTimeFieldControl )
+IMPL_CREATEINSTANCE2( UnoProgressBarControl )
+IMPL_CREATEINSTANCE2( UnoScrollBarControl )
+IMPL_CREATEINSTANCE2( UnoSpinButtonControl )
+IMPL_CREATEINSTANCE2( UnoFixedLineControl )
IMPL_CREATEINSTANCE( VCLXMenuBar )
IMPL_CREATEINSTANCE( VCLXPointer )
IMPL_CREATEINSTANCE( VCLXPopupMenu )
IMPL_CREATEINSTANCE( VCLXPrinterServer )
-IMPL_CREATEINSTANCE( UnoRoadmapControl )
-IMPL_CREATEINSTANCE( UnoControlRoadmapModel )
-IMPL_CREATEINSTANCE( UnoSimpleAnimationControl )
-IMPL_CREATEINSTANCE( UnoSimpleAnimationControlModel )
-IMPL_CREATEINSTANCE( UnoThrobberControl )
-IMPL_CREATEINSTANCE( UnoThrobberControlModel )
+IMPL_CREATEINSTANCE2( UnoRoadmapControl )
+IMPL_CREATEINSTANCE2( UnoControlRoadmapModel )
+IMPL_CREATEINSTANCE2( UnoSimpleAnimationControl )
+IMPL_CREATEINSTANCE2( UnoSimpleAnimationControlModel )
+IMPL_CREATEINSTANCE2( UnoThrobberControl )
+IMPL_CREATEINSTANCE2( UnoThrobberControlModel )
+IMPL_CREATEINSTANCE2( UnoControlTabPage )
+IMPL_CREATEINSTANCE2( UnoControlTabPageModel )
+IMPL_CREATEINSTANCE2( UnoControlTabPageContainer )
+IMPL_CREATEINSTANCE2( UnoControlTabPageContainerModel )
+IMPL_CREATEINSTANCE2( AnimatedImagesControl )
+IMPL_CREATEINSTANCE2( AnimatedImagesControlModel )
+IMPL_CREATEINSTANCE2( SpinningProgressControlModel )
extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL TreeControl_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL TreeControlModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
@@ -204,6 +220,7 @@ extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL
extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL DefaultGridDataModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL DefaultGridColumnModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL GridColumn_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
+extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SortableGridDataModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
extern void * SAL_CALL comp_AsyncCallback_component_getFactory( const char * implName, void * serviceManager, void * registryKey );
@@ -226,81 +243,86 @@ TOOLKIT_DLLPUBLIC void* SAL_CALL component_getFactory( const sal_Char* sImplemen
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory =
static_cast< ::com::sun::star::lang::XMultiServiceFactory* >( _pServiceManager );
- CHECKANDCREATEFACTORY( VCLXToolkit, szServiceName_Toolkit, szServiceName2_Toolkit )
- CHECKANDCREATEFACTORY( VCLXPopupMenu, szServiceName_PopupMenu, szServiceName2_PopupMenu )
- CHECKANDCREATEFACTORY( VCLXMenuBar, szServiceName_MenuBar, szServiceName2_MenuBar )
- CHECKANDCREATEFACTORY( VCLXPointer, szServiceName_Pointer, szServiceName2_Pointer )
- CHECKANDCREATEFACTORY( UnoControlContainer, szServiceName_UnoControlContainer, szServiceName2_UnoControlContainer )
- CHECKANDCREATEFACTORY( UnoControlContainerModel, szServiceName_UnoControlContainerModel, szServiceName2_UnoControlContainerModel )
- CHECKANDCREATEFACTORY( StdTabController, szServiceName_TabController, szServiceName2_TabController )
- CHECKANDCREATEFACTORY( StdTabControllerModel, szServiceName_TabControllerModel, szServiceName2_TabControllerModel )
- CHECKANDCREATEFACTORY( UnoDialogControl, szServiceName_UnoControlDialog, szServiceName2_UnoControlDialog )
- CHECKANDCREATEFACTORY( UnoControlDialogModel, szServiceName_UnoControlDialogModel, szServiceName2_UnoControlDialogModel )
- CHECKANDCREATEFACTORY( UnoEditControl, szServiceName_UnoControlEdit, szServiceName2_UnoControlEdit )
- CHECKANDCREATEFACTORY( UnoControlEditModel, szServiceName_UnoControlEditModel, szServiceName2_UnoControlEditModel )
- CHECKANDCREATEFACTORY( UnoDateFieldControl, szServiceName_UnoControlDateField, szServiceName2_UnoControlDateField )
- CHECKANDCREATEFACTORY( UnoControlDateFieldModel, szServiceName_UnoControlDateFieldModel, szServiceName2_UnoControlDateFieldModel )
- CHECKANDCREATEFACTORY( UnoTimeFieldControl, szServiceName_UnoControlTimeField, szServiceName2_UnoControlTimeField )
- CHECKANDCREATEFACTORY( UnoControlTimeFieldModel, szServiceName_UnoControlTimeFieldModel, szServiceName2_UnoControlTimeFieldModel )
- CHECKANDCREATEFACTORY( UnoNumericFieldControl, szServiceName_UnoControlNumericField, szServiceName2_UnoControlNumericField )
- CHECKANDCREATEFACTORY( UnoControlNumericFieldModel, szServiceName_UnoControlNumericFieldModel, szServiceName2_UnoControlNumericFieldModel )
- CHECKANDCREATEFACTORY( UnoCurrencyFieldControl, szServiceName_UnoControlCurrencyField, szServiceName2_UnoControlCurrencyField )
- CHECKANDCREATEFACTORY( UnoControlCurrencyFieldModel, szServiceName_UnoControlCurrencyFieldModel, szServiceName2_UnoControlCurrencyFieldModel )
- CHECKANDCREATEFACTORY( UnoPatternFieldControl, szServiceName_UnoControlPatternField, szServiceName2_UnoControlPatternField )
- CHECKANDCREATEFACTORY( UnoControlPatternFieldModel, szServiceName_UnoControlPatternFieldModel, szServiceName2_UnoControlPatternFieldModel )
- CHECKANDCREATEFACTORY( UnoFormattedFieldControl, szServiceName_UnoControlFormattedField, szServiceName2_UnoControlFormattedField )
- CHECKANDCREATEFACTORY( UnoControlFormattedFieldModel, szServiceName_UnoControlFormattedFieldModel, szServiceName2_UnoControlFormattedFieldModel )
- CHECKANDCREATEFACTORY( UnoFileControl, szServiceName_UnoControlFileControl, szServiceName2_UnoControlFileControl )
- CHECKANDCREATEFACTORY( UnoControlFileControlModel, szServiceName_UnoControlFileControlModel, szServiceName2_UnoControlFileControlModel )
- CHECKANDCREATEFACTORY( UnoButtonControl, szServiceName_UnoControlButton, szServiceName2_UnoControlButton )
- CHECKANDCREATEFACTORY( UnoControlButtonModel, szServiceName_UnoControlButtonModel, szServiceName2_UnoControlButtonModel )
- CHECKANDCREATEFACTORY( UnoImageControlControl, szServiceName_UnoControlImageButton, szServiceName2_UnoControlImageButton )
- CHECKANDCREATEFACTORY( UnoControlImageControlModel, szServiceName_UnoControlImageButtonModel, szServiceName2_UnoControlImageButtonModel )
- CHECKANDCREATEFACTORY( UnoImageControlControl, szServiceName_UnoControlImageControl, szServiceName2_UnoControlImageControl )
- CHECKANDCREATEFACTORY( UnoControlImageControlModel, szServiceName_UnoControlImageControlModel, szServiceName2_UnoControlImageControlModel )
- CHECKANDCREATEFACTORY( UnoRadioButtonControl, szServiceName_UnoControlRadioButton, szServiceName2_UnoControlRadioButton )
- CHECKANDCREATEFACTORY( UnoControlRadioButtonModel, szServiceName_UnoControlRadioButtonModel, szServiceName2_UnoControlRadioButtonModel )
- CHECKANDCREATEFACTORY( UnoCheckBoxControl, szServiceName_UnoControlCheckBox, szServiceName2_UnoControlCheckBox )
- CHECKANDCREATEFACTORY( UnoControlCheckBoxModel, szServiceName_UnoControlCheckBoxModel, szServiceName2_UnoControlCheckBoxModel )
- CHECKANDCREATEFACTORY( UnoListBoxControl, szServiceName_UnoControlListBox, szServiceName2_UnoControlListBox )
- CHECKANDCREATEFACTORY( UnoControlListBoxModel, szServiceName_UnoControlListBoxModel, szServiceName2_UnoControlListBoxModel )
- CHECKANDCREATEFACTORY( UnoComboBoxControl, szServiceName_UnoControlComboBox, szServiceName2_UnoControlComboBox )
- CHECKANDCREATEFACTORY( UnoControlComboBoxModel, szServiceName_UnoControlComboBoxModel, szServiceName2_UnoControlComboBoxModel )
- CHECKANDCREATEFACTORY( UnoFixedTextControl, szServiceName_UnoControlFixedText, szServiceName2_UnoControlFixedText )
- CHECKANDCREATEFACTORY( UnoControlFixedTextModel, szServiceName_UnoControlFixedTextModel, szServiceName2_UnoControlFixedTextModel )
- CHECKANDCREATEFACTORY( UnoGroupBoxControl, szServiceName_UnoControlGroupBox, szServiceName2_UnoControlGroupBox )
- CHECKANDCREATEFACTORY( UnoControlGroupBoxModel, szServiceName_UnoControlGroupBoxModel, szServiceName2_UnoControlGroupBoxModel )
- CHECKANDCREATEFACTORY( UnoProgressBarControl, szServiceName_UnoControlProgressBar, szServiceName2_UnoControlProgressBar )
- CHECKANDCREATEFACTORY( UnoControlProgressBarModel, szServiceName_UnoControlProgressBarModel, szServiceName2_UnoControlProgressBarModel )
- CHECKANDCREATEFACTORY( UnoScrollBarControl, szServiceName_UnoControlScrollBar, szServiceName2_UnoControlScrollBar )
- CHECKANDCREATEFACTORY( UnoControlScrollBarModel, szServiceName_UnoControlScrollBarModel, szServiceName2_UnoControlScrollBarModel )
- CHECKANDCREATEFACTORY( UnoFixedLineControl, szServiceName_UnoControlFixedLine, szServiceName2_UnoControlFixedLine )
- CHECKANDCREATEFACTORY( UnoControlFixedLineModel, szServiceName_UnoControlFixedLineModel, szServiceName2_UnoControlFixedLineModel )
- CHECKANDCREATEFACTORY( VCLXPrinterServer, szServiceName_PrinterServer, szServiceName2_PrinterServer )
- CHECKANDCREATEFACTORY( UnoRoadmapControl, szServiceName_UnoControlRoadmap, szServiceName2_UnoControlRoadmap )
- CHECKANDCREATEFACTORY( UnoControlRoadmapModel, szServiceName_UnoControlRoadmapModel, szServiceName2_UnoControlRoadmapModel )
- CHECKANDCREATEFACTORY( UnoSpinButtonModel, szServiceName_UnoSpinButtonModel, NULL )
- CHECKANDCREATEFACTORY( UnoSpinButtonControl, szServiceName_UnoSpinButtonControl, NULL )
- CHECKANDCREATEFACTORY( TreeControl, szServiceName_TreeControl, NULL )
- CHECKANDCREATEFACTORY( TreeControlModel, szServiceName_TreeControlModel, NULL )
- CHECKANDCREATEFACTORY( MutableTreeDataModel, szServiceName_MutableTreeDataModel, NULL )
- CHECKANDCREATEFACTORY( UnoSimpleAnimationControlModel, szServiceName_UnoSimpleAnimationControlModel, szServiceName2_UnoSimpleAnimationControlModel )
- CHECKANDCREATEFACTORY( UnoSimpleAnimationControl, szServiceName_UnoSimpleAnimationControl, szServiceName2_UnoSimpleAnimationControl )
- CHECKANDCREATEFACTORY( UnoThrobberControlModel, szServiceName_UnoThrobberControlModel, szServiceName2_UnoThrobberControlModel )
- CHECKANDCREATEFACTORY( UnoThrobberControl, szServiceName_UnoThrobberControl, szServiceName2_UnoThrobberControl )
- CHECKANDCREATEFACTORY( UnoFixedHyperlinkControl, szServiceName_UnoControlFixedHyperlink, NULL )
- CHECKANDCREATEFACTORY( UnoControlFixedHyperlinkModel, szServiceName_UnoControlFixedHyperlinkModel, NULL )
- CHECKANDCREATEFACTORY( GridControl, szServiceName_GridControl, NULL );
- CHECKANDCREATEFACTORY( GridControlModel, szServiceName_GridControlModel, NULL );
- CHECKANDCREATEFACTORY( DefaultGridDataModel, szServiceName_DefaultGridDataModel, NULL );
- CHECKANDCREATEFACTORY( DefaultGridColumnModel, szServiceName_DefaultGridColumnModel, NULL );
- CHECKANDCREATEFACTORY( GridColumn, szServiceName_GridColumn, NULL );
-
+ GET_FACTORY( VCLXToolkit, szServiceName_Toolkit, szServiceName2_Toolkit )
+ GET_FACTORY( VCLXPopupMenu, szServiceName_PopupMenu, szServiceName2_PopupMenu )
+ GET_FACTORY( VCLXMenuBar, szServiceName_MenuBar, szServiceName2_MenuBar )
+ GET_FACTORY( VCLXPointer, szServiceName_Pointer, szServiceName2_Pointer )
+ GET_FACTORY( UnoControlContainer, szServiceName_UnoControlContainer, szServiceName2_UnoControlContainer )
+ GET_FACTORY( UnoControlContainerModel, szServiceName_UnoControlContainerModel, szServiceName2_UnoControlContainerModel )
+ GET_FACTORY( StdTabController, szServiceName_TabController, szServiceName2_TabController )
+ GET_FACTORY( StdTabControllerModel, szServiceName_TabControllerModel, szServiceName2_TabControllerModel )
+ GET_FACTORY( UnoDialogControl, szServiceName_UnoControlDialog, szServiceName2_UnoControlDialog )
+ GET_FACTORY( UnoControlDialogModel, szServiceName_UnoControlDialogModel, szServiceName2_UnoControlDialogModel )
+ GET_FACTORY( UnoEditControl, szServiceName_UnoControlEdit, szServiceName2_UnoControlEdit )
+ GET_FACTORY( UnoControlEditModel, szServiceName_UnoControlEditModel, szServiceName2_UnoControlEditModel )
+ GET_FACTORY( UnoDateFieldControl, szServiceName_UnoControlDateField, szServiceName2_UnoControlDateField )
+ GET_FACTORY( UnoControlDateFieldModel, szServiceName_UnoControlDateFieldModel, szServiceName2_UnoControlDateFieldModel )
+ GET_FACTORY( UnoTimeFieldControl, szServiceName_UnoControlTimeField, szServiceName2_UnoControlTimeField )
+ GET_FACTORY( UnoControlTimeFieldModel, szServiceName_UnoControlTimeFieldModel, szServiceName2_UnoControlTimeFieldModel )
+ GET_FACTORY( UnoNumericFieldControl, szServiceName_UnoControlNumericField, szServiceName2_UnoControlNumericField )
+ GET_FACTORY( UnoControlNumericFieldModel, szServiceName_UnoControlNumericFieldModel, szServiceName2_UnoControlNumericFieldModel )
+ GET_FACTORY( UnoCurrencyFieldControl, szServiceName_UnoControlCurrencyField, szServiceName2_UnoControlCurrencyField )
+ GET_FACTORY( UnoControlCurrencyFieldModel, szServiceName_UnoControlCurrencyFieldModel, szServiceName2_UnoControlCurrencyFieldModel )
+ GET_FACTORY( UnoPatternFieldControl, szServiceName_UnoControlPatternField, szServiceName2_UnoControlPatternField )
+ GET_FACTORY( UnoControlPatternFieldModel, szServiceName_UnoControlPatternFieldModel, szServiceName2_UnoControlPatternFieldModel )
+ GET_FACTORY( UnoFormattedFieldControl, szServiceName_UnoControlFormattedField, szServiceName2_UnoControlFormattedField )
+ GET_FACTORY( UnoControlFormattedFieldModel, szServiceName_UnoControlFormattedFieldModel, szServiceName2_UnoControlFormattedFieldModel )
+ GET_FACTORY( UnoFileControl, szServiceName_UnoControlFileControl, szServiceName2_UnoControlFileControl )
+ GET_FACTORY( UnoControlFileControlModel, szServiceName_UnoControlFileControlModel, szServiceName2_UnoControlFileControlModel )
+ GET_FACTORY( UnoButtonControl, szServiceName_UnoControlButton, szServiceName2_UnoControlButton )
+ GET_FACTORY( UnoControlButtonModel, szServiceName_UnoControlButtonModel, szServiceName2_UnoControlButtonModel )
+ GET_FACTORY( UnoImageControlControl, szServiceName_UnoControlImageButton, szServiceName2_UnoControlImageButton )
+ GET_FACTORY( UnoControlImageControlModel, szServiceName_UnoControlImageButtonModel, szServiceName2_UnoControlImageButtonModel )
+ GET_FACTORY( UnoImageControlControl, szServiceName_UnoControlImageControl, szServiceName2_UnoControlImageControl )
+ GET_FACTORY( UnoControlImageControlModel, szServiceName_UnoControlImageControlModel, szServiceName2_UnoControlImageControlModel )
+ GET_FACTORY( UnoRadioButtonControl, szServiceName_UnoControlRadioButton, szServiceName2_UnoControlRadioButton )
+ GET_FACTORY( UnoControlRadioButtonModel, szServiceName_UnoControlRadioButtonModel, szServiceName2_UnoControlRadioButtonModel )
+ GET_FACTORY( UnoCheckBoxControl, szServiceName_UnoControlCheckBox, szServiceName2_UnoControlCheckBox )
+ GET_FACTORY( UnoControlCheckBoxModel, szServiceName_UnoControlCheckBoxModel, szServiceName2_UnoControlCheckBoxModel )
+ GET_FACTORY( UnoListBoxControl, szServiceName_UnoControlListBox, szServiceName2_UnoControlListBox )
+ GET_FACTORY( UnoControlListBoxModel, szServiceName_UnoControlListBoxModel, szServiceName2_UnoControlListBoxModel )
+ GET_FACTORY( UnoComboBoxControl, szServiceName_UnoControlComboBox, szServiceName2_UnoControlComboBox )
+ GET_FACTORY( UnoControlComboBoxModel, szServiceName_UnoControlComboBoxModel, szServiceName2_UnoControlComboBoxModel )
+ GET_FACTORY( UnoFixedTextControl, szServiceName_UnoControlFixedText, szServiceName2_UnoControlFixedText )
+ GET_FACTORY( UnoControlFixedTextModel, szServiceName_UnoControlFixedTextModel, szServiceName2_UnoControlFixedTextModel )
+ GET_FACTORY( UnoGroupBoxControl, szServiceName_UnoControlGroupBox, szServiceName2_UnoControlGroupBox )
+ GET_FACTORY( UnoControlGroupBoxModel, szServiceName_UnoControlGroupBoxModel, szServiceName2_UnoControlGroupBoxModel )
+ GET_FACTORY( UnoProgressBarControl, szServiceName_UnoControlProgressBar, szServiceName2_UnoControlProgressBar )
+ GET_FACTORY( UnoControlProgressBarModel, szServiceName_UnoControlProgressBarModel, szServiceName2_UnoControlProgressBarModel )
+ GET_FACTORY( UnoScrollBarControl, szServiceName_UnoControlScrollBar, szServiceName2_UnoControlScrollBar )
+ GET_FACTORY( UnoControlScrollBarModel, szServiceName_UnoControlScrollBarModel, szServiceName2_UnoControlScrollBarModel )
+ GET_FACTORY( UnoFixedLineControl, szServiceName_UnoControlFixedLine, szServiceName2_UnoControlFixedLine )
+ GET_FACTORY( UnoControlFixedLineModel, szServiceName_UnoControlFixedLineModel, szServiceName2_UnoControlFixedLineModel )
+ GET_FACTORY( VCLXPrinterServer, szServiceName_PrinterServer, szServiceName2_PrinterServer )
+ GET_FACTORY( UnoRoadmapControl, szServiceName_UnoControlRoadmap, szServiceName2_UnoControlRoadmap )
+ GET_FACTORY( UnoControlRoadmapModel, szServiceName_UnoControlRoadmapModel, szServiceName2_UnoControlRoadmapModel )
+ GET_FACTORY( UnoSpinButtonModel, szServiceName_UnoSpinButtonModel, NULL )
+ GET_FACTORY( UnoSpinButtonControl, szServiceName_UnoSpinButtonControl, NULL )
+ GET_FACTORY( TreeControl, szServiceName_TreeControl, NULL )
+ GET_FACTORY( TreeControlModel, szServiceName_TreeControlModel, NULL )
+ GET_FACTORY( MutableTreeDataModel, szServiceName_MutableTreeDataModel, NULL )
+ GET_FACTORY( UnoSimpleAnimationControlModel, szServiceName_UnoSimpleAnimationControlModel, szServiceName2_UnoSimpleAnimationControlModel )
+ GET_FACTORY( UnoSimpleAnimationControl, szServiceName_UnoSimpleAnimationControl, szServiceName2_UnoSimpleAnimationControl )
+ GET_FACTORY( UnoThrobberControlModel, szServiceName_UnoThrobberControlModel, szServiceName2_UnoThrobberControlModel )
+ GET_FACTORY( UnoThrobberControl, szServiceName_UnoThrobberControl, szServiceName2_UnoThrobberControl )
+ GET_FACTORY( UnoFixedHyperlinkControl, szServiceName_UnoControlFixedHyperlink, NULL )
+ GET_FACTORY( UnoControlFixedHyperlinkModel, szServiceName_UnoControlFixedHyperlinkModel, NULL )
+ GET_FACTORY( GridControl, szServiceName_GridControl, NULL );
+ GET_FACTORY( GridControlModel, szServiceName_GridControlModel, NULL );
+ GET_FACTORY( DefaultGridDataModel, szServiceName_DefaultGridDataModel, NULL );
+ GET_FACTORY( DefaultGridColumnModel, szServiceName_DefaultGridColumnModel, NULL );
+ GET_FACTORY_WITH_IMPL_PREFIX( GridColumn, "org.openoffice.comp.toolkit", szServiceName_GridColumn, NULL );
+ GET_FACTORY_WITH_IMPL_PREFIX( SortableGridDataModel, "org.openoffice.comp.toolkit", szServiceName_SortableGridDataModel, NULL );
+ GET_FACTORY_WITH_IMPL_PREFIX( AnimatedImagesControl, "org.openoffice.comp.toolkit", szServiceName_AnimatedImagesControl, NULL )
+ GET_FACTORY_WITH_IMPL_PREFIX( AnimatedImagesControlModel, "org.openoffice.comp.toolkit", szServiceName_AnimatedImagesControlModel, NULL )
+ GET_FACTORY_WITH_IMPL_PREFIX( SpinningProgressControlModel, "org.openoffice.comp.toolkit", szServiceName_SpinningProgressControlModel, NULL )
+ GET_FACTORY( UnoControlTabPageModel, szServiceName_UnoControlTabPageModel, NULL )
+ GET_FACTORY( UnoControlTabPage, szServiceName_UnoControlTabPage, NULL )
+ GET_FACTORY( UnoControlTabPageContainerModel, szServiceName_UnoControlTabPageContainerModel, NULL )
+ GET_FACTORY( UnoControlTabPageContainer, szServiceName_UnoControlTabPageContainer, NULL )
if ( rtl_str_compare( sImplementationName, "com.sun.star.awt.comp.AsyncCallback" ) == 0 )
return comp_AsyncCallback_component_getFactory( sImplementationName, _pServiceManager, _pRegistryKey );
-
-
if( pRet == 0 )
pRet = comp_Layout_component_getFactory( sImplementationName, _pServiceManager, _pRegistryKey );
}
diff --git a/toolkit/source/helper/servicenames.cxx b/toolkit/source/helper/servicenames.cxx
index f57f52f13e57..293d257da832 100644
--- a/toolkit/source/helper/servicenames.cxx
+++ b/toolkit/source/helper/servicenames.cxx
@@ -92,6 +92,9 @@ const sal_Char __FAR_DATA szServiceName_TreeControl[] = "com.sun.star.awt.tree.T
const sal_Char __FAR_DATA szServiceName_TreeControlModel[] = "com.sun.star.awt.tree.TreeControlModel";
const sal_Char __FAR_DATA szServiceName_MutableTreeDataModel[] = "com.sun.star.awt.tree.MutableTreeDataModel";
const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControlModel[] = "com.sun.star.awt.UnoSimpleAnimationControlModel", szServiceName2_UnoSimpleAnimationControlModel[] = "com.sun.star.awt.UnoControlSimpleAnimationModel";
+const sal_Char __FAR_DATA szServiceName_AnimatedImagesControl[] = "com.sun.star.awt.AnimatedImagesControl";
+const sal_Char __FAR_DATA szServiceName_AnimatedImagesControlModel[] = "com.sun.star.awt.AnimatedImagesControlModel";
+const sal_Char __FAR_DATA szServiceName_SpinningProgressControlModel[] = "com.sun.star.awt.SpinningProgressControlModel";
const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControl[] = "com.sun.star.awt.UnoSimpleAnimationControl", szServiceName2_UnoSimpleAnimationControl[] = "com.sun.star.awt.UnoControlSimpleAnimation";
const sal_Char __FAR_DATA szServiceName_UnoThrobberControlModel[] = "com.sun.star.awt.UnoThrobberControlModel", szServiceName2_UnoThrobberControlModel[] = "com.sun.star.awt.UnoControlThrobberModel";
const sal_Char __FAR_DATA szServiceName_UnoThrobberControl[] = "com.sun.star.awt.UnoThrobberControl", szServiceName2_UnoThrobberControl[] = "com.sun.star.awt.UnoControlThrobber";
@@ -102,3 +105,9 @@ const sal_Char __FAR_DATA szServiceName_GridControlModel[] = "com.sun.star.awt.g
const sal_Char __FAR_DATA szServiceName_DefaultGridDataModel[] = "com.sun.star.awt.grid.DefaultGridDataModel";
const sal_Char __FAR_DATA szServiceName_DefaultGridColumnModel[] = "com.sun.star.awt.grid.DefaultGridColumnModel";
const sal_Char __FAR_DATA szServiceName_GridColumn[] = "com.sun.star.awt.grid.GridColumn";
+const sal_Char __FAR_DATA szServiceName_UnoControlTabPage[] = "com.sun.star.awt.tab.UnoControlTabPage";
+const sal_Char __FAR_DATA szServiceName_UnoControlTabPageModel[] = "com.sun.star.awt.tab.UnoControlTabPageModel";
+const sal_Char __FAR_DATA szServiceName_UnoControlTabPageContainerModel[] = "com.sun.star.awt.tab.UnoControlTabPageContainerModel";
+const sal_Char __FAR_DATA szServiceName_UnoControlTabPageContainer[] = "com.sun.star.awt.tab.UnoControlTabPageContainer";
+const sal_Char __FAR_DATA szServiceName_SortableGridDataModel[] = "com.sun.star.awt.grid.SortableGridDataModel";
+
diff --git a/toolkit/source/helper/throbberimpl.cxx b/toolkit/source/helper/throbberimpl.cxx
deleted file mode 100644
index 7a8e260ab4b8..000000000000
--- a/toolkit/source/helper/throbberimpl.cxx
+++ /dev/null
@@ -1,138 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#include "precompiled_toolkit.hxx"
-#include <toolkit/helper/throbberimpl.hxx>
-
-#include <vcl/svapp.hxx>
-#include <vcl/fixed.hxx>
-
-//........................................................................
-namespace toolkit
-//........................................................................
-{
- using namespace ::com::sun::star;
-
- //--------------------------------------------------------------------
- Throbber_Impl::Throbber_Impl( uno::Reference< VCLXWindow > xParent,
- sal_Int32 nStepTime,
- sal_Bool bRepeat )
- :mrMutex( Application::GetSolarMutex() )
- {
- mxParent = xParent;
- mbRepeat = bRepeat;
- mnStepTime = nStepTime;
- maWaitTimer.SetTimeout( mnStepTime );
- maWaitTimer.SetTimeoutHdl( LINK( this, Throbber_Impl, TimeOutHdl ) );
- }
-
- //--------------------------------------------------------------------
- Throbber_Impl::~Throbber_Impl()
- {
- maWaitTimer.Stop();
- mxParent = NULL;
- }
-
- //--------------------------------------------------------------------
- void Throbber_Impl::start() throw ( uno::RuntimeException )
- {
- ::vos::OGuard aGuard( GetMutex() );
-
- mnCurStep = 0;
- maWaitTimer.Start();
- }
-
- //--------------------------------------------------------------------
- void Throbber_Impl::stop() throw ( uno::RuntimeException )
- {
- ::vos::OGuard aGuard( GetMutex() );
-
- maWaitTimer.Stop();
- }
-
- //--------------------------------------------------------------------
- void Throbber_Impl::setImageList( const uno::Sequence< uno::Reference< graphic::XGraphic > >& rImageList )
- throw ( uno::RuntimeException )
- {
- ::vos::OGuard aGuard( GetMutex() );
-
- maImageList = rImageList;
-
- mnStepCount = maImageList.getLength();
- FixedImage* pImage = static_cast< FixedImage* >( mxParent->GetWindow() );
- if ( pImage )
- {
- if ( mnStepCount )
- pImage->SetImage( maImageList[ 0 ] );
- else
- pImage->SetImage( Image() );
- }
- }
-
- //--------------------------------------------------------------------
- void Throbber_Impl::initImage()
- throw ( uno::RuntimeException )
- {
- FixedImage* pImage = static_cast< FixedImage* >( mxParent->GetWindow() );
- if ( pImage && maImageList.getLength() )
- pImage->SetImage( maImageList[ 0 ] );
- }
-
- //--------------------------------------------------------------------
- sal_Bool Throbber_Impl::isHCMode()
- throw ( uno::RuntimeException )
- {
- FixedImage* pImage = static_cast< FixedImage* >( mxParent->GetWindow() );
- if ( pImage )
- return pImage->GetSettings().GetStyleSettings().GetHighContrastMode();
- else
- return Application::GetSettings().GetStyleSettings().GetHighContrastMode();
- }
-
- // -----------------------------------------------------------------------
- IMPL_LINK( Throbber_Impl, TimeOutHdl, Throbber_Impl*, EMPTYARG )
- {
- ::vos::OGuard aGuard( GetMutex() );
-
- FixedImage* pImage = static_cast< FixedImage* >( mxParent->GetWindow() );
-
- if ( !pImage || !maImageList.getLength() )
- return 0;
-
- if ( mnCurStep < mnStepCount - 1 )
- mnCurStep += 1;
- else
- mnCurStep = 0;
-
- pImage->SetImage( maImageList[ mnCurStep ] );
-
- return 0;
- }
-
-//........................................................................
-} // namespacetoolkit
-//........................................................................
-
diff --git a/toolkit/source/helper/tkresmgr.cxx b/toolkit/source/helper/tkresmgr.cxx
index 4e1e4153daf1..d0336c27bdf5 100644
--- a/toolkit/source/helper/tkresmgr.cxx
+++ b/toolkit/source/helper/tkresmgr.cxx
@@ -29,14 +29,21 @@
#include "precompiled_toolkit.hxx"
#include <toolkit/helper/tkresmgr.hxx>
#include <tools/simplerm.hxx>
+#include <comphelper/processfactory.hxx>
+#include <comphelper/componentcontext.hxx>
+#include <comphelper/namedvaluecollection.hxx>
+#include <com/sun/star/graphic/XGraphicProvider.hpp>
#ifndef _TOOLS_RESMGR_HXX_
#include <tools/resmgr.hxx>
#endif
-
+#include <tools/diagnose_ex.h>
#include <vcl/svapp.hxx>
-
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::graphic::XGraphic;
+using ::com::sun::star::graphic::XGraphicProvider;
+using namespace ::com::sun::star;
// -----------------------------------------------------------------------------
// TkResMgr
// -----------------------------------------------------------------------------
@@ -98,3 +105,27 @@ Image TkResMgr::loadImage( sal_uInt16 nResId )
}
// -----------------------------------------------------------------------------
+Image TkResMgr::getImageFromURL( const ::rtl::OUString& i_rImageURL )
+{
+ if ( !i_rImageURL.getLength() )
+ return Image();
+
+ try
+ {
+ ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
+ Reference< XGraphicProvider > xProvider;
+ if ( aContext.createComponent( "com.sun.star.graphic.GraphicProvider", xProvider ) )
+ {
+ ::comphelper::NamedValueCollection aMediaProperties;
+ aMediaProperties.put( "URL", i_rImageURL );
+ Reference< XGraphic > xGraphic = xProvider->queryGraphic( aMediaProperties.getPropertyValues() );
+ return Image( xGraphic );
+ }
+ }
+ catch( const uno::Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return Image();
+}
+
diff --git a/toolkit/source/helper/unopropertyarrayhelper.cxx b/toolkit/source/helper/unopropertyarrayhelper.cxx
index da946ffdc08a..8e2141033aab 100644
--- a/toolkit/source/helper/unopropertyarrayhelper.cxx
+++ b/toolkit/source/helper/unopropertyarrayhelper.cxx
@@ -99,7 +99,7 @@ sal_Bool UnoPropertyArrayHelper::fillPropertyMembersByHandle( ::rtl::OUString *
for ( sal_uInt32 n = 0; n < nProps; n++ )
{
- sal_uInt16 nId = (sal_uInt16)(sal_uIntPtr)aSortedPropsIds.GetObject( n );
+ sal_uInt16 nId = (sal_uInt16)(sal_uLong)aSortedPropsIds.GetObject( n );
pProps[n].Name = GetPropertyName( nId );
pProps[n].Handle = nId;
pProps[n].Type = *GetPropertyType( nId );
diff --git a/toolkit/source/helper/unowrapper.cxx b/toolkit/source/helper/unowrapper.cxx
index c36ae29d4531..943723ea5910 100644
--- a/toolkit/source/helper/unowrapper.cxx
+++ b/toolkit/source/helper/unowrapper.cxx
@@ -68,7 +68,6 @@ using namespace ::com::sun::star;
// instead of only a <VCLXWindow> instance, especially regarding its
// corresponding accessibility API.
case WINDOW_METRICBOX:
- // <--
case WINDOW_COMBOBOX: return new VCLXComboBox;
case WINDOW_SPINFIELD:
case WINDOW_NUMERICFIELD:
@@ -162,7 +161,7 @@ UnoWrapper::~UnoWrapper()
return mxToolkit.get();
}
-::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer> UnoWrapper::GetWindowInterface( Window* pWindow, BOOL bCreate )
+::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer> UnoWrapper::GetWindowInterface( Window* pWindow, sal_Bool bCreate )
{
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer> xPeer = pWindow->GetWindowPeer();
if ( !xPeer.is() && bCreate )
@@ -267,7 +266,7 @@ void UnoWrapper::WindowDestroyed( Window* pWindow )
Window* pClient = pChild->GetWindow( WINDOW_CLIENT );
if ( pClient->GetWindowPeer() )
{
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > xComp( pClient->GetComponentInterface( FALSE ), ::com::sun::star::uno::UNO_QUERY );
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > xComp( pClient->GetComponentInterface( sal_False ), ::com::sun::star::uno::UNO_QUERY );
xComp->dispose();
}
@@ -284,7 +283,7 @@ void UnoWrapper::WindowDestroyed( Window* pWindow )
if ( pClient->GetWindowPeer() && lcl_ImplIsParent( pWindow, pClient ) )
{
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > xComp( pClient->GetComponentInterface( FALSE ), ::com::sun::star::uno::UNO_QUERY );
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > xComp( pClient->GetComponentInterface( sal_False ), ::com::sun::star::uno::UNO_QUERY );
xComp->dispose();
}
@@ -296,7 +295,7 @@ void UnoWrapper::WindowDestroyed( Window* pWindow )
pParent->GetWindowPeer()->notifyWindowRemoved( *pWindow );
VCLXWindow* pWindowPeer = pWindow->GetWindowPeer();
- uno::Reference< lang::XComponent > xWindowPeerComp( pWindow->GetComponentInterface( FALSE ), uno::UNO_QUERY );
+ uno::Reference< lang::XComponent > xWindowPeerComp( pWindow->GetComponentInterface( sal_False ), uno::UNO_QUERY );
OSL_ENSURE( ( pWindowPeer != NULL ) == ( xWindowPeerComp.is() == sal_True ),
"UnoWrapper::WindowDestroyed: inconsistency in the window's peers!" );
if ( pWindowPeer )
diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx
index da91945c0b0e..600687a3633b 100644
--- a/toolkit/source/helper/vclunohelper.cxx
+++ b/toolkit/source/helper/vclunohelper.cxx
@@ -212,10 +212,11 @@ Polygon VCLUnoHelper::CreatePolygon( const ::com::sun::star::uno::Sequence< sal_
::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer> VCLUnoHelper::CreateControlContainer( Window* pWindow )
{
- UnoControlContainer* pContainer = new UnoControlContainer( pWindow->GetComponentInterface( sal_True ) );
+ const uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
+ UnoControlContainer* pContainer = new UnoControlContainer( xFactory, pWindow->GetComponentInterface( sal_True ) );
::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > x = pContainer;
- UnoControlModel* pContainerModel = new UnoControlContainerModel;
+ UnoControlModel* pContainerModel = new UnoControlContainerModel( xFactory );
pContainer->setModel( (::com::sun::star::awt::XControlModel*)pContainerModel );
return x;
diff --git a/toolkit/source/layout/core/helper.cxx b/toolkit/source/layout/core/helper.cxx
index d18a4f615d04..c3a9bd8b122f 100644
--- a/toolkit/source/layout/core/helper.cxx
+++ b/toolkit/source/layout/core/helper.cxx
@@ -421,7 +421,7 @@ Window* WidgetFactory::sfx2CreateWindow (VCLXWindow** component, Window* parent,
if (!mSfx2Library)
{
- OUString libraryName = ::vcl::unohelper::CreateLibraryName ("sfx", TRUE);
+ OUString libraryName = ::vcl::unohelper::CreateLibraryName ("sfx", sal_True);
mSfx2Library = osl_loadModuleRelative (&thisModule, libraryName.pData, SAL_LOADMODULE_DEFAULT);
if (mSfx2Library)
{
diff --git a/toolkit/source/layout/core/vcl.cxx b/toolkit/source/layout/core/vcl.cxx
index 2b8d910584e9..4e65bf7e0114 100644
--- a/toolkit/source/layout/core/vcl.cxx
+++ b/toolkit/source/layout/core/vcl.cxx
@@ -49,7 +49,7 @@ static PushButton* get_button (Dialog const* dialog, sal_uInt32 type)
, mClosing (false)\
{\
}\
- BOOL Closing##cls::Close ()\
+ sal_Bool Closing##cls::Close ()\
{\
if (mClosing)\
EndDialog (false);\
diff --git a/toolkit/source/layout/core/vcl.hxx b/toolkit/source/layout/core/vcl.hxx
index 20cc77dc7f82..a8f6d4755a23 100644
--- a/toolkit/source/layout/core/vcl.hxx
+++ b/toolkit/source/layout/core/vcl.hxx
@@ -36,7 +36,7 @@
public:\
bool mClosing;\
Closing##cls (Window* parent, WinBits bits);\
- virtual BOOL Close ();\
+ virtual sal_Bool Close ();\
}
DECLARE_CLOSING_DIALOG (Dialog);
diff --git a/toolkit/source/layout/vcl/wrapper.cxx b/toolkit/source/layout/vcl/wrapper.cxx
index 3b23ee92636b..06423af6900c 100644
--- a/toolkit/source/layout/vcl/wrapper.cxx
+++ b/toolkit/source/layout/vcl/wrapper.cxx
@@ -1545,7 +1545,7 @@ LocalizedString::operator String()
return getImpl ().maString;
}
-String LocalizedString::GetToken (USHORT i, sal_Char c)
+String LocalizedString::GetToken (sal_uInt16 i, sal_Char c)
{
return getString ().GetToken (i, c);
}
diff --git a/toolkit/util/tk.component b/toolkit/util/tk.component
index e782283c39eb..690b3f324498 100644
--- a/toolkit/util/tk.component
+++ b/toolkit/util/tk.component
@@ -35,15 +35,30 @@
<service name="com.sun.star.awt.Layout"/>
<service name="com.sun.star.comp.awt.Layout"/>
</implementation>
+ <implementation name="stardiv.Toolkit.UnoControlTabPage">
+ <service name="com.sun.star.awt.tab.UnoControlTabPage"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoControlTabPageModel">
+ <service name="com.sun.star.awt.tab.UnoControlTabPageModel"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoControlTabPageContainerModel">
+ <service name="com.sun.star.awt.tab.UnoControlTabPageContainerModel"/>
+ </implementation>
+ <implementation name="stardiv.Toolkit.UnoControlTabPageContainer">
+ <service name="com.sun.star.awt.tab.UnoControlTabPageContainer"/>
+ </implementation>
<implementation name="stardiv.Toolkit.DefaultGridColumnModel">
<service name="com.sun.star.awt.grid.DefaultGridColumnModel"/>
</implementation>
<implementation name="stardiv.Toolkit.DefaultGridDataModel">
<service name="com.sun.star.awt.grid.DefaultGridDataModel"/>
</implementation>
- <implementation name="stardiv.Toolkit.GridColumn">
+ <implementation name="org.openoffice.comp.toolkit.GridColumn">
<service name="com.sun.star.awt.grid.GridColumn"/>
</implementation>
+ <implementation name="org.openoffice.comp.toolkit.SortableGridDataModel">
+ <service name="com.sun.star.awt.grid.SortableGridDataModel"/>
+ </implementation>
<implementation name="stardiv.Toolkit.GridControl">
<service name="com.sun.star.awt.grid.UnoControlGrid"/>
</implementation>
@@ -257,6 +272,15 @@
<service name="com.sun.star.awt.UnoControlSimpleAnimationModel"/>
<service name="com.sun.star.awt.UnoSimpleAnimationControlModel"/>
</implementation>
+ <implementation name="org.openoffice.comp.toolkit.SpinningProgressControlModel">
+ <service name="com.sun.star.awt.SpinningProgressControlModel"/>
+ </implementation>
+ <implementation name="org.openoffice.comp.toolkit.AnimatedImagesControlModel">
+ <service name="com.sun.star.awt.AnimatedImagesControlModel"/>
+ </implementation>
+ <implementation name="org.openoffice.comp.toolkit.AnimatedImagesControl">
+ <service name="com.sun.star.awt.AnimatedImagesControl"/>
+ </implementation>
<implementation name="stardiv.Toolkit.UnoSpinButtonControl">
<service name="com.sun.star.awt.UnoControlSpinButton"/>
</implementation>
diff --git a/tools/Executable_mkunroll.mk b/tools/Executable_mkunroll.mk
index 5f9753a2a88f..60c6e676057e 100644
--- a/tools/Executable_mkunroll.mk
+++ b/tools/Executable_mkunroll.mk
@@ -45,6 +45,7 @@ $(eval $(call gb_Executable_add_linked_libs,mkunroll,\
stl \
tl \
vos3 \
+ $(gb_STDLIBS) \
))
# used to link against basegfxlx comphelp4gcc3 i18nisolang1gcc3 ucbhelper4gcc3 uno_cppu uno_cppuhelpergcc3 uno_salhelpergcc3 - seems to be superficial
@@ -57,36 +58,4 @@ $(eval $(call gb_Executable_add_exception_objects,mkunroll,\
tools/bootstrp/prj \
))
-ifeq ($(OS),WNT)
-ifneq ($(USE_MINGW),)
-$(eval $(call gb_Executable_add_linked_libs,mkunroll,\
- mingwthrd \
- $(gb_MINGW_LIBSTDCPP) \
- mingw32 \
- $(gb_MINGW_LIBGCC) \
- uwinapi \
- moldname \
- mingwex \
- kernel32 \
- msvcrt \
- user32 \
-))
-else
-$(eval $(call gb_Executable_add_linked_libs,mkunroll,\
- kernel32 \
- msvcrt \
- oldnames \
- user32 \
- uwinapi \
-))
-endif
-endif
-
-ifeq ($(OS),LINUX)
-$(eval $(call gb_Executable_add_linked_libs,mkunroll,\
- dl \
- pthread \
-))
-endif
-
# vim: set noet sw=4 ts=4:
diff --git a/tools/Executable_rscdep.mk b/tools/Executable_rscdep.mk
index 85551407d335..8d8c55fa585d 100644
--- a/tools/Executable_rscdep.mk
+++ b/tools/Executable_rscdep.mk
@@ -44,6 +44,7 @@ $(eval $(call gb_Executable_add_linked_libs,rscdep,\
stl \
tl \
vos3 \
+ $(gb_STDLIBS) \
))
$(eval $(call gb_Executable_add_exception_objects,rscdep,\
@@ -55,43 +56,16 @@ $(eval $(call gb_Executable_add_exception_objects,rscdep,\
))
ifeq ($(OS),WNT)
-ifneq ($(USE_MINGW),)
ifeq ($(HAVE_GETOPT),YES)
$(eval $(call gb_Executable_set_cxxflags,rscdep,\
$$(CXXFLAGS) \
-DHAVE_GETOPT \
))
-endif
-$(eval $(call gb_Executable_add_linked_libs,rscdep,\
- mingwthrd \
- $(gb_MINGW_LIBSTDCPP) \
- mingw32 \
- $(gb_MINGW_LIBGCC) \
- uwinapi \
- moldname \
- mingwex \
- kernel32 \
- msvcrt \
- user32 \
-))
else
$(eval $(call gb_Executable_add_linked_libs,rscdep,\
gnu_getopt \
))
-$(eval $(call gb_Executable_add_linked_libs,rscdep,\
- kernel32 \
- msvcrt \
- oldnames \
- user32 \
- uwinapi \
-))
endif
endif
-ifeq ($(OS),LINUX)
-$(eval $(call gb_Executable_add_linked_libs,rscdep,\
- dl \
- pthread \
-))
-endif
# vim: set noet sw=4 ts=4:
diff --git a/tools/Executable_so_checksum.mk b/tools/Executable_so_checksum.mk
index 1c0faf30b015..32b95bedd6da 100644
--- a/tools/Executable_so_checksum.mk
+++ b/tools/Executable_so_checksum.mk
@@ -42,6 +42,7 @@ $(eval $(call gb_Executable_set_cxxflags,so_checksum,\
$(eval $(call gb_Executable_add_linked_libs,so_checksum,\
sal \
tl \
+ $(gb_STDLIBS) \
))
# used to link against basegfxlx comphelp4gcc3 i18nisolang1gcc3 ucbhelper4gcc3 uno_cppu uno_cppuhelpergcc3 uno_salhelpergcc3 vos3gcc3 - seems to be superficial
@@ -50,35 +51,4 @@ $(eval $(call gb_Executable_add_exception_objects,so_checksum,\
tools/bootstrp/so_checksum \
))
-ifeq ($(OS),WNT)
-ifneq ($(USE_MINGW),)
-$(eval $(call gb_Executable_add_linked_libs,so_checksum,\
- mingwthrd \
- $(gb_MINGW_LIBSTDCPP) \
- mingw32 \
- $(gb_MINGW_LIBGCC) \
- uwinapi \
- moldname \
- mingwex \
- kernel32 \
- msvcrt \
- user32 \
-))
-else
-$(eval $(call gb_Executable_add_linked_libs,so_checksum,\
- kernel32 \
- msvcrt \
- oldnames \
- user32 \
- uwinapi \
-))
-endif
-endif
-
-ifeq ($(OS),LINUX)
-$(eval $(call gb_Executable_add_linked_libs,so_checksum,\
- dl \
- pthread \
-))
-endif
# vim: set noet sw=4 ts=4:
diff --git a/tools/Executable_sspretty.mk b/tools/Executable_sspretty.mk
index 637acf2afd0e..ab8379bae5bd 100644
--- a/tools/Executable_sspretty.mk
+++ b/tools/Executable_sspretty.mk
@@ -44,6 +44,7 @@ $(eval $(call gb_Executable_add_linked_libs,sspretty,\
stl \
tl \
vos3 \
+ $(gb_STDLIBS) \
))
# used to link against basegfxlx comphelp4gcc3 i18nisolang1gcc3 ucbhelper4gcc3 uno_cppu uno_cppuhelpergcc3 uno_salhelpergcc3 - seems to be superficial
@@ -55,35 +56,4 @@ $(eval $(call gb_Executable_add_exception_objects,sspretty,\
tools/bootstrp/sspretty \
))
-ifeq ($(OS),WNT)
-ifneq ($(USE_MINGW),)
-$(eval $(call gb_Executable_add_linked_libs,sspretty,\
- mingwthrd \
- $(gb_MINGW_LIBSTDCPP) \
- mingw32 \
- $(gb_MINGW_LIBGCC) \
- uwinapi \
- moldname \
- mingwex \
- kernel32 \
- msvcrt \
- user32 \
-))
-else
-$(eval $(call gb_Executable_add_linked_libs,sspretty,\
- kernel32 \
- msvcrt \
- oldnames \
- user32 \
- uwinapi \
-))
-endif
-endif
-
-ifeq ($(OS),LINUX)
-$(eval $(call gb_Executable_add_linked_libs,sspretty,\
- dl \
- pthread \
-))
-endif
# vim: set noet sw=4 ts=4:
diff --git a/tools/Library_tl.mk b/tools/Library_tl.mk
index fe91657e42f4..4e676f2c3436 100644
--- a/tools/Library_tl.mk
+++ b/tools/Library_tl.mk
@@ -33,13 +33,10 @@ $(eval $(call gb_Library_add_precompiled_header,tl,$(SRCDIR)/tools/inc/pch/preco
$(eval $(call gb_Library_set_include,tl,\
$$(INCLUDE) \
- -I$(OUTDIR)/inc \
- -I$(WORKDIR)/inc/tools \
-I$(SRCDIR)/tools/inc \
-I$(SRCDIR)/tools/inc/pch \
-I$(SRCDIR)/solenv/inc \
-I$(SRCDIR)/solenv/inc/Xp31 \
- -I$(OUTDIR)/inc/tools \
-I$(OUTDIR)/inc/offuh \
-I$(OUTDIR)/inc/stl \
))
@@ -58,6 +55,7 @@ $(eval $(call gb_Library_add_linked_libs,tl,\
cppu \
sal \
vos3 \
+ $(gb_STDLIBS) \
))
@@ -142,15 +140,8 @@ $(eval $(call gb_Library_add_linked_static_libs,tl,\
))
endif
-ifeq ($(OS),LINUX)
-$(eval $(call gb_Library_add_linked_libs,tl,\
- dl \
- m \
- pthread \
-))
-endif
-
ifeq ($(OS),WNT)
+
$(eval $(call gb_Library_set_include,tl,\
$$(INCLUDE) \
-I$(SRCDIR)/tools/win/inc \
@@ -160,39 +151,16 @@ $(eval $(call gb_Library_add_exception_objects,tl,\
tools/win/source/dll/toolsdll \
))
-ifneq ($(USE_MINGW),)
-$(eval $(call gb_Library_add_linked_libs,tl,\
- mingwthrd \
- $(gb_MINGW_LIBSTDCPP) \
- mingw32 \
- $(gb_MINGW_LIBGCC) \
- uwinapi \
- moldname \
- mingwex \
- advapi32 \
- kernel32 \
- mpr \
- msvcrt \
- ole32 \
- shell32 \
- user32 \
- uuid \
-))
-else
$(eval $(call gb_Library_add_linked_libs,tl,\
- advapi32 \
- kernel32 \
mpr \
- msvcrt \
- oldnames \
ole32 \
shell32 \
user32 \
uuid \
- uwinapi \
))
+
endif
-endif
+
# tools/source/string/debugprint -DDEBUG -DEXCEPTIONS_OFF -DOSL_DEBUG_LEVEL=2 -DSHAREDLIB -DTOOLS_DLLIMPLEMENTATION -D_DLL_ -O0 -fno-exceptions -fpic -fvisibility=hidden -g
# -DOPTIMIZE
# no -DTOOLS_DLLIMPLEMENTATION on toolsdll
diff --git a/tools/bootstrp/addexes/replace.cxx b/tools/bootstrp/addexes/replace.cxx
index 3c451ae54be0..37304ab18870 100644
--- a/tools/bootstrp/addexes/replace.cxx
+++ b/tools/bootstrp/addexes/replace.cxx
@@ -60,7 +60,7 @@ int _cdecl main( int argc, char *argv[] )
aUpperText.ToUpperAscii();
- ULONG nIndex;
+ sal_uIntPtr nIndex;
aSearch.ToUpperAscii();
nIndex = aUpperText.Search( aSearch.GetBuffer(), 0);
diff --git a/tools/bootstrp/addexes2/mkfilt.cxx b/tools/bootstrp/addexes2/mkfilt.cxx
index 2d03aaa153e5..9dae100352c3 100644
--- a/tools/bootstrp/addexes2/mkfilt.cxx
+++ b/tools/bootstrp/addexes2/mkfilt.cxx
@@ -88,16 +88,16 @@ class MkLine
public:
ByteString aLine;
ByteStringList* pPrivateTnrLst;
- BOOL bOut;
- BOOL bHier;
+ sal_Bool bOut;
+ sal_Bool bHier;
MkLine();
};
MkLine::MkLine()
{
- bOut = FALSE;
- bHier = FALSE;
+ bOut = sal_False;
+ bHier = sal_False;
pPrivateTnrLst = NULL;
}
@@ -159,32 +159,32 @@ void MkFilter::Filter()
MkLine *pMkLine = new MkLine();
ByteString *pStr = new ByteString( aLineBuf );
pMkLine->aLine = *pStr;
- pMkLine->bOut = FALSE;
+ pMkLine->bOut = sal_False;
pLst->Insert( pMkLine, LIST_APPEND );
}
else if ( nState == 1 )
{
- BOOL bInTnrList = TRUE;
+ sal_Bool bInTnrList = sal_True;
fprintf( stderr, ":" );
MkLine *pMkLine = new MkLine();
if ( aLine.Search("unroll end") != STRING_NOTFOUND )
{
fprintf( stderr, ";\nunroll end\n" );
MkLine *p_MkLine = new MkLine();
- p_MkLine->bHier = TRUE;
+ p_MkLine->bHier = sal_True;
ByteString *pByteString = new ByteString("# do not delete this line === mkfilter3i\n");
p_MkLine->aLine = *pByteString;
- p_MkLine->bOut = FALSE;
+ p_MkLine->bOut = sal_False;
p_MkLine->pPrivateTnrLst = pTnrLst;
pTnrLst = new ByteStringList();
pLst->Insert( p_MkLine, LIST_APPEND );
nState = 0;
- bInTnrList = FALSE;
+ bInTnrList = sal_False;
}
ByteString *pStr = new ByteString( aLineBuf );
pMkLine->aLine = *pStr;
- pMkLine->bOut = FALSE;
+ pMkLine->bOut = sal_False;
if ( bInTnrList )
pTnrLst->Insert( pMkLine, LIST_APPEND );
@@ -196,21 +196,21 @@ void MkFilter::Filter()
fprintf( stderr, "\n" );
// das File wieder ausgegeben
- ULONG nLines = pLst->Count();
- for ( ULONG j=0; j<nLines; j++ )
+ sal_uIntPtr nLines = pLst->Count();
+ for ( sal_uIntPtr j=0; j<nLines; j++ )
{
MkLine *pLine = pLst->GetObject( j );
if ( pLine->bHier )
{
// die List n - Mal abarbeiten
- for ( USHORT n=1; n<11; n++)
+ for ( sal_uInt16 n=1; n<11; n++)
{
- ULONG nCount = pLine->pPrivateTnrLst->Count();
- for ( ULONG i=0; i<nCount; i++ )
+ sal_uIntPtr nCount = pLine->pPrivateTnrLst->Count();
+ for ( sal_uIntPtr i=0; i<nCount; i++ )
{
MkLine *pMkLine = pLine->pPrivateTnrLst->GetObject(i);
ByteString aLine = pMkLine->aLine;
- while( aLine.SearchAndReplace( aTnr, ByteString::CreateFromInt32( n )) != (USHORT)-1 ) ;
+ while( aLine.SearchAndReplace( aTnr, ByteString::CreateFromInt32( n )) != (sal_uInt16)-1 ) ;
fputs( aLine.GetBuffer(), pOut );
fprintf( stderr, "o" );
}
diff --git a/tools/bootstrp/cppdep.cxx b/tools/bootstrp/cppdep.cxx
index 6263c719df51..28410a575b5a 100644
--- a/tools/bootstrp/cppdep.cxx
+++ b/tools/bootstrp/cppdep.cxx
@@ -63,34 +63,34 @@ CppDep::~CppDep()
void CppDep::Execute()
{
- ULONG nCount = pSources->Count();
- for ( ULONG n=0; n<nCount;n++)
+ sal_uIntPtr nCount = pSources->Count();
+ for ( sal_uIntPtr n=0; n<nCount;n++)
{
ByteString *pStr = pSources->GetObject(n);
Search( *pStr );
}
}
-BOOL CppDep::AddSearchPath( const char* aPath )
+sal_Bool CppDep::AddSearchPath( const char* aPath )
{
ByteString *pStr = new ByteString( aPath );
pSearchPath->Insert( pStr, LIST_APPEND );
- return FALSE;
+ return sal_False;
}
-BOOL CppDep::AddSource( const char* aSource )
+sal_Bool CppDep::AddSource( const char* aSource )
{
ByteString *pStr = new ByteString( aSource );
pSources->Insert( pStr, LIST_APPEND );
- return FALSE;
+ return sal_False;
}
-BOOL CppDep::Search( ByteString aFileName )
+sal_Bool CppDep::Search( ByteString aFileName )
{
#ifdef DEBUG_VERBOSE
fprintf( stderr, "SEARCH : %s\n", aFileName.GetBuffer());
#endif
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SvFileStream aFile;
ByteString aReadLine;
@@ -100,7 +100,7 @@ BOOL CppDep::Search( ByteString aFileName )
aFile.Open( suFileName, STREAM_READ );
while ( aFile.ReadLine( aReadLine ))
{
- USHORT nPos = aReadLine.Search( "include" );
+ sal_uInt16 nPos = aReadLine.Search( "include" );
if ( nPos != STRING_NOTFOUND )
{
#ifdef DEBUG_VERBOSE
@@ -115,13 +115,13 @@ BOOL CppDep::Search( ByteString aFileName )
if ( aResult !="")
if ( (aNewFile = Exists( aResult )) != "" )
{
- BOOL bFound = FALSE;
- ULONG nCount = pFileList->Count();
- for ( ULONG i=0; i<nCount; i++ )
+ sal_Bool bFound = sal_False;
+ sal_uIntPtr nCount = pFileList->Count();
+ for ( sal_uIntPtr i=0; i<nCount; i++ )
{
ByteString *pStr = pFileList->GetObject(i);
if ( *pStr == aNewFile )
- bFound = TRUE;
+ bFound = sal_True;
}
#ifdef DEBUG_VERBOSE
fprintf( stderr, "not in list : %d %s\n", nPos, aReadLine.GetBuffer() );
@@ -151,8 +151,8 @@ ByteString CppDep::Exists( ByteString aFileName )
fprintf( stderr, "Searching %s \n", aFileName.GetBuffer() );
#endif
- ULONG nCount = pSearchPath->Count();
- for ( ULONG n=0; n<nCount; n++)
+ sal_uIntPtr nCount = pSearchPath->Count();
+ for ( sal_uIntPtr n=0; n<nCount; n++)
{
struct stat aBuf;
ByteString *pPathName = pSearchPath->GetObject(n);
@@ -217,7 +217,7 @@ ByteString CppDep::IsIncludeStatement( ByteString aLine )
if ( aTmpStr.Equals("#include") )
{
aTmpStr = aLine.Erase( 0, 8 );
- USHORT nLen = aLine.Len();
+ sal_uInt16 nLen = aLine.Len();
aLine.Erase( nLen-1, 1 );
aLine.Erase( 0, 1 );
#ifdef DEBUG_VERBOSE
diff --git a/tools/bootstrp/cppdep.hxx b/tools/bootstrp/cppdep.hxx
index cdc3ac2e9758..0744a94d8964 100644
--- a/tools/bootstrp/cppdep.hxx
+++ b/tools/bootstrp/cppdep.hxx
@@ -41,7 +41,7 @@ protected:
ByteStringList *pFileList;
ByteStringList *pSources;
- BOOL Search( ByteString aFileName );
+ sal_Bool Search( ByteString aFileName );
ByteString Exists( ByteString aFileName );
ByteString IsIncludeStatement( ByteString aLine );
@@ -52,7 +52,7 @@ public:
virtual void Execute();
ByteStringList* GetDepList(){return pFileList;}
- BOOL AddSearchPath( const char* aPath );
- BOOL AddSource( const char * aSource );
+ sal_Bool AddSearchPath( const char* aPath );
+ sal_Bool AddSource( const char * aSource );
};
diff --git a/tools/bootstrp/inimgr.cxx b/tools/bootstrp/inimgr.cxx
index a0a69f06f7af..0907f8f9e102 100644
--- a/tools/bootstrp/inimgr.cxx
+++ b/tools/bootstrp/inimgr.cxx
@@ -42,7 +42,7 @@
/****************************************************************************/
IniManager::IniManager( ByteString &rDir, ByteString &rLocalDir )
/****************************************************************************/
- : bUpdate( TRUE )
+ : bUpdate( sal_True )
{
sLocalPath = ByteString( getenv( "LOCALINI" ));
if ( !sLocalPath.Len())
@@ -59,7 +59,7 @@ IniManager::IniManager( ByteString &rDir, ByteString &rLocalDir )
/****************************************************************************/
IniManager::IniManager( ByteString &rDir )
/****************************************************************************/
- : bUpdate( TRUE )
+ : bUpdate( sal_True )
{
sLocalPath = GetLocalIni();
sGlobalDir = rDir;
@@ -73,7 +73,7 @@ IniManager::IniManager( ByteString &rDir )
/****************************************************************************/
IniManager::IniManager()
/****************************************************************************/
- : bUpdate( TRUE )
+ : bUpdate( sal_True )
{
sLocalPath = GetLocalIni();
@@ -169,7 +169,7 @@ void IniManager::ForceUpdate()
sLocalPath += "/";
#endif
- for ( USHORT i=0; i < aDir.Count(); i++ ) {
+ for ( sal_uInt16 i=0; i < aDir.Count(); i++ ) {
ByteString sEntry( aDir[i].GetName(), gsl_getSystemTextEncoding());
if (( sEntry != "." ) &&
( sEntry != ".." ))
@@ -205,6 +205,6 @@ void IniManager::Update()
if ( bUpdate )
{
ForceUpdate();
- bUpdate = FALSE;
+ bUpdate = sal_False;
}
}
diff --git a/tools/bootstrp/iserver.cxx b/tools/bootstrp/iserver.cxx
index 0b2c1df15203..63b1b333b22f 100644
--- a/tools/bootstrp/iserver.cxx
+++ b/tools/bootstrp/iserver.cxx
@@ -50,12 +50,12 @@ int _cdecl main( int argc, char *argv[] )
fprintf( stdout, " returns a list of all settings of version \"vcl364\"\n" );
}
else {
- BOOL bError = FALSE;
- BOOL bList = FALSE;
+ sal_Bool bError = sal_False;
+ sal_Bool bList = sal_False;
ByteString sInfo( "" );
ByteString sDataBase( GetDefStandList());
- BOOL bGetNow = FALSE;
+ sal_Bool bGetNow = sal_False;
int nCount = 1;
while (( nCount < argc ) &&
@@ -68,7 +68,7 @@ int _cdecl main( int argc, char *argv[] )
sInfo = ByteString( argv[nCount] );
nCount++;
}
- else bError = TRUE;
+ else bError = sal_True;
}
else if ( ByteString( argv[nCount] ).ToUpperAscii() == "-D" ) {
// requestet info path
@@ -77,20 +77,20 @@ int _cdecl main( int argc, char *argv[] )
sDataBase = ByteString( argv[nCount] );
nCount++;
}
- else bError = TRUE;
+ else bError = sal_True;
}
else if ( ByteString( argv[nCount] ).ToUpperAscii() == "-L" ) {
// request list of childs
nCount++;
- bList = TRUE;
+ bList = sal_True;
}
else if ( ByteString( argv[nCount] ).ToUpperAscii() == "-N" ) {
// request list of childs
nCount++;
- bGetNow = TRUE;
+ bGetNow = sal_True;
}
else {
- bError = TRUE;
+ bError = sal_True;
}
}
@@ -103,7 +103,7 @@ int _cdecl main( int argc, char *argv[] )
return 1;
if ( sInfo.Len()) {
- GenericInformation *pInfo = pList->GetInfo( sInfo, TRUE );
+ GenericInformation *pInfo = pList->GetInfo( sInfo, sal_True );
if ( pInfo ) {
ByteString sValue( pInfo->GetValue());
@@ -113,7 +113,7 @@ int _cdecl main( int argc, char *argv[] )
GenericInformationList *pList = pInfo->GetSubList();
if ( pList ) {
// show whole list of childs and their values
- for( ULONG i = 0; i < pList->Count(); i++ ) {
+ for( sal_uIntPtr i = 0; i < pList->Count(); i++ ) {
GenericInformation *pInfo = pList->GetObject( i );
ByteString sValue( pInfo->GetValue());
fprintf( stdout, " %s %s\n", pInfo->GetBuffer(), sValue.GetBuffer());
@@ -126,11 +126,11 @@ int _cdecl main( int argc, char *argv[] )
}
else {
// show whole list of childs and their values
- for( ULONG i = 0; i < pList->Count(); i++ ) {
+ for( sal_uIntPtr i = 0; i < pList->Count(); i++ ) {
GenericInformation *pInfo = pList->GetObject( i );
if ( bGetNow ) {
ByteString sPath( "settings/now" );
- GenericInformation *pSubInfo = pInfo->GetSubInfo( sPath, TRUE );
+ GenericInformation *pSubInfo = pInfo->GetSubInfo( sPath, sal_True );
if ( pSubInfo && pSubInfo->GetValue() == "_TRUE" )
fprintf( stdout, "%s\n", pInfo->GetBuffer());
}
diff --git a/tools/bootstrp/mkcreate.cxx b/tools/bootstrp/mkcreate.cxx
index 398a3a4c4143..adf9dde2ddaa 100644
--- a/tools/bootstrp/mkcreate.cxx
+++ b/tools/bootstrp/mkcreate.cxx
@@ -59,7 +59,7 @@ char const *LimitedPath[] = {
/*****************************************************************************/
SourceDirectory::SourceDirectory( const ByteString &rDirectoryName,
- USHORT nOperatingSystem, SourceDirectory *pParentDirectory )
+ sal_uInt16 nOperatingSystem, SourceDirectory *pParentDirectory )
/*****************************************************************************/
: ByteString( rDirectoryName ),
pParent( pParentDirectory ),
@@ -87,7 +87,7 @@ SourceDirectory::~SourceDirectory()
/*****************************************************************************/
CodedDependency *SourceDirectory::AddCodedDependency(
- const ByteString &rCodedIdentifier, USHORT nOperatingSystems )
+ const ByteString &rCodedIdentifier, sal_uInt16 nOperatingSystems )
/*****************************************************************************/
{
CodedDependency *pReturn = NULL;
@@ -98,7 +98,7 @@ CodedDependency *SourceDirectory::AddCodedDependency(
pCodedDependencies->PutString(( ByteString * ) pReturn );
}
else {
- ULONG nPos =
+ sal_uIntPtr nPos =
pCodedDependencies->IsString( (ByteString *) (& rCodedIdentifier) );
if ( nPos == NOT_THERE ) {
pReturn =
@@ -116,7 +116,7 @@ CodedDependency *SourceDirectory::AddCodedDependency(
/*****************************************************************************/
CodedDependency *SourceDirectory::AddCodedIdentifier(
- const ByteString &rCodedIdentifier, USHORT nOperatingSystems )
+ const ByteString &rCodedIdentifier, sal_uInt16 nOperatingSystems )
/*****************************************************************************/
{
CodedDependency *pReturn = NULL;
@@ -127,7 +127,7 @@ CodedDependency *SourceDirectory::AddCodedIdentifier(
pCodedIdentifier->PutString(( ByteString * ) pReturn );
}
else {
- ULONG nPos =
+ sal_uIntPtr nPos =
pCodedIdentifier->IsString( ( ByteString *) (& rCodedIdentifier) );
if ( nPos == NOT_THERE ) {
pReturn =
@@ -172,22 +172,22 @@ SourceDirectory *SourceDirectory::GetRootDirectory()
/*****************************************************************************/
SourceDirectory *SourceDirectory::GetSubDirectory(
- const ByteString &rDirectoryPath, USHORT nOperatingSystem )
+ const ByteString &rDirectoryPath, sal_uInt16 nOperatingSystem )
/*****************************************************************************/
{
ByteString sSearch;
- BOOL bSubs = TRUE;
- ULONG nIndex = 0;
+ sal_Bool bSubs = sal_True;
+ sal_uIntPtr nIndex = 0;
while ( bSubs && ByteString( LimitedPath[ nIndex ]) != "EndOf_LimitedPath" ) {
SourceDirectory *pActDir = this;
ByteString sLimitation( LimitedPath[ nIndex ]);
- BOOL bBreak = FALSE;
- for ( ULONG i = sLimitation.GetTokenCount( '\\' ); i > 0 && !bBreak; i-- ) {
- if (( !pActDir ) || ( *pActDir != sLimitation.GetToken(( USHORT )( i - 1 ), '\\' )))
- bBreak = TRUE;
+ sal_Bool bBreak = sal_False;
+ for ( sal_uIntPtr i = sLimitation.GetTokenCount( '\\' ); i > 0 && !bBreak; i-- ) {
+ if (( !pActDir ) || ( *pActDir != sLimitation.GetToken(( sal_uInt16 )( i - 1 ), '\\' )))
+ bBreak = sal_True;
else
pActDir = pActDir->pParent;
}
@@ -223,7 +223,7 @@ SourceDirectory *SourceDirectory::GetSubDirectory(
/*****************************************************************************/
SourceDirectory *SourceDirectory::GetDirectory(
- const ByteString &rDirectoryName, USHORT nOperatingSystem )
+ const ByteString &rDirectoryName, sal_uInt16 nOperatingSystem )
/*****************************************************************************/
{
ByteString sDirectoryName( rDirectoryName );
@@ -249,7 +249,7 @@ SourceDirectory *SourceDirectory::GetDirectory(
/*****************************************************************************/
SourceDirectory *SourceDirectory::Insert( const ByteString &rDirectoryName,
- USHORT nOperatingSystem )
+ sal_uInt16 nOperatingSystem )
/*****************************************************************************/
{
SourceDirectory *pSubDirectory = NULL;
@@ -271,11 +271,11 @@ Dependency *SourceDirectory::ResolvesDependency(
if ( !pCodedIdentifier )
return NULL;
- ULONG nPos = pCodedIdentifier->IsString( pCodedDependency );
+ sal_uIntPtr nPos = pCodedIdentifier->IsString( pCodedDependency );
if ( nPos != NOT_THERE ) {
CodedDependency *pIdentifier =
( CodedDependency * ) pCodedIdentifier->GetObject( nPos );
- USHORT nResult =
+ sal_uInt16 nResult =
pIdentifier->GetOperatingSystem() &
pCodedDependency->GetOperatingSystem();
Dependency *pReturn = new Dependency( *this, nResult );
@@ -294,7 +294,7 @@ void SourceDirectory::ResolveDependencies()
if ( !pSubDirectories )
return;
- for ( ULONG i = 0; i < pSubDirectories->Count(); i++ ) {
+ for ( sal_uIntPtr i = 0; i < pSubDirectories->Count(); i++ ) {
SourceDirectory *pActDirectory =
( SourceDirectory * ) pSubDirectories->GetObject( i );
if ( pActDirectory->pSubDirectories )
@@ -304,10 +304,10 @@ void SourceDirectory::ResolveDependencies()
while ( pActDirectory->pCodedDependencies->Count())
{
CodedDependency *pCodedDependency = ( CodedDependency * )
- pActDirectory->pCodedDependencies->GetObject(( ULONG ) 0 );
+ pActDirectory->pCodedDependencies->GetObject(( sal_uIntPtr ) 0 );
for (
- ULONG k = 0;
+ sal_uIntPtr k = 0;
( k < pSubDirectories->Count()) &&
( pCodedDependency->GetOperatingSystem() != OS_NONE );
k++
@@ -329,7 +329,7 @@ void SourceDirectory::ResolveDependencies()
}
else
delete pCodedDependency;
- pActDirectory->pCodedDependencies->Remove(( ULONG ) 0 );
+ pActDirectory->pCodedDependencies->Remove(( sal_uIntPtr ) 0 );
}
}
}
@@ -344,7 +344,7 @@ ByteString SourceDirectory::GetTarget()
if ( !pDependencies )
return sReturn;
- ULONG k = 0;
+ sal_uIntPtr k = 0;
while ( k < pDependencies->Count()) {
if ( *this == *pDependencies->GetObject( k ))
delete pDependencies->Remove( k );
@@ -358,18 +358,18 @@ ByteString SourceDirectory::GetTarget()
return sReturn;
}
- BOOL bDependsOnPlatform = FALSE;
- for ( ULONG i = 0; i < pDependencies->Count(); i++ )
+ sal_Bool bDependsOnPlatform = sal_False;
+ for ( sal_uIntPtr i = 0; i < pDependencies->Count(); i++ )
if ((( Dependency * ) pDependencies->GetObject( i ))->
GetOperatingSystem() != OS_ALL )
- bDependsOnPlatform = TRUE;
+ bDependsOnPlatform = sal_True;
ByteString sTarget( *this );
sTarget.SearchAndReplaceAll( "\\", "$/" );
if ( !bDependsOnPlatform ) {
sReturn = sTarget;
sReturn += " :";
- for ( ULONG i = 0; i < pDependencies->Count(); i++ ) {
+ for ( sal_uIntPtr i = 0; i < pDependencies->Count(); i++ ) {
ByteString sDependency( *pDependencies->GetObject( i ));
sDependency.SearchAndReplaceAll( "\\", "$/" );
sReturn += " ";
@@ -380,19 +380,19 @@ ByteString SourceDirectory::GetTarget()
ByteString sUNX( ".IF \"$(GUI)\" == \"UNX\"\n" );
sUNX += sTarget;
sUNX += " :";
- BOOL bUNX = FALSE;
+ sal_Bool bUNX = sal_False;
ByteString sWNT( ".IF \"$(GUI)\" == \"WNT\"\n" );
sWNT += sTarget;
sWNT += " :";
- BOOL bWNT = FALSE;
+ sal_Bool bWNT = sal_False;
ByteString sOS2( ".IF \"$(GUI)\" == \"OS2\"\n" );
sOS2 += sTarget;
sOS2 += " :";
- BOOL bOS2 = FALSE;
+ sal_Bool bOS2 = sal_False;
- for ( ULONG i = 0; i < pDependencies->Count(); i++ ) {
+ for ( sal_uIntPtr i = 0; i < pDependencies->Count(); i++ ) {
Dependency *pDependency =
( Dependency * ) pDependencies->GetObject( i );
ByteString sDependency( *pDependency );
@@ -401,17 +401,17 @@ ByteString SourceDirectory::GetTarget()
if ( pDependency->GetOperatingSystem() & OS_UNX ) {
sUNX += " ";
sUNX += sDependency;
- bUNX = TRUE;
+ bUNX = sal_True;
}
if ( pDependency->GetOperatingSystem() & OS_WIN32 ) {
sWNT += " ";
sWNT += sDependency;
- bWNT = TRUE;
+ bWNT = sal_True;
}
if ( pDependency->GetOperatingSystem() & OS_OS2 ) {
sOS2 += " ";
sOS2 += sDependency;
- bOS2 = TRUE;
+ bOS2 = sal_True;
}
}
@@ -439,16 +439,16 @@ ByteString SourceDirectory::GetSubDirsTarget()
ByteString sReturn;
if ( pSubDirectories ) {
- BOOL bDependsOnPlatform = FALSE;
- for ( ULONG i = 0; i < pSubDirectories->Count(); i++ )
+ sal_Bool bDependsOnPlatform = sal_False;
+ for ( sal_uIntPtr i = 0; i < pSubDirectories->Count(); i++ )
if ((( SourceDirectory * ) pSubDirectories->GetObject( i ))->
GetOperatingSystems() != OS_ALL )
- bDependsOnPlatform = TRUE;
+ bDependsOnPlatform = sal_True;
if ( !bDependsOnPlatform ) {
sReturn = "RC_SUBDIRS = ";
- for ( ULONG i = 0; i < pSubDirectories->Count(); i++ ) {
+ for ( sal_uIntPtr i = 0; i < pSubDirectories->Count(); i++ ) {
ByteString sSubDirectory( *pSubDirectories->GetObject( i ));
sSubDirectory.SearchAndReplaceAll( "\\", "$/" );
sReturn += " \\\n\t";
@@ -459,17 +459,17 @@ ByteString SourceDirectory::GetSubDirsTarget()
else {
ByteString sUNX( ".IF \"$(GUI)\" == \"UNX\"\n" );
sUNX += "RC_SUBDIRS = ";
- BOOL bUNX = FALSE;
+ sal_Bool bUNX = sal_False;
ByteString sWNT( ".IF \"$(GUI)\" == \"WNT\"\n" );
sWNT += "RC_SUBDIRS = ";
- BOOL bWNT = FALSE;
+ sal_Bool bWNT = sal_False;
ByteString sOS2( ".IF \"$(GUI)\" == \"OS2\"\n" );
sOS2 += "RC_SUBDIRS = ";
- BOOL bOS2 = FALSE;
+ sal_Bool bOS2 = sal_False;
- for ( ULONG i = 0; i < pSubDirectories->Count(); i++ ) {
+ for ( sal_uIntPtr i = 0; i < pSubDirectories->Count(); i++ ) {
SourceDirectory *pDirectory =
( SourceDirectory * ) pSubDirectories->GetObject( i );
ByteString sDirectory( *pDirectory );
@@ -478,17 +478,17 @@ ByteString SourceDirectory::GetSubDirsTarget()
if ( pDirectory->GetOperatingSystems() & OS_UNX ) {
sUNX += " \\\n\t";
sUNX += sDirectory;
- bUNX = TRUE;
+ bUNX = sal_True;
}
if ( pDirectory->GetOperatingSystems() & OS_WIN32 ) {
sWNT += " \\\n\t";
sWNT += sDirectory;
- bWNT = TRUE;
+ bWNT = sal_True;
}
if ( pDirectory->GetOperatingSystems() & OS_OS2 ) {
sOS2 += " \\\n\t";
sOS2 += sDirectory;
- bOS2 = TRUE;
+ bOS2 = sal_True;
}
}
if ( bUNX ) {
@@ -509,10 +509,10 @@ ByteString SourceDirectory::GetSubDirsTarget()
}
/*****************************************************************************/
-USHORT SourceDirectory::GetOSType( const ByteString &sDependExt )
+sal_uInt16 SourceDirectory::GetOSType( const ByteString &sDependExt )
/*****************************************************************************/
{
- USHORT nOSType = 0;
+ sal_uInt16 nOSType = 0;
if ( sDependExt == "" )
nOSType |= OS_ALL;
else if ( sDependExt == "N" || sDependExt == "W" )
@@ -526,7 +526,7 @@ USHORT SourceDirectory::GetOSType( const ByteString &sDependExt )
/*****************************************************************************/
SourceDirectory *SourceDirectory::CreateRootDirectory(
- const ByteString &rRoot, const ByteString &rVersion, BOOL bAll )
+ const ByteString &rRoot, const ByteString &rVersion, sal_Bool bAll )
/*****************************************************************************/
{
IniManager aIniManager;
@@ -550,7 +550,7 @@ SourceDirectory *SourceDirectory::CreateRootDirectory(
#endif
ByteString sSolarList( _SOLARLIST );
- GenericInformation *pInfo = pVerList->GetInfo( sPath, TRUE );
+ GenericInformation *pInfo = pVerList->GetInfo( sPath, sal_True );
if ( pInfo ) {
ByteString aIniRoot( GetIniRoot() );
DirEntry aIniEntry( String( aIniRoot, RTL_TEXTENCODING_ASCII_US ));
@@ -564,18 +564,18 @@ SourceDirectory *SourceDirectory::CreateRootDirectory(
*/
ByteString sVersion( rVersion );
- Star aStar( pVerList, sVersion, TRUE, rRoot.GetBuffer());
+ Star aStar( pVerList, sVersion, sal_True, rRoot.GetBuffer());
// fprintf( stderr,
// "Creating virtual directory tree ...\n" );
SourceDirectory *pSourceRoot = new SourceDirectory( rRoot, OS_ALL );
- for ( ULONG i = 0; i < aStar.Count(); i++ ) {
+ for ( sal_uIntPtr i = 0; i < aStar.Count(); i++ ) {
Prj *pPrj = aStar.GetObject( i );
- BOOL bBuildable = TRUE;
- ULONG nIndex = 0;
+ sal_Bool bBuildable = sal_True;
+ sal_uIntPtr nIndex = 0;
while ( bBuildable && ByteString( NoBuildProject[ nIndex ]) != "EndOf_NoBuildProject" ) {
bBuildable = ( ByteString( NoBuildProject[ nIndex ]) != pPrj->GetProjectName());
@@ -585,14 +585,14 @@ SourceDirectory *SourceDirectory::CreateRootDirectory(
if ( bBuildable ) {
SourceDirectory *pProject = pSourceRoot->Insert( pPrj->GetProjectName(), OS_ALL );
- SByteStringList *pPrjDependencies = pPrj->GetDependencies( FALSE );
+ SByteStringList *pPrjDependencies = pPrj->GetDependencies( sal_False );
if ( pPrjDependencies )
- for ( ULONG x = 0; x < pPrjDependencies->Count(); x++ )
+ for ( sal_uIntPtr x = 0; x < pPrjDependencies->Count(); x++ )
pProject->AddCodedDependency( *pPrjDependencies->GetObject( x ), OS_ALL );
pProject->AddCodedIdentifier( pPrj->GetProjectName(), OS_ALL );
- for ( ULONG j = 0; j < pPrj->Count(); j++ ) {
+ for ( sal_uIntPtr j = 0; j < pPrj->Count(); j++ ) {
CommandData *pData = pPrj->GetObject( j );
if ( bAll || ( pData->GetCommandType() == COMMAND_NMAKE )) {
ByteString sDirPath( rRoot );
@@ -602,7 +602,7 @@ SourceDirectory *SourceDirectory::CreateRootDirectory(
pSourceRoot->InsertFull( sDirPath, pData->GetOSType());
SByteStringList *pDependencies = pData->GetDependencies();
if ( pDependencies ) {
- for ( ULONG k = 0; k < pDependencies->Count(); k++ ) {
+ for ( sal_uIntPtr k = 0; k < pDependencies->Count(); k++ ) {
ByteString sDependency(*pDependencies->GetObject( k ));
ByteString sDependExt(sDependency.GetToken( 1, '.' ));
sDependExt.ToUpperAscii();
@@ -623,14 +623,14 @@ SourceDirectory *SourceDirectory::CreateRootDirectory(
}
/*****************************************************************************/
-BOOL SourceDirectory::RemoveDirectoryTreeAndAllDependencies()
+sal_Bool SourceDirectory::RemoveDirectoryTreeAndAllDependencies()
/*****************************************************************************/
{
if ( !pParent )
- return FALSE;
+ return sal_False;
SourceDirectoryList *pParentContent = pParent->pSubDirectories;
- ULONG i = 0;
+ sal_uIntPtr i = 0;
while ( i < pParentContent->Count()) {
SourceDirectory *pCandidate =
( SourceDirectory * )pParentContent->GetObject( i );
@@ -639,7 +639,7 @@ BOOL SourceDirectory::RemoveDirectoryTreeAndAllDependencies()
}
else {
if ( pCandidate->pDependencies ) {
- ULONG nPos = pCandidate->pDependencies->IsString( this );
+ sal_uIntPtr nPos = pCandidate->pDependencies->IsString( this );
if ( nPos != NOT_THERE )
delete pCandidate->pDependencies->Remove( nPos );
}
@@ -647,15 +647,15 @@ BOOL SourceDirectory::RemoveDirectoryTreeAndAllDependencies()
}
}
delete this;
- return TRUE;
+ return sal_True;
}
/*****************************************************************************/
-BOOL SourceDirectory::CreateRecursiveMakefile( BOOL bAllChilds )
+sal_Bool SourceDirectory::CreateRecursiveMakefile( sal_Bool bAllChilds )
/*****************************************************************************/
{
if ( !pSubDirectories )
- return TRUE;
+ return sal_True;
fprintf( stdout, "%s", GetFullPath().GetBuffer());
@@ -663,10 +663,10 @@ BOOL SourceDirectory::CreateRecursiveMakefile( BOOL bAllChilds )
DirEntry aEntry( aTmpStr );
if ( !aEntry.Exists()) {
fprintf( stdout, " ... no directory!n" );
- return FALSE;
+ return sal_False;
}
- ULONG j = 0;
+ sal_uIntPtr j = 0;
while( j < pSubDirectories->Count()) {
String sSubDirectory(
(( SourceDirectory * ) pSubDirectories->GetObject( j ))->
@@ -689,20 +689,20 @@ BOOL SourceDirectory::CreateRecursiveMakefile( BOOL bAllChilds )
DirEntry aMKEntry( aEntry );
aMKEntry += aMKFile;
- BOOL bMakefileMk = FALSE;
+ sal_Bool bMakefileMk = sal_False;
if ( aMKEntry.Exists()) {
if ( nDepth == 1 && *this == ByteString( "api" ))
fprintf( stdout, " ... makefile.mk exists, ignoring (hack: prj == api)!" );
else {
fprintf( stdout, " ... makefile.mk exists, including!" );
- bMakefileMk = TRUE;
+ bMakefileMk = sal_True;
}
}
SvFileStream aMakefile( aRCEntry.GetFull(), STREAM_STD_WRITE | STREAM_TRUNC );
if ( !aMakefile.IsOpen()) {
fprintf( stdout, " ... failed!\n" );
- return FALSE;
+ return sal_False;
}
ByteString sHeader(
@@ -866,7 +866,7 @@ BOOL SourceDirectory::CreateRecursiveMakefile( BOOL bAllChilds )
);
aMakefile.WriteLine( sComment );
- for ( ULONG i = 0; i < pSubDirectories->Count(); i++ ) {
+ for ( sal_uIntPtr i = 0; i < pSubDirectories->Count(); i++ ) {
ByteString sTarget(
(( SourceDirectory * )pSubDirectories->GetObject( i ))->
GetTarget()
@@ -908,12 +908,12 @@ BOOL SourceDirectory::CreateRecursiveMakefile( BOOL bAllChilds )
fprintf( stdout, "\n" );
- BOOL bSuccess = TRUE;
+ sal_Bool bSuccess = sal_True;
if ( bAllChilds )
- for ( ULONG k = 0; k < pSubDirectories->Count(); k++ )
+ for ( sal_uIntPtr k = 0; k < pSubDirectories->Count(); k++ )
if ( !(( SourceDirectory * ) pSubDirectories->GetObject( k ))->
- CreateRecursiveMakefile( TRUE ))
- bSuccess = FALSE;
+ CreateRecursiveMakefile( sal_True ))
+ bSuccess = sal_False;
return bSuccess;
}
@@ -926,7 +926,7 @@ BOOL SourceDirectory::CreateRecursiveMakefile( BOOL bAllChilds )
SourceDirectoryList::~SourceDirectoryList()
/*****************************************************************************/
{
- for ( ULONG i = 0; i < Count(); i++ )
+ for ( sal_uIntPtr i = 0; i < Count(); i++ )
delete GetObject( i );
}
@@ -935,7 +935,7 @@ SourceDirectory *SourceDirectoryList::Search(
const ByteString &rDirectoryName )
/*****************************************************************************/
{
- ULONG nPos = IsString( ( ByteString * ) (&rDirectoryName) );
+ sal_uIntPtr nPos = IsString( ( ByteString * ) (&rDirectoryName) );
if ( nPos != LIST_ENTRY_NOTFOUND )
return ( SourceDirectory * ) GetObject( nPos );
diff --git a/tools/bootstrp/prj.cxx b/tools/bootstrp/prj.cxx
index e5ed5b2451e9..b4dee65f9673 100644
--- a/tools/bootstrp/prj.cxx
+++ b/tools/bootstrp/prj.cxx
@@ -113,9 +113,9 @@ ByteString SimpleConfig::GetNextLine()
aTmpStr = aTmpStr.EraseTrailingChars();
while ( aTmpStr.SearchAndReplace(ByteString(' '),ByteString('\t') ) != STRING_NOTFOUND ) ;
int nLength = aTmpStr.Len();
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
ByteString aEraseString;
- for ( USHORT i = 0; i<= nLength; i++)
+ for ( sal_uInt16 i = 0; i<= nLength; i++)
{
if ( aTmpStr.GetChar( i ) == 0x20 && !bFound )
aTmpStr.SetChar( i, 0x09 );
@@ -124,7 +124,7 @@ ByteString SimpleConfig::GetNextLine()
}
/*****************************************************************************/
-ByteString SimpleConfig::GetCleanedNextLine( BOOL bReadComments )
+ByteString SimpleConfig::GetCleanedNextLine( sal_Bool bReadComments )
/*****************************************************************************/
{
@@ -142,11 +142,11 @@ ByteString SimpleConfig::GetCleanedNextLine( BOOL bReadComments )
aTmpStr = aTmpStr.EraseLeadingChars();
aTmpStr = aTmpStr.EraseTrailingChars();
-// while ( aTmpStr.SearchAndReplace(String(' '),String('\t') ) != (USHORT)-1 );
+// while ( aTmpStr.SearchAndReplace(String(' '),String('\t') ) != (sal_uInt16)-1 );
int nLength = aTmpStr.Len();
ByteString aEraseString;
- BOOL bFirstTab = TRUE;
- for ( USHORT i = 0; i<= nLength; i++)
+ sal_Bool bFirstTab = sal_True;
+ for ( sal_uInt16 i = 0; i<= nLength; i++)
{
if ( aTmpStr.GetChar( i ) == 0x20 )
aTmpStr.SetChar( i, 0x09 );
@@ -154,17 +154,18 @@ ByteString SimpleConfig::GetCleanedNextLine( BOOL bReadComments )
if ( aTmpStr.GetChar( i ) == 0x09 )
{
if ( bFirstTab )
- bFirstTab = FALSE;
+ bFirstTab = sal_False;
else
{
aTmpStr.SetChar( i, 0x20 );
}
}
else
- bFirstTab = TRUE;
+ bFirstTab = sal_True;
}
aTmpStr.EraseAllChars(' ');
return aTmpStr;
}
+
diff --git a/tools/bootstrp/rscdep.cxx b/tools/bootstrp/rscdep.cxx
index 9eddce53a678..7bcf036f6fa4 100644
--- a/tools/bootstrp/rscdep.cxx
+++ b/tools/bootstrp/rscdep.cxx
@@ -88,7 +88,7 @@ int main( int argc, char** argv )
char pOutputFileName[255];
char pSrsFileName[255];
String aSrsBaseName;
- BOOL bSource = FALSE;
+ sal_Bool bSource = sal_False;
ByteString aRespArg;
// who needs anything but '/' ?
// String aDelim = String(DirEntry::GetAccessDelimiter());
@@ -172,7 +172,7 @@ int main( int argc, char** argv )
pDep->AddSource( &aBuf2[0] );
aRespArg += " ";
aRespArg += &aBuf2[0];
- bSource = TRUE;
+ bSource = sal_True;
}
}
}
@@ -205,7 +205,7 @@ int main( int argc, char** argv )
case 'h' :
case 'H' :
case '?' :
- printf("RscDep 1.0 (c)2000 StarOffice\n");
+ printf("RscDep 1.0\n");
break;
default:
@@ -221,7 +221,7 @@ int main( int argc, char** argv )
aEntry.ToAbs();
// String aCwd = aEntry.GetName();
String aCwd(pFileNamePrefix, gsl_getSystemTextEncoding());
-/* USHORT nPos;
+/* sal_uInt16 nPos;
#ifndef UNX
while ( (nPos = aCwd.Search('\\') != STRING_NOTFOUND ))
#else
@@ -272,7 +272,7 @@ int main( int argc, char** argv )
aString += aRespArg;
pDep->Execute();
ByteStringList *pLst = pDep->GetDepList();
- ULONG nCount = pLst->Count();
+ sal_uIntPtr nCount = pLst->Count();
if ( nCount == 0 )
{
aOutStream.WriteLine( aString );
@@ -283,7 +283,7 @@ int main( int argc, char** argv )
aOutStream.WriteLine( aString );
}
- for ( ULONG j=0; j<nCount; j++ )
+ for ( sal_uIntPtr j=0; j<nCount; j++ )
{
ByteString *pStr = pLst->GetObject(j);
pStr->SearchAndReplaceAll('\\', ByteString( aDelim, RTL_TEXTENCODING_ASCII_US ));
diff --git a/tools/inc/bootstrp/inimgr.hxx b/tools/inc/bootstrp/inimgr.hxx
index 7be00ce14d48..d72df34f19af 100644
--- a/tools/inc/bootstrp/inimgr.hxx
+++ b/tools/inc/bootstrp/inimgr.hxx
@@ -39,7 +39,7 @@ Source and Destination Dir is used. Otherwise ForceUpdate has to be used
class IniManager
{
private:
- BOOL bUpdate;
+ sal_Bool bUpdate;
ByteString sGlobalDir; /// holds the org. ini dir
ByteString sLocalPath; /// holds path of local ini dir
diff --git a/tools/inc/bootstrp/mkcreate.hxx b/tools/inc/bootstrp/mkcreate.hxx
index 5510fb87f7b9..96f272533d55 100644
--- a/tools/inc/bootstrp/mkcreate.hxx
+++ b/tools/inc/bootstrp/mkcreate.hxx
@@ -46,14 +46,14 @@ class SourceDirectoryList;
class CodedDependency : public ByteString
{
private:
- USHORT nOSType; // operating systems where dependeny exists
+ sal_uInt16 nOSType; // operating systems where dependeny exists
public:
/* create a dependency instance with given coded directory name
*/
CodedDependency(
const ByteString &rCodedIdentifier, // the coded name of the directory
- USHORT nOperatingSystems // the operating systems where this dependency exists
+ sal_uInt16 nOperatingSystems // the operating systems where this dependency exists
) :
ByteString( rCodedIdentifier ),
nOSType( nOperatingSystems )
@@ -62,29 +62,29 @@ public:
/* returns the operating system
*/
- USHORT GetOperatingSystem()
+ sal_uInt16 GetOperatingSystem()
{
return nOSType;
}
/* set operating system
*/
- void SetOperatingSystem( USHORT nOperatingSystems )
+ void SetOperatingSystem( sal_uInt16 nOperatingSystems )
{
nOSType = nOperatingSystems;
}
/* add operating systems if same dependency
*/
- BOOL TryToMerge(
+ sal_Bool TryToMerge(
const ByteString &rCodedIdentifier, // the coded name of the directory
- USHORT nOperatingSystems // the operating systems where this dependency exists
+ sal_uInt16 nOperatingSystems // the operating systems where this dependency exists
)
{
if ( rCodedIdentifier != *this )
- return FALSE;
+ return sal_False;
nOSType |= nOperatingSystems;
- return TRUE;
+ return sal_True;
}
};
@@ -95,14 +95,14 @@ public:
class Dependency : public ByteString
{
private:
- USHORT nOSType; // operating systems where dependecy exists
+ sal_uInt16 nOSType; // operating systems where dependecy exists
public:
/* create a dependency instance with given directory name
*/
Dependency(
const ByteString &rDirectoryName, // the coded name of the directory
- USHORT nOperatingSystems // the operating systems where this dependency exists
+ sal_uInt16 nOperatingSystems // the operating systems where this dependency exists
) :
ByteString( rDirectoryName ),
nOSType( nOperatingSystems )
@@ -111,7 +111,7 @@ public:
/* returns the operating system
*/
- USHORT GetOperatingSystem()
+ sal_uInt16 GetOperatingSystem()
{
return nOSType;
}
@@ -126,8 +126,8 @@ class SourceDirectory : public ByteString
private:
SourceDirectory *pParent; // the parent directory
SourceDirectoryList *pSubDirectories; // list of sub directories
- USHORT nOSType; // operating systems where this directory is used
- USHORT nDepth; // depth of directory structure (root is 0)
+ sal_uInt16 nOSType; // operating systems where this directory is used
+ sal_uInt16 nDepth; // depth of directory structure (root is 0)
SByteStringList *pDependencies; // dependencies on other directories in this depth
@@ -142,13 +142,13 @@ private:
/* returns the operating systems of a coded dependency
*/
- static USHORT GetOSType(
+ static sal_uInt16 GetOSType(
const ByteString &sDependExt // the corresponding dependency extension (see also prj.hxx)
);
/* removes this and all sub directories with all dependencies
*/
- BOOL RemoveDirectoryTreeAndAllDependencies();
+ sal_Bool RemoveDirectoryTreeAndAllDependencies();
public:
@@ -157,7 +157,7 @@ public:
*/
SourceDirectory(
const ByteString &rDirectoryName, // name without parent
- USHORT nOperatingSystem, // the operating systems where this directory is used
+ sal_uInt16 nOperatingSystem, // the operating systems where this directory is used
SourceDirectory *pParentDirectory = NULL // parent (if not root)
);
~SourceDirectory();
@@ -172,20 +172,20 @@ public:
/* returns the Operating systems where this directory is used
*/
- USHORT GetOperatingSystems() { return nOSType; }
+ sal_uInt16 GetOperatingSystems() { return nOSType; }
/* returns the given directory
*/
SourceDirectory *GetDirectory(
const ByteString &rDirectoryName, // full path
- USHORT nOperatingSystem // the operating systems where this directory is used
+ sal_uInt16 nOperatingSystem // the operating systems where this directory is used
);
/* create the directory and all mandatory parents
*/
SourceDirectory *InsertFull(
const ByteString &rDirectoryName, // full path
- USHORT nOperatingSystem // the operating systems where this directory is used
+ sal_uInt16 nOperatingSystem // the operating systems where this directory is used
)
{
return GetDirectory( rDirectoryName, nOperatingSystem );
@@ -195,7 +195,7 @@ public:
*/
SourceDirectory *Insert(
const ByteString &rDirectoryName, // name without parent
- USHORT nOperatingSystem // the operating systems where this directory is used
+ sal_uInt16 nOperatingSystem // the operating systems where this directory is used
);
/* get the root directory
@@ -206,14 +206,14 @@ public:
*/
SourceDirectory *GetSubDirectory(
const ByteString &rDirectoryPath, // full sub path
- USHORT nOperatingSystem // the operating systems where this directory is used
+ sal_uInt16 nOperatingSystem // the operating systems where this directory is used
);
/* add a dependency for several platforms
*/
CodedDependency *AddCodedDependency(
const ByteString &rCodedIdentifier, // the coded name of the directory
- USHORT nOperatingSystems // the operating systems where this dependency exists
+ sal_uInt16 nOperatingSystems // the operating systems where this dependency exists
);
/* returns the dependency list
@@ -227,7 +227,7 @@ public:
*/
CodedDependency *AddCodedIdentifier(
const ByteString &rCodedIdentifier, // the coded name of the directory
- USHORT nOperatingSystems // the operating systems where this dependency exists
+ sal_uInt16 nOperatingSystems // the operating systems where this dependency exists
);
/* returns the identifier list
@@ -254,13 +254,13 @@ public:
static SourceDirectory *CreateRootDirectory(
const ByteString &rRoot, // the root directory in file system
const ByteString &rVersion, // the solar verion (r.g. SRC590, SRC591 etc.)
- BOOL bAll = FALSE // add all directories or only buildable ones
+ sal_Bool bAll = sal_False // add all directories or only buildable ones
);
/* create the makefile.rc in file system
*/
- BOOL CreateRecursiveMakefile(
- BOOL bAllChilds = FALSE // create rcursive for all sub directories
+ sal_Bool CreateRecursiveMakefile(
+ sal_Bool bAllChilds = sal_False // create rcursive for all sub directories
);
};
@@ -286,7 +286,7 @@ public:
/* insert a new directory
*/
- ULONG InsertSorted(
+ sal_uIntPtr InsertSorted(
SourceDirectory *pDirectory // directory
)
{
diff --git a/tools/inc/bootstrp/prj.hxx b/tools/inc/bootstrp/prj.hxx
index 4b1ff91feb7b..9e16ab2ee9a3 100644
--- a/tools/inc/bootstrp/prj.hxx
+++ b/tools/inc/bootstrp/prj.hxx
@@ -52,7 +52,7 @@ public:
SimpleConfig(DirEntry& rDirEntry);
~SimpleConfig();
ByteString GetNext();
- ByteString GetCleanedNextLine( BOOL bReadComments = FALSE );
+ ByteString GetCleanedNextLine( sal_Bool bReadComments = sal_False );
};
#endif
diff --git a/tools/inc/impcont.hxx b/tools/inc/impcont.hxx
index 224d5a4429ef..9be0a909474d 100644
--- a/tools/inc/impcont.hxx
+++ b/tools/inc/impcont.hxx
@@ -42,8 +42,8 @@ class CBlock
private:
CBlock* pPrev; // Vorheriger Block
CBlock* pNext; // Naechster Block
- USHORT nSize; // Groesse des Blocks
- USHORT nCount; // Anzahl Pointer
+ sal_uInt16 nSize; // Groesse des Blocks
+ sal_uInt16 nCount; // Anzahl Pointer
void** pNodes; // Pointer auf die Daten
#if defined DBG_UTIL
@@ -52,26 +52,26 @@ private:
public:
// Fuer List-Container
- CBlock( USHORT nSize, CBlock* pPrev, CBlock* pNext );
+ CBlock( sal_uInt16 nSize, CBlock* pPrev, CBlock* pNext );
// Fuer Array-Container
- CBlock( USHORT nSize, CBlock* pPrev );
+ CBlock( sal_uInt16 nSize, CBlock* pPrev );
// Copy-Ctor
CBlock( const CBlock& r, CBlock* pPrev );
~CBlock();
- void Insert( void* p, USHORT nIndex, USHORT nReSize );
- CBlock* Split( void* p, USHORT nIndex, USHORT nReSize );
- void* Remove( USHORT nIndex, USHORT nReSize );
- void* Replace( void* pNew, USHORT nIndex );
+ void Insert( void* p, sal_uInt16 nIndex, sal_uInt16 nReSize );
+ CBlock* Split( void* p, sal_uInt16 nIndex, sal_uInt16 nReSize );
+ void* Remove( sal_uInt16 nIndex, sal_uInt16 nReSize );
+ void* Replace( void* pNew, sal_uInt16 nIndex );
void** GetNodes() const { return pNodes; }
- void** GetObjectPtr( USHORT nIndex );
- void* GetObject( USHORT nIndex ) const;
+ void** GetObjectPtr( sal_uInt16 nIndex );
+ void* GetObject( sal_uInt16 nIndex ) const;
- void SetSize( USHORT nNewSize );
+ void SetSize( sal_uInt16 nNewSize );
- USHORT GetSize() const { return nCount; }
- USHORT Count() const { return nCount; }
+ sal_uInt16 GetSize() const { return nCount; }
+ sal_uInt16 Count() const { return nCount; }
void SetPrevBlock( CBlock* p ) { pPrev = p; }
void SetNextBlock( CBlock* p ) { pNext = p; }
CBlock* GetPrevBlock() const { return pPrev; }
@@ -94,7 +94,7 @@ private:
|*
*************************************************************************/
-inline void* CBlock::GetObject( USHORT nIndex ) const
+inline void* CBlock::GetObject( sal_uInt16 nIndex ) const
{
return pNodes[nIndex];
}
@@ -111,11 +111,11 @@ inline void* CBlock::GetObject( USHORT nIndex ) const
|*
*************************************************************************/
-inline void* Container::ImpGetObject( ULONG nIndex ) const
+inline void* Container::ImpGetObject( sal_uIntPtr nIndex ) const
{
if ( pFirstBlock && (nIndex < pFirstBlock->Count()) )
// Item innerhalb des gefundenen Blocks zurueckgeben
- return pFirstBlock->GetObject( (USHORT)nIndex );
+ return pFirstBlock->GetObject( (sal_uInt16)nIndex );
else
return GetObject( nIndex );
}
diff --git a/tools/inc/poly.h b/tools/inc/poly.h
index 9228715b8da7..7876398c1876 100644
--- a/tools/inc/poly.h
+++ b/tools/inc/poly.h
@@ -30,7 +30,7 @@
#include <tools/gen.hxx>
-#define MAX_64KPOINTS ((((USHORT)0xFFFF)-32)/sizeof(Point))
+#define MAX_64KPOINTS ((((sal_uInt16)0xFFFF)-32)/sizeof(Point))
// -------------------
// - ImplPolygonData -
@@ -40,9 +40,9 @@ class ImplPolygonData
{
public:
Point* mpPointAry;
- BYTE* mpFlagAry;
- USHORT mnPoints;
- ULONG mnRefCount;
+ sal_uInt8* mpFlagAry;
+ sal_uInt16 mnPoints;
+ sal_uIntPtr mnRefCount;
};
// ---------------
@@ -52,22 +52,22 @@ public:
class ImplPolygon : public ImplPolygonData
{
public:
- ImplPolygon( USHORT nInitSize, BOOL bFlags = FALSE );
- ImplPolygon( USHORT nPoints, const Point* pPtAry, const BYTE* pInitFlags = NULL );
+ ImplPolygon( sal_uInt16 nInitSize, sal_Bool bFlags = sal_False );
+ ImplPolygon( sal_uInt16 nPoints, const Point* pPtAry, const sal_uInt8* pInitFlags = NULL );
ImplPolygon( const ImplPolygon& rImplPoly );
~ImplPolygon();
- void ImplSetSize( USHORT nSize, BOOL bResize = TRUE );
+ void ImplSetSize( sal_uInt16 nSize, sal_Bool bResize = sal_True );
void ImplCreateFlagArray();
- void ImplSplit( USHORT nPos, USHORT nSpace, ImplPolygon* pInitPoly = NULL );
- void ImplRemove( USHORT nPos, USHORT nCount );
+ void ImplSplit( sal_uInt16 nPos, sal_uInt16 nSpace, ImplPolygon* pInitPoly = NULL );
+ void ImplRemove( sal_uInt16 nPos, sal_uInt16 nCount );
};
// -------------------
// - ImplPolyPolygon -
// -------------------
-#define MAX_POLYGONS ((USHORT)0x3FF0)
+#define MAX_POLYGONS ((sal_uInt16)0x3FF0)
class Polygon;
typedef Polygon* SVPPOLYGON;
@@ -76,15 +76,15 @@ class ImplPolyPolygon
{
public:
SVPPOLYGON* mpPolyAry;
- ULONG mnRefCount;
- USHORT mnCount;
- USHORT mnSize;
- USHORT mnResize;
+ sal_uIntPtr mnRefCount;
+ sal_uInt16 mnCount;
+ sal_uInt16 mnSize;
+ sal_uInt16 mnResize;
- ImplPolyPolygon( USHORT nInitSize, USHORT nResize )
+ ImplPolyPolygon( sal_uInt16 nInitSize, sal_uInt16 nResize )
{ mpPolyAry = NULL; mnCount = 0; mnRefCount = 1;
mnSize = nInitSize; mnResize = nResize; }
- ImplPolyPolygon( USHORT nInitSize );
+ ImplPolyPolygon( sal_uInt16 nInitSize );
ImplPolyPolygon( const ImplPolyPolygon& rImplPolyPoly );
~ImplPolyPolygon();
};
diff --git a/tools/inc/tools/StringListResource.hxx b/tools/inc/tools/StringListResource.hxx
index 9709435407fb..3f7f6dcc610a 100644
--- a/tools/inc/tools/StringListResource.hxx
+++ b/tools/inc/tools/StringListResource.hxx
@@ -39,7 +39,7 @@ namespace tools
public:
StringListResource(const ResId& _aResId,::std::vector< ::rtl::OUString>& _rToFill ) : Resource(_aResId)
{
- USHORT i = 1;
+ sal_uInt16 i = 1;
while( IsAvailableRes(ResId(i,*m_pResMgr).SetRT(RSC_STRING)) )
{
String sStr = String(ResId(i,*m_pResMgr));
diff --git a/tools/inc/tools/bigint.hxx b/tools/inc/tools/bigint.hxx
index 353fbb063191..9a5f1e6de886 100644
--- a/tools/inc/tools/bigint.hxx
+++ b/tools/inc/tools/bigint.hxx
@@ -93,8 +93,8 @@ public:
operator long() const;
operator int() const;
operator double() const;
- operator USHORT() const;
- operator ULONG() const;
+ operator sal_uInt16() const;
+ operator sal_uIntPtr() const;
void Set( sal_Bool bSet ) { bIsSet = bSet; }
ByteString GetByteString() const;
@@ -199,10 +199,10 @@ inline BigInt::operator int() const
return 0;
}
-inline BigInt::operator USHORT() const
+inline BigInt::operator sal_uInt16() const
{
if ( !bIsBig && nVal >= 0 && nVal <= USHRT_MAX )
- return (USHORT)nVal;
+ return (sal_uInt16)nVal;
else
return 0;
}
diff --git a/tools/inc/tools/cachestr.hxx b/tools/inc/tools/cachestr.hxx
index 1819792bb386..26085fb49e8b 100644
--- a/tools/inc/tools/cachestr.hxx
+++ b/tools/inc/tools/cachestr.hxx
@@ -42,7 +42,7 @@ class TOOLS_DLLPUBLIC SvCacheStream : public SvStream
{
private:
String aFileName;
- ULONG nMaxSize;
+ sal_uIntPtr nMaxSize;
int bPersistent;
SvStream* pSwapStream;
@@ -51,17 +51,17 @@ private:
Link aFilenameLinkHdl;
- TOOLS_DLLPRIVATE virtual ULONG GetData( void* pData, ULONG nSize );
- TOOLS_DLLPRIVATE virtual ULONG PutData( const void* pData, ULONG nSize );
- TOOLS_DLLPRIVATE virtual ULONG SeekPos( ULONG nPos );
+ TOOLS_DLLPRIVATE virtual sal_uIntPtr GetData( void* pData, sal_uIntPtr nSize );
+ TOOLS_DLLPRIVATE virtual sal_uIntPtr PutData( const void* pData, sal_uIntPtr nSize );
+ TOOLS_DLLPRIVATE virtual sal_uIntPtr SeekPos( sal_uIntPtr nPos );
TOOLS_DLLPRIVATE virtual void FlushData();
- TOOLS_DLLPRIVATE virtual void SetSize( ULONG nSize );
+ TOOLS_DLLPRIVATE virtual void SetSize( sal_uIntPtr nSize );
public:
- SvCacheStream( ULONG nMaxMemSize = 0 );
+ SvCacheStream( sal_uIntPtr nMaxMemSize = 0 );
SvCacheStream( const String &rFileName,
- ULONG nExpectedSize = 0,
- ULONG nMaxMemSize = 0 );
+ sal_uIntPtr nExpectedSize = 0,
+ sal_uIntPtr nMaxMemSize = 0 );
~SvCacheStream();
void SetFilenameHdl( const Link& rLink);
@@ -72,10 +72,10 @@ public:
void SwapOut();
const void* GetBuffer();
- ULONG GetSize();
+ sal_uIntPtr GetSize();
- BOOL IsPersistent() { return bPersistent != 0; }
- void SetPersistence( BOOL b = TRUE ) { bPersistent = b; }
+ sal_Bool IsPersistent() { return bPersistent != 0; }
+ void SetPersistence( sal_Bool b = sal_True ) { bPersistent = b; }
void SetSwapStream( SvStream *p )
{ pSwapStream = p; } // darf nur vom FilenameHdl gerufen werden!
};
diff --git a/tools/inc/tools/color.hxx b/tools/inc/tools/color.hxx
index a99ad1dd11c4..ad34f1e9de08 100644
--- a/tools/inc/tools/color.hxx
+++ b/tools/inc/tools/color.hxx
@@ -41,24 +41,24 @@ class ResId;
// - ColorCount-Types -
// --------------------
-#define COLCOUNT_MONOCHROM ((ULONG)2)
-#define COLCOUNT_16 ((ULONG)16)
-#define COLCOUNT_256 ((ULONG)256)
-#define COLCOUNT_HICOLOR1 (((ULONG)0x00007FFF)+1)
-#define COLCOUNT_HICOLOR2 (((ULONG)0x0000FFFF)+1)
-#define COLCOUNT_TRUECOLOR (((ULONG)0x00FFFFFF)+1)
+#define COLCOUNT_MONOCHROM ((sal_uIntPtr)2)
+#define COLCOUNT_16 ((sal_uIntPtr)16)
+#define COLCOUNT_256 ((sal_uIntPtr)256)
+#define COLCOUNT_HICOLOR1 (((sal_uIntPtr)0x00007FFF)+1)
+#define COLCOUNT_HICOLOR2 (((sal_uIntPtr)0x0000FFFF)+1)
+#define COLCOUNT_TRUECOLOR (((sal_uIntPtr)0x00FFFFFF)+1)
// ---------------
// - Color-Types -
// ---------------
-typedef UINT32 ColorData;
-#define RGB_COLORDATA( r,g,b ) ((ColorData)(((UINT32)((UINT8)(b))))|(((UINT32)((UINT8)(g)))<<8)|(((UINT32)((UINT8)(r)))<<16))
-#define TRGB_COLORDATA( t,r,g,b ) ((ColorData)(((UINT32)((UINT8)(b))))|(((UINT32)((UINT8)(g)))<<8)|(((UINT32)((UINT8)(r)))<<16)|(((UINT32)((UINT8)(t)))<<24))
-#define COLORDATA_RED( n ) ((UINT8)((n)>>16))
-#define COLORDATA_GREEN( n ) ((UINT8)(((UINT16)(n)) >> 8))
-#define COLORDATA_BLUE( n ) ((UINT8)(n))
-#define COLORDATA_TRANSPARENCY( n ) ((UINT8)((n)>>24))
+typedef sal_uInt32 ColorData;
+#define RGB_COLORDATA( r,g,b ) ((ColorData)(((sal_uInt32)((sal_uInt8)(b))))|(((sal_uInt32)((sal_uInt8)(g)))<<8)|(((sal_uInt32)((sal_uInt8)(r)))<<16))
+#define TRGB_COLORDATA( t,r,g,b ) ((ColorData)(((sal_uInt32)((sal_uInt8)(b))))|(((sal_uInt32)((sal_uInt8)(g)))<<8)|(((sal_uInt32)((sal_uInt8)(r)))<<16)|(((sal_uInt32)((sal_uInt8)(t)))<<24))
+#define COLORDATA_RED( n ) ((sal_uInt8)((n)>>16))
+#define COLORDATA_GREEN( n ) ((sal_uInt8)(((sal_uInt16)(n)) >> 8))
+#define COLORDATA_BLUE( n ) ((sal_uInt8)(n))
+#define COLORDATA_TRANSPARENCY( n ) ((sal_uInt8)((n)>>24))
#define COLORDATA_RGB( n ) ((ColorData)((n) & 0x00FFFFFF))
#define COL_BLACK RGB_COLORDATA( 0x00, 0x00, 0x00 )
@@ -108,7 +108,7 @@ typedef UINT32 ColorData;
#define COL_AUTHOR9_LIGHT RGB_COLORDATA(255, 231, 199)
#define COLOR_CHANNEL_MERGE( _def_cDst, _def_cSrc, _def_cSrcTrans ) \
- ((BYTE)((((long)(_def_cDst)-(_def_cSrc))*(_def_cSrcTrans)+(((_def_cSrc)<<8L)|(_def_cDst)))>>8L))
+ ((sal_uInt8)((((long)(_def_cDst)-(_def_cSrc))*(_def_cSrcTrans)+(((_def_cSrc)<<8L)|(_def_cDst)))>>8L))
// ---------
// - Color -
@@ -122,9 +122,9 @@ protected:
public:
Color() { mnColor = COL_BLACK; }
Color( ColorData nColor ) { mnColor = nColor; }
- Color( UINT8 nRed, UINT8 nGreen, UINT8 nBlue )
+ Color( sal_uInt8 nRed, sal_uInt8 nGreen, sal_uInt8 nBlue )
{ mnColor = RGB_COLORDATA( nRed, nGreen, nBlue ); }
- Color( UINT8 nTransparency, UINT8 nRed, UINT8 nGreen, UINT8 nBlue )
+ Color( sal_uInt8 nTransparency, sal_uInt8 nRed, sal_uInt8 nGreen, sal_uInt8 nBlue )
{ mnColor = TRGB_COLORDATA( nTransparency, nRed, nGreen, nBlue ); }
Color( const ResId& rResId );
// This ctor is defined in svtools, not tools!
@@ -133,58 +133,58 @@ public:
explicit Color(const ::basegfx::BColor& rBColor)
{
mnColor = RGB_COLORDATA(
- UINT8((rBColor.getRed() * 255.0) + 0.5),
- UINT8((rBColor.getGreen() * 255.0) + 0.5),
- UINT8((rBColor.getBlue() * 255.0) + 0.5));
+ sal_uInt8((rBColor.getRed() * 255.0) + 0.5),
+ sal_uInt8((rBColor.getGreen() * 255.0) + 0.5),
+ sal_uInt8((rBColor.getBlue() * 255.0) + 0.5));
}
- void SetRed( UINT8 nRed );
- UINT8 GetRed() const { return COLORDATA_RED( mnColor ); }
- void SetGreen( UINT8 nGreen );
- UINT8 GetGreen() const { return COLORDATA_GREEN( mnColor ); }
- void SetBlue( UINT8 nBlue );
- UINT8 GetBlue() const { return COLORDATA_BLUE( mnColor ); }
- void SetTransparency( UINT8 nTransparency );
- UINT8 GetTransparency() const { return COLORDATA_TRANSPARENCY( mnColor ); }
+ void SetRed( sal_uInt8 nRed );
+ sal_uInt8 GetRed() const { return COLORDATA_RED( mnColor ); }
+ void SetGreen( sal_uInt8 nGreen );
+ sal_uInt8 GetGreen() const { return COLORDATA_GREEN( mnColor ); }
+ void SetBlue( sal_uInt8 nBlue );
+ sal_uInt8 GetBlue() const { return COLORDATA_BLUE( mnColor ); }
+ void SetTransparency( sal_uInt8 nTransparency );
+ sal_uInt8 GetTransparency() const { return COLORDATA_TRANSPARENCY( mnColor ); }
void SetColor( ColorData nColor ) { mnColor = nColor; }
ColorData GetColor() const { return mnColor; }
ColorData GetRGBColor() const { return COLORDATA_RGB( mnColor ); }
- UINT8 GetColorError( const Color& rCompareColor ) const;
+ sal_uInt8 GetColorError( const Color& rCompareColor ) const;
- UINT8 GetLuminance() const;
- void IncreaseLuminance( UINT8 cLumInc );
- void DecreaseLuminance( UINT8 cLumDec );
+ sal_uInt8 GetLuminance() const;
+ void IncreaseLuminance( sal_uInt8 cLumInc );
+ void DecreaseLuminance( sal_uInt8 cLumDec );
- void IncreaseContrast( UINT8 cContInc );
- void DecreaseContrast( UINT8 cContDec );
+ void IncreaseContrast( sal_uInt8 cContInc );
+ void DecreaseContrast( sal_uInt8 cContDec );
void Invert();
- void Merge( const Color& rMergeColor, BYTE cTransparency );
+ void Merge( const Color& rMergeColor, sal_uInt8 cTransparency );
- BOOL IsRGBEqual( const Color& rColor ) const;
+ sal_Bool IsRGBEqual( const Color& rColor ) const;
// comparison with luminance thresholds
- BOOL IsDark() const;
- BOOL IsBright() const;
+ sal_Bool IsDark() const;
+ sal_Bool IsBright() const;
// color space conversion tools
// the range for h/s/b is:
// Hue: 0-360 degree
// Saturation: 0-100 %
// Brightness: 0-100 %
- static ColorData HSBtoRGB( USHORT nHue, USHORT nSat, USHORT nBri );
- void RGBtoHSB( USHORT& nHue, USHORT& nSat, USHORT& nBri ) const;
+ static ColorData HSBtoRGB( sal_uInt16 nHue, sal_uInt16 nSat, sal_uInt16 nBri );
+ void RGBtoHSB( sal_uInt16& nHue, sal_uInt16& nSat, sal_uInt16& nBri ) const;
- BOOL operator==( const Color& rColor ) const
+ sal_Bool operator==( const Color& rColor ) const
{ return (mnColor == rColor.mnColor); }
- BOOL operator!=( const Color& rColor ) const
+ sal_Bool operator!=( const Color& rColor ) const
{ return !(Color::operator==( rColor )); }
- SvStream& Read( SvStream& rIStm, BOOL bNewFormat = TRUE );
- SvStream& Write( SvStream& rOStm, BOOL bNewFormat = TRUE );
+ SvStream& Read( SvStream& rIStm, sal_Bool bNewFormat = sal_True );
+ SvStream& Write( SvStream& rOStm, sal_Bool bNewFormat = sal_True );
TOOLS_DLLPUBLIC friend SvStream& operator>>( SvStream& rIStream, Color& rColor );
TOOLS_DLLPUBLIC friend SvStream& operator<<( SvStream& rOStream, const Color& rColor );
@@ -193,43 +193,43 @@ public:
::basegfx::BColor getBColor() const { return ::basegfx::BColor(GetRed() / 255.0, GetGreen() / 255.0, GetBlue() / 255.0); }
};
-inline void Color::SetRed( UINT8 nRed )
+inline void Color::SetRed( sal_uInt8 nRed )
{
mnColor &= 0xFF00FFFF;
- mnColor |= ((UINT32)nRed)<<16;
+ mnColor |= ((sal_uInt32)nRed)<<16;
}
-inline void Color::SetGreen( UINT8 nGreen )
+inline void Color::SetGreen( sal_uInt8 nGreen )
{
mnColor &= 0xFFFF00FF;
- mnColor |= ((UINT16)nGreen)<<8;
+ mnColor |= ((sal_uInt16)nGreen)<<8;
}
-inline void Color::SetBlue( UINT8 nBlue )
+inline void Color::SetBlue( sal_uInt8 nBlue )
{
mnColor &= 0xFFFFFF00;
mnColor |= nBlue;
}
-inline void Color::SetTransparency( UINT8 nTransparency )
+inline void Color::SetTransparency( sal_uInt8 nTransparency )
{
mnColor &= 0x00FFFFFF;
- mnColor |= ((UINT32)nTransparency)<<24;
+ mnColor |= ((sal_uInt32)nTransparency)<<24;
}
-inline BOOL Color::IsRGBEqual( const Color& rColor ) const
+inline sal_Bool Color::IsRGBEqual( const Color& rColor ) const
{
return (COLORDATA_RGB( mnColor ) == COLORDATA_RGB( rColor.mnColor ));
}
-inline UINT8 Color::GetLuminance() const
+inline sal_uInt8 Color::GetLuminance() const
{
- return( (UINT8) ( ( COLORDATA_BLUE( mnColor ) * 28UL +
+ return( (sal_uInt8) ( ( COLORDATA_BLUE( mnColor ) * 28UL +
COLORDATA_GREEN( mnColor ) * 151UL +
COLORDATA_RED( mnColor ) * 77UL ) >> 8UL ) );
}
-inline void Color::Merge( const Color& rMergeColor, BYTE cTransparency )
+inline void Color::Merge( const Color& rMergeColor, sal_uInt8 cTransparency )
{
SetRed( COLOR_CHANNEL_MERGE( COLORDATA_RED( mnColor ), COLORDATA_RED( rMergeColor.mnColor ), cTransparency ) );
SetGreen( COLOR_CHANNEL_MERGE( COLORDATA_GREEN( mnColor ), COLORDATA_GREEN( rMergeColor.mnColor ), cTransparency ) );
diff --git a/tools/inc/tools/config.hxx b/tools/inc/tools/config.hxx
index cb64cc2ec5bd..d0df492f5488 100644
--- a/tools/inc/tools/config.hxx
+++ b/tools/inc/tools/config.hxx
@@ -44,13 +44,13 @@ private:
ByteString maGroupName;
ImplConfigData* mpData;
ImplGroupData* mpActGroup;
- ULONG mnDataUpdateId;
- USHORT mnLockCount;
- BOOL mbPersistence;
- BOOL mbDummy1;
+ sal_uIntPtr mnDataUpdateId;
+ sal_uInt16 mnLockCount;
+ sal_Bool mbPersistence;
+ sal_Bool mbDummy1;
#ifdef _CONFIG_CXX
- TOOLS_DLLPRIVATE BOOL ImplUpdateConfig() const;
+ TOOLS_DLLPRIVATE sal_Bool ImplUpdateConfig() const;
TOOLS_DLLPRIVATE ImplGroupData* ImplGetGroup() const;
#endif
@@ -66,9 +66,9 @@ public:
void SetGroup( const ByteString& rGroup );
const ByteString& GetGroup() const { return maGroupName; }
void DeleteGroup( const ByteString& rGroup );
- ByteString GetGroupName( USHORT nGroup ) const;
- USHORT GetGroupCount() const;
- BOOL HasGroup( const ByteString& rGroup ) const;
+ ByteString GetGroupName( sal_uInt16 nGroup ) const;
+ sal_uInt16 GetGroupCount() const;
+ sal_Bool HasGroup( const ByteString& rGroup ) const;
ByteString ReadKey( const ByteString& rKey ) const;
UniString ReadKey( const ByteString& rKey, rtl_TextEncoding eEncoding ) const;
@@ -76,19 +76,19 @@ public:
void WriteKey( const ByteString& rKey, const ByteString& rValue );
void WriteKey( const ByteString& rKey, const UniString& rValue, rtl_TextEncoding eEncoding );
void DeleteKey( const ByteString& rKey );
- ByteString GetKeyName( USHORT nKey ) const;
- ByteString ReadKey( USHORT nKey ) const;
- USHORT GetKeyCount() const;
+ ByteString GetKeyName( sal_uInt16 nKey ) const;
+ ByteString ReadKey( sal_uInt16 nKey ) const;
+ sal_uInt16 GetKeyCount() const;
void EnterLock();
void LeaveLock();
- BOOL IsLocked() const { return (mnLockCount != 0); }
- BOOL Update();
+ sal_Bool IsLocked() const { return (mnLockCount != 0); }
+ sal_Bool Update();
void Flush();
- void EnablePersistence( BOOL bPersistence = TRUE )
+ void EnablePersistence( sal_Bool bPersistence = sal_True )
{ mbPersistence = bPersistence; }
- BOOL IsPersistenceEnabled() const { return mbPersistence; }
+ sal_Bool IsPersistenceEnabled() const { return mbPersistence; }
void SetLineEnd( LineEnd eLineEnd );
LineEnd GetLineEnd() const;
diff --git a/tools/inc/tools/contnr.hxx b/tools/inc/tools/contnr.hxx
index 5cf8e7b74569..804482afaea5 100644
--- a/tools/inc/tools/contnr.hxx
+++ b/tools/inc/tools/contnr.hxx
@@ -39,7 +39,7 @@ class CBlock;
// -------------
// Maximale Blockgroesse
-#define CONTAINER_MAXBLOCKSIZE ((USHORT)0x3FF0)
+#define CONTAINER_MAXBLOCKSIZE ((sal_uInt16)0x3FF0)
#define CONTAINER_APPEND ULONG_MAX
#define CONTAINER_ENTRY_NOTFOUND ULONG_MAX
@@ -50,11 +50,11 @@ private:
CBlock* pFirstBlock;
CBlock* pCurBlock;
CBlock* pLastBlock;
- USHORT nCurIndex;
- USHORT nBlockSize;
- USHORT nInitSize;
- USHORT nReSize;
- ULONG nCount;
+ sal_uInt16 nCurIndex;
+ sal_uInt16 nBlockSize;
+ sal_uInt16 nInitSize;
+ sal_uInt16 nReSize;
+ sal_uIntPtr nCount;
TOOLS_DLLPRIVATE void ImpCopyContainer(Container const *);
#if defined DBG_UTIL
@@ -63,49 +63,49 @@ private:
protected:
#ifdef _IMPCONT_HXX
- void ImpInsert( void* p, CBlock* pBlock, USHORT nIndex );
- void* ImpRemove( CBlock* pBlock, USHORT nIndex );
- void* ImpGetObject( ULONG nIndex ) const;
+ void ImpInsert( void* p, CBlock* pBlock, sal_uInt16 nIndex );
+ void* ImpRemove( CBlock* pBlock, sal_uInt16 nIndex );
+ void* ImpGetObject( sal_uIntPtr nIndex ) const;
void** ImpGetOnlyNodes() const;
#endif
- void** GetObjectPtr( ULONG nIndex );
+ void** GetObjectPtr( sal_uIntPtr nIndex );
public:
- Container( USHORT nBlockSize,
- USHORT nInitSize,
- USHORT nReSize );
- Container( ULONG nSize );
+ Container( sal_uInt16 nBlockSize,
+ sal_uInt16 nInitSize,
+ sal_uInt16 nReSize );
+ Container( sal_uIntPtr nSize );
Container( const Container& rContainer );
~Container();
void Insert( void* p );
- void Insert( void* p, ULONG nIndex );
+ void Insert( void* p, sal_uIntPtr nIndex );
void Insert( void* pNew, void* pOld );
void* Remove();
- void* Remove( ULONG nIndex );
+ void* Remove( sal_uIntPtr nIndex );
void* Remove( void* p )
{ return Remove( GetPos( p ) ); }
void* Replace( void* p );
- void* Replace( void* p, ULONG nIndex );
+ void* Replace( void* p, sal_uIntPtr nIndex );
void* Replace( void* pNew, void* pOld )
{ return Replace( pNew, GetPos( pOld ) ); }
- void SetSize( ULONG nNewSize );
- ULONG GetSize() const { return nCount; }
+ void SetSize( sal_uIntPtr nNewSize );
+ sal_uIntPtr GetSize() const { return nCount; }
- ULONG Count() const { return nCount; }
+ sal_uIntPtr Count() const { return nCount; }
void Clear();
void* GetCurObject() const;
- ULONG GetCurPos() const;
- void* GetObject( ULONG nIndex ) const;
- ULONG GetPos( const void* p ) const;
- ULONG GetPos( const void* p, ULONG nStartIndex,
- BOOL bForward = TRUE ) const;
+ sal_uIntPtr GetCurPos() const;
+ void* GetObject( sal_uIntPtr nIndex ) const;
+ sal_uIntPtr GetPos( const void* p ) const;
+ sal_uIntPtr GetPos( const void* p, sal_uIntPtr nStartIndex,
+ sal_Bool bForward = sal_True ) const;
- void* Seek( ULONG nIndex );
+ void* Seek( sal_uIntPtr nIndex );
void* Seek( void* p ) { return Seek( GetPos( p ) ); }
void* First();
@@ -115,8 +115,8 @@ public:
Container& operator =( const Container& rContainer );
- BOOL operator ==( const Container& rContainer ) const;
- BOOL operator !=( const Container& rContainer ) const
+ sal_Bool operator ==( const Container& rContainer ) const;
+ sal_Bool operator !=( const Container& rContainer ) const
{ return !(Container::operator==( rContainer )); }
};
diff --git a/tools/inc/tools/date.hxx b/tools/inc/tools/date.hxx
index 50b31edb0f83..6e4a2291d954 100644
--- a/tools/inc/tools/date.hxx
+++ b/tools/inc/tools/date.hxx
@@ -54,7 +54,7 @@ public:
Date( sal_uInt32 _nDate ) { Date::nDate = _nDate; }
Date( const Date& rDate )
{ nDate = rDate.nDate; }
- Date( USHORT nDay, USHORT nMonth, USHORT nYear )
+ Date( sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear )
{ nDate = ( sal_uInt32( nDay % 100 ) ) +
( ( sal_uInt32( nMonth % 100 ) ) * 100 ) +
( ( sal_uInt32( nYear % 10000 ) ) * 10000); }
@@ -62,40 +62,40 @@ public:
void SetDate( sal_uInt32 nNewDate ) { nDate = nNewDate; }
sal_uInt32 GetDate() const { return nDate; }
- void SetDay( USHORT nNewDay );
- void SetMonth( USHORT nNewMonth );
- void SetYear( USHORT nNewYear );
- USHORT GetDay() const { return (USHORT)(nDate % 100); }
- USHORT GetMonth() const { return (USHORT)((nDate / 100) % 100); }
- USHORT GetYear() const { return (USHORT)(nDate / 10000); }
+ void SetDay( sal_uInt16 nNewDay );
+ void SetMonth( sal_uInt16 nNewMonth );
+ void SetYear( sal_uInt16 nNewYear );
+ sal_uInt16 GetDay() const { return (sal_uInt16)(nDate % 100); }
+ sal_uInt16 GetMonth() const { return (sal_uInt16)((nDate / 100) % 100); }
+ sal_uInt16 GetYear() const { return (sal_uInt16)(nDate / 10000); }
DayOfWeek GetDayOfWeek() const;
- USHORT GetDayOfYear() const;
+ sal_uInt16 GetDayOfYear() const;
/** nMinimumNumberOfDaysInWeek: how many days of a week must reside in the
first week of a year. */
- USHORT GetWeekOfYear( DayOfWeek eStartDay = MONDAY,
+ sal_uInt16 GetWeekOfYear( DayOfWeek eStartDay = MONDAY,
sal_Int16 nMinimumNumberOfDaysInWeek = 4 ) const;
- USHORT GetDaysInMonth() const;
- USHORT GetDaysInYear() const { return (IsLeapYear()) ? 366 : 365; }
- BOOL IsLeapYear() const;
- BOOL IsValid() const;
+ sal_uInt16 GetDaysInMonth() const;
+ sal_uInt16 GetDaysInYear() const { return (IsLeapYear()) ? 366 : 365; }
+ sal_Bool IsLeapYear() const;
+ sal_Bool IsValid() const;
- BOOL IsBetween( const Date& rFrom, const Date& rTo ) const
+ sal_Bool IsBetween( const Date& rFrom, const Date& rTo ) const
{ return ((nDate >= rFrom.nDate) &&
(nDate <= rTo.nDate)); }
- BOOL operator ==( const Date& rDate ) const
+ sal_Bool operator ==( const Date& rDate ) const
{ return (nDate == rDate.nDate); }
- BOOL operator !=( const Date& rDate ) const
+ sal_Bool operator !=( const Date& rDate ) const
{ return (nDate != rDate.nDate); }
- BOOL operator >( const Date& rDate ) const
+ sal_Bool operator >( const Date& rDate ) const
{ return (nDate > rDate.nDate); }
- BOOL operator <( const Date& rDate ) const
+ sal_Bool operator <( const Date& rDate ) const
{ return (nDate < rDate.nDate); }
- BOOL operator >=( const Date& rDate ) const
+ sal_Bool operator >=( const Date& rDate ) const
{ return (nDate >= rDate.nDate); }
- BOOL operator <=( const Date& rDate ) const
+ sal_Bool operator <=( const Date& rDate ) const
{ return (nDate <= rDate.nDate); }
Date& operator =( const Date& rDate )
@@ -113,7 +113,7 @@ public:
TOOLS_DLLPUBLIC friend Date operator -( const Date& rDate, long nDays );
TOOLS_DLLPUBLIC friend long operator -( const Date& rDate1, const Date& rDate2 );
- static long DateToDays( USHORT nDay, USHORT nMonth, USHORT nYear );
+ static long DateToDays( sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear );
};
diff --git a/tools/inc/tools/datetime.hxx b/tools/inc/tools/datetime.hxx
index 1a782486250b..c642045c0e76 100644
--- a/tools/inc/tools/datetime.hxx
+++ b/tools/inc/tools/datetime.hxx
@@ -47,29 +47,29 @@ public:
DateTime( const Date& rDate, const Time& rTime ) :
Date( rDate ), Time( rTime ) {}
- BOOL IsBetween( const DateTime& rFrom,
+ sal_Bool IsBetween( const DateTime& rFrom,
const DateTime& rTo ) const;
- BOOL IsEqualIgnore100Sec( const DateTime& rDateTime ) const
+ sal_Bool IsEqualIgnore100Sec( const DateTime& rDateTime ) const
{
if ( Date::operator!=( rDateTime ) )
- return FALSE;
+ return sal_False;
return Time::IsEqualIgnore100Sec( rDateTime );
}
- BOOL operator ==( const DateTime& rDateTime ) const
+ sal_Bool operator ==( const DateTime& rDateTime ) const
{ return (Date::operator==( rDateTime ) &&
Time::operator==( rDateTime )); }
- BOOL operator !=( const DateTime& rDateTime ) const
+ sal_Bool operator !=( const DateTime& rDateTime ) const
{ return (Date::operator!=( rDateTime ) ||
Time::operator!=( rDateTime )); }
- BOOL operator >( const DateTime& rDateTime ) const;
- BOOL operator <( const DateTime& rDateTime ) const;
- BOOL operator >=( const DateTime& rDateTime ) const;
- BOOL operator <=( const DateTime& rDateTime ) const;
+ sal_Bool operator >( const DateTime& rDateTime ) const;
+ sal_Bool operator <( const DateTime& rDateTime ) const;
+ sal_Bool operator >=( const DateTime& rDateTime ) const;
+ sal_Bool operator <=( const DateTime& rDateTime ) const;
long GetSecFromDateTime( const Date& rDate ) const;
- void MakeDateTimeFromSec( const Date& rDate, ULONG nSec );
+ void MakeDateTimeFromSec( const Date& rDate, sal_uIntPtr nSec );
void ConvertToUTC() { *this -= Time::GetUTCOffset(); }
void ConvertToLocalTime() { *this += Time::GetUTCOffset(); }
diff --git a/tools/inc/tools/debug.hxx b/tools/inc/tools/debug.hxx
index b8aa1c8b59fe..4d640642c69d 100644
--- a/tools/inc/tools/debug.hxx
+++ b/tools/inc/tools/debug.hxx
@@ -93,15 +93,15 @@ typedef void (*DbgTestSolarMutexProc)();
struct DbgData
{
- ULONG nTestFlags;
- ULONG bOverwrite;
- ULONG nTraceOut;
- ULONG nWarningOut;
- ULONG nErrorOut;
- ULONG bHookOSLAssert;
- BYTE bMemInit;
- BYTE bMemBound;
- BYTE bMemFree;
+ sal_uIntPtr nTestFlags;
+ sal_uIntPtr bOverwrite;
+ sal_uIntPtr nTraceOut;
+ sal_uIntPtr nWarningOut;
+ sal_uIntPtr nErrorOut;
+ sal_uIntPtr bHookOSLAssert;
+ sal_uInt8 bMemInit;
+ sal_uInt8 bMemBound;
+ sal_uInt8 bMemFree;
sal_Char aDebugName[260];
sal_Char aInclFilter[512];
sal_Char aExclFilter[512];
@@ -138,7 +138,7 @@ struct DbgDataType
#define DBG_FUNC_FILTERMESSAGE 18 // new for #i38967
#define DBG_FUNC_UPDATEOSLHOOK 19
-TOOLS_DLLPUBLIC void* DbgFunc( USHORT nAction, void* pData = NULL );
+TOOLS_DLLPUBLIC void* DbgFunc( sal_uInt16 nAction, void* pData = NULL );
inline void DbgUpdateOslHook( DbgData* pData )
{
@@ -180,7 +180,7 @@ inline void DbgSetPrintTestTool( DbgPrintLine pProc )
DbgFunc( DBG_FUNC_SETPRINTTESTTOOL, (void*)(long)pProc );
}
-typedef USHORT DbgChannelId;
+typedef sal_uInt16 DbgChannelId;
/** registers a user-defined channel for emitting the diagnostic messages
Note that such a user-defined channel cannot be revoked during the lifetime
@@ -199,9 +199,9 @@ typedef USHORT DbgChannelId;
*/
TOOLS_DLLPUBLIC DbgChannelId DbgRegisterUserChannel( DbgPrintLine pProc );
-inline BOOL DbgFilterMessage( const char* pMsg )
+inline sal_Bool DbgFilterMessage( const char* pMsg )
{
- return (BOOL)(long) DbgFunc( DBG_FUNC_FILTERMESSAGE, (void*)pMsg );
+ return (sal_Bool)(long) DbgFunc( DBG_FUNC_FILTERMESSAGE, (void*)pMsg );
}
inline int DbgIsAllErrorOut()
@@ -219,34 +219,34 @@ inline void DbgSaveData( const DbgData& rData )
DbgFunc( DBG_FUNC_SAVEDATA, (void*)&rData );
}
-inline ULONG DbgIsTraceOut()
+inline sal_uIntPtr DbgIsTraceOut()
{
DbgData* pData = DbgGetData();
if ( pData )
return (pData->nTraceOut != DBG_OUT_NULL);
else
- return FALSE;
+ return sal_False;
}
-inline ULONG DbgIsWarningOut()
+inline sal_uIntPtr DbgIsWarningOut()
{
DbgData* pData = DbgGetData();
if ( pData )
return (pData->nWarningOut != DBG_OUT_NULL);
else
- return FALSE;
+ return sal_False;
}
-inline ULONG DbgIsErrorOut()
+inline sal_uIntPtr DbgIsErrorOut()
{
DbgData* pData = DbgGetData();
if ( pData )
return (pData->nErrorOut != DBG_OUT_NULL);
else
- return FALSE;
+ return sal_False;
}
-inline ULONG DbgGetErrorOut() // Testtool: test wether to collect OSL_ASSERTions as well
+inline sal_uIntPtr DbgGetErrorOut() // Testtool: test wether to collect OSL_ASSERTions as well
{
DbgData* pData = DbgGetData();
if ( pData )
@@ -255,41 +255,41 @@ inline ULONG DbgGetErrorOut() // Testtool: test wether to collect OSL_ASSERTio
return DBG_OUT_NULL;
}
-inline ULONG DbgIsAssertWarning()
+inline sal_uIntPtr DbgIsAssertWarning()
{
return DbgIsWarningOut();
}
-inline ULONG DbgIsAssert()
+inline sal_uIntPtr DbgIsAssert()
{
return DbgIsErrorOut();
}
-inline ULONG DbgIsResource()
+inline sal_uIntPtr DbgIsResource()
{
DbgData* pData = DbgGetData();
if ( pData )
return pData->nTestFlags & DBG_TEST_RESOURCE;
else
- return FALSE;
+ return sal_False;
}
-inline ULONG DbgIsDialog()
+inline sal_uIntPtr DbgIsDialog()
{
DbgData* pData = DbgGetData();
if ( pData )
return pData->nTestFlags & DBG_TEST_DIALOG;
else
- return FALSE;
+ return sal_False;
}
-inline ULONG DbgIsBoldAppFont()
+inline sal_uIntPtr DbgIsBoldAppFont()
{
DbgData* pData = DbgGetData();
if ( pData )
return pData->nTestFlags & DBG_TEST_BOLDAPPFONT;
else
- return FALSE;
+ return sal_False;
}
inline void DbgXtorInfo( sal_Char* pBuf )
@@ -326,8 +326,8 @@ inline void DbgPrintFile( const sal_Char* pLine )
TOOLS_DLLPUBLIC void DbgStartStackTree();
TOOLS_DLLPUBLIC void DbgEndStackTree();
-void* DbgGetStackTree( ULONG nAlloc = 0 );
-void DbgFreeStackTree( void* p, ULONG nAlloc = 0 );
+void* DbgGetStackTree( sal_uIntPtr nAlloc = 0 );
+void DbgFreeStackTree( void* p, sal_uIntPtr nAlloc = 0 );
void DbgPrintStackTree( void* p );
// --- Dbg-Output ---
@@ -336,27 +336,27 @@ void DbgPrintStackTree( void* p );
#define DBG_OUT_WARNING 2
#define DBG_OUT_ERROR 3
-TOOLS_DLLPUBLIC void DbgOut( const sal_Char* pMsg, USHORT nOutType = DBG_OUT_TRACE,
- const sal_Char* pFile = NULL, USHORT nLine = 0 );
+TOOLS_DLLPUBLIC void DbgOut( const sal_Char* pMsg, sal_uInt16 nOutType = DBG_OUT_TRACE,
+ const sal_Char* pFile = NULL, sal_uInt16 nLine = 0 );
TOOLS_DLLPUBLIC void DbgPrintShell(char const * message);
-TOOLS_DLLPUBLIC void DbgOutTypef( USHORT nOutType, const sal_Char* pFStr, ... );
+TOOLS_DLLPUBLIC void DbgOutTypef( sal_uInt16 nOutType, const sal_Char* pFStr, ... );
TOOLS_DLLPUBLIC void DbgOutf( const sal_Char* pFStr, ... );
TOOLS_DLLPUBLIC void ImpDbgOutfBuf( sal_Char* pBuf, const sal_Char* pFStr, ... );
inline void DbgTrace( const sal_Char* pMsg,
- const sal_Char* pFile = NULL, USHORT nLine = 0 )
+ const sal_Char* pFile = NULL, sal_uInt16 nLine = 0 )
{
DbgOut( pMsg, DBG_OUT_TRACE, pFile, nLine );
}
inline void DbgWarning( const sal_Char* pMsg,
- const sal_Char* pFile = NULL, USHORT nLine = 0 )
+ const sal_Char* pFile = NULL, sal_uInt16 nLine = 0 )
{
DbgOut( pMsg, DBG_OUT_WARNING, pFile, nLine );
}
inline void DbgError( const sal_Char* pMsg,
- const sal_Char* pFile = NULL, USHORT nLine = 0 )
+ const sal_Char* pFile = NULL, sal_uInt16 nLine = 0 )
{
DbgOut( pMsg, DBG_OUT_ERROR, pFile, nLine );
}
@@ -373,7 +373,7 @@ inline void DbgMemTest( void* p = NULL )
#define DBG_PROF_CONTINUE 3
#define DBG_PROF_PAUSE 4
-TOOLS_DLLPUBLIC void DbgProf( USHORT nAction, DbgDataType* );
+TOOLS_DLLPUBLIC void DbgProf( sal_uInt16 nAction, DbgDataType* );
#define DBG_XTOR_CTOR 1
#define DBG_XTOR_DTOR 2
@@ -382,7 +382,7 @@ TOOLS_DLLPUBLIC void DbgProf( USHORT nAction, DbgDataType* );
#define DBG_XTOR_DTOROBJ 0x8000
TOOLS_DLLPUBLIC void DbgXtor( DbgDataType* pDbgData,
- USHORT nAction, const void* pThis, DbgUsr fDbgUsr );
+ sal_uInt16 nAction, const void* pThis, DbgUsr fDbgUsr );
class DbgXtorObj
{
@@ -390,11 +390,11 @@ private:
DbgDataType* pDbgData;
const void* pThis;
DbgUsr fDbgUsr;
- USHORT nAction;
+ sal_uInt16 nAction;
public:
DbgXtorObj( DbgDataType* pData,
- USHORT nAct, const void* pThs, DbgUsr fUsr )
+ sal_uInt16 nAct, const void* pThs, DbgUsr fUsr )
{
DbgXtor( pData, nAct, pThs, fUsr );
pDbgData = pData;
diff --git a/tools/inc/tools/dynary.hxx b/tools/inc/tools/dynary.hxx
index 1693be40e435..d7ed083b8e44 100644
--- a/tools/inc/tools/dynary.hxx
+++ b/tools/inc/tools/dynary.hxx
@@ -44,26 +44,26 @@ public:
using Container::GetSize;
using Container::Clear;
- DynArray( ULONG nSize = 16 ) : Container( nSize ) {}
+ DynArray( sal_uIntPtr nSize = 16 ) : Container( nSize ) {}
DynArray( const DynArray& rAry ) : Container( rAry ) {}
- void* Put( ULONG nIndex, void* p )
+ void* Put( sal_uIntPtr nIndex, void* p )
{ return Container::Replace( p, nIndex ); }
- void* Get( ULONG nIndex ) const
+ void* Get( sal_uIntPtr nIndex ) const
{ return Container::GetObject( nIndex ); }
- ULONG GetIndex( const void* p ) const
+ sal_uIntPtr GetIndex( const void* p ) const
{ return Container::GetPos( p ); }
- ULONG GetIndex( const void* p, ULONG nStartIndex,
- BOOL bForward = TRUE ) const
+ sal_uIntPtr GetIndex( const void* p, sal_uIntPtr nStartIndex,
+ sal_Bool bForward = sal_True ) const
{ return Container::GetPos( p, nStartIndex, bForward ); }
DynArray& operator =( const DynArray& rAry )
{ Container::operator =( rAry ); return *this; }
- BOOL operator ==( const DynArray& rAry ) const
+ sal_Bool operator ==( const DynArray& rAry ) const
{ return Container::operator ==( rAry ); }
- BOOL operator !=( const DynArray& rAry ) const
+ sal_Bool operator !=( const DynArray& rAry ) const
{ return Container::operator !=( rAry ); }
};
@@ -79,20 +79,20 @@ public: \
using DynArray::GetSize; \
using DynArray::Clear; \
\
- ClassName( ULONG nSize = 16 ) : \
+ ClassName( sal_uIntPtr nSize = 16 ) : \
DynArray( nSize ) {} \
ClassName( const ClassName& rClassName ) : \
DynArray( rClassName ) {} \
\
- Type Put( ULONG nIndex, Type p ) \
+ Type Put( sal_uIntPtr nIndex, Type p ) \
{ return (Type)DynArray::Put( nIndex, (void*)p ); } \
- Type Get( ULONG nIndex ) const \
+ Type Get( sal_uIntPtr nIndex ) const \
{ return (Type)DynArray::Get( nIndex ); } \
\
- ULONG GetIndex( const Type p ) const \
+ sal_uIntPtr GetIndex( const Type p ) const \
{ return DynArray::GetIndex( (const void*)p ); } \
- ULONG GetIndex( const Type p, ULONG nStartIndex, \
- BOOL bForward = TRUE ) const \
+ sal_uIntPtr GetIndex( const Type p, sal_uIntPtr nStartIndex, \
+ sal_Bool bForward = sal_True ) const \
{ return DynArray::GetIndex( (const void*)p, \
nStartIndex, \
bForward ); } \
@@ -101,9 +101,9 @@ public: \
{ DynArray::operator =( rClassName ); \
return *this; } \
\
- BOOL operator ==( const ClassName& rAry ) const \
+ sal_Bool operator ==( const ClassName& rAry ) const \
{ return DynArray::operator ==( rAry ); } \
- BOOL operator !=( const ClassName& rAry ) const \
+ sal_Bool operator !=( const ClassName& rAry ) const \
{ return DynArray::operator !=( rAry ); } \
};
diff --git a/tools/inc/tools/errcode.hxx b/tools/inc/tools/errcode.hxx
index cf767b842b7a..404ce7bd6e34 100644
--- a/tools/inc/tools/errcode.hxx
+++ b/tools/inc/tools/errcode.hxx
@@ -95,14 +95,14 @@ Warning || || |
#else
-typedef ULONG ErrCode;
+typedef sal_uIntPtr ErrCode;
-inline ULONG ERRCODE_TOERRID( ULONG x )
+inline sal_uIntPtr ERRCODE_TOERRID( sal_uIntPtr x )
{
return x & ~ERRCODE_DYNAMIC_MASK;
}
-inline ULONG ERRCODE_TOERROR( ULONG x )
+inline sal_uIntPtr ERRCODE_TOERROR( sal_uIntPtr x )
{
return ((x & ERRCODE_WARNING_MASK) ? 0 : (x & ERRCODE_ERROR_MASK));
}
diff --git a/tools/inc/tools/errinf.hxx b/tools/inc/tools/errinf.hxx
index 45141af278b1..e059a7add067 100644
--- a/tools/inc/tools/errinf.hxx
+++ b/tools/inc/tools/errinf.hxx
@@ -47,18 +47,18 @@ class Window;
class ErrorInfo
{
private:
- ULONG lUserId;
+ sal_uIntPtr lUserId;
public:
TYPEINFO();
- ErrorInfo( ULONG lArgUserId ) :
+ ErrorInfo( sal_uIntPtr lArgUserId ) :
lUserId( lArgUserId ){}
virtual ~ErrorInfo(){}
- ULONG GetErrorCode() const { return lUserId; }
+ sal_uIntPtr GetErrorCode() const { return lUserId; }
- static ErrorInfo* GetErrorInfo(ULONG);
+ static ErrorInfo* GetErrorInfo(sal_uIntPtr);
};
@@ -76,11 +76,11 @@ private:
public:
TYPEINFO();
- DynamicErrorInfo(ULONG lUserId, USHORT nMask);
+ DynamicErrorInfo(sal_uIntPtr lUserId, sal_uInt16 nMask);
virtual ~DynamicErrorInfo();
- operator ULONG() const;
- USHORT GetDialogMask() const;
+ operator sal_uIntPtr() const;
+ sal_uInt16 GetDialogMask() const;
};
@@ -91,14 +91,14 @@ public:
class StandardErrorInfo : public DynamicErrorInfo
{
private:
- ULONG lExtId;
+ sal_uIntPtr lExtId;
public:
TYPEINFO();
- StandardErrorInfo( ULONG lUserId, ULONG lExtId,
- USHORT nFlags = 0);
- ULONG GetExtendedErrorCode() const { return lExtId; }
+ StandardErrorInfo( sal_uIntPtr lUserId, sal_uIntPtr lExtId,
+ sal_uInt16 nFlags = 0);
+ sal_uIntPtr GetExtendedErrorCode() const { return lExtId; }
};
@@ -115,9 +115,9 @@ private:
public:
TYPEINFO();
- StringErrorInfo( ULONG lUserId,
+ StringErrorInfo( sal_uIntPtr lUserId,
const String& aStringP,
- USHORT nFlags = 0);
+ sal_uInt16 nFlags = 0);
const String& GetErrorString() const { return aString; }
};
@@ -131,8 +131,8 @@ private:
public:
TYPEINFO();
- TwoStringErrorInfo(ULONG nUserID, const String & rTheArg1,
- const String & rTheArg2, USHORT nFlags = 0):
+ TwoStringErrorInfo(sal_uIntPtr nUserID, const String & rTheArg1,
+ const String & rTheArg2, sal_uInt16 nFlags = 0):
DynamicErrorInfo(nUserID, nFlags), aArg1(rTheArg1), aArg2(rTheArg2) {}
virtual ~TwoStringErrorInfo() {}
@@ -149,10 +149,10 @@ class TOOLS_DLLPUBLIC MessageInfo : public DynamicErrorInfo
public:
TYPEINFO();
- MessageInfo(ULONG UserId, USHORT nFlags = 0) :
+ MessageInfo(sal_uIntPtr UserId, sal_uInt16 nFlags = 0) :
DynamicErrorInfo(UserId, nFlags){}
- MessageInfo(ULONG UserId, const String &rArg,
- USHORT nFlags = 0 ) :
+ MessageInfo(sal_uIntPtr UserId, const String &rArg,
+ sal_uInt16 nFlags = 0 ) :
DynamicErrorInfo(UserId, nFlags), aArg(rArg) {}
const String& GetMessageArg() const { return aArg; }
@@ -178,7 +178,7 @@ public:
ErrorContext(Window *pWin=0);
virtual ~ErrorContext();
- virtual BOOL GetString( ULONG nErrId, String& rCtxStr ) = 0;
+ virtual sal_Bool GetString( sal_uIntPtr nErrId, String& rCtxStr ) = 0;
Window* GetParent() { return pWin; }
static ErrorContext* GetContext();
@@ -189,8 +189,8 @@ public:
// - ErrorHandler -
// ----------------
-typedef USHORT WindowDisplayErrorFunc(
- Window *, USHORT nMask, const String &rErr, const String &rAction);
+typedef sal_uInt16 WindowDisplayErrorFunc(
+ Window *, sal_uInt16 nMask, const String &rErr, const String &rAction);
typedef void BasicDisplayErrorFunc(
const String &rErr, const String &rAction);
@@ -202,22 +202,22 @@ class TOOLS_DLLPUBLIC ErrorHandler
private:
ErrHdl_Impl* pImpl;
- static USHORT HandleError_Impl( ULONG lId,
- USHORT nFlags,
- BOOL bJustCreateString,
+ static sal_uInt16 HandleError_Impl( sal_uIntPtr lId,
+ sal_uInt16 nFlags,
+ sal_Bool bJustCreateString,
String & rError);
protected:
- virtual BOOL CreateString( const ErrorInfo *,
- String &, USHORT& nMask ) const = 0;
- BOOL ForwCreateString( const ErrorInfo*,
- String&, USHORT& nMask ) const;
+ virtual sal_Bool CreateString( const ErrorInfo *,
+ String &, sal_uInt16& nMask ) const = 0;
+ sal_Bool ForwCreateString( const ErrorInfo*,
+ String&, sal_uInt16& nMask ) const;
public:
ErrorHandler();
virtual ~ErrorHandler();
- static USHORT HandleError ( ULONG lId, USHORT nMask = USHRT_MAX );
- static BOOL GetErrorString( ULONG lId, String& rStr );
+ static sal_uInt16 HandleError ( sal_uIntPtr lId, sal_uInt16 nMask = USHRT_MAX );
+ static sal_Bool GetErrorString( sal_uIntPtr lId, String& rStr );
static void RegisterDisplay( BasicDisplayErrorFunc* );
static void RegisterDisplay( WindowDisplayErrorFunc* );
@@ -231,8 +231,8 @@ public:
class TOOLS_DLLPUBLIC SimpleErrorHandler : private ErrorHandler
{
protected:
- virtual BOOL CreateString( const ErrorInfo*, String &,
- USHORT &nMask ) const;
+ virtual sal_Bool CreateString( const ErrorInfo*, String &,
+ sal_uInt16 &nMask ) const;
public:
SimpleErrorHandler();
diff --git a/tools/inc/tools/fontenum.hxx b/tools/inc/tools/fontenum.hxx
index 0e0f1b2f7368..54611c8f7c25 100644
--- a/tools/inc/tools/fontenum.hxx
+++ b/tools/inc/tools/fontenum.hxx
@@ -127,7 +127,7 @@ enum FontStrikeout { STRIKEOUT_NONE, STRIKEOUT_SINGLE, STRIKEOUT_DOUBLE,
#ifndef ENUM_FONTEMPHASISMARK_DECLARED
#define ENUM_FONTEMPHASISMARK_DECLARED
-typedef USHORT FontEmphasisMark;
+typedef sal_uInt16 FontEmphasisMark;
#define EMPHASISMARK_NONE ((FontEmphasisMark)0x0000)
#define EMPHASISMARK_DOT ((FontEmphasisMark)0x0001)
#define EMPHASISMARK_CIRCLE ((FontEmphasisMark)0x0002)
diff --git a/tools/inc/tools/fract.hxx b/tools/inc/tools/fract.hxx
index 7769e88ab541..249f1723097b 100644
--- a/tools/inc/tools/fract.hxx
+++ b/tools/inc/tools/fract.hxx
@@ -48,7 +48,7 @@ public:
Fraction( long nN1, long nN2, long nD1, long nD2 );
Fraction( double dVal );
- BOOL IsValid() const;
+ sal_Bool IsValid() const;
long GetNumerator() const { return nNumerator; }
long GetDenominator() const { return nDenominator; }
@@ -70,24 +70,24 @@ public:
friend Fraction operator*( const Fraction& rVal1, const Fraction& rVal2 );
friend Fraction operator/( const Fraction& rVal1, const Fraction& rVal2 );
- friend BOOL operator==( const Fraction& rVal1, const Fraction& rVal2 );
- friend BOOL operator!=( const Fraction& rVal1, const Fraction& rVal2 );
- friend BOOL operator< ( const Fraction& rVal1, const Fraction& rVal2 );
- friend BOOL operator> ( const Fraction& rVal1, const Fraction& rVal2 );
- friend BOOL operator<=( const Fraction& rVal1, const Fraction& rVal2 );
- friend BOOL operator>=( const Fraction& rVal1, const Fraction& rVal2 );
+ friend sal_Bool operator==( const Fraction& rVal1, const Fraction& rVal2 );
+ friend sal_Bool operator!=( const Fraction& rVal1, const Fraction& rVal2 );
+ friend sal_Bool operator< ( const Fraction& rVal1, const Fraction& rVal2 );
+ friend sal_Bool operator> ( const Fraction& rVal1, const Fraction& rVal2 );
+ friend sal_Bool operator<=( const Fraction& rVal1, const Fraction& rVal2 );
+ friend sal_Bool operator>=( const Fraction& rVal1, const Fraction& rVal2 );
#else
friend inline Fraction operator+( const Fraction& rVal1, const Fraction& rVal2 );
friend inline Fraction operator-( const Fraction& rVal1, const Fraction& rVal2 );
friend inline Fraction operator*( const Fraction& rVal1, const Fraction& rVal2 );
friend inline Fraction operator/( const Fraction& rVal1, const Fraction& rVal2 );
- TOOLS_DLLPUBLIC friend BOOL operator==( const Fraction& rVal1, const Fraction& rVal2 );
- friend inline BOOL operator!=( const Fraction& rVal1, const Fraction& rVal2 );
- TOOLS_DLLPUBLIC friend BOOL operator< ( const Fraction& rVal1, const Fraction& rVal2 );
- TOOLS_DLLPUBLIC friend BOOL operator> ( const Fraction& rVal1, const Fraction& rVal2 );
- friend inline BOOL operator<=( const Fraction& rVal1, const Fraction& rVal2 );
- friend inline BOOL operator>=( const Fraction& rVal1, const Fraction& rVal2 );
+ TOOLS_DLLPUBLIC friend sal_Bool operator==( const Fraction& rVal1, const Fraction& rVal2 );
+ friend inline sal_Bool operator!=( const Fraction& rVal1, const Fraction& rVal2 );
+ TOOLS_DLLPUBLIC friend sal_Bool operator< ( const Fraction& rVal1, const Fraction& rVal2 );
+ TOOLS_DLLPUBLIC friend sal_Bool operator> ( const Fraction& rVal1, const Fraction& rVal2 );
+ friend inline sal_Bool operator<=( const Fraction& rVal1, const Fraction& rVal2 );
+ friend inline sal_Bool operator>=( const Fraction& rVal1, const Fraction& rVal2 );
#endif
TOOLS_DLLPUBLIC friend SvStream& operator>>( SvStream& rIStream, Fraction& rFract );
TOOLS_DLLPUBLIC friend SvStream& operator<<( SvStream& rOStream, const Fraction& rFract );
@@ -106,7 +106,7 @@ inline Fraction& Fraction::operator=( const Fraction& rFrac )
return *this;
}
-inline BOOL Fraction::IsValid() const
+inline sal_Bool Fraction::IsValid() const
{
return (nDenominator > 0);
}
@@ -147,17 +147,17 @@ inline Fraction operator/( const Fraction& rVal1, const Fraction& rVal2 )
return aErg;
}
-inline BOOL operator !=( const Fraction& rVal1, const Fraction& rVal2 )
+inline sal_Bool operator !=( const Fraction& rVal1, const Fraction& rVal2 )
{
return !(rVal1 == rVal2);
}
-inline BOOL operator <=( const Fraction& rVal1, const Fraction& rVal2 )
+inline sal_Bool operator <=( const Fraction& rVal1, const Fraction& rVal2 )
{
return !(rVal1 > rVal2);
}
-inline BOOL operator >=( const Fraction& rVal1, const Fraction& rVal2 )
+inline sal_Bool operator >=( const Fraction& rVal1, const Fraction& rVal2 )
{
return !(rVal1 < rVal2);
}
diff --git a/tools/inc/tools/fsys.hxx b/tools/inc/tools/fsys.hxx
index 5ef51803734b..9507fdb15faa 100644
--- a/tools/inc/tools/fsys.hxx
+++ b/tools/inc/tools/fsys.hxx
@@ -146,7 +146,7 @@ typedef int FSysAction;
#define RFS_LOWER "-rfs-"
#define RFS_UPPER "-RFS-"
-typedef ULONG FSysError;
+typedef sal_uIntPtr FSysError;
// FSysExact
enum FSysExact
@@ -176,9 +176,9 @@ class TOOLS_DLLPUBLIC FileStat
friend struct DirReader_Impl;
friend void ImpInitFileStat( FileStat&, dirent* );
- ULONG nError;
+ sal_uIntPtr nError;
DirEntryKind nKindFlags;
- ULONG nSize;
+ sal_uIntPtr nSize;
String aCreator;
String aType;
Date aDateCreated;
@@ -199,16 +199,16 @@ public:
FileStat();
FileStat( const DirEntry& rDirEntry,
FSysAccess nAccess = FSYS_ACCESS_FLOPPY );
- BOOL Update( const DirEntry& rDirEntry,
- BOOL bForceAccess = TRUE );
+ sal_Bool Update( const DirEntry& rDirEntry,
+ sal_Bool bForceAccess = sal_True );
- ULONG GetError() const { return ERRCODE_TOERROR(nError); }
- ULONG GetErrorCode() const { return nError; }
+ sal_uIntPtr GetError() const { return ERRCODE_TOERROR(nError); }
+ sal_uIntPtr GetErrorCode() const { return nError; }
- ULONG GetSize() const { return nSize; }
+ sal_uIntPtr GetSize() const { return nSize; }
DirEntryKind GetKind() const { return nKindFlags; }
- BOOL IsKind( DirEntryKind nKind ) const;
+ sal_Bool IsKind( DirEntryKind nKind ) const;
String GetType() const { return aType; }
String GetCreator() const { return aCreator; }
@@ -219,12 +219,12 @@ public:
Time TimeModified() const { return aTimeModified; }
Date DateAccessed() const { return aDateAccessed; }
Time TimeAccessed() const { return aTimeAccessed; }
- BOOL IsYounger( const FileStat& rIsOlder ) const;
+ sal_Bool IsYounger( const FileStat& rIsOlder ) const;
#define TF_FSYS_READONLY_FLAG
- static ULONG SetReadOnlyFlag( const DirEntry &rEntry, BOOL bRO = TRUE );
- static BOOL GetReadOnlyFlag( const DirEntry &rEntry );
- static BOOL HasReadOnlyFlag();
+ static sal_uIntPtr SetReadOnlyFlag( const DirEntry &rEntry, sal_Bool bRO = sal_True );
+ static sal_Bool GetReadOnlyFlag( const DirEntry &rEntry );
+ static sal_Bool HasReadOnlyFlag();
static ErrCode QueryDiskSpace( const String &rPath,
BigInt &rFreeBytes, BigInt &rTotalBytes );
@@ -251,7 +251,7 @@ friend class FileCopier;
#endif
ByteString aName;
DirEntry* pParent;
- ULONG nError;
+ sal_uIntPtr nError;
DirEntryFlag eFlag;
private:
@@ -271,17 +271,17 @@ private:
FSysPathStyle eStyle );
TOOLS_DLLPRIVATE FSysError ImpParseUnixName( const ByteString& rPfad,
FSysPathStyle eStyle );
- TOOLS_DLLPRIVATE USHORT ImpTryUrl( DirEntryStack& rStack, const String& rPfad, FSysPathStyle eStyle );
+ TOOLS_DLLPRIVATE sal_uInt16 ImpTryUrl( DirEntryStack& rStack, const String& rPfad, FSysPathStyle eStyle );
TOOLS_DLLPRIVATE const DirEntry* ImpGetTopPtr() const;
TOOLS_DLLPRIVATE DirEntry* ImpGetTopPtr();
TOOLS_DLLPRIVATE DirEntry* ImpGetPreTopPtr();
- TOOLS_DLLPRIVATE BOOL ImpToRel( String aStart );
+ TOOLS_DLLPRIVATE sal_Bool ImpToRel( String aStart );
protected:
void ImpTrim( FSysPathStyle eStyle );
const ByteString& ImpTheName() const;
DirEntryFlag ImpTheFlag() const { return eFlag; };
- DirEntry* ImpChangeParent( DirEntry* pNewParent, BOOL bNormalize = TRUE );
+ DirEntry* ImpChangeParent( DirEntry* pNewParent, sal_Bool bNormalize = sal_True );
DirEntry* ImpGetParent() { return pParent; }
#ifdef FEAT_FSYS_DOUBLESPEED
FileStat* ImpGetStat() const { return pStat; }
@@ -291,7 +291,7 @@ protected:
//#endif
protected:
- void SetError( ULONG nErr ) { nError = nErr; }
+ void SetError( sal_uIntPtr nErr ) { nError = nErr; }
DirEntry* GetParent() { return pParent; }
public:
DirEntry( DirEntryFlag aDirFlag = FSYS_FLAG_CURRENT );
@@ -302,11 +302,11 @@ public:
FSysPathStyle eParser = FSYS_STYLE_HOST );
~DirEntry();
- BOOL IsLongNameOnFAT() const;
- BOOL IsCaseSensitive (FSysPathStyle eFormatter = FSYS_STYLE_HOST) const;
+ sal_Bool IsLongNameOnFAT() const;
+ sal_Bool IsCaseSensitive (FSysPathStyle eFormatter = FSYS_STYLE_HOST) const;
- ULONG GetError() const { return nError; }
- BOOL IsValid() const;
+ sal_uIntPtr GetError() const { return nError; }
+ sal_Bool IsValid() const;
DirEntryFlag GetFlag() const { return eFlag; };
void SetExtension( const String& rExt, char cSep = '.' );
@@ -322,31 +322,31 @@ public:
DirEntry GetDevice() const;
String GetVolume() const;
String GetFull( FSysPathStyle eFormatter = FSYS_STYLE_HOST,
- BOOL bWithDelimiter = FALSE,
- USHORT nMaxChars = STRING_MAXLEN ) const;
+ sal_Bool bWithDelimiter = sal_False,
+ sal_uInt16 nMaxChars = STRING_MAXLEN ) const;
DirEntry TempName( DirEntryKind = FSYS_KIND_NONE ) const;
static const DirEntry& SetTempNameBase( const String &rBaseName );
- BOOL MakeShortName( const String& rLongName,
+ sal_Bool MakeShortName( const String& rLongName,
DirEntryKind eCreateKind = FSYS_KIND_NONE,
- BOOL bUseTilde = TRUE,
+ sal_Bool bUseTilde = sal_True,
FSysPathStyle eStyle = FSYS_STYLE_DETECT );
bool IsAbs() const;
- BOOL ToAbs();
- BOOL Find( const String& rPfad, char cDelim = 0 );
- BOOL ToRel();
- BOOL ToRel( const DirEntry& rRefDir );
- USHORT CutRelParents();
+ sal_Bool ToAbs();
+ sal_Bool Find( const String& rPfad, char cDelim = 0 );
+ sal_Bool ToRel();
+ sal_Bool ToRel( const DirEntry& rRefDir );
+ sal_uInt16 CutRelParents();
- BOOL SetCWD( BOOL bSloppy = FALSE ) const;
- BOOL MakeDir( BOOL bSloppy = FALSE ) const;
- BOOL Exists( FSysAccess nAccess = FSYS_ACCESS_FLOPPY ) const;
- BOOL First();
+ sal_Bool SetCWD( sal_Bool bSloppy = sal_False ) const;
+ sal_Bool MakeDir( sal_Bool bSloppy = sal_False ) const;
+ sal_Bool Exists( FSysAccess nAccess = FSYS_ACCESS_FLOPPY ) const;
+ sal_Bool First();
- USHORT Level() const;
- const DirEntry& operator []( USHORT nParentLevel ) const;
- BOOL Contains( const DirEntry &rSubEntry ) const;
+ sal_uInt16 Level() const;
+ const DirEntry& operator []( sal_uInt16 nParentLevel ) const;
+ sal_Bool Contains( const DirEntry &rSubEntry ) const;
FSysError CopyTo( const DirEntry& rDestDir,
FSysAction nActions = FSYS_ACTION_STANDARD ) const;
@@ -356,8 +356,8 @@ public:
DirEntry& operator =( const DirEntry& rOrigDir );
DirEntry operator +( const DirEntry& rSubDir ) const;
DirEntry& operator +=( const DirEntry& rSubDir );
- BOOL operator ==( const DirEntry& rAnotherDir ) const;
- BOOL operator !=( const DirEntry& rAnotherDir ) const
+ sal_Bool operator ==( const DirEntry& rAnotherDir ) const;
+ sal_Bool operator !=( const DirEntry& rAnotherDir ) const
{ return !(DirEntry::operator==( rAnotherDir )); }
StringCompare NameCompare( const DirEntry &rWith ) const;
@@ -372,11 +372,11 @@ public:
static String GetAccessDelimiter( FSysPathStyle eFormatter = FSYS_STYLE_HOST );
static String GetSearchDelimiter( FSysPathStyle eFormatter = FSYS_STYLE_HOST );
- static USHORT GetMaxNameLen( FSysPathStyle eFormatter = FSYS_STYLE_HOST );
+ static sal_uInt16 GetMaxNameLen( FSysPathStyle eFormatter = FSYS_STYLE_HOST );
static FSysPathStyle GetPathStyle( const String &rDevice );
static String ConvertNameToSystem( const String & rName );
static String ConvertSystemToName( const String & rName );
- static BOOL IsRFSAvailable();
+ static sal_Bool IsRFSAvailable();
};
// --------------
@@ -387,10 +387,10 @@ class TOOLS_DLLPUBLIC FileCopier
{
DirEntry aSource;
DirEntry aTarget;
- ULONG nBytesTotal;
- ULONG nBytesCopied;
+ sal_uIntPtr nBytesTotal;
+ sal_uIntPtr nBytesCopied;
Link aProgressLink;
- USHORT nBlockSize;
+ sal_uInt16 nBlockSize;
FileCopier_Impl* pImp;
private:
@@ -398,7 +398,7 @@ private:
const DirEntry &rSource, const DirEntry &rTarget );
protected:
- virtual BOOL Progress();
+ virtual sal_Bool Progress();
virtual ErrCode Error( ErrCode eErr,
const DirEntry *pSource, const DirEntry *pTarget );
@@ -411,11 +411,11 @@ public:
FileCopier& operator = ( const FileCopier &rCopier );
- void SetBlockSize( USHORT nBytes ) { nBlockSize = nBytes; }
- USHORT GetBlockSize() const { return nBlockSize; }
+ void SetBlockSize( sal_uInt16 nBytes ) { nBlockSize = nBytes; }
+ sal_uInt16 GetBlockSize() const { return nBlockSize; }
- ULONG GetBytesTotal() const { return nBytesTotal; }
- ULONG GetBytesCopied() const { return nBytesCopied; }
+ sal_uIntPtr GetBytesTotal() const { return nBytesTotal; }
+ sal_uIntPtr GetBytesCopied() const { return nBytesCopied; }
void SetSource( const DirEntry &rSource ) { aSource = rSource; }
void SetTarget( const DirEntry &rTarget ) { aTarget = rTarget; }
@@ -464,10 +464,10 @@ private:
#ifndef _TOOLS_HXX
protected:
- BOOL ImpInsertPointReached( const DirEntry& rIsSmaller,
+ sal_Bool ImpInsertPointReached( const DirEntry& rIsSmaller,
const FileStat& rNewStat,
- ULONG nCurPos,
- ULONG nSortIndex ) const;
+ sal_uIntPtr nCurPos,
+ sal_uIntPtr nSortIndex ) const;
void ImpSortedInsert( const DirEntry *pNewEntry,
const FileStat *pNewStat );
#endif
@@ -486,12 +486,12 @@ public:
FSysError SetSort( FSysSort nSort, ... );
void Reset();
- USHORT Scan( USHORT nCount = 5 );
- USHORT Count( BOOL bUpdated = TRUE ) const;
- BOOL Update();
+ sal_uInt16 Scan( sal_uInt16 nCount = 5 );
+ sal_uInt16 Count( sal_Bool bUpdated = sal_True ) const;
+ sal_Bool Update();
Dir& operator +=( const Dir& rDir );
- DirEntry& operator []( USHORT nIndex ) const;
+ DirEntry& operator []( sal_uInt16 nIndex ) const;
};
// we don't need this stuff for bootstraping
@@ -509,7 +509,7 @@ public:
class FSysRedirector
{
static FSysRedirector* _pRedirector;
- static BOOL _bEnabled;
+ static sal_Bool _bEnabled;
public:
/** This method must called with the one and only instance of the
@@ -541,9 +541,9 @@ public:
redirected (modified) path too, which can be of both formats
too.
- @return BOOL<BR>
- TRUE, if the path is redirected
- FALSE, if the path is not redirected (unchanged)
+ @return sal_Bool<BR>
+ sal_True, if the path is redirected
+ sal_False, if the path is not redirected (unchanged)
*/
static void DoRedirect( String &rPath );
};
@@ -552,7 +552,7 @@ public:
//========================================================================
-void FSysEnableSysErrorBox( BOOL bEnable );
+void FSysEnableSysErrorBox( sal_Bool bEnable );
//========================================================================
diff --git a/tools/inc/tools/gen.hxx b/tools/inc/tools/gen.hxx
index 308cc02165ce..360ecdf98325 100644
--- a/tools/inc/tools/gen.hxx
+++ b/tools/inc/tools/gen.hxx
@@ -84,8 +84,8 @@ public:
long& A() { return nA; }
long& B() { return nB; }
- BOOL operator == ( const Pair& rPair ) const;
- BOOL operator != ( const Pair& rPair ) const;
+ sal_Bool operator == ( const Pair& rPair ) const;
+ sal_Bool operator != ( const Pair& rPair ) const;
TOOLS_DLLPUBLIC friend SvStream& operator>>( SvStream& rIStream, Pair& rPair );
TOOLS_DLLPUBLIC friend SvStream& operator<<( SvStream& rOStream, const Pair& rPair );
@@ -102,12 +102,12 @@ inline Pair::Pair( long _nA, long _nB )
Pair::nB = _nB;
}
-inline BOOL Pair::operator == ( const Pair& rPair ) const
+inline sal_Bool Pair::operator == ( const Pair& rPair ) const
{
return ((nA == rPair.nA) && (nB == rPair.nB));
}
-inline BOOL Pair::operator != ( const Pair& rPair ) const
+inline sal_Bool Pair::operator != ( const Pair& rPair ) const
{
return ((nA != rPair.nA) || (nB != rPair.nB));
}
@@ -129,10 +129,10 @@ public:
long& Y() { return nB; }
void Move( long nHorzMove, long nVertMove );
- BOOL IsAbove( const Point& rPoint ) const;
- BOOL IsBelow( const Point& rPoint ) const;
- BOOL IsLeft( const Point& rPoint ) const;
- BOOL IsRight( const Point& rPoint ) const;
+ sal_Bool IsAbove( const Point& rPoint ) const;
+ sal_Bool IsBelow( const Point& rPoint ) const;
+ sal_Bool IsLeft( const Point& rPoint ) const;
+ sal_Bool IsRight( const Point& rPoint ) const;
Point& operator += ( const Point& rPoint );
Point& operator -= ( const Point& rPoint );
@@ -171,22 +171,22 @@ inline void Point::Move( long nHorzMove, long nVertMove )
nB += nVertMove;
}
-inline BOOL Point::IsAbove( const Point& rPoint ) const
+inline sal_Bool Point::IsAbove( const Point& rPoint ) const
{
return (nB > rPoint.nB);
}
-inline BOOL Point::IsBelow( const Point& rPoint ) const
+inline sal_Bool Point::IsBelow( const Point& rPoint ) const
{
return (nB < rPoint.nB);
}
-inline BOOL Point::IsLeft( const Point& rPoint ) const
+inline sal_Bool Point::IsLeft( const Point& rPoint ) const
{
return (nA < rPoint.nA);
}
-inline BOOL Point::IsRight( const Point& rPoint ) const
+inline sal_Bool Point::IsRight( const Point& rPoint ) const
{
return (nA > rPoint.nA);
}
@@ -290,7 +290,7 @@ public:
long& Min() { return nA; }
long& Max() { return nB; }
- BOOL IsInside( long nIs ) const;
+ sal_Bool IsInside( long nIs ) const;
void Justify();
};
@@ -303,7 +303,7 @@ inline Range::Range( long nMin, long nMax ) : Pair( nMin, nMax )
{
}
-inline BOOL Range::IsInside( long nIs ) const
+inline sal_Bool Range::IsInside( long nIs ) const
{
return ((nA <= nIs) && (nIs <= nB ));
}
@@ -339,11 +339,11 @@ public:
long& Min() { return nA; }
long& Max() { return nB; }
- BOOL IsInside( long nIs ) const;
+ sal_Bool IsInside( long nIs ) const;
void Justify();
- BOOL operator !() const { return !Len(); }
+ sal_Bool operator !() const { return !Len(); }
long getMin() const { return Min(); }
long getMax() const { return Max(); }
@@ -364,7 +364,7 @@ inline Selection::Selection( long nMin, long nMax ) :
{
}
-inline BOOL Selection::IsInside( long nIs ) const
+inline sal_Bool Selection::IsInside( long nIs ) const
{
return ((nA <= nIs) && (nIs < nB ));
}
@@ -435,15 +435,15 @@ public:
void Justify();
- BOOL IsInside( const Point& rPOINT ) const;
- BOOL IsInside( const Rectangle& rRect ) const;
- BOOL IsOver( const Rectangle& rRect ) const;
+ sal_Bool IsInside( const Point& rPOINT ) const;
+ sal_Bool IsInside( const Rectangle& rRect ) const;
+ sal_Bool IsOver( const Rectangle& rRect ) const;
void SetEmpty() { nRight = nBottom = RECT_EMPTY; }
- BOOL IsEmpty() const;
+ sal_Bool IsEmpty() const;
- BOOL operator == ( const Rectangle& rRect ) const;
- BOOL operator != ( const Rectangle& rRect ) const;
+ sal_Bool operator == ( const Rectangle& rRect ) const;
+ sal_Bool operator != ( const Rectangle& rRect ) const;
Rectangle& operator += ( const Point& rPt );
Rectangle& operator -= ( const Point& rPt );
@@ -501,7 +501,7 @@ inline Rectangle::Rectangle( const Point& rLT, const Size& rSize )
nBottom = rSize.Height() ? nTop+rSize.Height()-1 : RECT_EMPTY;
}
-inline BOOL Rectangle::IsEmpty() const
+inline sal_Bool Rectangle::IsEmpty() const
{
return ((nRight == RECT_EMPTY) || (nBottom == RECT_EMPTY));
}
@@ -654,7 +654,7 @@ inline Rectangle Rectangle::GetIntersection( const Rectangle& rRect ) const
return aTmpRect.Intersection( rRect );
}
-inline BOOL Rectangle::operator == ( const Rectangle& rRect ) const
+inline sal_Bool Rectangle::operator == ( const Rectangle& rRect ) const
{
return ((nLeft == rRect.nLeft ) &&
(nTop == rRect.nTop ) &&
@@ -662,7 +662,7 @@ inline BOOL Rectangle::operator == ( const Rectangle& rRect ) const
(nBottom == rRect.nBottom ));
}
-inline BOOL Rectangle::operator != ( const Rectangle& rRect ) const
+inline sal_Bool Rectangle::operator != ( const Rectangle& rRect ) const
{
return ((nLeft != rRect.nLeft ) ||
(nTop != rRect.nTop ) ||
diff --git a/tools/inc/tools/geninfo.hxx b/tools/inc/tools/geninfo.hxx
index 720ccb9cd788..889d8c1713cc 100644
--- a/tools/inc/tools/geninfo.hxx
+++ b/tools/inc/tools/geninfo.hxx
@@ -62,7 +62,7 @@ public:
GenericInformation( const ByteString &rKey, const ByteString &rValue,
GenericInformationList *pParentList = NULL,
GenericInformationList *pSubInfos = NULL );
- GenericInformation( const GenericInformation& rInf, BOOL bCopySubs = TRUE);
+ GenericInformation( const GenericInformation& rInf, sal_Bool bCopySubs = sal_True);
~GenericInformation();
@@ -73,18 +73,18 @@ public:
void SetComment( const ByteString &rComment ) { sComment = rComment; }
// this methods used to handle sub informations
- BOOL InsertSubInfo( GenericInformation *pInfo );
+ sal_Bool InsertSubInfo( GenericInformation *pInfo );
// siehe GenericInformationList
- BOOL InsertSubInfo( const ByteString &rPathKey, const ByteString &rValue,
- BOOL bSearchByPath = FALSE, BOOL bNewPath = FALSE);
- void RemoveSubInfo( GenericInformation *pInfo, BOOL bDelete = FALSE );
- // void RemoveSelf( BOOL bDelete = FALSE ); // loescht sich selbst aus der Parentliste
+ sal_Bool InsertSubInfo( const ByteString &rPathKey, const ByteString &rValue,
+ sal_Bool bSearchByPath = sal_False, sal_Bool bNewPath = sal_False);
+ void RemoveSubInfo( GenericInformation *pInfo, sal_Bool bDelete = sal_False );
+ // void RemoveSelf( sal_Bool bDelete = sal_False ); // loescht sich selbst aus der Parentliste
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- // bei bDelete = TRUE werden auch alle Sublisten UND DIE INFO SELBST geloescht.
+ // bei bDelete = sal_True werden auch alle Sublisten UND DIE INFO SELBST geloescht.
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- GenericInformation *GetSubInfo( ByteString &rKey, BOOL bSearchByPath = FALSE,
- BOOL bCreatePath = FALSE );
+ GenericInformation *GetSubInfo( ByteString &rKey, sal_Bool bSearchByPath = sal_False,
+ sal_Bool bCreatePath = sal_False );
// path can be something like this: src370/drives/o:
void SetSubList( GenericInformationList *pSubList )
@@ -132,43 +132,43 @@ GenericLockInformation( const ByteString &rKey, const ByteString &rValue,
/* der Schreibschutz darf nur aktiviert werden, wenn
* der Status auf Lesen steht
*/
- BOOL SetWriteLock(UINT32 nKey = 0) { return ((read==aLockState) &&
- (aLockState=writeonly, nLockKey=nKey, TRUE)); }
+ sal_Bool SetWriteLock(sal_uInt32 nKey = 0) { return ((read==aLockState) &&
+ (aLockState=writeonly, nLockKey=nKey, sal_True)); }
/* Schreibschutz darf nur geloest werden, wenn
* der Schreibschutz drin ist, und
* entweder der LockKey Null ist(Generalschluessel) oder der Key zum LockKey passt
*/
- BOOL ReleaseWriteLock(UINT32 nKey = 0) { return ((writeonly==aLockState) &&
+ sal_Bool ReleaseWriteLock(sal_uInt32 nKey = 0) { return ((writeonly==aLockState) &&
(!nLockKey||nKey==nLockKey) &&
- (aLockState=read, nLockKey=0, TRUE)); } // setzt den zustand auf "read"
- BOOL SetReadLock(UINT32 nKey = 0) { return ((read==aLockState) &&
- (aLockState=readonly, nLockKey=nKey, TRUE)); }
- BOOL ReleaseReadLock(UINT32 nKey = 0) { return ((readonly==aLockState) &&
+ (aLockState=read, nLockKey=0, sal_True)); } // setzt den zustand auf "read"
+ sal_Bool SetReadLock(sal_uInt32 nKey = 0) { return ((read==aLockState) &&
+ (aLockState=readonly, nLockKey=nKey, sal_True)); }
+ sal_Bool ReleaseReadLock(sal_uInt32 nKey = 0) { return ((readonly==aLockState) &&
(!nLockKey||nKey==nLockKey) &&
- (aLockState=read, nLockKey=0, TRUE)); } // setzt den zustand auf "read"
+ (aLockState=read, nLockKey=0, sal_True)); } // setzt den zustand auf "read"
LockState GetLockState() const { return aLockState; }
- BOOL IsWriteLocked() const { return (writeonly==aLockState); }
- BOOL IsReadLocked() const { return (readonly==aLockState); }
- BOOL IsNotLocked() const { return (read==aLockState); }
- BOOL IsLocker( UINT32 nKey ) { return (nKey==nLockKey || !nLockKey); }
+ sal_Bool IsWriteLocked() const { return (writeonly==aLockState); }
+ sal_Bool IsReadLocked() const { return (readonly==aLockState); }
+ sal_Bool IsNotLocked() const { return (read==aLockState); }
+ sal_Bool IsLocker( sal_uInt32 nKey ) { return (nKey==nLockKey || !nLockKey); }
/* wenn der Schreibschutz aktiviert wurde,
* und bei vorhandenem Schreibschutz die Keys stimmen
* rufe die Parentmethode auf */
- BOOL InsertSubInfo( GenericInformation *pInfo, UINT32 nKey = 0 ) {
+ sal_Bool InsertSubInfo( GenericInformation *pInfo, sal_uInt32 nKey = 0 ) {
return ((writeonly==aLockState) &&
(!nLockKey || nKey==nLockKey) &&
- (GenericInformation::InsertSubInfo( pInfo ), TRUE)); }
+ (GenericInformation::InsertSubInfo( pInfo ), sal_True)); }
- BOOL InsertSubInfo( const ByteString &rPathKey, const ByteString &rValue, UINT32 nKey = 0,
- BOOL bSearchByPath = FALSE, BOOL bNewPath = FALSE) {
+ sal_Bool InsertSubInfo( const ByteString &rPathKey, const ByteString &rValue, sal_uInt32 nKey = 0,
+ sal_Bool bSearchByPath = sal_False, sal_Bool bNewPath = sal_False) {
return ((writeonly==aLockState) &&
(!nLockKey || nKey==nLockKey) &&
- (GenericInformation::InsertSubInfo( rPathKey, rValue, bSearchByPath, bNewPath ), TRUE)); }
+ (GenericInformation::InsertSubInfo( rPathKey, rValue, bSearchByPath, bNewPath ), sal_True)); }
/* 29.jan.98: erweiterung um lesemoeglichkeit vom Lockclienten */
- GenericInformation *GetSubInfo( ByteString &rKey, BOOL bSearchByPath = FALSE,
- BOOL bCreatePath = FALSE, UINT32 nKey = 0 ) {
+ GenericInformation *GetSubInfo( ByteString &rKey, sal_Bool bSearchByPath = sal_False,
+ sal_Bool bCreatePath = sal_False, sal_uInt32 nKey = 0 ) {
if (writeonly==aLockState && nLockKey && nKey!=nLockKey )
return NULL;
return GenericInformation::GetSubInfo(rKey, bSearchByPath, bCreatePath); }
@@ -177,7 +177,7 @@ GenericLockInformation( const ByteString &rKey, const ByteString &rValue,
private:
LockState aLockState;
- UINT32 nLockKey;
+ sal_uInt32 nLockKey;
};
//
@@ -197,10 +197,10 @@ private:
protected:
// methods
- ULONG InsertSorted( GenericInformation *pInfo, BOOL bOverwrite,
- ULONG nStart, ULONG nEnd );
- GenericInformation *Search( ULONG &rPos, ByteString sKey,
- ULONG nStart, ULONG nEnd );
+ sal_uIntPtr InsertSorted( GenericInformation *pInfo, sal_Bool bOverwrite,
+ sal_uIntPtr nStart, sal_uIntPtr nEnd );
+ GenericInformation *Search( sal_uIntPtr &rPos, ByteString sKey,
+ sal_uIntPtr nStart, sal_uIntPtr nEnd );
public:
GenericInformationList( GenericInformation *pParent = NULL );
@@ -208,19 +208,19 @@ public:
~GenericInformationList();
// this methods used to handle the informations using binary search
- GenericInformation *GetInfo( ByteString &rKey, BOOL bSearchByPath = FALSE,
- BOOL bCreatePath = FALSE );
+ GenericInformation *GetInfo( ByteString &rKey, sal_Bool bSearchByPath = sal_False,
+ sal_Bool bCreatePath = sal_False );
/* path can be something like this: src370/drives/o:
* bCreatePath will create the neccecary paths to the GI */
- BOOL InsertInfo( GenericInformation *pInfo, BOOL bOverwrite = TRUE );
+ sal_Bool InsertInfo( GenericInformation *pInfo, sal_Bool bOverwrite = sal_True );
/* legt eine GenericInformation im Baum an mit Key-Value
* wenn bNewPath gesetzt, wird der nichtexistente Teil des Pfades neu kreiert
* wenn bNewPath nicht gesetzt ist und ein Teil des Pfades nicht vorhanden ist,
- * gibt die Methode FALSE zurueck.*/
- BOOL InsertInfo( const ByteString &rPathKey, const ByteString &rValue,
- BOOL bSearchByPath = FALSE, BOOL bNewPath = FALSE);
- void RemoveInfo( GenericInformation *pInfo, BOOL bDelete = FALSE );
+ * gibt die Methode sal_False zurueck.*/
+ sal_Bool InsertInfo( const ByteString &rPathKey, const ByteString &rValue,
+ sal_Bool bSearchByPath = sal_False, sal_Bool bNewPath = sal_False);
+ void RemoveInfo( GenericInformation *pInfo, sal_Bool bDelete = sal_False );
GenericInformation* SetOwner( GenericInformation *pNewOwner );
diff --git a/tools/inc/tools/globname.hxx b/tools/inc/tools/globname.hxx
index 7fac64e2f74b..026e4c51b9ac 100644..100755
--- a/tools/inc/tools/globname.hxx
+++ b/tools/inc/tools/globname.hxx
@@ -36,8 +36,8 @@
*************************************************************************/
struct ImpSvGlobalName
{
- BYTE szData[ 16 ];
- USHORT nRefCount;
+ sal_uInt8 szData[ 16 ];
+ sal_uInt16 nRefCount;
ImpSvGlobalName()
{
@@ -46,7 +46,7 @@ struct ImpSvGlobalName
ImpSvGlobalName( const ImpSvGlobalName & rObj );
ImpSvGlobalName( int );
- BOOL operator == ( const ImpSvGlobalName & rObj ) const;
+ sal_Bool operator == ( const ImpSvGlobalName & rObj ) const;
};
#ifdef WNT
@@ -75,9 +75,9 @@ public:
pImp = pImpP;
pImp->nRefCount++;
}
- SvGlobalName( UINT32 n1, USHORT n2, USHORT n3,
- BYTE b8, BYTE b9, BYTE b10, BYTE b11,
- BYTE b12, BYTE b13, BYTE b14, BYTE b15 );
+ SvGlobalName( sal_uInt32 n1, sal_uInt16 n2, sal_uInt16 n3,
+ sal_uInt8 b8, sal_uInt8 b9, sal_uInt8 b10, sal_uInt8 b11,
+ sal_uInt8 b12, sal_uInt8 b13, sal_uInt8 b14, sal_uInt8 b15 );
// create SvGlobalName from a platform independent representation
SvGlobalName( const ::com::sun::star::uno::Sequence< sal_Int8 >& aSeq );
@@ -88,16 +88,16 @@ public:
TOOLS_DLLPUBLIC friend SvStream & operator >> ( SvStream &, SvGlobalName & );
TOOLS_DLLPUBLIC friend SvStream & operator << ( SvStream &, const SvGlobalName & );
- BOOL operator < ( const SvGlobalName & rObj ) const;
- SvGlobalName & operator += ( UINT32 );
+ sal_Bool operator < ( const SvGlobalName & rObj ) const;
+ SvGlobalName & operator += ( sal_uInt32 );
SvGlobalName & operator ++ () { return operator += ( 1 ); }
- BOOL operator == ( const SvGlobalName & rObj ) const;
- BOOL operator != ( const SvGlobalName & rObj ) const
+ sal_Bool operator == ( const SvGlobalName & rObj ) const;
+ sal_Bool operator != ( const SvGlobalName & rObj ) const
{ return !(*this == rObj); }
void MakeFromMemory( void * pData );
- BOOL MakeId( const String & rId );
+ sal_Bool MakeId( const String & rId );
String GetctorName() const;
String GetHexName() const;
String GetRegDbName() const
@@ -110,7 +110,7 @@ public:
SvGlobalName( const CLSID & rId );
const CLSID & GetCLSID() const { return *(CLSID *)pImp->szData; }
- const BYTE* GetBytes() const { return pImp->szData; }
+ const sal_uInt8* GetBytes() const { return pImp->szData; }
// platform independent representation of a "GlobalName"
// maybe transported remotely
@@ -125,9 +125,9 @@ public:
~SvGlobalNameList();
void Append( const SvGlobalName & );
- SvGlobalName GetObject( ULONG );
- BOOL IsEntry( const SvGlobalName & rName );
- ULONG Count() const { return aList.Count(); }
+ SvGlobalName GetObject( sal_uLong );
+ sal_Bool IsEntry( const SvGlobalName & rName );
+ sal_uInt32 Count() const { return aList.Count(); }
private:
// nicht erlaubt
SvGlobalNameList( const SvGlobalNameList & );
diff --git a/tools/inc/tools/inetmime.hxx b/tools/inc/tools/inetmime.hxx
index 4e8065f6264c..2408bf231665 100644..100755
--- a/tools/inc/tools/inetmime.hxx
+++ b/tools/inc/tools/inetmime.hxx
@@ -1426,17 +1426,17 @@ public:
void Clear();
- void Insert(INetContentTypeParameter * pParameter, ULONG nIndex)
+ void Insert(INetContentTypeParameter * pParameter, sal_uIntPtr nIndex)
{ List::Insert(pParameter, nIndex); }
- inline const INetContentTypeParameter * GetObject(ULONG nIndex) const;
+ inline const INetContentTypeParameter * GetObject(sal_uIntPtr nIndex) const;
const INetContentTypeParameter * find(const ByteString & rAttribute)
const;
};
inline const INetContentTypeParameter *
-INetContentTypeParameterList::GetObject(ULONG nIndex) const
+INetContentTypeParameterList::GetObject(sal_uIntPtr nIndex) const
{
return static_cast< INetContentTypeParameter * >(List::GetObject(nIndex));
}
diff --git a/tools/inc/tools/inetmsg.hxx b/tools/inc/tools/inetmsg.hxx
index d7619fc34a4d..1f14a67b62a7 100644
--- a/tools/inc/tools/inetmsg.hxx
+++ b/tools/inc/tools/inetmsg.hxx
@@ -116,7 +116,7 @@ class INetMessage
{
List m_aHeaderList;
- ULONG m_nDocSize;
+ sal_uIntPtr m_nDocSize;
UniString m_aDocName;
SvLockBytesRef m_xDocLB;
@@ -125,7 +125,7 @@ class INetMessage
protected:
UniString GetHeaderName_Impl (
- ULONG nIndex, rtl_TextEncoding eEncoding) const
+ sal_uIntPtr nIndex, rtl_TextEncoding eEncoding) const
{
INetMessageHeader *p =
(INetMessageHeader*)(m_aHeaderList.GetObject(nIndex));
@@ -136,7 +136,7 @@ protected:
}
UniString GetHeaderValue_Impl (
- ULONG nIndex, INetMIME::HeaderFieldType eType) const
+ sal_uIntPtr nIndex, INetMIME::HeaderFieldType eType) const
{
INetMessageHeader *p =
(INetMessageHeader*)(m_aHeaderList.GetObject(nIndex));
@@ -147,7 +147,7 @@ protected:
}
void SetHeaderField_Impl (
- const INetMessageHeader &rHeader, ULONG &rnIndex)
+ const INetMessageHeader &rHeader, sal_uIntPtr &rnIndex)
{
INetMessageHeader *p = new INetMessageHeader (rHeader);
if (m_aHeaderList.Count() <= rnIndex)
@@ -166,7 +166,7 @@ protected:
INetMIME::HeaderFieldType eType,
const ByteString &rName,
const UniString &rValue,
- ULONG &rnIndex);
+ sal_uIntPtr &rnIndex);
virtual SvStream& operator<< (SvStream& rStrm) const;
virtual SvStream& operator>> (SvStream& rStrm);
@@ -192,19 +192,19 @@ public:
return *this;
}
- ULONG GetHeaderCount (void) const { return m_aHeaderList.Count(); }
+ sal_uIntPtr GetHeaderCount (void) const { return m_aHeaderList.Count(); }
- UniString GetHeaderName (ULONG nIndex) const
+ UniString GetHeaderName (sal_uIntPtr nIndex) const
{
return GetHeaderName_Impl (nIndex, RTL_TEXTENCODING_ASCII_US);
}
- UniString GetHeaderValue (ULONG nIndex) const
+ UniString GetHeaderValue (sal_uIntPtr nIndex) const
{
return GetHeaderValue_Impl (nIndex, INetMIME::HEADER_FIELD_TEXT);
}
- INetMessageHeader GetHeaderField (ULONG nIndex) const
+ INetMessageHeader GetHeaderField (sal_uIntPtr nIndex) const
{
INetMessageHeader *p =
(INetMessageHeader*)(m_aHeaderList.GetObject(nIndex));
@@ -214,16 +214,16 @@ public:
return INetMessageHeader();
}
- ULONG SetHeaderField (
+ sal_uIntPtr SetHeaderField (
const UniString& rName,
const UniString& rValue,
- ULONG nIndex = LIST_APPEND);
+ sal_uIntPtr nIndex = LIST_APPEND);
- virtual ULONG SetHeaderField (
- const INetMessageHeader &rField, ULONG nIndex = LIST_APPEND);
+ virtual sal_uIntPtr SetHeaderField (
+ const INetMessageHeader &rField, sal_uIntPtr nIndex = LIST_APPEND);
- ULONG GetDocumentSize (void) const { return m_nDocSize; }
- void SetDocumentSize (ULONG nSize) { m_nDocSize = nSize; }
+ sal_uIntPtr GetDocumentSize (void) const { return m_nDocSize; }
+ void SetDocumentSize (sal_uIntPtr nSize) { m_nDocSize = nSize; }
const UniString& GetDocumentName (void) const { return m_aDocName; }
void SetDocumentName (const UniString& rName) { m_aDocName = rName; }
@@ -251,7 +251,7 @@ public:
*=====================================================================*/
class INetMessageHeaderIterator
{
- ULONG nValueCount;
+ sal_uIntPtr nValueCount;
List aValueList;
UniString aEmptyString;
@@ -260,8 +260,8 @@ public:
const INetMessage& rMsg, const UniString& rHdrName);
virtual ~INetMessageHeaderIterator (void);
- ULONG GetValueCount (void) const { return nValueCount; }
- const UniString& GetValue (ULONG nIndex) const
+ sal_uIntPtr GetValueCount (void) const { return nValueCount; }
+ const UniString& GetValue (sal_uIntPtr nIndex) const
{
if (nIndex < nValueCount)
{
@@ -301,7 +301,7 @@ public:
class TOOLS_DLLPUBLIC INetRFC822Message : public INetMessage
{
- ULONG m_nIndex[INETMSG_RFC822_NUMHDR];
+ sal_uIntPtr m_nIndex[INETMSG_RFC822_NUMHDR];
protected:
virtual SvStream& operator<< (SvStream& rStrm) const;
@@ -314,14 +314,14 @@ public:
INetRFC822Message& operator= (const INetRFC822Message& rMsg);
- static BOOL GenerateDateField (
+ static sal_Bool GenerateDateField (
const DateTime& rDateTime, UniString& rDateField);
- static BOOL ParseDateField (
+ static sal_Bool ParseDateField (
const UniString& rDateField, DateTime& rDateTime);
using INetMessage::SetHeaderField;
- virtual ULONG SetHeaderField (
- const INetMessageHeader &rHeader, ULONG nIndex = LIST_APPEND);
+ virtual sal_uIntPtr SetHeaderField (
+ const INetMessageHeader &rHeader, sal_uIntPtr nIndex = LIST_APPEND);
/** Header fields.
*/
@@ -495,23 +495,23 @@ enum INetMessageContainerType
class TOOLS_DLLPUBLIC INetMIMEMessage : public INetRFC822Message
{
- ULONG m_nIndex[INETMSG_MIME_NUMHDR];
+ sal_uIntPtr m_nIndex[INETMSG_MIME_NUMHDR];
INetMIMEMessage *pParent;
- ULONG nNumChildren;
+ sal_uIntPtr nNumChildren;
List aChildren;
ByteString m_aBoundary;
- BOOL bHeaderParsed;
+ sal_Bool bHeaderParsed;
friend class INetMIMEMessageStream;
- void SetChildCount (ULONG nCount) { nNumChildren = nCount; }
+ void SetChildCount (sal_uIntPtr nCount) { nNumChildren = nCount; }
const ByteString& GetMultipartBoundary (void) const { return m_aBoundary; }
void SetMultipartBoundary (const ByteString& rBnd) { m_aBoundary = rBnd; }
void CleanupImp (void);
void CopyImp (const INetMIMEMessage& rMsg);
- void SetHeaderParsed() { bHeaderParsed = TRUE; }
+ void SetHeaderParsed() { bHeaderParsed = sal_True; }
protected:
virtual SvStream& operator<< (SvStream& rStrm) const;
@@ -524,14 +524,14 @@ public:
INetMIMEMessage& operator= (const INetMIMEMessage& rMsg);
- BOOL HeaderParsed() const { return bHeaderParsed; }
+ sal_Bool HeaderParsed() const { return bHeaderParsed; }
virtual INetMIMEMessage* CreateMessage (
const INetMIMEMessage& rMsg) const;
using INetRFC822Message::SetHeaderField;
- virtual ULONG SetHeaderField (
- const INetMessageHeader &rHeader, ULONG nIndex = LIST_APPEND);
+ virtual sal_uIntPtr SetHeaderField (
+ const INetMessageHeader &rHeader, sal_uIntPtr nIndex = LIST_APPEND);
/** Header fields.
*/
@@ -575,34 +575,34 @@ public:
/** Message container methods.
*/
- BOOL IsContainer (void) const
+ sal_Bool IsContainer (void) const
{
return (IsMessage() || IsMultipart());
}
- BOOL IsMessage (void) const
+ sal_Bool IsMessage (void) const
{
UniString aType (GetContentType());
return (aType.CompareIgnoreCaseToAscii("message/", 8) == 0);
}
- BOOL IsMultipart (void) const
+ sal_Bool IsMultipart (void) const
{
UniString aType (GetContentType());
return (aType.CompareIgnoreCaseToAscii("multipart/", 10) == 0);
}
- ULONG GetChildCount (void) const { return nNumChildren; }
- INetMIMEMessage* GetChild (ULONG nIndex) const
+ sal_uIntPtr GetChildCount (void) const { return nNumChildren; }
+ INetMIMEMessage* GetChild (sal_uIntPtr nIndex) const
{
return ((INetMIMEMessage *)(aChildren.GetObject (nIndex)));
}
INetMIMEMessage* GetParent (void) const { return pParent; }
- BOOL EnableAttachChild (
+ sal_Bool EnableAttachChild (
INetMessageContainerType eType = INETMSG_MULTIPART_MIXED);
- BOOL AttachChild (
- INetMIMEMessage& rChildMsg, BOOL bOwner = TRUE);
- BOOL DetachChild (
- ULONG nIndex, INetMIMEMessage& rChildMsg) const;
+ sal_Bool AttachChild (
+ INetMIMEMessage& rChildMsg, sal_Bool bOwner = sal_True);
+ sal_Bool DetachChild (
+ sal_uIntPtr nIndex, INetMIMEMessage& rChildMsg) const;
/** Stream operators.
*/
diff --git a/tools/inc/tools/inetstrm.hxx b/tools/inc/tools/inetstrm.hxx
index 1fd9a913b382..b1c01333c63a 100644
--- a/tools/inc/tools/inetstrm.hxx
+++ b/tools/inc/tools/inetstrm.hxx
@@ -60,13 +60,13 @@ class TOOLS_DLLPUBLIC INetIStream
INetIStream& operator= (const INetIStream& rStrm);
protected:
- virtual int GetData (sal_Char *pData, ULONG nSize) = 0;
+ virtual int GetData (sal_Char *pData, sal_uIntPtr nSize) = 0;
public:
INetIStream ();
virtual ~INetIStream (void);
- int Read (sal_Char *pData, ULONG nSize);
+ int Read (sal_Char *pData, sal_uIntPtr nSize);
static void Decode64 (SvStream& rIn, SvStream& rOut);
static void Encode64 (SvStream& rIn, SvStream& rOut);
@@ -83,13 +83,13 @@ class INetOStream
protected:
virtual int PutData (
- const sal_Char *pData, ULONG nSize) = 0;
+ const sal_Char *pData, sal_uIntPtr nSize) = 0;
public:
INetOStream ();
virtual ~INetOStream (void);
- int Write (const sal_Char *pData, ULONG nSize);
+ int Write (const sal_Char *pData, sal_uIntPtr nSize);
};
/*
@@ -102,7 +102,7 @@ class INetIOStream : public INetIStream, public INetOStream
INetIOStream& operator= (const INetIOStream& rStrm);
public:
- INetIOStream (ULONG nIBufferSize = 0, ULONG nOBufferSize = 0);
+ INetIOStream (sal_uIntPtr nIBufferSize = 0, sal_uIntPtr nOBufferSize = 0);
virtual ~INetIOStream (void);
};
@@ -128,9 +128,9 @@ enum INetMessageStreamState
class INetMessageIStream : public INetIStream
{
INetMessage *pSourceMsg;
- BOOL bHeaderGenerated;
+ sal_Bool bHeaderGenerated;
- ULONG nBufSiz;
+ sal_uIntPtr nBufSiz;
sal_Char *pBuffer;
sal_Char *pRead;
sal_Char *pWrite;
@@ -140,24 +140,24 @@ class INetMessageIStream : public INetIStream
sal_Char *pMsgRead;
sal_Char *pMsgWrite;
- virtual int GetData (sal_Char *pData, ULONG nSize);
+ virtual int GetData (sal_Char *pData, sal_uIntPtr nSize);
// Not implemented.
INetMessageIStream (const INetMessageIStream& rStrm);
INetMessageIStream& operator= (const INetMessageIStream& rStrm);
protected:
- virtual int GetMsgLine (sal_Char *pData, ULONG nSize);
+ virtual int GetMsgLine (sal_Char *pData, sal_uIntPtr nSize);
public:
- INetMessageIStream (ULONG nBufferSize = 2048);
+ INetMessageIStream (sal_uIntPtr nBufferSize = 2048);
virtual ~INetMessageIStream (void);
INetMessage *GetSourceMessage (void) const { return pSourceMsg; }
void SetSourceMessage (INetMessage *pMsg) { pSourceMsg = pMsg; }
- void GenerateHeader (BOOL bGen = TRUE) { bHeaderGenerated = !bGen; }
- BOOL IsHeaderGenerated (void) const { return bHeaderGenerated; }
+ void GenerateHeader (sal_Bool bGen = sal_True) { bHeaderGenerated = !bGen; }
+ sal_Bool IsHeaderGenerated (void) const { return bHeaderGenerated; }
};
/*
@@ -166,20 +166,20 @@ public:
class INetMessageOStream : public INetOStream
{
INetMessage *pTargetMsg;
- BOOL bHeaderParsed;
+ sal_Bool bHeaderParsed;
INetMessageStreamState eOState;
SvMemoryStream *pMsgBuffer;
- virtual int PutData (const sal_Char *pData, ULONG nSize);
+ virtual int PutData (const sal_Char *pData, sal_uIntPtr nSize);
// Not implemented.
INetMessageOStream (const INetMessageOStream& rStrm);
INetMessageOStream& operator= (const INetMessageOStream& rStrm);
protected:
- virtual int PutMsgLine (const sal_Char *pData, ULONG nSize);
+ virtual int PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize);
public:
INetMessageOStream (void);
@@ -188,8 +188,8 @@ public:
INetMessage *GetTargetMessage (void) const { return pTargetMsg; }
void SetTargetMessage (INetMessage *pMsg) { pTargetMsg = pMsg; }
- void ParseHeader (BOOL bParse = TRUE) { bHeaderParsed = !bParse; }
- BOOL IsHeaderParsed (void) const { return bHeaderParsed; }
+ void ParseHeader (sal_Bool bParse = sal_True) { bHeaderParsed = !bParse; }
+ sal_Bool IsHeaderParsed (void) const { return bHeaderParsed; }
};
/*
@@ -204,7 +204,7 @@ class INetMessageIOStream
INetMessageIOStream& operator= (const INetMessageIOStream& rStrm);
public:
- INetMessageIOStream (ULONG nBufferSize = 2048);
+ INetMessageIOStream (sal_uIntPtr nBufferSize = 2048);
virtual ~INetMessageIOStream (void);
};
@@ -226,7 +226,7 @@ class TOOLS_DLLPUBLIC INetMIMEMessageStream : public INetMessageIOStream
{
int eState;
- ULONG nChildIndex;
+ sal_uIntPtr nChildIndex;
INetMIMEMessageStream *pChildStrm;
INetMessageEncoding eEncoding;
@@ -243,11 +243,11 @@ class TOOLS_DLLPUBLIC INetMIMEMessageStream : public INetMessageIOStream
INetMIMEMessageStream& operator= (const INetMIMEMessageStream& rStrm);
protected:
- virtual int GetMsgLine (sal_Char *pData, ULONG nSize);
- virtual int PutMsgLine (const sal_Char *pData, ULONG nSize);
+ virtual int GetMsgLine (sal_Char *pData, sal_uIntPtr nSize);
+ virtual int PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize);
public:
- INetMIMEMessageStream (ULONG nBufferSize = 2048);
+ INetMIMEMessageStream (sal_uIntPtr nBufferSize = 2048);
virtual ~INetMIMEMessageStream (void);
using INetMessageIStream::SetSourceMessage;
diff --git a/tools/inc/tools/iparser.hxx b/tools/inc/tools/iparser.hxx
index 78eed43e8391..c31f6ebd75f7 100644
--- a/tools/inc/tools/iparser.hxx
+++ b/tools/inc/tools/iparser.hxx
@@ -72,18 +72,18 @@ key [value]
#define IP_NO_ERROR 0x0000
#define IP_UNEXPECTED_EOF 0x0001
-#define REPLACE_VARIABLES TRUE
+#define REPLACE_VARIABLES sal_True
class TOOLS_DLLPUBLIC InformationParser
{
private:
- BOOL bRecover;
+ sal_Bool bRecover;
ByteString sOldLine;
ByteString sCurrentComment;
- BOOL bReplaceVariables; // meaning %UPD and %VERSION
- USHORT nLevel;
+ sal_Bool bReplaceVariables; // meaning %UPD and %VERSION
+ sal_uInt16 nLevel;
ByteString sUPD;
ByteString sVersion;
@@ -91,10 +91,10 @@ private:
SvStream *pActStream;
UniString sStreamName;
- USHORT nErrorCode;
- ULONG nErrorLine;
+ sal_uInt16 nErrorCode;
+ sal_uIntPtr nErrorLine;
ByteString sErrorText;
- ULONG nActLine;
+ sal_uIntPtr nActLine;
// methods
TOOLS_DLLPRIVATE ByteString &ReadLine();
@@ -102,15 +102,15 @@ private:
inline void Recover();
protected:
- BOOL Save( SvStream &rOutStream,
- const GenericInformationList *pSaveList, USHORT nLevel, BOOL bStripped );
+ sal_Bool Save( SvStream &rOutStream,
+ const GenericInformationList *pSaveList, sal_uInt16 nLevel, sal_Bool bStripped );
GenericInformationList *Execute( SvStream &rSourceStream,
GenericInformationList *pExistingList );
virtual void PrintStatus( ByteString &rStatus )
{ if ( aStatusLink.IsSet()) aStatusLink.Call( &rStatus ); }
public:
- InformationParser( BOOL bReplace = FALSE );
+ InformationParser( sal_Bool bReplace = sal_False );
virtual ~InformationParser();
// the following methods return NULL if any errors are detected
@@ -129,15 +129,15 @@ public:
GenericInformationList *pExistingList = NULL );
// save the InfrormationList to rSourceFile
- // returns FALSE on error
- BOOL Save( SvFileStream &rSourceStream,
+ // returns sal_False on error
+ sal_Bool Save( SvFileStream &rSourceStream,
const GenericInformationList *pSaveList );
- BOOL Save( SvMemoryStream &rSourceStream,
+ sal_Bool Save( SvMemoryStream &rSourceStream,
const GenericInformationList *pSaveList );
- BOOL Save( const UniString &rSourceFile,
+ sal_Bool Save( const UniString &rSourceFile,
const GenericInformationList *pSaveList );
- USHORT GetErrorCode();
+ sal_uInt16 GetErrorCode();
ByteString &GetErrorText();
void SetStatusHdl( const Link &rHdl ) { aStatusLink = rHdl; }
diff --git a/tools/inc/tools/line.hxx b/tools/inc/tools/line.hxx
index c6c70df842ca..32fc157a34a4 100644
--- a/tools/inc/tools/line.hxx
+++ b/tools/inc/tools/line.hxx
@@ -60,9 +60,9 @@ public:
double GetLength() const;
- BOOL Intersection( const Line& rLine, double& rIntersectionX, double& rIntersectionY ) const;
- BOOL Intersection( const Line& rLine, Point& rIntersection ) const;
- BOOL Intersection( const Rectangle& rRect, Line& rIntersection ) const;
+ sal_Bool Intersection( const Line& rLine, double& rIntersectionX, double& rIntersectionY ) const;
+ sal_Bool Intersection( const Line& rLine, Point& rIntersection ) const;
+ sal_Bool Intersection( const Rectangle& rRect, Line& rIntersection ) const;
double GetDistance( const double& rPtX, const double& rPtY ) const;
double GetDistance( const Point& rPoint ) const { return( GetDistance( rPoint.X(), rPoint.Y() ) ); }
diff --git a/tools/inc/tools/link.hxx b/tools/inc/tools/link.hxx
index 1742759055d6..f31fcabc8108 100644
--- a/tools/inc/tools/link.hxx
+++ b/tools/inc/tools/link.hxx
@@ -112,14 +112,14 @@ public:
long Call( void* pCaller ) const;
- BOOL IsSet() const;
- BOOL operator !() const;
+ sal_Bool IsSet() const;
+ sal_Bool operator !() const;
- BOOL operator==( const Link& rLink ) const;
- BOOL operator!=( const Link& rLink ) const
+ sal_Bool operator==( const Link& rLink ) const;
+ sal_Bool operator!=( const Link& rLink ) const
{ return !(Link::operator==( rLink )); }
- BOOL operator<( const Link& rLink ) const
- { return ((ULONG)rLink.pFunc < (ULONG)pFunc); }
+ sal_Bool operator<( const Link& rLink ) const
+ { return ((sal_uIntPtr)rLink.pFunc < (sal_uIntPtr)pFunc); }
};
inline Link::Link()
@@ -139,20 +139,20 @@ inline long Link::Call(void *pCaller) const
return pFunc ? (*pFunc)(pInst, pCaller) : 0;
}
-inline BOOL Link::IsSet() const
+inline sal_Bool Link::IsSet() const
{
if ( pFunc )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
-inline BOOL Link::operator !() const
+inline sal_Bool Link::operator !() const
{
if ( !pFunc )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
#endif // _LINK_HXX
diff --git a/tools/inc/tools/list.hxx b/tools/inc/tools/list.hxx
index dd8fbf454f80..bb0d8627838c 100644
--- a/tools/inc/tools/list.hxx
+++ b/tools/inc/tools/list.hxx
@@ -56,18 +56,18 @@ public:
using Container::Next;
using Container::Prev;
- List( USHORT _nInitSize = 16, USHORT _nReSize = 16 ) :
+ List( sal_uInt16 _nInitSize = 16, sal_uInt16 _nReSize = 16 ) :
Container( 1024, _nInitSize, _nReSize ) {}
- List( USHORT _nBlockSize, USHORT _nInitSize, USHORT _nReSize ) :
+ List( sal_uInt16 _nBlockSize, sal_uInt16 _nInitSize, sal_uInt16 _nReSize ) :
Container( _nBlockSize, _nInitSize, _nReSize ) {}
List( const List& rList ) : Container( rList ) {}
List& operator =( const List& rList )
{ Container::operator =( rList ); return *this; }
- BOOL operator ==( const List& rList ) const
+ sal_Bool operator ==( const List& rList ) const
{ return Container::operator ==( rList ); }
- BOOL operator !=( const List& rList ) const
+ sal_Bool operator !=( const List& rList ) const
{ return Container::operator !=( rList ); }
};
@@ -83,16 +83,16 @@ public: \
using List::Count; \
using List::GetCurPos; \
\
- ClassName( USHORT _nInitSize = 16, \
- USHORT _nReSize = 16 ) : \
+ ClassName( sal_uInt16 _nInitSize = 16, \
+ sal_uInt16 _nReSize = 16 ) : \
List( _nInitSize, _nReSize ) {} \
- ClassName( USHORT _nBlockSize, USHORT _nInitSize, \
- USHORT _nReSize ) : \
+ ClassName( sal_uInt16 _nBlockSize, sal_uInt16 _nInitSize, \
+ sal_uInt16 _nReSize ) : \
List( _nBlockSize, _nInitSize, _nReSize ) {} \
ClassName( const ClassName& rClassName ) : \
List( rClassName ) {} \
\
- void Insert( Type p, ULONG nIndex ) \
+ void Insert( Type p, sal_uIntPtr nIndex ) \
{ List::Insert( (void*)p, nIndex ); } \
void Insert( Type p ) \
{ List::Insert( (void*)p ); } \
@@ -100,13 +100,13 @@ public: \
{ List::Insert( (void*)pNew, (void*)pOld ); } \
Type Remove() \
{ return (Type)List::Remove(); } \
- Type Remove( ULONG nIndex ) \
+ Type Remove( sal_uIntPtr nIndex ) \
{ return (Type)List::Remove( nIndex ); } \
Type Remove( Type p ) \
{ return (Type)List::Remove( (void*)p ); } \
Type Replace( Type p ) \
{ return (Type)List::Replace( (void*)p ); } \
- Type Replace( Type p, ULONG nIndex ) \
+ Type Replace( Type p, sal_uIntPtr nIndex ) \
{ return (Type)List::Replace( (void*)p, nIndex ); } \
Type Replace( Type pNew, Type pOld ) \
{ return (Type)List::Replace( (void*)pNew, \
@@ -114,16 +114,16 @@ public: \
\
Type GetCurObject() const \
{ return (Type)List::GetCurObject(); } \
- Type GetObject( ULONG nIndex ) const \
+ Type GetObject( sal_uIntPtr nIndex ) const \
{ return (Type)List::GetObject( nIndex ); } \
- ULONG GetPos( const Type p ) const \
+ sal_uIntPtr GetPos( const Type p ) const \
{ return List::GetPos( (const void*)p ); } \
- ULONG GetPos( const Type p, ULONG nStartIndex, \
- BOOL bForward = TRUE ) const \
+ sal_uIntPtr GetPos( const Type p, sal_uIntPtr nStartIndex, \
+ sal_Bool bForward = sal_True ) const \
{ return List::GetPos( (const void*)p, nStartIndex, \
bForward ); } \
\
- Type Seek( ULONG nIndex ) \
+ Type Seek( sal_uIntPtr nIndex ) \
{ return (Type)List::Seek( nIndex ); } \
Type Seek( void* p ) { return (Type)List::Seek( p ); } \
Type First() { return (Type)List::First(); } \
@@ -134,9 +134,9 @@ public: \
ClassName& operator =( const ClassName& rClassName ) \
{ List::operator =( rClassName ); return *this; } \
\
- BOOL operator ==( const ClassName& rList ) const \
+ sal_Bool operator ==( const ClassName& rList ) const \
{ return List::operator ==( rList ); } \
- BOOL operator !=( const ClassName& rList ) const \
+ sal_Bool operator !=( const ClassName& rList ) const \
{ return List::operator !=( rList ); } \
};
diff --git a/tools/inc/tools/mempool.hxx b/tools/inc/tools/mempool.hxx
index 7e38ff3003c3..74df068908f7 100644
--- a/tools/inc/tools/mempool.hxx
+++ b/tools/inc/tools/mempool.hxx
@@ -43,9 +43,9 @@ class TOOLS_DLLPUBLIC FixedMemPool
public:
FixedMemPool( char const * pTypeName,
- USHORT nTypeSize,
- USHORT nInitSize = 512,
- USHORT nGrowSize = 256 );
+ sal_uInt16 nTypeSize,
+ sal_uInt16 nInitSize = 512,
+ sal_uInt16 nGrowSize = 256 );
~FixedMemPool();
void* Alloc();
diff --git a/tools/inc/tools/multisel.hxx b/tools/inc/tools/multisel.hxx
index f75f4c5f03af..6544fe771f95 100644
--- a/tools/inc/tools/multisel.hxx
+++ b/tools/inc/tools/multisel.hxx
@@ -56,17 +56,17 @@ class TOOLS_DLLPUBLIC MultiSelection
private:
ImpSelList aSels; // array of SV-selections
Range aTotRange; // total range of indexes
- ULONG nCurSubSel; // index in aSels of current selected index
+ sal_uIntPtr nCurSubSel; // index in aSels of current selected index
long nCurIndex; // current selected entry
- ULONG nSelCount; // number of selected indexes
- BOOL bInverseCur;// inverse cursor
- BOOL bCurValid; // are nCurIndex and nCurSubSel valid
- BOOL bSelectNew; // auto-select newly inserted indexes
+ sal_uIntPtr nSelCount; // number of selected indexes
+ sal_Bool bInverseCur;// inverse cursor
+ sal_Bool bCurValid; // are nCurIndex and nCurSubSel valid
+ sal_Bool bSelectNew; // auto-select newly inserted indexes
#ifdef _SV_MULTISEL_CXX
TOOLS_DLLPRIVATE void ImplClear();
- TOOLS_DLLPRIVATE ULONG ImplFindSubSelection( long nIndex ) const;
- TOOLS_DLLPRIVATE BOOL ImplMergeSubSelections( ULONG nPos1, ULONG nPos2 );
+ TOOLS_DLLPRIVATE sal_uIntPtr ImplFindSubSelection( long nIndex ) const;
+ TOOLS_DLLPRIVATE sal_Bool ImplMergeSubSelections( sal_uIntPtr nPos1, sal_uIntPtr nPos2 );
TOOLS_DLLPRIVATE long ImplFwdUnselected();
TOOLS_DLLPRIVATE long ImplBwdUnselected();
#endif
@@ -81,18 +81,18 @@ public:
~MultiSelection();
MultiSelection& operator= ( const MultiSelection& rOrig );
- BOOL operator== ( MultiSelection& rOrig );
- BOOL operator!= ( MultiSelection& rOrig )
+ sal_Bool operator== ( MultiSelection& rOrig );
+ sal_Bool operator!= ( MultiSelection& rOrig )
{ return !operator==( rOrig ); }
- BOOL operator !() const
+ sal_Bool operator !() const
{ return nSelCount == 0; }
- void SelectAll( BOOL bSelect = TRUE );
- BOOL Select( long nIndex, BOOL bSelect = TRUE );
- void Select( const Range& rIndexRange, BOOL bSelect = TRUE );
- BOOL IsSelected( long nIndex ) const;
- BOOL IsAllSelected() const
- { return nSelCount == ULONG(aTotRange.Len()); }
+ void SelectAll( sal_Bool bSelect = sal_True );
+ sal_Bool Select( long nIndex, sal_Bool bSelect = sal_True );
+ void Select( const Range& rIndexRange, sal_Bool bSelect = sal_True );
+ sal_Bool IsSelected( long nIndex ) const;
+ sal_Bool IsAllSelected() const
+ { return nSelCount == sal_uIntPtr(aTotRange.Len()); }
long GetSelectCount() const { return nSelCount; }
void SetTotalRange( const Range& rTotRange );
@@ -101,15 +101,15 @@ public:
void Append( long nCount = 1 );
const Range& GetTotalRange() const { return aTotRange; }
- BOOL IsCurValid() const { return bCurValid; }
+ sal_Bool IsCurValid() const { return bCurValid; }
long GetCurSelected() const { return nCurIndex; }
- long FirstSelected( BOOL bInverse = FALSE );
+ long FirstSelected( sal_Bool bInverse = sal_False );
long LastSelected();
long NextSelected();
long PrevSelected();
- ULONG GetRangeCount() const { return aSels.Count(); }
- const Range& GetRange( ULONG nRange ) const { return *(const Range*)aSels.GetObject(nRange); }
+ sal_uIntPtr GetRangeCount() const { return aSels.Count(); }
+ const Range& GetRange( sal_uIntPtr nRange ) const { return *(const Range*)aSels.GetObject(nRange); }
};
class TOOLS_DLLPUBLIC StringRangeEnumerator
diff --git a/tools/inc/tools/ownlist.hxx b/tools/inc/tools/ownlist.hxx
index ac99537a9f0d..78cf5af8e89c 100644
--- a/tools/inc/tools/ownlist.hxx
+++ b/tools/inc/tools/ownlist.hxx
@@ -37,8 +37,8 @@
#define PRV_SV_DECL_OWNER_LIST(ClassName,Type) \
List aTypes; \
public: \
- ClassName( USHORT nInitSize = 16, \
- USHORT nReSize = 16 ) \
+ ClassName( sal_uInt16 nInitSize = 16, \
+ sal_uInt16 nReSize = 16 ) \
: aTypes( nInitSize, nReSize ) {} \
ClassName( const ClassName & rObj ) \
{ *this = rObj; } \
@@ -50,18 +50,18 @@ public: \
{ delete (Type *)aTypes.Remove(); } \
void Remove( Type * pObj ) \
{ delete (Type *)aTypes.Remove( pObj ); } \
- void Remove( ULONG nPos ) \
+ void Remove( sal_uIntPtr nPos ) \
{ delete (Type *)aTypes.Remove( nPos ); } \
- Type & Insert( const Type &, ULONG nPos ); \
+ Type & Insert( const Type &, sal_uIntPtr nPos ); \
Type & Insert( const Type & rType ) \
{ return Insert( rType, aTypes.GetCurPos() ); } \
Type & Append( const Type & rType ) \
{ return Insert( rType, LIST_APPEND ); } \
- Type & GetObject( ULONG nPos ) const \
+ Type & GetObject( sal_uIntPtr nPos ) const \
{ return *(Type *)aTypes.GetObject( nPos ); } \
- Type & operator []( ULONG nPos ) const \
+ Type & operator []( sal_uIntPtr nPos ) const \
{ return *(Type *)aTypes.GetObject( nPos ); } \
- ULONG Count() const { return aTypes.Count(); }
+ sal_uIntPtr Count() const { return aTypes.Count(); }
#define PRV_SV_IMPL_OWNER_LIST(ClassName,Type) \
ClassName & ClassName::operator = ( const ClassName & rObj ) \
@@ -69,7 +69,7 @@ ClassName & ClassName::operator = ( const ClassName & rObj ) \
if( this != &rObj ) \
{ \
Clear(); \
- for( ULONG i = 0; i < rObj.Count(); i++ ) \
+ for( sal_uIntPtr i = 0; i < rObj.Count(); i++ ) \
Append( rObj.GetObject( i ) ); \
} \
return *this; \
@@ -84,7 +84,7 @@ void ClassName::Clear() \
} \
aTypes.Clear(); \
} \
-Type & ClassName::Insert( const Type & rType, ULONG nPos ) \
+Type & ClassName::Insert( const Type & rType, sal_uIntPtr nPos ) \
{ \
Type * pType = new Type( rType ); \
aTypes.Insert( pType, nPos ); \
diff --git a/tools/inc/tools/poly.hxx b/tools/inc/tools/poly.hxx
index b83877b88959..5abcca0c819d 100644
--- a/tools/inc/tools/poly.hxx
+++ b/tools/inc/tools/poly.hxx
@@ -85,16 +85,16 @@ private:
enum DataType { DATA_NONE = 0, DATA_ABSOLUT = 1, DATA_PERCENT = 2 };
DataType eType;
- union { ULONG mnAbsolut; USHORT mnPercent; };
+ union { sal_uIntPtr mnAbsolut; sal_uInt16 mnPercent; };
public:
PolyOptimizeData() : eType( DATA_NONE ) {}
- PolyOptimizeData( ULONG nAbsolut ) : eType( DATA_ABSOLUT ), mnAbsolut( nAbsolut ) {}
- PolyOptimizeData( USHORT nPercent ) : eType( DATA_PERCENT ), mnPercent( nPercent ) {}
+ PolyOptimizeData( sal_uIntPtr nAbsolut ) : eType( DATA_ABSOLUT ), mnAbsolut( nAbsolut ) {}
+ PolyOptimizeData( sal_uInt16 nPercent ) : eType( DATA_PERCENT ), mnPercent( nPercent ) {}
- ULONG GetAbsValue() const { DBG_ASSERT( eType == DATA_ABSOLUT, "Wrong data type" ); return mnAbsolut; }
- USHORT GetPercentValue() const { DBG_ASSERT( eType == DATA_PERCENT, "Wrong data type" ); return mnPercent; }
+ sal_uIntPtr GetAbsValue() const { DBG_ASSERT( eType == DATA_ABSOLUT, "Wrong data type" ); return mnAbsolut; }
+ sal_uInt16 GetPercentValue() const { DBG_ASSERT( eType == DATA_PERCENT, "Wrong data type" ); return mnPercent; }
};
// -----------
@@ -125,9 +125,9 @@ private:
public:
Point* ImplGetPointAry();
- BYTE* ImplGetFlagAry();
+ sal_uInt8* ImplGetFlagAry();
- static void ImplReduceEdges( Polygon& rPoly, const double& rArea, USHORT nPercent );
+ static void ImplReduceEdges( Polygon& rPoly, const double& rArea, sal_uInt16 nPercent );
void ImplRead( SvStream& rIStream );
void ImplWrite( SvStream& rOStream ) const;
@@ -135,49 +135,49 @@ public:
public:
Polygon();
- Polygon( USHORT nSize );
- Polygon( USHORT nPoints, const Point* pPtAry,
- const BYTE* pFlagAry = NULL );
+ Polygon( sal_uInt16 nSize );
+ Polygon( sal_uInt16 nPoints, const Point* pPtAry,
+ const sal_uInt8* pFlagAry = NULL );
Polygon( const Rectangle& rRect );
Polygon( const Rectangle& rRect,
- ULONG nHorzRound, ULONG nVertRound );
+ sal_uIntPtr nHorzRound, sal_uIntPtr nVertRound );
Polygon( const Point& rCenter,
long nRadX, long nRadY,
- USHORT nPoints = 0 );
+ sal_uInt16 nPoints = 0 );
Polygon( const Rectangle& rBound,
const Point& rStart, const Point& rEnd,
PolyStyle ePolyStyle = POLY_ARC );
Polygon( const Point& rBezPt1, const Point& rCtrlPt1,
const Point& rBezPt2, const Point& rCtrlPt2,
- USHORT nPoints = 0 );
+ sal_uInt16 nPoints = 0 );
Polygon( const Polygon& rPoly );
~Polygon();
- void SetPoint( const Point& rPt, USHORT nPos );
- const Point& GetPoint( USHORT nPos ) const;
+ void SetPoint( const Point& rPt, sal_uInt16 nPos );
+ const Point& GetPoint( sal_uInt16 nPos ) const;
- void SetFlags( USHORT nPos, PolyFlags eFlags );
- PolyFlags GetFlags( USHORT nPos ) const;
+ void SetFlags( sal_uInt16 nPos, PolyFlags eFlags );
+ PolyFlags GetFlags( sal_uInt16 nPos ) const;
sal_Bool HasFlags() const;
- BOOL IsControl( USHORT nPos ) const;
- BOOL IsSmooth( USHORT nPos ) const;
- BOOL IsRect() const;
+ sal_Bool IsControl( sal_uInt16 nPos ) const;
+ sal_Bool IsSmooth( sal_uInt16 nPos ) const;
+ sal_Bool IsRect() const;
- void SetSize( USHORT nNewSize );
- USHORT GetSize() const;
+ void SetSize( sal_uInt16 nNewSize );
+ sal_uInt16 GetSize() const;
void Clear();
Rectangle GetBoundRect() const;
double GetArea() const;
double GetSignedArea() const;
- BOOL IsInside( const Point& rPt ) const;
- BOOL IsRightOrientated() const;
- double CalcDistance( USHORT nPt1, USHORT nPt2 );
- void Clip( const Rectangle& rRect, BOOL bPolygon = TRUE );
- void Optimize( ULONG nOptimizeFlags, const PolyOptimizeData* pData = NULL );
+ sal_Bool IsInside( const Point& rPt ) const;
+ sal_Bool IsRightOrientated() const;
+ double CalcDistance( sal_uInt16 nPt1, sal_uInt16 nPt2 );
+ void Clip( const Rectangle& rRect, sal_Bool bPolygon = sal_True );
+ void Optimize( sal_uIntPtr nOptimizeFlags, const PolyOptimizeData* pData = NULL );
/** Adaptive subdivision of polygons with curves
@@ -208,21 +208,21 @@ public:
void Translate( const Point& rTrans );
void Scale( double fScaleX, double fScaleY );
void Rotate( const Point& rCenter, double fSin, double fCos );
- void Rotate( const Point& rCenter, USHORT nAngle10 );
+ void Rotate( const Point& rCenter, sal_uInt16 nAngle10 );
void SlantX( long nYRef, double fSin, double fCos );
void SlantY( long nXRef, double fSin, double fCos );
void Distort( const Rectangle& rRefRect, const Polygon& rDistortedRect );
- void Insert( USHORT nPos, const Point& rPt, PolyFlags eFlags = POLY_NORMAL );
- void Insert( USHORT nPos, const Polygon& rPoly );
- void Remove( USHORT nPos, USHORT nCount );
+ void Insert( sal_uInt16 nPos, const Point& rPt, PolyFlags eFlags = POLY_NORMAL );
+ void Insert( sal_uInt16 nPos, const Polygon& rPoly );
+ void Remove( sal_uInt16 nPos, sal_uInt16 nCount );
- const Point& operator[]( USHORT nPos ) const { return GetPoint( nPos ); }
- Point& operator[]( USHORT nPos );
+ const Point& operator[]( sal_uInt16 nPos ) const { return GetPoint( nPos ); }
+ Point& operator[]( sal_uInt16 nPos );
Polygon& operator=( const Polygon& rPoly );
- BOOL operator==( const Polygon& rPoly ) const;
- BOOL operator!=( const Polygon& rPoly ) const
+ sal_Bool operator==( const Polygon& rPoly ) const;
+ sal_Bool operator!=( const Polygon& rPoly ) const
{ return !(Polygon::operator==( rPoly )); }
sal_Bool IsEqual( const Polygon& rPoly ) const;
@@ -235,7 +235,7 @@ public:
void Write( SvStream& rOStream ) const;
const Point* GetConstPointAry() const;
- const BYTE* GetConstFlagAry() const;
+ const sal_uInt8* GetConstFlagAry() const;
// convert to ::basegfx::B2DPolygon and return
::basegfx::B2DPolygon getB2DPolygon() const;
@@ -256,33 +256,33 @@ private:
ImplPolyPolygon* mpImplPolyPolygon;
//#if 0 // _SOLAR__PRIVATE
- TOOLS_DLLPRIVATE void ImplDoOperation( const PolyPolygon& rPolyPoly, PolyPolygon& rResult, ULONG nOperation ) const;
+ TOOLS_DLLPRIVATE void ImplDoOperation( const PolyPolygon& rPolyPoly, PolyPolygon& rResult, sal_uIntPtr nOperation ) const;
TOOLS_DLLPRIVATE void *ImplCreateArtVpath() const;
TOOLS_DLLPRIVATE void ImplSetFromArtVpath( void *pVpath );
//#endif // __PRIVATE
public:
- PolyPolygon( USHORT nInitSize = 16, USHORT nResize = 16 );
+ PolyPolygon( sal_uInt16 nInitSize = 16, sal_uInt16 nResize = 16 );
PolyPolygon( const Polygon& rPoly );
- PolyPolygon( USHORT nPoly, const USHORT* pPointCountAry,
+ PolyPolygon( sal_uInt16 nPoly, const sal_uInt16* pPointCountAry,
const Point* pPtAry );
PolyPolygon( const PolyPolygon& rPolyPoly );
~PolyPolygon();
- void Insert( const Polygon& rPoly, USHORT nPos = POLYPOLY_APPEND );
- void Remove( USHORT nPos );
- void Replace( const Polygon& rPoly, USHORT nPos );
- const Polygon& GetObject( USHORT nPos ) const;
+ void Insert( const Polygon& rPoly, sal_uInt16 nPos = POLYPOLY_APPEND );
+ void Remove( sal_uInt16 nPos );
+ void Replace( const Polygon& rPoly, sal_uInt16 nPos );
+ const Polygon& GetObject( sal_uInt16 nPos ) const;
- BOOL IsRect() const;
+ sal_Bool IsRect() const;
void Clear();
- USHORT Count() const;
+ sal_uInt16 Count() const;
Rectangle GetBoundRect() const;
void Clip( const Rectangle& rRect );
- void Optimize( ULONG nOptimizeFlags, const PolyOptimizeData* pData = NULL );
+ void Optimize( sal_uIntPtr nOptimizeFlags, const PolyOptimizeData* pData = NULL );
/** Adaptive subdivision of polygons with curves
@@ -313,17 +313,17 @@ public:
void Translate( const Point& rTrans );
void Scale( double fScaleX, double fScaleY );
void Rotate( const Point& rCenter, double fSin, double fCos );
- void Rotate( const Point& rCenter, USHORT nAngle10 );
+ void Rotate( const Point& rCenter, sal_uInt16 nAngle10 );
void SlantX( long nYRef, double fSin, double fCos );
void SlantY( long nXRef, double fSin, double fCos );
void Distort( const Rectangle& rRefRect, const Polygon& rDistortedRect );
- const Polygon& operator[]( USHORT nPos ) const { return GetObject( nPos ); }
- Polygon& operator[]( USHORT nPos );
+ const Polygon& operator[]( sal_uInt16 nPos ) const { return GetObject( nPos ); }
+ Polygon& operator[]( sal_uInt16 nPos );
PolyPolygon& operator=( const PolyPolygon& rPolyPoly );
- BOOL operator==( const PolyPolygon& rPolyPoly ) const;
- BOOL operator!=( const PolyPolygon& rPolyPoly ) const
+ sal_Bool operator==( const PolyPolygon& rPolyPoly ) const;
+ sal_Bool operator!=( const PolyPolygon& rPolyPoly ) const
{ return !(PolyPolygon::operator==( rPolyPoly )); }
sal_Bool IsEqual( const PolyPolygon& rPolyPoly ) const;
diff --git a/tools/inc/tools/postsys.h b/tools/inc/tools/postsys.h
index 3b7e37a4c23b..994f86ae35b5 100644
--- a/tools/inc/tools/postsys.h
+++ b/tools/inc/tools/postsys.h
@@ -33,8 +33,8 @@
#undef PolyPolygon
#undef Polygon
#undef Rectangle
-#undef BYTE
-#undef BOOL
+#undef sal_uInt8
+#undef sal_Bool
#undef DELETE
/* Hilfe-Ids umbenennen */
@@ -232,9 +232,9 @@
extern "C"
{
-WIN_BOOL WINAPI WIN_Rectangle( HDC hDC, int X1, int Y1, int X2, int Y2 );
-WIN_BOOL WINAPI WIN_Polygon( HDC hDC, CONST POINT * ppt, int ncnt );
-WIN_BOOL WINAPI WIN_PolyPolygon( HDC hDC, CONST POINT * ppt, LPINT npcnt, int ncnt );
+ BOOL WINAPI WIN_Rectangle( HDC hDC, int X1, int Y1, int X2, int Y2 );
+ BOOL WINAPI WIN_Polygon( HDC hDC, CONST POINT * ppt, int ncnt );
+ BOOL WINAPI WIN_PolyPolygon( HDC hDC, CONST POINT * ppt, LPINT npcnt, int ncnt );
}
#endif
diff --git a/tools/inc/tools/postwin.h b/tools/inc/tools/postwin.h
index a6bd3431a9dc..1e746a941f5c 100644
--- a/tools/inc/tools/postwin.h
+++ b/tools/inc/tools/postwin.h
@@ -247,9 +247,9 @@
#ifdef WNT
extern "C"
{
-WIN_BOOL WINAPI WIN_Rectangle( HDC hDC, int X1, int Y1, int X2, int Y2 );
-WIN_BOOL WINAPI WIN_Polygon( HDC hDC, CONST POINT * ppt, int ncnt );
-WIN_BOOL WINAPI WIN_PolyPolygon( HDC hDC, CONST POINT * ppt, LPINT npcnt, int ncnt );
+BOOL WINAPI WIN_Rectangle( HDC hDC, int X1, int Y1, int X2, int Y2 );
+BOOL WINAPI WIN_Polygon( HDC hDC, CONST POINT * ppt, int ncnt );
+BOOL WINAPI WIN_PolyPolygon( HDC hDC, CONST POINT * ppt, LPINT npcnt, int ncnt );
}
#endif
diff --git a/tools/inc/tools/presys.h b/tools/inc/tools/presys.h
index 457b57142dcd..7e84a92fb257 100644
--- a/tools/inc/tools/presys.h
+++ b/tools/inc/tools/presys.h
@@ -32,9 +32,6 @@
#if defined WNT
-#define BOOL WIN_BOOL
-#define BYTE WIN_BYTE
-
#define Rectangle BLA_Rectangle
#define Polygon BLA_Polygon
#define PolyPolygon BLA_PolyPolygon
diff --git a/tools/inc/tools/prewin.h b/tools/inc/tools/prewin.h
index 43a4452594cc..86bda268722d 100644
--- a/tools/inc/tools/prewin.h
+++ b/tools/inc/tools/prewin.h
@@ -29,15 +29,6 @@
#if defined WNT
-#define BOOL WIN_BOOL
-#define BYTE WIN_BYTE
-#ifndef VCL_NEED_BASETSD
-#define INT64 WIN_INT64
-#define UINT64 WIN_UINT64
-#define INT32 WIN_INT32
-#define UINT32 WIN_UINT32
-#endif
-
#define Rectangle BLA_Rectangle
#define Polygon BLA_Polygon
#define PolyPolygon BLA_PolyPolygon
diff --git a/tools/inc/tools/prex.h b/tools/inc/tools/prex.h
index 61088960bbfd..250a72b2476c 100644
--- a/tools/inc/tools/prex.h
+++ b/tools/inc/tools/prex.h
@@ -29,10 +29,6 @@
#define _PREX_H
#define Window XLIB_Window
-#define BYTE XLIB_BYTE
-#define INT8 XLIB_INT8
-#define INT64 XLIB_INT64
-#define BOOL XLIB_BOOL
#define Font XLIB_Font
#define Cursor XLIB_Cursor
#define String XLIB_String
diff --git a/tools/inc/tools/pstm.hxx b/tools/inc/tools/pstm.hxx
index 2575ccae8f3e..f149e977f3b3 100644
--- a/tools/inc/tools/pstm.hxx
+++ b/tools/inc/tools/pstm.hxx
@@ -52,11 +52,11 @@ typedef void * (*SvCreateInstancePersist)( SvPersistBase ** );
class TOOLS_DLLPUBLIC SvClassManager
{
- typedef std::hash_map< USHORT, SvCreateInstancePersist > Map;
+ typedef std::hash_map< sal_uInt16, SvCreateInstancePersist > Map;
Map aAssocTable;
public:
- void Register( USHORT nClassId, SvCreateInstancePersist pFunc );
- SvCreateInstancePersist Get( USHORT nClassId );
+ void Register( sal_uInt16 nClassId, SvCreateInstancePersist pFunc );
+ SvCreateInstancePersist Get( sal_uInt16 nClassId );
};
/************************** S v R t t i B a s e **************************/
@@ -71,11 +71,11 @@ SV_DECL_IMPL_REF(SvRttiBase)
/*************************************************************************/
#define SV_DECL_PERSIST( Class, CLASS_ID ) \
TYPEINFO(); \
- static USHORT StaticClassId() { return CLASS_ID; } \
+ static sal_uInt16 StaticClassId() { return CLASS_ID; } \
static void * CreateInstance( SvPersistBase ** ppBase ); \
friend SvPersistStream& operator >> ( SvPersistStream & rStm, \
Class *& rpObj); \
- virtual USHORT GetClassId() const; \
+ virtual sal_uInt16 GetClassId() const; \
virtual void Load( SvPersistStream & ); \
virtual void Save( SvPersistStream & );
@@ -89,7 +89,7 @@ SV_DECL_IMPL_REF(SvRttiBase)
*ppBase = p; \
return p; \
} \
- USHORT Class::GetClassId() const \
+ sal_uInt16 Class::GetClassId() const \
{ return StaticClassId(); } \
SvPersistStream& operator >> (SvPersistStream & rStm, Class *& rpObj)\
{ \
@@ -112,7 +112,7 @@ class SvPersistStream;
class SvPersistBase : public SvRttiBase
{
public:
- virtual USHORT GetClassId() const = 0;
+ virtual sal_uInt16 GetClassId() const = 0;
virtual void Load( SvPersistStream & ) = 0;
virtual void Save( SvPersistStream & ) = 0;
TOOLS_DLLPUBLIC friend SvPersistStream& operator >> ( SvPersistStream & rStm,
@@ -130,9 +130,9 @@ class TOOLS_DLLPUBLIC SvPersistBaseMemberList : public SuperSvPersistBaseMemberL
{
public:
SvPersistBaseMemberList();
- SvPersistBaseMemberList(USHORT nInitSz, USHORT nResize );
+ SvPersistBaseMemberList(sal_uInt16 nInitSz, sal_uInt16 nResize );
- void WriteObjects( SvPersistStream &, BOOL bOnlyStreamedObj = FALSE ) const;
+ void WriteObjects( SvPersistStream &, sal_Bool bOnlyStreamedObj = sal_False ) const;
TOOLS_DLLPUBLIC friend SvPersistStream& operator << (SvPersistStream &, const SvPersistBaseMemberList &);
TOOLS_DLLPUBLIC friend SvPersistStream& operator >> (SvPersistStream &, SvPersistBaseMemberList &);
};
@@ -170,7 +170,7 @@ class TOOLS_DLLPUBLIC SvPersistStream : public SvStream
die im Stream vorkommen k"onnen, ben"otigt. Die Liste aller Klassen
wird in einem <SvClassManager> Objekt gespeichert und dem
SvPersistStream "ubergeben, wenn er erzeugt wird.
- Weiterhin wird die M"oglichkeit geboten UINT32 Werte komprimiert
+ Weiterhin wird die M"oglichkeit geboten sal_uInt32 Werte komprimiert
zu schreiben und zu lesen (<SvPersistStream::WriteCompressed>,
<SvPersistStream::ReadCompressed>).
Es gibt auch die drei Hilfsmethoden <SvPersistStream::WriteDummyLen>,
@@ -201,49 +201,49 @@ class TOOLS_DLLPUBLIC SvPersistStream : public SvStream
SvStream * pStm;
Table aPTable; // Pointer und Key gedreht
SvPersistUIdx aPUIdx;
- ULONG nStartIdx;
+ sal_uIntPtr nStartIdx;
const SvPersistStream * pRefStm;
- UINT32 nFlags;
+ sal_uInt32 nFlags;
- virtual ULONG GetData( void* pData, ULONG nSize );
- virtual ULONG PutData( const void* pData, ULONG nSize );
- virtual ULONG SeekPos( ULONG nPos );
+ virtual sal_uIntPtr GetData( void* pData, sal_uIntPtr nSize );
+ virtual sal_uIntPtr PutData( const void* pData, sal_uIntPtr nSize );
+ virtual sal_uIntPtr SeekPos( sal_uIntPtr nPos );
virtual void FlushData();
protected:
- ULONG GetCurMaxIndex( const SvPersistUIdx & ) const;
- ULONG GetCurMaxIndex() const
+ sal_uIntPtr GetCurMaxIndex( const SvPersistUIdx & ) const;
+ sal_uIntPtr GetCurMaxIndex() const
{ return GetCurMaxIndex( aPUIdx ); }
- void WriteObj( BYTE nHdr, SvPersistBase * pObj );
- UINT32 ReadObj( SvPersistBase * & rpObj,
- BOOL bRegister );
+ void WriteObj( sal_uInt8 nHdr, SvPersistBase * pObj );
+ sal_uInt32 ReadObj( SvPersistBase * & rpObj,
+ sal_Bool bRegister );
public:
- BOOL IsStreamed( SvPersistBase * pObj ) const
+ sal_Bool IsStreamed( SvPersistBase * pObj ) const
{ return 0 != GetIndex( pObj ); }
virtual void ResetError();
SvPersistStream( SvClassManager &, SvStream * pStream,
- UINT32 nStartIdx = 1 );
+ sal_uInt32 nStartIdx = 1 );
SvPersistStream( SvClassManager &, SvStream * pStream,
const SvPersistStream & rPersStm );
~SvPersistStream();
void SetStream( SvStream * pStream );
SvStream * GetStream() const { return pStm; }
- virtual USHORT IsA() const;
+ virtual sal_uInt16 IsA() const;
- SvPersistBase * GetObject( ULONG nIdx ) const;
- ULONG GetIndex( SvPersistBase * ) const;
+ SvPersistBase * GetObject( sal_uIntPtr nIdx ) const;
+ sal_uIntPtr GetIndex( SvPersistBase * ) const;
- void SetContextFlags( UINT32 n ) { nFlags = n; }
- UINT32 GetContextFlags() const { return nFlags; }
+ void SetContextFlags( sal_uInt32 n ) { nFlags = n; }
+ sal_uInt32 GetContextFlags() const { return nFlags; }
- static void WriteCompressed( SvStream & rStm, UINT32 nVal );
- static UINT32 ReadCompressed( SvStream & rStm );
+ static void WriteCompressed( SvStream & rStm, sal_uInt32 nVal );
+ static sal_uInt32 ReadCompressed( SvStream & rStm );
- UINT32 WriteDummyLen();
- void WriteLen( UINT32 nLenPos );
- UINT32 ReadLen( UINT32 * pTestPos );
+ sal_uInt32 WriteDummyLen();
+ void WriteLen( sal_uInt32 nLenPos );
+ sal_uInt32 ReadLen( sal_uInt32 * pTestPos );
SvPersistStream& WritePointer( SvPersistBase * pObj );
SvPersistStream& ReadPointer( SvPersistBase * & rpObj );
@@ -254,8 +254,8 @@ public:
// gespeichert werden.
friend SvStream& operator >> ( SvStream &, SvPersistStream & );
friend SvStream& operator << ( SvStream &, SvPersistStream & );
- ULONG InsertObj( SvPersistBase * );
- ULONG RemoveObj( SvPersistBase * );
+ sal_uIntPtr InsertObj( SvPersistBase * );
+ sal_uIntPtr RemoveObj( SvPersistBase * );
};
#endif // _PSTM_HXX
diff --git a/tools/inc/tools/queue.hxx b/tools/inc/tools/queue.hxx
index cb89bce6cdda..4df0a60a1618 100644
--- a/tools/inc/tools/queue.hxx
+++ b/tools/inc/tools/queue.hxx
@@ -45,19 +45,19 @@ public:
using Container::GetObject;
using Container::GetPos;
- Queue( USHORT _nInitSize = 16, USHORT _nReSize = 16 ) :
+ Queue( sal_uInt16 _nInitSize = 16, sal_uInt16 _nReSize = 16 ) :
Container( _nReSize, _nInitSize, _nReSize ) {}
Queue( const Queue& rQueue ) : Container( rQueue ) {}
void Put( void* p ) { Container::Insert( p, CONTAINER_APPEND ); }
- void* Get() { return Container::Remove( (ULONG)0 ); }
+ void* Get() { return Container::Remove( (sal_uIntPtr)0 ); }
Queue& operator =( const Queue& rQueue )
{ Container::operator =( rQueue ); return *this; }
- BOOL operator ==( const Queue& rQueue ) const
+ sal_Bool operator ==( const Queue& rQueue ) const
{ return Container::operator ==( rQueue ); }
- BOOL operator !=( const Queue& rQueue ) const
+ sal_Bool operator !=( const Queue& rQueue ) const
{ return Container::operator !=( rQueue ); }
};
@@ -72,8 +72,8 @@ public: \
using Queue::Clear; \
using Queue::Count; \
\
- ClassName( USHORT _nInitSize = 16, \
- USHORT _nReSize = 16 ) : \
+ ClassName( sal_uInt16 _nInitSize = 16, \
+ sal_uInt16 _nReSize = 16 ) : \
Queue( _nInitSize, _nReSize ) {} \
ClassName( const ClassName& rClassName ) : \
Queue( rClassName ) {} \
@@ -81,12 +81,12 @@ public: \
void Put( Type p ) { Queue::Put( (void*)p ); } \
Type Get() { return (Type)Queue::Get(); } \
\
- Type GetObject( ULONG nIndex ) const \
+ Type GetObject( sal_uIntPtr nIndex ) const \
{ return (Type)Queue::GetObject( nIndex ); } \
- ULONG GetPos( const Type p ) const \
+ sal_uIntPtr GetPos( const Type p ) const \
{ return Queue::GetPos( (const void*)p ); } \
- ULONG GetPos( const Type p, ULONG nStartIndex, \
- BOOL bForward = TRUE ) const \
+ sal_uIntPtr GetPos( const Type p, sal_uIntPtr nStartIndex, \
+ sal_Bool bForward = sal_True ) const \
{ return Queue::GetPos( (const void*)p, \
nStartIndex, \
bForward ); } \
@@ -95,9 +95,9 @@ public: \
{ Queue::operator =( rClassName ); \
return *this; } \
\
- BOOL operator ==( const Queue& rQueue ) const \
+ sal_Bool operator ==( const Queue& rQueue ) const \
{ return Queue::operator ==( rQueue ); } \
- BOOL operator !=( const Queue& rQueue ) const \
+ sal_Bool operator !=( const Queue& rQueue ) const \
{ return Queue::operator !=( rQueue ); } \
};
diff --git a/tools/inc/tools/rc.hxx b/tools/inc/tools/rc.hxx
index 15e077c3c62c..d8cd73d6dcbc 100644
--- a/tools/inc/tools/rc.hxx
+++ b/tools/inc/tools/rc.hxx
@@ -42,7 +42,7 @@ class TOOLS_DLLPUBLIC Resource
ResMgr* m_pResMgr;
// check availability of Resource
- BOOL IsAvailableRes( const ResId& rId ) const
+ sal_Bool IsAvailableRes( const ResId& rId ) const
{ return m_pResMgr->IsAvailable( rId, this ); }
// Load a Resource
@@ -56,7 +56,7 @@ class TOOLS_DLLPUBLIC Resource
{ return m_pResMgr->GetClass(); }
// read a string from the resource
- static sal_uInt32 GetStringRes( UniString& rStr, const BYTE* pStr )
+ static sal_uInt32 GetStringRes( UniString& rStr, const sal_uInt8* pStr )
{ return ResMgr::GetString( rStr, pStr ); }
// increase the memory pointer gotten by GetClassRes()
diff --git a/tools/inc/tools/ref.hxx b/tools/inc/tools/ref.hxx
index ea1886b73e04..e2c2c5c893be 100644
--- a/tools/inc/tools/ref.hxx
+++ b/tools/inc/tools/ref.hxx
@@ -41,7 +41,7 @@
inline ~ClassName##Ref(); \
inline ClassName##Ref & operator = ( const ClassName##Ref & rObj ); \
inline ClassName##Ref & operator = ( ClassName * pObj ); \
- inline BOOL Is() const { return pObj != NULL; } \
+ inline sal_Bool Is() const { return pObj != NULL; } \
inline ClassName * operator & () const { return pObj; } \
inline ClassName * operator -> () const { return pObj; } \
inline ClassName & operator * () const { return *pObj; } \
@@ -106,8 +106,8 @@ PRV_SV_IMPL_REF_COUNTERS( ClassName, Ref, AddRef(), AddNextRef(),\
ReleaseReference(), EMPTYARG, pObj )
#define SV_IMPL_LOCK( ClassName ) \
-PRV_SV_IMPL_REF_COUNTERS( ClassName, Lock, OwnerLock( TRUE ), \
- OwnerLock( TRUE ), OwnerLock( FALSE ), \
+PRV_SV_IMPL_REF_COUNTERS( ClassName, Lock, OwnerLock( sal_True ), \
+ OwnerLock( sal_True ), OwnerLock( sal_False ), \
EMPTYARG, pObj )
#define SV_DECL_IMPL_REF(ClassName) \
@@ -126,7 +126,7 @@ class vis CN##MemberList : public CN##List\
{\
public:\
inline CN##MemberList();\
-inline CN##MemberList(USHORT nInitSz, USHORT nResize );\
+inline CN##MemberList(sal_uInt16 nInitSz, sal_uInt16 nResize );\
inline CN##MemberList( const CN##MemberList & rRef );\
inline ~CN##MemberList();\
inline CN##MemberList & operator =\
@@ -134,17 +134,17 @@ inline CN##MemberList & operator =\
inline void Clear();\
inline void Insert( EN p )\
{ CN##List::Insert( p ); p->AddRef();}\
-inline void Insert( EN p, ULONG nIndex )\
+inline void Insert( EN p, sal_uIntPtr nIndex )\
{ CN##List::Insert( p, nIndex ); p->AddRef();}\
inline void Insert( EN p, EN pOld )\
{ CN##List::Insert( p, pOld ); p->AddRef();}\
inline void Append( EN p )\
{ Insert( p, LIST_APPEND );}\
inline EN Remove();\
-inline EN Remove( ULONG nIndex );\
+inline EN Remove( sal_uIntPtr nIndex );\
inline EN Remove( EN p );\
inline EN Replace( EN p );\
-inline EN Replace( EN p, ULONG nIndex );\
+inline EN Replace( EN p, sal_uIntPtr nIndex );\
inline EN Replace( EN pNew, EN pOld );\
inline void Append( const CN##MemberList & );\
};
@@ -157,12 +157,12 @@ PRV_SV_DECL_REF_LIST(CN,EN,vis)
/************************** S v R e f L i s t ****************************/
#define SV_IMPL_REF_LIST( CN, EN ) \
inline CN##MemberList::CN##MemberList(){}\
-inline CN##MemberList::CN##MemberList(USHORT nInitSz, USHORT nResize )\
+inline CN##MemberList::CN##MemberList(sal_uInt16 nInitSz, sal_uInt16 nResize )\
: CN##List( nInitSz, nResize ){}\
inline CN##MemberList::CN##MemberList( const CN##MemberList & rRef ) \
: CN##List( rRef ) \
{\
- ULONG nOldCount = Count(); \
+ sal_uIntPtr nOldCount = Count(); \
EN pEntry = First(); \
while( pEntry ) \
{ pEntry->AddRef(); pEntry = Next(); } \
@@ -173,7 +173,7 @@ inline CN##MemberList & CN##MemberList::operator = \
( const CN##MemberList & rRef ) \
{\
CN##MemberList & rList = (CN##MemberList &)rRef; \
- ULONG nOldCount = rList.Count(); \
+ sal_uIntPtr nOldCount = rList.Count(); \
/* Count der Objekte erhoehen */ \
EN pEntry = rList.First(); \
while( pEntry ) \
@@ -195,7 +195,7 @@ inline EN CN##MemberList::Remove() \
EN p = CN##List::Remove(); \
if( p ) p->ReleaseReference(); return p; \
}\
-inline EN CN##MemberList::Remove( ULONG nIndex ) \
+inline EN CN##MemberList::Remove( sal_uIntPtr nIndex ) \
{\
EN p = CN##List::Remove( nIndex ); \
if( p ) p->ReleaseReference(); return p; \
@@ -210,7 +210,7 @@ inline EN CN##MemberList::Replace( EN p ) \
p->AddRef(); p = CN##List::Replace( p ); \
if( p ) p->ReleaseReference(); return p; \
}\
-inline EN CN##MemberList::Replace( EN p, ULONG nIndex ) \
+inline EN CN##MemberList::Replace( EN p, sal_uIntPtr nIndex ) \
{\
p->AddRef(); p = CN##List::Replace( p, nIndex ); \
if( p ) p->ReleaseReference(); return p; \
@@ -222,7 +222,7 @@ inline EN CN##MemberList::Replace( EN pNew, EN pOld ) \
}\
inline void CN##MemberList::Append( const CN##MemberList & rList )\
{\
- for( ULONG i = 0; i < rList.Count(); i++ )\
+ for( sal_uIntPtr i = 0; i < rList.Count(); i++ )\
Append( rList.GetObject( i ) );\
}
@@ -234,23 +234,23 @@ inline void CN##MemberList::Append( const CN##MemberList & rList )\
/************************** S v M e m b e r L i s t **********************/
#define PRV_SV_DECL_MEMBER_LIST(Class,EntryName) \
Class##MemberList() {} \
-inline Class##MemberList(USHORT nInitSz,USHORT nResize);\
+inline Class##MemberList(sal_uInt16 nInitSz,sal_uInt16 nResize);\
inline void Insert( EntryName p ); \
-inline void Insert( EntryName p, ULONG nIndex ); \
+inline void Insert( EntryName p, sal_uIntPtr nIndex ); \
inline void Insert( EntryName p, EntryName pOld ); \
inline void Append( EntryName p ); \
inline EntryName Remove(); \
-inline EntryName Remove( ULONG nIndex ); \
+inline EntryName Remove( sal_uIntPtr nIndex ); \
inline EntryName Remove( EntryName p ); \
inline EntryName Replace( EntryName p ); \
-inline EntryName Replace( EntryName p, ULONG nIndex );\
+inline EntryName Replace( EntryName p, sal_uIntPtr nIndex );\
inline EntryName Replace( EntryName pNew, EntryName pOld );\
inline EntryName GetCurObject() const;\
-inline EntryName GetObject( ULONG nIndex ) const;\
-inline ULONG GetPos( const EntryName ) const;\
-inline ULONG GetPos( const EntryName, ULONG nStartIndex,\
- BOOL bForward = TRUE ) const;\
-inline EntryName Seek( ULONG nIndex );\
+inline EntryName GetObject( sal_uIntPtr nIndex ) const;\
+inline sal_uIntPtr GetPos( const EntryName ) const;\
+inline sal_uIntPtr GetPos( const EntryName, sal_uIntPtr nStartIndex,\
+ sal_Bool bForward = sal_True ) const;\
+inline EntryName Seek( sal_uIntPtr nIndex );\
inline EntryName Seek( EntryName p );\
inline EntryName First();\
inline EntryName Last();\
@@ -260,11 +260,11 @@ inline void Append( const Class##MemberList & rList );
#define PRV_SV_IMPL_MEMBER_LIST(ClassName,EntryName,BaseList)\
inline ClassName##MemberList::ClassName##MemberList\
- (USHORT nInitSz,USHORT nResize)\
+ (sal_uInt16 nInitSz,sal_uInt16 nResize)\
: BaseList( nInitSz, nResize ){}\
inline void ClassName##MemberList::Insert( EntryName p )\
{BaseList::Insert(p);}\
-inline void ClassName##MemberList::Insert( EntryName p, ULONG nIdx )\
+inline void ClassName##MemberList::Insert( EntryName p, sal_uIntPtr nIdx )\
{BaseList::Insert(p,nIdx);}\
inline void ClassName##MemberList::Insert( EntryName p, EntryName pOld )\
{BaseList::Insert(p,pOld);}\
@@ -272,21 +272,21 @@ inline void ClassName##MemberList::Append( EntryName p )\
{BaseList::Append(p);}\
inline EntryName ClassName##MemberList::Remove()\
{return (EntryName)BaseList::Remove();}\
-inline EntryName ClassName##MemberList::Remove( ULONG nIdx )\
+inline EntryName ClassName##MemberList::Remove( sal_uIntPtr nIdx )\
{return (EntryName)BaseList::Remove(nIdx);}\
inline EntryName ClassName##MemberList::Remove( EntryName p )\
{return (EntryName)BaseList::Remove(p);}\
inline EntryName ClassName##MemberList::Replace( EntryName p )\
{return (EntryName)BaseList::Replace(p);}\
-inline EntryName ClassName##MemberList::Replace( EntryName p, ULONG nIdx )\
+inline EntryName ClassName##MemberList::Replace( EntryName p, sal_uIntPtr nIdx )\
{return (EntryName)BaseList::Replace(p,nIdx);}\
inline EntryName ClassName##MemberList::Replace( EntryName p, EntryName pOld )\
{return (EntryName)BaseList::Replace(p,pOld);}\
inline EntryName ClassName##MemberList::GetCurObject() const\
{return (EntryName)BaseList::GetCurObject();}\
-inline EntryName ClassName##MemberList::GetObject( ULONG nIdx ) const\
+inline EntryName ClassName##MemberList::GetObject( sal_uIntPtr nIdx ) const\
{return (EntryName)BaseList::GetObject( nIdx );}\
-inline EntryName ClassName##MemberList::Seek( ULONG nIdx )\
+inline EntryName ClassName##MemberList::Seek( sal_uIntPtr nIdx )\
{return (EntryName)BaseList::Seek( nIdx );}\
inline EntryName ClassName##MemberList::Seek( EntryName p )\
{return (EntryName)BaseList::Seek( p );}\
@@ -300,10 +300,10 @@ inline EntryName ClassName##MemberList::Prev()\
{return (EntryName)BaseList::Prev();}\
inline void ClassName##MemberList::Append( const ClassName##MemberList & rList )\
{BaseList::Append(rList);}\
-inline ULONG ClassName##MemberList::GetPos( const EntryName p) const\
+inline sal_uIntPtr ClassName##MemberList::GetPos( const EntryName p) const\
{return BaseList::GetPos( p );}\
-inline ULONG ClassName##MemberList::GetPos\
- ( const EntryName p, ULONG nStart, BOOL bForward ) const\
+inline sal_uIntPtr ClassName##MemberList::GetPos\
+ ( const EntryName p, sal_uIntPtr nStart, sal_Bool bForward ) const\
{return BaseList::GetPos( p, nStart, bForward );}
#define SV_DECL_MEMBER_LIST(ClassName,EntryName)\
@@ -324,7 +324,7 @@ SV_IMPL_MEMBER_LIST(ClassName,EntryName)
#define SV_NO_DELETE_REFCOUNT 0x80000000
class TOOLS_DLLPUBLIC SvRefBase
{
- UINT32 nRefCount;
+ sal_uIntPtr nRefCount;
#if defined (GCC) && (defined (C281) || defined (C290) || defined (C291))
public:
#else
@@ -343,9 +343,9 @@ public:
if( nRefCount < SV_NO_DELETE_REFCOUNT )
nRefCount += SV_NO_DELETE_REFCOUNT;
}
- UINT32 AddMulRef( UINT32 n ) { return nRefCount += n; }
- UINT32 AddNextRef() { return ++nRefCount; }
- UINT32 AddRef()
+ sal_uIntPtr AddMulRef( sal_uIntPtr n ) { return nRefCount += n; }
+ sal_uIntPtr AddNextRef() { return ++nRefCount; }
+ sal_uIntPtr AddRef()
{
if( nRefCount >= SV_NO_DELETE_REFCOUNT )
nRefCount -= SV_NO_DELETE_REFCOUNT;
@@ -356,14 +356,14 @@ public:
if( !--nRefCount )
QueryDelete();
}
- UINT32 ReleaseRef()
+ sal_uIntPtr ReleaseRef()
{
- UINT32 n = --nRefCount;
+ sal_uIntPtr n = --nRefCount;
if( !n )
QueryDelete();
return n;
}
- UINT32 GetRefCount() const { return nRefCount; }
+ sal_uIntPtr GetRefCount() const { return nRefCount; }
};
//#if 0 // _SOLAR__PRIVATE
@@ -436,7 +436,7 @@ public: \
inline void Clear() { _xHdl.Clear(); } \
inline ClassName##Weak& operator = ( ClassName * pObj ) { \
_xHdl = pObj ? pObj->GetHdl() : 0; return *this; } \
- inline BOOL Is() const { \
+ inline sal_Bool Is() const { \
return _xHdl.Is() && _xHdl->GetObj(); } \
inline ClassName * operator & () const { \
return (ClassName*) ( _xHdl.Is() ? _xHdl->GetObj() : 0 ); } \
diff --git a/tools/inc/tools/resid.hxx b/tools/inc/tools/resid.hxx
index cfefce8e6ab0..cf3ec3d78ea9 100644
--- a/tools/inc/tools/resid.hxx
+++ b/tools/inc/tools/resid.hxx
@@ -75,7 +75,7 @@ class ResId
ImplInit( nId, rMgr, NULL );
}
// backwards compatibility; avoid ambiguities
- ResId( USHORT nId, ResMgr& rMgr )
+ ResId( sal_uInt16 nId, ResMgr& rMgr )
{
ImplInit( sal_uInt32(nId), rMgr, NULL );
}
@@ -143,7 +143,7 @@ class ResId
return *this;
}
- const ResId & SetAutoRelease(BOOL bRelease) const
+ const ResId & SetAutoRelease(sal_Bool bRelease) const
{
if( bRelease )
m_nResId &= ~RSC_DONTRELEASE;
@@ -152,7 +152,7 @@ class ResId
return *this;
}
- BOOL IsAutoRelease() const
+ sal_Bool IsAutoRelease() const
{ return !(m_nResId & RSC_DONTRELEASE); }
sal_uInt32 GetId() const { return m_nResId & ~RSC_DONTRELEASE; }
diff --git a/tools/inc/tools/resmgr.hxx b/tools/inc/tools/resmgr.hxx
index 4b79040921b3..327eff7a3b80 100644
--- a/tools/inc/tools/resmgr.hxx
+++ b/tools/inc/tools/resmgr.hxx
@@ -138,7 +138,7 @@ private:
// the next two methods are needed to prevent the string hook called
// with the res mgr mutex locked
// like GetString, but doesn't call the string hook
- TOOLS_DLLPRIVATE static sal_uInt32 GetStringWithoutHook( UniString& rStr, const BYTE* pStr );
+ TOOLS_DLLPRIVATE static sal_uInt32 GetStringWithoutHook( UniString& rStr, const sal_uInt8* pStr );
// like ReadString but doesn't call the string hook
TOOLS_DLLPRIVATE UniString ReadStringWithoutHook();
@@ -153,7 +153,7 @@ public:
~ResMgr();
// Sprachabhaengige Ressource Library
- static const sal_Char* GetLang( LanguageType& eLanguage, USHORT nPrio = 0 ); //depricated! see "tools/source/rc/resmgr.cxx"
+ static const sal_Char* GetLang( LanguageType& eLanguage, sal_uInt16 nPrio = 0 ); //depricated! see "tools/source/rc/resmgr.cxx"
static ResMgr* SearchCreateResMgr( const sal_Char* pPrefixName,
com::sun::star::lang::Locale& rLocale );
static ResMgr* CreateResMgr( const sal_Char* pPrefixName,
@@ -165,11 +165,11 @@ public:
void TestStack( const Resource * );
// ist Resource verfuegbar
- BOOL IsAvailable( const ResId& rId,
+ sal_Bool IsAvailable( const ResId& rId,
const Resource* = NULL) const;
// Resource suchen und laden
- BOOL GetResource( const ResId& rId, const Resource * = NULL );
+ sal_Bool GetResource( const ResId& rId, const Resource * = NULL );
static void * GetResourceSkipHeader( const ResId& rResId, ResMgr ** ppResMgr );
// Kontext freigeben
void PopContext( const Resource* = NULL );
@@ -182,21 +182,21 @@ public:
{ return( pHT->GetGlobOff() ); }
// returns a string and its length out of the resource
- static sal_uInt32 GetString( UniString& rStr, const BYTE* pStr );
+ static sal_uInt32 GetString( UniString& rStr, const sal_uInt8* pStr );
// returns a byte string and its length out of the resource
- static sal_uInt32 GetByteString( rtl::OString& rStr, const BYTE* pStr );
+ static sal_uInt32 GetByteString( rtl::OString& rStr, const sal_uInt8* pStr );
// Groesse eines Strings in der Resource
static sal_uInt32 GetStringSize( sal_uInt32 nLen )
{ nLen++; return (nLen + nLen%2); }
- static sal_uInt32 GetStringSize( const BYTE* pStr, sal_uInt32& nLen );
+ static sal_uInt32 GetStringSize( const sal_uInt8* pStr, sal_uInt32& nLen );
// return a int64
static sal_uInt64 GetUInt64( void* pDatum );
// Gibt einen long zurueck
- static INT32 GetLong( void * pLong );
+ static sal_Int32 GetLong( void * pLong );
// return a short
- static INT16 GetShort( void * pShort );
+ static sal_Int16 GetShort( void * pShort );
// Gibt einen Zeiger auf die Resource zurueck
void * GetClass();
@@ -208,8 +208,8 @@ public:
const rtl::OUString&GetFileName() const;
- INT16 ReadShort();
- INT32 ReadLong();
+ sal_Int16 ReadShort();
+ sal_Int32 ReadLong();
UniString ReadString();
rtl::OString ReadByteString();
diff --git a/tools/inc/tools/rtti.hxx b/tools/inc/tools/rtti.hxx
index 1f8673596b48..70a9dee7c04d 100644
--- a/tools/inc/tools/rtti.hxx
+++ b/tools/inc/tools/rtti.hxx
@@ -38,25 +38,25 @@ typedef void* (*TypeId)();
#define TYPEINFO() \
static void* CreateType(); \
static TypeId StaticType(); \
- static BOOL IsOf( TypeId aSameOrSuperType ); \
+ static sal_Bool IsOf( TypeId aSameOrSuperType ); \
virtual TypeId Type() const; \
- virtual BOOL IsA( TypeId aSameOrSuperType ) const
+ virtual sal_Bool IsA( TypeId aSameOrSuperType ) const
#define TYPEINFO_VISIBILITY(visibility) \
visibility static void* CreateType(); \
visibility static TypeId StaticType(); \
- visibility static BOOL IsOf( TypeId aSameOrSuperType ); \
+ visibility static sal_Bool IsOf( TypeId aSameOrSuperType ); \
visibility virtual TypeId Type() const; \
- visibility virtual BOOL IsA( TypeId aSameOrSuperType ) const
+ visibility virtual sal_Bool IsA( TypeId aSameOrSuperType ) const
#define TYPEINIT_FACTORY(sType, Factory ) \
void* sType::CreateType() { return Factory; } \
TypeId sType::StaticType() { return &CreateType; } \
TypeId sType::Type() const { return &CreateType; } \
- BOOL sType::IsOf( TypeId aSameOrSuperType ) \
+ sal_Bool sType::IsOf( TypeId aSameOrSuperType ) \
{ \
if ( aSameOrSuperType == StaticType() ) \
- return TRUE
+ return sal_True
#define STATICTYPE(sType) (sType::StaticType())
@@ -67,12 +67,12 @@ typedef void* (*TypeId)();
#define SUPERTYPE(sSuper) \
if ( sSuper::IsOf(aSameOrSuperType ) ) \
- return TRUE
+ return sal_True
#define TYPEINIT_END(sType) \
- return FALSE; \
+ return sal_False; \
} \
- BOOL sType::IsA( TypeId aSameOrSuperType ) const \
+ sal_Bool sType::IsA( TypeId aSameOrSuperType ) const \
{ return IsOf( aSameOrSuperType ); }
#define TYPEINIT0_FACTORY(sType, Factory) \
@@ -121,16 +121,16 @@ typedef void* (*TypeId)();
#define TYPEINFO_ID(id) \
static TypeId StaticType() { return (TypeId) ( id | 0xF000000L ); } \
- static BOOL IsOf( TypeId aSameOrSuperType ); \
+ static sal_Bool IsOf( TypeId aSameOrSuperType ); \
virtual TypeId Type() const; \
- virtual BOOL IsA( TypeId aSameOrSuperType ) const
+ virtual sal_Bool IsA( TypeId aSameOrSuperType ) const
#define TYPEINIT_ID(sType) \
TypeId sType::Type() const { return StaticType(); } \
- BOOL sType::IsOf( TypeId aSameOrSuperType ) \
+ sal_Bool sType::IsOf( TypeId aSameOrSuperType ) \
{ \
if ( aSameOrSuperType == StaticType() ) \
- return TRUE
+ return sal_True
#define TYPEINIT0_ID(sType) \
TYPEINIT_ID(sType); \
diff --git a/tools/inc/tools/shl.hxx b/tools/inc/tools/shl.hxx
index ab08e3cc7a58..73933d91e53b 100644
--- a/tools/inc/tools/shl.hxx
+++ b/tools/inc/tools/shl.hxx
@@ -109,6 +109,6 @@
#define SHL_COUNT 64
-TOOLS_DLLPUBLIC void** GetAppData( USHORT nSharedLib );
+TOOLS_DLLPUBLIC void** GetAppData( sal_uInt16 nSharedLib );
#endif // _SHL_HXX
diff --git a/tools/inc/tools/solar.h b/tools/inc/tools/solar.h
index cc7c189fbf84..1686e82bf52d 100644
--- a/tools/inc/tools/solar.h
+++ b/tools/inc/tools/solar.h
@@ -34,57 +34,24 @@
/*** common solar defines ***********************************/
-#ifndef TRUE
-#define TRUE 1
-#endif
-#ifndef FALSE
-#define FALSE 0
-#endif
-
#ifdef _SOLAR__PRIVATE
#undef _SOLAR__PRIVATE
#endif
#define _SOLAR__PRIVATE 1
#define __REFERENCED 0
-/*** common solar types ********************************************/
-/* NOTE: these types are deprecated, or soon will be. They should */
-/* not be used in new code, and should be replaced with their */
-/* corresponding types from sal/types.h in old code when possible. */
-/* Previous typedefs from before sal convergence are in comments */
-/* to the right of the new types. */
-
-typedef sal_Bool BOOL; /* typedef unsigned char BOOL; */
-typedef sal_uInt8 BYTE; /* typedef unsigned char BYTE; */
-typedef sal_uInt16 USHORT; /* typedef unsigned short USHORT; */
-typedef sal_uIntPtr ULONG; /* typedef unsigned long ULONG; */
-typedef int FASTBOOL;
-
-#if !defined(VCL_NEED_BASETSD) || defined(__MINGW32__)
-#ifndef _SOLAR_NOUINT
-typedef sal_Int16 INT16; /* typedef short INT16; */
-typedef sal_uInt16 UINT16; /* typedef unsigned short UINT16; */
-#if defined(SAL_W32)
-typedef sal_sChar INT8;
-#else
-typedef sal_Char INT8; /* typedef char INT8; */
-#endif
-typedef sal_uInt8 UINT8; /* typedef unsigned char UINT8; */
-#endif /* _SOLAR_NOUINT */
-#endif
-
-#ifndef VCL_NEED_BASETSD
-#ifndef _SOLAR_NOUINT
-/* types with exact defined size (not just the minimum size) */
-typedef sal_Int64 INT64; /* typedef long INT64; previously "void" on Windows */
-typedef sal_uInt64 UINT64; /* typedef unsigned long UINT64; previously "void" on Windows */
-typedef sal_Int32 INT32; /* typedef int INT32; previously "long" on Windows */
-typedef sal_uInt32 UINT32; /* typedef unsigned int UINT32; previously "unsigned long" on Windows */
-#endif /* _SOLAR_NOUINT */
-#endif
+/************************************************************
+ Intermediate type to solve type clash with Windows headers.
+ Should be removed as soon as all code parts have been reviewed
+ and the correct type is known. Most of the times ULONG is meant
+ to be a 32-Bit unsigned integer type as sal_uInt32 is often
+ used for data exchange or for similiar method args.
+*************************************************************/
+typedef sal_uIntPtr sal_uLong; /* Replaces type ULONG */
/*** misc. macros to leverage platform and compiler differences ********/
+typedef int FASTBOOL;
#define DELETEZ( p ) ( delete p,p = 0 )
#define __FAR_DATA
@@ -114,69 +81,69 @@ typedef sal_uInt32 UINT32; /* typedef unsigned int UINT32; previousl
always little endian;
not necessarily aligned */
-typedef BYTE SVBT8[1];
-typedef BYTE SVBT16[2];
-typedef BYTE SVBT32[4];
-typedef BYTE SVBT64[8];
+typedef sal_uInt8 SVBT8[1];
+typedef sal_uInt8 SVBT16[2];
+typedef sal_uInt8 SVBT32[4];
+typedef sal_uInt8 SVBT64[8];
#ifdef __cplusplus
-inline BYTE SVBT8ToByte ( const SVBT8 p ) { return p[0]; }
-inline USHORT SVBT16ToShort( const SVBT16 p ) { return (USHORT)p[0]
- + ((USHORT)p[1] << 8); }
+inline sal_uInt8 SVBT8ToByte ( const SVBT8 p ) { return p[0]; }
+inline sal_uInt16 SVBT16ToShort( const SVBT16 p ) { return (sal_uInt16)p[0]
+ + ((sal_uInt16)p[1] << 8); }
inline sal_uInt32 SVBT32ToUInt32 ( const SVBT32 p ) { return (sal_uInt32)p[0]
+ ((sal_uInt32)p[1] << 8)
+ ((sal_uInt32)p[2] << 16)
+ ((sal_uInt32)p[3] << 24); }
#if defined OSL_LITENDIAN
inline double SVBT64ToDouble( const SVBT64 p ) { double n;
- ((BYTE*)&n)[0] = p[0];
- ((BYTE*)&n)[1] = p[1];
- ((BYTE*)&n)[2] = p[2];
- ((BYTE*)&n)[3] = p[3];
- ((BYTE*)&n)[4] = p[4];
- ((BYTE*)&n)[5] = p[5];
- ((BYTE*)&n)[6] = p[6];
- ((BYTE*)&n)[7] = p[7];
+ ((sal_uInt8*)&n)[0] = p[0];
+ ((sal_uInt8*)&n)[1] = p[1];
+ ((sal_uInt8*)&n)[2] = p[2];
+ ((sal_uInt8*)&n)[3] = p[3];
+ ((sal_uInt8*)&n)[4] = p[4];
+ ((sal_uInt8*)&n)[5] = p[5];
+ ((sal_uInt8*)&n)[6] = p[6];
+ ((sal_uInt8*)&n)[7] = p[7];
return n; }
#else
inline double SVBT64ToDouble( const SVBT64 p ) { double n;
- ((BYTE*)&n)[0] = p[7];
- ((BYTE*)&n)[1] = p[6];
- ((BYTE*)&n)[2] = p[5];
- ((BYTE*)&n)[3] = p[4];
- ((BYTE*)&n)[4] = p[3];
- ((BYTE*)&n)[5] = p[2];
- ((BYTE*)&n)[6] = p[1];
- ((BYTE*)&n)[7] = p[0];
+ ((sal_uInt8*)&n)[0] = p[7];
+ ((sal_uInt8*)&n)[1] = p[6];
+ ((sal_uInt8*)&n)[2] = p[5];
+ ((sal_uInt8*)&n)[3] = p[4];
+ ((sal_uInt8*)&n)[4] = p[3];
+ ((sal_uInt8*)&n)[5] = p[2];
+ ((sal_uInt8*)&n)[6] = p[1];
+ ((sal_uInt8*)&n)[7] = p[0];
return n; }
#endif
-inline void ByteToSVBT8 ( BYTE n, SVBT8 p ) { p[0] = n; }
-inline void ShortToSVBT16( USHORT n, SVBT16 p ) { p[0] = (BYTE) n;
- p[1] = (BYTE)(n >> 8); }
-inline void UInt32ToSVBT32 ( sal_uInt32 n, SVBT32 p ) { p[0] = (BYTE) n;
- p[1] = (BYTE)(n >> 8);
- p[2] = (BYTE)(n >> 16);
- p[3] = (BYTE)(n >> 24); }
+inline void ByteToSVBT8 ( sal_uInt8 n, SVBT8 p ) { p[0] = n; }
+inline void ShortToSVBT16( sal_uInt16 n, SVBT16 p ) { p[0] = (sal_uInt8) n;
+ p[1] = (sal_uInt8)(n >> 8); }
+inline void UInt32ToSVBT32 ( sal_uInt32 n, SVBT32 p ) { p[0] = (sal_uInt8) n;
+ p[1] = (sal_uInt8)(n >> 8);
+ p[2] = (sal_uInt8)(n >> 16);
+ p[3] = (sal_uInt8)(n >> 24); }
#if defined OSL_LITENDIAN
-inline void DoubleToSVBT64( double n, SVBT64 p ) { p[0] = ((BYTE*)&n)[0];
- p[1] = ((BYTE*)&n)[1];
- p[2] = ((BYTE*)&n)[2];
- p[3] = ((BYTE*)&n)[3];
- p[4] = ((BYTE*)&n)[4];
- p[5] = ((BYTE*)&n)[5];
- p[6] = ((BYTE*)&n)[6];
- p[7] = ((BYTE*)&n)[7]; }
+inline void DoubleToSVBT64( double n, SVBT64 p ) { p[0] = ((sal_uInt8*)&n)[0];
+ p[1] = ((sal_uInt8*)&n)[1];
+ p[2] = ((sal_uInt8*)&n)[2];
+ p[3] = ((sal_uInt8*)&n)[3];
+ p[4] = ((sal_uInt8*)&n)[4];
+ p[5] = ((sal_uInt8*)&n)[5];
+ p[6] = ((sal_uInt8*)&n)[6];
+ p[7] = ((sal_uInt8*)&n)[7]; }
#else
-inline void DoubleToSVBT64( double n, SVBT64 p ) { p[0] = ((BYTE*)&n)[7];
- p[1] = ((BYTE*)&n)[6];
- p[2] = ((BYTE*)&n)[5];
- p[3] = ((BYTE*)&n)[4];
- p[4] = ((BYTE*)&n)[3];
- p[5] = ((BYTE*)&n)[2];
- p[6] = ((BYTE*)&n)[1];
- p[7] = ((BYTE*)&n)[0]; }
+inline void DoubleToSVBT64( double n, SVBT64 p ) { p[0] = ((sal_uInt8*)&n)[7];
+ p[1] = ((sal_uInt8*)&n)[6];
+ p[2] = ((sal_uInt8*)&n)[5];
+ p[3] = ((sal_uInt8*)&n)[4];
+ p[4] = ((sal_uInt8*)&n)[3];
+ p[5] = ((sal_uInt8*)&n)[2];
+ p[6] = ((sal_uInt8*)&n)[1];
+ p[7] = ((sal_uInt8*)&n)[0]; }
#endif
#endif
#endif
@@ -358,7 +325,7 @@ template<typename T> inline T Abs(T a) { return (a>=0?a:-a); }
#ifdef STRING32
#define xub_StrLen sal_uInt32
#else
-#define xub_StrLen USHORT
+#define xub_StrLen sal_uInt16
#endif
// -- moved here from libcall.hxx ----------------------------------------
diff --git a/tools/inc/tools/stack.hxx b/tools/inc/tools/stack.hxx
index 4f3223295114..6ac6aa2fc586 100644
--- a/tools/inc/tools/stack.hxx
+++ b/tools/inc/tools/stack.hxx
@@ -44,7 +44,7 @@ public:
using Container::GetObject;
using Container::GetPos;
- Stack( USHORT _nInitSize = 16, USHORT _nReSize = 16 ) :
+ Stack( sal_uInt16 _nInitSize = 16, sal_uInt16 _nReSize = 16 ) :
Container( CONTAINER_MAXBLOCKSIZE, _nInitSize, _nReSize ) {}
Stack( const Stack& rStack ) : Container( rStack ) {}
@@ -55,9 +55,9 @@ public:
Stack& operator =( const Stack& rStack )
{ Container::operator =( rStack ); return *this; }
- BOOL operator ==( const Stack& rStack ) const
+ sal_Bool operator ==( const Stack& rStack ) const
{ return Container::operator ==( rStack ); }
- BOOL operator !=( const Stack& rStack ) const
+ sal_Bool operator !=( const Stack& rStack ) const
{ return Container::operator !=( rStack ); }
};
@@ -72,8 +72,8 @@ public: \
using Stack::Clear; \
using Stack::Count; \
\
- ClassName( USHORT _nInitSize = 16, \
- USHORT _nReSize = 16 ) : \
+ ClassName( sal_uInt16 _nInitSize = 16, \
+ sal_uInt16 _nReSize = 16 ) : \
Stack( _nInitSize, _nReSize ) {} \
ClassName( const ClassName& rClassName ) : \
Stack( rClassName ) {} \
@@ -82,12 +82,12 @@ public: \
Type Pop() { return (Type)Stack::Pop(); } \
Type Top() const { return (Type)Stack::Top(); } \
\
- Type GetObject( ULONG nIndex ) const \
+ Type GetObject( sal_uIntPtr nIndex ) const \
{ return (Type)Stack::GetObject( nIndex ); } \
- ULONG GetPos( const Type p ) const \
+ sal_uIntPtr GetPos( const Type p ) const \
{ return Stack::GetPos( (const void*)p ); } \
- ULONG GetPos( const Type p, ULONG nStartIndex, \
- BOOL bForward = TRUE ) const \
+ sal_uIntPtr GetPos( const Type p, sal_uIntPtr nStartIndex, \
+ sal_Bool bForward = sal_True ) const \
{ return Stack::GetPos( (const void*)p, \
nStartIndex, \
bForward ); } \
@@ -96,9 +96,9 @@ public: \
{ Stack::operator =( rClassName ); \
return *this; } \
\
- BOOL operator ==( const ClassName& rStack ) const \
+ sal_Bool operator ==( const ClassName& rStack ) const \
{ return Stack::operator ==( rStack ); } \
- BOOL operator !=( const ClassName& rStack ) const \
+ sal_Bool operator !=( const ClassName& rStack ) const \
{ return Stack::operator !=( rStack ); } \
};
diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx
index 61af361aa5b7..841b364fef6e 100644
--- a/tools/inc/tools/stream.hxx
+++ b/tools/inc/tools/stream.hxx
@@ -142,16 +142,16 @@ protected:
public:
TYPEINFO();
- SvLockBytes(): m_pStream(0), m_bOwner(FALSE), m_bSync(FALSE) {}
+ SvLockBytes(): m_pStream(0), m_bOwner(sal_False), m_bSync(sal_False) {}
- SvLockBytes(SvStream * pTheStream, sal_Bool bTheOwner = FALSE):
- m_pStream(pTheStream), m_bOwner(bTheOwner), m_bSync(FALSE) {}
+ SvLockBytes(SvStream * pTheStream, sal_Bool bTheOwner = sal_False):
+ m_pStream(pTheStream), m_bOwner(bTheOwner), m_bSync(sal_False) {}
virtual ~SvLockBytes() { close(); }
virtual const SvStream * GetStream() const { return m_pStream; }
- virtual void SetSynchronMode(sal_Bool bTheSync = TRUE) { m_bSync = bTheSync; }
+ virtual void SetSynchronMode(sal_Bool bTheSync = sal_True) { m_bSync = bTheSync; }
virtual sal_Bool IsSynchronMode() const { return m_bSync; }
@@ -183,7 +183,7 @@ class TOOLS_DLLPUBLIC SvOpenLockBytes: public SvLockBytes
public:
TYPEINFO();
- SvOpenLockBytes(): SvLockBytes(0, FALSE) {}
+ SvOpenLockBytes(): SvLockBytes(0, sal_False) {}
SvOpenLockBytes(SvStream * pStream, sal_Bool bOwner):
SvLockBytes(pStream, bOwner) {}
@@ -213,7 +213,7 @@ public:
TYPEINFO();
SvAsyncLockBytes(SvStream * pStream, sal_Bool bOwner):
- SvOpenLockBytes(pStream, bOwner), m_nSize(0), m_bTerminated(FALSE) {}
+ SvOpenLockBytes(pStream, bOwner), m_nSize(0), m_bTerminated(sal_False) {}
virtual ErrCode ReadAt(sal_Size nPos, void * pBuffer, sal_Size nCount,
sal_Size * pRead) const;
@@ -228,7 +228,7 @@ public:
virtual sal_Size Seek(sal_Size nPos);
- virtual void Terminate() { m_bTerminated = TRUE; }
+ virtual void Terminate() { m_bTerminated = sal_True; }
};
SV_DECL_IMPL_REF(SvAsyncLockBytes);
@@ -257,8 +257,8 @@ private:
unsigned int eIOMode:2; // STREAM_IO_*
// Error-Codes, Konvertierung, Komprimierung, ...
- int bIsDirty:1; // TRUE: Stream != Pufferinhalt
- int bIsConsistent:1;// FALSE: Buffer enthaelt Daten, die NICHT
+ int bIsDirty:1; // sal_True: Stream != Pufferinhalt
+ int bIsConsistent:1;// sal_False: Buffer enthaelt Daten, die NICHT
// per PutData in den abgeleiteten Stream
// geschrieben werden duerfen (siehe PutBack)
int bSwap:1;
@@ -460,9 +460,20 @@ public:
/// Switch to no endian swapping and write 0xfeff
sal_Bool StartWritingUnicodeText();
- /// Read 16bit, if 0xfeff do nothing, if 0xfffe switch
- /// endian swapping, if none of them put back
- sal_Bool StartReadingUnicodeText();
+
+ /** If eReadBomCharSet==RTL_TEXTENCODING_DONTKNOW: read 16bit,
+ if 0xfeff do nothing (UTF-16), if 0xfffe switch endian
+ swapping (UTF-16), if 0xefbb or 0xbbef read another byte
+ and check for UTF-8. If no UTF-* BOM was detected put all
+ read bytes back. This means that if 2 bytes were read it
+ was an UTF-16 BOM, if 3 bytes were read it was an UTF-8
+ BOM. There is no UTF-7, UTF-32 or UTF-EBCDIC BOM detection!
+
+ If eReadBomCharSet!=RTL_TEXTENCODING_DONTKNOW: only read a
+ BOM of that encoding and switch endian swapping if UTF-16
+ and 0xfffe.
+ */
+ sal_Bool StartReadingUnicodeText( rtl_TextEncoding eReadBomCharSet );
/// Read a line of Unicode
sal_Bool ReadUniStringLine( String& rStr );
@@ -648,7 +659,7 @@ inline SvStream& SvStream::ReadNumber( int& rInt )
/*
inline SvStream& SvStream::ReadNumber( unsigned int& rUInt )
{
- ULONG nTmp;
+ sal_uIntPtr nTmp;
ReadNumber( nTmp );
rUInt = (unsigned int)nTmp;
return *this;
@@ -684,7 +695,7 @@ inline SvStream& SvStream::WriteNumber( int nInt )
/*
inline SvStream& SvStream::WriteNumber( unsigned int nUInt )
{
- WriteNumber( (ULONG)nUInt );
+ WriteNumber( (sal_uIntPtr)nUInt );
return *this;
}
*/
@@ -824,7 +835,7 @@ public:
void* SwitchBuffer( sal_Size nInitSize=512, sal_Size nResize=64 );
void* SetBuffer( void* pBuf, sal_Size nSize,
- sal_Bool bOwnsData=TRUE, sal_Size nEOF=0 );
+ sal_Bool bOwnsData=sal_True, sal_Size nEOF=0 );
void ObjectOwnsMemory( sal_Bool bOwn ) { bOwnsData = bOwn; }
sal_Bool IsObjectMemoryOwner() { return bOwnsData; }
diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx
index 1e438a1296b6..510d66937299 100644..100755
--- a/tools/inc/tools/string.hxx
+++ b/tools/inc/tools/string.hxx
@@ -171,7 +171,7 @@ private:
TOOLS_DLLPRIVATE void ImplUpdateStringFromUniString(
sal_Unicode const *, sal_Size, rtl_TextEncoding, sal_uInt32);
TOOLS_DLLPRIVATE void ImplStringConvert(
- rtl_TextEncoding, rtl_TextEncoding, BOOL);
+ rtl_TextEncoding, rtl_TextEncoding, sal_Bool);
ByteString( const int* pDummy ); // not implemented: to prevent ByteString( NULL )
ByteString(int); // not implemented; to detect misuses
@@ -273,29 +273,29 @@ public:
ByteString& Convert( rtl_TextEncoding eSource,
rtl_TextEncoding eTarget,
- BOOL bReplace = TRUE );
+ sal_Bool bReplace = sal_True );
static sal_Char Convert( sal_Char c, rtl_TextEncoding eSource,
rtl_TextEncoding eTarget,
- BOOL bReplace = TRUE );
+ sal_Bool bReplace = sal_True );
static sal_Unicode ConvertToUnicode( sal_Char c,
rtl_TextEncoding eTextEncoding );
static sal_Char ConvertFromUnicode( sal_Unicode c,
rtl_TextEncoding eTextEncoding,
- BOOL bReplace = TRUE );
+ sal_Bool bReplace = sal_True );
static sal_Unicode ConvertToUnicode( const sal_Char* pChar, sal_Size* pLen,
rtl_TextEncoding eTextEncoding );
static sal_Size ConvertFromUnicode( sal_Unicode c, sal_Char* pBuf, sal_Size nBufLen,
rtl_TextEncoding eTextEncoding,
- BOOL bReplace = TRUE );
+ sal_Bool bReplace = sal_True );
ByteString& ConvertLineEnd( LineEnd eLineEnd );
ByteString& ConvertLineEnd()
{ return ConvertLineEnd( GetSystemLineEnd() ); }
- BOOL IsLowerAscii() const;
- BOOL IsUpperAscii() const;
- BOOL IsAlphaAscii() const;
- BOOL IsNumericAscii() const;
- BOOL IsAlphaNumericAscii() const;
+ sal_Bool IsLowerAscii() const;
+ sal_Bool IsUpperAscii() const;
+ sal_Bool IsAlphaAscii() const;
+ sal_Bool IsNumericAscii() const;
+ sal_Bool IsAlphaNumericAscii() const;
ByteString& ToLowerAscii();
ByteString& ToUpperAscii();
@@ -308,17 +308,17 @@ public:
xub_StrLen nLen = STRING_LEN ) const;
StringCompare CompareIgnoreCaseToAscii( const sal_Char* pCharStr,
xub_StrLen nLen = STRING_LEN ) const;
- BOOL Equals( const ByteString& rStr ) const;
- BOOL Equals( const sal_Char* pCharStr ) const;
- BOOL EqualsIgnoreCaseAscii( const ByteString& rStr ) const;
- BOOL EqualsIgnoreCaseAscii( const sal_Char* pCharStr ) const;
- BOOL Equals( const ByteString& rStr,
+ sal_Bool Equals( const ByteString& rStr ) const;
+ sal_Bool Equals( const sal_Char* pCharStr ) const;
+ sal_Bool EqualsIgnoreCaseAscii( const ByteString& rStr ) const;
+ sal_Bool EqualsIgnoreCaseAscii( const sal_Char* pCharStr ) const;
+ sal_Bool Equals( const ByteString& rStr,
xub_StrLen nIndex, xub_StrLen nLen ) const;
- BOOL Equals( const sal_Char* pCharStr,
+ sal_Bool Equals( const sal_Char* pCharStr,
xub_StrLen nIndex, xub_StrLen nLen ) const;
- BOOL EqualsIgnoreCaseAscii( const ByteString& rStr,
+ sal_Bool EqualsIgnoreCaseAscii( const ByteString& rStr,
xub_StrLen nIndex, xub_StrLen nLen ) const;
- BOOL EqualsIgnoreCaseAscii( const sal_Char* pCharStr,
+ sal_Bool EqualsIgnoreCaseAscii( const sal_Char* pCharStr,
xub_StrLen nIndex, xub_StrLen nLen ) const;
xub_StrLen Match( const ByteString& rStr ) const;
@@ -357,41 +357,41 @@ public:
void ReleaseBufferAccess( xub_StrLen nLen = STRING_LEN );
sal_Char* AllocBuffer( xub_StrLen nLen );
- friend BOOL operator == ( const ByteString& rStr1, const ByteString& rStr2 )
+ friend sal_Bool operator == ( const ByteString& rStr1, const ByteString& rStr2 )
{ return rStr1.Equals( rStr2 ); }
- friend BOOL operator == ( const ByteString& rStr, const sal_Char* pCharStr )
+ friend sal_Bool operator == ( const ByteString& rStr, const sal_Char* pCharStr )
{ return rStr.Equals( pCharStr ); }
- friend BOOL operator == ( const sal_Char* pCharStr, const ByteString& rStr )
+ friend sal_Bool operator == ( const sal_Char* pCharStr, const ByteString& rStr )
{ return rStr.Equals( pCharStr ); }
- friend BOOL operator != ( const ByteString& rStr1, const ByteString& rStr2 )
+ friend sal_Bool operator != ( const ByteString& rStr1, const ByteString& rStr2 )
{ return !(operator == ( rStr1, rStr2 )); }
- friend BOOL operator != ( const ByteString& rStr, const sal_Char* pCharStr )
+ friend sal_Bool operator != ( const ByteString& rStr, const sal_Char* pCharStr )
{ return !(operator == ( rStr, pCharStr )); }
- friend BOOL operator != ( const sal_Char* pCharStr, const ByteString& rStr )
+ friend sal_Bool operator != ( const sal_Char* pCharStr, const ByteString& rStr )
{ return !(operator == ( pCharStr, rStr )); }
- friend BOOL operator < ( const ByteString& rStr1, const ByteString& rStr2 )
+ friend sal_Bool operator < ( const ByteString& rStr1, const ByteString& rStr2 )
{ return (rStr1.CompareTo( rStr2 ) == COMPARE_LESS); }
- friend BOOL operator < ( const ByteString& rStr, const sal_Char* pCharStr )
+ friend sal_Bool operator < ( const ByteString& rStr, const sal_Char* pCharStr )
{ return (rStr.CompareTo( pCharStr ) == COMPARE_LESS); }
- friend BOOL operator < ( const sal_Char* pCharStr, const ByteString& rStr )
+ friend sal_Bool operator < ( const sal_Char* pCharStr, const ByteString& rStr )
{ return (rStr.CompareTo( pCharStr ) >= COMPARE_EQUAL); }
- friend BOOL operator > ( const ByteString& rStr1, const ByteString& rStr2 )
+ friend sal_Bool operator > ( const ByteString& rStr1, const ByteString& rStr2 )
{ return (rStr1.CompareTo( rStr2 ) == COMPARE_GREATER); }
- friend BOOL operator > ( const ByteString& rStr, const sal_Char* pCharStr )
+ friend sal_Bool operator > ( const ByteString& rStr, const sal_Char* pCharStr )
{ return (rStr.CompareTo( pCharStr ) == COMPARE_GREATER); }
- friend BOOL operator > ( const sal_Char* pCharStr, const ByteString& rStr )
+ friend sal_Bool operator > ( const sal_Char* pCharStr, const ByteString& rStr )
{ return (rStr.CompareTo( pCharStr ) <= COMPARE_EQUAL); }
- friend BOOL operator <= ( const ByteString& rStr1, const ByteString& rStr2 )
+ friend sal_Bool operator <= ( const ByteString& rStr1, const ByteString& rStr2 )
{ return !(operator > ( rStr1, rStr2 )); }
- friend BOOL operator <= ( const ByteString& rStr, const sal_Char* pCharStr )
+ friend sal_Bool operator <= ( const ByteString& rStr, const sal_Char* pCharStr )
{ return !(operator > ( rStr, pCharStr )); }
- friend BOOL operator <= ( const sal_Char* pCharStr, const ByteString& rStr )
+ friend sal_Bool operator <= ( const sal_Char* pCharStr, const ByteString& rStr )
{ return !(operator > ( pCharStr, rStr )); }
- friend BOOL operator >= ( const ByteString& rStr1, const ByteString& rStr2 )
+ friend sal_Bool operator >= ( const ByteString& rStr1, const ByteString& rStr2 )
{ return !(operator < ( rStr1, rStr2 )); }
- friend BOOL operator >= ( const ByteString& rStr, const sal_Char* pCharStr )
+ friend sal_Bool operator >= ( const ByteString& rStr, const sal_Char* pCharStr )
{ return !(operator < ( rStr, pCharStr )); }
- friend BOOL operator >= ( const sal_Char* pCharStr, const ByteString& rStr )
+ friend sal_Bool operator >= ( const sal_Char* pCharStr, const ByteString& rStr )
{ return !(operator < ( pCharStr, rStr )); }
};
@@ -596,23 +596,23 @@ public:
xub_StrLen nLen = STRING_LEN ) const;
StringCompare CompareIgnoreCaseToAscii( const sal_Char* pAsciiStr,
xub_StrLen nLen = STRING_LEN ) const;
- BOOL Equals( const UniString& rStr ) const;
- BOOL Equals( const sal_Unicode* pCharStr ) const;
- BOOL EqualsAscii( const sal_Char* pAsciiStr ) const;
- BOOL EqualsIgnoreCaseAscii( const UniString& rStr ) const;
- BOOL EqualsIgnoreCaseAscii( const sal_Unicode* pCharStr ) const;
- BOOL EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr ) const;
- BOOL Equals( const UniString& rStr,
+ sal_Bool Equals( const UniString& rStr ) const;
+ sal_Bool Equals( const sal_Unicode* pCharStr ) const;
+ sal_Bool EqualsAscii( const sal_Char* pAsciiStr ) const;
+ sal_Bool EqualsIgnoreCaseAscii( const UniString& rStr ) const;
+ sal_Bool EqualsIgnoreCaseAscii( const sal_Unicode* pCharStr ) const;
+ sal_Bool EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr ) const;
+ sal_Bool Equals( const UniString& rStr,
xub_StrLen nIndex, xub_StrLen nLen ) const;
- BOOL Equals( const sal_Unicode* pCharStr,
+ sal_Bool Equals( const sal_Unicode* pCharStr,
xub_StrLen nIndex, xub_StrLen nLen ) const;
- BOOL EqualsAscii( const sal_Char* pAsciiStr,
+ sal_Bool EqualsAscii( const sal_Char* pAsciiStr,
xub_StrLen nIndex, xub_StrLen nLen ) const;
- BOOL EqualsIgnoreCaseAscii( const UniString& rStr,
+ sal_Bool EqualsIgnoreCaseAscii( const UniString& rStr,
xub_StrLen nIndex, xub_StrLen nLen ) const;
- BOOL EqualsIgnoreCaseAscii( const sal_Unicode* pCharStr,
+ sal_Bool EqualsIgnoreCaseAscii( const sal_Unicode* pCharStr,
xub_StrLen nIndex, xub_StrLen nLen ) const;
- BOOL EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr,
+ sal_Bool EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr,
xub_StrLen nIndex, xub_StrLen nLen ) const;
xub_StrLen Match( const UniString& rStr ) const;
@@ -656,17 +656,17 @@ public:
void ReleaseBufferAccess( xub_StrLen nLen = STRING_LEN );
sal_Unicode* AllocBuffer( xub_StrLen nLen );
- friend BOOL operator == ( const UniString& rStr1, const UniString& rStr2 )
+ friend sal_Bool operator == ( const UniString& rStr1, const UniString& rStr2 )
{ return rStr1.Equals( rStr2 ); }
- friend BOOL operator != ( const UniString& rStr1, const UniString& rStr2 )
+ friend sal_Bool operator != ( const UniString& rStr1, const UniString& rStr2 )
{ return !(operator == ( rStr1, rStr2 )); }
- friend BOOL operator < ( const UniString& rStr1, const UniString& rStr2 )
+ friend sal_Bool operator < ( const UniString& rStr1, const UniString& rStr2 )
{ return (rStr1.CompareTo( rStr2 ) == COMPARE_LESS); }
- friend BOOL operator > ( const UniString& rStr1, const UniString& rStr2 )
+ friend sal_Bool operator > ( const UniString& rStr1, const UniString& rStr2 )
{ return (rStr1.CompareTo( rStr2 ) == COMPARE_GREATER); }
- friend BOOL operator <= ( const UniString& rStr1, const UniString& rStr2 )
+ friend sal_Bool operator <= ( const UniString& rStr1, const UniString& rStr2 )
{ return !(operator > ( rStr1, rStr2 )); }
- friend BOOL operator >= ( const UniString& rStr1, const UniString& rStr2 )
+ friend sal_Bool operator >= ( const UniString& rStr1, const UniString& rStr2 )
{ return !(operator < ( rStr1, rStr2 )); }
};
diff --git a/tools/inc/tools/svborder.hxx b/tools/inc/tools/svborder.hxx
index a0509bcc89be..a525618a6c17 100644
--- a/tools/inc/tools/svborder.hxx
+++ b/tools/inc/tools/svborder.hxx
@@ -42,12 +42,12 @@ public:
SvBorder( const Rectangle & rOuter, const Rectangle & rInner );
SvBorder( long nLeftP, long nTopP, long nRightP, long nBottomP )
{ nLeft = nLeftP; nTop = nTopP; nRight = nRightP; nBottom = nBottomP; }
- BOOL operator == ( const SvBorder & rObj ) const
+ sal_Bool operator == ( const SvBorder & rObj ) const
{
return nTop == rObj.nTop && nRight == rObj.nRight &&
nBottom == rObj.nBottom && nLeft == rObj.nLeft;
}
- BOOL operator != ( const SvBorder & rObj ) const
+ sal_Bool operator != ( const SvBorder & rObj ) const
{ return !(*this == rObj); }
SvBorder & operator = ( const SvBorder & rBorder )
{
@@ -73,7 +73,7 @@ public:
Bottom() -= rBorder.Bottom();
return *this;
}
- BOOL IsInside( const SvBorder & rInside )
+ sal_Bool IsInside( const SvBorder & rInside )
{
return nTop >= rInside.nTop && nRight >= rInside.nRight &&
nBottom >= rInside.nBottom && nLeft >= rInside.nLeft;
diff --git a/tools/inc/tools/table.hxx b/tools/inc/tools/table.hxx
index 1ac3fbe27b6f..6fff4d7d7f2b 100644
--- a/tools/inc/tools/table.hxx
+++ b/tools/inc/tools/table.hxx
@@ -40,36 +40,36 @@
class TOOLS_DLLPUBLIC Table : private Container
{
private:
- ULONG nCount;
+ sal_uIntPtr nCount;
//#if 0 // _SOLAR__PRIVATE
- TOOLS_DLLPRIVATE ULONG ImplGetIndex( ULONG nKey, ULONG* pIndex = NULL ) const;
+ TOOLS_DLLPRIVATE sal_uIntPtr ImplGetIndex( sal_uIntPtr nKey, sal_uIntPtr* pIndex = NULL ) const;
//#endif
public:
- Table( USHORT nInitSize = 16, USHORT nReSize = 16 );
+ Table( sal_uInt16 nInitSize = 16, sal_uInt16 nReSize = 16 );
Table( const Table& rTable ) : Container( rTable )
{ nCount = rTable.nCount; }
- BOOL Insert( ULONG nKey, void* p );
- void* Remove( ULONG nKey );
- void* Replace( ULONG nKey, void* p );
- void* Get( ULONG nKey ) const;
+ sal_Bool Insert( sal_uIntPtr nKey, void* p );
+ void* Remove( sal_uIntPtr nKey );
+ void* Replace( sal_uIntPtr nKey, void* p );
+ void* Get( sal_uIntPtr nKey ) const;
void Clear() { Container::Clear(); nCount = 0; }
- ULONG Count() const { return( nCount ); }
+ sal_uIntPtr Count() const { return( nCount ); }
void* GetCurObject() const;
- ULONG GetCurKey() const { return (ULONG)Container::GetCurObject(); }
- ULONG GetKey( const void* p ) const;
- BOOL IsKeyValid( ULONG nKey ) const;
+ sal_uIntPtr GetCurKey() const { return (sal_uIntPtr)Container::GetCurObject(); }
+ sal_uIntPtr GetKey( const void* p ) const;
+ sal_Bool IsKeyValid( sal_uIntPtr nKey ) const;
- void* GetObject( ULONG nPos ) const
+ void* GetObject( sal_uIntPtr nPos ) const
{ return Container::GetObject( (nPos*2)+1 ); }
- ULONG GetObjectKey( ULONG nPos ) const
- { return (ULONG)Container::GetObject( nPos*2 ); }
- ULONG GetUniqueKey( ULONG nStartKey = 1 ) const;
- ULONG SearchKey( ULONG nKey, ULONG* pPos = NULL ) const;
+ sal_uIntPtr GetObjectKey( sal_uIntPtr nPos ) const
+ { return (sal_uIntPtr)Container::GetObject( nPos*2 ); }
+ sal_uIntPtr GetUniqueKey( sal_uIntPtr nStartKey = 1 ) const;
+ sal_uIntPtr SearchKey( sal_uIntPtr nKey, sal_uIntPtr* pPos = NULL ) const;
- void* Seek( ULONG nKey );
+ void* Seek( sal_uIntPtr nKey );
void* Seek( void* p );
void* First();
void* Last();
@@ -78,9 +78,9 @@ public:
Table& operator =( const Table& rTable );
- BOOL operator ==( const Table& rTable ) const
+ sal_Bool operator ==( const Table& rTable ) const
{ return Container::operator ==( rTable ); }
- BOOL operator !=( const Table& rTable ) const
+ sal_Bool operator !=( const Table& rTable ) const
{ return Container::operator !=( rTable ); }
};
@@ -107,30 +107,30 @@ public: \
using Table::SearchKey; \
using Table::IsKeyValid; \
\
- ClassName( USHORT _nInitSize = 16, \
- USHORT _nReSize = 16 ) : \
+ ClassName( sal_uInt16 _nInitSize = 16, \
+ sal_uInt16 _nReSize = 16 ) : \
Table( _nInitSize, _nReSize ) {} \
ClassName( const ClassName& rClassName ) : \
Table( rClassName ) {} \
\
- BOOL Insert( ULONG nKey, Type p ) \
+ sal_Bool Insert( sal_uIntPtr nKey, Type p ) \
{ return Table::Insert( nKey, (void*)p ); } \
- Type Remove( ULONG nKey ) \
+ Type Remove( sal_uIntPtr nKey ) \
{ return (Type)Table::Remove( nKey ); } \
- Type Replace( ULONG nKey, Type p ) \
+ Type Replace( sal_uIntPtr nKey, Type p ) \
{ return (Type)Table::Replace( nKey, (void*)p ); } \
- Type Get( ULONG nKey ) const \
+ Type Get( sal_uIntPtr nKey ) const \
{ return (Type)Table::Get( nKey ); } \
\
Type GetCurObject() const \
{ return (Type)Table::GetCurObject(); } \
- ULONG GetKey( const Type p ) const \
+ sal_uIntPtr GetKey( const Type p ) const \
{ return Table::GetKey( (const void*)p ); } \
\
- Type GetObject( ULONG nPos ) const \
+ Type GetObject( sal_uIntPtr nPos ) const \
{ return (Type)Table::GetObject( nPos ); } \
\
- Type Seek( ULONG nKey ) \
+ Type Seek( sal_uIntPtr nKey ) \
{ return (Type)Table::Seek( nKey ); } \
Type Seek( Type p ) \
{ return (Type)Table::Seek( (void*)p ); } \
@@ -143,9 +143,9 @@ public: \
{ Table::operator =( rClassName ); \
return *this; } \
\
- BOOL operator ==( const ClassName& rTable ) const \
+ sal_Bool operator ==( const ClassName& rTable ) const \
{ return Table::operator ==( rTable ); } \
- BOOL operator !=( const ClassName& rTable ) const \
+ sal_Bool operator !=( const ClassName& rTable ) const \
{ return Table::operator !=( rTable ); } \
};
diff --git a/tools/inc/tools/tenccvt.hxx b/tools/inc/tools/tenccvt.hxx
index e24c2e259022..4c9968149291 100644
--- a/tools/inc/tools/tenccvt.hxx
+++ b/tools/inc/tools/tenccvt.hxx
@@ -52,7 +52,7 @@ TOOLS_DLLPUBLIC rtl_TextEncoding GetExtendedTextEncoding( rtl_TextEncoding eEnco
// is returned (normally windows-1252).
TOOLS_DLLPUBLIC rtl_TextEncoding GetOneByteTextEncoding( rtl_TextEncoding eEncoding );
-TOOLS_DLLPUBLIC rtl_TextEncoding GetSOLoadTextEncoding( rtl_TextEncoding eEncoding, USHORT nVersion = SOFFICE_FILEFORMAT_50 );
-TOOLS_DLLPUBLIC rtl_TextEncoding GetSOStoreTextEncoding( rtl_TextEncoding eEncoding, USHORT nVersion = SOFFICE_FILEFORMAT_50 );
+TOOLS_DLLPUBLIC rtl_TextEncoding GetSOLoadTextEncoding( rtl_TextEncoding eEncoding, sal_uInt16 nVersion = SOFFICE_FILEFORMAT_50 );
+TOOLS_DLLPUBLIC rtl_TextEncoding GetSOStoreTextEncoding( rtl_TextEncoding eEncoding, sal_uInt16 nVersion = SOFFICE_FILEFORMAT_50 );
#endif // _TOOLS_TENCCVT_HXX
diff --git a/tools/inc/tools/time.hxx b/tools/inc/tools/time.hxx
index 269b104e57e6..5b0b508598d8 100644
--- a/tools/inc/tools/time.hxx
+++ b/tools/inc/tools/time.hxx
@@ -46,28 +46,28 @@ public:
Time( const ResId & rResId );
Time( sal_Int32 _nTime ) { Time::nTime = _nTime; }
Time( const Time& rTime );
- Time( ULONG nHour, ULONG nMin,
- ULONG nSec = 0, ULONG n100Sec = 0 );
+ Time( sal_uIntPtr nHour, sal_uIntPtr nMin,
+ sal_uIntPtr nSec = 0, sal_uIntPtr n100Sec = 0 );
void SetTime( sal_Int32 nNewTime ) { nTime = nNewTime; }
sal_Int32 GetTime() const { return nTime; }
- void SetHour( USHORT nNewHour );
- void SetMin( USHORT nNewMin );
- void SetSec( USHORT nNewSec );
- void Set100Sec( USHORT nNew100Sec );
- USHORT GetHour() const
- { ULONG nTempTime = (nTime >= 0) ? nTime : nTime*-1;
- return (USHORT)(nTempTime / 1000000); }
- USHORT GetMin() const
- { ULONG nTempTime = (nTime >= 0) ? nTime : nTime*-1;
- return (USHORT)((nTempTime / 10000) % 100); }
- USHORT GetSec() const
- { ULONG nTempTime = (nTime >= 0) ? nTime : nTime*-1;
- return (USHORT)((nTempTime / 100) % 100); }
- USHORT Get100Sec() const
- { ULONG nTempTime = (nTime >= 0) ? nTime : nTime*-1;
- return (USHORT)(nTempTime % 100); }
+ void SetHour( sal_uInt16 nNewHour );
+ void SetMin( sal_uInt16 nNewMin );
+ void SetSec( sal_uInt16 nNewSec );
+ void Set100Sec( sal_uInt16 nNew100Sec );
+ sal_uInt16 GetHour() const
+ { sal_uIntPtr nTempTime = (nTime >= 0) ? nTime : nTime*-1;
+ return (sal_uInt16)(nTempTime / 1000000); }
+ sal_uInt16 GetMin() const
+ { sal_uIntPtr nTempTime = (nTime >= 0) ? nTime : nTime*-1;
+ return (sal_uInt16)((nTempTime / 10000) % 100); }
+ sal_uInt16 GetSec() const
+ { sal_uIntPtr nTempTime = (nTime >= 0) ? nTime : nTime*-1;
+ return (sal_uInt16)((nTempTime / 100) % 100); }
+ sal_uInt16 Get100Sec() const
+ { sal_uIntPtr nTempTime = (nTime >= 0) ? nTime : nTime*-1;
+ return (sal_uInt16)(nTempTime % 100); }
sal_Int32 GetMSFromTime() const;
void MakeTimeFromMS( sal_Int32 nMS );
@@ -75,27 +75,27 @@ public:
/// 12 hours == 0.5 days
double GetTimeInDays() const;
- BOOL IsBetween( const Time& rFrom, const Time& rTo ) const
+ sal_Bool IsBetween( const Time& rFrom, const Time& rTo ) const
{ return ((nTime >= rFrom.nTime) && (nTime <= rTo.nTime)); }
- BOOL IsEqualIgnore100Sec( const Time& rTime ) const;
+ sal_Bool IsEqualIgnore100Sec( const Time& rTime ) const;
- BOOL operator ==( const Time& rTime ) const
+ sal_Bool operator ==( const Time& rTime ) const
{ return (nTime == rTime.nTime); }
- BOOL operator !=( const Time& rTime ) const
+ sal_Bool operator !=( const Time& rTime ) const
{ return (nTime != rTime.nTime); }
- BOOL operator >( const Time& rTime ) const
+ sal_Bool operator >( const Time& rTime ) const
{ return (nTime > rTime.nTime); }
- BOOL operator <( const Time& rTime ) const
+ sal_Bool operator <( const Time& rTime ) const
{ return (nTime < rTime.nTime); }
- BOOL operator >=( const Time& rTime ) const
+ sal_Bool operator >=( const Time& rTime ) const
{ return (nTime >= rTime.nTime); }
- BOOL operator <=( const Time& rTime ) const
+ sal_Bool operator <=( const Time& rTime ) const
{ return (nTime <= rTime.nTime); }
static Time GetUTCOffset();
- static ULONG GetSystemTicks(); // Elapsed time
- static ULONG GetProcessTicks(); // CPU time
+ static sal_uIntPtr GetSystemTicks(); // Elapsed time
+ static sal_uIntPtr GetProcessTicks(); // CPU time
void ConvertToUTC() { *this -= Time::GetUTCOffset(); }
void ConvertToLocalTime() { *this += Time::GetUTCOffset(); }
diff --git a/tools/inc/tools/unqid.hxx b/tools/inc/tools/unqid.hxx
index 4e255e0efdd1..a8ef2587d486 100644
--- a/tools/inc/tools/unqid.hxx
+++ b/tools/inc/tools/unqid.hxx
@@ -36,8 +36,8 @@
struct ImpUniqueId
{
- ULONG nId;
- USHORT nRefCount;
+ sal_uIntPtr nId;
+ sal_uInt16 nRefCount;
void Release()
{
nRefCount--;
@@ -71,7 +71,7 @@ public:
pId = rId.pId;
return *this;
}
- ULONG GetId() const { return pId ? pId->nId : 0; }
+ sal_uIntPtr GetId() const { return pId ? pId->nId : 0; }
};
// ---------------------
@@ -80,30 +80,30 @@ public:
class TOOLS_DLLPUBLIC UniqueIdContainer : private UniqueIndex
{
- USHORT nCollectCount;
+ sal_uInt16 nCollectCount;
public: // Irgend etwas mit protected falsch
- void Clear( BOOL bAll );
- UniqueItemId CreateIdProt( ULONG nId );
+ void Clear( sal_Bool bAll );
+ UniqueItemId CreateIdProt( sal_uIntPtr nId );
public:
- UniqueIdContainer( ULONG _nStartIndex,
- ULONG _nInitSize = 16,
- ULONG _nReSize = 16 )
+ UniqueIdContainer( sal_uIntPtr _nStartIndex,
+ sal_uIntPtr _nInitSize = 16,
+ sal_uIntPtr _nReSize = 16 )
: UniqueIndex( _nStartIndex, _nInitSize, _nReSize )
, nCollectCount( 0 )
{}
UniqueIdContainer( const UniqueIdContainer& );
~UniqueIdContainer()
- { Clear( TRUE ); }
+ { Clear( sal_True ); }
UniqueIdContainer& operator = ( const UniqueIdContainer & );
- BOOL IsIndexValid( ULONG nIndex ) const
+ sal_Bool IsIndexValid( sal_uIntPtr nIndex ) const
{ return UniqueIndex::IsIndexValid( nIndex ); }
UniqueItemId CreateId();
- static UniqueItemId CreateFreeId( ULONG nId ); // freies Id
+ static UniqueItemId CreateFreeId( sal_uIntPtr nId ); // freies Id
};
#endif // _UNQID_HXX
diff --git a/tools/inc/tools/unqidx.hxx b/tools/inc/tools/unqidx.hxx
index 95aac95d9cf4..6059af077abc 100644
--- a/tools/inc/tools/unqidx.hxx
+++ b/tools/inc/tools/unqidx.hxx
@@ -40,47 +40,47 @@
class TOOLS_DLLPUBLIC UniqueIndex : private Container
{
private:
- ULONG nReSize;
- ULONG nStartIndex;
- ULONG nUniqIndex;
- ULONG nCount;
+ sal_uIntPtr nReSize;
+ sal_uIntPtr nStartIndex;
+ sal_uIntPtr nUniqIndex;
+ sal_uIntPtr nCount;
public:
using Container::GetCurObject;
- UniqueIndex( ULONG nStartIndex = 0,
- ULONG nInitSize = 16,
- ULONG nReSize = 16 );
+ UniqueIndex( sal_uIntPtr nStartIndex = 0,
+ sal_uIntPtr nInitSize = 16,
+ sal_uIntPtr nReSize = 16 );
UniqueIndex( const UniqueIndex& rIdx );
- ULONG Insert( ULONG nIndex, void* p );
- ULONG Insert( void* p );
- void* Remove( ULONG nIndex );
- void* Replace( ULONG nIndex, void* p );
- void* Get( ULONG nIndex ) const;
+ sal_uIntPtr Insert( sal_uIntPtr nIndex, void* p );
+ sal_uIntPtr Insert( void* p );
+ void* Remove( sal_uIntPtr nIndex );
+ void* Replace( sal_uIntPtr nIndex, void* p );
+ void* Get( sal_uIntPtr nIndex ) const;
void Clear();
- ULONG Count() const { return nCount; }
+ sal_uIntPtr Count() const { return nCount; }
- ULONG GetCurIndex() const;
- ULONG GetIndex( const void* p ) const;
- BOOL IsIndexValid( ULONG nIndex ) const;
+ sal_uIntPtr GetCurIndex() const;
+ sal_uIntPtr GetIndex( const void* p ) const;
+ sal_Bool IsIndexValid( sal_uIntPtr nIndex ) const;
- void* Seek( ULONG nIndex );
+ void* Seek( sal_uIntPtr nIndex );
void* Seek( void* p );
void* First();
void* Last();
void* Next();
void* Prev();
- ULONG GetStartIndex() const { return nStartIndex; }
- ULONG GetCurMaxIndex() const
+ sal_uIntPtr GetStartIndex() const { return nStartIndex; }
+ sal_uIntPtr GetCurMaxIndex() const
{ return (nStartIndex + Container::GetSize()); }
UniqueIndex& operator =( const UniqueIndex& rIdx );
- BOOL operator ==( const UniqueIndex& rIdx ) const;
- BOOL operator !=( const UniqueIndex& rIdx ) const
+ sal_Bool operator ==( const UniqueIndex& rIdx ) const;
+ sal_Bool operator !=( const UniqueIndex& rIdx ) const
{ return !(UniqueIndex::operator==( rIdx )); }
};
@@ -106,30 +106,30 @@ public: \
using UniqueIndex::GetStartIndex; \
using UniqueIndex::GetCurMaxIndex; \
\
- ClassName( ULONG _nStartIndex = 0, \
- ULONG _nInitSize = 16, ULONG _nReSize = 16 ):\
+ ClassName( sal_uIntPtr _nStartIndex = 0, \
+ sal_uIntPtr _nInitSize = 16, sal_uIntPtr _nReSize = 16 ):\
UniqueIndex( _nStartIndex, _nInitSize, _nReSize ) {}\
ClassName( const ClassName& rClassName ) : \
UniqueIndex( rClassName ) {} \
\
- ULONG Insert( ULONG nIndex, Type p ) \
+ sal_uIntPtr Insert( sal_uIntPtr nIndex, Type p ) \
{ return UniqueIndex::Insert( nIndex, (void*)p ); } \
- ULONG Insert( Type p ) \
+ sal_uIntPtr Insert( Type p ) \
{ return UniqueIndex::Insert( (void*)p ); } \
- Type Remove( ULONG nIndex ) \
+ Type Remove( sal_uIntPtr nIndex ) \
{ return (Type)UniqueIndex::Remove( nIndex ); } \
- Type Replace( ULONG nIndex, Type p ) \
+ Type Replace( sal_uIntPtr nIndex, Type p ) \
{ return (Type)UniqueIndex::Replace( nIndex, \
(void*)p ); } \
- Type Get( ULONG nIndex ) const \
+ Type Get( sal_uIntPtr nIndex ) const \
{ return (Type)UniqueIndex::Get( nIndex ); } \
\
Type GetCurObject() const \
{ return (Type)UniqueIndex::GetCurObject(); } \
- ULONG GetIndex( const Type p ) const \
+ sal_uIntPtr GetIndex( const Type p ) const \
{ return UniqueIndex::GetIndex( (const void*)p ); } \
\
- Type Seek( ULONG nKey ) \
+ Type Seek( sal_uIntPtr nKey ) \
{ return (Type)UniqueIndex::Seek( nKey ); } \
Type Seek( Type p ) \
{ return (Type)UniqueIndex::Seek( (void*)p ); } \
@@ -142,9 +142,9 @@ public: \
{ UniqueIndex::operator =( rClassName ); \
return *this; } \
\
- BOOL operator ==( const ClassName& rIdx ) const \
+ sal_Bool operator ==( const ClassName& rIdx ) const \
{ return UniqueIndex::operator ==( rIdx ); } \
- BOOL operator !=( const ClassName& rIdx ) const \
+ sal_Bool operator !=( const ClassName& rIdx ) const \
{ return UniqueIndex::operator !=( rIdx ); } \
};
diff --git a/tools/inc/tools/vcompat.hxx b/tools/inc/tools/vcompat.hxx
index f6ee6922faac..93517b77053d 100644
--- a/tools/inc/tools/vcompat.hxx
+++ b/tools/inc/tools/vcompat.hxx
@@ -35,10 +35,10 @@
// -----------
#define COMPAT_FORMAT( char1, char2, char3, char4 ) \
- ((UINT32)((((UINT32)(char)(char1)))| \
- (((UINT32)(char)(char2))<<8UL)| \
- (((UINT32)(char)(char3))<<16UL)| \
- ((UINT32)(char)(char4))<<24UL))
+ ((sal_uInt32)((((sal_uInt32)(char)(char1)))| \
+ (((sal_uInt32)(char)(char2))<<8UL)| \
+ (((sal_uInt32)(char)(char3))<<16UL)| \
+ ((sal_uInt32)(char)(char4))<<24UL))
// --------------
// - ImplCompat -
@@ -49,22 +49,22 @@ class SvStream;
class TOOLS_DLLPUBLIC VersionCompat
{
SvStream* mpRWStm;
- UINT32 mnCompatPos;
- UINT32 mnTotalSize;
- UINT16 mnStmMode;
- UINT16 mnVersion;
+ sal_uInt32 mnCompatPos;
+ sal_uInt32 mnTotalSize;
+ sal_uInt16 mnStmMode;
+ sal_uInt16 mnVersion;
VersionCompat() {}
VersionCompat( const VersionCompat& ) {}
VersionCompat& operator=( const VersionCompat& ) { return *this; }
- BOOL operator==( const VersionCompat& ) { return FALSE; }
+ sal_Bool operator==( const VersionCompat& ) { return sal_False; }
public:
- VersionCompat( SvStream& rStm, USHORT nStreamMode, UINT16 nVersion = 1 );
+ VersionCompat( SvStream& rStm, sal_uInt16 nStreamMode, sal_uInt16 nVersion = 1 );
~VersionCompat();
- UINT16 GetVersion() const { return mnVersion; }
+ sal_uInt16 GetVersion() const { return mnVersion; }
};
#endif // _VCOMPAT_HXX
diff --git a/tools/inc/tools/vector2d.hxx b/tools/inc/tools/vector2d.hxx
index d346e1af2bbf..10c33b57c871 100644
--- a/tools/inc/tools/vector2d.hxx
+++ b/tools/inc/tools/vector2d.hxx
@@ -87,8 +87,8 @@ public:
inline Vector2D& operator/=(double t) { mfX /= t; mfY /= t; return *this; }
inline Vector2D operator/(double t) const { Vector2D aNew(*this); aNew /= t; return aNew; }
- inline BOOL operator==( const Vector2D& rVec ) const { return( mfX == rVec.mfX && mfY == rVec.mfY ); }
- inline BOOL operator!=( const Vector2D& rVec ) const { return !( *this == rVec ); }
+ inline sal_Bool operator==( const Vector2D& rVec ) const { return( mfX == rVec.mfX && mfY == rVec.mfY ); }
+ inline sal_Bool operator!=( const Vector2D& rVec ) const { return !( *this == rVec ); }
inline Vector2D& operator=( const Vector2D& rVec ) { mfX = rVec.mfX, mfY = rVec.mfY; return *this; }
inline Vector2D& operator=( const Pair& rPair ) { mfX = rPair.nA, mfY = rPair.nB; return *this; }
@@ -97,11 +97,11 @@ public:
inline Vector2D& operator*=( const Pair& rPair ) { mfX *= rPair.nA, mfY *= rPair.nB; return *this; }
inline Vector2D& operator/=( const Pair& rPair ) { mfX /= rPair.nA, mfY /= rPair.nB; return *this; }
- inline BOOL operator==( const Pair& rPair ) const { return( mfX == rPair.nA && mfY == rPair.nB ); }
- inline BOOL operator!=( const Pair& rPair ) const { return !( *this == rPair ); }
+ inline sal_Bool operator==( const Pair& rPair ) const { return( mfX == rPair.nA && mfY == rPair.nB ); }
+ inline sal_Bool operator!=( const Pair& rPair ) const { return !( *this == rPair ); }
- inline BOOL IsPositive( Vector2D& rVec ) const { return( ( mfX * rVec.mfY - mfY * rVec.mfX ) >= 0.0 ); }
- inline BOOL IsNegative( Vector2D& rVec ) const { return !IsPositive( rVec ); }
+ inline sal_Bool IsPositive( Vector2D& rVec ) const { return( ( mfX * rVec.mfY - mfY * rVec.mfX ) >= 0.0 ); }
+ inline sal_Bool IsNegative( Vector2D& rVec ) const { return !IsPositive( rVec ); }
};
// -----------------------------------------------------------------------------
diff --git a/tools/inc/tools/wintypes.hxx b/tools/inc/tools/wintypes.hxx
index cfa08c325573..18adfbab37ef 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)
@@ -117,7 +117,8 @@ typedef USHORT WindowType;
#define WINDOW_INTROWINDOW (WINDOW_FIRST + 0x4f)
#define WINDOW_LISTBOXWINDOW (WINDOW_FIRST + 0x50)
#define WINDOW_DOCKINGAREA (WINDOW_FIRST + 0x51)
-#define WINDOW_LAST (WINDOW_DOCKINGAREA)
+#define WINDOW_RULER (WINDOW_FIRST + 0x52)
+#define WINDOW_LAST (WINDOW_RULER)
// ---------------
@@ -319,7 +320,7 @@ enum TriState { STATE_NOCHECK, STATE_CHECK, STATE_DONTKNOW };
// - ButtonDialog-Types -
// ----------------------
-typedef USHORT StandardButtonType;
+typedef sal_uInt16 StandardButtonType;
#define BUTTON_OK ((StandardButtonType)0)
#define BUTTON_CANCEL ((StandardButtonType)1)
#define BUTTON_YES ((StandardButtonType)2)
diff --git a/tools/inc/tools/wldcrd.hxx b/tools/inc/tools/wldcrd.hxx
index 478566ce9b44..4938bc212db2 100644
--- a/tools/inc/tools/wldcrd.hxx
+++ b/tools/inc/tools/wldcrd.hxx
@@ -42,7 +42,7 @@ private:
ByteString aWildString;
char cSepSymbol;
- USHORT ImpMatch( const char *pWild, const char *pStr ) const;
+ sal_uInt16 ImpMatch( const char *pWild, const char *pStr ) const;
public:
WildCard();
@@ -52,11 +52,11 @@ public:
const String GetWildCard() const { return UniString( aWildString, osl_getThreadTextEncoding()); }
const String operator ()() const { return UniString( aWildString, osl_getThreadTextEncoding()); }
- BOOL Matches( const String& rStr ) const;
+ sal_Bool Matches( const String& rStr ) const;
- BOOL operator ==( const String& rString ) const
+ sal_Bool operator ==( const String& rString ) const
{ return Matches( rString ); }
- BOOL operator !=( const String& rString ) const
+ sal_Bool operator !=( const String& rString ) const
{ return !( Matches( rString ) ); }
WildCard& operator =( const String& rString );
diff --git a/tools/inc/tools/zcodec.hxx b/tools/inc/tools/zcodec.hxx
index 430caa363663..d42e87f5d4e0 100644
--- a/tools/inc/tools/zcodec.hxx
+++ b/tools/inc/tools/zcodec.hxx
@@ -73,47 +73,47 @@ class TOOLS_DLLPUBLIC ZCodec
{
private:
- ULONG mbInit;
- BOOL mbStatus;
- BOOL mbFinish;
- ULONG mnMemUsage;
+ sal_uIntPtr mbInit;
+ sal_Bool mbStatus;
+ sal_Bool mbFinish;
+ sal_uIntPtr mnMemUsage;
SvStream* mpIStm;
- BYTE* mpInBuf;
- ULONG mnInBufSize;
- ULONG mnInToRead;
+ sal_uInt8* mpInBuf;
+ sal_uIntPtr mnInBufSize;
+ sal_uIntPtr mnInToRead;
SvStream* mpOStm;
- BYTE* mpOutBuf;
- ULONG mnOutBufSize;
+ sal_uInt8* mpOutBuf;
+ sal_uIntPtr mnOutBufSize;
- ULONG mnCRC;
- ULONG mnCompressMethod;
+ sal_uIntPtr mnCRC;
+ sal_uIntPtr mnCompressMethod;
void* mpsC_Stream;
- void ImplInitBuf( BOOL nIOFlag );
+ void ImplInitBuf( sal_Bool nIOFlag );
void ImplWriteBack( void );
public:
- ZCodec( ULONG nInBuf, ULONG nOutBuf, ULONG nMemUsage = MAX_MEM_USAGE );
+ ZCodec( sal_uIntPtr nInBuf, sal_uIntPtr nOutBuf, sal_uIntPtr nMemUsage = MAX_MEM_USAGE );
ZCodec( void );
virtual ~ZCodec();
- virtual void BeginCompression( ULONG nCompressMethod = ZCODEC_DEFAULT );
+ virtual void BeginCompression( sal_uIntPtr nCompressMethod = ZCODEC_DEFAULT );
virtual long EndCompression();
- BOOL IsFinished () const { return mbFinish; }
+ sal_Bool IsFinished () const { return mbFinish; }
long Compress( SvStream& rIStm, SvStream& rOStm );
long Decompress( SvStream& rIStm, SvStream& rOStm );
- long Write( SvStream& rOStm, const BYTE* pData, ULONG nSize );
- long Read( SvStream& rIStm, BYTE* pData, ULONG nSize );
- long ReadAsynchron( SvStream& rIStm, BYTE* pData, ULONG nSize );
+ long Write( SvStream& rOStm, const sal_uInt8* pData, sal_uIntPtr nSize );
+ long Read( SvStream& rIStm, sal_uInt8* pData, sal_uIntPtr nSize );
+ long ReadAsynchron( SvStream& rIStm, sal_uInt8* pData, sal_uIntPtr nSize );
- void SetBreak( ULONG );
- ULONG GetBreak( void );
- void SetCRC( ULONG nCurrentCRC );
- ULONG UpdateCRC( ULONG nLatestCRC, ULONG nSource );
- ULONG UpdateCRC( ULONG nLatestCRC, BYTE* pSource, long nDatSize );
- ULONG GetCRC();
+ void SetBreak( sal_uIntPtr );
+ sal_uIntPtr GetBreak( void );
+ void SetCRC( sal_uIntPtr nCurrentCRC );
+ sal_uIntPtr UpdateCRC( sal_uIntPtr nLatestCRC, sal_uIntPtr nSource );
+ sal_uIntPtr UpdateCRC( sal_uIntPtr nLatestCRC, sal_uInt8* pSource, long nDatSize );
+ sal_uIntPtr GetCRC();
};
class GZCodec : public ZCodec
@@ -122,7 +122,7 @@ class GZCodec : public ZCodec
public:
GZCodec(){};
~GZCodec(){};
- virtual void BeginCompression( ULONG nCompressMethod = ZCODEC_DEFAULT );
+ virtual void BeginCompression( sal_uIntPtr nCompressMethod = ZCODEC_DEFAULT );
};
#endif // _ZCODEC_HXX
diff --git a/tools/prj/build.lst b/tools/prj/build.lst
index 3194cbb4e87c..1e5c9135145f 100644
--- a/tools/prj/build.lst
+++ b/tools/prj/build.lst
@@ -1,3 +1,2 @@
tl tools : cppu external offuh vos ZLIB:zlib EXPAT:expat basegfx comphelper i18npool NULL
-tl tools usr1 - all tl_mkout NULL
tl tools\prj nmake - all tl_prj NULL
diff --git a/tools/prj/makefile.mk b/tools/prj/makefile.mk
index c73a3d944bbf..e312a7ccab65 100644
--- a/tools/prj/makefile.mk
+++ b/tools/prj/makefile.mk
@@ -37,4 +37,4 @@ VERBOSEFLAG := -s
.ENDIF
all:
- cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET)
+ cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog
diff --git a/tools/source/communi/geninfo.cxx b/tools/source/communi/geninfo.cxx
index 97326836de2d..01a325054a69 100644
--- a/tools/source/communi/geninfo.cxx
+++ b/tools/source/communi/geninfo.cxx
@@ -55,7 +55,7 @@ GenericInformation::GenericInformation( const ByteString &rKey,
/*****************************************************************************/
GenericInformation::GenericInformation( const GenericInformation& rInf,
- BOOL bCopySubs)
+ sal_Bool bCopySubs)
/*****************************************************************************/
: ByteString( rInf ),
sValue( rInf.sValue ),
@@ -80,15 +80,15 @@ GenericInformation::~GenericInformation()
}
/*****************************************************************************/
-BOOL GenericInformation::InsertSubInfo( GenericInformation *pInfo )
+sal_Bool GenericInformation::InsertSubInfo( GenericInformation *pInfo )
/*****************************************************************************/
{
return ( pInfoList && pInfoList->InsertInfo( pInfo ));
}
/*****************************************************************************/
-BOOL GenericInformation::InsertSubInfo( const ByteString &rPathKey, const ByteString &rValue,
- BOOL bSearchByPath, BOOL bNewPath )
+sal_Bool GenericInformation::InsertSubInfo( const ByteString &rPathKey, const ByteString &rValue,
+ sal_Bool bSearchByPath, sal_Bool bNewPath )
/*****************************************************************************/
{
return (pInfoList && pInfoList->InsertInfo( rPathKey, rValue, bSearchByPath, bNewPath ));
@@ -96,14 +96,14 @@ BOOL GenericInformation::InsertSubInfo( const ByteString &rPathKey, const ByteSt
/*****************************************************************************/
void GenericInformation::RemoveSubInfo( GenericInformation *pInfo,
- BOOL bDelete )
+ sal_Bool bDelete )
/*****************************************************************************/
{
pInfoList->RemoveInfo( pInfo, bDelete );
}
/*****************************************************************************/
-//void GenericInformation::RemoveSelf( BOOL bDelete )
+//void GenericInformation::RemoveSelf( sal_Bool bDelete )
/*****************************************************************************/
/*{
if ( pParent )
@@ -118,8 +118,8 @@ void GenericInformation::RemoveSubInfo( GenericInformation *pInfo,
/*****************************************************************************/
GenericInformation *GenericInformation::GetSubInfo( ByteString &rKey,
- BOOL bSearchByPath,
- BOOL bCreatePath )
+ sal_Bool bSearchByPath,
+ sal_Bool bCreatePath )
/*****************************************************************************/
{
if ( !pInfoList && bCreatePath )
@@ -147,7 +147,7 @@ GenericInformationList::GenericInformationList(const GenericInformationList& rLi
/*****************************************************************************/
: GenericInformationList_Impl()
{
- USHORT i;
+ sal_uInt16 i;
GenericInformation* pTemp,*pWork;
pOwner = pParent;
@@ -155,7 +155,7 @@ GenericInformationList::GenericInformationList(const GenericInformationList& rLi
for(i=0;i<rList.Count();i++)
{
pTemp = rList.GetObject(i);
- pWork = new GenericInformation(*pTemp,TRUE);
+ pWork = new GenericInformation(*pTemp,sal_True);
Insert(pWork,LIST_APPEND);
}
@@ -167,7 +167,7 @@ GenericInformationList::~GenericInformationList()
{
// delete all Informations stored in this List
// ### GH: Hier werden dann wohl etwa die H�lfte der Eintr�ge gel�scht
-/* for ( ULONG i = 0; i < Count(); i++ ) {
+/* for ( sal_uIntPtr i = 0; i < Count(); i++ ) {
GetObject( i )->ListDeleted();
delete GetObject( i );
Remove( i );*/
@@ -175,13 +175,13 @@ GenericInformationList::~GenericInformationList()
while ( Count() ) {
GetObject( 0 )->ListDeleted();
delete GetObject( 0 );
- Remove( (ULONG)0 );
+ Remove( (sal_uIntPtr)0 );
}
}
/*****************************************************************************/
-GenericInformation *GenericInformationList::Search( ULONG &rPos, ByteString sKey,
- ULONG nStart, ULONG nEnd )
+GenericInformation *GenericInformationList::Search( sal_uIntPtr &rPos, ByteString sKey,
+ sal_uIntPtr nStart, sal_uIntPtr nEnd )
/*****************************************************************************/
{
if ( Count() == 0 ) {
@@ -202,7 +202,7 @@ GenericInformation *GenericInformationList::Search( ULONG &rPos, ByteString sKey
}
// search binary in existing list
- ULONG nActPos = nStart + (( nEnd - nStart ) / 2 );
+ sal_uIntPtr nActPos = nStart + (( nEnd - nStart ) / 2 );
rPos = nActPos;
ByteString sCandidate = ByteString( *GetObject( nActPos ));
@@ -218,8 +218,8 @@ GenericInformation *GenericInformationList::Search( ULONG &rPos, ByteString sKey
/*****************************************************************************/
GenericInformation *GenericInformationList::GetInfo( ByteString &rKey,
- BOOL bSearchByPath,
- BOOL bCreatePath )
+ sal_Bool bSearchByPath,
+ sal_Bool bCreatePath )
/*****************************************************************************/
{
@@ -232,7 +232,7 @@ GenericInformation *GenericInformationList::GetInfo( ByteString &rKey,
else
sKey = rKey;
- ULONG nPos = 0;
+ sal_uIntPtr nPos = 0;
GenericInformation *pReturnInfo = Search( nPos, sKey, 0, Count() - 1 );
/* wenn kein Searchpath gesetzt und kein Returninfo vorhanden,
* gib NULL zurueck
@@ -241,7 +241,7 @@ GenericInformation *GenericInformationList::GetInfo( ByteString &rKey,
* wenn searchpath gesetzt kein returninfo vorhanden und newpath gesetzt,
* mache neues Verzeichniss
*/
- USHORT nTokenCount = rKey.GetTokenCount('/');
+ sal_uInt16 nTokenCount = rKey.GetTokenCount('/');
// search for next key of path in next level of tree
if ( bSearchByPath && (nTokenCount > 1)) {
ByteString sPath = ByteString(rKey.Copy( sKey.Len() + 1 ));
@@ -251,7 +251,7 @@ GenericInformation *GenericInformationList::GetInfo( ByteString &rKey,
pReturnInfo = new GenericInformation( sKey, "", this, NULL);
pReturnInfo->SetSubList( new GenericInformationList( pReturnInfo ));
}
- return pReturnInfo->GetSubInfo( sPath, TRUE, bCreatePath );
+ return pReturnInfo->GetSubInfo( sPath, sal_True, bCreatePath );
}
if ( !pReturnInfo && bCreatePath ) {
pReturnInfo = new GenericInformation ( sKey, "", this, NULL);
@@ -261,9 +261,9 @@ GenericInformation *GenericInformationList::GetInfo( ByteString &rKey,
}
/*****************************************************************************/
-ULONG GenericInformationList::InsertSorted( GenericInformation *pInfo,
- BOOL bOverwrite,
- ULONG nStart, ULONG nEnd )
+sal_uIntPtr GenericInformationList::InsertSorted( GenericInformation *pInfo,
+ sal_Bool bOverwrite,
+ sal_uIntPtr nStart, sal_uIntPtr nEnd )
/*****************************************************************************/
{
if ( Count() == 0 ) {
@@ -292,11 +292,11 @@ ULONG GenericInformationList::InsertSorted( GenericInformation *pInfo,
if ( sCandidate.ToUpperAscii() == sKey ) {
// key allready exists in list
if ( bOverwrite )
- Replace( pInfo, ULONG(0)); // ### Laut NF scheint hier ein Memory Leak zu sein
+ Replace( pInfo, sal_uIntPtr(0)); // ### Laut NF scheint hier ein Memory Leak zu sein
return 0;
}
else if ( sCandidate > sKey ) {
- Insert( pInfo, ULONG(0));
+ Insert( pInfo, sal_uIntPtr(0));
return 0;
}
else {
@@ -306,7 +306,7 @@ ULONG GenericInformationList::InsertSorted( GenericInformation *pInfo,
}
// ### GH: /ENDE/ dieser Block schein �berfl�ssig zu sein
- ULONG nActPos = nStart + (( nEnd - nStart ) / 2 );
+ sal_uIntPtr nActPos = nStart + (( nEnd - nStart ) / 2 );
ByteString sCandidate = ByteString( *GetObject( nActPos ));
if ( sCandidate.ToUpperAscii() == sKey ) {
@@ -348,21 +348,21 @@ ULONG GenericInformationList::InsertSorted( GenericInformation *pInfo,
}
/*****************************************************************************/
-BOOL GenericInformationList::InsertInfo( GenericInformation *pInfo,
- BOOL bOverwrite )
+sal_Bool GenericInformationList::InsertInfo( GenericInformation *pInfo,
+ sal_Bool bOverwrite )
/*****************************************************************************/
{
if ( !pInfo->Len())
- return FALSE;
+ return sal_False;
InsertSorted( pInfo, bOverwrite, 0, Count() - 1 );
- return TRUE;
+ return sal_True;
}
/*****************************************************************************/
-BOOL GenericInformationList::InsertInfo( const ByteString &rPathKey, const ByteString &rValue,
- BOOL bSearchByPath, BOOL bNewPath )
+sal_Bool GenericInformationList::InsertInfo( const ByteString &rPathKey, const ByteString &rValue,
+ sal_Bool bSearchByPath, sal_Bool bNewPath )
/*****************************************************************************/
{
GenericInformation *pInfo;
@@ -374,14 +374,14 @@ BOOL GenericInformationList::InsertInfo( const ByteString &rPathKey, const ByteS
if ( pInfo ) {
pInfo->SetValue( rValue );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*****************************************************************************/
void GenericInformationList::RemoveInfo( GenericInformation *pInfo,
- BOOL bDelete )
+ sal_Bool bDelete )
/*****************************************************************************/
{
Remove( pInfo );
diff --git a/tools/source/communi/parser.cxx b/tools/source/communi/parser.cxx
index 20c2bb3ba059..f3baa37049e2 100644
--- a/tools/source/communi/parser.cxx
+++ b/tools/source/communi/parser.cxx
@@ -44,9 +44,9 @@
#define cKeyLevelChar '\t'
/*****************************************************************************/
-InformationParser::InformationParser( BOOL bReplace )
+InformationParser::InformationParser( sal_Bool bReplace )
/*****************************************************************************/
- : bRecover( FALSE ),
+ : bRecover( sal_False ),
sOldLine( "" ),
bReplaceVariables( bReplace ),
nLevel( 0 ),
@@ -73,24 +73,24 @@ ByteString &InformationParser::ReadLine()
ByteString sLine;
if ( bRecover ) {
- bRecover = FALSE;
+ bRecover = sal_False;
}
else {
if ( !pActStream->IsEof()) {
pActStream->ReadLine( sLine );
xub_StrLen nStart = 0;
xub_StrLen nEnd = sLine.Len();
- BOOL bCopy = FALSE;
+ sal_Bool bCopy = sal_False;
while ( nStart < nEnd && ( sLine.GetChar( nStart ) == ' ' || sLine.GetChar( nStart ) == 0x09 ) )
{
nStart++;
- bCopy = TRUE;
+ bCopy = sal_True;
}
while ( nStart < nEnd && ( sLine.GetChar( nEnd-1 ) == ' ' || sLine.GetChar( nEnd-1 ) == 0x09 ) )
{
nEnd--;
- bCopy = TRUE;
+ bCopy = sal_True;
}
if ( bCopy )
@@ -164,7 +164,7 @@ GenericInformation *InformationParser::ReadKey(
sCurrentComment = "";
// key separated from value by tab?
- USHORT nWSPos = sLine.Search( ' ' );
+ sal_uInt16 nWSPos = sLine.Search( ' ' );
if ( sLine.Search( '\t' ) < nWSPos ) {
nWSPos = sLine.Search( '\t' );
sLine.SearchAndReplace( "\t", " " );
@@ -213,17 +213,17 @@ GenericInformation *InformationParser::ReadKey(
void InformationParser::Recover()
/*****************************************************************************/
{
- bRecover = TRUE;
+ bRecover = sal_True;
}
/*****************************************************************************/
-BOOL InformationParser::Save( SvStream &rOutStream,
+sal_Bool InformationParser::Save( SvStream &rOutStream,
const GenericInformationList *pSaveList,
- USHORT level, BOOL bStripped )
+ sal_uInt16 level, sal_Bool bStripped )
/*****************************************************************************/
{
- USHORT i;
- ULONG nInfoListCount;
+ sal_uInt16 i;
+ sal_uIntPtr nInfoListCount;
ByteString sTmpStr;
GenericInformation *pGenericInfo;
GenericInformationList *pGenericInfoList;
@@ -250,7 +250,7 @@ BOOL InformationParser::Save( SvStream &rOutStream,
sTmpStr += ' ';
sTmpStr += pGenericInfo->GetValue();
if ( !rOutStream.WriteLine( sTmpStr ) )
- return FALSE;
+ return sal_False;
// wenn vorhanden, bearbeite recursive die Sublisten
if (( pGenericInfoList = pGenericInfo->GetSubList() ) != NULL ) {
@@ -260,20 +260,20 @@ BOOL InformationParser::Save( SvStream &rOutStream,
sTmpStr.Append( aKeyLevel.GetBuffer(), level );
sTmpStr += '{';
if ( !rOutStream.WriteLine( sTmpStr ) )
- return FALSE;
+ return sal_False;
// recursiv die sublist abarbeiten
if ( !Save( rOutStream, pGenericInfoList, level+1, bStripped ) )
- return FALSE;
+ return sal_False;
// schliessende Klammer
sTmpStr = "";
if ( !bStripped && level )
sTmpStr.Append( aKeyLevel.GetBuffer(), level );
sTmpStr += '}';
if ( !rOutStream.WriteLine( sTmpStr ) )
- return FALSE;
+ return sal_False;
}
}
- return TRUE;
+ return sal_True;
}
/*****************************************************************************/
@@ -373,7 +373,7 @@ GenericInformationList *InformationParser::Execute( Dir &rDir,
else
pList = new GenericInformationList();
- for ( USHORT i = 0; i < rDir.Count(); i++ ) {
+ for ( sal_uInt16 i = 0; i < rDir.Count(); i++ ) {
// execute this dir
UniString sNextFile( rDir[i].GetFull());
@@ -397,33 +397,33 @@ GenericInformationList *InformationParser::Execute( Dir &rDir,
}
/*****************************************************************************/
-BOOL InformationParser::Save( SvFileStream &rSourceStream,
+sal_Bool InformationParser::Save( SvFileStream &rSourceStream,
const GenericInformationList *pSaveList )
/*****************************************************************************/
{
- if ( !rSourceStream.IsOpen() || !Save( (SvStream &)rSourceStream, pSaveList, 0, FALSE ))
+ if ( !rSourceStream.IsOpen() || !Save( (SvStream &)rSourceStream, pSaveList, 0, sal_False ))
{
printf( "ERROR saving file \"%s\"\n",ByteString( rSourceStream.GetFileName(), gsl_getSystemTextEncoding()).GetBuffer() );
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
/*****************************************************************************/
-BOOL InformationParser::Save( SvMemoryStream &rSourceStream,
+sal_Bool InformationParser::Save( SvMemoryStream &rSourceStream,
const GenericInformationList *pSaveList )
/*****************************************************************************/
{
Time a;
- BOOL bRet = Save( (SvStream &)rSourceStream, pSaveList, 0, TRUE );
+ sal_Bool bRet = Save( (SvStream &)rSourceStream, pSaveList, 0, sal_True );
Time b;
b = b - a;
return bRet;
}
/*****************************************************************************/
-BOOL InformationParser::Save( const UniString &rSourceFile,
+sal_Bool InformationParser::Save( const UniString &rSourceFile,
const GenericInformationList *pSaveList )
/*****************************************************************************/
{
@@ -431,14 +431,14 @@ BOOL InformationParser::Save( const UniString &rSourceFile,
if ( !Save( *pOutFile, pSaveList )) {
delete pOutFile;
- return FALSE;
+ return sal_False;
}
delete pOutFile;
- return TRUE;
+ return sal_True;
}
/*****************************************************************************/
-USHORT InformationParser::GetErrorCode()
+sal_uInt16 InformationParser::GetErrorCode()
/*****************************************************************************/
{
return nErrorCode;
diff --git a/tools/source/datetime/datetime.cxx b/tools/source/datetime/datetime.cxx
index 8b679478c535..ffdbd25789ac 100644
--- a/tools/source/datetime/datetime.cxx
+++ b/tools/source/datetime/datetime.cxx
@@ -41,13 +41,13 @@
|*
*************************************************************************/
-BOOL DateTime::IsBetween( const DateTime& rFrom,
+sal_Bool DateTime::IsBetween( const DateTime& rFrom,
const DateTime& rTo ) const
{
if ( (*this >= rFrom) && (*this <= rTo) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -60,13 +60,13 @@ BOOL DateTime::IsBetween( const DateTime& rFrom,
|*
*************************************************************************/
-BOOL DateTime::operator >( const DateTime& rDateTime ) const
+sal_Bool DateTime::operator >( const DateTime& rDateTime ) const
{
if ( (Date::operator>( rDateTime )) ||
(Date::operator==( rDateTime ) && Time::operator>( rDateTime )) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -79,13 +79,13 @@ BOOL DateTime::operator >( const DateTime& rDateTime ) const
|*
*************************************************************************/
-BOOL DateTime::operator <( const DateTime& rDateTime ) const
+sal_Bool DateTime::operator <( const DateTime& rDateTime ) const
{
if ( (Date::operator<( rDateTime )) ||
(Date::operator==( rDateTime ) && Time::operator<( rDateTime )) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -98,13 +98,13 @@ BOOL DateTime::operator <( const DateTime& rDateTime ) const
|*
*************************************************************************/
-BOOL DateTime::operator >=( const DateTime& rDateTime ) const
+sal_Bool DateTime::operator >=( const DateTime& rDateTime ) const
{
if ( (Date::operator>( rDateTime )) ||
(Date::operator==( rDateTime ) && Time::operator>=( rDateTime )) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -117,13 +117,13 @@ BOOL DateTime::operator >=( const DateTime& rDateTime ) const
|*
*************************************************************************/
-BOOL DateTime::operator <=( const DateTime& rDateTime ) const
+sal_Bool DateTime::operator <=( const DateTime& rDateTime ) const
{
if ( (Date::operator<( rDateTime )) ||
(Date::operator==( rDateTime ) && Time::operator<=( rDateTime )) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -161,14 +161,14 @@ long DateTime::GetSecFromDateTime( const Date& rDate ) const
|*
*************************************************************************/
-void DateTime::MakeDateTimeFromSec( const Date& rDate, ULONG nSec )
+void DateTime::MakeDateTimeFromSec( const Date& rDate, sal_uIntPtr nSec )
{
long nDays = nSec / (24UL*60*60);
((Date*)this)->operator=( rDate );
nSec -= nDays * (24UL*60*60);
- USHORT nMin = (USHORT)(nSec / 60);
+ sal_uInt16 nMin = (sal_uInt16)(nSec / 60);
nSec -= nMin * 60;
- ((Time*)this)->operator=( Time( 0, nMin, (USHORT)nSec ) );
+ ((Time*)this)->operator=( Time( 0, nMin, (sal_uInt16)nSec ) );
operator+=( nDays );
}
@@ -186,7 +186,7 @@ DateTime& DateTime::operator +=( const Time& rTime )
{
Time aTime = *this;
aTime += rTime;
- USHORT nHours = aTime.GetHour();
+ sal_uInt16 nHours = aTime.GetHour();
if ( aTime.GetTime() > 0 )
{
while ( nHours >= 24 )
@@ -225,7 +225,7 @@ DateTime& DateTime::operator -=( const Time& rTime )
{
Time aTime = *this;
aTime -= rTime;
- USHORT nHours = aTime.GetHour();
+ sal_uInt16 nHours = aTime.GetHour();
if ( aTime.GetTime() > 0 )
{
while ( nHours >= 24 )
@@ -421,22 +421,22 @@ DateTime DateTime::CreateFromWin32FileDateTime( const sal_uInt32 & rLower, const
( nDays / ( 400 * 365 ) ) ) / 365;
nDays -= nYears * 365 + nYears / 4 - nYears / 100 + nYears / 400;
- USHORT nMonths = 0;
+ sal_uInt16 nMonths = 0;
for( sal_Int64 nDaysCount = nDays; nDaysCount >= 0; )
{
nDays = nDaysCount;
nMonths ++;
nDaysCount -= Date(
- 1, nMonths, sal::static_int_cast< USHORT >(1601 + nYears) ).
+ 1, nMonths, sal::static_int_cast< sal_uInt16 >(1601 + nYears) ).
GetDaysInMonth();
}
Date _aDate(
- (USHORT)( nDays + 1 ), nMonths,
- sal::static_int_cast< USHORT >(nYears + 1601) );
- Time _aTime( ULONG( ( aTime / ( a100nPerSecond * 60 * 60 ) ) % sal_Int64( 24 ) ),
- ULONG( ( aTime / ( a100nPerSecond * 60 ) ) % sal_Int64( 60 ) ),
- ULONG( ( aTime / ( a100nPerSecond ) ) % sal_Int64( 60 ) ) );
+ (sal_uInt16)( nDays + 1 ), nMonths,
+ sal::static_int_cast< sal_uInt16 >(nYears + 1601) );
+ Time _aTime( sal_uIntPtr( ( aTime / ( a100nPerSecond * 60 * 60 ) ) % sal_Int64( 24 ) ),
+ sal_uIntPtr( ( aTime / ( a100nPerSecond * 60 ) ) % sal_Int64( 60 ) ),
+ sal_uIntPtr( ( aTime / ( a100nPerSecond ) ) % sal_Int64( 60 ) ) );
return DateTime( _aDate, _aTime );
}
diff --git a/tools/source/datetime/tdate.cxx b/tools/source/datetime/tdate.cxx
index e6bb4345d9f9..2a3c36daf9ed 100644
--- a/tools/source/datetime/tdate.cxx
+++ b/tools/source/datetime/tdate.cxx
@@ -53,14 +53,14 @@ struct tm *localtime_r(const time_t *timep, struct tm *buffer);
// =======================================================================
-static USHORT aDaysInMonth[12] = { 31, 28, 31, 30, 31, 30,
+static sal_uInt16 aDaysInMonth[12] = { 31, 28, 31, 30, 31, 30,
31, 31, 30, 31, 30, 31 };
#define MAX_DAYS 3636532
// =======================================================================
-inline BOOL ImpIsLeapYear( USHORT nYear )
+inline sal_Bool ImpIsLeapYear( sal_uInt16 nYear )
{
return (
( ((nYear % 4) == 0) && ((nYear % 100) != 0) ) ||
@@ -70,7 +70,7 @@ inline BOOL ImpIsLeapYear( USHORT nYear )
// -----------------------------------------------------------------------
-inline USHORT DaysInMonth( USHORT nMonth, USHORT nYear )
+inline sal_uInt16 DaysInMonth( sal_uInt16 nMonth, sal_uInt16 nYear )
{
if ( nMonth != 2 )
return aDaysInMonth[nMonth-1];
@@ -85,13 +85,13 @@ inline USHORT DaysInMonth( USHORT nMonth, USHORT nYear )
// -----------------------------------------------------------------------
-long Date::DateToDays( USHORT nDay, USHORT nMonth, USHORT nYear )
+long Date::DateToDays( sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear )
{
long nDays;
- nDays = ((ULONG)nYear-1) * 365;
+ nDays = ((sal_uIntPtr)nYear-1) * 365;
nDays += ((nYear-1) / 4) - ((nYear-1) / 100) + ((nYear-1) / 400);
- for( USHORT i = 1; i < nMonth; i++ )
+ for( sal_uInt16 i = 1; i < nMonth; i++ )
nDays += DaysInMonth(i,nYear);
nDays += nDay;
return nDays;
@@ -100,23 +100,23 @@ long Date::DateToDays( USHORT nDay, USHORT nMonth, USHORT nYear )
// -----------------------------------------------------------------------
static void DaysToDate( long nDays,
- USHORT& rDay, USHORT& rMonth, USHORT& rYear )
+ sal_uInt16& rDay, sal_uInt16& rMonth, sal_uInt16& rYear )
{
long nTempDays;
long i = 0;
- BOOL bCalc;
+ sal_Bool bCalc;
do
{
nTempDays = (long)nDays;
- rYear = (USHORT)((nTempDays / 365) - i);
- nTempDays -= ((ULONG)rYear-1) * 365;
+ rYear = (sal_uInt16)((nTempDays / 365) - i);
+ nTempDays -= ((sal_uIntPtr)rYear-1) * 365;
nTempDays -= ((rYear-1) / 4) - ((rYear-1) / 100) + ((rYear-1) / 400);
- bCalc = FALSE;
+ bCalc = sal_False;
if ( nTempDays < 1 )
{
i++;
- bCalc = TRUE;
+ bCalc = sal_True;
}
else
{
@@ -125,7 +125,7 @@ static void DaysToDate( long nDays,
if ( (nTempDays != 366) || !ImpIsLeapYear( rYear ) )
{
i--;
- bCalc = TRUE;
+ bCalc = sal_True;
}
}
}
@@ -133,12 +133,12 @@ static void DaysToDate( long nDays,
while ( bCalc );
rMonth = 1;
- while ( (ULONG)nTempDays > DaysInMonth( rMonth, rYear ) )
+ while ( (sal_uIntPtr)nTempDays > DaysInMonth( rMonth, rYear ) )
{
nTempDays -= DaysInMonth( rMonth, rYear );
rMonth++;
}
- rDay = (USHORT)nTempDays;
+ rDay = (sal_uInt16)nTempDays;
}
// =======================================================================
@@ -150,17 +150,17 @@ Date::Date()
DosGetDateTime( &aDateTime );
// Datum zusammenbauen
- nDate = ((ULONG)aDateTime.day) +
- (((ULONG)aDateTime.month)*100) +
- (((ULONG)aDateTime.year)*10000);
+ nDate = ((sal_uIntPtr)aDateTime.day) +
+ (((sal_uIntPtr)aDateTime.month)*100) +
+ (((sal_uIntPtr)aDateTime.year)*10000);
#elif defined WNT
SYSTEMTIME aDateTime;
GetLocalTime( &aDateTime );
// Datum zusammenbauen
- nDate = ((ULONG)aDateTime.wDay) +
- (((ULONG)aDateTime.wMonth)*100) +
- (((ULONG)aDateTime.wYear)*10000);
+ nDate = ((sal_uIntPtr)aDateTime.wDay) +
+ (((sal_uIntPtr)aDateTime.wMonth)*100) +
+ (((sal_uIntPtr)aDateTime.wYear)*10000);
#else
time_t nTmpTime;
struct tm aTime;
@@ -171,65 +171,65 @@ Date::Date()
// Datum zusammenbauen
if ( localtime_r( &nTmpTime, &aTime ) )
{
- nDate = ((ULONG)aTime.tm_mday) +
- (((ULONG)(aTime.tm_mon+1))*100) +
- (((ULONG)(aTime.tm_year+1900))*10000);
+ nDate = ((sal_uIntPtr)aTime.tm_mday) +
+ (((sal_uIntPtr)(aTime.tm_mon+1))*100) +
+ (((sal_uIntPtr)(aTime.tm_year+1900))*10000);
}
else
- nDate = 1 + 100 + (((ULONG)1900)*10000);
+ nDate = 1 + 100 + (((sal_uIntPtr)1900)*10000);
#endif
}
// -----------------------------------------------------------------------
-void Date::SetDay( USHORT nNewDay )
+void Date::SetDay( sal_uInt16 nNewDay )
{
- ULONG nMonth = GetMonth();
- ULONG nYear = GetYear();
+ sal_uIntPtr nMonth = GetMonth();
+ sal_uIntPtr nYear = GetYear();
- nDate = ((ULONG)(nNewDay%100)) + (nMonth*100) + (nYear*10000);
+ nDate = ((sal_uIntPtr)(nNewDay%100)) + (nMonth*100) + (nYear*10000);
}
// -----------------------------------------------------------------------
-void Date::SetMonth( USHORT nNewMonth )
+void Date::SetMonth( sal_uInt16 nNewMonth )
{
- ULONG nDay = GetDay();
- ULONG nYear = GetYear();
+ sal_uIntPtr nDay = GetDay();
+ sal_uIntPtr nYear = GetYear();
- nDate = nDay + (((ULONG)(nNewMonth%100))*100) + (nYear*10000);
+ nDate = nDay + (((sal_uIntPtr)(nNewMonth%100))*100) + (nYear*10000);
}
// -----------------------------------------------------------------------
-void Date::SetYear( USHORT nNewYear )
+void Date::SetYear( sal_uInt16 nNewYear )
{
- ULONG nDay = GetDay();
- ULONG nMonth = GetMonth();
+ sal_uIntPtr nDay = GetDay();
+ sal_uIntPtr nMonth = GetMonth();
- nDate = nDay + (nMonth*100) + (((ULONG)(nNewYear%10000))*10000);
+ nDate = nDay + (nMonth*100) + (((sal_uIntPtr)(nNewYear%10000))*10000);
}
// -----------------------------------------------------------------------
DayOfWeek Date::GetDayOfWeek() const
{
- return (DayOfWeek)((ULONG)(DateToDays( GetDay(), GetMonth(), GetYear() )-1) % 7);
+ return (DayOfWeek)((sal_uIntPtr)(DateToDays( GetDay(), GetMonth(), GetYear() )-1) % 7);
}
// -----------------------------------------------------------------------
-USHORT Date::GetDayOfYear() const
+sal_uInt16 Date::GetDayOfYear() const
{
- USHORT nDay = GetDay();
- for( USHORT i = 1; i < GetMonth(); i++ )
+ sal_uInt16 nDay = GetDay();
+ for( sal_uInt16 i = 1; i < GetMonth(); i++ )
nDay = nDay + ::DaysInMonth( i, GetYear() ); // += yields a warning on MSVC, so don't use it
return nDay;
}
// -----------------------------------------------------------------------
-USHORT Date::GetWeekOfYear( DayOfWeek eStartDay,
+sal_uInt16 Date::GetWeekOfYear( DayOfWeek eStartDay,
sal_Int16 nMinimumNumberOfDaysInWeek ) const
{
short nWeek;
@@ -307,76 +307,76 @@ USHORT Date::GetWeekOfYear( DayOfWeek eStartDay,
// == noch gleiche Woche
long nTempDays = DateToDays( GetDay(), GetMonth(), GetYear() );
nTempDays += 6 - (GetDayOfWeek()+(7-(short)eStartDay)) % 7;
- USHORT nDay;
- USHORT nMonth;
- USHORT nYear;
+ sal_uInt16 nDay;
+ sal_uInt16 nMonth;
+ sal_uInt16 nYear;
DaysToDate( nTempDays, nDay, nMonth, nYear );
nWeek = Date( nDay, nMonth, nYear ).GetWeekOfYear( eStartDay, nMinimumNumberOfDaysInWeek );
}
}
}
- return (USHORT)nWeek;
+ return (sal_uInt16)nWeek;
}
// -----------------------------------------------------------------------
-USHORT Date::GetDaysInMonth() const
+sal_uInt16 Date::GetDaysInMonth() const
{
return DaysInMonth( GetMonth(), GetYear() );
}
// -----------------------------------------------------------------------
-BOOL Date::IsLeapYear() const
+sal_Bool Date::IsLeapYear() const
{
- USHORT nYear = GetYear();
+ sal_uInt16 nYear = GetYear();
return ImpIsLeapYear( nYear );
}
// -----------------------------------------------------------------------
-BOOL Date::IsValid() const
+sal_Bool Date::IsValid() const
{
- USHORT nDay = GetDay();
- USHORT nMonth = GetMonth();
- USHORT nYear = GetYear();
+ sal_uInt16 nDay = GetDay();
+ sal_uInt16 nMonth = GetMonth();
+ sal_uInt16 nYear = GetYear();
if ( !nMonth || (nMonth > 12) )
- return FALSE;
+ return sal_False;
if ( !nDay || (nDay > DaysInMonth( nMonth, nYear )) )
- return FALSE;
+ return sal_False;
else if ( nYear <= 1582 )
{
if ( nYear < 1582 )
- return FALSE;
+ return sal_False;
else if ( nMonth < 10 )
- return FALSE;
+ return sal_False;
else if ( (nMonth == 10) && (nDay < 15) )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
Date& Date::operator +=( long nDays )
{
- USHORT nDay;
- USHORT nMonth;
- USHORT nYear;
+ sal_uInt16 nDay;
+ sal_uInt16 nMonth;
+ sal_uInt16 nYear;
long nTempDays = DateToDays( GetDay(), GetMonth(), GetYear() );
nTempDays += nDays;
if ( nTempDays > MAX_DAYS )
- nDate = 31 + (12*100) + (((ULONG)9999)*10000);
+ nDate = 31 + (12*100) + (((sal_uIntPtr)9999)*10000);
else if ( nTempDays <= 0 )
nDate = 1 + 100;
else
{
DaysToDate( nTempDays, nDay, nMonth, nYear );
- nDate = ((ULONG)nDay) + (((ULONG)nMonth)*100) + (((ULONG)nYear)*10000);
+ nDate = ((sal_uIntPtr)nDay) + (((sal_uIntPtr)nMonth)*100) + (((sal_uIntPtr)nYear)*10000);
}
return *this;
@@ -386,20 +386,20 @@ Date& Date::operator +=( long nDays )
Date& Date::operator -=( long nDays )
{
- USHORT nDay;
- USHORT nMonth;
- USHORT nYear;
+ sal_uInt16 nDay;
+ sal_uInt16 nMonth;
+ sal_uInt16 nYear;
long nTempDays = DateToDays( GetDay(), GetMonth(), GetYear() );
nTempDays -= nDays;
if ( nTempDays > MAX_DAYS )
- nDate = 31 + (12*100) + (((ULONG)9999)*10000);
+ nDate = 31 + (12*100) + (((sal_uIntPtr)9999)*10000);
else if ( nTempDays <= 0 )
nDate = 1 + 100;
else
{
DaysToDate( nTempDays, nDay, nMonth, nYear );
- nDate = ((ULONG)nDay) + (((ULONG)nMonth)*100) + (((ULONG)nYear)*10000);
+ nDate = ((sal_uIntPtr)nDay) + (((sal_uIntPtr)nMonth)*100) + (((sal_uIntPtr)nYear)*10000);
}
return *this;
@@ -409,16 +409,16 @@ Date& Date::operator -=( long nDays )
Date& Date::operator ++()
{
- USHORT nDay;
- USHORT nMonth;
- USHORT nYear;
+ sal_uInt16 nDay;
+ sal_uInt16 nMonth;
+ sal_uInt16 nYear;
long nTempDays = DateToDays( GetDay(), GetMonth(), GetYear() );
if ( nTempDays < MAX_DAYS )
{
nTempDays++;
DaysToDate( nTempDays, nDay, nMonth, nYear );
- nDate = ((ULONG)nDay) + (((ULONG)nMonth)*100) + (((ULONG)nYear)*10000);
+ nDate = ((sal_uIntPtr)nDay) + (((sal_uIntPtr)nMonth)*100) + (((sal_uIntPtr)nYear)*10000);
}
return *this;
@@ -428,16 +428,16 @@ Date& Date::operator ++()
Date& Date::operator --()
{
- USHORT nDay;
- USHORT nMonth;
- USHORT nYear;
+ sal_uInt16 nDay;
+ sal_uInt16 nMonth;
+ sal_uInt16 nYear;
long nTempDays = DateToDays( GetDay(), GetMonth(), GetYear() );
if ( nTempDays > 1 )
{
nTempDays--;
DaysToDate( nTempDays, nDay, nMonth, nYear );
- nDate = ((ULONG)nDay) + (((ULONG)nMonth)*100) + (((ULONG)nYear)*10000);
+ nDate = ((sal_uIntPtr)nDay) + (((sal_uIntPtr)nMonth)*100) + (((sal_uIntPtr)nYear)*10000);
}
return *this;
}
@@ -486,9 +486,9 @@ Date operator -( const Date& rDate, long nDays )
long operator -( const Date& rDate1, const Date& rDate2 )
{
- ULONG nTempDays1 = Date::DateToDays( rDate1.GetDay(), rDate1.GetMonth(),
+ sal_uIntPtr nTempDays1 = Date::DateToDays( rDate1.GetDay(), rDate1.GetMonth(),
rDate1.GetYear() );
- ULONG nTempDays2 = Date::DateToDays( rDate2.GetDay(), rDate2.GetMonth(),
+ sal_uIntPtr nTempDays2 = Date::DateToDays( rDate2.GetDay(), rDate2.GetMonth(),
rDate2.GetYear() );
return nTempDays1 - nTempDays2;
}
diff --git a/tools/source/datetime/ttime.cxx b/tools/source/datetime/ttime.cxx
index 9483cc10065e..fee1c159df44 100644
--- a/tools/source/datetime/ttime.cxx
+++ b/tools/source/datetime/ttime.cxx
@@ -145,7 +145,7 @@ Time::Time( const Time& rTime )
// -----------------------------------------------------------------------
-Time::Time( ULONG nHour, ULONG nMin, ULONG nSec, ULONG n100Sec )
+Time::Time( sal_uIntPtr nHour, sal_uIntPtr nMin, sal_uIntPtr nSec, sal_uIntPtr n100Sec )
{
// Zeit normalisieren
nSec += n100Sec / 100;
@@ -161,7 +161,7 @@ Time::Time( ULONG nHour, ULONG nMin, ULONG nSec, ULONG n100Sec )
// -----------------------------------------------------------------------
-void Time::SetHour( USHORT nNewHour )
+void Time::SetHour( sal_uInt16 nNewHour )
{
short nSign = (nTime >= 0) ? +1 : -1;
sal_Int32 nMin = GetMin();
@@ -174,7 +174,7 @@ void Time::SetHour( USHORT nNewHour )
// -----------------------------------------------------------------------
-void Time::SetMin( USHORT nNewMin )
+void Time::SetMin( sal_uInt16 nNewMin )
{
short nSign = (nTime >= 0) ? +1 : -1;
sal_Int32 nHour = GetHour();
@@ -190,7 +190,7 @@ void Time::SetMin( USHORT nNewMin )
// -----------------------------------------------------------------------
-void Time::SetSec( USHORT nNewSec )
+void Time::SetSec( sal_uInt16 nNewSec )
{
short nSign = (nTime >= 0) ? +1 : -1;
sal_Int32 nHour = GetHour();
@@ -206,7 +206,7 @@ void Time::SetSec( USHORT nNewSec )
// -----------------------------------------------------------------------
-void Time::Set100Sec( USHORT nNew100Sec )
+void Time::Set100Sec( sal_uInt16 nNew100Sec )
{
short nSign = (nTime >= 0) ? +1 : -1;
sal_Int32 nHour = GetHour();
@@ -307,7 +307,7 @@ Time operator -( const Time& rTime1, const Time& rTime2 )
// -----------------------------------------------------------------------
-BOOL Time::IsEqualIgnore100Sec( const Time& rTime ) const
+sal_Bool Time::IsEqualIgnore100Sec( const Time& rTime ) const
{
sal_Int32 n1 = (nTime < 0 ? -Get100Sec() : Get100Sec() );
sal_Int32 n2 = (rTime.nTime < 0 ? -rTime.Get100Sec() : rTime.Get100Sec() );
@@ -327,7 +327,7 @@ Time Time::GetUTCOffset()
if ( aDateTime.timezone != -1 )
{
short nTempTime = (short)Abs( aDateTime.timezone );
- Time aTime( 0, (USHORT)nTempTime );
+ Time aTime( 0, (sal_uInt16)nTempTime );
if ( aDateTime.timezone > 0 )
aTime = -aTime;
return aTime;
@@ -343,14 +343,14 @@ Time Time::GetUTCOffset()
nTempTime += aTimeZone.StandardBias;
else if ( nTimeZoneRet == TIME_ZONE_ID_DAYLIGHT )
nTempTime += aTimeZone.DaylightBias;
- Time aTime( 0, (USHORT)Abs( nTempTime ) );
+ Time aTime( 0, (sal_uInt16)Abs( nTempTime ) );
if ( nTempTime > 0 )
aTime = -aTime;
return aTime;
#else
- static ULONG nCacheTicks = 0;
+ static sal_uIntPtr nCacheTicks = 0;
static sal_Int32 nCacheSecOffset = -1;
- ULONG nTicks = Time::GetSystemTicks();
+ sal_uIntPtr nTicks = Time::GetSystemTicks();
time_t nTime;
tm aTM;
sal_Int32 nLocalTime;
@@ -382,7 +382,7 @@ Time Time::GetUTCOffset()
}
nTempTime = (short)Abs( nCacheSecOffset );
- Time aTime( 0, (USHORT)nTempTime );
+ Time aTime( 0, (sal_uInt16)nTempTime );
if ( nCacheSecOffset < 0 )
aTime = -aTime;
return aTime;
@@ -392,14 +392,14 @@ Time Time::GetUTCOffset()
// -----------------------------------------------------------------------
-ULONG Time::GetSystemTicks()
+sal_uIntPtr Time::GetSystemTicks()
{
#if defined WNT
- return (ULONG)GetTickCount();
+ return (sal_uIntPtr)GetTickCount();
#elif defined( OS2 )
- ULONG nClock;
+ sal_uIntPtr nClock;
DosQuerySysInfo( QSV_MS_COUNT, QSV_MS_COUNT, &nClock, sizeof( nClock ) );
- return (ULONG)nClock;
+ return (sal_uIntPtr)nClock;
#else
timeval tv;
gettimeofday (&tv, 0);
@@ -409,37 +409,37 @@ ULONG Time::GetSystemTicks()
fTicks += ((tv.tv_usec + 500) / 1000);
fTicks = fmod (fTicks, double(ULONG_MAX));
- return ULONG(fTicks);
+ return sal_uIntPtr(fTicks);
#endif
}
// -----------------------------------------------------------------------
-ULONG Time::GetProcessTicks()
+sal_uIntPtr Time::GetProcessTicks()
{
#if defined WNT
- return (ULONG)GetTickCount();
+ return (sal_uIntPtr)GetTickCount();
#elif defined( OS2 )
- ULONG nClock;
+ sal_uIntPtr nClock;
DosQuerySysInfo( QSV_MS_COUNT, QSV_MS_COUNT, &nClock, sizeof( nClock ) );
- return (ULONG)nClock;
+ return (sal_uIntPtr)nClock;
#else
- static ULONG nImplTicksPerSecond = 0;
+ static sal_uIntPtr nImplTicksPerSecond = 0;
static double dImplTicksPerSecond;
static double dImplTicksULONGMAX;
- ULONG nTicks = (ULONG)clock();
+ sal_uIntPtr nTicks = (sal_uIntPtr)clock();
if ( !nImplTicksPerSecond )
{
nImplTicksPerSecond = CLOCKS_PER_SEC;
dImplTicksPerSecond = nImplTicksPerSecond;
- dImplTicksULONGMAX = (double)(ULONG)ULONG_MAX;
+ dImplTicksULONGMAX = (double)(sal_uIntPtr)ULONG_MAX;
}
double fTicks = nTicks;
fTicks *= 1000;
fTicks /= dImplTicksPerSecond;
fTicks = fmod (fTicks, dImplTicksULONGMAX);
- return (ULONG)fTicks;
+ return (sal_uIntPtr)fTicks;
#endif
}
diff --git a/tools/source/debug/debug.cxx b/tools/source/debug/debug.cxx
index e17457c60525..fd6f499b4036 100644
--- a/tools/source/debug/debug.cxx
+++ b/tools/source/debug/debug.cxx
@@ -94,7 +94,7 @@ static sal_Char const DbgTrace_LeaveMeth[] = "Leave method from class ";
struct PBlock
{
void* aData[PBLOCKCOUNT];
- USHORT nCount;
+ sal_uInt16 nCount;
PBlock* pPrev;
PBlock* pNext;
};
@@ -104,18 +104,18 @@ class PointerList
private:
PBlock* pFirst;
PBlock* pLast;
- ULONG nCount;
+ sal_uIntPtr nCount;
public:
PointerList() { pFirst = NULL; pLast = NULL; nCount = 0; }
~PointerList();
void Add( const void* p );
- BOOL Remove( const void* p );
+ sal_Bool Remove( const void* p );
- const void* Get( ULONG nPos ) const;
- BOOL IsIn( const void* p ) const;
- ULONG Count() const { return nCount; }
+ const void* Get( sal_uIntPtr nPos ) const;
+ sal_Bool IsIn( const void* p ) const;
+ sal_uIntPtr Count() const { return nCount; }
};
// --- Datentypen ---
@@ -124,31 +124,31 @@ public:
struct ProfType
{
- ULONG nCount;
- ULONG nTime;
- ULONG nMinTime;
- ULONG nMaxTime;
- ULONG nStart;
- ULONG nContinueTime;
- ULONG nContinueStart;
+ sal_uIntPtr nCount;
+ sal_uIntPtr nTime;
+ sal_uIntPtr nMinTime;
+ sal_uIntPtr nMaxTime;
+ sal_uIntPtr nStart;
+ sal_uIntPtr nContinueTime;
+ sal_uIntPtr nContinueStart;
sal_Char aName[DBG_MAXNAME+1];
};
struct XtorType
{
- ULONG nCtorCalls;
- ULONG nDtorCalls;
- ULONG nMaxCount;
- ULONG nStatics;
+ sal_uIntPtr nCtorCalls;
+ sal_uIntPtr nDtorCalls;
+ sal_uIntPtr nMaxCount;
+ sal_uIntPtr nStatics;
sal_Char aName[DBG_MAXNAME+1];
- BOOL bTest;
+ sal_Bool bTest;
PointerList aThisList;
};
struct DebugData
{
DbgData aDbgData;
- USHORT bInit;
+ sal_uInt16 bInit;
DbgPrintLine pDbgPrintMsgBox;
DbgPrintLine pDbgPrintWindow;
DbgPrintLine pDbgPrintTestTool;
@@ -162,8 +162,8 @@ struct DebugData
bool bOslIsHooked;
DebugData()
- :bInit( FALSE )
- ,pDbgPrintMsgBox( FALSE )
+ :bInit( sal_False )
+ ,pDbgPrintMsgBox( sal_False )
,pDbgPrintWindow( NULL )
,pDbgPrintTestTool( NULL )
,pProfList( NULL )
@@ -173,14 +173,14 @@ struct DebugData
,bOslIsHooked( false )
{
aDbgData.nTestFlags = DBG_TEST_RESOURCE | DBG_TEST_MEM_INIT;
- aDbgData.bOverwrite = TRUE;
+ aDbgData.bOverwrite = sal_True;
aDbgData.nTraceOut = DBG_OUT_NULL;
aDbgData.nWarningOut = DBG_OUT_NULL;
aDbgData.nErrorOut = DBG_OUT_MSGBOX;
aDbgData.bMemInit = 0x77;
aDbgData.bMemBound = 0x55;
aDbgData.bMemFree = 0x33;
- aDbgData.bHookOSLAssert = TRUE;
+ aDbgData.bHookOSLAssert = sal_True;
aDbgData.aDebugName[0] = 0;
aDbgData.aInclFilter[0] = 0;
aDbgData.aExclFilter[0] = 0;
@@ -201,7 +201,7 @@ static DebugData aDebugData;
static sal_Char aCurPath[260];
-static int bDbgImplInMain = FALSE;
+static int bDbgImplInMain = sal_False;
// =======================================================================
@@ -210,7 +210,7 @@ static CRITICAL_SECTION aImplCritDbgSection;
#elif defined( OS2 )
static HMTX hImplCritDbgSection = 0;
#endif
-static BOOL bImplCritDbgSectionInit = FALSE;
+static sal_Bool bImplCritDbgSectionInit = sal_False;
// -----------------------------------------------------------------------
@@ -219,9 +219,9 @@ void ImplDbgInitLock()
#if defined( WNT )
InitializeCriticalSection( &aImplCritDbgSection );
#elif defined( OS2 )
- DosCreateMutexSem( NULL, &hImplCritDbgSection, 0, FALSE );
+ DosCreateMutexSem( NULL, &hImplCritDbgSection, 0, sal_False );
#endif
- bImplCritDbgSectionInit = TRUE;
+ bImplCritDbgSectionInit = sal_True;
}
// -----------------------------------------------------------------------
@@ -233,7 +233,7 @@ void ImplDbgDeInitLock()
#elif defined( OS2 )
DosCloseMutexSem( hImplCritDbgSection );
#endif
- bImplCritDbgSectionInit = FALSE;
+ bImplCritDbgSectionInit = sal_False;
}
// -----------------------------------------------------------------------
@@ -279,7 +279,7 @@ void DbgImpMemoryInfo( sal_Char* pBuf );
// =======================================================================
-static BOOL ImplActivateDebugger( const sal_Char* pMsg )
+static sal_Bool ImplActivateDebugger( const sal_Char* pMsg )
{
#if defined( WNT )
static sal_Char aImplDbgOutBuf[DBG_BUF_MAXLEN];
@@ -287,16 +287,16 @@ static BOOL ImplActivateDebugger( const sal_Char* pMsg )
strcat( aImplDbgOutBuf, "\r\n" );
OutputDebugString( aImplDbgOutBuf );
DebugBreak();
- return TRUE;
+ return sal_True;
#else
(void) pMsg; // avoid warning about unused parameter
- return FALSE;
+ return sal_False;
#endif
}
// -----------------------------------------------------------------------
-static BOOL ImplCoreDump()
+static sal_Bool ImplCoreDump()
{
#if defined( WNT )
DebugBreak();
@@ -304,23 +304,23 @@ static BOOL ImplCoreDump()
long* pTemp = 0;
*pTemp = 0xCCCC;
#endif
- return TRUE;
+ return sal_True;
}
// =======================================================================
-static ULONG ImplGetPerfTime()
+static sal_uIntPtr ImplGetPerfTime()
{
#if defined( WNT )
- return (ULONG)GetTickCount();
+ return (sal_uIntPtr)GetTickCount();
#elif defined( OS2 )
- ULONG nClock;
+ sal_uIntPtr nClock;
DosQuerySysInfo( QSV_MS_COUNT, QSV_MS_COUNT, &nClock, sizeof( nClock ) );
- return (ULONG)nClock;
+ return (sal_uIntPtr)nClock;
#else
- static ULONG nImplTicksPerSecond = 0;
+ static sal_uIntPtr nImplTicksPerSecond = 0;
static double dImplTicksPerSecond;
- ULONG nTicks = (ULONG)clock();
+ sal_uIntPtr nTicks = (sal_uIntPtr)clock();
if ( !nImplTicksPerSecond )
{
@@ -331,7 +331,7 @@ static ULONG ImplGetPerfTime()
double fTicks = nTicks;
fTicks *= 1000;
fTicks /= dImplTicksPerSecond;
- return (ULONG)fTicks;
+ return (sal_uIntPtr)fTicks;
#endif
}
@@ -411,12 +411,12 @@ namespace
lcl_writeConfigString( _pFile, _pKeyName, _bValue ? "1" : "0" );
}
- void lcl_writeConfigFlag( FILETYPE _pFile, const sal_Char* _pKeyName, ULONG _nAllFlags, ULONG _nCheckFlag )
+ void lcl_writeConfigFlag( FILETYPE _pFile, const sal_Char* _pKeyName, sal_uIntPtr _nAllFlags, sal_uIntPtr _nCheckFlag )
{
lcl_writeConfigBoolean( _pFile, _pKeyName, ( _nAllFlags & _nCheckFlag ) != 0 );
}
- void lcl_writeConfigOutChannel( FILETYPE _pFile, const sal_Char* _pKeyName, ULONG _nValue )
+ void lcl_writeConfigOutChannel( FILETYPE _pFile, const sal_Char* _pKeyName, sal_uIntPtr _nValue )
{
const sal_Char* names[ DBG_OUT_COUNT ] =
{
@@ -424,7 +424,7 @@ namespace
};
lcl_writeConfigString( _pFile, _pKeyName, names[ _nValue ] );
}
- void lcl_writeHexByte( FILETYPE _pFile, const sal_Char* _pKeyName, BYTE _nValue )
+ void lcl_writeHexByte( FILETYPE _pFile, const sal_Char* _pKeyName, sal_uInt8 _nValue )
{
sal_Char buf[RTL_STR_MAX_VALUEOFINT32];
rtl_String* stringData = NULL;
@@ -464,14 +464,14 @@ namespace
_pValue[ ( _nValueLen > nValueLen ) ? nValueLen : _nValueLen - 1 ] = 0;
return strlen( _pValue );
}
- void lcl_tryReadConfigBoolean( const sal_Char* _pLine, size_t _nLineLen, const sal_Char* _pKeyName, ULONG* _out_pnValue )
+ void lcl_tryReadConfigBoolean( const sal_Char* _pLine, size_t _nLineLen, const sal_Char* _pKeyName, sal_uIntPtr* _out_pnValue )
{
sal_Char aBuf[2];
size_t nValueLen = lcl_tryReadConfigString( _pLine, _nLineLen, _pKeyName, aBuf, sizeof( aBuf ) );
if ( nValueLen )
- *_out_pnValue = strcmp( aBuf, "1" ) == 0 ? TRUE : FALSE;
+ *_out_pnValue = strcmp( aBuf, "1" ) == 0 ? sal_True : sal_False;
}
- void lcl_tryReadOutputChannel( const sal_Char* _pLine, size_t _nLineLen, const sal_Char* _pKeyName, ULONG* _out_pnValue )
+ void lcl_tryReadOutputChannel( const sal_Char* _pLine, size_t _nLineLen, const sal_Char* _pKeyName, sal_uIntPtr* _out_pnValue )
{
const sal_Char* names[ DBG_OUT_COUNT ] =
{
@@ -481,7 +481,7 @@ namespace
size_t nValueLen = lcl_tryReadConfigString( _pLine, _nLineLen, _pKeyName, aBuf, sizeof( aBuf ) );
if ( nValueLen )
{
- for ( ULONG name = 0; name < sizeof( names ) / sizeof( names[0] ); ++name )
+ for ( sal_uIntPtr name = 0; name < sizeof( names ) / sizeof( names[0] ); ++name )
{
if ( strcmp( aBuf, names[ name ] ) == 0 )
{
@@ -491,7 +491,7 @@ namespace
}
}
}
- void lcl_tryReadConfigFlag( const sal_Char* _pLine, size_t _nLineLen, const sal_Char* _pKeyName, ULONG* _out_pnAllFlags, ULONG _nCheckFlag )
+ void lcl_tryReadConfigFlag( const sal_Char* _pLine, size_t _nLineLen, const sal_Char* _pKeyName, sal_uIntPtr* _out_pnAllFlags, sal_uIntPtr _nCheckFlag )
{
sal_Char aBuf[2];
size_t nValueLen = lcl_tryReadConfigString( _pLine, _nLineLen, _pKeyName, aBuf, sizeof( aBuf ) );
@@ -501,12 +501,12 @@ namespace
else
*_out_pnAllFlags &= ~_nCheckFlag;
}
- void lcl_tryReadHexByte( const sal_Char* _pLine, size_t _nLineLen, const sal_Char* _pKeyName, BYTE* _out_pnValue )
+ void lcl_tryReadHexByte( const sal_Char* _pLine, size_t _nLineLen, const sal_Char* _pKeyName, sal_uInt8* _out_pnValue )
{
sal_Char aBuf[3];
size_t nValueLen = lcl_tryReadConfigString( _pLine, _nLineLen, _pKeyName, aBuf, sizeof( aBuf ) );
if ( nValueLen )
- *_out_pnValue = (BYTE)rtl_str_toInt32( aBuf, 16 );
+ *_out_pnValue = (sal_uInt8)rtl_str_toInt32( aBuf, 16 );
}
}
@@ -552,7 +552,7 @@ void PointerList::Add( const void* p )
pLast = pBlock;
}
- USHORT i = 0;
+ sal_uInt16 i = 0;
while ( pBlock->aData[i] )
i++;
@@ -563,18 +563,18 @@ void PointerList::Add( const void* p )
// -----------------------------------------------------------------------
-BOOL PointerList::Remove( const void* p )
+sal_Bool PointerList::Remove( const void* p )
{
if ( !p )
- return FALSE;
+ return sal_False;
PBlock* pBlock = pFirst;
while ( pBlock )
{
- USHORT i = 0;
+ sal_uInt16 i = 0;
while ( i < PBLOCKCOUNT )
{
- if ( ((ULONG)p) == ((ULONG)pBlock->aData[i]) )
+ if ( ((sal_uIntPtr)p) == ((sal_uIntPtr)pBlock->aData[i]) )
{
pBlock->aData[i] = NULL;
pBlock->nCount--;
@@ -593,7 +593,7 @@ BOOL PointerList::Remove( const void* p )
delete pBlock;
}
- return TRUE;
+ return sal_True;
}
i++;
}
@@ -601,21 +601,21 @@ BOOL PointerList::Remove( const void* p )
pBlock = pBlock->pNext;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-const void* PointerList::Get( ULONG nPos ) const
+const void* PointerList::Get( sal_uIntPtr nPos ) const
{
if ( nCount <= nPos )
return NULL;
PBlock* pBlock = pFirst;
- ULONG nStart = 0;
+ sal_uIntPtr nStart = 0;
while ( pBlock )
{
- USHORT i = 0;
+ sal_uInt16 i = 0;
while ( i < PBLOCKCOUNT )
{
if ( pBlock->aData[i] )
@@ -636,26 +636,26 @@ const void* PointerList::Get( ULONG nPos ) const
// -----------------------------------------------------------------------
-BOOL PointerList::IsIn( const void* p ) const
+sal_Bool PointerList::IsIn( const void* p ) const
{
if ( !p )
- return FALSE;
+ return sal_False;
PBlock* pBlock = pFirst;
while ( pBlock )
{
- USHORT i = 0;
+ sal_uInt16 i = 0;
while ( i < PBLOCKCOUNT )
{
- if ( ((ULONG)p) == ((ULONG)pBlock->aData[i]) )
- return TRUE;
+ if ( ((sal_uIntPtr)p) == ((sal_uIntPtr)pBlock->aData[i]) )
+ return sal_True;
i++;
}
pBlock = pBlock->pNext;
}
- return FALSE;
+ return sal_False;
}
@@ -723,7 +723,7 @@ static DebugData* GetDebugData()
{
if ( !aDebugData.bInit )
{
- aDebugData.bInit = TRUE;
+ aDebugData.bInit = sal_True;
// Default Debug-Namen setzen
DbgGetLogFileName( aDebugData.aDbgData.aDebugName );
@@ -737,7 +737,7 @@ static DebugData* GetDebugData()
ConfigSection eCurrentSection = eUnknown;
// no sophisticated algorithm here, assume that the whole file fits into aBuf ...
- ULONG nReallyRead = FileRead( aBuf, 1, sizeof( aBuf ) / sizeof( sal_Char ) - 1, pIniFile );
+ sal_uIntPtr nReallyRead = FileRead( aBuf, 1, sizeof( aBuf ) / sizeof( sal_Char ) - 1, pIniFile );
aBuf[ nReallyRead ] = 0;
const sal_Char* pLine = aBuf;
while ( const sal_Char* pNextLine = strstr( pLine, FILE_LINEEND ) )
@@ -838,7 +838,7 @@ inline DebugData* ImplGetDebugData()
static FILETYPE ImplDbgInitFile()
{
- static BOOL bFileInit = FALSE;
+ static sal_Bool bFileInit = sal_False;
sal_Char aBuf[4096];
getcwd( aBuf, sizeof( aBuf ) );
@@ -849,7 +849,7 @@ static FILETYPE ImplDbgInitFile()
if ( !bFileInit )
{
- bFileInit = TRUE;
+ bFileInit = sal_True;
if ( pData->aDbgData.bOverwrite )
pDebugFile = FileOpen( pData->aDbgData.aDebugName, "w" );
@@ -928,7 +928,7 @@ static int ImplDbgFilter( const sal_Char* pFilter, const sal_Char* pMsg,
if ( pTok[nTok] == ';' )
{
if ( nTok && ImplStrSearch( pTok, nTok, pMsg, nMsgLen ) )
- return TRUE;
+ return sal_True;
pTok += nTok+1;
nTok = 0;
@@ -938,9 +938,9 @@ static int ImplDbgFilter( const sal_Char* pFilter, const sal_Char* pMsg,
}
if ( nTok && ImplStrSearch( pTok, nTok, pMsg, nMsgLen ) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -948,14 +948,14 @@ static int ImplDbgFilter( const sal_Char* pFilter, const sal_Char* pMsg,
extern "C"
void SAL_CALL dbg_printOslDebugMessage( const sal_Char * pszFileName, sal_Int32 nLine, const sal_Char * pszMessage )
{
- DbgOut( pszMessage ? pszMessage : "assertion failed!", DBG_OUT_ERROR, pszFileName, (USHORT)nLine );
+ DbgOut( pszMessage ? pszMessage : "assertion failed!", DBG_OUT_ERROR, pszFileName, (sal_uInt16)nLine );
}
// -----------------------------------------------------------------------
static void DebugInit()
{
- bDbgImplInMain = TRUE;
+ bDbgImplInMain = sal_True;
ImplDbgInitLock();
DebugData* pData = GetDebugData();
@@ -971,14 +971,14 @@ static void DebugInit()
static void DebugDeInit()
{
DebugData* pData = GetDebugData();
- ULONG i;
- ULONG nCount;
- ULONG nOldOut;
+ sal_uIntPtr i;
+ sal_uIntPtr nCount;
+ sal_uIntPtr nOldOut;
if( pData->bOslIsHooked )
{
osl_setDetailedDebugMessageFunc( pData->pOldDebugMessageFunc );
- pData->bOslIsHooked = FALSE;
+ pData->bOslIsHooked = sal_False;
}
// Statistik-Ausgaben immer in File
@@ -1026,7 +1026,7 @@ static void DebugDeInit()
pData->pXtorList = NULL;
}
- // Alles auf FALSE setzen, damit globale Variablen nicht das
+ // Alles auf sal_False setzen, damit globale Variablen nicht das
// System zum Abstuerzen bringt. Dabei muessen aber die
// Memory-Flags erhalten bleiben, da sonst new/delete in globalen
// Variablen abstuerzen, da die Pointeranpassung dann nicht mehr richtig
@@ -1045,9 +1045,9 @@ static void DebugDeInit()
static void DebugGlobalDeInit()
{
DebugData* pData = GetDebugData();
- ULONG i;
- ULONG nCount;
- ULONG nOldOut;
+ sal_uIntPtr i;
+ sal_uIntPtr nCount;
+ sal_uIntPtr nOldOut;
// Statistik-Ausgaben immer in File
nOldOut = pData->aDbgData.nTraceOut;
@@ -1065,7 +1065,7 @@ static void DebugGlobalDeInit()
for( i = 0, nCount = pData->pProfList->Count(); i < nCount; i++ )
{
ProfType* pProfData = (ProfType*)pData->pProfList->Get( i );
- ULONG nAve = pProfData->nTime / pProfData->nCount;
+ sal_uIntPtr nAve = pProfData->nTime / pProfData->nCount;
DbgOutf( "%-25s : %9lu : %6lu : %6lu : %6lu : %9lu :",
pProfData->aName, pProfData->nTime,
pProfData->nMinTime, pProfData->nMaxTime, nAve,
@@ -1115,8 +1115,8 @@ void ImpDbgOutfBuf( sal_Char* pBuf, const sal_Char* pFStr, ... )
static void DebugXTorInfo( sal_Char* pBuf )
{
DebugData* pData = GetDebugData();
- ULONG i;
- ULONG nCount;
+ sal_uIntPtr i;
+ sal_uIntPtr nCount;
// Xtor-Liste ausgeben
if ( pData->pXtorList && pData->pXtorList->Count() &&
@@ -1145,19 +1145,19 @@ static void DebugXTorInfo( sal_Char* pBuf )
}
// -----------------------------------------------------------------------
-BOOL ImplDbgFilterMessage( const sal_Char* pMsg )
+sal_Bool ImplDbgFilterMessage( const sal_Char* pMsg )
{
DebugData* pData = GetDebugData();
- if ( !ImplDbgFilter( pData->aDbgData.aInclFilter, pMsg, TRUE ) )
- return TRUE;
- if ( ImplDbgFilter( pData->aDbgData.aExclFilter, pMsg, FALSE ) )
- return TRUE;
- return FALSE;
+ if ( !ImplDbgFilter( pData->aDbgData.aInclFilter, pMsg, sal_True ) )
+ return sal_True;
+ if ( ImplDbgFilter( pData->aDbgData.aExclFilter, pMsg, sal_False ) )
+ return sal_True;
+ return sal_False;
}
// -----------------------------------------------------------------------
-void* DbgFunc( USHORT nAction, void* pParam )
+void* DbgFunc( sal_uInt16 nAction, void* pParam )
{
DebugData* pDebugData = ImplGetDebugData();
@@ -1283,7 +1283,7 @@ void* DbgFunc( USHORT nAction, void* pParam )
break;
case DBG_FUNC_ALLERROROUT:
- return (void*)(ULONG)TRUE;
+ return (void*)(sal_uIntPtr)sal_True;
case DBG_FUNC_SETTESTSOLARMUTEX:
pDebugData->pDbgTestSolarMutex = (DbgTestSolarMutexProc)(long)pParam;
@@ -1304,12 +1304,12 @@ void* DbgFunc( USHORT nAction, void* pParam )
if( pDebugData->bOslIsHooked && ! pData->bHookOSLAssert )
{
osl_setDetailedDebugMessageFunc( pDebugData->pOldDebugMessageFunc );
- pDebugData->bOslIsHooked = FALSE;
+ pDebugData->bOslIsHooked = sal_False;
}
else if( ! pDebugData->bOslIsHooked && pData->bHookOSLAssert )
{
pDebugData->pOldDebugMessageFunc = osl_setDetailedDebugMessageFunc( &dbg_printOslDebugMessage );
- pDebugData->bOslIsHooked = TRUE;
+ pDebugData->bOslIsHooked = sal_True;
}
}
break;
@@ -1330,7 +1330,7 @@ DbgChannelId DbgRegisterUserChannel( DbgPrintLine pProc )
// -----------------------------------------------------------------------
-void DbgProf( USHORT nAction, DbgDataType* pDbgData )
+void DbgProf( sal_uInt16 nAction, DbgDataType* pDbgData )
{
// Ueberhaupt Profiling-Test an
DebugData* pData = ImplGetDebugData();
@@ -1340,7 +1340,7 @@ void DbgProf( USHORT nAction, DbgDataType* pDbgData )
sal_Char aBuf[DBG_BUF_MAXLEN];
ProfType* pProfData = (ProfType*)pDbgData->pData;
- ULONG nTime;
+ sal_uIntPtr nTime;
if ( (nAction != DBG_PROF_START) && !pProfData )
{
strcpy( aBuf, DbgError_ProfEnd1 );
@@ -1423,7 +1423,7 @@ void DbgProf( USHORT nAction, DbgDataType* pDbgData )
// -----------------------------------------------------------------------
-void DbgXtor( DbgDataType* pDbgData, USHORT nAction, const void* pThis,
+void DbgXtor( DbgDataType* pDbgData, sal_uInt16 nAction, const void* pThis,
DbgUsr fDbgUsr )
{
DebugData* pData = ImplGetDebugData();
@@ -1449,19 +1449,19 @@ void DbgXtor( DbgDataType* pDbgData, USHORT nAction, const void* pThis,
pXtorData->nDtorCalls = 0;
pXtorData->nMaxCount = 0;
pXtorData->nStatics = 0;
- pXtorData->bTest = TRUE;
+ pXtorData->bTest = sal_True;
pData->pXtorList->Add( (void*)pXtorData );
- if ( !ImplDbgFilter( pData->aDbgData.aInclClassFilter, pXtorData->aName, TRUE ) )
- pXtorData->bTest = FALSE;
- if ( ImplDbgFilter( pData->aDbgData.aExclClassFilter, pXtorData->aName, FALSE ) )
- pXtorData->bTest = FALSE;
+ if ( !ImplDbgFilter( pData->aDbgData.aInclClassFilter, pXtorData->aName, sal_True ) )
+ pXtorData->bTest = sal_False;
+ if ( ImplDbgFilter( pData->aDbgData.aExclClassFilter, pXtorData->aName, sal_False ) )
+ pXtorData->bTest = sal_False;
}
if ( !pXtorData->bTest )
return;
sal_Char aBuf[DBG_BUF_MAXLEN];
- USHORT nAct = nAction & ~DBG_XTOR_DTOROBJ;
+ sal_uInt16 nAct = nAction & ~DBG_XTOR_DTOROBJ;
// Trace (Enter)
if ( (pData->aDbgData.nTestFlags & DBG_TEST_XTOR_TRACE) &&
@@ -1608,16 +1608,16 @@ void DbgXtor( DbgDataType* pDbgData, USHORT nAction, const void* pThis,
// -----------------------------------------------------------------------
-void DbgOut( const sal_Char* pMsg, USHORT nDbgOut, const sal_Char* pFile, USHORT nLine )
+void DbgOut( const sal_Char* pMsg, sal_uInt16 nDbgOut, const sal_Char* pFile, sal_uInt16 nLine )
{
- static BOOL bIn = FALSE;
+ static sal_Bool bIn = sal_False;
if ( bIn )
return;
- bIn = TRUE;
+ bIn = sal_True;
DebugData* pData = GetDebugData();
sal_Char const * pStr;
- ULONG nOut;
+ sal_uIntPtr nOut;
int nBufLen = 0;
if ( nDbgOut == DBG_OUT_ERROR )
@@ -1640,13 +1640,13 @@ void DbgOut( const sal_Char* pMsg, USHORT nDbgOut, const sal_Char* pFile, USHORT
if ( nOut == DBG_OUT_NULL )
{
- bIn = FALSE;
+ bIn = sal_False;
return;
}
if ( ImplDbgFilterMessage( pMsg ) )
{
- bIn = FALSE;
+ bIn = sal_False;
return;
}
@@ -1684,7 +1684,7 @@ void DbgOut( const sal_Char* pMsg, USHORT nDbgOut, const sal_Char* pFile, USHORT
// Line in String umwandeln und dranhaengen
sal_Char aLine[9];
sal_Char* pLine = &aLine[7];
- USHORT i;
+ sal_uInt16 i;
memset( aLine, 0, sizeof( aLine ) );
do
{
@@ -1754,7 +1754,7 @@ void DbgOut( const sal_Char* pMsg, USHORT nDbgOut, const sal_Char* pFile, USHORT
ImplDbgUnlock();
- bIn = FALSE;
+ bIn = sal_False;
}
void DbgPrintShell(char const * message) {
@@ -1766,7 +1766,7 @@ void DbgPrintShell(char const * message) {
// -----------------------------------------------------------------------
-void DbgOutTypef( USHORT nDbgOut, const sal_Char* pFStr, ... )
+void DbgOutTypef( sal_uInt16 nDbgOut, const sal_Char* pFStr, ... )
{
va_list pList;
@@ -1796,13 +1796,13 @@ void DbgOutf( const sal_Char* pFStr, ... )
#else
-void* DbgFunc( USHORT, void* ) { return NULL; }
+void* DbgFunc( sal_uInt16, void* ) { return NULL; }
-void DbgProf( USHORT, DbgDataType* ) {}
-void DbgXtor( DbgDataType*, USHORT, const void*, DbgUsr ) {}
+void DbgProf( sal_uInt16, DbgDataType* ) {}
+void DbgXtor( DbgDataType*, sal_uInt16, const void*, DbgUsr ) {}
-void DbgOut( const sal_Char*, USHORT, const sal_Char*, USHORT ) {}
-void DbgOutTypef( USHORT, const sal_Char*, ... ) {}
+void DbgOut( const sal_Char*, sal_uInt16, const sal_Char*, sal_uInt16 ) {}
+void DbgOutTypef( sal_uInt16, const sal_Char*, ... ) {}
void DbgOutf( const sal_Char*, ... ) {}
#endif
diff --git a/tools/source/debug/stcktree.cxx b/tools/source/debug/stcktree.cxx
index dccc4c198852..34cda7e81119 100644
--- a/tools/source/debug/stcktree.cxx
+++ b/tools/source/debug/stcktree.cxx
@@ -42,32 +42,32 @@ struct ImpDbgStackTree
ImpDbgStackTree* pRight_;
ImpDbgStackTree* pCaller_;
ImpDbgStackTree* pSub_;
- ULONG nIP_;
- ULONG nBytesLeak_;
- ULONG nBytesPeak_;
- ULONG nBytes_;
- ULONG nCountLeak_;
- ULONG nCountPeak_;
- ULONG nCount_;
- ULONG nMax_;
- ULONG nMin_;
-
- ImpDbgStackTree( ImpDbgStackTree* pSub, ULONG nIP );
+ sal_uIntPtr nIP_;
+ sal_uIntPtr nBytesLeak_;
+ sal_uIntPtr nBytesPeak_;
+ sal_uIntPtr nBytes_;
+ sal_uIntPtr nCountLeak_;
+ sal_uIntPtr nCountPeak_;
+ sal_uIntPtr nCount_;
+ sal_uIntPtr nMax_;
+ sal_uIntPtr nMin_;
+
+ ImpDbgStackTree( ImpDbgStackTree* pSub, sal_uIntPtr nIP );
~ImpDbgStackTree();
- ImpDbgStackTree* Add( ULONG nAlloc, ULONG* pBP, ULONG nIP );
- void Print( int nLevel, ULONG nCount, ULONG nCountLeak );
+ ImpDbgStackTree* Add( sal_uIntPtr nAlloc, sal_uIntPtr* pBP, sal_uIntPtr nIP );
+ void Print( int nLevel, sal_uIntPtr nCount, sal_uIntPtr nCountLeak );
void Print( int nLevel );
};
static ImpDbgStackTree* pImpDbgStackTreeRoot = NULL;
-static ULONG* pImpDbgStackTreeBP = NULL;
-static ULONG nImpDbgStackTreeMain = 0;
+static sal_uIntPtr* pImpDbgStackTreeBP = NULL;
+static sal_uIntPtr nImpDbgStackTreeMain = 0;
static int nImpDbgStackTreeSem = 0;
// -----------------------------------------------------------------------
-ImpDbgStackTree::ImpDbgStackTree( ImpDbgStackTree* pSub, ULONG nIP )
+ImpDbgStackTree::ImpDbgStackTree( ImpDbgStackTree* pSub, sal_uIntPtr nIP )
{
pSub_ = pSub;
nIP_ = nIP;
@@ -90,7 +90,7 @@ ImpDbgStackTree::~ImpDbgStackTree()
// -----------------------------------------------------------------------
-void ImpDbgStackTree::Print( int nLevel, ULONG nCount, ULONG nCountLeak )
+void ImpDbgStackTree::Print( int nLevel, sal_uIntPtr nCount, sal_uIntPtr nCountLeak )
{
if ( pLeft_ )
pLeft_->Print( nLevel, nCount, nCountLeak );
@@ -99,7 +99,7 @@ void ImpDbgStackTree::Print( int nLevel, ULONG nCount, ULONG nCountLeak )
{
if ( nMax_ == nMin_ )
{
- ULONG nTemp = nCountLeak_ * nMin_;
+ sal_uIntPtr nTemp = nCountLeak_ * nMin_;
DbgOutf( "%*c%08lx Count=%lu/%lu/%lu Bytes=%lu/%lu/%lu Size=%lu",
nLevel, ' ', nIP_,
nCount_, nCountPeak_, nCountLeak_,
@@ -137,7 +137,7 @@ void ImpDbgStackTree::Print( int nLevel )
// -----------------------------------------------------------------------
-ImpDbgStackTree* ImpDbgStackTree::Add( ULONG nAlloc, ULONG *pBP, ULONG nIP )
+ImpDbgStackTree* ImpDbgStackTree::Add( sal_uIntPtr nAlloc, sal_uIntPtr *pBP, sal_uIntPtr nIP )
{
if ( nIP < nIP_ )
{
@@ -167,9 +167,9 @@ ImpDbgStackTree* ImpDbgStackTree::Add( ULONG nAlloc, ULONG *pBP, ULONG nIP )
else if ( nMin_ > nAlloc )
nMin_ = nAlloc;
- if ( !(pBP[0] & 3) && (ULONG)pBP < pBP[0] && pBP[0] < (ULONG)pImpDbgStackTreeBP )
+ if ( !(pBP[0] & 3) && (sal_uIntPtr)pBP < pBP[0] && pBP[0] < (sal_uIntPtr)pImpDbgStackTreeBP )
{
- pBP = (ULONG*)pBP[0];
+ pBP = (sal_uIntPtr*)pBP[0];
nIP = pBP[1];
if ( 0x01100000 <= nIP && nIP < 0x20000000 && nIP != nImpDbgStackTreeMain )
{
@@ -190,10 +190,10 @@ void DbgStartStackTree()
{
if ( !nImpDbgStackTreeMain )
{
- ULONG* pBP;
+ sal_uIntPtr* pBP;
__asm mov pBP, ebp;
- pImpDbgStackTreeBP = (ULONG*)pBP[0];
+ pImpDbgStackTreeBP = (sal_uIntPtr*)pBP[0];
nImpDbgStackTreeMain = pImpDbgStackTreeBP[1];
}
}
@@ -209,7 +209,7 @@ void DbgEndStackTree()
{
// Ausgaben ins File umleiten
DbgData* pData = DbgGetData();
- ULONG nOldOut = pData->nTraceOut;
+ sal_uIntPtr nOldOut = pData->nTraceOut;
pData->nTraceOut = DBG_OUT_FILE;
DbgOutf( "Leak-Report" );
@@ -238,7 +238,7 @@ void DbgEndStackTree()
// -----------------------------------------------------------------------
-void* DbgGetStackTree( ULONG nAlloc )
+void* DbgGetStackTree( sal_uIntPtr nAlloc )
{
ImpDbgStackTree* pReturn = NULL;
@@ -246,10 +246,10 @@ void* DbgGetStackTree( ULONG nAlloc )
{
nImpDbgStackTreeSem++;
- ULONG* pBP;
+ sal_uIntPtr* pBP;
__asm mov pBP, ebp;
- ULONG nIP = pBP[1];
+ sal_uIntPtr nIP = pBP[1];
if ( !pImpDbgStackTreeRoot )
pImpDbgStackTreeRoot = new ImpDbgStackTree( NULL, nIP );
pReturn = pImpDbgStackTreeRoot->Add( nAlloc, pBP, nIP );
@@ -261,7 +261,7 @@ void* DbgGetStackTree( ULONG nAlloc )
// -----------------------------------------------------------------------
-void DbgFreeStackTree( void* pVoid, ULONG nAlloc )
+void DbgFreeStackTree( void* pVoid, sal_uIntPtr nAlloc )
{
ImpDbgStackTree* p = (ImpDbgStackTree*)pVoid;
@@ -297,7 +297,7 @@ void DbgPrintStackTree( void* pVoid )
{
// Ausgaben ins File umleiten
DbgData* pData = DbgGetData();
- ULONG nOldOut = pData->nTraceOut;
+ sal_uIntPtr nOldOut = pData->nTraceOut;
pData->nTraceOut = DBG_OUT_FILE;
DbgOutf( "Mem-StackTree:" );
@@ -313,8 +313,8 @@ void DbgPrintStackTree( void* pVoid )
void DbgStartStackTree() {}
void DbgEndStackTree() {}
-void* DbgGetStackTree( ULONG ) { return NULL; }
-void DbgFreeStackTree( void*, ULONG ) {}
+void* DbgGetStackTree( sal_uIntPtr ) { return NULL; }
+void DbgFreeStackTree( void*, sal_uIntPtr ) {}
void DbgPrintStackTree( void* ) {}
#endif
diff --git a/tools/source/fsys/comdep.hxx b/tools/source/fsys/comdep.hxx
index 043c5815f764..cd6f8db2cd57 100644..100755
--- a/tools/source/fsys/comdep.hxx
+++ b/tools/source/fsys/comdep.hxx
@@ -74,16 +74,16 @@ struct DirReader_Impl
DirEntry* pParent;
String aPath;
ByteString aBypass;
- BOOL bReady;
- BOOL bInUse;
+ sal_Bool bReady;
+ sal_Bool bInUse;
DirReader_Impl( Dir &rDir )
: pDir( &rDir ),
pDosEntry( 0 ),
pParent( 0 ),
aPath( GUI2FSYS(rDir.GetFull()) ),
- bReady ( FALSE ),
- bInUse( FALSE )
+ bReady ( sal_False ),
+ bInUse( sal_False )
{
#ifndef BOOTSTRAP
// Redirection
@@ -111,8 +111,8 @@ struct DirReader_Impl
{ if( pDosDir ) closedir( pDosDir ); }
// die folgenden sind systemabh"angig implementiert
- USHORT Init(); // initialisiert, liest ggf. devices
- USHORT Read(); // liest 1 Eintrag, F2ugt ein falls ok
+ sal_uInt16 Init(); // initialisiert, liest ggf. devices
+ sal_uInt16 Read(); // liest 1 Eintrag, F2ugt ein falls ok
};
//--------------------------------------------------------------------
@@ -145,9 +145,9 @@ struct FileCopier_Impl
//--------------------------------------------------------------------
#if defined WNT || defined OS2
-BOOL IsRedirectable_Impl( const ByteString &rPath );
+sal_Bool IsRedirectable_Impl( const ByteString &rPath );
#else
-#define IsRedirectable_Impl( rPath ) TRUE
+#define IsRedirectable_Impl( rPath ) sal_True
#endif
//--------------------------------------------------------------------
diff --git a/tools/source/fsys/dirent.cxx b/tools/source/fsys/dirent.cxx
index 74a2142db692..0c9e45cb72f2 100644..100755
--- a/tools/source/fsys/dirent.cxx
+++ b/tools/source/fsys/dirent.cxx
@@ -130,11 +130,11 @@ int Sys2SolarError_Impl( int nSysErr )
#ifndef BOOTSTRAP
FSysRedirector* FSysRedirector::_pRedirector = 0;
-BOOL FSysRedirector::_bEnabled = TRUE;
+sal_Bool FSysRedirector::_bEnabled = sal_True;
#ifdef UNX
-BOOL bInRedirection = TRUE;
+sal_Bool bInRedirection = sal_True;
#else
-BOOL bInRedirection = FALSE;
+sal_Bool bInRedirection = sal_False;
#endif
static vos:: OMutex * pRedirectMutex = 0;
@@ -172,7 +172,7 @@ void FSysRedirector::DoRedirect( String &rPath )
return;
// dont redirect on nested calls
- bInRedirection = TRUE;
+ bInRedirection = sal_True;
// convert to URL
#ifndef UNX
@@ -186,7 +186,7 @@ void FSysRedirector::DoRedirect( String &rPath )
// do redirection
Redirector();
- bInRedirection = FALSE;
+ bInRedirection = sal_False;
return;
}
@@ -289,12 +289,12 @@ const char* ImpCheckDirEntry( const void* p )
|*
*************************************************************************/
-ByteString ImplCutPath( const ByteString& rStr, USHORT nMax, char cAccDel )
+ByteString ImplCutPath( const ByteString& rStr, sal_uInt16 nMax, char cAccDel )
{
- USHORT nMaxPathLen = nMax;
+ sal_uInt16 nMaxPathLen = nMax;
ByteString aCutPath( rStr );
- BOOL bInsertPrefix = FALSE;
- USHORT nBegin = aCutPath.Search( cAccDel );
+ sal_Bool bInsertPrefix = sal_False;
+ sal_uInt16 nBegin = aCutPath.Search( cAccDel );
if( nBegin == STRING_NOTFOUND )
nBegin = 0;
@@ -303,14 +303,14 @@ ByteString ImplCutPath( const ByteString& rStr, USHORT nMax, char cAccDel )
while( aCutPath.Len() > nMaxPathLen )
{
- USHORT nEnd = aCutPath.Search( cAccDel, nBegin + 1 );
- USHORT nCount;
+ sal_uInt16 nEnd = aCutPath.Search( cAccDel, nBegin + 1 );
+ sal_uInt16 nCount;
if ( nEnd != STRING_NOTFOUND )
{
nCount = nEnd - nBegin;
aCutPath.Erase( nBegin, nCount );
- bInsertPrefix = TRUE;
+ bInsertPrefix = sal_True;
}
else
break;
@@ -318,7 +318,7 @@ ByteString ImplCutPath( const ByteString& rStr, USHORT nMax, char cAccDel )
if ( aCutPath.Len() > nMaxPathLen )
{
- for ( USHORT n = nMaxPathLen; n > nMaxPathLen/2; --n )
+ for ( sal_uInt16 n = nMaxPathLen; n > nMaxPathLen/2; --n )
if ( !ByteString(aCutPath.GetChar(n)).IsAlphaNumericAscii() )
{
aCutPath.Erase( n );
@@ -362,7 +362,7 @@ FSysError DirEntry::ImpParseOs2Name( const ByteString& rPfad, FSysPathStyle eSty
// der Rest immer ohne die fuehrenden '\\'.
// ein ":" trennt ebenfalls, gehoert aber zum Namen
// den ersten '\\', '/' oder ':' suchen
- USHORT nPos;
+ sal_uInt16 nPos;
for ( nPos = 0;
nPos < aPfad.Len() && //?O
aPfad.GetChar(nPos) != '\\' && aPfad.GetChar(nPos) != '/' && //?O
@@ -499,7 +499,7 @@ FSysError DirEntry::ImpParseOs2Name( const ByteString& rPfad, FSysPathStyle eSty
}
while ( aPfad.Len() );
- ULONG nErr = ERRCODE_NONE;
+ sal_uIntPtr nErr = ERRCODE_NONE;
// Haupt-Entry (selbst) zuweisen
if ( aStack.Count() == 0 )
{
@@ -639,7 +639,7 @@ void DirEntry::ImpTrim( FSysPathStyle eStyle )
{
case FSYS_STYLE_FAT:
{
- USHORT nPunktPos = aName.Search( '.' );
+ sal_uInt16 nPunktPos = aName.Search( '.' );
if ( nPunktPos == STRING_NOTFOUND )
{
if ( aName.Len() > 8 )
@@ -1010,7 +1010,7 @@ DirEntry* DirEntry::ImpGetPreTopPtr()
|*
*************************************************************************/
-DirEntry* DirEntry::ImpChangeParent( DirEntry* pNewParent, BOOL bNormalize )
+DirEntry* DirEntry::ImpChangeParent( DirEntry* pNewParent, sal_Bool bNormalize )
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -1037,14 +1037,14 @@ DirEntry* DirEntry::ImpChangeParent( DirEntry* pNewParent, BOOL bNormalize )
|*
*************************************************************************/
-BOOL DirEntry::Exists( FSysAccess nAccess ) const
+sal_Bool DirEntry::Exists( FSysAccess nAccess ) const
{
#ifndef BOOTSTRAP
static vos::OMutex aLocalMutex;
vos::OGuard aGuard( aLocalMutex );
#endif
if ( !IsValid() )
- return FALSE;
+ return sal_False;
#if defined WNT || defined OS2
// spezielle Filenamen sind vom System da
@@ -1060,14 +1060,14 @@ BOOL DirEntry::Exists( FSysAccess nAccess ) const
aName.CompareIgnoreCaseToAscii("LPT3") == COMPARE_EQUAL ||
aName.CompareIgnoreCaseToAscii("NUL") == COMPARE_EQUAL ||
aName.CompareIgnoreCaseToAscii("PRN") == COMPARE_EQUAL ) )
- return TRUE;
+ return sal_True;
#endif
FSysFailOnErrorImpl();
DirEntryKind eKind = FileStat( *this, nAccess ).GetKind();
if ( eKind & ( FSYS_KIND_FILE | FSYS_KIND_DIR ) )
{
- return TRUE;
+ return sal_True;
}
#if defined WNT || defined OS2
@@ -1090,7 +1090,7 @@ BOOL DirEntry::Exists( FSysAccess nAccess ) const
|*
*************************************************************************/
-BOOL DirEntry::First()
+sal_Bool DirEntry::First()
{
FSysFailOnErrorImpl();
@@ -1120,12 +1120,12 @@ BOOL DirEntry::First()
{
aName = aFound;
closedir( pDir );
- return TRUE;
+ return sal_True;
}
}
closedir( pDir );
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -1138,8 +1138,8 @@ BOOL DirEntry::First()
|*
*************************************************************************/
-String DirEntry::GetFull( FSysPathStyle eStyle, BOOL bWithDelimiter,
- USHORT nMaxChars ) const
+String DirEntry::GetFull( FSysPathStyle eStyle, sal_Bool bWithDelimiter,
+ sal_uInt16 nMaxChars ) const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -1463,18 +1463,18 @@ StringCompare DirEntry::NameCompare( const DirEntry &rWith ) const
|*
*************************************************************************/
-BOOL DirEntry::operator==( const DirEntry& rEntry ) const
+sal_Bool DirEntry::operator==( const DirEntry& rEntry ) const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
// test wheather the contents are textual the same
if ( nError && ( nError == rEntry.nError ) )
- return TRUE;
+ return sal_True;
if ( nError || rEntry.nError ||
( eFlag == FSYS_FLAG_INVALID ) ||
( rEntry.eFlag == FSYS_FLAG_INVALID ) )
- return FALSE;
+ return sal_False;
#ifndef OS2
const
@@ -1547,10 +1547,10 @@ DirEntry DirEntry::operator+( const DirEntry& rEntry ) const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
#ifdef DBG_UTIL
- static BOOL bTested = FALSE;
+ static sal_Bool bTested = sal_False;
if ( !bTested )
{
- bTested = TRUE;
+ bTested = sal_True;
FSysTest();
}
#endif
@@ -1572,7 +1572,7 @@ DirEntry DirEntry::operator+( const DirEntry& rEntry ) const
(eFlag == FSYS_FLAG_RELROOT && !aName.Len()) ||
(
(pEntryTop->aName.Len() ||
- ((rEntry.Level()>1)?(rEntry[rEntry.Level()-2].aName.CompareIgnoreCaseToAscii(RFS_IDENTIFIER)==COMPARE_EQUAL):FALSE))
+ ((rEntry.Level()>1)?(rEntry[rEntry.Level()-2].aName.CompareIgnoreCaseToAscii(RFS_IDENTIFIER)==COMPARE_EQUAL):sal_False))
&&
(pEntryTop->eFlag == FSYS_FLAG_ABSROOT ||
pEntryTop->eFlag == FSYS_FLAG_RELROOT ||
@@ -1767,23 +1767,23 @@ void DirEntry::SetName( const String& rName, FSysPathStyle eFormatter )
|* Letzte Aenderung MA 02.12.91
|*
*************************************************************************/
-BOOL DirEntry::Find( const String& rPfad, char cDelim )
+sal_Bool DirEntry::Find( const String& rPfad, char cDelim )
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
if ( ImpGetTopPtr()->eFlag == FSYS_FLAG_ABSROOT )
- return TRUE;
+ return sal_True;
- BOOL bWild = aName.Search( '*' ) != STRING_NOTFOUND ||
+ sal_Bool bWild = aName.Search( '*' ) != STRING_NOTFOUND ||
aName.Search( '?' ) != STRING_NOTFOUND;
if ( !cDelim )
cDelim = SEARCHDELIM(DEFSTYLE)[0];
- USHORT nTokenCount = rPfad.GetTokenCount( cDelim );
- USHORT nIndex = 0;
+ sal_uInt16 nTokenCount = rPfad.GetTokenCount( cDelim );
+ sal_uInt16 nIndex = 0;
ByteString aThis = ACCESSDELIM(DEFSTYLE);
aThis += ByteString(GetFull(), osl_getThreadTextEncoding());
- for ( USHORT nToken = 0; nToken < nTokenCount; ++nToken )
+ for ( sal_uInt16 nToken = 0; nToken < nTokenCount; ++nToken )
{
ByteString aPath = ByteString(rPfad, osl_getThreadTextEncoding()).GetToken( 0, cDelim, nIndex );
@@ -1797,11 +1797,11 @@ BOOL DirEntry::Find( const String& rPfad, char cDelim )
( ( !bWild && aEntry.Exists() ) || ( bWild && aEntry.First() ) ) )
{
(*this) = aEntry;
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -1814,7 +1814,7 @@ BOOL DirEntry::Find( const String& rPfad, char cDelim )
|*
*************************************************************************/
-BOOL DirEntry::ImpToRel( String aCurStr )
+sal_Bool DirEntry::ImpToRel( String aCurStr )
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -1831,7 +1831,7 @@ BOOL DirEntry::ImpToRel( String aCurStr )
}
// "Ubereinstimmung pr"ufen
- USHORT nPos = aThisCompareStr.Match( aCurCompareStr );
+ sal_uInt16 nPos = aThisCompareStr.Match( aCurCompareStr );
if ( nPos == STRING_MATCH && aThisStr.Len() != aCurStr.Len() )
nPos = Min( aThisStr.Len(), aCurStr.Len() );
@@ -1840,7 +1840,7 @@ BOOL DirEntry::ImpToRel( String aCurStr )
{
// dann ist der relative Pfad das aktuelle Verzeichnis
*this = DirEntry();
- return TRUE;
+ return sal_True;
}
// Sonderfall, die DirEntries sind total verschieden
@@ -1848,7 +1848,7 @@ BOOL DirEntry::ImpToRel( String aCurStr )
{
// dann ist der relativste Pfad absolut
*this = aThis;
- return FALSE;
+ return sal_False;
}
// sonst nehmen wir die identischen Einzelteile vorne weg
@@ -1864,7 +1864,7 @@ BOOL DirEntry::ImpToRel( String aCurStr )
// das ist dann unser relativer Pfad
*this = DirEntry( aThisStr, FSYS_STYLE_HPFS );
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -1877,7 +1877,7 @@ BOOL DirEntry::ImpToRel( String aCurStr )
|*
*************************************************************************/
-USHORT DirEntry::CutRelParents()
+sal_uInt16 DirEntry::CutRelParents()
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -1891,7 +1891,7 @@ USHORT DirEntry::CutRelParents()
pDir = pPar;
// '..' zaehlen
- USHORT nParCount = 0;
+ sal_uInt16 nParCount = 0;
while ( pPar && pPar->eFlag == FSYS_FLAG_PARENT )
{
++nParCount;
@@ -1917,7 +1917,7 @@ USHORT DirEntry::CutRelParents()
|*
*************************************************************************/
-BOOL DirEntry::ToRel()
+sal_Bool DirEntry::ToRel()
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -1936,7 +1936,7 @@ BOOL DirEntry::ToRel()
|*
*************************************************************************/
-BOOL DirEntry::ToRel( const DirEntry& rStart )
+sal_Bool DirEntry::ToRel( const DirEntry& rStart )
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -2030,7 +2030,7 @@ String DirEntry::GetSearchDelimiter( FSysPathStyle eFormatter )
|*
*************************************************************************/
-USHORT DirEntry::GetMaxNameLen( FSysPathStyle eFormatter )
+sal_uInt16 DirEntry::GetMaxNameLen( FSysPathStyle eFormatter )
{
eFormatter = GetStyle( eFormatter );
switch ( eFormatter )
@@ -2075,7 +2075,7 @@ const DirEntry& DirEntry::SetTempNameBase( const String &rBase )
{
// Create the directory and only on success give all rights to
// everyone. Use mkdir instead of DirEntry::MakeDir because
- // this returns TRUE even if directory already exists.
+ // this returns sal_True even if directory already exists.
if ( !mkdir( aName.GetBuffer(), S_IRWXU | S_IRWXG | S_IRWXO ) )
chmod( aName.GetBuffer(), S_IRWXU | S_IRWXG | S_IRWXO );
@@ -2259,7 +2259,7 @@ DirEntry DirEntry::TempName( DirEntryKind eKind ) const
|*
*************************************************************************/
-const DirEntry &DirEntry::operator[]( USHORT nParentLevel ) const
+const DirEntry &DirEntry::operator[]( sal_uInt16 nParentLevel ) const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -2295,7 +2295,7 @@ FSysError DirEntry::ImpParseUnixName( const ByteString& rPfad, FSysPathStyle eSt
// falls '/' am Anfang, ist der Name '/',
// der Rest immer ohne die fuehrenden '/'.
// den ersten '/' suchen
- USHORT nPos;
+ sal_uInt16 nPos;
for ( nPos = 0;
nPos < aPfad.Len() && aPfad.GetChar(nPos) != '/';
nPos++ )
@@ -2321,8 +2321,8 @@ FSysError DirEntry::ImpParseUnixName( const ByteString& rPfad, FSysPathStyle eSt
else if ( aName == "~" )
{
DirEntry aHome( String( (const char *) getenv( "HOME" ), osl_getThreadTextEncoding()) );
- for ( USHORT n = aHome.Level(); n; --n )
- aStack.Push( new DirEntry( aHome[ (USHORT) n-1 ] ) );
+ for ( sal_uInt16 n = aHome.Level(); n; --n )
+ aStack.Push( new DirEntry( aHome[ (sal_uInt16) n-1 ] ) );
}
#endif
@@ -2427,11 +2427,11 @@ ErrCode CreateEntry_Impl( const DirEntry &rPath, DirEntryKind eKind )
return eErr;
}
-BOOL IsValidEntry_Impl( const DirEntry &rPath,
+sal_Bool IsValidEntry_Impl( const DirEntry &rPath,
const String &rLongName,
DirEntryKind eKind,
- BOOL bIsShortened,
- BOOL bUseDelim )
+ sal_Bool bIsShortened,
+ sal_Bool bUseDelim )
{
// Parameter-Pr"uefung
DBG_ASSERT( eKind == FSYS_KIND_NONE || eKind == FSYS_KIND_ALL ||
@@ -2445,16 +2445,16 @@ BOOL IsValidEntry_Impl( const DirEntry &rPath,
DirEntry aPath(rPath);
DirEntry aName(rLongName, eStyle);
if ( !aName.IsValid() || aName.Level() != 1 )
- return FALSE;
+ return sal_False;
aPath += aName;
if ( 1 == aPath.Level() )
- return FALSE;
+ return sal_False;
if ( eStyle == FSYS_STYLE_FAT || eStyle == FSYS_STYLE_NWFS ||
eStyle == FSYS_STYLE_UNKNOWN )
{
DirEntry aDosEntry( rLongName, FSYS_STYLE_FAT );
if ( !aDosEntry.IsValid() )
- return FALSE;
+ return sal_False;
}
// Pfad-Trenner sind nicht erlaubt (bei ungek"urzten auch nicht FSYS_SHORTNAME_DELIMITER)
@@ -2464,12 +2464,12 @@ BOOL IsValidEntry_Impl( const DirEntry &rPath,
(!bIsShortened && rLongName.Search(cDelim) != STRING_NOTFOUND)
)
{
- return FALSE;
+ return sal_False;
}
// MI: Abfrage nach 'CON:' etc. wird jetzt in Exists() mitgemacht
if ( aPath.Exists() )
- return FALSE;
+ return sal_False;
return (ERRCODE_NONE == CreateEntry_Impl( aPath, eKind ));
}
@@ -2488,8 +2488,8 @@ BOOL IsValidEntry_Impl( const DirEntry &rPath,
#define MAX_LEN_MAX 255
#define INVALID_CHARS_DEF "\\/\"':|^<>?*"
-BOOL DirEntry::MakeShortName( const String& rLongName, DirEntryKind eKind,
- BOOL bUseDelim, FSysPathStyle eStyle )
+sal_Bool DirEntry::MakeShortName( const String& rLongName, DirEntryKind eKind,
+ sal_Bool bUseDelim, FSysPathStyle eStyle )
{
String aLongName(rLongName);
@@ -2507,7 +2507,7 @@ BOOL DirEntry::MakeShortName( const String& rLongName, DirEntryKind eKind,
#if 0
if ( FSYS_STYLE_NWFS == GetPathStyle( ImpGetTopPtr()->GetName() ) )
{
- for ( USHORT n = aLongName.Len(); n; --n )
+ for ( sal_uInt16 n = aLongName.Len(); n; --n )
{
short nChar = aLongName(n-1);
if ( nChar < 32 || nChar >= 127 )
@@ -2525,14 +2525,14 @@ BOOL DirEntry::MakeShortName( const String& rLongName, DirEntryKind eKind,
}
// ist der Langname direkt verwendbar?
- if ( IsValidEntry_Impl( *this, aLongName, eKind, FALSE, bUseDelim ) )
+ if ( IsValidEntry_Impl( *this, aLongName, eKind, sal_False, bUseDelim ) )
{
operator+=( DirEntry(aLongName) );
- return TRUE;
+ return sal_True;
}
// max L"angen feststellen
- USHORT nMaxExt, nMaxLen;
+ sal_uInt16 nMaxExt, nMaxLen;
if ( FSYS_STYLE_DETECT == eStyle )
eStyle = DirEntry::GetPathStyle( GetDevice().GetName() );
ByteString aInvalidChars;
@@ -2604,11 +2604,11 @@ BOOL DirEntry::MakeShortName( const String& rLongName, DirEntryKind eKind,
operator+=( DirEntry(String(aNewName, osl_getThreadTextEncoding())) );
if ( FSYS_KIND_ALL == eKind && CMP_LOWER(aName) == aOldName )
if ( FSYS_KIND_ALL == eKind && CMP_LOWER(ByteString(GetName(), osl_getThreadTextEncoding())) == aOldName )
- return TRUE;
+ return sal_True;
// kann der gek"urzte Name direkt verwendet werden?
if ( !Exists() && (ERRCODE_NONE == CreateEntry_Impl( *this, eKind )) )
- return TRUE;
+ return sal_True;
// darf '?##' verwendet werden, um eindeutigen Name zu erzeugen?
if ( bUseDelim )
@@ -2639,7 +2639,7 @@ BOOL DirEntry::MakeShortName( const String& rLongName, DirEntryKind eKind,
// keine ## mehr frei / ?## soll nicht verwendet werden
nError = ERRCODE_IO_ALREADYEXISTS;
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -2652,34 +2652,34 @@ BOOL DirEntry::MakeShortName( const String& rLongName, DirEntryKind eKind,
|*
*************************************************************************/
-BOOL DirEntry::MakeDir( BOOL bSloppy ) const
+sal_Bool DirEntry::MakeDir( sal_Bool bSloppy ) const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
// Schnellpruefung, ob vorhanden
if ( FileStat( *this ).IsKind( FSYS_KIND_DIR ) )
- return TRUE;
+ return sal_True;
if ( bSloppy && pParent )
if ( FileStat( *pParent ).IsKind( FSYS_KIND_DIR ) )
- return TRUE;
+ return sal_True;
const DirEntry *pNewDir = bSloppy ? pParent : this;
if ( pNewDir )
{
// den Path zum Dir erzeugen
- if ( pNewDir->pParent && !pNewDir->pParent->MakeDir(FALSE) )
- return FALSE;
+ if ( pNewDir->pParent && !pNewDir->pParent->MakeDir(sal_False) )
+ return sal_False;
// das Dir selbst erzeugen
if ( pNewDir->eFlag == FSYS_FLAG_ABSROOT ||
pNewDir->eFlag == FSYS_FLAG_ABSROOT ||
pNewDir->eFlag == FSYS_FLAG_VOLUME )
- return TRUE;
+ return sal_True;
else
{
//? nError = ???
if ( FileStat( *pNewDir ).IsKind( FSYS_KIND_DIR ) )
- return TRUE;
+ return sal_True;
else
{
FSysFailOnErrorImpl();
@@ -2693,7 +2693,7 @@ BOOL DirEntry::MakeDir( BOOL bSloppy ) const
#ifdef WIN32
SetLastError(0);
#endif
- BOOL bResult = (0 == _mkdir( (char*) bDirName.GetBuffer() ));
+ sal_Bool bResult = (0 == _mkdir( (char*) bDirName.GetBuffer() ));
if ( !bResult )
{
// Wer hat diese Methode const gemacht ?
@@ -2708,7 +2708,7 @@ BOOL DirEntry::MakeDir( BOOL bSloppy ) const
}
}
}
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -2820,7 +2820,7 @@ FSysError DirEntry::MoveTo( const DirEntry& rNewName ) const
// ja, also intra-device-move mit MoveFile
MoveFile( bFrom.GetBuffer(), bTo.GetBuffer() );
// MoveFile ist buggy bei cross-device operationen.
- // Der R?ckgabewert ist auch dann TRUE, wenn nur ein Teil der Operation geklappt hat.
+ // Der R?ckgabewert ist auch dann sal_True, wenn nur ein Teil der Operation geklappt hat.
// Zudem zeigt MoveFile unterschiedliches Verhalten bei unterschiedlichen NT-Versionen.
return Sys2SolarError_Impl( GetLastError() );
}
@@ -2942,10 +2942,10 @@ FSysError DirEntry::Kill( FSysAction nActions ) const
pName[bTmpName.Len()+1] = (char) 0;
//read-only files sollen auch geloescht werden koennen
- BOOL isReadOnly = FileStat::GetReadOnlyFlag(*this);
+ sal_Bool isReadOnly = FileStat::GetReadOnlyFlag(*this);
if (isReadOnly)
{
- FileStat::SetReadOnlyFlag(*this, FALSE);
+ FileStat::SetReadOnlyFlag(*this, sal_False);
}
// directory?
@@ -2955,7 +2955,7 @@ FSysError DirEntry::Kill( FSysAction nActions ) const
if ( FSYS_ACTION_RECURSIVE == (nActions & FSYS_ACTION_RECURSIVE) )
{
Dir aDir( *this, FSYS_KIND_DIR|FSYS_KIND_FILE );
- for ( USHORT n = 0; eError == FSYS_ERR_OK && n < aDir.Count(); ++n )
+ for ( sal_uInt16 n = 0; eError == FSYS_ERR_OK && n < aDir.Count(); ++n )
{
const DirEntry &rSubDir = aDir[n];
DirEntryFlag flag = rSubDir.GetFlag();
@@ -3058,20 +3058,20 @@ FSysError DirEntry::Kill( FSysAction nActions ) const
|*
*************************************************************************/
-BOOL DirEntry::Contains( const DirEntry &rSubEntry ) const
+sal_Bool DirEntry::Contains( const DirEntry &rSubEntry ) const
{
DBG_ASSERT( IsAbs() && rSubEntry.IsAbs(), "must be absolute entries" );
- USHORT nThisLevel = Level();
- USHORT nSubLevel = rSubEntry.Level();
+ sal_uInt16 nThisLevel = Level();
+ sal_uInt16 nSubLevel = rSubEntry.Level();
if ( nThisLevel < nSubLevel )
{
for ( ; nThisLevel; --nThisLevel, --nSubLevel )
if ( (*this)[nThisLevel-1] != rSubEntry[nSubLevel-1] )
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -3084,11 +3084,11 @@ BOOL DirEntry::Contains( const DirEntry &rSubEntry ) const
|*
*************************************************************************/
-USHORT DirEntry::Level() const
+sal_uInt16 DirEntry::Level() const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
- USHORT nLevel = 0;
+ sal_uInt16 nLevel = 0;
const DirEntry *pRes = this;
while ( pRes )
{
@@ -3139,7 +3139,7 @@ String DirEntry::ConvertSystemToName( const String &rName )
|*
*************************************************************************/
-BOOL DirEntry::IsValid() const
+sal_Bool DirEntry::IsValid() const
{
return (nError == FSYS_ERR_OK);
}
@@ -3154,9 +3154,9 @@ BOOL DirEntry::IsValid() const
|*
*************************************************************************/
-BOOL DirEntry::IsRFSAvailable()
+sal_Bool DirEntry::IsRFSAvailable()
{
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -3171,18 +3171,18 @@ BOOL DirEntry::IsRFSAvailable()
|*
*************************************************************************/
-BOOL DirEntry::IsLongNameOnFAT() const
+sal_Bool DirEntry::IsLongNameOnFAT() const
{
// FAT-System?
DirEntry aTempDirEntry(*this);
aTempDirEntry.ToAbs();
if (DirEntry::GetPathStyle(aTempDirEntry.GetDevice().GetName().GetChar(0)) != FSYS_STYLE_FAT)
{
- return FALSE; // nein, also false
+ return sal_False; // nein, also false
}
// DirEntry-Kette auf lange Dateinamen pr?fen
- for( USHORT iLevel = this->Level(); iLevel > 0; iLevel-- )
+ for( sal_uInt16 iLevel = this->Level(); iLevel > 0; iLevel-- )
{
const DirEntry& rEntry = (const DirEntry&) (*this)[iLevel-1];
String aBase( rEntry.GetBase() );
@@ -3190,15 +3190,15 @@ BOOL DirEntry::IsLongNameOnFAT() const
if (aBase.Len()>8) // Name > 8?
{
- return TRUE;
+ return sal_True;
}
if (aExtension.Len()>3) // Extension > 3?
{
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
//========================================================================
diff --git a/tools/source/fsys/filecopy.cxx b/tools/source/fsys/filecopy.cxx
index 62d361aa4af4..e087b6c4a4c3 100644..100755
--- a/tools/source/fsys/filecopy.cxx
+++ b/tools/source/fsys/filecopy.cxx
@@ -158,14 +158,14 @@ FileCopier& FileCopier::operator = ( const FileCopier &rCopier )
|*
*************************************************************************/
-BOOL FileCopier::Progress()
+sal_Bool FileCopier::Progress()
{
if ( !aProgressLink )
- return TRUE;
+ return sal_True;
else
{
if ( aProgressLink.Call( this ) )
- return TRUE;
+ return sal_True;
return ( 0 == Error( ERRCODE_ABORT, 0, 0 ) );
}
}
@@ -243,7 +243,7 @@ FSysError FileCopier::DoCopy_Impl(
// HPFS->FAT?
FSysPathStyle eSourceStyle = DirEntry::GetPathStyle( rSource.ImpGetTopPtr()->GetName() );
FSysPathStyle eTargetStyle = DirEntry::GetPathStyle( rTarget.ImpGetTopPtr()->GetName() );
- BOOL bMakeShortNames = ( eSourceStyle == FSYS_STYLE_HPFS && eTargetStyle == FSYS_STYLE_FAT );
+ sal_Bool bMakeShortNames = ( eSourceStyle == FSYS_STYLE_HPFS && eTargetStyle == FSYS_STYLE_FAT );
// Zieldateiname ggf. kuerzen
DirEntry aTgt;
@@ -315,7 +315,7 @@ FSysError FileCopier::DoCopy_Impl(
// recursive copy
eRet = Error( aTgt.MakeDir() ? FSYS_ERR_OK : FSYS_ERR_UNKNOWN, 0, &aTgt );
Dir aSourceDir( rSource, FSYS_KIND_DIR|FSYS_KIND_FILE );
- for ( USHORT n = 0; ERRCODE_TOERROR(eRet) == FSYS_ERR_OK && n < aSourceDir.Count(); ++n )
+ for ( sal_uInt16 n = 0; ERRCODE_TOERROR(eRet) == FSYS_ERR_OK && n < aSourceDir.Count(); ++n )
{
const DirEntry &rSubSource = aSourceDir[n];
DirEntryFlag eFlag = rSubSource.GetFlag();
diff --git a/tools/source/fsys/fstat.cxx b/tools/source/fsys/fstat.cxx
index a55c56b6efbb..6a32585b2c1e 100644..100755
--- a/tools/source/fsys/fstat.cxx
+++ b/tools/source/fsys/fstat.cxx
@@ -50,12 +50,12 @@
FileStat::FileStat()
: // don't use Default-Ctors!
- aDateCreated( ULONG(0) ),
- aTimeCreated( ULONG(0) ),
- aDateModified( ULONG(0) ),
- aTimeModified( ULONG(0) ),
- aDateAccessed( ULONG(0) ),
- aTimeAccessed( ULONG(0) )
+ aDateCreated( sal_uIntPtr(0) ),
+ aTimeCreated( sal_uIntPtr(0) ),
+ aDateModified( sal_uIntPtr(0) ),
+ aTimeModified( sal_uIntPtr(0) ),
+ aDateAccessed( sal_uIntPtr(0) ),
+ aTimeAccessed( sal_uIntPtr(0) )
{
nSize = 0;
nKindFlags = FSYS_KIND_UNKNOWN;
@@ -74,15 +74,15 @@ FileStat::FileStat()
FileStat::FileStat( const DirEntry& rDirEntry, FSysAccess nAccess )
: // don't use Default-Ctors!
- aDateCreated( ULONG(0) ),
- aTimeCreated( ULONG(0) ),
- aDateModified( ULONG(0) ),
- aTimeModified( ULONG(0) ),
- aDateAccessed( ULONG(0) ),
- aTimeAccessed( ULONG(0) )
+ aDateCreated( sal_uIntPtr(0) ),
+ aTimeCreated( sal_uIntPtr(0) ),
+ aDateModified( sal_uIntPtr(0) ),
+ aTimeModified( sal_uIntPtr(0) ),
+ aDateAccessed( sal_uIntPtr(0) ),
+ aTimeAccessed( sal_uIntPtr(0) )
{
- BOOL bCached = FSYS_ACCESS_CACHED == (nAccess & FSYS_ACCESS_CACHED);
- BOOL bFloppy = FSYS_ACCESS_FLOPPY == (nAccess & FSYS_ACCESS_FLOPPY);
+ sal_Bool bCached = FSYS_ACCESS_CACHED == (nAccess & FSYS_ACCESS_CACHED);
+ sal_Bool bFloppy = FSYS_ACCESS_FLOPPY == (nAccess & FSYS_ACCESS_FLOPPY);
#ifdef FEAT_FSYS_DOUBLESPEED
const FileStat *pStatFromDir = bCached ? rDirEntry.ImpGetStat() : 0;
@@ -115,18 +115,18 @@ FileStat::FileStat( const DirEntry& rDirEntry, FSysAccess nAccess )
|*
*************************************************************************/
-// TRUE wenn die Instanz j"unger als rIsOlder ist.
-// FALSE wenn die Instanz "alter oder gleich alt wie rIsOlder ist.
+// sal_True wenn die Instanz j"unger als rIsOlder ist.
+// sal_False wenn die Instanz "alter oder gleich alt wie rIsOlder ist.
-BOOL FileStat::IsYounger( const FileStat& rIsOlder ) const
+sal_Bool FileStat::IsYounger( const FileStat& rIsOlder ) const
{
if ( aDateModified > rIsOlder.aDateModified )
- return TRUE;
+ return sal_True;
if ( ( aDateModified == rIsOlder.aDateModified ) &&
( aTimeModified > rIsOlder.aTimeModified ) )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -138,9 +138,9 @@ BOOL FileStat::IsYounger( const FileStat& rIsOlder ) const
|*
*************************************************************************/
-BOOL FileStat::IsKind( DirEntryKind nKind ) const
+sal_Bool FileStat::IsKind( DirEntryKind nKind ) const
{
- BOOL bRet = ( ( nKind == FSYS_KIND_UNKNOWN ) &&
+ sal_Bool bRet = ( ( nKind == FSYS_KIND_UNKNOWN ) &&
( nKindFlags == FSYS_KIND_UNKNOWN ) ) ||
( ( nKindFlags & nKind ) == nKind );
return bRet;
@@ -155,12 +155,12 @@ BOOL FileStat::IsKind( DirEntryKind nKind ) const
|*
*************************************************************************/
-BOOL FileStat::HasReadOnlyFlag()
+sal_Bool FileStat::HasReadOnlyFlag()
{
#if defined WNT || defined UNX || defined OS2
- return TRUE;
+ return sal_True;
#else
- return FALSE;
+ return sal_False;
#endif
}
@@ -173,7 +173,7 @@ BOOL FileStat::HasReadOnlyFlag()
|*
*************************************************************************/
-BOOL FileStat::GetReadOnlyFlag( const DirEntry &rEntry )
+sal_Bool FileStat::GetReadOnlyFlag( const DirEntry &rEntry )
{
ByteString aFPath(rEntry.GetFull(), osl_getThreadTextEncoding());
@@ -189,17 +189,17 @@ BOOL FileStat::GetReadOnlyFlag( const DirEntry &rEntry )
case NO_ERROR:
return FILE_READONLY == ( aFileStat.attrFile & FILE_READONLY );
default:
- return FALSE;
+ return sal_False;
}
#elif defined UNX
/* could we stat the object? */
struct stat aBuf;
if (stat(aFPath.GetBuffer(), &aBuf))
- return FALSE;
+ return sal_False;
/* jupp, is writable for user? */
return((aBuf.st_mode & S_IWUSR) != S_IWUSR);
#else
- return FALSE;
+ return sal_False;
#endif
}
@@ -212,7 +212,7 @@ BOOL FileStat::GetReadOnlyFlag( const DirEntry &rEntry )
|*
*************************************************************************/
-ULONG FileStat::SetReadOnlyFlag( const DirEntry &rEntry, BOOL bRO )
+sal_uIntPtr FileStat::SetReadOnlyFlag( const DirEntry &rEntry, sal_Bool bRO )
{
ByteString aFPath(rEntry.GetFull(), osl_getThreadTextEncoding());
diff --git a/tools/source/fsys/tdir.cxx b/tools/source/fsys/tdir.cxx
index b6bf48a8cdf9..c0ebe64114b8 100644..100755
--- a/tools/source/fsys/tdir.cxx
+++ b/tools/source/fsys/tdir.cxx
@@ -48,7 +48,7 @@ DECLARE_LIST( DirEntryList, DirEntry* )
DECLARE_LIST( FSysSortList, FSysSort* )
DECLARE_LIST( FileStatList, FileStat* )
-#define APPEND (USHORT) 65535
+#define APPEND (sal_uInt16) 65535
/*************************************************************************
|*
@@ -60,9 +60,9 @@ DECLARE_LIST( FileStatList, FileStat* )
|*
*************************************************************************/
-BOOL Dir::ImpInsertPointReached( const DirEntry& rNewEntry,
+sal_Bool Dir::ImpInsertPointReached( const DirEntry& rNewEntry,
const FileStat& rNewStat,
- ULONG nCurPos, ULONG nSortIndex ) const
+ sal_uIntPtr nCurPos, sal_uIntPtr nSortIndex ) const
{
#define VALUE( nKindFlags ) \
( ( FSYS_KIND_FILE | FSYS_KIND_DIR | FSYS_KIND_DEV | \
@@ -70,7 +70,7 @@ BOOL Dir::ImpInsertPointReached( const DirEntry& rNewEntry,
// einfache Dinge erfordern einfache Loesungen
if ( !pLst->Count() )
- return TRUE;
+ return sal_True;
FSysSort nSort = *( pSortLst->GetObject( nSortIndex ) );
FileStat *pOldStat = NULL;
@@ -83,121 +83,121 @@ BOOL Dir::ImpInsertPointReached( const DirEntry& rNewEntry,
case FSYS_SORT_NAME:
case (FSYS_SORT_NAME | FSYS_SORT_ASCENDING):
if ( pCurLstObj->aName > rNewEntry.aName )
- return TRUE;
+ return sal_True;
if ( !(pCurLstObj->aName == rNewEntry.aName) )
- return FALSE;
+ return sal_False;
break;
case (FSYS_SORT_NAME | FSYS_SORT_DESCENDING):
if ( pCurLstObj->aName < rNewEntry.aName )
- return TRUE;
+ return sal_True;
if ( !(pCurLstObj->aName == rNewEntry.aName) )
- return FALSE;
+ return sal_False;
break;
case FSYS_SORT_EXT:
case (FSYS_SORT_EXT | FSYS_SORT_ASCENDING):
{
if ( pCurLstObj->GetExtension() > rNewEntry.GetExtension() )
- return TRUE;
+ return sal_True;
if ( !(pCurLstObj->GetExtension() == rNewEntry.GetExtension()) )
- return FALSE;
+ return sal_False;
break;
}
case (FSYS_SORT_EXT | FSYS_SORT_DESCENDING):
{
if ( pCurLstObj->GetExtension() < rNewEntry.GetExtension() )
- return TRUE;
+ return sal_True;
if ( !(pCurLstObj->GetExtension() == rNewEntry.GetExtension()) )
- return FALSE;
+ return sal_False;
break;
}
case FSYS_SORT_KIND:
case (FSYS_SORT_KIND | FSYS_SORT_ASCENDING ):
if ( VALUE(pOldStat->nKindFlags) > VALUE(rNewStat.nKindFlags) )
- return TRUE;
+ return sal_True;
if ( !(VALUE(pOldStat->nKindFlags) == VALUE(rNewStat.nKindFlags)) )
- return FALSE;
+ return sal_False;
break;
case (FSYS_SORT_KIND | FSYS_SORT_DESCENDING):
if ( VALUE(pOldStat->nKindFlags) < VALUE(rNewStat.nKindFlags) )
- return TRUE;
+ return sal_True;
if ( !(VALUE(pOldStat->nKindFlags) == VALUE(rNewStat.nKindFlags)) )
- return FALSE;
+ return sal_False;
break;
case FSYS_SORT_SIZE:
case (FSYS_SORT_SIZE | FSYS_SORT_ASCENDING):
if ( pOldStat->nSize > rNewStat.nSize )
- return TRUE;
+ return sal_True;
if ( !(pOldStat->nSize == rNewStat.nSize) )
- return FALSE;
+ return sal_False;
break;
case (FSYS_SORT_SIZE | FSYS_SORT_DESCENDING):
if ( pOldStat->nSize < rNewStat.nSize )
- return TRUE;
+ return sal_True;
if ( !(pOldStat->nSize == rNewStat.nSize) )
- return FALSE;
+ return sal_False;
break;
case FSYS_SORT_MODIFYED:
case (FSYS_SORT_MODIFYED | FSYS_SORT_ASCENDING):
if ( (pOldStat->aDateModified >= rNewStat.aDateModified) &&
(pOldStat->aTimeModified > rNewStat.aTimeModified) )
- return TRUE;
+ return sal_True;
if ( !((pOldStat->aDateModified == rNewStat.aDateModified) &&
(pOldStat->aTimeModified == rNewStat.aTimeModified)) )
- return FALSE;
+ return sal_False;
break;
case (FSYS_SORT_MODIFYED | FSYS_SORT_DESCENDING):
if ( (pOldStat->aDateModified <= rNewStat.aDateModified) &&
(pOldStat->aTimeModified < rNewStat.aTimeModified) )
- return TRUE;
+ return sal_True;
if ( !((pOldStat->aDateModified == rNewStat.aDateModified) &&
(pOldStat->aTimeModified == rNewStat.aTimeModified)) )
- return FALSE;
+ return sal_False;
break;
case FSYS_SORT_CREATED:
case (FSYS_SORT_CREATED | FSYS_SORT_ASCENDING):
if ( (pOldStat->aDateCreated >= rNewStat.aDateCreated) &&
(pOldStat->aTimeCreated > rNewStat.aTimeCreated) )
- return TRUE;
+ return sal_True;
if ( !((pOldStat->aDateCreated == rNewStat.aDateCreated) &&
(pOldStat->aTimeCreated == rNewStat.aTimeCreated)) )
- return FALSE;
+ return sal_False;
break;
case (FSYS_SORT_CREATED | FSYS_SORT_DESCENDING):
if ( (pOldStat->aDateCreated <= rNewStat.aDateCreated) &&
(pOldStat->aTimeCreated < rNewStat.aTimeCreated) )
- return TRUE;
+ return sal_True;
if ( !((pOldStat->aDateCreated == rNewStat.aDateCreated) &&
(pOldStat->aTimeCreated == rNewStat.aTimeCreated)) )
- return FALSE;
+ return sal_False;
break;
case FSYS_SORT_ACCESSED:
case (FSYS_SORT_ACCESSED | FSYS_SORT_ASCENDING):
if ( (pOldStat->aDateAccessed >= rNewStat.aDateAccessed) &&
(pOldStat->aTimeAccessed > rNewStat.aTimeAccessed) )
- return TRUE;
+ return sal_True;
if ( !((pOldStat->aDateAccessed == rNewStat.aDateAccessed) &&
(pOldStat->aTimeAccessed == rNewStat.aTimeAccessed)) )
- return FALSE;
+ return sal_False;
break;
case (FSYS_SORT_ACCESSED | FSYS_SORT_DESCENDING):
if ( (pOldStat->aDateAccessed <= rNewStat.aDateAccessed) &&
(pOldStat->aTimeAccessed < rNewStat.aTimeAccessed) )
- return TRUE;
+ return sal_True;
if ( !((pOldStat->aDateAccessed == rNewStat.aDateAccessed) &&
(pOldStat->aTimeAccessed == rNewStat.aTimeAccessed)) )
- return FALSE;
+ return sal_False;
break;
default: /* Kann nicht sein */;
}
if ( nSortIndex == ( pSortLst->Count() - 1 ) )
- return TRUE;
+ return sal_True;
else
//Rekursion
return ImpInsertPointReached( rNewEntry, rNewStat,
@@ -226,7 +226,7 @@ void Dir::ImpSortedInsert( const DirEntry *pNewEntry, const FileStat *pNewStat )
pLst->First();
do {
if ( ImpInsertPointReached( *pNewEntry, *pNewStat, pLst->GetCurPos(),
- (ULONG)0 ) )
+ (sal_uIntPtr)0 ) )
{
if ( pStatLst )
pStatLst->Insert( (FileStat*)pNewStat, pLst->GetCurPos() );
@@ -285,7 +285,7 @@ void Dir::Construct( DirEntryKind nKindFlags )
|*
*************************************************************************/
-BOOL Dir::Update()
+sal_Bool Dir::Update()
{
Reset();
return Scan( USHRT_MAX ) > 0;
@@ -377,10 +377,10 @@ void Dir::Reset()
|*
*************************************************************************/
-USHORT Dir::Scan( USHORT nCount )
+sal_uInt16 Dir::Scan( sal_uInt16 nCount )
{
- USHORT nRead = 0; // Anzahl in dieser Runde gelesener Eintr"age
+ sal_uInt16 nRead = 0; // Anzahl in dieser Runde gelesener Eintr"age
FSysFailOnErrorImpl();
// noch nicht fertig gewesen
@@ -390,7 +390,7 @@ USHORT Dir::Scan( USHORT nCount )
if ( !pLst->Count() )
{
// dann ggf. Laufwerke scannen
- pReader->bInUse = TRUE;
+ pReader->bInUse = sal_True;
nRead = pReader->Init();
}
@@ -548,7 +548,7 @@ Dir::~Dir()
FSysError Dir::ImpSetSort( std::va_list pArgs, int nFirstSort )
{
- BOOL bLast;
+ sal_Bool bLast;
FSysSort *pSort;
FSysSortList *pNewSortLst = new FSysSortList;
@@ -559,8 +559,8 @@ FSysError Dir::ImpSetSort( std::va_list pArgs, int nFirstSort )
bLast = FSYS_SORT_END == (*pSort & FSYS_SORT_END);
*pSort &= ~FSYS_SORT_END;
- FSysSort nSort = *pSort & ~(USHORT)FSYS_SORT_ASCENDING
- & ~(USHORT)FSYS_SORT_DESCENDING;
+ FSysSort nSort = *pSort & ~(sal_uInt16)FSYS_SORT_ASCENDING
+ & ~(sal_uInt16)FSYS_SORT_DESCENDING;
// g"utliges Sortierkriterium?
if ( ( nSort == FSYS_SORT_NAME ) ||
@@ -692,7 +692,7 @@ FSysError Dir::SetSort( FSysSort nSort, ... )
|*
*************************************************************************/
-DirEntry& Dir::operator[] ( USHORT nIndex ) const
+DirEntry& Dir::operator[] ( sal_uInt16 nIndex ) const
{
DBG_ASSERT( nIndex < Count(), "Dir::operator[] : nIndex > Count()" );
@@ -722,18 +722,18 @@ Dir& Dir::operator+=( const Dir& rDir )
pLst = new DirEntryList();
//Verlangen die Sortierkriterien FileStat's?
- BOOL bStat = FALSE;
+ sal_Bool bStat = sal_False;
if ( pSortLst ) {
pSortLst->First();
do {
if ( *(pSortLst->GetCurObject()) &
( FSYS_SORT_CREATED | FSYS_SORT_MODIFYED | FSYS_SORT_SIZE |
FSYS_SORT_ACCESSED | FSYS_SORT_KIND ) )
- bStat = TRUE;
+ bStat = sal_True;
} while ( !bStat && pSortLst->Next() );
}
FileStat * stat = NULL;
- for ( USHORT nNr = 0; nNr < rDir.Count(); nNr++ )
+ for ( sal_uInt16 nNr = 0; nNr < rDir.Count(); nNr++ )
{
if ( bStat )
{
@@ -758,11 +758,11 @@ Dir& Dir::operator+=( const Dir& rDir )
*************************************************************************/
-USHORT Dir::Count( BOOL bUpdated ) const
+sal_uInt16 Dir::Count( sal_Bool bUpdated ) const
{
// ggf. erst den Rest lesen
if ( bUpdated && pReader )
((Dir*)this)->Scan( USHRT_MAX );
- return pLst == NULL ? 0 : (USHORT) pLst->Count();
+ return pLst == NULL ? 0 : (sal_uInt16) pLst->Count();
}
diff --git a/tools/source/fsys/unx.cxx b/tools/source/fsys/unx.cxx
index 13da80f6ccca..94e2ce5950a4 100644
--- a/tools/source/fsys/unx.cxx
+++ b/tools/source/fsys/unx.cxx
@@ -95,18 +95,18 @@ struct mymnttab
#if defined(NETBSD) || defined(FREEBSD) || defined(MACOSX)
-BOOL GetMountEntry(dev_t /* dev */, struct mymnttab * /* mytab */ )
+sal_Bool GetMountEntry(dev_t /* dev */, struct mymnttab * /* mytab */ )
{
DBG_WARNING( "Sorry, not implemented: GetMountEntry" );
- return FALSE;
+ return sal_False;
}
#elif defined AIX
-BOOL GetMountEntry(dev_t dev, struct mymnttab *mytab)
+sal_Bool GetMountEntry(dev_t dev, struct mymnttab *mytab)
{
int bufsize;
if (mntctl (MCTL_QUERY, sizeof bufsize, (char*) &bufsize))
- return FALSE;
+ return sal_False;
char* buffer = (char *)malloc( bufsize * sizeof(char) );
if (mntctl (MCTL_QUERY, bufsize, buffer) != -1)
@@ -127,40 +127,40 @@ BOOL GetMountEntry(dev_t dev, struct mymnttab *mytab)
+= vmt2dataptr((struct vmount*)vmt, VMT_OBJECT);
mytab->mountdevice = dev;
free( buffer );
- return TRUE;
+ return sal_True;
}
}
free( buffer );
- return FALSE;
+ return sal_False;
}
#else
-static BOOL GetMountEntry(dev_t dev, struct mymnttab *mytab)
+static sal_Bool GetMountEntry(dev_t dev, struct mymnttab *mytab)
{
#if defined SOLARIS || defined SINIX
FILE *fp = fopen (MNTTAB, "r");
if (! fp)
- return FALSE;
+ return sal_False;
struct mnttab mnt[1];
while (getmntent (fp, mnt) != -1)
#elif defined SCO
FILE *fp = fopen (MNTTAB, "r");
if (! fp)
- return FALSE;
+ return sal_False;
struct mnttab mnt[1];
while (fread (&mnt, sizeof mnt, 1, fp) > 0)
#elif defined DECUNIX || defined AIX
FILE *fp = NULL;
if (! fp)
- return FALSE;
+ return sal_False;
struct mnttab mnt[1];
while ( 0 )
#else
FILE *fp = setmntent (MOUNTED, "r");
if (! fp)
- return FALSE;
+ return sal_False;
struct mnttab *mnt;
while ((mnt = getmntent (fp)) != NULL)
#endif
@@ -196,7 +196,7 @@ static BOOL GetMountEntry(dev_t dev, struct mymnttab *mytab)
#else
mytab->mymnttab_filesystem = "ext2"; //default ist case sensitiv unter unix
#endif
- return TRUE;
+ return sal_True;
}
# ifdef LINUX
/* #61624# dito */
@@ -204,7 +204,7 @@ static BOOL GetMountEntry(dev_t dev, struct mymnttab *mytab)
# else
fclose (fp);
# endif
- return FALSE;
+ return sal_False;
}
#endif
@@ -219,13 +219,13 @@ static BOOL GetMountEntry(dev_t dev, struct mymnttab *mytab)
|*
*************************************************************************/
-BOOL DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const
+sal_Bool DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const
{
if (eFormatter==FSYS_STYLE_HOST)
{
#ifdef NETBSD
- return TRUE;
+ return sal_True;
#else
struct stat buf;
DirEntry aPath(*this);
@@ -235,7 +235,7 @@ BOOL DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const
{
if (aPath.Level() == 1)
{
- return TRUE; // ich bin unter UNIX, also ist der default im Zweifelsfall case sensitiv
+ return sal_True; // ich bin unter UNIX, also ist der default im Zweifelsfall case sensitiv
}
aPath = aPath [1];
}
@@ -249,17 +249,17 @@ BOOL DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const
(fsmnt.mymnttab_filesystem.CompareTo("smb") ==COMPARE_EQUAL) ||
(fsmnt.mymnttab_filesystem.CompareTo("ncpfs")==COMPARE_EQUAL))
{
- return FALSE;
+ return sal_False;
}
else
{
- return TRUE;
+ return sal_True;
}
#endif
}
else
{
- BOOL isCaseSensitive = TRUE; // ich bin unter UNIX, also ist der default im Zweifelsfall case sensitiv
+ sal_Bool isCaseSensitive = sal_True; // ich bin unter UNIX, also ist der default im Zweifelsfall case sensitiv
switch ( eFormatter )
{
case FSYS_STYLE_MAC:
@@ -269,19 +269,19 @@ BOOL DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const
case FSYS_STYLE_NWFS:
case FSYS_STYLE_HPFS:
{
- isCaseSensitive = FALSE;
+ isCaseSensitive = sal_False;
break;
}
case FSYS_STYLE_SYSV:
case FSYS_STYLE_BSD:
case FSYS_STYLE_DETECT:
{
- isCaseSensitive = TRUE;
+ isCaseSensitive = sal_True;
break;
}
default:
{
- isCaseSensitive = TRUE; // ich bin unter UNIX, also ist der default im Zweifelsfall case sensitiv
+ isCaseSensitive = sal_True; // ich bin unter UNIX, also ist der default im Zweifelsfall case sensitiv
break;
}
}
@@ -299,16 +299,16 @@ BOOL DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const
|*
*************************************************************************/
-BOOL DirEntry::ToAbs()
+sal_Bool DirEntry::ToAbs()
{
if ( FSYS_FLAG_VOLUME == eFlag )
{
eFlag = FSYS_FLAG_ABSROOT;
- return TRUE;
+ return sal_True;
}
if ( IsAbs() )
- return TRUE;
+ return sal_True;
char sBuf[MAXPATHLEN + 1];
*this = DirEntry( String( getcwd( sBuf, MAXPATHLEN ), osl_getThreadTextEncoding() ) ) + *this;
@@ -379,7 +379,7 @@ DirEntry DirEntry::GetDevice() const
|*
*************************************************************************/
-BOOL DirEntry::SetCWD( BOOL bSloppy ) const
+sal_Bool DirEntry::SetCWD( sal_Bool bSloppy ) const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -387,31 +387,31 @@ BOOL DirEntry::SetCWD( BOOL bSloppy ) const
ByteString aPath( GetFull(), osl_getThreadTextEncoding());
if ( !chdir( aPath.GetBuffer() ) )
{
- return TRUE;
+ return sal_True;
}
else
{
if ( bSloppy && !chdir(aPath.GetBuffer()) )
{
- return TRUE;
+ return sal_True;
}
else
{
- return FALSE;
+ return sal_False;
}
}
}
//-------------------------------------------------------------------------
-USHORT DirReader_Impl::Init()
+sal_uInt16 DirReader_Impl::Init()
{
return 0;
}
//-------------------------------------------------------------------------
-USHORT DirReader_Impl::Read()
+sal_uInt16 DirReader_Impl::Read()
{
if (!pDosDir)
{
@@ -420,7 +420,7 @@ USHORT DirReader_Impl::Read()
if (!pDosDir)
{
- bReady = TRUE;
+ bReady = sal_True;
return 0;
}
@@ -437,7 +437,7 @@ USHORT DirReader_Impl::Read()
: FSYS_FLAG_NORMAL;
DirEntry *pTemp = new DirEntry( ByteString(pDosEntry->d_name), eFlag, FSYS_STYLE_UNX );
if ( pParent )
- pTemp->ImpChangeParent( new DirEntry( *pParent ), FALSE);
+ pTemp->ImpChangeParent( new DirEntry( *pParent ), sal_False);
FileStat aStat( *pTemp );
if ( ( ( ( pDir->eAttrMask & FSYS_KIND_DIR ) &&
( aStat.IsKind( FSYS_KIND_DIR ) ) ) ||
@@ -457,7 +457,7 @@ USHORT DirReader_Impl::Read()
}
}
else
- bReady = TRUE;
+ bReady = sal_True;
return 0;
}
@@ -490,7 +490,7 @@ FileStat::FileStat( const void *, const void * ):
|* Letzte Aenderung MA 07.11.91
|*
*************************************************************************/
-BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL )
+sal_Bool FileStat::Update( const DirEntry& rDirEntry, sal_Bool )
{
nSize = 0;
@@ -507,7 +507,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL )
if ( !rDirEntry.IsValid() )
{
nError = FSYS_ERR_NOTEXISTS;
- return FALSE;
+ return sal_False;
}
// Sonderbehandlung falls es sich um eine Root handelt
@@ -515,7 +515,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL )
{
nKindFlags = FSYS_KIND_DIR;
nError = FSYS_ERR_OK;
- return TRUE;
+ return sal_True;
}
struct stat aStat;
@@ -536,11 +536,11 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL )
{
nKindFlags = FSYS_KIND_WILD;
nError = FSYS_ERR_OK;
- return TRUE;
+ return sal_True;
}
nError = FSYS_ERR_NOTEXISTS;
- return FALSE;
+ return sal_False;
}
nError = FSYS_ERR_OK;
@@ -562,7 +562,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL )
Unx2DateAndTime( aStat.st_mtime, aTimeModified, aDateModified );
Unx2DateAndTime( aStat.st_atime, aTimeAccessed, aDateAccessed );
- return TRUE;
+ return sal_True;
}
//====================================================================
@@ -654,7 +654,7 @@ ErrCode FileStat::QueryDiskSpace( const String &, BigInt &, BigInt & )
//=========================================================================
-void FSysEnableSysErrorBox( BOOL )
+void FSysEnableSysErrorBox( sal_Bool )
{
}
diff --git a/tools/source/fsys/wldcrd.cxx b/tools/source/fsys/wldcrd.cxx
index 293d16877498..16c71cbc51d5 100644..100755
--- a/tools/source/fsys/wldcrd.cxx
+++ b/tools/source/fsys/wldcrd.cxx
@@ -48,7 +48,7 @@
*
*/
-USHORT WildCard::ImpMatch( const char *pWild, const char *pStr ) const
+sal_uInt16 WildCard::ImpMatch( const char *pWild, const char *pStr ) const
{
int pos=0;
int flag=0;
@@ -117,12 +117,12 @@ USHORT WildCard::ImpMatch( const char *pWild, const char *pStr ) const
|*
*************************************************************************/
-BOOL WildCard::Matches( const String& rString ) const
+sal_Bool WildCard::Matches( const String& rString ) const
{
ByteString aTmpWild = aWildString;
ByteString aString(rString, osl_getThreadTextEncoding());
- USHORT nSepPos;
+ sal_uInt16 nSepPos;
if ( cSepSymbol != '\0' )
{
@@ -130,14 +130,14 @@ BOOL WildCard::Matches( const String& rString ) const
{
// alle getrennten WildCard's pruefen
if ( ImpMatch( aTmpWild.Copy( 0, nSepPos ).GetBuffer(), aString.GetBuffer() ) )
- return TRUE;
+ return sal_True;
aTmpWild.Erase( 0, nSepPos + 1 ); // Trennsymbol entfernen
}
// und noch den hinter dem letzen Trennsymbol bzw. den einzigen
}
if ( ImpMatch( aTmpWild.GetBuffer(), aString.GetBuffer() ) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
diff --git a/tools/source/fsys/wntmsc.cxx b/tools/source/fsys/wntmsc.cxx
index a8cf1c1eecec..17421d83feaa 100644..100755
--- a/tools/source/fsys/wntmsc.cxx
+++ b/tools/source/fsys/wntmsc.cxx
@@ -52,7 +52,7 @@ DECLARE_LIST( FileStatList, FileStat* );
int Sys2SolarError_Impl( int nSysErr );
-static BOOL bLastCaseSensitive = FALSE;
+static sal_Bool bLastCaseSensitive = sal_False;
//--------------------------------------------------------------------
@@ -103,7 +103,7 @@ struct dirent *readdir( DIR *pDir )
int closedir( DIR *pDir )
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
if ( pDir )
{
bOk = 0 != pDir->p || FindClose( pDir->h );
@@ -136,7 +136,7 @@ ErrCode GetPathStyle_Impl( const String &rDevice, FSysPathStyle &rStyle )
// Windows95 hat VFAT, WindowsNT nicht
DWORD nVer = GetVersion();
- BOOL bW95 = ( nVer & 0xFF ) >= 4;
+ sal_Bool bW95 = ( nVer & 0xFF ) >= 4;
FSysFailOnErrorImpl();
rStyle = FSYS_STYLE_UNKNOWN;
@@ -185,7 +185,7 @@ FSysPathStyle DirEntry::GetPathStyle( const String &rDevice )
|*
*************************************************************************/
-BOOL DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const
+sal_Bool DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const
{
if (eFormatter==FSYS_STYLE_HOST)
@@ -194,7 +194,7 @@ BOOL DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const
DirEntry aRoot(*this);
aRoot.ToAbs();
aRoot = aRoot[Level()-1];
- String aRootDir = aRoot.GetFull(FSYS_STYLE_HOST, TRUE);
+ String aRootDir = aRoot.GetFull(FSYS_STYLE_HOST, sal_True);
char sVolumeName[256];
DWORD nVolumeSerial;
@@ -211,30 +211,30 @@ BOOL DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const
sFileSysName,
16 ))
{
- return (nFlags & FS_CASE_SENSITIVE) ? TRUE : FALSE;
+ return (nFlags & FS_CASE_SENSITIVE) ? sal_True : sal_False;
}
else
{
- return FALSE;
+ return sal_False;
}
*/
//
// guter versuch, aber FS_CASE_SENSITIVE ist D?nnsinn in T?ten:
//
// sFileSysName FS_CASE_SENSITIVE
- // FAT FALSE
- // NTFS TRUE !!!
- // NWCompat FALSE
- // Samba FALSE
+ // FAT sal_False
+ // NTFS sal_True !!!
+ // NWCompat sal_False
+ // Samba sal_False
//
// NT spricht auch NTFS lediglich case preserving an, also ist unter NT alles case insensitiv
//
- return FALSE;
+ return sal_False;
}
else
{
- BOOL isCaseSensitive = FALSE; // ich bin unter win32, also ist der default case insensitiv
+ sal_Bool isCaseSensitive = sal_False; // ich bin unter win32, also ist der default case insensitiv
switch ( eFormatter )
{
case FSYS_STYLE_MAC:
@@ -245,18 +245,18 @@ BOOL DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const
case FSYS_STYLE_HPFS:
case FSYS_STYLE_DETECT:
{
- isCaseSensitive = FALSE;
+ isCaseSensitive = sal_False;
break;
}
case FSYS_STYLE_SYSV:
case FSYS_STYLE_BSD:
{
- isCaseSensitive = TRUE;
+ isCaseSensitive = sal_True;
break;
}
default:
{
- isCaseSensitive = FALSE; // ich bin unter win32, also ist der default case insensitiv
+ isCaseSensitive = sal_False; // ich bin unter win32, also ist der default case insensitiv
break;
}
}
@@ -274,19 +274,19 @@ BOOL DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const
|*
*************************************************************************/
-BOOL DirEntry::ToAbs()
+sal_Bool DirEntry::ToAbs()
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
if ( FSYS_FLAG_VOLUME == eFlag )
{
eFlag = FSYS_FLAG_ABSROOT;
- return TRUE;
+ return sal_True;
}
if ( IsAbs() )
{
- return TRUE;
+ return sal_True;
}
@@ -295,10 +295,10 @@ BOOL DirEntry::ToAbs()
ByteString aFullName( GetFull(), osl_getThreadTextEncoding() );
FSysFailOnErrorImpl();
if ( GetFullPathName((char*)aFullName.GetBuffer(),256,sBuf,&pOld) > 511 )
- return FALSE;
+ return sal_False;
*this = DirEntry( String(sBuf, osl_getThreadTextEncoding() ));
- return TRUE;
+ return sal_True;
}
@@ -364,27 +364,27 @@ String DirEntry::GetVolume() const
|*
*************************************************************************/
-BOOL DirEntry::SetCWD( BOOL bSloppy ) const
+sal_Bool DirEntry::SetCWD( sal_Bool bSloppy ) const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
FSysFailOnErrorImpl();
if ( eFlag == FSYS_FLAG_CURRENT && !aName.Len() )
- return TRUE;
+ return sal_True;
if ( SetCurrentDirectory(ByteString(GetFull(), osl_getThreadTextEncoding()).GetBuffer()) )
{
- return TRUE;
+ return sal_True;
}
if ( bSloppy && pParent &&
SetCurrentDirectory(ByteString(pParent->GetFull(), osl_getThreadTextEncoding()).GetBuffer()) )
{
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//-------------------------------------------------------------------------
@@ -444,7 +444,7 @@ USHORT DirReader_Impl::Read()
CharLowerBuff( (char*) aLowerName.GetBuffer(), aLowerName.Len() );
// Flags pruefen
- BOOL bIsDirAndWantsDir =
+ sal_Bool bIsDirAndWantsDir =
( ( pDir->eAttrMask & FSYS_KIND_DIR ) &&
#ifdef ICC
( pDosEntry->d_type & ( strcmp(pDosEntry->d_name,".") ||
@@ -452,7 +452,7 @@ USHORT DirReader_Impl::Read()
#else
( pDosEntry->d_type & DOS_DIRECT ) );
#endif
- BOOL bIsFileAndWantsFile =
+ sal_Bool bIsFileAndWantsFile =
( ( pDir->eAttrMask & FSYS_KIND_FILE ) &&
#ifdef ICC
!( pDosEntry->d_type & ( strcmp(pDosEntry->d_name,".") ||
@@ -461,8 +461,8 @@ USHORT DirReader_Impl::Read()
!( pDosEntry->d_type & DOS_DIRECT ) &&
#endif
!( pDosEntry->d_type & DOS_VOLUMEID ) );
- BOOL bIsHidden = (pDosEntry->d_type & _A_HIDDEN) != 0;
- BOOL bWantsHidden = 0 == ( pDir->eAttrMask & FSYS_KIND_VISIBLE );
+ sal_Bool bIsHidden = (pDosEntry->d_type & _A_HIDDEN) != 0;
+ sal_Bool bWantsHidden = 0 == ( pDir->eAttrMask & FSYS_KIND_VISIBLE );
if ( ( bIsDirAndWantsDir || bIsFileAndWantsFile ) &&
( bWantsHidden || !bIsHidden ) &&
pDir->aNameMask.Matches( String(aLowerName, osl_getThreadTextEncoding()) ) )
@@ -483,7 +483,7 @@ USHORT DirReader_Impl::Read()
pTemp->ImpSetStat( new FileStat( (void*) pDosDir, (void*) 0 ) );
#endif
if ( pParent )
- pTemp->ImpChangeParent( new DirEntry( *pParent ), FALSE );
+ pTemp->ImpChangeParent( new DirEntry( *pParent ), sal_False );
if ( pDir->pStatLst ) //Status fuer Sort gewuenscht?
{
FileStat *pNewStat = new FileStat( (void*) pDosDir, (void*) 0 );
@@ -502,7 +502,7 @@ USHORT DirReader_Impl::Read()
}
else
- bReady = TRUE;
+ bReady = sal_True;
return 0;
}
@@ -793,13 +793,13 @@ HRESULT SHResolvePath( HWND hwndOwner, LPCTSTR pszPath, LPITEMIDLIST *ppidl )
// The Wrapper
//---------------------------------------------------------------------------
-BOOL Exists_Impl( const ByteString & crPath )
+sal_Bool Exists_Impl( const ByteString & crPath )
{
// We do not know if OLE was initialized for this thread
CoInitialize( NULL );
- BOOL bSuccess = SUCCEEDED( SHResolvePath(NULL, crPath.GetBuffer(), NULL) );
+ sal_Bool bSuccess = SUCCEEDED( SHResolvePath(NULL, crPath.GetBuffer(), NULL) );
CoUninitialize();
@@ -808,7 +808,7 @@ BOOL Exists_Impl( const ByteString & crPath )
//---------------------------------------------------------------------------
-BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess )
+sal_Bool FileStat::Update( const DirEntry& rDirEntry, sal_Bool bForceAccess )
{
nSize = 0;
nKindFlags = 0;
@@ -825,7 +825,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess )
{
nError = FSYS_ERR_UNKNOWN;
nKindFlags = 0;
- return FALSE;
+ return sal_False;
}
// Sonderbehandlung falls es sich um eine Root ohne Laufwerk handelt
@@ -834,7 +834,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess )
{
nKindFlags = FSYS_KIND_DIR;
nError = FSYS_ERR_OK;
- return TRUE;
+ return sal_True;
}
// keine Error-Boxen anzeigen
@@ -849,7 +849,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess )
// ist ein Medium im Laufwerk?
HACK("wie?")
- BOOL bAccess = TRUE;
+ sal_Bool bAccess = sal_True;
const DirEntry *pTop = aDirEntry.ImpGetTopPtr();
ByteString aName = ByteString(pTop->aName).ToLowerAscii();
if ( !bForceAccess &&
@@ -857,7 +857,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess )
pTop->eFlag == FSYS_FLAG_RELROOT ||
pTop->eFlag == FSYS_FLAG_VOLUME ) )
if ( aName == "a:" || aName == "b:" )
- bAccess = FALSE;
+ bAccess = sal_False;
else
DBG_TRACE( "FSys: will access removable device!" );
if ( bAccess && ( aName == "a:" || aName == "b:" ) ) {
@@ -881,7 +881,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess )
nKindFlags |= FSYS_KIND_REMOVEABLE;
nError = FSYS_ERR_NOTEXISTS;
nKindFlags = 0;
- return FALSE;
+ return sal_False;
}
ByteString aRootDir = aDirEntry.aName;
@@ -891,7 +891,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess )
{
nError = FSYS_ERR_NOTEXISTS;
nKindFlags = 0;
- return FALSE;
+ return sal_False;
}
if ( aDirEntry.eFlag == FSYS_FLAG_VOLUME )
@@ -905,7 +905,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess )
nError = ERRCODE_NONE;
- return TRUE;
+ return sal_True;
}
// Statusinformation vom Betriebssystem holen
@@ -945,7 +945,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess )
{
nKindFlags = FSYS_KIND_UNKNOWN;
nError = FSYS_ERR_NOTEXISTS;
- return FALSE;
+ return sal_False;
}
// UNC-Volume?
@@ -959,13 +959,13 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess )
{
nKindFlags = FSYS_KIND_DIR|FSYS_KIND_REMOTE;
nError = FSYS_ERR_OK;
- return TRUE;
+ return sal_True;
}
else
{
nKindFlags = FSYS_KIND_UNKNOWN;
nError = FSYS_ERR_NOTEXISTS;
- return FALSE;
+ return sal_False;
}
}
}
@@ -984,7 +984,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess )
{
nKindFlags = FSYS_KIND_WILD;
nError = FSYS_ERR_OK;
- return TRUE;
+ return sal_True;
}
if ( bAccess )
@@ -1008,7 +1008,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess )
}
-BOOL IsRedirectable_Impl( const ByteString &rPath )
+sal_Bool IsRedirectable_Impl( const ByteString &rPath )
{
if ( rPath.Len() >= 3 && ':' == rPath.GetBuffer()[1] )
{
@@ -1017,7 +1017,7 @@ BOOL IsRedirectable_Impl( const ByteString &rPath )
SetLastError( ERROR_SUCCESS );
return DRIVE_FIXED != nType;
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -1067,7 +1067,7 @@ ErrCode FileStat::QueryDiskSpace( const String &rPath,
//=========================================================================
-void FSysEnableSysErrorBox( BOOL bEnable )
+void FSysEnableSysErrorBox( sal_Bool bEnable )
{ // Preserve other Bits!!
sal_uInt32 nErrorMode = SetErrorMode( bEnable ? 0 : SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX );
if ( bEnable )
diff --git a/tools/source/fsys/wntmsc.hxx b/tools/source/fsys/wntmsc.hxx
index a6202cc71cc6..d84e5af9680b 100644..100755
--- a/tools/source/fsys/wntmsc.hxx
+++ b/tools/source/fsys/wntmsc.hxx
@@ -51,7 +51,7 @@
//--------------------------------------------------------------------
-#define FSYS_UNIX FALSE
+#define FSYS_UNIX sal_False
#define DOS_DIRECT _A_SUBDIR
#define DOS_VOLUMEID 0x08
@@ -88,7 +88,7 @@ typedef struct
#define START_DRV 'a'
-inline BOOL DRIVE_EXISTS(char c)
+inline sal_Bool DRIVE_EXISTS(char c)
{
ByteString aDriveRoot( c );
aDriveRoot += ":\\";
diff --git a/tools/source/generic/bigint.cxx b/tools/source/generic/bigint.cxx
index 7b10f31d733f..027105767063 100644
--- a/tools/source/generic/bigint.cxx
+++ b/tools/source/generic/bigint.cxx
@@ -49,7 +49,7 @@ static const long MY_MINSHORT = -MY_MAXSHORT;
* sind diese Algorithmen im Kapitel 4.3.1. The Classical Algorithms.
*/
-// Muss auf UINT16/INT16/UINT32/INT32 umgestellt werden !!! W.P.
+// Muss auf sal_uInt16/INT16/sal_uInt32/sal_Int32 umgestellt werden !!! W.P.
// -----------------------------------------------------------------------
@@ -649,7 +649,7 @@ BigInt::BigInt( sal_uInt32 nValue )
// -----------------------------------------------------------------------
-BigInt::operator ULONG() const
+BigInt::operator sal_uIntPtr() const
{
if ( !bIsBig )
return (sal_uInt32)nVal;
diff --git a/tools/source/generic/color.cxx b/tools/source/generic/color.cxx
index 5dc41f292668..ec325b9ca3d3 100644
--- a/tools/source/generic/color.cxx
+++ b/tools/source/generic/color.cxx
@@ -63,10 +63,10 @@ Color::Color( const ResId& rResId )
pResMgr->Increment( sizeof( RSHEADER_TYPE ) );
// Daten laden
- USHORT nRed = pResMgr->ReadShort();
- USHORT nGreen = pResMgr->ReadShort();
- USHORT nBlue = pResMgr->ReadShort();
- // one more historical ULONG
+ sal_uInt16 nRed = pResMgr->ReadShort();
+ sal_uInt16 nGreen = pResMgr->ReadShort();
+ sal_uInt16 nBlue = pResMgr->ReadShort();
+ // one more historical sal_uIntPtr
pResMgr->ReadLong();
// RGB-Farbe
@@ -77,60 +77,60 @@ Color::Color( const ResId& rResId )
mnColor = RGB_COLORDATA( 0, 0, 0 );
}
}
-UINT8 Color::GetColorError( const Color& rCompareColor ) const
+sal_uInt8 Color::GetColorError( const Color& rCompareColor ) const
{
const long nErrAbs = labs( (long) rCompareColor.GetRed() - GetRed() ) +
labs( (long) rCompareColor.GetGreen() - GetGreen() ) +
labs( (long) rCompareColor.GetBlue() - GetBlue() );
- return (UINT8) _FRound( nErrAbs * 0.3333333333 );
+ return (sal_uInt8) _FRound( nErrAbs * 0.3333333333 );
}
// -----------------------------------------------------------------------
-void Color::IncreaseLuminance( UINT8 cLumInc )
+void Color::IncreaseLuminance( sal_uInt8 cLumInc )
{
- SetRed( (UINT8) VOS_BOUND( (long) COLORDATA_RED( mnColor ) + cLumInc, 0L, 255L ) );
- SetGreen( (UINT8) VOS_BOUND( (long) COLORDATA_GREEN( mnColor ) + cLumInc, 0L, 255L ) );
- SetBlue( (UINT8) VOS_BOUND( (long) COLORDATA_BLUE( mnColor ) + cLumInc, 0L, 255L ) );
+ SetRed( (sal_uInt8) VOS_BOUND( (long) COLORDATA_RED( mnColor ) + cLumInc, 0L, 255L ) );
+ SetGreen( (sal_uInt8) VOS_BOUND( (long) COLORDATA_GREEN( mnColor ) + cLumInc, 0L, 255L ) );
+ SetBlue( (sal_uInt8) VOS_BOUND( (long) COLORDATA_BLUE( mnColor ) + cLumInc, 0L, 255L ) );
}
// -----------------------------------------------------------------------
-void Color::DecreaseLuminance( UINT8 cLumDec )
+void Color::DecreaseLuminance( sal_uInt8 cLumDec )
{
- SetRed( (UINT8) VOS_BOUND( (long) COLORDATA_RED( mnColor ) - cLumDec, 0L, 255L ) );
- SetGreen( (UINT8) VOS_BOUND( (long) COLORDATA_GREEN( mnColor ) - cLumDec, 0L, 255L ) );
- SetBlue( (UINT8) VOS_BOUND( (long) COLORDATA_BLUE( mnColor ) - cLumDec, 0L, 255L ) );
+ SetRed( (sal_uInt8) VOS_BOUND( (long) COLORDATA_RED( mnColor ) - cLumDec, 0L, 255L ) );
+ SetGreen( (sal_uInt8) VOS_BOUND( (long) COLORDATA_GREEN( mnColor ) - cLumDec, 0L, 255L ) );
+ SetBlue( (sal_uInt8) VOS_BOUND( (long) COLORDATA_BLUE( mnColor ) - cLumDec, 0L, 255L ) );
}
// -----------------------------------------------------------------------
-void Color::IncreaseContrast( UINT8 cContInc )
+void Color::IncreaseContrast( sal_uInt8 cContInc )
{
if( cContInc)
{
const double fM = 128.0 / ( 128.0 - 0.4985 * cContInc );
const double fOff = 128.0 - fM * 128.0;
- SetRed( (UINT8) VOS_BOUND( _FRound( COLORDATA_RED( mnColor ) * fM + fOff ), 0L, 255L ) );
- SetGreen( (UINT8) VOS_BOUND( _FRound( COLORDATA_GREEN( mnColor ) * fM + fOff ), 0L, 255L ) );
- SetBlue( (UINT8) VOS_BOUND( _FRound( COLORDATA_BLUE( mnColor ) * fM + fOff ), 0L, 255L ) );
+ SetRed( (sal_uInt8) VOS_BOUND( _FRound( COLORDATA_RED( mnColor ) * fM + fOff ), 0L, 255L ) );
+ SetGreen( (sal_uInt8) VOS_BOUND( _FRound( COLORDATA_GREEN( mnColor ) * fM + fOff ), 0L, 255L ) );
+ SetBlue( (sal_uInt8) VOS_BOUND( _FRound( COLORDATA_BLUE( mnColor ) * fM + fOff ), 0L, 255L ) );
}
}
// -----------------------------------------------------------------------
-void Color::DecreaseContrast( UINT8 cContDec )
+void Color::DecreaseContrast( sal_uInt8 cContDec )
{
if( cContDec )
{
const double fM = ( 128.0 - 0.4985 * cContDec ) / 128.0;
const double fOff = 128.0 - fM * 128.0;
- SetRed( (UINT8) VOS_BOUND( _FRound( COLORDATA_RED( mnColor ) * fM + fOff ), 0L, 255L ) );
- SetGreen( (UINT8) VOS_BOUND( _FRound( COLORDATA_GREEN( mnColor ) * fM + fOff ), 0L, 255L ) );
- SetBlue( (UINT8) VOS_BOUND( _FRound( COLORDATA_BLUE( mnColor ) * fM + fOff ), 0L, 255L ) );
+ SetRed( (sal_uInt8) VOS_BOUND( _FRound( COLORDATA_RED( mnColor ) * fM + fOff ), 0L, 255L ) );
+ SetGreen( (sal_uInt8) VOS_BOUND( _FRound( COLORDATA_GREEN( mnColor ) * fM + fOff ), 0L, 255L ) );
+ SetBlue( (sal_uInt8) VOS_BOUND( _FRound( COLORDATA_BLUE( mnColor ) * fM + fOff ), 0L, 255L ) );
}
}
@@ -145,14 +145,14 @@ void Color::Invert()
// -----------------------------------------------------------------------
-BOOL Color::IsDark() const
+sal_Bool Color::IsDark() const
{
return GetLuminance() <= 38;
}
// -----------------------------------------------------------------------
-BOOL Color::IsBright() const
+sal_Bool Color::IsBright() const
{
return GetLuminance() >= 245;
}
@@ -161,10 +161,10 @@ BOOL Color::IsBright() const
// color space conversion
// -----------------------------------------------------------------------
-void Color::RGBtoHSB( USHORT& nHue, USHORT& nSat, USHORT& nBri ) const
+void Color::RGBtoHSB( sal_uInt16& nHue, sal_uInt16& nSat, sal_uInt16& nBri ) const
{
- UINT8 c[3];
- UINT8 cMax, cMin;
+ sal_uInt8 c[3];
+ sal_uInt8 cMax, cMin;
c[0] = GetRed();
c[1] = GetGreen();
@@ -185,7 +185,7 @@ void Color::RGBtoHSB( USHORT& nHue, USHORT& nSat, USHORT& nBri ) const
if( c[2] < cMin )
cMin = c[2];
- UINT8 cDelta = cMax - cMin;
+ sal_uInt8 cDelta = cMax - cMin;
// Saturation = max - min / max
if( nBri > 0 )
@@ -216,14 +216,14 @@ void Color::RGBtoHSB( USHORT& nHue, USHORT& nSat, USHORT& nBri ) const
if( dHue < 0.0 )
dHue += 360.0;
- nHue = (UINT16) dHue;
+ nHue = (sal_uInt16) dHue;
}
}
-ColorData Color::HSBtoRGB( USHORT nHue, USHORT nSat, USHORT nBri )
+ColorData Color::HSBtoRGB( sal_uInt16 nHue, sal_uInt16 nSat, sal_uInt16 nBri )
{
- UINT8 cR=0,cG=0,cB=0;
- UINT8 nB = (UINT8) ( nBri * 255 / 100 );
+ sal_uInt8 cR=0,cG=0,cB=0;
+ sal_uInt8 nB = (sal_uInt8) ( nBri * 255 / 100 );
if( nSat == 0 )
{
@@ -235,17 +235,17 @@ ColorData Color::HSBtoRGB( USHORT nHue, USHORT nSat, USHORT nBri )
{
double dH = nHue;
double f;
- UINT16 n;
+ sal_uInt16 n;
if( dH == 360.0 )
dH = 0.0;
dH /= 60.0;
- n = (UINT16) dH;
+ n = (sal_uInt16) dH;
f = dH - n;
- UINT8 a = (UINT8) ( nB * ( 100 - nSat ) / 100 );
- UINT8 b = (UINT8) ( nB * ( 100 - ( (double)nSat * f ) ) / 100 );
- UINT8 c = (UINT8) ( nB * ( 100 - ( (double)nSat * ( 1.0 - f ) ) ) / 100 );
+ sal_uInt8 a = (sal_uInt8) ( nB * ( 100 - nSat ) / 100 );
+ sal_uInt8 b = (sal_uInt8) ( nB * ( 100 - ( (double)nSat * f ) ) / 100 );
+ sal_uInt8 c = (sal_uInt8) ( nB * ( 100 - ( (double)nSat * ( 1.0 - f ) ) ) / 100 );
switch( n )
{
@@ -263,7 +263,7 @@ ColorData Color::HSBtoRGB( USHORT nHue, USHORT nSat, USHORT nBri )
// -----------------------------------------------------------------------
-SvStream& Color::Read( SvStream& rIStm, BOOL bNewFormat )
+SvStream& Color::Read( SvStream& rIStm, sal_Bool bNewFormat )
{
if ( bNewFormat )
rIStm >> mnColor;
@@ -275,7 +275,7 @@ SvStream& Color::Read( SvStream& rIStm, BOOL bNewFormat )
// -----------------------------------------------------------------------
-SvStream& Color::Write( SvStream& rOStm, BOOL bNewFormat )
+SvStream& Color::Write( SvStream& rOStm, sal_Bool bNewFormat )
{
if ( bNewFormat )
rOStm << mnColor;
@@ -287,13 +287,13 @@ SvStream& Color::Write( SvStream& rOStm, BOOL bNewFormat )
// -----------------------------------------------------------------------
-#define COL_NAME_USER ((USHORT)0x8000)
-#define COL_RED_1B ((USHORT)0x0001)
-#define COL_RED_2B ((USHORT)0x0002)
-#define COL_GREEN_1B ((USHORT)0x0010)
-#define COL_GREEN_2B ((USHORT)0x0020)
-#define COL_BLUE_1B ((USHORT)0x0100)
-#define COL_BLUE_2B ((USHORT)0x0200)
+#define COL_NAME_USER ((sal_uInt16)0x8000)
+#define COL_RED_1B ((sal_uInt16)0x0001)
+#define COL_RED_2B ((sal_uInt16)0x0002)
+#define COL_GREEN_1B ((sal_uInt16)0x0010)
+#define COL_GREEN_2B ((sal_uInt16)0x0020)
+#define COL_BLUE_1B ((sal_uInt16)0x0100)
+#define COL_BLUE_2B ((sal_uInt16)0x0200)
// -----------------------------------------------------------------------
@@ -301,10 +301,10 @@ SvStream& operator>>( SvStream& rIStream, Color& rColor )
{
DBG_ASSERTWARNING( rIStream.GetVersion(), "Color::>> - Solar-Version not set on rIStream" );
- USHORT nColorName;
- USHORT nRed;
- USHORT nGreen;
- USHORT nBlue;
+ sal_uInt16 nColorName;
+ sal_uInt16 nRed;
+ sal_uInt16 nGreen;
+ sal_uInt16 nBlue;
rIStream >> nColorName;
@@ -313,7 +313,7 @@ SvStream& operator>>( SvStream& rIStream, Color& rColor )
if ( rIStream.GetCompressMode() == COMPRESSMODE_FULL )
{
unsigned char cAry[6];
- USHORT i = 0;
+ sal_uInt16 i = 0;
nRed = 0;
nGreen = 0;
@@ -439,10 +439,10 @@ SvStream& operator<<( SvStream& rOStream, const Color& rColor )
{
DBG_ASSERTWARNING( rOStream.GetVersion(), "Color::<< - Solar-Version not set on rOStream" );
- USHORT nColorName = COL_NAME_USER;
- USHORT nRed = rColor.GetRed();
- USHORT nGreen = rColor.GetGreen();
- USHORT nBlue = rColor.GetBlue();
+ sal_uInt16 nColorName = COL_NAME_USER;
+ sal_uInt16 nRed = rColor.GetRed();
+ sal_uInt16 nGreen = rColor.GetGreen();
+ sal_uInt16 nBlue = rColor.GetBlue();
nRed = (nRed<<8) + nRed;
nGreen = (nGreen<<8) + nGreen;
nBlue = (nBlue<<8) + nBlue;
@@ -450,7 +450,7 @@ SvStream& operator<<( SvStream& rOStream, const Color& rColor )
if ( rOStream.GetCompressMode() == COMPRESSMODE_FULL )
{
unsigned char cAry[6];
- USHORT i = 0;
+ sal_uInt16 i = 0;
if ( nRed & 0x00FF )
{
diff --git a/tools/source/generic/config.cxx b/tools/source/generic/config.cxx
index 1a94c2b11198..ff919fcf2505 100644
--- a/tools/source/generic/config.cxx
+++ b/tools/source/generic/config.cxx
@@ -56,7 +56,7 @@ struct ImplKeyData
ImplKeyData* mpNext;
ByteString maKey;
ByteString maValue;
- BOOL mbIsComment;
+ sal_Bool mbIsComment;
};
struct ImplGroupData
@@ -64,20 +64,20 @@ struct ImplGroupData
ImplGroupData* mpNext;
ImplKeyData* mpFirstKey;
ByteString maGroupName;
- USHORT mnEmptyLines;
+ sal_uInt16 mnEmptyLines;
};
struct ImplConfigData
{
ImplGroupData* mpFirstGroup;
XubString maFileName;
- ULONG mnDataUpdateId;
- ULONG mnTimeStamp;
+ sal_uIntPtr mnDataUpdateId;
+ sal_uIntPtr mnTimeStamp;
LineEnd meLineEnd;
- USHORT mnRefCount;
- BOOL mbModified;
- BOOL mbRead;
- BOOL mbIsUTF8BOM;
+ sal_uInt16 mnRefCount;
+ sal_Bool mbModified;
+ sal_Bool mbRead;
+ sal_Bool mbIsUTF8BOM;
};
// =======================================================================
@@ -103,9 +103,9 @@ static String toUncPath( const String& rPath )
return aFileURL;
}
-static ULONG ImplSysGetConfigTimeStamp( const XubString& rFileName )
+static sal_uIntPtr ImplSysGetConfigTimeStamp( const XubString& rFileName )
{
- ULONG nTimeStamp = 0;
+ sal_uIntPtr nTimeStamp = 0;
::osl::DirectoryItem aItem;
::osl::FileStatus aStatus( osl_FileStatus_Mask_ModifyTime );
@@ -121,10 +121,10 @@ static ULONG ImplSysGetConfigTimeStamp( const XubString& rFileName )
// -----------------------------------------------------------------------
-static BYTE* ImplSysReadConfig( const XubString& rFileName,
- sal_uInt64& rRead, BOOL& rbRead, BOOL& rbIsUTF8BOM, ULONG& rTimeStamp )
+static sal_uInt8* ImplSysReadConfig( const XubString& rFileName,
+ sal_uInt64& rRead, sal_Bool& rbRead, sal_Bool& rbIsUTF8BOM, sal_uIntPtr& rTimeStamp )
{
- BYTE* pBuf = NULL;
+ sal_uInt8* pBuf = NULL;
::osl::File aFile( rFileName );
if( aFile.open( osl_File_OpenFlag_Read ) == ::osl::FileBase::E_None )
@@ -136,7 +136,7 @@ static BYTE* ImplSysReadConfig( const XubString& rFileName,
aFile.close();
return 0;
}
- pBuf = new BYTE[static_cast< std::size_t >(nPos)];
+ pBuf = new sal_uInt8[static_cast< std::size_t >(nPos)];
if( aFile.read( pBuf, nPos, nRead ) == ::osl::FileBase::E_None && nRead == nPos )
{
//skip the byte-order-mark 0xEF 0xBB 0xBF, if it was UTF8 files
@@ -144,12 +144,12 @@ static BYTE* ImplSysReadConfig( const XubString& rFileName,
if (nRead > 2 && memcmp(pBuf, BOM, 3) == 0)
{
nRead -= 3;
- rtl_moveMemory(pBuf, pBuf + 3, sal::static_int_cast<sal_Size>(nRead * sizeof(BYTE)) );
- rbIsUTF8BOM = TRUE;
+ rtl_moveMemory(pBuf, pBuf + 3, sal::static_int_cast<sal_Size>(nRead * sizeof(sal_uInt8)) );
+ rbIsUTF8BOM = sal_True;
}
rTimeStamp = ImplSysGetConfigTimeStamp( rFileName );
- rbRead = TRUE;
+ rbRead = sal_True;
rRead = nRead;
}
else
@@ -166,11 +166,11 @@ static BYTE* ImplSysReadConfig( const XubString& rFileName,
// -----------------------------------------------------------------------
-static BOOL ImplSysWriteConfig( const XubString& rFileName,
- const BYTE* pBuf, ULONG nBufLen, BOOL rbIsUTF8BOM, ULONG& rTimeStamp )
+static sal_Bool ImplSysWriteConfig( const XubString& rFileName,
+ const sal_uInt8* pBuf, sal_uIntPtr nBufLen, sal_Bool rbIsUTF8BOM, sal_uIntPtr& rTimeStamp )
{
- BOOL bSuccess = FALSE;
- BOOL bUTF8BOMSuccess = FALSE;
+ sal_Bool bSuccess = sal_False;
+ sal_Bool bUTF8BOMSuccess = sal_False;
::osl::File aFile( rFileName );
::osl::FileBase::RC eError = aFile.open( osl_File_OpenFlag_Write | osl_File_OpenFlag_Create );
@@ -189,13 +189,13 @@ static BOOL ImplSysWriteConfig( const XubString& rFileName,
sal_uInt64 nUTF8BOMWritten;
if( aFile.write( BOM, 3, nUTF8BOMWritten ) == ::osl::FileBase::E_None && 3 == nUTF8BOMWritten )
{
- bUTF8BOMSuccess = TRUE;
+ bUTF8BOMSuccess = sal_True;
}
}
if( aFile.write( pBuf, nBufLen, nWritten ) == ::osl::FileBase::E_None && nWritten == nBufLen )
{
- bSuccess = TRUE;
+ bSuccess = sal_True;
}
if ( rbIsUTF8BOM ? bSuccess && bUTF8BOMSuccess : bSuccess )
{
@@ -258,7 +258,7 @@ static String ImplMakeConfigName( const XubString* pFileName,
namespace {
-ByteString makeByteString(BYTE const * p, sal_uInt64 n) {
+ByteString makeByteString(sal_uInt8 const * p, sal_uInt64 n) {
if (n > STRING_MAXLEN) {
#ifdef WNT
abort();
@@ -274,7 +274,7 @@ ByteString makeByteString(BYTE const * p, sal_uInt64 n) {
}
static void ImplMakeConfigList( ImplConfigData* pData,
- const BYTE* pBuf, sal_uInt64 nLen )
+ const sal_uInt8* pBuf, sal_uInt64 nLen )
{
// kein Buffer, keine Daten
if ( !nLen )
@@ -286,7 +286,7 @@ static void ImplMakeConfigList( ImplConfigData* pData,
xub_StrLen nNameLen;
xub_StrLen nKeyLen;
sal_uInt64 i;
- const BYTE* pLine;
+ const sal_uInt8* pLine;
ImplKeyData* pPrevKey = NULL;
ImplKeyData* pKey;
ImplGroupData* pPrevGroup = NULL;
@@ -380,7 +380,7 @@ static void ImplMakeConfigList( ImplConfigData* pData,
while ( pGroup->mnEmptyLines )
{
pKey = new ImplKeyData;
- pKey->mbIsComment = TRUE;
+ pKey->mbIsComment = sal_True;
pPrevKey->mpNext = pKey;
pPrevKey = pKey;
pGroup->mnEmptyLines--;
@@ -398,11 +398,11 @@ static void ImplMakeConfigList( ImplConfigData* pData,
if ( pLine[0] == ';' )
{
pKey->maValue = makeByteString(pLine, nLineLen);
- pKey->mbIsComment = TRUE;
+ pKey->mbIsComment = sal_True;
}
else
{
- pKey->mbIsComment = FALSE;
+ pKey->mbIsComment = sal_False;
nNameLen = 0;
while ( (nNameLen < nLineLen) && (pLine[nNameLen] != '=') )
nNameLen++;
@@ -449,17 +449,17 @@ static void ImplMakeConfigList( ImplConfigData* pData,
// -----------------------------------------------------------------------
-static BYTE* ImplGetConfigBuffer( const ImplConfigData* pData, ULONG& rLen )
+static sal_uInt8* ImplGetConfigBuffer( const ImplConfigData* pData, sal_uIntPtr& rLen )
{
- BYTE* pWriteBuf;
- BYTE* pBuf;
- BYTE aLineEndBuf[2] = {0, 0};
+ sal_uInt8* pWriteBuf;
+ sal_uInt8* pBuf;
+ sal_uInt8 aLineEndBuf[2] = {0, 0};
ImplKeyData* pKey;
ImplGroupData* pGroup;
unsigned int nBufLen;
- USHORT nValueLen;
- USHORT nKeyLen;
- USHORT nLineEndLen;
+ sal_uInt16 nValueLen;
+ sal_uInt16 nKeyLen;
+ sal_uInt16 nLineEndLen;
if ( pData->meLineEnd == LINEEND_CR )
{
@@ -512,7 +512,7 @@ static BYTE* ImplGetConfigBuffer( const ImplConfigData* pData, ULONG& rLen )
rLen = nBufLen;
if ( !nBufLen )
{
- pWriteBuf = new BYTE[nLineEndLen];
+ pWriteBuf = new sal_uInt8[nLineEndLen];
if ( pWriteBuf )
{
pWriteBuf[0] = aLineEndBuf[0];
@@ -525,7 +525,7 @@ static BYTE* ImplGetConfigBuffer( const ImplConfigData* pData, ULONG& rLen )
}
// Schreibbuffer anlegen (wird vom Aufrufer zerstoert)
- pWriteBuf = new BYTE[nBufLen];
+ pWriteBuf = new sal_uInt8[nBufLen];
if ( !pWriteBuf )
return 0;
@@ -582,7 +582,7 @@ static BYTE* ImplGetConfigBuffer( const ImplConfigData* pData, ULONG& rLen )
}
// Leerzeile nach jeder Gruppe auch wieder speichern
- USHORT nEmptyLines = pGroup->mnEmptyLines;
+ sal_uInt16 nEmptyLines = pGroup->mnEmptyLines;
while ( nEmptyLines )
{
*pBuf = aLineEndBuf[0]; pBuf++;
@@ -604,11 +604,11 @@ static BYTE* ImplGetConfigBuffer( const ImplConfigData* pData, ULONG& rLen )
static void ImplReadConfig( ImplConfigData* pData )
{
- ULONG nTimeStamp = 0;
+ sal_uIntPtr nTimeStamp = 0;
sal_uInt64 nRead = 0;
- BOOL bRead = FALSE;
- BOOL bIsUTF8BOM =FALSE;
- BYTE* pBuf = ImplSysReadConfig( pData->maFileName, nRead, bRead, bIsUTF8BOM, nTimeStamp );
+ sal_Bool bRead = sal_False;
+ sal_Bool bIsUTF8BOM =sal_False;
+ sal_uInt8* pBuf = ImplSysReadConfig( pData->maFileName, nRead, bRead, bIsUTF8BOM, nTimeStamp );
// Aus dem Buffer die Config-Verwaltungsliste aufbauen
if ( pBuf )
@@ -617,11 +617,11 @@ static void ImplReadConfig( ImplConfigData* pData )
delete[] pBuf;
}
pData->mnTimeStamp = nTimeStamp;
- pData->mbModified = FALSE;
+ pData->mbModified = sal_False;
if ( bRead )
- pData->mbRead = TRUE;
+ pData->mbRead = sal_True;
if ( bIsUTF8BOM )
- pData->mbIsUTF8BOM = TRUE;
+ pData->mbIsUTF8BOM = sal_True;
}
// -----------------------------------------------------------------------
@@ -639,16 +639,16 @@ static void ImplWriteConfig( ImplConfigData* pData )
#endif
// Aus der Config-Liste einen Buffer zusammenbauen
- ULONG nBufLen;
- BYTE* pBuf = ImplGetConfigBuffer( pData, nBufLen );
+ sal_uIntPtr nBufLen;
+ sal_uInt8* pBuf = ImplGetConfigBuffer( pData, nBufLen );
if ( pBuf )
{
if ( ImplSysWriteConfig( pData->maFileName, pBuf, nBufLen, pData->mbIsUTF8BOM, pData->mnTimeStamp ) )
- pData->mbModified = FALSE;
+ pData->mbModified = sal_False;
delete[] pBuf;
}
else
- pData->mbModified = FALSE;
+ pData->mbModified = sal_False;
}
// -----------------------------------------------------------------------
@@ -692,8 +692,8 @@ static ImplConfigData* ImplGetConfigData( const XubString& rFileName )
pData->mnDataUpdateId = 0;
pData->meLineEnd = LINEEND_CRLF;
pData->mnRefCount = 0;
- pData->mbRead = FALSE;
- pData->mbIsUTF8BOM = FALSE;
+ pData->mbRead = sal_False;
+ pData->mbIsUTF8BOM = sal_False;
ImplReadConfig( pData );
return pData;
@@ -709,7 +709,7 @@ static void ImplFreeConfigData( ImplConfigData* pDelData )
// =======================================================================
-BOOL Config::ImplUpdateConfig() const
+sal_Bool Config::ImplUpdateConfig() const
{
// Wenn sich TimeStamp unterscheidet, dann Datei neu einlesen
if ( mpData->mnTimeStamp != ImplSysGetConfigTimeStamp( maFileName ) )
@@ -717,10 +717,10 @@ BOOL Config::ImplUpdateConfig() const
ImplDeleteConfigData( mpData );
ImplReadConfig( mpData );
mpData->mnDataUpdateId++;
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -774,7 +774,7 @@ Config::Config()
mpActGroup = NULL;
mnDataUpdateId = 0;
mnLockCount = 1;
- mbPersistence = TRUE;
+ mbPersistence = sal_True;
#ifdef DBG_UTIL
DBG_TRACE( "Config::Config()" );
@@ -791,7 +791,7 @@ Config::Config( const XubString& rFileName )
mpActGroup = NULL;
mnDataUpdateId = 0;
mnLockCount = 1;
- mbPersistence = TRUE;
+ mbPersistence = sal_True;
#ifdef DBG_UTIL
ByteString aTraceStr( "Config::Config( " );
@@ -854,7 +854,7 @@ void Config::DeleteGroup( const ByteString& rGroup )
if ( !mnLockCount || !mpData->mbRead )
{
ImplUpdateConfig();
- mpData->mbRead = TRUE;
+ mpData->mbRead = sal_True;
}
ImplGroupData* pPrevGroup = NULL;
@@ -892,7 +892,7 @@ void Config::DeleteGroup( const ByteString& rGroup )
ImplWriteConfig( mpData );
else
{
- mpData->mbModified = TRUE;
+ mpData->mbModified = sal_True;
}
// Gruppen auf ungluetig setzen
@@ -903,14 +903,14 @@ void Config::DeleteGroup( const ByteString& rGroup )
// -----------------------------------------------------------------------
-ByteString Config::GetGroupName( USHORT nGroup ) const
+ByteString Config::GetGroupName( sal_uInt16 nGroup ) const
{
// Config-Daten evt. updaten
if ( !mnLockCount )
ImplUpdateConfig();
ImplGroupData* pGroup = mpData->mpFirstGroup;
- USHORT nGroupCount = 0;
+ sal_uInt16 nGroupCount = 0;
ByteString aGroupName;
while ( pGroup )
{
@@ -929,14 +929,14 @@ ByteString Config::GetGroupName( USHORT nGroup ) const
// -----------------------------------------------------------------------
-USHORT Config::GetGroupCount() const
+sal_uInt16 Config::GetGroupCount() const
{
// Config-Daten evt. updaten
if ( !mnLockCount )
ImplUpdateConfig();
ImplGroupData* pGroup = mpData->mpFirstGroup;
- USHORT nGroupCount = 0;
+ sal_uInt16 nGroupCount = 0;
while ( pGroup )
{
nGroupCount++;
@@ -948,20 +948,20 @@ USHORT Config::GetGroupCount() const
// -----------------------------------------------------------------------
-BOOL Config::HasGroup( const ByteString& rGroup ) const
+sal_Bool Config::HasGroup( const ByteString& rGroup ) const
{
// Config-Daten evt. updaten
if ( !mnLockCount )
ImplUpdateConfig();
ImplGroupData* pGroup = mpData->mpFirstGroup;
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
while( pGroup )
{
if( pGroup->maGroupName.EqualsIgnoreCaseAscii( rGroup ) )
{
- bRet = TRUE;
+ bRet = sal_True;
break;
}
@@ -1043,7 +1043,7 @@ void Config::WriteKey( const ByteString& rKey, const ByteString& rStr )
if ( !mnLockCount || !mpData->mbRead )
{
ImplUpdateConfig();
- mpData->mbRead = TRUE;
+ mpData->mbRead = sal_True;
}
// Key suchen und Value setzen
@@ -1061,18 +1061,18 @@ void Config::WriteKey( const ByteString& rKey, const ByteString& rStr )
pKey = pKey->mpNext;
}
- BOOL bNewValue;
+ sal_Bool bNewValue;
if ( !pKey )
{
pKey = new ImplKeyData;
pKey->mpNext = NULL;
pKey->maKey = rKey;
- pKey->mbIsComment = FALSE;
+ pKey->mbIsComment = sal_False;
if ( pPrevKey )
pPrevKey->mpNext = pKey;
else
pGroup->mpFirstKey = pKey;
- bNewValue = TRUE;
+ bNewValue = sal_True;
}
else
bNewValue = pKey->maValue != rStr;
@@ -1085,7 +1085,7 @@ void Config::WriteKey( const ByteString& rKey, const ByteString& rStr )
ImplWriteConfig( mpData );
else
{
- mpData->mbModified = TRUE;
+ mpData->mbModified = sal_True;
}
}
}
@@ -1108,7 +1108,7 @@ void Config::DeleteKey( const ByteString& rKey )
if ( !mnLockCount || !mpData->mbRead )
{
ImplUpdateConfig();
- mpData->mbRead = TRUE;
+ mpData->mbRead = sal_True;
}
// Key suchen und Value setzen
@@ -1140,7 +1140,7 @@ void Config::DeleteKey( const ByteString& rKey )
ImplWriteConfig( mpData );
else
{
- mpData->mbModified = TRUE;
+ mpData->mbModified = sal_True;
}
}
}
@@ -1148,7 +1148,7 @@ void Config::DeleteKey( const ByteString& rKey )
// -----------------------------------------------------------------------
-USHORT Config::GetKeyCount() const
+sal_uInt16 Config::GetKeyCount() const
{
#ifdef DBG_UTIL
ByteString aTraceStr( "Config::GetKeyCount()" );
@@ -1164,7 +1164,7 @@ USHORT Config::GetKeyCount() const
ImplUpdateConfig();
// Key suchen und Value zurueckgeben
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
ImplGroupData* pGroup = ImplGetGroup();
if ( pGroup )
{
@@ -1183,7 +1183,7 @@ USHORT Config::GetKeyCount() const
// -----------------------------------------------------------------------
-ByteString Config::GetKeyName( USHORT nKey ) const
+ByteString Config::GetKeyName( sal_uInt16 nKey ) const
{
#ifdef DBG_UTIL
ByteString aTraceStr( "Config::GetKeyName( " );
@@ -1218,7 +1218,7 @@ ByteString Config::GetKeyName( USHORT nKey ) const
// -----------------------------------------------------------------------
-ByteString Config::ReadKey( USHORT nKey ) const
+ByteString Config::ReadKey( sal_uInt16 nKey ) const
{
#ifdef DBG_UTIL
ByteString aTraceStr( "Config::ReadKey( " );
@@ -1275,7 +1275,7 @@ void Config::LeaveLock()
// -----------------------------------------------------------------------
-BOOL Config::Update()
+sal_Bool Config::Update()
{
return ImplUpdateConfig();
}
diff --git a/tools/source/generic/fract.cxx b/tools/source/generic/fract.cxx
index 0b8231d620ce..8481fef32e05 100644
--- a/tools/source/generic/fract.cxx
+++ b/tools/source/generic/fract.cxx
@@ -634,10 +634,10 @@ void Fraction::ReduceInaccurate( unsigned nSignificantBits )
|*
*************************************************************************/
-BOOL operator == ( const Fraction& rVal1, const Fraction& rVal2 )
+sal_Bool operator == ( const Fraction& rVal1, const Fraction& rVal2 )
{
if ( !rVal1.IsValid() || !rVal2.IsValid() )
- return FALSE;
+ return sal_False;
return rVal1.nNumerator == rVal2.nNumerator
&& rVal1.nDenominator == rVal2.nDenominator;
@@ -660,10 +660,10 @@ BOOL operator == ( const Fraction& rVal1, const Fraction& rVal2 )
// und (c*b) zu vergleichen. Das Ergebnis dieses Vergleichs wird
// zurueckgegeben.
-BOOL operator < ( const Fraction& rVal1, const Fraction& rVal2 )
+sal_Bool operator < ( const Fraction& rVal1, const Fraction& rVal2 )
{
if ( !rVal1.IsValid() || !rVal2.IsValid() )
- return FALSE;
+ return sal_False;
BigInt nN( rVal1.nNumerator );
nN *= BigInt( rVal2.nDenominator );
@@ -690,10 +690,10 @@ BOOL operator < ( const Fraction& rVal1, const Fraction& rVal2 )
// und (c*b) zu vergleichen. Das Ergebnis dieses Vergleichs wird
// zurueckgegeben.
-BOOL operator > ( const Fraction& rVal1, const Fraction& rVal2 )
+sal_Bool operator > ( const Fraction& rVal1, const Fraction& rVal2 )
{
if ( !rVal1.IsValid() || !rVal2.IsValid() )
- return FALSE;
+ return sal_False;
BigInt nN( rVal1.nNumerator );
nN *= BigInt( rVal2.nDenominator );
diff --git a/tools/source/generic/gen.cxx b/tools/source/generic/gen.cxx
index b0eb57f1ab73..e4ef3ed58c82 100644
--- a/tools/source/generic/gen.cxx
+++ b/tools/source/generic/gen.cxx
@@ -44,7 +44,7 @@ SvStream& operator>>( SvStream& rIStream, Pair& rPair )
int i;
int i1;
int i2;
- UINT32 nNum;
+ sal_uInt32 nNum;
rIStream >> cId;
i1 = (cId & 0x70) >> 4;
@@ -61,7 +61,7 @@ SvStream& operator>>( SvStream& rIStream, Pair& rPair )
}
if ( cId & 0x80 )
nNum ^= 0xFFFFFFFF;
- rPair.nA = (INT32)nNum;
+ rPair.nA = (sal_Int32)nNum;
nNum = 0;
i = i1+i2;
@@ -73,7 +73,7 @@ SvStream& operator>>( SvStream& rIStream, Pair& rPair )
}
if ( cId & 0x08 )
nNum ^= 0xFFFFFFFF;
- rPair.nB = (INT32)nNum;
+ rPair.nB = (sal_Int32)nNum;
}
else
{
@@ -93,11 +93,11 @@ SvStream& operator<<( SvStream& rOStream, const Pair& rPair )
{
unsigned char cAry[9];
int i = 1;
- UINT32 nNum;
+ sal_uInt32 nNum;
cAry[0] = 0;
- nNum = (UINT32)(INT32)rPair.nA;
+ nNum = (sal_uInt32)(sal_Int32)rPair.nA;
if ( rPair.nA < 0 )
{
cAry[0] |= 0x80;
@@ -138,7 +138,7 @@ SvStream& operator<<( SvStream& rOStream, const Pair& rPair )
cAry[0] |= 0x10;
}
- nNum = (UINT32)(INT32)rPair.nB;
+ nNum = (sal_uInt32)(sal_Int32)rPair.nB;
if ( rPair.nB < 0 )
{
cAry[0] |= 0x08;
@@ -323,31 +323,31 @@ void Rectangle::Justify()
|*
*************************************************************************/
-BOOL Rectangle::IsInside( const Point& rPoint ) const
+sal_Bool Rectangle::IsInside( const Point& rPoint ) const
{
if ( IsEmpty() )
- return FALSE;
+ return sal_False;
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if ( nLeft <= nRight )
{
if ( (rPoint.X() < nLeft) || (rPoint.X() > nRight) )
- bRet = FALSE;
+ bRet = sal_False;
}
else
{
if ( (rPoint.X() > nLeft) || (rPoint.X() < nRight) )
- bRet = FALSE;
+ bRet = sal_False;
}
if ( nTop <= nBottom )
{
if ( (rPoint.Y() < nTop) || (rPoint.Y() > nBottom) )
- bRet = FALSE;
+ bRet = sal_False;
}
else
{
if ( (rPoint.Y() > nTop) || (rPoint.Y() < nBottom) )
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
@@ -362,12 +362,12 @@ BOOL Rectangle::IsInside( const Point& rPoint ) const
|*
*************************************************************************/
-BOOL Rectangle::IsInside( const Rectangle& rRect ) const
+sal_Bool Rectangle::IsInside( const Rectangle& rRect ) const
{
if ( IsInside( rRect.TopLeft() ) && IsInside( rRect.BottomRight() ) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -380,7 +380,7 @@ BOOL Rectangle::IsInside( const Rectangle& rRect ) const
|*
*************************************************************************/
-BOOL Rectangle::IsOver( const Rectangle& rRect ) const
+sal_Bool Rectangle::IsOver( const Rectangle& rRect ) const
{
// Wenn sie sich nicht schneiden, ueberlappen sie auch nicht
return !GetIntersection( rRect ).IsEmpty();
@@ -402,7 +402,7 @@ SvStream& operator>>( SvStream& rIStream, Rectangle& rRect )
int i2;
int i3;
int i4;
- UINT32 nNum;
+ sal_uInt32 nNum;
rIStream.Read( cIdAry, 2 );
i1 = (cIdAry[0] & 0x70) >> 4;
@@ -423,7 +423,7 @@ SvStream& operator>>( SvStream& rIStream, Rectangle& rRect )
iLast = i1;
if ( cIdAry[0] & 0x80 )
nNum ^= 0xFFFFFFFF;
- rRect.nLeft = (INT32)nNum;
+ rRect.nLeft = (sal_Int32)nNum;
nNum = 0;
i = iLast+i2;
@@ -436,7 +436,7 @@ SvStream& operator>>( SvStream& rIStream, Rectangle& rRect )
iLast += i2;
if ( cIdAry[0] & 0x08 )
nNum ^= 0xFFFFFFFF;
- rRect.nTop = (INT32)nNum;
+ rRect.nTop = (sal_Int32)nNum;
nNum = 0;
i = iLast+i3;
@@ -449,7 +449,7 @@ SvStream& operator>>( SvStream& rIStream, Rectangle& rRect )
iLast += i3;
if ( cIdAry[1] & 0x80 )
nNum ^= 0xFFFFFFFF;
- rRect.nRight = (INT32)nNum;
+ rRect.nRight = (sal_Int32)nNum;
nNum = 0;
i = iLast+i4;
@@ -461,7 +461,7 @@ SvStream& operator>>( SvStream& rIStream, Rectangle& rRect )
}
if ( cIdAry[1] & 0x08 )
nNum ^= 0xFFFFFFFF;
- rRect.nBottom = (INT32)nNum;
+ rRect.nBottom = (sal_Int32)nNum;
}
else
{
@@ -481,12 +481,12 @@ SvStream& operator<<( SvStream& rOStream, const Rectangle& rRect )
{
unsigned char cAry[18];
int i = 2;
- UINT32 nNum;
+ sal_uInt32 nNum;
cAry[0] = 0;
cAry[1] = 0;
- nNum = (UINT32)(INT32)rRect.nLeft;
+ nNum = (sal_uInt32)(sal_Int32)rRect.nLeft;
if ( rRect.nLeft < 0 )
{
cAry[0] |= 0x80;
@@ -527,7 +527,7 @@ SvStream& operator<<( SvStream& rOStream, const Rectangle& rRect )
cAry[0] |= 0x10;
}
- nNum = (UINT32)(INT32)rRect.nTop;
+ nNum = (sal_uInt32)(sal_Int32)rRect.nTop;
if ( rRect.nTop < 0 )
{
cAry[0] |= 0x08;
@@ -568,7 +568,7 @@ SvStream& operator<<( SvStream& rOStream, const Rectangle& rRect )
cAry[0] |= 0x01;
}
- nNum = (UINT32)(INT32)rRect.nRight;
+ nNum = (sal_uInt32)(sal_Int32)rRect.nRight;
if ( rRect.nRight < 0 )
{
cAry[1] |= 0x80;
@@ -609,7 +609,7 @@ SvStream& operator<<( SvStream& rOStream, const Rectangle& rRect )
cAry[1] |= 0x10;
}
- nNum = (UINT32)(INT32)rRect.nBottom;
+ nNum = (sal_uInt32)(sal_Int32)rRect.nBottom;
if ( rRect.nBottom < 0 )
{
cAry[1] |= 0x08;
diff --git a/tools/source/generic/line.cxx b/tools/source/generic/line.cxx
index 0c2de98d843d..ea3b92ad9005 100644
--- a/tools/source/generic/line.cxx
+++ b/tools/source/generic/line.cxx
@@ -47,50 +47,50 @@ double Line::GetLength() const
// ------------------------------------------------------------------------
-BOOL Line::Intersection( const Line& rLine, Point& rIntersection ) const
+sal_Bool Line::Intersection( const Line& rLine, Point& rIntersection ) const
{
double fX, fY;
- BOOL bRet;
+ sal_Bool bRet;
if( Intersection( rLine, fX, fY ) )
{
rIntersection.X() = FRound( fX );
rIntersection.Y() = FRound( fY );
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
// ------------------------------------------------------------------------
-BOOL Line::Intersection( const Line& rLine, double& rIntersectionX, double& rIntersectionY ) const
+sal_Bool Line::Intersection( const Line& rLine, double& rIntersectionX, double& rIntersectionY ) const
{
const double fAx = maEnd.X() - maStart.X();
const double fAy = maEnd.Y() - maStart.Y();
const double fBx = rLine.maStart.X() - rLine.maEnd.X();
const double fBy = rLine.maStart.Y() - rLine.maEnd.Y();
const double fDen = fAy * fBx - fAx * fBy;
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
if( fDen != 0. )
{
const double fCx = maStart.X() - rLine.maStart.X();
const double fCy = maStart.Y() - rLine.maStart.Y();
const double fA = fBy * fCx - fBx * fCy;
- const BOOL bGreater = ( fDen > 0. );
+ const sal_Bool bGreater = ( fDen > 0. );
- bOk = TRUE;
+ bOk = sal_True;
if ( bGreater )
{
if ( ( fA < 0. ) || ( fA > fDen ) )
- bOk = FALSE;
+ bOk = sal_False;
}
else if ( ( fA > 0. ) || ( fA < fDen ) )
- bOk = FALSE;
+ bOk = sal_False;
if ( bOk )
{
@@ -99,10 +99,10 @@ BOOL Line::Intersection( const Line& rLine, double& rIntersectionX, double& rInt
if ( bGreater )
{
if ( ( fB < 0. ) || ( fB > fDen ) )
- bOk = FALSE;
+ bOk = sal_False;
}
else if ( ( fB > 0. ) || ( fB < fDen ) )
- bOk = FALSE;
+ bOk = sal_False;
if( bOk )
{
@@ -119,11 +119,11 @@ BOOL Line::Intersection( const Line& rLine, double& rIntersectionX, double& rInt
// ------------------------------------------------------------------------
-BOOL Line::Intersection( const Rectangle& rRect, Line& rIntersection ) const
+sal_Bool Line::Intersection( const Rectangle& rRect, Line& rIntersection ) const
{
- const BOOL bStartInside = rRect.IsInside( maStart );
- const BOOL bEndInside = rRect.IsInside( maEnd );
- BOOL bRet = TRUE;
+ const sal_Bool bStartInside = rRect.IsInside( maStart );
+ const sal_Bool bEndInside = rRect.IsInside( maEnd );
+ sal_Bool bRet = sal_True;
if( bStartInside && bEndInside )
{
@@ -170,7 +170,7 @@ BOOL Line::Intersection( const Rectangle& rRect, Line& rIntersection ) const
rIntersection.maEnd = rIntersection.maStart;
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
diff --git a/tools/source/generic/link.cxx b/tools/source/generic/link.cxx
index 928251306901..2d485a5036c4 100644
--- a/tools/source/generic/link.cxx
+++ b/tools/source/generic/link.cxx
@@ -39,20 +39,20 @@
|*
*************************************************************************/
-BOOL Link::operator==( const Link& rLink ) const
+sal_Bool Link::operator==( const Link& rLink ) const
{
if ( pFunc == rLink.pFunc )
{
if ( pFunc )
{
if ( pInst == rLink.pInst )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
else
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index e9f98b07adbd..73e89c73900f 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -80,19 +80,19 @@ static ImplPolygonData aStaticImplPolygon =
// =======================================================================
-ImplPolygon::ImplPolygon( USHORT nInitSize, BOOL bFlags )
+ImplPolygon::ImplPolygon( sal_uInt16 nInitSize, sal_Bool bFlags )
{
if ( nInitSize )
{
- mpPointAry = (Point*)new char[(ULONG)nInitSize*sizeof(Point)];
- memset( mpPointAry, 0, (ULONG)nInitSize*sizeof(Point) );
+ mpPointAry = (Point*)new char[(sal_uIntPtr)nInitSize*sizeof(Point)];
+ memset( mpPointAry, 0, (sal_uIntPtr)nInitSize*sizeof(Point) );
}
else
mpPointAry = NULL;
if( bFlags )
{
- mpFlagAry = new BYTE[ nInitSize ];
+ mpFlagAry = new sal_uInt8[ nInitSize ];
memset( mpPointAry, 0, nInitSize );
}
else
@@ -108,12 +108,12 @@ ImplPolygon::ImplPolygon( const ImplPolygon& rImpPoly )
{
if ( rImpPoly.mnPoints )
{
- mpPointAry = (Point*)new char[(ULONG)rImpPoly.mnPoints*sizeof(Point)];
- memcpy( mpPointAry, rImpPoly.mpPointAry, (ULONG)rImpPoly.mnPoints*sizeof(Point) );
+ mpPointAry = (Point*)new char[(sal_uIntPtr)rImpPoly.mnPoints*sizeof(Point)];
+ memcpy( mpPointAry, rImpPoly.mpPointAry, (sal_uIntPtr)rImpPoly.mnPoints*sizeof(Point) );
if( rImpPoly.mpFlagAry )
{
- mpFlagAry = new BYTE[ rImpPoly.mnPoints ];
+ mpFlagAry = new sal_uInt8[ rImpPoly.mnPoints ];
memcpy( mpFlagAry, rImpPoly.mpFlagAry, rImpPoly.mnPoints );
}
else
@@ -131,16 +131,16 @@ ImplPolygon::ImplPolygon( const ImplPolygon& rImpPoly )
// -----------------------------------------------------------------------
-ImplPolygon::ImplPolygon( USHORT nInitSize, const Point* pInitAry, const BYTE* pInitFlags )
+ImplPolygon::ImplPolygon( sal_uInt16 nInitSize, const Point* pInitAry, const sal_uInt8* pInitFlags )
{
if ( nInitSize )
{
- mpPointAry = (Point*)new char[(ULONG)nInitSize*sizeof(Point)];
- memcpy( mpPointAry, pInitAry, (ULONG)nInitSize*sizeof( Point ) );
+ mpPointAry = (Point*)new char[(sal_uIntPtr)nInitSize*sizeof(Point)];
+ memcpy( mpPointAry, pInitAry, (sal_uIntPtr)nInitSize*sizeof( Point ) );
if( pInitFlags )
{
- mpFlagAry = new BYTE[ nInitSize ];
+ mpFlagAry = new sal_uInt8[ nInitSize ];
memcpy( mpFlagAry, pInitFlags, nInitSize );
}
else
@@ -171,7 +171,7 @@ ImplPolygon::~ImplPolygon()
// -----------------------------------------------------------------------
-void ImplPolygon::ImplSetSize( USHORT nNewSize, BOOL bResize )
+void ImplPolygon::ImplSetSize( sal_uInt16 nNewSize, sal_Bool bResize )
{
if( mnPoints == nNewSize )
return;
@@ -180,7 +180,7 @@ void ImplPolygon::ImplSetSize( USHORT nNewSize, BOOL bResize )
if ( nNewSize )
{
- pNewAry = (Point*)new char[(ULONG)nNewSize*sizeof(Point)];
+ pNewAry = (Point*)new char[(sal_uIntPtr)nNewSize*sizeof(Point)];
if ( bResize )
{
@@ -188,14 +188,14 @@ void ImplPolygon::ImplSetSize( USHORT nNewSize, BOOL bResize )
if ( mnPoints < nNewSize )
{
// Neue Punkte mit 0 initialisieren
- memset( pNewAry+mnPoints, 0, (ULONG)(nNewSize-mnPoints)*sizeof(Point) );
+ memset( pNewAry+mnPoints, 0, (sal_uIntPtr)(nNewSize-mnPoints)*sizeof(Point) );
if ( mpPointAry )
memcpy( pNewAry, mpPointAry, mnPoints*sizeof(Point) );
}
else
{
if ( mpPointAry )
- memcpy( pNewAry, mpPointAry, (ULONG)nNewSize*sizeof(Point) );
+ memcpy( pNewAry, mpPointAry, (sal_uIntPtr)nNewSize*sizeof(Point) );
}
}
}
@@ -208,11 +208,11 @@ void ImplPolygon::ImplSetSize( USHORT nNewSize, BOOL bResize )
// ggf. FlagArray beruecksichtigen
if( mpFlagAry )
{
- BYTE* pNewFlagAry;
+ sal_uInt8* pNewFlagAry;
if( nNewSize )
{
- pNewFlagAry = new BYTE[ nNewSize ];
+ pNewFlagAry = new sal_uInt8[ nNewSize ];
if( bResize )
{
@@ -240,21 +240,21 @@ void ImplPolygon::ImplSetSize( USHORT nNewSize, BOOL bResize )
// -----------------------------------------------------------------------
-void ImplPolygon::ImplSplit( USHORT nPos, USHORT nSpace, ImplPolygon* pInitPoly )
+void ImplPolygon::ImplSplit( sal_uInt16 nPos, sal_uInt16 nSpace, ImplPolygon* pInitPoly )
{
- const ULONG nSpaceSize = nSpace * sizeof( Point );
+ const sal_uIntPtr nSpaceSize = nSpace * sizeof( Point );
//Can't fit this in :-(, throw ?
if (mnPoints + nSpace > USHRT_MAX)
return;
- const USHORT nNewSize = mnPoints + nSpace;
+ const sal_uInt16 nNewSize = mnPoints + nSpace;
if( nPos >= mnPoints )
{
// Hinten anhaengen
nPos = mnPoints;
- ImplSetSize( nNewSize, TRUE );
+ ImplSetSize( nNewSize, sal_True );
if( pInitPoly )
{
@@ -267,10 +267,10 @@ void ImplPolygon::ImplSplit( USHORT nPos, USHORT nSpace, ImplPolygon* pInitPoly
else
{
// PointArray ist in diesem Zweig immer vorhanden
- const USHORT nSecPos = nPos + nSpace;
- const USHORT nRest = mnPoints - nPos;
+ const sal_uInt16 nSecPos = nPos + nSpace;
+ const sal_uInt16 nRest = mnPoints - nPos;
- Point* pNewAry = (Point*) new char[ (ULONG) nNewSize * sizeof( Point ) ];
+ Point* pNewAry = (Point*) new char[ (sal_uIntPtr) nNewSize * sizeof( Point ) ];
memcpy( pNewAry, mpPointAry, nPos * sizeof( Point ) );
@@ -285,7 +285,7 @@ void ImplPolygon::ImplSplit( USHORT nPos, USHORT nSpace, ImplPolygon* pInitPoly
// ggf. FlagArray beruecksichtigen
if( mpFlagAry )
{
- BYTE* pNewFlagAry = new BYTE[ nNewSize ];
+ sal_uInt8* pNewFlagAry = new sal_uInt8[ nNewSize ];
memcpy( pNewFlagAry, mpFlagAry, nPos );
@@ -306,17 +306,17 @@ void ImplPolygon::ImplSplit( USHORT nPos, USHORT nSpace, ImplPolygon* pInitPoly
// -----------------------------------------------------------------------
-void ImplPolygon::ImplRemove( USHORT nPos, USHORT nCount )
+void ImplPolygon::ImplRemove( sal_uInt16 nPos, sal_uInt16 nCount )
{
- const USHORT nRemoveCount = Min( (USHORT) ( mnPoints - nPos ), (USHORT) nCount );
+ const sal_uInt16 nRemoveCount = Min( (sal_uInt16) ( mnPoints - nPos ), (sal_uInt16) nCount );
if( nRemoveCount )
{
- const USHORT nNewSize = mnPoints - nRemoveCount;
- const USHORT nSecPos = nPos + nRemoveCount;
- const USHORT nRest = mnPoints - nSecPos;
+ const sal_uInt16 nNewSize = mnPoints - nRemoveCount;
+ const sal_uInt16 nSecPos = nPos + nRemoveCount;
+ const sal_uInt16 nRest = mnPoints - nSecPos;
- Point* pNewAry = (Point*) new char[ (ULONG) nNewSize * sizeof( Point ) ];
+ Point* pNewAry = (Point*) new char[ (sal_uIntPtr) nNewSize * sizeof( Point ) ];
memcpy( pNewAry, mpPointAry, nPos * sizeof( Point ) );
memcpy( pNewAry + nPos, mpPointAry + nSecPos, nRest * sizeof( Point ) );
@@ -326,7 +326,7 @@ void ImplPolygon::ImplRemove( USHORT nPos, USHORT nCount )
// ggf. FlagArray beruecksichtigen
if( mpFlagAry )
{
- BYTE* pNewFlagAry = new BYTE[ nNewSize ];
+ sal_uInt8* pNewFlagAry = new sal_uInt8[ nNewSize ];
memcpy( pNewFlagAry, mpFlagAry, nPos );
memcpy( pNewFlagAry + nPos, mpFlagAry + nSecPos, nRest );
@@ -345,7 +345,7 @@ void ImplPolygon::ImplCreateFlagArray()
{
if( !mpFlagAry )
{
- mpFlagAry = new BYTE[ mnPoints ];
+ mpFlagAry = new sal_uInt8[ mnPoints ];
memset( mpFlagAry, 0, mnPoints );
}
}
@@ -381,7 +381,7 @@ Polygon::Polygon()
// -----------------------------------------------------------------------
-Polygon::Polygon( USHORT nSize )
+Polygon::Polygon( sal_uInt16 nSize )
{
DBG_CTOR( Polygon, NULL );
@@ -393,7 +393,7 @@ Polygon::Polygon( USHORT nSize )
// -----------------------------------------------------------------------
-Polygon::Polygon( USHORT nPoints, const Point* pPtAry, const BYTE* pFlagAry )
+Polygon::Polygon( sal_uInt16 nPoints, const Point* pPtAry, const sal_uInt8* pFlagAry )
{
DBG_CTOR( Polygon, NULL );
@@ -437,7 +437,7 @@ Polygon::Polygon( const Rectangle& rRect )
// -----------------------------------------------------------------------
-Polygon::Polygon( const Rectangle& rRect, ULONG nHorzRound, ULONG nVertRound )
+Polygon::Polygon( const Rectangle& rRect, sal_uIntPtr nHorzRound, sal_uIntPtr nVertRound )
{
DBG_CTOR( Polygon, NULL );
@@ -448,8 +448,8 @@ Polygon::Polygon( const Rectangle& rRect, ULONG nHorzRound, ULONG nVertRound )
Rectangle aRect( rRect );
aRect.Justify(); // SJ: i9140
- nHorzRound = Min( nHorzRound, (ULONG) labs( aRect.GetWidth() >> 1 ) );
- nVertRound = Min( nVertRound, (ULONG) labs( aRect.GetHeight() >> 1 ) );
+ nHorzRound = Min( nHorzRound, (sal_uIntPtr) labs( aRect.GetWidth() >> 1 ) );
+ nVertRound = Min( nVertRound, (sal_uIntPtr) labs( aRect.GetHeight() >> 1 ) );
if( !nHorzRound && !nVertRound )
{
@@ -467,7 +467,7 @@ Polygon::Polygon( const Rectangle& rRect, ULONG nHorzRound, ULONG nVertRound )
const Point aBR( aRect.Right() - nHorzRound, aRect.Bottom() - nVertRound );
const Point aBL( aRect.Left() + nHorzRound, aRect.Bottom() - nVertRound );
Polygon* pEllipsePoly = new Polygon( Point(), nHorzRound, nVertRound );
- USHORT i, nEnd, nSize4 = pEllipsePoly->GetSize() >> 2;
+ sal_uInt16 i, nEnd, nSize4 = pEllipsePoly->GetSize() >> 2;
mpImplPolygon = new ImplPolygon( pEllipsePoly->GetSize() + 1 );
@@ -494,7 +494,7 @@ Polygon::Polygon( const Rectangle& rRect, ULONG nHorzRound, ULONG nVertRound )
// -----------------------------------------------------------------------
-Polygon::Polygon( const Point& rCenter, long nRadX, long nRadY, USHORT nPoints )
+Polygon::Polygon( const Point& rCenter, long nRadX, long nRadY, sal_uInt16 nPoints )
{
DBG_CTOR( Polygon, NULL );
@@ -503,10 +503,10 @@ Polygon::Polygon( const Point& rCenter, long nRadX, long nRadY, USHORT nPoints )
// Default berechnen (abhaengig von Groesse)
if( !nPoints )
{
- nPoints = (USHORT) ( F_PI * ( 1.5 * ( nRadX + nRadY ) -
+ nPoints = (sal_uInt16) ( F_PI * ( 1.5 * ( nRadX + nRadY ) -
sqrt( (double) labs( nRadX * nRadY ) ) ) );
- nPoints = (USHORT) MinMax( nPoints, 32, 256 );
+ nPoints = (sal_uInt16) MinMax( nPoints, 32, 256 );
if( ( nRadX > 32 ) && ( nRadY > 32 ) && ( nRadX + nRadY ) < 8192 )
nPoints >>= 1;
@@ -516,9 +516,9 @@ Polygon::Polygon( const Point& rCenter, long nRadX, long nRadY, USHORT nPoints )
mpImplPolygon = new ImplPolygon( nPoints = (nPoints + 3) & ~3 );
Point* pPt;
- USHORT i;
- USHORT nPoints2 = nPoints >> 1;
- USHORT nPoints4 = nPoints >> 2;
+ sal_uInt16 i;
+ sal_uInt16 nPoints2 = nPoints >> 1;
+ sal_uInt16 nPoints4 = nPoints >> 2;
double nAngle;
double nAngleStep = F_PI2 / ( nPoints4 - 1 );
@@ -560,12 +560,12 @@ Polygon::Polygon( const Rectangle& rBound,
const Point aCenter( rBound.Center() );
const long nRadX = aCenter.X() - rBound.Left();
const long nRadY = aCenter.Y() - rBound.Top();
- USHORT nPoints;
+ sal_uInt16 nPoints;
- nPoints = (USHORT) ( F_PI * ( 1.5 * ( nRadX + nRadY ) -
+ nPoints = (sal_uInt16) ( F_PI * ( 1.5 * ( nRadX + nRadY ) -
sqrt( (double) labs( nRadX * nRadY ) ) ) );
- nPoints = (USHORT) MinMax( nPoints, 32, 256 );
+ nPoints = (sal_uInt16) MinMax( nPoints, 32, 256 );
if( ( nRadX > 32 ) && ( nRadY > 32 ) && ( nRadX + nRadY ) < 8192 )
nPoints >>= 1;
@@ -579,8 +579,8 @@ Polygon::Polygon( const Rectangle& rBound,
double fEnd = ImplGetAngle( aCenter, rEnd );
double fDiff = fEnd - fStart;
double fStep;
- USHORT nStart;
- USHORT nEnd;
+ sal_uInt16 nStart;
+ sal_uInt16 nEnd;
if( fDiff < 0. )
fDiff += F_2PI;
@@ -588,7 +588,7 @@ Polygon::Polygon( const Rectangle& rBound,
// Punktanzahl proportional verkleinern ( fDiff / (2PI) );
// ist eingentlich nur fuer einen Kreis richtig; wir
// machen es hier aber trotzdem
- nPoints = Max( (USHORT) ( ( fDiff * 0.1591549 ) * nPoints ), (USHORT) 16 );
+ nPoints = Max( (sal_uInt16) ( ( fDiff * 0.1591549 ) * nPoints ), (sal_uInt16) 16 );
fStep = fDiff / ( nPoints - 1 );
if( POLY_PIE == eStyle )
@@ -627,7 +627,7 @@ Polygon::Polygon( const Rectangle& rBound,
Polygon::Polygon( const Point& rBezPt1, const Point& rCtrlPt1,
const Point& rBezPt2, const Point& rCtrlPt2,
- USHORT nPoints )
+ sal_uInt16 nPoints )
{
DBG_CTOR( Polygon, NULL );
@@ -647,7 +647,7 @@ Polygon::Polygon( const Point& rBezPt1, const Point& rCtrlPt1,
mpImplPolygon = new ImplPolygon( nPoints );
- for( USHORT i = 0; i < nPoints; i++, fK_1 += fInc, fK1_1 -= fInc )
+ for( sal_uInt16 i = 0; i < nPoints; i++, fK_1 += fInc, fK1_1 -= fInc )
{
Point& rPt = mpImplPolygon->mpPointAry[ i ];
@@ -689,7 +689,7 @@ Point* Polygon::ImplGetPointAry()
// -----------------------------------------------------------------------
-BYTE* Polygon::ImplGetFlagAry()
+sal_uInt8* Polygon::ImplGetFlagAry()
{
DBG_CHKTHIS( Polygon, NULL );
@@ -708,7 +708,7 @@ const Point* Polygon::GetConstPointAry() const
// -----------------------------------------------------------------------
-const BYTE* Polygon::GetConstFlagAry() const
+const sal_uInt8* Polygon::GetConstFlagAry() const
{
DBG_CHKTHIS( Polygon, NULL );
return mpImplPolygon->mpFlagAry;
@@ -716,7 +716,7 @@ const BYTE* Polygon::GetConstFlagAry() const
// -----------------------------------------------------------------------
-void Polygon::SetPoint( const Point& rPt, USHORT nPos )
+void Polygon::SetPoint( const Point& rPt, sal_uInt16 nPos )
{
DBG_CHKTHIS( Polygon, NULL );
DBG_ASSERT( nPos < mpImplPolygon->mnPoints,
@@ -728,7 +728,7 @@ void Polygon::SetPoint( const Point& rPt, USHORT nPos )
// -----------------------------------------------------------------------
-void Polygon::SetFlags( USHORT nPos, PolyFlags eFlags )
+void Polygon::SetFlags( sal_uInt16 nPos, PolyFlags eFlags )
{
DBG_CHKTHIS( Polygon, NULL );
DBG_ASSERT( nPos < mpImplPolygon->mnPoints,
@@ -740,13 +740,13 @@ void Polygon::SetFlags( USHORT nPos, PolyFlags eFlags )
{
ImplMakeUnique();
mpImplPolygon->ImplCreateFlagArray();
- mpImplPolygon->mpFlagAry[ nPos ] = (BYTE) eFlags;
+ mpImplPolygon->mpFlagAry[ nPos ] = (sal_uInt8) eFlags;
}
}
// -----------------------------------------------------------------------
-const Point& Polygon::GetPoint( USHORT nPos ) const
+const Point& Polygon::GetPoint( sal_uInt16 nPos ) const
{
DBG_CHKTHIS( Polygon, NULL );
DBG_ASSERT( nPos < mpImplPolygon->mnPoints,
@@ -757,7 +757,7 @@ const Point& Polygon::GetPoint( USHORT nPos ) const
// -----------------------------------------------------------------------
-PolyFlags Polygon::GetFlags( USHORT nPos ) const
+PolyFlags Polygon::GetFlags( sal_uInt16 nPos ) const
{
DBG_CHKTHIS( Polygon, NULL );
DBG_ASSERT( nPos < mpImplPolygon->mnPoints,
@@ -776,7 +776,7 @@ sal_Bool Polygon::HasFlags() const
// -----------------------------------------------------------------------
-BOOL Polygon::IsControl(USHORT nPos) const
+sal_Bool Polygon::IsControl(sal_uInt16 nPos) const
{
DBG_CHKTHIS( Polygon, NULL );
DBG_ASSERT( nPos < mpImplPolygon->mnPoints,
@@ -789,7 +789,7 @@ BOOL Polygon::IsControl(USHORT nPos) const
// -----------------------------------------------------------------------
-BOOL Polygon::IsSmooth(USHORT nPos) const
+sal_Bool Polygon::IsSmooth(sal_uInt16 nPos) const
{
DBG_CHKTHIS( Polygon, NULL );
DBG_ASSERT( nPos < mpImplPolygon->mnPoints,
@@ -802,9 +802,9 @@ BOOL Polygon::IsSmooth(USHORT nPos) const
// -----------------------------------------------------------------------
-BOOL Polygon::IsRect() const
+sal_Bool Polygon::IsRect() const
{
- BOOL bIsRect = FALSE;
+ sal_Bool bIsRect = sal_False;
if ( mpImplPolygon->mpFlagAry == NULL )
{
if ( ( ( mpImplPolygon->mnPoints == 5 ) && ( mpImplPolygon->mpPointAry[ 0 ] == mpImplPolygon->mpPointAry[ 4 ] ) ) ||
@@ -814,7 +814,7 @@ BOOL Polygon::IsRect() const
( mpImplPolygon->mpPointAry[ 0 ].Y() == mpImplPolygon->mpPointAry[ 1 ].Y() ) &&
( mpImplPolygon->mpPointAry[ 1 ].X() == mpImplPolygon->mpPointAry[ 2 ].X() ) &&
( mpImplPolygon->mpPointAry[ 2 ].Y() == mpImplPolygon->mpPointAry[ 3 ].Y() ) )
- bIsRect = TRUE;
+ bIsRect = sal_True;
}
}
return bIsRect;
@@ -822,7 +822,7 @@ BOOL Polygon::IsRect() const
// -----------------------------------------------------------------------
-void Polygon::SetSize( USHORT nNewSize )
+void Polygon::SetSize( sal_uInt16 nNewSize )
{
DBG_CHKTHIS( Polygon, NULL );
@@ -835,7 +835,7 @@ void Polygon::SetSize( USHORT nNewSize )
// -----------------------------------------------------------------------
-USHORT Polygon::GetSize() const
+sal_uInt16 Polygon::GetSize() const
{
DBG_CHKTHIS( Polygon, NULL );
@@ -861,7 +861,7 @@ void Polygon::Clear()
// -----------------------------------------------------------------------
-double Polygon::CalcDistance( USHORT nP1, USHORT nP2 )
+double Polygon::CalcDistance( sal_uInt16 nP1, sal_uInt16 nP2 )
{
DBG_ASSERT( nP1 < mpImplPolygon->mnPoints,
"Polygon::CalcDistance(): nPos1 >= nPoints" );
@@ -878,12 +878,12 @@ double Polygon::CalcDistance( USHORT nP1, USHORT nP2 )
// -----------------------------------------------------------------------
-void Polygon::Optimize( ULONG nOptimizeFlags, const PolyOptimizeData* pData )
+void Polygon::Optimize( sal_uIntPtr nOptimizeFlags, const PolyOptimizeData* pData )
{
DBG_CHKTHIS( Polygon, NULL );
DBG_ASSERT( !mpImplPolygon->mpFlagAry, "Optimizing could fail with beziers!" );
- USHORT nSize = mpImplPolygon->mnPoints;
+ sal_uInt16 nSize = mpImplPolygon->mnPoints;
if( nOptimizeFlags && nSize )
{
@@ -891,7 +891,7 @@ void Polygon::Optimize( ULONG nOptimizeFlags, const PolyOptimizeData* pData )
{
const Rectangle aBound( GetBoundRect() );
const double fArea = ( aBound.GetWidth() + aBound.GetHeight() ) * 0.5;
- const USHORT nPercent = pData ? pData->GetPercentValue() : 50;
+ const sal_uInt16 nPercent = pData ? pData->GetPercentValue() : 50;
Optimize( POLY_OPTIMIZE_NO_SAME );
ImplReduceEdges( *this, fArea, nPercent );
@@ -900,7 +900,7 @@ void Polygon::Optimize( ULONG nOptimizeFlags, const PolyOptimizeData* pData )
{
Polygon aNewPoly;
const Point& rFirst = mpImplPolygon->mpPointAry[ 0 ];
- ULONG nReduce;
+ sal_uIntPtr nReduce;
if( nOptimizeFlags & ( POLY_OPTIMIZE_REDUCE ) )
nReduce = pData ? pData->GetAbsValue() : 4UL;
@@ -912,15 +912,15 @@ void Polygon::Optimize( ULONG nOptimizeFlags, const PolyOptimizeData* pData )
if( nSize > 1 )
{
- USHORT nLast = 0, nNewCount = 1;
+ sal_uInt16 nLast = 0, nNewCount = 1;
aNewPoly.SetSize( nSize );
aNewPoly[ 0 ] = rFirst;
- for( USHORT i = 1; i < nSize; i++ )
+ for( sal_uInt16 i = 1; i < nSize; i++ )
{
if( ( mpImplPolygon->mpPointAry[ i ] != mpImplPolygon->mpPointAry[ nLast ] ) &&
- ( !nReduce || ( nReduce < (ULONG) FRound( CalcDistance( nLast, i ) ) ) ) )
+ ( !nReduce || ( nReduce < (sal_uIntPtr) FRound( CalcDistance( nLast, i ) ) ) ) )
{
aNewPoly[ nNewCount++ ] = mpImplPolygon->mpPointAry[ nLast = i ];
}
@@ -1051,8 +1051,8 @@ void Polygon::AdaptiveSubdivide( Polygon& rResult, const double d ) const
}
else
{
- USHORT i;
- USHORT nPts( GetSize() );
+ sal_uInt16 i;
+ sal_uInt16 nPts( GetSize() );
::std::vector< Point > aPoints;
aPoints.reserve( nPts );
::std::back_insert_iterator< ::std::vector< Point > > aPointIter( aPoints );
@@ -1061,8 +1061,8 @@ void Polygon::AdaptiveSubdivide( Polygon& rResult, const double d ) const
{
if( ( i + 3 ) < nPts )
{
- BYTE P1( mpImplPolygon->mpFlagAry[ i ] );
- BYTE P4( mpImplPolygon->mpFlagAry[ i + 3 ] );
+ sal_uInt8 P1( mpImplPolygon->mpFlagAry[ i ] );
+ sal_uInt8 P4( mpImplPolygon->mpFlagAry[ i + 3 ] );
if( ( POLY_NORMAL == P1 || POLY_SMOOTH == P1 || POLY_SYMMTR == P1 ) &&
( POLY_CONTROL == mpImplPolygon->mpFlagAry[ i + 1 ] ) &&
@@ -1083,7 +1083,7 @@ void Polygon::AdaptiveSubdivide( Polygon& rResult, const double d ) const
}
// fill result polygon
- rResult = Polygon( (USHORT)aPoints.size() ); // ensure sufficient size for copy
+ rResult = Polygon( (sal_uInt16)aPoints.size() ); // ensure sufficient size for copy
::std::copy(aPoints.begin(), aPoints.end(), rResult.mpImplPolygon->mpPointAry);
}
}
@@ -1122,27 +1122,27 @@ void Polygon::GetXOR( const PolyPolygon& rPolyPoly, PolyPolygon& rResult ) const
// -----------------------------------------------------------------------
-void Polygon::ImplReduceEdges( Polygon& rPoly, const double& rArea, USHORT nPercent )
+void Polygon::ImplReduceEdges( Polygon& rPoly, const double& rArea, sal_uInt16 nPercent )
{
const double fBound = 2000.0 * ( 100 - nPercent ) * 0.01;
- USHORT nNumNoChange = 0, nNumRuns = 0;
+ sal_uInt16 nNumNoChange = 0, nNumRuns = 0;
while( nNumNoChange < 2 )
{
- USHORT nPntCnt = rPoly.GetSize(), nNewPos = 0;
+ sal_uInt16 nPntCnt = rPoly.GetSize(), nNewPos = 0;
Polygon aNewPoly( nPntCnt );
- BOOL bChangeInThisRun = FALSE;
+ sal_Bool bChangeInThisRun = sal_False;
- for( USHORT n = 0; n < nPntCnt; n++ )
+ for( sal_uInt16 n = 0; n < nPntCnt; n++ )
{
- BOOL bDeletePoint = FALSE;
+ sal_Bool bDeletePoint = sal_False;
if( ( n + nNumRuns ) % 2 )
{
- USHORT nIndPrev = !n ? nPntCnt - 1 : n - 1;
- USHORT nIndPrevPrev = !nIndPrev ? nPntCnt - 1 : nIndPrev - 1;
- USHORT nIndNext = ( n == nPntCnt-1 ) ? 0 : n + 1;
- USHORT nIndNextNext = ( nIndNext == nPntCnt - 1 ) ? 0 : nIndNext + 1;
+ sal_uInt16 nIndPrev = !n ? nPntCnt - 1 : n - 1;
+ sal_uInt16 nIndPrevPrev = !nIndPrev ? nPntCnt - 1 : nIndPrev - 1;
+ sal_uInt16 nIndNext = ( n == nPntCnt-1 ) ? 0 : n + 1;
+ sal_uInt16 nIndNextNext = ( nIndNext == nPntCnt - 1 ) ? 0 : nIndNext + 1;
Vector2D aVec1( rPoly[ nIndPrev ] ); aVec1 -= rPoly[ nIndPrevPrev ];
Vector2D aVec2( rPoly[ n ] ); aVec2 -= rPoly[ nIndPrev ];
Vector2D aVec3( rPoly[ nIndNext ] ); aVec3 -= rPoly[ n ];
@@ -1152,7 +1152,7 @@ void Polygon::ImplReduceEdges( Polygon& rPoly, const double& rArea, USHORT nPerc
double fTurnB = aVec2.Normalize().Scalar( aVec3.Normalize() );
if( fabs( fTurnB ) < ( 1.0 + SMALL_DVALUE ) && fabs( fTurnB ) > ( 1.0 - SMALL_DVALUE ) )
- bDeletePoint = TRUE;
+ bDeletePoint = sal_True;
else
{
Vector2D aVecB( rPoly[ nIndNext ] );
@@ -1181,7 +1181,7 @@ void Polygon::ImplReduceEdges( Polygon& rPoly, const double& rArea, USHORT nPerc
if( ( fLenFact < ( FSQRT2 + SMALL_DVALUE ) ) &&
( ( ( fDist1 + fDist4 ) / ( fDist2 + fDist3 ) ) * 2000.0 ) > fBound )
{
- bDeletePoint = TRUE;
+ bDeletePoint = sal_True;
}
}
else
@@ -1193,10 +1193,10 @@ void Polygon::ImplReduceEdges( Polygon& rPoly, const double& rArea, USHORT nPerc
else if( fRelLen > 1.0 )
fRelLen = 1.0;
- if( ( (UINT32) ( ( ( fLenFact - 1.0 ) * 1000000.0 ) + 0.5 ) < fBound ) &&
+ if( ( (sal_uInt32) ( ( ( fLenFact - 1.0 ) * 1000000.0 ) + 0.5 ) < fBound ) &&
( fabs( fGradB ) <= ( fRelLen * fBound * 0.01 ) ) )
{
- bDeletePoint = TRUE;
+ bDeletePoint = sal_True;
}
}
}
@@ -1205,7 +1205,7 @@ void Polygon::ImplReduceEdges( Polygon& rPoly, const double& rArea, USHORT nPerc
if( !bDeletePoint )
aNewPoly[ nNewPos++ ] = rPoly[ n ];
else
- bChangeInThisRun = TRUE;
+ bChangeInThisRun = sal_True;
}
if( bChangeInThisRun && nNewPos )
@@ -1234,8 +1234,8 @@ void Polygon::Move( long nHorzMove, long nVertMove )
ImplMakeUnique();
// Punkte verschieben
- USHORT nCount = mpImplPolygon->mnPoints;
- for ( USHORT i = 0; i < nCount; i++ )
+ sal_uInt16 nCount = mpImplPolygon->mnPoints;
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
Point* pPt = &(mpImplPolygon->mpPointAry[i]);
pPt->X() += nHorzMove;
@@ -1250,7 +1250,7 @@ void Polygon::Translate(const Point& rTrans)
DBG_CHKTHIS( Polygon, NULL );
ImplMakeUnique();
- for ( USHORT i = 0, nCount = mpImplPolygon->mnPoints; i < nCount; i++ )
+ for ( sal_uInt16 i = 0, nCount = mpImplPolygon->mnPoints; i < nCount; i++ )
mpImplPolygon->mpPointAry[ i ] += rTrans;
}
@@ -1261,7 +1261,7 @@ void Polygon::Scale( double fScaleX, double fScaleY )
DBG_CHKTHIS( Polygon, NULL );
ImplMakeUnique();
- for ( USHORT i = 0, nCount = mpImplPolygon->mnPoints; i < nCount; i++ )
+ for ( sal_uInt16 i = 0, nCount = mpImplPolygon->mnPoints; i < nCount; i++ )
{
Point& rPnt = mpImplPolygon->mpPointAry[i];
rPnt.X() = (long) ( fScaleX * rPnt.X() );
@@ -1271,7 +1271,7 @@ void Polygon::Scale( double fScaleX, double fScaleY )
// -----------------------------------------------------------------------
-void Polygon::Rotate( const Point& rCenter, USHORT nAngle10 )
+void Polygon::Rotate( const Point& rCenter, sal_uInt16 nAngle10 )
{
DBG_CHKTHIS( Polygon, NULL );
nAngle10 %= 3600;
@@ -1294,7 +1294,7 @@ void Polygon::Rotate( const Point& rCenter, double fSin, double fCos )
long nCenterX = rCenter.X();
long nCenterY = rCenter.Y();
- for( USHORT i = 0, nCount = mpImplPolygon->mnPoints; i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = mpImplPolygon->mnPoints; i < nCount; i++ )
{
Point& rPt = mpImplPolygon->mpPointAry[ i ];
@@ -1312,7 +1312,7 @@ void Polygon::SlantX( long nYRef, double fSin, double fCos )
DBG_CHKTHIS( Polygon, NULL );
ImplMakeUnique();
- for( USHORT i = 0, nCount = mpImplPolygon->mnPoints; i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = mpImplPolygon->mnPoints; i < nCount; i++ )
{
Point& rPnt = mpImplPolygon->mpPointAry[ i ];
const long nDy = rPnt.Y() - nYRef;
@@ -1329,7 +1329,7 @@ void Polygon::SlantY( long nXRef, double fSin, double fCos )
DBG_CHKTHIS( Polygon, NULL );
ImplMakeUnique();
- for( USHORT i = 0, nCount = mpImplPolygon->mnPoints; i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = mpImplPolygon->mnPoints; i < nCount; i++ )
{
Point& rPnt = mpImplPolygon->mpPointAry[ i ];
const long nDx = rPnt.X() - nXRef;
@@ -1368,7 +1368,7 @@ void Polygon::Distort( const Rectangle& rRefRect, const Polygon& rDistortedRect
X4 = rDistortedRect[2].X();
Y4 = rDistortedRect[2].Y();
- for( USHORT i = 0, nCount = mpImplPolygon->mnPoints; i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = mpImplPolygon->mnPoints; i < nCount; i++ )
{
Point& rPnt = mpImplPolygon->mpPointAry[ i ];
@@ -1396,9 +1396,9 @@ class ImplPolygonPointFilter : public ImplPointFilter
{
public:
ImplPolygon* mpPoly; // Nicht loeschen, wird dem Polygon zugewiesen
- USHORT mnSize;
+ sal_uInt16 mnSize;
- ImplPolygonPointFilter( USHORT nDestSize ) :
+ ImplPolygonPointFilter( sal_uInt16 nDestSize ) :
mnSize( 0 )
{
mpPoly = new ImplPolygon( nDestSize );
@@ -1434,7 +1434,7 @@ class ImplEdgePointFilter : public ImplPointFilter
const long mnHigh;
const int mnEdge;
int mnLastOutside;
- BOOL mbFirst;
+ sal_Bool mbFirst;
public:
ImplEdgePointFilter( int nEdge, long nLow, long nHigh,
@@ -1443,7 +1443,7 @@ public:
mnLow( nLow ),
mnHigh( nHigh ),
mnEdge( nEdge ),
- mbFirst( TRUE )
+ mbFirst( sal_True )
{
}
@@ -1542,7 +1542,7 @@ void ImplEdgePointFilter::Input( const Point& rPoint )
if ( mbFirst )
{
maFirstPoint = rPoint;
- mbFirst = FALSE;
+ mbFirst = sal_False;
if ( !nOutside )
mrNextFilter.Input( rPoint );
}
@@ -1580,20 +1580,20 @@ void ImplEdgePointFilter::LastPoint()
// -----------------------------------------------------------------------
-void Polygon::Clip( const Rectangle& rRect, BOOL bPolygon )
+void Polygon::Clip( const Rectangle& rRect, sal_Bool bPolygon )
{
// #105251# Justify rect befor edge filtering
Rectangle aJustifiedRect( rRect );
aJustifiedRect.Justify();
- USHORT nSourceSize = mpImplPolygon->mnPoints;
+ sal_uInt16 nSourceSize = mpImplPolygon->mnPoints;
ImplPolygonPointFilter aPolygon( nSourceSize );
ImplEdgePointFilter aHorzFilter( EDGE_HORZ, aJustifiedRect.Left(), aJustifiedRect.Right(),
aPolygon );
ImplEdgePointFilter aVertFilter( EDGE_VERT, aJustifiedRect.Top(), aJustifiedRect.Bottom(),
aHorzFilter );
- for ( USHORT i = 0; i < nSourceSize; i++ )
+ for ( sal_uInt16 i = 0; i < nSourceSize; i++ )
aVertFilter.Input( mpImplPolygon->mpPointAry[i] );
if ( bPolygon || aVertFilter.IsPolygon() )
aVertFilter.LastPoint();
@@ -1628,7 +1628,7 @@ Rectangle Polygon::GetBoundRect() const
//
// DBG_ASSERT( !mpImplPolygon->mpFlagAry, "GetBoundRect could fail with beziers!" );
- USHORT nCount = mpImplPolygon->mnPoints;
+ sal_uInt16 nCount = mpImplPolygon->mnPoints;
if( ! nCount )
return Rectangle();
@@ -1638,7 +1638,7 @@ Rectangle Polygon::GetBoundRect() const
nXMin = nXMax = pPt->X();
nYMin = nYMax = pPt->Y();
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
pPt = &(mpImplPolygon->mpPointAry[i]);
@@ -1674,9 +1674,9 @@ double Polygon::GetSignedArea() const
if( mpImplPolygon->mnPoints > 2 )
{
- const USHORT nCount1 = mpImplPolygon->mnPoints - 1;
+ const sal_uInt16 nCount1 = mpImplPolygon->mnPoints - 1;
- for( USHORT i = 0; i < nCount1; )
+ for( sal_uInt16 i = 0; i < nCount1; )
{
const Point& rPt = mpImplPolygon->mpPointAry[ i ];
const Point& rPt1 = mpImplPolygon->mpPointAry[ ++i ];
@@ -1693,15 +1693,15 @@ double Polygon::GetSignedArea() const
// -----------------------------------------------------------------------
-BOOL Polygon::IsInside( const Point& rPoint ) const
+sal_Bool Polygon::IsInside( const Point& rPoint ) const
{
DBG_CHKTHIS( Polygon, NULL );
DBG_ASSERT( !mpImplPolygon->mpFlagAry, "IsInside could fail with beziers!" );
const Rectangle aBound( GetBoundRect() );
const Line aLine( rPoint, Point( aBound.Right() + 100L, rPoint.Y() ) );
- USHORT nCount = mpImplPolygon->mnPoints;
- USHORT nPCounter = 0;
+ sal_uInt16 nCount = mpImplPolygon->mnPoints;
+ sal_uInt16 nPCounter = 0;
if ( ( nCount > 2 ) && aBound.IsInside( rPoint ) )
{
@@ -1712,7 +1712,7 @@ BOOL Polygon::IsInside( const Point& rPoint ) const
while ( ( aPt1 == mpImplPolygon->mpPointAry[ nCount - 1 ] ) && ( nCount > 3 ) )
nCount--;
- for ( USHORT i = 1; i <= nCount; i++ )
+ for ( sal_uInt16 i = 1; i <= nCount; i++ )
{
const Point& rPt2 = mpImplPolygon->mpPointAry[ ( i < nCount ) ? i : 0 ];
@@ -1745,7 +1745,7 @@ BOOL Polygon::IsInside( const Point& rPoint ) const
// -----------------------------------------------------------------------
-BOOL Polygon::IsRightOrientated() const
+sal_Bool Polygon::IsRightOrientated() const
{
DBG_CHKTHIS( Polygon, NULL );
return GetSignedArea() >= 0.0;
@@ -1753,7 +1753,7 @@ BOOL Polygon::IsRightOrientated() const
// -----------------------------------------------------------------------
-void Polygon::Insert( USHORT nPos, const Point& rPt, PolyFlags eFlags )
+void Polygon::Insert( sal_uInt16 nPos, const Point& rPt, PolyFlags eFlags )
{
DBG_CHKTHIS( Polygon, NULL );
ImplMakeUnique();
@@ -1767,16 +1767,16 @@ void Polygon::Insert( USHORT nPos, const Point& rPt, PolyFlags eFlags )
if( POLY_NORMAL != eFlags )
{
mpImplPolygon->ImplCreateFlagArray();
- mpImplPolygon->mpFlagAry[ nPos ] = (BYTE) eFlags;
+ mpImplPolygon->mpFlagAry[ nPos ] = (sal_uInt8) eFlags;
}
}
// -----------------------------------------------------------------------
-void Polygon::Insert( USHORT nPos, const Polygon& rPoly )
+void Polygon::Insert( sal_uInt16 nPos, const Polygon& rPoly )
{
DBG_CHKTHIS( Polygon, NULL );
- const USHORT nInsertCount = rPoly.mpImplPolygon->mnPoints;
+ const sal_uInt16 nInsertCount = rPoly.mpImplPolygon->mnPoints;
if( nInsertCount )
{
@@ -1794,7 +1794,7 @@ void Polygon::Insert( USHORT nPos, const Polygon& rPoly )
// -----------------------------------------------------------------------
-void Polygon::Remove( USHORT nPos, USHORT nCount )
+void Polygon::Remove( sal_uInt16 nPos, sal_uInt16 nCount )
{
DBG_CHKTHIS( Polygon, NULL );
if( nCount && ( nPos < mpImplPolygon->mnPoints ) )
@@ -1806,7 +1806,7 @@ void Polygon::Remove( USHORT nPos, USHORT nCount )
// -----------------------------------------------------------------------
-Point& Polygon::operator[]( USHORT nPos )
+Point& Polygon::operator[]( sal_uInt16 nPos )
{
DBG_CHKTHIS( Polygon, NULL );
DBG_ASSERT( nPos < mpImplPolygon->mnPoints, "Polygon::[]: nPos >= nPoints" );
@@ -1844,15 +1844,15 @@ Polygon& Polygon::operator=( const Polygon& rPoly )
// -----------------------------------------------------------------------
-BOOL Polygon::operator==( const Polygon& rPoly ) const
+sal_Bool Polygon::operator==( const Polygon& rPoly ) const
{
DBG_CHKTHIS( Polygon, NULL );
DBG_CHKOBJ( &rPoly, Polygon, NULL );
if ( (rPoly.mpImplPolygon == mpImplPolygon) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -1885,10 +1885,10 @@ SvStream& operator>>( SvStream& rIStream, Polygon& rPoly )
DBG_CHKOBJ( &rPoly, Polygon, NULL );
DBG_ASSERTWARNING( rIStream.GetVersion(), "Polygon::>> - Solar-Version not set on rIStream" );
- USHORT i;
- USHORT nStart;
- USHORT nCurPoints;
- USHORT nPoints;
+ sal_uInt16 i;
+ sal_uInt16 nStart;
+ sal_uInt16 nCurPoints;
+ sal_uInt16 nPoints;
unsigned char bShort;
short nShortX;
short nShortY;
@@ -1904,7 +1904,7 @@ SvStream& operator>>( SvStream& rIStream, Polygon& rPoly )
rPoly.mpImplPolygon = new ImplPolygon( nPoints );
}
else
- rPoly.mpImplPolygon->ImplSetSize( nPoints, FALSE );
+ rPoly.mpImplPolygon->ImplSetSize( nPoints, sal_False );
// Je nach CompressMode das Polygon einlesen
if ( rIStream.GetCompressMode() == COMPRESSMODE_FULL )
@@ -1969,9 +1969,9 @@ SvStream& operator<<( SvStream& rOStream, const Polygon& rPoly )
unsigned char bShort;
unsigned char bCurShort;
- USHORT nStart;
- USHORT i;
- USHORT nPoints = rPoly.GetSize();
+ sal_uInt16 nStart;
+ sal_uInt16 i;
+ sal_uInt16 nPoints = rPoly.GetSize();
// Anzahl der Punkte rausschreiben
rOStream << nPoints;
@@ -1989,9 +1989,9 @@ SvStream& operator<<( SvStream& rOStream, const Polygon& rPoly )
(rPoly.mpImplPolygon->mpPointAry[nStart].X() <= SHRT_MAX)) &&
((rPoly.mpImplPolygon->mpPointAry[nStart].Y() >= SHRT_MIN) &&
(rPoly.mpImplPolygon->mpPointAry[nStart].Y() <= SHRT_MAX)) )
- bShort = TRUE;
+ bShort = sal_True;
else
- bShort = FALSE;
+ bShort = sal_False;
while ( i < nPoints )
{
// Feststellen, welcher Typ geschrieben werden soll
@@ -1999,9 +1999,9 @@ SvStream& operator<<( SvStream& rOStream, const Polygon& rPoly )
(rPoly.mpImplPolygon->mpPointAry[nStart].X() <= SHRT_MAX)) &&
((rPoly.mpImplPolygon->mpPointAry[nStart].Y() >= SHRT_MIN) &&
(rPoly.mpImplPolygon->mpPointAry[nStart].Y() <= SHRT_MAX)) )
- bCurShort = TRUE;
+ bCurShort = sal_True;
else
- bCurShort = FALSE;
+ bCurShort = sal_False;
// Wenn sich die Werte in einen anderen Bereich begeben,
// muessen wir neu rausschreiben
@@ -2014,7 +2014,7 @@ SvStream& operator<<( SvStream& rOStream, const Polygon& rPoly )
i++;
}
- rOStream << bShort << (USHORT)(i-nStart);
+ rOStream << bShort << (sal_uInt16)(i-nStart);
if ( bShort )
{
@@ -2111,7 +2111,7 @@ void Polygon::Write( SvStream& rOStream ) const
// -----------------------------------------------------------------------
// #i74631# numerical correction method for B2DPolygon
-void impCorrectContinuity(basegfx::B2DPolygon& roPolygon, sal_uInt32 nIndex, BYTE nCFlag)
+void impCorrectContinuity(basegfx::B2DPolygon& roPolygon, sal_uInt32 nIndex, sal_uInt8 nCFlag)
{
const sal_uInt32 nPointCount(roPolygon.count());
OSL_ENSURE(nIndex < nPointCount, "impCorrectContinuity: index access out of range (!)");
@@ -2153,7 +2153,7 @@ basegfx::B2DPolygon Polygon::getB2DPolygon() const
{
// handling for curves. Add start point
const Point aStartPoint(mpImplPolygon->mpPointAry[0]);
- BYTE nPointFlag(mpImplPolygon->mpFlagAry[0]);
+ sal_uInt8 nPointFlag(mpImplPolygon->mpFlagAry[0]);
aRetval.append(basegfx::B2DPoint(aStartPoint.X(), aStartPoint.Y()));
Point aControlA, aControlB;
@@ -2274,7 +2274,7 @@ Polygon::Polygon(const basegfx::B2DPolygon& rPolygon)
const Point aStartPoint(FRound(aBezier.getStartPoint().getX()), FRound(aBezier.getStartPoint().getY()));
const sal_uInt32 nStartPointIndex(nArrayInsert);
mpImplPolygon->mpPointAry[nStartPointIndex] = aStartPoint;
- mpImplPolygon->mpFlagAry[nStartPointIndex] = (BYTE)POLY_NORMAL;
+ mpImplPolygon->mpFlagAry[nStartPointIndex] = (sal_uInt8)POLY_NORMAL;
nArrayInsert++;
// prepare next segment
@@ -2287,11 +2287,11 @@ Polygon::Polygon(const basegfx::B2DPolygon& rPolygon)
{
// if one is used, add always two control points due to the old schema
mpImplPolygon->mpPointAry[nArrayInsert] = Point(FRound(aBezier.getControlPointA().getX()), FRound(aBezier.getControlPointA().getY()));
- mpImplPolygon->mpFlagAry[nArrayInsert] = (BYTE)POLY_CONTROL;
+ mpImplPolygon->mpFlagAry[nArrayInsert] = (sal_uInt8)POLY_CONTROL;
nArrayInsert++;
mpImplPolygon->mpPointAry[nArrayInsert] = Point(FRound(aBezier.getControlPointB().getX()), FRound(aBezier.getControlPointB().getY()));
- mpImplPolygon->mpFlagAry[nArrayInsert] = (BYTE)POLY_CONTROL;
+ mpImplPolygon->mpFlagAry[nArrayInsert] = (sal_uInt8)POLY_CONTROL;
nArrayInsert++;
}
@@ -2302,11 +2302,11 @@ Polygon::Polygon(const basegfx::B2DPolygon& rPolygon)
if(basegfx::CONTINUITY_C1 == eCont)
{
- mpImplPolygon->mpFlagAry[nStartPointIndex] = (BYTE)POLY_SMOOTH;
+ mpImplPolygon->mpFlagAry[nStartPointIndex] = (sal_uInt8)POLY_SMOOTH;
}
else if(basegfx::CONTINUITY_C2 == eCont)
{
- mpImplPolygon->mpFlagAry[nStartPointIndex] = (BYTE)POLY_SYMMTR;
+ mpImplPolygon->mpFlagAry[nStartPointIndex] = (sal_uInt8)POLY_SYMMTR;
}
}
@@ -2318,7 +2318,7 @@ Polygon::Polygon(const basegfx::B2DPolygon& rPolygon)
{
// add first point again as closing point due to old definition
mpImplPolygon->mpPointAry[nArrayInsert] = mpImplPolygon->mpPointAry[0];
- mpImplPolygon->mpFlagAry[nArrayInsert] = (BYTE)POLY_NORMAL;
+ mpImplPolygon->mpFlagAry[nArrayInsert] = (sal_uInt8)POLY_NORMAL;
nArrayInsert++;
}
else
@@ -2327,7 +2327,7 @@ Polygon::Polygon(const basegfx::B2DPolygon& rPolygon)
const basegfx::B2DPoint aClosingPoint(rPolygon.getB2DPoint(nB2DLocalCount - 1L));
const Point aEnd(FRound(aClosingPoint.getX()), FRound(aClosingPoint.getY()));
mpImplPolygon->mpPointAry[nArrayInsert] = aEnd;
- mpImplPolygon->mpFlagAry[nArrayInsert] = (BYTE)POLY_NORMAL;
+ mpImplPolygon->mpFlagAry[nArrayInsert] = (sal_uInt8)POLY_NORMAL;
nArrayInsert++;
}
diff --git a/tools/source/generic/poly2.cxx b/tools/source/generic/poly2.cxx
index 46459353fa35..a995c66f9cf0 100644
--- a/tools/source/generic/poly2.cxx
+++ b/tools/source/generic/poly2.cxx
@@ -53,7 +53,7 @@ DBG_NAME( PolyPolygon )
// -----------------------------------------------------------------------
-ImplPolyPolygon::ImplPolyPolygon( USHORT nInitSize )
+ImplPolyPolygon::ImplPolyPolygon( sal_uInt16 nInitSize )
{
mnRefCount = 1;
mnCount = nInitSize;
@@ -74,7 +74,7 @@ ImplPolyPolygon::ImplPolyPolygon( const ImplPolyPolygon& rImplPolyPoly )
if ( rImplPolyPoly.mpPolyAry )
{
mpPolyAry = new SVPPOLYGON[mnSize];
- for ( USHORT i = 0; i < mnCount; i++ )
+ for ( sal_uInt16 i = 0; i < mnCount; i++ )
mpPolyAry[i] = new Polygon( *rImplPolyPoly.mpPolyAry[i] );
}
else
@@ -87,7 +87,7 @@ ImplPolyPolygon::~ImplPolyPolygon()
{
if ( mpPolyAry )
{
- for ( USHORT i = 0; i < mnCount; i++ )
+ for ( sal_uInt16 i = 0; i < mnCount; i++ )
delete mpPolyAry[i];
delete[] mpPolyAry;
}
@@ -95,7 +95,7 @@ ImplPolyPolygon::~ImplPolyPolygon()
// =======================================================================
-PolyPolygon::PolyPolygon( USHORT nInitSize, USHORT nResize )
+PolyPolygon::PolyPolygon( sal_uInt16 nInitSize, sal_uInt16 nResize )
{
DBG_CTOR( PolyPolygon, NULL );
@@ -127,7 +127,7 @@ PolyPolygon::PolyPolygon( const Polygon& rPoly )
// -----------------------------------------------------------------------
-PolyPolygon::PolyPolygon( USHORT nPoly, const USHORT* pPointCountAry,
+PolyPolygon::PolyPolygon( sal_uInt16 nPoly, const sal_uInt16* pPointCountAry,
const Point* pPtAry )
{
DBG_CTOR( PolyPolygon, NULL );
@@ -136,7 +136,7 @@ PolyPolygon::PolyPolygon( USHORT nPoly, const USHORT* pPointCountAry,
nPoly = MAX_POLYGONS;
mpImplPolyPolygon = new ImplPolyPolygon( nPoly );
- for ( USHORT i = 0; i < nPoly; i++ )
+ for ( sal_uInt16 i = 0; i < nPoly; i++ )
{
mpImplPolyPolygon->mpPolyAry[i] = new Polygon( *pPointCountAry, pPtAry );
pPtAry += *pPointCountAry;
@@ -170,7 +170,7 @@ PolyPolygon::~PolyPolygon()
// -----------------------------------------------------------------------
-void PolyPolygon::Insert( const Polygon& rPoly, USHORT nPos )
+void PolyPolygon::Insert( const Polygon& rPoly, sal_uInt16 nPos )
{
DBG_CHKTHIS( PolyPolygon, NULL );
@@ -190,8 +190,8 @@ void PolyPolygon::Insert( const Polygon& rPoly, USHORT nPos )
mpImplPolyPolygon->mpPolyAry = new SVPPOLYGON[mpImplPolyPolygon->mnSize];
else if ( mpImplPolyPolygon->mnCount == mpImplPolyPolygon->mnSize )
{
- USHORT nOldSize = mpImplPolyPolygon->mnSize;
- USHORT nNewSize = nOldSize + mpImplPolyPolygon->mnResize;
+ sal_uInt16 nOldSize = mpImplPolyPolygon->mnSize;
+ sal_uInt16 nNewSize = nOldSize + mpImplPolyPolygon->mnResize;
SVPPOLYGON* pNewAry;
if ( nNewSize >= MAX_POLYGONS )
@@ -217,7 +217,7 @@ void PolyPolygon::Insert( const Polygon& rPoly, USHORT nPos )
// -----------------------------------------------------------------------
-void PolyPolygon::Remove( USHORT nPos )
+void PolyPolygon::Remove( sal_uInt16 nPos )
{
DBG_CHKTHIS( PolyPolygon, NULL );
DBG_ASSERT( nPos < Count(), "PolyPolygon::Remove(): nPos >= nSize" );
@@ -237,7 +237,7 @@ void PolyPolygon::Remove( USHORT nPos )
// -----------------------------------------------------------------------
-void PolyPolygon::Replace( const Polygon& rPoly, USHORT nPos )
+void PolyPolygon::Replace( const Polygon& rPoly, sal_uInt16 nPos )
{
DBG_CHKTHIS( PolyPolygon, NULL );
DBG_ASSERT( nPos < Count(), "PolyPolygon::Replace(): nPos >= nSize" );
@@ -254,7 +254,7 @@ void PolyPolygon::Replace( const Polygon& rPoly, USHORT nPos )
// -----------------------------------------------------------------------
-const Polygon& PolyPolygon::GetObject( USHORT nPos ) const
+const Polygon& PolyPolygon::GetObject( sal_uInt16 nPos ) const
{
DBG_CHKTHIS( PolyPolygon, NULL );
DBG_ASSERT( nPos < Count(), "PolyPolygon::GetObject(): nPos >= nSize" );
@@ -264,9 +264,9 @@ const Polygon& PolyPolygon::GetObject( USHORT nPos ) const
// -----------------------------------------------------------------------
-BOOL PolyPolygon::IsRect() const
+sal_Bool PolyPolygon::IsRect() const
{
- BOOL bIsRect = FALSE;
+ sal_Bool bIsRect = sal_False;
if ( Count() == 1 )
bIsRect = mpImplPolyPolygon->mpPolyAry[ 0 ]->IsRect();
return bIsRect;
@@ -288,7 +288,7 @@ void PolyPolygon::Clear()
{
if ( mpImplPolyPolygon->mpPolyAry )
{
- for ( USHORT i = 0; i < mpImplPolyPolygon->mnCount; i++ )
+ for ( sal_uInt16 i = 0; i < mpImplPolyPolygon->mnCount; i++ )
delete mpImplPolyPolygon->mpPolyAry[i];
delete[] mpImplPolyPolygon->mpPolyAry;
mpImplPolyPolygon->mpPolyAry = NULL;
@@ -300,15 +300,15 @@ void PolyPolygon::Clear()
// -----------------------------------------------------------------------
-void PolyPolygon::Optimize( ULONG nOptimizeFlags, const PolyOptimizeData* pData )
+void PolyPolygon::Optimize( sal_uIntPtr nOptimizeFlags, const PolyOptimizeData* pData )
{
DBG_CHKTHIS( PolyPolygon, NULL );
if( nOptimizeFlags )
{
double fArea;
- const BOOL bEdges = ( nOptimizeFlags & POLY_OPTIMIZE_EDGES ) == POLY_OPTIMIZE_EDGES;
- USHORT nPercent = 0;
+ const sal_Bool bEdges = ( nOptimizeFlags & POLY_OPTIMIZE_EDGES ) == POLY_OPTIMIZE_EDGES;
+ sal_uInt16 nPercent = 0;
if( bEdges )
{
@@ -327,7 +327,7 @@ void PolyPolygon::Optimize( ULONG nOptimizeFlags, const PolyOptimizeData* pData
}
// Optimize polygons
- for( USHORT i = 0, nPolyCount = mpImplPolyPolygon->mnCount; i < nPolyCount; i++ )
+ for( sal_uInt16 i = 0, nPolyCount = mpImplPolyPolygon->mnCount; i < nPolyCount; i++ )
{
if( bEdges )
{
@@ -351,7 +351,7 @@ void PolyPolygon::AdaptiveSubdivide( PolyPolygon& rResult, const double d ) cons
Polygon aPolygon;
- for( USHORT i = 0; i < mpImplPolyPolygon->mnCount; i++ )
+ for( sal_uInt16 i = 0; i < mpImplPolyPolygon->mnCount; i++ )
{
mpImplPolyPolygon->mpPolyAry[ i ]->AdaptiveSubdivide( aPolygon, d );
rResult.Insert( aPolygon );
@@ -388,7 +388,7 @@ void PolyPolygon::GetXOR( const PolyPolygon& rPolyPoly, PolyPolygon& rResult ) c
// -----------------------------------------------------------------------
-void PolyPolygon::ImplDoOperation( const PolyPolygon& rPolyPoly, PolyPolygon& rResult, ULONG nOperation ) const
+void PolyPolygon::ImplDoOperation( const PolyPolygon& rPolyPoly, PolyPolygon& rResult, sal_uIntPtr nOperation ) const
{
// Convert to B2DPolyPolygon, temporarily. It might be
// advantageous in the future, to have a PolyPolygon adaptor that
@@ -441,7 +441,7 @@ void PolyPolygon::ImplDoOperation( const PolyPolygon& rPolyPoly, PolyPolygon& rR
// -----------------------------------------------------------------------
-USHORT PolyPolygon::Count() const
+sal_uInt16 PolyPolygon::Count() const
{
DBG_CHKTHIS( PolyPolygon, NULL );
return mpImplPolyPolygon->mnCount;
@@ -464,8 +464,8 @@ void PolyPolygon::Move( long nHorzMove, long nVertMove )
}
// Punkte verschieben
- USHORT nPolyCount = mpImplPolyPolygon->mnCount;
- for ( USHORT i = 0; i < nPolyCount; i++ )
+ sal_uInt16 nPolyCount = mpImplPolyPolygon->mnCount;
+ for ( sal_uInt16 i = 0; i < nPolyCount; i++ )
mpImplPolyPolygon->mpPolyAry[i]->Move( nHorzMove, nVertMove );
}
}
@@ -484,7 +484,7 @@ void PolyPolygon::Translate( const Point& rTrans )
}
// Punkte verschieben
- for ( USHORT i = 0, nCount = mpImplPolyPolygon->mnCount; i < nCount; i++ )
+ for ( sal_uInt16 i = 0, nCount = mpImplPolyPolygon->mnCount; i < nCount; i++ )
mpImplPolyPolygon->mpPolyAry[ i ]->Translate( rTrans );
}
@@ -502,13 +502,13 @@ void PolyPolygon::Scale( double fScaleX, double fScaleY )
}
// Punkte verschieben
- for ( USHORT i = 0, nCount = mpImplPolyPolygon->mnCount; i < nCount; i++ )
+ for ( sal_uInt16 i = 0, nCount = mpImplPolyPolygon->mnCount; i < nCount; i++ )
mpImplPolyPolygon->mpPolyAry[ i ]->Scale( fScaleX, fScaleY );
}
// -----------------------------------------------------------------------
-void PolyPolygon::Rotate( const Point& rCenter, USHORT nAngle10 )
+void PolyPolygon::Rotate( const Point& rCenter, sal_uInt16 nAngle10 )
{
DBG_CHKTHIS( PolyPolygon, NULL );
nAngle10 %= 3600;
@@ -534,7 +534,7 @@ void PolyPolygon::Rotate( const Point& rCenter, double fSin, double fCos )
}
// Punkte verschieben
- for ( USHORT i = 0, nCount = mpImplPolyPolygon->mnCount; i < nCount; i++ )
+ for ( sal_uInt16 i = 0, nCount = mpImplPolyPolygon->mnCount; i < nCount; i++ )
mpImplPolyPolygon->mpPolyAry[ i ]->Rotate( rCenter, fSin, fCos );
}
@@ -552,7 +552,7 @@ void PolyPolygon::SlantX( long nYRef, double fSin, double fCos )
}
// Punkte verschieben
- for ( USHORT i = 0, nCount = mpImplPolyPolygon->mnCount; i < nCount; i++ )
+ for ( sal_uInt16 i = 0, nCount = mpImplPolyPolygon->mnCount; i < nCount; i++ )
mpImplPolyPolygon->mpPolyAry[ i ]->SlantX( nYRef, fSin, fCos );
}
@@ -570,7 +570,7 @@ void PolyPolygon::SlantY( long nXRef, double fSin, double fCos )
}
// Punkte verschieben
- for ( USHORT i = 0, nCount = mpImplPolyPolygon->mnCount; i < nCount; i++ )
+ for ( sal_uInt16 i = 0, nCount = mpImplPolyPolygon->mnCount; i < nCount; i++ )
mpImplPolyPolygon->mpPolyAry[ i ]->SlantY( nXRef, fSin, fCos );
}
@@ -588,7 +588,7 @@ void PolyPolygon::Distort( const Rectangle& rRefRect, const Polygon& rDistortedR
}
// Punkte verschieben
- for ( USHORT i = 0, nCount = mpImplPolyPolygon->mnCount; i < nCount; i++ )
+ for ( sal_uInt16 i = 0, nCount = mpImplPolyPolygon->mnCount; i < nCount; i++ )
mpImplPolyPolygon->mpPolyAry[ i ]->Distort( rRefRect, rDistortedRect );
}
@@ -598,8 +598,8 @@ void PolyPolygon::Distort( const Rectangle& rRefRect, const Polygon& rDistortedR
void PolyPolygon::Clip( const Rectangle& rRect )
{
// Polygon-Clippen
- USHORT nPolyCount = mpImplPolyPolygon->mnCount;
- USHORT i;
+ sal_uInt16 nPolyCount = mpImplPolyPolygon->mnCount;
+ sal_uInt16 i;
if ( !nPolyCount )
return;
@@ -629,16 +629,16 @@ Rectangle PolyPolygon::GetBoundRect() const
DBG_CHKTHIS( PolyPolygon, NULL );
long nXMin=0, nXMax=0, nYMin=0, nYMax=0;
- BOOL bFirst = TRUE;
- USHORT nPolyCount = mpImplPolyPolygon->mnCount;
+ sal_Bool bFirst = sal_True;
+ sal_uInt16 nPolyCount = mpImplPolyPolygon->mnCount;
- for ( USHORT n = 0; n < nPolyCount; n++ )
+ for ( sal_uInt16 n = 0; n < nPolyCount; n++ )
{
const Polygon* pPoly = mpImplPolyPolygon->mpPolyAry[n];
const Point* pAry = pPoly->GetConstPointAry();
- USHORT nPointCount = pPoly->GetSize();
+ sal_uInt16 nPointCount = pPoly->GetSize();
- for ( USHORT i = 0; i < nPointCount; i++ )
+ for ( sal_uInt16 i = 0; i < nPointCount; i++ )
{
const Point* pPt = &pAry[ i ];
@@ -646,7 +646,7 @@ Rectangle PolyPolygon::GetBoundRect() const
{
nXMin = nXMax = pPt->X();
nYMin = nYMax = pPt->Y();
- bFirst = FALSE;
+ bFirst = sal_False;
}
else
{
@@ -670,7 +670,7 @@ Rectangle PolyPolygon::GetBoundRect() const
// -----------------------------------------------------------------------
-Polygon& PolyPolygon::operator[]( USHORT nPos )
+Polygon& PolyPolygon::operator[]( sal_uInt16 nPos )
{
DBG_CHKTHIS( PolyPolygon, NULL );
DBG_ASSERT( nPos < Count(), "PolyPolygon::[](): nPos >= nSize" );
@@ -705,15 +705,15 @@ PolyPolygon& PolyPolygon::operator=( const PolyPolygon& rPolyPoly )
// -----------------------------------------------------------------------
-BOOL PolyPolygon::operator==( const PolyPolygon& rPolyPoly ) const
+sal_Bool PolyPolygon::operator==( const PolyPolygon& rPolyPoly ) const
{
DBG_CHKTHIS( PolyPolygon, NULL );
DBG_CHKOBJ( &rPolyPoly, PolyPolygon, NULL );
if ( rPolyPoly.mpImplPolyPolygon == mpImplPolyPolygon )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -746,7 +746,7 @@ SvStream& operator>>( SvStream& rIStream, PolyPolygon& rPolyPoly )
DBG_ASSERTWARNING( rIStream.GetVersion(), "PolyPolygon::>> - Solar-Version not set on rIStream" );
Polygon* pPoly;
- USHORT nPolyCount;
+ sal_uInt16 nPolyCount;
// Anzahl der Polygone einlesen
rIStream >> nPolyCount;
@@ -762,7 +762,7 @@ SvStream& operator>>( SvStream& rIStream, PolyPolygon& rPolyPoly )
rPolyPoly.mpImplPolyPolygon = new ImplPolyPolygon( nPolyCount );
- for ( USHORT i = 0; i < nPolyCount; i++ )
+ for ( sal_uInt16 i = 0; i < nPolyCount; i++ )
{
pPoly = new Polygon;
rIStream >> *pPoly;
@@ -783,11 +783,11 @@ SvStream& operator<<( SvStream& rOStream, const PolyPolygon& rPolyPoly )
DBG_ASSERTWARNING( rOStream.GetVersion(), "PolyPolygon::<< - Solar-Version not set on rOStream" );
// Anzahl der Polygone rausschreiben
- USHORT nPolyCount = rPolyPoly.mpImplPolyPolygon->mnCount;
+ sal_uInt16 nPolyCount = rPolyPoly.mpImplPolyPolygon->mnCount;
rOStream << nPolyCount;
// Die einzelnen Polygone ausgeben
- for ( USHORT i = 0; i < nPolyCount; i++ )
+ for ( sal_uInt16 i = 0; i < nPolyCount; i++ )
rOStream << *(rPolyPoly.mpImplPolyPolygon->mpPolyAry[i]);
return rOStream;
@@ -803,7 +803,7 @@ void PolyPolygon::Read( SvStream& rIStream )
DBG_ASSERTWARNING( rIStream.GetVersion(), "PolyPolygon::>> - Solar-Version not set on rIStream" );
Polygon* pPoly;
- USHORT nPolyCount;
+ sal_uInt16 nPolyCount;
// Anzahl der Polygone einlesen
rIStream >> nPolyCount;
@@ -819,7 +819,7 @@ void PolyPolygon::Read( SvStream& rIStream )
mpImplPolyPolygon = new ImplPolyPolygon( nPolyCount );
- for ( USHORT i = 0; i < nPolyCount; i++ )
+ for ( sal_uInt16 i = 0; i < nPolyCount; i++ )
{
pPoly = new Polygon;
pPoly->ImplRead( rIStream );
@@ -840,11 +840,11 @@ void PolyPolygon::Write( SvStream& rOStream ) const
DBG_ASSERTWARNING( rOStream.GetVersion(), "PolyPolygon::<< - Solar-Version not set on rOStream" );
// Anzahl der Polygone rausschreiben
- USHORT nPolyCount = mpImplPolyPolygon->mnCount;
+ sal_uInt16 nPolyCount = mpImplPolyPolygon->mnCount;
rOStream << nPolyCount;
// Die einzelnen Polygone ausgeben
- for ( USHORT i = 0; i < nPolyCount; i++ )
+ for ( sal_uInt16 i = 0; i < nPolyCount; i++ )
mpImplPolyPolygon->mpPolyAry[i]->ImplWrite( rOStream );;
}
diff --git a/tools/source/generic/svborder.cxx b/tools/source/generic/svborder.cxx
index eb254faf2310..fa302384745f 100644
--- a/tools/source/generic/svborder.cxx
+++ b/tools/source/generic/svborder.cxx
@@ -42,7 +42,7 @@ SvBorder::SvBorder( const Rectangle & rOuter, const Rectangle & rInner )
aInner.Justify();
OSL_ENSURE( aOuter.IsInside( aInner ),
- "SvBorder::SvBorder: FALSE == aOuter.IsInside( aInner )" );
+ "SvBorder::SvBorder: sal_False == aOuter.IsInside( aInner )" );
nTop = aInner.Top() - aOuter.Top();
nRight = aOuter.Right() - aInner.Right();
nBottom = aOuter.Bottom() - aInner.Bottom();
diff --git a/tools/source/inet/inetmime.cxx b/tools/source/inet/inetmime.cxx
index 5324e9be07b8..80b6987d041f 100644
--- a/tools/source/inet/inetmime.cxx
+++ b/tools/source/inet/inetmime.cxx
@@ -4552,7 +4552,7 @@ void INetContentTypeParameterList::Clear()
const INetContentTypeParameter *
INetContentTypeParameterList::find(const ByteString & rAttribute) const
{
- for (ULONG i = 0; i < Count(); ++i)
+ for (sal_uIntPtr i = 0; i < Count(); ++i)
{
const INetContentTypeParameter * pParameter = GetObject(i);
if (pParameter->m_sAttribute.EqualsIgnoreCaseAscii(rAttribute))
diff --git a/tools/source/inet/inetmsg.cxx b/tools/source/inet/inetmsg.cxx
index feec97168b59..8432bb52e23d 100644
--- a/tools/source/inet/inetmsg.cxx
+++ b/tools/source/inet/inetmsg.cxx
@@ -80,7 +80,7 @@ INetMessage::~INetMessage (void)
void INetMessage::ListCleanup_Impl (void)
{
// Cleanup.
- ULONG i, n = m_aHeaderList.Count();
+ sal_uIntPtr i, n = m_aHeaderList.Count();
for (i = 0; i < n; i++)
delete ((HEADERFIELD*)(m_aHeaderList.GetObject(i)));
m_aHeaderList.Clear();
@@ -97,7 +97,7 @@ void INetMessage::ListCopy (const INetMessage &rMsg)
ListCleanup_Impl();
// Copy.
- ULONG i, n = rMsg.GetHeaderCount();
+ sal_uIntPtr i, n = rMsg.GetHeaderCount();
for (i = 0; i < n; i++)
{
HEADERFIELD *p = (HEADERFIELD*)(rMsg.m_aHeaderList.GetObject(i));
@@ -113,7 +113,7 @@ void INetMessage::SetHeaderField_Impl (
INetMIME::HeaderFieldType eType,
const ByteString &rName,
const UniString &rValue,
- ULONG &rnIndex)
+ sal_uIntPtr &rnIndex)
{
INetMIMEStringOutputSink aSink (0, STRING_MAXLEN);
INetMIME::writeHeaderFieldBody (
@@ -125,10 +125,10 @@ void INetMessage::SetHeaderField_Impl (
/*
* SetHeaderField.
*/
-ULONG INetMessage::SetHeaderField (
- const UniString& rName, const UniString& rValue, ULONG nIndex)
+sal_uIntPtr INetMessage::SetHeaderField (
+ const UniString& rName, const UniString& rValue, sal_uIntPtr nIndex)
{
- ULONG nResult = nIndex;
+ sal_uIntPtr nResult = nIndex;
SetHeaderField_Impl (
INetMIME::HEADER_FIELD_TEXT,
ByteString (rName, RTL_TEXTENCODING_ASCII_US), rValue,
@@ -139,10 +139,10 @@ ULONG INetMessage::SetHeaderField (
/*
* SetHeaderField.
*/
-ULONG INetMessage::SetHeaderField (
- const INetMessageHeader &rHeader, ULONG nIndex)
+sal_uIntPtr INetMessage::SetHeaderField (
+ const INetMessageHeader &rHeader, sal_uIntPtr nIndex)
{
- ULONG nResult = nIndex;
+ sal_uIntPtr nResult = nIndex;
SetHeaderField_Impl (rHeader, nResult);
return nResult;
}
@@ -156,7 +156,7 @@ SvStream& INetMessage::operator<< (SvStream& rStrm) const
rStrm << static_cast<sal_uInt32>(m_nDocSize);
rStrm.WriteByteString (m_aDocName, RTL_TEXTENCODING_UTF8);
- ULONG i, n = m_aHeaderList.Count();
+ sal_uIntPtr i, n = m_aHeaderList.Count();
rStrm << static_cast<sal_uInt32>(n);
for (i = 0; i < n; i++)
@@ -182,7 +182,7 @@ SvStream& INetMessage::operator>> (SvStream& rStrm)
m_nDocSize = nTemp;
rStrm.ReadByteString (m_aDocName, RTL_TEXTENCODING_UTF8);
- ULONG i, n = 0;
+ sal_uIntPtr i, n = 0;
rStrm >> nTemp;
n = nTemp;
@@ -205,7 +205,7 @@ SvStream& INetMessage::operator>> (SvStream& rStrm)
INetMessageHeaderIterator::INetMessageHeaderIterator (
const INetMessage& rMsg, const UniString& rHdrName)
{
- ULONG i, n = rMsg.GetHeaderCount();
+ sal_uIntPtr i, n = rMsg.GetHeaderCount();
for (i = 0; i < n; i++)
{
if (rHdrName.CompareIgnoreCaseToAscii (rMsg.GetHeaderName(i)) == 0)
@@ -219,7 +219,7 @@ INetMessageHeaderIterator::INetMessageHeaderIterator (
INetMessageHeaderIterator::~INetMessageHeaderIterator (void)
{
- ULONG i, n = aValueList.Count();
+ sal_uIntPtr i, n = aValueList.Count();
for (i = 0; i < n; i++)
delete ((UniString*)(aValueList.GetObject(i)));
aValueList.Clear();
@@ -291,14 +291,14 @@ enum _ImplINetRFC822MessageHeaderState
INetRFC822Message::INetRFC822Message (void)
: INetMessage()
{
- for (USHORT i = 0; i < INETMSG_RFC822_NUMHDR; i++)
+ for (sal_uInt16 i = 0; i < INETMSG_RFC822_NUMHDR; i++)
m_nIndex[i] = LIST_ENTRY_NOTFOUND;
}
INetRFC822Message::INetRFC822Message (const INetRFC822Message& rMsg)
: INetMessage (rMsg)
{
- for (USHORT i = 0; i < INETMSG_RFC822_NUMHDR; i++)
+ for (sal_uInt16 i = 0; i < INETMSG_RFC822_NUMHDR; i++)
m_nIndex[i] = rMsg.m_nIndex[i];
}
@@ -311,7 +311,7 @@ INetRFC822Message& INetRFC822Message::operator= (const INetRFC822Message& rMsg)
{
INetMessage::operator= (rMsg);
- for (USHORT i = 0; i < INETMSG_RFC822_NUMHDR; i++)
+ for (sal_uInt16 i = 0; i < INETMSG_RFC822_NUMHDR; i++)
m_nIndex[i] = rMsg.m_nIndex[i];
}
return *this;
@@ -358,28 +358,28 @@ static const sal_Char *wkdays[7] =
/*
* GenerateDateField.
*/
-BOOL INetRFC822Message::GenerateDateField (
+sal_Bool INetRFC822Message::GenerateDateField (
const DateTime& rDateTime, UniString& rDateFieldW)
{
// Check arguments.
if (!rDateTime.IsValid() ||
(rDateTime.GetSec() > 59) ||
(rDateTime.GetMin() > 59) ||
- (rDateTime.GetHour() > 23) ) return FALSE;
+ (rDateTime.GetHour() > 23) ) return sal_False;
// Prepare output string.
ByteString rDateField;
// Insert Date.
- rDateField += wkdays[(USHORT)(rDateTime.GetDayOfWeek())];
+ rDateField += wkdays[(sal_uInt16)(rDateTime.GetDayOfWeek())];
rDateField += ", ";
- USHORT nNum = rDateTime.GetDay();
+ sal_uInt16 nNum = rDateTime.GetDay();
if (nNum < 10) rDateField += '0';
rDateField += ByteString::CreateFromInt32(nNum);
rDateField += ' ';
- rDateField += months[(USHORT)(rDateTime.GetMonth() - 1)];
+ rDateField += months[(sal_uInt16)(rDateTime.GetMonth() - 1)];
rDateField += ' ';
rDateField += ByteString::CreateFromInt32(rDateTime.GetYear());
@@ -403,47 +403,47 @@ BOOL INetRFC822Message::GenerateDateField (
// Done.
rDateFieldW = UniString (rDateField, RTL_TEXTENCODING_ASCII_US);
- return TRUE;
+ return sal_True;
}
/*
* ParseDateField and local helper functions.
*/
-static USHORT ParseNumber (const ByteString& rStr, USHORT& nIndex)
+static sal_uInt16 ParseNumber (const ByteString& rStr, sal_uInt16& nIndex)
{
- USHORT n = nIndex;
+ sal_uInt16 n = nIndex;
while ((n < rStr.Len()) && ascii_isDigit(rStr.GetChar(n))) n++;
ByteString aNum (rStr.Copy (nIndex, (n - nIndex)));
nIndex = n;
- return (USHORT)(aNum.ToInt32());
+ return (sal_uInt16)(aNum.ToInt32());
}
-static USHORT ParseMonth (const ByteString& rStr, USHORT& nIndex)
+static sal_uInt16 ParseMonth (const ByteString& rStr, sal_uInt16& nIndex)
{
- USHORT n = nIndex;
+ sal_uInt16 n = nIndex;
while ((n < rStr.Len()) && ascii_isLetter(rStr.GetChar(n))) n++;
ByteString aMonth (rStr.Copy (nIndex, 3));
nIndex = n;
- USHORT i;
+ sal_uInt16 i;
for (i = 0; i < 12; i++)
if (aMonth.CompareIgnoreCaseToAscii (months[i]) == 0) break;
return (i + 1);
}
-BOOL INetRFC822Message::ParseDateField (
+sal_Bool INetRFC822Message::ParseDateField (
const UniString& rDateFieldW, DateTime& rDateTime)
{
ByteString rDateField (rDateFieldW, RTL_TEXTENCODING_ASCII_US);
- if (rDateField.Len() == 0) return FALSE;
+ if (rDateField.Len() == 0) return sal_False;
if (rDateField.Search (':') != STRING_NOTFOUND)
{
// Some DateTime format.
- USHORT nIndex = 0;
+ sal_uInt16 nIndex = 0;
// Skip over <Wkd> or <Weekday>, leading and trailing space.
while ((nIndex < rDateField.Len()) &&
@@ -463,7 +463,7 @@ BOOL INetRFC822Message::ParseDateField (
if (ascii_isLetter (rDateField.GetChar(nIndex)))
{
// Format: ctime().
- if ((rDateField.Len() - nIndex) < 20) return FALSE;
+ if ((rDateField.Len() - nIndex) < 20) return sal_False;
rDateTime.SetMonth (ParseMonth (rDateField, nIndex)); nIndex++;
rDateTime.SetDay (ParseNumber (rDateField, nIndex)); nIndex++;
@@ -473,19 +473,19 @@ BOOL INetRFC822Message::ParseDateField (
rDateTime.SetSec (ParseNumber (rDateField, nIndex)); nIndex++;
rDateTime.Set100Sec (0);
- USHORT nYear = ParseNumber (rDateField, nIndex);
+ sal_uInt16 nYear = ParseNumber (rDateField, nIndex);
if (nYear < 100) nYear += 1900;
rDateTime.SetYear (nYear);
}
else
{
// Format: RFC1036 or RFC1123.
- if ((rDateField.Len() - nIndex) < 17) return FALSE;
+ if ((rDateField.Len() - nIndex) < 17) return sal_False;
rDateTime.SetDay (ParseNumber (rDateField, nIndex)); nIndex++;
rDateTime.SetMonth (ParseMonth (rDateField, nIndex)); nIndex++;
- USHORT nYear = ParseNumber (rDateField, nIndex); nIndex++;
+ sal_uInt16 nYear = ParseNumber (rDateField, nIndex); nIndex++;
if (nYear < 100) nYear += 1900;
rDateTime.SetYear (nYear);
@@ -498,8 +498,8 @@ BOOL INetRFC822Message::ParseDateField (
(rDateField.GetChar(nIndex) == '-') )
{
// Offset from GMT: "(+|-)HHMM".
- BOOL bEast = (rDateField.GetChar(nIndex++) == '+');
- USHORT nOffset = ParseNumber (rDateField, nIndex);
+ sal_Bool bEast = (rDateField.GetChar(nIndex++) == '+');
+ sal_uInt16 nOffset = ParseNumber (rDateField, nIndex);
if (nOffset > 0)
{
Time aDiff;
@@ -532,7 +532,7 @@ BOOL INetRFC822Message::ParseDateField (
else
{
// Junk.
- return FALSE;
+ return sal_False;
}
return (rDateTime.IsValid() &&
@@ -545,15 +545,15 @@ BOOL INetRFC822Message::ParseDateField (
* SetHeaderField.
* (Header Field Parser).
*/
-ULONG INetRFC822Message::SetHeaderField (
- const INetMessageHeader &rHeader, ULONG nNewIndex)
+sal_uIntPtr INetRFC822Message::SetHeaderField (
+ const INetMessageHeader &rHeader, sal_uIntPtr nNewIndex)
{
ByteString aName (rHeader.GetName());
const sal_Char *pData = aName.GetBuffer();
const sal_Char *pStop = pData + aName.Len() + 1;
const sal_Char *check = "";
- ULONG nIdx = LIST_APPEND;
+ sal_uIntPtr nIdx = LIST_APPEND;
int eState = INETMSG_RFC822_BEGIN;
int eOkState = INETMSG_RFC822_OK;
@@ -921,7 +921,7 @@ SvStream& INetRFC822Message::operator<< (SvStream& rStrm) const
{
INetMessage::operator<< (rStrm);
- for (USHORT i = 0; i < INETMSG_RFC822_NUMHDR; i++)
+ for (sal_uInt16 i = 0; i < INETMSG_RFC822_NUMHDR; i++)
rStrm << static_cast<sal_uInt32>(m_nIndex[i]);
return rStrm;
@@ -935,7 +935,7 @@ SvStream& INetRFC822Message::operator>> (SvStream& rStrm)
INetMessage::operator>> (rStrm);
sal_uInt32 nTemp;
- for (USHORT i = 0; i < INETMSG_RFC822_NUMHDR; i++)
+ for (sal_uInt16 i = 0; i < INETMSG_RFC822_NUMHDR; i++)
{
rStrm >> nTemp;
m_nIndex[i] = nTemp;
@@ -999,9 +999,9 @@ INetMIMEMessage::INetMIMEMessage (void)
: INetRFC822Message (),
pParent (NULL),
nNumChildren (0),
- bHeaderParsed (FALSE)
+ bHeaderParsed (sal_False)
{
- for (USHORT i = 0; i < INETMSG_MIME_NUMHDR; i++)
+ for (sal_uInt16 i = 0; i < INETMSG_MIME_NUMHDR; i++)
m_nIndex[i] = LIST_ENTRY_NOTFOUND;
}
@@ -1058,7 +1058,7 @@ void INetMIMEMessage::CopyImp (const INetMIMEMessage& rMsg)
{
bHeaderParsed = rMsg.bHeaderParsed;
- USHORT i;
+ sal_uInt16 i;
for (i = 0; i < INETMSG_MIME_NUMHDR; i++)
m_nIndex[i] = rMsg.m_nIndex[i];
@@ -1092,15 +1092,15 @@ INetMIMEMessage *INetMIMEMessage::CreateMessage (
* SetHeaderField.
* (Header Field Parser).
*/
-ULONG INetMIMEMessage::SetHeaderField (
- const INetMessageHeader &rHeader, ULONG nNewIndex)
+sal_uIntPtr INetMIMEMessage::SetHeaderField (
+ const INetMessageHeader &rHeader, sal_uIntPtr nNewIndex)
{
ByteString aName (rHeader.GetName());
const sal_Char *pData = aName.GetBuffer();
const sal_Char *pStop = pData + aName.Len() + 1;
const sal_Char *check = "";
- ULONG nIdx = LIST_APPEND;
+ sal_uIntPtr nIdx = LIST_APPEND;
int eState = INETMSG_MIME_BEGIN;
int eOkState = INETMSG_MIME_OK;
@@ -1328,11 +1328,11 @@ void INetMIMEMessage::GetDefaultContentType (String& rContentType)
/*
* EnableAttachChild.
*/
-BOOL INetMIMEMessage::EnableAttachChild (INetMessageContainerType eType)
+sal_Bool INetMIMEMessage::EnableAttachChild (INetMessageContainerType eType)
{
// Check context.
if (IsContainer())
- return FALSE;
+ return sal_False;
// Setup Content-Type header field.
ByteString aContentType;
@@ -1392,14 +1392,14 @@ BOOL INetMIMEMessage::EnableAttachChild (INetMessageContainerType eType)
SetContentTransferEncoding (String (CONSTASCII_STRINGPARAM("7bit")));
// Done.
- return TRUE;
+ return sal_True;
}
/*
* AttachChild.
*/
-BOOL INetMIMEMessage::AttachChild (
- INetMIMEMessage& rChildMsg, BOOL bOwner)
+sal_Bool INetMIMEMessage::AttachChild (
+ INetMIMEMessage& rChildMsg, sal_Bool bOwner)
{
if (IsContainer() /*&& rChildMsg.GetContentType().Len() */)
{
@@ -1407,21 +1407,21 @@ BOOL INetMIMEMessage::AttachChild (
aChildren.Insert (&rChildMsg, LIST_APPEND);
nNumChildren = aChildren.Count();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*
* DetachChild.
*/
-BOOL INetMIMEMessage::DetachChild (
- ULONG nIndex, INetMIMEMessage& rChildMsg) const
+sal_Bool INetMIMEMessage::DetachChild (
+ sal_uIntPtr nIndex, INetMIMEMessage& rChildMsg) const
{
if (IsContainer())
{
// Check document stream.
- if (GetDocumentLB() == NULL) return FALSE;
+ if (GetDocumentLB() == NULL) return sal_False;
SvStream *pDocStrm = new SvStream (GetDocumentLB());
// Initialize message buffer.
@@ -1496,7 +1496,7 @@ BOOL INetMIMEMessage::DetachChild (
* Compare buffered line with part/close delimiter.
* Increment current part index upon match.
*/
- USHORT nLen = (USHORT)(aLineBuf.Tell() & 0xffff);
+ sal_uInt16 nLen = (sal_uInt16)(aLineBuf.Tell() & 0xffff);
if (nLen == aDelim.Len())
{
if (aDelim.CompareTo ((const sal_Char *) aLineBuf.GetData(), nLen)
@@ -1522,7 +1522,7 @@ BOOL INetMIMEMessage::DetachChild (
pMsgRead = pMsgWrite = pMsgBuffer;
// Read document stream.
- ULONG nRead = pDocStrm->Read (
+ sal_uIntPtr nRead = pDocStrm->Read (
pMsgBuffer, sizeof (pMsgBuffer));
if (nRead > 0)
{
@@ -1541,7 +1541,7 @@ BOOL INetMIMEMessage::DetachChild (
{
// Requested part not found.
delete pDocStrm;
- return FALSE;
+ return sal_False;
}
}
}
@@ -1581,7 +1581,7 @@ BOOL INetMIMEMessage::DetachChild (
pMsgRead = pMsgWrite = pMsgBuffer;
// Read document stream.
- ULONG nRead = pDocStrm->Read (
+ sal_uIntPtr nRead = pDocStrm->Read (
pMsgBuffer, sizeof (pMsgBuffer));
if (nRead > 0)
{
@@ -1600,9 +1600,9 @@ BOOL INetMIMEMessage::DetachChild (
// Done.
if (pDocStrm) delete pDocStrm;
if (pMsgStrm) delete pMsgStrm;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*
@@ -1612,7 +1612,7 @@ SvStream& INetMIMEMessage::operator<< (SvStream& rStrm) const
{
INetRFC822Message::operator<< (rStrm);
- for (USHORT i = 0; i < INETMSG_MIME_NUMHDR; i++)
+ for (sal_uInt16 i = 0; i < INETMSG_MIME_NUMHDR; i++)
rStrm << static_cast<sal_uInt32>(m_nIndex[i]);
#ifdef ENABLE_BYTESTRING_STREAM_OPERATORS
@@ -1633,7 +1633,7 @@ SvStream& INetMIMEMessage::operator>> (SvStream& rStrm)
INetRFC822Message::operator>> (rStrm);
sal_uInt32 nTemp;
- for (USHORT i = 0; i < INETMSG_MIME_NUMHDR; i++)
+ for (sal_uInt16 i = 0; i < INETMSG_MIME_NUMHDR; i++)
{
rStrm >> nTemp;
m_nIndex[i] = nTemp;
diff --git a/tools/source/inet/inetstrm.cxx b/tools/source/inet/inetstrm.cxx
index ca76d8750bf8..33ed7c8dc41f 100644
--- a/tools/source/inet/inetstrm.cxx
+++ b/tools/source/inet/inetstrm.cxx
@@ -53,23 +53,23 @@ class INetMessageEncodeQPStream_Impl : public INetMessageIStream
{
SvStream *pMsgStrm;
- ULONG nMsgBufSiz;
+ sal_uIntPtr nMsgBufSiz;
sal_Char *pMsgBuffer;
sal_Char *pMsgRead;
sal_Char *pMsgWrite;
- ULONG nTokBufSiz;
+ sal_uIntPtr nTokBufSiz;
sal_Char *pTokBuffer;
sal_Char *pTokRead;
sal_Char *pTokWrite;
INetMessageStreamState eState;
- BOOL bDone;
+ sal_Bool bDone;
- virtual int GetMsgLine (sal_Char *pData, ULONG nSize);
+ virtual int GetMsgLine (sal_Char *pData, sal_uIntPtr nSize);
public:
- INetMessageEncodeQPStream_Impl (ULONG nMsgBufferSize = 1024);
+ INetMessageEncodeQPStream_Impl (sal_uIntPtr nMsgBufferSize = 1024);
virtual ~INetMessageEncodeQPStream_Impl (void);
};
@@ -84,10 +84,10 @@ class INetMessageDecodeQPStream_Impl : public INetMessageOStream
INetMessageStreamState eState;
SvMemoryStream *pMsgBuffer;
- ULONG nTokBufLen;
+ sal_uIntPtr nTokBufLen;
sal_Char pTokBuffer[4];
- virtual int PutMsgLine (const sal_Char *pData, ULONG nSize);
+ virtual int PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize);
public:
INetMessageDecodeQPStream_Impl (void);
@@ -104,22 +104,22 @@ class INetMessageEncode64Stream_Impl : public INetMessageIStream
{
SvStream *pMsgStrm;
- ULONG nMsgBufSiz;
+ sal_uIntPtr nMsgBufSiz;
sal_uInt8 *pMsgBuffer;
sal_uInt8 *pMsgRead;
sal_uInt8 *pMsgWrite;
- ULONG nTokBufSiz;
+ sal_uIntPtr nTokBufSiz;
sal_Char *pTokBuffer;
sal_Char *pTokRead;
sal_Char *pTokWrite;
- BOOL bDone;
+ sal_Bool bDone;
- virtual int GetMsgLine (sal_Char *pData, ULONG nSize);
+ virtual int GetMsgLine (sal_Char *pData, sal_uIntPtr nSize);
public:
- INetMessageEncode64Stream_Impl (ULONG nMsgBufferSize = 2048);
+ INetMessageEncode64Stream_Impl (sal_uIntPtr nMsgBufferSize = 2048);
virtual ~INetMessageEncode64Stream_Impl (void);
};
@@ -133,15 +133,15 @@ class INetMessageDecode64Stream_Impl : public INetMessageOStream
{
INetMessageStreamState eState;
- ULONG nMsgBufSiz;
+ sal_uIntPtr nMsgBufSiz;
sal_Char *pMsgBuffer;
sal_Char *pMsgRead;
sal_Char *pMsgWrite;
- virtual int PutMsgLine (const sal_Char *pData, ULONG nSize);
+ virtual int PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize);
public:
- INetMessageDecode64Stream_Impl (ULONG nMsgBufferSize = 128);
+ INetMessageDecode64Stream_Impl (sal_uIntPtr nMsgBufferSize = 128);
virtual ~INetMessageDecode64Stream_Impl (void);
};
@@ -167,7 +167,7 @@ INetIStream::~INetIStream (void)
/*
* Read.
*/
-int INetIStream::Read (sal_Char *pData, ULONG nSize)
+int INetIStream::Read (sal_Char *pData, sal_uIntPtr nSize)
{
return GetData (pData, nSize);
}
@@ -178,7 +178,7 @@ int INetIStream::Read (sal_Char *pData, ULONG nSize)
void INetIStream::Decode64 (SvStream& rIn, SvStream& rOut)
{
INetMessage aMsg;
- aMsg.SetDocumentLB(new SvAsyncLockBytes(&rOut, FALSE));
+ aMsg.SetDocumentLB(new SvAsyncLockBytes(&rOut, sal_False));
INetMessageDecode64Stream_Impl aStream (8192);
aStream.SetTargetMessage (&aMsg);
@@ -200,7 +200,7 @@ void INetIStream::Encode64 (SvStream& rIn, SvStream& rOut)
{
INetMessage aMsg;
aMsg.SetDocumentLB (
- new SvLockBytes (&rIn, FALSE));
+ new SvLockBytes (&rIn, sal_False));
INetMessageEncode64Stream_Impl aStream (8192);
aStream.SetSourceMessage (&aMsg);
@@ -236,7 +236,7 @@ INetOStream::~INetOStream (void)
/*
* Write.
*/
-int INetOStream::Write (const sal_Char *pData, ULONG nSize)
+int INetOStream::Write (const sal_Char *pData, sal_uIntPtr nSize)
{
return PutData (pData, nSize);
}
@@ -249,9 +249,9 @@ int INetOStream::Write (const sal_Char *pData, ULONG nSize)
/*
* INetMessageIStream.
*/
-INetMessageIStream::INetMessageIStream (ULONG nBufferSize)
+INetMessageIStream::INetMessageIStream (sal_uIntPtr nBufferSize)
: pSourceMsg (NULL),
- bHeaderGenerated (FALSE),
+ bHeaderGenerated (sal_False),
nBufSiz (nBufferSize),
pMsgStrm (NULL),
pMsgBuffer (new SvMemoryStream)
@@ -274,7 +274,7 @@ INetMessageIStream::~INetMessageIStream (void)
/*
* GetData.
*/
-int INetMessageIStream::GetData (sal_Char *pData, ULONG nSize)
+int INetMessageIStream::GetData (sal_Char *pData, sal_uIntPtr nSize)
{
if (pSourceMsg == NULL) return INETSTREAM_STATUS_ERROR;
@@ -284,13 +284,13 @@ int INetMessageIStream::GetData (sal_Char *pData, ULONG nSize)
while (pWBuf < pWEnd)
{
// Caller's buffer not yet filled.
- ULONG n = pRead - pWrite;
+ sal_uIntPtr n = pRead - pWrite;
if (n > 0)
{
// Bytes still in buffer.
- ULONG m = pWEnd - pWBuf;
+ sal_uIntPtr m = pWEnd - pWBuf;
if (m < n) n = m;
- for (ULONG i = 0; i < n; i++) *pWBuf++ = *pWrite++;
+ for (sal_uIntPtr i = 0; i < n; i++) *pWBuf++ = *pWrite++;
}
else
{
@@ -309,7 +309,7 @@ int INetMessageIStream::GetData (sal_Char *pData, ULONG nSize)
if (!bHeaderGenerated)
{
// Header generated. Insert empty line.
- bHeaderGenerated = TRUE;
+ bHeaderGenerated = sal_True;
*pRead++ = '\r';
*pRead++ = '\n';
}
@@ -327,7 +327,7 @@ int INetMessageIStream::GetData (sal_Char *pData, ULONG nSize)
/*
* GetMsgLine.
*/
-int INetMessageIStream::GetMsgLine (sal_Char *pData, ULONG nSize)
+int INetMessageIStream::GetMsgLine (sal_Char *pData, sal_uIntPtr nSize)
{
if (pSourceMsg == NULL) return INETSTREAM_STATUS_ERROR;
@@ -336,7 +336,7 @@ int INetMessageIStream::GetMsgLine (sal_Char *pData, ULONG nSize)
if (!bHeaderGenerated)
{
- ULONG i, n;
+ sal_uIntPtr i, n;
if (pMsgBuffer->Tell() == 0)
{
@@ -379,7 +379,7 @@ int INetMessageIStream::GetMsgLine (sal_Char *pData, ULONG nSize)
if (pMsgStrm == NULL)
pMsgStrm = new SvStream (pSourceMsg->GetDocumentLB());
- ULONG nRead = pMsgStrm->Read (pWBuf, (pWEnd - pWBuf));
+ sal_uIntPtr nRead = pMsgStrm->Read (pWBuf, (pWEnd - pWBuf));
pWBuf += nRead;
}
}
@@ -396,7 +396,7 @@ int INetMessageIStream::GetMsgLine (sal_Char *pData, ULONG nSize)
*/
INetMessageOStream::INetMessageOStream (void)
: pTargetMsg (NULL),
- bHeaderParsed (FALSE),
+ bHeaderParsed (sal_False),
eOState (INETMSG_EOL_BEGIN),
pMsgBuffer (new SvMemoryStream)
{
@@ -427,7 +427,7 @@ INetMessageOStream::~INetMessageOStream (void)
* PutData.
* (Simple Field Parsing (RFC822, Appendix B)).
*/
-int INetMessageOStream::PutData (const sal_Char *pData, ULONG nSize)
+int INetMessageOStream::PutData (const sal_Char *pData, sal_uIntPtr nSize)
{
if (pTargetMsg == NULL) return INETSTREAM_STATUS_ERROR;
@@ -462,7 +462,7 @@ int INetMessageOStream::PutData (const sal_Char *pData, ULONG nSize)
pMsgBuffer->Seek (STREAM_SEEK_TO_BEGIN);
// Mark header parsed.
- bHeaderParsed = TRUE;
+ bHeaderParsed = sal_True;
}
else if ((*pData == ' ') || (*pData == '\t'))
{
@@ -534,7 +534,7 @@ int INetMessageOStream::PutData (const sal_Char *pData, ULONG nSize)
/*
* PutMsgLine.
*/
-int INetMessageOStream::PutMsgLine (const sal_Char *pData, ULONG nSize)
+int INetMessageOStream::PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize)
{
// Check for message container.
if (pTargetMsg == NULL) return INETSTREAM_STATUS_ERROR;
@@ -543,7 +543,7 @@ int INetMessageOStream::PutMsgLine (const sal_Char *pData, ULONG nSize)
if (!IsHeaderParsed())
{
ByteString aField (pData);
- USHORT nPos = aField.Search (':');
+ sal_uInt16 nPos = aField.Search (':');
if (nPos != STRING_NOTFOUND)
{
ByteString aName (
@@ -582,7 +582,7 @@ int INetMessageOStream::PutMsgLine (const sal_Char *pData, ULONG nSize)
/*
* INetMessageIOStream.
*/
-INetMessageIOStream::INetMessageIOStream (ULONG nBufferSize)
+INetMessageIOStream::INetMessageIOStream (sal_uIntPtr nBufferSize)
: INetMessageIStream (nBufferSize),
INetMessageOStream ()
{
@@ -614,15 +614,15 @@ static const sal_Char ebcdic[] = {
* INetMessageEncodeQPStream_Impl.
*/
INetMessageEncodeQPStream_Impl::INetMessageEncodeQPStream_Impl (
- ULONG nMsgBufferSize)
+ sal_uIntPtr nMsgBufferSize)
: INetMessageIStream (),
pMsgStrm (NULL),
nMsgBufSiz (nMsgBufferSize),
nTokBufSiz (80),
eState (INETMSG_EOL_SCR),
- bDone (FALSE)
+ bDone (sal_False)
{
- GenerateHeader (FALSE);
+ GenerateHeader (sal_False);
pMsgBuffer = new sal_Char[nMsgBufSiz];
pMsgRead = pMsgWrite = pMsgBuffer;
@@ -644,7 +644,7 @@ INetMessageEncodeQPStream_Impl::~INetMessageEncodeQPStream_Impl (void)
/*
* GetMsgLine.
*/
-int INetMessageEncodeQPStream_Impl::GetMsgLine (sal_Char *pData, ULONG nSize)
+int INetMessageEncodeQPStream_Impl::GetMsgLine (sal_Char *pData, sal_uIntPtr nSize)
{
INetMessage *pMsg = GetSourceMessage ();
if (pMsg == NULL) return INETSTREAM_STATUS_ERROR;
@@ -773,7 +773,7 @@ int INetMessageEncodeQPStream_Impl::GetMsgLine (sal_Char *pData, ULONG nSize)
pMsgRead = pMsgWrite = pMsgBuffer;
// Read next message block.
- ULONG nRead = pMsgStrm->Read (pMsgBuffer, nMsgBufSiz);
+ sal_uIntPtr nRead = pMsgStrm->Read (pMsgBuffer, nMsgBufSiz);
if (nRead > 0)
{
// Set read pointer.
@@ -788,7 +788,7 @@ int INetMessageEncodeQPStream_Impl::GetMsgLine (sal_Char *pData, ULONG nSize)
*pTokRead++ = '\r';
*pTokRead++ = '\n';
- bDone = TRUE;
+ bDone = sal_True;
}
else
{
@@ -850,7 +850,7 @@ INetMessageDecodeQPStream_Impl::INetMessageDecodeQPStream_Impl (void)
pMsgBuffer (new SvMemoryStream),
nTokBufLen (0)
{
- ParseHeader (FALSE);
+ ParseHeader (sal_False);
}
/*
@@ -865,7 +865,7 @@ INetMessageDecodeQPStream_Impl::~INetMessageDecodeQPStream_Impl (void)
* PutMsgLine.
*/
int INetMessageDecodeQPStream_Impl::PutMsgLine (
- const sal_Char *pData, ULONG nSize)
+ const sal_Char *pData, sal_uIntPtr nSize)
{
INetMessage *pMsg = GetTargetMessage();
if (pMsg == NULL) return INETSTREAM_STATUS_ERROR;
@@ -964,14 +964,14 @@ static const sal_Char six2pr[64] = {
* INetMessageEncode64Stream_Impl.
*/
INetMessageEncode64Stream_Impl::INetMessageEncode64Stream_Impl (
- ULONG nMsgBufferSize)
+ sal_uIntPtr nMsgBufferSize)
: INetMessageIStream (),
pMsgStrm (NULL),
nMsgBufSiz (nMsgBufferSize),
nTokBufSiz (80),
- bDone (FALSE)
+ bDone (sal_False)
{
- GenerateHeader (FALSE);
+ GenerateHeader (sal_False);
pMsgBuffer = new sal_uInt8[nMsgBufSiz];
pMsgRead = pMsgWrite = pMsgBuffer;
@@ -993,7 +993,7 @@ INetMessageEncode64Stream_Impl::~INetMessageEncode64Stream_Impl (void)
/*
* GetMsgLine.
*/
-int INetMessageEncode64Stream_Impl::GetMsgLine (sal_Char *pData, ULONG nSize)
+int INetMessageEncode64Stream_Impl::GetMsgLine (sal_Char *pData, sal_uIntPtr nSize)
{
INetMessage *pMsg = GetSourceMessage ();
if (pMsg == NULL) return INETSTREAM_STATUS_ERROR;
@@ -1063,7 +1063,7 @@ int INetMessageEncode64Stream_Impl::GetMsgLine (sal_Char *pData, ULONG nSize)
pMsgRead = pMsgWrite = pMsgBuffer;
// Read next message block.
- ULONG nRead = pMsgStrm->Read (pMsgBuffer, nMsgBufSiz);
+ sal_uIntPtr nRead = pMsgStrm->Read (pMsgBuffer, nMsgBufSiz);
if (nRead > 0)
{
// Set read pointer.
@@ -1092,7 +1092,7 @@ int INetMessageEncode64Stream_Impl::GetMsgLine (sal_Char *pData, ULONG nSize)
*pTokRead++ = '\n';
// Mark we're done.
- bDone = TRUE;
+ bDone = sal_True;
}
else
{
@@ -1108,7 +1108,7 @@ int INetMessageEncode64Stream_Impl::GetMsgLine (sal_Char *pData, ULONG nSize)
pTokRead = pTokWrite = pTokBuffer;
// Reset done flag, if everything has been done.
- // if (pWBuf == pData) bDone = FALSE;
+ // if (pWBuf == pData) bDone = sal_False;
// Return.
return (pWBuf - pData);
@@ -1172,12 +1172,12 @@ static const sal_uInt8 pr2six[256] = {
* INetMessageDecode64Stream_Impl.
*/
INetMessageDecode64Stream_Impl::INetMessageDecode64Stream_Impl (
- ULONG nMsgBufferSize)
+ sal_uIntPtr nMsgBufferSize)
: INetMessageOStream (),
eState (INETMSG_EOL_SCR),
nMsgBufSiz (nMsgBufferSize)
{
- ParseHeader (FALSE);
+ ParseHeader (sal_False);
pMsgBuffer = new sal_Char[nMsgBufSiz];
pMsgRead = pMsgWrite = pMsgBuffer;
@@ -1195,7 +1195,7 @@ INetMessageDecode64Stream_Impl::~INetMessageDecode64Stream_Impl (void)
* PutMsgLine.
*/
int INetMessageDecode64Stream_Impl::PutMsgLine (
- const sal_Char *pData, ULONG nSize)
+ const sal_Char *pData, sal_uIntPtr nSize)
{
INetMessage *pMsg = GetTargetMessage ();
if (pMsg == NULL) return INETSTREAM_STATUS_ERROR;
@@ -1298,7 +1298,7 @@ int INetMessageDecode64Stream_Impl::PutMsgLine (
/*
* INetMIMEMessageStream.
*/
-INetMIMEMessageStream::INetMIMEMessageStream (ULONG nBufferSize)
+INetMIMEMessageStream::INetMIMEMessageStream (sal_uIntPtr nBufferSize)
: INetMessageIOStream (nBufferSize),
eState (INETMSG_EOL_BEGIN),
nChildIndex (0),
@@ -1360,7 +1360,7 @@ INetMIMEMessageStream::GetMsgEncoding (const String& rContentType)
* GetMsgLine.
* (Message Generator).
*/
-int INetMIMEMessageStream::GetMsgLine (sal_Char *pData, ULONG nSize)
+int INetMIMEMessageStream::GetMsgLine (sal_Char *pData, sal_uIntPtr nSize)
{
// Check for message container.
INetMIMEMessage *pMsg = GetSourceMessage();
@@ -1594,7 +1594,7 @@ int INetMIMEMessageStream::GetMsgLine (sal_Char *pData, ULONG nSize)
* PutMsgLine.
* (Message Parser).
*/
-int INetMIMEMessageStream::PutMsgLine (const sal_Char *pData, ULONG nSize)
+int INetMIMEMessageStream::PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize)
{
// Check for message container.
INetMIMEMessage *pMsg = GetTargetMessage();
@@ -1623,8 +1623,8 @@ int INetMIMEMessageStream::PutMsgLine (const sal_Char *pData, ULONG nSize)
pMsg->SetChildCount( pMsg->GetChildCount() + 1);
INetMIMEMessage* pNewMessage = new INetMIMEMessage;
pNewMessage->SetDocumentLB (
- new SvAsyncLockBytes(new SvCacheStream, FALSE));
- pMsg->AttachChild( *pNewMessage, TRUE );
+ new SvAsyncLockBytes(new SvCacheStream, sal_False));
+ pMsg->AttachChild( *pNewMessage, sal_True );
// Encapsulated message body. Create message parser stream.
pChildStrm = new INetMIMEMessageStream;
@@ -1656,7 +1656,7 @@ int INetMIMEMessageStream::PutMsgLine (const sal_Char *pData, ULONG nSize)
ByteString aLowerType (aType);
aLowerType.ToLowerAscii();
- USHORT nPos = aLowerType.Search ("boundary=");
+ sal_uInt16 nPos = aLowerType.Search ("boundary=");
ByteString aBoundary (aType.Copy (nPos + 9));
aBoundary.EraseLeadingAndTrailingChars (' ');
@@ -1678,7 +1678,7 @@ int INetMIMEMessageStream::PutMsgLine (const sal_Char *pData, ULONG nSize)
if (pMsgBuffer == NULL) pMsgBuffer = new SvMemoryStream;
pMsgBuffer->Write (pData, nSize);
- ULONG nBufSize = pMsgBuffer->Tell();
+ sal_uIntPtr nBufSize = pMsgBuffer->Tell();
const sal_Char* pChar;
const sal_Char* pOldPos;
@@ -1735,9 +1735,9 @@ int INetMIMEMessageStream::PutMsgLine (const sal_Char *pData, ULONG nSize)
new INetMIMEMessage;
pNewMessage->SetDocumentLB (
new SvAsyncLockBytes (
- new SvCacheStream, FALSE));
+ new SvCacheStream, sal_False));
- pMsg->AttachChild( *pNewMessage, TRUE );
+ pMsg->AttachChild( *pNewMessage, sal_True );
// Encapsulated message body. Create message parser stream.
pChildStrm = new INetMIMEMessageStream;
diff --git a/tools/source/memtools/contnr.cxx b/tools/source/memtools/contnr.cxx
index 4a4ee47886ee..63dc74e37441 100644..100755
--- a/tools/source/memtools/contnr.cxx
+++ b/tools/source/memtools/contnr.cxx
@@ -84,7 +84,7 @@ const char* CBlock::DbgCheckCBlock( const void* pBlock )
|*
*************************************************************************/
-CBlock::CBlock( USHORT nInitSize, CBlock* _pPrev, CBlock* _pNext )
+CBlock::CBlock( sal_uInt16 nInitSize, CBlock* _pPrev, CBlock* _pNext )
{
DBG_CTOR( CBlock, DbgCheckCBlock );
@@ -107,7 +107,7 @@ CBlock::CBlock( USHORT nInitSize, CBlock* _pPrev, CBlock* _pNext )
|*
*************************************************************************/
-CBlock::CBlock( USHORT _nSize, CBlock* _pPrev )
+CBlock::CBlock( sal_uInt16 _nSize, CBlock* _pPrev )
{
DBG_CTOR( CBlock, DbgCheckCBlock );
DBG_ASSERT( _nSize, "CBlock::CBlock(): nSize == 0" );
@@ -175,7 +175,7 @@ inline CBlock::~CBlock()
|*
*************************************************************************/
-void CBlock::Insert( void* p, USHORT nIndex, USHORT nReSize )
+void CBlock::Insert( void* p, sal_uInt16 nIndex, sal_uInt16 nReSize )
{
DBG_CHKTHIS( CBlock, DbgCheckCBlock );
DBG_ASSERT( nIndex <= nCount, "CBlock::Insert(): Index > nCount" );
@@ -231,12 +231,12 @@ void CBlock::Insert( void* p, USHORT nIndex, USHORT nReSize )
|*
*************************************************************************/
-CBlock* CBlock::Split( void* p, USHORT nIndex, USHORT nReSize )
+CBlock* CBlock::Split( void* p, sal_uInt16 nIndex, sal_uInt16 nReSize )
{
DBG_CHKTHIS( CBlock, DbgCheckCBlock );
- USHORT nNewSize;
- USHORT nMiddle;
+ sal_uInt16 nNewSize;
+ sal_uInt16 nMiddle;
CBlock* pNewBlock;
nMiddle = nCount/2;
@@ -368,7 +368,7 @@ CBlock* CBlock::Split( void* p, USHORT nIndex, USHORT nReSize )
|*
*************************************************************************/
-void* CBlock::Remove( USHORT nIndex, USHORT nReSize )
+void* CBlock::Remove( sal_uInt16 nIndex, sal_uInt16 nReSize )
{
DBG_CHKTHIS( CBlock, DbgCheckCBlock );
@@ -427,7 +427,7 @@ void* CBlock::Remove( USHORT nIndex, USHORT nReSize )
|*
*************************************************************************/
-inline void* CBlock::Replace( void* p, USHORT nIndex )
+inline void* CBlock::Replace( void* p, sal_uInt16 nIndex )
{
DBG_CHKTHIS( CBlock, DbgCheckCBlock );
@@ -448,7 +448,7 @@ inline void* CBlock::Replace( void* p, USHORT nIndex )
|*
*************************************************************************/
-inline void** CBlock::GetObjectPtr( USHORT nIndex )
+inline void** CBlock::GetObjectPtr( sal_uInt16 nIndex )
{
DBG_CHKTHIS( CBlock, DbgCheckCBlock );
@@ -465,7 +465,7 @@ inline void** CBlock::GetObjectPtr( USHORT nIndex )
|*
*************************************************************************/
-void CBlock::SetSize( USHORT nNewSize )
+void CBlock::SetSize( sal_uInt16 nNewSize )
{
DBG_CHKTHIS( CBlock, DbgCheckCBlock );
DBG_ASSERT( nNewSize, "CBlock::SetSize(): nNewSize == 0" );
@@ -589,7 +589,7 @@ void Container::ImpCopyContainer( const Container* pCont2 )
|*
*************************************************************************/
-Container::Container( USHORT _nBlockSize, USHORT _nInitSize, USHORT _nReSize )
+Container::Container( sal_uInt16 _nBlockSize, sal_uInt16 _nInitSize, sal_uInt16 _nReSize )
{
DBG_CTOR( Container, DbgCheckContainer );
@@ -654,7 +654,7 @@ Container::Container( USHORT _nBlockSize, USHORT _nInitSize, USHORT _nReSize )
|*
*************************************************************************/
-Container::Container( ULONG nSize )
+Container::Container( sal_uIntPtr nSize )
{
DBG_CTOR( Container, DbgCheckContainer );
@@ -675,7 +675,7 @@ Container::Container( ULONG nSize )
// Muss mehr als ein Block angelegt werden
if ( nSize <= nBlockSize )
{
- pFirstBlock = new CBlock( (USHORT)nSize, NULL );
+ pFirstBlock = new CBlock( (sal_uInt16)nSize, NULL );
pLastBlock = pFirstBlock;
}
else
@@ -696,7 +696,7 @@ Container::Container( ULONG nSize )
nSize -= nBlockSize;
}
- pLastBlock = new CBlock( (USHORT)nSize, pBlock1 );
+ pLastBlock = new CBlock( (sal_uInt16)nSize, pBlock1 );
pBlock1->SetNextBlock( pLastBlock );
}
@@ -756,7 +756,7 @@ Container::~Container()
|*
*************************************************************************/
-void Container::ImpInsert( void* p, CBlock* pBlock, USHORT nIndex )
+void Container::ImpInsert( void* p, CBlock* pBlock, sal_uInt16 nIndex )
{
DBG_CHKTHIS( Container, DbgCheckContainer );
@@ -856,7 +856,7 @@ void Container::Insert( void* p )
|*
*************************************************************************/
-void Container::Insert( void* p, ULONG nIndex )
+void Container::Insert( void* p, sal_uIntPtr nIndex )
{
if ( nCount <= nIndex )
{
@@ -875,7 +875,7 @@ void Container::Insert( void* p, ULONG nIndex )
pTemp = pTemp->GetNextBlock();
}
- ImpInsert( p, pTemp, (USHORT)nIndex );
+ ImpInsert( p, pTemp, (sal_uInt16)nIndex );
}
}
@@ -891,7 +891,7 @@ void Container::Insert( void* p, ULONG nIndex )
void Container::Insert( void* pNew, void* pOld )
{
- ULONG nIndex = GetPos( pOld );
+ sal_uIntPtr nIndex = GetPos( pOld );
if ( nIndex != CONTAINER_ENTRY_NOTFOUND )
Insert( pNew, nIndex );
}
@@ -906,7 +906,7 @@ void Container::Insert( void* pNew, void* pOld )
|*
*************************************************************************/
-void* Container::ImpRemove( CBlock* pBlock, USHORT nIndex )
+void* Container::ImpRemove( CBlock* pBlock, sal_uInt16 nIndex )
{
DBG_CHKTHIS( Container, DbgCheckContainer );
@@ -1002,7 +1002,7 @@ void* Container::Remove()
|*
*************************************************************************/
-void* Container::Remove( ULONG nIndex )
+void* Container::Remove( sal_uIntPtr nIndex )
{
// Ist Index nicht innerhalb des Containers, dann NULL zurueckgeben
if ( nCount <= nIndex )
@@ -1017,7 +1017,7 @@ void* Container::Remove( ULONG nIndex )
pTemp = pTemp->GetNextBlock();
}
- return ImpRemove( pTemp, (USHORT)nIndex );
+ return ImpRemove( pTemp, (sal_uInt16)nIndex );
}
}
@@ -1051,7 +1051,7 @@ void* Container::Replace( void* p )
|*
*************************************************************************/
-void* Container::Replace( void* p, ULONG nIndex )
+void* Container::Replace( void* p, sal_uIntPtr nIndex )
{
DBG_CHKTHIS( Container, DbgCheckContainer );
@@ -1068,7 +1068,7 @@ void* Container::Replace( void* p, ULONG nIndex )
pTemp = pTemp->GetNextBlock();
}
- return pTemp->Replace( p, (USHORT)nIndex );
+ return pTemp->Replace( p, (sal_uInt16)nIndex );
}
}
@@ -1082,7 +1082,7 @@ void* Container::Replace( void* p, ULONG nIndex )
|*
*************************************************************************/
-void Container::SetSize( ULONG nNewSize )
+void Container::SetSize( sal_uIntPtr nNewSize )
{
DBG_CHKTHIS( Container, DbgCheckContainer );
@@ -1092,7 +1092,7 @@ void Container::SetSize( ULONG nNewSize )
if ( nNewSize != nCount )
{
CBlock* pTemp;
- ULONG nTemp;
+ sal_uIntPtr nTemp;
// Wird verkleinert
if ( nNewSize < nCount )
@@ -1106,14 +1106,14 @@ void Container::SetSize( ULONG nNewSize )
}
// Alle folgenden Bloecke loeschen
- BOOL bLast = FALSE;
+ sal_Bool bLast = sal_False;
CBlock* pDelNext;
CBlock* pDelBlock = pTemp->GetNextBlock();
while ( pDelBlock )
{
// Muss CurrentBlock umgesetzt werden
if ( pDelBlock == pCurBlock )
- bLast = TRUE;
+ bLast = sal_True;
pDelNext = pDelBlock->GetNextBlock();
delete pDelBlock;
pDelBlock = pDelNext;
@@ -1124,7 +1124,7 @@ void Container::SetSize( ULONG nNewSize )
{
pLastBlock = pTemp;
pTemp->SetNextBlock( NULL );
- pTemp->SetSize( (USHORT)(nNewSize-nTemp) );
+ pTemp->SetSize( (sal_uInt16)(nNewSize-nTemp) );
}
else
{
@@ -1151,7 +1151,7 @@ void Container::SetSize( ULONG nNewSize )
// Muss mehr als ein Block angelegt werden
if ( nNewSize <= nBlockSize )
{
- pFirstBlock = new CBlock( (USHORT)nNewSize, NULL );
+ pFirstBlock = new CBlock( (sal_uInt16)nNewSize, NULL );
pLastBlock = pFirstBlock;
}
else
@@ -1172,7 +1172,7 @@ void Container::SetSize( ULONG nNewSize )
nNewSize -= nBlockSize;
}
- pLastBlock = new CBlock( (USHORT)nNewSize, pBlock1 );
+ pLastBlock = new CBlock( (sal_uInt16)nNewSize, pBlock1 );
pBlock1->SetNextBlock( pLastBlock );
}
@@ -1180,7 +1180,7 @@ void Container::SetSize( ULONG nNewSize )
}
// Reicht es, den letzen Puffer in der Groesse anzupassen
else if ( (nTemp+pTemp->Count()) <= nBlockSize )
- pTemp->SetSize( (USHORT)(nTemp+pTemp->Count()) );
+ pTemp->SetSize( (sal_uInt16)(nTemp+pTemp->Count()) );
else
{
// Puffer auf max. Blockgroesse setzen
@@ -1201,7 +1201,7 @@ void Container::SetSize( ULONG nNewSize )
// Den letzten Block anlegen
if ( nTemp )
{
- pLastBlock = new CBlock( (USHORT)nTemp, pTemp );
+ pLastBlock = new CBlock( (sal_uInt16)nTemp, pTemp );
pTemp->SetNextBlock( pLastBlock );
}
else
@@ -1278,7 +1278,7 @@ void* Container::GetCurObject() const
|*
*************************************************************************/
-ULONG Container::GetCurPos() const
+sal_uIntPtr Container::GetCurPos() const
{
DBG_CHKTHIS( Container, DbgCheckContainer );
@@ -1289,7 +1289,7 @@ ULONG Container::GetCurPos() const
{
// Block suchen
CBlock* pTemp = pFirstBlock;
- ULONG nTemp = 0;
+ sal_uIntPtr nTemp = 0;
while ( pTemp != pCurBlock )
{
nTemp += pTemp->Count();
@@ -1310,7 +1310,7 @@ ULONG Container::GetCurPos() const
|*
*************************************************************************/
-void** Container::GetObjectPtr( ULONG nIndex )
+void** Container::GetObjectPtr( sal_uIntPtr nIndex )
{
DBG_CHKTHIS( Container, DbgCheckContainer );
@@ -1328,7 +1328,7 @@ void** Container::GetObjectPtr( ULONG nIndex )
}
// Item innerhalb des gefundenen Blocks zurueckgeben
- return pTemp->GetObjectPtr( (USHORT)nIndex );
+ return pTemp->GetObjectPtr( (sal_uInt16)nIndex );
}
}
@@ -1342,7 +1342,7 @@ void** Container::GetObjectPtr( ULONG nIndex )
|*
*************************************************************************/
-void* Container::GetObject( ULONG nIndex ) const
+void* Container::GetObject( sal_uIntPtr nIndex ) const
{
DBG_CHKTHIS( Container, DbgCheckContainer );
@@ -1360,7 +1360,7 @@ void* Container::GetObject( ULONG nIndex ) const
}
// Item innerhalb des gefundenen Blocks zurueckgeben
- return pTemp->GetObject( (USHORT)nIndex );
+ return pTemp->GetObject( (sal_uInt16)nIndex );
}
}
@@ -1374,15 +1374,15 @@ void* Container::GetObject( ULONG nIndex ) const
|*
*************************************************************************/
-ULONG Container::GetPos( const void* p ) const
+sal_uIntPtr Container::GetPos( const void* p ) const
{
DBG_CHKTHIS( Container, DbgCheckContainer );
void** pNodes;
CBlock* pTemp;
- ULONG nTemp;
- USHORT nBlockCount;
- USHORT i;
+ sal_uIntPtr nTemp;
+ sal_uInt16 nBlockCount;
+ sal_uInt16 i;
// Block suchen
pTemp = pFirstBlock;
@@ -1416,8 +1416,8 @@ ULONG Container::GetPos( const void* p ) const
|*
*************************************************************************/
-ULONG Container::GetPos( const void* p, ULONG nStartIndex,
- BOOL bForward ) const
+sal_uIntPtr Container::GetPos( const void* p, sal_uIntPtr nStartIndex,
+ sal_Bool bForward ) const
{
DBG_CHKTHIS( Container, DbgCheckContainer );
@@ -1427,12 +1427,12 @@ ULONG Container::GetPos( const void* p, ULONG nStartIndex,
else
{
void** pNodes;
- USHORT nBlockCount;
- USHORT i;
+ sal_uInt16 nBlockCount;
+ sal_uInt16 i;
// Block suchen
CBlock* pTemp = pFirstBlock;
- ULONG nTemp = 0;
+ sal_uIntPtr nTemp = 0;
while ( nTemp+pTemp->Count() <= nStartIndex )
{
nTemp += pTemp->Count();
@@ -1443,7 +1443,7 @@ ULONG Container::GetPos( const void* p, ULONG nStartIndex,
if ( bForward )
{
// Alle Bloecke durchrsuchen
- i = (USHORT)(nStartIndex - nTemp);
+ i = (sal_uInt16)(nStartIndex - nTemp);
pNodes = pTemp->GetObjectPtr( i );
do
{
@@ -1465,12 +1465,12 @@ ULONG Container::GetPos( const void* p, ULONG nStartIndex,
else
break;
}
- while ( TRUE );
+ while ( sal_True );
}
else
{
// Alle Bloecke durchrsuchen
- i = (USHORT)(nStartIndex-nTemp)+1;
+ i = (sal_uInt16)(nStartIndex-nTemp)+1;
pNodes = pTemp->GetObjectPtr( i-1 );
do
{
@@ -1494,7 +1494,7 @@ ULONG Container::GetPos( const void* p, ULONG nStartIndex,
else
break;
}
- while ( TRUE );
+ while ( sal_True );
}
}
@@ -1511,7 +1511,7 @@ ULONG Container::GetPos( const void* p, ULONG nStartIndex,
|*
*************************************************************************/
-void* Container::Seek( ULONG nIndex )
+void* Container::Seek( sal_uIntPtr nIndex )
{
DBG_CHKTHIS( Container, DbgCheckContainer );
@@ -1530,7 +1530,7 @@ void* Container::Seek( ULONG nIndex )
// Item innerhalb des gefundenen Blocks zurueckgeben
pCurBlock = pTemp;
- nCurIndex = (USHORT)nIndex;
+ nCurIndex = (sal_uInt16)nIndex;
return pCurBlock->GetObject( nCurIndex );
}
}
@@ -1689,20 +1689,20 @@ Container& Container::operator =( const Container& r )
|*
*************************************************************************/
-BOOL Container::operator ==( const Container& r ) const
+sal_Bool Container::operator ==( const Container& r ) const
{
DBG_CHKTHIS( Container, DbgCheckContainer );
if ( nCount != r.nCount )
- return FALSE;
+ return sal_False;
- ULONG i = 0;
+ sal_uIntPtr i = 0;
while ( i < nCount )
{
if ( GetObject( i ) != r.GetObject( i ) )
- return FALSE;
+ return sal_False;
i++;
}
- return TRUE;
+ return sal_True;
}
diff --git a/tools/source/memtools/mempool.cxx b/tools/source/memtools/mempool.cxx
index 185ba731b3a2..e8be417b15a2 100644..100755
--- a/tools/source/memtools/mempool.cxx
+++ b/tools/source/memtools/mempool.cxx
@@ -43,7 +43,7 @@
*************************************************************************/
FixedMemPool::FixedMemPool (
- char const * pTypeName, USHORT nTypeSize, USHORT, USHORT)
+ char const * pTypeName, sal_uInt16 nTypeSize, sal_uInt16, sal_uInt16)
: m_pTypeName (pTypeName)
{
char name[RTL_CACHE_NAME_LENGTH + 1];
diff --git a/tools/source/memtools/multisel.cxx b/tools/source/memtools/multisel.cxx
index 1e4da74348f4..8fd94361d2a3 100644..100755
--- a/tools/source/memtools/multisel.cxx
+++ b/tools/source/memtools/multisel.cxx
@@ -63,7 +63,7 @@ static void Print( const MultiSelection* pSel )
}
DbgOutf( "SelCount: %4ld\n", pSel->nSelCount );
DbgOutf( "SubCount: %4ld\n", pSel->aSels.Count() );
- for ( ULONG nPos = 0; nPos < pSel->aSels.Count(); ++nPos )
+ for ( sal_uIntPtr nPos = 0; nPos < pSel->aSels.Count(); ++nPos )
{
DbgOutf( "SubSel #%2ld: %4ld-%4ld\n", nPos,
pSel->aSels.GetObject(nPos)->Min(),
@@ -93,10 +93,10 @@ void MultiSelection::ImplClear()
// -----------------------------------------------------------------------
-ULONG MultiSelection::ImplFindSubSelection( long nIndex ) const
+sal_uIntPtr MultiSelection::ImplFindSubSelection( long nIndex ) const
{
// iterate through the sub selections
- ULONG n = 0;
+ sal_uIntPtr n = 0;
for ( ;
n < aSels.Count() && nIndex > aSels.GetObject(n)->Max();
++n ) {} /* empty loop */
@@ -105,11 +105,11 @@ ULONG MultiSelection::ImplFindSubSelection( long nIndex ) const
// -----------------------------------------------------------------------
-BOOL MultiSelection::ImplMergeSubSelections( ULONG nPos1, ULONG nPos2 )
+sal_Bool MultiSelection::ImplMergeSubSelections( sal_uIntPtr nPos1, sal_uIntPtr nPos2 )
{
// didn't a sub selection at nPos2 exist?
if ( nPos2 >= aSels.Count() )
- return FALSE;
+ return sal_False;
// did the sub selections touch each other?
if ( (aSels.GetObject(nPos1)->Max() + 1) == aSels.GetObject(nPos2)->Min() )
@@ -117,10 +117,10 @@ BOOL MultiSelection::ImplMergeSubSelections( ULONG nPos1, ULONG nPos2 )
// merge them
aSels.GetObject(nPos1)->Max() = aSels.GetObject(nPos2)->Max();
delete aSels.Remove(nPos2);
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -129,8 +129,8 @@ MultiSelection::MultiSelection():
aTotRange( 0, -1 ),
nCurSubSel(0),
nSelCount(0),
- bCurValid(FALSE),
- bSelectNew(FALSE)
+ bCurValid(sal_False),
+ bSelectNew(sal_False)
{
}
@@ -140,8 +140,8 @@ MultiSelection::MultiSelection( const UniString& rString, sal_Unicode cRange, sa
aTotRange(0,RANGE_MAX),
nCurSubSel(0),
nSelCount(0),
- bCurValid(FALSE),
- bSelectNew(FALSE)
+ bCurValid(sal_False),
+ bSelectNew(sal_False)
{
// Dies ist nur ein Schnellschuss und sollte bald optimiert,
// an die verschiedenen Systeme (UNIX etc.)
@@ -150,8 +150,8 @@ MultiSelection::MultiSelection( const UniString& rString, sal_Unicode cRange, sa
UniString aStr( rString );
sal_Unicode* pStr = aStr.GetBufferAccess();
sal_Unicode* pOld = pStr;
- BOOL bReady = FALSE;
- BOOL bUntil = FALSE;
+ sal_Bool bReady = sal_False;
+ sal_Bool bUntil = sal_False;
xub_StrLen nCut = 0;
// Hier normieren wir den String, sodass nur Ziffern,
@@ -177,11 +177,11 @@ MultiSelection::MultiSelection( const UniString& rString, sal_Unicode cRange, sa
{
*pStr++ = ';';
nCut++;
- bReady = FALSE;
+ bReady = sal_False;
}
*pStr++ = *pOld;
nCut++;
- bUntil = FALSE;
+ bUntil = sal_False;
break;
case '-':
@@ -193,12 +193,12 @@ MultiSelection::MultiSelection( const UniString& rString, sal_Unicode cRange, sa
{
*pStr++ = '-';
nCut++;
- bUntil = TRUE;
+ bUntil = sal_True;
}
- bReady = FALSE;
+ bReady = sal_False;
}
else
- bReady = TRUE;
+ bReady = sal_True;
break;
case ' ':
@@ -214,12 +214,12 @@ MultiSelection::MultiSelection( const UniString& rString, sal_Unicode cRange, sa
{
*pStr++ = '-';
nCut++;
- bUntil = TRUE;
+ bUntil = sal_True;
}
- bReady = FALSE;
+ bReady = sal_False;
}
else
- bReady = TRUE;
+ bReady = sal_True;
break;
}
@@ -233,7 +233,7 @@ MultiSelection::MultiSelection( const UniString& rString, sal_Unicode cRange, sa
const sal_Unicode* pCStr = aStr.GetBuffer();
long nPage = 1;
long nNum = 1;
- bUntil = FALSE;
+ bUntil = sal_False;
while ( *pCStr )
{
switch ( *pCStr )
@@ -265,13 +265,13 @@ MultiSelection::MultiSelection( const UniString& rString, sal_Unicode cRange, sa
Select( nNum );
nPage = 0;
aNumStr.Erase();
- bUntil = FALSE;
+ bUntil = sal_False;
break;
case '-':
nPage = aNumStr.ToInt32();
aNumStr.Erase();
- bUntil = TRUE;
+ bUntil = sal_True;
break;
}
@@ -298,7 +298,7 @@ MultiSelection::MultiSelection( const MultiSelection& rOrig ) :
aTotRange(rOrig.aTotRange),
nSelCount(rOrig.nSelCount),
bCurValid(rOrig.bCurValid),
- bSelectNew(FALSE)
+ bSelectNew(sal_False)
{
if ( bCurValid )
{
@@ -307,7 +307,7 @@ MultiSelection::MultiSelection( const MultiSelection& rOrig ) :
}
// copy the sub selections
- for ( ULONG n = 0; n < rOrig.aSels.Count(); ++n )
+ for ( sal_uIntPtr n = 0; n < rOrig.aSels.Count(); ++n )
aSels.Insert( new Range( *rOrig.aSels.GetObject(n) ), LIST_APPEND );
}
@@ -317,8 +317,8 @@ MultiSelection::MultiSelection( const Range& rRange ):
aTotRange(rRange),
nCurSubSel(0),
nSelCount(0),
- bCurValid(FALSE),
- bSelectNew(FALSE)
+ bCurValid(sal_False),
+ bSelectNew(sal_False)
{
}
@@ -348,7 +348,7 @@ MultiSelection& MultiSelection::operator= ( const MultiSelection& rOrig )
// clear the old and copy the sub selections
ImplClear();
- for ( ULONG n = 0; n < rOrig.aSels.Count(); ++n )
+ for ( sal_uIntPtr n = 0; n < rOrig.aSels.Count(); ++n )
aSels.Insert( new Range( *rOrig.aSels.GetObject(n) ), LIST_APPEND );
nSelCount = rOrig.nSelCount;
@@ -357,24 +357,24 @@ MultiSelection& MultiSelection::operator= ( const MultiSelection& rOrig )
// -----------------------------------------------------------------------
-BOOL MultiSelection::operator== ( MultiSelection& rWith )
+sal_Bool MultiSelection::operator== ( MultiSelection& rWith )
{
if ( aTotRange != rWith.aTotRange || nSelCount != rWith.nSelCount ||
aSels.Count() != rWith.aSels.Count() )
- return FALSE;
+ return sal_False;
// compare the sub seletions
- for ( ULONG n = 0; n < aSels.Count(); ++n )
+ for ( sal_uIntPtr n = 0; n < aSels.Count(); ++n )
if ( *aSels.GetObject(n) != *rWith.aSels.GetObject(n) )
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
// -----------------------------------------------------------------------
-void MultiSelection::SelectAll( BOOL bSelect )
+void MultiSelection::SelectAll( sal_Bool bSelect )
{
- DBG(DbgOutf( "::SelectAll(%s)\n", bSelect ? "TRUE" : "FALSE" ));
+ DBG(DbgOutf( "::SelectAll(%s)\n", bSelect ? "sal_True" : "sal_False" ));
ImplClear();
if ( bSelect )
@@ -388,16 +388,16 @@ void MultiSelection::SelectAll( BOOL bSelect )
// -----------------------------------------------------------------------
-BOOL MultiSelection::Select( long nIndex, BOOL bSelect )
+sal_Bool MultiSelection::Select( long nIndex, sal_Bool bSelect )
{
DBG_ASSERT( aTotRange.IsInside(nIndex), "selected index out of range" );
// out of range?
if ( !aTotRange.IsInside(nIndex) )
- return FALSE;
+ return sal_False;
// find the virtual target position
- ULONG nSubSelPos = ImplFindSubSelection( nIndex );
+ sal_uIntPtr nSubSelPos = ImplFindSubSelection( nIndex );
if ( bSelect )
{
@@ -405,7 +405,7 @@ BOOL MultiSelection::Select( long nIndex, BOOL bSelect )
if ( nSubSelPos < aSels.Count() &&
aSels.GetObject(nSubSelPos)->IsInside( nIndex ) )
// already selected, nothing to do
- return FALSE;
+ return sal_False;
// it will become selected
++nSelCount;
@@ -441,7 +441,7 @@ BOOL MultiSelection::Select( long nIndex, BOOL bSelect )
{
// not selected, nothing to do
DBG(Print( this ));
- return FALSE;
+ return sal_False;
}
// it will become deselected
@@ -453,7 +453,7 @@ BOOL MultiSelection::Select( long nIndex, BOOL bSelect )
// remove the complete sub selection
delete aSels.Remove( nSubSelPos );
DBG(Print( this ));
- return TRUE;
+ return sal_True;
}
// is it at the beginning of the found sub selection?
@@ -475,20 +475,20 @@ BOOL MultiSelection::Select( long nIndex, BOOL bSelect )
DBG(Print( this ));
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-void MultiSelection::Select( const Range& rIndexRange, BOOL bSelect )
+void MultiSelection::Select( const Range& rIndexRange, sal_Bool bSelect )
{
Range* pRange;
long nOld;
- ULONG nTmpMin = rIndexRange.Min();
- ULONG nTmpMax = rIndexRange.Max();
- ULONG nCurMin = FirstSelected();
- ULONG nCurMax = LastSelected();
+ sal_uIntPtr nTmpMin = rIndexRange.Min();
+ sal_uIntPtr nTmpMax = rIndexRange.Max();
+ sal_uIntPtr nCurMin = FirstSelected();
+ sal_uIntPtr nCurMax = LastSelected();
DBG_ASSERT(aTotRange.IsInside(nTmpMax), "selected index out of range" );
DBG_ASSERT(aTotRange.IsInside(nTmpMin), "selected index out of range" );
@@ -512,7 +512,7 @@ void MultiSelection::Select( const Range& rIndexRange, BOOL bSelect )
if( nCurMin > (nTmpMax+1) )
{
pRange = new Range( rIndexRange );
- aSels.Insert( pRange, (ULONG)0 );
+ aSels.Insert( pRange, (sal_uIntPtr)0 );
nSelCount += pRange->Len();
}
else
@@ -522,7 +522,7 @@ void MultiSelection::Select( const Range& rIndexRange, BOOL bSelect )
pRange->Min() = (long)nTmpMin;
nSelCount += ( nOld - nTmpMin );
}
- bCurValid = FALSE;
+ bCurValid = sal_False;
}
return;
}
@@ -545,7 +545,7 @@ void MultiSelection::Select( const Range& rIndexRange, BOOL bSelect )
pRange->Max() = (long)nTmpMax;
nSelCount += ( nTmpMax - nOld );
}
- bCurValid = FALSE;
+ bCurValid = sal_False;
}
return;
}
@@ -560,10 +560,10 @@ void MultiSelection::Select( const Range& rIndexRange, BOOL bSelect )
// -----------------------------------------------------------------------
-BOOL MultiSelection::IsSelected( long nIndex ) const
+sal_Bool MultiSelection::IsSelected( long nIndex ) const
{
// find the virtual target position
- ULONG nSubSelPos = ImplFindSubSelection( nIndex );
+ sal_uIntPtr nSubSelPos = ImplFindSubSelection( nIndex );
return nSubSelPos < aSels.Count() &&
aSels.GetObject(nSubSelPos)->IsInside(nIndex);
@@ -576,7 +576,7 @@ void MultiSelection::Insert( long nIndex, long nCount )
DBG(DbgOutf( "::Insert(%ld, %ld)\n", nIndex, nCount ));
// find the virtual target position
- ULONG nSubSelPos = ImplFindSubSelection( nIndex );
+ sal_uIntPtr nSubSelPos = ImplFindSubSelection( nIndex );
// did we need to shift the sub selections?
if ( nSubSelPos < aSels.Count() )
@@ -608,14 +608,14 @@ void MultiSelection::Insert( long nIndex, long nCount )
}
// shift the sub selections behind the inserting position
- for ( ULONG nPos = nSubSelPos; nPos < aSels.Count(); ++nPos )
+ for ( sal_uIntPtr nPos = nSubSelPos; nPos < aSels.Count(); ++nPos )
{
aSels.GetObject(nPos)->Min() += nCount;
aSels.GetObject(nPos)->Max() += nCount;
}
}
- bCurValid = FALSE;
+ bCurValid = sal_False;
aTotRange.Max() += nCount;
if ( bSelectNew )
nSelCount += nCount;
@@ -630,7 +630,7 @@ void MultiSelection::Remove( long nIndex )
DBG(DbgOutf( "::Remove(%ld)\n", nIndex ));
// find the virtual target position
- ULONG nSubSelPos = ImplFindSubSelection( nIndex );
+ sal_uIntPtr nSubSelPos = ImplFindSubSelection( nIndex );
// did we remove from an existing sub selection?
if ( nSubSelPos < aSels.Count() &&
@@ -649,13 +649,13 @@ void MultiSelection::Remove( long nIndex )
}
// shift the sub selections behind the removed index
- for ( ULONG nPos = nSubSelPos; nPos < aSels.Count(); ++nPos )
+ for ( sal_uIntPtr nPos = nSubSelPos; nPos < aSels.Count(); ++nPos )
{
--( aSels.GetObject(nPos)->Min() );
--( aSels.GetObject(nPos)->Max() );
}
- bCurValid = FALSE;
+ bCurValid = sal_False;
aTotRange.Max() -= 1;
DBG(Print( this ));
@@ -713,14 +713,14 @@ long MultiSelection::ImplBwdUnselected()
// -----------------------------------------------------------------------
-long MultiSelection::FirstSelected( BOOL bInverse )
+long MultiSelection::FirstSelected( sal_Bool bInverse )
{
bInverseCur = bInverse;
nCurSubSel = 0;
if ( bInverseCur )
{
- bCurValid = nSelCount < ULONG(aTotRange.Len());
+ bCurValid = nSelCount < sal_uIntPtr(aTotRange.Len());
if ( bCurValid )
{
nCurIndex = 0;
@@ -820,7 +820,7 @@ void MultiSelection::SetTotalRange( const Range& rTotRange )
if( pRange->Max() < aTotRange.Min() )
{
delete pRange;
- aSels.Remove( (ULONG)0 );
+ aSels.Remove( (sal_uIntPtr)0 );
}
else if( pRange->Min() < aTotRange.Min() )
{
@@ -834,14 +834,14 @@ void MultiSelection::SetTotalRange( const Range& rTotRange )
}
// die obere Bereichsgrenze anpassen
- ULONG nCount = aSels.Count();
+ sal_uIntPtr nCount = aSels.Count();
while( nCount )
{
pRange = aSels.GetObject( nCount - 1 );
if( pRange->Min() > aTotRange.Max() )
{
delete pRange;
- aSels.Remove( (ULONG)(nCount - 1) );
+ aSels.Remove( (sal_uIntPtr)(nCount - 1) );
}
else if( pRange->Max() > aTotRange.Max() )
{
@@ -863,7 +863,7 @@ void MultiSelection::SetTotalRange( const Range& rTotRange )
pRange = aSels.Next();
}
- bCurValid = FALSE;
+ bCurValid = sal_False;
nCurIndex = 0;
}
diff --git a/tools/source/memtools/table.cxx b/tools/source/memtools/table.cxx
index 50ac46e99758..80b2c9747966 100644..100755
--- a/tools/source/memtools/table.cxx
+++ b/tools/source/memtools/table.cxx
@@ -37,16 +37,16 @@
// =======================================================================
-ULONG Table::ImplGetIndex( ULONG nKey, ULONG* pIndex ) const
+sal_uIntPtr Table::ImplGetIndex( sal_uIntPtr nKey, sal_uIntPtr* pIndex ) const
{
// Abpruefen, ob der erste Key groesser als der Vergleichskey ist
- if ( !nCount || (nKey < (ULONG)Container::ImpGetObject(0)) )
+ if ( !nCount || (nKey < (sal_uIntPtr)Container::ImpGetObject(0)) )
return TABLE_ENTRY_NOTFOUND;
- ULONG nLow;
- ULONG nHigh;
- ULONG nMid;
- ULONG nCompareKey;
+ sal_uIntPtr nLow;
+ sal_uIntPtr nHigh;
+ sal_uIntPtr nMid;
+ sal_uIntPtr nCompareKey;
void** pNodes = Container::ImpGetOnlyNodes();
// Binaeres Suchen
@@ -57,7 +57,7 @@ ULONG Table::ImplGetIndex( ULONG nKey, ULONG* pIndex ) const
do
{
nMid = (nLow + nHigh) / 2;
- nCompareKey = (ULONG)pNodes[nMid*2];
+ nCompareKey = (sal_uIntPtr)pNodes[nMid*2];
if ( nKey < nCompareKey )
nHigh = nMid-1;
else
@@ -75,7 +75,7 @@ ULONG Table::ImplGetIndex( ULONG nKey, ULONG* pIndex ) const
do
{
nMid = (nLow + nHigh) / 2;
- nCompareKey = (ULONG)Container::ImpGetObject( nMid*2 );
+ nCompareKey = (sal_uIntPtr)Container::ImpGetObject( nMid*2 );
if ( nKey < nCompareKey )
nHigh = nMid-1;
else
@@ -102,7 +102,7 @@ ULONG Table::ImplGetIndex( ULONG nKey, ULONG* pIndex ) const
// =======================================================================
-Table::Table( USHORT _nInitSize, USHORT _nReSize ) :
+Table::Table( sal_uInt16 _nInitSize, sal_uInt16 _nReSize ) :
Container( CONTAINER_MAXBLOCKSIZE, _nInitSize*2, _nReSize*2 )
{
DBG_ASSERT( _nInitSize <= 32767, "Table::Table(): InitSize > 32767" );
@@ -112,27 +112,27 @@ Table::Table( USHORT _nInitSize, USHORT _nReSize ) :
// -----------------------------------------------------------------------
-BOOL Table::Insert( ULONG nKey, void* p )
+sal_Bool Table::Insert( sal_uIntPtr nKey, void* p )
{
// Tabellenelement einsortieren
- ULONG i;
+ sal_uIntPtr i;
if ( nCount )
{
if ( nCount <= 24 )
{
- USHORT n = 0;
- USHORT nTempCount = (USHORT)nCount * 2;
+ sal_uInt16 n = 0;
+ sal_uInt16 nTempCount = (sal_uInt16)nCount * 2;
//<!--Modified by PengYunQuan for resolving a NULL pointer access
if( void** pNodes = Container::ImpGetOnlyNodes() )
{
- ULONG nCompareKey = (ULONG)(*pNodes);
+ sal_uIntPtr nCompareKey = (sal_uIntPtr)(*pNodes);
while ( nKey > nCompareKey )
{
n += 2;
pNodes += 2;
if ( n < nTempCount )
- nCompareKey = (ULONG)(*pNodes);
+ nCompareKey = (sal_uIntPtr)(*pNodes);
else
{
nCompareKey = 0;
@@ -142,7 +142,7 @@ BOOL Table::Insert( ULONG nKey, void* p )
// Testen, ob sich der Key schon in der Tabelle befindet
if ( nKey == nCompareKey )
- return FALSE;
+ return sal_False;
i = n;
}
@@ -150,7 +150,7 @@ BOOL Table::Insert( ULONG nKey, void* p )
{
i = 0;
if ( ImplGetIndex( nKey, &i ) != TABLE_ENTRY_NOTFOUND )
- return FALSE;
+ return sal_False;
}
//-->Modified by PengYunQuan for resolving a NULL pointer access
}
@@ -158,7 +158,7 @@ BOOL Table::Insert( ULONG nKey, void* p )
{
i = 0;
if ( ImplGetIndex( nKey, &i ) != TABLE_ENTRY_NOTFOUND )
- return FALSE;
+ return sal_False;
}
}
else
@@ -171,15 +171,15 @@ BOOL Table::Insert( ULONG nKey, void* p )
// Ein neuer Eintrag
nCount++;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-void* Table::Remove( ULONG nKey )
+void* Table::Remove( sal_uIntPtr nKey )
{
// Index besorgen
- ULONG nIndex = ImplGetIndex( nKey );
+ sal_uIntPtr nIndex = ImplGetIndex( nKey );
// Testen, ob sich der Key in der Tabelle befindet
if ( nIndex == TABLE_ENTRY_NOTFOUND )
@@ -197,10 +197,10 @@ void* Table::Remove( ULONG nKey )
// -----------------------------------------------------------------------
-void* Table::Replace( ULONG nKey, void* p )
+void* Table::Replace( sal_uIntPtr nKey, void* p )
{
// Index abfragen
- ULONG nIndex = ImplGetIndex( nKey );
+ sal_uIntPtr nIndex = ImplGetIndex( nKey );
// Existiert kein Eintrag mit dem Schluessel
if ( nIndex == TABLE_ENTRY_NOTFOUND )
@@ -211,10 +211,10 @@ void* Table::Replace( ULONG nKey, void* p )
// -----------------------------------------------------------------------
-void* Table::Get( ULONG nKey ) const
+void* Table::Get( sal_uIntPtr nKey ) const
{
// Index besorgen
- ULONG nIndex = ImplGetIndex( nKey );
+ sal_uIntPtr nIndex = ImplGetIndex( nKey );
// Testen, ob sich der Key in der Tabelle befindet
if ( nIndex == TABLE_ENTRY_NOTFOUND )
@@ -232,16 +232,16 @@ void* Table::GetCurObject() const
// -----------------------------------------------------------------------
-ULONG Table::GetKey( const void* p ) const
+sal_uIntPtr Table::GetKey( const void* p ) const
{
- ULONG nIndex = 0;
+ sal_uIntPtr nIndex = 0;
// Solange noch Eintraege Vorhanden sind
while ( nIndex < nCount )
{
// Stimmt der Pointer ueberein, wird der Key zurueckgegeben
if ( p == Container::ImpGetObject( (nIndex*2)+1 ) )
- return (ULONG)Container::ImpGetObject( nIndex*2 );
+ return (sal_uIntPtr)Container::ImpGetObject( nIndex*2 );
nIndex++;
}
@@ -251,14 +251,14 @@ ULONG Table::GetKey( const void* p ) const
// -----------------------------------------------------------------------
-BOOL Table::IsKeyValid( ULONG nKey ) const
+sal_Bool Table::IsKeyValid( sal_uIntPtr nKey ) const
{
- return (ImplGetIndex( nKey ) != TABLE_ENTRY_NOTFOUND) ? TRUE : FALSE;
+ return (ImplGetIndex( nKey ) != TABLE_ENTRY_NOTFOUND) ? sal_True : sal_False;
}
// -----------------------------------------------------------------------
-ULONG Table::GetUniqueKey( ULONG nStartKey ) const
+sal_uIntPtr Table::GetUniqueKey( sal_uIntPtr nStartKey ) const
{
DBG_ASSERT( (nStartKey > 1) && (nStartKey < 0xFFFFFFFF),
"Table::GetUniqueKey() - nStartKey == 0 or nStartKey >= 0xFFFFFFFF" );
@@ -266,7 +266,7 @@ ULONG Table::GetUniqueKey( ULONG nStartKey ) const
if ( !nCount )
return nStartKey;
- ULONG nLastKey = (ULONG)Container::GetObject( (nCount*2)-2 );
+ sal_uIntPtr nLastKey = (sal_uIntPtr)Container::GetObject( (nCount*2)-2 );
if ( nLastKey < nStartKey )
return nStartKey;
else
@@ -275,18 +275,18 @@ ULONG Table::GetUniqueKey( ULONG nStartKey ) const
return nLastKey+1;
else
{
- ULONG nPos;
- ULONG nTempPos = ImplGetIndex( nStartKey, &nPos );
+ sal_uIntPtr nPos;
+ sal_uIntPtr nTempPos = ImplGetIndex( nStartKey, &nPos );
if ( nTempPos != TABLE_ENTRY_NOTFOUND )
nPos = nTempPos;
- nLastKey = (ULONG)Container::GetObject( nPos );
+ nLastKey = (sal_uIntPtr)Container::GetObject( nPos );
if ( nStartKey < nLastKey )
return nStartKey;
while ( nLastKey < 0xFFFFFFFE )
{
nPos += 2;
nLastKey++;
- if ( nLastKey != (ULONG)Container::GetObject( nPos ) )
+ if ( nLastKey != (sal_uIntPtr)Container::GetObject( nPos ) )
return nLastKey;
}
}
@@ -297,10 +297,10 @@ ULONG Table::GetUniqueKey( ULONG nStartKey ) const
// -----------------------------------------------------------------------
-ULONG Table::SearchKey( ULONG nKey, ULONG* pPos ) const
+sal_uIntPtr Table::SearchKey( sal_uIntPtr nKey, sal_uIntPtr* pPos ) const
{
*pPos = 0;
- ULONG nPos = ImplGetIndex( nKey, pPos );
+ sal_uIntPtr nPos = ImplGetIndex( nKey, pPos );
if ( nPos != TABLE_ENTRY_NOTFOUND )
{
nPos /= 2;
@@ -313,12 +313,12 @@ ULONG Table::SearchKey( ULONG nKey, ULONG* pPos ) const
// -----------------------------------------------------------------------
-void* Table::Seek( ULONG nKey )
+void* Table::Seek( sal_uIntPtr nKey )
{
// Testen, ob ein Eintrag vorhanden ist
if ( nCount )
{
- ULONG nIndex = ImplGetIndex( nKey );
+ sal_uIntPtr nIndex = ImplGetIndex( nKey );
// Ist Key nicht enthalten
if ( nIndex == TABLE_ENTRY_NOTFOUND )
@@ -340,7 +340,7 @@ void* Table::Seek( ULONG nKey )
void* Table::Seek( void* p )
{
- ULONG nKey = GetKey( p );
+ sal_uIntPtr nKey = GetKey( p );
// Ist Key vorhanden, dann als aktuellen Eintrag setzen
if ( nKey != TABLE_ENTRY_NOTFOUND )
diff --git a/tools/source/memtools/unqidx.cxx b/tools/source/memtools/unqidx.cxx
index 94624c3ac905..020ae64dde95 100644..100755
--- a/tools/source/memtools/unqidx.cxx
+++ b/tools/source/memtools/unqidx.cxx
@@ -41,8 +41,8 @@
|*
*************************************************************************/
-UniqueIndex::UniqueIndex( ULONG _nStartIndex,
- ULONG _nInitSize, ULONG _nReSize ) :
+UniqueIndex::UniqueIndex( sal_uIntPtr _nStartIndex,
+ sal_uIntPtr _nInitSize, sal_uIntPtr _nReSize ) :
Container( _nInitSize )
{
nReSize = _nReSize;
@@ -80,7 +80,7 @@ UniqueIndex::UniqueIndex( const UniqueIndex& rIdx ) :
|*
*************************************************************************/
-ULONG UniqueIndex::Insert( void* p )
+sal_uIntPtr UniqueIndex::Insert( void* p )
{
// NULL-Pointer ist nicht erlaubt
if ( !p )
@@ -116,13 +116,13 @@ ULONG UniqueIndex::Insert( void* p )
|*
*************************************************************************/
-ULONG UniqueIndex::Insert( ULONG nIndex, void* p )
+sal_uIntPtr UniqueIndex::Insert( sal_uIntPtr nIndex, void* p )
{
// NULL-Pointer ist nicht erlaubt
if ( !p )
return UNIQUEINDEX_ENTRY_NOTFOUND;
- ULONG nContIndex = nIndex - nStartIndex;
+ sal_uIntPtr nContIndex = nIndex - nStartIndex;
// Ist Array voll, dann expandieren
if ( nContIndex >= Container::GetSize() )
SetSize( nContIndex + nReSize );
@@ -145,7 +145,7 @@ ULONG UniqueIndex::Insert( ULONG nIndex, void* p )
|*
*************************************************************************/
-void* UniqueIndex::Remove( ULONG nIndex )
+void* UniqueIndex::Remove( sal_uIntPtr nIndex )
{
// Ist Index zulaessig
if ( (nIndex >= nStartIndex) &&
@@ -172,7 +172,7 @@ void* UniqueIndex::Remove( ULONG nIndex )
|*
*************************************************************************/
-void* UniqueIndex::Replace( ULONG nIndex, void* p )
+void* UniqueIndex::Replace( sal_uIntPtr nIndex, void* p )
{
// NULL-Pointer ist nicht erlaubt
if ( !p )
@@ -198,7 +198,7 @@ void* UniqueIndex::Replace( ULONG nIndex, void* p )
|*
*************************************************************************/
-void* UniqueIndex::Get( ULONG nIndex ) const
+void* UniqueIndex::Get( sal_uIntPtr nIndex ) const
{
// Ist Index zulaessig
if ( (nIndex >= nStartIndex) &&
@@ -218,9 +218,9 @@ void* UniqueIndex::Get( ULONG nIndex ) const
|*
*************************************************************************/
-ULONG UniqueIndex::GetCurIndex() const
+sal_uIntPtr UniqueIndex::GetCurIndex() const
{
- ULONG nPos = Container::GetCurPos();
+ sal_uIntPtr nPos = Container::GetCurPos();
// Ist der Current-Index nicht belegt, dann gibt es keinen Current-Index
if ( !Container::ImpGetObject( nPos ) )
@@ -239,13 +239,13 @@ ULONG UniqueIndex::GetCurIndex() const
|*
*************************************************************************/
-ULONG UniqueIndex::GetIndex( const void* p ) const
+sal_uIntPtr UniqueIndex::GetIndex( const void* p ) const
{
// Wird ein NULL-Pointer uebergeben, dann wurde Pointer nicht gefunden
if ( !p )
return UNIQUEINDEX_ENTRY_NOTFOUND;
- ULONG nIndex = Container::GetPos( p );
+ sal_uIntPtr nIndex = Container::GetPos( p );
if ( nIndex != CONTAINER_ENTRY_NOTFOUND )
return nIndex+nStartIndex;
@@ -263,7 +263,7 @@ ULONG UniqueIndex::GetIndex( const void* p ) const
|*
*************************************************************************/
-BOOL UniqueIndex::IsIndexValid( ULONG nIndex ) const
+sal_Bool UniqueIndex::IsIndexValid( sal_uIntPtr nIndex ) const
{
// Ist Index zulaessig
if ( (nIndex >= nStartIndex) &&
@@ -271,12 +271,12 @@ BOOL UniqueIndex::IsIndexValid( ULONG nIndex ) const
{
// Index ist nur zulaessig, wenn Eintrag auch belegt ist
if ( Container::ImpGetObject( nIndex-nStartIndex ) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
else
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -289,7 +289,7 @@ BOOL UniqueIndex::IsIndexValid( ULONG nIndex ) const
|*
*************************************************************************/
-void* UniqueIndex::Seek( ULONG nIndex )
+void* UniqueIndex::Seek( sal_uIntPtr nIndex )
{
// Index-Eintrag als aktuellen setzten, wenn er gueltig ist
if ( IsIndexValid( nIndex ) )
@@ -314,7 +314,7 @@ void* UniqueIndex::Seek( void* p )
if ( !p )
return NULL;
- ULONG nIndex = GetIndex( p );
+ sal_uIntPtr nIndex = GetIndex( p );
// Ist Index vorhanden, dann als aktuellen Eintrag setzen
if ( nIndex != UNIQUEINDEX_ENTRY_NOTFOUND )
@@ -434,15 +434,15 @@ UniqueIndex& UniqueIndex::operator =( const UniqueIndex& rIdx )
|*
*************************************************************************/
-BOOL UniqueIndex::operator ==( const UniqueIndex& rIdx ) const
+sal_Bool UniqueIndex::operator ==( const UniqueIndex& rIdx ) const
{
// Neue Werte zuweisen
if ( (nStartIndex == rIdx.nStartIndex) &&
(nCount == rIdx.nCount) &&
(Container::operator ==( rIdx )) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
/*************************************************************************
|*
@@ -458,7 +458,7 @@ UniqueIdContainer::UniqueIdContainer( const UniqueIdContainer& rObj )
: UniqueIndex( rObj )
, nCollectCount( rObj.nCollectCount )
{
- ULONG nCur = GetCurIndex();
+ sal_uIntPtr nCur = GetCurIndex();
ImpUniqueId * pEle = (ImpUniqueId *)First();
while( pEle )
@@ -484,7 +484,7 @@ UniqueIdContainer& UniqueIdContainer::operator = ( const UniqueIdContainer & rOb
UniqueIndex::operator = ( rObj );
nCollectCount = rObj.nCollectCount;
- ULONG nCur = GetCurIndex();
+ sal_uIntPtr nCur = GetCurIndex();
ImpUniqueId * pEle = (ImpUniqueId *)First();
while( pEle )
@@ -506,12 +506,12 @@ UniqueIdContainer& UniqueIdContainer::operator = ( const UniqueIdContainer & rOb
|*
*************************************************************************/
-void UniqueIdContainer::Clear( BOOL bAll )
+void UniqueIdContainer::Clear( sal_Bool bAll )
{
- USHORT nFree = bAll ? 0xFFFF : 1;
+ sal_uInt16 nFree = bAll ? 0xFFFF : 1;
ImpUniqueId* pId = (ImpUniqueId*)Last();
- BOOL bLast = TRUE;
+ sal_Bool bLast = sal_True;
while ( pId )
{
if ( pId->nRefCount <= nFree )
@@ -525,7 +525,7 @@ void UniqueIdContainer::Clear( BOOL bAll )
else
{
pId = (ImpUniqueId *)Prev();
- bLast = FALSE;
+ bLast = sal_False;
}
}
}
@@ -544,7 +544,7 @@ UniqueItemId UniqueIdContainer::CreateId()
{
if( nCollectCount > 50 )
{ // aufraeumen
- Clear( FALSE );
+ Clear( sal_False );
nCollectCount = 0;
}
nCollectCount++;
@@ -565,7 +565,7 @@ UniqueItemId UniqueIdContainer::CreateId()
|*
*************************************************************************/
-UniqueItemId UniqueIdContainer::CreateFreeId( ULONG nId )
+UniqueItemId UniqueIdContainer::CreateFreeId( sal_uIntPtr nId )
{
// Einfach erzeugen, fuer abgeleitete Klasse
ImpUniqueId * pId = new ImpUniqueId;
@@ -584,7 +584,7 @@ UniqueItemId UniqueIdContainer::CreateFreeId( ULONG nId )
|*
*************************************************************************/
-UniqueItemId UniqueIdContainer::CreateIdProt( ULONG nId )
+UniqueItemId UniqueIdContainer::CreateIdProt( sal_uIntPtr nId )
{
if ( IsIndexValid( nId ) )
return UniqueItemId( (ImpUniqueId *)Get( nId ) );
diff --git a/tools/source/rc/rc.cxx b/tools/source/rc/rc.cxx
index e24b8f8824d4..f9a08a5525e6 100644
--- a/tools/source/rc/rc.cxx
+++ b/tools/source/rc/rc.cxx
@@ -65,16 +65,16 @@ Time::Time( const ResId& rResId )
ResMgr::GetResourceSkipHeader( rResId, &pResMgr );
- ULONG nObjMask = (USHORT)pResMgr->ReadLong();
+ sal_uIntPtr nObjMask = (sal_uInt16)pResMgr->ReadLong();
if ( 0x01 & nObjMask )
- SetHour( (USHORT)pResMgr->ReadShort() );
+ SetHour( (sal_uInt16)pResMgr->ReadShort() );
if ( 0x02 & nObjMask )
- SetMin( (USHORT)pResMgr->ReadShort() );
+ SetMin( (sal_uInt16)pResMgr->ReadShort() );
if ( 0x04 & nObjMask )
- SetSec( (USHORT)pResMgr->ReadShort() );
+ SetSec( (sal_uInt16)pResMgr->ReadShort() );
if ( 0x08 & nObjMask )
- Set100Sec( (USHORT)pResMgr->ReadShort() );
+ Set100Sec( (sal_uInt16)pResMgr->ReadShort() );
}
// =======================================================================
@@ -86,12 +86,12 @@ Date::Date( const ResId& rResId ) : nDate(0)
ResMgr::GetResourceSkipHeader( rResId, &pResMgr );
- ULONG nObjMask = (USHORT)pResMgr->ReadLong();
+ sal_uIntPtr nObjMask = (sal_uInt16)pResMgr->ReadLong();
if ( 0x01 & nObjMask )
- SetYear( (USHORT)pResMgr->ReadShort() );
+ SetYear( (sal_uInt16)pResMgr->ReadShort() );
if ( 0x02 & nObjMask )
- SetMonth( (USHORT)pResMgr->ReadShort() );
+ SetMonth( (sal_uInt16)pResMgr->ReadShort() );
if ( 0x04 & nObjMask )
- SetDay( (USHORT)pResMgr->ReadShort() );
+ SetDay( (sal_uInt16)pResMgr->ReadShort() );
}
diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx
index 2e6401f5a19f..4ddb753a0df3 100644
--- a/tools/source/rc/resmgr.cxx
+++ b/tools/source/rc/resmgr.cxx
@@ -95,11 +95,11 @@ class InternalResMgr
friend class ResMgrContainer;
ImpContent * pContent;
- UINT32 nOffCorrection;
- BYTE * pStringBlock;
+ sal_uInt32 nOffCorrection;
+ sal_uInt8 * pStringBlock;
SvStream * pStm;
- BOOL bEqual2Content;
- UINT32 nEntries;
+ sal_Bool bEqual2Content;
+ sal_uInt32 nEntries;
OUString aFileName;
OUString aPrefix;
OUString aResName;
@@ -112,9 +112,9 @@ class InternalResMgr
const OUString& aResName,
const com::sun::star::lang::Locale& rLocale );
~InternalResMgr();
- BOOL Create();
+ sal_Bool Create();
- BOOL IsGlobalAvailable( RESOURCE_TYPE nRT, sal_uInt32 nId ) const;
+ sal_Bool IsGlobalAvailable( RESOURCE_TYPE nRT, sal_uInt32 nId ) const;
void * LoadGlobalRes( RESOURCE_TYPE nRT, sal_uInt32 nId,
void **pResHandle );
public:
@@ -549,7 +549,7 @@ InternalResMgr::InternalResMgr( const OUString& rFileURL,
: pContent( NULL )
, pStringBlock( NULL )
, pStm( NULL )
- , bEqual2Content( TRUE )
+ , bEqual2Content( sal_True )
, nEntries( 0 )
, aFileName( rFileURL )
, aPrefix( rPrefix )
@@ -600,15 +600,15 @@ InternalResMgr::~InternalResMgr()
// -----------------------------------------------------------------------
-BOOL InternalResMgr::Create()
+sal_Bool InternalResMgr::Create()
{
ResMgrContainer::get();
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
pStm = new SvFileStream( aFileName, (STREAM_READ | STREAM_SHARE_DENYWRITE | STREAM_NOCREATE) );
if( pStm->GetError() == 0 )
{
- INT32 lContLen = 0;
+ sal_Int32 lContLen = 0;
pStm->Seek( STREAM_SEEK_TO_END );
/*
@@ -622,15 +622,15 @@ BOOL InternalResMgr::Create()
lContLen = ResMgr::GetLong( &lContLen );
pStm->SeekRel( -lContLen );
// allocate stored ImpContent data (12 bytes per unit)
- BYTE* pContentBuf = (BYTE*)rtl_allocateMemory( lContLen );
+ sal_uInt8* pContentBuf = (sal_uInt8*)rtl_allocateMemory( lContLen );
pStm->Read( pContentBuf, lContLen );
// allocate ImpContent space (sizeof(ImpContent) per unit, not necessarily 12)
pContent = (ImpContent *)rtl_allocateMemory( sizeof(ImpContent)*lContLen/12 );
// Auf die Anzahl der ImpContent k�rzen
- nEntries = (UINT32)lContLen / 12;
- bEqual2Content = TRUE; // Die Daten der Resourcen liegen
+ nEntries = (sal_uInt32)lContLen / 12;
+ bEqual2Content = sal_True; // Die Daten der Resourcen liegen
// genauso wie das Inhaltsverzeichnis
- BOOL bSorted = TRUE;
+ sal_Bool bSorted = sal_True;
if( nEntries )
{
#ifdef DBG_UTIL
@@ -652,10 +652,10 @@ BOOL InternalResMgr::Create()
pContent[j].nTypeAndId = ResMgr::GetUInt64( pContentBuf + (12*j) );
pContent[j].nOffset = ResMgr::GetLong( pContentBuf + (12*j+8) );
if( pContent[i].nTypeAndId >= pContent[j].nTypeAndId )
- bSorted = FALSE;
+ bSorted = sal_False;
if( (pContent[i].nTypeAndId & 0xFFFFFFFF00000000LL) == (pContent[j].nTypeAndId & 0xFFFFFFFF00000000LL)
&& pContent[i].nOffset >= pContent[j].nOffset )
- bEqual2Content = FALSE;
+ bEqual2Content = sal_False;
}
}
rtl_freeMemory( pContentBuf );
@@ -667,7 +667,7 @@ BOOL InternalResMgr::Create()
::std::sort(pContent,pContent+nEntries,ImpContentLessCompare());
// qsort( pContent, nEntries, sizeof( ImpContent ), Compare );
- bDone = TRUE;
+ bDone = sal_True;
}
return bDone;
@@ -675,7 +675,7 @@ BOOL InternalResMgr::Create()
// -----------------------------------------------------------------------
-BOOL InternalResMgr::IsGlobalAvailable( RESOURCE_TYPE nRT, sal_uInt32 nId ) const
+sal_Bool InternalResMgr::IsGlobalAvailable( RESOURCE_TYPE nRT, sal_uInt32 nId ) const
{
// Anfang der Strings suchen
sal_uInt64 nValue = ((sal_uInt64(nRT) << 32) | nId);
@@ -717,18 +717,18 @@ void* InternalResMgr::LoadGlobalRes( RESOURCE_TYPE nRT, sal_uInt32 nId,
while( pLast < pEnd && (pLast->nTypeAndId >> 32) == RSC_STRING )
++pLast;
nOffCorrection = pFirst->nOffset;
- UINT32 nSize;
+ sal_uInt32 nSize;
--pLast;
pStm->Seek( pLast->nOffset );
RSHEADER_TYPE aHdr;
pStm->Read( &aHdr, sizeof( aHdr ) );
nSize = pLast->nOffset + aHdr.GetGlobOff() - nOffCorrection;
- pStringBlock = (BYTE*)rtl_allocateMemory( nSize );
+ pStringBlock = (sal_uInt8*)rtl_allocateMemory( nSize );
pStm->Seek( pFirst->nOffset );
pStm->Read( pStringBlock, nSize );
}
*pResHandle = pStringBlock;
- return (BYTE*)pStringBlock + pFind->nOffset - nOffCorrection;
+ return (sal_uInt8*)pStringBlock + pFind->nOffset - nOffCorrection;
} // if( nRT == RSC_STRING && bEqual2Content )
else
{
@@ -738,7 +738,7 @@ void* InternalResMgr::LoadGlobalRes( RESOURCE_TYPE nRT, sal_uInt32 nId,
pStm->Read( &aHeader, sizeof( RSHEADER_TYPE ) );
void * pRes = rtl_allocateMemory( aHeader.GetGlobOff() );
memcpy( pRes, &aHeader, sizeof( RSHEADER_TYPE ) );
- pStm->Read( (BYTE*)pRes + sizeof( RSHEADER_TYPE ),
+ pStm->Read( (sal_uInt8*)pRes + sizeof( RSHEADER_TYPE ),
aHeader.GetGlobOff() - sizeof( RSHEADER_TYPE ) );
return pRes;
}
@@ -764,12 +764,12 @@ void InternalResMgr::FreeGlobalRes( void * pResHandle, void * pResource )
UniString GetTypeRes_Impl( const ResId& rTypeId )
{
// Funktion verlassen, falls Resourcefehler in dieser Funktion
- static int bInUse = FALSE;
+ static int bInUse = sal_False;
UniString aTypStr( UniString::CreateFromInt32( rTypeId.GetId() ) );
if ( !bInUse )
{
- bInUse = TRUE;
+ bInUse = sal_True;
ResId aResId( sal_uInt32(RSCVERSION_ID), *rTypeId.GetResMgr() );
aResId.SetRT( RSC_VERSIONCONTROL );
@@ -784,7 +784,7 @@ UniString GetTypeRes_Impl( const ResId& rTypeId )
rTypeId.GetResMgr()->Increment( sizeof( RSHEADER_TYPE ) );
}
}
- bInUse = FALSE;
+ bInUse = sal_False;
}
return aTypStr;
@@ -896,14 +896,14 @@ static RSHEADER_TYPE* LocalResource( const ImpRCStack* pStack,
if ( pStack->pResource && pStack->pClassRes )
{
pTmp = (RSHEADER_TYPE*)
- ((BYTE*)pStack->pResource + pStack->pResource->GetLocalOff());
+ ((sal_uInt8*)pStack->pResource + pStack->pResource->GetLocalOff());
pEnd = (RSHEADER_TYPE*)
- ((BYTE*)pStack->pResource + pStack->pResource->GetGlobOff());
+ ((sal_uInt8*)pStack->pResource + pStack->pResource->GetGlobOff());
while ( pTmp != pEnd )
{
if ( pTmp->GetRT() == nRTType && pTmp->GetId() == nId )
return pTmp;
- pTmp = (RSHEADER_TYPE*)((BYTE*)pTmp + pTmp->GetGlobOff());
+ pTmp = (RSHEADER_TYPE*)((sal_uInt8*)pTmp + pTmp->GetGlobOff());
}
}
@@ -1070,11 +1070,11 @@ void ResMgr::TestStack( const Resource* )
#endif
// -----------------------------------------------------------------------
-BOOL ResMgr::IsAvailable( const ResId& rId, const Resource* pResObj ) const
+sal_Bool ResMgr::IsAvailable( const ResId& rId, const Resource* pResObj ) const
{
osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
- BOOL bAvailable = FALSE;
+ sal_Bool bAvailable = sal_False;
RSHEADER_TYPE* pClassRes = rId.GetpResource();
RESOURCE_TYPE nRT = rId.GetRT2();
sal_uInt32 nId = rId.GetId();
@@ -1097,7 +1097,7 @@ BOOL ResMgr::IsAvailable( const ResId& rId, const Resource* pResObj ) const
if ( pClassRes )
{
if ( pClassRes->GetRT() == nRT )
- bAvailable = TRUE;
+ bAvailable = sal_True;
}
}
@@ -1122,7 +1122,7 @@ void* ResMgr::GetClass()
// -----------------------------------------------------------------------
-BOOL ResMgr::GetResource( const ResId& rId, const Resource* pResObj )
+sal_Bool ResMgr::GetResource( const ResId& rId, const Resource* pResObj )
{
osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
@@ -1167,7 +1167,7 @@ BOOL ResMgr::GetResource( const ResId& rId, const Resource* pResObj )
pTop->Flags |= RC_NOTFOUND;
pTop->pClassRes = getEmptyBuffer();
pTop->pResource = (RSHEADER_TYPE*)pTop->pClassRes;
- return FALSE;
+ return sal_False;
}
}
else
@@ -1213,12 +1213,12 @@ BOOL ResMgr::GetResource( const ResId& rId, const Resource* pResObj )
pTop->Flags |= RC_NOTFOUND;
pTop->pClassRes = getEmptyBuffer();
pTop->pResource = (RSHEADER_TYPE*)pTop->pClassRes;
- return FALSE;
+ return sal_False;
}
}
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -1267,7 +1267,7 @@ void ResMgr::PopContext( const Resource* pResObj )
#ifdef DBG_UTIL
if ( DbgIsResource() && !(pTop->Flags & RC_NOTFOUND) )
{
- void* pRes = (BYTE*)pTop->pResource +
+ void* pRes = (sal_uInt8*)pTop->pResource +
pTop->pResource->GetLocalOff();
if ( pTop->pClassRes != pRes )
@@ -1319,7 +1319,7 @@ RSHEADER_TYPE* ResMgr::CreateBlock( const ResId& rId )
// ------------------------------------------------------------------
-INT16 ResMgr::GetShort( void * pShort )
+sal_Int16 ResMgr::GetShort( void * pShort )
{
return ((*((sal_uInt8*)pShort + 0) << 8) |
(*((sal_uInt8*)pShort + 1) << 0) );
@@ -1327,7 +1327,7 @@ INT16 ResMgr::GetShort( void * pShort )
// ------------------------------------------------------------------
-INT32 ResMgr::GetLong( void * pLong )
+sal_Int32 ResMgr::GetLong( void * pLong )
{
return ((*((sal_uInt8*)pLong + 0) << 24) |
(*((sal_uInt8*)pLong + 1) << 16) |
@@ -1350,7 +1350,7 @@ sal_uInt64 ResMgr::GetUInt64( void* pDatum )
}
// -----------------------------------------------------------------------
-sal_uInt32 ResMgr::GetStringWithoutHook( UniString& rStr, const BYTE* pStr )
+sal_uInt32 ResMgr::GetStringWithoutHook( UniString& rStr, const sal_uInt8* pStr )
{
sal_uInt32 nLen=0;
sal_uInt32 nRet = GetStringSize( pStr, nLen );
@@ -1362,7 +1362,7 @@ sal_uInt32 ResMgr::GetStringWithoutHook( UniString& rStr, const BYTE* pStr )
return nRet;
}
-sal_uInt32 ResMgr::GetString( UniString& rStr, const BYTE* pStr )
+sal_uInt32 ResMgr::GetString( UniString& rStr, const sal_uInt8* pStr )
{
UniString aString;
sal_uInt32 nRet = GetStringWithoutHook( aString, pStr );
@@ -1372,7 +1372,7 @@ sal_uInt32 ResMgr::GetString( UniString& rStr, const BYTE* pStr )
return nRet;
}
-sal_uInt32 ResMgr::GetByteString( rtl::OString& rStr, const BYTE* pStr )
+sal_uInt32 ResMgr::GetByteString( rtl::OString& rStr, const sal_uInt8* pStr )
{
sal_uInt32 nLen=0;
sal_uInt32 nRet = GetStringSize( pStr, nLen );
@@ -1382,7 +1382,7 @@ sal_uInt32 ResMgr::GetByteString( rtl::OString& rStr, const BYTE* pStr )
// ------------------------------------------------------------------
-sal_uInt32 ResMgr::GetStringSize( const BYTE* pStr, sal_uInt32& nLen )
+sal_uInt32 ResMgr::GetStringSize( const sal_uInt8* pStr, sal_uInt32& nLen )
{
nLen = static_cast< sal_uInt32 >( strlen( (const char*)pStr ) );
return GetStringSize( nLen );
@@ -1398,9 +1398,9 @@ sal_uInt32 ResMgr::GetRemainSize()
return pFallbackResMgr->GetRemainSize();
const ImpRCStack& rTop = aStack[nCurStack];
- return (sal_uInt32)((long)(BYTE *)rTop.pResource +
+ return (sal_uInt32)((long)(sal_uInt8 *)rTop.pResource +
rTop.pResource->GetLocalOff() -
- (long)(BYTE *)rTop.pClassRes);
+ (long)(sal_uInt8 *)rTop.pClassRes);
}
// -----------------------------------------------------------------------
@@ -1416,7 +1416,7 @@ void* ResMgr::Increment( sal_uInt32 nSize )
if( (rStack.Flags & RC_NOTFOUND) )
return rStack.pClassRes;
- BYTE* pClassRes = (BYTE*)rStack.pClassRes + nSize;
+ sal_uInt8* pClassRes = (sal_uInt8*)rStack.pClassRes + nSize;
rStack.pClassRes = pClassRes;
@@ -1507,7 +1507,7 @@ ResMgr* ResMgr::CreateFallbackResMgr( const ResId& rId, const Resource* pResourc
//
//---------------------------------------------------------------------------
-const char* ResMgr::GetLang( LanguageType& nType, USHORT nPrio )
+const char* ResMgr::GetLang( LanguageType& nType, sal_uInt16 nPrio )
{
if ( nType == LANGUAGE_SYSTEM || nType == LANGUAGE_DONTKNOW )
nType = MsLangId::getSystemUILanguage();
@@ -1718,29 +1718,29 @@ ResMgr* ResMgr::SearchCreateResMgr(
// -----------------------------------------------------------------------
-INT16 ResMgr::ReadShort()
+sal_Int16 ResMgr::ReadShort()
{
osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
if( pFallbackResMgr )
return pFallbackResMgr->ReadShort();
- INT16 n = GetShort( GetClass() );
- Increment( sizeof( INT16 ) );
+ sal_Int16 n = GetShort( GetClass() );
+ Increment( sizeof( sal_Int16 ) );
return n;
}
// -----------------------------------------------------------------------
-INT32 ResMgr::ReadLong()
+sal_Int32 ResMgr::ReadLong()
{
osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
if( pFallbackResMgr )
return pFallbackResMgr->ReadLong();
- INT32 n = GetLong( GetClass() );
- Increment( sizeof( INT32 ) );
+ sal_Int32 n = GetLong( GetClass() );
+ Increment( sizeof( sal_Int32 ) );
return n;
}
@@ -1763,7 +1763,7 @@ UniString ResMgr::ReadStringWithoutHook()
#endif
}
else
- Increment( GetStringWithoutHook( aRet, (const BYTE*)GetClass() ) );
+ Increment( GetStringWithoutHook( aRet, (const sal_uInt8*)GetClass() ) );
return aRet;
}
@@ -1793,7 +1793,7 @@ rtl::OString ResMgr::ReadByteString()
#endif
}
else
- Increment( GetByteString( aRet, (const BYTE*)GetClass() ) );
+ Increment( GetByteString( aRet, (const sal_uInt8*)GetClass() ) );
return aRet;
}
@@ -2021,8 +2021,8 @@ UniString SimpleResMgr::ReadString( sal_uInt32 nId )
return sReturn;
}
- // ULONG nLen = pResHeader->GetLocalOff() - sizeof(RSHEADER_TYPE);
- ResMgr::GetString( sReturn, (const BYTE*)(pResHeader+1) );
+ // sal_uIntPtr nLen = pResHeader->GetLocalOff() - sizeof(RSHEADER_TYPE);
+ ResMgr::GetString( sReturn, (const sal_uInt8*)(pResHeader+1) );
// not neccessary with te current implementation which holds the string table permanently, but to be sure ....
// note: pFallback cannot be NULL here and is either the fallback or m_pResImpl
@@ -2098,7 +2098,7 @@ sal_uInt32 SimpleResMgr::ReadBlob( sal_uInt32 nId, void** pBuffer )
// FreeBlob doesn't know that so it would probably crash ....
sal_uInt32 nRemaining = pResHeader->GetLocalOff() - sizeof(RSHEADER_TYPE);
- *pBuffer = (void*)(((BYTE*)pResHeader) + sizeof(RSHEADER_TYPE));
+ *pBuffer = (void*)(((sal_uInt8*)pResHeader) + sizeof(RSHEADER_TYPE));
// free an eventual fallback InternalResMgr
if( m_pResImpl != pFallback )
@@ -2115,6 +2115,6 @@ sal_uInt32 SimpleResMgr::ReadBlob( sal_uInt32 nId, void** pBuffer )
void SimpleResMgr::FreeBlob( void* pBuffer )
{
- void* pCompleteBuffer = (void*)(((BYTE*)pBuffer) - sizeof(RSHEADER_TYPE));
+ void* pCompleteBuffer = (void*)(((sal_uInt8*)pBuffer) - sizeof(RSHEADER_TYPE));
rtl_freeMemory(pCompleteBuffer);
}
diff --git a/tools/source/ref/errinf.cxx b/tools/source/ref/errinf.cxx
index 2f9c75a4b71c..1587f7324556 100644
--- a/tools/source/ref/errinf.cxx
+++ b/tools/source/ref/errinf.cxx
@@ -49,11 +49,11 @@ struct EDcrData
ErrorHandler *pFirstHdl;
ErrorContext *pFirstCtx;
DisplayFnPtr pDsp;
- BOOL bIsWindowDsp;
+ sal_Bool bIsWindowDsp;
DynamicErrorInfo *ppDcr[ERRCODE_DYNAMIC_COUNT];
- USHORT nNextDcr;
+ sal_uInt16 nNextDcr;
EDcrData();
static EDcrData *GetData();
@@ -62,12 +62,12 @@ static EDcrData *GetData();
class EDcr_Impl
{
- ULONG lErrId;
- USHORT nMask;
+ sal_uIntPtr lErrId;
+ sal_uInt16 nMask;
void RegisterEDcr(DynamicErrorInfo *);
void UnRegisterEDcr(DynamicErrorInfo *);
- static ErrorInfo *GetDynamicErrorInfo(ULONG lId);
+ static ErrorInfo *GetDynamicErrorInfo(sal_uIntPtr lId);
friend class DynamicErrorInfo;
friend class ErrorInfo;
@@ -76,7 +76,7 @@ friend class ErrorInfo;
EDcrData::EDcrData()
{
- for(USHORT n=0;n<ERRCODE_DYNAMIC_COUNT;n++)
+ for(sal_uInt16 n=0;n<ERRCODE_DYNAMIC_COUNT;n++)
ppDcr[n]=0;
nNextDcr=0;
pFirstHdl=0;
@@ -105,10 +105,10 @@ void EDcr_Impl::RegisterEDcr(DynamicErrorInfo *pDcr)
//Vergibt eine dynamische Id
EDcrData* pData=EDcrData::GetData();
- lErrId= (((ULONG)pData->nNextDcr + 1) << ERRCODE_DYNAMIC_SHIFT) +
+ lErrId= (((sal_uIntPtr)pData->nNextDcr + 1) << ERRCODE_DYNAMIC_SHIFT) +
pDcr->GetErrorCode();
DynamicErrorInfo **ppDcr=pData->ppDcr;
- USHORT nNext=pData->nNextDcr;
+ sal_uInt16 nNext=pData->nNextDcr;
// bei einem Ringbuffer koennen wir uns das ASSERT wohl sparen!
// DBG_ASSERT(ppDcr[nNext]==0,"ErrHdl: Alle Errors belegt");
@@ -127,8 +127,8 @@ void EDcr_Impl::UnRegisterEDcr(DynamicErrorInfo *pDcr)
EDcrData* pData=EDcrData::GetData();
DynamicErrorInfo **ppDcr=pData->ppDcr;
- ULONG lIdx=(
- ((ULONG)(*pDcr) & ERRCODE_DYNAMIC_MASK)>>ERRCODE_DYNAMIC_SHIFT)-1;
+ sal_uIntPtr lIdx=(
+ ((sal_uIntPtr)(*pDcr) & ERRCODE_DYNAMIC_MASK)>>ERRCODE_DYNAMIC_SHIFT)-1;
DBG_ASSERT(ppDcr[lIdx]==pDcr,"ErrHdl: Error nicht gefunden");
if(ppDcr[lIdx]==pDcr)
ppDcr[lIdx]=0;
@@ -142,7 +142,7 @@ TYPEINIT1(TwoStringErrorInfo, DynamicErrorInfo);
TYPEINIT1(MessageInfo, DynamicErrorInfo);
-ErrorInfo *ErrorInfo::GetErrorInfo(ULONG lId)
+ErrorInfo *ErrorInfo::GetErrorInfo(sal_uIntPtr lId)
{
if(lId & ERRCODE_DYNAMIC_MASK)
return EDcr_Impl::GetDynamicErrorInfo(lId);
@@ -150,12 +150,12 @@ ErrorInfo *ErrorInfo::GetErrorInfo(ULONG lId)
return new ErrorInfo(lId);
}
-DynamicErrorInfo::operator ULONG() const
+DynamicErrorInfo::operator sal_uIntPtr() const
{
return pImpl->lErrId;
}
-DynamicErrorInfo::DynamicErrorInfo(ULONG lArgUserId, USHORT nMask)
+DynamicErrorInfo::DynamicErrorInfo(sal_uIntPtr lArgUserId, sal_uInt16 nMask)
: ErrorInfo(lArgUserId)
{
pImpl=new EDcr_Impl;
@@ -169,32 +169,32 @@ DynamicErrorInfo::~DynamicErrorInfo()
delete pImpl;
}
-ErrorInfo* EDcr_Impl::GetDynamicErrorInfo(ULONG lId)
+ErrorInfo* EDcr_Impl::GetDynamicErrorInfo(sal_uIntPtr lId)
{
- ULONG lIdx=((lId & ERRCODE_DYNAMIC_MASK)>>ERRCODE_DYNAMIC_SHIFT)-1;
+ sal_uIntPtr lIdx=((lId & ERRCODE_DYNAMIC_MASK)>>ERRCODE_DYNAMIC_SHIFT)-1;
DynamicErrorInfo* pDcr=EDcrData::GetData()->ppDcr[lIdx];
- if(pDcr && (ULONG)(*pDcr)==lId)
+ if(pDcr && (sal_uIntPtr)(*pDcr)==lId)
return pDcr;
else
return new ErrorInfo(lId & ~ERRCODE_DYNAMIC_MASK);
}
-USHORT DynamicErrorInfo::GetDialogMask() const
+sal_uInt16 DynamicErrorInfo::GetDialogMask() const
{
return pImpl->nMask;
}
StandardErrorInfo::StandardErrorInfo(
- ULONG UserId, ULONG lArgExtId, USHORT nFlags)
+ sal_uIntPtr UserId, sal_uIntPtr lArgExtId, sal_uInt16 nFlags)
: DynamicErrorInfo(UserId, nFlags), lExtId(lArgExtId)
{
}
StringErrorInfo::StringErrorInfo(
- ULONG UserId, const String& aStringP, USHORT nFlags)
+ sal_uIntPtr UserId, const String& aStringP, sal_uInt16 nFlags)
: DynamicErrorInfo(UserId, nFlags), aString(aStringP)
{
}
@@ -205,8 +205,8 @@ class ErrHdl_Impl
public:
ErrorHandler *pNext;
- static BOOL CreateString(const ErrorHandler *pStart,
- const ErrorInfo*, String&, USHORT&);
+ static sal_Bool CreateString(const ErrorHandler *pStart,
+ const ErrorInfo*, String&, sal_uInt16&);
};
@@ -267,19 +267,19 @@ ErrorHandler::~ErrorHandler()
void ErrorHandler::RegisterDisplay(WindowDisplayErrorFunc *aDsp)
{
EDcrData *pData=EDcrData::GetData();
- pData->bIsWindowDsp=TRUE;
+ pData->bIsWindowDsp=sal_True;
pData->pDsp = reinterpret_cast< DisplayFnPtr >(aDsp);
}
void ErrorHandler::RegisterDisplay(BasicDisplayErrorFunc *aDsp)
{
EDcrData *pData=EDcrData::GetData();
- pData->bIsWindowDsp=FALSE;
+ pData->bIsWindowDsp=sal_False;
pData->pDsp = reinterpret_cast< DisplayFnPtr >(aDsp);
}
-USHORT ErrorHandler::HandleError_Impl(
- ULONG lId, USHORT nFlags, BOOL bJustCreateString, String & rError)
+sal_uInt16 ErrorHandler::HandleError_Impl(
+ sal_uIntPtr lId, sal_uInt16 nFlags, sal_Bool bJustCreateString, String & rError)
{
/* [Beschreibung]
@@ -316,8 +316,8 @@ USHORT ErrorHandler::HandleError_Impl(
break;
}
- BOOL bWarning = ((lId & ERRCODE_WARNING_MASK) == ERRCODE_WARNING_MASK);
- USHORT nErrFlags = ERRCODE_BUTTON_DEF_OK | ERRCODE_BUTTON_OK;
+ sal_Bool bWarning = ((lId & ERRCODE_WARNING_MASK) == ERRCODE_WARNING_MASK);
+ sal_uInt16 nErrFlags = ERRCODE_BUTTON_DEF_OK | ERRCODE_BUTTON_OK;
if (bWarning)
nErrFlags |= ERRCODE_MSG_WARNING;
else
@@ -326,7 +326,7 @@ USHORT ErrorHandler::HandleError_Impl(
DynamicErrorInfo* pDynPtr=PTR_CAST(DynamicErrorInfo,pInfo);
if(pDynPtr)
{
- USHORT nDynFlags = pDynPtr->GetDialogMask();
+ sal_uInt16 nDynFlags = pDynPtr->GetDialogMask();
if( nDynFlags )
nErrFlags = nDynFlags;
}
@@ -379,12 +379,12 @@ USHORT ErrorHandler::HandleError_Impl(
}
// static
-BOOL ErrorHandler::GetErrorString(ULONG lId, String& rStr)
+sal_Bool ErrorHandler::GetErrorString(sal_uIntPtr lId, String& rStr)
{
- return (BOOL)HandleError_Impl( lId, USHRT_MAX, TRUE, rStr );
+ return (sal_Bool)HandleError_Impl( lId, USHRT_MAX, sal_True, rStr );
}
-USHORT ErrorHandler::HandleError(ULONG lId, USHORT nFlags)
+sal_uInt16 ErrorHandler::HandleError(sal_uIntPtr lId, sal_uInt16 nFlags)
{
/* [Beschreibung]
@@ -404,30 +404,30 @@ USHORT ErrorHandler::HandleError(ULONG lId, USHORT nFlags)
*/
String aDummy;
- return HandleError_Impl( lId, nFlags, FALSE, aDummy );
+ return HandleError_Impl( lId, nFlags, sal_False, aDummy );
}
-BOOL ErrorHandler::ForwCreateString(const ErrorInfo* pInfo, String& rStr, USHORT &rFlags) const
+sal_Bool ErrorHandler::ForwCreateString(const ErrorInfo* pInfo, String& rStr, sal_uInt16 &rFlags) const
{
return ErrHdl_Impl::CreateString(this->pImpl->pNext, pInfo, rStr, rFlags);
}
-BOOL ErrHdl_Impl::CreateString( const ErrorHandler *pStart,
+sal_Bool ErrHdl_Impl::CreateString( const ErrorHandler *pStart,
const ErrorInfo* pInfo, String& pStr,
- USHORT &rFlags)
+ sal_uInt16 &rFlags)
{
for(const ErrorHandler *pHdl=pStart;pHdl;pHdl=pHdl->pImpl->pNext)
{
if(pHdl->CreateString( pInfo, pStr, rFlags))
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SimpleErrorHandler::CreateString(
- const ErrorInfo *pInfo, String &rStr, USHORT &) const
+sal_Bool SimpleErrorHandler::CreateString(
+ const ErrorInfo *pInfo, String &rStr, sal_uInt16 &) const
{
- ULONG nId = pInfo->GetErrorCode();
+ sal_uIntPtr nId = pInfo->GetErrorCode();
ByteString aStr;
aStr="Id ";
aStr+=ByteString::CreateFromInt32(nId);
@@ -443,7 +443,7 @@ BOOL SimpleErrorHandler::CreateString(
if(pDyn)
{
aStr+="\nDId ";
- aStr+=ByteString::CreateFromInt32((ULONG)*pDyn);
+ aStr+=ByteString::CreateFromInt32((sal_uIntPtr)*pDyn);
}
StandardErrorInfo *pStd=PTR_CAST(StandardErrorInfo,pInfo);
if(pStd)
@@ -452,7 +452,7 @@ BOOL SimpleErrorHandler::CreateString(
aStr+=ByteString::CreateFromInt32(pStd->GetExtendedErrorCode());
}
rStr = String( aStr, RTL_TEXTENCODING_ASCII_US );
- return TRUE;
+ return sal_True;
}
SimpleErrorHandler::SimpleErrorHandler()
diff --git a/tools/source/ref/globname.cxx b/tools/source/ref/globname.cxx
index 2d45e470e688..0228aeef9e81 100644..100755
--- a/tools/source/ref/globname.cxx
+++ b/tools/source/ref/globname.cxx
@@ -52,7 +52,7 @@ ImpSvGlobalName::ImpSvGlobalName( int )
/*************************************************************************
|* ImpSvGlobalName::operator ==()
*************************************************************************/
-BOOL ImpSvGlobalName::operator == ( const ImpSvGlobalName & rObj ) const
+sal_Bool ImpSvGlobalName::operator == ( const ImpSvGlobalName & rObj ) const
{
return !memcmp( szData, rObj.szData, sizeof( szData ) );
}
@@ -75,10 +75,10 @@ struct _GUID
struct GUID
#endif
{
- UINT32 Data1;
- UINT16 Data2;
- UINT16 Data3;
- BYTE Data4[8];
+ sal_uInt32 Data1;
+ sal_uInt16 Data2;
+ sal_uInt16 Data3;
+ sal_uInt8 Data4[8];
};
SvGlobalName::SvGlobalName( const CLSID & rId )
{
@@ -87,16 +87,16 @@ SvGlobalName::SvGlobalName( const CLSID & rId )
memcpy( pImp->szData, &rId, sizeof( pImp->szData ) );
}
-SvGlobalName::SvGlobalName( UINT32 n1, USHORT n2, USHORT n3,
- BYTE b8, BYTE b9, BYTE b10, BYTE b11,
- BYTE b12, BYTE b13, BYTE b14, BYTE b15 )
+SvGlobalName::SvGlobalName( sal_uInt32 n1, sal_uInt16 n2, sal_uInt16 n3,
+ sal_uInt8 b8, sal_uInt8 b9, sal_uInt8 b10, sal_uInt8 b11,
+ sal_uInt8 b12, sal_uInt8 b13, sal_uInt8 b14, sal_uInt8 b15 )
{
pImp = new ImpSvGlobalName();
pImp->nRefCount++;
- *(UINT32 *)pImp->szData = n1;
- *(USHORT *)&pImp->szData[ 4 ] = n2;
- *(USHORT *)&pImp->szData[ 6 ] = n3;
+ *(sal_uInt32 *)pImp->szData = n1;
+ *(sal_uInt16 *)&pImp->szData[ 4 ] = n2;
+ *(sal_uInt16 *)&pImp->szData[ 6 ] = n3;
pImp->szData[ 8 ] = b8;
pImp->szData[ 9 ] = b9;
pImp->szData[ 10 ] = b10;
@@ -149,9 +149,9 @@ void SvGlobalName::NewImp()
*************************************************************************/
SvStream& operator << ( SvStream& rOStr, const SvGlobalName & rObj )
{
- rOStr << *(UINT32 *)rObj.pImp->szData;
- rOStr << *(USHORT *)&rObj.pImp->szData[ 4 ];
- rOStr << *(USHORT *)&rObj.pImp->szData[ 6 ];
+ rOStr << *(sal_uInt32 *)rObj.pImp->szData;
+ rOStr << *(sal_uInt16 *)&rObj.pImp->szData[ 4 ];
+ rOStr << *(sal_uInt16 *)&rObj.pImp->szData[ 6 ];
rOStr.Write( (sal_Char *)&rObj.pImp->szData[ 8 ], 8 );
return rOStr;
}
@@ -159,9 +159,9 @@ SvStream& operator << ( SvStream& rOStr, const SvGlobalName & rObj )
SvStream& operator >> ( SvStream& rStr, SvGlobalName & rObj )
{
rObj.NewImp(); // kopieren, falls noetig
- rStr >> *(UINT32 *)rObj.pImp->szData;
- rStr >> *(USHORT *)&rObj.pImp->szData[ 4 ];
- rStr >> *(USHORT *)&rObj.pImp->szData[ 6 ];
+ rStr >> *(sal_uInt32 *)rObj.pImp->szData;
+ rStr >> *(sal_uInt16 *)&rObj.pImp->szData[ 4 ];
+ rStr >> *(sal_uInt16 *)&rObj.pImp->szData[ 6 ];
rStr.Read( (sal_Char *)&rObj.pImp->szData[ 8 ], 8 );
return rStr;
}
@@ -170,41 +170,41 @@ SvStream& operator >> ( SvStream& rStr, SvGlobalName & rObj )
/*************************************************************************
|* SvGlobalName::operator < ()
*************************************************************************/
-BOOL SvGlobalName::operator < ( const SvGlobalName & rObj ) const
+sal_Bool SvGlobalName::operator < ( const SvGlobalName & rObj ) const
{
int n = memcmp( pImp->szData +6, rObj.pImp->szData +6,
sizeof( pImp->szData ) -6);
if( n < 0 )
- return TRUE;
+ return sal_True;
else if( n > 0 )
- return FALSE;
- else if( *(USHORT *)&pImp->szData[ 4 ] < *(USHORT *)&rObj.pImp->szData[ 4 ] )
- return TRUE;
- else if( *(USHORT *)&pImp->szData[ 4 ] == *(USHORT *)&rObj.pImp->szData[ 4 ] )
- return *(UINT32 *)pImp->szData < *(UINT32 *)rObj.pImp->szData;
+ return sal_False;
+ else if( *(sal_uInt16 *)&pImp->szData[ 4 ] < *(sal_uInt16 *)&rObj.pImp->szData[ 4 ] )
+ return sal_True;
+ else if( *(sal_uInt16 *)&pImp->szData[ 4 ] == *(sal_uInt16 *)&rObj.pImp->szData[ 4 ] )
+ return *(sal_uInt32 *)pImp->szData < *(sal_uInt32 *)rObj.pImp->szData;
else
- return FALSE;
+ return sal_False;
}
/*************************************************************************
|* SvGlobalName::operator +=()
*************************************************************************/
-SvGlobalName & SvGlobalName::operator += ( UINT32 n )
+SvGlobalName & SvGlobalName::operator += ( sal_uInt32 n )
{
NewImp();
- UINT32 nOld = (*(UINT32 *)pImp->szData);
- (*(UINT32 *)pImp->szData) += n;
- if( nOld > *(UINT32 *)pImp->szData )
+ sal_uInt32 nOld = (*(sal_uInt32 *)pImp->szData);
+ (*(sal_uInt32 *)pImp->szData) += n;
+ if( nOld > *(sal_uInt32 *)pImp->szData )
// ueberlauf
- (*(USHORT *)&pImp->szData[ 4 ])++;
+ (*(sal_uInt16 *)&pImp->szData[ 4 ])++;
return *this;
}
/*************************************************************************
|* SvGlobalName::operator ==()
*************************************************************************/
-BOOL SvGlobalName::operator == ( const SvGlobalName & rObj ) const
+sal_Bool SvGlobalName::operator == ( const SvGlobalName & rObj ) const
{
return *pImp == *rObj.pImp;
}
@@ -218,7 +218,7 @@ void SvGlobalName::MakeFromMemory( void * pData )
/*************************************************************************
|* SvGlobalName::MakeId()
*************************************************************************/
-BOOL SvGlobalName::MakeId( const String & rIdStr )
+sal_Bool SvGlobalName::MakeId( const String & rIdStr )
{
ByteString aStr( rIdStr, RTL_TEXTENCODING_ASCII_US );
sal_Char * pStr = (sal_Char *)aStr.GetBuffer();
@@ -226,7 +226,7 @@ BOOL SvGlobalName::MakeId( const String & rIdStr )
&& '-' == pStr[ 8 ] && '-' == pStr[ 13 ]
&& '-' == pStr[ 18 ] && '-' == pStr[ 23 ] )
{
- UINT32 nFirst = 0;
+ sal_uInt32 nFirst = 0;
int i = 0;
for( i = 0; i < 8; i++ )
{
@@ -236,11 +236,11 @@ BOOL SvGlobalName::MakeId( const String & rIdStr )
else
nFirst = nFirst * 16 + (toupper( *pStr ) - 'A' + 10 );
else
- return FALSE;
+ return sal_False;
pStr++;
}
- UINT16 nSec = 0;
+ sal_uInt16 nSec = 0;
pStr++;
for( i = 0; i < 4; i++ )
{
@@ -248,13 +248,13 @@ BOOL SvGlobalName::MakeId( const String & rIdStr )
if( isdigit( *pStr ) )
nSec = nSec * 16 + (*pStr - '0');
else
- nSec = nSec * 16 + (UINT16)(toupper( *pStr ) - 'A' + 10 );
+ nSec = nSec * 16 + (sal_uInt16)(toupper( *pStr ) - 'A' + 10 );
else
- return FALSE;
+ return sal_False;
pStr++;
}
- UINT16 nThird = 0;
+ sal_uInt16 nThird = 0;
pStr++;
for( i = 0; i < 4; i++ )
{
@@ -262,13 +262,13 @@ BOOL SvGlobalName::MakeId( const String & rIdStr )
if( isdigit( *pStr ) )
nThird = nThird * 16 + (*pStr - '0');
else
- nThird = nThird * 16 + (UINT16)(toupper( *pStr ) - 'A' + 10 );
+ nThird = nThird * 16 + (sal_uInt16)(toupper( *pStr ) - 'A' + 10 );
else
- return FALSE;
+ return sal_False;
pStr++;
}
- BYTE szRemain[ 8 ];
+ sal_Int8 szRemain[ 8 ];
memset( szRemain, 0, sizeof( szRemain ) );
pStr++;
for( i = 0; i < 16; i++ )
@@ -277,22 +277,22 @@ BOOL SvGlobalName::MakeId( const String & rIdStr )
if( isdigit( *pStr ) )
szRemain[i/2] = szRemain[i/2] * 16 + (*pStr - '0');
else
- szRemain[i/2] = szRemain[i/2] * 16 + (BYTE)(toupper( *pStr ) - 'A' + 10 );
+ szRemain[i/2] = szRemain[i/2] * 16 + (sal_Int8)(toupper( *pStr ) - 'A' + 10 );
else
- return FALSE;
+ return sal_False;
pStr++;
if( i == 3 )
pStr++;
}
NewImp();
- *(UINT32 *)pImp->szData = nFirst;
- *(USHORT *)&pImp->szData[ 4 ] = nSec;
- *(USHORT *)&pImp->szData[ 6 ] = nThird;
+ *(sal_uInt32 *)pImp->szData = nFirst;
+ *(sal_uInt16 *)&pImp->szData[ 4 ] = nSec;
+ *(sal_uInt16 *)&pImp->szData[ 6 ] = nThird;
memcpy( &pImp->szData[ 8 ], szRemain, 8 );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -303,13 +303,13 @@ String SvGlobalName::GetctorName() const
ByteString aRet;
sal_Char buf[ 20 ];
- sprintf( buf, "0x%8.8lX", (ULONG)*(UINT32 *)pImp->szData );
+ sprintf( buf, "0x%8.8lX", (sal_uIntPtr)*(sal_uInt32 *)pImp->szData );
aRet += buf;
- USHORT i;
+ sal_uInt16 i;
for( i = 4; i < 8; i += 2 )
{
aRet += ',';
- sprintf( buf, "0x%4.4X", *(USHORT *)&pImp->szData[ i ] );
+ sprintf( buf, "0x%4.4X", *(sal_uInt16 *)&pImp->szData[ i ] );
aRet += buf;
}
for( i = 8; i < 16; i++ )
@@ -329,13 +329,13 @@ String SvGlobalName::GetHexName() const
ByteString aRet;
sal_Char buf[ 10 ];
- sprintf( buf, "%8.8lX", (ULONG)*(UINT32 *)pImp->szData );
+ sprintf( buf, "%8.8lX", (sal_uIntPtr)*(sal_uInt32 *)pImp->szData );
aRet += buf;
aRet += '-';
- USHORT i ;
+ sal_uInt16 i ;
for( i = 4; i < 8; i += 2 )
{
- sprintf( buf, "%4.4X", *(USHORT *)&pImp->szData[ i ] );
+ sprintf( buf, "%4.4X", *(sal_uInt16 *)&pImp->szData[ i ] );
aRet += buf;
aRet += '-';
}
@@ -368,7 +368,7 @@ SvGlobalNameList::SvGlobalNameList()
*************************************************************************/
SvGlobalNameList::~SvGlobalNameList()
{
- for( ULONG i = Count(); i > 0; i-- )
+ for( sal_uIntPtr i = Count(); i > 0; i-- )
{
ImpSvGlobalName * pImp = (ImpSvGlobalName *)aList.GetObject( i -1 );
pImp->nRefCount--;
@@ -389,7 +389,7 @@ void SvGlobalNameList::Append( const SvGlobalName & rName )
/*************************************************************************
|* SvGlobalNameList::GetObject()
*************************************************************************/
-SvGlobalName SvGlobalNameList::GetObject( ULONG nPos )
+SvGlobalName SvGlobalNameList::GetObject( sal_uLong nPos )
{
return SvGlobalName( (ImpSvGlobalName *)aList.GetObject( nPos ) );
}
@@ -397,14 +397,14 @@ SvGlobalName SvGlobalNameList::GetObject( ULONG nPos )
/*************************************************************************
|* SvGlobalNameList::IsEntry()
*************************************************************************/
-BOOL SvGlobalNameList::IsEntry( const SvGlobalName & rName )
+sal_Bool SvGlobalNameList::IsEntry( const SvGlobalName & rName )
{
- for( ULONG i = Count(); i > 0; i-- )
+ for( sal_uIntPtr i = Count(); i > 0; i-- )
{
if( *rName.pImp == *(ImpSvGlobalName *)aList.GetObject( i -1 ) )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
com::sun::star::uno::Sequence < sal_Int8 > SvGlobalName::GetByteSequence() const
@@ -413,14 +413,14 @@ com::sun::star::uno::Sequence < sal_Int8 > SvGlobalName::GetByteSequence() const
// maybe transported remotely
com::sun::star::uno::Sequence< sal_Int8 > aResult( 16 );
- aResult[0] = (sal_Int8) (*(UINT32 *)pImp->szData >> 24);
- aResult[1] = (sal_Int8) ((*(UINT32 *)pImp->szData << 8 ) >> 24);
- aResult[2] = (sal_Int8) ((*(UINT32 *)pImp->szData << 16 ) >> 24);
- aResult[3] = (sal_Int8) ((*(UINT32 *)pImp->szData << 24 ) >> 24);
- aResult[4] = (sal_Int8) (*(USHORT *)&pImp->szData[ 4 ] >> 8);
- aResult[5] = (sal_Int8) ((*(USHORT *)&pImp->szData[ 4 ] << 8 ) >> 8);
- aResult[6] = (sal_Int8) (*(USHORT *)&pImp->szData[ 6 ] >> 8);
- aResult[7] = (sal_Int8) ((*(USHORT *)&pImp->szData[ 6 ] << 8 ) >> 8);
+ aResult[0] = (sal_Int8) (*(sal_uInt32 *)pImp->szData >> 24);
+ aResult[1] = (sal_Int8) ((*(sal_uInt32 *)pImp->szData << 8 ) >> 24);
+ aResult[2] = (sal_Int8) ((*(sal_uInt32 *)pImp->szData << 16 ) >> 24);
+ aResult[3] = (sal_Int8) ((*(sal_uInt32 *)pImp->szData << 24 ) >> 24);
+ aResult[4] = (sal_Int8) (*(sal_uInt16 *)&pImp->szData[ 4 ] >> 8);
+ aResult[5] = (sal_Int8) ((*(sal_uInt16 *)&pImp->szData[ 4 ] << 8 ) >> 8);
+ aResult[6] = (sal_Int8) (*(sal_uInt16 *)&pImp->szData[ 6 ] >> 8);
+ aResult[7] = (sal_Int8) ((*(sal_uInt16 *)&pImp->szData[ 6 ] << 8 ) >> 8);
aResult[8] = pImp->szData[ 8 ];
aResult[9] = pImp->szData[ 9 ];
aResult[10] = pImp->szData[ 10 ];
diff --git a/tools/source/ref/pstm.cxx b/tools/source/ref/pstm.cxx
index e0412fd5d675..b2a5600075cc 100644
--- a/tools/source/ref/pstm.cxx
+++ b/tools/source/ref/pstm.cxx
@@ -37,7 +37,7 @@
/************************************************************************
|* SvClassManager::Register()
*************************************************************************/
-void SvClassManager::Register( USHORT nClassId, SvCreateInstancePersist pFunc )
+void SvClassManager::Register( sal_uInt16 nClassId, SvCreateInstancePersist pFunc )
{
#ifdef DBG_UTIL
SvCreateInstancePersist p;
@@ -50,7 +50,7 @@ void SvClassManager::Register( USHORT nClassId, SvCreateInstancePersist pFunc )
/************************************************************************
|* SvClassManager::Get()
*************************************************************************/
-SvCreateInstancePersist SvClassManager::Get( USHORT nClassId )
+SvCreateInstancePersist SvClassManager::Get( sal_uInt16 nClassId )
{
Map::const_iterator i(aAssocTable.find(nClassId));
return i == aAssocTable.end() ? 0 : i->second;
@@ -63,32 +63,32 @@ TYPEINIT0( SvRttiBase );
SvPersistBaseMemberList::SvPersistBaseMemberList(){}
SvPersistBaseMemberList::SvPersistBaseMemberList(
- USHORT nInitSz, USHORT nResize )
+ sal_uInt16 nInitSz, sal_uInt16 nResize )
: SuperSvPersistBaseMemberList( nInitSz, nResize ){}
-#define PERSIST_LIST_VER (BYTE)0
-#define PERSIST_LIST_DBGUTIL (BYTE)0x80
+#define PERSIST_LIST_VER (sal_uInt8)0
+#define PERSIST_LIST_DBGUTIL (sal_uInt8)0x80
/************************************************************************
|* SvPersistBaseMemberList::WriteOnlyStreamedObjects()
*************************************************************************/
void SvPersistBaseMemberList::WriteObjects( SvPersistStream & rStm,
- BOOL bOnlyStreamed ) const
+ sal_Bool bOnlyStreamed ) const
{
#ifdef STOR_NO_OPTIMIZE
- rStm << (BYTE)(PERSIST_LIST_VER | PERSIST_LIST_DBGUTIL);
- UINT32 nObjPos = rStm.WriteDummyLen();
+ rStm << (sal_uInt8)(PERSIST_LIST_VER | PERSIST_LIST_DBGUTIL);
+ sal_uInt32 nObjPos = rStm.WriteDummyLen();
#else
- BYTE bTmp = PERSIST_LIST_VER;
+ sal_uInt8 bTmp = PERSIST_LIST_VER;
rStm << bTmp;
#endif
- UINT32 nCountMember = Count();
- ULONG nCountPos = rStm.Tell();
- UINT32 nWriteCount = 0;
+ sal_uInt32 nCountMember = Count();
+ sal_uIntPtr nCountPos = rStm.Tell();
+ sal_uInt32 nWriteCount = 0;
rStm << nCountMember;
//bloss die Liste nicht veraendern,
//wegen Seiteneffekten beim Save
- for( ULONG n = 0; n < nCountMember; n++ )
+ for( sal_uIntPtr n = 0; n < nCountMember; n++ )
{
SvPersistBase * pObj = GetObject( n );
if( !bOnlyStreamed || rStm.IsStreamed( pObj ) )
@@ -100,7 +100,7 @@ void SvPersistBaseMemberList::WriteObjects( SvPersistStream & rStm,
if( nWriteCount != nCountMember )
{
// nicht alle Objekte geschrieben, Count anpassen
- ULONG nPos = rStm.Tell();
+ sal_uIntPtr nPos = rStm.Tell();
rStm.Seek( nCountPos );
rStm << nWriteCount;
rStm.Seek( nPos );
@@ -126,7 +126,7 @@ SvPersistStream& operator << ( SvPersistStream & rStm,
SvPersistStream& operator >> ( SvPersistStream & rStm,
SvPersistBaseMemberList & rLst )
{
- BYTE nVer;
+ sal_uInt8 nVer;
rStm >> nVer;
if( (nVer & ~PERSIST_LIST_DBGUTIL) != PERSIST_LIST_VER )
@@ -135,13 +135,13 @@ SvPersistStream& operator >> ( SvPersistStream & rStm,
DBG_ERROR( "persist list, false version" );
}
- UINT32 nObjLen(0), nObjPos(0);
+ sal_uInt32 nObjLen(0), nObjPos(0);
if( nVer & PERSIST_LIST_DBGUTIL )
nObjLen = rStm.ReadLen( &nObjPos );
sal_uInt32 nCount;
rStm >> nCount;
- for( ULONG n = 0; n < nCount && rStm.GetError() == SVSTREAM_OK; n++ )
+ for( sal_uIntPtr n = 0; n < nCount && rStm.GetError() == SVSTREAM_OK; n++ )
{
SvPersistBase * pObj;
rStm >> pObj;
@@ -168,7 +168,7 @@ SvPersistStream::SvPersistStream
gespeichert werdn k"onnen */
SvStream * pStream, /* Dieser Stream wird als Medium genommen, auf
dem der PersistStream arbeitet */
- UINT32 nStartIdxP /* Ab diesem Index werden die Id's f"ur
+ sal_uInt32 nStartIdxP /* Ab diesem Index werden die Id's f"ur
die Objekte vergeben, er muss gr"osser
als Null sein. */
)
@@ -187,7 +187,7 @@ SvPersistStream::SvPersistStream
*/
{
DBG_ASSERT( nStartIdx != 0, "zero index not allowed" );
- bIsWritable = TRUE;
+ bIsWritable = sal_True;
if( pStm )
{
SetVersion( pStm->GetVersion() );
@@ -225,7 +225,7 @@ SvPersistStream::SvPersistStream
wenn das erste aus dieser Hierarchie benutzt werden soll.
*/
{
- bIsWritable = TRUE;
+ bIsWritable = sal_True;
if( pStm )
{
SetVersion( pStm->GetVersion() );
@@ -279,14 +279,14 @@ void SvPersistStream::SetStream
}
//=========================================================================
-USHORT SvPersistStream::IsA() const
+sal_uInt16 SvPersistStream::IsA() const
/* [Beschreibung]
Gibt den Identifier dieses Streamklasse zur"uck.
[R"uckgabewert]
- USHORT ID_PERSISTSTREAM wird zur"uckgegeben.
+ sal_uInt16 ID_PERSISTSTREAM wird zur"uckgegeben.
[Querverweise]
@@ -311,10 +311,10 @@ void SvPersistStream::ResetError()
/*************************************************************************
|* SvPersistStream::GetData()
*************************************************************************/
-ULONG SvPersistStream::GetData( void* pData, ULONG nSize )
+sal_uIntPtr SvPersistStream::GetData( void* pData, sal_uIntPtr nSize )
{
DBG_ASSERT( pStm, "stream not set" );
- ULONG nRet = pStm->Read( pData, nSize );
+ sal_uIntPtr nRet = pStm->Read( pData, nSize );
SetError( pStm->GetError() );
return nRet;
}
@@ -322,10 +322,10 @@ ULONG SvPersistStream::GetData( void* pData, ULONG nSize )
/*************************************************************************
|* SvPersistStream::PutData()
*************************************************************************/
-ULONG SvPersistStream::PutData( const void* pData, ULONG nSize )
+sal_uIntPtr SvPersistStream::PutData( const void* pData, sal_uIntPtr nSize )
{
DBG_ASSERT( pStm, "stream not set" );
- ULONG nRet = pStm->Write( pData, nSize );
+ sal_uIntPtr nRet = pStm->Write( pData, nSize );
SetError( pStm->GetError() );
return nRet;
}
@@ -333,10 +333,10 @@ ULONG SvPersistStream::PutData( const void* pData, ULONG nSize )
/*************************************************************************
|* SvPersistStream::Seek()
*************************************************************************/
-ULONG SvPersistStream::SeekPos( ULONG nPos )
+sal_uIntPtr SvPersistStream::SeekPos( sal_uIntPtr nPos )
{
DBG_ASSERT( pStm, "stream not set" );
- ULONG nRet = pStm->Seek( nPos );
+ sal_uIntPtr nRet = pStm->Seek( nPos );
SetError( pStm->GetError() );
return nRet;
}
@@ -351,15 +351,15 @@ void SvPersistStream::FlushData()
/*************************************************************************
|* SvPersistStream::GetCurMaxIndex()
*************************************************************************/
-ULONG SvPersistStream::GetCurMaxIndex( const SvPersistUIdx & rIdx ) const
+sal_uIntPtr SvPersistStream::GetCurMaxIndex( const SvPersistUIdx & rIdx ) const
{
// const bekomme ich nicht den hoechsten Index
SvPersistUIdx * p = (SvPersistUIdx *)&rIdx;
// alten merken
- ULONG nCurIdx = p->GetCurIndex();
+ sal_uIntPtr nCurIdx = p->GetCurIndex();
p->Last();
// Bereiche nicht ueberschneiden, deshalb nur groessere Indexe
- ULONG nMaxIdx = p->GetCurIndex();
+ sal_uIntPtr nMaxIdx = p->GetCurIndex();
// wieder herstellen
p->Seek( nCurIdx );
return nMaxIdx;
@@ -368,9 +368,9 @@ ULONG SvPersistStream::GetCurMaxIndex( const SvPersistUIdx & rIdx ) const
/*************************************************************************
|* SvPersistStream::GetIndex()
*************************************************************************/
-ULONG SvPersistStream::GetIndex( SvPersistBase * pObj ) const
+sal_uIntPtr SvPersistStream::GetIndex( SvPersistBase * pObj ) const
{
- ULONG nId = (ULONG)aPTable.Get( (ULONG)pObj );
+ sal_uIntPtr nId = (sal_uIntPtr)aPTable.Get( (sal_uIntPtr)pObj );
if( !nId && pRefStm )
return pRefStm->GetIndex( pObj );
return nId;
@@ -379,7 +379,7 @@ ULONG SvPersistStream::GetIndex( SvPersistBase * pObj ) const
/*************************************************************************
|* SvPersistStream::GetObject)
*************************************************************************/
-SvPersistBase * SvPersistStream::GetObject( ULONG nIdx ) const
+SvPersistBase * SvPersistStream::GetObject( sal_uIntPtr nIdx ) const
{
if( nIdx >= nStartIdx )
return aPUIdx.Get( nIdx );
@@ -393,7 +393,7 @@ SvPersistBase * SvPersistStream::GetObject( ULONG nIdx ) const
#define LEN_2 0x40
#define LEN_4 0x20
#define LEN_5 0x10
-UINT32 SvPersistStream::ReadCompressed
+sal_uInt32 SvPersistStream::ReadCompressed
(
SvStream & rStm /* Aus diesem Stream werden die komprimierten Daten
gelesen */
@@ -405,14 +405,14 @@ UINT32 SvPersistStream::ReadCompressed
[R"uckgabewert]
- UINT32 Das nicht komprimierte Wort wird zur"uckgegeben.
+ sal_uInt32 Das nicht komprimierte Wort wird zur"uckgegeben.
[Querverweise]
*/
{
- UINT32 nRet(0);
- BYTE nMask;
+ sal_uInt32 nRet(0);
+ sal_uInt8 nMask;
rStm >> nMask;
if( nMask & LEN_1 )
nRet = ~LEN_1 & nMask;
@@ -430,7 +430,7 @@ UINT32 SvPersistStream::ReadCompressed
rStm >> nMask;
nRet |= nMask;
nRet <<= 16;
- USHORT n;
+ sal_uInt16 n;
rStm >> n;
nRet |= n;
}
@@ -456,7 +456,7 @@ void SvPersistStream::WriteCompressed
(
SvStream & rStm,/* Aus diesem Stream werden die komprimierten Daten
gelesen */
- UINT32 nVal /* Dieser Wert wird komprimiert geschrieben */
+ sal_uInt32 nVal /* Dieser Wert wird komprimiert geschrieben */
)
/* [Beschreibung]
@@ -474,30 +474,30 @@ void SvPersistStream::WriteCompressed
{
#ifdef STOR_NO_OPTIMIZE
if( nVal < 0x80 )
- rStm << (BYTE)(LEN_1 | nVal);
+ rStm << (sal_uInt8)(LEN_1 | nVal);
else if( nVal < 0x4000 )
{
- rStm << (BYTE)(LEN_2 | (nVal >> 8));
- rStm << (BYTE)nVal;
+ rStm << (sal_uInt8)(LEN_2 | (nVal >> 8));
+ rStm << (sal_uInt8)nVal;
}
else if( nVal < 0x20000000 )
{
- // hoechstes BYTE
- rStm << (BYTE)(LEN_4 | (nVal >> 24));
- // 2. hoechstes BYTE
- rStm << (BYTE)(nVal >> 16);
- rStm << (USHORT)(nVal);
+ // hoechstes sal_uInt8
+ rStm << (sal_uInt8)(LEN_4 | (nVal >> 24));
+ // 2. hoechstes sal_uInt8
+ rStm << (sal_uInt8)(nVal >> 16);
+ rStm << (sal_uInt16)(nVal);
}
else
#endif
{
- rStm << (BYTE)LEN_5;
+ rStm << (sal_uInt8)LEN_5;
rStm << nVal;
}
}
//=========================================================================
-UINT32 SvPersistStream::WriteDummyLen()
+sal_uInt32 SvPersistStream::WriteDummyLen()
/* [Beschreibung]
Die Methode schreibt 4 Byte in den Stream und gibt die Streamposition
@@ -505,11 +505,11 @@ UINT32 SvPersistStream::WriteDummyLen()
[R"uckgabewert]
- UINT32 Die Position hinter der L"angenangabe wird zur"uckgegeben.
+ sal_uInt32 Die Position hinter der L"angenangabe wird zur"uckgegeben.
[Beispiel]
- UINT32 nObjPos = rStm.WriteDummyLen();
+ sal_uInt32 nObjPos = rStm.WriteDummyLen();
...
// Daten schreiben
...
@@ -522,13 +522,13 @@ UINT32 SvPersistStream::WriteDummyLen()
*/
{
#ifdef DBG_UTIL
- UINT32 nPos = Tell();
+ sal_uInt32 nPos = Tell();
#endif
- UINT32 n0 = 0;
+ sal_uInt32 n0 = 0;
*this << n0; // wegen Sun sp
// keine Assertion bei Streamfehler
DBG_ASSERT( GetError() != SVSTREAM_OK
- || (sizeof( UINT32 ) == Tell() -nPos),
+ || (sizeof( sal_uInt32 ) == Tell() -nPos),
"keine 4-Byte fuer Langenangabe" );
return Tell();
}
@@ -536,20 +536,20 @@ UINT32 SvPersistStream::WriteDummyLen()
//=========================================================================
void SvPersistStream::WriteLen
(
- UINT32 nObjPos /* die Position + 4, an der die L"ange geschrieben
+ sal_uInt32 nObjPos /* die Position + 4, an der die L"ange geschrieben
wird. */
)
/* [Beschreibung]
Die Methode schreibt die Differenz zwischen der aktuellen und
- nObjPos als UINT32 an die Position nObjPos -4 im Stream. Danach
+ nObjPos als sal_uInt32 an die Position nObjPos -4 im Stream. Danach
wird der Stream wieder auf die alte Position gestellt.
[Beispiel]
Die Differenz enth"alt nicht die L"angenangabe.
- UINT32 nObjPos = rStm.WriteDummyLen();
+ sal_uInt32 nObjPos = rStm.WriteDummyLen();
...
// Daten schreiben
...
@@ -561,19 +561,19 @@ void SvPersistStream::WriteLen
<SvPersistStream::ReadLen>, <SvPersistStream::WriteDummyLen>
*/
{
- UINT32 nPos = Tell();
- UINT32 nLen = nPos - nObjPos;
+ sal_uInt32 nPos = Tell();
+ sal_uInt32 nLen = nPos - nObjPos;
// die Laenge mu� im stream 4-Byte betragen
- Seek( nObjPos - sizeof( UINT32 ) );
+ Seek( nObjPos - sizeof( sal_uInt32 ) );
// Laenge schreiben
*this << nLen;
Seek( nPos );
}
//=========================================================================
-UINT32 SvPersistStream::ReadLen
+sal_uInt32 SvPersistStream::ReadLen
(
- UINT32 * pTestPos /* Die Position des Streams, nach dem Lesen der
+ sal_uInt32 * pTestPos /* Die Position des Streams, nach dem Lesen der
L"ange, wird zur"uckgegeben. Es darf auch NULL
"ubergeben werden. */
)
@@ -583,7 +583,7 @@ UINT32 SvPersistStream::ReadLen
und <SvPersistStream::WriteLen> geschrieben wurde.
*/
{
- UINT32 nLen;
+ sal_uInt32 nLen;
*this >> nLen;
if( pTestPos )
*pTestPos = Tell();
@@ -593,15 +593,15 @@ UINT32 SvPersistStream::ReadLen
//=========================================================================
// Dateirormat abw"arts kompatibel
#ifdef STOR_NO_OPTIMIZE
-#define P_VER (BYTE)0x00
+#define P_VER (sal_uInt8)0x00
#else
-#define P_VER (BYTE)0x01
+#define P_VER (sal_uInt8)0x01
#endif
-#define P_VER_MASK (BYTE)0x0F
-#define P_ID_0 (BYTE)0x80
-#define P_OBJ (BYTE)0x40
-#define P_DBGUTIL (BYTE)0x20
-#define P_ID (BYTE)0x10
+#define P_VER_MASK (sal_uInt8)0x0F
+#define P_ID_0 (sal_uInt8)0x80
+#define P_OBJ (sal_uInt8)0x40
+#define P_DBGUTIL (sal_uInt8)0x20
+#define P_ID (sal_uInt8)0x10
#ifdef STOR_NO_OPTIMIZE
#define P_STD P_DBGUTIL
#else
@@ -611,9 +611,9 @@ UINT32 SvPersistStream::ReadLen
static void WriteId
(
SvStream & rStm,
- BYTE nHdr,
- UINT32 nId,
- USHORT nClassId
+ sal_uInt8 nHdr,
+ sal_uInt32 nId,
+ sal_uInt16 nClassId
)
{
#ifdef STOR_NO_OPTIMIZE
@@ -624,12 +624,12 @@ static void WriteId
{
if( (nHdr & P_OBJ) || nId != 0 )
{ // Id nur bei Zeiger, oder DBGUTIL
- rStm << (BYTE)(nHdr);
+ rStm << (sal_uInt8)(nHdr);
SvPersistStream::WriteCompressed( rStm, nId );
}
else
{ // NULL Pointer
- rStm << (BYTE)(nHdr | P_ID_0);
+ rStm << (sal_uInt8)(nHdr | P_ID_0);
return;
}
}
@@ -646,9 +646,9 @@ static void WriteId
static void ReadId
(
SvStream & rStm,
- BYTE & nHdr,
- UINT32 & nId,
- USHORT & nClassId
+ sal_uInt8 & nHdr,
+ sal_uInt32 & nId,
+ sal_uInt16 & nClassId
)
{
nClassId = 0;
@@ -668,19 +668,19 @@ static void ReadId
nId = SvPersistStream::ReadCompressed( rStm );
if( (nHdr & P_DBGUTIL) || (nHdr & P_OBJ) )
- nClassId = (USHORT)SvPersistStream::ReadCompressed( rStm );
+ nClassId = (sal_uInt16)SvPersistStream::ReadCompressed( rStm );
}
}
//=========================================================================
void SvPersistStream::WriteObj
(
- BYTE nHdr,
+ sal_uInt8 nHdr,
SvPersistBase * pObj
)
{
#ifdef STOR_NO_OPTIMIZE
- UINT32 nObjPos = 0;
+ sal_uInt32 nObjPos = 0;
if( nHdr & P_DBGUTIL )
// Position fuer Laenge merken
nObjPos = WriteDummyLen();
@@ -698,17 +698,17 @@ SvPersistStream& SvPersistStream::WritePointer
SvPersistBase * pObj
)
{
- BYTE nP = P_STD;
+ sal_uInt8 nP = P_STD;
if( pObj )
{
- ULONG nId = GetIndex( pObj );
+ sal_uIntPtr nId = GetIndex( pObj );
if( nId )
nP |= P_ID;
else
{
nId = aPUIdx.Insert( pObj );
- aPTable.Insert( (ULONG)pObj, (void *)nId );
+ aPTable.Insert( (sal_uIntPtr)pObj, (void *)nId );
nP |= P_OBJ;
}
WriteId( *this, nP, nId, pObj->GetClassId() );
@@ -723,15 +723,15 @@ SvPersistStream& SvPersistStream::WritePointer
}
//=========================================================================
-UINT32 SvPersistStream::ReadObj
+sal_uInt32 SvPersistStream::ReadObj
(
SvPersistBase * & rpObj,
- BOOL bRegister
+ sal_Bool bRegister
)
{
- BYTE nHdr;
- UINT32 nId = 0;
- USHORT nClassId;
+ sal_uInt8 nHdr;
+ sal_uInt32 nId = 0;
+ sal_uInt16 nClassId;
rpObj = NULL; // Spezifikation: Im Fehlerfall 0.
ReadId( *this, nHdr, nId, nClassId );
@@ -751,7 +751,7 @@ UINT32 SvPersistStream::ReadObj
"object already exist" );
SvCreateInstancePersist pFunc = rClassMgr.Get( nClassId );
- UINT32 nObjLen(0), nObjPos(0);
+ sal_uInt32 nObjLen(0), nObjPos(0);
if( nHdr & P_DBGUTIL )
nObjLen = ReadLen( &nObjPos );
if( !pFunc )
@@ -772,9 +772,9 @@ UINT32 SvPersistStream::ReadObj
if( bRegister )
{
// unbedingt erst in Tabelle eintragen
- ULONG nNewId = aPUIdx.Insert( rpObj );
+ sal_uIntPtr nNewId = aPUIdx.Insert( rpObj );
// um den gleichen Zustand, wie nach dem Speichern herzustellen
- aPTable.Insert( (ULONG)rpObj, (void *)nNewId );
+ aPTable.Insert( (sal_uIntPtr)rpObj, (void *)nNewId );
DBG_ASSERT( !(nHdr & P_DBGUTIL) || nId == nNewId,
"read write id conflict: not the same" );
}
@@ -809,7 +809,7 @@ SvPersistStream& SvPersistStream::ReadPointer
SvPersistBase * & rpObj
)
{
- ReadObj( rpObj, TRUE );
+ ReadObj( rpObj, sal_True );
return *this;
}
@@ -843,14 +843,14 @@ SvStream& operator <<
SvStream * pOldStm = rThis.GetStream();
rThis.SetStream( &rStm );
- BYTE bTmp = 0;
+ sal_uInt8 bTmp = 0;
rThis << bTmp; // Version
- UINT32 nCount = (UINT32)rThis.aPUIdx.Count();
+ sal_uInt32 nCount = (sal_uInt32)rThis.aPUIdx.Count();
rThis << nCount;
SvPersistBase * pEle = rThis.aPUIdx.First();
- for( UINT32 i = 0; i < nCount; i++ )
+ for( sal_uInt32 i = 0; i < nCount; i++ )
{
- BYTE nP = P_OBJ | P_ID | P_STD;
+ sal_uInt8 nP = P_OBJ | P_ID | P_STD;
WriteId( rThis, nP, rThis.aPUIdx.GetCurIndex(),
pEle->GetClassId() );
rThis.WriteObj( nP, pEle );
@@ -870,23 +870,23 @@ SvStream& operator >>
SvStream * pOldStm = rThis.GetStream();
rThis.SetStream( &rStm );
- BYTE nVers;
+ sal_uInt8 nVers;
rThis >> nVers; // Version
if( 0 == nVers )
{
- UINT32 nCount = 0;
+ sal_uInt32 nCount = 0;
rThis >> nCount;
- for( UINT32 i = 0; i < nCount; i++ )
+ for( sal_uInt32 i = 0; i < nCount; i++ )
{
SvPersistBase * pEle;
// Lesen, ohne in die Tabellen einzutragen
- UINT32 nId = rThis.ReadObj( pEle, FALSE );
+ sal_uInt32 nId = rThis.ReadObj( pEle, sal_False );
if( rThis.GetError() )
break;
// Die Id eines Objektes wird nie modifiziert
rThis.aPUIdx.Insert( nId, pEle );
- rThis.aPTable.Insert( (ULONG)pEle, (void *)nId );
+ rThis.aPTable.Insert( (sal_uIntPtr)pEle, (void *)nId );
}
}
else
@@ -897,19 +897,19 @@ SvStream& operator >>
}
//=========================================================================
-ULONG SvPersistStream::InsertObj( SvPersistBase * pObj )
+sal_uIntPtr SvPersistStream::InsertObj( SvPersistBase * pObj )
{
- ULONG nId = aPUIdx.Insert( pObj );
- aPTable.Insert( (ULONG)pObj, (void *)nId );
+ sal_uIntPtr nId = aPUIdx.Insert( pObj );
+ aPTable.Insert( (sal_uIntPtr)pObj, (void *)nId );
return nId;
}
//=========================================================================
-ULONG SvPersistStream::RemoveObj( SvPersistBase * pObj )
+sal_uIntPtr SvPersistStream::RemoveObj( SvPersistBase * pObj )
{
- ULONG nIdx = GetIndex( pObj );
+ sal_uIntPtr nIdx = GetIndex( pObj );
aPUIdx.Remove( nIdx );
- aPTable.Remove( (ULONG)pObj );
+ aPTable.Remove( (sal_uIntPtr)pObj );
return nIdx;
}
diff --git a/tools/source/stream/cachestr.cxx b/tools/source/stream/cachestr.cxx
index 0233dc25fb52..17270048fcf4 100644
--- a/tools/source/stream/cachestr.cxx
+++ b/tools/source/stream/cachestr.cxx
@@ -43,13 +43,13 @@
|*
*************************************************************************/
-SvCacheStream::SvCacheStream( ULONG nMaxMemSize )
+SvCacheStream::SvCacheStream( sal_uIntPtr nMaxMemSize )
{
if( !nMaxMemSize )
nMaxMemSize = 20480;
- SvStream::bIsWritable = TRUE;
+ SvStream::bIsWritable = sal_True;
nMaxSize = nMaxMemSize;
- bPersistent = FALSE;
+ bPersistent = sal_False;
pSwapStream = 0;
pCurrentStream = new SvMemoryStream( nMaxMemSize );
pTempFile = 0;
@@ -66,8 +66,8 @@ SvCacheStream::SvCacheStream( ULONG nMaxMemSize )
*************************************************************************/
SvCacheStream::SvCacheStream( const String &rFileName,
- ULONG nExpectedSize,
- ULONG nMaxMemSize )
+ sal_uIntPtr nExpectedSize,
+ sal_uIntPtr nMaxMemSize )
{
if( !nMaxMemSize )
nMaxMemSize = 20480;
@@ -77,9 +77,9 @@ SvCacheStream::SvCacheStream( const String &rFileName,
else if( !nExpectedSize )
nExpectedSize = 4096;
- SvStream::bIsWritable = TRUE;
+ SvStream::bIsWritable = sal_True;
nMaxSize = nMaxMemSize;
- bPersistent = TRUE;
+ bPersistent = sal_True;
aFileName = rFileName;
pSwapStream = 0;
pCurrentStream = new SvMemoryStream( nExpectedSize );
@@ -105,7 +105,7 @@ SvCacheStream::~SvCacheStream()
if( pSwapStream && !bPersistent && pTempFile )
{
// temporaeres File loeschen
- pTempFile->EnableKillingFile( TRUE );
+ pTempFile->EnableKillingFile( sal_True );
}
delete pTempFile;
@@ -145,7 +145,7 @@ void SvCacheStream::SwapOut()
}
}
- ULONG nPos = pCurrentStream->Tell();
+ sal_uIntPtr nPos = pCurrentStream->Tell();
pCurrentStream->Seek( 0 );
if( !pSwapStream )
pSwapStream = new SvFileStream( aFileName, STREAM_READWRITE | STREAM_TRUNC );
@@ -167,7 +167,7 @@ void SvCacheStream::SwapOut()
|*
*************************************************************************/
-ULONG SvCacheStream::GetData( void* pData, ULONG nSize )
+sal_uIntPtr SvCacheStream::GetData( void* pData, sal_uIntPtr nSize )
{
return pCurrentStream->Read( pData, nSize );
}
@@ -182,7 +182,7 @@ ULONG SvCacheStream::GetData( void* pData, ULONG nSize )
|*
*************************************************************************/
-ULONG SvCacheStream::PutData( const void* pData, ULONG nSize )
+sal_uIntPtr SvCacheStream::PutData( const void* pData, sal_uIntPtr nSize )
{
// lieber unnoetig auslagern als unnoetig umkopieren
if( pCurrentStream != pSwapStream
@@ -201,7 +201,7 @@ ULONG SvCacheStream::PutData( const void* pData, ULONG nSize )
|*
*************************************************************************/
-ULONG SvCacheStream::SeekPos( ULONG nPos )
+sal_uIntPtr SvCacheStream::SeekPos( sal_uIntPtr nPos )
{
return pCurrentStream->Seek( nPos );
}
@@ -253,7 +253,7 @@ const void* SvCacheStream::GetBuffer()
|*
*************************************************************************/
-void SvCacheStream::SetSize( ULONG nSize )
+void SvCacheStream::SetSize( sal_uIntPtr nSize )
{
pCurrentStream->SetStreamSize( nSize );
}
@@ -268,13 +268,13 @@ void SvCacheStream::SetSize( ULONG nSize )
|*
*************************************************************************/
-ULONG SvCacheStream::GetSize()
+sal_uIntPtr SvCacheStream::GetSize()
{
// ACHTUNG: SvMemoryStream::GetSize() gibt Groesse
// des allozierten Buffers zurueck
Flush();
- ULONG nTemp = Tell();
- ULONG nLength = Seek( STREAM_SEEK_TO_END );
+ sal_uIntPtr nTemp = Tell();
+ sal_uIntPtr nLength = Seek( STREAM_SEEK_TO_END );
Seek( nTemp );
return nLength;
}
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 9fdef8436f1a..5d0da0f3e29d 100644..100755
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -101,7 +101,7 @@ inline static void SwapDouble( double& r )
{
if( sizeof(double) != 8 )
{
- DBG_ASSERT( FALSE, "Can only swap 8-Byte-doubles\n" );
+ DBG_ASSERT( sal_False, "Can only swap 8-Byte-doubles\n" );
}
else
{
@@ -144,7 +144,7 @@ if( (tmp==STREAM_IO_WRITE) && sizeof(datatype) <= nBufFree)\
if( nBufActualPos > nBufActualLen )\
nBufActualLen = nBufActualPos;\
pBufPos += sizeof(datatype);\
- bIsDirty = TRUE;\
+ bIsDirty = sal_True;\
}\
else\
Write( (char*)&value, sizeof(datatype) );\
@@ -420,7 +420,7 @@ void SvStream::ImpInit()
eStreamCharSet = osl_getThreadTextEncoding();
// eTargetCharSet = osl_getThreadTextEncoding();
nCryptMask = 0;
- bIsEof = FALSE;
+ bIsEof = sal_False;
#if defined UNX
eLineDelimiter = LINEEND_LF; // UNIX-Format
#else
@@ -431,9 +431,9 @@ void SvStream::ImpInit()
nBufFilePos = 0;
nBufActualPos = 0;
- bIsDirty = FALSE;
- bIsConsistent = TRUE;
- bIsWritable = TRUE;
+ bIsDirty = sal_False;
+ bIsConsistent = sal_True;
+ bIsWritable = sal_True;
pRWBuf = 0;
pBufPos = 0;
@@ -536,7 +536,7 @@ sal_uInt16 SvStream::IsA() const
void SvStream::ClearError()
{
- bIsEof = FALSE;
+ bIsEof = sal_False;
nError = SVSTREAM_OK;
}
@@ -570,13 +570,13 @@ void SvStream::SetError( sal_uInt32 nErrorCode )
void SvStream::SetNumberFormatInt( sal_uInt16 nNewFormat )
{
nNumberFormatInt = nNewFormat;
- bSwap = FALSE;
+ bSwap = sal_False;
#ifdef OSL_BIGENDIAN
if( nNumberFormatInt == NUMBERFORMAT_INT_LITTLEENDIAN )
- bSwap = TRUE;
+ bSwap = sal_True;
#else
if( nNumberFormatInt == NUMBERFORMAT_INT_BIGENDIAN )
- bSwap = TRUE;
+ bSwap = sal_True;
#endif
}
@@ -609,8 +609,8 @@ void SvStream::SetBufferSize( sal_uInt16 nBufferSize )
nBufActualPos = 0;
nBufSize = nBufferSize;
if( nBufSize )
- pRWBuf = new BYTE[ nBufSize ];
- bIsConsistent = TRUE;
+ pRWBuf = new sal_uInt8[ nBufSize ];
+ bIsConsistent = sal_True;
pBufPos = pRWBuf;
eIOMode = STREAM_IO_DONTKNOW;
if( !bDontSeek )
@@ -633,11 +633,11 @@ void SvStream::ClearBuffer()
nBufActualPos = 0;
nBufFilePos = 0;
pBufPos = pRWBuf;
- bIsDirty = FALSE;
- bIsConsistent = TRUE;
+ bIsDirty = sal_False;
+ bIsConsistent = sal_True;
eIOMode = STREAM_IO_DONTKNOW;
- bIsEof = FALSE;
+ bIsEof = sal_False;
}
/*************************************************************************
@@ -678,7 +678,7 @@ sal_Bool SvStream::ReadByteStringLine( String& rStr, rtl_TextEncoding eSrcCharSe
sal_Bool SvStream::ReadLine( ByteString& rStr )
{
sal_Char buf[256+1];
- sal_Bool bEnd = FALSE;
+ sal_Bool bEnd = sal_False;
sal_Size nOldFilePos = Tell();
sal_Char c = 0;
sal_Size nTotalLen = 0;
@@ -694,8 +694,8 @@ sal_Bool SvStream::ReadLine( ByteString& rStr )
if ( rStr.Len() == 0 )
{
// der allererste Blockread hat fehlgeschlagen -> Abflug
- bIsEof = TRUE;
- return FALSE;
+ bIsEof = sal_True;
+ return sal_False;
}
else
break;
@@ -707,7 +707,7 @@ sal_Bool SvStream::ReadLine( ByteString& rStr )
c = buf[j];
if ( c == '\n' || c == '\r' )
{
- bEnd = TRUE;
+ bEnd = sal_True;
break;
}
// erAck 26.02.01: Old behavior was no special treatment of '\0'
@@ -727,7 +727,7 @@ sal_Bool SvStream::ReadLine( ByteString& rStr )
}
if ( !bEnd && !GetError() && rStr.Len() )
- bEnd = TRUE;
+ bEnd = sal_True;
nOldFilePos += nTotalLen;
if( Tell() > nOldFilePos )
@@ -745,14 +745,14 @@ sal_Bool SvStream::ReadLine( ByteString& rStr )
}
if ( bEnd )
- bIsEof = FALSE;
+ bIsEof = sal_False;
return bEnd;
}
sal_Bool SvStream::ReadUniStringLine( String& rStr )
{
sal_Unicode buf[256+1];
- sal_Bool bEnd = FALSE;
+ sal_Bool bEnd = sal_False;
sal_Size nOldFilePos = Tell();
sal_Unicode c = 0;
sal_Size nTotalLen = 0;
@@ -771,8 +771,8 @@ sal_Bool SvStream::ReadUniStringLine( String& rStr )
if ( rStr.Len() == 0 )
{
// der allererste Blockread hat fehlgeschlagen -> Abflug
- bIsEof = TRUE;
- return FALSE;
+ bIsEof = sal_True;
+ return sal_False;
}
else
break;
@@ -786,7 +786,7 @@ sal_Bool SvStream::ReadUniStringLine( String& rStr )
c = buf[j];
if ( c == '\n' || c == '\r' )
{
- bEnd = TRUE;
+ bEnd = sal_True;
break;
}
// erAck 26.02.01: Old behavior was no special treatment of '\0'
@@ -806,7 +806,7 @@ sal_Bool SvStream::ReadUniStringLine( String& rStr )
}
if ( !bEnd && !GetError() && rStr.Len() )
- bEnd = TRUE;
+ bEnd = sal_True;
nOldFilePos += nTotalLen * sizeof(sal_Unicode);
if( Tell() > nOldFilePos )
@@ -824,7 +824,7 @@ sal_Bool SvStream::ReadUniStringLine( String& rStr )
}
if ( bEnd )
- bIsEof = FALSE;
+ bIsEof = sal_False;
return bEnd;
}
@@ -848,7 +848,7 @@ sal_Bool SvStream::ReadCString( ByteString& rStr )
rStr.Erase();
sal_Char buf[ 256 + 1 ];
- sal_Bool bEnd = FALSE;
+ sal_Bool bEnd = sal_False;
sal_Size nFilePos = Tell();
while( !bEnd && !GetError() )
@@ -1032,7 +1032,7 @@ sal_Bool SvStream::WriteUniOrByteChar( sal_Unicode ch, rtl_TextEncoding eDestCha
sal_Bool SvStream::StartWritingUnicodeText()
{
- SetEndianSwap( FALSE ); // write native format
+ SetEndianSwap( sal_False ); // write native format
// BOM, Byte Order Mark, U+FEFF, see
// http://www.unicode.org/faq/utf_bom.html#BOM
// Upon read: 0xfeff(-257) => no swap; 0xfffe(-2) => swap
@@ -1046,21 +1046,59 @@ sal_Bool SvStream::StartWritingUnicodeText()
|*
*************************************************************************/
-sal_Bool SvStream::StartReadingUnicodeText()
+sal_Bool SvStream::StartReadingUnicodeText( rtl_TextEncoding eReadBomCharSet )
{
+ if (!( eReadBomCharSet == RTL_TEXTENCODING_DONTKNOW ||
+ eReadBomCharSet == RTL_TEXTENCODING_UNICODE ||
+ eReadBomCharSet == RTL_TEXTENCODING_UTF8))
+ return sal_True; // nothing to read
+
+ bool bTryUtf8 = false;
sal_uInt16 nFlag;
+ sal_sSize nBack = sizeof(nFlag);
*this >> nFlag;
switch ( nFlag )
{
case 0xfeff :
- // native
+ // native UTF-16
+ if ( eReadBomCharSet == RTL_TEXTENCODING_DONTKNOW ||
+ eReadBomCharSet == RTL_TEXTENCODING_UNICODE)
+ nBack = 0;
break;
case 0xfffe :
- SetEndianSwap( !bSwap );
+ // swapped UTF-16
+ if ( eReadBomCharSet == RTL_TEXTENCODING_DONTKNOW ||
+ eReadBomCharSet == RTL_TEXTENCODING_UNICODE)
+ {
+ SetEndianSwap( !bSwap );
+ nBack = 0;
+ }
+ break;
+ case 0xefbb :
+ if (nNumberFormatInt == NUMBERFORMAT_INT_BIGENDIAN &&
+ (eReadBomCharSet == RTL_TEXTENCODING_DONTKNOW ||
+ eReadBomCharSet == RTL_TEXTENCODING_UTF8))
+ bTryUtf8 = true;
+ break;
+ case 0xbbef :
+ if (nNumberFormatInt == NUMBERFORMAT_INT_LITTLEENDIAN &&
+ (eReadBomCharSet == RTL_TEXTENCODING_DONTKNOW ||
+ eReadBomCharSet == RTL_TEXTENCODING_UTF8))
+ bTryUtf8 = true;
break;
default:
- SeekRel( -((sal_sSize)sizeof(nFlag)) ); // no BOM, pure data
+ ; // nothing
+ }
+ if (bTryUtf8)
+ {
+ sal_uChar nChar;
+ nBack += sizeof(nChar);
+ *this >> nChar;
+ if (nChar == 0xbf)
+ nBack = 0; // it is UTF-8
}
+ if (nBack)
+ SeekRel( -nBack ); // no BOM, pure data
return nError == SVSTREAM_OK;
}
@@ -1375,7 +1413,7 @@ SvStream& SvStream::operator<< ( signed char v )
if( nBufActualPos > nBufActualLen ) // Append ?
nBufActualLen = nBufActualPos;
nBufFree--; // = sizeof(char);
- bIsDirty = TRUE;
+ bIsDirty = sal_True;
}
else
Write( (char*)&v, sizeof(signed char) );
@@ -1396,7 +1434,7 @@ SvStream& SvStream::operator<< ( char v )
if( nBufActualPos > nBufActualLen ) // Append ?
nBufActualLen = nBufActualPos;
nBufFree--; // = sizeof(char);
- bIsDirty = TRUE;
+ bIsDirty = sal_True;
}
else
Write( (char*)&v, sizeof(char) );
@@ -1415,7 +1453,7 @@ SvStream& SvStream::operator<< ( unsigned char v )
if( nBufActualPos > nBufActualLen ) // Append ?
nBufActualLen = nBufActualPos;
nBufFree--;
- bIsDirty = TRUE;
+ bIsDirty = sal_True;
}
else
Write( (char*)&v, sizeof(char) );
@@ -1616,7 +1654,7 @@ sal_Size SvStream::Read( void* pData, sal_Size nCount )
CryptAndWriteBuffer(pRWBuf, nBufActualLen);
else
PutData( pRWBuf, nBufActualLen );
- bIsDirty = FALSE;
+ bIsDirty = sal_False;
}
// passt der Datenblock in den Puffer ?
@@ -1661,10 +1699,10 @@ sal_Size SvStream::Read( void* pData, sal_Size nCount )
}
}
}
- bIsEof = FALSE;
+ bIsEof = sal_False;
nBufFree = nBufActualLen - nBufActualPos;
if( nCount != nSaveCount && nError != ERRCODE_IO_PENDING )
- bIsEof = TRUE;
+ bIsEof = sal_True;
if( nCount == nSaveCount && nError == ERRCODE_IO_PENDING )
nError = ERRCODE_NONE;
return nCount;
@@ -1712,7 +1750,7 @@ sal_Size SvStream::Write( const void* pData, sal_Size nCount )
nBufActualLen = nBufActualPos;
pBufPos += nCount;
- bIsDirty = TRUE;
+ bIsDirty = sal_True;
}
else
{
@@ -1724,7 +1762,7 @@ sal_Size SvStream::Write( const void* pData, sal_Size nCount )
CryptAndWriteBuffer( pRWBuf, (sal_Size)nBufActualLen );
else
PutData( pRWBuf, nBufActualLen );
- bIsDirty = FALSE;
+ bIsDirty = sal_False;
}
// passt der Block in den Puffer ?
@@ -1752,7 +1790,7 @@ sal_Size SvStream::Write( const void* pData, sal_Size nCount )
nBufActualPos = (sal_uInt16)nCount;
pBufPos = pRWBuf + nCount;
nBufActualLen = (sal_uInt16)nCount;
- bIsDirty = TRUE;
+ bIsDirty = sal_True;
}
}
nBufFree = nBufSize - nBufActualPos;
@@ -1774,7 +1812,7 @@ sal_Size SvStream::Seek( sal_Size nFilePos )
{
eIOMode = STREAM_IO_DONTKNOW;
- bIsEof = FALSE;
+ bIsEof = sal_False;
if( !pRWBuf )
{
nBufFilePos = SeekPos( nFilePos );
@@ -1800,7 +1838,7 @@ sal_Size SvStream::Seek( sal_Size nFilePos )
CryptAndWriteBuffer( pRWBuf, nBufActualLen );
else
PutData( pRWBuf, nBufActualLen );
- bIsDirty = FALSE;
+ bIsDirty = sal_False;
}
nBufActualLen = 0;
nBufActualPos = 0;
@@ -1836,7 +1874,7 @@ void SvStream::Flush()
else
if( PutData( pRWBuf, nBufActualLen ) != nBufActualLen )
SetError( SVSTREAM_WRITE_ERROR );
- bIsDirty = FALSE;
+ bIsDirty = sal_False;
}
if( bIsWritable )
FlushData();
@@ -1880,9 +1918,9 @@ SvStream& SvStream::PutBack( char aCh )
CryptAndWriteBuffer( pRWBuf, nBufActualLen );
else
PutData( pRWBuf, nBufActualLen );
- bIsDirty = FALSE;
+ bIsDirty = sal_False;
}
- bIsConsistent = FALSE; // Puffer enthaelt jetzt TRASH
+ bIsConsistent = sal_False; // Puffer enthaelt jetzt TRASH
if( nBufActualPos )
{
// 1. Fall
@@ -1911,7 +1949,7 @@ SvStream& SvStream::PutBack( char aCh )
*pRWBuf = aCh;
}
eIOMode = STREAM_IO_DONTKNOW;
- bIsEof = FALSE;
+ bIsEof = sal_False;
return *this;
}
@@ -1954,7 +1992,7 @@ void SvStream::RefreshBuffer()
CryptAndWriteBuffer( pRWBuf, (sal_Size)nBufActualLen );
else
PutData( pRWBuf, nBufActualLen );
- bIsDirty = FALSE;
+ bIsDirty = sal_False;
}
SeekPos( nBufFilePos );
nBufActualLen = (sal_uInt16)GetData( pRWBuf, nBufSize );
@@ -1962,7 +2000,7 @@ void SvStream::RefreshBuffer()
nError = ERRCODE_NONE;
if( nCryptMask )
EncryptBuffer(pRWBuf, (sal_Size)nBufActualLen);
- bIsConsistent = TRUE;
+ bIsConsistent = sal_True;
eIOMode = STREAM_IO_DONTKNOW;
}
@@ -2038,7 +2076,7 @@ SvStream& SvStream::ReadNumber( long& rLong )
rLong = strtol( buf, &pEndPtr, (int)nRadix );
nFPtr += ( (sal_Size)pEndPtr - (sal_Size)(&(buf[0])) );
Seek( nFPtr );
- bIsEof = FALSE;
+ bIsEof = sal_False;
return *this;
}
@@ -2063,7 +2101,7 @@ SvStream& SvStream::ReadNumber( sal_uInt32& rUInt32 )
rUInt32 = strtoul( buf, &pEndPtr, (int)nRadix );
nFPtr += ( (sal_uIntPtr)pEndPtr - (sal_uIntPtr)buf );
Seek( nFPtr );
- bIsEof = FALSE;
+ bIsEof = sal_False;
return *this;
}
@@ -2088,7 +2126,7 @@ SvStream& SvStream::ReadNumber( double& rDouble )
rDouble = strtod( buf, &pEndPtr );
nFPtr += ( (sal_Size)pEndPtr - (sal_Size)buf );
Seek( nFPtr );
- bIsEof = FALSE;
+ bIsEof = sal_False;
return *this;
}
@@ -2251,7 +2289,7 @@ sal_Bool SvStream::EncryptBuffer(void* pStart, sal_Size nLen)
aCh ^= nMask;
*pTemp = aCh;
}
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -2432,12 +2470,12 @@ SvMemoryStream::SvMemoryStream( void* pBuffer, sal_Size bufSize,
StreamMode eMode )
{
if( eMode & STREAM_WRITE )
- bIsWritable = TRUE;
+ bIsWritable = sal_True;
else
- bIsWritable = FALSE;
+ bIsWritable = sal_False;
nEndOfData = bufSize;
- bOwnsData = FALSE;
- pBuf = (BYTE *) pBuffer;
+ bOwnsData = sal_False;
+ pBuf = (sal_uInt8 *) pBuffer;
nResize = 0L;
nSize = bufSize;
nPos = 0L;
@@ -2456,8 +2494,8 @@ SvMemoryStream::SvMemoryStream( void* pBuffer, sal_Size bufSize,
SvMemoryStream::SvMemoryStream( sal_Size nInitSize, sal_Size nResizeOffset )
{
- bIsWritable = TRUE;
- bOwnsData = TRUE;
+ bIsWritable = sal_True;
+ bOwnsData = sal_True;
nEndOfData = 0L;
nResize = nResizeOffset;
nPos = 0;
@@ -2535,7 +2573,7 @@ void* SvMemoryStream::SetBuffer( void* pNewBuf, sal_Size nCount,
else
pResult = pBuf;
- pBuf = (BYTE *) pNewBuf;
+ pBuf = (sal_uInt8 *) pNewBuf;
nPos = 0;
nSize = nCount;
nResize = 0;
@@ -2723,7 +2761,7 @@ void SvMemoryStream::ResetError()
sal_Bool SvMemoryStream::AllocateMemory( sal_Size nNewSize )
{
- pBuf = new BYTE[nNewSize];
+ pBuf = new sal_uInt8[nNewSize];
return( pBuf != 0 );
}
@@ -2739,18 +2777,18 @@ sal_Bool SvMemoryStream::AllocateMemory( sal_Size nNewSize )
sal_Bool SvMemoryStream::ReAllocateMemory( long nDiff )
{
- sal_Bool bRetVal = FALSE;
+ sal_Bool bRetVal = sal_False;
long nTemp = (long)nSize;
nTemp += nDiff;
sal_Size nNewSize = (sal_Size)nTemp;
if( nNewSize )
{
- BYTE* pNewBuf = new BYTE[nNewSize];
+ sal_uInt8* pNewBuf = new sal_uInt8[nNewSize];
if( pNewBuf )
{
- bRetVal = TRUE; // Success!
+ bRetVal = sal_True; // Success!
if( nNewSize < nSize ) // Verkleinern ?
{
memcpy( pNewBuf, pBuf, (size_t)nNewSize );
@@ -2772,7 +2810,7 @@ sal_Bool SvMemoryStream::ReAllocateMemory( long nDiff )
}
else
{
- bRetVal = TRUE;
+ bRetVal = sal_True;
FreeMemory();
pBuf = 0;
nSize = 0;
diff --git a/tools/source/stream/strmos2.cxx b/tools/source/stream/strmos2.cxx
index a35fc7731767..bfe1f9750f4d 100644
--- a/tools/source/stream/strmos2.cxx
+++ b/tools/source/stream/strmos2.cxx
@@ -59,20 +59,20 @@ class StreamData
{
public:
HFILE hFile;
- BOOL bIsEof;
+ sal_Bool bIsEof;
StreamData()
{
hFile = 0;
- bIsEof = TRUE;
+ bIsEof = sal_True;
}
};
// -----------------------------------------------------------------------
-ULONG GetSvError( APIRET nPMError )
+sal_uIntPtr GetSvError( APIRET nPMError )
{
- static struct { APIRET pm; ULONG sv; } errArr[] =
+ static struct { APIRET pm; sal_uIntPtr sv; } errArr[] =
{
{ ERROR_FILE_NOT_FOUND, SVSTREAM_FILE_NOT_FOUND },
{ ERROR_PATH_NOT_FOUND, SVSTREAM_PATH_NOT_FOUND },
@@ -93,7 +93,7 @@ ULONG GetSvError( APIRET nPMError )
{ 0xFFFF, SVSTREAM_GENERALERROR }
};
- ULONG nRetVal = SVSTREAM_GENERALERROR; // Standardfehler
+ sal_uIntPtr nRetVal = SVSTREAM_GENERALERROR; // Standardfehler
int i=0;
do
{
@@ -120,9 +120,9 @@ ULONG GetSvError( APIRET nPMError )
SvFileStream::SvFileStream( const String& rFileName, StreamMode nOpenMode )
{
- bIsOpen = FALSE;
+ bIsOpen = sal_False;
nLockCounter = 0;
- bIsWritable = FALSE;
+ bIsWritable = sal_False;
pInstanceData = new StreamData;
SetBufferSize( 8192 );
@@ -146,9 +146,9 @@ SvFileStream::SvFileStream( const String& rFileName, StreamMode nOpenMode )
SvFileStream::SvFileStream()
{
- bIsOpen = FALSE;
+ bIsOpen = sal_False;
nLockCounter = 0;
- bIsWritable = FALSE;
+ bIsWritable = sal_False;
pInstanceData = new StreamData;
SetBufferSize( 8192 );
}
@@ -180,9 +180,9 @@ SvFileStream::~SvFileStream()
|*
*************************************************************************/
-ULONG SvFileStream::GetFileHandle() const
+sal_uIntPtr SvFileStream::GetFileHandle() const
{
- return (ULONG)pInstanceData->hFile;
+ return (sal_uIntPtr)pInstanceData->hFile;
}
/*************************************************************************
@@ -195,7 +195,7 @@ ULONG SvFileStream::GetFileHandle() const
|*
*************************************************************************/
-USHORT SvFileStream::IsA() const
+sal_uInt16 SvFileStream::IsA() const
{
return ID_FILESTREAM;
}
@@ -210,7 +210,7 @@ USHORT SvFileStream::IsA() const
|*
*************************************************************************/
-ULONG SvFileStream::GetData( void* pData, ULONG nSize )
+sal_uIntPtr SvFileStream::GetData( void* pData, sal_uIntPtr nSize )
{
#ifdef DBG_UTIL
ByteString aTraceStr( "SvFileStream::GetData(): " );
@@ -220,7 +220,7 @@ ULONG SvFileStream::GetData( void* pData, ULONG nSize )
DBG_TRACE( aTraceStr.GetBuffer() );
#endif
- ULONG nCount = 0L;
+ sal_uIntPtr nCount = 0L;
if( IsOpen() )
{
APIRET nResult;
@@ -241,7 +241,7 @@ ULONG SvFileStream::GetData( void* pData, ULONG nSize )
|*
*************************************************************************/
-ULONG SvFileStream::PutData( const void* pData, ULONG nSize )
+sal_uIntPtr SvFileStream::PutData( const void* pData, sal_uIntPtr nSize )
{
#ifdef DBG_UTIL
ByteString aTraceStr( "SvFileStrean::PutData: " );
@@ -251,7 +251,7 @@ ULONG SvFileStream::PutData( const void* pData, ULONG nSize )
DBG_TRACE( aTraceStr.GetBuffer() );
#endif
- ULONG nCount = 0L;
+ sal_uIntPtr nCount = 0L;
if( IsOpen() )
{
APIRET nResult;
@@ -274,9 +274,9 @@ ULONG SvFileStream::PutData( const void* pData, ULONG nSize )
|*
*************************************************************************/
-ULONG SvFileStream::SeekPos( ULONG nPos )
+sal_uIntPtr SvFileStream::SeekPos( sal_uIntPtr nPos )
{
- ULONG nNewPos = 0L;
+ sal_uIntPtr nNewPos = 0L;
if( IsOpen() )
{
APIRET nResult;
@@ -306,9 +306,9 @@ ULONG SvFileStream::SeekPos( ULONG nPos )
|*
*************************************************************************/
/*
-ULONG SvFileStream::Tell()
+sal_uIntPtr SvFileStream::Tell()
{
- ULONG nPos = 0L;
+ sal_uIntPtr nPos = 0L;
if( IsOpen() )
{
@@ -352,9 +352,9 @@ void SvFileStream::FlushData()
|*
*************************************************************************/
-sal_Bool SvFileStream::LockRange( ULONG nByteOffset, ULONG nBytes )
+sal_Bool SvFileStream::LockRange( sal_uIntPtr nByteOffset, sal_uIntPtr nBytes )
{
- sal_Bool bRetVal = FALSE;
+ sal_Bool bRetVal = sal_False;
if( IsOpen() )
{
APIRET nResult;
@@ -373,7 +373,7 @@ sal_Bool SvFileStream::LockRange( ULONG nByteOffset, ULONG nBytes )
if( nResult )
SetError(::GetSvError(nResult) );
else
- bRetVal = TRUE;
+ bRetVal = sal_True;
}
return bRetVal;
}
@@ -388,9 +388,9 @@ sal_Bool SvFileStream::LockRange( ULONG nByteOffset, ULONG nBytes )
|*
*************************************************************************/
-sal_Bool SvFileStream::UnlockRange( ULONG nByteOffset, ULONG nBytes )
+sal_Bool SvFileStream::UnlockRange( sal_uIntPtr nByteOffset, sal_uIntPtr nBytes )
{
- sal_Bool bRetVal = FALSE;
+ sal_Bool bRetVal = sal_False;
if( IsOpen() )
{
APIRET nResult;
@@ -409,7 +409,7 @@ sal_Bool SvFileStream::UnlockRange( ULONG nByteOffset, ULONG nBytes )
if( nResult )
SetError(::GetSvError(nResult) );
else
- bRetVal = TRUE;
+ bRetVal = sal_True;
}
return bRetVal;
}
@@ -426,19 +426,19 @@ sal_Bool SvFileStream::UnlockRange( ULONG nByteOffset, ULONG nBytes )
sal_Bool SvFileStream::LockFile()
{
- sal_Bool bRetVal = FALSE;
+ sal_Bool bRetVal = sal_False;
if( !nLockCounter )
{
if( LockRange( 0L, LONG_MAX ) )
{
nLockCounter = 1;
- bRetVal = TRUE;
+ bRetVal = sal_True;
}
}
else
{
nLockCounter++;
- bRetVal = TRUE;
+ bRetVal = sal_True;
}
return bRetVal;
}
@@ -455,7 +455,7 @@ sal_Bool SvFileStream::LockFile()
sal_Bool SvFileStream::UnlockFile()
{
- sal_Bool bRetVal = FALSE;
+ sal_Bool bRetVal = sal_False;
if( nLockCounter > 0)
{
if( nLockCounter == 1)
@@ -463,13 +463,13 @@ sal_Bool SvFileStream::UnlockFile()
if( UnlockRange( 0L, LONG_MAX ) )
{
nLockCounter = 0;
- bRetVal = TRUE;
+ bRetVal = sal_True;
}
}
else
{
nLockCounter--;
- bRetVal = TRUE;
+ bRetVal = sal_True;
}
}
return bRetVal;
@@ -486,7 +486,7 @@ sal_Bool SvFileStream::UnlockFile()
*************************************************************************/
#if 0
-BOOL createLongNameEA ( const PCSZ pszPath, ULONG ulAttributes, const String& aLongName );
+sal_Bool createLongNameEA ( const PCSZ pszPath, sal_uIntPtr ulAttributes, const String& aLongName );
#endif
void SvFileStream::Open( const String& rFilename, StreamMode nOpenMode )
@@ -500,7 +500,7 @@ void SvFileStream::Open( const String& rFilename, StreamMode nOpenMode )
String aRealPart;
String aVirtualPath;
ItemIDPath aVirtualURL;
- ULONG nDivider = 0;
+ sal_uIntPtr nDivider = 0;
String aVirtualString(rFilename);
@@ -534,10 +534,10 @@ void SvFileStream::Open( const String& rFilename, StreamMode nOpenMode )
Close();
SvStream::ClearBuffer();
- ULONG nActionTaken;
- ULONG nOpenAction = 0L;
- ULONG nShareBits = 0L;
- ULONG nReadWriteBits = 0L;
+ sal_uIntPtr nActionTaken;
+ sal_uIntPtr nOpenAction = 0L;
+ sal_uIntPtr nShareBits = 0L;
+ sal_uIntPtr nReadWriteBits = 0L;
eStreamMode = nOpenMode;
eStreamMode &= ~STREAM_TRUNC; // beim ReOpen nicht cutten
@@ -592,7 +592,7 @@ void SvFileStream::Open( const String& rFilename, StreamMode nOpenMode )
//
// resolves long FAT names used by OS2
//
- BOOL bIsLongOS2=FALSE;
+ sal_Bool bIsLongOS2=sal_False;
if (Folder::IsAvailable())
{
DirEntry aDirEntry(rFilename);
@@ -601,7 +601,7 @@ void SvFileStream::Open( const String& rFilename, StreamMode nOpenMode )
// in kurzen Pfad wandeln
ItemIDPath aItemIDPath(rFilename);
aParsedFilename = aItemIDPath.GetHostNotationPath();
- bIsLongOS2 = TRUE;
+ bIsLongOS2 = sal_True;
}
}
#endif
@@ -623,7 +623,7 @@ void SvFileStream::Open( const String& rFilename, StreamMode nOpenMode )
if( nRet == ERROR_TOO_MANY_OPEN_FILES )
{
long nToAdd = 10;
- ULONG nCurMaxFH;
+ sal_uIntPtr nCurMaxFH;
nRet = DosSetRelMaxFH( &nToAdd, &nCurMaxFH );
nRet = DosOpen( aFileNameA.GetBuffer(), &pInstanceData->hFile,
&nActionTaken, 0L, FILE_NORMAL, nOpenAction,
@@ -641,15 +641,15 @@ void SvFileStream::Open( const String& rFilename, StreamMode nOpenMode )
if( nRet )
{
- bIsOpen = FALSE;
+ bIsOpen = sal_False;
SetError(::GetSvError(nRet) );
}
else
{
- bIsOpen = TRUE;
- pInstanceData->bIsEof = FALSE;
+ bIsOpen = sal_True;
+ pInstanceData->bIsEof = sal_False;
if( nReadWriteBits != OPEN_ACCESS_READONLY )
- bIsWritable = TRUE;
+ bIsWritable = sal_True;
}
#if 0
@@ -714,10 +714,10 @@ void SvFileStream::Close()
DosClose( pInstanceData->hFile );
}
- bIsOpen = FALSE;
+ bIsOpen = sal_False;
nLockCounter= 0;
- bIsWritable = FALSE;
- pInstanceData->bIsEof = TRUE;
+ bIsWritable = sal_False;
+ pInstanceData->bIsEof = sal_True;
SvStream::ClearBuffer();
SvStream::ClearError();
}
@@ -747,7 +747,7 @@ void SvFileStream::ResetError()
|*
*************************************************************************/
-void SvFileStream::SetSize( ULONG nSize )
+void SvFileStream::SetSize( sal_uIntPtr nSize )
{
if( IsOpen() )
{
@@ -756,5 +756,3 @@ void SvFileStream::SetSize( ULONG nSize )
SetError( ::GetSvError( nRet ) );
}
}
-
-
diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx
index f3c5d642ed6e..87e3cea4c0c7 100644
--- a/tools/source/stream/strmunx.cxx
+++ b/tools/source/stream/strmunx.cxx
@@ -123,7 +123,7 @@ sal_Bool InternalStreamLock::LockFile( sal_Size nStart, sal_Size nEnd, SvFileStr
InternalStreamLock* pLock = NULL;
InternalStreamLockList &rLockList = LockList::get();
- for( ULONG i = 0; i < rLockList.Count(); ++i )
+ for( sal_uIntPtr i = 0; i < rLockList.Count(); ++i )
{
pLock = rLockList.GetObject( i );
if( aStat.st_ino == pLock->m_aStat.st_ino )
@@ -167,7 +167,7 @@ void InternalStreamLock::UnlockFile( sal_Size nStart, sal_Size nEnd, SvFileStrea
InternalStreamLockList &rLockList = LockList::get();
if( nStart == 0 && nEnd == 0 )
{
- for( ULONG i = 0; i < rLockList.Count(); ++i )
+ for( sal_uIntPtr i = 0; i < rLockList.Count(); ++i )
{
if( ( pLock = rLockList.GetObject( i ) )->m_pStream == pStream )
{
@@ -177,7 +177,7 @@ void InternalStreamLock::UnlockFile( sal_Size nStart, sal_Size nEnd, SvFileStrea
}
return;
}
- for( ULONG i = 0; i < rLockList.Count(); ++i )
+ for( sal_uIntPtr i = 0; i < rLockList.Count(); ++i )
{
if( ( pLock = rLockList.GetObject( i ) )->m_pStream == pStream &&
nStart == pLock->m_nStartPos && nEnd == pLock->m_nEndPos )
diff --git a/tools/source/stream/strmwnt.cxx b/tools/source/stream/strmwnt.cxx
index d9e7da92296b..20443e268964 100644
--- a/tools/source/stream/strmwnt.cxx
+++ b/tools/source/stream/strmwnt.cxx
@@ -63,9 +63,9 @@ public:
// -----------------------------------------------------------------------
-static ULONG GetSvError( DWORD nWntError )
+static sal_uIntPtr GetSvError( DWORD nWntError )
{
- static struct { DWORD wnt; ULONG sv; } errArr[] =
+ static struct { DWORD wnt; sal_uIntPtr sv; } errArr[] =
{
{ ERROR_SUCCESS, SVSTREAM_OK },
{ ERROR_ACCESS_DENIED, SVSTREAM_ACCESS_DENIED },
@@ -105,7 +105,7 @@ static ULONG GetSvError( DWORD nWntError )
{ (DWORD)0xFFFFFFFF, SVSTREAM_GENERALERROR }
};
- ULONG nRetVal = SVSTREAM_GENERALERROR; // Standardfehler
+ sal_uIntPtr nRetVal = SVSTREAM_GENERALERROR; // Standardfehler
int i=0;
do
{
@@ -131,9 +131,9 @@ static ULONG GetSvError( DWORD nWntError )
SvFileStream::SvFileStream( const String& rFileName, StreamMode nMode )
{
- bIsOpen = FALSE;
+ bIsOpen = sal_False;
nLockCounter = 0;
- bIsWritable = FALSE;
+ bIsWritable = sal_False;
pInstanceData = new StreamData;
SetBufferSize( 8192 );
@@ -157,9 +157,9 @@ SvFileStream::SvFileStream( const String& rFileName, StreamMode nMode )
SvFileStream::SvFileStream()
{
- bIsOpen = FALSE;
+ bIsOpen = sal_False;
nLockCounter = 0;
- bIsWritable = FALSE;
+ bIsWritable = sal_False;
pInstanceData = new StreamData;
SetBufferSize( 8192 );
@@ -192,9 +192,9 @@ SvFileStream::~SvFileStream()
|*
*************************************************************************/
-ULONG SvFileStream::GetFileHandle() const
+sal_uIntPtr SvFileStream::GetFileHandle() const
{
- return (ULONG)pInstanceData->hFile;
+ return (sal_uIntPtr)pInstanceData->hFile;
}
/*************************************************************************
@@ -207,7 +207,7 @@ ULONG SvFileStream::GetFileHandle() const
|*
*************************************************************************/
-USHORT SvFileStream::IsA() const
+sal_uInt16 SvFileStream::IsA() const
{
return ID_FILESTREAM;
}
@@ -222,7 +222,7 @@ USHORT SvFileStream::IsA() const
|*
*************************************************************************/
-ULONG SvFileStream::GetData( void* pData, ULONG nSize )
+sal_uIntPtr SvFileStream::GetData( void* pData, sal_uIntPtr nSize )
{
DWORD nCount = 0;
if( IsOpen() )
@@ -230,7 +230,7 @@ ULONG SvFileStream::GetData( void* pData, ULONG nSize )
bool bResult = ReadFile(pInstanceData->hFile,(LPVOID)pData,nSize,&nCount,NULL);
if( !bResult )
{
- ULONG nTestError = GetLastError();
+ sal_uIntPtr nTestError = GetLastError();
SetError(::GetSvError( nTestError ) );
}
}
@@ -247,7 +247,7 @@ ULONG SvFileStream::GetData( void* pData, ULONG nSize )
|*
*************************************************************************/
-ULONG SvFileStream::PutData( const void* pData, ULONG nSize )
+sal_uIntPtr SvFileStream::PutData( const void* pData, sal_uIntPtr nSize )
{
DWORD nCount = 0;
if( IsOpen() )
@@ -268,7 +268,7 @@ ULONG SvFileStream::PutData( const void* pData, ULONG nSize )
|*
*************************************************************************/
-ULONG SvFileStream::SeekPos( ULONG nPos )
+sal_uIntPtr SvFileStream::SeekPos( sal_uIntPtr nPos )
{
DWORD nNewPos = 0;
if( IsOpen() )
@@ -287,7 +287,7 @@ ULONG SvFileStream::SeekPos( ULONG nPos )
}
else
SetError( SVSTREAM_GENERALERROR );
- return (ULONG)nNewPos;
+ return (sal_uIntPtr)nNewPos;
}
/*************************************************************************
@@ -300,9 +300,9 @@ ULONG SvFileStream::SeekPos( ULONG nPos )
|*
*************************************************************************/
/*
-ULONG SvFileStream::Tell()
+sal_uIntPtr SvFileStream::Tell()
{
- ULONG nPos = 0L;
+ sal_uIntPtr nPos = 0L;
if( IsOpen() )
{
@@ -347,7 +347,7 @@ void SvFileStream::FlushData()
|*
*************************************************************************/
-BOOL SvFileStream::LockRange( ULONG nByteOffset, ULONG nBytes )
+sal_Bool SvFileStream::LockRange( sal_uIntPtr nByteOffset, sal_uIntPtr nBytes )
{
bool bRetVal = false;
if( IsOpen() )
@@ -369,7 +369,7 @@ BOOL SvFileStream::LockRange( ULONG nByteOffset, ULONG nBytes )
|*
*************************************************************************/
-BOOL SvFileStream::UnlockRange( ULONG nByteOffset, ULONG nBytes )
+sal_Bool SvFileStream::UnlockRange( sal_uIntPtr nByteOffset, sal_uIntPtr nBytes )
{
bool bRetVal = false;
if( IsOpen() )
@@ -391,21 +391,21 @@ BOOL SvFileStream::UnlockRange( ULONG nByteOffset, ULONG nBytes )
|*
*************************************************************************/
-BOOL SvFileStream::LockFile()
+sal_Bool SvFileStream::LockFile()
{
- BOOL bRetVal = FALSE;
+ sal_Bool bRetVal = sal_False;
if( !nLockCounter )
{
if( LockRange( 0L, LONG_MAX ) )
{
nLockCounter = 1;
- bRetVal = TRUE;
+ bRetVal = sal_True;
}
}
else
{
nLockCounter++;
- bRetVal = TRUE;
+ bRetVal = sal_True;
}
return bRetVal;
}
@@ -420,9 +420,9 @@ BOOL SvFileStream::LockFile()
|*
*************************************************************************/
-BOOL SvFileStream::UnlockFile()
+sal_Bool SvFileStream::UnlockFile()
{
- BOOL bRetVal = FALSE;
+ sal_Bool bRetVal = sal_False;
if( nLockCounter > 0)
{
if( nLockCounter == 1)
@@ -430,13 +430,13 @@ BOOL SvFileStream::UnlockFile()
if( UnlockRange( 0L, LONG_MAX ) )
{
nLockCounter = 0;
- bRetVal = TRUE;
+ bRetVal = sal_True;
}
}
else
{
nLockCounter--;
- bRetVal = TRUE;
+ bRetVal = sal_True;
}
}
return bRetVal;
@@ -555,7 +555,7 @@ void SvFileStream::Open( const String& rFilename, StreamMode nMode )
if( (pInstanceData->hFile==INVALID_HANDLE_VALUE) &&
(nAccessMode & GENERIC_WRITE))
{
- ULONG nErr = ::GetSvError( GetLastError() );
+ sal_uIntPtr nErr = ::GetSvError( GetLastError() );
if(nErr==SVSTREAM_ACCESS_DENIED || nErr==SVSTREAM_SHARING_VIOLATION)
{
nMode &= (~STREAM_WRITE);
@@ -580,15 +580,15 @@ void SvFileStream::Open( const String& rFilename, StreamMode nMode )
if( GetLastError() != ERROR_SUCCESS )
{
- bIsOpen = FALSE;
+ bIsOpen = sal_False;
SetError(::GetSvError( GetLastError() ) );
}
else
{
- bIsOpen = TRUE;
- // pInstanceData->bIsEof = FALSE;
+ bIsOpen = sal_True;
+ // pInstanceData->bIsEof = sal_False;
if( nAccessMode & GENERIC_WRITE )
- bIsWritable = TRUE;
+ bIsWritable = sal_True;
}
SetErrorMode( nOldErrorMode );
}
@@ -631,9 +631,9 @@ void SvFileStream::Close()
Flush();
CloseHandle( pInstanceData->hFile );
}
- bIsOpen = FALSE;
+ bIsOpen = sal_False;
nLockCounter= 0;
- bIsWritable = FALSE;
+ bIsWritable = sal_False;
SvStream::ClearBuffer();
SvStream::ClearError();
}
@@ -663,24 +663,24 @@ void SvFileStream::ResetError()
|*
*************************************************************************/
-void SvFileStream::SetSize( ULONG nSize )
+void SvFileStream::SetSize( sal_uIntPtr nSize )
{
if( IsOpen() )
{
- int bError = FALSE;
+ int bError = sal_False;
HANDLE hFile = pInstanceData->hFile;
- ULONG nOld = SetFilePointer( hFile, 0L, NULL, FILE_CURRENT );
+ sal_uIntPtr nOld = SetFilePointer( hFile, 0L, NULL, FILE_CURRENT );
if( nOld != 0xffffffff )
{
if( SetFilePointer(hFile,nSize,NULL,FILE_BEGIN ) != 0xffffffff)
{
bool bSucc = SetEndOfFile( hFile );
if( !bSucc )
- bError = TRUE;
+ bError = sal_True;
}
if( SetFilePointer( hFile,nOld,NULL,FILE_BEGIN ) == 0xffffffff)
- bError = TRUE;
+ bError = sal_True;
}
if( bError )
SetError(::GetSvError( GetLastError() ) );
diff --git a/tools/source/stream/vcompat.cxx b/tools/source/stream/vcompat.cxx
index 8430eb17659b..fcbab9b98826 100644
--- a/tools/source/stream/vcompat.cxx
+++ b/tools/source/stream/vcompat.cxx
@@ -36,7 +36,7 @@
// - VersionCompat -
// -----------------
-VersionCompat::VersionCompat( SvStream& rStm, USHORT nStreamMode, USHORT nVersion ) :
+VersionCompat::VersionCompat( SvStream& rStm, sal_uInt16 nStreamMode, sal_uInt16 nVersion ) :
mpRWStm ( &rStm ),
mnStmMode ( nStreamMode ),
mnVersion ( nVersion )
@@ -64,7 +64,7 @@ VersionCompat::~VersionCompat()
{
if( STREAM_WRITE == mnStmMode )
{
- const UINT32 nEndPos = mpRWStm->Tell();
+ const sal_uInt32 nEndPos = mpRWStm->Tell();
mpRWStm->Seek( mnCompatPos );
*mpRWStm << ( nEndPos - mnTotalSize );
@@ -72,7 +72,7 @@ VersionCompat::~VersionCompat()
}
else
{
- const UINT32 nReadSize = mpRWStm->Tell() - mnCompatPos;
+ const sal_uInt32 nReadSize = mpRWStm->Tell() - mnCompatPos;
if( mnTotalSize > nReadSize )
mpRWStm->SeekRel( mnTotalSize - nReadSize );
diff --git a/tools/source/string/strascii.cxx b/tools/source/string/strascii.cxx
index 775e1ca7f142..e47517d93412 100644
--- a/tools/source/string/strascii.cxx
+++ b/tools/source/string/strascii.cxx
@@ -31,17 +31,17 @@
#ifdef DBG_UTIL
-static BOOL ImplDbgCheckAsciiStr( const sal_Char* pAsciiStr, sal_Int32 nLen )
+static sal_Bool ImplDbgCheckAsciiStr( const sal_Char* pAsciiStr, sal_Int32 nLen )
{
while ( nLen && *pAsciiStr )
{
if ( ((unsigned char)*pAsciiStr) > 127 )
- return FALSE;
+ return sal_False;
++pAsciiStr,
--nLen;
}
- return TRUE;
+ return sal_True;
}
#endif
@@ -504,7 +504,7 @@ StringCompare UniString::CompareIgnoreCaseToAscii( const sal_Char* pAsciiStr,
// -----------------------------------------------------------------------
-BOOL UniString::EqualsAscii( const sal_Char* pAsciiStr ) const
+sal_Bool UniString::EqualsAscii( const sal_Char* pAsciiStr ) const
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
DBG_ASSERT( ImplDbgCheckAsciiStr( pAsciiStr, STRING_LEN ),
@@ -515,7 +515,7 @@ BOOL UniString::EqualsAscii( const sal_Char* pAsciiStr ) const
// -----------------------------------------------------------------------
-BOOL UniString::EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr ) const
+sal_Bool UniString::EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr ) const
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
DBG_ASSERT( ImplDbgCheckAsciiStr( pAsciiStr, STRING_LEN ),
@@ -526,7 +526,7 @@ BOOL UniString::EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr ) const
// -----------------------------------------------------------------------
-BOOL UniString::EqualsAscii( const sal_Char* pAsciiStr,
+sal_Bool UniString::EqualsAscii( const sal_Char* pAsciiStr,
xub_StrLen nIndex, xub_StrLen nLen ) const
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
@@ -542,7 +542,7 @@ BOOL UniString::EqualsAscii( const sal_Char* pAsciiStr,
// -----------------------------------------------------------------------
-BOOL UniString::EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr,
+sal_Bool UniString::EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr,
xub_StrLen nIndex, xub_StrLen nLen ) const
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
diff --git a/tools/source/string/strcvt.cxx b/tools/source/string/strcvt.cxx
index ef55dee5bfe2..ce5c7ecdcad0 100644
--- a/tools/source/string/strcvt.cxx
+++ b/tools/source/string/strcvt.cxx
@@ -227,7 +227,7 @@ sal_Unicode* ImplGet1ByteUnicodeTab( rtl_TextEncoding eTextEncoding )
static sal_uChar* ImplGet1ByteConvertTab( rtl_TextEncoding eSrcTextEncoding,
rtl_TextEncoding eDestTextEncoding,
- BOOL bReplace )
+ sal_Bool bReplace )
{
#ifndef BOOTSTRAP
TOOLSINDATA* pToolsData = ImplGetToolsInData();
@@ -353,7 +353,7 @@ void ImplDeleteCharTabData()
// =======================================================================
void ByteString::ImplStringConvert(
- rtl_TextEncoding eSource, rtl_TextEncoding eTarget, BOOL bReplace )
+ rtl_TextEncoding eSource, rtl_TextEncoding eTarget, sal_Bool bReplace )
{
sal_uChar* pConvertTab = ImplGet1ByteConvertTab( eSource, eTarget, bReplace );
if ( pConvertTab )
@@ -409,7 +409,7 @@ void ByteString::ImplStringConvert(
// =======================================================================
-ByteString& ByteString::Convert( rtl_TextEncoding eSource, rtl_TextEncoding eTarget, BOOL bReplace )
+ByteString& ByteString::Convert( rtl_TextEncoding eSource, rtl_TextEncoding eTarget, sal_Bool bReplace )
{
DBG_CHKTHIS( ByteString, DbgCheckByteString );
@@ -442,7 +442,7 @@ ByteString& ByteString::Convert( rtl_TextEncoding eSource, rtl_TextEncoding eTar
char ByteString::Convert( char c,
rtl_TextEncoding eSource, rtl_TextEncoding eTarget,
- BOOL bReplace )
+ sal_Bool bReplace )
{
// TextEncoding Dontknow kann nicht konvertiert werden
if ( (eSource == RTL_TEXTENCODING_DONTKNOW) || (eTarget == RTL_TEXTENCODING_DONTKNOW) )
@@ -480,7 +480,7 @@ sal_Unicode ByteString::ConvertToUnicode( char c, rtl_TextEncoding eTextEncoding
// -----------------------------------------------------------------------
-char ByteString::ConvertFromUnicode( sal_Unicode c, rtl_TextEncoding eTextEncoding, BOOL bReplace )
+char ByteString::ConvertFromUnicode( sal_Unicode c, rtl_TextEncoding eTextEncoding, sal_Bool bReplace )
{
sal_Size nLen;
char aBuf[30];
@@ -530,7 +530,7 @@ sal_Unicode ByteString::ConvertToUnicode( const char* pChar, sal_Size* pLen, rtl
// -----------------------------------------------------------------------
sal_Size ByteString::ConvertFromUnicode( sal_Unicode c, char* pBuf, sal_Size nBufLen, rtl_TextEncoding eTextEncoding,
- BOOL bReplace )
+ sal_Bool bReplace )
{
// TextEncoding Dontknow wird nicht konvertiert
if ( eTextEncoding == RTL_TEXTENCODING_DONTKNOW )
diff --git a/tools/source/string/strimp.cxx b/tools/source/string/strimp.cxx
index 34038c576aa0..8712733c0851 100644
--- a/tools/source/string/strimp.cxx
+++ b/tools/source/string/strimp.cxx
@@ -1141,7 +1141,7 @@ STRING& STRING::ConvertLineEnd( LineEnd eLineEnd )
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
// Zeilenumbrueche ermitteln und neue Laenge berechnen
- BOOL bConvert = FALSE; // Muss konvertiert werden
+ sal_Bool bConvert = sal_False; // Muss konvertiert werden
const STRCODE* pStr = mpData->maStr; // damit es schneller geht
xub_StrLen nLineEndLen = (eLineEnd == LINEEND_CRLF) ? 2 : 1;
xub_StrLen nLen = 0; // Ziel-Laenge
@@ -1164,7 +1164,7 @@ STRING& STRING::ConvertLineEnd( LineEnd eLineEnd )
((pStr[i] == _CR) || (pStr[i+1] == _CR))) ||
((eLineEnd == LINEEND_CR) &&
((pStr[i] == _LF) || (pStr[i+1] == _LF))) )
- bConvert = TRUE;
+ bConvert = sal_True;
}
// \r\n oder \n\r, dann Zeichen ueberspringen
@@ -1327,18 +1327,18 @@ StringCompare STRING::CompareIgnoreCaseToAscii( const STRCODE* pCharStr,
// -----------------------------------------------------------------------
-BOOL STRING::Equals( const STRING& rStr ) const
+sal_Bool STRING::Equals( const STRING& rStr ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
DBG_CHKOBJ( &rStr, STRING, DBGCHECKSTRING );
// Sind die Daten gleich
if ( mpData == rStr.mpData )
- return TRUE;
+ return sal_True;
// Gleiche Laenge
if ( mpData->mnLen != rStr.mpData->mnLen )
- return FALSE;
+ return sal_False;
// String vergleichen
return (ImplStringCompareWithoutZero( mpData->maStr, rStr.mpData->maStr, mpData->mnLen ) == 0);
@@ -1346,7 +1346,7 @@ BOOL STRING::Equals( const STRING& rStr ) const
// -----------------------------------------------------------------------
-BOOL STRING::Equals( const STRCODE* pCharStr ) const
+sal_Bool STRING::Equals( const STRCODE* pCharStr ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -1355,18 +1355,18 @@ BOOL STRING::Equals( const STRCODE* pCharStr ) const
// -----------------------------------------------------------------------
-BOOL STRING::EqualsIgnoreCaseAscii( const STRING& rStr ) const
+sal_Bool STRING::EqualsIgnoreCaseAscii( const STRING& rStr ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
DBG_CHKOBJ( &rStr, STRING, DBGCHECKSTRING );
// Sind die Daten gleich
if ( mpData == rStr.mpData )
- return TRUE;
+ return sal_True;
// Gleiche Laenge
if ( mpData->mnLen != rStr.mpData->mnLen )
- return FALSE;
+ return sal_False;
// String vergleichen
return (ImplStringICompareWithoutZero( mpData->maStr, rStr.mpData->maStr, mpData->mnLen ) == 0);
@@ -1374,7 +1374,7 @@ BOOL STRING::EqualsIgnoreCaseAscii( const STRING& rStr ) const
// -----------------------------------------------------------------------
-BOOL STRING::EqualsIgnoreCaseAscii( const STRCODE* pCharStr ) const
+sal_Bool STRING::EqualsIgnoreCaseAscii( const STRCODE* pCharStr ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -1383,7 +1383,7 @@ BOOL STRING::EqualsIgnoreCaseAscii( const STRCODE* pCharStr ) const
// -----------------------------------------------------------------------
-BOOL STRING::Equals( const STRING& rStr, xub_StrLen nIndex, xub_StrLen nLen ) const
+sal_Bool STRING::Equals( const STRING& rStr, xub_StrLen nIndex, xub_StrLen nLen ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
DBG_CHKOBJ( &rStr, STRING, DBGCHECKSTRING );
@@ -1395,7 +1395,7 @@ BOOL STRING::Equals( const STRING& rStr, xub_StrLen nIndex, xub_StrLen nLen ) co
if ( nMaxLen < nLen )
{
if ( rStr.mpData->mnLen != nMaxLen )
- return FALSE;
+ return sal_False;
nLen = static_cast< xub_StrLen >(nMaxLen);
}
@@ -1405,7 +1405,7 @@ BOOL STRING::Equals( const STRING& rStr, xub_StrLen nIndex, xub_StrLen nLen ) co
// -----------------------------------------------------------------------
-BOOL STRING::Equals( const STRCODE* pCharStr, xub_StrLen nIndex, xub_StrLen nLen ) const
+sal_Bool STRING::Equals( const STRCODE* pCharStr, xub_StrLen nIndex, xub_StrLen nLen ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -1418,7 +1418,7 @@ BOOL STRING::Equals( const STRCODE* pCharStr, xub_StrLen nIndex, xub_StrLen nLen
// -----------------------------------------------------------------------
-BOOL STRING::EqualsIgnoreCaseAscii( const STRING& rStr, xub_StrLen nIndex, xub_StrLen nLen ) const
+sal_Bool STRING::EqualsIgnoreCaseAscii( const STRING& rStr, xub_StrLen nIndex, xub_StrLen nLen ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
DBG_CHKOBJ( &rStr, STRING, DBGCHECKSTRING );
@@ -1430,7 +1430,7 @@ BOOL STRING::EqualsIgnoreCaseAscii( const STRING& rStr, xub_StrLen nIndex, xub_S
if ( nMaxLen < nLen )
{
if ( rStr.mpData->mnLen != nMaxLen )
- return FALSE;
+ return sal_False;
nLen = static_cast< xub_StrLen >(nMaxLen);
}
@@ -1440,7 +1440,7 @@ BOOL STRING::EqualsIgnoreCaseAscii( const STRING& rStr, xub_StrLen nIndex, xub_S
// -----------------------------------------------------------------------
-BOOL STRING::EqualsIgnoreCaseAscii( const STRCODE* pCharStr, xub_StrLen nIndex, xub_StrLen nLen ) const
+sal_Bool STRING::EqualsIgnoreCaseAscii( const STRCODE* pCharStr, xub_StrLen nIndex, xub_StrLen nLen ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
diff --git a/tools/source/string/tenccvt.cxx b/tools/source/string/tenccvt.cxx
index 5237b24948a7..f1f023a90502 100644
--- a/tools/source/string/tenccvt.cxx
+++ b/tools/source/string/tenccvt.cxx
@@ -84,14 +84,14 @@ rtl_TextEncoding GetOneByteTextEncoding( rtl_TextEncoding eEncoding )
// -----------------------------------------------------------------------
-rtl_TextEncoding GetSOLoadTextEncoding( rtl_TextEncoding eEncoding, USHORT /* nVersion = SOFFICE_FILEFORMAT_50 */ )
+rtl_TextEncoding GetSOLoadTextEncoding( rtl_TextEncoding eEncoding, sal_uInt16 /* nVersion = SOFFICE_FILEFORMAT_50 */ )
{
return GetExtendedCompatibilityTextEncoding( GetOneByteTextEncoding( eEncoding ) );
}
// -----------------------------------------------------------------------
-rtl_TextEncoding GetSOStoreTextEncoding( rtl_TextEncoding eEncoding, USHORT /* nVersion = SOFFICE_FILEFORMAT_50 */ )
+rtl_TextEncoding GetSOStoreTextEncoding( rtl_TextEncoding eEncoding, sal_uInt16 /* nVersion = SOFFICE_FILEFORMAT_50 */ )
{
return GetExtendedTextEncoding( GetOneByteTextEncoding( eEncoding ) );
}
diff --git a/tools/source/string/tstring.cxx b/tools/source/string/tstring.cxx
index f2525e3bca84..734e729ceccb 100644
--- a/tools/source/string/tstring.cxx
+++ b/tools/source/string/tstring.cxx
@@ -188,7 +188,7 @@ double ByteString::ToDouble() const
// -----------------------------------------------------------------------
-BOOL ByteString::IsLowerAscii() const
+sal_Bool ByteString::IsLowerAscii() const
{
DBG_CHKTHIS( ByteString, DbgCheckByteString );
@@ -198,18 +198,18 @@ BOOL ByteString::IsLowerAscii() const
while ( nIndex < nLen )
{
if ( (*pStr >= 65) && (*pStr <= 90) )
- return FALSE;
+ return sal_False;
++pStr,
++nIndex;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL ByteString::IsUpperAscii() const
+sal_Bool ByteString::IsUpperAscii() const
{
DBG_CHKTHIS( ByteString, DbgCheckByteString );
@@ -219,18 +219,18 @@ BOOL ByteString::IsUpperAscii() const
while ( nIndex < nLen )
{
if ( (*pStr >= 97) && (*pStr <= 122) )
- return FALSE;
+ return sal_False;
++pStr,
++nIndex;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL ByteString::IsAlphaAscii() const
+sal_Bool ByteString::IsAlphaAscii() const
{
DBG_CHKTHIS( ByteString, DbgCheckByteString );
@@ -241,18 +241,18 @@ BOOL ByteString::IsAlphaAscii() const
{
if ( !(((*pStr >= 97) && (*pStr <= 122)) ||
((*pStr >= 65) && (*pStr <= 90))) )
- return FALSE;
+ return sal_False;
++pStr,
++nIndex;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL ByteString::IsNumericAscii() const
+sal_Bool ByteString::IsNumericAscii() const
{
DBG_CHKTHIS( ByteString, DbgCheckByteString );
@@ -262,18 +262,18 @@ BOOL ByteString::IsNumericAscii() const
while ( nIndex < nLen )
{
if ( !((*pStr >= 48) && (*pStr <= 57)) )
- return FALSE;
+ return sal_False;
++pStr,
++nIndex;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL ByteString::IsAlphaNumericAscii() const
+sal_Bool ByteString::IsAlphaNumericAscii() const
{
DBG_CHKTHIS( ByteString, DbgCheckByteString );
@@ -285,11 +285,11 @@ BOOL ByteString::IsAlphaNumericAscii() const
if ( !(((*pStr >= 97) && (*pStr <= 122)) ||
((*pStr >= 65) && (*pStr <= 90)) ||
((*pStr >= 48) && (*pStr <= 57))) )
- return FALSE;
+ return sal_False;
++pStr,
++nIndex;
}
- return TRUE;
+ return sal_True;
}
diff --git a/tools/source/testtoolloader/testtoolloader.cxx b/tools/source/testtoolloader/testtoolloader.cxx
index 21a1a715dc08..59be94a02f4c 100644
--- a/tools/source/testtoolloader/testtoolloader.cxx
+++ b/tools/source/testtoolloader/testtoolloader.cxx
@@ -137,7 +137,7 @@ void InitTestToolLib()
if ( pInitFunc )
{
(reinterpret_cast< pfunc_CreateEventLogger >(pInitFunc))();
- bLoggerStarted = TRUE;
+ bLoggerStarted = sal_True;
}
else
{
@@ -174,7 +174,7 @@ void DeInitTestToolLib()
if ( pDeInitFunc )
{
(reinterpret_cast< pfunc_DestroyEventLogger >(pDeInitFunc))();
- bLoggerStarted = FALSE;
+ bLoggerStarted = sal_False;
}
}
diff --git a/tools/source/zcodec/zcodec.cxx b/tools/source/zcodec/zcodec.cxx
index f4f62162854a..cf62c02e0c29 100644
--- a/tools/source/zcodec/zcodec.cxx
+++ b/tools/source/zcodec/zcodec.cxx
@@ -60,7 +60,7 @@ static int gz_magic[2] = { 0x1f, 0x8b }; /* gzip magic header */
// - ZCodec -
// ----------
-ZCodec::ZCodec( ULONG nInBufSize, ULONG nOutBufSize, ULONG nMemUsage )
+ZCodec::ZCodec( sal_uIntPtr nInBufSize, sal_uIntPtr nOutBufSize, sal_uIntPtr nMemUsage )
: mnCRC(0)
{
mnMemUsage = nMemUsage;
@@ -87,11 +87,11 @@ ZCodec::~ZCodec()
// ------------------------------------------------------------------------
-void ZCodec::BeginCompression( ULONG nCompressMethod )
+void ZCodec::BeginCompression( sal_uIntPtr nCompressMethod )
{
mbInit = 0;
- mbStatus = TRUE;
- mbFinish = FALSE;
+ mbStatus = sal_True;
+ mbFinish = sal_False;
mpIStm = mpOStm = NULL;
mnInToRead = 0xffffffff;
mpInBuf = mpOutBuf = NULL;
@@ -146,8 +146,8 @@ long ZCodec::Compress( SvStream& rIStm, SvStream& rOStm )
{
mpIStm = &rIStm;
mpOStm = &rOStm;
- ImplInitBuf( FALSE );
- mpInBuf = new BYTE[ mnInBufSize ];
+ ImplInitBuf( sal_False );
+ mpInBuf = new sal_uInt8[ mnInBufSize ];
}
while (( PZSTREAM->avail_in = mpIStm->Read( PZSTREAM->next_in = mpInBuf, mnInBufSize )) != 0 )
{
@@ -155,7 +155,7 @@ long ZCodec::Compress( SvStream& rIStm, SvStream& rOStm )
ImplWriteBack();
if ( deflate( PZSTREAM, Z_NO_FLUSH ) < 0 )
{
- mbStatus = FALSE;
+ mbStatus = sal_False;
break;
}
};
@@ -167,7 +167,7 @@ long ZCodec::Compress( SvStream& rIStm, SvStream& rOStm )
long ZCodec::Decompress( SvStream& rIStm, SvStream& rOStm )
{
int err;
- ULONG nInToRead;
+ sal_uIntPtr nInToRead;
long nOldTotal_Out = PZSTREAM->total_out;
if ( mbFinish )
@@ -177,8 +177,8 @@ long ZCodec::Decompress( SvStream& rIStm, SvStream& rOStm )
{
mpIStm = &rIStm;
mpOStm = &rOStm;
- ImplInitBuf( TRUE );
- PZSTREAM->next_out = mpOutBuf = new BYTE[ PZSTREAM->avail_out = mnOutBufSize ];
+ ImplInitBuf( sal_True );
+ PZSTREAM->next_out = mpOutBuf = new sal_uInt8[ PZSTREAM->avail_out = mnOutBufSize ];
}
do
{
@@ -196,7 +196,7 @@ long ZCodec::Decompress( SvStream& rIStm, SvStream& rOStm )
err = inflate( PZSTREAM, Z_NO_FLUSH );
if ( err < 0 )
{
- mbStatus = FALSE;
+ mbStatus = sal_False;
break;
}
@@ -205,18 +205,18 @@ long ZCodec::Decompress( SvStream& rIStm, SvStream& rOStm )
ImplWriteBack();
if ( err == Z_STREAM_END )
- mbFinish = TRUE;
+ mbFinish = sal_True;
return ( mbStatus ) ? (long)(PZSTREAM->total_out - nOldTotal_Out) : -1;
}
// ------------------------------------------------------------------------
-long ZCodec::Write( SvStream& rOStm, const BYTE* pData, ULONG nSize )
+long ZCodec::Write( SvStream& rOStm, const sal_uInt8* pData, sal_uIntPtr nSize )
{
if ( mbInit == 0 )
{
mpOStm = &rOStm;
- ImplInitBuf( FALSE );
+ ImplInitBuf( sal_False );
}
PZSTREAM->avail_in = nSize;
@@ -229,7 +229,7 @@ long ZCodec::Write( SvStream& rOStm, const BYTE* pData, ULONG nSize )
if ( deflate( PZSTREAM, Z_NO_FLUSH ) < 0 )
{
- mbStatus = FALSE;
+ mbStatus = sal_False;
break;
}
}
@@ -238,10 +238,10 @@ long ZCodec::Write( SvStream& rOStm, const BYTE* pData, ULONG nSize )
// ------------------------------------------------------------------------
-long ZCodec::Read( SvStream& rIStm, BYTE* pData, ULONG nSize )
+long ZCodec::Read( SvStream& rIStm, sal_uInt8* pData, sal_uIntPtr nSize )
{
int err;
- ULONG nInToRead;
+ sal_uIntPtr nInToRead;
if ( mbFinish )
return 0; // PZSTREAM->total_out;
@@ -249,7 +249,7 @@ long ZCodec::Read( SvStream& rIStm, BYTE* pData, ULONG nSize )
mpIStm = &rIStm;
if ( mbInit == 0 )
{
- ImplInitBuf( TRUE );
+ ImplInitBuf( sal_True );
}
PZSTREAM->avail_out = nSize;
PZSTREAM->next_out = pData;
@@ -278,17 +278,17 @@ long ZCodec::Read( SvStream& rIStm, BYTE* pData, ULONG nSize )
(PZSTREAM->avail_out != 0) &&
(PZSTREAM->avail_in || mnInToRead) );
if ( err == Z_STREAM_END )
- mbFinish = TRUE;
+ mbFinish = sal_True;
return (mbStatus ? (long)(nSize - PZSTREAM->avail_out) : -1);
}
// ------------------------------------------------------------------------
-long ZCodec::ReadAsynchron( SvStream& rIStm, BYTE* pData, ULONG nSize )
+long ZCodec::ReadAsynchron( SvStream& rIStm, sal_uInt8* pData, sal_uIntPtr nSize )
{
int err = 0;
- ULONG nInToRead;
+ sal_uIntPtr nInToRead;
if ( mbFinish )
return 0; // PZSTREAM->total_out;
@@ -296,7 +296,7 @@ long ZCodec::ReadAsynchron( SvStream& rIStm, BYTE* pData, ULONG nSize )
if ( mbInit == 0 )
{
mpIStm = &rIStm;
- ImplInitBuf( TRUE );
+ ImplInitBuf( sal_True );
}
PZSTREAM->avail_out = nSize;
PZSTREAM->next_out = pData;
@@ -306,9 +306,9 @@ long ZCodec::ReadAsynchron( SvStream& rIStm, BYTE* pData, ULONG nSize )
{
nInToRead = (mnInBufSize > mnInToRead) ? mnInToRead : mnInBufSize;
- ULONG nStreamPos = rIStm.Tell();
+ sal_uIntPtr nStreamPos = rIStm.Tell();
rIStm.Seek( STREAM_SEEK_TO_END );
- ULONG nMaxPos = rIStm.Tell();
+ sal_uIntPtr nMaxPos = rIStm.Tell();
rIStm.Seek( nStreamPos );
if ( ( nMaxPos - nStreamPos ) < nInToRead )
{
@@ -337,7 +337,7 @@ long ZCodec::ReadAsynchron( SvStream& rIStm, BYTE* pData, ULONG nSize )
(PZSTREAM->avail_out != 0) &&
(PZSTREAM->avail_in || mnInToRead) );
if ( err == Z_STREAM_END )
- mbFinish = TRUE;
+ mbFinish = sal_True;
return (mbStatus ? (long)(nSize - PZSTREAM->avail_out) : -1);
}
@@ -346,7 +346,7 @@ long ZCodec::ReadAsynchron( SvStream& rIStm, BYTE* pData, ULONG nSize )
void ZCodec::ImplWriteBack()
{
- ULONG nAvail = mnOutBufSize - PZSTREAM->avail_out;
+ sal_uIntPtr nAvail = mnOutBufSize - PZSTREAM->avail_out;
if ( nAvail )
{
@@ -359,35 +359,35 @@ void ZCodec::ImplWriteBack()
// ------------------------------------------------------------------------
-void ZCodec::SetBreak( ULONG nInToRead )
+void ZCodec::SetBreak( sal_uIntPtr nInToRead )
{
mnInToRead = nInToRead;
}
// ------------------------------------------------------------------------
-ULONG ZCodec::GetBreak( void )
+sal_uIntPtr ZCodec::GetBreak( void )
{
return ( mnInToRead + PZSTREAM->avail_in );
}
// ------------------------------------------------------------------------
-void ZCodec::SetCRC( ULONG nCRC )
+void ZCodec::SetCRC( sal_uIntPtr nCRC )
{
mnCRC = nCRC;
}
// ------------------------------------------------------------------------
-ULONG ZCodec::GetCRC()
+sal_uIntPtr ZCodec::GetCRC()
{
return mnCRC;
}
// ------------------------------------------------------------------------
-void ZCodec::ImplInitBuf ( BOOL nIOFlag )
+void ZCodec::ImplInitBuf ( sal_Bool nIOFlag )
{
if ( mbInit == 0 )
{
@@ -396,19 +396,19 @@ void ZCodec::ImplInitBuf ( BOOL nIOFlag )
mbInit = 1;
if ( mbStatus && ( mnCompressMethod & ZCODEC_GZ_LIB ) )
{
- BYTE n1, n2, j, nMethod, nFlags;
+ sal_uInt8 n1, n2, j, nMethod, nFlags;
for ( int i = 0; i < 2; i++ ) // gz - magic number
{
*mpIStm >> j;
if ( j != gz_magic[ i ] )
- mbStatus = FALSE;
+ mbStatus = sal_False;
}
*mpIStm >> nMethod;
*mpIStm >> nFlags;
if ( nMethod != Z_DEFLATED )
- mbStatus = FALSE;
+ mbStatus = sal_False;
if ( ( nFlags & GZ_RESERVED ) != 0 )
- mbStatus = FALSE;
+ mbStatus = sal_False;
/* Discard time, xflags and OS code: */
mpIStm->SeekRel( 6 );
/* skip the extra field */
@@ -439,13 +439,13 @@ void ZCodec::ImplInitBuf ( BOOL nIOFlag )
if ( nFlags & GZ_HEAD_CRC )
mpIStm->SeekRel( 2 );
if ( mbStatus )
- mbStatus = ( inflateInit2( PZSTREAM, -MAX_WBITS) != Z_OK ) ? FALSE : TRUE;
+ mbStatus = ( inflateInit2( PZSTREAM, -MAX_WBITS) != Z_OK ) ? sal_False : sal_True;
}
else
{
mbStatus = ( inflateInit( PZSTREAM ) >= 0 );
}
- mpInBuf = new BYTE[ mnInBufSize ];
+ mpInBuf = new sal_uInt8[ mnInBufSize ];
}
else
{
@@ -455,14 +455,14 @@ void ZCodec::ImplInitBuf ( BOOL nIOFlag )
MAX_WBITS, mnMemUsage, ( mnCompressMethod >> 8 ) & 0xff,
ZLIB_VERSION, sizeof( z_stream ) ) >= 0 );
- PZSTREAM->next_out = mpOutBuf = new BYTE[ PZSTREAM->avail_out = mnOutBufSize ];
+ PZSTREAM->next_out = mpOutBuf = new sal_uInt8[ PZSTREAM->avail_out = mnOutBufSize ];
}
}
}
// ------------------------------------------------------------------------
-ULONG ZCodec::UpdateCRC ( ULONG nLatestCRC, ULONG nNumber )
+sal_uIntPtr ZCodec::UpdateCRC ( sal_uIntPtr nLatestCRC, sal_uIntPtr nNumber )
{
#ifdef OSL_LITENDIAN
@@ -473,14 +473,14 @@ ULONG ZCodec::UpdateCRC ( ULONG nLatestCRC, ULONG nNumber )
// ------------------------------------------------------------------------
-ULONG ZCodec::UpdateCRC ( ULONG nLatestCRC, BYTE* pSource, long nDatSize)
+sal_uIntPtr ZCodec::UpdateCRC ( sal_uIntPtr nLatestCRC, sal_uInt8* pSource, long nDatSize)
{
return rtl_crc32( nLatestCRC, pSource, nDatSize );
}
// ------------------------------------------------------------------------
-void GZCodec::BeginCompression( ULONG nCompressMethod )
+void GZCodec::BeginCompression( sal_uIntPtr nCompressMethod )
{
ZCodec::BeginCompression( nCompressMethod | ZCODEC_GZ_LIB );
};
diff --git a/tools/unx/source/dll/toolsdll.cxx b/tools/unx/source/dll/toolsdll.cxx
index 71b01e20bd4f..c008cbbc001c 100644
--- a/tools/unx/source/dll/toolsdll.cxx
+++ b/tools/unx/source/dll/toolsdll.cxx
@@ -41,7 +41,7 @@ static void* aAppData[SHL_COUNT];
|*
***************************************************************************/
-void** GetAppData( USHORT nSharedLib )
+void** GetAppData( sal_uInt16 nSharedLib )
{
return &(aAppData[nSharedLib]);
}
diff --git a/tools/util/makefile.pmk b/tools/util/makefile.pmk
deleted file mode 100644
index 9d8fc0d3ad24..000000000000
--- a/tools/util/makefile.pmk
+++ /dev/null
@@ -1,31 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-# define TOOLS_DLLIMPLEMENTATION (see @ toolsdllapi.h)
-CDEFS += -DTOOLS_DLLIMPLEMENTATION
-
-VISIBILITY_HIDDEN=TRUE
diff --git a/tools/util/tools.r b/tools/util/tools.r
deleted file mode 100644
index 0d1e8739bd42..000000000000
--- a/tools/util/tools.r
+++ /dev/null
@@ -1,17 +0,0 @@
-#include "CodeFragmentTypes.r"
-
-resource 'cfrg' (0) {
- {
- kPowerPC, /* instruction set architecture */
- kFullLib, /* base-level library */
- kNoVersionNum, /* no implementation version number */
- kNoVersionNum, /* no definition version number */
- kDefaultStackSize, /* use default stack size */
- kNoAppSubFolder, /* no library directory */
- kIsLib, /* fragment is an application */
- kOnDiskFlat, /* fragment is on disk */
- kZeroOffset, /* fragment starts at fork start */
- kWholeFork, /* fragment occupies entire fork */
- "Tools.pef" /* name of the application */
- }
-};
diff --git a/ucbhelper/workben/ucbexplorer/ucbexplorer.hrc b/ucbhelper/workben/ucbexplorer/ucbexplorer.hrc
index e93730da99ef..7d6aa8dba4ad 100644
--- a/ucbhelper/workben/ucbexplorer/ucbexplorer.hrc
+++ b/ucbhelper/workben/ucbexplorer/ucbexplorer.hrc
@@ -24,15 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-//=========================================================================
-//
+
// UCB Explorer ( resource identifiers )
-//
-// (C) 2000 StarOffice Entwicklungs GmbH, Hamburg, Germany
-//
-// $Author: rt $ $Date: 2008-04-10 16:19:47 $Revision$
-//
-//=========================================================================
#ifndef _UCBEXPLORER_HRC
#define _UCBEXPLORER_HRC
diff --git a/unotools/inc/unotools/accelcfg.hxx b/unotools/inc/unotools/accelcfg.hxx
index a1884d34fbc3..5f0fcc61f9c4 100644
--- a/unotools/inc/unotools/accelcfg.hxx
+++ b/unotools/inc/unotools/accelcfg.hxx
@@ -78,7 +78,7 @@ public:
void SetCommand( const SvtAcceleratorConfigItem& rItem );
// sets several or all configuration items
- // if bClear=FALSE, all items not in the sequence remain unchanged
+ // if bClear=sal_False, all items not in the sequence remain unchanged
void SetItems( const SvtAcceleratorItemList& rItems, bool bClear );
};
diff --git a/unotools/inc/unotools/componentresmodule.hxx b/unotools/inc/unotools/componentresmodule.hxx
index 0fe4e126ea74..079af63e9b4a 100644
--- a/unotools/inc/unotools/componentresmodule.hxx
+++ b/unotools/inc/unotools/componentresmodule.hxx
@@ -80,7 +80,7 @@ namespace utl
class UNOTOOLS_DLLPUBLIC ModuleRes : public ::ResId
{
public:
- ModuleRes( USHORT _nId, OComponentResourceModule& _rModule ) : ResId( _nId, *_rModule.getResManager() ) { }
+ ModuleRes( sal_uInt16 _nId, OComponentResourceModule& _rModule ) : ResId( _nId, *_rModule.getResManager() ) { }
};
//====================================================================
@@ -119,7 +119,7 @@ namespace utl
typedef ::utl::ModuleRes BaseClass; \
\
public: \
- ResClass( USHORT _nId ) : BaseClass( _nId, ModuleClass::getInstance() ) \
+ ResClass( sal_uInt16 _nId ) : BaseClass( _nId, ModuleClass::getInstance() ) \
{ \
} \
}; \
diff --git a/unotools/inc/unotools/configvaluecontainer.hxx b/unotools/inc/unotools/configvaluecontainer.hxx
index a66ca4cb753a..57a140a00e58 100644
--- a/unotools/inc/unotools/configvaluecontainer.hxx
+++ b/unotools/inc/unotools/configvaluecontainer.hxx
@@ -187,7 +187,7 @@ namespace utl
<p>The current values in memory (your exchange locations registered using the registerXXX methods) is
forwarded to their respective configuration nodes.</p>
- <p>Note that calling <method>write</method>(<TRUE/) is the same as calling <method>commit</method>(<TRUE/>).</p>
+ <p>Note that calling <method>write</method>(<sal_True/) is the same as calling <method>commit</method>(<TRUE/>).</p>
@precond
The access must have been created for update access
@@ -203,7 +203,7 @@ namespace utl
/** commits any changes done
- <p>Note that calling <method>write</method>(<TRUE/) is the same as calling <method>commit</method>(<TRUE/>).</p>
+ <p>Note that calling <method>write</method>(<sal_True/) is the same as calling <method>commit</method>(<TRUE/>).</p>
@precond
The access must have been created for update access
diff --git a/unotools/inc/unotools/defaultoptions.hxx b/unotools/inc/unotools/defaultoptions.hxx
index ecd6b7928629..f4c10f0b9e09 100644
--- a/unotools/inc/unotools/defaultoptions.hxx
+++ b/unotools/inc/unotools/defaultoptions.hxx
@@ -47,7 +47,7 @@ public:
SvtDefaultOptions();
virtual ~SvtDefaultOptions();
- String GetDefaultPath( USHORT nId ) const;
+ String GetDefaultPath( sal_uInt16 nId ) const;
};
#endif // #ifndef INCLUDED_unotools_DEFAULTOPTIONS_HXX
diff --git a/unotools/inc/unotools/fontcfg.hxx b/unotools/inc/unotools/fontcfg.hxx
index 633c12c4c99c..37bbdf3018e3 100644
--- a/unotools/inc/unotools/fontcfg.hxx
+++ b/unotools/inc/unotools/fontcfg.hxx
@@ -118,38 +118,38 @@ class UNOTOOLS_DLLPUBLIC DefaultFontConfiguration
// IMPL_FONT_ATTR_COMIC - Like Comic Sans MS
// IMPL_FONT_ATTR_BRUSHSCRIPT - More Script
// IMPL_FONT_ATTR_OTHERSTYLE - OldStyle, ... so negativ points
-#define IMPL_FONT_ATTR_DEFAULT ((ULONG)0x00000001)
-#define IMPL_FONT_ATTR_STANDARD ((ULONG)0x00000002)
-#define IMPL_FONT_ATTR_NORMAL ((ULONG)0x00000004)
-#define IMPL_FONT_ATTR_SYMBOL ((ULONG)0x00000008)
-#define IMPL_FONT_ATTR_FIXED ((ULONG)0x00000010)
-#define IMPL_FONT_ATTR_SANSSERIF ((ULONG)0x00000020)
-#define IMPL_FONT_ATTR_SERIF ((ULONG)0x00000040)
-#define IMPL_FONT_ATTR_DECORATIVE ((ULONG)0x00000080)
-#define IMPL_FONT_ATTR_SPECIAL ((ULONG)0x00000100)
-#define IMPL_FONT_ATTR_ITALIC ((ULONG)0x00000200)
-#define IMPL_FONT_ATTR_TITLING ((ULONG)0x00000400)
-#define IMPL_FONT_ATTR_CAPITALS ((ULONG)0x00000800)
-#define IMPL_FONT_ATTR_CJK ((ULONG)0x00001000)
-#define IMPL_FONT_ATTR_CJK_JP ((ULONG)0x00002000)
-#define IMPL_FONT_ATTR_CJK_SC ((ULONG)0x00004000)
-#define IMPL_FONT_ATTR_CJK_TC ((ULONG)0x00008000)
-#define IMPL_FONT_ATTR_CJK_KR ((ULONG)0x00010000)
-#define IMPL_FONT_ATTR_CTL ((ULONG)0x00020000)
-#define IMPL_FONT_ATTR_NONELATIN ((ULONG)0x00040000)
-#define IMPL_FONT_ATTR_FULL ((ULONG)0x00080000)
-#define IMPL_FONT_ATTR_OUTLINE ((ULONG)0x00100000)
-#define IMPL_FONT_ATTR_SHADOW ((ULONG)0x00200000)
-#define IMPL_FONT_ATTR_ROUNDED ((ULONG)0x00400000)
-#define IMPL_FONT_ATTR_TYPEWRITER ((ULONG)0x00800000)
-#define IMPL_FONT_ATTR_SCRIPT ((ULONG)0x01000000)
-#define IMPL_FONT_ATTR_HANDWRITING ((ULONG)0x02000000)
-#define IMPL_FONT_ATTR_CHANCERY ((ULONG)0x04000000)
-#define IMPL_FONT_ATTR_COMIC ((ULONG)0x08000000)
-#define IMPL_FONT_ATTR_BRUSHSCRIPT ((ULONG)0x10000000)
-#define IMPL_FONT_ATTR_GOTHIC ((ULONG)0x20000000)
-#define IMPL_FONT_ATTR_SCHOOLBOOK ((ULONG)0x40000000)
-#define IMPL_FONT_ATTR_OTHERSTYLE ((ULONG)0x80000000)
+#define IMPL_FONT_ATTR_DEFAULT ((sal_uLong)0x00000001)
+#define IMPL_FONT_ATTR_STANDARD ((sal_uLong)0x00000002)
+#define IMPL_FONT_ATTR_NORMAL ((sal_uLong)0x00000004)
+#define IMPL_FONT_ATTR_SYMBOL ((sal_uLong)0x00000008)
+#define IMPL_FONT_ATTR_FIXED ((sal_uLong)0x00000010)
+#define IMPL_FONT_ATTR_SANSSERIF ((sal_uLong)0x00000020)
+#define IMPL_FONT_ATTR_SERIF ((sal_uLong)0x00000040)
+#define IMPL_FONT_ATTR_DECORATIVE ((sal_uLong)0x00000080)
+#define IMPL_FONT_ATTR_SPECIAL ((sal_uLong)0x00000100)
+#define IMPL_FONT_ATTR_ITALIC ((sal_uLong)0x00000200)
+#define IMPL_FONT_ATTR_TITLING ((sal_uLong)0x00000400)
+#define IMPL_FONT_ATTR_CAPITALS ((sal_uLong)0x00000800)
+#define IMPL_FONT_ATTR_CJK ((sal_uLong)0x00001000)
+#define IMPL_FONT_ATTR_CJK_JP ((sal_uLong)0x00002000)
+#define IMPL_FONT_ATTR_CJK_SC ((sal_uLong)0x00004000)
+#define IMPL_FONT_ATTR_CJK_TC ((sal_uLong)0x00008000)
+#define IMPL_FONT_ATTR_CJK_KR ((sal_uLong)0x00010000)
+#define IMPL_FONT_ATTR_CTL ((sal_uLong)0x00020000)
+#define IMPL_FONT_ATTR_NONELATIN ((sal_uLong)0x00040000)
+#define IMPL_FONT_ATTR_FULL ((sal_uLong)0x00080000)
+#define IMPL_FONT_ATTR_OUTLINE ((sal_uLong)0x00100000)
+#define IMPL_FONT_ATTR_SHADOW ((sal_uLong)0x00200000)
+#define IMPL_FONT_ATTR_ROUNDED ((sal_uLong)0x00400000)
+#define IMPL_FONT_ATTR_TYPEWRITER ((sal_uLong)0x00800000)
+#define IMPL_FONT_ATTR_SCRIPT ((sal_uLong)0x01000000)
+#define IMPL_FONT_ATTR_HANDWRITING ((sal_uLong)0x02000000)
+#define IMPL_FONT_ATTR_CHANCERY ((sal_uLong)0x04000000)
+#define IMPL_FONT_ATTR_COMIC ((sal_uLong)0x08000000)
+#define IMPL_FONT_ATTR_BRUSHSCRIPT ((sal_uLong)0x10000000)
+#define IMPL_FONT_ATTR_GOTHIC ((sal_uLong)0x20000000)
+#define IMPL_FONT_ATTR_SCHOOLBOOK ((sal_uLong)0x40000000)
+#define IMPL_FONT_ATTR_OTHERSTYLE ((sal_uLong)0x80000000)
#define IMPL_FONT_ATTR_CJK_ALLLANG (IMPL_FONT_ATTR_CJK_JP | IMPL_FONT_ATTR_CJK_SC | IMPL_FONT_ATTR_CJK_TC | IMPL_FONT_ATTR_CJK_KR)
#define IMPL_FONT_ATTR_ALLSCRIPT (IMPL_FONT_ATTR_SCRIPT | IMPL_FONT_ATTR_HANDWRITING | IMPL_FONT_ATTR_CHANCERY | IMPL_FONT_ATTR_COMIC | IMPL_FONT_ATTR_BRUSHSCRIPT)
@@ -219,7 +219,7 @@ public:
rtl::OUString(),
rtl::OUString() )
) const;
- static void getMapName( const String& rOrgName, String& rShortName, String& rFamilyName, FontWeight& rWeight, FontWidth& rWidth, ULONG& rType );
+ static void getMapName( const String& rOrgName, String& rShortName, String& rFamilyName, FontWeight& rWeight, FontWidth& rWidth, sal_uLong& rType );
};
} // namespace utl
diff --git a/unotools/inc/unotools/fontcvt.hxx b/unotools/inc/unotools/fontcvt.hxx
index 333ee36e706d..715ffeb56623 100644
--- a/unotools/inc/unotools/fontcvt.hxx
+++ b/unotools/inc/unotools/fontcvt.hxx
@@ -35,12 +35,12 @@
// - FontToSubsFont -
// ------------------
-#define FONTTOSUBSFONT_IMPORT ((ULONG)0x00000001)
-#define FONTTOSUBSFONT_EXPORT ((ULONG)0x00000002)
-#define FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS ((ULONG)0x00000004)
+#define FONTTOSUBSFONT_IMPORT ((sal_uLong)0x00000001)
+#define FONTTOSUBSFONT_EXPORT ((sal_uLong)0x00000002)
+#define FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS ((sal_uLong)0x00000004)
typedef void* FontToSubsFontConverter;
-UNOTOOLS_DLLPUBLIC FontToSubsFontConverter CreateFontToSubsFontConverter( const String& rFontName, ULONG nFlags );
+UNOTOOLS_DLLPUBLIC FontToSubsFontConverter CreateFontToSubsFontConverter( const String& rFontName, sal_uLong nFlags );
UNOTOOLS_DLLPUBLIC void DestroyFontToSubsFontConverter( FontToSubsFontConverter hConverter );
UNOTOOLS_DLLPUBLIC sal_Unicode ConvertFontToSubsFontChar( FontToSubsFontConverter hConverter, sal_Unicode c );
UNOTOOLS_DLLPUBLIC String GetFontToSubsFontName( FontToSubsFontConverter hConverter );
diff --git a/unotools/inc/unotools/fontdefs.hxx b/unotools/inc/unotools/fontdefs.hxx
index 12868aabe525..3ba232b6eba4 100644
--- a/unotools/inc/unotools/fontdefs.hxx
+++ b/unotools/inc/unotools/fontdefs.hxx
@@ -40,12 +40,12 @@ namespace utl {
// - SubsFontName -
// ----------------
-#define SUBSFONT_ONLYONE ((ULONG)0x00000001)
-#define SUBSFONT_MS ((ULONG)0x00000002)
-#define SUBSFONT_PS ((ULONG)0x00000004)
-#define SUBSFONT_HTML ((ULONG)0x00000008)
+#define SUBSFONT_ONLYONE ((sal_uLong)0x00000001)
+#define SUBSFONT_MS ((sal_uLong)0x00000002)
+#define SUBSFONT_PS ((sal_uLong)0x00000004)
+#define SUBSFONT_HTML ((sal_uLong)0x00000008)
-UNOTOOLS_DLLPUBLIC String GetSubsFontName( const String& rName, ULONG nFlags );
+UNOTOOLS_DLLPUBLIC String GetSubsFontName( const String& rName, sal_uLong nFlags );
// -----------------
// - FontTokenName -
@@ -79,29 +79,29 @@ public:
// Default-Font
-#define DEFAULTFONT_SANS_UNICODE ((USHORT)1)
-#define DEFAULTFONT_SANS ((USHORT)2)
-#define DEFAULTFONT_SERIF ((USHORT)3)
-#define DEFAULTFONT_FIXED ((USHORT)4)
-#define DEFAULTFONT_SYMBOL ((USHORT)5)
-#define DEFAULTFONT_UI_SANS ((USHORT)1000)
-#define DEFAULTFONT_UI_FIXED ((USHORT)1001)
-#define DEFAULTFONT_LATIN_TEXT ((USHORT)2000)
-#define DEFAULTFONT_LATIN_PRESENTATION ((USHORT)2001)
-#define DEFAULTFONT_LATIN_SPREADSHEET ((USHORT)2002)
-#define DEFAULTFONT_LATIN_HEADING ((USHORT)2003)
-#define DEFAULTFONT_LATIN_DISPLAY ((USHORT)2004)
-#define DEFAULTFONT_LATIN_FIXED ((USHORT)2005)
-#define DEFAULTFONT_CJK_TEXT ((USHORT)3000)
-#define DEFAULTFONT_CJK_PRESENTATION ((USHORT)3001)
-#define DEFAULTFONT_CJK_SPREADSHEET ((USHORT)3002)
-#define DEFAULTFONT_CJK_HEADING ((USHORT)3003)
-#define DEFAULTFONT_CJK_DISPLAY ((USHORT)3004)
-#define DEFAULTFONT_CTL_TEXT ((USHORT)4000)
-#define DEFAULTFONT_CTL_PRESENTATION ((USHORT)4001)
-#define DEFAULTFONT_CTL_SPREADSHEET ((USHORT)4002)
-#define DEFAULTFONT_CTL_HEADING ((USHORT)4003)
-#define DEFAULTFONT_CTL_DISPLAY ((USHORT)4004)
+#define DEFAULTFONT_SANS_UNICODE ((sal_uInt16)1)
+#define DEFAULTFONT_SANS ((sal_uInt16)2)
+#define DEFAULTFONT_SERIF ((sal_uInt16)3)
+#define DEFAULTFONT_FIXED ((sal_uInt16)4)
+#define DEFAULTFONT_SYMBOL ((sal_uInt16)5)
+#define DEFAULTFONT_UI_SANS ((sal_uInt16)1000)
+#define DEFAULTFONT_UI_FIXED ((sal_uInt16)1001)
+#define DEFAULTFONT_LATIN_TEXT ((sal_uInt16)2000)
+#define DEFAULTFONT_LATIN_PRESENTATION ((sal_uInt16)2001)
+#define DEFAULTFONT_LATIN_SPREADSHEET ((sal_uInt16)2002)
+#define DEFAULTFONT_LATIN_HEADING ((sal_uInt16)2003)
+#define DEFAULTFONT_LATIN_DISPLAY ((sal_uInt16)2004)
+#define DEFAULTFONT_LATIN_FIXED ((sal_uInt16)2005)
+#define DEFAULTFONT_CJK_TEXT ((sal_uInt16)3000)
+#define DEFAULTFONT_CJK_PRESENTATION ((sal_uInt16)3001)
+#define DEFAULTFONT_CJK_SPREADSHEET ((sal_uInt16)3002)
+#define DEFAULTFONT_CJK_HEADING ((sal_uInt16)3003)
+#define DEFAULTFONT_CJK_DISPLAY ((sal_uInt16)3004)
+#define DEFAULTFONT_CTL_TEXT ((sal_uInt16)4000)
+#define DEFAULTFONT_CTL_PRESENTATION ((sal_uInt16)4001)
+#define DEFAULTFONT_CTL_SPREADSHEET ((sal_uInt16)4002)
+#define DEFAULTFONT_CTL_HEADING ((sal_uInt16)4003)
+#define DEFAULTFONT_CTL_DISPLAY ((sal_uInt16)4004)
UNOTOOLS_DLLPUBLIC String GetNextFontToken( const String& rTokenStr, xub_StrLen& rIndex );
diff --git a/unotools/inc/unotools/intlwrapper.hxx b/unotools/inc/unotools/intlwrapper.hxx
index e35f4cc9268f..1ccc85b55037 100644
--- a/unotools/inc/unotools/intlwrapper.hxx
+++ b/unotools/inc/unotools/intlwrapper.hxx
@@ -69,7 +69,7 @@ private:
void ImplNewCharClass() const;
void ImplNewLocaleData() const;
void ImplNewCalendar() const;
- void ImplNewCollator( BOOL bCaseSensitive ) const;
+ void ImplNewCollator( sal_Bool bCaseSensitive ) const;
public:
@@ -108,14 +108,14 @@ public:
const CollatorWrapper* getCollator() const
{
if ( !pCollator )
- ImplNewCollator( FALSE );
+ ImplNewCollator( sal_False );
return pCollator;
}
/// case sensitive collator
const CollatorWrapper* getCaseCollator() const
{
if ( !pCaseCollator )
- ImplNewCollator( TRUE );
+ ImplNewCollator( sal_True );
return pCaseCollator;
}
};
diff --git a/unotools/inc/unotools/lingucfg.hxx b/unotools/inc/unotools/lingucfg.hxx
index 9a26bdd73021..affba64d9377 100755
--- a/unotools/inc/unotools/lingucfg.hxx
+++ b/unotools/inc/unotools/lingucfg.hxx
@@ -52,89 +52,89 @@ struct UNOTOOLS_DLLPUBLIC SvtLinguOptions
::com::sun::star::uno::Sequence< rtl::OUString > aActiveDics;
::com::sun::star::uno::Sequence< rtl::OUString > aActiveConvDics;
- BOOL bROActiveDics;
- BOOL bROActiveConvDics;
+ sal_Bool bROActiveDics;
+ sal_Bool bROActiveConvDics;
// Hyphenator service specific options
- INT16 nHyphMinLeading,
+ sal_Int16 nHyphMinLeading,
nHyphMinTrailing,
nHyphMinWordLength;
- BOOL bROHyphMinLeading,
+ sal_Bool bROHyphMinLeading,
bROHyphMinTrailing,
bROHyphMinWordLength;
// misc options (non-service specific)
- INT16 nDefaultLanguage;
- INT16 nDefaultLanguage_CJK;
- INT16 nDefaultLanguage_CTL;
+ sal_Int16 nDefaultLanguage;
+ sal_Int16 nDefaultLanguage_CJK;
+ sal_Int16 nDefaultLanguage_CTL;
- BOOL bRODefaultLanguage;
- BOOL bRODefaultLanguage_CJK;
- BOOL bRODefaultLanguage_CTL;
+ sal_Bool bRODefaultLanguage;
+ sal_Bool bRODefaultLanguage_CJK;
+ sal_Bool bRODefaultLanguage_CTL;
// spelling options (non-service specific)
- BOOL bIsSpellSpecial;
- BOOL bIsSpellAuto;
- BOOL bIsSpellReverse;
+ sal_Bool bIsSpellSpecial;
+ sal_Bool bIsSpellAuto;
+ sal_Bool bIsSpellReverse;
- BOOL bROIsSpellSpecial;
- BOOL bROIsSpellAuto;
- BOOL bROIsSpellReverse;
+ sal_Bool bROIsSpellSpecial;
+ sal_Bool bROIsSpellAuto;
+ sal_Bool bROIsSpellReverse;
// hyphenation options (non-service specific)
- BOOL bIsHyphSpecial;
- BOOL bIsHyphAuto;
+ sal_Bool bIsHyphSpecial;
+ sal_Bool bIsHyphAuto;
- BOOL bROIsHyphSpecial;
- BOOL bROIsHyphAuto;
+ sal_Bool bROIsHyphSpecial;
+ sal_Bool bROIsHyphAuto;
// common to SpellChecker, Hyphenator and Thesaurus service
- BOOL bIsUseDictionaryList;
- BOOL bIsIgnoreControlCharacters;
+ sal_Bool bIsUseDictionaryList;
+ sal_Bool bIsIgnoreControlCharacters;
- BOOL bROIsUseDictionaryList;
- BOOL bROIsIgnoreControlCharacters;
+ sal_Bool bROIsUseDictionaryList;
+ sal_Bool bROIsIgnoreControlCharacters;
// SpellChecker service specific options
- BOOL bIsSpellWithDigits,
+ sal_Bool bIsSpellWithDigits,
bIsSpellUpperCase,
bIsSpellCapitalization;
- BOOL bROIsSpellWithDigits,
+ sal_Bool bROIsSpellWithDigits,
bROIsSpellUpperCase,
bROIsSpellCapitalization;
// text conversion specific options
- BOOL bIsIgnorePostPositionalWord;
- BOOL bIsAutoCloseDialog;
- BOOL bIsShowEntriesRecentlyUsedFirst;
- BOOL bIsAutoReplaceUniqueEntries;
- BOOL bIsDirectionToSimplified;
- BOOL bIsUseCharacterVariants;
- BOOL bIsTranslateCommonTerms;
- BOOL bIsReverseMapping;
-
- BOOL bROIsIgnorePostPositionalWord;
- BOOL bROIsAutoCloseDialog;
- BOOL bROIsShowEntriesRecentlyUsedFirst;
- BOOL bROIsAutoReplaceUniqueEntries;
- BOOL bROIsDirectionToSimplified;
- BOOL bROIsUseCharacterVariants;
- BOOL bROIsTranslateCommonTerms;
- BOOL bROIsReverseMapping;
+ sal_Bool bIsIgnorePostPositionalWord;
+ sal_Bool bIsAutoCloseDialog;
+ sal_Bool bIsShowEntriesRecentlyUsedFirst;
+ sal_Bool bIsAutoReplaceUniqueEntries;
+ sal_Bool bIsDirectionToSimplified;
+ sal_Bool bIsUseCharacterVariants;
+ sal_Bool bIsTranslateCommonTerms;
+ sal_Bool bIsReverseMapping;
+
+ sal_Bool bROIsIgnorePostPositionalWord;
+ sal_Bool bROIsAutoCloseDialog;
+ sal_Bool bROIsShowEntriesRecentlyUsedFirst;
+ sal_Bool bROIsAutoReplaceUniqueEntries;
+ sal_Bool bROIsDirectionToSimplified;
+ sal_Bool bROIsUseCharacterVariants;
+ sal_Bool bROIsTranslateCommonTerms;
+ sal_Bool bROIsReverseMapping;
// check value need to determine if the configuration needs to updatet
// or not (used for a quick check if data files have been changed/added
// or deleted
- INT32 nDataFilesChangedCheckValue;
- BOOL bRODataFilesChangedCheckValue;
+ sal_Int32 nDataFilesChangedCheckValue;
+ sal_Bool bRODataFilesChangedCheckValue;
- BOOL bIsGrammarAuto;
- BOOL bIsGrammarInteractive;
+ sal_Bool bIsGrammarAuto;
+ sal_Bool bIsGrammarInteractive;
- BOOL bROIsGrammarAuto;
- BOOL bROIsGrammarInteractive;
+ sal_Bool bROIsGrammarAuto;
+ sal_Bool bROIsGrammarInteractive;
SvtLinguOptions();
};
@@ -196,29 +196,29 @@ public:
com::sun::star::uno::Any
GetProperty( const rtl::OUString &rPropertyName ) const;
com::sun::star::uno::Any
- GetProperty( INT32 nPropertyHandle ) const;
+ GetProperty( sal_Int32 nPropertyHandle ) const;
- BOOL SetProperty( const rtl::OUString &rPropertyName,
+ sal_Bool SetProperty( const rtl::OUString &rPropertyName,
const com::sun::star::uno::Any &rValue );
- BOOL SetProperty( INT32 nPropertyHandle,
+ sal_Bool SetProperty( sal_Int32 nPropertyHandle,
const com::sun::star::uno::Any &rValue );
- BOOL GetOptions( SvtLinguOptions &rOptions ) const;
- BOOL SetOptions( const SvtLinguOptions &rOptions );
+ sal_Bool GetOptions( SvtLinguOptions &rOptions ) const;
+ sal_Bool SetOptions( const SvtLinguOptions &rOptions );
- BOOL IsReadOnly( const rtl::OUString &rPropertyName ) const;
- BOOL IsReadOnly( INT32 nPropertyHandle ) const;
+ sal_Bool IsReadOnly( const rtl::OUString &rPropertyName ) const;
+ sal_Bool IsReadOnly( sal_Int32 nPropertyHandle ) const;
//!
//! the following functions work on the 'ServiceManager' sub node of the
//! linguistic configuration only
//!
- BOOL GetElementNamesFor( const rtl::OUString &rNodeName, com::sun::star::uno::Sequence< rtl::OUString > &rElementNames ) const;
+ sal_Bool GetElementNamesFor( const rtl::OUString &rNodeName, com::sun::star::uno::Sequence< rtl::OUString > &rElementNames ) const;
//
- BOOL GetSupportedDictionaryFormatsFor( const rtl::OUString &rSetName, const rtl::OUString &rSetEntry, com::sun::star::uno::Sequence< rtl::OUString > &rFormatList ) const;
+ sal_Bool GetSupportedDictionaryFormatsFor( const rtl::OUString &rSetName, const rtl::OUString &rSetEntry, com::sun::star::uno::Sequence< rtl::OUString > &rFormatList ) const;
void SetOrCreateSupportedDictionaryFormatsFor( const rtl::OUString &rSetName, const rtl::OUString &rSetEntry, const com::sun::star::uno::Sequence< rtl::OUString > &rFormatList ) const;
//
- BOOL GetDictionaryEntry( const rtl::OUString &rNodeName, SvtLinguConfigDictionaryEntry &rDicEntry ) const;
+ sal_Bool GetDictionaryEntry( const rtl::OUString &rNodeName, SvtLinguConfigDictionaryEntry &rDicEntry ) const;
void SetOrCreateDictionaryEntry( const rtl::OUString &rNodeName, const SvtLinguConfigDictionaryEntry &rDicEntry ) const;
//
com::sun::star::uno::Sequence< rtl::OUString > GetDisabledDictionaries() const;
diff --git a/unotools/inc/unotools/localedatawrapper.hxx b/unotools/inc/unotools/localedatawrapper.hxx
index fd09b07e58cb..0e815f61ccb6 100644
--- a/unotools/inc/unotools/localedatawrapper.hxx
+++ b/unotools/inc/unotools/localedatawrapper.hxx
@@ -65,7 +65,7 @@ enum MeasurementSystem {
class UNOTOOLS_DLLPUBLIC LocaleDataWrapper
{
- static BYTE nLocaleDataChecking; // 0:=dontknow, 1:=yes, 2:=no
+ static sal_uInt8 nLocaleDataChecking; // 0:=dontknow, 1:=yes, 2:=no
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xSMgr;
::com::sun::star::uno::Reference< ::com::sun::star::i18n::XLocaleData2 > xLD;
@@ -81,11 +81,11 @@ class UNOTOOLS_DLLPUBLIC LocaleDataWrapper
String aCurrBankSymbol;
int nDateFormat;
int nLongDateFormat;
- USHORT nCurrPositiveFormat;
- USHORT nCurrNegativeFormat;
- USHORT nCurrDigits;
- BOOL bLocaleDataItemValid;
- BOOL bReservedWordValid;
+ sal_uInt16 nCurrPositiveFormat;
+ sal_uInt16 nCurrNegativeFormat;
+ sal_uInt16 nCurrDigits;
+ sal_Bool bLocaleDataItemValid;
+ sal_Bool bReservedWordValid;
mutable ::utl::ReadWriteMutex aMutex;
// dummies, to be implemented or provided by XML locale data
@@ -119,8 +119,8 @@ class UNOTOOLS_DLLPUBLIC LocaleDataWrapper
void getDefaultCalendarImpl();
sal_Unicode* ImplAddFormatNum( sal_Unicode* pBuf,
- sal_Int64 nNumber, USHORT nDecimals,
- BOOL bUseThousandSep, BOOL bTrailingZeros ) const;
+ sal_Int64 nNumber, sal_uInt16 nDecimals,
+ sal_Bool bUseThousandSep, sal_Bool bTrailingZeros ) const;
void getDigitGroupingImpl();
@@ -242,19 +242,19 @@ public:
// currency
const String& getCurrSymbol() const;
const String& getCurrBankSymbol() const;
- USHORT getCurrPositiveFormat() const;
- USHORT getCurrNegativeFormat() const;
- USHORT getCurrDigits() const;
+ sal_uInt16 getCurrPositiveFormat() const;
+ sal_uInt16 getCurrNegativeFormat() const;
+ sal_uInt16 getCurrDigits() const;
// simple date and time formatting
DateFormat getDateFormat() const;
DateFormat getLongDateFormat() const;
/// only numerical values of Gregorian calendar
String getDate( const Date& rDate ) const;
- String getTime( const Time& rTime, BOOL bSec = TRUE,
- BOOL b100Sec = FALSE ) const;
+ String getTime( const Time& rTime, sal_Bool bSec = sal_True,
+ sal_Bool b100Sec = sal_False ) const;
String getDuration( const Time& rTime,
- BOOL bSec = TRUE, BOOL b100Sec = FALSE ) const;
+ sal_Bool bSec = sal_True, sal_Bool b100Sec = sal_False ) const;
/** The CalendarWrapper already <b>MUST</b>
have loaded a calendar.
@@ -283,37 +283,37 @@ public:
@param nNumber
value * 10**nDecimals
@param bTrailingZeros
- </TRUE> := always display trailing zeros in
+ </sal_True> := always display trailing zeros in
decimal places, even if integer value.
- </FALSE> := trailing zeros are only displayed
+ </sal_False> := trailing zeros are only displayed
if the value is not an integer value.
*/
- String getNum( sal_Int64 nNumber, USHORT nDecimals,
- BOOL bUseThousandSep = TRUE,
- BOOL bTrailingZeros = TRUE ) const;
+ String getNum( sal_Int64 nNumber, sal_uInt16 nDecimals,
+ sal_Bool bUseThousandSep = sal_True,
+ sal_Bool bTrailingZeros = sal_True ) const;
/// "Secure" currency formatted string.
- String getCurr( sal_Int64 nNumber, USHORT nDecimals,
+ String getCurr( sal_Int64 nNumber, sal_uInt16 nDecimals,
const String& rCurrencySymbol,
- BOOL bUseThousandSep = TRUE ) const;
+ sal_Bool bUseThousandSep = sal_True ) const;
/** Default currency formatted string, use with
care as default currency may change in any
locale, for example, DEM -> EUR */
- String getCurr( sal_Int64 nNumber, USHORT nDecimals,
- BOOL bUseThousandSep = TRUE ) const
+ String getCurr( sal_Int64 nNumber, sal_uInt16 nDecimals,
+ sal_Bool bUseThousandSep = sal_True ) const
{ return getCurr( nNumber, nDecimals,
getCurrSymbol(), bUseThousandSep ); }
// dummy returns, to be implemented
inline sal_Unicode getCurrZeroChar() const
{ return cCurrZeroChar; }
- inline BOOL isNumLeadingZero() const
- { return TRUE; }
+ inline sal_Bool isNumLeadingZero() const
+ { return sal_True; }
/// standard decimal places
- inline USHORT getNumDigits() const
+ inline sal_uInt16 getNumDigits() const
{ return 2; }
- inline BOOL isNumTrailingZeros() const
- { return TRUE; }
+ inline sal_Bool isNumTrailingZeros() const
+ { return sal_True; }
// reserved words
diff --git a/unotools/inc/unotools/misccfg.hxx b/unotools/inc/unotools/misccfg.hxx
index 01b8db21138f..9751e494e9a1 100644
--- a/unotools/inc/unotools/misccfg.hxx
+++ b/unotools/inc/unotools/misccfg.hxx
@@ -46,14 +46,14 @@ public:
MiscCfg( );
virtual ~MiscCfg( );
- BOOL IsNotFoundWarning() const;
- void SetNotFoundWarning( BOOL bSet);
+ sal_Bool IsNotFoundWarning() const;
+ void SetNotFoundWarning( sal_Bool bSet);
- BOOL IsPaperSizeWarning() const;
- void SetPaperSizeWarning(BOOL bSet);
+ sal_Bool IsPaperSizeWarning() const;
+ void SetPaperSizeWarning(sal_Bool bSet);
- BOOL IsPaperOrientationWarning() const;
- void SetPaperOrientationWarning( BOOL bSet);
+ sal_Bool IsPaperOrientationWarning() const;
+ void SetPaperOrientationWarning( sal_Bool bSet);
// 0 ... 99
sal_Int32 GetYear2000() const;
diff --git a/unotools/inc/unotools/pathoptions.hxx b/unotools/inc/unotools/pathoptions.hxx
index 4d94c93cca4a..1308c2d181e2 100644
--- a/unotools/inc/unotools/pathoptions.hxx
+++ b/unotools/inc/unotools/pathoptions.hxx
@@ -101,7 +101,7 @@ public:
const String& GetUIConfigPath() const;
const String& GetFingerprintPath() const;
- BOOL IsPathReadonly(Pathes ePath)const;
+ sal_Bool IsPathReadonly(Pathes ePath)const;
const String& GetPath(Pathes ePath) const;
// set the pathes
@@ -129,8 +129,9 @@ public:
void SetWorkPath( const String& rPath );
void SetPath( SvtPathOptions::Pathes ePath, const String& rNewPath );
- String SubstituteVariable( const String& rVar );
- String UseVariable( const String& rVar );
+ String SubstituteVariable( const String& rVar ) const;
+ String ExpandMacros( const String& rPath ) const;
+ String UseVariable( const String& rVar ) const;
sal_Bool SearchFile( String& rIniFile, Pathes ePath = PATH_USERCONFIG );
::com::sun::star::lang::Locale GetLocale() const;
sal_Bool IsReadonly() const;
diff --git a/unotools/inc/unotools/searchopt.hxx b/unotools/inc/unotools/searchopt.hxx
index ed4110011df7..ab9941da6507 100644
--- a/unotools/inc/unotools/searchopt.hxx
+++ b/unotools/inc/unotools/searchopt.hxx
@@ -47,71 +47,71 @@ public:
SvtSearchOptions();
~SvtSearchOptions();
- INT32 GetTransliterationFlags() const;
+ sal_Int32 GetTransliterationFlags() const;
//
// General Options
//
- BOOL IsWholeWordsOnly() const;
- BOOL IsBackwards() const;
- BOOL IsUseRegularExpression() const;
- BOOL IsSearchForStyles() const;
- BOOL IsSimilaritySearch() const;
- BOOL IsUseAsianOptions() const;
- BOOL IsMatchCase() const; // also Japanese search option
- BOOL IsNotes() const;
-
- void SetWholeWordsOnly( BOOL bVal );
- void SetBackwards( BOOL bVal );
- void SetUseRegularExpression( BOOL bVal );
- void SetSearchForStyles( BOOL bVal );
- void SetSimilaritySearch( BOOL bVal );
- void SetUseAsianOptions( BOOL bVal );
- void SetMatchCase( BOOL bVal ); // also Japanese search option
- void SetNotes( BOOL bVal);
+ sal_Bool IsWholeWordsOnly() const;
+ sal_Bool IsBackwards() const;
+ sal_Bool IsUseRegularExpression() const;
+ sal_Bool IsSearchForStyles() const;
+ sal_Bool IsSimilaritySearch() const;
+ sal_Bool IsUseAsianOptions() const;
+ sal_Bool IsMatchCase() const; // also Japanese search option
+ sal_Bool IsNotes() const;
+
+ void SetWholeWordsOnly( sal_Bool bVal );
+ void SetBackwards( sal_Bool bVal );
+ void SetUseRegularExpression( sal_Bool bVal );
+ void SetSearchForStyles( sal_Bool bVal );
+ void SetSimilaritySearch( sal_Bool bVal );
+ void SetUseAsianOptions( sal_Bool bVal );
+ void SetMatchCase( sal_Bool bVal ); // also Japanese search option
+ void SetNotes( sal_Bool bVal);
//
// Japanese search options
//
- BOOL IsMatchFullHalfWidthForms() const;
- BOOL IsMatchHiraganaKatakana() const;
- BOOL IsMatchContractions() const;
- BOOL IsMatchMinusDashChoon() const;
- BOOL IsMatchRepeatCharMarks() const;
- BOOL IsMatchVariantFormKanji() const;
- BOOL IsMatchOldKanaForms() const;
- BOOL IsMatchDiziDuzu() const;
- BOOL IsMatchBavaHafa() const;
- BOOL IsMatchTsithichiDhizi() const;
- BOOL IsMatchHyuiyuByuvyu() const;
- BOOL IsMatchSesheZeje() const;
- BOOL IsMatchIaiya() const;
- BOOL IsMatchKiku() const;
- BOOL IsIgnorePunctuation() const;
- BOOL IsIgnoreWhitespace() const;
- BOOL IsIgnoreProlongedSoundMark() const;
- BOOL IsIgnoreMiddleDot() const;
-
- void SetMatchFullHalfWidthForms( BOOL bVal );
- void SetMatchHiraganaKatakana( BOOL bVal );
- void SetMatchContractions( BOOL bVal );
- void SetMatchMinusDashChoon( BOOL bVal );
- void SetMatchRepeatCharMarks( BOOL bVal );
- void SetMatchVariantFormKanji( BOOL bVal );
- void SetMatchOldKanaForms( BOOL bVal );
- void SetMatchDiziDuzu( BOOL bVal );
- void SetMatchBavaHafa( BOOL bVal );
- void SetMatchTsithichiDhizi( BOOL bVal );
- void SetMatchHyuiyuByuvyu( BOOL bVal );
- void SetMatchSesheZeje( BOOL bVal );
- void SetMatchIaiya( BOOL bVal );
- void SetMatchKiku( BOOL bVal );
- void SetIgnorePunctuation( BOOL bVal );
- void SetIgnoreWhitespace( BOOL bVal );
- void SetIgnoreProlongedSoundMark( BOOL bVal );
- void SetIgnoreMiddleDot( BOOL bVal );
+ sal_Bool IsMatchFullHalfWidthForms() const;
+ sal_Bool IsMatchHiraganaKatakana() const;
+ sal_Bool IsMatchContractions() const;
+ sal_Bool IsMatchMinusDashChoon() const;
+ sal_Bool IsMatchRepeatCharMarks() const;
+ sal_Bool IsMatchVariantFormKanji() const;
+ sal_Bool IsMatchOldKanaForms() const;
+ sal_Bool IsMatchDiziDuzu() const;
+ sal_Bool IsMatchBavaHafa() const;
+ sal_Bool IsMatchTsithichiDhizi() const;
+ sal_Bool IsMatchHyuiyuByuvyu() const;
+ sal_Bool IsMatchSesheZeje() const;
+ sal_Bool IsMatchIaiya() const;
+ sal_Bool IsMatchKiku() const;
+ sal_Bool IsIgnorePunctuation() const;
+ sal_Bool IsIgnoreWhitespace() const;
+ sal_Bool IsIgnoreProlongedSoundMark() const;
+ sal_Bool IsIgnoreMiddleDot() const;
+
+ void SetMatchFullHalfWidthForms( sal_Bool bVal );
+ void SetMatchHiraganaKatakana( sal_Bool bVal );
+ void SetMatchContractions( sal_Bool bVal );
+ void SetMatchMinusDashChoon( sal_Bool bVal );
+ void SetMatchRepeatCharMarks( sal_Bool bVal );
+ void SetMatchVariantFormKanji( sal_Bool bVal );
+ void SetMatchOldKanaForms( sal_Bool bVal );
+ void SetMatchDiziDuzu( sal_Bool bVal );
+ void SetMatchBavaHafa( sal_Bool bVal );
+ void SetMatchTsithichiDhizi( sal_Bool bVal );
+ void SetMatchHyuiyuByuvyu( sal_Bool bVal );
+ void SetMatchSesheZeje( sal_Bool bVal );
+ void SetMatchIaiya( sal_Bool bVal );
+ void SetMatchKiku( sal_Bool bVal );
+ void SetIgnorePunctuation( sal_Bool bVal );
+ void SetIgnoreWhitespace( sal_Bool bVal );
+ void SetIgnoreProlongedSoundMark( sal_Bool bVal );
+ void SetIgnoreMiddleDot( sal_Bool bVal );
};
diff --git a/unotools/inc/unotools/syslocaleoptions.hxx b/unotools/inc/unotools/syslocaleoptions.hxx
index 63e271f1c435..3bd719e10460 100644..100755
--- a/unotools/inc/unotools/syslocaleoptions.hxx
+++ b/unotools/inc/unotools/syslocaleoptions.hxx
@@ -38,10 +38,10 @@
#include <unotools/options.hxx>
// bits for broadcasting hints of changes in a SfxSimpleHint, may be combined
-const ULONG SYSLOCALEOPTIONS_HINT_LOCALE = 0x00000001;
-const ULONG SYSLOCALEOPTIONS_HINT_CURRENCY = 0x00000002;
-const ULONG SYSLOCALEOPTIONS_HINT_UILOCALE = 0x00000004;
-const ULONG SYSLOCALEOPTIONS_HINT_DECSEP = 0x00000008;
+const sal_uLong SYSLOCALEOPTIONS_HINT_LOCALE = 0x00000001;
+const sal_uLong SYSLOCALEOPTIONS_HINT_CURRENCY = 0x00000002;
+const sal_uLong SYSLOCALEOPTIONS_HINT_UILOCALE = 0x00000004;
+const sal_uLong SYSLOCALEOPTIONS_HINT_DECSEP = 0x00000008;
class SvtSysLocaleOptions_Impl;
class SvtListener;
@@ -92,8 +92,8 @@ public:
@ATTENTION
All SvtSysLocaleOptions instances point to exactly one refcounted
internal representation instance and broadcast blocks are counted.
- Thus if you issue a BlockBroadcasts(TRUE) you MUST issue a matching
- BlockBroadcasts(FALSE) or otherwise pending hints would never be
+ Thus if you issue a BlockBroadcasts(sal_True) you MUST issue a matching
+ BlockBroadcasts(sal_False) or otherwise pending hints would never be
broadcasted again.
*/
virtual void BlockBroadcasts( bool bBlock );
diff --git a/unotools/inc/unotools/textsearch.hxx b/unotools/inc/unotools/textsearch.hxx
index e4cd095fcc14..39b201cc672e 100644
--- a/unotools/inc/unotools/textsearch.hxx
+++ b/unotools/inc/unotools/textsearch.hxx
@@ -81,9 +81,9 @@ private:
public:
SearchParam( const String &rText,
SearchType eSrchType = SearchParam::SRCH_NORMAL,
- BOOL bCaseSens = TRUE,
- BOOL bWrdOnly = FALSE,
- BOOL bSrchInSel = FALSE );
+ sal_Bool bCaseSens = sal_True,
+ sal_Bool bWrdOnly = sal_False,
+ sal_Bool bSrchInSel = sal_False );
SearchParam( const SearchParam& );
const String& GetSrchStr() const { return sSrchStr; }
@@ -127,15 +127,6 @@ public:
class UNOTOOLS_DLLPUBLIC TextSearch
{
- struct CachedTextSearch
- {
- ::osl::Mutex mutex;
- ::com::sun::star::util::SearchOptions Options;
- ::com::sun::star::uno::Reference< ::com::sun::star::util::XTextSearch > xTextSearch;
- };
-
- static CachedTextSearch maCache;
-
static ::com::sun::star::uno::Reference< ::com::sun::star::util::XTextSearch >
getXTextSearch( const ::com::sun::star::util::SearchOptions& rPara );
@@ -159,14 +150,14 @@ public:
pStart - start position for the search
pEnde - end position for the search
- RETURN values == TRUE: something is found
+ RETURN values == sal_True: something is found
- pStart start pos of the found text,
- pStart end pos of the found text,
- pSrchResult - the search result with all found
positions. Is only filled with more positions
if the regular expression handles groups.
- == FALSE: nothing found, pStart,pEnde unchanged.
+ == sal_False: nothing found, pStart,pEnde unchanged.
Definitions: start pos always inclusive, end pos always exclusive!
The position must always in the right direction!
diff --git a/unotools/inc/unotools/ucbhelper.hxx b/unotools/inc/unotools/ucbhelper.hxx
index 38b355439c2b..a24d132ae793 100644
--- a/unotools/inc/unotools/ucbhelper.hxx
+++ b/unotools/inc/unotools/ucbhelper.hxx
@@ -73,12 +73,12 @@ namespace utl
sal_Bool bNewOnly = sal_False );
static sal_Bool HasParentFolder( const String& rFolder );
- static ULONG GetSize( const String& rContent );
+ static sal_uLong GetSize( const String& rContent );
static sal_Bool IsYounger( const String& rIsYoung, const String& rIsOlder );
static sal_Bool Exists( const String& rContent );
- static sal_Bool FindInPath( const String& rPath, const String& rName, String& rFile, char cDelim = ';', BOOL bAllowWildCards = TRUE );
- static sal_Bool Find( const String& rFolder, const String& rName, String& rFile, BOOL bAllowWildCards = FALSE );
+ static sal_Bool FindInPath( const String& rPath, const String& rName, String& rFile, char cDelim = ';', sal_Bool bAllowWildCards = sal_True );
+ static sal_Bool Find( const String& rFolder, const String& rName, String& rFile, sal_Bool bAllowWildCards = sal_False );
static sal_Bool IsSubPath( const ::rtl::OUString& rPath, const ::rtl::OUString& rChildCandidate, const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContentProvider >& xContentProvider = ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContentProvider >() );
static sal_Bool EqualURLs( const ::rtl::OUString& aFirstURL, const ::rtl::OUString& aSecondURL );
};
diff --git a/unotools/inc/unotools/ucblockbytes.hxx b/unotools/inc/unotools/ucblockbytes.hxx
index 2ba0a683745a..bb77b2d67cc2 100644
--- a/unotools/inc/unotools/ucblockbytes.hxx
+++ b/unotools/inc/unotools/ucblockbytes.hxx
@@ -90,7 +90,7 @@ public:
{}
virtual void Handle( LoadHandlerItem nWhich, UcbLockBytesRef xLockBytes ) = 0;
- void Activate( BOOL bActivate = sal_True ) { m_bActive = bActivate; }
+ void Activate( sal_Bool bActivate = sal_True ) { m_bActive = bActivate; }
sal_Bool IsActive() const { return m_bActive; }
};
@@ -151,11 +151,11 @@ public:
static UcbLockBytesRef CreateLockBytes( const NS_UNO::Reference < NS_IO::XStream >& xContent );
// SvLockBytes
- virtual void SetSynchronMode (BOOL bSynchron);
- virtual ErrCode ReadAt ( ULONG nPos, void *pBuffer, ULONG nCount, ULONG *pRead) const;
- virtual ErrCode WriteAt ( ULONG, const void*, ULONG, ULONG *pWritten);
+ virtual void SetSynchronMode (sal_Bool bSynchron);
+ virtual ErrCode ReadAt ( sal_uLong nPos, void *pBuffer, sal_uLong nCount, sal_uLong *pRead) const;
+ virtual ErrCode WriteAt ( sal_uLong, const void*, sal_uLong, sal_uLong *pWritten);
virtual ErrCode Flush (void) const;
- virtual ErrCode SetSize (ULONG);
+ virtual ErrCode SetSize (sal_uLong);
virtual ErrCode Stat ( SvLockBytesStat *pStat, SvLockBytesStatFlag) const;
void SetError( ErrCode nError )
diff --git a/unotools/inc/unotools/unotunnelhelper.hxx b/unotools/inc/unotools/unotunnelhelper.hxx
index ec4f1243f4d9..1054249de54b 100644
--- a/unotools/inc/unotools/unotunnelhelper.hxx
+++ b/unotools/inc/unotools/unotunnelhelper.hxx
@@ -33,10 +33,7 @@
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <rtl/uuid.h>
#include <rtl/memory.h>
-
-#ifndef _CPPUHELPER_EXTRACT_HXX_
-#include <cppuhelper/extract.hxx>
-#endif
+#include <comphelper/extract.hxx>
namespace utl
{
diff --git a/unotools/inc/unotools/useroptions.hxx b/unotools/inc/unotools/useroptions.hxx
index 020ddd657eaf..0eca30fe3075 100644
--- a/unotools/inc/unotools/useroptions.hxx
+++ b/unotools/inc/unotools/useroptions.hxx
@@ -35,23 +35,23 @@
// define ----------------------------------------------------------------
-#define USER_OPT_CITY ((USHORT)0)
-#define USER_OPT_COMPANY ((USHORT)1)
-#define USER_OPT_COUNTRY ((USHORT)2)
-#define USER_OPT_EMAIL ((USHORT)3)
-#define USER_OPT_FAX ((USHORT)4)
-#define USER_OPT_FIRSTNAME ((USHORT)5)
-#define USER_OPT_LASTNAME ((USHORT)6)
-#define USER_OPT_POSITION ((USHORT)7)
-#define USER_OPT_STATE ((USHORT)8)
-#define USER_OPT_STREET ((USHORT)9)
-#define USER_OPT_TELEPHONEHOME ((USHORT)10)
-#define USER_OPT_TELEPHONEWORK ((USHORT)11)
-#define USER_OPT_TITLE ((USHORT)12)
-#define USER_OPT_ID ((USHORT)13)
-#define USER_OPT_ZIP ((USHORT)14)
-#define USER_OPT_FATHERSNAME ((USHORT)15)
-#define USER_OPT_APARTMENT ((USHORT)16)
+#define USER_OPT_CITY ((sal_uInt16)0)
+#define USER_OPT_COMPANY ((sal_uInt16)1)
+#define USER_OPT_COUNTRY ((sal_uInt16)2)
+#define USER_OPT_EMAIL ((sal_uInt16)3)
+#define USER_OPT_FAX ((sal_uInt16)4)
+#define USER_OPT_FIRSTNAME ((sal_uInt16)5)
+#define USER_OPT_LASTNAME ((sal_uInt16)6)
+#define USER_OPT_POSITION ((sal_uInt16)7)
+#define USER_OPT_STATE ((sal_uInt16)8)
+#define USER_OPT_STREET ((sal_uInt16)9)
+#define USER_OPT_TELEPHONEHOME ((sal_uInt16)10)
+#define USER_OPT_TELEPHONEWORK ((sal_uInt16)11)
+#define USER_OPT_TITLE ((sal_uInt16)12)
+#define USER_OPT_ID ((sal_uInt16)13)
+#define USER_OPT_ZIP ((sal_uInt16)14)
+#define USER_OPT_FATHERSNAME ((sal_uInt16)15)
+#define USER_OPT_APARTMENT ((sal_uInt16)16)
// class SvtUserOptions --------------------------------------------------
@@ -111,8 +111,8 @@ public:
void SetFathersName( const ::rtl::OUString& rNewToken );
void SetApartment( const ::rtl::OUString& rNewToken );
- sal_Bool IsTokenReadonly( USHORT nToken ) const;
- ::rtl::OUString GetToken(USHORT nToken) const;
+ sal_Bool IsTokenReadonly( sal_uInt16 nToken ) const;
+ ::rtl::OUString GetToken(sal_uInt16 nToken) const;
};
#endif // #ifndef INCLUDED_unotools_USEROPTIONS_HXX
diff --git a/unotools/source/config/accelcfg.cxx b/unotools/source/config/accelcfg.cxx
index fc0e6108138b..d3f26de35304 100644
--- a/unotools/source/config/accelcfg.cxx
+++ b/unotools/source/config/accelcfg.cxx
@@ -71,7 +71,7 @@ public:
bool bModified;
SvtAcceleratorConfig_Impl()
- : bModified( FALSE )
+ : bModified( sal_False )
{}
SvtAcceleratorConfig_Impl( Reference< XInputStream >& xInputStream );
diff --git a/unotools/source/config/defaultoptions.cxx b/unotools/source/config/defaultoptions.cxx
index 1567bd1b841d..7bd4b566e928 100644
--- a/unotools/source/config/defaultoptions.cxx
+++ b/unotools/source/config/defaultoptions.cxx
@@ -107,7 +107,7 @@ public:
SvtDefaultOptions_Impl();
- String GetDefaultPath( USHORT nId ) const;
+ String GetDefaultPath( sal_uInt16 nId ) const;
virtual void Commit();
virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames);
};
@@ -200,10 +200,10 @@ void SvtDefaultOptions_Impl::Commit()
// class SvtDefaultOptions_Impl ------------------------------------------
-String SvtDefaultOptions_Impl::GetDefaultPath( USHORT nId ) const
+String SvtDefaultOptions_Impl::GetDefaultPath( sal_uInt16 nId ) const
{
String aRet;
- USHORT nIdx = 0;
+ sal_uInt16 nIdx = 0;
while ( PathMap_Impl[nIdx]._ePath <= SvtPathOptions::PATH_WORK )
{
@@ -356,7 +356,7 @@ SvtDefaultOptions::~SvtDefaultOptions()
// -----------------------------------------------------------------------
-String SvtDefaultOptions::GetDefaultPath( USHORT nId ) const
+String SvtDefaultOptions::GetDefaultPath( sal_uInt16 nId ) const
{
return pImp->GetDefaultPath( nId );
}
diff --git a/unotools/source/config/fltrcfg.cxx b/unotools/source/config/fltrcfg.cxx
index 94f7ff07d7d7..f16f6ed9cfca 100644
--- a/unotools/source/config/fltrcfg.cxx
+++ b/unotools/source/config/fltrcfg.cxx
@@ -200,7 +200,7 @@ void SvtCalcFilterOptions_Impl::Load()
---------------------------------------------------------------------------*/
struct SvtFilterOptions_Impl
{
- ULONG nFlags;
+ sal_uLong nFlags;
SvtAppFilterOptions_Impl aWriterCfg;
SvtCalcFilterOptions_Impl aCalcCfg;
SvtAppFilterOptions_Impl aImpressCfg;
@@ -228,8 +228,8 @@ struct SvtFilterOptions_Impl
Load();
}
- void SetFlag( ULONG nFlag, BOOL bSet );
- BOOL IsFlag( ULONG nFlag ) const;
+ void SetFlag( sal_uLong nFlag, sal_Bool bSet );
+ sal_Bool IsFlag( sal_uLong nFlag ) const;
void Load()
{
aWriterCfg.Load();
@@ -240,7 +240,7 @@ struct SvtFilterOptions_Impl
/* -----------------------------22.01.01 10:34--------------------------------
---------------------------------------------------------------------------*/
-void SvtFilterOptions_Impl::SetFlag( ULONG nFlag, BOOL bSet )
+void SvtFilterOptions_Impl::SetFlag( sal_uLong nFlag, sal_Bool bSet )
{
switch(nFlag)
{
@@ -261,9 +261,9 @@ void SvtFilterOptions_Impl::SetFlag( ULONG nFlag, BOOL bSet )
/* -----------------------------22.01.01 10:35--------------------------------
---------------------------------------------------------------------------*/
-BOOL SvtFilterOptions_Impl::IsFlag( ULONG nFlag ) const
+sal_Bool SvtFilterOptions_Impl::IsFlag( sal_uLong nFlag ) const
{
- BOOL bRet;
+ sal_Bool bRet;
switch(nFlag)
{
case FILTERCFG_WORD_CODE : bRet = aWriterCfg.IsLoad();break;
@@ -326,9 +326,9 @@ const Sequence<OUString>& SvtFilterOptions::GetPropertyNames()
return aNames;
}
//-----------------------------------------------------------------------
-static ULONG lcl_GetFlag(sal_Int32 nProp)
+static sal_uLong lcl_GetFlag(sal_Int32 nProp)
{
- ULONG nFlag = 0;
+ sal_uLong nFlag = 0;
switch(nProp)
{
case 0: nFlag = FILTERCFG_MATH_LOAD; break;
@@ -367,7 +367,7 @@ void SvtFilterOptions::Commit()
const Type& rType = ::getBooleanCppuType();
for(int nProp = 0; nProp < aNames.getLength(); nProp++)
{
- ULONG nFlag = lcl_GetFlag(nProp);
+ sal_uLong nFlag = lcl_GetFlag(nProp);
sal_Bool bVal = pImp->IsFlag( nFlag);
pValues[nProp].setValue(&bVal, rType);
@@ -391,7 +391,7 @@ void SvtFilterOptions::Load()
if(pValues[nProp].hasValue())
{
sal_Bool bVal = *(sal_Bool*)pValues[nProp].getValue();
- ULONG nFlag = lcl_GetFlag(nProp);
+ sal_uLong nFlag = lcl_GetFlag(nProp);
pImp->SetFlag( nFlag, bVal);
}
}
@@ -399,106 +399,106 @@ void SvtFilterOptions::Load()
}
// -----------------------------------------------------------------------
-void SvtFilterOptions::SetLoadWordBasicCode( BOOL bFlag )
+void SvtFilterOptions::SetLoadWordBasicCode( sal_Bool bFlag )
{
pImp->SetFlag( FILTERCFG_WORD_CODE, bFlag );
SetModified();
}
-BOOL SvtFilterOptions::IsLoadWordBasicCode() const
+sal_Bool SvtFilterOptions::IsLoadWordBasicCode() const
{
return pImp->IsFlag( FILTERCFG_WORD_CODE );
}
-void SvtFilterOptions::SetLoadWordBasicStorage( BOOL bFlag )
+void SvtFilterOptions::SetLoadWordBasicStorage( sal_Bool bFlag )
{
pImp->SetFlag( FILTERCFG_WORD_STORAGE, bFlag );
SetModified();
}
-BOOL SvtFilterOptions::IsLoadWordBasicStorage() const
+sal_Bool SvtFilterOptions::IsLoadWordBasicStorage() const
{
return pImp->IsFlag( FILTERCFG_WORD_STORAGE );
}
// -----------------------------------------------------------------------
-void SvtFilterOptions::SetLoadExcelBasicCode( BOOL bFlag )
+void SvtFilterOptions::SetLoadExcelBasicCode( sal_Bool bFlag )
{
pImp->SetFlag( FILTERCFG_EXCEL_CODE, bFlag );
SetModified();
}
-BOOL SvtFilterOptions::IsLoadExcelBasicCode() const
+sal_Bool SvtFilterOptions::IsLoadExcelBasicCode() const
{
return pImp->IsFlag( FILTERCFG_EXCEL_CODE );
}
-void SvtFilterOptions::SetLoadExcelBasicExecutable( BOOL bFlag )
+void SvtFilterOptions::SetLoadExcelBasicExecutable( sal_Bool bFlag )
{
pImp->SetFlag( FILTERCFG_EXCEL_EXECTBL, bFlag );
SetModified();
}
-BOOL SvtFilterOptions::IsLoadExcelBasicExecutable() const
+sal_Bool SvtFilterOptions::IsLoadExcelBasicExecutable() const
{
return pImp->IsFlag( FILTERCFG_EXCEL_EXECTBL );
}
-void SvtFilterOptions::SetLoadExcelBasicStorage( BOOL bFlag )
+void SvtFilterOptions::SetLoadExcelBasicStorage( sal_Bool bFlag )
{
pImp->SetFlag( FILTERCFG_EXCEL_STORAGE, bFlag );
SetModified();
}
-BOOL SvtFilterOptions::IsLoadExcelBasicStorage() const
+sal_Bool SvtFilterOptions::IsLoadExcelBasicStorage() const
{
return pImp->IsFlag( FILTERCFG_EXCEL_STORAGE );
}
// -----------------------------------------------------------------------
-void SvtFilterOptions::SetLoadPPointBasicCode( BOOL bFlag )
+void SvtFilterOptions::SetLoadPPointBasicCode( sal_Bool bFlag )
{
pImp->SetFlag( FILTERCFG_PPOINT_CODE, bFlag );
SetModified();
}
-BOOL SvtFilterOptions::IsLoadPPointBasicCode() const
+sal_Bool SvtFilterOptions::IsLoadPPointBasicCode() const
{
return pImp->IsFlag( FILTERCFG_PPOINT_CODE );
}
-void SvtFilterOptions::SetLoadPPointBasicStorage( BOOL bFlag )
+void SvtFilterOptions::SetLoadPPointBasicStorage( sal_Bool bFlag )
{
pImp->SetFlag( FILTERCFG_PPOINT_STORAGE, bFlag );
SetModified();
}
-BOOL SvtFilterOptions::IsLoadPPointBasicStorage() const
+sal_Bool SvtFilterOptions::IsLoadPPointBasicStorage() const
{
return pImp->IsFlag( FILTERCFG_PPOINT_STORAGE );
}
// -----------------------------------------------------------------------
-BOOL SvtFilterOptions::IsMathType2Math() const
+sal_Bool SvtFilterOptions::IsMathType2Math() const
{
return pImp->IsFlag( FILTERCFG_MATH_LOAD );
}
-void SvtFilterOptions::SetMathType2Math( BOOL bFlag )
+void SvtFilterOptions::SetMathType2Math( sal_Bool bFlag )
{
pImp->SetFlag( FILTERCFG_MATH_LOAD, bFlag );
SetModified();
}
-BOOL SvtFilterOptions::IsMath2MathType() const
+sal_Bool SvtFilterOptions::IsMath2MathType() const
{
return pImp->IsFlag( FILTERCFG_MATH_SAVE );
}
-void SvtFilterOptions::SetMath2MathType( BOOL bFlag )
+void SvtFilterOptions::SetMath2MathType( sal_Bool bFlag )
{
pImp->SetFlag( FILTERCFG_MATH_SAVE, bFlag );
SetModified();
@@ -506,58 +506,58 @@ void SvtFilterOptions::SetMath2MathType( BOOL bFlag )
// -----------------------------------------------------------------------
-BOOL SvtFilterOptions::IsWinWord2Writer() const
+sal_Bool SvtFilterOptions::IsWinWord2Writer() const
{
return pImp->IsFlag( FILTERCFG_WRITER_LOAD );
}
-void SvtFilterOptions::SetWinWord2Writer( BOOL bFlag )
+void SvtFilterOptions::SetWinWord2Writer( sal_Bool bFlag )
{
pImp->SetFlag( FILTERCFG_WRITER_LOAD, bFlag );
SetModified();
}
-BOOL SvtFilterOptions::IsWriter2WinWord() const
+sal_Bool SvtFilterOptions::IsWriter2WinWord() const
{
return pImp->IsFlag( FILTERCFG_WRITER_SAVE );
}
-void SvtFilterOptions::SetWriter2WinWord( BOOL bFlag )
+void SvtFilterOptions::SetWriter2WinWord( sal_Bool bFlag )
{
pImp->SetFlag( FILTERCFG_WRITER_SAVE, bFlag );
SetModified();
}
-BOOL SvtFilterOptions::IsUseEnhancedFields() const
+sal_Bool SvtFilterOptions::IsUseEnhancedFields() const
{
return false; // disable for now;
// return pImp->IsFlag( FILTERCFG_USE_ENHANCED_FIELDS );
}
-void SvtFilterOptions::SetUseEnhancedFields( BOOL bFlag )
+void SvtFilterOptions::SetUseEnhancedFields( sal_Bool bFlag )
{
pImp->SetFlag( FILTERCFG_USE_ENHANCED_FIELDS, bFlag );
SetModified();
}
// -----------------------------------------------------------------------
-BOOL SvtFilterOptions::IsExcel2Calc() const
+sal_Bool SvtFilterOptions::IsExcel2Calc() const
{
return pImp->IsFlag( FILTERCFG_CALC_LOAD );
}
-void SvtFilterOptions::SetExcel2Calc( BOOL bFlag )
+void SvtFilterOptions::SetExcel2Calc( sal_Bool bFlag )
{
pImp->SetFlag( FILTERCFG_CALC_LOAD, bFlag );
SetModified();
}
-BOOL SvtFilterOptions::IsCalc2Excel() const
+sal_Bool SvtFilterOptions::IsCalc2Excel() const
{
return pImp->IsFlag( FILTERCFG_CALC_SAVE );
}
-void SvtFilterOptions::SetCalc2Excel( BOOL bFlag )
+void SvtFilterOptions::SetCalc2Excel( sal_Bool bFlag )
{
pImp->SetFlag( FILTERCFG_CALC_SAVE, bFlag );
SetModified();
@@ -565,23 +565,23 @@ void SvtFilterOptions::SetCalc2Excel( BOOL bFlag )
// -----------------------------------------------------------------------
-BOOL SvtFilterOptions::IsPowerPoint2Impress() const
+sal_Bool SvtFilterOptions::IsPowerPoint2Impress() const
{
return pImp->IsFlag( FILTERCFG_IMPRESS_LOAD );
}
-void SvtFilterOptions::SetPowerPoint2Impress( BOOL bFlag )
+void SvtFilterOptions::SetPowerPoint2Impress( sal_Bool bFlag )
{
pImp->SetFlag( FILTERCFG_IMPRESS_LOAD, bFlag );
SetModified();
}
-BOOL SvtFilterOptions::IsImpress2PowerPoint() const
+sal_Bool SvtFilterOptions::IsImpress2PowerPoint() const
{
return pImp->IsFlag( FILTERCFG_IMPRESS_SAVE );
}
-void SvtFilterOptions::SetImpress2PowerPoint( BOOL bFlag )
+void SvtFilterOptions::SetImpress2PowerPoint( sal_Bool bFlag )
{
pImp->SetFlag( FILTERCFG_IMPRESS_SAVE, bFlag );
SetModified();
@@ -596,19 +596,19 @@ SvtFilterOptions* SvtFilterOptions::Get()
// -----------------------------------------------------------------------
-BOOL SvtFilterOptions::IsEnablePPTPreview() const
+sal_Bool SvtFilterOptions::IsEnablePPTPreview() const
{
return pImp->IsFlag( FILTERCFG_ENABLE_PPT_PREVIEW );
}
-BOOL SvtFilterOptions::IsEnableCalcPreview() const
+sal_Bool SvtFilterOptions::IsEnableCalcPreview() const
{
return pImp->IsFlag( FILTERCFG_ENABLE_EXCEL_PREVIEW );
}
-BOOL SvtFilterOptions::IsEnableWordPreview() const
+sal_Bool SvtFilterOptions::IsEnableWordPreview() const
{
return pImp->IsFlag( FILTERCFG_ENABLE_WORD_PREVIEW );
}
diff --git a/unotools/source/config/fontcfg.cxx b/unotools/source/config/fontcfg.cxx
index e8ae78d0aed2..b7fd73898c71 100644
--- a/unotools/source/config/fontcfg.cxx
+++ b/unotools/source/config/fontcfg.cxx
@@ -612,7 +612,7 @@ static ImplFontAttrWidthSearchData const aImplWidthAttrSearchList[] =
struct ImplFontAttrTypeSearchData
{
const char* mpStr;
- ULONG mnType;
+ sal_uLong mnType;
};
static ImplFontAttrTypeSearchData const aImplTypeAttrSearchList[] =
@@ -776,23 +776,23 @@ static bool ImplKillTrailingWithExceptions( String& rName, const char* const* pp
// -----------------------------------------------------------------------
-static BOOL ImplFindAndErase( String& rName, const char* pStr )
+static sal_Bool ImplFindAndErase( String& rName, const char* pStr )
{
xub_StrLen nPos = rName.SearchAscii( pStr );
if ( nPos == STRING_NOTFOUND )
- return FALSE;
+ return sal_False;
const char* pTempStr = pStr;
while ( *pTempStr )
pTempStr++;
rName.Erase( nPos, (xub_StrLen)(pTempStr-pStr) );
- return TRUE;
+ return sal_True;
}
// =======================================================================
void FontSubstConfiguration::getMapName( const String& rOrgName, String& rShortName,
- String& rFamilyName, FontWeight& rWeight, FontWidth& rWidth, ULONG& rType )
+ String& rFamilyName, FontWeight& rWeight, FontWidth& rWidth, sal_uLong& rType )
{
rShortName = rOrgName;
diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx
index 39233f022534..b17681331935 100755
--- a/unotools/source/config/lingucfg.cxx
+++ b/unotools/source/config/lingucfg.cxx
@@ -69,25 +69,25 @@ static osl::Mutex & GetOwnMutex()
///////////////////////////////////////////////////////////////////////////
-static BOOL lcl_SetLocale( INT16 &rLanguage, const uno::Any &rVal )
+static sal_Bool lcl_SetLocale( sal_Int16 &rLanguage, const uno::Any &rVal )
{
- BOOL bSucc = FALSE;
+ sal_Bool bSucc = sal_False;
lang::Locale aNew;
if (rVal >>= aNew) // conversion successful?
{
- INT16 nNew = MsLangId::convertLocaleToLanguage( aNew );
+ sal_Int16 nNew = MsLangId::convertLocaleToLanguage( aNew );
if (nNew != rLanguage)
{
rLanguage = nNew;
- bSucc = TRUE;
+ bSucc = sal_True;
}
}
return bSucc;
}
-static inline const OUString lcl_LanguageToCfgLocaleStr( INT16 nLanguage )
+static inline const OUString lcl_LanguageToCfgLocaleStr( sal_Int16 nLanguage )
{
OUString aRes;
if (LANGUAGE_SYSTEM != nLanguage)
@@ -96,7 +96,7 @@ static inline const OUString lcl_LanguageToCfgLocaleStr( INT16 nLanguage )
}
-static INT16 lcl_CfgAnyToLanguage( const uno::Any &rVal )
+static sal_Int16 lcl_CfgAnyToLanguage( const uno::Any &rVal )
{
OUString aTmp;
rVal >>= aTmp;
@@ -114,34 +114,34 @@ SvtLinguOptions::SvtLinguOptions()
// general options
bIsUseDictionaryList =
- bIsIgnoreControlCharacters = TRUE;
+ bIsIgnoreControlCharacters = sal_True;
// spelling options
bIsSpellCapitalization =
- bIsSpellSpecial = TRUE;
+ bIsSpellSpecial = sal_True;
bIsSpellAuto =
bIsSpellReverse =
bIsSpellWithDigits =
- bIsSpellUpperCase = FALSE;
+ bIsSpellUpperCase = sal_False;
// text conversion options
- bIsIgnorePostPositionalWord = TRUE;
+ bIsIgnorePostPositionalWord = sal_True;
bIsAutoCloseDialog =
bIsShowEntriesRecentlyUsedFirst =
- bIsAutoReplaceUniqueEntries = FALSE;
- bIsDirectionToSimplified = TRUE;
+ bIsAutoReplaceUniqueEntries = sal_False;
+ bIsDirectionToSimplified = sal_True;
bIsUseCharacterVariants =
bIsTranslateCommonTerms =
- bIsReverseMapping = FALSE;
+ bIsReverseMapping = sal_False;
bROIsDirectionToSimplified =
bROIsUseCharacterVariants =
bROIsTranslateCommonTerms =
- bROIsReverseMapping = FALSE;
+ bROIsReverseMapping = sal_False;
// hyphenation options
- bIsHyphSpecial = TRUE;
- bIsHyphAuto = FALSE;
+ bIsHyphSpecial = sal_True;
+ bIsHyphAuto = sal_False;
nHyphMinLeading =
nHyphMinTrailing = 2;
nHyphMinWordLength = 0;
@@ -166,10 +166,10 @@ class SvtLinguConfigItem : public utl::ConfigItem
SvtLinguConfigItem( const SvtLinguConfigItem & );
SvtLinguConfigItem & operator = ( const SvtLinguConfigItem & );
- static BOOL GetHdlByName( INT32 &rnHdl, const OUString &rPropertyName, sal_Bool bFullPropName = sal_False );
+ static sal_Bool GetHdlByName( sal_Int32 &rnHdl, const OUString &rPropertyName, sal_Bool bFullPropName = sal_False );
static const uno::Sequence< OUString > & GetPropertyNames();
- BOOL LoadOptions( const uno::Sequence< OUString > &rProperyNames );
- BOOL SaveOptions( const uno::Sequence< OUString > &rProperyNames );
+ sal_Bool LoadOptions( const uno::Sequence< OUString > &rProperyNames );
+ sal_Bool SaveOptions( const uno::Sequence< OUString > &rProperyNames );
public:
SvtLinguConfigItem();
@@ -191,18 +191,18 @@ public:
com::sun::star::uno::Any
GetProperty( const rtl::OUString &rPropertyName ) const;
com::sun::star::uno::Any
- GetProperty( INT32 nPropertyHandle ) const;
+ GetProperty( sal_Int32 nPropertyHandle ) const;
- BOOL SetProperty( const rtl::OUString &rPropertyName,
+ sal_Bool SetProperty( const rtl::OUString &rPropertyName,
const com::sun::star::uno::Any &rValue );
- BOOL SetProperty( INT32 nPropertyHandle,
+ sal_Bool SetProperty( sal_Int32 nPropertyHandle,
const com::sun::star::uno::Any &rValue );
- BOOL GetOptions( SvtLinguOptions &rOptions ) const;
- BOOL SetOptions( const SvtLinguOptions &rOptions );
+ sal_Bool GetOptions( SvtLinguOptions &rOptions ) const;
+ sal_Bool SetOptions( const SvtLinguOptions &rOptions );
- BOOL IsReadOnly( const rtl::OUString &rPropertyName ) const;
- BOOL IsReadOnly( INT32 nPropertyHandle ) const;
+ sal_Bool IsReadOnly( const rtl::OUString &rPropertyName ) const;
+ sal_Bool IsReadOnly( sal_Int32 nPropertyHandle ) const;
};
@@ -240,7 +240,7 @@ static struct NamesToHdl
{
const char *pFullPropName; // full qualified name as used in configuration
const char *pPropName; // property name only (atom) of above
- INT32 nHdl; // numeric handle representing the property
+ sal_Int32 nHdl; // numeric handle representing the property
}aNamesToHdl[] =
{
{/* 0 */ "General/DefaultLocale", UPN_DEFAULT_LOCALE, UPH_DEFAULT_LOCALE},
@@ -292,12 +292,12 @@ const uno::Sequence< OUString > & SvtLinguConfigItem::GetPropertyNames()
if (!bInitialized)
{
- INT32 nMax = sizeof(aNamesToHdl) / sizeof(aNamesToHdl[0]);
+ sal_Int32 nMax = sizeof(aNamesToHdl) / sizeof(aNamesToHdl[0]);
aNames.realloc( nMax );
OUString *pNames = aNames.getArray();
- INT32 nIdx = 0;
- for (INT32 i = 0; i < nMax; ++i)
+ sal_Int32 nIdx = 0;
+ for (sal_Int32 i = 0; i < nMax; ++i)
{
const sal_Char *pFullPropName = aNamesToHdl[i].pFullPropName;
if (pFullPropName)
@@ -310,8 +310,8 @@ const uno::Sequence< OUString > & SvtLinguConfigItem::GetPropertyNames()
}
-BOOL SvtLinguConfigItem::GetHdlByName(
- INT32 &rnHdl,
+sal_Bool SvtLinguConfigItem::GetHdlByName(
+ sal_Int32 &rnHdl,
const OUString &rPropertyName,
sal_Bool bFullPropName )
{
@@ -350,20 +350,20 @@ uno::Any SvtLinguConfigItem::GetProperty( const OUString &rPropertyName ) const
{
osl::MutexGuard aGuard( GetOwnMutex() );
- INT32 nHdl;
+ sal_Int32 nHdl;
return GetHdlByName( nHdl, rPropertyName ) ? GetProperty( nHdl ) : uno::Any();
}
-uno::Any SvtLinguConfigItem::GetProperty( INT32 nPropertyHandle ) const
+uno::Any SvtLinguConfigItem::GetProperty( sal_Int32 nPropertyHandle ) const
{
osl::MutexGuard aGuard( GetOwnMutex() );
uno::Any aRes;
- const INT16 *pnVal = 0;
- const BOOL *pbVal = 0;
- const INT32 *pnInt32Val = 0;
+ const sal_Int16 *pnVal = 0;
+ const sal_Bool *pbVal = 0;
+ const sal_Int32 *pnInt32Val = 0;
const SvtLinguOptions &rOpt = const_cast< SvtLinguConfigItem * >(this)->aOpt;
switch (nPropertyHandle)
@@ -438,31 +438,31 @@ uno::Any SvtLinguConfigItem::GetProperty( INT32 nPropertyHandle ) const
}
-BOOL SvtLinguConfigItem::SetProperty( const OUString &rPropertyName, const uno::Any &rValue )
+sal_Bool SvtLinguConfigItem::SetProperty( const OUString &rPropertyName, const uno::Any &rValue )
{
osl::MutexGuard aGuard( GetOwnMutex() );
- BOOL bSucc = FALSE;
- INT32 nHdl;
+ sal_Bool bSucc = sal_False;
+ sal_Int32 nHdl;
if (GetHdlByName( nHdl, rPropertyName ))
bSucc = SetProperty( nHdl, rValue );
return bSucc;
}
-BOOL SvtLinguConfigItem::SetProperty( INT32 nPropertyHandle, const uno::Any &rValue )
+sal_Bool SvtLinguConfigItem::SetProperty( sal_Int32 nPropertyHandle, const uno::Any &rValue )
{
osl::MutexGuard aGuard( GetOwnMutex() );
- BOOL bSucc = FALSE;
+ sal_Bool bSucc = sal_False;
if (!rValue.hasValue())
return bSucc;
- BOOL bMod = FALSE;
+ sal_Bool bMod = sal_False;
- INT16 *pnVal = 0;
- BOOL *pbVal = 0;
- INT32 *pnInt32Val = 0;
+ sal_Int16 *pnVal = 0;
+ sal_Bool *pbVal = 0;
+ sal_Int32 *pnInt32Val = 0;
SvtLinguOptions &rOpt = aOpt;
switch (nPropertyHandle)
@@ -484,13 +484,13 @@ BOOL SvtLinguConfigItem::SetProperty( INT32 nPropertyHandle, const uno::Any &rVa
case UPH_ACTIVE_DICTIONARIES :
{
rValue >>= rOpt.aActiveDics;
- bMod = TRUE;
+ bMod = sal_True;
break;
}
case UPH_ACTIVE_CONVERSION_DICTIONARIES :
{
rValue >>= rOpt.aActiveConvDics;
- bMod = TRUE;
+ bMod = sal_True;
break;
}
case UPH_DEFAULT_LOCALE :
@@ -530,41 +530,41 @@ BOOL SvtLinguConfigItem::SetProperty( INT32 nPropertyHandle, const uno::Any &rVa
if (pbVal)
{
- BOOL bNew = BOOL();
+ sal_Bool bNew = sal_Bool();
if (rValue >>= bNew)
{
if (bNew != *pbVal)
{
*pbVal = bNew;
- bMod = TRUE;
+ bMod = sal_True;
}
- bSucc = TRUE;
+ bSucc = sal_True;
}
}
else if (pnVal)
{
- INT16 nNew = INT16();
+ sal_Int16 nNew = sal_Int16();
if (rValue >>= nNew)
{
if (nNew != *pnVal)
{
*pnVal = nNew;
- bMod = TRUE;
+ bMod = sal_True;
}
- bSucc = TRUE;
+ bSucc = sal_True;
}
}
else if (pnInt32Val)
{
- INT32 nNew = INT32();
+ sal_Int32 nNew = sal_Int32();
if (rValue >>= nNew)
{
if (nNew != *pnInt32Val)
{
*pnInt32Val = nNew;
- bMod = TRUE;
+ bMod = sal_True;
}
- bSucc = TRUE;
+ bSucc = sal_True;
}
}
@@ -576,34 +576,34 @@ BOOL SvtLinguConfigItem::SetProperty( INT32 nPropertyHandle, const uno::Any &rVa
}
-BOOL SvtLinguConfigItem::GetOptions( SvtLinguOptions &rOptions ) const
+sal_Bool SvtLinguConfigItem::GetOptions( SvtLinguOptions &rOptions ) const
{
osl::MutexGuard aGuard( GetOwnMutex() );
rOptions = aOpt;
- return TRUE;
+ return sal_True;
}
-BOOL SvtLinguConfigItem::SetOptions( const SvtLinguOptions &rOptions )
+sal_Bool SvtLinguConfigItem::SetOptions( const SvtLinguOptions &rOptions )
{
osl::MutexGuard aGuard( GetOwnMutex() );
aOpt = rOptions;
SetModified();
NotifyListeners(0);
- return TRUE;
+ return sal_True;
}
-BOOL SvtLinguConfigItem::LoadOptions( const uno::Sequence< OUString > &rProperyNames )
+sal_Bool SvtLinguConfigItem::LoadOptions( const uno::Sequence< OUString > &rProperyNames )
{
osl::MutexGuard aGuard( GetOwnMutex() );
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
const OUString *pProperyNames = rProperyNames.getConstArray();
- INT32 nProps = rProperyNames.getLength();
+ sal_Int32 nProps = rProperyNames.getLength();
const uno::Sequence< uno::Any > aValues = GetProperties( rProperyNames );
const uno::Sequence< sal_Bool > aROStates = GetReadOnlyStates( rProperyNames );
@@ -614,10 +614,10 @@ BOOL SvtLinguConfigItem::LoadOptions( const uno::Sequence< OUString > &rProperyN
const uno::Any *pValue = aValues.getConstArray();
const sal_Bool *pROStates = aROStates.getConstArray();
- for (INT32 i = 0; i < nProps; ++i)
+ for (sal_Int32 i = 0; i < nProps; ++i)
{
const uno::Any &rVal = pValue[i];
- INT32 nPropertyHandle;
+ sal_Int32 nPropertyHandle;
GetHdlByName( nPropertyHandle, pProperyNames[i], sal_True );
switch ( nPropertyHandle )
{
@@ -678,11 +678,11 @@ BOOL SvtLinguConfigItem::LoadOptions( const uno::Sequence< OUString > &rProperyN
|| rOpt.nDefaultLanguage_CJK == LANGUAGE_CHINESE_MACAU
|| rOpt.nDefaultLanguage_CJK == LANGUAGE_CHINESE_TRADITIONAL )
{
- rOpt.bIsDirectionToSimplified = FALSE;
+ rOpt.bIsDirectionToSimplified = sal_False;
}
else
{
- rOpt.bIsDirectionToSimplified = TRUE;
+ rOpt.bIsDirectionToSimplified = sal_True;
}
}
} break;
@@ -708,7 +708,7 @@ BOOL SvtLinguConfigItem::LoadOptions( const uno::Sequence< OUString > &rProperyN
}
}
- bRes = TRUE;
+ bRes = sal_True;
}
DBG_ASSERT( bRes, "LoadOptions failed" );
@@ -716,19 +716,19 @@ BOOL SvtLinguConfigItem::LoadOptions( const uno::Sequence< OUString > &rProperyN
}
-BOOL SvtLinguConfigItem::SaveOptions( const uno::Sequence< OUString > &rProperyNames )
+sal_Bool SvtLinguConfigItem::SaveOptions( const uno::Sequence< OUString > &rProperyNames )
{
if (!IsModified())
- return TRUE;
+ return sal_True;
osl::MutexGuard aGuard( GetOwnMutex() );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const uno::Type &rBOOL = ::getBooleanCppuType();
- const uno::Type &rINT16 = ::getCppuType( (INT16 *) NULL );
- const uno::Type &rINT32 = ::getCppuType( (INT32 *) NULL );
+ const uno::Type &rINT16 = ::getCppuType( (sal_Int16 *) NULL );
+ const uno::Type &rINT32 = ::getCppuType( (sal_Int32 *) NULL );
- INT32 nProps = rProperyNames.getLength();
+ sal_Int32 nProps = rProperyNames.getLength();
uno::Sequence< uno::Any > aValues( nProps );
uno::Any *pValue = aValues.getArray();
@@ -784,22 +784,22 @@ BOOL SvtLinguConfigItem::SaveOptions( const uno::Sequence< OUString > &rProperyN
return bRet;
}
-BOOL SvtLinguConfigItem::IsReadOnly( const rtl::OUString &rPropertyName ) const
+sal_Bool SvtLinguConfigItem::IsReadOnly( const rtl::OUString &rPropertyName ) const
{
osl::MutexGuard aGuard( GetOwnMutex() );
- BOOL bReadOnly = FALSE;
- INT32 nHdl;
+ sal_Bool bReadOnly = sal_False;
+ sal_Int32 nHdl;
if (GetHdlByName( nHdl, rPropertyName ))
bReadOnly = IsReadOnly( nHdl );
return bReadOnly;
}
-BOOL SvtLinguConfigItem::IsReadOnly( INT32 nPropertyHandle ) const
+sal_Bool SvtLinguConfigItem::IsReadOnly( sal_Int32 nPropertyHandle ) const
{
osl::MutexGuard aGuard( GetOwnMutex() );
- BOOL bReadOnly = FALSE;
+ sal_Bool bReadOnly = sal_False;
const SvtLinguOptions &rOpt = const_cast< SvtLinguConfigItem * >(this)->aOpt;
switch(nPropertyHandle)
@@ -915,47 +915,47 @@ uno::Any SvtLinguConfig::GetProperty( const OUString &rPropertyName ) const
}
-uno::Any SvtLinguConfig::GetProperty( INT32 nPropertyHandle ) const
+uno::Any SvtLinguConfig::GetProperty( sal_Int32 nPropertyHandle ) const
{
return GetConfigItem().GetProperty( nPropertyHandle );
}
-BOOL SvtLinguConfig::SetProperty( const OUString &rPropertyName, const uno::Any &rValue )
+sal_Bool SvtLinguConfig::SetProperty( const OUString &rPropertyName, const uno::Any &rValue )
{
return GetConfigItem().SetProperty( rPropertyName, rValue );
}
-BOOL SvtLinguConfig::SetProperty( INT32 nPropertyHandle, const uno::Any &rValue )
+sal_Bool SvtLinguConfig::SetProperty( sal_Int32 nPropertyHandle, const uno::Any &rValue )
{
return GetConfigItem().SetProperty( nPropertyHandle, rValue );
}
-BOOL SvtLinguConfig::GetOptions( SvtLinguOptions &rOptions ) const
+sal_Bool SvtLinguConfig::GetOptions( SvtLinguOptions &rOptions ) const
{
return GetConfigItem().GetOptions( rOptions );
}
-BOOL SvtLinguConfig::SetOptions( const SvtLinguOptions &rOptions )
+sal_Bool SvtLinguConfig::SetOptions( const SvtLinguOptions &rOptions )
{
return GetConfigItem().SetOptions( rOptions );
}
-BOOL SvtLinguConfig::IsReadOnly( const rtl::OUString &rPropertyName ) const
+sal_Bool SvtLinguConfig::IsReadOnly( const rtl::OUString &rPropertyName ) const
{
return GetConfigItem().IsReadOnly( rPropertyName );
}
-BOOL SvtLinguConfig::IsReadOnly( INT32 nPropertyHandle ) const
+sal_Bool SvtLinguConfig::IsReadOnly( sal_Int32 nPropertyHandle ) const
{
return GetConfigItem().IsReadOnly( nPropertyHandle );
}
-BOOL SvtLinguConfig::GetElementNamesFor(
+sal_Bool SvtLinguConfig::GetElementNamesFor(
const rtl::OUString &rNodeName,
uno::Sequence< rtl::OUString > &rElementNames ) const
{
@@ -996,7 +996,7 @@ static uno::Reference< container::XNameAccess > GetOrCreateSetEntry_Impl(
return xResult;
}
-BOOL SvtLinguConfig::GetSupportedDictionaryFormatsFor(
+sal_Bool SvtLinguConfig::GetSupportedDictionaryFormatsFor(
const rtl::OUString &rSetName,
const rtl::OUString &rSetEntry,
uno::Sequence< rtl::OUString > &rFormatList ) const
@@ -1113,7 +1113,7 @@ static bool lcl_GetFileUrlFromOrigin(
}
-BOOL SvtLinguConfig::GetDictionaryEntry(
+sal_Bool SvtLinguConfig::GetDictionaryEntry(
const rtl::OUString &rNodeName,
SvtLinguConfigDictionaryEntry &rDicEntry ) const
{
diff --git a/unotools/source/config/misccfg.cxx b/unotools/source/config/misccfg.cxx
index e2cc8686d444..37e3dfac304f 100644
--- a/unotools/source/config/misccfg.cxx
+++ b/unotools/source/config/misccfg.cxx
@@ -58,9 +58,9 @@ static sal_Int32 nRefCount = 0;
class SfxMiscCfg : public utl::ConfigItem
{
- BOOL bPaperSize; // printer warnings
- BOOL bPaperOrientation;
- BOOL bNotFound;
+ sal_Bool bPaperSize; // printer warnings
+ sal_Bool bPaperOrientation;
+ sal_Bool bNotFound;
sal_Int32 nYear2000; // two digit year representation
const com::sun::star::uno::Sequence<rtl::OUString>& GetPropertyNames();
@@ -73,14 +73,14 @@ public:
virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames);
virtual void Commit();
- BOOL IsNotFoundWarning() const {return bNotFound;}
- void SetNotFoundWarning( BOOL bSet);
+ sal_Bool IsNotFoundWarning() const {return bNotFound;}
+ void SetNotFoundWarning( sal_Bool bSet);
- BOOL IsPaperSizeWarning() const {return bPaperSize;}
- void SetPaperSizeWarning(BOOL bSet);
+ sal_Bool IsPaperSizeWarning() const {return bPaperSize;}
+ void SetPaperSizeWarning(sal_Bool bSet);
- BOOL IsPaperOrientationWarning() const {return bPaperOrientation;}
- void SetPaperOrientationWarning( BOOL bSet);
+ sal_Bool IsPaperOrientationWarning() const {return bPaperOrientation;}
+ void SetPaperOrientationWarning( sal_Bool bSet);
// 0 ... 99
sal_Int32 GetYear2000() const { return nYear2000; }
@@ -93,9 +93,9 @@ public:
--------------------------------------------------------------------*/
SfxMiscCfg::SfxMiscCfg() :
ConfigItem(C2U("Office.Common") ),
- bPaperSize(FALSE),
- bPaperOrientation (FALSE),
- bNotFound (FALSE),
+ bPaperSize(sal_False),
+ bPaperOrientation (sal_False),
+ bNotFound (sal_False),
nYear2000( 1930 )
{
RTL_LOGFILE_CONTEXT(aLog, "svl SfxMiscCfg::SfxMiscCfg()");
@@ -112,7 +112,7 @@ SfxMiscCfg::~SfxMiscCfg()
Beschreibung:
--------------------------------------------------------------------*/
-void SfxMiscCfg::SetNotFoundWarning( BOOL bSet)
+void SfxMiscCfg::SetNotFoundWarning( sal_Bool bSet)
{
if(bNotFound != bSet)
SetModified();
@@ -123,7 +123,7 @@ void SfxMiscCfg::SetNotFoundWarning( BOOL bSet)
Beschreibung:
--------------------------------------------------------------------*/
-void SfxMiscCfg::SetPaperSizeWarning( BOOL bSet)
+void SfxMiscCfg::SetPaperSizeWarning( sal_Bool bSet)
{
if(bPaperSize != bSet)
SetModified();
@@ -133,7 +133,7 @@ void SfxMiscCfg::SetPaperSizeWarning( BOOL bSet)
/*--------------------------------------------------------------------
Beschreibung:
--------------------------------------------------------------------*/
-void SfxMiscCfg::SetPaperOrientationWarning( BOOL bSet)
+void SfxMiscCfg::SetPaperOrientationWarning( sal_Bool bSet)
{
if(bPaperOrientation != bSet)
SetModified();
@@ -266,32 +266,32 @@ MiscCfg::~MiscCfg( )
}
}
-BOOL MiscCfg::IsNotFoundWarning() const
+sal_Bool MiscCfg::IsNotFoundWarning() const
{
return pImpl->IsNotFoundWarning();
}
-void MiscCfg::SetNotFoundWarning( BOOL bSet)
+void MiscCfg::SetNotFoundWarning( sal_Bool bSet)
{
pImpl->SetNotFoundWarning( bSet );
}
-BOOL MiscCfg::IsPaperSizeWarning() const
+sal_Bool MiscCfg::IsPaperSizeWarning() const
{
return pImpl->IsPaperSizeWarning();
}
-void MiscCfg::SetPaperSizeWarning(BOOL bSet)
+void MiscCfg::SetPaperSizeWarning(sal_Bool bSet)
{
pImpl->SetPaperSizeWarning( bSet );
}
-BOOL MiscCfg::IsPaperOrientationWarning() const
+sal_Bool MiscCfg::IsPaperOrientationWarning() const
{
return pImpl->IsPaperOrientationWarning();
}
-void MiscCfg::SetPaperOrientationWarning( BOOL bSet)
+void MiscCfg::SetPaperOrientationWarning( sal_Bool bSet)
{
pImpl->SetPaperOrientationWarning( bSet );
}
diff --git a/unotools/source/config/moduleoptions.cxx b/unotools/source/config/moduleoptions.cxx
index afce713ccc49..ec2da6bff054 100644
--- a/unotools/source/config/moduleoptions.cxx
+++ b/unotools/source/config/moduleoptions.cxx
@@ -902,7 +902,7 @@ css::uno::Sequence< ::rtl::OUString > SvtModuleOptions_Impl::impl_ExpandSetNames
@short helper to classify given factory by name
@descr Every factory has his own long and short name. So we can match right enum value for internal using.
- @attention We change in/out parameter "eFactory" in every case! But you should use it only, if return value is TRUE!
+ @attention We change in/out parameter "eFactory" in every case! But you should use it only, if return value is sal_True!
Algorithm: Set out-parameter to propably value ... and check the longname.
If it match with these factory - break operation and return true AND right set parameter.
Otherwise try next one and so on. If no factory was found return false. Out parameter eFactory
diff --git a/unotools/source/config/pathoptions.cxx b/unotools/source/config/pathoptions.cxx
index 3cf43a1f3bc9..613b9056d346 100644
--- a/unotools/source/config/pathoptions.cxx
+++ b/unotools/source/config/pathoptions.cxx
@@ -137,6 +137,7 @@ class SvtPathOptions_Impl
std::vector< String > m_aPathArray;
Reference< XFastPropertySet > m_xPathSettings;
Reference< XStringSubstitution > m_xSubstVariables;
+ Reference< XMacroExpander > m_xMacroExpander;
mutable EnumToHandleMap m_aMapEnumToPropHandle;
VarNameToEnumMap m_aMapVarNamesToEnum;
@@ -199,13 +200,13 @@ class SvtPathOptions_Impl
void SetUserConfigPath( const String& rPath ) { SetPath( SvtPathOptions::PATH_USERCONFIG, rPath ); }
void SetWorkPath( const String& rPath ) { SetPath( SvtPathOptions::PATH_WORK, rPath ); }
- rtl::OUString SubstVar( const rtl::OUString& rVar );
- rtl::OUString SubstituteAndConvert( const rtl::OUString& rPath );
- rtl::OUString UsePathVariables( const rtl::OUString& rPath );
+ rtl::OUString SubstVar( const rtl::OUString& rVar ) const;
+ rtl::OUString ExpandMacros( const rtl::OUString& rPath ) const;
+ rtl::OUString UsePathVariables( const rtl::OUString& rPath ) const;
::com::sun::star::lang::Locale GetLocale() const { return m_aLocale; }
- BOOL IsPathReadonly(SvtPathOptions::Pathes ePath)const;
+ sal_Bool IsPathReadonly(SvtPathOptions::Pathes ePath)const;
};
// global ----------------------------------------------------------------
@@ -282,39 +283,37 @@ const String& SvtPathOptions_Impl::GetPath( SvtPathOptions::Pathes ePath )
{
::osl::MutexGuard aGuard( m_aMutex );
- if ( ePath < SvtPathOptions::PATH_COUNT )
+ if ( ePath >= SvtPathOptions::PATH_COUNT )
+ return m_aEmptyString;
+
+ OUString aPathValue;
+ String aResult;
+ sal_Int32 nHandle = m_aMapEnumToPropHandle[ (sal_Int32)ePath ];
+
+ // Substitution is done by the service itself using the substition service
+ Any a = m_xPathSettings->getFastPropertyValue( nHandle );
+ a >>= aPathValue;
+ if( ePath == SvtPathOptions::PATH_ADDIN ||
+ ePath == SvtPathOptions::PATH_FILTER ||
+ ePath == SvtPathOptions::PATH_HELP ||
+ ePath == SvtPathOptions::PATH_MODULE ||
+ ePath == SvtPathOptions::PATH_PLUGIN ||
+ ePath == SvtPathOptions::PATH_STORAGE
+ )
{
- OUString aPathValue;
- String aResult;
- sal_Int32 nHandle = m_aMapEnumToPropHandle[ (sal_Int32)ePath ];
-
- // Substitution is done by the service itself using the substition service
- Any a = m_xPathSettings->getFastPropertyValue( nHandle );
- a >>= aPathValue;
- if( ePath == SvtPathOptions::PATH_ADDIN ||
- ePath == SvtPathOptions::PATH_FILTER ||
- ePath == SvtPathOptions::PATH_HELP ||
- ePath == SvtPathOptions::PATH_MODULE ||
- ePath == SvtPathOptions::PATH_PLUGIN ||
- ePath == SvtPathOptions::PATH_STORAGE
- )
- {
- // These office paths have to be converted to system pathes
- utl::LocalFileHelper::ConvertURLToPhysicalName( aPathValue, aResult );
- aPathValue = aResult;
- }
-
- m_aPathArray[ ePath ] = aPathValue;
- return m_aPathArray[ ePath ];
+ // These office paths have to be converted to system pathes
+ utl::LocalFileHelper::ConvertURLToPhysicalName( aPathValue, aResult );
+ aPathValue = aResult;
}
- return m_aEmptyString;
+ m_aPathArray[ ePath ] = aPathValue;
+ return m_aPathArray[ ePath ];
}
// -----------------------------------------------------------------------
-BOOL SvtPathOptions_Impl::IsPathReadonly(SvtPathOptions::Pathes ePath)const
+sal_Bool SvtPathOptions_Impl::IsPathReadonly(SvtPathOptions::Pathes ePath)const
{
::osl::MutexGuard aGuard( m_aMutex );
- BOOL bReadonly = FALSE;
+ sal_Bool bReadonly = sal_False;
if ( ePath < SvtPathOptions::PATH_COUNT )
{
Reference<XPropertySet> xPrSet(m_xPathSettings, UNO_QUERY);
@@ -372,29 +371,35 @@ void SvtPathOptions_Impl::SetPath( SvtPathOptions::Pathes ePath, const String& r
}
}
-// -----------------------------------------------------------------------
+//-------------------------------------------------------------------------
-OUString SvtPathOptions_Impl::SubstituteAndConvert( const rtl::OUString& rPath )
+OUString SvtPathOptions_Impl::ExpandMacros( const rtl::OUString& rPath ) const
{
- return SubstVar( rPath );
+ ::rtl::OUString sExpanded( rPath );
+
+ const INetURLObject aParser( rPath );
+ if ( aParser.GetProtocol() == INET_PROT_VND_SUN_STAR_EXPAND )
+ sExpanded = m_xMacroExpander->expandMacros( aParser.GetURLPath( INetURLObject::DECODE_WITH_CHARSET ) );
+
+ return sExpanded;
}
//-------------------------------------------------------------------------
-OUString SvtPathOptions_Impl::UsePathVariables( const OUString& rPath )
+OUString SvtPathOptions_Impl::UsePathVariables( const OUString& rPath ) const
{
return m_xSubstVariables->reSubstituteVariables( rPath );
}
// -----------------------------------------------------------------------
-OUString SvtPathOptions_Impl::SubstVar( const OUString& rVar )
+OUString SvtPathOptions_Impl::SubstVar( const OUString& rVar ) const
{
// Don't work at parameter-string directly. Copy it.
OUString aWorkText = rVar;
// Convert the returned path to system path!
- BOOL bConvertLocal = FALSE;
+ sal_Bool bConvertLocal = sal_False;
// Search for first occure of "$(...".
sal_Int32 nPosition = aWorkText.indexOf( SIGN_STARTVARIABLE ); // = first position of "$(" in string
@@ -421,7 +426,7 @@ OUString SvtPathOptions_Impl::SubstVar( const OUString& rVar )
// Look for special variable that needs a system path.
VarNameToEnumMap::const_iterator pIter = m_aMapVarNamesToEnum.find( aSubString );
if ( pIter != m_aMapVarNamesToEnum.end() )
- bConvertLocal = TRUE;
+ bConvertLocal = sal_True;
nPosition += nLength;
@@ -483,18 +488,9 @@ SvtPathOptions_Impl::SvtPathOptions_Impl() :
Reference< XInterface >() );
}
- m_xSubstVariables = Reference< XStringSubstitution >( xSMgr->createInstance(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.util.PathSubstitution" ))),
- UNO_QUERY );
- if ( !m_xSubstVariables.is() )
- {
- // #112719#: check for existance
- DBG_ERROR( "SvtPathOptions_Impl::SvtPathOptions_Impl(): #112719# happened again!" );
- throw RuntimeException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Service com.sun.star.util.PathSubstitution cannot be created" )),
- Reference< XInterface >() );
- }
+ ::comphelper::ComponentContext aContext( xSMgr );
+ m_xSubstVariables.set( aContext.createComponent( "com.sun.star.util.PathSubstitution" ), UNO_QUERY_THROW );
+ m_xMacroExpander.set( aContext.getSingleton( "com.sun.star.util.theMacroExpander" ), UNO_QUERY_THROW );
// Create temporary hash map to have a mapping between property names and property handles
Reference< XPropertySet > xPropertySet = Reference< XPropertySet >( m_xPathSettings, UNO_QUERY );
@@ -905,13 +901,22 @@ void SvtPathOptions::SetWorkPath( const String& rPath )
// -----------------------------------------------------------------------
-String SvtPathOptions::SubstituteVariable( const String& rVar )
+String SvtPathOptions::SubstituteVariable( const String& rVar ) const
{
- String aRet = pImp->SubstituteAndConvert( rVar );
+ String aRet = pImp->SubstVar( rVar );
return aRet;
}
-String SvtPathOptions::UseVariable( const String& rPath )
+// -----------------------------------------------------------------------
+
+String SvtPathOptions::ExpandMacros( const String& rPath ) const
+{
+ return pImp->ExpandMacros( rPath );
+}
+
+// -----------------------------------------------------------------------
+
+String SvtPathOptions::UseVariable( const String& rPath ) const
{
String aRet = pImp->UsePathVariables( rPath );
return aRet;
@@ -982,7 +987,7 @@ sal_Bool SvtPathOptions::SearchFile( String& rIniFile, Pathes ePath )
case PATH_TEMPLATE: aPath = GetTemplatePath(); break;
case PATH_WORK: aPath = GetWorkPath(); break;
case PATH_UICONFIG: aPath = GetUIConfigPath(); break;
- case PATH_FINGERPRINT: aPath = GetFingerprintPath(); break;
+ case PATH_FINGERPRINT: aPath = GetFingerprintPath(); break;
case PATH_USERCONFIG:/*-Wall???*/ break;
case PATH_COUNT: /*-Wall???*/ break;
}
@@ -990,12 +995,12 @@ sal_Bool SvtPathOptions::SearchFile( String& rIniFile, Pathes ePath )
sal_uInt16 j, nIdx = 0, nTokenCount = aPath.GetTokenCount( SEARCHPATH_DELIMITER );
for ( j = 0; j < nTokenCount; ++j )
{
- BOOL bIsURL = TRUE;
+ sal_Bool bIsURL = sal_True;
String aPathToken = aPath.GetToken( 0, SEARCHPATH_DELIMITER, nIdx );
INetURLObject aObj( aPathToken );
if ( aObj.HasError() )
{
- bIsURL = FALSE;
+ bIsURL = sal_False;
String aURL;
if ( LocalFileHelper::ConvertPhysicalNameToURL( aPathToken, aURL ) )
aObj.SetURL( aURL );
@@ -1040,7 +1045,7 @@ sal_Bool SvtPathOptions::SearchFile( String& rIniFile, Pathes ePath )
return pImp->GetLocale();
}
// -----------------------------------------------------------------------
-BOOL SvtPathOptions::IsPathReadonly(Pathes ePath)const
+sal_Bool SvtPathOptions::IsPathReadonly(Pathes ePath)const
{
return pImp->IsPathReadonly(ePath);
}
diff --git a/unotools/source/config/regoptions.cxx b/unotools/source/config/regoptions.cxx
index 81f089919dfd..3e99cf2dd327 100644
--- a/unotools/source/config/regoptions.cxx
+++ b/unotools/source/config/regoptions.cxx
@@ -78,9 +78,9 @@ namespace utl
if ( bValid )
{
Date aDate;
- aDate.SetDay ( (USHORT)_rStringRep.copy( 0, 2 ).toInt32( ) );
- aDate.SetMonth ( (USHORT)_rStringRep.copy( 3, 2 ).toInt32( ) );
- aDate.SetYear ( (USHORT)_rStringRep.copy( 6, 4 ).toInt32( ) );
+ aDate.SetDay ( (sal_uInt16)_rStringRep.copy( 0, 2 ).toInt32( ) );
+ aDate.SetMonth ( (sal_uInt16)_rStringRep.copy( 3, 2 ).toInt32( ) );
+ aDate.SetYear ( (sal_uInt16)_rStringRep.copy( 6, 4 ).toInt32( ) );
nDateIntRep = aDate.GetDate();
}
}
diff --git a/unotools/source/config/saveopt.cxx b/unotools/source/config/saveopt.cxx
index cbb7e763b38a..379ba65dc9e6 100644
--- a/unotools/source/config/saveopt.cxx
+++ b/unotools/source/config/saveopt.cxx
@@ -107,16 +107,16 @@ public:
virtual void Commit();
sal_Int32 GetAutoSaveTime() const { return nAutoSaveTime; }
- BOOL IsUseUserData() const { return bUseUserData; }
- BOOL IsBackup() const { return bBackup; }
- BOOL IsAutoSave() const { return bAutoSave; }
- BOOL IsAutoSavePrompt() const { return bAutoSavePrompt; }
- BOOL IsDocInfoSave() const { return bDocInfSave; }
- BOOL IsSaveWorkingSet() const { return bSaveWorkingSet; }
- BOOL IsSaveDocView() const { return bSaveDocView; }
- BOOL IsSaveRelINet() const { return bSaveRelINet; }
- BOOL IsSaveRelFSys() const { return bSaveRelFSys; }
- BOOL IsSaveUnpacked() const { return bSaveUnpacked; }
+ sal_Bool IsUseUserData() const { return bUseUserData; }
+ sal_Bool IsBackup() const { return bBackup; }
+ sal_Bool IsAutoSave() const { return bAutoSave; }
+ sal_Bool IsAutoSavePrompt() const { return bAutoSavePrompt; }
+ sal_Bool IsDocInfoSave() const { return bDocInfSave; }
+ sal_Bool IsSaveWorkingSet() const { return bSaveWorkingSet; }
+ sal_Bool IsSaveDocView() const { return bSaveDocView; }
+ sal_Bool IsSaveRelINet() const { return bSaveRelINet; }
+ sal_Bool IsSaveRelFSys() const { return bSaveRelFSys; }
+ sal_Bool IsSaveUnpacked() const { return bSaveUnpacked; }
sal_Bool IsPrettyPrintingEnabled( ) const { return bDoPrettyPrinting; }
sal_Bool IsWarnAlienFormat() const { return bWarnAlienFormat; }
sal_Bool IsLoadDocPrinter() const { return bLoadDocPrinter; }
@@ -124,16 +124,16 @@ public:
GetODFDefaultVersion() const { return eODFDefaultVersion; }
void SetAutoSaveTime( sal_Int32 n );
- void SetUseUserData( BOOL b );
- void SetBackup( BOOL b );
- void SetAutoSave( BOOL b );
- void SetAutoSavePrompt( BOOL b );
- void SetDocInfoSave( BOOL b );
- void SetSaveWorkingSet( BOOL b );
- void SetSaveDocView( BOOL b );
- void SetSaveRelINet( BOOL b );
- void SetSaveRelFSys( BOOL b );
- void SetSaveUnpacked( BOOL b );
+ void SetUseUserData( sal_Bool b );
+ void SetBackup( sal_Bool b );
+ void SetAutoSave( sal_Bool b );
+ void SetAutoSavePrompt( sal_Bool b );
+ void SetDocInfoSave( sal_Bool b );
+ void SetSaveWorkingSet( sal_Bool b );
+ void SetSaveDocView( sal_Bool b );
+ void SetSaveRelINet( sal_Bool b );
+ void SetSaveRelFSys( sal_Bool b );
+ void SetSaveUnpacked( sal_Bool b );
void EnablePrettyPrinting( sal_Bool _bDoPP );
void SetWarnAlienFormat( sal_Bool _bDoPP );
void SetLoadDocPrinter( sal_Bool bNew );
@@ -152,7 +152,7 @@ void SvtSaveOptions_Impl::SetAutoSaveTime( sal_Int32 n )
}
}
-void SvtSaveOptions_Impl::SetUseUserData( BOOL b )
+void SvtSaveOptions_Impl::SetUseUserData( sal_Bool b )
{
if (!bROUseUserData && bUseUserData!=b)
{
@@ -161,7 +161,7 @@ void SvtSaveOptions_Impl::SetUseUserData( BOOL b )
}
}
-void SvtSaveOptions_Impl::SetBackup( BOOL b )
+void SvtSaveOptions_Impl::SetBackup( sal_Bool b )
{
if (!bROBackup && bBackup!=b)
{
@@ -170,7 +170,7 @@ void SvtSaveOptions_Impl::SetBackup( BOOL b )
}
}
-void SvtSaveOptions_Impl::SetAutoSave( BOOL b )
+void SvtSaveOptions_Impl::SetAutoSave( sal_Bool b )
{
if (!bROAutoSave && bAutoSave!=b)
{
@@ -180,7 +180,7 @@ void SvtSaveOptions_Impl::SetAutoSave( BOOL b )
}
}
-void SvtSaveOptions_Impl::SetAutoSavePrompt( BOOL b )
+void SvtSaveOptions_Impl::SetAutoSavePrompt( sal_Bool b )
{
if (!bROAutoSavePrompt && bAutoSavePrompt!=b)
{
@@ -189,7 +189,7 @@ void SvtSaveOptions_Impl::SetAutoSavePrompt( BOOL b )
}
}
-void SvtSaveOptions_Impl::SetDocInfoSave(BOOL b)
+void SvtSaveOptions_Impl::SetDocInfoSave(sal_Bool b)
{
if (!bRODocInfSave && bDocInfSave!=b)
{
@@ -198,7 +198,7 @@ void SvtSaveOptions_Impl::SetDocInfoSave(BOOL b)
}
}
-void SvtSaveOptions_Impl::SetSaveWorkingSet( BOOL b )
+void SvtSaveOptions_Impl::SetSaveWorkingSet( sal_Bool b )
{
if (!bROSaveWorkingSet && bSaveWorkingSet!=b)
{
@@ -207,7 +207,7 @@ void SvtSaveOptions_Impl::SetSaveWorkingSet( BOOL b )
}
}
-void SvtSaveOptions_Impl::SetSaveDocView( BOOL b )
+void SvtSaveOptions_Impl::SetSaveDocView( sal_Bool b )
{
if (!bROSaveDocView && bSaveDocView!=b)
{
@@ -216,7 +216,7 @@ void SvtSaveOptions_Impl::SetSaveDocView( BOOL b )
}
}
-void SvtSaveOptions_Impl::SetSaveRelINet( BOOL b )
+void SvtSaveOptions_Impl::SetSaveRelINet( sal_Bool b )
{
if (!bROSaveRelINet && bSaveRelINet!=b)
{
@@ -225,7 +225,7 @@ void SvtSaveOptions_Impl::SetSaveRelINet( BOOL b )
}
}
-void SvtSaveOptions_Impl::SetSaveRelFSys( BOOL b )
+void SvtSaveOptions_Impl::SetSaveRelFSys( sal_Bool b )
{
if (!bROSaveRelFSys && bSaveRelFSys!=b)
{
@@ -234,7 +234,7 @@ void SvtSaveOptions_Impl::SetSaveRelFSys( BOOL b )
}
}
-void SvtSaveOptions_Impl::SetSaveUnpacked( BOOL b )
+void SvtSaveOptions_Impl::SetSaveUnpacked( sal_Bool b )
{
if (!bROSaveUnpacked && bSaveUnpacked!=b)
{
diff --git a/unotools/source/config/searchopt.cxx b/unotools/source/config/searchopt.cxx
index f9318f150589..9e09dcc96dac 100644
--- a/unotools/source/config/searchopt.cxx
+++ b/unotools/source/config/searchopt.cxx
@@ -50,19 +50,19 @@ using namespace com::sun::star::i18n;
class SvtSearchOptions_Impl : public ConfigItem
{
- INT32 nFlags;
- BOOL bModified;
+ sal_Int32 nFlags;
+ sal_Bool bModified;
// disallow copy-constructor and assignment-operator for now
SvtSearchOptions_Impl( const SvtSearchOptions_Impl & );
SvtSearchOptions_Impl & operator = ( const SvtSearchOptions_Impl & );
protected:
- BOOL IsModified() const { return bModified; }
+ sal_Bool IsModified() const { return bModified; }
using ConfigItem::SetModified;
- void SetModified( BOOL bVal );
- BOOL Load();
- BOOL Save();
+ void SetModified( sal_Bool bVal );
+ sal_Bool Load();
+ sal_Bool Save();
Sequence< OUString > GetPropertyNames() const;
@@ -74,8 +74,8 @@ public:
virtual void Commit();
virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
- BOOL GetFlag( USHORT nOffset ) const;
- void SetFlag( USHORT nOffset, BOOL bVal );
+ sal_Bool GetFlag( sal_uInt16 nOffset ) const;
+ void SetFlag( sal_uInt16 nOffset, sal_Bool bVal );
};
@@ -86,7 +86,7 @@ SvtSearchOptions_Impl::SvtSearchOptions_Impl() :
RTL_LOGFILE_CONTEXT(aLog, "unotools SvtSearchOptions_Impl::SvtSearchOptions_Impl()");
nFlags = 0x0003FFFF; // set all options values to 'true'
Load();
- SetModified( FALSE );
+ SetModified( sal_False );
}
@@ -107,28 +107,28 @@ void SvtSearchOptions_Impl::Notify( const Sequence< rtl::OUString >& )
}
-BOOL SvtSearchOptions_Impl::GetFlag( USHORT nOffset ) const
+sal_Bool SvtSearchOptions_Impl::GetFlag( sal_uInt16 nOffset ) const
{
DBG_ASSERT( nOffset <= MAX_FLAGS_OFFSET, "offset out of range");
- return ((nFlags >> nOffset) & 0x01) ? TRUE : FALSE;
+ return ((nFlags >> nOffset) & 0x01) ? sal_True : sal_False;
}
-void SvtSearchOptions_Impl::SetFlag( USHORT nOffset, BOOL bVal )
+void SvtSearchOptions_Impl::SetFlag( sal_uInt16 nOffset, sal_Bool bVal )
{
DBG_ASSERT( nOffset <= MAX_FLAGS_OFFSET, "offset out of range");
- INT32 nOldFlags = nFlags;
- INT32 nMask = ((INT32) 1) << nOffset;
+ sal_Int32 nOldFlags = nFlags;
+ sal_Int32 nMask = ((sal_Int32) 1) << nOffset;
if (bVal)
nFlags |= nMask;
else
nFlags &= ~nMask;
if (nFlags != nOldFlags)
- SetModified( TRUE );
+ SetModified( sal_True );
}
-void SvtSearchOptions_Impl::SetModified( BOOL bVal )
+void SvtSearchOptions_Impl::SetModified( sal_Bool bVal )
{
bModified = bVal;
if (bModified)
@@ -174,19 +174,19 @@ Sequence< OUString > SvtSearchOptions_Impl::GetPropertyNames() const
const int nCount = sizeof( aPropNames ) / sizeof( aPropNames[0] );
Sequence< OUString > aNames( nCount );
OUString* pNames = aNames.getArray();
- for (INT32 i = 0; i < nCount; ++i)
+ for (sal_Int32 i = 0; i < nCount; ++i)
pNames[i] = OUString::createFromAscii( aPropNames[i] );
return aNames;
}
-BOOL SvtSearchOptions_Impl::Load()
+sal_Bool SvtSearchOptions_Impl::Load()
{
- BOOL bSucc = FALSE;
+ sal_Bool bSucc = sal_False;
Sequence< OUString > aNames = GetPropertyNames();
- INT32 nProps = aNames.getLength();
+ sal_Int32 nProps = aNames.getLength();
const Sequence< Any > aValues = GetProperties( aNames );
DBG_ASSERT( aValues.getLength() == aNames.getLength(),
@@ -195,16 +195,16 @@ BOOL SvtSearchOptions_Impl::Load()
if (nProps && aValues.getLength() == nProps)
{
- bSucc = TRUE;
+ bSucc = sal_True;
const Any* pValues = aValues.getConstArray();
- for (USHORT i = 0; i < nProps; ++i)
+ for (sal_uInt16 i = 0; i < nProps; ++i)
{
const Any &rVal = pValues[i];
DBG_ASSERT( rVal.hasValue(), "property value missing" );
if (rVal.hasValue())
{
- BOOL bVal = BOOL();
+ sal_Bool bVal = sal_Bool();
if (rVal >>= bVal)
{
if (i <= MAX_FLAGS_OFFSET)
@@ -219,13 +219,13 @@ BOOL SvtSearchOptions_Impl::Load()
else
{
DBG_ERROR( "unexpected type" );
- bSucc = FALSE;
+ bSucc = sal_False;
}
}
else
{
DBG_ERROR( "value missing" );
- bSucc = FALSE;
+ bSucc = sal_False;
}
}
}
@@ -235,12 +235,12 @@ BOOL SvtSearchOptions_Impl::Load()
}
-BOOL SvtSearchOptions_Impl::Save()
+sal_Bool SvtSearchOptions_Impl::Save()
{
- BOOL bSucc = FALSE;
+ sal_Bool bSucc = sal_False;
const Sequence< OUString > aNames = GetPropertyNames();
- INT32 nProps = aNames.getLength();
+ sal_Int32 nProps = aNames.getLength();
Sequence< Any > aValues( nProps );
Any *pValue = aValues.getArray();
@@ -249,13 +249,13 @@ BOOL SvtSearchOptions_Impl::Save()
"unexpected size of index" );
if (nProps && nProps == MAX_FLAGS_OFFSET + 1)
{
- for (USHORT i = 0; i < nProps; ++i)
- pValue[i] <<= (BOOL) GetFlag(i);
+ for (sal_uInt16 i = 0; i < nProps; ++i)
+ pValue[i] <<= (sal_Bool) GetFlag(i);
bSucc |= PutProperties( aNames, aValues );
}
if (bSucc)
- SetModified( FALSE );
+ SetModified( sal_False );
return bSucc;
}
@@ -275,9 +275,9 @@ SvtSearchOptions::~SvtSearchOptions()
}
-INT32 SvtSearchOptions::GetTransliterationFlags() const
+sal_Int32 SvtSearchOptions::GetTransliterationFlags() const
{
- INT32 nRes = 0;
+ sal_Int32 nRes = 0;
if (!IsMatchCase()) // 'IsMatchCase' means act case sensitive
nRes |= TransliterationModules_IGNORE_CASE;
@@ -322,312 +322,312 @@ INT32 SvtSearchOptions::GetTransliterationFlags() const
}
-BOOL SvtSearchOptions::IsWholeWordsOnly() const
+sal_Bool SvtSearchOptions::IsWholeWordsOnly() const
{
return pImpl->GetFlag( 0 );
}
-void SvtSearchOptions::SetWholeWordsOnly( BOOL bVal )
+void SvtSearchOptions::SetWholeWordsOnly( sal_Bool bVal )
{
pImpl->SetFlag( 0, bVal );
}
-BOOL SvtSearchOptions::IsBackwards() const
+sal_Bool SvtSearchOptions::IsBackwards() const
{
return pImpl->GetFlag( 1 );
}
-void SvtSearchOptions::SetBackwards( BOOL bVal )
+void SvtSearchOptions::SetBackwards( sal_Bool bVal )
{
pImpl->SetFlag( 1, bVal );
}
-BOOL SvtSearchOptions::IsUseRegularExpression() const
+sal_Bool SvtSearchOptions::IsUseRegularExpression() const
{
return pImpl->GetFlag( 2 );
}
-void SvtSearchOptions::SetUseRegularExpression( BOOL bVal )
+void SvtSearchOptions::SetUseRegularExpression( sal_Bool bVal )
{
pImpl->SetFlag( 2, bVal );
}
-BOOL SvtSearchOptions::IsSearchForStyles() const
+sal_Bool SvtSearchOptions::IsSearchForStyles() const
{
return pImpl->GetFlag( 3 );
}
-void SvtSearchOptions::SetSearchForStyles( BOOL bVal )
+void SvtSearchOptions::SetSearchForStyles( sal_Bool bVal )
{
pImpl->SetFlag( 3, bVal );
}
-BOOL SvtSearchOptions::IsSimilaritySearch() const
+sal_Bool SvtSearchOptions::IsSimilaritySearch() const
{
return pImpl->GetFlag( 4 );
}
-void SvtSearchOptions::SetSimilaritySearch( BOOL bVal )
+void SvtSearchOptions::SetSimilaritySearch( sal_Bool bVal )
{
pImpl->SetFlag( 4, bVal );
}
-BOOL SvtSearchOptions::IsUseAsianOptions() const
+sal_Bool SvtSearchOptions::IsUseAsianOptions() const
{
return pImpl->GetFlag( 5 );
}
-void SvtSearchOptions::SetUseAsianOptions( BOOL bVal )
+void SvtSearchOptions::SetUseAsianOptions( sal_Bool bVal )
{
pImpl->SetFlag( 5, bVal );
}
-BOOL SvtSearchOptions::IsMatchCase() const
+sal_Bool SvtSearchOptions::IsMatchCase() const
{
return pImpl->GetFlag( 6 );
}
-void SvtSearchOptions::SetMatchCase( BOOL bVal )
+void SvtSearchOptions::SetMatchCase( sal_Bool bVal )
{
pImpl->SetFlag( 6, bVal );
}
-BOOL SvtSearchOptions::IsMatchFullHalfWidthForms() const
+sal_Bool SvtSearchOptions::IsMatchFullHalfWidthForms() const
{
return pImpl->GetFlag( 7 );
}
-void SvtSearchOptions::SetMatchFullHalfWidthForms( BOOL bVal )
+void SvtSearchOptions::SetMatchFullHalfWidthForms( sal_Bool bVal )
{
pImpl->SetFlag( 7, bVal );
}
-BOOL SvtSearchOptions::IsMatchHiraganaKatakana() const
+sal_Bool SvtSearchOptions::IsMatchHiraganaKatakana() const
{
return pImpl->GetFlag( 8 );
}
-void SvtSearchOptions::SetMatchHiraganaKatakana( BOOL bVal )
+void SvtSearchOptions::SetMatchHiraganaKatakana( sal_Bool bVal )
{
pImpl->SetFlag( 8, bVal );
}
-BOOL SvtSearchOptions::IsMatchContractions() const
+sal_Bool SvtSearchOptions::IsMatchContractions() const
{
return pImpl->GetFlag( 9 );
}
-void SvtSearchOptions::SetMatchContractions( BOOL bVal )
+void SvtSearchOptions::SetMatchContractions( sal_Bool bVal )
{
pImpl->SetFlag( 9, bVal );
}
-BOOL SvtSearchOptions::IsMatchMinusDashChoon() const
+sal_Bool SvtSearchOptions::IsMatchMinusDashChoon() const
{
return pImpl->GetFlag( 10 );
}
-void SvtSearchOptions::SetMatchMinusDashChoon( BOOL bVal )
+void SvtSearchOptions::SetMatchMinusDashChoon( sal_Bool bVal )
{
pImpl->SetFlag( 10, bVal );
}
-BOOL SvtSearchOptions::IsMatchRepeatCharMarks() const
+sal_Bool SvtSearchOptions::IsMatchRepeatCharMarks() const
{
return pImpl->GetFlag( 11 );
}
-void SvtSearchOptions::SetMatchRepeatCharMarks( BOOL bVal )
+void SvtSearchOptions::SetMatchRepeatCharMarks( sal_Bool bVal )
{
pImpl->SetFlag( 11, bVal );
}
-BOOL SvtSearchOptions::IsMatchVariantFormKanji() const
+sal_Bool SvtSearchOptions::IsMatchVariantFormKanji() const
{
return pImpl->GetFlag( 12 );
}
-void SvtSearchOptions::SetMatchVariantFormKanji( BOOL bVal )
+void SvtSearchOptions::SetMatchVariantFormKanji( sal_Bool bVal )
{
pImpl->SetFlag( 12, bVal );
}
-BOOL SvtSearchOptions::IsMatchOldKanaForms() const
+sal_Bool SvtSearchOptions::IsMatchOldKanaForms() const
{
return pImpl->GetFlag( 13 );
}
-void SvtSearchOptions::SetMatchOldKanaForms( BOOL bVal )
+void SvtSearchOptions::SetMatchOldKanaForms( sal_Bool bVal )
{
pImpl->SetFlag( 13, bVal );
}
-BOOL SvtSearchOptions::IsMatchDiziDuzu() const
+sal_Bool SvtSearchOptions::IsMatchDiziDuzu() const
{
return pImpl->GetFlag( 14 );
}
-void SvtSearchOptions::SetMatchDiziDuzu( BOOL bVal )
+void SvtSearchOptions::SetMatchDiziDuzu( sal_Bool bVal )
{
pImpl->SetFlag( 14, bVal );
}
-BOOL SvtSearchOptions::IsMatchBavaHafa() const
+sal_Bool SvtSearchOptions::IsMatchBavaHafa() const
{
return pImpl->GetFlag( 15 );
}
-void SvtSearchOptions::SetMatchBavaHafa( BOOL bVal )
+void SvtSearchOptions::SetMatchBavaHafa( sal_Bool bVal )
{
pImpl->SetFlag( 15, bVal );
}
-BOOL SvtSearchOptions::IsMatchTsithichiDhizi() const
+sal_Bool SvtSearchOptions::IsMatchTsithichiDhizi() const
{
return pImpl->GetFlag( 16 );
}
-void SvtSearchOptions::SetMatchTsithichiDhizi( BOOL bVal )
+void SvtSearchOptions::SetMatchTsithichiDhizi( sal_Bool bVal )
{
pImpl->SetFlag( 16, bVal );
}
-BOOL SvtSearchOptions::IsMatchHyuiyuByuvyu() const
+sal_Bool SvtSearchOptions::IsMatchHyuiyuByuvyu() const
{
return pImpl->GetFlag( 17 );
}
-void SvtSearchOptions::SetMatchHyuiyuByuvyu( BOOL bVal )
+void SvtSearchOptions::SetMatchHyuiyuByuvyu( sal_Bool bVal )
{
pImpl->SetFlag( 17, bVal );
}
-BOOL SvtSearchOptions::IsMatchSesheZeje() const
+sal_Bool SvtSearchOptions::IsMatchSesheZeje() const
{
return pImpl->GetFlag( 18 );
}
-void SvtSearchOptions::SetMatchSesheZeje( BOOL bVal )
+void SvtSearchOptions::SetMatchSesheZeje( sal_Bool bVal )
{
pImpl->SetFlag( 18, bVal );
}
-BOOL SvtSearchOptions::IsMatchIaiya() const
+sal_Bool SvtSearchOptions::IsMatchIaiya() const
{
return pImpl->GetFlag( 19 );
}
-void SvtSearchOptions::SetMatchIaiya( BOOL bVal )
+void SvtSearchOptions::SetMatchIaiya( sal_Bool bVal )
{
pImpl->SetFlag( 19, bVal );
}
-BOOL SvtSearchOptions::IsMatchKiku() const
+sal_Bool SvtSearchOptions::IsMatchKiku() const
{
return pImpl->GetFlag( 20 );
}
-void SvtSearchOptions::SetMatchKiku( BOOL bVal )
+void SvtSearchOptions::SetMatchKiku( sal_Bool bVal )
{
pImpl->SetFlag( 20, bVal );
}
-BOOL SvtSearchOptions::IsIgnorePunctuation() const
+sal_Bool SvtSearchOptions::IsIgnorePunctuation() const
{
return pImpl->GetFlag( 21 );
}
-void SvtSearchOptions::SetIgnorePunctuation( BOOL bVal )
+void SvtSearchOptions::SetIgnorePunctuation( sal_Bool bVal )
{
pImpl->SetFlag( 21, bVal );
}
-BOOL SvtSearchOptions::IsIgnoreWhitespace() const
+sal_Bool SvtSearchOptions::IsIgnoreWhitespace() const
{
return pImpl->GetFlag( 22 );
}
-void SvtSearchOptions::SetIgnoreWhitespace( BOOL bVal )
+void SvtSearchOptions::SetIgnoreWhitespace( sal_Bool bVal )
{
pImpl->SetFlag( 22, bVal );
}
-BOOL SvtSearchOptions::IsIgnoreProlongedSoundMark() const
+sal_Bool SvtSearchOptions::IsIgnoreProlongedSoundMark() const
{
return pImpl->GetFlag( 23 );
}
-void SvtSearchOptions::SetIgnoreProlongedSoundMark( BOOL bVal )
+void SvtSearchOptions::SetIgnoreProlongedSoundMark( sal_Bool bVal )
{
pImpl->SetFlag( 23, bVal );
}
-BOOL SvtSearchOptions::IsIgnoreMiddleDot() const
+sal_Bool SvtSearchOptions::IsIgnoreMiddleDot() const
{
return pImpl->GetFlag( 24 );
}
-void SvtSearchOptions::SetIgnoreMiddleDot( BOOL bVal )
+void SvtSearchOptions::SetIgnoreMiddleDot( sal_Bool bVal )
{
pImpl->SetFlag( 24, bVal );
}
-BOOL SvtSearchOptions::IsNotes() const
+sal_Bool SvtSearchOptions::IsNotes() const
{
return pImpl->GetFlag( 25 );
}
-void SvtSearchOptions::SetNotes( BOOL bVal )
+void SvtSearchOptions::SetNotes( sal_Bool bVal )
{
pImpl->SetFlag( 25, bVal );
}
diff --git a/unotools/source/config/syslocaleoptions.cxx b/unotools/source/config/syslocaleoptions.cxx
index 35333b0db6a8..64ea0816d210 100644..100755
--- a/unotools/source/config/syslocaleoptions.cxx
+++ b/unotools/source/config/syslocaleoptions.cxx
@@ -88,7 +88,7 @@ class SvtSysLocaleOptions_Impl : public utl::ConfigItem
OUString m_aLocaleString; // en-US or de-DE or empty for SYSTEM
OUString m_aUILocaleString; // en-US or de-DE or empty for SYSTEM
OUString m_aCurrencyString; // USD-en-US or EUR-de-DE
- ULONG m_nBlockedHint; // pending hints
+ sal_uLong m_nBlockedHint; // pending hints
sal_Bool m_bDecimalSeparator; //use decimal separator same as locale
sal_Bool m_bROLocale;
@@ -386,7 +386,7 @@ void SvtSysLocaleOptions_Impl::SetLocaleString( const OUString& rStr )
MakeRealLocale();
MsLangId::setConfiguredSystemLanguage( m_eRealLanguage );
SetModified();
- ULONG nHint = SYSLOCALEOPTIONS_HINT_LOCALE;
+ sal_uLong nHint = SYSLOCALEOPTIONS_HINT_LOCALE;
if ( !m_aCurrencyString.getLength() )
nHint |= SYSLOCALEOPTIONS_HINT_CURRENCY;
NotifyListeners( nHint );
@@ -430,7 +430,7 @@ void SvtSysLocaleOptions_Impl::SetDecimalSeparatorAsLocale( sal_Bool bSet)
void SvtSysLocaleOptions_Impl::Notify( const Sequence< rtl::OUString >& seqPropertyNames )
{
- ULONG nHint = 0;
+ sal_uLong nHint = 0;
Sequence< Any > seqValues = GetProperties( seqPropertyNames );
Sequence< sal_Bool > seqROStates = GetReadOnlyStates( seqPropertyNames );
sal_Int32 nCount = seqPropertyNames.getLength();
diff --git a/unotools/source/config/useroptions.cxx b/unotools/source/config/useroptions.cxx
index 6c63bbfee34b..59f4a14548ca 100644
--- a/unotools/source/config/useroptions.cxx
+++ b/unotools/source/config/useroptions.cxx
@@ -127,8 +127,8 @@ public:
void SetFathersName( const ::rtl::OUString& rNewToken );
void SetApartment( const ::rtl::OUString& rNewToken );
- sal_Bool IsTokenReadonly( USHORT nToken ) const;
- ::rtl::OUString GetToken(USHORT nToken) const;
+ sal_Bool IsTokenReadonly( sal_uInt16 nToken ) const;
+ ::rtl::OUString GetToken(sal_uInt16 nToken) const;
void Notify();
private:
@@ -774,7 +774,7 @@ void SvtUserOptions_Impl::Notify()
// -----------------------------------------------------------------------
-sal_Bool SvtUserOptions_Impl::IsTokenReadonly( USHORT nToken ) const
+sal_Bool SvtUserOptions_Impl::IsTokenReadonly( sal_uInt16 nToken ) const
{
css::uno::Reference< css::beans::XPropertySet > xData(m_xCfg, css::uno::UNO_QUERY);
css::uno::Reference< css::beans::XPropertySetInfo > xInfo = xData->getPropertySetInfo();
@@ -893,7 +893,7 @@ sal_Bool SvtUserOptions_Impl::IsTokenReadonly( USHORT nToken ) const
}
//------------------------------------------------------------------------
-::rtl::OUString SvtUserOptions_Impl::GetToken(USHORT nToken) const
+::rtl::OUString SvtUserOptions_Impl::GetToken(sal_uInt16 nToken) const
{
::rtl::OUString pRet;
switch(nToken)
@@ -1284,13 +1284,13 @@ void SvtUserOptions::SetApartment( const ::rtl::OUString& rNewToken )
// -----------------------------------------------------------------------
-sal_Bool SvtUserOptions::IsTokenReadonly( USHORT nToken ) const
+sal_Bool SvtUserOptions::IsTokenReadonly( sal_uInt16 nToken ) const
{
::osl::MutexGuard aGuard( GetInitMutex() );
return pImp->IsTokenReadonly( nToken );
}
//------------------------------------------------------------------------
-::rtl::OUString SvtUserOptions::GetToken(USHORT nToken) const
+::rtl::OUString SvtUserOptions::GetToken(sal_uInt16 nToken) const
{
::osl::MutexGuard aGuard( GetInitMutex() );
return pImp->GetToken( nToken );
diff --git a/unotools/source/i18n/intlwrapper.cxx b/unotools/source/i18n/intlwrapper.cxx
index 9f52cc60bfeb..aa20045eb17f 100644
--- a/unotools/source/i18n/intlwrapper.cxx
+++ b/unotools/source/i18n/intlwrapper.cxx
@@ -94,7 +94,7 @@ void IntlWrapper::ImplNewCalendar() const
}
-void IntlWrapper::ImplNewCollator( BOOL bCaseSensitive ) const
+void IntlWrapper::ImplNewCollator( sal_Bool bCaseSensitive ) const
{
CollatorWrapper* p = new CollatorWrapper( xSMgr );
if ( bCaseSensitive )
diff --git a/unotools/source/i18n/localedatawrapper.cxx b/unotools/source/i18n/localedatawrapper.cxx
index 8bbe6f182862..1ae7d1c7e0f0 100644
--- a/unotools/source/i18n/localedatawrapper.cxx
+++ b/unotools/source/i18n/localedatawrapper.cxx
@@ -59,8 +59,8 @@
#define LOCALEDATA_SERVICENAME "com.sun.star.i18n.LocaleData"
static const int nDateFormatInvalid = -1;
-static const USHORT nCurrFormatInvalid = 0xffff;
-static const USHORT nCurrFormatDefault = 0;
+static const sal_uInt16 nCurrFormatInvalid = 0xffff;
+static const sal_uInt16 nCurrFormatDefault = 0;
using namespace ::com::sun::star;
using namespace ::com::sun::star::i18n;
@@ -79,7 +79,7 @@ namespace
{};
}
-BYTE LocaleDataWrapper::nLocaleDataChecking = 0;
+sal_uInt8 LocaleDataWrapper::nLocaleDataChecking = 0;
LocaleDataWrapper::LocaleDataWrapper(
const Reference< lang::XMultiServiceFactory > & xSF,
@@ -87,8 +87,8 @@ LocaleDataWrapper::LocaleDataWrapper(
)
:
xSMgr( xSF ),
- bLocaleDataItemValid( FALSE ),
- bReservedWordValid( FALSE )
+ bLocaleDataItemValid( sal_False ),
+ bReservedWordValid( sal_False )
{
setLocale( rLocale );
if ( xSMgr.is() )
@@ -170,7 +170,7 @@ void LocaleDataWrapper::invalidateData()
{
aLocaleItem[j].Erase();
}
- bLocaleDataItemValid = FALSE;
+ bLocaleDataItemValid = sal_False;
}
if ( bReservedWordValid )
{
@@ -178,7 +178,7 @@ void LocaleDataWrapper::invalidateData()
{
aReservedWord[j].Erase();
}
- bReservedWordValid = FALSE;
+ bReservedWordValid = sal_False;
}
xDefaultCalendar.reset();
if (aGrouping.getLength())
@@ -546,7 +546,7 @@ void LocaleDataWrapper::getOneLocaleItemImpl( sal_Int16 nItem )
if ( !bLocaleDataItemValid )
{
aLocaleDataItem = getLocaleItem();
- bLocaleDataItemValid = TRUE;
+ bLocaleDataItemValid = sal_True;
}
switch ( nItem )
{
@@ -612,7 +612,7 @@ void LocaleDataWrapper::getOneReservedWordImpl( sal_Int16 nWord )
if ( !bReservedWordValid )
{
aReservedWordSeq = getReservedWord();
- bReservedWordValid = TRUE;
+ bReservedWordValid = sal_True;
}
DBG_ASSERT( nWord < aReservedWordSeq.getLength(), "getOneReservedWordImpl: which one?" );
if ( nWord < aReservedWordSeq.getLength() )
@@ -721,7 +721,7 @@ const String& LocaleDataWrapper::getCurrBankSymbol() const
}
-USHORT LocaleDataWrapper::getCurrPositiveFormat() const
+sal_uInt16 LocaleDataWrapper::getCurrPositiveFormat() const
{
::utl::ReadWriteGuard aGuard( aMutex );
if ( nCurrPositiveFormat == nCurrFormatInvalid )
@@ -733,7 +733,7 @@ USHORT LocaleDataWrapper::getCurrPositiveFormat() const
}
-USHORT LocaleDataWrapper::getCurrNegativeFormat() const
+sal_uInt16 LocaleDataWrapper::getCurrNegativeFormat() const
{
::utl::ReadWriteGuard aGuard( aMutex );
if ( nCurrNegativeFormat == nCurrFormatInvalid )
@@ -745,7 +745,7 @@ USHORT LocaleDataWrapper::getCurrNegativeFormat() const
}
-USHORT LocaleDataWrapper::getCurrDigits() const
+sal_uInt16 LocaleDataWrapper::getCurrDigits() const
{
::utl::ReadWriteGuard aGuard( aMutex );
if ( nCurrDigits == nCurrFormatInvalid )
@@ -804,13 +804,13 @@ void LocaleDataWrapper::scanCurrFormatImpl( const String& rCode,
const sal_Unicode* const pStop = pStr + rCode.Len();
const sal_Unicode* p = pStr + nStart;
int nInSection = 0;
- BOOL bQuote = FALSE;
+ sal_Bool bQuote = sal_False;
while ( p < pStop )
{
if ( bQuote )
{
if ( *p == '"' && *(p-1) != '\\' )
- bQuote = FALSE;
+ bQuote = sal_False;
}
else
{
@@ -818,7 +818,7 @@ void LocaleDataWrapper::scanCurrFormatImpl( const String& rCode,
{
case '"' :
if ( pStr == p || *(p-1) != '\\' )
- bQuote = TRUE;
+ bQuote = sal_True;
break;
case '-' :
if ( !nInSection && nSign == STRING_NOTFOUND )
@@ -1337,7 +1337,7 @@ static sal_Unicode* ImplAddUNum( sal_Unicode* pBuf, sal_uInt64 nNumber, int nMin
}
-static sal_Unicode* ImplAdd2UNum( sal_Unicode* pBuf, USHORT nNumber, int bLeading )
+static sal_Unicode* ImplAdd2UNum( sal_Unicode* pBuf, sal_uInt16 nNumber, int bLeading )
{
DBG_ASSERT( nNumber < 100, "ImplAdd2UNum() - Number >= 100" );
@@ -1352,7 +1352,7 @@ static sal_Unicode* ImplAdd2UNum( sal_Unicode* pBuf, USHORT nNumber, int bLeadin
}
else
{
- USHORT nTemp = nNumber % 10;
+ sal_uInt16 nTemp = nNumber % 10;
nNumber /= 10;
*pBuf = nNumber + '0';
pBuf++;
@@ -1395,29 +1395,29 @@ inline sal_Unicode* ImplAddString( sal_Unicode* pBuf, const sal_Unicode* pCopyBu
sal_Unicode* LocaleDataWrapper::ImplAddFormatNum( sal_Unicode* pBuf,
- sal_Int64 nNumber, USHORT nDecimals, BOOL bUseThousandSep,
- BOOL bTrailingZeros ) const
+ sal_Int64 nNumber, sal_uInt16 nDecimals, sal_Bool bUseThousandSep,
+ sal_Bool bTrailingZeros ) const
{
sal_Unicode aNumBuf[64];
sal_Unicode* pNumBuf;
- USHORT nNumLen;
- USHORT i = 0;
- BOOL bNeg;
+ sal_uInt16 nNumLen;
+ sal_uInt16 i = 0;
+ sal_Bool bNeg;
// negative number
if ( nNumber < 0 )
{
nNumber *= -1;
- bNeg = TRUE;
+ bNeg = sal_True;
*pBuf = '-';
pBuf++;
}
else
- bNeg = FALSE;
+ bNeg = sal_False;
// convert number
pNumBuf = ImplAddUNum( aNumBuf, (sal_uInt64)nNumber );
- nNumLen = (USHORT)(ULONG)(pNumBuf-aNumBuf);
+ nNumLen = (sal_uInt16)(sal_uLong)(pNumBuf-aNumBuf);
pNumBuf = aNumBuf;
if ( nNumLen <= nDecimals )
@@ -1463,7 +1463,7 @@ sal_Unicode* LocaleDataWrapper::ImplAddFormatNum( sal_Unicode* pBuf,
const String& rThoSep = getNumThousandSep();
// copy number to buffer (excluding decimals)
- USHORT nNumLen2 = nNumLen-nDecimals;
+ sal_uInt16 nNumLen2 = nNumLen-nDecimals;
uno::Sequence< sal_Bool > aGroupPos;
if (bUseThousandSep)
aGroupPos = utl::DigitGroupingIterator::createForwardSequence(
@@ -1484,11 +1484,11 @@ sal_Unicode* LocaleDataWrapper::ImplAddFormatNum( sal_Unicode* pBuf,
{
pBuf = ImplAddString( pBuf, getNumDecimalSep() );
- BOOL bNullEnd = TRUE;
+ sal_Bool bNullEnd = sal_True;
while ( i < nNumLen )
{
if ( *pNumBuf != '0' )
- bNullEnd = FALSE;
+ bNullEnd = sal_False;
*pBuf = *pNumBuf;
pBuf++;
@@ -1514,12 +1514,12 @@ String LocaleDataWrapper::getDate( const Date& rDate ) const
//!TODO: leading zeros et al
sal_Unicode aBuf[128];
sal_Unicode* pBuf = aBuf;
- USHORT nDay = rDate.GetDay();
- USHORT nMonth = rDate.GetMonth();
- USHORT nYear = rDate.GetYear();
- USHORT nYearLen;
+ sal_uInt16 nDay = rDate.GetDay();
+ sal_uInt16 nMonth = rDate.GetMonth();
+ sal_uInt16 nYear = rDate.GetYear();
+ sal_uInt16 nYearLen;
- if ( TRUE /* IsDateCentury() */ )
+ if ( sal_True /* IsDateCentury() */ )
nYearLen = 4;
else
{
@@ -1530,39 +1530,39 @@ String LocaleDataWrapper::getDate( const Date& rDate ) const
switch ( getDateFormat() )
{
case DMY :
- pBuf = ImplAdd2UNum( pBuf, nDay, TRUE /* IsDateDayLeadingZero() */ );
+ pBuf = ImplAdd2UNum( pBuf, nDay, sal_True /* IsDateDayLeadingZero() */ );
pBuf = ImplAddString( pBuf, getDateSep() );
- pBuf = ImplAdd2UNum( pBuf, nMonth, TRUE /* IsDateMonthLeadingZero() */ );
+ pBuf = ImplAdd2UNum( pBuf, nMonth, sal_True /* IsDateMonthLeadingZero() */ );
pBuf = ImplAddString( pBuf, getDateSep() );
pBuf = ImplAddUNum( pBuf, nYear, nYearLen );
break;
case MDY :
- pBuf = ImplAdd2UNum( pBuf, nMonth, TRUE /* IsDateMonthLeadingZero() */ );
+ pBuf = ImplAdd2UNum( pBuf, nMonth, sal_True /* IsDateMonthLeadingZero() */ );
pBuf = ImplAddString( pBuf, getDateSep() );
- pBuf = ImplAdd2UNum( pBuf, nDay, TRUE /* IsDateDayLeadingZero() */ );
+ pBuf = ImplAdd2UNum( pBuf, nDay, sal_True /* IsDateDayLeadingZero() */ );
pBuf = ImplAddString( pBuf, getDateSep() );
pBuf = ImplAddUNum( pBuf, nYear, nYearLen );
break;
default:
pBuf = ImplAddUNum( pBuf, nYear, nYearLen );
pBuf = ImplAddString( pBuf, getDateSep() );
- pBuf = ImplAdd2UNum( pBuf, nMonth, TRUE /* IsDateMonthLeadingZero() */ );
+ pBuf = ImplAdd2UNum( pBuf, nMonth, sal_True /* IsDateMonthLeadingZero() */ );
pBuf = ImplAddString( pBuf, getDateSep() );
- pBuf = ImplAdd2UNum( pBuf, nDay, TRUE /* IsDateDayLeadingZero() */ );
+ pBuf = ImplAdd2UNum( pBuf, nDay, sal_True /* IsDateDayLeadingZero() */ );
}
- return String( aBuf, (xub_StrLen)(ULONG)(pBuf-aBuf) );
+ return String( aBuf, (xub_StrLen)(sal_uLong)(pBuf-aBuf) );
}
-String LocaleDataWrapper::getTime( const Time& rTime, BOOL bSec, BOOL b100Sec ) const
+String LocaleDataWrapper::getTime( const Time& rTime, sal_Bool bSec, sal_Bool b100Sec ) const
{
::utl::ReadWriteGuard aGuard( aMutex, ::utl::ReadWriteGuardMode::nBlockCritical );
//!TODO: leading zeros et al
sal_Unicode aBuf[128];
sal_Unicode* pBuf = aBuf;
- USHORT nHour = rTime.GetHour();
- BOOL bHour12 = FALSE; //!TODO: AM/PM from default time format code
+ sal_uInt16 nHour = rTime.GetHour();
+ sal_Bool bHour12 = sal_False; //!TODO: AM/PM from default time format code
if ( bHour12 )
{
@@ -1574,22 +1574,22 @@ String LocaleDataWrapper::getTime( const Time& rTime, BOOL bSec, BOOL b100Sec )
else
nHour %= 24;
- pBuf = ImplAdd2UNum( pBuf, nHour, TRUE /* IsTimeLeadingZero() */ );
+ pBuf = ImplAdd2UNum( pBuf, nHour, sal_True /* IsTimeLeadingZero() */ );
pBuf = ImplAddString( pBuf, getTimeSep() );
- pBuf = ImplAdd2UNum( pBuf, rTime.GetMin(), TRUE );
+ pBuf = ImplAdd2UNum( pBuf, rTime.GetMin(), sal_True );
if ( bSec )
{
pBuf = ImplAddString( pBuf, getTimeSep() );
- pBuf = ImplAdd2UNum( pBuf, rTime.GetSec(), TRUE );
+ pBuf = ImplAdd2UNum( pBuf, rTime.GetSec(), sal_True );
if ( b100Sec )
{
pBuf = ImplAddString( pBuf, getTime100SecSep() );
- pBuf = ImplAdd2UNum( pBuf, rTime.Get100Sec(), TRUE );
+ pBuf = ImplAdd2UNum( pBuf, rTime.Get100Sec(), sal_True );
}
}
- String aStr( aBuf, (xub_StrLen)(ULONG)(pBuf-aBuf) );
+ String aStr( aBuf, (xub_StrLen)(sal_uLong)(pBuf-aBuf) );
if ( bHour12 )
{
@@ -1626,7 +1626,7 @@ String LocaleDataWrapper::getLongDate( const Date& rDate, CalendarWrapper& rCal,
// day of month
nVal = rCal.getValue( CalendarFieldIndex::DAY_OF_MONTH );
pBuf = ImplAdd2UNum( aBuf, nVal, bDayOfMonthWithLeadingZero );
- String aDay( aBuf, (xub_StrLen)(ULONG)(pBuf-aBuf) );
+ String aDay( aBuf, (xub_StrLen)(sal_uLong)(pBuf-aBuf) );
// month of year
nVal = rCal.getValue( CalendarFieldIndex::MONTH );
String aMonth( rCal.getDisplayName( CalendarDisplayIndex::MONTH, nVal, nDisplayMonth ) );
@@ -1636,7 +1636,7 @@ String LocaleDataWrapper::getLongDate( const Date& rDate, CalendarWrapper& rCal,
pBuf = ImplAddUNum( aBuf, nVal % 100, 2 );
else
pBuf = ImplAddUNum( aBuf, nVal );
- String aYear( aBuf, (xub_StrLen)(ULONG)(pBuf-aBuf) );
+ String aYear( aBuf, (xub_StrLen)(sal_uLong)(pBuf-aBuf) );
// concatenate
switch ( getLongDateFormat() )
{
@@ -1665,7 +1665,7 @@ String LocaleDataWrapper::getLongDate( const Date& rDate, CalendarWrapper& rCal,
}
-String LocaleDataWrapper::getDuration( const Time& rTime, BOOL bSec, BOOL b100Sec ) const
+String LocaleDataWrapper::getDuration( const Time& rTime, sal_Bool bSec, sal_Bool b100Sec ) const
{
::utl::ReadWriteGuard aGuard( aMutex, ::utl::ReadWriteGuardMode::nBlockCritical );
sal_Unicode aBuf[128];
@@ -1674,31 +1674,31 @@ String LocaleDataWrapper::getDuration( const Time& rTime, BOOL bSec, BOOL b100Se
if ( rTime < Time( 0 ) )
pBuf = ImplAddString( pBuf, ' ' );
- if ( TRUE /* IsTimeLeadingZero() */ )
+ if ( sal_True /* IsTimeLeadingZero() */ )
pBuf = ImplAddUNum( pBuf, rTime.GetHour(), 2 );
else
pBuf = ImplAddUNum( pBuf, rTime.GetHour() );
pBuf = ImplAddString( pBuf, getTimeSep() );
- pBuf = ImplAdd2UNum( pBuf, rTime.GetMin(), TRUE );
+ pBuf = ImplAdd2UNum( pBuf, rTime.GetMin(), sal_True );
if ( bSec )
{
pBuf = ImplAddString( pBuf, getTimeSep() );
- pBuf = ImplAdd2UNum( pBuf, rTime.GetSec(), TRUE );
+ pBuf = ImplAdd2UNum( pBuf, rTime.GetSec(), sal_True );
if ( b100Sec )
{
pBuf = ImplAddString( pBuf, getTime100SecSep() );
- pBuf = ImplAdd2UNum( pBuf, rTime.Get100Sec(), TRUE );
+ pBuf = ImplAdd2UNum( pBuf, rTime.Get100Sec(), sal_True );
}
}
- return String( aBuf, (xub_StrLen)(ULONG)(pBuf-aBuf) );
+ return String( aBuf, (xub_StrLen)(sal_uLong)(pBuf-aBuf) );
}
// --- simple number formatting ---------------------------------------
-inline size_t ImplGetNumberStringLengthGuess( const LocaleDataWrapper& rLoc, USHORT nDecimals )
+inline size_t ImplGetNumberStringLengthGuess( const LocaleDataWrapper& rLoc, sal_uInt16 nDecimals )
{
// approximately 3.2 bits per digit
const size_t nDig = ((sizeof(sal_Int64) * 8) / 3) + 1;
@@ -1710,8 +1710,8 @@ inline size_t ImplGetNumberStringLengthGuess( const LocaleDataWrapper& rLoc, USH
}
-String LocaleDataWrapper::getNum( sal_Int64 nNumber, USHORT nDecimals,
- BOOL bUseThousandSep, BOOL bTrailingZeros ) const
+String LocaleDataWrapper::getNum( sal_Int64 nNumber, sal_uInt16 nDecimals,
+ sal_Bool bUseThousandSep, sal_Bool bTrailingZeros ) const
{
::utl::ReadWriteGuard aGuard( aMutex, ::utl::ReadWriteGuardMode::nBlockCritical );
sal_Unicode aBuf[128]; // big enough for 64-bit long and crazy grouping
@@ -1722,7 +1722,7 @@ String LocaleDataWrapper::getNum( sal_Int64 nNumber, USHORT nDecimals,
sal_Unicode* pBuf = ImplAddFormatNum( pBuffer, nNumber, nDecimals,
bUseThousandSep, bTrailingZeros );
- String aStr( pBuffer, (xub_StrLen)(ULONG)(pBuf-pBuffer) );
+ String aStr( pBuffer, (xub_StrLen)(sal_uLong)(pBuf-pBuffer) );
if ( pBuffer != aBuf )
delete [] pBuffer;
@@ -1730,8 +1730,8 @@ String LocaleDataWrapper::getNum( sal_Int64 nNumber, USHORT nDecimals,
}
-String LocaleDataWrapper::getCurr( sal_Int64 nNumber, USHORT nDecimals,
- const String& rCurrencySymbol, BOOL bUseThousandSep ) const
+String LocaleDataWrapper::getCurr( sal_Int64 nNumber, sal_uInt16 nDecimals,
+ const String& rCurrencySymbol, sal_Bool bUseThousandSep ) const
{
::utl::ReadWriteGuard aGuard( aMutex, ::utl::ReadWriteGuardMode::nBlockCritical );
sal_Unicode aBuf[192];
@@ -1748,26 +1748,26 @@ String LocaleDataWrapper::getCurr( sal_Int64 nNumber, USHORT nDecimals,
new sal_Unicode[ rCurrencySymbol.Len() + nGuess + 20 ]);
sal_Unicode* pBuf = pBuffer;
- BOOL bNeg;
+ sal_Bool bNeg;
if ( nNumber < 0 )
{
- bNeg = TRUE;
+ bNeg = sal_True;
nNumber *= -1;
}
else
- bNeg = FALSE;
+ bNeg = sal_False;
// convert number
sal_Unicode* pEndNumBuf = ImplAddFormatNum( pNumBuffer, nNumber, nDecimals,
- bUseThousandSep, TRUE );
- xub_StrLen nNumLen = (xub_StrLen)(ULONG)(pEndNumBuf-pNumBuffer);
+ bUseThousandSep, sal_True );
+ xub_StrLen nNumLen = (xub_StrLen)(sal_uLong)(pEndNumBuf-pNumBuffer);
// replace zeros with zero character
if ( (cZeroChar != '0') && nDecimals /* && IsNumTrailingZeros() */ )
{
sal_Unicode* pTempBuf;
- USHORT i;
- BOOL bZero = TRUE;
+ sal_uInt16 i;
+ sal_Bool bZero = sal_True;
pTempBuf = pNumBuffer+nNumLen-nDecimals;
i = 0;
@@ -1775,7 +1775,7 @@ String LocaleDataWrapper::getCurr( sal_Int64 nNumber, USHORT nDecimals,
{
if ( *pTempBuf != '0' )
{
- bZero = FALSE;
+ bZero = sal_False;
break;
}
@@ -1921,7 +1921,7 @@ String LocaleDataWrapper::getCurr( sal_Int64 nNumber, USHORT nDecimals,
}
}
- String aNumber( pBuffer, (xub_StrLen)(ULONG)(pBuf-pBuffer) );
+ String aNumber( pBuffer, (xub_StrLen)(sal_uLong)(pBuf-pBuffer) );
if ( pBuffer != aBuf )
delete [] pBuffer;
@@ -1981,7 +1981,7 @@ void LocaleDataWrapper::evaluateLocaleDataChecking()
// accesses, since we want to assign the result to the static member
// variable and would need to dereference the pointer returned and assign
// the value unguarded. This is the same pattern manually coded.
- BYTE nCheck = nLocaleDataChecking;
+ sal_uInt8 nCheck = nLocaleDataChecking;
if (!nCheck)
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex());
diff --git a/unotools/source/i18n/textsearch.cxx b/unotools/source/i18n/textsearch.cxx
index 3f722adb0dba..c40654ebef1f 100644
--- a/unotools/source/i18n/textsearch.cxx
+++ b/unotools/source/i18n/textsearch.cxx
@@ -40,6 +40,7 @@
#include <unotools/charclass.hxx>
#include <comphelper/processfactory.hxx>
#include <unotools/textsearch.hxx>
+#include <rtl/instance.hxx>
using namespace ::com::sun::star::util;
using namespace ::com::sun::star::uno;
@@ -52,9 +53,9 @@ namespace utl
SearchParam::SearchParam( const String &rText,
SearchType eType,
- BOOL bCaseSensitive,
- BOOL bWrdOnly,
- BOOL bSearchInSel )
+ sal_Bool bCaseSensitive,
+ sal_Bool bWrdOnly,
+ sal_Bool bSearchInSel )
{
sSrchStr = rText;
eSrchType = eType;
@@ -66,7 +67,7 @@ SearchParam::SearchParam( const String &rText,
nTransliterationFlags = 0;
// Werte fuer "Gewichtete Levenshtein-Distanz"
- bLEV_Relaxed = TRUE;
+ bLEV_Relaxed = sal_True;
nLEV_OtherX = 2;
nLEV_ShorterY = 1;
nLEV_LongerZ = 3;
@@ -90,13 +91,6 @@ SearchParam::SearchParam( const SearchParam& rParam )
nTransliterationFlags = rParam.nTransliterationFlags;
}
-// Klasse zum Suchen eines Strings in einem Text. Es wird genau nach
-// dem String gesucht.
-// ( Die Unterscheidung der Gross/Klein-Schreibung kann mit einen Flag
-// unterdrueckt werden )
-
-TextSearch::CachedTextSearch TextSearch::maCache;
-
static bool lcl_Equals( const SearchOptions& rSO1, const SearchOptions& rSO2 )
{
return rSO1.algorithmType == rSO2.algorithmType &&
@@ -112,27 +106,42 @@ static bool lcl_Equals( const SearchOptions& rSO1, const SearchOptions& rSO2 )
rSO1.transliterateFlags == rSO2.transliterateFlags;
}
+namespace
+{
+ struct CachedTextSearch
+ {
+ ::osl::Mutex mutex;
+ ::com::sun::star::util::SearchOptions Options;
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XTextSearch > xTextSearch;
+ };
+
+ struct theCachedTextSearch
+ : public rtl::Static< CachedTextSearch, theCachedTextSearch > {};
+}
+
Reference<XTextSearch> TextSearch::getXTextSearch( const SearchOptions& rPara )
{
- osl::MutexGuard aGuard(maCache.mutex);
+ CachedTextSearch &rCache = theCachedTextSearch::get();
+
+ osl::MutexGuard aGuard(rCache.mutex);
- if ( lcl_Equals(maCache.Options, rPara) )
- return maCache.xTextSearch;
+ if ( lcl_Equals(rCache.Options, rPara) )
+ return rCache.xTextSearch;
try
{
Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
- maCache.xTextSearch.set( xMSF->createInstance(
+ rCache.xTextSearch.set( xMSF->createInstance(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.util.TextSearch" ) ) ), UNO_QUERY_THROW );
- maCache.xTextSearch->setOptions( rPara );
- maCache.Options = rPara;
+ rCache.xTextSearch->setOptions( rPara );
+ rCache.Options = rPara;
}
catch ( Exception& )
{
DBG_ERRORFILE( "TextSearch ctor: Exception caught!" );
}
- return maCache.xTextSearch;
+ return rCache.xTextSearch;
}
TextSearch::TextSearch(const SearchParam & rParam, LanguageType eLang )
@@ -299,8 +308,8 @@ void TextSearch::ReplaceBackReferences( String& rReplaceStr, const String &rStr,
{
if( rReplaceStr.GetChar( nPos ) == '&')
{
- USHORT nStart = (USHORT)(rResult.startOffset[0]);
- USHORT nLength = (USHORT)(rResult.endOffset[0] - rResult.startOffset[0]);
+ sal_uInt16 nStart = (sal_uInt16)(rResult.startOffset[0]);
+ sal_uInt16 nLength = (sal_uInt16)(rResult.endOffset[0] - rResult.startOffset[0]);
rReplaceStr.Erase( nPos, 1 ); // delete ampersand
// replace by found string
rReplaceStr.Insert( rStr, nStart, nLength, nPos );
@@ -329,17 +338,17 @@ void TextSearch::ReplaceBackReferences( String& rReplaceStr, const String &rStr,
int i = sFndChar - '0'; // index
if(i < rResult.subRegExpressions)
{
- USHORT nSttReg = (USHORT)(rResult.startOffset[i]);
- USHORT nRegLen = (USHORT)(rResult.endOffset[i]);
+ sal_uInt16 nSttReg = (sal_uInt16)(rResult.startOffset[i]);
+ sal_uInt16 nRegLen = (sal_uInt16)(rResult.endOffset[i]);
if( nRegLen > nSttReg )
nRegLen = nRegLen - nSttReg;
else
{
nRegLen = nSttReg - nRegLen;
- nSttReg = (USHORT)(rResult.endOffset[i]);
+ nSttReg = (sal_uInt16)(rResult.endOffset[i]);
}
// Copy reference from found string
- sTmp = rStr.Copy((USHORT)nSttReg, (USHORT)nRegLen);
+ sTmp = rStr.Copy((sal_uInt16)nSttReg, (sal_uInt16)nRegLen);
// insert
rReplaceStr.Insert( sTmp, nPos );
// and step over
diff --git a/unotools/source/misc/fontcvt.cxx b/unotools/source/misc/fontcvt.cxx
index 2bb682e4915b..5f5011d9d863 100644
--- a/unotools/source/misc/fontcvt.cxx
+++ b/unotools/source/misc/fontcvt.cxx
@@ -1376,7 +1376,7 @@ sal_Unicode ConvertChar::RecodeChar( sal_Unicode cChar ) const
// from an traditional symbol font (i.e. U+F020..U+F0FF)
void ConvertChar::RecodeString( String& rStr, xub_StrLen nIndex, xub_StrLen nLen ) const
{
- ULONG nLastIndex = (ULONG)nIndex + nLen;
+ sal_uLong nLastIndex = (sal_uLong)nIndex + nLen;
if( nLastIndex > rStr.Len() )
nLastIndex = rStr.Len();
@@ -1460,7 +1460,7 @@ const ConvertChar* ConvertChar::GetRecodeData( const String& rOrgFontName, const
//=======================================================================
FontToSubsFontConverter CreateFontToSubsFontConverter(
- const String& rOrgName, ULONG nFlags )
+ const String& rOrgName, sal_uLong nFlags )
{
const ConvertChar* pCvt = NULL;
diff --git a/unotools/source/misc/fontdefs.cxx b/unotools/source/misc/fontdefs.cxx
index c1c222755599..c93175ed1c73 100644
--- a/unotools/source/misc/fontdefs.cxx
+++ b/unotools/source/misc/fontdefs.cxx
@@ -519,7 +519,7 @@ void AddTokenFontName( String& rName, const String& rNewToken )
// =======================================================================
-String GetSubsFontName( const String& rName, ULONG nFlags )
+String GetSubsFontName( const String& rName, sal_uLong nFlags )
{
String aName;
diff --git a/unotools/source/streaming/streamwrap.cxx b/unotools/source/streaming/streamwrap.cxx
index eefaa7498070..b9d0185ffd48 100644
--- a/unotools/source/streaming/streamwrap.cxx
+++ b/unotools/source/streaming/streamwrap.cxx
@@ -181,7 +181,7 @@ void OInputStreamWrapper::checkError() const
//------------------------------------------------------------------------------
OSeekableInputStreamWrapper::OSeekableInputStreamWrapper(SvStream& _rStream)
{
- SetStream( &_rStream, FALSE );
+ SetStream( &_rStream, sal_False );
}
//------------------------------------------------------------------------------
@@ -328,7 +328,7 @@ sal_Int64 SAL_CALL OSeekableOutputStreamWrapper::getLength( ) throw (IOExceptio
//------------------------------------------------------------------------------
OStreamWrapper::OStreamWrapper(SvStream& _rStream)
{
- SetStream( &_rStream, FALSE );
+ SetStream( &_rStream, sal_False );
}
//------------------------------------------------------------------------------
diff --git a/unotools/source/ucbhelper/localfilehelper.cxx b/unotools/source/ucbhelper/localfilehelper.cxx
index 5ddd1f811923..be855cd960af 100644
--- a/unotools/source/ucbhelper/localfilehelper.cxx
+++ b/unotools/source/ucbhelper/localfilehelper.cxx
@@ -223,10 +223,10 @@ DECLARE_LIST( StringList_Impl, ::rtl::OUString* )
if ( pFiles )
{
- ULONG nCount = pFiles->Count();
+ sal_uLong nCount = pFiles->Count();
Sequence < ::rtl::OUString > aRet( nCount );
::rtl::OUString* pRet = aRet.getArray();
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
::rtl::OUString* pFile = pFiles->GetObject(i);
pRet[i] = *( pFile );
diff --git a/unotools/source/ucbhelper/ucbhelper.cxx b/unotools/source/ucbhelper/ucbhelper.cxx
index 8befb8a0f209..f363e8d1153d 100644
--- a/unotools/source/ucbhelper/ucbhelper.cxx
+++ b/unotools/source/ucbhelper/ucbhelper.cxx
@@ -366,10 +366,10 @@ Sequence < OUString > UCBContentHelper::GetFolderContents( const String& rFolder
if ( pFiles )
{
- ULONG nCount = pFiles->Count();
+ sal_uLong nCount = pFiles->Count();
Sequence < OUString > aRet( nCount );
OUString* pRet = aRet.getArray();
- for ( ULONG i = 0; i < nCount; ++i )
+ for ( sal_uLong i = 0; i < nCount; ++i )
{
OUString* pFile = pFiles->GetObject(i);
pRet[i] = *( pFile );
@@ -447,10 +447,10 @@ Sequence < OUString > UCBContentHelper::GetResultSet( const String& rURL )
if ( pList )
{
- ULONG nCount = pList->Count();
+ sal_uLong nCount = pList->Count();
Sequence < OUString > aRet( nCount );
OUString* pRet = aRet.getArray();
- for ( ULONG i = 0; i < nCount; ++i )
+ for ( sal_uLong i = 0; i < nCount; ++i )
{
OUString* pEntry = pList->GetObject(i);
pRet[i] = *( pEntry );
@@ -626,9 +626,9 @@ sal_Bool UCBContentHelper::HasParentFolder( const String& rFolder )
// -----------------------------------------------------------------------
-ULONG UCBContentHelper::GetSize( const String& rContent )
+sal_uLong UCBContentHelper::GetSize( const String& rContent )
{
- ULONG nSize = 0;
+ sal_uLong nSize = 0;
sal_Int64 nTemp = 0;
INetURLObject aObj( rContent );
DBG_ASSERT( aObj.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" );
@@ -643,7 +643,7 @@ ULONG UCBContentHelper::GetSize( const String& rContent )
catch( ::com::sun::star::uno::Exception& )
{
}
- nSize = (UINT32)nTemp;
+ nSize = (sal_uInt32)nTemp;
return nSize;
}
@@ -679,9 +679,9 @@ sal_Bool UCBContentHelper::IsYounger( const String& rIsYoung, const String& rIsO
}
// -----------------------------------------------------------------------
-sal_Bool UCBContentHelper::Find( const String& rFolder, const String& rName, String& rFile, BOOL bAllowWildCards )
+sal_Bool UCBContentHelper::Find( const String& rFolder, const String& rName, String& rFile, sal_Bool bAllowWildCards )
{
- BOOL bWild = bAllowWildCards && ( rName.Search( '*' ) != STRING_NOTFOUND || rName.Search( '?' ) != STRING_NOTFOUND );
+ sal_Bool bWild = bAllowWildCards && ( rName.Search( '*' ) != STRING_NOTFOUND || rName.Search( '?' ) != STRING_NOTFOUND );
sal_Bool bRet = sal_False;
@@ -689,7 +689,7 @@ sal_Bool UCBContentHelper::Find( const String& rFolder, const String& rName, Str
Sequence< ::rtl::OUString > aFiles = GetFolderContents( rFolder, sal_False );
const ::rtl::OUString* pFiles = aFiles.getConstArray();
- UINT32 i, nCount = aFiles.getLength();
+ sal_uInt32 i, nCount = aFiles.getLength();
for ( i = 0; i < nCount; ++i )
{
// get the last name of the URLs and compare it with rName
@@ -740,7 +740,7 @@ sal_Bool UCBContentHelper::Exists( const String& rURL )
Sequence< ::rtl::OUString > aFiles = GetFolderContents( aObj.GetMainURL( INetURLObject::NO_DECODE ), sal_True, sal_False );
const ::rtl::OUString* pFiles = aFiles.getConstArray();
- UINT32 i, nCount = aFiles.getLength();
+ sal_uInt32 i, nCount = aFiles.getLength();
for ( i = 0; i < nCount; ++i )
{
// get the last name of the URLs and compare it with rName
@@ -759,18 +759,18 @@ sal_Bool UCBContentHelper::Exists( const String& rURL )
}
// -----------------------------------------------------------------------
-sal_Bool UCBContentHelper::FindInPath( const String& rPath, const String& rName, String& rFile, char cDelim, BOOL bAllowWildCards )
+sal_Bool UCBContentHelper::FindInPath( const String& rPath, const String& rName, String& rFile, char cDelim, sal_Bool bAllowWildCards )
{
// extract the single folder names from the path variable and try to find the file in one of these folders
- USHORT nTokenCount = rPath.GetTokenCount( cDelim );
- for ( USHORT nToken = 0; nToken < nTokenCount; ++nToken )
+ sal_uInt16 nTokenCount = rPath.GetTokenCount( cDelim );
+ for ( sal_uInt16 nToken = 0; nToken < nTokenCount; ++nToken )
{
String aPath = rPath.GetToken( nToken, cDelim );
if ( Find( aPath, rName, rFile, bAllowWildCards ) )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx
index 9f4c39b397e1..71640c6e5b08 100644
--- a/unotools/source/ucbhelper/ucblockbytes.cxx
+++ b/unotools/source/ucbhelper/ucblockbytes.cxx
@@ -1284,7 +1284,7 @@ UcbLockBytes::UcbLockBytes( UcbLockBytesHandler* pHandler )
, m_bDontClose( sal_False )
, m_bStreamValid (sal_False)
{
- SetSynchronMode( TRUE );
+ SetSynchronMode( sal_True );
}
//----------------------------------------------------------------------------
@@ -1423,13 +1423,13 @@ void UcbLockBytes::terminate_Impl()
}
//----------------------------------------------------------------------------
-void UcbLockBytes::SetSynchronMode (BOOL bSynchron)
+void UcbLockBytes::SetSynchronMode (sal_Bool bSynchron)
{
SvLockBytes::SetSynchronMode (bSynchron);
}
//----------------------------------------------------------------------------
-ErrCode UcbLockBytes::ReadAt ( ULONG nPos, void *pBuffer, ULONG nCount, ULONG *pRead) const
+ErrCode UcbLockBytes::ReadAt ( sal_uLong nPos, void *pBuffer, sal_uLong nCount, sal_uLong *pRead) const
{
if ( IsSynchronMode() )
{
@@ -1488,13 +1488,13 @@ ErrCode UcbLockBytes::ReadAt ( ULONG nPos, void *pBuffer, ULONG nCount, ULONG *p
rtl_copyMemory (pBuffer, aData.getConstArray(), nSize);
if (pRead)
- *pRead = ULONG(nSize);
+ *pRead = sal_uLong(nSize);
return ERRCODE_NONE;
}
//----------------------------------------------------------------------------
-ErrCode UcbLockBytes::WriteAt ( ULONG nPos, const void *pBuffer, ULONG nCount, ULONG *pWritten)
+ErrCode UcbLockBytes::WriteAt ( sal_uLong nPos, const void *pBuffer, sal_uLong nCount, sal_uLong *pWritten)
{
if ( pWritten )
*pWritten = 0;
@@ -1552,11 +1552,11 @@ ErrCode UcbLockBytes::Flush() const
}
//----------------------------------------------------------------------------
-ErrCode UcbLockBytes::SetSize (ULONG nNewSize)
+ErrCode UcbLockBytes::SetSize (sal_uLong nNewSize)
{
SvLockBytesStat aStat;
Stat( &aStat, (SvLockBytesStatFlag) 0 );
- ULONG nSize = aStat.nSize;
+ sal_uLong nSize = aStat.nSize;
if ( nSize > nNewSize )
{
@@ -1573,8 +1573,8 @@ ErrCode UcbLockBytes::SetSize (ULONG nNewSize)
if ( nSize < nNewSize )
{
- ULONG nDiff = nNewSize-nSize, nCount=0;
- BYTE* pBuffer = new BYTE[ nDiff ];
+ sal_uLong nDiff = nNewSize-nSize, nCount=0;
+ sal_uInt8* pBuffer = new sal_uInt8[ nDiff ];
memset(pBuffer, 0, nDiff); // initialize for enhanced security
WriteAt( nSize, pBuffer, nDiff, &nCount );
delete[] pBuffer;
@@ -1612,7 +1612,7 @@ ErrCode UcbLockBytes::Stat( SvLockBytesStat *pStat, SvLockBytesStatFlag) const
try
{
- pStat->nSize = ULONG(xSeekable->getLength());
+ pStat->nSize = sal_uLong(xSeekable->getLength());
}
catch (IOException)
{
diff --git a/vcl/aqua/inc/aqua11yfactory.h b/vcl/aqua/inc/aqua11yfactory.h
index 1982093f8bba..30f355dd502c 100644
--- a/vcl/aqua/inc/aqua11yfactory.h
+++ b/vcl/aqua/inc/aqua11yfactory.h
@@ -38,8 +38,8 @@
+(void)insertIntoWrapperRepository: (NSView *) viewElement forAccessibleContext: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) rxAccessibleContext;
+(AquaA11yWrapper *)wrapperForAccessible: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessible >) rxAccessible;
+(AquaA11yWrapper *)wrapperForAccessibleContext: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) rxAccessibleContext;
-+(AquaA11yWrapper *)wrapperForAccessibleContext: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) rxAccessibleContext createIfNotExists:(MacOSBOOL) bCreate;
-+(AquaA11yWrapper *)wrapperForAccessibleContext: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) rxAccessibleContext createIfNotExists:(MacOSBOOL) bCreate asRadioGroup:(MacOSBOOL) asRadioGroup;
++(AquaA11yWrapper *)wrapperForAccessibleContext: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) rxAccessibleContext createIfNotExists:(BOOL) bCreate;
++(AquaA11yWrapper *)wrapperForAccessibleContext: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) rxAccessibleContext createIfNotExists:(BOOL) bCreate asRadioGroup:(BOOL) asRadioGroup;
+(void)removeFromWrapperRepositoryFor: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) rxAccessibleContext;
+(void)registerView: (NSView *) theView;
+(void)revokeView: (NSView *) theViewt;
diff --git a/vcl/aqua/inc/aqua11ywrapper.h b/vcl/aqua/inc/aqua11ywrapper.h
index 079dcfe7f112..44640966d760 100644
--- a/vcl/aqua/inc/aqua11ywrapper.h
+++ b/vcl/aqua/inc/aqua11ywrapper.h
@@ -62,16 +62,16 @@ struct ReferenceWrapper
ReferenceWrapper * mpReferenceWrapper;
NSString * mpDefaultFontname;
float mDefaultFontsize;
- MacOSBOOL mActsAsRadioGroup;
- MacOSBOOL mIsTableCell;
+ BOOL mActsAsRadioGroup;
+ BOOL mIsTableCell;
}
// NSAccessibility Protocol
-(id)accessibilityAttributeValue:(NSString *)attribute;
--(MacOSBOOL)accessibilityIsIgnored;
+-(BOOL)accessibilityIsIgnored;
-(NSArray *)accessibilityAttributeNames;
--(MacOSBOOL)accessibilityIsAttributeSettable:(NSString *)attribute;
+-(BOOL)accessibilityIsAttributeSettable:(NSString *)attribute;
-(NSArray *)accessibilityParameterizedAttributeNames;
--(MacOSBOOL)accessibilitySetOverrideValue:(id)value forAttribute:(NSString *)attribute;
+-(BOOL)accessibilitySetOverrideValue:(id)value forAttribute:(NSString *)attribute;
-(void)accessibilitySetValue:(id)value forAttribute:(NSString *)attribute;
-(id)accessibilityAttributeValue:(NSString *)attribute forParameter:(id)parameter;
-(id)accessibilityFocusedUIElement;
@@ -92,8 +92,8 @@ struct ReferenceWrapper
-(id)orientationAttribute;
-(id)windowAttribute;
// Wrapper-specific
--(void)setActsAsRadioGroup:(MacOSBOOL)actsAsRadioGroup;
--(MacOSBOOL)actsAsRadioGroup;
+-(void)setActsAsRadioGroup:(BOOL)actsAsRadioGroup;
+-(BOOL)actsAsRadioGroup;
-(NSView *)viewElementForParent;
-(id)initWithAccessibleContext: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) anAccessibleContext;
-(void) setDefaults: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) rxAccessibleContext;
@@ -102,7 +102,7 @@ struct ReferenceWrapper
-(NSString *)defaultFontname;
-(void)setDefaultFontsize:(float)fontsize;
-(float)defaultFontsize;
-+(void)setPopupMenuOpen:(MacOSBOOL)popupMenuOpen;
++(void)setPopupMenuOpen:(BOOL)popupMenuOpen;
-(::com::sun::star::accessibility::XAccessibleAction *)accessibleAction;
-(::com::sun::star::accessibility::XAccessibleContext *)accessibleContext;
-(::com::sun::star::accessibility::XAccessibleComponent *)accessibleComponent;
diff --git a/vcl/aqua/inc/aquaprintview.h b/vcl/aqua/inc/aquaprintview.h
index 84d9dd54d6aa..391a9546f63a 100755
--- a/vcl/aqua/inc/aquaprintview.h
+++ b/vcl/aqua/inc/aquaprintview.h
@@ -51,7 +51,7 @@ struct PrintAccessoryViewState
AquaSalInfoPrinter* mpInfoPrinter;
}
-(id)initWithController: (vcl::PrinterController*)pController withInfoPrinter: (AquaSalInfoPrinter*)pInfoPrinter;
--(MacOSBOOL)knowsPageRange: (NSRangePointer)range;
+-(BOOL)knowsPageRange: (NSRangePointer)range;
-(NSRect)rectForPage: (int)page;
-(NSPoint)locationOfPrintRect: (NSRect)aRect;
-(void)drawRect: (NSRect)rect;
diff --git a/vcl/aqua/inc/salbmp.h b/vcl/aqua/inc/salbmp.h
index 1c427cce0cd5..c95c326f1548 100644
--- a/vcl/aqua/inc/salbmp.h
+++ b/vcl/aqua/inc/salbmp.h
@@ -70,15 +70,15 @@ public:
public:
// SalBitmap methods
- bool Create( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal );
+ bool Create( const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal );
bool Create( const SalBitmap& rSalBmp );
bool Create( const SalBitmap& rSalBmp, SalGraphics* pGraphics );
- bool Create( const SalBitmap& rSalBmp, USHORT nNewBitCount );
+ bool Create( const SalBitmap& rSalBmp, sal_uInt16 nNewBitCount );
void Destroy();
Size GetSize() const;
- USHORT GetBitCount() const;
+ sal_uInt16 GetBitCount() const;
BitmapBuffer *AcquireBuffer( bool bReadOnly );
void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly );
diff --git a/vcl/aqua/inc/saldata.hxx b/vcl/aqua/inc/saldata.hxx
index fb7c8cddd6d4..dd5df5751973 100644
--- a/vcl/aqua/inc/saldata.hxx
+++ b/vcl/aqua/inc/saldata.hxx
@@ -131,7 +131,7 @@ inline SalData *GetAppSalData() { return (SalData*)ImplGetAppSVData()->mpSalData
// --- Prototypes ---
-BOOL ImplSalYieldMutexTryToAcquire();
+sal_Bool ImplSalYieldMutexTryToAcquire();
void ImplSalYieldMutexAcquire();
void ImplSalYieldMutexRelease();
diff --git a/vcl/aqua/inc/salframe.h b/vcl/aqua/inc/salframe.h
index c2ded3267f45..06ca66f8803f 100644
--- a/vcl/aqua/inc/salframe.h
+++ b/vcl/aqua/inc/salframe.h
@@ -79,10 +79,10 @@ public:
bool mbSized:1;
bool mbPresentation:1;
- ULONG mnStyle;
+ sal_uLong mnStyle;
unsigned int mnStyleMask; // our style mask from NSWindow creation
- ULONG mnLastEventTime;
+ sal_uLong mnLastEventTime;
unsigned int mnLastModifierFlags;
AquaSalMenu* mpMenu;
@@ -99,7 +99,7 @@ public:
Rectangle maInvalidRect;
- ULONG mnICOptions;
+ sal_uLong mnICOptions;
boost::shared_ptr< Timer > mpActivityTimer; // Timer to prevent system sleep during presentation
public:
@@ -109,43 +109,43 @@ public:
@throws std::runtime_error in case window creation fails
*/
- AquaSalFrame( SalFrame* pParent, ULONG salFrameStyle );
+ AquaSalFrame( SalFrame* pParent, sal_uLong salFrameStyle );
virtual ~AquaSalFrame();
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 SetRepresentedURL( const rtl::OUString& );
virtual void SetMenu( SalMenu* pSalMenu );
virtual void DrawMenuBar();
- virtual void Show( BOOL bVisible, BOOL bNoActivate = FALSE );
- virtual void Enable( BOOL bEnable );
+ virtual void Show( sal_Bool bVisible, sal_Bool bNoActivate = sal_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 );
virtual void Flush( void );
virtual void Flush( const Rectangle& );
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 );
@@ -162,7 +162,7 @@ public:
// set clip region to none (-> rectangular windows, normal state)
virtual void ResetClipRegion();
// start setting the clipregion consisting of nRects rectangles
- virtual void BeginSetClipRegion( ULONG nRects );
+ virtual void BeginSetClipRegion( sal_uLong nRects );
// add a rectangle to the clip region
virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
// done setting up the clipregion
diff --git a/vcl/aqua/inc/salframeview.h b/vcl/aqua/inc/salframeview.h
index e7d9a14b52aa..5e93839719b5 100755
--- a/vcl/aqua/inc/salframeview.h
+++ b/vcl/aqua/inc/salframeview.h
@@ -36,7 +36,7 @@
id mDraggingDestinationHandler;
}
-(id)initWithSalFrame: (AquaSalFrame*)pFrame;
--(MacOSBOOL)canBecomeKeyWindow;
+-(BOOL)canBecomeKeyWindow;
-(void)displayIfNeeded;
-(void)windowDidBecomeKey: (NSNotification*)pNotification;
-(void)windowDidResignKey: (NSNotification*)pNotification;
@@ -45,10 +45,10 @@
-(void)windowDidResize: (NSNotification*)pNotification;
-(void)windowDidMiniaturize: (NSNotification*)pNotification;
-(void)windowDidDeminiaturize: (NSNotification*)pNotification;
--(MacOSBOOL)windowShouldClose: (NSNotification*)pNotification;
+-(BOOL)windowShouldClose: (NSNotification*)pNotification;
-(void)dockMenuItemTriggered: (id)sender;
-(AquaSalFrame*)getSalFrame;
--(MacOSBOOL)containsMouse;
+-(BOOL)containsMouse;
-(::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >)accessibleContext;
/* NSDraggingDestination protocol methods
@@ -56,8 +56,8 @@
-(NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender;
-(NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)sender;
-(void)draggingExited:(id <NSDraggingInfo>)sender;
--(MacOSBOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender;
--(MacOSBOOL)performDragOperation:(id <NSDraggingInfo>)sender;
+-(BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender;
+-(BOOL)performDragOperation:(id <NSDraggingInfo>)sender;
-(void)concludeDragOperation:(id <NSDraggingInfo>)sender;
-(void)registerDraggingDestinationHandler:(id)theHandler;
@@ -85,9 +85,9 @@
}
+(void)unsetMouseFrame: (AquaSalFrame*)pFrame;
-(id)initWithSalFrame: (AquaSalFrame*)pFrame;
--(MacOSBOOL)acceptsFirstResponder;
--(MacOSBOOL)acceptsFirstMouse: (NSEvent *)pEvent;
--(MacOSBOOL)isOpaque;
+-(BOOL)acceptsFirstResponder;
+-(BOOL)acceptsFirstMouse: (NSEvent *)pEvent;
+-(BOOL)isOpaque;
-(void)drawRect: (NSRect)aRect;
-(void)mouseDown: (NSEvent*)pEvent;
-(void)mouseDragged: (NSEvent*)pEvent;
@@ -107,12 +107,12 @@
-(void)swipeWithEvent: (NSEvent*)pEvent;
-(void)keyDown: (NSEvent*)pEvent;
-(void)flagsChanged: (NSEvent*)pEvent;
--(void)sendMouseEventToFrame:(NSEvent*)pEvent button:(USHORT)nButton eventtype:(USHORT)nEvent;
--(MacOSBOOL)sendKeyInputAndReleaseToFrame: (USHORT)nKeyCode character: (sal_Unicode)aChar;
--(MacOSBOOL)sendKeyInputAndReleaseToFrame: (USHORT)nKeyCode character: (sal_Unicode)aChar modifiers: (unsigned int)nMod;
--(MacOSBOOL)sendKeyToFrameDirect: (USHORT)nKeyCode character: (sal_Unicode)aChar modifiers: (unsigned int)nMod;
--(MacOSBOOL)sendSingleCharacter:(NSEvent*)pEvent;
--(MacOSBOOL)handleKeyDownException:(NSEvent*)pEvent;
+-(void)sendMouseEventToFrame:(NSEvent*)pEvent button:(sal_uInt16)nButton eventtype:(sal_uInt16)nEvent;
+-(BOOL)sendKeyInputAndReleaseToFrame: (sal_uInt16)nKeyCode character: (sal_Unicode)aChar;
+-(BOOL)sendKeyInputAndReleaseToFrame: (sal_uInt16)nKeyCode character: (sal_Unicode)aChar modifiers: (unsigned int)nMod;
+-(BOOL)sendKeyToFrameDirect: (sal_uInt16)nKeyCode character: (sal_Unicode)aChar modifiers: (unsigned int)nMod;
+-(BOOL)sendSingleCharacter:(NSEvent*)pEvent;
+-(BOOL)handleKeyDownException:(NSEvent*)pEvent;
-(void)clearLastEvent;
/*
text action methods
@@ -201,8 +201,8 @@
-(NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender;
-(NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)sender;
-(void)draggingExited:(id <NSDraggingInfo>)sender;
--(MacOSBOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender;
--(MacOSBOOL)performDragOperation:(id <NSDraggingInfo>)sender;
+-(BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender;
+-(BOOL)performDragOperation:(id <NSDraggingInfo>)sender;
-(void)concludeDragOperation:(id <NSDraggingInfo>)sender;
-(void)registerDraggingDestinationHandler:(id)theHandler;
diff --git a/vcl/aqua/inc/salgdi.h b/vcl/aqua/inc/salgdi.h
index 17c4aa7acd44..7c0acc7598a8 100644
--- a/vcl/aqua/inc/salgdi.h
+++ b/vcl/aqua/inc/salgdi.h
@@ -176,26 +176,25 @@ public:
// InvalidateContext does an UnsetState and sets mrContext to 0
void InvalidateContext();
- virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight );
- virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& );
+ virtual bool setClipRegion( const Region& );
// 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 drawPolyPolygon( ULONG nPoly, const ULONG* pPoints, PCONSTSALPOINT* pPtAry );
+ virtual void drawPolyLine( sal_uLong nPoints, const SalPoint* pPtAry );
+ virtual void drawPolygon( sal_uLong nPoints, const SalPoint* pPtAry );
+ virtual void drawPolyPolygon( sal_uLong nPoly, const sal_uLong* pPoints, PCONSTSALPOINT* pPtAry );
virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency );
- 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 drawPolyPolygonBezier( ULONG nPoly, const ULONG* pPoints, const SalPoint* const* pPtAry, const BYTE* const* pFlgAry );
+ virtual sal_Bool drawPolyLineBezier( sal_uLong nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry );
+ virtual sal_Bool drawPolygonBezier( sal_uLong nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry );
+ virtual sal_Bool drawPolyPolygonBezier( sal_uLong nPoly, const sal_uLong* pPoints, const SalPoint* const* pPtAry, const sal_uInt8* const* pFlgAry );
virtual bool drawPolyLine( const ::basegfx::B2DPolygon&, double fTransparency, const ::basegfx::B2DVector& rLineWidths, basegfx::B2DLineJoin );
// 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
@@ -216,9 +215,9 @@ public:
// 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_uLong 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_uLong nSize );
virtual bool drawAlphaBitmap( const SalTwoRect&,
const SalBitmap& rSourceBitmap,
@@ -227,34 +226,29 @@ public:
virtual bool drawAlphaRect( long nX, long nY, long nWidth,
long nHeight, sal_uInt8 nTransparency );
- CGPoint* makeCGptArray(ULONG nPoints, const SalPoint* pPtAry);
+ CGPoint* makeCGptArray(sal_uLong nPoints, const SalPoint* pPtAry);
// native widget rendering methods that require mirroring
- virtual BOOL hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
- const Point& aPos, BOOL& rIsInside );
- virtual BOOL drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
+ virtual sal_Bool hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
+ const Point& aPos, sal_Bool& rIsInside );
+ virtual sal_Bool drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
const rtl::OUString& aCaption );
- virtual BOOL drawNativeControlText( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
+ virtual sal_Bool drawNativeControlText( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
const rtl::OUString& aCaption );
- virtual BOOL getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState,
+ virtual sal_Bool getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState,
const ImplControlValue& aValue, const rtl::OUString& aCaption,
Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion );
// 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;
// set the clip region to empty
virtual void ResetClipRegion();
- // begin setting the clip region, add rectangles to the
- // region with the UnionClipRegion call
- virtual void BeginSetClipRegion( ULONG nCount );
- // all rectangles were added and the clip region should be set now
- virtual void EndSetClipRegion();
// set the line color to transparent (= don't draw lines)
virtual void SetLineColor();
@@ -274,12 +268,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*, int nFallbackLevel );
// get kernign pairs of the current font
// return only PairCount if (pKernPairs == NULL)
- virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs );
+ virtual sal_uLong GetKernPairs( sal_uLong nPairs, ImplKernPairData* pKernPairs );
// get the repertoire of the current font
virtual const ImplFontCharMap* GetImplFontCharMap() const;
// graphics must fill supplied font list
@@ -300,7 +294,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,
long* pGlyphIDs,
sal_uInt8* pEncoding,
@@ -338,15 +332,15 @@ public:
Int32Vector& rWidths,
Ucs2UIntMap& rUnicodeEnc );
- 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;
@@ -381,8 +375,8 @@ private:
CGContextRef mxTargetContext;
CGContextRef mxMaskContext;
CGContextRef mxTempContext;
- ULONG* mpMaskBuffer;
- ULONG* mpTempBuffer;
+ sal_uLong* mpMaskBuffer;
+ sal_uLong* mpTempBuffer;
int mnBufferLongs;
bool mbIsEnabled;
};
diff --git a/vcl/aqua/inc/salinst.h b/vcl/aqua/inc/salinst.h
index 4b0385844eed..514876b0e1f4 100644
--- a/vcl/aqua/inc/salinst.h
+++ b/vcl/aqua/inc/salinst.h
@@ -48,7 +48,7 @@ class Image;
class SalYieldMutex : public vos::OMutex
{
- ULONG mnCount;
+ sal_uLong mnCount;
vos::OThread::TThreadIdentifier mnThreadId;
public:
@@ -56,7 +56,7 @@ public:
virtual void acquire();
virtual void release();
virtual sal_Bool tryToAcquire();
- ULONG GetAcquireCount() const { return mnCount; }
+ sal_uLong GetAcquireCount() const { return mnCount; }
vos::OThread::TThreadIdentifier GetThreadId() const { return mnThreadId; }
};
@@ -82,9 +82,9 @@ class AquaSalInstance : public SalInstance
{
AquaSalFrame* mpFrame;
void* mpData;
- USHORT mnType;
+ sal_uInt16 mnType;
- SalUserEvent( AquaSalFrame* pFrame, void* pData, USHORT nType ) :
+ SalUserEvent( AquaSalFrame* pFrame, void* pData, sal_uInt16 nType ) :
mpFrame( pFrame ), mpData( pData ), mnType( nType )
{}
};
@@ -108,14 +108,14 @@ public:
virtual SalSystem* CreateSystem();
virtual void DestroySystem(SalSystem*);
- virtual SalFrame* CreateChildFrame( SystemParentData* pParent, ULONG nStyle );
- virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle );
+ virtual SalFrame* CreateChildFrame( SystemParentData* pParent, sal_uLong nStyle );
+ virtual SalFrame* CreateFrame( SalFrame* pParent, sal_uLong 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 = sal_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,
@@ -132,12 +132,12 @@ public:
virtual SalSystem* CreateSalSystem();
virtual SalBitmap* CreateSalBitmap();
virtual vos::IMutex* GetYieldMutex();
- virtual ULONG ReleaseYieldMutex();
- virtual void AcquireYieldMutex( ULONG nCount );
+ virtual sal_uLong ReleaseYieldMutex();
+ virtual void AcquireYieldMutex( sal_uLong nCount );
virtual bool CheckYieldMutex();
virtual void Yield( bool bWait, bool bHandleAllCurrentEvents );
- virtual bool AnyInput( USHORT nType );
- virtual SalMenu* CreateMenu( BOOL bMenuBar, Menu* pVCLMenu );
+ virtual bool AnyInput( sal_uInt16 nType );
+ virtual SalMenu* CreateMenu( sal_Bool bMenuBar, Menu* pVCLMenu );
virtual void DestroyMenu( SalMenu* );
virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData );
virtual void DestroyMenuItem( SalMenuItem* );
@@ -164,7 +164,7 @@ public:
public:
friend class AquaSalFrame;
- void PostUserEvent( AquaSalFrame* pFrame, USHORT nType, void* pData );
+ void PostUserEvent( AquaSalFrame* pFrame, sal_uInt16 nType, void* pData );
void delayedSettingsChanged( bool bInvalidate );
bool isNSAppThread() const;
@@ -185,7 +185,7 @@ public:
// helper class: inverted solar guard
class YieldMutexReleaser
{
- ULONG mnCount;
+ sal_uLong mnCount;
public:
YieldMutexReleaser();
~YieldMutexReleaser();
diff --git a/vcl/aqua/inc/salmenu.h b/vcl/aqua/inc/salmenu.h
index 100e8c22972c..63dfb6c48a91 100644
--- a/vcl/aqua/inc/salmenu.h
+++ b/vcl/aqua/inc/salmenu.h
@@ -58,32 +58,32 @@ public: // for OOStatusView
private:
std::vector< MenuBarButtonEntry > maButtons;
- MenuBarButtonEntry* findButtonItem( USHORT i_nItemId );
+ MenuBarButtonEntry* findButtonItem( sal_uInt16 i_nItemId );
void releaseButtonEntry( MenuBarButtonEntry& i_rEntry );
static void statusLayout();
public:
AquaSalMenu( bool bMenuBar );
virtual ~AquaSalMenu();
- 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 );
- virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rRect, ULONG nFlags);
+ virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rRect, sal_uLong nFlags);
virtual bool AddMenuBarButton( const SalMenuButtonItem& );
- virtual void RemoveMenuBarButton( USHORT nId );
- virtual Rectangle GetMenuBarButtonRectPixel( USHORT i_nItemId, SalFrame* i_pReferenceFrame );
+ virtual void RemoveMenuBarButton( sal_uInt16 nId );
+ virtual Rectangle GetMenuBarButtonRectPixel( sal_uInt16 i_nItemId, SalFrame* i_pReferenceFrame );
- int getItemIndexByPos( USHORT nPos ) const;
+ int getItemIndexByPos( sal_uInt16 nPos ) const;
const AquaSalFrame* getFrame() const;
void setMainMenu();
@@ -111,7 +111,7 @@ public:
AquaSalMenuItem( const SalItemParams* );
virtual ~AquaSalMenuItem();
- USHORT mnId; // Item ID
+ sal_uInt16 mnId; // Item ID
Menu* mpVCLMenu; // VCL Menu into which this MenuItem is inserted
AquaSalMenu* mpParentMenu; // The menu in which this menu item is inserted
AquaSalMenu* mpSubMenu; // Sub menu of this item (if defined)
diff --git a/vcl/aqua/inc/salobj.h b/vcl/aqua/inc/salobj.h
index 56b07cea4262..c411287a4686 100644
--- a/vcl/aqua/inc/salobj.h
+++ b/vcl/aqua/inc/salobj.h
@@ -70,13 +70,13 @@ public:
virtual ~AquaSalObject();
virtual void ResetClipRegion();
- virtual USHORT GetClipRegionType();
- virtual void BeginSetClipRegion( ULONG nRects );
+ virtual sal_uInt16 GetClipRegionType();
+ virtual void BeginSetClipRegion( sal_uLong 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/aqua/inc/salprn.h b/vcl/aqua/inc/salprn.h
index 6bcafa2ee2e3..5458a5b51bd6 100644
--- a/vcl/aqua/inc/salprn.h
+++ b/vcl/aqua/inc/salprn.h
@@ -81,16 +81,16 @@ class AquaSalInfoPrinter : public SalInfoPrinter
virtual SalGraphics* GetGraphics();
virtual void ReleaseGraphics( SalGraphics* i_pGraphics );
- virtual BOOL Setup( SalFrame* i_pFrame, ImplJobSetup* i_pSetupData );
- virtual BOOL SetPrinterData( ImplJobSetup* pSetupData );
- virtual BOOL SetData( ULONG i_nFlags, ImplJobSetup* i_pSetupData );
+ virtual sal_Bool Setup( SalFrame* i_pFrame, ImplJobSetup* i_pSetupData );
+ virtual sal_Bool SetPrinterData( ImplJobSetup* pSetupData );
+ virtual sal_Bool SetData( sal_uLong i_nFlags, ImplJobSetup* i_pSetupData );
virtual void GetPageInfo( const ImplJobSetup* i_pSetupData,
long& o_rOutWidth, long& o_rOutHeight,
long& o_rPageOffX, long& o_rPageOffY,
long& o_rPageWidth, long& o_rPageHeight );
- virtual ULONG GetCapabilities( const ImplJobSetup* i_pSetupData, USHORT i_nType );
- virtual ULONG GetPaperBinCount( const ImplJobSetup* i_pSetupData );
- virtual String GetPaperBinName( const ImplJobSetup* i_pSetupData, ULONG i_nPaperBin );
+ virtual sal_uLong GetCapabilities( const ImplJobSetup* i_pSetupData, sal_uInt16 i_nType );
+ virtual sal_uLong GetPaperBinCount( const ImplJobSetup* i_pSetupData );
+ virtual String GetPaperBinName( const ImplJobSetup* i_pSetupData, sal_uLong i_nPaperBin );
virtual void InitPaperFormats( const ImplJobSetup* i_pSetupData );
virtual int GetLandscapeAngle( const ImplJobSetup* i_pSetupData );
@@ -99,16 +99,16 @@ class AquaSalInfoPrinter : public SalInfoPrinter
// so let's make AquaSalPrinter just a forwarder to AquaSalInfoPrinter
// and concentrate the real work in one class
// implement pull model print system
- BOOL StartJob( const String* i_pFileName,
+ sal_Bool StartJob( const String* i_pFileName,
const String& rJobName,
const String& i_rAppName,
ImplJobSetup* i_pSetupData,
vcl::PrinterController& i_rController );
- BOOL EndJob();
- BOOL AbortJob();
- SalGraphics* StartPage( ImplJobSetup* i_pSetupData, BOOL i_bNewJobData );
- BOOL EndPage();
- ULONG GetErrorCode() const;
+ sal_Bool EndJob();
+ sal_Bool AbortJob();
+ SalGraphics* StartPage( ImplJobSetup* i_pSetupData, sal_Bool i_bNewJobData );
+ sal_Bool EndPage();
+ sal_uLong GetErrorCode() const;
NSPrintInfo* getPrintInfo() const { return mpPrintInfo; }
void setStartPageOffset( int nOffsetX, int nOffsetY ) { mnStartPageOffsetX = nOffsetX; mnStartPageOffsetY = nOffsetY; }
@@ -135,25 +135,25 @@ class AquaSalPrinter : public SalPrinter
AquaSalPrinter( AquaSalInfoPrinter* i_pInfoPrinter );
virtual ~AquaSalPrinter();
- virtual BOOL StartJob( const XubString* i_pFileName,
+ virtual sal_Bool StartJob( const XubString* i_pFileName,
const XubString& i_rJobName,
const XubString& i_rAppName,
- ULONG i_nCopies,
+ sal_uLong i_nCopies,
bool i_bCollate,
bool i_bDirect,
ImplJobSetup* i_pSetupData );
// implement pull model print system
- virtual BOOL StartJob( const String* i_pFileName,
+ virtual sal_Bool StartJob( const String* i_pFileName,
const String& rJobName,
const String& i_rAppName,
ImplJobSetup* i_pSetupData,
vcl::PrinterController& i_rListener );
- virtual BOOL EndJob();
- virtual BOOL AbortJob();
- virtual SalGraphics* StartPage( ImplJobSetup* i_pSetupData, BOOL i_bNewJobData );
- virtual BOOL EndPage();
- virtual ULONG GetErrorCode();
+ virtual sal_Bool EndJob();
+ virtual sal_Bool AbortJob();
+ virtual SalGraphics* StartPage( ImplJobSetup* i_pSetupData, sal_Bool i_bNewJobData );
+ virtual sal_Bool EndPage();
+ virtual sal_uLong GetErrorCode();
private:
AquaSalPrinter( const AquaSalPrinter& );
diff --git a/vcl/aqua/inc/saltimer.h b/vcl/aqua/inc/saltimer.h
index 374b9c5a45c5..dacb9b09de39 100644
--- a/vcl/aqua/inc/saltimer.h
+++ b/vcl/aqua/inc/saltimer.h
@@ -41,7 +41,7 @@ class AquaSalTimer : public SalTimer
AquaSalTimer();
virtual ~AquaSalTimer();
- void Start( ULONG nMS );
+ void Start( sal_uLong nMS );
void Stop();
static void handleStartTimerEvent( NSEvent* pEvent );
diff --git a/vcl/aqua/inc/salvd.h b/vcl/aqua/inc/salvd.h
index 865cb7b5b766..949ad70d5b36 100644
--- a/vcl/aqua/inc/salvd.h
+++ b/vcl/aqua/inc/salvd.h
@@ -80,12 +80,12 @@ private:
void Destroy();
public:
- AquaSalVirtualDevice( AquaSalGraphics* pGraphic, long nDX, long nDY, USHORT nBitCount, const SystemGraphicsData *pData );
+ AquaSalVirtualDevice( AquaSalGraphics* pGraphic, long nDX, long nDY, sal_uInt16 nBitCount, const SystemGraphicsData *pData );
virtual ~AquaSalVirtualDevice();
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/aqua/inc/vclnsapp.h b/vcl/aqua/inc/vclnsapp.h
index 59b070b421ea..f25593d335a7 100755
--- a/vcl/aqua/inc/vclnsapp.h
+++ b/vcl/aqua/inc/vclnsapp.h
@@ -47,10 +47,10 @@ class AquaSalFrame;
-(void)sendEvent:(NSEvent*)pEvent;
-(void)sendSuperEvent:(NSEvent*)pEvent;
-(NSMenu*)applicationDockMenu:(NSApplication *)sender;
--(MacOSBOOL)application: (NSApplication*) app openFile: (NSString*)file;
+-(BOOL)application: (NSApplication*) app openFile: (NSString*)file;
-(void)application: (NSApplication*) app openFiles: (NSArray*)files;
--(MacOSBOOL)application: (NSApplication*) app printFile: (NSString*)file;
--(NSApplicationPrintReply)application: (NSApplication *) app printFiles:(NSArray *)files withSettings: (NSDictionary *)printSettings showPrintPanels:(MacOSBOOL)bShowPrintPanels;
+-(BOOL)application: (NSApplication*) app printFile: (NSString*)file;
+-(NSApplicationPrintReply)application: (NSApplication *) app printFiles:(NSArray *)files withSettings: (NSDictionary *)printSettings showPrintPanels:(BOOL)bShowPrintPanels;
-(NSApplicationTerminateReply)applicationShouldTerminate: (NSApplication *) app;
-(void)systemColorsChanged: (NSNotification*) pNotification;
-(void)screenParametersChanged: (NSNotification*) pNotification;
@@ -61,7 +61,7 @@ class AquaSalFrame;
-(void)addDockMenuItem: (NSMenuItem*)pNewItem;
-(void)applicationWillBecomeActive: (NSNotification *)pNotification;
-(void)applicationWillResignActive: (NSNotification *)pNotification;
--(MacOSBOOL)applicationShouldHandleReopen: (NSApplication*)pApp hasVisibleWindows: (MacOSBOOL)bWinVisible;
+-(BOOL)applicationShouldHandleReopen: (NSApplication*)pApp hasVisibleWindows: (BOOL)bWinVisible;
-(void)setDockIconClickHandler: (NSObject*)pHandler;
-(void)cycleFrameForward: (AquaSalFrame*)pCurFrame;
-(void)cycleFrameBackward: (AquaSalFrame*)pCurFrame;
diff --git a/vcl/aqua/source/a11y/aqua11ycomponentwrapper.h b/vcl/aqua/source/a11y/aqua11ycomponentwrapper.h
index c1806054e253..6d44f62b5611 100644
--- a/vcl/aqua/source/a11y/aqua11ycomponentwrapper.h
+++ b/vcl/aqua/source/a11y/aqua11ycomponentwrapper.h
@@ -38,7 +38,7 @@
+(id)positionAttributeForElement:(AquaA11yWrapper *)wrapper;
+(id)descriptionAttributeForElement:(AquaA11yWrapper *)wrapper;
+(void)addAttributeNamesTo:(NSMutableArray *)attributeNames;
-+(MacOSBOOL)isAttributeSettable:(NSString *)attribute forElement:(AquaA11yWrapper *)wrapper;
++(BOOL)isAttributeSettable:(NSString *)attribute forElement:(AquaA11yWrapper *)wrapper;
+(void)setFocusedAttributeForElement:(AquaA11yWrapper *)wrapper to:(id)value;
@end
diff --git a/vcl/aqua/source/a11y/aqua11ycomponentwrapper.mm b/vcl/aqua/source/a11y/aqua11ycomponentwrapper.mm
index a700b0b89ae9..c66e7c3d8515 100644
--- a/vcl/aqua/source/a11y/aqua11ycomponentwrapper.mm
+++ b/vcl/aqua/source/a11y/aqua11ycomponentwrapper.mm
@@ -75,8 +75,8 @@ using namespace ::com::sun::star::uno;
[ pool release ];
}
-+(MacOSBOOL)isAttributeSettable:(NSString *)attribute forElement:(AquaA11yWrapper *)wrapper {
- MacOSBOOL isSettable = NO;
++(BOOL)isAttributeSettable:(NSString *)attribute forElement:(AquaA11yWrapper *)wrapper {
+ BOOL isSettable = NO;
NSAutoreleasePool * pool = [ [ NSAutoreleasePool alloc ] init ];
if ( [ attribute isEqualToString: NSAccessibilityFocusedAttribute ]
&& ! [ [ AquaA11yRoleHelper getNativeRoleFrom: [ wrapper accessibleContext ] ] isEqualToString: NSAccessibilityScrollBarRole ]
diff --git a/vcl/aqua/source/a11y/aqua11yfactory.mm b/vcl/aqua/source/a11y/aqua11yfactory.mm
index 7732ce202cd2..5dcdf4bb9f61 100644
--- a/vcl/aqua/source/a11y/aqua11yfactory.mm
+++ b/vcl/aqua/source/a11y/aqua11yfactory.mm
@@ -95,11 +95,11 @@ static bool enabled = false;
return [ AquaA11yFactory wrapperForAccessibleContext: rxAccessibleContext createIfNotExists: YES asRadioGroup: NO ];
}
-+(AquaA11yWrapper *)wrapperForAccessibleContext: (Reference < XAccessibleContext >) rxAccessibleContext createIfNotExists:(MacOSBOOL) bCreate {
++(AquaA11yWrapper *)wrapperForAccessibleContext: (Reference < XAccessibleContext >) rxAccessibleContext createIfNotExists:(BOOL) bCreate {
return [ AquaA11yFactory wrapperForAccessibleContext: rxAccessibleContext createIfNotExists: bCreate asRadioGroup: NO ];
}
-+(AquaA11yWrapper *)wrapperForAccessibleContext: (Reference < XAccessibleContext >) rxAccessibleContext createIfNotExists:(MacOSBOOL) bCreate asRadioGroup:(MacOSBOOL) asRadioGroup{
++(AquaA11yWrapper *)wrapperForAccessibleContext: (Reference < XAccessibleContext >) rxAccessibleContext createIfNotExists:(BOOL) bCreate asRadioGroup:(BOOL) asRadioGroup{
NSMutableDictionary * dAllWrapper = [ AquaA11yFactory allWrapper ];
NSValue * nKey = nil;
if ( asRadioGroup ) {
diff --git a/vcl/aqua/source/a11y/aqua11yselectionwrapper.h b/vcl/aqua/source/a11y/aqua11yselectionwrapper.h
index a88e6c71c04b..bf290990faa2 100644
--- a/vcl/aqua/source/a11y/aqua11yselectionwrapper.h
+++ b/vcl/aqua/source/a11y/aqua11yselectionwrapper.h
@@ -36,7 +36,7 @@
}
+(id)selectedChildrenAttributeForElement:(AquaA11yWrapper *)wrapper;
+(void)addAttributeNamesTo:(NSMutableArray *)attributeNames;
-+(MacOSBOOL)isAttributeSettable:(NSString *)attribute forElement:(AquaA11yWrapper *)wrapper;
++(BOOL)isAttributeSettable:(NSString *)attribute forElement:(AquaA11yWrapper *)wrapper;
+(void)setSelectedChildrenAttributeForElement:(AquaA11yWrapper *)wrapper to:(id)value;
@end
diff --git a/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm b/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm
index 804cf108dba8..9368c599d131 100644
--- a/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm
+++ b/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm
@@ -65,7 +65,7 @@ using namespace ::com::sun::star::uno;
[ attributeNames addObject: NSAccessibilitySelectedChildrenAttribute ];
}
-+(MacOSBOOL)isAttributeSettable:(NSString *)attribute forElement:(AquaA11yWrapper *)wrapper
++(BOOL)isAttributeSettable:(NSString *)attribute forElement:(AquaA11yWrapper *)wrapper
{
if ( [ attribute isEqualToString: NSAccessibilitySelectedChildrenAttribute ] )
{
diff --git a/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm b/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm
index 6577cebf295e..60b12c762b25 100644
--- a/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm
+++ b/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm
@@ -77,8 +77,8 @@ using namespace ::rtl;
return italicStyle;
}
-+(MacOSBOOL)isStrikethrough:(PropertyValue)property {
- MacOSBOOL strikethrough = NO;
++(BOOL)isStrikethrough:(PropertyValue)property {
+ BOOL strikethrough = NO;
sal_Int16 value = 0;
property.Value >>= value;
if ( value != FontStrikeout::NONE
@@ -88,8 +88,8 @@ using namespace ::rtl;
return strikethrough;
}
-+(MacOSBOOL)convertBoolean:(PropertyValue)property {
- MacOSBOOL myBoolean = NO;
++(BOOL)convertBoolean:(PropertyValue)property {
+ BOOL myBoolean = NO;
bool value = sal_False;
property.Value >>= value;
if ( value ) {
@@ -149,7 +149,7 @@ using namespace ::rtl;
int fonttraits = 0;
float fontsize = 0.0;
sal_Int32 underlineColor = 0;
- MacOSBOOL underlineHasColor = NO;
+ BOOL underlineHasColor = NO;
// add attributes to string
for ( int attrIndex = 0; attrIndex < attributes.getLength(); attrIndex++ ) {
PropertyValue property = attributes [ attrIndex ];
diff --git a/vcl/aqua/source/a11y/aqua11ytextwrapper.h b/vcl/aqua/source/a11y/aqua11ytextwrapper.h
index dfdab349bafe..b132bdd0f12a 100644
--- a/vcl/aqua/source/a11y/aqua11ytextwrapper.h
+++ b/vcl/aqua/source/a11y/aqua11ytextwrapper.h
@@ -54,7 +54,7 @@
+(void)addParameterizedAttributeNamesTo:(NSMutableArray *)attributeNames;
+(NSArray *)specialAttributeNames;
+(NSArray *)specialParameterizedAttributeNames;
-+(MacOSBOOL)isAttributeSettable:(NSString *)attribute forElement:(AquaA11yWrapper *)wrapper;
++(BOOL)isAttributeSettable:(NSString *)attribute forElement:(AquaA11yWrapper *)wrapper;
+(void)setVisibleCharacterRangeAttributeForElement:(AquaA11yWrapper *)wrapper to:(id)value;
+(void)setSelectedTextRangeAttributeForElement:(AquaA11yWrapper *)wrapper to:(id)value;
+(void)setSelectedTextAttributeForElement:(AquaA11yWrapper *)wrapper to:(id)value;
diff --git a/vcl/aqua/source/a11y/aqua11ytextwrapper.mm b/vcl/aqua/source/a11y/aqua11ytextwrapper.mm
index 2033135564d8..89c164e5e0b9 100644
--- a/vcl/aqua/source/a11y/aqua11ytextwrapper.mm
+++ b/vcl/aqua/source/a11y/aqua11ytextwrapper.mm
@@ -273,8 +273,8 @@ using namespace ::rtl;
return rtfData;
}
-+(MacOSBOOL)isAttributeSettable:(NSString *)attribute forElement:(AquaA11yWrapper *)wrapper {
- MacOSBOOL isSettable = NO;
++(BOOL)isAttributeSettable:(NSString *)attribute forElement:(AquaA11yWrapper *)wrapper {
+ BOOL isSettable = NO;
if ( [ attribute isEqualToString: NSAccessibilityValueAttribute ]
|| [ attribute isEqualToString: NSAccessibilitySelectedTextAttribute ]
|| [ attribute isEqualToString: NSAccessibilitySelectedTextRangeAttribute ]
diff --git a/vcl/aqua/source/a11y/aqua11yvaluewrapper.h b/vcl/aqua/source/a11y/aqua11yvaluewrapper.h
index d3afebf7f828..1dbafe33baea 100644
--- a/vcl/aqua/source/a11y/aqua11yvaluewrapper.h
+++ b/vcl/aqua/source/a11y/aqua11yvaluewrapper.h
@@ -39,7 +39,7 @@
+(id)minValueAttributeForElement:(AquaA11yWrapper *)wrapper;
+(id)maxValueAttributeForElement:(AquaA11yWrapper *)wrapper;
+(void)addAttributeNamesTo:(NSMutableArray *)attributeNames;
-+(MacOSBOOL)isAttributeSettable:(NSString *)attribute forElement:(AquaA11yWrapper *)wrapper;
++(BOOL)isAttributeSettable:(NSString *)attribute forElement:(AquaA11yWrapper *)wrapper;
+(void)setValueAttributeForElement:(AquaA11yWrapper *)wrapper to:(id)value;
@end
diff --git a/vcl/aqua/source/a11y/aqua11yvaluewrapper.mm b/vcl/aqua/source/a11y/aqua11yvaluewrapper.mm
index 85ef0041da95..fb257921b13e 100644
--- a/vcl/aqua/source/a11y/aqua11yvaluewrapper.mm
+++ b/vcl/aqua/source/a11y/aqua11yvaluewrapper.mm
@@ -82,8 +82,8 @@ using namespace ::com::sun::star::uno;
[ attributeNames addObject: NSAccessibilityValueAttribute ];
}
-+(MacOSBOOL)isAttributeSettable:(NSString *)attribute forElement:(AquaA11yWrapper *)wrapper {
- MacOSBOOL isSettable = NO;
++(BOOL)isAttributeSettable:(NSString *)attribute forElement:(AquaA11yWrapper *)wrapper {
+ BOOL isSettable = NO;
if ( [ wrapper accessibleValue ] != nil
&& [ attribute isEqualToString: NSAccessibilityValueAttribute ]
&& ! [ wrapper isKindOfClass: [ AquaA11yWrapperStaticText class ] ] ) {
diff --git a/vcl/aqua/source/a11y/aqua11ywrapper.mm b/vcl/aqua/source/a11y/aqua11ywrapper.mm
index e86676e725f2..c2724a372f9f 100644
--- a/vcl/aqua/source/a11y/aqua11ywrapper.mm
+++ b/vcl/aqua/source/a11y/aqua11ywrapper.mm
@@ -63,7 +63,7 @@ using namespace ::com::sun::star::uno;
-(Reference<XAccessibleContext>)accessibleContext;
@end
-static MacOSBOOL isPopupMenuOpen = NO;
+static BOOL isPopupMenuOpen = NO;
@implementation AquaA11yWrapper : NSView
@@ -154,7 +154,7 @@ static MacOSBOOL isPopupMenuOpen = NO;
// (getter without parameter) attributeNameHereAttribute
// (getter with parameter) attributeNameHereAttributeForParameter:
// (setter) setAttributeNameHereAttributeForElement:to:
--(SEL)selectorForAttribute:(NSString *)attribute asGetter:(MacOSBOOL)asGetter withGetterParameter:(MacOSBOOL)withGetterParameter {
+-(SEL)selectorForAttribute:(NSString *)attribute asGetter:(BOOL)asGetter withGetterParameter:(BOOL)withGetterParameter {
SEL selector = nil;
NSAutoreleasePool * pool = [ [ NSAutoreleasePool alloc ] init ];
@try {
@@ -197,7 +197,7 @@ static MacOSBOOL isPopupMenuOpen = NO;
return Reference < XAccessible > ();
}
--(MacOSBOOL)isFirstRadioButtonInGroup {
+-(BOOL)isFirstRadioButtonInGroup {
Reference < XAccessible > rFirstMateAccessible = [ self getFirstRadioButtonInGroup ];
if ( rFirstMateAccessible.is() && rFirstMateAccessible -> getAccessibleContext().get() == [ self accessibleContext ] ) {
return YES;
@@ -693,12 +693,12 @@ static MacOSBOOL isPopupMenuOpen = NO;
return value;
}
--(MacOSBOOL)accessibilityIsIgnored {
+-(BOOL)accessibilityIsIgnored {
// #i90575# guard NSAccessibility protocol against unwanted access
if ( isPopupMenuOpen ) {
return nil;
}
- MacOSBOOL ignored = NO;
+ BOOL ignored = NO;
sal_Int16 nRole = [ self accessibleContext ] -> getAccessibleRole();
switch ( nRole ) {
case AccessibleRole::PANEL:
@@ -796,8 +796,8 @@ static MacOSBOOL isPopupMenuOpen = NO;
}
}
--(MacOSBOOL)accessibilityIsAttributeSettable:(NSString *)attribute {
- MacOSBOOL isSettable = NO;
+-(BOOL)accessibilityIsAttributeSettable:(NSString *)attribute {
+ BOOL isSettable = NO;
if ( [ self accessibleText ] != nil ) {
isSettable = [ AquaA11yTextWrapper isAttributeSettable: attribute forElement: self ];
}
@@ -830,7 +830,7 @@ static MacOSBOOL isPopupMenuOpen = NO;
return nil; // TODO: to be completed
}
--(MacOSBOOL)accessibilitySetOverrideValue:(id)value forAttribute:(NSString *)attribute {
+-(BOOL)accessibilitySetOverrideValue:(id)value forAttribute:(NSString *)attribute {
return NO; // TODO
}
@@ -904,7 +904,7 @@ static MacOSBOOL isPopupMenuOpen = NO;
// get some information
NSString * role = (NSString *) [ self accessibilityAttributeValue: NSAccessibilityRoleAttribute ];
id enabledAttr = [ self enabledAttribute ];
- MacOSBOOL enabled = [ enabledAttr boolValue ];
+ BOOL enabled = [ enabledAttr boolValue ];
NSView * parent = (NSView *) [ self accessibilityAttributeValue: NSAccessibilityParentAttribute ];
AquaA11yWrapper * parentAsWrapper = nil;
if ( [ parent isKindOfClass: [ AquaA11yWrapper class ] ] ) {
@@ -947,8 +947,8 @@ static MacOSBOOL isPopupMenuOpen = NO;
#pragma mark -
#pragma mark Hit Test
--(MacOSBOOL)isViewElement:(NSObject *)viewElement hitByPoint:(NSPoint)point {
- MacOSBOOL hit = NO;
+-(BOOL)isViewElement:(NSObject *)viewElement hitByPoint:(NSPoint)point {
+ BOOL hit = NO;
NSAutoreleasePool * pool = [ [ NSAutoreleasePool alloc ] init ];
NSValue * position = [ viewElement accessibilityAttributeValue: NSAccessibilityPositionAttribute ];
NSValue * size = [ viewElement accessibilityAttributeValue: NSAccessibilitySizeAttribute ];
@@ -1127,15 +1127,15 @@ Reference < XAccessibleContext > hitTestRunner ( com::sun::star::awt::Point poin
return mDefaultFontsize;
}
--(void)setActsAsRadioGroup:(MacOSBOOL)actsAsRadioGroup {
+-(void)setActsAsRadioGroup:(BOOL)actsAsRadioGroup {
mActsAsRadioGroup = actsAsRadioGroup;
}
--(MacOSBOOL)actsAsRadioGroup {
+-(BOOL)actsAsRadioGroup {
return mActsAsRadioGroup;
}
-+(void)setPopupMenuOpen:(MacOSBOOL)popupMenuOpen {
++(void)setPopupMenuOpen:(BOOL)popupMenuOpen {
isPopupMenuOpen = popupMenuOpen;
}
diff --git a/vcl/aqua/source/a11y/aqua11ywrappercheckbox.h b/vcl/aqua/source/a11y/aqua11ywrappercheckbox.h
index 95fee9a3ec4b..b1c5fc751e52 100644
--- a/vcl/aqua/source/a11y/aqua11ywrappercheckbox.h
+++ b/vcl/aqua/source/a11y/aqua11ywrappercheckbox.h
@@ -34,7 +34,7 @@
{
}
-(id)valueAttribute;
--(MacOSBOOL)accessibilityIsAttributeSettable:(NSString *)attribute;
+-(BOOL)accessibilityIsAttributeSettable:(NSString *)attribute;
-(NSArray *)accessibilityAttributeNames;
@end
diff --git a/vcl/aqua/source/a11y/aqua11ywrappercheckbox.mm b/vcl/aqua/source/a11y/aqua11ywrappercheckbox.mm
index c4ac34dc5bce..25f012e1163f 100644
--- a/vcl/aqua/source/a11y/aqua11ywrappercheckbox.mm
+++ b/vcl/aqua/source/a11y/aqua11ywrappercheckbox.mm
@@ -44,7 +44,7 @@
return [ NSNumber numberWithInt: 0 ];
}
--(MacOSBOOL)accessibilityIsAttributeSettable:(NSString *)attribute {
+-(BOOL)accessibilityIsAttributeSettable:(NSString *)attribute {
if ( [ attribute isEqualToString: NSAccessibilityValueAttribute ] ) {
return NO;
}
diff --git a/vcl/aqua/source/a11y/aqua11ywrappercombobox.h b/vcl/aqua/source/a11y/aqua11ywrappercombobox.h
index 7ed76d607176..e18da11dd0ad 100644
--- a/vcl/aqua/source/a11y/aqua11ywrappercombobox.h
+++ b/vcl/aqua/source/a11y/aqua11ywrappercombobox.h
@@ -42,7 +42,7 @@
-(id)selectedTextRangeAttribute;
-(id)visibleCharacterRangeAttribute;
// Accessibility Protocol
--(MacOSBOOL)accessibilityIsAttributeSettable:(NSString *)attribute;
+-(BOOL)accessibilityIsAttributeSettable:(NSString *)attribute;
-(void)accessibilitySetValue:(id)value forAttribute:(NSString *)attribute;
-(NSArray *)accessibilityAttributeNames;
@end
diff --git a/vcl/aqua/source/a11y/aqua11ywrappercombobox.mm b/vcl/aqua/source/a11y/aqua11ywrappercombobox.mm
index 85aed320e470..16fa1372fe4e 100644
--- a/vcl/aqua/source/a11y/aqua11ywrappercombobox.mm
+++ b/vcl/aqua/source/a11y/aqua11ywrappercombobox.mm
@@ -117,7 +117,7 @@ using namespace ::com::sun::star::uno;
#pragma mark -
#pragma mark Accessibility Protocol
--(MacOSBOOL)accessibilityIsAttributeSettable:(NSString *)attribute {
+-(BOOL)accessibilityIsAttributeSettable:(NSString *)attribute {
if ( [ self textArea ] != nil && (
[ attribute isEqualToString: NSAccessibilitySelectedTextAttribute ]
|| [ attribute isEqualToString: NSAccessibilitySelectedTextRangeAttribute ]
diff --git a/vcl/aqua/source/a11y/aqua11ywrapperradiobutton.h b/vcl/aqua/source/a11y/aqua11ywrapperradiobutton.h
index 13ceee6f826f..3fc6558c633c 100644
--- a/vcl/aqua/source/a11y/aqua11ywrapperradiobutton.h
+++ b/vcl/aqua/source/a11y/aqua11ywrapperradiobutton.h
@@ -34,7 +34,7 @@
{
}
-(id)valueAttribute;
--(MacOSBOOL)accessibilityIsAttributeSettable:(NSString *)attribute;
+-(BOOL)accessibilityIsAttributeSettable:(NSString *)attribute;
-(NSArray *)accessibilityAttributeNames;
@end
diff --git a/vcl/aqua/source/a11y/aqua11ywrapperradiobutton.mm b/vcl/aqua/source/a11y/aqua11ywrapperradiobutton.mm
index 54d6edac619a..930f940c4971 100644
--- a/vcl/aqua/source/a11y/aqua11ywrapperradiobutton.mm
+++ b/vcl/aqua/source/a11y/aqua11ywrapperradiobutton.mm
@@ -44,7 +44,7 @@
return [ NSNumber numberWithInt: 0 ];
}
--(MacOSBOOL)accessibilityIsAttributeSettable:(NSString *)attribute {
+-(BOOL)accessibilityIsAttributeSettable:(NSString *)attribute {
if ( [ attribute isEqualToString: NSAccessibilityValueAttribute ] ) {
return NO;
}
diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx
index 5d2fc3f00741..352396a7fb2b 100644
--- a/vcl/aqua/source/app/salinst.cxx
+++ b/vcl/aqua/source/app/salinst.cxx
@@ -71,9 +71,9 @@
using namespace std;
using namespace ::com::sun::star;
-extern BOOL ImplSVMain();
+extern sal_Bool ImplSVMain();
-static BOOL* gpbInit = 0;
+static sal_Bool* gpbInit = 0;
static NSMenu* pDockMenu = nil;
static bool bNoSVMain = true;
static bool bLeftMain = false;
@@ -207,7 +207,7 @@ static void initNSApp()
[NSApp activateIgnoringOtherApps: YES];
}
-BOOL ImplSVMainHook( BOOL * pbInit )
+sal_Bool ImplSVMainHook( sal_Bool * pbInit )
{
gpbInit = pbInit;
@@ -402,7 +402,7 @@ sal_Bool SalYieldMutex::tryToAcquire()
// some convenience functions regarding the yield mutex, aka solar mutex
-BOOL ImplSalYieldMutexTryToAcquire()
+sal_Bool ImplSalYieldMutexTryToAcquire()
{
AquaSalInstance* pInst = (AquaSalInstance*) GetSalData()->mpFirstInstance;
if ( pInst )
@@ -513,7 +513,7 @@ void AquaSalInstance::wakeupYield()
// -----------------------------------------------------------------------
-void AquaSalInstance::PostUserEvent( AquaSalFrame* pFrame, USHORT nType, void* pData )
+void AquaSalInstance::PostUserEvent( AquaSalFrame* pFrame, sal_uInt16 nType, void* pData )
{
osl_acquireMutex( maUserEventListMutex );
maUserEvents.push_back( SalUserEvent( pFrame, pData, nType ) );
@@ -532,14 +532,14 @@ vos::IMutex* AquaSalInstance::GetYieldMutex()
// -----------------------------------------------------------------------
-ULONG AquaSalInstance::ReleaseYieldMutex()
+sal_uLong AquaSalInstance::ReleaseYieldMutex()
{
SalYieldMutex* pYieldMutex = mpSalYieldMutex;
if ( pYieldMutex->GetThreadId() ==
vos::OThread::getCurrentIdentifier() )
{
- ULONG nCount = pYieldMutex->GetAcquireCount();
- ULONG n = nCount;
+ sal_uLong nCount = pYieldMutex->GetAcquireCount();
+ sal_uLong n = nCount;
while ( n )
{
pYieldMutex->release();
@@ -554,7 +554,7 @@ ULONG AquaSalInstance::ReleaseYieldMutex()
// -----------------------------------------------------------------------
-void AquaSalInstance::AcquireYieldMutex( ULONG nCount )
+void AquaSalInstance::AcquireYieldMutex( sal_uLong nCount )
{
SalYieldMutex* pYieldMutex = mpSalYieldMutex;
while ( nCount )
@@ -601,7 +601,7 @@ void AquaSalInstance::handleAppDefinedEvent( NSEvent* pEvent )
break;
case AppExecuteSVMain:
{
- BOOL bResult = ImplSVMain();
+ sal_Bool bResult = ImplSVMain();
if( gpbInit )
*gpbInit = bResult;
[NSApp stop: NSApp];
@@ -711,7 +711,7 @@ void AquaSalInstance::Yield( bool bWait, bool bHandleAllCurrentEvents )
bool bDispatchUser = true;
while( bDispatchUser )
{
- ULONG nCount = ReleaseYieldMutex();
+ sal_uLong nCount = ReleaseYieldMutex();
// get one user event
osl_acquireMutex( maUserEventListMutex );
@@ -752,7 +752,7 @@ void AquaSalInstance::Yield( bool bWait, bool bHandleAllCurrentEvents )
bool bHadEvent = false;
do
{
- ULONG nCount = ReleaseYieldMutex();
+ sal_uLong nCount = ReleaseYieldMutex();
pEvent = [NSApp nextEventMatchingMask: NSAnyEventMask untilDate: nil
inMode: NSDefaultRunLoopMode dequeue: YES];
@@ -769,7 +769,7 @@ void AquaSalInstance::Yield( bool bWait, bool bHandleAllCurrentEvents )
// if we had no event yet, wait for one if requested
if( bWait && ! bHadEvent )
{
- ULONG nCount = ReleaseYieldMutex();
+ sal_uLong nCount = ReleaseYieldMutex();
NSDate* pDt = AquaSalTimer::pRunningTimer ? [AquaSalTimer::pRunningTimer fireDate] : [NSDate distantFuture];
pEvent = [NSApp nextEventMatchingMask: NSAnyEventMask untilDate: pDt
@@ -813,7 +813,7 @@ void AquaSalInstance::Yield( bool bWait, bool bHandleAllCurrentEvents )
// has dispatched an event, cop out at 200 ms
osl_resetCondition( maWaitingYieldCond );
TimeValue aVal = { 0, 200000000 };
- ULONG nCount = ReleaseYieldMutex();
+ sal_uLong nCount = ReleaseYieldMutex();
osl_waitCondition( maWaitingYieldCond, &aVal );
AcquireYieldMutex( nCount );
}
@@ -844,7 +844,7 @@ void AquaSalInstance::Yield( bool bWait, bool bHandleAllCurrentEvents )
// -----------------------------------------------------------------------
-bool AquaSalInstance::AnyInput( USHORT nType )
+bool AquaSalInstance::AnyInput( sal_uInt16 nType )
{
if( nType & INPUT_APPEVENT )
{
@@ -890,14 +890,14 @@ bool AquaSalInstance::AnyInput( USHORT nType )
// -----------------------------------------------------------------------
-SalFrame* AquaSalInstance::CreateChildFrame( SystemParentData* pSystemParentData, ULONG nSalFrameStyle )
+SalFrame* AquaSalInstance::CreateChildFrame( SystemParentData* pSystemParentData, sal_uLong nSalFrameStyle )
{
return NULL;
}
// -----------------------------------------------------------------------
-SalFrame* AquaSalInstance::CreateFrame( SalFrame* pParent, ULONG nSalFrameStyle )
+SalFrame* AquaSalInstance::CreateFrame( SalFrame* pParent, sal_uLong nSalFrameStyle )
{
SalData::ensureThreadAutoreleasePool();
@@ -914,7 +914,7 @@ void AquaSalInstance::DestroyFrame( SalFrame* pFrame )
// -----------------------------------------------------------------------
-SalObject* AquaSalInstance::CreateObject( SalFrame* pParent, SystemWindowData* /* pWindowData */, BOOL /* bShow */ )
+SalObject* AquaSalInstance::CreateObject( SalFrame* pParent, SystemWindowData* /* pWindowData */, sal_Bool /* bShow */ )
{
// SystemWindowData is meaningless on Mac OS X
AquaSalObject *pObject = NULL;
diff --git a/vcl/aqua/source/app/saltimer.cxx b/vcl/aqua/source/app/saltimer.cxx
index 724857e92a0c..9abcc18bf6af 100644
--- a/vcl/aqua/source/app/saltimer.cxx
+++ b/vcl/aqua/source/app/saltimer.cxx
@@ -40,7 +40,7 @@ NSTimer* AquaSalTimer::pRunningTimer = nil;
bool AquaSalTimer::bDispatchTimer = false;
-void ImplSalStartTimer( ULONG nMS )
+void ImplSalStartTimer( sal_uLong nMS )
{
SalData* pSalData = GetSalData();
if( pSalData->mpFirstInstance->isNSAppThread() )
@@ -108,7 +108,7 @@ void AquaSalTimer::handleStartTimerEvent( NSEvent* pEvent )
// timer already elapsed since event posted
pSVData->mpSalTimer->CallCallback();
}
- ImplSalStartTimer( ULONG( [pEvent data1] ) );
+ ImplSalStartTimer( sal_uLong( [pEvent data1] ) );
}
}
@@ -122,7 +122,7 @@ AquaSalTimer::~AquaSalTimer()
ImplSalStopTimer();
}
-void AquaSalTimer::Start( ULONG nMS )
+void AquaSalTimer::Start( sal_uLong nMS )
{
ImplSalStartTimer( nMS );
}
diff --git a/vcl/aqua/source/app/vclnsapp.mm b/vcl/aqua/source/app/vclnsapp.mm
index 5a476e0a54cc..455e7c64c6a4 100755
--- a/vcl/aqua/source/app/vclnsapp.mm
+++ b/vcl/aqua/source/app/vclnsapp.mm
@@ -287,7 +287,7 @@
return AquaSalInstance::GetDynamicDockMenu();
}
--(MacOSBOOL)application: (NSApplication*)app openFile: (NSString*)pFile
+-(BOOL)application: (NSApplication*)app openFile: (NSString*)pFile
{
const rtl::OUString aFile( GetOUString( pFile ) );
if( ! AquaSalInstance::isOnCommandLine( aFile ) )
@@ -328,7 +328,7 @@
}
}
--(MacOSBOOL)application: (NSApplication*)app printFile: (NSString*)pFile
+-(BOOL)application: (NSApplication*)app printFile: (NSString*)pFile
{
const rtl::OUString aFile( GetOUString( pFile ) );
const ApplicationEvent* pAppEvent = new ApplicationEvent( String(), ApplicationAddress(),
@@ -336,7 +336,7 @@
AquaSalInstance::aAppEventList.push_back( pAppEvent );
return YES;
}
--(NSApplicationPrintReply)application: (NSApplication *) app printFiles:(NSArray *)files withSettings: (NSDictionary *)printSettings showPrintPanels:(MacOSBOOL)bShowPrintPanels
+-(NSApplicationPrintReply)application: (NSApplication *) app printFiles:(NSArray *)files withSettings: (NSDictionary *)printSettings showPrintPanels:(BOOL)bShowPrintPanels
{
// currently ignores print settings an bShowPrintPanels
rtl::OUStringBuffer aFileList( 256 );
@@ -468,7 +468,7 @@
}
}
-- (MacOSBOOL)applicationShouldHandleReopen: (NSApplication*)pApp hasVisibleWindows: (MacOSBOOL) bWinVisible
+- (BOOL)applicationShouldHandleReopen: (NSApplication*)pApp hasVisibleWindows: (BOOL) bWinVisible
{
NSObject* pHdl = GetSalData()->mpDockIconClickHandler;
if( pHdl && [pHdl respondsToSelector: @selector(dockIconClicked:)] )
diff --git a/vcl/aqua/source/dtrans/DragSource.cxx b/vcl/aqua/source/dtrans/DragSource.cxx
index 1a8f950e50d4..dab882e75716 100644
--- a/vcl/aqua/source/dtrans/DragSource.cxx
+++ b/vcl/aqua/source/dtrans/DragSource.cxx
@@ -47,6 +47,7 @@
using namespace rtl;
using namespace cppu;
using namespace osl;
+using namespace com::sun::star;
using namespace com::sun::star::datatransfer;
using namespace com::sun::star::datatransfer::clipboard;
using namespace com::sun::star::datatransfer::dnd;
@@ -61,7 +62,7 @@ using namespace std;
// For OOo internal D&D we provide the Transferable without NSDragPboard
// interference as a shortcut
-Reference<XTransferable> DragSource::g_XTransferable = Reference<XTransferable>();
+uno::Reference<XTransferable> DragSource::g_XTransferable;
NSView* DragSource::g_DragSourceView = nil;
bool DragSource::g_DropSuccessSet = false;
bool DragSource::g_DropSuccess = false;
@@ -105,7 +106,7 @@ Sequence<OUString> dragSource_getSupportedServiceNames()
}
--(unsigned int)draggingSourceOperationMaskForLocal: (MacOSBOOL)isLocal
+-(unsigned int)draggingSourceOperationMaskForLocal: (BOOL)isLocal
{
return mDragSource->getSupportedDragOperations(isLocal);
}
@@ -138,7 +139,7 @@ Sequence<OUString> dragSource_getSupportedServiceNames()
bDropSuccess );
mDragSource->mXDragSrcListener->dragDropEnd(dsde);
- mDragSource->mXDragSrcListener = Reference<XDragSourceListener>();
+ mDragSource->mXDragSrcListener = uno::Reference<XDragSourceListener>();
}
@@ -242,8 +243,8 @@ void SAL_CALL DragSource::startDrag(const DragGestureEvent& trigger,
sal_Int8 sourceActions,
sal_Int32 cursor,
sal_Int32 image,
- const Reference<XTransferable >& transferable,
- const Reference<XDragSourceListener >& listener )
+ const uno::Reference<XTransferable >& transferable,
+ const uno::Reference<XDragSourceListener >& listener )
throw( RuntimeException)
{
MutexGuard guard(m_aMutex);
@@ -257,7 +258,7 @@ void SAL_CALL DragSource::startDrag(const DragGestureEvent& trigger,
mXCurrentContext = static_cast<XDragSourceContext*>(new DragSourceContext(this));
auto_ptr<AquaClipboard> clipb(new AquaClipboard(NULL, false));
g_XTransferable = transferable;
- clipb->setContents(g_XTransferable, Reference<XClipboardOwner>());
+ clipb->setContents(g_XTransferable, uno::Reference<XClipboardOwner>());
mDragSourceActions = sourceActions;
g_DragSourceView = mView;
@@ -297,7 +298,7 @@ void SAL_CALL DragSource::startDrag(const DragGestureEvent& trigger,
[dragImage release];
- g_XTransferable = Reference<XTransferable>();
+ g_XTransferable = uno::Reference<XTransferable>();
g_DragSourceView = nil;
// reset drop success flags
diff --git a/vcl/aqua/source/dtrans/DragSource.hxx b/vcl/aqua/source/dtrans/DragSource.hxx
index f8f55176a308..017ca047b679 100644
--- a/vcl/aqua/source/dtrans/DragSource.hxx
+++ b/vcl/aqua/source/dtrans/DragSource.hxx
@@ -72,7 +72,7 @@ class AquaSalFrame;
-(void)mouseDown: (NSEvent*)theEvent;
-(void)mouseDragged: (NSEvent*)theEvent;
--(unsigned int)draggingSourceOperationMaskForLocal:(MacOSBOOL)isLocal;
+-(unsigned int)draggingSourceOperationMaskForLocal:(BOOL)isLocal;
-(void)draggedImage:(NSImage*)anImage beganAt:(NSPoint)aPoint;
-(void)draggedImage:(NSImage *)anImage endedAt:(NSPoint)aPoint operation:(NSDragOperation)operation;
-(void)draggedImage:(NSImage *)draggedImage movedTo:(NSPoint)screenPoint;
diff --git a/vcl/aqua/source/dtrans/DropTarget.cxx b/vcl/aqua/source/dtrans/DropTarget.cxx
index c928d66e156d..01a58b171b02 100644
--- a/vcl/aqua/source/dtrans/DropTarget.cxx
+++ b/vcl/aqua/source/dtrans/DropTarget.cxx
@@ -126,13 +126,13 @@ namespace /* private */
}
--(MacOSBOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender
+-(BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender
{
return mDropTarget->prepareForDragOperation(sender);
}
--(MacOSBOOL)performDragOperation:(id <NSDraggingInfo>)sender
+-(BOOL)performDragOperation:(id <NSDraggingInfo>)sender
{
return mDropTarget->performDragOperation(sender);
}
@@ -321,13 +321,13 @@ NSDragOperation DropTarget::draggingUpdated(id sender)
}
- MacOSBOOL DropTarget::prepareForDragOperation(id sender)
+ BOOL DropTarget::prepareForDragOperation(id sender)
{
return 1;
}
-MacOSBOOL DropTarget::performDragOperation(id sender)
+BOOL DropTarget::performDragOperation(id sender)
{
bool bSuccess = false;
diff --git a/vcl/aqua/source/dtrans/DropTarget.hxx b/vcl/aqua/source/dtrans/DropTarget.hxx
index 6baa8bb69d01..231df7fd5157 100644
--- a/vcl/aqua/source/dtrans/DropTarget.hxx
+++ b/vcl/aqua/source/dtrans/DropTarget.hxx
@@ -76,8 +76,8 @@ class DropTarget;
-(NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender;
-(NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)sender;
-(void)draggingExited:(id <NSDraggingInfo>)sender;
--(MacOSBOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender;
--(MacOSBOOL)performDragOperation:(id <NSDraggingInfo>)sender;
+-(BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender;
+-(BOOL)performDragOperation:(id <NSDraggingInfo>)sender;
-(void)concludeDragOperation:(id <NSDraggingInfo>)sender;
@end
@@ -135,8 +135,8 @@ public:
virtual NSDragOperation draggingEntered(id sender);
virtual NSDragOperation draggingUpdated(id sender);
virtual void draggingExited(id sender);
- virtual MacOSBOOL prepareForDragOperation(id sender);
- virtual MacOSBOOL performDragOperation(id sender);
+ virtual BOOL prepareForDragOperation(id sender);
+ virtual BOOL performDragOperation(id sender);
virtual void concludeDragOperation(id sender);
/* If multiple actions are supported by the drag source and
diff --git a/vcl/aqua/source/dtrans/service_entry.cxx b/vcl/aqua/source/dtrans/service_entry.cxx
index 222b5cf40e04..ca207c23bdee 100644
--- a/vcl/aqua/source/dtrans/service_entry.cxx
+++ b/vcl/aqua/source/dtrans/service_entry.cxx
@@ -38,37 +38,37 @@
using namespace ::osl;
using namespace ::rtl;
+using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::cppu;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::datatransfer::clipboard;
-Reference< XInterface > AquaSalInstance::CreateClipboard( const Sequence< Any >& i_rArguments )
+uno::Reference< XInterface > AquaSalInstance::CreateClipboard( const Sequence< Any >& i_rArguments )
{
if ( Application::IsHeadlessModeEnabled() )
return SalInstance::CreateClipboard( i_rArguments );
SalData* pSalData = GetSalData();
if( ! pSalData->mxClipboard.is() )
- pSalData->mxClipboard = Reference<XInterface>(static_cast< XClipboard* >(new AquaClipboard()), UNO_QUERY);
+ pSalData->mxClipboard = uno::Reference<XInterface>(static_cast< XClipboard* >(new AquaClipboard()), UNO_QUERY);
return pSalData->mxClipboard;
}
-
-Reference<XInterface> AquaSalInstance::CreateDragSource()
+uno::Reference<XInterface> AquaSalInstance::CreateDragSource()
{
if ( Application::IsHeadlessModeEnabled() )
return SalInstance::CreateDragSource();
- return Reference<XInterface>(static_cast< XInitialization* >(new DragSource()), UNO_QUERY);
+ return uno::Reference<XInterface>(static_cast< XInitialization* >(new DragSource()), UNO_QUERY);
}
-Reference<XInterface> AquaSalInstance::CreateDropTarget()
+uno::Reference<XInterface> AquaSalInstance::CreateDropTarget()
{
if ( Application::IsHeadlessModeEnabled() )
return SalInstance::CreateDropTarget();
- return Reference<XInterface>(static_cast< XInitialization* >(new DropTarget()), UNO_QUERY);
+ return uno::Reference<XInterface>(static_cast< XInitialization* >(new DropTarget()), UNO_QUERY);
}
diff --git a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
index 93945570dc96..82119fb9c50a 100644
--- a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
+++ b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
@@ -296,7 +296,7 @@ class ControllerProperties
std::map< int, rtl::OUString >::const_iterator name_it = maTagToPropertyName.find( nTag );
if( name_it != maTagToPropertyName.end() && ! name_it->second.equalsAscii( "PrintContent" ) )
{
- MacOSBOOL bEnabled = mpController->isUIOptionEnabled( name_it->second ) ? YES : NO;
+ BOOL bEnabled = mpController->isUIOptionEnabled( name_it->second ) ? YES : NO;
if( pCtrl )
{
[pCtrl setEnabled: bEnabled];
@@ -816,7 +816,6 @@ static void addBool( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO
[pBtn setEnabled: NO];
linebreakCell( [pBtn cell], rText );
[pBtn sizeToFit];
- [pCurParent addSubview: [pBtn autorelease]];
rRightColumn.push_back( ColumnItem( pBtn ) );
@@ -828,10 +827,17 @@ static void addBool( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO
[pBtn setTag: nTag];
aCheckRect = [pBtn frame];
+ // #i115837# add a murphy factor; it can apparently occasionally happen
+ // that sizeToFit does not a perfect job and that the button linebreaks again
+ // if - and only if - there is already a '\n' contained in the text and the width
+ // is minimally of
+ aCheckRect.size.width += 1;
// move to rCurY
aCheckRect.origin.y = rCurY - aCheckRect.size.height;
[pBtn setFrame: aCheckRect];
+
+ [pCurParent addSubview: [pBtn autorelease]];
// update rCurY
rCurY = aCheckRect.origin.y - 5;
diff --git a/vcl/aqua/source/gdi/aquaprintview.mm b/vcl/aqua/source/gdi/aquaprintview.mm
index ae42c5c09e8d..11b4b9088591 100755
--- a/vcl/aqua/source/gdi/aquaprintview.mm
+++ b/vcl/aqua/source/gdi/aquaprintview.mm
@@ -44,7 +44,7 @@
return self;
}
--(MacOSBOOL)knowsPageRange: (NSRangePointer)range
+-(BOOL)knowsPageRange: (NSRangePointer)range
{
range->location = 1;
range->length = mpInfoPrinter->getCurPageRangeCount();
diff --git a/vcl/aqua/source/gdi/salatslayout.cxx b/vcl/aqua/source/gdi/salatslayout.cxx
index a355ff86d00e..9626e2fcbdce 100755
--- a/vcl/aqua/source/gdi/salatslayout.cxx
+++ b/vcl/aqua/source/gdi/salatslayout.cxx
@@ -266,7 +266,7 @@ bool ATSLayout::LayoutText( ImplLayoutArgs& rArgs )
if( (rArgs.mnFlags & SAL_LAYOUT_BIDI_STRONG) != 0 )
{
// control BiDi defaults
- MacOSBOOL nLineDirTag = kATSULeftToRightBaseDirection;
+ BOOL nLineDirTag = kATSULeftToRightBaseDirection;
if( (rArgs.mnFlags & SAL_LAYOUT_BIDI_RTL) != 0 )
nLineDirTag = kATSURightToLeftBaseDirection;
aTagAttrs[0] = kATSULineDirectionTag;
diff --git a/vcl/aqua/source/gdi/salbmp.cxx b/vcl/aqua/source/gdi/salbmp.cxx
index 0e58c35b5fad..e54c7edd6fe5 100644
--- a/vcl/aqua/source/gdi/salbmp.cxx
+++ b/vcl/aqua/source/gdi/salbmp.cxx
@@ -104,7 +104,7 @@ bool AquaSalBitmap::Create( CGLayerRef xLayer, int nBitmapBits,
// ------------------------------------------------------------------
-bool AquaSalBitmap::Create( const Size& rSize, USHORT nBits, const BitmapPalette& rBitmapPalette )
+bool AquaSalBitmap::Create( const Size& rSize, sal_uInt16 nBits, const BitmapPalette& rBitmapPalette )
{
if( !isValidBitCount( nBits ) )
return false;
@@ -131,7 +131,7 @@ bool AquaSalBitmap::Create( const SalBitmap& rSalBmp, SalGraphics* pGraphics )
// ------------------------------------------------------------------
-bool AquaSalBitmap::Create( const SalBitmap& rSalBmp, USHORT nNewBitCount )
+bool AquaSalBitmap::Create( const SalBitmap& rSalBmp, sal_uInt16 nNewBitCount )
{
const AquaSalBitmap& rSourceBitmap = static_cast<const AquaSalBitmap&>(rSalBmp);
@@ -560,7 +560,7 @@ Size AquaSalBitmap::GetSize() const
// ------------------------------------------------------------------
-USHORT AquaSalBitmap::GetBitCount() const
+sal_uInt16 AquaSalBitmap::GetBitCount() const
{
return mnBits;
}
@@ -569,9 +569,9 @@ USHORT AquaSalBitmap::GetBitCount() const
static struct pal_entry
{
- BYTE mnRed;
- BYTE mnGreen;
- BYTE mnBlue;
+ sal_uInt8 mnRed;
+ sal_uInt8 mnGreen;
+ sal_uInt8 mnBlue;
}
const aImplSalSysPalEntryAry[ 16 ] =
{
@@ -626,9 +626,9 @@ const BitmapPalette& GetDefaultPalette( int mnBits, bool bMonochrome )
// own palette (6/6/6)
const int DITHER_PAL_STEPS = 6;
- const BYTE DITHER_PAL_DELTA = 51;
+ const sal_uInt8 DITHER_PAL_DELTA = 51;
int nB, nG, nR;
- BYTE nRed, nGreen, nBlue;
+ sal_uInt8 nRed, nGreen, nBlue;
for( nB=0, nBlue=0; nB < DITHER_PAL_STEPS; nB++, nBlue += DITHER_PAL_DELTA )
{
for( nG=0, nGreen=0; nG < DITHER_PAL_STEPS; nG++, nGreen += DITHER_PAL_DELTA )
diff --git a/vcl/aqua/source/gdi/salgdi.cxx b/vcl/aqua/source/gdi/salgdi.cxx
index 070c0753637d..62906a5df268 100644
--- a/vcl/aqua/source/gdi/salgdi.cxx
+++ b/vcl/aqua/source/gdi/salgdi.cxx
@@ -41,6 +41,7 @@
#include "vcl/sysdata.hxx"
#include "vcl/sallayout.hxx"
#include "vcl/svapp.hxx"
+#include "vcl/region.h"
#include "osl/file.hxx"
#include "osl/process.h"
@@ -58,7 +59,7 @@
using namespace vcl;
-typedef unsigned char Boolean; // copied from MacTypes.h, should be properly included
+//typedef unsigned char Boolean; // copied from MacTypes.h, should be properly included
typedef std::vector<unsigned char> ByteVector;
@@ -453,9 +454,9 @@ void AquaSalGraphics::copyResolution( AquaSalGraphics& rGraphics )
// -----------------------------------------------------------------------
-USHORT AquaSalGraphics::GetBitCount()
+sal_uInt16 AquaSalGraphics::GetBitCount()
{
- USHORT nBits = mnBitmapDepth ? mnBitmapDepth : 32;//24;
+ sal_uInt16 nBits = mnBitmapDepth ? mnBitmapDepth : 32;//24;
return nBits;
}
@@ -562,7 +563,7 @@ void AquaSalGraphics::ResetClipRegion()
// -----------------------------------------------------------------------
-void AquaSalGraphics::BeginSetClipRegion( ULONG nRectCount )
+bool AquaSalGraphics::setClipRegion( const Region& i_rClip )
{
// release old clip path
if( mxClipPath )
@@ -570,41 +571,33 @@ void AquaSalGraphics::BeginSetClipRegion( ULONG nRectCount )
CGPathRelease( mxClipPath );
mxClipPath = NULL;
}
-}
-
-// -----------------------------------------------------------------------
-
-BOOL AquaSalGraphics::unionClipRegion( long nX, long nY, long nWidth, long nHeight )
-{
- if( (nWidth <= 0) || (nHeight <= 0) )
- return TRUE;
-
- if( !mxClipPath )
- mxClipPath = CGPathCreateMutable();
- const CGRect aClipRect = {{nX,nY},{nWidth,nHeight}};
- CGPathAddRect( mxClipPath, NULL, aClipRect );
- return TRUE;
-}
-
-// -----------------------------------------------------------------------
-
-bool AquaSalGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& rPolyPolygon )
-{
- if( rPolyPolygon.count() <= 0 )
- return true;
+ mxClipPath = CGPathCreateMutable();
- if( !mxClipPath )
- mxClipPath = CGPathCreateMutable();
- AddPolyPolygonToPath( mxClipPath, rPolyPolygon, !getAntiAliasB2DDraw(), false );
- return true;
-}
-
-// -----------------------------------------------------------------------
-
-void AquaSalGraphics::EndSetClipRegion()
-{
+ // set current path, either as polypolgon or sequence of rectangles
+ if( i_rClip.HasPolyPolygon() )
+ {
+ basegfx::B2DPolyPolygon aClip( const_cast<Region&>(i_rClip).ConvertToB2DPolyPolygon() );
+ AddPolyPolygonToPath( mxClipPath, aClip, !getAntiAliasB2DDraw(), false );
+ }
+ else
+ {
+ long nX, nY, nW, nH;
+ ImplRegionInfo aInfo;
+ bool bRegionRect = i_rClip.ImplGetFirstRect(aInfo, nX, nY, nW, nH );
+ while( bRegionRect )
+ {
+ if( nW && nH )
+ {
+ CGRect aRect = {{nX,nY}, {nW,nH}};
+ CGPathAddRect( mxClipPath, NULL, aRect );
+ }
+ bRegionRect = i_rClip.ImplGetNextRect( aInfo, nX, nY, nW, nH );
+ }
+ }
+ // set the current path as clip region
if( CheckContext() )
SetState();
+ return true;
}
// -----------------------------------------------------------------------
@@ -747,13 +740,13 @@ void AquaSalGraphics::drawRect( long nX, long nY, long nWidth, long nHeight )
// -----------------------------------------------------------------------
-static void getBoundRect( ULONG nPoints, const SalPoint *pPtAry, long &rX, long& rY, long& rWidth, long& rHeight )
+static void getBoundRect( sal_uLong nPoints, const SalPoint *pPtAry, long &rX, long& rY, long& rWidth, long& rHeight )
{
long nX1 = pPtAry->mnX;
long nX2 = nX1;
long nY1 = pPtAry->mnY;
long nY2 = nY1;
- for( ULONG n = 1; n < nPoints; n++ )
+ for( sal_uLong n = 1; n < nPoints; n++ )
{
if( pPtAry[n].mnX < nX1 )
nX1 = pPtAry[n].mnX;
@@ -777,7 +770,7 @@ static inline void alignLinePoint( const SalPoint* i_pIn, float& o_fX, float& o_
o_fY = static_cast<float>(i_pIn->mnY ) + 0.5;
}
-void AquaSalGraphics::drawPolyLine( ULONG nPoints, const SalPoint *pPtAry )
+void AquaSalGraphics::drawPolyLine( sal_uLong nPoints, const SalPoint *pPtAry )
{
if( nPoints < 1 )
return;
@@ -793,7 +786,7 @@ void AquaSalGraphics::drawPolyLine( ULONG nPoints, const SalPoint *pPtAry )
alignLinePoint( pPtAry, fX, fY );
CGContextMoveToPoint( mrContext, fX, fY );
pPtAry++;
- for( ULONG nPoint = 1; nPoint < nPoints; nPoint++, pPtAry++ )
+ for( sal_uLong nPoint = 1; nPoint < nPoints; nPoint++, pPtAry++ )
{
alignLinePoint( pPtAry, fX, fY );
CGContextAddLineToPoint( mrContext, fX, fY );
@@ -805,7 +798,7 @@ void AquaSalGraphics::drawPolyLine( ULONG nPoints, const SalPoint *pPtAry )
// -----------------------------------------------------------------------
-void AquaSalGraphics::drawPolygon( ULONG nPoints, const SalPoint *pPtAry )
+void AquaSalGraphics::drawPolygon( sal_uLong nPoints, const SalPoint *pPtAry )
{
if( nPoints <= 1 )
return;
@@ -833,7 +826,7 @@ void AquaSalGraphics::drawPolygon( ULONG nPoints, const SalPoint *pPtAry )
alignLinePoint( pPtAry, fX, fY );
CGContextMoveToPoint( mrContext, fX, fY );
pPtAry++;
- for( ULONG nPoint = 1; nPoint < nPoints; nPoint++, pPtAry++ )
+ for( sal_uLong nPoint = 1; nPoint < nPoints; nPoint++, pPtAry++ )
{
alignLinePoint( pPtAry, fX, fY );
CGContextAddLineToPoint( mrContext, fX, fY );
@@ -843,7 +836,7 @@ void AquaSalGraphics::drawPolygon( ULONG nPoints, const SalPoint *pPtAry )
{
CGContextMoveToPoint( mrContext, pPtAry->mnX, pPtAry->mnY );
pPtAry++;
- for( ULONG nPoint = 1; nPoint < nPoints; nPoint++, pPtAry++ )
+ for( sal_uLong nPoint = 1; nPoint < nPoints; nPoint++, pPtAry++ )
CGContextAddLineToPoint( mrContext, pPtAry->mnX, pPtAry->mnY );
}
@@ -853,7 +846,7 @@ void AquaSalGraphics::drawPolygon( ULONG nPoints, const SalPoint *pPtAry )
// -----------------------------------------------------------------------
-void AquaSalGraphics::drawPolyPolygon( ULONG nPolyCount, const ULONG *pPoints, PCONSTSALPOINT *ppPtAry )
+void AquaSalGraphics::drawPolyPolygon( sal_uLong nPolyCount, const sal_uLong *pPoints, PCONSTSALPOINT *ppPtAry )
{
if( nPolyCount <= 0 )
return;
@@ -863,7 +856,7 @@ void AquaSalGraphics::drawPolyPolygon( ULONG nPolyCount, const ULONG *pPoints, P
// find bound rect
long leftX = 0, topY = 0, maxWidth = 0, maxHeight = 0;
getBoundRect( pPoints[0], ppPtAry[0], leftX, topY, maxWidth, maxHeight );
- for( ULONG n = 1; n < nPolyCount; n++ )
+ for( sal_uLong n = 1; n < nPolyCount; n++ )
{
long nX = leftX, nY = topY, nW = maxWidth, nH = maxHeight;
getBoundRect( pPoints[n], ppPtAry[n], nX, nY, nW, nH );
@@ -898,9 +891,9 @@ void AquaSalGraphics::drawPolyPolygon( ULONG nPolyCount, const ULONG *pPoints, P
CGContextBeginPath( mrContext );
if( IsPenVisible() )
{
- for( ULONG nPoly = 0; nPoly < nPolyCount; nPoly++ )
+ for( sal_uLong nPoly = 0; nPoly < nPolyCount; nPoly++ )
{
- const ULONG nPoints = pPoints[nPoly];
+ const sal_uLong nPoints = pPoints[nPoly];
if( nPoints > 1 )
{
const SalPoint *pPtAry = ppPtAry[nPoly];
@@ -908,7 +901,7 @@ void AquaSalGraphics::drawPolyPolygon( ULONG nPolyCount, const ULONG *pPoints, P
alignLinePoint( pPtAry, fX, fY );
CGContextMoveToPoint( mrContext, fX, fY );
pPtAry++;
- for( ULONG nPoint = 1; nPoint < nPoints; nPoint++, pPtAry++ )
+ for( sal_uLong nPoint = 1; nPoint < nPoints; nPoint++, pPtAry++ )
{
alignLinePoint( pPtAry, fX, fY );
CGContextAddLineToPoint( mrContext, fX, fY );
@@ -919,15 +912,15 @@ void AquaSalGraphics::drawPolyPolygon( ULONG nPolyCount, const ULONG *pPoints, P
}
else
{
- for( ULONG nPoly = 0; nPoly < nPolyCount; nPoly++ )
+ for( sal_uLong nPoly = 0; nPoly < nPolyCount; nPoly++ )
{
- const ULONG nPoints = pPoints[nPoly];
+ const sal_uLong nPoints = pPoints[nPoly];
if( nPoints > 1 )
{
const SalPoint *pPtAry = ppPtAry[nPoly];
CGContextMoveToPoint( mrContext, pPtAry->mnX, pPtAry->mnY );
pPtAry++;
- for( ULONG nPoint = 1; nPoint < nPoints; nPoint++, pPtAry++ )
+ for( sal_uLong nPoint = 1; nPoint < nPoints; nPoint++, pPtAry++ )
CGContextAddLineToPoint( mrContext, pPtAry->mnX, pPtAry->mnY );
CGContextClosePath(mrContext);
}
@@ -1052,22 +1045,22 @@ bool AquaSalGraphics::drawPolyLine( const ::basegfx::B2DPolygon& rPolyLine,
// -----------------------------------------------------------------------
-sal_Bool AquaSalGraphics::drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry )
+sal_Bool AquaSalGraphics::drawPolyLineBezier( sal_uLong nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry )
{
return sal_False;
}
// -----------------------------------------------------------------------
-sal_Bool AquaSalGraphics::drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry )
+sal_Bool AquaSalGraphics::drawPolygonBezier( sal_uLong nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry )
{
return sal_False;
}
// -----------------------------------------------------------------------
-sal_Bool AquaSalGraphics::drawPolyPolygonBezier( ULONG nPoly, const ULONG* pPoints,
- const SalPoint* const* pPtAry, const BYTE* const* pFlgAry )
+sal_Bool AquaSalGraphics::drawPolyPolygonBezier( sal_uLong nPoly, const sal_uLong* pPoints,
+ const SalPoint* const* pPtAry, const sal_uInt8* const* pFlgAry )
{
return sal_False;
}
@@ -1153,7 +1146,7 @@ void AquaSalGraphics::copyBits( const SalTwoRect *pPosAry, SalGraphics *pSrcGrap
// -----------------------------------------------------------------------
-void AquaSalGraphics::copyArea( long nDstX, long nDstY,long nSrcX, long nSrcY, long nSrcWidth, long nSrcHeight, USHORT nFlags )
+void AquaSalGraphics::copyArea( long nDstX, long nDstY,long nSrcX, long nSrcY, long nSrcWidth, long nSrcHeight, sal_uInt16 nFlags )
{
ApplyXorContext();
@@ -1397,7 +1390,7 @@ void AquaSalGraphics::invert( long nX, long nY, long nWidth, long nHeight, SalIn
// -----------------------------------------------------------------------
-void AquaSalGraphics::invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nSalFlags )
+void AquaSalGraphics::invert( sal_uLong nPoints, const SalPoint* pPtAry, SalInvert nSalFlags )
{
CGPoint* CGpoints ;
if ( CheckContext() )
@@ -1434,8 +1427,8 @@ void AquaSalGraphics::invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert
// -----------------------------------------------------------------------
-BOOL AquaSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight,
- void* pEpsData, ULONG nByteCount )
+sal_Bool AquaSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight,
+ void* pEpsData, sal_uLong nByteCount )
{
// convert the raw data to an NSImageRef
NSData* xNSData = [NSData dataWithBytes:(void*)pEpsData length:(int)nByteCount];
@@ -1604,7 +1597,7 @@ void AquaSalGraphics::GetFontMetric( ImplFontMetricData* pMetric, int nFallbackL
// -----------------------------------------------------------------------
-ULONG AquaSalGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs )
+sal_uLong AquaSalGraphics::GetKernPairs( sal_uLong nPairs, ImplKernPairData* pKernPairs )
{
return 0;
}
@@ -1785,7 +1778,7 @@ static OSStatus GgoMoveToProc( const Float32Point* pPoint, void* pData )
return eStatus;
}
-BOOL AquaSalGraphics::GetGlyphOutline( long nGlyphId, basegfx::B2DPolyPolygon& rPolyPoly )
+sal_Bool AquaSalGraphics::GetGlyphOutline( long nGlyphId, basegfx::B2DPolyPolygon& rPolyPoly )
{
GgoData aGgoData;
aGgoData.mpPolyPoly = &rPolyPoly;
@@ -1827,7 +1820,7 @@ long AquaSalGraphics::GetGraphicsWidth() const
// -----------------------------------------------------------------------
-BOOL AquaSalGraphics::GetGlyphBoundRect( long nGlyphId, Rectangle& rRect )
+sal_Bool AquaSalGraphics::GetGlyphBoundRect( long nGlyphId, Rectangle& rRect )
{
ATSUStyle rATSUStyle = maATSUStyle; // TODO: handle glyph fallback
GlyphID aGlyphId = nGlyphId;
@@ -1860,7 +1853,7 @@ void AquaSalGraphics::DrawServerFontLayout( const ServerFontLayout& )
// -----------------------------------------------------------------------
-USHORT AquaSalGraphics::SetFont( ImplFontSelectData* pReqFont, int nFallbackLevel )
+sal_uInt16 AquaSalGraphics::SetFont( ImplFontSelectData* pReqFont, int nFallbackLevel )
{
if( !pReqFont )
{
@@ -2177,10 +2170,10 @@ static bool GetRawFontData( const ImplFontData* pFontData,
DBG_ASSERT( (nOfs==nTotalLen), "AquaSalGraphics::CreateFontSubset (nOfs!=nTotalLen)");
- return true;
+ return sal_True;
}
-BOOL AquaSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
+sal_Bool AquaSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
const ImplFontData* pFontData, long* pGlyphIDs, sal_uInt8* pEncoding,
sal_Int32* pGlyphWidths, int nGlyphCount, FontSubsetInfo& rInfo )
{
@@ -2189,7 +2182,7 @@ BOOL AquaSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
// prepare the requested file name for writing the font-subset file
rtl::OUString aSysPath;
if( osl_File_E_None != osl_getSystemPathFromFileURL( rToFile.pData, &aSysPath.pData ) )
- return FALSE;
+ return sal_False;
const rtl_TextEncoding aThreadEncoding = osl_getThreadTextEncoding();
const ByteString aToFile( rtl::OUStringToOString( aSysPath, aThreadEncoding ) );
@@ -2250,7 +2243,7 @@ BOOL AquaSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
// subset 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;
@@ -2270,7 +2263,7 @@ BOOL AquaSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
nGlyphIdx = ::MapChar( pSftFont, static_cast<sal_uInt16>(nGlyphIdx), 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
@@ -2298,7 +2291,7 @@ BOOL AquaSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
TTSimpleGlyphMetrics* pGlyphMetrics =
::GetTTSimpleGlyphMetrics( pSftFont, aShortIDs, nGlyphCount, bVertical );
if( !pGlyphMetrics )
- return FALSE;
+ return sal_False;
sal_uInt16 nNotDefAdv = pGlyphMetrics[0].adv;
pGlyphMetrics[0].adv = pGlyphMetrics[nNotDef].adv;
pGlyphMetrics[nNotDef].adv = nNotDefAdv;
@@ -2602,24 +2595,24 @@ void XorEmulation::SetTarget( int nWidth, int nHeight, int nTargetDepth,
nBytesPerRow = 1;
}
nBytesPerRow *= nWidth;
- mnBufferLongs = (nHeight * nBytesPerRow + sizeof(ULONG)-1) / sizeof(ULONG);
+ mnBufferLongs = (nHeight * nBytesPerRow + sizeof(sal_uLong)-1) / sizeof(sal_uLong);
// create a XorMask context
- mpMaskBuffer = new ULONG[ mnBufferLongs ];
+ mpMaskBuffer = new sal_uLong[ mnBufferLongs ];
mxMaskContext = ::CGBitmapContextCreate( mpMaskBuffer,
nWidth, nHeight, nBitsPerComponent, nBytesPerRow,
aCGColorSpace, aCGBmpInfo );
// reset the XOR mask to black
- memset( mpMaskBuffer, 0, mnBufferLongs * sizeof(ULONG) );
+ memset( mpMaskBuffer, 0, mnBufferLongs * sizeof(sal_uLong) );
// a bitmap context will be needed for manual XORing
// create one unless the target context is a bitmap context
if( nTargetDepth )
- mpTempBuffer = (ULONG*)CGBitmapContextGetData( mxTargetContext );
+ mpTempBuffer = (sal_uLong*)CGBitmapContextGetData( mxTargetContext );
if( !mpTempBuffer )
{
// create a bitmap context matching to the target context
- mpTempBuffer = new ULONG[ mnBufferLongs ];
+ mpTempBuffer = new sal_uLong[ mnBufferLongs ];
mxTempContext = ::CGBitmapContextCreate( mpTempBuffer,
nWidth, nHeight, nBitsPerComponent, nBytesPerRow,
aCGColorSpace, aCGBmpInfo );
@@ -2659,8 +2652,8 @@ bool XorEmulation::UpdateTarget()
// do a manual XOR with the XorMask
// this approach suffices for simple color manipulations
// and also the complex-clipping-XOR-trick used in metafiles
- const ULONG* pSrc = mpMaskBuffer;
- ULONG* pDst = mpTempBuffer;
+ const sal_uLong* pSrc = mpMaskBuffer;
+ sal_uLong* pDst = mpTempBuffer;
for( int i = mnBufferLongs; --i >= 0;)
*(pDst++) ^= *(pSrc++);
@@ -2678,7 +2671,7 @@ bool XorEmulation::UpdateTarget()
// reset the XorMask to black again
// TODO: not needed for last update
- memset( mpMaskBuffer, 0, mnBufferLongs * sizeof(ULONG) );
+ memset( mpMaskBuffer, 0, mnBufferLongs * sizeof(sal_uLong) );
// TODO: return FALSE if target was not changed
return true;
diff --git a/vcl/aqua/source/gdi/salgdiutils.cxx b/vcl/aqua/source/gdi/salgdiutils.cxx
index f7c234d2c4c4..9bafb50d19fc 100755
--- a/vcl/aqua/source/gdi/salgdiutils.cxx
+++ b/vcl/aqua/source/gdi/salgdiutils.cxx
@@ -253,12 +253,12 @@ void AquaSalGraphics::RefreshRect(float lX, float lY, float lWidth, float lHeigh
}
}
-CGPoint* AquaSalGraphics::makeCGptArray(ULONG nPoints, const SalPoint* pPtAry)
+CGPoint* AquaSalGraphics::makeCGptArray(sal_uLong nPoints, const SalPoint* pPtAry)
{
CGPoint *CGpoints = new (CGPoint[nPoints]);
if ( CGpoints )
{
- for(ULONG i=0;i<nPoints;i++)
+ for(sal_uLong i=0;i<nPoints;i++)
{
CGpoints[i].x = (float)(pPtAry[i].mnX);
CGpoints[i].y = (float)(pPtAry[i].mnY);
diff --git a/vcl/aqua/source/gdi/salnativewidgets.cxx b/vcl/aqua/source/gdi/salnativewidgets.cxx
index 9ce2b8a5a518..d2763411e039 100644
--- a/vcl/aqua/source/gdi/salnativewidgets.cxx
+++ b/vcl/aqua/source/gdi/salnativewidgets.cxx
@@ -236,13 +236,13 @@ static bool AquaGetScrollRect( /* TODO: int nScreen, */ ControlPart nPart,
/*
* IsNativeControlSupported()
* --------------------------
- * Returns TRUE if the platform supports native
+ * Returns sal_True if the platform supports native
* drawing of the control defined by nPart.
*
*/
-BOOL AquaSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nPart )
+sal_Bool AquaSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nPart )
{
- bool bOk = FALSE;
+ bool bOk = sal_False;
// Native controls are now defaults
// If you want to disable experimental native controls code,
@@ -375,18 +375,18 @@ BOOL AquaSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart n
/*
* 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 AquaSalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
- const Point& rPos, BOOL& rIsInside )
+sal_Bool AquaSalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
+ const Point& rPos, sal_Bool& rIsInside )
{
if ( nType == CTRL_SCROLLBAR )
{
Rectangle aRect;
bool bValid = AquaGetScrollRect( /* TODO: m_nScreen */ nPart, rControlRegion, aRect );
- rIsInside = bValid ? aRect.IsInside( rPos ) : FALSE;
+ rIsInside = bValid ? aRect.IsInside( rPos ) : sal_False;
if( GetSalData()->mbIsScrollbarDoubleMax )
{
// in double max mode the actual trough is a little smaller than the track
@@ -397,20 +397,20 @@ BOOL AquaSalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart
{
// the left 4 pixels are not hit sensitive
if( rPos.X() - aRect.Left() < 4 )
- rIsInside = FALSE;
+ rIsInside = sal_False;
}
else if( nPart == PART_TRACK_VERT_AREA )
{
// the top 4 pixels are not hit sensitive
if( rPos.Y() - aRect.Top() < 4 )
- rIsInside = FALSE;
+ rIsInside = sal_False;
}
}
}
return bValid;
} // CTRL_SCROLLBAR
- return FALSE;
+ return sal_False;
}
/*
@@ -470,14 +470,14 @@ UInt32 AquaSalGraphics::getTrackState( ControlState nState )
* aValue: An optional value (tristate/numerical/string)
* aCaption: A caption or title string (like button text etc)
*/
-BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
+sal_Bool AquaSalGraphics::drawNativeControl(ControlType nType,
ControlPart nPart,
const Rectangle& rControlRegion,
ControlState nState,
const ImplControlValue& aValue,
const rtl::OUString& aCaption )
{
- BOOL bOK = FALSE;
+ sal_Bool bOK = sal_False;
if( ! CheckContext() )
return false;
@@ -1151,7 +1151,7 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
case CTRL_FRAME:
{
- USHORT nStyle = aValue.getNumericVal();
+ sal_uInt16 nStyle = aValue.getNumericVal();
if( nPart == PART_BORDER ) {
if(!( nStyle & FRAME_DRAW_MENU ) && !(nStyle & FRAME_DRAW_WINDOWBORDER) )
{
@@ -1228,18 +1228,18 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
* aValue: An optional value (tristate/numerical/string)
* aCaption: A caption or title string (like button text etc)
*/
-BOOL AquaSalGraphics::drawNativeControlText( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
+sal_Bool AquaSalGraphics::drawNativeControlText( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
const rtl::OUString& aCaption )
{
- return( FALSE );
+ return( sal_False );
}
/*
* GetNativeControlRegion()
*
- * If the return value is TRUE, rNativeBoundingRegion
+ * If the return value is sal_True, rNativeBoundingRegion
* contains the 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
@@ -1249,12 +1249,12 @@ BOOL AquaSalGraphics::drawNativeControlText( ControlType nType, ControlPart nPar
* aValue: An optional value (tristate/numerical/string)
* aCaption: A caption or title string (like button text etc)
*/
-BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState,
+sal_Bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState,
const ImplControlValue& aValue, const rtl::OUString& aCaption,
Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion )
{
- BOOL toReturn = FALSE;
+ sal_Bool toReturn = sal_False;
Rectangle aCtrlBoundRect( rControlRegion );
short x = aCtrlBoundRect.Left();
@@ -1289,7 +1289,7 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
Rectangle aRect;
if( AquaGetScrollRect( /* m_nScreen */ nPart, aCtrlBoundRect, aRect ) )
{
- toReturn = TRUE;
+ toReturn = sal_True;
rNativeBoundingRegion = aRect;
rNativeContentRegion = aRect;
}
@@ -1319,7 +1319,7 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h + nBorderCleanup) );
rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) );
- toReturn = TRUE;
+ toReturn = sal_True;
}
break;
case CTRL_PROGRESS:
@@ -1331,7 +1331,7 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
aRect.Bottom() = aRect.Top() + 15; // values taken from HIG for large progress
rNativeBoundingRegion = aRect;
rNativeContentRegion = aRect;
- toReturn = TRUE;
+ toReturn = sal_True;
}
break;
@@ -1341,7 +1341,7 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
aRect.Bottom() = aRect.Top() + INTRO_PROGRESS_HEIGHT; // values taken from HIG for medium progress
rNativeBoundingRegion = aRect;
rNativeContentRegion = aRect;
- toReturn = TRUE;
+ toReturn = sal_True;
}
break;
@@ -1357,7 +1357,7 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) );
rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) );
- toReturn = TRUE;
+ toReturn = sal_True;
break;
@@ -1373,7 +1373,7 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
rNativeContentRegion = Rectangle( Point( x+FOCUS_RING_WIDTH, y+FOCUS_RING_WIDTH ), Size( w-2*(FOCUS_RING_WIDTH+1), h-2*(FOCUS_RING_WIDTH+1) ) );
rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) );
- toReturn = TRUE;
+ toReturn = sal_True;
}
break;
case CTRL_LISTBOX:
@@ -1387,7 +1387,7 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
rNativeContentRegion = Rectangle( Point( x+FOCUS_RING_WIDTH, y+FOCUS_RING_WIDTH ), Size( w-2*FOCUS_RING_WIDTH, h ) );
rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h+2*FOCUS_RING_WIDTH ) );
- toReturn = TRUE;
+ toReturn = sal_True;
}
else if( nPart == PART_BUTTON_DOWN )
{
@@ -1436,7 +1436,7 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
rNativeContentRegion = Rectangle( Point( x+FOCUS_RING_WIDTH, y ), Size( w-2*FOCUS_RING_WIDTH, h ) );
rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h+2*FOCUS_RING_WIDTH ) );
- toReturn = TRUE;
+ toReturn = sal_True;
}
else if( nPart == PART_SUB_EDIT ) {
w = aCtrlBoundRect.GetWidth() - SPIN_BUTTON_SPACE - SPIN_BUTTON_WIDTH;
@@ -1449,7 +1449,7 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
rNativeContentRegion = Rectangle( Point( x + FOCUS_RING_WIDTH, y + FOCUS_RING_WIDTH ), Size( w - 2* FOCUS_RING_WIDTH, h ) );
rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h+2*FOCUS_RING_WIDTH ) );
- toReturn = TRUE;
+ toReturn = sal_True;
}
else if( nPart == PART_BUTTON_UP ) {
//aCtrlBoundRect.GetWidth() contains the width of the full control
@@ -1463,7 +1463,7 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) );
rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) );
- toReturn = TRUE;
+ toReturn = sal_True;
}
else if( nPart == PART_BUTTON_DOWN ) {
x += aCtrlBoundRect.GetWidth() - SPIN_BUTTON_WIDTH - SPIN_BUTTON_SPACE - CLIP_FUZZ;
@@ -1474,12 +1474,12 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) );
rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) );
- toReturn = TRUE;
+ toReturn = sal_True;
}
break;
case CTRL_FRAME:
{
- USHORT nStyle = aValue.getNumericVal();
+ sal_uInt16 nStyle = aValue.getNumericVal();
if( ( nPart == PART_BORDER ) &&
!( nStyle & (FRAME_DRAW_MENU | FRAME_DRAW_WINDOWBORDER | FRAME_DRAW_BORDERWINDOWBORDER) ) )
{
@@ -1502,7 +1502,7 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
rNativeContentRegion = aRect;
rNativeBoundingRegion = aRect;
- toReturn = TRUE;
+ toReturn = sal_True;
}
}
break;
@@ -1518,7 +1518,7 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) );
rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) );
- toReturn = TRUE;
+ toReturn = sal_True;
}
}
break;
diff --git a/vcl/aqua/source/gdi/salprn.cxx b/vcl/aqua/source/gdi/salprn.cxx
index c79add81d791..a1d51376aa0b 100644
--- a/vcl/aqua/source/gdi/salprn.cxx
+++ b/vcl/aqua/source/gdi/salprn.cxx
@@ -176,9 +176,9 @@ void AquaSalInfoPrinter::ReleaseGraphics( SalGraphics* )
// -----------------------------------------------------------------------
-BOOL AquaSalInfoPrinter::Setup( SalFrame* i_pFrame, ImplJobSetup* i_pSetupData )
+sal_Bool AquaSalInfoPrinter::Setup( SalFrame* i_pFrame, ImplJobSetup* i_pSetupData )
{
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -251,14 +251,14 @@ static Paper recognizePaper( double i_fWidth, double i_fHeight )
return aPaper;
}
-BOOL AquaSalInfoPrinter::SetPrinterData( ImplJobSetup* io_pSetupData )
+sal_Bool AquaSalInfoPrinter::SetPrinterData( ImplJobSetup* io_pSetupData )
{
// FIXME: implement driver data
if( io_pSetupData && io_pSetupData->mpDriverData )
return SetData( ~0, io_pSetupData );
- BOOL bSuccess = TRUE;
+ sal_Bool bSuccess = sal_True;
// set system type
io_pSetupData->mnSystem = JOBSETUP_SYSTEM_MAC;
@@ -285,11 +285,11 @@ BOOL AquaSalInfoPrinter::SetPrinterData( ImplJobSetup* io_pSetupData )
io_pSetupData->meOrientation = mePageOrientation;
io_pSetupData->mnPaperBin = 0;
- io_pSetupData->mpDriverData = reinterpret_cast<BYTE*>(rtl_allocateMemory( 4 ));
+ io_pSetupData->mpDriverData = reinterpret_cast<sal_uInt8*>(rtl_allocateMemory( 4 ));
io_pSetupData->mnDriverDataLen = 4;
}
else
- bSuccess = FALSE;
+ bSuccess = sal_False;
return bSuccess;
@@ -319,10 +319,10 @@ void AquaSalInfoPrinter::setPaperSize( long i_nWidth, long i_nHeight, Orientatio
// -----------------------------------------------------------------------
-BOOL AquaSalInfoPrinter::SetData( ULONG i_nFlags, ImplJobSetup* io_pSetupData )
+sal_Bool AquaSalInfoPrinter::SetData( sal_uLong i_nFlags, ImplJobSetup* io_pSetupData )
{
if( ! io_pSetupData || io_pSetupData->mnSystem != JOBSETUP_SYSTEM_MAC )
- return FALSE;
+ return sal_False;
if( mpPrintInfo )
@@ -360,14 +360,14 @@ BOOL AquaSalInfoPrinter::SetData( ULONG i_nFlags, ImplJobSetup* io_pSetupData )
// -----------------------------------------------------------------------
-ULONG AquaSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* i_pSetupData )
+sal_uLong AquaSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* i_pSetupData )
{
return 0;
}
// -----------------------------------------------------------------------
-XubString AquaSalInfoPrinter::GetPaperBinName( const ImplJobSetup* i_pSetupData, ULONG i_nPaperBin )
+XubString AquaSalInfoPrinter::GetPaperBinName( const ImplJobSetup* i_pSetupData, sal_uLong i_nPaperBin )
{
return XubString();
}
@@ -380,14 +380,14 @@ static bool getUseNativeDialog()
try
{
// get service provider
- Reference< XMultiServiceFactory > xSMgr( unohelper::GetMultiServiceFactory() );
+ uno::Reference< XMultiServiceFactory > xSMgr( unohelper::GetMultiServiceFactory() );
// create configuration hierachical access name
if( xSMgr.is() )
{
try
{
- Reference< XMultiServiceFactory > xConfigProvider(
- Reference< XMultiServiceFactory >(
+ uno::Reference< XMultiServiceFactory > xConfigProvider(
+ uno::Reference< XMultiServiceFactory >(
xSMgr->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.configuration.ConfigurationProvider" ))),
UNO_QUERY )
@@ -399,8 +399,8 @@ static bool getUseNativeDialog()
aVal.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" ) );
aVal.Value <<= OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.Common/Misc" ) );
aArgs.getArray()[0] <<= aVal;
- Reference< XNameAccess > xConfigAccess(
- Reference< XNameAccess >(
+ uno::Reference< XNameAccess > xConfigAccess(
+ uno::Reference< XNameAccess >(
xConfigProvider->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.configuration.ConfigurationAccess" )),
aArgs ),
@@ -436,7 +436,7 @@ static bool getUseNativeDialog()
return bNative;
}
-ULONG AquaSalInfoPrinter::GetCapabilities( const ImplJobSetup* i_pSetupData, USHORT i_nType )
+sal_uLong AquaSalInfoPrinter::GetCapabilities( const ImplJobSetup* i_pSetupData, sal_uInt16 i_nType )
{
switch( i_nType )
{
@@ -518,7 +518,7 @@ static Size getPageSize( vcl::PrinterController& i_rController, sal_Int32 i_nPag
return aPageSize;
}
-BOOL AquaSalInfoPrinter::StartJob( const String* i_pFileName,
+sal_Bool AquaSalInfoPrinter::StartJob( const String* i_pFileName,
const String& i_rJobName,
const String& i_rAppName,
ImplJobSetup* i_pSetupData,
@@ -526,9 +526,9 @@ BOOL AquaSalInfoPrinter::StartJob( const String* i_pFileName,
)
{
if( mbJob )
- return FALSE;
+ return sal_False;
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = sal_False;
bool bWasAborted = false;
AquaSalInstance* pInst = GetSalData()->mpFirstInstance;
PrintAccessoryViewState aAccViewState;
@@ -663,7 +663,7 @@ BOOL AquaSalInfoPrinter::StartJob( const String* i_pFileName,
if( bShowPanel && mnCurPageRangeStart == 0 && nCurJob == 0) // only the first range of pages (in the first job) gets the accesory view
pReleaseAfterUse = [AquaPrintAccessoryView setupPrinterPanel: pPrintOperation withController: &i_rController withState: &aAccViewState];
- bSuccess = TRUE;
+ bSuccess = sal_True;
mbJob = true;
pInst->startedPrintJob();
[pPrintOperation runOperation];
@@ -681,7 +681,7 @@ BOOL AquaSalInfoPrinter::StartJob( const String* i_pFileName,
// inform application that it can release its data
// this is awkward, but the XRenderable interface has no method for this,
- // so we need to call XRenderadble::render one last time with IsLastPage = TRUE
+ // so we need to call XRenderadble::render one last time with IsLastPage = sal_True
i_rController.setLastPage( sal_True );
GDIMetaFile aPageFile;
if( mrContext )
@@ -699,26 +699,26 @@ BOOL AquaSalInfoPrinter::StartJob( const String* i_pFileName,
// -----------------------------------------------------------------------
-BOOL AquaSalInfoPrinter::EndJob()
+sal_Bool AquaSalInfoPrinter::EndJob()
{
mnStartPageOffsetX = mnStartPageOffsetY = 0;
mbJob = false;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL AquaSalInfoPrinter::AbortJob()
+sal_Bool AquaSalInfoPrinter::AbortJob()
{
mbJob = false;
// FIXME: implementation
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-SalGraphics* AquaSalInfoPrinter::StartPage( ImplJobSetup* i_pSetupData, BOOL i_bNewJobData )
+SalGraphics* AquaSalInfoPrinter::StartPage( ImplJobSetup* i_pSetupData, sal_Bool i_bNewJobData )
{
if( i_bNewJobData && i_pSetupData )
SetPrinterData( i_pSetupData );
@@ -732,15 +732,15 @@ SalGraphics* AquaSalInfoPrinter::StartPage( ImplJobSetup* i_pSetupData, BOOL i_b
// -----------------------------------------------------------------------
-BOOL AquaSalInfoPrinter::EndPage()
+sal_Bool AquaSalInfoPrinter::EndPage()
{
mpGraphics->InvalidateContext();
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-ULONG AquaSalInfoPrinter::GetErrorCode() const
+sal_uLong AquaSalInfoPrinter::GetErrorCode() const
{
return 0;
}
@@ -760,7 +760,7 @@ AquaSalPrinter::~AquaSalPrinter()
// -----------------------------------------------------------------------
-BOOL AquaSalPrinter::StartJob( const String* i_pFileName,
+sal_Bool AquaSalPrinter::StartJob( const String* i_pFileName,
const String& i_rJobName,
const String& i_rAppName,
ImplJobSetup* i_pSetupData,
@@ -771,49 +771,49 @@ BOOL AquaSalPrinter::StartJob( const String* i_pFileName,
// -----------------------------------------------------------------------
-BOOL AquaSalPrinter::StartJob( const XubString* i_pFileName,
+sal_Bool AquaSalPrinter::StartJob( const XubString* i_pFileName,
const XubString& i_rJobName,
const XubString& i_rAppName,
- ULONG i_nCopies,
+ sal_uLong i_nCopies,
bool i_bCollate,
bool i_bDirect,
ImplJobSetup* i_pSetupData )
{
DBG_ERROR( "should never be called" );
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL AquaSalPrinter::EndJob()
+sal_Bool AquaSalPrinter::EndJob()
{
return mpInfoPrinter->EndJob();
}
// -----------------------------------------------------------------------
-BOOL AquaSalPrinter::AbortJob()
+sal_Bool AquaSalPrinter::AbortJob()
{
return mpInfoPrinter->AbortJob();
}
// -----------------------------------------------------------------------
-SalGraphics* AquaSalPrinter::StartPage( ImplJobSetup* i_pSetupData, BOOL i_bNewJobData )
+SalGraphics* AquaSalPrinter::StartPage( ImplJobSetup* i_pSetupData, sal_Bool i_bNewJobData )
{
return mpInfoPrinter->StartPage( i_pSetupData, i_bNewJobData );
}
// -----------------------------------------------------------------------
-BOOL AquaSalPrinter::EndPage()
+sal_Bool AquaSalPrinter::EndPage()
{
return mpInfoPrinter->EndPage();
}
// -----------------------------------------------------------------------
-ULONG AquaSalPrinter::GetErrorCode()
+sal_uLong AquaSalPrinter::GetErrorCode()
{
return mpInfoPrinter->GetErrorCode();
}
diff --git a/vcl/aqua/source/gdi/salvd.cxx b/vcl/aqua/source/gdi/salvd.cxx
index f633dbbdcdce..b40f5e602ebe 100644
--- a/vcl/aqua/source/gdi/salvd.cxx
+++ b/vcl/aqua/source/gdi/salvd.cxx
@@ -40,7 +40,7 @@
// -----------------------------------------------------------------------
SalVirtualDevice* AquaSalInstance::CreateVirtualDevice( SalGraphics* pGraphics,
- long nDX, long nDY, USHORT nBitCount, const SystemGraphicsData *pData )
+ long nDX, long nDY, sal_uInt16 nBitCount, const SystemGraphicsData *pData )
{
// #i92075# can be called first in a thread
SalData::ensureThreadAutoreleasePool();
@@ -57,7 +57,7 @@ void AquaSalInstance::DestroyVirtualDevice( SalVirtualDevice* pDevice )
// =======================================================================
-AquaSalVirtualDevice::AquaSalVirtualDevice( AquaSalGraphics* pGraphic, long nDX, long nDY, USHORT nBitCount, const SystemGraphicsData *pData )
+AquaSalVirtualDevice::AquaSalVirtualDevice( AquaSalGraphics* pGraphic, long nDX, long nDY, sal_uInt16 nBitCount, const SystemGraphicsData *pData )
: mbGraphicsUsed( false )
, mxBitmapContext( NULL )
, mnBitmapDepth( 0 )
@@ -156,7 +156,7 @@ void AquaSalVirtualDevice::ReleaseGraphics( SalGraphics *pGraphics )
// -----------------------------------------------------------------------
-BOOL AquaSalVirtualDevice::SetSize( long nDX, long nDY )
+sal_Bool AquaSalVirtualDevice::SetSize( long nDX, long nDY )
{
if( mbForeignContext )
{
diff --git a/vcl/aqua/source/window/salframe.cxx b/vcl/aqua/source/window/salframe.cxx
index 17e034bd6e3d..676014be2277 100644
--- a/vcl/aqua/source/window/salframe.cxx
+++ b/vcl/aqua/source/window/salframe.cxx
@@ -61,7 +61,7 @@ AquaSalFrame* AquaSalFrame::s_pCaptureFrame = NULL;
// =======================================================================
-AquaSalFrame::AquaSalFrame( SalFrame* pParent, ULONG salFrameStyle ) :
+AquaSalFrame::AquaSalFrame( SalFrame* pParent, sal_uLong salFrameStyle ) :
mpWindow(nil),
mpView(nil),
mpDockMenuEntry(nil),
@@ -291,7 +291,7 @@ void AquaSalFrame::ReleaseGraphics( SalGraphics *pGraphics )
// -----------------------------------------------------------------------
-BOOL AquaSalFrame::PostEvent( void *pData )
+sal_Bool AquaSalFrame::PostEvent( void *pData )
{
GetSalData()->mpFirstInstance->PostUserEvent( this, SALEVENT_USEREVENT, pData );
return TRUE;
@@ -310,7 +310,7 @@ void AquaSalFrame::SetTitle(const XubString& rTitle)
[mpWindow setTitle: pTitle];
// create an entry in the dock menu
- const ULONG nAppWindowStyle = (SAL_FRAME_STYLE_CLOSEABLE | SAL_FRAME_STYLE_MOVEABLE);
+ const sal_uLong nAppWindowStyle = (SAL_FRAME_STYLE_CLOSEABLE | SAL_FRAME_STYLE_MOVEABLE);
if( mpParent == NULL &&
(mnStyle & nAppWindowStyle) == nAppWindowStyle )
{
@@ -336,7 +336,7 @@ void AquaSalFrame::SetTitle(const XubString& rTitle)
// -----------------------------------------------------------------------
-void AquaSalFrame::SetIcon( USHORT )
+void AquaSalFrame::SetIcon( sal_uInt16 )
{
}
@@ -415,7 +415,7 @@ void AquaSalFrame::SendPaintEvent( const Rectangle* pRect )
// -----------------------------------------------------------------------
-void AquaSalFrame::Show(BOOL bVisible, BOOL bNoActivate)
+void AquaSalFrame::Show(sal_Bool bVisible, sal_Bool bNoActivate)
{
if ( !mpWindow )
return;
@@ -478,7 +478,7 @@ void AquaSalFrame::Show(BOOL bVisible, BOOL bNoActivate)
// -----------------------------------------------------------------------
-void AquaSalFrame::Enable( BOOL bEnable )
+void AquaSalFrame::Enable( sal_Bool bEnable )
{
}
@@ -621,7 +621,7 @@ void AquaSalFrame::SetWindowState( const SalFrameState* pState )
// get new geometry
UpdateFrameGeometry();
- USHORT nEvent = 0;
+ sal_uInt16 nEvent = 0;
if( pState->mnMask & (SAL_FRAMESTATE_MASK_X | SAL_FRAMESTATE_MASK_X) )
{
mbPositioned = true;
@@ -649,7 +649,7 @@ void AquaSalFrame::SetWindowState( const SalFrameState* pState )
// -----------------------------------------------------------------------
-BOOL AquaSalFrame::GetWindowState( SalFrameState* pState )
+sal_Bool AquaSalFrame::GetWindowState( SalFrameState* pState )
{
if ( !mpWindow )
return FALSE;
@@ -726,7 +726,7 @@ void AquaSalFrame::SetScreenNumber(unsigned int nScreen)
// -----------------------------------------------------------------------
-void AquaSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay )
+void AquaSalFrame::ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay )
{
if ( !mpWindow )
return;
@@ -839,7 +839,7 @@ public:
}
};
-void AquaSalFrame::StartPresentation( BOOL bStart )
+void AquaSalFrame::StartPresentation( sal_Bool bStart )
{
if ( !mpWindow )
return;
@@ -863,13 +863,13 @@ void AquaSalFrame::StartPresentation( BOOL bStart )
// -----------------------------------------------------------------------
-void AquaSalFrame::SetAlwaysOnTop( BOOL bOnTop )
+void AquaSalFrame::SetAlwaysOnTop( sal_Bool bOnTop )
{
}
// -----------------------------------------------------------------------
-void AquaSalFrame::ToTop(USHORT nFlags)
+void AquaSalFrame::ToTop(sal_uInt16 nFlags)
{
if ( !mpWindow )
return;
@@ -1035,18 +1035,18 @@ void AquaSalFrame::SetInputContext( SalInputContext* pContext )
// -----------------------------------------------------------------------
-void AquaSalFrame::EndExtTextInput( USHORT nFlags )
+void AquaSalFrame::EndExtTextInput( sal_uInt16 nFlags )
{
}
// -----------------------------------------------------------------------
-XubString AquaSalFrame::GetKeyName( USHORT nKeyCode )
+XubString AquaSalFrame::GetKeyName( sal_uInt16 nKeyCode )
{
- static std::map< USHORT, rtl::OUString > aKeyMap;
+ static std::map< sal_uInt16, rtl::OUString > aKeyMap;
if( aKeyMap.empty() )
{
- USHORT i;
+ sal_uInt16 i;
for( i = KEY_A; i <= KEY_Z; i++ )
aKeyMap[ i ] = rtl::OUString( sal_Unicode( 'A' + (i - KEY_A) ) );
for( i = KEY_0; i <= KEY_9; i++ )
@@ -1107,8 +1107,8 @@ XubString AquaSalFrame::GetKeyName( USHORT nKeyCode )
rtl::OUStringBuffer aResult( 16 );
- USHORT nUnmodifiedCode = (nKeyCode & KEY_CODE);
- std::map< USHORT, rtl::OUString >::const_iterator it = aKeyMap.find( nUnmodifiedCode );
+ sal_uInt16 nUnmodifiedCode = (nKeyCode & KEY_CODE);
+ std::map< sal_uInt16, rtl::OUString >::const_iterator it = aKeyMap.find( nUnmodifiedCode );
if( it != aKeyMap.end() )
{
if( (nKeyCode & KEY_SHIFT) != 0 )
@@ -1128,7 +1128,7 @@ XubString AquaSalFrame::GetKeyName( USHORT nKeyCode )
// -----------------------------------------------------------------------
-XubString AquaSalFrame::GetSymbolKeyName( const XubString&, USHORT nKeyCode )
+XubString AquaSalFrame::GetSymbolKeyName( const XubString&, sal_uInt16 nKeyCode )
{
return GetKeyName( nKeyCode );
}
@@ -1349,7 +1349,7 @@ void AquaSalFrame::Beep( SoundType eSoundType )
// -----------------------------------------------------------------------
-void AquaSalFrame::SetPosSize(long nX, long nY, long nWidth, long nHeight, USHORT nFlags)
+void AquaSalFrame::SetPosSize(long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags)
{
if ( !mpWindow )
return;
@@ -1357,7 +1357,7 @@ void AquaSalFrame::SetPosSize(long nX, long nY, long nWidth, long nHeight, USHOR
// #i113170# may not be the main thread if called from UNO API
SalData::ensureThreadAutoreleasePool();
- USHORT nEvent = 0;
+ sal_uInt16 nEvent = 0;
if( [mpWindow isMiniaturized] )
[mpWindow deminiaturize: NSApp]; // expand the window
@@ -1552,7 +1552,7 @@ bool AquaSalFrame::SetPluginParent( SystemParentData* pNewParent )
return sal_False;
}
-BOOL AquaSalFrame::MapUnicodeToKeyCode( sal_Unicode , LanguageType , KeyCode& )
+sal_Bool AquaSalFrame::MapUnicodeToKeyCode( sal_Unicode , LanguageType , KeyCode& )
{
// not supported yet
return FALSE;
@@ -1669,7 +1669,7 @@ void AquaSalFrame::UpdateFrameGeometry()
// -----------------------------------------------------------------------
-void AquaSalFrame::CaptureMouse( BOOL bCapture )
+void AquaSalFrame::CaptureMouse( sal_Bool bCapture )
{
/* Remark:
we'll try to use a pidgin version of capture mouse
@@ -1719,7 +1719,7 @@ void AquaSalFrame::ResetClipRegion()
}
}
-void AquaSalFrame::BeginSetClipRegion( ULONG nRects )
+void AquaSalFrame::BeginSetClipRegion( sal_uLong nRects )
{
if ( !mpWindow )
{
diff --git a/vcl/aqua/source/window/salframeview.mm b/vcl/aqua/source/window/salframeview.mm
index bc87ea444710..783d203c76fd 100755
--- a/vcl/aqua/source/window/salframeview.mm
+++ b/vcl/aqua/source/window/salframeview.mm
@@ -40,9 +40,9 @@
#define WHEEL_EVENT_FACTOR 1.5
-static USHORT ImplGetModifierMask( unsigned int nMask )
+static sal_uInt16 ImplGetModifierMask( unsigned int nMask )
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
if( (nMask & NSShiftKeyMask) != 0 )
nRet |= KEY_SHIFT;
if( (nMask & NSControlKeyMask) != 0 )
@@ -54,9 +54,9 @@ static USHORT ImplGetModifierMask( unsigned int nMask )
return nRet;
}
-static USHORT ImplMapCharCode( sal_Unicode aCode )
+static sal_uInt16 ImplMapCharCode( sal_Unicode aCode )
{
- static USHORT aKeyCodeMap[ 128 ] =
+ static sal_uInt16 aKeyCodeMap[ 128 ] =
{
0, 0, 0, 0, 0, 0, 0, 0,
KEY_BACKSPACE, KEY_TAB, KEY_RETURN, 0, 0, KEY_RETURN, 0, 0,
@@ -84,7 +84,7 @@ static USHORT ImplMapCharCode( sal_Unicode aCode )
// tab alone is reported as 0x09 (as expected) but shift-tab is
// reported as 0x19 (end of medium)
- static USHORT aFunctionKeyCodeMap[ 128 ] =
+ static sal_uInt16 aFunctionKeyCodeMap[ 128 ] =
{
KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT, KEY_F1, KEY_F2, KEY_F3, KEY_F4,
KEY_F5, KEY_F6, KEY_F7, KEY_F8, KEY_F9, KEY_F10, KEY_F11, KEY_F12,
@@ -104,7 +104,7 @@ static USHORT ImplMapCharCode( sal_Unicode aCode )
0, 0, 0, 0, 0, 0, 0, 0
};
- USHORT nKeyCode = 0;
+ sal_uInt16 nKeyCode = 0;
if( aCode < sizeof( aKeyCodeMap) / sizeof( aKeyCodeMap[0] ) )
nKeyCode = aKeyCodeMap[ aCode ];
else if( aCode >= 0xf700 && aCode < 0xf780 )
@@ -116,12 +116,12 @@ static USHORT ImplMapCharCode( sal_Unicode aCode )
static AquaSalFrame* s_pMouseFrame = NULL;
// store the last pressed button for enter/exit events
// which lack that information
-static USHORT s_nLastButton = 0;
+static sal_uInt16 s_nLastButton = 0;
// combinations of keys we need to handle ourselves
static const struct ExceptionalKey
{
- const USHORT nKeyCode;
+ const sal_uInt16 nKeyCode;
const unsigned int nModifierMask;
} aExceptionalKeys[] =
{
@@ -178,16 +178,16 @@ static AquaSalFrame* getMouseContainerFrame()
}
}
--(MacOSBOOL)containsMouse
+-(BOOL)containsMouse
{
// is this event actually inside that NSWindow ?
NSPoint aPt = [NSEvent mouseLocation];
NSRect aFrameRect = [self frame];
- MacOSBOOL bInRect = NSPointInRect( aPt, aFrameRect );
+ BOOL bInRect = NSPointInRect( aPt, aFrameRect );
return bInRect;
}
--(MacOSBOOL)canBecomeKeyWindow
+-(BOOL)canBecomeKeyWindow
{
if( (mpFrame->mnStyle &
( SAL_FRAME_STYLE_FLOAT |
@@ -210,7 +210,7 @@ static AquaSalFrame* getMouseContainerFrame()
if( mpFrame && AquaSalFrame::isAlive( mpFrame ) )
{
- static const ULONG nGuessDocument = SAL_FRAME_STYLE_MOVEABLE|
+ static const sal_uLong nGuessDocument = SAL_FRAME_STYLE_MOVEABLE|
SAL_FRAME_STYLE_SIZEABLE|
SAL_FRAME_STYLE_CLOSEABLE;
@@ -300,11 +300,11 @@ static AquaSalFrame* getMouseContainerFrame()
}
}
--(MacOSBOOL)windowShouldClose: (NSNotification*)pNotification
+-(BOOL)windowShouldClose: (NSNotification*)pNotification
{
YIELD_GUARD;
- MacOSBOOL bRet = YES;
+ BOOL bRet = YES;
if( mpFrame && AquaSalFrame::isAlive( mpFrame ) )
{
// #i84461# end possible input
@@ -347,12 +347,12 @@ static AquaSalFrame* getMouseContainerFrame()
[mDraggingDestinationHandler draggingExited: sender];
}
--(MacOSBOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender
+-(BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender
{
return [mDraggingDestinationHandler prepareForDragOperation: sender];
}
--(MacOSBOOL)performDragOperation:(id <NSDraggingInfo>)sender
+-(BOOL)performDragOperation:(id <NSDraggingInfo>)sender
{
return [mDraggingDestinationHandler performDragOperation: sender];
}
@@ -408,17 +408,17 @@ static AquaSalFrame* getMouseContainerFrame()
}
}
--(MacOSBOOL)acceptsFirstResponder
+-(BOOL)acceptsFirstResponder
{
return YES;
}
--(MacOSBOOL)acceptsFirstMouse: (NSEvent*)pEvent
+-(BOOL)acceptsFirstMouse: (NSEvent*)pEvent
{
return YES;
}
--(MacOSBOOL)isOpaque
+-(BOOL)isOpaque
{
return mpFrame ? (mpFrame->getClipPath() != 0 ? NO : YES) : YES;
}
@@ -466,7 +466,7 @@ private:
}
}
--(void)sendMouseEventToFrame: (NSEvent*)pEvent button:(USHORT)nButton eventtype:(USHORT)nEvent
+-(void)sendMouseEventToFrame: (NSEvent*)pEvent button:(sal_uInt16)nButton eventtype:(sal_uInt16)nEvent
{
YIELD_GUARD;
@@ -522,13 +522,13 @@ private:
if( pDispatchFrame && AquaSalFrame::isAlive( pDispatchFrame ) )
{
- pDispatchFrame->mnLastEventTime = static_cast<ULONG>( [pEvent timestamp] * 1000.0 );
+ pDispatchFrame->mnLastEventTime = static_cast<sal_uLong>( [pEvent timestamp] * 1000.0 );
pDispatchFrame->mnLastModifierFlags = [pEvent modifierFlags];
NSPoint aPt = [NSEvent mouseLocation];
pDispatchFrame->CocoaToVCL( aPt );
- USHORT nModMask = ImplGetModifierMask( [pEvent modifierFlags] );
+ sal_uInt16 nModMask = ImplGetModifierMask( [pEvent modifierFlags] );
// #i82284# emulate ctrl left
if( nModMask == KEY_MOD3 && nButton == MOUSE_LEFT )
{
@@ -662,7 +662,7 @@ private:
if( AquaSalFrame::isAlive( mpFrame ) )
{
const NSTimeInterval fMagnifyTime = [pEvent timestamp];
- mpFrame->mnLastEventTime = static_cast<ULONG>( fMagnifyTime * 1000.0 );
+ mpFrame->mnLastEventTime = static_cast<sal_uLong>( fMagnifyTime * 1000.0 );
mpFrame->mnLastModifierFlags = [pEvent modifierFlags];
// check if this is a new series of magnify events
@@ -733,7 +733,7 @@ private:
if( AquaSalFrame::isAlive( mpFrame ) )
{
- mpFrame->mnLastEventTime = static_cast<ULONG>( [pEvent timestamp] * 1000.0 );
+ mpFrame->mnLastEventTime = static_cast<sal_uLong>( [pEvent timestamp] * 1000.0 );
mpFrame->mnLastModifierFlags = [pEvent modifierFlags];
// merge pending scroll wheel events
@@ -793,7 +793,7 @@ private:
if( AquaSalFrame::isAlive( mpFrame ) )
{
- mpFrame->mnLastEventTime = static_cast<ULONG>( [pEvent timestamp] * 1000.0 );
+ mpFrame->mnLastEventTime = static_cast<sal_uLong>( [pEvent timestamp] * 1000.0 );
mpFrame->mnLastModifierFlags = [pEvent modifierFlags];
// merge pending scroll wheel events
@@ -865,7 +865,7 @@ private:
mbNeedSpecialKeyHandle = false;
mbKeyHandled = false;
- mpFrame->mnLastEventTime = static_cast<ULONG>( [pEvent timestamp] * 1000.0 );
+ mpFrame->mnLastEventTime = static_cast<sal_uLong>( [pEvent timestamp] * 1000.0 );
mpFrame->mnLastModifierFlags = [pEvent modifierFlags];
if( ! [self handleKeyDownException: pEvent] )
@@ -878,7 +878,7 @@ private:
}
}
--(MacOSBOOL)handleKeyDownException:(NSEvent*)pEvent
+-(BOOL)handleKeyDownException:(NSEvent*)pEvent
{
// check for a very special set of modified characters
NSString* pUnmodifiedString = [pEvent charactersIgnoringModifiers];
@@ -896,7 +896,7 @@ private:
return YES;
}
unichar keyChar = [pUnmodifiedString characterAtIndex: 0];
- USHORT nKeyCode = ImplMapCharCode( keyChar );
+ sal_uInt16 nKeyCode = ImplMapCharCode( keyChar );
// Caution: should the table grow to more than 5 or 6 entries,
// we must consider moving it to a kind of hash map
@@ -922,7 +922,7 @@ private:
if( AquaSalFrame::isAlive( mpFrame ) )
{
- mpFrame->mnLastEventTime = static_cast<ULONG>( [pEvent timestamp] * 1000.0 );
+ mpFrame->mnLastEventTime = static_cast<sal_uLong>( [pEvent timestamp] * 1000.0 );
mpFrame->mnLastModifierFlags = [pEvent modifierFlags];
}
}
@@ -952,7 +952,7 @@ private:
! [self hasMarkedText ]
)
{
- USHORT nKeyCode = ImplMapCharCode( aCharCode );
+ sal_uInt16 nKeyCode = ImplMapCharCode( aCharCode );
unsigned int nLastModifiers = mpFrame->mnLastModifierFlags;
// #i99567#
@@ -1328,18 +1328,18 @@ private:
}
}
--(MacOSBOOL)sendKeyInputAndReleaseToFrame: (USHORT)nKeyCode character: (sal_Unicode)aChar
+-(BOOL)sendKeyInputAndReleaseToFrame: (sal_uInt16)nKeyCode character: (sal_Unicode)aChar
{
return [self sendKeyInputAndReleaseToFrame: nKeyCode character: aChar modifiers: mpFrame->mnLastModifierFlags];
}
--(MacOSBOOL)sendKeyInputAndReleaseToFrame: (USHORT)nKeyCode character: (sal_Unicode)aChar modifiers: (unsigned int)nMod
+-(BOOL)sendKeyInputAndReleaseToFrame: (sal_uInt16)nKeyCode character: (sal_Unicode)aChar modifiers: (unsigned int)nMod
{
return [self sendKeyToFrameDirect: nKeyCode character: aChar modifiers: nMod] ||
[self sendSingleCharacter: mpLastEvent];
}
--(MacOSBOOL)sendKeyToFrameDirect: (USHORT)nKeyCode character: (sal_Unicode)aChar modifiers: (unsigned int)nMod
+-(BOOL)sendKeyToFrameDirect: (sal_uInt16)nKeyCode character: (sal_Unicode)aChar modifiers: (unsigned int)nMod
{
YIELD_GUARD;
@@ -1362,20 +1362,20 @@ private:
}
--(MacOSBOOL)sendSingleCharacter: (NSEvent *)pEvent
+-(BOOL)sendSingleCharacter: (NSEvent *)pEvent
{
NSString* pUnmodifiedString = [pEvent charactersIgnoringModifiers];
if( pUnmodifiedString && [pUnmodifiedString length] == 1 )
{
unichar keyChar = [pUnmodifiedString characterAtIndex: 0];
- USHORT nKeyCode = ImplMapCharCode( keyChar );
+ sal_uInt16 nKeyCode = ImplMapCharCode( keyChar );
if( nKeyCode != 0 )
{
// don't send unicodes in the private use area
if( keyChar >= 0xf700 && keyChar < 0xf780 )
keyChar = 0;
- MacOSBOOL bRet = [self sendKeyToFrameDirect: nKeyCode character: keyChar modifiers: mpFrame->mnLastModifierFlags];
+ BOOL bRet = [self sendKeyToFrameDirect: nKeyCode character: keyChar modifiers: mpFrame->mnLastModifierFlags];
mbInKeyInput = false;
return bRet;
@@ -1391,9 +1391,9 @@ private:
return [NSArray arrayWithObjects:NSUnderlineStyleAttributeName, nil];
}
-- (MacOSBOOL)hasMarkedText
+- (BOOL)hasMarkedText
{
- MacOSBOOL bHasMarkedText;
+ BOOL bHasMarkedText;
bHasMarkedText = ( mMarkedRange.location != NSNotFound ) &&
( mMarkedRange.length != 0 );
@@ -1460,7 +1460,7 @@ private:
if( len > 0 ) {
NSString *pString = [aString string];
OUString aInsertString( GetOUString( pString ) );
- std::vector<USHORT> aInputFlags = std::vector<USHORT>( std::max( 1, len ), 0 );
+ std::vector<sal_uInt16> aInputFlags = std::vector<sal_uInt16>( std::max( 1, len ), 0 );
for ( int i = 0; i < len; i++ )
{
unsigned int nUnderlineValue;
@@ -1619,12 +1619,12 @@ private:
[mDraggingDestinationHandler draggingExited: sender];
}
--(MacOSBOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender
+-(BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender
{
return [mDraggingDestinationHandler prepareForDragOperation: sender];
}
--(MacOSBOOL)performDragOperation:(id <NSDraggingInfo>)sender
+-(BOOL)performDragOperation:(id <NSDraggingInfo>)sender
{
return [mDraggingDestinationHandler performDragOperation: sender];
}
diff --git a/vcl/aqua/source/window/salmenu.cxx b/vcl/aqua/source/window/salmenu.cxx
index 82102f2e7095..fa045776c448 100644
--- a/vcl/aqua/source/window/salmenu.cxx
+++ b/vcl/aqua/source/window/salmenu.cxx
@@ -207,7 +207,7 @@ static void initAppMenu()
// =======================================================================
-SalMenu* AquaSalInstance::CreateMenu( BOOL bMenuBar, Menu* pVCLMenu )
+SalMenu* AquaSalInstance::CreateMenu( sal_Bool bMenuBar, Menu* pVCLMenu )
{
initAppMenu();
@@ -339,9 +339,9 @@ sal_Int32 removeUnusedItemsRunner(NSMenu * pMenu)
return drawnItems;
}
-bool AquaSalMenu::ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rRect, ULONG nFlags)
+bool AquaSalMenu::ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rRect, sal_uLong nFlags)
{
- // do not use native popup menu when AQUA_NATIVE_MENUS is set to FALSE
+ // do not use native popup menu when AQUA_NATIVE_MENUS is set to sal_False
if( ! VisibleMenuBar() ) {
return false;
}
@@ -369,7 +369,7 @@ bool AquaSalMenu::ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rR
// do the same strange semantics as vcl popup windows to arrive at a frame geometry
// in mirrored UI case; best done by actually executing the same code
- USHORT nArrangeIndex;
+ sal_uInt16 nArrangeIndex;
pWin->SetPosPixel( pWin->ImplCalcPos( pWin, rRect, nFlags, nArrangeIndex ) );
displayPopupFrame.origin.x = pWin->ImplGetFrame()->maGeometry.nX - pParentAquaSalFrame->maGeometry.nX + offset;
displayPopupFrame.origin.y = pWin->ImplGetFrame()->maGeometry.nY - pParentAquaSalFrame->maGeometry.nY + offset;
@@ -393,7 +393,7 @@ bool AquaSalMenu::ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rR
return true;
}
-int AquaSalMenu::getItemIndexByPos( USHORT nPos ) const
+int AquaSalMenu::getItemIndexByPos( sal_uInt16 nPos ) const
{
int nIndex = 0;
if( nPos == MENU_APPEND )
@@ -519,7 +519,7 @@ void AquaSalMenu::removeFallbackMenuItem( NSMenuItem* pOldItem )
}
}
-BOOL AquaSalMenu::VisibleMenuBar()
+sal_Bool AquaSalMenu::VisibleMenuBar()
{
// Enable/disable experimental native menus code?
//
@@ -528,11 +528,11 @@ BOOL AquaSalMenu::VisibleMenuBar()
static const char *pExperimental = getenv ("AQUA_NATIVE_MENUS");
if ( ImplGetSVData()->mbIsTestTool || (pExperimental && !strcasecmp(pExperimental, "FALSE")) )
- return FALSE;
+ return sal_False;
// End of experimental code enable/disable part
- return TRUE;
+ return sal_True;
}
void AquaSalMenu::SetFrame( const SalFrame *pFrame )
@@ -631,7 +631,7 @@ void AquaSalMenu::SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsi
}
}
-void AquaSalMenu::CheckItem( unsigned nPos, BOOL bCheck )
+void AquaSalMenu::CheckItem( unsigned nPos, sal_Bool bCheck )
{
if( nPos < maItems.size() )
{
@@ -640,7 +640,7 @@ void AquaSalMenu::CheckItem( unsigned nPos, BOOL bCheck )
}
}
-void AquaSalMenu::EnableItem( unsigned nPos, BOOL bEnable )
+void AquaSalMenu::EnableItem( unsigned nPos, sal_Bool bEnable )
{
if( nPos < maItems.size() )
{
@@ -701,10 +701,10 @@ void AquaSalMenu::SetItemText( unsigned i_nPos, SalMenuItem* i_pSalMenuItem, con
void AquaSalMenu::SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const XubString& rKeyName )
{
- USHORT nModifier;
+ sal_uInt16 nModifier;
sal_Unicode nCommandKey = 0;
- USHORT nKeyCode=rKeyCode.GetCode();
+ sal_uInt16 nKeyCode=rKeyCode.GetCode();
if( nKeyCode )
{
if ((nKeyCode>=KEY_A) && (nKeyCode<=KEY_Z)) // letter A..Z
@@ -786,7 +786,7 @@ void AquaSalMenu::GetSystemMenuData( SystemMenuData* pData )
{
}
-AquaSalMenu::MenuBarButtonEntry* AquaSalMenu::findButtonItem( USHORT i_nItemId )
+AquaSalMenu::MenuBarButtonEntry* AquaSalMenu::findButtonItem( sal_uInt16 i_nItemId )
{
for( size_t i = 0; i < maButtons.size(); ++i )
{
@@ -852,7 +852,7 @@ bool AquaSalMenu::AddMenuBarButton( const SalMenuButtonItem& i_rNewItem )
return true;
}
-void AquaSalMenu::RemoveMenuBarButton( USHORT i_nId )
+void AquaSalMenu::RemoveMenuBarButton( sal_uInt16 i_nId )
{
MenuBarButtonEntry* pEntry = findButtonItem( i_nId );
if( pEntry )
@@ -866,7 +866,7 @@ void AquaSalMenu::RemoveMenuBarButton( USHORT i_nId )
statusLayout();
}
-Rectangle AquaSalMenu::GetMenuBarButtonRectPixel( USHORT i_nItemId, SalFrame* i_pReferenceFrame )
+Rectangle AquaSalMenu::GetMenuBarButtonRectPixel( sal_uInt16 i_nItemId, SalFrame* i_pReferenceFrame )
{
if( GetSalData()->mnSystemVersion < VER_LEOPARD )
return Rectangle( Point( -1, -1 ), Size( 1, 1 ) );
diff --git a/vcl/aqua/source/window/salobj.cxx b/vcl/aqua/source/window/salobj.cxx
index f300929f04fe..3df1347e3b10 100644
--- a/vcl/aqua/source/window/salobj.cxx
+++ b/vcl/aqua/source/window/salobj.cxx
@@ -107,14 +107,14 @@ void AquaSalObject::ResetClipRegion()
// -----------------------------------------------------------------------
-USHORT AquaSalObject::GetClipRegionType()
+sal_uInt16 AquaSalObject::GetClipRegionType()
{
return SAL_OBJECT_CLIP_INCLUDERECTS;
}
// -----------------------------------------------------------------------
-void AquaSalObject::BeginSetClipRegion( ULONG nRectCount )
+void AquaSalObject::BeginSetClipRegion( sal_uLong nRectCount )
{
mbClip = false;
}
@@ -200,7 +200,7 @@ void AquaSalObject::setClippedPosSize()
// -----------------------------------------------------------------------
-void AquaSalObject::Show( BOOL bVisible )
+void AquaSalObject::Show( sal_Bool bVisible )
{
if( mpClipView )
[mpClipView setHidden: (bVisible ? NO : YES)];
@@ -208,7 +208,7 @@ void AquaSalObject::Show( BOOL bVisible )
// -----------------------------------------------------------------------
-void AquaSalObject::Enable( BOOL bEnable )
+void AquaSalObject::Enable( sal_Bool bEnable )
{
}
diff --git a/vcl/inc/vcl/abstdlg.hxx b/vcl/inc/vcl/abstdlg.hxx
index 2fa134af5078..b3bdae9c7c13 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..9913458be0e4 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_uLong GetSizeBytes() const { return Bitmap::GetSizeBytes(); }
+ sal_uLong 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_uLong nDX, sal_uLong 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_uLong nMirrorFlags );
+ sal_Bool Scale( const Size& rNewSize, sal_uLong nScaleFlag = BMP_SCALE_FAST );
+ sal_Bool Scale( const double& rScaleX, const double& rScaleY, sal_uLong 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_uLong nTol = 0UL );
+ sal_Bool Replace( sal_uInt8* pSearchTransparencies, sal_uInt8* pReplaceTransparencies,
+ sal_uLong nColorCount, sal_uLong* 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..be3d8768661b 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_uLong 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_uLong 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_uLong 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_uLong 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_uLong GetLoopCount() const { return mnLoopCount; }
+ void SetLoopCount( const sal_uLong 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_uLong GetSizeBytes() const;
+ sal_uLong 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_uLong nMirrorFlags );
+ sal_Bool Dither( sal_uLong 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..cfcd863dfb85 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_uLong mnProgressStart;
+ sal_uLong mnProgressEnd;
public:
struct MosaicTileSize
{
- ULONG mnTileWidth;
- ULONG mnTileHeight;
+ sal_uLong mnTileWidth;
+ sal_uLong 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_uLong nProgressStart = 0, sal_uLong nProgressEnd = 0 ) :
meFilter( BMP_FILTER_UNKNOWN ), mnProgressStart( nProgressStart ), mnProgressEnd( nProgressEnd ) {}
- BmpFilterParam( BYTE cSolarGreyThreshold, ULONG nProgressStart = 0, ULONG nProgressEnd = 0 ) :
+ BmpFilterParam( sal_uInt8 cSolarGreyThreshold, sal_uLong nProgressStart = 0, sal_uLong 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_uLong nProgressStart = 0, sal_uLong 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_uLong nProgressStart = 0, sal_uLong 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_uLong nProgressStart = 0, sal_uLong 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_uLong nOffset );
+ SAL_DLLPRIVATE static sal_Bool ImplReadDIBFileHeader( SvStream& rIStm, sal_uLong& 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_uLong 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_uLong* 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_uLong GetColorCount() const;
+ inline sal_uLong 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_uLong 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_uLong 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_uLong nDX, sal_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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_uLong nColorCount, sal_uLong* 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_uLong 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_uLong 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_uLong Bitmap::GetColorCount() const
{
- return( 1UL << (ULONG) GetBitCount() );
+ return( 1UL << (sal_uLong) GetBitCount() );
}
// ------------------------------------------------------------------
-inline ULONG Bitmap::GetSizeBytes() const
+inline sal_uLong Bitmap::GetSizeBytes() const
{
const Size aSizePix( GetSizePixel() );
- return( ( (ULONG) aSizePix.Width() * aSizePix.Height() * GetBitCount() ) >> 3UL );
+ return( ( (sal_uLong) 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..b977adae5c95 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_uLong GetSizeBytes() const;
+ sal_uLong 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_uLong 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_uLong nDX, sal_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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_uLong nColorCount, const sal_uLong* 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..def83d9910b7 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_uLong 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_uLong GetScanlineFormat() const;
+ inline sal_uLong 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_uLong nSrcScanlineFormat, sal_uLong 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_uLong 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_uLong 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_uLong 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 3186ba5f6399..bbe7ae0a515f 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, const rtl::OString& rHelpId );
- rtl::OString 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, const rtl::OString& rHelpId );
+ rtl::OString 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 ddd023a3aaa4..f6b030bd4f16 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_uLong 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_uLong nImageSep, sal_uLong 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 );
SAL_DLLPRIVATE const Rectangle& ImplGetSymbolRect() const;
SAL_DLLPRIVATE void ImplSetSymbolRect(const Rectangle&);
@@ -85,19 +85,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;
@@ -109,8 +109,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 -
@@ -122,21 +122,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_uLong nDrawFlags,
const Rectangle& rRect, bool bLayout, bool bMenuBtnSep );
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_uLong 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 & );
@@ -147,10 +147,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 );
@@ -170,7 +170,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_uLong nFlags );
virtual void Resize();
virtual void GetFocus();
virtual void LoseFocus();
@@ -186,17 +186,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();
@@ -210,12 +210,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);
}
@@ -297,17 +297,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_uLong nDrawFlags,
const Point& rPos, const Size& rSize,
const Size& rImageSize, Rectangle& rStateRect,
Rectangle& rMouseRect, bool bLayout = false );
@@ -328,7 +328,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:
@@ -357,7 +357,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_uLong nFlags );
virtual void Resize();
virtual void GetFocus();
virtual void LoseFocus();
@@ -367,22 +367,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;
@@ -417,14 +417,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_uLong nDrawFlags,
const Point& rPos, const Size& rSize,
const Size& rImageSize, Rectangle& rStateRect,
Rectangle& rMouseRect, bool bLayout );
@@ -462,7 +462,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_uLong nFlags );
virtual void Resize();
virtual void GetFocus();
virtual void LoseFocus();
@@ -475,16 +475,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;
@@ -493,12 +493,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..6b719ef988ef 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_uLong redShift, sal_uLong greenShift, sal_uLong blueShift );
virtual ~VclCanvasBitmap();
diff --git a/vcl/inc/vcl/cmdevt.hxx b/vcl/inc/vcl/cmdevt.hxx
index 7e968b6c7a54..30a6c0b953bf 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_uLong)0xFFFFFFFF)
class VCL_DLLPUBLIC CommandWheelData
{
private:
long mnDelta;
long mnNotchDelta;
- ULONG mnLines;
- USHORT mnMode;
- USHORT mnCode;
- BOOL mbHorz;
- BOOL mbDeltaIsPixel;
+ sal_uLong 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_uLong 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_uLong 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_uLong 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_uLong mnStart;
+ sal_uLong mnEnd;
public:
CommandSelectionChangeData();
- CommandSelectionChangeData( ULONG nStart, ULONG nEnd );
+ CommandSelectionChangeData( sal_uLong nStart, sal_uLong nEnd );
- ULONG GetStart() const { return mnStart; }
- ULONG GetEnd() const { return mnEnd; }
+ sal_uLong GetStart() const { return mnStart; }
+ sal_uLong 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_uLong nStart,
+ sal_uLong 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 640c70e7116f..e7ab69e75700 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_uLong 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,56 +116,56 @@ 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;
- Image GetEntryImage( USHORT nPos ) const;
- XubString GetEntry( USHORT nPos ) const;
- USHORT GetEntryCount() const;
+ sal_uInt16 GetEntryPos( const XubString& rStr ) const;
+ sal_uInt16 GetEntryPos( const void* pData ) const;
+ Image GetEntryImage( sal_uInt16 nPos ) 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; }
@@ -178,32 +178,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
@@ -224,7 +224,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..3bf529ada48b 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_uLong 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..a84e98524276 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_uLong ImplConvert( sal_uLong nInFormat, void* pInBuffer, sal_uLong nInBufSize,
+ void** ppOutBuffer, sal_uLong 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_uLong Import( SvStream& rIStm, Graphic& rGraphic, sal_uLong nFormat = CVT_UNKNOWN );
+ static sal_uLong Export( SvStream& rOStm, const Graphic& rGraphic, sal_uLong nFormat );
ConvertData* GetConvertData() { return mpConvertData; }
diff --git a/vcl/inc/vcl/cvtsvm.hxx b/vcl/inc/vcl/cvtsvm.hxx
index 03948ac56690..ad4e38816830 100644
--- a/vcl/inc/vcl/cvtsvm.hxx
+++ b/vcl/inc/vcl/cvtsvm.hxx
@@ -92,20 +92,20 @@
class Stack;
-class VCL_DLLPUBLIC SVMConverter
+class VCL_PLUGIN_PUBLIC SVMConverter
{
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_uLong 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_uLong 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..3bce9c0497ac 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_uLong 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/displayconnectiondispatch.hxx b/vcl/inc/vcl/displayconnectiondispatch.hxx
new file mode 100644
index 000000000000..fea1d0b7cba9
--- /dev/null
+++ b/vcl/inc/vcl/displayconnectiondispatch.hxx
@@ -0,0 +1,52 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
+#ifndef INCLUDED_VCL_DISPLAYCONNECTIONDISPATCH_HXX
+#define INCLUDED_VCL_DISPLAYCONNECTIONDISPATCH_HXX
+
+#include "sal/config.h"
+
+#include "com/sun/star/awt/XDisplayConnection.hpp"
+#include "cppuhelper/implbase1.hxx"
+
+namespace vcl {
+
+class DisplayConnectionDispatch:
+ public cppu::WeakImplHelper1< com::sun::star::awt::XDisplayConnection >
+{
+public:
+ virtual bool dispatchEvent(void * pData, int nBytes) = 0;
+
+ virtual bool dispatchErrorEvent(void * pData, int nBytes) = 0;
+
+protected:
+ virtual ~DisplayConnectionDispatch() {}
+};
+
+}
+
+#endif
diff --git a/vcl/inc/vcl/dllapi.h b/vcl/inc/vcl/dllapi.h
index bcf4001aa671..2c5c2c6801ac 100644
--- a/vcl/inc/vcl/dllapi.h
+++ b/vcl/inc/vcl/dllapi.h
@@ -37,4 +37,10 @@
#define VCL_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
#endif
+#if defined UNX && ! defined MACOS
+#define VCL_PLUGIN_PUBLIC VCL_DLLPUBLIC
+#else
+#define VCL_PLUGIN_PUBLIC SAL_DLLPRIVATE
+#endif
+
#endif
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..5fb9ab4d4c6d 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_uLong 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_uLong 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 9dc427d83943..f9063356b187 100755
--- 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_uLong 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_uLong nTimeout = EDIT_UPDATEDATA_TIMEOUT );
virtual void DisableUpdateData() { delete mpUpdateDataTimer; mpUpdateDataTimer = NULL; }
- virtual ULONG IsUpdateDataEnabled() const;
+ virtual sal_uLong 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;
@@ -253,12 +253,12 @@ public:
static Size GetMinimumEditSize();
};
-inline ULONG Edit::IsUpdateDataEnabled() const
+inline sal_uLong 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..33d43ddf2053 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_uLong mnFlags;
+ sal_uInt16 mnType;
public:
DataChangedEvent();
- DataChangedEvent( USHORT nType,
+ DataChangedEvent( sal_uInt16 nType,
const void* pData = NULL,
- ULONG nFlags = 0 );
+ sal_uLong nFlags = 0 );
- USHORT GetType() const { return mnType; }
+ sal_uInt16 GetType() const { return mnType; }
void* GetData() const { return mpData; }
- ULONG GetFlags() const { return mnFlags; }
+ sal_uLong 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_uLong nChangeFlags )
{
mpData = (void*)pData;
mnFlags = nChangeFlags;
diff --git a/vcl/inc/vcl/evntpost.hxx b/vcl/inc/vcl/evntpost.hxx
index 9e9badb7157b..287328d274a4 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_uLong m_nWhich;
void* m_pData;
};
class VCL_DLLPUBLIC EventPoster
{
- ULONG m_nId;
+ sal_uLong m_nId;
Link m_aLink;
//#if 0 // _SOLAR__PRIVATE
diff --git a/vcl/inc/vcl/field.hxx b/vcl/inc/vcl/field.hxx
index 6be9fd8d42c5..715725898180 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_uLong 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,27 +374,27 @@ 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 ); }
@@ -410,8 +410,8 @@ public:
In addition, if this is set to <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,16 +468,16 @@ 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 ); }
@@ -494,8 +494,8 @@ public:
In addition, if this is set to <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..dec13b4e2874 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_uLong 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_uLong 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..0aaa12e39394 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_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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,10 +167,10 @@ 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,
- const Point& rPos, const Size& rSize );
protected:
+ SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
+ const Point& rPos, const Size& rSize );
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
public:
@@ -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_uLong 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..cdb1531ee89a 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_uLong)0x00000001)
+#define FLOATWIN_POPUPMODE_ANIMATIONSLIDE ((sal_uLong)0x00000002)
+#define FLOATWIN_POPUPMODE_NOAUTOARRANGE ((sal_uLong)0x00000004)
+#define FLOATWIN_POPUPMODE_NOANIMATION ((sal_uLong)0x00000008)
+#define FLOATWIN_POPUPMODE_DOWN ((sal_uLong)0x00000010)
+#define FLOATWIN_POPUPMODE_UP ((sal_uLong)0x00000020)
+#define FLOATWIN_POPUPMODE_LEFT ((sal_uLong)0x00000040)
+#define FLOATWIN_POPUPMODE_RIGHT ((sal_uLong)0x00000080)
+#define FLOATWIN_POPUPMODE_NOFOCUSCLOSE ((sal_uLong)0x00000100)
+#define FLOATWIN_POPUPMODE_NOKEYCLOSE ((sal_uLong)0x00000200)
+#define FLOATWIN_POPUPMODE_NOMOUSECLOSE ((sal_uLong)0x00000400)
+#define FLOATWIN_POPUPMODE_NOMOUSERECTCLOSE ((sal_uLong)0x00000800)
+#define FLOATWIN_POPUPMODE_ALLMOUSEBUTTONCLOSE ((sal_uLong)0x00001000)
+#define FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE ((sal_uLong)0x00002000)
+#define FLOATWIN_POPUPMODE_PATHMOUSECANCELCLICK ((sal_uLong)0x00004000)
+#define FLOATWIN_POPUPMODE_NEWLEVEL ((sal_uLong)0x00008000)
+#define FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE ((sal_uLong)0x00010000)
+#define FLOATWIN_POPUPMODE_GRABFOCUS ((sal_uLong)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_uLong mnPostId;
+ sal_uLong 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_uLong nFlags,
+ sal_uInt16& rArrangeIndex );
+ SAL_DLLPRIVATE void ImplEndPopupMode( sal_uInt16 nFlags = 0, sal_uLong 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_uLong nFlags = 0 );
+ void StartPopupMode( ToolBox* pBox, sal_uLong 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_uLong GetPopupModeFlags() const { return mnPopupModeFlags; }
+ void SetPopupModeFlags( sal_uLong 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_uLong 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/fontcache.hxx b/vcl/inc/vcl/fontcache.hxx
index b18748ed5791..7747b99015fe 100644
--- a/vcl/inc/vcl/fontcache.hxx
+++ b/vcl/inc/vcl/fontcache.hxx
@@ -38,7 +38,7 @@
namespace psp
{
-class VCL_DLLPUBLIC FontCache
+class VCL_PLUGIN_PUBLIC FontCache
{
struct FontDir;
friend class FontDir;
diff --git a/vcl/inc/vcl/fontmanager.hxx b/vcl/inc/vcl/fontmanager.hxx
index 33fece8d88e1..f97f21a8f72d 100644
--- a/vcl/inc/vcl/fontmanager.hxx
+++ b/vcl/inc/vcl/fontmanager.hxx
@@ -222,7 +222,7 @@ class FontCache;
class FontCache;
-class VCL_DLLPUBLIC PrintFontManager
+class VCL_PLUGIN_PUBLIC PrintFontManager
{
struct PrintFont;
struct TrueTypeFontFile;
diff --git a/vcl/inc/vcl/gdimtf.hxx b/vcl/inc/vcl/gdimtf.hxx
index 636fc4a979f3..a83920b6674c 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_uLong)0xFFFFFFFF)
+#define GDI_METAFILE_LABEL_NOTFOUND ((sal_uLong)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_uLong nMirrorFlags );
void Move( long nX, long nY );
// additional Move method getting specifics how to handle MapMode( MAP_PIXEL )
void Move( long nX, long nY, long nDPIX, long nDPIY );
@@ -175,52 +175,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_uLong nTol = 0 );
void ReplaceColors( const Color* pSearchColors, const Color* rReplaceColors,
- ULONG nColorCount, ULONG* pTols = NULL );
+ sal_uLong nColorCount, sal_uLong* 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_uLong nPos = GDI_METAFILE_END );
+ void Play( OutputDevice* pOutDev, sal_uLong nPos = GDI_METAFILE_END );
void Play( OutputDevice* pOutDev, const Point& rPos,
- const Size& rSize, ULONG nPos = GDI_METAFILE_END );
+ const Size& rSize, sal_uLong 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_uLong nAction );
void WindPrev();
void WindNext();
- ULONG GetActionCount() const { return Count(); }
+ sal_uLong 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_uLong nPos );
+ void RemoveAction( sal_uLong nPos );
+ MetaAction* CopyAction( sal_uLong nPos ) const;
MetaAction* GetCurAction() const { return (MetaAction*) GetCurObject(); }
- MetaAction* GetAction( ULONG nAction ) const { return (MetaAction*) GetObject( nAction ); }
+ MetaAction* GetAction( sal_uLong 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_uLong nAction ) { return (MetaAction*) Replace( pAction, nAction ); }
- ULONG GetActionPos( const String& rLabel );
- BOOL InsertLabel( const String& rLabel, ULONG nActionPos );
+ sal_uLong GetActionPos( const String& rLabel );
+ sal_Bool InsertLabel( const String& rLabel, sal_uLong nActionPos );
void RemoveLabel( const String& rLabel );
void RenameLabel( const String& rLabel, const String& rNewLabel );
- ULONG GetLabelCount() const;
- String GetLabel( ULONG nLabel );
+ sal_uLong GetLabelCount() const;
+ String GetLabel( sal_uLong nLabel );
- BOOL SaveStatus();
+ sal_Bool SaveStatus();
const Size& GetPrefSize() const { return aPrefSize; }
void SetPrefSize( const Size& rSize ) { aPrefSize = rSize; }
@@ -231,8 +231,8 @@ public:
void SetHookHdl( const Link& rLink ) { aHookHdlLink = rLink; }
const Link& GetHookHdl() const { return aHookHdlLink; }
- ULONG GetChecksum() const;
- ULONG GetSizeBytes() const;
+ sal_uLong GetChecksum() const;
+ sal_uLong GetSizeBytes() const;
// Methoden zum Lesen und Schreiben des neuen Formats;
// die Read-Methode kann auch das alte Format lesen
@@ -244,7 +244,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 dced5a19c461..ce2cec67e1f4 100644
--- a/vcl/inc/vcl/gfxlink.hxx
+++ b/vcl/inc/vcl/gfxlink.hxx
@@ -39,16 +39,16 @@
struct ImpBuffer
{
- ULONG mnRefCount;
- BYTE* mpBuffer;
+ sal_uLong mnRefCount;
+ sal_uInt8* mpBuffer;
- ImpBuffer( ULONG nSize )
+ ImpBuffer( sal_uLong 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; }
};
@@ -60,15 +60,15 @@ struct ImpBuffer
struct ImpSwap
{
rtl::OUString maURL;
- ULONG mnDataSize;
- ULONG mnRefCount;
+ sal_uLong mnDataSize;
+ sal_uLong mnRefCount;
- ImpSwap( BYTE* pData, ULONG nDataSize );
+ ImpSwap( sal_uInt8* pData, sal_uLong nDataSize );
~ImpSwap();
- BYTE* GetData() const;
+ sal_uInt8* GetData() const;
- BOOL IsSwapped() const { return maURL.getLength() > 0; }
+ sal_Bool IsSwapped() const { return maURL.getLength() > 0; }
void WriteTo( SvStream& rOStm ) const;
};
@@ -134,7 +134,7 @@ private:
sal_uInt32 mnBufSize;
sal_uInt32 mnUserId;
ImpGfxLink* mpImpData;
- ULONG mnExtra2;
+ sal_uLong mnExtra2;
SAL_DLLPRIVATE void ImplCopy( const GfxLink& rGfxLink );
@@ -142,7 +142,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& );
@@ -154,8 +154,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 );
@@ -165,16 +165,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 0e77d5dd6bc4..a44935bf0e54 100644
--- a/vcl/inc/vcl/glyphcache.hxx
+++ b/vcl/inc/vcl/glyphcache.hxx
@@ -57,7 +57,7 @@ class ServerFontLayout;
// =======================================================================
-class VCL_DLLPUBLIC GlyphCache
+class VCL_PLUGIN_PUBLIC GlyphCache
{
public:
explicit GlyphCache( GlyphCachePeer& );
@@ -89,7 +89,7 @@ private:
void GrowNotify();
private:
- ULONG CalcByteCount() const;
+ sal_uLong CalcByteCount() const;
void GarbageCollect();
// the GlyphCache's FontList matches a font request to a serverfont instance
@@ -98,8 +98,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_uLong mnMaxSize; // max overall cache size in bytes
+ mutable sal_uLong mnBytesUsed;
mutable long mnLruIndex;
mutable int mnGlyphCount;
ServerFont* mpCurrentGCFont;
@@ -172,7 +172,7 @@ private:
// =======================================================================
-class VCL_DLLPUBLIC ServerFont
+class VCL_PLUGIN_PUBLIC ServerFont
{
public:
virtual const ::rtl::OString* GetFontFileName() const { return NULL; }
@@ -187,7 +187,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_uLong GetKernPairs( ImplKernPairData** ) const { return 0; }
virtual int GetGlyphKernValue( int, int ) const { return 0; }
virtual const ImplFontCharMap* GetImplFontCharMap() const = 0;
Point TransformPoint( const Point& ) const;
@@ -216,7 +216,7 @@ protected:
void AddRef() const { ++mnRefCount; }
long GetRefCount() const { return mnRefCount; }
long Release() const;
- ULONG GetByteCount() const { return mnBytesUsed; }
+ sal_uLong GetByteCount() const { return mnBytesUsed; }
virtual void InitGlyphData( int nGlyphIndex, GlyphData& ) const = 0;
virtual void GarbageCollect( long );
@@ -236,7 +236,7 @@ private:
// used by GlyphCache for cache LRU algorithm
mutable long mnRefCount;
- mutable ULONG mnBytesUsed;
+ mutable sal_uLong mnBytesUsed;
ServerFont* mpPrevGCFont;
ServerFont* mpNextGCFont;
@@ -254,7 +254,7 @@ private:
// =======================================================================
// a class for cache entries for physical font instances that are based on serverfonts
-class VCL_DLLPUBLIC ImplServerFontEntry : public ImplFontEntry
+class VCL_PLUGIN_PUBLIC ImplServerFontEntry : public ImplFontEntry
{
private:
ServerFont* mpServerFont;
@@ -271,7 +271,7 @@ public:
// =======================================================================
-class VCL_DLLPUBLIC ServerFontLayout : public GenericSalLayout
+class VCL_PLUGIN_PUBLIC ServerFontLayout : public GenericSalLayout
{
private:
ServerFont& mrServerFont;
@@ -316,7 +316,7 @@ protected:
// =======================================================================
-class VCL_DLLPUBLIC RawBitmap
+class VCL_PLUGIN_PUBLIC RawBitmap
{
public:
RawBitmap();
@@ -325,13 +325,13 @@ public:
public:
unsigned char* mpBits;
- ULONG mnAllocated;
+ sal_uLong mnAllocated;
- ULONG mnWidth;
- ULONG mnHeight;
+ sal_uLong mnWidth;
+ sal_uLong mnHeight;
- ULONG mnScanlineSize;
- ULONG mnBitCount;
+ sal_uLong mnScanlineSize;
+ sal_uLong mnBitCount;
int mnXOffset;
int mnYOffset;
@@ -349,7 +349,7 @@ inline void ServerFont::SetExtended( int nInfo, void* pVoid )
// ExtraKernInfo allows an on-demand query of extra kerning info #i29881#
// The kerning values have to be scaled to match the font size before use
-class VCL_DLLPUBLIC ExtraKernInfo
+class VCL_PLUGIN_PUBLIC ExtraKernInfo
{
public:
ExtraKernInfo( sal_IntPtr nFontId );
diff --git a/vcl/inc/vcl/gradient.hxx b/vcl/inc/vcl/gradient.hxx
index 8938627cf684..7e2fe408eadf 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_uLong 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..61ec67ce8a79 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_uLong 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_uLong GetAnimationLoopCount() const;
void ResetAnimationLoopCount();
List* GetAnimationInfoList() const;
- ULONG GetChecksum() const;
+ sal_uLong 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_uLong nFilePos );
const String& GetDocFileName() const;
- ULONG GetDocFilePos() const;
+ sal_uLong 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/graphite_adaptors.hxx b/vcl/inc/vcl/graphite_adaptors.hxx
index ae2ff2962adb..66f264faf9ef 100644
--- a/vcl/inc/vcl/graphite_adaptors.hxx
+++ b/vcl/inc/vcl/graphite_adaptors.hxx
@@ -84,7 +84,7 @@ namespace grutils
// the Graphite engine.
// @author tse
//
-class VCL_DLLPUBLIC GraphiteFontAdaptor : public gr::Font
+class VCL_PLUGIN_PUBLIC GraphiteFontAdaptor : public gr::Font
{
typedef std::map<const gr::gid16, std::pair<gr::Rect, gr::Point> > GlyphMetricMap;
friend class GrFontHasher;
diff --git a/vcl/inc/vcl/graphite_layout.hxx b/vcl/inc/vcl/graphite_layout.hxx
index cd22abdcdb26..ebd323bebf28 100644
--- a/vcl/inc/vcl/graphite_layout.hxx
+++ b/vcl/inc/vcl/graphite_layout.hxx
@@ -85,7 +85,7 @@ namespace grutils { class GrFeatureParser; }
// This class uses the SIL Graphite engine to provide complex text layout services to the VCL
// @author tse
//
-class VCL_DLLPUBLIC GraphiteLayout : public SalLayout
+class VCL_PLUGIN_PUBLIC GraphiteLayout : public SalLayout
{
public:
// Mask to allow Word break status to be stored within mvChar2BaseGlyph
@@ -133,7 +133,7 @@ private:
const grutils::GrFeatureParser * mpFeatures;
public:
- GraphiteLayout(const gr::Font & font, const grutils::GrFeatureParser * features = NULL) throw();
+ explicit GraphiteLayout( const gr::Font& font, const grutils::GrFeatureParser* features = NULL ) throw();
// used by upper layers
virtual bool LayoutText( ImplLayoutArgs& ); // first step of layout
@@ -183,6 +183,4 @@ private:
void expandOrCondense(ImplLayoutArgs &rArgs);
};
-
-
#endif // _SV_GRAPHITELAYOUT_HXX
diff --git a/vcl/inc/vcl/graphite_serverfont.hxx b/vcl/inc/vcl/graphite_serverfont.hxx
index 19eb70b11908..cdaed20476e2 100644
--- a/vcl/inc/vcl/graphite_serverfont.hxx
+++ b/vcl/inc/vcl/graphite_serverfont.hxx
@@ -37,7 +37,7 @@
// Modules
-class VCL_DLLPUBLIC GraphiteLayoutImpl : public GraphiteLayout
+class VCL_PLUGIN_PUBLIC GraphiteLayoutImpl : public GraphiteLayout
{
public:
GraphiteLayoutImpl(const gr::Font & font, const grutils::GrFeatureParser * features, GraphiteFontAdaptor * pFont) throw()
@@ -51,14 +51,14 @@ private:
// This class implments the server font specific parts.
// @author tse
//
-class VCL_DLLPUBLIC GraphiteServerFontLayout : public ServerFontLayout
+class VCL_PLUGIN_PUBLIC GraphiteServerFontLayout : public ServerFontLayout
{
private:
mutable GraphiteFontAdaptor * mpFont;
// mutable so that the DrawOffset/DrawBase can be set
mutable GraphiteLayoutImpl maImpl;
public:
- GraphiteServerFontLayout(GraphiteFontAdaptor * font) throw();
+ explicit GraphiteServerFontLayout( GraphiteFontAdaptor* font ) throw();
virtual bool LayoutText( ImplLayoutArgs& rArgs) { SalLayout::AdjustLayout(rArgs); return maImpl.LayoutText(rArgs); }; // first step of layout
virtual void AdjustLayout( ImplLayoutArgs& rArgs)
@@ -94,7 +94,5 @@ public:
int getMaxCharPos() const { return mnEndCharPos; }
};
-
-
#endif
#endif //_SV_GRAPHITESERVERFONT_HXX
diff --git a/vcl/inc/vcl/group.hxx b/vcl/inc/vcl/group.hxx
index 48461ec18ac0..56aec19f366f 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_uLong 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_uLong 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..78cbfe1153c1 100644
--- a/vcl/inc/vcl/hatch.hxx
+++ b/vcl/inc/vcl/hatch.hxx
@@ -41,11 +41,11 @@ class SvStream;
struct ImplHatch
{
- ULONG mnRefCount;
+ sal_uLong 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 1f4ba36d8f43..b80b9a86627a 100644
--- a/vcl/inc/vcl/help.hxx
+++ b/vcl/inc/vcl/help.hxx
@@ -40,16 +40,22 @@ 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_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_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 ((sal_uInt16)0x0040)
+/// force the existent tip window to be re-positioned, even if the previous incarnation has the same text. Applies to ShowBallon and ShowQuickHelp.
+#define QUICKHELP_FORCE_REPOSITION ((sal_uInt16)0x0080)
+/// no delay when opening the quick help. Applies to ShowBallon and ShowQuickHelp
+#define QUICKHELP_NO_DELAY ((sal_uInt16)0x0100)
+/// force balloon-style in ShowTip
+#define QUICKHELP_TIP_STYLE_BALLOON ((sal_uInt16)0x0200)
+#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 ".help:index"
@@ -71,52 +77,56 @@ public:
void SetHelpFile( const String& rFileName ) { maHelpFile = rFileName; }
const String& GetHelpFile() const { return maHelpFile; }
- virtual BOOL Start( const XubString& rHelpId, const Window* pWindow );
- virtual BOOL SearchKeyword( const XubString& rKeyWord );
+ virtual sal_Bool Start( const XubString& rHelpId, const Window* pWindow );
+ virtual sal_Bool SearchKeyword( const XubString& rKeyWord );
virtual void OpenHelpAgent( const rtl::OString& rHelpId );
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_uLong 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 UpdateTip( sal_uLong nId,
+ Window* pParent,
+ const Rectangle& rScreenRect,
+ const XubString& rText );
+ static void HideTip( sal_uLong nId );
};
#endif // _SV_HELP_HXX
diff --git a/vcl/inc/vcl/helpwin.hxx b/vcl/inc/vcl/helpwin.hxx
index 244ae1b7d846..fc3e2d5ffce8 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,34 @@ 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; }
+ sal_uInt16 GetStyle() const { return mnStyle; }
// 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 6580538f5d10..b509464bae4e 100644
--- a/vcl/inc/vcl/ilstbox.hxx
+++ b/vcl/inc/vcl/ilstbox.hxx
@@ -66,7 +66,7 @@ struct ImplEntryType
XubString maStr;
Image maImage;
void* mpUserData;
- BOOL mbIsSelected;
+ sal_Bool mbIsSelected;
long mnFlags;
long mnHeight;
@@ -76,7 +76,7 @@ struct ImplEntryType
mnFlags( 0 ),
mnHeight( 0 )
{
- mbIsSelected = FALSE;
+ mbIsSelected = sal_False;
mpUserData = NULL;
}
@@ -85,7 +85,7 @@ struct ImplEntryType
mnFlags( 0 ),
mnHeight( 0 )
{
- mbIsSelected = FALSE;
+ mbIsSelected = sal_False;
mpUserData = NULL;
}
@@ -94,7 +94,7 @@ struct ImplEntryType
mnFlags( 0 ),
mnHeight( 0 )
{
- mbIsSelected = FALSE;
+ mbIsSelected = sal_False;
mpUserData = NULL;
}
};
@@ -107,87 +107,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 );
};
// ---------------------
@@ -212,22 +212,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; }
protected:
// ISearchableStringList
@@ -398,7 +398,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.
@@ -430,55 +430,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(); }
@@ -494,15 +494,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
@@ -519,9 +519,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 );
@@ -534,21 +534,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();
};
@@ -561,7 +561,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;
@@ -572,7 +572,7 @@ private:
Link maMBDownHdl;
Link maUserDrawHdl;
- BOOL mbUserDrawEnabled : 1,
+ sal_Bool mbUserDrawEnabled : 1,
mbInUserDraw : 1;
@@ -591,8 +591,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; }
@@ -600,7 +600,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;
@@ -614,10 +614,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 );
};
// -----------
@@ -627,7 +627,7 @@ public:
class ImplBtn : public PushButton
{
private:
- BOOL mbDown;
+ sal_Bool mbDown;
Link maMBDownHdl;
@@ -643,7 +643,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..3b294125226b 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_uLong& 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_uLong 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/imgctrl.hxx b/vcl/inc/vcl/imgctrl.hxx
index fa3b01463f34..456b6b599a1c 100644
--- a/vcl/inc/vcl/imgctrl.hxx
+++ b/vcl/inc/vcl/imgctrl.hxx
@@ -40,28 +40,26 @@
class VCL_DLLPUBLIC ImageControl : public FixedImage
{
private:
- BitmapEx maBmp;
- BitmapEx maBmpHC;
::sal_Int16 mnScaleMode;
public:
ImageControl( Window* pParent, WinBits nStyle = 0 );
+ ImageControl( Window* pParent, const ResId& rResId );
// set/get the scale mode. This is one of the css.awt.ImageScaleMode constants
void SetScaleMode( const ::sal_Int16 _nMode );
::sal_Int16 GetScaleMode() const { return mnScaleMode; }
virtual void Resize();
- virtual void UserDraw( const UserDrawEvent& rUDEvt );
+ virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags );
virtual void Paint( const Rectangle& rRect );
virtual void GetFocus();
virtual void LoseFocus();
- void SetBitmap( const BitmapEx& rBmp );
- using OutputDevice::GetBitmap;
- const BitmapEx& GetBitmap() const { return maBmp; }
- BOOL SetModeBitmap( const BitmapEx& rBitmap, BmpColorMode eMode = BMP_COLOR_NORMAL );
- const BitmapEx& GetModeBitmap( BmpColorMode eMode = BMP_COLOR_NORMAL ) const;
+protected:
+ void ImplDraw( OutputDevice& rDev, sal_uLong nDrawFlags, const Point& rPos, const Size& rSize ) const;
+private:
+ using FixedImage::ImplDraw;
};
#endif // _SV_IMGCTRL_HXX
diff --git a/vcl/inc/vcl/impbmp.hxx b/vcl/inc/vcl/impbmp.hxx
index dc40fdcd3181..778cc0f8f750 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_uLong mnRefCount;
+ sal_uLong 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_uLong 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_uLong nChecksum ) { mnChecksum = nChecksum; }
+ inline sal_uLong ImplGetChecksum() const { return mnChecksum; }
#endif // PRIVATE
};
diff --git a/vcl/inc/vcl/impfont.hxx b/vcl/inc/vcl/impfont.hxx
index e38e1dea78d4..cc4271932b47 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 };
@@ -174,7 +174,7 @@ public:
class CmapResult;
-class VCL_DLLPUBLIC ImplFontCharMap
+class VCL_PLUGIN_PUBLIC ImplFontCharMap
{
public:
explicit ImplFontCharMap( const CmapResult& );
@@ -211,27 +211,23 @@ 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; // covered codepoints
mutable int mnRefCount;
};
// CmapResult is a normalized version of the many CMAP formats
-class
-#ifdef UNX
- VCL_DLLPUBLIC // vcl-plugins need it
-#endif // UNX
-CmapResult
+class VCL_PLUGIN_PUBLIC 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..7164952ea51b 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_uLong mnDocFilePos;
+ mutable sal_uLong mnSizeBytes;
+ sal_uLong 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_uLong 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_uLong 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_uLong nFilePos );
const String& ImplGetDocFileName() const;
- ULONG ImplGetDocFilePos() const;
+ sal_uLong 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_uLong 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..8b0e85021db9 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_uLong nNew;
+ sal_uLong nDelete;
+ sal_uLong nGet;
+ sal_uLong nRelease;
public:
- ImpNodeCache( const ULONG nInitSize );
+ ImpNodeCache( const sal_uLong nInitSize );
~ImpNodeCache();
inline OctreeNode* ImplGetFreeNode();
diff --git a/vcl/inc/vcl/impprn.hxx b/vcl/inc/vcl/impprn.hxx
index 954b2340d0c7..883bd55c66be 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_uLong 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_uLong 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_uLong >& 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..5dc3e31eec74 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_uLong)0x00000001)
+#define INPUTCONTEXT_EXTTEXTINPUT ((sal_uLong)0x00000002)
+#define INPUTCONTEXT_EXTTEXTINPUT_ON ((sal_uLong)0x00000004)
+#define INPUTCONTEXT_EXTTEXTINPUT_OFF ((sal_uLong)0x00000008)
// ----------------
// - InputContext -
@@ -49,26 +49,26 @@ class VCL_DLLPUBLIC InputContext
{
private:
Font maFont;
- ULONG mnOptions;
+ sal_uLong 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_uLong 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_uLong nOptions ) { mnOptions = nOptions; }
+ sal_uLong 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..ca498c157bd7 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_uLong mnRefCount;
LineStyle meStyle;
long mnWidth;
- USHORT mnDashCount;
+ sal_uInt16 mnDashCount;
long mnDashLen;
- USHORT mnDotCount;
+ sal_uInt16 mnDotCount;
long mnDotLen;
long mnDistance;
@@ -56,6 +56,8 @@ struct ImplLineInfo
ImplLineInfo();
ImplLineInfo( const ImplLineInfo& rImplLineInfo );
+ bool operator==( const ImplLineInfo& ) const;
+
friend SvStream& operator>>( SvStream& rIStm, ImplLineInfo& rImplLineInfo );
friend SvStream& operator<<( SvStream& rOStm, const ImplLineInfo& rImplLineInfo );
};
@@ -82,9 +84,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 +94,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 +112,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..80ee97200006 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_uLong 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 260a5f4f86c2..ea7b1bed6409 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_uLong 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 d57fdeb7cfd3..0ccdc912f535 100644
--- a/vcl/inc/vcl/menu.hxx
+++ b/vcl/inc/vcl/menu.hxx
@@ -67,22 +67,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)
@@ -150,18 +150,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_uLong 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...
@@ -175,24 +175,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_uLong 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 )
@@ -205,7 +205,7 @@ public:
SAL_DLLPRIVATE Menu* ImplGetStartedFrom() const;
Menu();
- Menu( BOOL bMenuBar );
+ Menu( sal_Bool bMenuBar );
SAL_DLLPRIVATE Window* ImplGetWindow() const { return pWindow; }
@@ -219,93 +219,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_uLong nValue );
+ sal_uLong 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, const rtl::OString& rHelpId );
- rtl::OString GetHelpId( USHORT nItemId ) const;
+ void SetHelpId( sal_uInt16 nItemId, const rtl::OString& rHelpId );
+ rtl::OString GetHelpId( sal_uInt16 nItemId ) const;
void SetActivateHdl( const Link& rLink ) { aActivateHdl = rLink; }
const Link& GetActivateHdl() const { return aActivateHdl; }
@@ -321,7 +321,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 );
@@ -336,7 +336,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
@@ -345,41 +345,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
@@ -395,10 +395,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;
@@ -408,8 +408,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:
@@ -420,20 +420,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; }
@@ -446,31 +446,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 )
@@ -497,9 +497,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_uLong 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();
@@ -510,15 +510,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..33120b288a98 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_uLong 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_uLong 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 6328890c1749..5381e0f14bde 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..fdf7d5a74cfc 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_uLong 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_uLong nNewDelta ) { mnDelta = nNewDelta; }
+ sal_uLong 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..88de6bcc9e68 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_uLong nCount;
+ sal_uLong nRed;
+ sal_uLong nGreen;
+ sal_uLong nBlue;
OctreeNode* pChild[ 8 ];
OctreeNode* pNext;
OctreeNode* pNextInCache;
- USHORT nPalIndex;
- BOOL bLeaf;
+ sal_uInt16 nPalIndex;
+ sal_Bool bLeaf;
} NODE;
typedef NODE* PNODE;
@@ -65,20 +65,20 @@ typedef PNODE* PPNODE;
class ImpNodeCache;
class BitmapReadAccess;
-class VCL_DLLPUBLIC Octree
+class VCL_PLUGIN_PUBLIC Octree
{
private:
BitmapPalette aPal;
- ULONG nMax;
- ULONG nLeafCount;
- ULONG nLevel;
+ sal_uLong nMax;
+ sal_uLong nLeafCount;
+ sal_uLong 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_uLong nColors );
+ Octree( sal_uLong 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;
@@ -127,35 +127,35 @@ inline USHORT Octree::GetBestPaletteIndex( const BitmapColor& rColor )
// - InverseColorMap -
// -------------------
-class VCL_DLLPUBLIC InverseColorMap
+class VCL_PLUGIN_PUBLIC InverseColorMap
{
private:
- BYTE* pBuffer;
- BYTE* pMap;
- const ULONG nBits;
+ sal_uInt8* pBuffer;
+ sal_uInt8* pMap;
+ const sal_uLong nBits;
//#if 0 // _SOLAR__PRIVATE
- SAL_DLLPRIVATE void ImplCreateBuffers( const ULONG nMax );
+ SAL_DLLPRIVATE void ImplCreateBuffers( const sal_uLong nMax );
//#endif // __PRIVATE
public:
- InverseColorMap( const BitmapPalette& rPal );
+ explicit 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_uLong) rColor.GetRed() >> nBits ) << OCTREE_BITS_1 ) |
+ ( ( (sal_uLong) rColor.GetGreen() >> nBits ) << OCTREE_BITS ) |
+ ( (sal_uLong) 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 12c4202af144..1130db5bd4a2 100644..100755
--- a/vcl/inc/vcl/outdev.hxx
+++ b/vcl/inc/vcl/outdev.hxx
@@ -151,57 +151,57 @@ 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_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)
// in the long run we should make text style flags longer
// but at the moment we can get away with this 2 bit field for ellipsis style
#define TEXT_DRAW_CENTERELLIPSIS (TEXT_DRAW_ENDELLIPSIS | TEXT_DRAW_PATHELLIPSIS)
-#define TEXT_DRAW_WORDBREAK_HYPHENATION (((USHORT)0x8000) | TEXT_DRAW_WORDBREAK)
+#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
@@ -211,63 +211,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_uLong)0x00000001)
+#define GRID_HORZLINES ((sal_uLong)0x00000002)
+#define GRID_VERTLINES ((sal_uLong)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_uLong)0x00000000)
+#define TEXT_LAYOUT_BIDI_LTR ((sal_uLong)0x00000000)
+#define TEXT_LAYOUT_BIDI_RTL ((sal_uLong)0x00000001)
+#define TEXT_LAYOUT_BIDI_STRONG ((sal_uLong)0x00000002)
+#define TEXT_LAYOUT_TEXTORIGIN_LEFT ((sal_uLong)0x00000004)
+#define TEXT_LAYOUT_TEXTORIGIN_RIGHT ((sal_uLong)0x00000008)
+#define TEXT_LAYOUT_COMPLEX_DISABLED ((sal_uLong)0x00000100)
+#define TEXT_LAYOUT_ENABLE_LIGATURES ((sal_uLong)0x00000200)
+#define TEXT_LAYOUT_SUBSTITUTE_DIGITS ((sal_uLong)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_uLong)0x00000000)
+#define DRAWMODE_BLACKLINE ((sal_uLong)0x00000001)
+#define DRAWMODE_BLACKFILL ((sal_uLong)0x00000002)
+#define DRAWMODE_BLACKTEXT ((sal_uLong)0x00000004)
+#define DRAWMODE_BLACKBITMAP ((sal_uLong)0x00000008)
+#define DRAWMODE_BLACKGRADIENT ((sal_uLong)0x00000010)
+#define DRAWMODE_GRAYLINE ((sal_uLong)0x00000020)
+#define DRAWMODE_GRAYFILL ((sal_uLong)0x00000040)
+#define DRAWMODE_GRAYTEXT ((sal_uLong)0x00000080)
+#define DRAWMODE_GRAYBITMAP ((sal_uLong)0x00000100)
+#define DRAWMODE_GRAYGRADIENT ((sal_uLong)0x00000200)
+#define DRAWMODE_NOFILL ((sal_uLong)0x00000400)
+#define DRAWMODE_NOBITMAP ((sal_uLong)0x00000800)
+#define DRAWMODE_NOGRADIENT ((sal_uLong)0x00001000)
+#define DRAWMODE_GHOSTEDLINE ((sal_uLong)0x00002000)
+#define DRAWMODE_GHOSTEDFILL ((sal_uLong)0x00004000)
+#define DRAWMODE_GHOSTEDTEXT ((sal_uLong)0x00008000)
+#define DRAWMODE_GHOSTEDBITMAP ((sal_uLong)0x00010000)
+#define DRAWMODE_GHOSTEDGRADIENT ((sal_uLong)0x00020000)
+#define DRAWMODE_WHITELINE ((sal_uLong)0x00100000)
+#define DRAWMODE_WHITEFILL ((sal_uLong)0x00200000)
+#define DRAWMODE_WHITETEXT ((sal_uLong)0x00400000)
+#define DRAWMODE_WHITEBITMAP ((sal_uLong)0x00800000)
+#define DRAWMODE_WHITEGRADIENT ((sal_uLong)0x01000000)
+#define DRAWMODE_SETTINGSLINE ((sal_uLong)0x02000000)
+#define DRAWMODE_SETTINGSFILL ((sal_uLong)0x04000000)
+#define DRAWMODE_SETTINGSTEXT ((sal_uLong)0x08000000)
+#define DRAWMODE_SETTINGSGRADIENT ((sal_uLong)0x10000000)
+#define DRAWMODE_NOTRANSPARENCY ((sal_uLong)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_uLong)0x00000001)
enum OutDevType { OUTDEV_DONTKNOW, OUTDEV_WINDOW, OUTDEV_PRINTER, OUTDEV_VIRDEV };
@@ -338,8 +338,8 @@ private:
mutable long mnTextOffY;
mutable long mnEmphasisAscent;
mutable long mnEmphasisDescent;
- ULONG mnDrawMode;
- ULONG mnTextLayoutMode;
+ sal_uLong mnDrawMode;
+ sal_uLong mnTextLayoutMode;
ImplMapRes maMapRes;
ImplThresholdRes maThresRes;
OutDevType meOutDevType;
@@ -357,9 +357,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,
@@ -385,8 +385,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;
@@ -400,7 +400,6 @@ public:
SAL_DLLPRIVATE void ImplInitClipRegion();
SAL_DLLPRIVATE bool ImplSelectClipRegion( const Region&, SalGraphics* pGraphics = NULL );
SAL_DLLPRIVATE void ImplSetClipRegion( const Region* pRegion );
- SAL_DLLPRIVATE void ImplSetTriangleClipRegion( const PolyPolygon &rPolyPolygon );
SAL_DLLPRIVATE SalLayout* ImplLayout( const String&, xub_StrLen nIndex,
xub_StrLen nLen, const Point& rLogicPos = Point(0,0),
@@ -415,15 +414,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& );
@@ -434,16 +433,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 );
@@ -473,13 +472,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 );
@@ -490,14 +489,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_uLong 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_uLong 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_uLong nAction );
SAL_DLLPRIVATE void ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha,
const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel );
@@ -537,14 +536,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 ;
@@ -594,8 +593,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,
@@ -613,15 +612,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_uLong 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
@@ -634,47 +633,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_uLong GetKerningPairCount() const;
+ void GetKerningPairs( sal_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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 );
@@ -738,7 +737,7 @@ public:
void DrawRect( const Rectangle& rRect );
void DrawRect( const Rectangle& rRect,
- ULONG nHorzRount, ULONG nVertRound );
+ sal_uLong nHorzRount, sal_uLong nVertRound );
void DrawEllipse( const Rectangle& rRect );
void DrawArc( const Rectangle& rRect,
const Point& rStartPt, const Point& rEndPt );
@@ -754,7 +753,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 );
@@ -781,9 +780,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 );
@@ -804,10 +803,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_uLong 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 );
@@ -820,41 +819,40 @@ 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_uLong nDrawMode );
+ sal_uLong GetDrawMode() const { return mnDrawMode; }
- void SetLayoutMode( ULONG nTextLayoutMode );
- ULONG GetLayoutMode() const { return mnTextLayoutMode; }
+ void SetLayoutMode( sal_uLong nTextLayoutMode );
+ sal_uLong GetLayoutMode() const { return mnTextLayoutMode; }
void SetDigitLanguage( LanguageType );
LanguageType GetDigitLanguage() const { return meTextLanguage; }
@@ -875,18 +873,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; }
@@ -902,15 +900,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(); }
@@ -924,12 +922,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;
@@ -1030,7 +1028,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,
@@ -1066,16 +1064,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;
@@ -1093,9 +1091,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
@@ -1103,17 +1101,21 @@ 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_uLong GetColorCount() const;
- void Push( USHORT nFlags = PUSH_ALL );
+ void Push( sal_uInt16 nFlags = PUSH_ALL );
void Pop();
+ // returns the curren stack depth; that is the number of Push() calls minus the number of Pop() calls
+ // this should not normally be used since Push and Pop must always be used symmetrically
+ // however this may be e.g. a help when debugging code in which this somehow is not the case
+ sal_uInt32 GetGCStackDepth() const;
/** 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
@@ -1135,17 +1137,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_uLong nFlags,
const OutputDevice* pOutDev = NULL );
/** helper method removing transparencies from a metafile (e.g. for printing)
@@ -1189,17 +1191,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 Rectangle& 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 Rectangle& rControlRegion,
ControlState nState,
@@ -1207,7 +1209,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 Rectangle& rControlRegion,
ControlState nState,
@@ -1215,7 +1217,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 Rectangle& rControlRegion,
ControlState nState,
diff --git a/vcl/inc/vcl/outfont.hxx b/vcl/inc/vcl/outfont.hxx
index 7ad233449d93..aabc6bd2797f 100644
--- a/vcl/inc/vcl/outfont.hxx
+++ b/vcl/inc/vcl/outfont.hxx
@@ -116,7 +116,7 @@ public: // TODO: hide members behind accessor methods
// TODO: make cloning cheaper
// abstract base class for physical font faces
-class VCL_DLLPUBLIC ImplFontData : public ImplDevFontAttributes
+class VCL_PLUGIN_PUBLIC ImplFontData : public ImplDevFontAttributes
{
public:
// by using an ImplFontData object as a factory for its corresponding
@@ -185,7 +185,7 @@ public: // TODO: change to private
// TODO: merge with ImplFontCache
// TODO: rename to LogicalFontManager
-class VCL_DLLPUBLIC ImplDevFontList
+class VCL_PLUGIN_PUBLIC ImplDevFontList
{
private:
friend class WinGlyphFallbackSubstititution;
@@ -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_uLong 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;
};
@@ -324,7 +324,7 @@ public: // TODO: hide members behind accessor methods
// TODO: rename ImplFontEntry to LogicalFontInstance
// TODO: allow sharing of metrics for related fonts
-class VCL_DLLPUBLIC ImplFontEntry
+class VCL_PLUGIN_PUBLIC ImplFontEntry
{
public:
explicit ImplFontEntry( const ImplFontSelectData& );
@@ -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_uLong 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..f1e203a84431 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
diff --git a/vcl/inc/vcl/pdfwriter.hxx b/vcl/inc/vcl/pdfwriter.hxx
index 52e4b5014120..4e792ef40f57 100644
--- a/vcl/inc/vcl/pdfwriter.hxx
+++ b/vcl/inc/vcl/pdfwriter.hxx
@@ -229,7 +229,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
@@ -537,6 +537,11 @@ The following structure describes the permissions used in PDF security
String Producer; // OpenOffice
};
+ enum ColorMode
+ {
+ DrawColor, DrawGreyscale
+ };
+
struct PDFWriterContext
{
/* must be a valid file: URL usable by osl */
@@ -599,6 +604,7 @@ The following structure describes the permissions used in PDF security
com::sun::star::lang::Locale DocumentLocale; // defines the document default language
sal_uInt32 DPIx, DPIy; // how to handle MapMode( MAP_PIXEL )
// 0 here specifies a default handling
+ PDFWriter::ColorMode ColorMode;
PDFWriterContext() :
RelFsys( false ), //i56629, i49415?, i64585?
@@ -627,7 +633,8 @@ The following structure describes the permissions used in PDF security
OpenBookmarkLevels( -1 ),
Encryption(),
DPIx( 0 ),
- DPIy( 0 )
+ DPIy( 0 ),
+ ColorMode( PDFWriter::DrawColor )
{}
};
@@ -700,7 +707,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();
@@ -709,9 +716,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_uLong nMode );
void SetDigitLanguage( LanguageType eLang );
void SetLineColor( const Color& rColor );
@@ -742,16 +749,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_uLong 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 )
@@ -771,7 +778,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_uLong nHorzRount, sal_uLong nVertRound );
void DrawEllipse( const Rectangle& rRect );
void DrawArc( const Rectangle& rRect,
const Point& rStartPt, const Point& rEndPt );
@@ -811,7 +818,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
@@ -844,7 +851,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
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..de9f62184483 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_uLong Count() const { return Height(); }
+ PolyScanline* operator[]( sal_uLong nPos ) const;
};
#endif // _SV_POLYSCAN_HXX
diff --git a/vcl/inc/vcl/ppdparser.hxx b/vcl/inc/vcl/ppdparser.hxx
index c7a1e09b81e4..01cbcbb5fc81 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_uLong 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_uLong 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_uLong& rBytes ) const;
+ void rebuildFromStreamBuffer( void* pBuffer, sal_uLong nBytes );
// convenience
int getRenderResolution() const;
diff --git a/vcl/inc/vcl/print.h b/vcl/inc/vcl/print.h
index 78c1bb647575..7ac0d04d6dac 100644
--- a/vcl/inc/vcl/print.h
+++ b/vcl/inc/vcl/print.h
@@ -55,7 +55,7 @@ struct ImplPrnQueueData
// - ImplPrnQueueList -
// --------------------
-class VCL_DLLPUBLIC ImplPrnQueueList
+class VCL_PLUGIN_PUBLIC ImplPrnQueueList
{
public:
std::hash_map< rtl::OUString, sal_Int32, rtl::OUStringHash >
diff --git a/vcl/inc/vcl/print.hxx b/vcl/inc/vcl/print.hxx
index 40d88ca373db..2ce69ab0b660 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; }
// read printer options from configuration, parameter decides whether the set for
// print "to printer" or "to file" should be read.
@@ -239,21 +239,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_uLong 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();
@@ -268,11 +268,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_uLong ImplSalPrinterErrorCodeToVCL( sal_uLong 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:
@@ -284,8 +284,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();
@@ -303,20 +303,20 @@ 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_uLong 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 );
// SetPrinterOptions is used internally only now
// in earlier times it was used only to set the options loaded directly from the configuration
@@ -326,46 +326,49 @@ public:
SAL_DLLPRIVATE void SetPrinterOptions( const PrinterOptions& 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;
+ static rtl::OUString GetPaperName( Paper ePaper );
+ // return a UI string for the current paper; i_bPaperUser == false means an empty string for PAPER_USER
+ rtl::OUString GetPaperName( bool i_bPaperUser = true ) 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; }
- BOOL AbortJob();
+ 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_uLong GetError() const { return ERRCODE_TOERROR(mnError); }
+ sal_uLong GetErrorCode() const { return mnError; }
void SetErrorHdl( const Link& rLink ) { maErrorHdl = rLink; }
const Link& GetErrorHdl() const { return maErrorHdl; }
@@ -520,30 +523,30 @@ public:
bool isDirectPrint() const;
// implementation details, not usable outside vcl
- // don't use outside vcl. Some of these ar exported for
+ // don't use outside vcl. Some of these are exported for
// the benefit of vcl's plugins.
// Still: DO NOT USE OUTSIDE VCL
- int getFilteredPageCount();
+ VCL_PLUGIN_PUBLIC int getFilteredPageCount();
SAL_DLLPRIVATE PageSize getPageFile( int i_inUnfilteredPage, GDIMetaFile& rMtf, bool i_bMayUseCache = false );
- PageSize getFilteredPageFile( int i_nFilteredPage, GDIMetaFile& o_rMtf, bool i_bMayUseCache = false );
+ VCL_PLUGIN_PUBLIC PageSize getFilteredPageFile( int i_nFilteredPage, GDIMetaFile& o_rMtf, bool i_bMayUseCache = false );
SAL_DLLPRIVATE void printFilteredPage( int i_nPage );
SAL_DLLPRIVATE void setPrinter( const boost::shared_ptr<Printer>& );
SAL_DLLPRIVATE void setOptionChangeHdl( const Link& );
- void createProgressDialog();
- bool isProgressCanceled() const;
+ VCL_PLUGIN_PUBLIC void createProgressDialog();
+ VCL_PLUGIN_PUBLIC bool isProgressCanceled() const;
SAL_DLLPRIVATE void setMultipage( const MultiPageSetup& );
SAL_DLLPRIVATE const MultiPageSetup& getMultipage() const;
- void setLastPage( sal_Bool i_bLastPage );
+ VCL_PLUGIN_PUBLIC void setLastPage( sal_Bool i_bLastPage );
SAL_DLLPRIVATE void setReversePrint( sal_Bool i_bReverse );
SAL_DLLPRIVATE bool getReversePrint() const;
SAL_DLLPRIVATE void pushPropertiesToPrinter();
- void setJobState( com::sun::star::view::PrintableState );
+ VCL_PLUGIN_PUBLIC void setJobState( com::sun::star::view::PrintableState );
SAL_DLLPRIVATE bool setupPrinter( Window* i_pDlgParent );
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_uLong removeTransparencies( GDIMetaFile& i_rIn, GDIMetaFile& o_rOut );
SAL_DLLPRIVATE void resetPrinterOptions( bool i_bFileOutput );
};
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/prndlg.hxx b/vcl/inc/vcl/prndlg.hxx
index d21e517d12f7..39f326d6d089 100644
--- a/vcl/inc/vcl/prndlg.hxx
+++ b/vcl/inc/vcl/prndlg.hxx
@@ -73,7 +73,9 @@ namespace vcl
virtual void Resize();
virtual void DataChanged( const DataChangedEvent& );
- void setPreview( const GDIMetaFile&, const Size&, const rtl::OUString&,
+ void setPreview( const GDIMetaFile&, const Size& i_rPaperSize,
+ const rtl::OUString& i_rPaperName,
+ const rtl::OUString& i_rNoPageString,
sal_Int32 i_nDPIX, sal_Int32 i_nDPIY,
bool i_bGreyscale
);
@@ -169,6 +171,7 @@ namespace vcl
NumericField maCopyCountField;
CheckBox maCollateBox;
FixedImage maCollateImage;
+ CheckBox maReverseOrderBox;
Image maCollateImg;
Image maCollateHCImg;
@@ -197,7 +200,6 @@ namespace vcl
FixedLine maOptionsLine;
CheckBox maToFileBox;
CheckBox maCollateSingleJobsBox;
- CheckBox maReverseOrderBox;
boost::shared_ptr<vcl::RowOrColumn> mxOptGroup;
diff --git a/vcl/inc/vcl/prntypes.hxx b/vcl/inc/vcl/prntypes.hxx
index 244154360f3b..bb1911f0e5a2 100644
--- a/vcl/inc/vcl/prntypes.hxx
+++ b/vcl/inc/vcl/prntypes.hxx
@@ -48,49 +48,49 @@ 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_uLong)0x00000001)
+#define QUEUE_STATUS_PAUSED ((sal_uLong)0x00000002)
+#define QUEUE_STATUS_PENDING_DELETION ((sal_uLong)0x00000004)
+#define QUEUE_STATUS_BUSY ((sal_uLong)0x00000008)
+#define QUEUE_STATUS_INITIALIZING ((sal_uLong)0x00000010)
+#define QUEUE_STATUS_WAITING ((sal_uLong)0x00000020)
+#define QUEUE_STATUS_WARMING_UP ((sal_uLong)0x00000040)
+#define QUEUE_STATUS_PROCESSING ((sal_uLong)0x00000080)
+#define QUEUE_STATUS_PRINTING ((sal_uLong)0x00000100)
+#define QUEUE_STATUS_OFFLINE ((sal_uLong)0x00000200)
+#define QUEUE_STATUS_ERROR ((sal_uLong)0x00000400)
+#define QUEUE_STATUS_SERVER_UNKNOWN ((sal_uLong)0x00000800)
+#define QUEUE_STATUS_PAPER_JAM ((sal_uLong)0x00001000)
+#define QUEUE_STATUS_PAPER_OUT ((sal_uLong)0x00002000)
+#define QUEUE_STATUS_MANUAL_FEED ((sal_uLong)0x00004000)
+#define QUEUE_STATUS_PAPER_PROBLEM ((sal_uLong)0x00008000)
+#define QUEUE_STATUS_IO_ACTIVE ((sal_uLong)0x00010000)
+#define QUEUE_STATUS_OUTPUT_BIN_FULL ((sal_uLong)0x00020000)
+#define QUEUE_STATUS_TONER_LOW ((sal_uLong)0x00040000)
+#define QUEUE_STATUS_NO_TONER ((sal_uLong)0x00080000)
+#define QUEUE_STATUS_PAGE_PUNT ((sal_uLong)0x00100000)
+#define QUEUE_STATUS_USER_INTERVENTION ((sal_uLong)0x00200000)
+#define QUEUE_STATUS_OUT_OF_MEMORY ((sal_uLong)0x00400000)
+#define QUEUE_STATUS_DOOR_OPEN ((sal_uLong)0x00800000)
+#define QUEUE_STATUS_POWER_SAVE ((sal_uLong)0x01000000)
-#define QUEUE_JOBS_DONTKNOW ((ULONG)0xFFFFFFFF)
+#define QUEUE_JOBS_DONTKNOW ((sal_uLong)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_USEPULLMODEL ((USHORT)12)
+#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)
+#define PRINTER_CAPABILITIES_USEPULLMODEL ((sal_uInt16)12)
#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..e56bd7d3c564 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 );
@@ -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..fce105bfa8f8 100644..100755
--- a/vcl/inc/vcl/region.hxx
+++ b/vcl/inc/vcl/region.hxx
@@ -69,14 +69,19 @@ 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,
- long& nX, long& nY, long& nWidth, long& nHeight ) const;
- SAL_DLLPRIVATE 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( );
+ SAL_DLLPRIVATE void ImplIntersectWithPolyPolygon( const Region& );
+ SAL_DLLPRIVATE void ImplExcludePolyPolygon( const Region& );
+ SAL_DLLPRIVATE void ImplUnionPolyPolygon( const Region& );
+ SAL_DLLPRIVATE void ImplXOrPolyPolygon( const Region& );
+public: // public within vcl
+ VCL_PLUGIN_PUBLIC bool ImplGetFirstRect( ImplRegionInfo& rImplRegionInfo,
+ long& nX, long& nY, long& nWidth, long& nHeight ) const;
+ VCL_PLUGIN_PUBLIC bool ImplGetNextRect( ImplRegionInfo& rImplRegionInfo,
+ long& nX, long& nY, long& nWidth, long& nHeight ) const;
#ifdef DBG_UTIL
friend const char* ImplDbgTestRegion( const void* pObj );
#endif
@@ -93,48 +98,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_uLong 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..b19c2ac33aeb 100644
--- a/vcl/inc/vcl/salbmp.hxx
+++ b/vcl/inc/vcl/salbmp.hxx
@@ -38,23 +38,23 @@ class SalGraphics;
class BitmapPalette;
struct BitmapSystemData;
-class VCL_DLLPUBLIC SalBitmap
+class VCL_PLUGIN_PUBLIC SalBitmap
{
public:
SalBitmap() {}
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..be8faccdc771 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_uLong _def_cR = (sal_uInt8) ( d_RS < 0L ? ( (d_nVal) & d_RM ) << -d_RS : ( (d_nVal) & d_RM ) >> d_RS ); \
+sal_uLong _def_cG = (sal_uInt8) ( d_GS < 0L ? ( (d_nVal) & d_GM ) << -d_GS : ( (d_nVal) & d_GM ) >> d_GS ); \
+sal_uLong _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_uLong 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_uLong mnRMask;
+ sal_uLong mnGMask;
+ sal_uLong mnBMask;
long mnRShift;
long mnGShift;
long mnBShift;
- ULONG mnROrShift;
- ULONG mnGOrShift;
- ULONG mnBOrShift;
- ULONG mnROr;
- ULONG mnGOr;
- ULONG mnBOr;
+ sal_uLong mnROrShift;
+ sal_uLong mnGOrShift;
+ sal_uLong mnBOrShift;
+ sal_uLong mnROr;
+ sal_uLong mnGOr;
+ sal_uLong mnBOr;
- SAL_DLLPRIVATE inline long ImplCalcMaskShift( ULONG nMask, ULONG& rOr, ULONG& rOrShift ) const;
+ SAL_DLLPRIVATE inline long ImplCalcMaskShift( sal_uLong nMask, sal_uLong& rOr, sal_uLong& rOrShift ) const;
public:
- inline ColorMask( ULONG nRedMask = 0UL, ULONG nGreenMask = 0UL, ULONG nBlueMask = 0UL );
+ inline ColorMask( sal_uLong nRedMask = 0UL, sal_uLong nGreenMask = 0UL, sal_uLong nBlueMask = 0UL );
inline ~ColorMask() {}
- inline ULONG GetRedMask() const;
- inline ULONG GetGreenMask() const;
- inline ULONG GetBlueMask() const;
+ inline sal_uLong GetRedMask() const;
+ inline sal_uLong GetGreenMask() const;
+ inline sal_uLong 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_uLong 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_uLong 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_uLong 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_uLong) ( 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_uLong 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_uLong 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_uLong 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_uLong nNewSize = nCount * sizeof( BitmapColor );
+ const sal_uLong 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_uLong nRedMask, sal_uLong nGreenMask, sal_uLong 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_uLong nMask, sal_uLong& rOr, sal_uLong& rOrShift ) const
{
long nShift;
long nRet;
- ULONG nLen = 0UL;
+ sal_uLong 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_uLong) 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_uLong) 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_uLong ColorMask::GetRedMask() const
{
return mnRMask;
}
// ------------------------------------------------------------------
-inline ULONG ColorMask::GetGreenMask() const
+inline sal_uLong ColorMask::GetGreenMask() const
{
return mnGMask;
}
// ------------------------------------------------------------------
-inline ULONG ColorMask::GetBlueMask() const
+inline sal_uLong 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 0cb037ad40e1..aa7741c69034 100644
--- a/vcl/inc/vcl/salctype.hxx
+++ b/vcl/inc/vcl/salctype.hxx
@@ -65,9 +65,9 @@ public:
Graphic maGraphic;
SvStream& mrStm;
- ULONG mnFormat;
+ sal_uLong mnFormat;
- ConvertData( const Graphic& rGraphic, SvStream& rStm, ULONG nFormat ) :
+ ConvertData( const Graphic& rGraphic, SvStream& rStm, sal_uLong nFormat ) :
maGraphic( rGraphic ), mrStm( rStm ), mnFormat( nFormat ) {}
~ConvertData() {}
};
@@ -76,9 +76,9 @@ public:
// - Callback -
// ------------
-typedef ULONG (*SALGRFCVTPROC)( void* pInst,
- ULONG nInFormat, void* pInBuffer, ULONG nInBufSize,
- ULONG nOutFormat, void** ppOutBuffer );
+typedef sal_uLong (*SALGRFCVTPROC)( void* pInst,
+ sal_uLong nInFormat, void* pInBuffer, sal_uLong nInBufSize,
+ sal_uLong nOutFormat, void** ppOutBuffer );
// -------------------
// - BitmapConverter -
diff --git a/vcl/inc/vcl/saldatabasic.hxx b/vcl/inc/vcl/saldatabasic.hxx
index a40cd045611c..d3c1a7254513 100644
--- a/vcl/inc/vcl/saldatabasic.hxx
+++ b/vcl/inc/vcl/saldatabasic.hxx
@@ -37,7 +37,7 @@ namespace psp
class PrinterInfoManager;
}
-class VCL_DLLPUBLIC SalData
+class VCL_PLUGIN_PUBLIC SalData
{
public:
SalInstance* m_pInstance; // pointer to instance
diff --git a/vcl/inc/vcl/salframe.hxx b/vcl/inc/vcl/salframe.hxx
index d82a2099f315..672f290b9d45 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_uLong)0x00000001)
+#define SAL_FRAME_STYLE_MOVEABLE ((sal_uLong)0x00000002)
+#define SAL_FRAME_STYLE_SIZEABLE ((sal_uLong)0x00000004)
+#define SAL_FRAME_STYLE_CLOSEABLE ((sal_uLong)0x00000008)
// no shadow effect on WindowsXP
-#define SAL_FRAME_STYLE_NOSHADOW ((ULONG)0x00000010)
+#define SAL_FRAME_STYLE_NOSHADOW ((sal_uLong)0x00000010)
// indicate tooltip windows, so they can always be topmost
-#define SAL_FRAME_STYLE_TOOLTIP ((ULONG)0x00000020)
+#define SAL_FRAME_STYLE_TOOLTIP ((sal_uLong)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_uLong)0x00000040)
// dialogs
-#define SAL_FRAME_STYLE_DIALOG ((ULONG)0x00000080)
+#define SAL_FRAME_STYLE_DIALOG ((sal_uLong)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_uLong)0x00800000)
// plugged system child window
-#define SAL_FRAME_STYLE_PLUG ((ULONG)0x10000000)
+#define SAL_FRAME_STYLE_PLUG ((sal_uLong)0x10000000)
// system child window inside another SalFrame
-#define SAL_FRAME_STYLE_SYSTEMCHILD ((ULONG)0x08000000)
+#define SAL_FRAME_STYLE_SYSTEMCHILD ((sal_uLong)0x08000000)
// floating window
-#define SAL_FRAME_STYLE_FLOAT ((ULONG)0x20000000)
+#define SAL_FRAME_STYLE_FLOAT ((sal_uLong)0x20000000)
// floating window that needs to be focusable
-#define SAL_FRAME_STYLE_FLOAT_FOCUSABLE ((ULONG)0x04000000)
+#define SAL_FRAME_STYLE_FLOAT_FOCUSABLE ((sal_uLong)0x04000000)
// toolwindows should be painted with a smaller decoration
-#define SAL_FRAME_STYLE_TOOLWINDOW ((ULONG)0x40000000)
+#define SAL_FRAME_STYLE_TOOLWINDOW ((sal_uLong)0x40000000)
// the window containing the intro bitmap, aka splashscreen
-#define SAL_FRAME_STYLE_INTRO ((ULONG)0x80000000)
+#define SAL_FRAME_STYLE_INTRO ((sal_uLong)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_uLong)0x00000008)
+#define SAL_FRAME_STYLE_MAXABLE ((sal_uLong)0x00000010)
+#define SAL_FRAME_STYLE_BORDER ((sal_uLong)0x00000040)
+#define SAL_FRAME_STYLE_DOC ((sal_uLong)0x00004000)
+#define SAL_FRAME_STYLE_DIALOG ((sal_uLong)0x00008000)
+#define SAL_FRAME_STYLE_TOOL ((sal_uLong)0x00010000)
+#define SAL_FRAME_STYLE_FULLSIZE ((sal_uLong)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
@@ -143,7 +143,7 @@ using namespace rtl;
struct SystemParentData;
-class VCL_DLLPUBLIC SalFrame : public vcl::DeletionNotifier
+class VCL_PLUGIN_PUBLIC SalFrame : public vcl::DeletionNotifier
{
// the VCL window corresponding to this frame
Window* m_pWindow;
@@ -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_uLong 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_uLong 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
@@ -281,7 +281,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 b4769c045708..1a9b9ccaea59 100644..100755
--- a/vcl/inc/vcl/salgdi.hxx
+++ b/vcl/inc/vcl/salgdi.hxx
@@ -65,13 +65,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 -
@@ -96,7 +96,7 @@ typedef std::vector< sal_Int32 > Int32Vector;
// note: all positions are in pixel and relative to
// the top/left-position of the virtual output area
-class VCL_DLLPUBLIC SalGraphics
+class VCL_PLUGIN_PUBLIC SalGraphics
{
int m_nLayout; // 0: mirroring off, 1: mirror x-axis
@@ -113,25 +113,24 @@ public:
virtual ~SalGraphics();
protected:
- virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight ) = 0;
- virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& ) = 0;
+ virtual bool setClipRegion( const Region& ) = 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_uLong nPoints, const SalPoint* pPtAry ) = 0;
+ virtual void drawPolygon( sal_uLong 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&, double fTransparency, 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_uLong nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ) = 0;
+ virtual sal_Bool drawPolygonBezier( sal_uLong 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
@@ -152,20 +151,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_uLong 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_uLong nSize ) = 0;
// native widget rendering methods that require mirroring
- virtual BOOL hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
- const Point& aPos, BOOL& rIsInside );
- virtual BOOL drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
+ virtual sal_Bool hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
+ const Point& aPos, sal_Bool& rIsInside );
+ virtual sal_Bool drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
const rtl::OUString& aCaption );
- virtual BOOL drawNativeControlText( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
+ virtual sal_Bool drawNativeControlText( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
const rtl::OUString& aCaption );
- virtual BOOL getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState,
+ virtual sal_Bool getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState,
const ImplControlValue& aValue, const rtl::OUString& aCaption,
Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion );
@@ -198,17 +197,12 @@ 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;
// set the clip region to empty
virtual void ResetClipRegion() = 0;
- // begin setting the clip region, add rectangles to the
- // region with the UnionClipRegion call
- virtual void BeginSetClipRegion( ULONG nCount ) = 0;
- // all rectangles were added and the clip region should be set now
- virtual void EndSetClipRegion() = 0;
// set the line color to transparent (= don't draw lines)
virtual void SetLineColor() = 0;
@@ -228,7 +222,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
@@ -236,7 +230,7 @@ public:
// get kernign pairs of the current font
// return only PairCount if (pKernPairs == NULL)
- virtual ULONG GetKernPairs( ULONG nMaxPairCount, ImplKernPairData* ) = 0;
+ virtual sal_uLong GetKernPairs( sal_uLong nMaxPairCount, ImplKernPairData* ) = 0;
// get the repertoire of the current font
virtual const ImplFontCharMap* GetImplFontCharMap() const = 0;
// graphics must fill supplied font list
@@ -247,7 +241,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
@@ -257,7 +251,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,
@@ -301,8 +295,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;
@@ -347,7 +341,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;
@@ -355,36 +349,35 @@ public:
basegfx::B2DPolygon mirror( const basegfx::B2DPolygon& i_rPoly, const OutputDevice *pOutDev, bool bBack = false ) const;
basegfx::B2DPolyPolygon mirror( const basegfx::B2DPolyPolygon& i_rPoly, const OutputDevice *pOutDev, bool bBack = false ) const;
- // non virtual methods; these do eventual coordinate mirroring and
+ // non virtual methods; these do possible 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* );
+ bool SetClipRegion( const Region&, const OutputDevice *pOutDev );
// 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_uLong nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev );
+ void DrawPolygon( sal_uLong 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&, double fTransparency, const basegfx::B2DVector& rLineWidths, basegfx::B2DLineJoin, const OutputDevice* );
- sal_Bool DrawPolyLineBezier( ULONG nPoints,
+ sal_Bool DrawPolyLineBezier( sal_uLong nPoints,
const SalPoint* pPtAry,
- const BYTE* pFlgAry,
+ const sal_uInt8* pFlgAry,
const OutputDevice *pOutDev );
- sal_Bool DrawPolygonBezier( ULONG nPoints,
+ sal_Bool DrawPolygonBezier( sal_uLong 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
@@ -394,7 +387,7 @@ public:
long nSrcY,
long nSrcWidth,
long nSrcHeight,
- USHORT nFlags,
+ sal_uInt16 nFlags,
const OutputDevice *pOutDev );
// CopyBits and DrawBitmap --> RasterOp and ClipRegion
@@ -425,27 +418,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_uLong 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_uLong 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 Rectangle& 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 Rectangle& rControlRegion,
ControlState nState,
@@ -454,7 +447,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 Rectangle& rControlRegion,
ControlState nState,
@@ -463,7 +456,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 Rectangle& rControlRegion,
ControlState nState,
@@ -476,7 +469,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/salimestatus.hxx b/vcl/inc/vcl/salimestatus.hxx
index 779a75c9afaa..20184a059d9a 100644
--- a/vcl/inc/vcl/salimestatus.hxx
+++ b/vcl/inc/vcl/salimestatus.hxx
@@ -30,7 +30,7 @@
#include <vcl/dllapi.h>
-class VCL_DLLPUBLIC SalI18NImeStatus
+class VCL_PLUGIN_PUBLIC SalI18NImeStatus
{
public:
SalI18NImeStatus() {}
diff --git a/vcl/inc/vcl/salinst.hxx b/vcl/inc/vcl/salinst.hxx
index 71b820803473..51f1f5b3b4e0 100644
--- a/vcl/inc/vcl/salinst.hxx
+++ b/vcl/inc/vcl/salinst.hxx
@@ -31,10 +31,12 @@
#include "com/sun/star/uno/Reference.hxx"
#include "vcl/sv.h"
+#include "vcl/displayconnectiondispatch.hxx"
#include "vcl/dllapi.h"
#include "tools/string.hxx"
+#include "rtl/ref.hxx"
#include "rtl/string.hxx"
#include <list>
@@ -68,33 +70,23 @@ namespace vos { class IMutex; }
// - SalInstance -
// ---------------
-class VCL_DLLPUBLIC SalInstance
+class VCL_PLUGIN_PUBLIC SalInstance
{
-public:
- typedef bool(*Callback)(void*,void*,int);
private:
- void* m_pEventInst;
- void* m_pErrorInst;
- Callback m_pEventCallback;
- Callback m_pErrorCallback;
+ rtl::Reference< vcl::DisplayConnectionDispatch > m_pEventInst;
public:
- SalInstance() :
- m_pEventInst( NULL ),
- m_pErrorInst( NULL ),
- m_pEventCallback( NULL ),
- m_pErrorCallback( NULL )
- {}
+ SalInstance() {}
virtual ~SalInstance();
// 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_uLong nStyle ) = 0;
+ virtual SalFrame* CreateFrame( SalFrame* pParent, sal_uLong 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
@@ -103,7 +95,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
@@ -132,8 +124,8 @@ public:
// YieldMutex
virtual vos::IMutex* GetYieldMutex() = 0;
- virtual ULONG ReleaseYieldMutex() = 0;
- virtual void AcquireYieldMutex( ULONG nCount ) = 0;
+ virtual sal_uLong ReleaseYieldMutex() = 0;
+ virtual void AcquireYieldMutex( sal_uLong nCount ) = 0;
// return true, if yield mutex is owned by this thread, else false
virtual bool CheckYieldMutex() = 0;
@@ -141,10 +133,10 @@ public:
// 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, Menu* pMenu );
+ virtual SalMenu* CreateMenu( sal_Bool bMenuBar, Menu* pMenu );
virtual void DestroyMenu( SalMenu* pMenu);
virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData );
virtual void DestroyMenuItem( SalMenuItem* pItem );
@@ -154,22 +146,12 @@ public:
// methods for XDisplayConnection
- // the parameters for the callbacks are:
- // void* pInst: pInstance form the SetCallback call
- // void* pEvent: address of the system specific event structure
- // int nBytes: length of the system specific event structure
- void SetEventCallback( void* pInstance, Callback pCallback )
- { m_pEventInst = pInstance; m_pEventCallback = pCallback; }
- Callback GetEventCallback() const
- { return m_pEventCallback; }
+ void SetEventCallback( rtl::Reference< vcl::DisplayConnectionDispatch > const & pInstance )
+ { m_pEventInst = pInstance; }
bool CallEventCallback( void* pEvent, int nBytes )
- { return m_pEventCallback ? m_pEventCallback( m_pEventInst, pEvent, nBytes ) : false; }
- void SetErrorEventCallback( void* pInstance, Callback pCallback )
- { m_pErrorInst = pInstance; m_pErrorCallback = pCallback; }
- Callback GetErrorEventCallback() const
- { return m_pErrorCallback; }
+ { return m_pEventInst.is() && m_pEventInst->dispatchEvent( pEvent, nBytes ); }
bool CallErrorCallback( void* pEvent, int nBytes )
- { return m_pErrorCallback ? m_pErrorCallback( m_pErrorInst, pEvent, nBytes ) : false; }
+ { return m_pEventInst.is() && m_pEventInst->dispatchErrorEvent( pEvent, nBytes ); }
enum ConnectionIdentifierType { AsciiCString, Blob };
virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes ) = 0;
@@ -197,7 +179,7 @@ void DestroySalInstance( SalInstance* pInst );
void SalAbort( const XubString& rErrorText );
-VCL_DLLPUBLIC const ::rtl::OUString& SalGetDesktopEnvironment();
+VCL_PLUGIN_PUBLIC const ::rtl::OUString& SalGetDesktopEnvironment();
// -----------
// - SalData -
@@ -214,6 +196,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/sallayout.hxx b/vcl/inc/vcl/sallayout.hxx
index e23090c42392..bb5c6e829a70 100755
--- a/vcl/inc/vcl/sallayout.hxx
+++ b/vcl/inc/vcl/sallayout.hxx
@@ -72,7 +72,7 @@ class ImplFontData;
// -----------------
// used for managing runs e.g. for BiDi, glyph and script fallback
-class VCL_DLLPUBLIC ImplLayoutRuns
+class VCL_PLUGIN_PUBLIC ImplLayoutRuns
{
private:
int mnRunIndex;
@@ -148,7 +148,7 @@ sal_UCS4 GetVerticalChar( sal_UCS4 );
// #i80090# GetMirroredChar also needed outside vcl, moved to svapp.hxx
// VCL_DLLPUBLIC sal_UCS4 GetMirroredChar( sal_UCS4 );
sal_UCS4 GetLocalizedChar( sal_UCS4, LanguageType );
-VCL_DLLPUBLIC const char* GetAutofallback( sal_UCS4 ) ;
+VCL_PLUGIN_PUBLIC const char* GetAutofallback( sal_UCS4 ) ;
// -------------
// - SalLayout -
@@ -179,7 +179,7 @@ typedef sal_uInt32 sal_GlyphId;
// all positions/widths are in font units
// one exception: drawposition is in pixel units
-class VCL_DLLPUBLIC SalLayout
+class VCL_PLUGIN_PUBLIC SalLayout
{
public:
// used by upper layers
@@ -258,7 +258,7 @@ protected:
// - MultiSalLayout -
// ------------------
-class VCL_DLLPUBLIC MultiSalLayout : public SalLayout
+class VCL_PLUGIN_PUBLIC MultiSalLayout : public SalLayout
{
public:
virtual void DrawText( SalGraphics& ) const;
@@ -271,7 +271,7 @@ public:
virtual bool GetBoundRect( SalGraphics&, Rectangle& ) const;
// used only by OutputDevice::ImplLayout, TODO: make friend
- MultiSalLayout( SalLayout& rBaseLayout,
+ explicit MultiSalLayout( SalLayout& rBaseLayout,
const ImplFontData* pBaseFont = NULL );
virtual bool AddFallback( SalLayout& rFallbackLayout,
ImplLayoutRuns&, const ImplFontData* pFallbackFont );
@@ -341,7 +341,7 @@ typedef std::vector<GlyphItem> GlyphVector;
// ---------------
-class VCL_DLLPUBLIC GenericSalLayout : public SalLayout
+class VCL_PLUGIN_PUBLIC GenericSalLayout : public SalLayout
{
public:
// used by layout engines
diff --git a/vcl/inc/vcl/salmenu.hxx b/vcl/inc/vcl/salmenu.hxx
index cc0438c4e177..030952388dfb 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,49 +51,49 @@ 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 ) {}
};
-class VCL_DLLPUBLIC SalMenuItem
+class VCL_PLUGIN_PUBLIC SalMenuItem
{
public:
SalMenuItem() {}
virtual ~SalMenuItem();
};
-class VCL_DLLPUBLIC SalMenu
+class VCL_PLUGIN_PUBLIC SalMenu
{
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_uLong 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 621cf0e90c5a..f78af4321398 100755
--- a/vcl/inc/vcl/salnativewidgets.hxx
+++ b/vcl/inc/vcl/salnativewidgets.hxx
@@ -307,7 +307,7 @@ class VCL_DLLPUBLIC ImplControlValue
*
* Value container for scrollbars.
*/
- class VCL_DLLPUBLIC ScrollbarValue : public ImplControlValue
+class VCL_DLLPUBLIC ScrollbarValue : public ImplControlValue
{
public:
long mnMin;
@@ -373,12 +373,12 @@ class VCL_DLLPUBLIC TabitemValue : public ImplControlValue
};
virtual ~TabitemValue();
- BOOL isLeftAligned() const { return (mnAlignment & TABITEM_LEFTALIGNED) != 0; }
- BOOL isRightAligned() const { return (mnAlignment & TABITEM_RIGHTALIGNED) != 0; }
- BOOL isBothAligned() const { return isLeftAligned() && isRightAligned(); }
- BOOL isNotAligned() const { return (mnAlignment & (TABITEM_LEFTALIGNED | TABITEM_RIGHTALIGNED)) == 0; }
- BOOL isFirst() const { return (mnAlignment & TABITEM_FIRST_IN_GROUP) != 0; }
- BOOL isLast() const { return (mnAlignment & TABITEM_LAST_IN_GROUP) != 0; }
+ sal_Bool isLeftAligned() const { return (mnAlignment & TABITEM_LEFTALIGNED) != 0; }
+ sal_Bool isRightAligned() const { return (mnAlignment & TABITEM_RIGHTALIGNED) != 0; }
+ sal_Bool isBothAligned() const { return isLeftAligned() && isRightAligned(); }
+ sal_Bool isNotAligned() const { return (mnAlignment & (TABITEM_LEFTALIGNED | TABITEM_RIGHTALIGNED)) == 0; }
+ sal_Bool isFirst() const { return (mnAlignment & TABITEM_FIRST_IN_GROUP) != 0; }
+ sal_Bool isLast() const { return (mnAlignment & TABITEM_LAST_IN_GROUP) != 0; }
};
/* SpinbuttonValue:
@@ -413,10 +413,10 @@ class ToolbarValue : public ImplControlValue
{
public:
ToolbarValue() : ImplControlValue( CTRL_TOOLBAR, BUTTONVALUE_DONTKNOW, 0 )
- { mbIsTopDockingArea = FALSE; }
+ { mbIsTopDockingArea = sal_False; }
virtual ~ToolbarValue();
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 adf0e0a3d45d..157d817d7d0a 100644
--- a/vcl/inc/vcl/salobj.hxx
+++ b/vcl/inc/vcl/salobj.hxx
@@ -39,33 +39,33 @@ 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 -
// -------------
-class VCL_DLLPUBLIC SalObject
+class VCL_PLUGIN_PUBLIC 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_uLong 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;
@@ -77,15 +77,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..572b766ea909 100644
--- a/vcl/inc/vcl/salprn.hxx
+++ b/vcl/inc/vcl/salprn.hxx
@@ -44,14 +44,14 @@ namespace vcl { class PrinterController; }
// - SalPrinterQueueInfo -
// -----------------------
-struct VCL_DLLPUBLIC SalPrinterQueueInfo
+struct VCL_PLUGIN_PUBLIC SalPrinterQueueInfo
{
XubString maPrinterName;
XubString maDriver;
XubString maLocation;
XubString maComment;
- ULONG mnStatus;
- ULONG mnJobs;
+ sal_uLong mnStatus;
+ sal_uLong mnJobs;
void* mpSysData;
SalPrinterQueueInfo();
@@ -62,7 +62,7 @@ struct VCL_DLLPUBLIC SalPrinterQueueInfo
// - SalInfoPrinter -
// ------------------
-class VCL_DLLPUBLIC SalInfoPrinter
+class VCL_PLUGIN_PUBLIC SalInfoPrinter
{
public:
std::vector< PaperInfo > m_aPaperFormats; // all printer supported formats
@@ -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_uLong 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_uLong GetCapabilities( const ImplJobSetup* pSetupData, sal_uInt16 nType ) = 0;
+ virtual sal_uLong GetPaperBinCount( const ImplJobSetup* pSetupData ) = 0;
+ virtual String GetPaperBinName( const ImplJobSetup* pSetupData, sal_uLong 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
@@ -104,33 +104,33 @@ public:
// - SalPrinter -
// --------------
-class VCL_DLLPUBLIC SalPrinter
+class VCL_PLUGIN_PUBLIC SalPrinter
{
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_uLong 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_uLong GetErrorCode() = 0;
};
diff --git a/vcl/inc/vcl/salptype.hxx b/vcl/inc/vcl/salptype.hxx
index 8613ead5301a..136821b76855 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_uLong)0x00000001)
+#define SAL_JOBSET_PAPERBIN ((sal_uLong)0x00000002)
+#define SAL_JOBSET_PAPERSIZE ((sal_uLong)0x00000004)
+#define SAL_JOBSET_DUPLEXMODE ((sal_uLong)0x00000008)
#define SAL_JOBSET_ALL (SAL_JOBSET_ORIENTATION |\
SAL_JOBSET_PAPERBIN |\
SAL_JOBSET_PAPERSIZE |\
diff --git a/vcl/inc/vcl/salsession.hxx b/vcl/inc/vcl/salsession.hxx
index 2da1ae551074..c11054a79eef 100644
--- a/vcl/inc/vcl/salsession.hxx
+++ b/vcl/inc/vcl/salsession.hxx
@@ -85,7 +85,7 @@ struct SalSessionQuitEvent : public SalSessionEvent
typedef void(*SessionProc)( SalSessionEvent *pEvent);
-class VCL_DLLPUBLIC SalSession
+class VCL_PLUGIN_PUBLIC SalSession
{
SessionProc m_aProc;
public:
diff --git a/vcl/inc/vcl/salsys.hxx b/vcl/inc/vcl/salsys.hxx
index 310b0a27e30f..da16d8d5b656 100644
--- a/vcl/inc/vcl/salsys.hxx
+++ b/vcl/inc/vcl/salsys.hxx
@@ -58,7 +58,7 @@ const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_NO = 7;
// - SalSystem -
// -------------
-class VCL_DLLPUBLIC SalSystem
+class VCL_PLUGIN_PUBLIC SalSystem
{
public:
SalSystem() {}
diff --git a/vcl/inc/vcl/saltimer.hxx b/vcl/inc/vcl/saltimer.hxx
index d693070138d2..9e69b83e6042 100644
--- a/vcl/inc/vcl/saltimer.hxx
+++ b/vcl/inc/vcl/saltimer.hxx
@@ -42,7 +42,7 @@
* this needed to be virtualized for the sal plugin migration
*/
-class VCL_DLLPUBLIC SalTimer
+class VCL_PLUGIN_PUBLIC SalTimer
{
SALTIMERPROC m_pProc;
public:
@@ -50,7 +50,7 @@ public:
virtual ~SalTimer();
// AutoRepeat and Restart
- virtual void Start( ULONG nMS ) = 0;
+ virtual void Start( sal_uLong 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..6bf4b820a176 100644
--- a/vcl/inc/vcl/salvd.hxx
+++ b/vcl/inc/vcl/salvd.hxx
@@ -37,7 +37,7 @@ class SalGraphics;
// - SalVirtualDevice -
// --------------------
-class VCL_DLLPUBLIC SalVirtualDevice
+class VCL_PLUGIN_PUBLIC SalVirtualDevice
{
public: // public for Sal Implementation
SalVirtualDevice() {}
@@ -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..55753465a860 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_uLong 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_uLong 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_uLong 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_uLong)0xFFFFFFFF)
struct SalWheelMouseEvent
{
- ULONG mnTime; // Time in ms, when event is created
+ sal_uLong 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_uLong 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_uLong 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_uLong mnCursorPos; // Cursor-Position
+ sal_uLong 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_uLong mnStart; // The beggining index of selected range
+ sal_uLong 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_uLong mnStart; // The beggining index of selected range
+ sal_uLong 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_uLong)0x00000001)
+#define SAL_FRAMESTATE_MASK_Y ((sal_uLong)0x00000002)
+#define SAL_FRAMESTATE_MASK_WIDTH ((sal_uLong)0x00000004)
+#define SAL_FRAMESTATE_MASK_HEIGHT ((sal_uLong)0x00000008)
+#define SAL_FRAMESTATE_MASK_MAXIMIZED_X ((sal_uLong)0x00000100)
+#define SAL_FRAMESTATE_MASK_MAXIMIZED_Y ((sal_uLong)0x00000200)
+#define SAL_FRAMESTATE_MASK_MAXIMIZED_WIDTH ((sal_uLong)0x00000400)
+#define SAL_FRAMESTATE_MASK_MAXIMIZED_HEIGHT ((sal_uLong)0x00000800)
+#define SAL_FRAMESTATE_MASK_STATE ((sal_uLong)0x00000010)
+
+#define SAL_FRAMESTATE_NORMAL ((sal_uLong)0x00000001)
+#define SAL_FRAMESTATE_MINIMIZED ((sal_uLong)0x00000002)
+#define SAL_FRAMESTATE_MAXIMIZED ((sal_uLong)0x00000004)
+#define SAL_FRAMESTATE_ROLLUP ((sal_uLong)0x00000008)
+#define SAL_FRAMESTATE_MAXIMIZED_HORZ ((sal_uLong)0x00000010)
+#define SAL_FRAMESTATE_MAXIMIZED_VERT ((sal_uLong)0x00000020)
+#define SAL_FRAMESTATE_SYSTEMMASK ((sal_uLong)0x0000FFFF)
struct SalFrameState
{
- ULONG mnMask;
+ sal_uLong mnMask;
long mnX;
long mnY;
long mnWidth;
@@ -311,7 +311,7 @@ struct SalFrameState
long mnMaximizedY;
long mnMaximizedWidth;
long mnMaximizedHeight;
- ULONG mnState;
+ sal_uLong 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_uLong)0x00000001)
+#define SAL_INPUTCONTEXT_EXTTEXTINPUT ((sal_uLong)0x00000002)
+#define SAL_INPUTCONTEXT_EXTTEXTINPUT_ON ((sal_uLong)0x00000004)
+#define SAL_INPUTCONTEXT_EXTTEXTINPUT_OFF ((sal_uLong)0x00000008)
+#define SAL_INPUTCONTEXT_CHANGELANGUAGE ((sal_uLong)0x00000010)
#ifdef __cplusplus
@@ -332,7 +332,7 @@ struct SalInputContext
{
ImplFontSelectData* mpFont;
LanguageType meLanguage;
- ULONG mnOptions;
+ sal_uLong mnOptions;
};
#endif // __cplusplus
diff --git a/vcl/inc/vcl/scrbar.hxx b/vcl/inc/vcl/scrbar.hxx
index f993cb7304e4..f608ec123818 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_uLong 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 cc5cbcbc4d0f..1c35d2fea930 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_uLong mnRefCount;
+ sal_uLong mnOptions;
+ sal_uLong mnScreenOptions;
+ sal_uLong mnPrintOptions;
long mnScreenRasterFontDeviation;
};
@@ -79,17 +79,17 @@ public:
MachineSettings( const MachineSettings& rSet );
~MachineSettings();
- void SetOptions( ULONG nOptions )
+ void SetOptions( sal_uLong nOptions )
{ CopyData(); mpData->mnOptions = nOptions; }
- ULONG GetOptions() const
+ sal_uLong GetOptions() const
{ return mpData->mnOptions; }
- void SetScreenOptions( ULONG nOptions )
+ void SetScreenOptions( sal_uLong nOptions )
{ CopyData(); mpData->mnScreenOptions = nOptions; }
- ULONG GetScreenOptions() const
+ sal_uLong GetScreenOptions() const
{ return mpData->mnScreenOptions; }
- void SetPrintOptions( ULONG nOptions )
+ void SetPrintOptions( sal_uLong nOptions )
{ CopyData(); mpData->mnPrintOptions = nOptions; }
- ULONG GetPrintOptions() const
+ sal_uLong 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_uLong mnRefCount;
+ sal_uLong mnOptions;
+ sal_uLong 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_uLong mnScrollRepeat;
+ sal_uLong mnButtonStartRepeat;
+ sal_uLong mnButtonRepeat;
+ sal_uLong mnActionDelay;
+ sal_uLong mnMenuDelay;
+ sal_uLong 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_uLong)0x00000001)
+#define MOUSE_OPTION_AUTOCENTERPOS ((sal_uLong)0x00000002)
+#define MOUSE_OPTION_AUTODEFBTNPOS ((sal_uLong)0x00000004)
-#define MOUSE_FOLLOW_MENU ((ULONG)0x00000001)
-#define MOUSE_FOLLOW_DDLIST ((ULONG)0x00000002)
+#define MOUSE_FOLLOW_MENU ((sal_uLong)0x00000001)
+#define MOUSE_FOLLOW_DDLIST ((sal_uLong)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_uLong nOptions )
{ CopyData(); mpData->mnOptions = nOptions; }
- ULONG GetOptions() const
+ sal_uLong GetOptions() const
{ return mpData->mnOptions; }
- void SetDoubleClickTime( ULONG nDoubleClkTime )
+ void SetDoubleClickTime( sal_uLong nDoubleClkTime )
{ CopyData(); mpData->mnDoubleClkTime = nDoubleClkTime; }
- ULONG GetDoubleClickTime() const
+ sal_uLong 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_uLong nRepeat )
{ CopyData(); mpData->mnScrollRepeat = nRepeat; }
- ULONG GetScrollRepeat() const
+ sal_uLong GetScrollRepeat() const
{ return mpData->mnScrollRepeat; }
- void SetButtonStartRepeat( ULONG nRepeat )
+ void SetButtonStartRepeat( sal_uLong nRepeat )
{ CopyData(); mpData->mnButtonStartRepeat = nRepeat; }
- ULONG GetButtonStartRepeat() const
+ sal_uLong GetButtonStartRepeat() const
{ return mpData->mnButtonStartRepeat; }
- void SetButtonRepeat( ULONG nRepeat )
+ void SetButtonRepeat( sal_uLong nRepeat )
{ CopyData(); mpData->mnButtonRepeat = nRepeat; }
- ULONG GetButtonRepeat() const
+ sal_uLong GetButtonRepeat() const
{ return mpData->mnButtonRepeat; }
- void SetActionDelay( ULONG nDelay )
+ void SetActionDelay( sal_uLong nDelay )
{ CopyData(); mpData->mnActionDelay = nDelay; }
- ULONG GetActionDelay() const
+ sal_uLong GetActionDelay() const
{ return mpData->mnActionDelay; }
- void SetMenuDelay( ULONG nDelay )
+ void SetMenuDelay( sal_uLong nDelay )
{ CopyData(); mpData->mnMenuDelay = nDelay; }
- ULONG GetMenuDelay() const
+ sal_uLong GetMenuDelay() const
{ return mpData->mnMenuDelay; }
- void SetFollow( ULONG nFollow )
+ void SetFollow( sal_uLong nFollow )
{ CopyData(); mpData->mnFollow = nFollow; }
- ULONG GetFollow() const
+ sal_uLong 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_uLong mnRefCount;
Accelerator maStandardAccel;
- ULONG mnOptions;
+ sal_uLong mnOptions;
};
// --------------------
// - KeyboardSettings -
// --------------------
-#define KEYBOARD_OPTION_QUICKCURSOR ((ULONG)0x00000001)
+#define KEYBOARD_OPTION_QUICKCURSOR ((sal_uLong)0x00000001)
class VCL_DLLPUBLIC KeyboardSettings
{
@@ -311,15 +311,15 @@ public:
const Accelerator& GetStandardAccel() const
{ return mpData->maStandardAccel; }
- void SetOptions( ULONG nOptions )
+ void SetOptions( sal_uLong nOptions )
{ CopyData(); mpData->mnOptions = nOptions; }
- ULONG GetOptions() const
+ sal_uLong 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_uLong mnRefCount;
void* mpStyleData_NotUsedYet;
@@ -412,26 +412,26 @@ 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 mnHighContrast;
- USHORT mnUseSystemUIFonts;
- USHORT mnAutoMnemonic;
- USHORT mnUseImagesInMenus;
- ULONG mnUseFlatBorders;
+ sal_uLong mnCursorBlinkTime;
+ sal_uLong mnDragFullOptions;
+ sal_uLong mnAnimationOptions;
+ sal_uLong mnSelectionOptions;
+ sal_uLong mnLogoDisplayTime;
+ sal_uLong mnDisplayOptions;
+ sal_uLong mnToolbarIconSize;
+ sal_uLong mnUseFlatMenues;
+ sal_uLong mnOptions;
+ sal_uInt16 mnScreenZoom;
+ sal_uInt16 mnScreenFontZoom;
+ sal_uInt16 mnHighContrast;
+ sal_uInt16 mnUseSystemUIFonts;
+ sal_uInt16 mnAutoMnemonic;
+ sal_uInt16 mnUseImagesInMenus;
+ sal_uLong mnUseFlatBorders;
long mnMinThumbSize;
- ULONG mnSymbolsStyle;
- ULONG mnPreferredSymbolsStyle;
- USHORT mnSkipDisabledInMenus;
+ sal_uLong mnSymbolsStyle;
+ sal_uLong mnPreferredSymbolsStyle;
+ sal_uInt16 mnSkipDisabledInMenus;
Wallpaper maWorkspaceGradient;
const void* mpFontOptions;
};
@@ -443,60 +443,60 @@ 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_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_MONO ((USHORT)0x0001) // legacy
-#define STYLE_CHECKBOX_MONO ((USHORT)0x0001) // legacy
-
-#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_uLong)0x00000001)
+#define STYLE_OPTION_COLOR ((sal_uLong)0x00000002)
+#define STYLE_OPTION_FLAT ((sal_uLong)0x00000004)
+#define STYLE_OPTION_GREAT ((sal_uLong)0x00000008)
+#define STYLE_OPTION_HIGHLIGHT ((sal_uLong)0x00000010)
+#define STYLE_OPTION_ADVANCEDUSER ((sal_uLong)0x00000020)
+#define STYLE_OPTION_SCROLLARROW ((sal_uLong)0x00000040)
+#define STYLE_OPTION_SPINARROW ((sal_uLong)0x00000080)
+#define STYLE_OPTION_SPINUPDOWN ((sal_uLong)0x00000100)
+#define STYLE_OPTION_NOMNEMONICS ((sal_uLong)0x00000200)
+#define STYLE_OPTION_HIDEDISABLED ((sal_uLong)0x00100000)
+
+#define DRAGFULL_OPTION_WINDOWMOVE ((sal_uLong)0x00000001)
+#define DRAGFULL_OPTION_WINDOWSIZE ((sal_uLong)0x00000002)
+#define DRAGFULL_OPTION_OBJECTMOVE ((sal_uLong)0x00000004)
+#define DRAGFULL_OPTION_OBJECTSIZE ((sal_uLong)0x00000008)
+#define DRAGFULL_OPTION_DOCKING ((sal_uLong)0x00000010)
+#define DRAGFULL_OPTION_SPLIT ((sal_uLong)0x00000020)
+#define DRAGFULL_OPTION_SCROLL ((sal_uLong)0x00000040)
+
+#define LOGO_DISPLAYTIME_NOLOGO ((sal_uLong)0)
+#define LOGO_DISPLAYTIME_STARTTIME ((sal_uLong)0xFFFFFFFF)
+
+#define ANIMATION_OPTION_MINIMIZE ((sal_uLong)0x00000001)
+#define ANIMATION_OPTION_POPUP ((sal_uLong)0x00000002)
+#define ANIMATION_OPTION_DIALOG ((sal_uLong)0x00000004)
+#define ANIMATION_OPTION_TREE ((sal_uLong)0x00000008)
+#define ANIMATION_OPTION_SCROLL ((sal_uLong)0x00000010)
+
+#define SELECTION_OPTION_WORD ((sal_uLong)0x00000001)
+#define SELECTION_OPTION_FOCUS ((sal_uLong)0x00000002)
+#define SELECTION_OPTION_INVERT ((sal_uLong)0x00000004)
+#define SELECTION_OPTION_SHOWFIRST ((sal_uLong)0x00000008)
+
+#define DISPLAY_OPTION_AA_DISABLE ((sal_uLong)0x00000001)
+
+#define STYLE_RADIOBUTTON_MONO ((sal_uInt16)0x0001) // legacy
+#define STYLE_CHECKBOX_MONO ((sal_uInt16)0x0001) // legacy
+
+#define STYLE_TOOLBAR_ICONSIZE_UNKNOWN ((sal_uLong)0)
+#define STYLE_TOOLBAR_ICONSIZE_SMALL ((sal_uLong)1)
+#define STYLE_TOOLBAR_ICONSIZE_LARGE ((sal_uLong)2)
+
+#define STYLE_SYMBOLS_AUTO ((sal_uLong)0)
+#define STYLE_SYMBOLS_DEFAULT ((sal_uLong)1)
+#define STYLE_SYMBOLS_HICONTRAST ((sal_uLong)2)
+#define STYLE_SYMBOLS_INDUSTRIAL ((sal_uLong)3)
+#define STYLE_SYMBOLS_CRYSTAL ((sal_uLong)4)
+#define STYLE_SYMBOLS_TANGO ((sal_uLong)5)
+#define STYLE_SYMBOLS_OXYGEN ((sal_uLong)6)
+#define STYLE_SYMBOLS_CLASSIC ((sal_uLong)7)
+#define STYLE_SYMBOLS_THEMES_MAX ((sal_uLong)8)
+
+#define STYLE_CURSOR_NOBLINKTIME ((sal_uLong)0xFFFFFFFF)
class VCL_DLLPUBLIC StyleSettings
{
@@ -700,31 +700,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; }
@@ -839,78 +839,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_uLong nDisplayTime )
{ CopyData(); mpData->mnLogoDisplayTime = nDisplayTime; }
- ULONG GetLogoDisplayTime() const
+ sal_uLong GetLogoDisplayTime() const
{ return mpData->mnLogoDisplayTime; }
- void SetDragFullOptions( ULONG nOptions )
+ void SetDragFullOptions( sal_uLong nOptions )
{ CopyData(); mpData->mnDragFullOptions = nOptions; }
- ULONG GetDragFullOptions() const
+ sal_uLong GetDragFullOptions() const
{ return mpData->mnDragFullOptions; }
- void SetAnimationOptions( ULONG nOptions )
+ void SetAnimationOptions( sal_uLong nOptions )
{ CopyData(); mpData->mnAnimationOptions = nOptions; }
- ULONG GetAnimationOptions() const
+ sal_uLong GetAnimationOptions() const
{ return mpData->mnAnimationOptions; }
- void SetSelectionOptions( ULONG nOptions )
+ void SetSelectionOptions( sal_uLong nOptions )
{ CopyData(); mpData->mnSelectionOptions = nOptions; }
- ULONG GetSelectionOptions() const
+ sal_uLong GetSelectionOptions() const
{ return mpData->mnSelectionOptions; }
- void SetDisplayOptions( ULONG nOptions )
+ void SetDisplayOptions( sal_uLong nOptions )
{ CopyData(); mpData->mnDisplayOptions = nOptions; }
- ULONG GetDisplayOptions() const
+ sal_uLong GetDisplayOptions() const
{ return mpData->mnDisplayOptions; }
void SetAntialiasingMinPixelHeight( long nMinPixel )
{ CopyData(); mpData->mnAntialiasedMin = nMinPixel; }
- ULONG GetAntialiasingMinPixelHeight() const
+ sal_uLong GetAntialiasingMinPixelHeight() const
{ return mpData->mnAntialiasedMin; }
- void SetOptions( ULONG nOptions )
+ void SetOptions( sal_uLong nOptions )
{ CopyData(); mpData->mnOptions = nOptions; }
- ULONG GetOptions() const
+ sal_uLong 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_uLong nSize )
{ CopyData(); mpData->mnToolbarIconSize = nSize; }
- ULONG GetToolbarIconSize() const
+ sal_uLong GetToolbarIconSize() const
{ return mpData->mnToolbarIconSize; }
- void SetSymbolsStyle( ULONG nStyle )
+ void SetSymbolsStyle( sal_uLong nStyle )
{ CopyData(); mpData->mnSymbolsStyle = nStyle; }
- ULONG GetSymbolsStyle() const
+ sal_uLong GetSymbolsStyle() const
{ return mpData->mnSymbolsStyle; }
- void SetPreferredSymbolsStyle( ULONG nStyle )
+ void SetPreferredSymbolsStyle( sal_uLong nStyle )
{ CopyData(); mpData->mnPreferredSymbolsStyle = nStyle; }
void SetPreferredSymbolsStyleName( const ::rtl::OUString &rName );
- ULONG GetPreferredSymbolsStyle() const
+ sal_uLong 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_uLong nStyle ) const;
+ sal_uLong GetAutoSymbolsStyle() const;
- ULONG GetCurrentSymbolsStyle() const;
+ sal_uLong GetCurrentSymbolsStyle() const;
void SetSymbolsStyleName( const ::rtl::OUString &rName )
{ return SetSymbolsStyle( ImplNameToSymbolsStyle( rName ) ); }
@@ -928,13 +928,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_uLong nStyle ) const;
+ sal_uLong ImplNameToSymbolsStyle( const ::rtl::OUString &rName ) const;
};
// ----------------
@@ -949,10 +949,10 @@ class ImplMiscData
ImplMiscData( const ImplMiscData& rData );
private:
- ULONG mnRefCount;
- USHORT mnEnableATT;
- BOOL mbEnableLocalizedDecimalSep;
- USHORT mnDisablePrinting;
+ sal_uLong mnRefCount;
+ sal_uInt16 mnEnableATT;
+ sal_Bool mbEnableLocalizedDecimalSep;
+ sal_uInt16 mnDisablePrinting;
};
// ----------------
@@ -971,16 +971,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); }
};
@@ -996,8 +996,8 @@ class ImplNotificationData
ImplNotificationData( const ImplNotificationData& rData );
private:
- ULONG mnRefCount;
- ULONG mnOptions;
+ sal_uLong mnRefCount;
+ sal_uLong mnOptions;
};
// ------------------------
@@ -1016,15 +1016,15 @@ public:
NotificationSettings( const NotificationSettings& rSet );
~NotificationSettings();
- void SetOptions( ULONG nOptions )
+ void SetOptions( sal_uLong nOptions )
{ CopyData(); mpData->mnOptions = nOptions; }
- ULONG GetOptions() const
+ sal_uLong 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); }
};
@@ -1040,19 +1040,19 @@ class ImplHelpData
ImplHelpData( const ImplHelpData& rData );
private:
- ULONG mnRefCount;
- ULONG mnOptions;
- ULONG mnTipDelay;
- ULONG mnTipTimeout;
- ULONG mnBalloonDelay;
+ sal_uLong mnRefCount;
+ sal_uLong mnOptions;
+ sal_uLong mnTipDelay;
+ sal_uLong mnTipTimeout;
+ sal_uLong mnBalloonDelay;
};
// ----------------
// - HelpSettings -
// ----------------
-#define HELP_OPTION_QUICK ((ULONG)0x00000001)
-#define HELP_OPTION_ACTIVE ((ULONG)0x00000002)
+#define HELP_OPTION_QUICK ((sal_uLong)0x00000001)
+#define HELP_OPTION_ACTIVE ((sal_uLong)0x00000002)
class VCL_DLLPUBLIC HelpSettings
{
@@ -1066,27 +1066,27 @@ public:
HelpSettings( const HelpSettings& rSet );
~HelpSettings();
- void SetOptions( ULONG nOptions )
+ void SetOptions( sal_uLong nOptions )
{ CopyData(); mpData->mnOptions = nOptions; }
- ULONG GetOptions() const
+ sal_uLong GetOptions() const
{ return mpData->mnOptions; }
- void SetTipDelay( ULONG nTipDelay )
+ void SetTipDelay( sal_uLong nTipDelay )
{ CopyData(); mpData->mnTipDelay = nTipDelay; }
- ULONG GetTipDelay() const
+ sal_uLong GetTipDelay() const
{ return mpData->mnTipDelay; }
- void SetTipTimeout( ULONG nTipTimeout )
+ void SetTipTimeout( sal_uLong nTipTimeout )
{ CopyData(); mpData->mnTipTimeout = nTipTimeout; }
- ULONG GetTipTimeout() const
+ sal_uLong GetTipTimeout() const
{ return mpData->mnTipTimeout; }
- void SetBalloonDelay( ULONG nBalloonDelay )
+ void SetBalloonDelay( sal_uLong nBalloonDelay )
{ CopyData(); mpData->mnBalloonDelay = nBalloonDelay; }
- ULONG GetBalloonDelay() const
+ sal_uLong 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); }
};
@@ -1103,7 +1103,7 @@ class ImplAllSettingsData
~ImplAllSettingsData();
private:
- ULONG mnRefCount;
+ sal_uLong mnRefCount;
MachineSettings maMachineSettings;
MouseSettings maMouseSettings;
KeyboardSettings maKeyboardSettings;
@@ -1112,8 +1112,8 @@ private:
NotificationSettings maNotificationSettings;
HelpSettings maHelpSettings;
::com::sun::star::lang::Locale maLocale;
- ULONG mnSystemUpdate;
- ULONG mnWindowUpdate;
+ sal_uLong mnSystemUpdate;
+ sal_uLong mnWindowUpdate;
::com::sun::star::lang::Locale maUILocale;
LanguageType meLanguage;
LanguageType meUILanguage;
@@ -1131,24 +1131,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_uLong)0x00000001)
+#define SETTINGS_MOUSE ((sal_uLong)0x00000002)
+#define SETTINGS_KEYBOARD ((sal_uLong)0x00000004)
+#define SETTINGS_STYLE ((sal_uLong)0x00000008)
+#define SETTINGS_MISC ((sal_uLong)0x00000010)
+#define SETTINGS_SOUND ((sal_uLong)0x00000020)
+#define SETTINGS_NOTIFICATION ((sal_uLong)0x00000040)
+#define SETTINGS_HELP ((sal_uLong)0x00000080)
+#define SETTINGS_INTERNATIONAL ((sal_uLong)0x00000100) /* was for class International, has no effect anymore */
+#define SETTINGS_LOCALE ((sal_uLong)0x00000200)
+#define SETTINGS_UILOCALE ((sal_uLong)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_uLong)0x00000800) // this flag indicates that the data changed event was created
// in Windows::UpdateSettings probably because of a global
// settings changed
@@ -1207,7 +1207,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;
@@ -1224,22 +1224,22 @@ public:
const String& rStr2, xub_StrLen nPos2, xub_StrLen nCount2 ) const;
*/
- void SetSystemUpdate( ULONG nUpdate )
+ void SetSystemUpdate( sal_uLong nUpdate )
{ CopyData(); mpData->mnSystemUpdate = nUpdate; }
- ULONG GetSystemUpdate() const
+ sal_uLong GetSystemUpdate() const
{ return mpData->mnSystemUpdate; }
- void SetWindowUpdate( ULONG nUpdate )
+ void SetWindowUpdate( sal_uLong nUpdate )
{ CopyData(); mpData->mnWindowUpdate = nUpdate; }
- ULONG GetWindowUpdate() const
+ sal_uLong GetWindowUpdate() const
{ return mpData->mnWindowUpdate; }
- ULONG Update( ULONG nFlags, const AllSettings& rSettings );
- ULONG GetChangeFlags( const AllSettings& rSettings ) const;
+ sal_uLong Update( sal_uLong nFlags, const AllSettings& rSettings );
+ sal_uLong 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/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..9b49652fad15 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_uLong 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..ca81f01ac128 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_uLong 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 f028c6969b16..4ec41438536a 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,34 +173,34 @@ 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;
+ 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;
/** Set a range that limits the (variable part of the) size with an
upper and a lower bound (both are valid values themselves.)
@param nId
@@ -209,30 +209,30 @@ public:
Values of -1 define missing bounds, thus setting a range (-1,-1)
(the default) removes the size limitiation.
*/
- void SetItemSizeRange (USHORT nId, const Range aRange);
+ void SetItemSizeRange (sal_uInt16 nId, const Range aRange);
/** Return the current size limits for the specified item.
*/
- Range GetItemSizeRange (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;
+ Range GetItemSizeRange (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; }
@@ -240,24 +240,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 907d08272cbb..97ea5c94c715 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_uLong 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_uLong 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, const rtl::OString& rHelpId );
- rtl::OString GetHelpId( USHORT nItemId ) const;
+ void SetHelpId( sal_uInt16 nItemId, const rtl::OString& rHelpId );
+ rtl::OString 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 );
@@ -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..88e9b0f75732 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_uLong 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_uLong ReleaseSolarMutex();
+ static void AcquireSolarMutex( sal_uLong 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_uLong GetLastInputInterval();
+ static sal_Bool IsUICaptured();
+ static sal_Bool IsUserActive( sal_uInt16 nTest = USERACTIVE_ALL );
virtual void SystemSettingsChanging( AllSettings& rSettings,
Window* pFrame );
@@ -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_uLong nEvent, Window* pWin, void* pData );
static void ImplCallEventListeners( VclSimpleEvent* pEvent );
- static BOOL HandleKey( ULONG nEvent, Window *pWin, KeyEvent* pKeyEvent );
+ static sal_Bool HandleKey( sal_uLong 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_uLong PostKeyEvent( sal_uLong nEvent, Window *pWin, KeyEvent* pKeyEvent );
+ static sal_uLong PostMouseEvent( sal_uLong nEvent, Window *pWin, MouseEvent* pMouseEvent );
static void RemoveMouseAndKeyEvents( Window *pWin );
- static BOOL IsProcessedMouseOrKeyEvent( ULONG nEventId );
+ static sal_Bool IsProcessedMouseOrKeyEvent( sal_uLong 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_uLong PostUserEvent( sal_uLong nEvent, void* pEventData = NULL );
+ static sal_uLong PostUserEvent( const Link& rLink, void* pCaller = NULL );
+ static sal_Bool PostUserEvent( sal_uLong& rEventId, sal_uLong nEvent, void* pEventData = NULL );
+ static sal_Bool PostUserEvent( sal_uLong& rEventId, const Link& rLink, void* pCaller = NULL );
+ static void RemoveUserEvent( sal_uLong 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_uLong AddHotKey( const KeyCode& rKeyCode, const Link& rLink, void* pData = NULL );
+ static void RemoveHotKey( sal_uLong nId );
+ static sal_uLong AddEventHook( VCLEventHookProc pProc, void* pData = NULL );
+ static void RemoveEventHook( sal_uLong 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_uLong GetReservedKeyCodeCount();
+ static const KeyCode* GetReservedKeyCode( sal_uLong i );
+ static String GetReservedKeyCodeDescription( sal_uLong 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..dce884cdf776 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_uLong)((((sal_uLong)(char)(char1)))| \
+ (((sal_uLong)(char)(char2))<<8UL)| \
+ (((sal_uLong)(char)(char3))<<16UL)| \
+ ((sal_uLong)(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 67aa6806be49..9c91915823b2 100644
--- a/vcl/inc/vcl/svdata.hxx
+++ b/vcl/inc/vcl/svdata.hxx
@@ -28,6 +28,7 @@
#ifndef _SV_SVDATA_HXX
#define _SV_SVDATA_HXX
+#include "rtl/ref.hxx"
#include "vos/thread.hxx"
#include "tools/string.hxx"
#include "tools/gen.hxx"
@@ -42,6 +43,8 @@
#include "com/sun/star/uno/Reference.hxx"
#include "unotools/options.hxx"
+#include <hash_map>
+
namespace com {
namespace sun {
namespace star {
@@ -51,9 +54,6 @@ namespace lang {
namespace frame {
class XSessionManagerClient;
}
-namespace awt {
- class XDisplayConnection;
-}
}}}
struct ImplTimerData;
@@ -152,20 +152,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_uLong 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
long mnDefaultLayoutBorder; // default value in pixel for layout distances used
// in window arrangers
@@ -206,7 +206,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 mbNativeFontConfig; // true: do not override UI font
@@ -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
};
@@ -264,15 +264,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_uLong mnLastCheckFColor; // Letzte FaceColor fuer CheckImage
+ sal_uLong mnLastCheckWColor; // Letzte WindowColor fuer CheckImage
+ sal_uLong mnLastCheckWTextColor; // Letzte WindowTextColor fuer CheckImage
+ sal_uLong mnLastCheckLColor; // Letzte LightColor fuer CheckImage
+ sal_uLong mnLastRadioFColor; // Letzte FaceColor fuer RadioImage
+ sal_uLong mnLastRadioWColor; // Letzte WindowColor fuer RadioImage
+ sal_uLong mnLastRadioLColor; // Letzte LightColor fuer RadioImage
FieldUnitStringList* mpFieldUnitStrings; // list with field units
FieldUnitStringList* mpCleanUnitStrings; // same list but with some "fluff" like spaces removed
};
@@ -284,18 +284,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_uLong mnLastHelpHideTime; // ticks of last show
};
struct ImplSVNWFData
@@ -337,18 +337,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_uLong 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_uLong mnTimerPeriod; // current timer period
+ sal_uLong 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
@@ -358,24 +358,24 @@ 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<
- ::com::sun::star::awt::XDisplayConnection > mxDisplayConnection;
+ rtl::Reference< vcl::DisplayConnection > mxDisplayConnection;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxAccessBridge;
com::sun::star::uno::Reference< com::sun::star::frame::XSessionManagerClient > xSMClient;
::vcl::SettingsConfigItem* mpSettingsConfigItem;
std::list< vcl::DeleteOnDeinitBase* >* mpDeinitDeleteList;
+ std::hash_map< int, rtl::OUString >* mpPaperNames;
};
void ImplInitSVData();
void ImplDeInitSVData();
void ImplDestroySVData();
Window* ImplGetDefaultWindow();
-VCL_DLLPUBLIC ResMgr* ImplGetResMgr();
-VCL_DLLPUBLIC ResId VclResId( sal_Int32 nId ); // throws std::bad_alloc if no res mgr
+VCL_PLUGIN_PUBLIC ResMgr* ImplGetResMgr();
+VCL_PLUGIN_PUBLIC ResId VclResId( sal_Int32 nId ); // throws std::bad_alloc if no res mgr
DockingManager* ImplGetDockingManager();
void ImplWindowAutoMnemonic( Window* pWindow );
@@ -383,7 +383,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();
@@ -391,11 +391,11 @@ void ImplFreeEventHookData();
long ImplCallPreNotify( NotifyEvent& rEvt );
long ImplCallEvent( NotifyEvent& rEvt );
-extern VCL_DLLPUBLIC ImplSVData* pImplSVData;
-inline VCL_DLLPUBLIC ImplSVData* ImplGetSVData() { return pImplSVData; }
+extern VCL_PLUGIN_PUBLIC ImplSVData* pImplSVData;
+inline VCL_PLUGIN_PUBLIC ImplSVData* ImplGetSVData() { return pImplSVData; }
inline ImplSVData* ImplGetAppSVData() { return ImplGetSVData(); }
-bool ImplInitAccessBridge( BOOL bAllowCancel, BOOL &rCancelled );
+bool ImplInitAccessBridge( sal_Bool bAllowCancel, sal_Bool &rCancelled );
FieldUnitStringList* ImplGetFieldUnits();
FieldUnitStringList* ImplGetCleanedFieldUnits();
@@ -427,20 +427,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* );
@@ -452,12 +452,12 @@ private:
struct ImplSVEvent
{
- ULONG mnEvent;
+ sal_uLong mnEvent;
void* mpData;
Link* mpLink;
Window* mpWindow;
ImplDelData maDelData;
- BOOL mbCall;
+ sal_Bool mbCall;
};
#endif // _SV_SVDATA_HXX
diff --git a/vcl/inc/vcl/svids.hrc b/vcl/inc/vcl/svids.hrc
index 432a30c3a748..61622bcabade 100644
--- a/vcl/inc/vcl/svids.hrc
+++ b/vcl/inc/vcl/svids.hrc
@@ -58,6 +58,8 @@
#define SV_DISCLOSURE_PLUS_HC 1062
#define SV_DISCLOSURE_MINUS_HC 1063
+#define RID_STR_PAPERNAMES 1070
+
#define SV_RESID_MENU_EDIT 2000
#define SV_MENU_EDIT_UNDO 1
#define SV_MENU_EDIT_CUT 2
@@ -147,12 +149,12 @@
#define SV_PRINT_LOCATION_TXT 21
#define SV_PRINT_COMMENT_TXT 22
#define SV_PRINT_DETAILS_BTN 23
+#define SV_PRINT_OPT_REVERSE 24
#define SV_PRINT_TAB_OPT 3
#define SV_PRINT_OPT_PRINT_FL 1
#define SV_PRINT_OPT_TOFILE 2
#define SV_PRINT_OPT_SINGLEJOBS 3
-#define SV_PRINT_OPT_REVERSE 4
#define SV_DLG_PRINT_PROGRESS 2049
#define SV_PRINT_PROGRESS_CANCEL 1
diff --git a/vcl/inc/vcl/symbol.hxx b/vcl/inc/vcl/symbol.hxx
index 0f0627fb41e3..1f94db084311 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 e914adbdffed..b779b5d9d316 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 );
SAL_DLLPRIVATE void ImplTestJavaException( void* pEnv );
// Copy assignment is forbidden and not implemented.
@@ -53,7 +53,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();
@@ -61,8 +61,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();
// return the platform specific handle/id of this window;
// in case the flag bUseJava is set, a java compatible overlay window
diff --git a/vcl/inc/vcl/sysdata.hxx b/vcl/inc/vcl/sysdata.hxx
index 1146f1b3b842..b9feeaf3a2aa 100644
--- a/vcl/inc/vcl/sysdata.hxx
+++ b/vcl/inc/vcl/sysdata.hxx
@@ -150,6 +150,7 @@ struct SystemGlyphData
unsigned long index;
double x;
double y;
+ int fallbacklevel;
};
@@ -178,12 +179,14 @@ struct SystemFontData
// - SystemTextLayoutData -
// --------------------
+typedef std::vector<SystemGlyphData> SystemGlyphDataVector;
+
struct SystemTextLayoutData
{
unsigned long nSize; // size in bytes of this structure
std::vector<SystemGlyphData> rGlyphData; // glyph data
int orientation; // Text orientation
- SystemFontData aSysFontData; // Font data for the text layout
};
#endif // _SV_SYSDATA_HXX
+
diff --git a/vcl/inc/vcl/syswin.hxx b/vcl/inc/vcl/syswin.hxx
index b3a7d9b8775e..696a07ca3d42 100644
--- a/vcl/inc/vcl/syswin.hxx
+++ b/vcl/inc/vcl/syswin.hxx
@@ -65,27 +65,27 @@ 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_uLong)0x00000001)
+#define WINDOWSTATE_MASK_Y ((sal_uLong)0x00000002)
+#define WINDOWSTATE_MASK_WIDTH ((sal_uLong)0x00000004)
+#define WINDOWSTATE_MASK_HEIGHT ((sal_uLong)0x00000008)
+#define WINDOWSTATE_MASK_STATE ((sal_uLong)0x00000010)
+#define WINDOWSTATE_MASK_MINIMIZED ((sal_uLong)0x00000020)
+#define WINDOWSTATE_MASK_MAXIMIZED_X ((sal_uLong)0x00000100)
+#define WINDOWSTATE_MASK_MAXIMIZED_Y ((sal_uLong)0x00000200)
+#define WINDOWSTATE_MASK_MAXIMIZED_WIDTH ((sal_uLong)0x00000400)
+#define WINDOWSTATE_MASK_MAXIMIZED_HEIGHT ((sal_uLong)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_uLong)0x00000001)
+#define WINDOWSTATE_STATE_MINIMIZED ((sal_uLong)0x00000002)
+#define WINDOWSTATE_STATE_MAXIMIZED ((sal_uLong)0x00000004)
+#define WINDOWSTATE_STATE_ROLLUP ((sal_uLong)0x00000008)
+#define WINDOWSTATE_STATE_MAXIMIZED_HORZ ((sal_uLong)0x00000010)
+#define WINDOWSTATE_STATE_MAXIMIZED_VERT ((sal_uLong)0x00000020)
-class VCL_DLLPUBLIC WindowStateData
+class VCL_PLUGIN_PUBLIC WindowStateData
{
private:
sal_uInt32 mnValidMask;
@@ -106,7 +106,7 @@ public:
mnMaximizedX = mnMaximizedY = mnMaximizedWidth = mnMaximizedHeight = 0;
}
- void SetMask( ULONG nValidMask ) { mnValidMask = nValidMask; }
+ void SetMask( sal_uLong 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_uLong 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 430a99235b52..ac0e11f3fb1d 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,24 +61,24 @@ private:
long mnLastHeight;
long mnBtnSize;
long mnMaxPageWidth;
- USHORT mnActPageId;
- USHORT mnCurPageId;
- BOOL mbFormat;
- BOOL mbRestoreHelpId;
- BOOL mbRestoreUnqId;
- BOOL mbSmallInvalidate;
- BOOL mbExtraSpace;
+ sal_uInt16 mnActPageId;
+ sal_uInt16 mnCurPageId;
+ sal_Bool mbFormat;
+ sal_Bool mbRestoreHelpId;
+ sal_Bool mbRestoreUnqId;
+ 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 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 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 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 );
@@ -132,43 +132,43 @@ 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 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, const rtl::OString& rHelpId );
- rtl::OString GetHelpId( USHORT nPageId ) const;
+ void SetHelpId( sal_uInt16 nPageId, const rtl::OString& rHelpId );
+ rtl::OString 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 ); }
@@ -188,19 +188,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..4ed42914e655 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_uLong 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/throbber.hxx b/vcl/inc/vcl/throbber.hxx
new file mode 100644
index 000000000000..f86a9944e28f
--- /dev/null
+++ b/vcl/inc/vcl/throbber.hxx
@@ -0,0 +1,103 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef VCL_THROBBER_HXX
+#define VCL_THROBBER_HXX
+
+#include "vcl/dllapi.h"
+#include "vcl/imgctrl.hxx"
+#include "vcl/timer.hxx"
+
+#include <vos/mutex.hxx>
+
+#include <com/sun/star/graphic/XGraphic.hpp>
+
+#include <vector>
+
+class VCL_DLLPUBLIC Throbber : public ImageControl
+{
+public:
+ enum ImageSet
+ {
+ /// no (default) images at all
+ IMAGES_NONE,
+ /// automatically decide between different image sets, depending on what fits best the actual size
+ IMAGES_AUTO,
+ /// default images, 16x16 pixels
+ IMAGES_16_PX,
+ /// default images, 32x32 pixels
+ IMAGES_32_PX,
+ /// default images, 64x64 pixels
+ IMAGES_64_PX,
+ };
+
+public:
+ Throbber( Window* i_parentWindow, WinBits i_style, const ImageSet i_imageSet = IMAGES_AUTO );
+ Throbber( Window* i_parentWindow, const ResId& i_resId, const ImageSet i_imageSet = IMAGES_AUTO );
+ ~Throbber();
+
+ // Properties
+ void setStepTime( sal_Int32 nStepTime ) { mnStepTime = nStepTime; }
+ sal_Int32 getStepTime() const { return mnStepTime; }
+
+ void setRepeat( sal_Bool bRepeat ) { mbRepeat = bRepeat; }
+ sal_Bool getRepeat() const { return mbRepeat; }
+
+ // animation control
+ void start();
+ void stop();
+ bool isRunning() const;
+
+ void setImageList( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > >& ImageList );
+ void setImageList( ::std::vector< Image > const& i_images );
+
+ // default images
+ static ::std::vector< ::rtl::OUString >
+ getDefaultImageURLs( const ImageSet i_imageSet );
+
+protected:
+ // Window overridables
+ virtual void Resize();
+
+private:
+ SAL_DLLPRIVATE void initImages();
+
+private:
+ ::std::vector< Image > maImageList;
+
+ sal_Bool mbRepeat;
+ sal_Int32 mnStepTime;
+ sal_Int32 mnCurStep;
+ sal_Int32 mnStepCount;
+ AutoTimer maWaitTimer;
+ ImageSet meImageSet;
+
+ DECL_LINK( TimeOutHdl, void* );
+};
+
+#endif // VCL_THROBBER_HXX
+
diff --git a/vcl/inc/vcl/timer.hxx b/vcl/inc/vcl/timer.hxx
index bb325c118844..76857f6c08c5 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_uLong 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_uLong nTimeout );
+ sal_uLong 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 7cdeb0b17a5a..4fd3238647d0 100644
--- a/vcl/inc/vcl/toolbox.h
+++ b/vcl/inc/vcl/toolbox.h
@@ -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 aa7ddd886bbb..9cb70aff58bd 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, const rtl::OString& rHelpId );
- rtl::OString GetHelpId( USHORT nItemId ) const;
+ void SetHelpId( sal_uInt16 nItemId, const rtl::OString& rHelpId );
+ rtl::OString 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,26 +543,26 @@ 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 ); }
@@ -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..d6f8af298593 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_uLong nId;
public:
- VclSimpleEvent( ULONG n ) { nId = n; }
+ VclSimpleEvent( sal_uLong n ) { nId = n; }
TYPEINFO();
- ULONG GetId() const { return nId; }
+ sal_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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..12ef95e017d7 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_uLong mnRefCount;
BitmapEx* mpCache;
friend SvStream& operator>>( SvStream& rIStm, ImplWallpaper& rImplWallpaper );
diff --git a/vcl/inc/vcl/window.h b/vcl/inc/vcl/window.h
index c710156422bf..4011584890cf 100644
--- a/vcl/inc/vcl/window.h
+++ b/vcl/inc/vcl/window.h
@@ -108,14 +108,14 @@ namespace vcl {
// - 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)
// ---------------
// - ImplWinData -
@@ -124,15 +124,15 @@ long ImplWindowFrameProc( Window* pInst, SalFrame* pFrame, USHORT nEvent, const
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
::std::list< Window* >
maTopWindowChildren;
};
@@ -146,9 +146,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
};
// -----------------
@@ -172,9 +172,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
@@ -183,23 +183,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;
@@ -207,9 +207,27 @@ 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;
};
+// -----------------------
+// - ImplAccessibleInfos -
+// -----------------------
+
+struct ImplAccessibleInfos
+{
+ sal_uInt16 nAccessibleRole;
+ String* pAccessibleName;
+ String* pAccessibleDescription;
+ Window* pLabeledByWindow;
+ Window* pLabelForWindow;
+ Window* pMemberOfWindow;
+
+ ImplAccessibleInfos();
+ ~ImplAccessibleInfos();
+};
+
+
// ---------------
// - WindowImpl -
// ---------------
@@ -286,15 +304,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,
@@ -377,9 +395,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 5ba3b615904e..f367be85051d 100755
--- a/vcl/inc/vcl/window.hxx
+++ b/vcl/inc/vcl/window.hxx
@@ -142,115 +142,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)
@@ -273,49 +273,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_uLong)0x00000001)
+#define WINDOW_DRAW_NOBORDER ((sal_uLong)0x00000002)
+#define WINDOW_DRAW_NOCONTROLS ((sal_uLong)0x00000004)
+#define WINDOW_DRAW_NODISABLE ((sal_uLong)0x00000008)
+#define WINDOW_DRAW_NOMNEMONIC ((sal_uLong)0x00000010)
+#define WINDOW_DRAW_NOSELECTION ((sal_uLong)0x00000020)
+#define WINDOW_DRAW_NOFOCUS ((sal_uLong)0x00000040)
+#define WINDOW_DRAW_NOBACKGROUND ((sal_uLong)0x00000080)
+#define WINDOW_DRAW_ROLLOVER ((sal_uLong)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
@@ -402,7 +402,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;
@@ -410,26 +410,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();
@@ -444,20 +444,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();
@@ -467,24 +467,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; }
SAL_DLLPRIVATE void ImplFreeExtWindowImpl();
@@ -505,34 +505,34 @@ public:
<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();
@@ -548,12 +548,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 ImplExtResize();
@@ -568,16 +568,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;
@@ -593,10 +593,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_uLong nEvent, void* pData = NULL );
+ void CallEventListeners( sal_uLong nEvent, void* pData = NULL );
void FireVclEvent( VclSimpleEvent* pEvent );
// FIXME: this is a hack to workaround missing layout functionality
@@ -615,8 +615,9 @@ public:
virtual void KeyUp( const KeyEvent& rKEvt );
virtual void PrePaint();
virtual void Paint( const Rectangle& rRect );
+
virtual void PostPaint();
- virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags );
+ virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags );
virtual void Move();
virtual void Resize();
virtual void Activate();
@@ -626,7 +627,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_uLong nEvent, void* pEventData );
virtual void StateChanged( StateChangedType nStateChange );
virtual void DataChanged( const DataChangedEvent& rDCEvt );
virtual long PreNotify( NotifyEvent& rNEvt );
@@ -638,16 +639,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_uLong PostUserEvent( sal_uLong nEvent, void* pEventData = NULL );
+ sal_uLong PostUserEvent( const Link& rLink, void* pCaller = NULL );
+ sal_Bool PostUserEvent( sal_uLong& rEventId, sal_uLong nEvent, void* pEventData = NULL );
+ sal_Bool PostUserEvent( sal_uLong& rEventId, const Link& rLink, void* pCaller = NULL );
+ void RemoveUserEvent( sal_uLong 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
@@ -661,64 +662,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_uLong mnState; // the button state
Point maPos; // mouse position in output coordinates
};
PointerState GetPointerState();
- BOOL IsMouseOver();
+ sal_Bool IsMouseOver();
- ULONG GetCurrentModButtons();
+ sal_uLong 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 );
@@ -731,26 +732,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
@@ -759,23 +760,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.
@@ -789,12 +790,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
@@ -809,12 +810,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
@@ -840,21 +841,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 );
@@ -862,8 +863,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;
@@ -879,40 +880,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();
/**
@@ -922,35 +923,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 );
@@ -979,48 +980,48 @@ public:
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 );
@@ -1031,20 +1032,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;
@@ -1052,9 +1053,20 @@ public:
void SetAccessibleDescription( const String& rDescr );
String GetAccessibleDescription() const;
+ void SetAccessibleRelationLabeledBy( Window* pLabeledBy );
+ Window* GetAccessibleRelationLabeledBy() const;
+
+ void SetAccessibleRelationLabelFor( Window* pLabelFor );
+ Window* GetAccessibleRelationLabelFor() const;
+
+ void SetAccessibleRelationMemberOf( Window* pMemberOf );
+ Window* GetAccessibleRelationMemberOf() const;
+
+
// 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 );
+ void SetAccessibilityEventsSuppressed(sal_Bool bSuppressed);
/// request XCanvas render interface for this window
::com::sun::star::uno::Reference<
@@ -1076,11 +1088,10 @@ 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;
+ // Deprecated - can use SetAccessibleRelationLabelFor/By nowadys
virtual Window* GetParentLabelFor( const Window* pLabel ) const;
virtual Window* GetParentLabeledBy( const Window* pLabeled ) const;
KeyEvent GetActivationKey() const;
@@ -1104,8 +1115,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..863b84131a79 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_uLong 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/inc/vcl/xconnection.hxx b/vcl/inc/vcl/xconnection.hxx
index aa9d37430ea6..d43e02941cb3 100644
--- a/vcl/inc/vcl/xconnection.hxx
+++ b/vcl/inc/vcl/xconnection.hxx
@@ -28,11 +28,12 @@
#ifndef _VCL_XCONNECTION_HXX
#define _VCL_XCONNECTION_HXX
-#include <com/sun/star/awt/XDisplayConnection.hpp>
-#include <cppuhelper/implbase1.hxx>
#include <osl/mutex.hxx>
+#include <rtl/ref.hxx>
#include <com/sun/star/uno/Reference.hxx>
+#include "vcl/displayconnectiondispatch.hxx"
+
#ifndef _STLP_LIST
#include <list>
#endif
@@ -40,7 +41,7 @@
namespace vcl {
class DisplayConnection :
- public ::cppu::WeakImplHelper1< ::com::sun::star::awt::XDisplayConnection >
+ public DisplayConnectionDispatch
{
::osl::Mutex m_aMutex;
::std::list< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XEventHandler > >
@@ -52,9 +53,11 @@ namespace vcl {
DisplayConnection();
virtual ~DisplayConnection();
- static bool dispatchEvent( void* pThis, void* pData, int nBytes );
- static bool dispatchErrorEvent( void* pThis, void* pData, int nBytes );
- void dispatchDowningEvent();
+ void start();
+ void terminate();
+
+ virtual bool dispatchEvent( void* pData, int nBytes );
+ virtual bool dispatchErrorEvent( void* pData, int nBytes );
// XDisplayConnection
virtual void SAL_CALL addEventHandler( const ::com::sun::star::uno::Any& window, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XEventHandler >& handler, sal_Int32 eventMask ) throw();
diff --git a/vcl/os2/inc/salgdi.h b/vcl/os2/inc/salgdi.h
index 94b2b98b4183..1c9b66d89a0b 100644
--- a/vcl/os2/inc/salgdi.h
+++ b/vcl/os2/inc/salgdi.h
@@ -151,8 +151,6 @@ public:
virtual ~Os2SalGraphics();
protected:
- virtual 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 );
@@ -226,11 +224,7 @@ public:
// set the clip region to empty
virtual void ResetClipRegion();
- // begin setting the clip region, add rectangles to the
- // region with the UnionClipRegion call
- virtual void BeginSetClipRegion( ULONG nCount );
- // all rectangles were added and the clip region should be set now
- virtual void EndSetClipRegion();
+ virtual bool setClipRegion( const Region& );
// set the line color to transparent (= don't draw lines)
virtual void SetLineColor();
diff --git a/vcl/os2/source/gdi/salgdi.cxx b/vcl/os2/source/gdi/salgdi.cxx
index dff1557170fb..069abb1026e3 100644
--- a/vcl/os2/source/gdi/salgdi.cxx
+++ b/vcl/os2/source/gdi/salgdi.cxx
@@ -38,6 +38,7 @@
#ifndef _RTL_STRINGBUF_HXX
#include <rtl/strbuf.hxx>
#endif
+#include "vcl/region.h"
#ifndef __H_FT2LIB
#include <wingdi.h>
@@ -217,38 +218,29 @@ void Os2SalGraphics::ResetClipRegion()
// -----------------------------------------------------------------------
-void Os2SalGraphics::BeginSetClipRegion( ULONG nCount )
+bool Os2SalGraphics::setClipRegion( const Region& i_rClip )
{
+ ULONG nCount = i_rClip.GetRectCount();
+
mpClipRectlAry = new RECTL[ nCount ];
mnClipElementCount = 0;
-}
-
-// -----------------------------------------------------------------------
-BOOL Os2SalGraphics::unionClipRegion( long nX, long nY, long nWidth, long nHeight )
-{
- RECTL* pClipRect = &mpClipRectlAry[ mnClipElementCount ];
- pClipRect->xLeft = nX;
- pClipRect->yTop = mnHeight - nY;
- pClipRect->xRight = nX + nWidth;
- pClipRect->yBottom = mnHeight - (nY + nHeight);
- mnClipElementCount++;
-
- return TRUE;
-}
-
-// -----------------------------------------------------------------------
-
-bool Os2SalGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& )
-{
- // TODO: implement and advertise OutDevSupport_B2DClip support
- return false;
-}
-
-// -----------------------------------------------------------------------
-
-void Os2SalGraphics::EndSetClipRegion()
-{
+ ImplRegionInfo aInfo;
+ long nX, nY, nW, nH;
+ bool bRegionRect = i_rClip.ImplGetFirstRect(aInfo, nX, nY, nW, nH );
+ while( bRegionRect )
+ {
+ if ( nW && nH )
+ {
+ RECTL* pClipRect = &mpClipRectlAry[ mnClipElementCount ];
+ pClipRect->xLeft = nX;
+ pClipRect->yTop = mnHeight - nY;
+ pClipRect->xRight = nX + nW;
+ pClipRect->yBottom = mnHeight - (nY + nH);
+ mnClipElementCount++;
+ }
+ bRegionRect = i_rClip.ImplGetNextRect( aInfo, nX, nY, nW, nH );
+ }
#ifdef SAL_PRINTER_CLIPPATH
if ( mbPrinter )
{
@@ -287,6 +279,8 @@ void Os2SalGraphics::EndSetClipRegion()
}
delete [] mpClipRectlAry;
+
+ return true;
}
// -----------------------------------------------------------------------
diff --git a/vcl/prj/build.lst b/vcl/prj/build.lst
index af15ad73e19d..d8426a092093 100644
--- a/vcl/prj/build.lst
+++ b/vcl/prj/build.lst
@@ -1,4 +1,4 @@
-vc vcl : l10n apple_remote BOOST:boost rsc sot ucbhelper unotools ICU:icu GRAPHITE:graphite i18npool i18nutil unoil ridljar X11_EXTENSIONS:x11_extensions offuh basegfx basebmp tools l10ntools icc SO:print_header cpputools shell svl LIBXSLT:libxslt NULL
+vc vcl : L10N:l10n apple_remote BOOST:boost rsc sot ucbhelper unotools ICU:icu GRAPHITE:graphite i18npool i18nutil unoil ridljar X11_EXTENSIONS:x11_extensions offuh basegfx basebmp tools l10ntools icc SO:print_header cpputools shell svl LIBXSLT:libxslt NULL
vc vcl usr1 - all vc_mkout NULL
vc vcl\inc nmake - all vc_inc NULL
vc vcl\source\glyphs nmake - all vc_glyphs vc_inc NULL
diff --git a/vcl/prj/d.lst b/vcl/prj/d.lst
index 307064f7555d..5a7dd7d9ef91 100644
--- a/vcl/prj/d.lst
+++ b/vcl/prj/d.lst
@@ -12,6 +12,8 @@ mkdir: %_DEST%\inc%_EXT%\vcl
..\%__SRC%\misc\vcl?????.map %_DEST%\bin%_EXT%\vcl?????.map
..\%__SRC%\obj\salmain.obj %_DEST%\lib%_EXT%\salmain.obj
..\%__SRC%\obj\salmain.o %_DEST%\lib%_EXT%\salmain.o
+..\%__SRC%\lib\libvclmain.a %_DEST%\lib%_EXT%\libvclmain.a
+..\%__SRC%\lib\vclmain.lib %_DEST%\lib%_EXT%\vclmain.lib
..\inc\vcl\accel.hxx %_DEST%\inc%_EXT%\vcl\accel.hxx
..\inc\vcl\alpha.hxx %_DEST%\inc%_EXT%\vcl\alpha.hxx
@@ -56,6 +58,7 @@ mkdir: %_DEST%\inc%_EXT%\vcl
..\inc\vcl\image.hxx %_DEST%\inc%_EXT%\vcl\image.hxx
..\inc\vcl\imagerepository.hxx %_DEST%\inc%_EXT%\vcl\imagerepository.hxx
..\inc\vcl\imgctrl.hxx %_DEST%\inc%_EXT%\vcl\imgctrl.hxx
+..\inc\vcl\throbber.hxx %_DEST%\inc%_EXT%\vcl\throbber.hxx
..\inc\vcl\impdel.hxx %_DEST%\inc%_EXT%\vcl\impdel.hxx
..\inc\vcl\inputctx.hxx %_DEST%\inc%_EXT%\vcl\inputctx.hxx
..\inc\vcl\javachild.hxx %_DEST%\inc%_EXT%\vcl\javachild.hxx
diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx
index b48db1d6ee97..a50c8aeec149 100644
--- a/vcl/source/app/dbggui.cxx
+++ b/vcl/source/app/dbggui.cxx
@@ -411,7 +411,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",
@@ -419,7 +419,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",
@@ -451,19 +451,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_uLong 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 )
@@ -475,9 +475,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 );
@@ -501,14 +501,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 );
};
// -----------------
@@ -520,10 +520,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 );
};
@@ -582,7 +582,7 @@ private:
CancelButton maCancelButton;
PushButton maInfoButton;
HelpButton maHelpButton;
- USHORT mnErrorOff;
+ sal_uInt16 mnErrorOff;
public:
DbgDialog();
@@ -621,7 +621,7 @@ DbgWindow::DbgWindow() :
// -----------------------------------------------------------------------
-BOOL DbgWindow::Close()
+sal_Bool DbgWindow::Close()
{
// remember window position
ByteString aState( GetWindowState() );
@@ -636,7 +636,7 @@ BOOL DbgWindow::Close()
delete this;
ImplGetSVData()->maWinData.mpDbgWin = NULL;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -648,7 +648,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 )
@@ -657,7 +657,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 )
{
@@ -689,12 +689,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
@@ -723,23 +723,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 );
@@ -802,7 +802,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 );
}
@@ -811,7 +811,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 );
}
@@ -820,7 +820,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 );
}
@@ -829,7 +829,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 );
}
@@ -838,7 +838,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 );
}
@@ -854,7 +854,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 );
}
@@ -863,7 +863,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 );
}
@@ -872,7 +872,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 );
}
@@ -881,7 +881,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 );
}
@@ -890,7 +890,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 );
}
@@ -899,7 +899,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 );
}
@@ -908,7 +908,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 );
}
@@ -917,7 +917,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 );
}
@@ -926,7 +926,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 );
}
@@ -942,7 +942,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 );
}
@@ -951,7 +951,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 );
}
@@ -960,7 +960,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 );
}
@@ -969,7 +969,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();
@@ -994,7 +994,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 );
}
@@ -1003,7 +1003,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 ) );
}
@@ -1206,8 +1206,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;
@@ -1301,7 +1301,7 @@ IMPL_LINK( DbgDialog, ClickHdl, Button*, pButton )
) ) );
aBox.Execute();
}
- EndDialog( TRUE );
+ EndDialog( sal_True );
}
else if ( pButton == &maInfoButton )
{
@@ -1324,7 +1324,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 )
@@ -1340,7 +1340,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 )
@@ -1367,12 +1367,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 );
@@ -1380,8 +1380,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 )
@@ -1411,15 +1411,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;
@@ -1433,9 +1433,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 )
{
@@ -1443,11 +1443,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 );
@@ -1462,7 +1462,7 @@ void DbgDialogTest( Window* pWindow )
}
}
- USHORT i = 0;
+ sal_uInt16 i = 0;
pGetChild = pWindow->GetWindow( WINDOW_FIRSTCHILD );
while ( pGetChild )
{
@@ -1474,7 +1474,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 )
{
@@ -1495,7 +1495,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;
}
}
}
@@ -1648,66 +1648,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 )
{
@@ -1761,7 +1761,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] ) )
@@ -1839,8 +1839,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 );
@@ -1859,7 +1859,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 );
@@ -1945,12 +1945,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;
@@ -1959,7 +1959,7 @@ void DbgPrintWindow( const char* pLine )
if ( aPrinter.didTimeout() )
DbgPrintShell( pLine );
- bIn = FALSE;
+ bIn = sal_False;
}
// =======================================================================
@@ -2002,7 +2002,7 @@ void DbgGUIStart()
{
DbgDialog* pDialog = new DbgDialog;
// Fuer den Debug-Dialog schalten wir Dialogtests aus
- ULONG nOldFlags = pData->nTestFlags;
+ sal_uLong nOldFlags = pData->nTestFlags;
pData->nTestFlags &= ~DBG_TEST_DIALOG;
if ( !pDialog->Execute() )
pData->nTestFlags |= (nOldFlags & DBG_TEST_DIALOG);
@@ -2017,7 +2017,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 2c7ad2fa9c3e..13fb2d3c0893 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -36,6 +36,7 @@
#include "vcl/help.hxx"
#include "vcl/helpwin.hxx"
#include "tools/debug.hxx"
+#include "tools/diagnose_ex.h"
#include "tools/time.hxx"
// =======================================================================
@@ -68,14 +69,14 @@ void Help::OpenHelpAgent( const rtl::OString& )
// -----------------------------------------------------------------------
-BOOL Help::Start( const XubString&, const Window* )
+sal_Bool Help::Start( const XubString&, const Window* )
{
- return FALSE;
+ return sal_False;
}
-BOOL Help::SearchKeyword( const XubString& )
+sal_Bool Help::SearchKeyword( const XubString& )
{
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -89,26 +90,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();
@@ -120,74 +121,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;
}
@@ -196,101 +197,115 @@ 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& rScreenRect,
+ const XubString& rText, sal_uInt16 nStyle )
{
- USHORT nHelpWinStyle = HELPWINSTYLE_QUICK;
+ sal_uInt16 nHelpWinStyle = ( ( nStyle & QUICKHELP_TIP_STYLE_BALLOON ) != 0 ) ? HELPWINSTYLE_BALLOON : HELPWINSTYLE_QUICK;
HelpTextWindow* pHelpWin = new HelpTextWindow( pParent, rText, nHelpWinStyle, nStyle );
+ sal_uIntPtr nId = reinterpret_cast< sal_uIntPtr >( pHelpWin );
+ UpdateTip( nId, pParent, rScreenRect, rText );
+
+ pHelpWin->ShowHelp( HELPDELAY_NONE );
+ return nId;
+}
+
+// -----------------------------------------------------------------------
+
+void Help::UpdateTip( sal_uIntPtr nId, Window* pParent, const Rectangle& rScreenRect, const XubString& rText )
+{
+ HelpTextWindow* pHelpWin = reinterpret_cast< HelpTextWindow* >( nId );
+ ENSURE_OR_RETURN_VOID( pHelpWin != NULL, "Help::UpdateTip: invalid ID!" );
+
Size aSz = pHelpWin->CalcOutSize();
pHelpWin->SetOutputSizePixel( aSz );
- ImplSetHelpWindowPos( pHelpWin, nHelpWinStyle, nStyle,
- pParent->OutputToScreenPixel( pParent->GetPointerPosPixel() ), &rRect );
- pHelpWin->ShowHelp( HELPDELAY_NONE );
- return (ULONG)pHelpWin;
+ ImplSetHelpWindowPos( pHelpWin, pHelpWin->GetWinStyle(), pHelpWin->GetStyle(),
+ pParent->OutputToScreenPixel( pParent->GetPointerPosPixel() ), &rScreenRect );
+
+ pHelpWin->SetHelpText( rText );
}
// -----------------------------------------------------------------------
-void Help::HideTip( ULONG nId )
+void Help::HideTip( sal_uLong nId )
{
HelpTextWindow* pHelpWin = (HelpTextWindow*)nId;
Window* pFrameWindow = pHelpWin->ImplGetFrameWindow();
@@ -304,13 +319,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
@@ -323,9 +338,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
@@ -338,7 +353,7 @@ HelpTextWindow::HelpTextWindow( Window* pParent, const XubString& rText, USHORT
if( mnStyle & QUICKHELP_BIDI_RTL )
{
- ULONG nLayoutMode = GetLayoutMode();
+ sal_uLong nLayoutMode = GetLayoutMode();
nLayoutMode |= TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_TEXTORIGIN_LEFT;
SetLayoutMode( nLayoutMode );
}
@@ -347,7 +362,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 ) );
@@ -390,13 +405,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;
@@ -423,7 +438,7 @@ void HelpTextWindow::ImplShow()
ImplSVData* pSVData = ImplGetSVData();
pSVData->mpApp->ShowHelpStatusText( maStatusText );
}
- Show( TRUE, SHOW_NOACTIVATE );
+ Show( sal_True, SHOW_NOACTIVATE );
if( !aDogTag.IsDelete() )
Update();
}
@@ -453,7 +468,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;
@@ -479,9 +494,9 @@ void HelpTextWindow::Paint( const Rectangle& )
// -----------------------------------------------------------------------
-void HelpTextWindow::ShowHelp( USHORT nDelayMode )
+void HelpTextWindow::ShowHelp( sal_uInt16 nDelayMode )
{
- ULONG nTimeout = 0;
+ sal_uLong nTimeout = 0;
if ( nDelayMode != HELPDELAY_NONE )
{
// Im ExtendedHelp-Fall die Hilfe schneller anzeigen
@@ -562,9 +577,9 @@ String HelpTextWindow::GetText() const
// -----------------------------------------------------------------------
-BOOL HelpTextWindow::RegisterAccessibleParent()
+sal_Bool HelpTextWindow::RegisterAccessibleParent()
{
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -575,7 +590,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 )
{
@@ -585,15 +600,19 @@ 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 ?!" );
- if ( (( pHelpWin->GetHelpText() != rHelpText ) ||
- ( pHelpWin->GetWinStyle() != nHelpWinStyle ) ||
- ( pHelpArea && ( pHelpWin->GetHelpArea() != *pHelpArea ) ) )
- && pSVData->maHelpData.mbRequestingHelp )
+ if ( ( ( pHelpWin->GetHelpText() != rHelpText )
+ || ( pHelpWin->GetWinStyle() != nHelpWinStyle )
+ || ( pHelpArea
+ && ( pHelpWin->GetHelpArea() != *pHelpArea )
+ )
+ )
+ && pSVData->maHelpData.mbRequestingHelp
+ )
{
// remove help window if no HelpText or other HelpText or
// other help mode. but keep it if we are scrolling, ie not requesting help
@@ -605,8 +624,8 @@ void ImplShowHelpWindow( Window* pParent, USHORT nHelpWinStyle, USHORT nStyle,
}
else
{
- bool bTextChanged = rHelpText != pHelpWin->GetHelpText();
- if( bTextChanged )
+ bool const bTextChanged = rHelpText != pHelpWin->GetHelpText();
+ if ( bTextChanged || ( ( nStyle & QUICKHELP_FORCE_REPOSITION ) != 0 ) )
{
Window * pWindow = pHelpWin->GetParent()->ImplGetFrameWindow();
Rectangle aInvRect( pHelpWin->GetWindowExtentsRelative( pWindow ) );
@@ -624,8 +643,10 @@ void ImplShowHelpWindow( Window* pParent, USHORT nHelpWinStyle, USHORT nStyle,
if ( !pHelpWin && rHelpText.Len() )
{
- ULONG nCurTime = Time::GetSystemTicks();
- if( (nCurTime - pSVData->maHelpData.mnLastHelpHideTime) < pParent->GetSettings().GetHelpSettings().GetTipDelay() )
+ sal_uLong nCurTime = Time::GetSystemTicks();
+ if ( ( ( nCurTime - pSVData->maHelpData.mnLastHelpHideTime ) < pParent->GetSettings().GetHelpSettings().GetTipDelay() )
+ || ( ( nStyle & QUICKHELP_NO_DELAY ) != 0 )
+ )
nDelayMode = HELPDELAY_NONE;
DBG_ASSERT( !pHelpWin, "Noch ein HelpWin ?!" );
@@ -660,7 +681,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 )
@@ -670,7 +691,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..42e4cf09fdb0 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_uLong 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 73eaa8f965d2..8ee732acf981 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -73,7 +73,7 @@ void SalInstance::FillFontPathList( std::list< rtl::OString >& )
// do nothing
}
-SalMenu* SalInstance::CreateMenu( BOOL, Menu* )
+SalMenu* SalInstance::CreateMenu( sal_Bool, Menu* )
{
// default: no native menus
return NULL;
@@ -116,10 +116,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()
@@ -138,7 +138,7 @@ SalMenu::~SalMenu()
{
}
-bool SalMenu::ShowNativePopupMenu(FloatingWindow *, const Rectangle&, ULONG )
+bool SalMenu::ShowNativePopupMenu(FloatingWindow *, const Rectangle&, sal_uLong )
{
return false;
}
@@ -148,11 +148,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..c8d55d109134 100644
--- a/vcl/source/app/session.cxx
+++ b/vcl/source/app/session.cxx
@@ -39,6 +39,12 @@
#include <list>
+namespace {
+
+namespace css = com::sun::star;
+
+}
+
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::frame;
@@ -52,12 +58,12 @@ class VCLSession : public cppu::WeakComponentImplHelper1 < XSessionManagerClient
{
struct Listener
{
- Reference< XSessionManagerListener > m_xListener;
+ css::uno::Reference< XSessionManagerListener > m_xListener;
bool m_bInteractionRequested;
bool m_bInteractionDone;
bool m_bSaveDone;
- Listener( const Reference< XSessionManagerListener >& xListener )
+ Listener( const css::uno::Reference< XSessionManagerListener >& xListener )
: m_xListener( xListener ),
m_bInteractionRequested( false ),
m_bInteractionDone( false ),
@@ -84,11 +90,11 @@ public:
VCLSession();
virtual ~VCLSession();
- virtual void SAL_CALL addSessionManagerListener( const Reference< XSessionManagerListener >& xListener ) throw( RuntimeException );
- virtual void SAL_CALL removeSessionManagerListener( const Reference< XSessionManagerListener>& xListener ) throw( RuntimeException );
- virtual void SAL_CALL queryInteraction( const Reference< XSessionManagerListener >& xListener ) throw( RuntimeException );
- virtual void SAL_CALL interactionDone( const Reference< XSessionManagerListener >& xListener ) throw( RuntimeException );
- virtual void SAL_CALL saveDone( const Reference< XSessionManagerListener >& xListener ) throw( RuntimeException );
+ virtual void SAL_CALL addSessionManagerListener( const css::uno::Reference< XSessionManagerListener >& xListener ) throw( RuntimeException );
+ virtual void SAL_CALL removeSessionManagerListener( const css::uno::Reference< XSessionManagerListener>& xListener ) throw( RuntimeException );
+ virtual void SAL_CALL queryInteraction( const css::uno::Reference< XSessionManagerListener >& xListener ) throw( RuntimeException );
+ virtual void SAL_CALL interactionDone( const css::uno::Reference< XSessionManagerListener >& xListener ) throw( RuntimeException );
+ virtual void SAL_CALL saveDone( const css::uno::Reference< XSessionManagerListener >& xListener ) throw( RuntimeException );
virtual sal_Bool SAL_CALL cancelShutdown() throw( RuntimeException );
};
@@ -146,7 +152,7 @@ void VCLSession::callSaveRequested( bool bShutdown, bool bCancelable )
}
}
- ULONG nAcquireCount = Application::ReleaseSolarMutex();
+ sal_uLong 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 +180,7 @@ void VCLSession::callInteractionGranted( bool bInteractionGranted )
}
}
- ULONG nAcquireCount = Application::ReleaseSolarMutex();
+ sal_uLong nAcquireCount = Application::ReleaseSolarMutex();
for( std::list< Listener >::const_iterator it = aListeners.begin(); it != aListeners.end(); ++it )
it->m_xListener->approveInteraction( bInteractionGranted );
@@ -192,7 +198,7 @@ void VCLSession::callShutdownCancelled()
m_bInteractionRequested = m_bInteractionDone = m_bInteractionGranted = false;
}
- ULONG nAcquireCount = Application::ReleaseSolarMutex();
+ sal_uLong nAcquireCount = Application::ReleaseSolarMutex();
for( std::list< Listener >::const_iterator it = aListeners.begin(); it != aListeners.end(); ++it )
it->m_xListener->shutdownCanceled();
Application::AcquireSolarMutex( nAcquireCount );
@@ -209,10 +215,10 @@ void VCLSession::callQuit()
m_bInteractionRequested = m_bInteractionDone = m_bInteractionGranted = false;
}
- ULONG nAcquireCount = Application::ReleaseSolarMutex();
+ sal_uLong nAcquireCount = Application::ReleaseSolarMutex();
for( std::list< Listener >::const_iterator it = aListeners.begin(); it != aListeners.end(); ++it )
{
- Reference< XSessionManagerListener2 > xListener2( it->m_xListener, UNO_QUERY );
+ css::uno::Reference< XSessionManagerListener2 > xListener2( it->m_xListener, UNO_QUERY );
if( xListener2.is() )
xListener2->doQuit();
}
@@ -244,14 +250,14 @@ void VCLSession::SalSessionEventProc( SalSessionEvent* pEvent )
}
}
-void SAL_CALL VCLSession::addSessionManagerListener( const Reference<XSessionManagerListener>& xListener ) throw( RuntimeException )
+void SAL_CALL VCLSession::addSessionManagerListener( const css::uno::Reference<XSessionManagerListener>& xListener ) throw( RuntimeException )
{
osl::MutexGuard aGuard( m_aMutex );
m_aListeners.push_back( Listener( xListener ) );
}
-void SAL_CALL VCLSession::removeSessionManagerListener( const Reference<XSessionManagerListener>& xListener ) throw( RuntimeException )
+void SAL_CALL VCLSession::removeSessionManagerListener( const css::uno::Reference<XSessionManagerListener>& xListener ) throw( RuntimeException )
{
osl::MutexGuard aGuard( m_aMutex );
@@ -268,7 +274,7 @@ void SAL_CALL VCLSession::removeSessionManagerListener( const Reference<XSession
}
}
-void SAL_CALL VCLSession::queryInteraction( const Reference<XSessionManagerListener>& xListener ) throw( RuntimeException )
+void SAL_CALL VCLSession::queryInteraction( const css::uno::Reference<XSessionManagerListener>& xListener ) throw( RuntimeException )
{
if( m_bInteractionGranted )
{
@@ -295,7 +301,7 @@ void SAL_CALL VCLSession::queryInteraction( const Reference<XSessionManagerListe
}
}
-void SAL_CALL VCLSession::interactionDone( const Reference< XSessionManagerListener >& xListener ) throw( RuntimeException )
+void SAL_CALL VCLSession::interactionDone( const css::uno::Reference< XSessionManagerListener >& xListener ) throw( RuntimeException )
{
osl::MutexGuard aGuard( m_aMutex );
int nRequested = 0, nDone = 0;
@@ -318,7 +324,7 @@ void SAL_CALL VCLSession::interactionDone( const Reference< XSessionManagerListe
}
}
-void SAL_CALL VCLSession::saveDone( const Reference< XSessionManagerListener >& xListener ) throw( RuntimeException )
+void SAL_CALL VCLSession::saveDone( const css::uno::Reference< XSessionManagerListener >& xListener ) throw( RuntimeException )
{
osl::MutexGuard aGuard( m_aMutex );
@@ -359,11 +365,11 @@ Sequence< rtl::OUString > SAL_CALL vcl_session_getSupportedServiceNames()
return aRet;
}
-Reference< XInterface > SAL_CALL vcl_session_createInstance( const Reference< XMultiServiceFactory > & /*xMultiServiceFactory*/ )
+css::uno::Reference< XInterface > SAL_CALL vcl_session_createInstance( const css::uno::Reference< XMultiServiceFactory > & /*xMultiServiceFactory*/ )
{
ImplSVData* pSVData = ImplGetSVData();
if( ! pSVData->xSMClient.is() )
pSVData->xSMClient = new VCLSession();
- return Reference< XInterface >(pSVData->xSMClient, UNO_QUERY );
+ return css::uno::Reference< XInterface >(pSVData->xSMClient, UNO_QUERY );
}
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index dbc792039f80..480817f26b37 100644
--- 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;
}
// =======================================================================
@@ -618,8 +618,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 );
@@ -669,13 +669,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_uLong nRed = mpData->maLightColor.GetRed();
+ sal_uLong nGreen = mpData->maLightColor.GetGreen();
+ sal_uLong nBlue = mpData->maLightColor.GetBlue();
+ nRed += (sal_uLong)(mpData->maShadowColor.GetRed());
+ nGreen += (sal_uLong)(mpData->maShadowColor.GetGreen());
+ nBlue += (sal_uLong)(mpData->maShadowColor.GetBlue());
+ mpData->maCheckedColor = Color( (sal_uInt8)(nRed/2), (sal_uInt8)(nGreen/2), (sal_uInt8)(nBlue/2) );
}
else
{
@@ -687,7 +687,7 @@ void StyleSettings::Set3DColors( const Color& rColor )
// -----------------------------------------------------------------------
-::rtl::OUString StyleSettings::ImplSymbolsStyleToName( ULONG nStyle ) const
+::rtl::OUString StyleSettings::ImplSymbolsStyleToName( sal_uLong nStyle ) const
{
switch ( nStyle )
{
@@ -705,7 +705,7 @@ void StyleSettings::Set3DColors( const Color& rColor )
// -----------------------------------------------------------------------
-ULONG StyleSettings::ImplNameToSymbolsStyle( const ::rtl::OUString &rName ) const
+sal_uLong StyleSettings::ImplNameToSymbolsStyle( const ::rtl::OUString &rName ) const
{
if ( rName == ::rtl::OUString::createFromAscii( "default" ) )
return STYLE_SYMBOLS_DEFAULT;
@@ -747,22 +747,22 @@ void StyleSettings::SetPreferredSymbolsStyleName( const ::rtl::OUString &rName )
// -----------------------------------------------------------------------
-ULONG StyleSettings::GetCurrentSymbolsStyle() const
+sal_uLong StyleSettings::GetCurrentSymbolsStyle() const
{
// style selected in Tools -> Options... -> OpenOffice.org -> View
- ULONG nStyle = GetSymbolsStyle();
+ sal_uLong 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_uLong 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_uLong snFallbackDesktopStyle = STYLE_SYMBOLS_DEFAULT;
if ( !sbFallbackDesktopChecked )
{
@@ -784,10 +784,10 @@ ULONG StyleSettings::GetCurrentSymbolsStyle() const
// -----------------------------------------------------------------------
-ULONG StyleSettings::GetAutoSymbolsStyle() const
+sal_uLong StyleSettings::GetAutoSymbolsStyle() const
{
const ::rtl::OUString& rDesktopEnvironment = Application::GetDesktopEnvironment();
- ULONG nRet = STYLE_SYMBOLS_DEFAULT;
+ sal_uLong nRet = STYLE_SYMBOLS_DEFAULT;
bool bCont = true;
try
@@ -817,9 +817,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_uLong n = 0 ; n <= STYLE_SYMBOLS_THEMES_MAX ; n++ )
{
- ULONG nStyleToCheck = n;
+ sal_uLong nStyleToCheck = n;
// auto is not a real theme => can't be fallback
if ( nStyleToCheck == STYLE_SYMBOLS_AUTO )
@@ -844,7 +844,7 @@ ULONG StyleSettings::GetAutoSymbolsStyle() const
// -----------------------------------------------------------------------
-bool StyleSettings::CheckSymbolStyle( ULONG nStyle ) const
+bool StyleSettings::CheckSymbolStyle( sal_uLong nStyle ) const
{
static ImplImageTreeSingletonRef aImageTree;
return aImageTree->checkStyle( ImplSymbolsStyleToName( nStyle ) );
@@ -865,7 +865,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;
@@ -877,7 +877,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;
@@ -918,15 +918,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,
@@ -935,41 +935,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) &&
@@ -1060,9 +1060,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;
}
// =======================================================================
@@ -1070,10 +1070,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;
}
// -----------------------------------------------------------------------
@@ -1149,24 +1149,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()->
@@ -1175,15 +1175,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 ..
@@ -1194,7 +1194,7 @@ BOOL MiscSettings::GetEnableATToolSupport() const
&hkey) )
{
DWORD dwType;
- WIN_BYTE Data[6]; // possible values: "true", "false", "1", "0", DWORD
+ sal_uInt8 Data[6]; // possible values: "true", "false", "1", "0", DWORD
DWORD cbData = sizeof(Data);
if( ERROR_SUCCESS == RegQueryValueEx(hkey, "SupportAssistiveTechnology",
@@ -1206,7 +1206,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
@@ -1219,7 +1219,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 )
@@ -1236,12 +1236,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 )
{
@@ -1255,11 +1255,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;
@@ -1272,7 +1272,7 @@ void MiscSettings::SetEnableATToolSupport( BOOL bEnable )
&hkey) )
{
DWORD dwType;
- WIN_BYTE Data[6]; // possible values: "true", "false", 1, 0
+ sal_uInt8 Data[6]; // possible values: "true", "false", 1, 0
DWORD cbData = sizeof(Data);
if( ERROR_SUCCESS == RegQueryValueEx(hkey, "SupportAssistiveTechnology",
@@ -1283,7 +1283,7 @@ void MiscSettings::SetEnableATToolSupport( BOOL bEnable )
case REG_SZ:
RegSetValueEx(hkey, "SupportAssistiveTechnology",
NULL, dwType,
- bEnable ? (WIN_BYTE *) "true" : (WIN_BYTE *) "false",
+ bEnable ? (sal_uInt8 *) "true" : (sal_uInt8 *) "false",
bEnable ? sizeof("true") : sizeof("false"));
break;
case REG_DWORD:
@@ -1309,13 +1309,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;
}
@@ -1399,15 +1399,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;
}
// =======================================================================
@@ -1495,18 +1495,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;
}
// =======================================================================
@@ -1643,12 +1643,12 @@ void AllSettings::CopyData()
// -----------------------------------------------------------------------
-ULONG AllSettings::Update( ULONG nFlags, const AllSettings& rSet )
+sal_uLong AllSettings::Update( sal_uLong nFlags, const AllSettings& rSet )
{
DBG_CHKTHIS( AllSettings, NULL );
DBG_CHKOBJ( &rSet, AllSettings, NULL );
- ULONG nChangeFlags = 0;
+ sal_uLong nChangeFlags = 0;
if ( nFlags & SETTINGS_MACHINE )
{
@@ -1745,12 +1745,12 @@ ULONG AllSettings::Update( ULONG nFlags, const AllSettings& rSet )
// -----------------------------------------------------------------------
-ULONG AllSettings::GetChangeFlags( const AllSettings& rSet ) const
+sal_uLong AllSettings::GetChangeFlags( const AllSettings& rSet ) const
{
DBG_CHKTHIS( AllSettings, NULL );
DBG_CHKOBJ( &rSet, AllSettings, NULL );
- ULONG nChangeFlags = 0;
+ sal_uLong nChangeFlags = 0;
if ( mpData->maMachineSettings != rSet.mpData->maMachineSettings )
nChangeFlags |= SETTINGS_MACHINE;
@@ -1781,13 +1781,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) &&
@@ -1800,10 +1800,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;
}
// -----------------------------------------------------------------------
@@ -1869,7 +1869,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
@@ -1878,7 +1878,7 @@ BOOL AllSettings::GetLayoutRTL() const
if( pEnv )
return true;
- BOOL bRTL = FALSE;
+ sal_Bool bRTL = sal_False;
if( nUIMirroring == -1 )
{
@@ -1888,7 +1888,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 )
{
@@ -2024,7 +2024,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 dd1ea7c0469e..c61ddc0af6ae 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -81,12 +81,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;
@@ -183,16 +183,16 @@ struct ImplEventHook
struct ImplPostEventData
{
- ULONG mnEvent;
+ sal_uLong mnEvent;
const Window* mpWin;
- ULONG mnEventId;
+ sal_uLong mnEventId;
KeyEvent maKeyEvent;
MouseEvent maMouseEvent;
- ImplPostEventData( ULONG nEvent, const Window* pWin, const KeyEvent& rKeyEvent ) :
+ ImplPostEventData( sal_uLong 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_uLong nEvent, const Window* pWin, const MouseEvent& rMouseEvent ) :
mnEvent( nEvent ), mpWin( pWin ), mnEventId( 0 ), maMouseEvent( rMouseEvent ) {}
~ImplPostEventData() {}
@@ -241,7 +241,7 @@ void Application::InitAppRes( const ResId& )
// -----------------------------------------------------------------------
-BOOL Application::QueryExit()
+sal_Bool Application::QueryExit()
{
WorkWindow* pAppWin = ImplGetSVData()->maWinData.mpAppWin;
@@ -249,12 +249,12 @@ BOOL Application::QueryExit()
if ( pAppWin )
return pAppWin->Close();
else
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-void Application::UserEvent( ULONG, void* )
+void Application::UserEvent( sal_uLong, void* )
{
}
@@ -319,15 +319,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;
@@ -367,7 +367,7 @@ const XubString& Application::GetAppFileName()
// -----------------------------------------------------------------------
-USHORT Application::Exception( USHORT nError )
+sal_uInt16 Application::Exception( sal_uInt16 nError )
{
switch ( nError & EXC_MAJORTYPE )
{
@@ -409,12 +409,12 @@ void Application::Abort( const XubString& rErrorText )
// -----------------------------------------------------------------------
-ULONG Application::GetReservedKeyCodeCount()
+sal_uLong Application::GetReservedKeyCodeCount()
{
return ImplReservedKeys::get()->second;
}
-const KeyCode* Application::GetReservedKeyCode( ULONG i )
+const KeyCode* Application::GetReservedKeyCode( sal_uLong i )
{
if( i >= GetReservedKeyCodeCount() )
return NULL;
@@ -422,7 +422,7 @@ const KeyCode* Application::GetReservedKeyCode( ULONG i )
return &ImplReservedKeys::get()->first[i].mKeyCode;
}
-String Application::GetReservedKeyCodeDescription( ULONG i )
+String Application::GetReservedKeyCodeDescription( sal_uLong i )
{
ResMgr* pResMgr = ImplGetResMgr();
if( ! pResMgr )
@@ -441,12 +441,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();
}
@@ -508,7 +508,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;
}
@@ -536,7 +536,7 @@ vos::OThread::TThreadIdentifier Application::GetMainThreadIdentifier()
// -----------------------------------------------------------------------
-ULONG Application::ReleaseSolarMutex()
+sal_uLong Application::ReleaseSolarMutex()
{
ImplSVData* pSVData = ImplGetSVData();
return pSVData->mpDefInst->ReleaseYieldMutex();
@@ -544,7 +544,7 @@ ULONG Application::ReleaseSolarMutex()
// -----------------------------------------------------------------------
-void Application::AcquireSolarMutex( ULONG nCount )
+void Application::AcquireSolarMutex( sal_uLong nCount )
{
ImplSVData* pSVData = ImplGetSVData();
pSVData->mpDefInst->AcquireYieldMutex( nCount );
@@ -552,56 +552,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_uLong Application::GetLastInputInterval()
{
return (Time::GetSystemTicks()-ImplGetSVData()->maAppData.mnLastInputTime);
}
@@ -610,7 +610,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
@@ -619,37 +619,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;
}
// -----------------------------------------------------------------------
@@ -673,10 +673,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 );
}
}
@@ -718,7 +718,7 @@ void Application::SetSettings( const AllSettings& rSettings )
}
ResMgr::SetDefaultLocale( rSettings.GetUILocale() );
*pSVData->maAppData.mpSettings = rSettings;
- ULONG nChangeFlags = aOldSettings.GetChangeFlags( *pSVData->maAppData.mpSettings );
+ sal_uLong nChangeFlags = aOldSettings.GetChangeFlags( *pSVData->maAppData.mpSettings );
if ( nChangeFlags )
{
DataChangedEvent aDCEvt( DATACHANGED_SETTINGS, &aOldSettings, nChangeFlags );
@@ -749,7 +749,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 )
@@ -759,7 +759,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;
}
@@ -838,7 +838,7 @@ void Application::NotifyAllWindows( DataChangedEvent& rDCEvt )
// -----------------------------------------------------------------------
-void Application::ImplCallEventListeners( ULONG nEvent, Window *pWin, void* pData )
+void Application::ImplCallEventListeners( sal_uLong nEvent, Window *pWin, void* pData )
{
ImplSVData* pSVData = ImplGetSVData();
VclWindowEvent aEvent( pWin, nEvent, pData );
@@ -898,13 +898,13 @@ void Application::RemoveKeyListener( const Link& rKeyListener )
// -----------------------------------------------------------------------
-BOOL Application::HandleKey( ULONG nEvent, Window *pWin, KeyEvent* pKeyEvent )
+sal_Bool Application::HandleKey( sal_uLong 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() )
@@ -915,10 +915,10 @@ BOOL Application::HandleKey( ULONG nEvent, Window *pWin, KeyEvent* pKeyEvent )
// -----------------------------------------------------------------------------
-ULONG Application::PostKeyEvent( ULONG nEvent, Window *pWin, KeyEvent* pKeyEvent )
+sal_uLong Application::PostKeyEvent( sal_uLong nEvent, Window *pWin, KeyEvent* pKeyEvent )
{
const ::vos::OGuard aGuard( GetSolarMutex() );
- ULONG nEventId = 0;
+ sal_uLong nEventId = 0;
if( pWin && pKeyEvent )
{
@@ -942,10 +942,10 @@ ULONG Application::PostKeyEvent( ULONG nEvent, Window *pWin, KeyEvent* pKeyEvent
// -----------------------------------------------------------------------------
-ULONG Application::PostMouseEvent( ULONG nEvent, Window *pWin, MouseEvent* pMouseEvent )
+sal_uLong Application::PostMouseEvent( sal_uLong nEvent, Window *pWin, MouseEvent* pMouseEvent )
{
const ::vos::OGuard aGuard( GetSolarMutex() );
- ULONG nEventId = 0;
+ sal_uLong nEventId = 0;
if( pWin && pMouseEvent )
{
@@ -982,8 +982,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_uLong nEvent;
+ const sal_uLong nEventId = pData->mnEventId;
switch( pData->mnEvent )
{
@@ -1019,7 +1019,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() );
@@ -1064,7 +1064,7 @@ void Application::RemoveMouseAndKeyEvents( Window* pWin )
// -----------------------------------------------------------------------
-BOOL Application::IsProcessedMouseOrKeyEvent( ULONG nEventId )
+sal_Bool Application::IsProcessedMouseOrKeyEvent( sal_uLong nEventId )
{
const ::vos::OGuard aGuard( GetSolarMutex() );
@@ -1074,79 +1074,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_uLong Application::PostUserEvent( sal_uLong nEvent, void* pEventData )
{
- ULONG nEventId;
+ sal_uLong nEventId;
PostUserEvent( nEventId, nEvent, pEventData );
return nEventId;
}
// -----------------------------------------------------------------------
-ULONG Application::PostUserEvent( const Link& rLink, void* pCaller )
+sal_uLong Application::PostUserEvent( const Link& rLink, void* pCaller )
{
- ULONG nEventId;
+ sal_uLong nEventId;
PostUserEvent( nEventId, rLink, pCaller );
return nEventId;
}
// -----------------------------------------------------------------------
-BOOL Application::PostUserEvent( ULONG& rEventId, ULONG nEvent, void* pEventData )
+sal_Bool Application::PostUserEvent( sal_uLong& rEventId, sal_uLong 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_uLong)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_uLong& 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_uLong)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_uLong nUserEvent )
{
if(nUserEvent)
{
@@ -1164,13 +1164,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();
@@ -1452,7 +1452,7 @@ unsigned int Application::GetBestScreen( const Rectangle& i_rRect )
// -----------------------------------------------------------------------
-BOOL Application::InsertAccel( Accelerator* pAccel )
+sal_Bool Application::InsertAccel( Accelerator* pAccel )
{
ImplSVData* pSVData = ImplGetSVData();
@@ -1483,17 +1483,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;
}
// -----------------------------------------------------------------------
@@ -1512,21 +1512,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();
@@ -1537,7 +1537,7 @@ void Application::EnableAutoMnemonic( BOOL bEnabled )
// -----------------------------------------------------------------------
-BOOL Application::IsAutoMnemonicEnabled()
+sal_Bool Application::IsAutoMnemonicEnabled()
{
return GetSettings().GetStyleSettings().GetAutoMnemonic();
}
@@ -1575,7 +1575,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
{
@@ -1639,28 +1639,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;
}
@@ -1710,7 +1710,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;
@@ -1720,13 +1720,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 )
@@ -1739,7 +1739,7 @@ UnoWrapperBase* Application::GetUnoWrapper( BOOL bCreateIfNotExist )
}
}
DBG_ASSERT( pSVData->mpUnoWrapper, "UnoWrapper could not be created!" );
- bAlreadyTriedToCreate = TRUE;
+ bAlreadyTriedToCreate = sal_True;
}
return pSVData->mpUnoWrapper;
}
@@ -1760,9 +1760,12 @@ void Application::SetUnoWrapper( UnoWrapperBase* pWrapper )
ImplSVData* pSVData = ImplGetSVData();
if( !pSVData->mxDisplayConnection.is() )
+ {
pSVData->mxDisplayConnection.set( new ::vcl::DisplayConnection );
+ pSVData->mxDisplayConnection->start();
+ }
- return pSVData->mxDisplayConnection;
+ return pSVData->mxDisplayConnection.get();
}
// -----------------------------------------------------------------------
@@ -1781,7 +1784,7 @@ const Link& Application::GetFilterHdl()
// -----------------------------------------------------------------------
-BOOL ImplCallHotKey( const KeyCode& rKeyCode )
+sal_Bool ImplCallHotKey( const KeyCode& rKeyCode )
{
ImplSVData* pSVData = ImplGetSVData();
ImplHotKey* pHotKeyData = pSVData->maAppData.mpFirstHotKey;
@@ -1790,13 +1793,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;
}
// -----------------------------------------------------------------------
@@ -1818,7 +1821,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;
@@ -1827,12 +1830,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;
@@ -1876,7 +1879,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;
@@ -1884,12 +1887,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;
@@ -1957,14 +1960,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();
}
@@ -2025,14 +2028,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
@@ -2046,7 +2049,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 935d2c1894ea..b749fa78ea59 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -53,6 +53,7 @@
#include "vcl/salimestatus.hxx"
#include "vcl/salsys.hxx"
#include "vcl/svids.hrc"
+#include "vcl/xconnection.hxx"
#include "unotools/fontcfg.hxx"
@@ -71,6 +72,12 @@
#include <stdio.h>
+namespace {
+
+namespace css = com::sun::star;
+
+}
+
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::awt;
@@ -172,6 +179,8 @@ void ImplDeInitSVData()
delete pSVData->maCtrlData.mpFieldUnitStrings, pSVData->maCtrlData.mpFieldUnitStrings = NULL;
if( pSVData->maCtrlData.mpCleanUnitStrings )
delete pSVData->maCtrlData.mpCleanUnitStrings, pSVData->maCtrlData.mpCleanUnitStrings = NULL;
+ if( pSVData->mpPaperNames )
+ delete pSVData->mpPaperNames, pSVData->mpPaperNames = NULL;
}
// -----------------------------------------------------------------------
@@ -336,16 +345,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
@@ -362,12 +371,12 @@ bool ImplInitAccessBridge(BOOL bAllowCancel, BOOL &rCancelled)
ImplSVData* pSVData = ImplGetSVData();
if( ! pSVData->mxAccessBridge.is() )
{
- Reference< XMultiServiceFactory > xFactory(vcl::unohelper::GetMultiServiceFactory());
+ css::uno::Reference< XMultiServiceFactory > xFactory(vcl::unohelper::GetMultiServiceFactory());
if( xFactory.is() )
{
- Reference< XExtendedToolkit > xToolkit =
- Reference< XExtendedToolkit >(Application::GetVCLToolkit(), UNO_QUERY);
+ css::uno::Reference< XExtendedToolkit > xToolkit =
+ css::uno::Reference< XExtendedToolkit >(Application::GetVCLToolkit(), UNO_QUERY);
Sequence< Any > arguments(1);
arguments[0] = makeAny(xToolkit);
@@ -422,7 +431,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;
@@ -447,7 +456,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;
@@ -472,7 +481,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;
@@ -497,7 +506,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;
@@ -539,7 +548,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..c075e1b108f3 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -89,6 +89,12 @@
#include "rtl/strbuf.hxx"
#endif
+namespace {
+
+namespace css = com::sun::star;
+
+}
+
using namespace ::rtl;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
@@ -107,12 +113,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 +144,7 @@ public:
if ( nVCLException )
{
- bIn = TRUE;
+ bIn = sal_True;
::vos::OGuard aLock(&Application::GetSolarMutex());
@@ -147,12 +153,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 +168,7 @@ public:
}
// =======================================================================
-BOOL ImplSVMain()
+sal_Bool ImplSVMain()
{
// The 'real' SVMain()
RTL_LOGFILE_CONTEXT( aLog, "vcl (ss112471) ::SVMain" );
@@ -171,26 +177,22 @@ BOOL ImplSVMain()
DBG_ASSERT( pSVData->mpApp, "no instance of class Application" );
- Reference<XMultiServiceFactory> xMS;
+ css::uno::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() )
{
- vcl::DisplayConnection* pConnection =
- dynamic_cast<vcl::DisplayConnection*>(pSVData->mxDisplayConnection.get());
-
- if( pConnection )
- pConnection->dispatchDowningEvent();
+ pSVData->mxDisplayConnection->terminate();
pSVData->mxDisplayConnection.clear();
}
@@ -199,10 +201,10 @@ BOOL ImplSVMain()
// be some events in the AWT EventQueue, which need the SolarMutex which
// - on the other hand - is destroyed in DeInitVCL(). So empty the queue
// here ..
- Reference< XComponent > xComponent(pSVData->mxAccessBridge, UNO_QUERY);
+ css::uno::Reference< XComponent > xComponent(pSVData->mxAccessBridge, UNO_QUERY);
if( xComponent.is() )
{
- ULONG nCount = Application::ReleaseSolarMutex();
+ sal_uLong nCount = Application::ReleaseSolarMutex();
xComponent->dispose();
Application::AcquireSolarMutex(nCount);
pSVData->mxAccessBridge.clear();
@@ -212,12 +214,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 +267,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 +305,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 +329,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 +338,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..f31779f759c6 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_uLong)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_uLong mnUpdateTime; // Last Update Time
+ sal_uLong 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_uLong 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_uLong nMinPeriod = MAX_TIMER_PERIOD;
+ sal_uLong nDeltaTime;
+ sal_uLong 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_uLong 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_uLong 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..514d95032d6f 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_uLong 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_uLong 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..1ae5f7537ca6 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_uLong 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 82bec2214dff..5ffe94212d20 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -84,8 +84,8 @@ class ImplCommonButtonData
public:
Rectangle maFocusRect;
Rectangle maSymbolRect;
- USHORT mnButtonState;
- BOOL mbSmallSymbol;
+ sal_uInt16 mnButtonState;
+ sal_Bool mbSmallSymbol;
Image maImage;
Image maImageHC;
@@ -103,7 +103,7 @@ public:
ImplCommonButtonData::ImplCommonButtonData()
{
mnButtonState = 0;
- mbSmallSymbol = FALSE;
+ mbSmallSymbol = sal_False;
mpBitmapEx = NULL;
mpBitmapExHC = NULL;
@@ -191,12 +191,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;
@@ -210,7 +210,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 )
{
@@ -237,9 +237,9 @@ BOOL Button::SetModeImage( const Image& rImage, BmpColorMode eMode )
}
}
else
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -258,7 +258,7 @@ const Image Button::GetModeImage( BmpColorMode eMode ) const
}
// -----------------------------------------------------------------------
-BOOL Button::HasImage() const
+sal_Bool Button::HasImage() const
{
return !!(mpButtonData->maImage);
}
@@ -280,7 +280,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 ) )
{
@@ -295,11 +295,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;
}
// -----------------------------------------------------------------------
@@ -347,11 +347,11 @@ void Button::ImplSetSymbolRect( const Rectangle& i_rRect )
// -----------------------------------------------------------------------
-USHORT Button::ImplGetTextStyle( XubString& rText, WinBits nWinStyle,
- ULONG nDrawFlags )
+sal_uInt16 Button::ImplGetTextStyle( XubString& rText, WinBits nWinStyle,
+ sal_uLong 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 )
{
@@ -378,15 +378,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_uLong nImageSep, sal_uLong 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 )
@@ -646,7 +646,7 @@ void Button::ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos,
}
}
- USHORT nStyle = 0;
+ sal_uInt16 nStyle = 0;
if ( ! ( nDrawFlags & WINDOW_DRAW_NODISABLE ) &&
! IsEnabled() )
@@ -706,13 +706,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;
}
@@ -733,13 +733,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;
@@ -748,13 +748,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;
@@ -763,7 +763,7 @@ void Button::EnableTextDisplay( BOOL bEnable )
}
// -----------------------------------------------------------------------
-BOOL Button::IsTextDisplayEnabled()
+sal_Bool Button::IsTextDisplayEnabled()
{
return (mpButtonData->mnButtonState & BUTTON_DRAW_NOTEXT) == 0;
}
@@ -783,14 +783,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;
}
// -----------------------------------------------------------------------
@@ -803,7 +803,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 );
}
// -----------------------------------------------------------------------
@@ -844,8 +844,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 );
@@ -858,18 +858,18 @@ void PushButton::ImplInitSettings( BOOL bFont,
if ( IsNativeControlSupported( CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL ) ||
(GetStyle() & WB_FLATBUTTON) != 0 )
{
- 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 );
}
}
}
@@ -877,7 +877,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)) )
{
@@ -904,7 +904,7 @@ void PushButton::ImplDrawPushButtonFrame( Window* pDev,
// -----------------------------------------------------------------------
-BOOL PushButton::ImplHitTestPushButton( Window* pDev,
+sal_Bool PushButton::ImplHitTestPushButton( Window* pDev,
const Point& rPos )
{
Point aTempPoint;
@@ -915,11 +915,11 @@ BOOL PushButton::ImplHitTestPushButton( Window* pDev,
// -----------------------------------------------------------------------
-USHORT PushButton::ImplGetTextStyle( ULONG nDrawFlags ) const
+sal_uInt16 PushButton::ImplGetTextStyle( sal_uLong 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 ) )
@@ -954,7 +954,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();
@@ -980,7 +980,7 @@ static void ImplDrawBtnDropDownArrow( OutputDevice* pDev,
// -----------------------------------------------------------------------
-void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, ULONG nDrawFlags,
+void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, sal_uLong nDrawFlags,
const Rectangle& rRect,
bool bLayout,
bool bMenuBtnSep
@@ -990,8 +990,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();
@@ -1018,7 +1018,7 @@ void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, ULONG nDrawFlags
Size aSize = rRect.GetSize();
Point aPos = rRect.TopLeft();
- ULONG nImageSep = 1 + (pDev->GetTextHeight()-10)/2;
+ sal_uLong nImageSep = 1 + (pDev->GetTextHeight()-10)/2;
if( nImageSep < 1 )
nImageSep = 1;
if ( mnDDStyle == PUSHBUTTON_DROPDOWN_MENUBUTTON )
@@ -1070,7 +1070,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) )
@@ -1080,7 +1080,7 @@ void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, ULONG nDrawFlags
else
{
aArrowColor = Color( COL_LIGHTGREEN );
- bBlack = TRUE;
+ bBlack = sal_True;
}
}
@@ -1108,13 +1108,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 )
@@ -1144,7 +1144,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 ) )
{
@@ -1155,11 +1155,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 ) )
{
@@ -1194,7 +1194,7 @@ void PushButton::ImplDrawPushButton( bool bLayout )
if( ! bRollOver && ! HasFocus() )
bDrawMenuSep = false;
}
- if ( (bNativeOK=IsNativeControlSupported(CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL)) == TRUE )
+ if ( (bNativeOK=IsNativeControlSupported(CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL)) == sal_True )
{
PushButtonValue aControlValue;
Rectangle aCtrlRegion( aInRect );
@@ -1250,7 +1250,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) )
@@ -1281,14 +1281,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 )
{
Rectangle aBound, aCont;
Rectangle aCtrlRect( 0, 0, 80, 20 ); // use a constant size to avoid accumulating
@@ -1341,7 +1341,7 @@ void PushButton::ImplSetDefButton( BOOL bSet )
// -----------------------------------------------------------------------
-BOOL PushButton::ImplIsDefButton() const
+sal_Bool PushButton::ImplIsDefButton() const
{
return (ImplGetButtonState() & BUTTON_DRAW_DEFAULT) != 0;
}
@@ -1391,7 +1391,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 ) )
@@ -1424,11 +1424,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
@@ -1513,11 +1513,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();
}
@@ -1552,7 +1552,7 @@ void PushButton::Paint( const Rectangle& )
// -----------------------------------------------------------------------
void PushButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
- ULONG nFlags )
+ sal_uLong nFlags )
{
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
@@ -1584,7 +1584,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() )
@@ -1656,17 +1656,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();
}
}
@@ -1682,7 +1682,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();
}
}
@@ -1724,7 +1724,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) )
@@ -1787,7 +1787,7 @@ SymbolAlign PushButton::GetSymbolAlign() const
// -----------------------------------------------------------------------
-void PushButton::SetDropDown( USHORT nStyle )
+void PushButton::SetDropDown( sal_uInt16 nStyle )
{
if ( mnDDStyle != nStyle )
{
@@ -1823,7 +1823,7 @@ void PushButton::SetState( TriState eState )
// -----------------------------------------------------------------------
-void PushButton::SetPressed( BOOL bPressed )
+void PushButton::SetPressed( sal_Bool bPressed )
{
if ( mbPressed != bPressed )
{
@@ -1864,7 +1864,7 @@ Size PushButton::CalcMinimumSize( long nMaxWidth ) const
aSize = GetModeImage().GetSizePixel();
if ( PushButton::GetText().Len() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) )
{
- ULONG nDrawFlags = 0;
+ sal_uLong nDrawFlags = 0;
Size textSize = GetTextRect( Rectangle( Point(), Size( nMaxWidth ? nMaxWidth : 0x7fffffff, 0x7fffffff ) ),
PushButton::GetText(), ImplGetTextStyle( nDrawFlags ) ).GetSize();
aSize.Width() += int( textSize.Width () * 1.15 );
@@ -1937,7 +1937,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() )
{
@@ -2003,7 +2003,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() )
{
@@ -2077,10 +2077,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;
}
// -----------------------------------------------------------------------
@@ -2090,7 +2090,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 );
}
// -----------------------------------------------------------------------
@@ -2125,8 +2125,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 );
@@ -2136,18 +2136,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() );
@@ -2183,11 +2183,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 );
Rectangle aCtrlRect( maStateRect.TopLeft(), maStateRect.GetSize() );
@@ -2206,12 +2206,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 )
@@ -2230,7 +2230,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() );
@@ -2300,7 +2300,7 @@ if ( bNativeOK == FALSE )
// -----------------------------------------------------------------------
-void RadioButton::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
+void RadioButton::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
const Point& rPos, const Size& rSize,
const Size& rImageSize, Rectangle& rStateRect,
Rectangle& rMouseRect, bool bLayout )
@@ -2320,7 +2320,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 );
@@ -2394,7 +2394,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();
@@ -2456,7 +2456,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() );
@@ -2516,7 +2516,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 );
@@ -2547,7 +2547,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 );
@@ -2563,10 +2563,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;
@@ -2587,7 +2587,7 @@ void RadioButton::ImplCallClick( BOOL bGrabFocus, USHORT nFocusFlags )
if ( aDelData.IsDelete() )
return;
ImplRemoveDel( &aDelData );
- mbStateChanged = FALSE;
+ mbStateChanged = sal_False;
}
// -----------------------------------------------------------------------
@@ -2621,9 +2621,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 );
}
// -----------------------------------------------------------------------
@@ -2744,7 +2744,7 @@ void RadioButton::Paint( const Rectangle& )
// -----------------------------------------------------------------------
void RadioButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
- ULONG nFlags )
+ sal_uLong nFlags )
{
if ( !maImage )
{
@@ -2883,17 +2883,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();
}
}
@@ -2909,7 +2909,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();
}
}
@@ -2952,7 +2952,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 )
{
@@ -2971,9 +2971,9 @@ BOOL RadioButton::SetModeRadioImage( const Image& rImage, BmpColorMode eMode )
}
}
else
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -2988,7 +2988,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 )
@@ -3006,7 +3006,7 @@ void RadioButton::SetState( BOOL bCheck )
// -----------------------------------------------------------------------
-void RadioButton::Check( BOOL bCheck )
+void RadioButton::Check( sal_Bool bCheck )
{
// TabStop-Flag richtig mitfuehren
if ( bCheck )
@@ -3072,7 +3072,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];
@@ -3096,11 +3096,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 = 0;
+ sal_uInt16 nStyle = 0;
if ( rStyleSettings.GetOptions() & STYLE_OPTION_MONO )
nStyle = STYLE_RADIOBUTTON_MONO;
@@ -3142,7 +3142,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 )
@@ -3252,7 +3252,7 @@ void CheckBox::ImplInitCheckBoxData()
{
meState = STATE_NOCHECK;
meSaveValue = STATE_NOCHECK;
- mbTriState = FALSE;
+ mbTriState = sal_False;
}
// -----------------------------------------------------------------------
@@ -3262,7 +3262,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 );
}
// -----------------------------------------------------------------------
@@ -3292,8 +3292,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 );
@@ -3303,18 +3303,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() );
@@ -3332,10 +3332,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 );
}
}
@@ -3357,9 +3357,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 );
Rectangle aCtrlRegion( maStateRect );
@@ -3382,9 +3382,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 )
@@ -3401,7 +3401,7 @@ void CheckBox::ImplDrawCheckBoxState()
// -----------------------------------------------------------------------
-void CheckBox::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
+void CheckBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
const Point& rPos, const Size& rSize,
const Size& rImageSize, Rectangle& rStateRect,
Rectangle& rMouseRect, bool bLayout )
@@ -3416,7 +3416,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 );
@@ -3690,7 +3690,7 @@ void CheckBox::Paint( const Rectangle& )
// -----------------------------------------------------------------------
void CheckBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
- ULONG nFlags )
+ sal_uLong nFlags )
{
MapMode aResMapMode( MAP_100TH_MM );
Point aPos = pDev->LogicToPixel( rPos );
@@ -3880,17 +3880,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();
}
}
@@ -3906,7 +3906,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();
}
}
@@ -3964,7 +3964,7 @@ void CheckBox::SetState( TriState eState )
// -----------------------------------------------------------------------
-void CheckBox::EnableTriState( BOOL bTriState )
+void CheckBox::EnableTriState( sal_Bool bTriState )
{
if ( mbTriState != bTriState )
{
@@ -4014,11 +4014,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 = 0;
+ sal_uInt16 nStyle = 0;
if ( rStyleSettings.GetOptions() & STYLE_OPTION_MONO )
nStyle = STYLE_CHECKBOX_MONO;
@@ -4045,7 +4045,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 )
@@ -4173,7 +4173,7 @@ ImageButton::ImageButton( Window* pParent, WinBits nStyle ) :
ImageButton::ImageButton( Window* pParent, const ResId& rResId ) :
PushButton( pParent, rResId.SetRT( RSC_IMAGEBUTTON ) )
{
- ULONG nObjMask = ReadLongRes();
+ sal_uLong nObjMask = ReadLongRes();
if ( RSC_IMAGEBUTTON_IMAGE & nObjMask )
{
@@ -4222,7 +4222,7 @@ ImageRadioButton::ImageRadioButton( Window* pParent, WinBits nStyle ) :
ImageRadioButton::ImageRadioButton( Window* pParent, const ResId& rResId ) :
RadioButton( pParent, rResId.SetRT( RSC_IMAGERADIOBUTTON ) )
{
- ULONG nObjMask = ReadLongRes();
+ sal_uLong nObjMask = ReadLongRes();
if ( RSC_IMAGERADIOBUTTON_IMAGE & nObjMask )
{
@@ -4242,7 +4242,7 @@ ImageRadioButton::~ImageRadioButton()
TriStateBox::TriStateBox( Window* pParent, WinBits nStyle ) :
CheckBox( pParent, nStyle )
{
- EnableTriState( TRUE );
+ EnableTriState( sal_True );
}
// -----------------------------------------------------------------------
@@ -4250,15 +4250,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_uLong 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 );
}
// -----------------------------------------------------------------------
@@ -4327,7 +4327,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 5b2e8755e5c8..2fd0ade0f65d 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -47,7 +47,7 @@
// =======================================================================
-inline ULONG ImplCreateKey( USHORT nPos )
+inline sal_uLong 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.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_uLong 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_uLong)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 ) )
{
@@ -756,7 +756,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 )
{
@@ -811,7 +811,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:
@@ -823,11 +823,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;
}
@@ -858,14 +858,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()
@@ -922,12 +922,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 )
{
@@ -941,7 +941,7 @@ void ComboBox::ImplUpdateFloatSelection()
if ( nSelect == LISTBOX_ENTRY_NOTFOUND )
{
nSelect = mpImplLB->GetEntryList()->FindMatchingEntry( aSearchStr );
- bSelect = FALSE;
+ bSelect = sal_False;
}
if( nSelect != LISTBOX_ENTRY_NOTFOUND )
@@ -954,7 +954,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();
}
}
@@ -962,28 +962,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;
}
@@ -997,7 +997,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) );
@@ -1012,7 +1012,7 @@ void ComboBox::Clear()
}
// -----------------------------------------------------------------------
-Image ComboBox::GetEntryImage( USHORT nPos ) const
+Image ComboBox::GetEntryImage( sal_uInt16 nPos ) const
{
if ( mpImplLB->GetEntryList()->HasEntryImage( nPos ) )
return mpImplLB->GetEntryList()->GetEntryImage( nPos );
@@ -1021,70 +1021,70 @@ Image ComboBox::GetEntryImage( USHORT nPos ) const
// -----------------------------------------------------------------------
-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;
}
@@ -1151,7 +1151,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();
@@ -1191,28 +1191,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_uLong 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 );
@@ -1227,8 +1227,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 );
@@ -1250,7 +1250,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 );
@@ -1282,10 +1282,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 );
@@ -1295,7 +1295,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;
@@ -1344,21 +1344,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 );
@@ -1366,7 +1366,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 );
}
@@ -1380,7 +1380,7 @@ void ComboBox::SetSeparatorPos()
// -----------------------------------------------------------------------
-USHORT ComboBox::GetSeparatorPos() const
+sal_uInt16 ComboBox::GetSeparatorPos() const
{
return mpImplLB->GetSeparatorPos();
}
@@ -1401,58 +1401,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;
@@ -1502,29 +1502,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 );
@@ -1536,7 +1536,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 );
@@ -1545,7 +1545,7 @@ Rectangle ComboBox::GetBoundingRectangle( USHORT nItem ) const
}
// -----------------------------------------------------------------------------
-void ComboBox::SetBorderStyle( USHORT nBorderStyle )
+void ComboBox::SetBorderStyle( sal_uInt16 nBorderStyle )
{
Window::SetBorderStyle( nBorderStyle );
if ( !IsDropDownBox() )
@@ -1556,7 +1556,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();
@@ -1576,7 +1576,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..6bbe5bb32c38 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_uLong 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_uLong nOldOptions = rDCEvt.GetOldSettings()->GetStyleSettings().GetOptions();
+ sal_uLong 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 5091a4722845..769614a9259b 100755
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -119,19 +119,19 @@ struct DDInfo
Cursor aCursor;
Selection aDndStartSel;
xub_StrLen nDropPos;
- BOOL bStarterOfDD;
- BOOL bDroppedInMe;
- BOOL bVisCursor;
- BOOL bIsStringSupported;
+ sal_Bool bStarterOfDD;
+ sal_Bool bDroppedInMe;
+ sal_Bool bVisCursor;
+ sal_Bool bIsStringSupported;
DDInfo()
{
aCursor.SetStyle( CURSOR_SHADOW );
nDropPos = 0;
- bStarterOfDD = FALSE;
- bDroppedInMe = FALSE;
- bVisCursor = FALSE;
- bIsStringSupported = FALSE;
+ bStarterOfDD = sal_False;
+ bDroppedInMe = sal_False;
+ bVisCursor = sal_False;
+ bIsStringSupported = sal_False;
}
};
@@ -140,11 +140,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();
@@ -160,9 +160,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;
}
// -----------------------------------------------------------------------
@@ -178,8 +178,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) );
}
// -----------------------------------------------------------------------
@@ -236,7 +236,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:
@@ -289,21 +289,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;
@@ -350,7 +350,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();
@@ -378,7 +378,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();
@@ -392,13 +392,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();
@@ -545,7 +545,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();
@@ -553,7 +553,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() );
@@ -574,7 +574,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();
@@ -664,7 +664,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
@@ -720,7 +720,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();
@@ -780,7 +780,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;
}
// -----------------------------------------------------------------------
@@ -795,19 +795,19 @@ String Edit::ImplGetValidString( const String& rString ) const
}
// -----------------------------------------------------------------------
-Reference < i18n::XBreakIterator > Edit::ImplGetBreakIterator() const
+uno::Reference < i18n::XBreakIterator > Edit::ImplGetBreakIterator() const
{
//!! since we don't want to become incompatible in the next minor update
//!! where this code will get integrated into, xISC will be a local
//!! variable instead of a class member!
- Reference < i18n::XBreakIterator > xBI;
+ uno::Reference < i18n::XBreakIterator > xBI;
// if ( !xBI.is() )
{
- Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
- Reference < XInterface > xI = xMSF->createInstance( OUString::createFromAscii( "com.sun.star.i18n.BreakIterator" ) );
+ uno::Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
+ uno::Reference < XInterface > xI = xMSF->createInstance( OUString::createFromAscii( "com.sun.star.i18n.BreakIterator" ) );
if ( xI.is() )
{
- Any x = xI->queryInterface( ::getCppuType((const Reference< i18n::XBreakIterator >*)0) );
+ Any x = xI->queryInterface( ::getCppuType((const uno::Reference< i18n::XBreakIterator >*)0) );
x >>= xBI;
}
}
@@ -815,19 +815,19 @@ Reference < i18n::XBreakIterator > Edit::ImplGetBreakIterator() const
}
// -----------------------------------------------------------------------
-Reference < i18n::XExtendedInputSequenceChecker > Edit::ImplGetInputSequenceChecker() const
+uno::Reference < i18n::XExtendedInputSequenceChecker > Edit::ImplGetInputSequenceChecker() const
{
//!! since we don't want to become incompatible in the next minor update
//!! where this code will get integrated into, xISC will be a local
//!! variable instead of a class member!
- Reference < i18n::XExtendedInputSequenceChecker > xISC;
+ uno::Reference < i18n::XExtendedInputSequenceChecker > xISC;
// if ( !xISC.is() )
{
- Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
- Reference < XInterface > xI = xMSF->createInstance( OUString::createFromAscii( "com.sun.star.i18n.InputSequenceChecker" ) );
+ uno::Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
+ uno::Reference < XInterface > xI = xMSF->createInstance( OUString::createFromAscii( "com.sun.star.i18n.InputSequenceChecker" ) );
if ( xI.is() )
{
- Any x = xI->queryInterface( ::getCppuType((const Reference< i18n::XExtendedInputSequenceChecker >*)0) );
+ Any x = xI->queryInterface( ::getCppuType((const uno::Reference< i18n::XExtendedInputSequenceChecker >*)0) );
x >>= xISC;
}
}
@@ -902,8 +902,8 @@ void Edit::ImplInsertText( const XubString& rStr, const Selection* pNewSel, sal_
// get access to the configuration of this office module
try
{
- Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
- Reference< container::XNameAccess > xModuleCfg( ::comphelper::ConfigurationHelper::openConfig(
+ uno::Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
+ uno::Reference< container::XNameAccess > xModuleCfg( ::comphelper::ConfigurationHelper::openConfig(
xMSF,
sModule,
::comphelper::ConfigurationHelper::E_READONLY ),
@@ -1003,7 +1003,7 @@ void Edit::ImplInsertText( const XubString& rStr, const Selection* pNewSel, sal_
}
ImplAlignAndPaint();
- mbInternModified = TRUE;
+ mbInternModified = sal_True;
}
// -----------------------------------------------------------------------
@@ -1027,7 +1027,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;
@@ -1165,7 +1165,7 @@ void Edit::ImplClearBackground( long nXStart, long nXEnd )
// -----------------------------------------------------------------------
-void Edit::ImplShowCursor( BOOL bOnlyIfVisible )
+void Edit::ImplShowCursor( sal_Bool bOnlyIfVisible )
{
if ( !IsUpdateMode() || ( bOnlyIfVisible && !IsReallyVisible() ) )
return;
@@ -1358,7 +1358,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;
@@ -1450,7 +1450,7 @@ void Edit::MouseButtonDown( const MouseEvent& rMEvt )
if ( rMEvt.GetClicks() < 4 )
{
- mbClickedInSelection = FALSE;
+ mbClickedInSelection = sal_False;
if ( rMEvt.GetClicks() == 3 )
{
ImplSetSelection( Selection( 0, 0xFFFF ) );
@@ -1465,7 +1465,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() );
@@ -1473,9 +1473,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;
}
// -----------------------------------------------------------------------
@@ -1485,8 +1485,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 ) )
@@ -1506,8 +1506,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() )
{
@@ -1519,7 +1519,7 @@ void Edit::Tracking( const TrackingEvent& rTEvt )
if( !mbClickedInSelection )
{
xub_StrLen nChar = ImplGetCharPos( rTEvt.GetMouseEvent().GetPosPixel() );
- ImplSetCursorPos( nChar, TRUE );
+ ImplSetCursorPos( nChar, sal_True );
}
}
@@ -1529,13 +1529,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 )
{
@@ -1547,7 +1547,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
{
Cut();
ImplModified();
- bDone = TRUE;
+ bDone = sal_True;
}
}
break;
@@ -1557,7 +1557,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
if ( !(GetStyle() & WB_PASSWORD) )
{
Copy();
- bDone = TRUE;
+ bDone = sal_True;
}
}
break;
@@ -1567,7 +1567,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
if ( !mbReadOnly )
{
Paste();
- bDone = TRUE;
+ bDone = sal_True;
}
}
break;
@@ -1577,7 +1577,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
if ( !mbReadOnly )
{
Undo();
- bDone = TRUE;
+ bDone = sal_True;
}
}
break;
@@ -1592,7 +1592,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) )
{
@@ -1606,7 +1606,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
ImplInsertText( aChars );
ImplModified();
}
- bDone = TRUE;
+ bDone = sal_True;
}
}
}
@@ -1618,7 +1618,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;
@@ -1744,7 +1744,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
}
}
- bDone = TRUE;
+ bDone = sal_True;
}
}
break;
@@ -1758,8 +1758,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 )
@@ -1786,7 +1786,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
ImplDelete( maSelection, nDel, nMode );
if ( maText.Len() != nOldLen )
ImplModified();
- bDone = TRUE;
+ bDone = sal_True;
}
}
break;
@@ -1796,7 +1796,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
if ( !mpIMEInfos && !mbReadOnly && !rKEvt.GetKeyCode().IsMod2() )
{
SetInsertMode( !mbInsertMode );
- bDone = TRUE;
+ bDone = sal_True;
}
}
break;
@@ -1821,7 +1821,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
// Wurde nichts veraendert, dann TAB fuer DialogControl
if ( GetSelection().Len() )
- bDone = TRUE;
+ bDone = sal_True;
}
}
break;
@@ -1831,7 +1831,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 );
@@ -1899,9 +1899,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_uLong nFlags )
{
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
@@ -1916,8 +1916,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 );
@@ -2009,7 +2009,7 @@ void Edit::GetFocus()
{
maUndoText = maText;
- ULONG nSelOptions = GetSettings().GetStyleSettings().GetSelectionOptions();
+ sal_uLong nSelOptions = GetSettings().GetStyleSettings().GetSelectionOptions();
if ( !( GetStyle() & (WB_NOHIDESELECTION|WB_READONLY) )
&& ( GetGetFocusFlags() & (GETFOCUS_INIT|GETFOCUS_TAB|GETFOCUS_CURSOR|GETFOCUS_MNEMONIC) ) )
{
@@ -2106,22 +2106,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() )
{
@@ -2139,17 +2139,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() )
@@ -2158,7 +2158,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 )
@@ -2197,7 +2197,7 @@ void Edit::Command( const CommandEvent& rCEvt )
}
break;
}
- mbActivePopup = FALSE;
+ mbActivePopup = sal_False;
}
else if ( rCEvt.GetCommand() == COMMAND_VOICE )
{
@@ -2245,12 +2245,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 );
@@ -2274,20 +2274,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 );
@@ -2319,7 +2319,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 ) );
}
@@ -2349,10 +2349,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 )
{
@@ -2371,7 +2371,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
@@ -2405,8 +2405,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();
}
}
@@ -2414,7 +2414,7 @@ void Edit::StateChanged( StateChangedType nType )
{
if ( !mpSubEdit )
{
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
ImplShowCursor();
Invalidate();
}
@@ -2423,7 +2423,7 @@ void Edit::StateChanged( StateChangedType nType )
{
if ( !mpSubEdit )
{
- ImplInitSettings( FALSE, TRUE, FALSE );
+ ImplInitSettings( sal_False, sal_True, sal_False );
Invalidate();
}
}
@@ -2431,7 +2431,7 @@ void Edit::StateChanged( StateChangedType nType )
{
if ( !mpSubEdit )
{
- ImplInitSettings( FALSE, FALSE, TRUE );
+ ImplInitSettings( sal_False, sal_False, sal_True );
Invalidate();
}
}
@@ -2450,8 +2450,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();
}
}
@@ -2472,7 +2472,7 @@ void Edit::ImplShowDDCursor()
mpDDInfo->aCursor.SetPos( aCursorRect.TopLeft() );
mpDDInfo->aCursor.SetSize( aCursorRect.GetSize() );
mpDDInfo->aCursor.Show();
- mpDDInfo->bVisCursor = TRUE;
+ mpDDInfo->bVisCursor = sal_True;
}
}
@@ -2483,7 +2483,7 @@ void Edit::ImplHideDDCursor()
if ( mpDDInfo && mpDDInfo->bVisCursor )
{
mpDDInfo->aCursor.Hide();
- mpDDInfo->bVisCursor = FALSE;
+ mpDDInfo->bVisCursor = sal_False;
}
}
@@ -2535,7 +2535,7 @@ IMPL_LINK( Edit, ImplUpdateDataHdl, Timer*, EMPTYARG )
// -----------------------------------------------------------------------
-void Edit::EnableUpdateData( ULONG nTimeout )
+void Edit::EnableUpdateData( sal_uLong nTimeout )
{
if ( !nTimeout )
DisableUpdateData();
@@ -2562,7 +2562,7 @@ void Edit::SetEchoChar( xub_Unicode c )
// -----------------------------------------------------------------------
-void Edit::SetReadOnly( BOOL bReadOnly )
+void Edit::SetReadOnly( sal_Bool bReadOnly )
{
if ( mbReadOnly != bReadOnly )
{
@@ -2585,7 +2585,7 @@ void Edit::SetAutocompleteHdl( const Link& rHdl )
// -----------------------------------------------------------------------
-void Edit::SetInsertMode( BOOL bInsert )
+void Edit::SetInsertMode( sal_Bool bInsert )
{
if ( bInsert != mbInsertMode )
{
@@ -2599,7 +2599,7 @@ void Edit::SetInsertMode( BOOL bInsert )
// -----------------------------------------------------------------------
-BOOL Edit::IsInsertMode() const
+sal_Bool Edit::IsInsertMode() const
{
if ( mpSubEdit )
return mpSubEdit->IsInsertMode();
@@ -2638,7 +2638,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 );
@@ -2809,9 +2809,9 @@ XubString Edit::GetText() const
void Edit::SetModifyFlag()
{
if ( mpSubEdit )
- mpSubEdit->mbModified = TRUE;
+ mpSubEdit->mbModified = sal_True;
else
- mbModified = TRUE;
+ mbModified = sal_True;
}
// -----------------------------------------------------------------------
@@ -2819,9 +2819,9 @@ void Edit::SetModifyFlag()
void Edit::ClearModifyFlag()
{
if ( mpSubEdit )
- mpSubEdit->mbModified = FALSE;
+ mpSubEdit->mbModified = sal_False;
else
- mbModified = FALSE;
+ mbModified = sal_False;
}
// -----------------------------------------------------------------------
@@ -2832,7 +2832,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 );
}
@@ -2944,8 +2944,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;
}
@@ -2962,7 +2962,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();
@@ -2975,7 +2975,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;
@@ -3025,7 +3025,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();
@@ -3036,7 +3036,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;
@@ -3053,7 +3053,7 @@ void Edit::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEvent&
::rtl::OUString aText;
aData >>= aText;
ImplInsertText( aText );
- bChanges = TRUE;
+ bChanges = sal_True;
ImplModified();
}
}
@@ -3077,14 +3077,14 @@ void Edit::dragEnter( const ::com::sun::star::datatransfer::dnd::DropTargetDragE
// search for string data type
const Sequence< com::sun::star::datatransfer::DataFlavor >& rFlavors( rDTDE.SupportedDataFlavors );
sal_Int32 nEle = rFlavors.getLength();
- mpDDInfo->bIsStringSupported = FALSE;
+ mpDDInfo->bIsStringSupported = sal_False;
for( sal_Int32 i = 0; i < nEle; i++ )
{
sal_Int32 nIndex = 0;
rtl::OUString aMimetype = rFlavors[i].MimeType.getToken( 0, ';', nIndex );
if( aMimetype.equalsAscii( "text/plain" ) )
{
- mpDDInfo->bIsStringSupported = TRUE;
+ mpDDInfo->bIsStringSupported = sal_True;
break;
}
}
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index 4c4e3c870429..4a42abd3ea79 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -60,9 +60,9 @@ using namespace ::com::sun::star;
// -----------------------------------------------------------------------
-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++ )
@@ -73,16 +73,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) ||
@@ -90,28 +90,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( ' ' );
@@ -130,7 +130,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++ )
@@ -139,14 +139,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) )
{
@@ -156,7 +156,7 @@ static BOOL ImplNumericGetValue( const XubString& rStr, double& rValue,
break;
else if ( aStr.GetChar( i ) == '-' )
{
- bNegative = TRUE;
+ bNegative = sal_True;
break;
}
}
@@ -166,7 +166,7 @@ static BOOL ImplNumericGetValue( const XubString& rStr, double& rValue,
else
{
if ( aStr1.GetChar( 0 ) == '-' )
- bNegative = TRUE;
+ bNegative = sal_True;
}
// Alle unerwuenschten Zeichen rauswerfen
@@ -186,7 +186,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' );
@@ -194,11 +194,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 )
@@ -219,7 +219,7 @@ static BOOL ImplNumericGetValue( const XubString& rStr, double& rValue,
rValue = nValue;
- return TRUE;
+ return sal_True;
}
static void ImplUpdateSeparatorString( String& io_rText,
@@ -267,8 +267,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();
ImplUpdateSeparatorString( aText, rOldDecSep, rNewDecSep, rOldThSep, rNewThSep );
pEdit->SetText( aText );
@@ -277,8 +277,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 );
void* pEntryData = pCombo->GetEntryData( i );
@@ -299,11 +299,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;
}
// -----------------------------------------------------------------------
@@ -344,7 +344,7 @@ void FormatterBase::ReformatAll()
// -----------------------------------------------------------------------
-void FormatterBase::SetStrictFormat( BOOL bStrict )
+void FormatterBase::SetStrictFormat( sal_Bool bStrict )
{
if ( bStrict != mbStrictFormat )
{
@@ -359,7 +359,7 @@ void FormatterBase::SetStrictFormat( BOOL bStrict )
void FormatterBase::SetLocale( const lang::Locale& rLocale )
{
ImplGetLocaleDataWrapper().setLocale( rLocale );
- mbDefaultLocale = FALSE;
+ mbDefaultLocale = sal_False;
ReformatAll();
}
@@ -390,7 +390,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 )
{
@@ -417,7 +417,7 @@ void FormatterBase::ImplSetText( const XubString& rText, Selection* pNewSelectio
mpField->SetText( rText, aSel );
}
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
}
}
@@ -427,23 +427,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;
@@ -459,14 +459,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;
}
}
@@ -481,8 +481,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;
@@ -507,7 +507,7 @@ void NumericFormatter::ImplLoadRes( const ResId& rResId )
if( pMgr )
{
- ULONG nMask = pMgr->ReadLong();
+ sal_uLong nMask = pMgr->ReadLong();
if ( NUMERICFORMATTER_MIN & nMask )
mnMin = pMgr->ReadLong();
@@ -516,7 +516,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() );
@@ -532,7 +532,7 @@ void NumericFormatter::ImplLoadRes( const ResId& rResId )
}
if ( NUMERICFORMATTER_NOTHOUSANDSEP & nMask )
- SetUseThousandSep( !(BOOL)pMgr->ReadShort() );
+ SetUseThousandSep( !(sal_Bool)pMgr->ReadShort() );
}
}
@@ -562,7 +562,7 @@ void NumericFormatter::SetMax( sal_Int64 nNewMax )
// -----------------------------------------------------------------------
-void NumericFormatter::SetUseThousandSep( BOOL b )
+void NumericFormatter::SetUseThousandSep( sal_Bool b )
{
mbThousandSep = b;
ReformatAll();
@@ -570,7 +570,7 @@ void NumericFormatter::SetUseThousandSep( BOOL b )
// -----------------------------------------------------------------------
-void NumericFormatter::SetDecimalDigits( USHORT nDigits )
+void NumericFormatter::SetDecimalDigits( sal_uInt16 nDigits )
{
mnDecimalDigits = nDigits;
ReformatAll();
@@ -578,7 +578,7 @@ void NumericFormatter::SetDecimalDigits( USHORT nDigits )
// -----------------------------------------------------------------------
-void NumericFormatter::SetShowTrailingZeros( BOOL bShowTrailingZeros )
+void NumericFormatter::SetShowTrailingZeros( sal_Bool bShowTrailingZeros )
{
if ( mbShowTrailingZeros != bShowTrailingZeros )
{
@@ -589,7 +589,7 @@ void NumericFormatter::SetShowTrailingZeros( BOOL bShowTrailingZeros )
// -----------------------------------------------------------------------
-USHORT NumericFormatter::GetDecimalDigits() const
+sal_uInt16 NumericFormatter::GetDecimalDigits() const
{
return mnDecimalDigits;
}
@@ -600,7 +600,7 @@ void NumericFormatter::SetValue( sal_Int64 nNewValue )
{
SetUserValue( nNewValue );
mnFieldValue = mnLastValue;
- SetEmptyFieldValueData( FALSE );
+ SetEmptyFieldValueData( sal_False );
}
// -----------------------------------------------------------------------
@@ -656,14 +656,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;
}
// -----------------------------------------------------------------------
@@ -714,7 +714,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;
@@ -834,7 +834,7 @@ void NumericField::ImplLoadRes( const ResId& rResId )
SpinField::ImplLoadRes( rResId );
NumericFormatter::ImplLoadRes( ResId( (RSHEADER_TYPE *)GetClassRes(), *rResId.GetResMgr() ) );
- ULONG nMask = ReadLongRes();
+ sal_uLong nMask = ReadLongRes();
if ( NUMERICFIELD_FIRST & nMask )
mnFirst = ReadLongRes();
@@ -870,7 +870,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()) )
@@ -903,7 +903,7 @@ void NumericField::DataChanged( const DataChangedEvent& rDCEvt )
void NumericField::Modify()
{
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
SpinField::Modify();
}
@@ -989,7 +989,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()) )
@@ -1022,7 +1022,7 @@ void NumericBox::DataChanged( const DataChangedEvent& rDCEvt )
void NumericBox::Modify()
{
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
ComboBox::Modify();
}
@@ -1032,21 +1032,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 );
}
@@ -1060,7 +1060,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() );
@@ -1069,19 +1069,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 );
}
// -----------------------------------------------------------------------
@@ -1107,7 +1107,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 );
@@ -1245,7 +1245,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
@@ -1259,7 +1259,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>(
@@ -1271,7 +1271,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>(
@@ -1283,7 +1283,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 )
@@ -1295,7 +1295,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;
@@ -1334,7 +1334,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 ||
@@ -1391,7 +1391,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 ||
@@ -1448,12 +1448,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 );
@@ -1461,15 +1461,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;
@@ -1485,14 +1485,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;
}
}
@@ -1521,7 +1521,7 @@ void MetricFormatter::ImplLoadRes( const ResId& rResId )
ResMgr* pMgr = rResId.GetResMgr();
if( pMgr )
{
- ULONG nMask = pMgr->ReadLong();
+ sal_uLong nMask = pMgr->ReadLong();
if ( METRICFORMATTER_UNIT & nMask )
meUnit = (FieldUnit)pMgr->ReadLong();
@@ -1695,7 +1695,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 )
@@ -1752,7 +1752,7 @@ void MetricField::ImplLoadRes( const ResId& rResId )
SpinField::ImplLoadRes( rResId );
MetricFormatter::ImplLoadRes( ResId( (RSHEADER_TYPE *)GetClassRes(), *rResId.GetResMgr() ) );
- ULONG nMask = ReadLongRes();
+ sal_uLong nMask = ReadLongRes();
if ( METRICFIELD_FIRST & nMask )
mnFirst = ReadLongRes();
@@ -1828,7 +1828,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()) )
@@ -1861,7 +1861,7 @@ void MetricField::DataChanged( const DataChangedEvent& rDCEvt )
void MetricField::Modify()
{
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
SpinField::Modify();
}
@@ -1954,7 +1954,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()) )
@@ -1987,7 +1987,7 @@ void MetricBox::DataChanged( const DataChangedEvent& rDCEvt )
void MetricBox::Modify()
{
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
ComboBox::Modify();
}
@@ -1997,16 +1997,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 );
}
// -----------------------------------------------------------------------
@@ -2018,7 +2018,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(),
@@ -2038,7 +2038,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,
@@ -2053,7 +2053,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(),
@@ -2079,31 +2079,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;
@@ -2119,14 +2119,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;
}
}
@@ -2171,7 +2171,7 @@ void CurrencyFormatter::SetValue( sal_Int64 nNewValue )
{
SetUserValue( nNewValue );
mnFieldValue = mnLastValue;
- SetEmptyFieldValueData( FALSE );
+ SetEmptyFieldValueData( sal_False );
}
// -----------------------------------------------------------------------
@@ -2210,7 +2210,7 @@ void CurrencyFormatter::Reformat()
return;
XubString aStr;
- BOOL bOK = ImplCurrencyReformat( GetField()->GetText(), aStr );
+ sal_Bool bOK = ImplCurrencyReformat( GetField()->GetText(), aStr );
if ( !bOK )
return;
@@ -2257,7 +2257,7 @@ void CurrencyField::ImplLoadRes( const ResId& rResId )
SpinField::ImplLoadRes( rResId );
CurrencyFormatter::ImplLoadRes( ResId( (RSHEADER_TYPE *)GetClassRes(), *rResId.GetResMgr() ) );
- ULONG nMask = ReadLongRes();
+ sal_uLong nMask = ReadLongRes();
if ( CURRENCYFIELD_FIRST & nMask )
mnFirst = ReadLongRes();
@@ -2295,7 +2295,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()) )
@@ -2328,7 +2328,7 @@ void CurrencyField::DataChanged( const DataChangedEvent& rDCEvt )
void CurrencyField::Modify()
{
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
SpinField::Modify();
}
@@ -2414,7 +2414,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()) )
@@ -2447,7 +2447,7 @@ void CurrencyBox::DataChanged( const DataChangedEvent& rDCEvt )
void CurrencyBox::Modify()
{
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
ComboBox::Modify();
}
@@ -2456,21 +2456,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 );
}
@@ -2484,7 +2484,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() );
@@ -2493,7 +2493,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..4b14a5a4b199 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_uLong 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_uLong 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_uLong 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_uLong)(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_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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..cc621e16175d 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_uLong 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_uLong 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 f73cf008a5e5..db92cd0b09af 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_uLong 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_uLong 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() );
@@ -543,7 +543,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();
if( (nWinStyle & WB_CENTER) )
@@ -609,7 +609,7 @@ void FixedLine::Paint( const Rectangle& )
// -----------------------------------------------------------------------
-void FixedLine::Draw( OutputDevice*, const Point&, const Size&, ULONG )
+void FixedLine::Draw( OutputDevice*, const Point&, const Size&, sal_uLong )
{
}
@@ -645,17 +645,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();
}
}
@@ -671,7 +671,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();
}
}
@@ -713,16 +713,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() );
@@ -737,7 +737,7 @@ void FixedBitmap::ImplLoadRes( const ResId& rResId )
{
Control::ImplLoadRes( rResId );
- ULONG nObjMask = ReadLongRes();
+ sal_uLong nObjMask = ReadLongRes();
if ( RSC_FIXEDBITMAP_BITMAP & nObjMask )
{
@@ -776,10 +776,10 @@ FixedBitmap::~FixedBitmap()
// -----------------------------------------------------------------------
-void FixedBitmap::ImplDraw( OutputDevice* pDev, ULONG /* nDrawFlags */,
+void FixedBitmap::ImplDraw( OutputDevice* pDev, sal_uLong /* nDrawFlags */,
const Point& rPos, const Size& rSize )
{
- USHORT nStyle = 0;
+ sal_uInt16 nStyle = 0;
Bitmap* pBitmap = &maBitmap;
Color aCol;
if( !!maBitmapHC )
@@ -829,7 +829,7 @@ void FixedBitmap::Paint( const Rectangle& )
// -----------------------------------------------------------------------
void FixedBitmap::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
- ULONG nFlags )
+ sal_uLong nFlags )
{
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
@@ -908,7 +908,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 );
@@ -918,8 +918,8 @@ BOOL FixedBitmap::SetModeBitmap( const Bitmap& rBitmap, BmpColorMode eMode )
StateChanged( STATE_CHANGE_DATA );
}
else
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -937,7 +937,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();
}
@@ -958,16 +958,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() );
@@ -982,7 +982,7 @@ void FixedImage::ImplLoadRes( const ResId& rResId )
{
Control::ImplLoadRes( rResId );
- ULONG nObjMask = ReadLongRes();
+ sal_uLong nObjMask = ReadLongRes();
if ( RSC_FIXEDIMAGE_IMAGE & nObjMask )
{
@@ -1021,10 +1021,10 @@ FixedImage::~FixedImage()
// -----------------------------------------------------------------------
-void FixedImage::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
+void FixedImage::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
const Point& rPos, const Size& rSize )
{
- USHORT nStyle = 0;
+ sal_uInt16 nStyle = 0;
if ( !(nDrawFlags & WINDOW_DRAW_NODISABLE) )
{
if ( !IsEnabled() )
@@ -1051,10 +1051,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;
}
// -----------------------------------------------------------------------
@@ -1081,7 +1081,7 @@ void FixedImage::UserDraw( const UserDrawEvent& )
// -----------------------------------------------------------------------
void FixedImage::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
- ULONG nFlags )
+ sal_uLong nFlags )
{
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
@@ -1163,7 +1163,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 );
@@ -1176,8 +1176,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..5b09bf6bb3b5 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_uLong 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_uLong 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 bd0179ffe454..670d6dad0ada 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_uLong 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_uLong)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_uLong)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;
@@ -539,26 +539,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;
@@ -569,7 +569,7 @@ ImplListBoxWindow::ImplListBoxWindow( Window* pParent, WinBits nWinStyle ) :
SetTextFillColor();
SetBackground( Wallpaper( GetSettings().GetStyleSettings().GetFieldColor() ) );
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
ImplCalcMetrics();
}
@@ -582,7 +582,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 );
}
@@ -597,16 +597,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 );
@@ -633,7 +633,7 @@ void ImplListBoxWindow::Clear()
mnMaxImgHeight = 0;
mnTop = 0;
mnLeft = 0;
- mbImgsDiffSz = FALSE;
+ mbImgsDiffSz = sal_False;
ImplClearLayoutData();
mnCurrentPos = LISTBOX_ENTRY_NOTFOUND;
@@ -653,8 +653,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;
@@ -667,7 +667,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;
@@ -695,7 +695,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;
@@ -705,13 +705,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;
@@ -753,19 +753,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() )
{
@@ -777,7 +777,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 );
@@ -786,15 +786,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;
@@ -805,7 +805,7 @@ USHORT ImplListBoxWindow::InsertEntry( USHORT nPos, ImplEntryType* pNewEntry )
// -----------------------------------------------------------------------
-void ImplListBoxWindow::RemoveEntry( USHORT nPos )
+void ImplListBoxWindow::RemoveEntry( sal_uInt16 nPos )
{
ImplClearLayoutData();
mpEntryList->RemoveEntry( nPos );
@@ -816,7 +816,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 );
@@ -831,7 +831,7 @@ void ImplListBoxWindow::ImplShowFocusRect()
if ( mbHasFocusRect )
HideFocus();
ShowFocus( maFocusRect );
- mbHasFocusRect = TRUE;
+ mbHasFocusRect = sal_True;
}
// -----------------------------------------------------------------------
@@ -841,18 +841,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 )
{
@@ -867,16 +867,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;
}
}
@@ -885,11 +885,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++;
@@ -907,14 +907,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
maQuickSelectionEngine.Reset();
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() )
@@ -923,9 +923,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();
@@ -958,10 +958,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;
}
}
@@ -975,28 +975,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;
}
}
@@ -1024,14 +1024,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 ) )
{
@@ -1041,16 +1041,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() )
{
@@ -1058,7 +1058,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();
@@ -1073,46 +1073,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 );
@@ -1124,20 +1124,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 );
@@ -1145,16 +1145,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 );
@@ -1162,40 +1162,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;
}
}
}
@@ -1206,17 +1206,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 )
{
@@ -1239,7 +1239,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
{
@@ -1253,9 +1253,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 );
@@ -1268,23 +1268,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;
}
}
@@ -1292,10 +1292,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 )
@@ -1309,43 +1309,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 )
{
@@ -1353,32 +1353,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;
}
}
}
@@ -1416,18 +1416,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() )
{
@@ -1453,7 +1453,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
if( ( nSelect != LISTBOX_ENTRY_NOTFOUND ) && ( nSelect < mnTop ) )
SetTopEntry( mnTop-1 );
- bDone = TRUE;
+ bDone = sal_True;
}
maQuickSelectionEngine.Reset();
}
@@ -1480,7 +1480,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
if( ( nSelect != LISTBOX_ENTRY_NOTFOUND ) && ( nSelect >= GetLastVisibleEntry() ) )
SetTopEntry( mnTop+1 );
- bDone = TRUE;
+ bDone = sal_True;
}
maQuickSelectionEngine.Reset();
}
@@ -1490,7 +1490,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 );
}
@@ -1504,14 +1504,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;
}
maQuickSelectionEngine.Reset();
}
@@ -1531,21 +1531,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;
}
maQuickSelectionEngine.Reset();
}
@@ -1565,7 +1565,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
if( mnTop != 0 )
SetTopEntry( 0 );
- bDone = TRUE;
+ bDone = sal_True;
}
}
maQuickSelectionEngine.Reset();
@@ -1586,13 +1586,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;
}
maQuickSelectionEngine.Reset();
}
@@ -1603,7 +1603,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
if ( !bCtrl && !bMod2 )
{
ScrollHorz( -HORZ_SCROLL );
- bDone = TRUE;
+ bDone = sal_True;
}
maQuickSelectionEngine.Reset();
}
@@ -1614,7 +1614,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
if ( !bCtrl && !bMod2 )
{
ScrollHorz( HORZ_SCROLL );
- bDone = TRUE;
+ bDone = sal_True;
}
maQuickSelectionEngine.Reset();
}
@@ -1626,7 +1626,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
{
mnSelectModifier = rKEvt.GetKeyCode().GetModifier();
ImplCallSelect();
- bDone = FALSE; // RETURN nicht abfangen.
+ bDone = sal_False; // RETURN nicht abfangen.
}
maQuickSelectionEngine.Reset();
}
@@ -1641,7 +1641,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
nSelect = mnCurrentPos;
eLET = LET_KEYSPACE;
}
- bDone = TRUE;
+ bDone = sal_True;
}
maQuickSelectionEngine.Reset();
}
@@ -1652,12 +1652,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 );
@@ -1665,7 +1665,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
maQuickSelectionEngine.Reset();
- bDone = TRUE;
+ bDone = sal_True;
break;
}
}
@@ -1692,10 +1692,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;
}
}
@@ -1705,10 +1705,10 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
// -----------------------------------------------------------------------
namespace
{
- static ::vcl::StringEntryIdentifier lcl_getEntry( const ImplEntryList& _rList, USHORT _nPos, String& _out_entryText )
+ static ::vcl::StringEntryIdentifier lcl_getEntry( const ImplEntryList& _rList, sal_uInt16 _nPos, String& _out_entryText )
{
OSL_PRECOND( ( _nPos != LISTBOX_ENTRY_NOTFOUND ), "lcl_getEntry: invalid position!" );
- USHORT nEntryCount( _rList.GetEntryCount() );
+ sal_uInt16 nEntryCount( _rList.GetEntryCount() );
if ( _nPos >= nEntryCount )
_nPos = 0;
_out_entryText = _rList.GetEntryText( _nPos );
@@ -1718,10 +1718,10 @@ namespace
return reinterpret_cast< ::vcl::StringEntryIdentifier >( _nPos + 1 );
}
- static USHORT lcl_getEntryPos( ::vcl::StringEntryIdentifier _entry )
+ static sal_uInt16 lcl_getEntryPos( ::vcl::StringEntryIdentifier _entry )
{
// our pos is 0-based, but StringEntryIdentifier does not allow for a NULL
- return static_cast< USHORT >( reinterpret_cast< sal_Int64 >( _entry ) ) - 1;
+ return static_cast< sal_uInt16 >( reinterpret_cast< sal_Int64 >( _entry ) ) - 1;
}
}
@@ -1734,14 +1734,14 @@ namespace
// -----------------------------------------------------------------------
::vcl::StringEntryIdentifier ImplListBoxWindow::NextEntry( ::vcl::StringEntryIdentifier _currentEntry, String& _out_entryText ) const
{
- USHORT nNextPos = lcl_getEntryPos( _currentEntry ) + 1;
+ sal_uInt16 nNextPos = lcl_getEntryPos( _currentEntry ) + 1;
return lcl_getEntry( *GetEntryList(), nNextPos, _out_entryText );
}
// -----------------------------------------------------------------------
void ImplListBoxWindow::SelectEntry( ::vcl::StringEntryIdentifier _entry )
{
- USHORT nSelect = lcl_getEntryPos( _entry );
+ sal_uInt16 nSelect = lcl_getEntryPos( _entry );
if ( mpEntryList->IsEntryPosSelected( nSelect ) )
{
// ignore that. This method is a callback from the QuickSelectionEngine, which means the user attempted
@@ -1759,18 +1759,18 @@ void ImplListBoxWindow::SelectEntry( ::vcl::StringEntryIdentifier _entry )
// actually select
mnCurrentPos = nSelect;
- if ( SelectEntries( nSelect, LET_KEYMOVE, FALSE, FALSE ) )
+ if ( SelectEntries( nSelect, LET_KEYMOVE, sal_False, sal_False ) )
{
- mbTravelSelect = TRUE;
+ mbTravelSelect = sal_True;
mnSelectModifier = 0;
ImplCallSelect();
- mbTravelSelect = FALSE;
+ mbTravelSelect = sal_False;
}
}
// -----------------------------------------------------------------------
-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();
@@ -1793,7 +1793,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();
@@ -1804,25 +1804,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 )
@@ -1896,7 +1896,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) )
@@ -1937,22 +1937,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;
}
@@ -1974,13 +1974,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;
@@ -1993,7 +1993,7 @@ void ImplListBoxWindow::Resize()
{
Control::Resize();
- BOOL bShowFocusRect = mbHasFocusRect;
+ sal_Bool bShowFocusRect = mbHasFocusRect;
if ( bShowFocusRect )
ImplHideFocusRect();
@@ -2013,7 +2013,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 );
@@ -2046,14 +2046,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 );
@@ -2079,11 +2079,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--;
@@ -2121,7 +2121,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 );
@@ -2134,12 +2134,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;
@@ -2147,7 +2147,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() );
@@ -2165,7 +2165,7 @@ void ImplListBoxWindow::StateChanged( StateChangedType nType )
if ( nType == STATE_CHANGE_ZOOM )
{
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
ImplCalcMetrics();
Invalidate();
}
@@ -2176,18 +2176,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();
@@ -2205,7 +2205,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();
}
@@ -2213,9 +2213,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;
@@ -2246,9 +2246,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 ) );
@@ -2281,37 +2281,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 );
@@ -2319,21 +2319,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 );
}
@@ -2397,7 +2397,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 )
@@ -2410,18 +2410,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
if( GetEntryList()->GetSelectEntryCount() == 1 &&
@@ -2433,15 +2433,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();
@@ -2449,16 +2449,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
if( GetEntryList()->GetSelectEntryCount() == 1 &&
@@ -2470,15 +2470,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 );
}
}
@@ -2497,8 +2497,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 );
@@ -2507,7 +2507,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 );
}
@@ -2532,7 +2532,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 );
@@ -2587,7 +2587,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 );
@@ -2673,15 +2673,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 );
}
@@ -2693,23 +2693,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;
}
}
@@ -2726,7 +2726,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 ) )
@@ -2746,22 +2746,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;
}
// -----------------------------------------------------------------------
@@ -2831,7 +2831,7 @@ void ImplWin::ImplDraw( bool bLayout )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- BOOL bNativeOK = FALSE;
+ sal_Bool bNativeOK = sal_False;
if( ! bLayout )
{
@@ -2858,11 +2858,11 @@ void ImplWin::ImplDraw( bool bLayout )
Point aPoint( -nLeft, -nTop );
Rectangle aCtrlRegion( 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 );
}
@@ -2915,14 +2915,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 );
}
}
@@ -2935,15 +2935,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 ) );
@@ -2970,7 +2970,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;
@@ -3049,7 +3049,7 @@ void ImplWin::LoseFocus()
ImplBtn::ImplBtn( Window* pParent, WinBits nWinStyle ) :
PushButton( pParent, nWinStyle ),
- mbDown ( FALSE )
+ mbDown ( sal_False )
{
}
@@ -3069,7 +3069,7 @@ void ImplBtn::MouseButtonDown( const MouseEvent& )
if( IsEnabled() )
{
MBDown();
- mbDown = TRUE;
+ mbDown = sal_True;
}
}
@@ -3080,7 +3080,7 @@ ImplListBoxFloatingWindow::ImplListBoxFloatingWindow( Window* pParent ) :
{
mpImplLB = NULL;
mnDDLineCount = 0;
- mbAutoWidth = FALSE;
+ mbAutoWidth = sal_False;
mnPopupModeStartSaveSelection = LISTBOX_ENTRY_NOTFOUND;
@@ -3105,7 +3105,7 @@ long ImplListBoxFloatingWindow::PreNotify( NotifyEvent& rNEvt )
{
if( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
- if( !GetParent()->HasChildPathFocus( TRUE ) )
+ if( !GetParent()->HasChildPathFocus( sal_True ) )
EndPopupMode();
}
@@ -3114,7 +3114,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 );
@@ -3131,7 +3131,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 ) );
}
@@ -3166,7 +3166,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;
@@ -3220,7 +3220,7 @@ Size ImplListBoxFloatingWindow::CalcFloatSize()
// -----------------------------------------------------------------------
-void ImplListBoxFloatingWindow::StartFloat( BOOL bStartTracking )
+void ImplListBoxFloatingWindow::StartFloat( sal_Bool bStartTracking )
{
if( !IsInPopupMode() )
{
@@ -3229,7 +3229,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();
@@ -3260,7 +3260,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..faeb460c46e4 100644
--- a/vcl/source/control/imgctrl.cxx
+++ b/vcl/source/control/imgctrl.cxx
@@ -30,6 +30,7 @@
#include <vcl/event.hxx>
#include <vcl/imgctrl.hxx>
+#include <tools/rcid.h>
#include <com/sun/star/awt/ImageScaleMode.hdl>
@@ -37,10 +38,18 @@ namespace ImageScaleMode = ::com::sun::star::awt::ImageScaleMode;
// -----------------------------------------------------------------------
-ImageControl::ImageControl( Window* pParent, WinBits nStyle ) :
- FixedImage( pParent, nStyle )
+ImageControl::ImageControl( Window* pParent, WinBits nStyle )
+ :FixedImage( pParent, nStyle )
+ ,mnScaleMode( ImageScaleMode::Anisotropic )
+{
+}
+
+// -----------------------------------------------------------------------
+
+ImageControl::ImageControl( Window* pParent, const ResId& rResId )
+ :FixedImage( pParent, rResId )
+ ,mnScaleMode( ImageScaleMode::Anisotropic )
{
- mnScaleMode = ImageScaleMode::Anisotropic;
}
// -----------------------------------------------------------------------
@@ -86,154 +95,86 @@ namespace
// -----------------------------------------------------------------------
-void ImageControl::UserDraw( const UserDrawEvent& rUDEvt )
+void ImageControl::ImplDraw( OutputDevice& rDev, sal_uLong nDrawFlags, const Point& rPos, const Size& rSize ) const
{
- USHORT nStyle = 0;
- BitmapEx* pBitmap = &maBmp;
- if( !!maBmpHC )
+ sal_uInt16 nStyle = 0;
+ if ( !(nDrawFlags & WINDOW_DRAW_NODISABLE) )
{
- if( GetSettings().GetStyleSettings().GetHighContrastMode() )
- pBitmap = &maBmpHC;
+ if ( !IsEnabled() )
+ nStyle |= IMAGE_DRAW_DISABLE;
}
- if ( !*pBitmap )
+ const Image& rImage( GetModeImage( BMP_COLOR_NORMAL ) );
+ const Image& rImageHC( GetModeImage( BMP_COLOR_HIGHCONTRAST ) );
+
+ const Image* pImage = &rImage;
+ if ( !!rImageHC && GetSettings().GetStyleSettings().GetHighContrastMode() )
+ pImage = &rImageHC;
+
+ const Rectangle aDrawRect( rPos, rSize );
+ if ( !*pImage )
{
String sText( GetText() );
if ( !sText.Len() )
return;
WinBits nWinStyle = GetStyle();
- USHORT nTextStyle = FixedText::ImplGetTextStyle( nWinStyle );
- if ( !IsEnabled() )
- nTextStyle |= TEXT_DRAW_DISABLE;
+ sal_uInt16 nTextStyle = FixedText::ImplGetTextStyle( nWinStyle );
+ if ( !(nDrawFlags & WINDOW_DRAW_NODISABLE) )
+ if ( !IsEnabled() )
+ nTextStyle |= TEXT_DRAW_DISABLE;
- DrawText( rUDEvt.GetRect(), sText, nTextStyle );
+ rDev.DrawText( aDrawRect, sText, nTextStyle );
return;
}
- const Rectangle& rPaintRect = rUDEvt.GetRect();
- const Size& rBitmapSize = maBmp.GetSizePixel();
+ const Size& rBitmapSize = pImage->GetSizePixel();
- if( nStyle & IMAGE_DRAW_COLORTRANSFORM )
+ switch ( mnScaleMode )
{
- // only images support IMAGE_DRAW_COLORTRANSFORM
- Image aImage( *pBitmap );
- if ( !!aImage )
- {
- switch ( mnScaleMode )
- {
- case ImageScaleMode::None:
- {
- rUDEvt.GetDevice()->DrawImage(
- lcl_centerWithin( rPaintRect, rBitmapSize ), aImage, nStyle );
- }
- break;
-
- case ImageScaleMode::Isotropic:
- {
- const Size aPaintSize = lcl_calcPaintSize( rPaintRect, rBitmapSize );
- rUDEvt.GetDevice()->DrawImage(
- lcl_centerWithin( rPaintRect, aPaintSize ),
- aPaintSize,
- aImage, nStyle );
- }
- break;
-
- case ImageScaleMode::Anisotropic:
- {
- rUDEvt.GetDevice()->DrawImage(
- rPaintRect.TopLeft(),
- rPaintRect.GetSize(),
- aImage, nStyle );
- }
- break;
-
- default:
- OSL_ENSURE( false, "ImageControl::UserDraw: unhandled scale mode!" );
- break;
-
- } // switch ( mnScaleMode )
- }
- }
- else
+ case ImageScaleMode::None:
{
- switch ( mnScaleMode )
- {
- case ImageScaleMode::None:
- {
- pBitmap->Draw( rUDEvt.GetDevice(), lcl_centerWithin( rPaintRect, rBitmapSize ) );
- }
- break;
-
- case ImageScaleMode::Isotropic:
- {
- const Size aPaintSize = lcl_calcPaintSize( rPaintRect, rBitmapSize );
- pBitmap->Draw( rUDEvt.GetDevice(),
- lcl_centerWithin( rPaintRect, aPaintSize ),
- aPaintSize );
- }
- break;
-
- case ImageScaleMode::Anisotropic:
- {
- pBitmap->Draw( rUDEvt.GetDevice(),
- rPaintRect.TopLeft(),
- rPaintRect.GetSize() );
- }
- break;
-
- default:
- OSL_ENSURE( false, "ImageControl::UserDraw: unhandled scale mode!" );
- break;
-
- } // switch ( mnScaleMode )
+ rDev.DrawImage( lcl_centerWithin( aDrawRect, rBitmapSize ), *pImage, nStyle );
}
-}
+ break;
-// -----------------------------------------------------------------------
-
-void ImageControl::SetBitmap( const BitmapEx& rBmp )
-{
- maBmp = rBmp;
- StateChanged( STATE_CHANGE_DATA );
-}
-
-// -----------------------------------------------------------------------
+ case ImageScaleMode::Isotropic:
+ {
+ const Size aPaintSize = lcl_calcPaintSize( aDrawRect, rBitmapSize );
+ rDev.DrawImage(
+ lcl_centerWithin( aDrawRect, aPaintSize ),
+ aPaintSize,
+ *pImage, nStyle );
+ }
+ break;
-BOOL ImageControl::SetModeBitmap( const BitmapEx& rBitmap, BmpColorMode eMode )
-{
- if( eMode == BMP_COLOR_NORMAL )
- SetBitmap( rBitmap );
- else if( eMode == BMP_COLOR_HIGHCONTRAST )
+ case ImageScaleMode::Anisotropic:
{
- maBmpHC = rBitmap;
- StateChanged( STATE_CHANGE_DATA );
+ rDev.DrawImage(
+ aDrawRect.TopLeft(),
+ aDrawRect.GetSize(),
+ *pImage, nStyle );
}
- else
- return FALSE;
- return TRUE;
-}
+ break;
-// -----------------------------------------------------------------------
+ default:
+ OSL_ENSURE( false, "ImageControl::ImplDraw: unhandled scale mode!" );
+ break;
-const BitmapEx& ImageControl::GetModeBitmap( BmpColorMode eMode ) const
-{
- if( eMode == BMP_COLOR_HIGHCONTRAST )
- return maBmpHC;
- else
- return maBmp;
+ } // switch ( mnScaleMode )
}
// -----------------------------------------------------------------------
-void ImageControl::Paint( const Rectangle& rRect )
+void ImageControl::Paint( const Rectangle& /*rRect*/ )
{
- FixedImage::Paint( rRect );
+ ImplDraw( *this, 0, Point(), GetOutputSizePixel() );
+
if( HasFocus() )
{
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();
@@ -252,6 +193,27 @@ void ImageControl::Paint( const Rectangle& rRect )
}
// -----------------------------------------------------------------------
+void ImageControl::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags )
+{
+ const Point aPos = pDev->LogicToPixel( rPos );
+ const Size aSize = pDev->LogicToPixel( rSize );
+ Rectangle aRect( aPos, aSize );
+
+ pDev->Push();
+ pDev->SetMapMode();
+
+ // Border
+ if ( !(nFlags & WINDOW_DRAW_NOBORDER) && (GetStyle() & WB_BORDER) )
+ {
+ ImplDrawFrame( pDev, aRect );
+ }
+ pDev->IntersectClipRegion( aRect );
+ ImplDraw( *pDev, nFlags, aRect.TopLeft(), aRect.GetSize() );
+
+ pDev->Pop();
+}
+
+// -----------------------------------------------------------------------
void ImageControl::GetFocus()
{
diff --git a/vcl/source/control/longcurr.cxx b/vcl/source/control/longcurr.cxx
index 65fe11929d1e..aae78baa3fb7 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_uLong 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_uLong 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 03527bf083a7..594b76684a1a 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -104,7 +104,7 @@ void ListBox::ImplInitListBoxData()
mpBtn = NULL;
mnDDHeight = 0;
- mbDDAutoSize = TRUE;
+ mbDDAutoSize = sal_True;
mnSaveValue = LISTBOX_ENTRY_NOTFOUND;
mnLineCount = 0;
}
@@ -126,7 +126,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 ) )
@@ -141,12 +141,12 @@ void ListBox::ImplInit( Window* pParent, WinBits nStyle )
{
sal_Int32 nHeight = aBoundingRgn.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 ) );
mpFloatWin->GetDropTarget()->addDropTargetListener(xDrop);
@@ -185,9 +185,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 );
}
// -----------------------------------------------------------------------
@@ -207,12 +207,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 )
@@ -227,7 +227,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() )
@@ -276,7 +276,7 @@ IMPL_LINK( ListBox, ImplSelectionChangedHdl, void*, n )
{
if ( !mpImplLB->IsTrackingSelect() )
{
- USHORT nChanged = (USHORT)(ULONG)n;
+ sal_uInt16 nChanged = (sal_uInt16)(sal_uLong)n;
const ImplEntryList* pEntryList = mpImplLB->GetEntryList();
if ( pEntryList->IsEntryPosSelected( nChanged ) )
{
@@ -312,8 +312,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();
@@ -335,9 +335,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 );
@@ -356,7 +356,7 @@ IMPL_LINK( ListBox, ImplPopupModeEndHdl, void*, EMPTYARG )
if( mpImplWin )
mpImplWin->ImplClearLayoutData();
- mpBtn->SetPressed( FALSE );
+ mpBtn->SetPressed( sal_False );
ImplCallEventListeners( VCLEVENT_DROPDOWN_CLOSE );
return 0;
}
@@ -373,8 +373,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 );
}
}
@@ -382,9 +382,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_uLong 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 );
@@ -399,8 +399,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 );
@@ -434,7 +434,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 )
@@ -471,7 +471,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 );
@@ -479,10 +479,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 );
@@ -566,7 +566,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 );
@@ -580,7 +580,7 @@ void ListBox::DataChanged( const DataChangedEvent& rDCEvt )
// -----------------------------------------------------------------------
-void ListBox::EnableAutoSize( BOOL bAuto )
+void ListBox::EnableAutoSize( sal_Bool bAuto )
{
mbDDAutoSize = bAuto;
if ( mpFloatWin )
@@ -594,7 +594,7 @@ void ListBox::EnableAutoSize( BOOL bAuto )
// -----------------------------------------------------------------------
-void ListBox::EnableDDAutoWidth( BOOL b )
+void ListBox::EnableDDAutoWidth( sal_Bool b )
{
if ( mpFloatWin )
mpFloatWin->SetAutoWidth( b );
@@ -602,14 +602,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 )
@@ -618,7 +618,7 @@ void ListBox::SetDropDownLineCount( USHORT nLines )
// -----------------------------------------------------------------------
-USHORT ListBox::GetDropDownLineCount() const
+sal_uInt16 ListBox::GetDropDownLineCount() const
{
if ( mpFloatWin )
return mpFloatWin->GetDropDownLineCount();
@@ -627,7 +627,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 ) )
{
@@ -747,7 +747,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();
@@ -767,7 +767,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
@@ -892,8 +892,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 )
@@ -930,8 +930,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;
}
@@ -973,14 +973,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()
@@ -1046,30 +1046,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;
}
@@ -1083,7 +1083,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) );
@@ -1091,7 +1091,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 );
@@ -1100,90 +1100,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 );
@@ -1191,51 +1191,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;
@@ -1257,26 +1257,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 );
@@ -1286,12 +1286,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 );
@@ -1299,7 +1299,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:
@@ -1309,7 +1309,7 @@ void ListBox::EnableMultiSelection( BOOL bMulti, BOOL bStackSelection )
// -----------------------------------------------------------------------
-BOOL ListBox::IsMultiSelectionEnabled() const
+sal_Bool ListBox::IsMultiSelectionEnabled() const
{
return mpImplLB->IsMultiSelectionEnabled();
}
@@ -1406,7 +1406,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();
@@ -1448,19 +1448,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;
}
}
@@ -1481,7 +1481,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 );
@@ -1507,7 +1507,7 @@ const Size& ListBox::GetUserItemSize() const
// -----------------------------------------------------------------------
-void ListBox::EnableUserDraw( BOOL bUserDraw )
+void ListBox::EnableUserDraw( sal_Bool bUserDraw )
{
mpImplLB->GetMainWindow()->EnableUserDraw( bUserDraw );
if ( mpImplWin )
@@ -1516,14 +1516,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 )
{
@@ -1534,14 +1534,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 );
}
@@ -1555,7 +1555,7 @@ void ListBox::SetSeparatorPos()
// -----------------------------------------------------------------------
-USHORT ListBox::GetSeparatorPos() const
+sal_uInt16 ListBox::GetSeparatorPos() const
{
return mpImplLB->GetSeparatorPos();
}
@@ -1576,21 +1576,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();
}
@@ -1625,7 +1625,7 @@ MultiListBox::MultiListBox( Window* pParent, WinBits nStyle ) :
ListBox( WINDOW_MULTILISTBOX )
{
ImplInit( pParent, nStyle );
- EnableMultiSelection( TRUE );
+ EnableMultiSelection( sal_True );
}
// -----------------------------------------------------------------------
@@ -1640,5 +1640,5 @@ MultiListBox::MultiListBox( Window* pParent, const ResId& rResId ) :
if ( !(nStyle & WB_HIDE ) )
Show();
- EnableMultiSelection( TRUE );
+ EnableMultiSelection( sal_True );
}
diff --git a/vcl/source/control/makefile.mk b/vcl/source/control/makefile.mk
index b1644e58ccd9..de2613b1084f 100644
--- a/vcl/source/control/makefile.mk
+++ b/vcl/source/control/makefile.mk
@@ -43,16 +43,21 @@ CDEFS+=-D_STD_NO_NAMESPACE -D_VOS_NO_NAMESPACE -D_UNO_NO_NAMESPACE
# --- Files --------------------------------------------------------
-SLOFILES= $(SLO)$/button.obj \
+EXCEPTIONSFILES= \
+ $(SLO)$/button.obj \
$(SLO)$/ctrl.obj \
- $(SLO)$/combobox.obj \
$(SLO)$/edit.obj \
- $(SLO)$/field.obj \
$(SLO)$/field2.obj \
+ $(SLO)$/ilstbox.obj \
+ $(SLO)$/tabctrl.obj \
+ $(SLO)$/throbber.obj
+
+SLOFILES= $(EXCEPTIONSFILES) \
+ $(SLO)$/combobox.obj \
+ $(SLO)$/field.obj \
$(SLO)$/fixbrd.obj \
$(SLO)$/fixed.obj \
$(SLO)$/group.obj \
- $(SLO)$/ilstbox.obj \
$(SLO)$/imgctrl.obj \
$(SLO)$/longcurr.obj \
$(SLO)$/lstbox.obj \
@@ -62,19 +67,12 @@ SLOFILES= $(SLO)$/button.obj \
$(SLO)$/slider.obj \
$(SLO)$/spinfld.obj \
$(SLO)$/spinbtn.obj \
- $(SLO)$/tabctrl.obj \
$(SLO)$/quickselectionengine.obj
-EXCEPTIONSFILES= \
- $(SLO)$/button.obj \
- $(SLO)$/ctrl.obj \
- $(SLO)$/edit.obj \
- $(SLO)$/field2.obj \
- $(SLO)$/ilstbox.obj \
- $(SLO)$/tabctrl.obj
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
.INCLUDE : $(PRJ)$/util$/target.pmk
+
diff --git a/vcl/source/control/menubtn.cxx b/vcl/source/control/menubtn.cxx
index c264d01916fc..5996a5b2d1b1 100644
--- a/vcl/source/control/menubtn.cxx
+++ b/vcl/source/control/menubtn.cxx
@@ -78,10 +78,10 @@ void MenuButton::ImplExecuteMenu()
Point aPos( 0, 1 );
Size aSize = GetSizePixel();
Rectangle aRect( aPos, aSize );
- SetPressed( TRUE );
+ SetPressed( sal_True );
EndSelection();
mnCurItemId = mpMenu->Execute( this, aRect, POPUPMENU_EXECUTE_DOWN );
- SetPressed( FALSE );
+ SetPressed( sal_False );
if ( mnCurItemId )
{
Select();
@@ -120,7 +120,7 @@ void MenuButton::ImplLoadRes( const ResId& rResId )
{
Control::ImplLoadRes( rResId );
- ULONG nObjMask = ReadLongRes();
+ sal_uLong nObjMask = ReadLongRes();
if ( RSCMENUBUTTON_MENU & nObjMask )
{
@@ -196,7 +196,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) &&
@@ -223,7 +223,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..f03136394512 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_uLong 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 4261965995fa..9bc71f1a55e3 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_uLong 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 )
{
ScrollbarValue scrValue;
- 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) )
@@ -683,18 +683,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 )
@@ -800,7 +800,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 );
@@ -818,7 +818,7 @@ long ScrollBar::ImplScroll( long nNewPos, BOOL bCallEndScroll )
// -----------------------------------------------------------------------
-long ScrollBar::ImplDoAction( BOOL bCallEndScroll )
+long ScrollBar::ImplDoAction( sal_Bool bCallEndScroll )
{
long nDelta = 0;
@@ -848,12 +848,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 );
Rectangle aControlRegion( aPoint, GetOutputSizePixel() );
@@ -920,7 +920,7 @@ void ScrollBar::ImplDoMouseAction( const Point& rMousePos, BOOL bCallAction )
if ( nOldStateFlags != mnStateFlags )
ImplDraw( mnDragDraw, this );
if ( bAction )
- ImplDoAction( FALSE );
+ ImplDoAction( sal_False );
}
// -----------------------------------------------------------------------
@@ -960,10 +960,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 );
Rectangle aControlRegion( aPoint, GetOutputSizePixel() );
@@ -1006,7 +1006,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
}
@@ -1020,7 +1020,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
@@ -1042,7 +1042,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;
@@ -1087,7 +1087,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);
@@ -1124,7 +1124,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
{
@@ -1198,9 +1198,9 @@ void ScrollBar::Paint( const Rectangle& )
void ScrollBar::Resize()
{
Control::Resize();
- mbCalcSize = TRUE;
+ mbCalcSize = sal_True;
if ( IsReallyVisible() )
- ImplCalc( FALSE );
+ ImplCalc( sal_False );
Invalidate();
}
@@ -1239,7 +1239,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() );
@@ -1265,17 +1265,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();
}
}
@@ -1292,8 +1292,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();
}
}
@@ -1309,8 +1309,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();
}
}
@@ -1319,8 +1319,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 );
Rectangle aControlRegion( aPoint, GetOutputSizePixel() );
@@ -1382,7 +1382,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 );
@@ -1422,7 +1422,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;
}
@@ -1437,7 +1437,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 26a4c1cfd205..0058acc005c7 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;
@@ -303,9 +303,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 )
{
@@ -356,9 +356,9 @@ void Slider::ImplCalc( BOOL bUpdate )
(nOldChannelPixRange != mnChannelPixRange) ||
(nOldChannelPixTop != mnChannelPixTop) ||
(nOldChannelPixBottom != mnChannelPixBottom) )
- bInvalidateAll = TRUE;
+ bInvalidateAll = sal_True;
- mbCalcSize = FALSE;
+ mbCalcSize = sal_False;
}
if ( mnThumbPixRange )
@@ -367,23 +367,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;
ControlState nState = ( IsEnabled() ? CTRL_STATE_ENABLED : 0 ) | ( HasFocus() ? CTRL_STATE_FOCUSED : 0 );
@@ -514,7 +514,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;
@@ -533,7 +533,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;
@@ -552,7 +552,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 );
@@ -570,7 +570,7 @@ long Slider::ImplSlide( long nNewPos, BOOL bCallEndSlide )
// -----------------------------------------------------------------------
-long Slider::ImplDoAction( BOOL bCallEndSlide )
+long Slider::ImplDoAction( sal_Bool bCallEndSlide )
{
long nDelta = 0;
@@ -604,10 +604,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 )
{
@@ -650,7 +650,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 )
@@ -672,7 +672,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;
}
@@ -687,7 +687,7 @@ long Slider::ImplDoSlideAction( ScrollType eScrollType )
return 0;
meScrollType = eScrollType;
- long nDelta = ImplDoAction( TRUE );
+ long nDelta = ImplDoAction( sal_True );
meScrollType = SCROLL_DONTKNOW;
return nDelta;
}
@@ -699,7 +699,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 ) )
{
@@ -760,7 +760,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 );
@@ -768,7 +768,7 @@ void Slider::MouseButtonUp( const MouseEvent& )
ImplDraw( mnDragDraw );
mnDragDraw = 0;
- ImplDoAction( TRUE );
+ ImplDoAction( sal_True );
meScrollType = SCROLL_DONTKNOW;
}
}
@@ -780,7 +780,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 )
@@ -917,9 +917,9 @@ void Slider::Paint( const Rectangle& )
void Slider::Resize()
{
Control::Resize();
- mbCalcSize = TRUE;
+ mbCalcSize = sal_True;
if ( IsReallyVisible() )
- ImplCalc( FALSE );
+ ImplCalc( sal_False );
Invalidate();
}
@@ -937,17 +937,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();
}
}
@@ -963,8 +963,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..52b3fdca9730 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_uLong 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 c51ac834f1b4..d7501a6f99b6 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
@@ -131,9 +131,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) )
{
@@ -147,13 +147,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;
@@ -187,11 +187,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 )
@@ -297,14 +297,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;
}
// --------------------------------------------------------------------
@@ -315,7 +315,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
@@ -329,7 +329,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 );
@@ -337,9 +337,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 );
}
}
@@ -416,7 +416,7 @@ void SpinField::MouseButtonDown( const MouseEvent& rMEvt )
{
if ( !HasFocus() && ( !mpEdit || !mpEdit->HasFocus() ) )
{
- mbNoSelect = TRUE;
+ mbNoSelect = sal_True;
GrabFocus();
}
@@ -424,20 +424,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() ) );
}
@@ -459,20 +459,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();
@@ -489,7 +489,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 )
@@ -507,7 +507,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 )
@@ -538,7 +538,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:
@@ -559,7 +559,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;
}
@@ -591,7 +591,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()
@@ -643,7 +643,7 @@ void SpinField::Paint( const Rectangle& rRect )
{
if ( mbSpin )
{
- BOOL bEnable = IsEnabled();
+ sal_Bool bEnable = IsEnabled();
ImplDrawSpinButton( this, maUpperRect, maLowerRect,
mbUpperIn, mbLowerIn, bEnable, bEnable );
}
@@ -652,7 +652,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 );
@@ -699,7 +699,7 @@ void SpinField::ImplCalcButtonAreas( OutputDevice* pDev, const Size& rOutSz, Rec
if ( !(aSize.Height() & 0x01) )
nBottom1--;
- BOOL bNativeRegionOK = FALSE;
+ sal_Bool bNativeRegionOK = sal_False;
Rectangle aContentUp, aContentDown;
if ( (pDev->GetOutDevType() == OUTDEV_WINDOW) &&
@@ -838,9 +838,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 )
{
@@ -853,21 +853,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 )
@@ -958,15 +958,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;
}
// -----------------------------------------------------------------------
@@ -997,7 +997,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 );
@@ -1030,7 +1030,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_uLong nFlags )
{
Edit::Draw( pDev, rPos, rSize, nFlags );
@@ -1071,7 +1071,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 )
@@ -1083,7 +1083,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 2c81b6af241b..3140d100aa86 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -52,22 +52,22 @@
struct ImplTabItem
{
- USHORT mnId;
- USHORT mnTabPageResId;
+ sal_uInt16 mnId;
+ sal_uInt16 mnTabPageResId;
TabPage* mpTabPage;
String maText;
String maFormatText;
String maHelpText;
rtl::OString maHelpId;
Rectangle maRect;
- USHORT mnLine;
+ sal_uInt16 mnLine;
bool mbFullVisible;
bool mbEnabled;
Image maTabImage;
ImplTabItem()
: mnId( 0 ), mnTabPageResId( 0 ), mpTabPage( NULL ),
- mnLine( 0 ), mbFullVisible( FALSE ), mbEnabled( true )
+ mnLine( 0 ), mbFullVisible( sal_False ), mbEnabled( true )
{}
};
@@ -117,16 +117,16 @@ void TabControl::ImplInit( Window* pParent, WinBits nStyle )
mnMaxPageWidth = 0;
mnActPageId = 0;
mnCurPageId = 0;
- mbFormat = TRUE;
- mbRestoreHelpId = FALSE;
- mbRestoreUnqId = FALSE;
- mbSmallInvalidate = FALSE;
- mbExtraSpace = FALSE;
+ mbFormat = sal_True;
+ mbRestoreHelpId = sal_False;
+ mbRestoreUnqId = sal_False;
+ mbSmallInvalidate = sal_False;
+ mbExtraSpace = sal_False;
mpTabCtrlData = new ImplTabCtrlData;
mpTabCtrlData->mpListBox = NULL;
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
if( (nStyle & WB_DROPDOWN) )
{
@@ -139,7 +139,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 ) );
@@ -160,8 +160,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 );
@@ -176,17 +176,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() );
@@ -236,14 +236,14 @@ void TabControl::ImplLoadRes( const ResId& rResId )
{
Control::ImplLoadRes( rResId );
- ULONG nObjMask = ReadLongRes();
+ sal_uLong nObjMask = ReadLongRes();
if ( nObjMask & RSC_TABCONTROL_ITEMLIST )
{
- ULONG nEle = ReadLongRes();
+ sal_uLong nEle = ReadLongRes();
// Item hinzufuegen
- for( ULONG i = 0; i < nEle; i++ )
+ for( sal_uLong i = 0; i < nEle; i++ )
{
InsertPage( ResId( (RSHEADER_TYPE *)GetClassRes(), *rResId.GetResMgr() ) );
IncrementRes( GetObjSizeRes( (RSHEADER_TYPE *)GetClassRes() ) );
@@ -271,7 +271,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 )
@@ -352,32 +352,37 @@ 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 )
+ if ( nWidth < 0 )
nWidth = aWinSize.Width();
- if ( nHeight == -1 )
+ if ( nHeight < 0 )
nHeight = aWinSize.Height();
if ( mpTabCtrlData->maItemList.empty() )
{
- return Rectangle( Point( TAB_OFFSET, TAB_OFFSET ),
- Size( nWidth-TAB_OFFSET*2, nHeight-TAB_OFFSET*2 ) );
+ long nW = nWidth-TAB_OFFSET*2;
+ long nH = nHeight-TAB_OFFSET*2;
+ return (nW > 0 && nH > 0)
+ ? Rectangle( Point( TAB_OFFSET, TAB_OFFSET ), Size( nW, nH ) )
+ : Rectangle();
}
if ( nItemPos == TAB_PAGERECT )
{
- USHORT nLastPos;
+ sal_uInt16 nLastPos;
if ( mnCurPageId )
nLastPos = GetPagePos( mnCurPageId );
else
nLastPos = 0;
Rectangle aRect = ImplGetTabRect( nLastPos, nWidth, nHeight );
- aRect = Rectangle( Point( TAB_OFFSET, aRect.Bottom()+TAB_OFFSET ),
- Size( nWidth-TAB_OFFSET*2,
- nHeight-aRect.Bottom()-TAB_OFFSET*2 ) );
+ long nW = nWidth-TAB_OFFSET*2;
+ long nH = nHeight-aRect.Bottom()-TAB_OFFSET*2;
+ aRect = (nW > 0 && nH > 0)
+ ? Rectangle( Point( TAB_OFFSET, aRect.Bottom()+TAB_OFFSET ), Size( nW, nH ) )
+ : Rectangle();
return aRect;
}
@@ -390,9 +395,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
@@ -412,16 +417,16 @@ 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();
- 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;
@@ -444,10 +449,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();
@@ -463,8 +468,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;
@@ -480,7 +485,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 )
{
@@ -541,7 +546,7 @@ Rectangle TabControl::ImplGetTabRect( USHORT nItemPos, long nWidth, long nHeight
mnLastWidth = nWidth;
mnLastHeight = nHeight;
- mbFormat = FALSE;
+ mbFormat = sal_False;
}
return size_t(nItemPos) < mpTabCtrlData->maItemList.size() ? mpTabCtrlData->maItemList[nItemPos].maRect : Rectangle();
@@ -549,7 +554,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();
@@ -561,7 +566,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) )
@@ -607,12 +612,12 @@ void TabControl::ImplChangeTabPage( USHORT nId, USHORT nOldId )
// also set the help id of the parent window to that of the tab page
if ( !GetHelpId().getLength() )
{
- mbRestoreHelpId = TRUE;
+ mbRestoreHelpId = sal_True;
pCtrlParent->SetHelpId( pPage->GetHelpId() );
}
if ( !pCtrlParent->GetUniqueId().getLength() )
{
- mbRestoreUnqId = TRUE;
+ mbRestoreUnqId = sal_True;
pCtrlParent->SetUniqueId( pPage->GetUniqueId() );
}
@@ -620,7 +625,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 );
@@ -650,7 +655,7 @@ void TabControl::ImplChangeTabPage( USHORT nId, USHORT nOldId )
// -----------------------------------------------------------------------
-BOOL TabControl::ImplPosCurTabPage()
+sal_Bool TabControl::ImplPosCurTabPage()
{
// Aktuelle TabPage resizen/positionieren
ImplTabItem* pItem = ImplGetItem( GetCurPageId() );
@@ -658,17 +663,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();
@@ -698,14 +703,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;
@@ -767,13 +772,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;
@@ -795,10 +800,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
{
@@ -809,7 +814,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 )
{
Rectangle aCtrlRegion( pItem->maRect );
ControlState nState = 0;
@@ -908,7 +913,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 );
@@ -926,7 +931,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 ),
@@ -955,7 +960,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() )
{
@@ -963,7 +968,7 @@ long TabControl::ImplHandleKeyEvent( const KeyEvent& rKeyEvent )
{
if ( (nKeyCode == KEY_TAB) || (nKeyCode == KEY_PAGEUP) )
{
- ImplActivateTabPage( FALSE );
+ ImplActivateTabPage( sal_False );
nRet = 1;
}
}
@@ -971,7 +976,7 @@ long TabControl::ImplHandleKeyEvent( const KeyEvent& rKeyEvent )
{
if ( (nKeyCode == KEY_TAB) || (nKeyCode == KEY_PAGEDOWN) )
{
- ImplActivateTabPage( TRUE );
+ ImplActivateTabPage( sal_True );
nRet = 1;
}
}
@@ -1016,7 +1021,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 );
@@ -1033,11 +1038,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 );
}
}
@@ -1087,17 +1092,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;
@@ -1207,7 +1212,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 )
@@ -1223,7 +1228,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 );
}
}
@@ -1231,7 +1236,7 @@ void TabControl::ImplPaint( const Rectangle& rRect, bool bLayout )
ImplShowFocus();
if( ! bLayout )
- mbSmallInvalidate = TRUE;
+ mbSmallInvalidate = sal_True;
}
// -----------------------------------------------------------------------
@@ -1255,10 +1260,10 @@ 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();
@@ -1268,7 +1273,7 @@ void TabControl::Resize()
if ( !it->mbFullVisible ||
(it->maRect.Right()-2 >= nNewWidth) )
{
- mbSmallInvalidate = FALSE;
+ mbSmallInvalidate = sal_False;
break;
}
}
@@ -1325,7 +1330,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 )
{
@@ -1414,7 +1419,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();
@@ -1423,7 +1428,7 @@ void TabControl::Command( const CommandEvent& rCEvt )
else
{
aMenuPos = ImplGetTabRect( GetPagePos( mnCurPageId ) ).Center();
- bMenu = TRUE;
+ bMenu = sal_True;
}
if ( bMenu )
@@ -1438,7 +1443,7 @@ void TabControl::Command( const CommandEvent& rCEvt )
aMenu.SetHelpId( it->mnId, it->maHelpId );
}
- USHORT nId = aMenu.Execute( this, aMenuPos );
+ sal_uInt16 nId = aMenu.Execute( this, aMenuPos );
if ( nId && (nId != mnCurPageId) )
SelectTabPage( nId );
return;
@@ -1468,17 +1473,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();
}
}
@@ -1494,7 +1499,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();
}
}
@@ -1594,7 +1599,7 @@ long TabControl::DeactivatePage()
if ( maDeactivateHdl.IsSet() )
return maDeactivateHdl.Call( this );
else
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -1621,16 +1626,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_uLong 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;
@@ -1642,14 +1647,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,
@@ -1688,9 +1693,9 @@ void TabControl::InsertPage( USHORT nPageId, const XubString& rText,
pItem->mpTabPage = NULL;
pItem->mnTabPageResId = 0;
pItem->maText = rText;
- pItem->mbFullVisible = FALSE;
+ pItem->mbFullVisible = sal_False;
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsUpdateMode() )
Invalidate();
@@ -1698,14 +1703,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_uLong)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 )
@@ -1739,13 +1744,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_uLong) nPageId );
}
}
@@ -1761,7 +1766,7 @@ void TabControl::Clear()
ImplFreeLayoutData();
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsUpdateMode() )
Invalidate();
@@ -1770,14 +1775,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) );
@@ -1793,14 +1798,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;
@@ -1809,13 +1814,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;
@@ -1823,11 +1828,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;
}
@@ -1836,9 +1841,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 )
{
@@ -1863,8 +1868,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 );
}
@@ -1873,7 +1878,7 @@ void TabControl::SetCurPageId( USHORT nPageId )
// -----------------------------------------------------------------------
-USHORT TabControl::GetCurPageId() const
+sal_uInt16 TabControl::GetCurPageId() const
{
if ( mnActPageId )
return mnActPageId;
@@ -1883,13 +1888,13 @@ USHORT TabControl::GetCurPageId() const
// -----------------------------------------------------------------------
-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_uLong) mnCurPageId );
if ( DeactivatePage() )
{
mnActPageId = nPageId;
@@ -1900,14 +1905,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_uLong) nPageId );
}
}
}
// -----------------------------------------------------------------------
-void TabControl::SetTabPage( USHORT nPageId, TabPage* pTabPage )
+void TabControl::SetTabPage( sal_uInt16 nPageId, TabPage* pTabPage )
{
ImplTabItem* pItem = ImplGetItem( nPageId );
@@ -1932,7 +1937,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 );
@@ -1944,7 +1949,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 );
@@ -1956,30 +1961,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_uLong) nPageId );
}
}
// -----------------------------------------------------------------------
-XubString TabControl::GetPageText( USHORT nPageId ) const
+XubString TabControl::GetPageText( sal_uInt16 nPageId ) const
{
ImplTabItem* pItem = ImplGetItem( nPageId );
@@ -1991,7 +1996,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 );
@@ -2001,7 +2006,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 );
@@ -2022,7 +2027,7 @@ const XubString& TabControl::GetHelpText( USHORT nPageId ) const
// -----------------------------------------------------------------------
-void TabControl::SetHelpId( USHORT nPageId, const rtl::OString& rHelpId )
+void TabControl::SetHelpId( sal_uInt16 nPageId, const rtl::OString& rHelpId )
{
ImplTabItem* pItem = ImplGetItem( nPageId );
@@ -2032,7 +2037,7 @@ void TabControl::SetHelpId( USHORT nPageId, const rtl::OString& rHelpId )
// -----------------------------------------------------------------------
-rtl::OString TabControl::GetHelpId( USHORT nPageId ) const
+rtl::OString TabControl::GetHelpId( sal_uInt16 nPageId ) const
{
rtl::OString aRet;
ImplTabItem* pItem = ImplGetItem( nPageId );
@@ -2045,14 +2050,14 @@ rtl::OString 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();
}
@@ -2060,7 +2065,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;
@@ -2068,7 +2073,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;
@@ -2091,7 +2096,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;
@@ -2112,7 +2117,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;
}
}
@@ -2133,7 +2138,7 @@ void TabControl::FillLayoutData() const
// -----------------------------------------------------------------------
-Rectangle TabControl::GetTabPageBounds( USHORT nPage ) const
+Rectangle TabControl::GetTabPageBounds( sal_uInt16 nPage ) const
{
Rectangle aRet;
@@ -2158,7 +2163,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/control/throbber.cxx b/vcl/source/control/throbber.cxx
new file mode 100644
index 000000000000..6ebd02cb5de1
--- /dev/null
+++ b/vcl/source/control/throbber.cxx
@@ -0,0 +1,325 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_vcl.hxx"
+
+#include "vcl/throbber.hxx"
+#include "vcl/svapp.hxx"
+
+#include <com/sun/star/graphic/XGraphicProvider.hpp>
+#include <com/sun/star/awt/ImageScaleMode.hpp>
+
+#include <comphelper/componentcontext.hxx>
+#include <comphelper/namedvaluecollection.hxx>
+#include <comphelper/processfactory.hxx>
+#include <rtl/ustrbuf.hxx>
+#include <tools/diagnose_ex.h>
+#include <tools/urlobj.hxx>
+
+#include <limits>
+
+using ::com::sun::star::uno::Sequence;
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::graphic::XGraphic;
+using ::com::sun::star::graphic::XGraphicProvider;
+using ::com::sun::star::uno::UNO_QUERY_THROW;
+using ::com::sun::star::uno::UNO_QUERY;
+using ::com::sun::star::uno::Exception;
+namespace ImageScaleMode = ::com::sun::star::awt::ImageScaleMode;
+
+//----------------------------------------------------------------------------------------------------------------------
+Throbber::Throbber( Window* i_parentWindow, WinBits i_style, const ImageSet i_imageSet )
+ :ImageControl( i_parentWindow, i_style )
+ ,mbRepeat( sal_True )
+ ,mnStepTime( 100 )
+ ,mnCurStep( 0 )
+ ,mnStepCount( 0 )
+ ,meImageSet( i_imageSet )
+{
+ maWaitTimer.SetTimeout( mnStepTime );
+ maWaitTimer.SetTimeoutHdl( LINK( this, Throbber, TimeOutHdl ) );
+
+ SetScaleMode( ImageScaleMode::None );
+ initImages();
+}
+
+//--------------------------------------------------------------------
+Throbber::Throbber( Window* i_parentWindow, const ResId& i_resId, const ImageSet i_imageSet )
+ :ImageControl( i_parentWindow, i_resId )
+ ,mbRepeat( sal_True )
+ ,mnStepTime( 100 )
+ ,mnCurStep( 0 )
+ ,mnStepCount( 0 )
+ ,meImageSet( i_imageSet )
+{
+ maWaitTimer.SetTimeout( mnStepTime );
+ maWaitTimer.SetTimeoutHdl( LINK( this, Throbber, TimeOutHdl ) );
+
+ SetScaleMode( ImageScaleMode::None );
+ initImages();
+}
+
+//----------------------------------------------------------------------------------------------------------------------
+Throbber::~Throbber()
+{
+ maWaitTimer.Stop();
+}
+
+//----------------------------------------------------------------------------------------------------------------------
+namespace
+{
+ //..................................................................................................................
+ ::rtl::OUString lcl_getHighContrastURL( ::rtl::OUString const& i_imageURL )
+ {
+ INetURLObject aURL( i_imageURL );
+ if ( aURL.GetProtocol() != INET_PROT_PRIV_SOFFICE )
+ {
+ OSL_VERIFY( aURL.insertName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "hicontrast" ) ), false, 0 ) );
+ return aURL.GetMainURL( INetURLObject::NO_DECODE );
+ }
+ // the private: scheme is not considered to be hierarchical by INetURLObject, so manually insert the
+ // segment
+ const sal_Int32 separatorPos = i_imageURL.indexOf( '/' );
+ ENSURE_OR_RETURN( separatorPos != -1, "lcl_getHighContrastURL: unsipported URL scheme - cannot automatically determine HC version!", i_imageURL );
+
+ ::rtl::OUStringBuffer composer;
+ composer.append( i_imageURL.copy( 0, separatorPos ) );
+ composer.appendAscii( "/hicontrast" );
+ composer.append( i_imageURL.copy( separatorPos ) );
+ return composer.makeStringAndClear();
+ }
+
+ //..................................................................................................................
+ ::std::vector< Image > lcl_loadImageSet( const Throbber::ImageSet i_imageSet, const bool i_isHiContrast )
+ {
+ ::std::vector< Image > aImages;
+ ENSURE_OR_RETURN( i_imageSet != Throbber::IMAGES_NONE, "lcl_loadImageSet: illegal image set", aImages );
+
+ const ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
+ const Reference< XGraphicProvider > xGraphicProvider( aContext.createComponent( "com.sun.star.graphic.GraphicProvider" ), UNO_QUERY_THROW );
+
+ ::std::vector< ::rtl::OUString > aImageURLs( Throbber::getDefaultImageURLs( i_imageSet ) );
+ aImages.reserve( aImageURLs.size() );
+
+ ::comphelper::NamedValueCollection aMediaProperties;
+ for ( ::std::vector< ::rtl::OUString >::const_iterator imageURL = aImageURLs.begin();
+ imageURL != aImageURLs.end();
+ ++imageURL
+ )
+ {
+ Reference< XGraphic > xGraphic;
+ if ( i_isHiContrast )
+ {
+ aMediaProperties.put( "URL", lcl_getHighContrastURL( *imageURL ) );
+ xGraphic.set( xGraphicProvider->queryGraphic( aMediaProperties.getPropertyValues() ), UNO_QUERY );
+ }
+ if ( !xGraphic.is() )
+ {
+ aMediaProperties.put( "URL", *imageURL );
+ xGraphic.set( xGraphicProvider->queryGraphic( aMediaProperties.getPropertyValues() ), UNO_QUERY );
+ }
+ aImages.push_back( Image( xGraphic ) );
+ }
+
+ return aImages;
+ }
+}
+
+//----------------------------------------------------------------------------------------------------------------------
+void Throbber::Resize()
+{
+ ImageControl::Resize();
+
+ if ( meImageSet == IMAGES_AUTO )
+ initImages();
+}
+
+//----------------------------------------------------------------------------------------------------------------------
+void Throbber::initImages()
+{
+ if ( meImageSet == IMAGES_NONE )
+ return;
+
+ try
+ {
+ ::std::vector< ::std::vector< Image > > aImageSets;
+ const bool isHiContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
+ if ( meImageSet == IMAGES_AUTO )
+ {
+ aImageSets.push_back( lcl_loadImageSet( IMAGES_16_PX, isHiContrast ) );
+ aImageSets.push_back( lcl_loadImageSet( IMAGES_32_PX, isHiContrast ) );
+ aImageSets.push_back( lcl_loadImageSet( IMAGES_64_PX, isHiContrast ) );
+ }
+ else
+ {
+ aImageSets.push_back( lcl_loadImageSet( meImageSet, isHiContrast ) );
+ }
+
+ // find the best matching image set (size-wise)
+ const ::Size aWindowSizePixel = GetSizePixel();
+ size_t nPreferredSet = 0;
+ if ( aImageSets.size() > 1 )
+ {
+ long nMinimalDistance = ::std::numeric_limits< long >::max();
+ for ( ::std::vector< ::std::vector< Image > >::const_iterator check = aImageSets.begin();
+ check != aImageSets.end();
+ ++check
+ )
+ {
+ ENSURE_OR_CONTINUE( !check->empty(), "Throbber::initImages: illegal image!" );
+ const Size aImageSize = (*check)[0].GetSizePixel();
+
+ if ( ( aImageSize.Width() > aWindowSizePixel.Width() )
+ || ( aImageSize.Height() > aWindowSizePixel.Height() )
+ )
+ // do not use an image set which doesn't fit into the window
+ continue;
+
+ const sal_Int64 distance =
+ ( aWindowSizePixel.Width() - aImageSize.Width() ) * ( aWindowSizePixel.Width() - aImageSize.Width() )
+ + ( aWindowSizePixel.Height() - aImageSize.Height() ) * ( aWindowSizePixel.Height() - aImageSize.Height() );
+ if ( distance < nMinimalDistance )
+ {
+ nMinimalDistance = distance;
+ nPreferredSet = check - aImageSets.begin();
+ }
+ }
+ }
+
+ if ( nPreferredSet < aImageSets.size() )
+ setImageList( aImageSets[nPreferredSet] );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+}
+
+//----------------------------------------------------------------------------------------------------------------------
+void Throbber::start()
+{
+ maWaitTimer.Start();
+}
+
+//----------------------------------------------------------------------------------------------------------------------
+void Throbber::stop()
+{
+ maWaitTimer.Stop();
+}
+
+//----------------------------------------------------------------------------------------------------------------------
+bool Throbber::isRunning() const
+{
+ return maWaitTimer.IsActive();
+}
+
+//----------------------------------------------------------------------------------------------------------------------
+void Throbber::setImageList( ::std::vector< Image > const& i_images )
+{
+ maImageList = i_images;
+
+ mnStepCount = maImageList.size();
+ const Image aInitialImage( mnStepCount ? maImageList[ 0 ] : Image() );
+ SetImage( aInitialImage );
+}
+
+//----------------------------------------------------------------------------------------------------------------------
+void Throbber::setImageList( const Sequence< Reference< XGraphic > >& rImageList )
+{
+ ::std::vector< Image > aImages( rImageList.getLength() );
+ ::std::copy(
+ rImageList.getConstArray(),
+ rImageList.getConstArray() + rImageList.getLength(),
+ aImages.begin()
+ );
+ setImageList( aImages );
+}
+
+//----------------------------------------------------------------------------------------------------------------------
+::std::vector< ::rtl::OUString > Throbber::getDefaultImageURLs( const ImageSet i_imageSet )
+{
+ ::std::vector< ::rtl::OUString > aImageURLs;
+
+ sal_Char const* const pResolutions[] = { "16", "32", "64" };
+ size_t const nImageCounts[] = { 6, 12, 12 };
+
+ size_t index = 0;
+ switch ( i_imageSet )
+ {
+ case IMAGES_16_PX: index = 0; break;
+ case IMAGES_32_PX: index = 1; break;
+ case IMAGES_64_PX: index = 2; break;
+ case IMAGES_NONE:
+ case IMAGES_AUTO:
+ OSL_ENSURE( false, "Throbber::getDefaultImageURLs: illegal image set!" );
+ return aImageURLs;
+ }
+
+ aImageURLs.reserve( nImageCounts[index] );
+ for ( size_t i=0; i<nImageCounts[index]; ++i )
+ {
+ ::rtl::OUStringBuffer aURL;
+ aURL.appendAscii( "private:graphicrepository/shared/spinner-" );
+ aURL.appendAscii( pResolutions[index] );
+ aURL.appendAscii( "-" );
+ if ( i < 9 )
+ aURL.appendAscii( "0" );
+ aURL.append ( sal_Int32( i + 1 ) );
+ aURL.appendAscii( ".png" );
+
+ aImageURLs.push_back( aURL.makeStringAndClear() );
+ }
+
+ return aImageURLs;
+}
+
+//----------------------------------------------------------------------------------------------------------------------
+IMPL_LINK( Throbber, TimeOutHdl, void*, EMPTYARG )
+{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ if ( maImageList.empty() )
+ return 0;
+
+ if ( mnCurStep < mnStepCount - 1 )
+ mnCurStep += 1;
+ else
+ {
+ if ( mbRepeat )
+ {
+ // start over
+ mnCurStep = 0;
+ }
+ else
+ {
+ stop();
+ }
+ }
+
+ SetImage( maImageList[ mnCurStep ] );
+
+ return 0;
+}
diff --git a/vcl/source/fontsubset/gsub.cxx b/vcl/source/fontsubset/gsub.cxx
index 37650003eefa..403e64768872 100644
--- a/vcl/source/fontsubset/gsub.cxx
+++ b/vcl/source/fontsubset/gsub.cxx
@@ -41,12 +41,10 @@
namespace vcl
{
-typedef sal_uInt32 ULONG;
-typedef sal_uInt32 UINT32;
-typedef sal_uInt16 USHORT;
+typedef sal_uIntPtr sal_uLong;
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 +54,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 +75,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_uLong 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_uLong> 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_uLong 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_uLong 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 +129,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 +147,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 +171,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_uLong 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 +193,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 +209,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 +222,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 +236,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 +253,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 +273,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 +295,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 +304,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 +341,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 43f24e5026ea..c94aad3cbab6 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -1498,7 +1498,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..21c3f15f51c0 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_uLong nDX, sal_uLong 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_uLong nMirrorFlags )
{
return Bitmap::Mirror( nMirrorFlags );
}
// -----------------------------------------------------------------------------
-BOOL AlphaMask::Scale( const Size& rNewSize, ULONG nScaleFlag )
+sal_Bool AlphaMask::Scale( const Size& rNewSize, sal_uLong 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_uLong 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_uLong
#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_uLong nColorCount, sal_uLong* 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_uLong 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..9fc45f2f61d6 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_uLong Animation::mnAnimCount = 0UL;
// -------------------
// - AnimationBitmap -
// -------------------
-ULONG AnimationBitmap::GetChecksum() const
+sal_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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_uLong Animation::GetSizeBytes() const
{
- ULONG nSizeBytes = GetBitmapEx().GetSizeBytes();
+ sal_uLong 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_uLong 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_uLong 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_uLong 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_uLong nTimeout )
{
- maTimer.SetTimeout( Max( nTimeout, (ULONG)(MIN_TIMEOUT + ( mnAnimCount - 1 ) * INC_TIMEOUT) ) * 10L );
+ maTimer.SetTimeout( Max( nTimeout, (sal_uLong)(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_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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..8d831961f8af 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;
@@ -236,9 +236,13 @@ bool BitmapPalette::IsGreyPalette() const
const int nEntryCount = GetEntryCount();
if( !nEntryCount ) // NOTE: an empty palette means 1:1 mapping
return true;
- const BitmapPalette& rGreyPalette = Bitmap::GetGreyPalette( nEntryCount );
- if( rGreyPalette == *this )
- return true;
+ // see above: only certain entry values will result in a valid call to GetGreyPalette
+ if( nEntryCount == 2 || nEntryCount == 4 || nEntryCount == 16 || nEntryCount == 256 )
+ {
+ const BitmapPalette& rGreyPalette = Bitmap::GetGreyPalette( nEntryCount );
+ if( rGreyPalette == *this )
+ return true;
+ }
// TODO: is it worth to compare the entries?
return false;
}
@@ -261,7 +265,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 +314,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 +337,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 +351,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 +362,9 @@ BOOL Bitmap::HasGreyPalette() const
// ------------------------------------------------------------------
-ULONG Bitmap::GetChecksum() const
+sal_uLong Bitmap::GetChecksum() const
{
- ULONG nRet = 0UL;
+ sal_uLong nRet = 0UL;
if( mpImpBmp )
{
@@ -524,44 +528,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_uLong 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 +576,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_uLong nBufSize = pWriteAcc->GetScanlineSize() * pWriteAcc->Height();
memset( pWriteAcc->GetBuffer(), cIndex, nBufSize );
}
else
@@ -598,7 +602,7 @@ BOOL Bitmap::Erase( const Color& rFillColor )
}
ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -606,19 +610,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 +638,7 @@ BOOL Bitmap::Invert()
}
ReleaseAccess( pAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -642,11 +646,11 @@ BOOL Bitmap::Invert()
// ------------------------------------------------------------------
-BOOL Bitmap::Mirror( ULONG nMirrorFlags )
+sal_Bool Bitmap::Mirror( sal_uLong 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 +675,7 @@ BOOL Bitmap::Mirror( ULONG nMirrorFlags )
}
ReleaseAccess( pAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
}
else if( bVert && !bHorz )
@@ -681,7 +685,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 +699,7 @@ BOOL Bitmap::Mirror( ULONG nMirrorFlags )
delete[] pBuffer;
ReleaseAccess( pAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
}
else if( bHorz && bVert )
@@ -732,26 +736,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 +805,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 +881,7 @@ BOOL Bitmap::Rotate( long nAngle10, const Color& rFillColor )
ReleaseAccess( pReadAcc );
}
- if( ( bRet = !!aRotatedBmp ) == TRUE )
+ if( ( bRet = !!aRotatedBmp ) == sal_True )
ImplAssignWithSize( aRotatedBmp );
}
@@ -886,11 +890,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 +921,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 +936,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 +952,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 +981,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 +1031,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 +1114,7 @@ BOOL Bitmap::CopyPixel( const Rectangle& rRectDst,
}
ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -1121,9 +1125,9 @@ BOOL Bitmap::CopyPixel( const Rectangle& rRectDst,
// ------------------------------------------------------------------
-BOOL Bitmap::Expand( ULONG nDX, ULONG nDY, const Color* pInitColor )
+sal_Bool Bitmap::Expand( sal_uLong nDX, sal_uLong nDY, const Color* pInitColor )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( nDX || nDY )
{
@@ -1167,7 +1171,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 +1186,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_uLong nTol ) const
{
Bitmap aNewBmp( GetSizePixel(), 1 );
BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pWriteAcc )
{
@@ -1208,7 +1212,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 +1250,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 +1357,7 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, ULONG nTol ) const
}
( (Bitmap*) this )->ReleaseAccess( pReadAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
aNewBmp.ReleaseAccess( pWriteAcc );
@@ -1425,11 +1429,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 +1444,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 +1461,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 +1496,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 +1507,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 +1526,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 +1553,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_uLong nTol )
{
// Bitmaps with 1 bit color depth can cause problems
// if they have other entries than black/white in their palette
@@ -1557,7 +1561,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 +1574,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 +1608,7 @@ BOOL Bitmap::Replace( const Color& rSearchColor, const Color& rReplaceColor, ULO
}
ReleaseAccess( pAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -1612,8 +1616,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_uLong nColorCount, sal_uLong* _pTols )
{
// Bitmaps with 1 bit color depth can cause problems
// if they have other entries than black/white in their palette
@@ -1621,7 +1625,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 +1636,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_uLong i;
if( !_pTols )
{
@@ -1657,7 +1661,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 +1671,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 +1717,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 +1752,7 @@ Bitmap Bitmap::GetColorTransformedBitmap( BmpColorMode eColorMode ) const
{
Color* pSrcColors = NULL;
Color* pDstColors = NULL;
- ULONG nColorCount = 0;
+ sal_uLong nColorCount = 0;
aRet = *this;
@@ -1772,11 +1776,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 +1904,7 @@ BOOL Bitmap::CombineSimple( const Bitmap& rMask, BmpCombine eCombine )
break;
}
- bRet = TRUE;
+ bRet = sal_True;
}
( (Bitmap&) rMask ).ReleaseAccess( pMaskAcc );
@@ -1911,7 +1915,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 +1927,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 +1940,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 +1951,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..8dffa7d59a2c 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_uLong 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_uLong nOldPos = rIStm.Tell();
+ sal_uLong 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_uLong nOffset )
{
DIBInfoHeader aHeader;
- const ULONG nStmPos = rIStm.Tell();
- BOOL bRet = FALSE;
+ const sal_uLong 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_uLong 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_uLong& 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_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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_uLong nImageSizePos;
+ sal_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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_uLong nWidth = rAcc.Width();
+ sal_uLong nCountByte;
+ sal_uLong nRunByte;
+ sal_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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_uLong nWidth = rAcc.Width();
+ const sal_uLong nHeight = rAcc.Height();
+ sal_uLong nX;
+ sal_uLong nSaveIndex;
+ sal_uLong nCount;
+ sal_uLong 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_uLong 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_uLong 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 ec476157fbeb..4905646d3563 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_uLong)(_def_cR)<<10UL)|((sal_uLong)(_def_cG)<<5UL)|(sal_uLong)(_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_uLong nVCLRLut[ 6 ] = { 16, 17, 18, 19, 20, 21 };
+sal_uLong nVCLGLut[ 6 ] = { 0, 6, 12, 18, 24, 30 };
+sal_uLong nVCLBLut[ 6 ] = { 0, 36, 72, 108, 144, 180 };
// ------------------------------------------------------------------------
-ULONG nVCLDitherLut[ 256 ] =
+sal_uLong 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_uLong 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_uLong 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_uLong nB = *pReadScan++;
+ const sal_uLong nG = *pReadScan++;
+ const sal_uLong 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_uLong nR = *pReadScan++;
+ const sal_uLong nG = *pReadScan++;
+ const sal_uLong 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_uLong 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_uLong 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_uLong 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_uLong nWidth = pReadAcc->Width();
+ const sal_uLong nHeight = pReadAcc->Height();
+ BitmapColor aIndex( (sal_uInt8) 0 );
if( pReadAcc->HasPalette() )
{
- for( ULONG nY = 0UL; nY < nHeight; nY++ )
+ for( sal_uLong nY = 0UL; nY < nHeight; nY++ )
{
- for( ULONG nX = 0UL, nModY = ( nY & 0x0FUL ) << 4UL; nX < nWidth; nX++ )
+ for( sal_uLong 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_uLong nD = nVCLDitherLut[ nModY + ( nX & 0x0FUL ) ];
+ const sal_uLong nR = ( nVCLLut[ aCol.GetRed() ] + nD ) >> 16UL;
+ const sal_uLong nG = ( nVCLLut[ aCol.GetGreen() ] + nD ) >> 16UL;
+ const sal_uLong 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_uLong nY = 0UL; nY < nHeight; nY++ )
{
- for( ULONG nX = 0UL, nModY = ( nY & 0x0FUL ) << 4UL; nX < nWidth; nX++ )
+ for( sal_uLong 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_uLong nD = nVCLDitherLut[ nModY + ( nX & 0x0FUL ) ];
+ const sal_uLong nR = ( nVCLLut[ aCol.GetRed() ] + nD ) >> 16UL;
+ const sal_uLong nG = ( nVCLLut[ aCol.GetGreen() ] + nD ) >> 16UL;
+ const sal_uLong 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_uLong) 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_uLong nSize = 32768UL * sizeof( sal_uLong );
+ sal_uLong* pColBuf = (sal_uLong*) 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_uLong* 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_uLong* 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_uLong 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_uLong 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..5fe9139ea35e 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_uLong nTileWidth = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_MOSAIC ) ?
pFilterParam->maMosaicTileSize.mnTileWidth : 4;
- ULONG nTileHeight = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_MOSAIC ) ?
+ sal_uLong 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_uLong nEntryCount = 1 << pWriteAcc->GetBitCount();
+ sal_uLong 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_uLong nFirstEntry;
+ sal_uLong 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..abee1ed9bf67 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_uLong BitmapEx::GetSizeBytes() const
{
- ULONG nSizeBytes = aBitmap.GetSizeBytes();
+ sal_uLong nSizeBytes = aBitmap.GetSizeBytes();
if( eTransparent == TRANSPARENT_BITMAP )
nSizeBytes += aMask.GetSizeBytes();
@@ -368,7 +368,7 @@ ULONG BitmapEx::GetSizeBytes() const
// ------------------------------------------------------------------
-ULONG BitmapEx::GetChecksum() const
+sal_uLong 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_uLong 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_uLong 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_uLong 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_uLong nDX, sal_uLong 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_uLong 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_uLong 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_uLong nColorCount, const sal_uLong* pTols )
{
- return( !!aBitmap ? aBitmap.Replace( pSearchColors, pReplaceColors, nColorCount, (ULONG*) pTols ) : FALSE );
+ return( !!aBitmap ? aBitmap.Replace( pSearchColors, pReplaceColors, nColorCount, (sal_uLong*) 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_uLong 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..1c7b41b51de6 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_uLong 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_uLong 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_uLong nSrcScanlineFormat, sal_uLong nSrcScanlineSize )
{
- const ULONG nFormat = BMP_SCANLINE_FORMAT( nSrcScanlineFormat );
+ const sal_uLong 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_uLong 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_uLong 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 188b4e49f0c5..789c8377318d 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..ac3a80612fe5 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_uLong PIXFMT>
class TrueColorPixelPtr : public BasePixelPtr
{
public:
@@ -311,7 +311,7 @@ public:
// =======================================================================
// converting truecolor formats
-template <ULONG SRCFMT, ULONG DSTFMT>
+template <sal_uLong SRCFMT, sal_uLong 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_uLong SRCFMT, sal_uLong 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_uLong SRCFMT, sal_uLong 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_uLong MASKFMT, sal_uLong SRCFMT, sal_uLong 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_uLong SRCFMT, sal_uLong 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_uLong DSTFMT,sal_uLong 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_uLong 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_uLong nSrcFormat = rSrc.mnFormat & ~BMP_FORMAT_TOP_DOWN;
+ const sal_uLong 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_uLong DSTFMT,sal_uLong SRCFMT> //,sal_uLong 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_uLong 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_uLong nSrcFormat = rSrc.mnFormat & ~BMP_FORMAT_TOP_DOWN;
+ const sal_uLong 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_uLong 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..3f95f56315f6 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_uLong GraphicConverter::ImplConvert( sal_uLong nInFormat, void* pInBuffer, sal_uLong nInBufSize,
+ void** ppOutBuffer, sal_uLong nOutFormat )
{
- ULONG nRetBufSize = 0UL;
+ sal_uLong 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_uLong GraphicConverter::Import( SvStream& rIStm, Graphic& rGraphic, sal_uLong nFormat )
{
GraphicConverter* pCvt = ImplGetSVData()->maGDIData.mpGrfConverter;
- ULONG nRet = ERRCODE_IO_GENERAL;
+ sal_uLong 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_uLong GraphicConverter::Export( SvStream& rOStm, const Graphic& rGraphic, sal_uLong nFormat )
{
GraphicConverter* pCvt = ImplGetSVData()->maGDIData.mpGrfConverter;
- ULONG nRet = ERRCODE_IO_GENERAL;
+ sal_uLong 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..7a6dd74db2c5 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_uLong nSkipCount )
{
- INT32 nActionSize;
- INT16 nType;
+ sal_Int32 nActionSize;
+ sal_Int16 nType;
- for( ULONG i = 0UL; i < nSkipCount; i++ )
+ for( sal_uLong 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_uLong 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_uLong 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_uLong nPos;
+ sal_uLong 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_uLong 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_uLong 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_uLong nCount = 0;
+ for( sal_uLong 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_uLong 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_uLong nAryLen;
+ sal_uLong nLen = pAct->GetLen();
+ const sal_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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..4a3a2f265374 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_uLong 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 d36a18a1afba..23da138d23a2 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_uLong* pMinR;
+ sal_uLong* pMaxR;
+ sal_uLong* pMinG;
+ sal_uLong* pMaxG;
+ sal_uLong* pMinB;
+ sal_uLong* pMaxB;
const Color* pDstCols;
- ULONG nCount;
+ sal_uLong nCount;
};
struct ImplBmpReplaceParam
{
const Color* pSrcCols;
const Color* pDstCols;
- ULONG nCount;
- const ULONG* pTols;
+ sal_uLong nCount;
+ const sal_uLong* pTols;
};
@@ -124,9 +124,9 @@ struct ImplBmpReplaceParam
struct ImpLabel
{
String aLabelName;
- ULONG nActionPos;
+ sal_uLong nActionPos;
- ImpLabel( const String& rLabelName, ULONG _nActionPos ) :
+ ImpLabel( const String& rLabelName, sal_uLong _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_uLong 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_uLong nPos ) const { return (ImpLabel*) GetObject( nPos ); }
+ sal_uLong ImplGetLabelPos( const String& rLabelName );
+ sal_uLong ImplCount() const { return Count(); }
};
// ------------------------------------------------------------------------
@@ -172,9 +172,9 @@ ImpLabelList::~ImpLabelList()
// ------------------------------------------------------------------------
-ULONG ImpLabelList::ImplGetLabelPos( const String& rLabelName )
+sal_uLong ImpLabelList::ImplGetLabelPos( const String& rLabelName )
{
- ULONG nLabelPos = METAFILE_LABEL_NOTFOUND;
+ sal_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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_uLong nPos )
{
if ( !bRecord && !rMtf.bRecord )
{
MetaAction* pAction = GetCurAction();
- const ULONG nObjCount = Count();
+ const sal_uLong nObjCount = Count();
if( nPos > nObjCount )
nPos = nObjCount;
- for( ULONG nCurPos = GetCurPos(); nCurPos < nPos; nCurPos++ )
+ for( sal_uLong 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_uLong nPos )
{
if( !bRecord )
{
MetaAction* pAction = GetCurAction();
- const ULONG nObjCount = Count();
- ULONG i = 0, nSyncCount = ( pOut->GetOutDevType() == OUTDEV_WINDOW ) ? 0x000000ff : 0xffffffff;
+ const sal_uLong nObjCount = Count();
+ sal_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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_uLong nPos )
{
Remove( nPos );
@@ -650,14 +650,14 @@ void GDIMetaFile::RemoveAction( ULONG nPos )
// ------------------------------------------------------------------------
-MetaAction* GDIMetaFile::CopyAction( ULONG nPos ) const
+MetaAction* GDIMetaFile::CopyAction( sal_uLong nPos ) const
{
return ( (MetaAction*) GetObject( nPos ) )->Clone();
}
// ------------------------------------------------------------------------
-ULONG GDIMetaFile::GetActionPos( const String& rLabel )
+sal_uLong 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_uLong 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_uLong 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_uLong 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_uLong GDIMetaFile::GetLabelCount() const
{
return( pLabelList ? pLabelList->ImplCount() : 0UL );
}
// ------------------------------------------------------------------------
-String GDIMetaFile::GetLabel( ULONG nLabel )
+String GDIMetaFile::GetLabel( sal_uLong 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_uLong 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() )
@@ -847,7 +847,7 @@ void GDIMetaFile::Move( long nX, long nY, long nDPIX, long nDPIY )
Size aOffset( aBaseOffset );
VirtualDevice aMapVDev;
- aMapVDev.EnableOutput( FALSE );
+ aMapVDev.EnableOutput( sal_False );
aMapVDev.SetReferenceDevice( nDPIX, nDPIY );
aMapVDev.SetMapMode( GetPrefMapMode() );
@@ -921,7 +921,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() )
@@ -941,7 +941,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();
}
@@ -996,7 +996,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 );
@@ -1031,7 +1031,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() );
@@ -1044,7 +1044,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 )
{
@@ -1261,7 +1261,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 )
{
@@ -1312,7 +1312,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
{
@@ -1323,7 +1323,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() ) );
}
}
}
@@ -1343,7 +1343,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 ) );
}
@@ -1388,7 +1388,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();
@@ -1431,7 +1431,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;
@@ -1498,17 +1498,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 )
{
@@ -1934,7 +1934,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;
@@ -1985,9 +1985,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_uLong nR = rColor.GetRed(), nG = rColor.GetGreen(), nB = rColor.GetBlue();
- for( ULONG i = 0; i < ( (const ImplColReplaceParam*) pColParam )->nCount; i++ )
+ for( sal_uLong i = 0; i < ( (const ImplColReplaceParam*) pColParam )->nCount; i++ )
{
if( ( ( (const ImplColReplaceParam*) pColParam )->pMinR[ i ] <= nR ) &&
( ( (const ImplColReplaceParam*) pColParam )->pMaxR[ i ] >= nR ) &&
@@ -2027,7 +2027,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 )
{
@@ -2045,7 +2045,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 );
}
@@ -2058,7 +2058,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 );
}
@@ -2078,7 +2078,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 );
}
@@ -2091,7 +2091,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 );
}
@@ -2104,7 +2104,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 );
}
@@ -2285,7 +2285,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 ||
@@ -2296,9 +2296,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 )
@@ -2316,14 +2316,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 )
{
@@ -2376,41 +2376,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_uLong 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_uLong nColorCount, sal_uLong* 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_uLong[ nColorCount ];
+ aColParam.pMaxR = new sal_uLong[ nColorCount ];
+ aColParam.pMinG = new sal_uLong[ nColorCount ];
+ aColParam.pMaxG = new sal_uLong[ nColorCount ];
+ aColParam.pMinB = new sal_uLong[ nColorCount ];
+ aColParam.pMaxB = new sal_uLong[ nColorCount ];
- for( ULONG i = 0; i < nColorCount; i++ )
+ for( sal_uLong 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_uLong) Max( nVal - nTol, 0L );
+ aColParam.pMaxR[ i ] = (sal_uLong) 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_uLong) Max( nVal - nTol, 0L );
+ aColParam.pMaxG[ i ] = (sal_uLong) 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_uLong) Max( nVal - nTol, 0L );
+ aColParam.pMaxB[ i ] = (sal_uLong) Min( nVal + nTol, 255L );
}
aColParam.pDstCols = pReplaceColors;
@@ -2450,16 +2450,16 @@ GDIMetaFile GDIMetaFile::GetMonochromeMtf( const Color& rColor ) const
// ------------------------------------------------------------------------
-ULONG GDIMetaFile::GetChecksum() const
+sal_uLong GDIMetaFile::GetChecksum() const
{
GDIMetaFile aMtf;
SvMemoryStream aMemStm( 65535, 65535 );
ImplMetaWriteData aWriteData; aWriteData.meActualCharSet = aMemStm.GetStreamCharSet();
SVBT16 aBT16;
SVBT32 aBT32;
- ULONG nCrc = 0;
+ sal_uLong nCrc = 0;
- for( ULONG i = 0, nObjCount = GetActionCount(); i < nObjCount; i++ )
+ for( sal_uLong i = 0, nObjCount = GetActionCount(); i < nObjCount; i++ )
{
MetaAction* pAction = GetAction( i );
@@ -2730,11 +2730,11 @@ ULONG GDIMetaFile::GetChecksum() const
// ------------------------------------------------------------------------
-ULONG GDIMetaFile::GetSizeBytes() const
+sal_uLong GDIMetaFile::GetSizeBytes() const
{
- ULONG nSizeBytes = 0;
+ sal_uLong nSizeBytes = 0;
- for( ULONG i = 0, nObjCount = GetActionCount(); i < nObjCount; ++i )
+ for( sal_uLong i = 0, nObjCount = GetActionCount(); i < nObjCount; ++i )
{
MetaAction* pAction = GetAction( i );
@@ -2762,7 +2762,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;
@@ -2796,8 +2796,8 @@ SvStream& operator>>( SvStream& rIStm, GDIMetaFile& rGDIMetaFile )
if( !rIStm.GetError() )
{
char aId[ 7 ];
- ULONG nStmPos = rIStm.Tell();
- USHORT nOldFormat = rIStm.GetNumberFormatInt();
+ sal_uLong nStmPos = rIStm.Tell();
+ sal_uInt16 nOldFormat = rIStm.GetNumberFormatInt();
rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -2810,8 +2810,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 );
@@ -2825,7 +2825,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 );
@@ -2883,8 +2883,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 );
@@ -2894,7 +2894,7 @@ SvStream& GDIMetaFile::Write( SvStream& rOStm )
rOStm << nStmCompressMode;
rOStm << aPrefMapMode;
rOStm << aPrefSize;
- rOStm << (UINT32) GetActionCount();
+ rOStm << (sal_uInt32) GetActionCount();
delete pCompat;
@@ -2915,7 +2915,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 60ad94a63273..1a476f1b5420 100644
--- a/vcl/source/gdi/gfxlink.cxx
+++ b/vcl/source/gdi/gfxlink.cxx
@@ -64,7 +64,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),
@@ -166,7 +166,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 );
}
@@ -180,7 +180,7 @@ sal_uInt32 GfxLink::GetDataSize() const
// ------------------------------------------------------------------------
-const BYTE* GfxLink::GetData() const
+const sal_uInt8* GfxLink::GetData() const
{
if( IsSwappedOut() )
( (GfxLink*) this )->SwapIn();
@@ -234,20 +234,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_uLong nCvtType;
- aMemStm.SetBuffer( (char*) pData, mnBufSize, FALSE, mnBufSize );
+ aMemStm.SetBuffer( (char*) pData, mnBufSize, sal_False, mnBufSize );
switch( meType )
{
@@ -263,7 +263,7 @@ BOOL GfxLink::LoadNative( Graphic& rGraphic )
}
if( nCvtType && ( GraphicConverter::Import( aMemStm, rGraphic, nCvtType ) == ERRCODE_NONE ) )
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -310,7 +310,7 @@ void GfxLink::SwapIn()
// ------------------------------------------------------------------------
-BOOL GfxLink::ExportNative( SvStream& rOStream ) const
+sal_Bool GfxLink::ExportNative( SvStream& rOStream ) const
{
if( GetDataSize() )
{
@@ -330,7 +330,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();
@@ -356,8 +356,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 );
@@ -372,10 +372,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 )
@@ -391,7 +391,7 @@ SvStream& operator>>( SvStream& rIStream, GfxLink& rGfxLink)
// - ImpSwap -
// -----------
-ImpSwap::ImpSwap( BYTE* pData, ULONG nDataSize ) :
+ImpSwap::ImpSwap( sal_uInt8* pData, sal_uLong nDataSize ) :
mnDataSize( nDataSize ),
mnRefCount( 1UL )
{
@@ -429,16 +429,16 @@ ImpSwap::~ImpSwap()
// ------------------------------------------------------------------------
-BYTE* ImpSwap::GetData() const
+sal_uInt8* ImpSwap::GetData() const
{
- BYTE* pData;
+ sal_uInt8* pData;
if( IsSwapped() )
{
SvStream* pIStm = ::utl::UcbStreamHelper::CreateStream( maURL, STREAM_READWRITE );
if( pIStm )
{
- pData = new BYTE[ mnDataSize ];
+ pData = new sal_uInt8[ mnDataSize ];
pIStm->Read( pData, mnDataSize );
sal_Bool bError = ( ERRCODE_NONE != pIStm->GetError() );
delete pIStm;
@@ -459,7 +459,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..1a8201706212 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_uLong Graphic::GetSizeBytes() const
{
return mpImpGraphic->ImplGetSizeBytes();
}
@@ -615,7 +615,7 @@ Link Graphic::GetAnimationNotifyHdl() const
// ------------------------------------------------------------------------
-ULONG Graphic::GetAnimationLoopCount() const
+sal_uLong 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_uLong 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_uLong nFilePos )
{
mpImpGraphic->ImplSetDocFileName( rName, nFilePos );
}
@@ -702,14 +702,14 @@ const String& Graphic::GetDocFileName() const
// ------------------------------------------------------------------------
-ULONG Graphic::GetDocFilePos() const
+sal_uLong 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_uLong 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..ee6060b7d8f3 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_uLong 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_uLong 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_uLong& 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_uLong 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_uLong 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_uLong nPosDest = GetImagePos( nId );
+ sal_uLong 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/impanmvw.cxx b/vcl/source/gdi/impanmvw.cxx
index 7762087dc605..aaaca451ebe3 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_uLong 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_uLong 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_uLong) mpParent->Count() - 1UL );
- for( ULONG i = 0UL; i <= nPos; i++ )
+ for( sal_uLong 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_uLong nPos )
{
ImplDraw( nPos, NULL );
}
// ------------------------------------------------------------------------
-void ImplAnimView::ImplDraw( ULONG nPos, VirtualDevice* pVDev )
+void ImplAnimView::ImplDraw( sal_uLong 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_uLong 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..69ae35fe1c6e 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_uLong 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_uLong nPos, VirtualDevice* pVDev );
public:
ImplAnimView( Animation* pParent, OutputDevice* pOut,
- const Point& rPt, const Size& rSz, ULONG nExtraData,
+ const Point& rPt, const Size& rSz, sal_uLong 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_uLong nPos );
+ void ImplDraw( sal_uLong 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..500ba9549b9e 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -70,7 +70,7 @@
struct ImpSwapFile
{
INetURLObject aSwapURL;
- ULONG nRefCount;
+ sal_uLong 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_uLong) 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_uLong ImpGraphic::ImplGetSizeBytes() const
{
if( 0 == mnSizeBytes )
{
@@ -856,7 +856,7 @@ Link ImpGraphic::ImplGetAnimationNotifyHdl() const
// ------------------------------------------------------------------------
-ULONG ImpGraphic::ImplGetAnimationLoopCount() const
+sal_uLong 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_uLong nFilePos )
{
const INetURLObject aURL( rName );
@@ -911,29 +911,29 @@ const String& ImpGraphic::ImplGetDocFileName() const
// ------------------------------------------------------------------------
-ULONG ImpGraphic::ImplGetDocFilePos() const
+sal_uLong 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_uLong nStartPos = rIStm.Tell();
sal_uInt32 nId;
- ULONG nHeaderLen;
+ sal_uLong 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_uLong 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_uLong nFullLen = nHeaderLen + nLen;
+ sal_uLong nPartLen = Min( nFullLen, (sal_uLong) 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_uLong 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_uLong nCvtType;
- switch( sal::static_int_cast<ULONG>(meType) )
+ switch( sal::static_int_cast<sal_uLong>(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_uLong 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_uLong nDataStart = rOStm.Tell();
if( ImplIsSupportedGraphic() )
rOStm << *this;
if( !rOStm.GetError() )
{
- const ULONG nStmPos2 = rOStm.Tell();
+ const sal_uLong 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_uLong ImpGraphic::ImplGetChecksum() const
{
- ULONG nRet = 0;
+ sal_uLong 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_uLong 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_uLong 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 3105850c4fbf..0d0af3365c00 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_uLong 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_uLong 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/impvect.cxx b/vcl/source/gdi/impvect.cxx
index 0846f5567200..f405c3e4b602 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_uLong mnSize;
+ sal_uLong mnRealSize;
public:
ImplPointArray();
~ImplPointArray();
- void ImplSetSize( ULONG nSize );
+ void ImplSetSize( sal_uLong nSize );
- ULONG ImplGetRealSize() const { return mnRealSize; }
- void ImplSetRealSize( ULONG nRealSize ) { mnRealSize = nRealSize; }
+ sal_uLong ImplGetRealSize() const { return mnRealSize; }
+ void ImplSetRealSize( sal_uLong nRealSize ) { mnRealSize = nRealSize; }
- inline Point& operator[]( ULONG nPos );
- inline const Point& operator[]( ULONG nPos ) const;
+ inline Point& operator[]( sal_uLong nPos );
+ inline const Point& operator[]( sal_uLong nPos ) const;
void ImplCreatePoly( Polygon& rPoly ) const;
};
@@ -202,9 +202,9 @@ ImplPointArray::~ImplPointArray()
// -----------------------------------------------------------------------------
-void ImplPointArray::ImplSetSize( ULONG nSize )
+void ImplPointArray::ImplSetSize( sal_uLong nSize )
{
- const ULONG nTotal = nSize * sizeof( Point );
+ const sal_uLong 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_uLong 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_uLong 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_uLong mnArraySize;
+ sal_uLong 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_uLong 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_uLong nTypeFlag );
const Polygon& ImplGetPoly() { return maPoly; }
};
// -----------------------------------------------------------------------------
-ImplChain::ImplChain( ULONG nInitCount, long nResize ) :
+ImplChain::ImplChain( sal_uLong 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_uLong nOldArraySize = mnArraySize;
+ sal_uInt8* pNewCodes;
- mnArraySize = ( mnResize < 0L ) ? ( mnArraySize << 1UL ) : ( mnArraySize + (ULONG) mnResize );
- pNewCodes = new BYTE[ mnArraySize ];
+ mnArraySize = ( mnResize < 0L ) ? ( mnArraySize << 1UL ) : ( mnArraySize + (sal_uLong) 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_uLong 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_uLong 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_uLong nNewPos;
+ sal_uLong nCount = rArr.ImplGetRealSize();
+ sal_uLong 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_uLong 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_uLong 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_uLong 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_uLong nFound;
+ sal_uLong nLastDir = 0UL;
+ sal_uLong 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..86fef6a04083 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_uLong 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_uLong nFlags, const Link* pProgress );
+ sal_Bool ImplVectorize( const Bitmap& rMonoBmp, PolyPolygon& rPolyPoly,
+ sal_uLong nFlags, const Link* pProgress );
};
#endif
diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index 01b80b38238f..8321e56443f3 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;
}
// -----------------------------------------------------------------------
@@ -301,12 +301,12 @@ SvStream& operator>>( SvStream& rIStream, JobSetup& rJobSetup )
{
sal_Size nFirstPos = rIStream.Tell();
- USHORT nLen = 0;
+ sal_uInt16 nLen = 0;
rIStream >> nLen;
if ( !nLen )
return rIStream;
- USHORT nSystem = 0;
+ sal_uInt16 nSystem = 0;
rIStream >> nSystem;
char* pTempBuf = new char[nLen];
@@ -336,7 +336,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 );
@@ -347,8 +347,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 )
@@ -399,24 +399,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_uLong)(pJobData->mnPaperWidth), aOldJobData.nPaperWidth );
+ UInt32ToSVBT32( (sal_uLong)(pJobData->mnPaperHeight), aOldJobData.nPaperHeight );
ImplOldJobSetupData aOldData;
memset( &aOldData, 0, sizeof( aOldData ) );
@@ -445,7 +445,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..ebd55a48f593 100644
--- a/vcl/source/gdi/lineinfo.cxx
+++ b/vcl/source/gdi/lineinfo.cxx
@@ -70,6 +70,20 @@ ImplLineInfo::ImplLineInfo( const ImplLineInfo& rImplLineInfo ) :
{
}
+// -----------------------------------------------------------------------
+
+inline bool ImplLineInfo::operator==( const ImplLineInfo& rB ) const
+{
+ return(meStyle == rB.meStyle
+ && mnWidth == rB.mnWidth
+ && mnDashCount == rB.mnDashCount
+ && mnDashLen == rB.mnDashLen
+ && mnDotCount == rB.mnDotCount
+ && mnDotLen == rB.mnDotLen
+ && mnDistance == rB.mnDistance
+ && meLineJoin == rB.meLineJoin);
+}
+
// ------------
// - LineInfo -
// ------------
@@ -119,19 +133,13 @@ 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 );
return( mpImplLineInfo == rLineInfo.mpImplLineInfo ||
- ( mpImplLineInfo->meStyle == rLineInfo.mpImplLineInfo->meStyle &&
- mpImplLineInfo->mnWidth == rLineInfo.mpImplLineInfo->mnWidth &&
- mpImplLineInfo->mnDashCount == rLineInfo.mpImplLineInfo->mnDashCount &&
- mpImplLineInfo->mnDashLen == rLineInfo.mpImplLineInfo->mnDashLen &&
- mpImplLineInfo->mnDotCount == rLineInfo.mpImplLineInfo->mnDotCount &&
- mpImplLineInfo->mnDotLen == rLineInfo.mpImplLineInfo->mnDotLen &&
- mpImplLineInfo->mnDistance == rLineInfo.mpImplLineInfo->mnDistance ) );
+ *mpImplLineInfo == *rLineInfo.mpImplLineInfo );
}
// -----------------------------------------------------------------------
@@ -167,7 +175,7 @@ void LineInfo::SetWidth( long nWidth )
// -----------------------------------------------------------------------
-void LineInfo::SetDashCount( USHORT nDashCount )
+void LineInfo::SetDashCount( sal_uInt16 nDashCount )
{
DBG_CHKTHIS( LineInfo, NULL );
ImplMakeUnique();
@@ -185,7 +193,7 @@ void LineInfo::SetDashLen( long nDashLen )
// -----------------------------------------------------------------------
-void LineInfo::SetDotCount( USHORT nDotCount )
+void LineInfo::SetDotCount( sal_uInt16 nDotCount )
{
DBG_CHKTHIS( LineInfo, NULL );
ImplMakeUnique();
@@ -228,7 +236,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 +265,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 +273,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 f398888a33b6..eab6af8444e5 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_uLong 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_uLong 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_uLong i = 0UL; i < nAryLen; i++ )
rOStm << mpDXAry[ i ];
sal_uInt16 j, nLen = maStr.Len(); // version 2
@@ -1456,7 +1456,7 @@ void MetaTextArrayAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
mpDXAry = new (std::nothrow)sal_Int32[ mnLen ];
if ( mpDXAry )
{
- ULONG i;
+ sal_uLong i;
for( i = 0UL; i < nAryLen; i++ )
rIStm >> mpDXAry[ i ];
@@ -1498,7 +1498,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 ),
@@ -1536,7 +1536,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_uLong)FRound( mnWidth * fabs(fScaleX) );
}
// ------------------------------------------------------------------------
@@ -1598,7 +1598,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 ),
@@ -2456,7 +2456,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;
}
}
@@ -2467,7 +2467,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;
}
@@ -2588,7 +2588,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 );
}
@@ -2662,7 +2662,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 );
}
@@ -2770,7 +2770,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 )
@@ -3031,7 +3031,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 )
@@ -3070,7 +3070,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;
}
@@ -3079,7 +3079,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;
}
@@ -3089,7 +3089,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 )
@@ -3128,7 +3128,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;
}
@@ -3137,7 +3137,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;
}
@@ -3181,7 +3181,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 );
}
// ------------------------------------------------------------------------
@@ -3189,7 +3189,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 );
}
// ========================================================================
@@ -3198,7 +3198,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 )
@@ -3237,7 +3237,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;
}
@@ -3246,7 +3246,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;
}
@@ -3256,7 +3256,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 )
@@ -3295,7 +3295,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;
}
@@ -3304,7 +3304,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;
}
@@ -3314,7 +3314,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 )
@@ -3353,7 +3353,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;
}
@@ -3362,7 +3362,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;
}
@@ -3406,14 +3406,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;
@@ -3563,7 +3563,7 @@ IMPL_META_ACTION( Push, META_PUSH_ACTION )
// ------------------------------------------------------------------------
-MetaPushAction::MetaPushAction( USHORT nFlags ) :
+MetaPushAction::MetaPushAction( sal_uInt16 nFlags ) :
MetaAction ( META_PUSH_ACTION ),
mnFlags ( nFlags )
{
@@ -3682,14 +3682,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;
@@ -3701,7 +3701,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 )
@@ -3735,7 +3735,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 );
}
@@ -3942,7 +3942,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 )
@@ -4013,7 +4013,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 )
@@ -4023,7 +4023,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 )
{
@@ -4040,11 +4040,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
@@ -4103,7 +4103,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() );
}
}
}
@@ -4145,7 +4145,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() );
}
}
}
@@ -4184,7 +4184,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 6d225ad7e0dc..01f88e9d8860 100644
--- a/vcl/source/gdi/metric.cxx
+++ b/vcl/source/gdi/metric.cxx
@@ -126,15 +126,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;
}
// -----------------------------------------------------------------------
@@ -146,28 +146,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();
}
@@ -230,7 +230,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 );
}
@@ -239,7 +239,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)
@@ -627,7 +627,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 );
@@ -665,7 +665,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) );
}
}
}
@@ -814,11 +814,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++);
@@ -876,14 +876,14 @@ void FontCharMap::Reset( const 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..658856dbe100 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_uLong nInitSize ) :
pActNode( NULL )
{
- const ULONG nSize = nInitSize + 4;
+ const sal_uLong nSize = nInitSize + 4;
- for( ULONG i = 0; i < nSize; i++ )
+ for( sal_uLong i = 0; i < nSize; i++ )
{
OctreeNode* pNewNode = new NODE;
@@ -73,7 +73,7 @@ ImpNodeCache::~ImpNodeCache()
// - Octree -
// ----------
-Octree::Octree( ULONG nColors ) :
+Octree::Octree( sal_uLong 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_uLong 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_uLong 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_uLong nShift = 7 - nLevel;
+ const sal_uInt8 cMask = pImplMask[ nLevel ];
+ const sal_uLong 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_uLong i;
PNODE pNode;
- ULONG nRedSum = 0L;
- ULONG nGreenSum = 0L;
- ULONG nBlueSum = 0L;
- ULONG nChilds = 0L;
+ sal_uLong nRedSum = 0L;
+ sal_uLong nGreenSum = 0L;
+ sal_uLong nBlueSum = 0L;
+ sal_uLong 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_uLong 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_uLong nShift = 7 - nLevel;
+ const sal_uInt8 cMask = pImplMask[ nLevel++ ];
+ const sal_uLong 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_uLong* cdp;
+ sal_uInt8* crgbp;
+ const sal_uLong nColorMax = 1 << OCTREE_BITS;
+ const sal_uLong xsqr = 1 << ( nBits << 1 );
+ const sal_uLong xsqr2 = xsqr << 1;
+ const sal_uLong nColors = rPal.GetEntryCount();
const long x = 1L << nBits;
const long x2 = x >> 1L;
- ULONG r, g, b;
+ sal_uLong 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_uLong 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_uLong*) 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_uLong nMax )
{
- const ULONG nCount = nMax * nMax * nMax;
- const ULONG nSize = nCount * sizeof( ULONG );
+ const sal_uLong nCount = nMax * nMax * nMax;
+ const sal_uLong nSize = nCount * sizeof( sal_uLong );
- 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 847a8d7a299a..b5ecb0761949 100644..100755
--- 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_uLong mnTextLayoutMode;
LanguageType meTextLanguage;
- USHORT mnFlags;
+ sal_uInt16 mnFlags;
};
// -----------------------------------------------------------------------
@@ -202,10 +202,6 @@ bool OutputDevice::ImplSelectClipRegion( const Region& rRegion, SalGraphics* pGr
{
DBG_TESTSOLARMUTEX();
- // TODO(Q3): Change from static to plain method - everybody's
- // calling it with pOutDev=this!
- // => done, but only with minimal changes for now => TODO
- OutputDevice* const pOutDev = this;
if( !pGraphics )
{
if( !mpGraphics )
@@ -214,91 +210,8 @@ bool OutputDevice::ImplSelectClipRegion( const Region& rRegion, SalGraphics* pGr
pGraphics = mpGraphics;
}
- if( rRegion.HasPolyPolygon()
- && pGraphics->supportsOperation( OutDevSupport_B2DClip ) )
- {
- const ::basegfx::B2DPolyPolygon& rB2DPolyPolygon = rRegion.GetB2DPolyPolygon();
- pGraphics->BeginSetClipRegion( 0 );
- pGraphics->UnionClipRegion( rB2DPolyPolygon, pOutDev );
- pGraphics->EndSetClipRegion();
- return true;
- }
-
- long nX;
- long nY;
- long nWidth;
- long nHeight;
- ULONG nRectCount;
- ImplRegionInfo aInfo;
- BOOL bRegionRect;
- BOOL bClipRegion = TRUE;
- const BOOL bClipDeviceBounds( !pOutDev->GetPDFWriter()
- && pOutDev->GetOutDevType() != OUTDEV_PRINTER );
-
- nRectCount = rRegion.GetRectCount();
- pGraphics->BeginSetClipRegion( nRectCount );
- bRegionRect = rRegion.ImplGetFirstRect( aInfo, nX, nY, nWidth, nHeight );
- if( bClipDeviceBounds )
- {
- // #b6520266# Perform actual rect clip against outdev
- // dimensions, to generate empty clips whenever one of the
- // values is completely off the device.
- const long nOffX( pOutDev->mnOutOffX );
- const long nOffY( pOutDev->mnOutOffY );
- const long nDeviceWidth( pOutDev->GetOutputWidthPixel() );
- const long nDeviceHeight( pOutDev->GetOutputHeightPixel() );
- Rectangle aDeviceBounds( nOffX, nOffY,
- nOffX+nDeviceWidth-1,
- nOffY+nDeviceHeight-1 );
- while ( bRegionRect )
- {
- // #i59315# Limit coordinates passed to sal layer to actual
- // outdev dimensions - everything else bears the risk of
- // overflowing internal coordinates (e.g. the 16 bit wire
- // format of X11).
- Rectangle aTmpRect(nX,nY,nX+nWidth-1,nY+nHeight-1);
- aTmpRect.Intersection(aDeviceBounds);
-
- if( !aTmpRect.IsEmpty() )
- {
- if ( !pGraphics->UnionClipRegion( aTmpRect.Left(),
- aTmpRect.Top(),
- aTmpRect.GetWidth(),
- aTmpRect.GetHeight(),
- pOutDev ) )
- {
- bClipRegion = FALSE;
- }
- }
- else
- {
- // #i79850# Fake off-screen clip
- if ( !pGraphics->UnionClipRegion( nDeviceWidth+1,
- nDeviceHeight+1,
- 1, 1,
- pOutDev ) )
- {
- bClipRegion = FALSE;
- }
- }
- DBG_ASSERT( bClipRegion, "OutputDevice::ImplSelectClipRegion() - can't create region" );
- bRegionRect = rRegion.ImplGetNextRect( aInfo, nX, nY, nWidth, nHeight );
- }
- }
- else
- {
- // #i65720# Actually, _don't_ clip anything on printer or PDF
- // export, since output might be visible outside the specified
- // device boundaries.
- while ( bRegionRect )
- {
- if ( !pGraphics->UnionClipRegion( nX, nY, nWidth, nHeight, pOutDev ) )
- bClipRegion = FALSE;
- DBG_ASSERT( bClipRegion, "OutputDevice::ImplSelectClipRegion() - can't cerate region" );
- bRegionRect = rRegion.ImplGetNextRect( aInfo, nX, nY, nWidth, nHeight );
- }
- }
- pGraphics->EndSetClipRegion();
+ bool bClipRegion = pGraphics->SetClipRegion( rRegion, this );
+ OSL_ENSURE( bClipRegion, "OutputDevice::ImplSelectClipRegion() - can't cerate region" );
return bClipRegion;
}
@@ -319,7 +232,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 +243,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 +251,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 +376,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 +426,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 +493,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 +518,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 +551,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 +573,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 +603,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 +713,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 +877,7 @@ void OutputDevice::ImplInvalidateViewTransform()
// -----------------------------------------------------------------------
-BOOL OutputDevice::ImplIsRecordLayout() const
+sal_Bool OutputDevice::ImplIsRecordLayout() const
{
return mpOutDevData && mpOutDevData->mpRecordLayout;
}
@@ -1005,7 +918,7 @@ void OutputDevice::ImplInitLineColor()
else
mpGraphics->SetLineColor();
- mbInitLineColor = FALSE;
+ mbInitLineColor = sal_False;
}
// -----------------------------------------------------------------------
@@ -1028,7 +941,7 @@ void OutputDevice::ImplInitFillColor()
else
mpGraphics->SetFillColor();
- mbInitFillColor = FALSE;
+ mbInitFillColor = sal_False;
}
// -----------------------------------------------------------------------
@@ -1058,43 +971,56 @@ 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;
- ImplSelectClipRegion(
- // #102532# Respect output offset also for clip region
- ImplPixelToDevicePixel( maRegion ) );
+ mbOutputClipped = sal_False;
+
+ // #102532# Respect output offset also for clip region
+ Region aRegion( ImplPixelToDevicePixel( maRegion ) );
+ const bool bClipDeviceBounds( ! GetPDFWriter()
+ && GetOutDevType() != OUTDEV_PRINTER );
+ if( bClipDeviceBounds )
+ {
+ // #b6520266# Perform actual rect clip against outdev
+ // dimensions, to generate empty clips whenever one of the
+ // values is completely off the device.
+ Rectangle aDeviceBounds( mnOutOffX, mnOutOffY,
+ mnOutOffX+GetOutputWidthPixel()-1,
+ mnOutOffY+GetOutputHeightPixel()-1 );
+ aRegion.Intersect( aDeviceBounds );
+ }
+ ImplSelectClipRegion( aRegion );
}
- 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,703 +1034,16 @@ 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;
- }
-}
-
-// -----------------------------------------------------------------------
-
-namespace
-{
- inline int iround( float x )
- {
- union
- {
- float f;
- sal_Int32 i;
- };
- f = x;
- sal_Int32 exponent = (127 + 31) - ((i >> 23) & 0xFF);
- sal_Int32 r = ((sal_Int32(i) << 8) | (1U << 31)) >> exponent;
- r &= ((exponent - 32) >> 31);
- sal_Int32 sign = i >> 31;
- return r = (r ^ sign) - sign;
- }
-
- inline int floorDiv(int a, int b)
- {
- if(b == 0)
- return 0x80000000;
- if(a >= 0)
- return a / b;
- int q = -(-a / b); // quotient
- int r = -a % b; // remainder
- if(r)
- q--;
- return q;
- }
-
- inline int floorMod( int a, int b )
- {
- if(b == 0)
- return 0x80000000;
- if(a >= 0)
- return a % b;
- int r = -a % b; // remainder
- if(r)
- r = b - r;
- return r;
- }
-
- inline int ceilDiv( int a, int b )
- {
- if(b == 0)
- return 0x80000000;
- a += - 1 + b;
- if(a >= 0)
- return a / b;
- int q = -(-a / b); // quotient
- int r = -a % b; // remainder
- if(r)
- q--;
- return q;
- }
-
- inline int ceilMod( int a, int b )
- {
- if(b == 0)
- return 0x80000000;
- a += - 1 + b;
- if(a >= 0)
- return (a % b) + 1 - b;
- int r = -a % b;
- if(r)
- r = b - r;
- return r + 1 - b;
- }
-
- inline int ceilFix4(int x) { return (x + 0xF) & 0xFFFFFFF0; }
-
- struct vertex
- {
- float x,y;
- inline vertex( const Point &p )
- : x((float)p.getX()),y((float)p.getY()) {}
- };
-
- template<class T> inline void swap(T &a, T &b) { T t=a; a=b; b=t; }
-
- class SpanIterator
- {
- public:
-
- SpanIterator( sal_Int32 *pTable, size_t dwPitch, sal_Int32 dwNumScanlines );
- std::pair<sal_Int32,sal_Int32> GetNextSpan( void );
- sal_Int32 GetNumRemainingScanlines( void );
- sal_Int32 GetNumEqualScanlines( void );
- SpanIterator &operator++ ();
- SpanIterator &Skip( sal_Int32 dwNumScanlines );
- sal_Int32 GetRemainingSpans( void ) const { return maNumSpans; }
-
- private:
-
- sal_Int32 *mpTable;
- sal_Int32 *mpSpanArray;
- sal_Int32 maNumSpans;
- sal_Int32 maRemainingScanlines;
- size_t maPitch;
- };
-
- inline SpanIterator::SpanIterator( sal_Int32 *pTable, size_t dwPitch, sal_Int32 dwNumScanlines )
- : mpTable(pTable),maRemainingScanlines(dwNumScanlines),maPitch(dwPitch)
- {
- sal_Int32 *pNumSpans = mpTable;
- mpSpanArray = reinterpret_cast<sal_Int32 *>(pNumSpans+2);
- maNumSpans = *pNumSpans;
- }
-
- inline SpanIterator &SpanIterator::operator++ ()
- {
- --maRemainingScanlines;
- mpTable += maPitch;
- sal_Int32 *pNumSpans = mpTable;
- mpSpanArray = reinterpret_cast<sal_Int32 *>(pNumSpans+2);
- maNumSpans = *pNumSpans;
- return (*this);
- }
-
- inline SpanIterator &SpanIterator::Skip( sal_Int32 dwNumScanlines )
- {
- // don't skip more scanlines than there are...
- if(dwNumScanlines > maRemainingScanlines)
- dwNumScanlines = maRemainingScanlines;
-
- // skip in one fellow swoop...
- maRemainingScanlines -= dwNumScanlines;
- mpTable += maPitch * dwNumScanlines;
-
- // initialize necessary query fields...
- sal_Int32 *pNumSpans = mpTable;
- mpSpanArray = reinterpret_cast<sal_Int32 *>(pNumSpans+2);
- maNumSpans = *pNumSpans;
- return (*this);
- }
-
- inline std::pair<sal_Int32,sal_Int32> SpanIterator::GetNextSpan( void )
- {
- sal_Int32 x(0);
- sal_Int32 w(0);
- if(maNumSpans)
- {
- x = *mpSpanArray++;
- w = *mpSpanArray++;
- --maNumSpans;
- }
- return std::pair<sal_Int32,sal_Int32>(x,w);
- }
-
- inline sal_Int32 SpanIterator::GetNumEqualScanlines( void )
- {
- return mpTable[1];
- }
-
- inline sal_Int32 SpanIterator::GetNumRemainingScanlines( void )
- {
- return maRemainingScanlines;
- }
-
- class ScanlineContainer
- {
-
- public:
-
- ScanlineContainer( sal_uInt32 dwNumScanlines,
- sal_uInt32 dwNumSpansPerScanline );
-
- ~ScanlineContainer( void );
-
- void InsertSpan( sal_Int32 y, sal_Int32 lx, sal_Int32 rx );
-
- SpanIterator Iterate( void ) const { return SpanIterator(mpTable,maPitch,maNumScanlines); }
-
- inline sal_uInt32 GetNumSpans( void ) const { return maNumberOfSpans; }
-
- void Consolidate( void );
-
- private:
-
- // the span table will assist in determinate exactly how many clipping
- // regions [that is *spans*] we will end up with.
- // the counter for this purpose is right ahead.
- sal_uInt32 maNumberOfSpans;
-
- struct span
- {
- sal_Int32 x;
- sal_Int32 w;
- };
-
- sal_uInt32 maNumScanlines;
- sal_uInt32 maNumSpansPerScanline;
- sal_Int32 *mpTable;
- size_t maPitch;
- };
-
- ScanlineContainer::ScanlineContainer( sal_uInt32 dwNumScanlines,
- sal_uInt32 dwNumSpansPerScanline ) : maNumScanlines(dwNumScanlines),
- maNumSpansPerScanline(dwNumSpansPerScanline)
- {
- // #128002# add one scanline buffer at the end, as
- // SpanIterator::Skip reads two bytes past the end.
- ++dwNumScanlines;
-
- // since each triangle could possibly add another span
- // we can calculate the upper limit by [num scanlines * num triangles].
- const sal_uInt32 dwNumPossibleRegions = dwNumScanlines*dwNumSpansPerScanline;
-
- // calculate the number of bytes the span table will consume
- const size_t dwTableSize = dwNumPossibleRegions*sizeof(span)+dwNumScanlines*(sizeof(sal_Int32)<<1);
-
- // allocate the span table [on the stack]
- mpTable = static_cast<sal_Int32 *>(rtl_allocateMemory(dwTableSize));
-
- // calculate the table pitch, that is how many int's do i need to get from a scanline to the next.
- maPitch = (dwNumSpansPerScanline*sizeof(span)/sizeof(sal_Int32))+2;
-
- // we need to initialize the table here.
- // the first *int* on each scanline tells us how many spans are on it.
- sal_Int32 *pNumSpans = mpTable;
- for(unsigned int i=0; i<dwNumScanlines; ++i)
- {
- pNumSpans[0] = 0;
- pNumSpans[1] = 0;
- pNumSpans += maPitch;
- }
-
- maNumberOfSpans = 0;
- }
-
- ScanlineContainer::~ScanlineContainer( void )
- {
- rtl_freeMemory(mpTable);
- }
-
- void ScanlineContainer::InsertSpan( sal_Int32 y, sal_Int32 lx, sal_Int32 rx )
- {
- // there's new incoming span which we need to store in the table.
- // first see if its width contributes a valid span.
- if(sal_Int32 dwSpanWidth = rx-lx)
- {
- // first select the appropriate scanline the new span.
- sal_Int32 *pNumSpans = mpTable+(y*maPitch);
- span *pSpanArray = reinterpret_cast<span *>(pNumSpans+2);
-
- // retrieve the number of already contained spans.
- sal_Int32 dwNumSpan = *pNumSpans;
-
- // since we need to sort the spans from top to bottom
- // and left to right, we need to find the correct location
- // in the table.
- sal_Int32 dwIndex = 0;
- while(dwIndex<dwNumSpan)
- {
- // since we would like to avoid unnecessary spans
- // we try to consolidate them if possible.
- // consolidate with right neighbour
- if(pSpanArray[dwIndex].x == rx)
- {
- pSpanArray[dwIndex].x = lx;
- pSpanArray[dwIndex].w += dwSpanWidth;
- return;
- }
-
- // consolidate with left neighbour
- if((pSpanArray[dwIndex].x+pSpanArray[dwIndex].w) == lx)
- {
- pSpanArray[dwIndex].w += rx-lx;
- return;
- }
-
- // no consolidation possible, either this is a completely
- // seperate span or it is the first in the list.
- if(pSpanArray[dwIndex].x > lx)
- break;
-
- // forward to next element in the list.
- ++dwIndex;
- }
-
- // if we reach here, the new span needs to be stored
- // in the table, increase the number of spans in the
- // current scanline.
- *pNumSpans = dwNumSpan+1;
-
- // keep the list of spans in sorted order. 'dwIndex'
- // is where we want to store the new span. 'dwNumSpan'
- // is the number of spans already there. now we need
- // to move the offending spans out of the way.
- while(dwIndex != dwNumSpan)
- {
- pSpanArray[dwNumSpan].x = pSpanArray[dwNumSpan-1].x;
- pSpanArray[dwNumSpan].w = pSpanArray[dwNumSpan-1].w;
- --dwNumSpan;
- }
-
- // insert the new span
- pSpanArray[dwIndex].x = lx;
- pSpanArray[dwIndex].w = rx-lx;
-
- // remember the total number of spans in the table.
- ++maNumberOfSpans;
- }
- }
-
- void ScanlineContainer::Consolidate( void )
- {
- sal_Int32 *pScanline = mpTable;
-
- sal_Int32 dwRemaining = maNumScanlines;
- while(dwRemaining)
- {
- sal_Int32 dwNumSpans = pScanline[0];
- sal_Int32 *pSpanArray = pScanline+2;
-
- sal_Int32 dwRest = dwRemaining-1;
- sal_Int32 *pNext = pScanline;
- while(dwRest)
- {
- pNext += maPitch;
- sal_Int32 dwNumNextSpans = pNext[0];
- sal_Int32 *pSpanArrayNext = pNext+2;
- if(dwNumSpans != dwNumNextSpans)
- break;
-
- sal_Int32 dwCompare = dwNumSpans<<1;
- while(dwCompare)
- {
- if(pSpanArray[dwCompare-1] != pSpanArrayNext[dwCompare-1])
- break;
- --dwCompare;
- }
- if(dwCompare)
- break;
-
- --dwRest;
- }
-
- const sal_Int32 dwNumEqualScanlines(dwRemaining-dwRest);
- pScanline[1] = dwNumEqualScanlines;
- pScanline += maPitch*dwNumEqualScanlines;
- dwRemaining -= dwNumEqualScanlines;
-
- // since we track the total number of spans to generate,
- // we need to account for consolidated scanlines here.
- if(dwNumEqualScanlines > 1)
- maNumberOfSpans -= dwNumSpans * (dwNumEqualScanlines-1);
- }
- }
-}
-
-// TODO: we should consider passing a basegfx b2dpolypolygon here to
-// ensure that the signature isn't misleading.
-// if we could pass a b2dpolypolygon here, we could easily triangulate it.
-void OutputDevice::ImplSetTriangleClipRegion( const PolyPolygon &rPolyPolygon )
-{
- DBG_TESTSOLARMUTEX();
-
- if(!(IsDeviceOutputNecessary()))
- return;
- if(!(mpGraphics))
- if(!(ImplGetGraphics()))
- return;
-
- if( mpGraphics->supportsOperation( OutDevSupport_B2DClip ) )
- {
-#if 0
- ::basegfx::B2DPolyPolygon aB2DPolyPolygon = rPolyPolygon.getB2DPolyPolygon();
-#else
- // getB2DPolyPolygon() "optimizes away" some points
- // 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 )
- {
- const Polygon& rPolygon = rPolyPolygon[ nPolyIdx ];
- ::basegfx::B2DPolygon aB2DPoly;
- for( USHORT nPointIdx = 0; nPointIdx < rPolygon.GetSize(); ++nPointIdx )
- {
- const Point& rPoint = rPolygon[ nPointIdx ];
- const ::basegfx::B2DPoint aB2DPoint( rPoint.X(), rPoint.Y() );
- aB2DPoly.append( aB2DPoint );
- }
- aB2DPolyPolygon.append( aB2DPoly );
- }
-#endif
-
- const ::basegfx::B2DHomMatrix aTransform = ImplGetDeviceTransformation();
- aB2DPolyPolygon.transform( aTransform );
-
- // the rPolyPolygon argument is a "triangle thingy"
- // so convert it to a normal polypolyon first
- ::basegfx::B2DPolyPolygon aPolyTriangle;
- const int nPolyCount = aB2DPolyPolygon.count();
- for( int nPolyIdx = 0; nPolyIdx < nPolyCount; ++nPolyIdx )
- {
- const ::basegfx::B2DPolygon rPolygon = aB2DPolyPolygon.getB2DPolygon( nPolyIdx );
- const int nPointCount = rPolygon.count();
- for( int nPointIdx = 0; nPointIdx+2 < nPointCount; nPointIdx +=3 )
- {
- ::basegfx::B2DPolygon aTriangle;
- aTriangle.append( rPolygon.getB2DPoint( nPointIdx+0 ) );
- aTriangle.append( rPolygon.getB2DPoint( nPointIdx+1 ) );
- aTriangle.append( rPolygon.getB2DPoint( nPointIdx+2 ) );
- aPolyTriangle.append( aTriangle );
- }
- }
-
- // now set the clip region with the real polypolygon
- mpGraphics->BeginSetClipRegion( 0 );
- mpGraphics->UnionClipRegion( aPolyTriangle, this );
- mpGraphics->EndSetClipRegion();
-
- // and mark the clip status as ready
- mbOutputClipped = FALSE;
- mbClipRegion = TRUE;
- mbClipRegionSet = TRUE;
- mbInitClipRegion = FALSE;
- return;
- }
-
- sal_Int32 offset_x = 0;
- sal_Int32 offset_y = 0;
- if ( GetOutDevType() == OUTDEV_WINDOW )
- {
- offset_x = mnOutOffX+mnOutOffOrigX;
- offset_y = mnOutOffY+mnOutOffOrigY;
- }
-
- // first of all we need to know the upper limit
- // of the amount of possible clipping regions.
- sal_Int32 maxy = SAL_MIN_INT32;
- sal_Int32 miny = SAL_MAX_INT32;
- sal_uInt32 dwNumTriangles = 0;
- for(USHORT 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)
- {
- const Point &p = rPoly.GetPoint(j);
- if(p.Y() < miny)
- miny = p.Y();
- if(p.Y() > maxy)
- maxy = p.Y();
- }
- dwNumTriangles += dwNumVertices / 3;
- }
- }
-
- const sal_uInt32 dwNumScanlines = (maxy-miny);
- if(!(dwNumScanlines))
- {
- // indicates that no output needs to be produced
- // since the clipping region did not provide any
- // visible areas.
- mbOutputClipped = TRUE;
-
- // indicates that a clip region has been
- // presented to the output device.
- mbClipRegion = TRUE;
-
- // indicates that the set clipping region
- // has been processed.
- mbClipRegionSet = TRUE;
-
- // under 'normal' circumstances a new clipping region
- // needs to be processed by ImplInitClipRegion(),
- // which we need to circumvent.
- mbInitClipRegion = FALSE;
- return;
- }
-
- // this container provides all services we need to
- // efficiently store/retrieve spans from the table.
- const sal_uInt32 dwNumSpansPerScanline = dwNumTriangles;
- ScanlineContainer container(dwNumScanlines,dwNumSpansPerScanline);
-
- // convert the incoming polypolygon to spans, we assume that
- // 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)
- {
- const Polygon &rPoly = rPolyPolygon.GetObject(i);
- const USHORT dwNumVertices = rPoly.GetSize();
- if(!(dwNumVertices % 3))
- {
- for(USHORT j=0; j<dwNumVertices; j+=3)
- {
- const Point &p0 = rPoly.GetPoint(j+0);
- const Point &p1 = rPoly.GetPoint(j+1);
- const Point &p2 = rPoly.GetPoint(j+2);
-
- // what now follows is an extremely fast triangle
- // rasterizer from which all tricky and interesting
- // parts were forcibly amputated.
- // note: top.left fill-convention
- vertex v0(p0);
- vertex v1(p1);
- vertex v2(p2);
-
- //sprintf(string,"[%f,%f] [%f,%f] [%f,%f]\n",v0.x,v0.y,v1.x,v1.y,v2.x,v2.y);
- //OSL_TRACE(string);
-
- if(v0.y > v2.y) ::swap(v0, v2);
- if(v1.y > v2.y) ::swap(v1, v2);
- if(v0.y > v1.y) ::swap(v0, v1);
-
- const float float2fixed(16.0f);
-
- // vertex coordinates of the triangle [28.4 fixed-point]
- const int i4x0 = iround(float2fixed * (v0.x - 0.5f));
- const int i4y0 = iround(float2fixed * (v0.y - 0.5f));
- const int i4x1 = iround(float2fixed * (v1.x - 0.5f));
- const int i4y1 = iround(float2fixed * (v1.y - 0.5f));
- const int i4x2 = iround(float2fixed * (v2.x - 0.5f));
- const int i4y2 = iround(float2fixed * (v2.y - 0.5f));
-
- // vertex coordinate deltas [28.4 fixed-point]
- const int i4dx12 = i4x1-i4x0;
- const int i4dy12 = i4y1-i4y0;
- const int i4dx13 = i4x2-i4x0;
- const int i4dy13 = i4y2-i4y0;
- const int i4dx23 = i4x2-i4x1;
- const int i4dy23 = i4y2-i4y1;
-
- // slope of edges [quotient,remainder]
- const int mq12 = floorDiv(i4dx12 << 4, i4dy12 << 4);
- const int mq13 = floorDiv(i4dx13 << 4, i4dy13 << 4);
- const int mq23 = floorDiv(i4dx23 << 4, i4dy23 << 4);
- const int mr12 = floorMod(i4dx12 << 4, i4dy12 << 4);
- const int mr13 = floorMod(i4dx13 << 4, i4dy13 << 4);
- const int mr23 = floorMod(i4dx23 << 4, i4dy23 << 4);
-
- // convert the vertical coordinates back to integers.
- // according to the top-left fillrule we need to step
- // the coordinates to the ceiling.
- const int y0 = (i4y0+15)>>4;
- const int y1 = (i4y1+15)>>4;
- const int y2 = (i4y2+15)>>4;
-
- // calculate the value of the horizontal coordinate
- // from the edge that 'spans' the triangle.
- const int x = ceilDiv(i4dx13*i4dy12 + i4x0*i4dy13, i4dy13);
-
- // this will hold the horizontal coordinates
- // of the seperate spans during the rasterization process.
- int lx,rx;
-
- // this pair will serve as the error accumulator while
- // we step along the edges.
- int ld,rd,lD,rD;
-
- // these are the edge and error stepping values that
- // will be used while stepping.
- int lQ,rQ,lR,rR;
-
- if(i4x1 < x)
- {
- lx = ceilDiv(i4dx12 * (ceilFix4(i4y0) - i4y0) + i4x0 * i4dy12, i4dy12 << 4);
- ld = ceilMod(i4dx12 * (ceilFix4(i4y0) - i4y0) + i4x0 * i4dy12, i4dy12 << 4);
- rx = ceilDiv(i4dx13 * (ceilFix4(i4y0) - i4y0) + i4x0 * i4dy13, i4dy13 << 4);
- rd = ceilMod(i4dx13 * (ceilFix4(i4y0) - i4y0) + i4x0 * i4dy13, i4dy13 << 4);
- lQ = mq12;
- rQ = mq13;
- lR = mr12;
- rR = mr13;
- lD = i4dy12 << 4;
- rD = i4dy13 << 4;
- }
- else
- {
- lx = ceilDiv(i4dx13 * (ceilFix4(i4y0) - i4y0) + i4x0 * i4dy13, i4dy13 << 4);
- ld = ceilMod(i4dx13 * (ceilFix4(i4y0) - i4y0) + i4x0 * i4dy13, i4dy13 << 4);
- rx = ceilDiv(i4dx12 * (ceilFix4(i4y0) - i4y0) + i4x0 * i4dy12, i4dy12 << 4);
- rd = ceilMod(i4dx12 * (ceilFix4(i4y0) - i4y0) + i4x0 * i4dy12, i4dy12 << 4);
- lQ = mq13;
- rQ = mq12;
- lR = mr13;
- rR = mr12;
- lD = i4dy13 << 4;
- rD = i4dy12 << 4;
- }
-
- for(signed int y=y0; y<y1; y++)
- {
- container.InsertSpan(y-miny,lx,rx);
-
- lx += lQ; ld += lR;
- if(ld > 0) { ld -= lD; lx += 1; }
- rx += rQ; rd += rR;
- if(rd > 0) { rd -= rD; rx += 1; }
- }
-
- if(i4x1 < x)
- {
- lx = ceilDiv(i4dx23 * (ceilFix4(i4y1) - i4y1) + i4x1 * i4dy23, i4dy23 << 4);
- ld = ceilMod(i4dx23 * (ceilFix4(i4y1) - i4y1) + i4x1 * i4dy23, i4dy23 << 4);
- rx = ceilDiv(i4dx13 * (ceilFix4(i4y1) - i4y0) + i4x0 * i4dy13, i4dy13 << 4);
- rd = ceilMod(i4dx13 * (ceilFix4(i4y1) - i4y0) + i4x0 * i4dy13, i4dy13 << 4);
- lQ = mq23;
- lR = mr23;
- lD = i4dy23 << 4;
- }
- else
- {
- rx = ceilDiv(i4dx23 * (ceilFix4(i4y1) - i4y1) + i4x1 * i4dy23, i4dy23 << 4);
- rd = ceilMod(i4dx23 * (ceilFix4(i4y1) - i4y1) + i4x1 * i4dy23, i4dy23 << 4);
- rQ = mq23;
- rR = mr23;
- rD = i4dy23 << 4;
- }
-
- for(signed int y=y1; y<y2; y++)
- {
- container.InsertSpan(y-miny,lx,rx);
-
- lx += lQ; ld += lR;
- if(ld > 0) { ld -= lD; lx += 1; }
- rx += rQ; rd += rR;
- if(rd > 0) { rd -= rD; rx += 1; }
- }
- }
- }
+ mbClipRegion = sal_True;
+ mbInitClipRegion = sal_True;
}
-
- // now try to consolidate as many scanlines as possible.
- // please note that this will probably change the number
- // of spans [at least this is why we do all this hassle].
- // so, if you use 'consolidate' you should *use* this
- // information during iteration, because the 'graphics'
- // object we tell all those regions about is a bit,
- // hm, how to say, *picky* if you supply not correctly
- // the amount of regions.
- container.Consolidate();
-
- // now forward the spantable to the graphics handler.
- SpanIterator it(container.Iterate());
- mpGraphics->BeginSetClipRegion( container.GetNumSpans() );
- while(miny < maxy)
- {
- const sal_Int32 dwNumEqual(it.GetNumEqualScanlines());
- while(it.GetRemainingSpans())
- {
- // retrieve the next span [x-coordinate, width] from the current scanline.
- std::pair<sal_Int32,sal_Int32> span(it.GetNextSpan());
-
- // now forward this to the graphics object.
- // the only part that is worth noting is that we use
- // the number of equal spanlines [the current is always the
- // first one of the equal bunch] as the height of the region.
- mpGraphics->UnionClipRegion( offset_x+span.first,
- offset_y+miny,
- span.second,
- dwNumEqual,
- this );
- }
- it.Skip(dwNumEqual);
- miny += dwNumEqual;
- }
- mpGraphics->EndSetClipRegion();
-
- // indicates that no output needs to be produced
- // since the clipping region did not provide any
- // visible areas. the clip covers the whole area
- // if there's not a single region.
- mbOutputClipped = (container.GetNumSpans() == 0);
-
- // indicates that a clip region has been
- // presented to the output device.
- mbClipRegion = TRUE;
-
- // indicates that the set clipping region
- // has been processed.
- mbClipRegionSet = TRUE;
-
- // under 'normal' circumstances a new clipping region
- // needs to be processed by ImplInitClipRegion(),
- // which we need to circumvent.
- mbInitClipRegion = FALSE;
}
// -----------------------------------------------------------------------
@@ -1815,7 +1054,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 +1071,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 );
@@ -1848,42 +1087,6 @@ void OutputDevice::SetClipRegion( const Region& rRegion )
// -----------------------------------------------------------------------
-void OutputDevice::SetTriangleClipRegion( const PolyPolygon &rPolyPolygon )
-{
- DBG_TRACE( "OutputDevice::SetTriangleClipRegion( rPolyPolygon )" );
- DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
-
- // in case the passed polypolygon is empty, use the
- // existing SetClipRegion() method which gracefully
- // unsets any previously set clipping region.
- if(!(rPolyPolygon.Count()))
- SetClipRegion();
-
- sal_Int32 offset_x = 0;
- sal_Int32 offset_y = 0;
- if ( GetOutDevType() == OUTDEV_WINDOW )
- {
- offset_x = mnOutOffX+mnOutOffOrigX;
- offset_y = mnOutOffY+mnOutOffOrigY;
- }
-
- // play nice with the rest of the system and provide an old-style region.
- // the rest of this method does not rely on this.
- maRegion = Region::GetRegionFromPolyPolygon( LogicToPixel(rPolyPolygon) );
- maRegion.Move(offset_x,offset_x);
-
- // feed region to metafile
- if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaClipRegionAction( maRegion, TRUE ) );
-
- ImplSetTriangleClipRegion( rPolyPolygon );
-
- if( mpAlphaVDev )
- mpAlphaVDev->SetTriangleClipRegion( rPolyPolygon );
-}
-
-// -----------------------------------------------------------------------
-
Region OutputDevice::GetClipRegion() const
{
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -1928,7 +1131,7 @@ void OutputDevice::MoveClipRegion( long nHorzMove, long nVertMove )
maRegion.Move( ImplLogicWidthToDevicePixel( nHorzMove ),
ImplLogicHeightToDevicePixel( nVertMove ) );
- mbInitClipRegion = TRUE;
+ mbInitClipRegion = sal_True;
}
if( mpAlphaVDev )
@@ -1947,8 +1150,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 +1174,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 +1184,7 @@ void OutputDevice::IntersectClipRegion( const Region& rRegion )
// -----------------------------------------------------------------------
-void OutputDevice::SetDrawMode( ULONG nDrawMode )
+void OutputDevice::SetDrawMode( sal_uLong nDrawMode )
{
DBG_TRACE1( "OutputDevice::SetDrawMode( %lx )", nDrawMode );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -2005,7 +1208,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 +1226,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 +1264,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 +1282,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 +1297,8 @@ void OutputDevice::SetLineColor( const Color& rColor )
{
if( maLineColor != aColor )
{
- mbInitLineColor = TRUE;
- mbLineColor = TRUE;
+ mbInitLineColor = sal_True;
+ mbLineColor = sal_True;
maLineColor = aColor;
}
}
@@ -2112,12 +1315,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 +1353,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 +1375,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 +1390,8 @@ void OutputDevice::SetFillColor( const Color& rColor )
{
if ( maFillColor != aColor )
{
- mbInitFillColor = TRUE;
- mbFillColor = TRUE;
+ mbInitFillColor = sal_True;
+ mbFillColor = sal_True;
maFillColor = aColor;
}
}
@@ -2205,7 +1408,7 @@ void OutputDevice::SetBackground()
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
maBackground = Wallpaper();
- mbBackground = FALSE;
+ mbBackground = sal_False;
if( mpAlphaVDev )
mpAlphaVDev->SetBackground();
@@ -2221,9 +1424,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 +1440,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 +1457,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 +1770,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 +1820,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 +1868,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 +1940,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 +2003,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 +2030,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 +2362,21 @@ void OutputDevice::DrawPolyLine(
// -----------------------------------------------------------------------
-void OutputDevice::Push( USHORT nFlags )
+sal_uInt32 OutputDevice::GetGCStackDepth() const
+{
+ const ImplObjStack* pData = mpObjStack;
+ sal_uInt32 nDepth = 0;
+ while( pData )
+ {
+ nDepth++;
+ pData = pData->mpPrev;
+ }
+ return nDepth;
+}
+
+// -----------------------------------------------------------------------
+
+void OutputDevice::Push( sal_uInt16 nFlags )
{
DBG_TRACE( "OutputDevice::Push()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -3349,7 +2566,7 @@ void OutputDevice::SetConnectMetaFile( GDIMetaFile* pMtf )
// -----------------------------------------------------------------------
-void OutputDevice::EnableOutput( BOOL bEnable )
+void OutputDevice::EnableOutput( sal_Bool bEnable )
{
mbOutput = (bEnable != 0);
@@ -3369,7 +2586,7 @@ void OutputDevice::SetSettings( const AllSettings& rSettings )
// -----------------------------------------------------------------------
-USHORT OutputDevice::GetBitCount() const
+sal_uInt16 OutputDevice::GetBitCount() const
{
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -3383,12 +2600,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 +2620,17 @@ USHORT OutputDevice::GetAlphaBitCount() const
// -----------------------------------------------------------------------
-ULONG OutputDevice::GetColorCount() const
+sal_uLong 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_uLong) 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 06dcd73cc3d4..6d98f79dcaaa 100644..100755
--- 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_uLong nVCLRLut[ 6 ];
+extern sal_uLong nVCLGLut[ 6 ];
+extern sal_uLong nVCLBLut[ 6 ];
+extern sal_uLong nVCLDitherLut[ 256 ];
+extern sal_uLong nVCLLut[ 256 ];
// =======================================================================
-ULONG ImplAdjustTwoRect( TwoRect& rTwoRect, const Size& rSizePix )
+sal_uLong ImplAdjustTwoRect( TwoRect& rTwoRect, const Size& rSizePix )
{
- ULONG nMirrFlags = 0;
+ sal_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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 );
@@ -1616,11 +1616,11 @@ void OutputDevice::DrawPixel( const Polygon& rPts, const Color& rColor )
namespace
{
- BYTE lcl_calcColor( const BYTE nSourceColor, const BYTE nSourceOpaq, const BYTE nDestColor )
+ sal_uInt8 lcl_calcColor( const sal_uInt8 nSourceColor, const sal_uInt8 nSourceOpaq, const sal_uInt8 nDestColor )
{
int c = ( (int)nDestColor * ( 255 - nSourceOpaq ) )
+ (int)nSourceOpaq * (int)nSourceColor;
- return BYTE( c / 255 );
+ return sal_uInt8( c / 255 );
}
}
@@ -1644,8 +1644,8 @@ Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp,
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();
@@ -1667,18 +1667,18 @@ 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_uLong nD = nVCLDitherLut[ nModY | ( nOutX & 0x0FL ) ];
aSrcCol = pP->GetColor( nMapY, nMapX );
aDstCol = pB->GetColor( nY, nX );
- const BYTE nSrcOpaq = 255 - pA->GetPixel( nMapY, nMapX ).GetBlueOrIndex();
- const BYTE nDstOpaq = 255 - pAlphaW->GetPixel( nY, nX ).GetBlueOrIndex();
+ const sal_uInt8 nSrcOpaq = 255 - pA->GetPixel( nMapY, nMapX ).GetBlueOrIndex();
+ const sal_uInt8 nDstOpaq = 255 - pAlphaW->GetPixel( nY, nX ).GetBlueOrIndex();
aDstCol.SetRed( lcl_calcColor( aSrcCol.GetRed(), nSrcOpaq, aDstCol.GetRed() ) );
aDstCol.SetBlue( lcl_calcColor( aSrcCol.GetBlue(), nSrcOpaq, aDstCol.GetBlue() ) );
aDstCol.SetGreen( lcl_calcColor( aSrcCol.GetGreen(), nSrcOpaq, aDstCol.GetGreen() ) );
- 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 ] ) );
pW->SetPixel( nY, nX, aIndex );
@@ -1687,9 +1687,9 @@ Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp,
// the inverse alpha space (with 255 meaning
// opaque), otherwise, transitivity is not
// achieved.
- const BYTE nSrcAlpha = 255-COLOR_CHANNEL_MERGE( 255, (BYTE)nDstOpaq, nSrcOpaq );
+ const sal_uInt8 nSrcAlpha = 255-COLOR_CHANNEL_MERGE( 255, (sal_uInt8)nDstOpaq, nSrcOpaq );
- 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 );
@@ -1716,8 +1716,8 @@ Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp,
aSrcCol = pP->GetColor( nMapY, nMapX );
aDstCol = pB->GetColor( nY, nX );
- const BYTE nSrcOpaq = 255 - pA->GetPixel( nMapY, nMapX ).GetBlueOrIndex();
- const BYTE nDstOpaq = 255 - pAlphaW->GetPixel( nY, nX ).GetBlueOrIndex();
+ const sal_uInt8 nSrcOpaq = 255 - pA->GetPixel( nMapY, nMapX ).GetBlueOrIndex();
+ const sal_uInt8 nDstOpaq = 255 - pAlphaW->GetPixel( nY, nX ).GetBlueOrIndex();
aDstCol.SetRed( lcl_calcColor( aSrcCol.GetRed(), nSrcOpaq, aDstCol.GetRed() ) );
aDstCol.SetBlue( lcl_calcColor( aSrcCol.GetBlue(), nSrcOpaq, aDstCol.GetBlue() ) );
@@ -1729,7 +1729,7 @@ Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp,
// the inverse alpha space (with 255 meaning
// opaque), otherwise, transitivity is not
// achieved.
- const BYTE nSrcAlpha = 255-COLOR_CHANNEL_MERGE( 255, (BYTE)nDstOpaq, nSrcOpaq );
+ const sal_uInt8 nSrcAlpha = 255-COLOR_CHANNEL_MERGE( 255, (sal_uInt8)nDstOpaq, nSrcOpaq );
pAlphaW->SetPixel( nY, nX, Color(nSrcAlpha, nSrcAlpha, nSrcAlpha) );
}
@@ -1784,11 +1784,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_uLong 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 );
@@ -1923,7 +1923,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 )
{
@@ -1972,7 +1972,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
@@ -2097,7 +2097,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_uLong nMirrFlags = 0UL;
if( aMask.GetBitCount() > 1 )
aMask.Convert( BMP_CONVERSION_1BIT_THRESHOLD );
@@ -2144,9 +2144,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++ )
@@ -2158,7 +2158,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 )
{
@@ -2195,7 +2195,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_uLong nMirrFlags = 0UL;
if( aMask.GetBitCount() > 1 )
aMask.Convert( BMP_CONVERSION_1BIT_THRESHOLD );
@@ -2230,10 +2230,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 );
@@ -2250,7 +2250,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 ca50e4bf6c82..10f618d6e7c1 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -225,7 +225,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
{
@@ -317,7 +317,7 @@ void ImplFreeOutDevFontData()
void OutputDevice::BeginFontSubstitution()
{
ImplSVData* pSVData = ImplGetSVData();
- pSVData->maGDIData.mbFontSubChanged = FALSE;
+ pSVData->maGDIData.mbFontSubChanged = sal_False;
}
// -----------------------------------------------------------------------
@@ -333,7 +333,7 @@ void OutputDevice::EndFontSubstitution()
DataChangedEvent aDCEvt( DATACHANGED_FONTSUBSTITUTION );
pApp->DataChanged( aDCEvt );
pApp->NotifyAllWindows( aDCEvt );
- pSVData->maGDIData.mbFontSubChanged = FALSE;
+ pSVData->maGDIData.mbFontSubChanged = sal_False;
}
}
@@ -341,19 +341,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 ) );
}
@@ -361,7 +361,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 )
@@ -376,7 +376,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 );
@@ -384,7 +384,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 )
@@ -403,21 +403,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 )
@@ -427,7 +427,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 ) ;
@@ -444,7 +444,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();
@@ -465,7 +465,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;
@@ -496,8 +496,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_uLong nFlags, const OutputDevice* pOutDev )
{
DBG_TRACE( "OutputDevice::GetDefaultFont()" );
@@ -730,7 +730,7 @@ static unsigned ImplIsCJKFont( const String& rFontName )
// -----------------------------------------------------------------------
-static void ImplCalcType( ULONG& rType, FontWeight& rWeight, FontWidth& rWidth,
+static void ImplCalcType( sal_uLong& rType, FontWeight& rWeight, FontWidth& rWidth,
FontFamily eFamily, const FontNameAttr* pFontAttr )
{
if ( eFamily != FAMILY_DONTKNOW )
@@ -1646,7 +1646,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindBySubstFontAttr( const utl::FontNa
}
// use known attributes from the configuration to find a matching substitute
- const ULONG nSearchType = rFontAttr.Type;
+ const sal_uLong nSearchType = rFontAttr.Type;
if( nSearchType != 0 )
{
const FontWeight eSearchWeight = rFontAttr.Weight;
@@ -1699,7 +1699,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByLocale( com::sun::star::lang::Lo
// -----------------------------------------------------------------------
-ImplDevFontListData* ImplDevFontList::ImplFindByAttributes( ULONG nSearchType,
+ImplDevFontListData* ImplDevFontList::ImplFindByAttributes( sal_uLong nSearchType,
FontWeight eSearchWeight, FontWidth eSearchWidth, FontFamily /*eSearchFamily*/,
FontItalic eSearchItalic, const String& rSearchFamilyName ) const
{
@@ -1717,7 +1717,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByAttributes( ULONG nSearchType,
long nTestMatch;
long nBestMatch = 40000;
- ULONG nBestType = 0;
+ sal_uLong nBestType = 0;
DevFontList::const_iterator it = maDevFontList.begin();
for(; it != maDevFontList.end(); ++it )
@@ -1725,7 +1725,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByAttributes( ULONG nSearchType,
ImplDevFontListData* pData = (*it).second;
// Get all information about the matching font
- ULONG nMatchType = pData->mnMatchType;
+ sal_uLong nMatchType = pData->mnMatchType;
FontWeight eMatchWeight= pData->meMatchWeight;
FontWidth eMatchWidth = pData->meMatchWidth;
@@ -2436,7 +2436,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;
@@ -2565,7 +2565,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByFont( ImplFontSelectData& rFSD,
String aSearchFamilyName;
FontWeight eSearchWeight = rFSD.meWeight;
FontWidth eSearchWidth = rFSD.meWidthType;
- ULONG nSearchType = 0;
+ sal_uLong nSearchType = 0;
FontSubstConfiguration::getMapName( aSearchName, aSearchShortName, aSearchFamilyName,
eSearchWeight, eSearchWidth, nSearchType );
@@ -2637,7 +2637,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByFont( ImplFontSelectData& rFSD,
String aTempShortName;
String aTempFamilyName;
- ULONG nTempType = 0;
+ sal_uLong nTempType = 0;
FontWeight eTempWeight = rFSD.meWeight;
FontWidth eTempWidth = WIDTH_DONTKNOW;
FontSubstConfiguration::getMapName( aSearchName, aTempShortName, aTempFamilyName,
@@ -2897,17 +2897,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;
}
// =======================================================================
@@ -2972,7 +2972,7 @@ void OutputDevice::ImplInitTextColor()
if ( mbInitTextColor )
{
mpGraphics->SetTextColor( ImplColorToSal( GetTextColor() ) );
- mbInitTextColor = FALSE;
+ mbInitTextColor = sal_False;
}
}
@@ -3029,9 +3029,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 )
@@ -3132,10 +3132,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 );
}
}
@@ -3224,10 +3224,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, 0, -(mpFontEntry->maMetric.mnAscent + mnEmphasisAscent),
nWidth,
@@ -3493,7 +3493,7 @@ static void ImplDrawWavePixel( long nOriginX, long nOriginY,
short nOrientation,
SalGraphics* pGraphics,
OutputDevice* pOutDev,
- BOOL bDrawPixAsRect,
+ sal_Bool bDrawPixAsRect,
long nPixWidth, long nPixHeight )
{
@@ -3529,7 +3529,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;
@@ -3552,28 +3552,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 )
@@ -3641,7 +3641,7 @@ void OutputDevice::ImplDrawWaveTextLine( long nBaseX, long nBaseY,
long nDistX, long nDistY, long nWidth,
FontUnderline eTextLine,
Color aColor,
- BOOL bIsAbove )
+ sal_Bool bIsAbove )
{
ImplFontEntry* pFontEntry = mpFontEntry;
long nLineHeight;
@@ -3705,7 +3705,7 @@ void OutputDevice::ImplDrawStraightTextLine( long nBaseX, long nBaseY,
long nDistX, long nDistY, long nWidth,
FontUnderline eTextLine,
Color aColor,
- BOOL bIsAbove )
+ sal_Bool bIsAbove )
{
ImplFontEntry* pFontEntry = mpFontEntry;
long nLineHeight = 0;
@@ -3776,10 +3776,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 = nDistX;
@@ -3972,10 +3972,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;
const long& nLeft = nDistX;
@@ -4057,7 +4057,7 @@ void OutputDevice::ImplDrawStrikeoutChar( long nBaseX, long nBaseY,
nBaseY += nDistY;
// strikeout text has to be left aligned
- ULONG nOrigTLM = mnTextLayoutMode;
+ sal_uLong nOrigTLM = mnTextLayoutMode;
mnTextLayoutMode = TEXT_LAYOUT_BIDI_STRONG | TEXT_LAYOUT_COMPLEX_DISABLED;
pLayout = ImplLayout( aStrikeoutText, 0, STRING_LEN );
mnTextLayoutMode = nOrigTLM;
@@ -4085,7 +4085,7 @@ void OutputDevice::ImplDrawTextLine( long nX, long nY,
FontStrikeout eStrikeout,
FontUnderline eUnderline,
FontUnderline eOverline,
- BOOL bUnderlineAbove )
+ sal_Bool bUnderlineAbove )
{
if ( !nWidth )
return;
@@ -4093,9 +4093,9 @@ void OutputDevice::ImplDrawTextLine( long nX, long nY,
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;
if ( IsRTLEnabled() )
{
@@ -4118,29 +4118,29 @@ void OutputDevice::ImplDrawTextLine( long nX, long nY,
(eUnderline == UNDERLINE_BOLDWAVE) )
{
ImplDrawWaveTextLine( nX, nY, nDistX, 0, nWidth, eUnderline, aUnderlineColor, bUnderlineAbove );
- bUnderlineDone = TRUE;
+ bUnderlineDone = sal_True;
}
if ( (eOverline == UNDERLINE_SMALLWAVE) ||
(eOverline == UNDERLINE_WAVE) ||
(eOverline == UNDERLINE_DOUBLEWAVE) ||
(eOverline == UNDERLINE_BOLDWAVE) )
{
- ImplDrawWaveTextLine( nX, nY, nDistX, 0, nWidth, eOverline, aOverlineColor, TRUE );
- bOverlineDone = TRUE;
+ ImplDrawWaveTextLine( nX, nY, nDistX, 0, nWidth, eOverline, aOverlineColor, sal_True );
+ bOverlineDone = sal_True;
}
if ( (eStrikeout == STRIKEOUT_SLASH) ||
(eStrikeout == STRIKEOUT_X) )
{
ImplDrawStrikeoutChar( nX, nY, nDistX, 0, nWidth, eStrikeout, aStrikeoutColor );
- bStrikeoutDone = TRUE;
+ bStrikeoutDone = sal_True;
}
if ( !bUnderlineDone )
ImplDrawStraightTextLine( nX, nY, nDistX, 0, nWidth, eUnderline, aUnderlineColor, bUnderlineAbove );
if ( !bOverlineDone )
- ImplDrawStraightTextLine( nX, nY, nDistX, 0, nWidth, eOverline, aOverlineColor, TRUE );
+ ImplDrawStraightTextLine( nX, nY, nDistX, 0, nWidth, eOverline, aOverlineColor, sal_True );
if ( !bStrikeoutDone )
ImplDrawStrikeoutLine( nX, nY, nDistX, 0, nWidth, eStrikeout, aStrikeoutColor );
@@ -4149,7 +4149,7 @@ void OutputDevice::ImplDrawTextLine( long nX, long nY,
// -----------------------------------------------------------------------
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 )
{
@@ -4222,18 +4222,18 @@ void OutputDevice::ImplDrawMnemonicLine( long nX, long nY, long nWidth )
nX = nBaseX - nWidth - (nX - nBaseX - 1);
}
- ImplDrawTextLine( nX, nY, 0, nWidth, STRIKEOUT_NONE, UNDERLINE_SINGLE, UNDERLINE_NONE, FALSE );
+ ImplDrawTextLine( nX, nY, 0, 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
};
@@ -4268,7 +4268,7 @@ void OutputDevice::ImplGetEmphasisMark( PolyPolygon& rPolyPoly, BOOL& rPolyLine,
rWidth = 0;
rYOff = 0;
- rPolyLine = FALSE;
+ rPolyLine = sal_False;
if ( !nHeight )
return;
@@ -4309,7 +4309,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 ),
@@ -4383,7 +4383,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
@@ -4435,10 +4435,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;
@@ -4447,7 +4447,7 @@ void OutputDevice::ImplDrawEmphasisMarks( SalLayout& rSalLayout )
long nEmphasisYOff;
long nEmphasisWidth;
long nEmphasisHeight;
- BOOL bPolyLine;
+ sal_Bool bPolyLine;
if ( nEmphasisMark & EMPHASISMARK_POS_BELOW )
nEmphasisHeight = mnEmphasisDescent;
@@ -4571,12 +4571,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() );
@@ -4590,7 +4590,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 ) )
@@ -4784,7 +4784,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!" );
@@ -4854,10 +4854,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
@@ -4940,7 +4940,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
{
@@ -4982,7 +4982,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() );
@@ -4996,12 +4996,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)
{
@@ -5035,7 +5035,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 )
@@ -5050,7 +5050,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() );
@@ -5061,7 +5061,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 )
@@ -5069,7 +5069,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) )
@@ -5107,12 +5107,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 )
{
@@ -5133,7 +5133,7 @@ void OutputDevice::SetFont( const Font& rNewFont )
// -----------------------------------------------------------------------
-void OutputDevice::SetLayoutMode( ULONG nTextLayoutMode )
+void OutputDevice::SetLayoutMode( sal_uLong nTextLayoutMode )
{
DBG_TRACE( "OutputDevice::SetTextLayoutMode()" );
@@ -5180,7 +5180,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 )
@@ -5200,7 +5200,7 @@ void OutputDevice::SetTextColor( const Color& rColor )
if ( maTextColor != aColor )
{
maTextColor = aColor;
- mbInitTextColor = TRUE;
+ mbInitTextColor = sal_True;
}
if( mpAlphaVDev )
@@ -5215,12 +5215,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();
@@ -5234,7 +5234,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 )
{
@@ -5248,7 +5248,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 )
@@ -5256,7 +5256,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) )
@@ -5269,7 +5269,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 );
@@ -5298,7 +5298,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 );
@@ -5325,7 +5325,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 )
@@ -5341,7 +5341,7 @@ void OutputDevice::SetTextLineColor( const Color& rColor )
}
if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaTextLineColorAction( aColor, TRUE ) );
+ mpMetaFile->AddAction( new MetaTextLineColorAction( aColor, sal_True ) );
maTextLineColor = aColor;
@@ -5357,7 +5357,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 );
@@ -5384,7 +5384,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 )
@@ -5400,7 +5400,7 @@ void OutputDevice::SetOverlineColor( const Color& rColor )
}
if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaOverlineColorAction( aColor, TRUE ) );
+ mpMetaFile->AddAction( new MetaOverlineColorAction( aColor, sal_True ) );
maOverlineColor = aColor;
@@ -5422,7 +5422,7 @@ void OutputDevice::SetTextAlign( TextAlign eAlign )
if ( maFont.GetAlign() != eAlign )
{
maFont.SetAlign( eAlign );
- mbNewFont = TRUE;
+ mbNewFont = sal_True;
}
if( mpAlphaVDev )
@@ -5435,7 +5435,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 );
@@ -5478,7 +5478,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 );
}
@@ -5486,7 +5486,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 );
@@ -5714,7 +5714,7 @@ long OutputDevice::GetTextArray( const String& rStr, sal_Int32* pDXAry,
if( nIndex >= rStr.Len() )
return 0;
- if( (ULONG)nIndex+nLen >= rStr.Len() )
+ if( (sal_uLong)nIndex+nLen >= rStr.Len() )
nLen = rStr.Len() - nIndex;
// do layout
@@ -5756,14 +5756,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_uLong)nIndex+nLen >= rStr.Len() )
nLen = rStr.Len() - nIndex;
// layout complex text
@@ -5822,7 +5822,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_uLong nWidth,
const String& rStr,
xub_StrLen nIndex, xub_StrLen nLen )
{
@@ -5854,7 +5854,7 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( String& rStr,
{
// get string length for calculating extents
xub_StrLen nEndIndex = rStr.Len();
- if( (ULONG)nMinIndex + nLen < nEndIndex )
+ if( (sal_uLong)nMinIndex + nLen < nEndIndex )
nEndIndex = nMinIndex + nLen;
// don't bother if there is nothing to do
@@ -5923,7 +5923,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) );
}
}
@@ -6221,7 +6221,7 @@ SalLayout* OutputDevice::ImplGlyphFallbackLayout( SalLayout* pSalLayout, ImplLay
// -----------------------------------------------------------------------
-BOOL OutputDevice::GetTextIsRTL(
+sal_Bool OutputDevice::GetTextIsRTL(
const String& rString,
xub_StrLen nIndex, xub_StrLen nLen ) const
{
@@ -6230,14 +6230,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 );
@@ -6331,17 +6331,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() )
{
@@ -6361,7 +6361,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 )
@@ -6490,7 +6490,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];
@@ -6561,7 +6561,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)) );
@@ -6606,7 +6606,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& )" );
@@ -6623,11 +6623,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()
@@ -6641,7 +6641,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 )
{
@@ -6690,7 +6690,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
{
@@ -6720,7 +6720,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 )
@@ -6734,13 +6734,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++ )
{
@@ -6775,7 +6775,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;
}
}
@@ -6806,22 +6806,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 ) );
@@ -6831,7 +6831,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()" );
@@ -6900,7 +6900,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++;
@@ -6964,7 +6964,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 );
@@ -6983,7 +6983,7 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const XubString& rStr,
if( nIndex >= rStr.Len() )
return;
- if( (ULONG)nIndex+nLen >= rStr.Len() )
+ if( (sal_uLong)nIndex+nLen >= rStr.Len() )
nLen = rStr.Len() - nIndex;
XubString aStr = rStr;
@@ -7005,7 +7005,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 )
{
@@ -7013,12 +7013,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));
@@ -7038,9 +7038,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() )
{
@@ -7056,11 +7056,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 );
@@ -7097,7 +7097,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 );
@@ -7111,7 +7111,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_uLong)(nIndex+nLen)) )
nLen--;
}
return GetTextWidth( aStr, nIndex, nLen );
@@ -7200,7 +7200,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 );
@@ -7208,17 +7208,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;
}
// -----------------------------------------------------------------------
@@ -7272,7 +7272,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 );
@@ -7414,7 +7414,6 @@ SystemTextLayoutData OutputDevice::GetSysTextLayoutData(const Point& rStartPt, c
// setup glyphs
Point aPos;
sal_GlyphId aGlyphId;
- int nFallbacklevel = 0;
for( int nStart = 0; rLayout->GetNextGlyphs( 1, &aGlyphId, aPos, nStart ); )
{
// NOTE: Windows backend is producing unicode chars (ucs4), so on windows,
@@ -7424,15 +7423,12 @@ SystemTextLayoutData OutputDevice::GetSysTextLayoutData(const Point& rStartPt, c
aGlyph.index = static_cast<unsigned long> (aGlyphId & GF_IDXMASK);
aGlyph.x = aPos.X();
aGlyph.y = aPos.Y();
- aSysLayoutData.rGlyphData.push_back(aGlyph);
-
int nLevel = (aGlyphId & GF_FONTMASK) >> GF_FONTSHIFT;
- if (nLevel > nFallbacklevel && nLevel < MAX_FALLBACK)
- nFallbacklevel = nLevel;
+ aGlyph.fallbacklevel = nLevel < MAX_FALLBACK ? nLevel : 0;
+ aSysLayoutData.rGlyphData.push_back(aGlyph);
}
// Get font data
- aSysLayoutData.aSysFontData = GetSysFontData(nFallbacklevel);
aSysLayoutData.orientation = rLayout->GetOrientation();
rLayout->Release();
@@ -7496,7 +7492,7 @@ xub_StrLen OutputDevice::ValidateKashidas ( const String& rTxt,
// TODO: best is to get rid of this method completely
-ULONG OutputDevice::GetKerningPairCount() const
+sal_uLong OutputDevice::GetKerningPairCount() const
{
DBG_TRACE( "OutputDevice::GetKerningPairCount()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -7522,7 +7518,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_uLong nRequestedPairs, KerningPair* pKernPairs ) const
{
DBG_TRACE( "OutputDevice::GetKerningPairs()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -7544,7 +7540,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()" );
@@ -7569,14 +7565,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_uLong 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;
@@ -7640,8 +7636,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 ) );
@@ -7674,7 +7670,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();
@@ -7739,17 +7735,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_uLong nTWidth, const sal_Int32* pDXArray ) const
{
// the fonts need to be initialized
if( mbNewFont )
@@ -7757,9 +7753,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;
@@ -7767,11 +7763,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;
@@ -7831,7 +7827,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 )
@@ -7878,7 +7874,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;
@@ -7935,10 +7931,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;
@@ -7976,9 +7972,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_uLong nTWidth, const sal_Int32* pDXArray ) const
{
rResultVector.clear();
@@ -7986,7 +7982,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() );
@@ -7994,14 +7990,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_uLong nTWidth, const sal_Int32* pDXArray ) const
{
rPolyPoly.Clear();
@@ -8009,7 +8005,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();
@@ -8017,25 +8013,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;
#ifdef ENABLE_IFC_CACHE // a little font charmap cache helps considerably
static const int NMAXITEMS = 16;
@@ -8075,8 +8071,8 @@ BOOL OutputDevice::GetFontCharMap( FontCharMap& rFontCharMap ) const
}
if( rFontCharMap.IsDefaultMap() )
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -8087,7 +8083,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_uLong)nIndex+nLen > rStr.Len() )
nEnd = rStr.Len();
DBG_ASSERT( nIndex < nEnd, "StartPos >= EndPos?" );
@@ -8097,11 +8093,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..627f75e88282 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_uLong nHorzRound, sal_uLong nVertRound )
{
DBG_TRACE( "OutputDevice::DrawRoundRect()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
diff --git a/vcl/source/gdi/outdev6.cxx b/vcl/source/gdi/outdev6.cxx
index 5b8d228bb141..eb4b76fb4b41 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_uLong 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 )
{
@@ -233,7 +233,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 );
@@ -355,7 +355,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;
@@ -376,8 +376,8 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
Push( PUSH_CLIPREGION | PUSH_LINECOLOR );
IntersectClipRegion( rPolyPoly );
SetLineColor( GetFillColor() );
- const BOOL bOldMap = mbMap;
- EnableMapMode( FALSE );
+ const sal_Bool bOldMap = mbMap;
+ EnableMapMode( sal_False );
if(nMove)
{
@@ -464,16 +464,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 );
@@ -501,25 +501,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++ )
{
@@ -527,7 +527,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();
}
}
}
@@ -539,20 +539,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 )
{
@@ -616,9 +616,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 );
@@ -731,19 +731,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 );
@@ -754,22 +754,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 );
}
@@ -793,8 +793,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 );
@@ -813,10 +813,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;
@@ -825,13 +825,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() )
@@ -843,15 +843,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?
@@ -860,7 +860,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
@@ -877,7 +877,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 ) ) );
@@ -977,7 +977,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;
}
@@ -1052,8 +1052,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() )
@@ -1063,7 +1063,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 ) ) );
@@ -1080,7 +1080,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 ) );
}
@@ -1142,7 +1142,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);
@@ -1226,7 +1226,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 b5b745b708fa..cb472762338b 100755
--- a/vcl/source/gdi/outdevnative.cxx
+++ b/vcl/source/gdi/outdevnative.cxx
@@ -102,14 +102,14 @@ PushButtonValue::~PushButtonValue()
// -----------------------------------------------------------------------
-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) );
}
@@ -117,18 +117,18 @@ BOOL OutputDevice::IsNativeControlSupported( ControlType nType, ControlPart nPar
// -----------------------------------------------------------------------
-BOOL OutputDevice::HitTestNativeControl( ControlType nType,
+sal_Bool OutputDevice::HitTestNativeControl( ControlType nType,
ControlPart nPart,
const Rectangle& 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 );
Rectangle screenRegion( rControlRegion );
@@ -219,7 +219,7 @@ static boost::shared_ptr< ImplControlValue > lcl_transformControlValue( const Im
return aResult;
}
-BOOL OutputDevice::DrawNativeControl( ControlType nType,
+sal_Bool OutputDevice::DrawNativeControl( ControlType nType,
ControlPart nPart,
const Rectangle& rControlRegion,
ControlState nState,
@@ -227,17 +227,17 @@ BOOL OutputDevice::DrawNativeControl( 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 )
if ( !ImplGetGraphics() )
- return FALSE;
+ return sal_False;
if ( mbInitClipRegion )
ImplInitClipRegion();
if ( mbOutputClipped )
- return TRUE;
+ return sal_True;
if ( mbInitLineColor )
ImplInitLineColor();
@@ -254,7 +254,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, *aScreenCtrlValue, aCaption, this );
+ sal_Bool bRet = mpGraphics->DrawNativeControl(nType, nPart, screenRegion, nState, *aScreenCtrlValue, aCaption, this );
return bRet;
}
@@ -262,7 +262,7 @@ BOOL OutputDevice::DrawNativeControl( ControlType nType,
// -----------------------------------------------------------------------
-BOOL OutputDevice::DrawNativeControlText(ControlType nType,
+sal_Bool OutputDevice::DrawNativeControlText(ControlType nType,
ControlPart nPart,
const Rectangle& rControlRegion,
ControlState nState,
@@ -270,7 +270,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 )
@@ -292,7 +292,7 @@ BOOL OutputDevice::DrawNativeControlText(ControlType nType,
boost::shared_ptr< ImplControlValue > aScreenCtrlValue( lcl_transformControlValue( aValue, *this ) );
Rectangle screenRegion( ImplLogicToDevicePixel( rControlRegion ) );
- BOOL bRet = mpGraphics->DrawNativeControlText(nType, nPart, screenRegion, nState, *aScreenCtrlValue, aCaption, this );
+ sal_Bool bRet = mpGraphics->DrawNativeControlText(nType, nPart, screenRegion, nState, *aScreenCtrlValue, aCaption, this );
return bRet;
}
@@ -300,7 +300,7 @@ BOOL OutputDevice::DrawNativeControlText(ControlType nType,
// -----------------------------------------------------------------------
-BOOL OutputDevice::GetNativeControlRegion( ControlType nType,
+sal_Bool OutputDevice::GetNativeControlRegion( ControlType nType,
ControlPart nPart,
const Rectangle& rControlRegion,
ControlState nState,
@@ -310,18 +310,18 @@ BOOL OutputDevice::GetNativeControlRegion( ControlType nType,
Rectangle &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
boost::shared_ptr< ImplControlValue > aScreenCtrlValue( lcl_transformControlValue( aValue, *this ) );
Rectangle screenRegion( ImplLogicToDevicePixel( rControlRegion ) );
- BOOL bRet = mpGraphics->GetNativeControlRegion(nType, nPart, screenRegion, nState, *aScreenCtrlValue,
+ sal_Bool bRet = mpGraphics->GetNativeControlRegion(nType, nPart, screenRegion, nState, *aScreenCtrlValue,
aCaption, rNativeBoundingRegion,
rNativeContentRegion, this );
if( bRet )
diff --git a/vcl/source/gdi/outmap.cxx b/vcl/source/gdi/outmap.cxx
index 189ba4c29e59..1bdd86e13ecb 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_uLong 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_uLong)LONG_MAX - (sal_uLong)( nProductX/2)) / nDenomX);
else
- rThresRes.mnThresPixToLogX = (long)(((ULONG)LONG_MAX + (ULONG)(-nProductX/2)) / nDenomX);
+ rThresRes.mnThresPixToLogX = (long)(((sal_uLong)LONG_MAX + (sal_uLong)(-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_uLong 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_uLong)LONG_MAX - (sal_uLong)( nProductY/2)) / nDenomY);
else
- rThresRes.mnThresPixToLogY = (long)(((ULONG)LONG_MAX + (ULONG)(-nProductY/2)) / nDenomY);
+ rThresRes.mnThresPixToLogY = (long)(((sal_uLong)LONG_MAX + (sal_uLong)(-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 23ce1dfa6169..445365e83dd4 100644
--- a/vcl/source/gdi/pdfwriter.cxx
+++ b/vcl/source/gdi/pdfwriter.cxx
@@ -90,7 +90,7 @@ void PDFWriter::DrawTextLine(
FontStrikeout eStrikeout,
FontUnderline eUnderline,
FontUnderline eOverline,
- BOOL bUnderlineAbove )
+ sal_Bool bUnderlineAbove )
{
((PDFWriterImpl*)pImplementation)->drawTextLine( rPos, nWidth, eStrikeout, eUnderline, eOverline, bUnderlineAbove );
}
@@ -107,7 +107,7 @@ void PDFWriter::DrawTextArray(
void PDFWriter::DrawStretchText(
const Point& rStartPt,
- ULONG nWidth,
+ sal_uLong nWidth,
const XubString& rStr,
xub_StrLen nIndex,
xub_StrLen nLen )
@@ -118,7 +118,7 @@ void PDFWriter::DrawStretchText(
void PDFWriter::DrawText(
const Rectangle& rRect,
const XubString& rStr,
- USHORT nStyle )
+ sal_uInt16 nStyle )
{
((PDFWriterImpl*)pImplementation)->drawText( rRect, rStr, nStyle );
}
@@ -148,7 +148,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_uLong nHorzRound, sal_uLong nVertRound )
{
((PDFWriterImpl*)pImplementation)->drawRectangle( rRect, nHorzRound, nVertRound );
}
@@ -281,7 +281,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 );
}
@@ -291,7 +291,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 );
}
@@ -301,7 +301,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 );
}
@@ -356,12 +356,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_uLong nMode )
{
((PDFWriterImpl*)pImplementation)->setLayoutMode( (sal_Int32)nMode );
}
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 325ccef1c3a6..4a37d3a5d601 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -54,6 +54,7 @@
#include <vcl/metric.hxx>
#include <vcl/fontsubset.hxx>
#include <vcl/textlayout.hxx>
+#include <vcl/cvtgrf.hxx>
#include <svsys.h>
#include <vcl/salgdi.hxx>
#include <vcl/svapp.hxx>
@@ -250,7 +251,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 ) );
@@ -887,34 +888,44 @@ static void appendDouble( double fValue, OStringBuffer& rBuffer, sal_Int32 nPrec
}
-static void appendColor( const Color& rColor, OStringBuffer& rBuffer )
+static void appendColor( const Color& rColor, OStringBuffer& rBuffer, bool bConvertToGrey = false )
{
if( rColor != Color( COL_TRANSPARENT ) )
{
- appendDouble( (double)rColor.GetRed() / 255.0, rBuffer );
- rBuffer.append( ' ' );
- appendDouble( (double)rColor.GetGreen() / 255.0, rBuffer );
- rBuffer.append( ' ' );
- appendDouble( (double)rColor.GetBlue() / 255.0, rBuffer );
+ if( bConvertToGrey )
+ {
+ sal_uInt8 cByte = rColor.GetLuminance();
+ appendDouble( (double)cByte / 255.0, rBuffer );
+ }
+ else
+ {
+ appendDouble( (double)rColor.GetRed() / 255.0, rBuffer );
+ rBuffer.append( ' ' );
+ appendDouble( (double)rColor.GetGreen() / 255.0, rBuffer );
+ rBuffer.append( ' ' );
+ appendDouble( (double)rColor.GetBlue() / 255.0, rBuffer );
+ }
}
}
-static void appendStrokingColor( const Color& rColor, OStringBuffer& rBuffer )
+void PDFWriterImpl::appendStrokingColor( const Color& rColor, OStringBuffer& rBuffer )
{
if( rColor != Color( COL_TRANSPARENT ) )
{
- appendColor( rColor, rBuffer );
- rBuffer.append( " RG" );
+ bool bGrey = m_aContext.ColorMode == PDFWriter::DrawGreyscale;
+ appendColor( rColor, rBuffer, bGrey );
+ rBuffer.append( bGrey ? " G" : " RG" );
}
}
-static void appendNonStrokingColor( const Color& rColor, OStringBuffer& rBuffer )
+void PDFWriterImpl::appendNonStrokingColor( const Color& rColor, OStringBuffer& rBuffer )
{
if( rColor != Color( COL_TRANSPARENT ) )
{
- appendColor( rColor, rBuffer );
- rBuffer.append( " rg" );
+ bool bGrey = m_aContext.ColorMode == PDFWriter::DrawGreyscale;
+ appendColor( rColor, rBuffer, bGrey );
+ rBuffer.append( bGrey ? " g" : " rg" );
}
}
@@ -1440,17 +1451,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 )
{
@@ -1561,8 +1572,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 );
}
@@ -2037,9 +2048,25 @@ inline void PDFWriterImpl::appendLiteralStringEncrypt( const rtl::OString& rInSt
appendLiteralStringEncrypt( aBufferString, nInObjectNumber, rOutBuffer);
}
-inline void PDFWriterImpl::appendLiteralStringEncrypt( const rtl::OUString& rInString, const sal_Int32 nInObjectNumber, rtl::OStringBuffer& rOutBuffer )
+void PDFWriterImpl::appendLiteralStringEncrypt( const rtl::OUString& rInString, const sal_Int32 nInObjectNumber, rtl::OStringBuffer& rOutBuffer, rtl_TextEncoding nEnc )
{
- rtl::OString aBufferString( rtl::OUStringToOString( rInString, RTL_TEXTENCODING_ASCII_US ) );
+ rtl::OString aBufferString( rtl::OUStringToOString( rInString, nEnc ) );
+ sal_Int32 nLen = aBufferString.getLength();
+ rtl::OStringBuffer aBuf( nLen );
+ const sal_Char* pT = aBufferString.getStr();
+
+ for( sal_Int32 i = 0; i < nLen; i++, pT++ )
+ {
+ if( (*pT & 0x80) == 0 )
+ aBuf.append( *pT );
+ else
+ {
+ aBuf.append( '<' );
+ appendHex( *pT, aBuf );
+ aBuf.append( '>' );
+ }
+ }
+ aBufferString = aBuf.makeStringAndClear();
appendLiteralStringEncrypt( aBufferString, nInObjectNumber, rOutBuffer);
}
@@ -2058,12 +2085,12 @@ bool PDFWriterImpl::compressStream( SvMemoryStream* pStream )
{
#ifndef DEBUG_DISABLE_PDFCOMPRESSION
pStream->Seek( STREAM_SEEK_TO_END );
- ULONG nEndPos = pStream->Tell();
+ sal_uLong 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();
@@ -2122,7 +2149,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_uLong)nBytes );
nWritten = nBytes;
}
else
@@ -2173,7 +2200,7 @@ OutputDevice* PDFWriterImpl::getReferenceDevice()
pVDev->SetMapMode( MAP_MM );
m_pReferenceDevice->mpPDFWriter = this;
- m_pReferenceDevice->ImplUpdateFontData( TRUE );
+ m_pReferenceDevice->ImplUpdateFontData( sal_True );
}
return m_pReferenceDevice;
}
@@ -2946,12 +2973,9 @@ bool PDFWriterImpl::emitTilings()
aTilingObj.setLength( 0 );
-#if OSL_DEBUG_LEVEL > 1
- {
- OStringBuffer aLine( "PDFWriterImpl::emitTilings" );
- emitComment( aLine.getStr() );
- }
-#endif
+ #if OSL_DEBUG_LEVEL > 1
+ emitComment( "PDFWriterImpl::emitTilings" );
+ #endif
sal_Int32 nX = (sal_Int32)it->m_aRectangle.Left();
sal_Int32 nY = (sal_Int32)it->m_aRectangle.Top();
@@ -3439,10 +3463,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
// now we can actually write the font stream !
#if OSL_DEBUG_LEVEL > 1
- {
- OStringBuffer aLine( " PDFWriterImpl::emitEmbeddedFont" );
- emitComment( aLine.getStr() );
- }
+ emitComment( " PDFWriterImpl::emitEmbeddedFont" );
#endif
OStringBuffer aLine( 512 );
nStreamObject = createObject();
@@ -3863,17 +3884,14 @@ 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
-#if OSL_DEBUG_LEVEL > 1
- {
- OStringBuffer aLine( " PDFWriterImpl::createToUnicodeCMap" );
- emitComment( aLine.getStr() );
- }
-#endif
+ #if OSL_DEBUG_LEVEL > 1
+ emitComment( "PDFWriterImpl::createToUnicodeCMap" );
+ #endif
OStringBuffer aLine( 40 );
aLine.append( nStream );
@@ -4060,10 +4078,7 @@ bool PDFWriterImpl::emitFonts()
CHECK_RETURN( (osl_File_E_None == osl_setFilePos( aFontFile, osl_Pos_Absolut, 0 ) ) );
#if OSL_DEBUG_LEVEL > 1
- {
- OStringBuffer aLine1( " PDFWriterImpl::emitFonts" );
- emitComment( aLine1.getStr() );
- }
+ emitComment( "PDFWriterImpl::emitFonts" );
#endif
sal_Int32 nFontStream = createObject();
sal_Int32 nStreamLengthObject = createObject();
@@ -4634,18 +4649,20 @@ we check in the following sequence:
{
aLine.append( "/Launch/Win<</F" );
// INetURLObject is not good with UNC paths, use original path
- appendLiteralStringEncrypt( rLink.m_aURL, rLink.m_nObject, aLine );
+ appendLiteralStringEncrypt( rLink.m_aURL, rLink.m_nObject, aLine, osl_getThreadTextEncoding() );
aLine.append( ">>" );
}
else
{
- sal_Int32 nSetRelative = 0;
+ bool bSetRelative = false;
+ bool bFileSpec = false;
//check if relative file link is requested and if the protocol is 'file://'
if( m_aContext.RelFsys && eBaseProtocol == eTargetProtocol && eTargetProtocol == INET_PROT_FILE )
- nSetRelative++;
+ bSetRelative = true;
rtl::OUString aFragment = aTargetURL.GetMark( INetURLObject::NO_DECODE /*DECODE_WITH_CHARSET*/ ); //fragment as is,
if( nSetGoToRMode == 0 )
+ {
switch( m_aContext.DefaultLinkAction )
{
default:
@@ -4665,19 +4682,24 @@ we check in the following sequence:
eTargetProtocol != INET_PROT_FILE )
aLine.append( "/URI/URI" );
else
+ {
aLine.append( "/Launch/F" );
+ bFileSpec = true;
+ }
break;
}
+ }
//fragment are encoded in the same way as in the named destination processing
- rtl::OUString aURLNoMark = aTargetURL.GetURLNoMark( INetURLObject::DECODE_WITH_CHARSET );
if( nSetGoToRMode )
{//add the fragment
+ rtl::OUString aURLNoMark = aTargetURL.GetURLNoMark( INetURLObject::DECODE_WITH_CHARSET );
aLine.append("/GoToR");
aLine.append("/F");
- appendLiteralStringEncrypt( nSetRelative ? INetURLObject::GetRelURL( m_aContext.BaseURL, aURLNoMark,
+ bFileSpec = true;
+ appendLiteralStringEncrypt( bSetRelative ? INetURLObject::GetRelURL( m_aContext.BaseURL, aURLNoMark,
INetURLObject::WAS_ENCODED,
INetURLObject::DECODE_WITH_CHARSET ) :
- aURLNoMark, rLink.m_nObject, aLine );
+ aURLNoMark, rLink.m_nObject, aLine, osl_getThreadTextEncoding() );
if( aFragment.getLength() > 0 )
{
aLine.append("/D/");
@@ -4696,13 +4718,16 @@ we check in the following sequence:
//substitute the fragment
aTargetURL.SetMark( aLineLoc.getStr() );
}
- rtl::OUString aURL = aTargetURL.GetMainURL( (nSetRelative || eTargetProtocol == INET_PROT_FILE) ? INetURLObject::DECODE_WITH_CHARSET : INetURLObject::NO_DECODE );
+ rtl::OUString aURL = aTargetURL.GetMainURL( bFileSpec ? INetURLObject::DECODE_WITH_CHARSET : INetURLObject::NO_DECODE );
// check if we have a URL available, if the string is empty, set it as the original one
// if( aURL.getLength() == 0 )
// appendLiteralStringEncrypt( rLink.m_aURL , rLink.m_nObject, aLine );
// else
- appendLiteralStringEncrypt( nSetRelative ? INetURLObject::GetRelURL( m_aContext.BaseURL, aURL ) :
- aURL , rLink.m_nObject, aLine );
+ appendLiteralStringEncrypt( bSetRelative ? INetURLObject::GetRelURL( m_aContext.BaseURL, aURL,
+ INetURLObject::WAS_ENCODED,
+ bFileSpec ? INetURLObject::DECODE_WITH_CHARSET : INetURLObject::NO_DECODE
+ ) :
+ aURL , rLink.m_nObject, aLine, osl_getThreadTextEncoding() );
}
//<--- i56629
}
@@ -5358,12 +5383,9 @@ bool PDFWriterImpl::emitAppearances( PDFWidget& rWidget, OStringBuffer& rAnnotDi
pApppearanceStream->Seek( STREAM_SEEK_TO_BEGIN );
sal_Int32 nObject = createObject();
CHECK_RETURN( updateObject( nObject ) );
-#if OSL_DEBUG_LEVEL > 1
- {
- OStringBuffer aLine( " PDFWriterImpl::emitAppearances" );
- emitComment( aLine.getStr() );
- }
-#endif
+ #if OSL_DEBUG_LEVEL > 1
+ emitComment( "PDFWriterImpl::emitAppearances" );
+ #endif
OStringBuffer aLine;
aLine.append( nObject );
@@ -5606,7 +5628,7 @@ bool PDFWriterImpl::emitWidgetAnnotations()
{
// create a submit form action
aLine.append( "/AA<</D<</Type/Action/S/SubmitForm/F" );
- appendLiteralStringEncrypt( rWidget.m_aListEntries.front(), rWidget.m_nObject, aLine );
+ appendLiteralStringEncrypt( rWidget.m_aListEntries.front(), rWidget.m_nObject, aLine, osl_getThreadTextEncoding() );
aLine.append( "/Flags " );
sal_Int32 nFlags = 0;
@@ -7027,7 +7049,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 );
@@ -7064,8 +7086,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() );
@@ -7519,7 +7541,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;
@@ -7572,7 +7594,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 );
@@ -7653,7 +7675,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
@@ -7723,7 +7745,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_uLong nWidth, const String& rText, xub_StrLen nIndex, xub_StrLen nLen, bool bTextLines )
{
MARK( "drawStretchText" );
@@ -7739,7 +7761,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();
@@ -8283,17 +8305,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_uLong 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 );
@@ -8301,7 +8323,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();
}
@@ -8968,7 +8990,7 @@ void PDFWriterImpl::drawPolyLine( const Polygon& rPoly )
{
MARK( "drawPolyLine" );
- USHORT nPoints = rPoly.GetSize();
+ sal_uInt16 nPoints = rPoly.GetSize();
if( nPoints < 2 )
return;
@@ -9161,7 +9183,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) );
}
}
@@ -9202,7 +9224,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 )
@@ -9217,7 +9239,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 )
{
@@ -9249,14 +9271,11 @@ 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_uLong nSize = rObject.m_pContentStream->Tell();
rObject.m_pContentStream->Seek( STREAM_SEEK_TO_BEGIN );
-#if OSL_DEBUG_LEVEL > 1
- {
- OStringBuffer aLine( " PDFWriterImpl::writeTransparentObject" );
- emitComment( aLine.getStr() );
- }
-#endif
+ #if OSL_DEBUG_LEVEL > 1
+ emitComment( "PDFWriterImpl::writeTransparentObject" );
+ #endif
OStringBuffer aLine( 512 );
CHECK_RETURN( updateObject( rObject.m_nObject ) );
aLine.append( rObject.m_nObject );
@@ -9400,28 +9419,25 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit& rObject )
sal_Int32 nFunctionObject = createObject();
CHECK_RETURN( updateObject( nFunctionObject ) );
- OutputDevice* pRefDevice = getReferenceDevice();
- pRefDevice->Push( PUSH_ALL );
- if( rObject.m_aSize.Width() > pRefDevice->GetOutputSizePixel().Width() )
- rObject.m_aSize.Width() = pRefDevice->GetOutputSizePixel().Width();
- if( rObject.m_aSize.Height() > pRefDevice->GetOutputSizePixel().Height() )
- rObject.m_aSize.Height() = pRefDevice->GetOutputSizePixel().Height();
- pRefDevice->SetMapMode( MapMode( MAP_PIXEL ) );
- pRefDevice->DrawGradient( Rectangle( Point( 0, 0 ), rObject.m_aSize ), rObject.m_aGradient );
+ VirtualDevice aDev;
+ aDev.SetOutputSizePixel( rObject.m_aSize );
+ aDev.SetMapMode( MapMode( MAP_PIXEL ) );
+ if( m_aContext.ColorMode == PDFWriter::DrawGreyscale )
+ aDev.SetDrawMode( aDev.GetDrawMode() |
+ ( DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL | DRAWMODE_GRAYTEXT |
+ DRAWMODE_GRAYBITMAP | DRAWMODE_GRAYGRADIENT ) );
+ aDev.DrawGradient( Rectangle( Point( 0, 0 ), rObject.m_aSize ), rObject.m_aGradient );
- Bitmap aSample = pRefDevice->GetBitmap( Point( 0, 0 ), rObject.m_aSize );
+ Bitmap aSample = aDev.GetBitmap( Point( 0, 0 ), rObject.m_aSize );
BitmapReadAccess* pAccess = aSample.AcquireReadAccess();
AccessReleaser aReleaser( pAccess );
Size aSize = aSample.GetSizePixel();
sal_Int32 nStreamLengthObject = createObject();
-#if OSL_DEBUG_LEVEL > 1
- {
- OStringBuffer aLine( " PDFWriterImpl::writeGradientFunction" );
- emitComment( aLine.getStr() );
- }
-#endif
+ #if OSL_DEBUG_LEVEL > 1
+ emitComment( "PDFWriterImpl::writeGradientFunction" );
+ #endif
OStringBuffer aLine( 120 );
aLine.append( nFunctionObject );
aLine.append( " 0 obj\n"
@@ -9434,6 +9450,7 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit& rObject )
aLine.append( " ]\n"
"/BitsPerSample 8\n"
"/Range[ 0 1 0 1 0 1 ]\n"
+ "/Order 3\n"
"/Length " );
aLine.append( nStreamLengthObject );
aLine.append( " 0 R\n"
@@ -9449,7 +9466,7 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit& rObject )
checkAndEnableStreamEncryption( nFunctionObject );
beginCompression();
- for( int y = 0; y < aSize.Height(); y++ )
+ for( int y = aSize.Height()-1; y >= 0; y-- )
{
for( int x = 0; x < aSize.Width(); x++ )
{
@@ -9500,8 +9517,6 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit& rObject )
"endobj\n\n" );
CHECK_RETURN( writeBuffer( aLine.getStr(), aLine.getLength() ) );
- pRefDevice->Pop();
-
return true;
}
@@ -9530,12 +9545,9 @@ bool PDFWriterImpl::writeJPG( JPGEmit& rObject )
m_aErrors.insert( PDFWriter::Warning_Transparency_Omitted_PDF13 );
}
-#if OSL_DEBUG_LEVEL > 1
- {
- OStringBuffer aLine( " PDFWriterImpl::writeJPG" );
- emitComment( aLine.getStr() );
- }
-#endif
+ #if OSL_DEBUG_LEVEL > 1
+ emitComment( "PDFWriterImpl::writeJPG" );
+ #endif
OStringBuffer aLine(200);
aLine.append( rObject.m_nObject );
@@ -9655,26 +9667,32 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask )
sal_Int32 nStreamLengthObject = createObject();
sal_Int32 nMaskObject = 0;
-#if OSL_DEBUG_LEVEL > 1
- {
- OStringBuffer aLine( " PDFWriterImpl::writeBitmapObject" );
- emitComment( aLine.getStr() );
- }
-#endif
+ #if OSL_DEBUG_LEVEL > 1
+ emitComment( "PDFWriterImpl::writeBitmapObject" );
+ #endif
OStringBuffer aLine(1024);
aLine.append( rObject.m_nObject );
aLine.append( " 0 obj\n"
"<</Type/XObject/Subtype/Image/Width " );
aLine.append( (sal_Int32)aBitmap.GetSizePixel().Width() );
- aLine.append( " /Height " );
+ aLine.append( "/Height " );
aLine.append( (sal_Int32)aBitmap.GetSizePixel().Height() );
- aLine.append( " /BitsPerComponent " );
+ aLine.append( "/BitsPerComponent " );
aLine.append( nBitsPerComponent );
- aLine.append( " /Length " );
+ aLine.append( "/Length " );
aLine.append( nStreamLengthObject );
aLine.append( " 0 R\n" );
#ifndef DEBUG_DISABLE_PDFCOMPRESSION
- aLine.append( "/Filter/FlateDecode" );
+ if( nBitsPerComponent != 1 )
+ {
+ aLine.append( "/Filter/FlateDecode" );
+ }
+ else
+ {
+ aLine.append( "/Filter/CCITTFaxDecode/DecodeParms<</K -1/BlackIs1 true/Columns " );
+ aLine.append( (sal_Int32)aBitmap.GetSizePixel().Width() );
+ aLine.append( ">>\n" );
+ }
#endif
if( ! bMask )
{
@@ -9706,7 +9724,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();
@@ -9717,7 +9735,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 );
@@ -9727,7 +9745,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 );
@@ -9742,7 +9760,7 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask )
{
if( aBitmap.GetBitCount() == 1 )
{
- aLine.append( " /ImageMask true\n" );
+ aLine.append( "/ImageMask true\n" );
sal_Int32 nBlackIndex = pAccess->GetBestPaletteIndex( BitmapColor( Color( COL_BLACK ) ) );
DBG_ASSERT( nBlackIndex == 0 || nBlackIndex == 1, "wrong black index" );
if( nBlackIndex )
@@ -9804,33 +9822,42 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask )
CHECK_RETURN( (osl_File_E_None == osl_getFilePos( m_aFile, &nStartPos )) );
checkAndEnableStreamEncryption( rObject.m_nObject );
- beginCompression();
- if( ! bTrueColor || pAccess->GetScanlineFormat() == BMP_FORMAT_24BIT_TC_RGB )
+#ifndef DEBUG_DISABLE_PDFCOMPRESSION
+ if( nBitsPerComponent == 1 )
{
- const int nScanLineBytes = 1 + ( pAccess->GetBitCount() * ( pAccess->Width() - 1 ) / 8U );
-
- for( int i = 0; i < pAccess->Height(); i++ )
- {
- CHECK_RETURN( writeBuffer( pAccess->GetScanline( i ), nScanLineBytes ) );
- }
+ writeG4Stream( pAccess );
}
else
+#endif
{
- const int nScanLineBytes = pAccess->Width()*3;
- boost::shared_array<sal_uInt8> pCol( new sal_uInt8[ nScanLineBytes ] );
- for( int y = 0; y < pAccess->Height(); y++ )
+ beginCompression();
+ if( ! bTrueColor || pAccess->GetScanlineFormat() == BMP_FORMAT_24BIT_TC_RGB )
{
- for( int x = 0; x < pAccess->Width(); x++ )
+ const int nScanLineBytes = 1 + ( pAccess->GetBitCount() * ( pAccess->Width() - 1 ) / 8U );
+
+ for( int i = 0; i < pAccess->Height(); i++ )
{
- BitmapColor aColor = pAccess->GetColor( y, x );
- pCol[3*x+0] = aColor.GetRed();
- pCol[3*x+1] = aColor.GetGreen();
- pCol[3*x+2] = aColor.GetBlue();
+ CHECK_RETURN( writeBuffer( pAccess->GetScanline( i ), nScanLineBytes ) );
}
- CHECK_RETURN( writeBuffer( pCol.get(), nScanLineBytes ) );
}
+ else
+ {
+ const int nScanLineBytes = pAccess->Width()*3;
+ boost::shared_array<sal_uInt8> pCol( new sal_uInt8[ nScanLineBytes ] );
+ for( int y = 0; y < pAccess->Height(); y++ )
+ {
+ for( int x = 0; x < pAccess->Width(); x++ )
+ {
+ BitmapColor aColor = pAccess->GetColor( y, x );
+ pCol[3*x+0] = aColor.GetRed();
+ pCol[3*x+1] = aColor.GetGreen();
+ pCol[3*x+2] = aColor.GetBlue();
+ }
+ CHECK_RETURN( writeBuffer( pCol.get(), nScanLineBytes ) );
+ }
+ }
+ endCompression();
}
- endCompression();
disableStreamEncryption();
sal_uInt64 nEndPos = 0;
@@ -9870,8 +9897,25 @@ void PDFWriterImpl::drawJPGBitmap( SvStream& rDCTData, bool bIsTrueColor, const
if( ! (rSizePixel.Width() && rSizePixel.Height()) )
return;
- SvMemoryStream* pStream = new SvMemoryStream;
rDCTData.Seek( 0 );
+ if( bIsTrueColor && m_aContext.ColorMode == PDFWriter::DrawGreyscale )
+ {
+ // need to convert to grayscale;
+ // load stream to bitmap and draw the bitmap instead
+ Graphic aGraphic;
+ GraphicConverter::Import( rDCTData, aGraphic, CVT_JPG );
+ Bitmap aBmp( aGraphic.GetBitmap() );
+ if( !!rMask && rMask.GetSizePixel() == aBmp.GetSizePixel() )
+ {
+ BitmapEx aBmpEx( aBmp, rMask );
+ drawBitmap( rTargetArea.TopLeft(), rTargetArea.GetSize(), aBmpEx );
+ }
+ else
+ drawBitmap( rTargetArea.TopLeft(), rTargetArea.GetSize(), aBmp );
+ return;
+ }
+
+ SvMemoryStream* pStream = new SvMemoryStream;
*pStream << rDCTData;
pStream->Seek( STREAM_SEEK_TO_END );
@@ -9962,18 +10006,28 @@ void PDFWriterImpl::drawBitmap( const Point& rDestPoint, const Size& rDestSize,
writeBuffer( aLine.getStr(), aLine.getLength() );
}
-const PDFWriterImpl::BitmapEmit& PDFWriterImpl::createBitmapEmit( const BitmapEx& rBitmap, bool bDrawMask )
+const PDFWriterImpl::BitmapEmit& PDFWriterImpl::createBitmapEmit( const BitmapEx& i_rBitmap, bool bDrawMask )
{
+ BitmapEx aBitmap( i_rBitmap );
+ if( m_aContext.ColorMode == PDFWriter::DrawGreyscale )
+ {
+ BmpConversion eConv = BMP_CONVERSION_8BIT_GREYS;
+ int nDepth = aBitmap.GetBitmap().GetBitCount();
+ if( nDepth <= 4 )
+ eConv = BMP_CONVERSION_4BIT_GREYS;
+ if( nDepth > 1 )
+ aBitmap.Convert( eConv );
+ }
BitmapID aID;
- aID.m_aPixelSize = rBitmap.GetSizePixel();
- aID.m_nSize = rBitmap.GetBitCount();
- aID.m_nChecksum = rBitmap.GetBitmap().GetChecksum();
+ aID.m_aPixelSize = aBitmap.GetSizePixel();
+ aID.m_nSize = aBitmap.GetBitCount();
+ aID.m_nChecksum = aBitmap.GetBitmap().GetChecksum();
aID.m_nMaskChecksum = 0;
- if( rBitmap.IsAlpha() )
- aID.m_nMaskChecksum = rBitmap.GetAlpha().GetChecksum();
+ if( aBitmap.IsAlpha() )
+ aID.m_nMaskChecksum = aBitmap.GetAlpha().GetChecksum();
else
{
- Bitmap aMask = rBitmap.GetMask();
+ Bitmap aMask = aBitmap.GetMask();
if( ! aMask.IsEmpty() )
aID.m_nMaskChecksum = aMask.GetChecksum();
}
@@ -9987,7 +10041,7 @@ const PDFWriterImpl::BitmapEmit& PDFWriterImpl::createBitmapEmit( const BitmapEx
{
m_aBitmaps.push_front( BitmapEmit() );
m_aBitmaps.front().m_aID = aID;
- m_aBitmaps.front().m_aBitmap = rBitmap;
+ m_aBitmaps.front().m_aBitmap = aBitmap;
m_aBitmaps.front().m_nObject = createObject();
m_aBitmaps.front().m_bDrawMask = bDrawMask;
it = m_aBitmaps.begin();
@@ -10050,15 +10104,16 @@ sal_Int32 PDFWriterImpl::createGradient( const Gradient& rGradient, const Size&
rSize ) );
// check if we already have this gradient
std::list<GradientEmit>::iterator it;
+ // rounding to point will generally lose some pixels
+ // round up to point boundary
+ aPtSize.Width()++;
+ aPtSize.Height()++;
for( it = m_aGradients.begin(); it != m_aGradients.end(); ++it )
{
if( it->m_aGradient == rGradient )
{
- if( it->m_aSize.Width() < aPtSize.Width() )
- it->m_aSize.Width() = aPtSize.Width();
- if( it->m_aSize.Height() <= aPtSize.Height() )
- it->m_aSize.Height() = aPtSize.Height();
- break;
+ if( it->m_aSize == aPtSize )
+ break;
}
}
if( it == m_aGradients.end() )
@@ -10133,12 +10188,12 @@ void PDFWriterImpl::drawGradient( const PolyPolygon& rPolyPoly, const Gradient&
return;
}
- sal_Int32 nGradient = createGradient( rGradient, rPolyPoly.GetBoundRect().GetSize() );
+ Rectangle aBoundRect = rPolyPoly.GetBoundRect();
+ sal_Int32 nGradient = createGradient( rGradient, aBoundRect.GetSize() );
updateGraphicsState();
- Rectangle aBoundRect = rPolyPoly.GetBoundRect();
- Point aTranslate = aBoundRect.BottomLeft() + Point( 0, 1 );
+ Point aTranslate = aBoundRect.BottomLeft();
int nPolygons = rPolyPoly.Count();
OStringBuffer aLine( 80*nPolygons );
@@ -10177,7 +10232,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 5702bee23ea5..c73be7c037e5 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -59,6 +59,7 @@ class ImplFontMetricData;
class FontSubsetInfo;
class ZCodec;
class EncHashTransporter;
+struct BitStreamState;
// the maximum password length
#define ENCRYPTED_PWD_SIZE 32
@@ -447,7 +448,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;
@@ -831,7 +832,7 @@ i12626
// test if the encryption is active, if yes than encrypt the unicode string and add to the OStringBuffer parameter
void appendUnicodeTextStringEncrypt( const rtl::OUString& rInString, const sal_Int32 nInObjectNumber, rtl::OStringBuffer& rOutBuffer );
- void appendLiteralStringEncrypt( const rtl::OUString& rInString, const sal_Int32 nInObjectNumber, rtl::OStringBuffer& rOutBuffer );
+ void appendLiteralStringEncrypt( const rtl::OUString& rInString, const sal_Int32 nInObjectNumber, rtl::OStringBuffer& rOutBuffer, rtl_TextEncoding nEnc = RTL_TEXTENCODING_ASCII_US );
void appendLiteralStringEncrypt( const rtl::OString& rInString, const sal_Int32 nInObjectNumber, rtl::OStringBuffer& rOutBuffer );
void appendLiteralStringEncrypt( rtl::OStringBuffer& rInString, const sal_Int32 nInObjectNumber, rtl::OStringBuffer& rOutBuffer );
@@ -1012,7 +1013,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;
@@ -1057,6 +1058,14 @@ i12626
void implWriteBitmapEx( const Point& rPoint, const Size& rSize, const BitmapEx& rBitmapEx,
VirtualDevice* pDummyVDev, const vcl::PDFWriter::PlayMetafileContext& );
+ // helpers for CCITT 1bit bitmap stream
+ void putG4Bits( sal_uInt32 i_nLength, sal_uInt32 i_nCode, BitStreamState& io_rState );
+ void putG4Span( long i_nSpan, bool i_bWhitePixel, BitStreamState& io_rState );
+ void writeG4Stream( BitmapReadAccess* i_pBitmap );
+
+ // color helper functions
+ void appendStrokingColor( const Color& rColor, rtl::OStringBuffer& rBuffer );
+ void appendNonStrokingColor( const Color& rColor, rtl::OStringBuffer& rBuffer );
public:
PDFWriterImpl( const PDFWriter::PDFWriterContext& rContext, const com::sun::star::uno::Reference< com::sun::star::beans::XMaterialHolder >&, PDFWriter& );
~PDFWriterImpl();
@@ -1154,13 +1163,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 )
@@ -1211,10 +1220,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_uLong 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/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index ee1fe1cc6bc5..143c55a83ab1 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -33,6 +33,7 @@
#include "vcl/virdev.hxx"
#include "vcl/gdimtf.hxx"
#include "vcl/metaact.hxx"
+#include "vcl/bmpacc.hxx"
#include "vcl/graph.hxx"
#include "vcl/svdata.hxx"
#include "unotools/streamwrap.hxx"
@@ -47,6 +48,8 @@
#include <rtl/digest.h>
+#undef USE_PDFGRADIENTS
+
using namespace vcl;
using namespace rtl;
using namespace com::sun::star;
@@ -58,7 +61,7 @@ using namespace com::sun::star::beans;
void PDFWriterImpl::implWriteGradient( const PolyPolygon& i_rPolyPoly, const Gradient& i_rGradient,
VirtualDevice* i_pDummyVDev, const vcl::PDFWriter::PlayMetafileContext& i_rContext )
{
- GDIMetaFile aTmpMtf;
+ GDIMetaFile aTmpMtf;
i_pDummyVDev->AddGradientActions( i_rPolyPoly.GetBoundRect(), i_rGradient, aTmpMtf );
@@ -82,7 +85,7 @@ void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSiz
// #i19065# Negative sizes have mirror semantics on
// OutputDevice. BitmapEx and co. have no idea about that, so
// perform that _before_ doing anything with aBitmapEx.
- ULONG nMirrorFlags(BMP_MIRROR_NONE);
+ sal_uLong nMirrorFlags(BMP_MIRROR_NONE);
if( aSize.Width() < 0 )
{
aSize.Width() *= -1;
@@ -140,6 +143,15 @@ void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSiz
const Size aSizePixel( aBitmapEx.GetSizePixel() );
if ( aSizePixel.Width() && aSizePixel.Height() )
{
+ if( m_aContext.ColorMode == PDFWriter::DrawGreyscale )
+ {
+ BmpConversion eConv = BMP_CONVERSION_8BIT_GREYS;
+ int nDepth = aBitmapEx.GetBitmap().GetBitCount();
+ if( nDepth <= 4 )
+ eConv = BMP_CONVERSION_4BIT_GREYS;
+ if( nDepth > 1 )
+ aBitmapEx.Convert( eConv );
+ }
sal_Bool bUseJPGCompression = !i_rContext.m_bOnlyLosslessCompression;
if ( ( aSizePixel.Width() < 32 ) || ( aSizePixel.Height() < 32 ) )
bUseJPGCompression = sal_False;
@@ -178,13 +190,13 @@ void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSiz
try
{
uno::Reference < io::XStream > xStream = new utl::OStreamWrapper( aStrm );
- Reference< io::XSeekable > xSeekable( xStream, UNO_QUERY_THROW );
- Reference< graphic::XGraphicProvider > xGraphicProvider( ImplGetSVData()->maAppData.mxMSF->createInstance(
+ uno::Reference< io::XSeekable > xSeekable( xStream, UNO_QUERY_THROW );
+ uno::Reference< graphic::XGraphicProvider > xGraphicProvider( ImplGetSVData()->maAppData.mxMSF->createInstance(
OUString::createFromAscii( "com.sun.star.graphic.GraphicProvider" ) ), UNO_QUERY );
if ( xGraphicProvider.is() )
{
- Reference< graphic::XGraphic > xGraphic( aGraphic.GetXGraphic() );
- Reference < io::XOutputStream > xOut( xStream->getOutputStream() );
+ uno::Reference< graphic::XGraphic > xGraphic( aGraphic.GetXGraphic() );
+ uno::Reference < io::XOutputStream > xOut( xStream->getOutputStream() );
rtl::OUString aMimeType( ::rtl::OUString::createFromAscii( "image/jpeg" ) );
uno::Sequence< beans::PropertyValue > aOutMediaProperties( 3 );
aOutMediaProperties[0].Name = ::rtl::OUString::createFromAscii( "OutputStream" );
@@ -207,7 +219,7 @@ void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSiz
Sequence< PropertyValue > aArgs( 1 );
aArgs[ 0 ].Name = ::rtl::OUString::createFromAscii( "InputStream" );
aArgs[ 0 ].Value <<= xStream;
- Reference< XPropertySet > xPropSet( xGraphicProvider->queryGraphicDescriptor( aArgs ) );
+ uno::Reference< XPropertySet > xPropSet( xGraphicProvider->queryGraphicDescriptor( aArgs ) );
if ( xPropSet.is() )
{
sal_Int16 nBitsPerPixel = 24;
@@ -257,7 +269,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
if ( !i_pOutDevData || !i_pOutDevData->PlaySyncPageAct( m_rOuterFace, i ) )
{
const MetaAction* pAction = aMtf.GetAction( i );
- const USHORT nType = pAction->GetType();
+ const sal_uInt16 nType = pAction->GetType();
switch( nType )
{
@@ -354,16 +366,23 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
case( META_GRADIENT_ACTION ):
{
const MetaGradientAction* pA = (const MetaGradientAction*) pAction;
+ #ifdef USE_PDFGRADIENTS
+ m_rOuterFace.DrawGradient( pA->GetRect(), pA->GetGradient() );
+ #else
const PolyPolygon aPolyPoly( pA->GetRect() );
-
implWriteGradient( aPolyPoly, pA->GetGradient(), pDummyVDev, i_rContext );
+ #endif
}
break;
case( META_GRADIENTEX_ACTION ):
{
const MetaGradientExAction* pA = (const MetaGradientExAction*) pAction;
+ #ifdef USE_PDFGRADIENTS
+ m_rOuterFace.DrawGradient( pA->GetPolyPolygon(), pA->GetGradient() );
+ #else
implWriteGradient( pA->GetPolyPolygon(), pA->GetGradient(), pDummyVDev, i_rContext );
+ #endif
}
break;
@@ -394,7 +413,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
if( rTransparenceGradient.GetStartColor() == rTransparenceGradient.GetEndColor() )
{
const Color aTransCol( rTransparenceGradient.GetStartColor() );
- const USHORT nTransPercent = aTransCol.GetLuminance() * 100 / 255;
+ const sal_uInt16 nTransPercent = aTransCol.GetLuminance() * 100 / 255;
m_rOuterFace.BeginTransparencyGroup();
playMetafile( aTmpMtf, NULL, i_rContext, pDummyVDev );
m_rOuterFace.EndTransparencyGroup( Rectangle( rPos, rSize ), nTransPercent );
@@ -439,9 +458,9 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
aTmpMtf.Play( pVDev, aPoint, aDstSize );
aTmpMtf.WindStart();
- pVDev->EnableMapMode( FALSE );
+ pVDev->EnableMapMode( sal_False );
aPaint = pVDev->GetBitmap( aPoint, aDstSizePixel );
- pVDev->EnableMapMode( TRUE );
+ pVDev->EnableMapMode( sal_True );
// create mask bitmap
pVDev->SetLineColor( COL_BLACK );
@@ -452,15 +471,15 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
aTmpMtf.WindStart();
aTmpMtf.Play( pVDev, aPoint, aDstSize );
aTmpMtf.WindStart();
- pVDev->EnableMapMode( FALSE );
+ pVDev->EnableMapMode( sal_False );
aMask = pVDev->GetBitmap( aPoint, aDstSizePixel );
- pVDev->EnableMapMode( TRUE );
+ pVDev->EnableMapMode( sal_True );
// create alpha mask from gradient
pVDev->SetDrawMode( DRAWMODE_GRAYGRADIENT );
pVDev->DrawGradient( Rectangle( aPoint, aDstSize ), rTransparenceGradient );
pVDev->SetDrawMode( DRAWMODE_DEFAULT );
- pVDev->EnableMapMode( FALSE );
+ pVDev->EnableMapMode( sal_False );
pVDev->DrawMask( aPoint, aDstSizePixel, aMask, Color( COL_WHITE ) );
aAlpha = pVDev->GetBitmap( aPoint, aDstSizePixel );
implWriteBitmapEx( rPos, rSize, BitmapEx( aPaint, aAlpha ), pDummyVDev, i_rContext );
@@ -518,11 +537,17 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
}
if( pGradAction )
+ {
+ #if USE_PDFGRADIENTS
+ m_rOuterFace.DrawGradient( pGradAction->GetPolyPolygon(), pGradAction->GetGradient() );
+ #else
implWriteGradient( pGradAction->GetPolyPolygon(), pGradAction->GetGradient(), pDummyVDev, i_rContext );
+ #endif
+ }
}
else
{
- const BYTE* pData = pA->GetData();
+ const sal_uInt8* pData = pA->GetData();
if ( pData )
{
SvMemoryStream aMemStm( (void*)pData, pA->GetDataSize(), STREAM_READ );
@@ -1538,3 +1563,475 @@ bool PDFWriterImpl::computeUDictionaryValue( EncHashTransporter* i_pTransporter,
/* end i12626 methods */
+static const long unsetRun[256] =
+{
+ 8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, /* 0x00 - 0x0f */
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* 0x10 - 0x1f */
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 0x20 - 0x2f */
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 0x30 - 0x3f */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x40 - 0x4f */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x50 - 0x5f */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x60 - 0x6f */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x70 - 0x7f */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 - 0x8f */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 - 0x9f */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 - 0xaf */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 - 0xbf */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 - 0xcf */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 - 0xdf */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe0 - 0xef */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 - 0xff */
+};
+
+static const long setRun[256] =
+{
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 - 0x0f */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 - 0x1f */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 - 0x2f */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 - 0x3f */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 - 0x4f */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 - 0x5f */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 - 0x6f */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 - 0x7f */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x80 - 0x8f */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x90 - 0x9f */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0xa0 - 0xaf */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0xb0 - 0xbf */
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 0xc0 - 0xcf */
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 0xd0 - 0xdf */
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* 0xe0 - 0xef */
+ 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7, 8, /* 0xf0 - 0xff */
+};
+
+inline bool isSet( const Scanline i_pLine, long i_nIndex )
+{
+ return (i_pLine[ i_nIndex/8 ] & (0x80 >> (i_nIndex&7))) != 0;
+}
+
+long findBitRun( const Scanline i_pLine, long i_nStartIndex, long i_nW, bool i_bSet )
+{
+ if( i_nStartIndex < 0 )
+ return i_nW;
+
+ long nIndex = i_nStartIndex;
+ if( nIndex < i_nW )
+ {
+ const sal_uInt8 * pByte = static_cast<sal_uInt8*>(i_pLine) + (nIndex/8);
+ sal_uInt8 nByte = *pByte;
+
+ // run up to byte boundary
+ long nBitInByte = (nIndex & 7);
+ if( nBitInByte )
+ {
+ sal_uInt8 nMask = 0x80 >> nBitInByte;
+ while( nBitInByte != 8 )
+ {
+ if( (nByte & nMask) != (i_bSet ? nMask : 0) )
+ return nIndex < i_nW ? nIndex : i_nW;
+ nMask = nMask >> 1;
+ nBitInByte++;
+ nIndex++;
+ }
+ if( nIndex < i_nW )
+ {
+ pByte++;
+ nByte = *pByte;
+ }
+ }
+
+ sal_uInt8 nRunByte;
+ const long* pRunTable;
+ if( i_bSet )
+ {
+ nRunByte = 0xff;
+ pRunTable = setRun;
+ }
+ else
+ {
+ nRunByte = 0;
+ pRunTable = unsetRun;
+ }
+
+ while( nByte == nRunByte && nIndex < i_nW )
+ {
+ nIndex += 8;
+ pByte++;
+ nByte = *pByte;
+ }
+ if( nIndex < i_nW )
+ {
+ nIndex += pRunTable[nByte];
+ }
+ }
+ return nIndex < i_nW ? nIndex : i_nW;
+}
+
+struct BitStreamState
+{
+ sal_uInt8 mnBuffer;
+ sal_uInt32 mnNextBitPos;
+
+ BitStreamState()
+ : mnBuffer( 0 )
+ , mnNextBitPos( 8 )
+ {
+ }
+
+ const sal_uInt8* getByte() const { return &mnBuffer; }
+ void flush() { mnNextBitPos = 8; mnBuffer = 0; }
+};
+
+void PDFWriterImpl::putG4Bits( sal_uInt32 i_nLength, sal_uInt32 i_nCode, BitStreamState& io_rState )
+{
+ while( i_nLength > io_rState.mnNextBitPos )
+ {
+ io_rState.mnBuffer |= static_cast<sal_uInt8>( i_nCode >> (i_nLength - io_rState.mnNextBitPos) );
+ i_nLength -= io_rState.mnNextBitPos;
+ writeBuffer( io_rState.getByte(), 1 );
+ io_rState.flush();
+ }
+ OSL_ASSERT( i_nLength < 9 );
+ static const unsigned int msbmask[9] = { 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff };
+ io_rState.mnBuffer |= static_cast<sal_uInt8>( (i_nCode & msbmask[i_nLength]) << (io_rState.mnNextBitPos - i_nLength) );
+ io_rState.mnNextBitPos -= i_nLength;
+ if( io_rState.mnNextBitPos == 0 )
+ {
+ writeBuffer( io_rState.getByte(), 1 );
+ io_rState.flush();
+ }
+}
+
+struct PixelCode
+{
+ sal_uInt32 mnEncodedPixels;
+ sal_uInt32 mnCodeBits;
+ sal_uInt32 mnCode;
+};
+
+static const PixelCode WhitePixelCodes[] =
+{
+ { 0, 8, 0x35 }, // 0011 0101
+ { 1, 6, 0x7 }, // 0001 11
+ { 2, 4, 0x7 }, // 0111
+ { 3, 4, 0x8 }, // 1000
+ { 4, 4, 0xB }, // 1011
+ { 5, 4, 0xC }, // 1100
+ { 6, 4, 0xE }, // 1110
+ { 7, 4, 0xF }, // 1111
+ { 8, 5, 0x13 }, // 1001 1
+ { 9, 5, 0x14 }, // 1010 0
+ { 10, 5, 0x7 }, // 0011 1
+ { 11, 5, 0x8 }, // 0100 0
+ { 12, 6, 0x8 }, // 0010 00
+ { 13, 6, 0x3 }, // 0000 11
+ { 14, 6, 0x34 }, // 1101 00
+ { 15, 6, 0x35 }, // 1101 01
+ { 16, 6, 0x2A }, // 1010 10
+ { 17, 6, 0x2B }, // 1010 11
+ { 18, 7, 0x27 }, // 0100 111
+ { 19, 7, 0xC }, // 0001 100
+ { 20, 7, 0x8 }, // 0001 000
+ { 21, 7, 0x17 }, // 0010 111
+ { 22, 7, 0x3 }, // 0000 011
+ { 23, 7, 0x4 }, // 0000 100
+ { 24, 7, 0x28 }, // 0101 000
+ { 25, 7, 0x2B }, // 0101 011
+ { 26, 7, 0x13 }, // 0010 011
+ { 27, 7, 0x24 }, // 0100 100
+ { 28, 7, 0x18 }, // 0011 000
+ { 29, 8, 0x2 }, // 0000 0010
+ { 30, 8, 0x3 }, // 0000 0011
+ { 31, 8, 0x1A }, // 0001 1010
+ { 32, 8, 0x1B }, // 0001 1011
+ { 33, 8, 0x12 }, // 0001 0010
+ { 34, 8, 0x13 }, // 0001 0011
+ { 35, 8, 0x14 }, // 0001 0100
+ { 36, 8, 0x15 }, // 0001 0101
+ { 37, 8, 0x16 }, // 0001 0110
+ { 38, 8, 0x17 }, // 0001 0111
+ { 39, 8, 0x28 }, // 0010 1000
+ { 40, 8, 0x29 }, // 0010 1001
+ { 41, 8, 0x2A }, // 0010 1010
+ { 42, 8, 0x2B }, // 0010 1011
+ { 43, 8, 0x2C }, // 0010 1100
+ { 44, 8, 0x2D }, // 0010 1101
+ { 45, 8, 0x4 }, // 0000 0100
+ { 46, 8, 0x5 }, // 0000 0101
+ { 47, 8, 0xA }, // 0000 1010
+ { 48, 8, 0xB }, // 0000 1011
+ { 49, 8, 0x52 }, // 0101 0010
+ { 50, 8, 0x53 }, // 0101 0011
+ { 51, 8, 0x54 }, // 0101 0100
+ { 52, 8, 0x55 }, // 0101 0101
+ { 53, 8, 0x24 }, // 0010 0100
+ { 54, 8, 0x25 }, // 0010 0101
+ { 55, 8, 0x58 }, // 0101 1000
+ { 56, 8, 0x59 }, // 0101 1001
+ { 57, 8, 0x5A }, // 0101 1010
+ { 58, 8, 0x5B }, // 0101 1011
+ { 59, 8, 0x4A }, // 0100 1010
+ { 60, 8, 0x4B }, // 0100 1011
+ { 61, 8, 0x32 }, // 0011 0010
+ { 62, 8, 0x33 }, // 0011 0011
+ { 63, 8, 0x34 }, // 0011 0100
+ { 64, 5, 0x1B }, // 1101 1
+ { 128, 5, 0x12 }, // 1001 0
+ { 192, 6, 0x17 }, // 0101 11
+ { 256, 7, 0x37 }, // 0110 111
+ { 320, 8, 0x36 }, // 0011 0110
+ { 384, 8, 0x37 }, // 0011 0111
+ { 448, 8, 0x64 }, // 0110 0100
+ { 512, 8, 0x65 }, // 0110 0101
+ { 576, 8, 0x68 }, // 0110 1000
+ { 640, 8, 0x67 }, // 0110 0111
+ { 704, 9, 0xCC }, // 0110 0110 0
+ { 768, 9, 0xCD }, // 0110 0110 1
+ { 832, 9, 0xD2 }, // 0110 1001 0
+ { 896, 9, 0xD3 }, // 0110 1001 1
+ { 960, 9, 0xD4 }, // 0110 1010 0
+ { 1024, 9, 0xD5 }, // 0110 1010 1
+ { 1088, 9, 0xD6 }, // 0110 1011 0
+ { 1152, 9, 0xD7 }, // 0110 1011 1
+ { 1216, 9, 0xD8 }, // 0110 1100 0
+ { 1280, 9, 0xD9 }, // 0110 1100 1
+ { 1344, 9, 0xDA }, // 0110 1101 0
+ { 1408, 9, 0xDB }, // 0110 1101 1
+ { 1472, 9, 0x98 }, // 0100 1100 0
+ { 1536, 9, 0x99 }, // 0100 1100 1
+ { 1600, 9, 0x9A }, // 0100 1101 0
+ { 1664, 6, 0x18 }, // 0110 00
+ { 1728, 9, 0x9B }, // 0100 1101 1
+ { 1792, 11, 0x8 }, // 0000 0001 000
+ { 1856, 11, 0xC }, // 0000 0001 100
+ { 1920, 11, 0xD }, // 0000 0001 101
+ { 1984, 12, 0x12 }, // 0000 0001 0010
+ { 2048, 12, 0x13 }, // 0000 0001 0011
+ { 2112, 12, 0x14 }, // 0000 0001 0100
+ { 2176, 12, 0x15 }, // 0000 0001 0101
+ { 2240, 12, 0x16 }, // 0000 0001 0110
+ { 2304, 12, 0x17 }, // 0000 0001 0111
+ { 2368, 12, 0x1C }, // 0000 0001 1100
+ { 2432, 12, 0x1D }, // 0000 0001 1101
+ { 2496, 12, 0x1E }, // 0000 0001 1110
+ { 2560, 12, 0x1F } // 0000 0001 1111
+};
+
+static const PixelCode BlackPixelCodes[] =
+{
+ { 0, 10, 0x37 }, // 0000 1101 11
+ { 1, 3, 0x2 }, // 010
+ { 2, 2, 0x3 }, // 11
+ { 3, 2, 0x2 }, // 10
+ { 4, 3, 0x3 }, // 011
+ { 5, 4, 0x3 }, // 0011
+ { 6, 4, 0x2 }, // 0010
+ { 7, 5, 0x3 }, // 0001 1
+ { 8, 6, 0x5 }, // 0001 01
+ { 9, 6, 0x4 }, // 0001 00
+ { 10, 7, 0x4 }, // 0000 100
+ { 11, 7, 0x5 }, // 0000 101
+ { 12, 7, 0x7 }, // 0000 111
+ { 13, 8, 0x4 }, // 0000 0100
+ { 14, 8, 0x7 }, // 0000 0111
+ { 15, 9, 0x18 }, // 0000 1100 0
+ { 16, 10, 0x17 }, // 0000 0101 11
+ { 17, 10, 0x18 }, // 0000 0110 00
+ { 18, 10, 0x8 }, // 0000 0010 00
+ { 19, 11, 0x67 }, // 0000 1100 111
+ { 20, 11, 0x68 }, // 0000 1101 000
+ { 21, 11, 0x6C }, // 0000 1101 100
+ { 22, 11, 0x37 }, // 0000 0110 111
+ { 23, 11, 0x28 }, // 0000 0101 000
+ { 24, 11, 0x17 }, // 0000 0010 111
+ { 25, 11, 0x18 }, // 0000 0011 000
+ { 26, 12, 0xCA }, // 0000 1100 1010
+ { 27, 12, 0xCB }, // 0000 1100 1011
+ { 28, 12, 0xCC }, // 0000 1100 1100
+ { 29, 12, 0xCD }, // 0000 1100 1101
+ { 30, 12, 0x68 }, // 0000 0110 1000
+ { 31, 12, 0x69 }, // 0000 0110 1001
+ { 32, 12, 0x6A }, // 0000 0110 1010
+ { 33, 12, 0x6B }, // 0000 0110 1011
+ { 34, 12, 0xD2 }, // 0000 1101 0010
+ { 35, 12, 0xD3 }, // 0000 1101 0011
+ { 36, 12, 0xD4 }, // 0000 1101 0100
+ { 37, 12, 0xD5 }, // 0000 1101 0101
+ { 38, 12, 0xD6 }, // 0000 1101 0110
+ { 39, 12, 0xD7 }, // 0000 1101 0111
+ { 40, 12, 0x6C }, // 0000 0110 1100
+ { 41, 12, 0x6D }, // 0000 0110 1101
+ { 42, 12, 0xDA }, // 0000 1101 1010
+ { 43, 12, 0xDB }, // 0000 1101 1011
+ { 44, 12, 0x54 }, // 0000 0101 0100
+ { 45, 12, 0x55 }, // 0000 0101 0101
+ { 46, 12, 0x56 }, // 0000 0101 0110
+ { 47, 12, 0x57 }, // 0000 0101 0111
+ { 48, 12, 0x64 }, // 0000 0110 0100
+ { 49, 12, 0x65 }, // 0000 0110 0101
+ { 50, 12, 0x52 }, // 0000 0101 0010
+ { 51, 12, 0x53 }, // 0000 0101 0011
+ { 52, 12, 0x24 }, // 0000 0010 0100
+ { 53, 12, 0x37 }, // 0000 0011 0111
+ { 54, 12, 0x38 }, // 0000 0011 1000
+ { 55, 12, 0x27 }, // 0000 0010 0111
+ { 56, 12, 0x28 }, // 0000 0010 1000
+ { 57, 12, 0x58 }, // 0000 0101 1000
+ { 58, 12, 0x59 }, // 0000 0101 1001
+ { 59, 12, 0x2B }, // 0000 0010 1011
+ { 60, 12, 0x2C }, // 0000 0010 1100
+ { 61, 12, 0x5A }, // 0000 0101 1010
+ { 62, 12, 0x66 }, // 0000 0110 0110
+ { 63, 12, 0x67 }, // 0000 0110 0111
+ { 64, 10, 0xF }, // 0000 0011 11
+ { 128, 12, 0xC8 }, // 0000 1100 1000
+ { 192, 12, 0xC9 }, // 0000 1100 1001
+ { 256, 12, 0x5B }, // 0000 0101 1011
+ { 320, 12, 0x33 }, // 0000 0011 0011
+ { 384, 12, 0x34 }, // 0000 0011 0100
+ { 448, 12, 0x35 }, // 0000 0011 0101
+ { 512, 13, 0x6C }, // 0000 0011 0110 0
+ { 576, 13, 0x6D }, // 0000 0011 0110 1
+ { 640, 13, 0x4A }, // 0000 0010 0101 0
+ { 704, 13, 0x4B }, // 0000 0010 0101 1
+ { 768, 13, 0x4C }, // 0000 0010 0110 0
+ { 832, 13, 0x4D }, // 0000 0010 0110 1
+ { 896, 13, 0x72 }, // 0000 0011 1001 0
+ { 960, 13, 0x73 }, // 0000 0011 1001 1
+ { 1024, 13, 0x74 }, // 0000 0011 1010 0
+ { 1088, 13, 0x75 }, // 0000 0011 1010 1
+ { 1152, 13, 0x76 }, // 0000 0011 1011 0
+ { 1216, 13, 0x77 }, // 0000 0011 1011 1
+ { 1280, 13, 0x52 }, // 0000 0010 1001 0
+ { 1344, 13, 0x53 }, // 0000 0010 1001 1
+ { 1408, 13, 0x54 }, // 0000 0010 1010 0
+ { 1472, 13, 0x55 }, // 0000 0010 1010 1
+ { 1536, 13, 0x5A }, // 0000 0010 1101 0
+ { 1600, 13, 0x5B }, // 0000 0010 1101 1
+ { 1664, 13, 0x64 }, // 0000 0011 0010 0
+ { 1728, 13, 0x65 }, // 0000 0011 0010 1
+ { 1792, 11, 0x8 }, // 0000 0001 000
+ { 1856, 11, 0xC }, // 0000 0001 100
+ { 1920, 11, 0xD }, // 0000 0001 101
+ { 1984, 12, 0x12 }, // 0000 0001 0010
+ { 2048, 12, 0x13 }, // 0000 0001 0011
+ { 2112, 12, 0x14 }, // 0000 0001 0100
+ { 2176, 12, 0x15 }, // 0000 0001 0101
+ { 2240, 12, 0x16 }, // 0000 0001 0110
+ { 2304, 12, 0x17 }, // 0000 0001 0111
+ { 2368, 12, 0x1C }, // 0000 0001 1100
+ { 2432, 12, 0x1D }, // 0000 0001 1101
+ { 2496, 12, 0x1E }, // 0000 0001 1110
+ { 2560, 12, 0x1F } // 0000 0001 1111
+};
+
+
+void PDFWriterImpl::putG4Span( long i_nSpan, bool i_bWhitePixel, BitStreamState& io_rState )
+{
+ const PixelCode* pTable = i_bWhitePixel ? WhitePixelCodes : BlackPixelCodes;
+ // maximum encoded span is 2560 consecutive pixels
+ while( i_nSpan > 2623 )
+ {
+ // write 2560 bits, that is entry (63 + (2560 >> 6)) == 103 in the appropriate table
+ putG4Bits( pTable[103].mnCodeBits, pTable[103].mnCode, io_rState );
+ i_nSpan -= pTable[103].mnEncodedPixels;
+ }
+ // write multiples of 64 pixels up to 2560
+ if( i_nSpan > 63 )
+ {
+ sal_uInt32 nTabIndex = 63 + (i_nSpan >> 6);
+ OSL_ASSERT( pTable[nTabIndex].mnEncodedPixels == static_cast<sal_uInt32>(64*(i_nSpan >> 6)) );
+ putG4Bits( pTable[nTabIndex].mnCodeBits, pTable[nTabIndex].mnCode, io_rState );
+ i_nSpan -= pTable[nTabIndex].mnEncodedPixels;
+ }
+ putG4Bits( pTable[i_nSpan].mnCodeBits, pTable[i_nSpan].mnCode, io_rState );
+}
+
+void PDFWriterImpl::writeG4Stream( BitmapReadAccess* i_pBitmap )
+{
+ long nW = i_pBitmap->Width();
+ long nH = i_pBitmap->Height();
+ if( nW <= 0 || nH <= 0 )
+ return;
+ if( i_pBitmap->GetBitCount() != 1 )
+ return;
+
+ BitStreamState aBitState;
+
+ // the first reference line is virtual and completely empty
+ const Scanline pFirstRefLine = (Scanline)rtl_allocateZeroMemory( nW/8 + 1 );
+ Scanline pRefLine = pFirstRefLine;
+ for( long nY = 0; nY < nH; nY++ )
+ {
+ const Scanline pCurLine = i_pBitmap->GetScanline( nY );
+ long nLineIndex = 0;
+ bool bRunSet = (*pCurLine & 0x80) ? true : false;
+ bool bRefSet = (*pRefLine & 0x80) ? true : false;
+ long nRunIndex1 = bRunSet ? 0 : findBitRun( pCurLine, 0, nW, bRunSet );
+ long nRefIndex1 = bRefSet ? 0 : findBitRun( pRefLine, 0, nW, bRefSet );
+ for( ; nLineIndex < nW; )
+ {
+ long nRefIndex2 = findBitRun( pRefLine, nRefIndex1, nW, isSet( pRefLine, nRefIndex1 ) );
+ if( nRefIndex2 >= nRunIndex1 )
+ {
+ long nDiff = nRefIndex1 - nRunIndex1;
+ if( -3 <= nDiff && nDiff <= 3 )
+ { // vertical coding
+ static const struct
+ {
+ sal_uInt32 mnCodeBits;
+ sal_uInt32 mnCode;
+ } VerticalCodes[7] = {
+ { 7, 0x03 }, // 0000 011
+ { 6, 0x03 }, // 0000 11
+ { 3, 0x03 }, // 011
+ { 1, 0x1 }, // 1
+ { 3, 0x2 }, // 010
+ { 6, 0x02 }, // 0000 10
+ { 7, 0x02 } // 0000 010
+ };
+ // convert to index
+ nDiff += 3;
+
+ // emit diff code
+ putG4Bits( VerticalCodes[nDiff].mnCodeBits, VerticalCodes[nDiff].mnCode, aBitState );
+ nLineIndex = nRunIndex1;
+ }
+ else
+ { // difference too large, horizontal coding
+ // emit horz code 001
+ putG4Bits( 3, 0x1, aBitState );
+ long nRunIndex2 = findBitRun( pCurLine, nRunIndex1, nW, isSet( pCurLine, nRunIndex1 ) );
+ bool bWhiteFirst = ( nLineIndex + nRunIndex1 == 0 || ! isSet( pCurLine, nLineIndex ) );
+ putG4Span( nRunIndex1 - nLineIndex, bWhiteFirst, aBitState );
+ putG4Span( nRunIndex2 - nRunIndex1, ! bWhiteFirst, aBitState );
+ nLineIndex = nRunIndex2;
+ }
+ }
+ else
+ { // emit pass code 0001
+ putG4Bits( 4, 0x1, aBitState );
+ nLineIndex = nRefIndex2;
+ }
+ if( nLineIndex < nW )
+ {
+ bool bSet = isSet( pCurLine, nLineIndex );
+ nRunIndex1 = findBitRun( pCurLine, nLineIndex, nW, bSet );
+ nRefIndex1 = findBitRun( pRefLine, nLineIndex, nW, ! bSet );
+ nRefIndex1 = findBitRun( pRefLine, nRefIndex1, nW, bSet );
+ }
+ }
+
+ // the current line is the reference for the next line
+ pRefLine = pCurLine;
+ }
+ // terminate strip with EOFB
+ putG4Bits( 12, 1, aBitState );
+ putG4Bits( 12, 1, aBitState );
+ if( aBitState.mnNextBitPos != 8 )
+ {
+ writeBuffer( aBitState.getByte(), 1 );
+ aBitState.flush();
+ }
+
+ rtl_freeMemory( pFirstRefLine );
+}
diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx
index df67c4974d47..ac6116e38234 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;
@@ -412,7 +412,7 @@ BitmapEx PNGReaderImpl::GetBitmapEx( const Size& rPreviewSizeHint )
case PNGCHUNK_IDAT :
{
if ( !mpInflateInBuf ) // taking care that the header has properly been read
- mbStatus = FALSE;
+ mbStatus = sal_False;
else if ( !mbIDAT ) // the gfx is finished, but there may be left a zlibCRC of about 4Bytes
ImplReadIDAT();
}
@@ -490,27 +490,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 ?
@@ -522,12 +522,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;
sal_uInt64 nScansize64 = ( ( static_cast< sal_uInt64 >( maOrigSize.Width() ) * mnPngDepth ) + 7 ) >> 3;
@@ -540,7 +540,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
@@ -548,17 +548,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;
nScansize64 *= 3;
switch ( mnPngDepth )
{
@@ -567,7 +567,7 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
mnTargetDepth = 24;
break;
default :
- return FALSE;
+ return sal_False;
}
}
break;
@@ -582,10 +582,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;
@@ -593,25 +593,25 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
case 4 : // each pixel is a grayscale sample followed by an alpha sample
{
nScansize64 *= 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;
nScansize64 *= 4;
- mbAlphaChannel = TRUE;
+ mbAlphaChannel = sal_True;
switch (mnPngDepth )
{
case 16 : // we have to reduce the bitmap
@@ -619,13 +619,13 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
mnTargetDepth = 24;
break;
default :
- return FALSE;
+ return sal_False;
}
}
break;
default :
- return FALSE;
+ return sal_False;
}
mnBPP = static_cast< sal_uInt32 >( nScansize64 / maOrigSize.Width() );
@@ -635,17 +635,17 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
nScansize64++; // each scanline includes one filterbyte
if ( nScansize64 > SAL_MAX_UINT32 )
- return FALSE;
+ return sal_False;
mnScansize = static_cast< sal_uInt32 >( nScansize64 );
// TODO: switch between both scanlines instead of copying
- mpInflateInBuf = new (std::nothrow) BYTE[ mnScansize ];
+ mpInflateInBuf = new (std::nothrow) sal_uInt8[ mnScansize ];
mpScanCurrent = mpInflateInBuf;
- mpScanPrior = new (std::nothrow) BYTE[ mnScansize ];
+ mpScanPrior = new (std::nothrow) sal_uInt8[ mnScansize ];
if ( !mpInflateInBuf || !mpScanPrior )
- return FALSE;
+ return sal_False;
// calculate target size from original size and the preview hint
if( rPreviewSizeHint.Width() || rPreviewSizeHint.Height() )
@@ -684,7 +684,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 );
@@ -694,7 +694,7 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
mpAlphaMask->Erase( 128 );
mpMaskAcc = mpAlphaMask->AcquireWriteAccess();
if( !mpMaskAcc )
- return FALSE;
+ return sal_False;
}
if ( mbGrayScale )
@@ -702,7 +702,7 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
ImplPreparePass();
- return TRUE;
+ return sal_True;
}
// ------------------------------------------------------------------------
@@ -722,38 +722,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;
@@ -792,7 +792,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;
@@ -820,13 +820,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;
}
// ------------------------------------------------------------------------
@@ -842,7 +842,7 @@ void PNGReaderImpl::ImplGetGamma()
if ( fInvGamma != 1.0 )
{
- mbGamma = TRUE;
+ mbGamma = sal_True;
if ( mpColorTable == mpDefaultColorTable )
mpColorTable = new sal_uInt8[ 256 ];
@@ -865,10 +865,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;
}
}
@@ -927,9 +927,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 );
@@ -942,7 +942,7 @@ void PNGReaderImpl::ImplReadIDAT()
sal_Int32 nRead = mpZCodec->ReadAsynchron( aIStrm, mpScanCurrent, nToRead );
if ( nRead < 0 )
{
- mbStatus = FALSE;
+ mbStatus = sal_False;
break;
}
if ( nRead < nToRead )
@@ -973,7 +973,7 @@ void PNGReaderImpl::ImplReadIDAT()
if( mbIDAT )
{
mpZCodec->EndCompression();
- mbzCodecInUse = FALSE;
+ mbzCodecInUse = sal_False;
}
}
@@ -1048,9 +1048,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
@@ -1060,26 +1060,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;
}
}
@@ -1087,18 +1087,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;
}
}
@@ -1106,14 +1106,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 )
@@ -1138,7 +1138,7 @@ void PNGReaderImpl::ImplApplyFilter()
if( npa > npc )
na = nc;
- *p1 = static_cast<BYTE>( *p1 + na );
+ *p1 = static_cast<sal_uInt8>( *p1 + na );
++p1;
}
}
@@ -1164,7 +1164,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() )
@@ -1175,12 +1175,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 ] );
@@ -1192,11 +1192,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 );
@@ -1228,7 +1228,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 :
@@ -1350,7 +1350,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
break;
default :
- mbStatus = FALSE;
+ mbStatus = sal_False;
break;
}
}
@@ -1476,7 +1476,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 )
@@ -1488,7 +1488,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 )
@@ -1506,7 +1506,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 )
@@ -1520,7 +1520,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..3d814bea000e 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_uLong mnDeflateInSize;
+
+ sal_uLong mnWidth, mnHeight;
+ sal_uInt8 mnBitsPerPixel;
+ sal_uInt8 mnFilterType; // 0 oder 4;
+ sal_uLong mnBBP; // bytes per pixel ( needed for filtering )
+ sal_Bool mbTrueAlpha;
+ sal_uLong mnCRC;
long mnChunkDatSize;
- ULONG mnLastPercent;
+ sal_uLong mnLastPercent;
void ImplWritepHYs( const BitmapEx& rBitmapEx );
void ImplWriteIDAT();
- ULONG ImplGetFilter( ULONG nY, ULONG nXStart=0, ULONG nXAdd=1 );
+ sal_uLong ImplGetFilter( sal_uLong nY, sal_uLong nXStart=0, sal_uLong nXAdd=1 );
void ImplClearFirstScanline();
void ImplWriteTransparent();
- BOOL ImplWriteHeader();
+ sal_Bool ImplWriteHeader();
void ImplWritePalette();
- void ImplOpenChunk( ULONG nChunkType );
- void ImplWriteChunk( BYTE nNumb );
+ void ImplOpenChunk( sal_uLong 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_uLong 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_uLong 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_uLong 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_uLong nY = 0; nY < mnHeight; nY++ )
mpZCodec->Write( aOStm, mpDeflateInBuf, ImplGetFilter( nY ) );
}
else
{
// interlace mode
- ULONG nY;
+ sal_uLong 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_uLong PNGWriterImpl::ImplGetFilter ( sal_uLong nY, sal_uLong nXStart, sal_uLong 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_uLong nX, nXIndex;
for ( nX = nXStart, nXIndex = 0; nX < mnWidth; nX+=nXAdd, nXIndex++ )
{
- ULONG nShift = ( nXIndex & 7 ) ^ 7;
+ sal_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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..7c69f79d50e6 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_uLong 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_uLong 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_uLong 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_uLong 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 78456992340f..e5e19dff3771 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -41,6 +41,7 @@
#include <vcl/unohelp.hxx>
#include <tools/debug.hxx>
+#include <tools/resary.hxx>
#include <tools/stream.hxx>
#include <tools/vcompat.hxx>
#include <vcl/svdata.hxx>
@@ -54,6 +55,7 @@
#include <vcl/gdimtf.hxx>
#include <vcl/metaact.hxx>
#include <vcl/print.hxx>
+#include <vcl/svids.hrc>
#include <comphelper/processfactory.hxx>
@@ -117,16 +119,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 )
{
}
@@ -199,13 +201,13 @@ bool PrinterOptions::ReadFromConfig( bool i_bFile )
if( xSet->getPropertyValue(PROPERTYNAME_REDUCEDGRADIENTMODE) >>= nValue )
SetReducedGradientMode( (PrinterGradientMode)nValue );
if( xSet->getPropertyValue(PROPERTYNAME_REDUCEDGRADIENTSTEPCOUNT) >>= nValue )
- SetReducedGradientStepCount( (USHORT)nValue );
+ SetReducedGradientStepCount( (sal_uInt16)nValue );
if( xSet->getPropertyValue(PROPERTYNAME_REDUCEBITMAPS) >>= bValue )
SetReduceBitmaps( bValue );
if( xSet->getPropertyValue(PROPERTYNAME_REDUCEDBITMAPMODE) >>= nValue )
SetReducedBitmapMode( (PrinterBitmapMode)nValue );
if( xSet->getPropertyValue(PROPERTYNAME_REDUCEDBITMAPRESOLUTION) >>= nValue )
- SetReducedBitmapResolution( (USHORT)nValue );
+ SetReducedBitmapResolution( (sal_uInt16)nValue );
if( xSet->getPropertyValue(PROPERTYNAME_REDUCEDBITMAPINCLUDESTRANSPARENCY) >>= bValue )
SetReducedBitmapIncludesTransparency( bValue );
if( xSet->getPropertyValue(PROPERTYNAME_CONVERTTOGREYSCALES) >>= bValue )
@@ -454,24 +456,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
@@ -536,7 +538,7 @@ void Printer::ImplInit( SalPrinterQueueInfo* pInfo )
// Daten initialisieren
ImplUpdatePageData();
mpFontList = new ImplDevFontList();
- mpFontCache = new ImplFontCache( TRUE );
+ mpFontCache = new ImplFontCache( sal_True );
mpGraphics->GetDevFontList( mpFontList );
}
@@ -645,7 +647,7 @@ void Printer::ImplUpdatePageData()
void Printer::ImplUpdateFontList()
{
- ImplUpdateFontData( TRUE );
+ ImplUpdateFontData( sal_True );
}
// -----------------------------------------------------------------------
@@ -658,7 +660,7 @@ Printer::Printer()
{
ImplInit( pInfo );
if ( !IsDisplayPrinter() )
- mbDefPrinter = TRUE;
+ mbDefPrinter = sal_True;
}
else
ImplInitDisplay( NULL );
@@ -776,57 +778,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_uLong 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;
@@ -834,60 +836,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();
@@ -927,14 +929,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?
@@ -969,8 +971,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;
}
@@ -988,15 +990,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 )
{
@@ -1006,26 +1008,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;
}
// -----------------------------------------------------------------------
@@ -1037,10 +1039,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()) )
@@ -1051,31 +1053,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;
}
@@ -1173,10 +1175,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 )
{
@@ -1192,9 +1194,9 @@ BOOL Printer::SetPaper( Paper ePaper )
if ( IsDisplayPrinter() )
{
- mbNewJobSetup = TRUE;
+ mbNewJobSetup = sal_True;
maJobSetup = aJobSetup;
- return TRUE;
+ return sal_True;
}
ImplReleaseGraphics();
@@ -1203,30 +1205,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 );
@@ -1242,9 +1244,9 @@ BOOL Printer::SetPaperSizeUser( const Size& rSize, bool bMatchNearest )
if ( IsDisplayPrinter() )
{
- mbNewJobSetup = TRUE;
+ mbNewJobSetup = sal_True;
maJobSetup = aJobSetup;
- return TRUE;
+ return sal_True;
}
ImplReleaseGraphics();
@@ -1254,17 +1256,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;
}
// -----------------------------------------------------------------------
@@ -1280,6 +1282,48 @@ int Printer::GetPaperInfoCount() const
// -----------------------------------------------------------------------
+rtl::OUString Printer::GetPaperName( Paper ePaper )
+{
+ ImplSVData* pSVData = ImplGetSVData();
+ if( ! pSVData->mpPaperNames )
+ {
+ pSVData->mpPaperNames = new std::hash_map< int, rtl::OUString >();
+ if( ImplGetResMgr() )
+ {
+ ResStringArray aPaperStrings( VclResId( RID_STR_PAPERNAMES ) );
+ static const int PaperIndex[] =
+ {
+ PAPER_A0, PAPER_A1, PAPER_A2, PAPER_A3, PAPER_A4, PAPER_A5,
+ PAPER_B4_ISO, PAPER_B5_ISO, PAPER_LETTER, PAPER_LEGAL, PAPER_TABLOID,
+ PAPER_USER, PAPER_B6_ISO, PAPER_ENV_C4, PAPER_ENV_C5, PAPER_ENV_C6, PAPER_ENV_C65,
+ PAPER_ENV_DL, PAPER_SLIDE_DIA, PAPER_SCREEN, PAPER_C, PAPER_D, PAPER_E,
+ PAPER_EXECUTIVE, PAPER_FANFOLD_LEGAL_DE, PAPER_ENV_MONARCH, PAPER_ENV_PERSONAL,
+ PAPER_ENV_9, PAPER_ENV_10, PAPER_ENV_11, PAPER_ENV_12, PAPER_KAI16,
+ PAPER_KAI32, PAPER_KAI32BIG, PAPER_B4_JIS, PAPER_B5_JIS, PAPER_B6_JIS
+ };
+ OSL_ENSURE( sal_uInt32(sizeof(PaperIndex)/sizeof(PaperIndex[0])) == aPaperStrings.Count(), "localized paper name count wrong" );
+ for( int i = 0; i < int(sizeof(PaperIndex)/sizeof(PaperIndex[0])); i++ )
+ (*pSVData->mpPaperNames)[PaperIndex[i]] = aPaperStrings.GetString(i);
+ }
+ }
+
+ std::hash_map<int,rtl::OUString>::const_iterator it = pSVData->mpPaperNames->find( (int)ePaper );
+ return (it != pSVData->mpPaperNames->end()) ? it->second : rtl::OUString();
+}
+
+// -----------------------------------------------------------------------
+
+rtl::OUString Printer::GetPaperName( bool i_bPaperUser ) const
+{
+ Size aPageSize = PixelToLogic( GetPaperSizePixel(), MAP_100TH_MM );
+ Paper ePaper = ImplGetPaperFormat( aPageSize.Width(), aPageSize.Height() );
+ if( ePaper == PAPER_USER )
+ ePaper = ImplGetPaperFormat( aPageSize.Height(), aPageSize.Width() );
+ return (ePaper != PAPER_USER || i_bPaperUser ) ? GetPaperName( ePaper ) : rtl::OUString();
+}
+
+// -----------------------------------------------------------------------
+
const PaperInfo& Printer::GetPaperInfo( int nPaper ) const
{
if( ! mpInfoPrinter )
@@ -1300,10 +1344,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 )
{
@@ -1313,26 +1357,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;
}
// -----------------------------------------------------------------------
@@ -1351,17 +1395,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();
@@ -1374,11 +1418,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;
}
// -----------------------------------------------------------------------
@@ -1391,9 +1435,9 @@ void Printer::Error()
// -----------------------------------------------------------------------
-ULONG Printer::ImplSalPrinterErrorCodeToVCL( ULONG nError )
+sal_uLong Printer::ImplSalPrinterErrorCodeToVCL( sal_uLong nError )
{
- ULONG nVCLError;
+ sal_uLong nVCLError;
switch ( nError )
{
case 0:
@@ -1414,7 +1458,7 @@ ULONG Printer::ImplSalPrinterErrorCodeToVCL( ULONG nError )
void Printer::ImplEndPrint()
{
- mbPrinting = FALSE;
+ mbPrinting = sal_False;
mnCurPrintPage = 0;
maJobName.Erase();
}
@@ -1431,15 +1475,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 )
{
@@ -1447,13 +1491,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
@@ -1467,34 +1511,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;
}
// -----------------------------------------------------------------------
@@ -1512,12 +1556,12 @@ void Printer::ImplStartPage()
ImplReleaseGraphics();
mpJobGraphics = pGraphics;
}
- mbDevOutput = TRUE;
+ mbDevOutput = sal_True;
// PrintJob not aborted ???
if ( IsJobActive() )
{
- mbInPrintPage = TRUE;
+ mbInPrintPage = sal_True;
mnCurPage++;
mnCurPrintPage++;
}
@@ -1531,16 +1575,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 5c2a742a10ba..d86df6e2816b 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()) );
@@ -747,7 +747,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;
@@ -855,13 +855,12 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
++nActionNum;
}
- ConnectedComponentsList aCCList; // list containing distinct sets of connected components as elements.
+ // clean up aMapModeVDev
+ sal_uInt32 nCount = aMapModeVDev.GetGCStackDepth();
+ while( nCount-- )
+ aMapModeVDev.Pop();
- // create an OutputDevice to record mapmode changes and the like
- VirtualDevice aMapModeVDev2;
- aMapModeVDev2.mnDPIX = mnDPIX;
- aMapModeVDev2.mnDPIY = mnDPIY;
- aMapModeVDev2.EnableOutput(FALSE);
+ ConnectedComponentsList aCCList; // list containing distinct sets of connected components as elements.
// fast-forward until one after the last background action
// (need to reconstruct map mode vdev state)
@@ -876,7 +875,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
pCurrAct, nActionNum) );
// execute action to get correct MapModes etc.
- pCurrAct->Execute( &aMapModeVDev2 );
+ pCurrAct->Execute( &aMapModeVDev );
pCurrAct=const_cast<GDIMetaFile&>(rInMtf).NextAction();
++nActionNum;
}
@@ -893,10 +892,10 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
pCurrAct=const_cast<GDIMetaFile&>(rInMtf).NextAction(), ++nActionNum )
{
// execute action to get correct MapModes etc.
- pCurrAct->Execute( &aMapModeVDev2 );
+ pCurrAct->Execute( &aMapModeVDev );
// cache bounds of current action
- const Rectangle aBBCurrAct( ImplCalcActionBounds(*pCurrAct, aMapModeVDev2) );
+ const Rectangle aBBCurrAct( ImplCalcActionBounds(*pCurrAct, aMapModeVDev) );
// accumulate collected bounds here, initialize with current action
Rectangle aTotalBounds( aBBCurrAct ); // thus,
@@ -925,7 +924,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
// not be considered for connected components,
// too. Just put each of them into a separate
// component.
- aTotalComponents.bIsFullyTransparent = !ImplIsNotTransparent(*pCurrAct, aMapModeVDev2);
+ aTotalComponents.bIsFullyTransparent = !ImplIsNotTransparent(*pCurrAct, aMapModeVDev);
if( !aBBCurrAct.IsEmpty() &&
!aTotalComponents.bIsFullyTransparent )
@@ -1193,7 +1192,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.
@@ -1224,7 +1223,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;
@@ -1236,10 +1235,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 )
{
@@ -1274,8 +1273,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 ) );
@@ -1291,7 +1290,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();
@@ -1311,18 +1310,16 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
}
}
+ // clean up aMapModeVDev
+ nCount = aMapModeVDev.GetGCStackDepth();
+ while( nCount-- )
+ aMapModeVDev.Pop();
+
//
// STAGE 4: Copy actions to output metafile
// ========================================
//
- // create an OutputDevice to record color settings, mapmode
- // changes and the like
- VirtualDevice aMapModeVDev3;
- aMapModeVDev3.mnDPIX = mnDPIX;
- aMapModeVDev3.mnDPIY = mnDPIY;
- aMapModeVDev3.EnableOutput(FALSE);
-
// iterate over all actions and duplicate the ones not in a
// special aCCList member into rOutMtf
for( pCurrAct=const_cast<GDIMetaFile&>(rInMtf).FirstAction(), nActionNum=0;
@@ -1350,7 +1347,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
// given background color
ImplConvertTransparentAction(rOutMtf,
*pCurrAct,
- aMapModeVDev3,
+ aMapModeVDev,
aBackgroundComponent.aBgColor);
}
else
@@ -1359,7 +1356,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
rOutMtf.AddAction( ( pCurrAct->Duplicate(), pCurrAct ) );
}
- pCurrAct->Execute(&aMapModeVDev3);
+ pCurrAct->Execute(&aMapModeVDev);
}
}
@@ -1537,7 +1534,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 );
@@ -1580,7 +1577,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 8207282add99..34276fafdfe5 100755
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -490,18 +490,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_uLong nCopies = mnCopyCount;
bool bCollateCopy = mbCollateCopy;
- bool bUserCopy = FALSE;
+ bool bUserCopy = sal_False;
if ( nCopies > 1 )
{
- ULONG nDevCopy;
+ sal_uLong nDevCopy;
if ( bCollateCopy )
nDevCopy = GetCapabilities( PRINTER_CAPABILITIES_COLLATECOPIES );
@@ -511,20 +511,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" ) ) );
@@ -540,7 +540,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;
}
@@ -554,10 +554,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( GetCapabilities( PRINTER_CAPABILITIES_USEPULLMODEL ) )
{
- 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
@@ -578,7 +578,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;
@@ -619,7 +619,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 nOuterIteration = 0; nOuterIteration < nOuterRepeatCount && ! bAborted; nOuterIteration++ )
@@ -656,7 +656,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;
@@ -677,7 +677,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;
@@ -745,7 +745,7 @@ bool PrinterController::setupPrinter( Window* i_pParent )
// get old data
Size aPaperSize( mpImplData->mpPrinter->PixelToLogic(
mpImplData->mpPrinter->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) ) );
- USHORT nPaperBin = mpImplData->mpPrinter->GetPaperBin();
+ sal_uInt16 nPaperBin = mpImplData->mpPrinter->GetPaperBin();
// call driver setup
bRet = mpImplData->mpPrinter->Setup( i_pParent );
@@ -754,7 +754,7 @@ bool PrinterController::setupPrinter( Window* i_pParent )
// was papersize or bin overridden ? if so we need to take action
Size aNewPaperSize( mpImplData->mpPrinter->PixelToLogic(
mpImplData->mpPrinter->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) ) );
- USHORT nNewPaperBin = mpImplData->mpPrinter->GetPaperBin();
+ sal_uInt16 nNewPaperBin = mpImplData->mpPrinter->GetPaperBin();
if( aNewPaperSize != aPaperSize || nNewPaperBin != nPaperBin )
{
mpImplData->maFixedPageSize = aNewPaperSize;
@@ -887,7 +887,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() );
@@ -916,7 +916,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();
@@ -933,8 +933,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
@@ -1085,9 +1085,9 @@ int PrinterController::getFilteredPageCount()
return (getPageCountProtected() * mpImplData->maMultiPage.nRepeat + (nDiv-1)) / nDiv;
}
-ULONG PrinterController::removeTransparencies( GDIMetaFile& i_rIn, GDIMetaFile& o_rOut )
+sal_uLong PrinterController::removeTransparencies( GDIMetaFile& i_rIn, GDIMetaFile& o_rOut )
{
- ULONG nRestoreDrawMode = mpImplData->mpPrinter->GetDrawMode();
+ sal_uLong nRestoreDrawMode = mpImplData->mpPrinter->GetDrawMode();
sal_Int32 nMaxBmpDPIX = mpImplData->mpPrinter->ImplGetDPIX();
sal_Int32 nMaxBmpDPIY = mpImplData->mpPrinter->ImplGetDPIY();
@@ -1185,9 +1185,9 @@ void PrinterController::printFilteredPage( int i_nPage )
}
GDIMetaFile aCleanedFile;
- ULONG nRestoreDrawMode = removeTransparencies( aPageFile, aCleanedFile );
+ sal_uLong nRestoreDrawMode = removeTransparencies( aPageFile, aCleanedFile );
- mpImplData->mpPrinter->EnableOutput( TRUE );
+ mpImplData->mpPrinter->EnableOutput( sal_True );
// actually print the page
mpImplData->mpPrinter->ImplStartPage();
@@ -1599,7 +1599,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..96e67aaabffa 100644..100755
--- a/vcl/source/gdi/region.cxx
+++ b/vcl/source/gdi/region.cxx
@@ -46,6 +46,8 @@
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
+#include <basegfx/polygon/b2dpolygonclipper.hxx>
+#include <basegfx/polygon/b2dpolypolygoncutter.hxx>
#include <basegfx/range/b2drange.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
@@ -84,19 +86,19 @@ namespace {
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 +190,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 +269,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);
}
}
@@ -291,19 +293,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 +345,7 @@ const char* ImplDbgTestRegion( const void* pObj )
if ( (pImplRegion != &aImplEmptyRegion) && (pImplRegion != &aImplNullRegion) )
{
- ULONG nCount = 0;
+ sal_uLong nCount = 0;
const ImplRegionBand* pBand = pImplRegion->ImplGetFirstRegionBand();
while ( pBand )
{
@@ -541,14 +543,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 +627,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 +657,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 +674,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 +688,7 @@ BOOL ImplRegion::InsertPoint( const Point &rPoint, long nLineID,
// reinitialize pointer (should never be reached!)
mpLastCheckedBand = mpFirstBand;
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -704,9 +706,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 +723,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 +767,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 +788,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 +815,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 +832,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 +842,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 +987,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 +998,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 +1206,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 +1370,35 @@ 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;
+
+ if( HasPolyPolygon() )
+ {
+ // get this B2DPolyPolygon
+ basegfx::B2DPolyPolygon aThisPolyPoly( ConvertToB2DPolyPolygon() );
+ aThisPolyPoly = basegfx::tools::prepareForPolygonOperation( aThisPolyPoly );
+
+ if( aThisPolyPoly.count() == 0 )
+ {
+ *this = rRect;
+ return true;
+ }
+
+ // get the other B2DPolyPolygon
+ basegfx::B2DPolygon aRectPoly( basegfx::tools::createPolygonFromRect( basegfx::B2DRectangle( rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom() ) ) );
+ basegfx::B2DPolyPolygon aOtherPolyPoly( aRectPoly );
+
+ basegfx::B2DPolyPolygon aClip = basegfx::tools::solvePolygonOperationOr( aThisPolyPoly, aOtherPolyPoly );
+ *this = Region( aClip );
+
+ return sal_True;
+ }
ImplPolyPolyRegionToBandRegion();
@@ -1405,12 +1429,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 +1450,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 +1468,30 @@ BOOL Region::Intersect( const Rectangle& rRect )
// unnecessary banding
mpImplRegion->mpPolyPoly->Clip( rRect );
- return TRUE;
+ return sal_True;
+ }
+ else if( mpImplRegion->mpB2DPolyPoly )
+ {
+ // #127431# make ImplRegion unique, if not already.
+ if( mpImplRegion->mnRefCount > 1 )
+ {
+ mpImplRegion->mnRefCount--;
+ mpImplRegion = new ImplRegion( *mpImplRegion->mpB2DPolyPoly );
+ }
+
+ *mpImplRegion->mpB2DPolyPoly =
+ basegfx::tools::clipPolyPolygonOnRange( *mpImplRegion->mpB2DPolyPoly,
+ basegfx::B2DRange( rRect.Left(), rRect.Top(),
+ rRect.Right(), rRect.Bottom() ),
+ true, false );
+ 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 +1512,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 +1556,43 @@ 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;
+
+ if( HasPolyPolygon() )
+ {
+ // get this B2DPolyPolygon
+ basegfx::B2DPolyPolygon aThisPolyPoly( ConvertToB2DPolyPolygon() );
+ aThisPolyPoly = basegfx::tools::prepareForPolygonOperation( aThisPolyPoly );
+
+ if( aThisPolyPoly.count() == 0 )
+ return sal_True;
+
+ // get the other B2DPolyPolygon
+ basegfx::B2DPolygon aRectPoly( basegfx::tools::createPolygonFromRect( basegfx::B2DRectangle( rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom() ) ) );
+ basegfx::B2DPolyPolygon aOtherPolyPoly( aRectPoly );
+
+ basegfx::B2DPolyPolygon aClip = basegfx::tools::solvePolygonOperationDiff( aThisPolyPoly, aOtherPolyPoly );
+ *this = Region( aClip );
+
+ 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 +1617,40 @@ 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;
+
+ if( HasPolyPolygon() )
+ {
+ // get this B2DPolyPolygon
+ basegfx::B2DPolyPolygon aThisPolyPoly( ConvertToB2DPolyPolygon() );
+ aThisPolyPoly = basegfx::tools::prepareForPolygonOperation( aThisPolyPoly );
+
+ if( aThisPolyPoly.count() == 0 )
+ {
+ *this = rRect;
+ return sal_True;
+ }
+
+ // get the other B2DPolyPolygon
+ basegfx::B2DPolygon aRectPoly( basegfx::tools::createPolygonFromRect( basegfx::B2DRectangle( rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom() ) ) );
+ basegfx::B2DPolyPolygon aOtherPolyPoly( aRectPoly );
+
+ basegfx::B2DPolyPolygon aClip = basegfx::tools::solvePolygonOperationXor( aThisPolyPoly, aOtherPolyPoly );
+ *this = Region( aClip );
+
+ return sal_True;
+ }
ImplPolyPolyRegionToBandRegion();
@@ -1600,21 +1681,48 @@ BOOL Region::XOr( const Rectangle& rRect )
mpImplRegion = (ImplRegion*)(&aImplEmptyRegion);
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
+void Region::ImplUnionPolyPolygon( const Region& i_rRegion )
+{
+ // get this B2DPolyPolygon
+ basegfx::B2DPolyPolygon aThisPolyPoly( ConvertToB2DPolyPolygon() );
+ aThisPolyPoly = basegfx::tools::prepareForPolygonOperation( aThisPolyPoly );
+
+ if( aThisPolyPoly.count() == 0 )
+ {
+ *this = i_rRegion;
+ return;
+ }
+
+ // get the other B2DPolyPolygon
+ basegfx::B2DPolyPolygon aOtherPolyPoly( const_cast<Region&>(i_rRegion).ConvertToB2DPolyPolygon() );
+ aOtherPolyPoly = basegfx::tools::prepareForPolygonOperation( aOtherPolyPoly );
-BOOL Region::Union( const Region& rRegion )
+
+ basegfx::B2DPolyPolygon aClip = basegfx::tools::solvePolygonOperationOr( aThisPolyPoly, aOtherPolyPoly );
+
+ *this = Region( aClip );
+}
+
+sal_Bool Region::Union( const Region& rRegion )
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
+ if( rRegion.HasPolyPolygon() || HasPolyPolygon() )
+ {
+ ImplUnionPolyPolygon( rRegion );
+ return sal_True;
+ }
+
ImplPolyPolyRegionToBandRegion();
((Region*)&rRegion)->ImplPolyPolyRegionToBandRegion();
// 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 +1758,50 @@ BOOL Region::Union( const Region& rRegion )
mpImplRegion = (ImplRegion*)(&aImplEmptyRegion);
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
+void Region::ImplIntersectWithPolyPolygon( const Region& i_rRegion )
+{
+ // get this B2DPolyPolygon
+ basegfx::B2DPolyPolygon aThisPolyPoly( ConvertToB2DPolyPolygon() );
+ if( aThisPolyPoly.count() == 0 )
+ {
+ *this = i_rRegion;
+ return;
+ }
-BOOL Region::Intersect( const Region& rRegion )
+ // get the other B2DPolyPolygon
+ basegfx::B2DPolyPolygon aOtherPolyPoly( const_cast<Region&>(i_rRegion).ConvertToB2DPolyPolygon() );
+
+ basegfx::B2DPolyPolygon aClip = basegfx::tools::clipPolyPolygonOnPolyPolygon( aOtherPolyPoly, aThisPolyPoly, true, false );
+ *this = Region( aClip );
+}
+
+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;
+
+ if( rRegion.HasPolyPolygon() || HasPolyPolygon() )
+ {
+ ImplIntersectWithPolyPolygon( rRegion );
+ 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 +1815,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 +1823,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 +1843,7 @@ BOOL Region::Intersect( const Region& rRegion )
ImplRegionBand* pBand = mpImplRegion->mpFirstBand;
while ( pBand )
{
- pBand->mbTouched = FALSE;
+ pBand->mbTouched = sal_False;
pBand = pBand->mpNextBand;
}
@@ -1789,25 +1919,46 @@ BOOL Region::Intersect( const Region& rRegion )
}
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
+void Region::ImplExcludePolyPolygon( const Region& i_rRegion )
+{
+ // get this B2DPolyPolygon
+ basegfx::B2DPolyPolygon aThisPolyPoly( ConvertToB2DPolyPolygon() );
+ if( aThisPolyPoly.count() == 0 )
+ return;
+ aThisPolyPoly = basegfx::tools::prepareForPolygonOperation( aThisPolyPoly );
+
+ // get the other B2DPolyPolygon
+ basegfx::B2DPolyPolygon aOtherPolyPoly( const_cast<Region&>(i_rRegion).ConvertToB2DPolyPolygon() );
+ aOtherPolyPoly = basegfx::tools::prepareForPolygonOperation( aOtherPolyPoly );
+
+ basegfx::B2DPolyPolygon aClip = basegfx::tools::solvePolygonOperationDiff( aThisPolyPoly, aOtherPolyPoly );
+ *this = Region( aClip );
+}
-BOOL Region::Exclude( const Region& rRegion )
+sal_Bool Region::Exclude( const Region& rRegion )
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
+ if( rRegion.HasPolyPolygon() || HasPolyPolygon() )
+ {
+ ImplExcludePolyPolygon( rRegion );
+ return sal_True;
+ }
+
ImplPolyPolyRegionToBandRegion();
((Region*)&rRegion)->ImplPolyPolyRegionToBandRegion();
// 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,27 +1993,51 @@ BOOL Region::Exclude( const Region& rRegion )
pBand = pBand->mpNextBand;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
+void Region::ImplXOrPolyPolygon( const Region& i_rRegion )
+{
+ // get this B2DPolyPolygon
+ basegfx::B2DPolyPolygon aThisPolyPoly( ConvertToB2DPolyPolygon() );
+ if( aThisPolyPoly.count() == 0 )
+ {
+ *this = i_rRegion;
+ return;
+ }
+ aThisPolyPoly = basegfx::tools::prepareForPolygonOperation( aThisPolyPoly );
+
+ // get the other B2DPolyPolygon
+ basegfx::B2DPolyPolygon aOtherPolyPoly( const_cast<Region&>(i_rRegion).ConvertToB2DPolyPolygon() );
+ aOtherPolyPoly = basegfx::tools::prepareForPolygonOperation( aOtherPolyPoly );
+
+ basegfx::B2DPolyPolygon aClip = basegfx::tools::solvePolygonOperationXor( aThisPolyPoly, aOtherPolyPoly );
+ *this = Region( aClip );
+}
-BOOL Region::XOr( const Region& rRegion )
+sal_Bool Region::XOr( const Region& rRegion )
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
+ if( rRegion.HasPolyPolygon() || HasPolyPolygon() )
+ {
+ ImplXOrPolyPolygon( rRegion );
+ return sal_True;
+ }
+
ImplPolyPolyRegionToBandRegion();
((Region*)&rRegion)->ImplPolyPolyRegionToBandRegion();
// 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 +2070,7 @@ BOOL Region::XOr( const Region& rRegion )
mpImplRegion = (ImplRegion*)(&aImplEmptyRegion);
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -1949,7 +2124,7 @@ Rectangle Region::GetBoundRect() const
// -----------------------------------------------------------------------
-BOOL Region::HasPolyPolygon() const
+sal_Bool Region::HasPolyPolygon() const
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
if( !mpImplRegion )
@@ -2031,7 +2206,7 @@ basegfx::B2DPolyPolygon Region::ConvertToB2DPolyPolygon()
// -----------------------------------------------------------------------
-BOOL Region::ImplGetFirstRect( ImplRegionInfo& rImplRegionInfo,
+bool Region::ImplGetFirstRect( ImplRegionInfo& rImplRegionInfo,
long& rX, long& rY,
long& rWidth, long& rHeight ) const
{
@@ -2041,11 +2216,11 @@ BOOL Region::ImplGetFirstRect( ImplRegionInfo& rImplRegionInfo,
// no internal data? -> region is empty!
if ( (mpImplRegion == &aImplEmptyRegion) || (mpImplRegion == &aImplNullRegion) )
- return FALSE;
+ return false;
// no band in the list? -> region is empty!
if ( mpImplRegion->mpFirstBand == NULL )
- return FALSE;
+ return false;
// initialise pointer for first access
ImplRegionBand* pCurrRectBand = mpImplRegion->mpFirstBand;
@@ -2053,7 +2228,7 @@ BOOL Region::ImplGetFirstRect( ImplRegionInfo& rImplRegionInfo,
DBG_ASSERT( pCurrRectBandSep != NULL, "Erstes Band wurde nicht optimiert." );
if ( !pCurrRectBandSep )
- return FALSE;
+ return false;
// get boundaries of current rectangle
rX = pCurrRectBandSep->mnXLeft;
@@ -2065,12 +2240,12 @@ BOOL Region::ImplGetFirstRect( ImplRegionInfo& rImplRegionInfo,
rImplRegionInfo.mpVoidCurrRectBand = (void*)pCurrRectBand;
rImplRegionInfo.mpVoidCurrRectBandSep = (void*)pCurrRectBandSep;
- return TRUE;
+ return true;
}
// -----------------------------------------------------------------------
-BOOL Region::ImplGetNextRect( ImplRegionInfo& rImplRegionInfo,
+bool Region::ImplGetNextRect( ImplRegionInfo& rImplRegionInfo,
long& rX, long& rY,
long& rWidth, long& rHeight ) const
{
@@ -2078,7 +2253,7 @@ BOOL Region::ImplGetNextRect( ImplRegionInfo& rImplRegionInfo,
// no internal data? -> region is empty!
if ( (mpImplRegion == &aImplEmptyRegion) || (mpImplRegion == &aImplNullRegion) )
- return FALSE;
+ return false;
// get last pointers
ImplRegionBand* pCurrRectBand = (ImplRegionBand*)rImplRegionInfo.mpVoidCurrRectBand;
@@ -2095,7 +2270,7 @@ BOOL Region::ImplGetNextRect( ImplRegionInfo& rImplRegionInfo,
// no band found? -> not further rectangles!
if( !pCurrRectBand )
- return FALSE;
+ return false;
// get first separation in current band
pCurrRectBandSep = pCurrRectBand->mpFirstSep;
@@ -2111,7 +2286,7 @@ BOOL Region::ImplGetNextRect( ImplRegionInfo& rImplRegionInfo,
rImplRegionInfo.mpVoidCurrRectBand = (void*)pCurrRectBand;
rImplRegionInfo.mpVoidCurrRectBandSep = (void*)pCurrRectBandSep;
- return TRUE;
+ return true;
}
// -----------------------------------------------------------------------
@@ -2130,7 +2305,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 +2318,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 +2330,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 +2365,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 +2467,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 +2491,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 +2511,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 +2557,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 +2575,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 +2669,7 @@ SvStream& operator>>( SvStream& rIStrm, Region& rRegion )
if( aCompat.GetVersion() >= 2 )
{
- BOOL bHasPolyPolygon;
+ sal_Bool bHasPolyPolygon;
rIStrm >> bHasPolyPolygon;
@@ -2518,7 +2693,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 +2704,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 +2713,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 +2722,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 +2734,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 +2774,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 +2839,7 @@ BOOL Region::ImplAddRect( const Rectangle& rRect )
mpImplRegion->mpLastCheckedBand->Union( nLeft, nRight );
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -2733,14 +2908,14 @@ void Region::ImplEndAddRect()
// -----------------------------------------------------------------------
-ULONG Region::GetRectCount() const
+sal_uLong Region::GetRectCount() const
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
((Region*)this)->ImplPolyPolyRegionToBandRegion();
#ifdef DBG_UTIL
- ULONG nCount = 0;
+ sal_uLong nCount = 0;
// all bands if not null or empty
if ( (mpImplRegion != &aImplEmptyRegion) && (mpImplRegion != &aImplNullRegion) )
@@ -2786,7 +2961,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 +2972,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 +2995,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 +3007,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 +3031,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 +3082,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 +3095,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 97e11c5a6aa4..9f2ee0924555 100755
--- 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,22 +245,37 @@ 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
{
- // mirror the bounding rect and move Region by resulting offset
- Rectangle aRect( rRgn.GetBoundRect() );
- long nWidth = aRect.GetWidth();
- long x = aRect.Left();
- long x_org = x;
+ if( rRgn.HasPolyPolygon() )
+ {
+ basegfx::B2DPolyPolygon aPolyPoly( rRgn.ConvertToB2DPolyPolygon() );
+ aPolyPoly = mirror( aPolyPoly, pOutDev, bBack );
+ rRgn = Region( aPolyPoly );
+ }
+ else
+ {
+ ImplRegionInfo aInfo;
+ bool bRegionRect;
+ Region aMirroredRegion;
+ long nX, nY, nWidth, nHeight;
- mirror( x, nWidth, pOutDev, bBack );
- rRgn.Move( x - x_org, 0 );
+ bRegionRect = rRgn.ImplGetFirstRect( aInfo, nX, nY, nWidth, nHeight );
+ while ( bRegionRect )
+ {
+ Rectangle aRect( Point(nX, nY), Size(nWidth, nHeight) );
+ mirror( aRect, pOutDev, bBack );
+ aMirroredRegion.Union( aRect );
+ bRegionRect = rRgn.ImplGetNextRect( aInfo, nX, nY, nWidth, nHeight );
+ }
+ rRgn = aMirroredRegion;
+ }
}
void SalGraphics::mirror( Rectangle& rRect, const OutputDevice *pOutDev, bool bBack ) const
@@ -358,22 +373,15 @@ basegfx::B2DPolyPolygon SalGraphics::mirror( const basegfx::B2DPolyPolygon& i_rP
// ----------------------------------------------------------------------------
-BOOL SalGraphics::UnionClipRegion( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev )
+bool SalGraphics::SetClipRegion( const Region& i_rClip, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
- mirror( nX, nWidth, pOutDev );
- return unionClipRegion( nX, nY, nWidth, nHeight );
-}
-
-bool SalGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& )
-{
- return false;
-}
-
-BOOL SalGraphics::UnionClipRegion( const ::basegfx::B2DPolyPolygon& rPoly, const OutputDevice* pOutDev )
-{
- (void)pOutDev;// TODO: SAL_LAYOUT_BIDI_RTL
- return unionClipRegion( rPoly );
+ {
+ Region aMirror( i_rClip );
+ mirror( aMirror, pOutDev );
+ return setClipRegion( aMirror );
+ }
+ return setClipRegion( i_rClip );
}
void SalGraphics::DrawPixel( long nX, long nY, const OutputDevice *pOutDev )
@@ -412,12 +420,12 @@ bool SalGraphics::drawPolyLine(
return false;
}
-void SalGraphics::DrawPolyLine( ULONG nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev )
+void SalGraphics::DrawPolyLine( sal_uLong 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;
}
@@ -425,12 +433,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_uLong 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;
}
@@ -444,10 +452,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_uLong i;
for(i=0; i<nPoly; i++)
{
- ULONG nPoints = pPoints[i];
+ sal_uLong nPoints = pPoints[i];
pPtAry2[i] = new SalPoint[ nPoints ];
mirror( nPoints, pPtAry[i], pPtAry2[i], pOutDev );
}
@@ -465,7 +473,7 @@ void SalGraphics::DrawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints,
bool SalGraphics::DrawPolyPolygon( const ::basegfx::B2DPolyPolygon& i_rPolyPolygon, double i_fTransparency, const OutputDevice* i_pOutDev )
{
bool bRet = false;
- if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
+ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (i_pOutDev && i_pOutDev->IsRTLEnabled()) )
{
basegfx::B2DPolyPolygon aMirror( mirror( i_rPolyPolygon, i_pOutDev ) );
bRet = drawPolyPolygon( aMirror, i_fTransparency );
@@ -480,13 +488,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_uLong nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry, const OutputDevice* pOutDev )
{
sal_Bool bResult = sal_False;
- if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
+ 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 );
bResult = drawPolyLineBezier( nPoints, bCopied ? pPtAry2 : pPtAry, pFlgAry );
delete [] pPtAry2;
}
@@ -495,13 +503,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_uLong nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry, const OutputDevice* pOutDev )
{
sal_Bool bResult = sal_False;
- if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
+ 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 );
bResult = drawPolygonBezier( nPoints, bCopied ? pPtAry2 : pPtAry, pFlgAry );
delete [] pPtAry2;
}
@@ -511,17 +519,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) )
+ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (i_pOutDev && i_pOutDev->IsRTLEnabled()) )
{
// TODO: optimize, reduce new/delete calls
SalPoint **pPtAry2 = new SalPoint*[i_nPoly];
- ULONG i;
+ sal_uLong i;
for(i=0; i<i_nPoly; i++)
{
- ULONG nPoints = i_pPoints[i];
+ sal_uLong nPoints = i_pPoints[i];
pPtAry2[i] = new SalPoint[ nPoints ];
mirror( nPoints, i_pPtAry[i], pPtAry2[i], i_pOutDev );
}
@@ -542,7 +550,7 @@ bool SalGraphics::DrawPolyLine( const ::basegfx::B2DPolygon& i_rPolygon, double
const OutputDevice* i_pOutDev )
{
bool bRet = false;
- if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
+ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (i_pOutDev && i_pOutDev->IsRTLEnabled()) )
{
basegfx::B2DPolygon aMirror( mirror( i_rPolygon, i_pOutDev ) );
bRet = drawPolyLine( aMirror, fTransparency, i_rLineWidth, i_eLineJoin );
@@ -555,7 +563,7 @@ bool SalGraphics::DrawPolyLine( const ::basegfx::B2DPolygon& i_rPolygon, double
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()) )
{
@@ -649,12 +657,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_uLong 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;
}
@@ -662,15 +670,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_uLong 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 Rectangle& rControlRegion,
- const Point& aPos, BOOL& rIsInside, const OutputDevice *pOutDev )
+sal_Bool SalGraphics::HitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
+ const Point& aPos, sal_Bool& rIsInside, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
@@ -719,7 +727,7 @@ void SalGraphics::mirror( ControlType , const ImplControlValue& rVal, const Outp
}
}
-BOOL SalGraphics::DrawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
+sal_Bool SalGraphics::DrawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
const OUString& aCaption, const OutputDevice *pOutDev )
{
@@ -728,7 +736,7 @@ BOOL SalGraphics::DrawNativeControl( ControlType nType, ControlPart nPart, const
Rectangle 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;
}
@@ -736,7 +744,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 Rectangle& rControlRegion,
+sal_Bool SalGraphics::DrawNativeControlText( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
const OUString& aCaption, const OutputDevice *pOutDev )
{
@@ -745,7 +753,7 @@ BOOL SalGraphics::DrawNativeControlText( ControlType nType, ControlPart nPart, c
Rectangle 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;
}
@@ -753,7 +761,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 Rectangle& rControlRegion, ControlState nState,
+sal_Bool SalGraphics::GetNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState,
const ImplControlValue& aValue, const OUString& aCaption,
Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion, const OutputDevice *pOutDev )
{
@@ -768,12 +776,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
@@ -813,7 +821,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..f77ce914fd4d 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_uLong 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_uLong 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 8aa0e47f1a35..4cbce4c5298a 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 Rectangle&,
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 Rectangle&,
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 Rectangle&,
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 Rectangle&,
ControlState,
@@ -129,6 +129,6 @@ BOOL SalGraphics::getNativeControlRegion( ControlType,
Rectangle &,
Rectangle & )
{
- 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..6d69bc67b982 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_uLong 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 601e46411cd8..4e94df4810da 100644
--- a/vcl/source/glyphs/gcach_ftyp.cxx
+++ b/vcl/source/glyphs/gcach_ftyp.cxx
@@ -407,7 +407,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_uLong* pLength ) const
{
const unsigned char* pBuffer = mpFontFile->GetBuffer();
int nFileSize = mpFontFile->GetFileSize();
@@ -430,7 +430,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_uLong nLength = GetUInt( p + 12 );
if( pLength != NULL )
*pLength = nLength;
const unsigned char* pTable = pBuffer + GetUInt( p + 8 );
@@ -1043,7 +1043,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) )
{
@@ -1486,7 +1486,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 );
@@ -1514,7 +1514,7 @@ bool FreetypeServerFont::GetGlyphBitmap1( int nGlyphIndex, RawBitmap& rRawBitmap
rRawBitmap.mnScanlineSize = rBitmapFT.pitch;
}
- const ULONG nNeededSize = rRawBitmap.mnScanlineSize * rRawBitmap.mnHeight;
+ const sal_uLong nNeededSize = rRawBitmap.mnScanlineSize * rRawBitmap.mnHeight;
if( rRawBitmap.mnAllocated < nNeededSize )
{
@@ -1540,10 +1540,10 @@ bool FreetypeServerFont::GetGlyphBitmap1( int nGlyphIndex, RawBitmap& rRawBitmap
}
unsigned char* p = rRawBitmap.mpBits;
- for( ULONG y=0; y < rRawBitmap.mnHeight; y++ )
+ for( sal_uLong y=0; y < rRawBitmap.mnHeight; y++ )
{
unsigned char nLastByte = 0;
- for( ULONG x=0; x < rRawBitmap.mnScanlineSize; x++ )
+ for( sal_uLong x=0; x < rRawBitmap.mnScanlineSize; x++ )
{
unsigned char nTmp = p[x] << 7;
p[x] |= (p[x] >> 1) | nLastByte;
@@ -1641,7 +1641,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 );
@@ -1665,7 +1665,7 @@ bool FreetypeServerFont::GetGlyphBitmap8( int nGlyphIndex, RawBitmap& rRawBitmap
}
rRawBitmap.mnScanlineSize = (rRawBitmap.mnScanlineSize + 3) & -4;
- const ULONG nNeededSize = rRawBitmap.mnScanlineSize * rRawBitmap.mnHeight;
+ const sal_uLong nNeededSize = rRawBitmap.mnScanlineSize * rRawBitmap.mnHeight;
if( rRawBitmap.mnAllocated < nNeededSize )
{
delete[] rRawBitmap.mpBits;
@@ -1705,10 +1705,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_uLong y=0; y < rRawBitmap.mnHeight; y++ )
{
unsigned char nLastByte = 0;
- for( ULONG x=0; x < rRawBitmap.mnWidth; x++ )
+ for( sal_uLong x=0; x < rRawBitmap.mnWidth; x++ )
{
unsigned char nTmp = p[x];
p[x] |= p[x] | nLastByte;
@@ -1721,9 +1721,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_uLong y=0; y < rRawBitmap.mnHeight; y++ )
{
- for( ULONG x=0; x < rRawBitmap.mnWidth; x++ )
+ for( sal_uLong x=0; x < rRawBitmap.mnWidth; x++ )
{
p[x] = aGammaTable[ p[x] ];
}
@@ -1782,7 +1782,7 @@ bool FtFontInfo::GetFontCodeRanges( CmapResult& rResult ) const
// TODO: is the full CmapResult needed on platforms calling this?
if( FT_IS_SFNT( maFaceFT ) )
{
- ULONG nLength = 0;
+ sal_uLong nLength = 0;
const unsigned char* pCmap = GetTable( "cmap", &nLength );
if( pCmap && (nLength > 0) )
if( ParseCMAP( pCmap, nLength, rResult ) )
@@ -1858,7 +1858,7 @@ int FreetypeServerFont::GetGlyphKernValue( int nGlyphLeft, int nGlyphRight ) con
// -----------------------------------------------------------------------
-ULONG FreetypeServerFont::GetKernPairs( ImplKernPairData** ppKernPairs ) const
+sal_uLong FreetypeServerFont::GetKernPairs( ImplKernPairData** ppKernPairs ) const
{
// if no kerning info is available in the font file
*ppKernPairs = NULL;
@@ -1884,7 +1884,7 @@ ULONG FreetypeServerFont::GetKernPairs( ImplKernPairData** ppKernPairs ) const
pFTActivateSize( maSizeFT );
// first figure out which glyph pairs are involved in kerning
- ULONG nKernLength = 0;
+ sal_uLong nKernLength = 0;
const FT_Byte* const pKern = mpFontInfo->GetTable( "kern", &nKernLength );
if( !pKern )
return 0;
@@ -1902,19 +1902,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_uLong 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;
@@ -1922,7 +1922,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 )
@@ -1939,21 +1939,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_uLong nPairs = (sal_uLong)(nLastLeft - nFirstLeft + 1) * (nLastRight - nFirstRight + 1);
aKernGlyphVector.reserve( aKernGlyphVector.size() + nPairs );
pTmp = pSubTable + nOfsArray;
@@ -1982,11 +1982,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_uLong 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;
@@ -1995,7 +1995,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 )
@@ -2011,20 +2011,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_uLong nPairs = (sal_uLong)(nLastLeft - nFirstLeft + 1) * (nLastRight - nFirstRight + 1);
aKernGlyphVector.reserve( aKernGlyphVector.size() + nPairs );
pTmp = pSubTable + nOfsArray;
@@ -2051,17 +2051,17 @@ ULONG FreetypeServerFont::GetKernPairs( ImplKernPairData** ppKernPairs ) const
}
// now create VCL's ImplKernPairData[] format for all glyph pairs
- ULONG nKernCount = aKernGlyphVector.size();
+ sal_uLong 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 ) );
}
@@ -2116,7 +2116,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);
@@ -2129,19 +2129,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),
@@ -2149,7 +2149,7 @@ PolyArgs::PolyArgs( PolyPolygon& rPolyPoly, USHORT nMaxPoints )
bHasOffline(false)
{
mpPointAry = new Point[ mnMaxPoints ];
- mpFlagAry = new BYTE [ mnMaxPoints ];
+ mpFlagAry = new sal_uInt8 [ mnMaxPoints ];
}
// -----------------------------------------------------------------------
@@ -2357,56 +2357,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_uLong> 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_uLong nRequestedScript = 0; //MKTAG("hani");//### TODO: where to get script?
+ sal_uLong 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_uLong 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_uLong 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_uLong 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;
@@ -2417,13 +2417,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 );
}
@@ -2432,13 +2432,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 );
}
@@ -2453,12 +2453,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_uLong 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
@@ -2473,11 +2473,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 );
}
@@ -2487,11 +2487,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 );
@@ -2500,43 +2500,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 ) );
}
@@ -2545,16 +2545,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;
@@ -2566,7 +2566,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;
@@ -2575,11 +2575,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 d760ce1d1fed..e607af2a90a8 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_uLong* pLength=0 ) const;
FT_FaceRec_* GetFaceFT();
void ReleaseFaceFT( FT_FaceRec_* );
@@ -197,9 +197,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_uLong GetKernPairs( ImplKernPairData** ) const;
- const unsigned char* GetTable( const char* pName, ULONG* pLength )
+ const unsigned char* GetTable( const char* pName, sal_uLong* 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..84f1eef2e477 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_uLong 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..f5e259d8852c 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_uLong nNewScanlineSize = 0;
+ sal_uLong nNewHeight = 0;
+ sal_uLong 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..b2ed9e891516 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_uLong 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_uLong 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_uLong 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..4e7d36a69f80 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_uLong 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 7181db56dd4d..3b4b77cb5358 100644
--- a/vcl/source/glyphs/glyphcache.cxx
+++ b/vcl/source/glyphs/glyphcache.cxx
@@ -294,9 +294,9 @@ void GlyphCache::UncacheFont( ServerFont& rServerFont )
// -----------------------------------------------------------------------
-ULONG GlyphCache::CalcByteCount() const
+sal_uLong GlyphCache::CalcByteCount() const
{
- ULONG nCacheSize = sizeof(*this);
+ sal_uLong 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 f82e3afe39c8..8507e55065f2 100644
--- a/vcl/source/glyphs/graphite_adaptors.cxx
+++ b/vcl/source/glyphs/graphite_adaptors.cxx
@@ -252,7 +252,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_uLong 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..711a985b6fe5 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_uLong redShift, sal_uLong greenShift, sal_uLong 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/strhelper.cxx b/vcl/source/helper/strhelper.cxx
index 67f50b69a182..b1da78ebbf23 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..cff1ec4a7d82 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_uLong nSolarMutexCount = Application::ReleaseSolarMutex();
+ sal_uLong 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..a0cc8c35e5e2 100644
--- a/vcl/source/helper/xconnection.cxx
+++ b/vcl/source/helper/xconnection.cxx
@@ -29,16 +29,23 @@
#include "precompiled_vcl.hxx"
#include "svsys.h"
+#include "rtl/ref.hxx"
#include "vcl/xconnection.hxx"
#include "vcl/svdata.hxx"
#include "vcl/salinst.hxx"
#include "vcl/svapp.hxx"
+namespace {
+
+namespace css = com::sun::star;
+
+}
+
namespace vcl
{
class SolarMutexReleaser
{
- ULONG mnReleased;
+ sal_uLong mnReleased;
public:
SolarMutexReleaser()
{
@@ -62,13 +69,9 @@ using namespace com::sun::star::awt;
DisplayConnection::DisplayConnection()
{
- ImplSVData* pSVData = ImplGetSVData();
- pSVData->mpDefInst->SetEventCallback( this, dispatchEvent );
- pSVData->mpDefInst->SetErrorEventCallback( this, dispatchErrorEvent );
-
SalInstance::ConnectionIdentifierType eType;
int nBytes;
- void* pBytes = pSVData->mpDefInst->GetConnectionIdentifier( eType, nBytes );
+ void* pBytes = ImplGetSVData()->mpDefInst->GetConnectionIdentifier( eType, nBytes );
switch( eType )
{
case SalInstance::AsciiCString:
@@ -81,39 +84,54 @@ DisplayConnection::DisplayConnection()
}
DisplayConnection::~DisplayConnection()
+{}
+
+void DisplayConnection::start()
+{
+ ImplSVData* pSVData = ImplGetSVData();
+ pSVData->mpDefInst->SetEventCallback( this );
+}
+
+void DisplayConnection::terminate()
{
ImplSVData* pSVData = ImplGetSVData();
if( pSVData )
{
- pSVData->mpDefInst->SetEventCallback( NULL, NULL );
- pSVData->mpDefInst->SetErrorEventCallback( NULL, NULL );
+ pSVData->mpDefInst->SetEventCallback( NULL );
}
-}
+ SolarMutexReleaser aRel;
+
+ MutexGuard aGuard( m_aMutex );
+ Any aEvent;
+ std::list< css::uno::Reference< XEventHandler > > aLocalList( m_aHandlers );
+ for( ::std::list< css::uno::Reference< XEventHandler > >::const_iterator it = aLocalList.begin(); it != aLocalList.end(); ++it )
+ (*it)->handleEvent( aEvent );
+}
-void SAL_CALL DisplayConnection::addEventHandler( const Any& /*window*/, const Reference< XEventHandler >& handler, sal_Int32 /*eventMask*/ ) throw()
+void SAL_CALL DisplayConnection::addEventHandler( const Any& /*window*/, const css::uno::Reference< XEventHandler >& handler, sal_Int32 /*eventMask*/ ) throw()
{
MutexGuard aGuard( m_aMutex );
m_aHandlers.push_back( handler );
}
-void SAL_CALL DisplayConnection::removeEventHandler( const Any& /*window*/, const Reference< XEventHandler >& handler ) throw()
+void SAL_CALL DisplayConnection::removeEventHandler( const Any& /*window*/, const css::uno::Reference< XEventHandler >& handler ) throw()
{
MutexGuard aGuard( m_aMutex );
m_aHandlers.remove( handler );
}
-void SAL_CALL DisplayConnection::addErrorHandler( const Reference< XEventHandler >& handler ) throw()
+void SAL_CALL DisplayConnection::addErrorHandler( const css::uno::Reference< XEventHandler >& handler ) throw()
{
MutexGuard aGuard( m_aMutex );
m_aErrorHandlers.push_back( handler );
}
-void SAL_CALL DisplayConnection::removeErrorHandler( const Reference< XEventHandler >& handler ) throw()
+void SAL_CALL DisplayConnection::removeErrorHandler( const css::uno::Reference< XEventHandler >& handler ) throw()
{
MutexGuard aGuard( m_aMutex );
@@ -125,52 +143,37 @@ Any SAL_CALL DisplayConnection::getIdentifier() throw()
return m_aAny;
}
-void DisplayConnection::dispatchDowningEvent()
-{
- SolarMutexReleaser aRel;
-
- MutexGuard aGuard( m_aMutex );
- Any aEvent;
- std::list< Reference< XEventHandler > > aLocalList( m_aHandlers );
- for( ::std::list< Reference< XEventHandler > >::const_iterator it = aLocalList.begin(); it != aLocalList.end(); ++it )
- (*it)->handleEvent( aEvent );
-}
-
-bool DisplayConnection::dispatchEvent( void* pThis, void* pData, int nBytes )
+bool DisplayConnection::dispatchEvent( void* pData, int nBytes )
{
SolarMutexReleaser aRel;
- DisplayConnection* This = (DisplayConnection*)pThis;
-
Sequence< sal_Int8 > aSeq( (sal_Int8*)pData, nBytes );
Any aEvent;
aEvent <<= aSeq;
- ::std::list< Reference< XEventHandler > > handlers;
+ ::std::list< css::uno::Reference< XEventHandler > > handlers;
{
- MutexGuard aGuard( This->m_aMutex );
- handlers = This->m_aHandlers;
+ MutexGuard aGuard( m_aMutex );
+ handlers = m_aHandlers;
}
- for( ::std::list< Reference< XEventHandler > >::const_iterator it = handlers.begin(); it != handlers.end(); ++it )
+ for( ::std::list< css::uno::Reference< XEventHandler > >::const_iterator it = handlers.begin(); it != handlers.end(); ++it )
if( (*it)->handleEvent( aEvent ) )
return true;
return false;
}
-bool DisplayConnection::dispatchErrorEvent( void* pThis, void* pData, int nBytes )
+bool DisplayConnection::dispatchErrorEvent( void* pData, int nBytes )
{
SolarMutexReleaser aRel;
- DisplayConnection* This = (DisplayConnection*)pThis;
-
Sequence< sal_Int8 > aSeq( (sal_Int8*)pData, nBytes );
Any aEvent;
aEvent <<= aSeq;
- ::std::list< Reference< XEventHandler > > handlers;
+ ::std::list< css::uno::Reference< XEventHandler > > handlers;
{
- MutexGuard aGuard( This->m_aMutex );
- handlers = This->m_aErrorHandlers;
+ MutexGuard aGuard( m_aMutex );
+ handlers = m_aErrorHandlers;
}
- for( ::std::list< Reference< XEventHandler > >::const_iterator it = handlers.begin(); it != handlers.end(); ++it )
+ for( ::std::list< css::uno::Reference< XEventHandler > >::const_iterator it = handlers.begin(); it != handlers.end(); ++it )
if( (*it)->handleEvent( aEvent ) )
return true;
diff --git a/vcl/source/salmain/makefile.mk b/vcl/source/salmain/makefile.mk
index de085b482c4d..9c790bf28d75 100644
--- a/vcl/source/salmain/makefile.mk
+++ b/vcl/source/salmain/makefile.mk
@@ -28,11 +28,14 @@
PRJ = ..$/..
PRJNAME = vcl
TARGET = salmain
-LIBTARGET = NO
ENABLE_EXCEPTIONS = TRUE
.INCLUDE: settings.mk
OBJFILES = $(OBJ)$/salmain.obj
+LIB1TARGET=$(LB)$/vclmain.lib
+LIB1ARCHIV=$(LB)$/libvclmain.a
+LIB1FILES=$(LB)$/salmain.lib
+
.INCLUDE: target.mk
diff --git a/vcl/source/src/makefile.mk b/vcl/source/src/makefile.mk
index 40b7d4e75dfe..161d821573b9 100644
--- a/vcl/source/src/makefile.mk
+++ b/vcl/source/src/makefile.mk
@@ -44,7 +44,8 @@ SRC1FILES= images.src \
helptext.src \
units.src \
btntext.src \
- print.src
+ print.src \
+ throbber.src \
RESLIB1NAME= $(RESTARGET)
RESLIB1IMAGES= $(PRJ)$/source/src
diff --git a/vcl/source/src/print.src b/vcl/source/src/print.src
index 04ab77f09288..f41e65f4939f 100644
--- a/vcl/source/src/print.src
+++ b/vcl/source/src/print.src
@@ -412,6 +412,14 @@ ModalDialog SV_DLG_PRINT
{
ImageBitmap = Bitmap { File = "ncollate_h.png" ; };
};
+
+ CheckBox SV_PRINT_OPT_REVERSE
+ {
+ HelpID = ".HelpID:vcl:PrintDialog:OptPage:ToReverse";
+ Pos = MAP_APPFONT( 10, 50 );
+ Size = MAP_APPFONT( 200, 12 );
+ Text [en-US] = "Print in ~reverse page order";
+ };
};
TabPage SV_PRINT_TAB_OPT
@@ -440,13 +448,6 @@ ModalDialog SV_DLG_PRINT
Size = MAP_APPFONT( 200, 12 );
Text [en-US] = "~Create single print jobs for collated output";
};
- CheckBox SV_PRINT_OPT_REVERSE
- {
- HelpID = ".HelpID:vcl:PrintDialog:OptPage:ToReverse";
- Pos = MAP_APPFONT( 10, 50 );
- Size = MAP_APPFONT( 200, 12 );
- Text [en-US] = "Print in ~reverse page order";
- };
};
};
@@ -498,3 +499,48 @@ StringArray SV_PRINT_NATIVE_STRINGS
< "Print selection only"; >;
};
};
+
+StringArray RID_STR_PAPERNAMES
+{
+ ItemList [en-US] =
+ {
+ < "A0"; >;
+ < "A1"; >;
+ < "A2"; >;
+ < "A3"; >;
+ < "A4"; >;
+ < "A5"; >;
+ < "B4 (ISO)"; >;
+ < "B5 (ISO)"; >;
+ < "Letter"; >;
+ < "Legal"; >;
+ < "Tabloid"; >;
+ < "User Defined"; >;
+ < "B6 (ISO)"; >;
+ < "C4 Envelope"; >;
+ < "C5 Envelope"; >;
+ < "C6 Envelope"; >;
+ < "C6/5 Envelope"; >;
+ < "DL Envelope"; >;
+ < "Dia Slide"; >;
+ < "Screen"; >;
+ < "C"; >;
+ < "D"; >;
+ < "E"; >;
+ < "Executive"; >;
+ < "Long Bond"; >;
+ < "#8 (Monarch) Envelope"; >;
+ < "#6 3/4 (Personal) Envelope"; >;
+ < "#9 Envelope"; >;
+ < "#10 Envelope"; >;
+ < "#11 Envelope"; >;
+ < "#12 Envelope"; >;
+ < "16 Kai"; >;
+ < "32 Kai"; >;
+ < "Big 32 Kai"; >;
+ < "B4 (JIS)"; >;
+ < "B5 (JIS)"; >;
+ < "B6 (JIS)"; >;
+ };
+};
+
diff --git a/vcl/source/src/throbber.src b/vcl/source/src/throbber.src
new file mode 100755
index 000000000000..d3c5ea44035c
--- /dev/null
+++ b/vcl/source/src/throbber.src
@@ -0,0 +1,114 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// TODO: we need a mechanism to add images to images.zip, *without*
+// referring them in resource files. The below resources are never loaded
+// at runtime, instead, the images in images.zip are accessed via
+// private:graphicrepository/* URLs.
+
+Resource 1000
+{
+ Image 1 { ImageBitmap = Bitmap{ file = "shared/spinner-16-01.png"; }; };
+ Image 2 { ImageBitmap = Bitmap{ file = "shared/spinner-16-02.png"; }; };
+ Image 3 { ImageBitmap = Bitmap{ file = "shared/spinner-16-03.png"; }; };
+ Image 4 { ImageBitmap = Bitmap{ file = "shared/spinner-16-04.png"; }; };
+ Image 5 { ImageBitmap = Bitmap{ file = "shared/spinner-16-05.png"; }; };
+ Image 6 { ImageBitmap = Bitmap{ file = "shared/spinner-16-06.png"; }; };
+};
+
+Resource 1001
+{
+ Image 1 { ImageBitmap = Bitmap{ file = "hicontrast/shared/spinner-16-01.png"; }; };
+ Image 2 { ImageBitmap = Bitmap{ file = "hicontrast/shared/spinner-16-02.png"; }; };
+ Image 3 { ImageBitmap = Bitmap{ file = "hicontrast/shared/spinner-16-03.png"; }; };
+ Image 4 { ImageBitmap = Bitmap{ file = "hicontrast/shared/spinner-16-04.png"; }; };
+ Image 5 { ImageBitmap = Bitmap{ file = "hicontrast/shared/spinner-16-05.png"; }; };
+ Image 6 { ImageBitmap = Bitmap{ file = "hicontrast/shared/spinner-16-06.png"; }; };
+};
+
+Resource 1002
+{
+ Image 1 { ImageBitmap = Bitmap{ file = "shared/spinner-32-01.png"; }; };
+ Image 2 { ImageBitmap = Bitmap{ file = "shared/spinner-32-02.png"; }; };
+ Image 3 { ImageBitmap = Bitmap{ file = "shared/spinner-32-03.png"; }; };
+ Image 4 { ImageBitmap = Bitmap{ file = "shared/spinner-32-04.png"; }; };
+ Image 5 { ImageBitmap = Bitmap{ file = "shared/spinner-32-05.png"; }; };
+ Image 6 { ImageBitmap = Bitmap{ file = "shared/spinner-32-06.png"; }; };
+ Image 7 { ImageBitmap = Bitmap{ file = "shared/spinner-32-07.png"; }; };
+ Image 8 { ImageBitmap = Bitmap{ file = "shared/spinner-32-08.png"; }; };
+ Image 9 { ImageBitmap = Bitmap{ file = "shared/spinner-32-09.png"; }; };
+ Image 10 { ImageBitmap = Bitmap{ file = "shared/spinner-32-10.png"; }; };
+ Image 11 { ImageBitmap = Bitmap{ file = "shared/spinner-32-11.png"; }; };
+ Image 12 { ImageBitmap = Bitmap{ file = "shared/spinner-32-12.png"; }; };
+};
+
+Resource 1003
+{
+ Image 1 { ImageBitmap = Bitmap{ file = "hicontrast/shared/spinner-32-01.png"; }; };
+ Image 2 { ImageBitmap = Bitmap{ file = "hicontrast/shared/spinner-32-02.png"; }; };
+ Image 3 { ImageBitmap = Bitmap{ file = "hicontrast/shared/spinner-32-03.png"; }; };
+ Image 4 { ImageBitmap = Bitmap{ file = "hicontrast/shared/spinner-32-04.png"; }; };
+ Image 5 { ImageBitmap = Bitmap{ file = "hicontrast/shared/spinner-32-05.png"; }; };
+ Image 6 { ImageBitmap = Bitmap{ file = "hicontrast/shared/spinner-32-06.png"; }; };
+ Image 7 { ImageBitmap = Bitmap{ file = "hicontrast/shared/spinner-32-07.png"; }; };
+ Image 8 { ImageBitmap = Bitmap{ file = "hicontrast/shared/spinner-32-08.png"; }; };
+ Image 9 { ImageBitmap = Bitmap{ file = "hicontrast/shared/spinner-32-09.png"; }; };
+ Image 10 { ImageBitmap = Bitmap{ file = "hicontrast/shared/spinner-32-10.png"; }; };
+ Image 11 { ImageBitmap = Bitmap{ file = "hicontrast/shared/spinner-32-11.png"; }; };
+ Image 12 { ImageBitmap = Bitmap{ file = "hicontrast/shared/spinner-32-12.png"; }; };
+};
+
+Resource 1004
+{
+ Image 1 { ImageBitmap = Bitmap{ file = "shared/spinner-64-01.png"; }; };
+ Image 2 { ImageBitmap = Bitmap{ file = "shared/spinner-64-02.png"; }; };
+ Image 3 { ImageBitmap = Bitmap{ file = "shared/spinner-64-03.png"; }; };
+ Image 4 { ImageBitmap = Bitmap{ file = "shared/spinner-64-04.png"; }; };
+ Image 5 { ImageBitmap = Bitmap{ file = "shared/spinner-64-05.png"; }; };
+ Image 6 { ImageBitmap = Bitmap{ file = "shared/spinner-64-06.png"; }; };
+ Image 7 { ImageBitmap = Bitmap{ file = "shared/spinner-64-07.png"; }; };
+ Image 8 { ImageBitmap = Bitmap{ file = "shared/spinner-64-08.png"; }; };
+ Image 9 { ImageBitmap = Bitmap{ file = "shared/spinner-64-09.png"; }; };
+ Image 10 { ImageBitmap = Bitmap{ file = "shared/spinner-64-10.png"; }; };
+ Image 11 { ImageBitmap = Bitmap{ file = "shared/spinner-64-11.png"; }; };
+ Image 12 { ImageBitmap = Bitmap{ file = "shared/spinner-64-12.png"; }; };
+};
+
+Resource 1005
+{
+ Image 1 { ImageBitmap = Bitmap{ file = "hicontrast/shared/spinner-64-01.png"; }; };
+ Image 2 { ImageBitmap = Bitmap{ file = "hicontrast/shared/spinner-64-02.png"; }; };
+ Image 3 { ImageBitmap = Bitmap{ file = "hicontrast/shared/spinner-64-03.png"; }; };
+ Image 4 { ImageBitmap = Bitmap{ file = "hicontrast/shared/spinner-64-04.png"; }; };
+ Image 5 { ImageBitmap = Bitmap{ file = "hicontrast/shared/spinner-64-05.png"; }; };
+ Image 6 { ImageBitmap = Bitmap{ file = "hicontrast/shared/spinner-64-06.png"; }; };
+ Image 7 { ImageBitmap = Bitmap{ file = "hicontrast/shared/spinner-64-07.png"; }; };
+ Image 8 { ImageBitmap = Bitmap{ file = "hicontrast/shared/spinner-64-08.png"; }; };
+ Image 9 { ImageBitmap = Bitmap{ file = "hicontrast/shared/spinner-64-09.png"; }; };
+ Image 10 { ImageBitmap = Bitmap{ file = "hicontrast/shared/spinner-64-10.png"; }; };
+ Image 11 { ImageBitmap = Bitmap{ file = "hicontrast/shared/spinner-64-11.png"; }; };
+ Image 12 { ImageBitmap = Bitmap{ file = "hicontrast/shared/spinner-64-12.png"; }; };
+};
diff --git a/vcl/source/window/accel.cxx b/vcl/source/window/accel.cxx
index 3018236fff1a..be71aa3e02e6 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_uLong nLow;
+ sal_uLong nHigh;
+ sal_uLong nMid;
+ sal_uLong 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_uLong)nIndex );
}
else
- pList->Insert( pEntry, (ULONG)nInsIndex );
+ pList->Insert( pEntry, (sal_uLong)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_uLong)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_uLong 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_uLong nObjFollows = ReadLongRes();
- for( ULONG i = 0; i < nObjFollows; i++ )
+ for( sal_uLong 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_uLong 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_uLong)nIndex );
if ( pEntry && pEntry->mnId == nItemId )
{
mpData->maKeyTable.Remove( pEntry->maKeyCode.GetFullKeyCode() );
- mpData->maIdList.Remove( (ULONG)nIndex );
+ mpData->maIdList.Remove( (sal_uLong)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_uLong)nIndex ) == pEntry )
break;
nIndex++;
}
while ( nIndex < nItemCount );
mpData->maKeyTable.Remove( rKeyCode.GetFullKeyCode() );
- mpData->maIdList.Remove( (ULONG)nIndex );
+ mpData->maIdList.Remove( (sal_uLong)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_uLong)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_uLong)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_uLong)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_uLong)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_uLong)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_uLong)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_uLong)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..6b30dd3a3c23 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_uLong)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_uLong)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_uLong)0 );
+ mpSequenceList->Insert( pNextAccel, (sal_uLong)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 2ff7d0a687e7..79454d8b1fe5 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;
@@ -1165,16 +1165,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() )
{
@@ -1197,7 +1197,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 )
@@ -1238,13 +1238,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;
@@ -1335,9 +1335,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 )
@@ -1386,7 +1386,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 )
@@ -1418,7 +1418,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;
@@ -1445,21 +1445,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 );
}
@@ -1655,7 +1655,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;
@@ -1666,7 +1666,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 )
@@ -1735,7 +1735,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;
@@ -1825,14 +1825,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
)
{
@@ -1843,44 +1843,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();
@@ -1893,13 +1893,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 )
@@ -1914,7 +1914,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 );
@@ -1923,14 +1923,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 )
{
@@ -1981,7 +1981,7 @@ void ImplBorderWindow::Draw( const Rectangle&, OutputDevice* pOutDev, const Poin
void ImplBorderWindow::Activate()
{
- SetDisplayActive( TRUE );
+ SetDisplayActive( sal_True );
Window::Activate();
}
@@ -1992,7 +1992,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();
}
@@ -2106,7 +2106,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 );
@@ -2135,7 +2135,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;
@@ -2211,7 +2211,7 @@ void ImplBorderWindow::InvalidateBorder()
// -----------------------------------------------------------------------
-void ImplBorderWindow::SetDisplayActive( BOOL bActive )
+void ImplBorderWindow::SetDisplayActive( sal_Bool bActive )
{
if ( mbDisplayActive != bActive )
{
@@ -2223,26 +2223,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();
@@ -2250,11 +2250,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 );
}
// -----------------------------------------------------------------------
@@ -2269,7 +2269,7 @@ void ImplBorderWindow::SetCloser()
// -----------------------------------------------------------------------
-void ImplBorderWindow::SetDockButton( BOOL bDockButton )
+void ImplBorderWindow::SetDockButton( sal_Bool bDockButton )
{
mbDockBtn = bDockButton;
Size aSize = GetOutputSizePixel();
@@ -2279,7 +2279,7 @@ void ImplBorderWindow::SetDockButton( BOOL bDockButton )
// -----------------------------------------------------------------------
-void ImplBorderWindow::SetHideButton( BOOL bHideButton )
+void ImplBorderWindow::SetHideButton( sal_Bool bHideButton )
{
mbHideBtn = bHideButton;
Size aSize = GetOutputSizePixel();
@@ -2289,7 +2289,7 @@ void ImplBorderWindow::SetHideButton( BOOL bHideButton )
// -----------------------------------------------------------------------
-void ImplBorderWindow::SetHelpButton( BOOL bHelpButton )
+void ImplBorderWindow::SetHelpButton( sal_Bool bHelpButton )
{
mbHelpBtn = bHelpButton;
Size aSize = GetOutputSizePixel();
@@ -2299,7 +2299,7 @@ void ImplBorderWindow::SetHelpButton( BOOL bHelpButton )
// -----------------------------------------------------------------------
-void ImplBorderWindow::SetMenuButton( BOOL bMenuButton )
+void ImplBorderWindow::SetMenuButton( sal_Bool bMenuButton )
{
mbMenuBtn = bMenuButton;
Size aSize = GetOutputSizePixel();
@@ -2326,7 +2326,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 9a0452027737..4ce3c34d65e4 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, const rtl::OString& rHelpId )
+void ButtonDialog::SetButtonHelpId( sal_uInt16 nId, const rtl::OString& rHelpId )
{
ImplBtnDlgItem* pItem = ImplGetItem( nId );
@@ -540,7 +540,7 @@ void ButtonDialog::SetButtonHelpId( USHORT nId, const rtl::OString& rHelpId )
// -----------------------------------------------------------------------
-rtl::OString ButtonDialog::GetButtonHelpId( USHORT nId ) const
+rtl::OString 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 d51988d4d5d3..b82f029370c7 100644
--- a/vcl/source/window/decoview.cxx
+++ b/vcl/source/window/decoview.cxx
@@ -443,7 +443,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,
@@ -571,16 +571,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) )
@@ -624,8 +624,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 );
@@ -636,7 +636,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();
@@ -686,7 +686,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;
@@ -735,10 +735,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;
@@ -749,7 +749,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)
@@ -758,13 +758,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) ||
@@ -773,7 +773,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 );
@@ -788,7 +788,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 )
{
@@ -818,7 +818,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 );
@@ -855,7 +855,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();
@@ -930,7 +930,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
@@ -950,7 +950,7 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect,
rStyleSettings.GetLightColor(),
rStyleSettings.GetShadowColor() );
else
- bDrawn = FALSE;
+ bDrawn = sal_False;
}
if( bDrawn )
{
@@ -967,14 +967,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() )
@@ -1003,7 +1003,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;
@@ -1216,14 +1216,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..73a3bc7eb981 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_uLong 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_uLong )
{
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 055b7e9fe80b..32fc4755a62d 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 );
@@ -1068,10 +1068,10 @@ static Window* ImplGetLabelFor( Window* pFrameWindow, WindowType nMyType, Window
{
// #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,
pLabel,
nIndex,
@@ -1085,7 +1085,7 @@ static Window* ImplGetLabelFor( Window* pFrameWindow, WindowType nMyType, Window
nAccel,
nFormStart,
nFormEnd,
- FALSE );
+ sal_False );
}
else
{
@@ -1097,7 +1097,7 @@ static Window* ImplGetLabelFor( Window* pFrameWindow, WindowType nMyType, Window
pSWindow = ::ImplGetChildWindow( pFrameWindow,
nIndex,
nIndex,
- FALSE );
+ sal_False );
if( pSWindow && pSWindow->IsVisible() && ! (pSWindow->GetStyle() & WB_NOLABEL) )
{
WindowType nType = pSWindow->GetType();
@@ -1120,11 +1120,15 @@ static Window* ImplGetLabelFor( Window* pFrameWindow, WindowType nMyType, Window
return pWindow;
}
-Window* Window::GetLabelFor() const
+Window* Window::GetAccessibleRelationLabelFor() const
{
if ( mpWindowImpl->mbDisableAccessibleLabelForRelation )
return NULL;
+ if ( mpWindowImpl->mpAccessibleInfos && mpWindowImpl->mpAccessibleInfos->pLabelForWindow )
+ return mpWindowImpl->mpAccessibleInfos->pLabelForWindow;
+
+
Window* pWindow = NULL;
Window* pFrameWindow = ImplGetFrameWindow();
@@ -1162,7 +1166,7 @@ static Window* ImplGetLabeledBy( Window* pFrameWindow, WindowType nMyType, Windo
// 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,
pLabeled,
nIndex,
@@ -1177,13 +1181,13 @@ static Window* ImplGetLabeledBy( Window* pFrameWindow, WindowType nMyType, Windo
{
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();
@@ -1205,11 +1209,14 @@ static Window* ImplGetLabeledBy( Window* pFrameWindow, WindowType nMyType, Windo
return pWindow;
}
-Window* Window::GetLabeledBy() const
+Window* Window::GetAccessibleRelationLabeledBy() const
{
if ( mpWindowImpl->mbDisableAccessibleLabeledByRelation )
return NULL;
+ if ( mpWindowImpl->mpAccessibleInfos && mpWindowImpl->mpAccessibleInfos->pLabeledByWindow )
+ return mpWindowImpl->mpAccessibleInfos->pLabeledByWindow;
+
Window* pWindow = NULL;
Window* pFrameWindow = ImplGetFrameWindow();
@@ -1238,6 +1245,62 @@ Window* Window::GetLabeledBy() const
return pWindow;
}
+Window* Window::GetAccessibleRelationMemberOf() const
+{
+ Window* pWindow = NULL;
+ Window* pFrameWindow = GetParent();
+ if ( !pFrameWindow )
+ {
+ pFrameWindow = ImplGetFrameWindow();
+ }
+ // if( ! ( GetType() == WINDOW_FIXEDTEXT ||
+ if( !( GetType() == WINDOW_FIXEDLINE ||
+ GetType() == WINDOW_GROUPBOX ) )
+ {
+ // search for a control that makes member of this window
+ // it is considered the last fixed line or group box
+ // that comes before this control; with the exception of push buttons
+ // which are labeled only if the fixed line or group box
+ // is directly before the control
+ // get form start and form end and index of this control
+ sal_uInt16 nIndex, nFormStart, nFormEnd;
+ Window* pSWindow = ::ImplFindDlgCtrlWindow( pFrameWindow,
+ const_cast<Window*>(this),
+ nIndex,
+ nFormStart,
+ nFormEnd );
+ if( pSWindow && nIndex != nFormStart )
+ {
+ if( GetType() == WINDOW_PUSHBUTTON ||
+ GetType() == WINDOW_HELPBUTTON ||
+ GetType() == WINDOW_OKBUTTON ||
+ GetType() == WINDOW_CANCELBUTTON )
+ {
+ nFormStart = nIndex-1;
+ }
+ for( sal_uInt16 nSearchIndex = nIndex-1; nSearchIndex >= nFormStart; nSearchIndex-- )
+ {
+ sal_uInt16 nFoundIndex = 0;
+ pSWindow = ::ImplGetChildWindow( pFrameWindow,
+ nSearchIndex,
+ nFoundIndex,
+ sal_False );
+ if( pSWindow && pSWindow->IsVisible() &&
+ ( pSWindow->GetType() == WINDOW_FIXEDLINE ||
+ pSWindow->GetType() == WINDOW_GROUPBOX ) )
+ {
+ pWindow = pSWindow;
+ break;
+ }
+ if( nFoundIndex > nSearchIndex || nSearchIndex == 0 )
+ break;
+ }
+ }
+ }
+ return pWindow;
+}
+//-----IAccessibility2 Implementation 2009
+
// -----------------------------------------------------------------------
KeyEvent Window::GetActivationKey() const
@@ -1247,20 +1310,24 @@ KeyEvent Window::GetActivationKey() const
sal_Unicode nAccel = getAccel( GetText() );
if( ! nAccel )
{
- Window* pWindow = GetLabeledBy();
+ Window* pWindow = GetAccessibleRelationLabeledBy();
if( pWindow )
nAccel = getAccel( pWindow->GetText() );
}
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 );
+ else if( nAccel == '.' )
+ nCode = KEY_POINT;
+ else if( nAccel == '-' )
+ nCode = KEY_SUBTRACT;
+ 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 9ea407e52ee3..6c8519b68a1e 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 ) )
{
ToolbarValue aControlValue;
@@ -158,7 +158,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
- aControlValue.mbIsTopDockingArea = TRUE;
+ aControlValue.mbIsTopDockingArea = sal_True;
}
ControlState nState = CTRL_STATE_ENABLED;
@@ -172,8 +172,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() )
@@ -197,8 +197,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..c59cb4da5dc8 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_uLong mnLastTicks;
Timer maDockTimer;
Timer maEndDockTimer;
Point maDockPos;
Rectangle maDockRect;
- BOOL mbInMove;
- ULONG mnLastUserEvent;
+ sal_Bool mbInMove;
+ sal_uLong 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_uLong 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_uLong 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_uLong 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..eb16832e5c00 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_uLong mnLastTicks;
Timer maDockTimer;
Point maDockPos;
Rectangle maDockRect;
- BOOL mbInMove;
- ULONG mnLastUserEvent;
+ sal_Bool mbInMove;
+ sal_uLong 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_uLong 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_uLong 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..170fcbd65cee 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_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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_uLong 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..968c72abd383 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_uLong nKeyCode = pResMgr->ReadLong();
+ sal_uLong nModifier = pResMgr->ReadLong();
+ sal_uLong 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 5909ab9f8489..dda796ba41e4 100755
--- 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;
};
}
@@ -105,32 +105,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_uLong 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;
@@ -143,12 +143,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
@@ -159,14 +159,14 @@ struct MenuItemData
XubString aCommandStr; // CommandString
XubString aHelpCommandStr; // Help command string (to reference external help)
rtl::OString aHelpId; // Help-Id
- ULONG nUserValue; // User value
+ sal_uLong 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
@@ -211,22 +211,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_uLong 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;
};
@@ -235,17 +235,17 @@ public:
MenuItemList::~MenuItemList()
{
- for ( ULONG n = Count(); n; )
+ for ( sal_uLong 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->pSubMenu = NULL;
pData->pAutoSubMenu = NULL;
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;
@@ -285,11 +285,11 @@ void MenuItemList::InsertSeparator( USHORT nPos )
pData->pSubMenu = NULL;
pData->pAutoSubMenu = NULL;
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;
@@ -306,14 +306,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_uLong)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 );
@@ -329,11 +329,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
@@ -366,7 +366,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;
@@ -390,13 +390,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 ) )
@@ -406,7 +406,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
@@ -415,13 +415,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;
@@ -463,21 +463,21 @@ private:
Timer aHighlightChangedTimer;
Timer aSubmenuCloseTimer;
Timer aScrollTimer;
- ULONG nSaveFocusId;
+ sal_uLong 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* );
@@ -488,16 +488,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 );
@@ -514,27 +514,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_uLong nId ) { nSaveFocusId = nId; }
+ sal_uLong 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_uLong 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();
};
@@ -606,10 +606,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 ) );
}
}
@@ -671,7 +671,7 @@ class MenuBarWindow : public Window
private:
struct AddButtonEntry
{
- USHORT m_nId;
+ sal_uInt16 m_nId;
Link m_aSelectLink;
Link m_aHighlightLink;
@@ -680,25 +680,25 @@ private:
Menu* pMenu;
PopupMenu* pActivePopup;
- USHORT nHighlightedItem;
- ULONG nSaveFocusId;
- BOOL mbAutoPopup;
- BOOL bIgnoreFirstMove;
- BOOL bStayActive;
+ sal_uInt16 nHighlightedItem;
+ sal_uLong 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();
@@ -717,7 +717,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 );
@@ -727,26 +727,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_uLong nId ) { nSaveFocusId = nId; }
+ sal_uLong 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 )
@@ -776,24 +776,24 @@ static void ImplSetMenuItemData( MenuItemData* pData )
pData->eType = MENUITEM_STRINGIMAGE;
}
-static ULONG ImplChangeTipTimeout( ULONG nTimeout, Window *pWindow )
+static sal_uLong ImplChangeTipTimeout( sal_uLong nTimeout, Window *pWindow )
{
AllSettings aAllSettings( pWindow->GetSettings() );
HelpSettings aHelpSettings( aAllSettings.GetHelpSettings() );
- ULONG nRet = aHelpSettings.GetTipTimeout();
+ sal_uLong 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 )
{
@@ -816,23 +816,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_uLong 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_uLong 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) )
{
@@ -852,7 +852,7 @@ static BOOL ImplHandleHelpEvent( Window* pMenuWindow, Menu* pMenu, USHORT nHighl
else
pHelp->Start( rtl::OStringToOUString( aHelpId, RTL_TEXTENCODING_UTF8 ), NULL );
}
- bDone = TRUE;
+ bDone = sal_True;
}
return bDone;
}
@@ -862,7 +862,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;
@@ -876,7 +876,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();
}
@@ -895,13 +895,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;
@@ -945,7 +945,7 @@ Menu::~Menu()
pDelData = pDelData->mpNext;
}
- bKilled = TRUE;
+ bKilled = sal_True;
delete pItemList;
delete pLogo;
@@ -966,16 +966,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;
mpFirstDel = NULL; // Dtor notification list
// Native-support: returns NULL if not supported
@@ -996,13 +996,13 @@ void Menu::ImplLoadRes( const ResId& rResId )
rResId.SetRT( RSC_MENU );
GetRes( rResId );
- ULONG nObjMask = ReadLongRes();
+ sal_uLong nObjMask = ReadLongRes();
if( nObjMask & RSC_MENU_ITEMS )
{
- ULONG nObjFollows = ReadLongRes();
+ sal_uLong nObjFollows = ReadLongRes();
// MenuItems einfuegen
- for( ULONG i = 0; i < nObjFollows; i++ )
+ for( sal_uLong i = 0; i < nObjFollows; i++ )
{
InsertItem( ResId( (RSHEADER_TYPE*)GetClassRes(), *pMgr ) );
IncrementRes( GetObjSizeRes( (RSHEADER_TYPE*)GetClassRes() ) );
@@ -1017,13 +1017,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_uLong n;
for ( n = 0; n < pItemList->Count(); n++ )
{
MenuItemData* pData = pItemList->GetDataFromPos(n);
@@ -1040,7 +1040,7 @@ void Menu::CreateAutoMnemonics()
void Menu::Activate()
{
- bInCallback = TRUE;
+ bInCallback = sal_True;
ImplMenuDelData aDelData( this );
@@ -1055,27 +1055,27 @@ void Menu::Activate()
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;
ImplMenuDelData aDelData( this );
@@ -1090,9 +1090,9 @@ void Menu::Deactivate()
{
if ( pStartMenu && ( pStartMenu != this ) )
{
- pStartMenu->bInCallback = TRUE;
+ pStartMenu->bInCallback = sal_True;
pStartMenu->aDeactivateHdl.Call( this );
- pStartMenu->bInCallback = FALSE;
+ pStartMenu->bInCallback = sal_False;
}
}
}
@@ -1100,7 +1100,7 @@ void Menu::Deactivate()
if( !aDelData.isDeleted() )
{
- bInCallback = FALSE;
+ bInCallback = sal_False;
if ( this == pStartMenu )
GetpApp()->HideHelpStatusText();
@@ -1127,11 +1127,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 );
@@ -1177,7 +1177,7 @@ void Menu::RequestHelp( const HelpEvent& )
{
}
-void Menu::ImplCallEventListeners( ULONG nEvent, USHORT nPos )
+void Menu::ImplCallEventListeners( sal_uLong nEvent, sal_uInt16 nPos )
{
ImplMenuDelData aDelData( this );
@@ -1232,14 +1232,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
@@ -1261,39 +1261,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_uLong 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 )
@@ -1348,12 +1348,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 )
{
@@ -1380,21 +1380,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 );
@@ -1404,9 +1404,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() )
{
@@ -1415,7 +1415,7 @@ void Menu::RemoveItem( USHORT nPos )
ImplGetSalMenu()->RemoveItem( nPos );
pItemList->Remove( nPos );
- bRemove = TRUE;
+ bRemove = sal_True;
}
Window* pWin = ImplGetWindow();
@@ -1431,8 +1431,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 );
@@ -1443,7 +1443,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" );
@@ -1458,9 +1458,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->aHelpId );
pThis->SetHelpText( nId, pData->aHelpText );
pThis->SetAccelKey( nId, pData->aAccelKey );
@@ -1483,26 +1483,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++;
@@ -1510,9 +1510,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;
@@ -1520,9 +1520,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;
@@ -1530,9 +1530,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;
@@ -1540,7 +1540,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 );
@@ -1550,9 +1550,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 )
@@ -1561,7 +1561,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 );
@@ -1571,19 +1571,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 );
@@ -1592,22 +1592,22 @@ MenuItemBits Menu::GetItemBits( USHORT nItemId ) const
return nBits;
}
-void Menu::SetUserValue( USHORT nItemId, ULONG nValue )
+void Menu::SetUserValue( sal_uInt16 nItemId, sal_uLong nValue )
{
MenuItemData* pData = pItemList->GetData( nItemId );
if ( pData )
pData->nUserValue = nValue;
}
-ULONG Menu::GetUserValue( USHORT nItemId ) const
+sal_uLong 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
@@ -1637,7 +1637,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 );
@@ -1647,9 +1647,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 )
@@ -1665,7 +1665,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 );
@@ -1675,16 +1675,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');
@@ -1700,9 +1700,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 )
@@ -1713,9 +1713,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 )
@@ -1725,8 +1725,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;
}
}
@@ -1745,7 +1745,7 @@ void Menu::CheckItem( USHORT nItemId, BOOL bCheck )
{
if ( IsItemChecked( pGroupData->nId ) )
{
- CheckItem( pGroupData->nId, FALSE );
+ CheckItem( pGroupData->nId, sal_False );
break;
}
}
@@ -1765,20 +1765,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 ) )
@@ -1790,8 +1790,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_uLong nCount = pItemList->Count();
+ for ( sal_uLong n = 0; n < nCount; n++ )
{
MenuItemData* pData = pItemList->GetDataFromPos( n );
if ( n == nPos )
@@ -1810,20 +1810,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!" );
@@ -1845,9 +1845,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 )
@@ -1874,9 +1874,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 )
@@ -1885,9 +1885,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 )
@@ -1911,9 +1911,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 )
@@ -1938,9 +1938,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 )
@@ -1956,7 +1956,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 );
@@ -1966,7 +1966,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 );
@@ -1976,17 +1976,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 );
@@ -1994,7 +1994,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 );
@@ -2004,7 +2004,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 );
@@ -2012,7 +2012,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 );
@@ -2022,7 +2022,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 );
@@ -2030,7 +2030,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 );
@@ -2056,12 +2056,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 );
@@ -2069,7 +2069,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 );
@@ -2079,7 +2079,7 @@ const XubString& Menu::GetTipHelpText( USHORT nItemId ) const
return ImplGetSVEmptyStr();
}
-void Menu::SetHelpId( USHORT nItemId, const rtl::OString& rHelpId )
+void Menu::SetHelpId( sal_uInt16 nItemId, const rtl::OString& rHelpId )
{
MenuItemData* pData = pItemList->GetData( nItemId );
@@ -2087,7 +2087,7 @@ void Menu::SetHelpId( USHORT nItemId, const rtl::OString& rHelpId )
pData->aHelpId = rHelpId;
}
-rtl::OString Menu::GetHelpId( USHORT nItemId ) const
+rtl::OString Menu::GetHelpId( sal_uInt16 nItemId ) const
{
rtl::OString aRet;
@@ -2110,8 +2110,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;
@@ -2125,24 +2125,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++ )
@@ -2155,10 +2155,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 )
{
@@ -2172,7 +2172,7 @@ BOOL Menu::ImplIsVisible( USHORT nPos ) const
}
}
if( n == 0 ) // no previous visible item
- bVisible = FALSE;
+ bVisible = sal_False;
}
}
}
@@ -2183,10 +2183,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.
}
}
@@ -2194,34 +2194,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 );
@@ -2372,7 +2372,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 )))
@@ -2387,7 +2387,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 );
@@ -2495,8 +2495,8 @@ Size Menu::ImplCalcSize( Window* pWin )
if( nMaxWidth > nScreenWidth/2 )
nMaxWidth = nScreenWidth/2;
- 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;
@@ -2506,12 +2506,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;
@@ -2524,7 +2524,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
@@ -2566,7 +2566,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;
@@ -2584,7 +2584,7 @@ static void ImplPaintCheckBackground( Window* i_pWindow, const Rectangle& i_rRec
{
const StyleSettings& rSettings = i_pWindow->GetSettings().GetStyleSettings();
Color aColor( i_bHighlight ? rSettings.GetMenuHighlightTextColor() : rSettings.GetHighlightColor() );
- i_pWindow->DrawSelectionBackground( i_rRect, 0, i_bHighlight, TRUE, FALSE, 2, NULL, &aColor );
+ i_pWindow->DrawSelectionBackground( i_rRect, 0, i_bHighlight, sal_True, sal_False, 2, NULL, &aColor );
}
}
@@ -2608,7 +2608,7 @@ static String getShortenedString( const String& i_rLong, Window* i_pWin, long i_
return aNonMnem;
}
-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();
@@ -2634,10 +2634,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 ) ) )
@@ -2654,9 +2654,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
@@ -2797,7 +2797,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;
@@ -2931,7 +2931,7 @@ Menu* Menu::ImplGetStartMenu()
return pStart;
}
-void Menu::ImplCallHighlight( USHORT nHighlightedItem )
+void Menu::ImplCallHighlight( sal_uInt16 nHighlightedItem )
{
ImplMenuDelData aDelData( this );
@@ -2959,7 +2959,7 @@ Menu* Menu::ImplFindSelectMenu()
{
Menu* pSelMenu = nEventId ? this : NULL;
- for ( ULONG n = GetItemList()->Count(); n && !pSelMenu; )
+ for ( sal_uLong n = GetItemList()->Count(); n && !pSelMenu; )
{
MenuItemData* pData = GetItemList()->GetDataFromPos( --n );
@@ -2970,11 +2970,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_uLong n = GetItemList()->Count(); n && !pSelMenu; )
{
MenuItemData* pData = GetItemList()->GetDataFromPos( --n );
@@ -2987,25 +2987,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 )
@@ -3014,7 +3014,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 );
@@ -3022,19 +3022,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;
@@ -3072,12 +3072,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 );
}
}
}
@@ -3089,7 +3089,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 )
@@ -3109,7 +3109,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;
@@ -3147,7 +3147,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();
@@ -3159,9 +3159,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() ) )
@@ -3169,19 +3169,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;
@@ -3189,16 +3189,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 ) )
@@ -3208,7 +3208,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 );
@@ -3218,7 +3218,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 );
@@ -3226,7 +3226,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 );
@@ -3243,19 +3243,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;
@@ -3270,19 +3270,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 );
}
}
}
@@ -3291,54 +3291,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) ||
@@ -3352,7 +3352,7 @@ void MenuBar::ShowButtons( BOOL bClose, BOOL bFloat, BOOL bHide )
}
}
-void MenuBar::SetDisplayable( BOOL bDisplayable )
+void MenuBar::SetDisplayable( sal_Bool bDisplayable )
{
if( bDisplayable != mbDisplayable )
{
@@ -3383,7 +3383,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 )
@@ -3394,9 +3394,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() ||
@@ -3412,7 +3412,7 @@ BOOL MenuBar::ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu )
// -----------------------------------------------------------------------
-void MenuBar::SelectEntry( USHORT nId )
+void MenuBar::SelectEntry( sal_uInt16 nId )
{
MenuBarWindow* pMenuWin = (MenuBarWindow*) ImplGetWindow();
@@ -3422,14 +3422,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 );
}
}
@@ -3437,38 +3437,38 @@ 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 )
{
ImplMenuDelData aDelData( this );
pMenu->pStartedFrom = (Menu*)this;
- pMenu->bInCallback = TRUE;
+ pMenu->bInCallback = sal_True;
pMenu->Activate();
if( !aDelData.isDeleted() )
- 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 )
{
ImplMenuDelData aDelData( this );
pMenu->pStartedFrom = (Menu*)this;
- pMenu->bInCallback = TRUE;
+ pMenu->bInCallback = sal_True;
pMenu->Deactivate();
if( !aDelData.isDeleted() )
- 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 );
@@ -3486,13 +3486,13 @@ BOOL MenuBar::HandleMenuHighlightEvent( Menu *pMenu, USHORT 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 );
@@ -3501,47 +3501,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()
{
@@ -3566,9 +3566,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()
@@ -3577,22 +3577,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 );
}
@@ -3600,7 +3600,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 );
@@ -3609,27 +3609,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_uLong nPopupModeFlags = 0;
if ( nFlags & POPUPMENU_EXECUTE_DOWN )
nPopupModeFlags = FLOATWIN_POPUPMODE_DOWN;
else if ( nFlags & POPUPMENU_EXECUTE_UP )
@@ -3644,10 +3644,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_uLong nPopupModeFlags, Menu* pSFrom, sal_Bool bPreSelectFirst )
{
if ( !pSFrom && ( PopupMenu::IsInExecute() || !GetItemCount() ) )
return 0;
@@ -3658,15 +3658,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_uLong 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
{
@@ -3693,9 +3693,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
@@ -3721,7 +3721,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();
@@ -3730,7 +3730,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 ) )
@@ -3765,9 +3765,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 );
}
@@ -3796,7 +3796,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
@@ -3808,14 +3808,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;
}
}
@@ -3845,7 +3845,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 );
@@ -3876,18 +3876,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 ) )
{
@@ -3904,14 +3904,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();
@@ -3925,7 +3925,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();
@@ -3942,7 +3942,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 );
}
}
@@ -3967,12 +3967,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;
@@ -3980,13 +3980,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 ) );
@@ -4012,7 +4012,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 );
@@ -4023,7 +4023,7 @@ void MenuFloatingWindow::doShutdown()
{
MenuFloatingWindow* pPWin = (MenuFloatingWindow*)pMenu->pStartedFrom->ImplGetWindow();
if( pPWin )
- pPWin->HighlightItem( i, FALSE );
+ pPWin->HighlightItem( i, sal_False );
}
}
@@ -4059,13 +4059,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;
@@ -4095,7 +4095,7 @@ void MenuFloatingWindow::ImplInitClipRegion()
}
}
-void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, BOOL bMBDown )
+void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, sal_Bool bMBDown )
{
if( ! pMenu )
return;
@@ -4105,10 +4105,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 ) )
{
@@ -4117,7 +4117,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...
@@ -4130,10 +4130,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 );
@@ -4151,7 +4151,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 )
{
@@ -4159,17 +4159,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 );
}
}
@@ -4183,12 +4183,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
{
@@ -4238,7 +4238,7 @@ IMPL_LINK( MenuFloatingWindow, HighlightChanged, Timer*, pTimer )
{
if ( pActivePopup && ( pActivePopup != pItemData->pSubMenu ) )
{
- ULONG nOldFlags = GetPopupModeFlags();
+ sal_uLong nOldFlags = GetPopupModeFlags();
SetPopupModeFlags( GetPopupModeFlags() | FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE );
KillActivePopup();
SetPopupModeFlags( nOldFlags );
@@ -4248,7 +4248,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_uLong n = 0; n < nHighlightedItem; n++ )
{
pData = pMenu->pItemList->GetDataFromPos( n );
nY += pData->aSz.Height();
@@ -4279,9 +4279,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_uLong 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...
@@ -4316,11 +4316,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();
}
@@ -4330,8 +4330,8 @@ void MenuFloatingWindow::Execute()
pSVData->maAppData.mpActivePopupMenu = (PopupMenu*)pMenu;
- bInExecute = TRUE;
-// bCallingSelect = FALSE;
+ bInExecute = sal_True;
+// bCallingSelect = sal_False;
while ( bInExecute )
Application::Yield();
@@ -4342,24 +4342,24 @@ void MenuFloatingWindow::Execute()
// Application::Yield();
}
-void MenuFloatingWindow::StopExecute( ULONG nFocusId )
+void MenuFloatingWindow::StopExecute( sal_uLong 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();
@@ -4377,15 +4377,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();
@@ -4401,14 +4401,14 @@ void MenuFloatingWindow::KillActivePopup( PopupMenu* pThisOnly )
void MenuFloatingWindow::EndExecute()
{
Menu* pStart = pMenu ? pMenu->ImplGetStartMenu() : NULL;
- ULONG nFocusId = 0;
+ sal_uLong 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;
}
}
@@ -4425,7 +4425,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 );
@@ -4443,9 +4443,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
@@ -4462,7 +4462,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;
}
@@ -4472,7 +4472,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 ) )
{
@@ -4510,7 +4510,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
@@ -4525,13 +4525,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();
@@ -4539,7 +4539,7 @@ void MenuFloatingWindow::ImplScroll( BOOL bUp )
if( ! pMenu )
return;
- HighlightItem( nHighlightedItem, FALSE );
+ HighlightItem( nHighlightedItem, sal_False );
pMenu->ImplKillLayoutData();
@@ -4554,17 +4554,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 )
{
@@ -4576,24 +4576,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 )
@@ -4606,12 +4606,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 );
}
@@ -4633,7 +4633,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.
@@ -4648,11 +4648,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 )
{
@@ -4660,7 +4660,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 );
@@ -4672,12 +4672,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
@@ -4696,7 +4696,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;
@@ -4712,8 +4712,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 )
@@ -4721,7 +4721,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;
@@ -4748,7 +4748,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,
aItemRect,
CTRL_STATE_SELECTED | ( pData->bEnabled? CTRL_STATE_ENABLED: 0 ),
aVal,
@@ -4772,7 +4772,7 @@ void MenuFloatingWindow::HighlightItem( USHORT nPos, BOOL bHighlight )
SetFillColor();
oldLineColor = GetLineColor();
SetLineColor( GetSettings().GetStyleSettings().GetMenuHighlightColor() );
- bRestoreLineColor = TRUE;
+ bRestoreLineColor = sal_True;
}
}
else
@@ -4791,7 +4791,7 @@ void MenuFloatingWindow::HighlightItem( USHORT nPos, BOOL bHighlight )
}
}
-Rectangle MenuFloatingWindow::ImplGetItemRect( USHORT nPos )
+Rectangle MenuFloatingWindow::ImplGetItemRect( sal_uInt16 nPos )
{
if( ! pMenu )
return Rectangle();
@@ -4805,8 +4805,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 )
@@ -4829,14 +4829,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 )
@@ -4845,7 +4845,7 @@ void MenuFloatingWindow::ImplCursorUpDown( BOOL bUp, BOOL bHomeEnd )
n = pMenu->GetItemCount()-1;
}
- USHORT nLoop = n;
+ sal_uInt16 nLoop = n;
if( bHomeEnd )
{
@@ -4857,7 +4857,7 @@ void MenuFloatingWindow::ImplCursorUpDown( BOOL bUp, BOOL bHomeEnd )
}
else
{
- n = (USHORT)-1;
+ n = (sal_uInt16)-1;
nLoop = n+1;
}
}
@@ -4893,21 +4893,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 );
@@ -4918,8 +4918,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:
@@ -4931,7 +4931,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:
@@ -4987,14 +4987,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 )
@@ -5042,14 +5042,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
@@ -5071,7 +5071,7 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent )
if ( !aDelData.IsDelete() )
{
ImplRemoveDel( &aDelData );
- bKeyInput = FALSE;
+ bKeyInput = sal_False;
}
}
@@ -5096,16 +5096,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;
@@ -5120,7 +5120,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;
@@ -5131,7 +5131,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;
@@ -5155,7 +5155,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();
}
}
@@ -5169,7 +5169,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();
}
}
@@ -5209,10 +5209,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();
@@ -5226,7 +5226,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,
@@ -5260,7 +5260,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() );
@@ -5280,7 +5280,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() );
@@ -5308,7 +5308,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;
@@ -5334,10 +5334,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 );
@@ -5367,12 +5367,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();
@@ -5382,7 +5382,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_uLong n = 0; n < nHighlightedItem; n++ )
{
pData = pMenu->GetItemList()->GetDataFromPos( n );
nX += pData->aSz.Width();
@@ -5429,11 +5429,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() )
{
@@ -5451,22 +5451,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 );
}
}
@@ -5482,20 +5482,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;
@@ -5506,21 +5506,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
@@ -5536,21 +5536,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_uLong nTempFocusId = nSaveFocusId;
nSaveFocusId = 0;
Window::EndSaveFocus( nTempFocusId, bAllowRestoreFocus );
// #105406# restore focus to document if we could not save focus before
@@ -5561,13 +5561,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 )
@@ -5578,14 +5578,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_uLong nCount = pMenu->pItemList->Count();
+ for ( sal_uLong n = 0; n < nCount; n++ )
{
MenuItemData* pData = pMenu->pItemList->GetDataFromPos( n );
if ( n == nPos )
@@ -5656,14 +5656,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_uLong nCount = pMenu->pItemList->Count();
+ for ( sal_uLong n = 0; n < nCount; n++ )
{
MenuItemData* pData = pMenu->pItemList->GetDataFromPos( n );
if ( n == nPos )
@@ -5686,16 +5686,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() )
{
@@ -5704,7 +5704,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;
}
}
@@ -5713,22 +5713,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)
@@ -5748,10 +5748,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; }
@@ -5774,14 +5774,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 )
{
@@ -5789,36 +5789,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() )
{
@@ -5826,7 +5826,7 @@ BOOL MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu
GrabFocusToDocument();
}
- bDone = TRUE;
+ bDone = sal_True;
}
}
@@ -5835,19 +5835,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();
}
@@ -5882,7 +5882,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) &&
@@ -5934,20 +5934,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;
}
}
}
@@ -5956,9 +5956,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 ) )
@@ -5972,7 +5972,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 )
@@ -5984,7 +5984,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();
@@ -6036,16 +6036,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 );
}
}
@@ -6059,13 +6059,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++;
@@ -6088,14 +6088,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() )
@@ -6120,9 +6120,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();
@@ -6132,9 +6132,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;
@@ -6143,7 +6143,7 @@ bool MenuBarWindow::HandleMenuButtonEvent( USHORT i_nButtonId )
aArg.pMenuBar = dynamic_cast<MenuBar*>(pMenu);
return it->second.m_aSelectLink.Call( &aArg );
}
- return FALSE;
+ return sal_False;
}
ImplMenuDelData::ImplMenuDelData( const Menu* pMenu )
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 d00d569883d5..6e0c109a564d 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,15 +192,15 @@ 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();
+ sal_uInt16 nHiButtons = ReadShortRes();
+ sal_uInt16 nLoButtons = ReadShortRes();
+ sal_uInt16 nHiDefButton = ReadShortRes();
+ sal_uInt16 nLoDefButton = ReadShortRes();
rtl::OString aHelpId( ReadByteStringRes() );
- /* USHORT bSysModal = */ ReadShortRes();
+ /* sal_uInt16 bSysModal = */ ReadShortRes();
SetHelpId( aHelpId );
- WinBits nBits = (((ULONG)nHiButtons << 16) + nLoButtons) |
- (((ULONG)nHiDefButton << 16) + nLoDefButton);
+ WinBits nBits = (((sal_uLong)nHiButtons << 16) + nLoButtons) |
+ (((sal_uLong)nHiDefButton << 16) + nLoDefButton);
ImplInit( pParent, nBits | WB_MOVEABLE | WB_HORZ | WB_CENTER );
ImplLoadRes( rResId );
@@ -237,7 +237,7 @@ void MessBox::ImplPosControls()
if ( !mbHelpBtn )
{
AddButton( BUTTON_HELP, BUTTONID_HELP, BUTTONDIALOG_HELPBUTTON, 3 );
- mbHelpBtn = TRUE;
+ mbHelpBtn = sal_True;
}
}
else
@@ -245,7 +245,7 @@ void MessBox::ImplPosControls()
if ( mbHelpBtn )
{
RemoveButton( BUTTONID_HELP );
- mbHelpBtn = FALSE;
+ mbHelpBtn = sal_False;
}
}
@@ -263,7 +263,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;
@@ -282,7 +282,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 );
@@ -422,6 +422,8 @@ void MessBox::ImplPosControls()
}
mpFixedText = new FixedText( this, nWinStyle );
+ if( mpFixedText->GetStyle() & WB_EXTRAOFFSET ) // TODO: use CalcMinimumSize() instead
+ aFixedSize.Width() += 2;
mpFixedText->SetPosSizePixel( aTextPos, aFixedSize );
mpFixedText->SetText( aMessText );
mpFixedText->Show();
@@ -443,14 +445,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;
@@ -467,15 +469,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;
}
// -----------------------------------------------------------------------
@@ -498,7 +500,7 @@ void InfoBox::ImplInitInfoBoxData()
SetImage( GetSettings().GetStyleSettings().GetHighContrastMode() ?
InfoBox::GetStandardImageHC() : InfoBox::GetStandardImage() );
- mnSoundType = ((USHORT)SOUND_INFO)+1;
+ mnSoundType = ((sal_uInt16)SOUND_INFO)+1;
}
// -----------------------------------------------------------------------
@@ -542,7 +544,7 @@ void WarningBox::ImplInitWarningBoxData()
SetText( Application::GetDisplayName() );
SetImage( WarningBox::GetStandardImage() );
- mnSoundType = ((USHORT)SOUND_WARNING)+1;
+ mnSoundType = ((sal_uInt16)SOUND_WARNING)+1;
}
// -----------------------------------------------------------------------
@@ -589,7 +591,7 @@ void ErrorBox::ImplInitErrorBoxData()
SetImage( GetSettings().GetStyleSettings().GetHighContrastMode() ?
ErrorBox::GetStandardImageHC() : ErrorBox::GetStandardImage() );
- mnSoundType = ((USHORT)SOUND_ERROR)+1;
+ mnSoundType = ((sal_uInt16)SOUND_ERROR)+1;
}
// -----------------------------------------------------------------------
@@ -635,7 +637,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 574cef4e5a07..5569759a3fff 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -69,7 +69,7 @@ PrintDialog::PrintPreviewWindow::PrintPreviewWindow( Window* i_pParent, const Re
, maHorzDim( this, WB_HORZ | WB_CENTER )
, maVertDim( this, WB_VERT | WB_VCENTER )
{
- SetPaintTransparent( TRUE );
+ SetPaintTransparent( sal_True );
SetBackground();
if( useHCColorReplacement() )
maPageVDev.SetBackground( GetSettings().GetStyleSettings().GetWindowColor() );
@@ -210,7 +210,7 @@ void PrintDialog::PrintPreviewWindow::Resize()
fZoom /= 2.0;
}
- maPageVDev.SetOutputSizePixel( aScaledSize, FALSE );
+ maPageVDev.SetOutputSizePixel( aScaledSize, sal_False );
// position dimension lines
Point aRef( nTextHeight + (aNewSize.Width() - maPreviewSize.Width())/2,
@@ -266,7 +266,7 @@ void PrintDialog::PrintPreviewWindow::Paint( const Rectangle& )
maPageVDev.Erase();
maPageVDev.Push();
maPageVDev.SetMapMode( MAP_100TH_MM );
- ULONG nOldDrawMode = maPageVDev.GetDrawMode();
+ sal_uLong nOldDrawMode = maPageVDev.GetDrawMode();
if( mbGreyscale )
maPageVDev.SetDrawMode( maPageVDev.GetDrawMode() |
( DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL | DRAWMODE_GRAYTEXT |
@@ -310,6 +310,7 @@ void PrintDialog::PrintPreviewWindow::Command( const CommandEvent& rEvt )
void PrintDialog::PrintPreviewWindow::setPreview( const GDIMetaFile& i_rNewPreview,
const Size& i_rOrigSize,
+ const rtl::OUString& i_rPaperName,
const rtl::OUString& i_rReplacement,
sal_Int32 i_nDPIX,
sal_Int32 i_nDPIY,
@@ -329,7 +330,7 @@ void PrintDialog::PrintPreviewWindow::setPreview( const GDIMetaFile& i_rNewPrevi
maReplacementString = i_rReplacement;
mbGreyscale = i_bGreyscale;
maPageVDev.SetReferenceDevice( i_nDPIX, i_nDPIY );
- maPageVDev.EnableOutput( TRUE );
+ maPageVDev.EnableOutput( sal_True );
// use correct measurements
const LocaleDataWrapper& rLocWrap( GetSettings().GetLocaleDataWrapper() );
@@ -344,6 +345,12 @@ void PrintDialog::PrintPreviewWindow::setPreview( const GDIMetaFile& i_rNewPrevi
String aNumText( rLocWrap.getNum( aLogicPaperSize.Width(), nDigits ) );
aBuf.append( aNumText );
aBuf.appendAscii( eUnit == MAP_MM ? "mm" : "in" );
+ if( i_rPaperName.getLength() )
+ {
+ aBuf.appendAscii( " (" );
+ aBuf.append( i_rPaperName );
+ aBuf.append( sal_Unicode(')') );
+ }
maHorzDim.SetText( aBuf.makeStringAndClear() );
aNumText = rLocWrap.getNum( aLogicPaperSize.Height(), nDigits );
@@ -454,13 +461,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;
@@ -483,7 +490,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 );
@@ -613,6 +620,7 @@ PrintDialog::JobTabPage::JobTabPage( Window* i_pParent, const ResId& rResId )
, maCopyCountField( this, VclResId( SV_PRINT_COPYCOUNT_FIELD ) )
, maCollateBox( this, VclResId( SV_PRINT_COLLATE ) )
, maCollateImage( this, VclResId( SV_PRINT_COLLATE_IMAGE ) )
+ , maReverseOrderBox( this, VclResId( SV_PRINT_OPT_REVERSE ) )
, maCollateImg( VclResId( SV_PRINT_COLLATE_IMG ) )
, maCollateHCImg( VclResId( SV_PRINT_COLLATE_HC_IMG ) )
, maNoCollateImg( VclResId( SV_PRINT_NOCOLLATE_IMG ) )
@@ -712,8 +720,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
{
@@ -741,7 +749,6 @@ PrintDialog::OutputOptPage::OutputOptPage( Window* i_pParent, const ResId& i_rRe
, maOptionsLine( this, VclResId( SV_PRINT_OPT_PRINT_FL ) )
, maToFileBox( this, VclResId( SV_PRINT_OPT_TOFILE ) )
, maCollateSingleJobsBox( this, VclResId( SV_PRINT_OPT_SINGLEJOBS ) )
- , maReverseOrderBox( this, VclResId( SV_PRINT_OPT_REVERSE ) )
{
FreeResource();
@@ -765,7 +772,6 @@ void PrintDialog::OutputOptPage::setupLayout()
mxOptGroup = xCol;
xCol->addWindow( &maToFileBox );
xCol->addWindow( &maCollateSingleJobsBox );
- xCol->addWindow( &maReverseOrderBox );
}
void PrintDialog::OutputOptPage::readFromSettings()
@@ -827,13 +833,13 @@ 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();
// init reverse print
- maOptionsPage.maReverseOrderBox.Check( maPController->getReversePrint() );
+ maJobPage.maReverseOrderBox.Check( maPController->getReversePrint() );
// fill printer listbox
const std::vector< rtl::OUString >& rQueues( Printer::GetPrinterQueues() );
@@ -906,7 +912,7 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterCont
maJobPage.maDetailsBtn.SetToggleHdl( LINK( this, PrintDialog, ClickHdl ) );
maNUpPage.maBorderCB.SetClickHdl( LINK( this, PrintDialog, ClickHdl ) );
maOptionsPage.maToFileBox.SetToggleHdl( LINK( this, PrintDialog, ClickHdl ) );
- maOptionsPage.maReverseOrderBox.SetToggleHdl( LINK( this, PrintDialog, ClickHdl ) );
+ maJobPage.maReverseOrderBox.SetToggleHdl( LINK( this, PrintDialog, ClickHdl ) );
maOptionsPage.maCollateSingleJobsBox.SetToggleHdl( LINK( this, PrintDialog, ClickHdl ) );
maNUpPage.maPagesBtn.SetToggleHdl( LINK( this, PrintDialog, ClickHdl ) );
@@ -1044,10 +1050,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 );
@@ -1092,7 +1098,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()
@@ -1128,7 +1134,7 @@ void PrintDialog::setupOptionalUI()
boost::shared_ptr< vcl::RowOrColumn > pCurColumn;
Window* pCurParent = 0, *pDynamicPageParent = 0;
- USHORT nOptPageId = 9, nCurSubGroup = 0;
+ sal_uInt16 nOptPageId = 9, nCurSubGroup = 0;
bool bOnStaticPage = false;
bool bSubgroupOnStaticPage = false;
@@ -1473,7 +1479,7 @@ void PrintDialog::setupOptionalUI()
pBtn->Check( m == nSelectVal );
pBtn->SetToggleHdl( LINK( this, PrintDialog, UIOption_RadioHdl ) );
if( aChoicesDisabled.getLength() > m && aChoicesDisabled[m] == sal_True )
- pBtn->Enable( FALSE );
+ pBtn->Enable( sal_False );
pBtn->Show();
maPropertyToWindowMap[ aPropertyName ].push_back( pBtn );
maControlToPropertyMap[pBtn] = aPropertyName;
@@ -1527,9 +1533,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
@@ -1623,9 +1629,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 );
}
}
@@ -1636,7 +1642,17 @@ void PrintDialog::setupOptionalUI()
if( maJobPage.mxPrintRange->countElements() == 0 )
{
maJobPage.mxPrintRange->show( false, false );
- maJobPage.maCopySpacer.Show( FALSE );
+ maJobPage.maCopySpacer.Show( sal_False );
+ maJobPage.maReverseOrderBox.Show( sal_False );
+ }
+ else
+ {
+ // add an indent to the current column
+ vcl::Indenter* pIndent = new vcl::Indenter( maJobPage.mxPrintRange.get(), -1 );
+ maJobPage.mxPrintRange->addChild( pIndent );
+ // and create a column inside the indent
+ pIndent->setWindow( &maJobPage.maReverseOrderBox );
+ maJobPage.maReverseOrderBox.Show( sal_True );
}
#ifdef WNT
@@ -1708,7 +1724,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 );
@@ -1882,7 +1898,9 @@ void PrintDialog::preparePreview( bool i_bNewPage, bool i_bMayUseCache )
}
Size aCurPageSize = aPrt->PixelToLogic( aPrt->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) );
- maPreviewWindow.setPreview( aMtf, aCurPageSize, nPages > 0 ? rtl::OUString() : maNoPageStr,
+ maPreviewWindow.setPreview( aMtf, aCurPageSize,
+ aPrt->GetPaperName( false ),
+ nPages > 0 ? rtl::OUString() : maNoPageStr,
aPrt->ImplGetDPIX(), aPrt->ImplGetDPIY(),
aPrt->GetPrinterOptions().IsConvertToGreyscales()
);
@@ -2187,9 +2205,9 @@ IMPL_LINK( PrintDialog, ClickHdl, Button*, pButton )
makeAny( sal_Bool(isCollate()) ) );
checkControlDependencies();
}
- else if( pButton == &maOptionsPage.maReverseOrderBox )
+ else if( pButton == &maJobPage.maReverseOrderBox )
{
- sal_Bool bChecked = maOptionsPage.maReverseOrderBox.IsChecked();
+ sal_Bool bChecked = maJobPage.maReverseOrderBox.IsChecked();
maPController->setReversePrint( bChecked );
maPController->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintReverse" ) ),
makeAny( bChecked ) );
@@ -2295,7 +2313,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() ) )
{
@@ -2561,9 +2579,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..31740214532b 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_uLong) ( 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_uLong 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_uLong 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_uLong) ( 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_uLong) 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_uLong 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..1b9011aa7859 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_uLong mnRepaintTime;
+ sal_uLong mnTimeout;
+ sal_uLong mnWheelMode;
+ sal_uLong mnMaxWidth;
+ sal_uLong mnActWidth;
+ sal_uLong 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_uLong nWheelMode );
+ sal_uLong ImplGetWheelMode() const { return mnWheelMode; }
};
diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx
index 322b2937b5c9..9d7727493490 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 )
@@ -232,14 +232,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 )
{
@@ -247,14 +247,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:
@@ -262,7 +262,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;
@@ -277,7 +277,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
@@ -285,7 +285,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 )
{
@@ -296,32 +296,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;
}
/*************************************************************************
@@ -334,14 +334,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;
}
if( !rMEvt.IsRight() )
@@ -354,7 +354,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) )
@@ -364,7 +364,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
{
@@ -375,7 +375,7 @@ BOOL SelectionEngine::SelMouseButtonUp( const MouseEvent& rMEvt )
}
nFlags &= ~(SELENG_CMDEVT | SELENG_WAIT_UPEVT | SELENG_IN_SEL);
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -388,21 +388,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();
@@ -419,7 +419,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 62fbe2e507f3..3a66ead3944c 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -68,10 +68,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;
/// Minimal width or height of the item. -1 means no restriction.
long mnMinSize;
/// Maximal width or height of the item. -1 means no restriction.
@@ -85,9 +85,9 @@ struct ImplSplitSet
Bitmap* mpBitmap;
long mnLastSize;
long mnSplitSize;
- USHORT mnItems;
- USHORT mnId;
- BOOL mbCalcPix;
+ sal_uInt16 mnItems;
+ sal_uInt16 mnId;
+ sal_Bool mbCalcPix;
};
@@ -118,10 +118,10 @@ namespace {
#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)
// -----------------------------------------------------------------------
@@ -129,7 +129,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 )
{
@@ -319,13 +319,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++ )
@@ -349,10 +349,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++ )
@@ -379,10 +379,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++ )
@@ -393,7 +393,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;
}
@@ -405,11 +405,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++ )
@@ -455,8 +455,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++ )
@@ -480,7 +480,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 );
@@ -492,18 +492,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;
@@ -517,7 +517,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;
@@ -597,7 +597,7 @@ static void ImplCalcSet( ImplSplitSet* pSet,
nCurSize += pItems[i].mnPixSize;
}
- pSet->mbCalcPix = FALSE;
+ pSet->mbCalcPix = sal_False;
pSet->mnLastSize = nCalcSize;
// Fenster einpassen
@@ -621,7 +621,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++ )
{
@@ -648,10 +648,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) )
@@ -659,11 +659,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;
}
}
}
@@ -760,20 +760,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;
}
}
@@ -844,9 +844,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
@@ -857,7 +857,7 @@ static void ImplCalcSet( ImplSplitSet* pSet,
{
if ( pItems[i].mpSet->mpItems[j].mbFixed )
{
- pItems[i].mbFixed = TRUE;
+ pItems[i].mbFixed = sal_True;
break;
}
}
@@ -868,11 +868,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 )
@@ -942,9 +942,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) );
}
@@ -971,10 +971,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++ )
@@ -1039,8 +1039,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
@@ -1082,20 +1082,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++ )
{
@@ -1176,16 +1176,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;
@@ -1256,8 +1256,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 )
@@ -1369,7 +1369,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;
@@ -1390,29 +1390,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 )
@@ -1545,7 +1545,7 @@ Size SplitWindow::CalcLayoutSizePixel( const Size& aNewSize )
{
long nCurSize;
long nCalcSize = 0;
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < mpMainSet->mnItems; i++ )
{
@@ -1613,7 +1613,7 @@ void SplitWindow::ImplCalcLayout()
{
long nCurSize;
long nCalcSize = 0;
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < mpMainSet->mnItems; i++ )
{
@@ -1632,9 +1632,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;
}
}
@@ -1675,15 +1675,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 )
{
@@ -1723,7 +1723,7 @@ void SplitWindow::ImplUpdateSet( ImplSplitSet* pSet )
else
{
ImplSplitItem* pItem;
- USHORT nPos;
+ sal_uInt16 nPos;
pSet = ImplFindItem( mpMainSet, pSet->mnId, nPos );
pItem = &(pSet->mpItems[nPos]);
@@ -1763,7 +1763,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 )
@@ -1836,7 +1836,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;
@@ -1853,7 +1853,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;
@@ -1865,12 +1865,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;
}
@@ -1945,7 +1945,7 @@ void SplitWindow::ImplDrawButtonRect( const Rectangle& rRect, long nSize )
// -----------------------------------------------------------------------
-void SplitWindow::ImplDrawAutoHide( BOOL bInPaint )
+void SplitWindow::ImplDrawAutoHide( sal_Bool bInPaint )
{
if ( mbAutoHide )
{
@@ -1990,7 +1990,7 @@ void SplitWindow::ImplDrawAutoHide( BOOL bInPaint )
}
// Image ermitteln und zurueckgeben
- USHORT nId;
+ sal_uInt16 nId;
if ( mbAutoHidePressed )
{
if ( mbAutoHideIn )
@@ -2022,7 +2022,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();
@@ -2078,14 +2078,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 )
@@ -2136,7 +2136,7 @@ void SplitWindow::ImplDrawGrip( const Rectangle& rRect, BOOL bHorz, BOOL bLeft )
}
}
-void SplitWindow::ImplDrawFadeIn( BOOL bInPaint )
+void SplitWindow::ImplDrawFadeIn( sal_Bool bInPaint )
{
if ( mbFadeIn )
{
@@ -2144,17 +2144,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 );
@@ -2165,7 +2165,7 @@ void SplitWindow::ImplDrawFadeIn( BOOL bInPaint )
// -----------------------------------------------------------------------
-void SplitWindow::ImplDrawFadeOut( BOOL bInPaint )
+void SplitWindow::ImplDrawFadeOut( sal_Bool bInPaint )
{
if ( mbFadeOut )
{
@@ -2173,17 +2173,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 );
@@ -2202,15 +2202,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();
@@ -2228,9 +2228,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;
@@ -2361,9 +2361,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;
@@ -2438,35 +2438,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;
}
@@ -2488,8 +2488,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;
@@ -2526,30 +2526,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 );
}
}
}
@@ -2557,11 +2557,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();
@@ -2570,12 +2570,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 );
}
}
}
@@ -2583,11 +2583,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();
@@ -2596,12 +2596,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!
@@ -2611,14 +2611,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() )
@@ -2626,8 +2626,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];
@@ -2635,7 +2635,7 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt )
ImplUpdate();
Split();
}
- bSplit = FALSE;
+ bSplit = sal_False;
}
}
else
@@ -2648,14 +2648,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 )
@@ -2739,9 +2739,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 );
@@ -2779,9 +2779,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 )
@@ -2791,12 +2791,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;
}
@@ -2867,12 +2867,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
@@ -2896,7 +2896,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;
// Create and initialize item.
pItem = &(pSet->mpItems[nPos]);
@@ -2926,7 +2926,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;
}
@@ -2936,8 +2936,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 );
@@ -2945,15 +2945,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;
@@ -2986,7 +2986,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,
@@ -3008,7 +3008,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();
}
@@ -3016,15 +3016,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;
@@ -3036,7 +3036,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,
@@ -3078,7 +3078,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;
@@ -3089,22 +3089,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 )
@@ -3119,7 +3119,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 )
@@ -3130,7 +3130,7 @@ long SplitWindow::GetSplitSize( USHORT nSetId ) const
// -----------------------------------------------------------------------
-void SplitWindow::SetItemBackground( USHORT nSetId )
+void SplitWindow::SetItemBackground( sal_uInt16 nSetId )
{
Wallpaper aWall;
SetItemBackground( nSetId, aWall );
@@ -3138,13 +3138,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 )
{
@@ -3154,12 +3154,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 );
@@ -3178,7 +3178,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 );
@@ -3193,25 +3193,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 )
{
@@ -3221,12 +3221,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 );
@@ -3245,7 +3245,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 );
@@ -3260,15 +3260,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 );
@@ -3309,8 +3309,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 )
@@ -3320,29 +3320,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;
}
@@ -3495,9 +3495,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;
@@ -3510,16 +3510,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 )
@@ -3530,9 +3530,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 )
@@ -3546,9 +3546,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++ )
@@ -3588,9 +3588,9 @@ long SplitWindow::GetItemSize( USHORT nId, SplitWindowItemBits nBits ) const
-void SplitWindow::SetItemSizeRange (USHORT nId, const Range aRange)
+void SplitWindow::SetItemSizeRange (sal_uInt16 nId, const Range aRange)
{
- USHORT nPos;
+ sal_uInt16 nPos;
ImplSplitSet* pSet = ImplFindItem(mpBaseSet, nId, nPos);
if (pSet != NULL)
@@ -3603,9 +3603,9 @@ void SplitWindow::SetItemSizeRange (USHORT nId, const Range aRange)
-Range SplitWindow::GetItemSizeRange (USHORT nId) const
+Range SplitWindow::GetItemSizeRange (sal_uInt16 nId) const
{
- USHORT nPos;
+ sal_uInt16 nPos;
ImplSplitSet* pSet = ImplFindItem(mpBaseSet, nId, nPos);
if (pSet != NULL)
@@ -3617,9 +3617,9 @@ Range SplitWindow::GetItemSizeRange (USHORT nId) 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;
@@ -3634,16 +3634,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 )
@@ -3654,9 +3654,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 )
@@ -3667,9 +3667,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 )
@@ -3680,55 +3680,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 )
{
@@ -3743,7 +3743,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) )
@@ -3754,7 +3754,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 )
@@ -3769,28 +3769,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 )
@@ -3806,7 +3806,7 @@ void SplitWindow::ImplNewAlign()
// -----------------------------------------------------------------------
-void SplitWindow::SetNoAlign( BOOL bNoAlign )
+void SplitWindow::SetNoAlign( sal_Bool bNoAlign )
{
bNoAlign = bNoAlign != 0;
if ( mbNoAlign != bNoAlign )
@@ -3830,7 +3830,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;
@@ -3838,7 +3838,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;
@@ -3863,7 +3863,7 @@ Size SplitWindow::CalcWindowSizePixel( const Size& rSize, WindowAlign eAlign,
// -----------------------------------------------------------------------
-void SplitWindow::ShowAutoHideButton( BOOL bShow )
+void SplitWindow::ShowAutoHideButton( sal_Bool bShow )
{
mbAutoHide = bShow;
ImplUpdate();
@@ -3871,7 +3871,7 @@ void SplitWindow::ShowAutoHideButton( BOOL bShow )
// -----------------------------------------------------------------------
-void SplitWindow::ShowFadeInHideButton( BOOL bShow )
+void SplitWindow::ShowFadeInHideButton( sal_Bool bShow )
{
mbFadeIn = bShow;
ImplUpdate();
@@ -3879,7 +3879,7 @@ void SplitWindow::ShowFadeInHideButton( BOOL bShow )
// -----------------------------------------------------------------------
-void SplitWindow::ShowFadeOutButton( BOOL bShow )
+void SplitWindow::ShowFadeOutButton( sal_Bool bShow )
{
mbFadeOut = bShow;
ImplUpdate();
@@ -3887,7 +3887,7 @@ void SplitWindow::ShowFadeOutButton( BOOL bShow )
// -----------------------------------------------------------------------
-void SplitWindow::SetAutoHideState( BOOL bAutoHide )
+void SplitWindow::SetAutoHideState( sal_Bool bAutoHide )
{
mbAutoHideIn = bAutoHide;
if ( IsReallyVisible() )
@@ -3917,7 +3917,7 @@ long SplitWindow::GetFadeInSize() const
Rectangle SplitWindow::GetAutoHideRect() const
{
Rectangle aRect;
- ImplGetAutoHideRect( aRect, TRUE );
+ ImplGetAutoHideRect( aRect, sal_True );
return aRect;
}
@@ -3926,7 +3926,7 @@ Rectangle SplitWindow::GetAutoHideRect() const
Rectangle SplitWindow::GetFadeInRect() const
{
Rectangle aRect;
- ImplGetFadeInRect( aRect, TRUE );
+ ImplGetFadeInRect( aRect, sal_True );
return aRect;
}
@@ -3935,6 +3935,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 36f27b1ceee7..a261b6bd96a7 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;
@@ -91,7 +91,7 @@ struct ImplStatusItem
XubString maQuickHelpText;
rtl::OString maHelpId;
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;
@@ -348,12 +348,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;
@@ -376,11 +376,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 )
@@ -395,7 +395,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;
@@ -409,7 +409,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 );
@@ -432,7 +432,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 );
@@ -474,12 +474,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
{
@@ -500,7 +500,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;
@@ -534,7 +534,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
)
{
@@ -572,7 +572,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();
@@ -584,8 +584,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 )
{
@@ -650,8 +650,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
@@ -694,7 +694,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;
@@ -709,7 +709,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;
@@ -717,7 +717,7 @@ void StatusBar::ImplCalcProgressRect()
Rectangle 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.GetHeight();
if( nProgressHeight > maPrgsFrameRect.GetHeight() )
@@ -743,7 +743,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();
@@ -783,22 +783,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 );
}
}
@@ -852,7 +852,7 @@ void StatusBar::Resize()
mnTextY += 2;
// Formatierung neu ausloesen
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( mbProgressMode )
ImplCalcProgressRect();
@@ -868,7 +868,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 )
{
@@ -940,18 +940,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();
}
}
@@ -968,8 +968,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 )
@@ -1012,9 +1012,9 @@ void StatusBar::UserDraw( const UserDrawEvent& )
// -----------------------------------------------------------------------
-void StatusBar::InsertItem( USHORT nItemId, ULONG nWidth,
+void StatusBar::InsertItem( sal_uInt16 nItemId, sal_uLong 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,
@@ -1034,12 +1034,12 @@ void StatusBar::InsertItem( USHORT nItemId, ULONG nWidth,
pItem->mnWidth = (long)nWidth+nFudge+STATUSBAR_OFFSET;
pItem->mnOffset = nOffset;
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();
@@ -1048,15 +1048,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();
@@ -1066,18 +1066,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();
@@ -1088,18 +1088,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();
@@ -1110,14 +1110,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;
}
// -----------------------------------------------------------------------
@@ -1126,7 +1126,7 @@ void StatusBar::ShowItems()
{
if ( !mbVisibleItems )
{
- mbVisibleItems = TRUE;
+ mbVisibleItems = sal_True;
if ( !mbProgressMode )
Invalidate();
@@ -1140,7 +1140,7 @@ void StatusBar::HideItems()
{
if ( mbVisibleItems )
{
- mbVisibleItems = FALSE;
+ mbVisibleItems = sal_False;
if ( !mbProgressMode )
Invalidate();
@@ -1164,7 +1164,7 @@ void StatusBar::CopyItems( const StatusBar& rStatusBar )
mpItemList->Clear();
// Items kopieren
- ULONG i = 0;
+ sal_uLong i = 0;
pItem = rStatusBar.mpItemList->GetObject( i );
while ( pItem )
{
@@ -1173,7 +1173,7 @@ void StatusBar::CopyItems( const StatusBar& rStatusBar )
pItem = rStatusBar.mpItemList->GetObject( i );
}
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( ImplIsItemUpdate() )
Invalidate();
}
@@ -1193,7 +1193,7 @@ void StatusBar::Clear()
// Items aus der Liste loeschen
mpItemList->Clear();
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( ImplIsItemUpdate() )
Invalidate();
@@ -1202,14 +1202,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 )
@@ -1220,13 +1220,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();
}
@@ -1236,12 +1236,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
@@ -1256,13 +1256,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
@@ -1281,11 +1281,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
@@ -1311,9 +1311,9 @@ Point StatusBar::GetItemTextPos( USHORT nItemId ) const
// -----------------------------------------------------------------------
-ULONG StatusBar::GetItemWidth( USHORT nItemId ) const
+sal_uLong 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;
@@ -1323,9 +1323,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;
@@ -1335,9 +1335,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;
@@ -1347,9 +1347,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 )
{
@@ -1375,7 +1375,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();
}
}
@@ -1384,9 +1384,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;
@@ -1396,9 +1396,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 )
{
@@ -1411,9 +1411,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;
@@ -1423,9 +1423,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 )
{
@@ -1437,7 +1437,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();
}
}
@@ -1445,9 +1445,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;
@@ -1457,9 +1457,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;
@@ -1467,9 +1467,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 )
{
@@ -1494,9 +1494,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;
@@ -1504,9 +1504,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 )
{
@@ -1519,9 +1519,9 @@ const XubString& StatusBar::GetQuickHelpText( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void StatusBar::SetHelpId( USHORT nItemId, const rtl::OString& rHelpId )
+void StatusBar::SetHelpId( sal_uInt16 nItemId, const rtl::OString& rHelpId )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
mpItemList->GetObject( nPos )->maHelpId = rHelpId;
@@ -1529,9 +1529,9 @@ void StatusBar::SetHelpId( USHORT nItemId, const rtl::OString& rHelpId )
// -----------------------------------------------------------------------
-rtl::OString StatusBar::GetHelpId( USHORT nItemId ) const
+rtl::OString StatusBar::GetHelpId( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
rtl::OString aRet;
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
@@ -1560,11 +1560,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 )
{
@@ -1573,7 +1573,7 @@ void StatusBar::SetBottomBorder( BOOL bBottomBorder )
}
}
-void StatusBar::SetTopBorder( BOOL bTopBorder )
+void StatusBar::SetTopBorder( sal_Bool bTopBorder )
{
if ( mpImplData->mbTopBorder != static_cast<bool>(bTopBorder) )
{
@@ -1582,7 +1582,7 @@ void StatusBar::SetTopBorder( BOOL bTopBorder )
}
}
-BOOL StatusBar::IsTopBorder() const
+sal_Bool StatusBar::IsTopBorder() const
{
return mpImplData->mbTopBorder;
}
@@ -1593,7 +1593,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;
@@ -1617,7 +1617,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" );
@@ -1628,7 +1628,7 @@ void StatusBar::SetProgressValue( USHORT nNewPercent )
{
Update();
SetLineColor();
- ImplDrawProgress( FALSE, mnPercent, nNewPercent );
+ ImplDrawProgress( sal_False, mnPercent, nNewPercent );
Flush();
}
mnPercent = nNewPercent;
@@ -1640,7 +1640,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
@@ -1687,7 +1687,7 @@ void StatusBar::SetText( const XubString& rText )
Update();
long nOldTextWidth = GetTextWidth( GetText() );
Window::SetText( rText );
- ImplDrawText( TRUE, nOldTextWidth );
+ ImplDrawText( sal_True, nOldTextWidth );
Flush();
}
}
@@ -1709,8 +1709,8 @@ void StatusBar::SetText( const XubString& rText )
Size StatusBar::CalcWindowSizePixel() const
{
- ULONG i = 0;
- ULONG nCount = mpItemList->Count();
+ sal_uLong i = 0;
+ sal_uLong nCount = mpItemList->Count();
long nOffset = 0;
long nCalcWidth = (STATUSBAR_OFFSET_X*2);
long nCalcHeight;
@@ -1771,9 +1771,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 )
{
@@ -1789,9 +1789,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 4e897eef4a8b..9e7a30e983cb 100644
--- a/vcl/source/window/syschild.cxx
+++ b/vcl/source/window/syschild.cxx
@@ -60,7 +60,7 @@ using namespace ::com::sun::star;
// =======================================================================
long ImplSysChildProc( void* pInst, SalObject* /* pObject */,
- USHORT nEvent, const void* /* pEvent */ )
+ sal_uInt16 nEvent, const void* /* pEvent */ )
{
SystemChildWindow* pWindow = (SystemChildWindow*)pInst;
long nRet = 0;
@@ -72,33 +72,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
@@ -108,7 +108,7 @@ long ImplSysChildProc( void* pInst, SalObject* /* pObject */,
pWindow->GrabFocus();
if( aDogTag.IsDead() )
break;
- pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = FALSE;
+ pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = sal_False;
break;
}
@@ -117,7 +117,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 );
@@ -142,7 +142,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 );
@@ -186,7 +186,7 @@ const SystemEnvData* SystemChildWindow::GetSystemData() const
// -----------------------------------------------------------------------
-void SystemChildWindow::EnableEraseBackground( BOOL bEnable )
+void SystemChildWindow::EnableEraseBackground( sal_Bool bEnable )
{
if ( mpWindowImpl->mpSysObj )
mpWindowImpl->mpSysObj->EnableEraseBackground( bEnable );
@@ -194,12 +194,12 @@ void SystemChildWindow::EnableEraseBackground( BOOL 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 f6a37658b79f..48c7629c2026 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_uLong 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_uLong nState = (sal_uLong)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_uLong 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_uLong 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_uLong 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_uLong 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 ) && ( pWin != 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_uLong 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_uLong 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_uLong nState = 0;
if ( IsRollUp() )
{
@@ -970,7 +970,7 @@ void SystemWindow::SetWindowState( const ByteString& rStr )
// -----------------------------------------------------------------------
-ByteString SystemWindow::GetWindowState( ULONG nMask ) const
+ByteString SystemWindow::GetWindowState( sal_uLong 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 0589d57009f4..dcb95b9b52a2 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_uLong )
{
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 1adabe487492..71a8f2ec2a30 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 && ! aKeyCode.IsMod2() ) // 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 b71cf1c13c8d..105cf18bb43a 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_uLong 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 ) )
{
ToolbarValue aToolbarValue;
@@ -419,7 +419,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() );
@@ -509,7 +509,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();
@@ -551,7 +551,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;
@@ -575,7 +575,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 )
@@ -596,7 +596,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 );
@@ -621,7 +621,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 );
@@ -641,7 +641,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())
@@ -760,7 +760,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;
@@ -769,45 +769,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 );
@@ -869,7 +869,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;
}
}
@@ -915,13 +915,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];
@@ -943,7 +943,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 )
@@ -955,7 +955,7 @@ void ToolBox::ImplCalcFloatSizes( ToolBox* pThis )
// -----------------------------------------------------------------------
-Size ToolBox::ImplCalcFloatSize( ToolBox* pThis, USHORT& rLines )
+Size ToolBox::ImplCalcFloatSize( ToolBox* pThis, sal_uInt16& rLines )
{
ImplCalcFloatSizes( pThis );
@@ -966,7 +966,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++;
@@ -985,7 +985,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 )
@@ -1011,7 +1011,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
{
@@ -1024,7 +1024,7 @@ void ToolBox::ImplSetMinMaxFloatSize( ToolBox *pThis )
// -----------------------------------------------------------------------
-USHORT ToolBox::ImplCalcLines( ToolBox* pThis, long nToolSize )
+sal_uInt16 ToolBox::ImplCalcLines( ToolBox* pThis, long nToolSize )
{
long nLineHeight;
@@ -1052,12 +1052,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)) )
@@ -1092,9 +1092,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;
@@ -1104,31 +1104,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 )
@@ -1146,7 +1146,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
@@ -1187,9 +1187,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 );
@@ -1256,9 +1256,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 ) );
@@ -1309,12 +1309,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 )
@@ -1346,7 +1346,7 @@ void ImplTBDragMgr::StartDragging( ToolBox* pToolBox,
maMouseOff.Y() = rRect.Top() - rPos.Y();
maRect = rRect;
maStartRect = rRect;
- mbShowDragRect = TRUE;
+ mbShowDragRect = sal_True;
pToolBox->ShowTracking( maRect );
}
@@ -1386,12 +1386,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 )
@@ -1399,16 +1399,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;
@@ -1426,7 +1426,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 ) );
@@ -1453,7 +1453,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 ) );
}
@@ -1465,7 +1465,7 @@ void ImplTBDragMgr::EndDragging( BOOL bOK )
}
}
mpCustomizeData = NULL;
- mbResizeMode = FALSE;
+ mbResizeMode = sal_False;
mpDragBox->Deactivate();
}
@@ -1488,18 +1488,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 )
@@ -1513,7 +1513,7 @@ void ImplTBDragMgr::StartCustomizeMode()
void ImplTBDragMgr::EndCustomizeMode()
{
- mbCustomizeMode = FALSE;
+ mbCustomizeMode = sal_False;
ToolBox* pBox = mpBoxList->First();
while ( pBox )
@@ -1527,7 +1527,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();
@@ -1575,7 +1575,7 @@ void ToolBox::ImplInit( Window* pParent, WinBits nStyle )
{
// Variablen initialisieren
- ImplGetWindowImpl()->mbToolBox = TRUE;
+ ImplGetWindowImpl()->mbToolBox = sal_True;
mpBtnDev = NULL;
mpFloatSizeAry = NULL;
mpData = new ImplToolBoxPrivateData;
@@ -1606,26 +1606,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;
@@ -1652,13 +1652,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 );
@@ -1692,7 +1692,7 @@ void ToolBox::ImplInitSettings( BOOL bFont,
{
aColor = GetControlBackground();
SetBackground( aColor );
- SetPaintTransparent( FALSE );
+ SetPaintTransparent( sal_False );
SetParentClipMode( 0 );
}
else
@@ -1700,7 +1700,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() );
}
@@ -1712,7 +1712,7 @@ void ToolBox::ImplInitSettings( BOOL bFont,
aColor = rStyleSettings.GetWindowColor();
SetBackground( aColor );
- SetPaintTransparent( FALSE );
+ SetPaintTransparent( sal_False );
SetParentClipMode( 0 );
ImplUpdateImageList();
@@ -1731,7 +1731,7 @@ void ToolBox::ImplLoadRes( const ResId& rResId )
DockingWindow::ImplLoadRes( rResId );
- ULONG nObjMask;
+ sal_uLong nObjMask;
nObjMask = ReadLongRes();
@@ -1742,17 +1742,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 );
}
@@ -1767,10 +1767,10 @@ void ToolBox::ImplLoadRes( const ResId& rResId )
if ( nObjMask & RSC_TOOLBOX_ITEMLIST )
{
- ULONG nEle = ReadLongRes();
+ sal_uLong nEle = ReadLongRes();
// Item hinzufuegen
- for ( ULONG i = 0; i < nEle; i++ )
+ for ( sal_uLong i = 0; i < nEle; i++ )
{
InsertItem( ResId( (RSHEADER_TYPE *)GetClassRes(), *pMgr ) );
IncrementRes( GetObjSizeRes( (RSHEADER_TYPE *)GetClassRes() ) );
@@ -1801,7 +1801,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();
@@ -1852,7 +1852,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() )
@@ -1866,7 +1866,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 )
{
@@ -1889,13 +1889,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();
@@ -1987,27 +1987,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 )
{
@@ -2020,7 +2020,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 )
@@ -2030,7 +2030,7 @@ BOOL ToolBox::ImplCalcItem()
{
it->maItemSize = Size( GetCtrlTextWidth( it->maText )+TB_TEXTOFFSET,
GetTextHeight() );
- it->mbVisibleText = TRUE;
+ it->mbVisibleText = sal_True;
}
else
{
@@ -2058,7 +2058,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
@@ -2138,8 +2138,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) )
@@ -2147,25 +2147,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_uLong nLineStart = 0;
+ sal_uLong 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
@@ -2177,12 +2177,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 )
@@ -2198,7 +2198,7 @@ USHORT ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, BOOL bCalcHorz
if ( !mbScroll || (nWinItemWidth <= nWidthTotal) )
{
nCurWidth = nWinItemWidth;
- bWindow = TRUE;
+ bWindow = sal_True;
}
else
{
@@ -2211,13 +2211,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 )
{
@@ -2233,8 +2233,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
{
@@ -2298,7 +2298,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 )
@@ -2307,9 +2307,9 @@ namespace
return ImplFollowedByVisibleButton( aLookup, _aEnd );
if ( ( aLookup->meType == TOOLBOXITEM_BUTTON ) && aLookup->mbVisible )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
}
@@ -2329,7 +2329,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 );
@@ -2345,9 +2345,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;
@@ -2384,7 +2384,7 @@ Size ToolBox::ImplGetOptimalFloatingSize( FloatingSizeMode eMode )
}
-void ToolBox::ImplFormat( BOOL bResize )
+void ToolBox::ImplFormat( sal_Bool bResize )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -2404,15 +2404,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 )
@@ -2431,9 +2431,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
@@ -2576,7 +2576,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;
@@ -2710,7 +2710,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
@@ -2721,18 +2721,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 )
@@ -2913,7 +2913,7 @@ void ToolBox::ImplFormat( BOOL bResize )
}
// indicate formatting is done
- mbFormat = FALSE;
+ mbFormat = sal_False;
}
// -----------------------------------------------------------------------
@@ -2924,7 +2924,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
@@ -2933,7 +2933,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;
@@ -2961,7 +2961,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();
@@ -3016,10 +3016,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();
@@ -3069,8 +3069,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;
@@ -3165,7 +3165,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;
@@ -3220,7 +3220,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() )
{
@@ -3231,11 +3231,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 )
@@ -3275,9 +3275,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
{
@@ -3299,7 +3299,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() )
{
@@ -3309,7 +3309,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
@@ -3329,30 +3329,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,
@@ -3361,7 +3361,7 @@ void ToolBox::ImplDrawSpin( BOOL bUpperIn, BOOL bLowerIn )
// -----------------------------------------------------------------------
-void ToolBox::ImplDrawNext( BOOL bIn )
+void ToolBox::ImplDrawNext( sal_Bool bIn )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -3373,7 +3373,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;
@@ -3383,17 +3383,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;
}
@@ -3402,17 +3402,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;
@@ -3430,10 +3430,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 );
@@ -3460,13 +3460,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 &&
@@ -3533,18 +3533,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() );
@@ -3585,7 +3585,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 )
{
@@ -3636,8 +3636,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 );
@@ -3656,7 +3656,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);
@@ -3664,7 +3664,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;
@@ -3695,7 +3695,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 )
{
@@ -3707,7 +3707,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;
@@ -3718,7 +3718,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;
/*
@@ -3761,10 +3761,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 )
@@ -3786,10 +3786,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() );
}
@@ -3803,7 +3803,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 );
@@ -3818,7 +3818,7 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay
void ToolBox::ImplStartCustomizeMode()
{
- mbCustomizeMode = TRUE;
+ mbCustomizeMode = sal_True;
mpData->ImplClearLayoutData();
@@ -3837,7 +3837,7 @@ void ToolBox::ImplStartCustomizeMode()
}
}
-void ToolBox::SetCustomizeMode( BOOL bSet )
+void ToolBox::SetCustomizeMode( sal_Bool bSet )
{
if ( bSet )
ImplStartCustomizeMode();
@@ -3849,7 +3849,7 @@ void ToolBox::SetCustomizeMode( BOOL bSet )
void ToolBox::ImplEndCustomizeMode()
{
- mbCustomizeMode = FALSE;
+ mbCustomizeMode = sal_False;
mpData->ImplClearLayoutData();
@@ -3905,7 +3905,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 );
@@ -3914,9 +3914,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();
}
@@ -3926,7 +3926,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 )
@@ -3946,15 +3946,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;
@@ -3982,7 +3982,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();
@@ -3995,7 +3995,7 @@ BOOL ToolBox::ImplHandleMouseMove( const MouseEvent& rMEvt, BOOL bRepeat )
{
if ( !mnCurItemId )
{
- ImplDrawItem( mnCurPos, TRUE );
+ ImplDrawItem( mnCurPos, sal_True );
mnCurItemId = pItem->mnId;
Highlight();
}
@@ -4014,48 +4014,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();
@@ -4079,12 +4079,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
@@ -4122,7 +4122,7 @@ BOOL ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, BOOL bCancel )
ImplAddDel( &aDelData );
Select();
if ( aDelData.IsDelete() )
- return TRUE;
+ return sal_True;
ImplRemoveDel( &aDelData );
}
}
@@ -4134,11 +4134,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 );
@@ -4156,28 +4156,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;
}
// -----------------------------------------------------------------------
@@ -4199,10 +4199,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 )
@@ -4211,7 +4211,7 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt )
pWin = pWin->GetParent();
if( pWin && pWin->ImplGetWindowImpl()->mbToolBox )
{
- bDrawHotSpot = FALSE;
+ bDrawHotSpot = sal_False;
break;
}
}
@@ -4219,8 +4219,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();
@@ -4263,7 +4263,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;
@@ -4291,7 +4291,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 )
@@ -4334,7 +4334,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();
@@ -4346,21 +4346,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 );
@@ -4379,21 +4379,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 ) );
}
@@ -4403,7 +4403,7 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt )
if( bMenuButtonHit )
{
- ImplDrawMenubutton( this, TRUE );
+ ImplDrawMenubutton( this, sal_True );
}
}
}
@@ -4438,8 +4438,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();
@@ -4474,12 +4474,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;
}
@@ -4493,7 +4493,7 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt )
// Aktuelle Daten setzen
- USHORT nTrackFlags = 0;
+ sal_uInt16 nTrackFlags = 0;
mnCurPos = i;
mnCurItemId = it->mnId;
mnDownItemId = mnCurItemId;
@@ -4505,13 +4505,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
@@ -4522,7 +4522,7 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt )
if ( mbDrag )
{
- ImplDrawItem( mnCurPos, TRUE );
+ ImplDrawItem( mnCurPos, sal_True );
Highlight();
}
@@ -4534,7 +4534,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
@@ -4543,7 +4543,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;
@@ -4593,9 +4593,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;
}
@@ -4604,25 +4604,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();
@@ -4637,7 +4637,7 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt )
// Dragging starten
pMgr->StartDragging( this, aMousePos, Rectangle( aPos, aSize ),
- nLineMode, FALSE );
+ nLineMode, sal_False );
return;
}
}
@@ -4666,7 +4666,7 @@ void ToolBox::MouseButtonUp( const MouseEvent& rMEvt )
pMgr->EndDragging();
return;
}
- mbCommandDrag = FALSE;
+ mbCommandDrag = sal_False;
DockingWindow::MouseButtonUp( rMEvt );
}
@@ -4697,9 +4697,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 );
@@ -4716,28 +4716,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 )
@@ -4780,9 +4780,9 @@ void ToolBox::Resize()
{
if ( !mbFormat )
{
- mbFormat = TRUE;
+ mbFormat = sal_True;
if( IsReallyVisible() )
- ImplFormat( TRUE );
+ ImplFormat( sal_True );
}
}
@@ -4814,7 +4814,7 @@ void ToolBox::Resize()
}
// -----------------------------------------------------------------------
-const XubString& ToolBox::ImplGetHelpText( USHORT nItemId ) const
+const XubString& ToolBox::ImplGetHelpText( sal_uInt16 nItemId ) const
{
ImplToolItem* pItem = ImplGetItem( nItemId );
@@ -4842,7 +4842,7 @@ const XubString& ToolBox::ImplGetHelpText( USHORT nItemId ) const
void ToolBox::RequestHelp( const HelpEvent& rHEvt )
{
- USHORT nItemId;
+ sal_uInt16 nItemId;
Point aHelpPos;
if( !rHEvt.KeyboardActivated() )
@@ -4943,20 +4943,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 );
}
@@ -4977,9 +4977,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;
@@ -5044,7 +5044,7 @@ void ToolBox::Command( const CommandEvent& rCEvt )
// dann mache nichts
if ( (it->meType == TOOLBOXITEM_BUTTON) &&
!it->mbShowWindow )
- mbCommandDrag = TRUE;
+ mbCommandDrag = sal_True;
break;
}
@@ -5068,10 +5068,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;
}
}
@@ -5098,19 +5098,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();
}
}
@@ -5127,16 +5127,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();
}
@@ -5147,27 +5147,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();
@@ -5177,11 +5177,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();
}
@@ -5197,13 +5197,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 );
@@ -5216,7 +5216,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
@@ -5251,7 +5251,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"
@@ -5305,14 +5305,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 ) );
}
}
@@ -5325,7 +5325,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() )
{
@@ -5342,8 +5342,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 );
@@ -5379,20 +5379,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() )
@@ -5407,19 +5407,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 );
@@ -5429,24 +5429,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;
@@ -5498,7 +5498,7 @@ Size ToolBox::CalcMinimumWindowSizePixel() const
// -----------------------------------------------------------------------
-void ToolBox::EnableCustomize( BOOL bEnable )
+void ToolBox::EnableCustomize( sal_Bool bEnable )
{
if ( bEnable != mbCustomize )
{
@@ -5528,7 +5528,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 );
}
// -----------------------------------------------------------------------
@@ -5549,7 +5549,7 @@ void ToolBox::EndCustomizeMode()
// -----------------------------------------------------------------------
-BOOL ToolBox::IsCustomizeMode()
+sal_Bool ToolBox::IsCustomizeMode()
{
ImplTBDragMgr* pMgr = ImplGetTBDragMgr();
return pMgr->IsCustomizeMode();
@@ -5566,7 +5566,7 @@ void ToolBox::GetFocus()
void ToolBox::LoseFocus()
{
- ImplChangeHighlight( NULL, TRUE );
+ ImplChangeHighlight( NULL, sal_True );
DockingWindow::LoseFocus();
}
@@ -5574,10 +5574,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 )
@@ -5589,24 +5589,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
{
@@ -5628,7 +5628,7 @@ BOOL ToolBox::ImplActivateItem( KeyCode aKeyCode )
}
}
mnMouseModifier = aKeyCode.GetModifier();
- mbIsKeyEvent = TRUE;
+ mbIsKeyEvent = sal_True;
Activate();
Click();
@@ -5641,18 +5641,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 )
@@ -5664,23 +5664,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 )
{
@@ -5700,19 +5700,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;
}
@@ -5723,10 +5723,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;
@@ -5740,7 +5740,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 );
}
@@ -5750,7 +5750,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 );
}
@@ -5760,7 +5760,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 );
}
@@ -5770,7 +5770,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 );
}
@@ -5782,9 +5782,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;
@@ -5795,22 +5795,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:
@@ -5843,7 +5843,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt )
if( !pItem->mbEnabled )
{
Sound::Beep( SOUND_DISABLE, this );
- bGrabFocusToDocument = TRUE;
+ bGrabFocusToDocument = sal_True;
}
}
if( !bGrabFocusToDocument )
@@ -5852,7 +5852,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 );
@@ -5861,9 +5861,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 );
}
@@ -5873,7 +5873,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;
}
}
}
@@ -5885,7 +5885,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 );
@@ -5907,10 +5907,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 )
@@ -5923,7 +5923,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;
@@ -5955,7 +5955,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;
@@ -5989,11 +5989,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;
@@ -6001,34 +6001,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 ) );
}
@@ -6040,21 +6040,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 )
@@ -6079,23 +6079,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 );
@@ -6112,13 +6112,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
@@ -6127,17 +6127,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 )
@@ -6146,7 +6146,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;
}
@@ -6155,11 +6155,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
{
@@ -6169,7 +6169,7 @@ BOOL ToolBox::ImplChangeHighlightUpDn( BOOL bUp, BOOL bNoCycle )
if( IsMenuEnabled() && !ImplIsFloatingMode() )
{
ImplChangeHighlight( NULL );
- ImplDrawMenubutton( this, TRUE );
+ ImplDrawMenubutton( this, sal_True );
}
else
{
@@ -6178,7 +6178,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;
@@ -6186,16 +6186,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_uLong pos = ToolBox::ImplFindItemPos( pToolItem, mpData->m_aItems );
+ sal_uLong nCount = mpData->m_aItems.size();
- ULONG i=0;
+ sal_uLong i=0;
do
{
if( bUp )
@@ -6203,14 +6203,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;
@@ -6221,14 +6221,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;
@@ -6237,7 +6237,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);
@@ -6246,14 +6246,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;
}
// -----------------------------------------------------------------------
@@ -6266,7 +6266,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 );
}
}
@@ -6282,7 +6282,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 );
}
}
@@ -6290,7 +6290,7 @@ void ToolBox::ImplHideFocus()
if ( mpData->mbMenubuttonSelected )
{
// remove highlight from menubutton
- ImplDrawMenubutton( this, FALSE );
+ ImplDrawMenubutton( this, sal_False );
}
}
@@ -6310,7 +6310,7 @@ void ToolBox::ImplDisableFlatButtons()
&hkey) )
{
DWORD dwType = 0;
- WIN_BYTE Data[6]; // possible values: "true", "false", "1", "0", DWORD
+ sal_uInt8 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 35a39676353a..c993c9143a2c 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()
@@ -102,21 +102,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 )
{
@@ -126,11 +126,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;
@@ -140,7 +140,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 )
{
@@ -150,11 +150,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;
@@ -164,7 +164,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 )
@@ -175,11 +175,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;
@@ -260,7 +260,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
@@ -272,13 +272,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
{
@@ -314,27 +314,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
@@ -343,38 +343,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() )
@@ -392,7 +392,7 @@ Rectangle ImplToolItem::GetDropDownRect( BOOL bHorz ) const
// -----------------------------------------------------------------------
-BOOL ImplToolItem::IsClipped() const
+sal_Bool ImplToolItem::IsClipped() const
{
return ( meType == TOOLBOXITEM_BUTTON && mbVisible && maRect.IsEmpty() );
}
@@ -411,16 +411,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() )
@@ -434,7 +434,7 @@ void ToolBox::ImplInvalidate( BOOL bNewCalc, BOOL bFullPaint )
{
if ( !mbFormat )
{
- mbFormat = TRUE;
+ mbFormat = sal_True;
// Muss ueberhaupt eine neue Ausgabe erfolgen
if ( IsReallyVisible() && IsUpdateMode() )
@@ -448,7 +448,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() )
@@ -508,7 +508,7 @@ void ToolBox::Deactivate()
if ( mbHideStatusText )
{
GetpApp()->HideHelpStatusText();
- mbHideStatusText = FALSE;
+ mbHideStatusText = sal_False;
}
}
@@ -523,7 +523,7 @@ void ToolBox::Highlight()
if ( aStr.Len() || mbHideStatusText )
{
GetpApp()->ShowHelpStatusText( aStr );
- mbHideStatusText = TRUE;
+ mbHideStatusText = sal_True;
}
}
@@ -568,10 +568,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_uLong nObjMask;
+ sal_Bool bImage = sal_False; // Wurde Image gesetzt
// Item anlegen
ImplToolItem aItem;
@@ -580,7 +580,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;
@@ -606,22 +606,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();
@@ -632,15 +632,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,
@@ -655,14 +655,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,
@@ -672,18 +672,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,
@@ -693,17 +693,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,
@@ -713,17 +713,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,
@@ -741,80 +741,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();
@@ -840,9 +840,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;
@@ -860,14 +860,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 ) );
}
}
@@ -875,13 +875,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 )
@@ -890,15 +890,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 ) );
}
}
@@ -917,10 +917,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 );
@@ -937,7 +937,7 @@ void ToolBox::Clear()
mnCurItemId = 0;
mnHighItemId = 0;
- ImplInvalidate( TRUE, TRUE );
+ ImplInvalidate( sal_True, sal_True );
// Notify
ImplCallEventListeners( VCLEVENT_TOOLBOX_ALLITEMSCHANGED );
@@ -953,7 +953,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 );
}
}
@@ -964,8 +964,8 @@ void ToolBox::SetToolboxButtonSize( ToolBoxButtonSize eSize )
if( mpData->meButtonSize != eSize )
{
mpData->meButtonSize = eSize;
- mbCalc = TRUE;
- mbFormat = TRUE;
+ mbCalc = sal_True;
+ mbFormat = sal_True;
}
}
@@ -980,10 +980,10 @@ const Size& ToolBox::GetDefaultImageSize() const
{
static Size aSmallButtonSize( TB_SMALLIMAGESIZE, TB_SMALLIMAGESIZE );
- static ULONG s_nSymbolsStyle = STYLE_SYMBOLS_DEFAULT;
+ static sal_uLong s_nSymbolsStyle = STYLE_SYMBOLS_DEFAULT;
static Size aLargeButtonSize( TB_LARGEIMAGESIZE, TB_LARGEIMAGESIZE );
- ULONG nSymbolsStyle = Application::GetSettings().GetStyleSettings().GetCurrentSymbolsStyle();
+ sal_uLong nSymbolsStyle = Application::GetSettings().GetStyleSettings().GetCurrentSymbolsStyle();
if ( s_nSymbolsStyle != nSymbolsStyle )
{
s_nSymbolsStyle = nSymbolsStyle;
@@ -1018,13 +1018,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();
}
@@ -1033,7 +1033,7 @@ void ToolBox::SetAlign( WindowAlign eNewAlign )
// -----------------------------------------------------------------------
-void ToolBox::SetLineCount( USHORT nNewLines )
+void ToolBox::SetLineCount( sal_uInt16 nNewLines )
{
if ( !nNewLines )
nNewLines = 1;
@@ -1044,18 +1044,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;
}
@@ -1064,45 +1064,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() )
{
@@ -1122,14 +1122,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();
@@ -1207,25 +1207,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();
@@ -1237,18 +1237,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();
@@ -1266,24 +1266,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() )
{
@@ -1292,15 +1292,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 );
@@ -1312,9 +1312,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() )
{
@@ -1325,7 +1325,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 );
@@ -1337,9 +1337,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 )
{
@@ -1350,7 +1350,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 );
}
@@ -1365,8 +1365,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 )
@@ -1388,9 +1388,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 )
{
@@ -1412,7 +1412,7 @@ void ToolBox::SetItemImageAngle( USHORT nItemId, long nAngle10 )
if ( !mbCalc )
{
if ( aOldSize != pItem->maImage.GetSizePixel() )
- ImplInvalidate( TRUE );
+ ImplInvalidate( sal_True );
else
ImplUpdateItem( nPos );
}
@@ -1431,9 +1431,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 )
{
@@ -1459,7 +1459,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 );
@@ -1471,7 +1471,7 @@ Image ToolBox::GetItemImage( USHORT nItemId ) const
// -----------------------------------------------------------------------
-long ToolBox::GetItemImageAngle( USHORT nItemId ) const
+long ToolBox::GetItemImageAngle( sal_uInt16 nItemId ) const
{
ImplToolItem* pItem = ImplGetItem( nItemId );
@@ -1483,32 +1483,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 );
@@ -1520,9 +1520,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 )
{
@@ -1535,7 +1535,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 );
}
@@ -1552,7 +1552,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 );
@@ -1564,9 +1564,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 )
{
@@ -1574,14 +1574,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 );
@@ -1600,7 +1600,7 @@ void ToolBox::StartSelection()
if ( !mbSelection )
{
- mbSelection = TRUE;
+ mbSelection = sal_True;
mnCurPos = TOOLBOX_ITEM_NOTFOUND;
mnCurItemId = 0;
Activate();
@@ -1611,13 +1611,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();
@@ -1634,9 +1634,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 )
{
@@ -1645,7 +1645,7 @@ void ToolBox::SetItemDown( USHORT nItemId, BOOL bDown, BOOL bRelease )
if ( nPos != mnCurPos )
{
mnCurPos = nPos;
- ImplDrawItem( mnCurPos, TRUE );
+ ImplDrawItem( mnCurPos, sal_True );
Flush();
}
}
@@ -1653,7 +1653,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;
}
@@ -1663,8 +1663,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();
@@ -1680,21 +1680,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 )
{
@@ -1708,8 +1708,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 )
@@ -1754,7 +1754,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 );
@@ -1766,15 +1766,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;
@@ -1798,21 +1798,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 )
@@ -1821,36 +1821,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;
@@ -1858,7 +1858,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 );
@@ -1868,7 +1868,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 );
@@ -1880,7 +1880,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 );
@@ -1890,7 +1890,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 );
@@ -1902,7 +1902,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 );
@@ -1912,14 +1912,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, const rtl::OString& rHelpId )
+void ToolBox::SetHelpId( sal_uInt16 nItemId, const rtl::OString& rHelpId )
{
ImplToolItem* pItem = ImplGetItem( nItemId );
@@ -1929,7 +1929,7 @@ void ToolBox::SetHelpId( USHORT nItemId, const rtl::OString& rHelpId )
// -----------------------------------------------------------------------
-rtl::OString ToolBox::GetHelpId( USHORT nItemId ) const
+rtl::OString ToolBox::GetHelpId( sal_uInt16 nItemId ) const
{
rtl::OString aRet;
@@ -1953,12 +1953,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;
@@ -1975,7 +1975,7 @@ void ToolBox::SetOutStyle( USHORT nNewStyle )
mnMaxItemHeight = 1;
}
- ImplInvalidate( TRUE, TRUE );
+ ImplInvalidate( sal_True, sal_True );
}
}
@@ -1983,7 +1983,7 @@ void ToolBox::SetOutStyle( USHORT nNewStyle )
void ToolBox::RecalcItems()
{
- ImplInvalidate( TRUE );
+ ImplInvalidate( sal_True );
}
// -----------------------------------------------------------------------
@@ -1998,11 +1998,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;
}
// -----------------------------------------------------------------------
@@ -2011,14 +2011,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 );
}
}
@@ -2033,14 +2033,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_uLong i = 0; i < mpData->m_pLayoutData->m_aLineItemIds.size(); i++ )
{
if( mpData->m_pLayoutData->m_aLineItemIds[i] == nItemID )
{
@@ -2054,7 +2054,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;
@@ -2063,7 +2063,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_uLong 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) )
@@ -2096,12 +2096,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_uLong)nText < mpData->m_pLayoutData->m_aLineItemIds.size() )
nItemId = mpData->m_pLayoutData->m_aLineItemIds[nText];
return nItemId;
}
@@ -2121,7 +2121,7 @@ const Link& ToolBox::GetDropdownClickHdl() const
// -----------------------------------------------------------------------
-void ToolBox::SetMenuType( USHORT aType )
+void ToolBox::SetMenuType( sal_uInt16 aType )
{
if( aType != mpData->maMenuType )
{
@@ -2131,9 +2131,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 );
}
@@ -2146,12 +2146,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;
}
@@ -2173,7 +2173,7 @@ const Link& ToolBox::GetMenuButtonHdl() const
// -----------------------------------------------------------------------
-BOOL ToolBox::ImplHasClippedItems()
+sal_Bool ToolBox::ImplHasClippedItems()
{
// are any items currently clipped ?
ImplFormat();
@@ -2181,10 +2181,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()
@@ -2195,7 +2195,7 @@ void ToolBox::ImplUpdateCustomMenu()
PopupMenu *pMenu = GetMenu();
- USHORT i = 0;
+ sal_uInt16 i = 0;
// remove old entries
while( i < pMenu->GetItemCount() )
{
@@ -2216,7 +2216,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 );
@@ -2229,9 +2229,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;
}
@@ -2279,7 +2279,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() )
@@ -2316,24 +2316,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 );
@@ -2343,7 +2343,7 @@ BOOL ToolBox::ImplIsInPopupMode() const
// -----------------------------------------------------------------------
-void ToolBox::Lock( BOOL bLock )
+void ToolBox::Lock( sal_Bool bLock )
{
ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this );
if( !pWrapper )
@@ -2353,8 +2353,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();
}
@@ -2363,7 +2363,7 @@ void ToolBox::Lock( BOOL bLock )
// -----------------------------------------------------------------------
-BOOL ToolBox::AlwaysLocked()
+sal_Bool ToolBox::AlwaysLocked()
{
// read config item to determine toolbox behaviour, used for subtoolbars
@@ -2379,35 +2379,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;
}
@@ -2416,7 +2416,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 0762a07476e2..6ddb10c92cd7 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -114,12 +114,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)
// -----------------------------------------------------------------------
@@ -134,25 +134,21 @@ struct ImplCalcToTopData
Region* mpInvalidateRegion;
};
-struct ImplAccessibleInfos
+ImplAccessibleInfos::ImplAccessibleInfos()
{
- USHORT nAccessibleRole;
- String* pAccessibleName;
- String* pAccessibleDescription;
-
- ImplAccessibleInfos()
- {
- nAccessibleRole = 0xFFFF;
- pAccessibleName = NULL;
- pAccessibleDescription = NULL;
- }
+ nAccessibleRole = 0xFFFF;
+ pAccessibleName = NULL;
+ pAccessibleDescription = NULL;
+ pLabeledByWindow = NULL;
+ pLabelForWindow = NULL;
+ pMemberOfWindow = NULL;
+}
- ~ImplAccessibleInfos()
- {
- delete pAccessibleName;
- delete pAccessibleDescription;
- }
-};
+ImplAccessibleInfos::~ImplAccessibleInfos()
+{
+ delete pAccessibleName;
+ delete pAccessibleDescription;
+}
// -----------------------------------------------------------------------
@@ -307,12 +303,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 );
// reset default border width for layouters
@@ -518,7 +514,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 );
}
}
@@ -527,7 +523,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 );
}
@@ -650,83 +646,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
}
// -----------------------------------------------------------------------
@@ -753,7 +749,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
@@ -771,8 +767,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
@@ -787,7 +783,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;
}
@@ -798,7 +794,7 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste
if ( mpWindowImpl->mbFrame )
{
// create frame
- ULONG nFrameStyle = 0;
+ sal_uLong nFrameStyle = 0;
if ( nStyle & WB_MOVEABLE )
nFrameStyle |= SAL_FRAME_STYLE_MOVEABLE;
@@ -904,21 +900,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() )
{
@@ -963,7 +959,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
@@ -989,7 +985,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();
@@ -1050,7 +1046,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() )
@@ -1089,7 +1085,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 )
@@ -1142,7 +1138,7 @@ void Window::ImplRemoveWindow( BOOL bRemoveFrameData )
void Window::ImplCallResize()
{
- mpWindowImpl->mbCallResize = FALSE;
+ mpWindowImpl->mbCallResize = sal_False;
if( GetBackground().IsGradient() )
Invalidate();
@@ -1160,7 +1156,7 @@ void Window::ImplCallResize()
void Window::ImplCallMove()
{
- mpWindowImpl->mbCallMove = FALSE;
+ mpWindowImpl->mbCallMove = sal_False;
if( mpWindowImpl->mbFrame )
{
@@ -1229,7 +1225,7 @@ WinBits Window::ImplInitRes( const ResId& rResId )
void Window::ImplLoadRes( const ResId& rResId )
{
- ULONG nObjMask = ReadLongRes();
+ sal_uLong nObjMask = ReadLongRes();
// we need to calculate auto helpids before the resource gets closed
// if the resource only contains flags, it will be closed before we try to read a help id
@@ -1238,7 +1234,7 @@ void Window::ImplLoadRes( const ResId& rResId )
rtl::OString aHelpId = ImplAutoHelpID( rResId.GetResMgr() );
// ResourceStyle
- ULONG nRSStyle = ReadLongRes();
+ sal_uLong nRSStyle = ReadLongRes();
// WinBits
ReadLongRes();
@@ -1247,8 +1243,8 @@ void Window::ImplLoadRes( const ResId& rResId )
SetHelpId( aHelpId );
- BOOL bPos = FALSE;
- BOOL bSize = FALSE;
+ sal_Bool bPos = sal_False;
+ sal_Bool bSize = sal_False;
Point aPos;
Size aSize;
@@ -1257,7 +1253,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();
@@ -1272,7 +1268,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();
@@ -1298,14 +1294,14 @@ 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() );
@@ -1316,7 +1312,7 @@ void Window::ImplLoadRes( const ResId& rResId )
if ( nObjMask & WINDOW_BORDER_STYLE )
{
- USHORT nBorderStyle = (USHORT)ReadLongRes();
+ sal_uInt16 nBorderStyle = (sal_uInt16)ReadLongRes();
SetBorderStyle( nBorderStyle );
}
}
@@ -1337,9 +1333,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
}
return mpWindowImpl->mpWinData;
@@ -1350,7 +1346,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();
@@ -1380,7 +1376,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
@@ -1404,7 +1400,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() )
@@ -1424,7 +1420,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;
@@ -1432,22 +1428,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
{
@@ -1457,19 +1453,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 );
}
@@ -1499,15 +1495,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;
}
// -----------------------------------------------------------------------
@@ -1515,7 +1511,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();
@@ -1535,7 +1531,7 @@ PointerStyle Window::ImplGetMousePointer() const
if ( pWindow->mpWindowImpl->mnWaitCount )
{
ePointerStyle = POINTER_WAIT;
- bWait = TRUE;
+ bWait = sal_True;
}
else
{
@@ -1558,11 +1554,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.
@@ -1600,11 +1596,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.
@@ -1637,10 +1633,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 )
@@ -1696,7 +1692,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() );
@@ -1722,7 +1718,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() )
{
@@ -1749,7 +1745,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 );
@@ -1773,13 +1769,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 )
{
@@ -1800,7 +1796,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();
@@ -1819,9 +1815,9 @@ BOOL Window::ImplSysObjClip( const Region* pOldRegion )
long nY;
long nWidth;
long nHeight;
- ULONG nRectCount;
+ sal_uLong nRectCount;
ImplRegionInfo aInfo;
- BOOL bRegionRect;
+ sal_Bool bRegionRect;
nRectCount = aRegion.GetRectCount();
mpWindowImpl->mpSysObj->BeginSetClipRegion( nRectCount );
@@ -1835,7 +1831,7 @@ BOOL Window::ImplSysObjClip( const Region* pOldRegion )
}
}
else
- bVisibleState = FALSE;
+ bVisibleState = sal_False;
}
// Visible-Status updaten
@@ -1899,31 +1895,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 )
@@ -1931,14 +1927,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;
}
}
@@ -1947,15 +1943,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;
}
@@ -1964,18 +1960,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
@@ -1985,7 +1981,7 @@ BOOL Window::ImplSetClipFlag( BOOL bSysObjOnlySmaller )
while ( pWindow )
{
if ( !pWindow->ImplSetClipFlagChilds( bSysObjOnlySmaller ) )
- bUpdate = FALSE;
+ bUpdate = sal_False;
pWindow = pWindow->mpWindowImpl->mpNext;
}
}
@@ -2065,7 +2061,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 );
@@ -2100,21 +2096,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;
@@ -2168,13 +2164,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;
}
// -----------------------------------------------------------------------
@@ -2199,7 +2195,7 @@ void Window::ImplInitWinChildClipRegion()
ImplClipChilds( *mpWindowImpl->mpChildClipRegion );
}
- mpWindowImpl->mbInitChildRegion = FALSE;
+ mpWindowImpl->mbInitChildRegion = sal_False;
}
// -----------------------------------------------------------------------
@@ -2280,7 +2276,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 )
@@ -2352,13 +2348,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);
@@ -2412,8 +2408,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 );
@@ -2453,11 +2449,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
@@ -2483,7 +2479,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;
@@ -2550,14 +2546,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();
@@ -2615,7 +2611,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 );
@@ -2645,7 +2641,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
@@ -2653,7 +2649,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;
@@ -2666,7 +2662,7 @@ void Window::ImplInvalidate( const Region* pRegion, USHORT nFlags )
{
pOpaqueWindow = pTempWindow;
nFlags |= INVALIDATE_CHILDREN;
- bInvalidateAll = FALSE;
+ bInvalidateAll = sal_False;
break;
}
@@ -2678,7 +2674,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 )
@@ -2687,7 +2683,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
@@ -2706,7 +2702,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;
@@ -2733,7 +2729,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 )
{
@@ -2748,7 +2744,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;
}
}
@@ -2758,7 +2754,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 );
@@ -2786,7 +2782,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 );
@@ -2796,7 +2792,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();
@@ -2841,11 +2837,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 )
@@ -2854,7 +2850,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
@@ -2863,7 +2859,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;
@@ -2883,7 +2879,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;
@@ -2901,7 +2897,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 )
@@ -2911,14 +2907,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 )
@@ -2933,7 +2929,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
@@ -2943,7 +2939,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) )
{
@@ -2965,7 +2961,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 )
@@ -3016,7 +3012,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 )
@@ -3046,24 +3042,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
@@ -3122,10 +3118,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() );
@@ -3146,14 +3142,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() )
{
@@ -3172,12 +3168,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;
}
@@ -3199,12 +3195,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;
@@ -3226,17 +3222,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 )
@@ -3244,9 +3240,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 )
@@ -3256,8 +3252,8 @@ void Window::ImplPosSizeWindow( long nX, long nY,
if ( nHeight != mnOutHeight )
{
mnOutHeight = nHeight;
- bNewSize = TRUE;
- bCopyBits = FALSE;
+ bNewSize = sal_True;
+ bCopyBits = sal_False;
}
}
@@ -3307,12 +3303,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 )
@@ -3325,11 +3321,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;
}
}
@@ -3345,7 +3341,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
*/
if ( bNewPos || bNewSize )
{
- BOOL bUpdateSysObjPos = FALSE;
+ sal_Bool bUpdateSysObjPos = sal_False;
if ( bNewPos )
bUpdateSysObjPos = ImplUpdatePos();
@@ -3372,7 +3368,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
}
else
{
- mpWindowImpl->mpClientWindow->mpWindowImpl->mbCallMove = TRUE;
+ mpWindowImpl->mpClientWindow->mpWindowImpl->mbCallMove = sal_True;
}
}
}
@@ -3398,12 +3394,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 )
@@ -3414,7 +3410,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 ?
@@ -3422,8 +3418,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() )
@@ -3433,7 +3429,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 );
@@ -3445,7 +3441,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 )
{
@@ -3458,10 +3454,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() )
@@ -3469,10 +3465,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 );
}
@@ -3484,7 +3480,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 );
}
@@ -3497,7 +3493,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 );
}
@@ -3588,7 +3584,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" );
@@ -3605,7 +3601,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 )
@@ -3628,7 +3624,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 )
{
@@ -3641,7 +3637,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()) ||
@@ -3682,7 +3678,7 @@ void Window::ImplToTop( USHORT nFlags )
// -----------------------------------------------------------------------
-void Window::ImplStartToTop( USHORT nFlags )
+void Window::ImplStartToTop( sal_uInt16 nFlags )
{
ImplCalcToTopData aStartData;
ImplCalcToTopData* pCurData;
@@ -3737,7 +3733,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) )
@@ -3756,7 +3752,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();
}
@@ -3773,8 +3769,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;
@@ -3790,8 +3786,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;
@@ -3800,24 +3796,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_uLong 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;
@@ -3864,8 +3860,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();
@@ -3876,7 +3872,7 @@ void Window::ImplCallFocusChangeActivate( Window* pNewOverlapWindow,
!pNewRealWindow->GetActivateMode() )
{
pSVData->maWinData.mpLastDeacWin = pOldOverlapWindow;
- bCallDeactivate = FALSE;
+ bCallDeactivate = sal_False;
}
}
else if ( (pNewRealWindow->GetType() != WINDOW_FLOATINGWINDOW) ||
@@ -3885,15 +3881,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();
}
}
@@ -3905,14 +3901,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();
}
}
@@ -3921,14 +3917,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();
}
}
@@ -3950,7 +3946,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 )
@@ -4008,13 +4004,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;
@@ -4022,7 +4018,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;
@@ -4032,7 +4028,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;
@@ -4093,11 +4089,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();
}
}
@@ -4176,7 +4172,7 @@ void Window::ImplGrabFocus( USHORT nFlags )
else
pParent = pLastParent;
- pParent->mpWindowImpl->mbActive = FALSE;
+ pParent->mpWindowImpl->mbActive = sal_False;
pParent->Deactivate();
pDeactivateParent = pLastParent;
}
@@ -4199,7 +4195,7 @@ void Window::ImplGrabFocus( USHORT nFlags )
else
pParent = pLastParent;
- pParent->mpWindowImpl->mbActive = TRUE;
+ pParent->mpWindowImpl->mbActive = sal_True;
pParent->Activate();
pActivateParent = pLastParent;
}
@@ -4230,7 +4226,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
@@ -4247,7 +4243,7 @@ void Window::ImplGrabFocus( USHORT nFlags )
if( !aDogTag.IsDelete() )
{
mpWindowImpl->mnGetFocusFlags = 0;
- mpWindowImpl->mbInFocusHdl = FALSE;
+ mpWindowImpl->mbInFocusHdl = sal_False;
}
}
}
@@ -4380,7 +4376,7 @@ Window::~Window()
// Dispose of the canvas implementation (which, currently, has an
// own wrapper window as a child to this one.
- Reference< rendering::XCanvas > xCanvas( mpWindowImpl->mxCanvas );
+ uno::Reference< rendering::XCanvas > xCanvas( mpWindowImpl->mxCanvas );
if( xCanvas.is() )
{
uno::Reference < lang::XComponent > xCanvasComponent( xCanvas,
@@ -4389,7 +4385,7 @@ Window::~Window()
xCanvasComponent->dispose();
}
- mpWindowImpl->mbInDtor = TRUE;
+ mpWindowImpl->mbInDtor = sal_True;
ImplCallEventListeners( VCLEVENT_OBJECT_DYING );
@@ -4425,12 +4421,12 @@ Window::~Window()
// deregister drop target listener
if( mpWindowImpl->mpFrameData->mxDropTargetListener.is() )
{
- Reference< XDragGestureRecognizer > xDragGestureRecognizer =
- Reference< XDragGestureRecognizer > (mpWindowImpl->mpFrameData->mxDragSource, UNO_QUERY);
+ uno::Reference< XDragGestureRecognizer > xDragGestureRecognizer =
+ uno::Reference< XDragGestureRecognizer > (mpWindowImpl->mpFrameData->mxDragSource, UNO_QUERY);
if( xDragGestureRecognizer.is() )
{
xDragGestureRecognizer->removeDragGestureListener(
- Reference< XDragGestureListener > (mpWindowImpl->mpFrameData->mxDropTargetListener, UNO_QUERY));
+ uno::Reference< XDragGestureListener > (mpWindowImpl->mpFrameData->mxDropTargetListener, UNO_QUERY));
}
mpWindowImpl->mpFrameData->mxDropTarget->removeDropTargetListener( mpWindowImpl->mpFrameData->mxDropTargetListener );
@@ -4438,7 +4434,7 @@ Window::~Window()
}
// shutdown drag and drop for this frame window
- Reference< XComponent > xComponent( mpWindowImpl->mpFrameData->mxDropTarget, UNO_QUERY );
+ uno::Reference< XComponent > xComponent( mpWindowImpl->mpFrameData->mxDropTarget, UNO_QUERY );
// DNDEventDispatcher does not hold a reference of the DropTarget,
// so it's ok if it does not support XComponent
@@ -4452,7 +4448,7 @@ Window::~Window()
}
}
- UnoWrapperBase* pWrapper = Application::GetUnoWrapper( FALSE );
+ UnoWrapperBase* pWrapper = Application::GetUnoWrapper( sal_False );
if ( pWrapper )
pWrapper->WindowDestroyed( this );
@@ -4488,16 +4484,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;
@@ -4512,13 +4508,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;
@@ -4625,11 +4621,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 );
@@ -4715,18 +4711,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();
@@ -4799,7 +4795,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 );
@@ -4822,7 +4818,7 @@ void Window::MouseMove( const MouseEvent& rMEvt )
NotifyEvent aNEvt( EVENT_MOUSEMOVE, this, &rMEvt );
if ( !Notify( aNEvt ) )
- mpWindowImpl->mbMouseMove = TRUE;
+ mpWindowImpl->mbMouseMove = sal_True;
}
// -----------------------------------------------------------------------
@@ -4835,7 +4831,7 @@ void Window::MouseButtonDown( const MouseEvent& rMEvt )
NotifyEvent aNEvt( EVENT_MOUSEBUTTONDOWN, this, &rMEvt );
if ( !Notify( aNEvt ) )
- mpWindowImpl->mbMouseButtonDown = TRUE;
+ mpWindowImpl->mbMouseButtonDown = sal_True;
}
// -----------------------------------------------------------------------
@@ -4848,7 +4844,7 @@ void Window::MouseButtonUp( const MouseEvent& rMEvt )
NotifyEvent aNEvt( EVENT_MOUSEBUTTONUP, this, &rMEvt );
if ( !Notify( aNEvt ) )
- mpWindowImpl->mbMouseButtonUp = TRUE;
+ mpWindowImpl->mbMouseButtonUp = sal_True;
}
// -----------------------------------------------------------------------
@@ -4861,7 +4857,7 @@ void Window::KeyInput( const KeyEvent& rKEvt )
NotifyEvent aNEvt( EVENT_KEYINPUT, this, &rKEvt );
if ( !Notify( aNEvt ) )
- mpWindowImpl->mbKeyInput = TRUE;
+ mpWindowImpl->mbKeyInput = sal_True;
}
// -----------------------------------------------------------------------
@@ -4874,7 +4870,7 @@ void Window::KeyUp( const KeyEvent& rKEvt )
NotifyEvent aNEvt( EVENT_KEYUP, this, &rKEvt );
if ( !Notify( aNEvt ) )
- mpWindowImpl->mbKeyUp = TRUE;
+ mpWindowImpl->mbKeyUp = sal_True;
}
// -----------------------------------------------------------------------
@@ -4902,7 +4898,7 @@ void Window::PostPaint()
// -----------------------------------------------------------------------
-void Window::Draw( OutputDevice*, const Point&, const Size&, ULONG )
+void Window::Draw( OutputDevice*, const Point&, const Size&, sal_uLong )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
}
@@ -5035,7 +5031,7 @@ void Window::Command( const CommandEvent& rCEvt )
NotifyEvent aNEvt( EVENT_COMMAND, this, &rCEvt );
if ( !Notify( aNEvt ) )
- mpWindowImpl->mbCommand = TRUE;
+ mpWindowImpl->mbCommand = sal_True;
}
// -----------------------------------------------------------------------
@@ -5051,7 +5047,7 @@ void Window::Tracking( const TrackingEvent& rTEvt )
// -----------------------------------------------------------------------
-void Window::UserEvent( ULONG, void* )
+void Window::UserEvent( sal_uLong, void* )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
}
@@ -5179,7 +5175,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 );
@@ -5187,11 +5183,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 ) )
@@ -5199,11 +5195,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 ) )
@@ -5268,7 +5264,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
@@ -5278,27 +5274,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() )
@@ -5315,7 +5311,7 @@ long Window::Notify( NotifyEvent& rNEvt )
}
pWrapper->ImplStartDocking( aPos );
}
- return TRUE;
+ return sal_True;
}
}
else if( rNEvt.GetType() == EVENT_KEYINPUT )
@@ -5333,7 +5329,7 @@ long Window::Notify( NotifyEvent& rNEvt )
*/
if( pWrapper->IsFloatingMode() )
ToTop( TOTOP_GRABFOCUSONLY );
- return TRUE;
+ return sal_True;
}
}
}
@@ -5356,7 +5352,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();
@@ -5375,7 +5371,7 @@ long Window::Notify( NotifyEvent& rNEvt )
// -----------------------------------------------------------------------
-void Window::ImplCallEventListeners( ULONG nEvent, void* pData )
+void Window::ImplCallEventListeners( sal_uLong nEvent, void* pData )
{
// The implementation was moved to CallEventListeners(),
// because derived classes in svtools must be able to
@@ -5388,7 +5384,7 @@ void Window::ImplCallEventListeners( ULONG nEvent, void* pData )
// -----------------------------------------------------------------------
-void Window::CallEventListeners( ULONG nEvent, void* pData )
+void Window::CallEventListeners( sal_uLong nEvent, void* pData )
{
VclWindowEvent aEvent( this, nEvent, pData );
@@ -5460,25 +5456,25 @@ void Window::RemoveChildEventListener( const Link& rEventListener )
// -----------------------------------------------------------------------
-ULONG Window::PostUserEvent( ULONG nEvent, void* pEventData )
+sal_uLong Window::PostUserEvent( sal_uLong nEvent, void* pEventData )
{
- ULONG nEventId;
+ sal_uLong nEventId;
PostUserEvent( nEventId, nEvent, pEventData );
return nEventId;
}
// -----------------------------------------------------------------------
-ULONG Window::PostUserEvent( const Link& rLink, void* pCaller )
+sal_uLong Window::PostUserEvent( const Link& rLink, void* pCaller )
{
- ULONG nEventId;
+ sal_uLong nEventId;
PostUserEvent( nEventId, rLink, pCaller );
return nEventId;
}
// -----------------------------------------------------------------------
-BOOL Window::PostUserEvent( ULONG& rEventId, ULONG nEvent, void* pEventData )
+sal_Bool Window::PostUserEvent( sal_uLong& rEventId, sal_uLong nEvent, void* pEventData )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -5487,23 +5483,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_uLong)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_uLong& rEventId, const Link& rLink, void* pCaller )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -5512,23 +5508,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_uLong)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_uLong nUserEvent )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -5545,14 +5541,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_uLong)pState );
return 0;
}
@@ -5562,28 +5558,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_uLong)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;
}
// -----------------------------------------------------------------------
@@ -5641,7 +5637,7 @@ SystemWindow* Window::GetSystemWindow() const
// -----------------------------------------------------------------------
-void Window::SetBorderStyle( USHORT nBorderStyle )
+void Window::SetBorderStyle( sal_uInt16 nBorderStyle )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -5684,7 +5680,7 @@ void Window::SetBorderStyle( USHORT nBorderStyle )
// -----------------------------------------------------------------------
-USHORT Window::GetBorderStyle() const
+sal_uInt16 Window::GetBorderStyle() const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -5732,7 +5728,7 @@ long Window::CalcTitleWidth() const
// -----------------------------------------------------------------------
-void Window::EnableClipSiblings( BOOL bClipSiblings )
+void Window::EnableClipSiblings( sal_Bool bClipSiblings )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -5744,7 +5740,7 @@ void Window::EnableClipSiblings( BOOL bClipSiblings )
// -----------------------------------------------------------------------
-void Window::SetMouseTransparent( BOOL bTransparent )
+void Window::SetMouseTransparent( sal_Bool bTransparent )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -5759,7 +5755,7 @@ void Window::SetMouseTransparent( BOOL bTransparent )
// -----------------------------------------------------------------------
-void Window::SetPaintTransparent( BOOL bTransparent )
+void Window::SetPaintTransparent( sal_Bool bTransparent )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -5786,7 +5782,7 @@ void Window::SetInputContext( const InputContext& rInputContext )
// -----------------------------------------------------------------------
-void Window::EndExtTextInput( USHORT nFlags )
+void Window::EndExtTextInput( sal_uInt16 nFlags )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -5844,24 +5840,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_uLong nChangeFlags = aOldSettings.GetChangeFlags( rSettings );
// AppFont-Aufloesung und DPI-Aufloesung neu berechnen
ImplInitResolutionSettings();
@@ -5885,20 +5881,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_uLong 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 )
@@ -5999,7 +5995,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 );
@@ -6011,14 +6007,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 );
@@ -6039,7 +6035,7 @@ void Window::SetWindowRegionPixel()
else if( mpWindowImpl->mbFrame )
{
mpWindowImpl->maWinRegion = Region( REGION_NULL);
- mpWindowImpl->mbWinRegion = FALSE;
+ mpWindowImpl->mbWinRegion = sal_False;
mpWindowImpl->mpFrame->ResetClipRegion();
}
else
@@ -6047,7 +6043,7 @@ void Window::SetWindowRegionPixel()
if ( mpWindowImpl->mbWinRegion )
{
mpWindowImpl->maWinRegion = Region( REGION_NULL );
- mpWindowImpl->mbWinRegion = FALSE;
+ mpWindowImpl->mbWinRegion = sal_False;
ImplSetClipFlag();
if ( IsReallyVisible() )
@@ -6086,9 +6082,9 @@ void Window::SetWindowRegionPixel( const Region& rRegion )
long nY;
long nWidth;
long nHeight;
- ULONG nRectCount;
+ sal_uLong nRectCount;
ImplRegionInfo aInfo;
- BOOL bRegionRect;
+ sal_Bool bRegionRect;
nRectCount = mpWindowImpl->maWinRegion.GetRectCount();
mpWindowImpl->mpFrame->BeginSetClipRegion( nRectCount );
@@ -6108,24 +6104,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() )
@@ -6156,7 +6152,7 @@ const Region& Window::GetWindowRegionPixel() const
// -----------------------------------------------------------------------
-BOOL Window::IsWindowRegionPixel() const
+sal_Bool Window::IsWindowRegionPixel() const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -6168,7 +6164,7 @@ BOOL Window::IsWindowRegionPixel() const
// -----------------------------------------------------------------------
-Region Window::GetWindowClipRegionPixel( USHORT nFlags ) const
+Region Window::GetWindowClipRegionPixel( sal_uInt16 nFlags ) const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -6239,7 +6235,7 @@ void Window::ExpandPaintClipRegion( const Region& rRegion )
if( ! aDevPixRegion.IsEmpty() )
{
mpWindowImpl->mpPaintRegion->Union( aDevPixRegion );
- mbInitClipRegion = TRUE;
+ mbInitClipRegion = sal_True;
}
}
}
@@ -6274,13 +6270,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 );
}
}
@@ -6309,8 +6305,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;
@@ -6327,9 +6323,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 )
@@ -6351,7 +6347,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();
@@ -6390,7 +6386,7 @@ void Window::SetParent( Window* pNewParent )
}
// Activate-Status beim naechsten Overlap-Window updaten
- if ( HasChildPathFocus( TRUE ) )
+ if ( HasChildPathFocus( sal_True ) )
ImplCallFocusChangeActivate( pNewOverlapWindow, pOldOverlapWindow );
}
@@ -6426,12 +6422,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 );
@@ -6440,7 +6436,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 )
@@ -6451,16 +6447,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 );
@@ -6468,12 +6464,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 )
@@ -6568,7 +6564,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
@@ -6583,7 +6579,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 );
@@ -6592,7 +6588,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();
@@ -6601,11 +6597,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;
@@ -6726,10 +6722,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
@@ -6771,7 +6767,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 )
@@ -6790,17 +6786,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) ||
@@ -6858,7 +6854,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 );
@@ -6874,11 +6870,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;
@@ -6891,11 +6887,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 );
}
}
@@ -6910,11 +6906,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++;
@@ -6925,19 +6921,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 )
{
@@ -6957,19 +6953,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 )
{
@@ -6989,7 +6985,7 @@ void Window::AlwaysDisableInput( BOOL bAlways, BOOL bChild )
// -----------------------------------------------------------------------
-void Window::SetActivateMode( USHORT nMode )
+void Window::SetActivateMode( sal_uInt16 nMode )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7004,9 +7000,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();
}
}
@@ -7014,7 +7010,7 @@ void Window::SetActivateMode( USHORT nMode )
{
if ( !mpWindowImpl->mbActive || (GetType() == WINDOW_BORDERWINDOW) )
{
- mpWindowImpl->mbActive = TRUE;
+ mpWindowImpl->mbActive = sal_True;
Activate();
}
}
@@ -7023,7 +7019,7 @@ void Window::SetActivateMode( USHORT nMode )
// -----------------------------------------------------------------------
-void Window::ToTop( USHORT nFlags )
+void Window::ToTop( sal_uInt16 nFlags )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7033,7 +7029,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 );
@@ -7151,7 +7147,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
@@ -7210,7 +7206,7 @@ void Window::SetZOrder( Window* pRefWindow, USHORT nFlags )
// -----------------------------------------------------------------------
-void Window::EnableAlwaysOnTop( BOOL bEnable )
+void Window::EnableAlwaysOnTop( sal_Bool bEnable )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7228,16 +7224,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;
@@ -7257,7 +7253,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 )
@@ -7471,18 +7467,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,
@@ -7512,7 +7508,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 );
@@ -7524,7 +7520,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 );
@@ -7536,7 +7532,7 @@ void Window::Scroll( long nHorzScroll, long nVertScroll,
// -----------------------------------------------------------------------
-void Window::Invalidate( USHORT nFlags )
+void Window::Invalidate( sal_uInt16 nFlags )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7548,7 +7544,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 );
@@ -7565,7 +7561,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 );
@@ -7584,7 +7580,7 @@ void Window::Invalidate( const Region& rRegion, USHORT nFlags )
// -----------------------------------------------------------------------
-void Window::Validate( USHORT nFlags )
+void Window::Validate( sal_uInt16 nFlags )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7596,7 +7592,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 );
@@ -7613,7 +7609,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 );
@@ -7632,18 +7628,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() )
{
@@ -7652,12 +7648,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;
}
// -----------------------------------------------------------------------
@@ -7675,14 +7671,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
@@ -7751,7 +7747,7 @@ void Window::Sync()
// -----------------------------------------------------------------------
-void Window::SetUpdateMode( BOOL bUpdate )
+void Window::SetUpdateMode( sal_Bool bUpdate )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7770,7 +7766,7 @@ void Window::GrabFocus()
// -----------------------------------------------------------------------
-BOOL Window::HasFocus() const
+sal_Bool Window::HasFocus() const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7812,7 +7808,7 @@ void Window::SetFakeFocus( bool bFocus )
// -----------------------------------------------------------------------
-BOOL Window::HasChildPathFocus( BOOL bSystemWindow ) const
+sal_Bool Window::HasChildPathFocus( sal_Bool bSystemWindow ) const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7828,7 +7824,7 @@ BOOL Window::HasChildPathFocus( BOOL bSystemWindow ) const
Window* pFocusWin = ImplGetSVData()->maWinData.mpFocusWin;
if ( pFocusWin )
return ImplIsWindowOrChild( pFocusWin, bSystemWindow );
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -7849,7 +7845,7 @@ void Window::CaptureMouse()
if ( pSVData->maWinData.mpCaptureWin != this )
{
pSVData->maWinData.mpCaptureWin = this;
- mpWindowImpl->mpFrame->CaptureMouse( TRUE );
+ mpWindowImpl->mpFrame->CaptureMouse( sal_True );
}
}
@@ -7867,14 +7863,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 );
@@ -7899,7 +7895,7 @@ void Window::SetPointer( const Pointer& rPointer )
// -----------------------------------------------------------------------
-void Window::EnableChildPointerOverwrite( BOOL bOverwrite )
+void Window::EnableChildPointerOverwrite( sal_Bool bOverwrite )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7969,7 +7965,7 @@ Point Window::GetLastPointerPosPixel()
// -----------------------------------------------------------------------
-void Window::ShowPointer( BOOL bVisible )
+void Window::ShowPointer( sal_Bool bVisible )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -8008,7 +8004,7 @@ Window::PointerState Window::GetPointerState()
// -----------------------------------------------------------------------
-BOOL Window::IsMouseOver()
+sal_Bool Window::IsMouseOver()
{
return ImplGetWinData()->mbMouseOver;
}
@@ -8086,7 +8082,7 @@ void Window::SetText( const XubString& rStr )
// name change.
if ( IsReallyVisible() )
{
- Window* pWindow = GetLabelFor();
+ Window* pWindow = GetAccessibleRelationLabelFor();
if ( pWindow && pWindow != this )
pWindow->ImplCallEventListeners( VCLEVENT_WINDOW_FRAMETITLECHANGED, &oldTitle );
}
@@ -8157,7 +8153,7 @@ const XubString& Window::GetHelpText() const
if ( pHelp )
{
((Window*)this)->mpWindowImpl->maHelpText = pHelp->GetHelpText( aStrHelpId, this );
- mpWindowImpl->mbHelpTextDynamic = FALSE;
+ mpWindowImpl->mbHelpTextDynamic = sal_False;
}
}
}
@@ -8172,7 +8168,7 @@ const XubString& Window::GetHelpText() const
aTxt.append( rtl::OUString( aStrHelpId ) );
mpWindowImpl->maHelpText = aTxt.makeStringAndClear();
}
- mpWindowImpl->mbHelpTextDynamic = FALSE;
+ mpWindowImpl->mbHelpTextDynamic = sal_False;
}
return mpWindowImpl->maHelpText;
@@ -8190,11 +8186,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 )
{
@@ -8207,11 +8203,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 )
{
@@ -8226,7 +8222,7 @@ Window* Window::GetChild( USHORT nChild ) const
// -----------------------------------------------------------------------
-Window* Window::GetWindow( USHORT nType ) const
+Window* Window::GetWindow( sal_uInt16 nType ) const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -8318,7 +8314,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 );
@@ -8331,22 +8327,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 );
}
@@ -8385,7 +8381,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 )
{
@@ -8482,7 +8478,7 @@ void Window::ImplStartDnd()
// -----------------------------------------------------------------------
-Reference< XDropTarget > Window::GetDropTarget()
+uno::Reference< XDropTarget > Window::GetDropTarget()
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -8495,7 +8491,7 @@ Reference< XDropTarget > Window::GetDropTarget()
if( ! mpWindowImpl->mpFrameData->mxDropTarget.is() )
{
// initialization is done in GetDragSource
- Reference< XDragSource > xDragSource = GetDragSource();
+ uno::Reference< XDragSource > xDragSource = GetDragSource();
}
if( mpWindowImpl->mpFrameData->mxDropTarget.is() )
@@ -8511,16 +8507,16 @@ Reference< XDropTarget > Window::GetDropTarget()
mpWindowImpl->mpFrameData->mxDropTarget->addDropTargetListener( mpWindowImpl->mpFrameData->mxDropTargetListener );
// register also as drag gesture listener if directly supported by drag source
- Reference< XDragGestureRecognizer > xDragGestureRecognizer =
- Reference< XDragGestureRecognizer > (mpWindowImpl->mpFrameData->mxDragSource, UNO_QUERY);
+ uno::Reference< XDragGestureRecognizer > xDragGestureRecognizer =
+ uno::Reference< XDragGestureRecognizer > (mpWindowImpl->mpFrameData->mxDragSource, UNO_QUERY);
if( xDragGestureRecognizer.is() )
{
xDragGestureRecognizer->addDragGestureListener(
- Reference< XDragGestureListener > (mpWindowImpl->mpFrameData->mxDropTargetListener, UNO_QUERY));
+ uno::Reference< XDragGestureListener > (mpWindowImpl->mpFrameData->mxDropTargetListener, UNO_QUERY));
}
else
- mpWindowImpl->mpFrameData->mbInternalDragGestureRecognizer = TRUE;
+ mpWindowImpl->mpFrameData->mbInternalDragGestureRecognizer = sal_True;
}
@@ -8539,12 +8535,12 @@ Reference< XDropTarget > Window::GetDropTarget()
}
// this object is located in the same process, so there will be no runtime exception
- return Reference< XDropTarget > ( mpWindowImpl->mxDNDListenerContainer, UNO_QUERY );
+ return uno::Reference< XDropTarget > ( mpWindowImpl->mxDNDListenerContainer, UNO_QUERY );
}
// -----------------------------------------------------------------------
-Reference< XDragSource > Window::GetDragSource()
+uno::Reference< XDragSource > Window::GetDragSource()
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -8554,7 +8550,7 @@ Reference< XDragSource > Window::GetDragSource()
{
try
{
- Reference< XMultiServiceFactory > xFactory = vcl::unohelper::GetMultiServiceFactory();
+ uno::Reference< XMultiServiceFactory > xFactory = vcl::unohelper::GetMultiServiceFactory();
if ( xFactory.is() )
{
const SystemEnvData * pEnvData = GetSystemData();
@@ -8588,10 +8584,10 @@ Reference< XDragSource > Window::GetDragSource()
aDropTargetAL[ 2 ] = makeAny( vcl::createBmpConverter() );
#endif
if( aDragSourceSN.getLength() )
- mpWindowImpl->mpFrameData->mxDragSource = Reference< XDragSource > ( xFactory->createInstanceWithArguments( aDragSourceSN, aDragSourceAL ), UNO_QUERY );
+ mpWindowImpl->mpFrameData->mxDragSource = uno::Reference< XDragSource > ( xFactory->createInstanceWithArguments( aDragSourceSN, aDragSourceAL ), UNO_QUERY );
if( aDropTargetSN.getLength() )
- mpWindowImpl->mpFrameData->mxDropTarget = Reference< XDropTarget > ( xFactory->createInstanceWithArguments( aDropTargetSN, aDropTargetAL ), UNO_QUERY );
+ mpWindowImpl->mpFrameData->mxDropTarget = uno::Reference< XDropTarget > ( xFactory->createInstanceWithArguments( aDropTargetSN, aDropTargetAL ), UNO_QUERY );
}
}
}
@@ -8608,12 +8604,12 @@ Reference< XDragSource > Window::GetDragSource()
return mpWindowImpl->mpFrameData->mxDragSource;
}
- return Reference< XDragSource > ();
+ return uno::Reference< XDragSource > ();
}
// -----------------------------------------------------------------------
-void Window::GetDragSourceDropTarget(Reference< XDragSource >& xDragSource, Reference< XDropTarget > &xDropTarget )
+void Window::GetDragSourceDropTarget(uno::Reference< XDragSource >& xDragSource, uno::Reference< XDropTarget > &xDropTarget )
// only for RVP transmission
{
if( mpWindowImpl->mpFrameData )
@@ -8631,14 +8627,14 @@ void Window::GetDragSourceDropTarget(Reference< XDragSource >& xDragSource, Refe
// -----------------------------------------------------------------------
-Reference< XDragGestureRecognizer > Window::GetDragGestureRecognizer()
+uno::Reference< XDragGestureRecognizer > Window::GetDragGestureRecognizer()
{
- return Reference< XDragGestureRecognizer > ( GetDropTarget(), UNO_QUERY );
+ return uno::Reference< XDragGestureRecognizer > ( GetDropTarget(), UNO_QUERY );
}
// -----------------------------------------------------------------------
-Reference< XClipboard > Window::GetClipboard()
+uno::Reference< XClipboard > Window::GetClipboard()
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -8648,19 +8644,19 @@ Reference< XClipboard > Window::GetClipboard()
{
try
{
- Reference< XMultiServiceFactory > xFactory( vcl::unohelper::GetMultiServiceFactory() );
+ uno::Reference< XMultiServiceFactory > xFactory( vcl::unohelper::GetMultiServiceFactory() );
if( xFactory.is() )
{
- mpWindowImpl->mpFrameData->mxClipboard = Reference< XClipboard >( xFactory->createInstance( OUString::createFromAscii( "com.sun.star.datatransfer.clipboard.SystemClipboardExt" ) ), UNO_QUERY );
+ mpWindowImpl->mpFrameData->mxClipboard = uno::Reference< XClipboard >( xFactory->createInstance( OUString::createFromAscii( "com.sun.star.datatransfer.clipboard.SystemClipboardExt" ) ), UNO_QUERY );
if( !mpWindowImpl->mpFrameData->mxClipboard.is() )
- mpWindowImpl->mpFrameData->mxClipboard = Reference< XClipboard >( xFactory->createInstance( OUString::createFromAscii( "com.sun.star.datatransfer.clipboard.SystemClipboard" ) ), UNO_QUERY );
+ mpWindowImpl->mpFrameData->mxClipboard = uno::Reference< XClipboard >( xFactory->createInstance( OUString::createFromAscii( "com.sun.star.datatransfer.clipboard.SystemClipboard" ) ), UNO_QUERY );
#if defined(UNX) && !defined(QUARTZ) // unix clipboard needs to be initialized
if( mpWindowImpl->mpFrameData->mxClipboard.is() )
{
- Reference< XInitialization > xInit = Reference< XInitialization >( mpWindowImpl->mpFrameData->mxClipboard, UNO_QUERY );
+ uno::Reference< XInitialization > xInit = uno::Reference< XInitialization >( mpWindowImpl->mpFrameData->mxClipboard, UNO_QUERY );
if( xInit.is() )
{
@@ -8692,7 +8688,7 @@ Reference< XClipboard > Window::GetClipboard()
// -----------------------------------------------------------------------
-Reference< XClipboard > Window::GetPrimarySelection()
+uno::Reference< XClipboard > Window::GetPrimarySelection()
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -8702,7 +8698,7 @@ Reference< XClipboard > Window::GetPrimarySelection()
{
try
{
- Reference< XMultiServiceFactory > xFactory( vcl::unohelper::GetMultiServiceFactory() );
+ uno::Reference< XMultiServiceFactory > xFactory( vcl::unohelper::GetMultiServiceFactory() );
if( xFactory.is() )
{
@@ -8712,16 +8708,16 @@ Reference< XClipboard > Window::GetPrimarySelection()
aArgumentList[ 1 ] = makeAny( OUString::createFromAscii( "PRIMARY" ) );
aArgumentList[ 2 ] = makeAny( vcl::createBmpConverter() );
- mpWindowImpl->mpFrameData->mxSelection = Reference< XClipboard >( xFactory->createInstanceWithArguments(
+ mpWindowImpl->mpFrameData->mxSelection = uno::Reference< XClipboard >( xFactory->createInstanceWithArguments(
OUString::createFromAscii( "com.sun.star.datatransfer.clipboard.SystemClipboard" ), aArgumentList ), UNO_QUERY );
# else
- static Reference< XClipboard > s_xSelection;
+ static uno::Reference< XClipboard > s_xSelection;
if ( !s_xSelection.is() )
- s_xSelection = Reference< XClipboard >( xFactory->createInstance( OUString::createFromAscii( "com.sun.star.datatransfer.clipboard.GenericClipboardExt" ) ), UNO_QUERY );
+ s_xSelection = uno::Reference< XClipboard >( xFactory->createInstance( OUString::createFromAscii( "com.sun.star.datatransfer.clipboard.GenericClipboardExt" ) ), UNO_QUERY );
if ( !s_xSelection.is() )
- s_xSelection = Reference< XClipboard >( xFactory->createInstance( OUString::createFromAscii( "com.sun.star.datatransfer.clipboard.GenericClipboard" ) ), UNO_QUERY );
+ s_xSelection = uno::Reference< XClipboard >( xFactory->createInstance( OUString::createFromAscii( "com.sun.star.datatransfer.clipboard.GenericClipboard" ) ), UNO_QUERY );
mpWindowImpl->mpFrameData->mxSelection = s_xSelection;
# endif
@@ -8746,7 +8742,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
@@ -8766,7 +8762,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;
}
@@ -8776,46 +8772,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 );
@@ -8828,7 +8824,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;
@@ -8881,9 +8877,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 );
@@ -8893,9 +8889,9 @@ USHORT Window::GetAccessibleChildWindowCount()
}
*/
-USHORT Window::GetAccessibleChildWindowCount()
+sal_uInt16 Window::GetAccessibleChildWindowCount()
{
- USHORT nChildren = 0;
+ sal_uInt16 nChildren = 0;
Window* pChild = mpWindowImpl->mpFirstChild;
while( pChild )
{
@@ -8941,21 +8937,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() )
@@ -8971,7 +8967,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 )
{
@@ -9019,7 +9015,7 @@ Window* Window::GetAccessibleChildWindow( USHORT n )
}
-void Window::SetAccessibleRole( USHORT nRole )
+void Window::SetAccessibleRole( sal_uInt16 nRole )
{
if ( !mpWindowImpl->mpAccessibleInfos )
mpWindowImpl->mpAccessibleInfos = new ImplAccessibleInfos;
@@ -9028,11 +9024,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() )
@@ -9134,6 +9130,7 @@ USHORT Window::GetAccessibleRole() const
case WINDOW_HELPTEXTWINDOW: nRole = accessibility::AccessibleRole::TOOL_TIP; break;
+ case WINDOW_RULER: nRole = accessibility::AccessibleRole::RULER; break;
case WINDOW_WINDOW:
case WINDOW_CONTROL:
case WINDOW_BORDERWINDOW:
@@ -9160,7 +9157,7 @@ void Window::SetAccessibleName( const String& rName )
if ( !mpWindowImpl->mpAccessibleInfos )
mpWindowImpl->mpAccessibleInfos = new ImplAccessibleInfos;
- DBG_ASSERT( !mpWindowImpl->mpAccessibleInfos->pAccessibleName, "AccessibleName already set!" );
+ DBG_ASSERT( !mpWindowImpl->mpAccessibleInfos->pAccessibleName || !rName.Len(), "AccessibleName already set!" );
delete mpWindowImpl->mpAccessibleInfos->pAccessibleName;
mpWindowImpl->mpAccessibleInfos->pAccessibleName = new String( rName );
}
@@ -9201,9 +9198,9 @@ String Window::GetAccessibleName() const
case WINDOW_LISTBOX:
case WINDOW_MULTILISTBOX:
case WINDOW_TREELISTBOX:
-
+ case WINDOW_METRICBOX:
{
- Window *pLabel = GetLabeledBy();
+ Window *pLabel = GetAccessibleRelationLabeledBy();
if ( pLabel && pLabel != this )
aAccessibleName = pLabel->GetText();
}
@@ -9262,7 +9259,28 @@ String Window::GetAccessibleDescription() const
return aAccessibleDescription;
}
-BOOL Window::IsAccessibilityEventsSuppressed( BOOL bTraverseParentPath )
+void Window::SetAccessibleRelationLabeledBy( Window* pLabeledBy )
+{
+ if ( !mpWindowImpl->mpAccessibleInfos )
+ mpWindowImpl->mpAccessibleInfos = new ImplAccessibleInfos;
+ mpWindowImpl->mpAccessibleInfos->pLabeledByWindow = pLabeledBy;
+}
+
+void Window::SetAccessibleRelationLabelFor( Window* pLabelFor )
+{
+ if ( !mpWindowImpl->mpAccessibleInfos )
+ mpWindowImpl->mpAccessibleInfos = new ImplAccessibleInfos;
+ mpWindowImpl->mpAccessibleInfos->pLabelForWindow = pLabelFor;
+}
+
+void Window::SetAccessibleRelationMemberOf( Window* pMemberOfWin )
+{
+ if ( !mpWindowImpl->mpAccessibleInfos )
+ mpWindowImpl->mpAccessibleInfos = new ImplAccessibleInfos;
+ mpWindowImpl->mpAccessibleInfos->pMemberOfWindow = pMemberOfWin;
+}
+
+sal_Bool Window::IsAccessibilityEventsSuppressed( sal_Bool bTraverseParentPath )
{
if( !bTraverseParentPath )
return mpWindowImpl->mbSuppressAccessibilityEvents;
@@ -9272,14 +9290,19 @@ 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;
}
}
+void Window::SetAccessibilityEventsSuppressed(sal_Bool bSuppressed)
+{
+ mpWindowImpl->mbSuppressAccessibilityEvents = bSuppressed;
+}
+
void Window::RecordLayoutData( vcl::ControlLayoutData* pLayout, const Rectangle& rRect )
{
if( ! mpOutDevData )
@@ -9296,9 +9319,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() )
{
@@ -9316,7 +9339,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();
@@ -9325,21 +9348,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
@@ -9357,8 +9380,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();
@@ -9366,7 +9389,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;
@@ -9398,7 +9421,7 @@ void Window::DrawSelectionBackground( const Rectangle& rRect,
else
SetLineColor();
- USHORT nPercent = 0;
+ sal_uInt16 nPercent = 0;
if( !highlight )
{
if( bDark )
@@ -9518,7 +9541,7 @@ Window* Window::GetPreferredKeyInputWindow()
}
-BOOL Window::IsScrollable() const
+sal_Bool Window::IsScrollable() const
{
// check for scrollbars
Window *pChild = mpWindowImpl->mpFirstChild;
@@ -9532,24 +9555,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 );
+ uno::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
@@ -9558,7 +9581,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);
}
@@ -9590,16 +9613,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
@@ -9607,15 +9630,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
@@ -9627,9 +9650,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;
}
}
@@ -9644,11 +9667,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 )
{
@@ -9673,7 +9696,7 @@ void Window::EnableNativeWidget( BOOL bEnable )
}
}
-BOOL Window::IsNativeWidgetEnabled() const
+sal_Bool Window::IsNativeWidgetEnabled() const
{
return ImplGetWinData()->mbEnableNativeWidget;
}
@@ -9682,12 +9705,12 @@ BOOL Window::IsNativeWidgetEnabled() const
#include <salframe.h>
#endif
-Reference< rendering::XCanvas > Window::ImplGetCanvas( const Size& rFullscreenSize,
+uno::Reference< rendering::XCanvas > Window::ImplGetCanvas( const Size& rFullscreenSize,
bool bFullscreen,
bool bSpriteCanvas ) const
{
// try to retrieve hard reference from weak member
- Reference< rendering::XCanvas > xCanvas( mpWindowImpl->mxCanvas );
+ uno::Reference< rendering::XCanvas > xCanvas( mpWindowImpl->mxCanvas );
// canvas still valid? Then we're done.
if( xCanvas.is() )
@@ -9726,23 +9749,23 @@ Reference< rendering::XCanvas > Window::ImplGetCanvas( const Size& rFullscreenSi
aArg[ 2 ] = makeAny( ::com::sun::star::awt::Rectangle( mnOutOffX, mnOutOffY, mnOutWidth, mnOutHeight ) );
aArg[ 3 ] = makeAny( mpWindowImpl->mbAlwaysOnTop ? sal_True : sal_False );
- aArg[ 4 ] = makeAny( Reference< awt::XWindow >(
+ aArg[ 4 ] = makeAny( uno::Reference< awt::XWindow >(
const_cast<Window*>(this)->GetComponentInterface(),
uno::UNO_QUERY ));
- Reference< XMultiServiceFactory > xFactory = vcl::unohelper::GetMultiServiceFactory();
+ uno::Reference< XMultiServiceFactory > xFactory = vcl::unohelper::GetMultiServiceFactory();
// Create canvas instance with window handle
// =========================================
if ( xFactory.is() )
{
- static ::vcl::DeleteUnoReferenceOnDeinit<XMultiServiceFactory> xStaticCanvasFactory(
- Reference<XMultiServiceFactory>(
+ static ::vcl::DeleteUnoReferenceOnDeinit<lang::XMultiServiceFactory> xStaticCanvasFactory(
+ uno::Reference<lang::XMultiServiceFactory>(
xFactory->createInstance(
OUString( RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.rendering.CanvasFactory") ) ),
UNO_QUERY ));
- uno::Reference<XMultiServiceFactory> xCanvasFactory(xStaticCanvasFactory.get());
+ uno::Reference<lang::XMultiServiceFactory> xCanvasFactory(xStaticCanvasFactory.get());
if(xCanvasFactory.is())
{
@@ -9789,37 +9812,37 @@ Reference< rendering::XCanvas > Window::ImplGetCanvas( const Size& rFullscreenSi
return xCanvas;
}
-Reference< rendering::XCanvas > Window::GetCanvas() const
+uno::Reference< rendering::XCanvas > Window::GetCanvas() const
{
return ImplGetCanvas( Size(), false, false );
}
-Reference< rendering::XSpriteCanvas > Window::GetSpriteCanvas() const
+uno::Reference< rendering::XSpriteCanvas > Window::GetSpriteCanvas() const
{
- Reference< rendering::XSpriteCanvas > xSpriteCanvas(
+ uno::Reference< rendering::XSpriteCanvas > xSpriteCanvas(
ImplGetCanvas( Size(), false, true ), uno::UNO_QUERY );
return xSpriteCanvas;
}
-Reference< ::com::sun::star::rendering::XSpriteCanvas > Window::GetFullscreenSpriteCanvas( const Size& rFullscreenSize ) const
+uno::Reference< ::com::sun::star::rendering::XSpriteCanvas > Window::GetFullscreenSpriteCanvas( const Size& rFullscreenSize ) const
{
- Reference< rendering::XSpriteCanvas > xSpriteCanvas(
+ uno::Reference< rendering::XSpriteCanvas > xSpriteCanvas(
ImplGetCanvas( rFullscreenSize, true, true ), uno::UNO_QUERY );
return xSpriteCanvas;
}
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" );
@@ -9952,8 +9975,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 e5b58a8b6f3c..669fce05a791 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_uLong 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_uLong 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 )
@@ -1523,47 +1523,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;
}
@@ -1594,7 +1594,7 @@ void Window::ImplFrameToOutput( Rectangle& rRect )
rRect.Bottom()-=mnOutOffY;
}
-void Window::SetCompoundControl( BOOL bCompound )
+void Window::SetCompoundControl( sal_Bool bCompound )
{
mpWindowImpl->mbCompoundControl = bCompound;
}
@@ -1638,77 +1638,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;
}
@@ -1718,22 +1718,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);
}
@@ -1743,7 +1743,7 @@ Color Window::GetControlForeground() const
return mpWindowImpl->maControlForeground;
}
-BOOL Window::IsControlForeground() const
+sal_Bool Window::IsControlForeground() const
{
return mpWindowImpl->mbControlForeground;
}
@@ -1753,12 +1753,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;
}
@@ -1768,128 +1768,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);
}
@@ -1904,7 +1904,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();
}
@@ -1912,7 +1912,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 )
@@ -1935,12 +1935,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 2fce7e52f24c..9cb38756e770 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -132,9 +132,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();
@@ -145,21 +145,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_uLong 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
@@ -175,15 +175,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
@@ -194,7 +194,7 @@ static BOOL ImplHandleMouseFloatMode( Window* pChild, const Point& rMousePos,
{
if ( pFloat->ImplIsMouseDown() )
pFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL );
- return TRUE;
+ return sal_True;
}
}
else
@@ -204,7 +204,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;
}
}
}
@@ -219,21 +219,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;
}
// -----------------------------------------------------------------------
@@ -245,7 +245,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 )
@@ -255,9 +255,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)
@@ -281,8 +281,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 )
@@ -302,24 +302,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;
}
// -----------------------------------------------------------------------
@@ -342,24 +342,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_uLong 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
@@ -382,7 +382,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 );
}
}
@@ -395,7 +395,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 );
@@ -407,7 +407,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),
@@ -560,7 +560,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 )
@@ -591,7 +591,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave,
nClicks,
sal_False );
- ULONG nCount = Application::ReleaseSolarMutex();
+ sal_uLong nCount = Application::ReleaseSolarMutex();
// FIXME: where do I get Action from ?
::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSource > xDragSource = pMouseDownWin->GetDragSource();
@@ -609,7 +609,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave,
}
}
else
- pMouseDownWin->ImplGetFrameData()->mbStartDragCalled = TRUE;
+ pMouseDownWin->ImplGetFrameData()->mbStartDragCalled = sal_True;
}
// test for mouseleave and mouseenter
@@ -623,8 +623,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
@@ -639,7 +639,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave,
}
pWinFrameData->mpMouseMoveWin = NULL;
- pWinFrameData->mbInMouseMove = FALSE;
+ pWinFrameData->mbInMouseMove = sal_False;
if ( pChild )
{
@@ -657,7 +657,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 )
@@ -669,7 +669,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave,
if ( nSVEvent == EVENT_MOUSEBUTTONDOWN )
{
const MouseSettings& rMSettings = pChild->GetSettings().GetMouseSettings();
- ULONG nDblClkTime = rMSettings.GetDoubleClickTime();
+ sal_uLong nDblClkTime = rMSettings.GetDoubleClickTime();
long nDblClkW = rMSettings.GetDoubleClickWidth();
long nDblClkH = rMSettings.GetDoubleClickHeight();
//long nMouseX = nX;
@@ -686,7 +686,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
{
@@ -725,7 +725,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;
}
@@ -734,15 +734,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 )
@@ -772,7 +772,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
@@ -783,16 +783,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;
}
}
}
@@ -803,7 +803,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave,
nRet = 1;
else
{
- pChild->ImplGetWindowImpl()->mbMouseButtonDown = FALSE;
+ pChild->ImplGetWindowImpl()->mbMouseButtonDown = sal_False;
pChild->MouseButtonDown( aMEvt );
}
}
@@ -816,7 +816,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave,
}
else
{
- pChild->ImplGetWindowImpl()->mbMouseButtonUp = FALSE;
+ pChild->ImplGetWindowImpl()->mbMouseButtonUp = sal_False;
pChild->MouseButtonUp( aMEvt );
}
}
@@ -831,7 +831,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 )
{
@@ -869,11 +869,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
{
@@ -882,7 +882,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
@@ -906,7 +906,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 );
}
}
}
@@ -961,20 +961,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:
@@ -997,11 +997,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();
@@ -1037,7 +1037,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) )
{
@@ -1047,7 +1047,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 );
@@ -1070,7 +1070,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)
{
@@ -1105,19 +1105,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#
@@ -1134,10 +1134,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;
@@ -1145,7 +1145,7 @@ static long ImplHandleKey( Window* pWindow, USHORT nSVEvent,
{
if( pWin->ImplGetWindowImpl()->mbToolBox )
{
- bToolboxFocus = TRUE;
+ bToolboxFocus = sal_True;
break;
}
else
@@ -1155,7 +1155,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 ) )
@@ -1168,10 +1168,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) )
{
@@ -1218,7 +1218,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;
@@ -1226,12 +1226,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#
@@ -1252,8 +1252,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_uLong nCursorPos, sal_uInt16 nCursorFlags )
{
ImplSVData* pSVData = ImplGetSVData();
Window* pChild = NULL;
@@ -1278,7 +1278,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
@@ -1297,7 +1297,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 )
@@ -1326,7 +1326,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,
@@ -1341,8 +1341,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 );
}
@@ -1357,7 +1357,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 )
@@ -1434,26 +1434,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;
}
// -----------------------------------------------------------------------
@@ -1470,8 +1470,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 )
@@ -1488,7 +1488,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;
@@ -1496,7 +1496,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
@@ -1550,7 +1550,7 @@ static long ImplHandleWheelEvent( Window* pWindow, const SalWheelMouseEvent& rEv
FloatingWindow* pLastLevelFloat = pSVData->maWinData.mpFirstFloat->ImplFindLastLevelFloat();
if( pLastLevelFloat )
{
- ULONG nPopupFlags = pLastLevelFloat->GetPopupModeFlags();
+ sal_uLong nPopupFlags = pLastLevelFloat->GetPopupModeFlags();
if ( nPopupFlags & FLOATWIN_POPUPMODE_ALLMOUSEBUTTONCLOSE )
{
pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL );
@@ -1562,7 +1562,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 )
{
@@ -1601,7 +1601,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 );
@@ -1628,7 +1628,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 ||
@@ -1659,13 +1659,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;
@@ -1691,7 +1691,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
@@ -1708,7 +1708,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;
@@ -1736,7 +1736,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 )
@@ -1747,21 +1747,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 )
@@ -1802,11 +1802,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();
}
}
@@ -1842,7 +1842,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
@@ -1886,7 +1886,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
@@ -2007,9 +2007,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) )
@@ -2021,9 +2021,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)) )
@@ -2041,7 +2041,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 ) );
@@ -2051,7 +2051,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 ) );
@@ -2061,7 +2061,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
@@ -2076,7 +2076,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
@@ -2091,12 +2091,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;
@@ -2146,11 +2146,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
@@ -2158,7 +2158,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.
@@ -2190,7 +2190,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();
@@ -2210,7 +2210,7 @@ static void ImplHandleSalSettings( Window* pWindow, USHORT nEvent )
}
else
{
- USHORT nType;
+ sal_uInt16 nType;
switch ( nEvent )
{
case SALEVENT_VOLUMECHANGED:
@@ -2224,7 +2224,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:
@@ -2274,7 +2274,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 )
{
@@ -2338,8 +2338,8 @@ static void ImplHandleSalSurroundingTextRequest( Window *pWindow,
// -----------------------------------------------------------------------
static void ImplHandleSurroundingTextSelectionChange( Window *pWindow,
- ULONG nStart,
- ULONG nEnd )
+ sal_uLong nStart,
+ sal_uLong nEnd )
{
Window* pChild = ImplGetKeyInputWindow( pWindow );
if( pChild )
@@ -2361,7 +2361,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();
@@ -2436,28 +2436,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:
@@ -2544,15 +2544,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:
@@ -2608,7 +2608,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_uLong)nEvent );
break;
#endif
}
diff --git a/vcl/source/window/wpropset.cxx b/vcl/source/window/wpropset.cxx
index 4aaa3f987b77..fcb0c560291e 100644
--- a/vcl/source/window/wpropset.cxx
+++ b/vcl/source/window/wpropset.cxx
@@ -293,7 +293,7 @@ IMPL_LINK( vcl::WindowPropertySet, ChildEventListener, VclWindowEvent*, pEvent )
= mpImpl->maProperties.find( pEvent->GetWindow()->getIdentifier() );
if( it != mpImpl->maProperties.end() ) // this is valid, some unnamed child may have sent an event
{
- ULONG nId = pEvent->GetId();
+ sal_uLong nId = pEvent->GetId();
// check if anything interesting happened
if(
// general windowy things
diff --git a/vcl/source/window/wrkwin.cxx b/vcl/source/window/wrkwin.cxx
index 8fb2f2f8346a..81c2b36345eb 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_uLong)0x00010000)
+#define WORKWIN_WINDOWSTATE_ALL ((sal_uLong)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_uLong 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/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx
index 076e36291ae6..d3c1afdd2efe 100644
--- a/vcl/unx/gtk/a11y/atkutil.cxx
+++ b/vcl/unx/gtk/a11y/atkutil.cxx
@@ -598,7 +598,7 @@ static void handle_menu_highlighted(::VclMenuEvent const * pEvent)
try
{
Menu* pMenu = pEvent->GetMenu();
- USHORT nPos = pEvent->GetItemPos();
+ sal_uInt16 nPos = pEvent->GetItemPos();
if( pMenu && nPos != 0xFFFF)
{
diff --git a/vcl/unx/gtk/a11y/atkwindow.cxx b/vcl/unx/gtk/a11y/atkwindow.cxx
index 5448235998e8..c4fdc54e9064 100644
--- a/vcl/unx/gtk/a11y/atkwindow.cxx
+++ b/vcl/unx/gtk/a11y/atkwindow.cxx
@@ -78,7 +78,7 @@ init_from_window( AtkObject *accessible, Window *pWindow )
*/
case AccessibleRole::WINDOW:
{
- USHORT type = WINDOW_WINDOW;
+ sal_uInt16 type = WINDOW_WINDOW;
bool parentIsMenuFloatingWindow = false;
Window *pParent = pWindow->GetParent();
diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
index f308822df147..329e6867206b 100644
--- a/vcl/unx/gtk/app/gtkdata.cxx
+++ b/vcl/unx/gtk/app/gtkdata.cxx
@@ -246,13 +246,15 @@ int GtkSalDisplay::GetDefaultMonitorNumber() const
int n = 0;
GdkScreen* pScreen = gdk_display_get_screen( m_pGdkDisplay, m_nDefaultScreen );
#if GTK_CHECK_VERSION(2,20,0)
- n = m_aXineramaScreenIndexMap[gdk_screen_get_primary_monitor(pScreen)];
+ n = gdk_screen_get_primary_monitor(pScreen);
#else
static screen_get_primary_monitor sym_gdk_screen_get_primary_monitor =
(screen_get_primary_monitor)osl_getAsciiFunctionSymbol( GetSalData()->m_pPlugin, "gdk_screen_get_primary_monitor" );
if (sym_gdk_screen_get_primary_monitor)
- n = m_aXineramaScreenIndexMap[sym_gdk_screen_get_primary_monitor( pScreen )];
+ n = sym_gdk_screen_get_primary_monitor( pScreen );
#endif
+ if( n >= 0 && size_t(n) < m_aXineramaScreenIndexMap.size() )
+ n = m_aXineramaScreenIndexMap[n];
return n;
}
@@ -527,7 +529,7 @@ public:
YieldFunc handle );
virtual void Remove( int fd );
- virtual void StartTimer( ULONG nMS );
+ virtual void StartTimer( sal_uLong nMS );
virtual void StopTimer();
virtual void Wakeup();
virtual void PostUserEvent();
@@ -727,7 +729,7 @@ gboolean GtkXLib::timeoutFn(gpointer data)
return FALSE;
}
-void GtkXLib::StartTimer( ULONG nMS )
+void GtkXLib::StartTimer( sal_uLong nMS )
{
m_nTimeoutMS = nMS; // for restarting
diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx
index 2cb92ecd8292..2b0e90dc9bc0 100644
--- a/vcl/unx/gtk/app/gtkinst.cxx
+++ b/vcl/unx/gtk/app/gtkinst.cxx
@@ -65,7 +65,7 @@ void GtkHookedYieldMutex::ThreadsEnter()
acquire();
if( !aYieldStack.empty() )
{ /* Previously called ThreadsLeave() */
- ULONG nCount = aYieldStack.front();
+ sal_uLong nCount = aYieldStack.front();
aYieldStack.pop_front();
while( nCount-- > 1 )
acquire();
@@ -188,19 +188,19 @@ GtkInstance::~GtkInstance()
DeInitAtkBridge();
}
-SalFrame* GtkInstance::CreateFrame( SalFrame* pParent, ULONG nStyle )
+SalFrame* GtkInstance::CreateFrame( SalFrame* pParent, sal_uLong nStyle )
{
return new GtkSalFrame( pParent, nStyle );
}
-SalFrame* GtkInstance::CreateChildFrame( SystemParentData* pParentData, ULONG )
+SalFrame* GtkInstance::CreateChildFrame( SystemParentData* pParentData, sal_uLong )
{
SalFrame* pFrame = new GtkSalFrame( pParentData );
return pFrame;
}
-SalObject* GtkInstance::CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow )
+SalObject* GtkInstance::CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, sal_Bool bShow )
{
// there is no method to set a visual for a GtkWidget
// so we need the X11SalObject in that case
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index ff615f5ede74..def25a0bac9d 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -48,11 +48,11 @@
typedef struct _cairo_font_options cairo_font_options_t;
// initialize statics
-BOOL GtkSalGraphics::bThemeChanged = TRUE;
-BOOL GtkSalGraphics::bNeedPixmapPaint = FALSE;
-BOOL GtkSalGraphics::bGlobalNeedPixmapPaint = FALSE;
-BOOL GtkSalGraphics::bToolbarGripWorkaround = FALSE;
-BOOL GtkSalGraphics::bNeedButtonStyleAsEditBackgroundWorkaround = FALSE;
+sal_Bool GtkSalGraphics::bThemeChanged = sal_True;
+sal_Bool GtkSalGraphics::bNeedPixmapPaint = sal_False;
+sal_Bool GtkSalGraphics::bGlobalNeedPixmapPaint = sal_False;
+sal_Bool GtkSalGraphics::bToolbarGripWorkaround = sal_False;
+sal_Bool GtkSalGraphics::bNeedButtonStyleAsEditBackgroundWorkaround = sal_False;
GtkSalGraphics::~GtkSalGraphics()
{
@@ -269,7 +269,7 @@ public:
{ delete [] pData; m_idx = 0; m_size = n; pData = new NWPixmapCacheData[m_size]; }
int GetSize() { return m_size; }
- BOOL Find( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkPixmap** pPixmap );
+ sal_Bool Find( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkPixmap** pPixmap );
void Fill( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkPixmap* pPixmap );
void ThemeChanged();
@@ -322,7 +322,7 @@ void NWPixmapCache::ThemeChanged()
pData[i].SetPixmap( NULL );
}
-BOOL NWPixmapCache::Find( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkPixmap** pPixmap )
+sal_Bool NWPixmapCache::Find( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkPixmap** pPixmap )
{
aState &= ~CTRL_CACHING_ALLOWED; // mask clipping flag
int i;
@@ -335,10 +335,10 @@ BOOL NWPixmapCache::Find( ControlType aType, ControlState aState, const Rectang
pData[i].m_pixmap != NULL )
{
*pPixmap = pData[i].m_pixmap;
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
void NWPixmapCache::Fill( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkPixmap* pPixmap )
@@ -479,30 +479,13 @@ void GtkSalGraphics::ResetClipRegion()
X11SalGraphics::ResetClipRegion();
}
-void GtkSalGraphics::BeginSetClipRegion( ULONG nCount )
-{
- m_aClipRegion.SetNull();
- X11SalGraphics::BeginSetClipRegion( nCount );
-}
-
-BOOL GtkSalGraphics::unionClipRegion( long nX, long nY, long nWidth, long nHeight )
-{
- Rectangle aRect( Point( nX, nY ), Size( nWidth, nHeight ) );
- m_aClipRegion.Union( aRect );
- return X11SalGraphics::unionClipRegion( nX, nY, nWidth, nHeight );
-}
-
-bool GtkSalGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& )
-{
- // TODO: implement and advertise OutDevSupport_B2DClip support
- return false;
-}
-
-void GtkSalGraphics::EndSetClipRegion()
+bool GtkSalGraphics::setClipRegion( const Region& i_rClip )
{
+ m_aClipRegion = i_rClip;
+ bool bRet = X11SalGraphics::setClipRegion( m_aClipRegion );
if( m_aClipRegion.IsEmpty() )
m_aClipRegion.SetNull();
- X11SalGraphics::EndSetClipRegion();
+ return bRet;
}
void GtkSalGraphics::copyBits( const SalTwoRect* pPosAry,
@@ -533,10 +516,10 @@ void GtkSalGraphics::copyBits( const SalTwoRect* pPosAry,
/*
* IsNativeControlSupported()
*
- * Returns TRUE if the platform supports native
+ * Returns sal_True if the platform supports native
* drawing of the control defined by nPart
*/
-BOOL GtkSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nPart )
+sal_Bool GtkSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nPart )
{
if (
((nType==CTRL_PUSHBUTTON) && (nPart==PART_ENTIRE_CONTROL)) ||
@@ -603,26 +586,26 @@ BOOL GtkSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nP
)
)
)
- return( TRUE );
+ return( sal_True );
- return( FALSE );
+ return( sal_False );
}
/*
* HitTestNativeControl()
*
- * bIsInside is set to TRUE if aPos is contained within the
+ * bIsInside is set to sal_True if aPos is contained within the
* given part of the control, whose bounding region is
* given by rControlRegion (in VCL frame coordinates).
*
* returns whether bIsInside was really set.
*/
-BOOL GtkSalGraphics::hitTestNativeControl( ControlType nType,
+sal_Bool GtkSalGraphics::hitTestNativeControl( ControlType nType,
ControlPart nPart,
const Rectangle& rControlRegion,
const Point& aPos,
- BOOL& rIsInside )
+ sal_Bool& rIsInside )
{
if ( ( nType == CTRL_SCROLLBAR ) &&
( ( nPart == PART_BUTTON_UP ) ||
@@ -645,7 +628,7 @@ BOOL GtkSalGraphics::hitTestNativeControl( ControlType nType,
Rectangle aForward;
Rectangle aBackward;
- rIsInside = FALSE;
+ rIsInside = sal_False;
ControlPart nCounterPart = 0;
if ( nPart == PART_BUTTON_UP )
@@ -704,17 +687,17 @@ BOOL GtkSalGraphics::hitTestNativeControl( ControlType nType,
if ( has_forward2 )
rIsInside |= aForward.IsInside( aPos );
}
- return ( TRUE );
+ return ( sal_True );
}
if( IsNativeControlSupported(nType, nPart) )
{
rIsInside = rControlRegion.IsInside( aPos );
- return( TRUE );
+ return( sal_True );
}
else
{
- return( FALSE );
+ return( sal_False );
}
}
@@ -728,14 +711,14 @@ BOOL GtkSalGraphics::hitTestNativeControl( ControlType nType,
* aValue: An optional value (tristate/numerical/string)
* rCaption: A caption or title string (like button text etc)
*/
-BOOL GtkSalGraphics::drawNativeControl( ControlType nType,
+sal_Bool GtkSalGraphics::drawNativeControl( ControlType nType,
ControlPart nPart,
const Rectangle& rControlRegion,
ControlState nState,
const ImplControlValue& aValue,
const OUString& rCaption )
{
- BOOL returnVal = FALSE;
+ sal_Bool returnVal = sal_False;
// get a GC with current clipping region set
GetFontGC();
@@ -747,7 +730,7 @@ BOOL GtkSalGraphics::drawNativeControl( ControlType nType,
for( unsigned int i = 0; i < gWidgetData.size(); i++ )
if( gWidgetData[i].gNWPixmapCacheList )
gWidgetData[i].gNWPixmapCacheList->ThemeChanged();
- GtkSalGraphics::bThemeChanged = FALSE;
+ GtkSalGraphics::bThemeChanged = sal_False;
}
Rectangle aCtrlRect( rControlRegion );
@@ -774,7 +757,7 @@ BOOL GtkSalGraphics::drawNativeControl( ControlType nType,
Size( aCtrlRect.GetWidth()+2, aCtrlRect.GetHeight()+2) );
pixmap = NWGetPixmapFromScreen( aPixmapRect );
if( ! pixmap )
- return FALSE;
+ return sal_False;
gdkDrawable = GDK_DRAWABLE( pixmap );
aCtrlRect = Rectangle( Point(1,1), aCtrlRect.GetSize() );
aClip.push_back( aCtrlRect );
@@ -835,7 +818,7 @@ BOOL GtkSalGraphics::drawNativeControl( ControlType nType,
else if ( (nType==CTRL_TAB_ITEM) || (nType==CTRL_TAB_PANE) || (nType==CTRL_TAB_BODY) || (nType==CTRL_FIXEDBORDER) )
{
if ( nType == CTRL_TAB_BODY )
- returnVal = TRUE;
+ returnVal = sal_True;
else
returnVal = NWPaintGTKTabItem( nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption);
}
@@ -902,22 +885,22 @@ BOOL GtkSalGraphics::drawNativeControl( ControlType nType,
* aValue: An optional value (tristate/numerical/string)
* rCaption: A caption or title string (like button text etc)
*/
-BOOL GtkSalGraphics::drawNativeControlText( ControlType,
+sal_Bool GtkSalGraphics::drawNativeControlText( ControlType,
ControlPart,
const Rectangle&,
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 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.
@@ -926,7 +909,7 @@ BOOL GtkSalGraphics::drawNativeControlText( ControlType,
* aValue: An optional value (tristate/numerical/string)
* rCaption: A caption or title string (like button text etc)
*/
-BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
+sal_Bool GtkSalGraphics::getNativeControlRegion( ControlType nType,
ControlPart nPart,
const Rectangle& rControlRegion,
ControlState nState,
@@ -935,7 +918,7 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
Rectangle &rNativeBoundingRegion,
Rectangle &rNativeContentRegion )
{
- BOOL returnVal = FALSE;
+ sal_Bool returnVal = sal_False;
if ( (nType==CTRL_PUSHBUTTON) && (nPart==PART_ENTIRE_CONTROL)
&& (rControlRegion.GetWidth() > 16)
@@ -945,7 +928,7 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
nState, aValue, rCaption );
rNativeContentRegion = rControlRegion;
- returnVal = TRUE;
+ returnVal = sal_True;
}
if ( (nType==CTRL_COMBOBOX) && ((nPart==PART_BUTTON_DOWN) || (nPart==PART_SUB_EDIT)) )
{
@@ -953,7 +936,7 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
aValue, rCaption );
rNativeContentRegion = rNativeBoundingRegion;
- returnVal = TRUE;
+ returnVal = sal_True;
}
if ( (nType==CTRL_SPINBOX) && ((nPart==PART_BUTTON_UP) || (nPart==PART_BUTTON_DOWN) || (nPart==PART_SUB_EDIT)) )
{
@@ -962,7 +945,7 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
aValue, rCaption );
rNativeContentRegion = rNativeBoundingRegion;
- returnVal = TRUE;
+ returnVal = sal_True;
}
if ( (nType==CTRL_LISTBOX) && ((nPart==PART_BUTTON_DOWN) || (nPart==PART_SUB_EDIT)) )
{
@@ -970,7 +953,7 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
aValue, rCaption );
rNativeContentRegion = rNativeBoundingRegion;
- returnVal = TRUE;
+ returnVal = sal_True;
}
if ( (nType==CTRL_TOOLBAR) &&
((nPart==PART_DRAW_BACKGROUND_HORZ) ||
@@ -982,7 +965,7 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
{
rNativeBoundingRegion = NWGetToolbarRect( m_nScreen, nType, nPart, rControlRegion, nState, aValue, rCaption );
rNativeContentRegion = rNativeBoundingRegion;
- returnVal = TRUE;
+ returnVal = sal_True;
}
if ( (nType==CTRL_SCROLLBAR) && ((nPart==PART_BUTTON_LEFT) || (nPart==PART_BUTTON_RIGHT) ||
(nPart==PART_BUTTON_UP) || (nPart==PART_BUTTON_DOWN) ) )
@@ -990,7 +973,7 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
rNativeBoundingRegion = NWGetScrollButtonRect( m_nScreen, nPart, rControlRegion );
rNativeContentRegion = rNativeBoundingRegion;
- returnVal = TRUE;
+ returnVal = sal_True;
}
if( (nType == CTRL_MENUBAR) && (nPart == PART_ENTIRE_CONTROL) )
{
@@ -1002,7 +985,7 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
Size( aMenuBarRect.GetWidth(), aReq.height+1 ) );
rNativeBoundingRegion = aMenuBarRect;
rNativeContentRegion = rNativeBoundingRegion;
- returnVal = TRUE;
+ returnVal = sal_True;
}
if( (nType == CTRL_MENU_POPUP) )
{
@@ -1022,7 +1005,7 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
(rControlRegion.GetHeight()-indicator_size)/2),
Size( indicator_size, indicator_size ) );
rNativeContentRegion = aIndicatorRect;
- returnVal = TRUE;
+ returnVal = sal_True;
}
}
if( (nType == CTRL_RADIOBUTTON || nType == CTRL_CHECKBOX) )
@@ -1041,7 +1024,7 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
(rControlRegion.GetHeight()-indicator_size)/2),
Size( indicator_size, indicator_size ) );
rNativeContentRegion = aIndicatorRect;
- returnVal = TRUE;
+ returnVal = sal_True;
}
if( (nType == CTRL_EDITBOX || nType == CTRL_SPINBOX) && nPart == PART_ENTIRE_CONTROL )
{
@@ -1055,7 +1038,7 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
Size( aEditRect.GetWidth(), nHeight ) );
rNativeBoundingRegion = aEditRect;
rNativeContentRegion = rNativeBoundingRegion;
- returnVal = TRUE;
+ returnVal = sal_True;
}
if( (nType == CTRL_SLIDER) && (nPart == PART_THUMB_HORZ || nPart == PART_THUMB_VERT) )
{
@@ -1079,7 +1062,7 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
aRect.Right() = aRect.Left() + slider_width - 1;
}
rNativeBoundingRegion = rNativeContentRegion = aRect;
- returnVal = TRUE;
+ returnVal = sal_True;
}
return( returnVal );
@@ -1089,7 +1072,7 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
/************************************************************************
* Individual control drawing functions
************************************************************************/
-BOOL GtkSalGraphics::NWPaintGTKButton(
+sal_Bool GtkSalGraphics::NWPaintGTKButton(
GdkDrawable* gdkDrawable,
ControlType, ControlPart,
const Rectangle& rControlRectangle,
@@ -1102,7 +1085,7 @@ BOOL GtkSalGraphics::NWPaintGTKButton(
gboolean interiorFocus;
gint focusWidth;
gint focusPad;
- BOOL bDrawFocus = TRUE;
+ sal_Bool bDrawFocus = sal_True;
gint x, y, w, h;
GtkBorder aDefBorder;
GtkBorder* pBorder;
@@ -1133,7 +1116,7 @@ BOOL GtkSalGraphics::NWPaintGTKButton(
// If the button is too small, don't ever draw focus or grab more space
if ( (w < 16) || (h < 16) )
- bDrawFocus = FALSE;
+ bDrawFocus = sal_False;
NWSetWidgetState( gWidgetData[m_nScreen].gBtnWidget, nState, stateType );
@@ -1203,7 +1186,7 @@ BOOL GtkSalGraphics::NWPaintGTKButton(
}
#endif
- return( TRUE );
+ return( sal_True );
}
static Rectangle NWGetButtonArea( int nScreen,
@@ -1215,7 +1198,7 @@ static Rectangle NWGetButtonArea( int nScreen,
gint focusPad;
GtkBorder aDefBorder;
GtkBorder * pBorder;
- BOOL bDrawFocus = TRUE;
+ sal_Bool bDrawFocus = sal_True;
Rectangle aRect;
gint x, y, w, h;
@@ -1242,7 +1225,7 @@ static Rectangle NWGetButtonArea( int nScreen,
// If the button is too small, don't ever draw focus or grab more space
if ( (w < 16) || (h < 16) )
- bDrawFocus = FALSE;
+ bDrawFocus = sal_False;
if ( (nState & CTRL_STATE_DEFAULT) && bDrawFocus )
{
@@ -1259,7 +1242,7 @@ static Rectangle NWGetButtonArea( int nScreen,
//-------------------------------------
-BOOL GtkSalGraphics::NWPaintGTKRadio( GdkDrawable* gdkDrawable,
+sal_Bool GtkSalGraphics::NWPaintGTKRadio( GdkDrawable* gdkDrawable,
ControlType, ControlPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
@@ -1269,7 +1252,7 @@ BOOL GtkSalGraphics::NWPaintGTKRadio( GdkDrawable* gdkDrawable,
{
GtkStateType stateType;
GtkShadowType shadowType;
- BOOL isChecked = (aValue.getTristateVal()==BUTTONVALUE_ON);
+ sal_Bool isChecked = (aValue.getTristateVal()==BUTTONVALUE_ON);
gint x, y;
GdkRectangle clipRect;
@@ -1297,7 +1280,7 @@ BOOL GtkSalGraphics::NWPaintGTKRadio( GdkDrawable* gdkDrawable,
// intermediate states between active/inactive. Let's hope that
// GtkToggleButtone stays binary compatible.
if (!isChecked)
- GTK_TOGGLE_BUTTON(gWidgetData[m_nScreen].gRadioWidgetSibling)->active = TRUE;
+ GTK_TOGGLE_BUTTON(gWidgetData[m_nScreen].gRadioWidgetSibling)->active = sal_True;
GTK_TOGGLE_BUTTON(gWidgetData[m_nScreen].gRadioWidget)->active = isChecked;
for( clipList::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
@@ -1312,12 +1295,12 @@ BOOL GtkSalGraphics::NWPaintGTKRadio( GdkDrawable* gdkDrawable,
x, y, indicator_size, indicator_size );
}
- return( TRUE );
+ return( sal_True );
}
//-------------------------------------
-BOOL GtkSalGraphics::NWPaintGTKCheck( GdkDrawable* gdkDrawable,
+sal_Bool GtkSalGraphics::NWPaintGTKCheck( GdkDrawable* gdkDrawable,
ControlType, ControlPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
@@ -1359,7 +1342,7 @@ BOOL GtkSalGraphics::NWPaintGTKCheck( GdkDrawable* gdkDrawable,
x, y, indicator_size, indicator_size );
}
- return( TRUE );
+ return( sal_True );
}
//-------------------------------------
@@ -1375,7 +1358,7 @@ static void NWCalcArrowRect( const Rectangle& rButton, Rectangle& rArrow )
) );
}
-BOOL GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
+sal_Bool GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList&,
ControlState nState,
@@ -1430,7 +1413,7 @@ BOOL GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
scrollbarRect = pixmapRect;
if ( (scrollbarRect.GetWidth() <= 1) || (scrollbarRect.GetHeight() <= 1) )
- return( TRUE );
+ return( sal_True );
// Grab some button style attributes
gtk_widget_style_get( gWidgetData[m_nScreen].gScrollHorizWidget,
@@ -1556,7 +1539,7 @@ BOOL GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
thumbRect.Move( (scrollbarRect.GetWidth() - slider_width) / 2, 0 );
}
- BOOL has_slider = ( thumbRect.GetWidth() > 0 && thumbRect.GetHeight() > 0 );
+ sal_Bool has_slider = ( thumbRect.GetWidth() > 0 && thumbRect.GetHeight() > 0 );
scrollbarValues = gtk_range_get_adjustment( GTK_RANGE(scrollbarWidget) );
if ( scrollbarValues == NULL )
@@ -1581,7 +1564,7 @@ BOOL GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
// painting them directly to the window flickers
pixmap = NWGetPixmapFromScreen( pixmapRect );
if( ! pixmap )
- return FALSE;
+ return sal_False;
x = y = 0;
w = pixmapRect.GetWidth();
@@ -1635,7 +1618,7 @@ BOOL GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
// ----------------- ARROW 1
NWCalcArrowRect( button11BoundRect, arrowRect );
gtk_paint_arrow( style, gdkDrawable, stateType, shadowType,
- gdkRect, GTK_WIDGET(scrollbarWidget), scrollbarTag, button1Type, TRUE,
+ gdkRect, GTK_WIDGET(scrollbarWidget), scrollbarTag, button1Type, sal_True,
x+hShim+arrowRect.Left(), y+vShim+arrowRect.Top(),
arrowRect.GetWidth(), arrowRect.GetHeight() );
}
@@ -1650,7 +1633,7 @@ BOOL GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
// ----------------- ARROW 1
NWCalcArrowRect( button12BoundRect, arrowRect );
gtk_paint_arrow( style, gdkDrawable, stateType, shadowType,
- gdkRect, GTK_WIDGET(scrollbarWidget), scrollbarTag, button2Type, TRUE,
+ gdkRect, GTK_WIDGET(scrollbarWidget), scrollbarTag, button2Type, sal_True,
x+hShim+arrowRect.Left(), y+vShim+arrowRect.Top(),
arrowRect.GetWidth(), arrowRect.GetHeight() );
}
@@ -1666,7 +1649,7 @@ BOOL GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
// ----------------- ARROW 2
NWCalcArrowRect( button21BoundRect, arrowRect );
gtk_paint_arrow( style, gdkDrawable, stateType, shadowType,
- gdkRect, GTK_WIDGET(scrollbarWidget), scrollbarTag, button1Type, TRUE,
+ gdkRect, GTK_WIDGET(scrollbarWidget), scrollbarTag, button1Type, sal_True,
x+hShim+arrowRect.Left(), y+vShim+arrowRect.Top(),
arrowRect.GetWidth(), arrowRect.GetHeight() );
}
@@ -1681,7 +1664,7 @@ BOOL GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
// ----------------- ARROW 2
NWCalcArrowRect( button22BoundRect, arrowRect );
gtk_paint_arrow( style, gdkDrawable, stateType, shadowType,
- gdkRect, GTK_WIDGET(scrollbarWidget), scrollbarTag, button2Type, TRUE,
+ gdkRect, GTK_WIDGET(scrollbarWidget), scrollbarTag, button2Type, sal_True,
x+hShim+arrowRect.Left(), y+vShim+arrowRect.Top(),
arrowRect.GetWidth(), arrowRect.GetHeight() );
}
@@ -1689,11 +1672,11 @@ BOOL GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
if( !NWRenderPixmapToScreen(pixmap, pixmapRect) )
{
g_object_unref( pixmap );
- return( FALSE );
+ return( sal_False );
}
g_object_unref( pixmap );
- return( TRUE );
+ return( sal_True );
}
//---
@@ -1781,7 +1764,7 @@ static Rectangle NWGetScrollButtonRect( int nScreen, ControlPart nPart, Rectangl
//-------------------------------------
-BOOL GtkSalGraphics::NWPaintGTKEditBox( GdkDrawable* gdkDrawable,
+sal_Bool GtkSalGraphics::NWPaintGTKEditBox( GdkDrawable* gdkDrawable,
ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
@@ -1806,7 +1789,7 @@ BOOL GtkSalGraphics::NWPaintGTKEditBox( GdkDrawable* gdkDrawable,
NWPaintOneEditBox( m_nScreen, gdkDrawable, &clipRect, nType, nPart, pixmapRect, nState, aValue, rCaption );
}
- return( TRUE );
+ return( sal_True );
}
@@ -1919,7 +1902,7 @@ static void NWPaintOneEditBox( int nScreen,
//-------------------------------------
-BOOL GtkSalGraphics::NWPaintGTKSpinBox( ControlType nType, ControlPart nPart,
+sal_Bool GtkSalGraphics::NWPaintGTKSpinBox( ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList&,
ControlState nState,
@@ -1970,7 +1953,7 @@ BOOL GtkSalGraphics::NWPaintGTKSpinBox( ControlType nType, ControlPart nPart,
pixmap = NWGetPixmapFromScreen( pixmapRect );
if ( !pixmap )
- return( FALSE );
+ return( sal_False );
upBtnRect = NWGetSpinButtonRect( m_nScreen, nType, upBtnPart, pixmapRect, upBtnState, aValue, rCaption );
downBtnRect = NWGetSpinButtonRect( m_nScreen, nType, downBtnPart, pixmapRect, downBtnState, aValue, rCaption );
@@ -2006,11 +1989,11 @@ BOOL GtkSalGraphics::NWPaintGTKSpinBox( ControlType nType, ControlPart nPart,
if( !NWRenderPixmapToScreen(pixmap, pixmapRect) )
{
g_object_unref( pixmap );
- return( FALSE );
+ return( sal_False );
}
g_object_unref( pixmap );
- return( TRUE );
+ return( sal_True );
}
//---
@@ -2093,7 +2076,7 @@ static void NWPaintOneSpinButton( int nScreen,
arrowRect.setY( buttonRect.Top() + (buttonRect.GetHeight() - arrowRect.GetHeight()) / 2 - 1);
gtk_paint_arrow( gWidgetData[nScreen].gSpinButtonWidget->style, pixmap, stateType, GTK_SHADOW_OUT, NULL, gWidgetData[nScreen].gSpinButtonWidget,
- "spinbutton", (nPart == PART_BUTTON_UP) ? GTK_ARROW_UP : GTK_ARROW_DOWN, TRUE,
+ "spinbutton", (nPart == PART_BUTTON_UP) ? GTK_ARROW_UP : GTK_ARROW_DOWN, sal_True,
(arrowRect.Left() - aAreaRect.Left()), (arrowRect.Top() - aAreaRect.Top()),
arrowRect.GetWidth(), arrowRect.GetHeight() );
}
@@ -2101,7 +2084,7 @@ static void NWPaintOneSpinButton( int nScreen,
//-------------------------------------
-BOOL GtkSalGraphics::NWPaintGTKComboBox( GdkDrawable* gdkDrawable,
+sal_Bool GtkSalGraphics::NWPaintGTKComboBox( GdkDrawable* gdkDrawable,
ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
@@ -2169,12 +2152,12 @@ BOOL GtkSalGraphics::NWPaintGTKComboBox( GdkDrawable* gdkDrawable,
buttonRect.GetWidth(), buttonRect.GetHeight() );
gtk_paint_arrow( gWidgetData[m_nScreen].gArrowWidget->style, gdkDrawable, stateType, shadowType,
- &clipRect, gWidgetData[m_nScreen].gArrowWidget, "arrow", GTK_ARROW_DOWN, TRUE,
+ &clipRect, gWidgetData[m_nScreen].gArrowWidget, "arrow", GTK_ARROW_DOWN, sal_True,
x+(arrowRect.Left() - pixmapRect.Left()), y+(arrowRect.Top() - pixmapRect.Top()),
arrowRect.GetWidth(), arrowRect.GetHeight() );
}
- return( TRUE );
+ return( sal_True );
}
//----
@@ -2234,7 +2217,7 @@ static Rectangle NWGetComboBoxButtonRect( int nScreen,
-BOOL GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
+sal_Bool GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
const Rectangle& rControlRectangle,
const clipList&,
ControlState nState,
@@ -2368,14 +2351,14 @@ BOOL GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
else
aCachePage.Fill( nType, nState, pixmapRect, pixmap );
- BOOL bSuccess = NWRenderPixmapToScreen(pixmap, pixmapRect);
+ sal_Bool bSuccess = NWRenderPixmapToScreen(pixmap, pixmapRect);
g_object_unref( pixmap );
return bSuccess;
}
//-------------------------------------
-BOOL GtkSalGraphics::NWPaintGTKListBox( GdkDrawable* gdkDrawable,
+sal_Bool GtkSalGraphics::NWPaintGTKListBox( GdkDrawable* gdkDrawable,
ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
@@ -2466,10 +2449,10 @@ BOOL GtkSalGraphics::NWPaintGTKListBox( GdkDrawable* gdkDrawable,
}
}
- return( TRUE );
+ return( sal_True );
}
-BOOL GtkSalGraphics::NWPaintGTKToolbar(
+sal_Bool GtkSalGraphics::NWPaintGTKToolbar(
GdkDrawable* gdkDrawable,
ControlType, ControlPart nPart,
const Rectangle& rControlRectangle,
@@ -2615,12 +2598,12 @@ BOOL GtkSalGraphics::NWPaintGTKToolbar(
}
}
- return( TRUE );
+ return( sal_True );
}
//----
-BOOL GtkSalGraphics::NWPaintGTKMenubar(
+sal_Bool GtkSalGraphics::NWPaintGTKMenubar(
GdkDrawable* gdkDrawable,
ControlType, ControlPart nPart,
const Rectangle& rControlRectangle,
@@ -2702,10 +2685,10 @@ BOOL GtkSalGraphics::NWPaintGTKMenubar(
}
}
- return( TRUE );
+ return( sal_True );
}
-BOOL GtkSalGraphics::NWPaintGTKPopupMenu(
+sal_Bool GtkSalGraphics::NWPaintGTKPopupMenu(
GdkDrawable* gdkDrawable,
ControlType, ControlPart nPart,
const Rectangle& rControlRectangle,
@@ -2716,7 +2699,7 @@ BOOL GtkSalGraphics::NWPaintGTKPopupMenu(
// #i50745# gtk does not draw disabled menu entries (and crux theme
// even crashes), draw them using vcl functionality.
if( nPart == PART_MENU_ITEM && ! (nState & CTRL_STATE_ENABLED) )
- return FALSE;
+ return sal_False;
GtkStateType stateType;
GtkShadowType shadowType;
@@ -2832,10 +2815,10 @@ BOOL GtkSalGraphics::NWPaintGTKPopupMenu(
}
}
- return( TRUE );
+ return( sal_True );
}
-BOOL GtkSalGraphics::NWPaintGTKTooltip(
+sal_Bool GtkSalGraphics::NWPaintGTKTooltip(
GdkDrawable* gdkDrawable,
ControlType, ControlPart,
const Rectangle& rControlRectangle,
@@ -2870,10 +2853,10 @@ BOOL GtkSalGraphics::NWPaintGTKTooltip(
x, y, w, h );
}
- return( TRUE );
+ return( sal_True );
}
-BOOL GtkSalGraphics::NWPaintGTKListNode(
+sal_Bool GtkSalGraphics::NWPaintGTKListNode(
GdkDrawable*,
ControlType, ControlPart,
const Rectangle& rControlRectangle,
@@ -2909,7 +2892,7 @@ BOOL GtkSalGraphics::NWPaintGTKListNode(
GdkPixmap* pixmap = NWGetPixmapFromScreen( aRect );
if( ! pixmap )
- return FALSE;
+ return sal_False;
GdkDrawable* const &pixDrawable = GDK_DRAWABLE( pixmap );
gtk_paint_expander( gWidgetData[m_nScreen].gTreeView->style,
@@ -2921,13 +2904,13 @@ BOOL GtkSalGraphics::NWPaintGTKListNode(
w/2, h/2,
eStyle );
- BOOL bRet = NWRenderPixmapToScreen( pixmap, aRect );
+ sal_Bool bRet = NWRenderPixmapToScreen( pixmap, aRect );
g_object_unref( pixmap );
return bRet;
}
-BOOL GtkSalGraphics::NWPaintGTKProgress(
+sal_Bool GtkSalGraphics::NWPaintGTKProgress(
GdkDrawable*,
ControlType, ControlPart,
const Rectangle& rControlRectangle,
@@ -2945,7 +2928,7 @@ BOOL GtkSalGraphics::NWPaintGTKProgress(
GdkPixmap* pixmap = NWGetPixmapFromScreen( Rectangle( Point( 0, 0 ), Size( w, h ) ) );
if( ! pixmap )
- return FALSE;
+ return sal_False;
GdkDrawable* const &pixDrawable = GDK_DRAWABLE( pixmap );
@@ -2985,13 +2968,13 @@ BOOL GtkSalGraphics::NWPaintGTKProgress(
}
}
- BOOL bRet = NWRenderPixmapToScreen( pixmap, rControlRectangle );
+ sal_Bool bRet = NWRenderPixmapToScreen( pixmap, rControlRectangle );
g_object_unref( pixmap );
return bRet;
}
-BOOL GtkSalGraphics::NWPaintGTKSlider(
+sal_Bool GtkSalGraphics::NWPaintGTKSlider(
GdkDrawable*,
ControlType, ControlPart nPart,
const Rectangle& rControlRectangle,
@@ -3010,7 +2993,7 @@ BOOL GtkSalGraphics::NWPaintGTKSlider(
GdkPixmap* pixmap = NWGetPixmapFromScreen( rControlRectangle );
if( ! pixmap )
- return FALSE;
+ return sal_False;
GdkDrawable* const &pixDrawable = GDK_DRAWABLE( pixmap );
GtkWidget* pWidget = (nPart == PART_TRACK_HORZ_AREA)
@@ -3111,7 +3094,7 @@ BOOL GtkSalGraphics::NWPaintGTKSlider(
}
#endif
- BOOL bRet = NWRenderPixmapToScreen( pixmap, rControlRectangle );
+ sal_Bool bRet = NWRenderPixmapToScreen( pixmap, rControlRectangle );
g_object_unref( pixmap );
return bRet;
@@ -3360,9 +3343,9 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
else
{
Color aColor2 = aStyleSet.GetLightColor();
- Color aCheck( (BYTE)(((USHORT)aBackColor.GetRed()+(USHORT)aColor2.GetRed())/2),
- (BYTE)(((USHORT)aBackColor.GetGreen()+(USHORT)aColor2.GetGreen())/2),
- (BYTE)(((USHORT)aBackColor.GetBlue()+(USHORT)aColor2.GetBlue())/2)
+ Color aCheck( (sal_uInt8)(((sal_uInt16)aBackColor.GetRed()+(sal_uInt16)aColor2.GetRed())/2),
+ (sal_uInt8)(((sal_uInt16)aBackColor.GetGreen()+(sal_uInt16)aColor2.GetGreen())/2),
+ (sal_uInt8)(((sal_uInt16)aBackColor.GetBlue()+(sal_uInt16)aColor2.GetBlue())/2)
);
aStyleSet.SetCheckedColor( aCheck );
}
@@ -3398,7 +3381,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
aStyleSet.SetInactiveTabColor( aSelectedBackColor );
// menu disabled entries handling
- aStyleSet.SetSkipDisabledInMenus( TRUE );
+ aStyleSet.SetSkipDisabledInMenus( sal_True );
// menu colors
GtkStyle* pMenuStyle = gtk_widget_get_style( gWidgetData[m_nScreen].gMenuWidget );
GtkStyle* pMenuItemStyle = gtk_rc_get_style( gWidgetData[m_nScreen].gMenuItemMenuWidget );
@@ -3684,18 +3667,18 @@ GdkPixmap* GtkSalGraphics::NWGetPixmapFromScreen( Rectangle srcRect )
* Copy an alpha pixmap to screen using a gc with clipping
************************************************************************/
-BOOL GtkSalGraphics::NWRenderPixmapToScreen( GdkPixmap* pPixmap, Rectangle dstRect )
+sal_Bool GtkSalGraphics::NWRenderPixmapToScreen( GdkPixmap* pPixmap, Rectangle dstRect )
{
// The GC can't be null, otherwise we'd have no clip region
GC aFontGC = GetFontGC();
if( aFontGC == NULL )
{
std::fprintf(stderr, "salnativewidgets.cxx: no valid GC\n" );
- return( FALSE );
+ return( sal_False );
}
if ( !pPixmap )
- return( FALSE );
+ return( sal_False );
// Copy the background of the screen into a composite pixmap
CopyScreenArea( GetXDisplay(),
@@ -3706,7 +3689,7 @@ BOOL GtkSalGraphics::NWRenderPixmapToScreen( GdkPixmap* pPixmap, Rectangle dstRe
aFontGC,
0, 0, dstRect.GetWidth(), dstRect.GetHeight(), dstRect.Left(), dstRect.Top() );
- return( TRUE );
+ return( sal_True );
}
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 9181ee3fd40d..aa5926702731 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -83,9 +83,9 @@ using namespace com::sun::star;
int GtkSalFrame::m_nFloats = 0;
-static USHORT GetKeyModCode( guint state )
+static sal_uInt16 GetKeyModCode( guint state )
{
- USHORT nCode = 0;
+ sal_uInt16 nCode = 0;
if( (state & GDK_SHIFT_MASK) )
nCode |= KEY_SHIFT;
if( (state & GDK_CONTROL_MASK) )
@@ -100,9 +100,9 @@ static USHORT GetKeyModCode( guint state )
return nCode;
}
-static USHORT GetMouseModCode( guint state )
+static sal_uInt16 GetMouseModCode( guint state )
{
- USHORT nCode = GetKeyModCode( state );
+ sal_uInt16 nCode = GetKeyModCode( state );
if( (state & GDK_BUTTON1_MASK) )
nCode |= MOUSE_LEFT;
if( (state & GDK_BUTTON2_MASK) )
@@ -113,9 +113,9 @@ static USHORT GetMouseModCode( guint state )
return nCode;
}
-static USHORT GetKeyCode( guint keyval )
+static sal_uInt16 GetKeyCode( guint keyval )
{
- USHORT nCode = 0;
+ sal_uInt16 nCode = 0;
if( keyval >= GDK_0 && keyval <= GDK_9 )
nCode = KEY_0 + (keyval-GDK_0);
else if( keyval >= GDK_KP_0 && keyval <= GDK_KP_9 )
@@ -297,14 +297,14 @@ static USHORT GetKeyCode( guint keyval )
// in the independent part.
struct KeyAlternate
{
- USHORT nKeyCode;
+ sal_uInt16 nKeyCode;
sal_Unicode nCharCode;
KeyAlternate() : nKeyCode( 0 ), nCharCode( 0 ) {}
- KeyAlternate( USHORT nKey, sal_Unicode nChar = 0 ) : nKeyCode( nKey ), nCharCode( nChar ) {}
+ KeyAlternate( sal_uInt16 nKey, sal_Unicode nChar = 0 ) : nKeyCode( nKey ), nCharCode( nChar ) {}
};
inline KeyAlternate
-GetAlternateKeyCode( const USHORT nKeyCode )
+GetAlternateKeyCode( const sal_uInt16 nKeyCode )
{
KeyAlternate aAlternate;
@@ -392,7 +392,7 @@ GtkSalFrame::GraphicsHolder::~GraphicsHolder()
delete pGraphics;
}
-GtkSalFrame::GtkSalFrame( SalFrame* pParent, ULONG nStyle )
+GtkSalFrame::GtkSalFrame( SalFrame* pParent, sal_uLong nStyle )
{
m_nScreen = getDisplay()->GetDefaultScreenNumber();
getDisplay()->registerFrame( this );
@@ -568,7 +568,7 @@ void GtkSalFrame::InitCommon()
m_ePointerStyle = 0xffff;
m_bSetFocusOnMap = false;
- gtk_widget_set_app_paintable( m_pWindow, TRUE );
+ gtk_widget_set_app_paintable( m_pWindow, sal_True );
gtk_widget_set_double_buffered( m_pWindow, FALSE );
gtk_widget_set_redraw_on_allocate( m_pWindow, FALSE );
gtk_widget_add_events( m_pWindow,
@@ -755,7 +755,7 @@ GtkSalFrame *GtkSalFrame::getFromWindow( GtkWindow *pWindow )
return (GtkSalFrame *) g_object_get_data( G_OBJECT( pWindow ), "SalFrame" );
}
-void GtkSalFrame::Init( SalFrame* pParent, ULONG nStyle )
+void GtkSalFrame::Init( SalFrame* pParent, sal_uLong nStyle )
{
if( nStyle & SAL_FRAME_STYLE_DEFAULT ) // ensure default style
{
@@ -823,7 +823,7 @@ void GtkSalFrame::Init( SalFrame* pParent, ULONG nStyle )
else if( (nStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION) )
{
eType = GDK_WINDOW_TYPE_HINT_TOOLBAR;
- lcl_set_accept_focus( GTK_WINDOW(m_pWindow), FALSE, true );
+ lcl_set_accept_focus( GTK_WINDOW(m_pWindow), sal_False, true );
bNoDecor = true;
}
else if( (nStyle & SAL_FRAME_STYLE_FLOAT_FOCUSABLE) )
@@ -868,9 +868,9 @@ void GtkSalFrame::Init( SalFrame* pParent, ULONG nStyle )
if( bDecoHandling )
{
- gtk_window_set_resizable( GTK_WINDOW(m_pWindow), (nStyle & SAL_FRAME_STYLE_SIZEABLE) ? TRUE : FALSE );
+ gtk_window_set_resizable( GTK_WINDOW(m_pWindow), (nStyle & SAL_FRAME_STYLE_SIZEABLE) ? sal_True : FALSE );
if( ( (nStyle & (SAL_FRAME_STYLE_OWNERDRAWDECORATION)) ) )
- lcl_set_accept_focus( GTK_WINDOW(m_pWindow), FALSE, false );
+ lcl_set_accept_focus( GTK_WINDOW(m_pWindow), sal_False, false );
}
}
@@ -1029,10 +1029,10 @@ void GtkSalFrame::ReleaseGraphics( SalGraphics* pGraphics )
}
}
-BOOL GtkSalFrame::PostEvent( void* pData )
+sal_Bool GtkSalFrame::PostEvent( void* pData )
{
getDisplay()->SendInternalEvent( this, pData );
- return TRUE;
+ return sal_True;
}
void GtkSalFrame::SetTitle( const String& rTitle )
@@ -1042,8 +1042,8 @@ void GtkSalFrame::SetTitle( const String& rTitle )
gtk_window_set_title( GTK_WINDOW(m_pWindow), rtl::OUStringToOString( rTitle, RTL_TEXTENCODING_UTF8 ).getStr() );
}
-static inline BYTE *
-getRow( BitmapBuffer *pBuffer, ULONG nRow )
+static inline sal_uInt8 *
+getRow( BitmapBuffer *pBuffer, sal_uLong nRow )
{
if( BMP_SCANLINE_ADJUSTMENT( pBuffer->mnFormat ) == BMP_FORMAT_TOP_DOWN )
return pBuffer->mpBits + nRow * pBuffer->mnScanlineSize;
@@ -1057,11 +1057,11 @@ bitmapToPixbuf( SalBitmap *pSalBitmap, SalBitmap *pSalAlpha )
g_return_val_if_fail( pSalBitmap != NULL, NULL );
g_return_val_if_fail( pSalAlpha != NULL, NULL );
- BitmapBuffer *pBitmap = pSalBitmap->AcquireBuffer( TRUE );
+ BitmapBuffer *pBitmap = pSalBitmap->AcquireBuffer( sal_True );
g_return_val_if_fail( pBitmap != NULL, NULL );
g_return_val_if_fail( pBitmap->mnBitCount == 24, NULL );
- BitmapBuffer *pAlpha = pSalAlpha->AcquireBuffer( TRUE );
+ BitmapBuffer *pAlpha = pSalAlpha->AcquireBuffer( sal_True );
g_return_val_if_fail( pAlpha != NULL, NULL );
g_return_val_if_fail( pAlpha->mnBitCount == 8, NULL );
@@ -1074,8 +1074,8 @@ bitmapToPixbuf( SalBitmap *pSalBitmap, SalBitmap *pSalAlpha )
for( nY = 0; nY < pBitmap->mnHeight; nY++ )
{
- BYTE *pData = getRow( pBitmap, nY );
- BYTE *pAlphaData = getRow( pAlpha, nY );
+ sal_uInt8 *pData = getRow( pBitmap, nY );
+ sal_uInt8 *pAlphaData = getRow( pAlpha, nY );
for( nX = 0; nX < pBitmap->mnWidth; nX++ )
{
@@ -1096,18 +1096,18 @@ bitmapToPixbuf( SalBitmap *pSalBitmap, SalBitmap *pSalAlpha )
}
}
- pSalBitmap->ReleaseBuffer( pBitmap, TRUE );
- pSalAlpha->ReleaseBuffer( pAlpha, TRUE );
+ pSalBitmap->ReleaseBuffer( pBitmap, sal_True );
+ pSalAlpha->ReleaseBuffer( pAlpha, sal_True );
return gdk_pixbuf_new_from_data( pPixbufData,
- GDK_COLORSPACE_RGB, TRUE, 8,
+ GDK_COLORSPACE_RGB, sal_True, 8,
aSize.Width(), aSize.Height(),
aSize.Width() * 4,
(GdkPixbufDestroyNotify) g_free,
NULL );
}
-void GtkSalFrame::SetIcon( USHORT nIcon )
+void GtkSalFrame::SetIcon( sal_uInt16 nIcon )
{
if( (m_nStyle & (SAL_FRAME_STYLE_PLUG|SAL_FRAME_STYLE_SYSTEMCHILD|SAL_FRAME_STYLE_FLOAT|SAL_FRAME_STYLE_INTRO|SAL_FRAME_STYLE_OWNERDRAWDECORATION))
|| ! m_pWindow )
@@ -1119,8 +1119,8 @@ void GtkSalFrame::SetIcon( USHORT nIcon )
GdkPixbuf *pBuf;
GList *pIcons = NULL;
- USHORT nOffsets[2] = { SV_ICON_SMALL_START, SV_ICON_LARGE_START };
- USHORT nIndex;
+ sal_uInt16 nOffsets[2] = { SV_ICON_SMALL_START, SV_ICON_LARGE_START };
+ sal_uInt16 nIndex;
// Use high contrast icons where appropriate
if( Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
@@ -1129,7 +1129,7 @@ void GtkSalFrame::SetIcon( USHORT nIcon )
nOffsets[1] = SV_ICON_SMALL_HC_START;
}
- for( nIndex = 0; nIndex < sizeof(nOffsets)/ sizeof(USHORT); nIndex++ )
+ for( nIndex = 0; nIndex < sizeof(nOffsets)/ sizeof(sal_uInt16); nIndex++ )
{
// #i44723# workaround gcc temporary problem
ResId aResId( nOffsets[nIndex] + nIcon, *ImplGetResMgr() );
@@ -1148,7 +1148,7 @@ void GtkSalFrame::SetIcon( USHORT nIcon )
{
case TRANSPARENT_NONE:
{
- BYTE nTrans = 0;
+ sal_uInt8 nTrans = 0;
aMask = AlphaMask( aBmp.GetSizePixel(), &nTrans );
}
break;
@@ -1288,7 +1288,7 @@ static void initClientId()
}
}
-void GtkSalFrame::Show( BOOL bVisible, BOOL bNoActivate )
+void GtkSalFrame::Show( sal_Bool bVisible, sal_Bool bNoActivate )
{
if( m_pWindow )
{
@@ -1323,7 +1323,7 @@ void GtkSalFrame::Show( BOOL bVisible, BOOL bNoActivate )
* showing the float (cannot grab it to the float
* before show).
*/
- m_pParent->grabPointer( TRUE, TRUE );
+ m_pParent->grabPointer( sal_True, sal_True );
}
guint32 nUserTime = 0;
@@ -1370,7 +1370,7 @@ void GtkSalFrame::Show( BOOL bVisible, BOOL bNoActivate )
{
m_nFloats++;
if( ! getDisplay()->GetCaptureFrame() && m_nFloats == 1 )
- grabPointer( TRUE, TRUE );
+ grabPointer( sal_True, sal_True );
// #i44068# reset parent's IM context
if( m_pParent )
m_pParent->EndExtTextInput(0);
@@ -1384,7 +1384,7 @@ void GtkSalFrame::Show( BOOL bVisible, BOOL bNoActivate )
{
m_nFloats--;
if( ! getDisplay()->GetCaptureFrame() && m_nFloats == 0)
- grabPointer( FALSE );
+ grabPointer( sal_False );
}
gtk_widget_hide( m_pWindow );
if( m_pIMHandler )
@@ -1397,7 +1397,7 @@ void GtkSalFrame::Show( BOOL bVisible, BOOL bNoActivate )
}
}
-void GtkSalFrame::Enable( BOOL /*bEnable*/ )
+void GtkSalFrame::Enable( sal_Bool /*bEnable*/ )
{
// Not implemented by X11SalFrame either
}
@@ -1487,7 +1487,7 @@ void GtkSalFrame::SetMinClientSize( long nWidth, long nHeight )
}
}
-void GtkSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, USHORT nFlags )
+void GtkSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags )
{
if( !m_pWindow || isChild( true, false ) )
return;
@@ -1602,7 +1602,7 @@ void GtkSalFrame::SetWindowState( const SalFrameState* pState )
if( ! m_pWindow || ! pState || isChild( true, false ) )
return;
- const ULONG nMaxGeometryMask =
+ const sal_uLong nMaxGeometryMask =
SAL_FRAMESTATE_MASK_X | SAL_FRAMESTATE_MASK_Y |
SAL_FRAMESTATE_MASK_WIDTH | SAL_FRAMESTATE_MASK_HEIGHT |
SAL_FRAMESTATE_MASK_MAXIMIZED_X | SAL_FRAMESTATE_MASK_MAXIMIZED_Y |
@@ -1630,7 +1630,7 @@ void GtkSalFrame::SetWindowState( const SalFrameState* pState )
else if( pState->mnMask & (SAL_FRAMESTATE_MASK_X | SAL_FRAMESTATE_MASK_Y |
SAL_FRAMESTATE_MASK_WIDTH | SAL_FRAMESTATE_MASK_HEIGHT ) )
{
- USHORT nPosSizeFlags = 0;
+ sal_uInt16 nPosSizeFlags = 0;
long nX = pState->mnX - (m_pParent ? m_pParent->maGeometry.nX : 0);
long nY = pState->mnY - (m_pParent ? m_pParent->maGeometry.nY : 0);
long nWidth = pState->mnWidth;
@@ -1675,7 +1675,7 @@ void GtkSalFrame::SetWindowState( const SalFrameState* pState )
}
}
-BOOL GtkSalFrame::GetWindowState( SalFrameState* pState )
+sal_Bool GtkSalFrame::GetWindowState( SalFrameState* pState )
{
pState->mnState = SAL_FRAMESTATE_NORMAL;
pState->mnMask = SAL_FRAMESTATE_MASK_STATE;
@@ -1711,7 +1711,7 @@ BOOL GtkSalFrame::GetWindowState( SalFrameState* pState )
SAL_FRAMESTATE_MASK_WIDTH |
SAL_FRAMESTATE_MASK_HEIGHT;
- return TRUE;
+ return sal_True;
}
void GtkSalFrame::moveToScreen( int nScreen )
@@ -1775,13 +1775,13 @@ void GtkSalFrame::SetScreenNumber( unsigned int nNewScreen )
Rectangle aNewScreenRect( pDisp->GetXineramaScreens()[nNewScreen] );
bool bVisible = GTK_WIDGET_MAPPED(m_pWindow);
if( bVisible )
- Show( FALSE );
+ Show( sal_False );
maGeometry.nX = aNewScreenRect.Left() + (maGeometry.nX - aOldScreenRect.Left());
maGeometry.nY = aNewScreenRect.Top() + (maGeometry.nY - aOldScreenRect.Top());
createNewWindow( None, false, m_nScreen );
gtk_window_move( GTK_WINDOW(m_pWindow), maGeometry.nX, maGeometry.nY );
if( bVisible )
- Show( TRUE );
+ Show( sal_True );
maGeometry.nScreenNumber = nNewScreen;
}
else if( sal_Int32(nNewScreen) < pDisp->GetScreenCount() )
@@ -1793,7 +1793,7 @@ void GtkSalFrame::SetScreenNumber( unsigned int nNewScreen )
}
}
-void GtkSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nScreen )
+void GtkSalFrame::ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nScreen )
{
if( m_pWindow && ! isChild() )
{
@@ -1807,7 +1807,7 @@ void GtkSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nScreen )
Size( maGeometry.nWidth, maGeometry.nHeight ) );
bool bVisible = GTK_WIDGET_MAPPED(m_pWindow);
if( bVisible )
- Show( FALSE );
+ Show( sal_False );
m_nStyle |= SAL_FRAME_STYLE_PARTIAL_FULLSCREEN;
createNewWindow( None, false, m_nScreen );
Rectangle aNewPosSize;
@@ -1830,11 +1830,11 @@ void GtkSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nScreen )
if( ! getDisplay()->getWMAdaptor()->isLegacyPartialFullscreen() )
{
if( !(m_nStyle & SAL_FRAME_STYLE_SIZEABLE) )
- gtk_window_set_resizable( GTK_WINDOW(m_pWindow), TRUE );
+ gtk_window_set_resizable( GTK_WINDOW(m_pWindow), sal_True );
gtk_window_fullscreen( GTK_WINDOW( m_pWindow ) );
}
if( bVisible )
- Show( TRUE );
+ Show( sal_True );
}
else
{
@@ -1842,7 +1842,7 @@ void GtkSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nScreen )
if( ! getDisplay()->getWMAdaptor()->isLegacyPartialFullscreen() )
gtk_window_unfullscreen( GTK_WINDOW(m_pWindow) );
if( bVisible )
- Show( FALSE );
+ Show( sal_False );
m_nStyle &= ~SAL_FRAME_STYLE_PARTIAL_FULLSCREEN;
createNewWindow( None, false, m_nScreen );
if( ! m_aRestorePosSize.IsEmpty() )
@@ -1856,7 +1856,7 @@ void GtkSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nScreen )
m_aRestorePosSize = Rectangle();
}
if( bVisible )
- Show( TRUE );
+ Show( sal_True );
}
}
else
@@ -2025,7 +2025,7 @@ dbus_uninhibit_gsm (guint cookie)
}
#endif
-void GtkSalFrame::StartPresentation( BOOL bStart )
+void GtkSalFrame::StartPresentation( sal_Bool bStart )
{
Display *pDisplay = GDK_DISPLAY_XDISPLAY( getGdkDisplay() );
@@ -2062,11 +2062,11 @@ void GtkSalFrame::StartPresentation( BOOL bStart )
}
}
-void GtkSalFrame::SetAlwaysOnTop( BOOL /*bOnTop*/ )
+void GtkSalFrame::SetAlwaysOnTop( sal_Bool /*bOnTop*/ )
{
}
-void GtkSalFrame::ToTop( USHORT nFlags )
+void GtkSalFrame::ToTop( sal_uInt16 nFlags )
{
if( m_pWindow )
{
@@ -2117,13 +2117,13 @@ void GtkSalFrame::SetPointer( PointerStyle ePointerStyle )
// #i80791# use grabPointer the same way as CaptureMouse, respective float grab
if( getDisplay()->MouseCaptured( this ) )
- grabPointer( TRUE, FALSE );
+ grabPointer( sal_True, sal_False );
else if( m_nFloats > 0 )
- grabPointer( TRUE, TRUE );
+ grabPointer( sal_True, sal_True );
}
}
-void GtkSalFrame::grabPointer( BOOL bGrab, BOOL bOwnerEvents )
+void GtkSalFrame::grabPointer( sal_Bool bGrab, sal_Bool bOwnerEvents )
{
if( m_pWindow )
{
@@ -2180,7 +2180,7 @@ void GtkSalFrame::grabPointer( BOOL bGrab, BOOL bOwnerEvents )
}
}
-void GtkSalFrame::CaptureMouse( BOOL bCapture )
+void GtkSalFrame::CaptureMouse( sal_Bool bCapture )
{
getDisplay()->CaptureMouse( bCapture ? this : NULL );
}
@@ -2225,12 +2225,12 @@ void GtkSalFrame::Sync()
gdk_display_sync( getGdkDisplay() );
}
-String GtkSalFrame::GetSymbolKeyName( const String&, USHORT nKeyCode )
+String GtkSalFrame::GetSymbolKeyName( const String&, sal_uInt16 nKeyCode )
{
return getDisplay()->GetKeyName( nKeyCode );
}
-String GtkSalFrame::GetKeyName( USHORT nKeyCode )
+String GtkSalFrame::GetKeyName( sal_uInt16 nKeyCode )
{
return getDisplay()->GetKeyName( nKeyCode );
}
@@ -2271,16 +2271,16 @@ void GtkSalFrame::SetInputContext( SalInputContext* pContext )
m_pIMHandler->setInputContext( pContext );
}
-void GtkSalFrame::EndExtTextInput( USHORT nFlags )
+void GtkSalFrame::EndExtTextInput( sal_uInt16 nFlags )
{
if( m_pIMHandler )
m_pIMHandler->endExtTextInput( nFlags );
}
-BOOL GtkSalFrame::MapUnicodeToKeyCode( sal_Unicode , LanguageType , KeyCode& )
+sal_Bool GtkSalFrame::MapUnicodeToKeyCode( sal_Unicode , LanguageType , KeyCode& )
{
// not supported yet
- return FALSE;
+ return sal_False;
}
LanguageType GtkSalFrame::GetInputLanguage()
@@ -2358,7 +2358,7 @@ void GtkSalFrame::createNewWindow( XLIB_Window aNewParent, bool bXEmbed, int nSc
{
bool bWasVisible = GTK_WIDGET_MAPPED(m_pWindow);
if( bWasVisible )
- Show( FALSE );
+ Show( sal_False );
if( nScreen < 0 || nScreen >= getDisplay()->GetScreenCount() )
nScreen = m_nScreen;
@@ -2438,7 +2438,7 @@ void GtkSalFrame::createNewWindow( XLIB_Window aNewParent, bool bXEmbed, int nSc
SetTitle( m_aTitle );
if( bWasVisible )
- Show( TRUE );
+ Show( sal_True );
std::list< GtkSalFrame* > aChildren = m_aChildren;
m_aChildren.clear();
@@ -2462,7 +2462,7 @@ void GtkSalFrame::ResetClipRegion()
gdk_window_shape_combine_region( m_pWindow->window, NULL, 0, 0 );
}
-void GtkSalFrame::BeginSetClipRegion( ULONG )
+void GtkSalFrame::BeginSetClipRegion( sal_uLong )
{
if( m_pRegion )
gdk_region_destroy( m_pRegion );
@@ -2555,7 +2555,7 @@ bool GtkSalFrame::Dispatch( const XEvent* pEvent )
GdkEventFocus aEvent;
aEvent.type = GDK_FOCUS_CHANGE;
aEvent.window = m_pWindow->window;
- aEvent.send_event = TRUE;
+ aEvent.send_event = sal_True;
aEvent.in = (pEvent->xclient.data.l[1] == 1);
signalFocus( m_pWindow, &aEvent, this );
}
@@ -2609,7 +2609,7 @@ gboolean GtkSalFrame::signalButton( GtkWidget*, GdkEventButton* pEvent, gpointer
{
GtkSalFrame* pThis = (GtkSalFrame*)frame;
SalMouseEvent aEvent;
- USHORT nEventType = 0;
+ sal_uInt16 nEventType = 0;
switch( pEvent->type )
{
case GDK_BUTTON_PRESS:
@@ -2619,14 +2619,14 @@ gboolean GtkSalFrame::signalButton( GtkWidget*, GdkEventButton* pEvent, gpointer
nEventType = SALEVENT_MOUSEBUTTONUP;
break;
default:
- return FALSE;
+ return sal_False;
}
switch( pEvent->button )
{
case 1: aEvent.mnButton = MOUSE_LEFT; break;
case 2: aEvent.mnButton = MOUSE_MIDDLE; break;
case 3: aEvent.mnButton = MOUSE_RIGHT; break;
- default: return FALSE;
+ default: return sal_False;
}
aEvent.mnTime = pEvent->time;
aEvent.mnX = (long)pEvent->x_root - pThis->maGeometry.nX;
@@ -2694,7 +2694,7 @@ gboolean GtkSalFrame::signalButton( GtkWidget*, GdkEventButton* pEvent, gpointer
}
}
- return FALSE;
+ return sal_False;
}
gboolean GtkSalFrame::signalScroll( GtkWidget*, GdkEvent* pEvent, gpointer frame )
@@ -2702,7 +2702,7 @@ gboolean GtkSalFrame::signalScroll( GtkWidget*, GdkEvent* pEvent, gpointer frame
GtkSalFrame* pThis = (GtkSalFrame*)frame;
GdkEventScroll* pSEvent = (GdkEventScroll*)pEvent;
- static ULONG nLines = 0;
+ static sal_uLong nLines = 0;
if( ! nLines )
{
char* pEnv = getenv( "SAL_WHEELLINES" );
@@ -2714,8 +2714,8 @@ gboolean GtkSalFrame::signalScroll( GtkWidget*, GdkEvent* pEvent, gpointer frame
bool bNeg = (pSEvent->direction == GDK_SCROLL_DOWN || pSEvent->direction == GDK_SCROLL_RIGHT );
SalWheelMouseEvent aEvent;
aEvent.mnTime = pSEvent->time;
- aEvent.mnX = (ULONG)pSEvent->x;
- aEvent.mnY = (ULONG)pSEvent->y;
+ aEvent.mnX = (sal_uLong)pSEvent->x;
+ aEvent.mnY = (sal_uLong)pSEvent->y;
aEvent.mnDelta = bNeg ? -120 : 120;
aEvent.mnNotchDelta = bNeg ? -1 : 1;
aEvent.mnScrollLines = nLines;
@@ -2730,7 +2730,7 @@ gboolean GtkSalFrame::signalScroll( GtkWidget*, GdkEvent* pEvent, gpointer frame
pThis->CallCallback( SALEVENT_WHEELMOUSE, &aEvent );
- return FALSE;
+ return sal_False;
}
gboolean GtkSalFrame::signalMotion( GtkWidget*, GdkEventMotion* pEvent, gpointer frame )
@@ -2775,7 +2775,7 @@ gboolean GtkSalFrame::signalMotion( GtkWidget*, GdkEventMotion* pEvent, gpointer
}
}
- return TRUE;
+ return sal_True;
}
gboolean GtkSalFrame::signalCrossing( GtkWidget*, GdkEventCrossing* pEvent, gpointer frame )
@@ -2791,7 +2791,7 @@ gboolean GtkSalFrame::signalCrossing( GtkWidget*, GdkEventCrossing* pEvent, gpoi
GTK_YIELD_GRAB();
pThis->CallCallback( (pEvent->type == GDK_ENTER_NOTIFY) ? SALEVENT_MOUSEMOVE : SALEVENT_MOUSELEAVE, &aEvent );
- return TRUE;
+ return sal_True;
}
@@ -2804,7 +2804,7 @@ gboolean GtkSalFrame::signalExpose( GtkWidget*, GdkEventExpose* pEvent, gpointer
GTK_YIELD_GRAB();
pThis->CallCallback( SALEVENT_PAINT, &aEvent );
- return FALSE;
+ return sal_False;
}
gboolean GtkSalFrame::signalFocus( GtkWidget*, GdkEventFocus* pEvent, gpointer frame )
@@ -2840,7 +2840,7 @@ gboolean GtkSalFrame::signalFocus( GtkWidget*, GdkEventFocus* pEvent, gpointer f
if( m_nFloats == 0 )
pThis->CallCallback( pEvent->in ? SALEVENT_GETFOCUS : SALEVENT_LOSEFOCUS, NULL );
- return FALSE;
+ return sal_False;
}
IMPL_LINK( GtkSalFrame, ImplDelayedFullScreenHdl, void*, EMPTYARG )
@@ -2912,7 +2912,7 @@ gboolean GtkSalFrame::signalMap( GtkWidget*, GdkEvent*, gpointer frame )
pThis->CallCallback( SALEVENT_RESIZE, NULL );
- return FALSE;
+ return sal_False;
}
gboolean GtkSalFrame::signalUnmap( GtkWidget*, GdkEvent*, gpointer frame )
@@ -2922,7 +2922,7 @@ gboolean GtkSalFrame::signalUnmap( GtkWidget*, GdkEvent*, gpointer frame )
GTK_YIELD_GRAB();
pThis->CallCallback( SALEVENT_RESIZE, NULL );
- return FALSE;
+ return sal_False;
}
gboolean GtkSalFrame::signalConfigure( GtkWidget*, GdkEventConfigure* pEvent, gpointer frame )
@@ -2942,7 +2942,7 @@ gboolean GtkSalFrame::signalConfigure( GtkWidget*, GdkEventConfigure* pEvent, gp
*/
if( (pThis->m_nStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION) &&
pThis->getDisplay()->GetCaptureFrame() == pThis )
- return FALSE;
+ return sal_False;
// in child case the coordinates are not root coordinates,
@@ -3011,7 +3011,7 @@ gboolean GtkSalFrame::signalConfigure( GtkWidget*, GdkEventConfigure* pEvent, gp
else if( bSized )
pThis->CallCallback( SALEVENT_RESIZE, NULL );
- return FALSE;
+ return sal_False;
}
gboolean GtkSalFrame::signalKey( GtkWidget*, GdkEventKey* pEvent, gpointer frame )
@@ -3025,7 +3025,7 @@ gboolean GtkSalFrame::signalKey( GtkWidget*, GdkEventKey* pEvent, gpointer frame
if( pThis->m_pIMHandler->handleKeyEvent( pEvent ) )
{
pThis->m_bSingleAltPress = false;
- return TRUE;
+ return sal_True;
}
}
GTK_YIELD_GRAB();
@@ -3039,7 +3039,7 @@ gboolean GtkSalFrame::signalKey( GtkWidget*, GdkEventKey* pEvent, gpointer frame
{
SalKeyModEvent aModEvt;
- USHORT nModCode = GetKeyModCode( pEvent->state );
+ sal_uInt16 nModCode = GetKeyModCode( pEvent->state );
aModEvt.mnModKeyCode = 0; // emit no MODKEYCHANGE events
if( pEvent->type == GDK_KEY_PRESS && !pThis->m_nKeyModifiers )
@@ -3052,8 +3052,8 @@ gboolean GtkSalFrame::signalKey( GtkWidget*, GdkEventKey* pEvent, gpointer frame
pThis->m_nKeyModifiers = 0;
}
- USHORT nExtModMask = 0;
- USHORT nModMask = 0;
+ sal_uInt16 nExtModMask = 0;
+ sal_uInt16 nModMask = 0;
// pressing just the ctrl key leads to a keysym of XK_Control but
// the event state does not contain ControlMask. In the release
// event its the other way round: it does contain the Control mask.
@@ -3164,7 +3164,7 @@ gboolean GtkSalFrame::signalKey( GtkWidget*, GdkEventKey* pEvent, gpointer frame
if( !aDel.isDeleted() && pThis->m_pIMHandler )
pThis->m_pIMHandler->updateIMSpotLocation();
- return TRUE;
+ return sal_True;
}
gboolean GtkSalFrame::signalDelete( GtkWidget*, GdkEvent*, gpointer frame )
@@ -3174,7 +3174,7 @@ gboolean GtkSalFrame::signalDelete( GtkWidget*, GdkEvent*, gpointer frame )
GTK_YIELD_GRAB();
pThis->CallCallback( SALEVENT_CLOSE, NULL );
- return TRUE;
+ return sal_True;
}
void GtkSalFrame::signalStyleSet( GtkWidget*, GtkStyle* pPrevious, gpointer frame )
@@ -3213,7 +3213,7 @@ void GtkSalFrame::signalStyleSet( GtkWidget*, GtkStyle* pPrevious, gpointer fram
{
// signalize theme changed for NWF caches
// FIXME: should be called only once for a style change
- GtkSalGraphics::bThemeChanged = TRUE;
+ GtkSalGraphics::bThemeChanged = sal_True;
}
}
@@ -3241,7 +3241,7 @@ gboolean GtkSalFrame::signalState( GtkWidget*, GdkEvent* pEvent, gpointer frame
}
#endif
- return FALSE;
+ return sal_False;
}
gboolean GtkSalFrame::signalVisibility( GtkWidget*, GdkEventVisibility* pEvent, gpointer frame )
@@ -3249,7 +3249,7 @@ gboolean GtkSalFrame::signalVisibility( GtkWidget*, GdkEventVisibility* pEvent,
GtkSalFrame* pThis = (GtkSalFrame*)frame;
pThis->m_nVisibility = pEvent->state;
- return FALSE;
+ return sal_False;
}
void GtkSalFrame::signalDestroy( GtkObject* pObj, gpointer frame )
@@ -3365,7 +3365,7 @@ void GtkSalFrame::IMHandler::sendEmptyCommit()
m_pFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, NULL );
}
-void GtkSalFrame::IMHandler::endExtTextInput( USHORT /*nFlags*/ )
+void GtkSalFrame::IMHandler::endExtTextInput( sal_uInt16 /*nFlags*/ )
{
gtk_im_context_reset ( m_pIMContext );
@@ -3641,7 +3641,7 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_
pThis->m_aInputEvent.mnDeltaStart = 0;
pThis->m_aInputEvent.mbOnlyCursor = False;
- pThis->m_aInputFlags = std::vector<USHORT>( std::max( 1, (int)pThis->m_aInputEvent.maText.Len() ), 0 );
+ pThis->m_aInputFlags = std::vector<sal_uInt16>( std::max( 1, (int)pThis->m_aInputEvent.maText.Len() ), 0 );
PangoAttrIterator *iter = pango_attr_list_get_iterator (pAttrs);
do
@@ -3774,15 +3774,15 @@ gboolean GtkSalFrame::IMHandler::signalIMRetrieveSurrounding( GtkIMContext* pCon
sal_uInt32 nPosition = xText->getCaretPosition();
rtl::OUString sAllText = xText->getText();
if (!sAllText.getLength())
- return FALSE;
+ return sal_False;
rtl::OString sUTF = rtl::OUStringToOString(sAllText, RTL_TEXTENCODING_UTF8);
rtl::OUString sCursorText(sAllText, nPosition);
gtk_im_context_set_surrounding(pContext, sUTF.getStr(), sUTF.getLength(),
rtl::OUStringToOString(sCursorText, RTL_TEXTENCODING_UTF8).getLength());
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
gboolean GtkSalFrame::IMHandler::signalIMDeleteSurrounding( GtkIMContext*, gint offset, gint nchars,
@@ -3807,8 +3807,8 @@ gboolean GtkSalFrame::IMHandler::signalIMDeleteSurrounding( GtkIMContext*, gint
xText->deleteText(nDeletePos, nDeleteEnd);
// <--
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
diff --git a/vcl/unx/gtk/window/gtkobject.cxx b/vcl/unx/gtk/window/gtkobject.cxx
index c5f5a168f653..f7ef753dc628 100644
--- a/vcl/unx/gtk/window/gtkobject.cxx
+++ b/vcl/unx/gtk/window/gtkobject.cxx
@@ -33,7 +33,7 @@
#include <plugins/gtk/gtkdata.hxx>
#include <plugins/gtk/gtkinst.hxx>
-GtkSalObject::GtkSalObject( GtkSalFrame* pParent, BOOL bShow )
+GtkSalObject::GtkSalObject( GtkSalFrame* pParent, sal_Bool bShow )
: m_pSocket( NULL ),
m_pRegion( NULL )
{
@@ -104,12 +104,12 @@ void GtkSalObject::ResetClipRegion()
gdk_window_shape_combine_region( m_pSocket->window, NULL, 0, 0 );
}
-USHORT GtkSalObject::GetClipRegionType()
+sal_uInt16 GtkSalObject::GetClipRegionType()
{
return SAL_OBJECT_CLIP_INCLUDERECTS;
}
-void GtkSalObject::BeginSetClipRegion( ULONG )
+void GtkSalObject::BeginSetClipRegion( sal_uLong )
{
if( m_pRegion )
gdk_region_destroy( m_pRegion );
@@ -144,7 +144,7 @@ void GtkSalObject::SetPosSize( long nX, long nY, long nWidth, long nHeight )
}
}
-void GtkSalObject::Show( BOOL bVisible )
+void GtkSalObject::Show( sal_Bool bVisible )
{
if( m_pSocket )
{
@@ -155,7 +155,7 @@ void GtkSalObject::Show( BOOL bVisible )
}
}
-void GtkSalObject::Enable( BOOL )
+void GtkSalObject::Enable( sal_Bool )
{
}
diff --git a/vcl/unx/headless/svpbmp.cxx b/vcl/unx/headless/svpbmp.cxx
index 7c84c4a7a579..f96da7b0c12b 100644
--- a/vcl/unx/headless/svpbmp.cxx
+++ b/vcl/unx/headless/svpbmp.cxx
@@ -43,7 +43,7 @@ SvpSalBitmap::~SvpSalBitmap()
}
bool SvpSalBitmap::Create( const Size& rSize,
- USHORT nBitCount,
+ sal_uInt16 nBitCount,
const BitmapPalette& rPalette )
{
sal_uInt32 nFormat = SVP_DEFAULT_BITMAP_FORMAT;
@@ -111,7 +111,7 @@ bool SvpSalBitmap::Create( const SalBitmap& /*rSalBmp*/,
}
bool SvpSalBitmap::Create( const SalBitmap& /*rSalBmp*/,
- USHORT /*nNewBitCount*/ )
+ sal_uInt16 /*nNewBitCount*/ )
{
return false;
}
@@ -133,9 +133,9 @@ Size SvpSalBitmap::GetSize() const
return aSize;
}
-USHORT SvpSalBitmap::GetBitCount() const
+sal_uInt16 SvpSalBitmap::GetBitCount() const
{
- USHORT nDepth = 0;
+ sal_uInt16 nDepth = 0;
if( m_aBitmap.get() )
nDepth = getBitCountFromScanlineFormat( m_aBitmap->getScanlineFormat() );
return nDepth;
@@ -147,7 +147,7 @@ BitmapBuffer* SvpSalBitmap::AcquireBuffer( bool )
if( m_aBitmap.get() )
{
pBuf = new BitmapBuffer();
- USHORT nBitCount = 1;
+ sal_uInt16 nBitCount = 1;
switch( m_aBitmap->getScanlineFormat() )
{
case Format::ONE_BIT_MSB_GREY:
@@ -216,7 +216,7 @@ BitmapBuffer* SvpSalBitmap::AcquireBuffer( bool )
pBuf->mnHeight = aSize.getY();
pBuf->mnScanlineSize = m_aBitmap->getScanlineStride();
pBuf->mnBitCount = nBitCount;
- pBuf->mpBits = (BYTE*)m_aBitmap->getBuffer().get();
+ pBuf->mpBits = (sal_uInt8*)m_aBitmap->getBuffer().get();
if( nBitCount <= 8 )
{
if( m_aBitmap->getScanlineFormat() == Format::EIGHT_BIT_GREY ||
@@ -255,7 +255,7 @@ void SvpSalBitmap::ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly )
{
// palette might have changed, clone device (but recycle
// memory)
- USHORT nBitCount = 0;
+ sal_uInt16 nBitCount = 0;
switch( m_aBitmap->getScanlineFormat() )
{
case Format::ONE_BIT_MSB_GREY:
diff --git a/vcl/unx/headless/svpbmp.hxx b/vcl/unx/headless/svpbmp.hxx
index dc775e66aaf1..e62f24a171e2 100644
--- a/vcl/unx/headless/svpbmp.hxx
+++ b/vcl/unx/headless/svpbmp.hxx
@@ -46,16 +46,16 @@ public:
// SalBitmap
virtual bool Create( const Size& rSize,
- USHORT nBitCount,
+ sal_uInt16 nBitCount,
const BitmapPalette& rPal );
virtual bool Create( const SalBitmap& rSalBmp );
virtual bool Create( const SalBitmap& rSalBmp,
SalGraphics* pGraphics );
virtual bool Create( const SalBitmap& rSalBmp,
- USHORT nNewBitCount );
+ sal_uInt16 nNewBitCount );
virtual void Destroy();
virtual Size GetSize() const;
- virtual USHORT GetBitCount() const;
+ virtual sal_uInt16 GetBitCount() const;
virtual BitmapBuffer* AcquireBuffer( bool bReadOnly );
virtual void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly );
diff --git a/vcl/unx/headless/svpdummies.cxx b/vcl/unx/headless/svpdummies.cxx
index 0a67b147804a..162b3c5f755c 100644
--- a/vcl/unx/headless/svpdummies.cxx
+++ b/vcl/unx/headless/svpdummies.cxx
@@ -50,13 +50,13 @@ SvpSalObject::~SvpSalObject()
}
void SvpSalObject::ResetClipRegion() {}
-USHORT SvpSalObject::GetClipRegionType() { return 0; }
-void SvpSalObject::BeginSetClipRegion( ULONG ) {}
+sal_uInt16 SvpSalObject::GetClipRegionType() { return 0; }
+void SvpSalObject::BeginSetClipRegion( sal_uLong ) {}
void SvpSalObject::UnionClipRegion( long, long, long, long ) {}
void SvpSalObject::EndSetClipRegion() {}
void SvpSalObject::SetPosSize( long, long, long, long ) {}
-void SvpSalObject::Show( BOOL ) {}
-void SvpSalObject::Enable( BOOL ) {}
+void SvpSalObject::Show( sal_Bool ) {}
+void SvpSalObject::Enable( sal_Bool ) {}
void SvpSalObject::GrabFocus() {}
void SvpSalObject::SetBackground() {}
void SvpSalObject::SetBackground( SalColor ) {}
diff --git a/vcl/unx/headless/svpdummies.hxx b/vcl/unx/headless/svpdummies.hxx
index ea7667ce51ca..a72ba11e5c12 100644
--- a/vcl/unx/headless/svpdummies.hxx
+++ b/vcl/unx/headless/svpdummies.hxx
@@ -44,14 +44,14 @@ public:
// overload all pure virtual methods
virtual void ResetClipRegion();
- virtual USHORT GetClipRegionType();
- virtual void BeginSetClipRegion( ULONG nRects );
+ virtual sal_uInt16 GetClipRegionType();
+ virtual void BeginSetClipRegion( sal_uLong 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();
diff --git a/vcl/unx/headless/svpframe.cxx b/vcl/unx/headless/svpframe.cxx
index 1adf9a51cce4..9fb54cf29ef1 100644
--- a/vcl/unx/headless/svpframe.cxx
+++ b/vcl/unx/headless/svpframe.cxx
@@ -39,7 +39,7 @@ SvpSalFrame* SvpSalFrame::s_pFocusFrame = NULL;
SvpSalFrame::SvpSalFrame( SvpSalInstance* pInstance,
SalFrame* pParent,
- ULONG nSalFrameStyle,
+ sal_uLong nSalFrameStyle,
SystemParentData* ) :
m_pInstance( pInstance ),
m_pParent( static_cast<SvpSalFrame*>(pParent) ),
@@ -146,10 +146,10 @@ void SvpSalFrame::ReleaseGraphics( SalGraphics* pGraphics )
delete pSvpGraphics;
}
-BOOL SvpSalFrame::PostEvent( void* pData )
+sal_Bool SvpSalFrame::PostEvent( void* pData )
{
m_pInstance->PostEvent( this, pData, SALEVENT_USEREVENT );
- return TRUE;
+ return sal_True;
}
void SvpSalFrame::PostPaint() const
@@ -165,7 +165,7 @@ void SvpSalFrame::SetTitle( const XubString& )
{
}
-void SvpSalFrame::SetIcon( USHORT )
+void SvpSalFrame::SetIcon( sal_uInt16 )
{
}
@@ -181,7 +181,7 @@ void SvpSalFrame::SetExtendedFrameStyle( SalExtStyle )
{
}
-void SvpSalFrame::Show( BOOL bVisible, BOOL bNoActivate )
+void SvpSalFrame::Show( sal_Bool bVisible, sal_Bool bNoActivate )
{
if( bVisible && ! m_bVisible )
{
@@ -198,7 +198,7 @@ void SvpSalFrame::Show( BOOL bVisible, BOOL bNoActivate )
}
}
-void SvpSalFrame::Enable( BOOL )
+void SvpSalFrame::Enable( sal_Bool )
{
}
@@ -214,7 +214,7 @@ void SvpSalFrame::SetMaxClientSize( long nWidth, long nHeight )
m_nMaxHeight = nHeight;
}
-void SvpSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, USHORT nFlags )
+void SvpSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags )
{
if( (nFlags & SAL_FRAME_POSSIZE_X) != 0 )
maGeometry.nX = nX;
@@ -311,7 +311,7 @@ void SvpSalFrame::SetWindowState( const SalFrameState *pState )
}
}
-BOOL SvpSalFrame::GetWindowState( SalFrameState* pState )
+sal_Bool SvpSalFrame::GetWindowState( SalFrameState* pState )
{
pState->mnState = SAL_FRAMESTATE_NORMAL;
pState->mnX = maGeometry.nX;
@@ -320,24 +320,24 @@ BOOL SvpSalFrame::GetWindowState( SalFrameState* pState )
pState->mnHeight = maGeometry.nHeight;
pState->mnMask = _FRAMESTATE_MASK_GEOMETRY | SAL_FRAMESTATE_MASK_STATE;
- return TRUE;
+ return sal_True;
}
-void SvpSalFrame::ShowFullScreen( BOOL, sal_Int32 )
+void SvpSalFrame::ShowFullScreen( sal_Bool, sal_Int32 )
{
SetPosSize( 0, 0, VIRTUAL_DESKTOP_WIDTH, VIRTUAL_DESKTOP_HEIGHT,
SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT );
}
-void SvpSalFrame::StartPresentation( BOOL )
+void SvpSalFrame::StartPresentation( sal_Bool )
{
}
-void SvpSalFrame::SetAlwaysOnTop( BOOL )
+void SvpSalFrame::SetAlwaysOnTop( sal_Bool )
{
}
-void SvpSalFrame::ToTop( USHORT )
+void SvpSalFrame::ToTop( sal_uInt16 )
{
GetFocus();
}
@@ -346,7 +346,7 @@ void SvpSalFrame::SetPointer( PointerStyle )
{
}
-void SvpSalFrame::CaptureMouse( BOOL )
+void SvpSalFrame::CaptureMouse( sal_Bool )
{
}
@@ -366,23 +366,23 @@ void SvpSalFrame::SetInputContext( SalInputContext* )
{
}
-void SvpSalFrame::EndExtTextInput( USHORT )
+void SvpSalFrame::EndExtTextInput( sal_uInt16 )
{
}
-String SvpSalFrame::GetKeyName( USHORT )
+String SvpSalFrame::GetKeyName( sal_uInt16 )
{
return String();
}
-String SvpSalFrame::GetSymbolKeyName( const XubString&, USHORT )
+String SvpSalFrame::GetSymbolKeyName( const XubString&, sal_uInt16 )
{
return String();
}
-BOOL SvpSalFrame::MapUnicodeToKeyCode( sal_Unicode, LanguageType, KeyCode& )
+sal_Bool SvpSalFrame::MapUnicodeToKeyCode( sal_Unicode, LanguageType, KeyCode& )
{
- return FALSE;
+ return sal_False;
}
LanguageType SvpSalFrame::GetInputLanguage()
@@ -435,7 +435,7 @@ void SvpSalFrame::ResetClipRegion()
{
}
-void SvpSalFrame::BeginSetClipRegion( ULONG )
+void SvpSalFrame::BeginSetClipRegion( sal_uLong )
{
}
diff --git a/vcl/unx/headless/svpframe.hxx b/vcl/unx/headless/svpframe.hxx
index de968bbf7a4a..af40fb66fb7f 100644
--- a/vcl/unx/headless/svpframe.hxx
+++ b/vcl/unx/headless/svpframe.hxx
@@ -40,9 +40,9 @@ class SvpSalGraphics;
class SvpSalFrame : public SalFrame, public SvpElement
{
SvpSalInstance* m_pInstance;
- SvpSalFrame* m_pParent; // pointer to parent frame
+ SvpSalFrame* m_pParent; // pointer to parent frame
std::list< SvpSalFrame* > m_aChildren; // List of child frames
- ULONG m_nStyle;
+ sal_uLong m_nStyle;
bool m_bVisible;
long m_nMinWidth;
long m_nMinHeight;
@@ -58,7 +58,7 @@ class SvpSalFrame : public SalFrame, public SvpElement
public:
SvpSalFrame( SvpSalInstance* pInstance,
SalFrame* pParent,
- ULONG nSalFrameStyle,
+ sal_uLong nSalFrameStyle,
SystemParentData* pSystemParent = NULL );
virtual ~SvpSalFrame();
@@ -73,39 +73,39 @@ 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* pMenu );
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 = sal_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 );
@@ -116,7 +116,7 @@ public:
virtual bool SetPluginParent( SystemParentData* pNewParent );
virtual void SetBackgroundBitmap( SalBitmap* pBitmap );
virtual void ResetClipRegion();
- virtual void BeginSetClipRegion( ULONG nRects );
+ virtual void BeginSetClipRegion( sal_uLong nRects );
virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
virtual void EndSetClipRegion();
diff --git a/vcl/unx/headless/svpgdi.cxx b/vcl/unx/headless/svpgdi.cxx
index 68d8be7cb4eb..a460bb271198 100644
--- a/vcl/unx/headless/svpgdi.cxx
+++ b/vcl/unx/headless/svpgdi.cxx
@@ -29,6 +29,7 @@
#include "svpbmp.hxx"
#include <vcl/sysdata.hxx>
+#include <vcl/region.h>
#include <basegfx/range/b2drange.hxx>
#include <basegfx/range/b2irange.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
@@ -131,7 +132,7 @@ void SvpSalGraphics::GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY )
rDPIX = rDPIY = 96;
}
-USHORT SvpSalGraphics::GetBitCount()
+sal_uInt16 SvpSalGraphics::GetBitCount()
{
return SvpElement::getBitCountFromScanlineFormat( m_aDevice->getScanlineFormat() );
}
@@ -152,11 +153,16 @@ void SvpSalGraphics::ResetClipRegion()
m_aClipMap.reset();
}
-void SvpSalGraphics::BeginSetClipRegion( ULONG n )
+bool SvpSalGraphics::setClipRegion( const Region& i_rClip )
{
- if( n <= 1 )
+ if( i_rClip.IsEmpty() )
+ m_aClipMap.reset();
+ else if( i_rClip.GetRectCount() == 1 )
{
m_aClipMap.reset();
+ Rectangle aBoundRect( i_rClip.GetBoundRect() );
+ m_aDevice = basebmp::subsetBitmapDevice( m_aOrigDevice,
+ basegfx::B2IRange(aBoundRect.Left(),aBoundRect.Top(),aBoundRect.Right(),aBoundRect.Bottom()) );
}
else
{
@@ -164,34 +170,22 @@ void SvpSalGraphics::BeginSetClipRegion( ULONG n )
B2IVector aSize = m_aDevice->getSize();
m_aClipMap = createBitmapDevice( aSize, false, Format::ONE_BIT_MSB_GREY );
m_aClipMap->clear( basebmp::Color(0xFFFFFFFF) );
- }
-}
-BOOL SvpSalGraphics::unionClipRegion( long nX, long nY, long nWidth, long nHeight )
-{
- if( m_aClipMap )
- {
- B2DPolyPolygon aFull;
- aFull.append( tools::createPolygonFromRect( B2DRectangle( nX, nY, nX+nWidth, nY+nHeight ) ) );
- m_aClipMap->fillPolyPolygon( aFull, basebmp::Color(0), DrawMode_PAINT );
- }
- else
- {
- m_aDevice = basebmp::subsetBitmapDevice( m_aOrigDevice,
- basegfx::B2IRange(nX,nY,nX+nWidth,nY+nHeight) );
+ ImplRegionInfo aInfo;
+ long nX, nY, nW, nH;
+ bool bRegionRect = i_rClip.ImplGetFirstRect(aInfo, nX, nY, nW, nH );
+ while( bRegionRect )
+ {
+ if ( nW && nH )
+ {
+ B2DPolyPolygon aFull;
+ aFull.append( tools::createPolygonFromRect( B2DRectangle( nX, nY, nX+nW, nY+nH ) ) );
+ m_aClipMap->fillPolyPolygon( aFull, basebmp::Color(0), DrawMode_PAINT );
+ }
+ bRegionRect = i_rClip.ImplGetNextRect( aInfo, nX, nY, nW, nH );
+ }
}
-
- return TRUE;
-}
-
-bool SvpSalGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& )
-{
- // TODO: implement and advertise OutDevSupport_B2DClip support
- return false;
-}
-
-void SvpSalGraphics::EndSetClipRegion()
-{
+ return true;
}
void SvpSalGraphics::SetLineColor()
@@ -309,13 +303,13 @@ void SvpSalGraphics::drawRect( long nX, long nY, long nWidth, long nHeight )
dbgOut( m_aDevice );
}
-void SvpSalGraphics::drawPolyLine( ULONG nPoints, const SalPoint* pPtAry )
+void SvpSalGraphics::drawPolyLine( sal_uLong nPoints, const SalPoint* pPtAry )
{
if( m_bUseLineColor && nPoints )
{
B2DPolygon aPoly;
aPoly.append( B2DPoint( pPtAry->mnX, pPtAry->mnY ), nPoints );
- for( ULONG i = 1; i < nPoints; i++ )
+ for( sal_uLong i = 1; i < nPoints; i++ )
aPoly.setB2DPoint( i, B2DPoint( pPtAry[i].mnX, pPtAry[i].mnY ) );
aPoly.setClosed( false );
m_aDevice->drawPolygon( aPoly, m_aLineColor, m_aDrawMode, m_aClipMap );
@@ -323,13 +317,13 @@ void SvpSalGraphics::drawPolyLine( ULONG nPoints, const SalPoint* pPtAry )
dbgOut( m_aDevice );
}
-void SvpSalGraphics::drawPolygon( ULONG nPoints, const SalPoint* pPtAry )
+void SvpSalGraphics::drawPolygon( sal_uLong nPoints, const SalPoint* pPtAry )
{
if( ( m_bUseLineColor || m_bUseFillColor ) && nPoints )
{
B2DPolygon aPoly;
aPoly.append( B2DPoint( pPtAry->mnX, pPtAry->mnY ), nPoints );
- for( ULONG i = 1; i < nPoints; i++ )
+ for( sal_uLong i = 1; i < nPoints; i++ )
aPoly.setB2DPoint( i, B2DPoint( pPtAry[i].mnX, pPtAry[i].mnY ) );
if( m_bUseFillColor )
{
@@ -360,7 +354,7 @@ void SvpSalGraphics::drawPolyPolygon( sal_uInt32 nPoly,
PCONSTSALPOINT pPoints = pPtAry[nPolygon];
B2DPolygon aPoly;
aPoly.append( B2DPoint( pPoints->mnX, pPoints->mnY ), nPoints );
- for( ULONG i = 1; i < nPoints; i++ )
+ for( sal_uInt32 i = 1; i < nPoints; i++ )
aPoly.setB2DPoint( i, B2DPoint( pPoints[i].mnX, pPoints[i].mnY ) );
aPolyPoly.append( aPoly );
@@ -388,16 +382,16 @@ bool SvpSalGraphics::drawPolyLine( const ::basegfx::B2DPolygon&, double /*fTrans
return false;
}
-sal_Bool SvpSalGraphics::drawPolyLineBezier( ULONG,
+sal_Bool SvpSalGraphics::drawPolyLineBezier( sal_uLong,
const SalPoint*,
- const BYTE* )
+ const sal_uInt8* )
{
return sal_False;
}
-sal_Bool SvpSalGraphics::drawPolygonBezier( ULONG,
+sal_Bool SvpSalGraphics::drawPolygonBezier( sal_uLong,
const SalPoint*,
- const BYTE* )
+ const sal_uInt8* )
{
return sal_False;
}
@@ -405,7 +399,7 @@ sal_Bool SvpSalGraphics::drawPolygonBezier( ULONG,
sal_Bool SvpSalGraphics::drawPolyPolygonBezier( sal_uInt32,
const sal_uInt32*,
const SalPoint* const*,
- const BYTE* const* )
+ const sal_uInt8* const* )
{
return sal_False;
}
@@ -422,7 +416,7 @@ void SvpSalGraphics::copyArea( long nDestX,
long nSrcY,
long nSrcWidth,
long nSrcHeight,
- USHORT /*nFlags*/ )
+ sal_uInt16 /*nFlags*/ )
{
B2IRange aSrcRect( nSrcX, nSrcY, nSrcX+nSrcWidth, nSrcY+nSrcHeight );
B2IRange aDestRect( nDestX, nDestY, nDestX+nSrcWidth, nDestY+nSrcHeight );
@@ -538,21 +532,21 @@ void SvpSalGraphics::invert( long nX, long nY, long nWidth, long nHeight, SalInv
dbgOut( m_aDevice );
}
-void SvpSalGraphics::invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert /*nFlags*/ )
+void SvpSalGraphics::invert( sal_uLong nPoints, const SalPoint* pPtAry, SalInvert /*nFlags*/ )
{
// FIXME: handle SAL_INVERT_50 and SAL_INVERT_TRACKFRAME
B2DPolygon aPoly;
aPoly.append( B2DPoint( pPtAry->mnX, pPtAry->mnY ), nPoints );
- for( ULONG i = 1; i < nPoints; i++ )
+ for( sal_uLong i = 1; i < nPoints; i++ )
aPoly.setB2DPoint( i, B2DPoint( pPtAry[i].mnX, pPtAry[i].mnY ) );
aPoly.setClosed( true );
m_aDevice->fillPolyPolygon( B2DPolyPolygon(aPoly), basebmp::Color( 0xffffff ), DrawMode_XOR, m_aClipMap );
dbgOut( m_aDevice );
}
-BOOL SvpSalGraphics::drawEPS( long, long, long, long, void*, ULONG )
+sal_Bool SvpSalGraphics::drawEPS( long, long, long, long, void*, sal_uLong )
{
- return FALSE;
+ return sal_False;
}
SystemFontData SvpSalGraphics::GetSysFontData( int nFallbacklevel ) const
diff --git a/vcl/unx/headless/svpgdi.hxx b/vcl/unx/headless/svpgdi.hxx
index 93ec080d0136..9e4971528033 100644
--- a/vcl/unx/headless/svpgdi.hxx
+++ b/vcl/unx/headless/svpgdi.hxx
@@ -64,20 +64,17 @@ public:
// overload all pure virtual methods
virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY );
- virtual USHORT GetBitCount();
+ virtual sal_uInt16 GetBitCount();
virtual long GetGraphicsWidth() const;
virtual void ResetClipRegion();
- virtual void BeginSetClipRegion( ULONG nCount );
- virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight );
- virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& );
- virtual void EndSetClipRegion();
+ virtual bool setClipRegion( const Region& );
virtual void SetLineColor();
virtual void SetLineColor( SalColor nSalColor );
virtual void SetFillColor();
- virtual void SetFillColor( SalColor nSalColor );
+ virtual void SetFillColor( SalColor nSalColor );
virtual void SetXORMode( bool bSet, bool );
@@ -85,14 +82,14 @@ public:
virtual void SetROPFillColor( SalROPColor nROPColor );
virtual void SetTextColor( SalColor nSalColor );
- virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel );
+ virtual sal_uInt16 SetFont( ImplFontSelectData*, int nFallbackLevel );
virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel );
- virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs );
+ virtual sal_uLong GetKernPairs( sal_uLong nPairs, ImplKernPairData* pKernPairs );
virtual const ImplFontCharMap* GetImplFontCharMap() const;
virtual void GetDevFontList( ImplDevFontList* );
virtual void GetDevFontSubstList( OutputDevice* );
virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName );
- virtual BOOL CreateFontSubset( const rtl::OUString& rToFile,
+ virtual sal_Bool CreateFontSubset( const rtl::OUString& rToFile,
const ImplFontData*,
sal_Int32* pGlyphIDs,
sal_uInt8* pEncoding,
@@ -111,8 +108,8 @@ public:
bool bVertical,
Int32Vector& rWidths,
Ucs2UIntMap& rUnicodeEnc );
- 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;
@@ -122,21 +119,21 @@ public:
virtual void drawRect( long nX, long nY, long nWidth, long nHeight );
virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency );
virtual bool drawPolyLine( const ::basegfx::B2DPolygon&, double fTransparency, const ::basegfx::B2DVector& rLineWidths, basegfx::B2DLineJoin );
- virtual void drawPolyLine( ULONG nPoints, const SalPoint* pPtAry );
- virtual void drawPolygon( ULONG nPoints, const SalPoint* pPtAry );
+ virtual void drawPolyLine( sal_uLong nPoints, const SalPoint* pPtAry );
+ virtual void drawPolygon( sal_uLong nPoints, const SalPoint* pPtAry );
virtual void drawPolyPolygon( sal_uInt32 nPoly,
const sal_uInt32* pPoints,
PCONSTSALPOINT* pPtAry );
- virtual sal_Bool drawPolyLineBezier( ULONG nPoints,
+ virtual sal_Bool drawPolyLineBezier( sal_uLong nPoints,
const SalPoint* pPtAry,
- const BYTE* pFlgAry );
- virtual sal_Bool drawPolygonBezier( ULONG nPoints,
+ const sal_uInt8* pFlgAry );
+ virtual sal_Bool drawPolygonBezier( sal_uLong nPoints,
const SalPoint* pPtAry,
- const BYTE* pFlgAry );
+ const sal_uInt8* pFlgAry );
virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly,
const sal_uInt32* pPoints,
const SalPoint* const* pPtAry,
- const BYTE* const* pFlgAry );
+ const sal_uInt8* const* pFlgAry );
virtual void copyArea( long nDestX,
long nDestY,
@@ -144,7 +141,7 @@ public:
long nSrcY,
long nSrcWidth,
long nSrcHeight,
- USHORT nFlags );
+ sal_uInt16 nFlags );
virtual void copyBits( const SalTwoRect* pPosAry,
SalGraphics* pSrcGraphics );
virtual void drawBitmap( const SalTwoRect* pPosAry,
@@ -161,9 +158,9 @@ public:
virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight );
virtual SalColor getPixel( long nX, long nY );
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_uLong 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_uLong nSize );
virtual SystemGraphicsData GetGraphicsData() const;
virtual SystemFontData GetSysFontData( int nFallbacklevel ) const;
diff --git a/vcl/unx/headless/svpinst.cxx b/vcl/unx/headless/svpinst.cxx
index 09e359ca3f71..bce609b95035 100644
--- a/vcl/unx/headless/svpinst.cxx
+++ b/vcl/unx/headless/svpinst.cxx
@@ -122,7 +122,7 @@ SvpSalInstance::~SvpSalInstance()
osl_destroyMutex( m_aEventGuard );
}
-void SvpSalInstance::PostEvent( const SalFrame* pFrame, void* pData, USHORT nEvent )
+void SvpSalInstance::PostEvent( const SalFrame* pFrame, void* pData, sal_uInt16 nEvent )
{
if( osl_acquireMutex( m_aEventGuard ) )
{
@@ -132,7 +132,7 @@ void SvpSalInstance::PostEvent( const SalFrame* pFrame, void* pData, USHORT nEve
Wakeup();
}
-void SvpSalInstance::CancelEvent( const SalFrame* pFrame, void* pData, USHORT nEvent )
+void SvpSalInstance::CancelEvent( const SalFrame* pFrame, void* pData, sal_uInt16 nEvent )
{
if( osl_acquireMutex( m_aEventGuard ) )
{
@@ -192,7 +192,7 @@ inline int operator >= ( const timeval &t1, const timeval &t2 )
return t1.tv_usec >= t2.tv_usec;
return t1.tv_sec > t2.tv_sec;
}
-inline timeval &operator += ( timeval &t1, ULONG t2 )
+inline timeval &operator += ( timeval &t1, sal_uLong t2 )
{
t1.tv_sec += t2 / 1000;
t1.tv_usec += t2 ? (t2 % 1000) * 1000 : 500;
@@ -235,12 +235,12 @@ bool SvpSalInstance::CheckTimeout( bool bExecuteTimers )
return bRet;
}
-SalFrame* SvpSalInstance::CreateChildFrame( SystemParentData* pParent, ULONG nStyle )
+SalFrame* SvpSalInstance::CreateChildFrame( SystemParentData* pParent, sal_uLong nStyle )
{
return new SvpSalFrame( this, NULL, nStyle, pParent );
}
-SalFrame* SvpSalInstance::CreateFrame( SalFrame* pParent, ULONG nStyle )
+SalFrame* SvpSalInstance::CreateFrame( SalFrame* pParent, sal_uLong nStyle )
{
return new SvpSalFrame( this, pParent, nStyle );
}
@@ -250,7 +250,7 @@ void SvpSalInstance::DestroyFrame( SalFrame* pFrame )
delete pFrame;
}
-SalObject* SvpSalInstance::CreateObject( SalFrame*, SystemWindowData*, BOOL )
+SalObject* SvpSalInstance::CreateObject( SalFrame*, SystemWindowData*, sal_Bool )
{
return new SvpSalObject();
}
@@ -262,7 +262,7 @@ void SvpSalInstance::DestroyObject( SalObject* pObject )
SalVirtualDevice* SvpSalInstance::CreateVirtualDevice( SalGraphics*,
long nDX, long nDY,
- USHORT nBitCount, const SystemGraphicsData* )
+ sal_uInt16 nBitCount, const SystemGraphicsData* )
{
SvpSalVirtualDevice* pNew = new SvpSalVirtualDevice( nBitCount );
pNew->SetSize( nDX, nDY );
@@ -299,13 +299,13 @@ vos::IMutex* SvpSalInstance::GetYieldMutex()
return &m_aYieldMutex;
}
-ULONG SvpSalInstance::ReleaseYieldMutex()
+sal_uLong SvpSalInstance::ReleaseYieldMutex()
{
if ( m_aYieldMutex.GetThreadId() ==
vos::OThread::getCurrentIdentifier() )
{
- ULONG nCount = m_aYieldMutex.GetAcquireCount();
- ULONG n = nCount;
+ sal_uLong nCount = m_aYieldMutex.GetAcquireCount();
+ sal_uLong n = nCount;
while ( n )
{
m_aYieldMutex.release();
@@ -318,7 +318,7 @@ ULONG SvpSalInstance::ReleaseYieldMutex()
return 0;
}
-void SvpSalInstance::AcquireYieldMutex( ULONG nCount )
+void SvpSalInstance::AcquireYieldMutex( sal_uLong nCount )
{
while ( nCount )
{
@@ -346,7 +346,7 @@ void SvpSalInstance::Yield( bool bWait, bool bHandleAllCurrentEvents )
// release yield mutex
std::list< SalUserEvent > aEvents;
- ULONG nAcquireCount = ReleaseYieldMutex();
+ sal_uLong nAcquireCount = ReleaseYieldMutex();
if( osl_acquireMutex( m_aEventGuard ) )
{
if( ! m_aUserEvents.empty() )
@@ -425,7 +425,7 @@ void SvpSalInstance::Yield( bool bWait, bool bHandleAllCurrentEvents )
}
}
-bool SvpSalInstance::AnyInput( USHORT nType )
+bool SvpSalInstance::AnyInput( sal_uInt16 nType )
{
if( (nType & INPUT_TIMER) != 0 )
return CheckTimeout( false );
@@ -497,7 +497,7 @@ void SvpSalInstance::StopTimer()
m_nTimeoutMS = 0;
}
-void SvpSalInstance::StartTimer( ULONG nMS )
+void SvpSalInstance::StartTimer( sal_uLong nMS )
{
timeval Timeout (m_aTimeout); // previous timeout.
gettimeofday (&m_aTimeout, 0);
@@ -525,7 +525,7 @@ void SvpSalTimer::Stop()
m_pInstance->StopTimer();
}
-void SvpSalTimer::Start( ULONG nMS )
+void SvpSalTimer::Start( sal_uLong nMS )
{
m_pInstance->StartTimer( nMS );
}
diff --git a/vcl/unx/headless/svpinst.hxx b/vcl/unx/headless/svpinst.hxx
index 02d5e3fa9494..736916bbaced 100644
--- a/vcl/unx/headless/svpinst.hxx
+++ b/vcl/unx/headless/svpinst.hxx
@@ -49,7 +49,7 @@
class SvpSalYieldMutex : public vos::OMutex
{
protected:
- ULONG mnCount;
+ sal_uLong mnCount;
vos::OThread::TThreadIdentifier mnThreadId;
public:
@@ -59,7 +59,7 @@ public:
virtual void release();
virtual sal_Bool tryToAcquire();
- ULONG GetAcquireCount() const { return mnCount; }
+ sal_uLong GetAcquireCount() const { return mnCount; }
vos::OThread::TThreadIdentifier GetThreadId() const { return mnThreadId; }
};
@@ -75,7 +75,7 @@ public:
virtual ~SvpSalTimer();
// overload all pure virtual methods
- virtual void Start( ULONG nMS );
+ virtual void Start( sal_uLong nMS );
virtual void Stop();
};
@@ -86,7 +86,7 @@ class SvpSalFrame;
class SvpSalInstance : public SalInstance
{
timeval m_aTimeout;
- ULONG m_nTimeoutMS;
+ sal_uLong m_nTimeoutMS;
int m_pTimeoutFDS[2];
SvpSalYieldMutex m_aYieldMutex;
@@ -95,9 +95,9 @@ class SvpSalInstance : public SalInstance
{
const SalFrame* m_pFrame;
void* m_pData;
- USHORT m_nEvent;
+ sal_uInt16 m_nEvent;
- SalUserEvent( const SalFrame* pFrame, void* pData, USHORT nEvent = SALEVENT_USEREVENT )
+ SalUserEvent( const SalFrame* pFrame, void* pData, sal_uInt16 nEvent = SALEVENT_USEREVENT )
: m_pFrame( pFrame ),
m_pData( pData ),
m_nEvent( nEvent )
@@ -117,10 +117,10 @@ public:
SvpSalInstance();
virtual ~SvpSalInstance();
- void PostEvent( const SalFrame* pFrame, void* pData, USHORT nEvent );
- void CancelEvent( const SalFrame* pFrame, void* pData, USHORT nEvent );
+ void PostEvent( const SalFrame* pFrame, void* pData, sal_uInt16 nEvent );
+ void CancelEvent( const SalFrame* pFrame, void* pData, sal_uInt16 nEvent );
- void StartTimer( ULONG nMS );
+ void StartTimer( sal_uLong nMS );
void StopTimer();
void Wakeup();
@@ -131,12 +131,12 @@ public:
bool CheckTimeout( bool bExecuteTimers = true );
// Frame
- virtual SalFrame* CreateChildFrame( SystemParentData* pParent, ULONG nStyle );
- virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle );
+ virtual SalFrame* CreateChildFrame( SystemParentData* pParent, sal_uLong nStyle );
+ virtual SalFrame* CreateFrame( SalFrame* pParent, sal_uLong nStyle );
virtual void DestroyFrame( SalFrame* pFrame );
// Object (System Child Window)
- virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE );
+ virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, sal_Bool bShow = sal_True );
virtual void DestroyObject( SalObject* pObject );
// VirtualDevice
@@ -145,7 +145,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 );
+ sal_uInt16 nBitCount, const SystemGraphicsData *pData = NULL );
virtual void DestroyVirtualDevice( SalVirtualDevice* pDevice );
// Printer
@@ -174,15 +174,15 @@ public:
// YieldMutex
virtual vos::IMutex* GetYieldMutex();
- virtual ULONG ReleaseYieldMutex();
- virtual void AcquireYieldMutex( ULONG nCount );
+ virtual sal_uLong ReleaseYieldMutex();
+ virtual void AcquireYieldMutex( sal_uLong nCount );
virtual bool CheckYieldMutex();
// wait next event and dispatch
// must returned by UserEvent (SalFrame::PostEvent)
// and timer
virtual void Yield( bool bWait, bool bHandleAllCurrentEvents );
- virtual bool AnyInput( USHORT nType );
+ virtual bool AnyInput( sal_uInt16 nType );
// may return NULL to disable session management
virtual SalSession* CreateSalSession();
diff --git a/vcl/unx/headless/svpprn.cxx b/vcl/unx/headless/svpprn.cxx
index 5b461bb996ef..0c8a119806af 100644
--- a/vcl/unx/headless/svpprn.cxx
+++ b/vcl/unx/headless/svpprn.cxx
@@ -159,7 +159,7 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData )
if( rData.getStreamBuffer( pBuffer, nBytes ) )
{
pJobSetup->mnDriverDataLen = nBytes;
- pJobSetup->mpDriverData = (BYTE*)pBuffer;
+ pJobSetup->mpDriverData = (sal_uInt8*)pBuffer;
}
else
{
@@ -518,9 +518,9 @@ void PspSalInfoPrinter::ReleaseGraphics( SalGraphics* pGraphics )
// -----------------------------------------------------------------------
-BOOL PspSalInfoPrinter::Setup( SalFrame*, ImplJobSetup* )
+sal_Bool PspSalInfoPrinter::Setup( SalFrame*, ImplJobSetup* )
{
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -530,7 +530,7 @@ BOOL PspSalInfoPrinter::Setup( SalFrame*, ImplJobSetup* )
// data should be merged into the driver data
// If pJobSetup->mpDriverData IS NULL, then the driver defaults
// should be merged into the independent data
-BOOL PspSalInfoPrinter::SetPrinterData( ImplJobSetup* pJobSetup )
+sal_Bool PspSalInfoPrinter::SetPrinterData( ImplJobSetup* pJobSetup )
{
if( pJobSetup->mpDriverData )
return SetData( ~0, pJobSetup );
@@ -548,7 +548,7 @@ BOOL PspSalInfoPrinter::SetPrinterData( ImplJobSetup* pJobSetup )
}
m_aPrinterGfx.setStrictSO52Compatibility( bStrictSO52Compatibility );
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -557,8 +557,8 @@ BOOL PspSalInfoPrinter::SetPrinterData( ImplJobSetup* pJobSetup )
// and sets the new independ data in pJobSetup
// Only the data must be changed, where the bit
// in nGetDataFlags is set
-BOOL PspSalInfoPrinter::SetData(
- ULONG nSetDataFlags,
+sal_Bool PspSalInfoPrinter::SetData(
+ sal_uLong nSetDataFlags,
ImplJobSetup* pJobSetup )
{
JobData aData;
@@ -595,7 +595,7 @@ BOOL PspSalInfoPrinter::SetData(
pKey = aData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) );
pValue = pKey ? pKey->getValue( aPaper ) : NULL;
if( ! ( pKey && pValue && aData.m_aContext.setValue( pKey, pValue, false ) == pValue ) )
- return FALSE;
+ return sal_False;
}
// merge paperbin if necessary
@@ -655,10 +655,10 @@ BOOL PspSalInfoPrinter::SetData(
m_aJobData = aData;
copyJobDataToJobSetup( pJobSetup, aData );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -707,7 +707,7 @@ void PspSalInfoPrinter::GetPageInfo(
// -----------------------------------------------------------------------
-ULONG PspSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pJobSetup )
+sal_uLong PspSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pJobSetup )
{
if( ! pJobSetup )
return 0;
@@ -721,7 +721,7 @@ ULONG PspSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pJobSetup )
// -----------------------------------------------------------------------
-String PspSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pJobSetup, ULONG nPaperBin )
+String PspSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pJobSetup, sal_uLong nPaperBin )
{
JobData aData;
JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aData );
@@ -745,7 +745,7 @@ String PspSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pJobSetup, ULONG
// -----------------------------------------------------------------------
-ULONG PspSalInfoPrinter::GetCapabilities( const ImplJobSetup* pJobSetup, USHORT nType )
+sal_uLong PspSalInfoPrinter::GetCapabilities( const ImplJobSetup* pJobSetup, sal_uInt16 nType )
{
switch( nType )
{
@@ -841,11 +841,11 @@ static String getTmpName()
return aSys;
}
-BOOL PspSalPrinter::StartJob(
+sal_Bool PspSalPrinter::StartJob(
const XubString* pFileName,
const XubString& rJobName,
const XubString& rAppName,
- ULONG nCopies,
+ sal_uLong nCopies,
bool bCollate,
bool /*bDirect*/,
ImplJobSetup* pJobSetup )
@@ -920,14 +920,14 @@ BOOL PspSalPrinter::StartJob(
}
m_aPrinterGfx.setStrictSO52Compatibility( bStrictSO52Compatibility );
- return m_aPrintJob.StartJob( m_aTmpFile.Len() ? m_aTmpFile : m_aFileName, nMode, rJobName, rAppName, m_aJobData, &m_aPrinterGfx, false ) ? TRUE : FALSE;
+ return m_aPrintJob.StartJob( m_aTmpFile.Len() ? m_aTmpFile : m_aFileName, nMode, rJobName, rAppName, m_aJobData, &m_aPrinterGfx, false ) ? sal_True : sal_False;
}
// -----------------------------------------------------------------------
-BOOL PspSalPrinter::EndJob()
+sal_Bool PspSalPrinter::EndJob()
{
- BOOL bSuccess = m_aPrintJob.EndJob();
+ sal_Bool bSuccess = m_aPrintJob.EndJob();
if( bSuccess )
{
@@ -951,16 +951,16 @@ BOOL PspSalPrinter::EndJob()
// -----------------------------------------------------------------------
-BOOL PspSalPrinter::AbortJob()
+sal_Bool PspSalPrinter::AbortJob()
{
- BOOL bAbort = m_aPrintJob.AbortJob() ? TRUE : FALSE;
+ sal_Bool bAbort = m_aPrintJob.AbortJob() ? sal_True : sal_False;
vcl_sal::PrinterUpdate::jobEnded();
return bAbort;
}
// -----------------------------------------------------------------------
-SalGraphics* PspSalPrinter::StartPage( ImplJobSetup* pJobSetup, BOOL )
+SalGraphics* PspSalPrinter::StartPage( ImplJobSetup* pJobSetup, sal_Bool )
{
JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, m_aJobData );
m_pGraphics = new PspGraphics( &m_aJobData, &m_aPrinterGfx, m_bFax ? &m_aFaxNr : NULL, m_bSwallowFaxNo, m_pInfoPrinter );
@@ -981,16 +981,16 @@ SalGraphics* PspSalPrinter::StartPage( ImplJobSetup* pJobSetup, BOOL )
// -----------------------------------------------------------------------
-BOOL PspSalPrinter::EndPage()
+sal_Bool PspSalPrinter::EndPage()
{
sal_Bool bResult = m_aPrintJob.EndPage();
m_aPrinterGfx.Clear();
- return bResult ? TRUE : FALSE;
+ return bResult ? sal_True : sal_False;
}
// -----------------------------------------------------------------------
-ULONG PspSalPrinter::GetErrorCode()
+sal_uLong PspSalPrinter::GetErrorCode()
{
return 0;
}
diff --git a/vcl/unx/headless/svpprn.hxx b/vcl/unx/headless/svpprn.hxx
index 0da506076908..84dbf8277054 100644
--- a/vcl/unx/headless/svpprn.hxx
+++ b/vcl/unx/headless/svpprn.hxx
@@ -48,16 +48,16 @@ public:
// overload all pure virtual methods
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_uLong 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_uLong GetCapabilities( const ImplJobSetup* pSetupData, sal_uInt16 nType );
+ virtual sal_uLong GetPaperBinCount( const ImplJobSetup* pSetupData );
+ virtual String GetPaperBinName( const ImplJobSetup* pSetupData, sal_uLong nPaperBin );
virtual void InitPaperFormats( const ImplJobSetup* pSetupData );
virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData );
};
@@ -75,7 +75,7 @@ public:
psp::PrinterJob m_aPrintJob;
psp::JobData m_aJobData;
psp::PrinterGfx m_aPrinterGfx;
- ULONG m_nCopies;
+ sal_uLong m_nCopies;
bool m_bCollate;
SalInfoPrinter* m_pInfoPrinter;
@@ -84,18 +84,18 @@ public:
// overload all pure virtual methods
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_uLong 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_uLong GetErrorCode();
};
class Timer;
diff --git a/vcl/unx/headless/svppspgraphics.cxx b/vcl/unx/headless/svppspgraphics.cxx
index c7b1f4f41fca..13c5469ed028 100644
--- a/vcl/unx/headless/svppspgraphics.cxx
+++ b/vcl/unx/headless/svppspgraphics.cxx
@@ -43,6 +43,7 @@
#include "vcl/svapp.hxx"
#include "vcl/salprn.hxx"
#include "vcl/sysdata.hxx"
+#include "vcl/region.h"
#include "basegfx/vector/b2ivector.hxx"
#include "basegfx/point/b2ipoint.hxx"
@@ -204,7 +205,7 @@ void PspGraphics::GetResolution( sal_Int32 &rDPIX, sal_Int32 &rDPIY )
}
}
-USHORT PspGraphics::GetBitCount()
+sal_uInt16 PspGraphics::GetBitCount()
{
return m_pPrinterGfx->GetBitCount();
}
@@ -216,28 +217,27 @@ long PspGraphics::GetGraphicsWidth() const
void PspGraphics::ResetClipRegion()
{
- m_pPrinterGfx->ResetClipRegion ();
+ m_pPrinterGfx->ResetClipRegion();
}
-void PspGraphics::BeginSetClipRegion( ULONG n )
+bool PspGraphics::setClipRegion( const Region& i_rClip )
{
- m_pPrinterGfx->BeginSetClipRegion(n);
-}
-
-BOOL PspGraphics::unionClipRegion( long nX, long nY, long nDX, long nDY )
-{
- return (BOOL)m_pPrinterGfx->UnionClipRegion (nX, nY, nDX, nDY);
-}
-
-bool PspGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& )
-{
- // TODO: implement and advertise OutDevSupport_B2DClip support
- return false;
-}
+ // TODO: support polygonal clipregions here
+ m_pPrinterGfx->BeginSetClipRegion( i_rClip.GetRectCount() );
-void PspGraphics::EndSetClipRegion()
-{
- m_pPrinterGfx->EndSetClipRegion ();
+ ImplRegionInfo aInfo;
+ long nX, nY, nW, nH;
+ bool bRegionRect = i_rClip.ImplGetFirstRect(aInfo, nX, nY, nW, nH );
+ while( bRegionRect )
+ {
+ if ( nW && nH )
+ {
+ m_pPrinterGfx->UnionClipRegion( nX, nY, nW, nH );
+ }
+ bRegionRect = i_rClip.ImplGetNextRect( aInfo, nX, nY, nW, nH );
+ }
+ m_pPrinterGfx->EndSetClipRegion();
+ return true;
}
void PspGraphics::SetLineColor()
@@ -305,12 +305,12 @@ void PspGraphics::drawRect( long nX, long nY, long nDX, long nDY )
m_pPrinterGfx->DrawRect (Rectangle(Point(nX, nY), Size(nDX, nDY)));
}
-void PspGraphics::drawPolyLine( ULONG nPoints, const SalPoint *pPtAry )
+void PspGraphics::drawPolyLine( sal_uLong nPoints, const SalPoint *pPtAry )
{
m_pPrinterGfx->DrawPolyLine (nPoints, (Point*)pPtAry);
}
-void PspGraphics::drawPolygon( ULONG nPoints, const SalPoint* pPtAry )
+void PspGraphics::drawPolygon( sal_uLong nPoints, const SalPoint* pPtAry )
{
// Point must be equal to SalPoint! see vcl/inc/salgtype.hxx
m_pPrinterGfx->DrawPolygon (nPoints, (Point*)pPtAry);
@@ -329,13 +329,13 @@ bool PspGraphics::drawPolyLine( const ::basegfx::B2DPolygon&, double /*fTranspar
return false;
}
-sal_Bool PspGraphics::drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry )
+sal_Bool PspGraphics::drawPolyLineBezier( sal_uLong nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry )
{
m_pPrinterGfx->DrawPolyLineBezier (nPoints, (Point*)pPtAry, pFlgAry);
return sal_True;
}
-sal_Bool PspGraphics::drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry )
+sal_Bool PspGraphics::drawPolygonBezier( sal_uLong nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry )
{
m_pPrinterGfx->DrawPolygonBezier (nPoints, (Point*)pPtAry, pFlgAry);
return sal_True;
@@ -344,10 +344,10 @@ sal_Bool PspGraphics::drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry,
sal_Bool PspGraphics::drawPolyPolygonBezier( sal_uInt32 nPoly,
const sal_uInt32* pPoints,
const SalPoint* const* pPtAry,
- const BYTE* const* pFlgAry )
+ const sal_uInt8* const* pFlgAry )
{
// Point must be equal to SalPoint! see vcl/inc/salgtype.hxx
- m_pPrinterGfx->DrawPolyPolygonBezier (nPoly, pPoints, (Point**)pPtAry, (BYTE**)pFlgAry);
+ m_pPrinterGfx->DrawPolyPolygonBezier (nPoly, pPoints, (Point**)pPtAry, (sal_uInt8**)pFlgAry);
return sal_True;
}
@@ -357,13 +357,13 @@ bool PspGraphics::drawPolyPolygon( const basegfx::B2DPolyPolygon&, double /*fTra
return false;
}
-void PspGraphics::invert( ULONG /*nPoints*/,
+void PspGraphics::invert( sal_uLong /*nPoints*/,
const SalPoint* /*pPtAry*/,
SalInvert /*nFlags*/ )
{
DBG_ASSERT( 0, "Error: PrinterGfx::Invert() not implemented" );
}
-BOOL PspGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize )
+sal_Bool PspGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uLong nSize )
{
return m_pPrinterGfx->DrawEPS( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ), pPtr, nSize );
}
@@ -377,7 +377,7 @@ void PspGraphics::copyBits( const SalTwoRect* /*pPosAry*/,
void PspGraphics::copyArea ( long /*nDestX*/, long /*nDestY*/,
long /*nSrcX*/, long /*nSrcY*/,
long /*nSrcWidth*/, long /*nSrcHeight*/,
- USHORT /*nFlags*/ )
+ sal_uInt16 /*nFlags*/ )
{
DBG_ERROR( "Error: PrinterGfx::CopyArea() not implemented" );
}
@@ -692,7 +692,7 @@ const ImplFontCharMap* PspGraphics::GetImplFontCharMap() const
return pIFCMap;
}
-USHORT PspGraphics::SetFont( ImplFontSelectData *pEntry, int nFallbackLevel )
+sal_uInt16 PspGraphics::SetFont( ImplFontSelectData *pEntry, int nFallbackLevel )
{
// release all fonts that are to be overridden
for( int i = nFallbackLevel; i < MAX_FALLBACK; ++i )
@@ -817,10 +817,10 @@ void PspGraphics::GetFontMetric( ImplFontMetricData *pMetric, int )
}
}
-ULONG PspGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData *pKernPairs )
+sal_uLong PspGraphics::GetKernPairs( sal_uLong nPairs, ImplKernPairData *pKernPairs )
{
const ::std::list< ::psp::KernPair >& rPairs( m_pPrinterGfx->getKernPairs() );
- ULONG nHavePairs = rPairs.size();
+ sal_uLong nHavePairs = rPairs.size();
if( pKernPairs && nPairs )
{
::std::list< ::psp::KernPair >::const_iterator it;
@@ -839,38 +839,38 @@ ULONG PspGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData *pKernPairs )
return nHavePairs;
}
-BOOL PspGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect )
+sal_Bool PspGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect )
{
int nLevel = nGlyphIndex >> GF_FONTSHIFT;
if( nLevel >= MAX_FALLBACK )
- return FALSE;
+ return sal_False;
ServerFont* pSF = m_pServerFont[ nLevel ];
if( !pSF )
- return FALSE;
+ return sal_False;
nGlyphIndex &= ~GF_FONTMASK;
const GlyphMetric& rGM = pSF->GetGlyphMetric( nGlyphIndex );
rRect = Rectangle( rGM.GetOffset(), rGM.GetSize() );
- return TRUE;
+ return sal_True;
}
-BOOL PspGraphics::GetGlyphOutline( long nGlyphIndex,
+sal_Bool PspGraphics::GetGlyphOutline( long nGlyphIndex,
::basegfx::B2DPolyPolygon& rB2DPolyPoly )
{
int nLevel = nGlyphIndex >> GF_FONTSHIFT;
if( nLevel >= MAX_FALLBACK )
- return FALSE;
+ return sal_False;
ServerFont* pSF = m_pServerFont[ nLevel ];
if( !pSF )
- return FALSE;
+ return sal_False;
nGlyphIndex &= ~GF_FONTMASK;
if( pSF->GetGlyphOutline( nGlyphIndex, rB2DPolyPoly ) )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
SalLayout* PspGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLevel )
@@ -895,7 +895,7 @@ SalLayout* PspGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLevel
//--------------------------------------------------------------------------
-BOOL PspGraphics::CreateFontSubset(
+sal_Bool PspGraphics::CreateFontSubset(
const rtl::OUString& rToFile,
const ImplFontData* pFont,
sal_Int32* pGlyphIDs,
@@ -1281,9 +1281,9 @@ bool PspGraphics::filterText( const String& rOrig, String& rNewText, xub_StrLen
bool bRet = false;
bool bStarted = false;
bool bStopped = false;
- USHORT nPos;
- USHORT nStart = 0;
- USHORT nStop = rLen;
+ sal_uInt16 nPos;
+ sal_uInt16 nStart = 0;
+ sal_uInt16 nStop = rLen;
String aPhone = rOrig.Copy( nIndex, rLen );
if( ! m_bPhoneCollectionActive )
diff --git a/vcl/unx/headless/svppspgraphics.hxx b/vcl/unx/headless/svppspgraphics.hxx
index 138198239621..729116fcc1d2 100644
--- a/vcl/unx/headless/svppspgraphics.hxx
+++ b/vcl/unx/headless/svppspgraphics.hxx
@@ -86,14 +86,11 @@ public:
// overload all pure virtual methods
virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY );
- virtual USHORT GetBitCount();
+ virtual sal_uInt16 GetBitCount();
virtual long GetGraphicsWidth() const;
virtual void ResetClipRegion();
- virtual void BeginSetClipRegion( ULONG nCount );
- virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight );
- virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& );
- virtual void EndSetClipRegion();
+ virtual bool setClipRegion( const Region& );
virtual void SetLineColor();
virtual void SetLineColor( SalColor nSalColor );
@@ -104,14 +101,14 @@ public:
virtual void SetROPFillColor( SalROPColor nROPColor );
virtual void SetTextColor( SalColor nSalColor );
- virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel );
+ virtual sal_uInt16 SetFont( ImplFontSelectData*, int nFallbackLevel );
virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel );
- virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs );
+ virtual sal_uLong GetKernPairs( sal_uLong nPairs, ImplKernPairData* pKernPairs );
virtual const ImplFontCharMap* GetImplFontCharMap() const;
virtual void GetDevFontList( ImplDevFontList* );
virtual void GetDevFontSubstList( OutputDevice* );
virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName );
- virtual BOOL CreateFontSubset( const rtl::OUString& rToFile,
+ virtual sal_Bool CreateFontSubset( const rtl::OUString& rToFile,
const ImplFontData*,
sal_Int32* pGlyphIDs,
sal_uInt8* pEncoding,
@@ -130,8 +127,8 @@ public:
bool bVertical,
Int32Vector& rWidths,
Ucs2UIntMap& rUnicodeEnc );
- 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;
@@ -139,23 +136,23 @@ public:
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_uLong nPoints, const SalPoint* pPtAry );
+ virtual void drawPolygon( sal_uLong nPoints, const SalPoint* pPtAry );
virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency );
virtual bool drawPolyLine( const ::basegfx::B2DPolygon&, double fTransparency, const ::basegfx::B2DVector& rLineWidths, basegfx::B2DLineJoin );
virtual void drawPolyPolygon( sal_uInt32 nPoly,
const sal_uInt32* pPoints,
PCONSTSALPOINT* pPtAry );
- virtual sal_Bool drawPolyLineBezier( ULONG nPoints,
+ virtual sal_Bool drawPolyLineBezier( sal_uLong nPoints,
const SalPoint* pPtAry,
- const BYTE* pFlgAry );
- virtual sal_Bool drawPolygonBezier( ULONG nPoints,
+ const sal_uInt8* pFlgAry );
+ virtual sal_Bool drawPolygonBezier( sal_uLong nPoints,
const SalPoint* pPtAry,
- const BYTE* pFlgAry );
+ const sal_uInt8* pFlgAry );
virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly,
const sal_uInt32* pPoints,
const SalPoint* const* pPtAry,
- const BYTE* const* pFlgAry );
+ const sal_uInt8* const* pFlgAry );
virtual void copyArea( long nDestX,
long nDestY,
@@ -163,7 +160,7 @@ public:
long nSrcY,
long nSrcWidth,
long nSrcHeight,
- USHORT nFlags );
+ sal_uInt16 nFlags );
virtual void copyBits( const SalTwoRect* pPosAry,
SalGraphics* pSrcGraphics );
virtual void drawBitmap( const SalTwoRect* pPosAry,
@@ -180,9 +177,9 @@ public:
virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight );
virtual SalColor getPixel( long nX, long nY );
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_uLong 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_uLong nSize );
virtual bool filterText( const String& rOrigText, String& rNewText, xub_StrLen nIndex, xub_StrLen& rLen, xub_StrLen& rCutStart, xub_StrLen& rCutStop );
virtual SystemGraphicsData GetGraphicsData() const;
diff --git a/vcl/unx/headless/svptext.cxx b/vcl/unx/headless/svptext.cxx
index dff1fd4d6ca7..fba7fe4bf31d 100644
--- a/vcl/unx/headless/svptext.cxx
+++ b/vcl/unx/headless/svptext.cxx
@@ -1,4 +1,4 @@
-/*************************************************************************
+#/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -204,7 +204,7 @@ void PspKernInfo::Initialize() const
// ===========================================================================
-USHORT SvpSalGraphics::SetFont( ImplFontSelectData* pIFSD, int nFallbackLevel )
+sal_uInt16 SvpSalGraphics::SetFont( ImplFontSelectData* pIFSD, int nFallbackLevel )
{
// release all no longer needed font resources
for( int i = nFallbackLevel; i < MAX_FALLBACK; ++i )
@@ -254,15 +254,15 @@ void SvpSalGraphics::GetFontMetric( ImplFontMetricData* pMetric, int nFallbackLe
// ---------------------------------------------------------------------------
-ULONG SvpSalGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs )
+sal_uLong SvpSalGraphics::GetKernPairs( sal_uLong nPairs, ImplKernPairData* pKernPairs )
{
- ULONG nGotPairs = 0;
+ sal_uLong nGotPairs = 0;
if( m_pServerFont[0] != NULL )
{
ImplKernPairData* pTmpKernPairs = NULL;
nGotPairs = m_pServerFont[0]->GetKernPairs( &pTmpKernPairs );
- for( ULONG i = 0; i < nPairs && i < nGotPairs; ++i )
+ for( sal_uLong i = 0; i < nPairs && i < nGotPairs; ++i )
pKernPairs[ i ] = pTmpKernPairs[ i ];
delete[] pTmpKernPairs;
}
@@ -339,7 +339,7 @@ bool SvpSalGraphics::AddTempDevFont( ImplDevFontList*,
// ---------------------------------------------------------------------------
-BOOL SvpSalGraphics::CreateFontSubset(
+sal_Bool SvpSalGraphics::CreateFontSubset(
const rtl::OUString& rToFile,
const ImplFontData* pFont,
sal_Int32* pGlyphIDs,
@@ -422,39 +422,39 @@ void SvpSalGraphics::GetGlyphWidths( const ImplFontData* pFont,
// ---------------------------------------------------------------------------
-BOOL SvpSalGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect )
+sal_Bool SvpSalGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect )
{
int nLevel = nGlyphIndex >> GF_FONTSHIFT;
if( nLevel >= MAX_FALLBACK )
- return FALSE;
+ return sal_False;
ServerFont* pSF = m_pServerFont[ nLevel ];
if( !pSF )
- return FALSE;
+ return sal_False;
nGlyphIndex &= ~GF_FONTMASK;
const GlyphMetric& rGM = pSF->GetGlyphMetric( nGlyphIndex );
rRect = Rectangle( rGM.GetOffset(), rGM.GetSize() );
- return TRUE;
+ return sal_True;
}
// ---------------------------------------------------------------------------
-BOOL SvpSalGraphics::GetGlyphOutline( long nGlyphIndex, B2DPolyPolygon& rPolyPoly )
+sal_Bool SvpSalGraphics::GetGlyphOutline( long nGlyphIndex, B2DPolyPolygon& rPolyPoly )
{
int nLevel = nGlyphIndex >> GF_FONTSHIFT;
if( nLevel >= MAX_FALLBACK )
- return FALSE;
+ return sal_False;
const ServerFont* pSF = m_pServerFont[ nLevel ];
if( !pSF )
- return FALSE;
+ return sal_False;
nGlyphIndex &= ~GF_FONTMASK;
if( pSF->GetGlyphOutline( nGlyphIndex, rPolyPoly ) )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
// ---------------------------------------------------------------------------
diff --git a/vcl/unx/headless/svpvd.cxx b/vcl/unx/headless/svpvd.cxx
index 1c2ab01ccca2..4afbaefbfe7c 100644
--- a/vcl/unx/headless/svpvd.cxx
+++ b/vcl/unx/headless/svpvd.cxx
@@ -54,7 +54,7 @@ void SvpSalVirtualDevice::ReleaseGraphics( SalGraphics* pGraphics )
delete pGraphics;
}
-BOOL SvpSalVirtualDevice::SetSize( long nNewDX, long nNewDY )
+sal_Bool SvpSalVirtualDevice::SetSize( long nNewDX, long nNewDY )
{
B2IVector aDevSize( nNewDX, nNewDY );
if( aDevSize.getX() == 0 )
diff --git a/vcl/unx/headless/svpvd.hxx b/vcl/unx/headless/svpvd.hxx
index 083547cf19a9..784a2ad6f664 100644
--- a/vcl/unx/headless/svpvd.hxx
+++ b/vcl/unx/headless/svpvd.hxx
@@ -37,12 +37,12 @@ class SvpSalGraphics;
class SvpSalVirtualDevice : public SalVirtualDevice, public SvpElement
{
- USHORT m_nBitCount;
+ sal_uInt16 m_nBitCount;
basebmp::BitmapDeviceSharedPtr m_aDevice;
std::list< SvpSalGraphics* > m_aGraphics;
public:
- SvpSalVirtualDevice( USHORT nBitCount ) : SvpElement(), m_nBitCount(nBitCount) {}
+ SvpSalVirtualDevice( sal_uInt16 nBitCount ) : SvpElement(), m_nBitCount(nBitCount) {}
virtual ~SvpSalVirtualDevice();
// SvpElement
@@ -52,7 +52,7 @@ public:
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/unx/inc/dtint.hxx b/vcl/unx/inc/dtint.hxx
index 75f197c81e13..6e6cf13575ed 100644
--- a/vcl/unx/inc/dtint.hxx
+++ b/vcl/unx/inc/dtint.hxx
@@ -31,19 +31,12 @@
#include <tools/string.hxx>
#include <tools/color.hxx>
#include <vcl/font.hxx>
+#include "svunx.h"
class SalBitmap;
class SalDisplay;
class AllSettings;
-#ifndef _XLIB_H_
-// forwards from X
-struct Display;
-struct XEvent;
-#define Atom UINT32
-#define XLIB_Window UINT32
-#endif
-
enum DtType {
DtGeneric,
DtCDE
diff --git a/vcl/unx/inc/i18n_cb.hxx b/vcl/unx/inc/i18n_cb.hxx
index d2301c26a3b0..97fd7f1fb6c8 100644
--- a/vcl/unx/inc/i18n_cb.hxx
+++ b/vcl/unx/inc/i18n_cb.hxx
@@ -89,7 +89,7 @@ typedef struct {
preedit_status_t eState;
preedit_text_t aText;
SalExtTextInputEvent aInputEv;
- std::vector< USHORT > aInputFlags;
+ std::vector< sal_uInt16 > aInputFlags;
} preedit_data_t;
#endif /* _SAL_I18N_CALLBACK_HXX */
diff --git a/vcl/unx/inc/i18n_ic.hxx b/vcl/unx/inc/i18n_ic.hxx
index 2fb97a00b6f2..977d7f3e3a6f 100644
--- a/vcl/unx/inc/i18n_ic.hxx
+++ b/vcl/unx/inc/i18n_ic.hxx
@@ -75,7 +75,7 @@ public:
void HandleDestroyIM();
int HandleKeyEvent( XKeyEvent *pEvent, SalFrame *pFrame ); // unused
- void EndExtTextInput( USHORT nFlags ); // unused
+ void EndExtTextInput( sal_uInt16 nFlags ); // unused
int CommitStringCallback( sal_Unicode* pText, sal_Size nLength );
int CommitKeyEvent( sal_Unicode* pText, sal_Size nLength );
int UpdateSpotLocation();
diff --git a/vcl/unx/inc/plugins/gtk/gtkframe.hxx b/vcl/unx/inc/plugins/gtk/gtkframe.hxx
index d47e5fb50fca..1ddc9e24e4f1 100644
--- a/vcl/unx/inc/plugins/gtk/gtkframe.hxx
+++ b/vcl/unx/inc/plugins/gtk/gtkframe.hxx
@@ -134,7 +134,7 @@ class GtkSalFrame : public SalFrame
bool m_bFocused;
bool m_bPreeditJustChanged;
SalExtTextInputEvent m_aInputEvent;
- std::vector< USHORT > m_aInputFlags;
+ std::vector< sal_uInt16 > m_aInputFlags;
IMHandler( GtkSalFrame* );
~IMHandler();
@@ -143,7 +143,7 @@ class GtkSalFrame : public SalFrame
void deleteIMContext();
void updateIMSpotLocation();
void setInputContext( SalInputContext* pContext );
- void endExtTextInput( USHORT nFlags );
+ void endExtTextInput( sal_uInt16 nFlags );
bool handleKeyEvent( GdkEventKey* pEvent );
void focusChanged( bool bFocusIn );
@@ -167,7 +167,7 @@ class GtkSalFrame : public SalFrame
GdkWindow* m_pForeignTopLevel;
GdkNativeWindow m_aForeignTopLevelWindow;
Pixmap m_hBackgroundPixmap;
- ULONG m_nStyle;
+ sal_uLong m_nStyle;
SalExtStyle m_nExtStyle;
GtkFixed* m_pFixedContainer;
GtkSalFrame* m_pParent;
@@ -175,7 +175,7 @@ class GtkSalFrame : public SalFrame
GdkWindowState m_nState;
SystemEnvData m_aSystemData;
GraphicsHolder m_aGraphics[ nMaxGraphics ];
- USHORT m_nKeyModifiers;
+ sal_uInt16 m_nKeyModifiers;
GdkCursor *m_pCurrentCursor;
GdkVisibilityState m_nVisibility;
PointerStyle m_ePointerStyle;
@@ -199,7 +199,7 @@ class GtkSalFrame : public SalFrame
GdkRegion* m_pRegion;
- void Init( SalFrame* pParent, ULONG nStyle );
+ void Init( SalFrame* pParent, sal_uLong nStyle );
void Init( SystemParentData* pSysData );
void InitCommon();
@@ -251,7 +251,7 @@ class GtkSalFrame : public SalFrame
bool isChild( bool bPlug = true, bool bSysChild = true )
{
- ULONG nMask = 0;
+ sal_uLong nMask = 0;
if( bPlug )
nMask |= SAL_FRAME_STYLE_PLUG;
if( bSysChild )
@@ -270,14 +270,14 @@ class GtkSalFrame : public SalFrame
DECL_LINK( ImplDelayedFullScreenHdl, void* );
public:
- GtkSalFrame( SalFrame* pParent, ULONG nStyle );
+ GtkSalFrame( SalFrame* pParent, sal_uLong nStyle );
GtkSalFrame( SystemParentData* pSysData );
// dispatches an event, returns true if dispatched
// and false else; if true was returned the event should
// be swallowed
bool Dispatch( const XEvent* pEvent );
- void grabPointer( BOOL bGrab, BOOL bOwnerEvents = FALSE );
+ void grabPointer( sal_Bool bGrab, sal_Bool bOwnerEvents = sal_False );
GtkSalDisplay* getDisplay();
GdkDisplay* getGdkDisplay();
@@ -304,41 +304,41 @@ public:
// Event must be destroyed, when Frame is destroyed
// When Event is called, SalInstance::Yield() must be returned
- 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 );
// Before the window is visible, a resize event
// must be sent with the correct size
- virtual void Show( BOOL bVisible, BOOL bNoActivate = FALSE );
- virtual void Enable( BOOL bEnable );
+ virtual void Show( sal_Bool bVisible, sal_Bool bNoActivate = sal_False );
+ virtual void Enable( sal_Bool bEnable );
// Set ClientSize and Center the Window to the desktop
// and send/post a resize message
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 sal_Bool GetWindowState( SalFrameState* pState );
+ virtual void ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay );
// Enable/Disable ScreenSaver, SystemAgents, ...
- virtual void StartPresentation( BOOL bStart );
+ virtual void StartPresentation( sal_Bool bStart );
// Show Window over all other Windows
- virtual void SetAlwaysOnTop( BOOL bOnTop );
+ virtual void SetAlwaysOnTop( sal_Bool bOnTop );
// Window to top and grab focus
- virtual void ToTop( USHORT nFlags );
+ virtual void ToTop( sal_uInt16 nFlags );
// this function can call with the same
// pointer style
virtual void SetPointer( PointerStyle ePointerStyle );
- virtual void CaptureMouse( BOOL bMouse );
+ virtual void CaptureMouse( sal_Bool bMouse );
virtual void SetPointerPos( long nX, long nY );
// flush output buffer
@@ -348,11 +348,11 @@ public:
virtual void Sync();
virtual void SetInputContext( SalInputContext* pContext );
- virtual void EndExtTextInput( USHORT nFlags );
+ virtual void EndExtTextInput( sal_uInt16 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 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 );
// returns the input language used for the last key stroke
// may be LANGUAGE_DONTKNOW if not supported by the OS
@@ -386,7 +386,7 @@ public:
// set clip region to none (-> rectangular windows, normal state)
virtual void ResetClipRegion();
// start setting the clipregion consisting of nRects rectangles
- virtual void BeginSetClipRegion( ULONG nRects );
+ virtual void BeginSetClipRegion( sal_uLong nRects );
// add a rectangle to the clip region
virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
// done setting up the clipregion
diff --git a/vcl/unx/inc/plugins/gtk/gtkgdi.hxx b/vcl/unx/inc/plugins/gtk/gtkgdi.hxx
index 38c79b3e11df..57a639f8ad5b 100644
--- a/vcl/unx/inc/plugins/gtk/gtkgdi.hxx
+++ b/vcl/unx/inc/plugins/gtk/gtkgdi.hxx
@@ -55,34 +55,31 @@ public:
// will be set when UI theme was changed
- static BOOL bThemeChanged;
- static BOOL bNeedPixmapPaint;
- static BOOL bGlobalNeedPixmapPaint;
- static BOOL bToolbarGripWorkaround;
- static BOOL bNeedButtonStyleAsEditBackgroundWorkaround;
+ static sal_Bool bThemeChanged;
+ static sal_Bool bNeedPixmapPaint;
+ static sal_Bool bGlobalNeedPixmapPaint;
+ static sal_Bool bToolbarGripWorkaround;
+ static sal_Bool bNeedButtonStyleAsEditBackgroundWorkaround;
// native widget methods
- virtual BOOL IsNativeControlSupported( ControlType nType, ControlPart nPart );
- virtual BOOL hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
- const Point& aPos, BOOL& rIsInside );
- virtual BOOL drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
+ virtual sal_Bool IsNativeControlSupported( ControlType nType, ControlPart nPart );
+ virtual sal_Bool hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
+ const Point& aPos, sal_Bool& rIsInside );
+ virtual sal_Bool drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
const rtl::OUString& rCaption );
- virtual BOOL drawNativeControlText( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
+ virtual sal_Bool drawNativeControlText( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
const rtl::OUString& rCaption );
- virtual BOOL getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState,
+ virtual sal_Bool getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState,
const ImplControlValue& aValue, const rtl::OUString& rCaption,
Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion );
//helper methods for frame's UpdateSettings
void updateSettings( AllSettings& rSettings );
+ virtual bool setClipRegion( const Region& );
virtual void ResetClipRegion();
- virtual void BeginSetClipRegion( ULONG nCount );
- virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight );
- virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& );
- virtual void EndSetClipRegion();
// some themes set the background pixmap of our window EVERY time
// a control is painted; but presentation effects need
@@ -95,85 +92,85 @@ protected:
typedef std::list< Rectangle > clipList;
GdkPixmap* NWGetPixmapFromScreen( Rectangle srcRect );
- BOOL NWRenderPixmapToScreen( GdkPixmap* pPixmap, Rectangle dstRect );
+ sal_Bool NWRenderPixmapToScreen( GdkPixmap* pPixmap, Rectangle dstRect );
- BOOL NWPaintGTKButton( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
+ sal_Bool NWPaintGTKButton( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
- BOOL NWPaintGTKRadio( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
+ sal_Bool NWPaintGTKRadio( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
- BOOL NWPaintGTKCheck( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
+ sal_Bool NWPaintGTKCheck( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
- BOOL NWPaintGTKScrollbar( ControlType nType, ControlPart nPart,
+ sal_Bool NWPaintGTKScrollbar( ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
- BOOL NWPaintGTKEditBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
+ sal_Bool NWPaintGTKEditBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
- BOOL NWPaintGTKSpinBox( ControlType nType, ControlPart nPart,
+ sal_Bool NWPaintGTKSpinBox( ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
- BOOL NWPaintGTKComboBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
+ sal_Bool NWPaintGTKComboBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
- BOOL NWPaintGTKTabItem( ControlType nType, ControlPart nPart,
+ sal_Bool NWPaintGTKTabItem( ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
- BOOL NWPaintGTKListBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
+ sal_Bool NWPaintGTKListBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
- BOOL NWPaintGTKToolbar( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
+ sal_Bool NWPaintGTKToolbar( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
- BOOL NWPaintGTKMenubar( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
+ sal_Bool NWPaintGTKMenubar( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
- BOOL NWPaintGTKPopupMenu( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
+ sal_Bool NWPaintGTKPopupMenu( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
- BOOL NWPaintGTKTooltip( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
+ sal_Bool NWPaintGTKTooltip( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
- BOOL NWPaintGTKProgress( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
+ sal_Bool NWPaintGTKProgress( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
- BOOL NWPaintGTKSlider( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
+ sal_Bool NWPaintGTKSlider( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
- BOOL NWPaintGTKListNode( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
+ sal_Bool NWPaintGTKListNode( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
diff --git a/vcl/unx/inc/plugins/gtk/gtkinst.hxx b/vcl/unx/inc/plugins/gtk/gtkinst.hxx
index ee07199cb266..a9f788831199 100644
--- a/vcl/unx/inc/plugins/gtk/gtkinst.hxx
+++ b/vcl/unx/inc/plugins/gtk/gtkinst.hxx
@@ -63,7 +63,7 @@ class GtkHookedYieldMutex : public GtkYieldMutex
{
virtual int Grab() { return 0; };
virtual void Ungrab(int ) {};
- std::list<ULONG> aYieldStack;
+ std::list<sal_uLong> aYieldStack;
public:
GtkHookedYieldMutex();
virtual void acquire();
@@ -84,9 +84,9 @@ public:
{}
virtual ~GtkInstance();
- virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle );
- virtual SalFrame* CreateChildFrame( SystemParentData* pParent, ULONG nStyle );
- virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE );
+ virtual SalFrame* CreateFrame( SalFrame* pParent, sal_uLong nStyle );
+ virtual SalFrame* CreateChildFrame( SystemParentData* pParent, sal_uLong nStyle );
+ virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, sal_Bool bShow = sal_True );
virtual SalSystem* CreateSalSystem();
virtual void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType);
};
diff --git a/vcl/unx/inc/plugins/gtk/gtkobject.hxx b/vcl/unx/inc/plugins/gtk/gtkobject.hxx
index 9d3f235b8894..67434f038617 100644
--- a/vcl/unx/inc/plugins/gtk/gtkobject.hxx
+++ b/vcl/unx/inc/plugins/gtk/gtkobject.hxx
@@ -44,19 +44,19 @@ class GtkSalObject : public SalObject
static gboolean signalFocus( GtkWidget*, GdkEventFocus*, gpointer );
static void signalDestroy( GtkObject*, gpointer );
public:
- GtkSalObject( GtkSalFrame* pParent, BOOL bShow = TRUE );
+ GtkSalObject( GtkSalFrame* pParent, sal_Bool bShow = sal_True );
virtual ~GtkSalObject();
// overload all pure virtual methods
virtual void ResetClipRegion();
- virtual USHORT GetClipRegionType();
- virtual void BeginSetClipRegion( ULONG nRects );
+ virtual sal_uInt16 GetClipRegionType();
+ virtual void BeginSetClipRegion( sal_uLong 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();
diff --git a/vcl/unx/inc/plugins/kde/kdedata.hxx b/vcl/unx/inc/plugins/kde/kdedata.hxx
index a55471901283..210799493638 100644
--- a/vcl/unx/inc/plugins/kde/kdedata.hxx
+++ b/vcl/unx/inc/plugins/kde/kdedata.hxx
@@ -67,14 +67,14 @@ class KDESalFrame : public X11SalFrame
GraphicsHolder m_aGraphics[ nMaxGraphics ];
public:
- KDESalFrame( SalFrame* pParent, ULONG nStyle );
+ KDESalFrame( SalFrame* pParent, sal_uLong );
virtual ~KDESalFrame();
virtual SalGraphics* GetGraphics();
virtual void ReleaseGraphics( SalGraphics *pGraphics );
virtual void updateGraphics( bool bClear );
virtual void UpdateSettings( AllSettings& rSettings );
- virtual void Show( BOOL bVisible, BOOL bNoActivate );
+ virtual void Show( sal_Bool bVisible, sal_Bool bNoActivate );
};
class KDESalInstance : public X11SalInstance
@@ -83,7 +83,7 @@ public:
KDESalInstance( SalYieldMutex* pMutex )
: X11SalInstance( pMutex ) {}
virtual ~KDESalInstance() {}
- virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle );
+ virtual SalFrame* CreateFrame( SalFrame* pParent, sal_uLong nStyle );
};
class KDEXLib : public SalXLib
diff --git a/vcl/unx/inc/pspgraphics.h b/vcl/unx/inc/pspgraphics.h
index d4f5a9f156e0..7d9a2b8a3d0e 100644
--- a/vcl/unx/inc/pspgraphics.h
+++ b/vcl/unx/inc/pspgraphics.h
@@ -83,14 +83,11 @@ public:
// overload all pure virtual methods
virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY );
- virtual USHORT GetBitCount();
+ virtual sal_uInt16 GetBitCount();
virtual long GetGraphicsWidth() const;
virtual void ResetClipRegion();
- virtual void BeginSetClipRegion( ULONG nCount );
- virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight );
- virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& );
- virtual void EndSetClipRegion();
+ virtual bool setClipRegion( const Region& );
virtual void SetLineColor();
virtual void SetLineColor( SalColor nSalColor );
@@ -101,14 +98,14 @@ public:
virtual void SetROPFillColor( SalROPColor nROPColor );
virtual void SetTextColor( SalColor nSalColor );
- virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel );
+ virtual sal_uInt16 SetFont( ImplFontSelectData*, int nFallbackLevel );
virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel );
- virtual ULONG GetKernPairs( ULONG nMaxPairs, ImplKernPairData* );
+ virtual sal_uLong GetKernPairs( sal_uLong nMaxPairs, ImplKernPairData* );
virtual const ImplFontCharMap* GetImplFontCharMap() const;
virtual void GetDevFontList( ImplDevFontList* );
virtual void GetDevFontSubstList( OutputDevice* );
virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName );
- virtual BOOL CreateFontSubset( const rtl::OUString& rToFile,
+ virtual sal_Bool CreateFontSubset( const rtl::OUString& rToFile,
const ImplFontData*,
sal_Int32* pGlyphIDs,
sal_uInt8* pEncoding,
@@ -127,8 +124,8 @@ public:
bool bVertical,
Int32Vector& rWidths,
Ucs2UIntMap& rUnicodeEnc );
- 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;
@@ -136,30 +133,30 @@ public:
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&, double fTransparency, const basegfx::B2DVector& rLineWidths, basegfx::B2DLineJoin);
- virtual sal_Bool drawPolyLineBezier( ULONG nPoints,
+ virtual sal_Bool drawPolyLineBezier( sal_uIntPtr nPoints,
const SalPoint* pPtAry,
- const BYTE* pFlgAry );
- virtual sal_Bool drawPolygonBezier( ULONG nPoints,
+ const sal_uInt8* pFlgAry );
+ virtual sal_Bool drawPolygonBezier( sal_uIntPtr nPoints,
const SalPoint* pPtAry,
- const BYTE* pFlgAry );
+ const sal_uInt8* pFlgAry );
virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly,
const sal_uInt32* pPoints,
const SalPoint* const* pPtAry,
- const BYTE* const* pFlgAry );
+ const sal_uInt8* const* pFlgAry );
virtual void copyArea( long nDestX,
long nDestY,
long nSrcX,
long nSrcY,
long nSrcWidth,
long nSrcHeight,
- USHORT nFlags );
+ sal_uInt16 nFlags );
virtual void copyBits( const SalTwoRect* pPosAry,
SalGraphics* pSrcGraphics );
virtual void drawBitmap( const SalTwoRect* pPosAry,
@@ -176,9 +173,9 @@ public:
virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight );
virtual SalColor getPixel( long nX, long nY );
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 );
virtual bool filterText( const String& rOrigText, String& rNewText, xub_StrLen nIndex, xub_StrLen& rLen, xub_StrLen& rCutStart, xub_StrLen& rCutStop );
virtual bool drawAlphaBitmap( const SalTwoRect&,
diff --git a/vcl/unx/inc/salbmp.h b/vcl/unx/inc/salbmp.h
index 23e038f30ab1..121966345f75 100644
--- a/vcl/unx/inc/salbmp.h
+++ b/vcl/unx/inc/salbmp.h
@@ -51,7 +51,7 @@ class VCL_DLLPUBLIC X11SalBitmap : public SalBitmap
private:
static BitmapBuffer* ImplCreateDIB( const Size& rSize,
- USHORT nBitCount,
+ sal_uInt16 nBitCount,
const BitmapPalette& rPal );
static BitmapBuffer* ImplCreateDIB( Drawable aDrawable,
int nScreen,
@@ -62,7 +62,7 @@ private:
public:
static ImplSalBitmapCache* mpCache;
- static ULONG mnCacheInstCount;
+ static sal_uIntPtr mnCacheInstCount;
static void ImplCreateCache();
static void ImplDestroyCache();
@@ -103,18 +103,18 @@ public:
// overload pure virtual methods
virtual bool Create( const Size& rSize,
- USHORT nBitCount,
+ sal_uInt16 nBitCount,
const BitmapPalette& rPal );
virtual bool Create( const SalBitmap& rSalBmp );
virtual bool Create( const SalBitmap& rSalBmp,
SalGraphics* pGraphics );
virtual bool Create( const SalBitmap& rSalBmp,
- USHORT nNewBitCount );
+ sal_uInt16 nNewBitCount );
virtual void Destroy();
virtual Size GetSize() const;
- virtual USHORT GetBitCount() const;
+ virtual sal_uInt16 GetBitCount() const;
virtual BitmapBuffer* AcquireBuffer( bool bReadOnly );
virtual void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly );
@@ -161,7 +161,7 @@ public:
long ImplGetWidth() const { return maTwoRect.mnDestWidth; }
long ImplGetHeight() const { return maTwoRect.mnDestHeight; }
long ImplGetDepth() const { return mnDepth; }
- ULONG ImplGetMemSize() const { return( ( maTwoRect.mnDestWidth * maTwoRect.mnDestHeight * mnDepth ) >> 3 ); }
+ sal_uIntPtr ImplGetMemSize() const { return( ( maTwoRect.mnDestWidth * maTwoRect.mnDestHeight * mnDepth ) >> 3 ); }
int ImplGetScreen() const { return mnScreen; }
bool ImplMatches( int nScreen, long nDepth, const SalTwoRect& rTwoRect ) const;
@@ -178,14 +178,14 @@ class ImplSalBitmapCache
private:
List maBmpList;
- ULONG mnTotalSize;
+ sal_uIntPtr mnTotalSize;
public:
ImplSalBitmapCache();
~ImplSalBitmapCache();
- void ImplAdd( X11SalBitmap* pBmp, ULONG nMemSize = 0UL, ULONG nFlags = 0UL );
+ void ImplAdd( X11SalBitmap* pBmp, sal_uIntPtr nMemSize = 0UL, sal_uIntPtr nFlags = 0UL );
void ImplRemove( X11SalBitmap* pBmp );
void ImplClear();
};
diff --git a/vcl/unx/inc/saldata.hxx b/vcl/unx/inc/saldata.hxx
index 939437060750..42240237a5ec 100644
--- a/vcl/unx/inc/saldata.hxx
+++ b/vcl/unx/inc/saldata.hxx
@@ -58,7 +58,7 @@ typedef unsigned int pthread_t;
class VCL_DLLPUBLIC X11SalData : public SalData
{
protected:
- BOOL bNoExceptions_;
+ sal_Bool bNoExceptions_;
SalXLib *pXLib_;
SalDisplay *m_pSalDisplay;
pthread_t hMainThread_;
@@ -85,7 +85,7 @@ public:
inline SalXLib* GetLib() const { return pXLib_; }
inline pthread_t GetMainThread() const { return hMainThread_; }
- void StartTimer( ULONG nMS );
+ void StartTimer( sal_uLong nMS );
inline void StopTimer();
void Timeout() const;
@@ -114,7 +114,7 @@ inline void X11SalData::XError( Display *pDisplay, XErrorEvent *pEvent ) const
class YieldMutexReleaser
{
- ULONG m_nYieldCount;
+ sal_uLong m_nYieldCount;
public:
inline YieldMutexReleaser();
inline ~YieldMutexReleaser();
diff --git a/vcl/unx/inc/saldisp.hxx b/vcl/unx/inc/saldisp.hxx
index 89efad3cde4d..42d1f820acff 100644
--- a/vcl/unx/inc/saldisp.hxx
+++ b/vcl/unx/inc/saldisp.hxx
@@ -152,8 +152,8 @@ public:
Pixel GetTCPixel( SalColor nColor ) const;
SalColor GetTCColor( Pixel nPixel ) const;
- BOOL Convert( int &n0, int &n1, int &n2, int &n3 ); // 32bit
- BOOL Convert( int &n0, int &n1, int &n2 ); // 24bit
+ sal_Bool Convert( int &n0, int &n1, int &n2, int &n3 ); // 32bit
+ sal_Bool Convert( int &n0, int &n1, int &n2 ); // 24bit
};
// -=-= SalColormap =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -163,7 +163,7 @@ class SalColormap
Colormap m_hColormap;
std::vector<SalColor> m_aPalette; // Pseudocolor
SalVisual m_aVisual;
- std::vector<USHORT> m_aLookupTable; // Pseudocolor: 12bit reduction
+ std::vector<sal_uInt16> m_aLookupTable; // Pseudocolor: 12bit reduction
Pixel m_nWhitePixel;
Pixel m_nBlackPixel;
Pixel m_nUsed; // Pseudocolor
@@ -176,7 +176,7 @@ public:
Colormap hColormap,
int nScreen );
SalColormap( const BitmapPalette &rpPalette );
- SalColormap( USHORT nDepth );
+ SalColormap( sal_uInt16 nDepth );
SalColormap();
~SalColormap();
@@ -191,11 +191,11 @@ public:
inline int GetClass() const { return m_aVisual.GetClass(); }
inline int GetScreenNumber() const { return m_nScreen; }
- BOOL GetXPixels( XColor &rColor,
+ sal_Bool GetXPixels( XColor &rColor,
int r,
int g,
int b ) const;
- inline BOOL GetXPixel( XColor &rColor,
+ inline sal_Bool GetXPixel( XColor &rColor,
int r,
int g,
int b ) const;
@@ -212,7 +212,7 @@ class VCL_DLLPUBLIC SalXLib
{
protected:
timeval m_aTimeout;
- ULONG m_nTimeoutMS;
+ sal_uLong m_nTimeoutMS;
int m_pTimeoutFDS[2];
bool m_bHaveSystemChildFrames;
@@ -254,7 +254,7 @@ public:
void PushXErrorLevel( bool bIgnore );
void PopXErrorLevel();
- virtual void StartTimer( ULONG nMS );
+ virtual void StartTimer( sal_uLong nMS );
virtual void StopTimer();
bool CheckTimeout( bool bExecuteTimers = true );
@@ -329,9 +329,9 @@ public:
{
SalFrame* m_pFrame;
void* m_pData;
- USHORT m_nEvent;
+ sal_uInt16 m_nEvent;
- SalUserEvent( SalFrame* pFrame, void* pData, USHORT nEvent = SALEVENT_USEREVENT )
+ SalUserEvent( SalFrame* pFrame, void* pData, sal_uInt16 nEvent = SALEVENT_USEREVENT )
: m_pFrame( pFrame ),
m_pData( pData ),
m_nEvent( nEvent )
@@ -351,14 +351,14 @@ protected:
ScreenData m_aInvalidScreenData;
Pair aResolution_; // [dpi]
bool mbExactResolution;
- ULONG nMaxRequestSize_; // [byte]
+ sal_uLong nMaxRequestSize_; // [byte]
srv_vendor_t meServerVendor;
SalWM eWindowManager_;
- ULONG nProperties_; // PROPERTY_SUPPORT, BUG, FEATURE
- BOOL bLocal_; // Server==Client? Init
+ sal_uLong nProperties_; // PROPERTY_SUPPORT, BUG, FEATURE
+ sal_Bool bLocal_; // Server==Client? Init
// in SalDisplay::IsLocal()
- BOOL mbLocalIsValid; // bLocal_ is valid ?
+ sal_Bool mbLocalIsValid; // bLocal_ is valid ?
// until x bytes
oslMutex hEventGuard_;
@@ -368,7 +368,7 @@ protected:
SalFrame* m_pCapture;
// Keyboard
- BOOL bNumLockFromXS_; // Num Lock handled by X Server
+ sal_Bool bNumLockFromXS_; // Num Lock handled by X Server
int nNumLockIndex_; // modifier index in modmap
int nNumLockMask_; // keyevent state mask for
KeySym nShiftKeySym_; // first shift modifier
@@ -398,7 +398,7 @@ protected:
int addXineramaScreenUnique( long i_nX, long i_nY, long i_nWidth, long i_nHeight );
public:
static SalDisplay *GetSalDisplay( Display* display );
- static BOOL BestVisual( Display *pDisp,
+ static sal_Bool BestVisual( Display *pDisp,
int nScreen,
XVisualInfo &rVI );
@@ -416,8 +416,8 @@ public:
void Init();
- void SendInternalEvent( SalFrame* pFrame, void* pData, USHORT nEvent = SALEVENT_USEREVENT );
- void CancelInternalEvent( SalFrame* pFrame, void* pData, USHORT nEvent );
+ void SendInternalEvent( SalFrame* pFrame, void* pData, sal_uInt16 nEvent = SALEVENT_USEREVENT );
+ void CancelInternalEvent( SalFrame* pFrame, void* pData, sal_uInt16 nEvent );
bool DispatchInternalEvent();
void PrintInfo() const;
@@ -428,8 +428,8 @@ public:
void ModifierMapping();
String GetKeyNameFromKeySym( KeySym keysym ) const;
- XubString GetKeyName( USHORT nKeyCode ) const;
- USHORT GetKeyCode( KeySym keysym, char*pcPrintable ) const;
+ XubString GetKeyName( sal_uInt16 nKeyCode ) const;
+ sal_uInt16 GetKeyCode( KeySym keysym, char*pcPrintable ) const;
KeySym GetKeySym( XKeyEvent *pEvent,
unsigned char *pPrintable,
int *pLen,
@@ -440,7 +440,7 @@ public:
XLIB_Cursor GetPointer( int ePointerStyle );
virtual int CaptureMouse( SalFrame *pCapture );
- BOOL IsLocal();
+ sal_Bool IsLocal();
void Remove( XEvent *pEvent );
@@ -461,27 +461,27 @@ public:
const Size& GetScreenSize( int nScreen ) const { return getDataForScreen( nScreen ).m_aSize; }
srv_vendor_t GetServerVendor() const { return meServerVendor; }
void SetServerVendor() { meServerVendor = sal_GetServerVendor(pDisp_); }
- BOOL IsDisplay() const { return !!pXLib_; }
+ sal_Bool IsDisplay() const { return !!pXLib_; }
GC GetMonoGC( int nScreen ) const { return getDataForScreen(nScreen).m_aMonoGC; }
GC GetCopyGC( int nScreen ) const { return getDataForScreen(nScreen).m_aCopyGC; }
GC GetAndInvertedGC( int nScreen ) const { return getDataForScreen(nScreen).m_aAndInvertedGC; }
GC GetAndGC( int nScreen ) const { return getDataForScreen(nScreen).m_aAndGC; }
GC GetOrGC( int nScreen ) const { return getDataForScreen(nScreen).m_aOrGC; }
GC GetStippleGC( int nScreen ) const { return getDataForScreen(nScreen).m_aStippleGC; }
- GC GetGC( USHORT nDepth, int nScreen ) const;
+ GC GetGC( sal_uInt16 nDepth, int nScreen ) const;
Pixmap GetInvert50( int nScreen ) const { return getDataForScreen(nScreen).m_hInvert50; }
const SalColormap& GetColormap( int nScreen ) const { return getDataForScreen(nScreen).m_aColormap; }
const SalVisual& GetVisual( int nScreen ) const { return getDataForScreen(nScreen).m_aVisual; }
RenderEntryMap& GetRenderEntries( int nScreen ) const { return getDataForScreen(nScreen).m_aRenderData; }
const Pair &GetResolution() const { return aResolution_; }
bool GetExactResolution() const { return mbExactResolution; }
- ULONG GetProperties() const { return nProperties_; }
- ULONG GetMaxRequestSize() const { return nMaxRequestSize_; }
+ sal_uLong GetProperties() const { return nProperties_; }
+ sal_uLong GetMaxRequestSize() const { return nMaxRequestSize_; }
XLIB_Time GetLastUserEventTime( bool bAlwaysReget = false ) const;
bool XIfEventWithTimeout( XEvent*, XPointer, X_if_predicate, long i_nTimeout = 1000 ) const;
- BOOL MouseCaptured( const SalFrame *pFrameData ) const
+ sal_Bool MouseCaptured( const SalFrame *pFrameData ) const
{ return m_pCapture == pFrameData; }
SalFrame* GetCaptureFrame() const
{ return m_pCapture; }
@@ -493,7 +493,7 @@ public:
{ mpInputMethod = pInputMethod; }
void SetKbdExtension(SalI18N_KeyboardExtension *pKbdExtension)
{ mpKbdExtension = pKbdExtension; }
- const char* GetKeyboardName( BOOL bRefresh = FALSE );
+ const char* GetKeyboardName( sal_Bool bRefresh = sal_False );
::vcl_sal::WMAdaptor* getWMAdaptor() const { return m_pWMAdaptor; }
DtIntegrator* getDtIntegrator() const { return m_pDtIntegrator; }
bool IsXinerama() const { return m_bXinerama; }
@@ -507,14 +507,14 @@ public:
const std::list< SalFrame* >& getFrames() const
{ return m_aFrames; }
- BOOL IsNumLockFromXS() const { return bNumLockFromXS_; }
+ sal_Bool IsNumLockFromXS() const { return bNumLockFromXS_; }
std::list< SalObject* >& getSalObjects() { return m_aSalObjects; }
};
// -=-= inlines =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-inline GC SalDisplay::GetGC( USHORT nDepth, int nScreen ) const
+inline GC SalDisplay::GetGC( sal_uInt16 nDepth, int nScreen ) const
{ return 1 == nDepth
? GetMonoGC( nScreen )
: getDataForScreen(nScreen).m_aVisual.GetDepth() == nDepth
@@ -533,7 +533,7 @@ public:
virtual long Dispatch( XEvent *pEvent );
virtual void Yield();
- BOOL IsEvent();
+ sal_Bool IsEvent();
};
/*----------------------------------------------------------
diff --git a/vcl/unx/inc/salframe.h b/vcl/unx/inc/salframe.h
index 9786bac76f35..dde04b79f3ac 100644
--- a/vcl/unx/inc/salframe.h
+++ b/vcl/unx/inc/salframe.h
@@ -87,24 +87,24 @@ class VCL_DLLPUBLIC X11SalFrame : public SalFrame
X11SalGraphics *pFreeGraphics_; // first free frame graphics
XLIB_Time nReleaseTime_; // timestamp of last key release
- USHORT nKeyCode_; // last key code
- USHORT nKeyState_; // last key state
+ sal_uInt16 nKeyCode_; // last key code
+ sal_uInt16 nKeyState_; // last key state
int nCompose_; // compose state
bool mbKeyMenu;
bool mbSendExtKeyModChange;
- USHORT mnExtKeyMod;
+ sal_uInt16 mnExtKeyMod;
int nShowState_; // show state
int nWidth_; // client width
int nHeight_; // client height
Rectangle maRestorePosSize;
- ULONG nStyle_;
+ sal_uIntPtr nStyle_;
SalExtStyle mnExtStyle;
- BOOL bAlwaysOnTop_;
- BOOL bViewable_;
- BOOL bMapped_;
- BOOL mbInShow;
- BOOL bDefaultPosition_; // client is centered initially
+ sal_Bool bAlwaysOnTop_;
+ sal_Bool bViewable_;
+ sal_Bool bMapped_;
+ sal_Bool mbInShow;
+ sal_Bool bDefaultPosition_; // client is centered initially
bool m_bXEmbed;
int nVisibility_;
int m_nWorkArea;
@@ -172,11 +172,11 @@ class VCL_DLLPUBLIC X11SalFrame : public SalFrame
void setXEmbedInfo();
void askForXEmbedFocus( sal_Int32 i_nTimeCode );
public:
- X11SalFrame( SalFrame* pParent, ULONG nSalFrameStyle, SystemParentData* pSystemParent = NULL );
+ X11SalFrame( SalFrame* pParent, sal_uIntPtr nSalFrameStyle, SystemParentData* pSystemParent = NULL );
virtual ~X11SalFrame();
long Dispatch( XEvent *pEvent );
- void Init( ULONG nSalFrameStyle, int nScreen = -1,
+ void Init( sal_uIntPtr nSalFrameStyle, int nScreen = -1,
SystemParentData* pParentData = NULL, bool bUseGeometry = false );
SalDisplay* GetDisplay() const { return pDisplay_; }
@@ -189,10 +189,10 @@ public:
XLIB_Window GetStackingWindow() const { return mhStackingWindow; }
long ShutDown() const { return CallCallback( SALEVENT_SHUTDOWN, 0 ); }
long Close() const { return CallCallback( SALEVENT_CLOSE, 0 ); }
- ULONG GetStyle() const { return nStyle_; }
+ sal_uIntPtr GetStyle() const { return nStyle_; }
inline XLIB_Cursor GetCursor() const { return hCursor_; }
- inline BOOL IsCaptured() const { return nCaptured_ == 1; }
+ inline sal_Bool IsCaptured() const { return nCaptured_ == 1; }
#if !defined(__synchronous_extinput__)
void HandleExtTextEvent (XClientMessageEvent *pEvent);
void PostExtTextEvent (sal_uInt16 nExtTextEventType,
@@ -219,39 +219,39 @@ public:
// call with false to setup graphics with window (GetWindow())
virtual void updateGraphics( bool bClear );
- 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* pMenu );
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 = sal_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 nMonitor );
- 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 nMonitor );
+ 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 );
@@ -268,7 +268,7 @@ public:
// set clip region to none (-> rectangular windows, normal state)
virtual void ResetClipRegion();
// start setting the clipregion consisting of nRects rectangles
- virtual void BeginSetClipRegion( ULONG nRects );
+ virtual void BeginSetClipRegion( sal_uIntPtr nRects );
// add a rectangle to the clip region
virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
// done setting up the clipregion
diff --git a/vcl/unx/inc/salgdi.h b/vcl/unx/inc/salgdi.h
index 8af62a5c6607..2cf3190590f3 100644
--- a/vcl/unx/inc/salgdi.h
+++ b/vcl/unx/inc/salgdi.h
@@ -90,7 +90,7 @@ protected:
CairoFontsCache m_aCairoFontsCache;
XLIB_Region pPaintRegion_;
- XLIB_Region pClipRegion_;
+ XLIB_Region mpClipRegion;
GC pPenGC_; // Pen attributes
SalColor nPenColor_;
@@ -101,9 +101,9 @@ protected:
SalColor nTextColor_;
Pixel nTextPixel_;
- BOOL bFontVertical_;
+ sal_Bool bFontVertical_;
- BOOL bDisableGraphite_;
+ sal_Bool bDisableGraphite_;
GC pBrushGC_; // Brush attributes
SalColor nBrushColor_;
@@ -118,21 +118,22 @@ protected:
GC pStippleGC_;
GC pTrackingGC_;
- BOOL bWindow_ : 1; // is Window
- BOOL bPrinter_ : 1; // is Printer
- BOOL bVirDev_ : 1; // is VirDev
- BOOL bPenGC_ : 1; // is Pen GC valid
- BOOL bFontGC_ : 1; // is Font GC valid
- BOOL bBrushGC_ : 1; // is Brush GC valid
- BOOL bMonoGC_ : 1; // is Mono GC valid
- BOOL bCopyGC_ : 1; // is Copy GC valid
- BOOL bInvertGC_ : 1; // is Invert GC valid
- BOOL bInvert50GC_ : 1; // is Invert50 GC valid
- BOOL bStippleGC_ : 1; // is Stipple GC valid
- BOOL bTrackingGC_ : 1; // is Tracking GC valid
+ sal_Bool bWindow_ : 1; // is Window
+ sal_Bool bPrinter_ : 1; // is Printer
+ sal_Bool bVirDev_ : 1; // is VirDev
+ sal_Bool bPenGC_ : 1; // is Pen GC valid
+ sal_Bool bFontGC_ : 1; // is Font GC valid
+ sal_Bool bBrushGC_ : 1; // is Brush GC valid
+ sal_Bool bMonoGC_ : 1; // is Mono GC valid
+ sal_Bool bCopyGC_ : 1; // is Copy GC valid
+ sal_Bool bInvertGC_ : 1; // is Invert GC valid
+ sal_Bool bInvert50GC_ : 1; // is Invert50 GC valid
+ sal_Bool bStippleGC_ : 1; // is Stipple GC valid
+ sal_Bool bTrackingGC_ : 1; // is Tracking GC valid
bool bXORMode_ : 1; // is ROP XOR Mode set
- BOOL bDitherBrush_ : 1; // is solid or tile
+ sal_Bool bDitherBrush_ : 1; // is solid or tile
+ using SalGraphics::SetClipRegion;
void SetClipRegion( GC pGC,
XLIB_Region pXReg = NULL ) const;
@@ -143,12 +144,12 @@ protected:
unsigned long nMask = GCGraphicsExposures );
GC SelectPen();
GC SelectBrush();
- void DrawLines( ULONG nPoints,
+ void DrawLines( sal_uIntPtr nPoints,
const SalPolyLine &rPoints,
GC pGC,
bool bClose
);
- BOOL GetDitherPixmap ( SalColor nSalColor );
+ sal_Bool GetDitherPixmap ( SalColor nSalColor );
inline GC GetMonoGC( Pixmap hPixmap );
inline GC GetCopyGC();
@@ -223,15 +224,12 @@ public:
// overload all pure virtual methods
virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY );
- virtual USHORT GetBitCount();
+ virtual sal_uInt16 GetBitCount();
virtual long GetGraphicsWidth() const;
virtual long GetGraphicsHeight() const;
virtual void ResetClipRegion();
- virtual void BeginSetClipRegion( ULONG nCount );
- virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight );
- virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& );
- virtual void EndSetClipRegion();
+ virtual bool setClipRegion( const Region& );
virtual void SetLineColor();
virtual void SetLineColor( SalColor nSalColor );
@@ -245,14 +243,14 @@ public:
virtual void SetROPFillColor( SalROPColor nROPColor );
virtual void SetTextColor( SalColor nSalColor );
- virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel );
+ virtual sal_uInt16 SetFont( ImplFontSelectData*, int nFallbackLevel );
virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel );
- virtual ULONG GetKernPairs( ULONG nMaxPairs, ImplKernPairData* );
+ virtual sal_uLong GetKernPairs( sal_uLong nMaxPairs, ImplKernPairData* );
virtual const ImplFontCharMap* GetImplFontCharMap() const;
virtual void GetDevFontList( ImplDevFontList* );
virtual void GetDevFontSubstList( OutputDevice* );
virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName );
- virtual BOOL CreateFontSubset( const rtl::OUString& rToFile,
+ virtual sal_Bool CreateFontSubset( const rtl::OUString& rToFile,
const ImplFontData*,
sal_Int32* pGlyphIDs,
sal_uInt8* pEncoding,
@@ -271,8 +269,8 @@ public:
bool bVertical,
Int32Vector& rWidths,
Ucs2UIntMap& rUnicodeEnc );
- 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;
@@ -280,9 +278,9 @@ public:
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 );
- void drawPolyLine( ULONG nPoints, const SalPoint* pPtAry, bool bClose );
- virtual void drawPolyLine( ULONG nPoints, const SalPoint* pPtAry );
- virtual void drawPolygon( ULONG nPoints, const SalPoint* pPtAry );
+ void drawPolyLine( sal_uIntPtr nPoints, const SalPoint* pPtAry, bool bClose );
+ 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 );
@@ -291,16 +289,16 @@ public:
virtual bool drawFilledTrapezoids( const ::basegfx::B2DTrapezoid*, int nTrapCount, double fTransparency );
#if 1 // TODO: remove these obselete methods
- virtual sal_Bool drawPolyLineBezier( ULONG nPoints,
+ virtual sal_Bool drawPolyLineBezier( sal_uIntPtr nPoints,
const SalPoint* pPtAry,
- const BYTE* pFlgAry );
- virtual sal_Bool drawPolygonBezier( ULONG nPoints,
+ const sal_uInt8* pFlgAry );
+ virtual sal_Bool drawPolygonBezier( sal_uIntPtr nPoints,
const SalPoint* pPtAry,
- const BYTE* pFlgAry );
+ const sal_uInt8* pFlgAry );
virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly,
const sal_uInt32* pPoints,
const SalPoint* const* pPtAry,
- const BYTE* const* pFlgAry );
+ const sal_uInt8* const* pFlgAry );
#endif
virtual void copyArea( long nDestX,
@@ -309,7 +307,7 @@ public:
long nSrcY,
long nSrcWidth,
long nSrcHeight,
- USHORT nFlags );
+ sal_uInt16 nFlags );
virtual void copyBits( const SalTwoRect* pPosAry,
SalGraphics* pSrcGraphics );
virtual void drawBitmap( const SalTwoRect* pPosAry,
@@ -326,9 +324,9 @@ public:
virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight );
virtual SalColor getPixel( long nX, long nY );
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 );
virtual bool drawAlphaBitmap( const SalTwoRect&,
const SalBitmap& rSourceBitmap,
diff --git a/vcl/unx/inc/salinst.h b/vcl/unx/inc/salinst.h
index 133f0bf6037f..2f53a979a485 100644
--- a/vcl/unx/inc/salinst.h
+++ b/vcl/unx/inc/salinst.h
@@ -42,7 +42,7 @@
class VCL_DLLPUBLIC SalYieldMutex : public vos::OMutex
{
protected:
- ULONG mnCount;
+ sal_uIntPtr mnCount;
vos::OThread::TThreadIdentifier mnThreadId;
public:
@@ -52,7 +52,7 @@ public:
virtual void release();
virtual sal_Bool tryToAcquire();
- ULONG GetAcquireCount() const { return mnCount; }
+ sal_uIntPtr GetAcquireCount() const { return mnCount; }
vos::OThread::TThreadIdentifier GetThreadId() const { return mnThreadId; }
};
@@ -70,16 +70,16 @@ public:
{}
virtual ~X11SalInstance();
- 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 = sal_True );
virtual void DestroyObject( SalObject* pObject );
virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics,
long nDX, long nDY,
- USHORT nBitCount, const SystemGraphicsData *pData = NULL );
+ sal_uInt16 nBitCount, const SystemGraphicsData *pData = NULL );
virtual void DestroyVirtualDevice( SalVirtualDevice* pDevice );
virtual SalInfoPrinter* CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo,
@@ -100,12 +100,12 @@ public:
virtual SalSession* CreateSalSession();
virtual vos::IMutex* GetYieldMutex();
- virtual ULONG ReleaseYieldMutex();
- virtual void AcquireYieldMutex( ULONG nCount );
+ virtual sal_uIntPtr ReleaseYieldMutex();
+ virtual void AcquireYieldMutex( sal_uIntPtr nCount );
virtual bool CheckYieldMutex();
virtual void Yield( bool bWait, bool bHandleAllCurrentEvents );
- virtual bool AnyInput( USHORT nType );
+ virtual bool AnyInput( sal_uInt16 nType );
virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes );
void FillFontPathList( std::list< rtl::OString >& o_rFontPaths );
diff --git a/vcl/unx/inc/salobj.h b/vcl/unx/inc/salobj.h
index d7d9334f281b..c843708f0c2e 100644
--- a/vcl/unx/inc/salobj.h
+++ b/vcl/unx/inc/salobj.h
@@ -41,16 +41,16 @@ public:
SalClipRegion();
~SalClipRegion();
- void BeginSetClipRegion( ULONG nRects );
+ void BeginSetClipRegion( sal_uIntPtr nRects );
void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
XRectangle *EndSetClipRegion() {
return ClipRectangleList; }
void ResetClipRegion() {
numClipRectangles = 0; }
- USHORT GetClipRegionType() {
+ sal_uInt16 GetClipRegionType() {
return nClipRegionType; }
- void SetClipRegionType( USHORT nType ) {
+ void SetClipRegionType( sal_uInt16 nType ) {
nClipRegionType = nType; }
int GetRectangleCount() {
return numClipRectangles; }
@@ -60,7 +60,7 @@ private:
XRectangle* ClipRectangleList;
int numClipRectangles;
int maxClipRectangles;
- USHORT nClipRegionType;
+ sal_uInt16 nClipRegionType;
};
@@ -73,24 +73,24 @@ public:
XLIB_Window maSecondary;
Colormap maColormap;
SalClipRegion maClipRegion;
- BOOL mbVisible;
+ sal_Bool mbVisible;
static VCL_DLLPUBLIC long Dispatch( XEvent* pEvent );
- static VCL_DLLPUBLIC X11SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE );
+ static VCL_DLLPUBLIC X11SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, sal_Bool bShow = sal_True );
X11SalObject();
virtual ~X11SalObject();
// overload all pure virtual methods
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();
diff --git a/vcl/unx/inc/salprn.h b/vcl/unx/inc/salprn.h
index 6e6ca0a2f1cc..7b42ad74c923 100644
--- a/vcl/unx/inc/salprn.h
+++ b/vcl/unx/inc/salprn.h
@@ -48,16 +48,16 @@ public:
// overload all pure virtual methods
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 );
};
@@ -76,7 +76,7 @@ public:
psp::PrinterJob m_aPrintJob;
psp::JobData m_aJobData;
psp::PrinterGfx m_aPrinterGfx;
- ULONG m_nCopies;
+ sal_uIntPtr m_nCopies;
bool m_bCollate;
SalInfoPrinter* m_pInfoPrinter;
@@ -85,23 +85,23 @@ public:
// overload all pure virtual methods
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 StartJob( const String*,
+ virtual sal_Bool StartJob( const String*,
const String&,
const String&,
ImplJobSetup*,
vcl::PrinterController& i_rController );
- 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();
};
class Timer;
diff --git a/vcl/unx/inc/saltimer.h b/vcl/unx/inc/saltimer.h
index 132107d705f8..ba52b96c073a 100644
--- a/vcl/unx/inc/saltimer.h
+++ b/vcl/unx/inc/saltimer.h
@@ -37,7 +37,7 @@ public:
virtual ~X11SalTimer();
// overload all pure virtual methods
- void Start( ULONG nMS );
+ void Start( sal_uIntPtr nMS );
void Stop();
};
diff --git a/vcl/unx/inc/salunx.h b/vcl/unx/inc/salunx.h
index ef53273b60b4..8be91cbd3bce 100644
--- a/vcl/unx/inc/salunx.h
+++ b/vcl/unx/inc/salunx.h
@@ -68,7 +68,7 @@ inline int operator == ( const timeval &t1, const timeval &t2 )
{
if( t1.tv_sec == t2.tv_sec )
return t1.tv_usec == t2.tv_usec;
- return FALSE;
+ return sal_False;
}
inline timeval &operator -= ( timeval &t1, const timeval &t2 )
@@ -95,7 +95,7 @@ inline timeval &operator += ( timeval &t1, const timeval &t2 )
return t1;
}
-inline timeval &operator += ( timeval &t1, ULONG t2 )
+inline timeval &operator += ( timeval &t1, sal_uIntPtr t2 )
{
t1.tv_sec += t2 / 1000;
t1.tv_usec += t2 ? (t2 % 1000) * 1000 : 500;
@@ -113,7 +113,7 @@ inline timeval operator + ( const timeval &t1, const timeval &t2 )
return t0 += t2;
}
-inline timeval operator + ( const timeval &t1, ULONG t2 )
+inline timeval operator + ( const timeval &t1, sal_uIntPtr t2 )
{
timeval t0 = t1;
return t0 += t2;
diff --git a/vcl/unx/inc/salvd.h b/vcl/unx/inc/salvd.h
index 3d8c681c4e22..c6bf12165ae9 100644
--- a/vcl/unx/inc/salvd.h
+++ b/vcl/unx/inc/salvd.h
@@ -48,17 +48,17 @@ class X11SalVirtualDevice : public SalVirtualDevice
int nDX_;
int nDY_;
- USHORT nDepth_;
- BOOL bGraphics_; // is Graphics used
- BOOL bExternPixmap_;
+ sal_uInt16 nDepth_;
+ sal_Bool bGraphics_; // is Graphics used
+ sal_Bool bExternPixmap_;
public:
X11SalVirtualDevice();
virtual ~X11SalVirtualDevice();
- BOOL Init( SalDisplay *pDisplay,
+ sal_Bool Init( SalDisplay *pDisplay,
long nDX, long nDY,
- USHORT nBitCount,
+ sal_uInt16 nBitCount,
int nScreen,
Pixmap hDrawable = None,
void* pRenderFormat = NULL );
@@ -66,9 +66,9 @@ public:
inline Display *GetXDisplay() const;
inline SalDisplay *GetDisplay() const;
- inline BOOL IsDisplay() const;
+ inline sal_Bool IsDisplay() const;
inline Pixmap GetDrawable() const { return hDrawable_; }
- inline USHORT GetDepth() const { return nDepth_; }
+ inline sal_uInt16 GetDepth() const { return nDepth_; }
int GetWidth() const { return nDX_; }
int GetHeight() const { return nDY_; }
int GetScreenNumber() const { return m_nScreen; }
@@ -77,7 +77,7 @@ public:
virtual void ReleaseGraphics( SalGraphics* pGraphics );
// Set new size, without saving the old contents
- virtual BOOL SetSize( long nNewDX, long nNewDY );
+ virtual sal_Bool SetSize( long nNewDX, long nNewDY );
virtual void GetSize( long& rWidth, long& rHeight );
};
@@ -92,7 +92,7 @@ inline Display *X11SalVirtualDevice::GetXDisplay() const
inline SalDisplay *X11SalVirtualDevice::GetDisplay() const
{ return pDisplay_; }
-inline BOOL X11SalVirtualDevice::IsDisplay() const
+inline sal_Bool X11SalVirtualDevice::IsDisplay() const
{ return pDisplay_->IsDisplay(); }
#endif
diff --git a/vcl/unx/inc/soicon.hxx b/vcl/unx/inc/soicon.hxx
index 419f9b2cc54a..4efaea4e736f 100644
--- a/vcl/unx/inc/soicon.hxx
+++ b/vcl/unx/inc/soicon.hxx
@@ -31,7 +31,7 @@ class SalDisplay;
class SalBitmap;
class Bitmap;
-BOOL SelectAppIconPixmap( SalDisplay *pDisplay, int nScreen,
- USHORT nIcon, USHORT iconSize,
+sal_Bool SelectAppIconPixmap( SalDisplay *pDisplay, int nScreen,
+ sal_uInt16 nIcon, sal_uInt16 iconSize,
Pixmap& icon_pixmap, Pixmap& icon_mask );
#endif
diff --git a/vcl/unx/kde/kdedata.cxx b/vcl/unx/kde/kdedata.cxx
index 34b0ff652cde..ae3938b4fbb9 100644
--- a/vcl/unx/kde/kdedata.cxx
+++ b/vcl/unx/kde/kdedata.cxx
@@ -137,7 +137,7 @@ void KDEXLib::Init()
"http://artax.karlin.mff.cuni.cz/~kendy" );
m_nFakeCmdLineArgs = 1;
- USHORT nIdx;
+ sal_uInt16 nIdx;
vos::OExtCommandLine aCommandLine;
int nParams = aCommandLine.getCommandArgCount();
rtl::OString aDisplay;
diff --git a/vcl/unx/kde/salnativewidgets-kde.cxx b/vcl/unx/kde/salnativewidgets-kde.cxx
index 29d79f88ffb3..30cbb0cea365 100644
--- a/vcl/unx/kde/salnativewidgets-kde.cxx
+++ b/vcl/unx/kde/salnativewidgets-kde.cxx
@@ -242,7 +242,7 @@ class WidgetPainter
@param gc
The graphics context.
*/
- BOOL drawStyledWidget( QWidget *pWidget,
+ sal_Bool drawStyledWidget( QWidget *pWidget,
ControlState nState, const ImplControlValue& aValue,
Display *dpy, XLIB_Window drawable, int nScreen, int nDepth, GC gc,
ControlPart nPart = PART_ENTIRE_CONTROL );
@@ -255,7 +255,7 @@ class WidgetPainter
@return valid push button.
*/
- QPushButton *pushButton( const Rectangle& rControlRegion, BOOL bDefault );
+ QPushButton *pushButton( const Rectangle& rControlRegion, sal_Bool bDefault );
/** 'Get' method for radio button.
@@ -276,7 +276,7 @@ class WidgetPainter
@see pushButton(), m_pEditableComboBox
*/
- QComboBox *comboBox( const Rectangle& rControlRegion, BOOL bEditable );
+ QComboBox *comboBox( const Rectangle& rControlRegion, sal_Bool bEditable );
/** 'Get' method for line edit box.
@@ -313,13 +313,13 @@ class WidgetPainter
@see pushButton()
*/
QScrollBar *scrollBar( const Rectangle& rControlRegion,
- BOOL bHorizontal, const ImplControlValue& aValue );
+ sal_Bool bHorizontal, const ImplControlValue& aValue );
/** 'Get' method for tool bar.
@see pushButton()
*/
- QToolBar *toolBar( const Rectangle& rControlRegion, BOOL bHorizontal );
+ QToolBar *toolBar( const Rectangle& rControlRegion, sal_Bool bHorizontal );
/** 'Get' method for tool button.
@@ -430,13 +430,13 @@ WidgetPainter::~WidgetPainter( void )
delete m_pProgressBar, m_pProgressBar = NULL;
}
-BOOL WidgetPainter::drawStyledWidget( QWidget *pWidget,
+sal_Bool WidgetPainter::drawStyledWidget( QWidget *pWidget,
ControlState nState, const ImplControlValue& aValue,
Display *dpy, XLIB_Window drawable, int nScreen, int nDepth, GC gc,
ControlPart nPart )
{
if ( !pWidget )
- return FALSE;
+ return sal_False;
// Normalize the widget
QPoint qWidgetPos( pWidget->pos() );
@@ -591,7 +591,7 @@ BOOL WidgetPainter::drawStyledWidget( QWidget *pWidget,
pTab = m_pTabMiddle;
}
if ( !pTab )
- return FALSE;
+ return sal_False;
pTab->setRect( qRect );
@@ -779,7 +779,7 @@ BOOL WidgetPainter::drawStyledWidget( QWidget *pWidget,
pWidget->colorGroup(), nStyle );
}
else
- return FALSE;
+ return sal_False;
// Bitblt it to the screen
X11SalGraphics::CopyScreenArea( dpy,
@@ -792,11 +792,11 @@ BOOL WidgetPainter::drawStyledWidget( QWidget *pWidget,
// Restore widget's position
pWidget->move( qWidgetPos );
- return TRUE;
+ return sal_True;
}
QPushButton *WidgetPainter::pushButton( const Rectangle& rControlRegion,
- BOOL bDefault )
+ sal_Bool bDefault )
{
if ( !m_pPushButton )
m_pPushButton = new QPushButton( NULL, "push_button" );
@@ -891,7 +891,7 @@ QCheckBox *WidgetPainter::checkBox( const Rectangle& rControlRegion )
}
QComboBox *WidgetPainter::comboBox( const Rectangle& rControlRegion,
- BOOL bEditable )
+ sal_Bool bEditable )
{
QComboBox *pComboBox = NULL;
if ( bEditable )
@@ -1004,7 +1004,7 @@ QListView *WidgetPainter::listView( const Rectangle& rControlRegion )
}
QScrollBar *WidgetPainter::scrollBar( const Rectangle& rControlRegion,
- BOOL bHorizontal, const ImplControlValue& aValue )
+ sal_Bool bHorizontal, const ImplControlValue& aValue )
{
if ( !m_pScrollBar )
{
@@ -1031,7 +1031,7 @@ QScrollBar *WidgetPainter::scrollBar( const Rectangle& rControlRegion,
return m_pScrollBar;
}
-QToolBar *WidgetPainter::toolBar( const Rectangle& rControlRegion, BOOL bHorizontal )
+QToolBar *WidgetPainter::toolBar( const Rectangle& rControlRegion, sal_Bool bHorizontal )
{
if ( !m_pMainWindow )
m_pMainWindow = new QMainWindow( NULL, "main_window" );
@@ -1172,19 +1172,19 @@ class KDESalGraphics : public X11SalGraphics
public:
KDESalGraphics() {}
virtual ~KDESalGraphics() {}
- virtual BOOL IsNativeControlSupported( ControlType nType, ControlPart nPart );
- virtual BOOL hitTestNativeControl( ControlType nType, ControlPart nPart,
+ virtual sal_Bool IsNativeControlSupported( ControlType nType, ControlPart nPart );
+ virtual sal_Bool hitTestNativeControl( ControlType nType, ControlPart nPart,
const Rectangle& rControlRegion, const Point& aPos,
- BOOL& rIsInside );
- virtual BOOL drawNativeControl( ControlType nType, ControlPart nPart,
+ sal_Bool& rIsInside );
+ virtual sal_Bool drawNativeControl( ControlType nType, ControlPart nPart,
const Rectangle& rControlRegion, ControlState nState,
const ImplControlValue& aValue,
const OUString& aCaption );
- virtual BOOL drawNativeControlText( ControlType nType, ControlPart nPart,
+ virtual sal_Bool drawNativeControlText( ControlType nType, ControlPart nPart,
const Rectangle& rControlRegion, ControlState nState,
const ImplControlValue& aValue,
const OUString& aCaption );
- virtual BOOL getNativeControlRegion( ControlType nType, ControlPart nPart,
+ virtual sal_Bool getNativeControlRegion( ControlType nType, ControlPart nPart,
const Rectangle& rControlRegion, ControlState nState,
const ImplControlValue& aValue,
const OUString& aCaption,
@@ -1199,10 +1199,10 @@ class KDESalGraphics : public X11SalGraphics
@param nPart
Specification of the widget's part if it consists of more than one.
- @return TRUE if the platform supports native drawing of the widget nType
+ @return sal_True if the platform supports native drawing of the widget nType
defined by nPart.
*/
-BOOL KDESalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nPart )
+sal_Bool KDESalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nPart )
{
return
( (nType == CTRL_PUSHBUTTON) && (nPart == PART_ENTIRE_CONTROL) ) ||
@@ -1234,21 +1234,21 @@ BOOL KDESalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nP
/** Test whether the position is in the native widget.
- 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 KDESalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart,
+sal_Bool KDESalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart,
const Rectangle& rControlRegion, const Point& rPos,
- BOOL& rIsInside )
+ sal_Bool& rIsInside )
{
if ( nType == CTRL_SCROLLBAR )
{
// make position relative to rControlRegion
Point aPos = rPos - rControlRegion.TopLeft();
- rIsInside = FALSE;
+ rIsInside = sal_False;
- BOOL bHorizontal = ( nPart == PART_BUTTON_LEFT || nPart == PART_BUTTON_RIGHT );
+ sal_Bool bHorizontal = ( nPart == PART_BUTTON_LEFT || nPart == PART_BUTTON_RIGHT );
QScrollBar *pScrollBar = pWidgetPainter->scrollBar( rControlRegion,
bHorizontal, ImplControlValue() );
@@ -1258,10 +1258,10 @@ BOOL KDESalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart,
QStyle::CC_ScrollBar, pScrollBar, QStyle::SC_ScrollBarAddLine );
// There are 2 buttons on the right/bottom side of the scrollbar
- BOOL bTwoSubButtons = FALSE;
+ sal_Bool bTwoSubButtons = sal_False;
// It is a Platinum style scroll bar
- BOOL bPlatinumStyle = FALSE;
+ sal_Bool bPlatinumStyle = sal_False;
// Workaround for Platinum and 3 button style scroll bars.
// It makes the right/down button bigger.
@@ -1271,9 +1271,9 @@ BOOL KDESalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart,
QStyle::CC_ScrollBar, pScrollBar,
QStyle::SC_ScrollBarAddPage ).right() + 1 );
if ( qRectAddLine.width() > qRectSubLine.width() )
- bTwoSubButtons = TRUE;
+ bTwoSubButtons = sal_True;
if ( qRectSubLine.left() > kapp->style().querySubControlMetrics( QStyle::CC_ScrollBar, pScrollBar, QStyle::SC_ScrollBarSubPage ).left() )
- bPlatinumStyle = TRUE;
+ bPlatinumStyle = sal_True;
}
else
{
@@ -1281,16 +1281,16 @@ BOOL KDESalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart,
QStyle::CC_ScrollBar, pScrollBar,
QStyle::SC_ScrollBarAddPage ).bottom() + 1 );
if ( qRectAddLine.height() > qRectSubLine.height() )
- bTwoSubButtons = TRUE;
+ bTwoSubButtons = sal_True;
if ( qRectSubLine.top() > kapp->style().querySubControlMetrics( QStyle::CC_ScrollBar, pScrollBar, QStyle::SC_ScrollBarSubPage ).top() )
- bPlatinumStyle = TRUE;
+ bPlatinumStyle = sal_True;
}
switch ( nPart )
{
case PART_BUTTON_LEFT:
if ( !bPlatinumStyle && qRectSubLine.contains( aPos.getX(), aPos.getY() ) )
- rIsInside = TRUE;
+ rIsInside = sal_True;
else if ( bTwoSubButtons )
{
qRectAddLine.setWidth( qRectAddLine.width() / 2 );
@@ -1300,7 +1300,7 @@ BOOL KDESalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart,
case PART_BUTTON_UP:
if ( !bPlatinumStyle && qRectSubLine.contains( aPos.getX(), aPos.getY() ) )
- rIsInside = TRUE;
+ rIsInside = sal_True;
else if ( bTwoSubButtons )
{
qRectAddLine.setHeight( qRectAddLine.height() / 2 );
@@ -1324,13 +1324,13 @@ BOOL KDESalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart,
// cases PART_TRACK_HORZ_AREA and PART_TRACK_VERT_AREA
default:
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -1345,12 +1345,12 @@ BOOL KDESalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart,
@param aCaption
A caption or title string (like button text etc.)
*/
-BOOL KDESalGraphics::drawNativeControl( ControlType nType, ControlPart nPart,
+sal_Bool KDESalGraphics::drawNativeControl( ControlType nType, ControlPart nPart,
const Rectangle& rControlRegion, ControlState nState,
const ImplControlValue& aValue,
const OUString& )
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
Display *dpy = GetXDisplay();
XLIB_Window drawable = GetDrawable();
@@ -1380,7 +1380,7 @@ BOOL KDESalGraphics::drawNativeControl( ControlType nType, ControlPart nPart,
else if ( (nType == CTRL_COMBOBOX) && (nPart == PART_ENTIRE_CONTROL) )
{
bReturn = pWidgetPainter->drawStyledWidget(
- pWidgetPainter->comboBox( rControlRegion, TRUE ),
+ pWidgetPainter->comboBox( rControlRegion, sal_True ),
nState, aValue,
dpy, drawable, GetScreenNumber(), GetVisual().GetDepth(), gc );
}
@@ -1394,7 +1394,7 @@ BOOL KDESalGraphics::drawNativeControl( ControlType nType, ControlPart nPart,
else if ( (nType == CTRL_LISTBOX) && (nPart == PART_ENTIRE_CONTROL) )
{
bReturn = pWidgetPainter->drawStyledWidget(
- pWidgetPainter->comboBox( rControlRegion, FALSE ),
+ pWidgetPainter->comboBox( rControlRegion, sal_False ),
nState, aValue,
dpy, drawable, GetScreenNumber(), GetVisual().GetDepth(), gc );
}
@@ -1487,17 +1487,17 @@ BOOL KDESalGraphics::drawNativeControl( ControlType nType, ControlPart nPart,
@param aCaption
A caption or title string (like button text etc.)
*/
-BOOL KDESalGraphics::drawNativeControlText( ControlType, ControlPart,
+sal_Bool KDESalGraphics::drawNativeControlText( ControlType, ControlPart,
const Rectangle&, ControlState,
const ImplControlValue&,
const OUString& )
{
- return FALSE;
+ return sal_False;
}
/** Check if the bounding regions match.
- If the return value is TRUE, rNativeBoundingRegion
+ If the return value is sal_True, rNativeBoundingRegion
contains the 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
@@ -1512,13 +1512,13 @@ BOOL KDESalGraphics::drawNativeControlText( ControlType, ControlPart,
@param aCaption
A caption or title string (like button text etc.)
*/
-BOOL KDESalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPart,
+sal_Bool KDESalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPart,
const Rectangle& rControlRegion, ControlState nState,
const ImplControlValue&,
const OUString&,
Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion )
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
QRect qBoundingRect = WidgetPainter::region2QRect( rControlRegion );
QRect qRect;
@@ -1540,7 +1540,7 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar
QStyle::PM_ButtonDefaultIndicator, pWidget );
qBoundingRect.addCoords( -nIndicatorSize, -nIndicatorSize,
nIndicatorSize, nIndicatorSize );
- bReturn = TRUE;
+ bReturn = sal_True;
}
break;
}
@@ -1555,7 +1555,7 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar
qRect.setWidth( kapp->style().pixelMetric( QStyle::PM_ExclusiveIndicatorWidth, pWidget ) );
qRect.setHeight( kapp->style().pixelMetric( QStyle::PM_ExclusiveIndicatorHeight, pWidget ) );
- bReturn = TRUE;
+ bReturn = sal_True;
}
break;
@@ -1568,7 +1568,7 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar
qRect.setWidth( kapp->style().pixelMetric( QStyle::PM_IndicatorWidth, pWidget ) );
qRect.setHeight( kapp->style().pixelMetric( QStyle::PM_IndicatorHeight, pWidget ) );
- bReturn = TRUE;
+ bReturn = sal_True;
}
break;
@@ -1585,14 +1585,14 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar
QStyle::CC_ComboBox, pWidget,
QStyle::SC_ComboBoxEditField ).right() + 1 );
qRect.moveBy( qBoundingRect.left(), qBoundingRect.top() );
- bReturn = TRUE;
+ bReturn = sal_True;
break;
case PART_SUB_EDIT:
qRect = kapp->style().querySubControlMetrics(
QStyle::CC_ComboBox, pWidget, QStyle::SC_ComboBoxEditField );
qRect.moveBy( qBoundingRect.left(), qBoundingRect.top() );
- bReturn = TRUE;
+ bReturn = sal_True;
break;
}
break;
@@ -1605,14 +1605,14 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar
case PART_BUTTON_UP:
qRect = kapp->style().querySubControlMetrics(
QStyle::CC_SpinWidget, pWidget, QStyle::SC_SpinWidgetUp );
- bReturn = TRUE;
+ bReturn = sal_True;
qRect.moveBy( qBoundingRect.left(), qBoundingRect.top() );
break;
case PART_BUTTON_DOWN:
qRect = kapp->style().querySubControlMetrics(
QStyle::CC_SpinWidget, pWidget, QStyle::SC_SpinWidgetDown );
- bReturn = TRUE;
+ bReturn = sal_True;
qRect.moveBy( qBoundingRect.left(), qBoundingRect.top() );
break;
@@ -1620,7 +1620,7 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar
qRect = kapp->style().querySubControlMetrics(
QStyle::CC_SpinWidget, pWidget, QStyle::SC_SpinWidgetEditField );
qRect.moveBy( qBoundingRect.left(), qBoundingRect.top() );
- bReturn = TRUE;
+ bReturn = sal_True;
break;
}
break;
@@ -1662,7 +1662,7 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar
qRect.moveBy( qBoundingRect.left(), qBoundingRect.top() );
- bReturn = TRUE;
+ bReturn = sal_True;
break;
case PART_BUTTON_RIGHT:
@@ -1683,7 +1683,7 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar
qRect.moveBy( qBoundingRect.left(), qBoundingRect.top() );
- bReturn = TRUE;
+ bReturn = sal_True;
break;
}
break;
@@ -1710,12 +1710,12 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar
// KDESalFrame implementation
// -----------------------------------------------------------------------
-KDESalFrame::KDESalFrame( SalFrame* pParent, ULONG nStyle ) :
+KDESalFrame::KDESalFrame( SalFrame* pParent, sal_uLong nStyle ) :
X11SalFrame( pParent, nStyle )
{
}
-void KDESalFrame::Show( BOOL bVisible, BOOL bNoActivate )
+void KDESalFrame::Show( sal_Bool bVisible, sal_Bool bNoActivate )
{
if ( !GetParent() && ! (GetStyle() & SAL_FRAME_STYLE_INTRO) )
{
@@ -1928,9 +1928,9 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
{
Color aColor2 = aStyleSettings.GetLightColor();
aStyleSettings.
- SetCheckedColor( Color( (BYTE)(((USHORT)aBack.GetRed()+(USHORT)aColor2.GetRed())/2),
- (BYTE)(((USHORT)aBack.GetGreen()+(USHORT)aColor2.GetGreen())/2),
- (BYTE)(((USHORT)aBack.GetBlue()+(USHORT)aColor2.GetBlue())/2)
+ SetCheckedColor( Color( (sal_uInt8)(((sal_uInt16)aBack.GetRed()+(sal_uInt16)aColor2.GetRed())/2),
+ (sal_uInt8)(((sal_uInt16)aBack.GetGreen()+(sal_uInt16)aColor2.GetGreen())/2),
+ (sal_uInt8)(((sal_uInt16)aBack.GetBlue()+(sal_uInt16)aColor2.GetBlue())/2)
) );
}
@@ -1962,7 +1962,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
qMainWindow.createGUI( "/dev/null" ); // hack
// Menu
- aStyleSettings.SetSkipDisabledInMenus( TRUE );
+ aStyleSettings.SetSkipDisabledInMenus( sal_True );
KMenuBar *pMenuBar = qMainWindow.menuBar();
if ( pMenuBar )
{
@@ -2083,7 +2083,7 @@ KDESalFrame::GraphicsHolder::~GraphicsHolder()
// -----------------------------------------------------------------------
SalFrame *
-KDESalInstance::CreateFrame( SalFrame *pParent, ULONG nStyle )
+KDESalInstance::CreateFrame( SalFrame *pParent, sal_uLong nStyle )
{
return new KDESalFrame( pParent, nStyle );
}
diff --git a/vcl/unx/source/app/i18n_cb.cxx b/vcl/unx/source/app/i18n_cb.cxx
index d3a4f2b819ae..9756c728250d 100644
--- a/vcl/unx/source/app/i18n_cb.cxx
+++ b/vcl/unx/source/app/i18n_cb.cxx
@@ -284,12 +284,12 @@ Preedit_UpdateAttributes ( preedit_text_t* ptext, XIMFeedback* feedback,
// Convert the XIM feedback values into appropriate VCL
// SAL_EXTTEXTINPUT_ATTR values
// returns an allocate list of attributes, which must be freed by caller
-USHORT*
-Preedit_FeedbackToSAL ( XIMFeedback* pfeedback, int nlength, std::vector<USHORT>& rSalAttr )
+sal_uInt16*
+Preedit_FeedbackToSAL ( XIMFeedback* pfeedback, int nlength, std::vector<sal_uInt16>& rSalAttr )
{
- USHORT *psalattr;
- USHORT nval;
- USHORT noldval = 0;
+ sal_uInt16 *psalattr;
+ sal_uInt16 nval;
+ sal_uInt16 noldval = 0;
XIMFeedback nfeedback;
// only work with reasonable length
@@ -299,7 +299,7 @@ Preedit_FeedbackToSAL ( XIMFeedback* pfeedback, int nlength, std::vector<USHORT>
psalattr = &rSalAttr[0];
}
else
- return (USHORT*)NULL;
+ return (sal_uInt16*)NULL;
for (int npos = 0; npos < nlength; npos++)
{
diff --git a/vcl/unx/source/app/i18n_ic.cxx b/vcl/unx/source/app/i18n_ic.cxx
index 3064be9367e1..46471d553dda 100644
--- a/vcl/unx/source/app/i18n_ic.cxx
+++ b/vcl/unx/source/app/i18n_ic.cxx
@@ -187,7 +187,7 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
maClientData.aInputEv.mnCursorPos = 0;
maClientData.aInputEv.mnDeltaStart = 0;
maClientData.aInputEv.mnCursorFlags = 0;
- maClientData.aInputEv.mbOnlyCursor = FALSE;
+ maClientData.aInputEv.mbOnlyCursor = sal_False;
SalI18N_InputMethod *pInputMethod;
pInputMethod = GetX11SalData()->GetDisplay()->GetInputMethod();
@@ -763,7 +763,7 @@ SalI18N_InputContext::SetLanguage(LanguageType)
}
void
-SalI18N_InputContext::EndExtTextInput( USHORT /*nFlags*/ )
+SalI18N_InputContext::EndExtTextInput( sal_uInt16 /*nFlags*/ )
{
if ( mbUseable && (maContext != NULL) && maClientData.pFrame )
{
diff --git a/vcl/unx/source/app/i18n_status.cxx b/vcl/unx/source/app/i18n_status.cxx
index 3a6ae26a2b0e..844775779935 100644
--- a/vcl/unx/source/app/i18n_status.cxx
+++ b/vcl/unx/source/app/i18n_status.cxx
@@ -102,7 +102,7 @@ class XIMStatusWindow : public StatusWindow
// for delayed showing
bool m_bDelayedShow;
I18NStatus::ShowReason m_eDelayedReason;
- ULONG m_nDelayedEvent;
+ sal_uLong m_nDelayedEvent;
// for toggling
bool m_bOn;
@@ -165,7 +165,7 @@ void XIMStatusWindow::layout()
m_aStatusText.SetPosSizePixel( Point( 1, 1 ), aControlSize );
m_aStatusText.SetFont( aFont );
- m_aStatusText.Show( TRUE );
+ m_aStatusText.Show( sal_True );
if (m_bAnchoredAtRight && IsVisible())
{
@@ -257,7 +257,7 @@ void XIMStatusWindow::setPosition( SalFrame* pParent )
{
setText( String() );
m_pLastParent = pParent;
- Show( FALSE, SHOW_NOACTIVATE );
+ Show( sal_False, SHOW_NOACTIVATE );
}
if( IsVisible() )
{
@@ -359,7 +359,7 @@ IIIMPStatusWindow::IIIMPStatusWindow( SalFrame* pParent, bool bOn ) :
m_aStatusBtn.SetSelectHdl( LINK( this, IIIMPStatusWindow, SelectHdl ) );
m_aStatusBtn.SetPopupMenu( &m_aMenu );
- m_aStatusBtn.Show( TRUE );
+ m_aStatusBtn.Show( sal_True );
const ::std::vector< I18NStatus::ChoiceData >& rChoices( I18NStatus::get().getChoices() );
int i = 1;
@@ -384,7 +384,7 @@ IIIMPStatusWindow::IIIMPStatusWindow( SalFrame* pParent, bool bOn ) :
else
fprintf( stderr, "Warning: could not reposition status window since no frame\n" );
#endif
- EnableAlwaysOnTop( TRUE );
+ EnableAlwaysOnTop( sal_True );
}
IIIMPStatusWindow::~IIIMPStatusWindow()
diff --git a/vcl/unx/source/app/keysymnames.cxx b/vcl/unx/source/app/keysymnames.cxx
index c9515f016433..b48f0e629bd9 100644
--- a/vcl/unx/source/app/keysymnames.cxx
+++ b/vcl/unx/source/app/keysymnames.cxx
@@ -597,7 +597,7 @@ static const keyboard_layout type6_layout[] =
#include <stdio.h>
#endif
-const char* SalDisplay::GetKeyboardName( BOOL bRefresh )
+const char* SalDisplay::GetKeyboardName( sal_Bool bRefresh )
{
if( bRefresh || ! m_aKeyboardName.Len() )
{
diff --git a/vcl/unx/source/app/saldata.cxx b/vcl/unx/source/app/saldata.cxx
index beb7b60a551c..b14c11ac783e 100644
--- a/vcl/unx/source/app/saldata.cxx
+++ b/vcl/unx/source/app/saldata.cxx
@@ -408,7 +408,7 @@ void SalXLib::Init()
sal_uInt32 nParams = aCommandLine.getCommandArgCount();
rtl::OUString aParam;
rtl::OString aDisplay;
- for (USHORT i=0; i<nParams; i++)
+ for (sal_uInt16 i=0; i<nParams; i++)
{
aCommandLine.getCommandArg(i, aParam);
if (aParam.equalsAscii("-display"))
diff --git a/vcl/unx/source/app/saldisp.cxx b/vcl/unx/source/app/saldisp.cxx
index 92d5f75f7315..91f6934f27f0 100644
--- a/vcl/unx/source/app/saldisp.cxx
+++ b/vcl/unx/source/app/saldisp.cxx
@@ -213,7 +213,7 @@ static int sal_significantBits( Pixel nMask )
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-static BOOL sal_GetVisualInfo( Display *pDisplay, XID nVID, XVisualInfo &rVI )
+static sal_Bool sal_GetVisualInfo( Display *pDisplay, XID nVID, XVisualInfo &rVI )
{
int nInfos;
XVisualInfo aTemplate;
@@ -223,25 +223,25 @@ static BOOL sal_GetVisualInfo( Display *pDisplay, XID nVID, XVisualInfo &rVI )
pInfos = XGetVisualInfo( pDisplay, VisualIDMask, &aTemplate, &nInfos );
if( !pInfos )
- return FALSE;
+ return sal_False;
rVI = *pInfos;
XFree( pInfos );
DBG_ASSERT( rVI.visualid == nVID,
"sal_GetVisualInfo: could not get correct visual by visualId" );
- return TRUE;
+ return sal_True;
}
// ---------------------------------------------------------------------------
// check wether displaystring is in format N.M or N. or just N
// with N and M beeing natural numbers
-static BOOL
+static sal_Bool
sal_IsDisplayNumber( const char *pDisplayString )
{
if ( ! isdigit(*pDisplayString) )
- return FALSE;
+ return sal_False;
while ( isdigit(*(++pDisplayString)) )
; /* do nothing */
@@ -255,12 +255,12 @@ sal_IsDisplayNumber( const char *pDisplayString )
}
// check whether host1 and host2 point to the same ip address
-static BOOL
+static sal_Bool
sal_EqualHosts( const OUString& Host1, const OUString& Host2)
{
oslSocketAddr pHostAddr1;
oslSocketAddr pHostAddr2;
- BOOL bEqualAddress = FALSE;
+ sal_Bool bEqualAddress = sal_False;
if ( Host1.toChar() >= '0' && Host1.toChar() <= '9' )
pHostAddr1 = osl_createInetSocketAddr( Host1.pData, 0 );
@@ -273,7 +273,7 @@ sal_EqualHosts( const OUString& Host1, const OUString& Host2)
pHostAddr2 = osl_resolveHostname( Host2.pData );
if( pHostAddr1 && pHostAddr2 )
- bEqualAddress = osl_isEqualSocketAddr( pHostAddr1, pHostAddr2 ) ? TRUE : FALSE;
+ bEqualAddress = osl_isEqualSocketAddr( pHostAddr1, pHostAddr2 ) ? sal_True : sal_False;
if( pHostAddr1 )
osl_destroySocketAddr( pHostAddr1 );
@@ -283,14 +283,14 @@ sal_EqualHosts( const OUString& Host1, const OUString& Host2)
return bEqualAddress;
}
-static BOOL
+static sal_Bool
sal_IsLocalDisplay( Display *pDisplay )
{
const char *pDisplayString = DisplayString( pDisplay );
// no string, no idea
if ( pDisplayString == NULL || pDisplayString[ 0 ] == '\0')
- return FALSE;
+ return sal_False;
// check for ":x.y"
if ( pDisplayString[ 0 ] == ':' )
@@ -314,7 +314,7 @@ sal_IsLocalDisplay( Display *pDisplay )
// compare local hostname to displaystring, both may be ip address or
// hostname
- BOOL bEqual = FALSE;
+ sal_Bool bEqual = sal_False;
char *pDisplayHost = strdup( pDisplayString );
char *pPtr = strrchr( pDisplayHost, ':' );
@@ -339,14 +339,14 @@ sal_IsLocalDisplay( Display *pDisplay )
// since it is not called very often and sal_IsLocalDisplay() is relative
// expensive bLocal_ is initialized on first call
-BOOL SalDisplay::IsLocal()
+sal_Bool SalDisplay::IsLocal()
{
if ( ! mbLocalIsValid )
{
bLocal_ = sal_IsLocalDisplay( pDisp_ );
- mbLocalIsValid = TRUE;
+ mbLocalIsValid = sal_True;
}
- return (BOOL)bLocal_;
+ return (sal_Bool)bLocal_;
}
// ---------------------------------------------------------------------------
@@ -406,7 +406,7 @@ static sal_Bool sal_IsTrustedSolaris (Display *p_display)
// -=-= SalDisplay -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-BOOL SalDisplay::BestVisual( Display *pDisplay,
+sal_Bool SalDisplay::BestVisual( Display *pDisplay,
int nScreen,
XVisualInfo &rVI )
{
@@ -431,51 +431,51 @@ BOOL SalDisplay::BestVisual( Display *pDisplay,
int i;
for( i = 0; i < nVisuals; i++ )
{
- BOOL bUsable = FALSE;
+ sal_Bool bUsable = sal_False;
int nTrueColor = 1;
if ( pVInfos[i].screen != nScreen )
{
- bUsable = FALSE;
+ bUsable = sal_False;
}
else
if( pVInfos[i].c_class == TrueColor )
{
nTrueColor = 2048;
if( pVInfos[i].depth == 24 )
- bUsable = TRUE;
-#ifdef TRUECOLOR8
+ bUsable = sal_True;
+#ifdef sal_TrueCOLOR8
else if( pVInfos[i].depth == 8 )
{
nTrueColor = -1; // strongly discourage 8 bit true color
- bUsable = TRUE;
+ bUsable = sal_True;
}
#endif
-#ifdef TRUECOLOR15
+#ifdef sal_TrueCOLOR15
else if( pVInfos[i].depth == 15 )
- bUsable = TRUE;
+ bUsable = sal_True;
#endif
-#ifdef TRUECOLOR16
+#ifdef sal_TrueCOLOR16
else if( pVInfos[i].depth == 16 )
- bUsable = TRUE;
+ bUsable = sal_True;
#endif
-#ifdef TRUECOLOR32
+#ifdef sal_TrueCOLOR32
else if( pVInfos[i].depth == 32 )
{
nTrueColor = 256;
// we do not have use for an alpha channel
// better use a 24 or 16 bit truecolor visual if possible
- bUsable = TRUE;
+ bUsable = sal_True;
}
#endif
}
else if( pVInfos[i].c_class == PseudoColor )
{
if( pVInfos[i].depth <= 8 )
- bUsable = TRUE;
+ bUsable = sal_True;
#ifdef PSEUDOCOLOR12
else if( pVInfos[i].depth == 12 )
- bUsable = TRUE;
+ bUsable = sal_True;
#endif
}
pWeight[ i ] = bUsable ? nTrueColor*pVInfos[i].depth : -1024;
@@ -638,7 +638,7 @@ fd
GetSalData()->m_pInstance->GetYieldMutex();
::vos::OGuard aGuard( *pSalInstYieldMutex );
pDisplay->Yield();
- return TRUE;
+ return sal_True;
}
SalX11Display::SalX11Display( Display *display )
@@ -846,9 +846,9 @@ void SalDisplay::Init()
X11SalBitmap::ImplCreateCache();
hEventGuard_ = osl_createMutex();
- bLocal_ = FALSE; /* dont care, initialize later by
+ bLocal_ = sal_False; /* dont care, initialize later by
calling SalDisplay::IsLocal() */
- mbLocalIsValid = FALSE; /* bLocal_ is not yet initialized */
+ mbLocalIsValid = sal_False; /* bLocal_ is not yet initialized */
// - - - - - - - - - - Synchronize - - - - - - - - - - - - -
if( getenv( "SAL_SYNCHRONIZE" ) )
@@ -1096,7 +1096,7 @@ void SalDisplay::ModifierMapping()
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-XubString SalDisplay::GetKeyName( USHORT nKeyCode ) const
+XubString SalDisplay::GetKeyName( sal_uInt16 nKeyCode ) const
{
String aStrMap;
@@ -1279,27 +1279,27 @@ XubString SalDisplay::GetKeyName( USHORT nKeyCode ) const
#define IsISOKey( n ) (0x0000FE00==((n)&0xFFFFFF00))
#endif
-USHORT SalDisplay::GetKeyCode( KeySym keysym, char*pcPrintable ) const
+sal_uInt16 SalDisplay::GetKeyCode( KeySym keysym, char*pcPrintable ) const
{
- USHORT nKey = 0;
+ sal_uInt16 nKey = 0;
if( XK_a <= keysym && XK_z >= keysym )
- nKey = (USHORT)(KEY_A + (keysym - XK_a));
+ nKey = (sal_uInt16)(KEY_A + (keysym - XK_a));
else if( XK_A <= keysym && XK_Z >= keysym )
- nKey = (USHORT)(KEY_A + (keysym - XK_A));
+ nKey = (sal_uInt16)(KEY_A + (keysym - XK_A));
else if( XK_0 <= keysym && XK_9 >= keysym )
- nKey = (USHORT)(KEY_0 + (keysym - XK_0));
+ nKey = (sal_uInt16)(KEY_0 + (keysym - XK_0));
else if( IsModifierKey( keysym ) )
;
else if( IsKeypadKey( keysym ) )
{
if( (keysym >= XK_KP_0) && (keysym <= XK_KP_9) )
{
- nKey = (USHORT)(KEY_0 + (keysym - XK_KP_0));
+ nKey = (sal_uInt16)(KEY_0 + (keysym - XK_KP_0));
*pcPrintable = '0' + nKey - KEY_0;
}
else if( IsPFKey( keysym ) )
- nKey = (USHORT)(KEY_F1 + (keysym - XK_KP_F1));
+ nKey = (sal_uInt16)(KEY_F1 + (keysym - XK_KP_F1));
else switch( keysym )
{
case XK_KP_Space:
@@ -1378,7 +1378,7 @@ USHORT SalDisplay::GetKeyCode( KeySym keysym, char*pcPrintable ) const
if( bNumLockFromXS_ )
{
if( keysym >= XK_F1 && keysym <= XK_F26 )
- nKey = (USHORT)(KEY_F1 + keysym - XK_F1);
+ nKey = (sal_uInt16)(KEY_F1 + keysym - XK_F1);
}
else switch( keysym )
{
@@ -1447,7 +1447,7 @@ USHORT SalDisplay::GetKeyCode( KeySym keysym, char*pcPrintable ) const
break;
default:
if( keysym >= XK_F1 && keysym <= XK_F26 )
- nKey = (USHORT)(KEY_F1 + keysym - XK_F1);
+ nKey = (sal_uInt16)(KEY_F1 + keysym - XK_F1);
break;
}
}
@@ -2148,7 +2148,7 @@ int SalDisplay::CaptureMouse( SalFrame *pCapture )
// Events
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void SalDisplay::SendInternalEvent( SalFrame* pFrame, void* pData, USHORT nEvent )
+void SalDisplay::SendInternalEvent( SalFrame* pFrame, void* pData, sal_uInt16 nEvent )
{
if( osl_acquireMutex( hEventGuard_ ) )
{
@@ -2164,7 +2164,7 @@ void SalDisplay::SendInternalEvent( SalFrame* pFrame, void* pData, USHORT nEvent
}
}
-void SalDisplay::CancelInternalEvent( SalFrame* pFrame, void* pData, USHORT nEvent )
+void SalDisplay::CancelInternalEvent( SalFrame* pFrame, void* pData, sal_uInt16 nEvent )
{
if( osl_acquireMutex( hEventGuard_ ) )
{
@@ -2191,29 +2191,29 @@ void SalDisplay::CancelInternalEvent( SalFrame* pFrame, void* pData, USHORT nEve
}
}
-BOOL SalX11Display::IsEvent()
+sal_Bool SalX11Display::IsEvent()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( osl_acquireMutex( hEventGuard_ ) )
{
if( m_aUserEvents.begin() != m_aUserEvents.end() )
- bRet = TRUE;
+ bRet = sal_True;
osl_releaseMutex( hEventGuard_ );
}
if( bRet || XEventsQueued( pDisp_, QueuedAlready ) )
- return TRUE;
+ return sal_True;
XFlush( pDisp_ );
- return FALSE;
+ return sal_False;
}
bool SalDisplay::DispatchInternalEvent()
{
SalFrame* pFrame = NULL;
void* pData = NULL;
- USHORT nEvent = 0;
+ sal_uInt16 nEvent = 0;
if( osl_acquireMutex( hEventGuard_ ) )
{
@@ -2325,7 +2325,7 @@ long SalX11Display::Dispatch( XEvent *pEvent )
if( MappingModifier == pEvent->xmapping.request )
ModifierMapping();
if( MappingKeyboard == pEvent->xmapping.request ) // refresh mapping
- GetKeyboardName( TRUE );
+ GetKeyboardName( sal_True );
}
break;
case ButtonPress:
@@ -2845,14 +2845,14 @@ SalVisual::~SalVisual()
#define SALCOLOR RGB
#define SALCOLORREVERSE BGR
-BOOL SalVisual::Convert( int &n0, int &n1, int &n2, int &n3 )
+sal_Bool SalVisual::Convert( int &n0, int &n1, int &n2, int &n3 )
{
int n;
switch( GetMode() )
{
case other:
- return FALSE;
+ return sal_False;
case SALCOLOR:
break;
case SALCOLORREVERSE:
@@ -2877,17 +2877,17 @@ BOOL SalVisual::Convert( int &n0, int &n1, int &n2, int &n3 )
fprintf( stderr, "SalVisual::Convert %d\n", GetMode() );
abort();
}
- return TRUE;
+ return sal_True;
}
-BOOL SalVisual::Convert( int &n0, int &n1, int &n2 )
+sal_Bool SalVisual::Convert( int &n0, int &n1, int &n2 )
{
int n;
switch( GetMode() )
{
case other:
- return FALSE;
+ return sal_False;
case SALCOLOR:
break;
case RBG:
@@ -2921,7 +2921,7 @@ BOOL SalVisual::Convert( int &n0, int &n1, int &n2 )
fprintf( stderr, "SalVisual::Convert %d\n", GetMode() );
abort();
}
- return TRUE;
+ return sal_True;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -3093,7 +3093,7 @@ SalColormap::SalColormap()
}
// TrueColor
-SalColormap::SalColormap( USHORT nDepth )
+SalColormap::SalColormap( sal_uInt16 nDepth )
: m_pDisplay( GetX11SalData()->GetDisplay() ),
m_hColormap( None ),
m_nWhitePixel( (1 << nDepth) - 1 ),
@@ -3243,14 +3243,14 @@ void SalColormap::GetPalette()
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-static USHORT sal_Lookup( const std::vector<SalColor>& rPalette,
+static sal_uInt16 sal_Lookup( const std::vector<SalColor>& rPalette,
int r, int g, int b,
Pixel nUsed )
{
- USHORT nPixel = 0;
+ sal_uInt16 nPixel = 0;
int nBest = ColorDiff( rPalette[0], r, g, b );
- for( USHORT i = 1; i < nUsed; i++ )
+ for( sal_uInt16 i = 1; i < nUsed; i++ )
{
int n = ColorDiff( rPalette[i], r, g, b );
@@ -3268,7 +3268,7 @@ static USHORT sal_Lookup( const std::vector<SalColor>& rPalette,
void SalColormap::GetLookupTable()
{
- m_aLookupTable = std::vector<USHORT>(16*16*16);
+ m_aLookupTable = std::vector<sal_uInt16>(16*16*16);
int i = 0;
for( int r = 0; r < 256; r += 17 )
@@ -3318,7 +3318,7 @@ SalColor SalColormap::GetColor( Pixel nPixel ) const
return MAKE_SALCOLOR( aColor.red>>8, aColor.green>>8, aColor.blue>>8 );
}
-inline BOOL SalColormap::GetXPixel( XColor &rColor,
+inline sal_Bool SalColormap::GetXPixel( XColor &rColor,
int r,
int g,
int b ) const
@@ -3329,15 +3329,15 @@ inline BOOL SalColormap::GetXPixel( XColor &rColor,
return XAllocColor( GetXDisplay(), m_hColormap, &rColor );
}
-BOOL SalColormap::GetXPixels( XColor &rColor,
+sal_Bool SalColormap::GetXPixels( XColor &rColor,
int r,
int g,
int b ) const
{
if( !GetXPixel( rColor, r, g, b ) )
- return FALSE;
+ return sal_False;
if( rColor.pixel & 1 )
- return TRUE;
+ return sal_True;
return GetXPixel( rColor, r^0xFF, g^0xFF, b^0xFF );
}
@@ -3425,9 +3425,9 @@ Pixel SalColormap::GetPixel( SalColor nSalColor ) const
}
// Colormatching ueber Palette
- USHORT r = SALCOLOR_RED ( nSalColor );
- USHORT g = SALCOLOR_GREEN( nSalColor );
- USHORT b = SALCOLOR_BLUE ( nSalColor );
+ sal_uInt16 r = SALCOLOR_RED ( nSalColor );
+ sal_uInt16 g = SALCOLOR_GREEN( nSalColor );
+ sal_uInt16 b = SALCOLOR_BLUE ( nSalColor );
return m_aLookupTable[ (((r+8)/17) << 8)
+ (((g+8)/17) << 4)
+ ((b+8)/17) ];
diff --git a/vcl/unx/source/app/salinst.cxx b/vcl/unx/source/app/salinst.cxx
index f125d5f98fa6..8814e6c65f89 100644
--- a/vcl/unx/source/app/salinst.cxx
+++ b/vcl/unx/source/app/salinst.cxx
@@ -149,8 +149,8 @@ X11SalInstance::~X11SalInstance()
struct PredicateReturn
{
- USHORT nType;
- BOOL bRet;
+ sal_uInt16 nType;
+ sal_Bool bRet;
};
extern "C" {
@@ -161,7 +161,7 @@ Bool ImplPredicateEvent( Display *, XEvent *pEvent, char *pData )
if ( pPre->bRet )
return False;
- USHORT nType;
+ sal_uInt16 nType;
switch( pEvent->type )
{
@@ -187,29 +187,29 @@ Bool ImplPredicateEvent( Display *, XEvent *pEvent, char *pData )
}
if ( (nType & pPre->nType) || ( ! nType && (pPre->nType & INPUT_OTHER) ) )
- pPre->bRet = TRUE;
+ pPre->bRet = sal_True;
return False;
}
}
-bool X11SalInstance::AnyInput(USHORT nType)
+bool X11SalInstance::AnyInput(sal_uInt16 nType)
{
X11SalData *pSalData = GetX11SalData();
Display *pDisplay = pSalData->GetDisplay()->GetDisplay();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( (nType & INPUT_TIMER) &&
pSalData->GetDisplay()->GetXLib()->CheckTimeout( false ) )
{
- bRet = TRUE;
+ bRet = sal_True;
}
else if (XPending(pDisplay) )
{
PredicateReturn aInput;
XEvent aEvent;
- aInput.bRet = FALSE;
+ aInput.bRet = sal_False;
aInput.nType = nType;
XCheckIfEvent(pDisplay, &aEvent, ImplPredicateEvent,
@@ -227,14 +227,14 @@ vos::IMutex* X11SalInstance::GetYieldMutex()
// -----------------------------------------------------------------------
-ULONG X11SalInstance::ReleaseYieldMutex()
+sal_uLong X11SalInstance::ReleaseYieldMutex()
{
SalYieldMutex* pYieldMutex = mpSalYieldMutex;
if ( pYieldMutex->GetThreadId() ==
vos::OThread::getCurrentIdentifier() )
{
- ULONG nCount = pYieldMutex->GetAcquireCount();
- ULONG n = nCount;
+ sal_uLong nCount = pYieldMutex->GetAcquireCount();
+ sal_uLong n = nCount;
while ( n )
{
pYieldMutex->release();
@@ -249,7 +249,7 @@ ULONG X11SalInstance::ReleaseYieldMutex()
// -----------------------------------------------------------------------
-void X11SalInstance::AcquireYieldMutex( ULONG nCount )
+void X11SalInstance::AcquireYieldMutex( sal_uLong nCount )
{
SalYieldMutex* pYieldMutex = mpSalYieldMutex;
while ( nCount )
@@ -288,14 +288,14 @@ void* X11SalInstance::GetConnectionIdentifier( ConnectionIdentifierType& rReturn
return pDisplay ? (void*)pDisplay : (void*)"";
}
-SalFrame *X11SalInstance::CreateFrame( SalFrame *pParent, ULONG nSalFrameStyle )
+SalFrame *X11SalInstance::CreateFrame( SalFrame *pParent, sal_uLong nSalFrameStyle )
{
SalFrame *pFrame = new X11SalFrame( pParent, nSalFrameStyle );
return pFrame;
}
-SalFrame* X11SalInstance::CreateChildFrame( SystemParentData* pParentData, ULONG nStyle )
+SalFrame* X11SalInstance::CreateChildFrame( SystemParentData* pParentData, sal_uLong nStyle )
{
SalFrame* pFrame = new X11SalFrame( NULL, nStyle, pParentData );
diff --git a/vcl/unx/source/app/salsys.cxx b/vcl/unx/source/app/salsys.cxx
index 84c9dba32e40..5e2b870f559f 100644
--- a/vcl/unx/source/app/salsys.cxx
+++ b/vcl/unx/source/app/salsys.cxx
@@ -152,13 +152,13 @@ int X11SalSystem::ShowNativeDialog( const String& rTitle, const String& rMessage
aWarn.SetText( rTitle );
aWarn.Clear();
- USHORT nButton = 0;
+ sal_uInt16 nButton = 0;
for( std::list< String >::const_iterator it = rButtons.begin(); it != rButtons.end(); ++it )
{
- aWarn.AddButton( *it, nButton+1, nButton == (USHORT)nDefButton ? BUTTONDIALOG_DEFBUTTON : 0 );
+ aWarn.AddButton( *it, nButton+1, nButton == (sal_uInt16)nDefButton ? BUTTONDIALOG_DEFBUTTON : 0 );
nButton++;
}
- aWarn.SetFocusButton( (USHORT)nDefButton+1 );
+ aWarn.SetFocusButton( (sal_uInt16)nDefButton+1 );
nRet = ((int)aWarn.Execute()) - 1;
diff --git a/vcl/unx/source/app/saltimer.cxx b/vcl/unx/source/app/saltimer.cxx
index 431470935d9e..1085967f74a2 100644
--- a/vcl/unx/source/app/saltimer.cxx
+++ b/vcl/unx/source/app/saltimer.cxx
@@ -58,7 +58,7 @@ void SalXLib::StopTimer()
m_nTimeoutMS = 0;
}
-void SalXLib::StartTimer( ULONG nMS )
+void SalXLib::StartTimer( sal_uLong nMS )
{
timeval Timeout (m_aTimeout); // previous timeout.
gettimeofday (&m_aTimeout, 0);
@@ -89,7 +89,7 @@ void X11SalTimer::Stop()
GetX11SalData()->GetLib()->StopTimer();
}
-void X11SalTimer::Start( ULONG nMS )
+void X11SalTimer::Start( sal_uLong nMS )
{
GetX11SalData()->GetLib()->StartTimer( nMS );
}
diff --git a/vcl/unx/source/app/sm.cxx b/vcl/unx/source/app/sm.cxx
index 959d6af5912d..21d9b8df60f3 100644
--- a/vcl/unx/source/app/sm.cxx
+++ b/vcl/unx/source/app/sm.cxx
@@ -149,7 +149,7 @@ extern "C" void SAL_CALL ICEConnectionWorker( void* );
class ICEConnectionObserver
{
friend void SAL_CALL ICEConnectionWorker(void*);
- static BOOL bIsWatching;
+ static sal_Bool bIsWatching;
static void ICEWatchProc( IceConn connection, IcePointer client_data,
Bool opening, IcePointer* watch_data );
@@ -175,7 +175,7 @@ public:
SmcConn SessionManagerClient::aSmcConnection = NULL;
ByteString SessionManagerClient::aClientID;
-BOOL ICEConnectionObserver::bIsWatching = FALSE;
+sal_Bool ICEConnectionObserver::bIsWatching = sal_False;
struct pollfd* ICEConnectionObserver::pFilehandles = NULL;
IceConn* ICEConnectionObserver::pConnections = NULL;
int ICEConnectionObserver::nConnections = 0;
@@ -606,7 +606,7 @@ void ICEConnectionObserver::activate()
{
nWakeupFiles[0] = nWakeupFiles[1] = 0;
ICEMutex = osl_createMutex();
- bIsWatching = TRUE;
+ bIsWatching = sal_True;
#ifdef USE_SM_EXTENSION
/*
* Default handlers call exit, we don't care that strongly if something
@@ -624,7 +624,7 @@ void ICEConnectionObserver::deactivate()
if( bIsWatching )
{
lock();
- bIsWatching = FALSE;
+ bIsWatching = sal_False;
#ifdef USE_SM_EXTENSION
IceRemoveConnectionWatch( ICEWatchProc, NULL );
IceSetErrorHandler( origErrorHandler );
diff --git a/vcl/unx/source/app/soicon.cxx b/vcl/unx/source/app/soicon.cxx
index 2bf9e55731d1..ddb14e9ecc39 100644
--- a/vcl/unx/source/app/soicon.cxx
+++ b/vcl/unx/source/app/soicon.cxx
@@ -43,13 +43,13 @@
#include <salbmp.h>
#include <vcl/svids.hrc>
-BOOL SelectAppIconPixmap( SalDisplay *pDisplay, int nScreen,USHORT nIcon, USHORT iconSize,
+sal_Bool SelectAppIconPixmap( SalDisplay *pDisplay, int nScreen,sal_uInt16 nIcon, sal_uInt16 iconSize,
Pixmap& icon_pixmap, Pixmap& icon_mask)
{
if( ! ImplGetResMgr() )
- return FALSE;
+ return sal_False;
- USHORT nIconSizeOffset;
+ sal_uInt16 nIconSizeOffset;
if( iconSize >= 48 )
nIconSizeOffset = SV_ICON_SIZE48_START;
@@ -58,11 +58,11 @@ BOOL SelectAppIconPixmap( SalDisplay *pDisplay, int nScreen,USHORT nIcon, USHORT
else if( iconSize >= 16 )
nIconSizeOffset = SV_ICON_SIZE16_START;
else
- return FALSE;
+ return sal_False;
BitmapEx aIcon( ResId(nIconSizeOffset + nIcon, *ImplGetResMgr()));
- if( TRUE == aIcon.IsEmpty() )
- return FALSE;
+ if( sal_True == aIcon.IsEmpty() )
+ return sal_False;
SalTwoRect aRect;
aRect.mnSrcX = 0; aRect.mnSrcY = 0;
@@ -110,6 +110,6 @@ BOOL SelectAppIconPixmap( SalDisplay *pDisplay, int nScreen,USHORT nIcon, USHORT
XFreeGC( pDisplay->GetDisplay(), aMonoGC );
}
- return TRUE;
+ return sal_True;
}
diff --git a/vcl/unx/source/dtrans/X11_clipboard.hxx b/vcl/unx/source/dtrans/X11_clipboard.hxx
index 21bf547a9cb7..2c0ee2d95c0d 100644
--- a/vcl/unx/source/dtrans/X11_clipboard.hxx
+++ b/vcl/unx/source/dtrans/X11_clipboard.hxx
@@ -54,12 +54,12 @@ namespace x11 {
>,
public SelectionAdaptor
{
- Reference< ::com::sun::star::datatransfer::XTransferable > m_aContents;
- Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner > m_aOwner;
+ com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > m_aContents;
+ com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner > m_aOwner;
SelectionManager& m_rSelectionManager;
- Reference< ::com::sun::star::lang::XInitialization > m_xSelectionManager;
- ::std::list< Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener > > m_aListeners;
+ com::sun::star::uno::Reference< ::com::sun::star::lang::XInitialization > m_xSelectionManager;
+ ::std::list< com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener > > m_aListeners;
Atom m_aSelection;
protected:
@@ -100,12 +100,12 @@ namespace x11 {
* XClipboard
*/
- virtual Reference< ::com::sun::star::datatransfer::XTransferable > SAL_CALL getContents()
+ virtual com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > SAL_CALL getContents()
throw(RuntimeException);
virtual void SAL_CALL setContents(
- const Reference< ::com::sun::star::datatransfer::XTransferable >& xTrans,
- const Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >& xClipboardOwner )
+ const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& xTrans,
+ const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >& xClipboardOwner )
throw(RuntimeException);
virtual ::rtl::OUString SAL_CALL getName()
@@ -122,27 +122,27 @@ namespace x11 {
* XClipboardNotifier
*/
virtual void SAL_CALL addClipboardListener(
- const Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener )
+ const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener )
throw(RuntimeException);
virtual void SAL_CALL removeClipboardListener(
- const Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener )
+ const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener )
throw(RuntimeException);
/*
* SelectionAdaptor
*/
- virtual Reference< ::com::sun::star::datatransfer::XTransferable > getTransferable();
+ virtual com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > getTransferable();
virtual void clearTransferable();
virtual void fireContentsChanged();
- virtual Reference< XInterface > getReference() throw();
+ virtual com::sun::star::uno::Reference< XInterface > getReference() throw();
};
// ------------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL X11Clipboard_getSupportedServiceNames();
- Reference< XInterface > SAL_CALL X11Clipboard_createInstance(
- const Reference< ::com::sun::star::lang::XMultiServiceFactory > & xMultiServiceFactory);
+ com::sun::star::uno::Reference< XInterface > SAL_CALL X11Clipboard_createInstance(
+ const com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & xMultiServiceFactory);
// ------------------------------------------------------------------------
diff --git a/vcl/unx/source/dtrans/X11_dndcontext.hxx b/vcl/unx/source/dtrans/X11_dndcontext.hxx
index 9b48d346f03b..d8ef87444a7a 100644
--- a/vcl/unx/source/dtrans/X11_dndcontext.hxx
+++ b/vcl/unx/source/dtrans/X11_dndcontext.hxx
@@ -51,7 +51,7 @@ namespace x11 {
XLIB_Window m_aDropWindow;
XLIB_Time m_nTimestamp;
SelectionManager& m_rManager;
- Reference< XInterface > m_xManagerRef;
+ com::sun::star::uno::Reference< XInterface > m_xManagerRef;
public:
DropTargetDropContext( XLIB_Window, XLIB_Time, SelectionManager& );
virtual ~DropTargetDropContext();
@@ -70,7 +70,7 @@ namespace x11 {
XLIB_Window m_aDropWindow;
XLIB_Time m_nTimestamp;
SelectionManager& m_rManager;
- Reference< XInterface > m_xManagerRef;
+ com::sun::star::uno::Reference< XInterface > m_xManagerRef;
public:
DropTargetDragContext( XLIB_Window, XLIB_Time, SelectionManager& );
virtual ~DropTargetDragContext();
@@ -88,7 +88,7 @@ namespace x11 {
XLIB_Window m_aDropWindow;
XLIB_Time m_nTimestamp;
SelectionManager& m_rManager;
- Reference< XInterface > m_xManagerRef;
+ com::sun::star::uno::Reference< XInterface > m_xManagerRef;
public:
DragSourceContext( XLIB_Window, XLIB_Time, SelectionManager& );
virtual ~DragSourceContext();
diff --git a/vcl/unx/source/dtrans/X11_selection.cxx b/vcl/unx/source/dtrans/X11_selection.cxx
index 403ee9707a94..8188f2b1164a 100644
--- a/vcl/unx/source/dtrans/X11_selection.cxx
+++ b/vcl/unx/source/dtrans/X11_selection.cxx
@@ -80,6 +80,12 @@
EnterWindowMask |\
LeaveWindowMask
+namespace {
+
+namespace css = com::sun::star;
+
+}
+
using namespace com::sun::star::datatransfer;
using namespace com::sun::star::datatransfer::dnd;
using namespace com::sun::star::lang;
@@ -279,7 +285,8 @@ SelectionManager::SelectionManager() :
m_nXdndActionMove( None ),
m_nXdndActionLink( None ),
m_nXdndActionAsk( None ),
- m_nXdndActionPrivate( None )
+ m_nXdndActionPrivate( None ),
+ m_bShutDown( false )
{
m_aDropEnterEvent.data.l[0] = None;
m_aDragRunning.reset();
@@ -632,7 +639,7 @@ OString SelectionManager::convertToCompound( const OUString& rText )
// ------------------------------------------------------------------------
bool SelectionManager::convertData(
- const Reference< XTransferable >& xTransferable,
+ const css::uno::Reference< XTransferable >& xTransferable,
Atom nType,
Atom nSelection,
int& rFormat,
@@ -1527,7 +1534,7 @@ bool SelectionManager::sendData( SelectionAdaptor* pAdaptor,
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "trying bitmap conversion\n" );
#endif
- Reference<XBitmap> xBM( new BmpTransporter( aData ) );
+ css::uno::Reference<XBitmap> xBM( new BmpTransporter( aData ) );
Sequence<Any> aArgs(2), aOutArgs;
Sequence<sal_Int16> aOutIndex;
aArgs.getArray()[0] = makeAny( xBM );
@@ -1674,7 +1681,7 @@ bool SelectionManager::handleSelectionRequest( XSelectionRequestEvent& rRequest
if( pAdaptor &&
XGetSelectionOwner( m_pDisplay, rRequest.selection ) == m_aWindow )
{
- Reference< XTransferable > xTrans( pAdaptor->getTransferable() );
+ css::uno::Reference< XTransferable > xTrans( pAdaptor->getTransferable() );
if( rRequest.target == m_nTARGETSAtom )
{
// someone requests our types
@@ -1843,7 +1850,7 @@ bool SelectionManager::handleSelectionRequest( XSelectionRequestEvent& rRequest
dsde.DropAction = DNDConstants::ACTION_NONE;
dsde.DropSuccess = sal_False;
}
- Reference< XDragSourceListener > xListener( m_xDragSourceListener );
+ css::uno::Reference< XDragSourceListener > xListener( m_xDragSourceListener );
m_xDragSourceListener.clear();
aGuard.clear();
if( xListener.is() )
@@ -2364,7 +2371,7 @@ void SelectionManager::dropComplete( sal_Bool bSuccess, XLIB_Window aDropWindow,
dsde.DragSource = static_cast< XDragSource* >(this);
dsde.DropAction = getUserDragAction();
dsde.DropSuccess = bSuccess;
- Reference< XDragSourceListener > xListener = m_xDragSourceListener;
+ css::uno::Reference< XDragSourceListener > xListener = m_xDragSourceListener;
m_xDragSourceListener.clear();
aGuard.clear();
@@ -2448,7 +2455,7 @@ void SelectionManager::sendDragStatus( Atom nDropAction )
dsde.DropAction = m_nSourceActions;
dsde.UserAction = getUserDragAction();
- Reference< XDragSourceListener > xListener( m_xDragSourceListener );
+ css::uno::Reference< XDragSourceListener > xListener( m_xDragSourceListener );
// caution: do not change anything after this
aGuard.clear();
if( xListener.is() )
@@ -2710,7 +2717,7 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage )
dsde.DragSource = static_cast< XDragSource* >(this);
dsde.DropAction = m_nTargetAcceptAction;
dsde.DropSuccess = m_bDropSuccess;
- Reference< XDragSourceListener > xListener( m_xDragSourceListener );
+ css::uno::Reference< XDragSourceListener > xListener( m_xDragSourceListener );
m_xDragSourceListener.clear();
aGuard.clear();
xListener->dragDropEnd( dsde );
@@ -2776,7 +2783,7 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage )
dsde.DragSource = static_cast< XDragSource* >(this);
dsde.DropAction = DNDConstants::ACTION_NONE;
dsde.DropSuccess = sal_False;
- Reference< XDragSourceListener > xListener( m_xDragSourceListener );
+ css::uno::Reference< XDragSourceListener > xListener( m_xDragSourceListener );
m_xDragSourceListener.clear();
aGuard.clear();
xListener->dragDropEnd( dsde );
@@ -2902,7 +2909,7 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage )
m_nDropTimeout = time( NULL );
// HACK :-)
aGuard.clear();
- static_cast< X11Clipboard* >( pAdaptor )->setContents( m_xDragSourceTransferable, Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >() );
+ static_cast< X11Clipboard* >( pAdaptor )->setContents( m_xDragSourceTransferable, css::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >() );
aGuard.reset();
bCancel = false;
}
@@ -2917,7 +2924,7 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage )
dsde.DragSource = static_cast< XDragSource* >(this);
dsde.DropAction = DNDConstants::ACTION_NONE;
dsde.DropSuccess = sal_False;
- Reference< XDragSourceListener > xListener( m_xDragSourceListener );
+ css::uno::Reference< XDragSourceListener > xListener( m_xDragSourceListener );
m_xDragSourceListener.clear();
aGuard.clear();
xListener->dragDropEnd( dsde );
@@ -3071,7 +3078,7 @@ void SelectionManager::updateDragWindow( int nX, int nY, XLIB_Window aRoot )
{
ResettableMutexGuard aGuard( m_aMutex );
- Reference< XDragSourceListener > xListener( m_xDragSourceListener );
+ css::uno::Reference< XDragSourceListener > xListener( m_xDragSourceListener );
m_nLastDragX = nX;
m_nLastDragY = nY;
@@ -3231,8 +3238,8 @@ void SelectionManager::startDrag(
sal_Int8 sourceActions,
sal_Int32,
sal_Int32,
- const Reference< XTransferable >& transferable,
- const Reference< XDragSourceListener >& listener
+ const css::uno::Reference< XTransferable >& transferable,
+ const css::uno::Reference< XDragSourceListener >& listener
) throw()
{
#if OSL_DEBUG_LEVEL > 1
@@ -3516,8 +3523,8 @@ void SelectionManager::dragDoDispatch()
{
ClearableMutexGuard aGuard(m_aMutex);
- Reference< XDragSourceListener > xListener( m_xDragSourceListener );
- Reference< XTransferable > xTransferable( m_xDragSourceTransferable );
+ css::uno::Reference< XDragSourceListener > xListener( m_xDragSourceListener );
+ css::uno::Reference< XTransferable > xTransferable( m_xDragSourceTransferable );
m_xDragSourceListener.clear();
m_xDragSourceTransferable.clear();
@@ -3787,10 +3794,10 @@ void SelectionManager::run( void* pThis )
timeval aLast;
gettimeofday( &aLast, 0 );
- Reference< XMultiServiceFactory > xFact( ::comphelper::getProcessServiceFactory() );
+ css::uno::Reference< XMultiServiceFactory > xFact( ::comphelper::getProcessServiceFactory() );
if( xFact.is() )
{
- Reference< XDesktop > xDesktop( xFact->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.frame.Desktop" ) ), UNO_QUERY );
+ css::uno::Reference< XDesktop > xDesktop( xFact->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.frame.Desktop" ) ), UNO_QUERY );
if( xDesktop.is() )
xDesktop->addTerminateListener(This);
}
@@ -3805,7 +3812,7 @@ void SelectionManager::run( void* pThis )
if( (aNow.tv_sec - aLast.tv_sec) > 0 )
{
ClearableMutexGuard aGuard(This->m_aMutex);
- std::list< std::pair< SelectionAdaptor*, Reference< XInterface > > > aChangeList;
+ std::list< std::pair< SelectionAdaptor*, css::uno::Reference< XInterface > > > aChangeList;
for( std::hash_map< Atom, Selection* >::iterator it = This->m_aSelections.begin(); it != This->m_aSelections.end(); ++it )
{
@@ -3815,7 +3822,7 @@ void SelectionManager::run( void* pThis )
if( aOwner != it->second->m_aLastOwner )
{
it->second->m_aLastOwner = aOwner;
- std::pair< SelectionAdaptor*, Reference< XInterface > >
+ std::pair< SelectionAdaptor*, css::uno::Reference< XInterface > >
aKeep( it->second->m_pAdaptor, it->second->m_pAdaptor->getReference() );
aChangeList.push_back( aKeep );
}
@@ -3838,6 +3845,11 @@ void SelectionManager::run( void* pThis )
void SelectionManager::shutdown() throw()
{
ResettableMutexGuard aGuard(m_aMutex);
+ if( m_bShutDown )
+ {
+ return;
+ }
+ m_bShutDown = true;
// stop dispatching
if( m_aThread )
{
@@ -3927,7 +3939,7 @@ void SAL_CALL SelectionManager::queryTermination( const ::com::sun::star::lang::
void SAL_CALL SelectionManager::notifyTermination( const ::com::sun::star::lang::EventObject& rEvent )
throw( ::com::sun::star::uno::RuntimeException )
{
- Reference< XDesktop > xDesktop( rEvent.Source, UNO_QUERY );
+ css::uno::Reference< XDesktop > xDesktop( rEvent.Source, UNO_QUERY );
if( xDesktop.is() == sal_True )
xDesktop->removeTerminateListener( this );
#if OSL_DEBUG_LEVEL > 1
@@ -4060,7 +4072,7 @@ void SelectionManager::deregisterDropTarget( XLIB_Window aWindow )
dsde.DragSource = static_cast< XDragSource* >(this);
dsde.DropAction = DNDConstants::ACTION_NONE;
dsde.DropSuccess = sal_False;
- Reference< XDragSourceListener > xListener( m_xDragSourceListener );
+ css::uno::Reference< XDragSourceListener > xListener( m_xDragSourceListener );
m_xDragSourceListener.clear();
aGuard.clear();
xListener->dragDropEnd( dsde );
@@ -4071,7 +4083,7 @@ void SelectionManager::deregisterDropTarget( XLIB_Window aWindow )
* SelectionAdaptor
*/
-Reference< XTransferable > SelectionManager::getTransferable() throw()
+css::uno::Reference< XTransferable > SelectionManager::getTransferable() throw()
{
return m_xDragSourceTransferable;
}
@@ -4091,9 +4103,9 @@ void SelectionManager::fireContentsChanged() throw()
// ------------------------------------------------------------------------
-Reference< XInterface > SelectionManager::getReference() throw()
+css::uno::Reference< XInterface > SelectionManager::getReference() throw()
{
- return Reference< XInterface >( static_cast<OWeakObject*>(this) );
+ return css::uno::Reference< XInterface >( static_cast<OWeakObject*>(this) );
}
// ------------------------------------------------------------------------
@@ -4124,7 +4136,7 @@ void SelectionManagerHolder::initialize( const Sequence< Any >& arguments ) thro
if( arguments.getLength() > 0 )
{
- Reference< XDisplayConnection > xConn;
+ css::uno::Reference< XDisplayConnection > xConn;
arguments.getConstArray()[0] >>= xConn;
if( xConn.is() )
{
@@ -4159,8 +4171,8 @@ sal_Int32 SelectionManagerHolder::getDefaultCursor( sal_Int8 dragAction ) throw(
void SelectionManagerHolder::startDrag(
const ::com::sun::star::datatransfer::dnd::DragGestureEvent& trigger,
sal_Int8 sourceActions, sal_Int32 cursor, sal_Int32 image,
- const Reference< ::com::sun::star::datatransfer::XTransferable >& transferable,
- const Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener >& listener
+ const css::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& transferable,
+ const css::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener >& listener
) throw()
{
if( m_xRealDragSource.is() )
diff --git a/vcl/unx/source/dtrans/X11_selection.hxx b/vcl/unx/source/dtrans/X11_selection.hxx
index 47baa1776d1a..34a50819bfed 100644
--- a/vcl/unx/source/dtrans/X11_selection.hxx
+++ b/vcl/unx/source/dtrans/X11_selection.hxx
@@ -66,10 +66,10 @@ namespace x11 {
class SelectionAdaptor
{
public:
- virtual Reference< ::com::sun::star::datatransfer::XTransferable > getTransferable() = 0;
+ virtual com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > getTransferable() = 0;
virtual void clearTransferable() = 0;
virtual void fireContentsChanged() = 0;
- virtual Reference< XInterface > getReference() = 0;
+ virtual com::sun::star::uno::Reference< XInterface > getReference() = 0;
// returns a reference that will keep the SelectionAdaptor alive until the
// refernce is released
};
@@ -87,9 +87,9 @@ namespace x11 {
sal_Int8 m_nDefaultActions;
XLIB_Window m_aTargetWindow;
class SelectionManager* m_pSelectionManager;
- Reference< ::com::sun::star::datatransfer::dnd::XDragSource >
+ com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSource >
m_xSelectionManager;
- ::std::list< Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener > >
+ ::std::list< com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener > >
m_aListeners;
DropTarget();
@@ -105,8 +105,8 @@ namespace x11 {
virtual void SAL_CALL initialize( const Sequence< Any >& args ) throw ( ::com::sun::star::uno::Exception );
// XDropTarget
- virtual void SAL_CALL addDropTargetListener( const Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& ) throw();
- virtual void SAL_CALL removeDropTargetListener( const Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& ) throw();
+ virtual void SAL_CALL addDropTargetListener( const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& ) throw();
+ virtual void SAL_CALL removeDropTargetListener( const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& ) throw();
virtual sal_Bool SAL_CALL isActive() throw();
virtual void SAL_CALL setActive( sal_Bool active ) throw();
virtual sal_Int8 SAL_CALL getDefaultActions() throw();
@@ -127,7 +127,7 @@ namespace x11 {
>
{
::osl::Mutex m_aMutex;
- Reference< ::com::sun::star::datatransfer::dnd::XDragSource >
+ com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSource >
m_xRealDragSource;
public:
SelectionManagerHolder();
@@ -148,8 +148,8 @@ namespace x11 {
virtual void SAL_CALL startDrag(
const ::com::sun::star::datatransfer::dnd::DragGestureEvent& trigger,
sal_Int8 sourceActions, sal_Int32 cursor, sal_Int32 image,
- const Reference< ::com::sun::star::datatransfer::XTransferable >& transferable,
- const Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener >& listener
+ const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& transferable,
+ const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener >& listener
) throw();
};
@@ -260,9 +260,9 @@ namespace x11 {
oslThread m_aDragExecuteThread;
::osl::Condition m_aDragRunning;
XLIB_Window m_aWindow;
- Reference< ::com::sun::star::awt::XDisplayConnection >
+ com::sun::star::uno::Reference< ::com::sun::star::awt::XDisplayConnection >
m_xDisplayConnection;
- Reference< com::sun::star::script::XInvocation >
+ com::sun::star::uno::Reference< com::sun::star::script::XInvocation >
m_xBitmapConverter;
sal_Int32 m_nSelectionTimeout;
XLIB_Time m_nSelectionTimestamp;
@@ -285,7 +285,7 @@ namespace x11 {
XLIB_Time m_nDropTime;
sal_Int8 m_nLastDropAction;
// XTransferable for Xdnd with foreign drag source
- Reference< ::com::sun::star::datatransfer::XTransferable >
+ com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >
m_xDropTransferable;
int m_nLastX, m_nLastY;
XLIB_Time m_nDropTimestamp;
@@ -303,9 +303,9 @@ namespace x11 {
XLIB_Window m_aDropProxy;
XLIB_Window m_aDragSourceWindow;
// XTransferable for Xdnd when we are drag source
- Reference< ::com::sun::star::datatransfer::XTransferable >
+ com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >
m_xDragSourceTransferable;
- Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener >
+ com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener >
m_xDragSourceListener;
// root coordinates
int m_nLastDragX, m_nLastDragY;
@@ -383,6 +383,7 @@ namespace x11 {
// since this leads to deadlocks in different Xlib implentations
// (XFree as well as Xsun) use an own mutex instead
::osl::Mutex m_aMutex;
+ bool m_bShutDown;
SelectionManager();
~SelectionManager();
@@ -409,7 +410,7 @@ namespace x11 {
bool getPasteData( Atom selection, Atom type, Sequence< sal_Int8 >& rData );
// returns true if conversion was successful
- bool convertData( const Reference< ::com::sun::star::datatransfer::XTransferable >& xTransferable,
+ bool convertData( const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& xTransferable,
Atom nType,
Atom nSelection,
int & rFormat,
@@ -494,15 +495,15 @@ namespace x11 {
virtual void SAL_CALL startDrag(
const ::com::sun::star::datatransfer::dnd::DragGestureEvent& trigger,
sal_Int8 sourceActions, sal_Int32 cursor, sal_Int32 image,
- const Reference< ::com::sun::star::datatransfer::XTransferable >& transferable,
- const Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener >& listener
+ const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& transferable,
+ const com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener >& listener
) throw();
// SelectionAdaptor for XdndSelection Drag (we are drag source)
- virtual Reference< ::com::sun::star::datatransfer::XTransferable > getTransferable() throw();
+ virtual com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > getTransferable() throw();
virtual void clearTransferable() throw();
virtual void fireContentsChanged() throw();
- virtual Reference< XInterface > getReference() throw();
+ virtual com::sun::star::uno::Reference< XInterface > getReference() throw();
// XEventListener
virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw( ::com::sun::star::uno::RuntimeException );
diff --git a/vcl/unx/source/dtrans/X11_service.cxx b/vcl/unx/source/dtrans/X11_service.cxx
index e14d81643553..d15518c0b9ab 100644
--- a/vcl/unx/source/dtrans/X11_service.cxx
+++ b/vcl/unx/source/dtrans/X11_service.cxx
@@ -39,6 +39,12 @@
#include <cppuhelper/factory.hxx>
#include <cppuhelper/compbase1.hxx>
+namespace {
+
+namespace css = com::sun::star;
+
+}
+
using namespace rtl;
using namespace cppu;
using namespace com::sun::star::lang;
@@ -69,9 +75,9 @@ Sequence< OUString > SAL_CALL x11::Xdnd_dropTarget_getSupportedServiceNames()
// ------------------------------------------------------------------------
-Reference< XInterface > X11SalInstance::CreateClipboard( const Sequence< Any >& arguments )
+css::uno::Reference< XInterface > X11SalInstance::CreateClipboard( const Sequence< Any >& arguments )
{
- static std::hash_map< OUString, ::std::hash_map< Atom, Reference< XClipboard > >, ::rtl::OUStringHash > m_aInstances;
+ static std::hash_map< OUString, ::std::hash_map< Atom, css::uno::Reference< XClipboard > >, ::rtl::OUStringHash > m_aInstances;
OUString aDisplayName;
Atom nSelection;
@@ -80,7 +86,7 @@ Reference< XInterface > X11SalInstance::CreateClipboard( const Sequence< Any >&
// by SelectionManager.initialize() if no display connection is given.
if( arguments.getLength() > 0 )
{
- Reference< XDisplayConnection > xConn;
+ css::uno::Reference< XDisplayConnection > xConn;
arguments.getConstArray()[0] >>= xConn;
if( xConn.is() )
@@ -107,8 +113,8 @@ Reference< XInterface > X11SalInstance::CreateClipboard( const Sequence< Any >&
nSelection = rManager.getAtom( OUString::createFromAscii( "CLIPBOARD" ) );
}
- ::std::hash_map< Atom, Reference< XClipboard > >& rMap( m_aInstances[ aDisplayName ] );
- ::std::hash_map< Atom, Reference< XClipboard > >::iterator it = rMap.find( nSelection );
+ ::std::hash_map< Atom, css::uno::Reference< XClipboard > >& rMap( m_aInstances[ aDisplayName ] );
+ ::std::hash_map< Atom, css::uno::Reference< XClipboard > >::iterator it = rMap.find( nSelection );
if( it != rMap.end() )
return it->second;
@@ -120,16 +126,16 @@ Reference< XInterface > X11SalInstance::CreateClipboard( const Sequence< Any >&
// ------------------------------------------------------------------------
-Reference< XInterface > X11SalInstance::CreateDragSource()
+css::uno::Reference< XInterface > X11SalInstance::CreateDragSource()
{
- return Reference < XInterface >( ( OWeakObject * ) new SelectionManagerHolder() );
+ return css::uno::Reference < XInterface >( ( OWeakObject * ) new SelectionManagerHolder() );
}
// ------------------------------------------------------------------------
-Reference< XInterface > X11SalInstance::CreateDropTarget()
+css::uno::Reference< XInterface > X11SalInstance::CreateDropTarget()
{
- return Reference < XInterface >( ( OWeakObject * ) new DropTarget() );
+ return css::uno::Reference < XInterface >( ( OWeakObject * ) new DropTarget() );
}
diff --git a/vcl/unx/source/dtrans/X11_transferable.hxx b/vcl/unx/source/dtrans/X11_transferable.hxx
index 57f0d6682cab..65f7d1fdc475 100644
--- a/vcl/unx/source/dtrans/X11_transferable.hxx
+++ b/vcl/unx/source/dtrans/X11_transferable.hxx
@@ -44,10 +44,10 @@ namespace x11 {
::osl::Mutex m_aMutex;
SelectionManager& m_rManager;
- Reference< XInterface > m_xCreator;
+ com::sun::star::uno::Reference< XInterface > m_xCreator;
Atom m_aSelection;
public:
- X11Transferable( SelectionManager& rManager, const Reference< XInterface >& xCreator, Atom selection = None );
+ X11Transferable( SelectionManager& rManager, const com::sun::star::uno::Reference< XInterface >& xCreator, Atom selection = None );
virtual ~X11Transferable();
/*
diff --git a/vcl/unx/source/fontmanager/fontmanager.cxx b/vcl/unx/source/fontmanager/fontmanager.cxx
index 21183dc567ec..d72692b86a65 100644
--- a/vcl/unx/source/fontmanager/fontmanager.cxx
+++ b/vcl/unx/source/fontmanager/fontmanager.cxx
@@ -87,6 +87,12 @@
#define PRINTER_METRICDIR "fontmetric"
+namespace {
+
+namespace css = com::sun::star;
+
+}
+
using namespace vcl;
using namespace utl;
using namespace psp;
@@ -3942,10 +3948,10 @@ bool PrintFontManager::readOverrideMetrics()
if( ! m_aOverrideFonts.empty() )
return false;
- Reference< XMultiServiceFactory > xFact( comphelper::getProcessServiceFactory() );
+ css::uno::Reference< XMultiServiceFactory > xFact( comphelper::getProcessServiceFactory() );
if( !xFact.is() )
return false;
- Reference< XMaterialHolder > xMat(
+ css::uno::Reference< XMaterialHolder > xMat(
xFact->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.psprint.CompatMetricOverride" ) ) ),
UNO_QUERY );
if( !xMat.is() )
diff --git a/vcl/unx/source/gdi/cdeint.cxx b/vcl/unx/source/gdi/cdeint.cxx
index caa4867af874..ee0054814761 100644
--- a/vcl/unx/source/gdi/cdeint.cxx
+++ b/vcl/unx/source/gdi/cdeint.cxx
@@ -231,9 +231,9 @@ void CDEIntegrator::GetSystemLook( AllSettings& rSettings )
{
// calculate Checked color
Color aColor2 = aStyleSettings.GetLightColor();
- BYTE nRed = (BYTE)(((USHORT)aColors[1].GetRed() + (USHORT)aColor2.GetRed())/2);
- BYTE nGreen = (BYTE)(((USHORT)aColors[1].GetGreen() + (USHORT)aColor2.GetGreen())/2);
- BYTE nBlue = (BYTE)(((USHORT)aColors[1].GetBlue() + (USHORT)aColor2.GetBlue())/2);
+ sal_uInt8 nRed = (sal_uInt8)(((sal_uInt16)aColors[1].GetRed() + (sal_uInt16)aColor2.GetRed())/2);
+ sal_uInt8 nGreen = (sal_uInt8)(((sal_uInt16)aColors[1].GetGreen() + (sal_uInt16)aColor2.GetGreen())/2);
+ sal_uInt8 nBlue = (sal_uInt8)(((sal_uInt16)aColors[1].GetBlue() + (sal_uInt16)aColor2.GetBlue())/2);
aStyleSettings.SetCheckedColor( Color( nRed, nGreen, nBlue ) );
}
}
diff --git a/vcl/unx/source/gdi/gcach_xpeer.cxx b/vcl/unx/source/gdi/gcach_xpeer.cxx
index a69a2426b519..9b876eb329b8 100644
--- a/vcl/unx/source/gdi/gcach_xpeer.cxx
+++ b/vcl/unx/source/gdi/gcach_xpeer.cxx
@@ -465,13 +465,13 @@ Pixmap X11GlyphPeer::GetPixmap( ServerFont& rServerFont, int nGlyphIndex, int nR
if( rServerFont.GetGlyphBitmap1( nGlyphIndex, maRawBitmap ) )
{
// #94666# circumvent bug in some X11 systems, e.g. XF410.LynxEM.v163
- ULONG nPixmapWidth = 8 * maRawBitmap.mnScanlineSize - 1;
+ sal_uLong nPixmapWidth = 8 * maRawBitmap.mnScanlineSize - 1;
nPixmapWidth = Max( nPixmapWidth, maRawBitmap.mnWidth );
rGlyphData.SetSize( Size( nPixmapWidth, maRawBitmap.mnHeight ) );
rGlyphData.SetOffset( +maRawBitmap.mnXOffset, +maRawBitmap.mnYOffset );
- const ULONG nBytes = maRawBitmap.mnHeight * maRawBitmap.mnScanlineSize;
+ const sal_uLong nBytes = maRawBitmap.mnHeight * maRawBitmap.mnScanlineSize;
if( nBytes > 0 )
{
// conversion table LSB<->MSB (for XCreatePixmapFromData)
@@ -621,7 +621,7 @@ Glyph X11GlyphPeer::GetGlyphId( ServerFont& rServerFont, int nGlyphIndex )
GlyphSet aGlyphSet = GetGlyphSet( rServerFont, -1 );
aGlyphId = nGlyphIndex & 0x00FFFFFF;
- const ULONG nBytes = maRawBitmap.mnScanlineSize * maRawBitmap.mnHeight;
+ const sal_uLong nBytes = maRawBitmap.mnScanlineSize * maRawBitmap.mnHeight;
XRenderPeer::GetInstance().AddGlyph( aGlyphSet, aGlyphId,
aGlyphInfo, (char*)maRawBitmap.mpBits, nBytes );
mnBytesUsed += nBytes;
diff --git a/vcl/unx/source/gdi/pspgraphics.cxx b/vcl/unx/source/gdi/pspgraphics.cxx
index bab78b0cb2df..f9a156c841fc 100644
--- a/vcl/unx/source/gdi/pspgraphics.cxx
+++ b/vcl/unx/source/gdi/pspgraphics.cxx
@@ -41,6 +41,7 @@
#include "vcl/svapp.hxx"
#include "vcl/salprn.hxx"
#include "vcl/sysdata.hxx"
+#include "vcl/region.h"
#include <stdlib.h>
#include <unistd.h>
@@ -278,7 +279,7 @@ void PspGraphics::GetResolution( sal_Int32 &rDPIX, sal_Int32 &rDPIY )
}
}
-USHORT PspGraphics::GetBitCount()
+sal_uInt16 PspGraphics::GetBitCount()
{
return m_pPrinterGfx->GetBitCount();
}
@@ -290,28 +291,27 @@ long PspGraphics::GetGraphicsWidth() const
void PspGraphics::ResetClipRegion()
{
- m_pPrinterGfx->ResetClipRegion ();
+ m_pPrinterGfx->ResetClipRegion();
}
-void PspGraphics::BeginSetClipRegion( ULONG n )
+bool PspGraphics::setClipRegion( const Region& i_rClip )
{
- m_pPrinterGfx->BeginSetClipRegion(n);
-}
-
-BOOL PspGraphics::unionClipRegion( long nX, long nY, long nDX, long nDY )
-{
- return (BOOL)m_pPrinterGfx->UnionClipRegion (nX, nY, nDX, nDY);
-}
-
-bool PspGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& )
-{
- // TODO: implement and advertise OutDevSupport_B2DClip support
- return false;
-}
+ // TODO: support polygonal clipregions here
+ m_pPrinterGfx->BeginSetClipRegion( i_rClip.GetRectCount() );
-void PspGraphics::EndSetClipRegion()
-{
- m_pPrinterGfx->EndSetClipRegion ();
+ ImplRegionInfo aInfo;
+ long nX, nY, nW, nH;
+ bool bRegionRect = i_rClip.ImplGetFirstRect(aInfo, nX, nY, nW, nH );
+ while( bRegionRect )
+ {
+ if ( nW && nH )
+ {
+ m_pPrinterGfx->UnionClipRegion( nX, nY, nW, nH );
+ }
+ bRegionRect = i_rClip.ImplGetNextRect( aInfo, nX, nY, nW, nH );
+ }
+ m_pPrinterGfx->EndSetClipRegion();
+ return true;
}
void PspGraphics::SetLineColor()
@@ -379,12 +379,12 @@ void PspGraphics::drawRect( long nX, long nY, long nDX, long nDY )
m_pPrinterGfx->DrawRect (Rectangle(Point(nX, nY), Size(nDX, nDY)));
}
-void PspGraphics::drawPolyLine( ULONG nPoints, const SalPoint *pPtAry )
+void PspGraphics::drawPolyLine( sal_uLong nPoints, const SalPoint *pPtAry )
{
m_pPrinterGfx->DrawPolyLine (nPoints, (Point*)pPtAry);
}
-void PspGraphics::drawPolygon( ULONG nPoints, const SalPoint* pPtAry )
+void PspGraphics::drawPolygon( sal_uLong nPoints, const SalPoint* pPtAry )
{
// Point must be equal to SalPoint! see vcl/inc/salgtype.hxx
m_pPrinterGfx->DrawPolygon (nPoints, (Point*)pPtAry);
@@ -409,13 +409,13 @@ bool PspGraphics::drawPolyLine( const basegfx::B2DPolygon&, double /*fTransparen
return false;
}
-sal_Bool PspGraphics::drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry )
+sal_Bool PspGraphics::drawPolyLineBezier( sal_uLong nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry )
{
m_pPrinterGfx->DrawPolyLineBezier (nPoints, (Point*)pPtAry, pFlgAry);
return sal_True;
}
-sal_Bool PspGraphics::drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry )
+sal_Bool PspGraphics::drawPolygonBezier( sal_uLong nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry )
{
m_pPrinterGfx->DrawPolygonBezier (nPoints, (Point*)pPtAry, pFlgAry);
return sal_True;
@@ -424,20 +424,20 @@ sal_Bool PspGraphics::drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry,
sal_Bool PspGraphics::drawPolyPolygonBezier( sal_uInt32 nPoly,
const sal_uInt32* pPoints,
const SalPoint* const* pPtAry,
- const BYTE* const* pFlgAry )
+ const sal_uInt8* const* pFlgAry )
{
// Point must be equal to SalPoint! see vcl/inc/salgtype.hxx
- m_pPrinterGfx->DrawPolyPolygonBezier (nPoly, pPoints, (Point**)pPtAry, (BYTE**)pFlgAry);
+ m_pPrinterGfx->DrawPolyPolygonBezier (nPoly, pPoints, (Point**)pPtAry, (sal_uInt8**)pFlgAry);
return sal_True;
}
-void PspGraphics::invert( ULONG,
+void PspGraphics::invert( sal_uLong,
const SalPoint*,
SalInvert )
{
DBG_ASSERT( 0, "Error: PrinterGfx::Invert() not implemented" );
}
-BOOL PspGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize )
+sal_Bool PspGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uLong nSize )
{
return m_pPrinterGfx->DrawEPS( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ), pPtr, nSize );
}
@@ -448,7 +448,7 @@ void PspGraphics::copyBits( const SalTwoRect*,
DBG_ERROR( "Error: PrinterGfx::CopyBits() not implemented" );
}
-void PspGraphics::copyArea ( long,long,long,long,long,long,USHORT )
+void PspGraphics::copyArea ( long,long,long,long,long,long,sal_uInt16 )
{
DBG_ERROR( "Error: PrinterGfx::CopyArea() not implemented" );
}
@@ -784,7 +784,7 @@ const ImplFontCharMap* PspGraphics::GetImplFontCharMap() const
return pIFCMap;
}
-USHORT PspGraphics::SetFont( ImplFontSelectData *pEntry, int nFallbackLevel )
+sal_uInt16 PspGraphics::SetFont( ImplFontSelectData *pEntry, int nFallbackLevel )
{
// release all fonts that are to be overridden
for( int i = nFallbackLevel; i < MAX_FALLBACK; ++i )
@@ -915,10 +915,10 @@ void PspGraphics::GetFontMetric( ImplFontMetricData *pMetric, int )
}
}
-ULONG PspGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData *pKernPairs )
+sal_uLong PspGraphics::GetKernPairs( sal_uLong nPairs, ImplKernPairData *pKernPairs )
{
const ::std::list< ::psp::KernPair >& rPairs( m_pPrinterGfx->getKernPairs() );
- ULONG nHavePairs = rPairs.size();
+ sal_uLong nHavePairs = rPairs.size();
if( pKernPairs && nPairs )
{
::std::list< ::psp::KernPair >::const_iterator it;
@@ -937,38 +937,38 @@ ULONG PspGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData *pKernPairs )
return nHavePairs;
}
-BOOL PspGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect )
+sal_Bool PspGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect )
{
int nLevel = nGlyphIndex >> GF_FONTSHIFT;
if( nLevel >= MAX_FALLBACK )
- return FALSE;
+ return sal_False;
ServerFont* pSF = m_pServerFont[ nLevel ];
if( !pSF )
- return FALSE;
+ return sal_False;
nGlyphIndex &= ~GF_FONTMASK;
const GlyphMetric& rGM = pSF->GetGlyphMetric( nGlyphIndex );
rRect = Rectangle( rGM.GetOffset(), rGM.GetSize() );
- return TRUE;
+ return sal_True;
}
-BOOL PspGraphics::GetGlyphOutline( long nGlyphIndex,
+sal_Bool PspGraphics::GetGlyphOutline( long nGlyphIndex,
::basegfx::B2DPolyPolygon& rB2DPolyPoly )
{
int nLevel = nGlyphIndex >> GF_FONTSHIFT;
if( nLevel >= MAX_FALLBACK )
- return FALSE;
+ return sal_False;
ServerFont* pSF = m_pServerFont[ nLevel ];
if( !pSF )
- return FALSE;
+ return sal_False;
nGlyphIndex &= ~GF_FONTMASK;
if( pSF->GetGlyphOutline( nGlyphIndex, rB2DPolyPoly ) )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
SalLayout* PspGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLevel )
@@ -1007,7 +1007,7 @@ SalLayout* PspGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLevel
//--------------------------------------------------------------------------
-BOOL PspGraphics::CreateFontSubset(
+sal_Bool PspGraphics::CreateFontSubset(
const rtl::OUString& rToFile,
const ImplFontData* pFont,
sal_Int32* pGlyphIDs,
@@ -1402,9 +1402,9 @@ bool PspGraphics::filterText( const String& rOrig, String& rNewText, xub_StrLen
bool bRet = false;
bool bStarted = false;
bool bStopped = false;
- USHORT nPos;
- USHORT nStart = 0;
- USHORT nStop = rLen;
+ sal_uInt16 nPos;
+ sal_uInt16 nStart = 0;
+ sal_uInt16 nStop = rLen;
String aPhone = rOrig.Copy( nIndex, rLen );
if( ! m_bPhoneCollectionActive )
diff --git a/vcl/unx/source/gdi/salbmp.cxx b/vcl/unx/source/gdi/salbmp.cxx
index cc7934b0a798..42d657b431bd 100644
--- a/vcl/unx/source/gdi/salbmp.cxx
+++ b/vcl/unx/source/gdi/salbmp.cxx
@@ -64,7 +64,7 @@ SalBitmap* X11SalInstance::CreateSalBitmap()
}
ImplSalBitmapCache* X11SalBitmap::mpCache = NULL;
-ULONG X11SalBitmap::mnCacheInstCount = 0;
+sal_uLong X11SalBitmap::mnCacheInstCount = 0;
// -----------------------------------------------------------------------------
@@ -109,7 +109,7 @@ void X11SalBitmap::ImplRemovedFromCache()
// -----------------------------------------------------------------------------
-BitmapBuffer* X11SalBitmap::ImplCreateDIB( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal )
+BitmapBuffer* X11SalBitmap::ImplCreateDIB( const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal )
{
DBG_ASSERT( nBitCount == 1 || nBitCount == 4 || nBitCount == 8 || nBitCount == 16 || nBitCount == 24, "Unsupported BitCount!" );
@@ -128,7 +128,7 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB( const Size& rSize, USHORT nBitCount,
if( pDIB )
{
- const USHORT nColors = ( nBitCount <= 8 ) ? ( 1 << nBitCount ) : 0;
+ const sal_uInt16 nColors = ( nBitCount <= 8 ) ? ( 1 << nBitCount ) : 0;
pDIB->mnFormat = BMP_FORMAT_BOTTOM_UP;
@@ -169,7 +169,7 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB( const Size& rSize, USHORT nBitCount,
try
{
- pDIB->mpBits = new BYTE[ pDIB->mnScanlineSize * pDIB->mnHeight ];
+ pDIB->mpBits = new sal_uInt8[ pDIB->mnScanlineSize * pDIB->mnHeight ];
}
catch(std::bad_alloc&)
{
@@ -214,7 +214,7 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB( Drawable aDrawable,
{
const SalTwoRect aTwoRect = { 0, 0, nWidth, nHeight, 0, 0, nWidth, nHeight };
BitmapBuffer aSrcBuf;
- ULONG nDstFormat = BMP_FORMAT_BOTTOM_UP;
+ sal_uLong nDstFormat = BMP_FORMAT_BOTTOM_UP;
const BitmapPalette* pDstPal = NULL;
aSrcBuf.mnFormat = BMP_FORMAT_TOP_DOWN;
@@ -222,7 +222,7 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB( Drawable aDrawable,
aSrcBuf.mnHeight = nHeight;
aSrcBuf.mnBitCount = pImage->bits_per_pixel;
aSrcBuf.mnScanlineSize = pImage->bytes_per_line;
- aSrcBuf.mpBits = (BYTE*) pImage->data;
+ aSrcBuf.mpBits = (sal_uInt8*) pImage->data;
pImage->red_mask = pSalDisp->GetVisual( nScreen ).red_mask;
pImage->green_mask = pSalDisp->GetVisual( nScreen ).green_mask;
@@ -304,12 +304,12 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB( Drawable aDrawable,
else if( aSrcBuf.mnBitCount <= 8 )
{
const SalColormap& rColMap = pSalDisp->GetColormap( nScreen );
- const USHORT nCols = Min( (ULONG)rColMap.GetUsed(), (ULONG)(1 << nDrawableDepth) );
+ const sal_uInt16 nCols = Min( (sal_uLong)rColMap.GetUsed(), (sal_uLong)(1 << nDrawableDepth) );
rPal.SetEntryCount( nCols );
pDstPal = &rPal;
- for( USHORT i = 0; i < nCols; i++ )
+ for( sal_uInt16 i = 0; i < nCols; i++ )
{
const SalColor nColor( rColMap.GetColor( i ) );
BitmapColor& rBmpCol = rPal[ i ];
@@ -363,7 +363,7 @@ XImage* X11SalBitmap::ImplCreateXImage( SalDisplay *pSalDisp, int nScreen, long
if( pImage )
{
BitmapBuffer* pDstBuf;
- ULONG nDstFormat = BMP_FORMAT_TOP_DOWN;
+ sal_uLong nDstFormat = BMP_FORMAT_TOP_DOWN;
BitmapPalette* pPal = NULL;
ColorMask* pMask = NULL;
@@ -430,11 +430,11 @@ XImage* X11SalBitmap::ImplCreateXImage( SalDisplay *pSalDisp, int nScreen, long
else if( pImage->depth <= 8 )
{
const SalColormap& rColMap = pSalDisp->GetColormap( nScreen );
- const USHORT nCols = Min( (ULONG)rColMap.GetUsed(), (ULONG)(1 << pImage->depth) );
+ const sal_uInt16 nCols = Min( (sal_uLong)rColMap.GetUsed(), (sal_uLong)(1 << pImage->depth) );
pPal = new BitmapPalette( nCols );
- for( USHORT i = 0; i < nCols; i++ )
+ for( sal_uInt16 i = 0; i < nCols; i++ )
{
const SalColor nColor( rColMap.GetColor( i ) );
BitmapColor& rBmpCol = (*pPal)[ i ];
@@ -683,7 +683,7 @@ void X11SalBitmap::ImplDraw( Drawable aDrawable,
// -----------------------------------------------------------------------------
-bool X11SalBitmap::Create( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal )
+bool X11SalBitmap::Create( const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal )
{
Destroy();
mpDIB = ImplCreateDIB( rSize, nBitCount, rPal );
@@ -706,7 +706,7 @@ bool X11SalBitmap::Create( const SalBitmap& rSSalBmp )
// TODO: get rid of this when BitmapBuffer gets copy constructor
try
{
- mpDIB->mpBits = new BYTE[ mpDIB->mnScanlineSize * mpDIB->mnHeight ];
+ mpDIB->mpBits = new sal_uInt8[ mpDIB->mnScanlineSize * mpDIB->mnHeight ];
}
catch( std::bad_alloc& )
{
@@ -732,14 +732,14 @@ bool X11SalBitmap::Create( const SalBitmap& rSSalBmp )
bool X11SalBitmap::Create( const SalBitmap&, SalGraphics* )
{
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------------
-bool X11SalBitmap::Create( const SalBitmap&, USHORT )
+bool X11SalBitmap::Create( const SalBitmap&, sal_uInt16 )
{
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------------
@@ -775,9 +775,9 @@ Size X11SalBitmap::GetSize() const
// -----------------------------------------------------------------------------
-USHORT X11SalBitmap::GetBitCount() const
+sal_uInt16 X11SalBitmap::GetBitCount() const
{
- USHORT nBitCount;
+ sal_uInt16 nBitCount;
if( mpDIB )
nBitCount = mpDIB->mnBitCount;
@@ -954,7 +954,7 @@ ImplSalDDB::~ImplSalDDB()
bool ImplSalDDB::ImplMatches( int nScreen, long nDepth, const SalTwoRect& rTwoRect ) const
{
- bool bRet = FALSE;
+ bool bRet = sal_False;
if( ( maPixmap != 0 ) && ( ( mnDepth == nDepth ) || ( 1 == mnDepth ) ) && nScreen == mnScreen)
{
@@ -963,7 +963,7 @@ bool ImplSalDDB::ImplMatches( int nScreen, long nDepth, const SalTwoRect& rTwoRe
rTwoRect.mnDestWidth == maTwoRect.mnDestWidth && rTwoRect.mnDestHeight == maTwoRect.mnDestHeight )
{
// absolutely indentically
- bRet = TRUE;
+ bRet = sal_True;
}
else if( rTwoRect.mnSrcWidth == rTwoRect.mnDestWidth && rTwoRect.mnSrcHeight == rTwoRect.mnDestHeight &&
maTwoRect.mnSrcWidth == maTwoRect.mnDestWidth && maTwoRect.mnSrcHeight == maTwoRect.mnDestHeight &&
@@ -971,7 +971,7 @@ bool ImplSalDDB::ImplMatches( int nScreen, long nDepth, const SalTwoRect& rTwoRe
( rTwoRect.mnSrcX + rTwoRect.mnSrcWidth ) <= ( maTwoRect.mnSrcX + maTwoRect.mnSrcWidth ) &&
( rTwoRect.mnSrcY + rTwoRect.mnSrcHeight ) <= ( maTwoRect.mnSrcY + maTwoRect.mnSrcHeight ) )
{
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -1018,10 +1018,10 @@ void ImplSalDDB::ImplDraw( Drawable aSrcDrawable, long nSrcDrawableDepth,
struct ImplBmpObj
{
X11SalBitmap* mpBmp;
- ULONG mnMemSize;
- ULONG mnFlags;
+ sal_uLong mnMemSize;
+ sal_uLong mnFlags;
- ImplBmpObj( X11SalBitmap* pBmp, ULONG nMemSize, ULONG nFlags ) :
+ ImplBmpObj( X11SalBitmap* pBmp, sal_uLong nMemSize, sal_uLong nFlags ) :
mpBmp( pBmp ), mnMemSize( nMemSize ), mnFlags( nFlags ) {}
};
@@ -1041,14 +1041,14 @@ ImplSalBitmapCache::~ImplSalBitmapCache()
// -----------------------------------------------------------------------------
-void ImplSalBitmapCache::ImplAdd( X11SalBitmap* pBmp, ULONG nMemSize, ULONG nFlags )
+void ImplSalBitmapCache::ImplAdd( X11SalBitmap* pBmp, sal_uLong nMemSize, sal_uLong nFlags )
{
ImplBmpObj* pObj;
- bool bFound = FALSE;
+ bool bFound = sal_False;
for( pObj = (ImplBmpObj*) maBmpList.Last(); pObj && !bFound; pObj = (ImplBmpObj*) maBmpList.Prev() )
if( pObj->mpBmp == pBmp )
- bFound = TRUE;
+ bFound = sal_True;
mnTotalSize += nMemSize;
diff --git a/vcl/unx/source/gdi/salgdi.cxx b/vcl/unx/source/gdi/salgdi.cxx
index 9dfbfff22d03..dc1ec968d859 100644
--- a/vcl/unx/source/gdi/salgdi.cxx
+++ b/vcl/unx/source/gdi/salgdi.cxx
@@ -40,6 +40,7 @@
#include "vcl/printergfx.hxx"
#include "vcl/jobdata.hxx"
+#include "vcl/region.h"
#include "tools/debug.hxx"
@@ -67,21 +68,21 @@ class SalPolyLine
XPoint Points_[STATIC_POINTS];
XPoint *pFirst_;
public:
- inline SalPolyLine( ULONG nPoints );
- inline SalPolyLine( ULONG nPoints, const SalPoint *p );
+ inline SalPolyLine( sal_uLong nPoints );
+ inline SalPolyLine( sal_uLong nPoints, const SalPoint *p );
inline ~SalPolyLine();
- inline XPoint &operator [] ( ULONG n ) const
+ inline XPoint &operator [] ( sal_uLong n ) const
{ return pFirst_[n]; }
};
-inline SalPolyLine::SalPolyLine( ULONG nPoints )
+inline SalPolyLine::SalPolyLine( sal_uLong nPoints )
: pFirst_( nPoints+1 > STATIC_POINTS ? new XPoint[nPoints+1] : Points_ )
{}
-inline SalPolyLine::SalPolyLine( ULONG nPoints, const SalPoint *p )
+inline SalPolyLine::SalPolyLine( sal_uLong nPoints, const SalPoint *p )
: pFirst_( nPoints+1 > STATIC_POINTS ? new XPoint[nPoints+1] : Points_ )
{
- for( ULONG i = 0; i < nPoints; i++ )
+ for( sal_uLong i = 0; i < nPoints; i++ )
{
pFirst_[i].x = (short)p[i].mnX;
pFirst_[i].y = (short)p[i].mnY;
@@ -104,7 +105,7 @@ X11SalGraphics::X11SalGraphics()
m_aRenderPicture = 0;
m_pRenderFormat = NULL;
- pClipRegion_ = NULL;
+ mpClipRegion = NULL;
pPaintRegion_ = NULL;
pPenGC_ = NULL;
@@ -121,7 +122,7 @@ X11SalGraphics::X11SalGraphics()
#ifdef ENABLE_GRAPHITE
// check if graphite fonts have been disabled
static const char* pDisableGraphiteStr = getenv( "SAL_DISABLE_GRAPHITE" );
- bDisableGraphite_ = pDisableGraphiteStr ? (pDisableGraphiteStr[0]!='0') : FALSE;
+ bDisableGraphite_ = pDisableGraphiteStr ? (pDisableGraphiteStr[0]!='0') : sal_False;
#endif
pBrushGC_ = NULL;
@@ -137,20 +138,20 @@ X11SalGraphics::X11SalGraphics()
pStippleGC_ = NULL;
pTrackingGC_ = NULL;
- bWindow_ = FALSE;
- bPrinter_ = FALSE;
- bVirDev_ = FALSE;
- bPenGC_ = FALSE;
- bFontGC_ = FALSE;
- bBrushGC_ = FALSE;
- bMonoGC_ = FALSE;
- bCopyGC_ = FALSE;
- bInvertGC_ = FALSE;
- bInvert50GC_ = FALSE;
- bStippleGC_ = FALSE;
- bTrackingGC_ = FALSE;
- bXORMode_ = FALSE;
- bDitherBrush_ = FALSE;
+ bWindow_ = sal_False;
+ bPrinter_ = sal_False;
+ bVirDev_ = sal_False;
+ bPenGC_ = sal_False;
+ bFontGC_ = sal_False;
+ bBrushGC_ = sal_False;
+ bMonoGC_ = sal_False;
+ bCopyGC_ = sal_False;
+ bInvertGC_ = sal_False;
+ bInvert50GC_ = sal_False;
+ bStippleGC_ = sal_False;
+ bTrackingGC_ = sal_False;
+ bXORMode_ = sal_False;
+ bDitherBrush_ = sal_False;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -167,7 +168,7 @@ void X11SalGraphics::freeResources()
Display *pDisplay = GetXDisplay();
DBG_ASSERT( !pPaintRegion_, "pPaintRegion_" );
- if( pClipRegion_ ) XDestroyRegion( pClipRegion_ ), pClipRegion_ = None;
+ if( mpClipRegion ) XDestroyRegion( mpClipRegion ), mpClipRegion = None;
if( hBrush_ ) XFreePixmap( pDisplay, hBrush_ ), hBrush_ = None;
if( pPenGC_ ) XFreeGC( pDisplay, pPenGC_ ), pPenGC_ = None;
@@ -238,7 +239,7 @@ void X11SalGraphics::Init( SalFrame *pFrame, Drawable aTarget, int nScreen )
SetDrawable( aTarget, nScreen );
#endif
- bWindow_ = TRUE;
+ bWindow_ = sal_True;
m_pFrame = pFrame;
m_pVDev = NULL;
}
@@ -257,8 +258,8 @@ void X11SalGraphics::SetClipRegion( GC pGC, XLIB_Region pXReg ) const
int n = 0;
XLIB_Region Regions[3];
- if( pClipRegion_ /* && !XEmptyRegion( pClipRegion_ ) */ )
- Regions[n++] = pClipRegion_;
+ if( mpClipRegion /* && !XEmptyRegion( mpClipRegion ) */ )
+ Regions[n++] = mpClipRegion;
// if( pPaintRegion_ /* && !XEmptyRegion( pPaintRegion_ ) */ )
// Regions[n++] = pPaintRegion_;
@@ -303,7 +304,7 @@ GC X11SalGraphics::SelectPen()
XSetForeground( pDisplay, pPenGC_, nPenPixel_ );
XSetFunction ( pDisplay, pPenGC_, bXORMode_ ? GXxor : GXcopy );
SetClipRegion( pPenGC_ );
- bPenGC_ = TRUE;
+ bPenGC_ = sal_True;
}
return pPenGC_;
@@ -351,7 +352,7 @@ GC X11SalGraphics::SelectBrush()
XSetFunction ( pDisplay, pBrushGC_, bXORMode_ ? GXxor : GXcopy );
SetClipRegion( pBrushGC_ );
- bBrushGC_ = TRUE;
+ bBrushGC_ = sal_True;
}
return pBrushGC_;
@@ -383,26 +384,26 @@ GC X11SalGraphics::GetTrackingGC()
if( !bTrackingGC_ )
{
SetClipRegion( pTrackingGC_ );
- bTrackingGC_ = TRUE;
+ bTrackingGC_ = sal_True;
}
return pTrackingGC_;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void X11SalGraphics::DrawLines( ULONG nPoints,
+void X11SalGraphics::DrawLines( sal_uLong nPoints,
const SalPolyLine &rPoints,
GC pGC,
bool bClose
)
{
// errechne wie viele Linien XWindow auf einmal zeichnen kann
- ULONG nMaxLines = (GetDisplay()->GetMaxRequestSize() - sizeof(xPolyPointReq))
+ sal_uLong nMaxLines = (GetDisplay()->GetMaxRequestSize() - sizeof(xPolyPointReq))
/ sizeof(xPoint);
if( nMaxLines > nPoints ) nMaxLines = nPoints;
// gebe alle Linien aus, die XWindows zeichnen kann.
- ULONG n;
+ sal_uLong n;
for( n = 0; nPoints - n > nMaxLines; n += nMaxLines - 1 )
XDrawLines( GetXDisplay(),
GetDrawable(),
@@ -446,24 +447,24 @@ BOOL X11SalGraphics::GetDitherPixmap( SalColor nSalColor )
// test for correct depth (8bit)
if( GetColormap().GetVisual().GetDepth() != 8 )
- return FALSE;
+ return sal_False;
char pBits[64];
char *pBitsPtr = pBits;
// Set the pallette-entries for the dithering tile
- UINT8 nSalColorRed = SALCOLOR_RED ( nSalColor );
- UINT8 nSalColorGreen = SALCOLOR_GREEN ( nSalColor );
- UINT8 nSalColorBlue = SALCOLOR_BLUE ( nSalColor );
+ sal_uInt8 nSalColorRed = SALCOLOR_RED ( nSalColor );
+ sal_uInt8 nSalColorGreen = SALCOLOR_GREEN ( nSalColor );
+ sal_uInt8 nSalColorBlue = SALCOLOR_BLUE ( nSalColor );
for( int nY = 0; nY < 8; nY++ )
{
for( int nX = 0; nX < 8; nX++ )
{
short nMagic = nOrdDither8Bit[nY][nX];
- UINT8 nR = P_DELTA * DMAP( nSalColorRed, nMagic );
- UINT8 nG = P_DELTA * DMAP( nSalColorGreen, nMagic );
- UINT8 nB = P_DELTA * DMAP( nSalColorBlue, nMagic );
+ sal_uInt8 nR = P_DELTA * DMAP( nSalColorRed, nMagic );
+ sal_uInt8 nG = P_DELTA * DMAP( nSalColorGreen, nMagic );
+ sal_uInt8 nB = P_DELTA * DMAP( nSalColorBlue, nMagic );
*pBitsPtr++ = GetColormap().GetPixel( MAKE_SALCOLOR( nR, nG, nB ) );
}
@@ -503,7 +504,7 @@ BOOL X11SalGraphics::GetDitherPixmap( SalColor nSalColor )
pImage->data = NULL;
XDestroyImage( pImage );
- return TRUE;
+ return sal_True;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -541,7 +542,7 @@ void X11SalGraphics::GetResolution( sal_Int32 &rDPIX, sal_Int32 &rDPIY ) // cons
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-USHORT X11SalGraphics::GetBitCount() // const
+sal_uInt16 X11SalGraphics::GetBitCount() // const
{
return GetVisual().GetDepth();
}
@@ -571,73 +572,64 @@ long X11SalGraphics::GetGraphicsHeight() const
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
void X11SalGraphics::ResetClipRegion()
{
- if( pClipRegion_ )
+ if( mpClipRegion )
{
- bPenGC_ = FALSE;
- bFontGC_ = FALSE;
- bBrushGC_ = FALSE;
- bMonoGC_ = FALSE;
- bCopyGC_ = FALSE;
- bInvertGC_ = FALSE;
- bInvert50GC_ = FALSE;
- bStippleGC_ = FALSE;
- bTrackingGC_ = FALSE;
-
- XDestroyRegion( pClipRegion_ );
- pClipRegion_ = NULL;
+ bPenGC_ = sal_False;
+ bFontGC_ = sal_False;
+ bBrushGC_ = sal_False;
+ bMonoGC_ = sal_False;
+ bCopyGC_ = sal_False;
+ bInvertGC_ = sal_False;
+ bInvert50GC_ = sal_False;
+ bStippleGC_ = sal_False;
+ bTrackingGC_ = sal_False;
+
+ XDestroyRegion( mpClipRegion );
+ mpClipRegion = NULL;
}
}
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void X11SalGraphics::BeginSetClipRegion( ULONG )
-{
- if( pClipRegion_ )
- XDestroyRegion( pClipRegion_ );
- pClipRegion_ = XCreateRegion();
-}
-
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-BOOL X11SalGraphics::unionClipRegion( long nX, long nY, long nDX, long nDY )
+bool X11SalGraphics::setClipRegion( const Region& i_rClip )
{
- if (!nDX || !nDY)
- return TRUE;
-
- XRectangle aRect;
- aRect.x = (short)nX;
- aRect.y = (short)nY;
- aRect.width = (unsigned short)nDX;
- aRect.height = (unsigned short)nDY;
-
- XUnionRectWithRegion( &aRect, pClipRegion_, pClipRegion_ );
-
- return TRUE;
-}
+ if( mpClipRegion )
+ XDestroyRegion( mpClipRegion );
+ mpClipRegion = XCreateRegion();
+
+ ImplRegionInfo aInfo;
+ long nX, nY, nW, nH;
+ bool bRegionRect = i_rClip.ImplGetFirstRect(aInfo, nX, nY, nW, nH );
+ while( bRegionRect )
+ {
+ if ( nW && nH )
+ {
+ XRectangle aRect;
+ aRect.x = (short)nX;
+ aRect.y = (short)nY;
+ aRect.width = (unsigned short)nW;
+ aRect.height = (unsigned short)nH;
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-bool X11SalGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& )
-{
- // TODO: implement and advertise OutDevSupport_B2DClip support
- return false;
-}
+ XUnionRectWithRegion( &aRect, mpClipRegion, mpClipRegion );
+ }
+ bRegionRect = i_rClip.ImplGetNextRect( aInfo, nX, nY, nW, nH );
+ }
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void X11SalGraphics::EndSetClipRegion()
-{
- bPenGC_ = FALSE;
- bFontGC_ = FALSE;
- bBrushGC_ = FALSE;
- bMonoGC_ = FALSE;
- bCopyGC_ = FALSE;
- bInvertGC_ = FALSE;
- bInvert50GC_ = FALSE;
- bStippleGC_ = FALSE;
- bTrackingGC_ = FALSE;
-
- if( XEmptyRegion( pClipRegion_ ) )
+ // done, invalidate GCs
+ bPenGC_ = sal_False;
+ bFontGC_ = sal_False;
+ bBrushGC_ = sal_False;
+ bMonoGC_ = sal_False;
+ bCopyGC_ = sal_False;
+ bInvertGC_ = sal_False;
+ bInvert50GC_ = sal_False;
+ bStippleGC_ = sal_False;
+ bTrackingGC_ = sal_False;
+
+ if( XEmptyRegion( mpClipRegion ) )
{
- XDestroyRegion( pClipRegion_ );
- pClipRegion_= NULL;
+ XDestroyRegion( mpClipRegion );
+ mpClipRegion= NULL;
}
+ return true;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -646,7 +638,7 @@ void X11SalGraphics::SetLineColor()
if( nPenColor_ != SALCOLOR_NONE )
{
nPenColor_ = SALCOLOR_NONE;
- bPenGC_ = FALSE;
+ bPenGC_ = sal_False;
}
}
@@ -657,7 +649,7 @@ void X11SalGraphics::SetLineColor( SalColor nSalColor )
{
nPenColor_ = nSalColor;
nPenPixel_ = GetPixel( nSalColor );
- bPenGC_ = FALSE;
+ bPenGC_ = sal_False;
}
}
@@ -666,9 +658,9 @@ void X11SalGraphics::SetFillColor()
{
if( nBrushColor_ != SALCOLOR_NONE )
{
- bDitherBrush_ = FALSE;
+ bDitherBrush_ = sal_False;
nBrushColor_ = SALCOLOR_NONE;
- bBrushGC_ = FALSE;
+ bBrushGC_ = sal_False;
}
}
@@ -677,7 +669,7 @@ void X11SalGraphics::SetFillColor( SalColor nSalColor )
{
if( nBrushColor_ != nSalColor )
{
- bDitherBrush_ = FALSE;
+ bDitherBrush_ = sal_False;
nBrushColor_ = nSalColor;
nBrushPixel_ = GetPixel( nSalColor );
if( TrueColor != GetColormap().GetVisual().GetClass()
@@ -699,7 +691,7 @@ void X11SalGraphics::SetFillColor( SalColor nSalColor )
&& nSalColor != MAKE_SALCOLOR( 0xFF, 0xFF, 0x00 ) // light brown
&& nSalColor != MAKE_SALCOLOR( 0xFF, 0xFF, 0xFF ) )
bDitherBrush_ = GetDitherPixmap(nSalColor);
- bBrushGC_ = FALSE;
+ bBrushGC_ = sal_False;
}
}
@@ -719,7 +711,7 @@ void X11SalGraphics::SetROPLineColor( SalROPColor nROPColor )
break;
}
nPenColor_ = GetColormap().GetColor( nPenPixel_ );
- bPenGC_ = FALSE;
+ bPenGC_ = sal_False;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -737,9 +729,9 @@ void X11SalGraphics::SetROPFillColor( SalROPColor nROPColor )
nBrushPixel_ = (Pixel)(1 << GetVisual().GetDepth()) - 1;
break;
}
- bDitherBrush_ = FALSE;
+ bDitherBrush_ = sal_False;
nBrushColor_ = GetColormap().GetColor( nBrushPixel_ );
- bBrushGC_ = FALSE;
+ bBrushGC_ = sal_False;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -748,15 +740,15 @@ void X11SalGraphics::SetXORMode( bool bSet, bool )
if( !bXORMode_ == bSet )
{
bXORMode_ = bSet;
- bPenGC_ = FALSE;
- bFontGC_ = FALSE;
- bBrushGC_ = FALSE;
- bMonoGC_ = FALSE;
- bCopyGC_ = FALSE;
- bInvertGC_ = FALSE;
- bInvert50GC_ = FALSE;
- bStippleGC_ = FALSE;
- bTrackingGC_ = FALSE;
+ bPenGC_ = sal_False;
+ bFontGC_ = sal_False;
+ bBrushGC_ = sal_False;
+ bMonoGC_ = sal_False;
+ bCopyGC_ = sal_False;
+ bInvertGC_ = sal_False;
+ bInvert50GC_ = sal_False;
+ bStippleGC_ = sal_False;
+ bTrackingGC_ = sal_False;
}
}
@@ -832,13 +824,13 @@ void X11SalGraphics::drawRect( long nX, long nY, long nDX, long nDY )
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void X11SalGraphics::drawPolyLine( ULONG nPoints, const SalPoint *pPtAry )
+void X11SalGraphics::drawPolyLine( sal_uLong nPoints, const SalPoint *pPtAry )
{
drawPolyLine( nPoints, pPtAry, false );
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void X11SalGraphics::drawPolyLine( ULONG nPoints, const SalPoint *pPtAry, bool bClose )
+void X11SalGraphics::drawPolyLine( sal_uLong nPoints, const SalPoint *pPtAry, bool bClose )
{
if( nPenColor_ != 0xFFFFFFFF )
{
@@ -849,7 +841,7 @@ void X11SalGraphics::drawPolyLine( ULONG nPoints, const SalPoint *pPtAry, bool b
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void X11SalGraphics::drawPolygon( ULONG nPoints, const SalPoint* pPtAry )
+void X11SalGraphics::drawPolygon( sal_uLong nPoints, const SalPoint* pPtAry )
{
if( nPoints == 0 )
return;
@@ -922,7 +914,7 @@ void X11SalGraphics::drawPolyPolygon( sal_uInt32 nPoly,
{
if( nBrushColor_ != SALCOLOR_NONE )
{
- ULONG i, n;
+ sal_uInt32 i, n;
XLIB_Region pXRegA = NULL;
for( i = 0; i < nPoly; i++ ) {
@@ -949,7 +941,7 @@ void X11SalGraphics::drawPolyPolygon( sal_uInt32 nPoly,
GC pGC = SelectBrush();
SetClipRegion( pGC, pXRegA ); // ??? doppelt
XDestroyRegion( pXRegA );
- bBrushGC_ = FALSE;
+ bBrushGC_ = sal_False;
XFillRectangle( GetXDisplay(),
GetDrawable(),
@@ -959,20 +951,20 @@ void X11SalGraphics::drawPolyPolygon( sal_uInt32 nPoly,
}
if( nPenColor_ != SALCOLOR_NONE )
- for( ULONG i = 0; i < nPoly; i++ )
+ for( sal_uInt32 i = 0; i < nPoly; i++ )
drawPolyLine( pPoints[i], pPtAry[i], true );
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-sal_Bool X11SalGraphics::drawPolyLineBezier( ULONG, const SalPoint*, const BYTE* )
+sal_Bool X11SalGraphics::drawPolyLineBezier( sal_uLong, const SalPoint*, const BYTE* )
{
return sal_False;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-sal_Bool X11SalGraphics::drawPolygonBezier( ULONG, const SalPoint*, const BYTE* )
+sal_Bool X11SalGraphics::drawPolygonBezier( sal_uLong, const SalPoint*, const BYTE* )
{
return sal_False;
}
@@ -987,7 +979,7 @@ sal_Bool X11SalGraphics::drawPolyPolygonBezier( sal_uInt32, const sal_uInt32*,
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void X11SalGraphics::invert( ULONG nPoints,
+void X11SalGraphics::invert( sal_uLong nPoints,
const SalPoint* pPtAry,
SalInvert nFlags )
{
@@ -1014,9 +1006,9 @@ void X11SalGraphics::invert( ULONG nPoints,
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-BOOL X11SalGraphics::drawEPS( long,long,long,long,void*,ULONG )
+BOOL X11SalGraphics::drawEPS( long,long,long,long,void*,sal_uLong )
{
- return FALSE;
+ return sal_False;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -1047,8 +1039,8 @@ XID X11SalGraphics::GetXRenderPicture()
#if 0
// setup clipping so the callers don't have to do it themselves
// TODO: avoid clipping if already set correctly
- if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) )
- rRenderPeer.SetPictureClipRegion( aDstPic, pClipRegion_ );
+ if( mpClipRegion && !XEmptyRegion( mpClipRegion ) )
+ rRenderPeer.SetPictureClipRegion( aDstPic, mpClipRegion );
else
#endif
{
@@ -1087,22 +1079,22 @@ bool X11SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rOrigPoly
// nothing to do for empty polypolygons
const int nOrigPolyCount = rOrigPolyPoly.count();
if( nOrigPolyCount <= 0 )
- return TRUE;
+ return sal_True;
// nothing to do if everything is transparent
if( (nBrushColor_ == SALCOLOR_NONE)
&& (nPenColor_ == SALCOLOR_NONE) )
- return TRUE;
+ return sal_True;
// cannot handle pencolor!=brushcolor yet
if( (nPenColor_ != SALCOLOR_NONE)
&& (nPenColor_ != nBrushColor_) )
- return FALSE;
+ return sal_False;
// TODO: remove the env-variable when no longer needed
static const char* pRenderEnv = getenv( "SAL_DISABLE_RENDER_POLY" );
if( pRenderEnv )
- return FALSE;
+ return sal_False;
// snap to raster if requested
basegfx::B2DPolyPolygon aPolyPoly = rOrigPolyPoly;
@@ -1185,8 +1177,8 @@ bool X11SalGraphics::drawFilledTrapezoids( const ::basegfx::B2DTrapezoid* pB2DTr
// set clipping
// TODO: move into GetXRenderPicture?
- if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) )
- rRenderPeer.SetPictureClipRegion( aDstPic, pClipRegion_ );
+ if( mpClipRegion && !XEmptyRegion( mpClipRegion ) )
+ rRenderPeer.SetPictureClipRegion( aDstPic, mpClipRegion );
// render the trapezoids
const XRenderPictFormat* pMaskFormat = rRenderPeer.GetStandardFormatA8();
diff --git a/vcl/unx/source/gdi/salgdi2.cxx b/vcl/unx/source/gdi/salgdi2.cxx
index 1cb2abbedf43..624360b21d29 100644
--- a/vcl/unx/source/gdi/salgdi2.cxx
+++ b/vcl/unx/source/gdi/salgdi2.cxx
@@ -150,7 +150,7 @@ inline GC X11SalGraphics::GetMonoGC( Pixmap hPixmap )
if( !bMonoGC_ )
{
SetClipRegion( pMonoGC_ );
- bMonoGC_ = TRUE;
+ bMonoGC_ = sal_True;
}
return pMonoGC_;
@@ -167,7 +167,7 @@ inline GC X11SalGraphics::GetCopyGC()
if( !bCopyGC_ )
{
SetClipRegion( pCopyGC_ );
- bCopyGC_ = TRUE;
+ bCopyGC_ = sal_True;
}
return pCopyGC_;
}
@@ -185,7 +185,7 @@ GC X11SalGraphics::GetInvertGC()
if( !bInvertGC_ )
{
SetClipRegion( pInvertGC_ );
- bInvertGC_ = TRUE;
+ bInvertGC_ = sal_True;
}
return pInvertGC_;
}
@@ -233,7 +233,7 @@ GC X11SalGraphics::GetInvert50GC()
if( !bInvert50GC_ )
{
SetClipRegion( pInvert50GC_ );
- bInvert50GC_ = TRUE;
+ bInvert50GC_ = sal_True;
}
return pInvert50GC_;
}
@@ -251,7 +251,7 @@ inline GC X11SalGraphics::GetStippleGC()
{
XSetFunction( GetXDisplay(), pStippleGC_, bXORMode_ ? GXxor : GXcopy );
SetClipRegion( pStippleGC_ );
- bStippleGC_ = TRUE;
+ bStippleGC_ = sal_True;
}
return pStippleGC_;
@@ -308,8 +308,8 @@ int X11SalGraphics::Clip( int &nX,
&& RectangleOut == Clip( pPaintRegion_, nX, nY, nDX, nDY, nSrcX, nSrcY ) )
return RectangleOut;
- if( pClipRegion_
- && RectangleOut == Clip( pClipRegion_, nX, nY, nDX, nDY, nSrcX, nSrcY ) )
+ if( mpClipRegion
+ && RectangleOut == Clip( mpClipRegion, nX, nY, nDX, nDY, nSrcX, nSrcY ) )
return RectangleOut;
int nPaint;
@@ -323,9 +323,9 @@ int X11SalGraphics::Clip( int &nX,
nPaint = RectangleIn;
int nClip;
- if( pClipRegion_ )
+ if( mpClipRegion )
{
- nClip = XRectInRegion( pClipRegion_, nX, nY, nDX, nDY );
+ nClip = XRectInRegion( mpClipRegion, nX, nY, nDX, nDY );
if( RectangleOut == nClip )
return RectangleOut;
}
@@ -608,7 +608,7 @@ void X11SalGraphics::copyBits( const SalTwoRect *pPosAry,
void X11SalGraphics::copyArea ( long nDestX, long nDestY,
long nSrcX, long nSrcY,
long nSrcWidth, long nSrcHeight,
- USHORT )
+ sal_uInt16 )
{
SalTwoRect aPosAry;
@@ -661,11 +661,11 @@ void X11SalGraphics::drawBitmap( const SalTwoRect* pPosAry,
DBG_ASSERT( !bPrinter_, "Drawing of transparent bitmaps on printer devices is strictly forbidden" );
// decide if alpha masking or transparency masking is needed
- BitmapBuffer* pAlphaBuffer = const_cast<SalBitmap&>(rMaskBitmap).AcquireBuffer( TRUE );
+ BitmapBuffer* pAlphaBuffer = const_cast<SalBitmap&>(rMaskBitmap).AcquireBuffer( sal_True );
if( pAlphaBuffer != NULL )
{
int nMaskFormat = pAlphaBuffer->mnFormat;
- const_cast<SalBitmap&>(rMaskBitmap).ReleaseBuffer( pAlphaBuffer, TRUE );
+ const_cast<SalBitmap&>(rMaskBitmap).ReleaseBuffer( pAlphaBuffer, sal_True );
if( nMaskFormat == BMP_FORMAT_8BIT_PAL )
drawAlphaBitmap( *pPosAry, rSrcBitmap, rMaskBitmap );
}
@@ -686,7 +686,7 @@ void X11SalGraphics::drawMaskedBitmap( const SalTwoRect* pPosAry,
// figure work mode depth. If this is a VDev Drawable, use its
// bitdepth to create pixmaps for, otherwise, XCopyArea will
// refuse to work.
- const USHORT nDepth( m_pVDev ?
+ const sal_uInt16 nDepth( m_pVDev ?
m_pVDev->GetDepth() :
pSalDisp->GetVisual( m_nScreen ).GetDepth() );
Pixmap aFG( XCreatePixmap( pXDisp, aDrawable, pPosAry->mnDestWidth,
@@ -745,8 +745,8 @@ void X11SalGraphics::drawMaskedBitmap( const SalTwoRect* pPosAry,
DBG_TESTTRANS( aBG );
// #105055# Disable XOR temporarily
- BOOL bOldXORMode( bXORMode_ );
- bXORMode_ = FALSE;
+ sal_Bool bOldXORMode( bXORMode_ );
+ bXORMode_ = sal_False;
// copy pixmap #2 (result) to background
XCopyArea( pXDisp, aBG, aDrawable, GetCopyGC(),
@@ -834,7 +834,7 @@ bool X11SalGraphics::drawAlphaBitmap( const SalTwoRect& rTR,
// TODO: use SalX11Bitmap functionality and caching for the Alpha Pixmap
// problem is that they don't provide an 8bit Pixmap on a non-8bit display
- BitmapBuffer* pAlphaBuffer = const_cast<SalBitmap&>(rAlphaBmp).AcquireBuffer( TRUE );
+ BitmapBuffer* pAlphaBuffer = const_cast<SalBitmap&>(rAlphaBmp).AcquireBuffer( sal_True );
// an XImage needs its data top_down
// TODO: avoid wrongly oriented images in upper layers!
@@ -879,7 +879,7 @@ bool X11SalGraphics::drawAlphaBitmap( const SalTwoRect& rTR,
if( pAlphaBits != (char*)pAlphaBuffer->mpBits )
delete[] pAlphaBits;
- const_cast<SalBitmap&>(rAlphaBmp).ReleaseBuffer( pAlphaBuffer, TRUE );
+ const_cast<SalBitmap&>(rAlphaBmp).ReleaseBuffer( pAlphaBuffer, sal_True );
XRenderPictureAttributes aAttr;
aAttr.repeat = true;
@@ -888,8 +888,8 @@ bool X11SalGraphics::drawAlphaBitmap( const SalTwoRect& rTR,
return false;
// set clipping
- if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) )
- rPeer.SetPictureClipRegion( aDstPic, pClipRegion_ );
+ if( mpClipRegion && !XEmptyRegion( mpClipRegion ) )
+ rPeer.SetPictureClipRegion( aDstPic, mpClipRegion );
// paint source * mask over destination picture
rPeer.CompositePicture( PictOpOver, aSrcPic, aAlphaPic, aDstPic,
@@ -1045,7 +1045,7 @@ SalBitmap *X11SalGraphics::getBitmap( long nX, long nY, long nDX, long nDY )
}
X11SalBitmap* pSalBitmap = new X11SalBitmap;
- USHORT nBitCount = GetBitCount();
+ sal_uInt16 nBitCount = GetBitCount();
if( &GetDisplay()->GetColormap( m_nScreen ) != &GetColormap() )
nBitCount = 1;
diff --git a/vcl/unx/source/gdi/salgdi3.cxx b/vcl/unx/source/gdi/salgdi3.cxx
index d9f81c0f67d2..6684b5664887 100644
--- a/vcl/unx/source/gdi/salgdi3.cxx
+++ b/vcl/unx/source/gdi/salgdi3.cxx
@@ -169,7 +169,7 @@ X11SalGraphics::GetFontGC()
{
XSetForeground( pDisplay, pFontGC_, nTextPixel_ );
SetClipRegion( pFontGC_ );
- bFontGC_ = TRUE;
+ bFontGC_ = sal_True;
}
return pFontGC_;
@@ -528,16 +528,16 @@ void X11SalGraphics::DrawCairoAAFontString( const ServerFontLayout& rLayout )
if (const void *pOptions = Application::GetSettings().GetStyleSettings().GetCairoFontOptions())
rCairo.set_font_options( cr, pOptions);
- if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) )
- {
- for (long i = 0; i < pClipRegion_->numRects; ++i)
+ if( mpClipRegion && !XEmptyRegion( mpClipRegion ) )
{
+ for (long i = 0; i < mpClipRegion->numRects; ++i)
+ {
rCairo.rectangle(cr,
- pClipRegion_->rects[i].x1,
- pClipRegion_->rects[i].y1,
- pClipRegion_->rects[i].x2 - pClipRegion_->rects[i].x1,
- pClipRegion_->rects[i].y2 - pClipRegion_->rects[i].y1);
- }
+ mpClipRegion->rects[i].x1,
+ mpClipRegion->rects[i].y1,
+ mpClipRegion->rects[i].x2 - mpClipRegion->rects[i].x1,
+ mpClipRegion->rects[i].y2 - mpClipRegion->rects[i].y1);
+ }
rCairo.clip(cr);
}
@@ -621,8 +621,8 @@ void X11SalGraphics::DrawServerAAFontString( const ServerFontLayout& rLayout )
// set clipping
// TODO: move into GetXRenderPicture()?
- if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) )
- rRenderPeer.SetPictureClipRegion( aDstPic, pClipRegion_ );
+ if( mpClipRegion && !XEmptyRegion( mpClipRegion ) )
+ rRenderPeer.SetPictureClipRegion( aDstPic, mpClipRegion );
ServerFont& rFont = rLayout.GetServerFont();
X11GlyphPeer& rGlyphPeer = X11GlyphCache::GetInstance().GetPeer();
@@ -705,10 +705,10 @@ bool X11SalGraphics::DrawServerAAForcedString( const ServerFontLayout& rLayout )
else if( m_pVDev )
nWidth = m_pVDev->GetWidth(), nHeight = m_pVDev->GetHeight();
- if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) )
+ if( mpClipRegion && !XEmptyRegion( mpClipRegion ) )
{
// get bounding box
- XClipBox( pClipRegion_, &aXRect );
+ XClipBox( mpClipRegion, &aXRect );
// clip with window
if( aXRect.x < 0 ) aXRect.x = 0;
@@ -966,9 +966,9 @@ const ImplFontCharMap* X11SalGraphics::GetImplFontCharMap() const
//
// ----------------------------------------------------------------------------
-USHORT X11SalGraphics::SetFont( ImplFontSelectData *pEntry, int nFallbackLevel )
+sal_uInt16 X11SalGraphics::SetFont( ImplFontSelectData *pEntry, int nFallbackLevel )
{
- USHORT nRetVal = 0;
+ sal_uInt16 nRetVal = 0;
if( !setFont( pEntry, nFallbackLevel ) )
nRetVal |= SAL_SETFONT_BADFONT;
if( bPrinter_ || (mpServerFont[ nFallbackLevel ] != NULL) )
@@ -985,7 +985,7 @@ X11SalGraphics::SetTextColor( SalColor nSalColor )
{
nTextColor_ = nSalColor;
nTextPixel_ = GetPixel( nSalColor );
- bFontGC_ = FALSE;
+ bFontGC_ = sal_False;
}
}
@@ -1218,15 +1218,15 @@ X11SalGraphics::GetFontMetric( ImplFontMetricData *pMetric, int nFallbackLevel )
// ---------------------------------------------------------------------------
-ULONG
-X11SalGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData *pKernPairs )
+sal_uLong
+X11SalGraphics::GetKernPairs( sal_uLong nPairs, ImplKernPairData *pKernPairs )
{
if( ! bPrinter_ )
{
if( mpServerFont[0] != NULL )
{
ImplKernPairData* pTmpKernPairs;
- ULONG nGotPairs = mpServerFont[0]->GetKernPairs( &pTmpKernPairs );
+ sal_uLong nGotPairs = mpServerFont[0]->GetKernPairs( &pTmpKernPairs );
for( unsigned int i = 0; i < nPairs && i < nGotPairs; ++i )
pKernPairs[ i ] = pTmpKernPairs[ i ];
delete[] pTmpKernPairs;
@@ -1238,40 +1238,40 @@ X11SalGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData *pKernPairs )
// ---------------------------------------------------------------------------
-BOOL X11SalGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect )
+sal_Bool X11SalGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect )
{
int nLevel = nGlyphIndex >> GF_FONTSHIFT;
if( nLevel >= MAX_FALLBACK )
- return FALSE;
+ return sal_False;
ServerFont* pSF = mpServerFont[ nLevel ];
if( !pSF )
- return FALSE;
+ return sal_False;
nGlyphIndex &= ~GF_FONTMASK;
const GlyphMetric& rGM = pSF->GetGlyphMetric( nGlyphIndex );
rRect = Rectangle( rGM.GetOffset(), rGM.GetSize() );
- return TRUE;
+ return sal_True;
}
// ---------------------------------------------------------------------------
-BOOL X11SalGraphics::GetGlyphOutline( long nGlyphIndex,
+sal_Bool X11SalGraphics::GetGlyphOutline( long nGlyphIndex,
::basegfx::B2DPolyPolygon& rPolyPoly )
{
int nLevel = nGlyphIndex >> GF_FONTSHIFT;
if( nLevel >= MAX_FALLBACK )
- return FALSE;
+ return sal_False;
ServerFont* pSF = mpServerFont[ nLevel ];
if( !pSF )
- return FALSE;
+ return sal_False;
nGlyphIndex &= ~GF_FONTMASK;
if( pSF->GetGlyphOutline( nGlyphIndex, rPolyPoly ) )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
//--------------------------------------------------------------------------
@@ -1332,7 +1332,7 @@ SystemFontData X11SalGraphics::GetSysFontData( int nFallbacklevel ) const
//--------------------------------------------------------------------------
-BOOL X11SalGraphics::CreateFontSubset(
+sal_Bool X11SalGraphics::CreateFontSubset(
const rtl::OUString& rToFile,
const ImplFontData* pFont,
sal_Int32* pGlyphIDs,
diff --git a/vcl/unx/source/gdi/salprnpsp.cxx b/vcl/unx/source/gdi/salprnpsp.cxx
index ece724d717cb..65a0802e9fe2 100644
--- a/vcl/unx/source/gdi/salprnpsp.cxx
+++ b/vcl/unx/source/gdi/salprnpsp.cxx
@@ -213,7 +213,7 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData )
if( rData.getStreamBuffer( pBuffer, nBytes ) )
{
pJobSetup->mnDriverDataLen = nBytes;
- pJobSetup->mpDriverData = (BYTE*)pBuffer;
+ pJobSetup->mpDriverData = (sal_uInt8*)pBuffer;
}
else
{
@@ -588,15 +588,15 @@ void PspSalInfoPrinter::ReleaseGraphics( SalGraphics* pGraphics )
// -----------------------------------------------------------------------
-BOOL PspSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pJobSetup )
+sal_Bool PspSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pJobSetup )
{
if( ! pFrame || ! pJobSetup )
- return FALSE;
+ return sal_False;
getPaLib();
if( ! pSetupFunction )
- return FALSE;
+ return sal_False;
PrinterInfoManager& rManager = PrinterInfoManager::get();
@@ -616,14 +616,14 @@ BOOL PspSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pJobSetup )
void* pBuffer = NULL;
aInfo.getStreamBuffer( pBuffer, nBytes );
pJobSetup->mnDriverDataLen = nBytes;
- pJobSetup->mpDriverData = (BYTE*)pBuffer;
+ pJobSetup->mpDriverData = (sal_uInt8*)pBuffer;
// copy everything to job setup
copyJobDataToJobSetup( pJobSetup, aInfo );
JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, m_aJobData );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -633,7 +633,7 @@ BOOL PspSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pJobSetup )
// data should be merged into the driver data
// If pJobSetup->mpDriverData IS NULL, then the driver defaults
// should be merged into the independent data
-BOOL PspSalInfoPrinter::SetPrinterData( ImplJobSetup* pJobSetup )
+sal_Bool PspSalInfoPrinter::SetPrinterData( ImplJobSetup* pJobSetup )
{
// set/clear backwards compatibility flag
bool bStrictSO52Compatibility = false;
@@ -652,7 +652,7 @@ BOOL PspSalInfoPrinter::SetPrinterData( ImplJobSetup* pJobSetup )
copyJobDataToJobSetup( pJobSetup, m_aJobData );
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -661,8 +661,8 @@ BOOL PspSalInfoPrinter::SetPrinterData( ImplJobSetup* pJobSetup )
// and sets the new independ data in pJobSetup
// Only the data must be changed, where the bit
// in nGetDataFlags is set
-BOOL PspSalInfoPrinter::SetData(
- ULONG nSetDataFlags,
+sal_Bool PspSalInfoPrinter::SetData(
+ sal_uLong nSetDataFlags,
ImplJobSetup* pJobSetup )
{
JobData aData;
@@ -711,7 +711,7 @@ BOOL PspSalInfoPrinter::SetData(
}
if( ! ( pKey && pValue && aData.m_aContext.setValue( pKey, pValue, false ) == pValue ) )
- return FALSE;
+ return sal_False;
}
// merge paperbin if necessary
@@ -771,10 +771,10 @@ BOOL PspSalInfoPrinter::SetData(
m_aJobData = aData;
copyJobDataToJobSetup( pJobSetup, aData );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -823,7 +823,7 @@ void PspSalInfoPrinter::GetPageInfo(
// -----------------------------------------------------------------------
-ULONG PspSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pJobSetup )
+sal_uLong PspSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pJobSetup )
{
if( ! pJobSetup )
return 0;
@@ -837,7 +837,7 @@ ULONG PspSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pJobSetup )
// -----------------------------------------------------------------------
-String PspSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pJobSetup, ULONG nPaperBin )
+String PspSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pJobSetup, sal_uLong nPaperBin )
{
JobData aData;
JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aData );
@@ -846,7 +846,7 @@ String PspSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pJobSetup, ULONG
if( aData.m_pParser )
{
const PPDKey* pKey = aData.m_pParser ? aData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "InputSlot" ) ) ): NULL;
- if( ! pKey || nPaperBin >= (ULONG)pKey->countValues() )
+ if( ! pKey || nPaperBin >= (sal_uLong)pKey->countValues() )
aRet = aData.m_pParser->getDefaultInputSlot();
else
{
@@ -861,7 +861,7 @@ String PspSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pJobSetup, ULONG
// -----------------------------------------------------------------------
-ULONG PspSalInfoPrinter::GetCapabilities( const ImplJobSetup* pJobSetup, USHORT nType )
+sal_uLong PspSalInfoPrinter::GetCapabilities( const ImplJobSetup* pJobSetup, sal_uInt16 nType )
{
switch( nType )
{
@@ -955,11 +955,11 @@ static String getTmpName()
return aSys;
}
-BOOL PspSalPrinter::StartJob(
+sal_Bool PspSalPrinter::StartJob(
const XubString* pFileName,
const XubString& rJobName,
const XubString& rAppName,
- ULONG nCopies,
+ sal_uLong nCopies,
bool bCollate,
bool bDirect,
ImplJobSetup* pJobSetup )
@@ -1035,16 +1035,16 @@ BOOL PspSalPrinter::StartJob(
}
m_aPrinterGfx.setStrictSO52Compatibility( bStrictSO52Compatibility );
- return m_aPrintJob.StartJob( m_aTmpFile.Len() ? m_aTmpFile : m_aFileName, nMode, rJobName, rAppName, m_aJobData, &m_aPrinterGfx, bDirect ) ? TRUE : FALSE;
+ return m_aPrintJob.StartJob( m_aTmpFile.Len() ? m_aTmpFile : m_aFileName, nMode, rJobName, rAppName, m_aJobData, &m_aPrinterGfx, bDirect ) ? sal_True : sal_False;
}
// -----------------------------------------------------------------------
-BOOL PspSalPrinter::EndJob()
+sal_Bool PspSalPrinter::EndJob()
{
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = sal_False;
if( m_bIsPDFWriterJob )
- bSuccess = TRUE;
+ bSuccess = sal_True;
else
{
bSuccess = m_aPrintJob.EndJob();
@@ -1072,16 +1072,16 @@ BOOL PspSalPrinter::EndJob()
// -----------------------------------------------------------------------
-BOOL PspSalPrinter::AbortJob()
+sal_Bool PspSalPrinter::AbortJob()
{
- BOOL bAbort = m_aPrintJob.AbortJob() ? TRUE : FALSE;
+ sal_Bool bAbort = m_aPrintJob.AbortJob() ? sal_True : sal_False;
vcl_sal::PrinterUpdate::jobEnded();
return bAbort;
}
// -----------------------------------------------------------------------
-SalGraphics* PspSalPrinter::StartPage( ImplJobSetup* pJobSetup, BOOL )
+SalGraphics* PspSalPrinter::StartPage( ImplJobSetup* pJobSetup, sal_Bool )
{
JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, m_aJobData );
m_pGraphics = new PspGraphics( &m_aJobData, &m_aPrinterGfx, m_bFax ? &m_aFaxNr : NULL, m_bSwallowFaxNo, m_pInfoPrinter );
@@ -1102,16 +1102,16 @@ SalGraphics* PspSalPrinter::StartPage( ImplJobSetup* pJobSetup, BOOL )
// -----------------------------------------------------------------------
-BOOL PspSalPrinter::EndPage()
+sal_Bool PspSalPrinter::EndPage()
{
sal_Bool bResult = m_aPrintJob.EndPage();
m_aPrinterGfx.Clear();
- return bResult ? TRUE : FALSE;
+ return bResult ? sal_True : sal_False;
}
// -----------------------------------------------------------------------
-ULONG PspSalPrinter::GetErrorCode()
+sal_uLong PspSalPrinter::GetErrorCode()
{
return 0;
}
@@ -1121,10 +1121,10 @@ ULONG PspSalPrinter::GetErrorCode()
struct PDFNewJobParameters
{
Size maPageSize;
- USHORT mnPaperBin;
+ sal_uInt16 mnPaperBin;
PDFNewJobParameters( const Size& i_rSize = Size(),
- USHORT i_nPaperBin = 0xffff )
+ sal_uInt16 i_nPaperBin = 0xffff )
: maPageSize( i_rSize ), mnPaperBin( i_nPaperBin ) {}
bool operator!=(const PDFNewJobParameters& rComp ) const
@@ -1152,7 +1152,7 @@ struct PDFPrintFile
, maParameters( i_rNewParameters ) {}
};
-BOOL PspSalPrinter::StartJob( const String* i_pFileName, const String& i_rJobName, const String& i_rAppName,
+sal_Bool PspSalPrinter::StartJob( const String* i_pFileName, const String& i_rJobName, const String& i_rAppName,
ImplJobSetup* i_pSetupData, vcl::PrinterController& i_rController )
{
OSL_TRACE( "StartJob with controller: pFilename = %s", i_pFileName ? rtl::OUStringToOString( *i_pFileName, RTL_TEXTENCODING_UTF8 ).getStr() : "<nil>" );
@@ -1188,6 +1188,8 @@ BOOL PspSalPrinter::StartJob( const String* i_pFileName, const String& i_rJobNam
aContext.Tagged = false;
aContext.EmbedStandardFonts = true;
aContext.DocumentLocale = Application::GetSettings().GetLocale();
+ aContext.ColorMode = i_rController.getPrinter()->GetPrinterOptions().IsConvertToGreyscales()
+ ? vcl::PDFWriter::DrawGreyscale : vcl::PDFWriter::DrawColor;
// prepare doc info
aContext.DocumentInfo.Title = i_rJobName;
@@ -1376,7 +1378,7 @@ BOOL PspSalPrinter::StartJob( const String* i_pFileName, const String& i_rJobNam
}
}
- return TRUE;
+ return sal_True;
}
diff --git a/vcl/unx/source/gdi/salvd.cxx b/vcl/unx/source/gdi/salvd.cxx
index f242fffae715..675deef90ffe 100644
--- a/vcl/unx/source/gdi/salvd.cxx
+++ b/vcl/unx/source/gdi/salvd.cxx
@@ -44,7 +44,7 @@
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
SalVirtualDevice* X11SalInstance::CreateVirtualDevice( SalGraphics* pGraphics,
long nDX, long nDY,
- USHORT nBitCount, const SystemGraphicsData *pData )
+ sal_uInt16 nBitCount, const SystemGraphicsData *pData )
{
X11SalVirtualDevice *pVDev = new X11SalVirtualDevice();
if( !nBitCount && pGraphics )
@@ -125,14 +125,14 @@ void X11SalGraphics::Init( X11SalVirtualDevice *pDevice, SalColormap* pColormap,
m_pFrame = NULL;
bWindow_ = pDisplay->IsDisplay();
- bVirDev_ = TRUE;
+ bVirDev_ = sal_True;
}
// -=-= SalVirDevData / SalVirtualDevice -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-BOOL X11SalVirtualDevice::Init( SalDisplay *pDisplay,
+sal_Bool X11SalVirtualDevice::Init( SalDisplay *pDisplay,
long nDX, long nDY,
- USHORT nBitCount,
+ sal_uInt16 nBitCount,
int nScreen,
Pixmap hDrawable,
void* pRenderFormatVoid )
@@ -170,12 +170,12 @@ BOOL X11SalVirtualDevice::Init( SalDisplay *pDisplay,
else
{
hDrawable_ = hDrawable;
- bExternPixmap_ = TRUE;
+ bExternPixmap_ = sal_True;
}
pGraphics_->Init( this, pColormap, bDeleteColormap );
- return hDrawable_ != None ? TRUE : FALSE;
+ return hDrawable_ != None ? sal_True : sal_False;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -187,8 +187,8 @@ X11SalVirtualDevice::X11SalVirtualDevice()
nDX_ = 0;
nDY_ = 0;
nDepth_ = 0;
- bGraphics_ = FALSE;
- bExternPixmap_ = FALSE;
+ bGraphics_ = sal_False;
+ bExternPixmap_ = sal_False;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -208,18 +208,18 @@ SalGraphics* X11SalVirtualDevice::GetGraphics()
return NULL;
if( pGraphics_ )
- bGraphics_ = TRUE;
+ bGraphics_ = sal_True;
return pGraphics_;
}
void X11SalVirtualDevice::ReleaseGraphics( SalGraphics* )
-{ bGraphics_ = FALSE; }
+{ bGraphics_ = sal_False; }
-BOOL X11SalVirtualDevice::SetSize( long nDX, long nDY )
+sal_Bool X11SalVirtualDevice::SetSize( long nDX, long nDY )
{
if( bExternPixmap_ )
- return FALSE;
+ return sal_False;
// #144688#
// the X protocol request CreatePixmap puts an upper bound
@@ -229,7 +229,7 @@ BOOL X11SalVirtualDevice::SetSize( long nDX, long nDY )
// 16 bit truncation here without noticing.
if( nDX < 0 || nDX > 65535 ||
nDY < 0 || nDY > 65535 )
- return FALSE;
+ return sal_False;
if( !nDX ) nDX = 1;
if( !nDY ) nDY = 1;
@@ -248,7 +248,7 @@ BOOL X11SalVirtualDevice::SetSize( long nDX, long nDY )
nDX_ = 1;
nDY_ = 1;
}
- return FALSE;
+ return sal_False;
}
if( GetDrawable() )
@@ -261,7 +261,7 @@ BOOL X11SalVirtualDevice::SetSize( long nDX, long nDY )
if( pGraphics_ )
InitGraphics( this );
- return TRUE;
+ return sal_True;
}
void X11SalVirtualDevice::GetSize( long& rWidth, long& rHeight )
diff --git a/vcl/unx/source/printer/jobdata.cxx b/vcl/unx/source/printer/jobdata.cxx
index d4211eae31df..811f93bcb826 100644
--- a/vcl/unx/source/printer/jobdata.cxx
+++ b/vcl/unx/source/printer/jobdata.cxx
@@ -167,7 +167,7 @@ bool JobData::getStreamBuffer( void*& pData, int& bytes )
// now append the PPDContext stream buffer
aStream.WriteLine( "PPDContexData" );
- ULONG nBytes;
+ sal_uLong nBytes;
void* pContextBuffer = m_aContext.getStreamableBuffer( nBytes );
if( nBytes )
aStream.Write( pContextBuffer, nBytes );
diff --git a/vcl/unx/source/printer/ppdparser.cxx b/vcl/unx/source/printer/ppdparser.cxx
index 587e58be5bc7..9a85d02db894 100644
--- a/vcl/unx/source/printer/ppdparser.cxx
+++ b/vcl/unx/source/printer/ppdparser.cxx
@@ -311,7 +311,7 @@ void PPDDecompressStream::Open( const rtl::OUString& i_rFile )
mpFileStream->Seek( 0 );
// check for compress'ed or gzip'ed file
- ULONG nCompressMethod = 0;
+ sal_uLong nCompressMethod = 0;
if( aLine.Len() > 1 && static_cast<unsigned char>(aLine.GetChar( 0 )) == 0x1f )
{
if( static_cast<unsigned char>(aLine.GetChar( 1 )) == 0x8b ) // check for gzip
@@ -1110,7 +1110,7 @@ void PPDParser::parse( ::std::list< ByteString >& rLines )
m_pTranslator->insertValue( aUniKey, aOption, aValue, aValueTranslation, aTransLocale );
// eventually update query and remove from option list
- if( bQuery && pKey->m_bQueryValue == FALSE )
+ if( bQuery && pKey->m_bQueryValue == sal_False )
{
pKey->m_aQueryValue = *pValue;
pKey->m_bQueryValue = true;
@@ -1125,7 +1125,7 @@ void PPDParser::parse( ::std::list< ByteString >& rLines )
if( aLine.CompareTo( "*Default", 8 ) == COMPARE_EQUAL )
{
String aKey( aLine.Copy( 8 ), RTL_TEXTENCODING_MS_1252 );
- USHORT nPos = aKey.Search( ':' );
+ sal_uInt16 nPos = aKey.Search( ':' );
if( nPos != STRING_NOTFOUND )
{
aKey.Erase( nPos );
@@ -1417,7 +1417,7 @@ String PPDParser::getSlot( int nSlot ) const
if( nSlot > 0 && nSlot < m_pInputSlots->countValues() )
return m_pInputSlots->getValue( nSlot )->m_aOption;
else if( m_pInputSlots->countValues() > 0 )
- return m_pInputSlots->getValue( (ULONG)0 )->m_aOption;
+ return m_pInputSlots->getValue( (sal_uLong)0 )->m_aOption;
return String();
}
@@ -1430,7 +1430,7 @@ String PPDParser::getSlotCommand( int nSlot ) const
if( nSlot > 0 && nSlot < m_pInputSlots->countValues() )
return m_pInputSlots->getValue( nSlot )->m_aValue;
else if( m_pInputSlots->countValues() > 0 )
- return m_pInputSlots->getValue( (ULONG)0 )->m_aValue;
+ return m_pInputSlots->getValue( (sal_uLong)0 )->m_aValue;
return String();
}
@@ -1457,7 +1457,7 @@ String PPDParser::getPaperDimension( int nPaperDimension ) const
if( nPaperDimension > 0 && nPaperDimension < m_pPaperDimensions->countValues() )
return m_pPaperDimensions->getValue( nPaperDimension )->m_aOption;
else if( m_pPaperDimensions->countValues() > 0 )
- return m_pPaperDimensions->getValue( (ULONG)0 )->m_aOption;
+ return m_pPaperDimensions->getValue( (sal_uLong)0 )->m_aOption;
return String();
}
@@ -1470,7 +1470,7 @@ String PPDParser::getPaperDimensionCommand( int nPaperDimension ) const
if( nPaperDimension > 0 && nPaperDimension < m_pPaperDimensions->countValues() )
return m_pPaperDimensions->getValue( nPaperDimension )->m_aValue;
else if( m_pPaperDimensions->countValues() > 0 )
- return m_pPaperDimensions->getValue( (ULONG)0 )->m_aValue;
+ return m_pPaperDimensions->getValue( (sal_uLong)0 )->m_aValue;
return String();
}
@@ -1578,7 +1578,7 @@ String PPDParser::getDuplex( int nDuplex ) const
if( nDuplex > 0 && nDuplex < m_pDuplexTypes->countValues() )
return m_pDuplexTypes->getValue( nDuplex )->m_aOption;
else if( m_pDuplexTypes->countValues() > 0 )
- return m_pDuplexTypes->getValue( (ULONG)0 )->m_aOption;
+ return m_pDuplexTypes->getValue( (sal_uLong)0 )->m_aOption;
return String();
}
@@ -1591,7 +1591,7 @@ String PPDParser::getDuplexCommand( int nDuplex ) const
if( nDuplex > 0 && nDuplex < m_pDuplexTypes->countValues() )
return m_pDuplexTypes->getValue( nDuplex )->m_aValue;
else if( m_pDuplexTypes->countValues() > 0 )
- return m_pDuplexTypes->getValue( (ULONG)0 )->m_aValue;
+ return m_pDuplexTypes->getValue( (sal_uLong)0 )->m_aValue;
return String();
}
@@ -2033,7 +2033,7 @@ void PPDContext::getUnconstrainedValues( const PPDKey* pKey, ::std::list< const
// -------------------------------------------------------------------
-void* PPDContext::getStreamableBuffer( ULONG& rBytes ) const
+void* PPDContext::getStreamableBuffer( sal_uLong& rBytes ) const
{
rBytes = 0;
if( ! m_aCurrentValues.size() )
@@ -2079,7 +2079,7 @@ void* PPDContext::getStreamableBuffer( ULONG& rBytes ) const
// -------------------------------------------------------------------
-void PPDContext::rebuildFromStreamBuffer( void* pBuffer, ULONG nBytes )
+void PPDContext::rebuildFromStreamBuffer( void* pBuffer, sal_uLong nBytes )
{
if( ! m_pParser )
return;
diff --git a/vcl/unx/source/printer/printerinfomanager.cxx b/vcl/unx/source/printer/printerinfomanager.cxx
index af189b1b01b5..421ce74b98d8 100644
--- a/vcl/unx/source/printer/printerinfomanager.cxx
+++ b/vcl/unx/source/printer/printerinfomanager.cxx
@@ -328,7 +328,7 @@ void PrinterInfoManager::initialize()
m_aGlobalDefaults.m_aContext.
setValue( pKey,
aValue.Equals( "*nil" ) ? NULL : pKey->getValue( String( aValue, RTL_TEXTENCODING_ISO_8859_1 ) ),
- TRUE );
+ sal_True );
}
}
else if( aKey.Len() > 10 && aKey.CompareTo("SubstFont_", 10 ) == COMPARE_EQUAL )
@@ -533,7 +533,7 @@ void PrinterInfoManager::initialize()
aPrinter.m_aInfo.m_aContext.
setValue( pKey,
aValue.Equals( "*nil" ) ? NULL : pKey->getValue( String( aValue, RTL_TEXTENCODING_ISO_8859_1 ) ),
- TRUE );
+ sal_True );
}
}
else if( aKey.Len() > 10 && aKey.CompareTo("SubstFont_", 10 ) == COMPARE_EQUAL )
diff --git a/vcl/unx/source/printergfx/common_gfx.cxx b/vcl/unx/source/printergfx/common_gfx.cxx
index 6bb31acfcbbe..fa032c46a74b 100644
--- a/vcl/unx/source/printergfx/common_gfx.cxx
+++ b/vcl/unx/source/printergfx/common_gfx.cxx
@@ -527,9 +527,9 @@ PrinterGfx::DrawPolyPolygon (sal_uInt32 nPoly, const sal_uInt32* pSizes, const P
*/
void
-PrinterGfx::DrawPolyLineBezier (sal_uInt32 nPoints, const Point* pPath, const BYTE* pFlgAry)
+PrinterGfx::DrawPolyLineBezier (sal_uInt32 nPoints, const Point* pPath, const sal_uInt8* pFlgAry)
{
- const sal_uInt32 nBezString = 1024;
+ const sal_uInt32 nBezString= 1024;
sal_Char pString[nBezString];
if ( nPoints > 1 && maLineColor.Is() && pPath )
@@ -578,7 +578,7 @@ PrinterGfx::DrawPolyLineBezier (sal_uInt32 nPoints, const Point* pPath, const BY
}
void
-PrinterGfx::DrawPolygonBezier (sal_uInt32 nPoints, const Point* pPath, const BYTE* pFlgAry)
+PrinterGfx::DrawPolygonBezier (sal_uInt32 nPoints, const Point* pPath, const sal_uInt8* pFlgAry)
{
const sal_uInt32 nBezString = 1024;
sal_Char pString[nBezString];
@@ -634,7 +634,7 @@ PrinterGfx::DrawPolygonBezier (sal_uInt32 nPoints, const Point* pPath, const BYT
}
void
-PrinterGfx::DrawPolyPolygonBezier (sal_uInt32 nPoly, const sal_uInt32 * pPoints, const Point* const * pPtAry, const BYTE* const* pFlgAry)
+PrinterGfx::DrawPolyPolygonBezier (sal_uInt32 nPoly, const sal_uInt32 * pPoints, const Point* const * pPtAry, const sal_uInt8* const* pFlgAry)
{
const sal_uInt32 nBezString = 1024;
sal_Char pString[nBezString];
diff --git a/vcl/unx/source/printergfx/printerjob.cxx b/vcl/unx/source/printergfx/printerjob.cxx
index af2cf14b1a0c..947eb290ec60 100644
--- a/vcl/unx/source/printergfx/printerjob.cxx
+++ b/vcl/unx/source/printergfx/printerjob.cxx
@@ -410,7 +410,7 @@ PrinterJob::StartJob (
rtl::OUString aFilterWS;
// Creator (this application)
- aFilterWS = WhitespaceToSpace( rAppName, FALSE );
+ aFilterWS = WhitespaceToSpace( rAppName, sal_False );
WritePS (mpJobHeader, "%%Creator: (");
WritePS (mpJobHeader, aFilterWS);
WritePS (mpJobHeader, ")\n");
@@ -448,14 +448,14 @@ PrinterJob::StartJob (
* use the filename, if it contains only ascii
* else omit %%Title
*/
- aFilterWS = WhitespaceToSpace( rJobName, FALSE );
+ aFilterWS = WhitespaceToSpace( rJobName, sal_False );
rtl::OUString aTitle( aFilterWS );
if( ! isAscii( aTitle ) )
{
sal_Int32 nIndex = 0;
while( nIndex != -1 )
aTitle = rFileName.getToken( 0, '/', nIndex );
- aTitle = WhitespaceToSpace( aTitle, FALSE );
+ aTitle = WhitespaceToSpace( aTitle, sal_False );
if( ! isAscii( aTitle ) )
aTitle = rtl::OUString();
}
diff --git a/vcl/unx/source/window/salframe.cxx b/vcl/unx/source/window/salframe.cxx
index 11c20aa40f5a..5ad3a9d94375 100644
--- a/vcl/unx/source/window/salframe.cxx
+++ b/vcl/unx/source/window/salframe.cxx
@@ -209,7 +209,7 @@ void X11SalFrame::askForXEmbedFocus( sal_Int32 i_nTimeCode )
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void X11SalFrame::Init( ULONG nSalFrameStyle, int nScreen, SystemParentData* pParentData, bool bUseGeometry )
+void X11SalFrame::Init( sal_uLong nSalFrameStyle, int nScreen, SystemParentData* pParentData, bool bUseGeometry )
{
if( nScreen < 0 || nScreen >= GetDisplay()->GetScreenCount() )
nScreen = GetDisplay()->GetDefaultScreenNumber();
@@ -482,8 +482,8 @@ void X11SalFrame::Init( ULONG nSalFrameStyle, int nScreen, SystemParentData* pPa
}
nShowState_ = SHOWSTATE_UNKNOWN;
- bViewable_ = TRUE;
- bMapped_ = FALSE;
+ bViewable_ = sal_True;
+ bMapped_ = sal_False;
nVisibility_ = VisibilityFullyObscured;
mhWindow = XCreateWindow( GetXDisplay(),
aFrameParent,
@@ -645,7 +645,7 @@ void X11SalFrame::Init( ULONG nSalFrameStyle, int nScreen, SystemParentData* pPa
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-X11SalFrame::X11SalFrame( SalFrame *pParent, ULONG nSalFrameStyle, SystemParentData* pSystemParent )
+X11SalFrame::X11SalFrame( SalFrame *pParent, sal_uLong nSalFrameStyle, SystemParentData* pSystemParent )
{
X11SalData* pSalData = GetX11SalData();
@@ -686,16 +686,16 @@ X11SalFrame::X11SalFrame( SalFrame *pParent, ULONG nSalFrameStyle, SystemParentD
nHeight_ = 0;
nStyle_ = 0;
mnExtStyle = 0;
- bAlwaysOnTop_ = FALSE;
+ bAlwaysOnTop_ = sal_False;
- // set bViewable_ to TRUE: hack GetClientSize to report something
+ // set bViewable_ to sal_True: hack GetClientSize to report something
// different to 0/0 before first map
- bViewable_ = TRUE;
- bMapped_ = FALSE;
- bDefaultPosition_ = TRUE;
+ bViewable_ = sal_True;
+ bMapped_ = sal_False;
+ bDefaultPosition_ = sal_True;
nVisibility_ = VisibilityFullyObscured;
m_nWorkArea = 0;
- mbInShow = FALSE;
+ mbInShow = sal_False;
m_bXEmbed = false;
nScreenSaversTimeout_ = 0;
@@ -790,10 +790,10 @@ X11SalFrame::~X11SalFrame()
XSelectInput( GetXDisplay(), GetShellWindow(), 0 );
XSelectInput( GetXDisplay(), GetWindow(), 0 );
- ShowFullScreen( FALSE, 0 );
+ ShowFullScreen( sal_False, 0 );
if( bMapped_ )
- Show( FALSE );
+ Show( sal_False );
if( mpInputContext )
{
@@ -956,14 +956,14 @@ void X11SalFrame::updateGraphics( bool bClear )
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void X11SalFrame::Enable( BOOL /*bEnable*/ )
+void X11SalFrame::Enable( sal_Bool /*bEnable*/ )
{
// NYI: enable/disable frame
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void X11SalFrame::SetIcon( USHORT nIcon )
+void X11SalFrame::SetIcon( sal_uInt16 nIcon )
{
if ( ! IsChildWindow() )
{
@@ -1065,7 +1065,7 @@ void X11SalFrame::SetIcon( USHORT nIcon )
}
pHints = &Hints;
- BOOL bOk = SelectAppIconPixmap( GetDisplay(), m_nScreen,
+ sal_Bool bOk = SelectAppIconPixmap( GetDisplay(), m_nScreen,
nIcon, iconSize,
pHints->icon_pixmap, pHints->icon_mask );
if ( !bOk )
@@ -1138,7 +1138,7 @@ void X11SalFrame::SetMinClientSize( long nWidth, long nHeight )
// Show + Pos (x,y,z) + Size (width,height)
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void X11SalFrame::Show( BOOL bVisible, BOOL bNoActivate )
+void X11SalFrame::Show( sal_Bool bVisible, sal_Bool bNoActivate )
{
if( ( bVisible && bMapped_ )
|| ( !bVisible && !bMapped_ ) )
@@ -1158,7 +1158,7 @@ void X11SalFrame::Show( BOOL bVisible, BOOL bNoActivate )
{
SessionManagerClient::open(); // will simply return after the first time
- mbInShow = TRUE;
+ mbInShow = sal_True;
if( ! (nStyle_ & SAL_FRAME_STYLE_INTRO) )
{
// hide all INTRO frames
@@ -1170,12 +1170,12 @@ void X11SalFrame::Show( BOOL bVisible, BOOL bNoActivate )
if( pFrame->nStyle_ & SAL_FRAME_STYLE_INTRO )
{
if( pFrame->bMapped_ )
- const_cast<X11SalFrame*>(pFrame)->Show( FALSE );
+ const_cast<X11SalFrame*>(pFrame)->Show( sal_False );
}
}
}
- // update NET_WM_STATE which may have been deleted due to earlier Show(FALSE)
+ // update NET_WM_STATE which may have been deleted due to earlier Show(sal_False)
if( nShowState_ == SHOWSTATE_HIDDEN )
GetDisplay()->getWMAdaptor()->frameIsMapping( this );
@@ -1185,7 +1185,7 @@ void X11SalFrame::Show( BOOL bVisible, BOOL bNoActivate )
* with the basic dialogue editor,
* which shows a frame and instantly hides it again. After that the
* editor window is shown and the WM takes this as an opportunity
- * to show our hidden transient frame also. So Show( FALSE ) must
+ * to show our hidden transient frame also. So Show( sal_False ) must
* withdraw the frame AND delete the WM_TRANSIENT_FOR property.
* In case the frame is shown again, the transient hint must be restored here.
*/
@@ -1319,7 +1319,7 @@ void X11SalFrame::Show( BOOL bVisible, BOOL bNoActivate )
* #98107# plugged windows don't necessarily get the
* focus on show because the parent may already be mapped
* and have the focus. So try to set the focus
- * to the child on Show(TRUE)
+ * to the child on Show(sal_True)
*/
if( (nStyle_ & SAL_FRAME_STYLE_PLUG) && ! m_bXEmbed )
XSetInputFocus( GetXDisplay(),
@@ -1367,7 +1367,7 @@ void X11SalFrame::Show( BOOL bVisible, BOOL bNoActivate )
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void X11SalFrame::ToTop( USHORT nFlags )
+void X11SalFrame::ToTop( sal_uInt16 nFlags )
{
if( ( nFlags & SAL_FRAME_TOTOP_RESTOREWHENMIN )
&& ! ( nStyle_ & SAL_FRAME_STYLE_FLOAT )
@@ -1585,7 +1585,7 @@ void X11SalFrame::updateScreenNumber()
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void X11SalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, USHORT nFlags )
+void X11SalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags )
{
if( nStyle_ & SAL_FRAME_STYLE_PLUG )
return;
@@ -1631,7 +1631,7 @@ void X11SalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, USHOR
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void X11SalFrame::SetAlwaysOnTop( BOOL bOnTop )
+void X11SalFrame::SetAlwaysOnTop( sal_Bool bOnTop )
{
if( ! IsOverrideRedirect() )
{
@@ -1812,7 +1812,7 @@ void X11SalFrame::SetWindowState( const SalFrameState *pState )
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-BOOL X11SalFrame::GetWindowState( SalFrameState* pState )
+sal_Bool X11SalFrame::GetWindowState( SalFrameState* pState )
{
if( SHOWSTATE_MINIMIZED == nShowState_ )
pState->mnState = SAL_FRAMESTATE_MINIMIZED;
@@ -1851,7 +1851,7 @@ BOOL X11SalFrame::GetWindowState( SalFrameState* pState )
pState->mnMask |= _FRAMESTATE_MASK_MAXIMIZED_GEOMETRY;
}
- return TRUE;
+ return sal_True;
}
// ----------------------------------------------------------------------------
@@ -2170,29 +2170,29 @@ void X11SalFrame::SetScreenNumber( unsigned int nNewScreen )
Rectangle aNewScreenRect( GetDisplay()->GetXineramaScreens()[nNewScreen] );
bool bVisible = bMapped_;
if( bVisible )
- Show( FALSE );
+ Show( sal_False );
maGeometry.nX = aNewScreenRect.Left() + (maGeometry.nX - aOldScreenRect.Left());
maGeometry.nY = aNewScreenRect.Top() + (maGeometry.nY - aOldScreenRect.Top());
createNewWindow( None, m_nScreen );
if( bVisible )
- Show( TRUE );
+ Show( sal_True );
maGeometry.nScreenNumber = nNewScreen;
}
else if( sal_Int32(nNewScreen) < GetDisplay()->GetScreenCount() )
{
bool bVisible = bMapped_;
if( bVisible )
- Show( FALSE );
+ Show( sal_False );
createNewWindow( None, nNewScreen );
if( bVisible )
- Show( TRUE );
+ Show( sal_True );
maGeometry.nScreenNumber = nNewScreen;
}
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void X11SalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nScreen )
+void X11SalFrame::ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nScreen )
{
if( GetDisplay()->IsXinerama() && GetDisplay()->GetXineramaScreens().size() > 1 )
{
@@ -2210,7 +2210,7 @@ void X11SalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nScreen )
nStyle_ |= SAL_FRAME_STYLE_PARTIAL_FULLSCREEN;
bool bVisible = bMapped_;
if( bVisible )
- Show( FALSE );
+ Show( sal_False );
maGeometry.nX = aRect.Left();
maGeometry.nY = aRect.Top();
maGeometry.nWidth = aRect.GetWidth();
@@ -2223,7 +2223,7 @@ void X11SalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nScreen )
else
GetDisplay()->getWMAdaptor()->showFullScreen( this, true );
if( bVisible )
- Show(TRUE);
+ Show(sal_True);
}
else
@@ -2234,14 +2234,14 @@ void X11SalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nScreen )
Rectangle aRect = maRestorePosSize;
maRestorePosSize = Rectangle();
if( bVisible )
- Show( FALSE );
+ Show( sal_False );
createNewWindow( None, m_nScreen );
if( !aRect.IsEmpty() )
SetPosSize( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight(),
SAL_FRAME_POSSIZE_X | SAL_FRAME_POSSIZE_Y |
SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT );
if( bVisible )
- Show( TRUE );
+ Show( sal_True );
}
}
else
@@ -2254,12 +2254,12 @@ void X11SalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nScreen )
if( mbFullScreen )
pDisplay_->getWMAdaptor()->showFullScreen( this, false );
if( bVisible )
- Show( FALSE );
+ Show( sal_False );
createNewWindow( None, nScreen );
if( mbFullScreen )
pDisplay_->getWMAdaptor()->showFullScreen( this, true );
if( bVisible )
- Show( TRUE );
+ Show( sal_True );
}
if( mbFullScreen == (bool)bFullScreen )
return;
@@ -2344,7 +2344,7 @@ MessageToXAutoLock( Display *p_display, int n_message )
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void X11SalFrame::StartPresentation( BOOL bStart )
+void X11SalFrame::StartPresentation( sal_Bool bStart )
{
I18NStatus::get().show( !bStart, I18NStatus::presentation );
if ( bStart )
@@ -2362,7 +2362,7 @@ void X11SalFrame::StartPresentation( BOOL bStart )
static bool DPMSExtensionAvailable =
#ifndef SOLARIS
(DPMSQueryExtension(GetXDisplay(), &dummy, &dummy) != 0);
- static XLIB_BOOL DPMSEnabled = false;
+ static sal_Bool DPMSEnabled = false;
#else
false;
bool DPMSEnabled = false;
@@ -2541,10 +2541,10 @@ X11SalFrame::HandleExtTextEvent (XClientMessageEvent *pEvent)
// PostEvent
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-BOOL X11SalFrame::PostEvent( void *pData )
+sal_Bool X11SalFrame::PostEvent( void *pData )
{
GetDisplay()->SendInternalEvent( this, pData );
- return TRUE;
+ return sal_True;
}
// Title
@@ -2616,7 +2616,7 @@ void X11SalFrame::SetInputContext( SalInputContext* pContext )
// -----------------------------------------------------------------------
-void X11SalFrame::EndExtTextInput( USHORT nFlags )
+void X11SalFrame::EndExtTextInput( sal_uInt16 nFlags )
{
if (mpInputContext != NULL)
mpInputContext->EndExtTextInput( nFlags );
@@ -2624,20 +2624,20 @@ void X11SalFrame::EndExtTextInput( USHORT nFlags )
// -----------------------------------------------------------------------
-XubString X11SalFrame::GetKeyName( USHORT nKeyCode )
+XubString X11SalFrame::GetKeyName( sal_uInt16 nKeyCode )
{
return GetDisplay()->GetKeyName( nKeyCode );
}
-XubString X11SalFrame::GetSymbolKeyName( const XubString&, USHORT nKeyCode )
+XubString X11SalFrame::GetSymbolKeyName( const XubString&, sal_uInt16 nKeyCode )
{
return GetKeyName( nKeyCode );
}
-BOOL X11SalFrame::MapUnicodeToKeyCode( sal_Unicode , LanguageType , KeyCode& )
+sal_Bool X11SalFrame::MapUnicodeToKeyCode( sal_Unicode , LanguageType , KeyCode& )
{
// not supported yet
- return FALSE;
+ return sal_False;
}
LanguageType X11SalFrame::GetInputLanguage()
@@ -2665,7 +2665,7 @@ void X11SalFrame::UpdateSettings( AllSettings& rSettings )
pIntegrator->GetSystemLook( rSettings );
}
-void X11SalFrame::CaptureMouse( BOOL bCapture )
+void X11SalFrame::CaptureMouse( sal_Bool bCapture )
{
nCaptured_ = pDisplay_->CaptureMouse( bCapture ? this : NULL );
}
@@ -2696,7 +2696,7 @@ void X11SalFrame::createNewWindow( XLIB_Window aNewParent, int nScreen )
{
bool bWasVisible = bMapped_;
if( bWasVisible )
- Show( FALSE );
+ Show( sal_False );
if( nScreen < 0 || nScreen >= GetDisplay()->GetScreenCount() )
nScreen = m_nScreen;
@@ -2765,7 +2765,7 @@ void X11SalFrame::createNewWindow( XLIB_Window aNewParent, int nScreen )
}
if( bWasVisible )
- Show( TRUE );
+ Show( sal_True );
std::list< X11SalFrame* > aChildren = maChildren;
for( std::list< X11SalFrame* >::iterator it = aChildren.begin(); it != aChildren.end(); ++it )
@@ -2801,9 +2801,9 @@ void X11SalFrame::Beep( SoundType eSoundType ) // not fully suported
// Event Handling
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-static USHORT sal_GetCode( int state )
+static sal_uInt16 sal_GetCode( int state )
{
- USHORT nCode = 0;
+ sal_uInt16 nCode = 0;
if( state & Button1Mask )
nCode |= MOUSE_LEFT;
@@ -2852,7 +2852,7 @@ SalFrame::SalPointerState X11SalFrame::GetPointerState()
long X11SalFrame::HandleMouseEvent( XEvent *pEvent )
{
SalMouseEvent aMouseEvt;
- USHORT nEvent = 0;
+ sal_uInt16 nEvent = 0;
bool bClosePopups = false;
if( nVisibleFloats && pEvent->type == EnterNotify )
@@ -2978,7 +2978,7 @@ long X11SalFrame::HandleMouseEvent( XEvent *pEvent )
}
if( ! bInside )
{
- // need not take care of the XUngrabPointer in Show( FALSE )
+ // need not take care of the XUngrabPointer in Show( sal_False )
// because XUngrabPointer does not produce errors if pointer
// is not grabbed
XUngrabPointer( GetXDisplay(), CurrentTime );
@@ -3062,7 +3062,7 @@ long X11SalFrame::HandleMouseEvent( XEvent *pEvent )
if( pEvent->type == ButtonRelease )
return 0;
- static ULONG nLines = 0;
+ static sal_uLong nLines = 0;
if( ! nLines )
{
char* pEnv = getenv( "SAL_WHEELLINES" );
@@ -3124,14 +3124,14 @@ long X11SalFrame::HandleMouseEvent( XEvent *pEvent )
// in the independent part.
struct KeyAlternate
{
- USHORT nKeyCode;
+ sal_uInt16 nKeyCode;
sal_Unicode nCharCode;
KeyAlternate() : nKeyCode( 0 ), nCharCode( 0 ) {}
- KeyAlternate( USHORT nKey, sal_Unicode nChar = 0 ) : nKeyCode( nKey ), nCharCode( nChar ) {}
+ KeyAlternate( sal_uInt16 nKey, sal_Unicode nChar = 0 ) : nKeyCode( nKey ), nCharCode( nChar ) {}
};
inline KeyAlternate
-GetAlternateKeyCode( const USHORT nKeyCode )
+GetAlternateKeyCode( const sal_uInt16 nKeyCode )
{
KeyAlternate aAlternate;
@@ -3156,7 +3156,7 @@ void X11SalFrame::beginUnicodeSequence()
if( ! aDeleteWatch.isDeleted() )
{
- USHORT nTextAttr = SAL_EXTTEXTINPUT_ATTR_UNDERLINE;
+ sal_uInt16 nTextAttr = SAL_EXTTEXTINPUT_ATTR_UNDERLINE;
SalExtTextInputEvent aEv;
aEv.mnTime = 0;
aEv.maText = rSeq;
@@ -3164,7 +3164,7 @@ void X11SalFrame::beginUnicodeSequence()
aEv.mnCursorPos = 0;
aEv.mnDeltaStart = 0;
aEv.mnCursorFlags = 0;
- aEv.mbOnlyCursor = FALSE;
+ aEv.mbOnlyCursor = sal_False;
CallCallback(SALEVENT_EXTTEXTINPUT, (void*)&aEv);
}
@@ -3185,7 +3185,7 @@ bool X11SalFrame::appendUnicodeSequence( sal_Unicode c )
aBuf.append( rSeq );
aBuf.append( c );
rSeq = aBuf.makeStringAndClear();
- std::vector<USHORT> attribs( rSeq.getLength(), SAL_EXTTEXTINPUT_ATTR_UNDERLINE );
+ std::vector<sal_uInt16> attribs( rSeq.getLength(), SAL_EXTTEXTINPUT_ATTR_UNDERLINE );
SalExtTextInputEvent aEv;
aEv.mnTime = 0;
@@ -3194,7 +3194,7 @@ bool X11SalFrame::appendUnicodeSequence( sal_Unicode c )
aEv.mnCursorPos = 0;
aEv.mnDeltaStart = 0;
aEv.mnCursorFlags = 0;
- aEv.mbOnlyCursor = FALSE;
+ aEv.mbOnlyCursor = sal_False;
CallCallback(SALEVENT_EXTTEXTINPUT, (void*)&aEv);
bRet = true;
@@ -3219,7 +3219,7 @@ bool X11SalFrame::endUnicodeSequence()
sal_Int32 nValue = aNumbers.toInt32( 16 );
if( nValue >= 32 )
{
- USHORT nTextAttr = SAL_EXTTEXTINPUT_ATTR_UNDERLINE;
+ sal_uInt16 nTextAttr = SAL_EXTTEXTINPUT_ATTR_UNDERLINE;
SalExtTextInputEvent aEv;
aEv.mnTime = 0;
aEv.maText = rtl::OUString( sal_Unicode(nValue) );
@@ -3227,7 +3227,7 @@ bool X11SalFrame::endUnicodeSequence()
aEv.mnCursorPos = 0;
aEv.mnDeltaStart = 0;
aEv.mnCursorFlags = 0;
- aEv.mbOnlyCursor = FALSE;
+ aEv.mbOnlyCursor = sal_False;
CallCallback(SALEVENT_EXTTEXTINPUT, (void*)&aEv);
}
}
@@ -3272,8 +3272,8 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
}
SalKeyEvent aKeyEvt;
- USHORT nKeyCode;
- USHORT nModCode = 0;
+ sal_uInt16 nKeyCode;
+ sal_uInt16 nModCode = 0;
char aDummy;
if( pEvent->state & ShiftMask )
@@ -3306,8 +3306,8 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
// the event state does not contain ControlMask. In the release
// event its the other way round: it does contain the Control mask.
// The modifier mode therefore has to be adapted manually.
- USHORT nExtModMask = 0;
- USHORT nModMask = 0;
+ sal_uInt16 nExtModMask = 0;
+ sal_uInt16 nModMask = 0;
switch( nKeySym )
{
case XK_Control_L:
@@ -3413,7 +3413,7 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
if( nModCode == (KEY_SHIFT | KEY_MOD1) && pEvent->type == XLIB_KeyPress )
{
- USHORT nSeqKeyCode = pDisplay_->GetKeyCode( nUnmodifiedKeySym, &aDummy );
+ sal_uInt16 nSeqKeyCode = pDisplay_->GetKeyCode( nUnmodifiedKeySym, &aDummy );
if( nSeqKeyCode == KEY_U )
{
beginUnicodeSequence();
@@ -3598,7 +3598,7 @@ long X11SalFrame::HandleFocusEvent( XFocusChangeEvent *pEvent )
if ((mpParent != NULL && nStyle_ == 0)
&& pSVData->maWinData.mpFirstFloat )
{
- ULONG nMode = pSVData->maWinData.mpFirstFloat->GetPopupModeFlags();
+ sal_uLong nMode = pSVData->maWinData.mpFirstFloat->GetPopupModeFlags();
pSVData->maWinData.mpFirstFloat->SetPopupModeFlags(
nMode & ~(FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE));
}
@@ -3621,7 +3621,7 @@ long X11SalFrame::HandleFocusEvent( XFocusChangeEvent *pEvent )
long X11SalFrame::HandleExposeEvent( XEvent *pEvent )
{
XRectangle aRect = { 0, 0, 0, 0 };
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
if( pEvent->type == Expose )
{
@@ -3812,9 +3812,9 @@ long X11SalFrame::HandleReparentEvent( XReparentEvent *pEvent )
XLIB_Window hWM_Parent;
XLIB_Window hRoot, *Children, hDummy;
unsigned int nChildren;
- BOOL bNone = pDisplay_->GetProperties()
+ sal_Bool bNone = pDisplay_->GetProperties()
& PROPERTY_SUPPORT_WM_Parent_Pixmap_None;
- BOOL bAccessParentWindow = ! (pDisplay_->GetProperties()
+ sal_Bool bAccessParentWindow = ! (pDisplay_->GetProperties()
& PROPERTY_FEATURE_TrustedSolaris);
static const char* pDisableStackingCheck = getenv( "SAL_DISABLE_STACKING_CHECK" );
@@ -3843,8 +3843,8 @@ long X11SalFrame::HandleReparentEvent( XReparentEvent *pEvent )
hWM_Parent = GetShellWindow();
break;
}
- /* #107048# this sometimes happens if a Show(TRUE) is
- * immediately followed by Show(FALSE) (which is braindead anyway)
+ /* #107048# this sometimes happens if a Show(sal_True) is
+ * immediately followed by Show(sal_False) (which is braindead anyway)
*/
if( hDummy == hWM_Parent )
hDummy = hRoot;
@@ -4190,7 +4190,7 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
if( -1 == nCaptured_ )
{
- CaptureMouse( TRUE );
+ CaptureMouse( sal_True );
#ifdef DBG_UTIL
if( -1 != nCaptured_ )
pDisplay_->PrintEvent( "Captured", pEvent );
@@ -4261,9 +4261,9 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
XUnmapWindow( GetXDisplay(), GetShellWindow() );
break;
}
- bMapped_ = TRUE;
- bViewable_ = TRUE;
- nRet = TRUE;
+ bMapped_ = sal_True;
+ bViewable_ = sal_True;
+ nRet = sal_True;
if ( mpInputContext != NULL )
mpInputContext->Map( this );
CallCallback( SALEVENT_RESIZE, NULL );
@@ -4351,7 +4351,7 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
RestackChildren();
- mbInShow = FALSE;
+ mbInShow = sal_False;
m_bSetFocusOnMap = false;
}
break;
@@ -4359,9 +4359,9 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
case UnmapNotify:
if( pEvent->xunmap.window == GetShellWindow() )
{
- bMapped_ = FALSE;
- bViewable_ = FALSE;
- nRet = TRUE;
+ bMapped_ = sal_False;
+ bViewable_ = sal_False;
+ nRet = sal_True;
if ( mpInputContext != NULL )
mpInputContext->Unmap( this );
CallCallback( SALEVENT_RESIZE, NULL );
@@ -4376,7 +4376,7 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
case VisibilityNotify:
nVisibility_ = pEvent->xvisibility.state;
- nRet = TRUE;
+ nRet = sal_True;
if( bAlwaysOnTop_
&& bMapped_
&& ! GetDisplay()->getWMAdaptor()->isAlwaysOnTopOK()
@@ -4475,7 +4475,7 @@ void X11SalFrame::ResetClipRegion()
op, ordering );
}
-void X11SalFrame::BeginSetClipRegion( ULONG nRects )
+void X11SalFrame::BeginSetClipRegion( sal_uLong nRects )
{
if( m_pClipRectangles )
delete [] m_pClipRectangles;
diff --git a/vcl/unx/source/window/salobj.cxx b/vcl/unx/source/window/salobj.cxx
index 2ff6d05c35c6..93aeeba66ee8 100644
--- a/vcl/unx/source/window/salobj.cxx
+++ b/vcl/unx/source/window/salobj.cxx
@@ -55,12 +55,12 @@
// =======================================================================
// SalInstance member to create and destroy a SalObject
-SalObject* X11SalInstance::CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow )
+SalObject* X11SalInstance::CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, sal_Bool bShow )
{
return X11SalObject::CreateObject( pParent, pWindowData, bShow );
}
-X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow )
+X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, sal_Bool bShow )
{
int error_base, event_base;
X11SalObject* pObject = new X11SalObject();
@@ -152,7 +152,7 @@ X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, SystemWindowData* p
pVisual,
CWEventMask|CWColormap, &aAttribs );
XSync( pDisp, False );
- BOOL bWasXError = pSalDisp->GetXLib()->HasXErrorOccured();
+ sal_Bool bWasXError = pSalDisp->GetXLib()->HasXErrorOccured();
pSalDisp->GetXLib()->PopXErrorLevel();
if( bWasXError )
{
@@ -179,7 +179,7 @@ X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, SystemWindowData* p
pObjData->pAppContext = NULL;
XSync(pDisp, False);
- BOOL bWasXError = pSalDisp->GetXLib()->HasXErrorOccured();
+ sal_Bool bWasXError = pSalDisp->GetXLib()->HasXErrorOccured();
pSalDisp->GetXLib()->PopXErrorLevel();
if( bWasXError )
{
@@ -219,7 +219,7 @@ SalClipRegion::~SalClipRegion()
void
-SalClipRegion::BeginSetClipRegion( ULONG nRects )
+SalClipRegion::BeginSetClipRegion( sal_uLong nRects )
{
if (ClipRectangleList)
delete [] ClipRectangleList;
@@ -324,7 +324,7 @@ X11SalObject::ResetClipRegion()
void
-X11SalObject::BeginSetClipRegion( ULONG nRectCount )
+X11SalObject::BeginSetClipRegion( sal_uLong nRectCount )
{
maClipRegion.BeginSetClipRegion ( nRectCount );
}
@@ -375,7 +375,7 @@ X11SalObject::EndSetClipRegion()
}
-USHORT
+sal_uInt16
X11SalObject::GetClipRegionType()
{
return maClipRegion.GetClipRegionType();
@@ -399,7 +399,7 @@ X11SalObject::SetPosSize( long nX, long nY, long nWidth, long nHeight )
void
-X11SalObject::Show( BOOL bVisible )
+X11SalObject::Show( sal_Bool bVisible )
{
if ( ! maSystemChildData.aWindow )
return;
@@ -420,7 +420,7 @@ X11SalObject::Show( BOOL bVisible )
// -----------------------------------------------------------------------
-void X11SalObject::Enable( BOOL )
+void X11SalObject::Enable( sal_Bool )
{
}
@@ -454,9 +454,9 @@ const SystemChildData* X11SalObject::GetSystemData() const
return &maSystemChildData;
}
-static USHORT sal_GetCode( int state )
+static sal_uInt16 sal_GetCode( int state )
{
- USHORT nCode = 0;
+ sal_uInt16 nCode = 0;
if( state & Button1Mask )
nCode |= MOUSE_LEFT;
@@ -512,7 +512,7 @@ long X11SalObject::Dispatch( XEvent* pEvent )
aEvt.mnTime = pEvent->xbutton.time;
aEvt.mnCode = sal_GetCode( pEvent->xbutton.state );
aEvt.mnButton = 0;
- USHORT nEvent = 0;
+ sal_uInt16 nEvent = 0;
if( pEvent->type == ButtonPress ||
pEvent->type == ButtonRelease )
{
@@ -537,10 +537,10 @@ long X11SalObject::Dispatch( XEvent* pEvent )
switch( pEvent->type )
{
case UnmapNotify:
- pObject->mbVisible = FALSE;
+ pObject->mbVisible = sal_False;
return 1;
case MapNotify:
- pObject->mbVisible = TRUE;
+ pObject->mbVisible = sal_True;
return 1;
case ButtonPress:
pObject->CallCallback( SALOBJ_EVENT_TOTOP, NULL );
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 48180bbe185b..b86b4cc29ed4 100755
--- a/vcl/win/inc/saldata.hxx
+++ b/vcl/win/inc/saldata.hxx
@@ -48,7 +48,7 @@ class Font;
struct HDCCache;
struct TempFontItem;
-typedef HRESULT (WINAPI *DwmIsCompositionEnabled_ptr)(WIN_BOOL*);
+typedef HRESULT (WINAPI *DwmIsCompositionEnabled_ptr)(BOOL*);
// --------------------
// - Standard-Defines -
@@ -88,7 +88,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
@@ -101,12 +101,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_uLong mnTimerMS; // Current Time (in MS) of the Timer
+ sal_uLong 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
@@ -122,20 +122,20 @@ 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
- BOOL mbThemeMenuSupport;
+ sal_Bool mbThemeChanged; // true if visual theme was changed: throw away theme handles
+ sal_Bool mbThemeMenuSupport;
// for GdiPlus GdiplusStartup/GdiplusShutdown
ULONG_PTR gdiplusToken;
@@ -161,9 +161,9 @@ struct SalShlData
UINT mnWheelScrollChars; // WheelScrollChars
UINT mnWheelMsgId; // Wheel-Message-Id fuer W95
WORD mnVersion; // System-Version (311 == 3.11)
- WIN_BOOL mbW40; // Is System-Version >= 4.0
- WIN_BOOL mbWXP; // Windows XP
- WIN_BOOL mbWPrinter; // true: use unicode printer functions
+ 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;
};
@@ -190,8 +190,8 @@ struct HDCCache
};
void ImplClearHDCCache( SalData* pData );
-HDC ImplGetCachedDC( ULONG nID, HBITMAP hBmp = 0 );
-void ImplReleaseCachedDC( ULONG nID );
+HDC ImplGetCachedDC( sal_uLong nID, HBITMAP hBmp = 0 );
+void ImplReleaseCachedDC( sal_uLong nID );
bool ImplAddTempFont( SalData&, const String& rFontFileURL );
void ImplReleaseTempFonts( SalData& );
@@ -202,7 +202,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();
@@ -214,11 +214,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_uLong ImplSalReleaseYieldMutex();
+void ImplSalAcquireYieldMutex( sal_uLong nCount );
sal_Bool ImplInterceptChildWindowKeyDown( MSG& rMsg );
// \\WIN\SOURCE\WINDOW\SALFRAME.CXX
@@ -230,16 +230,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
@@ -249,7 +249,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 );
@@ -350,10 +350,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 f592f53ae29c..70734846f445 100755
--- a/vcl/win/inc/salgdi.h
+++ b/vcl/win/inc/salgdi.h
@@ -58,8 +58,8 @@ class ImplWinFontData : public ImplFontData
{
public:
explicit ImplWinFontData( const ImplDevFontAttributes&,
- int nFontHeight, WIN_BYTE eWinCharSet,
- WIN_BYTE nPitchAndFamily );
+ int nFontHeight, BYTE eWinCharSet,
+ BYTE nPitchAndFamily );
virtual ~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:
@@ -152,24 +152,22 @@ public:
COLORREF mnTextColor; // TextColor
RGNDATA* mpClipRgnData; // ClipRegion-Data
RGNDATA* mpStdClipRgnData; // Cache Standard-ClipRegion-Data
- RECT* mpNextClipRect; // Naechstes ClipRegion-Rect
- 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 +181,24 @@ public:
virtual ~WinSalGraphics();
protected:
- virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight );
- virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& );
+ virtual bool setClipRegion( const Region& );
// 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&, double fTransparency, 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 sal_uInt8* pFlgAry );
+ virtual sal_Bool drawPolygonBezier( sal_uIntPtr nPoints, const SalPoint* pPtAry, const sal_uInt8* 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 +219,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 Rectangle& rControlRegion,
- const Point& aPos, BOOL& rIsInside );
- virtual BOOL drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
+ virtual sal_Bool hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
+ const Point& aPos, sal_Bool& rIsInside );
+ virtual sal_Bool drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
const rtl::OUString& aCaption );
- virtual BOOL drawNativeControlText( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
+ virtual sal_Bool drawNativeControlText( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
const rtl::OUString& aCaption );
- virtual BOOL getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState,
+ virtual sal_Bool getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState,
const ImplControlValue& aValue, const rtl::OUString& aCaption,
Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion );
@@ -250,17 +247,12 @@ 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;
// set the clip region to empty
virtual void ResetClipRegion();
- // begin setting the clip region, add rectangles to the
- // region with the UnionClipRegion call
- virtual void BeginSetClipRegion( ULONG nCount );
- // all rectangles were added and the clip region should be set now
- virtual void EndSetClipRegion();
// set the line color to transparent (= don't draw lines)
virtual void SetLineColor();
@@ -280,12 +272,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*, int nFallbackLevel );
// get kernign pairs of the current font
// return only PairCount if (pKernPairs == NULL)
- virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs );
+ virtual sal_uLong GetKernPairs( sal_uLong nPairs, ImplKernPairData* pKernPairs );
// get the repertoire of the current font
virtual const ImplFontCharMap* GetImplFontCharMap() const;
// graphics must fill supplied font list
@@ -306,7 +298,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 +336,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 +362,7 @@ void ImplGetLogFontFromFontSelect( 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 1ab59f8f7f9f..f08f99898915 100644..100755
--- 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 = sal_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,15 +75,15 @@ 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 bool CheckYieldMutex();
virtual void Yield( bool bWait, bool bHandleAllCurrentEvents );
- virtual bool AnyInput( USHORT nType );
- virtual SalMenu* CreateMenu( BOOL bMenuBar, Menu* );
+ virtual bool AnyInput( sal_uInt16 nType );
+ virtual SalMenu* CreateMenu( sal_Bool bMenuBar, Menu* );
virtual void DestroyMenu( SalMenu* );
- virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData );
+ virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData );
virtual void DestroyMenuItem( SalMenuItem* );
virtual SalSession* CreateSalSession();
virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes );
@@ -96,10 +96,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 = sal_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 ae7ea5271800..e262fd9bc10d 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
sal_Bool mbInterceptChildWindowKeyDown; // Intercept the KeyDown event sent to system child window
WinSalObject* mpNextObject; // pointer to next object
@@ -54,13 +54,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 5f94029ad817..1eb897b55b8d 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 )
@@ -131,29 +131,29 @@ 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 )
{
return PostMessageW( hWnd, nMsg, wParam, 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 = SendMessageW( hWnd, nMsg, wParam, lParam );
+ BOOL bRet = SendMessageW( hWnd, nMsg, wParam, lParam );
return bRet;
}
// -----------------------------------------------------------------------
-WIN_BOOL ImplGetMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax )
+BOOL ImplGetMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax )
{
return GetMessageW( lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax );
}
// -----------------------------------------------------------------------
-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 )
{
return PeekMessageW( lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg );
}
diff --git a/vcl/win/source/app/salinfo.cxx b/vcl/win/source/app/salinfo.cxx
index 14cb5d63437a..c635fdfc9845 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 2a2a1827a515..05cb20750abd 100755
--- 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_uLong 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_uLong GetAcquireCount( sal_uLong nThreadId );
};
// -----------------------------------------------------------------------
@@ -196,7 +196,7 @@ sal_Bool SAL_CALL SalYieldMutex::tryToAcquire()
// -----------------------------------------------------------------------
-ULONG SalYieldMutex::GetAcquireCount( ULONG nThreadId )
+sal_uLong SalYieldMutex::GetAcquireCount( sal_uLong 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_uLong ImplSalReleaseYieldMutex()
{
WinSalInstance* pInst = GetSalData()->mpFirstInstance;
if ( !pInst )
return 0;
SalYieldMutex* pYieldMutex = pInst->mpSalYieldMutex;
- ULONG nCount = pYieldMutex->GetAcquireCount( GetCurrentThreadId() );
- ULONG n = nCount;
+ sal_uLong nCount = pYieldMutex->GetAcquireCount( GetCurrentThreadId() );
+ sal_uLong n = nCount;
while ( n )
{
pYieldMutex->release();
@@ -307,7 +307,7 @@ ULONG ImplSalReleaseYieldMutex()
// -----------------------------------------------------------------------
-void ImplSalAcquireYieldMutex( ULONG nCount )
+void ImplSalAcquireYieldMutex( sal_uLong nCount )
{
WinSalInstance* pInst = GetSalData()->mpFirstInstance;
if ( !pInst )
@@ -637,14 +637,14 @@ vos::IMutex* WinSalInstance::GetYieldMutex()
// -----------------------------------------------------------------------
-ULONG WinSalInstance::ReleaseYieldMutex()
+sal_uLong WinSalInstance::ReleaseYieldMutex()
{
return ImplSalReleaseYieldMutex();
}
// -----------------------------------------------------------------------
-void WinSalInstance::AcquireYieldMutex( ULONG nCount )
+void WinSalInstance::AcquireYieldMutex( sal_uLong nCount )
{
ImplSalAcquireYieldMutex( nCount );
}
@@ -666,7 +666,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;
@@ -708,8 +708,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_uLong nCount = pYieldMutex->GetAcquireCount( nCurThreadId );
+ sal_uLong n = nCount;
while ( n )
{
pYieldMutex->release();
@@ -766,7 +766,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
@@ -781,11 +781,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_uLong) 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_uLong)wParam );
rDef = FALSE;
break;
case SAL_MSG_RECREATEHWND:
@@ -900,7 +900,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;
@@ -982,7 +982,7 @@ bool WinSalInstance::AnyInput( USHORT nType )
// -----------------------------------------------------------------------
-void SalTimer::Start( ULONG nMS )
+void SalTimer::Start( sal_uLong nMS )
{
// Um auf Main-Thread umzuschalten
SalData* pSalData = GetSalData();
@@ -999,7 +999,7 @@ void SalTimer::Start( ULONG nMS )
// -----------------------------------------------------------------------
-SalFrame* WinSalInstance::CreateChildFrame( SystemParentData* pSystemParentData, ULONG nSalFrameStyle )
+SalFrame* WinSalInstance::CreateChildFrame( SystemParentData* pSystemParentData, sal_uLong nSalFrameStyle )
{
// Um auf Main-Thread umzuschalten
return (SalFrame*)ImplSendMessage( mhComWnd, SAL_MSG_CREATEFRAME, nSalFrameStyle, (LPARAM)pSystemParentData->hWnd );
@@ -1007,7 +1007,7 @@ SalFrame* WinSalInstance::CreateChildFrame( SystemParentData* pSystemParentData,
// -----------------------------------------------------------------------
-SalFrame* WinSalInstance::CreateFrame( SalFrame* pParent, ULONG nSalFrameStyle )
+SalFrame* WinSalInstance::CreateFrame( SalFrame* pParent, sal_uLong nSalFrameStyle )
{
// Um auf Main-Thread umzuschalten
HWND hWndParent;
@@ -1029,7 +1029,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..6026f80e6346 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_uLong 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_uLong 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 141c812dcd31..8be85d210bd6 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_uLong 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_uLong 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_uLong 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_uLong nOffset = 0UL;
if( pBIH->biCompression == BI_BITFIELDS )
{
@@ -508,8 +508,8 @@ void WinSalBitmap::ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly )
if( !bReadOnly && !!pBuffer->maPalette )
{
PBITMAPINFO pBI = (PBITMAPINFO) GlobalLock( mhDIB );
- const USHORT nCount = pBuffer->maPalette.GetEntryCount();
- const USHORT nDIBColorCount = ImplGetDIBColorCount( mhDIB );
+ const sal_uInt16 nCount = pBuffer->maPalette.GetEntryCount();
+ const sal_uInt16 nDIBColorCount = ImplGetDIBColorCount( mhDIB );
memcpy( pBI->bmiColors, pBuffer->maPalette.ImplGetColorBuffer(), Min( nDIBColorCount, 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_uLong nWidthAl = AlignedWidth4Bytes( rSizePixel.Width() * ( bRLE4 ? 4UL : 8UL ) );
HPBYTE pLast = pDIB + rSizePixel.Height() * nWidthAl - 1;
- ULONG nCountByte;
- ULONG nRunByte;
- ULONG nX = 0;
- ULONG i;
+ sal_uLong nCountByte;
+ sal_uLong nRunByte;
+ sal_uLong nX = 0;
+ sal_uLong i;
BYTE cTmp;
bool bEndDecoding = FALSE;
diff --git a/vcl/win/source/gdi/salgdi.cxx b/vcl/win/source/gdi/salgdi.cxx
index eb260eb808c6..62bdb4403c1f 100644..100755
--- a/vcl/win/source/gdi/salgdi.cxx
+++ b/vcl/win/source/gdi/salgdi.cxx
@@ -37,9 +37,10 @@
#include <tools/debug.hxx>
#include <salframe.h>
#include <tools/poly.hxx>
-#ifndef _RTL_STRINGBUF_HXX
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <basegfx/polygon/b2dpolygontools.hxx>
#include <rtl/strbuf.hxx>
-#endif
+#include <vcl/region.h>
using namespace rtl;
@@ -189,7 +190,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 +241,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_uLong 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 +405,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 +552,7 @@ void ImplSalDeInitGraphics( WinSalGraphics* pData )
// =======================================================================
-HDC ImplGetCachedDC( ULONG nID, HBITMAP hBmp )
+HDC ImplGetCachedDC( sal_uLong nID, HBITMAP hBmp )
{
SalData* pSalData = GetSalData();
HDCCache* pC = &pSalData->mpHDCCache[ nID ];
@@ -585,7 +586,7 @@ HDC ImplGetCachedDC( ULONG nID, HBITMAP hBmp )
// =======================================================================
-void ImplReleaseCachedDC( ULONG nID )
+void ImplReleaseCachedDC( sal_uLong nID )
{
SalData* pSalData = GetSalData();
HDCCache* pC = &pSalData->mpHDCCache[ nID ];
@@ -598,7 +599,7 @@ void ImplReleaseCachedDC( ULONG nID )
void ImplClearHDCCache( SalData* pData )
{
- for( ULONG i = 0; i < CACHESIZE_HDC; i++ )
+ for( sal_uLong i = 0; i < CACHESIZE_HDC; i++ )
{
HDCCache* pC = &pData->mpHDCCache[ i ];
@@ -621,21 +622,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_uLong nPoly,
+ const sal_uLong* pPoints,
const SalPoint* const* pPtAry,
const BYTE* const* pFlgAry,
POINT* pWinPointAry,
BYTE* pWinFlagAry )
{
- ULONG nCurrPoly;
+ sal_uLong 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_uLong nCurrPoints = *pPoints++;
const bool bHaveFlagArray( pCurrFlag );
- ULONG nCurrPoint;
+ sal_uLong nCurrPoint;
if( nCurrPoints )
{
@@ -691,11 +692,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_uLong 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 +806,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 +850,7 @@ void WinSalGraphics::ResetClipRegion()
// -----------------------------------------------------------------------
-void WinSalGraphics::BeginSetClipRegion( ULONG nRectCount )
+bool WinSalGraphics::setClipRegion( const Region& i_rClip )
{
if ( mhRegion )
{
@@ -857,123 +858,143 @@ void WinSalGraphics::BeginSetClipRegion( ULONG nRectCount )
mhRegion = 0;
}
- ULONG nRectBufSize = sizeof(RECT)*nRectCount;
- if ( nRectCount < SAL_CLIPRECT_COUNT )
+ if( i_rClip.HasPolyPolygon() )
{
- if ( !mpStdClipRgnData )
- mpStdClipRgnData = (RGNDATA*)new BYTE[sizeof(RGNDATA)-1+(SAL_CLIPRECT_COUNT*sizeof(RECT))];
- mpClipRgnData = mpStdClipRgnData;
+ // TODO: ConvertToB2DPolyPolygon actually is kind of const, just it does not advertise it in the header
+ basegfx::B2DPolyPolygon aPolyPolygon( const_cast<Region&>(i_rClip).ConvertToB2DPolyPolygon() );
+ const sal_uInt32 nCount(aPolyPolygon.count());
+
+ if( nCount )
+ {
+ std::vector< POINT > aPolyPoints;
+ aPolyPoints.reserve( 1024 );
+ std::vector< INT > aPolyCounts( nCount, 0 );
+ for(sal_uInt32 a(0); a < nCount; a++)
+ {
+ basegfx::B2DPolygon aPoly( aPolyPolygon.getB2DPolygon(a) );
+ aPoly = basegfx::tools::adaptiveSubdivideByDistance( aPoly, 1 );
+ const sal_uInt32 nPoints = aPoly.count();
+ aPolyCounts[a] = nPoints;
+ for( sal_uInt32 b = 0; b < nPoints; b++ )
+ {
+ basegfx::B2DPoint aPt( aPoly.getB2DPoint( b ) );
+ POINT aPOINT;
+ aPOINT.x = (LONG)aPt.getX();
+ aPOINT.y = (LONG)aPt.getY();
+ aPolyPoints.push_back( aPOINT );
+ }
+ }
+ mhRegion = CreatePolyPolygonRgn( &aPolyPoints[0], &aPolyCounts[0], nCount, ALTERNATE );
+ }
}
else
- mpClipRgnData = (RGNDATA*)new BYTE[sizeof(RGNDATA)-1+nRectBufSize];
- mpClipRgnData->rdh.dwSize = sizeof( RGNDATAHEADER );
- mpClipRgnData->rdh.iType = RDH_RECTANGLES;
- mpClipRgnData->rdh.nCount = nRectCount;
- mpClipRgnData->rdh.nRgnSize = nRectBufSize;
- SetRectEmpty( &(mpClipRgnData->rdh.rcBound) );
- mpNextClipRect = (RECT*)(&(mpClipRgnData->Buffer));
- mbFirstClipRect = TRUE;
-}
-
-
-// -----------------------------------------------------------------------
-
-BOOL WinSalGraphics::unionClipRegion( long nX, long nY, long nWidth, long nHeight )
-{
- if ( nWidth && nHeight )
{
- RECT* pRect = mpNextClipRect;
- RECT* pBoundRect = &(mpClipRgnData->rdh.rcBound);
- long nRight = nX + nWidth;
- long nBottom = nY + nHeight;
+ ULONG nRectCount = i_rClip.GetRectCount();
- if ( mbFirstClipRect )
+ ULONG nRectBufSize = sizeof(RECT)*nRectCount;
+ if ( nRectCount < SAL_CLIPRECT_COUNT )
{
- pBoundRect->left = nX;
- pBoundRect->top = nY;
- pBoundRect->right = nRight;
- pBoundRect->bottom = nBottom;
- mbFirstClipRect = FALSE;
+ if ( !mpStdClipRgnData )
+ mpStdClipRgnData = (RGNDATA*)new BYTE[sizeof(RGNDATA)-1+(SAL_CLIPRECT_COUNT*sizeof(RECT))];
+ mpClipRgnData = mpStdClipRgnData;
}
else
+ mpClipRgnData = (RGNDATA*)new BYTE[sizeof(RGNDATA)-1+nRectBufSize];
+ mpClipRgnData->rdh.dwSize = sizeof( RGNDATAHEADER );
+ mpClipRgnData->rdh.iType = RDH_RECTANGLES;
+ mpClipRgnData->rdh.nCount = nRectCount;
+ mpClipRgnData->rdh.nRgnSize = nRectBufSize;
+ RECT* pBoundRect = &(mpClipRgnData->rdh.rcBound);
+ SetRectEmpty( pBoundRect );
+ RECT* pNextClipRect = (RECT*)(&(mpClipRgnData->Buffer));
+ bool bFirstClipRect = true;
+
+ ImplRegionInfo aInfo;
+ long nX, nY, nW, nH;
+ bool bRegionRect = i_rClip.ImplGetFirstRect(aInfo, nX, nY, nW, nH );
+ while( bRegionRect )
{
- if ( nX < pBoundRect->left )
- pBoundRect->left = (int)nX;
-
- if ( nY < pBoundRect->top )
- pBoundRect->top = (int)nY;
-
- if ( nRight > pBoundRect->right )
- pBoundRect->right = (int)nRight;
-
- if ( nBottom > pBoundRect->bottom )
- pBoundRect->bottom = (int)nBottom;
- }
-
- pRect->left = (int)nX;
- pRect->top = (int)nY;
- pRect->right = (int)nRight;
- pRect->bottom = (int)nBottom;
- mpNextClipRect++;
- }
- else
- {
- mpClipRgnData->rdh.nCount--;
- mpClipRgnData->rdh.nRgnSize -= sizeof( RECT );
- }
-
- return TRUE;
-}
+ if ( nW && nH )
+ {
+ long nRight = nX + nW;
+ long nBottom = nY + nH;
-// -----------------------------------------------------------------------
+ if ( bFirstClipRect )
+ {
+ pBoundRect->left = nX;
+ pBoundRect->top = nY;
+ pBoundRect->right = nRight;
+ pBoundRect->bottom = nBottom;
+ bFirstClipRect = false;
+ }
+ else
+ {
+ if ( nX < pBoundRect->left )
+ pBoundRect->left = (int)nX;
-bool WinSalGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& )
-{
- // TODO: implement and advertise OutDevSupport_B2DClip support
- return false;
-}
+ if ( nY < pBoundRect->top )
+ pBoundRect->top = (int)nY;
-// -----------------------------------------------------------------------
+ if ( nRight > pBoundRect->right )
+ pBoundRect->right = (int)nRight;
-void WinSalGraphics::EndSetClipRegion()
-{
- // create clip region from ClipRgnData
- if ( mpClipRgnData->rdh.nCount == 1 )
- {
- RECT* pRect = &(mpClipRgnData->rdh.rcBound);
- mhRegion = CreateRectRgn( pRect->left, pRect->top,
- pRect->right, pRect->bottom );
- }
- else
- {
- ULONG nSize = mpClipRgnData->rdh.nRgnSize+sizeof(RGNDATAHEADER);
- mhRegion = ExtCreateRegion( NULL, nSize, mpClipRgnData );
+ if ( nBottom > pBoundRect->bottom )
+ pBoundRect->bottom = (int)nBottom;
+ }
- // if ExtCreateRegion(...) is not supported
- if( !mhRegion )
+ pNextClipRect->left = (int)nX;
+ pNextClipRect->top = (int)nY;
+ pNextClipRect->right = (int)nRight;
+ pNextClipRect->bottom = (int)nBottom;
+ pNextClipRect++;
+ }
+ else
+ {
+ mpClipRgnData->rdh.nCount--;
+ mpClipRgnData->rdh.nRgnSize -= sizeof( RECT );
+ }
+ bRegionRect = i_rClip.ImplGetNextRect( aInfo, nX, nY, nW, nH );
+ }
+ // create clip region from ClipRgnData
+ if ( mpClipRgnData->rdh.nCount == 1 )
{
- RGNDATAHEADER* pHeader = (RGNDATAHEADER*) mpClipRgnData;
+ RECT* pRect = &(mpClipRgnData->rdh.rcBound);
+ mhRegion = CreateRectRgn( pRect->left, pRect->top,
+ pRect->right, pRect->bottom );
+ }
+ else if( mpClipRgnData->rdh.nCount > 1 )
+ {
+ ULONG nSize = mpClipRgnData->rdh.nRgnSize+sizeof(RGNDATAHEADER);
+ mhRegion = ExtCreateRegion( NULL, nSize, mpClipRgnData );
- if( pHeader->nCount )
+ // if ExtCreateRegion(...) is not supported
+ if( !mhRegion )
{
- RECT* pRect = (RECT*) mpClipRgnData->Buffer;
- mhRegion = CreateRectRgn( pRect->left, pRect->top, pRect->right, pRect->bottom );
- pRect++;
+ RGNDATAHEADER* pHeader = (RGNDATAHEADER*) mpClipRgnData;
- for( ULONG n = 1; n < pHeader->nCount; n++, pRect++ )
+ if( pHeader->nCount )
{
- HRGN hRgn = CreateRectRgn( pRect->left, pRect->top, pRect->right, pRect->bottom );
- CombineRgn( mhRegion, mhRegion, hRgn, RGN_OR );
- DeleteRegion( hRgn );
+ RECT* pRect = (RECT*) mpClipRgnData->Buffer;
+ mhRegion = CreateRectRgn( pRect->left, pRect->top, pRect->right, pRect->bottom );
+ pRect++;
+
+ for( ULONG n = 1; n < pHeader->nCount; n++, pRect++ )
+ {
+ HRGN hRgn = CreateRectRgn( pRect->left, pRect->top, pRect->right, pRect->bottom );
+ CombineRgn( mhRegion, mhRegion, hRgn, RGN_OR );
+ DeleteRegion( hRgn );
+ }
}
}
- }
- if ( mpClipRgnData != mpStdClipRgnData )
- delete [] mpClipRgnData;
+ if ( mpClipRgnData != mpStdClipRgnData )
+ delete [] mpClipRgnData;
+ }
}
- SelectClipRgn( mhDC, mhRegion );
+ if( mhRegion )
+ SelectClipRgn( mhDC, mhRegion );
+ return mhRegion != 0;
}
// -----------------------------------------------------------------------
@@ -1008,14 +1029,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 +1113,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 +1339,7 @@ void WinSalGraphics::drawRect( long nX, long nY, long nWidth, long nHeight )
// -----------------------------------------------------------------------
-void WinSalGraphics::drawPolyLine( ULONG nPoints, const SalPoint* pPtAry )
+void WinSalGraphics::drawPolyLine( sal_uLong nPoints, const SalPoint* pPtAry )
{
// Unter NT koennen wir das Array direkt weiterreichen
DBG_ASSERT( sizeof( POINT ) == sizeof( SalPoint ),
@@ -1333,7 +1354,7 @@ void WinSalGraphics::drawPolyLine( ULONG nPoints, const SalPoint* pPtAry )
// -----------------------------------------------------------------------
-void WinSalGraphics::drawPolygon( ULONG nPoints, const SalPoint* pPtAry )
+void WinSalGraphics::drawPolygon( sal_uLong nPoints, const SalPoint* pPtAry )
{
// Unter NT koennen wir das Array direkt weiterreichen
DBG_ASSERT( sizeof( POINT ) == sizeof( SalPoint ),
@@ -1421,7 +1442,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_uLong nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry )
{
#ifdef USE_GDI_BEZIERS
// Unter NT koennen wir das Array direkt weiterreichen
@@ -1438,7 +1459,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_uLong nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry )
{
#ifdef USE_GDI_BEZIERS
// Unter NT koennen wir das Array direkt weiterreichen
@@ -1497,8 +1518,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_uLong nCurrPoly, nTotalPoints;
+ const sal_uLong* pCurrPoints = pPoints;
for( nCurrPoly=0, nTotalPoints=0; nCurrPoly<nPoly; ++nCurrPoly )
nTotalPoints += *pCurrPoints++;
@@ -1550,11 +1571,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_uLong nComp, sal_uLong nSize )
{
while ( nComp-- >= nSize )
{
- ULONG i;
+ sal_uLong i;
for ( i = 0; i < nSize; i++ )
{
if ( ( pSource[i]&~0x20 ) != ( pDest[i]&~0x20 ) )
@@ -1567,9 +1588,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_uLong nSize )
{
- BOOL bRetValue = FALSE;
+ sal_Bool bRetValue = FALSE;
BYTE* pDest = ImplSearchEntry( pSource, (BYTE*)"%%BoundingBox:", nSize, 14 );
if ( pDest )
{
@@ -1584,9 +1605,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 +1650,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_uLong nSize )
{
- BOOL bRetValue = FALSE;
+ sal_Bool bRetValue = FALSE;
if ( mbPrinter )
{
@@ -1645,7 +1666,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 +1744,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 +1752,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 +1764,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_uLong nToDo = nSize;
+ sal_uLong nDoNow;
while ( nToDo )
{
nDoNow = nToDo;
@@ -1758,9 +1779,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_uLong nResult = Escape ( mhDC, nEscape, nDoNow + 2, (LPTSTR)aBuf.getStr(), 0 );
if (!nResult )
break;
nToDo -= nResult;
@@ -1769,13 +1790,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..dc3368c26912 100644..100755
--- a/vcl/win/source/gdi/salgdi2.cxx
+++ b/vcl/win/source/gdi/salgdi2.cxx
@@ -51,6 +51,9 @@ bool WinSalGraphics::supportsOperation( OutDevSupportType eType ) const
case OutDevSupport_TransparentRect:
bRet = mbVirDev || mbWindow;
break;
+ case OutDevSupport_B2DClip:
+ bRet = true;
+ break;
case OutDevSupport_B2DDraw:
bRet = bAllowForTest;
default: break;
@@ -147,7 +150,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 +347,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 +388,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 +670,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 +757,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_uLong 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 91662fb8aded..eded1a8f7aaf 100755
--- 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;
@@ -646,7 +646,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
@@ -1095,7 +1095,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 ),
@@ -1609,7 +1609,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 )
@@ -1796,12 +1796,12 @@ static void ImplGetAllFontCharSets( WinSalGraphics* pData )
static void ImplAddKerningPairs( WinSalGraphics* pData )
{
- ULONG nPairs = ::GetKerningPairsA( pData->mhDC, 0, NULL );
+ sal_uLong 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_uLong)GetTextCharset( pData->mhDC ), &aInfo, TCI_SRCCHARSET ) )
return;
if ( !pData->mpFontKernPairs )
@@ -1816,15 +1816,15 @@ static void ImplAddKerningPairs( WinSalGraphics* pData )
}
UINT nCP = aInfo.ciACP;
- ULONG nOldPairs = pData->mnFontKernPairCount;
+ sal_uLong nOldPairs = pData->mnFontKernPairCount;
KERNINGPAIR* pTempPair = pData->mpFontKernPairs+pData->mnFontKernPairCount;
nPairs = ::GetKerningPairsA( pData->mhDC, nPairs, pTempPair );
- for ( ULONG i = 0; i < nPairs; i++ )
+ for ( sal_uLong 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) )
@@ -1868,7 +1868,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_uLong j = 0; j < nOldPairs; j++ )
{
if ( (pTempPair2->wFirst == pTempPair->wFirst) &&
(pTempPair2->wSecond == pTempPair->wSecond) )
@@ -1893,7 +1893,7 @@ static void ImplAddKerningPairs( WinSalGraphics* pData )
// -----------------------------------------------------------------------
-ULONG WinSalGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs )
+sal_uLong WinSalGraphics::GetKernPairs( sal_uLong nPairs, ImplKernPairData* pKernPairs )
{
DBG_ASSERT( sizeof( KERNINGPAIR ) == sizeof( ImplKernPairData ),
"WinSalGraphics::GetKernPairs(): KERNINGPAIR != ImplKernPairData" );
@@ -2314,8 +2314,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;
@@ -2426,7 +2426,7 @@ void WinSalGraphics::GetDevFontSubstList( OutputDevice* )
// -----------------------------------------------------------------------
-BOOL WinSalGraphics::GetGlyphBoundRect( long nIndex, Rectangle& rRect )
+sal_Bool WinSalGraphics::GetGlyphBoundRect( long nIndex, Rectangle& rRect )
{
HDC hDC = mhDC;
@@ -2458,7 +2458,7 @@ BOOL WinSalGraphics::GetGlyphBoundRect( long nIndex, Rectangle& rRect )
// -----------------------------------------------------------------------
-BOOL WinSalGraphics::GetGlyphOutline( long nIndex,
+sal_Bool WinSalGraphics::GetGlyphOutline( long nIndex,
::basegfx::B2DPolyPolygon& rB2DPolyPoly )
{
rB2DPolyPoly.clear();
@@ -2700,7 +2700,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 )
{
@@ -2797,7 +2797,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;
@@ -2817,7 +2817,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
@@ -2888,7 +2888,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 97e3e1b48c79..403d6c3780cd 100755
--- 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 );
@@ -217,7 +217,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;
@@ -333,16 +333,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 Rectangle&,
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);
@@ -437,7 +437,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,
@@ -574,7 +574,7 @@ BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
if( aValue.getType() == CTRL_SPINBUTTONS )
{
const SpinbuttonValue *pValue = static_cast<const SpinbuttonValue*>(&aValue);
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
RECT rect;
ImplConvertSpinbuttonValues( pValue->mnUpperPart, pValue->mnUpperState, pValue->maUpperRect, &iPart, &iState, &rect );
@@ -599,7 +599,7 @@ BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
if( aValue.getType() == CTRL_SPINBUTTONS )
{
const SpinbuttonValue *pValue = static_cast<const SpinbuttonValue*>(&aValue);
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
RECT rect;
ImplConvertSpinbuttonValues( pValue->mnUpperPart, pValue->mnUpperState, pValue->maUpperRect, &iPart, &iState, &rect );
@@ -704,7 +704,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;
@@ -850,7 +850,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
@@ -1055,14 +1055,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 Rectangle& rControlRegion,
ControlState nState,
const ImplControlValue& aValue,
const OUString& aCaption )
{
- BOOL bOk = false;
+ sal_Bool bOk = false;
HTHEME hTheme = NULL;
switch( nType )
@@ -1187,7 +1187,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 Rectangle&,
ControlState,
@@ -1211,7 +1211,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 Rectangle& rControlRegion,
ControlState nState,
@@ -1220,7 +1220,7 @@ BOOL WinSalGraphics::getNativeControlRegion( ControlType nType,
Rectangle &rNativeBoundingRegion,
Rectangle &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 702ff639ed84..a235d6785706 100644..100755
--- a/vcl/win/source/gdi/salprn.cxx
+++ b/vcl/win/source/gdi/salprn.cxx
@@ -93,6 +93,7 @@
#endif
+using namespace com::sun::star;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::ui::dialogs;
@@ -128,9 +129,9 @@ static LPDEVMODEW SAL_DEVMODE_W( const ImplJobSetup* pSetupData )
// =======================================================================
-static ULONG ImplWinQueueStatusToSal( DWORD nWinStatus )
+static sal_uLong ImplWinQueueStatusToSal( DWORD nWinStatus )
{
- ULONG nStatus = 0;
+ sal_uLong nStatus = 0;
if ( nWinStatus & PRINTER_STATUS_PAUSED )
nStatus |= QUEUE_STATUS_PAUSED;
if ( nWinStatus & PRINTER_STATUS_ERROR )
@@ -192,7 +193,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 +263,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 +274,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 +447,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 +464,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 +534,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 +659,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 +683,7 @@ static BOOL ImplUpdateSalJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
LONG nSysJobSize = -1;
HWND hWnd = 0;
DWORD nMode = DM_OUT_BUFFER;
- ULONG nDriverDataLen = 0;
+ sal_uLong nDriverDataLen = 0;
SalDriverData* pOutBuffer = NULL;
BYTE* pInBuffer = NULL;
@@ -708,7 +709,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 +728,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_uLong nMutexCount=0;
if ( pVisibleDlgParent )
nMutexCount = ImplSalReleaseYieldMutex();
@@ -807,7 +808,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_uLong nFlags )
{
if ( !pSetupData || !pSetupData->mpDriverData )
return;
@@ -826,7 +827,7 @@ static void ImplDevModeToJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
// PaperBin
if ( nFlags & SAL_JOBSET_PAPERBIN )
{
- ULONG nCount = ImplDeviceCaps( pPrinter, DC_BINS, NULL, pSetupData );
+ sal_uLong nCount = ImplDeviceCaps( pPrinter, DC_BINS, NULL, pSetupData );
if ( nCount && (nCount != GDI_ERROR) )
{
@@ -835,11 +836,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_uLong i = 0; i < nCount; i++ )
{
if( CHOOSE_DEVMODE(dmDefaultSource) == pBins[ i ] )
{
- pSetupData->mnPaperBin = (USHORT)i;
+ pSetupData->mnPaperBin = (sal_uInt16)i;
break;
}
}
@@ -858,9 +859,9 @@ static void ImplDevModeToJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
}
else
{
- ULONG nPaperCount = ImplDeviceCaps( pPrinter, DC_PAPERS, NULL, pSetupData );
+ sal_uLong nPaperCount = ImplDeviceCaps( pPrinter, DC_PAPERS, NULL, pSetupData );
WORD* pPapers = NULL;
- ULONG nPaperSizeCount = ImplDeviceCaps( pPrinter, DC_PAPERSIZE, NULL, pSetupData );
+ sal_uLong nPaperSizeCount = ImplDeviceCaps( pPrinter, DC_PAPERSIZE, NULL, pSetupData );
POINT* pPaperSizes = NULL;
if ( nPaperCount && (nPaperCount != GDI_ERROR) )
{
@@ -874,7 +875,7 @@ static void ImplDevModeToJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
}
if( nPaperSizeCount == nPaperCount && pPaperSizes && pPapers )
{
- for( ULONG i = 0; i < nPaperCount; i++ )
+ for( sal_uLong i = 0; i < nPaperCount; i++ )
{
if( pPapers[ i ] == CHOOSE_DEVMODE(dmPaperSize) )
{
@@ -1075,7 +1076,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_uLong nFlags )
{
if ( !pSetupData || !pSetupData->mpDriverData )
return;
@@ -1095,7 +1096,7 @@ static void ImplJobSetupToDevMode( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
// PaperBin
if ( nFlags & SAL_JOBSET_PAPERBIN )
{
- ULONG nCount = ImplDeviceCaps( pPrinter, DC_BINS, NULL, pSetupData );
+ sal_uLong nCount = ImplDeviceCaps( pPrinter, DC_BINS, NULL, pSetupData );
if ( nCount && (nCount != GDI_ERROR) )
{
@@ -1273,9 +1274,9 @@ static void ImplJobSetupToDevMode( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
default:
{
short nPaper = 0;
- ULONG nPaperCount = ImplDeviceCaps( pPrinter, DC_PAPERS, NULL, pSetupData );
+ sal_uLong nPaperCount = ImplDeviceCaps( pPrinter, DC_PAPERS, NULL, pSetupData );
WORD* pPapers = NULL;
- ULONG nPaperSizeCount = ImplDeviceCaps( pPrinter, DC_PAPERSIZE, NULL, pSetupData );
+ sal_uLong 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 +1293,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_uLong i = 0; i < nPaperCount; i++ )
{
if ( aInfo.sloppyEqual(PaperInfo(pPaperSizes[i].x*10, pPaperSizes[i].y*10)))
{
@@ -1307,7 +1308,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_uLong i = 0; i < nPaperCount; i++ )
{
if ( aRotatedInfo.sloppyEqual(PaperInfo(pPaperSizes[i].x*10, pPaperSizes[i].y*10)) )
{
@@ -1463,7 +1464,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 +1624,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 +1637,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 +1646,7 @@ BOOL WinSalInfoPrinter::SetPrinterData( ImplJobSetup* pSetupData )
// -----------------------------------------------------------------------
-BOOL WinSalInfoPrinter::SetData( ULONG nFlags, ImplJobSetup* pSetupData )
+sal_Bool WinSalInfoPrinter::SetData( sal_uLong nFlags, ImplJobSetup* pSetupData )
{
ImplJobSetupToDevMode( this, pSetupData, nFlags );
if ( ImplUpdateSalJobSetup( this, pSetupData, TRUE, NULL ) )
@@ -1659,7 +1660,7 @@ BOOL WinSalInfoPrinter::SetData( ULONG nFlags, ImplJobSetup* pSetupData )
// -----------------------------------------------------------------------
-ULONG WinSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pSetupData )
+sal_uLong WinSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pSetupData )
{
DWORD nRet = ImplDeviceCaps( this, DC_BINS, NULL, pSetupData );
if ( nRet && (nRet != GDI_ERROR) )
@@ -1670,7 +1671,7 @@ ULONG WinSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pSetupData )
// -----------------------------------------------------------------------
-XubString WinSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pSetupData, ULONG nPaperBin )
+XubString WinSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pSetupData, sal_uLong nPaperBin )
{
XubString aPaperBinName;
@@ -1700,7 +1701,7 @@ XubString WinSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pSetupData, UL
// -----------------------------------------------------------------------
-ULONG WinSalInfoPrinter::GetCapabilities( const ImplJobSetup* pSetupData, USHORT nType )
+sal_uLong WinSalInfoPrinter::GetCapabilities( const ImplJobSetup* pSetupData, sal_uInt16 nType )
{
DWORD nRet;
@@ -1785,11 +1786,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
@@ -1829,19 +1830,19 @@ WIN_BOOL CALLBACK SalPrintAbortProc( HDC hPrnDC, int /* nError */ )
// -----------------------------------------------------------------------
-static LPDEVMODEA ImplSalSetCopies( LPDEVMODEA pDevMode, ULONG nCopies, BOOL bCollate )
+static LPDEVMODEA ImplSalSetCopies( LPDEVMODEA pDevMode, sal_uLong nCopies, sal_Bool bCollate )
{
LPDEVMODEA pNewDevMode = pDevMode;
if ( pDevMode && (nCopies > 1) )
{
if ( nCopies > 32765 )
nCopies = 32765;
- ULONG nDevSize = pDevMode->dmSize+pDevMode->dmDriverExtra;
+ sal_uLong 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;
@@ -1855,19 +1856,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_uLong nCopies, sal_Bool bCollate )
{
LPDEVMODEW pNewDevMode = pDevMode;
if ( pDevMode && (nCopies > 1) )
{
if ( nCopies > 32765 )
nCopies = 32765;
- ULONG nDevSize = pDevMode->dmSize+pDevMode->dmDriverExtra;
+ sal_uLong 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;
@@ -1963,10 +1964,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_uLong nCopies,
bool bCollate,
bool /*bDirect*/,
ImplJobSetup* pSetupData )
@@ -2055,7 +2056,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
{
@@ -2084,16 +2085,16 @@ BOOL WinSalPrinter::StartJob( const XubString* pFileName,
if( mpInfoPrinter->maPortName.EqualsIgnoreCaseAscii( "FILE:" ) && !(pFileName && pFileName->Len()) )
{
- Reference< XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
+ uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
if( xFactory.is() )
{
- Reference< XFilePicker > xFilePicker( xFactory->createInstance(
+ uno::Reference< XFilePicker > xFilePicker( xFactory->createInstance(
OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ) ) ),
UNO_QUERY );
DBG_ASSERT( xFilePicker.is(), "could not get FilePicker service" );
- Reference< XInitialization > xInit( xFilePicker, UNO_QUERY );
- Reference< XFilterManager > xFilterMgr( xFilePicker, UNO_QUERY );
+ uno::Reference< XInitialization > xInit( xFilePicker, UNO_QUERY );
+ uno::Reference< XFilterManager > xFilterMgr( xFilePicker, UNO_QUERY );
if( xInit.is() && xFilePicker.is() && xFilterMgr.is() )
{
Sequence< Any > aServiceType( 1 );
@@ -2187,7 +2188,7 @@ BOOL WinSalPrinter::StartJob( const XubString* pFileName,
// -----------------------------------------------------------------------
-BOOL WinSalPrinter::EndJob()
+sal_Bool WinSalPrinter::EndJob()
{
DWORD err = 0;
HDC hDC = mhDC;
@@ -2207,7 +2208,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_uLong nAcquire = pSalData->mpFirstInstance->ReleaseYieldMutex();
CATCH_DRIVER_EX_BEGIN;
if( ::EndDoc( hDC ) <= 0 )
err = GetLastError();
@@ -2223,7 +2224,7 @@ BOOL WinSalPrinter::EndJob()
// -----------------------------------------------------------------------
-BOOL WinSalPrinter::AbortJob()
+sal_Bool WinSalPrinter::AbortJob()
{
mbAbort = TRUE;
@@ -2280,7 +2281,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;
@@ -2335,7 +2336,7 @@ SalGraphics* WinSalPrinter::StartPage( ImplJobSetup* pSetupData, BOOL bNewJobDat
// -----------------------------------------------------------------------
-BOOL WinSalPrinter::EndPage()
+sal_Bool WinSalPrinter::EndPage()
{
HDC hDC = mhDC;
if ( hDC && mpGraphics )
@@ -2365,7 +2366,7 @@ BOOL WinSalPrinter::EndPage()
// -----------------------------------------------------------------------
-ULONG WinSalPrinter::GetErrorCode()
+sal_uLong 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 a4c588f059d4..14b9fd5a59c2 100755
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -1211,7 +1211,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..eb53fb4d8699 100644..100755
--- a/vcl/win/source/gdi/wntgdi.cxx
+++ b/vcl/win/source/gdi/wntgdi.cxx
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index 89a191c99ef6..c1b3a632556e 100755
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -104,6 +104,7 @@ using ::std::max;
#include <time.h>
using ::rtl::OUString;
+using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::container;
@@ -128,8 +129,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 +138,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 +169,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;
@@ -352,13 +353,13 @@ void ImplSalGetWorkArea( HWND hWnd, RECT *pRect, const RECT *pParentRect )
// =======================================================================
SalFrame* ImplSalCreateFrame( WinSalInstance* pInst,
- HWND hWndParent, ULONG nSalFrameStyle )
+ HWND hWndParent, sal_uLong 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 );
@@ -594,7 +595,7 @@ 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 );
@@ -618,7 +619,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
@@ -875,11 +876,11 @@ static void ImplSalCalcFullScreenSize( const WinSalFrame* pFrame,
try
{
- Reference< XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW );
- Reference< XIndexAccess > xMultiMon( xFactory->createInstance(OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.DisplayAccess" ) ) ), UNO_QUERY_THROW );
+ uno::Reference< XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW );
+ uno::Reference< XIndexAccess > xMultiMon( xFactory->createInstance(OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.DisplayAccess" ) ) ), UNO_QUERY_THROW );
if( (pFrame->mnDisplay >= 0) && (pFrame->mnDisplay < xMultiMon->getCount()) )
{
- Reference< XPropertySet > xMonitor( xMultiMon->getByIndex( pFrame->mnDisplay ), UNO_QUERY_THROW );
+ uno::Reference< XPropertySet > xMonitor( xMultiMon->getByIndex( pFrame->mnDisplay ), UNO_QUERY_THROW );
com::sun::star::awt::Rectangle aRect;
if( xMonitor->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "ScreenArea" ) ) ) >>= aRect )
{
@@ -915,7 +916,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 ) )
{
@@ -1179,9 +1180,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 );
}
// -----------------------------------------------------------------------
@@ -1199,7 +1200,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 )
@@ -1256,7 +1257,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 )
@@ -1371,7 +1372,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.
@@ -1384,7 +1385,7 @@ void WinSalFrame::Show( BOOL bVisible, BOOL bNoActivate )
// -----------------------------------------------------------------------
-void WinSalFrame::Enable( BOOL bEnable )
+void WinSalFrame::Enable( sal_Bool bEnable )
{
EnableWindow( mhWnd, bEnable );
}
@@ -1406,9 +1407,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();
@@ -1423,7 +1424,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
@@ -1575,7 +1576,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) )
@@ -1618,7 +1619,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;
@@ -1651,8 +1652,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;
@@ -1892,8 +1893,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;
@@ -1974,7 +1975,7 @@ void WinSalFrame::SetWindowState( const SalFrameState* pState )
// -----------------------------------------------------------------------
-BOOL WinSalFrame::GetWindowState( SalFrameState* pState )
+sal_Bool WinSalFrame::GetWindowState( SalFrameState* pState )
{
if ( maState.mnWidth && maState.mnHeight )
{
@@ -2024,7 +2025,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;
@@ -2057,7 +2058,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 );
@@ -2089,7 +2090,7 @@ void WinSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay )
// -----------------------------------------------------------------------
-void WinSalFrame::StartPresentation( BOOL bStart )
+void WinSalFrame::StartPresentation( sal_Bool bStart )
{
if ( mbPresentation == bStart )
return;
@@ -2144,7 +2145,7 @@ void WinSalFrame::StartPresentation( BOOL bStart )
// -----------------------------------------------------------------------
-void WinSalFrame::SetAlwaysOnTop( BOOL bOnTop )
+void WinSalFrame::SetAlwaysOnTop( sal_Bool bOnTop )
{
HWND hWnd;
if ( bOnTop )
@@ -2156,7 +2157,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 )
@@ -2212,7 +2213,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
@@ -2363,7 +2364,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
@@ -2405,7 +2406,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 )
@@ -2472,7 +2473,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 )
@@ -2490,7 +2491,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 );
@@ -2564,7 +2565,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 ];
@@ -2574,26 +2575,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_uLong)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_uLong)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_uLong)1) << 25);
ImplGetKeyNameText( nSysCode, aKeyBuf, nKeyBufLen, nMaxKeyLen, "Shift" );
}
- USHORT nCode = nKeyCode & 0x0FFF;
- ULONG nSysCode2 = 0;
+ sal_uInt16 nCode = nKeyCode & 0x0FFF;
+ sal_uLong nSysCode2 = 0;
sal_Char* pReplace = NULL;
sal_Unicode cSVCode = 0;
sal_Char aFBuf[4];
@@ -2632,42 +2633,42 @@ XubString WinSalFrame::GetKeyName( USHORT nKeyCode )
{
case KEY_DOWN:
nSysCode = VK_DOWN;
- nSysCode2 = (((ULONG)1) << 24);
+ nSysCode2 = (((sal_uLong)1) << 24);
pReplace = "Down";
break;
case KEY_UP:
nSysCode = VK_UP;
- nSysCode2 = (((ULONG)1) << 24);
+ nSysCode2 = (((sal_uLong)1) << 24);
pReplace = "Up";
break;
case KEY_LEFT:
nSysCode = VK_LEFT;
- nSysCode2 = (((ULONG)1) << 24);
+ nSysCode2 = (((sal_uLong)1) << 24);
pReplace = "Left";
break;
case KEY_RIGHT:
nSysCode = VK_RIGHT;
- nSysCode2 = (((ULONG)1) << 24);
+ nSysCode2 = (((sal_uLong)1) << 24);
pReplace = "Right";
break;
case KEY_HOME:
nSysCode = VK_HOME;
- nSysCode2 = (((ULONG)1) << 24);
+ nSysCode2 = (((sal_uLong)1) << 24);
pReplace = "Home";
break;
case KEY_END:
nSysCode = VK_END;
- nSysCode2 = (((ULONG)1) << 24);
+ nSysCode2 = (((sal_uLong)1) << 24);
pReplace = "End";
break;
case KEY_PAGEUP:
nSysCode = VK_PRIOR;
- nSysCode2 = (((ULONG)1) << 24);
+ nSysCode2 = (((sal_uLong)1) << 24);
pReplace = "Page Up";
break;
case KEY_PAGEDOWN:
nSysCode = VK_NEXT;
- nSysCode2 = (((ULONG)1) << 24);
+ nSysCode2 = (((sal_uLong)1) << 24);
pReplace = "Page Down";
break;
case KEY_RETURN:
@@ -2692,12 +2693,12 @@ XubString WinSalFrame::GetKeyName( USHORT nKeyCode )
break;
case KEY_INSERT:
nSysCode = VK_INSERT;
- nSysCode2 = (((ULONG)1) << 24);
+ nSysCode2 = (((sal_uLong)1) << 24);
pReplace = "Insert";
break;
case KEY_DELETE:
nSysCode = VK_DELETE;
- nSysCode2 = (((ULONG)1) << 24);
+ nSysCode2 = (((sal_uLong)1) << 24);
pReplace = "Delete";
break;
@@ -2752,12 +2753,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 );
}
@@ -2835,13 +2836,13 @@ static long ImplA2I( const BYTE* pStr )
}
// -----------------------------------------------------------------------
-static HRESULT WINAPI backwardCompatibleDwmIsCompositionEnabled( WIN_BOOL* pOut )
+static HRESULT WINAPI backwardCompatibleDwmIsCompositionEnabled( BOOL* pOut )
{
*pOut = FALSE;
return S_OK;
}
-static WIN_BOOL ImplDwmIsCompositionEnabled()
+static BOOL ImplDwmIsCompositionEnabled()
{
SalData* pSalData = GetSalData();
if( ! pSalData->mpDwmIsCompositionEnabled )
@@ -2853,7 +2854,7 @@ static WIN_BOOL ImplDwmIsCompositionEnabled()
if( ! pSalData->mpDwmIsCompositionEnabled ) // something failed
pSalData->mpDwmIsCompositionEnabled = backwardCompatibleDwmIsCompositionEnabled;
}
- WIN_BOOL aResult = FALSE;
+ BOOL aResult = FALSE;
HRESULT nError = pSalData->mpDwmIsCompositionEnabled( &aResult );
return nError == S_OK && aResult;
}
@@ -2883,7 +2884,7 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings )
&nType, aValueBuf, &nValueSize ) == ERROR_SUCCESS )
{
if ( nType == REG_SZ )
- aMouseSettings.SetMenuDelay( (ULONG)ImplA2I( aValueBuf ) );
+ aMouseSettings.SetMenuDelay( (sal_uLong)ImplA2I( aValueBuf ) );
}
RegCloseKey( hRegKey );
@@ -2985,9 +2986,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 ) );
}
@@ -3067,10 +3068,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_uLong nDragFullOptions = aStyleSettings.GetDragFullOptions();
if ( bDragFull )
nDragFullOptions |= DRAGFULL_OPTION_WINDOWMOVE | DRAGFULL_OPTION_WINDOWSIZE | DRAGFULL_OPTION_DOCKING | DRAGFULL_OPTION_SPLIT;
else
@@ -3093,7 +3094,7 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings )
{
if ( nType == REG_SZ )
{
- nValue = (ULONG)ImplA2I( aValueBuf );
+ nValue = (sal_uLong)ImplA2I( aValueBuf );
if ( (nValue > 1000) && (nValue < 10000) )
{
MiscSettings aMiscSettings = rSettings.GetMiscSettings();
@@ -3124,7 +3125,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 );
@@ -3209,11 +3210,11 @@ void WinSalFrame::ResetClipRegion()
// -----------------------------------------------------------------------
-void WinSalFrame::BeginSetClipRegion( ULONG nRects )
+void WinSalFrame::BeginSetClipRegion( sal_uLong nRects )
{
if( mpClipRgnData )
delete [] (BYTE*)mpClipRgnData;
- ULONG nRectBufSize = sizeof(RECT)*nRects;
+ sal_uLong nRectBufSize = sizeof(RECT)*nRects;
mpClipRgnData = (RGNDATA*)new BYTE[sizeof(RGNDATA)-1+nRectBufSize];
mpClipRgnData->rdh.dwSize = sizeof( RGNDATAHEADER );
mpClipRgnData->rdh.iType = RDH_RECTANGLES;
@@ -3285,7 +3286,7 @@ void WinSalFrame::EndSetClipRegion()
}
else
{
- ULONG nSize = mpClipRgnData->rdh.nRgnSize+sizeof(RGNDATAHEADER);
+ sal_uLong nSize = mpClipRgnData->rdh.nRgnSize+sizeof(RGNDATAHEADER);
hRegion = ExtCreateRegion( NULL, nSize, mpClipRgnData );
}
delete [] (BYTE*)mpClipRgnData;
@@ -3330,8 +3331,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 );
@@ -3565,9 +3566,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 )
@@ -3575,7 +3576,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
@@ -3589,7 +3590,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) )
@@ -3606,7 +3607,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 )
{
@@ -3646,9 +3647,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
@@ -3688,14 +3689,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
@@ -3755,11 +3756,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
@@ -3827,7 +3828,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 )
@@ -3861,11 +3862,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;
@@ -3980,8 +3981,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 )
@@ -3994,8 +3995,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 );
@@ -4030,9 +4031,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 )
@@ -4064,7 +4065,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;
@@ -4420,7 +4421,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;
@@ -4516,7 +4517,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();
@@ -4534,7 +4535,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
@@ -4553,8 +4554,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;
@@ -4747,7 +4748,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;
@@ -4902,9 +4903,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;
@@ -5048,7 +5049,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
@@ -5083,7 +5084,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;
@@ -5183,8 +5184,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)) ||
@@ -5248,7 +5249,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 )
@@ -5337,9 +5338,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();
@@ -5367,10 +5368,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;
@@ -5411,7 +5412,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 )
{
@@ -5420,23 +5421,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;
@@ -5499,9 +5500,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 );
@@ -5547,9 +5548,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();
@@ -5735,8 +5736,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_uLong nTmpStart = pReconvertString->dwCompStrOffset / sizeof(WCHAR);
+ sal_uLong nTmpEnd = nTmpStart + pReconvertString->dwCompStrLen;
if( nTmpStart != aEvt.mnStart || nTmpEnd != aEvt.mnEnd )
{
@@ -6124,11 +6125,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:
@@ -6136,7 +6137,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_uLong)(void*)wParam );
rDef = FALSE;
break;
@@ -6303,11 +6304,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;
@@ -6326,7 +6327,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
@@ -6334,7 +6335,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 47da911b012e..23295838bfc9 100644..100755
--- 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, Menu* )
+SalMenu* WinSalInstance::CreateMenu( sal_Bool bMenuBar, Menu* )
{
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 bf0f29bb72d3..00ee39092aff 100644
--- a/vcl/win/source/window/salobj.cxx
+++ b/vcl/win/source/window/salobj.cxx
@@ -43,7 +43,7 @@
// =======================================================================
-static BOOL ImplIsSysWindowOrChild( HWND hWndParent, HWND hWndChild )
+static sal_Bool ImplIsSysWindowOrChild( HWND hWndParent, HWND hWndChild )
{
if ( hWndParent == hWndChild )
return TRUE;
@@ -202,7 +202,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();
@@ -227,7 +227,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)) )
@@ -255,13 +255,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 )
@@ -379,7 +379,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
@@ -714,16 +714,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_uLong nRectCount )
{
- ULONG nRectBufSize = sizeof(RECT)*nRectCount;
+ sal_uLong nRectBufSize = sizeof(RECT)*nRectCount;
if ( nRectCount < SAL_CLIPRECT_COUNT )
{
if ( !mpStdClipRgnData )
@@ -795,7 +795,7 @@ void WinSalObject::EndSetClipRegion()
}
else
{
- ULONG nSize = mpClipRgnData->rdh.nRgnSize+sizeof(RGNDATAHEADER);
+ sal_uLong nSize = mpClipRgnData->rdh.nRgnSize+sizeof(RGNDATAHEADER);
hRegion = ExtCreateRegion( NULL, nSize, mpClipRgnData );
if ( mpClipRgnData != mpStdClipRgnData )
delete [] (BYTE*)mpClipRgnData;
@@ -809,8 +809,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_uLong nStyle = 0;
+ sal_Bool bVisible = (GetWindowStyle( mhWnd ) & WS_VISIBLE) != 0;
if ( bVisible )
{
ShowWindow( mhWnd, SW_HIDE );
@@ -823,7 +823,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 );
@@ -833,7 +833,7 @@ void WinSalObject::Show( BOOL bVisible )
// -----------------------------------------------------------------------
-void WinSalObject::Enable( BOOL bEnable )
+void WinSalObject::Enable( sal_Bool bEnable )
{
EnableWindow( mhWnd, bEnable );
}
diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx
index 9122a1addc0a..53dd111c7694 100755
--- a/vcl/workben/outdevgrind.cxx
+++ b/vcl/workben/outdevgrind.cxx
@@ -74,7 +74,7 @@ class GrindApp : public Application
{
public:
virtual void Main();
- virtual USHORT Exception( USHORT nError );
+ virtual sal_uInt16 Exception( sal_uInt16 nError );
};
class TestWindow : public Dialog
@@ -153,7 +153,7 @@ void setupMethodStubs( functor_vector_type& res )
const Wallpaper aWallpaper( aWhiteColor );
GDIMetaFile aMtf;
- aMtf.AddAction( new MetaFillColorAction(Color(COL_RED),TRUE) );
+ aMtf.AddAction( new MetaFillColorAction(Color(COL_RED),sal_True) );
aMtf.AddAction( new MetaRectAction(aRect) );
/* void DrawText( const Point& rStartPt, const XubString& rStr,
@@ -165,7 +165,7 @@ void setupMethodStubs( functor_vector_type& res )
// boost::bind(
// &OutputDevice::DrawText,
// _1,
-// aPt1, aString, (USHORT)0, aString.Len(), (MetricVector*)0, (String*)0, (vcl::ITextLayout*)0 ));
+// aPt1, aString, (sal_uInt16)0, aString.Len(), (MetricVector*)0, (String*)0, (vcl::ITextLayout*)0 ));
/* void DrawTextArray( const Point& rStartPt, const XubString& rStr,
const sal_Int32* pDXAry = NULL,
@@ -177,7 +177,7 @@ void setupMethodStubs( functor_vector_type& res )
boost::bind(
&OutputDevice::DrawTextArray,
_1,
- aPt1, aString, (const sal_Int32*)0, (USHORT)0, aString.Len() ));
+ aPt1, aString, (const sal_Int32*)0, (sal_uInt16)0, aString.Len() ));
/* void DrawPixel( const Point& rPt, const Color& rColor ); */
add(res,
@@ -256,12 +256,12 @@ void setupMethodStubs( functor_vector_type& res )
aRect ));
/* void DrawRect( const Rectangle& rRect,
- ULONG nHorzRount, ULONG nVertRound );
+ sal_uLong nHorzRount, sal_uLong nVertRound );
*/
add(res,
"DrawRect(round corners)",
boost::bind(
- (void (OutputDevice::*)( const Rectangle&, ULONG nHorzRount, ULONG nVertRound ))(
+ (void (OutputDevice::*)( const Rectangle&, sal_uLong nHorzRount, sal_uLong nVertRound ))(
&OutputDevice::DrawRect),
_1,
aRect2,
@@ -352,14 +352,14 @@ void setupMethodStubs( functor_vector_type& res )
/* void CopyArea( const Point& rDestPt,
const Point& rSrcPt, const Size& rSrcSize,
- USHORT nFlags = 0 );
+ sal_uInt16 nFlags = 0 );
*/
add(res,
"CopyArea",
boost::bind(
&OutputDevice::CopyArea,
_1,
- aPt1,aPt3,aRect2.GetSize(),(USHORT)0 ));
+ aPt1,aPt3,aRect2.GetSize(),(sal_uInt16)0 ));
/* void DrawBitmap( const Point& rDestPt,
const Bitmap& rBitmap );
@@ -696,20 +696,20 @@ void setupMethodStubs( functor_vector_type& res )
aPt1,aRect.GetSize(),aPt3,aRect2.GetSize(),aBitmap,aBlackColor ));
/* void DrawImage( const Point& rPos,
- const Image& rImage, USHORT nStyle = 0 );
+ const Image& rImage, sal_uInt16 nStyle = 0 );
*/
add(res,
"DrawImage",
boost::bind(
(void (OutputDevice::*)( const Point&,
const Image&,
- USHORT nStyle ))(
+ sal_uInt16 nStyle ))(
&OutputDevice::DrawImage),
_1,
- aPt1,aImage,(USHORT)0 ));
+ aPt1,aImage,(sal_uInt16)0 ));
/* void DrawImage( const Point& rPos, const Size& rSize,
- const Image& rImage, USHORT nStyle = 0 );
+ const Image& rImage, sal_uInt16 nStyle = 0 );
*/
add(res,
"DrawImage(scaled)",
@@ -717,10 +717,10 @@ void setupMethodStubs( functor_vector_type& res )
(void (OutputDevice::*)( const Point&,
const Size&,
const Image&,
- USHORT nStyle ))(
+ sal_uInt16 nStyle ))(
&OutputDevice::DrawImage),
_1,
- aPt1,aRect.GetSize(),aImage,(USHORT)0 ));
+ aPt1,aRect.GetSize(),aImage,(sal_uInt16)0 ));
/* void DrawGradient( const Rectangle& rRect, const Gradient& rGradient ); */
add(res,
@@ -756,15 +756,15 @@ void setupMethodStubs( functor_vector_type& res )
_1,
aRect2,aWallpaper ));
- /* void DrawWaveLine( const Point& rStartPos, const Point& rEndPos, USHORT nStyle ); */
+ /* void DrawWaveLine( const Point& rStartPos, const Point& rEndPos, sal_uInt16 nStyle ); */
add(res,
"DrawWaveLine",
boost::bind(
&OutputDevice::DrawWaveLine,
_1,
- aPt1,aPt2,(USHORT)WAVE_NORMAL ));
+ aPt1,aPt2,(sal_uInt16)WAVE_NORMAL ));
- /* void DrawGrid( const Rectangle& rRect, const Size& rDist, ULONG nFlags ); */
+ /* void DrawGrid( const Rectangle& rRect, const Size& rDist, sal_uLong nFlags ); */
add(res,
"DrawGrid",
boost::bind(
@@ -773,15 +773,15 @@ void setupMethodStubs( functor_vector_type& res )
aRect,Size(10,20),GRID_HORZLINES|GRID_VERTLINES ));
/* void DrawTransparent( const PolyPolygon& rPolyPoly,
- USHORT nTransparencePercent );
+ sal_uInt16 nTransparencePercent );
*/
add(res,
"DrawTransparent",
boost::bind(
- (void (OutputDevice::*)( const PolyPolygon&, USHORT ))(
+ (void (OutputDevice::*)( const PolyPolygon&, sal_uInt16 ))(
&OutputDevice::DrawTransparent),
_1,
- aPoly3,(USHORT)50 ));
+ aPoly3,(sal_uInt16)50 ));
/* void DrawTransparent( const GDIMetaFile& rMtf,
const Point& rPos, const Size& rSize,
@@ -902,7 +902,7 @@ void TestWindow::Paint( const Rectangle& )
fflush( stdout );
}
-USHORT GrindApp::Exception( USHORT nError )
+sal_uInt16 GrindApp::Exception( sal_uInt16 nError )
{
switch( nError & EXC_MAJORTYPE )
{
@@ -918,7 +918,7 @@ void GrindApp::Main()
{
bool bHelp = false;
- for( USHORT i = 0; i < GetCommandLineParamCount(); i++ )
+ for( sal_uInt16 i = 0; i < GetCommandLineParamCount(); i++ )
{
::rtl::OUString aParam = GetCommandLineParam( i );
diff --git a/vcl/workben/svpclient.cxx b/vcl/workben/svpclient.cxx
index 61ed22ca95e7..f35946fb1129 100644
--- a/vcl/workben/svpclient.cxx
+++ b/vcl/workben/svpclient.cxx
@@ -140,7 +140,7 @@ public:
void Paint( const Rectangle& rRect );
void Resize();
- BOOL Close();
+ sal_Bool Close();
void parseList( const rtl::OString& rList );
rtl::OString processCommand( const rtl::OString& rCommand );
@@ -189,9 +189,9 @@ MyWin::MyWin( Window* pParent, WinBits nWinStyle ) :
m_aQuitButton.Show();
}
-BOOL MyWin::Close()
+sal_Bool MyWin::Close()
{
- BOOL bRet = WorkWindow::Close();
+ sal_Bool bRet = WorkWindow::Close();
if( bRet )
Application::Quit();
return bRet;
@@ -272,7 +272,7 @@ IMPL_LINK( MyWin, QuitHdl, Button*, )
IMPL_LINK( MyWin, SelectHdl, ListBox*, )
{
String aEntry = m_aSvpBitmaps.GetSelectEntry();
- USHORT nPos = aEntry.SearchAscii( ": " );
+ sal_uInt16 nPos = aEntry.SearchAscii( ": " );
if( nPos != STRING_NOTFOUND )
{
OStringBuffer aCommand( 64 );
@@ -291,7 +291,7 @@ IMPL_LINK( MyWin, SelectHdl, ListBox*, )
aFixedSize.Width() += 10;
aFixedSize.Height() += 10;
m_aImage.SetSizePixel( aFixedSize );
- m_aImage.SetBitmap( BitmapEx( aBitmap ) );
+ m_aImage.SetImage( Image( BitmapEx( aBitmap ) ) );
}
return 0;
}
diff --git a/vcl/workben/svptest.cxx b/vcl/workben/svptest.cxx
index 8f901d1c200b..aec1eb4ae63a 100644
--- a/vcl/workben/svptest.cxx
+++ b/vcl/workben/svptest.cxx
@@ -188,7 +188,7 @@ static Point project( const Point& rPoint )
static Color approachColor( const Color& rFrom, const Color& rTo )
{
Color aColor;
- UINT8 nDiff;
+ sal_uInt8 nDiff;
// approach red
if( rFrom.GetRed() < rTo.GetRed() )
{