/sccomp/

ce-5-2 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiaofei Zhang <Zhangxiaofei@openoffice.org>2010-07-29 10:56:19 +0800
committerXiaofei Zhang <Zhangxiaofei@openoffice.org>2010-07-29 10:56:19 +0800
commitd210c6ccc30466e98240c1409df0550514668d68 (patch)
tree0c94d52ecaebd283a92275cb372d5ddf926f5131
parent7f0993d43019a0ccb7f89c11fc23704c063b902f (diff)
#i112600#: clean up l10ntools, rsc, sot, svl, tools and unotools
Diffstat
-rw-r--r--l10ntools/inc/cfgmerge.hxx14
-rw-r--r--l10ntools/inc/export.hxx128
-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
-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/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.cxx30
-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.cxx50
-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/inc/vclrsc.hxx4
-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.cxx104
-rw-r--r--rsc/source/parser/rsckey.cxx10
-rw-r--r--rsc/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.cxx58
-rw-r--r--rsc/source/res/rscmgr.cxx32
-rw-r--r--rsc/source/res/rscrange.cxx106
-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/rscpp/cpp.h20
-rw-r--r--rsc/source/rscpp/cpp1.c46
-rw-r--r--rsc/source/rscpp/cpp2.c50
-rw-r--r--rsc/source/rscpp/cpp3.c32
-rw-r--r--rsc/source/rscpp/cpp4.c34
-rw-r--r--rsc/source/rscpp/cpp5.c10
-rw-r--r--rsc/source/rscpp/cpp6.c72
-rw-r--r--rsc/source/rscpp/cppdef.h50
-rw-r--r--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/inc/absdev.hxx2
-rw-r--r--sot/inc/agg.hxx16
-rw-r--r--sot/inc/filelist.hxx6
-rw-r--r--sot/inc/sot/exchange.hxx180
-rw-r--r--sot/inc/sot/factory.hxx10
-rw-r--r--sot/inc/sot/formats.hxx276
-rw-r--r--sot/inc/sot/object.hxx66
-rw-r--r--sot/inc/sot/sotdata.hxx2
-rw-r--r--sot/inc/sot/storage.hxx90
-rw-r--r--sot/inc/stg.hxx280
-rw-r--r--sot/inc/storinfo.hxx16
-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/object.cxx74
-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--svl/inc/broadcast.hxx2
-rw-r--r--svl/inc/cntnrsrt.hxx38
-rw-r--r--svl/inc/converter.hxx4
-rw-r--r--svl/inc/instrm.hxx16
-rw-r--r--svl/inc/listener.hxx8
-rw-r--r--svl/inc/lngmisc.hxx14
-rw-r--r--svl/inc/outstrm.hxx10
-rw-r--r--svl/inc/poolcach.hxx2
-rw-r--r--svl/inc/strmadpt.hxx16
-rw-r--r--svl/inc/svl/aeitem.hxx30
-rw-r--r--svl/inc/svl/brdcst.hxx8
-rw-r--r--svl/inc/svl/cancel.hxx16
-rw-r--r--svl/inc/svl/cenumitm.hxx64
-rw-r--r--svl/inc/svl/cintitem.hxx112
-rw-r--r--svl/inc/svl/cnclhint.hxx6
-rw-r--r--svl/inc/svl/cntwall.hxx24
-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.hxx314
-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/intitem.hxx52
-rw-r--r--svl/inc/svl/itemiter.hxx12
-rw-r--r--svl/inc/svl/itempool.hxx128
-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/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/ownlist.hxx4
-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/restrictedpaths.hxx6
-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/style.hxx120
-rw-r--r--svl/inc/svl/svarray.hxx310
-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.hxx70
-rw-r--r--svl/inc/svl/visitem.hxx24
-rw-r--r--svl/inc/svl/zforlist.hxx194
-rw-r--r--svl/inc/svl/zformat.hxx226
-rw-r--r--svl/inc/whiter.hxx16
-rw-r--r--svl/source/config/languageoptions.cxx2
-rw-r--r--svl/source/filerec/filerec.cxx212
-rw-r--r--svl/source/inc/passwordcontainer.hxx6
-rw-r--r--svl/source/inc/poolio.hxx100
-rw-r--r--svl/source/items/aeitem.cxx50
-rw-r--r--svl/source/items/cenumitm.cxx52
-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.cxx150
-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.cxx6
-rw-r--r--svl/source/items/poolio.cxx388
-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.cxx112
-rw-r--r--svl/source/misc/adrparse.cxx2
-rw-r--r--svl/source/misc/folderrestriction.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/restrictedpaths.cxx2
-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/cancel.cxx16
-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/nbdll.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.cxx492
-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/ddedll.cxx2
-rw-r--r--svl/source/svdde/ddeimp.hxx26
-rw-r--r--svl/source/svdde/ddeml1.cxx432
-rw-r--r--svl/source/svdde/ddeml2.cxx270
-rw-r--r--svl/source/svdde/ddemldeb.cxx38
-rw-r--r--svl/source/svdde/ddemlimp.hxx190
-rw-r--r--svl/source/svdde/ddemlos2.h78
-rw-r--r--svl/source/svdde/ddesvr.cxx102
-rw-r--r--svl/source/svsql/converter.cxx4
-rw-r--r--svl/source/undo/undo.cxx106
-rw-r--r--svl/unx/source/svdde/ddedummy.cxx52
-rw-r--r--tools/bootstrp/addexes/replace.cxx2
-rw-r--r--tools/bootstrp/addexes2/mkfilt.cxx32
-rw-r--r--tools/bootstrp/command.cxx26
-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.cxx246
-rw-r--r--tools/bootstrp/rscdep.cxx10
-rw-r--r--tools/bootstrp/sstring.cxx66
-rw-r--r--tools/inc/bootstrp/command.hxx14
-rw-r--r--tools/inc/bootstrp/inimgr.hxx2
-rw-r--r--tools/inc/bootstrp/listmacr.hxx4
-rw-r--r--tools/inc/bootstrp/mkcreate.hxx54
-rw-r--r--tools/inc/bootstrp/prj.hxx72
-rw-r--r--tools/inc/bootstrp/sstring.hxx12
-rw-r--r--tools/inc/impcont.hxx32
-rw-r--r--tools/inc/poly.h34
-rw-r--r--tools/inc/tools/bigint.hxx8
-rw-r--r--tools/inc/tools/cachestr.hxx22
-rw-r--r--tools/inc/tools/color.hxx110
-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/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
-rw-r--r--tools/inc/tools/globname.hxx30
-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.hxx28
-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/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/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.h137
-rw-r--r--tools/inc/tools/stack.hxx22
-rw-r--r--tools/inc/tools/stream.hxx24
-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/wldcrd.hxx8
-rw-r--r--tools/inc/tools/zcodec.hxx50
-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.cxx88
-rw-r--r--tools/source/debug/stcktree.cxx62
-rw-r--r--tools/source/fsys/comdep.hxx12
-rw-r--r--tools/source/fsys/dirent.cxx146
-rw-r--r--tools/source/fsys/filecopy.cxx8
-rw-r--r--tools/source/fsys/fstat.cxx36
-rw-r--r--tools/source/fsys/tdir.cxx74
-rw-r--r--tools/source/fsys/wldcrd.cxx12
-rw-r--r--tools/source/fsys/wntmsc.cxx98
-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
-rw-r--r--tools/source/memtools/contnr.cxx116
-rw-r--r--tools/source/memtools/mempool.cxx2
-rw-r--r--tools/source/memtools/multisel.cxx130
-rw-r--r--tools/source/memtools/table.cxx82
-rw-r--r--tools/source/memtools/unqidx.cxx60
-rw-r--r--tools/source/rc/rc.cxx18
-rw-r--r--tools/source/rc/resmgr.cxx120
-rw-r--r--tools/source/ref/errinf.cxx84
-rw-r--r--tools/source/ref/globname.cxx136
-rw-r--r--tools/source/ref/pstm.cxx218
-rw-r--r--tools/source/stream/cachestr.cxx32
-rw-r--r--tools/source/stream/stream.cxx124
-rw-r--r--tools/source/stream/strmos2.cxx108
-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--unotools/inc/unotools/accelcfg.hxx2
-rw-r--r--unotools/inc/unotools/accessiblerelationsethelper.hxx4
-rw-r--r--unotools/inc/unotools/accessiblestatesethelper.hxx12
-rw-r--r--unotools/inc/unotools/componentresmodule.hxx4
-rw-r--r--unotools/inc/unotools/configitem.hxx2
-rw-r--r--unotools/inc/unotools/configpathes.hxx10
-rw-r--r--unotools/inc/unotools/configvaluecontainer.hxx12
-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.hxx64
-rw-r--r--unotools/inc/unotools/misccfg.hxx12
-rw-r--r--unotools/inc/unotools/pathoptions.hxx2
-rw-r--r--unotools/inc/unotools/regoptions.hxx2
-rw-r--r--unotools/inc/unotools/searchopt.hxx110
-rw-r--r--unotools/inc/unotools/securityoptions.hxx2
-rwxr-xr-x[-rw-r--r--]unotools/inc/unotools/syslocaleoptions.hxx20
-rw-r--r--unotools/inc/unotools/textsearch.hxx10
-rw-r--r--unotools/inc/unotools/ucbhelper.hxx6
-rw-r--r--unotools/inc/unotools/ucblockbytes.hxx10
-rw-r--r--unotools/inc/unotools/useroptions.hxx38
-rw-r--r--unotools/source/accessibility/accessiblerelationsethelper.cxx4
-rw-r--r--unotools/source/accessibility/accessiblestatesethelper.cxx12
-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/menuoptions.cxx12
-rw-r--r--unotools/source/config/misccfg.cxx42
-rw-r--r--unotools/source/config/moduleoptions.cxx2
-rw-r--r--unotools/source/config/pathoptions.cxx16
-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.cxx20
-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
437 files changed, 12077 insertions, 12136 deletions
diff --git a/l10ntools/inc/cfgmerge.hxx b/l10ntools/inc/cfgmerge.hxx
index ae0708f5ff05..e0c2c0cf61f2 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_uIntPtr 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_uIntPtr nPos = LIST_APPEND );
- ByteString GetAccessPath( ULONG nPos = LIST_APPEND );
+ ByteString GetAccessPath( sal_uIntPtr 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 d1474503882f..8828594c54fd 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_uIntPtr nSourceLanguageListEntryCount;
public:
ExportList() : ExportListBase() { nSourceLanguageListEntryCount = 0; }
- ULONG GetSourceLanguageListEntryCount() { return nSourceLanguageListEntryCount; }
+ sal_uIntPtr 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_uIntPtr nLevel; // res. recursiv? how deep?
+ sal_uInt16 nList; // cur. res. is String- or FilterList
ByteString nListLang;
- ULONG nListIndex;
- ULONG nListLevel;
+ sal_uIntPtr nListIndex;
+ sal_uIntPtr 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; }
};
@@ -460,8 +460,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 );
};
@@ -495,7 +495,7 @@ public:
PFormEntrys* GetPFObject( const ByteString& rPFO );
ByteString Dump();
- BOOL operator==( ResData *pData );
+ sal_Bool operator==( ResData *pData );
};
//
@@ -509,7 +509,7 @@ public:
class MergeDataFile
{
private:
- BOOL bErrorLog;
+ sal_Bool bErrorLog;
ByteString sErrorLog;
SvFileStream aErrLog;
ByteStringSet aLanguageSet;
@@ -520,7 +520,7 @@ private:
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();
@@ -536,7 +536,7 @@ public:
const ByteString &rQHTEXT, const ByteString &rTITLE ,
const ByteString &sFilename , bool bCaseSensitive
);
- static USHORT GetLangIndex( USHORT nId );
+ static sal_uInt16 GetLangIndex( sal_uInt16 nId );
static ByteString CreateKey( const ByteString& rTYP , const ByteString& rGID , const ByteString& rLID , const ByteString& rFilename , bool bCaseSensitive = false );
ByteString Dump();
diff --git a/l10ntools/inc/gsicheck.hxx b/l10ntools/inc/gsicheck.hxx
index fb1eecd38c82..49a1f861eed0 100644
--- a/l10ntools/inc/gsicheck.hxx
+++ b/l10ntools/inc/gsicheck.hxx
@@ -41,7 +41,7 @@ private:
ParserMessageList aMessages;
LineFormat aFormat;
- ULONG nLineNumber;
+ sal_uIntPtr 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_uIntPtr nLine );
LineFormat GetLineFormat() const { return aFormat; }
- ULONG GetLineNumber() const { return nLineNumber; }
+ sal_uIntPtr 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_uIntPtr nLine, ByteString aUniqueId = ByteString() );
+ void PrintError( ByteString aMsg, ByteString aPrefix, ByteString aContext, sal_uIntPtr 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_uIntPtr 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 923da89988b6..ba8577c0fc04 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, bool bQuiet_in );
+ LngParser( const ByteString &rLngFile, sal_Bool bUTF8, sal_Bool bULFFormat, bool bQuiet_in );
~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..90b19037e6e9 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_uIntPtr i = 0 ; i < Count() ; i++ )
delete TokenListImpl::GetObject( i );
TokenListImpl::Clear();
}
- void Insert( TokenInfo p, ULONG nIndex = LIST_APPEND )
+ void Insert( TokenInfo p, sal_uIntPtr nIndex = LIST_APPEND )
{ TokenListImpl::Insert( new TokenInfo(p), nIndex ); }
-/* TokenInfo Remove( ULONG nIndex )
+/* TokenInfo Remove( sal_uIntPtr 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_uIntPtr nIndex ) const
{
// if ( TokenListImpl::GetObject(nIndex) )
return *TokenListImpl::GetObject(nIndex);
// else
// return TokenInfo();
}
-/* ULONG GetPos( const TokenInfo p ) const
+/* sal_uIntPtr GetPos( const TokenInfo p ) const
{
- for ( ULONG i = 0 ; i < Count() ; i++ )
+ for ( sal_uIntPtr 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_uIntPtr 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..cb72ca532afe 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_uIntPtr nLine; // error line number
+ sal_uIntPtr 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..692571b1166d 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_uIntPtr 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_uIntPtr 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..906173998b1c 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_uIntPtr 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_uIntPtr 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/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx
index 170c2922d9ce..3f27fe60a493 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;
bool bQuiet;
ByteString sPrj;
ByteString sPrjRoot;
@@ -78,19 +78,19 @@ 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;
bQuiet = false;
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++ ) {
@@ -114,19 +114,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 == "-QQ" ) {
bQuiet = true;
@@ -144,7 +144,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: {
@@ -162,7 +162,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: {
@@ -175,7 +175,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;
@@ -320,19 +320,19 @@ CfgStackData* CfgStack::Push( const ByteString &rTag, const ByteString &rId )
CfgStack::~CfgStack()
/*****************************************************************************/
{
- for ( ULONG i = 0; i < Count(); i++ )
+ for ( sal_uIntPtr i = 0; i < Count(); i++ )
delete GetObject( i );
}
/*****************************************************************************/
-ByteString CfgStack::GetAccessPath( ULONG nPos )
+ByteString CfgStack::GetAccessPath( sal_uIntPtr nPos )
/*****************************************************************************/
{
if ( nPos == LIST_APPEND )
nPos = Count() - 1;
ByteString sReturn;
- for ( ULONG i = 0; i <= nPos; i++ ) {
+ for ( sal_uIntPtr i = 0; i <= nPos; i++ ) {
if ( i )
sReturn += ".";
sReturn += GetStackData( i )->GetIdentifier();
@@ -342,7 +342,7 @@ ByteString CfgStack::GetAccessPath( ULONG nPos )
}
/*****************************************************************************/
-CfgStackData *CfgStack::GetStackData( ULONG nPos )
+CfgStackData *CfgStack::GetStackData( sal_uIntPtr nPos )
/*****************************************************************************/
{
if ( nPos == LIST_APPEND )
@@ -359,7 +359,7 @@ CfgStackData *CfgStack::GetStackData( ULONG nPos )
CfgParser::CfgParser()
/*****************************************************************************/
: pStackData( NULL ),
- bLocalize( FALSE )
+ bLocalize( sal_False )
{
}
@@ -371,7 +371,7 @@ CfgParser::~CfgParser()
/*****************************************************************************/
-BOOL CfgParser::IsTokenClosed( const ByteString &rToken )
+sal_Bool CfgParser::IsTokenClosed( const ByteString &rToken )
/*****************************************************************************/
{
return rToken.GetChar( rToken.Len() - 2 ) == '/';
@@ -385,7 +385,7 @@ void CfgParser::AddText(
)
/*****************************************************************************/
{
- USHORT nTextLen = 0;
+ sal_uInt16 nTextLen = 0;
while ( rText.Len() != nTextLen ) {
nTextLen = rText.Len();
rText.SearchAndReplaceAll( "\n", " " );
@@ -418,7 +418,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:
@@ -450,7 +450,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=";
@@ -470,7 +470,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;
@@ -488,7 +488,7 @@ int CfgParser::ExecuteAnalyzedToken( int nToken, char *pToken )
ByteString sTemp( sToken );
sTemp.ToUpperAscii();
bLocalize = (( sTemp.Search( "CFG:TYPE=\"STRING\"" ) != STRING_NOTFOUND ) &&
- ( sTemp.Search( "CFG:LOCALIZED=\"TRUE\"" ) != STRING_NOTFOUND ));
+ ( sTemp.Search( "CFG:LOCALIZED=\"sal_True\"" ) != STRING_NOTFOUND ));
}
}
else if ( sTokenName == "label" ) {
@@ -525,11 +525,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;
}
@@ -734,9 +734,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(
@@ -786,9 +786,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 ) {
@@ -816,7 +816,7 @@ void CfgMerge::Output( const ByteString& rOutput )
pOutputStream->Write( rOutput.GetBuffer(), rOutput.Len());
}
-ULONG CfgStack::Push( CfgStackData *pStackData )
+sal_uIntPtr CfgStack::Push( CfgStackData *pStackData )
{
Insert( pStackData, LIST_APPEND );
return Count() - 1;
@@ -836,7 +836,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") ) &&
@@ -878,6 +878,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 59f29525eda4..36ec7985a26a 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;
bool bQuiet;
ByteString sPrj;
ByteString sPrjRoot;
@@ -85,12 +85,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 = "";
@@ -99,8 +99,8 @@ extern char *GetOutputFile( int argc, char* argv[])
sTempFile = "";
pTempFile = NULL;
bQuiet = false;
- 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++ ) {
@@ -127,24 +127,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;
@@ -156,7 +156,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: {
@@ -173,7 +173,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: {
@@ -186,7 +186,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;
@@ -249,8 +249,8 @@ extern FILE *GetNextFile()
ByteString sOrigFile( sFileName );
sFileName = Export::GetNativeFile( sFileName );
- delete aInputFileList.GetObject(( ULONG ) 0 );
- aInputFileList.Remove(( ULONG ) 0 );
+ delete aInputFileList.GetObject(( sal_uIntPtr ) 0 );
+ aInputFileList.Remove(( sal_uIntPtr ) 0 );
if ( sFileName == "" ) {
fprintf( stderr, "ERROR: Could not precompile File %s\n",
@@ -336,7 +336,7 @@ int GetError()
// get error at global instance of class Export
if ( pExport->GetError())
return 1;
- return FALSE;
+ return sal_False;
}
}
@@ -384,7 +384,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 )
@@ -408,10 +408,10 @@ BOOL ResData::SetId( const ByteString &rId, USHORT nLevel )
sId.EraseTrailingChars( '\t' );
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//
@@ -419,14 +419,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 ),
@@ -436,9 +436,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 );
@@ -463,15 +463,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 ),
@@ -480,11 +480,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;
@@ -509,15 +509,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_uIntPtr ) 0 );
+ aResStack.Remove(( sal_uIntPtr ) 0 );
}
}
@@ -531,8 +531,8 @@ Export::~Export()
if ( bEnableExport )
aOutput.Close();
while ( aResStack.Count()) {
- delete aResStack.GetObject(( ULONG ) 0 );
- aResStack.Remove(( ULONG ) 0 );
+ delete aResStack.GetObject(( sal_uIntPtr ) 0 );
+ aResStack.Remove(( sal_uIntPtr ) 0 );
}
if ( bMergeMode && !bUnmerge ) {
@@ -555,16 +555,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" )))) {
@@ -608,21 +608,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;
@@ -635,20 +635,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;
@@ -656,7 +656,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;
@@ -665,7 +665,7 @@ int Export::Execute( int nToken, const char * pToken )
}
if ( nOpen < nClose )
- bExecuteDown = TRUE;
+ bExecuteDown = sal_True;
}
switch ( nToken ) {
@@ -685,17 +685,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
@@ -732,12 +732,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
@@ -760,13 +760,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 );
@@ -777,11 +777,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 );
@@ -791,7 +791,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 );
@@ -803,7 +803,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( ' ' );
@@ -822,7 +822,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;
@@ -833,7 +833,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;
@@ -843,7 +843,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;
@@ -857,15 +857,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 ) {
@@ -878,7 +878,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;
@@ -886,7 +886,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;
@@ -895,7 +895,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;
@@ -904,7 +904,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;
@@ -912,7 +912,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;
@@ -922,7 +922,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
@@ -944,11 +944,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;*/
}
}
}
@@ -975,7 +975,7 @@ int Export::Execute( int nToken, const char * pToken )
break;
case LONGTEXTLINE:
case TEXTLINE:
- bDontWriteOutput = FALSE;
+ bDontWriteOutput = sal_False;
if ( nLevel ) {
CutComment( sToken );
@@ -1008,7 +1008,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 );
@@ -1029,7 +1029,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());
@@ -1054,7 +1054,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 )
@@ -1073,7 +1073,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 )
@@ -1097,7 +1097,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, '*' );
@@ -1107,7 +1107,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, '=' );
@@ -1119,18 +1119,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 ) {};
@@ -1159,16 +1159,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 );
@@ -1176,7 +1176,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( ' ' );
@@ -1199,11 +1199,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" ) ||
@@ -1222,7 +1222,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++ );
}
@@ -1246,8 +1246,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 ) == '\"' )
@@ -1266,8 +1266,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;
@@ -1277,7 +1277,7 @@ void Export::UnmergeUTF8( ByteString& sOrig ){
}
/*****************************************************************************/
-BOOL Export::ListExists( ResData *pResData, USHORT nLst )
+sal_Bool Export::ListExists( ResData *pResData, sal_uInt16 nLst )
/*****************************************************************************/
{
switch ( nLst ) {
@@ -1287,20 +1287,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();
@@ -1461,7 +1461,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 ; > ;
@@ -1489,8 +1489,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;
@@ -1504,7 +1504,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_uIntPtr 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");
@@ -1567,7 +1567,7 @@ BOOL Export::WriteExportList( ResData *pResData, ExportList *pExportList,
if ( bCreateNew )
delete pExportList;
- return TRUE;
+ return sal_True;
}
/*****************************************************************************/
@@ -1577,7 +1577,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 += ".";
@@ -1707,7 +1707,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 ) == '\\' ) ||
@@ -1745,14 +1745,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 ) {
@@ -1812,7 +1812,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++ );
@@ -1820,7 +1820,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++ );
}
@@ -1828,7 +1828,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;
@@ -1836,13 +1836,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 );
@@ -1859,11 +1859,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()) {
@@ -1912,13 +1912,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;
@@ -1933,7 +1933,7 @@ BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp,
case LIST_ITEM :
{
if ( bUnmerge )
- return TRUE;
+ return sal_True;
ExportList *pList = NULL;
switch ( nTyp ) {
@@ -1980,17 +1980,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 --;
@@ -2022,22 +2022,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 ++;
}
@@ -2045,19 +2045,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 --;
@@ -2092,7 +2092,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;
@@ -2100,12 +2100,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 ));
@@ -2121,11 +2121,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;}
@@ -2149,8 +2149,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;
@@ -2158,7 +2158,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) {
@@ -2167,7 +2167,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")) {
@@ -2188,8 +2188,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 );
}
@@ -2203,15 +2203,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) {
@@ -2220,7 +2220,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") ) {
@@ -2237,8 +2237,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 );
}
@@ -2250,15 +2250,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) {
@@ -2267,7 +2267,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") ) {
@@ -2284,8 +2284,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 );
}
@@ -2309,9 +2309,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;
@@ -2323,7 +2323,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 ) ){
@@ -2334,18 +2334,18 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
pResData->sId = ByteString("1");
PFormEntrys *pEntrys;
- ULONG nLIndex = 0;
- ULONG nMaxIndex = 0;
+ sal_uIntPtr nLIndex = 0;
+ sal_uIntPtr 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" ) ){
@@ -2408,7 +2408,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
}
}
- USHORT nStart, nEnd;
+ sal_uInt16 nStart, nEnd;
nStart = sLine.Search( "\"" );
ByteString sPostFix;
@@ -2492,7 +2492,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
}
nListIndex++;
- ULONG nMaxIndex = 0;
+ sal_uIntPtr nMaxIndex = 0;
if ( pList )
nMaxIndex = pList->GetSourceLanguageListEntryCount();
ByteString sLine;
@@ -2517,7 +2517,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++;
@@ -2547,15 +2547,15 @@ void Export::SetChildWithText()
/*****************************************************************************/
{
if ( aResStack.Count() > 1 ) {
- for ( ULONG i = 0; i < aResStack.Count() - 1; i++ ) {
- aResStack.GetObject( i )->bChildWithText = TRUE;
+ for ( sal_uIntPtr 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 8a384b415b6f..b6c42d27303c 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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/gsicheck.cxx b/l10ntools/source/gsicheck.cxx
index 1ec9827a753d..67e736377c80 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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..64ec6e38af5b 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_uIntPtr 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_uIntPtr nMaxLines = (sal_uIntPtr) 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_uIntPtr nLine = 0;
+ sal_uIntPtr 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 49a59266a85d..e185b77cad54 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;
@@ -64,21 +64,21 @@ ByteString sSDFFile;
bool bQuiet;
/*****************************************************************************/
-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 = "";
bQuiet = false;
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++ ) {
@@ -109,18 +109,18 @@ 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() == "-QQ" ) {
bQuiet = true;
}
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;
@@ -128,12 +128,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: {
@@ -159,7 +159,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: {
@@ -175,12 +175,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;
}
@@ -233,8 +233,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 );
@@ -266,8 +266,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 0ab7e6eb5c2e..8fb40c329e59 100644
--- a/l10ntools/source/helpmerge.cxx
+++ b/l10ntools/source/helpmerge.cxx
@@ -271,7 +271,7 @@ bool HelpParser::CreateSDF(
DirEntry aTempFile( sUsedTempFile );
aTempFile.Kill();
}
- return TRUE;
+ return sal_True;
}
ByteString HelpParser::makeAbsolutePath( const ByteString& sHelpFile , const ByteString& rRoot_in )
@@ -585,9 +585,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 c593b85d4932..4b9a3683ff47 100644
--- a/l10ntools/source/lngex.cxx
+++ b/l10ntools/source/lngex.cxx
@@ -48,11 +48,11 @@
// 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
bool bQuiet;
ByteString sPrj;
ByteString sPrjRoot;
@@ -60,21 +60,21 @@ 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;
bQuiet = 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++ ) {
@@ -100,19 +100,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;
@@ -120,12 +120,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: {
@@ -143,7 +143,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: {
@@ -156,13 +156,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 5f40a4346f53..36d0eace00d0 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 , bool bQuiet_in )
+LngParser::LngParser( const ByteString &rLngFile, sal_Bool bUTF8, sal_Bool bULFFormat , bool bQuiet_in )
/*****************************************************************************/
:
nError( LNG_OK ),
@@ -77,7 +77,7 @@ LngParser::LngParser( const ByteString &rLngFile, BOOL bUTF8, BOOL bULFFormat ,
LngParser::~LngParser()
/*****************************************************************************/
{
- for ( ULONG i = 0; i < pLines->Count(); i++ )
+ for ( sal_uIntPtr i = 0; i < pLines->Count(); i++ )
delete pLines->GetObject( i );
delete pLines;
}
@@ -100,7 +100,7 @@ void LngParser::FillInFallbacks( ByteStringHashMap Text )
}
/*****************************************************************************/
-BOOL LngParser::CreateSDF(
+sal_Bool LngParser::CreateSDF(
const ByteString &rSDFFile, const ByteString &rPrj,
const ByteString &rRoot )
/*****************************************************************************/
@@ -125,8 +125,8 @@ BOOL LngParser::CreateSDF(
sFullEntry.Copy( sPrjEntry.Len() + 1 ), gsl_getSystemTextEncoding());
sActFileName.SearchAndReplaceAll( "/", "\\" );
- ULONG nPos = 0;
- BOOL bStart = true;
+ sal_uIntPtr nPos = 0;
+ sal_Bool bStart = true;
ByteString sGroup;
ByteStringHashMap Text;
ByteString sID;
@@ -157,7 +157,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;
@@ -205,7 +205,7 @@ BOOL LngParser::CreateSDF(
}
/*****************************************************************************/
-BOOL LngParser::Merge(
+sal_Bool LngParser::Merge(
const ByteString &rSDFFile, const ByteString &rDestinationFile , const ByteString& rPrj )
/*****************************************************************************/
{
@@ -218,16 +218,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_uIntPtr nPos = 0;
+ sal_Bool bGroup = sal_False;
ByteString sGroup;
// seek to next group
@@ -241,7 +241,7 @@ BOOL LngParser::Merge(
sGroup = sLine.GetToken( 1, '[' ).GetToken( 0, ']' );
sGroup.EraseLeadingChars( ' ' );
sGroup.EraseTrailingChars( ' ' );
- bGroup = TRUE;
+ bGroup = sal_True;
}
nPos ++;
}
@@ -249,13 +249,13 @@ BOOL LngParser::Merge(
while ( nPos < pLines->Count()) {
ByteStringHashMap Text;
ByteString sID( sGroup );
- ULONG nLastLangPos = 0;
+ sal_uIntPtr 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;
@@ -269,7 +269,7 @@ BOOL LngParser::Merge(
sGroup = sLine.GetToken( 1, '[' ).GetToken( 0, ']' );
sGroup.EraseLeadingChars( ' ' );
sGroup.EraseTrailingChars( ' ' );
- bGroup = TRUE;
+ bGroup = sal_True;
nPos ++;
sLanguagesDone = "";
}
@@ -291,7 +291,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 );
@@ -327,7 +327,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 == "-" )))
{
@@ -349,9 +349,9 @@ BOOL LngParser::Merge(
delete pResData;
}
- for ( ULONG i = 0; i < pLines->Count(); i++ )
+ for ( sal_uIntPtr 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 1d1428ff2dc0..82c888889460 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -131,7 +131,7 @@ class SourceTreeLocalizer : public SourceTreeIterator
{
private:
SvFileStream aSDF;
- USHORT nMode;
+ sal_uInt16 nMode;
ByteString sLanguageRestriction;
@@ -140,12 +140,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,
@@ -161,8 +161,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
@@ -177,8 +177,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 );
};
@@ -202,10 +202,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();
@@ -233,7 +233,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 );
@@ -246,10 +246,10 @@ const ByteString SourceTreeLocalizer::GetProjectRootRel()
sCur.SearchAndReplaceAll( sDelimiter, "/" );
sCur.EraseLeadingChars( '/' );
- ULONG nCount = sCur.GetTokenCount( '/' );
+ sal_uIntPtr nCount = sCur.GetTokenCount( '/' );
ByteString sProjectRootRel;
- for ( ULONG i = 0; i < nCount; i++ ) {
+ for ( sal_uIntPtr i = 0; i < nCount; i++ ) {
if ( sProjectRootRel.Len())
sProjectRootRel += sDelimiter;
sProjectRootRel += "..";
@@ -365,11 +365,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_uIntPtr nIndex = 0;
+ sal_Bool bReturn = sal_True;
ByteString sDelimiter(
DirEntry::GetAccessDelimiter(), RTL_TEXTENCODING_ASCII_US );
@@ -384,7 +384,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 ];
@@ -394,11 +394,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_uIntPtr nIndex = 0;
+ sal_Bool bReturn = sal_False;
ByteString sDelimiter(
DirEntry::GetAccessDelimiter(), RTL_TEXTENCODING_ASCII_US );
@@ -413,7 +413,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 ];
@@ -438,11 +438,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 );
@@ -459,7 +459,7 @@ void SourceTreeLocalizer::WorkOnDirectory( const ByteString &rDirectory )
/*****************************************************************************/
{
//printf("Working on Directory %s\n",rDirectory.GetBuffer());
- ULONG nIndex = 0;
+ sal_uIntPtr nIndex = 0;
ByteString sExtension( ExeTable[ nIndex ][ 0 ] );
ByteString sExecutable( ExeTable[ nIndex ][ 1 ] );
ByteString sParameter( ExeTable[ nIndex ][ 2 ] );
@@ -494,7 +494,7 @@ void SourceTreeLocalizer::OnExecuteDirectory( const rtl::OUString &aDirectory )
}
/*****************************************************************************/
-BOOL SourceTreeLocalizer::Extract( const ByteString &rDestinationFile )
+sal_Bool SourceTreeLocalizer::Extract( const ByteString &rDestinationFile )
/*****************************************************************************/
{
nMode = LOCALIZE_EXTRACT;
@@ -502,7 +502,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();
@@ -517,7 +517,7 @@ BOOL SourceTreeLocalizer::Extract( const ByteString &rDestinationFile )
}
/*****************************************************************************/
-BOOL SourceTreeLocalizer::MergeSingleFile(
+sal_Bool SourceTreeLocalizer::MergeSingleFile(
const ByteString &rPrj,
const ByteString &rFile,
const ByteString &rSDFFile
@@ -526,7 +526,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 ));
@@ -545,7 +545,7 @@ BOOL SourceTreeLocalizer::MergeSingleFile(
ByteString sBCur( aEntry.GetFull(), RTL_TEXTENCODING_ASCII_US );
if( !bQuiet2 ) fprintf( stdout, "##### %s #####\n", sBCur.GetBuffer());
- ULONG nIndex = 0;
+ sal_uIntPtr nIndex = 0;
ByteString sExtension( aEntry.GetExtension(), RTL_TEXTENCODING_ASCII_US );
ByteString sCandidate( ExeTable[ nIndex ][ 0 ] );
@@ -557,18 +557,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;
}
@@ -611,7 +611,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);
@@ -656,14 +656,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;
@@ -725,18 +725,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;
}
}
}
@@ -755,7 +755,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;
@@ -763,7 +763,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();
@@ -821,7 +821,7 @@ int Error()
}
/*****************************************************************************/
-BOOL CheckLanguages( ByteString &rLanguages )
+sal_Bool CheckLanguages( ByteString &rLanguages )
/*****************************************************************************/
{
ByteString sTmp( rLanguages );
@@ -838,10 +838,10 @@ 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 bQuiet = false;
bool bQuiet2 = false;
bool bSkipLinks = false;
@@ -851,7 +851,7 @@ int _cdecl main( int argc, char *argv[] )
ByteString sOutput;
bQuiet2 = true;
- bExport = TRUE;
+ bExport = sal_True;
for( int i = 1; i < argc; i++ ) {
ByteString sSwitch( argv[ i ] );
@@ -861,7 +861,7 @@ int _cdecl main( int argc, char *argv[] )
nState = STATE_EXPORT;
if ( bMerge )
return Error();
- bExport = TRUE;
+ bExport = sal_True;
}
else if( sSwitch.Equals( "-Q" )) {
bQuiet = true;
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index e15a5c8a28fa..e9ff3233c274 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -50,12 +50,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 ) == '\\' )
{
@@ -67,8 +67,8 @@ 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 )
/*****************************************************************************/
{
@@ -84,14 +84,14 @@ BOOL PFormEntrys::GetText( ByteString &rReturn,
// DEBUG******************
*/
- 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;
@@ -101,14 +101,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;
}
//printf("Returning '%s'\n",rReturn.GetBuffer());
@@ -180,7 +180,7 @@ PFormEntrys *MergeData::InsertEntry( const ByteString &rPForm )
}
/*****************************************************************************/
-BOOL MergeData::operator==( ResData *pData )
+sal_Bool MergeData::operator==( ResData *pData )
/*****************************************************************************/
{
ByteString sResTyp_upper( pData->sResTyp );
@@ -203,8 +203,8 @@ BOOL MergeData::operator==( ResData *pData )
#define FFORMAT_OLD 0x0002
/*****************************************************************************/
-MergeDataFile::MergeDataFile( const ByteString &rFileName, const ByteString& sFile ,BOOL bErrLog,
-// CharSet aCharSet, BOOL bUTF8 , bool bCaseSensitive )
+MergeDataFile::MergeDataFile( const ByteString &rFileName, const ByteString& sFile ,sal_Bool bErrLog,
+// CharSet aCharSet, sal_Bool bUTF8 , bool bCaseSensitive )
CharSet aCharSet, bool bCaseSensitive )
/*****************************************************************************/
@@ -400,7 +400,7 @@ void MergeDataFile::InsertEntry(
/*****************************************************************************/
{
MergeData *pData;
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
// uniquify the filename to save memory.
ByteStringHashMap::const_iterator fit = aFilenames.find (rInFilename);
@@ -423,7 +423,7 @@ void MergeDataFile::InsertEntry(
aMap.insert( MergeDataHashMap::value_type( sKey, pData ) );
}
- bFound = FALSE;
+ bFound = sal_False;
PFormEntrys *pFEntrys = 0;
// search for PFormEntrys
diff --git a/l10ntools/source/srciter.cxx b/l10ntools/source/srciter.cxx
index e928a244efe6..4e87fda3e079 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_uIntPtr 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..13d474e2d59c 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_uIntPtr 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..a92eed15c9fa 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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 149fd560fe3b..24d4fbe5985a 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;
bool bQuiet;
ByteString sPrj;
ByteString sPrjRoot;
@@ -78,18 +78,18 @@ 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 = "";
bQuiet = false;
- 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++ ) {
@@ -113,15 +113,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;
@@ -136,7 +136,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: {
@@ -153,7 +153,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: {
@@ -166,7 +166,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;
@@ -300,8 +300,8 @@ int GetError()
/*****************************************************************************/
XRMResParser::XRMResParser()
/*****************************************************************************/
- : bError( FALSE ),
- bText( FALSE )
+ : bError( sal_False ),
+ bText( sal_False )
{
aLanguages = Export::GetLanguages();
}
@@ -359,7 +359,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, '.' );
@@ -377,7 +377,7 @@ int XRMResParser::Execute( int nToken, char * pToken )
EndOfText( sCurrentOpenTag, sCurrentCloseTag );
sLID = sNewLID;
}
- bText = TRUE;
+ bText = sal_True;
sCurrentText = "";
sCurrentOpenTag = rToken;
Output( rToken );
@@ -391,7 +391,7 @@ int XRMResParser::Execute( int nToken, char * pToken )
ByteString sLang = GetAttribute( sCurrentOpenTag, "xml:lang" );
if( sLang.EqualsIgnoreCaseAscii("de") ){
- ULONG nLen = 0;
+ sal_uIntPtr nLen = 0;
while ( sCurrentText.Len() != nLen )
{
nLen = sCurrentText.Len();
@@ -407,7 +407,7 @@ int XRMResParser::Execute( int nToken, char * pToken )
//fprintf( stdout, "%s %s\n", sGID.GetBuffer(), sLID.GetBuffer());
//fprintf( stdout, "%s\n\n", sCurrentText.GetBuffer());
- bText = FALSE;
+ bText = sal_False;
}
}
break;
@@ -444,7 +444,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 );
@@ -717,7 +717,7 @@ void XRMResMerge::EndOfText(
// if ( Export::isAllowed( sCur ) &&
//>>>>>>> 1.17
( pEntrys->GetText(
- sContent, STRING_TYP_TEXT, sCur, TRUE )) &&
+ sContent, STRING_TYP_TEXT, sCur, sal_True )) &&
( sContent != "-" ) && ( sContent.Len()))
{
ByteString sText( sContent );
@@ -737,7 +737,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/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..d0a66cd2b301 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_uIntPtr 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..a1eb7affc23d 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_uIntPtr 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_uIntPtr lKey );
+ ObjNode * DelObjNode( RscTop * pClass, sal_uIntPtr lFileKey );
sal_uInt32 GetId() const;
RscId GetRscId(){ return( aRscId ); }
- ULONG GetFileKey(){ return lFileKey; };
+ sal_uIntPtr 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 1d5af35de9ff..c9cc02cfaa40 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_uIntPtr 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
@@ -146,8 +146,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();
@@ -266,7 +266,7 @@ class RscTypCont
void InsWinBit( RscTop * pClass, const ByteString & rName,
Atom nVal );
- void WriteInc( FILE * fOutput, ULONG lKey );
+ void WriteInc( FILE * fOutput, sal_uIntPtr 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_uIntPtr> 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_uIntPtr 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_uIntPtr nFileIndex,
+ CharSet nCharSet, sal_Bool bName = sal_True );
+ ERRTYPE WriteHxx( FILE * fOutput, sal_uIntPtr nFileKey);
+ ERRTYPE WriteCxx( FILE * fOutput, sal_uIntPtr 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_uIntPtr lFileKey );
+ sal_Bool MakeConsistent( RscInconsList * pList );
sal_uInt32 PutTranslatorKey( sal_uInt64 nKey );
- void IncFilePos( ULONG nOffset ){ nFilePos += nOffset; }
+ void IncFilePos( sal_uIntPtr nOffset ){ nFilePos += nOffset; }
};
#endif
diff --git a/rsc/inc/rscdef.hxx b/rsc/inc/rscdef.hxx
index a21b03685325..68dc47a47419 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_uIntPtr 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_uIntPtr lFileKey, const ByteString & rDefName,
+ sal_Int32 lDefId );
+ RscDefine( sal_uIntPtr 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_uIntPtr 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_uIntPtr lFileKey, const ByteString & rDefName,
+ sal_Int32 lDefId, sal_uIntPtr lPos );
+ RscDefine * New( sal_uIntPtr lFileKey, const ByteString & rDefName,
+ RscExpression * pExpression, sal_uIntPtr lPos );
+ sal_Bool Befor( const RscDefine * pFree, const RscDefine * pDepend );
+ sal_Bool Remove( RscDefine * pDef );
+ sal_Bool Remove( sal_uIntPtr 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_uIntPtr lKey;
public:
- RscDepend( ULONG lIncKey ){ lKey = lIncKey; };
- ULONG GetFileKey(){ return lKey; }
+ RscDepend( sal_uIntPtr lIncKey ){ lKey = lIncKey; };
+ sal_uIntPtr 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_uIntPtr lDepFile, sal_uIntPtr lPos );
+ void RemoveDependFile( sal_uIntPtr lDepFile );
+ sal_Bool Depend( sal_uIntPtr lDepend, sal_uIntPtr 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_uIntPtr 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_uIntPtr lKey, const ByteString & );
- BOOL Depend( ULONG lDepend, ULONG lFree );
- BOOL TestDef( ULONG lFileKey, ULONG lPos,
+ sal_Bool Depend( sal_uIntPtr lDepend, sal_uIntPtr lFree );
+ sal_Bool TestDef( sal_uIntPtr lFileKey, sal_uIntPtr lPos,
const RscDefine * pDefDec );
- BOOL TestDef( ULONG lFileKey, ULONG lPos,
+ sal_Bool TestDef( sal_uIntPtr lFileKey, sal_uIntPtr 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_uIntPtr lKey, const ByteString & rDefName,
+ sal_Int32 lId, sal_uIntPtr lPos );
+ RscDefine * NewDef( sal_uIntPtr lKey, const ByteString & rDefName,
+ RscExpression *, sal_uIntPtr 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_uIntPtr lKey );
+ void DeleteFile( sal_uIntPtr lKey );
+ sal_uIntPtr NewCodeFile( const ByteString & rName );
+ sal_uIntPtr NewIncFile( const ByteString & rName, const ByteString & rPath );
+ RscFile * GetFile( sal_uIntPtr 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..5e21d31ea88c 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_uIntPtr lKey );
- ULONG AddSrcFile( const ByteString & rFileName );
- ULONG AddHrcFile( const ByteString & rFileName );
+ sal_uIntPtr AddSrcFile( const ByteString & rFileName );
+ sal_uIntPtr 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_uIntPtr lFileKey );
+ void RemoveFile( sal_uIntPtr lKey );
// Suche ueber alle DEFINES
RscDefine * FindDef( const ByteString & rName );
- ULONG GetFileKey( const ByteString & rFileName );
+ sal_uIntPtr GetFileKey( const ByteString & rFileName );
};
class RscHrc
{
protected:
- ULONG lFileKey; // Index der Instanz
+ sal_uIntPtr lFileKey; // Index der Instanz
RscDataBase * pDataBase;// Datenbasis
public:
// Kompilerinstanz erzeugen
- RscHrc( RscDataBase * pDBase, ULONG lKey );
+ RscHrc( RscDataBase * pDBase, sal_uIntPtr lKey );
~RscHrc();
// Daten von Datei uebernehmen
ERRTYPE ReadFile();
- ULONG GetFileKey() const { return lFileKey; }
+ sal_uIntPtr 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_uIntPtr lKey, sal_uIntPtr 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_uIntPtr lPos );
ERRTYPE NewDef( const ByteString & rMacroName, const ByteString & rMacro,
- ULONG lPos );
- ERRTYPE ChangeDef( const ByteString & rMacroName, INT32 lValue );
+ sal_uIntPtr 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_uIntPtr 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..0f3a3f8c1ad1 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_uIntPtr lFileIndex; // Index auf Eingabedatei
+ sal_uIntPtr 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_uIntPtr lIndexSrc,
+ sal_uIntPtr lFileIndex, FILE * fFile );
+ RscFileInst( RscTypCont * pTC, sal_uIntPtr lIndexSrc,
+ sal_uIntPtr 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_uIntPtr lFIndex ) { lFileIndex = lFIndex; }
+ sal_uIntPtr GetFileIndex() { return( lFileIndex ); }
+ sal_uIntPtr 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..1bf311b4eb76 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_uIntPtr lFileKey );
+ ERRTYPE ParseOneFile( sal_uIntPtr 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/inc/vclrsc.hxx b/rsc/inc/vclrsc.hxx
index 19677171dcb2..0bcc1d03fd07 100644
--- a/rsc/inc/vclrsc.hxx
+++ b/rsc/inc/vclrsc.hxx
@@ -163,8 +163,8 @@ typedef sal_Int64 WinBits;
// --------------
// from vcl/inc/help.hxx
-#define OOO_HELP_INDEX ((ULONG)0xFFFFFFFF)
-#define OOO_HELP_HELPONHELP ((ULONG)0xFFFFFFFE)
+#define OOO_HELP_INDEX ((sal_uIntPtr)0xFFFFFFFF)
+#define OOO_HELP_HELPONHELP ((sal_uIntPtr)0xFFFFFFFE)
// --------------
// - FieldTypes -
diff --git a/rsc/source/misc/rscdbl.cxx b/rsc/source/misc/rscdbl.cxx
index 591f6b3fd4f6..868e38b71d69 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_uIntPtr 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_uIntPtr 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_uIntPtr 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 97d23d4e3b53..b0b40e47a08e 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 ),
@@ -393,16 +393,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
@@ -422,7 +422,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_uIntPtr)0 );
}
else
aSysLst.Insert( pSysEntry, LIST_APPEND );
@@ -440,7 +440,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_uIntPtr lFileKey )
{
RscFile * pFName;
@@ -502,7 +502,7 @@ private:
ERRTYPE aError; // Enthaelt den ersten Fehler
RscTypCont* pTypCont;
FILE * fOutput; // AusgabeDatei
- ULONG lFileKey; // Welche src-Datei
+ sal_uIntPtr lFileKey; // Welche src-Datei
RscTop * pClass;
DECL_LINK( CallBackWriteRc, ObjNode * );
@@ -554,7 +554,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() );
@@ -649,18 +649,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_uIntPtr >::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
}
@@ -702,7 +702,7 @@ public:
return aEnumObj.aError;
};
- ERRTYPE WriteSrc( ULONG lFileKey )
+ ERRTYPE WriteSrc( sal_uIntPtr lFileKey )
{
aEnumObj.lFileKey = lFileKey;
@@ -711,7 +711,7 @@ public:
return aEnumObj.aError;
}
- ERRTYPE WriteCxx( ULONG lFileKey )
+ ERRTYPE WriteCxx( sal_uIntPtr lFileKey )
{
aEnumObj.lFileKey = lFileKey;
@@ -720,7 +720,7 @@ public:
return aEnumObj.aError;
}
- ERRTYPE WriteHxx( ULONG lFileKey )
+ ERRTYPE WriteHxx( sal_uIntPtr lFileKey )
{
aEnumObj.lFileKey = lFileKey;
@@ -813,7 +813,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;
@@ -828,8 +828,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_uIntPtr nFileKey,
+ CharSet /*nCharSet*/, sal_Bool bName )
{
RscFile * pFName;
RscEnumerateRef aEnumRef( this, pRoot, fOutput );
@@ -861,7 +861,7 @@ void RscTypCont :: WriteSrc( FILE * fOutput, ULONG nFileKey,
}
else
{
- RscId::SetNames( FALSE );
+ RscId::SetNames( sal_False );
if( NOFILE_INDEX == nFileKey )
{
pFName = aFileTab.First();
@@ -886,7 +886,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_uIntPtr nFileKey )
{
fprintf( fOutput, "#include <tools/rc.hxx>\n" );
fprintf( fOutput, "#include <tools/resid.hxx>\n" );
@@ -952,7 +952,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_uIntPtr nFileKey,
const ByteString & rHxxName )
{
RscEnumerateRef aEnumRef( this, pRoot, fOutput );
@@ -1018,14 +1018,14 @@ void RscTypCont::WriteRcCtor
*************************************************************************/
class RscDel
{
- ULONG lFileKey;
+ sal_uIntPtr lFileKey;
DECL_LINK( Delete, RscTop * );
public:
- RscDel( RscTop * pRoot, ULONG lKey );
+ RscDel( RscTop * pRoot, sal_uIntPtr lKey );
};
-inline RscDel::RscDel( RscTop * pRoot, ULONG lKey )
+inline RscDel::RscDel( RscTop * pRoot, sal_uIntPtr lKey )
{
lFileKey = lKey;
pRoot->EnumNodes( LINK( this, RscDel, Delete ) );
@@ -1039,7 +1039,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_uIntPtr lFileKey ){
// Resourceinstanzen loeschen
RscDel aDel( pRoot, lFileKey );
// Defines loeschen
@@ -1055,55 +1055,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 1a896c897e27..c68fa6ac7ebf 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 625417769f45..d3afafdc2d29 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 a763b92f0bb1..88eeed419175 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( "sal_True", BOOLEAN, (long)sal_True );
+ aNmTb.Put( "sal_False", BOOLEAN, (long)sal_False );
/* Vordefinierte HilfeId's */
aNmTb.Put( "HELP_INDEX", NUMBER, OOO_HELP_INDEX );
@@ -263,117 +263,117 @@ 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) );
nSingleLineId = pHS->getID( "WB_SINGLELINE" );
- aWinBits.SetConstant( nSingleLineId, sal::static_int_cast<INT32>(WB_SINGLELINE) );
+ aWinBits.SetConstant( nSingleLineId, sal::static_int_cast<sal_Int32>(WB_SINGLELINE) );
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 e0df5de254f9..42466dc3f490 100644
--- 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();
@@ -182,7 +182,7 @@ int MakeToken( YYSTYPE * pTokenVal ){
aBuf.append( '"' );
}
else
- bDone = TRUE;
+ bDone = sal_True;
}
else if( c == '\\' )
{
@@ -235,10 +235,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;
};
@@ -302,7 +302,7 @@ int yylex()
#endif
{
if( bTargetDefined )
- bTargetDefined = FALSE;
+ bTargetDefined = sal_False;
else
aKeyVal[ 0 ].nKeyWord =
MakeToken( &aKeyVal[ 0 ].aYYSType );
@@ -330,10 +330,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();
}
@@ -359,7 +359,7 @@ void IncludeParser( RscFileInst * pFileInst )
int nToken; // Wert des Tokens
YYSTYPE aYYSType; // Daten des Tokens
RscFile * pFName; // Filestruktur
- ULONG lKey; // Fileschluessel
+ sal_uIntPtr lKey; // Fileschluessel
RscTypCont * pTypCon = pFileInst->pTypCont;
pFName = pTypCon->aFileTab.Get( pFileInst->GetFileIndex() );
@@ -415,7 +415,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..359e1a3390e0 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_uIntPtr lIndexSrc,
+ sal_uIntPtr 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_uIntPtr lIndexSrc,
+ sal_uIntPtr 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 89891581d9ba..f6c9d9a17cc8 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..4c3380af8c39 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_uIntPtr)1 << nEle);
else
- pClass->nVarDflt &= ~((ULONG)1 << nEle);
+ pClass->nVarDflt &= ~((sal_uIntPtr)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_uIntPtr)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_uIntPtr)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_uIntPtr ) * 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_uIntPtr)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 = (sal_uInt8 *)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..67955c193cf0 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_uIntPtr 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_uIntPtr 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..a1844c5a057c 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 );
}
@@ -445,9 +445,9 @@ void RscClient::WriteSrc( const RSCINST & rInst, FILE * fOutput,
RscTypCont *, sal_uInt32, const char * )
{
if( pRefClass->IsSet( rInst, nConstId ) )
- fprintf( fOutput, "TRUE" );
+ fprintf( fOutput, "sal_True" );
else
- fprintf( fOutput, "FALSE" );
+ fprintf( fOutput, "sal_False" );
}
/*************************************************************************
@@ -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..da8f19b68685 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 );
@@ -453,7 +453,7 @@ ERRTYPE RscMgr::WriteHxxHeader( const RSCINST & rInst, FILE * fOutput,
if( aError.IsOk() )
{
fprintf( fOutput, "public:\n " );
- fprintf( fOutput, "%s%s bFreeRes = TRUE )",
+ fprintf( fOutput, "%s%s bFreeRes = sal_True )",
MakeName( pTC, rInst.pClass,
rId.GetName() ).GetBuffer(),
(rInst.pClass->aCallParType).GetBuffer() );
@@ -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..69fcb1b73d6a 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,13 +770,13 @@ 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 )
- fprintf( fOutput, "TRUE" );
+ fprintf( fOutput, "sal_True" );
else
- fprintf( fOutput, "FALSE" );
+ fprintf( fOutput, "sal_False" );
}
//=======================================================================
@@ -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 40d589aea359..00c105b7fca6 100644
--- a/rsc/source/rsc/rsc.cxx
+++ b/rsc/source/rsc/rsc.cxx
@@ -139,7 +139,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
@@ -251,7 +251,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
@@ -346,9 +346,9 @@ RscCmdLine::~RscCmdLine()
{
ByteString *pString;
- while( NULL != (pString = aInputList.Remove( (ULONG)0 )) )
+ while( NULL != (pString = aInputList.Remove( (sal_uIntPtr)0 )) )
delete pString;
- while( NULL != (pString = aSymbolList.Remove( (ULONG)0 )) )
+ while( NULL != (pString = aSymbolList.Remove( (sal_uIntPtr)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_uIntPtr 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_uIntPtr 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 );
@@ -838,7 +838,7 @@ ERRTYPE RscCompiler::Link()
{
pTC->Delete( pTC->aFileTab.GetIndex( pFName ) );
pTC->aFileTab.Seek( pFName );
- pFName->bLoaded = FALSE;
+ pFName->bLoaded = sal_False;
}
}
@@ -1132,7 +1132,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/rscpp/cpp.h b/rsc/source/rscpp/cpp.h
index 11327d4fb9d1..3c8102d1b614 100644
--- a/rsc/source/rscpp/cpp.h
+++ b/rsc/source/rscpp/cpp.h
@@ -26,9 +26,9 @@
************************************************************************/
-#ifndef TRUE
-#define TRUE 1
-#define FALSE 0
+#ifndef sal_True
+#define sal_True 1
+#define sal_False 0
#endif
/* in cpp1.c: file-pointer auf stdout oder file */
@@ -150,9 +150,9 @@ extern FILE *pDefOut; /* ER */
/*
* These bits are set in ifstack[]
*/
-#define WAS_COMPILING 1 /* TRUE if compile set at entry */
-#define ELSE_SEEN 2 /* TRUE when #else processed */
-#define TRUE_SEEN 4 /* TRUE when #if TRUE processed */
+#define WAS_COMPILING 1 /* sal_True if compile set at entry */
+#define ELSE_SEEN 2 /* sal_True when #else processed */
+#define TRUE_SEEN 4 /* sal_True when #if sal_True processed */
/*
* Define bits for the basic types and their adjectives
@@ -256,8 +256,8 @@ extern int line; /* Current line number */
extern int wrongline; /* Force #line to cc pass 1 */
extern char type[]; /* Character classifier */
extern char token[IDMAX + 1]; /* Current input token */
-extern int instring; /* TRUE if scanning string */
-extern int inmacro; /* TRUE if scanning #define */
+extern int instring; /* sal_True if scanning string */
+extern int inmacro; /* sal_True if scanning #define */
extern int errors; /* Error counter */
extern int recursion; /* Macro depth counter */
extern char ifstack[BLK_NEST]; /* #if information */
@@ -277,8 +277,8 @@ extern char *workp; /* Free space in work */
#if OSL_DEBUG_LEVEL > 1
extern int debug; /* Debug level */
/* ER dump & evaluate #define's */
-extern int bDumpDefs; /* TRUE if #define's dump req. */
-extern int bIsInEval; /* TRUE if #define dumping now */
+extern int bDumpDefs; /* sal_True if #define's dump req. */
+extern int bIsInEval; /* sal_True if #define dumping now */
#ifdef EVALDEFS
extern char EvalBuf[NEVALBUF + 1]; /* evaluation buffer */
extern int nEvalOff; /* offset to free buffer pos */
diff --git a/rsc/source/rscpp/cpp1.c b/rsc/source/rscpp/cpp1.c
index 1eb7561a2db0..ace0206c7d9b 100644
--- a/rsc/source/rscpp/cpp1.c
+++ b/rsc/source/rscpp/cpp1.c
@@ -66,10 +66,10 @@ char token[IDMAX + 1]; /* Current input token */
int errors; /* cpp error counter */
FILEINFO *infile = NULL; /* Current input file */
#if OSL_DEBUG_LEVEL > 1
-int debug; /* TRUE if debugging now */
-int bDumpDefs; /* TRUE if #define's dump req. */
+int debug; /* sal_True if debugging now */
+int bDumpDefs; /* sal_True if #define's dump req. */
#ifdef EVALDEFS
-int bIsInEval; /* TRUE if #define eval now */
+int bIsInEval; /* sal_True if #define eval now */
char EvalBuf[NEVALBUF + 1]; /* evaluation buffer */
int nEvalOff = 0; /* offset to free buffer pos */
#endif
@@ -85,10 +85,10 @@ int nEvalOff = 0; /* offset to free buffer pos */
* currently: it is a hook for an eventual invocation flag.)
*/
int recursion; /* Infinite recursion counter */
-int rec_recover = TRUE; /* Unwind recursive macros */
+int rec_recover = sal_True; /* Unwind recursive macros */
/*
- * instring is set TRUE when a string is scanned. It modifies the
+ * instring is set sal_True when a string is scanned. It modifies the
* behavior of the "get next character" routine, causing all characters
* to be passed to the caller (except <DEF_MAGIC>). Note especially that
* comments and \<newline> are not removed from the source. (This
@@ -103,8 +103,8 @@ int rec_recover = TRUE; /* Unwind recursive macros */
* instring and inmarcor are parameters to the get() routine which
* were made global for speed.
*/
-int instring = FALSE; /* TRUE if scanning string */
-int inmacro = FALSE; /* TRUE if #defining a macro */
+int instring = sal_False; /* sal_True if scanning string */
+int inmacro = sal_False; /* sal_True if #defining a macro */
/*
* work[] and workp are used to store one piece of text in a temporay
@@ -119,7 +119,7 @@ char work[NWORK + 1]; /* Work buffer */
char *workp; /* Work buffer pointer */
/*
- * keepcomments is set TRUE by the -C option. If TRUE, comments
+ * keepcomments is set sal_True by the -C option. If sal_True, comments
* are written directly to the output stream. This is needed if
* the output from cpp is to be passed to lint (which uses commands
* embedded in comments). cflag contains the permanent state of the
@@ -133,21 +133,21 @@ char *workp; /* Work buffer pointer */
* __FILE__, and __DATE__. If nflag > 1, absolutely no symbols
* are predefined.
*/
-int keepcomments = FALSE; /* Write out comments flag */
-int cflag = FALSE; /* -C option (keep comments) */
-int eflag = FALSE; /* -E option (never fail) */
+int keepcomments = sal_False; /* Write out comments flag */
+int cflag = sal_False; /* -C option (keep comments) */
+int eflag = sal_False; /* -E option (never fail) */
int nflag = 0; /* -N option (no predefines) */
/*
* ifstack[] holds information about nested #if's. It is always
* accessed via *ifptr. The information is as follows:
* WAS_COMPILING state of compiling flag at outer level.
- * ELSE_SEEN set TRUE when #else seen to prevent 2nd #else.
- * TRUE_SEEN set TRUE when #if or #elif succeeds
- * ifstack[0] holds the compiling flag. It is TRUE if compilation
- * is currently enabled. Note that this must be initialized TRUE.
+ * ELSE_SEEN set sal_True when #else seen to prevent 2nd #else.
+ * TRUE_SEEN set sal_True when #if or #elif succeeds
+ * ifstack[0] holds the compiling flag. It is sal_True if compilation
+ * is currently enabled. Note that this must be initialized sal_True.
*/
-char ifstack[BLK_NEST] = { TRUE }; /* #if information */
+char ifstack[BLK_NEST] = { sal_True }; /* #if information */
char *ifptr = ifstack; /* -> current ifstack[] */
/*
@@ -211,7 +211,7 @@ void InitCpp1()
workp = NULL;
for( i = 0; i < BLK_NEST; i++ )
- ifstack[ i ] = TRUE;
+ ifstack[ i ] = sal_True;
ifptr = ifstack;
pCppOut = stdout;
@@ -227,9 +227,9 @@ void InitCpp1()
nEvalOff = 0;
#endif
#endif
- rec_recover = TRUE;
+ rec_recover = sal_True;
infile = NULL;
- instring = inmacro = keepcomments = cflag = eflag = FALSE;
+ instring = inmacro = keepcomments = cflag = eflag = sal_False;
nflag = 0;
incend = incdir;
sharpfilename = NULL;
@@ -426,7 +426,7 @@ void cppmain()
}
/*
* This loop is started "from the top" at the beginning of each line
- * wrongline is set TRUE in many places if it is necessary to write
+ * wrongline is set sal_True in many places if it is necessary to write
* a #line record. (But we don't write them when expanding macros.)
*
* The counter variable has two different uses: at
@@ -446,7 +446,7 @@ void cppmain()
if (c == '\n') /* If line's all blank, */
++counter; /* Do nothing now */
else if (c == '#') { /* Is 1st non-space '#' */
- keepcomments = FALSE; /* Don't pass comments */
+ keepcomments = sal_False; /* Don't pass comments */
counter = control(counter); /* Yes, do a #command */
keepcomments = (cflag && compiling);
}
@@ -542,7 +542,7 @@ void cppmain()
end_line: if (c == '\n') { /* Compiling at EOL? */
PUTCHAR('\n'); /* Output newline, if */
if (infile->fp == NULL) /* Expanding a macro, */
- wrongline = TRUE; /* Output # line later */
+ wrongline = sal_True; /* Output # line later */
}
} /* Continue until EOF */
#ifdef EVALDEFS
@@ -612,5 +612,5 @@ void sharp()
}
}
PUTCHAR('\n');
- wrongline = FALSE;
+ wrongline = sal_False;
}
diff --git a/rsc/source/rscpp/cpp2.c b/rsc/source/rscpp/cpp2.c
index 68d1d2dc72ba..c421308654e5 100644
--- a/rsc/source/rscpp/cpp2.c
+++ b/rsc/source/rscpp/cpp2.c
@@ -189,7 +189,7 @@ dump_line: skipnl(); /* Ignore rest of line */
free(infile->progname); /* if it's allocated. */
infile->progname = savestring(tp);
}
- wrongline = TRUE; /* Force output later */
+ wrongline = sal_True; /* Force output later */
break;
case L_include:
@@ -212,9 +212,9 @@ dump_line: skipnl(); /* Ignore rest of line */
*ifptr |= ELSE_SEEN;
if ((*ifptr & WAS_COMPILING) != 0) {
if (compiling || (*ifptr & TRUE_SEEN) != 0)
- compiling = FALSE;
+ compiling = sal_False;
else {
- compiling = TRUE;
+ compiling = sal_True;
}
}
break;
@@ -227,7 +227,7 @@ else_seen_err: cerror("#%s may not follow #else", token);
goto dump_line;
}
if ((*ifptr & (WAS_COMPILING | TRUE_SEEN)) != WAS_COMPILING) {
- compiling = FALSE; /* Done compiling stuff */
+ compiling = sal_False; /* Done compiling stuff */
goto dump_line; /* Skip this clause */
}
doif(L_if);
@@ -248,7 +248,7 @@ nest_err: cerror("#%s must be in an #if", token);
goto dump_line;
}
if (!compiling && (*ifptr & WAS_COMPILING) != 0)
- wrongline = TRUE;
+ wrongline = sal_True;
compiling = ((*ifptr & WAS_COMPILING) != 0);
--ifptr;
break;
@@ -323,7 +323,7 @@ void doif(int hash)
* Process an #if, #ifdef, or #ifndef. The latter two are straightforward,
* while #if needs a subroutine of its own to evaluate the expression.
*
- * doif() is called only if compiling is TRUE. If false, compilation
+ * doif() is called only if compiling is sal_True. If false, compilation
* is always supressed, so we don't need to evaluate anything. This
* supresses unnecessary warnings.
*/
@@ -337,7 +337,7 @@ void doif(int hash)
}
if (hash == L_if) {
unget();
- found = (eval() != 0); /* Evaluate expr, != 0 is TRUE */
+ found = (eval() != 0); /* Evaluate expr, != 0 is sal_True */
hash = L_ifdef; /* #if is now like #ifdef */
}
else {
@@ -346,11 +346,11 @@ void doif(int hash)
found = (lookid(c) != NULL); /* Look for it in symbol table */
}
if (found == (hash == L_ifdef)) {
- compiling = TRUE;
+ compiling = sal_True;
*ifptr |= TRUE_SEEN;
}
else {
- compiling = FALSE;
+ compiling = sal_False;
}
return;
@@ -391,7 +391,7 @@ void doinclude()
if (delim == '<')
delim = '>';
workp = work;
- instring = TRUE; /* Accept all characters */
+ instring = sal_True; /* Accept all characters */
#ifdef CONTROL_COMMENTS_NOT_ALLOWED
while ((c = get()) != '\n' && c != EOF_CHAR)
save(c); /* Put it away. */
@@ -408,7 +408,7 @@ void doinclude()
save(c);
#endif
*workp = EOS; /* Terminate filename */
- instring = FALSE;
+ instring = sal_False;
#if HOST == SYS_VMS
/*
* Assume the default .h filetype.
@@ -439,7 +439,7 @@ openinclude(char* filename, int searchlocal)
* doinclude() above, but was written as a separate subroutine for
* programmer convenience. It searches the list of directories
* and actually opens the file, linking it into the list of
- * active files. Returns TRUE if the file was opened, FALSE
+ * active files. Returns sal_True if the file was opened, sal_False
* if openinclude() fails. No error message is printed.
*/
{
@@ -475,7 +475,7 @@ openinclude(char* filename, int searchlocal)
}
#endif
if (openfile(tmpname))
- return (TRUE);
+ return (sal_True);
}
/*
* Look in any directories specified by -I command line
@@ -502,10 +502,10 @@ openinclude(char* filename, int searchlocal)
sprintf(tmpname, "%s%s", *incptr, filename);
#endif
if (openfile(tmpname))
- return (TRUE);
+ return (sal_True);
}
}
- return (FALSE);
+ return (sal_False);
}
FILE_LOCAL int
@@ -513,26 +513,26 @@ hasdirectory(char* source, char* result)
/*
* If a device or directory is found in the source filename string, the
* node/device/directory part of the string is copied to result and
- * hasdirectory returns TRUE. Else, nothing is copied and it returns FALSE.
+ * hasdirectory returns sal_True. Else, nothing is copied and it returns sal_False.
*/
{
#if HOST == SYS_UNIX
register char *tp;
if ((tp = strrchr(source, '/')) == NULL)
- return (FALSE);
+ return (sal_False);
else {
strncpy(result, source, tp - source + 1);
result[tp - source + 1] = EOS;
- return (TRUE);
+ return (sal_True);
}
#else
#if HOST == SYS_VMS
if (vmsparse(source, NULLST, result)
&& result[0] != EOS)
- return (TRUE);
+ return (sal_True);
else {
- return (FALSE);
+ return (sal_False);
}
#else
/*
@@ -542,11 +542,11 @@ hasdirectory(char* source, char* result)
if ((tp = strrchr(source, ']')) == NULL
&& (tp = strrchr(source, ':')) == NULL)
- return (FALSE);
+ return (sal_False);
else {
strncpy(result, source, tp - source + 1);
result[tp - source + 1] = EOS;
- return (TRUE);
+ return (sal_True);
}
#endif
#endif
@@ -569,7 +569,7 @@ char *result; /* Size is at least NAM$C_MAXRSS + 1 */
/*
* Parse the source string, applying the default (properly, using
* the system parse routine), storing it in result.
- * TRUE if it parsed, FALSE on error.
+ * sal_True if it parsed, sal_False on error.
*
* If defstring is NULL, there are no defaults and result gets
* (just) the node::[directory] part of the string (possibly "")
@@ -617,9 +617,9 @@ char *result; /* Size is at least NAM$C_MAXRSS + 1 */
rp[nam.nam$b_ver] = EOS;
}
}
- return (TRUE);
+ return (sal_True);
}
- return (FALSE);
+ return (sal_False);
}
#endif
diff --git a/rsc/source/rscpp/cpp3.c b/rsc/source/rscpp/cpp3.c
index e9c03cdd4874..02a59efa8ea4 100644
--- a/rsc/source/rscpp/cpp3.c
+++ b/rsc/source/rscpp/cpp3.c
@@ -69,14 +69,14 @@ openfile(char* filename)
if ( debug || !bDumpDefs )
perror(filename);
#endif
- return (FALSE);
+ return (sal_False);
}
#if OSL_DEBUG_LEVEL > 1
if (debug)
fprintf(stderr, "Reading from \"%s\"\n", filename);
#endif
addfile(fp, filename);
- return (TRUE);
+ return (sal_True);
}
void addfile(FILE* fp, char* filename)
@@ -96,7 +96,7 @@ void addfile(FILE* fp, char* filename)
file->fp = fp; /* Better remember FILE * */
file->buffer[0] = EOS; /* Initialize for first read */
line = 1; /* Working on line 1 now */
- wrongline = TRUE; /* Force out initial #line */
+ wrongline = sal_True; /* Force out initial #line */
}
void setincdirs()
@@ -128,9 +128,9 @@ void setincdirs()
#endif
#if HOST == SYS_RSX
- extern int $$rsts; /* TRUE on RSTS/E */
- extern int $$pos; /* TRUE on PRO-350 P/OS */
- extern int $$vms; /* TRUE on VMS compat. */
+ extern int $$rsts; /* sal_True on RSTS/E */
+ extern int $$pos; /* sal_True on PRO-350 P/OS */
+ extern int $$vms; /* sal_True on VMS compat. */
if ($$pos) { /* P/OS? */
*incend++ = "SY:[ZZDECUSC]"; /* C #includes */
@@ -230,7 +230,7 @@ dooptions(int argc, char** argv)
char *arg;
SIZES *sizp; /* For -S */
int size; /* For -S */
- int isdatum; /* FALSE for -S* */
+ int isdatum; /* sal_False for -S* */
int endtest; /* For -S */
for (i = j = 1; i < argc; i++) {
@@ -246,8 +246,8 @@ dooptions(int argc, char** argv)
c = toupper(c);
switch (c) { /* Command character */
case 'C': /* Keep comments */
- cflag = TRUE;
- keepcomments = TRUE;
+ cflag = sal_True;
+ keepcomments = sal_True;
break;
case 'D': /* Define symbol */
@@ -266,13 +266,13 @@ dooptions(int argc, char** argv)
/*
* Now, save the word and its definition.
*/
- dp = defendel(argv[i] + 2, FALSE);
+ dp = defendel(argv[i] + 2, sal_False);
dp->repl = savestring(ap);
dp->nargs = DEF_NOARGS;
break;
case 'E': /* Ignore non-fatal */
- eflag = TRUE; /* errors. */
+ eflag = sal_True; /* errors. */
break;
case 'I': /* Include directory */
@@ -317,7 +317,7 @@ dooptions(int argc, char** argv)
#if HOST != SYS_UNIX
/* zap_uc(ap);*/
#endif
- if (defendel(ap, TRUE) == NULL)
+ if (defendel(ap, sal_True) == NULL)
cwarn("\"%s\" wasn't defined", ap);
break;
@@ -386,7 +386,7 @@ readoptions(char* filename, char*** pfargv)
if ( debug || !bDumpDefs )
perror(filename);
#endif
- return (FALSE);
+ return (sal_False);
}
do
{
@@ -480,7 +480,7 @@ void initdefines()
if (nflag == 0) {
for (pp = preset; *pp != NULL; pp++) {
if (*pp[0] != EOS) {
- dp = defendel(*pp, FALSE);
+ dp = defendel(*pp, sal_False);
dp->repl = savestring("1");
dp->nargs = DEF_NOARGS;
}
@@ -494,14 +494,14 @@ void initdefines()
*/
if (nflag < 2) {
for (pp = magic, i = DEF_NOARGS; *pp != NULL; pp++) {
- dp = defendel(*pp, FALSE);
+ dp = defendel(*pp, sal_False);
dp->nargs = --i;
}
#if OK_DATE
/*
* Define __DATE__ as today's date.
*/
- dp = defendel("__DATE__", FALSE);
+ dp = defendel("__DATE__", sal_False);
dp->repl = tp = getmem(27);
dp->nargs = DEF_NOARGS;
time( (time_t*)&tvec);
diff --git a/rsc/source/rscpp/cpp4.c b/rsc/source/rscpp/cpp4.c
index b8f90ab4f7ed..612d6873241d 100644
--- a/rsc/source/rscpp/cpp4.c
+++ b/rsc/source/rscpp/cpp4.c
@@ -91,16 +91,16 @@ void dodefine()
{
register int c;
register DEFBUF *dp; /* -> new definition */
- int isredefine; /* TRUE if redefined */
+ int isredefine; /* sal_True if redefined */
char *old = 0; /* Remember redefined */
if (type[(c = skipws())] != LET)
goto bad_define;
- isredefine = FALSE; /* Set if redefining */
+ isredefine = sal_False; /* Set if redefining */
if ((dp = lookid(c)) == NULL) /* If not known now */
- dp = defendel(token, FALSE); /* Save the name */
+ dp = defendel(token, sal_False); /* Save the name */
else { /* It's known: */
- isredefine = TRUE; /* Remember this fact */
+ isredefine = sal_True; /* Remember this fact */
old = dp->repl; /* Remember replacement */
dp->repl = NULL; /* No replacement now */
}
@@ -132,7 +132,7 @@ void dodefine()
if (type[c] == SPA) /* At whitespace? */
c = skipws(); /* Not any more. */
workp = work; /* Replacement put here */
- inmacro = TRUE; /* Keep \<newline> now */
+ inmacro = sal_True; /* Keep \<newline> now */
while (c != EOF_CHAR && c != '\n') { /* Compile macro body */
#if OK_CONCAT
#if COMMENT_INVISIBLE
@@ -184,7 +184,7 @@ void dodefine()
case BSH: /* Backslash */
save('\\');
if ((c = get()) == '\n')
- wrongline = TRUE;
+ wrongline = sal_True;
save(c);
break;
@@ -204,7 +204,7 @@ void dodefine()
}
c = get();
}
- inmacro = FALSE; /* Stop newline hack */
+ inmacro = sal_False; /* Stop newline hack */
unget(); /* For control check */
if (workp > work && workp[-1] == ' ') /* Drop trailing blank */
workp--;
@@ -234,7 +234,7 @@ void dodefine()
bad_define:
cerror("#define syntax error", NULLST);
- inmacro = FALSE; /* Stop <newline> hack */
+ inmacro = sal_False; /* Stop <newline> hack */
}
void checkparm(int c, DEFBUF* dp)
@@ -285,7 +285,7 @@ register DEFBUF *dp;
* ANSI Standard C language.
*/
save(delim);
- instring = TRUE;
+ instring = sal_True;
while ((c = get()) != delim
&& c != '\n'
&& c != EOF_CHAR) {
@@ -297,7 +297,7 @@ register DEFBUF *dp;
save(get());
}
}
- instring = FALSE;
+ instring = sal_False;
if (c != delim)
cerror("Unterminated string in macro body", NULLST);
save(c);
@@ -349,7 +349,7 @@ void doundef()
cerror("Illegal #undef argument", NULLST);
else {
scanid(c); /* Get name to token[] */
- if (defendel(token, TRUE) == NULL) {
+ if (defendel(token, sal_True) == NULL) {
#ifdef STRICT_UNDEF
cwarn("Symbol \"%s\" not defined in #undef", token);
#endif
@@ -459,7 +459,7 @@ void expand(DEFBUF* tokenp)
if (tokenp->nargs < 0)
cfatal("Bug: Illegal __ macro \"%s\"", tokenp->name);
while ((c = skipws()) == '\n') /* Look for (, skipping */
- wrongline = TRUE; /* spaces and newlines */
+ wrongline = sal_True; /* spaces and newlines */
if (c != '(') {
/*
* If the programmer writes
@@ -491,7 +491,7 @@ void expand(DEFBUF* tokenp)
FILE_LOCAL int
expcollect()
/*
- * Collect the actual parameters for this macro. TRUE if ok.
+ * Collect the actual parameters for this macro. sal_True if ok.
*/
{
register int c;
@@ -499,7 +499,7 @@ expcollect()
for (;;) {
paren = 0; /* Collect next arg. */
while ((c = skipws()) == '\n') /* Skip over whitespace */
- wrongline = TRUE; /* and newlines. */
+ wrongline = sal_True; /* and newlines. */
if (c == ')') { /* At end of all args? */
/*
* Note that there is a guard byte in parm[]
@@ -514,7 +514,7 @@ expcollect()
for (;; c = cget()) { /* Collect arg's bytes */
if (c == EOF_CHAR) {
cerror("end of file within macro argument", NULLST);
- return (FALSE); /* Sorry. */
+ return (sal_False); /* Sorry. */
}
else if (c == '\\') { /* Quote next character */
charput(c); /* Save the \ for later */
@@ -537,7 +537,7 @@ expcollect()
else if (c == ',' && paren == 0) /* Comma delimits args */
break;
else if (c == '\n') /* Newline inside arg? */
- wrongline = TRUE; /* We'll need a #line */
+ wrongline = sal_True; /* We'll need a #line */
charput(c); /* Store this one */
} /* Collect an argument */
charput(EOS); /* Terminate argument */
@@ -546,7 +546,7 @@ expcollect()
fprintf( pCppOut, "parm[%d] = \"%s\"\n", nargs, parlist[nargs - 1]);
#endif
} /* Collect all args. */
- return (TRUE); /* Normal return */
+ return (sal_True); /* Normal return */
}
FILE_LOCAL
diff --git a/rsc/source/rscpp/cpp5.c b/rsc/source/rscpp/cpp5.c
index 70f05543c465..7472a462fb15 100644
--- a/rsc/source/rscpp/cpp5.c
+++ b/rsc/source/rscpp/cpp5.c
@@ -91,7 +91,7 @@ static char opdope[OP_MAX] = {
typedef struct optab {
char op; /* Operator */
char prec; /* Its precedence */
- char skip; /* Short-circuit: TRUE to skip */
+ char skip; /* Short-circuit: sal_True to skip */
} OPTAB;
static int evalue; /* Current value from evallex() */
@@ -222,7 +222,7 @@ eval()
* evaleval Evaluate the current operator, given the values on
* the value stack. Returns a pointer to the (new)
* value stack.
- * For compatiblity with older cpp's, this return returns 1 (TRUE)
+ * For compatiblity with older cpp's, this return returns 1 (sal_True)
* if a syntax error is detected.
*/
{
@@ -609,7 +609,7 @@ nogood: unget();
FILE_LOCAL int
bittest(int value)
/*
- * TRUE if value is zero or exactly one bit is set in value.
+ * sal_True if value is zero or exactly one bit is set in value.
*/
{
#if (4096 & ~(-4096)) == 0
@@ -674,7 +674,7 @@ evalchar(int skip)
register int value;
register int count;
- instring = TRUE;
+ instring = sal_True;
if ((c = cget()) == '\\') {
switch ((c = cget())) {
case 'a': /* New in Standard */
@@ -766,7 +766,7 @@ evalchar(int skip)
value += c;
#endif
}
- instring = FALSE;
+ instring = sal_False;
return (value);
}
diff --git a/rsc/source/rscpp/cpp6.c b/rsc/source/rscpp/cpp6.c
index fd2a2a9a0dd7..209ee4217067 100644
--- a/rsc/source/rscpp/cpp6.c
+++ b/rsc/source/rscpp/cpp6.c
@@ -44,8 +44,8 @@
* never expanded.
* macroid() reads the next token (C identifier) into token[].
* If it is a #defined macro, it is expanded, and
- * macroid() returns TRUE, otherwise, FALSE.
- * catenate() Does the dirty work of token concatenation, TRUE if it did.
+ * macroid() returns sal_True, otherwise, sal_False.
+ * catenate() Does the dirty work of token concatenation, sal_True if it did.
* scanstring() Reads a string from the input stream, calling
* a user-supplied function for each character.
* This function may be output() to write the
@@ -273,9 +273,9 @@ catenate()
/*
* A token was just read (via macroid).
* If the next character is TOK_SEP, concatenate the next token
- * return TRUE -- which should recall macroid after refreshing
+ * return sal_True -- which should recall macroid after refreshing
* macroid's argument. If it is not TOK_SEP, unget() the character
- * and return FALSE.
+ * and return sal_False.
*/
{
register int c;
@@ -284,7 +284,7 @@ catenate()
#if OK_CONCAT
if (get() != TOK_SEP) { /* Token concatenation */
unget();
- return (FALSE);
+ return (sal_False);
}
else {
token1 = savestring(token); /* Save first token */
@@ -327,10 +327,10 @@ catenate()
*/
free(token1); /* Free up memory */
ungetstring(work); /* Unget the new thing, */
- return (TRUE);
+ return (sal_True);
}
#else
- return (FALSE); /* Not supported */
+ return (sal_False); /* Not supported */
#endif
}
@@ -345,12 +345,12 @@ void (*outfun)() /* BP */
/*
* Scan off a string. Warning if terminated by newline or EOF.
* outfun() outputs the character -- to a buffer if in a macro.
- * TRUE if ok, FALSE if error.
+ * sal_True if ok, sal_False if error.
*/
{
register int c;
- instring = TRUE; /* Don't strip comments */
+ instring = sal_True; /* Don't strip comments */
(*outfun)(delim);
while ((c = get()) != delim
&& c != '\n'
@@ -361,15 +361,15 @@ void (*outfun)() /* BP */
if (c == '\\')
(*outfun)(get());
}
- instring = FALSE;
+ instring = sal_False;
if (c == delim) {
(*outfun)(c);
- return (TRUE);
+ return (sal_True);
}
else {
cerror("Unterminated string", NULLST);
unget();
- return (FALSE);
+ return (sal_False);
}
}
@@ -389,13 +389,13 @@ register void (*outfun)() /* BP */
int expseen; /* 'e' seen in floater */
int signseen; /* '+' or '-' seen */
int octal89; /* For bad octal test */
- int dotflag; /* TRUE if '.' was seen */
+ int dotflag; /* sal_True if '.' was seen */
- expseen = FALSE; /* No exponent seen yet */
- signseen = TRUE; /* No +/- allowed yet */
- octal89 = FALSE; /* No bad octal yet */
+ expseen = sal_False; /* No exponent seen yet */
+ signseen = sal_True; /* No +/- allowed yet */
+ octal89 = sal_False; /* No bad octal yet */
radix = 10; /* Assume decimal */
- if ((dotflag = (c == '.')) != FALSE) { /* . something? */
+ if ((dotflag = (c == '.')) != sal_False) { /* . something? */
(*outfun)('.'); /* Always out the dot */
if (type[(c = get())] != DIG) { /* If not a float numb, */
unget(); /* Rescan strange char */
@@ -420,25 +420,25 @@ register void (*outfun)() /* BP */
if (radix != 16 && (c == 'e' || c == 'E')) {
if (expseen) /* Already saw 'E'? */
break; /* Exit loop, bad nbr. */
- expseen = TRUE; /* Set exponent seen */
- signseen = FALSE; /* We can read '+' now */
+ expseen = sal_True; /* Set exponent seen */
+ signseen = sal_False; /* We can read '+' now */
radix = 10; /* Decimal exponent */
}
else if (radix != 16 && c == '.') {
if (dotflag) /* Saw dot already? */
break; /* Exit loop, two dots */
- dotflag = TRUE; /* Remember the dot */
+ dotflag = sal_True; /* Remember the dot */
radix = 10; /* Decimal fraction */
}
else if (c == '+' || c == '-') { /* 1.0e+10 */
if (signseen) /* Sign in wrong place? */
break; /* Exit loop, not nbr. */
- /* signseen = TRUE; */ /* Remember we saw it */
+ /* signseen = sal_True; */ /* Remember we saw it */
}
else { /* Check the digit */
switch (c) {
case '8': case '9': /* Sometimes wrong */
- octal89 = TRUE; /* Do check later */
+ octal89 = sal_True; /* Do check later */
case '0': case '1': case '2': case '3':
case '4': case '5': case '6': case '7':
break; /* Always ok */
@@ -452,7 +452,7 @@ register void (*outfun)() /* BP */
} /* End of switch */
} /* End general case */
(*outfun)(c); /* Accept the character */
- signseen = TRUE; /* Don't read sign now */
+ signseen = sal_True; /* Don't read sign now */
c = get(); /* Read another char */
} /* End of scan loop */
/*
@@ -481,14 +481,14 @@ done: if (dotflag || expseen) { /* Floating point? */
case 'L':
if (dotflag)
goto nomore;
- dotflag = TRUE;
+ dotflag = sal_True;
break;
case 'u':
case 'U':
if (expseen)
goto nomore;
- expseen = TRUE;
+ expseen = sal_True;
break;
default:
@@ -607,10 +607,10 @@ lookid(int c)
DEFBUF *
defendel(char* name, int delete)
/*
- * Enter this name in the lookup table (delete = FALSE)
- * or delete this name (delete = TRUE).
- * Returns a pointer to the define block (delete = FALSE)
- * Returns NULL if the symbol wasn't defined (delete = TRUE).
+ * Enter this name in the lookup table (delete = sal_False)
+ * or delete this name (delete = sal_True).
+ * Returns a pointer to the define block (delete = sal_False)
+ * Returns NULL if the symbol wasn't defined (delete = sal_True).
*/
{
register DEFBUF *dp;
@@ -839,7 +839,7 @@ newline:
* is skipping over blank lines and will do a
* #line at its convenience.
*/
- wrongline = TRUE; /* Need a #line now */
+ wrongline = sal_True; /* Need a #line now */
}
}
}
@@ -880,11 +880,11 @@ newline:
if (instring) /* Strings just return */
return (c); /* the character. */
else if (c == '/') { /* Comment? */
- instring = TRUE; /* So get() won't loop */
+ instring = sal_True; /* So get() won't loop */
/*MM c++ comments */
/*MM*/ c = get();
/*MM*/ if ((c != '*') && (c != '/')) { /* Next byte '*'? */
- instring = FALSE; /* Nope, no comment */
+ instring = sal_False; /* Nope, no comment */
unget(); /* Push the char. back */
return ('/'); /* Return the slash */
}
@@ -917,7 +917,7 @@ newline:
case '*':
if ((c = get()) != '/') /* If comment doesn't */
goto test; /* end, look at next */
- instring = FALSE; /* End of comment, */
+ instring = sal_False; /* End of comment, */
if (keepcomments) { /* Put out the comment */
cput(c); /* terminator, too */
}
@@ -950,7 +950,7 @@ newline:
case '\n': /* we'll need a #line */
if (!keepcomments)
- wrongline = TRUE; /* later... */
+ wrongline = sal_True; /* later... */
default: /* Anything else is */
break; /* Just a character */
} /* End switch */
@@ -965,7 +965,7 @@ newline:
if( EOF_CHAR == c )
return (EOF_CHAR);
else if( '\n' == c ){
- instring = FALSE; /* End of comment, */
+ instring = sal_False; /* End of comment, */
return( c );
}
}
@@ -973,7 +973,7 @@ newline:
} /* End if in comment */
else if (!inmacro && c == '\\') { /* If backslash, peek */
if ((c = get()) == '\n') { /* for a <nl>. If so, */
- wrongline = TRUE;
+ wrongline = sal_True;
goto newline;
}
else { /* Backslash anything */
diff --git a/rsc/source/rscpp/cppdef.h b/rsc/source/rscpp/cppdef.h
index cdbf07766c8f..196dfbe65cf9 100644
--- a/rsc/source/rscpp/cppdef.h
+++ b/rsc/source/rscpp/cppdef.h
@@ -26,12 +26,12 @@
************************************************************************/
/*
- * This redundant definition of TRUE and FALSE works around
+ * This redundant definition of sal_True and sal_False works around
* a limitation of Decus C.
*/
-#ifndef TRUE
-#define TRUE 1
-#define FALSE 0
+#ifndef sal_True
+#define sal_True 1
+#define sal_False 0
#endif
/*
@@ -96,16 +96,16 @@
* to be marked "static" even though they are referenced
* by "extern" statements elsewhere.
*
- * OK_DOLLAR Should be set TRUE if $ is a valid alphabetic character
+ * OK_DOLLAR Should be set sal_True if $ is a valid alphabetic character
* in identifiers (default), or zero if $ is invalid.
- * Default is TRUE.
+ * Default is sal_True.
*
- * OK_CONCAT Should be set TRUE if # may be used to concatenate
+ * OK_CONCAT Should be set sal_True if # may be used to concatenate
* tokens in macros (per the Ansi Draft Standard) or
- * FALSE for old-style # processing (needed if cpp is
+ * sal_False for old-style # processing (needed if cpp is
* to process assembler source code).
*
- * OK_DATE Predefines the compilation date if set TRUE.
+ * OK_DATE Predefines the compilation date if set sal_True.
* Not permitted by the Nov. 12, 1984 Draft Standard.
*
* S_CHAR etc. Define the sizeof the basic TARGET machine word types.
@@ -192,14 +192,14 @@
*/
#ifndef OLD_PREPROCESSOR
-#define OLD_PREPROCESSOR FALSE
+#define OLD_PREPROCESSOR sal_False
#endif
#if OLD_PREPROCESSOR
-#define OK_DOLLAR FALSE
-#define OK_CONCAT TRUE
-#define COMMENT_INVISIBLE TRUE
-#define STRING_FORMAL TRUE
+#define OK_DOLLAR sal_False
+#define OK_CONCAT sal_True
+#define COMMENT_INVISIBLE sal_True
+#define STRING_FORMAL sal_True
#define IDMAX 63 /* actually, seems to be unlimited */
#endif
@@ -219,14 +219,14 @@
#endif
/*
- * BIG_ENDIAN is set TRUE on machines (such as the IBM 360 series)
+ * BIG_ENDIAN is set sal_True on machines (such as the IBM 360 series)
* where 'ab' stores 'a' in the high-bits and 'b' in the low-bits.
- * It is set FALSE on machines (such as the PDP-11 and Vax-11)
+ * It is set sal_False on machines (such as the PDP-11 and Vax-11)
* where 'ab' stores 'a' in the low-bits and 'b' in the high-bits.
* (Or is it the other way around?) -- Warning: BIG_ENDIAN code is untested.
*/
#ifndef BIG_ENDIAN
-#define BIG_ENDIAN FALSE
+#define BIG_ENDIAN sal_False
#endif
/*
@@ -236,7 +236,7 @@
* expansions. This was removed from the Draft Ansi Standard.
*/
#ifndef COMMENT_INVISIBLE
-#define COMMENT_INVISIBLE FALSE
+#define COMMENT_INVISIBLE sal_False
#endif
/*
@@ -245,27 +245,27 @@
* Standard and a limited recognition capability added.
*/
#ifndef STRING_FORMAL
-#define STRING_FORMAL FALSE
+#define STRING_FORMAL sal_False
#endif
/*
* OK_DOLLAR enables use of $ as a valid "letter" in identifiers.
* This is a permitted extension to the Ansi Standard and is required
- * for e.g., VMS, RSX-11M, etc. It should be set FALSE if cpp is
+ * for e.g., VMS, RSX-11M, etc. It should be set sal_False if cpp is
* used to preprocess assembler source on Unix systems. OLD_PREPROCESSOR
- * sets OK_DOLLAR FALSE for that reason.
+ * sets OK_DOLLAR sal_False for that reason.
*/
#ifndef OK_DOLLAR
-#define OK_DOLLAR TRUE
+#define OK_DOLLAR sal_True
#endif
/*
* OK_CONCAT enables (one possible implementation of) token concatenation.
* If cpp is used to preprocess Unix assembler source, this should be
- * set FALSE as the concatenation character, #, is used by the assembler.
+ * set sal_False as the concatenation character, #, is used by the assembler.
*/
#ifndef OK_CONCAT
-#define OK_CONCAT TRUE
+#define OK_CONCAT sal_True
#endif
/*
@@ -274,7 +274,7 @@
* by the Draft Ansi Standard.
*/
#ifndef OK_DATE
-#define OK_DATE TRUE
+#define OK_DATE sal_True
#endif
/*
diff --git a/rsc/source/tools/rscchar.cxx b/rsc/source/tools/rscchar.cxx
index c23022e4222e..f666058617f8 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;
char * pOrgStr = new char[ nMaxUniCodeBuf ];
@@ -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++;
}
@@ -135,11 +135,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..8d7f4610b3db 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_uIntPtr 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_uIntPtr 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_uIntPtr lFileKey, const ByteString & rDefName,
+ sal_Int32 lDefId, sal_uIntPtr 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_uIntPtr lFileKey, const ByteString & rDefName,
+ RscExpression * pExpression, sal_uIntPtr 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_uIntPtr 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_uIntPtr)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_uIntPtr)0 );
while( pDep ){
delete pDep;
- pDep = Remove( (ULONG)0 );
+ pDep = Remove( (sal_uIntPtr)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_uIntPtr lDepend, sal_uIntPtr 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_uIntPtr lIncFile, sal_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr lDepend, sal_uIntPtr 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_uIntPtr lFileKey, sal_uIntPtr 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_uIntPtr lFileKey, sal_uIntPtr 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_uIntPtr lFileKey, const ByteString & rDefName,
+ sal_Int32 lId, sal_uIntPtr 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_uIntPtr lFileKey, const ByteString & rDefName,
+ RscExpression * pExp, sal_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr)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_uIntPtr 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_uIntPtr RscFileTab :: NewCodeFile( const ByteString & rName )
{
- ULONG lKey;
+ sal_uIntPtr 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_uIntPtr RscFileTab :: NewIncFile( const ByteString & rName,
const ByteString & rPath )
{
- ULONG lKey;
+ sal_uIntPtr lKey;
RscFile * pFName;
lKey = Find( rName );
diff --git a/rsc/source/tools/rsctools.cxx b/rsc/source/tools/rsctools.cxx
index 9904cd20d4e7..9632df25c641 100644
--- a/rsc/source/tools/rsctools.cxx
+++ b/rsc/source/tools/rsctools.cxx
@@ -148,7 +148,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 ];
@@ -159,7 +159,7 @@ BOOL Append( FILE * fDest, ByteString aTmpFile )
if( !fDest || !fSource ){
if( fSource )
fclose( fSource );
- return FALSE;
+ return sal_False;
}
else{
do{ // append
@@ -169,14 +169,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 );
@@ -394,10 +394,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/sot/inc/absdev.hxx b/sot/inc/absdev.hxx
index 3d251d98e0b6..d882e6fc6b14 100644
--- a/sot/inc/absdev.hxx
+++ b/sot/inc/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/agg.hxx b/sot/inc/agg.hxx
index 2f8cc7587458..cf07f6a8faff 100644
--- a/sot/inc/agg.hxx
+++ b/sot/inc/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/filelist.hxx b/sot/inc/filelist.hxx
index 4c6c55534319..fc04e92cb3d7 100644
--- a/sot/inc/filelist.hxx
+++ b/sot/inc/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_uIntPtr GetFormat();
// Liste fuellen/abfragen
void AppendFile( const String& rStr );
- String GetFile( ULONG i ) const;
- ULONG Count( void ) const;
+ String GetFile( sal_uIntPtr i ) const;
+ sal_uIntPtr Count( void ) const;
};
diff --git a/sot/inc/sot/exchange.hxx b/sot/inc/sot/exchange.hxx
index dc67e72a4f82..d079d9bfec2c 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_uIntPtr SotFormatStringId;
// ----------------
// - DataFlavorEx -
@@ -77,7 +77,7 @@ 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_uIntPtr nId );
// -------------------------
// - Vordefinierte Formate -
@@ -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_uIntPtr RegisterFormat( const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
+ static sal_uIntPtr RegisterFormatName( const String& rName );
+ static sal_uIntPtr 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_uIntPtr GetFormat( const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
+ static String GetFormatName( sal_uIntPtr nFormat );
+ static sal_Bool GetFormatDataFlavor( sal_uIntPtr nFormat, ::com::sun::star::datatransfer::DataFlavor& rFlavor );
+ static String GetFormatMimeType( sal_uIntPtr nFormat );
+ static sal_Bool IsInternal( const SvGlobalName& );
+ static sal_uIntPtr 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_uIntPtr nFormat )
{ return nFormat; }
static SotFormatStringId GetFormatStringId( const String& rName )
{ return SotExchange::RegisterFormatMimeType( rName ); }
- static ULONG RegisterSotFormatName( SotFormatStringId nId )
+ static sal_uIntPtr 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_uIntPtr& 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_uIntPtr 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_uIntPtr& 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_uIntPtr 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 08dd21a88aa5..58cd26e3b5a0 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 & );
@@ -75,8 +75,8 @@ public:
void * CastAndAddRef( SotObject * ) const;
void * AggCastAndAddRef( 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/formats.hxx b/sot/inc/sot/formats.hxx
index c9d7a3e69d78..8a61884c88e7 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_uIntPtr)0)
+#define SOT_FORMAT_STRING ((sal_uIntPtr)FORMAT_STRING)
+#define SOT_FORMAT_BITMAP ((sal_uIntPtr)FORMAT_BITMAP)
+#define SOT_FORMAT_GDIMETAFILE ((sal_uIntPtr)FORMAT_GDIMETAFILE)
+#define SOT_FORMAT_PRIVATE ((sal_uIntPtr)FORMAT_PRIVATE)
+#define SOT_FORMAT_FILE ((sal_uIntPtr)FORMAT_FILE)
+#define SOT_FORMAT_FILE_LIST ((sal_uIntPtr)FORMAT_FILE_LIST)
+#define SOT_FORMAT_RTF ((sal_uIntPtr)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_uIntPtr)11)
+#define SOT_FORMATSTR_ID_SVXB ((sal_uIntPtr)12)
+#define SOT_FORMATSTR_ID_SVIM ((sal_uIntPtr)13)
+#define SOT_FORMATSTR_ID_XFA ((sal_uIntPtr)14)
+#define SOT_FORMATSTR_ID_EDITENGINE ((sal_uIntPtr)15)
+#define SOT_FORMATSTR_ID_INTERNALLINK_STATE ((sal_uIntPtr)16)
+#define SOT_FORMATSTR_ID_SOLK ((sal_uIntPtr)17)
+#define SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK ((sal_uIntPtr)18)
+#define SOT_FORMATSTR_ID_TREELISTBOX ((sal_uIntPtr)19)
+#define SOT_FORMATSTR_ID_NATIVE ((sal_uIntPtr)20)
+#define SOT_FORMATSTR_ID_OWNERLINK ((sal_uIntPtr)21)
+#define SOT_FORMATSTR_ID_STARSERVER ((sal_uIntPtr)22)
+#define SOT_FORMATSTR_ID_STAROBJECT ((sal_uIntPtr)23)
+#define SOT_FORMATSTR_ID_APPLETOBJECT ((sal_uIntPtr)24)
+#define SOT_FORMATSTR_ID_PLUGIN_OBJECT ((sal_uIntPtr)25)
+#define SOT_FORMATSTR_ID_STARWRITER_30 ((sal_uIntPtr)26)
+#define SOT_FORMATSTR_ID_STARWRITER_40 ((sal_uIntPtr)27)
+#define SOT_FORMATSTR_ID_STARWRITER_50 ((sal_uIntPtr)28)
+#define SOT_FORMATSTR_ID_STARWRITERWEB_40 ((sal_uIntPtr)29)
+#define SOT_FORMATSTR_ID_STARWRITERWEB_50 ((sal_uIntPtr)30)
+#define SOT_FORMATSTR_ID_STARWRITERGLOB_40 ((sal_uIntPtr)31)
+#define SOT_FORMATSTR_ID_STARWRITERGLOB_50 ((sal_uIntPtr)32)
+#define SOT_FORMATSTR_ID_STARDRAW ((sal_uIntPtr)33)
+#define SOT_FORMATSTR_ID_STARDRAW_40 ((sal_uIntPtr)34)
+#define SOT_FORMATSTR_ID_STARIMPRESS_50 ((sal_uIntPtr)35)
+#define SOT_FORMATSTR_ID_STARDRAW_50 ((sal_uIntPtr)36)
+#define SOT_FORMATSTR_ID_STARCALC ((sal_uIntPtr)37)
+#define SOT_FORMATSTR_ID_STARCALC_40 ((sal_uIntPtr)38)
+#define SOT_FORMATSTR_ID_STARCALC_50 ((sal_uIntPtr)39)
+#define SOT_FORMATSTR_ID_STARCHART ((sal_uIntPtr)40)
+#define SOT_FORMATSTR_ID_STARCHART_40 ((sal_uIntPtr)41)
+#define SOT_FORMATSTR_ID_STARCHART_50 ((sal_uIntPtr)42)
+#define SOT_FORMATSTR_ID_STARIMAGE ((sal_uIntPtr)43)
+#define SOT_FORMATSTR_ID_STARIMAGE_40 ((sal_uIntPtr)44)
+#define SOT_FORMATSTR_ID_STARIMAGE_50 ((sal_uIntPtr)45)
+#define SOT_FORMATSTR_ID_STARMATH ((sal_uIntPtr)46)
+#define SOT_FORMATSTR_ID_STARMATH_40 ((sal_uIntPtr)47)
+#define SOT_FORMATSTR_ID_STARMATH_50 ((sal_uIntPtr)48)
+#define SOT_FORMATSTR_ID_STAROBJECT_PAINTDOC ((sal_uIntPtr)49)
+#define SOT_FORMATSTR_ID_FILLED_AREA ((sal_uIntPtr)50)
+#define SOT_FORMATSTR_ID_HTML ((sal_uIntPtr)51)
+#define SOT_FORMATSTR_ID_HTML_SIMPLE ((sal_uIntPtr)52)
+#define SOT_FORMATSTR_ID_CHAOS ((sal_uIntPtr)53)
+#define SOT_FORMATSTR_ID_CNT_MSGATTACHFILE ((sal_uIntPtr)54)
+#define SOT_FORMATSTR_ID_BIFF_5 ((sal_uIntPtr)55)
+#define SOT_FORMATSTR_ID_BIFF__5 ((sal_uIntPtr)56)
+#define SOT_FORMATSTR_ID_SYLK ((sal_uIntPtr)57)
+#define SOT_FORMATSTR_ID_SYLK_BIGCAPS ((sal_uIntPtr)58)
+#define SOT_FORMATSTR_ID_LINK ((sal_uIntPtr)59)
+#define SOT_FORMATSTR_ID_DIF ((sal_uIntPtr)60)
+#define SOT_FORMATSTR_ID_STARDRAW_TABBAR ((sal_uIntPtr)61)
+#define SOT_FORMATSTR_ID_SONLK ((sal_uIntPtr)62)
+#define SOT_FORMATSTR_ID_MSWORD_DOC ((sal_uIntPtr)63)
+#define SOT_FORMATSTR_ID_STAR_FRAMESET_DOC ((sal_uIntPtr)64)
+#define SOT_FORMATSTR_ID_OFFICE_DOC ((sal_uIntPtr)65)
+#define SOT_FORMATSTR_ID_NOTES_DOCINFO ((sal_uIntPtr)66)
+#define SOT_FORMATSTR_ID_NOTES_HNOTE ((sal_uIntPtr)67)
+#define SOT_FORMATSTR_ID_NOTES_NATIVE ((sal_uIntPtr)68)
+#define SOT_FORMATSTR_ID_SFX_DOC ((sal_uIntPtr)69)
+#define SOT_FORMATSTR_ID_EVDF ((sal_uIntPtr)70)
+#define SOT_FORMATSTR_ID_ESDF ((sal_uIntPtr)71)
+#define SOT_FORMATSTR_ID_IDF ((sal_uIntPtr)72)
+#define SOT_FORMATSTR_ID_EFTP ((sal_uIntPtr)73)
+#define SOT_FORMATSTR_ID_EFD ((sal_uIntPtr)74)
+#define SOT_FORMATSTR_ID_SVX_FORMFIELDEXCH ((sal_uIntPtr)75)
+#define SOT_FORMATSTR_ID_EXTENDED_TABBAR ((sal_uIntPtr)76)
+#define SOT_FORMATSTR_ID_SBA_DATAEXCHANGE ((sal_uIntPtr)77)
+#define SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE ((sal_uIntPtr)78)
+#define SOT_FORMATSTR_ID_SBA_PRIVATE_URL ((sal_uIntPtr)79)
+#define SOT_FORMATSTR_ID_SBA_TABED ((sal_uIntPtr)80)
+#define SOT_FORMATSTR_ID_SBA_TABID ((sal_uIntPtr)81)
+#define SOT_FORMATSTR_ID_SBA_JOIN ((sal_uIntPtr)82)
+#define SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ((sal_uIntPtr)83)
+#define SOT_FORMATSTR_ID_LINKSRCDESCRIPTOR ((sal_uIntPtr)84)
+#define SOT_FORMATSTR_ID_EMBED_SOURCE ((sal_uIntPtr)85)
+#define SOT_FORMATSTR_ID_LINK_SOURCE ((sal_uIntPtr)86)
+#define SOT_FORMATSTR_ID_EMBEDDED_OBJ ((sal_uIntPtr)87)
+#define SOT_FORMATSTR_ID_FILECONTENT ((sal_uIntPtr)88)
+#define SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR ((sal_uIntPtr)89)
+#define SOT_FORMATSTR_ID_FILENAME ((sal_uIntPtr)90)
+#define SOT_FORMATSTR_ID_SD_OLE ((sal_uIntPtr)91)
+#define SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE ((sal_uIntPtr)92)
+#define SOT_FORMATSTR_ID_EMBED_SOURCE_OLE ((sal_uIntPtr)93)
+#define SOT_FORMATSTR_ID_OBJECTDESCRIPTOR_OLE ((sal_uIntPtr)94)
+#define SOT_FORMATSTR_ID_LINKSRCDESCRIPTOR_OLE ((sal_uIntPtr)95)
+#define SOT_FORMATSTR_ID_LINK_SOURCE_OLE ((sal_uIntPtr)96)
+#define SOT_FORMATSTR_ID_SBA_CTRLDATAEXCHANGE ((sal_uIntPtr)97)
+#define SOT_FORMATSTR_ID_OUTPLACE_OBJ ((sal_uIntPtr)98)
+#define SOT_FORMATSTR_ID_CNT_OWN_CLIP ((sal_uIntPtr)99)
+#define SOT_FORMATSTR_ID_INET_IMAGE ((sal_uIntPtr)100)
+#define SOT_FORMATSTR_ID_NETSCAPE_IMAGE ((sal_uIntPtr)101)
+#define SOT_FORMATSTR_ID_SBA_FORMEXCHANGE ((sal_uIntPtr)102)
+#define SOT_FORMATSTR_ID_SBA_REPORTEXCHANGE ((sal_uIntPtr)103)
+#define SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR ((sal_uIntPtr)104)
+#define SOT_FORMATSTR_ID_STARCHARTDOCUMENT_50 ((sal_uIntPtr)105)
+#define SOT_FORMATSTR_ID_GRAPHOBJ ((sal_uIntPtr)106)
+#define SOT_FORMATSTR_ID_STARWRITER_60 ((sal_uIntPtr)107)
+#define SOT_FORMATSTR_ID_STARWRITERWEB_60 ((sal_uIntPtr)108)
+#define SOT_FORMATSTR_ID_STARWRITERGLOB_60 ((sal_uIntPtr)109)
+#define SOT_FORMATSTR_ID_STARDRAW_60 ((sal_uIntPtr)110)
+#define SOT_FORMATSTR_ID_STARIMPRESS_60 ((sal_uIntPtr)111)
+#define SOT_FORMATSTR_ID_STARCALC_60 ((sal_uIntPtr)112)
+#define SOT_FORMATSTR_ID_STARCHART_60 ((sal_uIntPtr)113)
+#define SOT_FORMATSTR_ID_STARMATH_60 ((sal_uIntPtr)114)
+#define SOT_FORMATSTR_ID_WMF ((sal_uIntPtr)115)
+#define SOT_FORMATSTR_ID_DBACCESS_QUERY ((sal_uIntPtr)116)
+#define SOT_FORMATSTR_ID_DBACCESS_TABLE ((sal_uIntPtr)117)
+#define SOT_FORMATSTR_ID_DBACCESS_COMMAND ((sal_uIntPtr)118)
+#define SOT_FORMATSTR_ID_DIALOG_60 ((sal_uIntPtr)119)
+#define SOT_FORMATSTR_ID_EMF ((sal_uIntPtr)120)
+#define SOT_FORMATSTR_ID_BIFF_8 ((sal_uIntPtr)121)
+#define SOT_FORMATSTR_ID_BMP ((sal_uIntPtr)122)
+#define SOT_FORMATSTR_ID_HTML_NO_COMMENT ((sal_uIntPtr)123)
+#define SOT_FORMATSTR_ID_STARWRITER_8 ((sal_uIntPtr)124)
+#define SOT_FORMATSTR_ID_STARWRITERWEB_8 ((sal_uIntPtr)125)
+#define SOT_FORMATSTR_ID_STARWRITERGLOB_8 ((sal_uIntPtr)126)
+#define SOT_FORMATSTR_ID_STARDRAW_8 ((sal_uIntPtr)127)
+#define SOT_FORMATSTR_ID_STARIMPRESS_8 ((sal_uIntPtr)128)
+#define SOT_FORMATSTR_ID_STARCALC_8 ((sal_uIntPtr)129)
+#define SOT_FORMATSTR_ID_STARCHART_8 ((sal_uIntPtr)130)
+#define SOT_FORMATSTR_ID_STARMATH_8 ((sal_uIntPtr)131)
+#define SOT_FORMATSTR_ID_XFORMS ((sal_uIntPtr)132)
+#define SOT_FORMATSTR_ID_STARWRITER_8_TEMPLATE ((sal_uIntPtr)133)
+#define SOT_FORMATSTR_ID_STARDRAW_8_TEMPLATE ((sal_uIntPtr)134)
+#define SOT_FORMATSTR_ID_STARIMPRESS_8_TEMPLATE ((sal_uIntPtr)135)
+#define SOT_FORMATSTR_ID_STARCALC_8_TEMPLATE ((sal_uIntPtr)136)
+#define SOT_FORMATSTR_ID_STARCHART_8_TEMPLATE ((sal_uIntPtr)137)
+#define SOT_FORMATSTR_ID_STARMATH_8_TEMPLATE ((sal_uIntPtr)138)
+#define SOT_FORMATSTR_ID_STARBASE_8 ((sal_uIntPtr)139)
+#define SOT_FORMATSTR_ID_HC_GDIMETAFILE ((sal_uIntPtr)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 db2ac3b30ffc..5b6cedfbf410 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 ); \
@@ -388,14 +388,14 @@ class SOT_DLLPUBLIC SotObject : virtual public SvRefBase
friend class SotFactory;
friend class SvObject;
SvAggregateMemberList * pAggList; // fuer Aggregation, erstes ist das MainObj
- USHORT nStrongLockCount;
- USHORT nOwnerLockCount;
- BOOL bOwner:1,
- bSVObject:1, // Ist Proxy, dann TRUE wenn andere Seite SV ist
- bInClose:1; // TRUE, im DoClose
+ sal_uInt16 nStrongLockCount;
+ sal_uInt16 nOwnerLockCount;
+ sal_Bool bOwner:1,
+ bSVObject:1, // Ist Proxy, dann sal_True wenn andere Seite SV ist
+ bInClose:1; // sal_True, im DoClose
void * DownAggCast( const SotFactory * pFact );
- void RemoveInterface( ULONG );
+ void RemoveInterface( sal_uIntPtr );
void RemoveInterface( SotObject * );
#if defined (GCC) && (defined (C281) || defined (C290) || defined (C291))
public:
@@ -403,8 +403,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())
@@ -413,11 +413,11 @@ public:
// Nur damit die Makros in So3 nicht ganz ausufern
virtual IUnknown * GetInterface( const SvGlobalName & );
- BOOL Owner() const { return bOwner; }
- BOOL IsSvObject() const;
+ sal_Bool Owner() const { return bOwner; }
+ sal_Bool IsSvObject() const;
// Methoden fuer die Aggregation (siehe OLE2-Spec)
- BOOL ShouldDelete();
+ sal_Bool ShouldDelete();
virtual void QueryDelete();
SvAggregateMemberList & GetAggList();
void AddInterface( SotObject * );
@@ -428,18 +428,18 @@ public:
SotObject * GetMainObj() const;
// !!! Read the Manual !!!
- virtual USHORT FuzzyLock( BOOL bLock, BOOL bIntern, BOOL bClose );
- void Lock( BOOL bLock )
+ virtual sal_uInt16 FuzzyLock( sal_Bool bLock, sal_Bool bIntern, sal_Bool bClose );
+ void Lock( sal_Bool bLock )
{
- FuzzyLock( bLock, TRUE, TRUE );
+ FuzzyLock( bLock, sal_True, sal_True );
}
- USHORT GetOwnerLockCount() const { return nOwnerLockCount; }
- USHORT GetStrongLockCount() const { return 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/storage.hxx b/sot/inc/sot/storage.hxx
index 572e100c7299..ccfeae4d9193 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_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();
~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_uIntPtr 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_uIntPtr 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_uIntPtr GetErrorCode() const { return m_nError; }
+ sal_uIntPtr GetError() const { return ERRCODE_TOERROR(m_nError); }
+ void SetError( sal_uIntPtr 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_uIntPtr bOriginalClipFormat,
const String & rUserTypeName );
virtual void SetConvertClass( const SvGlobalName & rConvertClass,
- ULONG bOriginalClipFormat,
+ sal_uIntPtr bOriginalClipFormat,
const String & rUserTypeName );
virtual SvGlobalName GetClassName();// Typ der Daten im Storage
- virtual ULONG GetFormat();
+ virtual sal_uIntPtr 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/stg.hxx b/sot/inc/stg.hxx
index 84373e26d596..b4f13b8d2660 100644
--- a/sot/inc/stg.hxx
+++ b/sot/inc/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_uIntPtr 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_uIntPtr ) const;
+ sal_uIntPtr 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_uIntPtr Read( void * pData, sal_uIntPtr nSize ) = 0;
+ virtual sal_uIntPtr Write( const void* pData, sal_uIntPtr nSize ) = 0;
+ virtual sal_uIntPtr Seek( sal_uIntPtr nPos ) = 0;
+ virtual sal_uIntPtr 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_uIntPtr 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_uIntPtr nOriginalClipFormat,
const String & rUserTypeName ) = 0;
virtual void SetConvertClass( const SvGlobalName & rConvertClass,
- ULONG nOriginalClipFormat,
+ sal_uIntPtr nOriginalClipFormat,
const String & rUserTypeName ) = 0;
virtual SvGlobalName GetClassName() = 0;
- virtual ULONG GetFormat() = 0;
+ virtual sal_uIntPtr 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_uIntPtr 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_uIntPtr Read( void * pData, sal_uIntPtr nSize );
+ virtual sal_uIntPtr Write( const void* pData, sal_uIntPtr nSize );
+ virtual sal_uIntPtr Seek( sal_uIntPtr nPos );
+ virtual sal_uIntPtr 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_uIntPtr 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_uIntPtr nOriginalClipFormat,
const String & rUserTypeName );
virtual void SetConvertClass( const SvGlobalName & rConvertClass,
- ULONG nOriginalClipFormat,
+ sal_uIntPtr nOriginalClipFormat,
const String & rUserTypeName );
virtual SvGlobalName GetClassName();
- virtual ULONG GetFormat();
+ virtual sal_uIntPtr 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_uIntPtr Read( void * pData, sal_uIntPtr nSize );
+ virtual sal_uIntPtr Write( const void* pData, sal_uIntPtr nSize );
+ virtual sal_uIntPtr Seek( sal_uIntPtr nPos );
+ virtual sal_uIntPtr 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_uIntPtr 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_uIntPtr nOriginalClipFormat,
const String & rUserTypeName );
virtual void SetConvertClass( const SvGlobalName & rConvertClass,
- ULONG nOriginalClipFormat,
+ sal_uIntPtr nOriginalClipFormat,
const String & rUserTypeName );
virtual SvGlobalName GetClassName();
- virtual ULONG GetFormat();
+ virtual sal_uIntPtr 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/storinfo.hxx b/sot/inc/storinfo.hxx
index dab1f6d4540e..5f225c26d0de 100644
--- a/sot/inc/storinfo.hxx
+++ b/sot/inc/storinfo.hxx
@@ -39,14 +39,14 @@ class SvStorageInfo
friend class SvStorage;
String aName;
SvGlobalName aClassName;
- ULONG nSize;
- BOOL bStream:1,
+ sal_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr ReadClipboardFormat( SvStream & rStm );
+SOT_DLLPUBLIC void WriteClipboardFormat( SvStream & rStm, sal_uIntPtr nFormat );
#endif // _STORINFO_HXX
diff --git a/sot/source/base/exchange.cxx b/sot/source/base/exchange.cxx
index 67c2b64f105f..2b51162df3a0 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr SotExchange::RegisterFormat( const DataFlavor& rFlavor )
{
- ULONG nRet = GetFormat( rFlavor );
+ sal_uIntPtr 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_uIntPtr 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_uIntPtr nFormat )
|*
*************************************************************************/
-String SotExchange::GetFormatMimeType( ULONG nFormat )
+String SotExchange::GetFormatMimeType( sal_uIntPtr 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_uIntPtr SotExchange::GetFormatIdFromMimeType( const String& rMimeType )
{
const DataFlavorRepresentation *pFormatArray_Impl = FormatArray_Impl::get();
- ULONG i, nMax = SOT_FORMAT_FILE_LIST;
+ sal_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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 4934f99e78c6..5c4757188f38 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_uIntPtr 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_uIntPtr nCount = pSotData->pObjectList->Count();
+ for( sal_uIntPtr i = 0; i < nCount ; i++ )
{
- pSotData->pObjectList->GetObject( i )->TestInvariant( FALSE );
+ pSotData->pObjectList->GetObject( i )->TestInvariant( sal_False );
}
}
#endif
@@ -388,17 +388,17 @@ void * SotFactory::AggCastAndAddRef
|*
|* 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 4f854add304d..80828e596538 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_uIntPtr nCount = pStrList->Count();
+ for( sal_uIntPtr 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_uIntPtr nCount = pStrList->Count();
+ for( sal_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr FileList::Count( void ) const
{
return pStrList->Count();
}
diff --git a/sot/source/base/formats.cxx b/sot/source/base/formats.cxx
index baddde6e716f..10b6958ca4ac 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_uIntPtr 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_uIntPtr 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_uIntPtr& rFormat,
+ sal_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr& rFormat,
+ sal_uInt16& rDefaultAction,
+ sal_uIntPtr 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_uIntPtr& rFormat,
+ sal_uInt16& rDefaultAction, sal_uIntPtr 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/object.cxx b/sot/source/base/object.cxx
index 403a1c6bb61d..bdd3862d8d52 100644
--- a/sot/source/base/object.cxx
+++ b/sot/source/base/object.cxx
@@ -63,7 +63,7 @@ SO2_IMPL_INVARIANT(SotObject)
|*
|* Beschreibung:
*************************************************************************/
-void SotObject::TestMemberObjRef( BOOL /*bFree*/ )
+void SotObject::TestMemberObjRef( sal_Bool /*bFree*/ )
{
}
@@ -73,7 +73,7 @@ void SotObject::TestMemberObjRef( BOOL /*bFree*/ )
|* Beschreibung:
*************************************************************************/
#ifdef TEST_INVARIANT
-void SotObject::TestMemberInvariant( BOOL /*bPrint*/ )
+void SotObject::TestMemberInvariant( sal_Bool /*bPrint*/ )
{
}
#endif
@@ -87,9 +87,9 @@ SotObject::SotObject()
: pAggList ( NULL )
, nStrongLockCount( 0 )
, nOwnerLockCount( 0 )
- , bOwner ( TRUE )
- , bSVObject ( FALSE )
- , bInClose ( FALSE )
+ , bOwner ( sal_True )
+ , bSVObject ( sal_False )
+ , bInClose ( sal_False )
{
SotFactory::IncSvObjectCount( this );
}
@@ -123,7 +123,7 @@ IUnknown * SotObject::GetInterface( const SvGlobalName & )
|*
|* Beschreibung
*************************************************************************/
-BOOL SotObject::IsSvObject() const
+sal_Bool SotObject::IsSvObject() const
{
return Owner() || bSVObject;
}
@@ -138,20 +138,20 @@ BOOL SotObject::IsSvObject() const
|* Objekte um 1 erhoeht, muss dies bei der Berechnung
|* des 0-RefCounts beruecksichtigt werden.
*************************************************************************/
-BOOL SotObject::ShouldDelete()
+sal_Bool SotObject::ShouldDelete()
{
if( !pAggList )
- return TRUE;
+ return sal_True;
SvAggregate & rMO = pAggList->GetObject( 0 );
if( rMO.bMainObj )
{
AddRef();
pAggList->GetObject( 0 ).pObj->ReleaseRef();
- return FALSE;
+ return sal_False;
}
- ULONG i;
+ sal_uIntPtr i;
for( i = 1; i < pAggList->Count(); i++ )
{
SvAggregate & rAgg = pAggList->GetObject( i );
@@ -162,7 +162,7 @@ BOOL SotObject::ShouldDelete()
AddRef();
// einen Aggregierten runterzaehlen
rAgg.pObj->ReleaseRef();
- return FALSE;
+ return sal_False;
}
}
AddNextRef(); // rekursion stoppen
@@ -175,7 +175,7 @@ BOOL SotObject::ShouldDelete()
delete pAggList;
pAggList = NULL;
// und zerstoeren, dies ist unabhaengig vom RefCount
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -212,7 +212,7 @@ SvAggregateMemberList & SotObject::GetAggList()
|*
|* Beschreibung
*************************************************************************/
-void SotObject::RemoveInterface( ULONG nPos )
+void SotObject::RemoveInterface( sal_uIntPtr nPos )
{
SvAggregate & rAgg = pAggList->GetObject( nPos );
if( !rAgg.bFactory )
@@ -238,7 +238,7 @@ void SotObject::RemoveInterface( SotObject * pObjP )
{
DBG_ASSERT( pObjP, "null pointer" );
DBG_ASSERT( pAggList, "no aggregation list" );
- ULONG i;
+ sal_uIntPtr i;
for( i = 0; i < pAggList->Count(); i++ )
{
SvAggregate & rAgg = pAggList->GetObject( i );
@@ -257,12 +257,12 @@ void SotObject::AddInterface( SotObject * pObjP )
{
pObjP->AddRef(); // Objekt festhalten
GetAggList();
- pAggList->Append( SvAggregate( pObjP, FALSE ) );
+ pAggList->Append( SvAggregate( pObjP, sal_False ) );
// sich selbst als Typecast-Verwalter eintragen
SvAggregateMemberList & rAList = pObjP->GetAggList();
DBG_ASSERT( !rAList.GetObject( 0 ).bMainObj, "try to aggregate twice" );
- rAList[ 0 ] = SvAggregate( this, TRUE );
+ rAList[ 0 ] = SvAggregate( this, sal_True );
}
/*************************************************************************
@@ -298,7 +298,7 @@ void * SotObject::DownAggCast( const SotFactory * pFact )
// geht den Pfad nur Richtung aggregierte Objekte
if( pAggList )
{
- for( ULONG i = 1; !pCast || i < pAggList->Count(); i++ )
+ for( sal_uIntPtr i = 1; !pCast || i < pAggList->Count(); i++ )
{
SvAggregate & rAgg = pAggList->GetObject( i );
if( rAgg.bFactory )
@@ -307,14 +307,14 @@ void * SotObject::DownAggCast( const SotFactory * pFact )
{
// On-Demand erzeugen, wenn Typ gebraucht
SotObjectRef aObj( CreateAggObj( rAgg.pFact ) );
- rAgg.bFactory = FALSE;
+ rAgg.bFactory = sal_False;
rAgg.pObj = aObj;
rAgg.pObj->AddRef();
// sich selbst als Typecast-Verwalter eintragen
SvAggregateMemberList & rAList = rAgg.pObj->GetAggList();
DBG_ASSERT( !rAList.GetObject( 0 ).bMainObj, "try to aggregate twice" );
- rAList[ 0 ] = SvAggregate( this, TRUE );
+ rAList[ 0 ] = SvAggregate( this, sal_True );
}
}
if( !rAgg.bFactory )
@@ -382,23 +382,23 @@ SotObject * SotObject::GetMainObj() const
}
//=========================================================================
-USHORT SotObject::FuzzyLock
+sal_uInt16 SotObject::FuzzyLock
(
- BOOL bLock, /* TRUE, lock. FALSE, unlock. */
- BOOL /*bIntern*/, /* TRUE, es handelt sich um einen internen Lock.
- FALSE, der Lock kam von aussen (Ole2, Ipc2) */
- BOOL bClose /* TRUE, Close aufrufen wenn letzte Lock */
+ sal_Bool bLock, /* sal_True, lock. sal_False, unlock. */
+ sal_Bool /*bIntern*/, /* sal_True, es handelt sich um einen internen Lock.
+ sal_False, der Lock kam von aussen (Ole2, Ipc2) */
+ sal_Bool bClose /* sal_True, Close aufrufen wenn letzte Lock */
)
/* [Beschreibung]
Erlaubte Parameterkombinationen:
- ( TRUE, TRUE, * ) -> interner Lock.
- ( FALSE, TRUE, TRUE ) -> interner Unlock mit Close,
+ ( sal_True, sal_True, * ) -> interner Lock.
+ ( sal_False, sal_True, sal_True ) -> interner Unlock mit Close,
wenn LockCount() == 0
- ( TRUE, FALSE, * ) -> externer Lock.
- ( FALSE, FALSE, TRUE ) -> externer Unlock mit Close,
+ ( sal_True, sal_False, * ) -> externer Lock.
+ ( sal_False, sal_False, sal_True ) -> externer Unlock mit Close,
wenn LockCount() == 0
- ( FALSE, FALSE, FALSE ) -> externer Unlock
+ ( sal_False, sal_False, sal_False ) -> externer Unlock
F"ur !Owner() wird der Aufruf an das externe Objekt weitergeleitet.
F"ur diese muss das <IOleItemContainer>-Interface zur Vef"ugung stehen.
@@ -411,7 +411,7 @@ USHORT SotObject::FuzzyLock
*/
{
SotObjectRef xHoldAlive( this );
- USHORT nRet;
+ sal_uInt16 nRet;
if( bLock )
{
AddRef();
@@ -431,7 +431,7 @@ USHORT SotObject::FuzzyLock
//=========================================================================
void SotObject::OwnerLock
(
- BOOL bLock /* TRUE, lock. FALSE, unlock. */
+ sal_Bool bLock /* sal_True, lock. sal_False, unlock. */
)
/* [Beschreibung]
@@ -467,23 +467,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/stg.cxx b/sot/source/sdstor/stg.cxx
index 1c749aa05cb8..5adfb735d47b 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_uIntPtr StorageBase::GetError() const
{
- ULONG n = m_nError;
+ sal_uIntPtr n = m_nError;
((StorageBase*) this)->m_nError = SVSTREAM_OK;
return n;
}
-void StorageBase::SetError( ULONG n ) const
+void StorageBase::SetError( sal_uIntPtr 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_uIntPtr StorageStream::Read( void* pData, sal_uIntPtr 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_uIntPtr StorageStream::Write( const void* pData, sal_uIntPtr 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_uIntPtr StorageStream::Seek( sal_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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 88a8187ee9dd..6a0d1117f934 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_uIntPtr 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_uIntPtr nPos = pStrm->Tell();
+ sal_uIntPtr 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_uIntPtr 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_uIntPtr nPos = Page2Pos( nPage );
+ sal_Int32 nPg2 = ( ( nPage + nPg ) > nPages ) ? nPages - nPage : nPg;
+ sal_uIntPtr 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_uIntPtr nPos = Page2Pos( nPage );
+ sal_uIntPtr 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_uIntPtr 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_uIntPtr 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..0c1fc3eab1ff 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_uIntPtr 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_uIntPtr GetError() { return nError; }
void MoveError( StorageBase& );
- void SetError( ULONG );
+ void SetError( sal_uIntPtr );
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 f093dc60cbe7..0b1cf2582501 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_uIntPtr 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_uIntPtr 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_uIntPtr nn = n;
if( nn > 4096 )
nn = 4096;
- if( (ULONG) pStgStrm->Read( p, nn ) != nn )
+ if( (sal_uIntPtr) 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_uIntPtr n = pTmpStrm->GetSize();
StgStrm* pNewStrm;
StgIo& rIo = pStgStrm->GetIo();
- ULONG nThreshold = (ULONG) rIo.aHdr.GetThreshold();
+ sal_uIntPtr nThreshold = (sal_uIntPtr) 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_uIntPtr nn = n;
if( nn > 4096 )
nn = 4096;
if( pTmpStrm->Read( p, nn ) != nn )
break;
- if( (ULONG) pNewStrm->Write( p, nn ) != nn )
+ if( (sal_uIntPtr) 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,72 +874,72 @@ 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 )
{
n *= STGENTRY_SIZE;
if( n >= nSize )
return NULL;
- return GetPtr( n, TRUE, bDirty );
+ return GetPtr( n, sal_True, bDirty );
}
// Find a dir entry.
@@ -986,9 +986,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
{
@@ -998,7 +998,7 @@ StgDirEntry* StgDirStrm::Create
pRes->pUp = &rStg;
pRes->ppRoot = &pRoot;
pRes->bCreated =
- pRes->bDirty = TRUE;
+ pRes->bDirty = sal_True;
}
else
{
@@ -1011,44 +1011,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 46d7f1803140..917a4c2adb61 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 7a5b7bc52b26..8b7d547ca416 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 00dd454233e2..580a3ddad4a6 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,81 +135,81 @@ BOOL StgIo::CommitAll()
if( aHdr.Store( *this ) )
{
pStrm->Flush();
- ULONG n = pStrm->GetError();
+ sal_uIntPtr 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_uIntPtr 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_uIntPtr 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 )
@@ -231,22 +231,22 @@ ULONG EasyFat::Mark( INT32 nPage, INT32 nCount, INT32 nExpect )
class Validator
{
- ULONG nError;
+ sal_uIntPtr nError;
EasyFat aSmallFat;
EasyFat aFat;
StgIo &rIo;
- ULONG ValidateMasterFATs();
- ULONG ValidateDirectoryEntries();
- ULONG FindUnrefedChains();
- ULONG MarkAll( StgDirEntry *pEntry );
+ sal_uIntPtr ValidateMasterFATs();
+ sal_uIntPtr ValidateDirectoryEntries();
+ sal_uIntPtr FindUnrefedChains();
+ sal_uIntPtr MarkAll( StgDirEntry *pEntry );
public:
Validator( StgIo &rIo );
- BOOL IsError() { return nError != 0; }
+ sal_Bool IsError() { return nError != 0; }
};
Validator::Validator( StgIo &rIoP )
@@ -254,7 +254,7 @@ Validator::Validator( StgIo &rIoP )
aFat( rIoP, rIoP.pFAT, 1 << rIoP.aHdr.GetPageSize() ),
rIo( rIoP )
{
- ULONG nErr = nError = FAT_OK;
+ sal_uIntPtr nErr = nError = FAT_OK;
if( ( nErr = ValidateMasterFATs() ) != FAT_OK )
nError = nErr;
@@ -264,13 +264,13 @@ Validator::Validator( StgIo &rIoP )
nError = nErr;
}
-ULONG Validator::ValidateMasterFATs()
+sal_uIntPtr Validator::ValidateMasterFATs()
{
- INT32 nCount = rIo.aHdr.GetFATSize();
- ULONG nErr;
- for( INT32 i = 0; i < nCount; i++ )
+ sal_Int32 nCount = rIo.aHdr.GetFATSize();
+ sal_uIntPtr 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() )
@@ -279,10 +279,10 @@ ULONG Validator::ValidateMasterFATs()
return FAT_OK;
}
-ULONG Validator::MarkAll( StgDirEntry *pEntry )
+sal_uIntPtr Validator::MarkAll( StgDirEntry *pEntry )
{
StgIterator aIter( *pEntry );
- ULONG nErr = FAT_OK;
+ sal_uIntPtr nErr = FAT_OK;
for( StgDirEntry* p = aIter.First(); p ; p = aIter.Next() )
{
if( p->aEntry.GetType() == STG_STORAGE )
@@ -293,7 +293,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
@@ -305,10 +305,10 @@ ULONG Validator::MarkAll( StgDirEntry *pEntry )
return FAT_OK;
}
-ULONG Validator::ValidateDirectoryEntries()
+sal_uIntPtr Validator::ValidateDirectoryEntries()
{
// Normale DirEntries
- ULONG nErr = MarkAll( rIo.pTOC->GetRoot() );
+ sal_uIntPtr nErr = MarkAll( rIo.pTOC->GetRoot() );
if( nErr != FAT_OK )
return nErr;
// Small Data
@@ -328,7 +328,7 @@ ULONG Validator::ValidateDirectoryEntries()
return nErr;
}
-ULONG Validator::FindUnrefedChains()
+sal_uIntPtr Validator::FindUnrefedChains()
{
if( aSmallFat.HasUnrefChains() ||
aFat.HasUnrefChains() )
@@ -349,12 +349,12 @@ const Link& StgIo::GetErrorLink()
return ErrorLink::get();
}
-ULONG StgIo::ValidateFATs()
+sal_uIntPtr 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;
@@ -367,7 +367,7 @@ ULONG StgIo::ValidateFATs()
delete pV;
}
- ULONG nErr;
+ sal_uIntPtr nErr;
if( bRet1 != bRet2 )
nErr = bRet1 ? FAT_ONFILEERROR : FAT_INMEMORYERROR;
else nErr = bRet1 ? FAT_OK : FAT_BOTHERROR;
@@ -377,7 +377,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..43f72ebefd59 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_uIntPtr 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_uIntPtr ValidateFATs( );
};
#endif
diff --git a/sot/source/sdstor/stgole.cxx b/sot/source/sdstor/stgole.cxx
index 148f1e87585c..e3d02bc597ab 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_uIntPtr StgInternalStream::GetData( void* pData, sal_uIntPtr 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_uIntPtr StgInternalStream::PutData( const void* pData, sal_uIntPtr nSize )
{
if( pStrm )
{
@@ -82,7 +82,7 @@ ULONG StgInternalStream::PutData( const void* pData, ULONG nSize )
return 0;
}
-ULONG StgInternalStream::SeekPos( ULONG nPos )
+sal_uIntPtr StgInternalStream::SeekPos( sal_uIntPtr 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_uIntPtr) 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_uIntPtr) 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 346f21035f06..b8c569c81ded 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_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();
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_uIntPtr 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_uIntPtr& 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 07711133bf4b..74e21903f087 100644
--- a/sot/source/sdstor/stgstrms.cxx
+++ b/sot/source/sdstor/stgstrms.cxx
@@ -52,10 +52,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();
@@ -67,7 +67,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
@@ -75,16 +75,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 )
{
@@ -100,16 +100,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 ) )
{
@@ -119,7 +119,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
@@ -137,12 +137,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;
}
@@ -163,8 +163,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;
}
@@ -180,19 +180,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;
@@ -202,22 +202,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 )
@@ -253,7 +253,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++;
}
@@ -273,9 +273,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;
@@ -285,29 +285,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 ////////////////////////////////
@@ -345,21 +345,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
@@ -376,7 +376,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;
@@ -394,12 +394,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;
@@ -409,16 +409,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 )
@@ -427,34 +427,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;
}
@@ -468,12 +468,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;
}
@@ -486,11 +486,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 )
@@ -498,38 +498,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 )
{
@@ -556,7 +556,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 );
@@ -570,7 +570,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 );
@@ -587,30 +587,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 );
}
@@ -619,7 +619,7 @@ BOOL StgFATStrm::SetPage( short nOff, INT32 nNewPage )
else
{
rIo.SetError( SVSTREAM_GENERALERROR );
- bRes = FALSE;
+ bRes = sal_False;
}
}
@@ -627,16 +627,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 );
@@ -654,17 +654,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
@@ -677,12 +677,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 );
@@ -693,22 +693,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 );
}
@@ -721,7 +721,7 @@ BOOL StgFATStrm::SetSize( INT32 nBytes )
}
nSize = nNew * nPageSize;
rIo.aHdr.SetFATSize( nNew );
- return TRUE;
+ return sal_True;
}
/////////////////////////// class StgDataStrm //////////////////////////////
@@ -731,7 +731,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 );
}
@@ -743,9 +743,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;
@@ -755,7 +755,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;
@@ -769,18 +769,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.
@@ -791,14 +791,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 ) )
{
@@ -808,7 +808,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;
@@ -818,24 +818,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 );
@@ -853,11 +853,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;
@@ -874,14 +874,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 )
@@ -889,11 +889,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 );
@@ -912,11 +912,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;
}
@@ -941,7 +941,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 );
}
@@ -953,9 +953,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 =
@@ -967,7 +967,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.
@@ -977,14 +977,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;
@@ -1000,33 +1000,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;
@@ -1049,7 +1049,7 @@ INT32 StgSmallStrm::Write( const void* pBuf, INT32 n )
#define THRESHOLD 32768L
-StgTmpStrm::StgTmpStrm( ULONG nInitSize )
+StgTmpStrm::StgTmpStrm( sal_uIntPtr nInitSize )
: SvMemoryStream( nInitSize > THRESHOLD
? 16
: ( nInitSize ? nInitSize : 16 ), 4096 )
@@ -1061,19 +1061,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_uIntPtr n = rSrc.GetSize();
+ sal_uIntPtr 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_uIntPtr nn = n;
if( nn > 4096 )
nn = 4096;
if( rSrc.Read( p, nn ) != nn )
@@ -1085,10 +1085,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()
@@ -1101,12 +1101,12 @@ StgTmpStrm::~StgTmpStrm()
}
}
-ULONG StgTmpStrm::GetSize() const
+sal_uIntPtr StgTmpStrm::GetSize() const
{
- ULONG n;
+ sal_uIntPtr n;
if( pStrm )
{
- ULONG old = pStrm->Tell();
+ sal_uIntPtr old = pStrm->Tell();
n = pStrm->Seek( STREAM_SEEK_TO_END );
pStrm->Seek( old );
}
@@ -1115,7 +1115,7 @@ ULONG StgTmpStrm::GetSize() const
return n;
}
-void StgTmpStrm::SetSize( ULONG n )
+void StgTmpStrm::SetSize( sal_uIntPtr n )
{
if( pStrm )
pStrm->SetStreamSize( n );
@@ -1125,15 +1125,15 @@ void StgTmpStrm::SetSize( ULONG n )
{
aName = TempFile::CreateTempName();
SvFileStream* s = new SvFileStream( aName, STREAM_READWRITE );
- ULONG nCur = Tell();
- ULONG i = nEndOfData;
+ sal_uIntPtr nCur = Tell();
+ sal_uIntPtr 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_uIntPtr nb = ( i > 4096 ) ? 4096 : i;
if( Read( p, nb ) == nb
&& s->Write( p, nb ) == nb )
i -= nb;
@@ -1169,9 +1169,9 @@ void StgTmpStrm::SetSize( ULONG n )
{
if( n > nEndOfData )
{
- ULONG nCur = Tell();
+ sal_uIntPtr nCur = Tell();
Seek( nEndOfData - 1 );
- *this << (BYTE) 0;
+ *this << (sal_uInt8) 0;
Seek( nCur );
}
else
@@ -1180,7 +1180,7 @@ void StgTmpStrm::SetSize( ULONG n )
}
}
-ULONG StgTmpStrm::GetData( void* pData, ULONG n )
+sal_uIntPtr StgTmpStrm::GetData( void* pData, sal_uIntPtr n )
{
if( pStrm )
{
@@ -1192,10 +1192,10 @@ ULONG StgTmpStrm::GetData( void* pData, ULONG n )
return SvMemoryStream::GetData( (sal_Char *)pData, n );
}
-ULONG StgTmpStrm::PutData( const void* pData, ULONG n )
+sal_uIntPtr StgTmpStrm::PutData( const void* pData, sal_uIntPtr n )
{
- UINT32 nCur = Tell();
- UINT32 nNew = nCur + n;
+ sal_uInt32 nCur = Tell();
+ sal_uInt32 nNew = nCur + n;
if( nNew > THRESHOLD && !pStrm )
{
SetSize( nNew );
@@ -1212,7 +1212,7 @@ ULONG StgTmpStrm::PutData( const void* pData, ULONG n )
return nNew;
}
-ULONG StgTmpStrm::SeekPos( ULONG n )
+sal_uIntPtr StgTmpStrm::SeekPos( sal_uIntPtr 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..1ececadae35e 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_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();
public:
- StgTmpStrm( ULONG=16 );
+ StgTmpStrm( sal_uIntPtr=16 );
~StgTmpStrm();
- BOOL Copy( StgTmpStrm& );
- void SetSize( ULONG );
- ULONG GetSize() const;
+ sal_Bool Copy( StgTmpStrm& );
+ void SetSize( sal_uIntPtr );
+ sal_uIntPtr GetSize() const;
};
#endif
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx
index 136abb29a98e..9b5d3a95b92f 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_uIntPtr nPos = 0;
if( pOwnStm )
{
pOwnStm->Flush();
@@ -197,9 +197,9 @@ void SotStorageStream::ResetError()
|*
|* Beschreibung
*************************************************************************/
-ULONG SotStorageStream::GetData( void* pData, ULONG nSize )
+sal_uIntPtr SotStorageStream::GetData( void* pData, sal_uIntPtr nSize )
{
- ULONG nRet = 0;
+ sal_uIntPtr 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_uIntPtr SotStorageStream::PutData( const void* pData, sal_uIntPtr nSize )
{
- ULONG nRet = 0;
+ sal_uIntPtr nRet = 0;
if( pOwnStm )
{
@@ -235,9 +235,9 @@ ULONG SotStorageStream::PutData( const void* pData, ULONG nSize )
|*
|* Beschreibung
*************************************************************************/
-ULONG SotStorageStream::SeekPos( ULONG nPos )
+sal_uIntPtr SotStorageStream::SeekPos( sal_uIntPtr nPos )
{
- ULONG nRet = 0;
+ sal_uIntPtr nRet = 0;
if( pOwnStm )
{
@@ -270,9 +270,9 @@ void SotStorageStream::FlushData()
|*
|* Beschreibung
*************************************************************************/
-void SotStorageStream::SetSize( ULONG nNewSize )
+void SotStorageStream::SetSize( sal_uIntPtr nNewSize )
{
- ULONG nPos = Tell();
+ sal_uIntPtr 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_uIntPtr nPos = Tell();
((SotStorageStream *)this)->Seek( STREAM_SEEK_TO_END );
- ULONG nSize = Tell();
+ sal_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr nOriginalClipFormat,
const String & rUserTypeName )
{
DBG_ASSERT( Owner(), "must be owner" );
@@ -1013,9 +1013,9 @@ SvGlobalName SotStorage::GetClassName()
return aGN;
}
-ULONG SotStorage::GetFormat()
+sal_uIntPtr SotStorage::GetFormat()
{
- ULONG nFormat = 0;
+ sal_uIntPtr 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 2aaaadd5a151..f326025fd0ac 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_uIntPtr 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_uIntPtr 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_uIntPtr) 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_uIntPtr 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 ea3b656272db..ede41ec3aec9 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_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 SetSize( sal_uIntPtr 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_uIntPtr GetSize();
- ULONG ReadSourceWriteTemporary( ULONG aLength ); // read aLength from source and copy to temporary,
+ sal_uIntPtr ReadSourceWriteTemporary( sal_uIntPtr 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_uIntPtr 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_uIntPtr CopySourceToTemporary( sal_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr aResult = 0;
if( m_bSourceRead )
{
@@ -909,7 +909,7 @@ ULONG UCBStorageStream_Impl::ReadSourceWriteTemporary()
try
{
- ULONG aReaded;
+ sal_uIntPtr 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_uIntPtr UCBStorageStream_Impl::ReadSourceWriteTemporary( sal_uIntPtr aLength )
{
// read aLength bite from the source stream and copy them to the current
// position of the temporary stream
- ULONG aResult = 0;
+ sal_uIntPtr aResult = 0;
if( m_bSourceRead )
{
@@ -947,22 +947,22 @@ ULONG UCBStorageStream_Impl::ReadSourceWriteTemporary( ULONG aLength )
try
{
- ULONG aReaded = 32000;
+ sal_uIntPtr aReaded = 32000;
- for( ULONG pInd = 0; pInd < aLength && aReaded == 32000 ; pInd += 32000 )
+ for( sal_uIntPtr pInd = 0; pInd < aLength && aReaded == 32000 ; pInd += 32000 )
{
- ULONG aToCopy = min( aLength - pInd, 32000 );
+ sal_uIntPtr 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_uIntPtr UCBStorageStream_Impl::CopySourceToTemporary()
{
// current position of the temporary stream is not changed
- ULONG aResult = 0;
+ sal_uIntPtr aResult = 0;
if( m_bSourceRead )
{
- ULONG aPos = m_pStream->Tell();
+ sal_uIntPtr 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_uIntPtr UCBStorageStream_Impl::CopySourceToTemporary( sal_uIntPtr aLength )
{
// current position of the temporary stream is not changed
- ULONG aResult = 0;
+ sal_uIntPtr aResult = 0;
if( m_bSourceRead )
{
- ULONG aPos = m_pStream->Tell();
+ sal_uIntPtr 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_uIntPtr UCBStorageStream_Impl::GetData( void* pData, sal_uIntPtr nSize )
{
- ULONG aResult = 0;
+ sal_uIntPtr 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_uIntPtr aToRead = nSize - aResult;
pData = (void*)( (char*)pData + aResult );
try
{
Sequence<sal_Int8> aData( aToRead );
- ULONG aReaded = m_rSource->readBytes( aData, aToRead );
+ sal_uIntPtr 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_uIntPtr UCBStorageStream_Impl::PutData( const void* pData, sal_uIntPtr 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_uIntPtr 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_uIntPtr UCBStorageStream_Impl::SeekPos( sal_uIntPtr nPos )
{
if( !Init() )
return 0;
- ULONG aResult;
+ sal_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr UCBStorageStream_Impl::GetSize()
{
if( !Init() )
return 0;
- ULONG nPos = m_pStream->Tell();
+ sal_uIntPtr nPos = m_pStream->Tell();
m_pStream->Seek( STREAM_SEEK_TO_END );
ReadSourceWriteTemporary();
- ULONG nRet = m_pStream->Tell();
+ sal_uIntPtr 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_uIntPtr UCBStorageStream::Read( void * pData, sal_uIntPtr nSize )
{
//return pImp->m_pStream->Read( pData, nSize );
return pImp->GetData( pData, nSize );
}
-ULONG UCBStorageStream::Write( const void* pData, ULONG nSize )
+sal_uIntPtr UCBStorageStream::Write( const void* pData, sal_uIntPtr 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_uIntPtr UCBStorageStream::Seek( sal_uIntPtr nPos )
{
//return pImp->m_pStream->Seek( nPos );
return pImp->Seek( nPos );
}
-ULONG UCBStorageStream::Tell()
+sal_uIntPtr 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_uIntPtr 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_uIntPtr) 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_uIntPtr 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_uIntPtr /*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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr 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 55c205557648..aa84ed0cf87c 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/svl/inc/broadcast.hxx b/svl/inc/broadcast.hxx
index 2acddb5e4f6b..758906877bc1 100644
--- a/svl/inc/broadcast.hxx
+++ b/svl/inc/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/cntnrsrt.hxx b/svl/inc/cntnrsrt.hxx
index 48ebef50ea58..f7c114274981 100644
--- a/svl/inc/cntnrsrt.hxx
+++ b/svl/inc/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_uIntPtr nPos ) \
{ return (Type *)Container::Remove( nPos ); } \
\
Type *Remove( Type* pObj ); \
\
- void DeleteAndDestroy( ULONG nPos ) \
+ void DeleteAndDestroy( sal_uIntPtr 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_uIntPtr nPos ) const \
{ return (Type *)Container::GetObject( nPos ); } \
\
- Type* operator[]( ULONG nPos ) const \
+ Type* operator[]( sal_uIntPtr nPos ) const \
{ return GetObject(nPos); } \
\
- BOOL Seek_Entry( const Type *pObj, ULONG* pPos ) const; \
+ sal_Bool Seek_Entry( const Type *pObj, sal_uIntPtr* pPos ) const; \
\
- ULONG GetPos( const Type* pObj ) const; \
+ sal_uIntPtr 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_uIntPtr 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_uIntPtr nPos; \
if( Seek_Entry( pObj, &nPos ) ) \
return Remove( nPos ); \
else \
return 0; \
} \
\
-ULONG ClassName::GetPos( const Type* pObj ) const \
+sal_uIntPtr ClassName::GetPos( const Type* pObj ) const \
{ \
- ULONG nPos; \
+ sal_uIntPtr 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_uIntPtr* pPos ) const \
{ \
- register ULONG nO = Count(), \
+ register sal_uIntPtr 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/converter.hxx b/svl/inc/converter.hxx
index 062feafe6f29..c208a370bceb 100644
--- a/svl/inc/converter.hxx
+++ b/svl/inc/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/instrm.hxx b/svl/inc/instrm.hxx
index d7585c13c3b7..f27375baff25 100644
--- a/svl/inc/instrm.hxx
+++ b/svl/inc/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_uIntPtr m_nSeekedFrom;
SVL_DLLPRIVATE bool open();
- SVL_DLLPRIVATE virtual ULONG GetData(void * pData, ULONG nSize);
+ SVL_DLLPRIVATE virtual sal_uIntPtr GetData(void * pData, sal_uIntPtr nSize);
- SVL_DLLPRIVATE virtual ULONG PutData(void const *, ULONG);
+ SVL_DLLPRIVATE virtual sal_uIntPtr PutData(void const *, sal_uIntPtr);
- SVL_DLLPRIVATE virtual ULONG SeekPos(ULONG nPos);
+ SVL_DLLPRIVATE virtual sal_uIntPtr SeekPos(sal_uIntPtr nPos);
SVL_DLLPRIVATE virtual void FlushData();
- SVL_DLLPRIVATE virtual void SetSize(ULONG);
+ SVL_DLLPRIVATE virtual void SetSize(sal_uIntPtr);
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_uIntPtr nPos);
- virtual void RemoveMark(ULONG nPos);
+ virtual void RemoveMark(sal_uIntPtr nPos);
};
#endif // SVTOOLS_INSTRM_HXX
diff --git a/svl/inc/listener.hxx b/svl/inc/listener.hxx
index 3107f5ceee56..e3bdea45169e 100644
--- a/svl/inc/listener.hxx
+++ b/svl/inc/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/lngmisc.hxx b/svl/inc/lngmisc.hxx
index d85de673c4c9..cf8a498dc206 100644
--- a/svl/inc/lngmisc.hxx
+++ b/svl/inc/lngmisc.hxx
@@ -44,29 +44,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 = ' ' );
} // namespace linguistic
diff --git a/svl/inc/outstrm.hxx b/svl/inc/outstrm.hxx
index f80f6f2c9616..8846bd84e5df 100644
--- a/svl/inc/outstrm.hxx
+++ b/svl/inc/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_uIntPtr GetData(void *, sal_uIntPtr);
- SVL_DLLPRIVATE virtual ULONG PutData(void const * pData, ULONG nSize);
+ SVL_DLLPRIVATE virtual sal_uIntPtr PutData(void const * pData, sal_uIntPtr nSize);
- SVL_DLLPRIVATE virtual ULONG SeekPos(ULONG);
+ SVL_DLLPRIVATE virtual sal_uIntPtr SeekPos(sal_uIntPtr);
SVL_DLLPRIVATE virtual void FlushData();
- SVL_DLLPRIVATE virtual void SetSize(ULONG);
+ SVL_DLLPRIVATE virtual void SetSize(sal_uIntPtr);
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/poolcach.hxx b/svl/inc/poolcach.hxx
index 949c0aee5bad..1d534955ed92 100644
--- a/svl/inc/poolcach.hxx
+++ b/svl/inc/poolcach.hxx
@@ -50,7 +50,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/strmadpt.hxx b/svl/inc/strmadpt.hxx
index 76ecf0223543..0d2779504daf 100644
--- a/svl/inc/strmadpt.hxx
+++ b/svl/inc/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_uIntPtr, void *, sal_uIntPtr, sal_uIntPtr *) const;
- virtual ErrCode WriteAt(ULONG nPos, const void * pBuffer, ULONG nCount,
- ULONG * pWritten);
+ virtual ErrCode WriteAt(sal_uIntPtr nPos, const void * pBuffer, sal_uIntPtr nCount,
+ sal_uIntPtr * pWritten);
virtual ErrCode Flush() const;
- virtual ErrCode SetSize(ULONG);
+ virtual ErrCode SetSize(sal_uIntPtr);
virtual ErrCode Stat(SvLockBytesStat * pStat, SvLockBytesStatFlag) const;
- virtual ErrCode FillAppend(const void * pBuffer, ULONG nCount,
- ULONG * pWritten);
+ virtual ErrCode FillAppend(const void * pBuffer, sal_uIntPtr nCount,
+ sal_uIntPtr * pWritten);
- virtual ULONG Tell() const;
+ virtual sal_uIntPtr Tell() const;
- virtual ULONG Seek(ULONG);
+ virtual sal_uIntPtr Seek(sal_uIntPtr);
virtual void Terminate();
};
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/cancel.hxx b/svl/inc/svl/cancel.hxx
index d268044a611d..192db6102ee8 100644
--- a/svl/inc/svl/cancel.hxx
+++ b/svl/inc/svl/cancel.hxx
@@ -77,15 +77,15 @@ public:
SfxCancelManager( SfxCancelManager *pParent = 0 );
~SfxCancelManager();
- BOOL CanCancel() const;
- void Cancel( BOOL bDeep );
+ sal_Bool CanCancel() const;
+ void Cancel( sal_Bool bDeep );
SfxCancelManager* GetParent() const { return _pParent; }
void InsertCancellable( SfxCancellable *pJob );
void RemoveCancellable( SfxCancellable *pJob );
- USHORT GetCancellableCount() const
+ sal_uInt16 GetCancellableCount() const
{ return _aJobs.Count(); }
- SfxCancellable* GetCancellable( USHORT nPos ) const
+ SfxCancellable* GetCancellable( sal_uInt16 nPos ) const
{ return (SfxCancellable*) _aJobs[nPos]; }
};
@@ -116,14 +116,14 @@ class SVL_DLLPUBLIC SfxCancellable
{
SfxCancelManager* _pMgr;
- BOOL _bCancelled;
+ sal_Bool _bCancelled;
String _aTitle;
public:
SfxCancellable( SfxCancelManager *pMgr,
const String &rTitle )
: _pMgr( pMgr ),
- _bCancelled( FALSE ),
+ _bCancelled( sal_False ),
_aTitle( rTitle )
{ pMgr->InsertCancellable( this ); }
@@ -133,8 +133,8 @@ public:
SfxCancelManager* GetManager() const { return _pMgr; }
virtual void Cancel();
- BOOL IsCancelled() const { return _bCancelled; }
- operator BOOL() const { return _bCancelled; }
+ sal_Bool IsCancelled() const { return _bCancelled; }
+ operator sal_Bool() const { return _bCancelled; }
const String& GetTitle() const { return _aTitle; }
};
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/cnclhint.hxx b/svl/inc/svl/cnclhint.hxx
index 17a6627f31b6..864e9f367aa2 100644
--- a/svl/inc/svl/cnclhint.hxx
+++ b/svl/inc/svl/cnclhint.hxx
@@ -37,11 +37,11 @@ class SfxCancelHint: public SfxHint
{
private:
SfxCancellable* pCancellable;
- USHORT nAction;
+ sal_uInt16 nAction;
public:
TYPEINFO();
- SfxCancelHint( SfxCancellable*, USHORT nAction );
- USHORT GetAction() const { return nAction; }
+ SfxCancelHint( SfxCancellable*, sal_uInt16 nAction );
+ sal_uInt16 GetAction() const { return nAction; }
const SfxCancellable& GetCancellable() const { return *pCancellable; }
};
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/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..2742d2ce537f 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
+ int _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( int bSeekToEndOfRec = sal_True );
private:
// not implementend, not allowed
@@ -280,36 +280,36 @@ 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
+ int _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 int 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 FASTBOOL IsValid() const;
+ inline sal_uInt8 GetTag() const;
+ inline int 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( int 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 );
+ int FindHeader_Impl( sal_uInt16 nTypes, sal_uInt16 nTag );
+ int 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 int 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( int 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( int 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();
+ int 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;
+ int GetContent();
+ inline sal_uInt16 GetContentTag();
+ inline sal_uInt8 GetContentVersion() const;
+ inline int 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]
@@ -835,7 +835,7 @@ inline BYTE SfxMiniRecordReader::GetTag() const
//-------------------------------------------------------------------------
-inline FASTBOOL SfxMiniRecordReader::IsValid() const
+inline int SfxMiniRecordReader::IsValid() const
/* [Beschreibung]
@@ -865,18 +865,18 @@ inline SvStream& SfxMiniRecordReader::operator*() const
//=========================================================================
-inline UINT32 SfxSingleRecordWriter::Close( FASTBOOL bSeekToEndOfRec )
+inline sal_uInt32 SfxSingleRecordWriter::Close( int bSeekToEndOfRec )
-// siehe <SfxMiniRecordWriter::Close(FASTBOOL)>
+// siehe <SfxMiniRecordWriter::Close(int)>
{
- 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 int SfxSingleRecordReader::HasVersion( sal_uInt16 nVersion ) const
/* [Beschreibung]
@@ -973,7 +973,7 @@ inline void SfxMultiFixRecordWriter::NewContent()
{
#ifdef DBG_UTIL
- ULONG nOldStartPos;
+ sal_uIntPtr 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 int 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/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 cbc6b7c4dd11..c97aa85497cb 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,24 +104,24 @@ class SVL_DLLPUBLIC SfxItemPool
*/
{
- SVL_DLLPRIVATE void readTheItems(SvStream & rStream, USHORT nCount, USHORT nVersion,
+ SVL_DLLPRIVATE void readTheItems(SvStream & rStream, sal_uInt16 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;
- FASTBOOL bPersistentRefCounts;
+ sal_uInt16* _pPoolRanges;
+ int bPersistentRefCounts;
private:
// ObjectUser section
@@ -137,40 +137,40 @@ 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 int 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;
+ int IsVer2_Impl() const;
#endif
//---------------------------------------------------------------------
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_uIntPtr n );
+ static inline sal_uIntPtr AddRef( const SfxPoolItem& rItem, sal_uIntPtr n = 1 );
+ static inline sal_uIntPtr ReleaseRef( const SfxPoolItem& rItem, sal_uIntPtr 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 );
+ int 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,24 +197,24 @@ 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,
+ int bDirect = sal_False,
const SfxItemPool *pRefPool = 0 );
- FASTBOOL StoreItem( SvStream &rStream,
+ int StoreItem( SvStream &rStream,
const SfxPoolItem &rItem,
- FASTBOOL bDirect = FALSE ) const;
+ int bDirect = sal_False ) const;
- USHORT GetSurrogate(const SfxPoolItem *) const;
- const SfxPoolItem * GetItem(USHORT nWhich, USHORT nSurrogate) const;
- USHORT GetItemCount(USHORT nWhich) const;
+ sal_uInt16 GetSurrogate(const SfxPoolItem *) const;
+ const SfxPoolItem * GetItem(sal_uInt16 nWhich, sal_uInt16 nSurrogate) const;
+ sal_uInt16 GetItemCount(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,
+ int StoreSurrogate(SvStream& rStream,
const SfxPoolItem *pItem ) const;
virtual SvStream & Load(SvStream &);
@@ -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; }
+ int 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 );
+ int IsInVersionsRange( sal_uInt16 nWhich ) const;
+ int 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
+ int IsItemFlag( sal_uInt16 nWhich, sal_uInt16 nFlag ) const;
+ int 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;
- FASTBOOL IsCurrentVersionLoading() const;
+ void SetFileFormatVersion( sal_uInt16 nFileFormatVersion );
+ sal_uInt16 GetLoadingVersion() const;
+ int 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_uIntPtr n )
{
rItem.SetRefCount(n);
}
// nur der Pool darf den Referenz-Zaehler manipulieren !!!
-inline ULONG SfxItemPool::AddRef( const SfxPoolItem& rItem, ULONG n )
+inline sal_uIntPtr SfxItemPool::AddRef( const SfxPoolItem& rItem, sal_uIntPtr n )
{
return rItem.AddRef(n);
}
// nur der Pool darf den Referenz-Zaehler manipulieren !!!
-inline ULONG SfxItemPool::ReleaseRef( const SfxPoolItem& rItem, ULONG n )
+inline sal_uIntPtr SfxItemPool::ReleaseRef( const SfxPoolItem& rItem, sal_uIntPtr 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..7ef299442e5b 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 &, int bDirect = sal_False,
const SfxItemPool *pRefPool = 0 );
- virtual SvStream & Store( SvStream &, FASTBOOL bDirect = FALSE ) const;
+ virtual SvStream & Store( SvStream &, int 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/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..9571fc79cb47 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_uIntPtr
#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/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/poolitem.hxx b/svl/inc/svl/poolitem.hxx
index c0cf53fb6ded..23bfcc23f3cd 100644
--- a/svl/inc/svl/poolitem.hxx
+++ b/svl/inc/svl/poolitem.hxx
@@ -142,7 +142,7 @@ enum SfxItemPresentation
// -----------------------------------------------------------------------
-typedef USHORT SfxItemState;
+typedef sal_uInt16 SfxItemState;
#define SFX_ITEM_UNKNOWN 0x0000
@@ -182,17 +182,17 @@ friend class SfxItemPoolCache;
friend class SfxItemSet;
friend class SfxVoidItem;
- ULONG nRefCount; // Referenzzaehler
- USHORT nWhich;
- USHORT nKind;
+ sal_uIntPtr nRefCount; // Referenzzaehler
+ sal_uInt16 nWhich;
+ sal_uInt16 nKind;
private:
- inline void SetRefCount( ULONG n );
- inline void SetKind( USHORT n );
+ inline void SetRefCount( sal_uIntPtr n );
+ inline void SetKind( sal_uInt16 n );
public:
- inline ULONG AddRef( ULONG n = 1 ) const;
+ inline sal_uIntPtr AddRef( sal_uIntPtr n = 1 ) const;
private:
- inline ULONG ReleaseRef( ULONG n = 1 ) const;
+ inline sal_uIntPtr ReleaseRef( sal_uIntPtr n = 1 ) const;
SVL_DLLPRIVATE long Delete_Impl(void*);
#if 0
@@ -202,17 +202,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;
@@ -227,19 +227,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_uIntPtr GetRefCount() const { return nRefCount; }
+ inline sal_uInt16 GetKind() const { return nKind; }
/** Read in a Unicode string from a streamed byte string representation.
@@ -294,21 +294,21 @@ private:
// -----------------------------------------------------------------------
-inline void SfxPoolItem::SetRefCount( ULONG n )
+inline void SfxPoolItem::SetRefCount( sal_uIntPtr 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_uIntPtr SfxPoolItem::AddRef( sal_uIntPtr n ) const
{
DBG_CHKTHIS( SfxPoolItem, 0 );
DBG_ASSERT( nRefCount <= SFX_ITEMS_MAXREF, "AddRef mit nicht-Pool-Item" );
@@ -316,7 +316,7 @@ inline ULONG SfxPoolItem::AddRef( ULONG n ) const
return ( ((SfxPoolItem *)this)->nRefCount += n );
}
-inline ULONG SfxPoolItem::ReleaseRef( ULONG n ) const
+inline sal_uIntPtr SfxPoolItem::ReleaseRef( sal_uIntPtr n ) const
{
DBG_CHKTHIS( SfxPoolItem, 0 );
DBG_ASSERT( nRefCount <= SFX_ITEMS_MAXREF, "AddRef mit nicht-Pool-Item" );
@@ -359,8 +359,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();
@@ -374,7 +374,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; }
};
// -----------------------------------------------------------------------
@@ -387,8 +387,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();
@@ -402,8 +402,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; }
@@ -422,7 +422,7 @@ friend class SfxItemSet;
private:
TYPEINFO();
- SfxInvalidItem( USHORT nWhich, const SfxPoolItem &rDefault );
+ SfxInvalidItem( sal_uInt16 nWhich, const SfxPoolItem &rDefault );
SfxInvalidItem( const SfxInvalidItem& );
virtual ~SfxInvalidItem();
@@ -438,8 +438,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 @@@ */
@@ -448,7 +448,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/restrictedpaths.hxx b/svl/inc/svl/restrictedpaths.hxx
index 11d57af35ce0..1bbd5f1bd48f 100644
--- a/svl/inc/svl/restrictedpaths.hxx
+++ b/svl/inc/svl/restrictedpaths.hxx
@@ -59,7 +59,7 @@ namespace svt
only certain URLs can be browsed. This method checks whether a given URL belongs
to this set of permitted URLs.</p>
- <p>If no "access restriction" is effective, this method always returns <TRUE/>.</p>
+ <p>If no "access restriction" is effective, this method always returns <sal_True/>.</p>
*/
virtual bool isUrlAllowed( const String& _rURL ) const;
@@ -70,9 +70,9 @@ namespace svt
to this set of permitted URLs.</p>
<p>Default behavior allows access to parent folder of a restricted folder (but not to its siblings).
- If allowParents is set to <FALSE/> parent folders will be treated as forbidden.
+ If allowParents is set to <sal_False/> parent folders will be treated as forbidden.
- <p>If no "access restriction" is effective, this method always returns <TRUE/>.</p>
+ <p>If no "access restriction" is effective, this method always returns <sal_True/>.</p>
*/
bool isUrlAllowed( const String& _rURL, bool allowParents ) const;
};
diff --git a/svl/inc/svl/rngitem.hxx b/svl/inc/svl/rngitem.hxx
index 890c9d4438c0..914fb5f4cd9a 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_uIntPtr
#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..42e5aa4f69a4 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_uIntPtr nId;
public:
TYPEINFO();
- SfxSimpleHint( ULONG nId );
- ULONG GetId() const { return nId; }
+ SfxSimpleHint( sal_uIntPtr nId );
+ sal_uIntPtr 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/style.hxx b/svl/inc/svl/style.hxx
index b3138309293f..667fe7137994 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_uIntPtr 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_uIntPtr GetHelpId( String& rFile );
+ virtual void SetHelpId( const String& r, sal_uIntPtr 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 99b2901b95f9..b905e7128baf 100644
--- a/svl/inc/svl/svarray.hxx
+++ b/svl/inc/svl/svarray.hxx
@@ -128,15 +128,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 )
@@ -144,64 +144,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 );\
\
@@ -229,7 +229,7 @@ SV_DECL_VARARR_GEN(nm, AE, IS, GS, AE &, vis )
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)\
@@ -243,7 +243,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))\
{\
@@ -252,7 +252,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)\
@@ -263,7 +263,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)\
@@ -275,13 +275,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 )\
{\
@@ -295,7 +295,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; \
@@ -304,7 +304,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;\
@@ -316,7 +316,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 )\
@@ -335,15 +335,15 @@ SV_IMPL_VARARR_GEN( nm, AE, AE )
#if defined(PRODUCT)
#define _SVOBJARR_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 _SVOBJARR_IMPL_GET_OP_INLINE( nm, ArrElem )
@@ -351,63 +351,63 @@ void Insert( const nm *pI, USHORT nP,\
#else
#define _SVOBJARR_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 _SVOBJARR_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_OBJARR(nm, AE, IS, GS)\
-typedef BOOL (*FnForEach_##nm)( const AE&, void* );\
+typedef sal_Bool (*FnForEach_##nm)( const AE&, void* );\
class nm\
{\
protected:\
AE *pData;\
- USHORT nFree;\
- USHORT nA;\
+ sal_uInt16 nFree;\
+ sal_uInt16 nA;\
\
void _resize(size_t n);\
void _destroy();\
\
public:\
- nm( USHORT= IS, BYTE= GS );\
+ nm( sal_uInt16= IS, sal_uInt8= GS );\
~nm() { _destroy(); }\
\
_SVOBJARR_DEF_GET_OP_INLINE(nm,AE)\
- AE& GetObject(USHORT nP) const { return (*this)[nP]; } \
+ AE& GetObject(sal_uInt16 nP) const { return (*this)[nP]; } \
\
- void Insert( const AE &aE, USHORT nP );\
- void Insert( const AE *pE, USHORT nL, USHORT nP );\
- void Remove( USHORT nP, USHORT nL = 1 );\
- USHORT Count() const { return nA; }\
+ void Insert( const AE &aE, sal_uInt16 nP );\
+ void Insert( const AE *pE, sal_uInt16 nL, sal_uInt16 nP );\
+ void Remove( sal_uInt16 nP, sal_uInt16 nL = 1 );\
+ 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 );\
\
@@ -419,7 +419,7 @@ nm& operator=( const nm& );\
};
#define SV_IMPL_OBJARR( nm, AE )\
-nm::nm( USHORT nInit, BYTE )\
+nm::nm( sal_uInt16 nInit, sal_uInt8 )\
: pData (0),\
nFree (nInit),\
nA (0)\
@@ -436,7 +436,7 @@ void nm::_destroy()\
if(pData)\
{\
AE* pTmp=pData;\
- for(USHORT n=0; n < nA; n++,pTmp++ )\
+ for(sal_uInt16 n=0; n < nA; n++,pTmp++ )\
{\
pTmp->~AE();\
}\
@@ -447,7 +447,7 @@ void nm::_destroy()\
\
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))\
{\
@@ -456,7 +456,7 @@ void nm::_resize (size_t n)\
}\
}\
\
-void nm::Insert( const AE &aE, USHORT nP )\
+void nm::Insert( const AE &aE, sal_uInt16 nP )\
{\
DBG_ASSERT( nP <= nA && nA < USHRT_MAX,"Ins 1");\
if (nFree < 1)\
@@ -468,7 +468,7 @@ void nm::Insert( const AE &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)\
@@ -478,7 +478,7 @@ void nm::Insert( const AE* pE, USHORT nL, USHORT nP )\
if( pE )\
{\
AE* pTmp = pData+nP;\
- for( USHORT n = 0; n < nL; n++, pTmp++, pE++)\
+ for( sal_uInt16 n = 0; n < nL; n++, pTmp++, pE++)\
{\
new( (DummyType*) pTmp ) AE( (AE&)*pE );\
}\
@@ -486,14 +486,14 @@ void nm::Insert( const AE* pE, USHORT nL, USHORT nP )\
nA = nA + nL; nFree = nFree - nL;\
}\
\
-void nm::Remove( USHORT nP, USHORT nL )\
+void nm::Remove( sal_uInt16 nP, sal_uInt16 nL )\
{\
if( !nL )\
return;\
DBG_ASSERT( nP < nA && nP + nL <= nA,"Del");\
AE* pTmp=pData+nP;\
- USHORT nCtr = nP;\
- for(USHORT n=0; n < nL; n++,pTmp++,nCtr++)\
+ sal_uInt16 nCtr = nP;\
+ for(sal_uInt16 n=0; n < nL; n++,pTmp++,nCtr++)\
{\
if( nCtr < nA )\
pTmp->~AE();\
@@ -505,7 +505,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 )\
@@ -518,7 +518,7 @@ _SVOBJARR_IMPL_GET_OP_INLINE(nm, 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 )\
@@ -527,29 +527,29 @@ _SV_DECL_PTRARR_DEF_GEN( nm, AE, IS, GS, AE &, 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 {\
@@ -559,20 +559,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& );\
@@ -589,30 +589,30 @@ SV_DECL_PTRARR_GEN(nm, AE, IS, GS, SvPtrarr, AE &, VoidPtr &, vis )
SV_DECL_PTRARR_GEN(nm, AE, IS, GS, SvPtrarrPlain, 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 {\
@@ -622,20 +622,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& );\
@@ -652,11 +652,11 @@ SV_DECL_PTRARR_DEL_GEN(nm, AE, IS, GS, SvPtrarr, AE &, VoidPtr &, vis)
SV_DECL_PTRARR_DEL_GEN(nm, AE, IS, GS, SvPtrarrPlain, 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 ); \
} \
@@ -680,27 +680,27 @@ _SV_DECL_PTRARR_DEF_PLAIN( SvPtrarrPlain, 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 )\
@@ -713,27 +713,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 )\
@@ -745,27 +745,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 )\
@@ -777,29 +777,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 )\
{\
@@ -813,39 +813,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);\
}\
@@ -853,20 +853,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);\
}
@@ -875,23 +875,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 !!! */
@@ -927,18 +927,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 );\
@@ -956,10 +956,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 ); \
} \
@@ -968,10 +968,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 ); \
} \
@@ -987,23 +987,23 @@ _SV_SEEK_OBJECT( nm,AE )
class nm: private SvPtrarr \
{\
public:\
- nm( USHORT nIni=IS, BYTE nG=GS )\
+ nm( sal_uInt16 nIni=IS, sal_uInt8 nG=GS )\
: SvPtrarr(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 ) {\
SvPtrarr::Insert( pI, nP, nS, nE ); \
}\
- void Remove( USHORT nP, USHORT nL = 1 ) {\
+ void Remove( sal_uInt16 nP, sal_uInt16 nL = 1 ) {\
SvPtrarr::Remove( nP, nL ); \
}\
void Push( const AE &aE ) {\
SvPtrarr::Insert( (const VoidPtr &)aE, SvPtrarr::Count() );\
}\
- USHORT Count() const { return SvPtrarr::Count(); }\
- AE operator[](USHORT nP) const {\
+ sal_uInt16 Count() const { return SvPtrarr::Count(); }\
+ AE operator[](sal_uInt16 nP) const {\
return (AE)SvPtrarr::operator[]( nP );\
}\
- AE GetObject(USHORT nP) const {\
+ AE GetObject(sal_uInt16 nP) const {\
return (AE)SvPtrarr::GetObject( nP );\
}\
AE Pop(){\
diff --git a/svl/inc/svl/svdde.hxx b/svl/inc/svl/svdde.hxx
index bb14d0fcdcdf..229ecbec8361 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_uIntPtr nFmt );
public:
DdeData();
- DdeData( const void*, long, ULONG = FORMAT_STRING );
+ DdeData( const void*, long, sal_uIntPtr = 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_uIntPtr GetFormat() const;
DdeData& operator = ( const DdeData& );
- static ULONG GetExternalFormat( ULONG nFmt );
- static ULONG GetInternalFormat( ULONG nFmt );
+ static sal_uIntPtr GetExternalFormat( sal_uIntPtr nFmt );
+ static sal_uIntPtr GetInternalFormat( sal_uIntPtr 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_uIntPtr nFmt ) { aDdeData.SetFormat( nFmt ); }
+ sal_uIntPtr 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_uIntPtr = 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_uIntPtr );
+ void DecMonitor( sal_uIntPtr );
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_uIntPtr );
+ 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_uIntPtr );
+ 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_uIntPtr );
+ void RemoveFormat( sal_uIntPtr );
+ sal_Bool HasFormat( sal_uIntPtr );
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 fa3c94034256..58dc7c09abe3 100644
--- a/svl/inc/svl/svstdarr.hxx
+++ b/svl/inc/svl/svstdarr.hxx
@@ -45,35 +45,35 @@
//#ifdef _SVSTDARR_BOOLS
#ifndef _SVSTDARR_BOOLS_DECL
-SV_DECL_VARARR_VISIBILITY( SvBools, BOOL, 1, 1, SVL_DLLPUBLIC )
+SV_DECL_VARARR_VISIBILITY( SvBools, sal_Bool, 1, 1, SVL_DLLPUBLIC )
#define _SVSTDARR_BOOLS_DECL
#endif
//#endif
//#ifdef _SVSTDARR_BYTES
#ifndef _SVSTDARR_BYTES_DECL
-SV_DECL_VARARR_VISIBILITY( SvBytes, BYTE, 1, 1, SVL_DLLPUBLIC )
+SV_DECL_VARARR_VISIBILITY( SvBytes, sal_uInt8, 1, 1, SVL_DLLPUBLIC )
#define _SVSTDARR_BYTES_DECL
#endif
//#endif
//#ifdef _SVSTDARR_ULONGS
#ifndef _SVSTDARR_ULONGS_DECL
-SV_DECL_VARARR_VISIBILITY( SvULongs, ULONG, 1, 1, SVL_DLLPUBLIC )
+SV_DECL_VARARR_VISIBILITY( SvULongs, sal_uIntPtr, 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_uIntPtr, 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
@@ -81,37 +81,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..66be49262656 100644
--- a/svl/inc/svl/undo.hxx
+++ b/svl/inc/svl/undo.hxx
@@ -45,24 +45,24 @@ public:
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 Redo();
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 sal_uInt16 GetId() const;
private:
SfxUndoAction& operator=( const SfxUndoAction& ); // n.i.!!
@@ -79,10 +79,10 @@ SV_DECL_PTRARR( SfxUndoActions, SfxUndoAction*, 20, 8 )
struct SVL_DLLPUBLIC SfxUndoArray
{
SfxUndoActions aUndoActions;
- USHORT nMaxUndoActions;
- USHORT nCurUndoAction;
+ sal_uInt16 nMaxUndoActions;
+ sal_uInt16 nCurUndoAction;
SfxUndoArray *pFatherUndoArray;
- SfxUndoArray(USHORT nMax=0):
+ SfxUndoArray(sal_uInt16 nMax=0):
nMaxUndoActions(nMax), nCurUndoAction(0),
pFatherUndoArray(0) {}
~SfxUndoArray();
@@ -109,23 +109,23 @@ 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 Redo();
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 sal_uInt16 GetId() const;
void SetComment( const UniString& rComment );
private:
- USHORT nId;
+ sal_uInt16 nId;
UniString aComment, aRepeatComment;
};
@@ -142,40 +142,40 @@ class SVL_DLLPUBLIC SfxUndoManager
bool mbUndoEnabled;
public:
- SfxUndoManager( USHORT nMaxUndoActionCount = 20 );
+ SfxUndoManager( sal_uInt16 nMaxUndoActionCount = 20 );
virtual ~SfxUndoManager();
- virtual void SetMaxUndoActionCount( USHORT nMaxUndoActionCount );
- virtual USHORT GetMaxUndoActionCount() const;
+ virtual void SetMaxUndoActionCount( sal_uInt16 nMaxUndoActionCount );
+ virtual sal_uInt16 GetMaxUndoActionCount() const;
virtual void Clear();
- virtual void AddUndoAction( SfxUndoAction *pAction, BOOL bTryMerg=FALSE );
+ virtual void AddUndoAction( SfxUndoAction *pAction, sal_Bool bTryMerg=sal_False );
- virtual USHORT GetUndoActionCount() const;
- virtual USHORT GetUndoActionId(USHORT nNo=0) const;
- virtual UniString GetUndoActionComment( USHORT nNo=0 ) const;
+ virtual sal_uInt16 GetUndoActionCount() const;
+ virtual sal_uInt16 GetUndoActionId(sal_uInt16 nNo=0) const;
+ virtual UniString GetUndoActionComment( sal_uInt16 nNo=0 ) const;
/** returns the nNo'th undo action from the top */
- SfxUndoAction* GetUndoAction( USHORT nNo=0 ) const;
+ SfxUndoAction* GetUndoAction( sal_uInt16 nNo=0 ) const;
- virtual BOOL Undo( USHORT nCount=1 );
+ virtual sal_Bool Undo( sal_uInt16 nCount=1 );
virtual void Undo( SfxUndoAction &rAction );
- virtual USHORT GetRedoActionCount() const;
- virtual USHORT GetRedoActionId(USHORT nNo=0) const;
- virtual UniString GetRedoActionComment( USHORT nNo=0 ) const;
+ virtual sal_uInt16 GetRedoActionCount() const;
+ virtual sal_uInt16 GetRedoActionId(sal_uInt16 nNo=0) const;
+ virtual UniString GetRedoActionComment( sal_uInt16 nNo=0 ) const;
- virtual BOOL Redo( USHORT nCount=1 );
+ virtual sal_Bool Redo( sal_uInt16 nCount=1 );
virtual void Redo( SfxUndoAction &rAction );
virtual void ClearRedo();
- 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 sal_uInt16 GetRepeatActionCount() const;
+ virtual UniString GetRepeatActionComment( SfxRepeatTarget &rTarget, sal_uInt16 nNo = 0) const;
+ virtual sal_Bool Repeat( SfxRepeatTarget &rTarget, sal_uInt16 nFrom=0, sal_uInt16 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;
+ virtual sal_Bool CanRepeat( SfxRepeatTarget &rTarget, sal_uInt16 nNo = 0 ) const;
+ virtual sal_Bool CanRepeat( SfxRepeatTarget &rTarget, SfxUndoAction &rAction ) const;
- virtual void EnterListAction(const UniString &rComment, const UniString& rRepeatComment, USHORT nId=0);
+ virtual void EnterListAction(const UniString &rComment, const UniString& rRepeatComment, sal_uInt16 nId=0);
virtual void LeaveListAction();
/** clears the redo stack and removes the top undo action */
@@ -218,13 +218,13 @@ public:
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 sal_uInt16 GetId() const;
SfxUndoAction* GetAction() const { return 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/zforlist.hxx b/svl/inc/svl/zforlist.hxx
index 598295797ea6..41aff1bd2974 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
@@ -403,8 +403,8 @@ public:
/** Create new entry of a format code string for language/country.
@return
- <TRUE/> if string new and ok and inserted.
- <FALSE/> if string already exists or an unresolvable parse error
+ <sal_True/> if string new and ok and inserted.
+ <sal_False/> if string already exists or an unresolvable parse error
occured, in which case nCheckPos is the error position within rString.
If the error occurs at position 0 or rString is empty nCheckPos
will be 1, so an error in the string is always indicated by
@@ -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,29 +466,29 @@ 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
- <TRUE/> if input is a number or is matching a format F_Index
+ <sal_True/> if input is a number or is matching a format F_Index
F_Index is set to a matching format if number, the value is
returned in fOutNumber
- <FALSE/> if input is not a number
+ <sal_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,
@@ -507,16 +507,16 @@ public:
/** Format a number according to a format code string to be scanned.
@return
- <FALSE/> if format code contains an error
- <TRUE/> else, in which case the string and color are returned.
+ <sal_False/> if format code contains an error
+ <sal_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 );
@@ -528,14 +528,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();
@@ -543,11 +543,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
@@ -556,12 +556,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 */
@@ -589,14 +589,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);
@@ -607,7 +607,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;
@@ -617,7 +617,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. */
@@ -650,12 +650,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); }
@@ -715,21 +715,21 @@ public:
/** Get all standard formats for a specific currency, formats are
appended to the <type>NfWSStringsDtor</type> list.
@param bBank
- <TRUE/>: generate only format strings with currency abbreviation
- <FALSE/>: mixed format strings
+ <sal_True/>: generate only format strings with currency abbreviation
+ <sal_False/>: mixed format strings
@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
@@ -746,7 +746,7 @@ public:
@param bFoundBank
Only used for output.
- If the return value is not <NULL/> this value is set to <TRUE/> if
+ If the return value is not <NULL/> this value is set to <sal_True/> if
the matching entry was found by comparing rSymbol against the
CurrencyAbbreviation (AKA BankSymbol).
If the return value is <NULL/> the value of bFoundBank is undefined.
@@ -760,16 +760,16 @@ public:
The language/country value of the format of which rSymbol and
rExtension are obtained (<method>SvNumberformat::GetLanguage()</method>).
@param bOnlyStringLanguage
- If <TRUE/> only entries with language/country of rExtension are
+ If <sal_True/> only entries with language/country of rExtension are
checked, no match on eFormatLanguage. If rExtension is empty all
entries are checked.
@return
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;
@@ -782,7 +782,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 */
@@ -812,7 +812,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;
@@ -821,8 +821,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
@@ -833,29 +833,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
@@ -868,7 +868,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 );
@@ -905,16 +905,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* );
@@ -997,15 +997,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..6afaa6105d01 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
+ /** @returns <sal_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
@@ -436,16 +436,16 @@ public:
calendar switched and rOrgCalendar was empty.
@return
- <TRUE/> if a calendar was specified and switched to,
- <FALSE/> else.
+ <sal_True/> if a calendar was specified and switched to,
+ <sal_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_uIntPtr ImpGGT(sal_uIntPtr x, sal_uIntPtr y);
+ SVL_DLLPRIVATE sal_uIntPtr ImpGGTRound(sal_uIntPtr x, sal_uIntPtr 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/inc/whiter.hxx b/svl/inc/whiter.hxx
index 83a3e21e2b0e..eb9bb7d7e732 100644
--- a/svl/inc/whiter.hxx
+++ b/svl/inc/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/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..3170db4e4f2a 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)
+ int 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 )
+int 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;
+ int 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 int SfxSingleRecordReader::ReadHeader_Impl( sal_uInt16 nTypes )
/* [Beschreibung]
@@ -498,22 +498,22 @@ inline FASTBOOL SfxSingleRecordReader::ReadHeader_Impl( USHORT nTypes )
*/
{
- FASTBOOL bRet;
+ int 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 );
@@ -561,10 +561,10 @@ SfxSingleRecordReader::SfxSingleRecordReader( SvStream *pStream, USHORT nTag )
//-------------------------------------------------------------------------
-FASTBOOL SfxSingleRecordReader::FindHeader_Impl
+int 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( int 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( int 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]
@@ -872,7 +872,7 @@ void SfxMultiMixRecordWriter::NewContent
//=========================================================================
-FASTBOOL SfxMultiRecordReader::ReadHeader_Impl()
+int SfxMultiRecordReader::ReadHeader_Impl()
/* [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
@@ -963,7 +963,7 @@ SfxMultiRecordReader::~SfxMultiRecordReader()
//-------------------------------------------------------------------------
-FASTBOOL SfxMultiRecordReader::GetContent()
+int SfxMultiRecordReader::GetContent()
/* [Beschreibung]
@@ -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..6490ea667a6c 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_uIntPtr Size, StreamMode eMode ):
SvMemoryStream( Buf, Size, eMode){}
- RW_SvMemoryStream( ULONG InitSize=512, ULONG Resize=64 ):
+ RW_SvMemoryStream( sal_uIntPtr InitSize=512, sal_uIntPtr Resize=64 ):
SvMemoryStream( InitSize, Resize ){}
- ULONG getActualSize(){ return nEndOfData; }
+ sal_uIntPtr getActualSize(){ return nEndOfData; }
};
diff --git a/svl/source/inc/poolio.hxx b/svl/source/inc/poolio.hxx
index 70122a5b1998..19dea8850be0 100644
--- a/svl/source/inc/poolio.hxx
+++ b/svl/source/inc/poolio.hxx
@@ -34,12 +34,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 ),
@@ -58,9 +58,9 @@ SV_DECL_PTRARR_DEL( SfxPoolVersionArr_Impl, SfxPoolVersion_Impl*, 0, 2 )
struct SfxPoolItemArray_Impl: public SfxPoolItemArrayBase_Impl
{
- USHORT nFirstFree;
+ sal_uInt16 nFirstFree;
- SfxPoolItemArray_Impl (USHORT nInitSize = 0)
+ SfxPoolItemArray_Impl (sal_uInt16 nInitSize = 0)
: SfxPoolItemArrayBase_Impl( nInitSize ),
nFirstFree( 0 )
{}
@@ -73,17 +73,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()
+ int bInSetItem;
+ int 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) );
@@ -123,76 +123,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..b46066996671 100644
--- a/svl/source/items/cenumitm.cxx
+++ b/svl/source/items/cenumitm.cxx
@@ -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 5c5f106a1c36..d692ca4e896a 100644
--- a/svl/source/items/itempool.cxx
+++ b/svl/source/items/itempool.cxx
@@ -64,7 +64,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;
@@ -82,15 +82,15 @@ const SfxPoolItem* SfxItemPool::GetPoolDefaultItem( USHORT nWhich ) const
// -----------------------------------------------------------------------
-inline FASTBOOL SfxItemPool::IsItemFlag_Impl( USHORT nPos, USHORT nFlag ) const
+inline int 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
+int SfxItemPool::IsItemFlag( sal_uInt16 nWhich, sal_uInt16 nFlag ) const
{
for ( const SfxItemPool *pPool = this; pPool; pPool = pPool->pSecondary )
{
@@ -98,7 +98,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;
}
// -----------------------------------------------------------------------
@@ -115,8 +115,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
@@ -124,9 +124,9 @@ 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 */
+ int bLoadRefCounts /* Ref-Counts mitladen oder auf 1 setzen */
)
/* [Beschreibung]
@@ -156,8 +156,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),
@@ -182,12 +182,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;
@@ -203,10 +203,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 */
)
@@ -241,12 +241,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;
@@ -256,7 +256,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 );
@@ -268,7 +268,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);
@@ -276,8 +276,8 @@ SfxItemPool::SfxItemPool
}
// Version-Map kopieren
- USHORT nVerCount = rPool.pImp->aVersions.Count();
- for ( USHORT nVer = 0; nVer < nVerCount; ++nVer )
+ sal_uInt16 nVerCount = rPool.pImp->aVersions.Count();
+ for ( sal_uInt16 nVer = 0; nVer < nVerCount; ++nVer )
{
const SfxPoolVersion_Impl *pOld = rPool.pImp->aVersions.GetObject(nVer);
const SfxPoolVersion_Impl *pNew = new SfxPoolVersion_Impl( *pOld );
@@ -304,7 +304,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" );
@@ -318,11 +318,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 */
)
@@ -341,7 +341,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;
}
@@ -352,13 +352,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 */
)
@@ -376,7 +376,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" );
@@ -440,13 +440,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 )
{
@@ -456,11 +456,11 @@ void SfxItemPool::SetSecondaryPool( SfxItemPool *pPool )
{
SfxPoolItem** ppHtArr =
(SfxPoolItem**)(*ppItemArr)->GetData();
- for( USHORT i = (*ppItemArr)->Count(); i; ++ppHtArr, --i )
+ for( sal_uInt16 i = (*ppItemArr)->Count(); i; ++ppHtArr, --i )
if ( !(*ppHtArr) )
{
DBG_ERROR( "old secondary pool must be empty" );
- bOK = FALSE;
+ bOK = sal_False;
break;
}
}
@@ -486,7 +486,7 @@ void SfxItemPool::SetSecondaryPool( SfxItemPool *pPool )
// -----------------------------------------------------------------------
-SfxMapUnit SfxItemPool::GetMetric( USHORT ) const
+SfxMapUnit SfxItemPool::GetMetric( sal_uInt16 ) const
{
DBG_CHKTHIS(SfxItemPool, 0);
@@ -565,7 +565,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" )
@@ -583,7 +583,7 @@ void SfxItemPool::Delete()
if ( *ppItemArr )
{
SfxPoolItem** ppHtArr = (SfxPoolItem**)(*ppItemArr)->GetData();
- for ( USHORT n = (*ppItemArr)->Count(); n; --n, ++ppHtArr )
+ for ( sal_uInt16 n = (*ppItemArr)->Count(); n; --n, ++ppHtArr )
if (*ppHtArr)
{
#ifdef DBG_UTIL
@@ -615,7 +615,7 @@ void SfxItemPool::Delete()
if ( *ppItemArr )
{
SfxPoolItem** ppHtArr = (SfxPoolItem**)(*ppItemArr)->GetData();
- for ( USHORT n = (*ppItemArr)->Count(); n; --n, ++ppHtArr )
+ for ( sal_uInt16 n = (*ppItemArr)->Count(); n; --n, ++ppHtArr )
if (*ppHtArr)
{
#ifdef DBG_UTIL
@@ -649,7 +649,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!!
@@ -664,7 +664,7 @@ void SfxItemPool::Cleanup()
(*ppStaticDefaultItem)->ISA(SfxSetItem)) )
{
SfxPoolItem** ppHtArr = (SfxPoolItem**)(*ppItemArr)->GetData();
- for ( USHORT n = (*ppItemArr)->Count(); n; --n, ++ppHtArr )
+ for ( sal_uInt16 n = (*ppItemArr)->Count(); n; --n, ++ppHtArr )
if ( *ppHtArr && !(*ppHtArr)->GetRefCount() )
{
DELETEZ(*ppHtArr);
@@ -682,7 +682,7 @@ void SfxItemPool::Cleanup()
if ( *ppItemArr )
{
SfxPoolItem** ppHtArr = (SfxPoolItem**)(*ppItemArr)->GetData();
- for ( USHORT n = (*ppItemArr)->Count(); n; --n, ++ppHtArr )
+ for ( sal_uInt16 n = (*ppItemArr)->Count(); n; --n, ++ppHtArr )
if ( *ppHtArr && !(*ppHtArr)->GetRefCount() )
DELETEZ( *ppHtArr );
}
@@ -719,7 +719,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) )
@@ -742,7 +742,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(),
@@ -753,7 +753,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 )
@@ -762,7 +762,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 ) )
{
@@ -790,7 +790,7 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, USHORT nWhich )
if ( IsPooledItem(&rItem) )
{
// 1. Schleife: teste ob der Pointer vorhanden ist.
- for( USHORT n = (*ppItemArr)->Count(); n; ++ppHtArray, --n )
+ for( sal_uInt16 n = (*ppItemArr)->Count(); n; ++ppHtArray, --n )
if( &rItem == (*ppHtArray) )
{
AddRef( **ppHtArray );
@@ -799,7 +799,7 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, USHORT nWhich )
}
// 2. Schleife: dann muessen eben die Attribute verglichen werden
- USHORT n;
+ sal_uInt16 n;
for ( n = (*ppItemArr)->Count(), ppHtArray = (SfxPoolItem**)(*ppItemArr)->GetData();
n; ++ppHtArray, --n )
{
@@ -820,7 +820,7 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, USHORT nWhich )
{
// freien Platz suchen
SfxPoolItem** ppHtArr;
- USHORT n, nCount = (*ppItemArr)->Count();
+ sal_uInt16 n, nCount = (*ppItemArr)->Count();
for ( n = (*ppItemArr)->nFirstFree,
ppHtArr = (SfxPoolItem**)(*ppItemArr)->GetData() + n;
n < nCount;
@@ -878,8 +878,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 )
@@ -891,7 +891,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 ||
@@ -916,7 +916,7 @@ void SfxItemPool::Remove( const SfxPoolItem& rItem )
SfxPoolItemArray_Impl** ppItemArr = (pImp->ppPoolItems + nIndex);
SFX_ASSERT( *ppItemArr, rItem.Which(), "removing Item not in Pool" );
SfxPoolItem** ppHtArr = (SfxPoolItem**)(*ppItemArr)->GetData();
- for( USHORT n = (*ppItemArr)->Count(); n; ++ppHtArr, --n )
+ for( sal_uInt16 n = (*ppItemArr)->Count(); n; ++ppHtArr, --n )
if( *ppHtArr == &rItem )
{
if ( (*ppHtArr)->GetRefCount() ) //!
@@ -928,7 +928,7 @@ void SfxItemPool::Remove( const SfxPoolItem& rItem )
}
// ggf. kleinstmoegliche freie Position merken
- USHORT nPos = (*ppItemArr)->Count() - n;
+ sal_uInt16 nPos = (*ppItemArr)->Count() - n;
if ( (*ppItemArr)->nFirstFree > nPos )
(*ppItemArr)->nFirstFree = nPos;
@@ -946,7 +946,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);
@@ -958,7 +958,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;
@@ -986,17 +986,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 )
@@ -1009,7 +1009,7 @@ void SfxItemPool::FillItemIdRanges_Impl( USHORT*& pWhichRanges ) const
// -----------------------------------------------------------------------
-const SfxPoolItem *SfxItemPool::GetItem(USHORT nWhich, USHORT nOfst) const
+const SfxPoolItem *SfxItemPool::GetItem(sal_uInt16 nWhich, sal_uInt16 nOfst) const
{
DBG_CHKTHIS(SfxItemPool, 0);
@@ -1034,7 +1034,7 @@ const SfxPoolItem *SfxItemPool::GetItem(USHORT nWhich, USHORT nOfst) const
// -----------------------------------------------------------------------
-USHORT SfxItemPool::GetItemCount(USHORT nWhich) const
+sal_uInt16 SfxItemPool::GetItemCount(sal_uInt16 nWhich) const
{
DBG_CHKTHIS(SfxItemPool, 0);
@@ -1054,21 +1054,21 @@ USHORT SfxItemPool::GetItemCount(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;
}
@@ -1080,7 +1080,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;
@@ -1094,7 +1094,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 )
@@ -1105,21 +1105,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;
}
@@ -1131,7 +1131,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;
@@ -1153,7 +1153,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 a79e5195187a..ce50cbbe84a3 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -53,16 +53,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_uIntPtr 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"
@@ -70,7 +70,7 @@ DBG_NAME(SfxItemSet)
#undef SvNums
#undef SfxNumRanges
-#define NUMTYPE ULONG
+#define NUMTYPE sal_uIntPtr
#define SvNums SvULongs
#define SfxNumRanges SfxULongRanges
#include "nranges.cxx"
@@ -87,8 +87,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 )
@@ -118,12 +118,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
)
@@ -155,19 +155,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 )
@@ -182,25 +182,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 );
}
@@ -221,27 +221,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;
@@ -252,14 +252,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),
@@ -287,8 +287,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;
@@ -299,7 +299,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
@@ -320,8 +320,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);
}
// -----------------------------------------------------------------------
@@ -333,11 +333,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() )
@@ -367,7 +367,7 @@ SfxItemSet::~SfxItemSet()
// -----------------------------------------------------------------------
-USHORT SfxItemSet::ClearItem( USHORT nWhich )
+sal_uInt16 SfxItemSet::ClearItem( sal_uInt16 nWhich )
// einzelnes Item oder alle Items (nWhich==0) l"oschen
@@ -376,12 +376,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?
@@ -401,7 +401,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 );
@@ -423,7 +423,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 )
@@ -439,7 +439,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 );
@@ -467,15 +467,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;
@@ -483,7 +483,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;
@@ -506,8 +506,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);
@@ -517,7 +517,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 )
@@ -563,7 +563,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) ||
@@ -572,7 +572,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) )
@@ -624,7 +624,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 );
}
@@ -643,17 +643,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 ) )
@@ -705,10 +705,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 ) )
@@ -763,7 +763,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
@@ -771,8 +771,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
@@ -783,7 +783,7 @@ void SfxItemSet::MergeRange( USHORT nFrom, USHORT nTo )
// -----------------------------------------------------------------------
-void SfxItemSet::SetRanges( const USHORT *pNewRanges )
+void SfxItemSet::SetRanges( const sal_uInt16 *pNewRanges )
/** <H3>Description</H3>
@@ -795,8 +795,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 )
@@ -805,20 +805,20 @@ void SfxItemSet::SetRanges( const USHORT *pNewRanges )
}
// create new item-array (by iterating through all new ranges)
- ULONG nSize = Capacity_Impl(pNewRanges);
+ sal_uIntPtr 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
@@ -844,8 +844,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() )
@@ -861,15 +861,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 );
}
}
@@ -880,12 +880,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 */
)
@@ -898,16 +898,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
@@ -918,23 +918,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;
}
@@ -943,8 +943,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
@@ -961,9 +961,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 &&
@@ -987,7 +987,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:
@@ -997,7 +997,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) )
@@ -1053,11 +1053,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;
@@ -1084,16 +1084,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 )
@@ -1113,11 +1113,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 );
@@ -1132,12 +1132,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;
@@ -1155,16 +1155,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 )
@@ -1184,11 +1184,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 );
@@ -1203,12 +1203,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;
@@ -1228,79 +1228,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" );
@@ -1313,11 +1313,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 )
@@ -1333,7 +1333,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;
}
@@ -1344,8 +1344,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;
}
@@ -1365,23 +1365,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 )
@@ -1401,11 +1401,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
@@ -1423,12 +1423,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?
@@ -1445,11 +1445,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) )
@@ -1479,11 +1479,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;
@@ -1492,7 +1492,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;
}
@@ -1501,22 +1501,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
+ int 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*)>
*/
{
@@ -1525,14 +1525,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_uIntPtr 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);
@@ -1552,7 +1552,7 @@ SvStream &SfxItemSet::Store
if ( nWrittenCount != _nCount )
{
// tats"achlichen Count im Stream ablegen
- ULONG nPos = rStream.Tell();
+ sal_uIntPtr nPos = rStream.Tell();
rStream.Seek( nCountPos );
rStream << nWrittenCount;
rStream.Seek( nPos );
@@ -1568,11 +1568,11 @@ SvStream &SfxItemSet::Load
(
SvStream& rStream, // Stream, aus dem geladen werden soll
- FASTBOOL bDirect, /* TRUE
+ int 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
@@ -1588,7 +1588,7 @@ SvStream &SfxItemSet::Load
[Querverweise]
- <SfxItemSet::Store(Stream&,BOOL)const>
+ <SfxItemSet::Store(Stream&,sal_Bool)const>
*/
{
@@ -1601,9 +1601,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 =
@@ -1613,9 +1613,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?
@@ -1650,48 +1650,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
@@ -1700,18 +1700,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 )
@@ -1720,11 +1720,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();
}
@@ -1743,8 +1743,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
@@ -1759,7 +1759,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
@@ -1775,18 +1775,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)
{
@@ -1794,8 +1794,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) );
}
@@ -1827,12 +1827,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.
@@ -1842,13 +1842,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;
@@ -1858,7 +1858,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
@@ -1896,17 +1896,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?
@@ -1989,15 +1989,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;
}
@@ -2025,7 +2025,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 );
@@ -2034,7 +2034,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 );
@@ -2043,18 +2043,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;
@@ -2066,7 +2066,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
@@ -2077,12 +2077,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;
@@ -2103,13 +2103,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..38fe0d394f6e 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_uIntPtr nActRead = 0;
sal_Char cTmpBuf[MAX_BUF];
SvMemoryStream aNewStream;
rStream >> nSize;
do {
- ULONG nToRead;
+ sal_uIntPtr 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_uIntPtr 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 b918add10f0f..adeef1d75a93 100644
--- a/svl/source/items/poolcach.cxx
+++ b/svl/source/items/poolcach.cxx
@@ -84,7 +84,7 @@ SfxItemPoolCache::SfxItemPoolCache( SfxItemPool *pItemPool,
SfxItemPoolCache::~SfxItemPoolCache()
{
DBG_DTOR(SfxItemPoolCache, 0);
- for ( USHORT nPos = 0; nPos < pCache->Count(); ++nPos ) {
+ for ( sal_uInt16 nPos = 0; nPos < pCache->Count(); ++nPos ) {
pPool->Remove( *(*pCache)[nPos].pPoolItem );
pPool->Remove( *(*pCache)[nPos].pOrigItem );
}
@@ -96,7 +96,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" );
@@ -104,7 +104,7 @@ const SfxSetItem& SfxItemPoolCache::ApplyTo( const SfxSetItem &rOrigItem, BOOL b
"original not in pool" );
// Suchen, ob diese Transformations schon einmal vorkam
- for ( USHORT nPos = 0; nPos < pCache->Count(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < pCache->Count(); ++nPos )
{
SfxItemModifyImpl &rMapEntry = (*pCache)[nPos];
if ( rMapEntry.pOrigItem == &rOrigItem )
diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx
index 6aeb64d76d1a..19efb02c4cef 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
@@ -178,14 +178,14 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
// Version-Maps
{
SfxMultiVarRecordWriter aVerRec( &rStream, SFX_ITEMPOOL_REC_VERSIONMAP, 0 );
- for ( USHORT nVerNo = 0; nVerNo < pImp->aVersions.Count(); ++nVerNo )
+ for ( sal_uInt16 nVerNo = 0; nVerNo < pImp->aVersions.Count(); ++nVerNo )
{
aVerRec.NewContent();
SfxPoolVersion_Impl *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();
- for ( USHORT i = 0; i < nSize && !rStream.GetError(); ++i, ++pArr, ++ppDefItem )
+ const sal_uInt16 nSize = GetSize_Impl();
+ for ( sal_uInt16 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,17 +225,17 @@ 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;
- const USHORT nCount = (*pArr)->Count();
+ const sal_uInt16 nCount = (*pArr)->Count();
DBG_ASSERT(nCount, "ItemArr ist leer");
rStream << nCount;
// Items an sich schreiben
SfxMultiMixRecordWriter aItemsRec( &rStream, SFX_ITEMPOOL_REC_ITEMS, 0 );
- for ( USHORT j = 0; j < nCount; ++j )
+ for ( sal_uInt16 j = 0; j < nCount; ++j )
{
// Item selbst besorgen
const SfxPoolItem *pItem = (*pArr)->GetObject(j);
@@ -244,10 +244,10 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
aItemsRec.NewContent(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_uIntPtr 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,14 +347,14 @@ 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 )
{
// "uber alle Items mit dieser Which-Id iterieren
SfxPoolItem** ppHtArr = (SfxPoolItem**)(*ppItemArr)->GetData();
- for( USHORT n = (*ppItemArr)->Count(); n; --n, ++ppHtArr )
+ for( sal_uInt16 n = (*ppItemArr)->Count(); n; --n, ++ppHtArr )
if (*ppHtArr)
{
#ifdef DBG_UTIL
@@ -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, USHORT nItemCount, USHORT nVersion,
+ SvStream & rStream, sal_uInt16 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( nItemCount );
SfxPoolItem *pItem = 0;
- USHORT n, nLastSurrogate = USHORT(-1);
+ sal_uInt16 n, nLastSurrogate = sal_uInt16(-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);
@@ -430,7 +430,7 @@ void SfxItemPool::readTheItems (
*ppArr = pNewArr;
// die Items merken, die schon im Pool sind
- int bEmpty = TRUE;
+ int bEmpty = sal_True;
if ( 0 != pOldArr )
for ( n = 0; bEmpty && n < pOldArr->Count(); ++n )
bEmpty = pOldArr->GetObject(n) == 0;
@@ -438,15 +438,15 @@ void SfxItemPool::readTheItems (
if ( !bEmpty )
{
// f"ur alle alten suchen, ob ein gleiches neues existiert
- for ( USHORT nOld = 0; nOld < pOldArr->Count(); ++nOld )
+ for ( sal_uInt16 nOld = 0; nOld < pOldArr->Count(); ++nOld )
{
SfxPoolItem *pOldItem = (*pOldArr)[nOld];
if ( pOldItem )
{
- USHORT nFree = USHRT_MAX;
- int bFound = FALSE;
- USHORT nCount = (*ppArr)->Count();
- for ( USHORT nNew = nCount; !bFound && nNew--; )
+ sal_uInt16 nFree = USHRT_MAX;
+ int bFound = sal_False;
+ sal_uInt16 nCount = (*ppArr)->Count();
+ for ( sal_uInt16 nNew = nCount; !bFound && nNew--; )
{
// geladenes Item
SfxPoolItem *&rpNewItem =
@@ -464,7 +464,7 @@ void SfxItemPool::readTheItems (
SetRefCount( *rpNewItem, 0 );
delete rpNewItem;
rpNewItem = pOldItem;
- bFound = TRUE;
+ bFound = sal_True;
}
}
@@ -495,14 +495,14 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
// "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 )
{
// "uber alle Items mit dieser Which-Id iterieren
SfxPoolItem** ppHtArr = (SfxPoolItem**)(*ppItemArr)->GetData();
- for( USHORT n = (*ppItemArr)->Count(); n; --n, ++ppHtArr )
+ for( sal_uInt16 n = (*ppItemArr)->Count(); n; --n, ++ppHtArr )
if (*ppHtArr)
{
#ifdef DBG_UTIL
@@ -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;
// Version neuer als bekannt?
if ( nVerNo >= pImp->aVersions.Count() )
{
// neue Version hinzufuegen
- 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,15 +625,15 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
}
// Items laden
- FASTBOOL bSecondaryLoaded = FALSE;
+ int bSecondaryLoaded = sal_False;
long nSecondaryEnd = 0;
{
SfxMultiRecordReader aWhichIdsRec( &rStream, SFX_ITEMPOOL_REC_WHICHIDS);
while ( aWhichIdsRec.GetContent() )
{
// SlotId, Which-Id und Item-Version besorgen
- USHORT nCount, nVersion, nWhich;
- //!USHORT nSlotId = aWhichIdsRec.GetContentTag();
+ sal_uInt16 nCount, nVersion, nWhich;
+ //!sal_uInt16 nSlotId = aWhichIdsRec.GetContentTag();
rStream >> nWhich;
if ( pImp->nLoadingVersion != pImp->nVersion )
// Which-Id aus File-Version in Pool-Version verschieben
@@ -646,11 +646,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
@@ -659,12 +659,12 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
if ( !bSecondaryLoaded && pSecondary && pImp->bInSetItem )
{
// an das Ende des eigenen Pools seeken
- ULONG nLastPos = rStream.Tell();
+ sal_uIntPtr 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
@@ -674,7 +674,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
// Items an sich lesen
readTheItems(rStream, nCount, nVersion, pDefItem, ppArr);
- pImp->bInSetItem = FALSE;
+ pImp->bInSetItem = sal_False;
}
}
@@ -685,8 +685,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
@@ -697,7 +697,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
@@ -723,7 +723,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
if ( aExternName != aName )
aName.Erase();
- pImp->bStreaming = FALSE;
+ pImp->bStreaming = sal_False;
return rStream;
};
@@ -739,19 +739,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;
}
@@ -760,7 +760,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;
}
@@ -768,20 +768,20 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
rStream >> nAttribSize;
// Size-Table einlesen
- ULONG nStartPos = rStream.Tell();
+ sal_uIntPtr 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_uIntPtr 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_uIntPtr der Size-Table gibt Pos an)
rStream.Seek( nEndOfSizes - sizeof(sal_uInt32) );
sal_uInt32 nVersionMapPos;
rStream >> nVersionMapPos;
@@ -789,22 +789,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);
// Version neuer als bekannt?
if ( nVerNo >= pImp->aVersions.Count() )
{
// neue Version hinzufuegen
- 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 );
}
@@ -817,9 +817,9 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
// Items laden
rStream.Seek( nStartPos );
CHECK_FILEFORMAT( rStream, SFX_ITEMPOOL_TAG_ITEMS );
- FASTBOOL bSecondaryLoaded = FALSE;
+ int bSecondaryLoaded = sal_False;
long nSecondaryEnd = 0;
- USHORT nWhich, nSlot;
+ sal_uInt16 nWhich, nSlot;
while ( rStream >> nWhich, nWhich )
{
// ggf. Which-Id aus alter Version verschieben?
@@ -827,10 +827,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;
@@ -843,18 +843,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( nCount );
pDefItem = *(ppStaticDefaults + nIndex);
}
// Position vor ersten Item merken
- ULONG nLastPos = rStream.Tell();
+ sal_uIntPtr nLastPos = rStream.Tell();
// SfxSetItems k"onnten Items aus Sekund"arpools beinhalten
if ( !bSecondaryLoaded && pSecondary && pDefItem->ISA(SfxSetItem) )
@@ -866,7 +866,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
@@ -874,9 +874,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_uIntPtr nPos = nLastPos;
rStream >> nRef;
if ( bKnownItem )
@@ -922,21 +922,21 @@ 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 ( USHORT n = 0; bEmpty && n < pOldArr->Count(); ++n )
+ for ( sal_uInt16 n = 0; bEmpty && n < pOldArr->Count(); ++n )
bEmpty = pOldArr->GetObject(n) == 0;
DBG_ASSERTWARNING( bEmpty, "loading non-empty pool" );
if ( !bEmpty )
{
// f"ur alle alten suchen, ob ein gleiches neues existiert
- for ( USHORT nOld = 0; nOld < pOldArr->Count(); ++nOld )
+ for ( sal_uInt16 nOld = 0; nOld < pOldArr->Count(); ++nOld )
{
SfxPoolItem *pOldItem = (*pOldArr)[nOld];
if ( pOldItem )
{
- int bFound = FALSE;
- for ( USHORT nNew = 0;
+ int bFound = sal_False;
+ for ( sal_uInt16 nNew = 0;
!bFound && nNew < (*ppArr)->Count();
++nNew )
{
@@ -949,7 +949,7 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
SetRefCount( *rpNewItem, 0 );
delete rpNewItem;
rpNewItem = pOldItem;
- bFound = TRUE;
+ bFound = sal_True;
SFX_TRACE( "reusing item", pOldItem );
}
}
@@ -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_uIntPtr 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_uIntPtr 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
)
@@ -1072,7 +1072,7 @@ const SfxPoolItem* SfxItemPool::LoadSurrogate
{
// erstmal das Surrogat lesen
- USHORT nSurrogat;
+ sal_uInt16 nSurrogat;
rStream >> nSurrogat;
// direkt gespeichertes Item?
@@ -1090,17 +1090,17 @@ const SfxPoolItem* SfxItemPool::LoadSurrogate
// auf jeden Fall aufgel"ost werden.
if ( !pRefPool )
pRefPool = this;
- FASTBOOL bResolvable = pRefPool->GetName().Len() > 0;
+ int bResolvable = pRefPool->GetName().Len() > 0;
if ( !bResolvable )
{
// 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;
@@ -1153,7 +1153,7 @@ const SfxPoolItem* SfxItemPool::LoadSurrogate
//-------------------------------------------------------------------------
-FASTBOOL SfxItemPool::StoreSurrogate
+int SfxItemPool::StoreSurrogate
(
SvStream& rStream,
const SfxPoolItem* pItem
@@ -1166,13 +1166,13 @@ FASTBOOL SfxItemPool::StoreSurrogate
[R"uckgabewert]
- FASTBOOL TRUE
+ int 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
@@ -1181,20 +1181,20 @@ FASTBOOL SfxItemPool::StoreSurrogate
{
if ( pItem )
{
- FASTBOOL bRealSurrogate = IsItemFlag(*pItem, SFX_ITEM_POOLABLE);
+ int bRealSurrogate = IsItemFlag(*pItem, SFX_ITEM_POOLABLE);
rStream << ( bRealSurrogate
? GetSurrogate( pItem )
- : (UINT16) SFX_ITEMS_DIRECT );
+ : (sal_uInt16) SFX_ITEMS_DIRECT );
return bRealSurrogate;
}
- rStream << (UINT16) SFX_ITEMS_NULL;
- return TRUE;
+ rStream << (sal_uInt16) SFX_ITEMS_NULL;
+ return sal_True;
}
// -----------------------------------------------------------------------
-USHORT SfxItemPool::GetSurrogate(const SfxPoolItem *pItem) const
+sal_uInt16 SfxItemPool::GetSurrogate(const SfxPoolItem *pItem) const
{
DBG_CHKTHIS(SfxItemPool, 0);
DBG_ASSERT( pItem, "no 0-Pointer Surrogate" );
@@ -1214,8 +1214,8 @@ USHORT SfxItemPool::GetSurrogate(const SfxPoolItem *pItem) const
SfxPoolItemArray_Impl* pItemArr = *(pImp->ppPoolItems + GetIndex_Impl(pItem->Which()));
DBG_ASSERT(pItemArr, "ItemArr nicht vorhanden");
- const USHORT nCount = pItemArr->Count();
- for ( USHORT i = 0; i < nCount; ++i )
+ const sal_uInt16 nCount = pItemArr->Count();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
const SfxPoolItem *p = (*pItemArr)[i];
if ( p == pItem )
@@ -1227,7 +1227,7 @@ USHORT SfxItemPool::GetSurrogate(const SfxPoolItem *pItem) const
// -----------------------------------------------------------------------
-FASTBOOL SfxItemPool::IsInStoringRange( USHORT nWhich ) const
+int 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>
*/
@@ -1398,12 +1398,12 @@ USHORT SfxItemPool::GetNewWhich
if ( nDiff > 0 )
{
// von der Top-Version bis runter zur File-Version stufenweise mappen
- for ( USHORT nMap = pImp->aVersions.Count(); nMap > 0; --nMap )
+ for ( sal_uInt16 nMap = pImp->aVersions.Count(); nMap > 0; --nMap )
{
SfxPoolVersion_Impl *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;
@@ -1424,7 +1424,7 @@ USHORT SfxItemPool::GetNewWhich
else if ( nDiff < 0 )
{
// von der File-Version bis zur aktuellen Version stufenweise mappen
- for ( USHORT nMap = 0; nMap < pImp->aVersions.Count(); ++nMap )
+ for ( sal_uInt16 nMap = 0; nMap < pImp->aVersions.Count(); ++nMap )
{
SfxPoolVersion_Impl *pVerInfo = pImp->aVersions[nMap];
if ( pVerInfo->_nVer > pImp->nLoadingVersion )
@@ -1444,14 +1444,14 @@ USHORT SfxItemPool::GetNewWhich
// -----------------------------------------------------------------------
-FASTBOOL SfxItemPool::IsInVersionsRange( USHORT nWhich ) const
+int SfxItemPool::IsInVersionsRange( sal_uInt16 nWhich ) const
{
return nWhich >= pImp->nVerStart && nWhich <= pImp->nVerEnd;
}
// -----------------------------------------------------------------------
-FASTBOOL SfxItemPool::IsCurrentVersionLoading() const
+int SfxItemPool::IsCurrentVersionLoading() const
/* [Beschreibung]
@@ -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>
*/
@@ -1542,7 +1542,7 @@ USHORT SfxItemPool::GetLoadingVersion() const
//-------------------------------------------------------------------------
-FASTBOOL SfxItemPool::IsVer2_Impl() const
+int SfxItemPool::IsVer2_Impl() const
{
return pMaster->pImp->nMajorVer >= 2;
}
@@ -1550,82 +1550,82 @@ FASTBOOL SfxItemPool::IsVer2_Impl() const
//-------------------------------------------------------------------------
-FASTBOOL SfxItemPool::StoreItem( SvStream &rStream, const SfxPoolItem &rItem,
- FASTBOOL bDirect ) const
+int SfxItemPool::StoreItem( SvStream &rStream, const SfxPoolItem &rItem,
+ int bDirect ) const
/* [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_uIntPtr Size
Size rItem.Store()
[Querverweise]
- <SfxItemPool::LoadItem(SvStream&,FASTBOOL)const>
+ <SfxItemPool::LoadItem(SvStream&,int)const>
*/
{
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_uIntPtr nIStart = rStream.Tell();
rItem.Store(rStream, nItemVersion);
- ULONG nIEnd = rStream.Tell();
+ sal_uIntPtr nIEnd = rStream.Tell();
rStream.Seek( nIStart-4 );
- rStream << (INT32) ( nIEnd-nIStart );
+ rStream << (sal_Int32) ( nIEnd-nIStart );
rStream.Seek( nIEnd );
}
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------------
-const SfxPoolItem* SfxItemPool::LoadItem( SvStream &rStream, FASTBOOL bDirect,
+const SfxPoolItem* SfxItemPool::LoadItem( SvStream &rStream, int bDirect,
const SfxItemPool *pRefPool )
// 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;
@@ -1637,7 +1637,7 @@ const SfxPoolItem* SfxItemPool::LoadItem( SvStream &rStream, FASTBOOL bDirect,
else
{
// WID in der Version nicht vorhanden => ueberspringen
- USHORT nSurro, nVersion, nLen;
+ sal_uInt16 nSurro, nVersion, nLen;
rStream >> nSurro;
if ( SFX_ITEMS_DIRECT == nSurro )
{
@@ -1649,7 +1649,7 @@ const SfxPoolItem* SfxItemPool::LoadItem( SvStream &rStream, FASTBOOL bDirect,
}
// wird eine andere Version geladen?
- FASTBOOL bCurVersion = pRefPool->IsCurrentVersionLoading();
+ int bCurVersion = pRefPool->IsCurrentVersionLoading();
if ( !bCurVersion )
// Which-Id auf neue Version mappen
nWhich = pRefPool->GetNewWhich( nWhich );
@@ -1668,17 +1668,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_uIntPtr nIStart = rStream.Tell();
// Which-Id in dieser Version bekannt?
if ( nWhich )
@@ -1696,7 +1696,7 @@ const SfxPoolItem* SfxItemPool::LoadItem( SvStream &rStream, FASTBOOL bDirect,
}
else
pItem = 0;
- ULONG nIEnd = rStream.Tell();
+ sal_uIntPtr 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..1f61b336a18a 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_uIntPtr 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_uIntPtr 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..6d183f111814 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_uIntPtr 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_uIntPtr 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..1d8c25c085d9 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_uIntPtr SfxStyleSheetBase::GetHelpId( String& rFile )
{
rFile = aHelpFile;
return nHelpId;
}
-void SfxStyleSheetBase::SetHelpId( const String& rFile, ULONG nId )
+void SfxStyleSheetBase::SetHelpId( const String& rFile, sal_uIntPtr 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_uIntPtr 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_uIntPtr 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_uIntPtr nPos1 = rStream.Tell();
+ rStream << (sal_uInt32) 0;
p->Store( rStream );
- ULONG nPos2 = rStream.Tell();
+ sal_uIntPtr 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 8a9f16052a8a..c61faa93bd34 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 ec0e10d8e3d7..fe4a47b1dbaf 100644
--- a/svl/source/items/whiter.cxx
+++ b/svl/source/items/whiter.cxx
@@ -38,7 +38,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)
@@ -57,19 +57,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;
}
@@ -78,7 +78,7 @@ USHORT SfxWhichIter::NextWhich()
// -----------------------------------------------------------------------
-USHORT SfxWhichIter::PrevWhich()
+sal_uInt16 SfxWhichIter::PrevWhich()
{
DBG_CHKTHIS(SfxWhichIter, 0);
while ( pRanges != pStart || 0 != nOfst )
@@ -89,7 +89,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;
}
@@ -98,7 +98,7 @@ USHORT SfxWhichIter::PrevWhich()
// -----------------------------------------------------------------------
-USHORT SfxWhichIter::FirstWhich()
+sal_uInt16 SfxWhichIter::FirstWhich()
{
DBG_CHKTHIS(SfxWhichIter, 0);
pRanges = pStart;
@@ -110,13 +110,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 b2184442ea0e..4dbedc1e5642 100644
--- a/svl/source/memtools/svarray.cxx
+++ b/svl/source/memtools/svarray.cxx
@@ -63,27 +63,27 @@
SV_IMPL_VARARR(SvPtrarr,VoidPtr)
SV_IMPL_VARARR_PLAIN(SvPtrarrPlain,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 );
}
-USHORT SvPtrarrPlain::GetPos( const VoidPtr aElement ) const
-{ USHORT n;
+sal_uInt16 SvPtrarrPlain::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( SvBools, BOOL )
-SV_IMPL_VARARR( SvBytes, BYTE )
-SV_IMPL_VARARR( SvULongs, ULONG )
-SV_IMPL_VARARR( SvUShorts, USHORT )
+SV_IMPL_VARARR( SvBools, sal_Bool )
+SV_IMPL_VARARR( SvBytes, sal_uInt8 )
+SV_IMPL_VARARR( SvULongs, sal_uIntPtr )
+SV_IMPL_VARARR( SvUShorts, sal_uInt16 )
SV_IMPL_VARARR( SvLongs, long)
SV_IMPL_VARARR( SvShorts, short )
-SV_IMPL_VARARR_SORT( SvULongsSort, ULONG )
+SV_IMPL_VARARR_SORT( SvULongsSort, sal_uIntPtr )
SV_IMPL_VARARR_SORT( SvLongsSort, long )
SV_IMPL_VARARR_SORT( SvXub_StrLensSort, xub_StrLen )
@@ -105,19 +105,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 )
@@ -131,40 +131,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 )
@@ -178,29 +178,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 )
@@ -212,29 +212,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) )
@@ -247,42 +247,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);
}
@@ -291,19 +291,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 )
@@ -317,39 +317,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 )
@@ -363,20 +363,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 fc230856ef7d..b6dfec5cbb63 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_uIntPtr i = m_aRest.Count(); i != 0;)
delete m_aRest.Remove(--i);
}
diff --git a/svl/source/misc/folderrestriction.cxx b/svl/source/misc/folderrestriction.cxx
index ae50ed3cd55a..f7eef328de7d 100644
--- a/svl/source/misc/folderrestriction.cxx
+++ b/svl/source/misc/folderrestriction.cxx
@@ -74,7 +74,7 @@ static void convertStringListToUrls (
}
/** retrieves the value of an environment variable
- @return <TRUE/> if and only if the retrieved string value is not empty
+ @return <sal_True/> if and only if the retrieved string value is not empty
*/
static bool getEnvironmentValue( const sal_Char* _pAsciiEnvName, ::rtl::OUString& _rValue )
{
diff --git a/svl/source/misc/fstathelper.cxx b/svl/source/misc/fstathelper.cxx
index 329912f9d997..c373e035fe05 100644
--- a/svl/source/misc/fstathelper.cxx
+++ b/svl/source/misc/fstathelper.cxx
@@ -43,7 +43,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,
@@ -70,7 +70,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,
@@ -85,7 +85,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..4c68922fce3b 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_uIntPtr 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 2203cc08458e..0cbd5d747882 100644
--- a/svl/source/misc/lngmisc.cxx
+++ b/svl/source/misc/lngmisc.cxx
@@ -42,11 +42,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;
@@ -55,33 +55,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 ))
@@ -92,7 +92,7 @@ BOOL RemoveControlChars( OUString &rTxt )
}
DBG_ASSERT( nCnt == nSize, "wrong size" );
rTxt = aBuf.makeStringAndClear();
- bModified = TRUE;
+ bModified = sal_True;
}
return bModified;
}
@@ -101,20 +101,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)
@@ -127,7 +127,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..967ec50d0ff5 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_uIntPtr 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/restrictedpaths.cxx b/svl/source/misc/restrictedpaths.cxx
index 8c6f136f3eee..8207d5765452 100644
--- a/svl/source/misc/restrictedpaths.cxx
+++ b/svl/source/misc/restrictedpaths.cxx
@@ -41,7 +41,7 @@ namespace svt
{
// ----------------------------------------------------------------
/** retrieves the value of an environment variable
- @return <TRUE/> if and only if the retrieved string value is not empty
+ @return <sal_True/> if and only if the retrieved string value is not empty
*/
bool lcl_getEnvironmentValue( const sal_Char* _pAsciiEnvName, ::rtl::OUString& _rValue )
{
diff --git a/svl/source/misc/strmadpt.cxx b/svl/source/misc/strmadpt.cxx
index 9811618eb571..24ed126cde25 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_uIntPtr, void *, sal_uIntPtr, sal_uIntPtr *)
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_uIntPtr nPos, void const * pBuffer,
+ sal_uIntPtr nCount, sal_uIntPtr * 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_uIntPtr)
{
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_uIntPtr nCount,
+ sal_uIntPtr * 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_uIntPtr >::max() - m_nPosition)
{
- nCount = std::numeric_limits< ULONG >::max() - m_nPosition;
+ nCount = std::numeric_limits< sal_uIntPtr >::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_uIntPtr SvOutputStreamOpenLockBytes::Tell() const
{
return m_nPosition;
}
//============================================================================
// virtual
-ULONG SvOutputStreamOpenLockBytes::Seek(ULONG)
+sal_uIntPtr SvOutputStreamOpenLockBytes::Seek(sal_uIntPtr)
{
return m_nPosition;
}
@@ -476,7 +476,7 @@ bool SvInputStream::open()
//============================================================================
// virtual
-ULONG SvInputStream::GetData(void * pData, ULONG nSize)
+sal_uIntPtr SvInputStream::GetData(void * pData, sal_uIntPtr 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_uIntPtr(nSize - nRead),
+ sal_uIntPtr(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_uIntPtr(nSize - nRead),
+ sal_uIntPtr(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_uIntPtr SvInputStream::PutData(void const *, sal_uIntPtr)
{
SetError(ERRCODE_IO_NOTSUPPORTED);
return 0;
@@ -584,7 +584,7 @@ void SvInputStream::FlushData()
//============================================================================
// virtual
-ULONG SvInputStream::SeekPos(ULONG nPos)
+sal_uIntPtr SvInputStream::SeekPos(sal_uIntPtr nPos)
{
if (open())
{
@@ -601,7 +601,7 @@ ULONG SvInputStream::SeekPos(ULONG nPos)
< STREAM_SEEK_TO_END)
{
m_nSeekedFrom = Tell();
- return ULONG(nLength);
+ return sal_uIntPtr(nLength);
}
}
catch (io::IOException) {}
@@ -636,7 +636,7 @@ ULONG SvInputStream::SeekPos(ULONG nPos)
//============================================================================
// virtual
-void SvInputStream::SetSize(ULONG)
+void SvInputStream::SetSize(sal_uIntPtr)
{
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_uIntPtr 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_uIntPtr 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_uIntPtr SvOutputStream::GetData(void *, sal_uIntPtr)
{
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_uIntPtr SvOutputStream::PutData(void const * pData, sal_uIntPtr nSize)
{
if (!m_xStream.is())
{
SetError(ERRCODE_IO_CANTWRITE);
return 0;
}
- ULONG nWritten = 0;
+ sal_uIntPtr nWritten = 0;
for (;;)
{
sal_Int32 nRemain
= sal_Int32(
- std::min(ULONG(nSize - nWritten),
- ULONG(std::numeric_limits< sal_Int32 >::max())));
+ std::min(sal_uIntPtr(nSize - nWritten),
+ sal_uIntPtr(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_uIntPtr SvOutputStream::SeekPos(sal_uIntPtr)
{
SetError(ERRCODE_IO_NOTSUPPORTED);
return 0;
@@ -763,7 +763,7 @@ void SvOutputStream::FlushData()
//============================================================================
// virtual
-void SvOutputStream::SetSize(ULONG)
+void SvOutputStream::SetSize(sal_uIntPtr)
{
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 0179ceaebc34..b09288cc83e4 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();